From 81be19b764af609ae13313fbcb3865f1bf8f2309 Mon Sep 17 00:00:00 2001 From: Andrew Friedley Date: Tue, 27 May 2014 08:09:27 -0700 Subject: [PATCH 0001/1704] Add new PSM2 MTL. This new MTL runs over PSM2 for Omni Path. PSM2 is a descendant of PSM with changes to support more ranks and some MPI-3 features like mprobe. PSM2 will only support Omni Path networks; PSM only supports True Scale. Likewise, the existing PSM MTL will continue to be maintained for True Scale, while the PSM2 MTL is developed and maintained for Omni Path. --- config/ompi_check_psm2.m4 | 72 ++++ ompi/mca/mtl/psm2/Makefile.am | 61 ++++ ompi/mca/mtl/psm2/configure.m4 | 49 +++ ompi/mca/mtl/psm2/help-mtl-psm.txt | 43 +++ ompi/mca/mtl/psm2/mtl_psm2.c | 463 +++++++++++++++++++++++++ ompi/mca/mtl/psm2/mtl_psm2.h | 106 ++++++ ompi/mca/mtl/psm2/mtl_psm2_cancel.c | 55 +++ ompi/mca/mtl/psm2/mtl_psm2_component.c | 219 ++++++++++++ ompi/mca/mtl/psm2/mtl_psm2_endpoint.c | 54 +++ ompi/mca/mtl/psm2/mtl_psm2_endpoint.h | 59 ++++ ompi/mca/mtl/psm2/mtl_psm2_probe.c | 134 +++++++ ompi/mca/mtl/psm2/mtl_psm2_recv.c | 124 +++++++ ompi/mca/mtl/psm2/mtl_psm2_request.h | 44 +++ ompi/mca/mtl/psm2/mtl_psm2_send.c | 129 +++++++ ompi/mca/mtl/psm2/mtl_psm2_types.h | 93 +++++ ompi/mca/mtl/psm2/post_configure.sh | 1 + ompi/mca/pml/cm/pml_cm_component.c | 1 + 17 files changed, 1707 insertions(+) create mode 100644 config/ompi_check_psm2.m4 create mode 100644 ompi/mca/mtl/psm2/Makefile.am create mode 100644 ompi/mca/mtl/psm2/configure.m4 create mode 100644 ompi/mca/mtl/psm2/help-mtl-psm.txt create mode 100644 ompi/mca/mtl/psm2/mtl_psm2.c create mode 100644 ompi/mca/mtl/psm2/mtl_psm2.h create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_cancel.c create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_component.c create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_endpoint.c create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_endpoint.h create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_probe.c create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_recv.c create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_request.h create mode 100644 ompi/mca/mtl/psm2/mtl_psm2_send.c create mode 100755 ompi/mca/mtl/psm2/mtl_psm2_types.h create mode 100644 ompi/mca/mtl/psm2/post_configure.sh diff --git a/config/ompi_check_psm2.m4 b/config/ompi_check_psm2.m4 new file mode 100644 index 00000000000..1e513c01b10 --- /dev/null +++ b/config/ompi_check_psm2.m4 @@ -0,0 +1,72 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2004-2005 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2006 The Regents of the University of California. +# All rights reserved. +# Copyright (c) 2006 QLogic Corp. All rights reserved. +# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014 Intel Corporation. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# OMPI_CHECK_PSM2(prefix, [action-if-found], [action-if-not-found]) +# -------------------------------------------------------- +# check if PSM2 support can be found. sets prefix_{CPPFLAGS, +# LDFLAGS, LIBS} as needed and runs action-if-found if there is +# support, otherwise executes action-if-not-found +AC_DEFUN([OMPI_CHECK_PSM2],[ + AC_ARG_WITH([psm2], + [AC_HELP_STRING([--with-psm2(=DIR)], + [Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) + OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h]) + AC_ARG_WITH([psm2-libdir], + [AC_HELP_STRING([--with-psm2-libdir=DIR], + [Search for PSM (Intel PSM2) libraries in DIR])]) + OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*]) + + ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS" + ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS" + ompi_check_psm2_$1_save_LIBS="$LIBS" + + AS_IF([test "$with_psm2" != "no"], + [AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "yes"], + [ompi_check_psm2_dir="$with_psm2"]) + AS_IF([test ! -z "$with_psm2_libdir" -a "$with_psm2_libdir" != "yes"], + [ompi_check_psm2_libdir="$with_psm2_libdir"]) + + OPAL_CHECK_PACKAGE([$1], + [psm2.h], + [psm2], + [psm_mq_irecv2], + [], + [$ompi_check_psm2_dir], + [$ompi_check_psm2_libdir], + [ompi_check_psm2_happy="yes"], + [ompi_check_psm2_happy="no"])], + [ompi_check_psm2_happy="no"]) + + CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS" + LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS" + LIBS="$ompi_check_psm2_$1_save_LIBS" + + AS_IF([test "$ompi_check_psm2_happy" = "yes" -a "$enable_progress_threads" = "yes"], + [AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.]) + ompi_check_psm2_happy="no"]) + + AS_IF([test "$ompi_check_psm2_happy" = "yes"], + [$2], + [AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "no"], + [AC_MSG_ERROR([PSM2 support requested but not found. Aborting])]) + $3]) +]) diff --git a/ompi/mca/mtl/psm2/Makefile.am b/ompi/mca/mtl/psm2/Makefile.am new file mode 100644 index 00000000000..145213340c6 --- /dev/null +++ b/ompi/mca/mtl/psm2/Makefile.am @@ -0,0 +1,61 @@ +# +# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2004-2005 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2006 The Regents of the University of California. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Intel, Inc. All rights reserved +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +EXTRA_DIST = post_configure.sh + +AM_CPPFLAGS = $(mtl_psm2_CPPFLAGS) + +dist_ompidata_DATA = help-mtl-psm.txt + +mtl_psm2_sources = \ + mtl_psm2.c \ + mtl_psm2.h \ + mtl_psm2_cancel.c \ + mtl_psm2_component.c \ + mtl_psm2_endpoint.c \ + mtl_psm2_endpoint.h \ + mtl_psm2_probe.c \ + mtl_psm2_recv.c \ + mtl_psm2_request.h \ + mtl_psm2_send.c \ + mtl_psm2_types.h + +# 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_ompi_mtl_psm2_DSO +component_noinst = +component_install = mca_mtl_psm2.la +else +component_noinst = libmca_mtl_psm2.la +component_install = +endif + +mcacomponentdir = $(ompilibdir) +mcacomponent_LTLIBRARIES = $(component_install) +mca_mtl_psm2_la_SOURCES = $(mtl_psm2_sources) +mca_mtl_psm2_la_LIBADD = $(mtl_psm2_LIBS) +mca_mtl_psm2_la_LDFLAGS = -module -avoid-version $(mtl_psm2_LDFLAGS) + +noinst_LTLIBRARIES = $(component_noinst) +libmca_mtl_psm2_la_SOURCES = $(mtl_psm2_sources) +libmca_mtl_psm2_la_LIBADD = $(mtl_psm2_LIBS) +libmca_mtl_psm2_la_LDFLAGS = -module -avoid-version $(mtl_psm2_LDFLAGS) diff --git a/ompi/mca/mtl/psm2/configure.m4 b/ompi/mca/mtl/psm2/configure.m4 new file mode 100644 index 00000000000..c72c5fd03f6 --- /dev/null +++ b/ompi/mca/mtl/psm2/configure.m4 @@ -0,0 +1,49 @@ +# -*- 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) 2013 Sandia National Laboratories. All rights reserved. +# Copyright (c) 2014 Intel Corporation. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_ompi_mtl_psm2_POST_CONFIG(will_build) +# ---------------------------------------- +# Only require the tag if we're actually going to be built +AC_DEFUN([MCA_ompi_mtl_psm2_POST_CONFIG], [ + AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([MTL])]) +])dnl + +# MCA_mtl_psm2_CONFIG([action-if-can-compile], +# [action-if-cant-compile]) +# ------------------------------------------------ +AC_DEFUN([MCA_ompi_mtl_psm2_CONFIG],[ + AC_CONFIG_FILES([ompi/mca/mtl/psm2/Makefile]) + + OMPI_CHECK_PSM2([mtl_psm2], + [mtl_psm2_happy="yes"], + [mtl_psm2_happy="no"]) + + AS_IF([test "$mtl_psm2_happy" = "yes"], + [$1], + [$2]) + + # substitute in the things needed to build psm2 + AC_SUBST([mtl_psm2_CFLAGS]) + AC_SUBST([mtl_psm2_CPPFLAGS]) + AC_SUBST([mtl_psm2_LDFLAGS]) + AC_SUBST([mtl_psm2_LIBS]) +])dnl diff --git a/ompi/mca/mtl/psm2/help-mtl-psm.txt b/ompi/mca/mtl/psm2/help-mtl-psm.txt new file mode 100644 index 00000000000..23c3d75b0d2 --- /dev/null +++ b/ompi/mca/mtl/psm2/help-mtl-psm.txt @@ -0,0 +1,43 @@ +# -*- text -*- +# +# Copyright (C) 2009. QLogic Corporation. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +[psm init] +Initialization of PSM library failed. + + Error: %s +# +[debug level] +Unable to set PSM debug level. + + Error: %s +# +[unable to open endpoint] +PSM was unable to open an endpoint. Please make sure that the network link is +active on the node and the hardware is functioning. + + Error: %s +# +[no uuid present] +Error obtaining unique transport key from ORTE (orte_precondition_transports %s +the environment). + + Local host: %s +# +[error polling network] +Error %s occurred in attempting to make network progress (psm_mq_ipeek). +# +[error posting receive] +Unable to post application receive buffer (psm_mq_irecv or psm_mq_imrecv). + + Error: %s + Buffer: %p + Length: %d +# +[path query mechanism unknown] +Unknown path record query mechanism %s. Supported mechanisms are %s. diff --git a/ompi/mca/mtl/psm2/mtl_psm2.c b/ompi/mca/mtl/psm2/mtl_psm2.c new file mode 100644 index 00000000000..4b95ce44a01 --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2.c @@ -0,0 +1,463 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2010 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "opal/mca/pmix/pmix.h" +#include "ompi/mca/mtl/mtl.h" +#include "ompi/mca/mtl/base/mtl_base_datatype.h" +#include "opal/util/show_help.h" +#include "ompi/proc/proc.h" + +#include "mtl_psm2.h" +#include "mtl_psm2_types.h" +#include "mtl_psm2_endpoint.h" +#include "mtl_psm2_request.h" + +mca_mtl_psm2_module_t ompi_mtl_psm2 = { + .super = { + /* NTH: PSM supports 16 bit context ids */ + .mtl_max_contextid = (1UL << 16) - 1, + .mtl_max_tag = (1UL << 30), /* must allow negatives */ + + .mtl_add_procs = ompi_mtl_psm2_add_procs, + .mtl_del_procs = ompi_mtl_psm2_del_procs, + .mtl_finalize = ompi_mtl_psm2_finalize, + + .mtl_send = ompi_mtl_psm2_send, + .mtl_isend = ompi_mtl_psm2_isend, + + .mtl_irecv = ompi_mtl_psm2_irecv, + .mtl_iprobe = ompi_mtl_psm2_iprobe, + .mtl_imrecv = ompi_mtl_psm2_imrecv, + .mtl_improbe = ompi_mtl_psm2_improbe, + + .mtl_cancel = ompi_mtl_psm2_cancel, + .mtl_add_comm = ompi_mtl_psm2_add_comm, + .mtl_del_comm = ompi_mtl_psm2_del_comm + } +}; + +static +psm_error_t +ompi_mtl_psm2_errhandler(psm_ep_t ep, const psm_error_t error, + const char *error_string, psm_error_token_t token) +{ + switch (error) { + /* We don't want PSM to default to exiting when the following errors occur */ + case PSM_EP_DEVICE_FAILURE: + case PSM_EP_NO_DEVICE: + case PSM_EP_NO_PORTS_AVAIL: + case PSM_EP_NO_NETWORK: + case PSM_EP_INVALID_UUID_KEY: + opal_show_help("help-mtl-psm.txt", + "unable to open endpoint", true, + psm_error_get_string(error)); + break; + + /* We can't handle any other errors than the ones above */ + default: + opal_output(0, "Open MPI detected an unexpected PSM error in opening " + "an endpoint: %s\n", error_string); + return psm_error_defer(token); + break; + } + return error; +} + +int ompi_mtl_psm2_progress( void ); + +int ompi_mtl_psm2_module_init(int local_rank, int num_local_procs) { + psm_error_t err; + psm_ep_t ep; /* endpoint handle */ + psm_mq_t mq; + psm_epid_t epid; /* unique lid+port identifier */ + psm_uuid_t unique_job_key; + struct psm_ep_open_opts ep_opt; + unsigned long long *uu = (unsigned long long *) unique_job_key; + char *generated_key; + char env_string[256]; + int rc; + + generated_key = getenv("OMPI_MCA_orte_precondition_transports"); + memset(uu, 0, sizeof(psm_uuid_t)); + + if (!generated_key || (strlen(generated_key) != 33) || + sscanf(generated_key, "%016llx-%016llx", &uu[0], &uu[1]) != 2) + { + opal_show_help("help-mtl-psm.txt", + "no uuid present", true, + generated_key ? "could not be parsed from" : + "not present in", ompi_process_info.nodename); + return OMPI_ERROR; + + } + + /* Handle our own errors for opening endpoints */ + psm_error_register_handler(ompi_mtl_psm2.ep, ompi_mtl_psm2_errhandler); + + /* Setup MPI_LOCALRANKID and MPI_LOCALNRANKS so PSM can allocate hardware + * contexts correctly. + */ + snprintf(env_string, sizeof(env_string), "%d", local_rank); + setenv("MPI_LOCALRANKID", env_string, 0); + snprintf(env_string, sizeof(env_string), "%d", num_local_procs); + setenv("MPI_LOCALNRANKS", env_string, 0); + + /* Setup the endpoint options. */ + psm_ep_open_opts_get_defaults(&ep_opt); + ep_opt.timeout = ompi_mtl_psm2.connect_timeout * 1e9; + ep_opt.affinity = PSM_EP_OPEN_AFFINITY_SKIP; /* do not let PSM set affinity */ + + /* Open PSM endpoint */ + err = psm_ep_open(unique_job_key, &ep_opt, &ep, &epid); + if (err) { + opal_show_help("help-mtl-psm.txt", + "unable to open endpoint", true, + psm_error_get_string(err)); + return OMPI_ERROR; + } + + /* Future errors are handled by the default error handler */ + psm_error_register_handler(ompi_mtl_psm2.ep, PSM_ERRHANDLER_DEFAULT); + + err = psm_mq_init(ep, + 0xffff000000000000ULL, + NULL, + 0, + &mq); + if (err) { + opal_show_help("help-mtl-psm.txt", + "psm init", true, + psm_error_get_string(err)); + return OMPI_ERROR; + } + + ompi_mtl_psm2.ep = ep; + ompi_mtl_psm2.epid = epid; + ompi_mtl_psm2.mq = mq; + + OPAL_MODEX_SEND(rc, PMIX_SYNC_REQD, PMIX_GLOBAL, + &mca_mtl_psm2_component.super.mtl_version, + &ompi_mtl_psm2.epid, + sizeof(psm_epid_t)); + + if (OMPI_SUCCESS != rc) { + opal_output(0, "Open MPI couldn't send PSM2 epid to head node process"); + return OMPI_ERROR; + } + + + /* register the psm progress function */ + opal_progress_register(ompi_mtl_psm2_progress); + + return OMPI_SUCCESS; +} + +int +ompi_mtl_psm2_finalize(struct mca_mtl_base_module_t* mtl) { + psm_error_t err; + + opal_progress_unregister(ompi_mtl_psm2_progress); + + /* free resources */ + err = psm_mq_finalize(ompi_mtl_psm2.mq); + if (err) { + opal_output(0, "Error in psm_mq_finalize (error %s)\n", + psm_error_get_string(err)); + return OMPI_ERROR; + } + + err = psm_ep_close(ompi_mtl_psm2.ep, PSM_EP_CLOSE_GRACEFUL, 1*1e9); + if (err) { + opal_output(0, "Error in psm_ep_close (error %s)\n", + psm_error_get_string(err)); + return OMPI_ERROR; + } + + err = psm_finalize(); + if (err) { + opal_output(0, "Error in psm_finalize (error %s)\n", + psm_error_get_string(err)); + return OMPI_ERROR; + } + + return OMPI_SUCCESS; +} + +static +const char * +ompi_mtl_psm2_connect_error_msg(psm_error_t err) +{ + switch (err) { /* See if we expect the error */ + case PSM_EPID_UNREACHABLE: + case PSM_EPID_INVALID_NODE: + case PSM_EPID_INVALID_MTU: + case PSM_EPID_INVALID_UUID_KEY: + case PSM_EPID_INVALID_VERSION: + case PSM_EPID_INVALID_CONNECT: + return psm_error_get_string(err); + break; + case PSM_EPID_UNKNOWN: + return "Connect status could not be determined " + "because of other errors"; + default: + return NULL; + } +} + +#ifndef min +# define min(a,b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef max +# define max(a,b) ((a) > (b) ? (a) : (b)) +#endif + +int +ompi_mtl_psm2_add_procs(struct mca_mtl_base_module_t *mtl, + size_t nprocs, + struct ompi_proc_t** procs) +{ + int i,j; + int rc; + psm_epid_t *epids_in = NULL; + int *mask_in = NULL; + psm_epid_t *epid; + psm_epaddr_t *epaddrs_out = NULL; + psm_error_t *errs_out = NULL, err; + size_t size; + int proc_errors[PSM_ERROR_LAST] = { 0 }; + int timeout_in_secs; + + assert(mtl == &ompi_mtl_psm2.super); + rc = OMPI_ERR_OUT_OF_RESOURCE; + + errs_out = (psm_error_t *) malloc(nprocs * sizeof(psm_error_t)); + if (errs_out == NULL) { + goto bail; + } + epids_in = (psm_epid_t *) malloc(nprocs * sizeof(psm_epid_t)); + if (epids_in == NULL) { + goto bail; + } + mask_in = (int *) malloc(nprocs * sizeof(int)); + if (mask_in == NULL) { + goto bail; + } + epaddrs_out = (psm_epaddr_t *) malloc(nprocs * sizeof(psm_epaddr_t)); + if (epaddrs_out == NULL) { + goto bail; + } + rc = OMPI_SUCCESS; + + /* Get the epids for all the processes from modex */ + for (i = 0; i < (int) nprocs; i++) { + if (NULL != procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]) { + /* Already connected: don't connect again */ + mask_in[i] = 0; + continue; + } + + OPAL_MODEX_RECV(rc, &mca_mtl_psm2_component.super.mtl_version, + &procs[i]->super, (void**)&epid, &size); + if (rc != OMPI_SUCCESS || size != sizeof(psm_epid_t)) { + return OMPI_ERROR; + } + epids_in[i] = *epid; + mask_in[i] = 1; + } + + timeout_in_secs = max(ompi_mtl_psm2.connect_timeout, 0.5 * nprocs); + + psm_error_register_handler(ompi_mtl_psm2.ep, PSM_ERRHANDLER_NOP); + + err = psm_ep_connect(ompi_mtl_psm2.ep, + nprocs, + epids_in, + mask_in, + errs_out, + epaddrs_out, + timeout_in_secs * 1e9); + if (err) { + char *errstr = (char *) ompi_mtl_psm2_connect_error_msg(err); + if (errstr == NULL) { + opal_output(0, "PSM returned unhandled/unknown connect error: %s\n", + psm_error_get_string(err)); + } + for (i = 0; i < (int) nprocs; i++) { + if (0 == mask_in[i]) { + continue; + } + + psm_error_t thiserr = errs_out[i]; + errstr = (char *) ompi_mtl_psm2_connect_error_msg(thiserr); + if (proc_errors[thiserr] == 0) { + proc_errors[thiserr] = 1; + opal_output(0, "PSM EP connect error (%s):", + errstr ? errstr : "unknown connect error"); + for (j = 0; j < (int) nprocs; j++) { + if (errs_out[j] == thiserr) { + opal_output(0, " %s", (NULL == procs[j]->super.proc_hostname) ? + "unknown" : procs[j]->super.proc_hostname); + } + } + opal_output(0, "\n"); + } + } + + rc = OMPI_ERROR; + } + else { + /* Default error handling is enabled, errors will not be returned to + * user. PSM prints the error and the offending endpoint's hostname + * and exits with -1 */ + psm_error_register_handler(ompi_mtl_psm2.ep, PSM_ERRHANDLER_DEFAULT); + + /* Fill in endpoint data */ + for (i = 0; i < (int) nprocs; i++) { + if (0 == mask_in[i]) { + continue; + } + + mca_mtl_psm2_endpoint_t *endpoint = + (mca_mtl_psm2_endpoint_t *) OBJ_NEW(mca_mtl_psm2_endpoint_t); + endpoint->peer_epid = epids_in[i]; + endpoint->peer_addr = epaddrs_out[i]; + procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL] = endpoint; + } + + rc = OMPI_SUCCESS; + } + +bail: + if (epids_in != NULL) { + free(epids_in); + } + if (mask_in != NULL) { + free(mask_in); + } + if (errs_out != NULL) { + free(errs_out); + } + if (epaddrs_out != NULL) { + free(epaddrs_out); + } + + return rc; +} + +int +ompi_mtl_psm2_del_procs(struct mca_mtl_base_module_t *mtl, + size_t nprocs, + struct ompi_proc_t** procs) +{ + return OMPI_SUCCESS; +} + + +int +ompi_mtl_psm2_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + + +int +ompi_mtl_psm2_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + + +int ompi_mtl_psm2_progress( void ) { + psm_error_t err; + mca_mtl_psm2_request_t* mtl_psm2_request; + psm_mq_status2_t psm_status; + psm_mq_req_t req; + int completed = 1; + + do { + err = psm_mq_ipeek2(ompi_mtl_psm2.mq, &req, NULL); + if (err == PSM_MQ_INCOMPLETE) { + return completed; + } else if (err != PSM_OK) { + goto error; + } + + completed++; + + err = psm_mq_test2(&req, &psm_status); + if (err != PSM_OK) { + goto error; + } + + mtl_psm2_request = (mca_mtl_psm2_request_t*) psm_status.context; + + if (mtl_psm2_request->type == OMPI_mtl_psm2_IRECV) { + + mtl_psm2_request->super.ompi_req->req_status.MPI_SOURCE = + psm_status.msg_tag.tag2; + mtl_psm2_request->super.ompi_req->req_status.MPI_TAG = + psm_status.msg_tag.tag1; + mtl_psm2_request->super.ompi_req->req_status._ucount = + psm_status.nbytes; + + ompi_mtl_datatype_unpack(mtl_psm2_request->convertor, + mtl_psm2_request->buf, + psm_status.msg_length); + } + + if(mtl_psm2_request->type == OMPI_mtl_psm2_ISEND) { + if (mtl_psm2_request->free_after) { + free(mtl_psm2_request->buf); + } + } + + switch (psm_status.error_code) { + case PSM_OK: + mtl_psm2_request->super.ompi_req->req_status.MPI_ERROR = + OMPI_SUCCESS; + break; + case PSM_MQ_TRUNCATION: + mtl_psm2_request->super.ompi_req->req_status.MPI_ERROR = + MPI_ERR_TRUNCATE; + break; + default: + mtl_psm2_request->super.ompi_req->req_status.MPI_ERROR = + MPI_ERR_INTERN; + } + + mtl_psm2_request->super.completion_callback(&mtl_psm2_request->super); + + } + while (1); + + error: + opal_show_help("help-mtl-psm.txt", + "error polling network", true, + psm_error_get_string(err)); + return 1; +} diff --git a/ompi/mca/mtl/psm2/mtl_psm2.h b/ompi/mca/mtl/psm2/mtl_psm2.h new file mode 100644 index 00000000000..b48e07a039e --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2.h @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef MTL_PSM2_H_HAS_BEEN_INCLUDED +#define MTL_PSM2_H_HAS_BEEN_INCLUDED + +#include "ompi/mca/pml/pml.h" +#include "ompi/mca/mtl/mtl.h" +#include "ompi/mca/mtl/base/base.h" +#include "opal/datatype/opal_convertor.h" +#include +#include + +BEGIN_C_DECLS + + +/* MTL interface functions */ +extern int ompi_mtl_psm2_add_procs(struct mca_mtl_base_module_t* mtl, + size_t nprocs, + struct ompi_proc_t** procs); + +extern int ompi_mtl_psm2_del_procs(struct mca_mtl_base_module_t* mtl, + size_t nprocs, + struct ompi_proc_t** procs); + +int +ompi_mtl_psm2_send(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t* comm, + int dest, + int tag, + struct opal_convertor_t *convertor, + mca_pml_base_send_mode_t mode); + +extern int ompi_mtl_psm2_isend(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t* comm, + int dest, + int tag, + struct opal_convertor_t *convertor, + mca_pml_base_send_mode_t mode, + bool blocking, + mca_mtl_request_t * mtl_request); + +extern int ompi_mtl_psm2_irecv(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + struct opal_convertor_t *convertor, + struct mca_mtl_request_t *mtl_request); + + +extern int ompi_mtl_psm2_iprobe(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *flag, + struct ompi_status_public_t *status); + +extern int ompi_mtl_psm2_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request); + +extern int ompi_mtl_psm2_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status); + +extern int ompi_mtl_psm2_cancel(struct mca_mtl_base_module_t* mtl, + struct mca_mtl_request_t *mtl_request, + int flag); + +extern int ompi_mtl_psm2_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); + +extern int ompi_mtl_psm2_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); + +extern int ompi_mtl_psm2_finalize(struct mca_mtl_base_module_t* mtl); + +int ompi_mtl_psm2_module_init(int local_rank, int num_local_procs); + + + +END_C_DECLS + +#endif /* MTL_PSM2_H_HAS_BEEN_INCLUDED */ diff --git a/ompi/mca/mtl/psm2/mtl_psm2_cancel.c b/ompi/mca/mtl/psm2/mtl_psm2_cancel.c new file mode 100644 index 00000000000..dad4649dd02 --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_cancel.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "mtl_psm2.h" +#include "mtl_psm2_request.h" + +int ompi_mtl_psm2_cancel(struct mca_mtl_base_module_t* mtl, + struct mca_mtl_request_t *mtl_request, + int flag) { + + psm_error_t err; + psm_mq_status_t status; + + mca_mtl_psm2_request_t *mtl_psm2_request = + (mca_mtl_psm2_request_t*) mtl_request; + + /* PSM does not support canceling sends */ + if(OMPI_mtl_psm2_ISEND == mtl_psm2_request->type) { + return OMPI_SUCCESS; + } + + err = psm_mq_cancel(&mtl_psm2_request->psm_request); + if(PSM_OK == err) { + err = psm_mq_test(&mtl_psm2_request->psm_request, &status); + if(PSM_OK == err) { + mtl_request->ompi_req->req_status._cancelled = true; + mtl_psm2_request->super.completion_callback(&mtl_psm2_request->super); + return OMPI_SUCCESS; + } else { + return OMPI_ERROR; + } + } else if(PSM_MQ_INCOMPLETE == err) { + return OMPI_SUCCESS; + } + + return OMPI_ERROR; +} diff --git a/ompi/mca/mtl/psm2/mtl_psm2_component.c b/ompi/mca/mtl/psm2/mtl_psm2_component.c new file mode 100644 index 00000000000..5a43f77a6a1 --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_component.c @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2004-2007 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) 2006-2010 QLogic Corporation. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "opal/mca/event/event.h" +#include "opal/util/output.h" +#include "opal/util/show_help.h" +#include "ompi/proc/proc.h" + +#include "mtl_psm2.h" +#include "mtl_psm2_types.h" +#include "mtl_psm2_request.h" + +#include "psm.h" + +#include +#include +#include + +static int param_priority; + +static int ompi_mtl_psm2_component_open(void); +static int ompi_mtl_psm2_component_close(void); +static int ompi_mtl_psm2_component_query(mca_base_module_t **module, int *priority); +static int ompi_mtl_psm2_component_register(void); + +static mca_mtl_base_module_t* ompi_mtl_psm2_component_init( bool enable_progress_threads, + bool enable_mpi_threads ); + +mca_mtl_psm2_component_t mca_mtl_psm2_component = { + + { + /* First, the mca_base_component_t struct containing meta + * information about the component itself */ + + .mtl_version = { + MCA_MTL_BASE_VERSION_2_0_0, + + .mca_component_name = "psm2", + MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, + OMPI_RELEASE_VERSION), + .mca_open_component = ompi_mtl_psm2_component_open, + .mca_close_component = ompi_mtl_psm2_component_close, + .mca_query_component = ompi_mtl_psm2_component_query, + .mca_register_component_params = ompi_mtl_psm2_component_register, + }, + .mtl_data = { + /* The component is not checkpoint ready */ + MCA_BASE_METADATA_PARAM_NONE + }, + + .mtl_init = ompi_mtl_psm2_component_init, + } +}; + +static int +ompi_mtl_psm2_component_register(void) +{ + ompi_mtl_psm2.connect_timeout = 180; + (void) mca_base_component_var_register(&mca_mtl_psm2_component.super.mtl_version, + "connect_timeout", + "PSM connection timeout value in seconds", + MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, + OPAL_INFO_LVL_9, + MCA_BASE_VAR_SCOPE_READONLY, + &ompi_mtl_psm2.connect_timeout); + + param_priority = 120; + (void) mca_base_component_var_register (&mca_mtl_psm2_component.super.mtl_version, + "priority", "Priority of the PSM2 MTL component", + MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, + OPAL_INFO_LVL_9, + MCA_BASE_VAR_SCOPE_READONLY, + ¶m_priority); + + return OMPI_SUCCESS; +} + +static int +ompi_mtl_psm2_component_open(void) +{ + struct stat st; + + /* Component available only if Omni-Path hardware is present */ + if (0 == stat("/dev/hfi1", &st)) { + return OMPI_SUCCESS; + } + else { + return OPAL_ERR_NOT_AVAILABLE; + } +} + +static int +ompi_mtl_psm2_component_query(mca_base_module_t **module, int *priority) +{ + /* + * if we get here it means that PSM is available so give high priority + */ + + *priority = param_priority; + *module = (mca_base_module_t *)&ompi_mtl_psm2.super; + return OMPI_SUCCESS; +} + +static int +ompi_mtl_psm2_component_close(void) +{ + return OMPI_SUCCESS; +} + +static int +get_num_total_procs(int *out_ntp) +{ + *out_ntp = (int)ompi_process_info.num_procs; + return OMPI_SUCCESS; +} + +static int +get_num_local_procs(int *out_nlp) +{ + /* num_local_peers does not include us in + * its calculation, so adjust for that */ + *out_nlp = (int)(1 + ompi_process_info.num_local_peers); + return OMPI_SUCCESS; +} + +static int +get_local_rank(int *out_rank) +{ + ompi_node_rank_t my_node_rank; + + *out_rank = 0; + + if (OMPI_NODE_RANK_INVALID == (my_node_rank = + ompi_process_info.my_node_rank)) { + return OMPI_ERROR; + } + *out_rank = (int)my_node_rank; + return OMPI_SUCCESS; +} + +static mca_mtl_base_module_t * +ompi_mtl_psm2_component_init(bool enable_progress_threads, + bool enable_mpi_threads) +{ + psm_error_t err; + int verno_major = PSM_VERNO_MAJOR; + int verno_minor = PSM_VERNO_MINOR; + int local_rank = -1, num_local_procs = 0; + int num_total_procs = 0; + + /* Compute the total number of processes on this host and our local rank + * on that node. We need to provide PSM with these values so it can + * allocate hardware contexts appropriately across processes. + */ + if (OMPI_SUCCESS != get_num_local_procs(&num_local_procs)) { + opal_output(0, "Cannot determine number of local processes. " + "Cannot continue.\n"); + return NULL; + } + if (OMPI_SUCCESS != get_local_rank(&local_rank)) { + opal_output(0, "Cannot determine local rank. Cannot continue.\n"); + return NULL; + } + if (OMPI_SUCCESS != get_num_total_procs(&num_total_procs)) { + opal_output(0, "Cannot determine total number of processes. " + "Cannot continue.\n"); + return NULL; + } + + err = psm_error_register_handler(NULL /* no ep */, + PSM_ERRHANDLER_NOP); + if (err) { + opal_output(0, "Error in psm_error_register_handler (error %s)\n", + psm_error_get_string(err)); + return NULL; + } + + if (num_local_procs == num_total_procs) { + setenv("PSM_DEVICES", "self,shm", 0); + } + + err = psm_init(&verno_major, &verno_minor); + if (err) { + opal_show_help("help-mtl-psm.txt", + "psm init", true, + psm_error_get_string(err)); + return NULL; + } + + /* Complete PSM initialization */ + ompi_mtl_psm2_module_init(local_rank, num_local_procs); + + ompi_mtl_psm2.super.mtl_request_size = + sizeof(mca_mtl_psm2_request_t) - + sizeof(struct mca_mtl_request_t); + + return &ompi_mtl_psm2.super; +} diff --git a/ompi/mca/mtl/psm2/mtl_psm2_endpoint.c b/ompi/mca/mtl/psm2/mtl_psm2_endpoint.c new file mode 100644 index 00000000000..76d17815f8f --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_endpoint.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + + +#include "ompi_config.h" +#include +#include +#include "ompi/types.h" +#include "mtl_psm2.h" +#include "mtl_psm2_types.h" +#include "mtl_psm2_endpoint.h" + +/* + * Initialize state of the endpoint instance. + * + */ + +static void mca_mtl_psm2_endpoint_construct(mca_mtl_psm2_endpoint_t* endpoint) +{ + endpoint->mtl_psm2_module = NULL; +} + +/* + * Destroy a endpoint + * + */ + +static void mca_mtl_psm2_endpoint_destruct(mca_mtl_psm2_endpoint_t* endpoint) +{ +} + + +OBJ_CLASS_INSTANCE( + mca_mtl_psm2_endpoint_t, + opal_list_item_t, + mca_mtl_psm2_endpoint_construct, + mca_mtl_psm2_endpoint_destruct); diff --git a/ompi/mca/mtl/psm2/mtl_psm2_endpoint.h b/ompi/mca/mtl/psm2/mtl_psm2_endpoint.h new file mode 100644 index 00000000000..e3233db352f --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_endpoint.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef MCA_MTL_PSM2_ENDPOINT_H +#define MCA_MTL_PSM2_ENDPOINT_H + +#include "opal/class/opal_list.h" +#include "opal/mca/event/event.h" +#include "ompi/mca/mtl/mtl.h" +#include "mtl_psm2.h" + +#include "psm2.h" + +BEGIN_C_DECLS + +OBJ_CLASS_DECLARATION(mca_mtl_psm2_endpoint_t); + +/** + * An abstraction that represents a connection to a endpoint process. + * An instance of mca_mtl_psm2_endpoint_t is associated w/ each process + * and MTL pair at startup. However, connections to the endpoint + * are established dynamically on an as-needed basis: + */ + +struct mca_mtl_psm2_endpoint_t { + opal_list_item_t super; + + struct mca_mtl_psm2_module_t* mtl_psm2_module; + /**< MTL instance that created this connection */ + + psm_epid_t peer_epid; + /**< The unique epid for the opened port */ + + psm_epaddr_t peer_addr; + /**< The connected endpoint handle*/ +}; + +typedef struct mca_mtl_psm2_endpoint_t mca_mtl_psm2_endpoint_t; +OBJ_CLASS_DECLARATION(mca_mtl_psm2_endpoint); + +END_C_DECLS +#endif diff --git a/ompi/mca/mtl/psm2/mtl_psm2_probe.c b/ompi/mca/mtl/psm2/mtl_psm2_probe.c new file mode 100644 index 00000000000..7bcb358fcaf --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_probe.c @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2010 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "mtl_psm2.h" +#include "mtl_psm2_types.h" +#include "psm2.h" +#include "ompi/communicator/communicator.h" +#include "ompi/message/message.h" + + +int ompi_mtl_psm2_iprobe(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *flag, + struct ompi_status_public_t *status) +{ + psm_mq_tag_t mqtag, tagsel; + psm_mq_status2_t mqstat; + psm_error_t err; + + PSM_MAKE_TAGSEL(src, tag, comm->c_contextid, mqtag, tagsel); + + err = psm_mq_iprobe2(ompi_mtl_psm2.mq, + PSM_MQ_ANY_ADDR, &mqtag, &tagsel, &mqstat); + if (err == PSM_OK) { + *flag = 1; + if(MPI_STATUS_IGNORE != status) { + status->MPI_SOURCE = mqstat.msg_tag.tag2; + status->MPI_TAG = mqstat.msg_tag.tag1; + status->_ucount = mqstat.nbytes; + + switch (mqstat.error_code) { + case PSM_OK: + status->MPI_ERROR = OMPI_SUCCESS; + break; + case PSM_MQ_TRUNCATION: + status->MPI_ERROR = MPI_ERR_TRUNCATE; + break; + default: + status->MPI_ERROR = MPI_ERR_INTERN; + } + } + + return OMPI_SUCCESS; + } + else if (err == PSM_MQ_INCOMPLETE) { + *flag = 0; + return OMPI_SUCCESS; + } + else + return OMPI_ERROR; +} + + +int +ompi_mtl_psm2_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status) +{ + struct ompi_message_t* msg; + psm_mq_tag_t mqtag, tagsel; + psm_mq_status2_t mqstat; + psm_mq_req_t mqreq; + psm_error_t err; + + PSM_MAKE_TAGSEL(src, tag, comm->c_contextid, mqtag, tagsel); + + err = psm_mq_improbe2(ompi_mtl_psm2.mq, + PSM_MQ_ANY_ADDR, &mqtag, &tagsel, &mqreq, &mqstat); + if (err == PSM_OK) { + + if(MPI_STATUS_IGNORE != status) { + status->MPI_SOURCE = mqstat.msg_tag.tag2; + status->MPI_TAG = mqstat.msg_tag.tag1; + status->_ucount = mqstat.nbytes; + + switch (mqstat.error_code) { + case PSM_OK: + status->MPI_ERROR = OMPI_SUCCESS; + break; + case PSM_MQ_TRUNCATION: + status->MPI_ERROR = MPI_ERR_TRUNCATE; + break; + default: + status->MPI_ERROR = MPI_ERR_INTERN; + } + } + + msg = ompi_message_alloc(); + if(NULL == msg) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + + msg->comm = comm; + msg->req_ptr = mqreq; + msg->peer = mqstat.msg_tag.tag2; + msg->count = mqstat.nbytes; + + *message = msg; + *matched = 1; + return OMPI_SUCCESS; + } else if(err == PSM_MQ_INCOMPLETE) { + *matched = 0; + *message = MPI_MESSAGE_NULL; + return OMPI_SUCCESS; + } else { + return OMPI_ERROR; + } +} diff --git a/ompi/mca/mtl/psm2/mtl_psm2_recv.c b/ompi/mca/mtl/psm2/mtl_psm2_recv.c new file mode 100644 index 00000000000..94c0a955ded --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_recv.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + + +#include "ompi_config.h" +#include "ompi/communicator/communicator.h" +#include "ompi/message/message.h" +#include "opal/datatype/opal_convertor.h" +#include "ompi/mca/mtl/base/mtl_base_datatype.h" +#include "opal/util/show_help.h" + +#include "mtl_psm2.h" +#include "mtl_psm2_types.h" +#include "mtl_psm2_request.h" + +int +ompi_mtl_psm2_irecv(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + struct opal_convertor_t *convertor, + struct mca_mtl_request_t *mtl_request) +{ + int ret; + psm_error_t err; + mca_mtl_psm2_request_t * mtl_psm2_request = (mca_mtl_psm2_request_t*) mtl_request; + psm_mq_tag_t mqtag; + psm_mq_tag_t tagsel; + size_t length; + + ret = ompi_mtl_datatype_recv_buf(convertor, + &mtl_psm2_request->buf, + &length, + &mtl_psm2_request->free_after); + + if (OMPI_SUCCESS != ret) return ret; + + mtl_psm2_request->length = length; + mtl_psm2_request->convertor = convertor; + mtl_psm2_request->type = OMPI_mtl_psm2_IRECV; + + PSM_MAKE_TAGSEL(src, tag, comm->c_contextid, mqtag, tagsel); + + err = psm_mq_irecv2(ompi_mtl_psm2.mq, + PSM_MQ_ANY_ADDR, + &mqtag, + &tagsel, + 0, + mtl_psm2_request->buf, + length, + mtl_psm2_request, + &mtl_psm2_request->psm_request); + + if (err) { + opal_show_help("help-mtl-psm.txt", + "error posting receive", true, + psm_error_get_string(err), + mtl_psm2_request->buf, length); + return OMPI_ERROR; + } + + return OMPI_SUCCESS; +} + + +int +ompi_mtl_psm2_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request) +{ + mca_mtl_psm2_request_t *mtl_psm2_request = + (mca_mtl_psm2_request_t*) mtl_request; + size_t length; + psm_error_t err; + int ret; + + mtl_psm2_request->psm_request = + (psm_mq_req_t)(*message)->req_ptr; + + ret = ompi_mtl_datatype_recv_buf(convertor, + &mtl_psm2_request->buf, + &length, + &mtl_psm2_request->free_after); + + if (OMPI_SUCCESS != ret) return ret; + + mtl_psm2_request->length = length; + mtl_psm2_request->convertor = convertor; + mtl_psm2_request->type = OMPI_mtl_psm2_IRECV; + + + err = psm_mq_imrecv(ompi_mtl_psm2.mq, 0, + mtl_psm2_request->buf, length, mtl_psm2_request, + &mtl_psm2_request->psm_request); + + if(err) { + opal_show_help("help-mtl-psm.txt", + "error posting receive", true, + psm_error_get_string(err), + mtl_psm2_request->buf, length); + return OMPI_ERROR; + } + + *message = MPI_MESSAGE_NULL; + return OMPI_SUCCESS; +} diff --git a/ompi/mca/mtl/psm2/mtl_psm2_request.h b/ompi/mca/mtl/psm2/mtl_psm2_request.h new file mode 100644 index 00000000000..bc669eec8ce --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_request.h @@ -0,0 +1,44 @@ +/* + * 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) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef OMPI_MTL_PSM2_REQUEST_H +#define OMPI_MTL_PSM2_REQUEST_H + +#include "opal/datatype/opal_convertor.h" + + +typedef enum { + OMPI_mtl_psm2_ISEND, + OMPI_mtl_psm2_IRECV +} mca_mtl_psm2_request_type_t; + +struct mca_mtl_psm2_request_t { + struct mca_mtl_request_t super; + mca_mtl_psm2_request_type_t type; + psm_mq_req_t psm_request; + /* psm_segment_t psm_segment[1]; */ + void *buf; + size_t length; + struct opal_convertor_t *convertor; + bool free_after; +}; +typedef struct mca_mtl_psm2_request_t mca_mtl_psm2_request_t; + +#endif diff --git a/ompi/mca/mtl/psm2/mtl_psm2_send.c b/ompi/mca/mtl/psm2/mtl_psm2_send.c new file mode 100644 index 00000000000..76fb5a1cd07 --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_send.c @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "ompi/mca/pml/pml.h" +#include "ompi/communicator/communicator.h" +#include "opal/datatype/opal_convertor.h" + +#include "mtl_psm2.h" +#include "mtl_psm2_types.h" +#include "mtl_psm2_request.h" +#include "ompi/mca/mtl/base/mtl_base_datatype.h" + +int +ompi_mtl_psm2_send(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t* comm, + int dest, + int tag, + struct opal_convertor_t *convertor, + mca_pml_base_send_mode_t mode) +{ + psm_error_t err; + mca_mtl_psm2_request_t mtl_psm2_request; + psm_mq_tag_t mqtag; + uint32_t flags = 0; + int ret; + size_t length; + ompi_proc_t* ompi_proc = ompi_comm_peer_lookup( comm, dest ); + mca_mtl_psm2_endpoint_t* psm_endpoint = (mca_mtl_psm2_endpoint_t*) ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]; + + assert(mtl == &ompi_mtl_psm2.super); + + PSM_MAKE_MQTAG(comm->c_contextid, comm->c_my_rank, tag, mqtag); + + ret = ompi_mtl_datatype_pack(convertor, + &mtl_psm2_request.buf, + &length, + &mtl_psm2_request.free_after); + + + mtl_psm2_request.length = length; + mtl_psm2_request.convertor = convertor; + mtl_psm2_request.type = OMPI_mtl_psm2_ISEND; + + if (OMPI_SUCCESS != ret) return ret; + + if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS) + flags |= PSM_MQ_FLAG_SENDSYNC; + + err = psm_mq_send2(ompi_mtl_psm2.mq, + psm_endpoint->peer_addr, + flags, + &mqtag, + mtl_psm2_request.buf, + length); + + if (mtl_psm2_request.free_after) { + free(mtl_psm2_request.buf); + } + + return err == PSM_OK ? OMPI_SUCCESS : OMPI_ERROR; +} + +int +ompi_mtl_psm2_isend(struct mca_mtl_base_module_t* mtl, + struct ompi_communicator_t* comm, + int dest, + int tag, + struct opal_convertor_t *convertor, + mca_pml_base_send_mode_t mode, + bool blocking, + mca_mtl_request_t * mtl_request) +{ + psm_error_t psm_error; + psm_mq_tag_t mqtag; + uint32_t flags = 0; + int ret; + mca_mtl_psm2_request_t * mtl_psm2_request = (mca_mtl_psm2_request_t*) mtl_request; + size_t length; + ompi_proc_t* ompi_proc = ompi_comm_peer_lookup( comm, dest ); + mca_mtl_psm2_endpoint_t* psm_endpoint = (mca_mtl_psm2_endpoint_t*)ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]; + + assert(mtl == &ompi_mtl_psm2.super); + + PSM_MAKE_MQTAG(comm->c_contextid, comm->c_my_rank, tag, mqtag); + + + ret = ompi_mtl_datatype_pack(convertor, + &mtl_psm2_request->buf, + &length, + &mtl_psm2_request->free_after); + + mtl_psm2_request->length= length; + mtl_psm2_request->convertor = convertor; + mtl_psm2_request->type = OMPI_mtl_psm2_ISEND; + + if (OMPI_SUCCESS != ret) return ret; + + if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS) + flags |= PSM_MQ_FLAG_SENDSYNC; + + psm_error = psm_mq_isend2(ompi_mtl_psm2.mq, + psm_endpoint->peer_addr, + flags, + &mqtag, + mtl_psm2_request->buf, + length, + mtl_psm2_request, + &mtl_psm2_request->psm_request); + + return psm_error == PSM_OK ? OMPI_SUCCESS : OMPI_ERROR; +} diff --git a/ompi/mca/mtl/psm2/mtl_psm2_types.h b/ompi/mca/mtl/psm2/mtl_psm2_types.h new file mode 100755 index 00000000000..a269f0a89c9 --- /dev/null +++ b/ompi/mca/mtl/psm2/mtl_psm2_types.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2007 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2006 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2006 QLogic Corporation. All rights reserved. + * Copyright (c) 2011 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef MTL_PSM2_TYPES_H_HAS_BEEN_INCLUDED +#define MTL_PSM2_TYPES_H_HAS_BEEN_INCLUDED + +#include "ompi_config.h" +#include "mtl_psm2.h" + +#include "ompi/communicator/communicator.h" + +#include "ompi/mca/mtl/mtl.h" +#include "ompi/mca/mtl/base/base.h" +#include "mtl_psm2_endpoint.h" + +#include "psm2.h" + + +BEGIN_C_DECLS + +/** + * MTL Module Interface + */ +struct mca_mtl_psm2_module_t { + mca_mtl_base_module_t super; /**< base MTL interface */ + + int32_t connect_timeout; + + psm_ep_t ep; + psm_mq_t mq; + psm_epid_t epid; + psm_epaddr_t epaddr; +}; + +typedef struct mca_mtl_psm2_module_t mca_mtl_psm2_module_t; + +extern mca_mtl_psm2_module_t ompi_mtl_psm2; + +struct mca_mtl_psm2_component_t { + mca_mtl_base_component_2_0_0_t super; /**< base MTL component */ +}; +typedef struct mca_mtl_psm2_component_t mca_mtl_psm2_component_t; + +OMPI_DECLSPEC extern mca_mtl_psm2_component_t mca_mtl_psm2_component; + +#define PSM_MAKE_MQTAG(ctxt,rank,utag,tag) \ + do { \ + (tag).tag0 = ctxt; \ + (tag).tag1 = utag; \ + (tag).tag2 = rank; \ + } while (0) + +#define PSM_MAKE_TAGSEL(user_rank, user_tag, user_ctxt, tag, _tagsel) \ + do { \ + (tag).tag0 = user_ctxt; \ + (tag).tag1 = user_tag; \ + (tag).tag2 = user_rank; \ + (_tagsel).tag0 = 0xffffffffULL; \ + (_tagsel).tag1 = 0xffffffffULL; \ + (_tagsel).tag2 = 0xffffffffULL; \ + if((user_tag) == MPI_ANY_TAG) \ + { \ + (_tagsel).tag1 = 0x80000000ULL; \ + (tag).tag1 = 0x00000000ULL; \ + } \ + if((user_rank) == MPI_ANY_SOURCE) \ + { \ + (_tagsel).tag2 = 0x00000000ULL; \ + } \ + } while (0) + +END_C_DECLS + +#endif /* MTL_PSM2_TYPES_H_HAS_BEEN_INCLUDED */ diff --git a/ompi/mca/mtl/psm2/post_configure.sh b/ompi/mca/mtl/psm2/post_configure.sh new file mode 100644 index 00000000000..07cf9bddda6 --- /dev/null +++ b/ompi/mca/mtl/psm2/post_configure.sh @@ -0,0 +1 @@ +DIRECT_CALL_HEADER="ompi/mca/mtl/psm2/mtl_psm.h" diff --git a/ompi/mca/pml/cm/pml_cm_component.c b/ompi/mca/pml/cm/pml_cm_component.c index f5e932f7d0a..c26574dfc1b 100644 --- a/ompi/mca/pml/cm/pml_cm_component.c +++ b/ompi/mca/pml/cm/pml_cm_component.c @@ -156,6 +156,7 @@ mca_pml_cm_component_init(int* priority, *priority = -1; return NULL; } else if((strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm") == 0) || + (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm2") == 0) || (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "mxm") == 0) || (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "ofi") == 0) || (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "portals4") == 0)) { From fbee609ce5937411f49b38da7bd9c1a7f1aaf674 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 24 Jun 2015 16:05:34 -0600 Subject: [PATCH 0002/1704] Fix definition of MPI_T_pvar_get_index The definition of MPI_T_pvar_get_index was incorrect. This commit fixes the definition and adds a missing return code. master commit open-mpi/ompi@4552afff0656bf6b5d2946d2c8e2bfce30e990a7 Signed-off-by: Nathan Hjelm --- NEWS | 4 +++- ompi/errhandler/errcode.c | 3 +++ ompi/include/mpi.h.in | 5 +++-- ompi/mpi/tool/category_get_index.c | 5 ++++- ompi/mpi/tool/cvar_get_index.c | 5 ++++- ompi/mpi/tool/mpit_common.c | 4 ++++ ompi/mpi/tool/pvar_get_index.c | 11 +++++++---- opal/mca/base/mca_base_pvar.c | 16 +++++++++++++--- opal/mca/base/mca_base_pvar.h | 6 ++++-- 9 files changed, 45 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index fb927d5fd9f..dc66c05f72b 100644 --- a/NEWS +++ b/NEWS @@ -12,7 +12,7 @@ Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. Copyright (c) 2006 Voltaire, Inc. All rights reserved. Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. -Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights +Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights reserved. Copyright (c) 2010-2012 IBM Corporation. All rights reserved. Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. @@ -67,6 +67,8 @@ Master (not on release branches yet) Please consider Score-P (score-p.org) as an external replacement. - usNIC BTL updated to use libfabric. - OFI MTL. +- Fixed incorrect declaration for MPI_T_pvar_get_index and added + missing return code MPI_T_INVALID_NAME. 1.8.6 diff --git a/ompi/errhandler/errcode.c b/ompi/errhandler/errcode.c index b0a3d81be8b..984b0d8edf6 100644 --- a/ompi/errhandler/errcode.c +++ b/ompi/errhandler/errcode.c @@ -114,6 +114,7 @@ static ompi_mpi_errcode_t ompi_err_rma_attach; static ompi_mpi_errcode_t ompi_err_rma_flavor; static ompi_mpi_errcode_t ompi_err_rma_shared; static ompi_mpi_errcode_t ompi_t_err_invalid; +static ompi_mpi_errcode_t ompi_t_err_invalid_name; static void ompi_mpi_errcode_construct(ompi_mpi_errcode_t* errcode); static void ompi_mpi_errcode_destruct(ompi_mpi_errcode_t* errcode); @@ -214,6 +215,7 @@ int ompi_mpi_errcode_init (void) CONSTRUCT_ERRCODE( ompi_err_rma_flavor, MPI_ERR_RMA_FLAVOR, "MPI_ERR_RMA_FLAVOR: Invalid type of window" ); CONSTRUCT_ERRCODE( ompi_err_rma_shared, MPI_ERR_RMA_SHARED, "MPI_ERR_RMA_SHARED: Memory cannot be shared" ); CONSTRUCT_ERRCODE( ompi_t_err_invalid, MPI_T_ERR_INVALID, "MPI_T_ERR_INVALID: Invalid use of the interface or bad parameter value(s)" ); + CONSTRUCT_ERRCODE( ompi_t_err_invalid_name, MPI_T_ERR_INVALID_NAME, "MPI_T_ERR_INVALID_NAME: The variable or category name is invalid" ); /* Per MPI-3 p353:27-32, MPI_LASTUSEDCODE must be >= MPI_ERR_LASTCODE. So just start it as == MPI_ERR_LASTCODE. */ @@ -309,6 +311,7 @@ int ompi_mpi_errcode_finalize(void) OBJ_DESTRUCT(&ompi_err_rma_flavor); OBJ_DESTRUCT(&ompi_err_rma_shared); OBJ_DESTRUCT(&ompi_t_err_invalid); + OBJ_DESTRUCT(&ompi_t_err_invalid_name); OBJ_DESTRUCT(&ompi_mpi_errcodes); return OMPI_SUCCESS; diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index 31996d978b1..ffb510a4b71 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -604,6 +604,7 @@ enum { #define MPI_ERR_RMA_FLAVOR 70 #define MPI_ERR_RMA_SHARED 71 #define MPI_T_ERR_INVALID 72 +#define MPI_T_ERR_INVALID_NAME 73 /* Per MPI-3 p349 47, MPI_ERR_LASTCODE must be >= the last predefined MPI_ERR_ code. Set the last code to allow some room for adding @@ -2589,7 +2590,7 @@ OMPI_DECLSPEC int PMPI_T_pvar_get_info(int pvar_index, char *name, int *name_le int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *bind, int *readonly, int *continuous, int *atomic); -OMPI_DECLSPEC int PMPI_T_pvar_get_index (const char *name, int *pvar_index); +OMPI_DECLSPEC int PMPI_T_pvar_get_index (const char *name, int var_class, int *pvar_index); OMPI_DECLSPEC int PMPI_T_pvar_session_create(MPI_T_pvar_session *session); OMPI_DECLSPEC int PMPI_T_pvar_session_free(MPI_T_pvar_session *session); OMPI_DECLSPEC int PMPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, @@ -2639,7 +2640,7 @@ OMPI_DECLSPEC int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *bind, int *readonly, int *continuous, int *atomic); -OMPI_DECLSPEC int MPI_T_pvar_get_index (const char *name, int *pvar_index); +OMPI_DECLSPEC int MPI_T_pvar_get_index (const char *name, int var_class, int *pvar_index); OMPI_DECLSPEC int MPI_T_pvar_session_create(MPI_T_pvar_session *session); OMPI_DECLSPEC int MPI_T_pvar_session_free(MPI_T_pvar_session *session); OMPI_DECLSPEC int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, diff --git a/ompi/mpi/tool/category_get_index.c b/ompi/mpi/tool/category_get_index.c index 3fab242d71e..6edb6f2af4d 100644 --- a/ompi/mpi/tool/category_get_index.c +++ b/ompi/mpi/tool/category_get_index.c @@ -36,6 +36,9 @@ int MPI_T_category_get_index (const char *name, int *category_index) mpit_lock (); ret = mca_base_var_group_find_by_name (name, category_index); mpit_unlock (); + if (OPAL_SUCCESS != ret) { + return MPI_T_ERR_INVALID_NAME; + } - return ompit_opal_to_mpit_error (ret); + return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/cvar_get_index.c b/ompi/mpi/tool/cvar_get_index.c index 7ac919b0ac2..e587adf7f34 100644 --- a/ompi/mpi/tool/cvar_get_index.c +++ b/ompi/mpi/tool/cvar_get_index.c @@ -36,6 +36,9 @@ int MPI_T_cvar_get_index (const char *name, int *cvar_index) mpit_lock (); ret = mca_base_var_find_by_name (name, cvar_index); mpit_unlock (); + if (OPAL_SUCCESS != ret) { + return MPI_T_ERR_INVALID_NAME; + } - return ompit_opal_to_mpit_error (ret); + return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/mpit_common.c b/ompi/mpi/tool/mpit_common.c index 785b8c0d831..98920aeb21d 100644 --- a/ompi/mpi/tool/mpit_common.c +++ b/ompi/mpi/tool/mpit_common.c @@ -34,6 +34,10 @@ void mpit_unlock (void) int ompit_var_type_to_datatype (mca_base_var_type_t type, MPI_Datatype *datatype) { + if (!datatype) { + return OMPI_SUCCESS; + } + switch (type) { case MCA_BASE_VAR_TYPE_INT: *datatype = MPI_INT; diff --git a/ompi/mpi/tool/pvar_get_index.c b/ompi/mpi/tool/pvar_get_index.c index 03d15da91a3..88e71c5b4fe 100644 --- a/ompi/mpi/tool/pvar_get_index.c +++ b/ompi/mpi/tool/pvar_get_index.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights + * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ @@ -21,7 +21,7 @@ #endif -int MPI_T_pvar_get_index (const char *name, int *pvar_index) +int MPI_T_pvar_get_index (const char *name, int var_class, int *pvar_index) { int ret; @@ -34,8 +34,11 @@ int MPI_T_pvar_get_index (const char *name, int *pvar_index) } mpit_lock (); - ret = mca_base_pvar_find_by_name (name, pvar_index); + ret = mca_base_pvar_find_by_name (name, var_class, pvar_index); mpit_unlock (); + if (OPAL_SUCCESS != ret) { + return MPI_T_ERR_INVALID_NAME; + } - return ompit_opal_to_mpit_error (ret); + return MPI_SUCCESS; } diff --git a/opal/mca/base/mca_base_pvar.c b/opal/mca/base/mca_base_pvar.c index 8d4758c5ede..1507aa15948 100644 --- a/opal/mca/base/mca_base_pvar.c +++ b/opal/mca/base/mca_base_pvar.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ @@ -76,7 +76,7 @@ int mca_base_pvar_find (const char *project, const char *framework, const char * return OPAL_ERROR; } - ret = mca_base_pvar_find_by_name (full_name, &index); + ret = mca_base_pvar_find_by_name (full_name, MCA_BASE_PVAR_CLASS_ANY, &index); free (full_name); /* NTH: should we verify the name components match the returned variable? */ @@ -84,8 +84,9 @@ int mca_base_pvar_find (const char *project, const char *framework, const char * return (OPAL_SUCCESS != ret) ? ret : index; } -int mca_base_pvar_find_by_name (const char *full_name, int *index) +int mca_base_pvar_find_by_name (const char *full_name, int var_class, int *index) { + mca_base_pvar_t *pvar; void *tmp; int rc; @@ -95,6 +96,15 @@ int mca_base_pvar_find_by_name (const char *full_name, int *index) return rc; } + rc = mca_base_pvar_get_internal ((int)(uintptr_t) tmp, &pvar, false); + if (OPAL_SUCCESS != rc) { + return rc; + } + + if (MCA_BASE_PVAR_CLASS_ANY != var_class && pvar->var_class != var_class) { + return OPAL_ERR_NOT_FOUND; + } + *index = (int)(uintptr_t) tmp; return OPAL_SUCCESS; diff --git a/opal/mca/base/mca_base_pvar.h b/opal/mca/base/mca_base_pvar.h index 3cefae23312..703c1a8b02d 100644 --- a/opal/mca/base/mca_base_pvar.h +++ b/opal/mca/base/mca_base_pvar.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * * Additional copyrights may follow @@ -91,6 +91,8 @@ enum { MCA_BASE_PVAR_CLASS_GENERIC }; +#define MCA_BASE_PVAR_CLASS_ANY -1 + /* * Reserved bindings; passed when registering a new pvar. OPAL will * ignore any other binding type. @@ -356,7 +358,7 @@ OPAL_DECLSPEC int mca_base_pvar_find (const char *project, const char *framework * * See mca_base_pvar_find(). */ -OPAL_DECLSPEC int mca_base_pvar_find_by_name (const char *full_name, int *index); +OPAL_DECLSPEC int mca_base_pvar_find_by_name (const char *full_name, int var_class, int *index); /**************************************************************************** * The following functions are the back-end to the MPI_T API functions From a4d0419aa0835ac11d7e80ef0e29912d9ce58000 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 25 Jun 2015 08:57:59 -0700 Subject: [PATCH 0003/1704] Remove stale/unmaintained items from the 2.x branch See http://www.open-mpi.org/community/lists/devel/2015/06/17534.php. --- ompi/mca/bcol/Makefile.am | 35 - ompi/mca/bcol/base/Makefile.am | 16 - ompi/mca/bcol/base/base.h | 49 - ompi/mca/bcol/base/bcol_base_frame.c | 374 -- ompi/mca/bcol/base/bcol_base_init.c | 45 - ompi/mca/bcol/base/owner.txt | 7 - ompi/mca/bcol/basesmuma/Makefile.am | 66 - ompi/mca/bcol/basesmuma/bcol_basesmuma.h | 1270 ------- .../bcol/basesmuma/bcol_basesmuma_allgather.c | 352 -- .../bcol/basesmuma/bcol_basesmuma_allreduce.c | 611 ---- .../mca/bcol/basesmuma/bcol_basesmuma_bcast.c | 487 --- .../basesmuma/bcol_basesmuma_bcast_prime.c | 895 ----- .../bcol/basesmuma/bcol_basesmuma_buf_mgmt.c | 485 --- .../bcol/basesmuma/bcol_basesmuma_component.c | 391 --- .../mca/bcol/basesmuma/bcol_basesmuma_fanin.c | 218 -- .../bcol/basesmuma/bcol_basesmuma_fanout.c | 123 - .../bcol/basesmuma/bcol_basesmuma_gather.c | 1106 ------ .../basesmuma/bcol_basesmuma_lmsg_bcast.c | 1878 ---------- .../basesmuma/bcol_basesmuma_lmsg_bcast.h | 626 ---- .../bcol_basesmuma_lmsg_knomial_bcast.c | 452 --- .../bcol/basesmuma/bcol_basesmuma_mem_mgmt.c | 101 - .../bcol/basesmuma/bcol_basesmuma_module.c | 687 ---- .../bcol/basesmuma/bcol_basesmuma_progress.c | 74 - .../basesmuma/bcol_basesmuma_rd_barrier.c | 218 -- .../basesmuma/bcol_basesmuma_rd_nb_barrier.c | 462 --- .../bcol/basesmuma/bcol_basesmuma_reduce.c | 382 -- .../bcol/basesmuma/bcol_basesmuma_reduce.h | 92 - .../basesmuma/bcol_basesmuma_rk_barrier.c | 444 --- .../mca/bcol/basesmuma/bcol_basesmuma_setup.c | 588 ---- ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.c | 457 --- ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.h | 105 - .../mca/bcol/basesmuma/bcol_basesmuma_utils.c | 103 - .../mca/bcol/basesmuma/bcol_basesmuma_utils.h | 64 - ompi/mca/bcol/bcol.h | 803 ----- ompi/mca/bcol/iboffload/.opal_ignore | 0 ompi/mca/bcol/iboffload/Makefile.am | 66 - ompi/mca/bcol/iboffload/bcol_iboffload.h | 765 ---- .../bcol/iboffload/bcol_iboffload_allgather.c | 1388 -------- .../bcol/iboffload/bcol_iboffload_allreduce.c | 1418 -------- .../bcol/iboffload/bcol_iboffload_barrier.c | 934 ----- .../mca/bcol/iboffload/bcol_iboffload_bcast.c | 1065 ------ .../mca/bcol/iboffload/bcol_iboffload_bcast.h | 606 ---- .../bcol/iboffload/bcol_iboffload_collfrag.c | 51 - .../bcol/iboffload/bcol_iboffload_collfrag.h | 144 - .../bcol/iboffload/bcol_iboffload_collreq.c | 50 - .../bcol/iboffload/bcol_iboffload_collreq.h | 273 -- .../bcol/iboffload/bcol_iboffload_component.c | 1076 ------ .../bcol/iboffload/bcol_iboffload_device.h | 73 - .../bcol/iboffload/bcol_iboffload_endpoint.c | 373 -- .../bcol/iboffload/bcol_iboffload_endpoint.h | 328 -- .../mca/bcol/iboffload/bcol_iboffload_fanin.c | 350 -- .../bcol/iboffload/bcol_iboffload_fanout.c | 349 -- ompi/mca/bcol/iboffload/bcol_iboffload_frag.c | 272 -- ompi/mca/bcol/iboffload/bcol_iboffload_frag.h | 154 - ompi/mca/bcol/iboffload/bcol_iboffload_mca.c | 451 --- ompi/mca/bcol/iboffload/bcol_iboffload_mca.h | 20 - .../bcol/iboffload/bcol_iboffload_module.c | 1538 -------- .../bcol/iboffload/bcol_iboffload_qp_info.c | 452 --- .../bcol/iboffload/bcol_iboffload_qp_info.h | 127 - ompi/mca/bcol/iboffload/bcol_iboffload_task.c | 81 - ompi/mca/bcol/iboffload/bcol_iboffload_task.h | 613 ---- ompi/mca/bcol/iboffload/configure.m4 | 38 - ompi/mca/bcol/iboffload/owner.txt | 7 - ompi/mca/bcol/ptpcoll/Makefile.am | 57 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h | 474 --- .../mca/bcol/ptpcoll/bcol_ptpcoll_allgather.c | 605 ---- .../mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.c | 1029 ------ .../mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.h | 95 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_barrier.c | 933 ----- ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.c | 2318 ------------ ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.h | 865 ----- .../mca/bcol/ptpcoll/bcol_ptpcoll_component.c | 174 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanin.c | 28 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanout.c | 30 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.c | 197 -- ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.h | 20 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_module.c | 760 ---- ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.c | 405 --- ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.h | 25 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.c | 139 - ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.h | 80 - ompi/mca/bcol/ptpcoll/owner.txt | 7 - ompi/mca/coll/hierarch/owner.txt | 7 - ompi/mca/coll/ml/.opal_ignore | 0 ompi/mca/coll/ml/Makefile.am | 84 - ompi/mca/coll/ml/coll_ml.h | 1022 ------ ompi/mca/coll/ml/coll_ml_allgather.c | 631 ---- ompi/mca/coll/ml/coll_ml_allocation.c | 223 -- ompi/mca/coll/ml/coll_ml_allocation.h | 111 - ompi/mca/coll/ml/coll_ml_allreduce.c | 551 --- ompi/mca/coll/ml/coll_ml_barrier.c | 146 - ompi/mca/coll/ml/coll_ml_bcast.c | 849 ----- ompi/mca/coll/ml/coll_ml_colls.h | 552 --- ompi/mca/coll/ml/coll_ml_component.c | 449 --- ompi/mca/coll/ml/coll_ml_config.c | 629 ---- ompi/mca/coll/ml/coll_ml_config.h | 23 - ompi/mca/coll/ml/coll_ml_copy_fns.c | 129 - ompi/mca/coll/ml/coll_ml_custom_utils.c | 139 - ompi/mca/coll/ml/coll_ml_custom_utils.h | 28 - ompi/mca/coll/ml/coll_ml_descriptors.c | 60 - ompi/mca/coll/ml/coll_ml_functions.h | 132 - .../ml/coll_ml_hier_algorithm_memsync_setup.c | 195 - ompi/mca/coll/ml/coll_ml_hier_algorithms.c | 187 - .../coll_ml_hier_algorithms_allgather_setup.c | 240 -- .../coll_ml_hier_algorithms_allreduce_setup.c | 434 --- .../coll_ml_hier_algorithms_barrier_setup.c | 206 -- .../ml/coll_ml_hier_algorithms_bcast_setup.c | 851 ----- .../ml/coll_ml_hier_algorithms_common_setup.c | 142 - .../ml/coll_ml_hier_algorithms_common_setup.h | 96 - .../ml/coll_ml_hier_algorithms_reduce_setup.c | 371 -- .../coll/ml/coll_ml_hier_algorithms_setup.c | 539 --- ompi/mca/coll/ml/coll_ml_inlines.h | 637 ---- ompi/mca/coll/ml/coll_ml_lex.h | 40 - ompi/mca/coll/ml/coll_ml_lex.l | 141 - ompi/mca/coll/ml/coll_ml_lmngr.c | 330 -- ompi/mca/coll/ml/coll_ml_lmngr.h | 81 - ompi/mca/coll/ml/coll_ml_mca.c | 300 -- ompi/mca/coll/ml/coll_ml_mca.h | 20 - ompi/mca/coll/ml/coll_ml_memsync.c | 175 - ompi/mca/coll/ml/coll_ml_module.c | 3128 ----------------- ompi/mca/coll/ml/coll_ml_payload_buffers.h | 168 - ompi/mca/coll/ml/coll_ml_progress.c | 104 - ompi/mca/coll/ml/coll_ml_reduce.c | 526 --- ompi/mca/coll/ml/coll_ml_resource_affinity.c | 147 - ompi/mca/coll/ml/coll_ml_resource_affinity.h | 19 - ompi/mca/coll/ml/coll_ml_select.c | 359 -- ompi/mca/coll/ml/coll_ml_select.h | 29 - ompi/mca/coll/ml/configure.m4 | 18 - ompi/mca/coll/ml/help-mpi-coll-ml.txt | 64 - ompi/mca/coll/ml/mca-coll-ml.config | 170 - ompi/mca/coll/ml/owner.txt | 7 - ompi/mca/sbgp/Makefile.am | 36 - ompi/mca/sbgp/base/Makefile.am | 17 - ompi/mca/sbgp/base/base.h | 48 - ompi/mca/sbgp/base/owner.txt | 7 - ompi/mca/sbgp/base/sbgp_base_close.c | 40 - ompi/mca/sbgp/base/sbgp_base_frame.c | 205 -- ompi/mca/sbgp/base/sbgp_base_init.c | 42 - ompi/mca/sbgp/basesmsocket/Makefile.am | 41 - ompi/mca/sbgp/basesmsocket/configure.m4 | 19 - ompi/mca/sbgp/basesmsocket/owner.txt | 7 - .../mca/sbgp/basesmsocket/sbgp_basesmsocket.h | 81 - .../sbgp_basesmsocket_component.c | 305 -- .../basesmsocket/sbgp_basesmsocket_module.c | 35 - ompi/mca/sbgp/basesmuma/Makefile.am | 41 - ompi/mca/sbgp/basesmuma/owner.txt | 7 - ompi/mca/sbgp/basesmuma/sbgp_basesmuma.h | 73 - .../sbgp/basesmuma/sbgp_basesmuma_component.c | 208 -- .../sbgp/basesmuma/sbgp_basesmuma_module.c | 48 - ompi/mca/sbgp/ibnet/.opal_ignore | 0 ompi/mca/sbgp/ibnet/Makefile.am | 55 - ompi/mca/sbgp/ibnet/configure.m4 | 38 - ompi/mca/sbgp/ibnet/owner.txt | 7 - ompi/mca/sbgp/ibnet/sbgp_ibnet.h | 239 -- ompi/mca/sbgp/ibnet/sbgp_ibnet_component.c | 600 ---- ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.c | 229 -- ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.h | 22 - ompi/mca/sbgp/ibnet/sbgp_ibnet_module.c | 1029 ------ ompi/mca/sbgp/p2p/Makefile.am | 41 - ompi/mca/sbgp/p2p/configure.m4 | 27 - ompi/mca/sbgp/p2p/owner.txt | 7 - ompi/mca/sbgp/p2p/sbgp_p2p.h | 81 - ompi/mca/sbgp/p2p/sbgp_p2p_component.c | 224 -- ompi/mca/sbgp/p2p/sbgp_p2p_module.c | 49 - ompi/mca/sbgp/sbgp.h | 137 - opal/mca/reachable/Makefile.am | 32 - opal/mca/reachable/base/Makefile.am | 17 - opal/mca/reachable/base/base.h | 34 - opal/mca/reachable/base/owner.txt | 7 - .../mca/reachable/base/reachable_base_frame.c | 53 - .../reachable/base/reachable_base_select.c | 47 - opal/mca/reachable/netlink/Makefile.am | 44 - opal/mca/reachable/netlink/configure.m4 | 178 - opal/mca/reachable/netlink/libnl1_utils.h | 97 - opal/mca/reachable/netlink/libnl3_utils.h | 80 - opal/mca/reachable/netlink/libnl_utils.h | 62 - opal/mca/reachable/netlink/owner.txt | 7 - .../mca/reachable/netlink/reachable_netlink.h | 27 - .../netlink/reachable_netlink_component.c | 95 - .../netlink/reachable_netlink_module.c | 48 - .../netlink/reachable_netlink_utils_common.c | 322 -- opal/mca/reachable/reachable.h | 77 - opal/mca/reachable/weighted/.opal_ignore | 0 opal/mca/reachable/weighted/Makefile.am | 34 - opal/mca/reachable/weighted/owner.txt | 7 - .../reachable/weighted/reachable_weighted.c | 275 -- .../reachable/weighted/reachable_weighted.h | 41 - .../weighted/reachable_weighted_component.c | 103 - 188 files changed, 56590 deletions(-) delete mode 100644 ompi/mca/bcol/Makefile.am delete mode 100644 ompi/mca/bcol/base/Makefile.am delete mode 100644 ompi/mca/bcol/base/base.h delete mode 100644 ompi/mca/bcol/base/bcol_base_frame.c delete mode 100644 ompi/mca/bcol/base/bcol_base_init.c delete mode 100644 ompi/mca/bcol/base/owner.txt delete mode 100644 ompi/mca/bcol/basesmuma/Makefile.am delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma.h delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_allgather.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast_prime.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_buf_mgmt.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_component.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_fanin.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_fanout.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_gather.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.h delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_knomial_bcast.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_mem_mgmt.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_module.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_progress.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_barrier.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_nb_barrier.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.h delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_rk_barrier.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_setup.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.h delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.c delete mode 100644 ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.h delete mode 100644 ompi/mca/bcol/bcol.h delete mode 100644 ompi/mca/bcol/iboffload/.opal_ignore delete mode 100644 ompi/mca/bcol/iboffload/Makefile.am delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_allgather.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_allreduce.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_barrier.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_bcast.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_bcast.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_collreq.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_collreq.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_component.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_device.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_fanin.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_fanout.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_frag.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_frag.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_mca.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_mca.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_module.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.h delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_task.c delete mode 100644 ompi/mca/bcol/iboffload/bcol_iboffload_task.h delete mode 100644 ompi/mca/bcol/iboffload/configure.m4 delete mode 100644 ompi/mca/bcol/iboffload/owner.txt delete mode 100644 ompi/mca/bcol/ptpcoll/Makefile.am delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allgather.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.h delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_barrier.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.h delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_component.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanin.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanout.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.h delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_module.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.h delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.c delete mode 100644 ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.h delete mode 100644 ompi/mca/bcol/ptpcoll/owner.txt delete mode 100644 ompi/mca/coll/hierarch/owner.txt delete mode 100644 ompi/mca/coll/ml/.opal_ignore delete mode 100644 ompi/mca/coll/ml/Makefile.am delete mode 100644 ompi/mca/coll/ml/coll_ml.h delete mode 100644 ompi/mca/coll/ml/coll_ml_allgather.c delete mode 100644 ompi/mca/coll/ml/coll_ml_allocation.c delete mode 100644 ompi/mca/coll/ml/coll_ml_allocation.h delete mode 100644 ompi/mca/coll/ml/coll_ml_allreduce.c delete mode 100644 ompi/mca/coll/ml/coll_ml_barrier.c delete mode 100644 ompi/mca/coll/ml/coll_ml_bcast.c delete mode 100644 ompi/mca/coll/ml/coll_ml_colls.h delete mode 100644 ompi/mca/coll/ml/coll_ml_component.c delete mode 100644 ompi/mca/coll/ml/coll_ml_config.c delete mode 100644 ompi/mca/coll/ml/coll_ml_config.h delete mode 100644 ompi/mca/coll/ml/coll_ml_copy_fns.c delete mode 100644 ompi/mca/coll/ml/coll_ml_custom_utils.c delete mode 100644 ompi/mca/coll/ml/coll_ml_custom_utils.h delete mode 100644 ompi/mca/coll/ml/coll_ml_descriptors.c delete mode 100644 ompi/mca/coll/ml/coll_ml_functions.h delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithm_memsync_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_allgather_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_allreduce_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_barrier_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_bcast_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.h delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_reduce_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_hier_algorithms_setup.c delete mode 100644 ompi/mca/coll/ml/coll_ml_inlines.h delete mode 100644 ompi/mca/coll/ml/coll_ml_lex.h delete mode 100644 ompi/mca/coll/ml/coll_ml_lex.l delete mode 100644 ompi/mca/coll/ml/coll_ml_lmngr.c delete mode 100644 ompi/mca/coll/ml/coll_ml_lmngr.h delete mode 100644 ompi/mca/coll/ml/coll_ml_mca.c delete mode 100644 ompi/mca/coll/ml/coll_ml_mca.h delete mode 100644 ompi/mca/coll/ml/coll_ml_memsync.c delete mode 100644 ompi/mca/coll/ml/coll_ml_module.c delete mode 100644 ompi/mca/coll/ml/coll_ml_payload_buffers.h delete mode 100644 ompi/mca/coll/ml/coll_ml_progress.c delete mode 100644 ompi/mca/coll/ml/coll_ml_reduce.c delete mode 100644 ompi/mca/coll/ml/coll_ml_resource_affinity.c delete mode 100644 ompi/mca/coll/ml/coll_ml_resource_affinity.h delete mode 100644 ompi/mca/coll/ml/coll_ml_select.c delete mode 100644 ompi/mca/coll/ml/coll_ml_select.h delete mode 100644 ompi/mca/coll/ml/configure.m4 delete mode 100644 ompi/mca/coll/ml/help-mpi-coll-ml.txt delete mode 100644 ompi/mca/coll/ml/mca-coll-ml.config delete mode 100644 ompi/mca/coll/ml/owner.txt delete mode 100644 ompi/mca/sbgp/Makefile.am delete mode 100644 ompi/mca/sbgp/base/Makefile.am delete mode 100644 ompi/mca/sbgp/base/base.h delete mode 100644 ompi/mca/sbgp/base/owner.txt delete mode 100644 ompi/mca/sbgp/base/sbgp_base_close.c delete mode 100644 ompi/mca/sbgp/base/sbgp_base_frame.c delete mode 100644 ompi/mca/sbgp/base/sbgp_base_init.c delete mode 100644 ompi/mca/sbgp/basesmsocket/Makefile.am delete mode 100644 ompi/mca/sbgp/basesmsocket/configure.m4 delete mode 100644 ompi/mca/sbgp/basesmsocket/owner.txt delete mode 100644 ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket.h delete mode 100644 ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c delete mode 100644 ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c delete mode 100644 ompi/mca/sbgp/basesmuma/Makefile.am delete mode 100644 ompi/mca/sbgp/basesmuma/owner.txt delete mode 100644 ompi/mca/sbgp/basesmuma/sbgp_basesmuma.h delete mode 100644 ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c delete mode 100644 ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c delete mode 100644 ompi/mca/sbgp/ibnet/.opal_ignore delete mode 100644 ompi/mca/sbgp/ibnet/Makefile.am delete mode 100644 ompi/mca/sbgp/ibnet/configure.m4 delete mode 100644 ompi/mca/sbgp/ibnet/owner.txt delete mode 100644 ompi/mca/sbgp/ibnet/sbgp_ibnet.h delete mode 100644 ompi/mca/sbgp/ibnet/sbgp_ibnet_component.c delete mode 100644 ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.c delete mode 100644 ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.h delete mode 100644 ompi/mca/sbgp/ibnet/sbgp_ibnet_module.c delete mode 100644 ompi/mca/sbgp/p2p/Makefile.am delete mode 100644 ompi/mca/sbgp/p2p/configure.m4 delete mode 100644 ompi/mca/sbgp/p2p/owner.txt delete mode 100644 ompi/mca/sbgp/p2p/sbgp_p2p.h delete mode 100644 ompi/mca/sbgp/p2p/sbgp_p2p_component.c delete mode 100644 ompi/mca/sbgp/p2p/sbgp_p2p_module.c delete mode 100644 ompi/mca/sbgp/sbgp.h delete mode 100644 opal/mca/reachable/Makefile.am delete mode 100644 opal/mca/reachable/base/Makefile.am delete mode 100644 opal/mca/reachable/base/base.h delete mode 100644 opal/mca/reachable/base/owner.txt delete mode 100644 opal/mca/reachable/base/reachable_base_frame.c delete mode 100644 opal/mca/reachable/base/reachable_base_select.c delete mode 100644 opal/mca/reachable/netlink/Makefile.am delete mode 100644 opal/mca/reachable/netlink/configure.m4 delete mode 100644 opal/mca/reachable/netlink/libnl1_utils.h delete mode 100644 opal/mca/reachable/netlink/libnl3_utils.h delete mode 100644 opal/mca/reachable/netlink/libnl_utils.h delete mode 100644 opal/mca/reachable/netlink/owner.txt delete mode 100644 opal/mca/reachable/netlink/reachable_netlink.h delete mode 100644 opal/mca/reachable/netlink/reachable_netlink_component.c delete mode 100644 opal/mca/reachable/netlink/reachable_netlink_module.c delete mode 100644 opal/mca/reachable/netlink/reachable_netlink_utils_common.c delete mode 100644 opal/mca/reachable/reachable.h delete mode 100644 opal/mca/reachable/weighted/.opal_ignore delete mode 100644 opal/mca/reachable/weighted/Makefile.am delete mode 100644 opal/mca/reachable/weighted/owner.txt delete mode 100644 opal/mca/reachable/weighted/reachable_weighted.c delete mode 100644 opal/mca/reachable/weighted/reachable_weighted.h delete mode 100644 opal/mca/reachable/weighted/reachable_weighted_component.c diff --git a/ompi/mca/bcol/Makefile.am b/ompi/mca/bcol/Makefile.am deleted file mode 100644 index 9f78f939f01..00000000000 --- a/ompi/mca/bcol/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# main library setup -noinst_LTLIBRARIES = libmca_bcol.la -libmca_bcol_la_SOURCES = - -# header setup -nobase_ompi_HEADERS = -nobase_nodist_ompi_HEADERS = - -# local files -headers = bcol.h -libmca_bcol_la_SOURCES += $(headers) $(nodist_headers) - -# Conditionally install the header files -if WANT_INSTALL_HEADERS -nobase_ompi_HEADERS += $(headers) -nobase_nodist_ompi_HEADERS += $(nodist_headers) -ompidir = $(ompiincludedir)/ompi/mca/bcol -else -ompidir = $(includedir) -endif - -include base/Makefile.am - -distclean-local: - rm -f base/static-components.h diff --git a/ompi/mca/bcol/base/Makefile.am b/ompi/mca/bcol/base/Makefile.am deleted file mode 100644 index 929bef0f5b8..00000000000 --- a/ompi/mca/bcol/base/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - - -headers += \ - base/base.h -libmca_bcol_la_SOURCES += \ - base/bcol_base_frame.c \ - base/bcol_base_init.c diff --git a/ompi/mca/bcol/base/base.h b/ompi/mca/bcol/base/base.h deleted file mode 100644 index b95bea398bb..00000000000 --- a/ompi/mca/bcol/base/base.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_BASE_H -#define MCA_BCOL_BASE_H - -#include "ompi_config.h" - -#include "ompi/mca/mca.h" -#include "opal/class/opal_list.h" -#include "ompi/mca/bcol/bcol.h" - -/* - * Global functions for BCOL - */ - -BEGIN_C_DECLS - -OMPI_DECLSPEC extern opal_list_t mca_bcol_base_components_in_use; -OMPI_DECLSPEC extern char *ompi_bcol_bcols_string; - -OMPI_DECLSPEC extern mca_base_framework_t ompi_bcol_base_framework; - -OMPI_DECLSPEC int mca_bcol_base_init(bool enable_progress_threads, bool enable_mpi_threads); - -struct mca_bcol_base_module_t; -OMPI_DECLSPEC int mca_bcol_base_bcol_fns_table_init(struct mca_bcol_base_module_t *bcol_module); - -OMPI_DECLSPEC int mca_bcol_base_fn_table_construct(struct mca_bcol_base_module_t *bcol_module); - -OMPI_DECLSPEC int mca_bcol_base_fn_table_destroy(struct mca_bcol_base_module_t *bcol_module); - -OMPI_DECLSPEC int mca_bcol_base_set_attributes(struct mca_bcol_base_module_t *bcol_module, - mca_bcol_base_coll_fn_comm_attributes_t *comm_attribs, - mca_bcol_base_coll_fn_invoke_attributes_t *inv_attribs, - mca_bcol_base_module_collective_fn_primitives_t bcol_fn, - mca_bcol_base_module_collective_fn_primitives_t progress_fn); - -END_C_DECLS - -#endif /* MCA_BCOL_BASE_H */ diff --git a/ompi/mca/bcol/base/bcol_base_frame.c b/ompi/mca/bcol/base/bcol_base_frame.c deleted file mode 100644 index af9c42a7494..00000000000 --- a/ompi/mca/bcol/base/bcol_base_frame.c +++ /dev/null @@ -1,374 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - - -#include "ompi_config.h" -#include - -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNIST_H */ -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/util/argv.h" - -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/include/ompi/constants.h" -#include "opal/mca/mpool/mpool.h" -#include "opal/class/opal_list.h" -/* - * The following file was created by configure. It contains extern - * statements and the definition of an array of pointers to each - * component's public mca_base_component_t struct. - */ - -#include "ompi/mca/bcol/base/static-components.h" - -static int mca_bcol_base_open(mca_base_open_flag_t flags); -static int mca_bcol_base_close (void); -static int mca_bcol_base_register(mca_base_register_flag_t flags); - -/* -** * Global variables -** */ -MCA_BASE_FRAMEWORK_DECLARE(ompi, bcol, NULL, mca_bcol_base_register, mca_bcol_base_open, mca_bcol_base_close, - mca_bcol_base_static_components, 0); - -OMPI_DECLSPEC opal_list_t mca_bcol_base_components_in_use = {{0}}; -OMPI_DECLSPEC char *ompi_bcol_bcols_string = NULL; -OMPI_DECLSPEC int bcol_mpool_compatibility[BCOL_SIZE][BCOL_SIZE] = {{0}}; -OMPI_DECLSPEC int bcol_mpool_index[BCOL_SIZE][BCOL_SIZE] = {{0}}; - -static void bcol_base_module_constructor(mca_bcol_base_module_t *module) -{ - int fnc; - - module->bcol_component = NULL; - module->network_context = NULL; - module->context_index = -1; - module->supported_mode = 0; - module->init_module = NULL; - module->sbgp_partner_module = NULL; - module->squence_number_offset = 0; - module->n_poll_loops = 0; - - for (fnc = 0; fnc < BCOL_NUM_OF_FUNCTIONS; fnc++) { - module->bcol_function_table[fnc] = NULL; - module->small_message_thresholds[fnc] = BCOL_THRESHOLD_UNLIMITED; - } - - module->set_small_msg_thresholds = NULL; - - module->header_size = 0; - module->bcol_memory_init = NULL; - - module->next_inorder = NULL; - - mca_bcol_base_fn_table_construct(module); -} - -static void bcol_base_module_destructor(mca_bcol_base_module_t *module) -{ - int fnc; - - module->bcol_component = NULL; - - module->context_index = -1; - module->init_module = NULL; - module->sbgp_partner_module = NULL; - module->squence_number_offset = 0; - module->n_poll_loops = 0; - - for (fnc = 0; fnc < BCOL_NUM_OF_FUNCTIONS; fnc++) { - module->bcol_function_table[fnc] = NULL; - } - - module->bcol_memory_init = NULL; -} - -OBJ_CLASS_INSTANCE(mca_bcol_base_module_t, - opal_object_t, - bcol_base_module_constructor, - bcol_base_module_destructor); - -static void bcol_base_network_context_constructor(bcol_base_network_context_t *nc) -{ - nc->context_id = -1; - nc->context_data = NULL; -} - -static void bcol_base_network_context_destructor(bcol_base_network_context_t *nc) -{ - nc->context_id = -1; - nc->context_data = NULL; - nc->register_memory_fn = NULL; - nc->deregister_memory_fn = NULL; -} - -OBJ_CLASS_INSTANCE(bcol_base_network_context_t, - opal_object_t, - bcol_base_network_context_constructor, - bcol_base_network_context_destructor); - -/* get list of subgrouping coponents to use */ -static int mca_bcol_base_set_components_to_use(opal_list_t *bcol_components_avail, - opal_list_t *bcol_components_in_use) -{ - /* local variables */ - const mca_base_component_t *b_component; - - mca_base_component_list_item_t *b_cli; - mca_base_component_list_item_t *b_clj; - - char **bcols_requested; - const char *b_component_name; - - /* split the requst for the bcol modules */ - bcols_requested = opal_argv_split(ompi_bcol_bcols_string, ','); - if (NULL == bcols_requested) { - return OMPI_ERROR; - } - - /* Initialize list */ - OBJ_CONSTRUCT(bcol_components_in_use, opal_list_t); - - /* figure out basic collective modules to use */ - /* loop over list of components requested */ - for (int i = 0 ; bcols_requested[i] ; ++i) { - /* loop over discovered components */ - OPAL_LIST_FOREACH(b_cli, bcol_components_avail, mca_base_component_list_item_t) { - b_component = b_cli->cli_component; - b_component_name = b_component->mca_component_name; - - if (0 == strcmp (b_component_name, bcols_requested[i])) { - /* found selected component */ - b_clj = OBJ_NEW(mca_base_component_list_item_t); - if (NULL == b_clj) { - opal_argv_free (bcols_requested); - return OPAL_ERR_OUT_OF_RESOURCE; - } - - b_clj->cli_component = b_component; - opal_list_append(bcol_components_in_use, - (opal_list_item_t *) b_clj); - break; - } /* end check for bcol component */ - } - } - - /* Note: Need to add error checking to make sure all requested functions - ** were found */ - - /* - ** release resources - ** */ - - opal_argv_free (bcols_requested); - - return OMPI_SUCCESS; -} - -static int mca_bcol_base_register(mca_base_register_flag_t flags) -{ - /* figure out which bcol and sbgp components will actually be used */ - /* get list of sub-grouping functions to use */ - ompi_bcol_bcols_string = "basesmuma,basesmuma,iboffload,ptpcoll,ugni"; - (void) mca_base_var_register("ompi", "bcol", "base", "string", - "Default set of basic collective components to use", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &ompi_bcol_bcols_string); - - return OMPI_SUCCESS; -} - -/** - * Function for finding and opening either all MCA components, or the one - * that was specifically requested via a MCA parameter. - */ -static int mca_bcol_base_open(mca_base_open_flag_t flags) -{ - int ret; - - /* Open up all available components */ - if (OMPI_SUCCESS != - (ret = mca_base_framework_components_open(&ompi_bcol_base_framework, flags))) { - return ret; - } - - ret = mca_bcol_base_set_components_to_use(&ompi_bcol_base_framework.framework_components, - &mca_bcol_base_components_in_use); - if (OMPI_SUCCESS != ret) { - return ret; - } - - /* memory registration compatibilities */ - bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_SHARED_MEMORY_UMA]=1; - bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_SHARED_MEMORY_SOCKET]=1; - bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_POINT_TO_POINT]=1; - bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_IB_OFFLOAD]=1; - bcol_mpool_compatibility[BCOL_SHARED_MEMORY_SOCKET][BCOL_SHARED_MEMORY_UMA]=1; - bcol_mpool_compatibility[BCOL_POINT_TO_POINT] [BCOL_SHARED_MEMORY_UMA]=1; - bcol_mpool_compatibility[BCOL_IB_OFFLOAD] [BCOL_SHARED_MEMORY_UMA]=1; - - return OMPI_SUCCESS; -} - -static int mca_bcol_base_close (void) -{ - opal_list_item_t *item; - - while (NULL != (item = opal_list_remove_first (&mca_bcol_base_components_in_use))) { - OBJ_RELEASE(item); - } - - OBJ_DESTRUCT(&mca_bcol_base_components_in_use); - - return mca_base_framework_components_close(&ompi_bcol_base_framework, NULL); -} - -/* - * Prototype implementation of selection logic - */ -int mca_bcol_base_fn_table_construct(struct mca_bcol_base_module_t *bcol_module){ - - int bcol_fn; - /* Call all init functions */ - - /* Create a function table */ - for (bcol_fn = 0; bcol_fn < BCOL_NUM_OF_FUNCTIONS; bcol_fn++){ - /* Create a list object for each bcol type list */ - OBJ_CONSTRUCT(&(bcol_module->bcol_fns_table[bcol_fn]), opal_list_t); - } - - return OMPI_SUCCESS; -} - -int mca_bcol_base_fn_table_destroy(struct mca_bcol_base_module_t *bcol_module){ - - int bcol_fn; - - for (bcol_fn = 0; bcol_fn < BCOL_NUM_OF_FUNCTIONS; bcol_fn++){ - /* gvm FIX: Go through the list and destroy each item */ - /* Destroy the function table object for each bcol type list */ - OBJ_DESTRUCT(&(bcol_module->bcol_fns_table[bcol_fn])); - } - - return OMPI_SUCCESS; -} - -int mca_bcol_base_set_attributes(struct mca_bcol_base_module_t *bcol_module, - mca_bcol_base_coll_fn_comm_attributes_t *arg_comm_attribs, - mca_bcol_base_coll_fn_invoke_attributes_t *arg_inv_attribs, - mca_bcol_base_module_collective_fn_primitives_t bcol_fn, - mca_bcol_base_module_collective_fn_primitives_t progress_fn - ) -{ - mca_bcol_base_coll_fn_comm_attributes_t *comm_attribs = NULL; - mca_bcol_base_coll_fn_invoke_attributes_t *inv_attribs = NULL; - struct mca_bcol_base_coll_fn_desc_t *fn_filtered = NULL; - int coll_type; - - comm_attribs = malloc(sizeof(mca_bcol_base_coll_fn_comm_attributes_t)); - if (NULL == comm_attribs) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - inv_attribs = malloc(sizeof(mca_bcol_base_coll_fn_invoke_attributes_t)); - - if (NULL == inv_attribs) { - free(comm_attribs); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - coll_type = comm_attribs->bcoll_type = arg_comm_attribs->bcoll_type; - comm_attribs->comm_size_min = arg_comm_attribs->comm_size_min; - comm_attribs->comm_size_max = arg_comm_attribs->comm_size_max; - comm_attribs->data_src = arg_comm_attribs->data_src; - comm_attribs->waiting_semantics = arg_comm_attribs->waiting_semantics; - - inv_attribs->bcol_msg_min = arg_inv_attribs->bcol_msg_min; - inv_attribs->bcol_msg_max = arg_inv_attribs->bcol_msg_max ; - inv_attribs->datatype_bitmap = arg_inv_attribs->datatype_bitmap ; - inv_attribs->op_types_bitmap = arg_inv_attribs->op_types_bitmap; - - fn_filtered = OBJ_NEW(mca_bcol_base_coll_fn_desc_t); - - fn_filtered->coll_fn = bcol_fn; - fn_filtered->progress_fn = progress_fn; - - fn_filtered->comm_attr = comm_attribs; - fn_filtered->inv_attr = inv_attribs; - - - opal_list_append(&(bcol_module->bcol_fns_table[coll_type]),(opal_list_item_t*)fn_filtered); - - return OMPI_SUCCESS; -} - -int mca_bcol_base_bcol_fns_table_init(struct mca_bcol_base_module_t *bcol_module){ - - int ret, bcol_init_fn; - - for (bcol_init_fn =0; bcol_init_fn < BCOL_NUM_OF_FUNCTIONS; bcol_init_fn++) { - if (NULL != bcol_module->bcol_function_init_table[bcol_init_fn]) { - ret = (bcol_module->bcol_function_init_table[bcol_init_fn]) (bcol_module); - if (OMPI_SUCCESS != ret) { - return OMPI_ERROR; - } - } - } - - return OMPI_SUCCESS; -} - -static void mca_bcol_base_coll_fn_desc_constructor(mca_bcol_base_coll_fn_desc_t *fn) -{ - fn->comm_attr = NULL; - fn->inv_attr = NULL; -} - -static void mca_bcol_base_coll_fn_desc_destructor(mca_bcol_base_coll_fn_desc_t *fn) -{ - if (fn->comm_attr) { - free(fn->comm_attr); - } - - if (fn->inv_attr) { - free(fn->inv_attr); - } -} - -OBJ_CLASS_INSTANCE(mca_bcol_base_coll_fn_desc_t, - opal_list_item_t, - mca_bcol_base_coll_fn_desc_constructor, - mca_bcol_base_coll_fn_desc_destructor); - -static void lmngr_block_constructor(mca_bcol_base_lmngr_block_t *item) -{ - item->base_addr = NULL; -} - -static void lnmgr_block_destructor(mca_bcol_base_lmngr_block_t *item) -{ - /* I have nothing to do here */ -} -OBJ_CLASS_INSTANCE(mca_bcol_base_lmngr_block_t, - opal_list_item_t, - lmngr_block_constructor, - lnmgr_block_destructor); diff --git a/ompi/mca/bcol/base/bcol_base_init.c b/ompi/mca/bcol/base/bcol_base_init.c deleted file mode 100644 index f6f0360cd98..00000000000 --- a/ompi/mca/bcol/base/bcol_base_init.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/include/ompi/constants.h" - -int mca_bcol_base_init(bool enable_progress_threads, bool enable_mpi_threads) -{ - mca_bcol_base_component_t *bcol_component; - mca_base_component_list_item_t *cli; - int ret; - - OPAL_LIST_FOREACH(cli, &mca_bcol_base_components_in_use, mca_base_component_list_item_t) { - bcol_component = (mca_bcol_base_component_t *) cli->cli_component; - - if (false == bcol_component->init_done) { - ret = bcol_component->collm_init_query(true, true); - if (OMPI_SUCCESS != ret) { - return ret; - } - - bcol_component->init_done = true; - } - } - - return OMPI_SUCCESS; -} - - - diff --git a/ompi/mca/bcol/base/owner.txt b/ompi/mca/bcol/base/owner.txt deleted file mode 100644 index 51ea04a5175..00000000000 --- a/ompi/mca/bcol/base/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ORNL? -status: unmaintained diff --git a/ompi/mca/bcol/basesmuma/Makefile.am b/ompi/mca/bcol/basesmuma/Makefile.am deleted file mode 100644 index 7a2a5b8c093..00000000000 --- a/ompi/mca/bcol/basesmuma/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - bcol_basesmuma.h \ - bcol_basesmuma_utils.h \ - bcol_basesmuma_bcast.c \ - bcol_basesmuma_component.c \ - bcol_basesmuma_module.c \ - bcol_basesmuma_buf_mgmt.c \ - bcol_basesmuma_mem_mgmt.c \ - bcol_basesmuma_fanin.c \ - bcol_basesmuma_fanout.c \ - bcol_basesmuma_progress.c \ - bcol_basesmuma_reduce.h \ - bcol_basesmuma_reduce.c \ - bcol_basesmuma_allreduce.c \ - bcol_basesmuma_setup.c \ - bcol_basesmuma_rd_barrier.c \ - bcol_basesmuma_rd_nb_barrier.c \ - bcol_basesmuma_rk_barrier.c \ - bcol_basesmuma_utils.c \ - bcol_basesmuma_bcast_prime.c \ - bcol_basesmuma_lmsg_knomial_bcast.c \ - bcol_basesmuma_lmsg_bcast.c \ - bcol_basesmuma_gather.c \ - bcol_basesmuma_allgather.c \ - bcol_basesmuma_smcm.h \ - bcol_basesmuma_smcm.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_bcol_basesmuma_DSO -component_install += mca_bcol_basesmuma.la -else -component_noinst += libmca_bcol_basesmuma.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -AM_CPPFLAGS = $(btl_portals_CPPFLAGS) - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_bcol_basesmuma_la_SOURCES = $(sources) -mca_bcol_basesmuma_la_LDFLAGS = -module -avoid-version $(btl_portals_LDFLAGS) -mca_bcol_basesmuma_la_LIBADD = \ - $(btl_portals_LIBS) - - -noinst_LTLIBRARIES = $(component_noinst) -libmca_bcol_basesmuma_la_SOURCES =$(sources) -libmca_bcol_basesmuma_la_LDFLAGS = -module -avoid-version $(btl_portals_LDFLAGS) diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma.h b/ompi/mca/bcol/basesmuma/bcol_basesmuma.h deleted file mode 100644 index 7b6c69d2c36..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma.h +++ /dev/null @@ -1,1270 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#ifndef MCA_BCOL_basesmuma_EXPORT_H -#define MCA_BCOL_basesmuma_EXPORT_H - -#include "ompi_config.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" -#include "ompi/proc/proc.h" -#include "ompi/patterns/net/netpatterns.h" - -#include "ompi/mca/mca.h" -#include "opal/util/arch.h" -#include "opal/util/argv.h" -#include "opal/datatype/opal_datatype.h" -#include "opal/util/output.h" - -#include "bcol_basesmuma_smcm.h" -BEGIN_C_DECLS - -struct list_data_t { - opal_list_item_t super; - void *data; -}; -typedef struct list_data_t list_data_t; -OBJ_CLASS_DECLARATION(list_data_t); - -/* - * Macro's for manipulating the 64 bit shared memory control bits. - * The 64 bit field is devided into 4 bit fields - * - * | 48-63: src | 32-47: index | 16-31: flag | 0-15: sequence number | - * - * Only the low 16 bits of the sequence number will be put in the header - * space. We will use the fact that the use of the shared buffers is - * synchronous, and get the upper 48 bits from the local process space. - */ - -#define BASESMUMA_CACHE_LINE_SIZE 128 - -#define SHIFT_UP << -#define SHIFT_DOWN >> - -#define SEQ_WIDTH 16 -#define SEQ_BASE 0 -#define FIELD_SEQ_MASK ( ( 1 SHIFT_UP SEQ_WIDTH ) - 1 ) -#define INPLACE_SEQ_MASK ( (int64_t)FIELD_SEQ_MASK SHIFT_UP SEQ_BASE) - -#define FLAG_WIDTH 16 -#define FLAG_BASE 16 -#define FIELD_FLAG_MASK ( ( 1 SHIFT_UP FLAG_WIDTH ) - 1 ) -#define INPLACE_FLAG_MASK ( (int64_t)FIELD_FLAG_MASK SHIFT_UP FLAG_BASE) - -#define INDX_WIDTH 16 -#define INDX_BASE 32 -#define FIELD_INDX_MASK ( ( 1 SHIFT_UP INDX_WIDTH ) - 1 ) -#define INPLACE_INDX_MASK ( (int64_t)FIELD_INDX_MASK SHIFT_UP INDX_BASE) - -#define SRC_WIDTH 16 -#define SRC_BASE 48 -#define FIELD_SRC_MASK ( ( 1 SHIFT_UP SRC_WIDTH ) - 1 ) -#define INPLACE_SRC_MASK ( (int64_t)FIELD_SRC_MASK SHIFT_UP SRC_BASE) -/*int64_t INPLACE_SRC_MASK= ((int64_t)FIELD_SRC_MASK SHIFT_UP SRC_BASE); */ - - -#define EXTRACT_FLAG(INPUT, OUTPUT, OUTPUT_TYPE, FIELD_BASE, FIELD_MASK) \ - OUTPUT = (OUTPUT_TYPE) ( (INPUT SHIFT_DOWN FIELD_BASE ) & FIELD_MASK ) - -#define STORE_FLAG(INPUT, OUTPUT, INPUT_TYPE, OUTPUT_TYPE, FIELD_BASE, INPLACE_FIELD_MASK ) \ - OUTPUT = \ - ( \ - /* 3 */ \ - ( \ - /* 2 */ \ - ( \ - /* 1 - shift the input field to the proper location */ \ - (OUTPUT_TYPE)( \ - ((OUTPUT_TYPE)((INPUT_TYPE) (INPUT))) \ - SHIFT_UP FIELD_BASE ) \ - /* mask off the extra bits */ \ - & ((OUTPUT_TYPE)INPLACE_FIELD_MASK) \ - ) \ - /* store back to the OUTPUT field, w/o destroying other fields */ \ - ) | OUTPUT \ - ) - -/** - * Structure to hold the basic shared memory bcoll component. - */ -struct mca_bcol_basesmuma_component_t { - /** Base coll component */ - mca_bcol_base_component_2_0_0_t super; - - /* management data for collectives with no user data */ - - /** MCA parameter: number of memory banks */ - int basesmuma_num_mem_banks; - - /** MCA parameter: number of regions per memory bank */ - int basesmuma_num_regions_per_bank; - - /** MCA parameter: Number of simultaneous groups supported */ - int n_groups_supported; - - /* management data for collectives with user data (ud) - the memory - * is actually obtained at the ML level - */ - - /** MCA paramenter: number of polling loops to run while waiting - * for children or parent to complete their work - */ - int n_poll_loops; - - /* mpool size */ - size_t mpool_size; - - - /* mpool inited - will use this to test whether or not the - * shared memory has been inited - */ - bool mpool_inited; - - /* shared memory control buffer - the control structures reside - * in shared memory */ - bcol_basesmuma_smcm_mmap_t *sm_ctl_structs; - - /* shared memory payload buffer - */ - bcol_basesmuma_smcm_mmap_t *sm_payload_structs; - - /* - * list of shared memory control structures - */ - opal_list_t ctl_structures; - - - /** opal list in which the list of peers that I am "connected" to is stored - */ - opal_list_t sm_connections_list; - - /* opal list in which the list of payload peers that I am "connected" to - * is stored - */ - opal_list_t sm_payload_connections_list; - - /* - * list of non-blocking admin barriers to progress */ - opal_mutex_t nb_admin_barriers_mutex; - opal_list_t nb_admin_barriers; - - /* - * order of fan-in tree - */ - int radix_fanin; - - /* - * order of fan-out tree - */ - int radix_fanout; - - /* - * Order of read tree - */ - int radix_read_tree; - - /* - * order of reduction fan-out tree - */ - int order_reduction_tree; - - /* - * K-nomial tree radix - */ - int k_nomial_radix; - - /* - * K-ary scatter tree radix - */ - int scatter_kary_radix; - - /* - * number of polling loops - */ - int num_to_probe; - - /* - * Portals addressing info - * void*: because wanted to keep portal library dependencies - * as local as possible - */ - void *portals_info; - bool portals_init; - - /* - * verbosity level - */ - int verbose; - - /* - * control file name base string - */ - char *clt_base_fname; - - /* - * data file name base string - */ - char *payload_base_fname; - - /* - * shared memory scratch space. This is mapped at the end of the - * segement of memory holding the control structures. - */ - char *my_scratch_shared_memory; - - /* - * size of scratch memory - */ - size_t my_scratch_shared_memory_size; - - /* the offset will be the same for all ranks */ - size_t scratch_offset_from_base_ctl_file; -}; - -static inline int mca_bcol_basesmuma_err(const char* fmt, ...) -{ - va_list list; - int ret; - - va_start(list, fmt); - ret = vfprintf(stderr, fmt, list); - va_end(list); - return ret; -} - -#if OPAL_ENABLE_DEBUG -#define BASESMUMA_VERBOSE(level, args) \ - do { \ - if(mca_bcol_basesmuma_component.verbose >= level) { \ - mca_bcol_basesmuma_err("[%s]%s[%s:%d:%s] BCOL-BASESMUMA ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_bcol_basesmuma_err args; \ - mca_bcol_basesmuma_err("\n"); \ - } \ - } while(0) -#else -#define BASESMUMA_VERBOSE(level, args) -#endif - - -/** - * Convenience typedef */ -typedef struct mca_bcol_basesmuma_component_t mca_bcol_basesmuma_component_t; - -#if 0 -/* - * Implemented function index list - */ - -/* barrier */ -enum{ - FANIN_FAN_OUT_BARRIER_FN, - RECURSIVE_DOUBLING_BARRIER_FN, - N_BARRIER_FNS -}; - -/* reduce */ -enum{ - FANIN_REDUCE_FN, - REDUCE_SCATTER_GATHER_FN, - N_REDUCE_FNS -}; -enum{ - SHORT_DATA_FN_REDUCE, - LONG_DATA_FN_REDUCE, - N_REDUCE_FNS_USED -}; - -/* all-reduce */ -enum{ - FANIN_FANOUT_ALLREDUCE_FN, - REDUCE_SCATTER_ALLGATHER_FN, - N_ALLREDUCE_FNS -}; -enum{ - SHORT_DATA_FN_ALLREDUCE, - LONG_DATA_FN_ALLREDUCE, - N_ALLREDUCE_FNS_USED -}; - - -/* enum for node type */ -enum{ - ROOT_NODE, - LEAF_NODE, - INTERIOR_NODE -}; - - -/* - * N-order tree node description - */ -struct tree_node_t { - /* my rank within the group */ - int my_rank; - /* my node type - root, leaf, or interior */ - int my_node_type; - /* number of nodes in the tree */ - int tree_size; - /* number of parents (0/1) */ - int n_parents; - /* number of children */ - int n_children; - /* parent rank within the group */ - int parent_rank; - /* chidren ranks within the group */ - int *children_ranks; -}; -typedef struct tree_node_t tree_node_t; - -/* - * Pair-wise data exchange - */ -/* enum for node type */ -enum{ - EXCHANGE_NODE, - EXTRA_NODE -}; - -struct pair_exchange_node_t { - - /* my rank within the group */ - int my_rank; - - /* number of nodes this node will exchange data with */ - int n_exchanges; - - /* ranks of nodes involved in data exchnge */ - int *rank_exchanges; - - /* number of extra sources of data - outside largest power of 2 in - * this group */ - int n_extra_sources; - - /* rank of the extra source */ - int rank_extra_source; - - /* number of tags needed per stripe */ - int n_tags; - - /* log 2 of largest full power of 2 for this node set */ - int log_2; - - /* largest power of 2 that fits in this group */ - int n_largest_pow_2; - - /* node type */ - int node_type; - -}; -typedef struct pair_exchange_node_t pair_exchange_node_t; -#endif -/* - * descriptor for managing the admin nonblocking barrier routine. - * This is an sm internal routine, and assumes only 1 outstanding - * nb-barrier collective call per block. - */ -/* forward declarations */ -struct mca_bcol_basesmuma_module_t; -struct sm_buffer_mgmt; - -struct sm_nbbar_desc_t { - /* make sure we can put this on a list */ - opal_list_item_t super; - - /* phase of the collective operation - needed to know how to continue - * progressing the nb-barrier */ - int collective_phase; - - /* iteration to continue at */ - int recursive_dbl_iteration; - - /* pointer to the collective module this is associated with */ - struct mca_bcol_basesmuma_module_t *sm_module; - - /* pointer to payload/control structs buffers */ - struct sm_buffer_mgmt *coll_buff; - - /* pool index */ - int pool_index; - - /* pointer to the mca_bcol_base_memory_block_desc_t structure - * that is actually managing this registration. - * This is meaningful when these control structures - * are used in conjunction with the user payload - * data that is allocated at the ml level. - */ - void *ml_memory_block_descriptor; - -}; -typedef struct sm_nbbar_desc_t sm_nbbar_desc_t; - -/* - * Barrier request objects - */ - -/* shared memory data strucutures */ -struct mca_bcol_basesmuma_nb_request_process_shared_mem_t { - volatile uint64_t coll_index; - /* flag used to indicate the status of this memory region */ - volatile uint64_t flag; - volatile uint64_t index; - - /* pading */ - /* Note: need to change this so it takes less memory */ - char padding[BASESMUMA_CACHE_LINE_SIZE-3*sizeof(uint64_t)]; -}; - -typedef struct mca_bcol_basesmuma_nb_request_process_shared_mem_t -mca_bcol_basesmuma_nb_request_process_shared_mem_t; - -/* enum for phase at which the nb barrier is in */ -enum{ - NB_BARRIER_INACTIVE, - - /* fan-in/fan-out */ - NB_BARRIER_FAN_IN, - NB_BARRIER_FAN_OUT, - - /* recursive doubling */ - NB_PRE_PHASE, - NB_RECURSIVE_DOUBLING, - NB_POST_PHASE, - - /* done and not started are the same for all practicle - * purposes, as the init funtion always sets this flag - */ - NB_BARRIER_DONE -}; - - - -/* forward declartion */ -struct mca_bcol_basesmuma_module_t; - -struct mca_basesmuma_ctrl_4_hdl_t { - int fd; - bool status; - volatile char buf[128]; - /*volatile char buf[OPAL_PATH_MAX];*/ -}; -typedef struct mca_basesmuma_ctrl_4_hdl_t mca_basesmuma_ctrl_4_hdl_t; - -/* control segment for shared memory */ -struct mca_bcol_basesmuma_ctl_struct_t { - /* collective identifier */ - volatile int64_t sequence_number; - volatile int64_t flag; - volatile int64_t index; - volatile int64_t offset; - volatile int64_t offset_zip; - - - /* used for non-blocking algorithms */ - int status; - int active_requests; - int iteration; - - int *src_ptr; - - int start; - - /* process private data */ - int starting_flag_value; - - /* experiment for large data colls */ - int n_sends; - int length; - - /* hdl framework control structure*/ - /* no need to pad at this level anymore */ - volatile int64_t data_hdl; - volatile mca_basesmuma_ctrl_4_hdl_t hdl_ctrl; - -#ifdef __PORTALS_AVAIL__ - struct mca_bcol_basesmuma_portal_buf_addr_t portals_buf_addr; -#endif - /* padding */ - /*char padding[BASESMUMA_CACHE_LINE_SIZE-4*sizeof(uint64_t)-3*sizeof(int)];*/ - char padding[BASESMUMA_CACHE_LINE_SIZE-6*sizeof(int64_t)-5*sizeof(int)]; -}; -typedef struct mca_bcol_basesmuma_ctl_struct_t mca_bcol_basesmuma_ctl_struct_t; - - -#define SM_BCOLS_MAX 2 - -/* enum for signaling flag bank, when - * adding to this list, please keep - * it alphabetical - */ -enum { - ALLGATHER_FLAG, - ALLREDUCE_FLAG, - BARRIER_FANIN_FLAG, - BARRIER_FANOUT_FLAG, - BARRIER_RKING_FLAG, - BCAST_FLAG, - GATHER_FLAG, - REDUCE_FLAG, - NUM_SIGNAL_FLAGS -}; - - -/* control region for colls with user data - shared memory */ -struct mca_bcol_basesmuma_header_t { - /* collective identifier */ - volatile int64_t sequence_number; - volatile int8_t flags[NUM_SIGNAL_FLAGS][SM_BCOLS_MAX]; - volatile int32_t src; /* src of bcast data for unknown root, - bcol id for known root - */ - /* starting flag - hierarchies */ - int8_t starting_flag_value[SM_BCOLS_MAX]; - int8_t ready_flag; - - /* Manju: Cached array of receive buffer offsets - * - * This array stores the receive buffer offsets (rbuf_offsets) of data buffer. - * In general, we assume that sbuf_offset and rbuf_offset of - * processes invoking the collective primitive is same. This is - * true when the order in which processes invoke their hierarchies are - * same. - * - * For some algorithms (like broadcast, reduce) we split the ML buffer - * and use first half as - * source and second half as receive buffer. We swap these buffers for - * each change when we change levels i.e., if first half is source for - * level 1, in the level 2 of hierarchy it becomes the receive buffer. - * For reduce algorithm, each process can invoke hierarchies - * (primitives) in different order. For example, process 1 might have level 1 as SM - * and level 2 as p2p, and process 2 might have different order where its - * level 1 is p2p and level 2 SM. In this case, if in basesmuma reduce - * algorithm, if parent assumes its rbuf_offset as child's rbuf_offset - * it is wrong. So we cache rbuf_offset of each process so - * it could be accessed by processes to obtain the data. - */ - - volatile int32_t roffsets[SM_BCOLS_MAX]; - - /* Manju Start: Experimental ctl fields and should be removed later; - * This is used for lmsg reduce for testing - * during transition to HDL primitives - */ -#if 0 - int lmsg_reduce_snd_completes; - /* There can be atmost 20 ranks in the subgroup. Since this - * only for testing this should be good enough */ - int lmsg_reduce_peers[20]; - int lmsg_reduce_send_offsets[20]; - /* End: Experimental ctl fields */ - - - /* no need to pad at this level anymore */ - volatile int64_t data_hdl; -#endif -}; -typedef struct mca_bcol_basesmuma_header_t mca_bcol_basesmuma_header_t; - -/* data needed for large messages */ -struct mca_bcol_basesmuma_large_msg_t { - /* scatter allgather data */ - uint64_t offset; - uint64_t n_sends; - uint64_t length; - - /* portals data */ - -}; -typedef struct mca_bcol_basesmuma_large_msg_t mca_bcol_basesmuma_large_msg_t; - -/* payload struct */ -struct mca_bcol_basesmuma_payload_t { - - /* base pointer to shared memory control structure */ - mca_bcol_basesmuma_header_t *ctl_struct; - void *payload; - -}; - -typedef struct mca_bcol_basesmuma_payload_t mca_bcol_basesmuma_payload_t; - - - - -/* memory bank memory management structure */ -struct mem_bank_management_t { - - /* generation counter */ - uint64_t bank_gen_counter; - - /* descriptor for the non-blocking barrier. This is - * used to manage this bank of memory. - */ - sm_nbbar_desc_t nb_barrier_desc; - - /* the number of buffers that are not in use, and are - * available. The assumption is that the buffers are - * recycled all at once, so are available for re-use - * until all buffers have been made available for re-use. - */ - volatile int available_buffers; - - /* - * number of buffers freed */ - volatile int n_buffs_freed; - - /* mutex to ensure atomic recycling of resrouces */ - opal_mutex_t mutex; - - /* number of buffers being managed */ - int number_of_buffers; - - /* shared memory control structures */ - int index_shared_mem_ctl_structs; - - -}; -typedef struct mem_bank_management_t mem_bank_management_t; - -/* data structure for shared buffers */ -struct sm_buffer_mgmt { - /* number of buffers per process */ - int number_of_buffs; - - /* size of group */ - int size_of_group; - - /* number of memory banks */ - int num_mem_banks; - - /* number of buffers per memory bank */ - int num_buffs_per_mem_bank; - - /* log base 2 of num_buffs_per_mem_bank */ - int log2_num_buffs_per_mem_bank; - - /* log base 2 total number of buffers */ - int log2_number_of_buffs; - - /* mask - masks off the bits corresponding to buffer index */ - int mask; - - /* control buffers - these point to regions in shared memory */ - /* leading dimension is the group size - all pointers for a given - * set of buffers appear consecutively in this array - */ - volatile void **ctl_buffs; - - /* management data for the control structures - - * one per bank of control structures - Will be used for - * the payload buffers as well. - */ - mem_bank_management_t *ctl_buffs_mgmt; - - /* data buffers - these point to regions in shared memory */ - /* leading dimension is the group size - all pointers for a given - * set of buffers appear consecutively in this array - */ - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - - - -}; -typedef struct sm_buffer_mgmt sm_buffer_mgmt; - - -struct mca_bcol_basesmuma_nb_coll_buff_desc_t { - void *data_addr; - uint64_t bank_index; - uint64_t buffer_index; - int active_requests; - ompi_request_t **requests; - int data_src; - int radix_mask; - int radix_mask_pow; - int iteration; - int status; - /* this is for testing */ - int tag; - - volatile mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - volatile mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_ctl_struct_t *parent_ctl_pointer; - volatile mca_bcol_basesmuma_ctl_struct_t *extra_partner_ctl_pointer; -}; - -typedef struct mca_bcol_basesmuma_nb_coll_buff_desc_t mca_bcol_basesmuma_nb_coll_buff_desc_t; - -struct mca_bcol_basesmuma_local_mlmem_desc_t { - - uint32_t bank_index_for_release; - struct mca_bcol_base_memory_block_desc_t *ml_mem_desc; - uint32_t num_banks; - uint32_t num_buffers_per_bank; - uint32_t size_buffer; - uint32_t *bank_release_counter; - - /* - * Number of descriptors allocated is equivalent to number of ml buffers - * (number of banks * number of buffers per bank) - */ - mca_bcol_basesmuma_nb_coll_buff_desc_t *nb_coll_desc; -}; - -typedef struct mca_bcol_basesmuma_local_mlmem_desc_t mca_bcol_basesmuma_local_mlmem_desc_t; - -#ifdef __PORTALS_AVAIL__ -#define MAX_SM_GROUP_SIZE 32 - - -struct portals_scatter_allgather_nb_bcast_state_t -{ - /* local variables */ - uint64_t length; - int my_rank, src, matched; - int src_list[MAX_SM_GROUP_SIZE]; - int group_size; - int64_t ready_flag; - int pow_2, pow_2_levels; - int src_list_index; - uint64_t fragment_size; /* user buffer size */ - - /* Input argument variables */ - void *my_userbuf; - int64_t sequence_number; - - /* Extra source variables */ - bool secondary_root; - int partner , extra_partner; - - /* Scatter Allgather offsets */ - uint64_t local_sg_offset , global_sg_offset , partner_offset ; - - /* Portals messaging relevant variables */ - /* - * ptl_handle_eq_t allgather_eq_h; - */ - ptl_handle_eq_t read_eq; - ptl_event_t allgather_event; - bool msg_posted; - - /* OMPI module and component variables */ - mca_bcol_basesmuma_component_t *cs; - struct mca_bcol_basesmuma_module_t *bcol_module; - - /* Control structure and payload variables */ - volatile mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - volatile mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_ctl_struct_t *parent_ctl_pointer; /* scatter source */ - volatile mca_bcol_basesmuma_ctl_struct_t *extra_partner_ctl_pointer; /* scatter source */ - - int phase; -}; - - -typedef struct portals_scatter_allgather_nb_bcast_state_t sg_state_t; -#endif - -#define SM_ARRAY_INDEX(LEAD_DIM,BUF_INDEX,PROC_INDEX) \ - ((LEAD_DIM)*(BUF_INDEX)+(PROC_INDEX)) -/* debug */ -#define BARRIER_BANK_LIST_SIZE 32 -/* end debug */ - -struct mca_bcol_basesmuma_module_t { - /* base structure */ - mca_bcol_base_module_t super; - - /* free list item with the control structures used for - * the no user data collective operations - */ - list_data_t *no_userdata_ctl; - - /* free list item with the control structures used for - * the with user data collective operations - */ - list_data_t *userdata_ctl; - - /* - * information on sm control backing files for the subgroup - * associated with this module. - */ - bcol_basesmuma_smcm_proc_item_t **ctl_backing_files_info; - - /* - * information on sm payload backing files for the subgroup - * associated with this module. - */ - bcol_basesmuma_smcm_proc_item_t **payload_backing_files_info; - - /* - * buffers for the collective that do not involve user data - - * barrier, fanin, fanout. - */ - sm_buffer_mgmt colls_no_user_data; - - /* - * buffers for the collective with user data. - */ - sm_buffer_mgmt colls_with_user_data; - - /* recursive-doubling tree node */ - netpatterns_pair_exchange_node_t recursive_doubling_tree; - - /* k-nomial gather/allgather tree */ - netpatterns_k_exchange_node_t knomial_allgather_tree; - - /* fanin tree node - root is rank 0 */ - netpatterns_tree_node_t fanin_node; - - /* fanout tree node - root is rank 0 */ - netpatterns_tree_node_t fanout_node; - - /* index of blocking barrier memory region to use */ - int index_blocking_barrier_memory_bank; - - /* comm to shared memory map */ - int *comm_to_sm_map; - - /* reduction fanout tree */ - netpatterns_tree_node_t* reduction_tree; - - /* broadcast fanout tree */ - netpatterns_tree_node_t* fanout_read_tree; - - /* scatter - k-ary tree */ - int scatter_kary_radix; - netpatterns_tree_node_t *scatter_kary_tree; - - /* Knomial exchange tree */ - /* Currently used for only large message reduce */ - netpatterns_k_exchange_node_t knomial_exchange_tree; - - /* sequence number offset - want to make sure that we start - * id'ing collectives with id 0, so we can have simple - * resource management. - */ - int64_t squence_number_offset; - - /* basesmuma specific header size into ml buffer - * was calculated at ml level - it is the sum of - * all headers from all bcols and then aligned to - * whatever alignment was requested - */ - uint32_t total_header_size; - - /* list of possible sources */ - int *src_list; - - /* Number of possible sources */ - int src_size; - - /* smallest power of k that is smaller - * than or equal in size to the uma group - */ - int pow_k_levels; - - /* size of power-of-k group */ - int pow_k; - - /* smallest power of 2 that is smaller - * than or equal to the smuma group size - */ - int pow_2_levels; - - /* size of power-of-2 group */ - int pow_2; - - /* pointer to the shared memory scratch array of each - * process in the group. - */ - void **shared_memory_scratch_space; - - /* - * Caching information for re-entrant collectives - */ - mca_bcol_basesmuma_local_mlmem_desc_t ml_mem; - - /* - * Cached offsets for lmsg reduce - */ - int **reduce_offsets; - - /*XXX: - * Starting to explore the beauty of zero-copy for large message - */ - struct mca_hdl_base_module_t **hdl_module; - -#ifdef __PORTALS_AVAIL__ - /* - * Store state for NB blocking functions - */ - sg_state_t sg_state; - -#endif -}; - -typedef struct mca_bcol_basesmuma_module_t mca_bcol_basesmuma_module_t; -OBJ_CLASS_DECLARATION(mca_bcol_basesmuma_module_t); - -/* shared memory specific arguments for the bcol registration function */ -typedef struct bcol_basesmuma_registration_data_t { - char *file_name; /* filename for payload */ - void *base_addr; /* base address to be mapped */ - size_t size; /* size of memory block to be "registered" */ - size_t size_ctl_structure; - size_t data_seg_alignment; - bcol_basesmuma_smcm_mmap_t *sm_mmap; /* shared memory map struct */ - mca_bcol_base_release_buff_fn_t buff_release_cb; /* buffer release - call back */ -} bcol_basesmuma_registration_data_t; - - -enum { - BUFFER_AVAILABLE, - STARTED, - FANIN, - FANOUT -}; - -/* enum used for non-blocking large - * message bcast - */ - -enum { - INIT, - START, - NOT_STARTED, - SCATTER, - ALLGATHER, - EXTRA_RANK, - PROBE, - SCATTER_ROOT_WAIT, - SCATTER_EXTRA_ROOT_WAIT, - SCATTER_PARENT_WAIT, - FINISHED -}; - -/** - * Global component instance - */ -OMPI_MODULE_DECLSPEC extern mca_bcol_basesmuma_component_t mca_bcol_basesmuma_component; - - -/* - * coll module functions - */ - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_bcol_basesmuma_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - -/* query to see if the module is available for use on the given - * communicator, and if so, what it's priority is. - */ -mca_bcol_base_module_t ** -mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules); - - - -/* shared memory specific memory registration function - this will be passed into the mpool */ -int mca_bcol_basesmuma_register_sm(void *context_data, void *base, size_t size, - void **reg); - -/* shared memory specific memory deregistration function - also needed by the mpool */ -int mca_bcol_basesmuma_deregister_sm(void *context_data, void *reg); - -/* setup the new k_nomial tree for collectives */ -int bcol_basesmuma_setup_knomial_tree(mca_bcol_base_module_t *super); - -/* allocate the memory pool for the shared memory control structures */ -int mca_bcol_basesmuma_allocate_pool_memory(mca_bcol_basesmuma_component_t - *component); - -/* initialize the internal scratch buffers and control structs that will be - used by the module */ -int base_bcol_basesmuma_setup_library_buffers( - mca_bcol_basesmuma_module_t *sm_module, - mca_bcol_basesmuma_component_t *cs); - - -/* shared memory recursive doubling initialization */ -int bcol_basesmuma_rd_barrier_init(mca_bcol_base_module_t *module); - -/* shared memory recusive double barrier */ -int bcol_basesmuma_recursive_double_barrier(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); -/* shared memory fanin */ -int bcol_basesmuma_fanin_init(mca_bcol_base_module_t *super); - -/* shared memory fanout */ -int bcol_basesmuma_fanout_init(mca_bcol_base_module_t *super); - -/* shared memory recursive k-ing non-blocking barrier */ -int bcol_basesmuma_barrier_init(mca_bcol_base_module_t *super); - -/* Shared memory broadcast */ -int bcol_basesmuma_bcast_init(mca_bcol_base_module_t *super); - -int bcol_basesmuma_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* Shared memory non-blocking broadcast */ -int bcol_basesmuma_bcast_k_nomial_anyroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_bcast_k_nomial_knownroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* Shared memory non-blocking broadcast - Large message anyroot */ -int bcol_basesmuma_binary_scatter_allgather_segment(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -#if 0 -/*FIXME: having fun here*/ -int bcol_basesmuma_hdl_zerocopy_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); -#endif - -int bcol_basesmuma_lmsg_bcast_k_nomial_anyroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_lmsg_scatter_allgather_portals_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_lmsg_scatter_allgather_portals_nb_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_lmsg_scatter_allgather_portals_nb_knownroot_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* - * shared memory scatter - */ -int bcol_basesmuma_scatter_init(mca_bcol_base_module_t *super); - -/* shared memory nonblocking scatter - known root */ -int bcol_basesmuma_nb_scatter_k_array_knownroot( - bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* shared memory non-blocking k-nomial barrier init */ -int bcol_basesmuma_k_nomial_barrier_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -/* shared memory non-blocking k-nomial barrier progress */ -int bcol_basesmuma_k_nomial_barrier_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -/*shared memory non-blocking k-nomial allgather init */ -int bcol_basesmuma_k_nomial_allgather_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -/* shared memory non-blocking k-nomial allgather progress */ -int bcol_basesmuma_k_nomial_allgather_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -/* shared memory allgather -- selection logic api */ -int bcol_basesmuma_allgather_init(mca_bcol_base_module_t *super); - -/* shared memory blocking k-nomial gather */ -int bcol_basesmuma_k_nomial_gather(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* shared memory non blocking k-nomial gather */ -int bcol_basesmuma_k_nomial_gather_init(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* shared memory non blocking k-nomial gather progress*/ -int bcol_basesmuma_k_nomial_gather_progress(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* shared memory init */ -int bcol_basesmuma_gather_init(mca_bcol_base_module_t *super); - -/* allocate shared memory control memory */ -int mca_bcol_basesmuma_allocate_sm_ctl_memory( - mca_bcol_basesmuma_component_t *cs); - -/* Shared memory basesmuma reduce */ -int bcol_basesmuma_reduce_init(mca_bcol_base_module_t *super); -int bcol_basesmuma_reduce_intra_fanin(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); -int bcol_basesmuma_reduce_intra_fanin_old(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_reduce_intra_reducescatter_gather(void *sbuf, void *rbuf, - int count, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, - int root, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -/* Shared memory basesmuma allreduce */ -int bcol_basesmuma_allreduce_init(mca_bcol_base_module_t *super); - -int bcol_basesmuma_allreduce_intra_fanin_fanout(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_allreduce_intra_recursive_doubling(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -/* initialize non-blocking barrier for recycling the memory buffers. - * This is not a general purpose nb_barrier, and relies on the - * fact that we will have only one outstanding nb-barrier per bank - * at a time. - */ -int bcol_basesmuma_rd_nb_barrier_init_admin(sm_nbbar_desc_t *sm_desc); - -/* admin nonblocking barrier - progress function */ -int bcol_basesmuma_rd_nb_barrier_progress_admin(sm_nbbar_desc_t *sm_desc); - -/* Memory syncronization registration function */ -int bcol_basesmuma_memsync_init(mca_bcol_base_module_t *super); - -/* smcm allgather function used to exchange file offsets. */ -int bcol_basesmuma_smcm_allgather_connection( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_sbgp_base_module_t *module, - opal_list_t *peer_list, - bcol_basesmuma_smcm_proc_item_t ***backing_files, - ompi_communicator_t *comm, - bcol_basesmuma_smcm_file_t input, char *base_fname, - bool map_all); - -/* clean up the backing files associated with a basesmuma bcol module */ -int bcol_basesmuma_smcm_release_connections (mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_sbgp_base_module_t *sbgp_module, opal_list_t *peer_list, - bcol_basesmuma_smcm_proc_item_t ***back_files); - -/* - * this function initializes the internal scratch buffers and control - * structures that will be used by the module - */ -int base_bcol_masesmuma_setup_library_buffers( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_bcol_basesmuma_component_t *sm_bcol_component); - -/* get the index of the shared memory buffer to be used */ -int bcol_basesmuma_get_buff_index( sm_buffer_mgmt * buff_block, - uint64_t buff_id ); - -int bcol_basesmuma_free_buff( sm_buffer_mgmt * buff_block, - uint64_t buff_id ); - -/* bank init which is used for shared memory optimization, fall back to - * the bank init above if this causes problems - */ -int bcol_basesmuma_bank_init_opti(struct mca_bcol_base_memory_block_desc_t *payload_block, - uint32_t data_offset, - mca_bcol_base_module_t *bcol_module, - void *reg_data); - -/* cleanup nb_coll_buff_desc */ -void cleanup_nb_coll_buff_desc(mca_bcol_basesmuma_nb_coll_buff_desc_t **desc, - uint32_t num_banks, - uint32_t num_buffers_per_bank); - - -/* used for shared memory offset exchange */ -int base_bcol_basesmuma_exchange_offsets( - mca_bcol_basesmuma_module_t *sm_bcol_module, - void **result_array, uint64_t mem_offset, int loop_limit, - int leading_dim); - - -/* the progress function to be called from the opal progress function - */ -int bcol_basesmuma_progress(void); - -/* Macro for initializing my shared memory control structure */ -#define BASESMUMA_HEADER_INIT(my_ctl_pointer,ready_flag, seqn, bcol_id) \ - do{ \ - int i,j; \ - int8_t flag_offset = 0; \ - /* setup resource recycling */ \ - if( (my_ctl_pointer)->sequence_number < (seqn) ) { \ - /* Signal arrival */ \ - for( j = 0; j < SM_BCOLS_MAX; j++){ \ - (my_ctl_pointer)->starting_flag_value[j]=0; \ - for( i = 0; i < NUM_SIGNAL_FLAGS; i++){ \ - (my_ctl_pointer)->flags[i][j] = -1; \ - } \ - } \ - } \ - /* increment the starting flag by one and return */ \ - flag_offset = (my_ctl_pointer)->starting_flag_value[(bcol_id)]; \ - (ready_flag) = flag_offset + 1; \ - opal_atomic_wmb(); \ - (my_ctl_pointer)->sequence_number = (seqn); \ - }while(0) - -/* these are all the same, am using a single macro for all collectives */ - -#define IS_PEER_READY(peer, my_flag, my_sequence_number,flag_index, bcol_id) \ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[flag_index][bcol_id] >= (my_flag))? true : false ) - -#if 0 -#define IS_AR_DATA_READY(peer, my_flag, my_sequence_number) \ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[ALLREDUCE_FLAG][bcol_id] >= (my_flag) \ - )? true : false ) - -#define IS_GDATA_READY(peer, my_flag, my_sequence_number) \ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[GATHER_FLAG][bcol_id] == (my_flag) \ - )? true : false ) - -#define IS_PEER_READY(peer, my_flag, flag_index, my_sequence_number) \ - ((((volatile int64_t)(peer)->sequence_number > (my_sequence_number)) || \ - (((volatile int64_t)(peer)->sequence_number == (my_sequence_number)) && \ - ((peer)->flags[flag_index][bcol_id] == (my_flag))) \ - )? true : false ) - -#define IS_ALLREDUCE_PEER_READY(peer, my_flag, my_sequence_number) \ - ((((volatile int64_t)(peer)->sequence_number == (my_sequence_number)) && \ - (((peer)->flags[ALLREDUCE_FLAG][bcol_id] == (my_flag))||((peer)->flags[ALLREDUCE_FLAG][bcol_id] == (my_flag) + 1)) \ - )? true : false ) -#endif - -#define IS_LAST_BCOL_FUNC(ml_args) \ - ((((ml_args)->n_of_this_type_in_collective == \ - (ml_args)->index_of_this_type_in_collective + 1 ) )? true : false) - -static inline __opal_attribute_always_inline__ -size_t bcol_basesmuma_data_offset_calc( - mca_bcol_basesmuma_module_t *basesmuma_module) -{ - uint32_t offset = basesmuma_module->super.header_size; - offset = ((offset + BCOL_HEAD_ALIGN - 1) / BCOL_HEAD_ALIGN) * BCOL_HEAD_ALIGN; - - return (size_t) offset; -} - - -END_C_DECLS - -#endif /* MCA_BCOL_basesmuma_EXPORT_H */ diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_allgather.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_allgather.c deleted file mode 100644 index 97a857ef0c3..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_allgather.c +++ /dev/null @@ -1,352 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/basesmuma/bcol_basesmuma.h" -/* - #define IS_AGDATA_READY(peer, my_flag, my_sequence_number)\ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[ALLGATHER_FLAG][bcol_id] >= (my_flag) \ - )? true : false ) -*/ - -#define CALC_ACTIVE_REQUESTS(active_requests,peers, tree_order) \ - do{ \ - for( j = 0; j < (tree_order - 1); j++){ \ - if( 0 > peers[j] ) { \ - /* set the bit */ \ - *active_requests ^= (1<bcol_module; - netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree; - int bcol_id = (int) bcol_module->super.bcol_id; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buffer_index].active_requests); - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buffer_index].iteration; - int *status = &bcol_module->ml_mem.nb_coll_desc[buffer_index].status; - int leading_dim, buff_idx, idx; - - int64_t sequence_number = input_args->sequence_num; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - - volatile int8_t ready_flag; - - /* initialize the iteration counter */ - buff_idx = input_args->src_desc->buffer_index; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* initialize headers and ready flag */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - - /* initialize these */ - *iteration = -1; - *active_requests = 0; - *status = ready_flag; - - if (EXTRA_NODE == exchange_node->node_type) { - /* I am ready at this level */ - opal_atomic_wmb (); - my_ctl_pointer->flags[ALLGATHER_FLAG][bcol_id] = ready_flag; - } - - return bcol_basesmuma_k_nomial_allgather_progress (input_args, const_args); -} - - -/* allgather progress function */ - -int bcol_basesmuma_k_nomial_allgather_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variables */ - int8_t flag_offset; - uint32_t buffer_index = input_args->buffer_index; - volatile int8_t ready_flag; - mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) const_args->bcol_module; - netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree; - int group_size = bcol_module->colls_no_user_data.size_of_group; - int *list_connected = bcol_module->super.list_n_connected; /* critical for hierarchical colls */ - int bcol_id = (int) bcol_module->super.bcol_id; - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buffer_index].active_requests); - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buffer_index].iteration; - int *status = &bcol_module->ml_mem.nb_coll_desc[buffer_index].status; - int leading_dim, idx, buff_idx; - - int i, j, probe; - int knt; - int src; - int recv_offset, recv_len; - int max_requests = 0; /* critical to set this */ - int pow_k, tree_order; - - int64_t sequence_number=input_args->sequence_num; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - - int pack_len = input_args->count * input_args->dtype->super.size; - - void *data_addr = (void*)( - (unsigned char *) input_args->sbuf + - (size_t) input_args->sbuf_offset); - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char *peer_data_pointer; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *peer_ctl_pointer; - -#if 0 - fprintf(stderr,"%d: entering sm allgather progress active requests %d iter %d ready_flag %d\n", my_rank, - *active_requests, *iteration, *status); -#endif - - buff_idx = input_args->src_desc->buffer_index; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* increment the starting flag by one and return */ - /* flag offset seems unnecessary here */ - flag_offset = my_ctl_pointer->starting_flag_value[bcol_id]; - ready_flag = *status; - my_ctl_pointer->sequence_number = sequence_number; - /* k-nomial parameters */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - - /* calculate the maximum number of requests - * at each level each rank communicates with - * at most (k - 1) peers - * so if we set k - 1 bit fields in "max_requests", then - * we have max_request == 2^(k - 1) -1 - */ - for(i = 0; i < (tree_order - 1); i++){ - max_requests ^= (1<node_type) { - /* If I'm in here, then I must be looking for data */ - ready_flag = flag_offset + 1 + pow_k + 2; - - src = exchange_node->rank_extra_sources_array[0]; - peer_data_pointer = data_buffs[src].payload; - peer_ctl_pointer = data_buffs[src].ctl_struct; - - /* calculate the count */ - for (i = 0, knt = 0 ; i < group_size ; ++i){ - knt += list_connected[i]; - } - - for (i = 0 ; i < cm->num_to_probe ; ++i) { - if (IS_PEER_READY(peer_ctl_pointer, ready_flag, sequence_number, ALLGATHER_FLAG, bcol_id)) { - /* we receive the entire message */ - opal_atomic_mb (); - memcpy (data_addr, (void *) peer_data_pointer, knt * pack_len); - - goto FINISHED; - } - } - - /* haven't found it, state is saved, bail out */ - return BCOL_FN_STARTED; - } else if (0 < exchange_node->n_extra_sources) { - /* I am a proxy for someone */ - src = exchange_node->rank_extra_sources_array[0]; - peer_data_pointer = data_buffs[src].payload; - peer_ctl_pointer = data_buffs[src].ctl_struct; - - /* calculate the offset */ - for (i = 0, knt = 0 ; i < src ; ++i){ - knt += list_connected[i]; - } - - /* probe for extra rank's arrival */ - for (i = 0 ; i < cm->num_to_probe ; ++i) { - if (IS_PEER_READY(peer_ctl_pointer, ready_flag, sequence_number, ALLGATHER_FLAG, bcol_id)) { - opal_atomic_mb (); - /* copy it in */ - memcpy ((void *) ((uintptr_t) data_addr + knt * pack_len), - (void *) ((uintptr_t) peer_data_pointer + knt * pack_len), - pack_len * list_connected[src]); - break; - } - } - - if (i == cm->num_to_probe) { - return BCOL_FN_STARTED; - } - } - - /* bump the ready flag to indicate extra node exchange complete */ - ++ready_flag; - *iteration = 0; - } - - /* start the recursive k - ing phase */ - for (i = *iteration ; i < pow_k ; ++i) { - /* I am ready at this level */ - opal_atomic_wmb (); - my_ctl_pointer->flags[ALLGATHER_FLAG][bcol_id] = ready_flag; - - if (0 == *active_requests) { - /* flip some bits, if we don't have active requests from a previous visit */ - CALC_ACTIVE_REQUESTS(active_requests,exchange_node->rank_exchanges[i],tree_order); - } - - for (j = 0; j < (tree_order - 1); ++j) { - - /* recv phase */ - src = exchange_node->rank_exchanges[i][j]; - - if (src < 0) { - /* then not a valid rank, continue */ - continue; - } - - if (!(*active_requests&(1<payload_info[i][j].r_offset * pack_len; - recv_len = exchange_node->payload_info[i][j].r_len * pack_len; - - /* I am putting the probe loop as the inner most loop to achieve - * better temporal locality - */ - for (probe = 0 ; probe < cm->num_to_probe ; ++probe) { - if (IS_PEER_READY(peer_ctl_pointer, ready_flag, sequence_number, ALLGATHER_FLAG, bcol_id)) { - /* flip the request's bit */ - *active_requests ^= (1<flags[ALLGATHER_FLAG][bcol_id]; - *iteration = i; - return BCOL_FN_STARTED; - } - } - - /* bump the flag one more time for the extra rank */ - ready_flag = flag_offset + 1 + pow_k + 2; - - /* finish off the last piece, send the data back to the extra */ - if( 0 < exchange_node->n_extra_sources ) { - /* simply announce my arrival */ - opal_atomic_wmb (); - my_ctl_pointer->flags[ALLGATHER_FLAG][bcol_id] = ready_flag; - } - -FINISHED: - /* bump this up for others to see */ - my_ctl_pointer->starting_flag_value[bcol_id]++; - return BCOL_FN_COMPLETE; -} - -/* Register allreduce functions to the BCOL function table, - * so they can be selected - */ -int bcol_basesmuma_allgather_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_ALLGATHER; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_k_nomial_allgather_init, - bcol_basesmuma_k_nomial_allgather_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c deleted file mode 100644 index 0058ec770fb..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c +++ /dev/null @@ -1,611 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "ompi/op/op.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -#include "opal/include/opal_stdint.h" - -#include "ompi/mca/bcol/base/base.h" -#include "bcol_basesmuma.h" - -static int bcol_basesmuma_allreduce_intra_fanin_fanout_progress (bcol_function_args_t *input_args, mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_allreduce_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_ALLREDUCE; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1048576; - comm_attribs.data_src = DATA_SRC_KNOWN; - - /* selection logic at the ml level specifies a - * request for a non-blocking algorithm - * however, these algorithms are blocking - * following what was done at the p2p level - * we will specify non-blocking, but beware, - * these algorithms are blocking and will not make use - * of the progress engine - */ - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - /* Set attributes for fanin fanout algorithm */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_allreduce_intra_fanin_fanout, - bcol_basesmuma_allreduce_intra_fanin_fanout_progress); - - inv_attribs.bcol_msg_min = 20000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_allreduce_intra_fanin_fanout, - bcol_basesmuma_allreduce_intra_fanin_fanout_progress); - - /* Differs only in comm size */ - - comm_attribs.data_src = DATA_SRC_UNKNOWN; - comm_attribs.waiting_semantics = BLOCKING; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 8; - - /* Set attributes for recursive doubling algorithm */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_allreduce_intra_recursive_doubling, - NULL); - - - return OMPI_SUCCESS; -} - -/* - * Small data fanin reduce - * ML buffers are used for both payload and control structures - * This functions works with hierarchical allreduce and - * progress engine - */ -static inline int reduce_children (mca_bcol_basesmuma_module_t *bcol_module, volatile void *rbuf, netpatterns_tree_node_t *my_reduction_node, - int *iteration, volatile mca_bcol_basesmuma_header_t *my_ctl_pointer, ompi_datatype_t *dtype, - volatile mca_bcol_basesmuma_payload_t *data_buffs, int count, struct ompi_op_t *op, int process_shift) -{ - volatile mca_bcol_basesmuma_header_t *child_ctl_pointer; - int bcol_id = (int) bcol_module->super.bcol_id; - int64_t sequence_number = my_ctl_pointer->sequence_number; - int8_t ready_flag = my_ctl_pointer->ready_flag; - int group_size = bcol_module->colls_no_user_data.size_of_group; - - if (LEAF_NODE != my_reduction_node->my_node_type) { - volatile char *child_data_pointer; - volatile void *child_rbuf; - - /* for each child */ - /* my_result_data = child_result_data (op) my_source_data */ - - for (int child = *iteration ; child < my_reduction_node->n_children ; ++child) { - int child_rank = my_reduction_node->children_ranks[child] + process_shift; - - if (group_size <= child_rank){ - child_rank -= group_size; - } - - child_ctl_pointer = data_buffs[child_rank].ctl_struct; - - if (!IS_PEER_READY(child_ctl_pointer, ready_flag, sequence_number, ALLREDUCE_FLAG, bcol_id)) { - *iteration = child; - return BCOL_FN_STARTED; - } - - child_data_pointer = data_buffs[child_rank].payload; - child_rbuf = child_data_pointer + child_ctl_pointer->roffsets[bcol_id]; - - ompi_op_reduce(op, (void *)child_rbuf, (void *)rbuf, count, dtype); - } /* end child loop */ - } - - if (ROOT_NODE != my_reduction_node->my_node_type) { - opal_atomic_wmb (); - my_ctl_pointer->flags[ALLREDUCE_FLAG][bcol_id] = ready_flag; - } - - /* done with this step. move on to fan out */ - *iteration = -1; - - return BCOL_FN_COMPLETE; -} - -static int allreduce_fanout (mca_bcol_basesmuma_module_t *bcol_module, volatile mca_bcol_basesmuma_header_t *my_ctl_pointer, - volatile void *my_data_pointer, int process_shift, volatile mca_bcol_basesmuma_payload_t *data_buffs, - int sequence_number, int group_size, int rbuf_offset, size_t pack_len) -{ - volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer; - int bcol_id = (int) bcol_module->super.bcol_id; - int8_t ready_flag = my_ctl_pointer->ready_flag + 1; - netpatterns_tree_node_t *my_fanout_read_tree; - volatile void *parent_data_pointer; - int my_fanout_parent, my_rank; - void *parent_rbuf, *rbuf; - - my_rank = bcol_module->super.sbgp_partner_module->my_index; - my_fanout_read_tree = &(bcol_module->fanout_read_tree[my_rank]); - - if (ROOT_NODE != my_fanout_read_tree->my_node_type) { - my_fanout_parent = my_fanout_read_tree->parent_rank + process_shift; - if (group_size <= my_fanout_parent) { - my_fanout_parent -= group_size; - } - - rbuf = (void *)((char *) my_data_pointer + rbuf_offset); - - /* - * Get parent payload data and control data. - * Get the pointer to the base address of the parent's payload buffer. - * Get the parent's control buffer. - */ - parent_data_pointer = data_buffs[my_fanout_parent].payload; - parent_ctl_pointer = data_buffs[my_fanout_parent].ctl_struct; - - parent_rbuf = (void *) ((char *) parent_data_pointer + rbuf_offset); - - /* Wait until parent signals that data is ready */ - /* The order of conditions checked in this loop is important, as it can - * result in a race condition. - */ - if (!IS_PEER_READY(parent_ctl_pointer, ready_flag, sequence_number, ALLREDUCE_FLAG, bcol_id)) { - return BCOL_FN_STARTED; - } - - assert (parent_ctl_pointer->flags[ALLREDUCE_FLAG][bcol_id] == ready_flag); - - /* Copy the rank to a shared buffer writable by the current rank */ - memcpy ((void *) rbuf, (const void*) parent_rbuf, pack_len); - } - - if (LEAF_NODE != my_fanout_read_tree->my_node_type) { - opal_atomic_wmb (); - - /* Signal to children that they may read the data from my shared buffer (bump the ready flag) */ - my_ctl_pointer->flags[ALLREDUCE_FLAG][bcol_id] = ready_flag; - } - - my_ctl_pointer->starting_flag_value[bcol_id] += 1; - - return BCOL_FN_COMPLETE; - -} - -static int bcol_basesmuma_allreduce_intra_fanin_fanout_progress (bcol_function_args_t *input_args, mca_bcol_base_function_t *c_input_args) -{ - mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - int buff_idx = input_args->src_desc->buffer_index; - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buff_idx].iteration; - void *data_addr = (void *) input_args->src_desc->data_addr; - int my_node_index, my_rank, group_size, leading_dim, idx; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - int64_t sequence_number = input_args->sequence_num; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - struct ompi_datatype_t *dtype = input_args->dtype; - netpatterns_tree_node_t *my_reduction_node; - struct ompi_op_t *op = input_args->op; - volatile void *my_data_pointer; - int count = input_args->count; - int rc, process_shift; - ptrdiff_t lb, extent; - volatile void *rbuf; - - /* get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx = SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - /* Align node index to around sbgp root */ - process_shift = input_args->root; - my_node_index = my_rank - input_args->root; - if (0 > my_node_index ) { - my_node_index += group_size; - } - - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) bcol_module->colls_with_user_data.data_buffs + idx; - /* Get control structure and payload buffer */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - my_data_pointer = (volatile char *) data_addr; - - my_data_pointer = (volatile char *) data_addr; - rbuf = (volatile void *)((char *) my_data_pointer + input_args->rbuf_offset); - - /*************************** - * Fan into root phase - ***************************/ - - my_reduction_node = &(bcol_module->reduction_tree[my_node_index]); - if (-1 != *iteration) { - rc = reduce_children (bcol_module, rbuf, my_reduction_node, iteration, my_ctl_pointer, - dtype, data_buffs, count, op, process_shift); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - - /* there might be non-contig dtype - so compute the length with get_extent */ - ompi_datatype_get_extent(dtype, &lb, &extent); - - /*************************** - * Fan out from root - ***************************/ - - /* all nodes will have the result after fanout */ - input_args->result_in_rbuf = true; - - /* Signal that you are ready for fanout phase */ - return allreduce_fanout (bcol_module, my_ctl_pointer, my_data_pointer, process_shift, data_buffs, - sequence_number, group_size, input_args->rbuf_offset, count * (size_t) extent); -} - -/** - * Shared memory blocking allreduce. - */ -int bcol_basesmuma_allreduce_intra_fanin_fanout(bcol_function_args_t *input_args, mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - int buff_idx = input_args->src_desc->buffer_index; - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buff_idx].iteration; - void *data_addr = (void *) input_args->src_desc->data_addr; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - struct ompi_datatype_t *dtype = input_args->dtype; - int bcol_id = (int) bcol_module->super.bcol_id; - int rc, my_rank, leading_dim, idx; - volatile void *my_data_pointer; - volatile void *sbuf, *rbuf; - int8_t ready_flag; - - /* get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx = SM_ARRAY_INDEX(leading_dim, buff_idx, 0); - - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) bcol_module->colls_with_user_data.data_buffs + idx; - /* Get control structure */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - my_data_pointer = (volatile char *) data_addr; - rbuf = (volatile void *)((char *) my_data_pointer + input_args->rbuf_offset); - sbuf = (volatile void *)((char *) my_data_pointer + input_args->sbuf_offset); - - /* Setup resource recycling */ - /* Set for multiple instances of bcols */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, input_args->sequence_num, bcol_id); - - if (sbuf != rbuf) { - rc = ompi_datatype_copy_content_same_ddt (dtype, input_args->count, (char *)rbuf, - (char *)sbuf); - if( 0 != rc ) { - return OMPI_ERROR; - } - } - - *iteration = 0; - my_ctl_pointer->ready_flag = ready_flag; - - return bcol_basesmuma_allreduce_intra_fanin_fanout_progress (input_args, c_input_args); -} - - - -/* this thing uses the old bcol private control structures */ -int bcol_basesmuma_allreduce_intra_recursive_doubling(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - - int my_rank,group_size,my_node_index; - int pair_rank, exchange, extra_rank, payload_len; - size_t dt_size; - int read_offset, write_offset; - volatile void *my_data_pointer; - volatile mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer = NULL, - *partner_ctl_pointer = NULL, - *extra_ctl_pointer = NULL; - volatile void *my_read_pointer, *my_write_pointer, *partner_read_pointer, - *extra_rank_readwrite_data_pointer,*extra_rank_read_data_pointer; - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - - int8_t ready_flag; - int sbuf_offset,rbuf_offset,flag_offset; - int root,count; - struct ompi_op_t *op; - int64_t sequence_number=input_args->sequence_num; - struct ompi_datatype_t *dtype; - int first_instance = 0; - int leading_dim,idx; - int buff_idx; - mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - /*volatile void **data_buffs;*/ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - netpatterns_pair_exchange_node_t *my_exchange_node; - - - /* - * Get addressing information - */ - buff_idx = input_args->src_desc->buffer_index; - - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx = SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - /* - * Get SM control structures and payload buffers - */ - ctl_structs = (mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_with_user_data.ctl_buffs+idx; - /*data_buffs = (volatile void **) - bcol_module->colls_with_user_data.data_buffs+idx;*/ - - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs + idx; - - - /* - * Get control structure and payload buffer - */ - my_ctl_pointer = ctl_structs[my_rank]; - if (my_ctl_pointer->sequence_number < sequence_number) { - first_instance=1; - } - my_data_pointer = data_buffs[my_rank].payload; - - /* - * Align node index to around sbgp root - */ - root = input_args->root; - my_node_index = my_rank - root; - if (0 > my_node_index) { - my_node_index += group_size; - } - - /* - * Get data from arguments - */ - sbuf_offset = input_args->sbuf_offset; - rbuf_offset = input_args->rbuf_offset; - op = input_args->op; - count = input_args->count; - dtype = input_args->dtype; - - /* - * Get my node for the reduction tree - */ - my_exchange_node = &(bcol_module->recursive_doubling_tree); - - - if (first_instance) { - my_ctl_pointer->index = 1; - my_ctl_pointer->starting_flag_value = 0; - flag_offset = 0; - my_ctl_pointer->flag = -1; - /* - for( i = 0; i < NUM_SIGNAL_FLAGS; i++){ - my_ctl_pointer->flags[ALLREDUCE_FLAG] = -1; - } - */ - } else { - my_ctl_pointer->index++; - flag_offset = my_ctl_pointer->starting_flag_value; - } - - /* signal that I have arrived */ - /* opal_atomic_wmb (); */ - my_ctl_pointer->sequence_number = sequence_number; - - /* If we use this buffer more than once by an sm module in - * a given collective, will need to distinguish between instances, so - * we pick up the right data. - */ - ready_flag = flag_offset + sequence_number + 1; - - /* - * Set up pointers for using during recursive doubling phase - */ - read_offset = sbuf_offset; - write_offset = rbuf_offset; - fprintf(stderr,"read offset %d write offset %d\n",read_offset,write_offset); - my_read_pointer = (volatile void *)((char *) my_data_pointer + read_offset); - my_write_pointer = (volatile void *)((char *) my_data_pointer + write_offset); - - /* - * When there are non-power 2 nodes, the extra nodes' data is copied and - * reduced by partner exchange nodes. - * Extra nodes: Nodes with rank greater nearest power of 2 - * Exchange nodes: Nodes with rank lesser than nearest power of 2 that - * partner with extras nodes during reduction - */ - - if (0 < my_exchange_node->n_extra_sources) { - /* - * Signal extra node that data is ready - */ - opal_atomic_wmb (); - - my_ctl_pointer->flag = ready_flag; - - if (EXCHANGE_NODE == my_exchange_node->node_type) { - extra_rank = my_exchange_node->rank_extra_source; - extra_ctl_pointer = ctl_structs[extra_rank]; - extra_rank_readwrite_data_pointer = (void *) ((char *) data_buffs[extra_rank].payload + - read_offset); - - /* - * Wait for data to get ready - */ - while (!((sequence_number == extra_ctl_pointer->sequence_number) && - (extra_ctl_pointer->flag >= ready_flag))){ - } - - ompi_op_reduce(op,(void *)extra_rank_readwrite_data_pointer, - (void *)my_read_pointer, count, dtype); - } - } - - - /* --Exchange node that reduces with extra node --: Signal to extra node that data is read - * --Exchange node that doesn't reduce data with extra node --: This assignment - * is used so it can sync with other nodes during exchange phase - * --Extra node--: It can pass to next phase - */ - ready_flag++; - /*my_ctl_pointer->flags[ALLREDUCE_FLAG] = ready_flag;*/ - my_ctl_pointer->flag = ready_flag; - - - /* - * Exchange data with all the nodes that are less than max_power_2 - */ - for (exchange=0 ; exchange < my_exchange_node->n_exchanges ; exchange++) { - int tmp=0; - - /*my_ctl_pointer->flags[ALLREDUCE_FLAG] = ready_flag;*/ - my_ctl_pointer->flag = ready_flag; - pair_rank=my_exchange_node->rank_exchanges[exchange]; - partner_ctl_pointer = ctl_structs[pair_rank]; - partner_read_pointer = (volatile void *) ((char *)data_buffs[pair_rank].payload + read_offset); - - my_read_pointer = (volatile void *)((char *) my_data_pointer + read_offset); - my_write_pointer = (volatile void *)((char *) my_data_pointer + write_offset); - - /* - * Wait for partner to be ready, so we can read - */ - /* - JSL ---- FIX ME !!!!! MAKE ME COMPLIANT WITH NEW BUFFERS - while (!IS_ALLREDUCE_PEER_READY(partner_ctl_pointer, - ready_flag, sequence_number)) { - } - */ - - /* - * Perform reduction operation - */ - ompi_3buff_op_reduce(op,(void *)my_read_pointer, (void *)partner_read_pointer, - (void *)my_write_pointer, count, dtype); - - - /* - * Signal that I am done reading my partner's data - */ - ready_flag++; - /*my_ctl_pointer->flags[ALLREDUCE_FLAG] = ready_flag;*/ - my_ctl_pointer->flag = ready_flag; - - while (ready_flag > partner_ctl_pointer->flag){ - opal_progress(); - } - - /* - * Swap read and write offsets - */ - tmp = read_offset; - read_offset = write_offset; - write_offset = tmp; - - } - - - /* - * Copy data in from the "extra" source, if need be - */ - - if (0 < my_exchange_node->n_extra_sources) { - - if (EXTRA_NODE == my_exchange_node->node_type) { - - int extra_rank_read_offset=-1,my_write_offset=-1; - - /* Offset the ready flag to sync with - * exchange node which might going through exchange phases - * unlike the extra node - */ - ready_flag = ready_flag + my_exchange_node->log_2; - - if (my_exchange_node->log_2%2) { - extra_rank_read_offset = rbuf_offset; - my_write_offset = rbuf_offset; - - } else { - extra_rank_read_offset = sbuf_offset; - my_write_offset = sbuf_offset; - - } - - my_write_pointer = (volatile void*)((char *)my_data_pointer + my_write_offset); - extra_rank = my_exchange_node->rank_extra_source; - extra_ctl_pointer = ctl_structs[extra_rank]; - - extra_rank_read_data_pointer = (volatile void *) ((char *)data_buffs[extra_rank].payload + - extra_rank_read_offset); - - /* - * Wait for the exchange node to be ready - */ - ompi_datatype_type_size(dtype, &dt_size); - payload_len = count*dt_size; -#if 0 - fix me JSL !!!!! - while (!IS_DATA_READY(extra_ctl_pointer, ready_flag, sequence_number)){ - } -#endif - memcpy((void *)my_write_pointer,(const void *) - extra_rank_read_data_pointer, payload_len); - - ready_flag++; - /*my_ctl_pointer->flags[ALLREDUCE_FLAG] = ready_flag;*/ - my_ctl_pointer->flag = ready_flag; - - - } else { - - /* - * Signal parent that data is ready - */ - opal_atomic_wmb (); - /*my_ctl_pointer->flags[ALLREDUCE_FLAG] = ready_flag;*/ - my_ctl_pointer->flag = ready_flag; - - /* wait until child is done to move on - this buffer will - * be reused for the next stripe, so don't want to move - * on too quick. - */ - extra_rank = my_exchange_node->rank_extra_source; - extra_ctl_pointer = ctl_structs[extra_rank]; - } - } - - input_args->result_in_rbuf = my_exchange_node->log_2 & 1; - - my_ctl_pointer->starting_flag_value += 1; - - return BCOL_FN_COMPLETE; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast.c deleted file mode 100644 index 340c0c4c7f1..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast.c +++ /dev/null @@ -1,487 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" - -#include "bcol_basesmuma.h" - -#define __TEST_BLOCKING__ 1 -#define __TEST_WAIT__ 0 -#define __TEST_TEST__ 0 - -/* debug - * #include "opal/sys/timer.h" - * - * extern uint64_t timers[7]; - * end debug */ - -/* debug */ -/* end debug */ -int bcol_basesmuma_bcast_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_BCAST; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1048576; - comm_attribs.data_src = DATA_SRC_KNOWN; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_bcast_k_nomial_knownroot, - bcol_basesmuma_bcast_k_nomial_knownroot); - - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_bcast_k_nomial_knownroot, - bcol_basesmuma_bcast_k_nomial_knownroot); - - comm_attribs.data_src = DATA_SRC_UNKNOWN; - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_bcast_k_nomial_anyroot, - bcol_basesmuma_bcast_k_nomial_anyroot); - - comm_attribs.data_src = DATA_SRC_UNKNOWN; - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - -#ifdef __PORTALS_AVAIL__ - - comm_attribs.waiting_semantics = BLOCKING; - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_lmsg_scatter_allgather_portals_bcast, - bcol_basesmuma_lmsg_scatter_allgather_portals_bcast); - - - comm_attribs.waiting_semantics = NON_BLOCKING; - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_lmsg_scatter_allgather_portals_nb_bcast, - bcol_basesmuma_lmsg_scatter_allgather_portals_nb_bcast); - - comm_attribs.data_src = DATA_SRC_KNOWN; - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_lmsg_scatter_allgather_portals_nb_knownroot_bcast, - bcol_basesmuma_lmsg_scatter_allgather_portals_nb_knownroot_bcast); - -#else - /* - if (super->use_hdl) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_hdl_zerocopy_bcast, - bcol_basesmuma_hdl_zerocopy_bcast); - } else { */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, NULL, NULL); - /* - bcol_basesmuma_binary_scatter_allgather_segment, - bcol_basesmuma_binary_scatter_allgather_segment); - */ - /* } */ -#endif - - return OMPI_SUCCESS; -} - -/* includes shared memory optimization */ - -/** - * Shared memory blocking Broadcast - fanin, for small data buffers. - * This routine assumes that buf (the input buffer) is a single writer - * multi reader (SWMR) shared memory buffer owned by the calling rank - * which is the only rank that can write to this buffers. - * It is also assumed that the buffers are registered and fragmented - * at the ML level and that buf is sufficiently large to hold the data. - * - * - * @param buf - SWMR shared buffer within a sbgp that the - * executing rank can write to. - * @param count - the number of elements in the shared buffer. - * @param dtype - the datatype of a shared buffer element. - * @param root - the index within the sbgp of the root. - * @param module - basesmuma module. - */ -int bcol_basesmuma_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int group_size, process_shift, my_node_index; - int my_rank; - int rc = OMPI_SUCCESS; - int my_fanout_parent; - int leading_dim, buff_idx, idx; - volatile int8_t ready_flag; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int root=input_args->root; - int64_t sequence_number=input_args->sequence_num; - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - int bcol_id = (int) bcol_module->super.bcol_id; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char* parent_data_pointer; - mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer; - netpatterns_tree_node_t* my_fanout_read_tree; - size_t pack_len = 0, dt_size; - - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr ); - -#if 0 - fprintf(stderr,"Entering sm broadcast input_args->sbuf_offset %d \n",input_args->sbuf_offset); - fflush(stderr); -#endif - - - /* we will work only on packed data - so compute the length*/ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Align node index to around sbgp root */ - process_shift = root; - my_node_index = my_rank - root; - if(0 > my_node_index ) { - my_node_index += group_size; - } - - /* get my node for the bcast tree */ - my_fanout_read_tree = &(bcol_module->fanout_read_tree[my_node_index]); - my_fanout_parent = my_fanout_read_tree->parent_rank + process_shift; - if(group_size <= my_fanout_parent){ - my_fanout_parent -= group_size; - } - - /* Set pointer to current proc ctrl region */ - /*my_ctl_pointer = ctl_structs[my_rank]; */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* setup resource recycling */ - - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - - /* - * Fan out from root - */ - if(ROOT_NODE == my_fanout_read_tree->my_node_type) { - input_args->result_in_rbuf = false; - /* Root should only signal it is ready */ - my_ctl_pointer->flags[BCAST_FLAG][bcol_id] = ready_flag; - - }else if(LEAF_NODE == my_fanout_read_tree->my_node_type) { - input_args->result_in_rbuf = false; - /* - * Get parent payload data and control data. - * Get the pointer to the base address of the parent's payload buffer. - * Get the parent's control buffer. - */ - parent_data_pointer = data_buffs[my_fanout_parent].payload; - parent_ctl_pointer = data_buffs[my_fanout_parent].ctl_struct; - - /* Wait until parent signals that data is ready */ - /* The order of conditions checked in this loop is important, as it can - * result in a race condition. - */ - while (!IS_PEER_READY(parent_ctl_pointer, ready_flag, sequence_number, BCAST_FLAG, bcol_id)){ - opal_progress(); - } - - /* Copy the rank to a shared buffer writable by the current rank */ - memcpy(data_addr, (void *)parent_data_pointer, pack_len); - - if( 0 != rc ) { - return OMPI_ERROR; - } - - }else{ - input_args->result_in_rbuf = false; - /* Interior node */ - - /* Get parent payload data and control data */ - parent_data_pointer = data_buffs[my_fanout_parent].payload; - parent_ctl_pointer = data_buffs[my_fanout_parent].ctl_struct; - - - /* Wait until parent signals that data is ready */ - /* The order of conditions checked in this loop is important, as it can - * result in a race condition. - */ - while (!IS_PEER_READY(parent_ctl_pointer, ready_flag, sequence_number, BCAST_FLAG, bcol_id)){ - opal_progress(); - } - - /* Copy the rank to a shared buffer writable by the current rank */ - memcpy(data_addr, (void *)parent_data_pointer,pack_len); - - /* Signal to children that they may read the data from my shared buffer */ - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAG][bcol_id] = ready_flag; - } - - /* if I am the last instance of a basesmuma function in this collectie, - * release the resrouces */ - - my_ctl_pointer->starting_flag_value[bcol_id]++; - - return rc; -} - - -/*zero-copy large massage communication methods*/ -#if 0 -int bcol_basesmuma_hdl_zerocopy_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int group_size, process_shift, my_node_index; - int my_rank, first_instance=0, flag_offset; - int rc = OMPI_SUCCESS; - int my_fanout_parent; - int leading_dim, buff_idx, idx; - volatile int64_t ready_flag; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int root=input_args->root; - int64_t sequence_number=input_args->sequence_num; - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - - netpatterns_tree_node_t* my_fanout_read_tree; - size_t pack_len = 0, dt_size; - - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr); - - struct mca_hdl_base_descriptor_t *hdl_desc; - struct mca_hdl_base_segment_t *hdl_seg; - int ret, completed, ridx/*remote rank index*/; - bool status; - volatile mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer= NULL; - volatile mca_bcol_basesmuma_ctl_struct_t *parent_ctl_pointer= NULL; - volatile mca_bcol_basesmuma_ctl_struct_t *child_ctl_pointer= NULL; - struct mca_hdl_base_module_t* hdl = bcol_module->hdl_module[0]; - - - /* we will work only on packed data - so compute the length*/ - ompi_datatype_type_size(dtype, &dt_size); - pack_len = count * dt_size; - - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - ctl_structs = (volatile mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_with_user_data.ctl_buffs+idx; - my_ctl_pointer = ctl_structs[my_rank]; - - /* Align node index to around sbgp root */ - process_shift = root; - my_node_index = my_rank - root; - if(0 > my_node_index ) { - my_node_index += group_size; - } - - /* get my node for the bcast tree */ - my_fanout_read_tree = &(bcol_module->fanout_read_tree[my_node_index]); - my_fanout_parent = my_fanout_read_tree->parent_rank + process_shift; - if(group_size <= my_fanout_parent){ - my_fanout_parent -= group_size; - } - - /* setup resource recycling */ - if( my_ctl_pointer->sequence_number < sequence_number ) { - first_instance = 1; - } - - if( first_instance ) { - /* Signal arrival */ - my_ctl_pointer->flag = -1; - my_ctl_pointer->index = 1; - /* this does not need to use any flag values , so only need to - * set the value for subsequent values that may need this */ - my_ctl_pointer->starting_flag_value = 0; - flag_offset = 0; - } else { - /* only one thread at a time will be making progress on this - * collective, so no need to make this atomic */ - my_ctl_pointer->index++; - } - - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - my_ctl_pointer->sequence_number = sequence_number; - - hdl_desc = (mca_hdl_base_descriptor_t *) - malloc (sizeof (mca_hdl_base_descriptor_t) * 1); - - /*prepare a hdl data segment*/ - hdl_seg = (mca_hdl_base_segment_t*) - malloc ( sizeof (mca_hdl_base_segment_t) * 1); - hdl_seg->seg_addr.pval = input_args->sbuf; - hdl_seg->seg_len = pack_len; - - - hdl->endpoint->ready_flag = ready_flag; - hdl->endpoint->local_ctrl = my_ctl_pointer; - hdl->endpoint->sbgp_contextid = - bcol_module->super.sbgp_partner_module->group_comm->c_contextid; - - /* - * Fan out from root - */ - if(ROOT_NODE == my_fanout_read_tree->my_node_type) { - input_args->result_in_rbuf = false; - - hdl_desc->des_src = hdl_seg; - hdl_desc->des_src_cnt = 1; - hdl_desc->isroot = true; - - /*As the general semantics, there might multiple pairs of send/recv - *on the topology tree*/ - for (ridx = 0; ridx < my_fanout_read_tree->n_children; ridx++) { - child_ctl_pointer = - ctl_structs[my_fanout_read_tree->children_ranks[ridx]]; - hdl->endpoint->remote_ctrl = child_ctl_pointer; - ret = hdl->hdl_send(hdl, hdl->endpoint, hdl_desc); - if (ret != OMPI_SUCCESS) { - BASESMUMA_VERBOSE(1, ("send eror on rank %d ........", my_rank)); - goto exit_ERROR; - } - } - }else if(LEAF_NODE == my_fanout_read_tree->my_node_type) { - input_args->result_in_rbuf = false; - /* - * Get parent payload data and control data. - * Get the pointer to the base address of the parent's payload buffer. - * Get the parent's control buffer. - */ - parent_ctl_pointer = ctl_structs[my_fanout_parent]; - - hdl_desc->des_dst = hdl_seg; - hdl_desc->des_dst_cnt = 1; - hdl_desc->isroot = false; - hdl->endpoint->remote_ctrl = parent_ctl_pointer; - -#if __TEST_BLOCKING__ - ret = hdl->hdl_recv(hdl, hdl->endpoint, hdl_desc); -#else - ret = hdl->hdl_recvi(hdl, hdl->endpoint, NULL, 0, 0, &hdl_desc); -#endif - -#if __TEST_WAIT__ - ret = hdl->hdl_wait(hdl, hdl->endpoint, hdl_desc); - BASESMUMA_VERBOSE(1,("wait on rank %d is done!", my_rank)); -#endif - if (OMPI_SUCCESS != ret) { - BASESMUMA_VERBOSE(1, ("recvi eror on rank %d ........", my_rank)); - goto exit_ERROR; - } - - status = false; -#if __TEST_TEST__ - while (!status) { - hdl->hdl_test(&hdl_desc, &completed, &status); - opal_progress(); - BASESMUMA_VERBOSE(1, ("test on rank %d ........", my_rank)); - } -#endif - - goto Release; - - }else{ - input_args->result_in_rbuf = false; - /* Interior node */ - - /* Get parent payload data and control data */ - parent_ctl_pointer = ctl_structs[my_fanout_parent]; - - hdl_desc->des_dst = hdl_seg; - hdl_desc->des_dst_cnt = 1; - hdl_desc->isroot = false; - - hdl->endpoint->remote_ctrl = parent_ctl_pointer; - - ret = hdl->hdl_recv(hdl, hdl->endpoint, hdl_desc); - if (OMPI_SUCCESS != ret) { - goto exit_ERROR; - } - if (OMPI_SUCCESS != ret) { - BASESMUMA_VERBOSE(1, ("recvi eror on rank %d ........", my_rank)); - goto exit_ERROR; - } - - /* Signal to children that they may read the data from my shared buffer */ - opal_atomic_wmb (); - hdl_desc->des_src = hdl_seg; - hdl_desc->des_src_cnt = 1; - for (ridx = 0; ridx < my_fanout_read_tree->n_children; ridx++) { - child_ctl_pointer = - ctl_structs[my_fanout_read_tree->children_ranks[ridx]]; - hdl->endpoint->remote_ctrl = child_ctl_pointer; - - ret = hdl->hdl_send(hdl, hdl->endpoint, hdl_desc); - if (ret != OMPI_SUCCESS) { - BASESMUMA_VERBOSE(1, ("send eror on rank %d ........", my_rank)); - goto exit_ERROR; - } - } - goto Release; - } - - Release: - /* if I am the last instance of a basesmuma function in this collectie, - * release the resrouces */ - if (IS_LAST_BCOL_FUNC(c_input_args)) { - rc = bcol_basesmuma_free_buff( - &(bcol_module->colls_with_user_data), - sequence_number); - } - - my_ctl_pointer->starting_flag_value += 1; - - return BCOL_FN_COMPLETE; - exit_ERROR: - return OMPI_ERROR; -} -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast_prime.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast_prime.c deleted file mode 100644 index 4bb451f907c..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast_prime.c +++ /dev/null @@ -1,895 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -#include "bcol_basesmuma_utils.h" -#include "bcol_basesmuma.h" - -/* debug - * #include "opal/sys/timer.h" - * - * extern uint64_t timers[7]; - * end debug */ - -/* debug */ -#include -/* end debug */ - -/* includes shared memory optimization */ - -#define BCOL_BASESMUMA_SM_PROBE(src_list, n_src, my_index, matched, src) \ - do { \ - int j; \ - for( j = 0; j < n_src; j++) { \ - parent_ctl_pointer = data_buffs[src_list[j]].ctl_struct; \ - parent_data_pointer = data_buffs[src_list[j]].payload; \ - if( IS_DATA_READY(parent_ctl_pointer,ready_flag,sequence_number)) { \ - src = src_list[j]; \ - matched = 1; \ - break; \ - } \ - } \ - } while(0) - -/* - #define IS_LARGE_DATA_READY(peer, my_flag, my_sequence_number) \ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[BCAST_FLAG] >= (my_flag) \ - )? true : false ) -*/ - -/* - #define IS_KNOWN_ROOT_DATA_READY(peer, my_flag, my_sequence_number) \ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[BCAST_FLAG][bcol_id] >= (my_flag) \ - )? true : false ) -*/ - -#define BCOL_BASESMUMA_SM_LARGE_MSG_PROBE(src_list, n_src, my_index, matched, src, flag_index, bcol_id) \ - do { \ - int j; \ - for( j = 0; j < n_src; j++) { \ - /* fprintf(stderr,"my_rank %d and %d\n",my_rank,1); */ \ - if(src_list[j] != -1) { \ - parent_ctl_pointer = ctl_structs[src_list[j]]; \ - parent_data_pointer = (void *) data_buffs[src_list[j]].ctl_struct; \ - /*fprintf(stderr,"my_rank %d ready flag %d partner flag %d and %d\n",my_rank,ready_flag,parent_ctl_pointer->flag,2); */ \ - if( IS_PEER_READY(parent_ctl_pointer,ready_flag,sequence_number, flag_index, bcol_id)) { \ - src = src_list[j]; \ - matched = 1; \ - index = j; \ - /* fprintf(stderr,"found it from %d!\n",src);*/ \ - break; \ - } \ - } \ - } \ - } while(0) - -#define K_NOMIAL_DATA_SRC(radix, my_group_index, group_size, group_root, data_src, radix_mask) \ - do { \ - int relative_rank = (my_group_index >= group_root) ? my_group_index - group_root : \ - my_group_index - group_root + group_size; \ - radix_mask = 1; \ - while (radix_mask < group_size) { \ - if (relative_rank % (radix * radix_mask)) { \ - data_src = relative_rank/(radix * radix_mask) * (radix * radix_mask) + group_root; \ - if (data_src >= group_size) data_src -= group_size; \ - break; \ - } \ - radix_mask *= radix; \ - } \ - } while (0) - -int bcol_basesmuma_bcast_k_nomial_knownroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - int i, matched = 0; - int group_size; - int my_rank; - int leading_dim, - buff_idx, - idx; - int count = input_args->count; - struct ompi_datatype_t* dtype = input_args->dtype; - int64_t sequence_number = input_args->sequence_num; - int radix = - mca_bcol_basesmuma_component.k_nomial_radix; - int radix_mask; - int16_t data_src = -1; - - volatile int8_t ready_flag; - int bcol_id = (int) bcol_module->super.bcol_id; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char* parent_data_pointer; - volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - - size_t pack_len = 0; - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr + - input_args->sbuf_offset); - -#if 0 - fprintf(stderr,"Entering nb-sm broadcast input_args->sbuf_offset %d \n",input_args->sbuf_offset); - fflush(stderr); -#endif - - - /* we will work only on packed data - so compute the length*/ - BASESMUMA_VERBOSE(3, ("Calling bcol_basesmuma_bcast_k_nomial_knownroot")); - - pack_len = mca_bcol_base_get_buff_length(dtype, count); - /* Some hierarchical algorithms have data that is accumulated at each step - * this factor accounts for this - */ - pack_len = pack_len*input_args->hier_factor; - buff_idx = input_args->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx = SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs + idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* setup resource recycling */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - /* removing dependence on sequence number */ - /* I believe this is resolved now with the signaling flags */ - /* - ready_temp = 1 + (int8_t) flag_offset + (int8_t) bcol_id; - if( ready_temp >= my_ctl_pointer->flags[BCAST_FLAG][bcol_id]) { - ready_flag = ready_temp; - } else { - ready_flag = my_ctl_pointer->flags[BCAST_FLAG][bcol_id]; - } - opal_atomic_wmb (); - my_ctl_pointer->sequence_number = sequence_number; - */ - - - /* non-blocking broadcast algorithm */ - - /* If I am the root, then signal ready flag */ - if(input_args->root_flag) { - BASESMUMA_VERBOSE(10,("I am the root of the data")); - /* - * signal ready flag - */ - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAG][bcol_id] = ready_flag; - - /* root is finished */ - goto Release; - } - - - /* Calculate source of the data */ - K_NOMIAL_DATA_SRC(radix, my_rank, group_size, - input_args->root_route->rank, data_src, radix_mask); - - - parent_ctl_pointer = data_buffs[data_src].ctl_struct; - parent_data_pointer = data_buffs[data_src].payload; - - for( i = 0; i < cs->num_to_probe && 0 == matched; i++) { - - if(IS_PEER_READY(parent_ctl_pointer,ready_flag,sequence_number, BCAST_FLAG, bcol_id)) { - matched = 1; - break; - } - } - - /* If not matched, then hop out and put me on progress list */ - if(0 == matched ) { - BASESMUMA_VERBOSE(10,("Shared memory probe didn't find a match")); - return BCOL_FN_NOT_STARTED; - } - - /* else, we found our root within the group ... */ - BASESMUMA_VERBOSE(10,("Shared memory probe was matched, the root is %d", data_src)); - - /* copy the data */ - memcpy(data_addr, (void *) parent_data_pointer, pack_len); - /* set the memory barrier to ensure completion */ - opal_atomic_wmb (); - /* signal that I am done */ - my_ctl_pointer->flags[BCAST_FLAG][bcol_id] = ready_flag; - - - Release: - my_ctl_pointer->starting_flag_value[bcol_id]++; - return BCOL_FN_COMPLETE; -} - - -/** - * Shared memory non-blocking Broadcast - K-nomial fan-out for small data buffers. - * This routine assumes that buf (the input buffer) is a single writer - * multi reader (SWMR) shared memory buffer owned by the calling rank - * which is the only rank that can write to this buffers. - * It is also assumed that the buffers are registered and fragmented - * at the ML level and that buf is sufficiently large to hold the data. - * - * - * @param buf - SWMR shared buffer within a sbgp that the - * executing rank can write to. - * @param count - the number of elements in the shared buffer. - * @param dtype - the datatype of a shared buffer element. - * @param root - the index within the sbgp of the root. - * @param module - basesmuma module. - */ -int bcol_basesmuma_bcast_k_nomial_anyroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - int i; - int group_size; - int my_rank; - int leading_dim, buff_idx, idx; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int64_t sequence_number=input_args->sequence_num; - int radix = cs->k_nomial_radix; - int radix_mask; - int relative_rank; - int pow_k_group_size; - - volatile int8_t ready_flag; - int bcol_id = (int) bcol_module->super.bcol_id; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile void* parent_data_pointer; - - volatile mca_bcol_basesmuma_header_t *child_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - - size_t pack_len = 0; - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr + - input_args->sbuf_offset); - -#if 0 - fprintf(stderr,"Entering nb-sm broadcast input_args->sbuf_offset %d \n",input_args->sbuf_offset); - fflush(stderr); -#endif - - - - /* we will work only on packed data - so compute the length*/ - pack_len = mca_bcol_base_get_buff_length(dtype, count); - - buff_idx = input_args->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - /* get pow_k_levels and pow_k_group_size */ - pow_k_group_size = bcol_module->pow_k; - - - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - - /* non-blocking broadcast algorithm */ - - /* If I am the root, then signal ready flag */ - if(input_args->root_flag) { - - BASESMUMA_VERBOSE(10,("I am the root of the data")); - /* - * set the radix_mask */ - radix_mask = pow_k_group_size; - /* send to children */ - opal_atomic_wmb (); - BASESMUMA_K_NOMIAL_SEND_CHILDREN(radix_mask, - radix,0, - my_rank,group_size, ready_flag); - /* root is finished */ - goto Release; - } - - /* If I am not the root, then poll on possible "senders'" control structs */ - for( i = 0; i < cs->num_to_probe; i++) { - - if( ready_flag == my_ctl_pointer->flags[BCAST_FLAG][bcol_id]) { - - /* else, we found our root within the group ... */ - parent_data_pointer = data_buffs[my_ctl_pointer->src].payload; - BASESMUMA_VERBOSE(5,("%d found it from %d \n",my_rank,my_ctl_pointer->src)); - /* memcopy the data */ - memcpy(data_addr, (void *) parent_data_pointer, pack_len); - /* compute my relative rank */ - relative_rank = (my_rank - my_ctl_pointer->src) < 0 ? my_rank - - my_ctl_pointer->src + group_size : my_rank - my_ctl_pointer->src; - - /* compute my radix mask */ - radix_mask = 1; - while(radix_mask < group_size ){ - if( 0 != relative_rank % (radix*radix_mask)) { - /* found it */ - break; - } - radix_mask *= radix; - } - /* go one step back */ - radix_mask /= radix; - - /* send to children */ - opal_atomic_wmb (); - BASESMUMA_K_NOMIAL_SEND_CHILDREN(radix_mask, - radix, relative_rank, - my_rank, group_size, ready_flag); - /* bail */ - - goto Release; - } - - } - - - - /* If not matched, then hop out and put me on progress list */ - BASESMUMA_VERBOSE(10,("Shared memory probe didn't find a match")); - /*fprintf(stderr,"bcol_id %d Not started\n",bcol_id);*/ - return BCOL_FN_NOT_STARTED; - - - - Release: - - - my_ctl_pointer->starting_flag_value[bcol_id]++; - - return BCOL_FN_COMPLETE; -} - - -/* non-blocking binary scatter allgather anyroot algorithm for large data - * broadcast - */ - - -#if 0 -/* prototype code for shared memory scatter/allgather algorithm. Signaling scheme - * works, should be used as a reference for other types of shared memory scatter/allgather - * algorithms. - */ -int bcol_basesmuma_binary_scatter_allgather_segment(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - - /* local variables */ - int i, j; - int length; - int start; - int my_rank, parent_rank; - int partner; - int src = -1; - int matched = 0; - int group_size; - int first_instance=0; - int leading_dim, buff_idx, idx; - int64_t sequence_number=input_args->sequence_num; - - int64_t ready_flag; - int64_t local_offset; - - int flag_offset; - int pow_2, pow_2_levels; - int index = -1; - - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - mca_bcol_basesmuma_module_t *bcol_module = - (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - /* use the old control structs for large messages, - * otherwise we will destroy the shared memory - * optimization - */ - mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer; - mca_bcol_basesmuma_ctl_struct_t *parent_ctl_pointer; /* binomial fanout */ - mca_bcol_basesmuma_ctl_struct_t *partner_ctl_pointer; /* recursive double */ - - /* for now, we use the payload buffer for single fragment */ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile void *parent_data_pointer; /* binomial scatter */ - volatile void *partner_data_pointer; /* recursive double */ - - uint32_t fragment_size; /* ml buffer size for now */ - - /* we will transfer the entire buffer, - * so start at the base address of the ml buffer - */ - void *data_addr = (void *) ((unsigned char *) input_args->src_desc->base_data_addr); -#if 0 - fprintf(stderr,"AAA Entering nb-sm large msg broadcast input_args->frag_size %d \n",input_args->frag_size); - fflush(stderr); -#endif - - buff_idx = input_args->src_desc->buffer_index; - - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - - /* get the largest power of two that is smaller than - * or equal to the group size - */ - pow_2_levels = bcol_module->pow_2_levels; - pow_2 = bcol_module->pow_2; - - /* get the fragment size - */ - - /* still just the size of the entire buffer */ - fragment_size = input_args->buffer_size; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - my_rank = bcol_module->super.sbgp_partner_module->my_index; - - - /* grab the control structs */ - ctl_structs = (mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_with_user_data.ctl_buffs+idx; - - /* grab the data buffs */ - data_buffs = (mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - my_ctl_pointer = ctl_structs[my_rank]; - - if(my_ctl_pointer->sequence_number < sequence_number) { - first_instance = 1; - } - - if(first_instance) { - my_ctl_pointer->flag = -1; - my_ctl_pointer->index = 1; - - my_ctl_pointer->starting_flag_value = 0; - - flag_offset = 0; - - } else { - - my_ctl_pointer->index++; - } - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - - my_ctl_pointer->sequence_number = sequence_number; - - /* am I the root */ - if(input_args->root_flag) { - /* if I've already been here, then - * hop down to the allgather - */ - if(ALLGATHER == my_ctl_pointer->status) { - goto Allgather; - } - BASESMUMA_VERBOSE(10,("I am the root of the data")); - /* debug print */ - /*fprintf(stderr,"I am the root %d\n",my_rank);*/ - /* - * signal ready flag - */ - /* set the offset into the buffer */ - my_ctl_pointer->offset = 0; - /* how many children do I have */ - my_ctl_pointer->n_sends = pow_2_levels; - /* my data length */ - my_ctl_pointer->length = fragment_size; - - /* important that these be set before my children - * see the ready flag raised - */ - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - - /* root is finished */ - if( my_rank < pow_2 ) { - /* if I'm in the power of two group, - * then goto the allgather - */ - my_ctl_pointer->status = ALLGATHER; - goto Allgather; - - } else { - - /* if I'm not, then I'm done and release */ - goto Release; - } - - } - - /* what phase am I participating in - */ - switch(my_ctl_pointer->status) { - - case SCATTER: - goto Scatter; - break; - - case ALLGATHER: - goto Allgather; - break; - - case EXTRA_RANK: - goto Extra; - break; - - default: - break; - } - - - Extra: - /* am I part of the non-power-of-2 group */ - if( my_rank >= pow_2 ) { - /* find parent to copy from */ - parent_rank = my_rank&(pow_2-1); - parent_ctl_pointer = ctl_structs[parent_rank]; - /* start at the base */ - parent_data_pointer = (void *) data_buffs[parent_rank].ctl_struct; - - /* now, I need to do some arithmetic to - * arrive at the value everyone else does - * when they have completed the algorithm - */ - - /* compute ready flag value to poll on */ - ready_flag = ready_flag + pow_2_levels; - - /* start to poll */ - for( i = 0; i< cs->num_to_probe; i++) { - if(IS_LARGE_DATA_READY(parent_ctl_pointer,ready_flag, sequence_number)) { - /* copy the data and bail */ - memcpy(data_addr,(void *)parent_data_pointer,fragment_size); - goto Release; - } - /* - else { - opal_progress(); - } - */ - } - my_ctl_pointer->status = EXTRA_RANK; - - /* hop out and put me onto a progress queue */ - return BCOL_FN_NOT_STARTED; - } - - Scatter: - - /* on first entry, compute the list of possible sources */ - if( NULL == my_ctl_pointer->src_ptr ) { - my_ctl_pointer->src_ptr = (int *) malloc(sizeof(int)*(pow_2_levels+1)); - - for( i = 0; i < pow_2_levels; i++) { - my_ctl_pointer->src_ptr[i] = my_rank ^ (1<src_ptr[i] = my_rank + pow_2; - } else { - /* no extra rank to worry about */ - my_ctl_pointer->src_ptr[i] = -1; - } - } - - /* If I am not the root, then poll on possible "senders'" control structs */ - for( i = 0; i < cs->num_to_probe && 0 == matched; i++) { - - /* Shared memory iprobe */ - BCOL_BASESMUMA_SM_LARGE_MSG_PROBE(my_ctl_pointer->src_ptr, pow_2_levels+1, - my_rank, matched, src); - } - - /* If not matched, then hop out and put me on progress list */ - if(0 == matched ) { - - BASESMUMA_VERBOSE(10,("Shared memory probe didn't find a match")); - - my_ctl_pointer->status = SCATTER; - return BCOL_FN_NOT_STARTED; - - } else if ( src >= pow_2 ){ - - /* If matched from an extra rank, then get the whole message from partner */ - memcpy((void *) data_addr, (void *) parent_data_pointer, - parent_ctl_pointer->length); - - /* now I am the psuedo-root in the power-of-two group */ - my_ctl_pointer->offset = 0; - my_ctl_pointer->length = parent_ctl_pointer->length; - my_ctl_pointer->n_sends = parent_ctl_pointer->n_sends; - - /* set the memory barrier */ - opal_atomic_wmb (); - - /* fire the ready flag */ - my_ctl_pointer->flag = ready_flag; - my_ctl_pointer->status = ALLGATHER; - /* go to the allgather */ - goto Allgather; - } - - - /* we need to see whether this is really - * who we are looking for - */ - for( i = 0; i < parent_ctl_pointer->n_sends; i++) { - /* debug print */ - /* - fprintf(stderr,"I am %d checking on a hit from %d with n_sends %d\n",my_rank,src,parent_ctl_pointer->n_sends); - fflush(stderr); - */ - /* end debug */ - if( my_rank == (src^(1<n_sends = i; - - if ( i > 0) { - /* compute the size of the chunk to copy */ - length = (parent_ctl_pointer->length)/ - (1<<(parent_ctl_pointer->n_sends - my_ctl_pointer->n_sends)); - my_ctl_pointer->length = length; - my_ctl_pointer->offset = - parent_ctl_pointer->offset+length; - - /*fprintf(stderr,"%d's offset %d and length %d \n",my_rank,my_ctl_pointer->offset,length);*/ - - /* now we can copy the data */ - memcpy((void *) ((uint64_t) data_addr+my_ctl_pointer->offset), - (void *) ((uint64_t) parent_data_pointer+(uint64_t) parent_ctl_pointer->offset + - (uint64_t) length), - (size_t)length); - } else { - /* this "trick" takes care of the first level - * of recurssive doubling - */ - length = parent_ctl_pointer->length/ - (1<<(parent_ctl_pointer->n_sends - 1)); - my_ctl_pointer->length = length; - my_ctl_pointer->offset = parent_ctl_pointer->offset; - - /*fprintf(stderr,"%d's offset %d and length %d\n",my_rank,my_ctl_pointer->offset,length);*/ - /* now we can copy the data */ - memcpy((void *) ((uint64_t) data_addr+my_ctl_pointer->offset), - (void *) ((uint64_t) parent_data_pointer+(uint64_t) my_ctl_pointer->offset), - (size_t)length); - } - /* set the memory barrier to ensure completion */ - opal_atomic_wmb (); - /* signal that I am done */ - my_ctl_pointer->flag = ready_flag; - /* set my status */ - my_ctl_pointer->status = ALLGATHER; - /* time for allgather phase */ - goto Allgather; - } - - } - - /* this is not who we are looking for, - * mark as false positive so we don't - * poll here again - */ - my_ctl_pointer->src_ptr[index] = -1; - /* probably we should jump out and put onto progress list */ - my_ctl_pointer->status = SCATTER; - return BCOL_FN_NOT_STARTED; - - Allgather: - - /* zip it back up - we have already taken care of first level */ - /* needed for non-blocking conditional */ - matched = 0; - - /* get my local_offset */ - local_offset = my_ctl_pointer->offset; - - /* bump the ready flag */ - ready_flag++; - - /* first level of zip up */ - length = 2*fragment_size/pow_2; - - /* first level of zip-up - * already includes first level of - * recursive doubling - */ - start = 1; - - /* for non-blocking, check to see if I need to reset the state */ - if(my_ctl_pointer->flag >= ready_flag) { - /* then reset the state */ - ready_flag = my_ctl_pointer->flag; - start = my_ctl_pointer->start; - /* get the local offset */ - local_offset = my_ctl_pointer->offset_zip; - /* compute the correct length */ - length = length*(1<<(start - 1)); - /* careful! skip over the opal_atomic_wmb () to avoid the - * cost on every re-entry - */ - goto Loop; - } - - - opal_atomic_wmb (); - /* I am ready, set the flag */ - my_ctl_pointer->flag = ready_flag; - - Loop: - - for( i = start; i < pow_2_levels; i++) { - /* get my partner for this level */ - partner = my_rank^(1<num_to_probe && matched == 0; j++) { - if(IS_LARGE_DATA_READY(partner_ctl_pointer, ready_flag, sequence_number)) { - - /* debug prints - fprintf(stderr,"666 I am %d and sequence num is %d partner is %d ready_flag %d parent ready_flag %d buff_idx %d partner_offset %d\n", - my_rank,sequence_number,partner, ready_flag,partner_ctl_pointer->flag,buff_idx,partner_ctl_pointer->offset); - */ - /* debug print */ -#if 0 - fprintf(stderr,"I am %d and sequence num is %d partner is %d ready_flag %d parent ready_flag %d buff_idx %d \n", - my_rank,sequence_number,partner, ready_flag,parent_ctl_pointer->flag,buff_idx); -#endif - /* end debug prints */ - - assert(partner_ctl_pointer->flag >= ready_flag); - /* found it */ - matched = 1; - /* only copy it, if you sit at a lower level in the tree */ - if( my_ctl_pointer->n_sends <= partner_ctl_pointer->n_sends ) { - - /* calculate the local offset based on partner's remote offset */ - if( partner_ctl_pointer->offset < my_ctl_pointer->offset ) { - /* then I'm looking "up" the tree */ - local_offset -= length; - /* debug print */ - /*fprintf(stderr,"I am %d and partner is %d partner offset %d length %d \n",my_rank,partner, local_offset,length);*/ - /* end debug */ - memcpy((void *) ((uint64_t) data_addr + (uint64_t) local_offset), - (void *) ((uint64_t) partner_data_pointer + (uint64_t) local_offset), - length); - } else { - /* I'm looking "down" the tree */ - local_offset += length; - /* debug print */ - /*fprintf(stderr,"I am %d and partner is %d partner offset %d length %d \n",my_rank,partner, local_offset,length);*/ - /* end debug */ - memcpy((void *) ((uint64_t) data_addr + (uint64_t) local_offset), - (void *) ((uint64_t) partner_data_pointer + (uint64_t) local_offset), - length); - /* reset my local offset */ - local_offset -= length; - } - - } - /* bump the ready flag */ - ready_flag++; - /* ensure completion */ - opal_atomic_wmb (); - - /* fire the flag for the next level */ - my_ctl_pointer->flag = ready_flag; - - /* double the length */ - length *= 2; - } - } - /* check to see what kind of progress I've made */ - if( 0 == matched ) { - /* save state, hop out and try again later */ - my_ctl_pointer->start = i; - /* save the local offset */ - my_ctl_pointer->offset_zip = local_offset; - /* put in progress queue */ - return BCOL_FN_STARTED; - } - /* else, start next level of recursive doubling */ - matched = 0; - - } - - - /* cleanup */ - if(NULL != my_ctl_pointer->src_ptr) { - free(my_ctl_pointer->src_ptr); - my_ctl_pointer->src_ptr = NULL; - } - - Release: - - - /* If I am the last instance, release the resource */ - /* - if( IS_LAST_BCOL_FUNC(c_input_args)) { - rc = bcol_basesmuma_free_buff( - &(bcol_module->colls_with_user_data), - sequence_number); - } - */ - - my_ctl_pointer->starting_flag_value++; - my_ctl_pointer->status = FINISHED; - return BCOL_FN_COMPLETE; - -} -#endif - -#if 0 -int mca_bcol_basesmuma_bcast_binomial_scatter_allgather(void *desc) -{ - /* local variables */ - int rc, n_frags_sent; - uint32_t stripe_number; - int count, count_processed; - size_t dt_size; - uint32_t n_data_segments_to_schedule; - ompi_datatype_t *dtype; - message_descriptor_t *message_descriptor; - mca_bcol_basesmuma_module_t *bcol_module; - int pipe_depth; - - - /* get the full message descriptor */ - - - /* compute the number of fragments to send */ - - - /* start to fill the pipeline */ - - - return OMPI_SUCCESS; - - - - -} -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_buf_mgmt.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_buf_mgmt.c deleted file mode 100644 index 1a65b5cb015..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_buf_mgmt.c +++ /dev/null @@ -1,485 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. - * All rights reserved. - * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/patterns/comm/coll_ops.h" - -#include "opal/dss/dss.h" - -#include "bcol_basesmuma.h" -/* - * With support for nonblocking collectives, we don't have an upper - * limit on the number of outstanding collectives per communicator. - * Also, since we want to avoid communication to figure out which - * buffers other ranks in the group will use, we will rely on the - * fact that collective operations are called in the same order - * in each process, to assign a unique ID to each collective operation. - * We use this to create a static mapping from the index to the buffer - * that will be used. Also, because there is no limit to the number of - * outstanding collective operations, we use a generation index for each - * memory bank, so the collective will use the buffer only when the - * correct generation of the bank is ready for use. - */ -int bcol_basesmuma_get_buff_index( sm_buffer_mgmt *buff_block, - uint64_t buff_id ) -{ - /* local variables */ - int memory_bank; - uint64_t generation; - int index=-1; - - - /* get the bank index that will be used */ - memory_bank=buff_id& buff_block->mask; - memory_bank = memory_bank SHIFT_DOWN buff_block->log2_num_buffs_per_mem_bank; - - /* get the generation of the bank this maps to */ - generation = buff_id SHIFT_DOWN (buff_block->log2_number_of_buffs); - - /* check to see if the bank is available */ - if( generation == buff_block->ctl_buffs_mgmt[memory_bank]. - bank_gen_counter ) { - - /* get the buffer index that will be returned */ - index=buff_id & buff_block->mask; - - /* no in-use counter increment, as the mapping is static, and - * all we need to know if the number of collectives that complete */ - - } else { - /* progress communications so that resources can be freed up */ - opal_progress(); - } - - /* return */ - return index; -} - -/* release the shared memory buffers - * buf_id is the unique ID assigned to the particular buffer - */ -int bcol_basesmuma_free_buff( sm_buffer_mgmt * buff_block, - uint64_t buff_id ) -{ - /* local variables */ - int ret=OMPI_SUCCESS; - int memory_bank; - uint64_t generation; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - - /* get the bank index that will be used */ - memory_bank=buff_id& buff_block->mask; - memory_bank = memory_bank SHIFT_DOWN buff_block->log2_num_buffs_per_mem_bank; - - /* get the generation of the bank this maps to */ - generation = buff_id SHIFT_DOWN (buff_block->log2_number_of_buffs); - - /* the generation counter should not change until all resrouces - * associated with this bank have been freed. - */ - assert(generation == buff_block->ctl_buffs_mgmt[memory_bank].bank_gen_counter); - - /* - * increment counter of completed buffers - */ - OPAL_THREAD_ADD32(&(buff_block->ctl_buffs_mgmt[memory_bank].n_buffs_freed), - 1); - - /* - * If I am the last to checkin - initiate resource recycling - */ - if( buff_block->ctl_buffs_mgmt[memory_bank].n_buffs_freed == - buff_block->ctl_buffs_mgmt[memory_bank].number_of_buffers ) { - - /* Lock to ensure atomic recycling of resources */ - OPAL_THREAD_LOCK(&(buff_block->ctl_buffs_mgmt[memory_bank].mutex)); - - /* make sure someone else did not already get to this */ - if( buff_block->ctl_buffs_mgmt[memory_bank].n_buffs_freed != - buff_block->ctl_buffs_mgmt[memory_bank].number_of_buffers ) { - /* release lock and exit */ - OPAL_THREAD_UNLOCK(&(buff_block->ctl_buffs_mgmt[memory_bank].mutex)); - } else { - sm_nbbar_desc_t *p_sm_nb_desc = NULL; - /* initiate the freeing of resources. Need to make sure the other - * ranks in the group are also done with their resources before this - * block is made available for use again. - * No one else will try to allocate from this block or free back to - * this block until the next genration counter has been incremented, - * so will just reset the number of freed buffers to 0, so no one else - * will try to also initialize the recycling of these resrouces - */ - buff_block->ctl_buffs_mgmt[memory_bank].n_buffs_freed=0; - - /* Start the nonblocking barrier */ - p_sm_nb_desc = &(buff_block->ctl_buffs_mgmt[memory_bank].nb_barrier_desc); - p_sm_nb_desc->coll_buff = buff_block; - bcol_basesmuma_rd_nb_barrier_init_admin(p_sm_nb_desc); - - if( NB_BARRIER_DONE != - buff_block->ctl_buffs_mgmt[memory_bank]. - nb_barrier_desc.collective_phase) { - - opal_list_t *list=&(cs->nb_admin_barriers); - opal_list_item_t *append_item; - - /* put this onto the progression list */ - OPAL_THREAD_LOCK(&(cs->nb_admin_barriers_mutex)); - append_item=(opal_list_item_t *) - &(buff_block->ctl_buffs_mgmt[memory_bank].nb_barrier_desc); - opal_list_append(list,append_item); - OPAL_THREAD_UNLOCK(&(cs->nb_admin_barriers_mutex)); - /* progress communications so that resources can be freed up */ - opal_progress(); - } else { - /* mark the block as available */ - (buff_block->ctl_buffs_mgmt[memory_bank].bank_gen_counter)++; - } - - /* get out of here */ - OPAL_THREAD_UNLOCK(&(buff_block->ctl_buffs_mgmt[memory_bank].mutex)); - } - - } - - /* return */ - return ret; -} - -/* - * Allocate buffers for storing non-blocking collective descriptions, required - * for making code re-entrant - * - */ -static int init_nb_coll_buff_desc(mca_bcol_basesmuma_nb_coll_buff_desc_t **desc, - void *base_addr, uint32_t num_banks, - uint32_t num_buffers_per_bank, - uint32_t size_buffer, - uint32_t header_size, - int group_size, - int pow_k) -{ - uint32_t i, j, ci; - mca_bcol_basesmuma_nb_coll_buff_desc_t *tmp_desc = NULL; - int k_nomial_radix = mca_bcol_basesmuma_component.k_nomial_radix; - int pow_k_val = (0 == pow_k) ? 1 : pow_k; - int num_to_alloc = (k_nomial_radix - 1) * pow_k_val * 2 + 1 ; - - - *desc = (mca_bcol_basesmuma_nb_coll_buff_desc_t *)calloc(num_banks * num_buffers_per_bank, sizeof(mca_bcol_basesmuma_nb_coll_buff_desc_t)); - if (NULL == *desc) { - return OMPI_ERROR; - } - - tmp_desc = *desc; - - for (i = 0; i < num_banks; i++) { - for (j = 0; j < num_buffers_per_bank; j++) { - ci = i * num_buffers_per_bank + j; - tmp_desc[ci].bank_index = i; - tmp_desc[ci].buffer_index = j; - /* *2 is for gather session +1 for extra peer */ - tmp_desc[ci].requests = (ompi_request_t **) - calloc(num_to_alloc, sizeof(ompi_request_t *)); - tmp_desc[ci].data_addr = (void *) - ((unsigned char*)base_addr + ci * size_buffer + header_size); - BASESMUMA_VERBOSE(10, ("ml memory cache setup %d %d - %p", i, j, tmp_desc[ci].data_addr)); - } - } - - return OMPI_SUCCESS; -} - - -/* - * Free buffers for storing non-blocking collective descriptions. - * - */ -void cleanup_nb_coll_buff_desc(mca_bcol_basesmuma_nb_coll_buff_desc_t **desc, - uint32_t num_banks, - uint32_t num_buffers_per_bank) -{ - uint32_t ci; - if (NULL != *desc) { - for (ci=0; ciml_mem; - - /* first, we get a pointer to the payload buffer management struct */ - pload_mgmt = &(sm_bcol->colls_with_user_data); - - /* go ahead and get the header size that is cached on the payload block - */ - sm_bcol->total_header_size = data_offset; - - /* allocate memory for pointers to mine and my peers' payload buffers - * difference here is that now we use our new data struct - */ - malloc_size = ml_block->num_banks*ml_block->num_buffers_per_bank* - pload_mgmt->size_of_group *sizeof(mca_bcol_basesmuma_payload_t); - pload_mgmt->data_buffs = (mca_bcol_basesmuma_payload_t *) malloc(malloc_size); - if( !pload_mgmt->data_buffs) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - /* allocate some memory to hold the offsets */ - results_array = (void **) malloc(pload_mgmt->size_of_group * sizeof (void *)); - if (NULL == results_array) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - /* setup the input file for the shared memory connection manager */ - input_file.file_name = sm_reg_data->file_name; - input_file.size = sm_reg_data->size; - input_file.size_ctl_structure = 0; - input_file.data_seg_alignment = BASESMUMA_CACHE_LINE_SIZE; - input_file.mpool_size = sm_reg_data->size; - - /* call the connection manager and map my shared memory peers' file - */ - ret = bcol_basesmuma_smcm_allgather_connection( - sm_bcol, - sm_bcol->super.sbgp_partner_module, - &(cs->sm_connections_list), - &(sm_bcol->payload_backing_files_info), - sm_bcol->super.sbgp_partner_module->group_comm, - input_file, cs->payload_base_fname, - false); - if( OMPI_SUCCESS != ret ) { - goto exit_ERROR; - } - - - /* now we exchange offset info - don't assume symmetric virtual memory - */ - - mem_offset = (void *) ((uintptr_t) ml_block->block->base_addr - - (uintptr_t) cs->sm_payload_structs->data_addr); - - /* call into the exchange offsets function */ - ret=comm_allgather_pml(&mem_offset, results_array, sizeof (void *), MPI_BYTE, - sm_bcol_module->super.sbgp_partner_module->my_index, - sm_bcol_module->super.sbgp_partner_module->group_size, - sm_bcol_module->super.sbgp_partner_module->group_list, - sm_bcol_module->super.sbgp_partner_module->group_comm); - if( OMPI_SUCCESS != ret ) { - goto exit_ERROR; - } - - /* convert memory offset to virtual address in current rank */ - leading_dim = pload_mgmt->size_of_group; - loop_limit = ml_block->num_banks*ml_block->num_buffers_per_bank; - for (i=0;i< sm_bcol_module->super.sbgp_partner_module->group_size;i++) { - - /* get the base pointer */ - int array_id=SM_ARRAY_INDEX(leading_dim,0,i); - if( i == sm_bcol_module->super.sbgp_partner_module->my_index) { - /* me */ - base_ptr=cs->sm_payload_structs->map_addr; - } else { - base_ptr=sm_bcol_module->payload_backing_files_info[i]-> - sm_mmap->map_addr; - } - - /* first, set the pointer to the control struct */ - pload_mgmt->data_buffs[array_id].ctl_struct=(mca_bcol_basesmuma_header_t *) - (uintptr_t)(((uint64_t)(uintptr_t)results_array[array_id])+(uint64_t)(uintptr_t)base_ptr); - /* second, calculate where to set the data pointer */ - pload_mgmt->data_buffs[array_id].payload=(void *) - (uintptr_t)((uint64_t)(uintptr_t) pload_mgmt->data_buffs[array_id].ctl_struct + - (uint64_t)(uintptr_t) data_offset); - - for( buf_id = 1 ; buf_id < loop_limit ; buf_id++ ) { - int array_id_m1=SM_ARRAY_INDEX(leading_dim,(buf_id-1),i); - array_id=SM_ARRAY_INDEX(leading_dim,buf_id,i); - /* now, play the same game as above - * - * first, set the control struct's position */ - pload_mgmt->data_buffs[array_id].ctl_struct=(mca_bcol_basesmuma_header_t *) - (uintptr_t)(((uint64_t)(uintptr_t)(pload_mgmt->data_buffs[array_id_m1].ctl_struct) + - (uint64_t)(uintptr_t)ml_block->size_buffer)); - - /* second, set the payload pointer */ - pload_mgmt->data_buffs[array_id].payload =(void *) - (uintptr_t)((uint64_t)(uintptr_t) pload_mgmt->data_buffs[array_id].ctl_struct + - (uint64_t)(uintptr_t) data_offset); - } - - } - - /* done with the index array */ - free (results_array); - results_array = NULL; - - /* initialize my control structures!! */ - my_idx = sm_bcol_module->super.sbgp_partner_module->my_index; - leading_dim = sm_bcol_module->super.sbgp_partner_module->group_size; - for( buf_id = 0; buf_id < loop_limit; buf_id++){ - array_id = SM_ARRAY_INDEX(leading_dim,buf_id,my_idx); - ctl_ptr = pload_mgmt->data_buffs[array_id].ctl_struct; - - /* initialize the data structures */ - for( j = 0; j < SM_BCOLS_MAX; j++){ - for( i = 0; i < NUM_SIGNAL_FLAGS; i++){ - ctl_ptr->flags[i][j] = -1; - } - } - ctl_ptr->sequence_number = -1; - ctl_ptr->src = -1; - } - - - - - /* setup the data structures needed for releasing the payload - * buffers back to the ml level - */ - for( i=0 ; i < (int) ml_block->num_banks ; i++ ) { - sm_bcol->colls_with_user_data. - ctl_buffs_mgmt[i].nb_barrier_desc.ml_memory_block_descriptor= - ml_block; - } - - ml_mem->num_banks = ml_block->num_banks; - ml_mem->bank_release_counter = calloc(ml_block->num_banks, sizeof(uint32_t)); - ml_mem->num_buffers_per_bank = ml_block->num_buffers_per_bank; - ml_mem->size_buffer = ml_block->size_buffer; - /* pointer to ml level descriptor */ - ml_mem->ml_mem_desc = ml_block; - - if (OMPI_SUCCESS != init_nb_coll_buff_desc(&ml_mem->nb_coll_desc, - ml_block->block->base_addr, - ml_mem->num_banks, - ml_mem->num_buffers_per_bank, - ml_mem->size_buffer, - data_offset, - sm_bcol_module->super.sbgp_partner_module->group_size, - sm_bcol_module->pow_k)) { - - BASESMUMA_VERBOSE(10, ("Failed to allocate memory descriptors for storing state of non-blocking collectives\n")); - return OMPI_ERROR; - } - - return OMPI_SUCCESS; - -exit_ERROR: - if (NULL != results_array) { - free(results_array); - } - return ret; -} - -#endif - - - -/* Basesmuma interface function used for buffer release */ -#if 0 -/* gvm - * A collective operation calls this routine to release the payload buffer. - * All processes in the shared memory sub-group of a bcol should call the non-blocking - * barrier on the last payload buffer of a memory bank. On the completion - * of the non-blocking barrier, the ML callback is called which is responsible - * for recycling the memory bank. - */ -mca_bcol_basesmuma_module_t *sm_bcol_module -int bcol_basesmuma_free_payload_buff( - struct mca_bcol_base_memory_block_desc_t *block, - sm_buffer_mgmt *ctl_mgmt, - uint64_t buff_id) -{ - /* local variables */ - int ret = OMPI_SUCCESS; - - memory_bank = BANK_FROM_BUFFER_IDX(buff_id); - ctl_mgmt->ctl_buffs_mgmt[memory_bank].n_buffs_freed++; - - OPAL_THREAD_ADD32(&(ctl_mgmt->ctl_buffs_mgmt[memory_bank].n_buffs_freed),1); - - if (ctl_mgmt->ctl_buffs_mgmt[memory_bank].n_buffs_freed == block->size_buffers_bank){ - - /* start non-blocking barrier */ - bcol_basesmuma_rd_nb_barrier_init_admin( - &(ctl_mgmt->ctl_buffs_mgmt[memory_bank].nb_barrier_desc)); - - if (NB_BARRIER_DONE != - ctl_mgmt->ctl_buffs_mgmt[memory_bank]. - nb_barrier_desc.collective_phase){ - - /* progress the barrier */ - opal_progress(); - } - else{ - /* free the buffer - i.e. initiate callback to ml level */ - block->ml_release_cb(block,memory_bank); - } - } - return ret; -} -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_component.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_component.c deleted file mode 100644 index 1ee19b2fdb5..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_component.c +++ /dev/null @@ -1,391 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "opal/mca/mpool/base/base.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "opal/align.h" -#include "bcol_basesmuma.h" - -/* - * Public string showing the coll ompi_sm V2 component version number - */ -const char *mca_bcol_basesmuma_component_version_string = - "Open MPI bcol - basesmuma collective MCA component version " OMPI_VERSION; - -/* - * Local functions - */ - -static int basesmuma_register(void); -static int basesmuma_open(void); -static int basesmuma_close(void); -static int mca_bcol_basesmuma_deregister_ctl_sm( - mca_bcol_basesmuma_component_t *bcol_component); - - -static inline int mca_bcol_basesmuma_param_register_int( - const char* param_name, int default_value, int *storage) -{ - *storage = default_value; - return mca_base_component_var_register(&mca_bcol_basesmuma_component.super.bcol_version, param_name, - NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); -} - -static inline int mca_bcol_basesmuma_param_register_bool( - const char* param_name, bool default_value, bool *storage) -{ - *storage = default_value; - return mca_base_component_var_register(&mca_bcol_basesmuma_component.super.bcol_version, param_name, - NULL, MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); -} - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_bcol_basesmuma_component_t mca_bcol_basesmuma_component = { - - /* First, fill in the super */ - - { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .bcol_version = { - MCA_BCOL_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "basesmuma", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = basesmuma_open, - .mca_close_component = basesmuma_close, - .mca_register_component_params = basesmuma_register, - }, - - /* Initialization / querying functions */ - - .collm_init_query = mca_bcol_basesmuma_init_query, - .collm_comm_query = mca_bcol_basesmuma_comm_query, - .init_done = false, - .need_ordering = false, - .priority = 0, /* (default) priority */ - }, -}; - -/* - * Register the component - */ -static int basesmuma_register(void) -{ - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - - /* set component priority */ - mca_bcol_basesmuma_param_register_int("priority", 90, &cs->super.priority); - - /* Number of memory banks */ - mca_bcol_basesmuma_param_register_int("basesmuma_num_ctl_banks", 2, - &cs->basesmuma_num_mem_banks); - - /* Number of regions per memory bank */ - mca_bcol_basesmuma_param_register_int("basesmuma_num_buffs_per_bank", 16, - &cs->basesmuma_num_regions_per_bank); - - /* number of polling loops to allow pending resources to - * complete their work - */ - mca_bcol_basesmuma_param_register_int("n_poll_loops", 4, &cs->n_poll_loops); - - - /* Number of groups supported */ - mca_bcol_basesmuma_param_register_int("n_groups_supported", 100, - &cs->n_groups_supported); - - /* order of fanin tree */ - mca_bcol_basesmuma_param_register_int("radix_fanin", 2, &cs->radix_fanin); - - /* order of fanout tree */ - mca_bcol_basesmuma_param_register_int("radix_fanout", 2, &cs->radix_fanout); - - /* order of read tree */ - mca_bcol_basesmuma_param_register_int("radix_read_tree", 3, - &cs->radix_read_tree); - - /* order of reduction fanout tree */ - mca_bcol_basesmuma_param_register_int("order_reduction_tree", 2, - &cs->order_reduction_tree); - - /* k-nomial radix */ - mca_bcol_basesmuma_param_register_int("k_nomial_radix", 3, &cs->k_nomial_radix); - - /* number of polling loops for non-blocking algorithms */ - mca_bcol_basesmuma_param_register_int("num_to_probe", 10, &cs->num_to_probe); - - /* radix of the k-ary scatter tree */ - mca_bcol_basesmuma_param_register_int("scatter_kary_radix", 4, - &cs->scatter_kary_radix); - - /* register parmeters controlling message fragementation */ - mca_bcol_basesmuma_param_register_int("min_frag_size", getpagesize(), - &cs->super.min_frag_size); - mca_bcol_basesmuma_param_register_int("max_frag_size", FRAG_SIZE_NO_LIMIT, - &cs->super.max_frag_size); - - /* by default use pre-registered shared memory segments */ - /* RLG NOTE: When we have a systematic way to handle single memory - * copy semantics, we need to update this logic - */ - mca_bcol_basesmuma_param_register_bool("can_use_user_buffers", false, - &cs->super.can_use_user_buffers); - - mca_bcol_basesmuma_param_register_int("verbose", 0, &cs->verbose); - - return OMPI_SUCCESS; -} - -/* - * Open the component - */ -static int basesmuma_open(void) -{ - - /* local variables */ - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - int ret = OMPI_SUCCESS; - opal_mutex_t *mutex_ptr; - int dummy; - - /* - * Make sure that the number of banks is a power of 2 - */ - cs->basesmuma_num_mem_banks= - roundup_to_power_radix(2,cs->basesmuma_num_mem_banks, &dummy); - if ( 0 == cs->basesmuma_num_mem_banks ) { - ret=OMPI_ERROR; - goto exit_ERROR; - } - - /* - * Make sure that the the number of buffers is a power of 2 - */ - cs->basesmuma_num_regions_per_bank= - roundup_to_power_radix(2,cs->basesmuma_num_regions_per_bank, &dummy); - if ( 0 == cs->basesmuma_num_regions_per_bank ) { - ret=OMPI_ERROR; - goto exit_ERROR; - } - - /* Portals initialization */ - cs->portals_init = false; - cs->portals_info = NULL; - - /* - * initialization - */ - cs->sm_ctl_structs=NULL; - OBJ_CONSTRUCT(&(cs->sm_connections_list),opal_list_t); - OBJ_CONSTRUCT(&(cs->nb_admin_barriers),opal_list_t); - mutex_ptr= &(cs->nb_admin_barriers_mutex); - OBJ_CONSTRUCT(mutex_ptr, opal_mutex_t); - - /* Control structures object construct - */ - OBJ_CONSTRUCT(&(cs->ctl_structures), opal_list_t); - - /* shared memory has not been registered yet */ - cs->mpool_inited = false; - - /* initialize base file names */ - cs->clt_base_fname="sm_ctl_mem_"; - cs->payload_base_fname="sm_payload_mem_"; - - /* initialize the size of the shared memory scartch region */ - cs->my_scratch_shared_memory_size=getpagesize(); - cs->my_scratch_shared_memory=NULL; - cs->scratch_offset_from_base_ctl_file=0; - - /* - * register the progess function - */ - ret=opal_progress_register(bcol_basesmuma_progress); - if (MPI_SUCCESS != ret) { - opal_output(ompi_bcol_base_framework.framework_output, "failed to register the progress function"); - } - - return ret; - - exit_ERROR: - return ret; -} - -/* - * release the control structure backing file - */ -static int mca_bcol_basesmuma_deregister_ctl_sm(mca_bcol_basesmuma_component_t *bcol_component) -{ - if (NULL != bcol_component->sm_ctl_structs) { - OBJ_RELEASE(bcol_component->sm_ctl_structs); - } - - return OMPI_SUCCESS; -} - - -/* - * Close the component - */ -static int basesmuma_close(void) -{ - int ret; - bcol_basesmuma_registration_data_t *net_ctx; - bcol_base_network_context_t *net_reg; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - - /* gvm Leak FIX */ - while(!opal_list_is_empty(&(cs->ctl_structures))) { - opal_list_item_t *item; - item = opal_list_remove_first(&(cs->ctl_structures)); - OBJ_DESTRUCT(item); - } - OBJ_DESTRUCT(&(cs->ctl_structures)); - - /* deregister the progress function */ - ret=opal_progress_unregister(bcol_basesmuma_progress); - if (MPI_SUCCESS != ret) { - opal_output(ompi_bcol_base_framework.framework_output, "failed to unregister the progress function"); - } - - /* remove the control structure backing file */ - ret=mca_bcol_basesmuma_deregister_ctl_sm(&mca_bcol_basesmuma_component); - if (MPI_SUCCESS != ret) { - opal_output(ompi_bcol_base_framework.framework_output, "failed to remove control structure backing file"); - } - - /* remove the network contexts - only one network context defined for - * this component. - */ - /* file_name returne by asprintf, so need to free the resource */ - if(mca_bcol_basesmuma_component.super.network_contexts ) { - net_reg=(bcol_base_network_context_t *) - mca_bcol_basesmuma_component.super.network_contexts[0]; - if(net_reg) { - net_ctx=(bcol_basesmuma_registration_data_t *)net_reg->context_data; - if( net_ctx) { - if(net_ctx->file_name) { - free(net_ctx->file_name); - } - free(net_ctx); - } - free(net_reg); - } - free(mca_bcol_basesmuma_component.super.network_contexts); - mca_bcol_basesmuma_component.super.network_contexts=NULL; - } - - /* normal return */ - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_bcol_basesmuma_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* done */ - return OMPI_SUCCESS; -} - -/* This routine is used to allocate shared memory for the the shared - * memory control regions. - */ -int mca_bcol_basesmuma_allocate_sm_ctl_memory(mca_bcol_basesmuma_component_t *cs) -{ - /* local variables */ - int name_length, ret; - size_t ctl_length; - char *name; - size_t page_size = getpagesize (); - - /* set the file name */ - name_length=asprintf(&name, - "%s"OPAL_PATH_SEP"%s""%0d", - ompi_process_info.job_session_dir, - cs->clt_base_fname, - (int)getpid()); - if( 0 > name_length ) { - return OMPI_ERROR; - } - /* make sure name is not too long */ - if ( OPAL_PATH_MAX < (name_length-1) ) { - return OMPI_ERROR; - } - - /* compute segment length */ - - ctl_length=(cs->basesmuma_num_mem_banks* - cs->basesmuma_num_regions_per_bank+cs->basesmuma_num_mem_banks) - *sizeof(mca_bcol_basesmuma_ctl_struct_t)*cs->n_groups_supported; - /* need two banks of memory per group - for algorithms that have - * user payload, and those that don't - */ - ctl_length*=2; - - /* add space for internal library management purposes */ - ctl_length+=cs->my_scratch_shared_memory_size; - - /* round up to multiple of page size */ - ctl_length = OPAL_ALIGN(ctl_length, page_size, size_t); - - /* allocate the shared file */ - cs->sm_ctl_structs=bcol_basesmuma_smcm_mem_reg (NULL, ctl_length, getpagesize(), name); - if( !cs->sm_ctl_structs) { - opal_output (ompi_bcol_base_framework.framework_output, - "In mca_bcol_basesmuma_allocate_sm_ctl_memory failed to allocathe backing file %s\n", name); - ret=OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - /* free the memory allocated by asprintf for the file name - - * in mca_base_smcm_mem_reg this name is copied into a new - * memory location */ - free(name); - - /* successful return */ - return OMPI_SUCCESS; - - Error: - if(name) { - free(name); - } - return ret; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_fanin.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_fanin.c deleted file mode 100644 index 668dde0b09d..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_fanin.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/* Recursive doubling blocking barrier */ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/patterns/net/netpatterns.h" - -#include "opal/sys/atomic.h" - -#include "ompi/mca/bcol/base/base.h" -#include "bcol_basesmuma.h" - -/********************************************************************************/ -/********************************** New Fan-In **********************************/ -/********************************************************************************/ - -static int bcol_basesmuma_fanin_new(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int64_t sequence_number; - - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - - int i, child_rank, idx, n_children, probe, - my_rank = bcol_module->super.sbgp_partner_module->my_index, - leading_dim = bcol_module->colls_no_user_data.size_of_group; - int8_t ready_flag; - int8_t bcol_id = (int8_t) bcol_module->super.bcol_id; - int buff_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buff_index].active_requests); - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - int matched = 0; - - - volatile mca_bcol_basesmuma_payload_t *ctl_structs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl; - volatile mca_bcol_basesmuma_header_t *child_ctl; - - - netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node); - - /* Figure out - what instance of the basesmuma bcol I am */ - sequence_number = input_args->sequence_num; - - idx = SM_ARRAY_INDEX(leading_dim, buff_index, 0); - ctl_structs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs + idx; - my_ctl = ctl_structs[my_rank].ctl_struct; - - /* Init the header */ - BASESMUMA_HEADER_INIT(my_ctl, ready_flag, sequence_number, bcol_id); - - /* Cache num of children value in a local variable */ - n_children = my_tree_node->n_children; - - /* initialize the active requests */ - *active_requests = 0; - /* create a bit map for children */ - for( i = 0; i < n_children; i++){ - *active_requests ^= (1<children_ranks[i]; - child_ctl = ctl_structs[child_rank].ctl_struct; - /* I'm sacrificing cache for concurrency */ - for( probe = 0; probe < cm->num_to_probe && (0 == matched); probe++){ - if(IS_PEER_READY(child_ctl, ready_flag, sequence_number,BARRIER_FANIN_FLAG, bcol_id)) { - matched = 1; - /* flip the bit */ - *active_requests ^= (1<my_node_type){ - /* I have no more active requests, - signal my parent */ - my_ctl->flags[BARRIER_FANIN_FLAG][bcol_id] = ready_flag; - } - } else { - return BCOL_FN_STARTED; - } - - my_ctl->starting_flag_value[bcol_id]++; - - return BCOL_FN_COMPLETE; -} - -static int bcol_basesmuma_fanin_new_progress(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int64_t sequence_number; - - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - - int i, child_rank, flag_offset, idx, n_children, probe, - my_rank = bcol_module->super.sbgp_partner_module->my_index, - leading_dim = bcol_module->colls_no_user_data.size_of_group; - int8_t ready_flag; - int8_t bcol_id = (int8_t) bcol_module->super.bcol_id; - int buff_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buff_index].active_requests); - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - int matched = 0; - - - volatile mca_bcol_basesmuma_payload_t *ctl_structs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl; - volatile mca_bcol_basesmuma_header_t *child_ctl; - - - netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node); - - sequence_number = input_args->sequence_num; - - idx = SM_ARRAY_INDEX(leading_dim, buff_index, 0); - ctl_structs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs + idx; - my_ctl = ctl_structs[my_rank].ctl_struct; - - - flag_offset = my_ctl->starting_flag_value[bcol_id]; - ready_flag = flag_offset + 1; - my_ctl->sequence_number = sequence_number; - - /* Cache num of children value in a local variable */ - n_children = my_tree_node->n_children; - - - /* Wait until my childeren arrive */ - for (i = 0; i < n_children; ++i) { - matched = 0; - /* Get child ctl struct */ - if ( 1 == ((*active_requests >> i)&1) ) { - child_rank = my_tree_node->children_ranks[i]; - child_ctl = ctl_structs[child_rank].ctl_struct; - /* I'm sacrificing cache for concurrency */ - for( probe = 0; probe < cm->num_to_probe && (0 == matched); probe++){ - if(IS_PEER_READY(child_ctl, ready_flag, sequence_number, BARRIER_FANIN_FLAG,bcol_id)) { - matched = 1; - /* flip the bit */ - *active_requests ^= (1<my_node_type){ - /* If I am not the root of the fanin tree, - then signal my parent */ - my_ctl->flags[BARRIER_FANIN_FLAG][bcol_id] = ready_flag; - } - } else { - return BCOL_FN_STARTED; - } - - my_ctl->starting_flag_value[bcol_id]++; - - return BCOL_FN_COMPLETE; -} - - -int bcol_basesmuma_fanin_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - BASESMUMA_VERBOSE(10, ("Basesmuma Fan-In register.\n")); - - comm_attribs.bcoll_type = BCOL_FANIN; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - bcol_basesmuma_fanin_new, - bcol_basesmuma_fanin_new_progress); - - return OMPI_SUCCESS; -} - - diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_fanout.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_fanout.c deleted file mode 100644 index f5a1dd38b11..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_fanout.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/* Recursive doubling blocking barrier */ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/patterns/net/netpatterns.h" - -#include "opal/sys/atomic.h" - -#include "ompi/mca/bcol/base/base.h" -#include "bcol_basesmuma.h" - -/***********************************************************************************/ -/*********************************** New Fan-Out ***********************************/ -/***********************************************************************************/ - -static int bcol_basesmuma_fanout_new( - bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int64_t sequence_number; - - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - - int idx, probe, - my_rank = bcol_module->super.sbgp_partner_module->my_index, - leading_dim = bcol_module->colls_no_user_data.size_of_group; - int8_t ready_flag; - int8_t bcol_id = (int8_t) bcol_module->super.bcol_id; - int buff_index = input_args->buffer_index; - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - - - volatile mca_bcol_basesmuma_payload_t *ctl_structs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl; - volatile mca_bcol_basesmuma_header_t *parent_ctl; - - - netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node); - - /* Figure out - what instance of the basesmuma bcol I am */ - sequence_number = input_args->sequence_num; - - idx = SM_ARRAY_INDEX(leading_dim, buff_index, 0); - ctl_structs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs + idx; - my_ctl = ctl_structs[my_rank].ctl_struct; - - /* init the header */ - BASESMUMA_HEADER_INIT(my_ctl, ready_flag, sequence_number, bcol_id); - - /* Wait on my parent to arrive */ - if (my_tree_node->n_parents) { - parent_ctl = ctl_structs[my_tree_node->parent_rank].ctl_struct; - for( probe = 0; probe < cm->num_to_probe; probe++){ - if (IS_PEER_READY(parent_ctl, ready_flag, sequence_number, BARRIER_FANOUT_FLAG, bcol_id)) { - /* signal my children */ - my_ctl->flags[BARRIER_FANOUT_FLAG][bcol_id] = ready_flag; - /* bump the starting flag */ - my_ctl->starting_flag_value[bcol_id]++; - return BCOL_FN_COMPLETE; - - } - } - - } else { - /* I am the root of the fanout */ - my_ctl->flags[BARRIER_FANOUT_FLAG][bcol_id] = ready_flag; - /* bump the starting flag */ - my_ctl->starting_flag_value[bcol_id]++; - return BCOL_FN_COMPLETE; - } - - - - - - return BCOL_FN_STARTED; -} - -int bcol_basesmuma_fanout_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - BASESMUMA_VERBOSE(10, ("Basesmuma Fan-Out register.\n")); - - comm_attribs.bcoll_type = BCOL_FANOUT; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - bcol_basesmuma_fanout_new, - bcol_basesmuma_fanout_new); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_gather.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_gather.c deleted file mode 100644 index ef3d856b88c..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_gather.c +++ /dev/null @@ -1,1106 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/bcol/basesmuma/bcol_basesmuma.h" -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -/* debug - * #include "opal/sys/timer.h" - * - * extern uint64_t timers[7]; - * end debug */ - -/* debug */ -#include -/* end debug */ - -/* non-blocking gather routines: init and progress functions */ -int bcol_basesmuma_gather_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_GATHER; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1048576; - comm_attribs.data_src = DATA_SRC_KNOWN; - comm_attribs.waiting_semantics = BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; - inv_attribs.datatype_bitmap = 0x11111111; - inv_attribs.op_types_bitmap = 0x11111111; - - /* Set attributes for fanin fanout algorithm */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_k_nomial_gather_init, - bcol_basesmuma_k_nomial_gather_progress); - - return OMPI_SUCCESS; -} - -int bcol_basesmuma_k_nomial_gather_init(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int leading_dim, buff_idx, idx; - int src, i, j, k_temp1, k_temp2; - int pseudo_root, proxy_root, pseudo_base_adj; - volatile int8_t ready_flag; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int root=input_args->root; - int base_adj, base; - int total_peers, my_pow_k=0; - int64_t sequence_number=input_args->sequence_num; - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - int bcol_id = (int) bcol_module->super.bcol_id; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - netpatterns_k_exchange_node_t *exchange_node = - &bcol_module->knomial_allgather_tree; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buffer_index].active_requests); - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buffer_index].iteration; - int *status = &bcol_module->ml_mem.nb_coll_desc[buffer_index].status; - - int buff_offset = bcol_module->super.hier_scather_offset; - - /* "indirectors" */ - int *inv_map = exchange_node->inv_reindex_map; - int *reindex_map = exchange_node->reindex_map; - int stray = exchange_node->k_nomial_stray; - - /* tree radix */ - int tree_order = exchange_node->tree_order; - /* tree depth */ - int pow_k = exchange_node->log_tree_order; - /* largest power of k less than or equal to np */ - int cnt = exchange_node->n_largest_pow_tree_order; - - /* payload structures */ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - - size_t pack_len = 0, dt_size; - -#if 0 - fprintf(stderr,"Entering sm gather input_args->sbuf_offset %d \n",input_args->sbuf_offset); - fflush(stderr); -#endif - - - /* we will work only on packed data - so compute the length*/ - /* this is the size of my data, this is not gatherv so it's the same - * for all ranks in the communicator. - */ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - /* now set the "real" offset */ - buff_offset = buff_offset*pack_len; - - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* init the header */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - - /* init active requests, iteration, and status */ - *iteration = 0; - *active_requests = 0; - *status = -1; - /* calculate the number of steps necessary for this collective */ - - /* first thing we do is figure out where the root is in our new indexing */ - /* find root in new indexing */ - pseudo_root = inv_map[root]; - /* see if this is larger than the stray */ - if (pseudo_root >= stray) { - /* then we need to define the proxy root, everyone can do this */ - proxy_root = pseudo_root - cnt; - } else { - proxy_root = pseudo_root; - } - - /* do some figuring */ - if (EXCHANGE_NODE == exchange_node->node_type) { - total_peers = 0; - my_pow_k = pow_k; - k_temp1 = tree_order; - k_temp2 = 1; - for( i = 0; i < pow_k; i++) { - /* then find the base */ - FIND_BASE(base,exchange_node->reindex_myid,i+1,tree_order); - /* now find the adjusted base */ - base_adj = base + (base + proxy_root)%k_temp1; - /* ok, now find out WHO is occupying this slot */ - pseudo_base_adj = reindex_map[base_adj]; - - if(my_rank == pseudo_base_adj ) { - /* then go ahead and poll for children's data */ - for( j = 0; j < (tree_order - 1); j++ ) { - /* send phase - */ - /* get communication partner */ - - src = exchange_node->rank_exchanges[i][j]; - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - if( src < 0 ){ - continue; - }else{ - - /* flip a bit to represent this request */ - *active_requests ^= (1<node_type || 0 == exchange_node->n_extra_sources) { - if (0 == my_pow_k || EXTRA_NODE == exchange_node->node_type) { - opal_atomic_rmb (); - - my_ctl_pointer->flags[GATHER_FLAG][bcol_id] = ready_flag; - } - - if ((EXTRA_NODE == exchange_node->node_type && root != my_rank) || 0 == my_pow_k) { - /* nothing more to do */ - my_ctl_pointer->starting_flag_value[bcol_id]++; - - return BCOL_FN_COMPLETE; - } - } - - return BCOL_FN_STARTED; -} - - -int bcol_basesmuma_k_nomial_gather_progress(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int group_size; - int flag_offset; - int leading_dim, buff_idx, idx; - int src, knt, i, j, k_temp1, k_temp2; - volatile int8_t ready_flag; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int root=input_args->root; - int probe; - int matched; - int64_t sequence_number=input_args->sequence_num; - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - int bcol_id = (int) bcol_module->super.bcol_id; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - netpatterns_k_exchange_node_t *exchange_node = - &bcol_module->knomial_allgather_tree; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buffer_index].active_requests); - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buffer_index].iteration; - int *status = &bcol_module->ml_mem.nb_coll_desc[buffer_index].status; - int buff_offset = bcol_module->super.hier_scather_offset; - /* "indirectors" */ - int *list_connected = bcol_module->super.list_n_connected; - /* tree radix */ - int tree_order = exchange_node->tree_order; - /* payload structures */ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char *child_data_pointer; - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *child_ctl_pointer; - /*volatile mca_bcol_basesmuma_ctl_struct_t* parent_ctl_pointer; */ - - size_t pack_len = 0, dt_size; - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr); - - -#if 0 - fprintf(stderr,"Entering sm gather input_args->sbuf_offset %d \n",input_args->sbuf_offset); - fflush(stderr); -#endif - - - /* we will work only on packed data - so compute the length*/ - /* this is the size of my data, this is not gatherv so it's the same - * for all ranks in the communicator. - */ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - /* now set the "real" offset */ - buff_offset = buff_offset*pack_len; - - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - /* restart the ready_flag state */ - flag_offset = my_ctl_pointer->starting_flag_value[bcol_id]; - ready_flag = flag_offset + 1; - - /* calculate the number of steps necessary for this collective */ - - /* first thing we do is figure out where the root is in our new indexing */ - /* find root in new indexing */ - if( EXTRA_NODE == exchange_node->node_type ) { - - /* poll for data from proxy */ - src = exchange_node->rank_extra_sources_array[0]; - /* get src data buffer */ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - /* remember to bump your flag */ - ready_flag++; - - /* in this case, you must block */ - for (i = 0 ; i < cm->num_to_probe ; ++i) { - if (IS_PEER_READY(child_ctl_pointer,ready_flag,sequence_number, GATHER_FLAG, bcol_id)){ - /* receive the data from the proxy, aka pseudo-root */ - memcpy((void *) ((unsigned char *) data_addr + buff_offset), - (void *) ((unsigned char *) child_data_pointer+buff_offset), - pack_len * group_size); - - goto FINISHED; - } - } - - return BCOL_FN_STARTED; - } - - - if (0 < exchange_node->n_extra_sources && (-1 == (*status))) { - /* am a proxy, poll for pack_len data from extra */ - src = exchange_node->rank_extra_sources_array[0]; - /* get src data buffer */ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - knt = 0; - for( i = 0; i < src; i++){ - knt += list_connected[i]; - } - /* must block here also */ - matched = 0; - for (i = 0, matched = 0 ; i < cm->num_to_probe && (0 == matched) ; ++i) { - if(IS_PEER_READY(child_ctl_pointer,ready_flag,sequence_number, GATHER_FLAG, bcol_id)){ - matched = 1; - memcpy((void *) ((unsigned char *) data_addr + buff_offset + pack_len*knt), - (void *) ((unsigned char *) child_data_pointer + buff_offset + - pack_len*knt), pack_len*list_connected[src]); - *status = 0; - if( 0 == *active_requests ){ - goto LAST_STEP; - } - - break; - } - } - if( 0 == matched ){ - return BCOL_FN_STARTED; - } - } - - /* start the k-nomial gather phase */ - /* only "active ranks participate, once a rank has forwarded its data, it becomes inactive */ - for (probe = 0 ; probe < cm->num_to_probe ; ++probe) { - k_temp1 = tree_order; - k_temp2 = 1; - for (i = 0 ; i < *(iteration) ; ++i) { - - /* then go ahead and poll for children's data */ - for (j = 0 ; j < (tree_order - 1) ; ++j) { - /* send phase - */ - /* get communication partner */ - - src = exchange_node->rank_exchanges[i][j]; - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - /* if the bit that corresponds to this child has been set to zero, - * then it has already checked in and data received - */ - if (src < 0 || 1 != ((*active_requests >> ((tree_order - 1)*i + j))&1)){ - continue; - } - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - - if(IS_PEER_READY(child_ctl_pointer,ready_flag,sequence_number, GATHER_FLAG, bcol_id)){ - /* copy the data */ - memcpy((void *) ((unsigned char *) data_addr + buff_offset + - exchange_node->payload_info[i][j].r_offset*pack_len), - (void *) ((unsigned char *) child_data_pointer + buff_offset + - exchange_node->payload_info[i][j].r_offset*pack_len), - exchange_node->payload_info[i][j].r_len*pack_len); - /* flip the bit to zero */ - *active_requests ^= (1<<((tree_order - 1)*i + j)); - if(0 == (*active_requests)) { - goto LAST_STEP; - } - } - } - } - - k_temp1 = k_temp1*tree_order; - k_temp2 = k_temp2*tree_order; - } - - - return BCOL_FN_STARTED; - -LAST_STEP: - /* last step, proxies send full data back to the extra ranks */ - if( 0 < exchange_node->n_extra_sources && - root == exchange_node->rank_extra_sources_array[0]) { - /* regardless, I will bump the ready flag and set it in case someone is watching */ - /* announce that data is ready */ - ready_flag++; - } - - /* signal that data is ready */ - opal_atomic_wmb (); - my_ctl_pointer->flags[GATHER_FLAG][bcol_id] = ready_flag; - -FINISHED: - - - my_ctl_pointer->starting_flag_value[bcol_id]++; - - return BCOL_FN_COMPLETE; -} - - -/* Blocking routines, used to prototype and test signaling, - * as well as debug hierarchical algorithm - */ -#if 0 -int bcol_basesmuma_gather_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_GATHER; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 16; - comm_attribs.data_src = DATA_SRC_KNOWN; - comm_attribs.waiting_semantics = BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; - inv_attribs.datatype_bitmap = 0x11111111; - inv_attribs.op_types_bitmap = 0x11111111; - - - /* Set attributes for fanin fanout algorithm */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, bcol_basesmuma_k_nomial_gather, - bcol_basesmuma_k_nomial_gather); - - return OMPI_SUCCESS; -} -#endif - - -/* original, fully blocking, fully synchronous gather - should result in worst performance when used */ -#if 0 -int bcol_basesmuma_k_nomial_gather(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int group_size; - int first_instance=0, flag_offset; - int rc = OMPI_SUCCESS; - int leading_dim, buff_idx, idx; - int *group_list; - int src, comm_src, knt, i, k, j, k_temp1, k_temp2; - int pseudo_root, proxy_root, pseudo_base_adj; - volatile int64_t ready_flag; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int root=input_args->root; - int base_adj, base; - int64_t sequence_number=input_args->sequence_num; - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - netpatterns_k_exchange_node_t *exchange_node = - &bcol_module->knomial_allgather_tree; - - int buff_offset = bcol_module->super.hier_scather_offset; - - /* "indirectors" */ - int *list_connected = bcol_module->super.list_n_connected; - int *inv_map = exchange_node->inv_reindex_map; - int *reindex_map = exchange_node->reindex_map; - /*int *reindex_map = exchange_node->reindex_map;*/ - /* stray rank == first rank in the extra set */ - int stray = exchange_node->k_nomial_stray; - - /* tree radix */ - int tree_order = exchange_node->tree_order; - /* tree depth */ - int pow_k = exchange_node->log_tree_order; - /* largest power of k less than or equal to np */ - int cnt = exchange_node->n_largest_pow_tree_order; - - /*fprintf(stderr,"tree order %d pow_k %d stray %d root %d\n",tree_order, pow_k, stray, root);*/ - /* payload structures */ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char *child_data_pointer; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *child_ctl_pointer; - /*volatile mca_bcol_basesmuma_ctl_struct_t* parent_ctl_pointer; */ - - size_t pack_len = 0, dt_size; - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr); - - /* active in the algorithm */ - bool active = true; - -#if 0 - fprintf(stderr,"Entering sm gather input_args->sbuf_offset %d \n",input_args->sbuf_offset); - fflush(stderr); -#endif - - - /* we will work only on packed data - so compute the length*/ - /* this is the size of my data, this is not gatherv so it's the same - * for all ranks in the communicator. - */ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - /* now set the "real" offset */ - buff_offset = buff_offset*pack_len; - - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - /* I have a feeling that I'll need this */ - group_list = bcol_module->super.sbgp_partner_module->group_list; - - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - /*ctl_structs=(mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_with_user_data.ctl_buffs+idx; - */ - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - /*my_ctl_pointer = ctl_structs[my_rank]; */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* setup resource recycling */ - if( my_ctl_pointer->sequence_number < sequence_number ) { - first_instance=1; - } - - if( first_instance ) { - /* Signal arrival */ - my_ctl_pointer->flag = -1; - my_ctl_pointer->gflag = -1; - my_ctl_pointer->index=1; - /* this does not need to use any flag values , so only need to - * set the value for subsequent values that may need this */ - my_ctl_pointer->starting_flag_value=0; - flag_offset=0; - - } else { - /* only one thread at a time will be making progress on this - * collective, so no need to make this atomic */ - my_ctl_pointer->index++; - } - - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - my_ctl_pointer->sequence_number = sequence_number; - -/* debug - fprintf(stderr," sequence_number %lld flag_offset %d starting flag val %d\n",sequence_number,flag_offset, my_ctl_pointer->starting_flag_value); - fflush(stderr); - end debug */ - - - /* - * Fan out from root - */ - /* don't need this either */ - /* root is the local leader */ - /* calculate the number of steps necessary for this collective */ - - /* first thing we do is figure out where the root is in our new indexing */ - /* find root in new indexing */ - pseudo_root = inv_map[root]; - /* see if this is larger than the stray */ - if( pseudo_root >= stray ) { - /* then we need to define the proxy root, everyone can do this */ - proxy_root = pseudo_root - cnt; - }else { - proxy_root = pseudo_root; - } - - - - if( EXTRA_NODE == exchange_node->node_type ) { - - /* signal arrival */ - my_ctl_pointer->gflag = ready_flag; - - /* send is done */ - - /* poll for data only if I am the root */ - /* bump the ready flag */ - ready_flag++; - if( root == my_rank ){ - /* poll for data from proxy */ - src = exchange_node->rank_extra_sources_array[0]; - /* get src data buffer */ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - while(!IS_GDATA_READY(child_ctl_pointer,ready_flag,sequence_number)){ - opal_progress(); - } - /* receive the data from the proxy, aka pseudo-root */ - - memcpy((void *) ((unsigned char *) data_addr + buff_offset),(void *) ((unsigned char *) child_data_pointer+buff_offset) - ,pack_len*group_size); - } - goto FINISHED; - - - } else if( 0 < exchange_node->n_extra_sources ) { - - /* am a proxy, poll for pack_len data from extra */ - src = exchange_node->rank_extra_sources_array[0]; - /* get src data buffer */ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - knt = 0; - for( i = 0; i < src; i++){ - knt += list_connected[i]; - } - while(!IS_GDATA_READY(child_ctl_pointer,ready_flag,sequence_number)){ - opal_progress(); - } - memcpy((void *) ((unsigned char *) data_addr + buff_offset + pack_len*knt), - (void *) ((unsigned char *) child_data_pointer + buff_offset + - pack_len*knt), pack_len*list_connected[src]); - /*fprintf(stderr,"999 proxy received data from %d at offset %d of length %d\n",src, - buff_offset+pack_len*knt,pack_len*list_connected[src]); - */ - } - - /* start the k-nomial gather phase */ - /* only "active ranks participate, once a rank has forwarded its data, it becomes inactive */ - knt = 0; - while(active){ - k_temp1 = tree_order; - k_temp2 = 1; - for( i = 0; i < pow_k; i++) { - /* then find the base */ - /*FIND_BASE(base,my_rank,i+1,tree_order);*/ - FIND_BASE(base,exchange_node->reindex_myid,i+1,tree_order); - /* now find the adjusted base */ - base_adj = base + (base + proxy_root)%k_temp1; - /* ok, now find out WHO is occupying this slot */ - /*pseudo_base_adj = inv_map[base_adj];*/ - pseudo_base_adj = reindex_map[base_adj]; - - if(my_rank == pseudo_base_adj ) { - /* then go ahead and poll for children's data */ - for( j = 0; j < (tree_order - 1); j++ ) { - /* send phase - */ - /* get communication partner */ - - src = exchange_node->rank_exchanges[i][j]; - /*fprintf(stderr,"comm_src %d\n",comm_src);*/ - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - if( src < 0 ){ - continue; - } - - /*fprintf(stderr,"src %d\n",src);*/ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - while(!IS_GDATA_READY(child_ctl_pointer,ready_flag,sequence_number)){ - opal_progress(); - } - memcpy((void *) ((unsigned char *) data_addr + buff_offset + - exchange_node->payload_info[i][j].r_offset*pack_len), - (void *) ((unsigned char *) child_data_pointer + buff_offset + - exchange_node->payload_info[i][j].r_offset*pack_len), - exchange_node->payload_info[i][j].r_len*pack_len); - /* - fprintf(stderr,"999 receiving data from %d at offset %d of length %d\n", - exchange_node->rank_exchanges[i][j], buff_offset + exchange_node->payload_info[i][j].r_offset, - exchange_node->payload_info[i][j].r_len*pack_len); - */ - opal_atomic_wmb (); - knt++; - if(knt == exchange_node->n_actual_exchanges) { - /* this is the trick to break the root out, - * only the root should be able to satisfy this - */ - /* - fprintf(stderr,"hello n_actual is %d \n",knt); - fprintf(stderr,"hello n_actual_exch is %d \n", - exchange_node->n_actual_exchanges); - */ - goto LAST_STEP; - } - } - } else { - /* announce my arrival */ - my_ctl_pointer->gflag = ready_flag; - active = false; - break; - } - - k_temp1 = k_temp1*tree_order; - k_temp2 = k_temp2*tree_order; - } - } -LAST_STEP: - /* last step, proxies send full data back to the extra ranks */ - if( 0 < exchange_node->n_extra_sources && - root == exchange_node->rank_extra_sources_array[0]) { - /* regardless, I will bump the ready flag and set it in case someone is watching */ - /* announce that data is ready */ - ready_flag++; - my_ctl_pointer->gflag = ready_flag; - } - - -FINISHED: - -/* debug - fprintf(stderr," my_ctl_pointer->index %d n of this type %d %u \n", - my_ctl_pointer->index,c_input_args->n_of_this_type_in_collective,getpid()); - fflush(stderr); - end debug */ - - my_ctl_pointer->starting_flag_value+=1; - - return BCOL_FN_COMPLETE; -} - -#endif - - -#if 0 -/* blocking, asynchronous polling gather routine */ -int bcol_basesmuma_k_nomial_gather(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int group_size; - int first_instance=0, flag_offset; - int rc = OMPI_SUCCESS; - int leading_dim, buff_idx, idx; - int *group_list; - int src, comm_src, knt, i, k, j, k_temp1, k_temp2; - int pseudo_root, proxy_root, pseudo_base_adj; - volatile int64_t ready_flag; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int root=input_args->root; - int base_adj, base; - int total_peers, my_pow_k; - int probe; - int matched; - int64_t sequence_number=input_args->sequence_num; - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - netpatterns_k_exchange_node_t *exchange_node = - &bcol_module->knomial_allgather_tree; - - int buff_offset = bcol_module->super.hier_scather_offset; - - /* "indirectors" */ - int *list_connected = bcol_module->super.list_n_connected; - int *inv_map = exchange_node->inv_reindex_map; - int *reindex_map = exchange_node->reindex_map; - /*int *reindex_map = exchange_node->reindex_map;*/ - /* stray rank == first rank in the extra set */ - int stray = exchange_node->k_nomial_stray; - - /* tree radix */ - int tree_order = exchange_node->tree_order; - /* tree depth */ - int pow_k = exchange_node->log_tree_order; - /* largest power of k less than or equal to np */ - int cnt = exchange_node->n_largest_pow_tree_order; - - /*fprintf(stderr,"tree order %d pow_k %d stray %d root %d\n",tree_order, pow_k, stray, root);*/ - /* payload structures */ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char *child_data_pointer; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *child_ctl_pointer; - /*volatile mca_bcol_basesmuma_ctl_struct_t* parent_ctl_pointer; */ - - size_t pack_len = 0, dt_size; - void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr); - - /* active in the algorithm */ - bool active = true; - -#if 0 - fprintf(stderr,"Entering sm gather root %d \n",root); - fflush(stderr); -#endif - - - /* we will work only on packed data - so compute the length*/ - /* this is the size of my data, this is not gatherv so it's the same - * for all ranks in the communicator. - */ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - /* now set the "real" offset */ - buff_offset = buff_offset*pack_len; - - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - /* I have a feeling that I'll need this */ - group_list = bcol_module->super.sbgp_partner_module->group_list; - - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - /*ctl_structs=(mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_with_user_data.ctl_buffs+idx; - */ - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - /*my_ctl_pointer = ctl_structs[my_rank]; */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* setup resource recycling */ - if( my_ctl_pointer->sequence_number < sequence_number ) { - first_instance=1; - } - - if( first_instance ) { - /* Signal arrival */ - my_ctl_pointer->flag = -1; - my_ctl_pointer->gflag = -1; - my_ctl_pointer->index=1; - /* this does not need to use any flag values , so only need to - * set the value for subsequent values that may need this */ - my_ctl_pointer->starting_flag_value=0; - flag_offset=0; - - } else { - /* only one thread at a time will be making progress on this - * collective, so no need to make this atomic */ - my_ctl_pointer->index++; - } - - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - my_ctl_pointer->sequence_number = sequence_number; - -/* debug - fprintf(stderr," sequence_number %lld flag_offset %d starting flag val %d\n",sequence_number,flag_offset, my_ctl_pointer->starting_flag_value); - fflush(stderr); - end debug */ - - - /* - * Fan out from root - */ - /* don't need this either */ - /* root is the local leader */ - /* calculate the number of steps necessary for this collective */ - - /* first thing we do is figure out where the root is in our new indexing */ - /* find root in new indexing */ - pseudo_root = inv_map[root]; - /* see if this is larger than the stray */ - if( pseudo_root >= stray ) { - /* then we need to define the proxy root, everyone can do this */ - proxy_root = pseudo_root - cnt; - }else { - proxy_root = pseudo_root; - } - if( EXTRA_NODE == exchange_node->node_type ) { - - /* signal arrival */ - my_ctl_pointer->gflag = ready_flag; - - /* send is done */ - - /* poll for data only if I am the root */ - /* bump the ready flag */ - ready_flag++; - if( root == my_rank ){ - /* poll for data from proxy */ - src = exchange_node->rank_extra_sources_array[0]; - /* get src data buffer */ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - /* in this case, you must block */ - while(!IS_GDATA_READY(child_ctl_pointer,ready_flag,sequence_number)){ - opal_progress(); - } - /* receive the data from the proxy, aka pseudo-root */ - - memcpy((void *) ((unsigned char *) data_addr + buff_offset), - (void *) ((unsigned char *) child_data_pointer+buff_offset) - ,pack_len*group_size); - } - goto FINISHED; - - - } else if( 0 < exchange_node->n_extra_sources ) { - - /* am a proxy, poll for pack_len data from extra */ - src = exchange_node->rank_extra_sources_array[0]; - /* get src data buffer */ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - knt = 0; - for( i = 0; i < src; i++){ - knt += list_connected[i]; - } - /* must block here also */ - while(!IS_GDATA_READY(child_ctl_pointer,ready_flag,sequence_number)){ - opal_progress(); - } - memcpy((void *) ((unsigned char *) data_addr + buff_offset + pack_len*knt), - (void *) ((unsigned char *) child_data_pointer + buff_offset + - pack_len*knt), pack_len*list_connected[src]); - /*fprintf(stderr,"999 proxy received data from %d at offset %d of length %d\n",src, - buff_offset+pack_len*knt,pack_len*list_connected[src]); - */ - } - /* do some figuring */ - - total_peers = 0; - my_pow_k = pow_k; - k_temp1 = tree_order; - k_temp2 = 1; - for( i = 0; i < pow_k; i++) { - /* then find the base */ - /*FIND_BASE(base,my_rank,i+1,tree_order);*/ - FIND_BASE(base,exchange_node->reindex_myid,i+1,tree_order); - /* now find the adjusted base */ - base_adj = base + (base + proxy_root)%k_temp1; - /* ok, now find out WHO is occupying this slot */ - /*pseudo_base_adj = inv_map[base_adj];*/ - pseudo_base_adj = reindex_map[base_adj]; - - if(my_rank == pseudo_base_adj ) { - /* then go ahead and poll for children's data */ - for( j = 0; j < (tree_order - 1); j++ ) { - /* send phase - */ - /* get communication partner */ - - src = exchange_node->rank_exchanges[i][j]; - /*fprintf(stderr,"comm_src %d\n",comm_src);*/ - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - if( src < 0 ){ - continue; - }else{ - total_peers++; - } - - - } - } else { - /* announce my arrival */ - my_pow_k = i; - break; - } - - k_temp1 = k_temp1*tree_order; - k_temp2 = k_temp2*tree_order; - } - - if( 0 == my_pow_k ){ - /* signal arrival */ - my_ctl_pointer->gflag = ready_flag; - - goto FINISHED; - } - - - - /* start the k-nomial gather phase */ - /* only "active ranks participate, once a rank has forwarded its data, it becomes inactive */ - knt = 0; - while(active){ - k_temp1 = tree_order; - k_temp2 = 1; - for( i = 0; i < my_pow_k; i++) { - - /* then go ahead and poll for children's data */ - for( j = 0; j < (tree_order - 1); j++ ) { - matched = 0; - /* send phase - */ - /* get communication partner */ - - src = exchange_node->rank_exchanges[i][j]; - /*fprintf(stderr,"comm_src %d\n",comm_src);*/ - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - if( src < 0 ){ - continue; - } - - /*fprintf(stderr,"src %d\n",src);*/ - child_data_pointer = data_buffs[src].payload; - child_ctl_pointer = data_buffs[src].ctl_struct; - - /* if child has been marked, then skip */ - if( sequence_number == child_ctl_pointer->mark ){ - continue; - } - - - for( probe = 0; probe < cm->num_to_probe && (0 == matched); probe++){ - if(IS_GDATA_READY(child_ctl_pointer,ready_flag,sequence_number)){ - /* mark the child's pointer */ - child_ctl_pointer->mark = sequence_number; - /* copy the data */ - - memcpy((void *) ((unsigned char *) data_addr + buff_offset + - exchange_node->payload_info[i][j].r_offset*pack_len), - (void *) ((unsigned char *) child_data_pointer + buff_offset + - exchange_node->payload_info[i][j].r_offset*pack_len), - exchange_node->payload_info[i][j].r_len*pack_len); - /* - fprintf(stderr,"999 receiving data from %d at offset %d of length %d\n", - exchange_node->rank_exchanges[i][j], buff_offset + exchange_node->payload_info[i][j].r_offset, - exchange_node->payload_info[i][j].r_len*pack_len); - */ - knt++; - if(knt == total_peers) { - /* this is the trick to break the root out, - * only the root should be able to satisfy this - */ - /* - fprintf(stderr,"hello n_actual is %d \n",knt); - fprintf(stderr,"hello n_actual_exch is %d \n", - exchange_node->n_actual_exchanges); - */ - opal_atomic_wmb (); - my_ctl_pointer->gflag = ready_flag; - - goto LAST_STEP; - } - matched = 1; - }else{ - opal_progress(); - } - } - } - } - - k_temp1 = k_temp1*tree_order; - k_temp2 = k_temp2*tree_order; - } -LAST_STEP: - /* last step, proxies send full data back to the extra ranks */ - if( 0 < exchange_node->n_extra_sources && - root == exchange_node->rank_extra_sources_array[0]) { - /* regardless, I will bump the ready flag and set it in case someone is watching */ - /* announce that data is ready */ - ready_flag++; - my_ctl_pointer->gflag = ready_flag; - } - - -FINISHED: - -/* debug - fprintf(stderr," my_ctl_pointer->index %d n of this type %d %u \n", - my_ctl_pointer->index,c_input_args->n_of_this_type_in_collective,getpid()); - fflush(stderr); - end debug */ - - my_ctl_pointer->starting_flag_value+=1; - - return BCOL_FN_COMPLETE; -} -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.c deleted file mode 100644 index c985a6889ab..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.c +++ /dev/null @@ -1,1878 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#ifdef __PORTALS_AVAIL__ -#define __PORTALS_ENABLE__ - -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -#include "bcol_basesmuma.h" -#include "bcol_basesmuma_portals.h" -#include "bcol_basesmuma_lmsg_bcast.h" -#include "bcol_basesmuma_utils.h" - - - -/* - * Scatter/Gather Broadcast algorithm - * - * Algorithm highlights: - * - * Uses portals for data transfer - * - * All processes participating in the broadcast are arranged in a - * binmoial tree. - * - * Phase1: Scatter the broadcast data to all the children - * Phase2: All processes in the tree participates in recursive doubling - * algorithm to obtain the missing data. - */ - - -static int completed_scatter = 0; -#if 0 -int bcol_basesmuma_lmsg_scatter_allgather_portals_bcast_old(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - - /* local variables */ - int i; - uint64_t length; - int my_rank, parent_rank, src =-1, matched = 0; - int *src_list = NULL; - int group_size = -1, dummy_group_size; - int first_instance=0; - int rc = OMPI_SUCCESS; - int leading_dim, buff_idx, idx; - int count=input_args->count; - size_t pack_len = 0, dt_size =0 ; - int64_t ready_flag; - int flag_offset; - int pow_2, pow_2_levels; - int src_list_index = -1; - uint64_t fragment_size; /* user buffer size */ - int sg_matchbits = 0; - /* Input argument variables */ - void *my_userbuf = (void*)((unsigned char*)input_args->userbuf); - int64_t sequence_number=input_args->sequence_num; - struct ompi_datatype_t* dtype=input_args->dtype; - - /* Extra source variables */ - bool secondary_root = false; - int partner = -1, extra_partner = -1; - - /* Scatter Allgather offsets */ - uint64_t local_sg_offset = 0, global_sg_offset = 0, partner_offset = 0; - - /* Portals messaging relevant variables */ - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - ptl_handle_eq_t allgather_eq_h; - ptl_event_t allgather_event; - bool blocked_post = false; - bool msg_posted = false; - int total_msg_posts = -1, scatter_posts = -1, allgather_posts = -1, extra_src_posts = -1; - - /* OMPI module and component variables */ - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - mca_bcol_basesmuma_module_t *bcol_module = - (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - - /* Control structure and payload variables */ - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer = NULL; - volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer = NULL; - volatile mca_bcol_basesmuma_header_t *partner_ctl_pointer = NULL; - - struct mca_bcol_basesmuma_portal_buf_addr_t *my_lmsg_ctl_pointer = NULL; - struct mca_bcol_basesmuma_portal_buf_addr_t *parent_lmsg_ctl_pointer = NULL; - struct mca_bcol_basesmuma_portal_buf_addr_t *partner_lmsg_ctl_pointer = NULL; - - /* Make sure there userbuffer is not null */ - assert(my_userbuf != NULL); - - /* Get portals info*/ - portals_info = (mca_bcol_basesmuma_portal_proc_info_t*)cs->portals_info; - - /* Get addresing information */ - buff_idx = input_args->src_desc->buffer_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - my_rank = bcol_module->super.sbgp_partner_module->my_index; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - /* calculate the largest power of two that is smaller than - * or equal to the group size - */ - pow_2_levels = pow_sm_k(2,group_size, &(dummy_group_size)); - if( group_size < (1<colls_with_user_data.data_buffs+idx; - - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - my_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t*) - data_buffs[my_rank].payload; - - if(my_ctl_pointer->sequence_number < sequence_number) { - first_instance = 1; - } - - if(first_instance) { - my_ctl_pointer->flag = -1; - my_ctl_pointer->index = 1; - - my_ctl_pointer->starting_flag_value = 0; - flag_offset = 0; - - } else { - my_ctl_pointer->index++; - } - - assert( -1 == my_ctl_pointer->flag); - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - - my_ctl_pointer->sequence_number = sequence_number; - sg_matchbits = sequence_number ; - - /* Construct my portal buffer address and copy to payload buffer */ - mca_bcol_basesmuma_construct_portal_address(my_lmsg_ctl_pointer, - portals_info->portal_id.nid, - portals_info->portal_id.pid, - sg_matchbits, - bcol_module->super.sbgp_partner_module->group_comm->c_contextid); - - my_lmsg_ctl_pointer->userbuf = my_userbuf; - my_lmsg_ctl_pointer->userbuf_length = fragment_size; - - - /* - * If I am the root of bcast, scatter the data to my children - */ - if (input_args->root_flag) { - BASESMUMA_VERBOSE(10,("I am the root of the data")); - my_lmsg_ctl_pointer->offset = 0; - my_lmsg_ctl_pointer->n_sends = pow_2_levels; - my_lmsg_ctl_pointer->length = fragment_size; - - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &allgather_eq_h); - - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d \n",rc)); - goto Release; - } - - /* Compute number of posts required - * We post the data buffer for both scatter and allgather phase at once so to avoid - * posting overhead - */ - if (my_rank >= pow_2) { - /* I am root and my rank is greater than pow_2, I will hand - * over to rank (that is < pow_2) to act as secondary root - */ - total_msg_posts = 1; - } - else { - - extra_src_posts = (my_rank + pow_2 < group_size ) ? 1: 0; - scatter_posts = my_lmsg_ctl_pointer->n_sends; - allgather_posts = pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - } - - mca_bcol_basesmuma_portals_post_msg(cs, my_lmsg_ctl_pointer, - my_userbuf, fragment_size, allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - msg_posted = true ; - /* important that these be set before my children - * see the ready flag raised - */ - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - - /* Wait for my scatter partner */ - if (my_rank >= pow_2) { - int scatter_partner = -1; - volatile mca_bcol_basesmuma_header_t *scatter_partner_ctl_pointer = NULL; - - scatter_partner = my_rank - pow_2; - scatter_partner_ctl_pointer = - data_buffs[scatter_partner].ctl_struct; - - while(!IS_SG_DATA_READY(scatter_partner_ctl_pointer, ready_flag, - sequence_number)){ - opal_progress(); - } - - goto Release; - } - else { - wait_for_peers(my_rank, my_lmsg_ctl_pointer->n_sends, data_buffs, - ready_flag, sequence_number); - } - - goto Allgather; - } - - -Extra : - if( my_rank >= pow_2 ) { - parent_rank = my_rank & (pow_2-1); - parent_ctl_pointer = data_buffs[parent_rank].ctl_struct; - parent_lmsg_ctl_pointer = - (mca_bcol_basesmuma_portal_buf_addr_t*)data_buffs[parent_rank].payload; - - ready_flag = ready_flag + pow_2_levels; - - while(!IS_SG_DATA_READY(parent_ctl_pointer, ready_flag, sequence_number)) { - - opal_progress(); - - } - - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, my_lmsg_ctl_pointer, - parent_lmsg_ctl_pointer, 0, - 0, fragment_size); - - my_ctl_pointer->flag = ready_flag; - - goto Release; - } - -Scatter: - - /* I am not root of bcast compute the list of possible - * where I will receive bcast data from. - */ - src_list = (int *) malloc(sizeof(int) * (pow_2_levels + 1)); - for( i = 0; i < pow_2_levels; i++) { - src_list[i] = my_rank ^ (1< pow_2 */ - if ((my_rank + pow_2) < group_size) { - src_list[i] = my_rank + pow_2; - } else { - src_list[i] = -1; - } - -Probe: - - /* If I am not the root, then poll on possible "senders'" control structs */ - /* For portals we block for now */ - while (!matched) { - /* Shared memory iprobe */ - SG_LARGE_MSG_PROBE(src_list, pow_2_levels + 1, - src_list_index, matched, src, data_buffs, parent_ctl_pointer, - parent_lmsg_ctl_pointer,ready_flag, sequence_number); - } - - /* If I am a secondary root - * Secondary root acts as root of bcast data when real root of data - * is process with group rank greater than pow_2 */ - if ((matched) && (src == pow_2 + my_rank)) { - volatile mca_bcol_basesmuma_header_t *extra_src_ctl_pointer = NULL; - struct mca_bcol_basesmuma_portal_buf_addr_t *extra_src_lmsg_ctl_pointer = NULL; - - secondary_root = true; - BASESMUMA_VERBOSE(10,("I am the secondary root for the data")); - my_lmsg_ctl_pointer->offset = 0; - my_lmsg_ctl_pointer->n_sends = pow_2_levels; - my_lmsg_ctl_pointer->length = fragment_size; - - extra_src_ctl_pointer = data_buffs[src].ctl_struct; - extra_src_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t*)data_buffs[src].payload; - - /* create an event queue for the incoming buffer */ - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &allgather_eq_h); - - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d \n",rc)); - goto Release; - } - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, my_lmsg_ctl_pointer, - extra_src_lmsg_ctl_pointer, 0, - 0, fragment_size); - - - extra_src_posts = 0; - scatter_posts = my_lmsg_ctl_pointer->n_sends; - allgather_posts = pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - mca_bcol_basesmuma_portals_post_msg(cs, my_lmsg_ctl_pointer, - my_userbuf, fragment_size, allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - msg_posted = true ; - /* important that these be set before my children - * see the ready flag raised - */ - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - - wait_for_peers(my_rank, my_lmsg_ctl_pointer->n_sends, data_buffs, - ready_flag, sequence_number); - goto Allgather; - } - - /* Verify whether we got the right - * source of the data, by computing the source's intended - * destinations - */ - for( i = 0; i < parent_lmsg_ctl_pointer->n_sends; i++) { - uint64_t local_offset = 0; - uint64_t remote_offset = 0; - - BASESMUMA_VERBOSE(5,("%d found it from %d \n",my_rank,src)); - - if( my_rank == (src^(1<n_sends = i; - - /* Am I source for other process during scatter phase */ - if ( i > 0) { - - /* compute the size of the chunk to copy */ - length = (parent_lmsg_ctl_pointer->length)/ - (1<<(parent_lmsg_ctl_pointer->n_sends - my_lmsg_ctl_pointer->n_sends)); - my_lmsg_ctl_pointer->length = length; - my_lmsg_ctl_pointer->offset = - parent_lmsg_ctl_pointer->offset + length; - - - local_offset = my_lmsg_ctl_pointer->offset; - remote_offset = parent_lmsg_ctl_pointer->offset + length; - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, my_lmsg_ctl_pointer, - parent_lmsg_ctl_pointer,local_offset, - remote_offset, length); - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, - &allgather_eq_h); - - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d \n",rc)); - goto Release; - } - - /* Now post the message for other children to read */ - extra_src_posts = (my_rank + pow_2 < group_size ) ? 1: 0; - scatter_posts = my_lmsg_ctl_pointer->n_sends; - allgather_posts = pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - - mca_bcol_basesmuma_portals_post_msg(cs, my_lmsg_ctl_pointer, - my_userbuf, my_lmsg_ctl_pointer->userbuf_length, - allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE - ); - msg_posted = true; - /* set the memory barrier to ensure completion - * and signal I am done getting scatter data*/ - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - - wait_for_peers(my_rank, my_lmsg_ctl_pointer->n_sends, data_buffs, - ready_flag, sequence_number); - - } else { - /* takes care of first level recurssive double */ - length = parent_lmsg_ctl_pointer->length/ - (1<<(parent_lmsg_ctl_pointer->n_sends - 1)); - my_lmsg_ctl_pointer->length = length; - my_lmsg_ctl_pointer->offset = parent_lmsg_ctl_pointer->offset; - - local_offset = my_lmsg_ctl_pointer->offset; - remote_offset = my_lmsg_ctl_pointer->offset; - - - while(!IS_SG_DATA_READY(parent_ctl_pointer, ready_flag, sequence_number)) { - opal_progress(); - } - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, my_lmsg_ctl_pointer, - parent_lmsg_ctl_pointer,local_offset, - remote_offset, length); - - /* signal that I am done reading data from parent */ - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - } - - /* time for allgather phase */ - input_args->status = ALLGATHER; - - BASESMUMA_VERBOSE(5,("Completed %d found it from %d \n",my_rank,src)); - - while(ready_flag > parent_ctl_pointer->flag); - - goto Allgather; - } - } - - { - /* this is not who we are looking for, - * mark as false positive so we don't - * poll here again - */ - src_list[src_list_index] = -1; - matched = 0; - goto Probe; - } - -Allgather: - - BASESMUMA_VERBOSE(5,(" %d Completed Scatter %d times \n", my_rank, completed_scatter)); - - /* zip it back up - we have already taken care of first level */ - global_sg_offset = my_lmsg_ctl_pointer->offset; - - /* first level of zip up */ - length = 2 * fragment_size/pow_2; - - - if (!msg_posted) { - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &allgather_eq_h); - - /* Posting for all phases of recursive doubling */ - extra_src_posts = (my_rank + pow_2 < group_size ) ? 1: 0; - allgather_posts = pow_2_levels - 1; - total_msg_posts = allgather_posts + extra_src_posts ; - - - mca_bcol_basesmuma_portals_post_msg(cs, my_lmsg_ctl_pointer, - my_userbuf, my_lmsg_ctl_pointer->userbuf_length, - allgather_eq_h, total_msg_posts , blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE - ); - msg_posted = true; - } - - - ready_flag++; - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - - /* - * Recursive doubling allgather implementation - */ - for( i = 1; i < pow_2_levels; i++) { - /* get my partner for this level */ - partner = my_rank^(1<flag >= ready_flag); - - if (partner_lmsg_ctl_pointer->offset < my_lmsg_ctl_pointer->offset) { - global_sg_offset -= length; - local_sg_offset = global_sg_offset; - } else { - local_sg_offset = global_sg_offset + length; - } - - - BASESMUMA_VERBOSE(10,("Allgather Phase: Get message from process %d, length %d", partner, length)); - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, my_lmsg_ctl_pointer, - partner_lmsg_ctl_pointer,local_sg_offset, - local_sg_offset, length); - - ready_flag++; - opal_atomic_wmb (); - my_ctl_pointer->flag = ready_flag; - - /* Block until partner completed this level of recursive-doubling stage */ - while(!IS_SG_DATA_READY(partner_ctl_pointer, ready_flag, sequence_number)) { - opal_progress(); - } - - /* - * Compute length for next recursive doubling phase - */ - length *= 2; - } - - - /* If I am source for non-power 2 children wait for them */ - /* If I am secondary root then my partner would be real root - * so no need for exchange of data with the extra partner */ - extra_partner = my_rank + pow_2 ; - if ((extra_partner < group_size) && (!secondary_root)) { - volatile mca_bcol_basesmuma_header_t *extra_partner_ctl_pointer = NULL; - - extra_partner_ctl_pointer = data_buffs[extra_partner].ctl_struct; - /* Block until extra partner has copied data */ - while(!IS_SG_DATA_READY(extra_partner_ctl_pointer, ready_flag, sequence_number)) { - opal_progress(); - } - - } - -Release: - - /* free the event queue */ - rc = PtlEQFree(allgather_eq_h); - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,("PtlEQFree() failed: %d )\n",rc)); - } - - my_ctl_pointer->starting_flag_value++; - input_args->status = FINISHED; - - return BCOL_FN_COMPLETE; - -} -#endif - -/* - * Blocking Portals Scatter Allgather - * - * - * - * - * - */ - -int bcol_basesmuma_lmsg_scatter_allgather_portals_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - - /* local variables */ - int i; - uint64_t length; - int my_rank, parent_rank, src =-1, matched = 0; - int *src_list = NULL; - int group_size = -1, dummy_group_size; - int first_instance=0; - int rc = OMPI_SUCCESS; - int leading_dim, buff_idx, idx; - int count=input_args->count; - size_t pack_len = 0, dt_size =0 ; - volatile int8_t ready_flag; - int flag_offset; - int pow_2, pow_2_levels; - int src_list_index = -1; - uint64_t fragment_size; /* user buffer size */ - int sg_matchbits; - - /* Input argument variables */ - void *my_userbuf = (void*)((unsigned char*)input_args->userbuf); - int64_t sequence_number=input_args->sequence_num; - struct ompi_datatype_t* dtype=input_args->dtype; - - /* Extra source variables */ - bool secondary_root = false; - int partner = -1, extra_partner = -1; - - /* Scatter Allgather offsets */ - uint64_t local_sg_offset = 0, global_sg_offset = 0, partner_offset = 0; - - /* Portals messaging relevant variables */ - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - ptl_handle_eq_t allgather_eq_h; - ptl_event_t allgather_event; - bool blocked_post = false; - bool msg_posted = false; - int total_msg_posts = -1, scatter_posts = -1, allgather_posts = -1, extra_src_posts = -1; - - /* OMPI module and component variables */ - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - mca_bcol_basesmuma_module_t *bcol_module = - (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - - /* Control structure and payload variables */ - volatile mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - volatile mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer = NULL; - volatile mca_bcol_basesmuma_ctl_struct_t *parent_ctl_pointer = NULL; /* binomial fanout */ - volatile mca_bcol_basesmuma_ctl_struct_t *partner_ctl_pointer = NULL; /* recursive double */ - - /* Make sure there userbuffer is not null */ - assert(my_userbuf != NULL); - - /* Get portals info*/ - portals_info = (mca_bcol_basesmuma_portal_proc_info_t*)cs->portals_info; - - /* Get addresing information */ - buff_idx = input_args->src_desc->buffer_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - my_rank = bcol_module->super.sbgp_partner_module->my_index; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - /* calculate the largest power of two that is smaller than - * or equal to the group size - */ - pow_2_levels = pow_sm_k(2,group_size, &(dummy_group_size)); - if( group_size < (1<colls_with_user_data.ctl_buffs+idx; - - - my_ctl_pointer = ctl_structs[my_rank]; - if(my_ctl_pointer->sequence_number < sequence_number) { - first_instance = 1; - } - - if(first_instance) { - for( i = 0; i < NUM_SIGNAL_FLAGS; i++){ - my_ctl_pointer->flags[i] = -1; - } - my_ctl_pointer->index = 1; - - my_ctl_pointer->starting_flag_value = 0; - flag_offset = 0; - - } else { - my_ctl_pointer->index++; - } - - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - /*ready_flag = flag_offset + sequence_number + 1;*/ - ready_flag = flag_offset + 1; - - my_ctl_pointer->sequence_number = sequence_number; - sg_matchbits = sequence_number ; - - /* Construct my portal buffer address and copy to payload buffer */ - mca_bcol_basesmuma_construct_portal_address(&my_ctl_pointer->portals_buf_addr, - portals_info->portal_id.nid, - portals_info->portal_id.pid, - sg_matchbits, - bcol_module->super.sbgp_partner_module->group_comm->c_contextid); - - my_ctl_pointer->portals_buf_addr.userbuf = my_userbuf; - my_ctl_pointer->portals_buf_addr.userbuf_length = fragment_size; - - - if (input_args->root_flag) { - my_ctl_pointer->offset = 0; - my_ctl_pointer->n_sends = pow_2_levels; - my_ctl_pointer->length = fragment_size; - - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &allgather_eq_h); - - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d \n",rc)); - goto Release; - } - - /* Compute number of posts required */ - if (my_rank >= pow_2) { - /* I am root and my rank is greater than pow_2, I will hand - * over to rank (that is < pow_2) to act as secondary root - */ - total_msg_posts = 1; - } - else { - - extra_src_posts = (my_rank + pow_2 < group_size ) ? 1: 0; - scatter_posts = my_ctl_pointer->n_sends; - allgather_posts = pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - } - - mca_bcol_basesmuma_portals_post_msg(cs, - &my_ctl_pointer->portals_buf_addr, - my_userbuf, fragment_size, allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - msg_posted = true ; - - /* important that these be set before my children - * see the ready flag raised - */ - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAGS] = ready_flag; - BASESMUMA_VERBOSE(1,("I am the root(ctl_pointer %x) of the data flag value %d",my_ctl_pointer, my_ctl_pointer->flag)); - /* Wait for my scatter partner */ - if (my_rank >= pow_2) { - int scatter_partner = -1; - volatile mca_bcol_basesmuma_ctl_struct_t *scatter_partner_ctl_pointer = NULL; - - scatter_partner = my_rank - pow_2; - scatter_partner_ctl_pointer = - ctl_structs[scatter_partner]; - - while(!IS_SG_DATA_READY(scatter_partner_ctl_pointer, ready_flag, - sequence_number)){ -SCATTER_WAIT_FOR_EXTRA: - opal_progress(); - } - - goto Release; - } - else { - - wait_for_peers_nb(my_rank, my_ctl_pointer->n_sends, ctl_structs, - ready_flag, sequence_number); - } - - goto Allgather; - } - - -Extra : - if( my_rank >= pow_2 ) { - parent_rank = my_rank & (pow_2-1); - parent_ctl_pointer = ctl_structs[parent_rank]; - - ready_flag = ready_flag + pow_2_levels; - - while(!IS_SG_DATA_READY(parent_ctl_pointer, ready_flag, sequence_number)) { - - opal_progress(); - - } - - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, &my_ctl_pointer->portals_buf_addr, - &parent_ctl_pointer->portals_buf_addr, 0, - 0, fragment_size); - - my_ctl_pointer->flags[BCAST_FLAG] = ready_flag; - - goto Release; - } - -Scatter: - - /* compute the list of possible sources */ - src_list = (int *) malloc(sizeof(int) * (pow_2_levels + 1)); - for( i = 0; i < pow_2_levels; i++) { - src_list[i] = my_rank ^ (1< pow_2 */ - if ((my_rank + pow_2) < group_size) { - src_list[i] = my_rank + pow_2; - } else { - src_list[i] = -1; - } - -Probe: - - /* If I am not the root, then poll on possible "senders'" control structs */ - /* For portals we block for now */ - while (!matched) { - /* Shared memory iprobe */ - SG_LARGE_MSG_NB_PROBE(src_list, pow_2_levels + 1, - src_list_index, matched, src, ctl_structs, - parent_ctl_pointer, ready_flag, sequence_number); - } - - BASESMUMA_VERBOSE(1,("Scatter : Im non-root match received")); - /* If I am a secondary root */ - if ((matched) && (src == pow_2 + my_rank)) { - volatile mca_bcol_basesmuma_ctl_struct_t *extra_src_ctl_pointer = NULL; - - secondary_root = true; - BASESMUMA_VERBOSE(10,("I am the secondary root for the data")); - my_ctl_pointer->offset = 0; - my_ctl_pointer->n_sends = pow_2_levels; - my_ctl_pointer->length = fragment_size; - - extra_src_ctl_pointer = ctl_structs[src]; - - /* create an event queue for the incoming buffer */ - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &allgather_eq_h); - - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d \n",rc)); - goto Release; - } - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, - &my_ctl_pointer->portals_buf_addr, - &extra_src_ctl_pointer->portals_buf_addr, 0, - 0, fragment_size); - - - extra_src_posts = 0; - scatter_posts = my_ctl_pointer->n_sends; - allgather_posts = pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - mca_bcol_basesmuma_portals_post_msg(cs, - &my_ctl_pointer->portals_buf_addr, - my_userbuf, fragment_size, allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | PTL_MD_OP_GET - | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - msg_posted = true ; - - /* important that these be set before my children - * see the ready flag raised - */ - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAG] = ready_flag; - - wait_for_peers_nb(my_rank, my_ctl_pointer->n_sends, ctl_structs, - ready_flag, sequence_number); - goto Allgather; - } - - /* we need to see whether this is really - * who we are looking for - */ - for( i = 0; i < parent_ctl_pointer->n_sends; i++) { - uint64_t local_offset = 0; - uint64_t remote_offset = 0; - - BASESMUMA_VERBOSE(1,("%d found it from %d \n",my_rank,src)); - - if( my_rank == (src^(1<n_sends = i; - - /* Am I source for other process during scatter phase */ - if ( i > 0) { - - /* compute the size of the chunk to copy */ - length = (parent_ctl_pointer->length)/ - (1<<(parent_ctl_pointer->n_sends - my_ctl_pointer->n_sends)); - my_ctl_pointer->length = length; - my_ctl_pointer->offset = - parent_ctl_pointer->offset + length; - - - local_offset = my_ctl_pointer->offset; - remote_offset = parent_ctl_pointer->offset + length; - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, &my_ctl_pointer->portals_buf_addr, - &parent_ctl_pointer->portals_buf_addr,local_offset, - remote_offset, length); - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, - &allgather_eq_h); - - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d \n",rc)); - goto Release; - } - - /* Now post the message for other children to read */ - extra_src_posts = (my_rank + pow_2 < group_size ) ? 1: 0; - scatter_posts = my_ctl_pointer->n_sends; - allgather_posts = pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - - mca_bcol_basesmuma_portals_post_msg(cs, &my_ctl_pointer->portals_buf_addr, - my_userbuf, my_ctl_pointer->portals_buf_addr.userbuf_length, - allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE - ); - msg_posted = true; - /* set the memory barrier to ensure completion */ - opal_atomic_wmb (); - /* signal that I am done */ - my_ctl_pointer->flags[BCAST_FLAG] = ready_flag; - - wait_for_peers_nb(my_rank, my_ctl_pointer->n_sends, ctl_structs, - ready_flag, sequence_number); - - } else { - /* takes care of first level recurssive double */ - length = parent_ctl_pointer->length/ - (1<<(parent_ctl_pointer->n_sends - 1)); - my_ctl_pointer->length = length; - my_ctl_pointer->offset = parent_ctl_pointer->offset; - - local_offset = my_ctl_pointer->offset; - remote_offset = my_ctl_pointer->offset; - - - while(!IS_SG_DATA_READY(parent_ctl_pointer, ready_flag, sequence_number)) { - opal_progress(); - } - - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, - &my_ctl_pointer->portals_buf_addr, - &parent_ctl_pointer->portals_buf_addr, local_offset, - remote_offset, length); - - /* signal that I am done reading data from parent */ - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAG] = ready_flag; - } - - /* time for allgather phase */ - input_args->status = ALLGATHER; - - BASESMUMA_VERBOSE(5,("Completed %d found it from %d \n",my_rank,src)); - - while(ready_flag > parent_ctl_pointer->flags[BCAST_FLAG]); - - goto Allgather; - } - } - - { - /* this is not who we are looking for, - * mark as false positive so we don't - * poll here again - */ - src_list[src_list_index] = -1; - matched = 0; - goto Probe; - } - -Allgather: - - BASESMUMA_VERBOSE(5,(" %d Completed Scatter %d times \n", my_rank, completed_scatter)); - - /* zip it back up - we have already taken care of first level */ - global_sg_offset = my_ctl_pointer->offset; - - /* first level of zip up */ - length = 2 * fragment_size/pow_2; - - - if (!msg_posted) { - rc = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &allgather_eq_h); - - /* Posting for all phases of recursive doubling */ - extra_src_posts = (my_rank + pow_2 < group_size ) ? 1: 0; - allgather_posts = pow_2_levels - 1; - total_msg_posts = allgather_posts + extra_src_posts ; - - - mca_bcol_basesmuma_portals_post_msg(cs, &my_ctl_pointer->portals_buf_addr, - my_userbuf, my_ctl_pointer->portals_buf_addr.userbuf_length, - allgather_eq_h, total_msg_posts , blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE - ); - msg_posted = true; - } - - ready_flag++; - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAG] = ready_flag; - - for( i = 1; i < pow_2_levels; i++) { - /* get my partner for this level */ - partner = my_rank^(1<flags[BCAST_FLAG] >= ready_flag); - - if (partner_ctl_pointer->offset < my_ctl_pointer->offset) { - global_sg_offset -= length; - local_sg_offset = global_sg_offset; - } else { - local_sg_offset = global_sg_offset + length; - } - - - BASESMUMA_VERBOSE(10,("Allgather Phase: Get message from process %d, length %d", partner, length)); - mca_bcol_basesmuma_portals_get_msg_fragment_no_eq_h(cs, - &my_ctl_pointer->portals_buf_addr, - &partner_ctl_pointer->portals_buf_addr,local_sg_offset, - local_sg_offset, length); - - ready_flag++; - opal_atomic_wmb (); - my_ctl_pointer->flags[BCAST_FLAG] = ready_flag; - - /* Block until partner is at this level of recursive-doubling stage */ - while(!IS_SG_DATA_READY(partner_ctl_pointer, ready_flag, sequence_number)) { - opal_progress(); - } - - /* double the length */ - length *= 2; - } - - - /* If I am source for non-power 2 children wait for them */ - /* If I am secondary root then my partner would be real root - * so no need for exchange of data with the extra partner */ - extra_partner = my_rank + pow_2 ; - if ((extra_partner < group_size) && (!secondary_root)) { - volatile mca_bcol_basesmuma_ctl_struct_t *extra_partner_ctl_pointer = NULL; - - extra_partner_ctl_pointer = ctl_structs[extra_partner]; - /* Block until extra partner has copied data */ - while(!IS_SG_DATA_READY(extra_partner_ctl_pointer, ready_flag, sequence_number)) { - opal_progress(); - } - - } - -Release: - - /* free the event queue */ - rc = PtlEQFree(allgather_eq_h); - if (rc != PTL_OK) { - BASESMUMA_VERBOSE(10,("PtlEQFree() failed: %d )\n",rc)); - } - - my_ctl_pointer->starting_flag_value++; - input_args->status = FINISHED; - - return BCOL_FN_COMPLETE; - -} - - -/* - * static sg_state_t *sg_state = NULL; - */ - -int bcol_basesmuma_lmsg_scatter_allgather_portals_nb_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - int i; - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - int dummy_group_size; - int rc = OMPI_SUCCESS; - int buff_idx; - int count=input_args->count; - size_t pack_len = 0, dt_size =0 ; - struct ompi_datatype_t* dtype=input_args->dtype; - int completed_posts = 0; - sg_state_t *sg_state = NULL; - mca_bcol_basesmuma_module_t *bcol_module = NULL; - int extra_src_posts = -1,allgather_posts = -1, total_msg_posts = -1; - - bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - /* - sg_state = (sg_state_t*)bcol_module->sg_state; - */ - sg_state = (sg_state_t*)&(bcol_module->sg_state); - /* Re-entering the algorithm */ - switch (sg_state->phase) { - case PROBE: - if (input_args->root_flag) { - /* I became a root for this group */ - sg_state->phase = START; - goto Start; - } - goto Probe; - break; - - case SCATTER_ROOT_WAIT: - goto Scatter_root_wait; - - case SCATTER_EXTRA_ROOT_WAIT: - goto Scatter_extra_root_wait; - - case SCATTER_PARENT_WAIT: - goto Scatter_parent_wait; - - default: - break; - } - - sg_state->phase = INIT; - - BASESMUMA_VERBOSE(1,("Im entering portals_nb_bcast Unknown root ")); - /* Allocate space for algorithm state */ - /* - sg_state = (sg_state_t *) malloc(sizeof(sg_state_t)); - bcol_module->sg_state = (void *)sg_state; - - assert(NULL != sg_state); - */ - - sg_state->secondary_root = false; - sg_state->msg_posted = false; - sg_state->matched = 0; - sg_state->phase = SCATTER; - /* Copy input args to local variables */ - sg_state->my_userbuf = (void*)((unsigned char*)input_args->userbuf); - assert(sg_state->my_userbuf != NULL); - sg_state->sequence_number=input_args->sequence_num; - sg_state->cs = &mca_bcol_basesmuma_component; - sg_state->bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - /* Should this be buffer index (ML) or control buffer index ? */ - buff_idx = input_args->src_desc->buffer_index; - - /* Initialize SM group info used for control signaling */ - init_sm_group_info(sg_state, buff_idx); - - /* calculate the largest power of two that is smaller than - * or equal to the group size - */ - sg_state->pow_2_levels = pow_sm_k(2, sg_state->group_size, &(dummy_group_size)); - if( sg_state->group_size < (1 << sg_state->pow_2_levels)) { - sg_state->pow_2_levels--; - } - /* power-of-two group size */ - sg_state->pow_2 = 1 << sg_state->pow_2_levels; - - - /* we will work only on packed data - so compute the length*/ - ompi_datatype_type_size(dtype, &dt_size); - sg_state->fragment_size = count*dt_size; - - - /* Init portals scatter allgather info */ - rc = init_sm_portals_sg_info(sg_state); - - if (rc != OMPI_SUCCESS) { - goto Release; - } - -Start : -Extra : - /* - * My rank > pow2 groupsize - */ - if( sg_state->my_rank >= sg_state->pow_2 ) { - - if (input_args->root_flag){ - - rc = sm_portals_extra_root_scatter(sg_state); - if (rc != OMPI_SUCCESS) { - goto Release; - } - - } else { - /* - * Wait for my partner to receive bcast data, and copy from it - */ - int extra_parent_rank; - volatile mca_bcol_basesmuma_ctl_struct_t *extra_parent_ctl_pointer = NULL; /* binomial fanout */ - extra_parent_rank = sg_state->my_rank & (sg_state->pow_2-1); - extra_parent_ctl_pointer = sg_state->ctl_structs[extra_parent_rank]; - - sg_state->ready_flag = sg_state->ready_flag + sg_state->pow_2_levels; - - while(!IS_SG_DATA_READY(extra_parent_ctl_pointer, sg_state->ready_flag, - sg_state->sequence_number)) { - opal_progress(); - - } - - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &extra_parent_ctl_pointer->portals_buf_addr, 0, - 0, sg_state->fragment_size); - - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - } - - goto Release; - } - - if (input_args->root_flag) { - - BASESMUMA_VERBOSE(1,("Scatter : Im root (bcol_module %x,ctl_pointer %x) my ready flag %d \n", - sg_state->bcol_module, sg_state->my_ctl_pointer, sg_state->ready_flag)); - rc = sm_portals_root_scatter(sg_state); - - /* gvm Fix: Redudant - opal_atomic_wmb (); - */ - - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - if (rc != OMPI_SUCCESS) { - goto Release; - } - -Scatter_root_wait: - - BASESMUMA_VERBOSE(5,("Scatter: Im root waiting for children to complete my flag %d", - sg_state->my_ctl_pointer->flag)); - - for( i = 0; i < sg_state->cs->num_to_probe && completed_posts < sg_state->my_ctl_pointer->n_sends; - i++) { - - completed_posts = wait_for_post_complete_nb(sg_state->my_rank, - sg_state->my_ctl_pointer->n_sends, sg_state->ctl_structs, - sg_state->ready_flag, sg_state->sequence_number); - - } - - if (completed_posts < sg_state->my_ctl_pointer->n_sends) { - sg_state->phase = SCATTER_ROOT_WAIT; - return BCOL_FN_STARTED; - } - - goto Allgather; - } - - -Scatter: - - BASESMUMA_VERBOSE(1,("Scatter : Im non-root probing for data ")); - /* compute the list of possible sources */ - /* - sg_state->src_list = (int *) malloc(sizeof(int) * (sg_state->pow_2_levels + 1)); - */ - assert(MAX_SM_GROUP_SIZE > sg_state->pow_2_levels+1); - - for( i = 0; i < sg_state->pow_2_levels; i++) { - sg_state->src_list[i] = sg_state->my_rank ^ (1< pow_2 */ - - if ((sg_state->my_rank + sg_state->pow_2) < sg_state->group_size) { - sg_state->src_list[i] = sg_state->my_rank + sg_state->pow_2; - } else { - sg_state->src_list[i] = -1; - } - - - BASESMUMA_VERBOSE(1,("Scatter : Ready flag %d Im non-root probing for %d procs %d:%d \n", - sg_state->ready_flag,sg_state->pow_2_levels,sg_state->src_list[0],sg_state->src_list[1])); -Probe: - /* If I am not the root, then poll on possible "senders'" control structs */ - /* For portals we block for now */ - /* Shared memory iprobe */ - - - /* - SG_LARGE_MSG_NB_PROBE(sg_state->src_list, sg_state->pow_2_levels + 1, - sg_state->src_list_index, sg_state->matched, sg_state->src, - sg_state->ctl_structs, - sg_state->parent_ctl_pointer, sg_state->ready_flag, sg_state->sequence_number); - */ - - for( i = 0; i < sg_state->cs->num_to_probe && 0 == sg_state->matched; - i++) { - sg_large_msg_probe(sg_state); - } - - if (!sg_state->matched) { - sg_state->phase = PROBE; - return BCOL_FN_STARTED; - } - - BASESMUMA_VERBOSE(1,("Scatter : Im non-root match received")); - /* If I am a secondary root */ - if ((sg_state->matched) && (sg_state->src == sg_state->pow_2 + sg_state->my_rank)) { - - BASESMUMA_VERBOSE(5,("Scatter : Im secondary root \n")); - - rc = sm_portals_secondary_root_scatter(sg_state); - if (rc != OMPI_SUCCESS) { - goto Release; - } - -Scatter_extra_root_wait: - - for( i = 0; i < sg_state->cs->num_to_probe && completed_posts < sg_state->my_ctl_pointer->n_sends; - i++) { - - completed_posts = wait_for_post_complete_nb(sg_state->my_rank, sg_state->my_ctl_pointer->n_sends, - sg_state->ctl_structs, sg_state->ready_flag, sg_state->sequence_number); - - } - - if (completed_posts < sg_state->my_ctl_pointer->n_sends) { - sg_state->phase = SCATTER_EXTRA_ROOT_WAIT; - return BCOL_FN_STARTED; - } - - goto Allgather; - } - - /* we need to see whether this is really - * who we are looking for - */ - for( i = 0; i < sg_state->parent_ctl_pointer->n_sends; i++) { - uint64_t local_offset = 0; - uint64_t remote_offset = 0; - - BASESMUMA_VERBOSE(5,("%d found it from %d \n",sg_state->my_rank,sg_state->src)); - - if( sg_state->my_rank == (sg_state->src^(1<parent_ctl_pointer = sg_state->ctl_structs[sg_state->src]; - - /* we found our root within the group ... */ - BASESMUMA_VERBOSE(5,("Shared memory probe was matched, the root is %d ",sg_state->src)); - - sg_state->my_ctl_pointer->n_sends = i; - - /* Am I source for other process during scatter phase */ - if ( i > 0) { - BASESMUMA_VERBOSE(1,("Scatter : Im Internal node \n")); - - rc = sm_portals_internode_scatter(sg_state); - - if (rc != OMPI_SUCCESS) { - goto Release; - } - -Scatter_parent_wait: - - for( i = 0; i < sg_state->cs->num_to_probe && completed_posts < sg_state->my_ctl_pointer->n_sends; - i++) { - - completed_posts = wait_for_post_complete_nb(sg_state->my_rank, - sg_state->my_ctl_pointer->n_sends, - sg_state->ctl_structs, - sg_state->ready_flag, sg_state->sequence_number); - } - - if (completed_posts < sg_state->my_ctl_pointer->n_sends) { - sg_state->phase = SCATTER_PARENT_WAIT; - return BCOL_FN_STARTED; - } - - } else { - - BASESMUMA_VERBOSE(1,("Scatter : Im leaf node \n")); - - /* takes care of first level recurssive double */ - sg_state->length = sg_state->parent_ctl_pointer->length/ - (1<<(sg_state->parent_ctl_pointer->n_sends - 1)); - sg_state->my_ctl_pointer->length = sg_state->length; - sg_state->my_ctl_pointer->offset = sg_state->parent_ctl_pointer->offset; - - - while(!IS_SG_DATA_READY(sg_state->parent_ctl_pointer, - sg_state->ready_flag, sg_state->sequence_number)) { - opal_progress(); - } - - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &sg_state->parent_ctl_pointer->portals_buf_addr, - sg_state->my_ctl_pointer->offset, - sg_state->my_ctl_pointer->offset, sg_state->length); - - /* signal that I am done reading data from parent */ - /* - opal_atomic_wmb (); - */ - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - } - - BASESMUMA_VERBOSE(1,("Completed %d found it from %d \n", - sg_state->my_rank, sg_state->src)); - - while(sg_state->ready_flag > sg_state->parent_ctl_pointer->flag); - - goto Allgather; - } - } - - { - /* this is not who we are looking for, - * mark as false positive so we don't - * poll here again - */ - sg_state->src_list[sg_state->src_list_index] = -1; - sg_state->matched = 0; - goto Probe; - } - -Allgather: - - BASESMUMA_VERBOSE(5,("Completed Scatter phase")); - - /* zip it back up - we have already taken care of first level */ - sg_state->global_sg_offset = sg_state->my_ctl_pointer->offset; - - /* first level of zip up */ - sg_state->length = 2 * sg_state->fragment_size/sg_state->pow_2; - - - /* Posting for all phases of recursive doubling */ - extra_src_posts = (sg_state->my_rank + sg_state->pow_2 < sg_state->group_size ) ? 1: 0; - allgather_posts = sg_state->pow_2_levels - 1; - total_msg_posts = allgather_posts + extra_src_posts ; - - if ((!sg_state->msg_posted) && (total_msg_posts > 0)){ - - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->my_ctl_pointer->portals_buf_addr.userbuf_length, - PTL_EQ_NONE, total_msg_posts, blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE - ); - sg_state->msg_posted = true; - } - - BASESMUMA_VERBOSE(5,("Done with allgather phase")); - /* I reached an allgather phase */ - sg_state->ready_flag++; - opal_atomic_wmb (); - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - rc = sm_portals_bcasts_allgather_phase(sg_state); - - if (rc != OMPI_SUCCESS) { - BASESMUMA_VERBOSE(10,("Error in Bcast's allgather phase ")); - goto Release; - } - - /* If I am source for non-power 2 children wait for them */ - /* If I am secondary root then my partner would be real root - * so no need for exchange of data with the extra partner */ - sg_state->extra_partner = sg_state->my_rank + sg_state->pow_2 ; - if ((sg_state->extra_partner < sg_state->group_size) && (!sg_state->secondary_root)) { - - sg_state->extra_partner_ctl_pointer = sg_state->ctl_structs[sg_state->extra_partner]; - /* Block until extra partner has copied data */ - while(!IS_SG_DATA_READY(sg_state->extra_partner_ctl_pointer, - sg_state->ready_flag, sg_state->sequence_number)) { - opal_progress(); - } - - } - -Release: - - BASESMUMA_VERBOSE(1,("Im done ")); - - sg_state->my_ctl_pointer->starting_flag_value++; - sg_state->phase = FINISHED; - - - return BCOL_FN_COMPLETE; - -} - - -int bcol_basesmuma_lmsg_scatter_allgather_portals_nb_knownroot_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - - int i; - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - int dummy_group_size; - int rc = OMPI_SUCCESS; - int buff_idx; - int count=input_args->count; - size_t pack_len = 0, dt_size =0 ; - struct ompi_datatype_t* dtype=input_args->dtype; - int completed_posts = 0; - sg_state_t *sg_state = NULL; - mca_bcol_basesmuma_module_t *bcol_module=NULL; - int extra_src_posts = -1,allgather_posts = -1, total_msg_posts = -1; - bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - - sg_state = (sg_state_t*)(&bcol_module->sg_state); - - BASESMUMA_VERBOSE(1,("Im entering nb_knownroot_bcast bcol = %x ", - c_input_args->bcol_module)); - /* Re-entering the algorithm */ - switch (sg_state->phase) { - case PROBE: - if (input_args->root_flag) { - /* I became a root for this group */ - sg_state->phase = START; - goto Start; - } - goto Probe; - break; - - case SCATTER_ROOT_WAIT: - goto Scatter_root_wait; - - case SCATTER_EXTRA_ROOT_WAIT: - goto Scatter_extra_root_wait; - - case SCATTER_PARENT_WAIT: - goto Scatter_parent_wait; - - default: - break; - } - - /* Allocate space for algorithm state */ - /* - sg_state = (sg_state_t *) malloc(sizeof(sg_state_t)); - bcol_module->sg_state = (void*) sg_state; - */ - - /* Make sure there userbuffer is not null */ - - sg_state->phase = INIT; - sg_state->secondary_root = false; - sg_state->msg_posted = false; - sg_state->matched = 0; - /* Copy input args to local variables */ - sg_state->my_userbuf = (void*)((unsigned char*)input_args->userbuf); - assert(sg_state->my_userbuf != NULL); - sg_state->sequence_number=input_args->sequence_num; - sg_state->cs = &mca_bcol_basesmuma_component; - sg_state->bcol_module = bcol_module; - buff_idx = input_args->src_desc->buffer_index; - - /* Initialize SM group info used for control signaling */ - init_sm_group_info(sg_state, buff_idx); - - /* calculate the largest power of two that is smaller than - * or equal to the group size - */ - sg_state->pow_2_levels = pow_sm_k(2, sg_state->group_size, &(dummy_group_size)); - if( sg_state->group_size < (1 << sg_state->pow_2_levels)) { - sg_state->pow_2_levels--; - } - /* power-of-two group size */ - sg_state->pow_2 = 1 << sg_state->pow_2_levels; - - - /* we will work only on packed data - so compute the length*/ - ompi_datatype_type_size(dtype, &dt_size); - sg_state->fragment_size = count*dt_size; - - - /* Init portals scatter allgather info */ - rc = init_sm_portals_sg_info(sg_state); - - if (rc != OMPI_SUCCESS) { - goto Release; - } -Start: -Extra : - /* - * My rank > pow2 groupsize - */ - if( sg_state->my_rank >= sg_state->pow_2 ) { - - if (input_args->root_flag){ - - rc = sm_portals_extra_root_scatter(sg_state); - if (rc != OMPI_SUCCESS) { - goto Release; - } - - } else { - /* - * Wait for my partner to receive bcast data, and copy from it - */ - int extra_parent_rank; - volatile mca_bcol_basesmuma_ctl_struct_t *extra_parent_ctl_pointer = NULL; /* binomial fanout */ - extra_parent_rank = sg_state->my_rank & (sg_state->pow_2-1); - extra_parent_ctl_pointer = sg_state->ctl_structs[extra_parent_rank]; - - sg_state->ready_flag = sg_state->ready_flag + sg_state->pow_2_levels; - - while(!IS_SG_DATA_READY(extra_parent_ctl_pointer, sg_state->ready_flag, - sg_state->sequence_number)) { - opal_progress(); - - } - - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &extra_parent_ctl_pointer->portals_buf_addr, 0, - 0, sg_state->fragment_size); - - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - } - - goto Release; - } - - if (input_args->root_flag) { - - BASESMUMA_VERBOSE(1,("Scatter : Im root (bcol_module %x,ctl_pointer %x) my ready flag %d \n", - bcol_module, sg_state->my_ctl_pointer, sg_state->ready_flag)); - rc = sm_portals_root_scatter(sg_state); - - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - if (rc != OMPI_SUCCESS) { - goto Release; - } - -Scatter_root_wait: - - BASESMUMA_VERBOSE(5,("Scatter: Im root waiting for children to complete my flag %d", - sg_state->my_ctl_pointer->flag)); - for( i = 0; i < sg_state->cs->num_to_probe && completed_posts < sg_state->my_ctl_pointer->n_sends; - i++) { - completed_posts = wait_for_post_complete_nb(sg_state->my_rank, - sg_state->my_ctl_pointer->n_sends, sg_state->ctl_structs, - sg_state->ready_flag, sg_state->sequence_number); - } - - if (completed_posts < sg_state->my_ctl_pointer->n_sends) { - sg_state->phase = SCATTER_ROOT_WAIT; - return BCOL_FN_STARTED; - } - - goto Allgather; - } - - -Probe: - - sg_state->src = compute_src_from_root(input_args->root_route->rank, sg_state->my_rank, - sg_state->pow_2, sg_state->group_size); - - sg_state->parent_ctl_pointer = sg_state->ctl_structs[sg_state->src]; - - while(!IS_SG_DATA_READY(sg_state->parent_ctl_pointer, sg_state->ready_flag, - sg_state->sequence_number)) { - opal_progress(); - - } - sg_state->matched = true; - - /* If I am a secondary root */ - if ((sg_state->matched) && (sg_state->src == sg_state->pow_2 + sg_state->my_rank)) { - - rc = sm_portals_secondary_root_scatter(sg_state); - if (rc != OMPI_SUCCESS) { - goto Release; - } -Scatter_extra_root_wait: - - for( i = 0; i < sg_state->cs->num_to_probe && completed_posts < sg_state->my_ctl_pointer->n_sends; - i++) { - - completed_posts = wait_for_post_complete_nb(sg_state->my_rank, sg_state->my_ctl_pointer->n_sends, - sg_state->ctl_structs, sg_state->ready_flag, sg_state->sequence_number); - - } - - if (completed_posts < sg_state->my_ctl_pointer->n_sends) { - sg_state->phase = SCATTER_EXTRA_ROOT_WAIT; - return BCOL_FN_STARTED; - } - - goto Allgather; - } - - /* we need to see whether this is really - * who we are looking for - */ - for( i = 0; i < sg_state->parent_ctl_pointer->n_sends; i++) { - uint64_t local_offset = 0; - uint64_t remote_offset = 0; - - BASESMUMA_VERBOSE(5,("%d found it from %d \n",sg_state->my_rank,sg_state->src)); - - if( sg_state->my_rank == (sg_state->src^(1<parent_ctl_pointer = sg_state->ctl_structs[sg_state->src]; - - /* we found our root within the group ... */ - BASESMUMA_VERBOSE(10,("Shared memory probe was matched, the root is %d ",sg_state->src)); - - sg_state->my_ctl_pointer->n_sends = i; - - /* Am I source for other process during scatter phase */ - if ( i > 0) { - - rc = sm_portals_internode_scatter(sg_state); - - if (rc != OMPI_SUCCESS) { - goto Release; - } -Scatter_parent_wait: - - for( i = 0; i < sg_state->cs->num_to_probe && completed_posts < sg_state->my_ctl_pointer->n_sends; - i++) { - - completed_posts = wait_for_post_complete_nb(sg_state->my_rank, - sg_state->my_ctl_pointer->n_sends, - sg_state->ctl_structs, - sg_state->ready_flag, sg_state->sequence_number); - } - - if (completed_posts < sg_state->my_ctl_pointer->n_sends) { - sg_state->phase = SCATTER_PARENT_WAIT; - return BCOL_FN_STARTED; - } - - } else { - - /* takes care of first level recursive double */ - sg_state->length = sg_state->parent_ctl_pointer->length/ - (1<<(sg_state->parent_ctl_pointer->n_sends - 1)); - sg_state->my_ctl_pointer->length = sg_state->length; - sg_state->my_ctl_pointer->offset = sg_state->parent_ctl_pointer->offset; - - - while(!IS_SG_DATA_READY(sg_state->parent_ctl_pointer, - sg_state->ready_flag, sg_state->sequence_number)) { - opal_progress(); - } - - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &sg_state->parent_ctl_pointer->portals_buf_addr, - sg_state->my_ctl_pointer->offset, - sg_state->my_ctl_pointer->offset, sg_state->length); - - /* signal that I am done reading data from parent */ - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - } - - BASESMUMA_VERBOSE(5,("Completed %d found it from %d \n", - sg_state->my_rank, sg_state->src)); - - while(sg_state->ready_flag > sg_state->parent_ctl_pointer->flag); - - goto Allgather; - } - } - - { - /* this is not who we are looking for, - * mark as false positive so we don't - * poll here again - */ - sg_state->src_list[sg_state->src_list_index] = -1; - sg_state->matched = 0; - goto Probe; - } - -Allgather: - - /* zip it back up - we have already taken care of first level */ - sg_state->global_sg_offset = sg_state->my_ctl_pointer->offset; - - /* first level of zip up */ - sg_state->length = 2 * sg_state->fragment_size/sg_state->pow_2; - - /* Posting for all phases of recursive doubling */ - extra_src_posts = (sg_state->my_rank + sg_state->pow_2 < sg_state->group_size ) ? 1: 0; - allgather_posts = sg_state->pow_2_levels - 1; - total_msg_posts = allgather_posts + extra_src_posts ; - - if ((!sg_state->msg_posted) && (total_msg_posts > 0)){ - - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->my_ctl_pointer->portals_buf_addr.userbuf_length, - PTL_EQ_NONE, total_msg_posts, blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE - ); - sg_state->msg_posted = true; - } - - sg_state->ready_flag++; - opal_atomic_wmb (); - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - rc = sm_portals_bcasts_allgather_phase(sg_state); - - if (rc != OMPI_SUCCESS) { - BASESMUMA_VERBOSE(10,("Error in Bcast's allgather phase ")); - goto Release; - } - - /* If I am source for non-power 2 children wait for them */ - /* If I am secondary root then my partner would be real root - * so no need for exchange of data with the extra partner */ - sg_state->extra_partner = sg_state->my_rank + sg_state->pow_2 ; - if ((sg_state->extra_partner < sg_state->group_size) && (!sg_state->secondary_root)) { - - sg_state->extra_partner_ctl_pointer = sg_state->ctl_structs[sg_state->extra_partner]; - /* Block until extra partner has copied data */ - while(!IS_SG_DATA_READY(sg_state->extra_partner_ctl_pointer, - sg_state->ready_flag, sg_state->sequence_number)) { - opal_progress(); - } - - } - -Release: - - BASESMUMA_VERBOSE(1,("Im done ")); - - sg_state->my_ctl_pointer->starting_flag_value++; - sg_state->phase = FINISHED; - - return BCOL_FN_COMPLETE; - -} -#endif /* __PORTALS_AVAIL__ */ diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.h b/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.h deleted file mode 100644 index d15851b036b..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_bcast.h +++ /dev/null @@ -1,626 +0,0 @@ -#ifdef __PORTALS_AVAIL__ -#define __PORTALS_ENABLE__ - -#include - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -#include "bcol_basesmuma_utils.h" -#include "bcol_basesmuma_portals.h" -#include "bcol_basesmuma.h" - -#if 0 -struct scatter_allgather_nb_bcast_state_t -{ - /* local variables */ - uint64_t length; - int my_rank, src, matched; - int *src_list; - int group_size; - int64_t ready_flag; - int pow_2, pow_2_levels; - int src_list_index; - uint64_t fragment_size; /* user buffer size */ - - /* Input argument variables */ - void *my_userbuf; - int64_t sequence_number; - - /* Extra source variables */ - bool secondary_root; - int partner , extra_partner; - - /* Scatter Allgather offsets */ - uint64_t local_sg_offset , global_sg_offset , partner_offset ; - - /* Portals messaging relevant variables */ - ptl_handle_eq_t allgather_eq_h; - ptl_handle_eq_t read_eq; - ptl_event_t allgather_event; - bool msg_posted; - - /* OMPI module and component variables */ - mca_bcol_basesmuma_component_t *cs; - mca_bcol_basesmuma_module_t *bcol_module; - - /* Control structure and payload variables */ - volatile mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - volatile mca_bcol_basesmuma_ctl_struct_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_ctl_struct_t *parent_ctl_pointer; /* scatter source */ - volatile mca_bcol_basesmuma_ctl_struct_t *extra_partner_ctl_pointer; /* scatter source */ - - int phase; -}; - -typedef struct scatter_allgather_nb_bcast_state_t sg_state_t; -#endif - -bool blocked_post = false; - -#define IS_SG_DATA_READY(peer, my_flag, my_sequence_number) \ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[BCAST_FLAG] >= (my_flag) \ - )? true : false ) - - - -#define SG_LARGE_MSG_PROBE(src_list, n_src, src_list_index, matched, \ - src, data_buffs, data_src_ctl_pointer, \ - data_src_lmsg_ctl_pointer, ready_flag, \ - sequence_number) \ -do { \ - int j; \ - for( j = 0; j < n_src; j++) { \ - if(src_list[j] != -1) { \ - data_src_ctl_pointer = data_buffs[src_list[j]].ctl_struct; \ - data_src_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t*) \ - data_buffs[src_list[j]].payload; \ - if( IS_SG_DATA_READY(data_src_ctl_pointer,ready_flag,sequence_number)) { \ - src = src_list[j]; \ - matched = 1; \ - src_list_index = j; \ - break; \ - } \ - } \ - } \ -} while(0) - -#define SG_LARGE_MSG_NB_PROBE(src_list, n_src, src_list_index, matched, \ - src, ctl_structs, data_src_ctl_pointer, \ - ready_flag, sequence_number) \ -do { \ - int j; \ - for( j = 0; j < n_src; j++) { \ - if(src_list[j] != -1) { \ - data_src_ctl_pointer = ctl_structs[src_list[j]]; \ - if( IS_SG_DATA_READY(data_src_ctl_pointer,ready_flag,sequence_number)) { \ - src = src_list[j]; \ - matched = 1; \ - src_list_index = j; \ - break; \ - } \ - } \ - } \ -} while(0) - - - - - -static inline __opal_attribute_always_inline__ -int wait_for_peers(int my_rank, int npeers, volatile mca_bcol_basesmuma_payload_t *data_buffs, - int flag_value, int sn) -{ - int *peers_list = NULL; - int counter = 0, diter = 0; - volatile mca_bcol_basesmuma_header_t *peer_ctl_pointer = NULL; - - peers_list = (int *)malloc(sizeof(int) * npeers); - - for (diter = 0; diter < npeers; diter++ ){ - peers_list[diter] = my_rank ^ (1<pow_2_levels+1; - - - for( j = 0; j < n_src; j++) { - if(sg_state->src_list[j] != -1) { - sg_state->parent_ctl_pointer = sg_state->ctl_structs[sg_state->src_list[j]]; - - BASESMUMA_VERBOSE(5,("Parent %d ctl pointer (parent=%x, my ctl=%x) flag %d", - sg_state->src_list[j],sg_state->parent_ctl_pointer, - sg_state->my_ctl_pointer, - sg_state->parent_ctl_pointer->flag)); - - if (IS_SG_DATA_READY(sg_state->parent_ctl_pointer, - sg_state->ready_flag, sg_state->sequence_number)) { - sg_state->src = sg_state->src_list[j]; - sg_state->matched = 1; - sg_state->src_list_index = j; - break; - } - } - } - - return 0; -} -/* - * I will post message for all the my children - */ -static inline __opal_attribute_always_inline__ -int sm_portals_root_scatter(sg_state_t *sg_state) -{ - int extra_src_posts = -1, scatter_posts = -1, allgather_posts = -1, - total_msg_posts = -1; - - BASESMUMA_VERBOSE(10,("I am the root of the data")); - sg_state->my_ctl_pointer->offset = 0; - sg_state->my_ctl_pointer->n_sends = sg_state->pow_2_levels; - sg_state->my_ctl_pointer->length = sg_state->fragment_size; - - - - extra_src_posts = (sg_state->my_rank + sg_state->pow_2 < sg_state->group_size ) ? 1: 0; - scatter_posts = sg_state->my_ctl_pointer->n_sends; - allgather_posts = sg_state->pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - if ( total_msg_posts <= 0) { - BASESMUMA_VERBOSE(10,("No need to post the data ")); - return OMPI_SUCCESS; - } - - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, - &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->fragment_size, - PTL_EQ_NONE, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | - PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - - /* - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, - &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->fragment_size, - sg_state->allgather_eq_h, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | - PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - */ - - sg_state->msg_posted = true ; - - /* - opal_atomic_wmb(); - */ - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - return OMPI_SUCCESS; -} - -/* - * Im root but my rank > pow2_groupsize, so will copy to partner who - * will act as root (secondary) - */ -static inline __opal_attribute_always_inline__ -int sm_portals_extra_root_scatter(sg_state_t *sg_state) -{ - int scatter_partner = -1; - volatile mca_bcol_basesmuma_ctl_struct_t *scatter_partner_ctl_pointer = NULL; - - int total_msg_posts = 1; - - if ( total_msg_posts <= 0) { - BASESMUMA_VERBOSE(10,("No need to post the data ")); - } - else { - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, - &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->fragment_size, - PTL_EQ_NONE, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | PTL_MD_OP_GET - | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - sg_state->msg_posted = true ; - - } - - opal_atomic_wmb(); - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - - - scatter_partner = sg_state->my_rank - sg_state->pow_2; - scatter_partner_ctl_pointer = - sg_state->ctl_structs[scatter_partner]; - - while(!IS_SG_DATA_READY(scatter_partner_ctl_pointer, sg_state->ready_flag, - sg_state->sequence_number)){ - opal_progress(); - } - - return OMPI_SUCCESS; -} - -/* - * Gets msg from the partner (> pow2_groupsize) and posts the - * message acting as root - */ -static inline __opal_attribute_always_inline__ -int sm_portals_secondary_root_scatter(sg_state_t *sg_state) -{ - - volatile mca_bcol_basesmuma_ctl_struct_t *extra_src_ctl_pointer = NULL; - int scatter_posts, allgather_posts, extra_src_posts, total_msg_posts; - - sg_state->secondary_root = true; - BASESMUMA_VERBOSE(10,("I am the secondary root for the data")); - sg_state->my_ctl_pointer->offset = 0; - sg_state->my_ctl_pointer->n_sends = sg_state->pow_2_levels; - sg_state->my_ctl_pointer->length = sg_state->fragment_size; - - extra_src_ctl_pointer = sg_state->ctl_structs[sg_state->src]; - - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &extra_src_ctl_pointer->portals_buf_addr, 0, - 0, sg_state->fragment_size); - - - extra_src_posts = 0; - scatter_posts = sg_state->my_ctl_pointer->n_sends; - allgather_posts = sg_state->pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - if (total_msg_posts > 0) { - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, - &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->fragment_size, - PTL_EQ_NONE, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE | PTL_MD_OP_GET - | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - sg_state->msg_posted = true ; - } - opal_atomic_wmb(); - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - return OMPI_SUCCESS; -} - -/* - * Internode Scatter: Get data from my parent and post for my children - */ - -static inline __opal_attribute_always_inline__ -int sm_portals_internode_scatter(sg_state_t *sg_state) -{ - - int scatter_posts, allgather_posts, extra_src_posts, - total_msg_posts; - uint64_t local_offset, remote_offset; - - /* compute the size of the chunk to copy */ - sg_state->length = (sg_state->parent_ctl_pointer->length)/ - (1<<(sg_state->parent_ctl_pointer->n_sends - sg_state->my_ctl_pointer->n_sends)); - sg_state->my_ctl_pointer->length = sg_state->length; - sg_state->my_ctl_pointer->offset = - sg_state->parent_ctl_pointer->offset + sg_state->length; - - - local_offset = sg_state->my_ctl_pointer->offset; - remote_offset = sg_state->parent_ctl_pointer->offset + - sg_state->length; - - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &sg_state->parent_ctl_pointer->portals_buf_addr,local_offset, - remote_offset,sg_state->length); - - /* Now post the message for other children to read */ - extra_src_posts = (sg_state->my_rank + sg_state->pow_2 < - sg_state->group_size ) ? 1: 0; - scatter_posts = sg_state->my_ctl_pointer->n_sends; - allgather_posts = sg_state->pow_2_levels - 1; - - total_msg_posts = scatter_posts + allgather_posts + extra_src_posts ; - - if (total_msg_posts > 0) { - mca_bcol_basesmuma_portals_post_msg(sg_state->cs, &sg_state->my_ctl_pointer->portals_buf_addr, - sg_state->my_userbuf, sg_state->my_ctl_pointer->portals_buf_addr.userbuf_length, - PTL_EQ_NONE, - total_msg_posts, - blocked_post, - PTL_MD_EVENT_START_DISABLE| PTL_MD_EVENT_END_DISABLE - | PTL_MD_OP_GET | PTL_MD_MANAGE_REMOTE | PTL_MD_TRUNCATE | PTL_MD_EVENT_AUTO_UNLINK_ENABLE); - - sg_state->msg_posted = true; - } - /* - opal_atomic_wmb(); - */ - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - return OMPI_SUCCESS; -} - -/* - * Bcast's Allgather Phase: - * Combines data from all processes using recursive doubling algorithm - */ -static inline __opal_attribute_always_inline__ -int sm_portals_bcasts_allgather_phase(sg_state_t *sg_state) -{ - int ag_loop, partner; - volatile mca_bcol_basesmuma_ctl_struct_t *partner_ctl_pointer = NULL; /* recursive double */ - - - for( ag_loop = 1; ag_loop < sg_state->pow_2_levels; ag_loop++) { - /* get my partner for this level */ - partner = sg_state->my_rank^(1<ctl_structs[partner]; - - - /* Block until partner is at this level of recursive-doubling stage */ - while(!IS_SG_DATA_READY(partner_ctl_pointer, sg_state->ready_flag, - sg_state->sequence_number)) { - opal_progress(); - } - assert(partner_ctl_pointer->flag >= sg_state->ready_flag); - - if (partner_ctl_pointer->offset < sg_state->my_ctl_pointer->offset) { - sg_state->global_sg_offset -= sg_state->length; - sg_state->local_sg_offset = sg_state->global_sg_offset; - } else { - sg_state->local_sg_offset = sg_state->global_sg_offset + sg_state->length; - } - - - BASESMUMA_VERBOSE(10,("Allgather Phase: Get message from process %d, length %d", - partner, sg_state->length)); - mca_bcol_basesmuma_portals_get_msg_fragment(sg_state->cs, - sg_state->read_eq, - &sg_state->my_ctl_pointer->portals_buf_addr, - &partner_ctl_pointer->portals_buf_addr,sg_state->local_sg_offset, - sg_state->local_sg_offset, sg_state->length); - - sg_state->ready_flag++; - opal_atomic_wmb(); - sg_state->my_ctl_pointer->flag = sg_state->ready_flag; - - /* Block until partner is at this level of recursive-doubling stage */ - while(!IS_SG_DATA_READY(partner_ctl_pointer, sg_state->ready_flag, - sg_state->sequence_number)) { - opal_progress(); - } - - /* double the length */ - sg_state->length *= 2; - } - - return OMPI_SUCCESS; - -} - - -static inline __opal_attribute_always_inline__ -int init_sm_group_info(sg_state_t *sg_state, int buff_idx) -{ - int idx, leading_dim; - int first_instance=0; - int flag_offset; - - /* Get addresing information */ - sg_state->group_size = sg_state->bcol_module->colls_no_user_data.size_of_group; - leading_dim = sg_state->bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - BASESMUMA_VERBOSE(1,("My buffer idx %d group size %d, leading dim %d, idx %d", - buff_idx,sg_state->group_size,leading_dim,idx)); - /* grab the ctl buffs */ - sg_state->ctl_structs = (volatile mca_bcol_basesmuma_ctl_struct_t **) - sg_state->bcol_module->colls_with_user_data.ctl_buffs+idx; - - sg_state->my_rank = sg_state->bcol_module->super.sbgp_partner_module->my_index; - sg_state->my_ctl_pointer = sg_state->ctl_structs[sg_state->my_rank]; - - if (sg_state->my_ctl_pointer->sequence_number < sg_state->sequence_number) { - first_instance = 1; - } - - if(first_instance) { - sg_state->my_ctl_pointer->flag = -1; - sg_state->my_ctl_pointer->index = 1; - - sg_state->my_ctl_pointer->starting_flag_value = 0; - flag_offset = 0; - - } else { - sg_state->my_ctl_pointer->index++; - } - - /* For bcast we shud have only entry to this bcol - assert(sg_state->my_ctl_pointer->flag == -1); - */ - - /* increment the starting flag by one and return */ - flag_offset = sg_state->my_ctl_pointer->starting_flag_value; - sg_state->ready_flag = flag_offset + sg_state->sequence_number + 1; - - sg_state->my_ctl_pointer->sequence_number = sg_state->sequence_number; - - return OMPI_SUCCESS; - -} - -static inline __opal_attribute_always_inline__ -int init_sm_portals_sg_info(sg_state_t *sg_state) -{ -/* Get portals info*/ - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - int rc = OMPI_SUCCESS; - int sg_matchbits; - - portals_info = (mca_bcol_basesmuma_portal_proc_info_t*)sg_state->cs->portals_info; - - sg_matchbits = sg_state->sequence_number ; - - /* Construct my portal buffer address and copy to payload buffer */ - mca_bcol_basesmuma_construct_portal_address(&sg_state->my_ctl_pointer->portals_buf_addr, - portals_info->portal_id.nid, - portals_info->portal_id.pid, - sg_matchbits, - sg_state->bcol_module->super.sbgp_partner_module->group_comm->c_contextid); - - sg_state->my_ctl_pointer->portals_buf_addr.userbuf = sg_state->my_userbuf; - sg_state->my_ctl_pointer->portals_buf_addr.userbuf_length = sg_state->fragment_size; - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ -int compute_src_from_root(int group_root, int my_group_rank, int pow2, int - group_size) -{ - - int root, relative_rank, src, i; - - if (group_root < pow2) { - root = group_root; - } else { - /* the source of the data is extra node, - the real root it represented by some rank from - pow2 group */ - root = group_root - pow2; - /* shortcut for the case when my rank is root for the group */ - if (my_group_rank == root) { - return group_root; - } - } - - relative_rank = (my_group_rank - root) < 0 ? my_group_rank - root + pow2 : - my_group_rank - root; - - for (i = 1; i < pow2; i<<=1) { - if (relative_rank & i) { - src = my_group_rank ^ i; - if (src >= pow2) - src -= pow2; - - return src; - } - } - - return -1; -} - -int bcol_basesmuma_lmsg_scatter_allgather_portals_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_lmsg_scatter_allgather_portals_nb_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_lmsg_scatter_allgather_portals_nb_knownroot_bcast(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_knomial_bcast.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_knomial_bcast.c deleted file mode 100644 index a1454102a84..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_lmsg_knomial_bcast.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -/* #define __PORTALS_AVAIL__ */ -#ifdef __PORTALS_AVAIL__ - -#define __PORTALS_ENABLE__ -#include "ompi/mca/bcol/basesmuma/bcol_basesmuma.h" -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" -#include "bcol_basesmuma_utils.h" - -#include "bcol_basesmuma_portals.h" - -/* debug */ -#include -/* end debug */ - - -/** - * Shared memory non-blocking Broadcast - K-nomial fan-out for small data buffers. - * This routine assumes that buf (the input buffer) is a single writer - * multi reader (SWMR) shared memory buffer owned by the calling rank - * which is the only rank that can write to this buffers. - * It is also assumed that the buffers are registered and fragmented - * at the ML level and that buf is sufficiently large to hold the data. - * - * - * @param buf - SWMR shared buffer within a sbgp that the - * executing rank can write to. - * @param count - the number of elements in the shared buffer. - * @param dtype - the datatype of a shared buffer element. - * @param root - the index within the sbgp of the root. - * @param module - basesmuma module. - */ -int bcol_basesmuma_lmsg_bcast_k_nomial_anyroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ -#if 0 - /* local variables */ - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - int i, matched = 0; - int src=-1; - int group_size; - int my_rank, first_instance=0, flag_offset; - int rc = OMPI_SUCCESS; - int leading_dim, buff_idx, idx; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int64_t sequence_number=input_args->sequence_num; - - volatile int64_t ready_flag; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char* parent_data_pointer; - volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - void *userbuf = (void *)((unsigned char *)input_args->userbuf); - - size_t pack_len = 0, dt_size; - - struct mca_bcol_basesmuma_portal_buf_addr_t *my_lmsg_ctl_pointer = NULL; - struct mca_bcol_basesmuma_portal_buf_addr_t *parent_lmsg_ctl_pointer = NULL; - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - portals_info = (mca_bcol_basesmuma_portal_proc_info_t*)cs->portals_info; - - /* we will work only on packed data - so compute the length*/ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - my_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t*) data_buffs[my_rank].payload; - - /* setup resource recycling */ - if( my_ctl_pointer->sequence_number < sequence_number ) { - first_instance=1; - } - - if( first_instance ) { - /* Signal arrival */ - my_ctl_pointer->flag = -1; - my_ctl_pointer->index=1; - /* this does not need to use any flag values , so only need to - * set the value for subsequent values that may need this */ - my_ctl_pointer->starting_flag_value=0; - flag_offset=0; - - } else { - /* only one thread at a time will be making progress on this - * collective, so no need to make this atomic */ - my_ctl_pointer->index++; - } - - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - my_ctl_pointer->sequence_number = sequence_number; - - - /* Construct my portal buffer address and copy to payload buffer */ - mca_bcol_basesmuma_construct_portal_address(my_lmsg_ctl_pointer, - portals_info->portal_id.nid, - portals_info->portal_id.pid, - sequence_number, - bcol_module->super.sbgp_partner_module->group_comm->c_contextid); - - /* non-blocking broadcast algorithm */ - - /* If I am the root, then signal ready flag */ - if(input_args->root_flag) { - ptl_handle_eq_t eq_h; - ptl_event_t event; - int ret; - - BASESMUMA_VERBOSE(10,("I am the root of the data")); - - /* create an event queue for the incoming buffer */ - ret = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, PTL_EQ_HANDLER_NONE, &eq_h); - - if (ret != PTL_OK) { - fprintf(stderr, "PtlEQAlloc() failed: %d \n",ret); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* Post the message using portal copy */ - - mca_bcol_basesmuma_portals_post_msg_nb_nopers(cs, my_lmsg_ctl_pointer, userbuf, - pack_len, eq_h, my_lmsg_ctl_pointer->nsends); - - /* - * signal ready flag - */ - my_ctl_pointer->flag = ready_flag; - - /* wait for a response from the client */ - mca_bcol_basesmuma_portals_wait_event_nopers(eq_h, POST_MSG_EVENT, - &event, my_lmsg_ctl_pointer->nsends); - - /* free the event queue */ - ret = PtlEQFree(eq_h); - if (ret != PTL_OK) { - fprintf(stderr, "PtlEQFree() failed: %d )\n",ret); - } - - /* root is finished */ - goto Release; - } - - /* If I am not the root, then poll on possible "senders'" control structs */ - for( i = 0; i < cs->num_to_probe && 0 == matched; i++) { - - /* Shared memory iprobe */ - /* - BCOL_BASESMUMA_SM_PROBE(bcol_module->src, bcol_module->src_size, - my_rank, matched, src); - */ - do { - int j, n_src, my_index; - n_src = bcol_module->src_size; - - for( j = 0; j < n_src; j++) { - parent_ctl_pointer = data_buffs[bcol_module->src[j]].ctl_struct; - parent_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t *) - data_buffs[bcol_module->src[j]].payload; - if (IS_DATA_READY(parent_ctl_pointer,ready_flag,sequence_number)) { - - src = bcol_module->src[j]; - matched = 1; - break; - } - } - } while(0); - - } - - /* If not matched, then hop out and put me on progress list */ - if(0 == matched ) { - BASESMUMA_VERBOSE(10,("Shared memory probe didn't find a match")); - return BCOL_FN_NOT_STARTED; - } - - /* else, we found our root within the group ... */ - BASESMUMA_VERBOSE(10,("Shared memory probe was matched, the root is %d", src)); - - /* receive the data from sender */ - /* get the data buff */ - /* taken care of in the macro */ - /*parent_data_pointer = data_buffs[src].payload;*/ - /* copy the data */ - mca_bcol_basesmuma_portals_get_msg(cs, parent_lmsg_ctl_pointer, userbuf, pack_len); - - /* set the memory barrier to ensure completion */ - opal_atomic_wmb (); - /* signal that I am done */ - my_ctl_pointer->flag = ready_flag; - - /* am I the last one? If so, release buffer */ - -Release: - my_ctl_pointer->starting_flag_value++; - - return BCOL_FN_COMPLETE; -#endif -} - -#if 0 - -#define BASESMUMA_K_NOMIAL_SEND_SIGNAL(radix_mask, radix, my_relative_index, \ - my_group_index, group_size,sm_data_buffs,sender_ready_flag, \ - num_pending_sends) \ -{ \ - int k, rc; \ - int dst; \ - int comm_dst; \ - volatile mca_bcol_basesmuma_header_t *recv_ctl_pointer = NULL; \ - volatile mca_bcol_basesmuma_portal_buf_addr_t *recv_lmsg_ctl_pointer = NULL; \ - \ - num_pending_sends = 0; \ - while(radix_mask > 0) { \ - /* For each level of tree, do sends */ \ - for (k = 1; \ - k < radix && my_relative_index + radix_mask * k < group_size; \ - ++k) { \ - \ - dst = my_group_index + radix_mask * k; \ - if (dst >= group_size) { \ - dst -= group_size; \ - } \ - /* Signal the children to get data */ \ - recv_ctl_pointer = data_buffs[dst].ctl; \ - recv_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t *) \ - data_buffs[dst].payload; \ - recv_lmsg_ctl_pointer->src_index = my_group_index; \ - recv_lmsg_ctl_pointer->flag = sender_ready_flag; \ - ++num_pending_sends; \ - } \ - radix_mask /= radix; \ - } \ - \ -} - - - -int bcol_basesmuma_lmsg_bcast_k_nomial_anyroot(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - mca_bcol_basesmuma_module_t* bcol_module= - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - int i, matched = 0; - int src=-1; - int group_size; - int my_rank, first_instance=0, flag_offset; - int rc = OMPI_SUCCESS; - int leading_dim, buff_idx, idx; - int count=input_args->count; - struct ompi_datatype_t* dtype=input_args->dtype; - int64_t sequence_number=input_args->sequence_num; - - volatile int64_t ready_flag; - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char* parent_data_pointer; - volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - void *userbuf = (void *)((unsigned char *)input_args->userbuf); - - size_t pack_len = 0, dt_size; - - struct mca_bcol_basesmuma_portal_buf_addr_t *my_lmsg_ctl_pointer = NULL; - struct mca_bcol_basesmuma_portal_buf_addr_t *parent_lmsg_ctl_pointer = NULL; - mca_bcol_basesmuma_portal_proc_info_t *portals_info; - portals_info = (mca_bcol_basesmuma_portal_proc_info_t*)cs->portals_info; - - /* we will work only on packed data - so compute the length*/ - ompi_datatype_type_size(dtype, &dt_size); - pack_len=count*dt_size; - buff_idx = input_args->src_desc->buffer_index; - - /* Get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - group_size = bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - my_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t*) data_buffs[my_rank].payload; - - /* setup resource recycling */ - if( my_ctl_pointer->sequence_number < sequence_number ) { - first_instance=1; - } - - if( first_instance ) { - /* Signal arrival */ - my_ctl_pointer->flag = -1; - my_ctl_pointer->index=1; - /* this does not need to use any flag values , so only need to - * set the value for subsequent values that may need this */ - my_ctl_pointer->starting_flag_value=0; - flag_offset=0; - - } else { - /* only one thread at a time will be making progress on this - * collective, so no need to make this atomic */ - my_ctl_pointer->index++; - } - - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value; - ready_flag = flag_offset + sequence_number + 1; - my_ctl_pointer->sequence_number = sequence_number; - - - /* Construct my portal buffer address and copy to payload buffer */ - mca_bcol_basesmuma_construct_portal_address(my_lmsg_ctl_pointer, - portals_info->portal_id.nid, - portals_info->portal_id.pid, - sequence_number, - bcol_module->super.sbgp_partner_module->group_comm->c_contextid); - - my_lmsg_ctl_pointer->userbuf = userbuff; - my_lsmg_ctl_pointer->userbuf_length = fragment_length; - /* create an event queue */ - ret = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, PTL_EQ_HANDLER_NONE, &eq_h); - - /* non-blocking broadcast algorithm */ - - /* If I am the root, then signal ready flag */ - if(input_args->root_flag) { - ptl_handle_eq_t eq_h; - ptl_event_t event; - int ret; - int root_radix_mask = sm_module->pow_knum; - - BASESMUMA_VERBOSE(10,("I am the root of the data")); - - - if (ret != PTL_OK) { - fprintf(stderr, "PtlEQAlloc() failed: %d \n",ret); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - BASESMUMA_K_NOMIAL_SEND_SIGNAL(root_radix_mask, radix, 0, - my_rank, group_size, data_buffs, ready_flag, nsends) ; - - mca_bcol_basesmuma_portals_post_msg_nb_nopers(cs, my_lmsg_ctl_pointer, userbuf, - pack_len, eq_h, nsends); - - /* wait for a response from the client */ - mca_bcol_basesmuma_portals_wait_event_nopers(eq_h, POST_MSG_EVENT, - &event, nsends); - - /* root is finished */ - goto Release; - } - - /* Im not a root so wait until someone puts data and - * compute where to get data from */ - - while (my_ctl_pointer->flag != ready_flag) ; - - my_data_source_index = lmsg_ctl_pointer->src_index; - - parent_lmsg_ctl_pointer = (mca_bcol_basesmuma_portal_buf_addr_t *) - data_buffs[my_data_source_index].payload; - - mca_bcol_basesmuma_portals_get_msg(cs, parent_lmsg_ctl_pointer, userbuf, pack_len); - - - - - /* I am done getting data, should I send the data to someone */ - - my_relative_index = (my_rank - my_data_source_index) < 0 ? my_rank - - my_data_source_index + group_size : my_rank - my_data_source_index; - - /* - * 2. Locate myself in the tree: - * calculate number of radix steps that we should to take - */ - radix_mask = 1; - while (radix_mask < group_size) { - if (0 != my_relative_index % (radix * radix_mask)) { - /* I found my level in tree */ - break; - } - radix_mask *= radix; - } - - /* go one step back */ - radix_mask /=radix; - - BASESMUMA_K_NOMIAL_SEND_SIGNAL(radix_mask, radix, my_relative_index, - my_rank, group_size,data_buffs,ready_flag,nsends) - - mca_bcol_basesmuma_portals_post_msg_nb_nopers(cs, my_lmsg_ctl_pointer, userbuf, - pack_len, eq_h, nsends); - - /* wait for childrens to read */ - mca_bcol_basesmuma_portals_wait_event_nopers(eq_h, POST_MSG_EVENT, - &event, nsends); - - - -Release: - /* free the event queue */ - ret = PtlEQFree(eq_h); - if (ret != PTL_OK) { - fprintf(stderr, "PtlEQFree() failed: %d )\n",ret); - } - - - my_ctl_pointer->starting_flag_value++; - - return BCOL_FN_COMPLETE; -} - -#endif -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_mem_mgmt.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_mem_mgmt.c deleted file mode 100644 index eff6697ec26..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_mem_mgmt.c +++ /dev/null @@ -1,101 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "bcol_basesmuma.h" - - -/* Shared memory registration function: Calls into the "shared memory - connection manager" (aka - smcm) and registers a chunk of memory by - opening and mmaping a file. - - @input: - - void *reg_data - shared memory specific data needed by the registration - function. - - void *base - pointer to memory address. - - size_t size - size of memory chunk to be registered with sm. - - mca_mpool_base_registration_t *reg - registration data is cached here. - - @output: - - returns OMPI_SUCCESS on successful registration. - - returns OMPI_ERROR on failure. - -*/ - -int mca_bcol_basesmuma_register_sm(void *context_data, void *base, size_t size, - void **reg_desc) -{ - - /* local variables */ - int ret = OMPI_SUCCESS; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - bcol_basesmuma_registration_data_t *sm_reg = - (bcol_basesmuma_registration_data_t*) context_data; - - /* cache some info on sm_reg aka "context_data", you'll need it later */ - sm_reg->base_addr = base; - sm_reg->size = size; - - /* call into the shared memory registration function in smcm - * we need to be sure that the memory is page aligned in order - * to "map_fixed" - */ - sm_reg->sm_mmap = bcol_basesmuma_smcm_mem_reg(base, size, - sm_reg->data_seg_alignment, - sm_reg->file_name); - if(NULL == sm_reg->sm_mmap) { - opal_output (ompi_bcol_base_framework.framework_output, "Bcol_basesmuma memory registration error"); - return OMPI_ERROR; - } - - /* don't let other communicators re-register me! */ - cs->mpool_inited = true; - /* alias back to component */ - cs->sm_payload_structs = sm_reg->sm_mmap; - - return ret; -} - -/* Shared memory deregistration function - deregisters memory by munmapping it and removing the - shared memory file. - - Basic steps (please let me know if this is incompatible with your notion of deregistration - or if it causes problems on cleanup): - - 1. munmap the shared memory file. - 2. set the base pointer to the mmaped memory to NULL. - 3. permanently remove the shared memory file from the directory. - -*/ - -int mca_bcol_basesmuma_deregister_sm(void *context_data, void *reg) -{ - /* local variables */ - bcol_basesmuma_registration_data_t *sm_reg = - (bcol_basesmuma_registration_data_t*) context_data; - - if (sm_reg->sm_mmap) { - OBJ_RELEASE(sm_reg->sm_mmap); - } - - /* set the pointer to NULL */ - sm_reg->base_addr = NULL; - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_module.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_module.c deleted file mode 100644 index 8770689ed20..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_module.c +++ /dev/null @@ -1,687 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/patterns/net/netpatterns.h" - -#include "opal/util/show_help.h" -#include "opal/align.h" - -#include "ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.h" -#include "bcol_basesmuma.h" -#include "bcol_basesmuma_utils.h" - -#ifdef __PORTALS_AVAIL__ -#include "bcol_basesmuma_portals.h" -#endif - - -/* - * Local functions - */ -static int alloc_lmsg_reduce_offsets_array(mca_bcol_basesmuma_module_t *sm_module) -{ - int rc = OMPI_SUCCESS, i = 0; - netpatterns_k_exchange_node_t *k_node = &sm_module->knomial_exchange_tree; - int n_exchanges = k_node->n_exchanges; - - /* Precalculate the allreduce offsets */ - if (0 < k_node->n_exchanges) { - sm_module->reduce_offsets = (int **)malloc(n_exchanges * sizeof(int*)); - - if (!sm_module->reduce_offsets) { - rc = OMPI_ERROR; - return rc; - } - - for (i=0; i < n_exchanges ; i++) { - sm_module->reduce_offsets[i] = (int *)malloc (sizeof(int) * NOFFSETS); - - if (!sm_module->reduce_offsets[i]){ - rc = OMPI_ERROR; - return rc; - } - } - } - return rc; -} - -static int free_lmsg_reduce_offsets_array(mca_bcol_basesmuma_module_t *sm_module) -{ - int rc = OMPI_SUCCESS, i = 0; - netpatterns_k_exchange_node_t *k_node = &sm_module->knomial_exchange_tree; - int n_exchanges = k_node->n_exchanges; - - if (sm_module->reduce_offsets) { - for (i=0; i < n_exchanges; i++) { - free (sm_module->reduce_offsets[i]); - } - - free(sm_module->reduce_offsets); - } - return rc; -} - -static void -mca_bcol_basesmuma_module_construct(mca_bcol_basesmuma_module_t *module) -{ - /* initialize all values to 0 */ - memset((void*)((uintptr_t) module + sizeof (module->super)), 0, sizeof (*module) - sizeof (module->super)); - module->super.bcol_component = (mca_bcol_base_component_t *) &mca_bcol_basesmuma_component; - module->super.list_n_connected = NULL; - module->super.hier_scather_offset = 0; -} - -static void -mca_bcol_basesmuma_module_destruct(mca_bcol_basesmuma_module_t *sm_module) -{ - /* local variables */ - mca_sbgp_base_module_t *sbgp_module = sm_module->super.sbgp_partner_module; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - - /* - * release allocated resrouces - */ - - /* ...but not until you're sure you have no outstanding collectives */ - while(0 != opal_list_get_size(&(cs->nb_admin_barriers))) { - opal_progress(); - } - -#ifdef __PORTALS_AVAIL__ - /* Remove portals bcast specific resources */ - if ( PTL_OK != PtlEQFree(sm_module->sg_state.read_eq)) { - BASESMUMA_VERBOSE(10,("PtlEQFree() failed: )")); - } -#endif - - /* Remove Lmsg Reduce Offsets Array */ - free_lmsg_reduce_offsets_array(sm_module); - - /* collective topology data */ - if( sm_module->fanout_read_tree) { - for (int i = 0 ; i < sm_module->super.size_of_subgroup ; i++ ) { - if(0 < sm_module->fanout_read_tree[i].n_children ) { - free(sm_module->fanout_read_tree[i].children_ranks); - sm_module->fanout_read_tree[i].children_ranks=NULL; - } - } - free(sm_module->fanout_read_tree); - sm_module->fanout_read_tree=NULL; - } - - /* gvm Leak FIX Reduction_tree[].children_ranks has - * to be removed. I don't how to get the size (which is - * size of subgroup) of array reduction_tree - */ - if( sm_module->reduction_tree) { - for (int i = 0 ; i < sm_module->super.size_of_subgroup ; i++ ) { - if(0 < sm_module->reduction_tree[i].n_children ) { - free(sm_module->reduction_tree[i].children_ranks); - sm_module->reduction_tree[i].children_ranks=NULL; - } - } - free(sm_module->reduction_tree); - sm_module->reduction_tree=NULL; - } - - /* gvm Leak FIX */ - if (sm_module->fanout_node.children_ranks){ - free(sm_module->fanout_node.children_ranks); - sm_module->fanout_node.children_ranks = NULL; - } - - if (sm_module->fanin_node.children_ranks){ - free(sm_module->fanin_node.children_ranks); - sm_module->fanin_node.children_ranks = NULL; - } - - /* colls_no_user_data resrouces */ - if(sm_module->colls_no_user_data.ctl_buffs_mgmt){ - free(sm_module->colls_no_user_data.ctl_buffs_mgmt); - sm_module->colls_no_user_data.ctl_buffs_mgmt=NULL; - } - if(sm_module->colls_no_user_data.ctl_buffs){ - free(sm_module->colls_no_user_data.ctl_buffs); - sm_module->colls_no_user_data.ctl_buffs=NULL; - } - - /* return control */ - opal_list_append (&cs->ctl_structures, (opal_list_item_t *) sm_module->no_userdata_ctl); - - /* colls_with_user_data resrouces */ - /* - *debug print */ - /* - fprintf(stderr,"AAA colls_with_user_data.ctl_buffs %p \n", - sm_module->colls_with_user_data.ctl_buffs_mgmt); - end debug */ - - if(sm_module->colls_with_user_data.ctl_buffs_mgmt){ - free(sm_module->colls_with_user_data.ctl_buffs_mgmt); - sm_module->colls_with_user_data.ctl_buffs_mgmt=NULL; - } - if(sm_module->colls_with_user_data.ctl_buffs){ - free(sm_module->colls_with_user_data.ctl_buffs); - sm_module->colls_with_user_data.ctl_buffs=NULL; - } - - if(sm_module->shared_memory_scratch_space) { - free(sm_module->shared_memory_scratch_space); - sm_module->shared_memory_scratch_space=NULL; - } - - /* return control */ - opal_list_append (&cs->ctl_structures, (opal_list_item_t *) sm_module->userdata_ctl); - -#if 1 - if(sm_module->scatter_kary_tree) { - for (int i = 0 ; i < sm_module->super.size_of_subgroup ; i++ ) { - if(0 < sm_module->scatter_kary_tree[i].n_children) { - free(sm_module->scatter_kary_tree[i].children_ranks); - sm_module->scatter_kary_tree[i].children_ranks=NULL; - } - } - free(sm_module->scatter_kary_tree); - } -#endif - - if(NULL != sm_module->super.list_n_connected ){ - free(sm_module->super.list_n_connected); - sm_module->super.list_n_connected = NULL; - } - - cleanup_nb_coll_buff_desc(&sm_module->ml_mem.nb_coll_desc, - sm_module->ml_mem.num_banks, - sm_module->ml_mem.num_buffers_per_bank); - - for (int i = 0; i < BCOL_NUM_OF_FUNCTIONS; i++){ - /* gvm FIX: Go through the list and destroy each item */ - /* Destroy the function table object for each bcol type list */ - OPAL_LIST_DESTRUCT((&sm_module->super.bcol_fns_table[i])); - } - - if (NULL != sm_module->payload_backing_files_info) { - bcol_basesmuma_smcm_release_connections (sm_module, sbgp_module, &cs->sm_connections_list, - &sm_module->payload_backing_files_info); - } - - if (NULL != sm_module->ctl_backing_files_info) { - bcol_basesmuma_smcm_release_connections (sm_module, sbgp_module, &cs->sm_connections_list, - &sm_module->ctl_backing_files_info); - } - - if (NULL != sm_module->ml_mem.bank_release_counter) { - free(sm_module->ml_mem.bank_release_counter); - sm_module->ml_mem.bank_release_counter = NULL; - } - - if (NULL != sm_module->colls_with_user_data.data_buffs) { - free((void *)sm_module->colls_with_user_data.data_buffs); - sm_module->colls_with_user_data.data_buffs = NULL; - } - - /* free the k-nomial allgather tree here */ - netpatterns_cleanup_recursive_knomial_allgather_tree_node(&sm_module->knomial_allgather_tree); - netpatterns_cleanup_recursive_doubling_tree_node(&sm_module->recursive_doubling_tree); - netpatterns_cleanup_recursive_knomial_tree_node(&sm_module->knomial_exchange_tree); - - /* done */ -} - -static void bcol_basesmuma_set_small_msg_thresholds(struct mca_bcol_base_module_t *super) -{ - mca_bcol_basesmuma_module_t *basesmuma_module = - (mca_bcol_basesmuma_module_t *) super; - - size_t basesmuma_offset = bcol_basesmuma_data_offset_calc(basesmuma_module); - - /* Set the Allreduce threshold, for Basesmuma it equals to ML buffer size - data offset */ - super->small_message_thresholds[BCOL_ALLREDUCE] = - basesmuma_module->ml_mem.ml_mem_desc->size_buffer - basesmuma_offset; - - /* Set the Bcast threshold, for Basesmuma it equals to ML buffer size - data offset */ - super->small_message_thresholds[BCOL_BCAST] = - basesmuma_module->ml_mem.ml_mem_desc->size_buffer - basesmuma_offset; - - /* Set the Gather threshold, for Basesmuma it equals to ML buffer size - data offset */ - super->small_message_thresholds[BCOL_GATHER] = - (basesmuma_module->ml_mem.ml_mem_desc->size_buffer - basesmuma_offset) / - ompi_comm_size(basesmuma_module->super.sbgp_partner_module->group_comm); - - /* Set the ALLgather threshold, for Basesmuma it equals to ML buffer size - data offset */ - super->small_message_thresholds[BCOL_ALLGATHER] = - (basesmuma_module->ml_mem.ml_mem_desc->size_buffer - basesmuma_offset) / - ompi_comm_size(basesmuma_module->super.sbgp_partner_module->group_comm); - - /* Set the Reduce threshold, for Basesmuma it equals to ML buffer size - data offset */ - super->small_message_thresholds[BCOL_REDUCE] = - basesmuma_module->ml_mem.ml_mem_desc->size_buffer - basesmuma_offset; - - /* Set the Scatter threshold, for Basesmuma it equals to ML buffer size - data offset */ - super->small_message_thresholds[BCOL_SCATTER] = - basesmuma_module->ml_mem.ml_mem_desc->size_buffer - basesmuma_offset; -} - -/* setup memory management and collective routines */ - -static void load_func(mca_bcol_base_module_t *super) -{ - int fnc; - - /* Loading memory management and collective functions */ - - for (fnc = 0; fnc < BCOL_NUM_OF_FUNCTIONS; fnc++) { - super->bcol_function_table[fnc] = NULL; - } - - /*super->bcol_function_table[BCOL_BARRIER] = bcol_basesmuma_recursive_double_barrier;*/ - -#ifdef __PORTALS_AVAIL__ - super->bcol_function_table[BCOL_BCAST] = bcol_basesmuma_lmsg_scatter_allgather_portals_bcast; - /* super->bcol_function_table[BCOL_BCAST] = - bcol_basesmuma_lmsg_bcast_k_nomial_anyroot; */ -#endif - - /*super->bcol_function_table[BCOL_BCAST] = bcol_basesmuma_bcast;*/ - /*super->bcol_function_table[BCOL_BCAST] = bcol_basesmuma_binary_scatter_allgather_segment;*/ - /*super->bcol_function_table[BCOL_BCAST] = bcol_basesmuma_bcast_k_nomial_anyroot;*/ - super->bcol_function_table[BCOL_BCAST] = bcol_basesmuma_bcast; -#ifdef __PORTALS_AVAIL__ - super->bcol_function_table[BCOL_BCAST] = - bcol_basesmuma_lmsg_scatter_allgather_portals_bcast; -#endif - /* super->bcol_function_table[BCOL_ALLREDUCE] = bcol_basesmuma_allreduce_intra_fanin_fanout; */ - super->bcol_function_table[BCOL_ALLREDUCE] = bcol_basesmuma_allreduce_intra_recursive_doubling; - super->bcol_function_table[BCOL_REDUCE] = bcol_basesmuma_reduce_intra_fanin_old; - /* memory management */ - super->bcol_memory_init = bcol_basesmuma_bank_init_opti; - - super->k_nomial_tree = bcol_basesmuma_setup_knomial_tree; - - /* Set thresholds */ - super->set_small_msg_thresholds = bcol_basesmuma_set_small_msg_thresholds; -} - -static void load_func_with_choices(mca_bcol_base_module_t *super) -{ - int fnc; - - /* Loading memory management and collective functions */ - - for (fnc=0; fnc < BCOL_NUM_OF_FUNCTIONS; fnc++) { - super->bcol_function_init_table[fnc] = NULL; - } - - super->bcol_function_init_table[BCOL_FANIN] = bcol_basesmuma_fanin_init; - super->bcol_function_init_table[BCOL_FANOUT] = bcol_basesmuma_fanout_init; - super->bcol_function_init_table[BCOL_BARRIER] = bcol_basesmuma_barrier_init; - - super->bcol_function_init_table[BCOL_BCAST] = bcol_basesmuma_bcast_init; - super->bcol_function_init_table[BCOL_ALLREDUCE] = bcol_basesmuma_allreduce_init; - super->bcol_function_init_table[BCOL_REDUCE] = bcol_basesmuma_reduce_init; - super->bcol_function_init_table[BCOL_GATHER] = bcol_basesmuma_gather_init; - super->bcol_function_init_table[BCOL_ALLGATHER] = bcol_basesmuma_allgather_init; - super->bcol_function_init_table[BCOL_SYNC] = bcol_basesmuma_memsync_init; - /* memory management */ - super->bcol_memory_init = bcol_basesmuma_bank_init_opti; - - super->k_nomial_tree = bcol_basesmuma_setup_knomial_tree; - -} - -static int load_recursive_knomial_info(mca_bcol_basesmuma_module_t - *sm_module) -{ - int rc = OMPI_SUCCESS; - rc = netpatterns_setup_recursive_knomial_tree_node(sm_module->super.sbgp_partner_module->group_size, - sm_module->super.sbgp_partner_module->my_index, - mca_bcol_basesmuma_component.k_nomial_radix, - &sm_module->knomial_exchange_tree); - return rc; -} - - -int bcol_basesmuma_setup_knomial_tree(mca_bcol_base_module_t *super) -{ - mca_bcol_basesmuma_module_t *sm_module = (mca_bcol_basesmuma_module_t *) super; - - return netpatterns_setup_recursive_knomial_allgather_tree_node(sm_module->super.sbgp_partner_module->group_size, - sm_module->super.sbgp_partner_module->my_index, - mca_bcol_basesmuma_component.k_nomial_radix, - super->list_n_connected, - &sm_module->knomial_allgather_tree); -} - - - - -/* query to see if the module is available for use on the given - * communicator, and if so, what it's priority is. This is where - * the backing shared-memory file is created. - */ -mca_bcol_base_module_t ** -mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules) -{ - /* local variables */ - mca_bcol_base_module_t **sm_modules = NULL; - mca_bcol_basesmuma_module_t *sm_module; - bcol_basesmuma_registration_data_t *sm_reg_data; - int ret, my_rank, name_length; - char *name; - int i; - - int bcast_radix; - - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - /*mca_base_component_list_item_t *hdl_cli = NULL;*/ - /*int hdl_num;*/ - - /* at this point I think there is only a sinle shared - memory bcol that we need to be concerned with */ - - /* No group, no modules */ - if (OPAL_UNLIKELY(NULL == module)) { - return NULL; - } - - /* allocate and initialize an sm_bcol module */ - sm_module = OBJ_NEW(mca_bcol_basesmuma_module_t); - - /* set the subgroup */ - sm_module->super.sbgp_partner_module=module; - - (*num_modules)=1; - cs->super.n_net_contexts = *num_modules; - sm_module->reduction_tree = NULL; - sm_module->fanout_read_tree = NULL; - - ret=netpatterns_setup_recursive_doubling_tree_node( - module->group_size,module->my_index, - &(sm_module->recursive_doubling_tree)); - if(OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "Error setting up recursive_doubling_tree \n"); - return NULL; - } - - /* setup the fanin tree - this is used only as part of a hierarchical - * barrier, so will set this up with rank 0 as the root */ - my_rank=module->my_index; - ret=netpatterns_setup_narray_tree(cs->radix_fanin, - my_rank,module->group_size,&(sm_module->fanin_node)); - if(OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "Error setting up fanin tree \n"); - return NULL; - } - - /* setup the fanout tree - this is used only as part of a hierarchical - * barrier, so will set this up with rank 0 as the root */ - ret=netpatterns_setup_narray_tree(cs->radix_fanout, - my_rank,module->group_size,&(sm_module->fanout_node)); - if(OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "Error setting up fanout tree \n"); - return NULL; - } - - /* - * Setup the broadcast tree - this is used only as part of a hierarchical - * bcast, so will set this up with rank 0 as the root. - */ - - /* set the radix of the bcast tree */ - bcast_radix = cs->radix_read_tree; - - /* initialize fan-out read tree */ - sm_module->fanout_read_tree=(netpatterns_tree_node_t*) malloc( - sizeof(netpatterns_tree_node_t)*module->group_size); - if( NULL == sm_module->fanout_read_tree ) { - goto Error; - } - - for(i = 0; i < module->group_size; i++){ - ret = netpatterns_setup_narray_tree(bcast_radix, - i, module->group_size, &(sm_module->fanout_read_tree[i])); - if(OMPI_SUCCESS != ret) { - goto Error; - } - } - - ret = load_recursive_knomial_info(sm_module); - if (OMPI_SUCCESS != ret) { - BASESMUMA_VERBOSE(10, ("Failed to load recursive knomial tree")); - goto Error; - } - - /* Allocate offsets array for lmsg reduce */ - ret = alloc_lmsg_reduce_offsets_array(sm_module); - if (OMPI_SUCCESS != ret) { - BASESMUMA_VERBOSE(10, ("Failed to allocate reduce offsets array")); - goto Error; - } - - /* initialize reduction tree */ - sm_module->reduction_tree=(netpatterns_tree_node_t *) malloc( - sizeof(netpatterns_tree_node_t )*module->group_size); - if( NULL == sm_module->reduction_tree ) { - goto Error; - } - - ret=netpatterns_setup_multinomial_tree( - cs->order_reduction_tree,module->group_size, - sm_module->reduction_tree); - if( MPI_SUCCESS != ret ) { - goto Error; - } - - /* get largest power of k for given group size */ - sm_module->pow_k_levels = pow_sm_k(cs->k_nomial_radix, - sm_module->super.sbgp_partner_module->group_size, - &(sm_module->pow_k)); - - /* get largest power of 2 for a given group size - * used in scatter allgather - */ - sm_module->pow_2_levels = pow_sm_k(2, - sm_module->super.sbgp_partner_module->group_size, - &(sm_module->pow_2)); - - /* - * setup scatter data - */ - sm_module->scatter_kary_radix=cs->scatter_kary_radix; - sm_module->scatter_kary_tree=NULL; - ret=netpatterns_setup_narray_tree_contigous_ranks( - sm_module->scatter_kary_radix, - sm_module->super.sbgp_partner_module->group_size, - &(sm_module->scatter_kary_tree)); - if(OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "In base_bcol_masesmuma_setup_library_buffers and scatter k-ary tree setup failed \n"); - return NULL; - } - - /* setup the module shared memory management */ - ret=base_bcol_basesmuma_setup_library_buffers(sm_module, cs); - - if(OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "In base_bcol_masesmuma_setup_library_buffers and mpool was not successfully setup!\n"); - return NULL; - } - - /* setup the collectives and memory management */ - - /* check to see whether or not the mpool has been inited */ - /* allocate some space for the network contexts */ - if(!cs->mpool_inited) { - /* if it's empty, then fill it for first time */ - cs->super.network_contexts = (bcol_base_network_context_t **) - malloc((cs->super.n_net_contexts)* - sizeof(bcol_base_network_context_t *)); - /* you need to do some basic setup - define the file name, - * set data seg alignment and size of cntl structure in sm - * file. - */ - /* give the payload sm file a name */ - name_length=asprintf(&name, - "%s"OPAL_PATH_SEP"0%s%0d", - ompi_process_info.job_session_dir, - cs->payload_base_fname, - (int)getpid()); - if( 0 > name_length ) { - opal_output (ompi_bcol_base_framework.framework_output, "Failed to assign the shared memory payload file a name\n"); - return NULL; - } - /* make sure name is not too long */ - if ( OPAL_PATH_MAX < (name_length-1) ) { - opal_output (ompi_bcol_base_framework.framework_output, "Shared memory file name is too long!\n"); - return NULL; - } - /* set the name and alignment characteristics */ - sm_reg_data = (bcol_basesmuma_registration_data_t *) malloc( - sizeof(bcol_basesmuma_registration_data_t)); - sm_reg_data->file_name = name; - - sm_reg_data->data_seg_alignment = getpagesize(); - sm_reg_data->size_ctl_structure = 0; - cs->super.network_contexts[0] = (bcol_base_network_context_t *) - malloc(sizeof(bcol_base_network_context_t)); - cs->super.network_contexts[0]->context_data = - (void *) sm_reg_data; - cs->super.network_contexts[0]-> - register_memory_fn = mca_bcol_basesmuma_register_sm; - cs->super.network_contexts[0]-> - deregister_memory_fn = mca_bcol_basesmuma_deregister_sm; - sm_module->super.network_context = cs->super.network_contexts[0]; - } else { - - sm_module->super.network_context = cs->super.network_contexts[0]; - } - - /* Set the header size */ - sm_module->super.header_size = sizeof(mca_bcol_basesmuma_header_t); - - /*initialize the hdl module if it's to be enabled*/ -#if 0 - if (module->use_hdl) { - sm_module->super.use_hdl = module->use_hdl; - hdl_cli = (mca_base_component_list_item_t *) - opal_list_get_first(&mca_hdl_base_components_in_use); - sm_module->hdl_module = ((mca_hdl_base_component_t*) - hdl_cli->cli_component)->hdl_comm_query(sm_module, &hdl_num); - if (1 != hdl_num || sm_module->hdl_module == NULL) { - ML_ERROR(("hdl modules are not successfully initialized!\n")); - goto Error; - } - } else { - sm_module->hdl_module = NULL; - } -#else - sm_module->hdl_module = NULL; -#endif - - - /* collective setup */ - load_func(&(sm_module->super)); - load_func_with_choices(&(sm_module->super)); - - /* - * This initializes all collective algorithms - */ - - ret = mca_bcol_base_bcol_fns_table_init(&(sm_module->super)); - - if (OMPI_SUCCESS != ret) { - - goto Error; - } - - sm_module->super.supported_mode = 0; - - /* NTH: this is not set anywhere on the trunk as of 08/13/13 */ -#if 0 - if (module->use_hdl) { - sm_module->super.supported_mode = MCA_BCOL_BASE_ZERO_COPY; - } -#endif - - /* Initializes portals library required for basesmuma large message */ -#ifdef __PORTALS_AVAIL__ - /* Enable zero copy mode */ - sm_module->super.supported_mode = MCA_BCOL_BASE_ZERO_COPY; - - ret = mca_bcol_basesmuma_portals_init(cs); - if (OMPI_SUCCESS != ret) { - return NULL; - } - - sm_module->sg_state.phase = INIT; - - ret = PtlEQAlloc(((mca_bcol_basesmuma_portal_proc_info_t*) - cs->portals_info)->ni_h, MAX_PORTAL_EVENTS_IN_Q, - PTL_EQ_HANDLER_NONE, &sm_module->sg_state.read_eq); - - if (ret != PTL_OK) { - BASESMUMA_VERBOSE(10,( "PtlEQAlloc() failed: %d",ret)); - return NULL; - } - -#endif - /* blocking recursive double barrier test */ - /* - { - opal_output (ompi_bcol_base_framework.framework_output, "BBB About to hit the barrier test\n"); - int rc; - bcol_function_args_t bogus; - rc = bcol_basesmuma_rd_barrier_init(&(sm_module->super)); - rc = bcol_basesmuma_recursive_double_barrier( - &bogus, &(sm_module->super)); - } - */ - - /* in this case we only expect a single network context. - in the future we should loop around this */ - sm_modules = (mca_bcol_base_module_t **) malloc(sizeof(mca_bcol_base_module_t *)); - if( !sm_modules ) { - opal_output (ompi_bcol_base_framework.framework_output, "In base_bcol_masesmuma_setup_library_buffers failed to allocate memory for sm_modules\n"); - return NULL; - } - - sm_modules[0] = &(sm_module->super); - - return sm_modules; - - Error: - - /* cleanup */ - if( sm_module->reduction_tree ) { - free(sm_module->reduction_tree); - sm_module->reduction_tree=NULL; - } - - return NULL; -} - -OBJ_CLASS_INSTANCE(mca_bcol_basesmuma_module_t, - mca_bcol_base_module_t, - mca_bcol_basesmuma_module_construct, - mca_bcol_basesmuma_module_destruct); diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_progress.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_progress.c deleted file mode 100644 index 77263f94800..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_progress.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include "ompi/constants.h" - -#include "bcol_basesmuma.h" - -/* the progress function to be called from the opal progress function - */ -int bcol_basesmuma_progress(void) -{ - /* local variables */ - volatile int32_t *cntr; - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - - /* check to see if release of memory blocks needs to be done */ - if( opal_list_get_size(&(cs->nb_admin_barriers)) ) { - sm_nbbar_desc_t *item_ptr; - opal_list_t *list=&(cs->nb_admin_barriers); - /* process only if the list is non-empty */ - if( !OPAL_THREAD_TRYLOCK(&cs->nb_admin_barriers_mutex)) { - - for (item_ptr = (sm_nbbar_desc_t*) opal_list_get_first(list); - item_ptr != (sm_nbbar_desc_t*) opal_list_get_end(list); - item_ptr = (sm_nbbar_desc_t*) opal_list_get_next(item_ptr) ) - { - bcol_basesmuma_rd_nb_barrier_progress_admin(item_ptr); - /* check to see if an complete */ - if( NB_BARRIER_DONE == item_ptr->collective_phase ) { - /* barrier is complete - remove from the list. No need - * to put it on another list, as it is part of the memory - * bank control structure, and will be picked up - * again when needed. - */ - int index= - item_ptr->pool_index; - /* old way - ctl_struct specific */ - /* - volatile uint64_t *cntr= (volatile uint64_t *) - &(item_ptr->sm_module->colls_no_user_data. - ctl_buffs_mgmt[index].bank_gen_counter); - */ - - cntr= (volatile int32_t *) &(item_ptr->coll_buff-> - ctl_buffs_mgmt[index].bank_gen_counter); - item_ptr=(sm_nbbar_desc_t*)opal_list_remove_item((opal_list_t *)list, - ( opal_list_item_t *)item_ptr); - /* increment the generation number */ - OPAL_THREAD_ADD32(cntr,1); - } - } - - OPAL_THREAD_UNLOCK(&cs->nb_admin_barriers_mutex); - } - - } - return OMPI_SUCCESS; - -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_barrier.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_barrier.c deleted file mode 100644 index 9749491e9f3..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_barrier.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/* Recursive doubling blocking barrier */ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/patterns/net/netpatterns.h" - -#include "opal/sys/atomic.h" - -#include "bcol_basesmuma.h" - -#if 0 -int bcol_basesmuma_recursive_double_barrier(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - - /* local variables */ - int ret=OMPI_SUCCESS, idx, leading_dim, loop_cnt, exchange, flag_to_set; - int pair_rank, flag_offset; - mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - netpatterns_pair_exchange_node_t *my_exchange_node; - int extra_rank, my_rank, pow_2; - volatile mca_bcol_basesmuma_ctl_struct_t *partner_ctl; - volatile mca_bcol_basesmuma_ctl_struct_t *my_ctl; - int64_t sequence_number; - bool found; - int buff_index, first_instance=0; - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; -#if 0 - fprintf(stderr,"Entering the sm rd barrier\n"); - fflush(stderr); -#endif - - /* get the pointer to the segment of control structures */ - my_exchange_node=&(bcol_module->recursive_doubling_tree); - my_rank=bcol_module->super.sbgp_partner_module->my_index; - pow_2=bcol_module->super.sbgp_partner_module->pow_2; - - /* figure out what instance of the basesmuma bcol I am */ - leading_dim=bcol_module->colls_no_user_data.size_of_group; - sequence_number=input_args->sequence_num - c_input_args->bcol_module->squence_number_offset; - - buff_index=sequence_number & (bcol_module->colls_no_user_data.mask); - - idx=SM_ARRAY_INDEX(leading_dim,buff_index,0); - ctl_structs=(mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_no_user_data.ctl_buffs+idx; - my_ctl=ctl_structs[my_rank]; - if( my_ctl->sequence_number < sequence_number ) { - first_instance=1; - } - - /* get the pool index */ - if( first_instance ) { - idx = -1; - while( idx == -1 ) { - - idx=bcol_basesmuma_get_buff_index( - &(bcol_module->colls_no_user_data),sequence_number); - } - if( -1 == idx ){ - return ORTE_ERR_TEMP_OUT_OF_RESOURCE; - } - my_ctl->index=1; - /* this does not need to use any flag values , so only need to - * set the value for subsequent values that may need this */ - my_ctl->starting_flag_value=0; - flag_offset=0; - } else { - /* only one thread at a time will be making progress on this - * collective, so no need to make this atomic */ - my_ctl->index++; - flag_offset=my_ctl->starting_flag_value; - } - - /* signal that I have arrived */ - my_ctl->flag = -1; - /* don't need to set this flag anymore */ - my_ctl->sequence_number = sequence_number; - /* opal_atomic_wmb ();*/ - - if(0 < my_exchange_node->n_extra_sources) { - if (EXCHANGE_NODE == my_exchange_node->node_type) { - volatile int64_t *partner_sn; - int cnt=0; - - /* I will participate in the exchange - wait for signal from extra - ** process */ - extra_rank = my_exchange_node->rank_extra_source; - partner_ctl=(volatile mca_bcol_basesmuma_ctl_struct_t *)ctl_structs[extra_rank]; - - /*partner_ctl=ctl_structs[extra_rank];*/ - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - - /* spin n iterations until partner registers */ - loop_cnt=0; - found=false; - while( !found ) - { - if( *partner_sn >= sequence_number ) { - found=true; - } - cnt++; - if( cnt == 1000 ) { - opal_progress(); - cnt=0; - } - } - - } else { - - /* Nothing to do, already registared that I am here */ - } - } - - for(exchange = 0; exchange < my_exchange_node->n_exchanges; exchange++) { - - volatile int64_t *partner_sn; - volatile int *partner_flag; - int cnt=0; - - /* rank of exchange partner */ - pair_rank = my_rank ^ ( 1 SHIFT_UP exchange ); - partner_ctl=ctl_structs[pair_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - partner_flag=(volatile int *)&(partner_ctl->flag); - - /* signal that I am at iteration exchange of the algorithm */ - flag_to_set=flag_offset+exchange; - my_ctl->flag = flag_to_set; - - /* check to see if the partner has arrived */ - - /* spin n iterations until partner registers */ - found=false; - while( !found ) - { - if( (*partner_sn > sequence_number) || - ( *partner_sn == sequence_number && - *partner_flag >= flag_to_set ) ) { - found=true; - } else { - cnt++; - if( cnt == 1000 ) { - opal_progress(); - cnt=0; - } - } - } - } - - if(0 < my_exchange_node->n_extra_sources) { - if ( EXTRA_NODE == my_exchange_node->node_type ) { - int cnt=0; - - /* I will not participate in the exchange - - * wait for signal from extra partner */ - extra_rank = my_exchange_node->rank_extra_source; - partner_ctl=ctl_structs[extra_rank]; - flag_to_set=flag_offset+my_exchange_node->log_2; - - /* spin n iterations until partner registers */ - found=false; - while( !found ) - { - if (IS_PEER_READY(partner_ctl, flag_to_set, sequence_number)){ - found=true; - } else { - cnt++; - if( cnt == 1000 ) { - opal_progress(); - cnt=0; - } - } - } - - } else { - - /* signal the extra rank that I am done with the recursive - * doubling phase. - */ - flag_to_set=flag_offset+my_exchange_node->log_2; - my_ctl->flag = flag_to_set; - - } - } - - /* if I am the last instance of a basesmuma function in this collectie, - * release the resrouces */ - if (IS_LAST_BCOL_FUNC(c_input_args)){ - idx=bcol_basesmuma_free_buff( - &(bcol_module->colls_no_user_data), - sequence_number); - } else { - /* increment flag value - so next sm collective in the hierarchy - * will not collide with the current one, as they share the - * control structure */ - my_ctl->starting_flag_value+=(my_exchange_node->log_2+1); - } - - /* return */ - return ret; -} -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_nb_barrier.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_nb_barrier.c deleted file mode 100644 index 305a645870e..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_nb_barrier.c +++ /dev/null @@ -1,462 +0,0 @@ -/* - * Copyright (c) 2009-2012 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -/* we need make cleanup with all these includes START */ -#include -#include - -#include "ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "bcol_basesmuma.h" -#include "opal/sys/atomic.h" -#include "ompi/patterns/net/netpatterns.h" -#include "ompi/mca/bcol/base/base.h" - -/* - * Initialize nonblocking barrier. This is code specific for handling - * the recycling of data, and uses only a single set of control buffers. - * It also assumes that for a given process, only a single outstanding - * barrier operation will occur for a given control structure, - * with the sequence number being used for potential overlap in time - * between succesive barrier calls on different processes. - */ -int bcol_basesmuma_rd_nb_barrier_init_admin( - sm_nbbar_desc_t *sm_desc) - -{ - /* local variables */ - int ret=OMPI_SUCCESS, idx, leading_dim, loop_cnt, exchange; - int pair_rank; - mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - netpatterns_pair_exchange_node_t *my_exchange_node; - int extra_rank, my_rank; - mca_bcol_basesmuma_ctl_struct_t volatile *partner_ctl; - mca_bcol_basesmuma_ctl_struct_t volatile *my_ctl; - int64_t bank_genaration; - bool found; - int pool_index=sm_desc->pool_index; - mca_bcol_basesmuma_module_t *bcol_module=sm_desc->sm_module; - - /* get the pointer to the segment of control structures */ - idx=sm_desc->coll_buff->number_of_buffs+pool_index; - leading_dim=sm_desc->coll_buff->size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,idx,0); - ctl_structs=(mca_bcol_basesmuma_ctl_struct_t **) - sm_desc->coll_buff->ctl_buffs+idx; - bank_genaration= sm_desc->coll_buff->ctl_buffs_mgmt[pool_index].bank_gen_counter; - - my_exchange_node=&(bcol_module->recursive_doubling_tree); - my_rank=bcol_module->super.sbgp_partner_module->my_index; - my_ctl=ctl_structs[my_rank]; - /* debug print */ - /* - { - int ii; - for(ii = 0; ii < 6; ii++) { - fprintf(stderr,"UUU ctl_struct[%d] := %p\n",ii, - bcol_module->colls_no_user_data.ctl_buffs[ii]); - fflush(stderr); - } - } - */ - /* end debug */ - - /* signal that I have arrived */ - my_ctl->flag = -1; - - opal_atomic_wmb (); - - /* don't need to set this flag anymore */ - my_ctl->sequence_number = bank_genaration; - - if(0 < my_exchange_node->n_extra_sources) { - if (EXCHANGE_NODE == my_exchange_node->node_type) { - volatile int64_t *partner_sn; - /* I will participate in the exchange - wait for signal from extra - ** process */ - extra_rank = my_exchange_node->rank_extra_source; - partner_ctl=ctl_structs[extra_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - - /* spin n iterations until partner registers */ - loop_cnt=0; - found=false; - while( loop_cnt < bcol_module->super.n_poll_loops ) - { - if( *partner_sn >= bank_genaration ) { - found=true; - break; - } - loop_cnt++; - } - if( !found ) { - /* set restart parameters */ - sm_desc->collective_phase=NB_PRE_PHASE; - return OMPI_SUCCESS; - } - - } else { - - /* Nothing to do, already registared that I am here */ - } - } - - for(exchange = 0; exchange < my_exchange_node->n_exchanges; exchange++) { - - volatile int64_t *partner_sn; - volatile int *partner_flag; - - /* rank of exchange partner */ - pair_rank = my_rank ^ ( 1 SHIFT_UP exchange ); - partner_ctl=ctl_structs[pair_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - partner_flag=(volatile int *)&(partner_ctl->flag); - - /* signal that I am at iteration exchange of the algorithm */ - my_ctl->flag = exchange; - - /* check to see if the partner has arrived */ - - /* spin n iterations until partner registers */ - loop_cnt=0; - found=false; - while( loop_cnt < bcol_module->super.n_poll_loops ) - { - if( (*partner_sn > bank_genaration) || - ( *partner_sn == bank_genaration && - *partner_flag >= exchange ) ) { - found=true; - break; - } - - loop_cnt++; - - } - if( !found ) { - /* set restart parameters */ - sm_desc->collective_phase=NB_RECURSIVE_DOUBLING; - sm_desc->recursive_dbl_iteration=exchange; - return OMPI_SUCCESS; - } - - } - - if(0 < my_exchange_node->n_extra_sources) { - if ( EXTRA_NODE == my_exchange_node->node_type ) { - volatile int64_t *partner_sn; - volatile int *partner_flag; - - /* I will not participate in the exchange - - * wait for signal from extra partner */ - extra_rank = my_exchange_node->rank_extra_source; - partner_ctl=ctl_structs[extra_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - partner_flag=(volatile int *)&(partner_ctl->flag); - - /* spin n iterations until partner registers */ - loop_cnt=0; - found=false; - while( loop_cnt < bcol_module->super.n_poll_loops ) - { - if( (*partner_sn > bank_genaration) || - ( (*partner_sn == bank_genaration) && - (*partner_flag == (my_exchange_node->log_2)) ) ) { - found=true; - break; - } - loop_cnt++; - } - if( !found ) { - /* set restart parameters */ - sm_desc->collective_phase=NB_POST_PHASE; - return OMPI_SUCCESS; - } - - } else { - - /* signal the extra rank that I am done with the recursive - * doubling phase. - */ - my_ctl->flag = my_exchange_node->n_exchanges; - - } - } - - /* set the barrier as complete */ - sm_desc->collective_phase=NB_BARRIER_DONE; - /* return */ - return ret; -} - -/* admin nonblocking barrier - progress function */ -int bcol_basesmuma_rd_nb_barrier_progress_admin( - sm_nbbar_desc_t *sm_desc) - -{ - /* local variables */ - int ret=OMPI_SUCCESS, idx, leading_dim, loop_cnt, exchange; - int pair_rank, start_index, restart_phase; - mca_bcol_basesmuma_ctl_struct_t **ctl_structs; - netpatterns_pair_exchange_node_t *my_exchange_node; - int extra_rank, my_rank; - mca_bcol_basesmuma_ctl_struct_t volatile *partner_ctl; - mca_bcol_basesmuma_ctl_struct_t volatile *my_ctl; - int64_t bank_genaration; - int pool_index=sm_desc->pool_index; - bool found; - mca_bcol_basesmuma_module_t *bcol_module=sm_desc->sm_module; - - /* get the pointer to the segment of control structures */ - idx = sm_desc->coll_buff->number_of_buffs+pool_index; - leading_dim = sm_desc->coll_buff->size_of_group; - idx = SM_ARRAY_INDEX(leading_dim,idx,0); - ctl_structs = (mca_bcol_basesmuma_ctl_struct_t **) - sm_desc->coll_buff->ctl_buffs+idx; - bank_genaration = sm_desc->coll_buff->ctl_buffs_mgmt[pool_index].bank_gen_counter; - - my_exchange_node=&(bcol_module->recursive_doubling_tree); - my_rank=bcol_module->super.sbgp_partner_module->my_index; - my_ctl=ctl_structs[my_rank]; - - /* check to make sure that this should be progressed */ - if( ( sm_desc->collective_phase == NB_BARRIER_INACTIVE ) || - ( sm_desc->collective_phase == NB_BARRIER_DONE ) ) - { - return OMPI_SUCCESS; - } - - /* set the restart up - and jump to the correct place in the algorithm */ - restart_phase=sm_desc->collective_phase; - if ( NB_PRE_PHASE == restart_phase ) { - start_index=0; - } else if ( NB_RECURSIVE_DOUBLING == restart_phase ) { - start_index=sm_desc->recursive_dbl_iteration; - goto Exchange_phase; - } else { - goto Post_phase; - } - - if(0 < my_exchange_node->n_extra_sources) { - if (EXCHANGE_NODE == my_exchange_node->node_type) { - volatile int64_t *partner_sn; - /* I will participate in the exchange - wait for signal from extra - ** process */ - extra_rank = my_exchange_node->rank_extra_source; - partner_ctl=ctl_structs[extra_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - - /* spin n iterations until partner registers */ - loop_cnt=0; - while( loop_cnt < bcol_module->super.n_poll_loops ) - { - found=false; - if( *partner_sn >= bank_genaration ) { - found=true; - break; - } - loop_cnt++; - } - if( !found ) { - /* set restart parameters */ - sm_desc->collective_phase=NB_PRE_PHASE; - return OMPI_SUCCESS; - } - - } else { - - /* Nothing to do, already registared that I am here */ - } - } - -Exchange_phase: - - for(exchange = start_index; - exchange < my_exchange_node->n_exchanges; exchange++) { - - volatile int64_t *partner_sn; - volatile int *partner_flag; - - /* rank of exchange partner */ - pair_rank = my_rank ^ ( 1 SHIFT_UP exchange ); - partner_ctl=ctl_structs[pair_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - partner_flag=(volatile int *)&(partner_ctl->flag); - - /* signal that I am at iteration exchange of the algorithm */ - my_ctl->flag = exchange; - - /* check to see if the partner has arrived */ - - /* spin n iterations until partner registers */ - loop_cnt=0; - found=false; - while( loop_cnt < bcol_module->super.n_poll_loops ) - { - if( (*partner_sn > bank_genaration) || - ( (*partner_sn == bank_genaration) && - (*partner_flag >= exchange) ) ) { - found=true; - break; - } - loop_cnt++; - } - if( !found ) { - /* set restart parameters */ - sm_desc->collective_phase=NB_RECURSIVE_DOUBLING; - sm_desc->recursive_dbl_iteration=exchange; - return OMPI_SUCCESS; - } - - } - -Post_phase: - if(0 < my_exchange_node->n_extra_sources) { - if ( EXTRA_NODE == my_exchange_node->node_type ) { - volatile int64_t *partner_sn; - volatile int *partner_flag; - - /* I will not participate in the exchange - - * wait for signal from extra partner */ - extra_rank = my_exchange_node->rank_extra_source; - partner_ctl=ctl_structs[extra_rank]; - partner_sn=(volatile int64_t *)&(partner_ctl->sequence_number); - partner_flag=(volatile int *)&(partner_ctl->flag); - - /* spin n iterations until partner registers */ - loop_cnt=0; - found=false; - while( loop_cnt < bcol_module->super.n_poll_loops ) - { - if( (*partner_sn > bank_genaration) || - ( *partner_sn == bank_genaration && - *partner_flag == (my_exchange_node->log_2) ) ) { - found=true; - break; - } - loop_cnt++; - } - if( !found ) { - /* set restart parameters */ - sm_desc->collective_phase=NB_POST_PHASE; - return OMPI_SUCCESS; - } - - } else { - - /* signal the extra rank that I am done with the recursive - * doubling phase. - */ - my_ctl->flag = my_exchange_node->n_exchanges; - - } - } - - /* set the barrier as complete */ - sm_desc->collective_phase=NB_BARRIER_DONE; - - /* return */ - return ret; -} - -static int bcol_basesmuma_memsync(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - int rc; - int memory_bank = input_args->root; - - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - sm_buffer_mgmt *buff_block = &(bcol_module->colls_with_user_data); - sm_nbbar_desc_t *sm_desc = &(buff_block->ctl_buffs_mgmt[memory_bank].nb_barrier_desc); - - sm_desc->coll_buff = buff_block; - /* - printf("XXX SYNC call\n"); - */ - - rc = bcol_basesmuma_rd_nb_barrier_init_admin( - sm_desc); - if (OMPI_SUCCESS != rc) { - return rc; - } - - if (NB_BARRIER_DONE != sm_desc->collective_phase) { - mca_bcol_basesmuma_component_t *cs = &mca_bcol_basesmuma_component; - opal_list_t *list=&(cs->nb_admin_barriers); - opal_list_item_t *append_item; - - /* put this onto the progression list */ - OPAL_THREAD_LOCK(&(cs->nb_admin_barriers_mutex)); - append_item=(opal_list_item_t *) - &(buff_block->ctl_buffs_mgmt[memory_bank].nb_barrier_desc); - opal_list_append(list,append_item); - OPAL_THREAD_UNLOCK(&(cs->nb_admin_barriers_mutex)); - /* progress communications so that resources can be freed up */ - return BCOL_FN_STARTED; - } - - /* Done - bump the counter */ - (buff_block->ctl_buffs_mgmt[memory_bank].bank_gen_counter)++; - /* - printf("XXX SYNC call done \n"); - */ - return BCOL_FN_COMPLETE; -} - -static int bcol_basesmuma_memsync_progress(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - int memory_bank = input_args->root; - - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - sm_buffer_mgmt *buff_block = &(bcol_module->colls_with_user_data); - sm_nbbar_desc_t *sm_desc = &(buff_block->ctl_buffs_mgmt[memory_bank].nb_barrier_desc); - - /* I do not have to do anything, since the - progress done by basesmuma progress engine */ - - if (NB_BARRIER_DONE != sm_desc->collective_phase) { - return BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - -int bcol_basesmuma_memsync_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_SYNC; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - bcol_basesmuma_memsync, - bcol_basesmuma_memsync_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.c deleted file mode 100644 index 570280d0842..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.c +++ /dev/null @@ -1,382 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "ompi/op/op.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/bcol/bcol.h" - -#include "opal/include/opal_stdint.h" - -#include "bcol_basesmuma.h" -#include "bcol_basesmuma_reduce.h" -/** - * gvm - Shared memory reduce - */ - -static int bcol_basesmuma_reduce_intra_fanin_progress(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_reduce_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_REDUCE; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1048576; - comm_attribs.data_src = DATA_SRC_KNOWN; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; - inv_attribs.datatype_bitmap = 0x11111111; - inv_attribs.op_types_bitmap = 0x11111111; - - - /* Set attributes for fanin fanout algorithm */ - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, bcol_basesmuma_reduce_intra_fanin, - bcol_basesmuma_reduce_intra_fanin_progress); - - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, NULL, NULL); - - return OMPI_SUCCESS; -} - -/* - * Small data fanin reduce - * ML buffers are used for both payload and control structures - * This functions works with hierarchical allreduce and - * progress engine - */ -static inline int reduce_children (mca_bcol_basesmuma_module_t *bcol_module, volatile void *rbuf, netpatterns_tree_node_t *my_reduction_node, - int *iteration, volatile mca_bcol_basesmuma_header_t *my_ctl_pointer, ompi_datatype_t *dtype, - volatile mca_bcol_basesmuma_payload_t *data_buffs, int count, struct ompi_op_t *op, int process_shift) { - volatile mca_bcol_basesmuma_header_t * child_ctl_pointer; - int bcol_id = (int) bcol_module->super.bcol_id; - int64_t sequence_number = my_ctl_pointer->sequence_number; - int8_t ready_flag = my_ctl_pointer->ready_flag; - int group_size = bcol_module->colls_no_user_data.size_of_group; - - if (LEAF_NODE != my_reduction_node->my_node_type) { - volatile char *child_data_pointer; - volatile void *child_rbuf; - - /* for each child */ - /* my_result_data = child_result_data (op) my_source_data */ - - for (int child = *iteration ; child < my_reduction_node->n_children ; ++child) { - int child_rank = my_reduction_node->children_ranks[child] + process_shift; - - if (group_size <= child_rank){ - child_rank -= group_size; - } - - child_ctl_pointer = data_buffs[child_rank].ctl_struct; - child_data_pointer = data_buffs[child_rank].payload; - - if (!IS_PEER_READY(child_ctl_pointer, ready_flag, sequence_number, REDUCE_FLAG, bcol_id)) { - *iteration = child; - return BCOL_FN_STARTED; - } - - child_rbuf = child_data_pointer + child_ctl_pointer->roffsets[bcol_id]; - - ompi_op_reduce(op,(void *)child_rbuf,(void *)rbuf, count, dtype); - } /* end child loop */ - } - - if (ROOT_NODE != my_reduction_node->my_node_type) { - opal_atomic_wmb (); - my_ctl_pointer->flags[REDUCE_FLAG][bcol_id] = ready_flag; - } - - return BCOL_FN_COMPLETE; -} - -static int bcol_basesmuma_reduce_intra_fanin_progress(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - - netpatterns_tree_node_t *my_reduction_node; - int my_rank, my_node_index; - struct ompi_datatype_t *dtype = input_args->dtype; - int leading_dim, idx; - - /* Buffer index */ - int buff_idx = input_args->src_desc->buffer_index; - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buff_idx].iteration; - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - void *data_addr = (void *)input_args->src_desc->data_addr; - volatile void *rbuf; - - /* get addressing information */ - my_rank = bcol_module->super.sbgp_partner_module->my_index; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx = SM_ARRAY_INDEX(leading_dim, buff_idx, 0); - - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs + idx; - - /* Get control structure and payload buffer */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - my_node_index = my_rank - input_args->root; - if (0 > my_node_index) { - int group_size = bcol_module->colls_no_user_data.size_of_group; - my_node_index += group_size; - } - - my_reduction_node = bcol_module->reduction_tree + my_node_index; - rbuf = (volatile void *)((uintptr_t) data_addr + input_args->rbuf_offset); - - return reduce_children (bcol_module, rbuf, my_reduction_node, iteration, my_ctl_pointer, dtype, - data_buffs, input_args->count, input_args->op, input_args->root); -} - -int bcol_basesmuma_reduce_intra_fanin(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int rc=BCOL_FN_COMPLETE; - int my_rank,group_size,my_node_index; - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - - netpatterns_tree_node_t *my_reduction_node; - volatile int8_t ready_flag; - int bcol_id = (int) bcol_module->super.bcol_id; - volatile void *sbuf,*rbuf; - int sbuf_offset,rbuf_offset; - int root,count; - int64_t sequence_number=input_args->sequence_num; - struct ompi_datatype_t *dtype; - int leading_dim,idx; - - /* Buffer index */ - int buff_idx = input_args->src_desc->buffer_index; - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buff_idx].iteration; - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char * my_data_pointer; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - void *data_addr = (void *)input_args->src_desc->data_addr; - -#if 0 - fprintf(stderr,"777 entering sm reduce \n"); -#endif - - /* get addressing information */ - my_rank=bcol_module->super.sbgp_partner_module->my_index; - group_size=bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - /* fprintf(stderr,"AAA the devil!!\n"); */ - /* Get control structure and payload buffer */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - my_data_pointer = (volatile char *)data_addr; - - /* Align node index to around sbgp root */ - root = input_args->root; - my_node_index = my_rank - root; - if (0 > my_node_index) { - my_node_index += group_size; - } - - /* get arguments */ - sbuf_offset = input_args->sbuf_offset; - rbuf_offset = input_args->rbuf_offset; - sbuf = (volatile void *)(my_data_pointer + sbuf_offset); - data_buffs[my_rank].payload = (void*)sbuf; - rbuf = (volatile void *)(my_data_pointer + rbuf_offset); - count = input_args->count; - dtype = input_args->dtype; - - /* Cache my rbuf_offset */ - my_ctl_pointer->roffsets[bcol_id] = rbuf_offset; - - /* get my node for the reduction tree */ - my_reduction_node=&(bcol_module->reduction_tree[my_node_index]); - - /* init the header */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - - input_args->result_in_rbuf = (ROOT_NODE == my_reduction_node->my_node_type); - - /* set starting point for progress loop */ - *iteration = 0; - my_ctl_pointer->ready_flag = ready_flag; - - if (sbuf != rbuf) { - rc = ompi_datatype_copy_content_same_ddt(dtype, count, (char *)rbuf, - (char *)sbuf); - if( 0 != rc ) { - return OMPI_ERROR; - } - } - - rc = reduce_children (bcol_module, rbuf, my_reduction_node, iteration, my_ctl_pointer, dtype, - data_buffs, count, input_args->op, root); - - /* Flag value if other bcols are called */ - my_ctl_pointer->starting_flag_value[bcol_id]++; - - /* Recycle payload buffers */ - - return rc; -} - -/* Small data fanin reduce - * Uses SM buffer (backed by SM file) for both control structures and - * payload - * - * NTH: How does this differ from the new one? Can we replace this - * with a call to the new init then a call the new progress until - * complete? - */ -int bcol_basesmuma_reduce_intra_fanin_old(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args) -{ - /* local variables */ - int rc=OMPI_SUCCESS; - int my_rank,group_size,process_shift,my_node_index; - int n_children,child; - mca_bcol_basesmuma_module_t* bcol_module = - (mca_bcol_basesmuma_module_t *)c_input_args->bcol_module; - - netpatterns_tree_node_t *my_reduction_node; - volatile int8_t ready_flag; - volatile void *sbuf,*rbuf; - int sbuf_offset,rbuf_offset; - int root,count; - struct ompi_op_t *op; - int64_t sequence_number=input_args->sequence_num; - struct ompi_datatype_t *dtype; - int leading_dim,idx; - int buff_idx; - int child_rank; - int bcol_id = (int) bcol_module->super.bcol_id; - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - volatile char * my_data_pointer; - volatile char * child_data_pointer; - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t * child_ctl_pointer; - -#if 0 - fprintf(stderr,"Entering fanin reduce \n"); -#endif - - /* Buffer index */ - buff_idx = input_args->src_desc->buffer_index; - /* get addressing information */ - my_rank=bcol_module->super.sbgp_partner_module->my_index; - group_size=bcol_module->colls_no_user_data.size_of_group; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - /*ctl_structs=(mca_bcol_basesmuma_ctl_struct_t **) - bcol_module->colls_with_user_data.ctl_buffs+idx;*/ - data_buffs = (volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - - /* Get control structure and payload buffer */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - my_data_pointer = (volatile char *) data_buffs[my_rank].payload; - - /* Align node index to around sbgp root */ - root = input_args->root; - process_shift = root; - my_node_index = my_rank - root; - if (0 > my_node_index ) { - my_node_index += group_size; - } - - /* get arguments */ - sbuf_offset = input_args->sbuf_offset; - rbuf_offset = input_args->rbuf_offset; - sbuf = (volatile void *)(my_data_pointer + sbuf_offset); - rbuf = (volatile void *)(my_data_pointer + rbuf_offset); - op = input_args->op; - count = input_args->count; - dtype = input_args->dtype; - - /* get my node for the reduction tree */ - my_reduction_node=&(bcol_module->reduction_tree[my_node_index]); - n_children=my_reduction_node->n_children; - - /* init the header */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - - input_args->result_in_rbuf = (ROOT_NODE == my_reduction_node->my_node_type); - - rc = ompi_datatype_copy_content_same_ddt(dtype, count, (char *)rbuf, - (char *)sbuf); - if (0 != rc) { - return OMPI_ERROR; - } - - if (LEAF_NODE != my_reduction_node->my_node_type) { - volatile void *child_rbuf; - /* for each child */ - /* my_result_data = child_result_data (op) my_source_data */ - - for (child = 0 ; child < n_children ; ++child) { - child_rank = my_reduction_node->children_ranks[child]; - child_rank += process_shift; - - /* wrap around */ - if( group_size <= child_rank ){ - child_rank-=group_size; - } - - /*child_ctl_pointer = ctl_structs[child_rank];*/ - child_ctl_pointer = data_buffs[child_rank].ctl_struct; - child_data_pointer = data_buffs[child_rank].payload; - - child_rbuf = child_data_pointer + rbuf_offset; - /* wait until child child's data is ready for use */ - while (!IS_PEER_READY(child_ctl_pointer, ready_flag, sequence_number, REDUCE_FLAG, bcol_id)) { - opal_progress(); - } - - /* apply collective operation */ - ompi_op_reduce(op,(void *)child_rbuf,(void *)rbuf, count,dtype); - } /* end child loop */ - } - - if (ROOT_NODE != my_reduction_node->my_node_type) { - opal_atomic_wmb (); - my_ctl_pointer->flags[REDUCE_FLAG][bcol_id] = ready_flag; - } - - my_ctl_pointer->starting_flag_value[bcol_id]++; - - return rc; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.h b/ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.h deleted file mode 100644 index 3d6f2094469..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_reduce.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef __BASESMUMA_REDUCE_H_ - -#define __BASESMUMA_REDUCE_H_ - -#include "ompi_config.h" -#include "ompi/mca/bcol/basesmuma/bcol_basesmuma.h" -#include "ompi/constants.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" -#include "bcol_basesmuma_utils.h" -#include - -enum { - BLOCK_OFFSET = 0, - LOCAL_REDUCE_SEG_OFFSET, - BLOCK_COUNT, - SEG_SIZE, - NOFFSETS -}; - -int compute_knomial_reduce_offsets(int group_index, int count, struct - ompi_datatype_t *dtype,int k_radix,int n_exchanges, - int **offsets); - -int compute_knomial_reduce_offsets_reverse(int group_index, int count, struct - ompi_datatype_t *dtype,int k_radix,int n_exchanges, - int **offsets); - -int bcol_basesmuma_lmsg_reduce_recursivek_scatter_reduce(mca_bcol_basesmuma_module_t *sm_module, - const int buffer_index, void *sbuf, - void *rbuf, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype, - const int relative_group_index, - const int padded_start_byte, - volatile int8_t ready_flag, - volatile mca_bcol_basesmuma_payload_t *data_buffs); - -int bcol_basesmuma_lmsg_reduce_knomial_gather(mca_bcol_basesmuma_module_t *basesmuma_module, - const int buffer_index, - void *sbuf,void *rbuf, int count, struct - ompi_datatype_t *dtype, - const int my_group_index, - const int padded_start_byte, - volatile int8_t rflag, - volatile mca_bcol_basesmuma_payload_t *data_buffs); - -int bcol_basesmuma_lmsg_reduce_extra_root(mca_bcol_basesmuma_module_t *sm_module, - const int buffer_index, void *sbuf, - void *rbuf, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype, - const int relative_group_index, - const int padded_start_byte, - volatile int8_t rflag, - volatile mca_bcol_basesmuma_payload_t *data_buffs); - - - -int bcol_basesmuma_lmsg_reduce_extra_non_root(mca_bcol_basesmuma_module_t *sm_module, - const int buffer_index, void *sbuf, - void *rbuf, - int root, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype, - const int relative_group_index, - const int group_size, - const int padded_start_byte, - volatile int8_t rflag, - volatile mca_bcol_basesmuma_payload_t *data_buffs); - -int bcol_basesmuma_lmsg_reduce(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -int bcol_basesmuma_lmsg_reduce_extra(bcol_function_args_t *input_args, - mca_bcol_base_function_t *c_input_args); - -void basesmuma_reduce_recv(int my_group_index, int peer, - void *recv_buffer, - int recv_size, - volatile int8_t ready_flag_val, - volatile mca_bcol_basesmuma_payload_t *data_buffs); - -void basesmuma_reduce_send(int my_group_index, - int peer, - void *send_buffer, - int snd_size, - int send_offset, - volatile int8_t ready_flag_val, - volatile mca_bcol_basesmuma_payload_t *data_buffs); - -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_rk_barrier.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_rk_barrier.c deleted file mode 100644 index 7c25b866c62..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_rk_barrier.c +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/bcol/basesmuma/bcol_basesmuma.h" - -/* -#define IS_BARRIER_READY(peer, my_flag, my_sequence_number)\ - (((peer)->sequence_number == (my_sequence_number) && \ - (peer)->flags[BARRIER_RKING_FLAG][bcol_id] >= (my_flag) \ - )? true : false ) -*/ - -#define CALC_ACTIVE_REQUESTS(active_requests,peers, tree_order) \ -do{ \ - for( j = 0; j < (tree_order - 1); j++){ \ - if( 0 > peers[j] ) { \ - /* set the bit */ \ - *active_requests ^= (1<bcol_module; - netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree; - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buffer_index].active_requests); - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buffer_index].iteration; - int *status = &bcol_module->ml_mem.nb_coll_desc[buffer_index].status; - int leading_dim, buff_idx, idx; - int bcol_id = (int) bcol_module->super.bcol_id; - - int i, j, probe; - int src; - - int pow_k, tree_order; - int max_requests = 0; /* important to initialize this */ - - int matched = 0; - int64_t sequence_number=input_args->sequence_num; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *peer_ctl_pointer; -#if 0 - fprintf(stderr,"entering sm barrier sn = %d buff index = %d\n",sequence_number,input_args->buffer_index); -#endif - /* initialize the iteration counter */ - buff_idx = input_args->buffer_index; - leading_dim = bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - /* Set pointer to current proc ctrl region */ - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* init the header */ - BASESMUMA_HEADER_INIT(my_ctl_pointer, ready_flag, sequence_number, bcol_id); - /* initialize these */ - *iteration = 0; - *active_requests = 0; - *status = 0; - - /* k-nomial parameters */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - - /* calculate the maximum number of requests - * at each level each rank communicates with - * at most (k - 1) peers - * so if we set k - 1 bit fields in "max_requests", then - * we have max_request == 2^(k - 1) -1 - */ - for(i = 0; i < (tree_order - 1); i++){ - max_requests ^= (1<node_type ) { - - /* then I will signal to my proxy rank*/ - - my_ctl_pointer->flags[BARRIER_RKING_FLAG][bcol_id] = ready_flag; - ready_flag = flag_offset + 1 + pow_k + 2; - /* now, poll for completion */ - - src = exchange_node->rank_extra_sources_array[0]; - peer_ctl_pointer = data_buffs[src].ctl_struct; - - for( i = 0; i < cm->num_to_probe && (0 == matched); i++ ) { - if(IS_PEER_READY(peer_ctl_pointer, ready_flag, sequence_number, BARRIER_RKING_FLAG, bcol_id)){ - matched = 1; - - goto FINISHED; - } - - } - - /* cache state and bail */ - *iteration = -1; - return BCOL_FN_STARTED; - - }else if ( 0 < exchange_node->n_extra_sources ) { - - /* I am a proxy for someone */ - src = exchange_node->rank_extra_sources_array[0]; - peer_ctl_pointer = data_buffs[src].ctl_struct; - - /* probe for extra rank's arrival */ - for( i = 0; i < cm->num_to_probe && ( 0 == matched); i++) { - if(IS_PEER_READY(peer_ctl_pointer,ready_flag, sequence_number, BARRIER_RKING_FLAG, bcol_id)){ - matched = 1; - /* copy it in */ - goto MAIN_PHASE; - } - } - *status = ready_flag; - *iteration = -1; - return BCOL_FN_STARTED; - - } - -MAIN_PHASE: - /* bump the ready flag */ - ready_flag++; - - /* we start the recursive k - ing phase */ - for( *iteration = 0; *iteration < pow_k; (*iteration)++) { - /* announce my arrival */ - my_ctl_pointer->flags[BARRIER_RKING_FLAG][bcol_id] = ready_flag; - /* calculate the number of active requests */ - CALC_ACTIVE_REQUESTS(active_requests,exchange_node->rank_exchanges[*iteration],tree_order); - /* Now post the recv's */ - for( j = 0; j < (tree_order - 1); j++ ) { - - /* recv phase */ - src = exchange_node->rank_exchanges[*iteration][j]; - if( src < 0 ) { - /* then not a valid rank, continue */ - continue; - } - - peer_ctl_pointer = data_buffs[src].ctl_struct; - if( !(*active_requests&(1<num_to_probe && (0 == matched); probe++){ - if(IS_PEER_READY(peer_ctl_pointer,ready_flag, sequence_number, BARRIER_RKING_FLAG, bcol_id)){ - matched = 1; - /* set this request's bit */ - *active_requests ^= (1<flags[BARRIER_RKING_FLAG][bcol_id]; - return BCOL_FN_STARTED; - } - } - - /* bump the flag one more time for the extra rank */ - ready_flag = flag_offset + 1 + pow_k + 2; - - /* finish off the last piece, send the data back to the extra */ - if( 0 < exchange_node->n_extra_sources ) { - /* simply announce my arrival */ - my_ctl_pointer->flags[BARRIER_RKING_FLAG][bcol_id] = ready_flag; - - } - -FINISHED: - - - my_ctl_pointer->starting_flag_value[bcol_id]++; - return BCOL_FN_COMPLETE; -} - - -/* allgather progress function */ - -int bcol_basesmuma_k_nomial_barrier_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - - - /* local variables */ - int flag_offset; - volatile int8_t ready_flag; - mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) const_args->bcol_module; - netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree; - mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(bcol_module->ml_mem.nb_coll_desc[buffer_index].active_requests); - - int *iteration = &bcol_module->ml_mem.nb_coll_desc[buffer_index].iteration; - int *status = &bcol_module->ml_mem.nb_coll_desc[buffer_index].status; - int *iter = iteration; /* double alias */ - int leading_dim, idx, buff_idx; - - int i, j, probe; - int src; - int max_requests = 0; /* critical to set this */ - int pow_k, tree_order; - int bcol_id = (int) bcol_module->super.bcol_id; - - int matched = 0; - int64_t sequence_number=input_args->sequence_num; - int my_rank = bcol_module->super.sbgp_partner_module->my_index; - - volatile mca_bcol_basesmuma_payload_t *data_buffs; - - /* control structures */ - volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; - volatile mca_bcol_basesmuma_header_t *peer_ctl_pointer; -#if 0 - fprintf(stderr,"%d: entering sm allgather progress active requests %d iter %d ready_flag %d\n",my_rank, - *active_requests,*iter,*status); -#endif - buff_idx = buffer_index; - leading_dim=bcol_module->colls_no_user_data.size_of_group; - idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0); - - data_buffs=(volatile mca_bcol_basesmuma_payload_t *) - bcol_module->colls_with_user_data.data_buffs+idx; - my_ctl_pointer = data_buffs[my_rank].ctl_struct; - - /* increment the starting flag by one and return */ - flag_offset = my_ctl_pointer->starting_flag_value[bcol_id]; - ready_flag = *status; - /* k-nomial parameters */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - - /* calculate the maximum number of requests - * at each level each rank communicates with - * at most (k - 1) peers - * so if we set k - 1 bit fields in "max_requests", then - * we have max_request == 2^(k - 1) -1 - */ - for(i = 0; i < (tree_order - 1); i++){ - max_requests ^= (1<node_type ) { - - /* If I'm in here, then I must be looking for data */ - ready_flag = flag_offset + 1 + pow_k + 2; - - src = exchange_node->rank_extra_sources_array[0]; - peer_ctl_pointer = data_buffs[src].ctl_struct; - - for( i = 0; i < cm->num_to_probe && (0 == matched); i++ ) { - if(IS_PEER_READY(peer_ctl_pointer, ready_flag, sequence_number, BARRIER_RKING_FLAG, bcol_id)){ - matched = 1; - - goto FINISHED; - } - - } - - /* haven't found it, state is cached, bail out */ - return BCOL_FN_STARTED; - - }else if ( ( -1 == *iteration ) && (0 < exchange_node->n_extra_sources) ) { - - /* I am a proxy for someone */ - src = exchange_node->rank_extra_sources_array[0]; - peer_ctl_pointer = data_buffs[src].ctl_struct; - - /* probe for extra rank's arrival */ - for( i = 0; i < cm->num_to_probe && ( 0 == matched); i++) { - if(IS_PEER_READY(peer_ctl_pointer,ready_flag, sequence_number, BARRIER_RKING_FLAG, bcol_id)){ - matched = 1; - /* bump the flag */ - ready_flag++; - *iteration = 0; - goto MAIN_PHASE; - } - } - return BCOL_FN_STARTED; - - } - -MAIN_PHASE: - - /* start the recursive k - ing phase */ - for( *iter=*iteration; *iter < pow_k; (*iter)++) { - /* I am ready at this level */ - my_ctl_pointer->flags[BARRIER_RKING_FLAG][bcol_id] = ready_flag; - if( 0 == *active_requests ) { - /* flip some bits, if we don't have active requests from a previous visit */ - CALC_ACTIVE_REQUESTS(active_requests,exchange_node->rank_exchanges[*iter],tree_order); - } - for( j = 0; j < (tree_order - 1); j++ ) { - - /* recv phase */ - src = exchange_node->rank_exchanges[*iter][j]; - if( src < 0 ) { - /* then not a valid rank, continue - */ - continue; - } - - peer_ctl_pointer = data_buffs[src].ctl_struct; - if( !(*active_requests&(1<num_to_probe && (0 == matched); probe++){ - if(IS_PEER_READY(peer_ctl_pointer,ready_flag, sequence_number, BARRIER_RKING_FLAG, bcol_id)){ - matched = 1; - /* flip the request's bit */ - *active_requests ^= (1<flags[BARRIER_RKING_FLAG][bcol_id]; - return BCOL_FN_STARTED; - } - } - /* bump the flag one more time for the extra rank */ - ready_flag = flag_offset + 1 + pow_k + 2; - - /* finish off the last piece, send the data back to the extra */ - if( 0 < exchange_node->n_extra_sources ) { - /* simply announce my arrival */ - my_ctl_pointer->flags[BARRIER_RKING_FLAG][bcol_id] = ready_flag; - - } - -FINISHED: - - my_ctl_pointer->starting_flag_value[bcol_id]++; - return BCOL_FN_COMPLETE; -} - -/* Register k-nomial barrier functions to the BCOL function table, - * so they can be selected - */ -int bcol_basesmuma_barrier_init(mca_bcol_base_module_t *super) -{ -mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_BARRIER; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_basesmuma_k_nomial_barrier_init, - bcol_basesmuma_k_nomial_barrier_progress); - - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_setup.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_setup.c deleted file mode 100644 index 6aefc8eac87..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_setup.c +++ /dev/null @@ -1,588 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. - * All rights reserved. - * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "opal/mca/mpool/base/base.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/patterns/comm/coll_ops.h" - -#include "opal/class/opal_object.h" -#include "opal/dss/dss.h" - -#include "bcol_basesmuma.h" - -int base_bcol_basesmuma_setup_ctl_struct( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_bcol_basesmuma_component_t *cs, - sm_buffer_mgmt *ctl_mgmt); - -/* this is the new one, uses the pml allgather */ -int base_bcol_basesmuma_exchange_offsets( - mca_bcol_basesmuma_module_t *sm_bcol_module, - void **result_array, uint64_t mem_offset, int loop_limit, - int leading_dim) -{ - int ret=OMPI_SUCCESS,i; - int count; - int index_in_group; - char *send_buff; - char *recv_buff; - uint64_t rem_mem_offset; - - /* malloc some memory */ - count = sizeof(uint64_t) + sizeof(int); - send_buff = (char *) malloc(count); - recv_buff = (char *) malloc(count * - sm_bcol_module->super.sbgp_partner_module->group_size); - /* exchange the base pointer for the controls structures - gather - * every one else's infromation. - */ - - - /* pack the offset of the allocated region */ - memcpy((void *) send_buff, (void *) &(sm_bcol_module->super.sbgp_partner_module->my_index), sizeof(int)); - memcpy((void *) (send_buff+ sizeof(int)), (void *) &(mem_offset), sizeof(uint64_t)); - - /* get the offsets from all procs, so can setup the control data - * structures. - */ - - ret=comm_allgather_pml((void *) send_buff,(void *) recv_buff,count, - MPI_BYTE, - sm_bcol_module->super.sbgp_partner_module->my_index, - sm_bcol_module->super.sbgp_partner_module->group_size, - sm_bcol_module->super.sbgp_partner_module->group_list, - sm_bcol_module->super.sbgp_partner_module->group_comm); - if( OMPI_SUCCESS != ret ) { - goto exit_ERROR; - } - - /* get the control stucture offsets within the shared memory - * region and populate the control structures - we do not assume - * any symmetry in memory layout of each process - */ - - /* loop over the procs in the group */ - for(i = 0; i < sm_bcol_module->super.sbgp_partner_module->group_size; i++){ - int array_id; - /* get this peer's index in the group */ - memcpy((void *) &index_in_group, (void *) (recv_buff + i*count) , sizeof(int)); - - /* get the offset */ - memcpy((void *) &rem_mem_offset, (void *) (recv_buff + i*count + sizeof(int)), sizeof(uint64_t)); - - array_id=SM_ARRAY_INDEX(leading_dim,0,index_in_group); - result_array[array_id]=(void *)(uintptr_t)rem_mem_offset; - - } - -exit_ERROR: - /* clean up */ - if( NULL != send_buff ) { - free(send_buff); - send_buff = NULL; - } - if( NULL != recv_buff ) { - free(recv_buff); - recv_buff = NULL; - } - - return ret; - - -} - -#if 0 -int base_bcol_basesmuma_exchange_offsets( - mca_bcol_basesmuma_module_t *sm_bcol_module, - void **result_array, uint64_t mem_offset, int loop_limit, - int leading_dim) -{ - int ret=OMPI_SUCCESS,i,dummy; - int index_in_group, pcnt; - opal_list_t peers; - ompi_namelist_t *peer; - ompi_proc_t *proc_temp, *my_id; - opal_buffer_t *send_buffer = OBJ_NEW(opal_buffer_t); - opal_buffer_t *recv_buffer = OBJ_NEW(opal_buffer_t); - uint64_t rem_mem_offset; - - /* exchange the base pointer for the controls structures - gather - * every one else's infromation. - */ - /* get list of procs that will participate in the communication */ - OBJ_CONSTRUCT(&peers, opal_list_t); - for (i = 0; i < sm_bcol_module->super.sbgp_partner_module->group_size; i++) { - /* get the proc info */ - proc_temp = ompi_comm_peer_lookup( - sm_bcol_module->super.sbgp_partner_module->group_comm, - sm_bcol_module->super.sbgp_partner_module->group_list[i]); - peer = OBJ_NEW(ompi_namelist_t); - peer->name.jobid = proc_temp->proc_name.jobid; - peer->name.vpid = proc_temp->proc_name.vpid; - opal_list_append(&peers,&peer->super); /* this is with the new field called "super" in ompi_namelist_t struct */ - } - /* pack up the data into the allgather send buffer */ - if (NULL == send_buffer || NULL == recv_buffer) { - opal_output (ompi_bcol_base_framework.framework_output, "Cannot allocate memory for sbuffer or rbuffer\n"); - ret = OMPI_ERROR; - goto exit_ERROR; - } - - /* get my proc information */ - my_id = ompi_proc_local(); - - /* pack my information */ - ret = opal_dss.pack(send_buffer, - &(sm_bcol_module->super.sbgp_partner_module->my_index),1,OPAL_UINT32); - - if (OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "Error packing my_index!!\n"); - goto exit_ERROR; - } - - /* pack the offset of the allocated region */ - ret = opal_dss.pack(send_buffer,&(mem_offset),1,OPAL_UINT64); - if (OMPI_SUCCESS != ret) { - goto exit_ERROR; - } - - /* get the offsets from all procs, so can setup the control data - * structures. - */ - if (OMPI_SUCCESS != (ret = ompi_rte_allgather_list(&peers, send_buffer, recv_buffer))) { - opal_output (ompi_bcol_base_framework.framework_output, "ompi_rte_allgather_list returned error %d\n", ret); - goto exit_ERROR; - } - - /* unpack the dummy */ - pcnt=1; - ret = opal_dss.unpack(recv_buffer,&dummy, &pcnt, OPAL_INT32); - if (OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "unpack returned error %d for dummy\n",ret); - goto exit_ERROR; - } - - /* get the control stucture offsets within the shared memory - * region and populate the control structures - we do not assume - * any symmetry in memory layout of each process - */ - - /* loop over the procs in the group */ - for(i = 0; i < sm_bcol_module->super.sbgp_partner_module->group_size; i++){ - int array_id; - pcnt=1; - ret = opal_dss.unpack(recv_buffer,&index_in_group, &pcnt, OPAL_UINT32); - if (OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "unpack returned error %d for remote index_in_group\n",ret); - goto exit_ERROR; - } - - /* get the offset */ - pcnt=1; - ret = opal_dss.unpack(recv_buffer,&rem_mem_offset, &pcnt, OPAL_UINT64); - if (OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "unpack returned error %d for remote memory offset\n",ret); - goto exit_ERROR; - } - - array_id=SM_ARRAY_INDEX(leading_dim,0,index_in_group); - result_array[array_id]=(void *)rem_mem_offset; - - } - - /* clean up */ - peer=(ompi_namelist_t *)opal_list_remove_first(&peers); - while( NULL !=peer) { - OBJ_RELEASE(peer); - peer=(ompi_namelist_t *)opal_list_remove_first(&peers); - } - OBJ_DESTRUCT(&peers); - if( send_buffer ) { - OBJ_RELEASE(send_buffer); - } - if( recv_buffer ) { - OBJ_RELEASE(recv_buffer); - } - - return ret; - -exit_ERROR: - - /* free peer list */ - peer=(ompi_namelist_t *)opal_list_remove_first(&peers); - while( NULL !=peer) { - OBJ_RELEASE(peer); - peer=(ompi_namelist_t *)opal_list_remove_first(&peers); - } - OBJ_DESTRUCT(&peers); - if( send_buffer ) { - OBJ_RELEASE(send_buffer); - } - if( recv_buffer ) { - OBJ_RELEASE(recv_buffer); - } - return ret; -} -#endif - - -static int base_bcol_basesmuma_exchange_ctl_params( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_bcol_basesmuma_component_t *cs, - sm_buffer_mgmt *ctl_mgmt, list_data_t *data_blk) -{ - int ret=OMPI_SUCCESS,i,loop_limit; - int leading_dim, buf_id; - void *mem_offset; - unsigned char *base_ptr; - mca_bcol_basesmuma_ctl_struct_t *ctl_ptr; - - /* data block base offset in the mapped file */ - mem_offset = (void *)((uintptr_t)data_blk->data - - (uintptr_t)cs->sm_ctl_structs->data_addr); - - /* number of buffers in data block */ - loop_limit=cs->basesmuma_num_mem_banks+ctl_mgmt->number_of_buffs; - leading_dim=ctl_mgmt->size_of_group; - ret=comm_allgather_pml(&mem_offset, ctl_mgmt->ctl_buffs, sizeof(void *), - MPI_BYTE, sm_bcol_module->super.sbgp_partner_module->my_index, - sm_bcol_module->super.sbgp_partner_module->group_size, - sm_bcol_module->super.sbgp_partner_module->group_list, - sm_bcol_module->super.sbgp_partner_module->group_comm); - if( OMPI_SUCCESS != ret ) { - goto exit_ERROR; - } - -#if 0 - ret=base_bcol_basesmuma_exchange_offsets( sm_bcol_module, - (void **)ctl_mgmt->ctl_buffs, mem_offset, loop_limit, leading_dim); - if( OMPI_SUCCESS != ret ) { - goto exit_ERROR; - } -#endif - - /* convert memory offset to virtual address in current rank */ - for (i=0;i< sm_bcol_module->super.sbgp_partner_module->group_size;i++) { - - /* get the base pointer */ - int array_id=SM_ARRAY_INDEX(leading_dim,0,i); - if( i == sm_bcol_module->super.sbgp_partner_module->my_index) { - /* me */ - base_ptr=cs->sm_ctl_structs->map_addr; - } else { - base_ptr=sm_bcol_module->ctl_backing_files_info[i]->sm_mmap->map_addr; - } - ctl_mgmt->ctl_buffs[array_id]=(void *) - (uintptr_t)(((uint64_t)(uintptr_t)ctl_mgmt->ctl_buffs[array_id])+(uint64_t)(uintptr_t)base_ptr); - for( buf_id = 1 ; buf_id < loop_limit ; buf_id++ ) { - int array_id_m1=SM_ARRAY_INDEX(leading_dim,(buf_id-1),i); - array_id=SM_ARRAY_INDEX(leading_dim,buf_id,i); - ctl_mgmt->ctl_buffs[array_id]=(void *) (uintptr_t)((uint64_t)(uintptr_t)(ctl_mgmt->ctl_buffs[array_id_m1])+ - (uint64_t)(uintptr_t)sizeof(mca_bcol_basesmuma_ctl_struct_t)); - } - } - /* initialize my control structues */ - for( buf_id = 0 ; buf_id < loop_limit ; buf_id++ ) { - - int my_idx=sm_bcol_module->super.sbgp_partner_module->my_index; - int array_id=SM_ARRAY_INDEX(leading_dim,buf_id,my_idx); - ctl_ptr = (mca_bcol_basesmuma_ctl_struct_t *) - ctl_mgmt->ctl_buffs[array_id]; - - /* initialize the data structures - RLG, this is only one data - * structure that needs to be initialized, more are missing */ - ctl_ptr->sequence_number=-1; - ctl_ptr->flag=-1; - ctl_ptr->index=0; - ctl_ptr->src_ptr = NULL; - } - - return ret; - -exit_ERROR: - - return ret; -} - -static int base_bcol_basesmuma_setup_ctl (mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_bcol_basesmuma_component_t *cs) -{ - const int my_index = sm_bcol_module->super.sbgp_partner_module->my_index;; - bcol_basesmuma_smcm_file_t input_file; - int ret; - - /* exchange remote addressing information if it has not already been done */ - if (NULL == sm_bcol_module->ctl_backing_files_info) { - input_file.file_name=cs->sm_ctl_structs->map_path; - input_file.size=cs->sm_ctl_structs->map_size; - input_file.size_ctl_structure=0; - input_file.data_seg_alignment=BASESMUMA_CACHE_LINE_SIZE; - input_file.mpool_size=cs->sm_ctl_structs->map_size; - ret = bcol_basesmuma_smcm_allgather_connection(sm_bcol_module, - sm_bcol_module->super.sbgp_partner_module, - &(cs->sm_connections_list), - &(sm_bcol_module->ctl_backing_files_info), - sm_bcol_module->super.sbgp_partner_module->group_comm, - input_file, cs->clt_base_fname, - false); - if (OMPI_SUCCESS != ret) { - return ret; - } - } - - /* fill in the pointer to other ranks scartch shared memory */ - if (NULL == sm_bcol_module->shared_memory_scratch_space) { - sm_bcol_module->shared_memory_scratch_space = - calloc (sm_bcol_module->super.sbgp_partner_module->group_size, sizeof (void *)); - if (!sm_bcol_module->shared_memory_scratch_space) { - opal_output (ompi_bcol_base_framework.framework_output, "Cannot allocate memory for shared_memory_scratch_space."); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - for (int i = 0 ; i < sm_bcol_module->super.sbgp_partner_module->group_size ; ++i) { - if (i == my_index) { - /* local file data is not cached in this list */ - continue; - } - - sm_bcol_module->shared_memory_scratch_space[i] = - (void *)((intptr_t) sm_bcol_module->ctl_backing_files_info[i]->sm_mmap + - cs->scratch_offset_from_base_ctl_file); - } - - sm_bcol_module->shared_memory_scratch_space[my_index] = - (void *)((intptr_t) cs->sm_ctl_structs->map_addr + cs->scratch_offset_from_base_ctl_file); - } - - return OMPI_SUCCESS; -} - -int base_bcol_basesmuma_setup_ctl_struct( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_bcol_basesmuma_component_t *cs, - sm_buffer_mgmt *ctl_mgmt) -{ - int n_ctl, n_levels; - int n_ctl_structs; - size_t malloc_size; - - /* - * set my no user-data conrol structures - */ - /* number of banks and regions per bank are already a power of 2 */ - n_ctl_structs=cs->basesmuma_num_mem_banks* - cs->basesmuma_num_regions_per_bank; - - /* initialize the control structure management struct - - * for collectives without user data - *--------------------------------------------------------------- - */ - - ctl_mgmt->number_of_buffs=n_ctl_structs; - ctl_mgmt->num_mem_banks= - cs->basesmuma_num_mem_banks; - - ctl_mgmt->num_buffs_per_mem_bank= - cs->basesmuma_num_regions_per_bank; - ctl_mgmt->size_of_group= - sm_bcol_module->super.sbgp_partner_module->group_size; - roundup_to_power_radix(2,cs->basesmuma_num_regions_per_bank,&n_levels); - ctl_mgmt->log2_num_buffs_per_mem_bank=n_levels; - - roundup_to_power_radix(2,n_ctl_structs,&n_levels); - ctl_mgmt->log2_number_of_buffs=n_levels; - ctl_mgmt->mask=n_ctl_structs-1; - sm_bcol_module->super.n_poll_loops=cs->n_poll_loops; - - malloc_size= - (ctl_mgmt->number_of_buffs + - ctl_mgmt->num_mem_banks ) * - ctl_mgmt->size_of_group * - sizeof(void *); - ctl_mgmt->ctl_buffs = malloc(malloc_size); - if (!ctl_mgmt->ctl_buffs) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* - * setup the no-data buffer managment data - */ - n_ctl = ctl_mgmt->num_mem_banks; - ctl_mgmt->ctl_buffs_mgmt = (mem_bank_management_t *) calloc (n_ctl, sizeof (mem_bank_management_t)); - if (!ctl_mgmt->ctl_buffs_mgmt) { - opal_output (ompi_bcol_base_framework.framework_output, "Cannot allocate memory for ctl_buffs_mgmt"); - free (ctl_mgmt->ctl_buffs); - ctl_mgmt->ctl_buffs = NULL; - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* initialize each individual element */ - for (int i = 0 ; i < n_ctl ; ++i) { - opal_list_item_t *item; - opal_mutex_t *mutex_ptr; - - ctl_mgmt->ctl_buffs_mgmt[i].available_buffers= - ctl_mgmt->num_buffs_per_mem_bank; - ctl_mgmt->ctl_buffs_mgmt[i].number_of_buffers= - ctl_mgmt->num_buffs_per_mem_bank; - mutex_ptr = &(ctl_mgmt->ctl_buffs_mgmt[i].mutex); - OBJ_CONSTRUCT(mutex_ptr, opal_mutex_t); - ctl_mgmt->ctl_buffs_mgmt[i].index_shared_mem_ctl_structs=i; - - item = (opal_list_item_t *)&(ctl_mgmt->ctl_buffs_mgmt[i].nb_barrier_desc); - OBJ_CONSTRUCT(item, opal_list_item_t); - ctl_mgmt->ctl_buffs_mgmt[i].nb_barrier_desc.sm_module = - sm_bcol_module; - ctl_mgmt->ctl_buffs_mgmt[i].nb_barrier_desc.pool_index = i; - /* get the sm_buffer_mgmt pointer for the control structures */ - ctl_mgmt->ctl_buffs_mgmt[i].nb_barrier_desc.coll_buff = ctl_mgmt; - } - - return OMPI_SUCCESS; -} - -/* - * this function initializes the internal scratch buffers and control - * structures that will be used by the module. It also intitializes - * the payload buffer management structures. - */ -int base_bcol_basesmuma_setup_library_buffers( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_bcol_basesmuma_component_t *cs) -{ - int ret=OMPI_SUCCESS,i; - int n_ctl_structs; - size_t ctl_segement_size,total_memory; - int max_elements; - unsigned char *data_ptr; - - /* */ - /* setup the control struct memory */ - if(!cs->sm_ctl_structs) { - ret = mca_bcol_basesmuma_allocate_sm_ctl_memory(cs); - if(OMPI_SUCCESS != ret) { - opal_output (ompi_bcol_base_framework.framework_output, "In bcol_comm_query mca_bcol_basesmuma_allocate_sm_ctl_memory failed\n"); - return ret; - } - /* - * put the memory onto the free list - we have worried about - * alignment in the mpool allocation, and assume that the - * ctl structures have the approriate size to mantain alignment - */ - - /* figure out segment size */ - n_ctl_structs=cs->basesmuma_num_mem_banks* - cs->basesmuma_num_regions_per_bank; - - /* add memory for the control structure used for recycling the banks */ - n_ctl_structs+=cs->basesmuma_num_mem_banks; - - ctl_segement_size=n_ctl_structs* - sizeof(mca_bcol_basesmuma_ctl_struct_t); - - total_memory=cs->sm_ctl_structs->map_size - ( - (char *)(cs->sm_ctl_structs->data_addr)- - (char *)(cs->sm_ctl_structs->map_addr)); - total_memory-=cs->my_scratch_shared_memory_size; - max_elements=total_memory/ctl_segement_size; - - /* populate the free list */ - data_ptr=cs->sm_ctl_structs->data_addr; - - for( i=0 ; i < max_elements ; i++ ) { - list_data_t *item = OBJ_NEW(list_data_t); - if( !item ) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - item->data=(void *)data_ptr; - opal_list_append(&(cs->ctl_structures),(opal_list_item_t *)item); - data_ptr+=ctl_segement_size; - } - /* set the scratch memory pointer and offset */ - cs->my_scratch_shared_memory=(char *)data_ptr; - cs->scratch_offset_from_base_ctl_file=(size_t) - ((char *)data_ptr-(char *)cs->sm_ctl_structs->map_addr); - - - /* At this stage the memory is mapped and ready to use by the local rank. - * However, the memory of other processes has not yet been mmaped into the - * memory of this process. - */ - } - - /* intialize no_userdata_ctl */ - sm_bcol_module->no_userdata_ctl=(list_data_t *) - opal_list_remove_last(&(cs->ctl_structures)); - if (!sm_bcol_module->no_userdata_ctl) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* intialize userdata_ctl */ - sm_bcol_module->userdata_ctl = (list_data_t *) - opal_list_remove_last(&(cs->ctl_structures)); - if (!sm_bcol_module->userdata_ctl) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - ret = base_bcol_basesmuma_setup_ctl (sm_bcol_module, cs); - if (OMPI_SUCCESS != ret) { - return ret; - } - - ret = base_bcol_basesmuma_setup_ctl_struct (sm_bcol_module, cs, &(sm_bcol_module->colls_no_user_data)); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - ret = base_bcol_basesmuma_setup_ctl_struct (sm_bcol_module, cs, &(sm_bcol_module->colls_with_user_data)); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - /* used for blocking recursive doubling barrier */ - sm_bcol_module->index_blocking_barrier_memory_bank=0; - - /* gather the offsets of the control structs relative to the base - * of the shared memory file, and fill in the table with the - * address of all the control structues. - */ - ret = base_bcol_basesmuma_exchange_ctl_params(sm_bcol_module, cs, - &(sm_bcol_module->colls_no_user_data),sm_bcol_module->no_userdata_ctl); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - ret = base_bcol_basesmuma_exchange_ctl_params(sm_bcol_module, cs, - &(sm_bcol_module->colls_with_user_data),sm_bcol_module->userdata_ctl); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - return OMPI_SUCCESS; -} - -OBJ_CLASS_INSTANCE(list_data_t, - opal_list_item_t, NULL, NULL); diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.c deleted file mode 100644 index dae24098316..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.c +++ /dev/null @@ -1,457 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#ifdef HAVE_STRINGS_H -#include -#endif - -#include "ompi/proc/proc.h" -#include "ompi/patterns/comm/coll_ops.h" -#include "opal/align.h" - -#include "opal/dss/dss.h" -#include "opal/util/error.h" -#include "opal/util/output.h" -#include "opal/class/opal_list.h" -#include "opal/class/opal_hash_table.h" - -#include "bcol_basesmuma.h" - - - -#define SM_BACKING_FILE_NAME_MAX_LEN 256 - -static bcol_basesmuma_smcm_mmap_t * bcol_basesmuma_smcm_reg_mmap(void *in_ptr, int fd, size_t length, - size_t addr_offset, size_t alignment, - char *file_name); - -struct file_info_t { - uint32_t vpid; - uint32_t jobid; - uint64_t file_size; - uint64_t size_ctl_structure; - uint64_t data_seg_alignment; - char file_name[SM_BACKING_FILE_NAME_MAX_LEN]; -}; - -/* need to allocate space for the peer */ -static void bcol_basesmuma_smcm_proc_item_t_construct (bcol_basesmuma_smcm_proc_item_t * item) -{ - memset ((char *) item + sizeof (item->item), 0, sizeof (*item) - sizeof (item->item)); -} - -/* need to free the space for the peer */ -static void bcol_basesmuma_smcm_proc_item_t_destruct (bcol_basesmuma_smcm_proc_item_t * item) -{ - if (item->sm_mmap) { - OBJ_RELEASE(item->sm_mmap); - } - - if (item->sm_file.file_name) { - free (item->sm_file.file_name); - item->sm_file.file_name = NULL; - } -} - -OBJ_CLASS_INSTANCE(bcol_basesmuma_smcm_proc_item_t, - opal_list_item_t, - bcol_basesmuma_smcm_proc_item_t_construct, - bcol_basesmuma_smcm_proc_item_t_destruct); - -static void bcol_basesmuma_smcm_mmap_construct (bcol_basesmuma_smcm_mmap_t *smcm_mmap) -{ - memset ((char *) smcm_mmap + sizeof (smcm_mmap->super), 0, sizeof (*smcm_mmap) - sizeof (smcm_mmap->super)); -} - -static void bcol_basesmuma_smcm_mmap_destruct (bcol_basesmuma_smcm_mmap_t *smcm_mmap) -{ - if (smcm_mmap->map_seg) { - munmap ((void *)smcm_mmap->map_seg, smcm_mmap->map_size); - smcm_mmap->map_seg = NULL; - } - - if (smcm_mmap->map_path) { - free (smcm_mmap->map_path); - smcm_mmap->map_path = NULL; - } -} - -OBJ_CLASS_INSTANCE(bcol_basesmuma_smcm_mmap_t, opal_list_item_t, - bcol_basesmuma_smcm_mmap_construct, - bcol_basesmuma_smcm_mmap_destruct); - - -/* smcm_allgather_connection: - This function is called when a shared memory subgroup wants to establish shared memory "connections" among - a group of processes. - - This function DOES NOT create any shared memory backing files, it only mmaps already existing files. Shared - memory files are created by the shared memory registration function - ----------------------------------------------------------------------------------------------------------- - Input params: - - - sbgp module The subgrouping module contains the list of ranks to wire up. - - - peer_list An opal list containing a list of bcol_basesmuma_smcm_proc_item_t types. This - contains a list of peers whose shared memory files I have already mapped. - Upon completion of the allgather exchange with all members of the group and depending on the - value of "map_all", my peers' shared memory files are mapped into my local virtual memory - space, with all pertinent information being stored in an bcol_basesmuma_smcm_proc_item_t which is - subsequently appended onto the "peer_list". - - - comm The ompi_communicator_t communicator. - - - input A data struct that caches the information about my shared memory file. - - - map_all Bool that determines whether or not to go ahead and map the files from all of the peers - defined in the sbgp-ing module. If map_all == true, then go ahead and mmap all of the files - obtained in the exchange and append the information to the "peer_list". If map_all == false - then make a check and only mmap those peers' files whose vpid/jobid/filename combination do - not already exist in the "peer_list". Once mapping is completed, append this peer's information - to the "peer_list". - ----------------------------------------------------------------------------------------------------------- - * - */ - - -int bcol_basesmuma_smcm_allgather_connection( - mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_sbgp_base_module_t *module, - opal_list_t *peer_list, - bcol_basesmuma_smcm_proc_item_t ***back_files, - ompi_communicator_t *comm, - bcol_basesmuma_smcm_file_t input, - char *base_fname, - bool map_all) -{ - - /* define local variables */ - - int rc, i, fd; - ptrdiff_t mem_offset; - ompi_proc_t *proc_temp, *my_id; - bcol_basesmuma_smcm_proc_item_t *temp; - bcol_basesmuma_smcm_proc_item_t *item_ptr; - bcol_basesmuma_smcm_proc_item_t **backing_files; - struct file_info_t local_file; - struct file_info_t *all_files=NULL; - - /* sanity check */ - if (strlen(input.file_name) > SM_BACKING_FILE_NAME_MAX_LEN-1) { - opal_output (ompi_bcol_base_framework.framework_output, "backing file name too long: %s len :: %d", - input.file_name, (int) strlen(input.file_name)); - return OMPI_ERR_BAD_PARAM; - } - - backing_files = (bcol_basesmuma_smcm_proc_item_t **) - calloc(module->group_size, sizeof(bcol_basesmuma_smcm_proc_item_t *)); - if (!backing_files) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* FIXME *back_files might have been already allocated - * so free it in order to avoid a memory leak */ - if (NULL != *back_files) { - free (*back_files); - } - *back_files = backing_files; - - my_id = ompi_proc_local(); - - /* Phase One: - gather a list of processes that will participate in the allgather - I'm - preparing this list from the sbgp-ing module that was passed into the function */ - - /* fill in local file information */ - local_file.vpid = ((orte_process_name_t*)&my_id->super.proc_name)->vpid; - local_file.jobid = ((orte_process_name_t*)&my_id->super.proc_name)->jobid; - local_file.file_size=input.size; - local_file.size_ctl_structure=input.size_ctl_structure; - local_file.data_seg_alignment=input.data_seg_alignment; - - strcpy (local_file.file_name, input.file_name); - - /* will exchange this data type as a string of characters - - * this routine is first called before MPI_init() completes - * and before error handling is setup, so can't use the - * MPI data types to send this data */ - all_files = (struct file_info_t *) calloc(module->group_size, - sizeof (struct file_info_t)); - if (!all_files) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* exchange data */ - rc = comm_allgather_pml(&local_file,all_files,sizeof(struct file_info_t), MPI_CHAR, - sm_bcol_module->super.sbgp_partner_module->my_index, - sm_bcol_module->super.sbgp_partner_module->group_size, - sm_bcol_module->super.sbgp_partner_module->group_list, - sm_bcol_module->super.sbgp_partner_module->group_comm); - if( OMPI_SUCCESS != rc ) { - opal_output (ompi_bcol_base_framework.framework_output, "failed in comm_allgather_pml. Error code: %d", rc); - goto Error; - } - - /* Phase four: - loop through the receive buffer, unpack the data recieved from remote peers */ - - for (i = 0; i < module->group_size; i++) { - struct file_info_t *rem_file = all_files + i; - - /* check if this is my index or if the file is already mapped (set above). ther - * is no reason to look through the peer list again because no two members of - * the group will have the same vpid/jobid pair. ignore this previously found - * mapping if map_all was requested (NTH: not sure why exactly since we re-map - * and already mapped file) */ - if (sm_bcol_module->super.sbgp_partner_module->my_index == i) { - continue; - } - - proc_temp = ompi_comm_peer_lookup(comm,module->group_list[i]); - - OPAL_LIST_FOREACH(item_ptr, peer_list, bcol_basesmuma_smcm_proc_item_t) { - /* if the vpid/jobid/filename combination already exists in the list, - then do not map this peer's file --- because you already have */ - if (0 == ompi_rte_compare_name_fields(OMPI_RTE_CMP_ALL, - OMPI_CAST_RTE_NAME(&proc_temp->super.proc_name), - &item_ptr->peer) && - 0 == strcmp (item_ptr->sm_file.file_name, rem_file->file_name)) { - ++item_ptr->refcnt; - /* record file data */ - backing_files[i] = item_ptr; - break; - } - } - - if (!map_all && backing_files[i]) { - continue; - } - - temp = OBJ_NEW(bcol_basesmuma_smcm_proc_item_t); - if (!temp) { - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - temp->peer.vpid = rem_file->vpid; - temp->peer.jobid = rem_file->jobid; - - temp->sm_file.file_name = strdup (rem_file->file_name); - if (!temp->sm_file.file_name) { - rc = OMPI_ERR_OUT_OF_RESOURCE; - OBJ_RELEASE(temp); - goto Error; - } - - temp->sm_file.size = (size_t) rem_file->file_size; - temp->sm_file.mpool_size = (size_t) rem_file->file_size; - temp->sm_file.size_ctl_structure = (size_t) rem_file->size_ctl_structure; - temp->sm_file.data_seg_alignment = (size_t) rem_file->data_seg_alignment; - temp->refcnt = 1; - - /* Phase Five: - If map_all == true, then we map every peer's file - else we check to see if I have already mapped this - vpid/jobid/filename combination and if I have, then - I do not mmap this peer's file. - * - */ - fd = open(temp->sm_file.file_name, O_RDWR, 0600); - if (0 > fd) { - opal_output (ompi_bcol_base_framework.framework_output, "SMCM Allgather failed to open sm backing file %s. errno = %d", - temp->sm_file.file_name, errno); - rc = OMPI_ERROR; - goto Error; - } - - /* map the file */ - temp->sm_mmap = bcol_basesmuma_smcm_reg_mmap (NULL, fd, temp->sm_file.size, - temp->sm_file.size_ctl_structure, - temp->sm_file.data_seg_alignment, - temp->sm_file.file_name); - close (fd); - if (NULL == temp->sm_mmap) { - opal_output (ompi_bcol_base_framework.framework_output, "mmapping failed to map remote peer's file"); - OBJ_RELEASE(temp); - rc = OMPI_ERROR; - goto Error; - } - - /* compute memory offset */ - mem_offset = (ptrdiff_t) temp->sm_mmap->data_addr - - (ptrdiff_t) temp->sm_mmap->map_seg; - temp->sm_mmap->map_seg->seg_offset = mem_offset; - temp->sm_mmap->map_seg->seg_size = temp->sm_file.size - mem_offset; - /* more stuff to follow */ - - /* append this peer's info, including shared memory map addr, onto the - peer_list */ - - /* record file data */ - backing_files[i] = (bcol_basesmuma_smcm_proc_item_t *) temp; - - opal_list_append(peer_list, (opal_list_item_t*) temp); - } - - rc = OMPI_SUCCESS; - - Error: - - /* error clean-up and return */ - if (NULL != all_files) { - free(all_files); - } - - return rc; -} - -int bcol_basesmuma_smcm_release_connections (mca_bcol_basesmuma_module_t *sm_bcol_module, - mca_sbgp_base_module_t *sbgp_module, opal_list_t *peer_list, - bcol_basesmuma_smcm_proc_item_t ***back_files) -{ - bcol_basesmuma_smcm_proc_item_t **smcm_procs = *back_files; - - for (int i = 0 ; i < sbgp_module->group_size ; ++i) { - if (smcm_procs[i] && 0 == --smcm_procs[i]->refcnt) { - opal_list_remove_item (peer_list, (opal_list_item_t *) smcm_procs[i]); - OBJ_RELEASE(smcm_procs[i]); - } - } - - free (smcm_procs); - *back_files = NULL; - - return OMPI_SUCCESS; - } - - -/* - * mmap the specified file as a shared file. No information exchange with other - * processes takes place within this routine. - * This function assumes that the memory has already been allocated, and only the - * mmap needs to be done. - */ -bcol_basesmuma_smcm_mmap_t *bcol_basesmuma_smcm_mem_reg(void *in_ptr, - size_t length, - size_t alignment, - char* file_name) -{ - /* local variables */ - int fd = -1; - bcol_basesmuma_smcm_mmap_t *map = NULL; - int rc; - - /* if pointer is not allocated - return error. We have no clue how the user will allocate or - * free this memory. - */ - - /* open the shared memory backing file */ - - fd = open(file_name, O_CREAT|O_RDWR,0600); - if (fd < 0) { - opal_output (ompi_bcol_base_framework.framework_output, "basesmuma shared memory allocation open failed with errno: %d", - errno); - } else if (0 != ftruncate(fd,length)) { - opal_output (ompi_bcol_base_framework.framework_output, "basesmuma shared memory allocation ftruncate failed with errno: %d", - errno); - } else { - /* ensure there is enough space for the backing store */ - rc = ftruncate (fd, length); - if (0 > rc) { - opal_output (ompi_bcol_base_framework.framework_output, "failed to truncate the file to be mapped. errno: %d", errno); - close(fd); - return NULL; - } - - map = bcol_basesmuma_smcm_reg_mmap(in_ptr, fd, length, 0, alignment, file_name); - if (NULL == map) { - close(fd); - return NULL; - } - } - /* no longer need this file descriptor. close it */ - close (fd); - - /* takes us to the top of the control structure */ - - return map; - -} - -static bcol_basesmuma_smcm_mmap_t * bcol_basesmuma_smcm_reg_mmap(void *in_ptr, int fd, size_t length, - size_t addr_offset, size_t alignment, - char *file_name) -{ - - /* local variables */ - bcol_basesmuma_smcm_mmap_t *map; - bcol_basesmuma_smcm_file_header_t *seg; - unsigned char* myaddr = NULL; - int flags = MAP_SHARED; - - /* set up the map object */ - map = OBJ_NEW(bcol_basesmuma_smcm_mmap_t); - if (OPAL_UNLIKELY(NULL == map)) { - return NULL; - } - - /* map the file and initialize the segment state */ - if (NULL != in_ptr) { - flags |= MAP_FIXED; - } - seg = (bcol_basesmuma_smcm_file_header_t *) - mmap(in_ptr, length, PROT_READ|PROT_WRITE, flags, fd, 0); - if((void*)-1 == seg) { - OBJ_RELEASE(map); - return NULL; - } - - map->map_path = strdup (file_name); - - /* the first entry in the file is the control structure. the first entry - in the control structure is an mca_common_sm_file_header_t element */ - map->map_seg = seg; - - myaddr = (unsigned char *) seg + addr_offset; - /* if we have a data segment (i.e. if 0 != data_seg_alignement) */ - - if (alignment) { - myaddr = OPAL_ALIGN_PTR(myaddr, alignment, unsigned char*); - - /* is addr past the end of the file? */ - if ((unsigned char *) seg+length < myaddr) { - opal_output (ompi_bcol_base_framework.framework_output, "mca_bcol_basesmuma_sm_alloc_mmap: memory region too small len %lu add %p", - (unsigned long) length, myaddr); - OBJ_RELEASE(map); - munmap ((void *)seg, length); - return NULL; - } - - } - - map->data_addr = (unsigned char*) myaddr; - map->map_addr = (unsigned char*) seg; - map->map_size = length; - - return map; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.h b/ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.h deleted file mode 100644 index aebb93db796..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_smcm.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef BCOL_BASESMUMA_SMCM_H -#define BCOL_BASESMUMA_SMCM_H - -#include -#include - -#include "ompi_config.h" -#include "ompi/proc/proc.h" - -#include "opal/class/opal_object.h" -#include "opal/class/opal_list.h" -#include "opal/sys/atomic.h" - - - -typedef struct bcol_basesmuma_smcm_file_header_t { - /* lock to control atomic access */ - opal_atomic_lock_t seg_lock; - - /* is the segment ready for use */ - volatile int32_t seg_inited; - - /* Offset to next available memory location available for allocation */ - size_t seg_offset; - - /* total size of the segment */ - size_t seg_size; -} bcol_basesmuma_smcm_file_header_t; - - -typedef struct bcol_basesmuma_smcm_mmap_t { - /* double link list element */ - opal_list_item_t super; - /* pointer to header imbeded in the shared memory file */ - bcol_basesmuma_smcm_file_header_t *map_seg; - /* base address of the mmap'ed file */ - unsigned char *map_addr; - /* base address of data segment */ - unsigned char *data_addr; - /* How big it is (in bytes) */ - size_t map_size; - /* Filename */ - char *map_path; -} bcol_basesmuma_smcm_mmap_t; - -OBJ_CLASS_DECLARATION(bcol_basesmuma_smcm_mmap_t); - - -/* Struct that characterizes a shared memory file */ -struct bcol_basesmuma_smcm_file_t { - - char *file_name; - size_t size; - size_t size_ctl_structure; - size_t data_seg_alignment; - size_t mpool_size; - -}; -typedef struct bcol_basesmuma_smcm_file_t bcol_basesmuma_smcm_file_t; - - -struct bcol_basesmuma_smcm_proc_item_t { - opal_list_item_t item; /* can put me on a free list */ - int refcnt; - ompi_process_name_t peer; - bcol_basesmuma_smcm_file_t sm_file; - bcol_basesmuma_smcm_mmap_t *sm_mmap; /* Pointer to peer's sm file */ - -}; -typedef struct bcol_basesmuma_smcm_proc_item_t bcol_basesmuma_smcm_proc_item_t; - -OBJ_CLASS_DECLARATION(bcol_basesmuma_smcm_proc_item_t); - - -/* allocate shared memory file - * in_ptr - pointer to preallocated memory (if NULL, this will be mmaped) - * alignment - region memory alignment - * file name - fully qualified backing file name -*/ - -OMPI_DECLSPEC extern bcol_basesmuma_smcm_mmap_t *bcol_basesmuma_smcm_mem_reg(void *in_ptr, - size_t length, - size_t alignment, - char* file_name); - -OMPI_DECLSPEC extern bcol_basesmuma_smcm_mmap_t* bcol_basesmuma_smcm_create_mmap(int fd, - size_t size, char *file_name, - size_t size_ctl_structure, - size_t data_seg_alignment); - -#endif diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.c deleted file mode 100644 index c5c121cbb26..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -#include "bcol_basesmuma_utils.h" - -/* - * Return closet power of K that is either greater than - * or equal to the group size. - */ -int pow_sm_k(int k, int number, int *pow_k) -{ - int power = 0; - int n = 1; - - if( 2 == k){ - while(n <= number){ - power++; - n <<= 1; - } - *pow_k = n >> 1; - - } else { - while (n <= number) { - n *= k; - power++; - } - *pow_k = n/k; - } - - - return (power-1); -} - - - -int get_k_nomial_src_list(int group_size, - int radix, int my_index, - int *src_list) { - - /* local variables */ - int radix_power; - int offset; - int kount = 0; - int src_temp; - - radix_power = 1; - offset = 1; - while(offset < group_size) { - if( offset % (radix * radix_power) ) { - src_temp = my_index - offset; - /* wrap around */ - if ( src_temp < 0 ) { - src_temp += group_size; - } - /* don't probe ghost nodes */ - if( src_temp < group_size ) { - src_list[kount] = src_temp; - kount++; - } - offset+=radix_power; - } else { - - radix_power *= radix; - } - - } - /* return the actual number of nodes to poll on */ - return kount; -} - -int get_k_nomial_dst_size(int group_size, int radix, int my_index) -{ - int dst_count = 0; - int radix_mask; - int k; - radix_mask = 1; - while (radix_mask < group_size) { - if (0 != my_index % (radix * radix_mask)) { - /* I found my level in tree */ - break; - } - radix_mask *= radix; - } - radix_mask /= radix; - - while(radix_mask > 0) { - /* For each level of tree, do sends */ - for (k = 1; - k < radix && my_index + radix_mask * k < group_size; - ++k) { - dst_count += 1 ; - } - radix_mask /= radix; - } - - return dst_count; -} diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.h b/ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.h deleted file mode 100644 index 8389f822d25..00000000000 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_utils.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_BASESMUMA_UTILS_H -#define MCA_BCOL_BASESMUMA_UTILS_H - -#include "ompi_config.h" - -BEGIN_C_DECLS - -#define BASESMUMA_K_NOMIAL_SEND_CHILDREN(radix_mask,radix,relative_index, \ - my_group_index, group_size, ready_flag) \ -do { \ - int k, child; \ - while(radix_mask > 0){ \ - for(k = 1; k < radix && relative_index+radix_mask*k= group_size) { \ - child -= group_size; \ - } \ - /*fprintf(stderr,"I am %d sending to child %d\n",my_group_index,child);*/ \ - child_ctl_pointer = data_buffs[child].ctl_struct; \ - child_ctl_pointer->src = my_group_index; \ - /* this can be improved to make better asynchronous progress, but it's - * fine for now. - */ \ - while(child_ctl_pointer->sequence_number != sequence_number ); \ - child_ctl_pointer->flags[BCAST_FLAG][bcol_id] = ready_flag; \ - } \ - radix_mask = radix_mask/radix; \ - } \ -} while( 0 ) - - - - -/* - * Return closet power of K that is greater than or equal to "number". - */ -int pow_sm_k(int radix_k, int group_size, int *pow_k_group_size); - -/* - * Get list of possible sources from which data may arrive based on a K-nomial tree fan-out. - */ - -int get_k_nomial_src_list(int group_size, int radix, - int my_index, int *src_list); - - -int get_k_nomial_dst_size(int group_size, int radix, int my_index); - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/bcol.h b/ompi/mca/bcol/bcol.h deleted file mode 100644 index 61b1f96591d..00000000000 --- a/ompi/mca/bcol/bcol.h +++ /dev/null @@ -1,803 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_H -#define MCA_BCOL_H - -#include "ompi_config.h" -#include "opal/class/opal_list.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/coll/coll.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/op/op.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/patterns/net/netpatterns_knomial_tree.h" - -#include "opal/util/show_help.h" - -#include - -#if defined(c_plusplus) || defined(__cplusplus) -extern "C" { -#endif - -/* Forward declaration - please do not remove it */ -struct ml_buffers_t; - -struct mca_bcol_base_coll_fn_comm_attributes_t; -struct mca_bcol_base_coll_fn_invoke_attributes_t; -struct mca_bcol_base_coll_fn_desc_t; - -#define NUM_MSG_RANGES 5 -#define MSG_RANGE_INITIAL (1024)*12 -#define MSG_RANGE_INC 10 -#define BCOL_THRESHOLD_UNLIMITED (INT_MAX) -/* Maximum size of a bcol's header. This allows us to correctly calculate the message - * thresholds. If the header of any bcol exceeds this value then increase this one - * to match. */ -#define BCOL_HEADER_MAX 96 - -#define BCOL_HEAD_ALIGN 32 /* will turn into an MCA parameter after debug */ - -/* - * Functions supported - */ -enum bcol_coll { - /* blocking functions */ - BCOL_ALLGATHER, - BCOL_ALLGATHERV, - BCOL_ALLREDUCE, - BCOL_ALLTOALL, - BCOL_ALLTOALLV, - BCOL_ALLTOALLW, - BCOL_BARRIER, - BCOL_BCAST, - BCOL_EXSCAN, - BCOL_GATHER, - BCOL_GATHERV, - BCOL_REDUCE, - BCOL_REDUCE_SCATTER, - BCOL_SCAN, - BCOL_SCATTER, - BCOL_SCATTERV, - BCOL_FANIN, - BCOL_FANOUT, - - /* nonblocking functions */ - BCOL_IALLGATHER, - BCOL_IALLGATHERV, - BCOL_IALLREDUCE, - BCOL_IALLTOALL, - BCOL_IALLTOALLV, - BCOL_IALLTOALLW, - BCOL_IBARRIER, - BCOL_IBCAST, - BCOL_IEXSCAN, - BCOL_IGATHER, - BCOL_IGATHERV, - BCOL_IREDUCE, - BCOL_IREDUCE_SCATTER, - BCOL_ISCAN, - BCOL_ISCATTER, - BCOL_ISCATTERV, - BCOL_IFANIN, - BCOL_IFANOUT, - - BCOL_SYNC, - /* New function - needed for intermediate steps */ - BCOL_REDUCE_TO_LEADER, - BCOL_NUM_OF_FUNCTIONS -}; -typedef enum bcol_coll bcol_coll; - -typedef enum bcol_elem_type { - BCOL_SINGLE_ELEM_TYPE, - BCOL_MULTI_ELEM_TYPE, - BCOL_NUM_OF_ELEM_TYPES -} bcol_elem_type; - -typedef int (*mca_bcol_base_module_coll_support_all_types_fn_t)(bcol_coll coll_name); -typedef int (*mca_bcol_base_module_coll_support_fn_t)(int op, int dtype, bcol_elem_type elem_num); - -/* - * Collective function status - */ -enum { - BCOL_FN_NOT_STARTED = (OMPI_ERR_MAX - 1), - BCOL_FN_STARTED = (OMPI_ERR_MAX - 2), - BCOL_FN_COMPLETE = (OMPI_ERR_MAX - 3) -}; - - - -/** - * Collective component initialization - * - * Initialize the given collective component. This function should - * initialize any component-level. data. It will be called exactly - * once during MPI_INIT. - * - * @note The component framework is not lazily opened, so attempts - * should be made to minimze the amount of memory allocated during - * this function. - * - * @param[in] enable_progress_threads True if the component needs to - * support progress threads - * @param[in] enable_mpi_threads True if the component needs to - * support MPI_THREAD_MULTIPLE - * - * @retval OMPI_SUCCESS Component successfully initialized - * @retval ORTE_ERROR An unspecified error occurred - */ -typedef int (*mca_bcol_base_component_init_query_fn_t) - (bool enable_progress_threads, bool enable_mpi_threads); - -/** - * Query whether a component is available for the given sub-group - * - * Query whether the component is available for the given - * sub-group. If the component is available, an array of pointers should be - * allocated and returned (with refcount at 1). The module will not - * be used for collective operations until module_enable() is called - * on the module, but may be destroyed (via OBJ_RELEASE) either before - * or after module_enable() is called. If the module needs to release - * resources obtained during query(), it should do so in the module - * destructor. - * - * A component may provide NULL to this function to indicate it does - * not wish to run or return an error during module_enable(). - * - * @note The communicator is available for point-to-point - * communication, but other functionality is not available during this - * phase of initialization. - * - * @param[in] sbgp Pointer to sub-group module. - * @param[out] priority Priority setting for component on - * this communicator - * @param[out] num_modules Number of modules that where generated - * for the sub-group module. - * - * @returns An array of pointer to an initialized modules structures if the component can - * provide a modules with the requested functionality or NULL if the - * component should not be used on the given communicator. - */ -typedef struct mca_bcol_base_module_t **(*mca_bcol_base_component_comm_query_fn_t) - (mca_sbgp_base_module_t *sbgp, int *num_modules); - - -typedef int (*mca_bcol_barrier_init_fn_t)(struct mca_bcol_base_module_t *bcol_module, - mca_sbgp_base_module_t *sbgp_module); - - - -/* - * Macro for use in modules that are of type btl v2.0.0 - */ -#define MCA_BCOL_BASE_VERSION_2_0_0 \ - OMPI_MCA_BASE_VERSION_2_1_0("bcol", 2, 0, 0) - - -/* This is really an abstarction violation, but is the easiest way to get - * started. For memory management we need to know what bcol components - * have compatible memory management schemes. Such compatibility can - * be used to eliminate memory copies between levels in the collective - * operation hierarchy, by having the output buffer of one level be the - * input buffer to the next level - */ - -enum { - BCOL_SHARED_MEMORY_UMA=0, - BCOL_SHARED_MEMORY_SOCKET, - BCOL_POINT_TO_POINT, - BCOL_IB_OFFLOAD, - BCOL_SIZE -}; - -OMPI_DECLSPEC extern int bcol_mpool_compatibility[BCOL_SIZE][BCOL_SIZE]; -OMPI_DECLSPEC extern int bcol_mpool_index[BCOL_SIZE][BCOL_SIZE]; - -/* what are the input parameters ? too many void * pointers here */ -typedef int (*bcol_register_mem_fn_t)(void *context_data, void *base, - size_t size, void **reg_desc); -/* deregistration function */ -typedef int (*bcol_deregister_mem_fn_t)(void *context_data, void *reg_desc); - -/* Bcol network context definition */ -struct bcol_base_network_context_t { - opal_object_t super; - /* Context id - defined by upper layer, ML */ - int context_id; - /* Any context information that bcol what to use */ - void *context_data; - - /* registration function */ - bcol_register_mem_fn_t register_memory_fn; - /* deregistration function */ - bcol_deregister_mem_fn_t deregister_memory_fn; -}; -typedef struct bcol_base_network_context_t bcol_base_network_context_t; -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(bcol_base_network_context_t); - -/* - *primitive function types - */ - -/* bcast */ -enum { - /* small data function */ - BCOL_BCAST_SMALL_DATA, - - /* small data - dynamic decision making supported */ - BCOL_BCAST_SMALL_DATA_DYNAMIC, - - /* number of functions */ - BCOL_NUM_BCAST_FUNCTIONS -}; - - -/** - * BCOL instance. - */ - -/* no limit on fragment size - this supports using user buffers rather - * than library buffers - */ -#define FRAG_SIZE_NO_LIMIT -1 - -/* forward declaration */ -struct coll_bcol_collective_description_t; - -struct mca_bcol_base_component_2_0_0_t { - - /** Base component description */ - mca_base_component_t bcol_version; - - /** Component initialization function */ - mca_bcol_base_component_init_query_fn_t collm_init_query; - - /** Query whether component is useable for given communicator */ - mca_bcol_base_component_comm_query_fn_t collm_comm_query; - - /** If bcol supports all possible data types */ - mca_bcol_base_module_coll_support_fn_t coll_support; - - /** If bcol supports all possible data types for given collective operation */ - mca_bcol_base_module_coll_support_all_types_fn_t coll_support_all_types; - - /** Use this flag to prevent init_query multiple calls - in case we have the same bcol more than on a single level */ - bool init_done; - - /** If collective calls with bcols of this type need to be ordered */ - bool need_ordering; - - /** MCA parameter: Priority of this component */ - int priority; - - /** Bcast function pointers */ - struct coll_bcol_collective_description_t * - bcast_functions[BCOL_NUM_BCAST_FUNCTIONS]; - - /** Number of network contexts - need this for resource management */ - int n_net_contexts; - - /** List of network contexts */ - bcol_base_network_context_t **network_contexts; - - /* - * Fragmentation support - */ - - /** Minimum fragement size */ - int min_frag_size; - - /** Maximum fragment size */ - int max_frag_size; - - /** Supports direct use of user-buffers */ - bool can_use_user_buffers; -}; -typedef struct mca_bcol_base_component_2_0_0_t mca_bcol_base_component_2_0_0_t; -typedef struct mca_bcol_base_component_2_0_0_t mca_bcol_base_component_t; -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bcol_base_component_t); - -/* forward declaration */ -struct mca_coll_ml_descriptor_t; -struct mca_bcol_base_payload_buffer_desc_t; -struct mca_bcol_base_route_info_t; - -typedef struct { - int order_num; /* Seq num of collective fragment */ - int bcols_started; /* How many bcols need ordering have been started */ - int n_fns_need_ordering; /* The number of functions are called for bcols need ordering */ -} mca_bcol_base_order_info_t; - -/* structure that encapsultes information propagated amongst multiple - * fragments whereby completing the entire ensemble of fragments is - * necessary in order to complete the entire collective - */ -struct bcol_fragment_descriptor_t { - /* start iterator */ - int head; - /* end iterator */ - int tail; - /* current iteration */ - int start_iter; - /* number of full iterations this frag */ - int num_iter; - /* end iter */ - int end_iter; -}; -typedef struct bcol_fragment_descriptor_t bcol_fragment_descriptor_t; - -struct bcol_function_args_t { - /* full message sequence number */ - int64_t sequence_num; - /* full message descriptor - single copy of fragment invariant - * parameters */ - /* Pasha: We don need this one for new flow - remove it */ - struct mca_coll_ml_descriptor_t *full_message_descriptor; - struct mca_bcol_base_route_info_t *root_route; - /* function status */ - int function_status; - /* root, for rooted operations */ - int root; - /* input buffer */ - void *sbuf; - void *rbuf; - void *userbuf; - struct mca_bcol_base_payload_buffer_desc_t *src_desc; - struct mca_bcol_base_payload_buffer_desc_t *dst_desc; - /* ml buffer size */ - uint32_t buffer_size; - /* index of buffer in ml payload cache */ - int buffer_index; - int count; - struct ompi_datatype_t *dtype; - struct ompi_op_t *op; - int sbuf_offset; - int rbuf_offset; - /* for bcol opaque data */ - void *bcol_opaque_data; - /* An output argument that will be used by BCOL function to tell ML that the result of the BCOL is in rbuf */ - bool result_in_rbuf; - bool root_flag; /* True if the rank is root of operation */ - bool need_dt_support; /* will trigger alternate code path for some colls */ - int status; /* Used for non-blocking collective completion */ - uint32_t frag_size; /* fragment size for large messages */ - int hier_factor; /* factor used when bcast is invoked as a service function back down - * the tree in allgather for example, the pacl_len is not the actual - * len of the data needing bcasting - */ - mca_bcol_base_order_info_t order_info; - bcol_fragment_descriptor_t frag_info; - -}; - -struct mca_bcol_base_route_info_t { - int level; - int rank; -}; -typedef struct mca_bcol_base_route_info_t mca_bcol_base_route_info_t; - -struct mca_bcol_base_lmngr_block_t { - opal_list_item_t super; - struct mca_coll_ml_lmngr_t *lmngr; - void* base_addr; -}; -typedef struct mca_bcol_base_lmngr_block_t mca_bcol_base_lmngr_block_t; -OBJ_CLASS_DECLARATION(mca_bcol_base_lmngr_block_t); - -struct mca_bcol_base_memory_block_desc_t { - - /* memory block for payload buffers */ - struct mca_bcol_base_lmngr_block_t *block; - - /* Address offset in bytes -- Indicates free memory in the block */ - uint64_t block_addr_offset; - - /* size of the memory block */ - size_t size_block; - - /* number of memory banks */ - uint32_t num_banks; - - /* number of buffers per bank */ - uint32_t num_buffers_per_bank; - - /* size of a payload buffer */ - uint32_t size_buffer; - - /* pointer to buffer descriptors initialized */ - struct mca_bcol_base_payload_buffer_desc_t *buffer_descs; - - /* index of the next free buffer in the block */ - uint64_t next_free_buffer; - - uint32_t *bank_release_counters; - - /* Counter that defines what bank should be synchronized next - * since collectives could be completed out of order, we have to make - * sure that memory synchronization collectives started in order ! */ - int memsync_counter; - - /* This arrays of flags used to signal that the bank is ready for recycling */ - bool *ready_for_memsync; - - /* This flags monitors if bank is open for usage. Usually we expect that user - * will do the check only on buffer-zero allocation */ - bool *bank_is_busy; - -}; - -/* convenience typedef */ -typedef struct mca_bcol_base_memory_block_desc_t mca_bcol_base_memory_block_desc_t; - -typedef void (*mca_bcol_base_release_buff_fn_t)(struct mca_bcol_base_memory_block_desc_t *ml_memblock, uint32_t buff_id); - -struct mca_bcol_base_payload_buffer_desc_t { - void *base_data_addr; /* buffer address */ - void *data_addr; /* buffer address + header offset */ - uint64_t generation_number; /* my generation */ - uint64_t bank_index; /* my bank */ - uint64_t buffer_index; /* my buff index */ -}; -/* convenience typedef */ -typedef struct mca_bcol_base_payload_buffer_desc_t mca_bcol_base_payload_buffer_desc_t; - - - - - - -typedef struct bcol_function_args_t bcol_function_args_t; - - -/* The collective operation is defined by a series of collective operations - * invoked through a function pointer. Each function may be different, - * so will store the arguments in a struct and pass a pointer to the struct, - * and use this as a way to hide the different function signatures. - * - * @param[in] input_args Structure with function arguments - * @param[in] bcol_desc Component specific paremeters - * @param[out] status return status of the function - * MCA_BCOL_COMPLETE - function completed - * MCA_BCOL_IN_PROGRESS - function incomplete - * - * @retval OMPI_SUCCESS successful completion - * @retval OMPI_ERROR function returned error - */ -/* forward declaration */ -struct mca_bcol_base_module_t; - -/* collective function prototype - all functions have the same interface - * so that we can call them via a function pointer */ -struct mca_bcol_base_function_t; -typedef int (*mca_bcol_base_module_collective_fn_primitives_t) - (bcol_function_args_t *input_args, struct mca_bcol_base_function_t *const_args); - -typedef int (*mca_bcol_base_module_collective_init_fn_primitives_t) - (struct mca_bcol_base_module_t *bcol_module); - - /** - * function to query for collctive function attributes - * - * @param attribute (IN) the attribute of interest - * @param algorithm_parameters (OUT) the value of attribute for this - * function. If this attribute is not supported, - * OMPI_ERR_NOT_FOUND is returned. - */ - typedef int (*mca_bcol_get_collective_attributes)(int attribute, - void *algorithm_parameters); - -/* data structure for tracking the relevant data needed for ml level - * algorithm construction (e.g., function selection), initialization, and - * usage. - */ -struct coll_bcol_collective_description_t { - /* collective initiation function - first functin called */ - mca_bcol_base_module_collective_fn_primitives_t coll_fn; - - /* collective progress function - first functin called */ - mca_bcol_base_module_collective_fn_primitives_t progress_fn; - - /* collective progress function - first functin called */ - mca_bcol_get_collective_attributes get_attributes; - - /* attributes supported - bit map */ - uint64_t attribute; - -}; -typedef struct coll_bcol_collective_description_t -coll_bcol_collective_description_t; - -/* collective operation attributes */ -enum { - /* supports dynamic decisions - e.g., do not need to have the collective - * operation fully defined before it can be started - */ - BCOL_ATTRIBUTE_DYNAMIC, - - /* number of attributes */ - BCOL_NUM_ATTRIBUTES -}; - -/* For rooted collectives, - * does the algorithm knows its data source ? - */ -enum { - DATA_SRC_KNOWN=0, - DATA_SRC_UNKNOWN, - DATA_SRC_TYPES -}; - -enum { - BLOCKING, - NON_BLOCKING -}; -/* gvm For selection logic */ -struct mca_bcol_base_coll_fn_comm_attributes_t { - int bcoll_type; - int comm_size_min; - int comm_size_max; - int data_src; - int waiting_semantics; -}; - -typedef struct mca_bcol_base_coll_fn_comm_attributes_t - mca_bcol_base_coll_fn_comm_attributes_t; - -struct mca_bcol_base_coll_fn_invoke_attributes_t { - int bcol_msg_min; - int bcol_msg_max; - uint64_t datatype_bitmap; /* Max is OMPI_DATATYPE_MAX_PREDEFINED defined to be 45 */ - uint32_t op_types_bitmap; /* bit map of optypes supported */ -}; - -typedef struct mca_bcol_base_coll_fn_invoke_attributes_t - mca_bcol_base_coll_fn_invoke_attributes_t; - -struct mca_bcol_base_coll_fn_desc_t { - opal_list_item_t super; - struct mca_bcol_base_coll_fn_comm_attributes_t *comm_attr; - struct mca_bcol_base_coll_fn_invoke_attributes_t *inv_attr; - mca_bcol_base_module_collective_fn_primitives_t coll_fn; - mca_bcol_base_module_collective_fn_primitives_t progress_fn; -}; - -typedef struct mca_bcol_base_coll_fn_desc_t mca_bcol_base_coll_fn_desc_t; -OBJ_CLASS_DECLARATION(mca_bcol_base_coll_fn_desc_t); - -/* end selection logic */ - -typedef int (*mca_bcol_base_module_collective_init_fn_t) - (struct mca_bcol_base_module_t *bcol_module, - mca_sbgp_base_module_t *sbgp_module); - - /* per communicator memory initialization function */ -typedef int (*mca_bcol_module_mem_init)(struct ml_buffers_t *registered_buffers, - mca_bcol_base_component_t *module); - -/* Initialize memory block - ml_memory_block initialization interface function - * - * Invoked at the ml level, used to pass bcol specific registration information - * for the "ml_memory_block" - * - * @param[in] ml_memory_block Pointer to the ml_memory_block. This struct - * contains bcol specific registration information and a call back function - * used for resource recycling. - * - * @param[in] reg_data bcol specific registration data. - * - * @returns On Success: OMPI_SUCCESS - * On Failure: OMPI_ERROR - * - */ -/*typedef int (*mca_bcol_base_init_memory_fn_t) - (struct mca_bcol_base_memory_block_desc_t *ml_block, void *reg_data);*/ - -typedef int (*mca_bcol_base_init_memory_fn_t) - (struct mca_bcol_base_memory_block_desc_t *payload_block, - uint32_t data_offset, - struct mca_bcol_base_module_t *bcol, - void *reg_data); - -typedef int (*mca_common_allgather_init_fn_t) - (struct mca_bcol_base_module_t *bcol_module); - -typedef void (*mca_bcol_base_set_thresholds_fn_t) - (struct mca_bcol_base_module_t *bcol_module); - -enum { - MCA_BCOL_BASE_ZERO_COPY = 1, - MCA_BCOL_BASE_NO_ML_BUFFER_FOR_LARGE_MSG = 1 << 1, - MCA_BCOL_BASE_NO_ML_BUFFER_FOR_BARRIER = 1 << 2 -}; - -/* base module */ -struct mca_bcol_base_module_t { - /* base coll component */ - opal_object_t super; - - /* bcol component (Pasha: Do we really need cache the component?)*/ - mca_bcol_base_component_t *bcol_component; - - /* network context that is used by this bcol - only one context per bcol is allowed */ - bcol_base_network_context_t *network_context; - - /* We are going to use the context index a lot, - int order to decrease number of dereferences - bcol->network_context->index - we are caching the value on bcol */ - int context_index; - - /* Set of flags that describe features supported by bcol */ - uint64_t supported_mode; - - /* per communicator memory initialization function */ - mca_bcol_module_mem_init init_module; - - /* sub-grouping module partner */ - mca_sbgp_base_module_t *sbgp_partner_module; - - /* size of subgroup - cache this, so can have access when - * sbgp_partner_module no longer existes */ - int size_of_subgroup; - - /* sequence number offset - want to make sure that we start - * id'ing collectives with id 0, so we can have simple - * resource management. - */ - int64_t squence_number_offset; - - - /* number of times to poll for operation completion before - * breaking out of a non-blocking collective operation - */ - int n_poll_loops; - - /* size of header that will go in data buff, should not include - * any info regarding alignment, let the ml level handle this - */ - uint32_t header_size; - - - /* Each bcol is assigned a unique value - * see if we can get away with 16-bit id - */ - int16_t bcol_id; - - /*FIXME: - * Since mca_bcol_base_module_t is the only parameter which will be passed - * into the bcol_basesmuma_bcast_init(), add the flag to indicate whether - * the hdl-based algorithms will get enabled. - */ - bool use_hdl; - /* - * Collective function pointers - */ - /* changing function signature - will replace bcol_functions */ - mca_bcol_base_module_collective_fn_primitives_t bcol_function_table[BCOL_NUM_OF_FUNCTIONS]; - - /* Tables hold pointers to functions */ - mca_bcol_base_module_collective_init_fn_primitives_t bcol_function_init_table[BCOL_NUM_OF_FUNCTIONS]; - opal_list_t bcol_fns_table[BCOL_NUM_OF_FUNCTIONS]; - struct mca_bcol_base_coll_fn_desc_t* - filtered_fns_table[DATA_SRC_TYPES][2][BCOL_NUM_OF_FUNCTIONS][NUM_MSG_RANGES+1][OMPI_OP_NUM_OF_TYPES][OMPI_DATATYPE_MAX_PREDEFINED]; - - /* - * Bcol interface function to pass bcol specific - * info and memory recycling call back - */ - mca_bcol_base_init_memory_fn_t bcol_memory_init; - - /* - * netpatterns interface function, would like to invoke this on - * on the ml level - */ - mca_common_allgather_init_fn_t k_nomial_tree; - /* Each bcol caches a list which describes how many ranks - * are "below" each rank in this bcol - */ - int *list_n_connected; - - /* offsets for scatter/gather */ - int hier_scather_offset; - - /* Small message threshold for each collective */ - int small_message_thresholds[BCOL_NUM_OF_FUNCTIONS]; - - /* Set small_message_thresholds array */ - mca_bcol_base_set_thresholds_fn_t set_small_msg_thresholds; - - /* Pointer to the order counter on the upper layer, - used if the bcol needs to be ordered */ - int *next_inorder; -}; -typedef struct mca_bcol_base_module_t mca_bcol_base_module_t; -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bcol_base_module_t); - -/* function description */ -struct mca_bcol_base_function_t { - int fn_idx; - /* module */ - struct mca_bcol_base_module_t *bcol_module; - - /* - * The following two parameters are used for bcol modules - * that want to do some optimizations based on the fact that - * n functions from the same bcol module are called in a row. - * For example, in the iboffload case, on the first call one - * will want to initialize the MWR, and start to instantiate - * it, but only post it at the end of the last call. - * The index of this function in a sequence of consecutive - * functions from the same bcol - */ - int index_in_consecutive_same_bcol_calls; - - /* number of times functions from this bcol are - * called in order - */ - int n_of_this_type_in_a_row; - - /* - * number of times functions from this module are called in the - * collective operation. - */ - int n_of_this_type_in_collective; - int index_of_this_type_in_collective; -}; -typedef struct mca_bcol_base_function_t mca_bcol_base_function_t; - - - - -struct mca_bcol_base_descriptor_t { - opal_free_list_item_t super; -/* Vasily: will be described in the future */ -}; -typedef struct mca_bcol_base_descriptor_t mca_bcol_base_descriptor_t; - -static inline __opal_attribute_always_inline__ size_t - mca_bcol_base_get_buff_length(ompi_datatype_t *dtype, int count) -{ - ptrdiff_t lb, extent; - ompi_datatype_get_extent(dtype, &lb, &extent); - - return (size_t) (extent * count); -} - -#define MCA_BCOL_CHECK_ORDER(module, bcol_function_args) \ - do { \ - if (*((module)->next_inorder) != \ - (bcol_function_args)->order_info.order_num) { \ - return BCOL_FN_NOT_STARTED; \ - } \ - } while (0); - -#define MCA_BCOL_UPDATE_ORDER_COUNTER(module, order_info) \ - do { \ - (order_info)->bcols_started++; \ - if ((order_info)->n_fns_need_ordering == \ - (order_info)->bcols_started) { \ - ++(*((module)->next_inorder)); \ - } \ - } while (0); - -#if defined(c_plusplus) || defined(__cplusplus) -} -#endif -#endif /* MCA_BCOL_H */ diff --git a/ompi/mca/bcol/iboffload/.opal_ignore b/ompi/mca/bcol/iboffload/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ompi/mca/bcol/iboffload/Makefile.am b/ompi/mca/bcol/iboffload/Makefile.am deleted file mode 100644 index 4e9dd0c966a..00000000000 --- a/ompi/mca/bcol/iboffload/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = $(bcol_iboffload_CPPFLAGS) $(btl_openib_CPPFLAGS) - -sources = \ - bcol_iboffload.h \ - bcol_iboffload_device.h \ - bcol_iboffload_module.c \ - bcol_iboffload_mca.h \ - bcol_iboffload_mca.c \ - bcol_iboffload_endpoint.h \ - bcol_iboffload_endpoint.c \ - bcol_iboffload_frag.h \ - bcol_iboffload_frag.c \ - bcol_iboffload_collfrag.h \ - bcol_iboffload_collfrag.c \ - bcol_iboffload_task.h \ - bcol_iboffload_task.c \ - bcol_iboffload_component.c \ - bcol_iboffload_barrier.c \ - bcol_iboffload_bcast.h \ - bcol_iboffload_bcast.c \ - bcol_iboffload_allgather.c \ - bcol_iboffload_collreq.h \ - bcol_iboffload_collreq.c \ - bcol_iboffload_qp_info.c \ - bcol_iboffload_qp_info.h \ - bcol_iboffload_fanin.c \ - bcol_iboffload_fanout.c \ - bcol_iboffload_allreduce.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_bcol_iboffload_DSO -component_install += mca_bcol_iboffload.la -else -component_noinst += libmca_bcol_iboffload.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_bcol_iboffload_la_SOURCES = $(sources) -mca_bcol_iboffload_la_LDFLAGS = -module -avoid-version $(btl_openib_LDFLAGS) $(bcol_iboffload_LDFLAGS) -mca_bcol_iboffload_la_LIBADD = $(btl_openib_LIBS) $(bcol_iboffload_LIBS) \ - $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ofacm/libmca_common_ofacm.la \ - $(OMPI_TOP_BUILDDIR)/ompi/mca/common/verbs/libmca_common_verbs.la - -noinst_LTLIBRARIES = $(component_noinst) -libmca_bcol_iboffload_la_SOURCES =$(sources) -libmca_bcol_iboffload_la_LDFLAGS = -module -avoid-version $(btl_openib_LDFLAGS) $(bcol_iboffload_LDFLAGS) diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload.h b/ompi/mca/bcol/iboffload/bcol_iboffload.h deleted file mode 100644 index 9566c0aff9f..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload.h +++ /dev/null @@ -1,765 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_H -#define MCA_BCOL_IBOFFLOAD_H - -#include "ompi_config.h" - -#include -#include - -#include -#include -#include - -#include "ompi/mca/mca.h" - -#include "ompi/op/op.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/datatype/ompi_datatype_internal.h" - -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" - -#include "ompi/mca/sbgp/ibnet/sbgp_ibnet.h" - -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" - -#include "ompi/mca/common/ofacm/connect.h" - -#include "bcol_iboffload_qp_info.h" - -BEGIN_C_DECLS - -#define IMM_RDMA 1 -#define INLINE 1 -#define NO_INLINE 0 - -#define MCA_IBOFFLOAD_CALC_SIZE_EXT 8 -#define MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE 8 -#define MCA_IBOFFLOAD_CACHE_LINE_SIZE 128 - -#if OPAL_HAVE_IBOFFLOAD_CALC_RDMA -#define MCA_BCOL_IBOFFLOAD_SEND_CALC IBV_M_WR_CALC_SEND -#else -#define MCA_BCOL_IBOFFLOAD_SEND_CALC IBV_M_WR_CALC -#endif - - -/* 0 - barrier rdma info - 1 - ML rdma info */ -#define MAX_REMOTE_RDMA_INFO 2 - -/* forward declarations */ -struct mca_bcol_iboffload_module_t; -struct mca_bcol_iboffload_collreq_t; -struct mca_bcol_iboffload_endpoint_t; -struct mca_bcol_iboffload_frag_t; -struct mca_bcol_iboffload_task_t; -struct mca_bcol_iboffload_qp_info_t; -struct mca_bcol_iboffload_collfrag_t; -struct mca_bcol_iboffload_algth_lst_t; -struct mca_bcol_iboffload_device_t; - -typedef int (*mca_bcol_iboffload_coll_algth_fn_t) ( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -struct mca_bcol_iboffload_rdma_info_t { - uint64_t addr; - uint32_t rkey; - uint32_t lkey; -}; -typedef struct mca_bcol_iboffload_rdma_info_t mca_bcol_iboffload_rdma_info_t; - -struct mca_bcol_iboffload_rdma_buffer_desc_t { - void *data_addr; /* buffer address */ - uint64_t generation_number; /* my generation */ - uint64_t bank_index; /* my bank */ - uint64_t buffer_index; /* my buff index */ -}; -typedef struct mca_bcol_iboffload_rdma_buffer_desc_t mca_bcol_iboffload_rdma_buffer_desc_t; - -struct mca_bcol_iboffload_rdma_block_desc_t { - /* number of memory banks */ - uint32_t num_banks; - /* number of buffers per bank */ - uint32_t num_buffers_per_bank; - /* size of a payload buffer */ - uint32_t size_buffer; - /* data offset from ML */ - uint32_t data_offset; - /* pointer to buffer descriptors initialized */ - mca_bcol_iboffload_rdma_buffer_desc_t *rdma_desc; -}; -typedef struct mca_bcol_iboffload_rdma_block_desc_t mca_bcol_iboffload_rdma_block_desc_t; - -/* Information that we need to keep in order to access remote - memory. For each remote peer (endpoint) we will keep this - structure */ -struct mca_bcol_iboffload_rem_rdma_block_t { - /* IB related information first */ - mca_bcol_iboffload_rdma_info_t ib_info; - - mca_bcol_iboffload_rdma_buffer_desc_t *rdma_desc; -}; -typedef struct mca_bcol_iboffload_rem_rdma_block_t mca_bcol_iboffload_rem_rdma_block_t; - -enum { - MCA_BCOL_IBOFFLOAD_BK_COUNTER_INDEX = 0, - MCA_BCOL_IBOFFLOAD_BK_SYNC_INDEX, - MCA_BCOL_IBOFFLOAD_BK_LAST -}; - -/* Information that we need to keep in order to access and - track local memory that is used as source and destinatination - for RDMA operations */ -struct mca_bcol_iboffload_local_rdma_block_t { - /* sync counter keeps next to start bank id */ - int sync_counter; - /* Counter for released ml buffers */ - int *bank_buffer_counter[MCA_BCOL_IBOFFLOAD_BK_LAST]; - /* IB related information first */ - struct mca_bcol_iboffload_rdma_info_t ib_info; - /* back pointer to original ML memory descriptor */ - struct mca_bcol_base_memory_block_desc_t *ml_mem_desc; - /* Pasha: do we really need this one ?*/ - /* caching ml memory descriptor configurations localy */ - mca_bcol_iboffload_rdma_block_desc_t bdesc; -}; -typedef struct mca_bcol_iboffload_local_rdma_block_t mca_bcol_iboffload_local_rdma_block_t; - -struct mca_bcol_iboffload_recv_wr_manager { - opal_mutex_t lock; - /** Array of ready to use receive work requests. - * it is 2 dimensional array since for each - * qp size we want to keep separate recv wr */ - struct ibv_recv_wr **recv_work_requests; -}; -typedef struct mca_bcol_iboffload_recv_wr_manager mca_bcol_iboffload_recv_wr_manager; - -/** - * Structure to hold the basic shared memory coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ -struct mca_bcol_iboffload_component_t { - /** Base coll component */ - mca_bcol_base_component_2_0_0_t super; - /** Enable disable verbose mode */ - int verbose; - int num_qps; - /** Whether we want a warning if non default GID prefix is not configured - on multiport setup */ - bool warn_default_gid_prefix; - /** Whether we want a warning if the user specifies a non-existent - device and/or port via bcol_ibofflad_if_[in|ex]clude MCA params */ - bool warn_nonexistent_if; - /** initial size of free lists */ - int free_list_num; - /** maximum size of free lists */ - int free_list_max; - /** number of elements to alloc when growing free lists */ - int free_list_inc; - /** name of ib memory pool */ - char* mpool_name; - /** max outstanding CQE on the CQ */ - int cq_size; - /** Max size of inline data */ - unsigned int max_inline_data; - /** IB partition definition */ - uint32_t pkey_val; - /** Outstanding atomic reads */ - unsigned int qp_ous_rd_atom; - /** IB MTU */ - int mtu; - /** Recv not ready timer */ - int min_rnr_timer; - /** IB timeout */ - int timeout; - /** IB retry count */ - int retry_count; - /** Recv not ready retry count */ - int rnr_retry; - /** IB maximum pending RDMA */ - int max_rdma_dst_ops; - /** IB Service level (QOS) */ - int service_level; - /** Preferred communication buffer alignment in Bytes (must be power of two) */ - int buffer_alignment; - /** Max tasks number for MQ */ - int max_mqe_tasks; - /** Max MQ size */ - int max_mq_size; - /** HCA/Port include exclude list */ - char *if_include; - char **if_include_list; - char *if_exclude; - char **if_exclude_list; - /** Dummy argv-style list; a copy of names from the - if_[in|ex]clude list that we use for error checking (to ensure - that they all exist) */ - char **if_list; - /** Array of ibv devices */ - struct ibv_device **ib_devs; - /** devices count */ - int num_devs; - /** MCA param bcol_iboffload_receive_queues */ - char *receive_queues; - /** Common info about all kinds of QPs on each iboffload module */ - struct mca_bcol_iboffload_qp_info_t qp_infos[MCA_BCOL_IBOFFLOAD_QP_LAST]; - /** Array of iboffload devices */ - opal_pointer_array_t devices; - /** Free lists of collfrag descriptors */ - ompi_free_list_t collfrags_free; - /** Free lists of outstanding collective operations */ - ompi_free_list_t collreqs_free; - /** Free lists for free task operations */ - ompi_free_list_t tasks_free; - /** Free lists for free calc task operations */ - ompi_free_list_t calc_tasks_free; - /** Free list of empty frags, that do not keep any - registration information */ - ompi_free_list_t ml_frags_free; - /** Recv work request mananger */ - mca_bcol_iboffload_recv_wr_manager recv_wrs; - /** We allocate some resources on the component - * with creating of the first iboffload module - * and set this flag to true */ - bool init_done; - /** Maximal number of fragments of the same colective request that can be sent in parallel */ - unsigned int max_pipeline_depth; - /** array mapping Open MPI reduction operators to MVerbs reduction operators */ - enum ibv_m_wr_calc_op map_ompi_to_ib_calcs[OMPI_OP_NUM_OF_TYPES]; - /** array mapping Open MPI data types to MVerbs data types */ - enum ibv_m_wr_data_type map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_MAX_PREDEFINED]; - /** The order of the exchange tree */ - int exchange_tree_order; - /** Knomial tree order */ - int knomial_tree_order; - /** K-nomial radix */ - int k_nomial_radix; - /** Maximum number of pulls for completion check */ - int max_progress_pull; - /** Barrier function selector */ - int barrier_mode; - /** MCA for selecting Bruck's alltoall algorithms */ - int use_brucks_smsg_alltoall_rdma; - int use_brucks_smsg_alltoall_sr; - /** radix of small-data alltoall Bruck-like algorithm */ - int k_alltoall_bruck_radix; - /** alltoall small data buffer alignment */ - int tmp_buf_alignment; -}; - -/** - * Convenience typedef - */ -typedef struct mca_bcol_iboffload_component_t mca_bcol_iboffload_component_t; - -/* List of all algorithms that we use */ -enum { - FANIN_ALG, - FANOUT_ALG, - RECURSIVE_DOUBLING_BARRIER_ALG, - RECURSIVE_KNOMIAL_BARRIER_ALG, - RECURSIVE_DOUBLING_ALLREDUCE_ALG, - RECURSIVE_DOUBLING_REDUCE_ALG, - RECURSIVE_DOUBLING_TREE_BCAST, - ALL_ENDPOINTS, /* connected to all peers */ - ALLGATHER_KNOMIAL_ALG, - ALLGATHER_NEIGHBOR_ALG, - REMOTE_EXCHANGE_ALG, - LAST_ALG -}; - -struct mca_bcol_iboffload_port_t { - int id; /** Port number on device: 1 or 2 */ - int stat; /** Port status - Active,Init,etc.. */ - enum ibv_mtu mtu; /** MTU on this port */ - uint64_t subnet_id; /** Sunnet id for the port */ - uint16_t lid; - uint16_t lmc; -}; -typedef struct mca_bcol_iboffload_port_t mca_bcol_iboffload_port_t; - -enum { - COLL_MQ = 0, - SERVICE_MQ, - BCOL_IBOFFLOAD_MQ_NUM -}; - -struct mca_bcol_iboffload_module_t { - /* base structure */ - mca_bcol_base_module_t super; - - /* size */ - int group_size; - int log_group_size; - - /* size of each memory segment */ - size_t segment_size; - - /* collective tag */ - long long collective_tag; - - /* pointer to device */ - struct mca_bcol_iboffload_device_t *device; - - /* caching port number */ - uint32_t port; - - /* Connecting iboffload with ibnet module information */ - /* pointer to sbgp ibnet */ - mca_sbgp_ibnet_module_t *ibnet; - - /* connection group inder for the ibnet */ - int cgroup_index; - - /* array of endpoints */ - struct mca_bcol_iboffload_endpoint_t **endpoints; - - /* Size of the endpoints array */ - int num_endpoints; - - /* caching port subnet id and lid - * the same information we have on device */ - uint64_t subnet_id; - uint16_t lid; - - /* Pointer to management queue */ - struct mqe_context *mq[BCOL_IBOFFLOAD_MQ_NUM]; - int mq_credit[BCOL_IBOFFLOAD_MQ_NUM]; - - /* pending list of collfrags */ - opal_list_t collfrag_pending; - - /* recursive-doubling tree node */ - netpatterns_pair_exchange_node_t recursive_doubling_tree; - - /* N exchange tree */ - netpatterns_pair_exchange_node_t n_exchange_tree; - - /* Knomial exchange tree */ - netpatterns_k_exchange_node_t knomial_exchange_tree; - - /* Knomial exchange tree */ - netpatterns_k_exchange_node_t knomial_allgather_tree; - - /* The array will keep pre-calculated task consumption per - * algorithm - */ - uint32_t alg_task_consump[LAST_ALG]; - - /* Pointer to a func that's implementation of a barrier algorithm */ - mca_bcol_iboffload_coll_algth_fn_t barrier_algth; - - /* Pointer to a func that's implementation of a fanin algorithm */ - mca_bcol_iboffload_coll_algth_fn_t fanin_algth; - - /* Pointer to a func that's implementation of a fanin algorithm */ - mca_bcol_iboffload_coll_algth_fn_t fanout_algth; - - /* Pointer to a func that's implementation of a allreduce algorithm */ - mca_bcol_iboffload_coll_algth_fn_t allreduce_algth; - - /* Pointer to a func that's implementation of a non blocking memory syncronization algorithm */ - mca_bcol_iboffload_coll_algth_fn_t memsync_algth; - - /* rdma block memory information */ - mca_bcol_iboffload_local_rdma_block_t rdma_block; - - /* The largest power of two which 1 << power_of_2 - is not larger than the group size */ - int power_of_2; - - /* The largest power of two number which is not larger than the group size */ - int power_of_2_ranks; - - /* Connection status array */ - bool connection_status[LAST_ALG]; - - /* map from communicator ranks to ibsubnet */ - int *comm_to_ibnet_map; - - /* order preserving value */ - int64_t prev_sequence_num; - - /* Temp iovec to send the data fragments -- alltoall Brucks */ - struct iovec *alltoall_iovec; - struct iovec *alltoall_recv_iovec; - - /* tree radix for the knomial bruck small data alltoall */ - int k_alltoall_bruck_radix; - - /* Temp buffer alignment for knomial bruck small data alltoall */ - int tmp_buf_alignment; - - /* Free task list with sge's array */ - ompi_free_list_t iovec_tasks_free; -}; - -typedef struct mca_bcol_iboffload_module_t mca_bcol_iboffload_module_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_module_t); - -/** - * Global component instance - */ -OMPI_MODULE_DECLSPEC - extern mca_bcol_iboffload_component_t mca_bcol_iboffload_component; - -static inline int mca_bcol_iboffload_err(const char* fmt, ...) -{ - va_list list; - int ret; - - va_start(list, fmt); - ret = vfprintf(stderr, fmt, list); - va_end(list); - return ret; -} - -#define MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(ompi_op, c_type, l_operand, r_operand, result) \ -do { \ - switch (ompi_op) { \ - case OMPI_OP_MAX: \ - *((c_type *)&result) = ((*(c_type *)&(l_operand) > *(c_type *)&(r_operand)) ? \ - *(c_type *)&(l_operand) : *(c_type *)&(r_operand)); \ - break; \ - case OMPI_OP_MIN: \ - *((c_type *)&result) = ((*(c_type *)&(l_operand) < *(c_type *)&(r_operand)) ? \ - *(c_type *)&(l_operand) : *(c_type *)&(r_operand)); \ - break; \ - case OMPI_OP_SUM: \ - *((c_type *)&result) = (*((c_type *)&(l_operand)) + *((c_type *)&(r_operand))); \ - break; \ - default: \ - break; \ - } \ -} while (0); - -#define MCA_BCOL_IBOFFLOAD_PKEY_MASK 0x7fff -#define MCA_BCOL_IBOFFLOAD_DEFAULT_GID_PREFIX 0xfe80000000000000ll - -#define IBOFFLOAD_ERROR(args) \ - do { \ - mca_bcol_iboffload_err("[%s]%s[%s:%d:%s] IBOFFLOAD ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_bcol_iboffload_err args; \ - mca_bcol_iboffload_err("\n"); \ - } while(0) - -#if OPAL_ENABLE_DEBUG -#define IBOFFLOAD_VERBOSE(level, args) \ - do { \ - if (mca_bcol_iboffload_component.verbose >= level) { \ - mca_bcol_iboffload_err("[%s]%s[%s:%d:%s] IBOFFLOAD ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_bcol_iboffload_err args; \ - mca_bcol_iboffload_err("\n"); \ - } \ - } while(0) -#else -#define IBOFFLOAD_VERBOSE(level, args) -#endif - -#define MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS(coll_req, coll_work_req) \ - do { \ - opal_list_append(&(coll_req)->work_requests, \ - (opal_list_item_t*) (coll_work_req)); \ - (coll_work_req)->coll_full_req = (coll_req); \ - } while(0) -/* Vasily: will be removed soon */ -#define APPEND_TO_TASKLIST(task_ptr_to_set, event, last_event_type) \ - do { \ - *task_ptr_to_set = &(event)->element; \ - last_event_type = &(event)->element; \ - task_ptr_to_set = &((event)->element.next); \ - } while(0) - -#define MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(task_ptr_to_set, task) \ - do { \ - *task_ptr_to_set = (task); \ - task_ptr_to_set = &((task)->next_task); \ - } while(0) - -#define MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(task_ptr_to_set, event) \ - do { \ - *task_ptr_to_set = &(event)->element; \ - task_ptr_to_set = &((event)->element.next); \ - } while(0) - -#define BCOL_IS_COMPLETED(req) (((req)->n_frag_mpi_complete == (req)->n_fragments) && \ - ((req)->n_fragments > 0)) - -#define BCOL_AND_NET_ARE_COMPLETED(req) (BCOL_IS_COMPLETED(req) && \ - ((req)->n_frag_net_complete == (req)->n_fragments)) - -/* Pasha: Need to add locks here */ -#define BCOL_IBOFFLOAD_MQ_HAVE_CREDITS(module, mq_index, num_of_credits) \ - (((module)->mq_credit[mq_index] -= (num_of_credits)) < 0 ? false : true) -/* Pasha: Need to add locks here */ -#define BCOL_IBOFFLOAD_MQ_RETURN_CREDITS(module, mq_index, num_of_credits) \ - ((module)->mq_credit[mq_index] += (num_of_credits)) - -#define BCOL_IBOFFLOAD_IS_FIRST_CALL(args) (0 == (args)->index_in_consecutive_same_bcol_calls) - -#define BCOL_IBOFFLOAD_IS_LAST_CALL(args) (((args)->n_of_this_type_in_collective - 1) == \ - (args)->index_of_this_type_in_collective) - -#define BCOL_IBOFFLOAD_READY_TO_POST(args) (((args)->n_of_this_type_in_a_row - 1) == \ - (args)->index_in_consecutive_same_bcol_calls) -/* - * bcol module functions - */ - -int mca_bcol_iboffload_rec_doubling_start_connections(struct mca_bcol_iboffload_module_t *iboffload); - -/* RDMA addr exchange with rem proc */ -int mca_bcol_iboffload_exchange_rem_addr(struct mca_bcol_iboffload_endpoint_t *ep); - -/* Progress function */ -int mca_bcol_iboffload_component_progress(void); - -/* Register memory */ -int mca_bcol_iboffload_register_mr(void *reg_data, void * base, size_t size, - mca_mpool_base_registration_t *reg); - -/* Deregister memory */ -int mca_bcol_iboffload_deregister_mr(void *reg_data, mca_mpool_base_registration_t *reg); - -/* - * The function is used for create CQ in this module. - */ -int mca_bcol_iboffload_adjust_cq(struct mca_bcol_iboffload_device_t *device, - struct ibv_cq **ib_cq); -/* - * Query to see if the component is available for use, - * and can satisfy the thread and progress requirements - */ -int mca_bcol_iboffload_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - - -/* Interface to setup the allgather tree */ -int mca_bcol_iboffload_setup_knomial_tree(mca_bcol_base_module_t *super); - -/* - * Query to see if the module is available for use on - * the given communicator, and if so, what it's priority is. - */ -mca_bcol_base_module_t ** -mca_bcol_iboffload_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules); - -int -mca_bcol_iboffload_free_tasks_frags_resources( - struct mca_bcol_iboffload_collfrag_t *collfrag, - ompi_free_list_t *frags_free); - -/** - * Shared memory blocking barrier - */ - -int mca_bcol_iboffload_small_msg_bcast_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t - *const_args); - -int mca_bcol_iboffload_barrier_intra_recursive_doubling_start( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -int mca_bcol_iboffload_barrier_intra_recursive_knomial_start( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -int mca_bcol_iboffload_barrier_intra_recursive_doubling( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -int mca_bcol_iboffload_nb_memory_service_barrier_start( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -int mca_bcol_iboffload_fanin_register(mca_bcol_base_module_t *super); -int mca_bcol_iboffload_fanout_register(mca_bcol_base_module_t *super); -int mca_bcol_iboffload_barrier_register(mca_bcol_base_module_t *super); -int mca_bcol_iboffload_memsync_register(mca_bcol_base_module_t *super); -int mca_bcol_iboffload_allreduce_register(mca_bcol_base_module_t *super); - -int mca_bcol_iboffload_new_style_fanin_first_call( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -int mca_bcol_iboffload_new_style_fanout_first_call( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request); - -int mca_bcol_iboffload_nb_memory_service_barrier_intra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int mca_bcol_iboffload_coll_support_all_types(bcol_coll coll_name); -int mca_bcol_iboffload_coll_supported(int op, int dtype, bcol_elem_type elem_type); - -static inline __opal_attribute_always_inline__ int - mca_bcol_iboffload_fls(int num) -{ - int i = 1; - int j = 0; - - if (0 == num) { - return 0; - } - - while (i < num) { - i <<= 1; - j++; - } - - if (i > num) { - j--; - } - - return j; -} - -#define BCOL_IBOFFLOAD_IS_EVEN(num) (!((num) & 1)) -static inline __opal_attribute_always_inline__ int - mca_bcol_iboffload_ffs(int num) -{ - int j = 0; - - if (0 == num) { - return 0; - } - - while (BCOL_IBOFFLOAD_IS_EVEN(num)) { - num >>= 1; - j++; - } - - return j; -} - -#if OPAL_ENABLE_DEBUG - -/* Post task list MQ */ -#define IS_IMM(a) (a & MQE_WR_FLAG_IMM_EXE) -#define IS_SIG(a) (a & MQE_WR_FLAG_SIGNAL) -#define IS_BLK(a) (a & MQE_WR_FLAG_BLOCK) - -int task_to_rank(mca_bcol_iboffload_module_t *iboffload, struct mqe_task *task); -int wait_to_rank(mca_bcol_iboffload_module_t *iboffload, struct mqe_task *task); - -#endif - -/* MQ posting function */ -static inline __opal_attribute_always_inline__ int - mca_bcol_iboffload_post_mqe_tasks( - mca_bcol_iboffload_module_t *iboffload, - struct mqe_task *head_mqe) -{ - int rc; - struct mqe_task *bad_mqe = NULL; - -#if OPAL_ENABLE_DEBUG /* debug code */ - - struct mqe_task *curr_mqe_task = NULL; - int send_count = 0, recv_count = 0, wait_count = 0; - - curr_mqe_task = head_mqe; - IBOFFLOAD_VERBOSE(10, ("Processing MQE Head with addr %p \n", - (uintptr_t) (void*) curr_mqe_task)); - - while (NULL != curr_mqe_task) { - switch(curr_mqe_task->opcode) { - case MQE_WR_SEND: - IBOFFLOAD_VERBOSE(10, ("Posting task %p id 0x%x: send on QP 0x%x\n" - "rank %d, sg_entry: addr %p LEN %d lkey %u, flag[%d-%d-%d]\n", - (void*) curr_mqe_task, (uintptr_t) curr_mqe_task->wr_id, - curr_mqe_task->post.qp->qp_num, - task_to_rank(iboffload, curr_mqe_task), - curr_mqe_task->post.send_wr->sg_list->addr, - curr_mqe_task->post.send_wr->sg_list->length, - curr_mqe_task->post.send_wr->sg_list->lkey, - IS_IMM(curr_mqe_task->flags), IS_SIG(curr_mqe_task->flags), IS_BLK(curr_mqe_task->flags))); - - ++send_count; - break; - case MQE_WR_RECV: - IBOFFLOAD_VERBOSE(10, ("Posting task %p id 0x%x: recv on QP 0x%x rank %d flag[%d-%d-%d]\n", - (void*) curr_mqe_task, (uintptr_t) curr_mqe_task->wr_id, - curr_mqe_task->post.qp->qp_num, task_to_rank(iboffload, curr_mqe_task), - IS_IMM(curr_mqe_task->flags), IS_SIG(curr_mqe_task->flags), IS_BLK(curr_mqe_task->flags))); - - ++recv_count; - break; - case MQE_WR_CQE_WAIT: - - IBOFFLOAD_VERBOSE(10, ("Posting task %p id %x: wait on CQ %p for rank %d num of waits %d flag[%d-%d-%d]\n", - (void*) curr_mqe_task, (uintptr_t) curr_mqe_task->wr_id, - (void*) curr_mqe_task->wait.cq, wait_to_rank(iboffload, curr_mqe_task), - curr_mqe_task->wait.count, - IS_IMM(curr_mqe_task->flags), IS_SIG(curr_mqe_task->flags), IS_BLK(curr_mqe_task->flags))); - - wait_count += curr_mqe_task->wait.count; - break; - default: - IBOFFLOAD_ERROR(("Fatal error, unknow packet type %d\n", - curr_mqe_task->opcode)); - return OMPI_ERROR; - } - - /* pointer to next task */ - curr_mqe_task = curr_mqe_task->next; - } - - IBOFFLOAD_VERBOSE(10, ("wait[%d] send[%d] recv[%d]\n", - wait_count, send_count, recv_count)); -#endif - - IBOFFLOAD_VERBOSE(10, ("Posting MQ %p \n", (uintptr_t) head_mqe->wr_id)); - - rc = mqe_post_task(iboffload->mq[0], head_mqe, &bad_mqe); - if (OPAL_UNLIKELY(0 != rc)) { - IBOFFLOAD_ERROR(("ibv_post_mqe failed, errno says: %s," - " the return code is [%d]\n", - strerror(errno), rc)); - - return OMPI_ERROR; - } - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ - int lognum(int n) { - int count = 1, lognum = 0; - - while (count < n) { - count = count << 1; - lognum++; - } - - return lognum; -} - -END_C_DECLS - -#endif /* MCA_BCOL_IBOFFLOAD_H */ - diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_allgather.c b/ompi/mca/bcol/iboffload/bcol_iboffload_allgather.c deleted file mode 100644 index 28140e5bb7d..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_allgather.c +++ /dev/null @@ -1,1388 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include -#include "opal_stdint.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_alltoall.h" -#include "bcol_iboffload_bcast.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -#include "opal/include/opal/types.h" - -static int mca_bcol_iboffload_allgather_init( - bcol_function_args_t *fn_arguments, - mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t **coll_request, - bool if_bcol_last, int mq_credits, - collective_message_progress_function progress_fn) -{ - int rc; - - ompi_free_list_item_t *item; - mca_bcol_iboffload_collfrag_t *coll_fragment; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item, rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Wait for free list failed.\n")); - return rc; - } - /* setup call request */ - (*coll_request) = (mca_bcol_iboffload_collreq_t *) item; - - (*coll_request)->n_fragments = 0; - (*coll_request)->n_frags_sent = 0; - (*coll_request)->n_frag_mpi_complete = 0; - (*coll_request)->n_frag_net_complete = 0; - (*coll_request)->if_bcol_last = if_bcol_last; - (*coll_request)->ml_buffer_index = fn_arguments->buffer_index; - (*coll_request)->completion_cb_fn = NULL; - (*coll_request)->buffer_info[SBUF].buf = (void *) ( - (unsigned char *)fn_arguments->sbuf + - fn_arguments->sbuf_offset); - (*coll_request)->buffer_info[RBUF].buf = (void *) ( - (unsigned char *)fn_arguments->rbuf + - fn_arguments->rbuf_offset); - (*coll_request)->buffer_info[SBUF].offset = fn_arguments->sbuf_offset; - (*coll_request)->buffer_info[RBUF].offset = fn_arguments->rbuf_offset; - /* seems like we should initialize the memory registration pointer to NULL here */ - (*coll_request)->buffer_info[SBUF].iboffload_reg = NULL; - (*coll_request)->buffer_info[RBUF].iboffload_reg = NULL; - (*coll_request)->dtype = fn_arguments->dtype; - (*coll_request)->count = fn_arguments->count; - (*coll_request)->module = iboffload_module; - /* TODO Pasha: we need it for pending quque. Set it later. */ - (*coll_request)->progress_fn = progress_fn; - /* TODO Pasha: fix it later */ - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_BARRIER; - - (*coll_request)->order_info = &fn_arguments->order_info; - - coll_fragment = &((*coll_request)->first_collfrag); - mca_bcol_iboffload_collfrag_init(coll_fragment); - - /** Vasily ????? */ - /* mq_credits = (*coll_request)->total_tasks_num; */ - coll_fragment->mq_credits = mq_credits; - coll_fragment->mq_index = COLL_MQ; - /* pasha: just set it to zero */ - coll_fragment->last_wait_num = 0; - coll_fragment->alg = -2; /* used only for debug */ - /* - if (my_rank == algthm_ptr->root) { - coll_fragment->last_wait_num = 0; - } else { - coll_fragment->last_wait_num = algth_lst->last_wait_num; - } - */ - /* Pasha: we have nothing to unpack */ - coll_fragment->unpack_size = 0; - /* coll_fragment->unpack_size = pack_len; */ - /* coll_fragment->alg = RECURSIVE_DOUBLING_TREE_BCAST; */ - - /* set pointers for (coll frag) <-> (coll full request) */ - (*coll_request)->user_handle_freed = false; - - fn_arguments->bcol_opaque_data = (void *) (*coll_request); - /* We don't have root.. - if (true == fn_arguments->root_flag) { - (*coll_request)->root = my_group_index; - } else { - (*coll_request)->root = fn_arguments->root_route->rank; - } - */ - - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS((*coll_request), coll_fragment); - return OMPI_SUCCESS; -} - -#if 1 -static inline void bcol_iboffload_setup_allgather_endpoints_connection(mca_bcol_iboffload_module_t *iboffload) -{ - int i, j; - /*Seems that we don't require this*/ - netpatterns_k_exchange_node_t *exchange_node = &iboffload->knomial_allgather_tree; - - mca_bcol_iboffload_endpoint_t *ep; - - IBOFFLOAD_VERBOSE(10, ("Open connections.\n")); -#if 0 - fprintf(stderr,"Entering Open Connections\n"); -#endif - - /* start with extras and proxy connections */ - if(exchange_node->n_extra_sources > 0) { - /* connect to endpoint */ - /*ep = iboffload->endpoints[comm_to_ibnet[exchange_node->rank_extra_sources_array[0]]];*/ - ep = iboffload->endpoints[exchange_node->rank_extra_sources_array[0]]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - /* now move through the recursive k-ing exchanges */ - if(NULL != exchange_node->rank_exchanges) { - for( i = 0; i < exchange_node->log_tree_order; i++) { - for( j = 0; j < ( exchange_node->tree_order - 1 ); j++) { - if( exchange_node->rank_exchanges[i][j] < 0 ){ - continue; - } - /* connect to endpoint */ - /*ep = iboffload->endpoints[comm_to_ibnet[exchange_node->rank_exchanges[i][j]]];*/ - ep = iboffload->endpoints[exchange_node->rank_exchanges[i][j]]; - if (iboffload->ibnet->super.my_index < ep->index) { - while(0 == (ep)->remote_zero_rdma_addr.addr) { - opal_progress(); - } - } else { - IBOFFLOAD_VERBOSE(10, ("Trying to connect - %d", ep->index)); - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - } - } - } - - /* set the connection status to connected */ - iboffload->connection_status[ALLGATHER_KNOMIAL_ALG] = true; -} -#endif - - -static inline void bcol_iboffload_setup_allgather_ring_endpoints_connection(mca_bcol_iboffload_module_t *iboffload) -{ - int i; - const int group_size = iboffload->ibnet->super.group_size; - mca_bcol_iboffload_endpoint_t *ep; - - IBOFFLOAD_VERBOSE(10, ("Open connections.\n")); - - /* this is algorithm specific - need to move through the algorithm here basically to set up connections, should be - * - */ - - /* I'm going to leave this alone for now, because I'm - * not sure how these endpoints map back to ibnet. Is it mapped to ibnet ids or to communicator ids? - */ - for (i = 0; i < group_size; i++) { - ep = iboffload->endpoints[i]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - /* set the connection status to connected */ - - /*JSL - change this macro */ - iboffload->connection_status[ALLGATHER_NEIGHBOR_ALG] = true; -} - -#if 0 -/* allgather neighbor exchange algorithm N/2 communication steps, 2 connections */ -static int mca_bcol_iboffload_neighbor_allgather_userbuffer_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc, - src, dst; - - uint32_t pack_len; - int my_group_index = iboffload_module->super.sbgp_partner_module->my_index; - int group_size = iboffload_module->group_size; - int step, roffset, soffset; - int neighbor[2], offset_at_step[2], recv_data_from[2], send_data_from; - int even_rank; - int parity; - - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - -#if 0 - fprintf(stderr,"entering large msg neighbor exchange allgather\n"); -#endif - IBOFFLOAD_VERBOSE(10,("Entering large msg iboffload allgather")); - if (OPAL_UNLIKELY(!iboffload_module->connection_status[ALLGATHER_NEIGHBOR_ALG])) { - IBOFFLOAD_VERBOSE(10,("Allgather open new connection ")); - bcol_iboffload_setup_allgather_ring_endpoints_connection(iboffload_module); - } - - pack_len = coll_request->count * coll_request->dtype->super.size; - IBOFFLOAD_VERBOSE(10,("My packet length %d pack_len frag_count %d dtype size %d ", - pack_len, - coll_request->count, - coll_request->dtype->super.size)); - - /* register send and receive sides */ - /* send side, only sending pack_len data */ - - /* I think that probably I will only register the rbuf */ - /* on receive side I need to register pack_len*group_size data */ - rc = mca_bcol_iboffload_prepare_buffer(coll_request->buffer_info[RBUF].buf, pack_len * group_size, - &coll_request->buffer_info[RBUF].iboffload_reg, iboffload_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Cannot register memory: " - "addr - %p, %d bytes.\n", - coll_request->buffer_info[RBUF].buf, pack_len)); - return OMPI_ERROR; - } - coll_request->buffer_info[RBUF].lkey = coll_request->buffer_info[RBUF].iboffload_reg->mr->lkey; - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - - - /* start the neighbor exchange */ - - even_rank = !(my_group_index % 2); - if (even_rank) { - neighbor[0] = (my_group_index + 1) % group_size; - neighbor[1] = (my_group_index - 1 + group_size) % group_size; - recv_data_from[0] = my_group_index; - recv_data_from[1] = my_group_index; - offset_at_step[0] = (+2); - offset_at_step[1] = (-2); - } else { - neighbor[0] = (my_group_index - 1 + group_size) % group_size; - neighbor[1] = (my_group_index + 1) % group_size; - recv_data_from[0] = neighbor[0]; - recv_data_from[1] = neighbor[0]; - offset_at_step[0] = (-2); - offset_at_step[1] = (+2); - } - - /* first step is special step, only send one block */ - roffset = neighbor[0]*pack_len; - soffset = my_group_index*pack_len; - /* send receive this */ - - dst = neighbor[0]; - src = neighbor[0]; - - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - src, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_send_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - /* send the data */ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_recv_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, RBUF, - coll_request->buffer_info[RBUF].offset + - soffset/* offset calc */ , - pack_len, dst, - iboffload_module, coll_fragment); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_send_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - /* send is done */ - - - - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, RBUF, - coll_request->buffer_info[RBUF].offset + - roffset, - pack_len, src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_recv_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - /* now for the actual neighbor exchange algorithm */ - - - /* determine initial send location */ - if(even_rank) { - send_data_from = my_group_index; - }else { - send_data_from = recv_data_from[0]; - } - for( step = 1; step < (group_size/2); step++) { - - parity = step % 2; - recv_data_from[parity] = - (recv_data_from[parity] + offset_at_step[parity] + group_size) % group_size; - src = neighbor[parity]; - dst = src; - - roffset = recv_data_from[parity] * pack_len; - soffset = send_data_from * pack_len; - - /* post send rtr and recev rtr together */ - if( 1 == step ){ - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - src, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_send_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - /* send the data */ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_recv_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - } - - - /* I'm using the hierarchy offset used in the k-nomial allgather */ - /* this won't work...*/ - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, RBUF, - coll_request->buffer_info[RBUF].offset + - soffset/* offset calc */ , - 2 * pack_len, dst, - iboffload_module, coll_fragment); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_send_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - /* send is done */ - - - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, RBUF, - coll_request->buffer_info[RBUF].offset + - roffset, - 2 * pack_len, src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_recv_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - send_data_from = recv_data_from[parity]; - - } - - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - (coll_request)->n_fragments = 1; - (coll_request)->n_frags_sent = 1; - - assert(NULL != last_wait); - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - assert(MCA_COLL_ML_NO_BUFFER == coll_request->ml_buffer_index); - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Allgather, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} -#endif - -#if 0 -/* debug connection routine */ -static inline void bcol_iboffload_setup_allgather_endpoints_connection(mca_bcol_iboffload_module_t *iboffload) -{ - int i; - const int group_size = iboffload->ibnet->super.group_size; - mca_bcol_iboffload_endpoint_t *ep; - - IBOFFLOAD_VERBOSE(10, ("Open connections.\n")); - - /* this is algorithm specific - need to move through the algorithm here basically to set up connections, should be - * - */ - - /* I'm going to leave this alone for now, because I'm - * not sure how these endpoints map back to ibnet. Is it mapped to ibnet ids or to communicator ids? - */ - for (i = 0; i < group_size; i++) { - ep = iboffload->endpoints[i]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - /* set the connection status to connected */ - - /*JSL - change this macro */ - iboffload->connection_status[ALLGATHER_KNOMIAL_ALG] = true; -} -#endif - -static int mca_bcol_iboffload_k_nomial_allgather_userbuffer_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc, - src, dst, comm_dst, comm_src; - int tree_order, pow_k, i, j; - - uint32_t pack_len; - int my_group_index = iboffload_module->super.sbgp_partner_module->my_index; - int group_size = iboffload_module->group_size; - int *group_list = iboffload_module->super.sbgp_partner_module->group_list; - int my_comm_index = group_list[my_group_index]; - - netpatterns_k_exchange_node_t *exchange_node = &iboffload_module->knomial_allgather_tree; - - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - -#if 0 - fprintf(stderr,"entering large msg allgather\n"); -#endif - IBOFFLOAD_VERBOSE(10,("Entering large msg iboffload allgather")); - if (OPAL_UNLIKELY(!iboffload_module->connection_status[ALLGATHER_KNOMIAL_ALG])) { - IBOFFLOAD_VERBOSE(10,("Allgather open new connection ")); - bcol_iboffload_setup_allgather_endpoints_connection(iboffload_module); - } - - pack_len = coll_request->count * coll_request->dtype->super.size; - IBOFFLOAD_VERBOSE(10,("My packet length %d pack_len frag_count %d dtype size %d ", - pack_len, - coll_request->count, - coll_request->dtype->super.size)); - - /* register send and receive sides */ - /* send side, only sending pack_len data */ - - /* I think that probably I will only register the rbuf */ - /* on receive side I need to register pack_len*group_size data */ - - rc = mca_bcol_iboffload_prepare_buffer(coll_request->buffer_info[RBUF].buf, pack_len * group_size, - &coll_request->buffer_info[RBUF].iboffload_reg, iboffload_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Cannot register memory: " - "addr - %p, %d bytes.\n", - coll_request->buffer_info[RBUF].buf, pack_len)); - return OMPI_ERROR; - } - coll_request->buffer_info[RBUF].lkey = coll_request->buffer_info[RBUF].iboffload_reg->mr->lkey; - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - - /* start with the extra / proxy phase */ - if( EXTRA_NODE == exchange_node->node_type ) { - - - /* send pack_len data to proxy */ - comm_dst = exchange_node->rank_extra_sources_array[0]; - /* get ib subnet id */ - dst = comm_dst; /* comm_to_ibnet[comm_dst];*/ - /* post ready-to-receive receive on sender's side */ - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - - /* send the data */ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_recv_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, RBUF, coll_request->buffer_info[RBUF].offset + my_comm_index*pack_len, - pack_len, dst, - iboffload_module, coll_fragment); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_send_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - /* send is done */ - - /* post the receive */ - comm_src = comm_dst; - src = dst; - /* Sending this results in a race condition where if the rtr send bypasses - the large msg receive on proxy's side, then it triggers the start of the - recurssive k-ing phase prematurely causing random data corruption. - */ - /* - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - src, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_send_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - */ - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, - RBUF, coll_request->buffer_info[RBUF].offset, - pack_len*group_size, src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_recv_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - goto FINISHED; - - - } else if( 0 < exchange_node->n_extra_sources ) { - - /* am a proxy, receive pack_len data from extra */ - comm_src = exchange_node->rank_extra_sources_array[0]; - /* get ib subnet */ - src = comm_src; /*comm_to_ibnet[comm_src];*/ - - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - src, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_send_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, - RBUF, coll_request->buffer_info[RBUF].offset + pack_len*comm_src, - pack_len, src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_recv_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - } - - /* start recursive k - ing */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - for( i = 0; i < pow_k; i++) { - - - /* Post ready-to-recv messages - I am here */ - for( j = 0; j <( tree_order - 1); j++) { - comm_src = exchange_node->rank_exchanges[i][j]; - if( comm_src < 0 ){ - continue; - } - /* get ib subnet */ - src = comm_src; /*comm_to_ibnet[comm_src];*/ - - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - src, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_send_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - } - - /* Post receive ready-to-recev message - I can send to you */ - for( j = 0; j < (tree_order - 1); j++) { - /* recev ready-to-receive message */ - comm_dst = exchange_node->rank_exchanges[i][j]; - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check: - */ - if( comm_dst < 0 ){ - continue; - } - - /* get ib subnet id */ - dst = comm_dst; /*comm_to_ibnet[comm_dst];*/ - /* post ready-to-receive receive on sender's side */ - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - /* send the data */ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_recv_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - } - - - /* (k-1) sends */ - for( j = 0; j < (tree_order - 1); j++ ) { - - /* send phase - */ - comm_dst = exchange_node->rank_exchanges[i][j]; - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - if( comm_dst < 0 ){ - continue; - } - - /* get ib subnet id */ - dst = comm_dst; /*comm_to_ibnet[comm_dst];*/ - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, RBUF, - coll_request->buffer_info[RBUF].offset + pack_len*exchange_node->payload_info[i][j].s_offset/* offset calc */ , - exchange_node->payload_info[i][j].s_len*pack_len, dst, - iboffload_module, coll_fragment); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_send_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - /* send is done */ - - } - - /* we post receives after all sends in order to achieve concurrent - * sends as well as assuring blocking until completely receiving - * all data at level k before starting level k+1 sends - */ - /* (k-1) receives - these are blocking */ - for( j = 0; j < (tree_order - 1); j++) { - /*recv phase */ - comm_src = exchange_node->rank_exchanges[i][j]; - if( comm_src < 0 ){ - continue; - } - /* get ib subnet */ - src = comm_src; /*comm_to_ibnet[comm_src];*/ - - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, RBUF, - coll_request->buffer_info[RBUF].offset + pack_len*exchange_node->payload_info[i][j].r_offset, - exchange_node->payload_info[i][j].r_len*pack_len, src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to mca_bcol_iboffload_recv_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - - - } - - - } - - /* last step, just send it back to the extra if I have one */ - if( 0 < exchange_node->n_extra_sources ) { - - comm_dst = exchange_node->rank_extra_sources_array[0]; - - /* get ib subnet id */ - dst = comm_dst; /*comm_to_ibnet[comm_dst];*/ - /* - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - - // send the data - we are already guaranteed that extra rank is waiting - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_recv_rtr_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - */ - - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, RBUF, coll_request->buffer_info[RBUF].offset, - pack_len*group_size, dst, - iboffload_module, coll_fragment); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - "mca_bcol_iboffload_send_large_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - /* send is done */ - - } - -FINISHED: - - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - (coll_request)->n_fragments = 1; - (coll_request)->n_frags_sent = 1; - - assert(NULL != last_wait); - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - assert(MCA_COLL_ML_NO_BUFFER == coll_request->ml_buffer_index); - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Allgather, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} - -static int mca_bcol_iboffload_k_nomial_allgather_mlbuffer_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc, - src, dst, comm_dst, comm_src, i, j; - int tree_order, pow_k, knt; - uint32_t pack_len; - int my_group_index = iboffload_module->super.sbgp_partner_module->my_index; - int group_size = iboffload_module->group_size; - netpatterns_k_exchange_node_t *exchange_node = - &iboffload_module->knomial_allgather_tree; - - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - int *list_connected = iboffload_module->super.list_n_connected; - - /* test test */ - int buff_offset = iboffload_module->super.hier_scather_offset; - - IBOFFLOAD_VERBOSE(10,("Entering small msg iboffload bcast")); - - - if (OPAL_UNLIKELY(!iboffload_module->connection_status[ALLGATHER_KNOMIAL_ALG])) { - IBOFFLOAD_VERBOSE(10,("Bcast open new connection ")); - bcol_iboffload_setup_allgather_endpoints_connection(iboffload_module); - } - - pack_len = coll_request->count * coll_request->dtype->super.size; - IBOFFLOAD_VERBOSE(10,("My packet length %d pack_len frag_count %d dtype size %d ", - pack_len, - coll_request->count, - coll_request->dtype->super.size)); - - /* now we calculate the actual buff_offset */ - buff_offset = buff_offset*pack_len; - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - /* we put this in to propagate the lkey into this local data structure */ - coll_request->buffer_info[SBUF].lkey = iboffload_module->rdma_block.ib_info.lkey; - /* end hack */ - if( EXTRA_NODE == exchange_node->node_type ) { - /* setup the rdma "send" pack_len data to proxy rank */ - comm_dst = exchange_node->rank_extra_sources_array[0]; - /* get ib subnet id */ - dst = comm_dst; - /* now I need to calculate my own offset info */ - knt = 0; - for( i = 0; i < my_group_index; i++){ - knt += list_connected[i]; - } - - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, pack_len*list_connected[my_group_index], pack_len*knt /* source offset */, - pack_len*knt /* destination offset */, dst, - iboffload_module, coll_fragment); -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, pack_len, pack_len*group_list[my_group_index] /* source offset */, - pack_len*group_list[my_group_index] /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif - /* old flow with ml offset */ -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, pack_len, pack_len*group_list[my_group_index] /* source offset */, - coll_request->buffer_info[RBUF].offset + pack_len*group_list[my_group_index] /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_small_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - /* send is done */ - - /* setup the rdma "receive" from proxy */ - comm_src = comm_dst; - src = dst; - /* more general is the number connected */ - knt = 0; - for( i = 0; i < group_size; i++) { - knt += list_connected[i]; - } - - - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - pack_len*knt, src, - iboffload_module, coll_fragment); - - /* - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - pack_len*group_size, src, - iboffload_module, coll_fragment); - */ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - goto FINISHED; - } else if( 0 < exchange_node->n_extra_sources ) { - - /* am a proxy, receive pack_len data from extra */ - comm_src = exchange_node->rank_extra_sources_array[0]; - /* get ib subnet */ - src = comm_src; - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - pack_len*list_connected[src], src, - iboffload_module, coll_fragment); - /* - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - pack_len, src, - iboffload_module, coll_fragment); - */ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - - } - - /* start recursive k - ing */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - /*fprintf(stderr,"tree order %d pow_k %d\n",tree_order,pow_k);*/ - for( i = 0; i < pow_k; i++) { - for( j = 0; j < (tree_order - 1); j++ ) { - /* send phase - */ - comm_dst = exchange_node->rank_exchanges[i][j]; - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - /*fprintf(stderr,"AAA my index %d comm_dst %d\n",my_group_index,comm_dst);*/ - if( comm_dst < 0 ){ - continue; - } - - /* get ib subnet id */ - /* again, don't think we need this */ - /*dst = ibnet_map[comm_dst];*/ - dst = comm_dst; - /* - fprintf(stderr,"BBB my index %d dst %d pack len %d s_len %d src offset %d r_len %d \n",my_group_index,dst, - pack_len,exchange_node->payload_info[i][j].s_len,exchange_node->payload_info[i][j].s_offset, - exchange_node->payload_info[i][j].r_len); - */ - /* rdma "send" setup */ - - - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, exchange_node->payload_info[i][j].s_len * pack_len, - exchange_node->payload_info[i][j].s_offset * pack_len /* source offset */, - exchange_node->payload_info[i][j].s_offset * pack_len /* destination offset */, dst, - iboffload_module, coll_fragment); - -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, exchange_node->payload_info[i][j].s_len * pack_len, - exchange_node->payload_info[i][j].s_offset * exchange_node->payload_info[i][j].s_len*pack_len /* source offset */, - exchange_node->payload_info[i][j].s_offset * exchange_node->payload_info[i][j].s_len*pack_len /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif - -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, exchange_node->payload_info[i][j].s_len * pack_len, - exchange_node->payload_info[i][j].s_offset * pack_len /* source offset */, - exchange_node->payload_info[i][j].s_offset * pack_len /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, exchange_node->payload_info[i][j].s_len * pack_len, - coll_request->buffer_info[SBUF].offset + exchange_node->payload_info[i][j].s_offset * pack_len /* source offset */, - coll_request->buffer_info[SBUF].offset + exchange_node->payload_info[i][j].s_offset * pack_len /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_small_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - /* send is done */ - } - - for( j = 0; j < (tree_order - 1); j++) { - - /* rdma "recv" phase */ - comm_src = exchange_node->rank_exchanges[i][j]; - /* remember, if we have extra ranks, then we won't participate - * with a least one peer. Make a check - */ - if( comm_src < 0 ){ - continue; - } - - /* get ib subnet id */ - /* shouldn't need this */ - src = comm_src; - - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - exchange_node->payload_info[i][j].r_len * pack_len, src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - } - return OMPI_ERROR; - } - - } - } - - /* last step, proxies send full data back to the extra ranks */ - if( 0 < exchange_node->n_extra_sources ) { - /* send pack_len data to proxy */ - comm_dst = exchange_node->rank_extra_sources_array[0]; - /* get ibnet id */ - dst = comm_dst; - - knt = 0; - for( i = 0; i < group_size; i++){ - knt += list_connected[i]; - } - - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, pack_len*knt, 0 /* source offset */, - 0 /* destination offset */, dst, - iboffload_module, coll_fragment); -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, pack_len*group_size, 0 /* source offset */, - 0 /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif -#if 0 - rc = mca_bcol_iboffload_rdma_write_imm_small_buff_setup( - &last_send, pack_len*group_size, coll_request->buffer_info[RBUF].offset /* source offset */, - coll_request->buffer_info[SBUF].offset /* destination offset */, dst, - iboffload_module, coll_fragment); -#endif - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_small_buff_setup")); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc){ - goto out_of_resources; - fprintf(stderr,"I'm out of resources \n"); - } - return OMPI_ERROR; - } - /* send is done */ - - } - -FINISHED: - - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - (coll_request)->n_fragments = 1; - (coll_request)->n_frags_sent = 1; - - assert(NULL != last_wait); - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - assert(MCA_COLL_ML_NO_BUFFER != coll_request->ml_buffer_index); - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Allgather, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} - -#if 0 -static int mca_bcol_iboffload_neighbor_allgather_userbuffer_intra( - bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *)const_args->bcol_module; - - int rc; - int mq_credits = iboffload_module->group_size * 2 * 2; /* large message protocol consumes - * twice as many mq credits - */ - - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_allgather_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_neighbor_allgather_userbuffer_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_k_nomial_allgather_userbuffer_intra was started [%d]\n", rc)); - return rc; -} -#endif - -#if 1 -static int mca_bcol_iboffload_k_nomial_allgather_userbuffer_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *)const_args->bcol_module; - - int rc; - int mq_credits = ((iboffload_module->knomial_allgather_tree.tree_order - 1)* - iboffload_module->knomial_allgather_tree.log_tree_order + 1) * 2 * 2; /* large message protocol - * consumes twice as much - */ - - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_allgather_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_k_nomial_allgather_userbuffer_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_k_nomial_allgather_userbuffer_intra was started [%d]\n", rc)); - return rc; -} -#endif - -static int mca_bcol_iboffload_k_nomial_allgather_mlbuffer_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *)const_args->bcol_module; - - int rc; - - /* I'll add one for everyone, since nobody wants to feel left out */ - int mq_credits = ((iboffload_module->knomial_allgather_tree.tree_order - 1)* - iboffload_module->knomial_allgather_tree.log_tree_order + 1) * 2 ; - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_allgather_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_k_nomial_allgather_mlbuffer_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_small_msg_bcast_intra was started [%d]\n", rc)); - return rc; -} - - -/* these progress engines are shared between alltoall and allgather and exist in both files, - * should be moved to a common .h file - */ -static int mca_bcol_iboffload_collreq_mlbuffer_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int i; - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - IBOFFLOAD_VERBOSE(10, ("Run progress (ml buffer).\n")); - for (i = 0; i < mca_bcol_iboffload_component.max_progress_pull; i++) { - if (BCOL_IS_COMPLETED(coll_request)) { - - coll_request->user_handle_freed = true; - - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - IBOFFLOAD_VERBOSE(10, ("Collective finished (ml buffer).\n")); - - return BCOL_FN_COMPLETE; - } - } - IBOFFLOAD_VERBOSE(10, ("Collective not finished (ml buffer).\n")); - return BCOL_FN_STARTED; -} - - -static int mca_bcol_iboffload_collreq_userbuffer_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int i; - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - - IBOFFLOAD_VERBOSE(10, ("Run progress (user buffer)\n")); - - /* Complete the allgather - progress releases full request descriptors */ - - for (i = 0; i < mca_bcol_iboffload_component.max_progress_pull; i++) { - if (coll_request->n_frag_mpi_complete == coll_request->n_fragments && - coll_request->n_frag_net_complete == coll_request->n_fragments) { - - IBOFFLOAD_VERBOSE(10, ("Deregister user buff.\n")); - - if (NULL != coll_request->buffer_info[SBUF].iboffload_reg) { - coll_request->module->device->mpool->mpool_deregister( - coll_request->module->device->mpool, - (mca_mpool_base_registration_t *) coll_request->buffer_info[SBUF].iboffload_reg); - coll_request->buffer_info[SBUF].iboffload_reg = NULL; - } - - - if (NULL != coll_request->buffer_info[RBUF].iboffload_reg) { - coll_request->module->device->mpool->mpool_deregister( - coll_request->module->device->mpool, - (mca_mpool_base_registration_t *) coll_request->buffer_info[RBUF].iboffload_reg); - coll_request->buffer_info[RBUF].iboffload_reg = NULL; - } - - RELEASE_COLLREQ(coll_request); - IBOFFLOAD_VERBOSE(10, ("New bcast done !!!")); - return BCOL_FN_COMPLETE; - } - } - - IBOFFLOAD_VERBOSE(10, ("Collective finished (user buffer).\n")); - - /* We are not done */ - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_allgather_register(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register iboffload Allgather.\n")); - comm_attribs.bcoll_type = BCOL_ALLGATHER; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_k_nomial_allgather_mlbuffer_intra, - mca_bcol_iboffload_collreq_mlbuffer_progress); - - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - - /* zero-copy k-nomial algorithm */ -#if 1 - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_k_nomial_allgather_userbuffer_intra, - mca_bcol_iboffload_collreq_userbuffer_progress); -#endif - /* zero-copy neighbor exchange algorithm */ -#if 0 - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_neighbor_allgather_userbuffer_intra, - mca_bcol_iboffload_collreq_userbuffer_progress); -#endif - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_allreduce.c b/ompi/mca/bcol/iboffload/bcol_iboffload_allreduce.c deleted file mode 100644 index 406442ff7c0..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_allreduce.c +++ /dev/null @@ -1,1418 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/* - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include -#include "opal_stdint.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -#include "opal/include/opal/types.h" - -static int mca_bcol_iboffload_calc_res_to_user(void *callback_data) -{ - int rc; - uint64_t result = 0; - - uint64_t l_operand = 0; - uint64_t r_operand = 0; - - mca_bcol_iboffload_collfrag_t *coll_frag = - (mca_bcol_iboffload_collfrag_t *) callback_data; - - mca_bcol_iboffload_collreq_t *coll_request = coll_frag->coll_full_req; - - ompi_op_t *op = coll_request->op; - ompi_datatype_t *dtype = coll_request->dtype; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - struct ibv_context *ib_dev_context = coll_request->module->device->dev.ib_dev_context; - - IBOFFLOAD_VERBOSE(10, ("Start calculating.\n")); - - rc = unpack_data_from_calc(ib_dev_context, - cm->map_ompi_to_ib_calcs[op->op_type], - cm->map_ompi_to_ib_dt[dtype->id], false, - (void *) (uintptr_t) coll_request->l_operand, - NULL, (void *) &l_operand); - if (0 != rc) { - IBOFFLOAD_VERBOSE(10, ("unpack_data_from_calc for l_operand failed: op %s, type %s\n", - op->o_name, dtype->name)); - return OMPI_ERROR; - } - - rc = unpack_data_from_calc(ib_dev_context, - cm->map_ompi_to_ib_calcs[op->op_type], - cm->map_ompi_to_ib_dt[dtype->id], false, - (void *) (uintptr_t) coll_request->r_operand, - NULL, (void *) &r_operand); - if (0 != rc) { - IBOFFLOAD_VERBOSE(10, ("unpack_data_from_calc for r_operand failed: op %s, type %s\n", - op->o_name, dtype->name)); - return OMPI_ERROR; - } - - switch (op->op_type) { - case OMPI_OP_PROD: - break; /* ronni todo - ????? */ - case OMPI_OP_LAND: - result = l_operand && r_operand; - break; - case OMPI_OP_BAND: - result = l_operand & r_operand; - break; - case OMPI_OP_LOR: - result = l_operand || r_operand; - break; - case OMPI_OP_BOR: - result = l_operand | r_operand; - break; - case OMPI_OP_LXOR: - result = ((l_operand && !r_operand) || (!l_operand && r_operand)); - break; - case OMPI_OP_BXOR: - result = l_operand ^ r_operand; - break; - case OMPI_OP_MAXLOC: - case OMPI_OP_MINLOC: - break; - case OMPI_OP_MAX: - case OMPI_OP_MIN: - case OMPI_OP_SUM: - switch (cm->map_ompi_to_ib_dt[dtype->id]) { - case IBV_M_DATA_TYPE_INT8: - MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(coll_request->op->op_type, char, l_operand, r_operand, result); - break; - case IBV_M_DATA_TYPE_INT16: - MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(coll_request->op->op_type, int16_t, l_operand, r_operand, result); - break; - case IBV_M_DATA_TYPE_INT32: - MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(coll_request->op->op_type, int32_t, l_operand, r_operand, result); - break; - case IBV_M_DATA_TYPE_INT64: - MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(coll_request->op->op_type, int64_t, l_operand, r_operand, result); - break; - case IBV_M_DATA_TYPE_FLOAT32: - MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(coll_request->op->op_type, float, l_operand, r_operand, result); - break; - case IBV_M_DATA_TYPE_FLOAT64: - MCA_BCOL_IBOFFLOAD_ALLREDUCE_DO_CALC(coll_request->op->op_type, double, l_operand, r_operand, result); - break; - default: - IBOFFLOAD_VERBOSE(10, ("Unsupported data type: %s.\n", dtype->name)); - return OMPI_ERROR; - } - - break; - - default: - IBOFFLOAD_VERBOSE(10, ("Unsupported op: %s.\n", coll_request->op->o_name)); - return OMPI_ERROR; - } - - memcpy(coll_request->buffer_info[RBUF].buf, &result, coll_frag->unpack_size); - IBOFFLOAD_VERBOSE(10, ("The output data after calc is %lf, result %lf, l_operand %lf, r_operand %lf: " - "sbuf addr %p, rbuf addr %p.\n", - *(double *) coll_request->buffer_info[RBUF].buf, *(double *) &result, - *(double *) &l_operand, *(double *) &r_operand, - coll_request->buffer_info[SBUF].buf, - coll_request->buffer_info[RBUF].buf)); - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_unpack_res_to_user(void *callback_data) -{ - int rc; - - mca_bcol_iboffload_collfrag_t *coll_frag = - (mca_bcol_iboffload_collfrag_t *) callback_data; - - mca_bcol_iboffload_collreq_t *coll_request = coll_frag->coll_full_req; - mca_bcol_iboffload_task_t *task = (mca_bcol_iboffload_task_t *) coll_frag->signal_task_wr_id; - - mca_bcol_iboffload_frag_t *recv_frag = task->frag; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - struct ibv_context *ib_dev_context = coll_request->module->device->dev.ib_dev_context; - - rc = unpack_data_from_calc(ib_dev_context, - cm->map_ompi_to_ib_calcs[coll_request->op->op_type], - cm->map_ompi_to_ib_dt[coll_request->dtype->id], - false, (void*) (uintptr_t) recv_frag->sg_entry.addr, - NULL, coll_request->buffer_info[RBUF].buf); - if (0 != rc) { - IBOFFLOAD_VERBOSE(10, ("unpack_data_from_calc is failed: op %s, type %s\n", - coll_request->op->o_name, coll_request->dtype->name)); - return OMPI_ERROR; - } - - IBOFFLOAD_VERBOSE(10, ("The naitive output data is %" PRId64 ".\n" - "The output data is %" PRId64 ".\n", - *(uint64_t *) recv_frag->sg_entry.addr, - *(uint64_t *) coll_request->buffer_info[RBUF].buf)); - - return OMPI_SUCCESS; -} - -static int -allreduce_extra_node(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request) -/* (EXTRA_NODE == my_exchange_node->node_type) */ -{ - /* local variables */ - int rc, extra_rank; - - mca_bcol_iboffload_frag_t *send_fragment, - *preposted_recv_frag; - - mca_bcol_iboffload_task_t *send_task, - *wait_task; - - struct mqe_task *last_wait, /* we need ask from completion on last wait */ - *last_send; - - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* I will NOT participate in the exchange - so just "register" as here */ - extra_rank = my_exchange_node->rank_extra_source; - - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - extra_rank, coll_request->qp_index, - MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE, 0, - SBUF, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC); - - if (OPAL_UNLIKELY(NULL == send_fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting and packing send frag.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* send my operand to EXCHANGE NODE */ - send_task = mca_bcol_iboffload_get_send_task(iboffload, extra_rank, - coll_request->qp_index, send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting send task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, extra_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for final result from EXCHANGE NODE */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, extra_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - *mqe_ptr_to_set = NULL; - - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - /* Pasha: need to set to true in upper layer */ - coll_request->user_handle_freed = false; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - IBOFFLOAD_VERBOSE(10, ("Post tasks.\n")); - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Allreduce: adding collfrag to collfrag_pending.\n")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -/** - * Start allreduce - */ -static int do_exchange(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request, - struct mqe_task ***mqe_ptr_to_set, - struct mqe_task **last_wait, - struct ibv_sge **l_operand, - struct ibv_sge **r_operand) -{ - int rc = OMPI_SUCCESS, exchange, pair_rank, - my_rank = ((mca_sbgp_base_module_t *) iboffload->ibnet)->my_index; - - mca_bcol_iboffload_frag_t *preposted_recv_frag; - - mca_bcol_iboffload_task_t *wait_task, - *calc_task; - - struct mqe_task *last_send; - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - mca_bcol_iboffload_collfrag_t *coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - size_t calc_size = MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + MCA_IBOFFLOAD_CALC_SIZE_EXT; - - pair_rank = my_exchange_node->rank_exchanges[0]; - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, pair_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - IBOFFLOAD_VERBOSE(10, ("Get prepost recv fag fail.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for send from first algorithm partner */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, pair_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), wait_task, (*last_wait)); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - (*l_operand)->length = calc_size; - for (exchange = 1; exchange < my_exchange_node->n_exchanges; ++exchange) { - pair_rank = my_exchange_node->rank_exchanges[exchange]; - - (*r_operand) = &preposted_recv_frag->sg_entry; - (*r_operand)->length = calc_size; - - /* Calc and send the result to the partner */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - pair_rank, coll_request->qp_index, NULL, - *l_operand, *r_operand, - coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - /* Calc and send the result to myself */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - *l_operand, *r_operand, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, my_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - IBOFFLOAD_VERBOSE(10, ("Get prepost recv fag fail.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from myself */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, my_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (NULL == wait_task) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), wait_task, (*last_wait)); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - (*l_operand) = &preposted_recv_frag->sg_entry; - (*l_operand)->length = calc_size; - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, pair_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - IBOFFLOAD_VERBOSE(10, ("Get prepost recv fag fail.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from the current algorithm partner */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, pair_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), wait_task, (*last_wait)); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - } - - (*r_operand) = &preposted_recv_frag->sg_entry; - (*r_operand)->length = calc_size; - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -/* Power of 2 case */ -static int -pure_recursive_doubling(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request) -{ - /* local variables */ - int rc = OMPI_SUCCESS, pair_rank, - my_rank = ((mca_sbgp_base_module_t *) iboffload->ibnet)->my_index; - - struct mqe_task *last_send, - *last_wait; - - mca_bcol_iboffload_task_t *send_task, - *wait_task, - *calc_task; - - mca_bcol_iboffload_frag_t *send_fragment, - *preposted_recv_frag; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - struct ibv_sge *r_operand = NULL, - *l_operand = NULL; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - IBOFFLOAD_VERBOSE(10, ("Allreduce starting: type %d op %d, " - "n_extra_sources - %d.\n", cm->map_ompi_to_ib_dt[coll_request->dtype->id], - cm->map_ompi_to_ib_calcs[coll_request->op->op_type], - my_exchange_node->n_extra_sources)); - - pair_rank = my_exchange_node->rank_exchanges[0]; - - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - pair_rank, coll_request->qp_index, - (MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + MCA_IBOFFLOAD_CALC_SIZE_EXT), 0, - SBUF, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC); - if (OPAL_UNLIKELY(NULL == send_fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting and packing send frag.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } -/* Vasily: NO_INLINE ????? */ - /* send my operand to the first algorithm partner */ - send_task = mca_bcol_iboffload_get_send_task(iboffload, pair_rank, - coll_request->qp_index, send_fragment, coll_fragment, NO_INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting send task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - - l_operand = &send_fragment->sg_entry; - /* Recursive-doubling exchange */ - rc = do_exchange(iboffload, coll_request, &mqe_ptr_to_set, - &last_wait, &l_operand, &r_operand); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - if (false == coll_request->do_calc_in_cpu) { - /* Calc and send the result to myself */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - l_operand, - r_operand, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, my_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from myself */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, my_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } else { - coll_request->l_operand = l_operand->addr; - coll_request->r_operand = r_operand->addr; - } - - *mqe_ptr_to_set = NULL; -/* Vasily: TODO with MACRO */ - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - /* Pasha: need to set to true in upper layer */ - coll_request->user_handle_freed = false; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - IBOFFLOAD_VERBOSE(10, ("Post tasks.\n")); - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -static int rdma_do_exchange(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request, - struct mqe_task ***mqe_ptr_to_set, - struct mqe_task **last_wait, - struct ibv_sge **l_operand, - struct ibv_sge **r_operand) -{ - int rc = OMPI_SUCCESS, exchange, pair_rank, - my_rank = ((mca_sbgp_base_module_t *) iboffload->ibnet)->my_index; - - mca_bcol_iboffload_frag_t *preposted_recv_frag; - - mca_bcol_iboffload_task_t *wait_task, - *calc_task; - - struct mqe_task *last_send; - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - mca_bcol_iboffload_collfrag_t *coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - const size_t calc_size = MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + MCA_IBOFFLOAD_CALC_SIZE_EXT; - size_t remote_offset = calc_size; - size_t self_offset = 0; - - pair_rank = my_exchange_node->rank_exchanges[0]; - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, pair_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - IBOFFLOAD_VERBOSE(10, ("Get prepost recv fag fail.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for send from first algorithm partner */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, pair_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), wait_task, (*last_wait)); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - (*l_operand)->length = 2 * calc_size ; - for (exchange = 1; exchange < my_exchange_node->n_exchanges; ++exchange) { - pair_rank = my_exchange_node->rank_exchanges[exchange]; - /* Pasha: Not used - (*r_operand) = &preposted_recv_frag->sg_entry; - (*r_operand)->length = calc_size; - */ - - remote_offset += 2 * calc_size; - self_offset += 2 * calc_size; - - /* Calc and send the result to the partner */ - /* - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - pair_rank, coll_request->qp_index, NULL, - *l_operand, *r_operand, - coll_request, NO_INLINE); - */ - calc_task = mca_bcol_iboffload_get_rdma_calc_task(iboffload, - pair_rank, coll_request->qp_index, NULL, - *l_operand, NULL, - coll_request, remote_offset); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - /* Calc and send the result to myself */ - /* - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - *l_operand, NULL, - coll_request, NO_INLINE); - */ - calc_task = mca_bcol_iboffload_get_rdma_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - *l_operand, NULL, - coll_request, self_offset); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, my_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - IBOFFLOAD_VERBOSE(10, ("Get prepost recv fag fail.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from myself */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, my_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (NULL == wait_task) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), wait_task, (*last_wait)); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - /* - (*l_operand) = &preposted_recv_frag->sg_entry; - */ - - /* (*l_operand)->length = 2 * calc_size; */ - (*l_operand)->addr = (uint64_t) (uintptr_t) ((unsigned char *) (*l_operand)->addr + 2 * calc_size); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, pair_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - IBOFFLOAD_VERBOSE(10, ("Get prepost recv fag fail.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from the current algorithm partner */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, pair_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST((*mqe_ptr_to_set), wait_task, (*last_wait)); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - } - /* Pasha: not used - (*r_operand) = &preposted_recv_frag->sg_entry; - (*r_operand)->length = calc_size; - */ - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -#define ALLREDUCE_BASE_OFFSET (MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + MCA_IBOFFLOAD_CALC_SIZE_EXT) - -/* RDMA Recursive doubling + cache friendly version */ -static int -rdma_pure_recursive_doubling(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request) -{ - /* local variables */ - int rc = OMPI_SUCCESS, pair_rank, - my_rank = ((mca_sbgp_base_module_t *) iboffload->ibnet)->my_index; - - struct mqe_task *last_send, - *last_wait; - - mca_bcol_iboffload_task_t *send_task, - *wait_task, - *calc_task; - - mca_bcol_iboffload_frag_t *send_fragment, - *preposted_recv_frag; - struct ibv_sge operand; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - struct ibv_sge *r_operand = NULL, - *l_operand = NULL; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - IBOFFLOAD_VERBOSE(10, ("Allreduce starting: type %d op %d, " - "n_extra_sources - %d.\n", cm->map_ompi_to_ib_dt[coll_request->dtype->id], - cm->map_ompi_to_ib_calcs[coll_request->op->op_type], - my_exchange_node->n_extra_sources)); - - pair_rank = my_exchange_node->rank_exchanges[0]; - - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - pair_rank, coll_request->qp_index, - (MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + MCA_IBOFFLOAD_CALC_SIZE_EXT), - 0, - SBUF, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC); - if (OPAL_UNLIKELY(NULL == send_fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting and packing send frag.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - /* Vasily: NO_INLINE ????? */ - /* send my operand to the first algorithm partner */ - /* send_task = mca_bcol_iboffload_get_send_task(iboffload, pair_rank, - coll_request->qp_index, send_fragment, coll_fragment, NO_INLINE); */ - - send_task = mca_bcol_iboffload_get_rdma_task( - pair_rank, ALLREDUCE_BASE_OFFSET, - send_fragment, iboffload, coll_fragment); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting send task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Pasha: ugly but faster, set inline on first send */ - SENDWR(send_task)->send_flags |= IBV_SEND_INLINE; - - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - - /* l_operand = &send_fragment->sg_entry; */ - operand = send_fragment->sg_entry; - l_operand = &operand; - - /* Recursive-doubling exchange */ - rc = rdma_do_exchange(iboffload, coll_request, &mqe_ptr_to_set, - &last_wait, &l_operand, &r_operand); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - /* Pasha: This flow is broken, print error */ - if (false == coll_request->do_calc_in_cpu) { - ML_ERROR(("Calc in CPU must be enabled !!!")); - /* Calc and send the result to myself */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - l_operand, - r_operand, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, my_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from myself */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, my_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } else { - coll_request->l_operand = (uint64_t) (uintptr_t) - ((unsigned char *)l_operand->addr); - coll_request->r_operand = (uint64_t) (uintptr_t) - ((unsigned char *) (coll_request->l_operand) + ALLREDUCE_BASE_OFFSET); - } - - *mqe_ptr_to_set = NULL; -/* Vasily: TODO with MACRO */ - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - /* Pasha: need to set to true in upper layer */ - coll_request->user_handle_freed = false; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - IBOFFLOAD_VERBOSE(10, ("Post tasks.\n")); - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} -/* - * non power of 2 & EXCHANGE_NODE case, - * need to wait for message from "extra" proc. - */ -static int -non_pure_recursive_doubling(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request) -{ - /* local variables */ - int rc = OMPI_SUCCESS, extra_rank, pair_rank, - my_rank = ((mca_sbgp_base_module_t *) iboffload->ibnet)->my_index; - - mca_bcol_iboffload_frag_t *calc_fragment, - *preposted_recv_frag; - - mca_bcol_iboffload_task_t *wait_task, - *calc_task; - - struct ibv_sge *r_operand = NULL, - *l_operand = NULL; - - struct mqe_task *last_wait, /* we need ask from completion on last wait */ - *last_send; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - IBOFFLOAD_VERBOSE(10, ("Allreduce starting: type %d op %d, " - "n_extra_sources - %d.\n", cm->map_ompi_to_ib_dt[coll_request->dtype->id], - cm->map_ompi_to_ib_calcs[coll_request->op->op_type], - my_exchange_node->n_extra_sources)); - - extra_rank = my_exchange_node->rank_extra_source; - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, extra_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for data from extra node */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, extra_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - pair_rank = my_exchange_node->rank_exchanges[0]; - - calc_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - pair_rank, coll_request->qp_index, - MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + - MCA_IBOFFLOAD_CALC_SIZE_EXT, 0, - SBUF, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC); - if (OPAL_UNLIKELY(NULL == calc_fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting and packing send frag.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Calc extra node operand with mine and send the result - to the first algorithm partner */ - preposted_recv_frag->sg_entry.length = MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + - MCA_IBOFFLOAD_CALC_SIZE_EXT; - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - pair_rank, coll_request->qp_index, calc_fragment, - &preposted_recv_frag->sg_entry, - &calc_fragment->sg_entry, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - /* Calc extra node operand with mine and store the result on my buff */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - &preposted_recv_frag->sg_entry, - &calc_fragment->sg_entry, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, my_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from myself */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, my_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - l_operand = &preposted_recv_frag->sg_entry; - l_operand->length = MCA_IBOFFLOAD_IB_DRIVER_OPERAND_SIZE + - MCA_IBOFFLOAD_CALC_SIZE_EXT; - /* Recursive-doubling exchange */ - rc = do_exchange(iboffload, coll_request, &mqe_ptr_to_set, - &last_wait, &l_operand, &r_operand); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - /* Need to send message to "extra" proc => - one more final result calc for extra node */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - extra_rank, coll_request->qp_index, NULL, - l_operand, - r_operand, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - if (false == coll_request->do_calc_in_cpu) { - /* Calc and send the result to myself */ - calc_task = mca_bcol_iboffload_get_calc_task(iboffload, - my_rank, coll_request->qp_index, NULL, - l_operand, - r_operand, coll_request, NO_INLINE); - if (OPAL_UNLIKELY(NULL == calc_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting calc task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, calc_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, calc_task); - - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, my_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - /* RLG need cleanup */ - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - /* Wait for calc from myself */ - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, my_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - rc = OMPI_ERR_RESOURCE_BUSY; - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } else { - coll_request->l_operand = l_operand->addr; - coll_request->r_operand = r_operand->addr; - } - - *mqe_ptr_to_set = NULL; - - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - assert(NULL != last_wait); - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - IBOFFLOAD_VERBOSE(10, ("Post tasks.\n")); - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if(OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -static int mca_bcol_iboffload_allreduce_init( - bcol_function_args_t *fn_arguments, - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t **coll_request, - bool if_bcol_last) -{ - int rc; - - bool exclude_case; - ompi_free_list_item_t *item; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_allreduce_init.\n")); - - OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item, rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n")); - return rc; - } - - (*coll_request) = (mca_bcol_iboffload_collreq_t *) item; - (*coll_request)->progress_fn = iboffload->allreduce_algth; - - (*coll_request)->if_bcol_last = if_bcol_last; - - exclude_case = (non_pure_recursive_doubling == iboffload->allreduce_algth && - (OMPI_OP_SUM == fn_arguments->op->op_type && - OMPI_DATATYPE_MPI_DOUBLE == fn_arguments->dtype->id)); - - (*coll_request)->do_calc_in_cpu = cm->last_calc_in_cpu && !exclude_case; - - if (false == (*coll_request)->do_calc_in_cpu || - allreduce_extra_node == iboffload->allreduce_algth) { - (*coll_request)->do_calc_in_cpu = false; /* Relevant for extra node only */ - (*coll_request)->completion_cb_fn = - mca_bcol_iboffload_unpack_res_to_user; - } else { - (*coll_request)->completion_cb_fn = - mca_bcol_iboffload_calc_res_to_user; - } - - (*coll_request)->module = iboffload; - (*coll_request)->op = fn_arguments->op; - - (*coll_request)->dtype = fn_arguments->dtype; - (*coll_request)->count = fn_arguments->count; - - (*coll_request)->ml_buffer_index = fn_arguments->buffer_index; - (*coll_request)->buffer_info[SBUF].lkey = iboffload->rdma_block.ib_info.lkey; - - (*coll_request)->order_info = &fn_arguments->order_info; - - /* ML buffer was provided, no need to pack the data. - * It is few assumption here: - * we CAN touch and change ML buffer - */ - (*coll_request)->buffer_info[SBUF].buf = (void *) ( - (unsigned char *) fn_arguments->sbuf + - (size_t) fn_arguments->sbuf_offset); - - (*coll_request)->buffer_info[SBUF].offset = fn_arguments->sbuf_offset; - - (*coll_request)->buffer_info[RBUF].buf = (void *) ( - (unsigned char *) fn_arguments->rbuf + - (size_t) fn_arguments->rbuf_offset); - - (*coll_request)->buffer_info[RBUF].offset = fn_arguments->rbuf_offset; - - if(mca_bcol_iboffload_component.enable_rdma_calc) { - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_BARRIER; - } else { - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_REGULAR; - } - - (*coll_request)->n_frag_mpi_complete = 0; - (*coll_request)->n_frag_net_complete = 0; - - fn_arguments->bcol_opaque_data = (void *) (*coll_request); - - /* - * setup collective work request - */ - - /* get collective frag */ - coll_fragment = &((*coll_request)->first_collfrag); - mca_bcol_iboffload_collfrag_init(coll_fragment); - - coll_fragment->mq_index = COLL_MQ; - coll_fragment->alg = RECURSIVE_DOUBLING_ALLREDUCE_ALG; - - coll_fragment->mq_credits = - iboffload->alg_task_consump[RECURSIVE_DOUBLING_ALLREDUCE_ALG]; - - /* set pointers for (coll frag) <-> (coll full request) */ - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS(*coll_request, coll_fragment); - - coll_fragment->unpack_size = - mca_bcol_base_get_buff_length(fn_arguments->dtype, fn_arguments->count); - - IBOFFLOAD_VERBOSE(10, ("The input data is %lf", *(double *) (*coll_request)->buffer_info[SBUF].buf)); - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_allreduce_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - /* local variables */ - int rc; - - mca_bcol_iboffload_collreq_t *coll_request = NULL; - mca_bcol_iboffload_module_t *iboffload = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - /* Pasha: please do not touch this line, it used for ML buffer recycling barrier call */ - bool if_bcol_last = ((const_args->index_of_this_type_in_collective + 1) == - const_args->n_of_this_type_in_collective); - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - IBOFFLOAD_VERBOSE(10, ("n_of_this_type_in_a_row %d, index_in_consecutive_same_bcol_calls %d", - const_args->n_of_this_type_in_a_row, - const_args->index_in_consecutive_same_bcol_calls + 1)); - - IBOFFLOAD_VERBOSE(10, ("Allreduce started.\n")); - fn_arguments->result_in_rbuf = true; - - rc = mca_bcol_iboffload_allreduce_init(fn_arguments, iboffload, - &coll_request, if_bcol_last); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Get error from mca_bcol_iboffload_allreduce_init.\n")); - return rc; - } - - /* Allreduce starting */ - rc = iboffload->allreduce_algth(iboffload, coll_request); - if (OPAL_UNLIKELY(OMPI_ERROR == rc)) { - return BCOL_FN_NOT_STARTED; - } - - IBOFFLOAD_VERBOSE(10, ("Wait for completions.\n")); - - /* done */ - return BCOL_FN_STARTED; -} - -static int mca_bcol_iboffload_allreduce_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - - if (BCOL_IS_COMPLETED(coll_request)) { - coll_request->user_handle_freed = true; - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - - IBOFFLOAD_VERBOSE(10, ("Allreduce already done.\n")); - return BCOL_FN_COMPLETE; - } - - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_allreduce_first_call(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request) -{ - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - int i = 0, my_rank = iboffload->ibnet->super.my_index, - n_exchanges = my_exchange_node->n_exchanges, - *exchanges = my_exchange_node->rank_exchanges, - n_extra_src = my_exchange_node->n_extra_sources, - rank_extra_src = my_exchange_node->rank_extra_source; - - mca_bcol_iboffload_endpoint_t *ep = iboffload->endpoints[my_rank]; - - /* Connecting to myself */ - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - - iboffload->alg_task_consump[RECURSIVE_DOUBLING_ALLREDUCE_ALG] = 0; - - if (0 < n_extra_src) { - iboffload->alg_task_consump[RECURSIVE_DOUBLING_ALLREDUCE_ALG] += 4; /* Two CALCs and two WAITs tasks */ - ep = iboffload->endpoints[rank_extra_src]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - for (i = 0; i < n_exchanges; ++i) { - iboffload->alg_task_consump[RECURSIVE_DOUBLING_ALLREDUCE_ALG] += 4; /* Two CALCs and two WAITs tasks */ - ep = iboffload->endpoints[exchanges[i]]; - - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - iboffload->alg_task_consump[RECURSIVE_DOUBLING_ALLREDUCE_ALG] += 4; /* Two CALCs and two WAITs tasks */ - - if (0 < my_exchange_node->n_extra_sources) { - iboffload->allreduce_algth = - (EXTRA_NODE == my_exchange_node->node_type)? - allreduce_extra_node: - non_pure_recursive_doubling; - } else { - if(mca_bcol_iboffload_component.enable_rdma_calc) { - iboffload->allreduce_algth = - rdma_pure_recursive_doubling; - } else { - iboffload->allreduce_algth = - pure_recursive_doubling; - } - } - - return iboffload->allreduce_algth(iboffload, coll_request); -} - -int mca_bcol_iboffload_allreduce_register(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register iboffload Allreduce.\n")); - - comm_attribs.bcoll_type = BCOL_ALLREDUCE; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_allreduce_intra, - mca_bcol_iboffload_allreduce_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_barrier.c b/ompi/mca/bcol/iboffload/bcol_iboffload_barrier.c deleted file mode 100644 index 1eb47f5921a..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_barrier.c +++ /dev/null @@ -1,934 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" -#include "ompi/mca/coll/ml/coll_ml_allocation.h" - -static int mca_bcol_iboffload_barrier_init( - bcol_function_args_t *input_args, - mca_bcol_iboffload_module_t *iboffload, - collective_message_completion_callback_function cb_fn, - struct mca_bcol_iboffload_collreq_t **coll_request); - -/** - * Start barrier - */ - -int mca_bcol_iboffload_barrier_intra_recursive_doubling( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - /* local variables */ - mca_bcol_iboffload_task_t *send_task = NULL, - *wait_task = NULL; - - struct mqe_task **mqe_ptr_to_set = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = NULL; - - struct mqe_task *last_wait = NULL, /* we need ask from completion on last wait */ - *last_send = NULL; /* If it no wait, we need ask for completion on last send */ - - int rc, exchange, extra_rank, pair_rank; - - - mca_bcol_iboffload_frag_t *send_fragment = NULL, - *preposted_recv_frag = NULL; - - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_intra_recursive_doubling.\n")); - - coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - /* Set mq credits */ - coll_fragment->mq_credits = iboffload->alg_task_consump[RECURSIVE_DOUBLING_BARRIER_ALG]; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - goto out_of_resources; - } - - coll_fragment->alg = RECURSIVE_DOUBLING_BARRIER_ALG; - - /* - * NOTE: need to generate template, if this will be a multiple fragment - * message. This way we can progress the collective w/o knowing it's - * type - actually, this is not the case for barrier, but just a note - * to remind us that we need to generalize this. - */ - - mqe_ptr_to_set = &coll_fragment->to_post; - - /* - * Fill in the communication pattern - */ - - /* - * If non power of 2, may need to wait for message from "extra" proc. - */ - - if (0 < my_exchange_node->n_extra_sources) { - if (EXCHANGE_NODE == my_exchange_node->node_type) { - /* I will participate in the exchange (of the algorithm) - - * wait for signal from extra process */ - extra_rank = my_exchange_node->rank_extra_source; - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, extra_rank, coll_request->qp_index); - - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_VERBOSE(10, ("Non power of 2 case: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, - extra_rank, 1, preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Non power of 2 case: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } else { - /* I will not participate in the exchange - so just "register" as here */ - extra_rank = my_exchange_node->rank_extra_source; - /* send - no need to send any data, in-order delivery */ - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - extra_rank, coll_request->qp_index, 0, - 0, SBUF,MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - - send_task = mca_bcol_iboffload_get_send_task(iboffload, extra_rank, - coll_request->qp_index, send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Non power of 2 case: " - "Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - } - } - - /* loop over exchange send/recv pairs */ - for (exchange = 0; exchange < my_exchange_node->n_exchanges; ++exchange) { - /* rank of exchange partner */ - pair_rank = my_exchange_node->rank_exchanges[exchange]; - /* post send */ - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - pair_rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - - assert(NULL != send_fragment); - - send_task = mca_bcol_iboffload_get_send_task(iboffload, pair_rank, - coll_request->qp_index, - send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Exchaging: " - "Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - - /* post wait */ - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, pair_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_VERBOSE(10, ("Exchaging: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, pair_rank, 1, - preposted_recv_frag, - coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Exchaging: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } - - /* if non power of 2, may need to send message to "extra" proc */ - if (0 < my_exchange_node->n_extra_sources) { - if (EXTRA_NODE == my_exchange_node->node_type) { - /* I will not participate in the exchange - - * wait for signal from exchange process */ - extra_rank = my_exchange_node->rank_extra_source; - /* post wait */ - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag(iboffload, extra_rank, - coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_VERBOSE(10, ("Sending to 'extra' node: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, extra_rank, 1, - preposted_recv_frag, - coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Sending to 'extra' node: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - } else { - /* I will participate in the exchange - - * send signal to extra process */ - extra_rank = my_exchange_node->rank_extra_source; - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - extra_rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - - send_task = mca_bcol_iboffload_get_send_task( - iboffload, extra_rank, - coll_request->qp_index, - send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Sending to 'extra' node: " - "Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - } - } - - /* Fill in the the rest of the coll_fragment */ - IBOFFLOAD_VERBOSE(10, ("Fill in the the rest of the coll_fragment.\n")); - /* end of list */ - *mqe_ptr_to_set = NULL; - - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - coll_request->n_frag_mpi_complete = 0; - coll_request->n_frag_net_complete = 0; - - coll_request->user_handle_freed = false; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - if (MCA_BCOL_IBOFFLOAD_QP_SYNC != coll_request->qp_index) { - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - } else { - /* Special flow for ML service barrier , only this function supposed to - post service requests */ - struct mqe_task *bad_mqe = NULL; - assert (MCA_BCOL_IBOFFLOAD_QP_SYNC == coll_request->qp_index ); - /* Post to special service MQ - 1 */ - rc = mqe_post_task(iboffload->mq[1], coll_fragment->to_post, &bad_mqe); - if (OPAL_UNLIKELY(0 != rc)) { - IBOFFLOAD_ERROR(("ibv_post_mqe failed on device (%s), errno says: %s," - " the return code is [%d]\n", - ibv_get_device_name(iboffload->device->dev.ib_dev), - strerror(errno), rc)); - return OMPI_ERROR; - } - } - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Barrier, adding collfrag to collfrag_pending.\n")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -int mca_bcol_iboffload_barrier_intra_recursive_doubling_start( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc; - - rc = mca_bcol_iboffload_rec_doubling_start_connections(iboffload); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - iboffload->barrier_algth = - mca_bcol_iboffload_barrier_intra_recursive_doubling; - return - mca_bcol_iboffload_barrier_intra_recursive_doubling(iboffload, coll_request); -} - -int mca_bcol_iboffload_nb_memory_service_barrier_start( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc; - - rc = mca_bcol_iboffload_rec_doubling_start_connections(iboffload); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - iboffload->memsync_algth = - mca_bcol_iboffload_barrier_intra_recursive_doubling; - - return - mca_bcol_iboffload_barrier_intra_recursive_doubling - (iboffload, coll_request); -} - -int mca_bcol_iboffload_nb_memory_service_barrier_intra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - - /* local variables */ - int rc; - mca_bcol_iboffload_collreq_t *coll_request; - mca_bcol_iboffload_module_t *iboffload = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - /* - * recursive doubling - */ - - - IBOFFLOAD_VERBOSE(10, ("Memory syncranization barrier was started\n")); - - /* init barrier collective request */ - rc = mca_bcol_iboffload_barrier_init(input_args, iboffload, NULL, &coll_request); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Get error from mca_bcol_iboffload_barrier_init")); - return rc; - } - - /* set the qp index to special qp that is used only for synchronization */ - coll_request->qp_index = MCA_BCOL_IBOFFLOAD_QP_SYNC; - /* overwrite mq index to run over service setup */ - coll_request->first_collfrag.mq_index = SERVICE_MQ; - - /* start the barrier */ - rc = iboffload->memsync_algth(iboffload, coll_request); - if (OPAL_UNLIKELY(OMPI_ERROR == rc)) { - return rc; - } - - /* complete the barrier - progress releases full request descriptors */ - IBOFFLOAD_VERBOSE(10, ("Memory syncranization barrier was started\n")); - - /* done */ - return BCOL_FN_STARTED; -} - -/* Recursive K - ing*/ -static int recursive_knomial_start_connections(struct mca_bcol_iboffload_module_t *iboffload) -{ - netpatterns_k_exchange_node_t *my_exchange_node = - &iboffload->knomial_exchange_tree; - int k, i, n_exchanges = my_exchange_node->n_exchanges, - **exchanges = my_exchange_node->rank_exchanges, - n_extra_src = my_exchange_node->n_extra_sources, - tree_order = my_exchange_node->tree_order - 1, - rank_extra_src; - - mca_bcol_iboffload_endpoint_t *ep; - - iboffload->alg_task_consump[RECURSIVE_KNOMIAL_BARRIER_ALG] += 0; - - IBOFFLOAD_VERBOSE(10, ("\nMy sbgp rank (index) - %d, " - "num of endpoints = %d, iboffload module - %p" - " extra n %d, n_exchanges %d", - iboffload->ibnet->super.my_index, iboffload->num_endpoints, iboffload, - n_extra_src, n_exchanges)); - if (0 < n_extra_src) { - for (k = 0; k < n_extra_src; k++) { - iboffload->alg_task_consump[RECURSIVE_KNOMIAL_BARRIER_ALG] += 2; /* One send task one wait */ - rank_extra_src = my_exchange_node->rank_extra_sources_array[k]; - ep = iboffload->endpoints[rank_extra_src]; - if (iboffload->ibnet->super.my_index < ep->index) { - while(0 == (ep)->remote_zero_rdma_addr.addr) { - opal_progress(); - } - } else { - IBOFFLOAD_VERBOSE(10, ("Trying to connect - %d", ep->index)); - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - } - } - - for (i = 0; i < n_exchanges; ++i) { - for (k = 0; k < tree_order; k++) { - iboffload->alg_task_consump[RECURSIVE_KNOMIAL_BARRIER_ALG] += 2; /* One send task one wait */ - ep = iboffload->endpoints[exchanges[i][k]]; - - IBOFFLOAD_VERBOSE(10, ("Trying to connect - %d", ep->index)); - if (iboffload->ibnet->super.my_index < ep->index) { - while(0 == (ep)->remote_zero_rdma_addr.addr) { - opal_progress(); - } - } else { - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - } - } - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_barrier_intra_recursive_knomial( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - /* local variables */ - mca_bcol_iboffload_task_t *send_task = NULL, - *wait_task = NULL; - - struct mqe_task **mqe_ptr_to_set = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = NULL; - - struct mqe_task *last_wait = NULL, /* we need ask from completion on last wait */ - *last_send = NULL; /* If it no wait, we need ask for completion on last send */ - - int rc, exchange, extra_rank, pair_rank, k; - - - mca_bcol_iboffload_frag_t *send_fragment = NULL, - *preposted_recv_frag = NULL; - - netpatterns_k_exchange_node_t *my_exchange_node = - &iboffload->knomial_exchange_tree; - IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_intra_recursive_knomial. Node type %d\n", my_exchange_node->node_type)); - - coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - /* Set mq credits */ - coll_fragment->mq_credits = iboffload->alg_task_consump[RECURSIVE_KNOMIAL_BARRIER_ALG]; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - goto out_of_resources; - } - - coll_fragment->alg = RECURSIVE_KNOMIAL_BARRIER_ALG; - - /* - * NOTE: need to generate template, if this will be a multiple fragment - * message. This way we can progress the collective w/o knowing it's - * type - actually, this is not the case for barrier, but just a note - * to remind us that we need to generalize this. - */ - - mqe_ptr_to_set = &coll_fragment->to_post; - - /* - * Fill in the communication pattern - */ - - /* - * If non power of 2, may need to wait for message from "extra" proc. - */ - - if (0 < my_exchange_node->n_extra_sources) { - if (EXCHANGE_NODE == my_exchange_node->node_type) { - /* I will participate in the exchange (of the algorithm) - - * wait for signal from extra process */ - for (k = 0; k < my_exchange_node->n_extra_sources; k++) { - extra_rank = my_exchange_node->rank_extra_sources_array[k]; - IBOFFLOAD_VERBOSE(10,("Exchange [ %d ] extra get %d", k, extra_rank)); - - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, extra_rank, coll_request->qp_index); - - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_VERBOSE(10, ("Non power of 2 case: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, - extra_rank, 1, preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Non power of 2 case: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } - } else { - /* I will not participate in the exchange - so just "register" as here */ - extra_rank = my_exchange_node->rank_extra_sources_array[0]; - IBOFFLOAD_VERBOSE(10,("Send to proxy %d", extra_rank)); - /* send - no need to send any data, in-order delivery */ - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - extra_rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - - send_task = mca_bcol_iboffload_get_send_task(iboffload, extra_rank, - coll_request->qp_index, send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Non power of 2 case: " - "Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - } - } - - /* loop over exchange send/recv pairs */ - for (exchange = 0; exchange < my_exchange_node->n_exchanges; ++exchange) { - for (k = 0; k < my_exchange_node->tree_order - 1; k++) { - /* rank of exchange partner */ - pair_rank = my_exchange_node->rank_exchanges[exchange][k]; - IBOFFLOAD_VERBOSE(10,("Exchange [ %d ,%d ] send to %d", exchange, k, pair_rank)); - /* post send */ - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - pair_rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - - send_task = mca_bcol_iboffload_get_send_task(iboffload, pair_rank, - coll_request->qp_index, - send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Exchaging: " - "Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - } - - for (k = 0; k < my_exchange_node->tree_order - 1; k++) { - - pair_rank = my_exchange_node->rank_exchanges[exchange][k]; - IBOFFLOAD_VERBOSE(10,("Exchange [ %d ,%d ] recv %d", exchange, k, pair_rank)); - /* post wait */ - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, pair_rank, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_VERBOSE(10, ("Exchaging: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, pair_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Exchaging: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } - } - - /* if non power of 2, may need to send message to "extra" proc */ - if (0 < my_exchange_node->n_extra_sources) { - if (EXTRA_NODE == my_exchange_node->node_type) { - /* I will not participate in the exchange - - * wait for signal from exchange process */ - extra_rank = my_exchange_node->rank_extra_sources_array[0]; - IBOFFLOAD_VERBOSE(10,("Wait from proxy %d", extra_rank)); - /* post wait */ - preposted_recv_frag = - mca_bcol_iboffload_get_preposted_recv_frag(iboffload, extra_rank, - coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_VERBOSE(10, ("Sending to 'extra' node: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, extra_rank, 1, - preposted_recv_frag, - coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Sending to 'extra' node: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - } else { - /* I will participate in the exchange - - * send signal to extra process */ - for (k = 0; k < my_exchange_node->n_extra_sources; k++) { - extra_rank = my_exchange_node->rank_extra_sources_array[k]; - IBOFFLOAD_VERBOSE(10,("Exchange [ %d ] extra release %d", k, extra_rank)); - - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - extra_rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - - send_task = mca_bcol_iboffload_get_send_task( - iboffload, extra_rank, - coll_request->qp_index, - send_fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_VERBOSE(10, ("Sending to 'extra' node: " - "Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - } - } - } - - /* Fill in the the rest of the coll_fragment */ - IBOFFLOAD_VERBOSE(10, ("Fill in the the rest of the coll_fragment.\n")); - /* end of list */ - *mqe_ptr_to_set = NULL; - - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - coll_request->n_frag_mpi_complete = 0; - coll_request->n_frag_net_complete = 0; - - coll_request->user_handle_freed = false; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - if (MCA_BCOL_IBOFFLOAD_QP_SYNC != coll_request->qp_index) { - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - } else { - /* Special flow for ML service barrier , only this function supposed to - post service requests */ - struct mqe_task *bad_mqe = NULL; - assert (MCA_BCOL_IBOFFLOAD_QP_SYNC == coll_request->qp_index ); - /* Post to special service MQ - 1 */ - rc = mqe_post_task(iboffload->mq[1], coll_fragment->to_post, &bad_mqe); - if (OPAL_UNLIKELY(0 != rc)) { - IBOFFLOAD_ERROR(("ibv_post_mqe failed on device (%s), errno says: %s," - " the return code is [%d]\n", - ibv_get_device_name(iboffload->device->dev.ib_dev), - strerror(errno), rc)); - return OMPI_ERROR; - } - } - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Barrier, adding collfrag to collfrag_pending.\n")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -int mca_bcol_iboffload_barrier_intra_recursive_knomial_start( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc; - - rc = recursive_knomial_start_connections(iboffload); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - iboffload->barrier_algth = - mca_bcol_iboffload_barrier_intra_recursive_knomial; - return - mca_bcol_iboffload_barrier_intra_recursive_knomial(iboffload, coll_request); -} - -int mca_bcol_iboffload_rec_doubling_start_connections(mca_bcol_iboffload_module_t *iboffload) -{ - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - int i, n_exchanges = my_exchange_node->n_exchanges, - *exchanges = my_exchange_node->rank_exchanges, - n_extra_src = my_exchange_node->n_extra_sources, - rank_extra_src = my_exchange_node->rank_extra_source; - - mca_bcol_iboffload_endpoint_t *ep; - - IBOFFLOAD_VERBOSE(10, ("\nMy sbgp rank (index) - %d, " - "num of endpoints = %d, iboffload module - %p\n", - iboffload->ibnet->super.my_index, iboffload->num_endpoints, iboffload)); - if (0 < n_extra_src) { - iboffload->alg_task_consump[RECURSIVE_DOUBLING_BARRIER_ALG] += 2; /* One send task one wait */ - ep = iboffload->endpoints[rank_extra_src]; - - if (iboffload->ibnet->super.my_index < ep->index) { - while(0 == (ep)->remote_zero_rdma_addr.addr) { - opal_progress(); - } - } else { - IBOFFLOAD_VERBOSE(10, ("Trying to connect - %d", ep->index)); - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - } - - for (i = 0; i < n_exchanges; ++i) { - iboffload->alg_task_consump[RECURSIVE_DOUBLING_BARRIER_ALG] += 2; /* One send task one wait */ - ep = iboffload->endpoints[exchanges[i]]; - - if (iboffload->ibnet->super.my_index < ep->index) { - while(0 == (ep)->remote_zero_rdma_addr.addr) { - opal_progress(); - } - } else { - IBOFFLOAD_VERBOSE(10, ("Trying to connect - %d", ep->index)); - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - } - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_barrier_init( - bcol_function_args_t *input_args, - mca_bcol_iboffload_module_t *iboffload, - collective_message_completion_callback_function cb_fn, - struct mca_bcol_iboffload_collreq_t **coll_request) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_init")); - - OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item); - if (OPAL_UNLIKELY(NULL == item)) { - IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - (*coll_request) = (mca_bcol_iboffload_collreq_t *) item; - (*coll_request)->progress_fn = iboffload->barrier_algth; - - /* - * For usual barrier it is null. For memory - * service barrier we need some work to do - */ - (*coll_request)->completion_cb_fn = cb_fn; - (*coll_request)->order_info = &input_args->order_info; - - (*coll_request)->module = iboffload; - (*coll_request)->ml_buffer_index = input_args->buffer_index; - (*coll_request)->buffer_info[SBUF].offset = 0; - (*coll_request)->buffer_info[RBUF].offset = 0; - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_BARRIER; - - input_args->bcol_opaque_data = (void *) (*coll_request); - - /* - * setup collective work request - */ - - /* get collective frag */ - coll_fragment = &(*coll_request)->first_collfrag; - mca_bcol_iboffload_collfrag_init(coll_fragment); - - coll_fragment->mq_index = COLL_MQ; - - /* set pointers for (coll frag) <-> (coll full request) */ - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS(*coll_request, coll_fragment); - - return OMPI_SUCCESS; -} - -/************************************************************************ - ************************ New style Barrier ***************************** - ***********************************************************************/ - -static int mca_bcol_iboffload_new_style_barrier_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - - if (BCOL_IS_COMPLETED(coll_request)) { - coll_request->user_handle_freed = true; - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - - IBOFFLOAD_VERBOSE(10, ("Barrier already done.\n")); - return BCOL_FN_COMPLETE; - } - - return BCOL_FN_STARTED; -} - -static int mca_bcol_iboffload_new_style_barrier_intra( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variables */ - int rc; - mca_bcol_iboffload_collreq_t *coll_request; - mca_bcol_iboffload_module_t *iboffload = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - /* check for ordering */ - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, input_args); - - /* - * recursive doubling - */ - - - IBOFFLOAD_VERBOSE(10, ("Barrier starts.\n")); - - /* init barrier collective reqeust */ - rc = mca_bcol_iboffload_barrier_init(input_args, iboffload, NULL, &coll_request); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Get error from mca_bcol_iboffload_barrier_init")); - return rc; - } - - /* start the barrier */ - rc = iboffload->barrier_algth(iboffload, coll_request); - if (OPAL_UNLIKELY(OMPI_ERROR == rc)) { - return BCOL_FN_NOT_STARTED; - } - - /* done */ - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_barrier_register(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register iboffload Barrier.\n")); - - comm_attribs.bcoll_type = BCOL_BARRIER; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_new_style_barrier_intra, - mca_bcol_iboffload_new_style_barrier_progress); - - return OMPI_SUCCESS; -} - -int mca_bcol_iboffload_memsync_register(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register sync function\n")); - - comm_attribs.bcoll_type = BCOL_SYNC; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_nb_memory_service_barrier_intra, - mca_bcol_iboffload_new_style_barrier_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_bcast.c b/ompi/mca/bcol/iboffload/bcol_iboffload_bcast.c deleted file mode 100644 index 9b5b216e65b..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_bcast.c +++ /dev/null @@ -1,1065 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include -#include "opal_stdint.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_bcast.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -#include "opal/include/opal/types.h" - -static int mca_bcol_iboffload_bcast_init( - bcol_function_args_t *fn_arguments, - mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t **coll_request, - bool if_bcol_last, int mq_credits, - collective_message_progress_function progress_fn) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_collfrag_t *coll_fragment; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - int my_group_index = iboffload_module->super.sbgp_partner_module->my_index; - - OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item); - if (OPAL_UNLIKELY(NULL == item)) { - IBOFFLOAD_ERROR(("Wait for free list failed.\n")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - /* setup call request */ - (*coll_request) = (mca_bcol_iboffload_collreq_t *) item; - - (*coll_request)->n_fragments = 0; - (*coll_request)->n_frags_sent = 0; - (*coll_request)->n_frag_mpi_complete = 0; - (*coll_request)->n_frag_net_complete = 0; - (*coll_request)->if_bcol_last = if_bcol_last; - (*coll_request)->ml_buffer_index = fn_arguments->buffer_index; - (*coll_request)->completion_cb_fn = NULL; - (*coll_request)->buffer_info[SBUF].buf = (void *) ( - (unsigned char *)fn_arguments->sbuf + - fn_arguments->sbuf_offset); - (*coll_request)->buffer_info[SBUF].offset = fn_arguments->sbuf_offset; - (*coll_request)->buffer_info[RBUF].offset = fn_arguments->rbuf_offset; - - (*coll_request)->dtype = fn_arguments->dtype; - (*coll_request)->count = fn_arguments->count; - (*coll_request)->module = iboffload_module; - /* TODO Pasha: we need it for pending quque. Set it later. */ - (*coll_request)->progress_fn = progress_fn; - /* TODO Pasha: fix it later */ - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_REGULAR; - - (*coll_request)->order_info = &fn_arguments->order_info; - - coll_fragment = &((*coll_request)->first_collfrag); - mca_bcol_iboffload_collfrag_init(coll_fragment); - - /** Vasily ????? */ - /* mq_credits = (*coll_request)->total_tasks_num; */ - coll_fragment->mq_credits = mq_credits; - coll_fragment->mq_index = COLL_MQ; - /* Pasha: just set it to zero */ - coll_fragment->last_wait_num = 0; - coll_fragment->alg = -2; /* used only for debug */ - /* - if (my_rank == algthm_ptr->root) { - coll_fragment->last_wait_num = 0; - } else { - coll_fragment->last_wait_num = algth_lst->last_wait_num; - } - */ - /* Pasha: we have nothing to unpack */ - coll_fragment->unpack_size = 0; - /* coll_fragment->unpack_size = pack_len; */ - /* coll_fragment->alg = RECURSIVE_DOUBLING_TREE_BCAST; */ - - /* set pointers for (coll frag) <-> (coll full request) */ - (*coll_request)->user_handle_freed = false; - - fn_arguments->bcol_opaque_data = (void *) (*coll_request); - - if (true == fn_arguments->root_flag) { - (*coll_request)->root = my_group_index; - } else { - (*coll_request)->root = fn_arguments->root_route->rank; - } - - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS((*coll_request), coll_fragment); - return OMPI_SUCCESS; -} -static inline __opal_attribute_always_inline__ int -binomial_scatter_smsg( - mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collfrag_t *coll_fragment, - struct mqe_task **last_send, - int radix_mask_pow, - uint32_t my_group_index, - size_t send_size - ) -{ - int rc, dst; - int radix_mask = radix_mask_pow >= 0 ? 1 << radix_mask_pow : 0; - - while(radix_mask > 0) { - /* For each level of tree, do sends */ - dst = my_group_index ^ radix_mask; - rc = mca_bcol_iboffload_send_small_buff_setup( - last_send, send_size, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); - return rc; - } - - radix_mask >>= 1; - } - - return OMPI_SUCCESS; -} - -#define BINOMIAL_SMALL_SCATTER( \ - iboffload_module, coll_fragment, \ - last_wait, last_send, \ - distance, \ - my_group_index, \ - segment_size \ - ) \ -do { \ - int rc = OMPI_SUCCESS; \ - int dst; \ - int send_size; \ - int dst_boundary_rank; \ - int radix_mask_pow = distance; \ - int radix_mask = (distance) >= 0 ? 1 << (distance) : 0; \ - IBOFFLOAD_VERBOSE(10, ("BCAST SCATTER %d %d", radix_mask, distance)); \ - \ - while(radix_mask > 0) { \ - /* For each level of tree, do sends */ \ - dst = my_group_index ^ radix_mask; \ - dst_boundary_rank = dst & ((~(int)0) << (radix_mask_pow)); \ - \ - IBOFFLOAD_VERBOSE(10, ("Scatter data to %d , len %d offset %d", dst, send_size, send_offset)); \ - \ - rc = mca_bcol_iboffload_send_small_buff_setup( \ - &last_send, send_size, dst, \ - iboffload_module, coll_fragment); \ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { \ - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); \ - return rc; \ - } \ - radix_mask >>= 1; \ - /* radix_mask_pow--; */ \ - } \ -} while(0) - - -int mca_bcol_iboffload_small_msg_bcast_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - - IBOFFLOAD_VERBOSE(10, ("Run progress.\n")); - - /* We should send the data to our children in the tree before - the upper layer will start with buffers recycling */ - if (BCOL_AND_NET_ARE_COMPLETED(coll_request)) { - coll_request->user_handle_freed = true; - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - - IBOFFLOAD_VERBOSE(10, ("New bcast done !!!")); - return BCOL_FN_COMPLETE; - } - - return BCOL_FN_STARTED; -} - -static int mca_bcol_iboffload_small_msg_bcast_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - netpatterns_pair_exchange_node_t *recursive_doubling_tree = - &iboffload_module->recursive_doubling_tree; - - int rc, - distance_mask_pow , dst, - group_src, power_of_2_distance; - - uint32_t pack_len; - int my_group_index = iboffload_module->super.sbgp_partner_module->my_index; - - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - - IBOFFLOAD_VERBOSE(10,("Entering small msg iboffload bcast")); - - if (OPAL_UNLIKELY(!iboffload_module->connection_status[RECURSIVE_DOUBLING_TREE_BCAST])) { - IBOFFLOAD_VERBOSE(10,("Bcast open new connection ")); - bcol_iboffload_setup_binomial_connection(iboffload_module); - } - - pack_len = coll_request->count * coll_request->dtype->super.size; - IBOFFLOAD_VERBOSE(10,("My packet length %d pack_len frag_count %d dtype size %d ", - pack_len, - coll_request->count, - coll_request->dtype->super.size)); - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - coll_request->buffer_info[SBUF].lkey = iboffload_module->rdma_block.ib_info.lkey; - - if (coll_request->root == my_group_index) { - IBOFFLOAD_VERBOSE(10, ("I'm root of the data")); - - /* Send data to the extra peer */ - if (recursive_doubling_tree->n_extra_sources > 0) { - /* send the all data to your extra peer */ - dst = recursive_doubling_tree->rank_extra_source; - IBOFFLOAD_VERBOSE(10,("Sending the dat to Dst %d",dst)); - rc = mca_bcol_iboffload_send_small_buff_setup( - &last_send, pack_len, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_large_buff_setup")); - goto out_of_resources; - } - } - - distance_mask_pow = - iboffload_module->power_of_2 - 1; - - rc = binomial_scatter_smsg(iboffload_module, coll_fragment, - &last_send, distance_mask_pow, - my_group_index, pack_len); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to binomial_scatter_smsg")); - goto out_of_resources; - } - - goto finalize; - } - - /* prepare and post recv operation */ - group_src = bcol_iboffload_binomial_root_to_src(coll_request->root, - my_group_index, iboffload_module->power_of_2_ranks, - iboffload_module->group_size, &power_of_2_distance); - assert(group_src >= 0); - - if (0 > power_of_2_distance) { - /* the rank is virtual root for this group, receive the data - and scatter gather as root */ - IBOFFLOAD_VERBOSE(10,("Virtual root distance_mask_pow %d ",iboffload_module->power_of_2)); - distance_mask_pow = iboffload_module->power_of_2 - 1; - } else { - distance_mask_pow = power_of_2_distance - 1; - } - - IBOFFLOAD_VERBOSE(10, ("Bcast, receive data from %d[%d], count %d, offset %d", - group_src)); - - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - pack_len, group_src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - goto out_of_resources; - } - - rc = binomial_scatter_smsg(iboffload_module, coll_fragment, - &last_send, distance_mask_pow, - my_group_index, pack_len); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to binomial_scatter_smsg")); - goto out_of_resources; - } - - if (recursive_doubling_tree->n_extra_sources > 0 && - iboffload_module->power_of_2 - 1 != distance_mask_pow) { -/* - - if ((recursive_doubling_tree->n_extra_sources > 0) && - ((my_group_index + iboffload_module->power_of_2_ranks ) < - iboffload_module->group_size) ) { - */ - dst = recursive_doubling_tree->rank_extra_source; - /* - dst = my_group_index + iboffload_module->power_of_2_ranks; - */ - - rc = mca_bcol_iboffload_send_small_buff_setup( - &last_send, pack_len, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_small_buff_setup")); - goto out_of_resources; - } - } - -finalize: - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - (coll_request)->n_fragments += 1; - (coll_request)->n_frags_sent += 1; - - if (NULL != last_wait) { - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } else { - last_send->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_send->wr_id; - last_send->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Barrier, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_small_msg_bcast_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - int rc; - int mq_credits = iboffload_module->power_of_2 + 2; - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_bcast_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_small_msg_bcast_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_small_msg_bcast_intra was started [%d]\n", rc)); - return rc; -} - -static int mca_bcol_iboffload_small_msg_bcast_extra_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - netpatterns_pair_exchange_node_t *recursive_doubling_tree = - &iboffload_module->recursive_doubling_tree; - - int rc, - dst; - int my_group_index = iboffload_module->super.sbgp_partner_module->my_index; - uint32_t pack_len; - - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - - IBOFFLOAD_VERBOSE(10,("Entering small msg extra iboffload bcast")); - - if (OPAL_UNLIKELY(!iboffload_module->connection_status[RECURSIVE_DOUBLING_TREE_BCAST])) { - IBOFFLOAD_VERBOSE(10,("Bcast open new connection ")); - bcol_iboffload_setup_binomial_connection(iboffload_module); - } - - - pack_len = coll_request->count * coll_request->dtype->super.size; - coll_request->buffer_info[SBUF].lkey = iboffload_module->rdma_block.ib_info.lkey; - - IBOFFLOAD_VERBOSE(10,("My packet length %d pack_len frag_count %d dtype size %d ", - pack_len, - coll_request->count, - coll_request->dtype->super.size)); - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, - coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - - - if (coll_request->root == my_group_index) { - IBOFFLOAD_VERBOSE(10, ("I'm root of the data %d", iboffload_module->power_of_2)); - /* send the all data to your extra peer */ - - dst = recursive_doubling_tree->rank_extra_source; - IBOFFLOAD_VERBOSE(10,("Im extra root sending data to %d \n",dst)); - rc = mca_bcol_iboffload_send_small_buff_setup( - &last_send, pack_len, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_small_buff_setup")); - goto out_of_resources; - } - } else { - /* Not root case */ - dst = recursive_doubling_tree->rank_extra_source; - rc = mca_bcol_iboffload_recv_small_buff_setup(&last_wait, - pack_len, dst, - iboffload_module, coll_fragment); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - return OMPI_ERROR; - } - } - - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - (coll_request)->n_fragments = 1; - (coll_request)->n_frags_sent = 1; - - if (NULL != last_wait) { - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } else { - last_send->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_send->wr_id; - last_send->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Barrier, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_small_msg_bcast_extra_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *)const_args->bcol_module; - - int rc; - int mq_credits = 2; - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_bcast_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_small_msg_bcast_extra_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_small_msg_bcast_extra_exec was started [%d]\n", rc)); - return rc; -} - -/* Large message scatter-allgather with zero copy */ -int mca_bcol_iboffload_zero_copy_progress(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - int i; - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *)fn_arguments->bcol_opaque_data; - - /* IBOFFLOAD_VERBOSE(10, ("Run general progress. %d == %d * %d == %d", - coll_request->n_frag_mpi_complete, coll_request->n_fragments, - coll_request->n_frag_net_complete, coll_request->n_fragments)); */ - - /* Complete the bcast - progress releases full request descriptors */ - for (i = 0; i < mca_bcol_iboffload_component.max_progress_pull; i++) { - if (coll_request->n_frag_mpi_complete == coll_request->n_fragments && - coll_request->n_frag_net_complete == coll_request->n_fragments) { - - IBOFFLOAD_VERBOSE(10, ("Deregister user buff.\n")); - coll_request->module->device->mpool->mpool_deregister( - coll_request->module->device->mpool, - (mca_mpool_base_registration_t *) coll_request->buffer_info[SBUF].iboffload_reg); - coll_request->buffer_info[SBUF].iboffload_reg = NULL; - - RELEASE_COLLREQ(coll_request); - IBOFFLOAD_VERBOSE(10, ("New bcast done !!!")); - return BCOL_FN_COMPLETE; - } - } - - /* IBOFFLOAD_VERBOSE(10, ("Bcast general progress done")); */ - - /* done */ - return BCOL_FN_STARTED; -} -/* Pasha: I have to move it to static inline later, it looks too ugly for macro */ -#define BINOMIAL_SCATTER( \ - iboffload_module, coll_fragment, \ - last_wait, last_send, \ - distance, \ - my_group_index, \ - segment_size, count \ - ) \ -do { \ - int rc = OMPI_SUCCESS; \ - int dst; \ - int send_size; \ - int send_offset; \ - int delta; \ - int dst_boundary_rank; \ - int radix_mask_pow = distance; \ - int radix_mask = (distance) >= 0 ? 1 << (distance) : 0; \ - IBOFFLOAD_VERBOSE(10, ("BCAST SCATTER %d %d", radix_mask, distance)); \ - \ - while(radix_mask > 0) { \ - /* For each level of tree, do sends */ \ - dst = my_group_index ^ radix_mask; \ - dst_boundary_rank = dst & ((~(int)0) << (radix_mask_pow)); \ - send_offset = segment_size * dst_boundary_rank; \ - /* Pasha: make sure that we handle the corner cases */ \ - delta = count - send_offset; \ - if (OPAL_UNLIKELY(delta <= 0)) { \ - radix_mask >>= 1; \ - radix_mask_pow--; \ - continue; /* we have to send something, other way it will hang */ \ - } else { \ - /* the tail case */ \ - send_size = (int) \ - (delta - (int)segment_size * radix_mask) < 0 ? delta : \ - (int)segment_size * radix_mask; \ - } \ - IBOFFLOAD_VERBOSE(10, ("Scatter data to %d , len %d offset %d", dst, send_size, send_offset)); \ - rc = mca_bcol_iboffload_recv_rtr_setup( \ - &last_wait, dst, iboffload_module, coll_fragment); \ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { \ - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); \ - return OMPI_ERROR; \ - } \ - rc = mca_bcol_iboffload_send_large_buff_setup( \ - &last_send, SBUF, send_offset, send_size, dst, \ - iboffload_module, coll_fragment); \ - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { \ - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); \ - return OMPI_ERROR; \ - } \ - radix_mask >>= 1; \ - radix_mask_pow--; \ - } \ -} while(0) - -static int mca_bcol_iboffload_bcast_scatter_allgather_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - netpatterns_pair_exchange_node_t *recursive_doubling_tree = - &iboffload_module->recursive_doubling_tree; - - int rc, - dst, - group_src, power_of_2_distance, - recv_count; - size_t offset; - int count = coll_request->count * coll_request->dtype->super.size; - int my_group_index = iboffload_module->ibnet->super.my_index; - size_t base_block_size = - (count + iboffload_module->power_of_2_ranks - 1) / - iboffload_module->power_of_2_ranks; - - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - - if (OPAL_UNLIKELY(!iboffload_module->connection_status[RECURSIVE_DOUBLING_TREE_BCAST])) { - bcol_iboffload_setup_binomial_connection(iboffload_module); - } - - /* register memory in mpool/rcache */ - rc = mca_bcol_iboffload_prepare_buffer(coll_request->buffer_info[SBUF].buf, count, - &coll_request->buffer_info[SBUF].iboffload_reg, iboffload_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Cannot register memory: " - "addr - %p, %d bytes.\n", - coll_request->buffer_info[SBUF].buf, count)); - return OMPI_ERROR; - } - - coll_request->buffer_info[SBUF].lkey = coll_request->buffer_info[SBUF].iboffload_reg->mr->lkey; - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, coll_fragment->mq_index, coll_fragment->mq_credits) || - false == opal_list_is_empty(&iboffload_module->collfrag_pending))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - - if (coll_request->root == my_group_index) { - IBOFFLOAD_VERBOSE(10, ("I'm root of the data %d %d", - iboffload_module->power_of_2, recursive_doubling_tree->n_extra_sources )); - /* for proxy we have little bit more work to do */ - if (recursive_doubling_tree->n_extra_sources > 0) { - /* send the all data to your extra peer */ - dst = recursive_doubling_tree->rank_extra_source; - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_recv_rtr_setup")); - return OMPI_ERROR; - } - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, SBUF, 0, count, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_large_buff_setup")); - return OMPI_ERROR; - } - } - power_of_2_distance = iboffload_module->power_of_2; - - BINOMIAL_SCATTER(iboffload_module, coll_fragment, - last_wait, last_send, power_of_2_distance - 1, - my_group_index, base_block_size, count - ); - /* EXIT OR GO TO Gather */ - goto GATHER; - } - - /* prepare and post recv operation */ - group_src = bcol_iboffload_binomial_root_to_src(coll_request->root, - my_group_index, iboffload_module->power_of_2_ranks, - iboffload_module->group_size, &power_of_2_distance); - - IBOFFLOAD_VERBOSE(10, ("SRC %d DIST %d ranks %d gsize %d root %d my rank %d", - group_src, power_of_2_distance, iboffload_module->power_of_2_ranks, - iboffload_module->group_size, - coll_request->root, my_group_index)); - assert(group_src >= 0); - - if (0 > power_of_2_distance) { - /* the rank is virtual root for this group, receive the data - and scatter gather as root */ - power_of_2_distance = - iboffload_module->power_of_2; - offset = 0; - recv_count = count; - IBOFFLOAD_VERBOSE(10, ("Virtual root %d , set mask to %d", - my_group_index, power_of_2_distance)); - } else { - int my_left_boundary_rank; - int delta; - recv_count = base_block_size * (1 << power_of_2_distance); /* we may receive larger data */ - my_left_boundary_rank = my_group_index & ((~(int)0) << power_of_2_distance ); - offset = (size_t) (base_block_size * my_left_boundary_rank); - delta = count - offset; - if (OPAL_UNLIKELY(delta <= 0)) { - /* no data to recv */ - goto GATHER; - } else { - recv_count = (delta < recv_count) ? delta : recv_count; - } - - IBOFFLOAD_VERBOSE(10, ("Recv data set mask to %d", - power_of_2_distance)); - } - - IBOFFLOAD_VERBOSE(10, ("Bcast, receive data from %d[%d], count %d, offset %d", - group_src, recv_count, offset)); - - /* Receive data to user buffer */ - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - group_src, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup send rtr")); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, - SBUF, offset, recv_count, group_src, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - return OMPI_ERROR; - } - - BINOMIAL_SCATTER(iboffload_module, coll_fragment, - last_wait, last_send, power_of_2_distance - 1, - my_group_index, base_block_size, count); - -GATHER: - rc = bcol_iboffload_bcast_binomial_gather(iboffload_module, - &last_send, &last_wait, coll_fragment, - count, base_block_size, power_of_2_distance); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup gather. Return %d", rc)); - return rc; - } - - if (recursive_doubling_tree->n_extra_sources > 0 && - iboffload_module->power_of_2 != power_of_2_distance) { - dst = recursive_doubling_tree->rank_extra_source; - - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_recv_rtr_setup")); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, SBUF, 0, count, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_large_buff_setup")); - return OMPI_ERROR; - } - } - - IBOFFLOAD_VERBOSE(10, ("Fill in the the rest of the coll_fragment.\n")); - - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - coll_request->n_fragments += 1; - coll_request->n_frags_sent += 1; - - if (NULL != last_wait) { - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } else { - last_send->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_send->wr_id; - last_send->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Barrier, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_bcast_scatter_allgather_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - int rc; - int mq_credits = iboffload_module->power_of_2 * 3 + 4; - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_bcast_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_bcast_scatter_allgather_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_bcast_scatter_allgather_intra was started [%d]\n", rc)); - return rc; -} - -static int mca_bcol_iboffload_bcast_scatter_allgather_extra_exec(mca_bcol_iboffload_module_t *iboffload_module, - mca_bcol_iboffload_collreq_t *coll_request) -{ - netpatterns_pair_exchange_node_t *recursive_doubling_tree = - &iboffload_module->recursive_doubling_tree; - - int rc, dst; - int count = coll_request->count * coll_request->dtype->super.size; - int my_group_index = iboffload_module->ibnet->super.my_index; - struct mqe_task *last_send = NULL, - *last_wait = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = &coll_request->first_collfrag; - - if (OPAL_UNLIKELY(!iboffload_module->connection_status[RECURSIVE_DOUBLING_TREE_BCAST])) { - bcol_iboffload_setup_binomial_connection(iboffload_module); - } - - /* register memory in mpool/rcache */ - rc = mca_bcol_iboffload_prepare_buffer(coll_request->buffer_info[SBUF].buf, count, - &coll_request->buffer_info[SBUF].iboffload_reg, iboffload_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Cannot register memory: " - "addr - %p, %d bytes.\n", - coll_request->buffer_info[SBUF].buf, count)); - return OMPI_ERROR; - } - - coll_request->buffer_info[SBUF].lkey = coll_request->buffer_info[SBUF].iboffload_reg->mr->lkey; - - /* it is estimated mq consumption... */ - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload_module, coll_fragment->mq_index, coll_fragment->mq_credits) || - false == opal_list_is_empty(&iboffload_module->collfrag_pending))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - coll_fragment->tail_next = &coll_fragment->to_post; - - /* send or recv the data */ - - if (coll_request->root == my_group_index) { - IBOFFLOAD_VERBOSE(10, ("I'm root of the data %d", iboffload_module->power_of_2)); - /* send the all data to your extra peer */ - dst = recursive_doubling_tree->rank_extra_source; - rc = mca_bcol_iboffload_recv_rtr_setup( - &last_wait, dst, iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_recv_rtr_setup")); - return OMPI_ERROR; - } - rc = mca_bcol_iboffload_send_large_buff_setup( - &last_send, SBUF, 0, count, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to" - " mca_bcol_iboffload_send_large_buff_setup")); - return OMPI_ERROR; - } - } else { - /* Not root case */ - dst = recursive_doubling_tree->rank_extra_source; - rc = mca_bcol_iboffload_send_rtr_setup(&last_send, - dst, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup send rtr")); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_recv_large_buff_setup(&last_wait, - SBUF, 0, count, dst, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - return OMPI_ERROR; - } - } - - IBOFFLOAD_VERBOSE(10, ("Fill in the the rest of the coll_fragment.\n")); - - /* end of list */ - *coll_fragment->tail_next = NULL; - - /* finish initializing full message descriptor */ - coll_request->n_fragments += 1; - coll_request->n_frags_sent += 1; - - if (NULL != last_wait) { - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } else { - last_send->flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = last_send->wr_id; - last_send->wr_id = (uint64_t) (uintptr_t) coll_fragment; - } - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload_module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload_module->super, coll_request->order_info); - - IBOFFLOAD_VERBOSE(10, ("Return success.\n")); - - return BCOL_FN_STARTED; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Barrier, adding collfrag to collfrag_pending.\n")); - rc = - mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload_module); - return (OMPI_SUCCESS != rc) ? BCOL_FN_NOT_STARTED : BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_bcast_scatter_allgather_extra_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - int rc; - int mq_credits = iboffload_module->power_of_2 * 3 + 4; - bool if_bcol_last = BCOL_IBOFFLOAD_IS_LAST_CALL(const_args); - mca_bcol_iboffload_collreq_t *coll_request; - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, fn_arguments); - - rc = mca_bcol_iboffload_bcast_init(fn_arguments, iboffload_module, - &coll_request, if_bcol_last, mq_credits, - mca_bcol_iboffload_bcast_scatter_allgather_extra_exec); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - rc = coll_request->progress_fn(iboffload_module, coll_request); - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_bcast_scatter_allgather_extra_intra was started [%d]\n", rc)); - return rc; -} - -int mca_bcol_iboffload_bcast_register(mca_bcol_base_module_t *super) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *) super; - - int my_group_index = iboffload_module->ibnet->super.my_index; - - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register iboffload Bcast.\n")); - - comm_attribs.bcoll_type = BCOL_BCAST; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - if (my_group_index < iboffload_module->power_of_2_ranks) { - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_small_msg_bcast_intra, - mca_bcol_iboffload_small_msg_bcast_progress); - - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_bcast_scatter_allgather_intra, - mca_bcol_iboffload_zero_copy_progress); - - } else { - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_small_msg_bcast_extra_intra, - mca_bcol_iboffload_small_msg_bcast_progress); - - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_bcast_scatter_allgather_extra_intra, - mca_bcol_iboffload_zero_copy_progress); - - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_bcast.h b/ompi/mca/bcol/iboffload/bcol_iboffload_bcast.h deleted file mode 100644 index f283ab65e91..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_bcast.h +++ /dev/null @@ -1,606 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_BCAST_H -#define MCA_BCOL_IBOFFLOAD_BCAST_H - -#include "ompi_config.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -#include "opal/include/opal/types.h" - -BEGIN_C_DECLS - -int mca_bcol_iboffload_small_msg_bcast_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int mca_bcol_iboffload_small_msg_bcast_extra_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args); -int mca_bcol_iboffload_small_msg_bcast_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args); -int mca_bcol_iboffload_bcast_scatter_allgather_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args); -int mca_bcol_iboffload_zero_copy_progress(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args); -int mca_bcol_iboffload_bcast_scatter_allgather_extra_intra(bcol_function_args_t *fn_arguments, - struct mca_bcol_base_function_t *const_args); -int mca_bcol_iboffload_bcast_register(mca_bcol_base_module_t *super); - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_recv_rtr_setup( - struct mqe_task **last_wait, - uint32_t dest_rank, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - /* Wait for RTR message over credit QP */ - fragment = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, dest_rank, - MCA_BCOL_IBOFFLOAD_QP_CREDIT); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get recv frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - task = mca_bcol_iboffload_get_wait_task( - iboffload, dest_rank, 1, fragment, MCA_BCOL_IBOFFLOAD_QP_CREDIT, - iboffload->endpoints[dest_rank]->qps[MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF].qp->lcl_qp); - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get wait task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_send_small_buff_setup( - struct mqe_task **last_send, - size_t len, uint32_t dest_rank, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - mca_bcol_iboffload_collreq_t *coll_request = - coll_fragment->coll_full_req; - - IBOFFLOAD_VERBOSE(10,("Get ml frag that I will send dest rank %d, len %d, lkey %d", - dest_rank, len, iboffload->rdma_block.ib_info.lkey)); - - fragment = mca_bcol_iboffload_get_send_frag(coll_request, dest_rank, - coll_request->qp_index, len, 0, - SBUF, /* this could be problematic */ - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - IBOFFLOAD_VERBOSE(10,("Get an rdma task for dest %d for packet size %d", - dest_rank,len)); - task = mca_bcol_iboffload_get_rdma_task( - dest_rank, 0, - fragment, iboffload, coll_fragment); - - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get send task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - *last_send = &task->element; - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_send_large_buff_setup( - struct mqe_task **last_send, - int buf_index, int offset, - size_t len, uint32_t dest_rank, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - mca_bcol_iboffload_collreq_t *coll_request = - coll_fragment->coll_full_req; - - fragment = mca_bcol_iboffload_get_send_frag(coll_request, dest_rank, - MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF, - len, - offset, buf_index, MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - task = mca_bcol_iboffload_get_send_task( - iboffload, dest_rank, - MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF, - fragment, coll_fragment, NO_INLINE); - - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get send task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - *last_send = &task->element; - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_send_rtr_setup( - struct mqe_task **last_send, - uint32_t dest_rank, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - /* Recv is ready , Send RTR message */ - fragment = mca_bcol_iboffload_get_send_frag(coll_fragment->coll_full_req, - dest_rank, MCA_BCOL_IBOFFLOAD_QP_CREDIT, 0, - 0, RBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - task = mca_bcol_iboffload_get_send_task(iboffload, dest_rank, - MCA_BCOL_IBOFFLOAD_QP_CREDIT, - fragment, coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get send task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - IBOFFLOAD_VERBOSE(10, ("dest_rank - %d. qp index - %d.\n", - dest_rank, MCA_BCOL_IBOFFLOAD_QP_CREDIT)); - - *last_send = &task->element; - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_recv_small_preposted_buff_setup( - struct mqe_task **last_wait, - size_t len, uint32_t dest_rank, - int qp_index, - int nwaits, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - IBOFFLOAD_VERBOSE(10,("Get preposted recv from rank %d", dest_rank)); - - fragment = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, dest_rank, - qp_index); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get recv frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - task = mca_bcol_iboffload_get_wait_task(iboffload, dest_rank, nwaits, - fragment, qp_index, NULL); - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get wait task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - *last_wait = &task->element; - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_recv_small_buff_setup( - struct mqe_task **last_wait, - size_t len, uint32_t dest_rank, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - mca_bcol_iboffload_collreq_t *coll_request = - coll_fragment->coll_full_req; - - IBOFFLOAD_VERBOSE(10, ("Get preposted recv from rank %d", dest_rank)); - - fragment = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, dest_rank, - coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get recv frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - task = mca_bcol_iboffload_get_wait_task(iboffload, dest_rank, 1, - fragment, coll_request->qp_index, NULL); - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get wait task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - *last_wait = &task->element; - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int -mca_bcol_iboffload_recv_large_buff_setup( - struct mqe_task **last_wait, - int buf_index, int offset, - size_t len, uint32_t dest_rank, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *coll_fragment) -{ - int num_preposted; - - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_frag_t *fragment; - - mca_bcol_iboffload_collreq_t *coll_request = coll_fragment->coll_full_req; - - /* Post message to recv queue for large messages */ - fragment = mca_bcol_iboffload_get_ml_frag( - iboffload, MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF, len, - coll_request->buffer_info[buf_index].iboffload_reg->mr->lkey, - (uint64_t)((unsigned char *)coll_request->buffer_info[buf_index].buf + offset)); - if (OPAL_UNLIKELY(NULL == fragment)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get recv frag.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - num_preposted = mca_bcol_iboffload_prepost_ml_recv_frag( - MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF, - dest_rank, fragment, iboffload); - if (0 >= num_preposted) { - IBOFFLOAD_ERROR(("Failed to prepost recv fragments " - "return code - %d; dest_rank - %d", - num_preposted, dest_rank)); - - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - task = mca_bcol_iboffload_get_wait_task(iboffload, dest_rank, 1, - fragment, MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF, NULL); - if (OPAL_UNLIKELY(NULL == task)) { - IBOFFLOAD_VERBOSE(10, ("Failed to get wait task.\n")); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - *last_wait = &task->element; - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, task); - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ -int bcol_iboffload_binomial_root_to_src(int group_root, int my_rank, - int pow2_size, int group_size, int *distance) -{ - int root, relative_rank, src, - pow2_distance = 0, i; - - if (group_root < pow2_size) { - root = group_root; - } else { - /* the source of the data is extra node, - the real root it represented by some rank from - pow2 group */ - root = group_root - pow2_size; - /* shortcut for the case when my rank is root for the group */ - if (my_rank == root) { - *distance = -1; - return group_root; - } - } - - relative_rank = (my_rank - root) < 0 ? my_rank - root + pow2_size : - my_rank - root; - - for (i = 1; i < pow2_size; i<<=1, pow2_distance++) { - if (relative_rank & i) { - src = my_rank ^ i; - if (src >= pow2_size) - src -= pow2_size; - - *distance = pow2_distance; - IBOFFLOAD_VERBOSE(10, ("AAAAA d %d rel %d it %d root %d my %d", *distance, relative_rank, i, root, my_rank)); - return src; - } - } - - /* error case */ - *distance = -1; - return -1; -} - -static inline void bcol_iboffload_setup_binomial_connection(mca_bcol_iboffload_module_t *iboffload) -{ - netpatterns_pair_exchange_node_t *my_exchange_node = - &iboffload->recursive_doubling_tree; - - int i, n_exchanges = my_exchange_node->n_exchanges, - *exchanges = my_exchange_node->rank_exchanges, - n_extra_src = my_exchange_node->n_extra_sources, - my_rank = iboffload->ibnet->super.my_index, - rank_extra_src = my_exchange_node->rank_extra_source; - - mca_bcol_iboffload_endpoint_t *ep; - - IBOFFLOAD_VERBOSE(10, ("Open connections.\n")); - - if (0 < n_extra_src) { - ep = iboffload->endpoints[rank_extra_src]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - -#if OPAL_ENABLE_DEBUG - { - int qp_index, num_qps = mca_bcol_iboffload_component.num_qps; - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - assert(NULL != ep->qps[qp_index].qp->lcl_qp); - IBOFFLOAD_VERBOSE(10, ("Endpoint - %p, QP index - %d: qp num - %x.", - ep, qp_index, ep->qps[qp_index].qp->lcl_qp->qp_num)); - } - } -#endif - - /* Connect to all extra nodes */ - if (EXTRA_NODE == my_exchange_node->node_type) { - for (i = iboffload->power_of_2_ranks; - i < iboffload->num_endpoints; ++i) { - if (i != my_rank) { - ep = iboffload->endpoints[i]; - - IBOFFLOAD_VERBOSE(10, ("subgroup rank %d: Connect to rank %d.\n", my_rank, i)); - - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - -#if OPAL_ENABLE_DEBUG - { - int qp_index, num_qps = mca_bcol_iboffload_component.num_qps; - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - assert(NULL != ep->qps[qp_index].qp->lcl_qp); - IBOFFLOAD_VERBOSE(10, ("Endpoint - %p, QP index - %d: qp num - %x.", - ep, qp_index, ep->qps[qp_index].qp->lcl_qp->qp_num)); - } - } -#endif - } - } - } - } - - for (i = 0; i < n_exchanges; ++i) { - ep = iboffload->endpoints[exchanges[i]]; - - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - -#if OPAL_ENABLE_DEBUG - { - int qp_index, num_qps = mca_bcol_iboffload_component.num_qps; - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - assert(NULL != ep->qps[qp_index].qp->lcl_qp); - IBOFFLOAD_VERBOSE(10, ("Endpoint - %p, QP index - %d: qp num - %x.", - ep, qp_index, ep->qps[qp_index].qp->lcl_qp->qp_num)); - } - } -#endif - } - /* set the connection status to connected */ - iboffload->connection_status[RECURSIVE_DOUBLING_TREE_BCAST] = true; -} - -static inline __opal_attribute_always_inline__ -int bcol_iboffload_bcast_binomial_gather(mca_bcol_iboffload_module_t *iboffload_module, - struct mqe_task **last_send, struct mqe_task **last_wait, - mca_bcol_iboffload_collfrag_t *coll_fragment, - int count, int base_block_size, int radix_mask_pow) -{ - int rc; - int i; - int my_group_index = iboffload_module->ibnet->super.my_index; - int delta, rdelta; - - IBOFFLOAD_VERBOSE(10, ("bcol_iboffload_bcast_binomial_gather %d %d", - radix_mask_pow, my_group_index)); - - /* we assume the iteration #iteration already was completed with probe */ - for (i = 0; i < iboffload_module->power_of_2; i++) { - int pow2 = 1 << i; - int peer_index = my_group_index ^ pow2; - int slen, rlen, - send_offset, - recv_offset; - - if (i > radix_mask_pow) { - slen = rlen = pow2 * base_block_size; - send_offset = base_block_size * ((my_group_index) & ((~(int)0) << i)); - recv_offset = base_block_size * ((peer_index) & ((~(int)0) << i)); - - rdelta = count - recv_offset; - if (rdelta > 0) { - IBOFFLOAD_VERBOSE(10, ("Recv1 [ pow2 %d, radix %d ] offset %d , len %d , dest %d", - pow2, 1 << iboffload_module->power_of_2, - recv_offset, rlen, peer_index)); - - rc = mca_bcol_iboffload_send_rtr_setup(last_send, - peer_index, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup send rtr")); - return OMPI_ERROR; - } - } - - delta = count - send_offset; - if (delta > 0) { - if (delta < slen) { - /* recv the tail */ - slen = delta; - } - - IBOFFLOAD_VERBOSE(10, ("Send1 [ pow2 %d, radix %d ] offset %d , len %d , dest %d", - pow2, 1 << iboffload_module->power_of_2, - send_offset, slen, peer_index)); - rc = mca_bcol_iboffload_recv_rtr_setup(last_wait, peer_index, iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_send_large_buff_setup(last_send, SBUF, send_offset, slen, peer_index, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); - return OMPI_ERROR; - } - } - - if (rdelta > 0) { - if (rdelta < rlen) { - /* recv the tail */ - rlen = rdelta; - } - - rc = mca_bcol_iboffload_recv_large_buff_setup(last_wait, - SBUF, recv_offset, rlen, peer_index, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - return OMPI_ERROR; - } - } - - } else if (i == radix_mask_pow) { - /* only receive data */ - rlen = pow2 * base_block_size; - recv_offset = base_block_size * ((peer_index) & ((~(int)0) << i)); - delta = count - recv_offset; - if (0 >= delta) { - /* we have nothing to send, skip the iteration */ - continue; - } - if (delta < rlen) { - /* recv the tail */ - rlen = delta; - } - /* receive data from the peer */ - IBOFFLOAD_VERBOSE(10, ("Recv2 [ pow2 %d, radix %d ] offset %d , len %d , dest %d", - pow2, - 1 << iboffload_module->power_of_2, - recv_offset, - rlen, peer_index)); - rc = mca_bcol_iboffload_send_rtr_setup(last_send, - peer_index, iboffload_module, - coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup send rtr")); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_recv_large_buff_setup(last_wait, - SBUF, recv_offset, rlen, peer_index, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to setup data receive")); - return OMPI_ERROR; - } - } else if (i < radix_mask_pow) { - /* Only send data */ - slen = pow2 * base_block_size; - send_offset = base_block_size * ((my_group_index) & ((~(int)0) << i)); - delta = count - send_offset; - if (0 >= delta) { - /* we have nothing to send, skip the iteration */ - continue; - } - - if (delta < slen) { - slen = delta; - } - - IBOFFLOAD_VERBOSE(10, ("Send2 [ pow2 %d, radix %d ] offset %d , len %d , dest %d", - pow2, - 1 << iboffload_module->power_of_2, - send_offset, - slen, - peer_index)); - - rc = mca_bcol_iboffload_recv_rtr_setup(last_wait, peer_index, iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_send_large_buff_setup(last_send, SBUF, send_offset, slen, peer_index, - iboffload_module, coll_fragment); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Failed to isend data")); - return OMPI_ERROR; - } - } - } - - return OMPI_SUCCESS; -} - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.c b/ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.c deleted file mode 100644 index dc447d879d9..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include - -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" - -static void -collfrag_constructor(struct mca_bcol_iboffload_collfrag_t *collfrag) -{ - collfrag->n_sends = 0; - collfrag->n_sends_completed = 0; - - memset(collfrag->pre_posted_recvs, 0, - sizeof(struct mca_bcol_iboffload_task_t *) * MAX_MQE_TASKS); - - collfrag->signal_task_wr_id = (uint64_t) 0; - collfrag->complete = false; - - collfrag->seq_n = -1; - collfrag->coll_full_req = NULL; - - collfrag->unpack_size = 0; - - collfrag->tasks_posted = 0; - collfrag->to_post = NULL; - collfrag->task_next = NULL; - collfrag->tasks_to_release = NULL; - - collfrag->in_pending_list = false; -} - -static void -collfrag_destruct(struct mca_bcol_iboffload_collfrag_t *collfrag) -{ -} - -OBJ_CLASS_INSTANCE(mca_bcol_iboffload_collfrag_t, - ompi_free_list_item_t, - collfrag_constructor, - collfrag_destruct); diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.h b/ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.h deleted file mode 100644 index 3be53aacaac..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_collfrag.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_COLLFRAG_H -#define MCA_BCOL_IBOFFLOAD_COLLFRAG_H - -#include "ompi_config.h" - -#include -#include -#include - -#include "bcol_iboffload.h" - -#include "opal/class/ompi_free_list.h" - -BEGIN_C_DECLS - -#define MAX_MQE_TASKS 128 /* Pasha - do we want to make it dynamic ?*/ - -struct mca_bcol_iboffload_task_t; -struct mca_bcol_iboffload_collreq_t; - -/* collective fragment descriptor */ -struct mca_bcol_iboffload_collfrag_t { - ompi_free_list_item_t super; - - /* number of asynchronous sends scheduled */ - uint32_t n_sends; - - /* number of sends completed */ - uint32_t n_sends_completed; - - /* Algorithm ID that was user for this fragment*/ - int32_t alg; - - /* pre-posted receive sources */ - struct mca_bcol_iboffload_task_t *pre_posted_recvs[MAX_MQE_TASKS]; - - /* cache here pointer to signaled task */ - uint64_t signal_task_wr_id; - - /* mwr completion from the mcq */ - volatile bool complete; - - /* sequence number - we use it for - correct ordering of resources release */ - uint32_t seq_n; - - /* pointer to the full collective request descriptor */ - struct mca_bcol_iboffload_collreq_t *coll_full_req; - - size_t unpack_size; - - bool in_pending_list; - - /* Num of posted tasks */ - int tasks_posted; - - /* Pointer to head of not posted elements list */ - struct mqe_task *to_post; - - /* Pointer to tail next */ - struct mqe_task **tail_next; - - /* List of the all tasks of this coll frag */ - struct mca_bcol_iboffload_task_t *tasks_to_release; - - /* Pointer to the next elem in All tasks list */ - struct mca_bcol_iboffload_task_t **task_next; - - /* Num of needed mq credits */ - int mq_credits; - - /* MQ index, that used for this frag */ - int mq_index; - - /* - * Last wait sequence number; zero i.e. - * there isn't any wait in the coll request - */ - int32_t last_wait_num; - /* fragment descriptor for non contiguous data */ - bcol_fragment_descriptor_t *bcol_frag_info; - /* frag-len of ml buffer */ - int frag_len; -}; -typedef struct mca_bcol_iboffload_collfrag_t mca_bcol_iboffload_collfrag_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_collfrag_t); - -static inline __opal_attribute_always_inline__ - void mca_bcol_iboffload_collfrag_init( - mca_bcol_iboffload_collfrag_t *cf) -{ - /* init the request */ - cf->n_sends = 0; - cf->complete = false; - cf->n_sends_completed = 0; - cf->alg = -1; - cf->in_pending_list = false; - cf->tail_next = NULL; - cf->tasks_posted = 0; - cf->to_post = NULL; - cf->mq_credits = 0; - cf->mq_index = 0; - cf->tasks_to_release = NULL; - cf->task_next = &cf->tasks_to_release; - cf->last_wait_num = 0; -} - -static inline __opal_attribute_always_inline__ - struct mca_bcol_iboffload_collfrag_t * - mca_bcol_iboffload_get_collfrag(void) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_collfrag_t *cf; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - /* blocking allocation for collectives fragment */ - OMPI_FREE_LIST_GET_MT(&cm->collfrags_free, item); - if (OPAL_UNLIKELY(NULL == item)) { - IBOFFLOAD_ERROR(("Failed to allocated collfrag.\n")); - return NULL; - } - - cf = (mca_bcol_iboffload_collfrag_t*) item; - mca_bcol_iboffload_collfrag_init(cf); - - return cf; -} - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_collreq.c b/ompi/mca/bcol/iboffload/bcol_iboffload_collreq.c deleted file mode 100644 index bae677bb510..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_collreq.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "bcol_iboffload_collreq.h" - -static void -collreq_construct(struct mca_bcol_iboffload_collreq_t *collreq) -{ - int i; - collreq->n_fragments = 0; - collreq->n_frag_mpi_complete = 0; - collreq->n_frag_net_complete = 0; - collreq->user_handle_freed = false; - - for (i = 0; i < BCOL_IBOFFLOAD_BUFFERS; i++) { - collreq->buffer_info[i].buf = NULL; - collreq->buffer_info[i].offset = 0; - collreq->buffer_info[i].iboffload_reg = NULL; - } - - OBJ_CONSTRUCT(&collreq->work_requests, opal_list_t); - OBJ_CONSTRUCT(&collreq->first_collfrag, mca_bcol_iboffload_collfrag_t); - - OBJ_CONSTRUCT(&collreq->send_convertor, opal_convertor_t); - OBJ_CONSTRUCT(&collreq->recv_convertor, opal_convertor_t); -} - -static void -collreq_destruct(struct mca_bcol_iboffload_collreq_t *collreq) -{ - OBJ_DESTRUCT(&collreq->work_requests); - OBJ_DESTRUCT(&collreq->first_collfrag); - - OBJ_DESTRUCT(&collreq->send_convertor); - OBJ_DESTRUCT(&collreq->recv_convertor); -} - -OBJ_CLASS_INSTANCE(mca_bcol_iboffload_collreq_t, - ompi_request_t, - collreq_construct, - collreq_destruct); diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_collreq.h b/ompi/mca/bcol/iboffload/bcol_iboffload_collreq.h deleted file mode 100644 index 31344009d3b..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_collreq.h +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_COLLREQ_H -#define MCA_BCOL_IBOFFLOAD_COLLREQ_H - -#include "ompi_config.h" - -#include -#include -#include - -#include "opal/class/ompi_free_list.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_device.h" -#include "bcol_iboffload_collfrag.h" - -#define SBUF 0 -#define RBUF 1 - -#define BCOL_IBOFFLOAD_BUFFERS 2 - -BEGIN_C_DECLS - -struct mca_bcol_iboffload_reg_t; - -/* - * collective progress function - */ -typedef int (*collective_message_progress_function)( - struct mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *full_message_descriptor); -/* - * callback function to be called after the collective work request - * completes. This is invoked in user-space, and is typically where - * data may be copied out of library buffers, or when any other user- - * level protocol may be completed - * - * input: - * callback data: typically, this may be the work request just finished - */ -typedef int (*collective_message_completion_callback_function)( - void *callback_data); - -struct mca_bcol_iboffload_buff_info { - void *buf; - size_t offset; - uint32_t lkey; - struct mca_bcol_iboffload_reg_t *iboffload_reg; -}; -typedef struct mca_bcol_iboffload_buff_info mca_bcol_iboffload_buff_info; - -/* - * Collective message descriptor - * the mca_bcol_iboffload_message_desc_t was replaced with mca_bcol_iboffload_collreq_t - * ************************************************************************************************* - * - * Brief description of iboffload collective request dependencies: - * - * mca_bcol_iboffload_collreq_t <----<< Full coll request - * | - * --(0)-- mca_bcol_iboffload_collfrag_t <----<< Fragment of coll request ( for example - * | | 10MB Bcast maybe split to 2MB fragments ) - * | | - * | --(0)-- mca_bcol_iboffload_task_t---mqe_task - * | | | - * | | ---mca_bcol_iboffload_frag_t---ibv_sge - * | --(1)-- mca_bcol_iboffload_task_t---mqe_task - * | | | - * | | ---mca_bcol_iboffload_frag_t---ibv_sge - * | ..(M).. - * | - * --(1)-- mca_bcol_iboffload_collfrag_t - * | - * ..(N).. - * - * ************************************************************************************************* - */ - -struct mca_bcol_iboffload_collreq_t { - ompi_request_t super; - - /* op type */ - struct ompi_op_t *op; - - /* Sometimes the operation that should be performed - by the IB is different than the mpi_op and is then set - by the pack_data_for_calc function */ - enum ibv_m_wr_calc_op actual_ib_op; - - /* Sometimes the data type that should be used by the IB - to peroform the calc s different than the mpi dtype, - and is then set by the pack_data_for_calc function */ - enum ibv_m_wr_data_type actual_ib_dtype; - - /* data type */ - struct ompi_datatype_t *dtype; - - /* convertor for send operation */ - opal_convertor_t send_conv; - - /* convertor for recv operation */ - opal_convertor_t recv_conv; - - /* - * count (in data type units) - */ - uint64_t count; - - /* - * root of collective operation - */ - int root; - - /* number of message fragments */ - int n_fragments; - - /* number of fragments sent - all resrouces for a fragment are allocated - * or none at all are - */ - int n_frags_sent; - - /* number of fragments completed from the MPI perspective */ - int n_frag_mpi_complete; - - /* number of fragments completed from a network perspective */ - int n_frag_net_complete; - - /* collective free and may be released - message complete from the - ** MPI perspective, the network prespective, and the user is done - ** with the message handle */ - volatile bool user_handle_freed; - - /* list of collective fragements - only 1 for now */ - opal_list_t work_requests; - - /* message progress function */ - collective_message_progress_function progress_fn; - - /* work request completion callback function */ - collective_message_completion_callback_function completion_cb_fn; - - /* index of qp with enough length of buffs for this collective */ - int qp_index; - - bool if_bcol_last; - - /* The flag is used for the last bcol to indicate if the calculation should be done by the cpu */ - bool do_calc_in_cpu; - - /* in Allreduce case, if (true == do_calc_in_cpu) => - the final result will be calc on local CPU */ - uint64_t l_operand; - uint64_t r_operand; - - /* caching ML-rdma buffer descriptor */ - mca_bcol_iboffload_rdma_buffer_desc_t *ml_rdma_desc; - - /* ML buffer index code */ - int ml_buffer_index; - - /* In the current implementation the collrequest connected to 1 single - iboffload module */ - struct mca_bcol_iboffload_module_t *module; - - mca_bcol_iboffload_collfrag_t first_collfrag; - - /* Send/recv buffs info - user buffers registration if needed etc. */ - mca_bcol_iboffload_buff_info buffer_info[BCOL_IBOFFLOAD_BUFFERS]; - - /* My bi nominal tree children in this collective */ - int *bi_nominal_tree_children; - - /* Convertors for send/recv if needed */ - opal_convertor_t send_convertor; - opal_convertor_t recv_convertor; - - /* Order info from upper layer */ - mca_bcol_base_order_info_t *order_info; -}; -typedef struct mca_bcol_iboffload_collreq_t mca_bcol_iboffload_collreq_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_collreq_t); - -#define COLLREQ_IS_DONE(cr) (cr->user_handle_freed && \ - (cr->n_frag_mpi_complete == cr->n_fragments) && \ - (cr->n_frag_net_complete == cr->n_fragments)) - -#define RELEASE_COLLREQ(cr) \ -do { \ - (cr)->user_handle_freed = false; \ - OMPI_FREE_LIST_RETURN_MT(&mca_bcol_iboffload_component.collreqs_free, \ - (ompi_free_list_item_t *) (cr)); \ -} while (0) - -static inline __opal_attribute_always_inline__ - int mca_bcol_iboffload_free_resources_and_move_to_pending( - mca_bcol_iboffload_collfrag_t *coll_fragment, - mca_bcol_iboffload_module_t *iboffload) -{ - int rc = mca_bcol_iboffload_free_tasks_frags_resources(coll_fragment, - iboffload->device->frags_free); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - - IBOFFLOAD_VERBOSE(10, ("iboffload - %p, coll_fragment - %p, " - "coll frag in_pending_list ? - %d, pending_list size - %d.\n", - iboffload, coll_fragment, coll_fragment->in_pending_list, - opal_list_get_size(&iboffload->collfrag_pending))); - - BCOL_IBOFFLOAD_MQ_RETURN_CREDITS(iboffload, coll_fragment->mq_index, coll_fragment->mq_credits); - - /* Remove coll frag from coll request opal_list */ - opal_list_remove_item(&coll_fragment->coll_full_req->work_requests, - (opal_list_item_t *) coll_fragment); - - if (false == coll_fragment->in_pending_list) { - /* Put the collfrag on pending list */ - coll_fragment->in_pending_list = true; - opal_list_append(&iboffload->collfrag_pending, - (opal_list_item_t *) coll_fragment); - } else { - /* The item is already on pending list => - insert it first that not break order - between frags on the list */ - opal_list_prepend(&iboffload->collfrag_pending, - (opal_list_item_t *) coll_fragment); - } - - return OMPI_SUCCESS; -} - -/* Forward declaration */ -struct mca_bcol_iboffload_reg_t; -static inline __opal_attribute_always_inline__ - int mca_bcol_iboffload_prepare_buffer( - void *buffer, - size_t size, - struct mca_bcol_iboffload_reg_t **registration_handler, - mca_bcol_iboffload_module_t *iboffload) -{ - int rc; - mca_mpool_base_registration_t *reg = NULL; - - assert(size > 0); - rc = iboffload->device->mpool->mpool_register( - iboffload->device->mpool, - buffer, size, - (uint32_t) 0 /* flags */, - ®); - - *registration_handler = - (struct mca_bcol_iboffload_reg_t *) reg; - - return rc; -} - -int mca_bcol_iboffload_coll_req_implement( - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request); - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_component.c b/ompi/mca/bcol/iboffload/bcol_iboffload_component.c deleted file mode 100644 index dbf3f6c21fe..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_component.c +++ /dev/null @@ -1,1076 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include - -#include - -#include "ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "opal/mca/mpool/base/base.h" -#include "ompi/mca/common/ofacm/connect.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/common/ofacm/base.h" -#include "ompi/mca/common/verbs/common_verbs.h" - -#include "opal/util/argv.h" -#include "opal/include/opal/types.h" - -#include "bcol_iboffload_mca.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_device.h" -#include "bcol_iboffload_qp_info.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" - -/* - * Public string showing the bcol ompi_sm V2 component version number - */ -const char *mca_bcol_iboffload_component_version_string = - "Open MPI bcol - iboffload collective MCA component version " OMPI_VERSION; - -/* - * Local functions - */ - -static int setup_qps(void); -static int iboffload_open(void); -static int iboffload_close(void); - -#define GET_IB_DTYPE_BY_CTYPE(ctype, is_int, ib_dtype) \ -do { \ - switch (sizeof(ctype)) { \ - case 1: \ - ib_dtype = ((is_int) ? IBV_M_DATA_TYPE_INT8 : IBV_M_DATA_TYPE_INVALID); \ - break; \ - case 2: \ - ib_dtype = ((is_int) ? IBV_M_DATA_TYPE_INT16 : IBV_M_DATA_TYPE_INVALID); \ - break; \ - case 4: \ - ib_dtype = ((is_int) ? IBV_M_DATA_TYPE_INT32 : IBV_M_DATA_TYPE_FLOAT32); \ - break; \ - case 8: \ - ib_dtype = ((is_int) ? IBV_M_DATA_TYPE_INT64 : IBV_M_DATA_TYPE_FLOAT64); \ - break; \ - default: \ - ib_dtype = IBV_M_DATA_TYPE_INVALID; \ - } \ -} while (0) - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ -mca_bcol_iboffload_component_t mca_bcol_iboffload_component = { - - /* First, fill in the super */ - - .super = { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .bcol_version = { - MCA_BCOL_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "iboffload", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = iboffload_open, - .mca_close_component = iboffload_close, - .mca_register_component_params = mca_bcol_iboffload_register_params, - }, - - .collm_init_query = mca_bcol_iboffload_init_query, - .collm_comm_query = mca_bcol_iboffload_comm_query, - .coll_support = mca_bcol_iboffload_coll_supported, - .coll_support_all_types = mca_bcol_iboffload_coll_support_all_types, - .init_done = false, - .need_ordering = true, /* collective calls with iboffload should to be ordered */ - }, - /* iboffload-component specifc information */ - .verbose = 0, /* verbose */ - .num_qps = 0, /* number of qps to use */ - .warn_default_gid_prefix = false, /* warn_default_gid_prefix */ - .warn_nonexistent_if = false, /* warn_nonexistent_if */ - .free_list_num = 0, /* free_list_num */ - .free_list_max = 0, /* free_list_max */ - .free_list_inc = 0, /* free_list_inc */ - .mpool_name = NULL, /* mpool_name */ - .cq_size = 0, /* cq_size */ - .max_inline_data = 0, /* max_inline_data */ - .pkey_val = 0, /* pkey_val */ - .qp_ous_rd_atom = 0, /* qp_ous_rd_atom */ - .mtu = 0, /* mtu */ - .min_rnr_timer = 0, /* min_rnr_timer */ - .timeout = 0, /* timeout */ - .retry_count = 0, /* retry_count */ - .rnr_retry = 0, /* rnr_retry */ - .max_rdma_dst_ops = 0, /* max_rdma_dst_ops */ - .service_level = 0, /* service_level */ - .buffer_alignment = 0, /* buffer_alignment */ - .max_mqe_tasks = 0, /* max_mqe_tasks */ - .max_mq_size = 0, /* max_mq_size */ - .if_include = NULL, /* if_include */ - .if_include_list = NULL, /* if_include_list */ - .if_exclude = NULL, /* if_exclude */ - .if_exclude_list = NULL, /* if_exclude_list */ - .if_list = NULL, /* if_list */ - .ib_devs = NULL, /* ib_devs */ - .num_devs = 0, /* num_devs */ - .receive_queues = NULL, /* receive_queues */ -}; - -static int mca_bcol_iboffload_dummy_init_query( - bool enable_progress_threads, bool enable_mpi_threads) -{ - return OMPI_SUCCESS; -} - -static void mca_bcol_iboffload_device_constructor - (mca_bcol_iboffload_device_t *device) -{ - /* Init OFACM stuf */ - device->dev.ib_dev = NULL; - device->dev.ib_dev_context = NULL; - device->dev.capabilities = 0; - /* device->dev.type = MCA_COMMON_OFACM_COLL;*/ - /* Init other stuff */ - device->ib_pd = NULL; - device->ib_cq = NULL; - device->ports = NULL; - - device->mpool = NULL; - device->ib_mq_cq = NULL; - device->frags_free = NULL; - - device->activated = false; - device->num_act_ports = 0; - - memset(&device->ib_dev_attr, 0, sizeof(struct ibv_device_attr)); - memset(&device->dummy_reg, 0, sizeof( mca_bcol_iboffload_reg_t)); -} - -static void mca_bcol_iboffload_device_destructor - (mca_bcol_iboffload_device_t *device) -{ - int qp_index, num_qps = mca_bcol_iboffload_component.num_qps; - - IBOFFLOAD_VERBOSE(10, ("Device %s will be destroyed.\n", - ibv_get_device_name(device->dev.ib_dev))); - - if (NULL != device->frags_free) { - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - mca_bcol_iboffload_dealloc_qps_resource_fn_t dealloc_resource = - mca_bcol_iboffload_component.qp_infos[qp_index].dealloc_resource; - if (NULL != dealloc_resource) { - dealloc_resource(qp_index, device); - } - } - - free(device->frags_free); - } - - if (NULL != device->mpool) { - IBOFFLOAD_VERBOSE(10, ("Mpool destroy - %p.\n", device->mpool)); - if (OMPI_SUCCESS != mca_mpool_base_module_destroy(device->mpool)) { - IBOFFLOAD_ERROR(("Device %s, failed to destroy mpool", - ibv_get_device_name(device->dev.ib_dev))); - } - } - - if (NULL != device->dummy_reg.mr) { - IBOFFLOAD_VERBOSE(10, ("Dummy memory MR unregister - %p.\n", device->dummy_reg.mr)); - if (OMPI_SUCCESS != - mca_bcol_iboffload_deregister_mr((void *) device, &device->dummy_reg.base)) { - IBOFFLOAD_ERROR(("Device %s: failed to unregister dummy memory MR.", - ibv_get_device_name(device->dev.ib_dev))); - } - } - - if (NULL != device->ib_cq) { - if (ibv_destroy_cq(device->ib_cq)) { - IBOFFLOAD_ERROR(("Device %s, failed to destroy CQ, errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - } - } - - if (NULL != device->ib_mq_cq) { - if (ibv_destroy_cq(device->ib_mq_cq)) { - IBOFFLOAD_ERROR(("Device %s, failed to destroy mq CQ, errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - } - } - - /* Release IB PD if we have one */ - if (NULL != device->ib_pd) { - if(ibv_dealloc_pd(device->ib_pd)){ - IBOFFLOAD_ERROR(("Device %s, failed to release PD, errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - } - } - - /* close the device */ - if (NULL != device->dev.ib_dev_context) { - if (ibv_close_device(device->dev.ib_dev_context)) { - IBOFFLOAD_ERROR(("Device %s " - ", failed to close the device, errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - } - } - - /* release memory */ - if (NULL != device->ports) { - free(device->ports); - } -} - -OBJ_CLASS_INSTANCE(mca_bcol_iboffload_device_t, - opal_list_item_t, - mca_bcol_iboffload_device_constructor, - mca_bcol_iboffload_device_destructor); - -int mca_bcol_iboffload_coll_supported(int op, int dtype, bcol_elem_type elem_type) -{ - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - return (IBV_M_DATA_TYPE_INVALID != cm->map_ompi_to_ib_dt[dtype]) && - (IBV_M_CALC_OP_INVALID != cm->map_ompi_to_ib_calcs[op]) && - (BCOL_SINGLE_ELEM_TYPE == elem_type); -} - -int mca_bcol_iboffload_coll_support_all_types(bcol_coll coll_name) -{ - return BCOL_ALLREDUCE ^ coll_name; -} - -/* Unload devices */ -static int iboffload_release_devices(void) -{ - int i; - mca_bcol_iboffload_device_t *device = NULL; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - opal_pointer_array_t *devs = &cm->devices; - - IBOFFLOAD_VERBOSE(10, ("Destroy all devices.\n")); - - for (i = 0; i < cm->num_devs; i++) { - device = opal_pointer_array_get_item(devs, i); - - IBOFFLOAD_VERBOSE(10, ("Device %s with index %d will be destroyed.\n", - ibv_get_device_name(device->dev.ib_dev), i)); - if (NULL != device) { - OBJ_RELEASE(device); - } - } - - IBOFFLOAD_VERBOSE(10, ("All devices were destroyed.\n")); - - opal_pointer_array_remove_all(devs); - OBJ_DESTRUCT(devs); - - /* release device list */ - /*ibv_free_device_list_compat(cm->ib_devs);*/ - ompi_ibv_free_device_list(cm->ib_devs); - cm->ib_devs = NULL; - - IBOFFLOAD_VERBOSE(10, ("All devices destroyed.\n")); - - return OMPI_SUCCESS; -} - -/* Create list of IB HCA that have active port */ -static int iboffload_load_devices(void) -{ - int num_devs = 0, i; - mca_bcol_iboffload_device_t *device = NULL; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Entering to iboffload_load_devices")); - - /* Get list of devices */ - /*cm->ib_devs = ibv_get_device_list_compat(&num_devs);*/ - cm->ib_devs = ompi_ibv_get_device_list(&num_devs); - if (0 == num_devs || NULL == cm->ib_devs) { - IBOFFLOAD_ERROR(("No IB devices found")); - /* No hca error*/ - opal_show_help("help-mpi-btl-base.txt", "btl:no-nics", true); - return OMPI_ERROR; - } - - cm->num_devs = num_devs; - - for (i = 0; i < num_devs; i++) { - device = OBJ_NEW(mca_bcol_iboffload_device_t); - if (NULL != device) { - opal_pointer_array_set_item(&cm->devices, i, (void *) device); - device->dev.ib_dev = cm->ib_devs[i]; - - IBOFFLOAD_VERBOSE(10, ("Device %s with index %d was appended.\n", - ibv_get_device_name(device->dev.ib_dev), i)); - } - } - - if (0 == opal_pointer_array_get_size(&cm->devices)) { - /* No relevand devices were found, return error */ - IBOFFLOAD_ERROR(("No active devices found.\n")); - - return OMPI_ERROR; - } - - return OMPI_SUCCESS; -} - -static void map_ompi_to_ib_dtype(void) -{ - int dt; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - for (dt = 0; dt < OMPI_DATATYPE_MAX_PREDEFINED; ++dt) { - cm->map_ompi_to_ib_dt[dt] = IBV_M_DATA_TYPE_INVALID; - } - - GET_IB_DTYPE_BY_CTYPE(char, true, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_SIGNED_CHAR]); - - GET_IB_DTYPE_BY_CTYPE(short, true, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_SHORT]); - GET_IB_DTYPE_BY_CTYPE(int, true, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_INT]); - GET_IB_DTYPE_BY_CTYPE(long, true, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_LONG]); - GET_IB_DTYPE_BY_CTYPE(long long, true, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_LONG_LONG]); - GET_IB_DTYPE_BY_CTYPE(float, false, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_FLOAT]); - GET_IB_DTYPE_BY_CTYPE(double, false, cm->map_ompi_to_ib_dt[OMPI_DATATYPE_MPI_DOUBLE]); - - /* Check (only in DEBUG mode) if size of double equal to 64 bit */ - assert(8 == sizeof(double)); -} - -static void map_ompi_to_ib_op_type(void) -{ - int op; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - for (op = 0; op < OMPI_OP_NUM_OF_TYPES; ++op) { - cm->map_ompi_to_ib_calcs[op] = IBV_M_CALC_OP_INVALID; - } - - cm->map_ompi_to_ib_calcs[OMPI_OP_MAX] = IBV_M_CALC_OP_MAX; - cm->map_ompi_to_ib_calcs[OMPI_OP_MIN] = IBV_M_CALC_OP_MIN; - cm->map_ompi_to_ib_calcs[OMPI_OP_SUM] = IBV_M_CALC_OP_ADD; - - cm->map_ompi_to_ib_calcs[OMPI_OP_LAND] = IBV_M_CALC_OP_LAND; - cm->map_ompi_to_ib_calcs[OMPI_OP_BAND] = IBV_M_CALC_OP_BAND; - cm->map_ompi_to_ib_calcs[OMPI_OP_LOR] = IBV_M_CALC_OP_LOR; - cm->map_ompi_to_ib_calcs[OMPI_OP_BOR] = IBV_M_CALC_OP_BOR; - cm->map_ompi_to_ib_calcs[OMPI_OP_LXOR] = IBV_M_CALC_OP_LXOR; - cm->map_ompi_to_ib_calcs[OMPI_OP_BXOR] = IBV_M_CALC_OP_BXOR; -} - -/* - * Open the component - */ -static int iboffload_open(void) -{ - int rc; - - /* local variables */ - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Open Iboffload component.\n")); - - (void) mca_bcol_iboffload_verify_params(); - - cm->super.priority = 100; - cm->super.n_net_contexts = 0; - cm->super.network_contexts = NULL; - - OBJ_CONSTRUCT(&cm->recv_wrs.lock, opal_mutex_t); - - /* construct lists */ - OBJ_CONSTRUCT(&cm->devices, opal_pointer_array_t); - rc = opal_pointer_array_init(&cm->devices, 10, INT_MAX, 10); - if (OMPI_SUCCESS != rc) { - goto close_device; - } - - /* Check MCA parameters */ - if (0 != (mca_bcol_iboffload_component.exchange_tree_order & (mca_bcol_iboffload_component.exchange_tree_order - 1))) { - IBOFFLOAD_ERROR(("Warning: ibcol_iboffload_exchange_tree_order is %d which is not a power of 2, setting it to 2", - mca_bcol_iboffload_component.exchange_tree_order)); - mca_bcol_iboffload_component.exchange_tree_order = 2; - } - - /* Pasha: Since we do not have max inline check like in openib, - I will put some dummy check here. All mlnx devices support at least 512b */ - if (mca_bcol_iboffload_component.max_inline_data > 512) { - IBOFFLOAD_ERROR(("Warning the inline %d, is to big and unsupported", - mca_bcol_iboffload_component.max_inline_data)); - rc = OMPI_ERROR; - goto close_device; - } - - /* Register the progress function */ - rc = opal_progress_register(mca_bcol_iboffload_component_progress); - if (OMPI_SUCCESS != rc) { - IBOFFLOAD_ERROR(("Failed to register the progress function" - " for iboffload component.\n")); - goto close_device; - } - - map_ompi_to_ib_dtype(); - map_ompi_to_ib_op_type(); - - /* The init_done set to true on first component usage */ - cm->init_done = false; - - return OMPI_SUCCESS; - -close_device: - OBJ_DESTRUCT(&cm->devices); - OBJ_DESTRUCT(&cm->recv_wrs.lock); - return rc; -} - -/* - * Close the component - */ -static int iboffload_close(void) -{ - int rc; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Destroy component free lists.\n")); - - if (true == cm->init_done) { - OBJ_DESTRUCT(&cm->tasks_free); - OBJ_DESTRUCT(&cm->collreqs_free); - OBJ_DESTRUCT(&cm->collfrags_free); - OBJ_DESTRUCT(&cm->calc_tasks_free); - } - - /* Unregister the progress function */ - rc = opal_progress_unregister(mca_bcol_iboffload_component_progress); - if (OMPI_SUCCESS != rc) { - IBOFFLOAD_ERROR(("Failed to unregister the progress function" - " for iboffload component.\n")); - } - - rc = iboffload_release_devices(); - if (OMPI_SUCCESS != rc) { - return rc; - } - - if (NULL != cm->receive_queues) { - free(cm->receive_queues); - } - - OBJ_DESTRUCT(&cm->recv_wrs.lock); - - IBOFFLOAD_VERBOSE(10, ("The component closed.\n")); - - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_bcol_iboffload_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - int rc; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Init Iboffload component.\n")); - - /* Get list of HCAs and ports */ - rc = iboffload_load_devices(); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("Load devices error.\n")); - goto unload_devices; - } - - /* Setup the BSRQ QP's based on the final value of - mca_bcol_iboffload_component.receive_queues. */ - rc = setup_qps(); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("QPs setup error.\n")); - goto unload_devices; - } - - cm->super.collm_init_query = mca_bcol_iboffload_dummy_init_query; - - return OMPI_SUCCESS; - - /* done */ -unload_devices: - IBOFFLOAD_ERROR(("Release devices: an error occured.\n")); - - iboffload_release_devices(); - - return rc; -} - -static int32_t atoi_param(char *param, int32_t dflt) -{ - if (NULL == param || '\0' == param[0]) { - return dflt ? dflt : 1; - } - - return atoi(param); -} - -static int setup_qps(void) -{ - int ret = OMPI_SUCCESS, qp = 0; - int rd_num = 0, rd_low = 0, size = 0, - rd_win = 0, rd_rsv = 0, sd_max = 0; - - mca_bcol_iboffload_qp_type_t type = 0; - - char **queues = NULL, **params = NULL; - - queues = opal_argv_split(mca_bcol_iboffload_component.receive_queues, ':'); - if (0 == opal_argv_count(queues)) { - opal_show_help("help-mpi-btl-openib.txt", - "no qps in receive_queues", true, - ompi_process_info.nodename, - mca_bcol_iboffload_component.receive_queues); - - ret = OMPI_ERROR; - - goto exit; - } - - while (queues[qp] != NULL) { - if (0 == strncmp("P,", queues[qp], 2)) { - type = MCA_BCOL_IBOFFLOAD_PP_QP; - } else if (0 == strncmp("S,", queues[qp], 2)) { - type = MCA_BCOL_IBOFFLOAD_SRQ_QP; - } else if (0 == strncmp("X,", queues[qp], 2)) { -#if HAVE_XRC - type = MCA_BCOL_IBOFFLOAD_XRC_QP; -#else - opal_show_help("help-mpi-btl-openib.txt", "No XRC support", true, - ompi_process_info.nodename, - mca_bcol_iboffload_component.receive_queues); - ret = OMPI_ERR_NOT_AVAILABLE; - goto exit; -#endif - } else { - opal_show_help("help-mpi-btl-openib.txt", - "invalid qp type in receive_queues", true, - ompi_process_info.nodename, - mca_bcol_iboffload_component.receive_queues, - queues[qp]); - - ret = OMPI_ERR_BAD_PARAM; - - goto exit; - } - - ++qp; - } - - mca_bcol_iboffload_component.num_qps = MCA_BCOL_IBOFFLOAD_QP_LAST; - - qp = 0; -#define P(N) (((N) > count) ? NULL : params[(N)]) - while (NULL != queues[qp]) { - int count; - - params = opal_argv_split_with_empty(queues[qp], ','); - count = opal_argv_count(params); - - if ('P' == params[0][0]) { - if (count < 3 || count > 6) { - opal_show_help("help-mpi-btl-openib.txt", - "invalid pp qp specification", true, - ompi_process_info.nodename, queues[qp]); - - ret = OMPI_ERR_BAD_PARAM; - - goto exit; - } - - size = atoi_param(P(1), 0); - - rd_num = atoi_param(P(2), 256); - - /* by default set rd_low to be 3/4 of rd_num */ - rd_low = atoi_param(P(3), rd_num - (rd_num / 4)); - rd_win = atoi_param(P(4), (rd_num - rd_low) * 2); - rd_rsv = atoi_param(P(5), (rd_num * 2) / rd_win); - - - if ((rd_num - rd_low) > rd_win) { - opal_show_help("help-mpi-btl-openib.txt", "non optimal rd_win", - true, rd_win, rd_num - rd_low); - } - } else { - if (count < 3 || count > 5) { - opal_show_help("help-mpi-btl-openib.txt", - "invalid srq specification", true, - ompi_process_info.nodename, queues[qp]); - - ret = OMPI_ERR_BAD_PARAM; - - goto exit; - } - - size = atoi_param(P(1), 0); - rd_num = atoi_param(P(2), 256); - - /* by default set rd_low to be 3/4 of rd_num */ - rd_low = atoi_param(P(3), rd_num - (rd_num / 4)); - sd_max = atoi_param(P(4), rd_low / 4); - - IBOFFLOAD_VERBOSE(10, ("srq: rd_num is %d rd_low is %d sd_max is %d", - rd_num, rd_low, sd_max)); - - } - - if (rd_num <= rd_low) { - opal_show_help("help-mpi-btl-openib.txt", "rd_num must be > rd_low", - true, ompi_process_info.nodename, queues[qp]); - ret = OMPI_ERR_BAD_PARAM; - - goto exit; - } - - opal_argv_free(params); - - ++qp; - } - - params = NULL; - - for (qp = 0; qp < MCA_BCOL_IBOFFLOAD_QP_LAST; ++qp) { - mca_bcol_iboffload_component.qp_infos[qp].qp_index = qp; - - mca_bcol_iboffload_component.qp_infos[qp].type = type; - mca_bcol_iboffload_component.qp_infos[qp].size = size; - - mca_bcol_iboffload_component.qp_infos[qp].rd_num = rd_num; - mca_bcol_iboffload_component.qp_infos[qp].rd_low = rd_low; - - mca_bcol_iboffload_component.qp_infos[qp].rd_pp_win = rd_num - rd_low; - - if (MCA_BCOL_IBOFFLOAD_PP_QP == type) { - mca_bcol_iboffload_component.qp_infos[qp].u.pp_qp.rd_win = rd_win; - mca_bcol_iboffload_component.qp_infos[qp].u.pp_qp.rd_rsv = rd_rsv; - } else { - mca_bcol_iboffload_component.qp_infos[qp].u.srq_qp.sd_max = sd_max; - } - - if (NULL != setup_qps_fn[qp]) { - setup_qps_fn[qp](&mca_bcol_iboffload_component.qp_infos[qp]); - } - } - -exit: - if (NULL != params) { - opal_argv_free(params); - } - - if (NULL != queues) { - opal_argv_free(queues); - } - - return ret; -} - -static int progress_pending_collfrags(mca_bcol_iboffload_module_t *iboffload) -{ - mca_bcol_iboffload_collfrag_t *pending_collfrag; - int rc, size = opal_list_get_size(&iboffload->collfrag_pending); - - IBOFFLOAD_VERBOSE(10, ("Calling progress_pending_collfrags")); - - do { - pending_collfrag = (mca_bcol_iboffload_collfrag_t *) - opal_list_remove_first(&iboffload->collfrag_pending); - - IBOFFLOAD_VERBOSE(10, ("Get pending_collfrag - %p, iboffload - %p, " - "pending list size - %d.", pending_collfrag, iboffload, - opal_list_get_size(&iboffload->collfrag_pending))); - - /* Return back coll frag to coll request opal_list */ - opal_list_append(&pending_collfrag->coll_full_req->work_requests, - (opal_list_item_t *) pending_collfrag); - - rc = pending_collfrag->coll_full_req->progress_fn - (iboffload, pending_collfrag->coll_full_req); - if (OPAL_UNLIKELY(BCOL_FN_STARTED != rc && OMPI_SUCCESS != rc)) { - return OMPI_ERROR; - } - } while (--size > 0); - - return OMPI_SUCCESS; -} - - -/** - * Test - if we finished with the coll fragment descriptor, - * and free all resouces if so. - **/ -int -mca_bcol_iboffload_free_tasks_frags_resources( - mca_bcol_iboffload_collfrag_t *collfrag, - ompi_free_list_t *frags_free) -{ - int rc; - - mca_bcol_iboffload_task_t *task = collfrag->tasks_to_release; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - /* Support for multiple frags we will add later - * n_outstanding_frags = coll_req->n_frags_sent - coll_req->n_frag_net_complete; */ - - while (NULL != task) { - /* Return frag (is the reference counter is zero)*/ - rc = release_frags_on_task(task, frags_free); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - - /* Return task: if the pointer is NULL => we assume the task - is a member of the common task list (tasks_free) */ - if (NULL == task->task_list) { - OMPI_FREE_LIST_RETURN_MT(&cm->tasks_free, - (ompi_free_list_item_t *) task); - } else { - OMPI_FREE_LIST_RETURN_MT(task->task_list, - (ompi_free_list_item_t *) task); - } - - task = task->next_task; - } - - return OMPI_SUCCESS; -} - -static void fatal_error(char *mesg) -{ - IBOFFLOAD_ERROR(("FATAL ERROR: %s", mesg)); - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_INTERN); -} - -#define RELEASE_COLLFRAG(cf) \ - do { \ - opal_list_remove_item(&(cf)->coll_full_req->work_requests, \ - (opal_list_item_t *) (cf)); \ - if (&(cf)->coll_full_req->first_collfrag != (cf)) { \ - OMPI_FREE_LIST_RETURN_MT(&mca_bcol_iboffload_component.collfrags_free, \ - (ompi_free_list_item_t *) (cf)); \ - } \ - } while (0) - -#define COLLFRAG_IS_DONE(cf) ((cf)->complete && (cf)->n_sends_completed == (cf)->n_sends) - -/* Pasha: Need to modify the code to progress pending queue only if relevant -* resource was released */ -#define PROGRESS_PENDING_COLLFRAG(cf) \ - if (OPAL_UNLIKELY(opal_list_get_size(&(cf)->coll_full_req->module->collfrag_pending) > 0)) { \ - int rc; \ - IBOFFLOAD_VERBOSE(10, ("Calling for PROGRESS_PENDING_COLLFRAG")); \ - rc = progress_pending_collfrags((cf)->coll_full_req->module); \ - if (OPAL_UNLIKELY(OMPI_ERROR == rc)) { \ - fatal_error("failed to progress_pending_collfrags\n"); \ - return 0; \ - } \ - } - - -static inline __opal_attribute_always_inline__ int - handle_collfrag_done(mca_bcol_iboffload_collfrag_t *coll_frag, - mca_bcol_iboffload_collreq_t *coll_request, - mca_bcol_iboffload_device_t *device) -{ - int rc; - - if (COLLFRAG_IS_DONE(coll_frag)) { - IBOFFLOAD_VERBOSE(10, ("Coll frag - %p already done.\n", coll_frag)); - - coll_request->n_frag_net_complete++; - IBOFFLOAD_VERBOSE(10, ("Free tasks resourse.\n")); - /* Check if we are done with this coll_frag and release resources if so. */ - rc = mca_bcol_iboffload_free_tasks_frags_resources(coll_frag, device->frags_free); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("mca_bcol_iboffload_free_tasks_frags_resources FAILED")); - fatal_error("Failed to mca_bcol_iboffload_free_tasks_frags_resources\n"); - return -1; - } - - BCOL_IBOFFLOAD_MQ_RETURN_CREDITS(coll_request->module, coll_frag->mq_index, coll_frag->mq_credits); - - RELEASE_COLLFRAG(coll_frag); - - PROGRESS_PENDING_COLLFRAG(coll_frag); - - IBOFFLOAD_VERBOSE(10, ("Alg %d: user_handle_freed - %d, n_frag_mpi_complete - %d, " - "n_fragments- %d, n_frag_net_complete - %d, n_fragments - %d.\n", - coll_frag->alg, - coll_request->user_handle_freed, - coll_request->n_frag_mpi_complete, - coll_request->n_fragments, - coll_request->n_frag_net_complete, - coll_request->n_fragments)); - - /* check for full message completion */ - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - } - - IBOFFLOAD_VERBOSE(10, ("Exit with success.\n")); - - return 0; -} - -/* - * IBOFFLOAD component progress. - */ - -static int progress_one_device(mca_bcol_iboffload_device_t *device) -{ - int ne, rc, count = 0; - - mca_bcol_iboffload_collfrag_t *coll_frag; - mca_bcol_iboffload_collreq_t *coll_request; - - struct ibv_wc wc; - memset(&wc, 0, sizeof(struct ibv_wc)); - - /* - * poll for collective completion - does not mean resources can - * be freed, as incomplete network level sends may still be pending - */ - - /* Poll for completion on completion on wait MQEs */ - if(0 != (ne = ibv_poll_cq(device->ib_mq_cq, 1, &wc))) { - do { - if (OPAL_UNLIKELY(0 > ne)) { - IBOFFLOAD_ERROR(("Device %s: " - "failed to poll MQ completion queue\n", - ibv_get_device_name(device->dev.ib_dev))); - fatal_error("failed to poll MQ completion queue\n"); - return count; - } - - if (OPAL_UNLIKELY(IBV_WC_SUCCESS != wc.status)) { - IBOFFLOAD_ERROR(("Device %s: " - "the completion with error on wait was gotten, status %d, opcode %d, " - "vendor_err 0x%x, qp %x, id 0x%x\n", ibv_get_device_name(device->dev.ib_dev), - wc.status, wc.opcode, wc.vendor_err, wc.qp_num, wc.wr_id)); - fatal_error("wc.status \n"); - return count; - } - - IBOFFLOAD_VERBOSE(10, ("The MQ completion was polled.\n")); - - ++count; - - /* get pointer to mca_bcol_iboffload_collfrag_t */ - coll_frag = (mca_bcol_iboffload_collfrag_t*) - (uint64_t) (uintptr_t) wc.wr_id; - - /* Only last MQ task of collective frag - sends completion signal, so if we got it => - all MQEs were done. */ - coll_frag->complete = true; - - IBOFFLOAD_VERBOSE(10, ("MQ completion for algorithm %d coll_frag_addr %p ml buffer index %d", - coll_frag->alg, (void *)coll_frag, coll_frag->coll_full_req->ml_buffer_index)); - - /* full request descriptor */ - coll_request = coll_frag->coll_full_req; - - coll_request->n_frag_mpi_complete++; - - /* - * at this stage all receives have been completed, so - * unpack the data to user buffer, the resources will be released when we will done with all - * element in the task list - */ - - if (NULL != coll_request->completion_cb_fn) { - if (OMPI_SUCCESS != - coll_request->completion_cb_fn(coll_frag)) { - fatal_error("coll_request->completion_cb_fn\n"); - return count; - } - } - - if (coll_request->n_frag_mpi_complete == - coll_request->n_fragments) { - coll_request->super.req_complete = true; - opal_condition_broadcast(&ompi_request_cond); - IBOFFLOAD_VERBOSE(10, ("After opal_condition_broadcast.\n")); - } - - rc = handle_collfrag_done(coll_frag, coll_request, device); - if (0 != rc) { - return count; - } - } while(0 != (ne = ibv_poll_cq(device->ib_mq_cq, 1, &wc))); - - return count; - } - - /* poll the send completion queue */ - do { - ne = ibv_poll_cq(device->ib_cq, 1, &wc); - if (0 < ne) { - if (OPAL_UNLIKELY(IBV_WC_SUCCESS != wc.status)) { - IBOFFLOAD_ERROR(("Device %s, " - "the completion with error on send was gotten, status %d, opcode %d, " - "vendor_err 0x%x, qp %x, id 0x%x\n", ibv_get_device_name(device->dev.ib_dev), - wc.status, wc.opcode, wc.vendor_err, wc.qp_num, wc.wr_id)); - -#if OPAL_ENABLE_DEBUG - { - mca_bcol_iboffload_module_t *iboffload; - int i, qp_index, num_qps = mca_bcol_iboffload_component.num_qps; - - coll_frag = (mca_bcol_iboffload_collfrag_t*) - (uint64_t) (uintptr_t) wc.wr_id; - - iboffload = coll_frag->coll_full_req->module; - - for (i = 0; i < iboffload->num_endpoints; ++i) { - mca_bcol_iboffload_endpoint_t *ep = iboffload->endpoints[i]; - - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - if (NULL != ep->qps[qp_index].qp->lcl_qp && - wc.qp_num == ep->qps[qp_index].qp->lcl_qp->qp_num) { - IBOFFLOAD_ERROR(("Module - %p, coll_frag - %p, " - "destination %d, qp index - %d.", - iboffload, coll_frag, i, qp_index)); - } - } - } - } -#endif - fatal_error("Failed to ibv_poll_cq\n"); - return count; - } - - ++count; - - /* get pointer to mca_bcol_iboffload_collfrag_t */ - coll_frag = (mca_bcol_iboffload_collfrag_t*) - (uint64_t) (uintptr_t) wc.wr_id; - - /* update the number of completed sends */ - coll_frag->n_sends_completed++; - - IBOFFLOAD_VERBOSE(10, ("Send CQ completion for algorithm %d coll_frag_addr %p ml buffer index %d", - coll_frag->alg, (void *)coll_frag, coll_frag->coll_full_req->ml_buffer_index)); - - IBOFFLOAD_VERBOSE(10, ("Alg %d coll_frag_addr %p: n_sends_completed - %d, n_sends - %d.\n", - coll_frag->alg, (void *)coll_frag, - coll_frag->n_sends_completed, - coll_frag->n_sends)); - - assert(coll_frag->n_sends_completed <= coll_frag->n_sends); - - /* full message descriptor */ - coll_request = coll_frag->coll_full_req; - - /* check to see if all sends are complete from the network - * perspective */ - rc = handle_collfrag_done(coll_frag, coll_request, device); - if (0 != rc) { - return count; - } - } else if (OPAL_UNLIKELY(0 > ne)) { - IBOFFLOAD_ERROR(("Device %s: " - "failed to poll send completion queue\n", - ibv_get_device_name(device->dev.ib_dev))); - fatal_error("failed to poll send completion queue\n"); - return count; - } - } while (0 != ne); - - return count; -} - -int mca_bcol_iboffload_component_progress(void) -{ - int i, count = 0; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - opal_pointer_array_t *devs = &cm->devices; - - int devices_count = cm->num_devs; - - for(i = 0; i < devices_count; ++i) { - mca_bcol_iboffload_device_t *device = - opal_pointer_array_get_item(devs, i); - - if (OPAL_LIKELY(device->activated)) { - count += progress_one_device(device); - } - } - - return count; -} - -#if OPAL_ENABLE_DEBUG /* debug code */ -int task_to_rank(mca_bcol_iboffload_module_t *iboffload, struct mqe_task *task) -{ - int i, j, num_qps = mca_bcol_iboffload_component.num_qps; - for (i = 0; i < iboffload->num_endpoints; i++) { - for (j = 0; j < num_qps; j++) { - if (task->post.qp == iboffload->endpoints[i]->qps[j].qp->lcl_qp) { - return i; - } - } - } - - return -1; /* not found ! */ -} - -int wait_to_rank(mca_bcol_iboffload_module_t *iboffload, struct mqe_task *task) -{ - int i, j; - for (i = 0; i < iboffload->num_endpoints; i++) { - for (j = 0; j < IBOFFLOAD_CQ_LAST; j++) { - if (task->wait.cq == iboffload->endpoints[i]->recv_cq[j]) { - return i; - } - } - } - - return -1; /* not found ! */ -} - -#endif /* debug code */ diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_device.h b/ompi/mca/bcol/iboffload/bcol_iboffload_device.h deleted file mode 100644 index a7503df4f07..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_device.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_DEVICE_H -#define MCA_BCOL_IBOFFLOAD_DEVICE_H - -#include "ompi_config.h" - -#include -#include - -#include - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" - -#define BCOL_IBOFFLOAD_DUMMY_MEM_SIZE 1 - -BEGIN_C_DECLS - -/* Device OBJ */ -struct mca_bcol_iboffload_device_t { - opal_list_item_t super; - - bool activated; - - struct ompi_common_ofacm_base_dev_desc_t dev; - struct ibv_pd *ib_pd; - struct ibv_device_attr ib_dev_attr; - - int num_act_ports; - - struct mca_bcol_iboffload_port_t *ports; - struct ibv_cq *ib_cq; - - /* CQ for MQs of all iboffload modules on this device */ - struct ibv_cq *ib_mq_cq; - - /* The free list of registered buffers - * since the registration depends on PD, it is - * most resonable place to keep the frags */ - ompi_free_list_t *frags_free; - mca_mpool_base_module_t *mpool; - - /* netowrk context */ - bcol_base_network_context_t *net_context; - - /* We keep dummy frags for all QPs on each device, - possibly some of QPs don't need it but anyway we distribute dummy - for them. All dummies point to a same byte of memory. */ - mca_bcol_iboffload_frag_t dummy_frags[MCA_BCOL_IBOFFLOAD_QP_LAST]; - - /* Registred memory for the dummy frags */ - char dummy_mem[BCOL_IBOFFLOAD_DUMMY_MEM_SIZE]; - - /* Registration info of the dummy memory */ - mca_bcol_iboffload_reg_t dummy_reg; -}; - -typedef struct mca_bcol_iboffload_device_t mca_bcol_iboffload_device_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_device_t); - -END_C_DECLS - -#endif /* MCA_BCOL_IBOFFLOAD_DEVICE_H */ - diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.c b/ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.c deleted file mode 100644 index 50d0eeeb8c7..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.c +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include - -#include "ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/common/ofacm/connect.h" - -#include "opal/threads/mutex.h" -#include "opal/class/opal_object.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_device.h" -#include "bcol_iboffload_endpoint.h" - -static void mca_bcol_iboffload_endpoint_construct(mca_bcol_iboffload_endpoint_t *ep) -{ - ep->iboffload_module = NULL; - ep->ibnet_proc = NULL; - - ep->qps = (mca_bcol_iboffload_endpoint_qp_t *) - calloc(mca_bcol_iboffload_component.num_qps, - sizeof(mca_bcol_iboffload_endpoint_qp_t)); - - ep->index = 0; - OBJ_CONSTRUCT(&ep->endpoint_lock, opal_mutex_t); - OBJ_CONSTRUCT(&ep->pending_frags, opal_list_t); - - memset(ep->recv_cq, 0, IBOFFLOAD_CQ_LAST * sizeof(ep->recv_cq[0])); - memset(&ep->qp_config, 0, sizeof(ompi_common_ofacm_base_qp_config_t)); - - ep->cpc_context = NULL; - - memset(&ep->remote_zero_rdma_addr, 0, sizeof(mca_bcol_iboffload_rdma_info_t)); - memset(&ep->remote_rdma_block, 0, sizeof(mca_bcol_iboffload_rem_rdma_block_t)); - - ep->need_toset_remote_rdma_info = false; -} - -static void mca_bcol_iboffload_endpoint_destruct(mca_bcol_iboffload_endpoint_t *ep) -{ - int qp_index, num_qps, i; - ompi_free_list_item_t *item; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - num_qps = cm->num_qps; - - IBOFFLOAD_VERBOSE(10, ("Destruct: ep - %p, ep->index - %d", ep, ep->index)); - - if (NULL != ep->qps) { - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - do { - item = (ompi_free_list_item_t *) - opal_list_remove_first(&ep->qps[qp_index].preposted_frags); - if(OPAL_LIKELY(NULL != item)) { - OMPI_FREE_LIST_RETURN_MT(&ep->device->frags_free[qp_index], item); - } - } while (NULL != item); - - OBJ_DESTRUCT(&ep->qps[qp_index].preposted_frags); - } - - free(ep->qps); - } - - OBJ_DESTRUCT(&ep->endpoint_lock); - OBJ_DESTRUCT(&ep->pending_frags); - - /* If the CPC has an endpoint_finalize function, call it */ - if (NULL != ep->endpoint_cpc->cbm_endpoint_finalize) { - ep->endpoint_cpc->cbm_endpoint_finalize(ep->cpc_context); - } - - for (i = 0; i < IBOFFLOAD_CQ_LAST; i++) { - if (NULL != ep->recv_cq[i]) { - if (ibv_destroy_cq(ep->recv_cq[i])) { - IBOFFLOAD_ERROR(("Endpoint %x " - ", failed to destroy CQ, errno says %s", - ep, strerror(errno))); - } - } - } -} - -OBJ_CLASS_INSTANCE(mca_bcol_iboffload_endpoint_t, - opal_list_item_t, - mca_bcol_iboffload_endpoint_construct, - mca_bcol_iboffload_endpoint_destruct); - -/* Pasha: Add some error message here */ - -/* - * Called when the CPC has established a connection on an endpoint - */ -static void mca_bcol_iboffload_endpoint_invoke_error(void *context) -{ - mca_bcol_iboffload_endpoint_t *endpoint = (mca_bcol_iboffload_endpoint_t *) context; - IBOFFLOAD_ERROR(("Getting error on endpoint - %p!", endpoint)); -} - - -/* Pasha: Need to add more logic here */ -static void mca_bcol_iboffload_endpoint_cpc_complete(void *context) -{ - mca_bcol_iboffload_endpoint_t *endpoint = (mca_bcol_iboffload_endpoint_t *) context; - - IBOFFLOAD_VERBOSE(10, ("Endpoint - %p for comm rank %d: CPC complete.\n", - endpoint, endpoint->iboffload_module->ibnet->super.group_list[endpoint->index])); - - if (OMPI_SUCCESS != - mca_bcol_iboffload_exchange_rem_addr(endpoint)) { - IBOFFLOAD_ERROR(("endpoint - %p, " - "remote addr exchange error.\n", endpoint)); - } - /* The connection is correctly setup. Now we can decrease the - event trigger. */ - opal_progress_event_users_decrement(); -} - -/* Vasily: Need to add more logic here */ -int mca_bcol_iboffload_endpoint_post_recvs(void *context) -{ - int qp_index, rc, num_qps; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - mca_bcol_iboffload_endpoint_t *endpoint = - (mca_bcol_iboffload_endpoint_t *) context; - - IBOFFLOAD_VERBOSE(10, ("endpoint - %p, post of %d recvs !", - endpoint, cm->qp_infos[0].rd_num)); - /* TODO Pasha - fix later */ - num_qps = cm->num_qps; - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - rc = mca_bcol_iboffload_prepost_recv(endpoint, qp_index, - cm->qp_infos[qp_index].rd_num); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - /* Pasha: Need to add more failure logic */ - IBOFFLOAD_ERROR(("Failed to prepost recv fragments " - "on qp index %d, return code - %d", - qp_index, rc)); - - return OMPI_ERROR; - } - } - - return OMPI_SUCCESS; -} - -/* The function go over each ibnet proc and creates endpoint for each one */ -int mca_bcol_iboffloads_create_endpoints(mca_sbgp_ibnet_connection_group_info_t *cgroup, - mca_bcol_iboffload_module_t *module) { - uint32_t i; - mca_bcol_iboffload_endpoint_t *ep; - - if (NULL == cgroup || NULL == module) { - IBOFFLOAD_ERROR(("Bad parameters for create endpoints function.")); - return OMPI_ERROR; - } - - module->num_endpoints = cgroup->num_procs; - module->endpoints = (mca_bcol_iboffload_endpoint_t **) - calloc(module->num_endpoints, - sizeof(mca_bcol_iboffload_endpoint_t *)); - if (NULL == module->endpoints) { - IBOFFLOAD_ERROR(("Error memory allocation for endpoints array" - ", errno says %s", strerror(errno))); - return OMPI_ERROR; - } - - IBOFFLOAD_VERBOSE(10, ("iboffload - %p, num of endpoints - %d.\n", - module, module->num_endpoints)); -/* Ishai: No need to open so many endpoints. We are not talking with all procs */ - for (i = 0; i < cgroup->num_procs; i++) { - ep = OBJ_NEW(mca_bcol_iboffload_endpoint_t); - /* check qp memory allocation */ - if (NULL == ep->qps) { - IBOFFLOAD_ERROR(("Failed to allocate memory for qps")); - return OMPI_ERROR; - } - /* init new endpoint */ - ep->index = i; - ep->iboffload_module = module; - /* saving the device for the destruction - iboffload module amy not exist than */ - ep->device = ep->iboffload_module->device; - ep->ibnet_proc = (mca_sbgp_ibnet_proc_t *) - opal_pointer_array_get_item(cgroup->ibnet_procs, i); - if (NULL == ep->ibnet_proc) { - IBOFFLOAD_ERROR(("Failed to get proc pointer, for index %d", i)); - return OMPI_ERROR; - } - - if (OMPI_SUCCESS != - mca_bcol_iboffload_endpoint_init(ep)) { - IBOFFLOAD_ERROR(("Failed to init endpoint - %p", ep)); - return OMPI_ERROR; - } - - IBOFFLOAD_VERBOSE(10, ("Endpoint - %p, ep index - %d, iboffload - %p, " - "cpc contex - %p.\n", ep, ep->index, - ep->iboffload_module, ep->cpc_context)); - - /* Add the new endpoint to array of endpoints */ - module->endpoints[i] = ep; - } - - /* Pasha: Need to add better clean-up here */ - return OMPI_SUCCESS; -} - -static int config_qps(mca_bcol_iboffload_endpoint_t *ep) -{ - int qp_index; - int ret = OMPI_SUCCESS; - - ompi_common_ofacm_base_qp_config_t *qp_config = &ep->qp_config; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - qp_config->num_srqs = 0; - qp_config->srq_num = NULL; - - qp_config->num_qps = cm->num_qps; - - qp_config->init_attr = (struct ibv_qp_init_attr *) - calloc(qp_config->num_qps, sizeof(struct ibv_qp_init_attr)); - - if (NULL == qp_config->init_attr) { - IBOFFLOAD_ERROR(("Failed allocate memory for qp init attributes")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - - goto config_qps_exit; - } - - qp_config->attr = (struct ibv_qp_attr *) - calloc(qp_config->num_qps, sizeof(struct ibv_qp_attr)); - - if (OPAL_UNLIKELY(NULL == qp_config->attr)) { - IBOFFLOAD_ERROR(("Failed allocate memory for qp attributes")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - - goto config_qps_exit; - } - - /* we must to specify that the qps are special */ - qp_config->init_attr_mask = (uint32_t *) - calloc(qp_config->num_qps, sizeof(uint32_t)); - - if (OPAL_UNLIKELY(NULL == qp_config->init_attr_mask)) { - IBOFFLOAD_ERROR(("Failed allocate memory for qp mask.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - - goto config_qps_exit; - } - - /* qp_config->rtr_attr_mask = qp_config->rts_attr_mask = NULL; */ - - qp_config->rtr_attr_mask = (uint32_t *) - calloc(qp_config->num_qps, sizeof(uint32_t)); - - if (OPAL_UNLIKELY(NULL == qp_config->rtr_attr_mask)) { - IBOFFLOAD_ERROR(("Failled allocate memory for qp rtr attributes mask.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - - goto config_qps_exit; - } - - qp_config->rts_attr_mask = (uint32_t *) - calloc(qp_config->num_qps, sizeof(uint32_t)); - - if (OPAL_UNLIKELY(NULL == qp_config->rts_attr_mask)) { - IBOFFLOAD_ERROR(("Failled allocate memory for qp rts attributes mask.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - - goto config_qps_exit; - } - - for (qp_index = 0; qp_index < qp_config->num_qps; ++qp_index) { - mca_bcol_iboffload_config_qps_fn_t config_qp = - cm->qp_infos[qp_index].config_qp; - - if (NULL != config_qp) { - config_qp(qp_index, ep, qp_config); - } - } - -config_qps_exit: - return ret; -} - -/* The fucntion is called for endpoints - * with MCA_COMMON_OFACM_USER_CUSTOM state only, - * we need a OPAL_THREAD_LOCK before call to this function */ -int mca_bcol_iboffload_endpoint_init(mca_bcol_iboffload_endpoint_t *ep) -{ - int qp_index, cq_index, num_qps; - ompi_common_ofacm_base_module_t *cpc; - - mca_bcol_iboffload_device_t *device = ep->iboffload_module->device; - - mca_sbgp_ibnet_connection_group_info_t *cgroup = - &ep->iboffload_module->ibnet->cgroups[ep->iboffload_module->cgroup_index]; - - for (cq_index = 0; cq_index < IBOFFLOAD_CQ_LAST; cq_index++) { - if (OMPI_SUCCESS != - mca_bcol_iboffload_adjust_cq(device, &ep->recv_cq[cq_index])) { - IBOFFLOAD_ERROR(("Error creating CQ for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - /* OBJ_RELEASE(ep); */ /* Vasily: What must we do in this case ??? */ - return OMPI_ERROR; - } - } - - if (OPAL_UNLIKELY(OMPI_SUCCESS != config_qps(ep))) { - IBOFFLOAD_ERROR(("Error configure QPs for endpoint %x errno says %s", - ep, strerror(errno))); - return OMPI_ERROR; - } - - /* Adding here one more redirection in critical path. Need to think - * what is the best way to prevent it */ - - IBOFFLOAD_VERBOSE(10, ("Endpoint - %p, rem port - %d", ep, - ep->ibnet_proc->remote_ports_info[BCOL_IBOFFLOAD_ENDPOINT_PORT_IDX(cgroup, ep)].id)); - - cpc = ep->ibnet_proc->remote_ports_info[BCOL_IBOFFLOAD_ENDPOINT_PORT_IDX(cgroup, ep)].local_cpc; - ep->endpoint_cpc = cpc; /* caching pointer to cpc */ - - if (NULL != cpc->cbm_endpoint_init) { - ep->cpc_context = cpc->cbm_endpoint_init( - ep->ibnet_proc->ompi_proc, - &ep->qp_config, - device->ib_pd, - ep->iboffload_module->subnet_id, - ep->iboffload_module->ibnet->group_id, - ep->iboffload_module->lid, - /* Remote lid of target module */ - ep->ibnet_proc->remote_ports_info[BCOL_IBOFFLOAD_ENDPOINT_PORT_IDX(cgroup, ep)].lid, - ep->index, /* user context index */ - (void *) ep, /* user context */ - cpc, - mca_bcol_iboffload_endpoint_cpc_complete, - mca_bcol_iboffload_endpoint_invoke_error, - mca_bcol_iboffload_endpoint_post_recvs); - - if (OPAL_UNLIKELY(NULL == ep->cpc_context)) { - IBOFFLOAD_ERROR(("Endpoint - %p, failed to init context", ep)); - /* OBJ_RELEASE(ep); */ /* Vasily: What must we do in this case ??? */ - return OMPI_ERROR; - } - - /* Updating remote port info */ - num_qps = mca_bcol_iboffload_component.num_qps; - - ep->remote_info = &ep->cpc_context->remote_info; - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - ep->qps[qp_index].qp = &ep->cpc_context->qps[qp_index]; - } - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.h b/ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.h deleted file mode 100644 index 7a57b57a7b9..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_endpoint.h +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_ENDPOINT_H -#define MCA_BCOL_IBOFFLOAD_ENDPOINT_H - -#include "ompi_config.h" -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" - -#include "ompi/mca/sbgp/ibnet/sbgp_ibnet.h" - -#define BCOL_IBOFFLOAD_ENDPOINT_PORT(cgroup, ep) (ep)->ibnet_proc->use_port[(cgroup)->index] -#define BCOL_IBOFFLOAD_ENDPOINT_PORT_IDX(cgroup, ep) (BCOL_IBOFFLOAD_ENDPOINT_PORT(cgroup, ep) - 1) - -BEGIN_C_DECLS - -struct mca_bcol_iboffload_endpoint_qp_t { - struct ompi_common_ofacm_base_qp_t *qp; - size_t ib_inline_max; - int32_t sd_wqe; /* Number of available send wqe entries */ - int32_t rd_wqe; /* Number of available recv wqe entries */ - opal_list_t preposted_frags; /* List of preposted frags */ - /* opal_mutex_t lock; */ /* Do I need lock here ? */ -}; - -typedef struct mca_bcol_iboffload_endpoint_qp_t mca_bcol_iboffload_endpoint_qp_t; - -enum { - IBOFFLOAD_CQ_SMALL_MESSAGES = 0, - IBOFFLOAD_CQ_SYNC, - IBOFFLOAD_CQ_LARGE_MESSAGES, - IBOFFLOAD_CQ_LAST -}; - -/* Endpoint object */ -struct mca_bcol_iboffload_endpoint_t { - opal_list_item_t super; - - /** BTL module that created this connection */ - mca_bcol_iboffload_module_t *iboffload_module; - - /** proc structure corresponding to endpoint */ - mca_sbgp_ibnet_proc_t *ibnet_proc; - - /** lock for concurrent access to endpoint state */ - opal_mutex_t endpoint_lock; - - /** Penging frag list */ - opal_list_t pending_frags; - - /** QPs information */ - mca_bcol_iboffload_endpoint_qp_t *qps; - - /** endpoint index on array */ - int32_t index; - - /** CQ for receive queues on this endpoint */ - struct ibv_cq *recv_cq[IBOFFLOAD_CQ_LAST]; - - /** QP configuration information */ - ompi_common_ofacm_base_qp_config_t qp_config; - - /** cpc context */ - ompi_common_ofacm_base_local_connection_context_t *cpc_context; - - /** caching pointer to remote info */ - ompi_common_ofacm_base_remote_connection_context_t *remote_info; - - /** caching pointer to cpc */ - ompi_common_ofacm_base_module_t *endpoint_cpc; - - /** The struct is used for zero RDMA with immediate - in some collectives, in barrier for example. */ - mca_bcol_iboffload_rdma_info_t remote_zero_rdma_addr; - mca_bcol_iboffload_rem_rdma_block_t remote_rdma_block; - - /** The pointer to device - In the destruction function - the iboffload module may not exist any more - caching the device */ - struct mca_bcol_iboffload_device_t *device; - - bool need_toset_remote_rdma_info; - - mca_bcol_iboffload_rdma_info_t remote_rdma_info[MAX_REMOTE_RDMA_INFO]; -}; -typedef struct mca_bcol_iboffload_endpoint_t mca_bcol_iboffload_endpoint_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_endpoint_t); - -/* Function declaration */ -int mca_bcol_iboffload_endpoint_init(mca_bcol_iboffload_endpoint_t *ep); - -static inline __opal_attribute_always_inline__ - int check_endpoint_state(mca_bcol_iboffload_endpoint_t *ep, - mca_bcol_base_descriptor_t *des, - opal_list_t *pending_list) -{ - int rc = OMPI_ERR_RESOURCE_BUSY; - - OPAL_THREAD_LOCK(&ep->cpc_context->context_lock); - /* Adding here one more redirection in critical path. Need to think - * what is the best way to prevent it */ - switch(ep->cpc_context->state) { - case MCA_COMMON_OFACM_CLOSED: - rc = ep->endpoint_cpc->cbm_start_connect(ep->cpc_context); - if (OMPI_SUCCESS == rc) { - rc = OMPI_ERR_RESOURCE_BUSY; - } - /* - * As long as we expect a message from the peer (in order - * to setup the connection) let the event engine pool the - * OOB events. Note: we increment it once peer active - * connection. - */ - opal_progress_event_users_increment(); - /* fall through */ - default: - /* opal_list_append(pending_list, (opal_list_item_t *)des); */ /* Vasily: will be uncomment later */ - break; - case MCA_COMMON_OFACM_FAILED: - rc = OMPI_ERR_UNREACH; - break; - case MCA_COMMON_OFACM_CONNECTED: - rc = OMPI_SUCCESS; - break; - } - - OPAL_THREAD_UNLOCK(&ep->cpc_context->context_lock); - return rc; -} - -int mca_bcol_iboffloads_create_endpoints(mca_sbgp_ibnet_connection_group_info_t *cgroup, - mca_bcol_iboffload_module_t *module); - -int mca_bcol_iboffload_endpoint_post_recvs(void *context); - -static inline __opal_attribute_always_inline__ int - mca_bcol_iboffload_prepost_recv( - mca_bcol_iboffload_endpoint_t *endpoint, - int qp_index, int num_to_prepost) -{ - mca_bcol_iboffload_prepost_qps_fn_t prepost_recv = - mca_bcol_iboffload_component.qp_infos[qp_index].prepost_recv; - if (NULL != prepost_recv) { - return prepost_recv(endpoint, qp_index, num_to_prepost); - } - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int - mca_bcol_iboffload_post_ml_scatter_recv_frag( - int qp_index, uint32_t dest_rank, - int nitems, struct iovec *buff_iovec, - uint32_t lkey, - struct ibv_sge *sg_entries, - mca_bcol_iboffload_frag_t *frag, - mca_bcol_iboffload_module_t *iboffload) -{ - int ret, start_wr_index; - struct ibv_recv_wr *recv_wr, *recv_bad; - int i; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[dest_rank]; - - mca_bcol_iboffload_recv_wr_manager *recv_wrs = &cm->recv_wrs; - mca_bcol_iboffload_device_t *device = endpoint->iboffload_module->device; - - IBOFFLOAD_VERBOSE(10, ("Recv prepost call: endpoint %p, qp_index %d", - (void *) endpoint, qp_index)); - - /* make sure that we do not overrun number of rd_wqe */ - if (0 >= endpoint->qps[qp_index].rd_wqe) { - IBOFFLOAD_VERBOSE(10, ("There are no rd_wqe - %d", - endpoint->qps[qp_index].rd_wqe)); - - return 0; - } - - OPAL_THREAD_LOCK(&recv_wrs->lock); - - /* Calculate start index in array - * of pre-allocated work requests */ - start_wr_index = cm->qp_infos[qp_index].rd_num - 1; - recv_wr = &recv_wrs->recv_work_requests[qp_index][start_wr_index]; - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p, qp_index - %d, " - "start index of WRs - %d", (void *) endpoint, - qp_index, start_wr_index)); - - for (i = 0; i < nitems; i++) { - sg_entries[i].length = buff_iovec[i].iov_len; - sg_entries[i].addr = (uint64_t)buff_iovec[i].iov_base; - sg_entries[i].lkey = lkey; - - IBOFFLOAD_VERBOSE(10, ("Recv SGE List item %d , length %d , address %p", - i, sg_entries[i].length, sg_entries[i].addr)); - - IBOFFLOAD_VERBOSE(10, ("Recv SGE List item %d , iovec length %d", - i, buff_iovec[i].iov_len)); - } - - recv_wr->num_sge = nitems; - recv_wr->sg_list = sg_entries; - - /* Set the tail */ - recv_wr->next = NULL; - - /* post the list of recvs */ - ret = ibv_post_recv(endpoint->qps[qp_index].qp->lcl_qp, recv_wr, &recv_bad); - if (OPAL_UNLIKELY(0 != ret)) { - IBOFFLOAD_ERROR(("ibv_post_recv failed (%s), error: %s [%d], " - "qp_index - %d.\n", - ibv_get_device_name(device->dev.ib_dev), - strerror(errno), ret, qp_index)); - - return -1; - } - - /* decresing numbers of free recv wqe */ - --endpoint->qps[qp_index].rd_wqe; - - OPAL_THREAD_UNLOCK(&recv_wrs->lock); - - IBOFFLOAD_VERBOSE(10, ("Return success: " - "endpoint %p, qp_index %d, dest_rank %d", - endpoint, qp_index, dest_rank)); - - return 1; -} - -static inline __opal_attribute_always_inline__ int - mca_bcol_iboffload_prepost_ml_recv_frag( - int qp_index, uint32_t dest_rank, - mca_bcol_iboffload_frag_t *frag, - mca_bcol_iboffload_module_t *iboffload) -{ - int ret, start_wr_index; - struct ibv_recv_wr *recv_wr, *recv_bad; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[dest_rank]; - - mca_bcol_iboffload_recv_wr_manager *recv_wrs = &cm->recv_wrs; - mca_bcol_iboffload_device_t *device = endpoint->iboffload_module->device; - - IBOFFLOAD_VERBOSE(10, ("Recv prepost call: endpoint %p, qp_index %d", - (void *) endpoint, qp_index)); - - /* make sure that we do not overrun number of rd_wqe */ - if (0 >= endpoint->qps[qp_index].rd_wqe) { - IBOFFLOAD_VERBOSE(10, ("There are no rd_wqe - %d", - endpoint->qps[qp_index].rd_wqe)); - - return 0; - } - - OPAL_THREAD_LOCK(&recv_wrs->lock); - - /* Calculate start index in array - * of pre-allocated work requests */ - start_wr_index = cm->qp_infos[qp_index].rd_num - 1; - recv_wr = &recv_wrs->recv_work_requests[qp_index][start_wr_index]; - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p, qp_index - %d, " - "start index of WRs - %d", (void *) endpoint, - qp_index, start_wr_index)); - - recv_wr->sg_list = &frag->sg_entry; - - /* Set the tail */ - recv_wr->next = NULL; - - /* post the list of recvs */ - ret = ibv_post_recv(endpoint->qps[qp_index].qp->lcl_qp, recv_wr, &recv_bad); - if (OPAL_UNLIKELY(0 != ret)) { - IBOFFLOAD_ERROR(("ibv_post_recv failed (%s), error: %s [%d], " - "qp_index - %d.\n", - ibv_get_device_name(device->dev.ib_dev), - strerror(errno), ret, qp_index)); - - return -1; - } - - /* decresing numbers of free recv wqe */ - --endpoint->qps[qp_index].rd_wqe; - - OPAL_THREAD_UNLOCK(&recv_wrs->lock); - - IBOFFLOAD_VERBOSE(10, ("Return success: " - "endpoint %p, qp_index %d, dest_rank %d", - endpoint, qp_index, dest_rank)); - - return 1; -} - -static inline __opal_attribute_always_inline__ - mca_bcol_iboffload_frag_t* mca_bcol_iboffload_get_preposted_recv_frag( - mca_bcol_iboffload_module_t *iboffload, - int source, int qp_index) -{ - mca_bcol_iboffload_frag_t *frag; - mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[source]; - - frag = mca_bcol_iboffload_component.qp_infos[qp_index].get_preposted_recv(endpoint, qp_index); - - /* do we want to run prepost */ - IBOFFLOAD_VERBOSE(10, ("source - %d, qp_index - %d; " - "allocating preposted addr %p.\n", - source, qp_index, (void *) frag->sg_entry.addr)); - - if (OPAL_LIKELY(NULL != frag)) { - frag->next = NULL; - } - - return frag; -} - -END_C_DECLS - -#endif /* MCA_BCOL_IBOFFLOAD_ENDPOINT_H */ diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_fanin.c b/ompi/mca/bcol/iboffload/bcol_iboffload_fanin.c deleted file mode 100644 index 49f771d46b5..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_fanin.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -static int mca_bcol_iboffload_fanin_leader_progress( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc = OMPI_SUCCESS, leader_rank = 0, rank, - sbgp_size = iboffload->ibnet->super.group_size; - - struct mqe_task *last_wait = NULL; - - mca_bcol_iboffload_task_t *wait_task = NULL; - mca_bcol_iboffload_frag_t *preposted_recv_frag = NULL; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - for (rank = leader_rank + 1; rank < sbgp_size; ++rank) { - /* post wait */ - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, rank, coll_request->qp_index); - if(NULL == preposted_recv_frag) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if(NULL == wait_task) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - } - - /* end of list */ - *mqe_ptr_to_set = NULL; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if(OMPI_SUCCESS != rc) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Fan-in, adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -static int mca_bcol_iboffload_fanin_proxy_progress( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc = OMPI_SUCCESS, leader_rank = 0; - - struct mqe_task *last_send = NULL; - mca_bcol_iboffload_task_t *send_task = NULL; - mca_bcol_iboffload_frag_t *send_fragment = NULL; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - /* post send */ - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - leader_rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - if(NULL == send_fragment) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting and packing send frag.\n")); - goto out_of_resources; - } - - send_task = mca_bcol_iboffload_get_send_task(iboffload, leader_rank, MCA_BCOL_IBOFFLOAD_QP_BARRIER, - send_fragment, coll_fragment, INLINE); - if(NULL == send_task) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - - /* end of list */ - *mqe_ptr_to_set = NULL; - assert(NULL != last_send); - - last_send->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_send->wr_id; - last_send->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if(OMPI_SUCCESS != rc) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Fan-in, adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -static int mca_bcol_iboffload_fanin_init( - bcol_function_args_t *input_args, - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t **coll_request) -{ - ompi_free_list_item_t *item = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = NULL; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_init")); - - OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item); - if(OPAL_UNLIKELY(NULL == item)) { - IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - (*coll_request) = (mca_bcol_iboffload_collreq_t *) item; - (*coll_request)->progress_fn = iboffload->fanin_algth; - - (*coll_request)->completion_cb_fn = NULL; - (*coll_request)->order_info = &input_args->order_info; - - (*coll_request)->module = iboffload; - (*coll_request)->ml_buffer_index = input_args->buffer_index; - (*coll_request)->buffer_info[SBUF].offset = 0; - (*coll_request)->buffer_info[RBUF].offset = 0; - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_BARRIER; - - input_args->bcol_opaque_data = (void *) (*coll_request); - - /* finish initializing full message descriptor */ - (*coll_request)->n_fragments = 1; - (*coll_request)->n_frags_sent = 1; - - (*coll_request)->n_frag_mpi_complete = 0; - (*coll_request)->n_frag_net_complete = 0; - - (*coll_request)->user_handle_freed = false; - - /* - * setup collective work request - */ - - /* get collective frag */ - coll_fragment = &(*coll_request)->first_collfrag; - mca_bcol_iboffload_collfrag_init(coll_fragment); - - coll_fragment->alg = FANIN_ALG; - coll_fragment->mq_index = COLL_MQ; - - /* Set mq credits */ - coll_fragment->mq_credits = iboffload->alg_task_consump[FANIN_ALG]; - - /* set pointers for (coll frag) <-> (coll full request) */ - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS(*coll_request, coll_fragment); - - return OMPI_SUCCESS; -} - -/************************************************************************ - ************************ New style Fan-In ****************************** - ***********************************************************************/ -static int mca_bcol_iboffload_new_style_fanin_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - - if (BCOL_IS_COMPLETED(coll_request)) { - coll_request->user_handle_freed = true; - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - - IBOFFLOAD_VERBOSE(10, ("Fan-In already done.\n")); - return BCOL_FN_COMPLETE; - } - - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_new_style_fanin_first_call( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int i = 0, leader_rank = 0, /* We always suppose - the lowest index is a leader */ - my_rank = iboffload->ibnet->super.my_index, - sbgp_size = iboffload->ibnet->super.group_size; - - mca_bcol_iboffload_endpoint_t *ep = NULL; - mca_sbgp_ibnet_proc_t *my_ibnet_proc = iboffload->endpoints[my_rank]->ibnet_proc; - - assert(NULL != my_ibnet_proc); - - if (MCA_SBGP_IBNET_NODE_LEADER == my_ibnet_proc->duty) { - iboffload->fanin_algth = mca_bcol_iboffload_fanin_leader_progress; - iboffload->alg_task_consump[FANIN_ALG] += sbgp_size; - - for (i = leader_rank + 1; i < sbgp_size; ++i) { - ep = iboffload->endpoints[i]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - } else { - iboffload->fanin_algth = mca_bcol_iboffload_fanin_proxy_progress; - iboffload->alg_task_consump[FANIN_ALG] += 1; - - ep = iboffload->endpoints[leader_rank]; - while(OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - return iboffload->fanin_algth(iboffload, coll_request); -} - -static int mca_bcol_iboffload_new_style_fanin_intra( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int rc = OMPI_SUCCESS; - - struct mca_bcol_iboffload_collreq_t *coll_request = NULL; - mca_bcol_iboffload_module_t *iboffload = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - assert(NULL != iboffload); - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, input_args); - - /* Init Fan-In collective reqeust */ - rc = mca_bcol_iboffload_fanin_init(input_args, iboffload, &coll_request); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Error from mca_bcol_iboffload_fanin_init.\n")); - return BCOL_FN_NOT_STARTED; - } - - rc = iboffload->fanin_algth(iboffload, coll_request); - if (OPAL_UNLIKELY(OMPI_ERROR == rc)) { - return BCOL_FN_NOT_STARTED; - } - - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_fanin_register(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register iboffload Fan-In.\n")); - - comm_attribs.bcoll_type = BCOL_FANIN; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_new_style_fanin_intra, - mca_bcol_iboffload_new_style_fanin_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_fanout.c b/ompi/mca/bcol/iboffload/bcol_iboffload_fanout.c deleted file mode 100644 index 9ac93d16e71..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_fanout.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -static int mca_bcol_iboffload_fanout_leader_progress( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc = OMPI_SUCCESS, leader_rank = 0, rank, - sbgp_size = iboffload->ibnet->super.group_size; - - struct mqe_task *last_send = NULL; - mca_bcol_iboffload_task_t *send_task = NULL; - mca_bcol_iboffload_frag_t *send_fragment = NULL; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - for (rank = leader_rank + 1; rank < sbgp_size; ++rank) { - /* post send */ - send_fragment = mca_bcol_iboffload_get_send_frag(coll_request, - rank, coll_request->qp_index, 0, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY); - if(NULL == send_fragment) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting and packing send frag.\n")); - goto out_of_resources; - } - - send_task = mca_bcol_iboffload_get_send_task(iboffload, rank, MCA_BCOL_IBOFFLOAD_QP_BARRIER, - send_fragment, coll_fragment, INLINE); - if(NULL == send_task) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting send task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, send_task, last_send); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - } - - /* end of list */ - *mqe_ptr_to_set = NULL; - assert(NULL != last_send); - - last_send->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_send->wr_id; - last_send->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if(OMPI_SUCCESS != rc) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Fan-in, adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -static int mca_bcol_iboffload_fanout_proxy_progress( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc = OMPI_SUCCESS, leader_rank = 0; - - struct mqe_task *last_wait = NULL; - mca_bcol_iboffload_task_t *wait_task = NULL; - mca_bcol_iboffload_frag_t *preposted_recv_frag = NULL; - - struct mqe_task **mqe_ptr_to_set; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - coll_fragment = (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mqe_ptr_to_set = &coll_fragment->to_post; - - if (OPAL_UNLIKELY(false == BCOL_IBOFFLOAD_MQ_HAVE_CREDITS( - iboffload, coll_fragment->mq_index, coll_fragment->mq_credits))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - goto out_of_resources; - } - - /* post wait */ - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - iboffload, leader_rank, coll_request->qp_index); - if(NULL == preposted_recv_frag) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(iboffload, leader_rank, 1, - preposted_recv_frag, coll_request->qp_index, NULL); - if(NULL == wait_task) { - IBOFFLOAD_VERBOSE(10, ("Failing for getting wait task.\n")); - goto out_of_resources; - } - - APPEND_TO_TASKLIST(mqe_ptr_to_set, wait_task, last_wait); - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - - /* end of list */ - *mqe_ptr_to_set = NULL; - - last_wait->flags |= MQE_WR_FLAG_SIGNAL; - - coll_fragment->signal_task_wr_id = last_wait->wr_id; - last_wait->wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(iboffload, coll_fragment->to_post); - if(OMPI_SUCCESS != rc) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - MCA_BCOL_UPDATE_ORDER_COUNTER(&iboffload->super, coll_request->order_info); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("Fan-in, adding collfrag to collfrag_pending")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, iboffload); -} - -static int mca_bcol_iboffload_fanout_init( - bcol_function_args_t *input_args, - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t **coll_request) -{ - ompi_free_list_item_t *item = NULL; - mca_bcol_iboffload_collfrag_t *coll_fragment = NULL; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_init")); - - OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item); - if(NULL == item) { - IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - (*coll_request) = (mca_bcol_iboffload_collreq_t *) item; - (*coll_request)->progress_fn = iboffload->fanout_algth; - - (*coll_request)->completion_cb_fn = NULL; - (*coll_request)->order_info = &input_args->order_info; - - (*coll_request)->module = iboffload; - (*coll_request)->ml_buffer_index = input_args->buffer_index; - (*coll_request)->buffer_info[SBUF].offset = 0; - (*coll_request)->buffer_info[RBUF].offset = 0; - (*coll_request)->qp_index = MCA_BCOL_IBOFFLOAD_QP_BARRIER; - - /* finish initializing full message descriptor */ - (*coll_request)->n_fragments = 1; - (*coll_request)->n_frags_sent = 1; - - (*coll_request)->n_frag_mpi_complete = 0; - (*coll_request)->n_frag_net_complete = 0; - - (*coll_request)->user_handle_freed = false; - - input_args->bcol_opaque_data = (void *) (*coll_request); - - /* - * setup collective work request - */ - - /* get collective frag */ - coll_fragment = &(*coll_request)->first_collfrag; - mca_bcol_iboffload_collfrag_init(coll_fragment); - - coll_fragment->alg = FANOUT_ALG; - coll_fragment->mq_index = COLL_MQ; - - /* Set mq credits */ - coll_fragment->mq_credits = iboffload->alg_task_consump[FANOUT_ALG]; - - /* set pointers for (coll frag) <-> (coll full request) */ - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS(*coll_request, coll_fragment); - - return OMPI_SUCCESS; -} - -/************************************************************************ - ************************ New style Fan-In ****************************** - ***********************************************************************/ -static int mca_bcol_iboffload_new_style_fanout_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_iboffload_collreq_t *coll_request = - (mca_bcol_iboffload_collreq_t *) - input_args->bcol_opaque_data; - - if (BCOL_IS_COMPLETED(coll_request)) { - coll_request->user_handle_freed = true; - if (COLLREQ_IS_DONE(coll_request)) { - IBOFFLOAD_VERBOSE(10, ("Coll request already done.\n")); - RELEASE_COLLREQ(coll_request); - } - - IBOFFLOAD_VERBOSE(10, ("Fan-Out already done.\n")); - return BCOL_FN_COMPLETE; - } - - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_new_style_fanout_first_call( - mca_bcol_iboffload_module_t *iboffload, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int i = 0, leader_rank = 0, /* We always suppose - the lowest index is a leader */ - my_rank = iboffload->ibnet->super.my_index, - sbgp_size = iboffload->ibnet->super.group_size; - - mca_bcol_iboffload_endpoint_t *ep = NULL; - mca_sbgp_ibnet_proc_t *my_ibnet_proc = iboffload->endpoints[my_rank]->ibnet_proc; - - assert(NULL != my_ibnet_proc); - - if (MCA_SBGP_IBNET_NODE_LEADER == my_ibnet_proc->duty) { - iboffload->fanout_algth = mca_bcol_iboffload_fanout_leader_progress; - iboffload->alg_task_consump[FANOUT_ALG] += sbgp_size; - - for (i = leader_rank + 1; i < sbgp_size; ++i) { - ep = iboffload->endpoints[i]; - while (OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - } else { - iboffload->fanout_algth = mca_bcol_iboffload_fanout_proxy_progress; - iboffload->alg_task_consump[FANOUT_ALG] += 1; - - ep = iboffload->endpoints[leader_rank]; - while(OMPI_SUCCESS != - check_endpoint_state(ep, NULL, NULL)) { - opal_progress(); - } - } - - return iboffload->fanout_algth(iboffload, coll_request); -} - -static int mca_bcol_iboffload_new_style_fanout_intra( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int rc = OMPI_SUCCESS; - - struct mca_bcol_iboffload_collreq_t *coll_request = NULL; - mca_bcol_iboffload_module_t *iboffload = - (mca_bcol_iboffload_module_t *) const_args->bcol_module; - - assert(NULL != iboffload); - - MCA_BCOL_CHECK_ORDER(const_args->bcol_module, input_args); - - /* Init Fan-In collective reqeust */ - rc = mca_bcol_iboffload_fanout_init(input_args, iboffload, &coll_request); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("Error from mca_bcol_iboffload_fanin_init.\n")); - return BCOL_FN_NOT_STARTED; - } - - rc = iboffload->fanout_algth(iboffload, coll_request); - if (OPAL_UNLIKELY(OMPI_ERROR == rc)) { - return BCOL_FN_NOT_STARTED; - } - - return BCOL_FN_STARTED; -} - -int mca_bcol_iboffload_fanout_register(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - IBOFFLOAD_VERBOSE(10, ("Register iboffload Fan-In.\n")); - - comm_attribs.bcoll_type = BCOL_FANOUT; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, - &comm_attribs, &inv_attribs, - mca_bcol_iboffload_new_style_fanout_intra, - mca_bcol_iboffload_new_style_fanout_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_frag.c b/ompi/mca/bcol/iboffload/bcol_iboffload_frag.c deleted file mode 100644 index 0ecf1ef62ea..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_frag.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "opal/include/opal/types.h" -#include "opal/datatype/opal_convertor.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_device.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_endpoint.h" - -static void frag_constructor(mca_bcol_iboffload_frag_t *frag) -{ - mca_bcol_iboffload_reg_t* reg = - (mca_bcol_iboffload_reg_t*) frag->super.registration; - - memset(&frag->sg_entry, 0, sizeof(struct ibv_sge)); - frag->sg_entry.addr = (uint64_t) (uintptr_t) frag->super.ptr; - - frag->registration = reg; - - if (NULL != reg) { - frag->sg_entry.lkey = reg->mr->lkey; - } - - frag->next = NULL; - frag->type = MCA_BCOL_IBOFFLOAD_NONE_OWNER; - frag->ref_counter = 0; - frag->qp_index = -1; -} - -OBJ_CLASS_INSTANCE( - mca_bcol_iboffload_frag_t, - ompi_free_list_item_t, - frag_constructor, - NULL); - - -static mca_bcol_iboffload_frag_t* - mca_bcol_iboffload_get_ml_frag_calc(mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collreq_t *coll_request, - size_t len, size_t src_offset) -{ - int rc; - - mca_bcol_iboffload_frag_t *fragment; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - uint64_t sbuff = (uint64_t) (uintptr_t) coll_request->buffer_info[SBUF].buf + - src_offset; - - /* The buffer was allocated on ML level, - no need to allocate local buffer */ - rc = pack_data_for_calc(iboffload->device->dev.ib_dev_context, - cm->map_ompi_to_ib_calcs[coll_request->op->op_type], - cm->map_ompi_to_ib_dt[coll_request->dtype->id], - false /* host order */, - (void *) sbuff, 0, - &coll_request->actual_ib_op, - &coll_request->actual_ib_dtype, - (void *) sbuff); - if (OPAL_UNLIKELY(0 != rc)) { - IBOFFLOAD_VERBOSE(10, ("pack_data_for_calc failed, op: %s, type: %s\n", - coll_request->op->o_name, coll_request->dtype->name)); - return NULL; - } - - fragment = mca_bcol_iboffload_get_ml_frag( - iboffload, coll_request->qp_index, len, - coll_request->buffer_info[SBUF].lkey, - sbuff); - - return fragment; -} - -static mca_bcol_iboffload_frag_t * -mca_bcol_iboffload_get_packed_frag(mca_bcol_iboffload_module_t *iboffload, - uint32_t destination, int qp_index, size_t len, - struct opal_convertor_t *convertor) -{ - /* local variables */ - int rc; - uint32_t out_size; - size_t max_size = 0; - - struct iovec payload_iovec; - - ompi_free_list_item_t *item; - mca_bcol_iboffload_frag_t *frag; - - mca_bcol_iboffload_device_t *device = iboffload->device; - - /* Get frag from free list */ - OMPI_FREE_LIST_GET_MT(&device->frags_free[qp_index], item); - if (OPAL_UNLIKELY(NULL == item)) { - return NULL; - } - - frag = (mca_bcol_iboffload_frag_t *) item; - - /* Pack data into the buffer */ - out_size = 1; - payload_iovec.iov_len = len; - - payload_iovec.iov_base = (void *) (uintptr_t) frag->sg_entry.addr; - - rc = opal_convertor_pack(convertor, &(payload_iovec), - &out_size, &max_size); - if (OPAL_UNLIKELY(rc < 0)) { - /* Error: put the fragment back */ - OMPI_FREE_LIST_RETURN_MT(&device->frags_free[qp_index], item); - return NULL; - } - - return frag; -} - -static mca_bcol_iboffload_frag_t * -mca_bcol_iboffload_get_calc_frag(mca_bcol_iboffload_module_t *iboffload, int qp_index, - struct mca_bcol_iboffload_collreq_t *coll_request) -{ - int rc; - - ompi_free_list_item_t *item; - mca_bcol_iboffload_frag_t *frag; - - mca_bcol_iboffload_device_t *device = iboffload->device; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Start to pack frag.\n")); - - /* Get frag from free list */ - OMPI_FREE_LIST_GET_MT(&device->frags_free[qp_index], item); - if (OPAL_UNLIKELY(NULL == item)) { - return NULL; - } - - frag = (mca_bcol_iboffload_frag_t *) item; - - /* Pack data into the buffer */ - rc = pack_data_for_calc(device->dev.ib_dev_context, - cm->map_ompi_to_ib_calcs[coll_request->op->op_type], - cm->map_ompi_to_ib_dt[coll_request->dtype->id], false, - coll_request->buffer_info[SBUF].buf, 0, - &coll_request->actual_ib_op, - &coll_request->actual_ib_dtype, - (void *) (uintptr_t) frag->sg_entry.addr); - if (OPAL_UNLIKELY(0 != rc)) { - IBOFFLOAD_ERROR(("pack_data_for_calc failed, op: %s, type: %s\n", - coll_request->op->o_name, coll_request->dtype->name)); - return NULL; - } - - return frag; -} - -mca_bcol_iboffload_frag_t* -mca_bcol_iboffload_get_send_frag(mca_bcol_iboffload_collreq_t *coll_request, - uint32_t destination, int qp_index, size_t len, - size_t src_offset, int buf_index, int send_frag_type) -{ - /* local variables */ - mca_bcol_iboffload_frag_t *frag; - mca_bcol_iboffload_module_t *iboffload = coll_request->module; - - mca_bcol_iboffload_endpoint_t *endpoint = - iboffload->endpoints[destination]; - - IBOFFLOAD_VERBOSE(10, ("Calling mca_bcol_iboffload_get_send_frag qp_index %d", - qp_index)); - - if ((endpoint->qps[qp_index].sd_wqe) <= 0) { - IBOFFLOAD_VERBOSE(10, ("No send wqe %d", - endpoint->qps[qp_index].sd_wqe)); - return NULL; - } - - --endpoint->qps[qp_index].sd_wqe; - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p: qp_index %d, destination %d, sd_wqe %d", - endpoint, qp_index, destination, endpoint->qps[qp_index].sd_wqe)); - - switch (send_frag_type) { - case MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY: - IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY")); - assert(NULL != &iboffload->device->dummy_frags[qp_index]); - return &iboffload->device->dummy_frags[qp_index]; - - case MCA_BCOL_IBOFFLOAD_SEND_FRAG: - { - ompi_free_list_item_t *item; - IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG")); - - /* Get frag from free list */ - OMPI_FREE_LIST_GET_MT(&iboffload->device->frags_free[qp_index], item); - - frag = (mca_bcol_iboffload_frag_t *) item; - } - - break; - case MCA_BCOL_IBOFFLOAD_SEND_FRAG_CONVERT: - IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG_CONVERT")); - frag = mca_bcol_iboffload_get_packed_frag(iboffload, destination, - qp_index, len, &coll_request->send_convertor); - - break; - case MCA_BCOL_IBOFFLOAD_SEND_FRAG_CALC: - IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG_CALC")); - frag = mca_bcol_iboffload_get_calc_frag(iboffload, qp_index, coll_request); - - break; - case MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML: - IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML")); - frag = mca_bcol_iboffload_get_ml_frag( - iboffload, qp_index, len, coll_request->buffer_info[buf_index].lkey, - (uint64_t)(uintptr_t) coll_request->buffer_info[buf_index].buf + src_offset); - - break; - case MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC: - frag = mca_bcol_iboffload_get_ml_frag_calc(iboffload, coll_request, len, src_offset); - IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC")); - - break; - default: - IBOFFLOAD_VERBOSE(10, ("Getting default")); - frag = NULL; - IBOFFLOAD_ERROR(("Unknown send frag type %d for QP index %d", - send_frag_type, qp_index)); - } - - if (OPAL_UNLIKELY(NULL == frag)) { - IBOFFLOAD_VERBOSE(10, ("Getting NULL")); - return NULL; - } - - frag->sg_entry.length = len; - frag->next = NULL; - - return frag; -} - -void -mca_bcol_iboffload_frag_init(ompi_free_list_item_t* item, void* ctx) -{ - int qp_index = *(int *) ctx; - mca_bcol_iboffload_frag_t *frag = (mca_bcol_iboffload_frag_t *) item; - - frag->qp_index = qp_index; - frag->type = MCA_BCOL_IBOFFLOAD_BCOL_OWNER; -} - -void -mca_bcol_iboffload_ml_frag_init(ompi_free_list_item_t* item, void* ctx) -{ - mca_bcol_iboffload_frag_t *frag = (mca_bcol_iboffload_frag_t *) item; - - frag->qp_index = -1; - frag->type = MCA_BCOL_IBOFFLOAD_ML_OWNER; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_frag.h b/ompi/mca/bcol/iboffload/bcol_iboffload_frag.h deleted file mode 100644 index fffc33f2935..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_frag.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_FRAG_H -#define MCA_BCOL_IBOFFLOAD_FRAG_H - -#include "ompi_config.h" - -#include - -#include "opal/datatype/opal_convertor.h" - -#include "opal/mca/mpool/mpool.h" -#include "opal/class/ompi_free_list.h" - -#include "bcol_iboffload.h" - -BEGIN_C_DECLS - -/* forward declarations */ -struct mca_bcol_iboffload_collreq_t; - -struct mca_bcol_iboffload_reg_t { - mca_mpool_base_registration_t base; - struct ibv_mr *mr; -}; -typedef struct mca_bcol_iboffload_reg_t mca_bcol_iboffload_reg_t; - -typedef enum { - MCA_BCOL_IBOFFLOAD_NONE_OWNER = -1, - MCA_BCOL_IBOFFLOAD_DUMMY_OWNER, - MCA_BCOL_IBOFFLOAD_BCOL_OWNER, - MCA_BCOL_IBOFFLOAD_ML_OWNER -} frag_type; - -typedef enum { - MCA_BCOL_IBOFFLOAD_SEND_FRAG, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_ML_CALC, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_CONVERT, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_CALC, - MCA_BCOL_IBOFFLOAD_SEND_FRAG_DUMMY -} send_frag_type; - -struct mca_bcol_iboffload_frag_t { - ompi_free_list_item_t super; - - struct mca_bcol_iboffload_frag_t *next; - struct mca_bcol_iboffload_reg_t *registration; - - struct ibv_sge sg_entry; - - frag_type type; - - int ref_counter; - int qp_index; -}; -typedef struct mca_bcol_iboffload_frag_t mca_bcol_iboffload_frag_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_frag_t); - -/* The same fragment maybe shared by multiple task. - * In order to manage right release and allocation flow - * we use reference counter on each fragment and the follow - * wrapper allocation and release function that hides - * the counter */ - -#define IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(fragment, task) \ - do { \ - ++((fragment)->ref_counter); \ - (task)->frag = (fragment); \ - } while(0) - -#define IBOFFLOAD_SET_FRAGS_ON_TASK(fragment, task) \ - do { \ - struct mca_bcol_iboffload_frag_t *temp_frag = fragment; \ - while (NULL != temp_frag) { \ - ++(temp_frag->ref_counter); \ - temp_frag = temp_frag->next; \ - } \ - (task)->frag = fragment; \ - } while(0) - -/* function declarations */ -mca_bcol_iboffload_frag_t * -mca_bcol_iboffload_get_send_frag(struct mca_bcol_iboffload_collreq_t *coll_request, - uint32_t destination, int qp_index, size_t len, - size_t src_offset, int buff_index, int send_frag_type); - -void -mca_bcol_iboffload_frag_init(ompi_free_list_item_t* item, void* ctx); -void -mca_bcol_iboffload_ml_frag_init(ompi_free_list_item_t* item, void* ctx); - -static inline __opal_attribute_always_inline__ -mca_bcol_iboffload_frag_t* mca_bcol_iboffload_get_ml_empty_frag( - mca_bcol_iboffload_module_t *iboffload, - int qp_index) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_frag_t *frag; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - /* Get frag from free list */ - OMPI_FREE_LIST_GET_MT(&cm->ml_frags_free, item); - if (OPAL_UNLIKELY(NULL == item)) { - return NULL; - } - - frag = (mca_bcol_iboffload_frag_t *) item; - - frag->qp_index = qp_index; - frag->next = NULL; - - return frag; -} - -static inline __opal_attribute_always_inline__ -mca_bcol_iboffload_frag_t* mca_bcol_iboffload_get_ml_frag( - mca_bcol_iboffload_module_t *iboffload, - int qp_index, size_t len, uint32_t lkey, uint64_t addr) -{ - /* local variables */ - mca_bcol_iboffload_frag_t *frag; - - IBOFFLOAD_VERBOSE(10, ("Call for get ML frag - addr 0x%x", addr)); - - frag = mca_bcol_iboffload_get_ml_empty_frag(iboffload, qp_index); - - frag->sg_entry.addr = addr; - frag->sg_entry.lkey = lkey; - frag->sg_entry.length = len; - - IBOFFLOAD_VERBOSE(10, ("Setting ml frag lkey %u, " - "addr %p, qp_index %d, send value - %lf", - frag->sg_entry.lkey, frag->sg_entry.addr, - qp_index, *(double *) frag->sg_entry.addr)); - - return frag; -} - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_mca.c b/ompi/mca/bcol/iboffload/bcol_iboffload_mca.c deleted file mode 100644 index 04f6f94ad9c..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_mca.c +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include - -#include "bcol_iboffload.h" -#include "bcol_iboffload_mca.h" - -#include "ompi/constants.h" -#include "ompi/mca/common/ofacm/base.h" -#include "ompi/communicator/communicator.h" - -#include "opal/util/show_help.h" - -/* - * Local flags - */ -enum { - REGINT_NEG_ONE_OK = 0x01, - REGINT_GE_ZERO = 0x02, - REGINT_GE_ONE = 0x04, - REGINT_NONZERO = 0x08, - REGINT_MAX = 0x88 -}; - -enum { - REGSTR_EMPTY_OK = 0x01, - REGSTR_MAX = 0x88 -}; - -mca_base_var_enum_value_t mtu_values[] = { - {IBV_MTU_256, "256B"}, - {IBV_MTU_512, "512B"}, - {IBV_MTU_1024, "1k"}, - {IBV_MTU_4096, "4k"}, - {0, NULL} -}; - -/* - * utility routine for string parameter registration - */ -static int reg_string(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - const char* default_value, char **storage, - int flags) -{ - int index; - - /* the MCA variable system will not attempt to modify this value */ - *storage = (char *) default_value; - index = mca_base_component_var_register(&mca_bcol_iboffload_component.super.bcol_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_STRING, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "bcol", "iboffload", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGSTR_EMPTY_OK) && 0 == strlen(*storage)) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -/* - * utility routine for integer parameter registration - */ -static int reg_int(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - int default_value, int *storage, int flags) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_bcol_iboffload_component.super.bcol_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_INT, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "bcol", "iboffload", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGINT_NEG_ONE_OK) && -1 == *storage) { - return OMPI_SUCCESS; - } - - if ((0 != (flags & REGINT_GE_ZERO) && *storage < 0) || - (0 != (flags & REGINT_GE_ONE) && *storage < 1) || - (0 != (flags & REGINT_NONZERO) && 0 == *storage)) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -/* - * utility routine for integer parameter registration - */ -static int reg_bool(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - bool default_value, bool *storage) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_bcol_iboffload_component.super.bcol_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_BOOL, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "bcol", "iboffload", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - return OMPI_SUCCESS; -} - -int mca_bcol_iboffload_verify_params(void) -{ - if (mca_bcol_iboffload_component.min_rnr_timer > 31) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_min_rnr_timer > 31", - "bcol_iboffload_ib_min_rnr_timer reset to 31"); - mca_bcol_iboffload_component.min_rnr_timer = 31; - } else if (mca_bcol_iboffload_component.min_rnr_timer < 0){ - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_min_rnr_timer < 0", - "bcol_iboffload_ib_min_rnr_timer reset to 0"); - mca_bcol_iboffload_component.min_rnr_timer = 0; - } - - if (mca_bcol_iboffload_component.timeout > 31) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_timeout > 31", - "bcol_iboffload_ib_timeout reset to 31"); - mca_bcol_iboffload_component.timeout = 31; - } else if (mca_bcol_iboffload_component.timeout < 0) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_timeout < 0", - "bcol_iboffload_ib_timeout reset to 0"); - mca_bcol_iboffload_component.timeout = 0; - } - - if (mca_bcol_iboffload_component.retry_count > 7) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_retry_count > 7", - "bcol_iboffload_ib_retry_count reset to 7"); - mca_bcol_iboffload_component.retry_count = 7; - } else if (mca_bcol_iboffload_component.retry_count < 0) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_retry_count < 0", - "bcol_iboffload_ib_retry_count reset to 0"); - mca_bcol_iboffload_component.retry_count = 0; - } - - if (mca_bcol_iboffload_component.max_rdma_dst_ops > 7) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_rnr_retry > 7", - "bcol_iboffload_ib_rnr_retry reset to 7"); - mca_bcol_iboffload_component.max_rdma_dst_ops = 7; - } else if (mca_bcol_iboffload_component.max_rdma_dst_ops < 0) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_rnr_retry < 0", - "bcol_iboffload_ib_rnr_retry reset to 0"); - mca_bcol_iboffload_component.max_rdma_dst_ops = 0; - } - - if (mca_bcol_iboffload_component.service_level > 15) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_service_level > 15", - "bcol_iboffload_ib_service_level reset to 15"); - mca_bcol_iboffload_component.service_level = 15; - } else if (mca_bcol_iboffload_component.service_level < 0) { - opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", - true, "bcol_iboffload_ib_service_level < 0", - "bcol_iboffload_ib_service_level reset to 0"); - mca_bcol_iboffload_component.service_level = 0; - } - - if(mca_bcol_iboffload_component.buffer_alignment <= 1 || - (mca_bcol_iboffload_component.buffer_alignment & (mca_bcol_iboffload_component.buffer_alignment - 1))) { - opal_show_help("help-mpi-btl-openib.txt", "wrong buffer alignment", - true, mca_bcol_iboffload_component.buffer_alignment, ompi_process_info.nodename, 64); - mca_bcol_iboffload_component.buffer_alignment = 64; - } - - return OMPI_SUCCESS; -} - -int mca_bcol_iboffload_register_params(void) -{ - mca_base_var_enum_t *new_enum; - char *msg; - int ret = OMPI_SUCCESS, tmp; - -#define CHECK(expr) do { \ - tmp = (expr); \ - if (OMPI_SUCCESS != tmp) ret = tmp; \ - } while (0) - - /* register openib component parameters */ - CHECK(reg_int("k_nomial_radix", NULL, - "The radix of the K-nomial tree for scatther-gather type algorithms" - "(starts from 2)", 2, &mca_bcol_iboffload_component.k_nomial_radix, - REGINT_GE_ONE)); - - CHECK(reg_int("priority", NULL, - "IB offload component priority" - "(from 0(low) to 90 (high))", 90, - &mca_bcol_iboffload_component.super.priority, 0)); - - CHECK(reg_int("verbose", NULL, - "Output some verbose IB offload BTL information " - "(0 = no output, nonzero = output)", 0, - &mca_bcol_iboffload_component.verbose, 0)); - - CHECK(reg_bool("warn_default_gid_prefix", NULL, - "Warn when there is more than one active ports and at least one of them connected to the network with only default GID prefix configured (0 = do not warn; any other value = warn)", - true, &mca_bcol_iboffload_component.warn_default_gid_prefix)); - - CHECK(reg_bool("warn_nonexistent_if", NULL, - "Warn if non-existent devices and/or ports are specified in the bcol_iboffla_if_[in|ex]clude MCA parameters (0 = do not warn; any other value = warn)", - true, &mca_bcol_iboffload_component.warn_nonexistent_if)); - - CHECK(reg_int("max_pipeline_depth", NULL, - "The maximal number of fragments of the same collective request that can be transferred in parallel", 3, - (int *) &mca_bcol_iboffload_component.max_pipeline_depth, 0)); - - CHECK(reg_int("max_mqe_tasks", NULL, - "Maximum number of MQEs for each iboffload module", - 1024, &mca_bcol_iboffload_component.max_mqe_tasks, 0)); - CHECK(reg_int("max_mq_size", NULL, - "Maximum size of each MQ for each iboffload module", - 1024, &mca_bcol_iboffload_component.max_mq_size, 0)); - CHECK(reg_int("free_list_num", NULL, - "Intial size of free lists (must be >= 1)", - 256, &mca_bcol_iboffload_component.free_list_num, - REGINT_GE_ONE)); - CHECK(reg_int("free_list_max", NULL, - "Maximum size of free lists " - "(-1 = infinite, otherwise must be >= 0)", - -1, &mca_bcol_iboffload_component.free_list_max, - REGINT_NEG_ONE_OK | REGINT_GE_ONE)); - CHECK(reg_int("free_list_inc", NULL, - "Increment size of free lists (must be >= 1)", - 32, &mca_bcol_iboffload_component.free_list_inc, - REGINT_GE_ONE)); - /* rdma mpool no longer exists - must use the grdma mpool component, should resolve errors in - * mtt testing - */ - /* - CHECK(reg_string("mpool", NULL, - "Name of the memory pool to be used (it is unlikely that you will ever want to change this", - "rdma", &mca_bcol_iboffload_component.mpool_name, - 0)); - */ - CHECK(reg_string("mpool", NULL, - "Name of the memory pool to be used (it is unlikely that you will ever want to change this", - "grdma", &mca_bcol_iboffload_component.mpool_name, - 0)); - CHECK(reg_int("cq_size", "cq_size", - "Size of the OpenFabrics completion " - "queue (will automatically be set to a minimum of " - "(2 * number_of_peers * bcol_iboffload_rd_num))", - 1024, &mca_bcol_iboffload_component.cq_size, REGINT_GE_ONE)); - - CHECK(reg_int("exchange_tree_order", NULL, - "The order of the exchange tree. " - "Must be power of two.", - 2, &mca_bcol_iboffload_component.exchange_tree_order, REGINT_GE_ONE)); - - CHECK(reg_int("knomial_tree_order", NULL, - "The order of the knomial exchange tree. ", - 3, &mca_bcol_iboffload_component.knomial_tree_order, REGINT_GE_ONE)); - - - CHECK(reg_int("max_inline_data", "max_inline_data", - "Maximum size of inline data segment " - "(-1 = run-time probe to discover max value, " - "otherwise must be >= 0). " - "If not explicitly set, use max_inline_data from " - "the INI file containing device-specific parameters", - 128, (int *) &mca_bcol_iboffload_component.max_inline_data, - REGINT_NEG_ONE_OK | REGINT_GE_ZERO)); - -#if 0 - CHECK(reg_string("pkey", "ib_pkey_val", - "OpenFabrics partition key (pkey) value. " - "Unsigned integer decimal or hex values are allowed (e.g., \"3\" or \"0x3f\") and will be masked against the maximum allowable IB paritition key value (0x7fff)", - "0", &pkey, 0)); - /* Pasha - mca_bcol_iboffload_component.pkey_val = - ompi_btl_openib_ini_intify(pkey) & MCA_BTL_IB_PKEY_MASK; - free(pkey); - */ -#endif - - CHECK(reg_string("receive_queues", NULL, - "Colon-delimited, comma delimited list of receive queues: P,4096,8,6,4:P,32768,8,6,4", - "P,512,256,192,128", &mca_bcol_iboffload_component.receive_queues, - 0)); - - CHECK(reg_int("qp_ous_rd_atom", NULL, - "InfiniBand outstanding atomic reads (must be >= 0)", 4, - (int *) &mca_bcol_iboffload_component.qp_ous_rd_atom, REGINT_GE_ZERO)); - - asprintf(&msg, "OpenFabrics MTU, in bytes (if not specified in INI files). Valid values are: %d=256 bytes, %d=512 bytes, %d=1024 bytes, %d=2048 bytes, %d=4096 bytes", - IBV_MTU_256, - IBV_MTU_512, - IBV_MTU_1024, - IBV_MTU_2048, - IBV_MTU_4096); - if (NULL == msg) { - /* Don't try to recover from this */ - return OMPI_ERR_OUT_OF_RESOURCE; - } - CHECK(mca_base_var_enum_create("infiniband mtu", mtu_values, &new_enum)); - mca_bcol_iboffload_component.mtu = IBV_MTU_1024; - tmp = mca_base_component_var_register(&mca_bcol_iboffload_component.super.bcol_version, - "mtu", msg, MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, - OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_bcol_iboffload_component.mtu); - OBJ_RELEASE(new_enum); - free(msg); - - if (0 > tmp) ret = tmp; - - tmp = mca_base_var_register_synonym(tmp, "ompi", "bcol", "iboffload", "ib_mtu", - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - if (0 > tmp) ret = tmp; - - CHECK(reg_int("ib_min_rnr_timer", NULL, "InfiniBand minimum " - "\"receiver not ready\" timer, in seconds " - "(must be >= 0 and <= 31)", - 1 , &mca_bcol_iboffload_component.min_rnr_timer, 0)); - - CHECK(reg_int("ib_timeout", NULL, "InfiniBand transmit timeout, plugged into formula: 4.096 microseconds * " - "(2^bcol_iboffload_ib_timeout) (must be >= 0 and <= 31)", - 20, &mca_bcol_iboffload_component.timeout, 0)); - - CHECK(reg_int("ib_retry_count", NULL, "InfiniBand transmit retry count " - "(must be >= 0 and <= 7)", - 7, &mca_bcol_iboffload_component.retry_count, 0)); - - CHECK(reg_int("ib_rnr_retry", NULL, "InfiniBand \"receiver not ready\" " - "retry count; applies *only* to SRQ/XRC queues. PP queues " - "use RNR retry values of 0 because Open MPI performs " - "software flow control to guarantee that RNRs never occur " - "(must be >= 0 and <= 7; 7 = \"infinite\")", - 7, &mca_bcol_iboffload_component.rnr_retry, 0)); - - CHECK(reg_int("ib_max_rdma_dst_ops", NULL, "InfiniBand maximum pending RDMA " - "destination operations " - "(must be >= 0)", - 4, &mca_bcol_iboffload_component.max_rdma_dst_ops, REGINT_GE_ZERO)); - - CHECK(reg_int("ib_service_level", NULL, "InfiniBand service level " - "(must be >= 0 and <= 15)", - 0, &mca_bcol_iboffload_component.service_level, 0)); - - CHECK(reg_int("buffer_alignment", NULL, - "Prefered communication buffer alignment, in bytes " - "(must be > 0 and power of two)", - 64, &mca_bcol_iboffload_component.buffer_alignment, REGINT_GE_ZERO)); - - /* register parmeters controlling message fragementation */ - CHECK(reg_int("min_frag_size", NULL, - "Minimum fragment size", - getpagesize(), &mca_bcol_iboffload_component.super.min_frag_size, - REGINT_GE_ONE)); - - CHECK(reg_int("max_frag_size", NULL, - "Maximum fragment size", - FRAG_SIZE_NO_LIMIT, &mca_bcol_iboffload_component.super.max_frag_size, - REGINT_NONZERO)); - - CHECK(reg_bool("can_use_user_buffers", NULL, - "User memory can be used by the collective algorithms", - true, &mca_bcol_iboffload_component.super.can_use_user_buffers)); - - CHECK(reg_int("barrier_mode", NULL, - "Barrier mode: 0 - Recursive doubling; 1 - Recursive K-ing", - 0, &mca_bcol_iboffload_component.barrier_mode, REGINT_GE_ZERO)); - - CHECK(reg_int("max_progress_pull", NULL, - "Max number of progress pull checks", - 8, &mca_bcol_iboffload_component.max_progress_pull, REGINT_GE_ZERO)); - - CHECK(reg_int("use_brucks_smsg_alltoall_rdma", NULL, - "Use brucks algorithm for smsg alltoall and RDMA semantics 1 = No Temp buffer recycling" - "1 = Alg with no Temp Buffer Recycling (faster), 2 = Alg with temp Buffer Recycling (slower)", - 0, &mca_bcol_iboffload_component.use_brucks_smsg_alltoall_rdma, 0)); - - CHECK(reg_int("use_brucks_smsg_alltoall_sr", NULL, - "Use brucks algorithm for smsg alltoall and Send/Recv semantics " - "1 = Alg with RTR (faster), 2 = Alg with RNR (slower)", - 0, &mca_bcol_iboffload_component.use_brucks_smsg_alltoall_sr, 0)); - - CHECK(reg_int("alltoall_bruck_radix", NULL, - "Radix for Bruck algorithm for smsg alltoall", - 3, &mca_bcol_iboffload_component.k_alltoall_bruck_radix, 0)); - - CHECK(reg_int("k_alltoall_bruck_radix", NULL, - "Temp Buffer alignment for Bruck algorithm for smsg alltoall", - 64, &mca_bcol_iboffload_component.tmp_buf_alignment, 0)); - - /* - CHECK(reg_string("if_include", NULL, - "Comma-delimited list of devices/ports to be used (e.g. \"mthca0,mthca1:2\"; empty value means to use all ports found). Mutually exclusive with bcol_iboffload_if_exclude.", - NULL, &mca_bcol_iboffload_component.if_include, - 0)); - - CHECK(reg_string("if_exclude", NULL, - "Comma-delimited list of device/ports to be excluded (empty value means to not exclude any ports). Mutually exclusive with bcol_iboffload_if_include.", - NULL, &mca_bcol_iboffload_component.if_exclude, - 0)); - */ - - CHECK(mca_bcol_iboffload_verify_params()); - - /* Register any MCA params for the connect pseudo-components */ - if (OMPI_SUCCESS == ret) { - ret = ompi_common_ofacm_base_register(&mca_bcol_iboffload_component.super.bcol_version); - } - - return ret; -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_mca.h b/ompi/mca/bcol/iboffload/bcol_iboffload_mca.h deleted file mode 100644 index 193860f2c47..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_mca.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - /** @file */ - -#ifndef MCA_BCOL_IBOFFLOAD_MCA_H -#define MCA_BCOL_IBOFFLOAD_MCA_H - -#include "ompi_config.h" - -int mca_bcol_iboffload_register_params(void); -int mca_bcol_iboffload_verify_params(void); - -#endif diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_module.c b/ompi/mca/bcol/iboffload/bcol_iboffload_module.c deleted file mode 100644 index 90107b21ee8..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_module.c +++ /dev/null @@ -1,1538 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "opal/util/arch.h" -#include "opal/include/opal/types.h" -#include "opal/datatype/opal_datatype.h" - -#include "ompi/mca/bcol/base/base.h" -#include "opal/mca/mpool/base/base.h" -#include "ompi/communicator/communicator.h" -#include "opal/mca/mpool/grdma/mpool_grdma.h" -#include "ompi/mca/coll/ml/coll_ml_allocation.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" -#include "bcol_iboffload_bcast.h" -#include "bcol_iboffload_device.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_collfrag.h" -#include "bcol_iboffload_endpoint.h" - -static int init_rdma_buf_desc(mca_bcol_iboffload_rdma_buffer_desc_t **desc, void *base_addr, uint32_t num_banks, - uint32_t num_buffers_per_bank, uint32_t size_buffer, uint32_t header_size); - -static int set_endpoint_remote_rdma_info(mca_bcol_iboffload_endpoint_t *ep, mca_bcol_iboffload_rdma_info_t *remote_rdma_info); - -static void -mca_bcol_iboffload_module_construct(mca_bcol_iboffload_module_t *module) -{ - int i; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - /* set all to zero */ - module->group_size = 0; - module->segment_size = 0; - module->collective_tag = 0; - module->ibnet = NULL; - module->cgroup_index = 0; - - module->num_endpoints = 0; - module->endpoints = NULL; - - /* initi the previous sequence number */ - module->prev_sequence_num = -1; - - switch (cm->barrier_mode) { - case (0): module->barrier_algth = - mca_bcol_iboffload_barrier_intra_recursive_doubling_start; - break; - case (1): module->barrier_algth = - mca_bcol_iboffload_barrier_intra_recursive_knomial_start; - break; - default: module->barrier_algth = NULL; - } - - module->allreduce_algth = NULL; - module->fanin_algth = mca_bcol_iboffload_new_style_fanin_first_call; - module->fanout_algth = mca_bcol_iboffload_new_style_fanout_first_call; - module->memsync_algth = mca_bcol_iboffload_nb_memory_service_barrier_start; - - memset(module->mq, 0, sizeof(module->mq[0]) * BCOL_IBOFFLOAD_MQ_NUM); - memset(module->alg_task_consump, 0, sizeof(uint32_t) * LAST_ALG); - memset(module->connection_status, 0, sizeof(bool) * LAST_ALG); - - for (i = 0; i < BCOL_IBOFFLOAD_MQ_NUM; i++) { - module->mq_credit[i] = mca_bcol_iboffload_component.max_mqe_tasks; - } - - module->super.bcol_component = - (mca_bcol_base_component_t *) &mca_bcol_iboffload_component; - - /* We need two MQ's tasks for exchange with remote addresses */ - module->alg_task_consump[REMOTE_EXCHANGE_ALG] += 2; - - module->power_of_2_ranks = 0; - /* it is safe to set all the remote block to zero */ - memset(&module->rdma_block, 0, sizeof(mca_bcol_iboffload_local_rdma_block_t)); - - module->super.list_n_connected = NULL; - - OBJ_CONSTRUCT(&module->collfrag_pending, opal_list_t); -} - -static void -mca_bcol_iboffload_module_destruct(mca_bcol_iboffload_module_t *module) -{ - int i = 0; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("Module - %p: start to destroy; " - "pending queue size - %d.\n", - module, opal_list_get_size(&module->collfrag_pending))); - - /* Make sure that we done with all pending collective frags */ - while (opal_list_get_size(&module->collfrag_pending) > 0) { - opal_progress(); - } - - OBJ_DESTRUCT(&module->collfrag_pending); - - IBOFFLOAD_VERBOSE(10, ("module->mq_credit - %d, cm->max_mqe_tasks - %d.\n", - module->mq_credit[0], cm->max_mqe_tasks)); - /* Make sure that you got completion on all outstanding collectives */ - for (i = 0; i < BCOL_IBOFFLOAD_MQ_NUM; i++) { - while (module->mq_credit[i] != (int) cm->max_mqe_tasks) { - opal_progress(); - } - } - - IBOFFLOAD_VERBOSE(10, ("All credits were returned.\n")); - - if (NULL != module && NULL != module->mq) { - for (i = 0; i < BCOL_IBOFFLOAD_MQ_NUM; i++) { - if (0 != mqe_context_destroy(module->mq[i])) { - IBOFFLOAD_ERROR(("Error destroying MQ for device (%s), error: %s\n", - ibv_get_device_name(module->device->dev.ib_dev), strerror(errno))); - } - } - - IBOFFLOAD_VERBOSE(10, ("MQ %d was destroyed.\n", i)); - } - - if (NULL != module->endpoints) { - mca_bcol_iboffload_endpoint_t *ep; - int qp_index, num_qps = cm->num_qps; - - for (i = 0; i < module->num_endpoints; ++i) { - if (NULL != module->endpoints[i]) { - /* Make sure that we get completions on all outstanding send requests */ - ep = module->endpoints[i]; - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - IBOFFLOAD_VERBOSE(10, ("qp_index - %d, ep->index - %d, " - "ep->qps[qp_index].sd_wqe - %d, " - "cm->qp_infos[qp_index].rd_num - %d.\n", - qp_index, ep->index, - ep->qps[qp_index].sd_wqe, - cm->qp_infos[qp_index].rd_num)); - - while (ep->qps[qp_index].sd_wqe != cm->qp_infos[qp_index].rd_num) { - opal_progress(); - } - - IBOFFLOAD_VERBOSE(10, ("qp_index - %d, ep->index - %d; " - "All sends were sent.\n", - qp_index, ep->index)); - } - - OBJ_RELEASE(ep); - } - } - - free(module->endpoints); - } - - netpatterns_free_recursive_doubling_tree_node(&module->n_exchange_tree); - netpatterns_free_recursive_doubling_tree_node(&module->recursive_doubling_tree); - - OBJ_RELEASE(module->device->net_context); - OBJ_RELEASE(module->device); - - if (NULL != module->super.list_n_connected) { - free(module->super.list_n_connected); - module->super.list_n_connected = NULL; - } - - OBJ_DESTRUCT(&module->iovec_tasks_free); - - IBOFFLOAD_VERBOSE(10, ("module - %p was successfully destructed.\n", module)); -} - -OBJ_CLASS_INSTANCE(mca_bcol_iboffload_module_t, - mca_bcol_base_module_t, - mca_bcol_iboffload_module_construct, - mca_bcol_iboffload_module_destruct); - -static int iboffload_init_port(struct mca_bcol_iboffload_device_t *device, - struct mca_bcol_iboffload_port_t *p) -{ - union ibv_gid gid; - struct ibv_port_attr ib_port_attr; - - if (ibv_query_port(device->dev.ib_dev_context, p->id, &ib_port_attr)){ - IBOFFLOAD_ERROR(("Error getting port attributes for device %s " - "port number %d errno says %s", - ibv_get_device_name(device->dev.ib_dev), p->id, strerror(errno))); - return OMPI_ERR_NOT_FOUND; - } - - /* Set port data */ - p->lmc = (1 << ib_port_attr.lmc); - p->lid = ib_port_attr.lid; - p->stat = ib_port_attr.state; - p->mtu = ib_port_attr.active_mtu; - - IBOFFLOAD_VERBOSE(10, (" Setting port data (%s:%d) lid=%d, lmc=%d, stat=%d, mtu=%d\n", - ibv_get_device_name(device->dev.ib_dev), p->id, p->lid, - p->lmc, p->stat, p->mtu)); - - if (0 != ibv_query_gid(device->dev.ib_dev_context, p->id, 0, &gid)) { - IBOFFLOAD_ERROR(("ibv_query_gid failed (%s:%d)\n", - ibv_get_device_name(device->dev.ib_dev), p->id)); - return OMPI_ERR_NOT_FOUND; - } - - /* set subnet data */ - p->subnet_id = ntoh64(gid.global.subnet_prefix); - IBOFFLOAD_VERBOSE(10, ("my IB-only subnet_id for HCA %s port %d is %lx", - ibv_get_device_name(device->dev.ib_dev), p->id, p->subnet_id)); - - return OMPI_SUCCESS; -} - -/* mpool allocation maybe changed in future, so lets keep it as separate function */ -static int prepare_mpool(mca_bcol_iboffload_device_t *device) -{ - int ret = OMPI_SUCCESS; - mca_mpool_base_resources_t resources; - - resources.reg_data = (void *) device; - resources.sizeof_reg = sizeof(mca_bcol_iboffload_reg_t); - - resources.register_mem = mca_bcol_iboffload_register_mr; - resources.deregister_mem = mca_bcol_iboffload_deregister_mr; - - device->mpool = - mca_mpool_base_module_create(mca_bcol_iboffload_component.mpool_name, - device, &resources); - if (NULL == device->mpool){ - opal_output(0, "error creating IB memory pool for %s errno says %s\n", - ibv_get_device_name(device->dev.ib_dev), strerror(errno)); - ret = OMPI_ERROR; - } - - return ret; -} - -/* Allocate device related resources: mpool, pd, cq, free_lists */ -static int allocate_device_resources(mca_bcol_iboffload_device_t *device) -{ - int qp_index, num_qps, rc; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - void* dummy_mem = (void *) &device->dummy_mem[0]; - - num_qps = cm->num_qps; - - /* We have some active ports, alloce pd */ - device->ib_pd = ibv_alloc_pd(device->dev.ib_dev_context); - if (NULL == device->ib_pd){ - IBOFFLOAD_ERROR(("Error allocating protection domain for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - return OMPI_ERROR; - } - - /* Pasha: allocate mpool here */ - if (OMPI_SUCCESS != prepare_mpool(device)) { - return OMPI_ERROR; - } - - /* Allocating free list of memory registered fragments */ - device->frags_free = (ompi_free_list_t *) calloc( - num_qps, sizeof(ompi_free_list_t)); - - if (NULL == device->frags_free) { - IBOFFLOAD_ERROR(("Error allocating memory for " - "frags array, dev: %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), - strerror(errno))); - - return OMPI_ERROR; - } - - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - mca_bcol_iboffload_alloc_qps_resource_fn_t alloc_resource = - cm->qp_infos[qp_index].alloc_resource; - - if (NULL != alloc_resource) { - if (OMPI_SUCCESS != alloc_resource(qp_index, device)) { - return OMPI_ERROR; - } - } - - } - - if (OMPI_SUCCESS != - mca_bcol_iboffload_adjust_cq(device, &device->ib_cq)) { - IBOFFLOAD_ERROR(("Error creating CQ for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - return OMPI_ERROR; - } - - if (OMPI_SUCCESS != - mca_bcol_iboffload_adjust_cq(device, &device->ib_mq_cq)) { - IBOFFLOAD_ERROR(("Error creating mq CQ for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - return OMPI_ERROR; - } - - rc = mca_bcol_iboffload_register_mr((void *) device, dummy_mem, - sizeof(char) * BCOL_IBOFFLOAD_DUMMY_MEM_SIZE, - &device->dummy_reg.base); - - if (OMPI_SUCCESS != rc) { - IBOFFLOAD_ERROR(("Dummy memory registration failed for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - return OMPI_ERROR; - } - - for (qp_index = 0; qp_index < num_qps; ++qp_index) { - mca_bcol_iboffload_frag_t *frag = &device->dummy_frags[qp_index]; - - memset(&frag->super.registration, 0, sizeof(mca_mpool_base_registration_t)); - OBJ_CONSTRUCT(frag, mca_bcol_iboffload_frag_t); - - frag->qp_index = qp_index; - frag->type = MCA_BCOL_IBOFFLOAD_DUMMY_OWNER; - - frag->registration = &device->dummy_reg; - - frag->super.ptr = dummy_mem; - frag->super.registration = &device->dummy_reg.base; - - frag->sg_entry.length = 0; - frag->sg_entry.lkey = device->dummy_reg.mr->lkey; - frag->sg_entry.addr = (uint64_t) (uintptr_t) dummy_mem; - } - - return OMPI_SUCCESS; -} - -/* Register memory */ -int mca_bcol_iboffload_register_mr(void *reg_data, void *base, size_t size, - mca_mpool_base_registration_t *reg) -{ - mca_bcol_iboffload_device_t *device = (mca_bcol_iboffload_device_t *) reg_data; - mca_bcol_iboffload_reg_t *iboffload_reg = (mca_bcol_iboffload_reg_t *) reg; - - iboffload_reg->mr = ibv_reg_mr(device->ib_pd, base, size, - IBV_ACCESS_LOCAL_WRITE | - IBV_ACCESS_REMOTE_WRITE | - IBV_ACCESS_REMOTE_READ); - - if (NULL == iboffload_reg->mr) { - IBOFFLOAD_ERROR(("Device %s: %p addr, %d bytes registration failed.", - ibv_get_device_name(device->dev.ib_dev), base, size)); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - IBOFFLOAD_VERBOSE(10, ("Device %s: memory register addr=%p, len=%d, mr - %p.", - ibv_get_device_name(device->dev.ib_dev), base, size, iboffload_reg->mr)); - - return OMPI_SUCCESS; -} - -/* Deregister memory */ -int mca_bcol_iboffload_deregister_mr(void *reg_data, mca_mpool_base_registration_t *reg) -{ - mca_bcol_iboffload_device_t *device = (mca_bcol_iboffload_device_t *) reg_data; - mca_bcol_iboffload_reg_t *iboffload_reg = (mca_bcol_iboffload_reg_t *) reg; - - IBOFFLOAD_VERBOSE(10, ("Device %s: mr - %p.", - ibv_get_device_name(device->dev.ib_dev), iboffload_reg->mr)); - - if (NULL != iboffload_reg->mr) { - if (ibv_dereg_mr(iboffload_reg->mr)) { - IBOFFLOAD_ERROR(("Device %s: error unpinning iboffload memory errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - return OMPI_ERROR; - } - } - - IBOFFLOAD_VERBOSE(10, ("Device %s: memory deregister succeeded.", - ibv_get_device_name(device->dev.ib_dev))); - - iboffload_reg->mr = NULL; - - return OMPI_SUCCESS; -} - -/* We need to keep separate registration function for - ML list memory managment */ -static int mca_bcol_iboffload_lmngr_register(void *context_data, - void *base, size_t size, - void **reg_desc) -{ - struct ibv_mr *mr; - mca_bcol_iboffload_device_t *device = - (mca_bcol_iboffload_device_t *) context_data; - - mr = ibv_reg_mr(device->ib_pd, base, size, - IBV_ACCESS_LOCAL_WRITE | - IBV_ACCESS_REMOTE_WRITE | - IBV_ACCESS_REMOTE_READ); - - if (NULL == mr) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - IBOFFLOAD_VERBOSE(10, ("Device %s: memory register addr=%p, len=%d", - ibv_get_device_name(device->dev.ib_dev), base, size)); - - *reg_desc = (void *) mr; - - /* Make sure that the addr stays the same */ - assert(mr->addr == base); - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_lmngr_deregister(void *context_data, void *reg_desc) -{ - struct ibv_mr *mr = (struct ibv_mr *) reg_desc; - mca_bcol_iboffload_device_t *device = - (mca_bcol_iboffload_device_t *) context_data; - - if (mr != NULL) { - if (ibv_dereg_mr(mr)) { - IBOFFLOAD_ERROR(("Device %s: error unpinning iboffload memory errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - return OMPI_ERROR; - } - } - - return OMPI_SUCCESS; -} - -static int iboffload_start_device(mca_bcol_iboffload_device_t *device) -{ - int port_cnt, port, ret; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - -#if HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE - if (IBV_TRANSPORT_IB != device->dev.ib_dev->transport_type) { - IBOFFLOAD_VERBOSE(10, ("Skipping non IB device %s", - ibv_get_device_name(device->dev.ib_dev))); - goto error; - } -#endif - - /* Open device context */ - IBOFFLOAD_VERBOSE(10, ("Open IB device - %p", device->dev.ib_dev)); - - device->dev.ib_dev_context = ibv_open_device(device->dev.ib_dev); - if (NULL == device->dev.ib_dev_context) { - IBOFFLOAD_ERROR(("Error obtaining device context for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - goto error; - } - - if (ibv_query_device(device->dev.ib_dev_context, &device->ib_dev_attr)) { - IBOFFLOAD_ERROR(("error obtaining device attributes for %s errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - goto error; - } - - port_cnt = device->ib_dev_attr.phys_port_cnt; - if (0 == port_cnt) { - goto error; - } - - device->ports = (mca_bcol_iboffload_port_t *) - calloc(port_cnt, sizeof(mca_bcol_iboffload_port_t)); - if (NULL == device->ports) { - goto error; - } - - /* Note ports are 1 based (i >= 1) */ - for (port = 1; port <= port_cnt; port++) { - int pi = port - 1; /* port array index starts from zero */ - - struct ibv_port_attr ib_port_attr; - memset(&ib_port_attr, 0, sizeof(ib_port_attr)); - - if (ibv_query_port(device->dev.ib_dev_context, (uint8_t) port, &ib_port_attr)) { - IBOFFLOAD_ERROR(("Error getting port attributes for device %s " - "port number %d errno says %s", - ibv_get_device_name(device->dev.ib_dev), port, strerror(errno))); - continue; - } - - if (IBV_PORT_ACTIVE == ib_port_attr.state) { - /* Pasha: Need to think how we want to handle MTUs - if (ib_port_attr.active_mtu < mca_bcol_iboffload_component.mtu){ - device->mtu = ib_port_attr.active_mtu; - } - */ - /* start to put port info */ - ++device->num_act_ports; - device->ports[pi].id = port; - device->ports[pi].stat = ib_port_attr.state; - device->ports[pi].mtu = ib_port_attr.active_mtu; - - if (0 == cm->pkey_val) { - ret = iboffload_init_port(device, &device->ports[pi]); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Device %s " - "port number %d , failed to init port, errno says %s", - ibv_get_device_name(device->dev.ib_dev), - port, strerror(errno))); - continue; - } - } else { - uint16_t pkey, j; - for (j = 0; j < device->ib_dev_attr.max_pkeys; j++) { - if (ibv_query_pkey(device->dev.ib_dev_context, (uint8_t) port, j, &pkey)) { - IBOFFLOAD_ERROR(("error getting pkey for index %d, device %s " - "port number %d errno says %s", - j, ibv_get_device_name(device->dev.ib_dev), port, strerror(errno))); - continue; - } - - pkey = ntohs(pkey) & MCA_BCOL_IBOFFLOAD_PKEY_MASK; - if (pkey == cm->pkey_val) { - ret = iboffload_init_port(device, &device->ports[pi]); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Device %s " - "port number %d , failed to init port, errno says %s", - ibv_get_device_name(device->dev.ib_dev), - port, strerror(errno))); - continue; - } - } - } - } - } - } - - if (0 == device->num_act_ports) { - goto error; - } - - if (OMPI_SUCCESS != allocate_device_resources(device)) { - goto error; - } - - /* setup network context on device */ - device->net_context = OBJ_NEW(bcol_base_network_context_t); - - device->net_context->context_data = (void *) device; - - device->net_context->register_memory_fn = mca_bcol_iboffload_lmngr_register; - device->net_context->deregister_memory_fn = mca_bcol_iboffload_lmngr_deregister; - - /* the device is ready now */ - device->activated = true; - return OMPI_SUCCESS; - -error: - /* Pasha: need to add nice resource clean up */ - return OMPI_ERROR; -} -static void mca_bcol_iboffload_set_small_msg_thresholds(struct mca_bcol_base_module_t *super) -{ - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *) super; - - /* Set the Bcast threshold, for IB it equals to ML buffer size */ - super->small_message_thresholds[BCOL_BCAST] = - iboffload_module->rdma_block.ml_mem_desc->size_buffer; - - if ((mca_bcol_iboffload_component.use_brucks_smsg_alltoall_rdma) - || (mca_bcol_iboffload_component.use_brucks_smsg_alltoall_sr)) { - /* Set the Alltoall threshold, for Bruck's algth we use 1.5 of the buff size */ - super->small_message_thresholds[BCOL_ALLTOALL] = - (iboffload_module->rdma_block.ml_mem_desc->size_buffer / 3) * 2; - } else { - /* Set the Alltoall threshold, for this case it equals to a half of the ML buffer size */ - super->small_message_thresholds[BCOL_ALLTOALL] = - iboffload_module->rdma_block.ml_mem_desc->size_buffer / 2; - } - - /* Set the Allreduce threshold, for IB it equals to ML buffer size */ - super->small_message_thresholds[BCOL_ALLREDUCE] = - iboffload_module->rdma_block.ml_mem_desc->size_buffer; - - /* Set the Allgather threshold, for IB it equals to ML buffer size */ - super->small_message_thresholds[BCOL_ALLGATHER] = - iboffload_module->rdma_block.ml_mem_desc->size_buffer / - ompi_comm_size(iboffload_module->super.sbgp_partner_module->group_comm); -} - -static int mca_bcol_iboffload_init_buffer_memory(struct mca_coll_ml_module_t *ml_module, - struct mca_bcol_base_module_t *bcol, - void *reg_data) -{ - mca_bcol_iboffload_module_t *iboffload_module = (mca_bcol_iboffload_module_t *) bcol; - mca_bcol_iboffload_local_rdma_block_t *rdma_block = &iboffload_module->rdma_block; - - struct mca_bcol_base_memory_block_desc_t *desc = ml_module->payload_block; - struct ibv_mr *mr = (struct ibv_mr *) desc->block->lmngr->reg_desc[bcol->context_index]; - int i; - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_init_buffer_memory was called")); - - /* Set rdma block data */ - rdma_block->ib_info.rkey = mr->rkey; - rdma_block->ib_info.lkey = mr->lkey; - - rdma_block->ib_info.addr = (uint64_t) (uintptr_t) desc->block->base_addr; - IBOFFLOAD_VERBOSE(10, ("Caching rkey %u lkey %u addr %p", - rdma_block->ib_info.rkey, - rdma_block->ib_info.lkey, - rdma_block->ib_info.addr)); - - /* cache ml mem desc tunings localy */ - rdma_block->bdesc.num_banks = desc->num_banks; - rdma_block->bdesc.num_buffers_per_bank = desc->num_buffers_per_bank; - rdma_block->bdesc.size_buffer = desc->size_buffer; - rdma_block->bdesc.data_offset = ml_module->data_offset; - - IBOFFLOAD_VERBOSE(10, ("RDMA buffer configuration num banks %d num_per_bank %d size %d base addr %p", - mr->addr, desc->num_banks, desc->num_buffers_per_bank, desc->size_buffer)); - - /* pointer to ml level descriptor */ - rdma_block->ml_mem_desc = desc; - - rdma_block->sync_counter = 0; /* reset the counter */ - /* Allocate and set bank block counters */ - for (i = 0; i < MCA_BCOL_IBOFFLOAD_BK_LAST; i++) { - rdma_block->bank_buffer_counter[i] = (int *) calloc(rdma_block->bdesc.num_banks, - sizeof(int)); - if (NULL == rdma_block->bank_buffer_counter[i]) { - IBOFFLOAD_VERBOSE(10, ("Failed to allocate bank_block_counter\n")); - return OMPI_ERROR; - } - } - - if (OMPI_SUCCESS != init_rdma_buf_desc(&rdma_block->bdesc.rdma_desc, - desc->block->base_addr, - rdma_block->bdesc.num_banks, - rdma_block->bdesc.num_buffers_per_bank, - rdma_block->bdesc.size_buffer, - ml_module->data_offset)) { - IBOFFLOAD_VERBOSE(10, ("Failed to allocate rdma memory descriptor\n")); - return OMPI_ERROR; - } - - /* The all data is now cached on module level. The - real data exchange will happen during qp creation and - data exchange */ - - IBOFFLOAD_VERBOSE(10, ("ml_module = %p, iboffload_module = %p, ml_mem_desc = %p.\n", - ml_module, iboffload_module, rdma_block->ml_mem_desc)); - - for (i = 0; i < iboffload_module->num_endpoints; ++i) { - mca_bcol_iboffload_endpoint_t *ep = iboffload_module->endpoints[i]; - - if (true == ep->need_toset_remote_rdma_info) { - IBOFFLOAD_VERBOSE(10, ("ep %p index %d: postponed remote rdma block init.", ep, ep->index)); - if (OPAL_UNLIKELY(OMPI_SUCCESS != - set_endpoint_remote_rdma_info(ep, ep->remote_rdma_info))) { - return OMPI_ERROR; - } - } - } - - /* Hack: - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Work around for deadlock caused by connection setup - for asyc service barrier. Asyc service barrier use own set of - MQ and QP _BUT_ the exchange operation uses the MQ that is used for - primary set of collectives operations like Allgahter, Barrier,etc. - As result exchange wait operation could be pushed to primary MQ and - cause dead-lock. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Create connection for service barrier and memory address exchange - for ml buffers and asyc service barrier - */ - /* This nasty hack was moved to ml discovery - rc = mca_bcol_iboffload_rec_doubling_start_connections(iboffload_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - */ - - return OMPI_SUCCESS; -} - -static void load_func(mca_bcol_base_module_t *super) -{ - int fnc; - - /* Loading Memory managment functions */ - /* NULL means that mpool may decide about prefered memory allocate functions */ - /* super->memory_management_functions.malloc_fn = NULL;*/ - /* NULL means that mpool may decide about prefered memory release functions */ - /* super->memory_management_functions.free_fn = NULL; */ - - /* JSL: setting the bcol_memory_init function to NULL, not sure what ib needs to do with - * the ml_memory_block - */ - super->bcol_memory_init = NULL; - - - /* Loading collective functions */ - for (fnc = 0; fnc < BCOL_NUM_OF_FUNCTIONS; ++fnc) { - super->bcol_function_table[fnc] = NULL; - } - - super->bcol_function_init_table[BCOL_FANIN] = mca_bcol_iboffload_fanin_register; - super->bcol_function_init_table[BCOL_FANOUT] = mca_bcol_iboffload_fanout_register; - - super->bcol_function_init_table[BCOL_BARRIER] = mca_bcol_iboffload_barrier_register; - super->bcol_function_init_table[BCOL_BCAST] = mca_bcol_iboffload_bcast_register; - /*super->bcol_function_init_table[BCOL_ALLTOALL] = mca_bcol_iboffload_alltoall_register;*/ - super->bcol_function_init_table[BCOL_ALLGATHER] = mca_bcol_iboffload_allgather_register; - super->bcol_function_init_table[BCOL_SYNC] = mca_bcol_iboffload_memsync_register; - super->bcol_function_init_table[BCOL_ALLREDUCE] = mca_bcol_iboffload_allreduce_register; - - super->bcol_memory_init = mca_bcol_iboffload_init_buffer_memory; - - /* Set thresholds */ - super->set_small_msg_thresholds = mca_bcol_iboffload_set_small_msg_thresholds; - - super->k_nomial_tree = mca_bcol_iboffload_setup_knomial_tree; -} - -int mca_bcol_iboffload_setup_knomial_tree(mca_bcol_base_module_t *super) -{ - int rc; - mca_bcol_iboffload_module_t *ib_module = (mca_bcol_iboffload_module_t *) super; - rc = netpatterns_setup_recursive_knomial_allgather_tree_node( - ib_module->super.sbgp_partner_module->group_size, - ib_module->super.sbgp_partner_module->my_index, - mca_bcol_iboffload_component.k_nomial_radix, - super->list_n_connected, - &ib_module->knomial_allgather_tree); - - return rc; -} - -static inline struct ibv_cq *ibv_create_cq_compat(struct ibv_context *context, - int cqe, void *cq_context, struct ibv_comp_channel *channel, - int comp_vector) -{ -#if OPAL_IBV_CREATE_CQ_ARGS == 3 - return ibv_create_cq(context, cqe, channel); -#else - return ibv_create_cq(context, cqe, cq_context, channel, comp_vector); -#endif -} - -int mca_bcol_iboffload_adjust_cq(mca_bcol_iboffload_device_t *device, - struct ibv_cq **ib_cq) -{ - uint32_t cq_size = (uint32_t) mca_bcol_iboffload_component.cq_size; - - if (NULL == *ib_cq) { - *ib_cq = ibv_create_cq_compat(device->dev.ib_dev_context, cq_size, -#if OPAL_ENABLE_PROGRESS_THREADS == 1 - device, device->ib_channel, -#else - NULL, NULL, -#endif - 0); - - if (NULL == *ib_cq) { - IBOFFLOAD_ERROR(("Device %s " - ", failed to create CQ, errno says %s", - ibv_get_device_name(device->dev.ib_dev), strerror(errno))); - - return OMPI_ERROR; - } - } - - return OMPI_SUCCESS; -} - -static int init_recv_wr_manager(mca_bcol_iboffload_recv_wr_manager *recv_wr_manager) -{ - - struct ibv_recv_wr *recv_wr = NULL; - int ret = OMPI_SUCCESS, qp, wr, num_qps; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - num_qps = cm->num_qps; - OPAL_THREAD_LOCK(&recv_wr_manager->lock); - - recv_wr_manager->recv_work_requests = - (struct ibv_recv_wr **) calloc(num_qps, sizeof(struct ibv_recv_wr *)); - if (NULL == recv_wr_manager->recv_work_requests) { - IBOFFLOAD_ERROR(("Failed to allocate memory for recv_wr_manager->recv_work_requests")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto error; - } - - for (qp = 0; qp < num_qps; ++qp) { - int recv_queue_size = cm->qp_infos[qp].rd_num; - - recv_wr_manager->recv_work_requests[qp] = - (struct ibv_recv_wr *) calloc(recv_queue_size, sizeof(struct ibv_recv_wr)); - if (NULL == recv_wr_manager->recv_work_requests[qp]) { - IBOFFLOAD_ERROR(("Failed to allocate memory for recv_wr_manager->recv_work_requests")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto error; - } - - for (wr = 0; wr < recv_queue_size - 1; ++wr) { - recv_wr = &recv_wr_manager->recv_work_requests[qp][wr]; - recv_wr->next = &recv_wr_manager->recv_work_requests[qp][wr + 1]; - /* init receive work request. - * Real sg_list value we fill during receive prepost flow. - * recv_wr->wr_id and recv_wr->sg_list is zero by default */ - recv_wr->wr_id = 0; - recv_wr->sg_list = NULL; - recv_wr->num_sge = 1; /* single sge will be filled later */ - } - - recv_wr->next->num_sge = 1; /* for the last entry everything is null except the num_sge */ - } - -error: - OPAL_THREAD_UNLOCK(&recv_wr_manager->lock); - return ret; -} - -/* On first access to the component - allocate all memory resources */ -static int component_first_usage(void) -{ - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - int ret = OMPI_SUCCESS; - - /* creating collfrag free list */ - OBJ_CONSTRUCT(&cm->collfrags_free, ompi_free_list_t); - ret = ompi_free_list_init_new(&cm->collfrags_free, - sizeof(mca_bcol_iboffload_collfrag_t), - MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_collfrag_t), - 0, MCA_IBOFFLOAD_CACHE_LINE_SIZE, - cm->free_list_num, - cm->free_list_max, - cm->free_list_inc, - NULL); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Failed to allocate mwr_free %s:%d\n", __FILE__, __LINE__)); - return ret; - } - - /* allocate free list of collective message requests */ - OBJ_CONSTRUCT(&cm->collreqs_free, ompi_free_list_t); - ret = ompi_free_list_init_new(&cm->collreqs_free, - sizeof(mca_bcol_iboffload_collreq_t), - MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_collreq_t), - 0, MCA_IBOFFLOAD_CACHE_LINE_SIZE, - cm->free_list_num * 2, - cm->free_list_max * 2, - cm->free_list_inc * 2, - NULL); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Error creating free list, error: %s\n", strerror(errno))); - goto release_collfrag; - } - - OBJ_CONSTRUCT(&cm->tasks_free, ompi_free_list_t); - ret = ompi_free_list_init_new(&cm->tasks_free, - sizeof(mca_bcol_iboffload_task_t), - MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_task_t), - 0, MCA_IBOFFLOAD_CACHE_LINE_SIZE, - cm->free_list_num * 2, - cm->free_list_max * 2, - cm->free_list_inc * 2, - NULL); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Error creating free list, error: %s\n", strerror(errno))); - goto release_collreq; - } - - OBJ_CONSTRUCT(&cm->calc_tasks_free, ompi_free_list_t); - ret = ompi_free_list_init_ex_new(&cm->calc_tasks_free, - sizeof(mca_bcol_iboffload_task_t), - MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_task_t), - 0, MCA_IBOFFLOAD_CACHE_LINE_SIZE, - cm->free_list_num * 2, - cm->free_list_max * 2, - cm->free_list_inc * 2, - NULL, - mca_bcol_iboffload_calc_task_init, - &cm->calc_tasks_free); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Error creating free list, error: %s\n", strerror(errno))); - goto release_collreq; - } - - /* Initialization for frags that handle ML allocated memory, - it is NO registration is required ! - */ - - OBJ_CONSTRUCT(&cm->ml_frags_free, ompi_free_list_t); - ret = ompi_free_list_init_ex_new(&cm->ml_frags_free, - sizeof(mca_bcol_iboffload_frag_t), - MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_frag_t), - 0, MCA_IBOFFLOAD_CACHE_LINE_SIZE, - cm->free_list_num * 2, - cm->free_list_max * 2, - cm->free_list_inc * 2, - NULL, - mca_bcol_iboffload_ml_frag_init, - NULL); - if (OMPI_SUCCESS != ret) { - IBOFFLOAD_ERROR(("Error creating free list, error: %s\n", strerror(errno))); - goto release_collreq; - } - - ret = init_recv_wr_manager(&cm->recv_wrs); - if (OMPI_SUCCESS != ret){ - IBOFFLOAD_ERROR(("Failed to prepare recv wrs")); - goto release_tasks; - } - - cm->init_done = true; - - return OMPI_SUCCESS; - -release_tasks: - OBJ_DESTRUCT(&cm->tasks_free); -release_collreq: - OBJ_DESTRUCT(&cm->collreqs_free); -release_collfrag: - OBJ_DESTRUCT(&cm->collfrags_free); - return ret; -} - - -/* query to see if some modules are available for use on the given - * communicator, and if so, what it's priority is. - */ -mca_bcol_base_module_t ** -mca_bcol_iboffload_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules) -{ - /* local variables */ - int i, mq_index, rc, my_rank = 0; - struct mqe_context_attr mqe_attr; - - mca_sbgp_ibnet_module_t *ibnet = NULL; - mca_bcol_base_module_t **iboffload_modules = NULL; - mca_bcol_iboffload_module_t *iboffload_module = NULL; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - /* Bruck's alltoall iovec */ - size_t iovec_size; - - if (OPAL_UNLIKELY(false == cm->init_done)) { - if (OMPI_SUCCESS != component_first_usage()) { - return NULL; - } - } - - /* No group - no modules*/ - if (OPAL_UNLIKELY(NULL == sbgp)) { - return NULL; - } - /* - * This is activated only for intra-communicators - */ - if (OPAL_UNLIKELY(OMPI_COMM_IS_INTER(sbgp->group_comm))) { - return NULL; - } - - ibnet = (mca_sbgp_ibnet_module_t *) sbgp; - if (OPAL_UNLIKELY(0 == ibnet->num_cgroups)) { - /* we have no connection group */ - return NULL; - } - - my_rank = sbgp->my_index; - - iboffload_modules = (mca_bcol_base_module_t **) calloc - (ibnet->num_cgroups, sizeof(mca_bcol_base_module_t *)); - if (OPAL_UNLIKELY(NULL == iboffload_modules)) { - return NULL; - } - - /* Go through list of connection groups that we have on ibnet - * and create bcol module for each one */ - *num_modules = 0; - for (i = 0; i < ibnet->num_cgroups; i++) { - mca_sbgp_ibnet_connection_group_info_t *cgroup = - &ibnet->cgroups[i]; - - iboffload_module = OBJ_NEW(mca_bcol_iboffload_module_t); - - iboffload_modules[i] = &(iboffload_module->super); - - /* - * In fact the value == ibnet->num_cgroups in the end - * of the loop, but we need always to know how many modules - * release in the error case (under CLEANUP label) - */ - - (*num_modules)++; - - iboffload_module->cgroup_index = i; - iboffload_module->group_size = ibnet->super.group_size; - iboffload_module->log_group_size = lognum(iboffload_module->group_size); - /* Put pointer to sbgp module */ - iboffload_module->super.sbgp_partner_module = sbgp; - /* Put cgroup information on module */ - iboffload_module->ibnet = ibnet; - - iboffload_module->device = opal_pointer_array_get_item(&cm->devices, cgroup->device_index); - - IBOFFLOAD_VERBOSE(10, ("Iboffload module - %p uses " - "device - %p with index - %d.\n", - iboffload_module, - iboffload_module->device->dev.ib_dev, - cgroup->device_index)); - - OBJ_RETAIN(iboffload_module->device); - /* Pasha: Need to print NICE error in future */ - assert(NULL != iboffload_module->device); - iboffload_module->port = cgroup->port; - - IBOFFLOAD_VERBOSE(10, ("Iboffload module - %p on local port %d.\n", - iboffload_module, iboffload_module->port)); - - if (OPAL_UNLIKELY(!iboffload_module->device->activated)) { - /* this device was never used before, need to activate it */ - if (OMPI_SUCCESS != iboffload_start_device(iboffload_module->device)) { - OBJ_RELEASE(iboffload_module->device); - goto CLEANUP; - } - } - /* Set pointer to network contest on bcol base, we need it for ml - memory managment */ - OBJ_RETAIN(iboffload_module->device->net_context); - iboffload_module->super.network_context = iboffload_module->device->net_context; - - iboffload_module->subnet_id = iboffload_module->device->ports[iboffload_module->port - 1].subnet_id; - iboffload_module->lid = iboffload_module->device->ports[iboffload_module->port - 1].lid; - - load_func(&iboffload_module->super); - - IBOFFLOAD_VERBOSE(10, ("Call for create endpoints for iboffload module %p," - " cgroup num (index) %d.\n", iboffload_module, i)); - - /* create endpoints and store its in the endpoints pointer of iboffload_module structer */ - if (OMPI_SUCCESS != - mca_bcol_iboffloads_create_endpoints(cgroup, iboffload_module)) { - goto CLEANUP; - } - - memset(&mqe_attr, 0, sizeof(mqe_attr)); - mqe_attr.max_mqe_tasks = (uint32_t)mca_bcol_iboffload_component.max_mqe_tasks; - mqe_attr.max_mq_size = (uint32_t)mca_bcol_iboffload_component.max_mq_size; - mqe_attr.cq = iboffload_module->device->ib_mq_cq; - - /* ALL MQs have the same configuration */ - for (mq_index = 0; mq_index < BCOL_IBOFFLOAD_MQ_NUM; mq_index++) { - iboffload_module->mq[mq_index] = - mqe_context_create(iboffload_module->device->dev.ib_dev_context, - iboffload_module->device->ib_pd, &mqe_attr); - if (OPAL_UNLIKELY(NULL == iboffload_module->mq[mq_index])) { - IBOFFLOAD_ERROR(("Error creating MQ for device (%s), error: %s\n", - ibv_get_device_name(iboffload_module->device->dev.ib_dev), strerror(errno))); - goto CLEANUP; - } - } - - /* Barrier initialization - recuresive doubling */ -#if 1 - if (OMPI_SUCCESS != - netpatterns_setup_recursive_doubling_tree_node( - iboffload_module->group_size, my_rank, - &iboffload_module->recursive_doubling_tree)) { - IBOFFLOAD_ERROR(("Failed to setup recursive doubling tree," - " error: %s\n", strerror(errno))); - goto CLEANUP; - } -#endif - - /* Barrier initialization - N exchange tree */ - if (OMPI_SUCCESS != - netpatterns_setup_recursive_doubling_n_tree_node( - iboffload_module->group_size, my_rank, - cm->exchange_tree_order, - &iboffload_module->n_exchange_tree)) { - IBOFFLOAD_ERROR(("Failed to setup recursive doubling tree," - " error: %s\n", strerror(errno))); - goto CLEANUP; - } - - - /* Recursive K-ing initialization - Knomial exchange tree */ - if (OMPI_SUCCESS != - netpatterns_setup_recursive_knomial_tree_node( - iboffload_module->group_size, my_rank, - cm->knomial_tree_order, - &iboffload_module->knomial_exchange_tree)) { - IBOFFLOAD_ERROR(("Failed to setup recursive Knomial tree," - " error: %s\n", strerror(errno))); - goto CLEANUP; - } - - /* Manju Brucks alltoall temp iovec list */ - iovec_size = iboffload_module->group_size / 2 + iboffload_module->group_size % 2; - iboffload_module->alltoall_iovec = (struct iovec *) malloc(sizeof(struct iovec) - * iovec_size); - iboffload_module->alltoall_recv_iovec = (struct iovec *) malloc(sizeof(struct iovec) - * iovec_size); - - - iboffload_module->k_alltoall_bruck_radix=cm->k_alltoall_bruck_radix; - iboffload_module->tmp_buf_alignment=cm->tmp_buf_alignment; - -#if 1 /* Disabling this code since it brakes all iboffload functionality */ - /* Sorry Pasha, gotta do this. Recursive K-ing allgather initialization - Knomial exchange tree */ - /*Pretty sure I need to pass in the communicator rank */ - /* I need to reindex this mess */ - /* this looks silly, I know but it allows for minimal changes to existing code */ - iboffload_module->comm_to_ibnet_map = sbgp->group_list; - - -#endif -#if 0 - if ( NULL == iboffload_module->comm_to_ibnet_map ) { - IBOFFLOAD_ERROR(("Out of resources\n")); - goto CLEANUP; - } - for( i = 0; i < iboffload_module->group_size; i++) { - int j = 0; - while( sbgp->group_list[j] != i){ - j++; - } - iboffload_module->comm_to_ibnet_map[i] = j; - } - /* that should take care of that */ - if (OMPI_SUCCESS != - netpatterns_setup_recursive_knomial_allgather_tree_node( - iboffload_module->group_size, sbgp->group_list[my_rank], - cm->k_nomial_radix, iboffload_module->super.list_n_connected, - &iboffload_module->knomial_allgather_tree)) { - IBOFFLOAD_ERROR(("Failed to setup recursive Knomial tree," - " error: %s\n", strerror(errno))); - goto CLEANUP; - } -#endif - - iboffload_module->power_of_2 = - mca_bcol_iboffload_fls(iboffload_module->num_endpoints); - iboffload_module->power_of_2_ranks = - (1 << iboffload_module->power_of_2); - - /* header into ml buffer, we don't support header for anyone other than shared memory - * at the moment - */ - iboffload_module->super.header_size = 0; - - iboffload_module->super.supported_mode = MCA_BCOL_BASE_ZERO_COPY | - MCA_BCOL_BASE_NO_ML_BUFFER_FOR_LARGE_MSG | - MCA_BCOL_BASE_NO_ML_BUFFER_FOR_BARRIER; - - rc = mca_bcol_base_bcol_fns_table_init(&(iboffload_module->super)); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto CLEANUP; - } - - OBJ_CONSTRUCT(&iboffload_module->iovec_tasks_free, ompi_free_list_t); - rc = ompi_free_list_init_ex_new(&iboffload_module->iovec_tasks_free, - sizeof(mca_bcol_iboffload_task_t), - MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_task_t), - 0, MCA_IBOFFLOAD_CACHE_LINE_SIZE, - cm->free_list_num * 2, - cm->free_list_max * 2, - cm->free_list_inc * 2, - NULL, - mca_bcol_iboffload_iovec_task_init, - iboffload_module); - if (OMPI_SUCCESS != rc) { - IBOFFLOAD_ERROR(("Error creating free list, error: %s\n", strerror(errno))); - goto CLEANUP; - } - } - - IBOFFLOAD_VERBOSE(10, ("Finished with success, num of cgroups is %d, num of modules is %d.\n", - ibnet->num_cgroups, *num_modules)); - - return iboffload_modules; - -CLEANUP: - for (i = 0; i < *num_modules; i++) { - if (NULL != iboffload_modules[i]) { - OBJ_RELEASE(iboffload_modules[i]); - } - } - free(iboffload_modules); - return NULL; -} - -static int init_rdma_buf_desc(mca_bcol_iboffload_rdma_buffer_desc_t **desc, void *base_addr, uint32_t num_banks, - uint32_t num_buffers_per_bank, uint32_t size_buffer, uint32_t header_size) -{ - uint32_t i, j, ci; - mca_bcol_iboffload_rdma_buffer_desc_t *tmp_desc; - - IBOFFLOAD_VERBOSE(10, ("init_rdma_buf_desc base addr %p, num_n %d , " - "num_per_bank %d, size %d, header size %d", - base_addr, num_banks, num_buffers_per_bank, - size_buffer, header_size)); - *desc = (mca_bcol_iboffload_rdma_buffer_desc_t *) - calloc(num_banks * num_buffers_per_bank, - sizeof(mca_bcol_iboffload_rdma_buffer_desc_t)); - if (OPAL_UNLIKELY(NULL == *desc)) { - IBOFFLOAD_ERROR(("Failed to allocate memory")); - return OMPI_ERROR; - } - - tmp_desc = *desc; - - for (i = 0; i < num_banks; i++) { - for (j = 0; j < num_buffers_per_bank; j++) { - ci = i * num_buffers_per_bank + j; - tmp_desc[ci].generation_number = 0; - tmp_desc[ci].bank_index = i; - tmp_desc[ci].buffer_index = j; - /* - * iboffload don't have any header, but other bcols may to have. So - * we need to take it in account. - */ - tmp_desc[ci].data_addr = (void *) - ((unsigned char *) base_addr + ci * size_buffer + header_size); - IBOFFLOAD_VERBOSE(10, ("RDMA setup %d %d - %p", i, j, tmp_desc[ci].data_addr)); - } - } - - return OMPI_SUCCESS; -} - -static int set_endpoint_remote_rdma_info(mca_bcol_iboffload_endpoint_t *ep, mca_bcol_iboffload_rdma_info_t *remote_rdma_info) -{ - mca_bcol_iboffload_rem_rdma_block_t *rem_block = &ep->remote_rdma_block; - - /* We'll continue if - - 1. The module rdma_block is already initilized on this stage - 2. All peers have the same rdma block configuration that actually is - define on ML level - - Otherwise set flag to init it lately. - */ - if (NULL == ep->iboffload_module->rdma_block.ml_mem_desc) { - IBOFFLOAD_VERBOSE(10, ("RDMA block information hasn't been inited yet.")); - ep->need_toset_remote_rdma_info = true; - return OMPI_SUCCESS; - } - - /* set the rdma addr for barrier */ - ep->remote_zero_rdma_addr = remote_rdma_info[0]; - - IBOFFLOAD_VERBOSE(10, ("RDMA block information %p %d", - remote_rdma_info[0].addr, remote_rdma_info[0].rkey)); - - /* set the rdma block memory structs */ - rem_block->ib_info = remote_rdma_info[1]; - - - /* if we got some real data. lets init memory adress sctructures */ - if (0 != rem_block->ib_info.addr) { - if (OMPI_SUCCESS != init_rdma_buf_desc(&rem_block->rdma_desc, (void *)rem_block->ib_info.addr, - ep->iboffload_module->rdma_block.bdesc.num_banks, - ep->iboffload_module->rdma_block.bdesc.num_buffers_per_bank, - ep->iboffload_module->rdma_block.bdesc.size_buffer, - /* remember, we use lkey to pass the data offset value */ - rem_block->ib_info.lkey)) { - IBOFFLOAD_VERBOSE(10, ("Failed to allocate RDMA buffer descriptor")); - return OMPI_ERROR; - } - } - - IBOFFLOAD_VERBOSE(10, ("endpoint - %p, recv barrier rdma: rem addr - %p, rem rkey - %d.\n", - ep, ep->remote_zero_rdma_addr.addr, ep->remote_zero_rdma_addr.rkey)); - IBOFFLOAD_VERBOSE(10, ("endpoint - %p, recv ml rdma: rem addr - %p, rem rkey - %d.\n", - ep, ep->remote_rdma_block.ib_info.addr, ep->remote_rdma_block.ib_info.rkey)); - - return OMPI_SUCCESS; -} - -static int unpack_endpoint_rdma_addr(void *callback_data) -{ - int rc; - struct iovec payload_iovec; - - size_t max_size = 0; - uint32_t out_size = 1; - - mca_bcol_iboffload_collfrag_t *coll_frag = (mca_bcol_iboffload_collfrag_t *) callback_data; - mca_bcol_iboffload_collreq_t* collreq = coll_frag->coll_full_req; - - mca_bcol_iboffload_task_t *wait_task = (mca_bcol_iboffload_task_t *) coll_frag->signal_task_wr_id; - - mca_bcol_iboffload_frag_t *recv_frag = wait_task->frag; - mca_bcol_iboffload_endpoint_t *ep = wait_task->endpoint; - - rc = opal_convertor_copy_and_prepare_for_recv( - ompi_mpi_local_convertor, - &opal_datatype_uint1, - sizeof(mca_bcol_iboffload_rdma_info_t) * MAX_REMOTE_RDMA_INFO, - ep->remote_rdma_info, 0, - &collreq->recv_convertor); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return OMPI_ERROR; - } - - payload_iovec.iov_base = (void*) (uintptr_t) - recv_frag->sg_entry.addr; - - payload_iovec.iov_len = sizeof(mca_bcol_iboffload_rdma_info_t) * MAX_REMOTE_RDMA_INFO; - - if (0 > opal_convertor_unpack(&collreq->recv_convertor, - &payload_iovec, &out_size, &max_size)) { - return OMPI_ERROR; - } - - if (OMPI_SUCCESS != set_endpoint_remote_rdma_info(ep, ep->remote_rdma_info)) { - return OMPI_ERROR; - } - - opal_convertor_cleanup(&collreq->send_convertor); - opal_convertor_cleanup(&collreq->recv_convertor); - - return OMPI_SUCCESS; -} - -/* RDMA addr exchange with rem proc */ -int mca_bcol_iboffload_exchange_rem_addr(mca_bcol_iboffload_endpoint_t *ep) -{ - int rc; - /* the [0] used for constant barrier rdma operations - the [1] used for rdma block inforation exchange. The rdma - block is used for RDMA operation over ML allocated memory */ - mca_bcol_iboffload_rdma_info_t remote_rdma_addr[MAX_REMOTE_RDMA_INFO]; - - mca_bcol_iboffload_task_t *send_task, - *wait_task; - - mca_bcol_iboffload_frag_t *send_fragment, - *preposted_recv_frag; - - ompi_free_list_item_t *item; - - mca_bcol_iboffload_collreq_t *coll_request; - mca_bcol_iboffload_collfrag_t *coll_fragment; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item); - if (NULL == item) { - IBOFFLOAD_ERROR(("Failing for coll request free list waiting.\n")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - coll_request = (mca_bcol_iboffload_collreq_t *) item; - - coll_request->completion_cb_fn = unpack_endpoint_rdma_addr; - /* For the exchange the progress_fn should be never used */ - coll_request->progress_fn = NULL; - coll_request->module = ep->iboffload_module; - coll_request->ml_buffer_index = MCA_COLL_ML_NO_BUFFER; - coll_request->buffer_info[SBUF].offset = 0; - coll_request->buffer_info[RBUF].offset = 0; - coll_request->qp_index = MCA_BCOL_IBOFFLOAD_QP_REGULAR; - /* - * setup collective work request - */ - - /* get collective frag */ - coll_fragment = &coll_request->first_collfrag; - mca_bcol_iboffload_collfrag_init(coll_fragment); - - coll_fragment->mq_credits = 2; - coll_fragment->mq_index = COLL_MQ; - coll_fragment->tail_next = &coll_fragment->to_post; - /* overwrite mq index to run over service setup */ - - /* Update the algorithm type in order to support credit mechanism */ - coll_fragment->alg = REMOTE_EXCHANGE_ALG; - if (OPAL_UNLIKELY(false == - BCOL_IBOFFLOAD_MQ_HAVE_CREDITS(ep->iboffload_module, - coll_fragment->mq_index, 2))) { - IBOFFLOAD_VERBOSE(10, ("There are not enough credits on MQ.\n")); - - goto out_of_resources; - } - - /* set pointers for (coll frag) <-> (coll full request) */ - MCA_BCOL_IBOFFLOAD_SET_COLL_REQ_LINKS(coll_request, coll_fragment); - - remote_rdma_addr[0].addr = - ep->iboffload_module->device->dummy_frags[MCA_BCOL_IBOFFLOAD_QP_BARRIER].sg_entry.addr; - remote_rdma_addr[0].rkey = - ep->iboffload_module->device->dummy_frags[MCA_BCOL_IBOFFLOAD_QP_BARRIER].registration->mr->rkey; - - if (NULL != ep->iboffload_module->rdma_block.ml_mem_desc) { - remote_rdma_addr[1].addr = ep->iboffload_module->rdma_block.ib_info.addr; - remote_rdma_addr[1].rkey = ep->iboffload_module->rdma_block.ib_info.rkey; - /* Little bit ugly, but easy solution. The data_offset */ - remote_rdma_addr[1].lkey = ep->iboffload_module->rdma_block.bdesc.data_offset; - } else { - /* since it is no data lets send 0, so remote side will knox that no real - data was send */ - remote_rdma_addr[1].addr = 0; - remote_rdma_addr[1].rkey = 0; - remote_rdma_addr[1].lkey = 0; - } - - IBOFFLOAD_VERBOSE(10, ("endpoint - %p, sending barrier rdma: addr - %p, rkey - %d.\n", - ep, remote_rdma_addr[0].addr, remote_rdma_addr[0].rkey)); - IBOFFLOAD_VERBOSE(10, ("endpoint - %p, sending ml rdma: addr - %p, rkey - %d.\n", - ep, remote_rdma_addr[1].addr, remote_rdma_addr[1].rkey)); - - rc = opal_convertor_copy_and_prepare_for_send( - ompi_mpi_local_convertor, - &opal_datatype_uint1, - sizeof(mca_bcol_iboffload_rdma_info_t) * MAX_REMOTE_RDMA_INFO, - &remote_rdma_addr, 0, - &coll_request->send_convertor); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto out_of_resources; - } - - send_fragment = mca_bcol_iboffload_get_send_frag( - coll_request, ep->index, coll_request->qp_index, - sizeof(mca_bcol_iboffload_rdma_info_t) * MAX_REMOTE_RDMA_INFO, - 0, SBUF, MCA_BCOL_IBOFFLOAD_SEND_FRAG_CONVERT); - if (OPAL_UNLIKELY(NULL == send_fragment)) { - IBOFFLOAD_ERROR(("Failing for getting and packing send frag.\n")); - goto out_of_resources; - } - - send_task = mca_bcol_iboffload_get_send_task(ep->iboffload_module, - ep->index, coll_request->qp_index, send_fragment, - coll_fragment, INLINE); - if (OPAL_UNLIKELY(NULL == send_task)) { - IBOFFLOAD_ERROR(("Failing for getting send task.\n")); - goto out_of_resources; - } - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, send_task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, send_task); - - /* post wait */ - preposted_recv_frag = mca_bcol_iboffload_get_preposted_recv_frag( - ep->iboffload_module, ep->index, coll_request->qp_index); - if (OPAL_UNLIKELY(NULL == preposted_recv_frag)) { - IBOFFLOAD_ERROR(("Exchaging: " - "Failing for getting prepost recv frag.\n")); - goto out_of_resources; - } - - wait_task = mca_bcol_iboffload_get_wait_task(ep->iboffload_module, - ep->index, 1, preposted_recv_frag, coll_request->qp_index, NULL); - - if (OPAL_UNLIKELY(NULL == wait_task)) { - IBOFFLOAD_VERBOSE(10, ("Exchanging: " - "Failing for getting wait task.\n")); - goto out_of_resources; - } - - MCA_BCOL_IBOFFLOAD_APPEND_TASK_TO_LIST(coll_fragment->task_next, wait_task); - MCA_BCOL_IBOFFLOAD_APPEND_MQ_TASK_TO_LIST(coll_fragment->tail_next, wait_task); - - /* The last element must end with ZERO */ - wait_task->element.next = NULL; - - /* number of sends that need to be completed asynchronously */ - coll_fragment->n_sends = 1; - SENDWR(send_task)->send_flags |= IBV_SEND_SIGNALED; - - /* finish initializing full message descriptor */ - coll_request->n_fragments = 1; - coll_request->n_frags_sent = 1; - - coll_request->n_frag_mpi_complete = 0; - coll_request->n_frag_net_complete = 0; - coll_request->user_handle_freed = false; - - wait_task->element.flags |= MQE_WR_FLAG_SIGNAL; - coll_fragment->signal_task_wr_id = - (uint64_t) (uintptr_t) wait_task->element.wr_id; - - wait_task->element.wr_id = (uint64_t) (uintptr_t) coll_fragment; - - /* post the mwr */ - rc = mca_bcol_iboffload_post_mqe_tasks(coll_request->module, coll_fragment->to_post); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_VERBOSE(10, ("MQE task posting failing.\n")); - /* Note: need to clean up */ - return rc; - } - - coll_request->user_handle_freed = true; - /* complete the exchange - progress releases full request descriptors */ - while (!BCOL_IS_COMPLETED(coll_request)) { - mca_bcol_iboffload_component_progress(); - } - - IBOFFLOAD_VERBOSE(10, ("RDMA addr exchange with comm rank: %d was finished.\n", - ep->iboffload_module->ibnet->super.group_list[ep->index])); - - return OMPI_SUCCESS; - -out_of_resources: - /* Release all resources */ - IBOFFLOAD_VERBOSE(10, ("RDMA addr exchange, adding collfrag to collfrag_pending.\n")); - return mca_bcol_iboffload_free_resources_and_move_to_pending(coll_fragment, ep->iboffload_module); -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.c b/ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.c deleted file mode 100644 index a342cbd2318..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include - -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_device.h" -#include "bcol_iboffload_qp_info.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_endpoint.h" - -static int mca_bcol_iboffload_dummy_frag_qp_prepost( - mca_bcol_iboffload_endpoint_t *endpoint, - int qp_index, int num_to_prepost) -{ - struct ibv_recv_wr *recv_wr, *recv_bad; - int ret, num_preposted = 0, start_wr_index; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_recv_wr_manager *recv_wrs = &cm->recv_wrs; - - IBOFFLOAD_VERBOSE(10, ("Recv prepost call: endpoint %p, to prepost %d", - (void *) endpoint, num_to_prepost)); - - if (OPAL_UNLIKELY(0 == num_to_prepost)) { - IBOFFLOAD_VERBOSE(10, ("num_to_prepost = 0, return immediate")); - return OMPI_SUCCESS; - } - - /* make sure that we do not overrun number of rd_wqe */ - if (num_to_prepost > endpoint->qps[qp_index].rd_wqe) { - IBOFFLOAD_VERBOSE(10, ("Reset num_to_prepost = %d, to rd_wqe = %d", - num_to_prepost, endpoint->qps[qp_index].rd_wqe)); - - num_to_prepost = endpoint->qps[qp_index].rd_wqe; - } - - OPAL_THREAD_LOCK(&recv_wrs->lock); - - /* calculate start index in array - * of pre-allocated work requests */ - start_wr_index = cm->qp_infos[qp_index].rd_num - num_to_prepost; - recv_wr = &recv_wrs->recv_work_requests[qp_index][start_wr_index]; - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p, qp_index - %d, to_porepost %d, " - "start index of WRs - %d, rd_wqe - %d", - (void *) endpoint, qp_index, num_to_prepost, - start_wr_index, endpoint->qps[qp_index].rd_wqe)); - - while (num_preposted < num_to_prepost) { - /* prepost the special barrier frag to recv queue */ - struct ibv_sge *dummy_sg_entry = - &endpoint->iboffload_module->device->dummy_frags[qp_index].sg_entry; - - recv_wr[num_preposted].sg_list = dummy_sg_entry; - ++num_preposted; - } - - if (OPAL_LIKELY(num_preposted > 0)) { - /* Set the tail */ - recv_wr[num_preposted - 1].next = NULL; - - /* post the list of recvs */ - ret = ibv_post_recv(endpoint->qps[qp_index].qp->lcl_qp, recv_wr, &recv_bad); - if (OPAL_UNLIKELY(0 != ret)) { - IBOFFLOAD_ERROR(("ibv_post_recv failed, error: %s [%d], " - "qp_index - %d.\n", strerror(errno), ret, qp_index)); - - return OMPI_ERROR; - } - - /* recover last recv_wr if needed */ - if (OPAL_UNLIKELY(num_to_prepost != num_preposted)) { - recv_wr[num_preposted - 1].next = &recv_wr[num_preposted]; - } - - /* decresing numbers of free recv wqe */ - endpoint->qps[qp_index].rd_wqe -= num_preposted; - } - - OPAL_THREAD_UNLOCK(&recv_wrs->lock); - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p, to_porepost %d, num preposted - %d, qp_index - %d", - (void *) endpoint, num_to_prepost, num_preposted, qp_index)); - - return OMPI_SUCCESS; -} - -/* - * Receive prepost: - * return values: - * 0 - no prepost was done - * -1 - fatal error during prepost - * other value - number preposted elements - */ -static int mca_bcol_iboffload_frag_reg_qp_prepost( - mca_bcol_iboffload_endpoint_t *endpoint, - int qp_index, int num_to_prepost) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_frag_t *frag; - - struct ibv_recv_wr *recv_wr, *recv_bad; - int i, ret, num_preposted = 0, start_wr_index; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_device_t *device = endpoint->iboffload_module->device; - - opal_list_t *preposted = &(endpoint->qps[qp_index].preposted_frags); - mca_bcol_iboffload_recv_wr_manager *recv_wrs = &cm->recv_wrs; - - IBOFFLOAD_VERBOSE(10, ("Recv prepost call: endpoint %p, to prepost %d", - (void *) endpoint, num_to_prepost)); - - if (OPAL_UNLIKELY(0 == num_to_prepost)) { - IBOFFLOAD_VERBOSE(10, ("num_to_prepost = 0, return immediate")); - return OMPI_SUCCESS; - } - - /* make sure that we do not overrun number of rd_wqe */ - if (num_to_prepost > endpoint->qps[qp_index].rd_wqe) { - IBOFFLOAD_VERBOSE(10, ("Reset num_to_prepost = %d, to rd_wqe = %d", - num_to_prepost, endpoint->qps[qp_index].rd_wqe)); - - num_to_prepost = endpoint->qps[qp_index].rd_wqe; - } - - OPAL_THREAD_LOCK(&recv_wrs->lock); - - /* calculate start index in array - * of pre-allocated work requests */ - start_wr_index = cm->qp_infos[qp_index].rd_num - num_to_prepost; - recv_wr = &recv_wrs->recv_work_requests[qp_index][start_wr_index]; - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p, qp_index - %d, to_porepost %d, " - "start index of WRs - %d, rd_wqe - %d", - (void *) endpoint, qp_index, num_to_prepost, - start_wr_index, endpoint->qps[qp_index].rd_wqe)); - - while (num_preposted < num_to_prepost) { - /* put the item on list of preposted */ - OMPI_FREE_LIST_GET_MT(&device->frags_free[qp_index], item); - if (OPAL_UNLIKELY(NULL == item)) { - break; - } - - frag = (mca_bcol_iboffload_frag_t *) item; - opal_list_append(preposted, (opal_list_item_t *) item); - - recv_wr[num_preposted].sg_list = &frag->sg_entry; - /* TODO Pasha - fix it later */ /* Vasily: Is it right place to take a size value ???? */ - frag->sg_entry.length = cm->qp_infos[qp_index].size; - ++num_preposted; - } - - if (OPAL_LIKELY(num_preposted > 0)) { - /* Set the tail */ - recv_wr[num_preposted - 1].next = NULL; - - /* post the list of recvs */ - ret = ibv_post_recv(endpoint->qps[qp_index].qp->lcl_qp, recv_wr, &recv_bad); - if (OPAL_UNLIKELY(0 != ret)) { - IBOFFLOAD_ERROR(("ibv_post_recv failed (%s), error: %s [%d], " - "qp_index - %d.\n", - ibv_get_device_name(device->dev.ib_dev), - strerror(errno), ret, qp_index)); - - /* Return allocated frags */ - for (i = 0; i < num_preposted; i++) { - OMPI_FREE_LIST_RETURN_MT(&device->frags_free[qp_index], - (ompi_free_list_item_t *) - opal_list_remove_last(preposted)); - } - - return OMPI_ERROR; - } - - /* recover last recv_wr if needed */ - if (OPAL_UNLIKELY(num_to_prepost != num_preposted)) { - recv_wr[num_preposted - 1].next = &recv_wr[num_preposted]; - } - - /* decresing numbers of free recv wqe */ - endpoint->qps[qp_index].rd_wqe -= num_preposted; - } - - OPAL_THREAD_UNLOCK(&recv_wrs->lock); - - IBOFFLOAD_VERBOSE(10, ("Endpoint %p, to_porepost %d, num preposted - %d", - (void *) endpoint, num_to_prepost, num_preposted)); - - return OMPI_SUCCESS; -} - - -static void mca_bcol_iboffload_fillin_qp_attr(int qp_index, - mca_bcol_iboffload_endpoint_t *ep, - ompi_common_ofacm_base_qp_config_t *qp_config) -{ - uint32_t max_sge, *init_attr_mask = - &qp_config->init_attr_mask[qp_index]; - - struct ibv_qp_attr *attr = &qp_config->attr[qp_index]; - struct ibv_qp_init_attr *init_attr = &qp_config->init_attr[qp_index]; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - /* Set special init attributes mask */ - *init_attr_mask = IBV_M_QP_EXT_CLASS_1 | - IBV_M_QP_EXT_CLASS_2 | - IBV_M_QP_EXT_IGNORE_RQ_OVERFLOW; - - /* Set init attributes */ - init_attr->qp_type = IBV_QPT_RC; - -/* Vasily: ?????? - init_attr->cap.max_inline_data = - max_inline_size(qp, iboffload_module->device); -*/ - /* Pasha: we can not leave max_inline empty ! - Todo: copy max_inline_size() from ofacm to - common area. - */ - init_attr->cap.max_inline_data = (int32_t) cm->max_inline_data; - - /* We allocate SG list for some algorithms (Bruck's alltoall) */ - max_sge = ep->iboffload_module->group_size / 2 + - ep->iboffload_module->group_size % 2; - - /* max send sge should be less than device maximums */ - if (max_sge > (uint32_t) - ep->iboffload_module->device->ib_dev_attr.max_sge) { - max_sge = (uint32_t) ep->iboffload_module->device->ib_dev_attr.max_sge; - } - - init_attr->cap.max_send_sge = max_sge; - init_attr->cap.max_recv_sge = max_sge; -/* Vasily: the value will be changed later */ -/* TODO Pasha: this is real crap */ - init_attr->cap.max_recv_wr = (uint32_t) cm->cq_size; - init_attr->cap.max_send_wr = (uint32_t) cm->cq_size; - - /* Set attributes */ - - /* attr->pkey_index = 0; */ /* Vasily: ????? */ - - attr->port_num = ep->iboffload_module->port; -/* Vasily: the value will be changed later */ - attr->path_mtu = (uint32_t)cm->mtu; - - attr->max_dest_rd_atomic = cm->max_rdma_dst_ops; - attr->min_rnr_timer = (uint32_t)cm->min_rnr_timer; - - attr->ah_attr.is_global = 0; - attr->ah_attr.sl = (uint32_t)cm->service_level; -/* Vasily: from struct mca_bcol_iboffload_port_t ????? */ -/* - attr->ah_attr.src_path_bits = iboffload_module->src_path_bits; -*/ - attr->ah_attr.port_num = ep->iboffload_module->port; - /* JMS to be filled in later dynamically */ - attr->ah_attr.static_rate = 0; - /* RTS params */ - attr->timeout = (uint32_t)cm->timeout; - attr->retry_cnt = (uint32_t)cm->retry_count; - attr->rnr_retry = (uint32_t)cm->rnr_retry; - attr->max_rd_atomic = (uint32_t)cm->max_rdma_dst_ops; - - /* Init for local mca_bcol_iboffload_endpoint_qp_t qps structure - * that caches the qp information on endpoint */ - OBJ_CONSTRUCT(&ep->qps[qp_index].preposted_frags, opal_list_t); - - /* Pasha: Need to add function that will */ - ep->qps[qp_index].ib_inline_max = cm->max_inline_data; - /* TODO Pasha - this is crap too... we do not have info for sevice qps. Fix it later */ - - ep->qps[qp_index].sd_wqe = cm->qp_infos[qp_index].rd_num; - ep->qps[qp_index].rd_wqe = cm->qp_infos[qp_index].rd_num; - - IBOFFLOAD_VERBOSE(10, ("ep - %p, qp index - %d, num of rd_wqe - %d.", - ep, qp_index, ep->qps[qp_index].rd_wqe)); -} - -static int mca_bcol_iboffload_alloc_reg_qp_resource(int qp_index, mca_bcol_iboffload_device_t *device) -{ - int length; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - ompi_free_list_t *frags_free = &device->frags_free[qp_index]; - - OBJ_CONSTRUCT(frags_free, ompi_free_list_t); - length = cm->qp_infos[qp_index].size; - - IBOFFLOAD_VERBOSE(10, ("free list len %d\n", length)); - if (OMPI_SUCCESS != ompi_free_list_init_ex_new(frags_free, - sizeof(mca_bcol_iboffload_frag_t), MCA_IBOFFLOAD_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_iboffload_frag_t), - length, cm->buffer_alignment, - cm->free_list_num, - cm->free_list_max, - cm->free_list_inc, - device->mpool, - mca_bcol_iboffload_frag_init, - (void *) &cm->qp_infos[qp_index].qp_index)) { - IBOFFLOAD_ERROR(("Failed to allocate frags_free")); - return OMPI_ERROR; - } - - return OMPI_SUCCESS; -} -static int mca_bcol_iboffload_dealloc_reg_qp_resource(int qp_index, mca_bcol_iboffload_device_t *device) -{ - OBJ_DESTRUCT(&device->frags_free[qp_index]); - - return OMPI_SUCCESS; -} - -static mca_bcol_iboffload_frag_t *mca_bcol_iboffload_get_dummy_frag( - mca_bcol_iboffload_endpoint_t *ep, int qp_index) -{ - return &ep->iboffload_module->device->dummy_frags[qp_index]; -} - -static mca_bcol_iboffload_frag_t *mca_bcol_iboffload_endpoint_get_preposted_frag( - mca_bcol_iboffload_endpoint_t *ep, int qp_index) -{ - return (mca_bcol_iboffload_frag_t *) - opal_list_remove_first(&ep->qps[qp_index].preposted_frags); -} - -static void mca_bcol_iboffload_regular_qp_attr(int qp_index, - mca_bcol_iboffload_endpoint_t *ep, - ompi_common_ofacm_base_qp_config_t *qp_config) -{ - struct ibv_qp_init_attr *init_attr = &qp_config->init_attr[qp_index]; - - mca_bcol_iboffload_fillin_qp_attr(qp_index, ep, qp_config); - - init_attr->send_cq = ep->iboffload_module->device->ib_cq; - init_attr->recv_cq = ep->recv_cq[IBOFFLOAD_CQ_SMALL_MESSAGES]; -} - -static void mca_bcol_iboffload_large_buff_qp_attr(int qp_index, - mca_bcol_iboffload_endpoint_t *ep, - ompi_common_ofacm_base_qp_config_t *qp_config) -{ - struct ibv_qp_init_attr *init_attr = &qp_config->init_attr[qp_index]; - - mca_bcol_iboffload_fillin_qp_attr(qp_index, ep, qp_config); - - init_attr->send_cq = ep->iboffload_module->device->ib_cq; - init_attr->recv_cq = ep->recv_cq[IBOFFLOAD_CQ_LARGE_MESSAGES]; -} - -static void mca_bcol_iboffload_sync_qp_attr(int qp_index, - mca_bcol_iboffload_endpoint_t *ep, - ompi_common_ofacm_base_qp_config_t *qp_config) -{ - struct ibv_qp_init_attr *init_attr = &qp_config->init_attr[qp_index]; - - mca_bcol_iboffload_fillin_qp_attr(qp_index, ep, qp_config); - - init_attr->send_cq = ep->iboffload_module->device->ib_cq; - init_attr->recv_cq = ep->recv_cq[IBOFFLOAD_CQ_SYNC]; -} - -static int mca_bcol_iboffload_setup_barrier_qp(mca_bcol_iboffload_qp_info_t* qp_info) -{ - qp_info->config_qp = mca_bcol_iboffload_regular_qp_attr; - qp_info->prepost_recv = mca_bcol_iboffload_dummy_frag_qp_prepost; - - qp_info->alloc_resource = NULL; - qp_info->dealloc_resource = NULL; - - qp_info->get_preposted_recv = mca_bcol_iboffload_get_dummy_frag; - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_setup_regular_qp(mca_bcol_iboffload_qp_info_t* qp_info) -{ - qp_info->config_qp = mca_bcol_iboffload_regular_qp_attr; - qp_info->prepost_recv = mca_bcol_iboffload_frag_reg_qp_prepost; - - qp_info->alloc_resource = mca_bcol_iboffload_alloc_reg_qp_resource; - qp_info->dealloc_resource = mca_bcol_iboffload_dealloc_reg_qp_resource; - - qp_info->get_preposted_recv = mca_bcol_iboffload_endpoint_get_preposted_frag; - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_setup_large_buff_qp(mca_bcol_iboffload_qp_info_t* qp_info) -{ - qp_info->config_qp = mca_bcol_iboffload_large_buff_qp_attr; - - qp_info->prepost_recv = NULL; /* We use "manual" ML frag preposting for this QP */ - qp_info->alloc_resource = NULL; - qp_info->dealloc_resource = NULL; - qp_info->get_preposted_recv = NULL; - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_setup_credit_qp(mca_bcol_iboffload_qp_info_t* qp_info) -{ - qp_info->config_qp = mca_bcol_iboffload_large_buff_qp_attr; - qp_info->prepost_recv = mca_bcol_iboffload_dummy_frag_qp_prepost; - - qp_info->alloc_resource = NULL; - qp_info->dealloc_resource = NULL; - - qp_info->get_preposted_recv = mca_bcol_iboffload_get_dummy_frag; - - return OMPI_SUCCESS; -} - -static int mca_bcol_iboffload_setup_sync_qp(mca_bcol_iboffload_qp_info_t* qp_info) -{ - qp_info->config_qp = mca_bcol_iboffload_sync_qp_attr; - qp_info->prepost_recv = mca_bcol_iboffload_dummy_frag_qp_prepost; - - qp_info->alloc_resource = NULL; - qp_info->dealloc_resource = NULL; - - qp_info->get_preposted_recv = mca_bcol_iboffload_get_dummy_frag; - - return OMPI_SUCCESS; -} - -mca_bcol_iboffload_setup_qps_fn_t setup_qps_fn[MCA_BCOL_IBOFFLOAD_QP_LAST] = { - mca_bcol_iboffload_setup_barrier_qp, /* MCA_BCOL_IBOFFLOAD_QP_BARRIER */ - mca_bcol_iboffload_setup_regular_qp, /* MCA_BCOL_IBOFFLOAD_QP_REGULAR */ - mca_bcol_iboffload_setup_sync_qp, /* MCA_BCOL_IBOFFLOAD_QP_SYNC */ - mca_bcol_iboffload_setup_credit_qp, /* MCA_BCOL_IBOFFLOAD_QP_CREDIT */ - mca_bcol_iboffload_setup_large_buff_qp, /* MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF */ - /* MCA_BCOL_IBOFFLOAD_QP_LAST */ -}; diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.h b/ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.h deleted file mode 100644 index e904e10888e..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_qp_info.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/* - * In order to add a new QP you need to do next steps: - * - * 1) Add new index to enum with list of the all QPs, - * MCA_BCOL_IBOFFLOAD_QP_NEW_QP e.g. - * - * 2) In the setup_qps_fn array init MCA_BCOL_IBOFFLOAD_QP_NEW_QP - * index with your init func for this QP. - * - * 3) In the init func you added init the next func pointers: - * a) config_qp - in this func you need to fill in ibv_qp_init_attr - * structure will be used for this QP creation. - * - * b) prepost_recv - you have to specify this poiner if you want - * automatically executed preposting to your new QP. - * - * c) alloc_resource - will be called during device activation, - * if you need any device resource (list of frags for example) - * for your new QP here the right place to allocate it. - * - * d) dealloc_resource - if any resource was allocated dynamically - * by alloc_resource func destruct it in this func. - * - * e) get_preposted_recv - the function returns preposted recieve for 'wait task'. - * - * d) If you don't need any of these funcs you have to init appropriate pointer with NULL. - */ - -#ifndef MCA_BCOL_IBOFFLOAD_QP_INFO_H -#define MCA_BCOL_IBOFFLOAD_QP_INFO_H - -#include "ompi_config.h" - -BEGIN_C_DECLS - -/* forward declarations */ -struct mca_bcol_iboffload_device_t; -struct mca_bcol_iboffload_collreq_t; -struct mca_bcol_iboffload_qp_info_t; -struct mca_bcol_iboffload_endpoint_t; - -/* The list of the all required QPs */ -enum { - MCA_BCOL_IBOFFLOAD_QP_BARRIER, - MCA_BCOL_IBOFFLOAD_QP_REGULAR, - MCA_BCOL_IBOFFLOAD_QP_SYNC, - MCA_BCOL_IBOFFLOAD_QP_CREDIT, - MCA_BCOL_IBOFFLOAD_QP_LARGE_BUFF, - MCA_BCOL_IBOFFLOAD_QP_LAST -}; - -typedef enum { - MCA_BCOL_IBOFFLOAD_PP_QP, - MCA_BCOL_IBOFFLOAD_SRQ_QP, - MCA_BCOL_IBOFFLOAD_XRC_QP -} mca_bcol_iboffload_qp_type_t; - -struct mca_bcol_iboffload_pp_qp_info_t { - int32_t rd_win; - int32_t rd_rsv; -}; typedef struct mca_bcol_iboffload_pp_qp_info_t mca_bcol_iboffload_pp_qp_info_t; - -struct mca_bcol_iboffload_srq_qp_info_t { - int32_t sd_max; -}; typedef struct mca_bcol_iboffload_srq_qp_info_t mca_bcol_iboffload_srq_qp_info_t; - -typedef int (*mca_bcol_iboffload_setup_qps_fn_t) (struct mca_bcol_iboffload_qp_info_t*); -typedef int (*mca_bcol_iboffload_prepost_qps_fn_t) - (struct mca_bcol_iboffload_endpoint_t *endpoint, - int qp_index, int num_to_prepost); - -typedef void (*mca_bcol_iboffload_config_qps_fn_t) - (int qp_index, - struct mca_bcol_iboffload_endpoint_t *ep, - ompi_common_ofacm_base_qp_config_t *qp_config); - -typedef int (*mca_bcol_iboffload_alloc_qps_resource_fn_t) - (int qp_index, - struct mca_bcol_iboffload_device_t *device); - -typedef int (*mca_bcol_iboffload_dealloc_qps_resource_fn_t) - (int qp_index, - struct mca_bcol_iboffload_device_t *device); - -typedef struct mca_bcol_iboffload_frag_t* (*mca_bcol_iboffload_get_preposted_recv_fn_t) - (struct mca_bcol_iboffload_endpoint_t *ep, int qp_index); - -struct mca_bcol_iboffload_qp_info_t { - size_t size; - - int32_t rd_num; - int32_t rd_low; - int32_t rd_pp_win; /* prepost window = rd_num - rd_low */ - int qp_index; - - mca_bcol_iboffload_qp_type_t type; - - mca_bcol_iboffload_config_qps_fn_t config_qp; - mca_bcol_iboffload_prepost_qps_fn_t prepost_recv; - - mca_bcol_iboffload_alloc_qps_resource_fn_t alloc_resource; - mca_bcol_iboffload_dealloc_qps_resource_fn_t dealloc_resource; - - mca_bcol_iboffload_get_preposted_recv_fn_t get_preposted_recv; - - union { - mca_bcol_iboffload_pp_qp_info_t pp_qp; - mca_bcol_iboffload_srq_qp_info_t srq_qp; - } u; -}; typedef struct mca_bcol_iboffload_qp_info_t mca_bcol_iboffload_qp_info_t; - -extern mca_bcol_iboffload_setup_qps_fn_t setup_qps_fn[MCA_BCOL_IBOFFLOAD_QP_LAST]; - -END_C_DECLS - -#endif /* MCA_BCOL_IBOFFLOAD_QP_INFO_H */ - diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_task.c b/ompi/mca/bcol/iboffload/bcol_iboffload_task.c deleted file mode 100644 index 6fcb62391a3..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_task.c +++ /dev/null @@ -1,81 +0,0 @@ - /* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_task.h" - -static void task_constructor(mca_bcol_iboffload_task_t *task) -{ - task->frag = NULL; - task->collfrag = NULL; - task->endpoint = NULL; - task->next_task = NULL; - - task->sg_entries = NULL; - task->sg_entries_num = 0; - - task->task_list = NULL; - - memset(&task->wr, 0, sizeof(task->wr)); - - memset(&task->element, 0, sizeof(struct mqe_task)); - memset(&task->task_mqe_qp_entry, 0, sizeof(struct mqe_qp_entry)); -} - -static void task_destructor(mca_bcol_iboffload_task_t *task) -{ - if (NULL != task->sg_entries) { - free(task->sg_entries); - } -} - -OBJ_CLASS_INSTANCE( - mca_bcol_iboffload_task_t, - ompi_free_list_item_t, - task_constructor, - task_destructor); - -void -mca_bcol_iboffload_calc_task_init(ompi_free_list_item_t* item, void* ctx) -{ - mca_bcol_iboffload_task_t *calc_task = - (mca_bcol_iboffload_task_t *) item; - - calc_task->task_list = (ompi_free_list_t *) ctx; - - calc_task->sg_entries_num = 2; - calc_task->sg_entries = (struct ibv_sge *) malloc (2 * sizeof(struct ibv_sge)); -} - -void -mca_bcol_iboffload_iovec_task_init(ompi_free_list_item_t* item, void* ctx) -{ - mca_bcol_iboffload_task_t *iovec_task = - (mca_bcol_iboffload_task_t *) item; - - mca_bcol_iboffload_module_t *iboffload_module = - (mca_bcol_iboffload_module_t *) ctx; - - int nitems, group_size = iboffload_module->group_size; - - nitems = group_size / 2 + group_size % 2; - if (nitems > iboffload_module->device->ib_dev_attr.max_sge) { - nitems = iboffload_module->device->ib_dev_attr.max_sge; - } - - iovec_task->sg_entries_num = nitems; - iovec_task->task_list = &iboffload_module->iovec_tasks_free; - - iovec_task->sg_entries = (struct ibv_sge *) - malloc(nitems * sizeof(struct ibv_sge)); -} diff --git a/ompi/mca/bcol/iboffload/bcol_iboffload_task.h b/ompi/mca/bcol/iboffload/bcol_iboffload_task.h deleted file mode 100644 index 99bbe8eb1a1..00000000000 --- a/ompi/mca/bcol/iboffload/bcol_iboffload_task.h +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_IBOFFLOAD_TASK_H -#define MCA_BCOL_IBOFFLOAD_TASK_H - -#include "ompi_config.h" - -#include -#include -#include - -#include "bcol_iboffload.h" -#include "bcol_iboffload_frag.h" -#include "bcol_iboffload_collreq.h" -#include "bcol_iboffload_endpoint.h" -#include "bcol_iboffload_collfrag.h" - -#define SENDWR(task) ((task)->element.post.send_wr) - -BEGIN_C_DECLS - -/* the mca_bcol_ibv_mwr_task_t name was replaced with mca_bcol_iboffload_task_t */ -struct mca_bcol_iboffload_task_t { - ompi_free_list_item_t super; - - /* pointer to the memory descriptor associated with the task */ - mca_bcol_iboffload_frag_t *frag; - - /* pointer to the bcol descriptor, - * we need it for send task only becasue we complete them in async maner - */ - mca_bcol_iboffload_collfrag_t *collfrag; - - /* task to be posted */ - struct mqe_task element; - - /* allocate ibv_sge structs array - in a CALC case - * for example it will have two entries. - */ - struct ibv_sge *sg_entries; - - /* sg_entries array length */ - int sg_entries_num; - - /* Each task is a member of some free list, - if the pointer is NULL => we assume the task - is a member of the common task list (tasks_free) */ - ompi_free_list_t *task_list; - - /* Pointer to the next task */ - struct mca_bcol_iboffload_task_t *next_task; - - /* pasha - it is crappy work around for driver interface - * the send_wr and recv_wr should be part of mqe_task and not pointers ! - */ - union { - struct ibv_m_send_wr send_wr; - struct ibv_recv_wr recv_wr; - } wr; - - /* If we'll decide to post a task to a different qp */ - struct mqe_qp_entry task_mqe_qp_entry; - - /* Pointer to endpoint for this task */ - mca_bcol_iboffload_endpoint_t *endpoint; -}; -typedef struct mca_bcol_iboffload_task_t mca_bcol_iboffload_task_t; -OBJ_CLASS_DECLARATION(mca_bcol_iboffload_task_t); - - -/* calc_tasks_free free list init function */ -void -mca_bcol_iboffload_calc_task_init(ompi_free_list_item_t* item, void* ctx); - -/* iovec_tasks_free free list init function */ -void -mca_bcol_iboffload_iovec_task_init(ompi_free_list_item_t* item, void* ctx); - -static inline __opal_attribute_always_inline__ void - mca_bcol_iboffload_return_frag_tolist( - mca_bcol_iboffload_frag_t *frag, - ompi_free_list_t *list) -{ - if (NULL != frag) { - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - assert(MCA_BCOL_IBOFFLOAD_NONE_OWNER != frag->type); - - if (MCA_BCOL_IBOFFLOAD_DUMMY_OWNER != frag->type && - 0 == frag->ref_counter) { - if (MCA_BCOL_IBOFFLOAD_BCOL_OWNER == frag->type) { - OMPI_FREE_LIST_RETURN_MT((&(list[frag->qp_index])), - (ompi_free_list_item_t*) frag); - } else if (MCA_BCOL_IBOFFLOAD_ML_OWNER == frag->type) { - OMPI_FREE_LIST_RETURN_MT((&(cm->ml_frags_free)), - (ompi_free_list_item_t*) frag); - } - } - } -} - -static inline __opal_attribute_always_inline__ void - mca_bcol_iboffload_return_recv_frags_toendpoint( - mca_bcol_iboffload_frag_t *frags, - mca_bcol_iboffload_endpoint_t *ep, - int qp_index) -{ - mca_bcol_iboffload_frag_t *recv_frag = frags; - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - - while (NULL != recv_frag) { - assert(MCA_BCOL_IBOFFLOAD_NONE_OWNER != recv_frag->type); - if (MCA_BCOL_IBOFFLOAD_ML_OWNER != recv_frag->type) { - opal_list_prepend(&ep->qps[qp_index].preposted_frags, - (opal_list_item_t *) recv_frag); - } else { - OMPI_FREE_LIST_RETURN_MT((&(cm->ml_frags_free)), - (ompi_free_list_item_t*) recv_frag); - } - - recv_frag = recv_frag->next; - } -} - -/* Wait task allocation and initialization */ -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* - mca_bcol_iboffload_get_wait_task(mca_bcol_iboffload_module_t *iboffload, - uint32_t source, int num_waits, - mca_bcol_iboffload_frag_t *frags, - int qp_index, struct ibv_qp *qp) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_task_t *task; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[source]; - - /* blocking allocation for send fragment */ - OMPI_FREE_LIST_GET_MT(&cm->tasks_free, item); - if (OPAL_UNLIKELY(NULL == item)) { - mca_bcol_iboffload_return_recv_frags_toendpoint(frags, endpoint, qp_index); - return NULL; - } - - task = (mca_bcol_iboffload_task_t *) item; - /* set pointer to corresponding recv fragment */ - IBOFFLOAD_SET_FRAGS_ON_TASK(frags, task); - - task->next_task = NULL; - task->endpoint = endpoint; - - /* set opcode */ - task->element.opcode = MQE_WR_CQE_WAIT; - task->element.flags = 0; /* Here maybe ANY flag, anyway driver ignore it */ - /* set task id */ - task->element.wr_id = (uint64_t) (uintptr_t) task; - /* set CQ */ - task->element.wait.cq = endpoint->qp_config.init_attr[qp_index].recv_cq; - - /* set number of tasks to task */ - task->element.wait.count = num_waits; - /* set pointer to QP */ - - if (NULL == qp) { /* NULL means use MQ's QP */ - task->element.wait.mqe_qp = NULL; - } else { /* Post wait to the SQ of this QP */ - task->task_mqe_qp_entry.next = NULL; - task->task_mqe_qp_entry.qp = qp; - - task->element.wait.mqe_qp = &task->task_mqe_qp_entry; - } - - IBOFFLOAD_VERBOSE(10, ("Allocating task %p, cq: %p, num waits: %d, qp_index - %d, " - "destination %d for comm rank: %d.\n", - (void *) task, (void *) task->element.wait.cq, - task->element.wait.count, qp_index, source, - endpoint->iboffload_module->ibnet->super.group_list[endpoint->index])); - return task; -} - -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* -mca_bcol_iboffload_prepare_send_task( - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_endpoint_t *endpoint, - int qp_index, ompi_free_list_t *task_list, - mca_bcol_iboffload_collfrag_t *collfrag) -{ - ompi_free_list_item_t *item; - mca_bcol_iboffload_task_t *task; - - IBOFFLOAD_VERBOSE(10, ("Destination rank - %d, QP index - %d, " - "for comm rank - %d\n", endpoint->index, qp_index, - endpoint->iboffload_module->ibnet->super.group_list[endpoint->index])); - - /* get item from free list */ - OMPI_FREE_LIST_GET_MT(task_list, item); - if (OPAL_UNLIKELY(NULL == item)) { - return NULL; - } - - task = (mca_bcol_iboffload_task_t*) item; - task->endpoint = endpoint; - - ++(collfrag->n_sends); - task->collfrag = collfrag; - - task->next_task = NULL; - task->element.wr_id = (uint64_t) (uintptr_t) task; - - task->element.post.qp = endpoint->qps[qp_index].qp->lcl_qp; - - task->element.opcode = MQE_WR_SEND; - - /* define send work request */ - SENDWR(task) = &(task->wr.send_wr); - - SENDWR(task)->next = NULL; - - SENDWR(task)->wr_id = (uint64_t) (uintptr_t) collfrag; - IBOFFLOAD_VERBOSE(10, ("coll_frag - %p.\n", collfrag)); - - /* Allways send IMM on sends ! */ - task->element.flags = MQE_WR_FLAG_IMM_EXE; - - /* Always signal completion */ - SENDWR(task)->send_flags = IBV_SEND_SIGNALED; - - return task; -} - -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* -mca_bcol_iboffload_get_send_task( - mca_bcol_iboffload_module_t *iboffload, - uint32_t destination, int qp_index, - mca_bcol_iboffload_frag_t *frag, - mca_bcol_iboffload_collfrag_t *collfrag, - bool enable_inline) -{ - mca_bcol_iboffload_task_t *task; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[destination]; - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_get_send_task qp_index %d\n", - qp_index)); - - task = mca_bcol_iboffload_prepare_send_task(iboffload, endpoint, qp_index, - &cm->tasks_free, - collfrag); - - if (OPAL_UNLIKELY(NULL == task)) { - mca_bcol_iboffload_return_frag_tolist(frag, iboffload->device->frags_free); - return NULL; - } - - /* no support for multiple frags */ - IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(frag, task); - - /* We can not do send with 0 byte but we can do zero byte RDMA with immidiate */ - if (0 == frag->sg_entry.length) { - SENDWR(task)->imm_data = 0; - SENDWR(task)->opcode = IBV_WR_RDMA_WRITE_WITH_IMM; - - SENDWR(task)->wr.rdma.rkey = endpoint->remote_zero_rdma_addr.rkey; - SENDWR(task)->wr.rdma.remote_addr = endpoint->remote_zero_rdma_addr.addr; - } else { - SENDWR(task)->opcode = IBV_WR_SEND; - } - - /* single sge */ - SENDWR(task)->num_sge = 1; - SENDWR(task)->sg_list = &(frag->sg_entry); - - /* Use inline send when it is possible */ - if (enable_inline && - frag->sg_entry.length < cm->max_inline_data) { - IBOFFLOAD_VERBOSE(10, ("Setting inline for len %d\n", frag->sg_entry.length)); - SENDWR(task)->send_flags |= IBV_SEND_INLINE; - } - - return task; -} - -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* -mca_bcol_iboffload_get_send_vec_task( - mca_bcol_iboffload_module_t *iboffload, - uint32_t destination, int qp_index, - size_t nitems, - struct iovec *buff_iovec, - uint32_t lkey, - mca_bcol_iboffload_frag_t *frag, - mca_bcol_iboffload_collfrag_t *collfrag, - bool enable_inline) -{ - mca_bcol_iboffload_task_t *task; - int i; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[destination]; - - IBOFFLOAD_VERBOSE(10, ("mca_bcol_iboffload_get_send_task qp_index %d\n", - qp_index)); - - task = mca_bcol_iboffload_prepare_send_task(iboffload, endpoint, qp_index, - &iboffload->iovec_tasks_free, - collfrag); - - if (OPAL_UNLIKELY(NULL == task)) { - mca_bcol_iboffload_return_frag_tolist(frag, iboffload->device->frags_free); - return NULL; - } - - /* no support for multiple frags */ - IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(frag, task); - - /* We can not do send with 0 byte but we can do zero byte RDMA with immidiate */ - SENDWR(task)->opcode = IBV_WR_SEND; - - assert (task->sg_entries != NULL); - - for (i = 0; (size_t) i < nitems; ++i){ - task->sg_entries[i].length = buff_iovec[i].iov_len; - task->sg_entries[i].addr = (uint64_t) buff_iovec[i].iov_base; - task->sg_entries[i].lkey = lkey; - } - - /* multiple sge */ - SENDWR(task)->num_sge = nitems; - SENDWR(task)->sg_list = (task->sg_entries); - - /* Use inline send when it is possible */ - if (enable_inline && - frag->sg_entry.length < cm->max_inline_data) { - IBOFFLOAD_VERBOSE(10, ("Setting inline for len %d\n", frag->sg_entry.length)); - SENDWR(task)->send_flags |= IBV_SEND_INLINE; - } - - return task; -} -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* - mca_bcol_iboffload_get_rdma_vec_task( - uint32_t destination, size_t offset, size_t nitems, - mca_bcol_iboffload_frag_t *frag, - mca_bcol_iboffload_module_t *iboffload, - struct iovec *buff_iovec, uint32_t lkey, - mca_bcol_iboffload_collfrag_t *collfrag) -{ - int i; - mca_bcol_iboffload_collreq_t *coll_request = collfrag->coll_full_req; - - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_endpoint_t *endpoint = - iboffload->endpoints[destination]; - - task = mca_bcol_iboffload_prepare_send_task(iboffload, endpoint, - coll_request->qp_index, - &iboffload->iovec_tasks_free, - collfrag); - if (OPAL_UNLIKELY(NULL == task)) { - mca_bcol_iboffload_return_frag_tolist(frag, iboffload->device->frags_free); - return NULL; - } - - /* no support for multiple frags */ - IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(frag, task); - - SENDWR(task)->imm_data = 0; - SENDWR(task)->opcode = IBV_WR_RDMA_WRITE_WITH_IMM; - SENDWR(task)->wr.rdma.rkey = endpoint->remote_rdma_block.ib_info.rkey; - - SENDWR(task)->wr.rdma.remote_addr = (uint64_t) (uintptr_t) - ((unsigned char *) endpoint->remote_rdma_block.rdma_desc[coll_request->ml_buffer_index].data_addr + offset); - - for (i = 0; (size_t) i < nitems; ++i){ - task->sg_entries[i].length = buff_iovec[i].iov_len; - task->sg_entries[i].addr = (uint64_t) buff_iovec[i].iov_base; - task->sg_entries[i].lkey = lkey; - } - - /* single sge */ - SENDWR(task)->num_sge = nitems; - SENDWR(task)->sg_list = (task->sg_entries); - - IBOFFLOAD_VERBOSE(10, ("The remote offset %ld \n", offset)); - return task; -} - -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* - mca_bcol_iboffload_get_rdma_task( - uint32_t destination, size_t offset, - mca_bcol_iboffload_frag_t *frag, - mca_bcol_iboffload_module_t *iboffload, - mca_bcol_iboffload_collfrag_t *collfrag) -{ - mca_bcol_iboffload_collreq_t *coll_request = collfrag->coll_full_req; - - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_endpoint_t *endpoint = - iboffload->endpoints[destination]; - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - task = mca_bcol_iboffload_prepare_send_task(iboffload, endpoint, - coll_request->qp_index, - &cm->tasks_free, collfrag); - if (OPAL_UNLIKELY(NULL == task)) { - mca_bcol_iboffload_return_frag_tolist(frag, iboffload->device->frags_free); - return NULL; - } - - /* no support for multiple frags */ - IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(frag, task); - - SENDWR(task)->imm_data = 0; - SENDWR(task)->opcode = IBV_WR_RDMA_WRITE_WITH_IMM; - SENDWR(task)->wr.rdma.rkey = endpoint->remote_rdma_block.ib_info.rkey; - /* Pasha: I really not happy with the way we calculate remote addresses. - why we don't use rbuf + offset ?*/ - SENDWR(task)->wr.rdma.remote_addr = (uint64_t) (uintptr_t) - ((unsigned char *) endpoint->remote_rdma_block.rdma_desc[coll_request->ml_buffer_index].data_addr + offset); - /* single sge */ - SENDWR(task)->num_sge = 1; - SENDWR(task)->sg_list = &(frag->sg_entry); - - IBOFFLOAD_VERBOSE(10, ("The remote offset %ld \n", offset)); - return task; -} - -/* Pasha: hacking version of calc operation */ - static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* -mca_bcol_iboffload_get_calc_task(mca_bcol_iboffload_module_t *iboffload, - uint32_t destination, int qp_index, mca_bcol_iboffload_frag_t *frag, - struct ibv_sge *l_operand, struct ibv_sge *r_operand, - mca_bcol_iboffload_collreq_t *coll_request, - bool enable_inline) -/* Some specifications for this function: - * 1) We assume that the len of two operands (ibv_sge structs) is a same. - * 2) Possibly we use the results (ibv_sge structs) from previous - * calc operations => maybe the frag pointer is NULL. - */ -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_endpoint_t *endpoint = - iboffload->endpoints[destination]; - - mca_bcol_iboffload_collfrag_t *collfrag = - (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - task = mca_bcol_iboffload_prepare_send_task(iboffload, endpoint, qp_index, - &cm->calc_tasks_free, collfrag); - if (OPAL_UNLIKELY(NULL == task)) { - mca_bcol_iboffload_return_frag_tolist(frag, iboffload->device->frags_free); - return NULL; - } - - if (NULL != frag) { - IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(frag, task); - } else { - task->frag = NULL; - } - - task->sg_entries[0] = *l_operand; - task->sg_entries[1] = *r_operand; - - SENDWR(task)->num_sge = 2; - SENDWR(task)->sg_list = task->sg_entries; - - SENDWR(task)->opcode = MCA_BCOL_IBOFFLOAD_SEND_CALC; -#if OPAL_HAVE_IBOFFLOAD_CALC_RDMA - SENDWR(task)->wr.calc_send.data_type = coll_request->actual_ib_dtype; - SENDWR(task)->wr.calc_send.calc_op = coll_request->actual_ib_op; -#else - SENDWR(task)->wr.calc.data_type = coll_request->actual_ib_dtype; - SENDWR(task)->wr.calc.calc_op = coll_request->actual_ib_op; -#endif - - return task; -} - -static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t* - mca_bcol_iboffload_get_rdma_calc_task(mca_bcol_iboffload_module_t *iboffload, - uint32_t destination, int qp_index, mca_bcol_iboffload_frag_t *frag, - struct ibv_sge *l_operand, struct ibv_sge *r_operand, - mca_bcol_iboffload_collreq_t *coll_request, - size_t offset) -/* Some specifications for this function: - * 1) We assume that the len of two operands (ibv_sge structs) is a same. - * 2) Possibly we use the results (ibv_sge structs) from previous - * calc operations => maybe the frag pointer is NULL. - */ -{ - mca_bcol_iboffload_task_t *task; - mca_bcol_iboffload_endpoint_t *endpoint = - iboffload->endpoints[destination]; - - mca_bcol_iboffload_collfrag_t *collfrag = - (mca_bcol_iboffload_collfrag_t *) - opal_list_get_last(&coll_request->work_requests); - - mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component; - task = mca_bcol_iboffload_prepare_send_task(iboffload, endpoint, qp_index, - &cm->calc_tasks_free, collfrag); - if (OPAL_UNLIKELY(NULL == task)) { - mca_bcol_iboffload_return_frag_tolist(frag, iboffload->device->frags_free); - return NULL; - } - - if (NULL != frag) { - IBOFFLOAD_SET_SINGLE_FRAG_ON_TASK(frag, task); - } else { - task->frag = NULL; - } - - task->sg_entries[0] = *l_operand; - - /* Hack - we don't really use it. - task->sg_entries[1] = *r_operand; - */ - /* We use only single entry - SENDWR(task)->num_sge = 2; - */ - SENDWR(task)->num_sge = 1; - SENDWR(task)->sg_list = task->sg_entries; - -#if OPAL_HAVE_IBOFFLOAD_CALC_RDMA - SENDWR(task)->opcode = IBV_M_WR_CALC_RDMA_WRITE_WITH_IMM; - SENDWR(task)->wr.calc_rdma.data_type = coll_request->actual_ib_dtype; - SENDWR(task)->wr.calc_rdma.calc_op = coll_request->actual_ib_op; - SENDWR(task)->wr.calc_rdma.rkey = endpoint->remote_rdma_block.ib_info.rkey; - SENDWR(task)->wr.calc_rdma.remote_addr = (uint64_t) (uintptr_t) - ((unsigned char *) endpoint->remote_rdma_block.rdma_desc[coll_request->ml_buffer_index].data_addr + offset); -#else - IBOFFLOAD_ERROR(("Fatal error: RDMA CALC was called, but the driver does not support this operation")); - return NULL; -#endif - - return task; -} - -static inline __opal_attribute_always_inline__ - int release_frags_on_task(mca_bcol_iboffload_task_t *task, - ompi_free_list_t *list) -{ - int rc, qp_index; - - mca_bcol_iboffload_frag_t *temp_frag = task->frag; - mca_bcol_iboffload_endpoint_t *endpoint = task->endpoint; - - mca_bcol_iboffload_component_t *cm = - &mca_bcol_iboffload_component; - - IBOFFLOAD_VERBOSE(10, ("\nCalling release_frags_on_task")); - - while (NULL != temp_frag) { - qp_index = temp_frag->qp_index; - - --(temp_frag->ref_counter); - - /* Return credits */ - if (MQE_WR_CQE_WAIT == task->element.opcode) { - ++(endpoint->qps[qp_index].rd_wqe); - - IBOFFLOAD_VERBOSE(10, ("Return rd_wqe %d pp_win %d", - endpoint->qps[qp_index].rd_wqe, - cm->qp_infos[qp_index].rd_pp_win)); - - /* Call for recv prepost */ - if (endpoint->qps[qp_index].rd_wqe >= - cm->qp_infos[qp_index].rd_pp_win) { - IBOFFLOAD_VERBOSE(10, ("Prepost to endpoint->index - %d, qp_index - %d", endpoint->index, qp_index)); - rc = mca_bcol_iboffload_prepost_recv(endpoint, qp_index, - endpoint->qps[qp_index].rd_wqe); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBOFFLOAD_ERROR(("QP %d: failed to prepost.\n", qp_index)); - return OMPI_ERROR; - } - /* What happens if we can not prepost ?*/ - } - } else if (MQE_WR_SEND == task->element.opcode) { - ++(endpoint->qps[qp_index].sd_wqe); - - assert(endpoint->qps[qp_index].sd_wqe <= cm->qp_infos[qp_index].rd_num); - - IBOFFLOAD_VERBOSE(10, ("Return sd_wqe %d, qp_index - %d, endpoint - %p", - endpoint->qps[qp_index].sd_wqe, qp_index, endpoint)); - } else { - /* We should not arrive to this case */ - IBOFFLOAD_ERROR(("Unsupporeted operation")); - - return OMPI_ERROR; - } - - mca_bcol_iboffload_return_frag_tolist(temp_frag, list); - temp_frag = temp_frag->next; - } - - return OMPI_SUCCESS; -} - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/iboffload/configure.m4 b/ompi/mca/bcol/iboffload/configure.m4 deleted file mode 100644 index 142f4f7f1c5..00000000000 --- a/ompi/mca/bcol/iboffload/configure.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_ompi_bcol_iboffload_CONFIG([should_build]) -# ------------------------------------------ -# AC_DEFUN([MCA_ompi_bcol_iboffload_POST_CONFIG], [ -# ]) - - -# MCA_ompi_bcol_iboffload_CONFIG([action-if-can-compile], -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_ompi_bcol_iboffload_CONFIG],[ - AC_CONFIG_FILES([ompi/mca/bcol/iboffload/Makefile]) - bcol_ofa_happy="no" - bcol_mlnx_ofed_happy="no" - - OPAL_CHECK_OPENFABRICS([bcol_iboffload], [bcol_ofa_happy="yes"]) - OPAL_CHECK_MLNX_OPENFABRICS([bcol_iboffload], [bcol_mlnx_ofed_happy="yes"]) - - AS_IF([test "$bcol_ofa_happy" = "yes" -a "$bcol_mlnx_ofed_happy" = "yes"], - [$1], - [$2]) - - # substitute in the things needed to build iboffload - AC_SUBST([bcol_iboffload_CFLAGS]) - AC_SUBST([bcol_iboffload_CPPFLAGS]) - AC_SUBST([bcol_iboffload_LDFLAGS]) - AC_SUBST([bcol_iboffload_LIBS]) -])dnl diff --git a/ompi/mca/bcol/iboffload/owner.txt b/ompi/mca/bcol/iboffload/owner.txt deleted file mode 100644 index 51ea04a5175..00000000000 --- a/ompi/mca/bcol/iboffload/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ORNL? -status: unmaintained diff --git a/ompi/mca/bcol/ptpcoll/Makefile.am b/ompi/mca/bcol/ptpcoll/Makefile.am deleted file mode 100644 index 51a3ea6491b..00000000000 --- a/ompi/mca/bcol/ptpcoll/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2013 Mellanox Technologies. All rights reserved. -# Copyright (c) 2013 Los Alamos National Security, LLC. All rights -# reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - bcol_ptpcoll.h \ - bcol_ptpcoll_utils.h \ - bcol_ptpcoll_utils.c \ - bcol_ptpcoll_mca.h \ - bcol_ptpcoll_mca.c \ - bcol_ptpcoll_barrier.c \ - bcol_ptpcoll_bcast.c \ - bcol_ptpcoll_bcast.h \ - bcol_ptpcoll_component.c \ - bcol_ptpcoll_fanin.c \ - bcol_ptpcoll_fanout.c \ - bcol_ptpcoll_module.c \ - bcol_ptpcoll_allreduce.h \ - bcol_ptpcoll_allreduce.c \ - bcol_ptpcoll_reduce.h \ - bcol_ptpcoll_reduce.c \ - bcol_ptpcoll_allgather.c - - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_bcol_ptpcoll_DSO -component_install += mca_bcol_ptpcoll.la -else -component_noinst += libmca_bcol_ptpcoll.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_bcol_ptpcoll_la_SOURCES = $(sources) -mca_bcol_ptpcoll_la_LDFLAGS = -module -avoid-version -mca_bcol_ptpcoll_la_LIBADD = - -noinst_LTLIBRARIES = $(component_noinst) -libmca_bcol_ptpcoll_la_SOURCES =$(sources) -libmca_bcol_ptpcoll_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h deleted file mode 100644 index 6a8b2e53d12..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h +++ /dev/null @@ -1,474 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_PTPCOLL_EXPORT_H -#define MCA_BCOL_PTPCOLL_EXPORT_H - -#include "ompi_config.h" - -#include "mpi.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/patterns/net/netpatterns.h" - -BEGIN_C_DECLS - -#ifdef HAVE_SCHED_YIELD -# include -# define SPIN sched_yield() -#else /* no switch available */ -# define SPIN -#endif - -/** - * Structure to hold the basic shared memory coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ -struct mca_bcol_ptpcoll_component_t { - /** Base coll component */ - mca_bcol_base_component_2_0_0_t super; - /** Verbosity level, used only in debug enabled builds */ - int verbose; - /** The radix of K-nomial tree, initilized by mca parameter */ - int k_nomial_radix; - /** The radix of narray tree, initilized by mca parameter */ - int narray_radix; - /** The radix is used for narray scatther and knomail gather for - large message bcast **/ - int narray_knomial_radix; - /** Number of times to poll for specific tag/src */ - int num_to_probe; - /* - * bcast small messages algorithm - * 1 - Knomial bcast - * 2 - Narray bcast - */ - int bcast_small_messages_known_root_alg; - /* - * bcast large messages algorithm - * 1 - binomial scatter-gather - * 2 - Narray scatther, knomial gather - */ - int bcast_large_messages_known_root_alg; - /* - * barrier algorithm - * 1 - recursive doubling - * 2 - recursive K-ing - */ - int barrier_alg; - - int use_brucks_smsg_alltoall_rdma; -}; - -struct mca_bcol_ptpcoll_collreq_t { - opal_free_list_item_t super; - - int tag; - int num_reqs; - int exchange; - - int need_toserv_extra; - int extra_partner_rank; - - ompi_request_t **requests; -}; -typedef struct mca_bcol_ptpcoll_collreq_t mca_bcol_ptpcoll_collreq_t; -OBJ_CLASS_DECLARATION(mca_bcol_ptpcoll_collreq_t); - -/** - * Convenience typedef - */ -typedef struct mca_bcol_ptpcoll_component_t mca_bcol_ptpcoll_component_t; - -/* Bcast small messages, - known root algorithm */ -enum { - PTPCOLL_KNOMIAL = 1, - PTPCOLL_NARRAY -}; - -/* Bcast large messages, - known root algorithm */ -enum { - PTPCOLL_BINOMIAL_SG = 1, /* Binomila scatter-gather */ - PTPCOLL_NARRAY_KNOMIAL_SG /* Narray-Knomial scatter-gather */ -}; - -/* - * Implemented function index list - */ - -/* barrier */ -enum{ - FANIN_FAN_OUT_BARRIER_FN, - RECURSIVE_DOUBLING_BARRIER_FN, - N_BARRIER_FNS -}; - -/* reduce */ -enum{ - FANIN_REDUCE_FN, - REDUCE_SCATTER_GATHER_FN, - N_REDUCE_FNS -}; -enum{ - SHORT_DATA_FN_REDUCE, - LONG_DATA_FN_REDUCE, - N_REDUCE_FNS_USED -}; - -/* all-reduce */ -enum{ - FANIN_FANOUT_ALLREDUCE_FN, - REDUCE_SCATTER_ALLGATHER_FN, - N_ALLREDUCE_FNS -}; -enum{ - SHORT_DATA_FN_ALLREDUCE, - LONG_DATA_FN_ALLREDUCE, - N_ALLREDUCE_FNS_USED -}; - - -/* - * N-order tree node description - */ -struct tree_node_t { - /* my rank within the group */ - int my_rank; - /* my node type - root, leaf, or interior */ - int my_node_type; - /* number of nodes in the tree */ - int tree_size; - /* number of parents (0/1) */ - int n_parents; - /* number of children */ - int n_children; - /* parent rank within the group */ - int parent_rank; - /* chidren ranks within the group */ - int *children_ranks; -}; -typedef struct tree_node_t tree_node_t; - -struct pair_exchange_node_t { - - /* number of nodes this node will exchange data with */ - int n_exchanges; - - /* ranks of nodes involved in data exchnge */ - int *rank_exchanges; - - /* number of extra sources of data - outside largest power of 2 in - * this group */ - int n_extra_sources; - - /* rank of the extra source */ - int rank_extra_source; - - /* number of tags needed per stripe */ - int n_tags; - - /* log 2 of largest full power of 2 for this node set */ - int log_2; - - /* largest power of 2 that fits in this group */ - int n_largest_pow_2; - - /* node type */ - int node_type; - -}; -typedef struct pair_exchange_node_t pair_exchange_node_t; - -/* - * Barrier request objects - */ - -/* enum for phase at which the nb barrier is in */ -enum{ - NB_BARRIER_INACTIVE, - NB_BARRIER_FAN_IN, - NB_BARRIER_FAN_OUT, - /* done and not started are the same for all practicle - * purposes, as the init funtion always sets this flag - */ - NB_BARRIER_DONE -}; - -typedef enum { - PTPCOLL_NOT_STARTED = 1, - PTPCOLL_WAITING_FOR_DATA = 1 << 1, - PTPCOLL_SCATTER_STARTED = 1 << 2, - PTPCOLL_GATHER_STARTED = 1 << 3, - PTPCOLL_EXTRA_SEND_STARTED = 1 << 4, - PTPCOLL_ROOT_SEND_STARTED = 1 << 5 -} ptpcoll_op_status; - -struct mca_bcol_ptpcoll_ml_buffer_desc_t { - void *data_addr; /* buffer address */ - uint64_t bank_index; /* my bank */ - uint64_t buffer_index; /* my buff index */ - int active_requests; /* keep number of active requests */ - ompi_request_t **requests; /* caching pointers to requests */ - int data_src; /* used for bcast to cache internal data */ - int radix_mask; /* used for bcast to cache internal data */ - int radix_mask_pow; /* used for bcast to cache internal data */ - int iteration; /* buffer iteration in knomial, binomail, etc. algorithms */ - int tag; /* tag number that is attached to this operation */ - int status; /* operation status */ - /* Fixme: Probably we can get rid of these fields by redesigning - * the reduce implementation - */ - int reduction_status; /* used for reduction to cache internal - reduction status */ - bool reduce_init_called; -}; -typedef struct mca_bcol_ptpcoll_ml_buffer_desc_t mca_bcol_ptpcoll_ml_buffer_desc_t; - -/* - * Information that we need to keep in order to access and - * track local ML memory that is used as source and destinatination - * for collectives operations - */ -struct mca_bcol_ptpcoll_local_mlmem_desc_t { - /* Bank index to release */ - uint32_t bank_index_for_release; - /* number of memory banks */ - uint32_t num_banks; - /* number of buffers per bank */ - uint32_t num_buffers_per_bank; - /* size of a payload buffer */ - uint32_t size_buffer; - /* pointer to buffer descriptors initialized */ - mca_bcol_ptpcoll_ml_buffer_desc_t *ml_buf_desc; -}; -typedef struct mca_bcol_ptpcoll_local_mlmem_desc_t mca_bcol_ptpcoll_local_mlmem_desc_t; - -typedef enum { - PTPCOLL_PROXY = 1, - PTPCOLL_IN_GROUP = 1 << 1, - PTPCOLL_EXTRA = 1 << 2, - PTPCOLL_KN_PROXY = 1 << 3, - PTPCOLL_KN_IN_GROUP = 1 << 4, - PTPCOLL_KN_EXTRA = 1 << 5 -} node_type_pow2; - -struct mca_bcol_ptpcoll_module_t { - /* base structure */ - mca_bcol_base_module_t super; - - /* size */ - int group_size; - - /* size of each memory segment */ - size_t segment_size; - - /* k_nomial radix */ - int k_nomial_radix; - /* caching power of K, for K-nomial operations */ - int pow_k; - /* caching power of K number that is smaller or equal to size of group */ - int pow_knum; - /* caching power of 2, it is special case for some algorithms */ - int pow_2; - /* caching power of 2 number that is closet to size of group */ - int pow_2num; - /* type of this node in group of power 2 */ - int pow_2type; - /* type of this node in group of K-nomaial tree */ - int pow_ktype; - /* type of this node in group of narray tree */ - int narray_type; - /* size of full narray tree */ - int full_narray_tree_size; - /* num leafs on last level */ - int full_narray_tree_num_leafs; - - /* Nary tree info */ - netpatterns_tree_node_t *narray_node; - - /* if the rank in group, it keeps the extra peer. - if the rank is extra, it keeps the proxy peer. - */ - int proxy_extra_index; /* pow2 algorithm */ - int *kn_proxy_extra_index; /* K nomaila algorithm */ - int kn_proxy_extra_num; /* number of extra peers , maximum k - 1*/ - - /* collective tag */ - long long collective_tag; - - /* tag mask - the pml has a limit on tag size, so need - * to wrap around - */ - uint64_t tag_mask; - - /* Caching information about local ml memory. - * Since ptpcoll does not support RDMA operations over pml, - * we don't need to keep any information about remote buffers - */ - mca_bcol_ptpcoll_local_mlmem_desc_t ml_mem; - - - /* Narray-Knomial scatther gather */ - - /* list of extra indexes */ - int *narray_knomial_proxy_extra_index; - /* number of extra peers , maximum k - 1*/ - int narray_knomial_proxy_num; - /* Narray-Knomial node information array */ - netpatterns_narray_knomial_tree_node_t *narray_knomial_node; - /* Knomial exchange tree */ - netpatterns_k_exchange_node_t knomial_exchange_tree; - /* knomial allgather tree --- Do not disable, we need both - different algorithms define recursive k - ing differently - */ - netpatterns_k_exchange_node_t knomial_allgather_tree; - - /* Knomial allgather offsets */ - int **allgather_offsets; - - /* Free lists of outstanding collective operations */ - opal_free_list_t collreqs_free; - - int log_group_size; - struct iovec *alltoall_iovec; -}; - -typedef struct mca_bcol_ptpcoll_module_t mca_bcol_ptpcoll_module_t; -OBJ_CLASS_DECLARATION(mca_bcol_ptpcoll_module_t); - - -/** - * Global component instance - */ -OMPI_MODULE_DECLSPEC extern mca_bcol_ptpcoll_component_t -mca_bcol_ptpcoll_component; - - -/* - * coll module functions - */ - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_bcol_ptpcoll_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - -/* query to see if the module is available for use on the given - * communicator, and if so, what it's priority is. - */ -mca_bcol_base_module_t ** -mca_bcol_ptpcoll_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules); - -/* interface function to setup recursive k-ing tree */ -int mca_bcol_ptpcoll_setup_knomial_tree(mca_bcol_base_module_t *super); - -/* barrier routines */ -int bcol_ptpcoll_barrier_recurs_dbl(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_barrier_recurs_knomial(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_barrier_init(mca_bcol_base_module_t *super); -int mca_bcol_ptpcoll_memsync_init(mca_bcol_base_module_t *super); -void * bcol_ptpcoll_allocate_memory(size_t length, size_t alignment, - struct mca_bcol_base_module_t *bcol_module); -int bcol_ptpcoll_register_memory(void * in_ptr, size_t length, size_t alignment, - struct mca_bcol_base_module_t *bcol_module); -int bcol_ptpcoll_deregister_memory( void * in_ptr, - struct mca_bcol_base_module_t *bcol_module); -int bcol_ptpcoll_free_memory(void *ptr, - struct mca_bcol_base_module_t *bcol_module); -int bcol_ptpcoll_fanin( bcol_function_args_t *input_args, - struct mca_bcol_base_module_t *module); -int bcol_ptpcoll_fanout( bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - - -/* allgather routine */ -int bcol_ptpcoll_k_nomial_allgather_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -/* allgather progress */ -int bcol_ptpcoll_k_nomial_allgather_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -/* allgather register */ -int bcol_ptpcoll_allgather_init(mca_bcol_base_module_t *super); - -static inline __opal_attribute_always_inline__ - int mca_bcol_ptpcoll_test_for_match(ompi_request_t **request , int *rc) -{ - int matched = 0; - int i; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - *rc = OMPI_SUCCESS; - - for (i = 0; i < cm->num_to_probe && - 0 == matched && OMPI_SUCCESS == *rc ; i++) { - *rc = ompi_request_test(request, &matched, MPI_STATUS_IGNORE); - } - - return matched; -} - -static inline __opal_attribute_always_inline__ - int mca_bcol_ptpcoll_test_all_for_match(int *n_requests, ompi_request_t **requests , int *rc) -{ - int matched = 0; - int i; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - *rc = OMPI_SUCCESS; - - assert(*n_requests >= 0); - - if (0 == *n_requests) { - return 1; - } - - for (i = 0; i < cm->num_to_probe && - 0 == matched && OMPI_SUCCESS == *rc; i++) { - *rc = ompi_request_test_all - (*n_requests, requests, &matched, MPI_STATUS_IGNORE); - } - - if (matched) { - *n_requests = 0; - } - - return matched; -} - -/* Some negative tags already used by OMPI, making sure that we take safe offset */ -#define PTPCOLL_TAG_OFFSET 100 -#define PTPCOLL_TAG_FACTOR 2 - -static inline int lognum(int n){ - int count = 1, lognum = 0; - - while (count < n) { - count = count << 1; - lognum++; - } - return lognum; -} - -END_C_DECLS - -#endif /* MCA_BCOL_PTPCOLL_EXPORT_H */ diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allgather.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allgather.c deleted file mode 100644 index eeed28e9fea..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allgather.c +++ /dev/null @@ -1,605 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "bcol_ptpcoll_allreduce.h" -/* - * Recursive K-ing allgather - */ - -/* - * - * Recurssive k-ing algorithm - * Example k=3 n=9 - * - * - * Number of Exchange steps = log (basek) n - * Number of steps in exchange step = k (radix) - * - */ - -int bcol_ptpcoll_k_nomial_allgather_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variables */ - - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - netpatterns_k_exchange_node_t *exchange_node = &ptpcoll_module->knomial_allgather_tree; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int group_size = ptpcoll_module->group_size; - int *list_connected = ptpcoll_module->super.list_n_connected; /* critical for hierarchical colls */ - - int tag; - int i, j; - int knt; - int comm_src, comm_dst, src, dst; - int recv_offset, recv_len; - int send_offset, send_len; - - uint32_t buffer_index = input_args->buffer_index; - int pow_k, tree_order; - int rc = OMPI_SUCCESS; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int completed = 0; /* initialized */ - void *data_buffer = (void*)( - (unsigned char *) input_args->sbuf + - (size_t) input_args->sbuf_offset); - int pack_len = input_args->count * input_args->dtype->super.size; - -#if 0 - fprintf(stderr,"entering p2p allgather pack_len %d. exchange node: %p\n",pack_len, exchange_node); -#endif - /* initialize the iteration counter */ - int *iteration = &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - *iteration = 0; - - /* reset active request counter */ - *active_requests = 0; - - /* keep tag within the limit supported by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - /* k-nomial parameters */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - - - /* let's begin the collective, starting with extra ranks and their - * respective proxies - */ - if( EXTRA_NODE == exchange_node->node_type ) { - - /* then I will send to my proxy rank*/ - dst = exchange_node->rank_extra_sources_array[0]; - /* find rank in the communicator */ - comm_dst = group_list[dst]; - /* now I need to calculate my own offset */ - knt = 0; - for (i = 0 ; i < my_group_index; i++){ - knt += list_connected[i]; - } - - /* send the data to my proxy */ - rc = MCA_PML_CALL(isend((void *) ( (unsigned char *) data_buffer + - knt*pack_len), - pack_len * list_connected[my_group_index], - MPI_BYTE, - comm_dst, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10,("Failed to isend data")); - return OMPI_ERROR; - } - ++(*active_requests); - - /* now I go ahead and post the receive from my proxy */ - comm_src = comm_dst; - knt = 0; - for( i =0; i < group_size; i++){ - knt += list_connected[i]; - } - rc = MCA_PML_CALL(irecv(data_buffer, - knt * pack_len, - MPI_BYTE, - comm_src, - tag , comm, &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to post ireceive ")); - return OMPI_ERROR; - } - - ++(*active_requests); - /* poll for completion */ - /* this polls internally */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(completed){ - /* go to buffer release */ - goto FINISHED; - }else{ - /* save state and hop out - * nothing to save here - */ - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - }else if ( 0 < exchange_node->n_extra_sources ) { - - /* I am a proxy for someone */ - src = exchange_node->rank_extra_sources_array[0]; - /* find the rank in the communicator */ - comm_src = group_list[src]; - knt = 0; - for(i = 0; i < src; i++){ - knt += list_connected[i]; - } - /* post the receive */ - rc = MCA_PML_CALL(irecv((void *) ( (unsigned char *) data_buffer - + knt*pack_len), - pack_len * list_connected[src], - MPI_BYTE, - comm_src, - tag , comm, &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to post ireceive ")); - return OMPI_ERROR; - } - - ++(*active_requests); - /* poll for completion */ - /* this routine polls internally */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * We really do need to block here so set - * the iteration to -1 indicating we need to - * finish this part first - */ - *iteration = -1; - return ((OMPI_SUCCESS != rc )? OMPI_ERROR : BCOL_FN_STARTED); - } - - } - - /* we start the recursive k - ing phase */ - /* fprintf(stderr,"tree order %d pow_k %d \n",tree_order,pow_k);*/ - for( i = 0; i < pow_k; i++) { - for(j = 0; j < (tree_order - 1); j++) { - - /* send phase */ - dst = exchange_node->rank_exchanges[i][j]; - if( dst < 0 ){ - continue; - } - comm_dst = group_list[dst]; - send_offset = exchange_node->payload_info[i][j].s_offset * pack_len; - send_len = exchange_node->payload_info[i][j].s_len * pack_len; - /* debug print */ - /* fprintf(stderr,"sending %d bytes to rank %d at offset %d\n",send_len, */ - /* comm_dst,send_offset); */ - rc = MCA_PML_CALL(isend((void*)((unsigned char *) data_buffer + - send_offset), - send_len, - MPI_BYTE, - comm_dst, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10,("Failed to isend data")); - return OMPI_ERROR; - } - ++(*active_requests); - - /* sends are posted */ - } - - /* Now post the recv's */ - for( j = 0; j < (tree_order - 1); j++ ) { - - /* recv phase */ - src = exchange_node->rank_exchanges[i][j]; - if( src < 0 ) { - continue; - } - comm_src = group_list[src]; - recv_offset = exchange_node->payload_info[i][j].r_offset * pack_len; - recv_len = exchange_node->payload_info[i][j].r_len * pack_len; - /* debug print */ - /* fprintf(stderr,"recving %d bytes to rank %d at offset %d\n",recv_len, */ - /* comm_src,recv_offset); */ - /* post the receive */ - rc = MCA_PML_CALL(irecv((void *) ((unsigned char *) data_buffer + - recv_offset), - recv_len, - MPI_BYTE, - comm_src, - tag, comm, &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to post ireceive ")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - /* finished all send/recv's now poll for completion before - * continuing to next iteration - */ - completed = 0; - /* polling internally on 2*(k - 1) requests */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - - if(!completed){ - /* save state and hop out - * only the iteration needs to be tracked - */ - *iteration = i; /* need to pick up here */ - - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - } - - /* finish off the last piece, send the data back to the extra */ - if( 0 < exchange_node->n_extra_sources ) { - dst = exchange_node->rank_extra_sources_array[0]; - comm_dst = group_list[dst]; - knt = 0; - for( i = 0; i < group_size; i++){ - knt += list_connected[i]; - } - /* debug print */ - /* - fprintf(stderr,"sending %d bytes to extra %d \n",pack_len*knt,comm_dst); - */ - rc = MCA_PML_CALL(isend(data_buffer, - pack_len * knt, - MPI_BYTE, - comm_dst, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10,("Failed to isend data")); - return OMPI_ERROR; - } - ++(*active_requests); - - /* probe for send completion */ - completed = 0; - /* polling internally */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * We really do need to block here so set - * the iteration to pow_k +1 indicating we need to - * finish progressing the last part - */ - *iteration = pow_k + 1; - - return (OMPI_SUCCESS != rc ? OMPI_ERROR : BCOL_FN_STARTED); - } - } - -FINISHED: - /* recycle buffer if need be */ - return BCOL_FN_COMPLETE; -} - -/* allgather progress function */ - -int bcol_ptpcoll_k_nomial_allgather_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - - - /* local variables */ - - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - netpatterns_k_exchange_node_t *exchange_node = &ptpcoll_module->knomial_allgather_tree; - int group_size = ptpcoll_module->group_size; - int *list_connected = ptpcoll_module->super.list_n_connected; /* critical for hierarchical colls */ - - - int tag; - int i, j; - int knt; - int comm_src, comm_dst, src, dst; - int recv_offset, recv_len; - int send_offset, send_len; - uint32_t buffer_index = input_args->buffer_index; - - int pow_k, tree_order; - int rc = OMPI_SUCCESS; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int completed = 0; /* initialized */ - void *data_buffer = (void*)( - (unsigned char *) input_args->sbuf + - (size_t) input_args->sbuf_offset); - int pack_len = input_args->count * input_args->dtype->super.size; - /* initialize the counter */ - int *iteration = &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - - -#if 0 - fprintf(stderr,"%d: entering p2p allgather progress AR: %d iter: %d\n",my_group_index,*active_requests, - *iteration); -#endif - /* keep tag within the limit supported by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - /* k-nomial tree parameters */ - tree_order = exchange_node->tree_order; - pow_k = exchange_node->log_tree_order; - - /* let's begin the collective, starting with extra ranks and their - * respective proxies - */ - if( EXTRA_NODE == exchange_node->node_type ) { - - /* debug print */ - /*fprintf(stderr,"666 \n");*/ - /* simply poll for completion */ - completed = 0; - /* polling internally */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(completed){ - /* go to buffer release */ - goto FINISHED; - }else{ - /* save state and hop out - * nothing to save here - */ - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - }else if ( 0 < exchange_node->n_extra_sources && (-1 == *iteration)) { - - /* I am a proxy for someone */ - /* Simply poll for completion */ - completed = 0; - /* polling internally */ - assert( 1 == *active_requests); - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * We really do need to block here so set - * the iteration to -1 indicating we need to - * finish this part first - */ - (*iteration) = -1; - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - /* I may now proceed to the recursive k - ing phase */ - *iteration = 0; - } - - - /* the ordering here between the extra rank and progress active requests - * is critical - */ - /* extra rank */ - if( (pow_k + 1) == *iteration ){ - /* finish off the last one */ - goto PROGRESS_EXTRA; - } - - /* active requests must be completed before continuing on to - * recursive k -ing step - * CAREFUL HERE, IT THIS REALLY WHAT YOU WANT?? - */ - if( 0 < (*active_requests) ) { - /* then we have something to progress from last step */ - /* debug print */ - /* - fprintf(stderr,"%d: entering progress AR: %d iter: %d\n",my_group_index,*active_requests, - *iteration); - */ - completed = 0; - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * state hasn't changed - */ - - return ((MPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - ++(*iteration); - } - - - - /* we start the recursive k - ing phase */ - for( i = *iteration; i < pow_k; i++) { - /* nothing changes here */ - for(j = 0; j < (tree_order - 1); j++) { - - /* send phase */ - dst = exchange_node->rank_exchanges[i][j]; - if( dst < 0 ){ - continue; - } - comm_dst = group_list[dst]; - send_offset = exchange_node->payload_info[i][j].s_offset * pack_len; - send_len = exchange_node->payload_info[i][j].s_len * pack_len; - rc = MCA_PML_CALL(isend((void*)((unsigned char *) data_buffer + - send_offset), - send_len, - MPI_BYTE, - comm_dst, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10,("Failed to isend data")); - return OMPI_ERROR; - } - ++(*active_requests); - - /* sends are posted */ - } - - /* Now post the recv's */ - for( j = 0; j < (tree_order - 1); j++ ) { - - /* recv phase */ - src = exchange_node->rank_exchanges[i][j]; - if( src < 0 ) { - continue; - } - comm_src = group_list[src]; - recv_offset = exchange_node->payload_info[i][j].r_offset * pack_len; - recv_len = exchange_node->payload_info[i][j].r_len * pack_len; - /* post the receive */ - rc = MCA_PML_CALL(irecv((void *) ((unsigned char *) data_buffer + - recv_offset), - recv_len, - MPI_BYTE, - comm_src, - tag, comm, &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to post ireceive ")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - /* finished all send/recv's now poll for completion before - * continuing to next iteration - */ - completed = 0; - /* make this non-blocking */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * We really do need to block here so set - * the iteration to -1 indicating we need to - * finish this part first - */ - *iteration = i; /* need to pick up here */ - - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - } - - /* finish off the last piece, send the data back to the extra */ - if( 0 < exchange_node->n_extra_sources ) { - dst = exchange_node->rank_extra_sources_array[0]; - comm_dst = group_list[dst]; - knt = 0; - for( i = 0; i < group_size; i++){ - knt += list_connected[i]; - } - rc = MCA_PML_CALL(isend(data_buffer, - pack_len * knt, - MPI_BYTE, - comm_dst, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10,("Failed to isend data")); - return OMPI_ERROR; - } - ++(*active_requests); - - /* probe for send completion */ - completed = 0; - /* make this non-blocking */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * We really do need to block here so set - * the iteration to pow_k +1 indicating we need to - * finish progressing the last part - */ - *iteration = pow_k + 1; - - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - } - /* folks need to skip this unless they really are the proxy - * reentering with the intent of progressing the final send - */ - goto FINISHED; - -PROGRESS_EXTRA: - - /* probe for send completion */ - completed = 0; - /* make this non-blocking */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if(!completed){ - /* save state and hop out - * We really do need to block here so set - * the iteration to pow_k +1 indicating we need to - * finish progressing the last part - */ - - return ((OMPI_SUCCESS != rc) ? OMPI_ERROR : BCOL_FN_STARTED); - } - -FINISHED: - /* recycle buffer if need be */ - return BCOL_FN_COMPLETE; -} - -/* - * Register allreduce functions to the BCOL function table, - * so they can be selected - */ -int bcol_ptpcoll_allgather_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_ALLGATHER; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_k_nomial_allgather_init, - bcol_ptpcoll_k_nomial_allgather_progress); - - - comm_attribs.data_src = DATA_SRC_KNOWN; - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_k_nomial_allgather_init, - bcol_ptpcoll_k_nomial_allgather_progress); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.c deleted file mode 100644 index 200e109f71e..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.c +++ /dev/null @@ -1,1029 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "bcol_ptpcoll_allreduce.h" - -/* - * Recursive K-ing allreduce - */ -static inline int bcol_ptpcoll_allreduce_narray_schedule_extra_node_exchange (mca_bcol_ptpcoll_module_t *ptpcoll_module, netpatterns_k_exchange_node_t *k_node, - void *data_buffer, size_t data_size, ompi_request_t **requests, int *active_requests, - int tag) -{ - ompi_communicator_t *comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int peer_comm_rank, k, offset, rc; - - if (EXCHANGE_NODE == k_node->node_type) { - /* the send data resides in the first part of the buffer */ - for (k = 0, offset = data_size ; k < k_node->n_extra_sources ; ++k, offset += data_size) { - peer_comm_rank = ptpcoll_module->super.sbgp_partner_module->group_list[k_node->rank_extra_sources_array[k]]; - - PTPCOLL_VERBOSE(10, ("Recv data from %d, addr %p len %d tag %d", - peer_comm_rank, data_buffer, data_size, tag)); - rc = MCA_PML_CALL(irecv((void *)((unsigned char *)data_buffer + offset), - data_size, MPI_BYTE, peer_comm_rank, tag, comm, - &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - } else { - peer_comm_rank = ptpcoll_module->super.sbgp_partner_module->group_list[k_node->rank_extra_sources_array[0]]; - - PTPCOLL_VERBOSE(10, ("Send data to %d, addr %p len %d tag %d", - peer_comm_rank, data_buffer, data_size, tag)); - - rc = MCA_PML_CALL(isend(data_buffer, data_size, MPI_BYTE, peer_comm_rank, - tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - - return OMPI_SUCCESS; -} - -static inline void bcol_ptpcoll_allreduce_narray_reduce (void *data_buffer, struct ompi_datatype_t *data_type, int count, struct ompi_op_t *op, int sources) -{ - size_t data_size = mca_bcol_base_get_buff_length(data_type, count); - - for (int k = 0, offset = data_size ; k < sources ; ++k, offset += data_size) { - ompi_op_reduce(op, (char *) data_buffer + offset, data_buffer, count, data_type); - } -} - -static int bcol_ptpcoll_allreduce_narraying_progress (bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - void *data_buffer = (void *) ( (unsigned char *) input_args->sbuf + - (size_t) input_args->sbuf_offset); - struct ompi_datatype_t *data_type = input_args->dtype; - uint32_t buffer_index = input_args->buffer_index; - struct ompi_op_t *op = input_args->op; - int count = input_args->count; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int k, rc, peer, group_peer; - int offset = 0; - ompi_communicator_t *comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int k_radix = k_node->tree_order; - - size_t data_size = mca_bcol_base_get_buff_length(data_type, count); - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - - /* if we are just staring the collective and there are extra sources then schedule the - * extra node exchange. otherwise check if the exchange is complete. */ - if (-1 == *iteration) { - if (0 < k_node->n_extra_sources) { - if (!(*active_requests)) { - rc = bcol_ptpcoll_allreduce_narray_schedule_extra_node_exchange (ptpcoll_module, k_node, data_buffer, data_size, - requests, active_requests, tag); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return rc; - } - } - - /* check for extra node exchange completion */ - if (!mca_bcol_ptpcoll_test_all_for_match (active_requests, requests, &rc)) { - return (OMPI_SUCCESS == rc) ? BCOL_FN_STARTED : rc; - } - - if (EXCHANGE_NODE == k_node->node_type) { - bcol_ptpcoll_allreduce_narray_reduce (data_buffer, data_type, count, op, k_node->n_extra_sources); - } - } - - /* start recursive k-ing */ - *iteration = 0; - } - - if (*iteration < k_node->n_exchanges) { - if (*active_requests) { - if (!mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc)) { - return (OMPI_SUCCESS == rc) ? BCOL_FN_STARTED : rc; - } - - ++(*iteration); - bcol_ptpcoll_allreduce_narray_reduce (data_buffer, data_type, count, op, k_radix - 1); - } - } - - for ( ; *iteration < k_node->n_exchanges ; ++(*iteration)) { - for (k = 0; k < k_radix - 1; k++) { - group_peer = k_node->rank_exchanges[*iteration][k]; - - peer = group_list[group_peer]; - - PTPCOLL_VERBOSE(10, ("Send data to %d, addr %p len %d tag %d", - peer, data_buffer, data_size, tag)); - rc = MCA_PML_CALL(isend(data_buffer, data_size, MPI_BYTE, peer, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - - for (k = 0, offset = data_size ; k < k_radix - 1 ; ++k, offset += data_size) { - group_peer = k_node->rank_exchanges[*iteration][k]; - peer = group_list[group_peer]; - - PTPCOLL_VERBOSE(10, ("Recv data from %d, addr %p len %d tag %d", - peer, data_buffer, data_size, tag)); - rc = MCA_PML_CALL(irecv((void *)((unsigned char *)data_buffer + offset ), - data_size, MPI_BYTE, peer, tag, comm, - &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - - if (!mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc)) { - return (OMPI_SUCCESS == rc) ? BCOL_FN_STARTED : rc; - } - - bcol_ptpcoll_allreduce_narray_reduce (data_buffer, data_type, count, op, k_radix - 1); - } - - /* ensure extra nodes get the result */ - if (0 < k_node->n_extra_sources) { - if (!(*active_requests)) { - int peer_comm_rank; - - if (EXTRA_NODE == k_node->node_type) { - peer_comm_rank = ptpcoll_module->super.sbgp_partner_module->group_list[k_node->rank_extra_sources_array[0]]; - - PTPCOLL_VERBOSE(10, ("EXTRA_NODE: Recv data from %d, addr %p len %d tag %d", - peer_comm_rank, data_buffer, data_size, tag)); - rc = MCA_PML_CALL(irecv(data_buffer, data_size, MPI_BYTE, peer_comm_rank, - tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } else { - for (k = 0; k < k_node->n_extra_sources; k++) { - peer_comm_rank = ptpcoll_module->super.sbgp_partner_module->group_list[k_node->rank_extra_sources_array[k]]; - - PTPCOLL_VERBOSE(10, ("EXCHANGE_NODE: Send data to %d, addr %p len %d tag %d", - peer_comm_rank, data_buffer, data_size, tag)); - rc = MCA_PML_CALL(isend(data_buffer, data_size, MPI_BYTE, peer_comm_rank, - tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - } - } - - if (!mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc)) { - return (OMPI_SUCCESS == rc) ? BCOL_FN_STARTED : rc; - } - } - - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_allreduce_narraying_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args){ - - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - int count = input_args->count; - struct ompi_datatype_t *dtype = input_args->dtype; - size_t buffer_size; - int tag; - - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag = tag = -tag; - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask = 1; - - /* start with extra node exchange if needed */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration = -1; - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests = 0; - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status = PTPCOLL_NOT_STARTED; - - /* - * ML bufer is segmented into k segments and each of the k segment is used - * for reductions - */ - /* This has to be based on ml buffer size. Need to take into account the space used - * by the headers of other bcol modules. */ - buffer_size = ptpcoll_module->ml_mem.size_buffer - BCOL_HEADER_MAX; - assert(buffer_size >= count * dtype->super.size * - ptpcoll_module->k_nomial_radix); - - return bcol_ptpcoll_allreduce_narraying_progress (input_args, const_args); -} - -static inline int compute_seg_index(int peer, int kpow_num, int tree_order) { - - int peer_base, peer_position, peer_base_rank, peer_index; - - peer_base = peer / (kpow_num * tree_order); - peer_base_rank = peer_base * kpow_num * tree_order ; - peer_position = peer_base_rank == 0 ? peer : peer % (peer_base_rank); - peer_index = peer_position / kpow_num ; - - return peer_index; -} - -int compute_knomial_allgather_offsets(int group_index, int count, struct - ompi_datatype_t *dtype,int k_radix,int n_exchanges, - int **offsets){ - - int modulo_group_size; - size_t seg_count, seg_size, seg_index, seg_offset; - size_t block_offset, block_count; - int exchange_step; - ptrdiff_t lb, extent; - - if (0 >= n_exchanges) { - PTPCOLL_VERBOSE(10,("Nothing to initialize ")); - return 0; - } - modulo_group_size = 1; - seg_count = count / k_radix; - ompi_datatype_get_extent(dtype, &lb, &extent); - seg_size = seg_count * extent; - - seg_index = group_index % k_radix; - seg_offset = seg_index * seg_size; - - offsets[0][BLOCK_OFFSET] = block_offset = 0; - offsets[0][BLOCK_COUNT] = block_count = count; - offsets[0][LOCAL_REDUCE_SEG_OFFSET] = seg_offset; - offsets[0][SEG_SIZE] = seg_size; - - - for(exchange_step = 1; exchange_step < n_exchanges; exchange_step++) { - - /* Previous step's segment is this exchange step's block */ - block_count = seg_count; - block_offset = seg_offset; - - /* Divide the segment into k parts */ - seg_count = seg_count / k_radix; - seg_size = seg_count * extent; - - /* Among different segments in block, which segment should I reduce ? */ - /* For allgather phase, I will not send out this segment to peers */ - modulo_group_size *= k_radix; - seg_index = compute_seg_index(group_index, modulo_group_size, k_radix); - seg_offset = seg_index * seg_size; - - - offsets[exchange_step][BLOCK_OFFSET] = block_offset; - offsets[exchange_step][LOCAL_REDUCE_SEG_OFFSET] = seg_offset; - offsets[exchange_step][BLOCK_COUNT] = block_count; - offsets[exchange_step][SEG_SIZE] = seg_size; - - /* Change to absolute offset */ - seg_offset = block_offset + seg_offset; - - } - - return 0; -} - -static inline int compute_send_segment_size(int block_offset, - int send_offset, - int segment_size, - int padded_offset) { - int send_size = -1; - /* segment to be sent starts here */ - int segment_offset = block_offset + send_offset ; - send_size = (segment_offset + segment_size) >= padded_offset ? - segment_size - (segment_offset + segment_size - padded_offset) : segment_size; - return send_size; -} - -static inline int compute_recv_segment_size(int block_offset, - int recv_offset, - int segment_size, - int padded_offset) { - int recv_size = -1; - /* segment to be sent starts here */ - int segment_offset = block_offset + recv_offset ; - recv_size = (segment_offset + segment_size) >= padded_offset ? - segment_size - (segment_offset + segment_size - padded_offset) : segment_size; - - return recv_size; -} - -/* - * - * K-nomial Reduce Scatter - * Example k=3 n=9 - * - * | ABCDEFGH |0| - * - * Number of Exchange steps = log (basek) n - * Number of steps in exchange step = k (radix) - * - * block_size = Size of data that is reduce in exchange step - * segment_size = Size of data that is send or received by rank in radix step - * - * block_size = segment_size * k - * - * my_block_start_addr = Address of the segment in the block where I reference my - * offsets - * - * This is version 1 : Experimenting with decoupling offset calcuations - */ -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce(mca_bcol_ptpcoll_module_t *ptpcoll_module, - const int buffer_index, void *sbuf, - void *rbuf, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype, - const int relative_group_index, - const int padded_start_byte){ - int blocks_in_step = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - mca_bcol_ptpcoll_component_t *cm = - &mca_bcol_ptpcoll_component; - void *my_block_start_addr = NULL, *my_block_addr = NULL; - int i, k, group_peer, peer ; - int k_radix = k_node->tree_order; - int rc = OMPI_SUCCESS; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int completed; - void *my_recv_start_addr, *my_recv_addr; - size_t block_offset, reduce_seg_offset, send_offset, recv_offset; - int seg_size, block_size; - int block_count, seg_count; - ptrdiff_t lb, extent; - ompi_datatype_get_extent(dtype, &lb, &extent); - - my_recv_start_addr = rbuf; - my_block_start_addr = sbuf; - block_count = count; - block_size = count * extent; - - - for (i = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - i < k_node->n_exchanges; i++, blocks_in_step *= cm->narray_knomial_radix) { - - block_offset = ptpcoll_module->allgather_offsets[i][BLOCK_OFFSET]; - reduce_seg_offset = ptpcoll_module->allgather_offsets[i][LOCAL_REDUCE_SEG_OFFSET]; - block_count = ptpcoll_module->allgather_offsets[i][BLOCK_COUNT]; - seg_size = ptpcoll_module->allgather_offsets[i][SEG_SIZE]; - block_size = block_count * extent; - - PTPCOLL_VERBOSE(10,("Block offset %d, reduce_seg_offset %d, block_count %d seg_size %d", - block_offset, reduce_seg_offset, block_count, seg_size)); - - seg_count = block_count / k_radix; - my_block_addr = (void*)((char*)my_block_start_addr + block_offset); - my_recv_addr = (void*)((char*)my_recv_start_addr + block_offset); - - for (k = 0; k < k_radix - 1; k++) { - size_t soffset; - int snd_size = 0; - - group_peer = k_node->rank_exchanges[i][k]; - peer = group_list[group_peer]; - - send_offset = reduce_seg_offset + (seg_size * (k + 1)); - - if ((int)send_offset + seg_size > block_size) { - send_offset = send_offset % block_size; - } - - PTPCOLL_VERBOSE(10, ("Send data to %d,send offset %d len %d", - peer, send_offset, seg_size)); - - soffset = send_offset; - snd_size = - compute_send_segment_size((int)block_offset,(int)soffset,(int)seg_size,padded_start_byte); - - if (snd_size > 0) { - rc = MCA_PML_CALL(isend((void *)((unsigned char *)my_block_addr - + soffset), - snd_size, MPI_BYTE, - peer, tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send the segment to %d", peer)); - return OMPI_ERROR; - } - ++(*active_requests); - } - - } - - /* - * Receive the segments to tmp addr and then do a reduction - */ - for (k = 0; k < k_radix - 1; k++) { - int recv_size=0; - - group_peer = k_node->rank_exchanges[i][k]; - peer = group_list[group_peer]; - - recv_offset = reduce_seg_offset + (seg_size * (k+1)); - - if ((int)recv_offset + seg_size > block_size) { - recv_offset = recv_offset % block_size; - } - - PTPCOLL_VERBOSE(10, ("Receive data to receive buffer at offset %d\n", - recv_offset)); - recv_size = compute_recv_segment_size((int)block_offset, - (int)reduce_seg_offset, (int)seg_size, - padded_start_byte); - - if (recv_size > 0 ) { - rc = MCA_PML_CALL(irecv((void *)((unsigned char *) - my_recv_addr + recv_offset), - recv_size, MPI_BYTE, - peer, tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive the segment from %d", peer)); - return OMPI_ERROR; - } - ++(*active_requests); - } - - } - - completed = 0; - while(!completed){ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - } - - /* Do a reduction on received buffers */ - { - void *src_data_buffer = NULL, *dst_data_buffer = NULL; - int reduce_data_count = 0; - - src_data_buffer = my_block_addr; - dst_data_buffer = my_recv_addr; - - for (k = 0; k < k_radix - 1; k++) { - recv_offset = reduce_seg_offset + (seg_size * (k+1)); - - if ((int)recv_offset + seg_size > block_size) { - recv_offset = recv_offset % block_size; - } - - reduce_data_count = (int)(block_offset + reduce_seg_offset) + seg_size >= padded_start_byte ? - (seg_size - (((int)(block_offset + reduce_seg_offset) + seg_size) - padded_start_byte))/(int)dtype->super.size - : (int)seg_count; - - if (reduce_data_count > 0) { - ompi_3buff_op_reduce(op, - (void*)((unsigned char*)my_recv_addr + recv_offset), - (void*)((unsigned char*)src_data_buffer + - reduce_seg_offset), - (void*)((unsigned char*)dst_data_buffer + - reduce_seg_offset), - reduce_data_count,dtype); - } - - src_data_buffer = dst_data_buffer; - - } - } - - /* After first iteration we have data (to work with) in recv buffer */ - my_block_start_addr = rbuf; - - } - - return rc; -} - - -int bcol_ptpcoll_allreduce_knomial_allgather(mca_bcol_ptpcoll_module_t *ptpcoll_module, - const int buffer_index, - void *sbuf,void *rbuf, int count, struct - ompi_datatype_t *dtype, - const int relative_group_index, - const int padded_start_byte){ - - size_t block_offset = 0, send_offset = 0, recv_offset = 0; - int seg_size=0, block_size=0; - int i,k,completed; - void *my_block_start_addr = rbuf, *my_block_addr; - size_t block_count = count; - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int k_radix = k_node->tree_order; - int peer, group_peer; - int rc = OMPI_SUCCESS; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int exchange_step; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - ptrdiff_t lb, extent; - ompi_datatype_get_extent(dtype, &lb, &extent); - - - for (i = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - i < k_node->n_exchanges; i++) { - - exchange_step = k_node->n_exchanges - 1 - i; - - block_offset = ptpcoll_module->allgather_offsets[exchange_step][BLOCK_OFFSET]; - send_offset = ptpcoll_module->allgather_offsets[exchange_step][LOCAL_REDUCE_SEG_OFFSET]; - block_count = ptpcoll_module->allgather_offsets[exchange_step][BLOCK_COUNT]; - seg_size = ptpcoll_module->allgather_offsets[exchange_step][SEG_SIZE]; - block_size = block_count * extent; - - - PTPCOLL_VERBOSE(10, ("Send offset %d block_offset %d seg_size %\n", - send_offset, block_offset, seg_size)); - - my_block_addr = (void*)((unsigned char*)my_block_start_addr + block_offset); - - for (k = 0; k < k_radix - 1; k++) { - size_t soffset=0; int snd_size = 0; - group_peer = k_node->rank_exchanges[exchange_step][k]; - peer = group_list[group_peer]; - - soffset = send_offset; - snd_size = compute_send_segment_size((int)block_offset, - (int)soffset, - (int)seg_size, - padded_start_byte); - if (snd_size > 0) { - rc = MCA_PML_CALL(isend((void *)((unsigned char *)my_block_addr - + soffset), - snd_size, MPI_BYTE, - peer, tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send the segment to %d", peer)); - return OMPI_ERROR; - } - - ++(*active_requests); - } - - PTPCOLL_VERBOSE(10, ("Send data to receive buffer at offset %d to %d\n", - send_offset, peer)); - } - - for (k = 0; k < k_radix - 1; k++) { - int recv_size=0; - - group_peer = k_node->rank_exchanges[exchange_step][k]; - peer = group_list[group_peer]; - - recv_offset = send_offset + (k + 1) * seg_size; - - if ((int)recv_offset + seg_size > block_size){ - recv_offset = recv_offset % block_size; - } - - PTPCOLL_VERBOSE(10, ("Receive data to receive buffer at offset %d from %d\n", - recv_offset, peer)); - - - recv_size = compute_recv_segment_size((int)block_offset, - (int)recv_offset, - (int)seg_size, - padded_start_byte); - if (recv_size > 0) { - rc = MCA_PML_CALL(irecv((void *)((unsigned char *) - my_block_addr + recv_offset), - recv_size, MPI_BYTE, - peer, tag, comm, &requests[*active_requests])); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive the segment from %d", peer)); - return OMPI_ERROR; - } - ++(*active_requests); - } - - } - - completed = 0; - while(!completed){ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - } - - block_count = block_count * k_radix; - block_size = block_count * extent; - - } - - return rc; - -} - -static inline int compute_padding_count(int count, int k_radix, int n_exchanges){ - bool fpadding = false; - size_t dsize; - int i, pad_count=0, kpow; - - /* is padding required */ - dsize = count; - kpow = 1; - for ( i=0; i < n_exchanges; i++) { - if (dsize % k_radix) { - fpadding = true; - } - dsize /= k_radix; - kpow *= k_radix; - } - - if (fpadding) { - pad_count = count % kpow; - pad_count = kpow - pad_count; - } - - return pad_count; -} - - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce_allgather_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args){ - - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - struct ompi_op_t *op = input_args->op; - int tag; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - void *src_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - - void *recv_buffer = (void *) ( - (unsigned char *)input_args->rbuf + - (size_t)input_args->rbuf_offset); - - int count = input_args->count; - struct ompi_datatype_t *dtype = input_args->dtype; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int *status = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status); - ptrdiff_t lb, extent; - - /* Get the knomial tree */ - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int k_radix = k_node->tree_order; - int n_exchanges = k_node->n_exchanges; - int padded_start_byte; - int padding_count = compute_padding_count(count, k_radix, n_exchanges); - - ompi_datatype_get_extent(dtype, &lb, &extent); - padded_start_byte = count * extent; - - - /* Init for making the functions Re-entrant */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag = tag = -tag; - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask = 1; - *active_requests = 0; - *iteration = -1; - *status = PTPCOLL_NOT_STARTED; - *iteration = 0; - - compute_knomial_allgather_offsets(my_group_index,count + padding_count, dtype,k_radix,n_exchanges, - ptpcoll_module->allgather_offsets); - - /* Perform a recursive k'ing reduce scatter */ - bcol_ptpcoll_allreduce_recursivek_scatter_reduce(ptpcoll_module, buffer_index, - src_buffer, recv_buffer, op, count + padding_count, dtype, - my_group_index,padded_start_byte); - - - /* Perform a recursive k'ing allgather */ - bcol_ptpcoll_allreduce_knomial_allgather(ptpcoll_module, - buffer_index, - src_buffer, recv_buffer, count + padding_count, dtype, - my_group_index, padded_start_byte); - - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce_extra(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, - void *sbuf, - void *rbuf, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype){ - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int k, peer ; - int rc = OMPI_SUCCESS; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int block_count, block_size; - char *tmprecv_buffer = NULL, *data_src_buffer, *data_dst_buffer; - ptrdiff_t lb, extent; - ompi_datatype_get_extent(dtype, &lb, &extent); - - block_count = count; - block_size = count * extent; - - - if (0 < block_size) { - tmprecv_buffer = (void*)malloc(block_size); - } - - data_src_buffer = sbuf; - data_dst_buffer = rbuf; - - if (EXCHANGE_NODE == k_node->node_type) { - for (k = 0; k < k_node->n_extra_sources; k++){ - - peer = ptpcoll_module->super.sbgp_partner_module->group_list[ - k_node->rank_extra_sources_array[k]]; - - rc = MCA_PML_CALL(recv((void *)((unsigned char *)tmprecv_buffer), - block_size, MPI_BYTE, - peer, tag, comm, MPI_STATUS_IGNORE)); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive the segment from %d", peer)); - rc = OMPI_ERROR; - goto clean; - } - - ompi_3buff_op_reduce(op, (void*)((unsigned char*)data_src_buffer), - (void*)((unsigned char*)tmprecv_buffer), - (void*)((unsigned char*)data_dst_buffer), - block_count,dtype); - data_src_buffer = data_dst_buffer; - } - } else { - peer = ptpcoll_module->super.sbgp_partner_module->group_list[ - k_node->rank_extra_sources_array[0]]; - - rc = MCA_PML_CALL(send((void *)((unsigned char *)sbuf), - block_size, MPI_BYTE, - peer, tag, MCA_PML_BASE_SEND_STANDARD, comm)); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - rc = OMPI_ERROR; - goto clean; - } - } - -clean: - if (tmprecv_buffer) { - free(tmprecv_buffer); - } - return rc; -} - -int bcol_ptpcoll_allreduce_knomial_allgather_extra(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, - void *sbuf, - void *rbuf, - const int count, struct ompi_datatype_t *dtype){ - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int k, peer ; - int rc = OMPI_SUCCESS; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int block_size, completed; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ptrdiff_t lb, extent; - ompi_datatype_get_extent(dtype, &lb, &extent); - - - block_size = count * extent; - - if (EXTRA_NODE == k_node->node_type) { - peer = ptpcoll_module->super.sbgp_partner_module->group_list[ - k_node->rank_extra_sources_array[0]]; - - rc = MCA_PML_CALL(irecv((void *)((unsigned char *)rbuf), - block_size, MPI_BYTE, - peer, tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } else { - for (k = 0; k < k_node->n_extra_sources; k++) { - peer = ptpcoll_module->super.sbgp_partner_module->group_list[ - k_node->rank_extra_sources_array[k]]; - - rc = MCA_PML_CALL(isend((void *)((unsigned char *)rbuf), - block_size, MPI_BYTE, - peer, tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - - } - - completed = 0; - - while(!completed){ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - } - - return rc; -} - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce_allgather_extra_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args){ - - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - struct ompi_op_t *op = input_args->op; - int tag; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - void *src_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - - void *recv_buffer = (void *) ( - (unsigned char *)input_args->rbuf + - (size_t)input_args->rbuf_offset); - - int count = input_args->count; - struct ompi_datatype_t *dtype = input_args->dtype; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int *status = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status); - ptrdiff_t lb, extent; - /* Get the knomial tree */ - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int k_radix = k_node->tree_order; - int n_exchanges = k_node->n_exchanges; - int padded_start_byte; - int padding_count = compute_padding_count(count, k_radix, n_exchanges); - void *tmpsrc_buffer = NULL; - - ompi_datatype_get_extent(dtype, &lb, &extent); - padded_start_byte = count * extent; - - /* Init for making the functions Re-entrant */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag = tag = -tag; - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask = 1; - *active_requests = 0; - *iteration = -1; - *status = PTPCOLL_NOT_STARTED; - *iteration = 0; - - compute_knomial_allgather_offsets(my_group_index,count + padding_count, dtype,k_radix,n_exchanges, - ptpcoll_module->allgather_offsets); - - if (EXCHANGE_NODE == k_node->node_type) { - bcol_ptpcoll_allreduce_recursivek_scatter_reduce_extra(ptpcoll_module, - buffer_index, - src_buffer, recv_buffer, op, count, dtype); - tmpsrc_buffer = src_buffer; - if ( k_node->n_extra_sources > 0){ - tmpsrc_buffer = recv_buffer; - } - bcol_ptpcoll_allreduce_recursivek_scatter_reduce(ptpcoll_module, buffer_index, - tmpsrc_buffer, recv_buffer, op, count + padding_count, dtype, - my_group_index,padded_start_byte); - bcol_ptpcoll_allreduce_knomial_allgather(ptpcoll_module, - buffer_index, - src_buffer, recv_buffer, count + padding_count, dtype, - my_group_index, padded_start_byte); - bcol_ptpcoll_allreduce_knomial_allgather_extra(ptpcoll_module, - buffer_index, - src_buffer, recv_buffer, count, dtype); - - } - else if (EXTRA_NODE == k_node->node_type) { - bcol_ptpcoll_allreduce_recursivek_scatter_reduce_extra(ptpcoll_module, - buffer_index, - src_buffer, recv_buffer, op, count, dtype); - bcol_ptpcoll_allreduce_knomial_allgather_extra(ptpcoll_module, - buffer_index, - src_buffer, recv_buffer, count, dtype); - } - - return BCOL_FN_COMPLETE; -} - - - -/* - * Register allreduce functions to the BCOL function table, - * so they can be selected - */ -int bcol_ptpcoll_allreduce_init(mca_bcol_base_module_t *super) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) super; - - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_ALLREDUCE; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - - /* not an accurate attribute, none of these algorithms - * are non-blocking - */ - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_allreduce_narraying_init, - bcol_ptpcoll_allreduce_narraying_progress); - - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - if (ptpcoll_module->pow_knum == ptpcoll_module->group_size) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_allreduce_recursivek_scatter_reduce_allgather_init, - NULL); - - } else { - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_allreduce_recursivek_scatter_reduce_allgather_extra_init, - NULL); - - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.h b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.h deleted file mode 100644 index 144e256761e..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_allreduce.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_PTPCOLL_ALLREDUCE_H -#define MCA_BCOL_PTPCOLL_ALLREDUCE_H - -#include "ompi_config.h" -#include "ompi/op/op.h" -#include "ompi/datatype/ompi_datatype.h" -#include "bcol_ptpcoll.h" -#include "bcol_ptpcoll_utils.h" - -enum { - BLOCK_OFFSET = 0, - LOCAL_REDUCE_SEG_OFFSET, - BLOCK_COUNT, - SEG_SIZE, - NOFFSETS -}; - -BEGIN_C_DECLS -int bcol_ptpcoll_allreduce_narraying(mca_bcol_ptpcoll_module_t *ptpcoll_module, - const int buffer_index, void *data_buffer, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype, const int - buffer_size, const int relative_group_index); - - -int bcol_ptpcoll_allreduce_narraying_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce(mca_bcol_ptpcoll_module_t *ptpcoll_module, - const int buffer_index, void *sbuf, - void *rbuf, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype, - const int relative_group_index, - const int padded_start_byte); - -int bcol_ptpcoll_allreduce_knomial_allgather(mca_bcol_ptpcoll_module_t *ptpcoll_module, - const int buffer_index, - void *sbuf,void *rbuf, int count, struct - ompi_datatype_t *dtype, - const int relative_group_index, - const int padded_start_byte); - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce_allgather_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - - -int compute_knomial_allgather_offsets(int group_index, int count, struct - ompi_datatype_t *dtype,int k_radix,int n_exchanges, - int **offsets); - - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce_extra(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, - void *sbuf, - void *rbuf, - struct ompi_op_t *op, - const int count, struct ompi_datatype_t *dtype); - -int bcol_ptpcoll_allreduce_knomial_allgather_extra(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, - void *sbuf, - void *rbuf, - const int count, struct ompi_datatype_t *dtype); - -int bcol_ptpcoll_allreduce_recursivek_scatter_reduce_allgather_extra_init(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_allreduce_init(mca_bcol_base_module_t *super); - -#if 0 -int knomial_reduce_scatter_offsets(int group_index,int count, struct ompi_datatype_t *dtype, int k_radix, - int n_exchanges, int nth_exchange, size_t *recv_offset, size_t - *block_offset, size_t *block_count, size_t *block_size, size_t - *seg_size); - -int allgather_offsets(int group_index,int count, struct ompi_datatype_t *dtype, int k_radix, - int n_exchanges, int nth_exchange, size_t *send_offset, size_t - *block_offset, size_t *block_count, size_t *block_size, size_t - *seg_size); -#endif - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_barrier.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_barrier.c deleted file mode 100644 index 6ad04db6c68..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_barrier.c +++ /dev/null @@ -1,933 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "bcol_ptpcoll.h" -#include "bcol_ptpcoll_utils.h" - -/* - * Fanin routines - no user data - */ - -/********************************************* New Barrier *********************************************/ -/*******************************************************************************************************/ -/*******************************************************************************************************/ - -/*************************************** K-nominal ***************************************/ -/*****************************************************************************************/ -static int bcol_ptpcoll_barrier_recurs_knomial_new( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - uint64_t sequence_number; - mca_bcol_ptpcoll_module_t *ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - - netpatterns_k_exchange_node_t *my_exchange_node = - &ptpcoll_module->knomial_exchange_tree; - - int rc, k, pair_comm_rank, exchange, completed, - tree_order = my_exchange_node->tree_order, tag, - n_extra_sources = my_exchange_node->n_extra_sources, - n_exchange = my_exchange_node->n_exchanges, num_reqs; - - ompi_communicator_t *comm = - ptpcoll_module->super.sbgp_partner_module->group_comm; - - int *extra_sources_array = NULL, - **rank_exchanges = my_exchange_node->rank_exchanges; - - ompi_request_t **requests; - opal_free_list_item_t *item; - - mca_bcol_ptpcoll_collreq_t *collreq; - - item = opal_free_list_wait (&ptpcoll_module->collreqs_free); - if (OPAL_UNLIKELY(NULL == item)) { - PTPCOLL_ERROR(("Free list waiting failed.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - collreq = (mca_bcol_ptpcoll_collreq_t *) item; - input_args->bcol_opaque_data = (void *) collreq; - - requests = collreq->requests; - - /* TAG Calculation */ - sequence_number = input_args->sequence_num; - - /* Keep tag within the limit supportd by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - - /* Mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - if (0 < n_extra_sources) { /* EXCHANGE_NODE case */ - collreq->need_toserv_extra = 1; - extra_sources_array = my_exchange_node->rank_extra_sources_array; - - /* I will participate in the exchange (of the algorithm) - - * wait for signal from extra process */ - for (k = 0; k < n_extra_sources; ++k) { - pair_comm_rank = - ptpcoll_module->super.sbgp_partner_module->group_list[extra_sources_array[k]]; - - rc = MCA_PML_CALL(irecv( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - comm, &(requests[k]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - } - - num_reqs = n_extra_sources; - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->tag = tag; - collreq->num_reqs = num_reqs; - collreq->exchange = 0; - - return BCOL_FN_STARTED; - } - } else { - collreq->need_toserv_extra = 0; - } - - /* loop over exchange send/recv pairs */ - for (exchange = 0; exchange < n_exchange; ++exchange) { - for (k = 0; k < tree_order - 1; ++k) { - /* rank of exchange partner within the group */ - pair_comm_rank = - ptpcoll_module->super.sbgp_partner_module->group_list[rank_exchanges[exchange][k]]; - - assert(2 * ptpcoll_module->k_nomial_radix > (k * 2 + 1)); - - /* send to partner - we will wait for completion, as send - * completion is at the MPI level, and will not - * incur network level completion costs - */ - rc = MCA_PML_CALL(isend( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, - comm, &(requests[k * 2 + 1]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - PTPCOLL_VERBOSE(10, ("Ex %d, K %d send to %d[%d]", exchange, k, - pair_comm_rank, rank_exchanges[exchange][k])); - - /* recive from partner */ - rc = MCA_PML_CALL(irecv( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - comm, &(requests[k * 2]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - PTPCOLL_VERBOSE(10, ("Ex %d, K %d irecv from %d[%d]", exchange, k, - pair_comm_rank, rank_exchanges[exchange][k])); - } - - num_reqs = 2 * (tree_order - 1); - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->tag = tag; - collreq->num_reqs = num_reqs; - collreq->exchange = exchange + 1; - - return BCOL_FN_STARTED; - } - } - - /* If non power of 2, may need to send message to "extra" proc */ - if (0 < n_extra_sources) { /* EXCHANGE_NODE case */ - for (k = 0; k < n_extra_sources; ++k) { - pair_comm_rank = - ptpcoll_module->super.sbgp_partner_module->group_list[extra_sources_array[k]]; - - rc = MCA_PML_CALL(isend( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, - comm, &(requests[k]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - } - - num_reqs = n_extra_sources; - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->tag = tag; - collreq->num_reqs = num_reqs; - - collreq->exchange = n_exchange; - collreq->need_toserv_extra = 0; - - return BCOL_FN_STARTED; - } - } - - opal_free_list_return (&ptpcoll_module->collreqs_free, (opal_free_list_item_t *) collreq); - return BCOL_FN_COMPLETE; -} - -static int bcol_ptpcoll_barrier_recurs_knomial_new_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - mca_bcol_ptpcoll_module_t *ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - - netpatterns_k_exchange_node_t *my_exchange_node = - &ptpcoll_module->knomial_exchange_tree; - - int rc, k, tag, pair_comm_rank, exchange, - tree_order = my_exchange_node->tree_order, num_reqs, - n_exchange = my_exchange_node->n_exchanges, completed, - n_extra_sources = my_exchange_node->n_extra_sources; - - ompi_communicator_t *comm = - ptpcoll_module->super.sbgp_partner_module->group_comm; - - int *extra_sources_array, - **rank_exchanges = my_exchange_node->rank_exchanges; - - mca_bcol_ptpcoll_collreq_t *collreq = - (mca_bcol_ptpcoll_collreq_t *) input_args->bcol_opaque_data; - - ompi_request_t **requests = collreq->requests; - - num_reqs = collreq->num_reqs; - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - return BCOL_FN_STARTED; - } - - /* Continue loop over exchange send/recv pairs */ - tag = collreq->tag; - - for (exchange = collreq->exchange; exchange < n_exchange; ++exchange) { - for (k = 0; k < tree_order - 1; ++k) { - /* rank of exchange partner within the group */ - pair_comm_rank = - ptpcoll_module->super.sbgp_partner_module->group_list[rank_exchanges[exchange][k]]; - - assert(2 * ptpcoll_module->k_nomial_radix > (k * 2 + 1)); - - /* send to partner - we will wait for completion, as send - * completion is at the MPI level, and will not - * incur network level completion costs - */ - rc = MCA_PML_CALL(isend( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, - comm, &(requests[k * 2 + 1]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - PTPCOLL_VERBOSE(10, ("Ex %d, K %d send to %d[%d]", exchange, k, - pair_comm_rank, rank_exchanges[exchange][k])); - - /* recive from partner */ - rc = MCA_PML_CALL(irecv( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - comm, &(requests[k * 2]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - PTPCOLL_VERBOSE(10, ("Ex %d, K %d irecv from %d[%d]", exchange, k, - pair_comm_rank, rank_exchanges[exchange][k])); - } - - num_reqs = 2 * (tree_order - 1); - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->num_reqs = num_reqs; - collreq->exchange = exchange + 1; - - return BCOL_FN_STARTED; - } - } - - /* If non power of 2, may need to send message to "extra" proc */ - if (collreq->need_toserv_extra) { /* EXCHANGE_NODE case */ - extra_sources_array = my_exchange_node->rank_extra_sources_array; - - for (k = 0; k < n_extra_sources; ++k) { - pair_comm_rank = - ptpcoll_module->super.sbgp_partner_module->group_list[extra_sources_array[k]]; - - rc = MCA_PML_CALL(isend( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, - comm, &(requests[k]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - } - - num_reqs = n_extra_sources; - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->num_reqs = num_reqs; - collreq->exchange = n_exchange; - collreq->need_toserv_extra = 0; - - return BCOL_FN_STARTED; - } - } - - return BCOL_FN_COMPLETE; -} - -/****************************************** Extra node Barrier ******************************************/ - -static int bcol_ptpcoll_barrier_recurs_knomial_extra_new( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - uint64_t sequence_number; - int rc, tag, pair_comm_rank, - completed, num_reqs = 2; - - mca_bcol_ptpcoll_module_t *ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - - netpatterns_k_exchange_node_t *my_exchange_node = - &ptpcoll_module->knomial_exchange_tree; - - ompi_communicator_t *comm = - ptpcoll_module->super.sbgp_partner_module->group_comm; - - int *extra_sources_array = my_exchange_node->rank_extra_sources_array; - - ompi_request_t **requests; - opal_free_list_item_t *item; - - mca_bcol_ptpcoll_collreq_t *collreq; - - item = opal_free_list_wait (&ptpcoll_module->collreqs_free); - if (OPAL_UNLIKELY(NULL == item)) { - PTPCOLL_ERROR(("Free list waiting failed.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - collreq = (mca_bcol_ptpcoll_collreq_t *) item; - input_args->bcol_opaque_data = (void *) collreq; - - requests = collreq->requests; - - /* TAG Calculation */ - sequence_number = input_args->sequence_num; - - /* Keep tag within the limit supportd by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - - /* Mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - pair_comm_rank = - ptpcoll_module->super.sbgp_partner_module->group_list[extra_sources_array[0]]; - - rc = MCA_PML_CALL(isend( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, - comm, &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - rc = MCA_PML_CALL(irecv( - NULL, 0, MPI_INT, - pair_comm_rank, tag, - comm, &(requests[1]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - return BCOL_FN_STARTED; - } - - opal_free_list_return (&ptpcoll_module->collreqs_free, (opal_free_list_item_t *) collreq); - return BCOL_FN_COMPLETE; -} - -/*************************************** Recursive-Doubling ***************************************/ -/**************************************************************************************************/ - -static int bcol_ptpcoll_barrier_recurs_dbl_new( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - uint64_t sequence_number; - mca_bcol_ptpcoll_module_t *ptp_module = - (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - - ompi_communicator_t *comm = ptp_module->super.sbgp_partner_module->group_comm; - - int rc, my_extra_partner_comm_rank = 0, exchange, completed, - pair_comm_rank, pair_rank, delta, tag, num_reqs = 0, - my_rank = ptp_module->super.sbgp_partner_module->my_index, - n_exchange = ptp_module->super.sbgp_partner_module->n_levels_pow2; - - ompi_request_t **requests; - opal_free_list_item_t *item; - - mca_bcol_ptpcoll_collreq_t *collreq; - - item = opal_free_list_wait (&ptp_module->collreqs_free); - if (OPAL_UNLIKELY(NULL == item)) { - PTPCOLL_ERROR(("Free list waiting failed.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - collreq = (mca_bcol_ptpcoll_collreq_t *) item; - input_args->bcol_opaque_data = (void *) collreq; - - assert(PTPCOLL_EXTRA != ptp_module->pow_2type); - - requests = collreq->requests; - - /* TAG Calculation */ - sequence_number = input_args->sequence_num; - - /* keep tag within the limit supportd by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptp_module->tag_mask); - - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - if (PTPCOLL_PROXY == ptp_module->pow_2type) { - /* I will participate in the exchange - wait for signal from extra - ** process */ - /* - * recv from extra rank - my_extra_partner_comm_rank - * can use blocking recv, as no other communications - * need to take place. - */ - my_extra_partner_comm_rank = - ptp_module->super.sbgp_partner_module->group_list[ptp_module->proxy_extra_index]; - - collreq->need_toserv_extra = 1; - collreq->extra_partner_rank = my_extra_partner_comm_rank; - - rc = MCA_PML_CALL(irecv(NULL, 0, MPI_INT, - my_extra_partner_comm_rank, tag, comm, - &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - completed = mca_bcol_ptpcoll_test_for_match(&requests[0], &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for irecv failed.")); - return rc; - } - - if (!completed) { - collreq->tag = tag; - collreq->num_reqs = 1; - collreq->exchange = 0; - - return BCOL_FN_STARTED; - } - } else { - collreq->need_toserv_extra = 0; - } - - /* Loop over exchange send/recv pairs */ - delta = 1; - for (exchange = 0; exchange < n_exchange; ++exchange) { - - /* rank of exchange partner within the group */ - pair_rank = my_rank ^ delta; - - /* rank within the communicator */ - pair_comm_rank = - ptp_module->super.sbgp_partner_module->group_list[pair_rank]; - - /* send to partner - we will wait for completion, as send - * completion is at the MPI level, and will not - * incur network level completion costs - */ - rc = MCA_PML_CALL(isend(NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - ++num_reqs; - - /* recive from partner */ - rc = MCA_PML_CALL(irecv(NULL, 0, MPI_INT, - pair_comm_rank, tag, comm, - &(requests[1]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - ++num_reqs; - - PTPCOLL_VERBOSE(5, ("exchange - %d, pair_rank - %d, pair_comm_rank - %d", - exchange, pair_rank, pair_comm_rank)); - - /* test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->tag = tag; - collreq->num_reqs = num_reqs; - - collreq->exchange = exchange + 1; - assert(collreq->exchange >= 0); - - return BCOL_FN_STARTED; - } - - delta <<= 1; /* delta *= 2 */ - } - - if (PTPCOLL_PROXY == ptp_module->pow_2type) { - /* send - let the extra rank know that we are done */ - rc = MCA_PML_CALL(isend(NULL, 0, MPI_INT, - my_extra_partner_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - completed = mca_bcol_ptpcoll_test_for_match(&requests[0], &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for isend failed.")); - return rc; - } - - if (!completed) { - collreq->tag = tag; - collreq->num_reqs = 1; - - collreq->need_toserv_extra = 0; - collreq->exchange = n_exchange; - - return BCOL_FN_STARTED; - } - } - - opal_free_list_return (&ptp_module->collreqs_free, (opal_free_list_item_t *) collreq); - return BCOL_FN_COMPLETE; -} - -static int bcol_ptpcoll_barrier_recurs_dbl_new_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - mca_bcol_ptpcoll_module_t *ptp_module = - (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - - ompi_communicator_t *comm = ptp_module->super.sbgp_partner_module->group_comm; - - int rc, exchange, pair_comm_rank, tag, - pair_rank, delta, num_reqs, completed, - my_rank = ptp_module->super.sbgp_partner_module->my_index, - n_exchange = ptp_module->super.sbgp_partner_module->n_levels_pow2; - - ompi_request_t **requests; - mca_bcol_ptpcoll_collreq_t *collreq = - (mca_bcol_ptpcoll_collreq_t *) input_args->bcol_opaque_data; - - num_reqs = collreq->num_reqs; - requests = collreq->requests; - - /* test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - return BCOL_FN_STARTED; - } - - assert(PTPCOLL_EXTRA != ptp_module->pow_2type); - - /* Continue loop over exchange send/recv pairs */ - num_reqs = 0; - tag = collreq->tag; - - exchange = collreq->exchange; - assert(exchange >= 0); - - delta = 1 << exchange; - for (; exchange < n_exchange; ++exchange) { - - /* rank of exchange partner within the group */ - pair_rank = my_rank ^ delta; - - /* rank within the communicator */ - pair_comm_rank = - ptp_module->super.sbgp_partner_module->group_list[pair_rank]; - - /* send to partner - we will wait for completion, as send - * completion is at the MPI level, and will not - * incur network level completion costs - */ - rc = MCA_PML_CALL(isend(NULL, 0, MPI_INT, - pair_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - ++num_reqs; - - /* recive from partner */ - rc = MCA_PML_CALL(irecv(NULL, 0, MPI_INT, - pair_comm_rank, tag, comm, - &(requests[1]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - ++num_reqs; - - PTPCOLL_VERBOSE(5, ("exchange - %d, pair_rank - %d, pair_comm_rank - %d", - exchange, pair_rank, pair_comm_rank)); - - /* test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - collreq->num_reqs = num_reqs; - collreq->exchange = exchange + 1; - assert(collreq->exchange >= 0); - - return BCOL_FN_STARTED; - } - - delta <<= 1; /* delta *= 2 */ - } - - /* if non power of 2, may need to send message to "extra" proc */ - if (collreq->need_toserv_extra) { - /* send - let the extra rank know that we are done */ - rc = MCA_PML_CALL(isend(NULL, 0, MPI_INT, - collreq->extra_partner_rank, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("ISend failed.")); - return rc; - } - - completed = mca_bcol_ptpcoll_test_for_match(&requests[0], &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for isend failed.")); - return rc; - } - - if (!completed) { - collreq->num_reqs = 1; - collreq->need_toserv_extra = 0; - collreq->exchange = n_exchange; - - return BCOL_FN_STARTED; - } - } - - return BCOL_FN_COMPLETE; -} - -/****************************************** Extra node Barrier ******************************************/ - -static int bcol_ptpcoll_barrier_recurs_dbl_extra_new( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - uint64_t sequence_number; - int rc, completed, num_reqs = 2, - tag, my_extra_partner_comm_rank; - - ompi_request_t **requests; - opal_free_list_item_t *item; - - mca_bcol_ptpcoll_collreq_t *collreq; - - mca_bcol_ptpcoll_module_t *ptp_module = - (mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - ompi_communicator_t *comm = ptp_module->super.sbgp_partner_module->group_comm; - - item = opal_free_list_wait (&ptp_module->collreqs_free); - if (OPAL_UNLIKELY(NULL == item)) { - PTPCOLL_ERROR(("Free list waiting failed.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - collreq = (mca_bcol_ptpcoll_collreq_t *) item; - input_args->bcol_opaque_data = (void *) collreq; - - requests = collreq->requests; - - /* TAG Calculation */ - sequence_number = input_args->sequence_num; - - /* Keep tag within the limit supportd by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptp_module->tag_mask); - - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - /* I will not participate in the exchange - so just "register" as here, - * signal the extra rank that I am here */ - - my_extra_partner_comm_rank = - ptp_module->super.sbgp_partner_module->group_list[ptp_module->proxy_extra_index]; - - rc = MCA_PML_CALL(isend(NULL, 0, MPI_INT, - my_extra_partner_comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[0]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Send failed.")); - return rc; - } - - /* Recv signal that the rest are done - my_extra_partner_comm_rank */ - rc = MCA_PML_CALL(irecv(NULL, 0, MPI_INT, - my_extra_partner_comm_rank, tag, comm, - &(requests[1]))); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("IRecv failed.")); - return rc; - } - - /* Test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - return BCOL_FN_STARTED; - } - - opal_free_list_return (&ptp_module->collreqs_free, (opal_free_list_item_t *) collreq); - return BCOL_FN_COMPLETE; -} - -/* We have the same progress func for both cases (R-D and K-Nominal) */ -static int bcol_ptpcoll_barrier_extra_node_progress( - bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - ompi_request_t **requests; - int rc, completed, num_reqs = 2; - - mca_bcol_ptpcoll_collreq_t *collreq = - (mca_bcol_ptpcoll_collreq_t *) input_args->bcol_opaque_data; - - requests = collreq->requests; - - /* test for completion */ - completed = - mca_bcol_ptpcoll_test_all_for_match(&num_reqs, requests, &rc); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - PTPCOLL_ERROR(("Test for all failed.")); - return rc; - } - - if (!completed) { - return BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - -static int mca_bcol_ptpcoll_barrier_setup(mca_bcol_base_module_t *super, int bcoll_type) -{ - netpatterns_k_exchange_node_t *my_exchange_node; - mca_bcol_ptpcoll_module_t * ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) super; - - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = bcoll_type; - - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - comm_attribs.data_src = DATA_SRC_KNOWN; - - switch(mca_bcol_ptpcoll_component.barrier_alg) { - case 1: - if (PTPCOLL_EXTRA == ptpcoll_module->pow_2type) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_barrier_recurs_dbl_extra_new, - bcol_ptpcoll_barrier_extra_node_progress); - break; - } - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_barrier_recurs_dbl_new, - bcol_ptpcoll_barrier_recurs_dbl_new_progress); - break; - case 2: - my_exchange_node = &ptpcoll_module->knomial_exchange_tree; - if (my_exchange_node->n_extra_sources > 0 && - EXTRA_NODE == my_exchange_node->node_type) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_barrier_recurs_knomial_extra_new, - bcol_ptpcoll_barrier_extra_node_progress); - break; - } - - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_barrier_recurs_knomial_new, - bcol_ptpcoll_barrier_recurs_knomial_new_progress); - break; - default: - PTPCOLL_ERROR(("Wrong barrier_alg flag value.")); - } - - return OMPI_SUCCESS; -} - -int mca_bcol_ptpcoll_memsync_init(mca_bcol_base_module_t *super) -{ - return mca_bcol_ptpcoll_barrier_setup(super, BCOL_SYNC); -} - -int bcol_ptpcoll_barrier_init(mca_bcol_base_module_t *super) -{ - return mca_bcol_ptpcoll_barrier_setup(super, BCOL_BARRIER); -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.c deleted file mode 100644 index 4cb0b6ea807..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.c +++ /dev/null @@ -1,2318 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "bcol_ptpcoll_bcast.h" -#include "bcol_ptpcoll_utils.h" - -#define K_NOMIAL_ROOT_BCAST_NB_NOTEST(step_info, radix, \ - my_group_index, group_list, \ - data_buffer, count, tag, comm, send_requests, num_pending_sends) \ -do { \ - int rc = OMPI_SUCCESS; \ - int dst; \ - int comm_dst; \ - *num_pending_sends = 0; \ - \ - while(MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_PEER_CHECK_LEVEL(step_info)) { \ - /* For each level of tree, do sends */ \ - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_PEER(my_group_index, \ - radix, step_info, dst); \ - comm_dst = group_list[dst]; \ - \ - /* Non blocking send .... */ \ - PTPCOLL_VERBOSE(9 , ("Bcast, Isend data to %d[%d], count %d, tag %d, addr %p", \ - dst, comm_dst, count, tag, \ - data_buffer)); \ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, \ - comm_dst, tag, \ - MCA_PML_BASE_SEND_STANDARD, comm, \ - &(send_requests[*num_pending_sends]))); \ - PTPCOLL_VERBOSE(10, ("send request addr is %p", send_requests[*num_pending_sends])); \ - if( OMPI_SUCCESS != rc ) { \ - PTPCOLL_VERBOSE(10, ("Failed to isend data")); \ - return OMPI_ERROR; \ - } \ - ++(*num_pending_sends); \ - } \ -} while(0) - -#define NARRAY_BCAST_NB(narray_node, process_shift, group_size, \ - data_buffer, count, tag, comm, send_requests, \ - num_pending_sends) \ -do { \ - int n, rc = OMPI_SUCCESS; \ - int dst; \ - int comm_dst; \ - \ - /* Send out data to all relevant childrens */ \ - for (n = 0; n < narray_node->n_children; n++) { \ - \ - dst = narray_node->children_ranks[n] + process_shift; \ - if (dst >= group_size) { \ - dst -= group_size; \ - } \ - comm_dst = group_list[dst]; \ - \ - /* Non blocking send .... */ \ - PTPCOLL_VERBOSE(9 , ("Bcast, Isend data to %d[%d], count %d, tag %d, addr %p", \ - dst, comm_dst, count, tag, \ - data_buffer)); \ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, \ - comm_dst, tag, \ - MCA_PML_BASE_SEND_STANDARD, comm, \ - &(send_requests[*num_pending_sends]))); \ - if( OMPI_SUCCESS != rc ) { \ - PTPCOLL_VERBOSE(10, ("Failed to isend data")); \ - return OMPI_ERROR; \ - } \ - ++(*num_pending_sends); \ - } \ -} while(0) - - -int bcol_ptpcoll_bcast_k_nomial_anyroot_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int completed = 0; - int rc; - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - uint32_t buffer_index = input_args->buffer_index; - - ompi_request_t **send_requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, send_requests, &rc); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - - /* DONE */ - if(completed) { - PTPCOLL_VERBOSE(10, ("bcast root is done")); - return BCOL_FN_COMPLETE; - } else { - PTPCOLL_VERBOSE(10, ("bcast root is started")); - return BCOL_FN_STARTED; - } -} - -/* K-nomial tree ( with any root ) algorithm */ -int bcol_ptpcoll_bcast_k_nomial_anyroot(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - - int tag; - int rc; - int matched = 0; /* not matched */ - int comm_root = 0; /* no root */ - int i; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int radix = ptpcoll_module->k_nomial_radix; - int root_radix_mask = ptpcoll_module->pow_knum; - int peer = -1; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - int extra_root = -1; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_status_public_t status; - ompi_request_t **send_requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - netpatterns_knomial_step_info_t step_info = {0, 0, 0}; - - PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - /* reset requests */ - *active_requests = 0; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_anyroot, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_k: %d %d " - "buff: %p " - "radix: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, sequence_number, - input_args->root_flag, - ptpcoll_module->pow_k, ptpcoll_module->pow_knum, - data_buffer, - radix)); - - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm root of the data")); - /* - * I'm root of the operation - * send data to (k - 1) * log base k N neighbors - */ - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, - ptpcoll_module->pow_knum, my_group_index); - K_NOMIAL_ROOT_BCAST_NB_NOTEST(step_info, radix, - my_group_index, group_list, - data_buffer, count, tag, comm, send_requests, - active_requests); - - goto ANY_ROOT_KNOMIAL_EXTRA; - } - - /* - * I'm not root, and I don't know to calculate root, so just - * wait for data from ANY_SOURCE, once you get it, proceed like a root - */ - - for (i = 0; i < cm->num_to_probe; i++) { - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, ptpcoll_module->pow_knum, my_group_index); - while(MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_PEER_CHECK_LEVEL(step_info)) { - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_PEER(my_group_index, radix, step_info, peer); - PTPCOLL_VERBOSE(10, ("Bcast, iprobe tag %d rank %d", - tag, group_list[peer])); - MCA_PML_CALL(iprobe(group_list[peer], tag, - comm, &matched, &status)); - if (matched) { - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_UPDATE_LEVEL_FOR_BCAST(step_info, radix); - break; - } - } - - /* Check of the */ - if (PTPCOLL_KN_PROXY & ptpcoll_module->pow_ktype) { - for (i = 0 ; i < ptpcoll_module->kn_proxy_extra_num; i++) { - PTPCOLL_VERBOSE(10, ("Bcast, iprobe tag %d rank %d", - tag, group_list[peer])); - MCA_PML_CALL(iprobe(group_list[ptpcoll_module->kn_proxy_extra_index[i]], tag, - comm, &matched, &status)); - if (matched) { - step_info.k_level = root_radix_mask; - extra_root = group_list[ptpcoll_module->kn_proxy_extra_index[i]]; - goto ANY_ROOT_KNOMIAL_BCAST; - } - } - } - } - - /* the function always returns OMPI_SUCCESS, so we don't check return code */ - if (0 == matched) { - PTPCOLL_VERBOSE(10, ("IPROBE was not matched")); - /* No data was received, return no match error */ - return BCOL_FN_NOT_STARTED; - } - - /* set the source of data */ - comm_root = status.MPI_SOURCE; - - PTPCOLL_VERBOSE(10, ("A. step info %d %d %d", step_info.k_level, step_info.k_step, step_info.k_tmp_peer)); - - /* Bcast the data */ - PTPCOLL_VERBOSE(10, ("Starting data bcast")); - -ANY_ROOT_KNOMIAL_BCAST: - /* Post receive that will fetch the data */ - PTPCOLL_VERBOSE(10, ("Bcast, receive data from %d[%d], count %d, tag %d, addr %p", - comm_root, count, tag, data_buffer)); - - rc = MCA_PML_CALL(recv(data_buffer, count, MPI_BYTE, comm_root, tag, comm, MPI_STATUS_IGNORE)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - PTPCOLL_VERBOSE(10, ("Bcast, Data was received")); - - /* Sending forward the data over K-nomial tree */ - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, step_info.k_level, my_group_index); - - PTPCOLL_VERBOSE(10, ("B. step info %d %d %d", step_info.k_level, step_info.k_step, step_info.k_tmp_peer)); - K_NOMIAL_ROOT_BCAST_NB_NOTEST(step_info, radix, - my_group_index, group_list, - data_buffer, count, tag, comm, send_requests, - active_requests); - -ANY_ROOT_KNOMIAL_EXTRA: - /* Proxy node but NOT virtual root */ - if (PTPCOLL_KN_PROXY & ptpcoll_module->pow_ktype) { - for (i = 0 ; i < ptpcoll_module->kn_proxy_extra_num; i++) { - if (ptpcoll_module->kn_proxy_extra_index[i] == extra_root) - continue; - - PTPCOLL_VERBOSE(10, ("Extra_Isend to %d", ptpcoll_module->kn_proxy_extra_index[i])); - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->kn_proxy_extra_index[i]], tag - 1, - MCA_PML_BASE_SEND_STANDARD, comm, - &(send_requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - } - - if (*active_requests > 0) { - matched = - mca_bcol_ptpcoll_test_all_for_match - (active_requests, send_requests, &rc); - } - - /* If it is last call, we have to recycle memory */ - if(matched) { - PTPCOLL_VERBOSE(10, ("bcast root is done")); - return BCOL_FN_COMPLETE; - } else { - PTPCOLL_VERBOSE(10, ("bcast root is started")); - return BCOL_FN_STARTED; - } -} - -static int bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int i; - int completed = 0; /* not completed */ - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - ompi_status_public_t status; - - PTPCOLL_VERBOSE(3, ("Knomial Anyroot, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_anyroot extra, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_k: %d %d " - "buff: %p " - ,buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - ptpcoll_module->pow_k, ptpcoll_module->pow_knum, - data_buffer - )); - - /* we have a power 2 group */ - if (input_args->root_flag) { - - PTPCOLL_VERBOSE(10, ("I'm EXTRA root of the data, v root %d", ptpcoll_module->kn_proxy_extra_index[0])); - /* send the all data to your proxy peer */ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->kn_proxy_extra_index[0]], tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - /* we have to store the iteration number somewhere */ - PTPCOLL_VERBOSE(10, ("Extra was started")); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } else { - for (i = 0; i < cm->num_to_probe && - 0 == completed; i++) { - MCA_PML_CALL(iprobe(group_list[ptpcoll_module->kn_proxy_extra_index[0]], tag - 1, - comm, &completed, &status)); - } - if (0 == completed) { - /* No data was received */ - return BCOL_FN_NOT_STARTED; - } - - /* the data is ready */ - rc = MCA_PML_CALL(recv(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->kn_proxy_extra_index[0]], tag - 1, - comm, MPI_STATUS_IGNORE)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - } - - PTPCOLL_VERBOSE(10, ("Extra was done")); - return BCOL_FN_COMPLETE; -} - -static int bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int rc; - int completed = 0; /* not completed */ - int i; - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[input_args->buffer_index].requests; - uint32_t buffer_index = input_args->buffer_index; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ompi_status_public_t status; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - /* keep tag within the limit support by the pml */ - int tag = -((PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask)); - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot_progress extra, was called, tag %d\n", tag)); - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm EXTRA root of the data")); - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } else { - for (i = 0; i < cm->num_to_probe && - 0 == completed; i++) { - MCA_PML_CALL(iprobe(group_list[ptpcoll_module->kn_proxy_extra_index[0]], tag - 1, - comm, &completed, &status)); - } - if (0 == completed) { - return BCOL_FN_STARTED; - } - /* the data is ready */ - - rc = MCA_PML_CALL(recv(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->kn_proxy_extra_index[0]], tag - 1, - comm, MPI_STATUS_IGNORE)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - } - - /* Done */ - return BCOL_FN_COMPLETE; \ -} - -/* Know root means that we know exactly the source of data and we do not have to check multiple - * sources - */ - -#define K_NOMIAL_DATA_SRC(radix, my_group_index, group_size, group_root, data_src, radix_mask) \ - do { \ - int relative_rank = (my_group_index >= group_root) ? my_group_index - group_root : \ - my_group_index - group_root + group_size; \ - \ - radix_mask = 1; \ - while (radix_mask < group_size) { \ - if (relative_rank % (radix * radix_mask)) { \ - data_src = relative_rank/(radix * radix_mask) * (radix * radix_mask) + group_root; \ - if (data_src >= group_size) data_src -= group_size; \ - break; \ - } \ - radix_mask *= radix; \ - } \ - } while (0) - - -int bcol_ptpcoll_bcast_k_nomial_known_root_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc = OMPI_SUCCESS; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int radix = ptpcoll_module->k_nomial_radix; - int radix_mask; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - int group_root_index = 0; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **send_requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - ompi_request_t **recv_request = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[0]; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int completed = 0; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - PTPCOLL_VERBOSE(3, ("BCAST Know root, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_k_nomial_known_root_progress, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_k: %d %d " - "buff: %p " - "radix: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, sequence_number, - input_args->root_flag, - ptpcoll_module->pow_k, ptpcoll_module->pow_knum, - data_buffer, - radix)); - - if (input_args->root_flag) { - /* Check for completion */ - assert(*active_requests > 0); - PTPCOLL_VERBOSE(10, ("Requests %d", *active_requests)); - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, send_requests, &rc); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - } else { - /* No data was received. Waiting for data */ - if (0 == (*active_requests)) { - int extra_root = -1; - netpatterns_knomial_step_info_t step_info; - /* We can not block. So run couple of test for data arrival */ - if (0 == mca_bcol_ptpcoll_test_for_match(recv_request, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched (active request %d)", - *active_requests)); - /* No data was received, return no match error */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - radix_mask = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask; - group_root_index = input_args->root_route->rank; - - PTPCOLL_VERBOSE(10, ("Test was matched - radix %d", radix_mask)); - /* Bcast the data */ - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, - radix_mask, my_group_index); - K_NOMIAL_ROOT_BCAST_NB_NOTEST(step_info, radix, - my_group_index, group_list, - data_buffer, count, tag, comm, send_requests, - active_requests); - - if (PTPCOLL_KN_PROXY & ptpcoll_module->pow_ktype) { - int i; - if (radix_mask == ptpcoll_module->pow_knum) { - extra_root = group_root_index; - } - for (i = 0 ; i < ptpcoll_module->kn_proxy_extra_num; i++) { - if (ptpcoll_module->kn_proxy_extra_index[i] == extra_root) - continue; - PTPCOLL_VERBOSE(10, ("Extra_Isend to %d", ptpcoll_module->kn_proxy_extra_index[i])); - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->kn_proxy_extra_index[i]], tag - 1, - MCA_PML_BASE_SEND_STANDARD, comm, - &(send_requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - } - if (*active_requests > 0) { - completed = mca_bcol_ptpcoll_test_all_for_match - (active_requests, send_requests, &rc); - } else { - completed = 1; - } - } else { - /* Data was received and sent out, check for completion */ - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, send_requests, &rc); - if (OMPI_SUCCESS != rc) { - PTPCOLL_VERBOSE(10, ("Test was not matched (active request %d)", - *active_requests)); - return OMPI_ERROR; - } - } - } - /* DONE */ - if(completed) { - return BCOL_FN_COMPLETE; - } else { - PTPCOLL_VERBOSE(10, ("bcast root is started")); - return BCOL_FN_STARTED; - } -} - -int bcol_ptpcoll_bcast_k_nomial_known_root(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int comm_root; - int data_src = -1; - int group_root_index; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int radix = ptpcoll_module->k_nomial_radix; - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **send_requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - ompi_request_t **recv_request = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[0]; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int matched = 0; - int k_level, logk_level; - int extra_root = -1; - netpatterns_knomial_step_info_t step_info; - - PTPCOLL_VERBOSE(3, ("BCAST Know root, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* reset active request counter */ - (*active_requests) = 0; - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_known_root, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_k: %d %d " - "buff: %p " - "radix: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - ptpcoll_module->pow_k, ptpcoll_module->pow_knum, - data_buffer, - radix)); - - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm root of the data")); - /* - * I'm root of the operation - * send data to (k - 1) * log base k N neighbors - */ - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, - ptpcoll_module->pow_knum, my_group_index); - K_NOMIAL_ROOT_BCAST_NB_NOTEST(step_info, radix, - my_group_index, group_list, - data_buffer, count, tag, comm, send_requests, - active_requests); - goto KNOWN_ROOT_KNOMIAL_BCAST_EXTRA; - } - - /* I'm not root */ - group_root_index = input_args->root_route->rank; - - /* If Proxy node, check if extra node is root */ - PTPCOLL_VERBOSE(10, ("Check if I virtual root, groop root %d group_size_pow %d type %d\n", - group_root_index, ptpcoll_module->pow_knum , ptpcoll_module->pow_ktype)); - if (group_root_index >= ptpcoll_module->pow_knum) { - /* Chech if the rank is virtual root */ - int virtual_root = (group_root_index - - ptpcoll_module->pow_knum) / (radix - 1); - - if (my_group_index == virtual_root) { - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, - ptpcoll_module->pow_knum, my_group_index); - k_level = ptpcoll_module->pow_knum; - comm_root = group_list[group_root_index]; - extra_root = group_root_index; - PTPCOLL_VERBOSE(10, ("Im virtual root klevel %d, comm_root %d vroot %d\n", - k_level, comm_root, virtual_root)); - goto KNOWN_ROOT_KNOMIAL_BCAST; - } else { - /* set virtual root as real root of the group */ - group_root_index = virtual_root; - PTPCOLL_VERBOSE(10, ("My virtual root vroot %d\n", group_root_index)); - } - } - - data_src = netpatterns_get_knomial_data_source( - my_group_index, group_root_index, radix, ptpcoll_module->pow_knum, - &k_level, &logk_level); - - comm_root = group_list[data_src]; - -KNOWN_ROOT_KNOMIAL_BCAST: - PTPCOLL_VERBOSE(10, ("Bcast, receive data from %d[%d], count %d, tag %d, addr %p", - comm_root, data_src, count, tag, data_buffer)); - - rc = MCA_PML_CALL(irecv(data_buffer, count, MPI_BYTE, comm_root, tag, comm, recv_request)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - /* We can not block. So run couple of test for data arrival */ - if (0 == mca_bcol_ptpcoll_test_for_match(recv_request, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - /* cache the radix mask for future progress */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask = k_level; - /* No data was received, return no match error */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - /* Bcast the data */ - MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_INIT(step_info, - k_level, my_group_index); - - K_NOMIAL_ROOT_BCAST_NB_NOTEST(step_info, radix, - my_group_index, group_list, - data_buffer, count, tag, comm, send_requests, - active_requests); - -KNOWN_ROOT_KNOMIAL_BCAST_EXTRA: - /* Proxy node but NOT virtual root */ - if (PTPCOLL_KN_PROXY & ptpcoll_module->pow_ktype) { - int i; - for (i = 0 ; i < ptpcoll_module->kn_proxy_extra_num; i++) { - if (ptpcoll_module->kn_proxy_extra_index[i] == extra_root) - continue; - - PTPCOLL_VERBOSE(10, ("Extra_Isend to %d", ptpcoll_module->kn_proxy_extra_index[i])); - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->kn_proxy_extra_index[i]], tag - 1, - MCA_PML_BASE_SEND_STANDARD, comm, - &(send_requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - } - - if (*active_requests > 0) { - matched = - mca_bcol_ptpcoll_test_all_for_match - (active_requests, send_requests, &rc); - } else { - matched = 1; - } - - /* If it is last call, we have to recycle memory */ - if(matched) { - return BCOL_FN_COMPLETE; - } else { - PTPCOLL_VERBOSE(10, ("bcast root is started")); - return BCOL_FN_STARTED; - } -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_extra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int i; - int completed = 0; /* not completed */ - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - ompi_status_public_t status; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_anyroot extra, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_k: %d %d " - "buff: %p " - "radix: %d" , - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - ptpcoll_module->pow_k, ptpcoll_module->pow_knum, - data_buffer, - 2 - )); - - /* we have a power 2 group */ - if (input_args->root_flag) { - - PTPCOLL_VERBOSE(10, ("I'm EXTRA root of the data")); - /* send the all data to your proxy peer */ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } else { - for (i = 0; i < cm->num_to_probe && - 0 == completed; i++) { - MCA_PML_CALL(iprobe(group_list[ptpcoll_module->proxy_extra_index], tag - 1, - comm, &completed, &status)); - } - if (0 == completed) { - /* No data was received */ - return BCOL_FN_NOT_STARTED; - } - - /* the data is ready */ - rc = MCA_PML_CALL(recv(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], tag - 1, - comm, MPI_STATUS_IGNORE)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - } - - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_extra_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int rc; - int completed = 0; /* not completed */ - int i; - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[input_args->buffer_index].requests; - uint32_t buffer_index = input_args->buffer_index; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ompi_status_public_t status; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - /* keep tag within the limit support by the pml */ - int tag = -((PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask)); - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot_progress extra, was called, tag %d\n", tag)); - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm EXTRA root of the data")); - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } else { - for (i = 0; i < cm->num_to_probe && - 0 == completed; i++) { - MCA_PML_CALL(iprobe(group_list[ptpcoll_module->proxy_extra_index], tag - 1, - comm, &completed, &status)); - } - if (0 == completed) { - return BCOL_FN_STARTED; - } - /* the data is ready */ - - rc = MCA_PML_CALL(recv(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], tag - 1, - comm, MPI_STATUS_IGNORE)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - } - - /* Done */ - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int rc; - int completed = 0; /* not completed */ - uint32_t buffer_index = input_args->buffer_index; - - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - size_t base_block_size = (count + ptpcoll_module->pow_2num - 1) / - ptpcoll_module->pow_2num; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int *status = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status; - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_progress, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_2: %d %d " - "buff: %p " - "radix: %d" - "block_size: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, 0, - input_args->root_flag, - ptpcoll_module->pow_2, ptpcoll_module->pow_2num, - data_buffer, - 2, - base_block_size)); - - switch(*status) { - case PTPCOLL_GATHER_STARTED: - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Not done, have to complete %d, Return %d", *active_requests, rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - ++(*iteration); /* start from next iteration */ - PTPCOLL_VERBOSE(10, ("Outstanding operation was comleted, starting next one ! %d", *iteration)); - break; - case PTPCOLL_EXTRA_SEND_STARTED: - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Not done, have to complete %d, Return %d", *active_requests, rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - return BCOL_FN_COMPLETE; - default: - PTPCOLL_VERBOSE(10, ("Unknown status %d", *status)); - return OMPI_ERROR; - } - - PTPCOLL_VERBOSE(10, ("Stating PR_GATHER")); - /* Gather, continue the recoursive doubling iterations */ - rc = bcol_ptpcoll_bcast_binomial_gather_anyroot(ptpcoll_module, buffer_index, data_buffer, - count, base_block_size); - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - PTPCOLL_VERBOSE(10, ("PR_GATHER done")); - - /* it the process is proxy , it has to send full - message to remote peer */ - if ((PTPCOLL_PROXY & ptpcoll_module->pow_2type) && - ! CHECK_IF_ROOT_OR_VROOT(ptpcoll_module, buffer_index)) { - *status = PTPCOLL_EXTRA_SEND_STARTED; - rc = bcol_ptpcoll_bcast_binomial_scatter_gatther_send_extra( - ptpcoll_module, - data_buffer, count, tag - 1, - ptpcoll_module->proxy_extra_index, comm, - active_requests, requests); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - /* return */ - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *radix_mask_pow = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask_pow); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - size_t base_block_size = (count + ptpcoll_module->pow_2num - 1) / - ptpcoll_module->pow_2num; - int root_pow2 = ptpcoll_module->pow_2 - 1; - int *status = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status; - - PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag = tag = -tag; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - /* set initial status */ - *status = PTPCOLL_NOT_STARTED; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_anyroot, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_2: %d %d " - "buff: %p " - "radix: %d" - "block_size: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, sequence_number, - input_args->root_flag, - ptpcoll_module->pow_2, ptpcoll_module->pow_2num, - data_buffer, - 2, - base_block_size)); - - /* we have a power 2 group */ - if (input_args->root_flag) { - - PTPCOLL_VERBOSE(10, ("I'm root of the data")); - /* for proxy we have little bit more work to do */ - if (PTPCOLL_PROXY & ptpcoll_module->pow_2type) { - /* send the all data to your extra peer */ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], - tag - 1, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - /* - * I'm root of the operation - * send data to (k - 1) * log base k N neighbors - */ - *radix_mask_pow = ptpcoll_module->pow_2; - - K_NOMIAL_ROOT_BCAST_NB_BINOMIAL_SCATTER(root_pow2, - my_group_index, group_size, group_list, - data_buffer, base_block_size, count, tag, comm, requests, - active_requests); - - goto GATHER; - } - - /* <-- non root flow --> */ - rc = bcol_ptpcoll_bcast_binomial_probe_and_scatter_anyroot(ptpcoll_module, buffer_index, - data_buffer, count, base_block_size); - if (BCOL_FN_COMPLETE != rc) { - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - -GATHER: - *iteration = 0; - *status = PTPCOLL_GATHER_STARTED; - rc = bcol_ptpcoll_bcast_binomial_gather_anyroot(ptpcoll_module, buffer_index, - data_buffer, count, base_block_size); - - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - - ++(*iteration); /* I need it for progress */ - - /* proxy case */ - if ((PTPCOLL_PROXY & ptpcoll_module->pow_2type) && - ! CHECK_IF_ROOT_OR_VROOT(ptpcoll_module, buffer_index)) { - *status = PTPCOLL_EXTRA_SEND_STARTED; - rc = bcol_ptpcoll_bcast_binomial_scatter_gatther_send_extra(ptpcoll_module, - data_buffer, count, tag - 1, - ptpcoll_module->proxy_extra_index, comm, - active_requests, requests); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int rc; - int completed = 0; /* not completed */ - uint32_t buffer_index = input_args->buffer_index; - - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - size_t base_block_size = (count + ptpcoll_module->pow_2num - 1) / - ptpcoll_module->pow_2num; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int *status = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status); - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_binomial_scatter_gatther_known_progress, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_2: %d %d " - "buff: %p " - "radix: %d" - "block_size: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, 0, - input_args->root_flag, - ptpcoll_module->pow_2, ptpcoll_module->pow_2num, - data_buffer, - 2, - base_block_size)); - - switch(*status) { - case PTPCOLL_WAITING_FOR_DATA: - PTPCOLL_VERBOSE(10, ("Probe for the data")); - rc = bcol_ptpcoll_bcast_binomial_test_and_scatter_known_root(ptpcoll_module, buffer_index, - data_buffer, count, base_block_size); - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - *iteration = 0; - *status = PTPCOLL_GATHER_STARTED; - break; - case PTPCOLL_GATHER_STARTED: - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Not done, have to complete %d, Return %d", *active_requests, rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - ++(*iteration); /* start from next iteration */ - PTPCOLL_VERBOSE(10, ("Outstanding operation was comleted, starting next one ! %d", *iteration)); - break; - case PTPCOLL_EXTRA_SEND_STARTED: - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Not done, have to complete %d, Return %d", *active_requests, rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - return BCOL_FN_COMPLETE; - default: - PTPCOLL_VERBOSE(10, ("Unknown status %d", *status)); - return OMPI_ERROR; - } - - PTPCOLL_VERBOSE(10, ("Stating PR_GATHER")); - /* Gather, continue the recoursive doubling iterations */ - rc = bcol_ptpcoll_bcast_binomial_gather_anyroot(ptpcoll_module, buffer_index, data_buffer, - count, base_block_size); - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - PTPCOLL_VERBOSE(10, ("PR_GATHER done")); - - /* it the process is proxy , it has to send full - message to remote peer */ - if ((PTPCOLL_PROXY & ptpcoll_module->pow_2type) && - ! CHECK_IF_ROOT_OR_VROOT(ptpcoll_module, buffer_index)) { - *status = PTPCOLL_EXTRA_SEND_STARTED; - rc = bcol_ptpcoll_bcast_binomial_scatter_gatther_send_extra( - ptpcoll_module, - data_buffer, count, tag - 1, - ptpcoll_module->proxy_extra_index, comm, - active_requests, requests); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - - /* return */ - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int group_src, comm_root; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int pow2_distance; - void *curr_data_buffer; - int recv_count; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *radix_mask_pow = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask_pow); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - size_t base_block_size = (count + ptpcoll_module->pow_2num - 1) / - ptpcoll_module->pow_2num; - int root_pow2 = ptpcoll_module->pow_2 - 1; - int *status = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status); - - PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag = tag = -tag; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - /* set initial status */ - *status = PTPCOLL_NOT_STARTED; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_binomial_scatter_gatther_known, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_2: %d %d " - "buff: %p " - "radix: %d" - "block_size: %d", - buffer_index, tag, - ptpcoll_module->tag_mask, sequence_number, - input_args->root_flag, - ptpcoll_module->pow_2, ptpcoll_module->pow_2num, - data_buffer, - 2, - base_block_size)); - - /* we have a power 2 group */ - if (input_args->root_flag) { - - PTPCOLL_VERBOSE(10, ("I'm root of the data")); - /* for proxy we have little bit more work to do */ - if (PTPCOLL_PROXY & ptpcoll_module->pow_2type) { - /* send the all data to your extra peer */ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], tag - 1, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - *active_requests = 1; - } - /* - * I'm root of the operation - * send data to (k - 1) * log base k N neighbors - */ - K_NOMIAL_ROOT_BCAST_NB_BINOMIAL_SCATTER(root_pow2, - my_group_index, group_size, group_list, - data_buffer, base_block_size, count, tag, comm, requests, - active_requests); - - /* EXIT OR GO TO Gather */ - *iteration = 0; - *radix_mask_pow = ptpcoll_module->pow_2; - goto GATHER; - } - - /* <-- non root flow --> */ - /* prapare and post recv operation */ - group_src = bcol_ptpcoll_binomial_root_to_src(input_args->root_route->rank, - my_group_index, ptpcoll_module->pow_2num, - ptpcoll_module->group_size, &pow2_distance); - - assert(group_src >= 0); - - if (0 > pow2_distance) { - /* the rank is virtual root for this group, receive the data - and scatter gather as root */ - PTPCOLL_VERBOSE(10, ("Virtual root %d , set mask to %d", my_group_index, ptpcoll_module->pow_2)); - *radix_mask_pow = ptpcoll_module->pow_2; - curr_data_buffer = data_buffer; - recv_count = count; - } else { - int my_left_boundary_rank; - recv_count = base_block_size * (1 << pow2_distance); /* we may receive larger data */ - my_left_boundary_rank = my_group_index & ((~(int)0) << pow2_distance ); - curr_data_buffer = (void *)((unsigned char *)data_buffer + - (size_t) base_block_size * my_left_boundary_rank); - *radix_mask_pow = pow2_distance; - } - - comm_root = group_list[group_src]; - - PTPCOLL_VERBOSE(10, ("Bcast, receive data from %d[%d], count %d, tag %d, addr %p", - comm_root, group_src, count, tag, data_buffer)); - - rc = MCA_PML_CALL(irecv(curr_data_buffer, recv_count, MPI_BYTE, comm_root, - tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - ++(*active_requests); - - *status = PTPCOLL_WAITING_FOR_DATA; - rc = bcol_ptpcoll_bcast_binomial_test_and_scatter_known_root(ptpcoll_module, - buffer_index, data_buffer, count, base_block_size); - - if (BCOL_FN_COMPLETE != rc) { - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - - /* recv operation is done */ - - *iteration = 0; - -GATHER: - - *status = PTPCOLL_GATHER_STARTED; - rc = bcol_ptpcoll_bcast_binomial_gather_anyroot(ptpcoll_module, buffer_index, - data_buffer, count, base_block_size); - - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - - ++(*iteration); /* I need it for progress */ - - /* proxy case */ - if ((PTPCOLL_PROXY & ptpcoll_module->pow_2type) && - ! CHECK_IF_ROOT_OR_VROOT(ptpcoll_module, buffer_index)) { - *status = PTPCOLL_EXTRA_SEND_STARTED; - rc = bcol_ptpcoll_bcast_binomial_scatter_gatther_send_extra( - ptpcoll_module, - data_buffer, count, tag - 1, - ptpcoll_module->proxy_extra_index, comm, - active_requests, requests); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_extra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int completed = 0; /* not completed */ - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - PTPCOLL_VERBOSE(3, ("BCAST known root, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_anyroot extra, buffer index: %d \n" - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "pow_k: %d %d " - "buff: %p " - "radix: %d" , - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - ptpcoll_module->pow_k, ptpcoll_module->pow_knum, - data_buffer, - 2 - )); - - /* we have a power 2 group */ - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm EXTRA root of the data")); - /* send the all data to your proxy peer */ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } else { - rc = MCA_PML_CALL(irecv(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->proxy_extra_index], - tag - 1, comm, &requests[*active_requests])); - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } - - return BCOL_FN_COMPLETE; -} - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_extra_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int rc; - int completed = 0; /* not completed */ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[input_args->buffer_index].requests; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_binomial_known_root_extra_progress extra, was called\n")); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - -static int bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root_progress( - bcol_function_args_t *input_args, struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int rc; - int completed = 0; /* not completed */ - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - uint32_t buffer_index = input_args->buffer_index; - - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - int *status = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status); - int relative_group_index, - group_root_index = 0; - int group_size = ptpcoll_module->full_narray_tree_size; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root_progress, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "root: %d " - "buff: %p " - "radix: %d" - , buffer_index, tag, - ptpcoll_module->tag_mask, - input_args->root_flag, - data_buffer, - ptpcoll_module->narray_knomial_proxy_num - )); - - if (input_args->root_flag || - /* virtual root case */ - (input_args->root_route->rank >= group_size && - my_group_index == (input_args->root_route->rank - group_size) / - mca_bcol_ptpcoll_component.narray_knomial_radix)) { - relative_group_index = 0; - group_root_index = my_group_index; - } else { - if (input_args->root_route->rank >= group_size) { - group_root_index = (input_args->root_route->rank - group_size) / - mca_bcol_ptpcoll_component.narray_knomial_radix; - } else { - group_root_index = input_args->root_route->rank; - } - relative_group_index = my_group_index - group_root_index; - if (relative_group_index < 0) { - relative_group_index += group_size; - } - } - - switch(*status) { - case PTPCOLL_WAITING_FOR_DATA: - PTPCOLL_VERBOSE(10, ("Probe for the data")); - rc = bcol_ptpcoll_bcast_narray_test_and_scatter_known_root(ptpcoll_module, - buffer_index, data_buffer, count, group_root_index, - relative_group_index); - - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - *iteration = 0; - *status = PTPCOLL_GATHER_STARTED; - break; - case PTPCOLL_ROOT_SEND_STARTED: - case PTPCOLL_GATHER_STARTED: - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Not done, have to complete %d, Return %d", *active_requests, rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - ++(*iteration); /* start from next iteration */ - PTPCOLL_VERBOSE(10, ("Outstanding operation was comleted, starting next one ! %d", *iteration)); - break; - case PTPCOLL_EXTRA_SEND_STARTED: - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Not done, have to complete %d, Return %d", *active_requests, rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - return BCOL_FN_COMPLETE; - default: - PTPCOLL_VERBOSE(10, ("Unknown status %d", *status)); - return OMPI_ERROR; - } - - PTPCOLL_VERBOSE(10, ("Stating PR_GATHER")); - /* Gather, continue the recoursive doubling iterations */ - rc = bcol_ptpcoll_bcast_narray_knomial_gather(ptpcoll_module, - buffer_index, data_buffer, count, - relative_group_index); - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - PTPCOLL_VERBOSE(10, ("PR_GATHER done")); - - /* it the process is proxy , it has to send full - message to remote peer */ - if ((PTPCOLL_PROXY & ptpcoll_module->narray_type) && - !input_args->root_flag) { - *status = PTPCOLL_EXTRA_SEND_STARTED; - rc = bcol_ptpcoll_send_n_extra( - ptpcoll_module, - data_buffer, count, tag - 1, - ptpcoll_module->narray_knomial_proxy_extra_index, - ptpcoll_module->narray_knomial_proxy_num, - input_args->root_route->rank, - comm, active_requests, requests); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - - /* return */ - return BCOL_FN_COMPLETE; -} - - -static int bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag, rc, i; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int data_src, offset, - comm_root; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - void *curr_data_buffer; - int recv_count; - uint64_t sequence_number = input_args->sequence_num; - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - size_t base_block_size = 0; - int *status = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status); - int relative_group_index, - group_root_index; - int group_size = ptpcoll_module->full_narray_tree_size; - int completed = 0; - int virtual_root; - netpatterns_narray_knomial_tree_node_t *narray_knomial_node = NULL; - netpatterns_narray_knomial_tree_node_t *narray_node = NULL; - - PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + sequence_number * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag = tag = -tag; - /* reset radix mask, it used to keep last block size */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask = 1; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - /* set initial status */ - *status = PTPCOLL_NOT_STARTED; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "buff: %p " - "radix: %d" - ,buffer_index, tag, - ptpcoll_module->tag_mask, sequence_number, - input_args->root_flag, - data_buffer, - ptpcoll_module->narray_knomial_proxy_num - )); - - /* we have a power 2 group */ - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm root of the data")); - narray_knomial_node = &ptpcoll_module->narray_knomial_node[0]; - relative_group_index = 0; - group_root_index = my_group_index; - - /* for proxy we have little bit more work to do */ - if (PTPCOLL_PROXY & ptpcoll_module->narray_type) { - /* send the all data to your extra peer */ - for (i = 0; i < ptpcoll_module->narray_knomial_proxy_num; ++i) { - PTPCOLL_VERBOSE(9, ("Extra send %d, dst %d, tag %d", - i, ptpcoll_module->narray_knomial_proxy_extra_index[i], tag - 1)); - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->narray_knomial_proxy_extra_index[i]], - tag - 1, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - } - /* - * I'm root of the operation - * send data to radix_k neighbors - */ - base_block_size = NARRAY_BLOCK_SIZE(count, ptpcoll_module, - narray_knomial_node->level_size); - - NARRAY_SCATTER_B(narray_knomial_node, my_group_index, - group_size, data_buffer, - base_block_size, count, tag, comm, requests, - active_requests, completed); - if (0 == completed) { - *status = PTPCOLL_ROOT_SEND_STARTED; - return BCOL_FN_STARTED; - } - goto EXIT; - } - - /* <-- non root flow --> */ - group_root_index = input_args->root_route->rank; - - if (group_root_index >= group_size) { - /* calculate virtual root */ - virtual_root = - (group_root_index - group_size) / - mca_bcol_ptpcoll_component.narray_knomial_radix; - if (my_group_index == virtual_root) { - PTPCOLL_VERBOSE(10, ("I'm virtual root of the data")); - - rc = MCA_PML_CALL(irecv(data_buffer, count, MPI_BYTE, - group_list[group_root_index], - tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - ++(*active_requests); - /* act like a root */ - relative_group_index = 0; - group_root_index = my_group_index; - goto SCATTER; - } - group_root_index = virtual_root; - } - - relative_group_index = my_group_index - group_root_index; - if (relative_group_index < 0) { - relative_group_index += group_size; - } - - narray_node = &ptpcoll_module->narray_knomial_node[relative_group_index]; - - data_src = narray_node->parent_rank + group_root_index; - if (data_src >= group_size) { - data_src -= group_size; - } - - comm_root = group_list[data_src]; - - recv_count = NARRAY_BLOCK_SIZE(count, ptpcoll_module, narray_node->level_size); - offset = recv_count * narray_node->rank_on_level; - /* make sure that we do not overun memory */ - if (OPAL_UNLIKELY(offset + recv_count > count)) { - recv_count = count - offset; - if (0 >= recv_count) { - goto GATHER; - } - } - - curr_data_buffer = (void *)((unsigned char *)data_buffer + (size_t)offset); - PTPCOLL_VERBOSE(10, ("Bcast, receive data from %d[%d], count %d, tag %d, addr %p len %d offset %d", - comm_root, data_src, count, tag, data_buffer, recv_count, offset)); - - rc = MCA_PML_CALL(irecv(curr_data_buffer, recv_count, MPI_BYTE, comm_root, - tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - ++(*active_requests); - -SCATTER: - *status = PTPCOLL_WAITING_FOR_DATA; - - rc = bcol_ptpcoll_bcast_narray_test_and_scatter_known_root(ptpcoll_module, - buffer_index, data_buffer, - count, group_root_index, relative_group_index); - - if (BCOL_FN_COMPLETE != rc) { - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - -GATHER: - /* recv operation is done */ - *iteration = 0; - *status = PTPCOLL_GATHER_STARTED; - rc = bcol_ptpcoll_bcast_narray_knomial_gather(ptpcoll_module, - buffer_index, data_buffer, count, - relative_group_index); - if (BCOL_FN_COMPLETE != rc) { - assert(0 != *active_requests); - PTPCOLL_VERBOSE(10, ("Not done. Return %d", rc)); - return rc; - } - - ++(*iteration); /* I need it for progress */ - - /* proxy case */ - if ((PTPCOLL_PROXY & ptpcoll_module->narray_type) && - ! input_args->root_flag) { - *status = PTPCOLL_EXTRA_SEND_STARTED; - rc = bcol_ptpcoll_send_n_extra( - ptpcoll_module, - data_buffer, count, tag - 1, - ptpcoll_module->narray_knomial_proxy_extra_index, - ptpcoll_module->narray_knomial_proxy_num, - input_args->root_route->rank, - comm, active_requests, requests); - if (BCOL_FN_COMPLETE != rc) { - return rc; - } - } - -EXIT: - return BCOL_FN_COMPLETE; -} - -/* Pasha : need to move this code to some common function */ -static int bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root_extra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int completed = 0; /* not completed */ - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *iteration = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - PTPCOLL_VERBOSE(3, ("BCAST known root, index_this_type %d, num_of_this_type %d", - const_args->index_of_this_type_in_collective + 1, - const_args->n_of_this_type_in_collective)); - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - /* reset active requests */ - *active_requests = 0; - /* reset iteration counter */ - *iteration = -1; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root_extra, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "buff: %p " - ,buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - data_buffer - )); - - /* we have a power 2 group */ - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm EXTRA root of the data")); - /* send the all data to your proxy peer */ - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->narray_knomial_proxy_extra_index[0]], tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } else { - PTPCOLL_VERBOSE(9, ("Posting recive from %d tag %d", - ptpcoll_module->narray_knomial_proxy_extra_index[0], tag - 1)); - rc = MCA_PML_CALL(irecv(data_buffer, count, MPI_BYTE, - group_list[ptpcoll_module->narray_knomial_proxy_extra_index[0]], - tag - 1, comm, &requests[*active_requests])); - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } - - return BCOL_FN_COMPLETE; -} - -static int bcol_ptpcoll_bcast_known_root_extra_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - int rc; - int completed = 0; /* not completed */ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[input_args->buffer_index].requests; - uint32_t buffer_index = input_args->buffer_index; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_binomial_known_root_extra_progress extra, was called\n")); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - PTPCOLL_VERBOSE(10, ("Test was matched - %d", rc)); - return BCOL_FN_COMPLETE; -} - - -static int bcol_ptpcoll_bcast_narray_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag = -1; - int rc; - int group_size = ptpcoll_module->group_size; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **send_requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - ompi_request_t **recv_request = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[0]; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int matched = true; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int relative_group_index = 0; - netpatterns_tree_node_t *narray_node = NULL; - - PTPCOLL_VERBOSE(3, ("Bcast, Narray tree Progress")); - - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_k_nomial_known_root, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d [%d]" - "buff: %p ", - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, input_args->root_route->rank, - data_buffer)); - - if (0 == *active_requests) { - int group_root_index = input_args->root_route->rank; - /* If the collective does not have any active requests, it - means the initial data was not received from parent. - Check if some data arrived - */ - if (0 == mca_bcol_ptpcoll_test_for_match(recv_request, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - /* No data was received, return no match error */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - /* set all paremetres */ - relative_group_index = my_group_index - group_root_index; - if (relative_group_index < 0) { - relative_group_index +=group_size; - } - narray_node = &ptpcoll_module->narray_node[relative_group_index]; - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - /* Bcast the data */ - NARRAY_BCAST_NB(narray_node, group_root_index, group_size, - data_buffer, count, tag, comm, send_requests, active_requests); - } - - /* All data was received and sent out. - Check if the completion arrived */ - matched = mca_bcol_ptpcoll_test_all_for_match - (active_requests, send_requests, &rc); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - - /* If it is last call, we have to recycle memory */ - if(matched) { - return BCOL_FN_COMPLETE; - } else { - PTPCOLL_VERBOSE(10, ("bcast root is started")); - return BCOL_FN_STARTED; - } -} - -static int bcol_ptpcoll_bcast_narray(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int data_src; - int group_size = ptpcoll_module->group_size; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - uint32_t buffer_index = input_args->buffer_index; - - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **send_requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - ompi_request_t **recv_request = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[0]; - void *data_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - int count = input_args->count * input_args->dtype->super.size; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int matched = true; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int group_root_index; - int relative_group_index = 0; - netpatterns_tree_node_t *narray_node = NULL; - - PTPCOLL_VERBOSE(3, ("Bcast, Narray tree")); - - /* reset active request counter */ - (*active_requests) = 0; - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_bcast_narray, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "buff: %p ", - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - data_buffer)); - - - if (input_args->root_flag) { - PTPCOLL_VERBOSE(10, ("I'm root of the data")); - narray_node = &ptpcoll_module->narray_node[0]; - group_root_index = my_group_index; - /* - * I'm root of the operation - * send data to N childrens - */ - goto NARRAY_BCAST_START; - } - - /* I'm not root */ - group_root_index = input_args->root_route->rank; - - relative_group_index = my_group_index - group_root_index; - if (relative_group_index < 0) { - relative_group_index += group_size; - } - - data_src = - ptpcoll_module->narray_node[relative_group_index].parent_rank + - group_root_index; - if (data_src >= group_size) { - data_src -= group_size; - } - - PTPCOLL_VERBOSE(10, ("Bcast, receive data from %d [%d], count %d, tag %d, addr %p", - group_list[data_src], data_src, - count, tag, data_buffer)); - - - rc = MCA_PML_CALL(irecv(data_buffer, count, MPI_BYTE, - group_list[data_src], - tag, comm, recv_request)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - /* We can not block. So run couple of test for data arrival */ - if (0 == mca_bcol_ptpcoll_test_for_match(recv_request, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - /* No data was received, return no match error */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - narray_node = &ptpcoll_module->narray_node[relative_group_index]; - -NARRAY_BCAST_START: - /* Bcast the data */ - NARRAY_BCAST_NB(narray_node, group_root_index, group_size, - data_buffer, count, tag, comm, send_requests, active_requests); - - matched = mca_bcol_ptpcoll_test_all_for_match - (active_requests, send_requests, &rc); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - - /* If it is last call, we have to recycle memory */ - if(matched) { - return BCOL_FN_COMPLETE; - } else { - PTPCOLL_VERBOSE(10, ("bcast root is started")); - return BCOL_FN_STARTED; - } -} - -int bcol_ptpcoll_bcast_init(mca_bcol_base_module_t *super) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) super; - - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - comm_attribs.bcoll_type = BCOL_BCAST; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - - comm_attribs.data_src = DATA_SRC_UNKNOWN; - - if(PTPCOLL_KN_EXTRA == ptpcoll_module->pow_ktype) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot, - bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot_progress); - } else { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_k_nomial_anyroot, - bcol_ptpcoll_bcast_k_nomial_anyroot_progress); - } - - comm_attribs.data_src = DATA_SRC_KNOWN; - switch(mca_bcol_ptpcoll_component.bcast_small_messages_known_root_alg) { - case PTPCOLL_KNOMIAL: - if(PTPCOLL_KN_EXTRA == ptpcoll_module->pow_ktype) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot, - bcol_ptpcoll_bcast_k_nomial_extra_known_and_anyroot_progress); - } else { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_k_nomial_known_root, - bcol_ptpcoll_bcast_k_nomial_known_root_progress); - } - break; - case PTPCOLL_NARRAY: - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_narray, - bcol_ptpcoll_bcast_narray_progress); - break; - default: - PTPCOLL_ERROR(("Unknown algorithm index was selected %", - mca_bcol_ptpcoll_component.bcast_small_messages_known_root_alg)); - return OMPI_ERROR; - } - - comm_attribs.data_src = DATA_SRC_UNKNOWN; - inv_attribs.bcol_msg_min = 10000000; - inv_attribs.bcol_msg_max = 10485760; /* range 4 */ - - /* Anyroot large messages functions registration */ - - if (PTPCOLL_EXTRA == ptpcoll_module->pow_2type) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_extra, - bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_extra_progress); - } else { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot, - bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_progress); - } - - /* Known-root large messages functions registration */ - - comm_attribs.data_src = DATA_SRC_KNOWN; - switch(mca_bcol_ptpcoll_component.bcast_large_messages_known_root_alg) { - case PTPCOLL_BINOMIAL_SG: - if (PTPCOLL_EXTRA == ptpcoll_module->pow_2type) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_extra, - bcol_ptpcoll_bcast_known_root_extra_progress); - /* bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_extra_progress); */ - } else { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root, - bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_progress); - } - break; - case PTPCOLL_NARRAY_KNOMIAL_SG: - if (PTPCOLL_EXTRA == ptpcoll_module->narray_type) { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root_extra, - bcol_ptpcoll_bcast_known_root_extra_progress); - } else { - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root, - bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root_progress); - } - break; - default: - PTPCOLL_ERROR(("Unknown algorithm index was selected %", - mca_bcol_ptpcoll_component.bcast_large_messages_known_root_alg)); - return OMPI_ERROR; - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.h b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.h deleted file mode 100644 index 74180bbcf9d..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_bcast.h +++ /dev/null @@ -1,865 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_PTPCOLL_BCAST_H -#define MCA_BCOL_PTPCOLL_BCAST_H - -#include "ompi_config.h" -#include "bcol_ptpcoll.h" -#include "bcol_ptpcoll_utils.h" - -BEGIN_C_DECLS - -int bcol_ptpcoll_bcast_init(mca_bcol_base_module_t *super); - -int bcol_ptpcoll_bcast_k_nomial_anyroot (bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_bcast_k_nomial_anyroot_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_bcast_k_nomial_known_root(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_bcast_k_nomial_known_root_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_extra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_bcast_binomial_scatter_gatther_anyroot_extra_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_extra(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); -int bcol_ptpcoll_bcast_binomial_scatter_gatther_known_root_extra_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - - -/* macros */ -#define K_NOMIAL_ROOT_BCAST_NB_BINOMIAL_SCATTER( \ - radix_mask_pow, \ - my_group_index, group_size, group_list, \ - data_buffer, segment_size, count, tag, \ - comm, send_requests, num_pending_sends) \ -do { \ - int rc = OMPI_SUCCESS; \ - int dst; \ - int comm_dst; \ - int send_size; \ - int send_offset; \ - int delta; \ - int dst_boundary_rank; \ - int radix_mask = radix_mask_pow >= 0 ? 1 << radix_mask_pow : 0; \ - \ - while(radix_mask > 0) { \ - /* For each level of tree, do sends */ \ - dst = my_group_index ^ radix_mask; \ - comm_dst = group_list[dst]; \ - \ - dst_boundary_rank = dst & ((~(int)0) << (radix_mask_pow)); \ - \ - send_offset = segment_size * dst_boundary_rank; \ - /* Pasha: make sure that we handle the corner cases */ \ - delta = count - send_offset; \ - if (delta <= 0) { \ - send_size = 0; /* we have to send something, other way it will hang */ \ - } else { \ - /* the tail case */ \ - send_size = (int) \ - (delta - (int)segment_size * radix_mask) < 0 ? delta : \ - (int)segment_size * radix_mask; \ - } \ - \ - /* Non blocking send .... */ \ - PTPCOLL_VERBOSE(9 , \ - ("Bcast p2s, Isend to %d[%d],count %d,tag %d,addr %p [%p] send_size %d,send_offset %d, radix %d %d",\ - dst, comm_dst, count, tag, \ - data_buffer, (void *)((unsigned char *)data_buffer + (size_t)send_offset), \ - send_size, \ - send_offset, \ - radix_mask, \ - radix_mask_pow \ - )); \ - rc = MCA_PML_CALL(isend((void *)((unsigned char *)data_buffer + (size_t)send_offset), \ - send_size, MPI_BYTE, \ - comm_dst, tag, \ - MCA_PML_BASE_SEND_STANDARD, comm, \ - &(send_requests[*num_pending_sends]))); \ - PTPCOLL_VERBOSE(10, ("send request addr is %p", send_requests[*num_pending_sends])); \ - if( OMPI_SUCCESS != rc ) { \ - PTPCOLL_VERBOSE(10, ("Failed to isend data")); \ - return OMPI_ERROR; \ - } \ - ++(*num_pending_sends); \ - radix_mask >>= 1; \ - radix_mask_pow--; \ - } \ -} while(0) - -#define NARRAY_SCATTER_NB(narray_node, process_shift, group_size, \ - data_buffer, base_block_size, count, tag, comm, send_requests, \ - num_pending_sends) \ -do { \ - int n, rc = OMPI_SUCCESS; \ - int dst; \ - int comm_dst; \ - int offset; \ - int size_count = count; \ - \ - /* Send out data to all relevant childrens */ \ - for (n = 0; n < narray_node->n_children && size_count > 0; n++) { \ - \ - dst = narray_node->children_ranks[n] + process_shift; \ - if (dst >= group_size) { \ - dst -= group_size; \ - } \ - \ - comm_dst = group_list[dst]; \ - offset = n * base_block_size; \ - size_count -= base_block_size; \ - if (OPAL_UNLIKELY(size_count < 0)) { \ - count = base_block_size + size_count; \ - } else { \ - count = base_block_size; \ - } \ - \ - /* Non blocking send .... */ \ - PTPCOLL_VERBOSE(9 , ("Bcast, Isend data to %d[%d], count %d, tag %d, addr %p", \ - dst, comm_dst, count, tag, \ - data_buffer)); \ - rc = MCA_PML_CALL(isend((void *)((char *)data_buffer + (size_t)offset), count, MPI_BYTE,\ - comm_dst, tag, \ - MCA_PML_BASE_SEND_STANDARD, comm, \ - &(send_requests[*num_pending_sends]))); \ - if( OMPI_SUCCESS != rc ) { \ - PTPCOLL_VERBOSE(10, ("Failed to isend data")); \ - return OMPI_ERROR; \ - } \ - ++(*num_pending_sends); \ - } \ -} while(0) - -#define NARRAY_SCATTER_B(narray_node, process_shift, group_size, \ - data_buffer, base_block_size, count, tag, comm, send_requests, \ - num_pending_sends, completed) \ -do { \ - NARRAY_SCATTER_NB(narray_node, process_shift, group_size, \ - data_buffer, base_block_size, count, tag, comm, send_requests, \ - num_pending_sends); \ - if (*num_pending_sends > 0) { \ - completed = mca_bcol_ptpcoll_test_all_for_match(num_pending_sends, send_requests, &rc); \ - if (OMPI_SUCCESS != rc) { \ - return OMPI_ERROR; \ - } \ - } else { \ - completed = 1; \ - } \ -} while (0) - -#define CHECK_IF_ROOT_OR_VROOT(module, i) \ - (module->pow_2 == module->ml_mem.ml_buf_desc[i].radix_mask_pow) - -/* inline functions */ -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_bcast_binomial_scatter_gatther_send_extra( - mca_bcol_ptpcoll_module_t *ptpcoll_module, - void *data_buffer, int count, int tag, - int extra_peer, ompi_communicator_t *comm, - int *active_requests, ompi_request_t **requests) -{ - int rc = OMPI_SUCCESS; - int completed = 0; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - /* tag is -1 already */ - /* send the all data to your extra peer */ - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_binomial_scatter_gatther_send_extra to %d tag %d", - extra_peer, tag)); - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[extra_peer], tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - ++(*active_requests); - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("PR Extra send was not completed")); - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_send_n_extra(mca_bcol_ptpcoll_module_t *ptpcoll_module, - void *data_buffer, int count, int tag, - int *extra_peers, int num_peers, int skip, - ompi_communicator_t *comm, - int *active_requests, ompi_request_t **requests) -{ - int rc = OMPI_SUCCESS; - int completed = 0; - int i; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - /* send the all data to your extra peer */ - for (i = 0; i < num_peers; i++) { - PTPCOLL_VERBOSE(10, ("send_n_extra to %d tag %d", - extra_peers[i], tag)); - if (extra_peers[i] == skip) { - PTPCOLL_VERBOSE(10, ("SKIP")); - continue; - } - - rc = MCA_PML_CALL(isend(data_buffer, count, MPI_BYTE, - group_list[extra_peers[i]], tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - ++(*active_requests); - } - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("PR Extra send was not completed")); - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_bcast_binomial_gather_anyroot(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, void *data_buffer, int count, int base_block_size) -{ - int rc; - int completed = 0; /* not completed */ - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int i; - int *iteration = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - void *curr_data_sbuffer = NULL, - *curr_data_rbuffer = NULL; - int radix_mask_pow = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask_pow; - int delta; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_binomial_gather_anyroot %d %d %d", - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration, - ptpcoll_module->pow_2, - 1 << ptpcoll_module->pow_2)); - - /* we assume the iteration #iteration already was completed with probe */ - for (i = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - i < ptpcoll_module->pow_2; i++) { - int pow2 = 1 << i; - int peer_index = my_group_index ^ pow2; - int comm_rank = group_list[peer_index]; - int slen, rlen, - send_offset, - recv_offset; - - if (i > radix_mask_pow) { - /* *active_requests = 0; */ - /* send - receive data from the peer */ - slen = rlen = pow2 * base_block_size; - send_offset = base_block_size * ((my_group_index) & ((~(int)0) << i)); - recv_offset = base_block_size * ((peer_index) & ((~(int)0) << i)); - curr_data_sbuffer = (void *)((unsigned char *)data_buffer + send_offset); - curr_data_rbuffer = (void *)((unsigned char *)data_buffer + recv_offset); - - delta = count - recv_offset; - if (delta > 0) { - if (delta < rlen) { - /* recv the tail */ - rlen = delta; - } - PTPCOLL_VERBOSE(10, ("[ pow2 %d, radix %d ] recv data %p (offset %d) , len %d , dest %d", - pow2, - 1 << ptpcoll_module->pow_2, - curr_data_rbuffer, - recv_offset, - rlen, - comm_rank)); - rc = MCA_PML_CALL(irecv(curr_data_rbuffer, rlen, MPI_BYTE, - comm_rank, tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - - delta = count - send_offset; - if (delta > 0) { - if (delta < slen) { - /* recv the tail */ - slen = delta; - } - PTPCOLL_VERBOSE(10, ("[ pow2 %d, radix %d ] sending data %p (offset %d) , len %d , dest %d", - pow2, - 1 << ptpcoll_module->pow_2, - curr_data_sbuffer, - send_offset, - slen, - comm_rank)); - rc = MCA_PML_CALL(isend(curr_data_sbuffer, slen, MPI_BYTE, - comm_rank, tag, - MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - - if (*active_requests > 0) { - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - *iteration = i; - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } - } else if (i == radix_mask_pow) { - /* only receive data */ - rlen = pow2 * base_block_size; - recv_offset = base_block_size * ((peer_index) & ((~(int)0) << i)); - curr_data_rbuffer = (void *)((unsigned char *)data_buffer + recv_offset); - delta = count - recv_offset; - if (0 >= delta) { - /* we have nothing to send, skip the iteration */ - continue; - } - if (delta < rlen) { - /* recv the tail */ - rlen = delta; - } - /* receive data from the peer */ - PTPCOLL_VERBOSE(10, ("[ pow2 %d, radix %d ] recv data %p (offset %d) , len %d , dest %d", - pow2, - 1 << ptpcoll_module->pow_2, - curr_data_rbuffer, - recv_offset, - rlen, - comm_rank)); - rc = MCA_PML_CALL(irecv(curr_data_rbuffer, rlen, MPI_BYTE, - comm_rank, tag, comm, &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - ++(*active_requests); - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - *iteration = i; - PTPCOLL_VERBOSE(10, ("Recv was not completed")); - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - PTPCOLL_VERBOSE(10, ("Recv was completed")); - } else if (i < radix_mask_pow) { - /* Only send data */ - slen = pow2 * base_block_size; - send_offset = base_block_size * ((my_group_index) & ((~(int)0) << i)); - curr_data_sbuffer = (void *)((unsigned char *)data_buffer + send_offset); - delta = count - send_offset; - if (0 >= delta) { - /* we have nothing to send, skip the iteration */ - continue; - } - if (delta < slen) { - slen = delta; - } - PTPCOLL_VERBOSE(10, ("[ pow2 %d, radix %d ] sending data %p (offset %d) , len %d , dest %d", - pow2, - 1 << ptpcoll_module->pow_2, - curr_data_sbuffer, - send_offset, - slen, - comm_rank)); - rc = MCA_PML_CALL(isend(curr_data_sbuffer, slen, MPI_BYTE, - comm_rank, tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - *iteration = i; - /* we have to store the iteration number somewhere */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } - } - - return BCOL_FN_COMPLETE; -} - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_bcast_binomial_probe_and_scatter_anyroot(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, void *data_buffer, int count, int base_block_size) -{ - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int rc; - int completed = 0; /* not completed */ - int comm_root; - int i; - int *radix_mask_pow = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask_pow); - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_status_public_t status; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int pow2_group_size = ptpcoll_module->pow_2num; - int pow2_distance; - int my_left_boundary_rank; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int group_root_index = 0; - void *curr_data_buffer = NULL; - int tag = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag; - int recv_count = 0; - int *coll_status = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status; - - assert(0 == *active_requests); - - PTPCOLL_VERBOSE(10, ("Running bcol_ptpcoll_bcast_binomial_probe_and_scatter_anyroot")); - for (i = 0; i < cm->num_to_probe && - 0 == completed; i++) { - MCA_PML_CALL(iprobe(MPI_ANY_SOURCE, tag, - comm, &completed, &status)); - PTPCOLL_VERBOSE(10, ("Bcast, iprobe tag %d", - tag)); - } - - /* the function always returns OMPI_SUCCESS, so we don't check return code */ - if (0 == completed) { - PTPCOLL_VERBOSE(10, ("IPROBE was not matched")); - /* No data was received, return no match error */ - return BCOL_FN_NOT_STARTED; - } - - comm_root = status.MPI_SOURCE; - - - PTPCOLL_VERBOSE(9, ("IPROBE was matched, root of the data on communicator is %d", comm_root)); - - /* For proxy we have to check if we got something from extra node */ - if (PTPCOLL_PROXY & ptpcoll_module->pow_2type) { - if (group_list[ptpcoll_module->proxy_extra_index] == comm_root) { - PTPCOLL_VERBOSE(9, ("IPROBE was matched, root of the data on communicator is extra node %d", - comm_root)); - /* scatter the data among other peer in the pow2 group */ - *radix_mask_pow = ptpcoll_module->pow_2; - - pow2_distance = ptpcoll_module->pow_2 - 1; - curr_data_buffer = data_buffer; - recv_count = count; - goto PR_SCATTHER; - } - } - - /* Find group index for communicator root of the data */ - group_root_index = get_group_index_and_distance_for_binomial - (my_group_index, comm_root, pow2_group_size, group_list, &pow2_distance); - if (OPAL_UNLIKELY(group_root_index < 0)) { - PTPCOLL_ERROR(("Fatal error, no group root index found, my id %d, pow2_g_size %d comm_root %d", - my_group_index, pow2_group_size, comm_root)); - return OMPI_ERROR; - } - - PTPCOLL_VERBOSE(10, ("Group root index is %d distance is %d", - group_root_index, pow2_distance)); - - /* Use group_root_index to calculate the */ - - /* Post receive that will fetch the data */ - /* Pasha: Who is packing data ? - Should I assume that we get contiguous buffer ? - Or should I pack by myself - =================================================================================================== - === On this stage I assume that data is contiguous. So I use MPI_BYTE datatype and COUNT = size === - =================================================================================================== - */ - - recv_count = base_block_size * (1 << pow2_distance); /* we may receive larger data */ - - my_left_boundary_rank = my_group_index & ((~(int)0) << pow2_distance ); - - curr_data_buffer = (void *)((unsigned char *)data_buffer + - (size_t) base_block_size * my_left_boundary_rank); - - *radix_mask_pow = pow2_distance; - - pow2_distance--; - -PR_SCATTHER: - PTPCOLL_VERBOSE(10, ("Bcast, receive data from %d[%d], " - "recv_count %d, tag %d, addr %p, offset %d, pow2_distace %d", - comm_root, group_root_index, recv_count, - tag, curr_data_buffer, - my_group_index * base_block_size, pow2_distance)); - - rc = MCA_PML_CALL(recv(curr_data_buffer, recv_count, MPI_BYTE, - comm_root, tag, comm, MPI_STATUS_IGNORE)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - - PTPCOLL_VERBOSE(10, ("Bcast, Data was received")); - - /* Sending forward the data over K-nomial tree */ - *coll_status = PTPCOLL_SCATTER_STARTED; - K_NOMIAL_ROOT_BCAST_NB_BINOMIAL_SCATTER( - pow2_distance, - my_group_index, group_size, group_list, - data_buffer, base_block_size, - count, tag, comm, requests, - active_requests); - - /* Since the next step (gather) does not really require - completion on scatter , we may return complete */ - return BCOL_FN_COMPLETE; -} - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_binomial_root_to_src(int group_root, int my_rank, - int pow2_size, int group_size, int *distance) -{ - int root, relative_rank, src, - pow2_distance = 0, i; - - if (group_root < pow2_size) { - root = group_root; - } else { - /* the source of the data is extra node, - the real root it represented by some rank from - pow2 group */ - root = group_root - pow2_size; - /* shortcut for the case when my rank is root for the group */ - if (my_rank == root) { - *distance = -1; - return group_root; - } - } - - relative_rank = (my_rank - root) < 0 ? my_rank - root + pow2_size : - my_rank - root; - - for (i = 1; i < pow2_size; i<<=1, pow2_distance++) { - if (relative_rank & i) { - src = my_rank ^ i; - if (src >= pow2_size) - src -= pow2_size; - - *distance = pow2_distance; - return src; - } - } - - /* error case */ - *distance = -1; - return -1; -} - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_bcast_binomial_test_and_scatter_known_root(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, void *data_buffer, int count, int base_block_size) -{ - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int rc; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int tmp_radix_mask_pow = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask_pow - 1; - int tag = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag; - int *status = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status; - - PTPCOLL_VERBOSE(10, ("Running bcol_ptpcoll_bcast_binomial_probe_and_scatter_anyroot")); - - if (0 == mca_bcol_ptpcoll_test_all_for_match(active_requests, - requests, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - PTPCOLL_VERBOSE(10, ("Bcast, Data was received")); - - /* Sending forward the data over binimial nomial tree */ - *status = PTPCOLL_SCATTER_STARTED; - K_NOMIAL_ROOT_BCAST_NB_BINOMIAL_SCATTER( - tmp_radix_mask_pow, - my_group_index, group_size, group_list, - data_buffer, base_block_size, - count, tag, comm, requests, - active_requests); - - - return BCOL_FN_COMPLETE; -} - -#define NARRAY_BLOCK_SIZE(size, module, level_size) \ - ((size + (module)->full_narray_tree_num_leafs - 1) / \ - (module)->full_narray_tree_num_leafs) * \ - ((module)->full_narray_tree_num_leafs / \ - ((0 == level_size) ? \ - mca_bcol_ptpcoll_component.narray_knomial_radix : \ - level_size)) - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_bcast_narray_test_and_scatter_known_root(mca_bcol_ptpcoll_module_t *ptpcoll_module, - int buffer_index, void *data_buffer, int count, int process_shift, - int relative_group_index) -{ - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int rc; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag; - int *status = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].status; - int scatter_count = 0; - int offset = 0; - int base_block_size = 0; - void *curr_data_buffer = NULL; - - PTPCOLL_VERBOSE(10, ("Running bcol_ptpcoll_bcast_narray_test_and_scatter_known_root")); - - if (0 == mca_bcol_ptpcoll_test_all_for_match(active_requests, - requests, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - /* Sending forward the data over binimial nomial tree */ - *status = PTPCOLL_SCATTER_STARTED; - if(0 == relative_group_index) { - scatter_count = count; - } else { - scatter_count = NARRAY_BLOCK_SIZE(count, ptpcoll_module, - ptpcoll_module->narray_knomial_node[relative_group_index].level_size); - } - - offset = scatter_count * - ptpcoll_module->narray_knomial_node[relative_group_index].rank_on_level; - - /* make sure that we do not overun memory */ - if (OPAL_UNLIKELY(offset + scatter_count > count)) { - scatter_count = count - offset; - } - - PTPCOLL_VERBOSE(10, ("Bcast, Data was received %d %d %d", - scatter_count, - ptpcoll_module->narray_knomial_node[relative_group_index].level_size, - ptpcoll_module->narray_knomial_node[relative_group_index].rank_on_level)); - - - curr_data_buffer = (void *)((unsigned char *)data_buffer + (size_t)offset); - - /* calculating scatter block size for next level of tree */ - base_block_size = NARRAY_BLOCK_SIZE(count, ptpcoll_module, - ptpcoll_module->narray_knomial_node[relative_group_index].level_size * - mca_bcol_ptpcoll_component.narray_knomial_radix); - - PTPCOLL_VERBOSE(10, ("scatter_known_rootaaa %d %d %d %d %d",scatter_count, offset, base_block_size, - ptpcoll_module->narray_knomial_node[relative_group_index].level_size /mca_bcol_ptpcoll_component.narray_knomial_radix, - ptpcoll_module->full_narray_tree_num_leafs)); - - NARRAY_SCATTER_NB((&ptpcoll_module->narray_knomial_node[relative_group_index]), - process_shift, ptpcoll_module->full_narray_tree_size, - curr_data_buffer, base_block_size, scatter_count, tag, comm, - requests, active_requests); - - /* Bummer, I tried to prevent this, special case for virtual root */ - if(0 == relative_group_index) { - if (0 == mca_bcol_ptpcoll_test_all_for_match(active_requests, - requests, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - *status = PTPCOLL_ROOT_SEND_STARTED; - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } - - return BCOL_FN_COMPLETE; -} - -static inline __opal_attribute_always_inline__ -int bcol_ptpcoll_bcast_narray_knomial_gather(mca_bcol_ptpcoll_module_t *ptpcoll_module, - const int buffer_index, void *data_buffer, const int count, - const int relative_group_index) -{ - int completed = 0; /* not completed */ - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int blocks_in_step = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask; - int tag = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].tag - 1; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - int group_size = ptpcoll_module->full_narray_tree_size; - int i, k, - rc, - len, slen, rlen, - peer, group_peer; - size_t s_offset, - r_offset; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **requests = - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests; - netpatterns_narray_knomial_tree_node_t *narray_node = - &ptpcoll_module->narray_knomial_node[relative_group_index]; - netpatterns_k_exchange_node_t *k_node = - &narray_node->k_node; - mca_bcol_ptpcoll_component_t *cm = - &mca_bcol_ptpcoll_component; - size_t base_block_size = - NARRAY_BLOCK_SIZE(count, ptpcoll_module, narray_node->level_size); - - PTPCOLL_VERBOSE(10, ("bcol_ptpcoll_bcast_narray_knomial_gather %d %d %d %d %d %d %d", - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration, - base_block_size, count, narray_node->level_size, - relative_group_index, k_node->n_exchanges, tag)); - - /* we assume the iteration #iteration already was completed with probe */ - for (i = ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration; - i < k_node->n_exchanges; i++, blocks_in_step *= cm->narray_knomial_radix) { - - len = base_block_size * blocks_in_step; - - for (k = 0; k < cm->narray_knomial_radix - 1; k++) { - group_peer = my_group_index + - (k_node->rank_exchanges[i][k] - narray_node->rank_on_level); - if (group_peer >= group_size) { - group_peer -= group_size; - } else if (group_peer < 0) { - group_peer += group_size; - } - peer = group_list[group_peer]; - - r_offset = (size_t)k_node->rank_exchanges[i][k] / blocks_in_step * - len; - - /* check that we do not run out of message boundary */ - if (OPAL_UNLIKELY(r_offset + len > (size_t)count)) { - rlen = count - r_offset; - if (OPAL_UNLIKELY(rlen <= 0)) { - continue; - } - } else { - rlen = len; - } - PTPCOLL_VERBOSE(10, ("Recv data from %d, addr %p offset %d len %d %d %d tag %d", - peer, data_buffer, r_offset, rlen, len, blocks_in_step, tag)); - rc = MCA_PML_CALL(irecv((void *)((unsigned char *)data_buffer + r_offset), - rlen, MPI_BYTE, - peer, tag, comm, &requests[*active_requests])); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to receive data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - - for (k = 0; k < cm->narray_knomial_radix - 1; k++) { - group_peer = my_group_index + - (k_node->rank_exchanges[i][k] - narray_node->rank_on_level); - if (group_peer >= group_size) { - group_peer -= group_size; - } else if (group_peer < 0) { - group_peer += group_size; - } - peer = group_list[group_peer]; - - s_offset = (size_t)narray_node->rank_on_level / blocks_in_step * - len; - - /* check that we do not run out of message boundary */ - if (OPAL_UNLIKELY(s_offset + len > (size_t)count)) { - slen = count - s_offset; - if (OPAL_UNLIKELY(slen <= 0)) { - continue; - } - } else { - slen = len; - } - - PTPCOLL_VERBOSE(10, ("Send data from %d, addr %p offset %d len %d %d %d tag %d", - peer, data_buffer, s_offset, slen, len, blocks_in_step, tag)); - rc = MCA_PML_CALL(isend((void *)((unsigned char *)data_buffer + s_offset), - slen, MPI_BYTE, - peer, tag, MCA_PML_BASE_SEND_STANDARD, comm, - &(requests[*active_requests]))); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - ++(*active_requests); - } - - completed = mca_bcol_ptpcoll_test_all_for_match(active_requests, requests, &rc); - if (0 == completed) { - /* cache data for next iteration */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].iteration = - i; /* why not to store step for next iteration ?! */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].radix_mask = - blocks_in_step * cm->narray_knomial_radix; - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - } - - return BCOL_FN_COMPLETE; -} - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_component.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_component.c deleted file mode 100644 index c8c238c280f..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_component.c +++ /dev/null @@ -1,174 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "bcol_ptpcoll.h" -#include "ompi/mca/bcol/base/base.h" - -#include "bcol_ptpcoll_mca.h" -#include "bcol_ptpcoll_utils.h" - -/* - * Public string showing the bcol ptpcoll V2 component version number - */ -const char *mca_bcol_ptpcoll_component_version_string = - "Open MPI bcol - ptpcoll collective MCA component version " OMPI_VERSION; - - -/* - * Local functions - */ - -static int ptpcoll_open(void); -static int ptpcoll_close(void); - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_bcol_ptpcoll_component_t mca_bcol_ptpcoll_component = { - - /* First, fill in the super */ - - { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .bcol_version = { - MCA_BCOL_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "ptpcoll", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = ptpcoll_open, - .mca_close_component = ptpcoll_close, - .mca_register_component_params = mca_bcol_ptpcoll_register_mca_params, - }, - - /* Initialization / querying functions */ - - .collm_init_query = mca_bcol_ptpcoll_init_query, - .collm_comm_query = mca_bcol_ptpcoll_comm_query, - .init_done = false, - .need_ordering = false, - }, - - /* component specific */ - -}; - -static void -collreq_construct(mca_bcol_ptpcoll_collreq_t *collreq) -{ - collreq->requests = NULL; -} - -static void -collreq_destruct(mca_bcol_ptpcoll_collreq_t *collreq) -{ - if (NULL != collreq->requests) { - free(collreq->requests); - } -} - -OBJ_CLASS_INSTANCE(mca_bcol_ptpcoll_collreq_t, - opal_free_list_item_t, - collreq_construct, - collreq_destruct); - -/* - * Open the component - */ -static int ptpcoll_open(void) -{ - return OMPI_SUCCESS; -} - -/* - * Close the component - */ -static int ptpcoll_close(void) -{ - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_bcol_ptpcoll_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* at this stage there is no reason to disaulify this component */ - - /* done */ - return OMPI_SUCCESS; -} - -/* memory management routines */ - -/* allocte memory - this is a no-op function intended to work with - * mpool2, which will use malloc for allocation, if no other allocator - * is available. - */ -void * bcol_ptpcoll_allocate_memory(size_t length, size_t alignment, - struct mca_bcol_base_module_t *bcol_module) -{ - /* do nothing */ - return NULL; -} - -/* - * register memory - nothing to do - */ -int bcol_ptpcoll_register_memory(void * in_ptr, size_t length, size_t alignment, - struct mca_bcol_base_module_t *bcol_module) -{ - /* nothing to do */ - return OMPI_SUCCESS; -} - -/* deregister memory - nothing to do - */ -int bcol_ptpcoll_deregister_memory( void * in_ptr, - struct mca_bcol_base_module_t *bcol_module) -{ - /* nothing to do */ - return OMPI_SUCCESS; -} - -/* free memory - since we don't allocate, we also don't free */ -int bcol_ptpcoll_free_memory(void *ptr, - struct mca_bcol_base_module_t *bcol_module) -{ - /* nnthing to do */ - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanin.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanin.c deleted file mode 100644 index 57dafce7bdf..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanin.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h" - -/* - * Fanin routines - no user data - */ - -int bcol_ptpcoll_fanin( bcol_function_args_t *input_args, - struct mca_bcol_base_module_t *module) -{ - /* local variable */ - int ret=OMPI_SUCCESS; - /* mca_bcol_ptpcoll_module_t *ptp_module=(mca_bcol_ptpcoll_module_t *) module; */ - - /* done */ - return ret; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanout.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanout.c deleted file mode 100644 index ae5739391b7..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_fanout.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/ptpcoll/bcol_ptpcoll.h" - -/* - * Fanin routines - no user data - */ - -int bcol_ptpcoll_fanout( bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - /* local variable */ - int ret = OMPI_SUCCESS; - /* TBD: - mca_bcol_ptpcoll_module_t *ptp_module=(mca_bcol_ptpcoll_module_t *) const_args->bcol_module; - */ - - /* done */ - return ret; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.c deleted file mode 100644 index 57caf7c1106..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.c +++ /dev/null @@ -1,197 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include -#include -#include -#include - -#include "bcol_ptpcoll_mca.h" -#include "bcol_ptpcoll.h" - -/* - * Local flags - */ -enum { - REGINT_NEG_ONE_OK = 0x01, - REGINT_GE_ZERO = 0x02, - REGINT_GE_ONE = 0x04, - REGINT_NONZERO = 0x08, - REGINT_MAX = 0x88 -}; - -enum { - REGSTR_EMPTY_OK = 0x01, - - REGSTR_MAX = 0x88 -}; - -#if 0 /* Pasha: we will be need this function in future */ -/* - * utility routine for string parameter registration - */ -static int reg_string(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - const char* default_value, char **storage, - int flags) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_bcol_ptpcoll_component.super.bcol_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_STRING, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "bcol", "ptpcoll", - deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGSTR_EMPTY_OK) && (NULL == *storage || 0 == strlen(*storage))) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} -#endif - -/* - * utility routine for integer parameter registration - */ -static int reg_int(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - int default_value, int *storage, int flags) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_bcol_ptpcoll_component.super.bcol_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_INT, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "bcol", "ptpcoll", - deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGINT_NEG_ONE_OK) && -1 == *storage) { - return OMPI_SUCCESS; - } - if ((0 != (flags & REGINT_GE_ZERO) && *storage < 0) || - (0 != (flags & REGINT_GE_ONE) && *storage < 1) || - (0 != (flags & REGINT_NONZERO) && 0 == *storage)) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -static int reg_bool(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - bool default_value, bool *storage) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_bcol_ptpcoll_component.super.bcol_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_BOOL, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (0 > index) { - return index; - } - - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "bcol", "ptpcoll", - deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - return OMPI_SUCCESS; -} - -int mca_bcol_ptpcoll_register_mca_params(void) -{ - int ret, tmp; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - - ret = OMPI_SUCCESS; -#define CHECK(expr) do {\ - tmp = (expr); \ - if (OMPI_SUCCESS != tmp) ret = tmp; \ - } while (0) - - CHECK(reg_int("priority", NULL, - "PTPCOLL component priority" - "(from 0(low) to 90 (high))", 90, &cm->super.priority, 0)); - - CHECK(reg_int("verbose", NULL, - "Output some verbose PTPCOLL information " - "(0 = no output, nonzero = output)", 0, &cm->verbose, REGINT_GE_ZERO)); - - CHECK(reg_int("k_nomial_radix", NULL, - "The radix of K-Nomial Tree " - "(starts from 2)", 2, &cm->k_nomial_radix, REGINT_GE_ONE)); - - CHECK(reg_int("narray_radix", NULL, - "The radix of Narray Tree " - "(starts from 2)", 2, &cm->narray_radix, REGINT_GE_ONE)); - - CHECK(reg_int("narray_knomial_radix", NULL, - "The radix of Narray/Knomial Tree for scatther-gather type algorithms" - "(starts from 2)", 2, &cm->narray_knomial_radix, REGINT_GE_ONE)); - - CHECK(reg_int("num_to_probe", NULL, - "Number of probe operation in single source data check" - "(starts from 8)", 8, &cm->num_to_probe, REGINT_GE_ONE)); - - CHECK(reg_int("bcast_small_msg_known_root_alg", NULL, - "Algorithm selection for bcast small messages known root" - "(1 - K-nomial, 2 - N-array)", 1, &cm->bcast_small_messages_known_root_alg, - REGINT_GE_ZERO)); - - CHECK(reg_int("bcast_large_msg_known_root_alg", NULL, - "Algorithm selection for bcast large messages known root" - "(1 - Binomial scatther-gather, 2 - N-array scather, K-nomial gather)", - 1, &cm->bcast_large_messages_known_root_alg, REGINT_GE_ZERO)); - - CHECK(reg_int("barrier_alg", NULL, - "Algorithm selection for Barrier" - "(1 - Recursive doubling, 2 - Recursive K-ing)", - 1, &cm->barrier_alg, REGINT_GE_ZERO)); - - /* register parmeters controlling message fragementation */ - CHECK(reg_int("min_frag_size", NULL, - "Minimum fragment size", - getpagesize(), &cm->super.min_frag_size, REGINT_GE_ONE)); - - CHECK(reg_int("max_frag_size", NULL, - "Maximum fragment size", - FRAG_SIZE_NO_LIMIT, &cm->super.max_frag_size, REGINT_NONZERO)); - - CHECK(reg_bool("can_use_user_buffers", NULL, - "User memory can be used by the collective algorithms", - 1, &cm->super.can_use_user_buffers)); - - return ret; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.h b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.h deleted file mode 100644 index 4d1067d9e49..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_mca.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -#ifndef MCA_BCOL_PTPCOLL_MCA_H -#define MCA_BCOL_PTPCOLL_MCA_H - -#include "ompi_config.h" - -BEGIN_C_DECLS - -int mca_bcol_ptpcoll_register_mca_params(void); - -END_C_DECLS -#endif diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_module.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_module.c deleted file mode 100644 index ca8c32ec8dd..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_module.c +++ /dev/null @@ -1,760 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "opal/util/show_help.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/pml/pml.h" /* need this for the max tag size */ - -#include "bcol_ptpcoll.h" -#include "bcol_ptpcoll_utils.h" -#include "bcol_ptpcoll_bcast.h" -#include "bcol_ptpcoll_allreduce.h" -#include "bcol_ptpcoll_reduce.h" - -#define BCOL_PTP_CACHE_LINE_SIZE 128 - -/* - * Local functions - */ -static int alloc_allreduce_offsets_array(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int rc = OMPI_SUCCESS, i = 0; - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int n_exchanges = k_node->n_exchanges; - - /* Precalculate the allreduce offsets */ - if (0 < k_node->n_exchanges) { - ptpcoll_module->allgather_offsets = (int **) calloc (n_exchanges, sizeof(int *)); - - if (!ptpcoll_module->allgather_offsets) { - return OMPI_ERROR; - } - - for (i = 0; i < n_exchanges ; i++) { - ptpcoll_module->allgather_offsets[i] = (int *) calloc (NOFFSETS, sizeof(int)); - - if (!ptpcoll_module->allgather_offsets[i]){ - return OMPI_ERROR; - } - } - } - - return rc; -} - -static int free_allreduce_offsets_array(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int rc = OMPI_SUCCESS, i = 0; - netpatterns_k_exchange_node_t *k_node = &ptpcoll_module->knomial_exchange_tree; - int n_exchanges = k_node->n_exchanges; - - if (ptpcoll_module->allgather_offsets) { - for (i=0; i < n_exchanges; i++) { - free (ptpcoll_module->allgather_offsets[i]); - } - } - - free(ptpcoll_module->allgather_offsets); - ptpcoll_module->allgather_offsets = NULL; - return rc; -} - -static void -mca_bcol_ptpcoll_module_construct(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - uint64_t i; - /* Pointer to component */ - ptpcoll_module->narray_node = NULL; - ptpcoll_module->allgather_offsets = NULL; - ptpcoll_module->super.bcol_component = (mca_bcol_base_component_t *) &mca_bcol_ptpcoll_component; - ptpcoll_module->super.list_n_connected = NULL; - ptpcoll_module->super.hier_scather_offset = 0; - /* no header support in ptp */ - ptpcoll_module->super.header_size = 0; - /* No network context */ - ptpcoll_module->super.network_context = NULL; - /* set the upper limit on the tag */ - i = 2; - ptpcoll_module->tag_mask = 1; - while ( i <= (uint64_t) mca_pml.pml_max_tag && i > 0) { - i <<= 1; - } - ptpcoll_module->ml_mem.ml_buf_desc = NULL; - ptpcoll_module->tag_mask = i - 1; -} - -static void -mca_bcol_ptpcoll_module_destruct(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int i; - mca_bcol_ptpcoll_local_mlmem_desc_t *ml_mem = &ptpcoll_module->ml_mem; - - if (NULL != ml_mem->ml_buf_desc) { - /* Release the memory structs that were cache ML memory data */ - uint32_t i, j, ci; - for (i = 0; i < ml_mem->num_banks; i++) { - for (j = 0; j < ml_mem->num_buffers_per_bank; j++) { - ci = i * ml_mem->num_buffers_per_bank + j; - if (NULL != ml_mem->ml_buf_desc[ci].requests) { - free(ml_mem->ml_buf_desc[ci].requests); - } - } - } - /* release the buffer descriptor */ - free(ml_mem->ml_buf_desc); - ml_mem->ml_buf_desc = NULL; - } - - if (NULL != ptpcoll_module->allgather_offsets) { - free_allreduce_offsets_array(ptpcoll_module); - } - - if (NULL != ptpcoll_module->narray_node) { - for (i = 0; i < ptpcoll_module->group_size; i++) { - if (NULL != ptpcoll_module->narray_node[i].children_ranks) { - free(ptpcoll_module->narray_node[i].children_ranks); - } - } - - free(ptpcoll_module->narray_node); - ptpcoll_module->narray_node = NULL; - } - - OBJ_DESTRUCT(&ptpcoll_module->collreqs_free); - - if (NULL != ptpcoll_module->super.list_n_connected) { - free(ptpcoll_module->super.list_n_connected); - ptpcoll_module->super.list_n_connected = NULL; - } - - for (i = 0; i < BCOL_NUM_OF_FUNCTIONS; i++){ - OPAL_LIST_DESTRUCT((&ptpcoll_module->super.bcol_fns_table[i])); - } - - - if (NULL != ptpcoll_module->kn_proxy_extra_index) { - free(ptpcoll_module->kn_proxy_extra_index); - ptpcoll_module->kn_proxy_extra_index = NULL; - } - - if (NULL != ptpcoll_module->alltoall_iovec) { - free(ptpcoll_module->alltoall_iovec); - ptpcoll_module->alltoall_iovec = NULL; - } - - if (NULL != ptpcoll_module->narray_knomial_proxy_extra_index) { - free(ptpcoll_module->narray_knomial_proxy_extra_index); - ptpcoll_module->narray_knomial_proxy_extra_index = NULL; - } - - if (NULL != ptpcoll_module->narray_knomial_node) { - for(i = 0; i < ptpcoll_module->full_narray_tree_size; i++) { - netpatterns_cleanup_narray_knomial_tree (ptpcoll_module->narray_knomial_node + i); - } - free(ptpcoll_module->narray_knomial_node); - ptpcoll_module->narray_knomial_node = NULL; - } - - netpatterns_cleanup_recursive_knomial_allgather_tree_node(&ptpcoll_module->knomial_allgather_tree); - netpatterns_cleanup_recursive_knomial_tree_node(&ptpcoll_module->knomial_exchange_tree); - -} - -OBJ_CLASS_INSTANCE(mca_bcol_ptpcoll_module_t, - mca_bcol_base_module_t, - mca_bcol_ptpcoll_module_construct, - mca_bcol_ptpcoll_module_destruct); - -static int init_ml_buf_desc(mca_bcol_ptpcoll_ml_buffer_desc_t **desc, void *base_addr, uint32_t num_banks, - uint32_t num_buffers_per_bank, uint32_t size_buffer, uint32_t header_size, int group_size, int pow_k) -{ - uint32_t i, j, ci; - mca_bcol_ptpcoll_ml_buffer_desc_t *tmp_desc = NULL; - int k_nomial_radix = mca_bcol_ptpcoll_component.k_nomial_radix; - int pow_k_val = (0 == pow_k) ? 1 : pow_k; - int num_to_alloc = - ((k_nomial_radix - 1) * pow_k_val * 2 + 1 > mca_bcol_ptpcoll_component.narray_radix) ? - (k_nomial_radix - 1) * pow_k_val * 2 + 1 : - mca_bcol_ptpcoll_component.narray_radix * 2; - - - *desc = (mca_bcol_ptpcoll_ml_buffer_desc_t *)calloc(num_banks * num_buffers_per_bank, - sizeof(mca_bcol_ptpcoll_ml_buffer_desc_t)); - if (NULL == *desc) { - PTPCOLL_ERROR(("Failed to allocate memory")); - return OMPI_ERROR; - } - - tmp_desc = *desc; - - for (i = 0; i < num_banks; i++) { - for (j = 0; j < num_buffers_per_bank; j++) { - ci = i * num_buffers_per_bank + j; - tmp_desc[ci].bank_index = i; - tmp_desc[ci].buffer_index = j; - /* *2 is for gather session +1 for extra peer */ - tmp_desc[ci].requests = (ompi_request_t **) - calloc(num_to_alloc, sizeof(ompi_request_t *)); - if (NULL == tmp_desc[ci].requests) { - PTPCOLL_ERROR(("Failed to allocate memory for requests")); - return OMPI_ERROR; - } - /* - * ptpcoll don't have any header, but other bcols may to have. So - * we need to take it in account. - */ - tmp_desc[ci].data_addr = (void *) - ((unsigned char*)base_addr + ci * size_buffer + header_size); - PTPCOLL_VERBOSE(10, ("ml memory cache setup %d %d - %p", i, j, tmp_desc[ci].data_addr)); - - /* init reduce implementation flags */ - tmp_desc[ci].reduce_init_called = false; - tmp_desc[ci].reduction_status = 0; - } - } - - return OMPI_SUCCESS; -} - -static void mca_bcol_ptpcoll_set_small_msg_thresholds(struct mca_bcol_base_module_t *super) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = - (mca_bcol_ptpcoll_module_t *) super; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - - /* Subtract out the maximum header size when calculating the thresholds. This - * will account for the headers used by the basesmuma component. If we do not - * take these headers into account we may overrun our buffer. */ - - /* Set the Allgather threshold equals to a ML buff size */ - super->small_message_thresholds[BCOL_ALLGATHER] = - (ptpcoll_module->ml_mem.size_buffer - BCOL_HEADER_MAX) / - ompi_comm_size(ptpcoll_module->super.sbgp_partner_module->group_comm); - - /* Set the Bcast threshold, all Bcast algths have the same threshold */ - super->small_message_thresholds[BCOL_BCAST] = - (ptpcoll_module->ml_mem.size_buffer - BCOL_HEADER_MAX); - - /* Set the Alltoall threshold, the Ring algth sets some limitation */ - super->small_message_thresholds[BCOL_ALLTOALL] = - (ptpcoll_module->ml_mem.size_buffer - BCOL_HEADER_MAX) / 2; - - /* Set the Allreduce threshold, NARRAY algth sets some limitation */ - super->small_message_thresholds[BCOL_ALLREDUCE] = - (ptpcoll_module->ml_mem.size_buffer - BCOL_HEADER_MAX) / ptpcoll_module->k_nomial_radix; - - /* Set the Reduce threshold, NARRAY algth sets some limitation */ - super->small_message_thresholds[BCOL_REDUCE] = - (ptpcoll_module->ml_mem.size_buffer - BCOL_HEADER_MAX) / cm->narray_radix; -} - -/* - * Cache information about ML memory - */ -static int mca_bcol_ptpcoll_cache_ml_memory_info(struct mca_bcol_base_memory_block_desc_t *payload_block, - uint32_t data_offset, - struct mca_bcol_base_module_t *bcol, - void *reg_data) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *) bcol; - mca_bcol_ptpcoll_local_mlmem_desc_t *ml_mem = &ptpcoll_module->ml_mem; - struct mca_bcol_base_memory_block_desc_t *desc = payload_block; - int group_size = ptpcoll_module->super.sbgp_partner_module->group_size; - - PTPCOLL_VERBOSE(10, ("mca_bcol_ptpcoll_init_buffer_memory was called")); - - /* cache ml mem desc tunings localy */ - ml_mem->num_banks = desc->num_banks; - ml_mem->num_buffers_per_bank = desc->num_buffers_per_bank; - ml_mem->size_buffer = desc->size_buffer; - - PTPCOLL_VERBOSE(10, ("ML buffer configuration num banks %d num_per_bank %d size %d base addr %p", - desc->num_banks, desc->num_buffers_per_bank, desc->size_buffer, desc->block->base_addr)); - - /* Set first bank index for release */ - ml_mem->bank_index_for_release = 0; - - if (OMPI_SUCCESS != init_ml_buf_desc(&ml_mem->ml_buf_desc, - desc->block->base_addr, - ml_mem->num_banks, - ml_mem->num_buffers_per_bank, - ml_mem->size_buffer, - data_offset, - group_size, - ptpcoll_module->pow_k)) { - PTPCOLL_VERBOSE(10, ("Failed to allocate rdma memory descriptor\n")); - return OMPI_ERROR; - } - - PTPCOLL_VERBOSE(10, ("ptpcoll_module = %p, ml_mem_desc = %p.\n", - ptpcoll_module)); - - return OMPI_SUCCESS; -} - -/* - * Load ptpcoll bcol functions - */ -static void load_func(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int fnc; - - /* reset everything to NULL */ - for (fnc = 0; fnc < BCOL_NUM_OF_FUNCTIONS; fnc++) { - - /*ptpcoll_module->super.bcol_function_table[fnc] = NULL;*/ - ptpcoll_module->super.bcol_function_table[fnc] = NULL; - ptpcoll_module->super.bcol_function_init_table[fnc] = NULL; - } - - ptpcoll_module->super.bcol_function_init_table[BCOL_BARRIER] = bcol_ptpcoll_barrier_init; - - ptpcoll_module->super.bcol_function_init_table[BCOL_BCAST] = bcol_ptpcoll_bcast_init; - ptpcoll_module->super.bcol_function_init_table[BCOL_ALLREDUCE] = bcol_ptpcoll_allreduce_init; - ptpcoll_module->super.bcol_function_init_table[BCOL_ALLGATHER] = bcol_ptpcoll_allgather_init; - ptpcoll_module->super.bcol_function_table[BCOL_BCAST] = bcol_ptpcoll_bcast_k_nomial_anyroot; - ptpcoll_module->super.bcol_function_init_table[BCOL_ALLTOALL] = NULL; - ptpcoll_module->super.bcol_function_init_table[BCOL_SYNC] = mca_bcol_ptpcoll_memsync_init; - ptpcoll_module->super.bcol_function_init_table[BCOL_REDUCE] = bcol_ptpcoll_reduce_init; - - /* ML memory cacher */ - ptpcoll_module->super.bcol_memory_init = mca_bcol_ptpcoll_cache_ml_memory_info; - - /* Set thresholds */ - ptpcoll_module->super.set_small_msg_thresholds = mca_bcol_ptpcoll_set_small_msg_thresholds; - - /* setup recursive k-ing tree */ - ptpcoll_module->super.k_nomial_tree = mca_bcol_ptpcoll_setup_knomial_tree; -} - -int mca_bcol_ptpcoll_setup_knomial_tree(mca_bcol_base_module_t *super) -{ - mca_bcol_ptpcoll_module_t *p2p_module = (mca_bcol_ptpcoll_module_t *) super; - int rc = 0; - - rc = netpatterns_setup_recursive_knomial_allgather_tree_node( - p2p_module->super.sbgp_partner_module->group_size, - p2p_module->super.sbgp_partner_module->my_index, - mca_bcol_ptpcoll_component.k_nomial_radix, - super->list_n_connected, - &p2p_module->knomial_allgather_tree); - - return rc; -} - -/* The function used to calculate size */ -static int calc_full_tree_size(int radix, int group_size, int *num_leafs) -{ - int level_cnt = 1; - int total_cnt = 0; - - while( total_cnt < group_size ) { - total_cnt += level_cnt; - level_cnt *= radix; - } - - if (total_cnt > group_size) { - *num_leafs = level_cnt / radix; - return total_cnt - level_cnt / radix; - } else { - *num_leafs = level_cnt; - return group_size; - } -} - -/* Setup N-array scatter Knomial-gather static information */ -static int load_narray_knomial_tree (mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int rc, i, peer; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - - ptpcoll_module->full_narray_tree_size = calc_full_tree_size( - cm->narray_knomial_radix, - ptpcoll_module->group_size, - &ptpcoll_module->full_narray_tree_num_leafs); - - ptpcoll_module->narray_knomial_proxy_extra_index = (int *) - malloc(sizeof(int) * (cm->narray_knomial_radix)); - if (NULL == ptpcoll_module->narray_knomial_proxy_extra_index) { - PTPCOLL_ERROR(("Failed to allocate memory")); - goto Error; - } - - ptpcoll_module->narray_knomial_node = calloc( - ptpcoll_module->full_narray_tree_size, - sizeof(netpatterns_narray_knomial_tree_node_t)); - if(NULL == ptpcoll_module->narray_knomial_node) { - goto Error; - } - - PTPCOLL_VERBOSE(10 ,("My type is proxy, full tree size = %d [%d]", - ptpcoll_module->full_narray_tree_size, - cm->narray_knomial_radix - )); - - if (ptpcoll_module->super.sbgp_partner_module->my_index < - ptpcoll_module->full_narray_tree_size) { - if (ptpcoll_module->super.sbgp_partner_module->my_index < - ptpcoll_module->group_size - ptpcoll_module->full_narray_tree_size) { - ptpcoll_module->narray_type = PTPCOLL_PROXY; - for (i = 0; i < cm->narray_knomial_radix; i++) { - peer = - ptpcoll_module->super.sbgp_partner_module->my_index * - cm->narray_knomial_radix + i + - ptpcoll_module->full_narray_tree_size; - if (peer >= ptpcoll_module->group_size) { - break; - } - ptpcoll_module->narray_knomial_proxy_extra_index[i] = peer; - } - ptpcoll_module->narray_knomial_proxy_num = i; - } else { - ptpcoll_module->narray_type = PTPCOLL_IN_GROUP;; - } - /* Setting node info */ - for(i = 0; i < ptpcoll_module->full_narray_tree_size; i++) { - rc = netpatterns_setup_narray_knomial_tree( - cm->narray_knomial_radix, - i, - ptpcoll_module->full_narray_tree_size, - &ptpcoll_module->narray_knomial_node[i]); - if(OMPI_SUCCESS != rc) { - goto Error; - } - } - } else { - ptpcoll_module->narray_type = PTPCOLL_EXTRA; - ptpcoll_module->narray_knomial_proxy_extra_index[0] = - (ptpcoll_module->super.sbgp_partner_module->my_index - - ptpcoll_module->full_narray_tree_size) / - cm->narray_knomial_radix; - } - - return OMPI_SUCCESS; - -Error: - if (NULL != ptpcoll_module->narray_knomial_node) { - free(ptpcoll_module->narray_knomial_node); - } - if (NULL != ptpcoll_module->narray_knomial_proxy_extra_index) { - free(ptpcoll_module->narray_knomial_proxy_extra_index); - } - return OMPI_ERROR; -} - -/* Setup N-array static information */ -static int load_narray_tree(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int rc, i; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - - ptpcoll_module->narray_node = calloc(ptpcoll_module->group_size, - sizeof(netpatterns_tree_node_t)); - if(NULL == ptpcoll_module->narray_node ) { - goto Error; - } - - for(i = 0; i < ptpcoll_module->group_size; i++) { - rc = netpatterns_setup_narray_tree( - cm->narray_radix, - i, - ptpcoll_module->group_size, - &ptpcoll_module->narray_node[i]); - if(OMPI_SUCCESS != rc) { - goto Error; - } - } - - return OMPI_SUCCESS; - -Error: - if (NULL != ptpcoll_module->narray_node) { - free(ptpcoll_module->narray_node); - } - return OMPI_ERROR; -} - -static int load_knomial_info(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int i; - mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component; - - ptpcoll_module->k_nomial_radix = - cm->k_nomial_radix > ptpcoll_module->group_size ? - ptpcoll_module->group_size : - cm->k_nomial_radix; - - ptpcoll_module->pow_k = pow_k_calc(ptpcoll_module->k_nomial_radix, - ptpcoll_module->group_size, - &ptpcoll_module->pow_knum); - - ptpcoll_module->kn_proxy_extra_index = (int *) - malloc(sizeof(int) * (ptpcoll_module->k_nomial_radix - 1)); - if (NULL == ptpcoll_module->kn_proxy_extra_index) { - PTPCOLL_ERROR(("Failed to allocate memory")); - goto Error; - } - - /* Setting peer type for K-nomial algorithm*/ - if (ptpcoll_module->super.sbgp_partner_module->my_index < ptpcoll_module->pow_knum ) { - if (ptpcoll_module->super.sbgp_partner_module->my_index < - ptpcoll_module->group_size - ptpcoll_module->pow_knum) { - for (i = 0; - i < (ptpcoll_module->k_nomial_radix - 1) && - ptpcoll_module->super.sbgp_partner_module->my_index * - (ptpcoll_module->k_nomial_radix - 1) + - i + ptpcoll_module->pow_knum < ptpcoll_module->group_size - ; i++) { - ptpcoll_module->pow_ktype = PTPCOLL_KN_PROXY; - ptpcoll_module->kn_proxy_extra_index[i] = - ptpcoll_module->super.sbgp_partner_module->my_index * - (ptpcoll_module->k_nomial_radix - 1) + - i + ptpcoll_module->pow_knum; - PTPCOLL_VERBOSE(10 ,("My type is proxy, pow_knum = %d [%d] my extra %d", - ptpcoll_module->pow_knum, - ptpcoll_module->pow_k, - ptpcoll_module->kn_proxy_extra_index[i])); - } - ptpcoll_module->kn_proxy_extra_num = i; - } else { - PTPCOLL_VERBOSE(10 ,("My type is in group, pow_knum = %d [%d]", ptpcoll_module->pow_knum, - ptpcoll_module->pow_k)); - ptpcoll_module->pow_ktype = PTPCOLL_KN_IN_GROUP; - } - } else { - ptpcoll_module->pow_ktype = PTPCOLL_KN_EXTRA; - ptpcoll_module->kn_proxy_extra_index[0] = (ptpcoll_module->super.sbgp_partner_module->my_index - - ptpcoll_module->pow_knum) / (ptpcoll_module->k_nomial_radix - 1); - PTPCOLL_VERBOSE(10 ,("My type is extra , pow_knum = %d [%d] my proxy %d", - ptpcoll_module->pow_knum, - ptpcoll_module->pow_k, - ptpcoll_module->kn_proxy_extra_index[0])); - } - - return OMPI_SUCCESS; - -Error: - if (NULL == ptpcoll_module->kn_proxy_extra_index) { - free(ptpcoll_module->kn_proxy_extra_index); - } - - return OMPI_ERROR; -} - -static int load_binomial_info(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - ptpcoll_module->pow_2 = pow_k_calc(2, - ptpcoll_module->group_size, - &ptpcoll_module->pow_2num); - - assert(ptpcoll_module->pow_2num == 1 << ptpcoll_module->pow_2); - assert(ptpcoll_module->pow_2num <= ptpcoll_module->group_size); - - /* Setting peer type for binary algorithm*/ - if (ptpcoll_module->super.sbgp_partner_module->my_index < ptpcoll_module->pow_2num ) { - if (ptpcoll_module->super.sbgp_partner_module->my_index < - ptpcoll_module->group_size - ptpcoll_module->pow_2num) { - PTPCOLL_VERBOSE(10 ,("My type is proxy, pow_2num = %d [%d]", ptpcoll_module->pow_2num, - ptpcoll_module->pow_2)); - ptpcoll_module->pow_2type = PTPCOLL_PROXY; - ptpcoll_module->proxy_extra_index = ptpcoll_module->super.sbgp_partner_module->my_index + - ptpcoll_module->pow_2num; - } else { - PTPCOLL_VERBOSE(10 ,("My type is in group, pow_2num = %d [%d]", ptpcoll_module->pow_2num, - ptpcoll_module->pow_2)); - ptpcoll_module->pow_2type = PTPCOLL_IN_GROUP; - } - } else { - PTPCOLL_VERBOSE(10 ,("My type is extra , pow_2num = %d [%d]", ptpcoll_module->pow_2num, - ptpcoll_module->pow_2)); - ptpcoll_module->pow_2type = PTPCOLL_EXTRA; - ptpcoll_module->proxy_extra_index = ptpcoll_module->super.sbgp_partner_module->my_index - - ptpcoll_module->pow_2num; - } - return OMPI_SUCCESS; -} - -static int load_recursive_knomial_info(mca_bcol_ptpcoll_module_t *ptpcoll_module) -{ - int rc = OMPI_SUCCESS; - rc = netpatterns_setup_recursive_knomial_tree_node( - ptpcoll_module->group_size, - ptpcoll_module->super.sbgp_partner_module->my_index, - mca_bcol_ptpcoll_component.k_nomial_radix, - &ptpcoll_module->knomial_exchange_tree); - return rc; -} - -static int bcol_ptpcoll_collreq_init(opal_free_list_item_t *item, void* ctx) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module= (mca_bcol_ptpcoll_module_t *) ctx; - mca_bcol_ptpcoll_collreq_t *collreq = (mca_bcol_ptpcoll_collreq_t *) item; - - switch(mca_bcol_ptpcoll_component.barrier_alg) { - case 1: - collreq->requests = (ompi_request_t **) - calloc(2, sizeof(ompi_request_t *)); - break; - case 2: - collreq->requests = (ompi_request_t **) - calloc(2 * ptpcoll_module->k_nomial_radix, sizeof(ompi_request_t *)); - break; - } - - if (NULL == collreq->requests) { - return OPAL_ERR_OUT_OF_RESOURCE; - } - - return OPAL_SUCCESS; -} - -/* query to see if the module is available for use on the given - * communicator, and if so, what it's priority is. This is where - * the backing shared-memory file is created. - */ -mca_bcol_base_module_t **mca_bcol_ptpcoll_comm_query(mca_sbgp_base_module_t *sbgp, - int *num_modules) -{ - int rc; - /* local variables */ - struct ompi_communicator_t *comm = sbgp->group_comm; - mca_bcol_ptpcoll_module_t *ptpcoll_module = NULL; - mca_bcol_base_module_t **ptpcoll_modules = NULL; - int iovec_size; - - /* initialize local variables */ - *num_modules = 0; - - /* - * This is activated only for intra-communicators - */ - if (OMPI_COMM_IS_INTER(comm) ) { - return NULL; - } - - /* allocate and initialize an sm-v2 module */ - ptpcoll_modules = (mca_bcol_base_module_t **) malloc(sizeof(mca_bcol_base_module_t *)); - if (NULL == ptpcoll_modules) { - return NULL; - } - - ptpcoll_module = OBJ_NEW(mca_bcol_ptpcoll_module_t); - if (NULL == ptpcoll_module) { - free(ptpcoll_modules); - return NULL; - } - - /* On this stage we support only one single module */ - ptpcoll_modules[*num_modules] = &(ptpcoll_module->super); - - (*num_modules)++; - /* set the subgroup */ - ptpcoll_module->super.sbgp_partner_module = sbgp; - /* caching some useful information */ - ptpcoll_module->group_size = - ptpcoll_module->super.sbgp_partner_module->group_size; - - rc = load_binomial_info(ptpcoll_module); - if (OMPI_SUCCESS != rc) { - PTPCOLL_VERBOSE(10, ("Failed to load knomial info")); - goto CLEANUP; - } - - rc = load_knomial_info(ptpcoll_module); - if (OMPI_SUCCESS != rc) { - PTPCOLL_VERBOSE(10, ("Failed to load knomial info")); - goto CLEANUP; - } - - rc = load_narray_tree(ptpcoll_module); - if (OMPI_SUCCESS != rc) { - PTPCOLL_VERBOSE(10, ("Failed to load narray tree")); - goto CLEANUP; - } - - rc = load_narray_knomial_tree(ptpcoll_module); - if (OMPI_SUCCESS != rc) { - PTPCOLL_VERBOSE(10, ("Failed to load narray-knomila tree")); - goto CLEANUP; - } - - rc = load_recursive_knomial_info(ptpcoll_module); - if (OMPI_SUCCESS != rc) { - PTPCOLL_VERBOSE(10, ("Failed to load recursive knomial tree")); - goto CLEANUP; - } - - /* creating collfrag free list */ - OBJ_CONSTRUCT(&ptpcoll_module->collreqs_free, opal_free_list_t); - rc = opal_free_list_init (&ptpcoll_module->collreqs_free, - sizeof(mca_bcol_ptpcoll_collreq_t), - BCOL_PTP_CACHE_LINE_SIZE, - OBJ_CLASS(mca_bcol_ptpcoll_collreq_t), - 0, BCOL_PTP_CACHE_LINE_SIZE, - 256 /* free_list_num */, - -1 /* free_list_max, -1 = infinite */, - 32 /* free_list_inc */, - NULL, 0, NULL, - bcol_ptpcoll_collreq_init, - ptpcoll_module); - if (OMPI_SUCCESS != rc) { - goto CLEANUP; - } - - load_func(ptpcoll_module); - - rc = alloc_allreduce_offsets_array(ptpcoll_module); - if (OMPI_SUCCESS != rc) { - goto CLEANUP; - } - - /* Allocating iovec for PTP alltoall */ - iovec_size = ptpcoll_module->group_size / 2 + ptpcoll_module->group_size % 2; - ptpcoll_module->alltoall_iovec = (struct iovec *) malloc(sizeof(struct iovec) - * iovec_size); - ptpcoll_module->log_group_size = lognum(ptpcoll_module->group_size); - - rc = mca_bcol_base_bcol_fns_table_init(&(ptpcoll_module->super)); - if (OMPI_SUCCESS != rc) { - goto CLEANUP; - } - - /* Zero copy is supported */ - ptpcoll_module->super.supported_mode = MCA_BCOL_BASE_ZERO_COPY; - - /* return */ - return ptpcoll_modules; - -CLEANUP: - - OBJ_RELEASE(ptpcoll_module); - free(ptpcoll_modules); - return NULL; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.c deleted file mode 100644 index d8fe566543c..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.c +++ /dev/null @@ -1,405 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/bcol/bcol.h" -#include "bcol_ptpcoll_reduce.h" -#include "bcol_ptpcoll_utils.h" - -static int bcol_ptpcoll_reduce_narray_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - -static int bcol_ptpcoll_reduce_narray(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args); - - -#define NARRAY_RECV_NB(narray_node, process_shift, group_size, \ - recv_buffer, pack_len, tag, comm, recv_requests, \ - num_pending_recvs) \ -do { \ - int n, rc = OMPI_SUCCESS; \ - int dst; \ - int comm_dst; \ - int offset = 0 ; \ - \ - /* Recieve data from all relevant childrens */ \ - for (n = 0; n < narray_node->n_children; n++) { \ - \ - dst = narray_node->children_ranks[n] + process_shift; \ - if (dst >= group_size) { \ - dst -= group_size; \ - } \ - comm_dst = group_list[dst]; \ - \ - /* Non blocking send .... */ \ - PTPCOLL_VERBOSE(1 , ("Reduce, Irecv data to %d[%d], count %d, tag %d, addr %p", \ - dst, comm_dst, pack_len, tag, \ - data_buffer)); \ - rc = MCA_PML_CALL(irecv((void *)((unsigned char*)recv_buffer + offset), pack_len, MPI_BYTE, \ - comm_dst, tag, comm, \ - &(recv_requests[*num_pending_recvs]))); \ - if( OMPI_SUCCESS != rc ) { \ - PTPCOLL_VERBOSE(10, ("Failed to start non-blocking receive")); \ - return OMPI_ERROR; \ - } \ - ++(*num_pending_recvs); \ - offset += pack_len; \ - } \ -} while(0) - - -static inline int narray_reduce(void *data_buffer, void *recv_buffer, - int nrecvs, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - int *reduction_status) { - int pack_len = count * dtype->super.size; - int i = 0; - void *source_buffer = NULL, *result_buffer = NULL; - - source_buffer = data_buffer; - result_buffer = recv_buffer; - - for (i = 0; i < nrecvs; i++) { - ompi_op_reduce(op, (void*)((unsigned char*) source_buffer) , - (void*)((unsigned char*) result_buffer), - count,dtype); - - source_buffer = (void *)((unsigned char*)recv_buffer - + (i+1) * pack_len); - } - - *reduction_status = 1; - return OMPI_SUCCESS; -} -static int bcol_ptpcoll_reduce_narray_progress(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag = -1; - int rc; - int group_size = ptpcoll_module->group_size; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - uint32_t buffer_index = input_args->buffer_index; - struct ompi_op_t *op = input_args->op; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **send_request = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[0]; - ompi_request_t **recv_requests = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[1]; - void *data_buffer = NULL; - void *src_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - void *recv_buffer = (void *) ( - (unsigned char *)input_args->rbuf + - (size_t)input_args->rbuf_offset); - int count = input_args->count; - struct ompi_datatype_t *dtype = input_args->dtype; - int pack_len = input_args->count * input_args->dtype->super.size; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int matched = false; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int relative_group_index = 0; - netpatterns_tree_node_t *narray_node = NULL; - bool not_sent = false; - int parent_rank = -1, comm_parent_rank = -1; - int group_root_index = input_args->root; - - if (!ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].reduce_init_called) { - bcol_ptpcoll_reduce_narray(input_args, const_args); - } - /* - * By default the src buffer is the data buffer, - * only after reduction, the recv buffer becomes the - * data buffer - */ - data_buffer = src_buffer; - - relative_group_index = my_group_index - group_root_index; - if (relative_group_index < 0) { - relative_group_index +=group_size; - } - - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level tags */ - tag = -tag; - - narray_node = &ptpcoll_module->narray_node[relative_group_index]; - - PTPCOLL_VERBOSE(3, ("reduce, Narray tree Progress")); - - PTPCOLL_VERBOSE(8, ("bcol_ptpcoll_reduce_narray, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d [%d]" - "buff: %p ", - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, input_args->root_route->rank, - data_buffer)); - - /* - Check if the data was received - */ - if (0 != *active_requests) { - matched = mca_bcol_ptpcoll_test_all_for_match - (active_requests, recv_requests, &rc); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - - - /* All data was received, then do a reduction*/ - if(matched) { - narray_reduce(data_buffer, recv_buffer, narray_node->n_children, count, dtype, op, - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].reduction_status); - - /* - * The reduction result is in the recv buffer, so it is the new data - * buffer - */ - data_buffer = recv_buffer; - - /* If not reduced, means also, you might not posted a send */ - not_sent = true; - } else { - PTPCOLL_VERBOSE(10, ("reduce root is started")); - return BCOL_FN_STARTED; - } - } - - /* I'm root, I'm done */ - if (input_args->root_flag) { - return BCOL_FN_COMPLETE; - } - - PTPCOLL_VERBOSE(1,("Testing Sending Match")); - - /* If send was not posted */ - /* Manju: Leaf node should never post in the progress logic */ - if (not_sent) { - parent_rank = - ptpcoll_module->narray_node[relative_group_index].parent_rank + - group_root_index; - if (parent_rank >= group_size) { - parent_rank -= group_size; - } - - comm_parent_rank = group_list[parent_rank]; - PTPCOLL_VERBOSE(1,("Sending data to %d ",comm_parent_rank)); - - rc = MCA_PML_CALL(isend(data_buffer, pack_len, MPI_BYTE, - comm_parent_rank, - tag, MCA_PML_BASE_SEND_STANDARD, comm, send_request)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - } - - if (0 == mca_bcol_ptpcoll_test_for_match(send_request, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - /* Data has not been sent. Return that the collective has been stated - * because we MUST call test on this request once it is finished to - * ensure that it is properly freed. */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - -static int bcol_ptpcoll_reduce_narray(bcol_function_args_t *input_args, - struct mca_bcol_base_function_t *const_args) -{ - mca_bcol_ptpcoll_module_t *ptpcoll_module = (mca_bcol_ptpcoll_module_t *)const_args->bcol_module; - - int tag; - int rc; - int group_size = ptpcoll_module->group_size; - int *group_list = ptpcoll_module->super.sbgp_partner_module->group_list; - uint32_t buffer_index = input_args->buffer_index; - - struct ompi_op_t *op = input_args->op; - ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm; - ompi_request_t **recv_requests = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[1]; - ompi_request_t **send_request = - &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests[0]; - - void *data_buffer = NULL; - void *src_buffer = (void *) ( - (unsigned char *)input_args->sbuf + - (size_t)input_args->sbuf_offset); - void *recv_buffer = (void *) ( - (unsigned char *)input_args->rbuf + - (size_t)input_args->rbuf_offset); - int count = input_args->count; - struct ompi_datatype_t *dtype = input_args->dtype; - int pack_len = input_args->count * input_args->dtype->super.size; - int *active_requests = - &(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests); - int matched = true; - int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index; - int group_root_index = -1; - int relative_group_index = 0; - netpatterns_tree_node_t *narray_node = NULL; - int parent_rank = -1, comm_parent_rank = -1; - - - /* This is first function call that should be called, not progress. - * The fragmentation code does this, so switch from progress to here. - * The flag indicates whether, we have entered this code * - */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].reduce_init_called = true; - - PTPCOLL_VERBOSE(1, ("Reduce, Narray tree")); - /* reset active request counter */ - (*active_requests) = 0; - /* keep tag within the limit support by the pml */ - tag = (PTPCOLL_TAG_OFFSET + input_args->sequence_num * PTPCOLL_TAG_FACTOR) & (ptpcoll_module->tag_mask); - /* mark this as a collective tag, to avoid conflict with user-level flags */ - tag = -tag; - - PTPCOLL_VERBOSE(1, ("bcol_ptpcoll_reduce_narray, buffer index: %d " - "tag: %d " - "tag_mask: %d " - "sn: %d " - "root: %d " - "buff: %p ", - buffer_index, tag, - ptpcoll_module->tag_mask, input_args->sequence_num, - input_args->root_flag, - src_buffer)); - - /* Compute Root Index Shift */ - group_root_index = input_args->root; - relative_group_index = my_group_index - group_root_index; - if (relative_group_index < 0) { - relative_group_index += group_size; - } - - narray_node = &ptpcoll_module->narray_node[relative_group_index]; - - if (0 == narray_node->n_children) { - PTPCOLL_VERBOSE(10, ("I'm leaf of the data")); - /* - * I'm root of the operation - * send data to N childrens - */ - data_buffer = src_buffer; - goto NARRAY_SEND_DATA; - } - - /* Not leaf, either an internal node or root */ - NARRAY_RECV_NB(narray_node, group_root_index, group_size, - recv_buffer, pack_len, tag, comm, recv_requests, - active_requests); - - - /* We have not done reduction, yet */ - ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].reduction_status = 0; - - /* We can not block. So run couple of test for data arrival */ - matched = mca_bcol_ptpcoll_test_all_for_match - (active_requests, recv_requests, &rc); - - /* Check if received the data */ - if(matched) { - - narray_reduce(src_buffer, recv_buffer, narray_node->n_children, - count, dtype, op, &ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].reduction_status); - PTPCOLL_VERBOSE(1, ("Reduce, received data from all childrend ")); - data_buffer = recv_buffer; - - } else { - - PTPCOLL_VERBOSE(1, ("reduce root is started")); - return BCOL_FN_STARTED; - } - - /* I'm root, I'm done */ - if (input_args->root_flag) { - return BCOL_FN_COMPLETE; - } - - -NARRAY_SEND_DATA: - - /* - * Send the data (reduce in case of internal nodes, or just data in - * case of leaf nodes) to the parent - */ - narray_node = &ptpcoll_module->narray_node[relative_group_index]; - - parent_rank = - ptpcoll_module->narray_node[relative_group_index].parent_rank + - group_root_index; - if (parent_rank >= group_size) { - parent_rank -= group_size; - } - - comm_parent_rank = group_list[parent_rank]; - PTPCOLL_VERBOSE(1,("Sending data to %d ",comm_parent_rank)); - - rc = MCA_PML_CALL(isend(data_buffer, pack_len, MPI_BYTE, - comm_parent_rank, - tag, MCA_PML_BASE_SEND_STANDARD, comm, send_request)); - if( OMPI_SUCCESS != rc ) { - PTPCOLL_VERBOSE(10, ("Failed to send data")); - return OMPI_ERROR; - } - - /* We can not block. So run couple of test for data arrival */ - if (0 == mca_bcol_ptpcoll_test_for_match(send_request, &rc)) { - PTPCOLL_VERBOSE(10, ("Test was not matched - %d", rc)); - /* No data was received, return no match error */ - return (OMPI_SUCCESS != rc) ? rc : BCOL_FN_STARTED; - } - - return BCOL_FN_COMPLETE; -} - - -int bcol_ptpcoll_reduce_init(mca_bcol_base_module_t *super) -{ - mca_bcol_base_coll_fn_comm_attributes_t comm_attribs; - mca_bcol_base_coll_fn_invoke_attributes_t inv_attribs; - - PTPCOLL_VERBOSE(1,("Initialization Reduce - Narray")); - comm_attribs.bcoll_type = BCOL_REDUCE; - comm_attribs.comm_size_min = 0; - comm_attribs.comm_size_max = 1024 * 1024; - comm_attribs.waiting_semantics = NON_BLOCKING; - - inv_attribs.bcol_msg_min = 0; - inv_attribs.bcol_msg_max = 20000; /* range 1 */ - - inv_attribs.datatype_bitmap = 0xffffffff; - inv_attribs.op_types_bitmap = 0xffffffff; - - - comm_attribs.data_src = DATA_SRC_KNOWN; - mca_bcol_base_set_attributes(super, &comm_attribs, &inv_attribs, - bcol_ptpcoll_reduce_narray, - bcol_ptpcoll_reduce_narray_progress); - - comm_attribs.data_src = DATA_SRC_KNOWN; - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.h b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.h deleted file mode 100644 index 195ce7fad93..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_reduce.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_PTPCOLL_REDUCE_H -#define MCA_BCOL_PTPCOLL_REDUCE_H - -#include "ompi_config.h" -#include "bcol_ptpcoll.h" -#include "bcol_ptpcoll_utils.h" - -BEGIN_C_DECLS - -int bcol_ptpcoll_reduce_init(mca_bcol_base_module_t *super); - -int bcol_ptpcoll_reduce_init(mca_bcol_base_module_t *super); - -#endif /* MCA_BCOL_PTPCOLL_REDUCE_H */ diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.c b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.c deleted file mode 100644 index 6fc2fa8ab76..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -#include "ompi_config.h" - -#include "bcol_ptpcoll.h" -#include "bcol_ptpcoll_utils.h" - -/* - * Return closet power of K, for the number, and the number - */ -int pow_k_calc(int k, int number, int *out_number) -{ - int power = 0; - int n = 1; - - while (n < number) { - n *= k; - ++power; - } - - if (n > number) { - n /= k; - --power; - } - if (NULL != out_number) { - *out_number = n; - } - - return power; -} - -/* - * Communicator rank to group index conversion function for K-nomial tree. - * Complexity: (K-1) Log _base_K N - * - * Input: - * my_group_index - my process index in the group - * comm_source - the communicator rank of the source of data - * radix - radix of K-nomial tree - * group_size - the size of my group - * group_array[] - one to one map from group index to communicator rank - * - * Output: - * Group index for comm_source. - */ - -int get_group_index_and_distance_for_binomial(int my_group_index, int comm_source, - int group_size, int *group_array, int *pow_distance) -{ - int group_index; - int i; - *pow_distance = 0; - - for (i = 1; i < group_size; i<<=1, (*pow_distance)++) { - group_index = my_group_index ^ i; - if (comm_source == group_array[group_index]) { - return group_index; - } - } - - *pow_distance = -1; - return -1; -} - -int get_group_index_and_distance_for_k_nomial(int my_group_index, int comm_source, int radix, - int group_size, int *group_array, int *pow_distance) -{ - int group_index; - int offset = 1; /* offset equal to 1 (radix_power) */ - int radix_power = 1; /* radix power 0 */ - *pow_distance = 0; - - /* - * Go trough range of possible offsets from my rank, - * for each offset we calculate k-nomial tree root. - */ - while(offset < group_size) { - /* K-nomial tree root calculation for the offset */ - if (offset % (radix * radix_power)) { - group_index = my_group_index - offset; - /* wrap around if the group is negative */ - if (group_index < 0) { - group_index += group_size; - } - PTPCOLL_VERBOSE(10, ("Checking %d", group_index)); - if (comm_source == group_array[group_index]) { - return group_index; - } - offset += radix_power; - } else { - /* we done with the section of the tree, go to next one */ - radix_power *= radix; - (*pow_distance)++; - } - } - - /* No source was found, return -1 */ - *pow_distance = -1; - return -1; -} - -int get_group_index_for_k_nomial(int my_group_index, int comm_source, int radix, int group_size, int *group_array) -{ - int group_index; - int radix_power = 1; /* radix power 0 */ - int offset = 1; /* offset equal to 1 (radix_power) */ - - /* - * Go trough range of possible offsets from my rank, - * for each offset we calculate k-nomial tree root. - */ - while(offset < group_size) { - /* K-nomial tree root calculation for the offset */ - if (offset % (radix * radix_power)) { - group_index = my_group_index - offset; - /* wrap around if the group is negative */ - if (group_index < 0) { - group_index += group_size; - } - if (comm_source == group_array[group_index]) { - return group_index; - } - offset += radix_power; - } else { - /* we done with the section of the tree, go to next one */ - radix_power *= radix; - } - } - - /* No source was found, return -1 */ - return -1; -} diff --git a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.h b/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.h deleted file mode 100644 index e5cffe0fb4c..00000000000 --- a/ompi/mca/bcol/ptpcoll/bcol_ptpcoll_utils.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_PTPCOLL_UTILS_H -#define MCA_BCOL_PTPCOLL_UTILS_H - -#include "ompi_config.h" - -#include "ompi/mca/rte/rte.h" - -BEGIN_C_DECLS - -/* - * Return closet power of K, for the number - */ -int pow_k_calc(int k, int number, int *out_number); - -/* - * Communicator rank to group index conversion function for K-nomial tree. - */ -int get_group_index_for_k_nomial(int my_group_index, int comm_source, int radix, int group_size, int *group_array); - -/* the same like above, just more information on return */ -int get_group_index_and_distance_for_k_nomial(int my_group_index, int comm_source, int radix, - int group_size, int *group_array, int *pow_distance); - -int get_group_index_and_distance_for_binomial(int my_group_index, int comm_source, - int group_size, int *group_array, int *pow_distance); -/* - * Error and debug Macros/Functions - */ -static inline int mca_bcol_ptpcoll_err(const char* fmt, ...) -{ - va_list list; - int ret; - - va_start(list, fmt); - ret = vfprintf(stderr, fmt, list); - va_end(list); - return ret; -} - -#define PTPCOLL_ERROR(args) \ - do { \ - mca_bcol_ptpcoll_err("[%s]%s[%s:%d:%s] PTPCOLL ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_bcol_ptpcoll_err args; \ - mca_bcol_ptpcoll_err("\n"); \ - } while(0) - -#if OPAL_ENABLE_DEBUG -#define PTPCOLL_VERBOSE(level, args) \ - do { \ - if (mca_bcol_ptpcoll_component.verbose >= level) { \ - mca_bcol_ptpcoll_err("[%s]%s[%s:%d:%s] PTPCOLL ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_bcol_ptpcoll_err args; \ - mca_bcol_ptpcoll_err("\n"); \ - } \ - } while(0) -#else -#define PTPCOLL_VERBOSE(level, args) -#endif - -END_C_DECLS - -#endif diff --git a/ompi/mca/bcol/ptpcoll/owner.txt b/ompi/mca/bcol/ptpcoll/owner.txt deleted file mode 100644 index 51ea04a5175..00000000000 --- a/ompi/mca/bcol/ptpcoll/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ORNL? -status: unmaintained diff --git a/ompi/mca/coll/hierarch/owner.txt b/ompi/mca/coll/hierarch/owner.txt deleted file mode 100644 index 0cba68ac764..00000000000 --- a/ompi/mca/coll/hierarch/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: UH -status: unmaintained diff --git a/ompi/mca/coll/ml/.opal_ignore b/ompi/mca/coll/ml/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ompi/mca/coll/ml/Makefile.am b/ompi/mca/coll/ml/Makefile.am deleted file mode 100644 index 0cf8a840df1..00000000000 --- a/ompi/mca/coll/ml/Makefile.am +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights -# reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -AM_LFLAGS = -Pcoll_ml_config_yy -LEX_OUTPUT_ROOT = lex.coll_ml_config_yy - -dist_ompidata_DATA = \ - mca-coll-ml.config \ - help-mpi-coll-ml.txt - -sources = coll_ml.h \ - coll_ml_inlines.h \ - coll_ml_module.c \ - coll_ml_allocation.h \ - coll_ml_allocation.c \ - coll_ml_barrier.c \ - coll_ml_bcast.c \ - coll_ml_colls.h \ - coll_ml_component.c \ - coll_ml_copy_fns.c \ - coll_ml_descriptors.c \ - coll_ml_functions.h \ - coll_ml_hier_algorithms.c \ - coll_ml_hier_algorithms_setup.c \ - coll_ml_hier_algorithms_bcast_setup.c \ - coll_ml_hier_algorithms_allreduce_setup.c \ - coll_ml_hier_algorithms_reduce_setup.c \ - coll_ml_hier_algorithms_common_setup.c \ - coll_ml_hier_algorithms_common_setup.h \ - coll_ml_hier_algorithms_allgather_setup.c \ - coll_ml_hier_algorithm_memsync_setup.c \ - coll_ml_custom_utils.h \ - coll_ml_custom_utils.c \ - coll_ml_progress.c \ - coll_ml_reduce.c \ - coll_ml_allreduce.c \ - coll_ml_allgather.c \ - coll_ml_mca.h \ - coll_ml_mca.c \ - coll_ml_lmngr.h \ - coll_ml_lmngr.c \ - coll_ml_hier_algorithms_barrier_setup.c \ - coll_ml_select.h \ - coll_ml_select.c \ - coll_ml_memsync.c \ - coll_ml_lex.h \ - coll_ml_lex.l \ - coll_ml_config.c \ - coll_ml_config.h - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_coll_ml_DSO -component_install += mca_coll_ml.la -else -component_noinst += libmca_coll_ml.la -endif - -# See ompi/mca/btl/ml/Makefile.am for an explanation of -# libmca_common_ml.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_coll_ml_la_SOURCES = $(sources) -mca_coll_ml_la_LDFLAGS = -module -avoid-version -mca_coll_ml_la_LIBADD = - - -noinst_LTLIBRARIES = $(component_noinst) -libmca_coll_ml_la_SOURCES =$(sources) -libmca_coll_ml_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/coll/ml/coll_ml.h b/ompi/mca/coll/ml/coll_ml.h deleted file mode 100644 index e6b6f092f84..00000000000 --- a/ompi/mca/coll/ml/coll_ml.h +++ /dev/null @@ -1,1022 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#ifndef MCA_COLL_ML_ML_H -#define MCA_COLL_ML_ML_H - -#include "ompi_config.h" - -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/datatype/opal_convertor.h" -#include "opal/threads/mutex.h" - -#include "ompi/mca/coll/coll.h" -#include "ompi/request/request.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/op/op.h" -#include "opal/class/opal_free_list.h" - -#include "coll_ml_lmngr.h" -#include "coll_ml_functions.h" -#include "coll_ml_colls.h" -#include "coll_ml_allocation.h" -#include "coll_ml_config.h" - -BEGIN_C_DECLS - -/* macros for return status */ -enum { - ML_OMPI_COMPLETE = 1, - ML_OMPI_INCOMPLETE -}; - -enum { - ML_SMALL_MSG, - ML_LARGE_MSG, - ML_NUM_MSG -}; - -/* ML collectives IDs */ -enum { - /* blocking functions */ - ML_ALLGATHER, - ML_ALLGATHERV, - ML_ALLREDUCE, - ML_ALLTOALL, - ML_ALLTOALLV, - ML_ALLTOALLW, - ML_BARRIER, - ML_BCAST, - ML_EXSCAN, - ML_GATHER, - ML_GATHERV, - ML_REDUCE, - ML_REDUCE_SCATTER, - ML_SCAN, - ML_SCATTER, - ML_SCATTERV, - ML_FANIN, - ML_FANOUT, - - /* nonblocking functions */ - ML_IALLGATHER, - ML_IALLGATHERV, - ML_IALLREDUCE, - ML_IALLTOALL, - ML_IALLTOALLV, - ML_IALLTOALLW, - ML_IBARRIER, - ML_IBCAST, - ML_IEXSCAN, - ML_IGATHER, - ML_IGATHERV, - ML_IREDUCE, - ML_IREDUCE_SCATTER, - ML_ISCAN, - ML_ISCATTER, - ML_ISCATTERV, - ML_IFANIN, - ML_IFANOUT, - ML_NUM_OF_FUNCTIONS -}; - -/* ML broadcast algorithms */ -enum { - COLL_ML_STATIC_BCAST, - COLL_ML_SEQ_BCAST, - COLL_ML_UNKNOWN_BCAST, -}; - -struct mca_bcol_base_module_t; - -/* collective function arguments - gives - * one function signature for calling all collective setup - * routines, with the initial call to a collective function having - * the context to access the right parts of the data structure. - * this information is used by each of the setup functions to - * setup the correct information for each of the functions in the - * hierarchy that will be called. */ - -/* RLG NOTE: Need to figure out what arguments to store here, - * and which ones directly in the message descriptor - */ -struct mpi_coll_fn_params_t { - union { - struct { - ompi_communicator_t *comm; - int n_fanin_steps; - int n_fanout_steps; - int n_recursive_doubling_steps; - } ibarrier_recursive_doubling; - - struct { - int root; - ompi_communicator_t *comm; - struct ompi_datatype_t *datatype; - } ibcast; - } coll_fn; -}; -typedef struct mpi_coll_fn_params_t mpi_coll_fn_params_t; - -/* algorithm parmeters needed for the setup function */ -struct mpi_coll_algorithm_params_t { - union { - struct { - int n_fanin_steps; - int n_fanout_steps; - int n_recursive_doubling_steps; - } ibarrier_recursive_doubling; - - struct { - int place_holder; - } ibcast; - } coll_fn; -}; -typedef struct mpi_coll_algorithm_params_t mpi_coll_algorithm_params_t; - -/* setup function - used to setup each segment (or fragment) - * to be processed - */ -struct mca_coll_ml_module_t; -struct mca_coll_ml_topology_t; - -typedef int (*coll_fragment_comm_setup_fn)(struct mca_coll_ml_module_t *ml_module, - mpi_coll_fn_params_t *fn_params, mpi_coll_algorithm_params_t *algorithm_params); -/* full collective description */ -struct coll_ml_collective_description_t { - /* number of temp buffers */ - int n_buffers; - - /* description size */ - int n_functions; - - /* collective setup function - called for every non-blocking - * function, and for each fragment of such a message - */ - coll_fragment_comm_setup_fn *coll_fn_setup_fn; - - /* algorithm parameters */ - mpi_coll_algorithm_params_t alg_params; - - /* list of functions */ - mca_bcol_base_function_t *functions; - - /* function names - for debugging */ - char **function_names; - - /* Signalling collective completion */ - bool completion_flag; -}; - -typedef struct coll_ml_collective_description_t coll_ml_collective_description_t; - -/* Utility data structure */ -struct rank_properties_t { - int rank; - int leaf; - int num_of_ranks_represented; -}; typedef struct rank_properties_t rank_properties_t; - -/* data structure for holding node information for the nodes of the - * hierarchical communications tree. - */ -struct sub_group_params_t { - /* rank of root in the communicator */ - int root_rank_in_comm; - - /* index in subgroup */ - int root_index; - - /* number of ranks in subgroup */ - int n_ranks; - - /* index of the first element in the subgroup. The - * assumption is that - * ranks for all subgroups are stored in a single - * linear array - */ - int index_of_first_element; - - /* - * level in the hierarchy - subgroups at the same - * level don't overlap. May not be the same as the - * sbgp level. - */ - int level_in_hierarchy; - - /* - * Information on the ranks in the subgroup. This includes - * the rank, and wether or not the rank is a source/sink of - * of data in this subgroup, or just a "pass through". - */ - rank_properties_t *rank_data; - - /* level one index - for example, - for( i = 0; i < level_one_index; i++) will loop - through all level one subgroups, this is significant - since level one is a disjoint partitioning of all ranks - i.e. all ranks appear once and only once at level one - */ - int level_one_index; -}; -typedef struct sub_group_params_t sub_group_params_t; - -/* function to setup information on the order of a given bcol within - * a specific ML-level algorithm. - */ -int mca_coll_ml_setup_scratch_vals(mca_coll_ml_compound_functions_t *func_list, - int *scratch_indx, int *scratch_num, int n_hiers); - -/* driver for setting up collective communication description */ - -int ml_coll_schedule_setup(struct mca_coll_ml_module_t *ml_module); - -int ml_coll_up_and_down_hier_setup( - struct mca_coll_ml_module_t *ml_module, - struct mca_coll_ml_topology_t *topo_info, - int up_function_idx, - int top_function_idx, - int down_function_idx, - int collective); - -int ml_coll_barrier_constant_group_data_setup( - struct mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t *schedule); - -/* Barrier */ -int ml_coll_hier_barrier_setup(struct mca_coll_ml_module_t *ml_module); - -/* allreduce */ -int ml_coll_hier_allreduce_setup(struct mca_coll_ml_module_t *ml_module); -int ml_coll_hier_allreduce_setup_new(struct mca_coll_ml_module_t *ml_module); -void ml_coll_hier_allreduce_cleanup_new(struct mca_coll_ml_module_t *ml_module); - -/* alltoall */ -int ml_coll_hier_alltoall_setup(struct mca_coll_ml_module_t *ml_module); -int ml_coll_hier_alltoall_setup_new(struct mca_coll_ml_module_t *ml_module); - -/* allgather */ -int ml_coll_hier_allgather_setup(struct mca_coll_ml_module_t *ml_module); -void ml_coll_hier_allgather_cleanup(struct mca_coll_ml_module_t *ml_module); - -/* gather */ -int ml_coll_hier_gather_setup(struct mca_coll_ml_module_t *ml_module); - -/* broadcast */ -int ml_coll_hier_bcast_setup(struct mca_coll_ml_module_t *ml_module); -void ml_coll_hier_bcast_cleanup(struct mca_coll_ml_module_t *ml_module); - -/* reduce */ -int ml_coll_hier_reduce_setup(struct mca_coll_ml_module_t *ml_module); -void ml_coll_hier_reduce_cleanup(struct mca_coll_ml_module_t *ml_module); - -/* reduce */ -int ml_coll_hier_scatter_setup(struct mca_coll_ml_module_t *ml_module); - -/* alltoall */ -int mca_coll_ml_alltoall(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -int mca_coll_ml_alltoall_nb(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - - -/* allgather */ -int mca_coll_ml_allgather(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -/* non-blocking allgather */ -int mca_coll_ml_allgather_nb(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - -/* gather */ -int mca_coll_ml_gather(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - int root, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -/* nonblocking Barrier */ -int ml_coll_hier_nonblocking_barrier_setup(struct mca_coll_ml_module_t *ml_module, struct mca_coll_ml_topology_t *topo_info); - -/* Memory syncronization collective setup */ -int ml_coll_memsync_setup(struct mca_coll_ml_module_t *ml_module); - -/* Fragment descriptor */ -struct mca_coll_ml_descriptor_t; -struct mca_coll_ml_fragment_t { - opal_list_item_t super; - - struct mca_coll_ml_descriptor_t *full_msg_descriptor; - int offset; /*offset for progress pointer*/ - int length; /*fragment length I assume*/ - opal_convertor_t convertor; /*convertor for copy/pack data*/ - - /* current function index */ - int current_fn_index; - - /* array of function arguments */ - struct bcol_function_args_t *fn_args; - -}; -typedef struct mca_coll_ml_fragment_t mca_coll_ml_fragment_t; -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_ml_fragment_t); - -#define MCA_COLL_ML_NO_BUFFER -1 - -#define MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, index, desc) \ -do { \ - (coll_op)->variable_fn_params.buffer_index = index; \ - (coll_op)->fragment_data.buffer_desc = desc; \ - /* pasha - why we duplicate it ? */ \ - (coll_op)->variable_fn_params.src_desc = desc; \ - (coll_op)->variable_fn_params.hier_factor = 1; \ - (coll_op)->variable_fn_params.need_dt_support = false; \ -} while (0) - -/*Full message descriptor*/ -struct mca_coll_ml_descriptor_t { - ompi_request_t super; /*base request*/ - struct ompi_datatype_t *datatype; /*ompi datatype*/ - size_t count; /*count of user datatype elements*/ - uint32_t sequence_num; /*sequence number for collective operation*/ - size_t frags_limit; /*upper limit on # of fragments*/ - size_t frags_start; /*number of fragments started*/ - - /*number of fragments completed*/ - size_t frags_complete; - - /* number of fragments needed to process this message */ - size_t n_fragments; - - volatile bool free_resource; /*signals release resource*/ - - /*pointer to reduction operation, e.g. MPI_MIN - need to handle - * user defined functions also */ - /* ompi_predefined_op_t *operation; */ - - /*pointer to a communication schedule, data struct undefined*/ - struct coll_ml_collective_description_t *local_comm_description; - - /* fragment descriptor - we always have a fragment descriptor - * if we get a full message descriptor. Optimization for - * small messages */ - mca_coll_ml_fragment_t fragment; - /* The ML memory buffer index that should consist the send and - recv information - if the index is -1, it means no buffer was allocated */ - uint64_t buffer_index; -}; -typedef struct mca_coll_ml_descriptor_t mca_coll_ml_descriptor_t; -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_ml_descriptor_t); - -/* sbgp and bcol module pairs */ -struct hierarchy_pairs { - mca_sbgp_base_module_t *subgroup_module; - struct mca_bcol_base_module_t **bcol_modules; - int num_bcol_modules; - int bcol_index; - mca_bcol_base_component_t *bcol_component; -}; -typedef struct hierarchy_pairs hierarchy_pairs; - -/* list of ranks in each group */ -struct ml_level_t { - int n_modules; - hierarchy_pairs *modules; -}; - -typedef struct ml_level_t ml_level_t; - -enum { - COLL_ML_HR_FULL, /* Full hierarchy topology, all bcols and sbgps attends in discovery */ - COLL_ML_HR_ALLREDUCE, - COLL_ML_HR_NBS, /* All hierarchy except base socket */ - COLL_ML_HR_SINGLE_PTP, /* Single flat ptp hierarchy */ - COLL_ML_HR_SINGLE_IBOFFLOAD, /* Single flat iboffload hierarchy */ - COLL_ML_TOPO_MAX -}; - -/* Topology-hierarchy discovery function */ -struct mca_coll_ml_module_t; /* forward declaration for the function */ - -typedef int (* mca_coll_topo_discovery_fn_t) - (struct mca_coll_ml_module_t *ml_module, int n_hierarchies); - -typedef enum { - COLL_ML_TOPO_DISABLED = 0, - COLL_ML_TOPO_ENABLED = 1 -} topo_status_t; - -/** - * Structure to hold the sm coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ -struct mca_coll_ml_component_t { - /** Base coll component */ - mca_coll_base_component_2_0_0_t super; - - /** MCA parameter: Priority of this component */ - int ml_priority; - - /** MCA parameter: subgrouping components to use */ - char *subgroups_string; - - /** MCA parameter: basic collectives components to use */ - char *bcols_string; - - /** verbosity level */ - int verbose; - - /** max of communicators available to run ML */ - unsigned int max_comm; - - /** min size of comm to be available to run ML */ - int min_comm_size; - - /* base sequence number to use - the expectation is that - * this will be used as a basis for generating IDs for - * specific collective operations - */ - int64_t base_sequence_number; - - /** memory pool */ - mca_coll_ml_lmngr_t memory_manager; - - /* We need it because some bcols cannot - support all possible allreduce data types */ - bool need_allreduce_support; - - int use_knomial_allreduce; - - /* use hdl_framework */ - bool use_hdl_bcast; - - /* Enable / Disable fragmentation (0 - off, 1 - on, 2 - auto) */ - int enable_fragmentation; - - /* Broadcast algorithm */ - int bcast_algorithm; - - /* frag size that is used by list memory_manager */ - size_t lmngr_block_size; - - /* alignment that is used by list memory_manager */ - size_t lmngr_alignment; - - /* list size for memory_manager */ - size_t lmngr_size; - - /* number of payload memory banks */ - int n_payload_mem_banks; - - /* number of payload buffers per bank */ - int n_payload_buffs_per_bank; - - /* size of payload buffer */ - unsigned long long payload_buffer_size; - - /* pipeline depth for msg fragmentation */ - int pipeline_depth; - - /* Free list tunings */ - int free_list_init_size; - - int free_list_grow_size; - - int free_list_max_size; - - /* - * queues for asynchronous collective progress - */ - /* tasks that have not started, either because dependencies are not - * statisfied, or resources are lacking - */ - opal_list_t pending_tasks; - opal_mutex_t pending_tasks_mutex; - - /* active incomplete tasks */ - opal_list_t active_tasks; - opal_mutex_t active_tasks_mutex; - - /* sequential collectives to progress */ - opal_list_t sequential_collectives; - opal_mutex_t sequential_collectives_mutex; - - bool progress_is_busy; - - /* Temporary hack for IMB test - not all bcols have allgather */ - bool disable_allgather; - - /* Temporary hack for IMB test - not all bcols have alltoall */ - bool disable_alltoall; - - /* Disable Reduce */ - bool disable_reduce; - - /* Brucks alltoall mca and other params */ - int use_brucks_smsg_alltoall; - - mca_coll_topo_discovery_fn_t topo_discovery_fn[COLL_ML_TOPO_MAX]; - - /* Configure file for collectives */ - char *config_file_name; - - per_collective_configuration_t coll_config[ML_NUM_OF_FUNCTIONS][ML_NUM_MSG]; -}; - -/** - * Convenience typedef - */ -typedef struct mca_coll_ml_component_t mca_coll_ml_component_t; - -/** - * Global component instance - */ -OMPI_MODULE_DECLSPEC extern mca_coll_ml_component_t mca_coll_ml_component; - -struct mca_coll_ml_leader_offset_info_t { - size_t offset; - int level_one_index; - bool leader; -}; -typedef struct mca_coll_ml_leader_offset_info_t mca_coll_ml_leader_offset_info_t; - -/* Topolody data structure */ -struct mca_coll_ml_topology_t { - topo_status_t status; /* 0 - enabled , 1 - disabled */ - /* information on the selected groups - needed for collective - ** algorithms */ - int32_t global_lowest_hier_group_index; - int32_t global_highest_hier_group_index; - int number_of_all_subgroups; - int n_levels; - /* bcols bits that describe supported features/modes */ - uint64_t all_bcols_mode; - mca_bcol_base_route_info_t *route_vector; - coll_ml_collective_description_t *hierarchical_algorithms[BCOL_NUM_OF_FUNCTIONS]; - sub_group_params_t *array_of_all_subgroups; - /* (sbgp, bcol) pairs */ - hierarchy_pairs *component_pairs; - /* ordering of ranks when I am the root of the operation. - * This ordering guarantees that data need to be re-ordered - * only at the first or last step in rooted operations, - * depending on whether the opearation is a scatter or - * gather operation. - */ - int *sort_list; - mca_coll_ml_leader_offset_info_t *hier_layout_info; - /* are ranks laid out contiguously */ - bool ranks_contiguous; - struct ordering_info_t { - int next_inorder; - int next_order_num; - int num_bcols_need_ordering; - } topo_ordering_info; -}; -typedef struct mca_coll_ml_topology_t mca_coll_ml_topology_t; - -struct mca_coll_ml_bcol_list_item_t { - opal_list_item_t super; - mca_bcol_base_module_t *bcol_module; -}; -typedef struct mca_coll_ml_bcol_list_item_t mca_coll_ml_bcol_list_item_t; -OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_ml_bcol_list_item_t); - -#define MCA_COLL_MAX_NUM_COLLECTIVES 40 /* ... I do not remember how much exactly collectives do we have */ -#define MCA_COLL_MAX_NUM_SUBTYPES 15 /* Maximum number of algorithms per collective */ - -struct mca_coll_ml_module_t { - /* base structure */ - mca_coll_base_module_t super; - - /* ML module status - 0 was not initialized, 1 - was initialized */ - bool initialized; - /* communicator */ - struct ompi_communicator_t *comm; - - /* reference convertor */ - opal_convertor_t *reference_convertor; - - mca_coll_ml_topology_t topo_list[COLL_ML_TOPO_MAX]; - - /* Collectives - Topology map */ - int collectives_topology_map - [MCA_COLL_MAX_NUM_COLLECTIVES][MCA_COLL_MAX_NUM_SUBTYPES]; - - /* largest number of function calls for the collective routines. - * This is used to allocate resources */ - int max_fn_calls; - - /* collective sequence number - unique id for barrier type operations */ - int32_t no_data_collective_sequence_num; - - /* collective sequence number - unique id for each collective */ - int32_t collective_sequence_num; - - /** ompi free list of full message descriptors **/ - opal_free_list_t message_descriptors; - - /** ompi free list of message fragment descriptors **/ - opal_free_list_t fragment_descriptors; - - /** pointer to the payload memory block **/ - struct mca_bcol_base_memory_block_desc_t *payload_block; - - /** the maximum size of collective function description */ - int max_dag_size; - - /** data used to initialize coll_ml_collective_descriptors */ - struct coll_desc_init { - int max_dag_size; - size_t max_n_bytes_per_proc_total; - mca_coll_base_module_t *bcol_base_module; - } coll_desc_init_data; - - /** collective operation descriptor free list - used to manage a single - * collective operation. */ - opal_free_list_t coll_ml_collective_descriptors; - - /** multiple function collective operation support */ - /** broadcast */ - mca_coll_ml_collective_operation_description_t * - coll_ml_bcast_functions[ML_NUM_BCAST_FUNCTIONS]; - - /* bcast size selection criteria - cutoff for the largest size of - * data for which to apply the specified collective operation. - * This gives us the ability to choose algorithm based on size */ - size_t bcast_cutoff_size[ML_N_DATASIZE_BINS]; - - /** Allreduce functions */ - mca_coll_ml_collective_operation_description_t * - coll_ml_allreduce_functions[ML_NUM_ALLREDUCE_FUNCTIONS]; - - /** Reduce functions */ - mca_coll_ml_collective_operation_description_t * - coll_ml_reduce_functions[ML_NUM_REDUCE_FUNCTIONS]; - - - /** scatter */ - mca_coll_ml_collective_operation_description_t * - coll_ml_scatter_functions[ML_NUM_SCATTER_FUNCTIONS]; - - /** alltoall */ - mca_coll_ml_collective_operation_description_t * - coll_ml_alltoall_functions[ML_NUM_ALLTOALL_FUNCTIONS]; - - /** allgather */ - mca_coll_ml_collective_operation_description_t * - coll_ml_allgather_functions[ML_NUM_ALLGATHER_FUNCTIONS]; - - /** gather */ - mca_coll_ml_collective_operation_description_t * - coll_ml_gather_functions[ML_NUM_GATHER_FUNCTIONS]; - - /** Barrier */ - mca_coll_ml_collective_operation_description_t * - coll_ml_barrier_function; - - /** ML Memory Syncronization collective operation */ - mca_coll_ml_collective_operation_description_t * - coll_ml_memsync_function; - - /** The table of allreduce functions for specific type and op **/ - bool allreduce_matrix[OMPI_OP_NUM_OF_TYPES][OMPI_DATATYPE_MAX_PREDEFINED][BCOL_NUM_OF_ELEM_TYPES]; - - /* data offset from ML */ - int32_t data_offset; - - int small_message_thresholds[BCOL_NUM_OF_FUNCTIONS]; - - /* fragmenation parameters */ - int use_user_buffers; - uint64_t fragment_size; - uint32_t ml_fragment_size; - - /* Bcast index table. Pasha: Do we need to define something more generic ? - the table x 2 (large/small)*/ - int bcast_fn_index_table[2]; - - /* List of pointer to bcols that have been initilized and used. - * So far we use it only for ML memory management */ - opal_list_t active_bcols_list; - - /* Buffer size required for Bruck's algorithm */ - int brucks_buffer_threshold_const; - - /* log comm size */ - /* We require this for alltoall algorithm */ - int log_comm_size; - /* On this list we keep coll_op descriptors that were not - * be able to start, since no ml buffers were available */ - opal_list_t waiting_for_memory_list; - - /* fallback collectives */ - mca_coll_base_comm_coll_t fallback; -}; - -typedef struct mca_coll_ml_module_t mca_coll_ml_module_t; -OBJ_CLASS_DECLARATION(mca_coll_ml_module_t); - - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_coll_ml_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - -/* query to see if the module is available for use on the given - * communicator, and if so, what it's priority is. This is where - * the backing shared-memory file is created. - */ -mca_coll_base_module_t * -mca_coll_ml_comm_query(struct ompi_communicator_t *comm, int *priority); - -/* Barrier - blocking */ -int mca_coll_ml_barrier_intra(struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -/* Barrier - non-blocking */ -int mca_coll_ml_ibarrier_intra(struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - -/* Allreduce with EXTRA TOPO using - blocking */ -int mca_coll_ml_allreduce_dispatch(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - -/* Allreduce with EXTRA TOPO using - Non-blocking */ -int mca_coll_ml_allreduce_dispatch_nb(void *sbuf, void *rbuf, int count, - ompi_datatype_t *dtype, ompi_op_t *op, - ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - -/* Allreduce - blocking */ -int mca_coll_ml_allreduce(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -/* Allreduce - Non-blocking */ -int mca_coll_ml_allreduce_nb(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - -/* Reduce - Blocking */ -int mca_coll_ml_reduce(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -int mca_coll_ml_reduce_nb(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - -int mca_coll_ml_memsync_intra(mca_coll_ml_module_t *module, int bank_index); - - -int coll_ml_progress_individual_message(mca_coll_ml_fragment_t *frag_descriptor); - -/* - * the ml entry point for the broadcast function - */ -int mca_coll_ml_parallel_bcast(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); -int mca_coll_ml_parallel_bcast_nb(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); -int mca_coll_ml_bcast_sequential_root(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -/* - * The ml function interface for non-blocking routines - */ -int mca_coll_ml_bcast_unknown_root_nb(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); - -int mca_coll_ml_bcast_known_root_nb(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module); -OMPI_DECLSPEC int mca_coll_ml_bcast_unknown_root_with_frags_nb(void *buf, int count, - struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, mca_coll_base_module_t *module); - -/* This routine sets up a sequential hierarchical scatter algorithm. The - * assumptions are that each rank knows in which sub-group that data will show - * up first, and that the scatter is executed sequentially, one subgroup at a - * time. This is needed, when the full collective needs to be specified before - * the collective operation starts up. The algorithm handles all data sizes - * and data types. - */ - -OMPI_DECLSPEC int mca_coll_ml_scatter_sequential( - void *sbuf, int scount, struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, struct ompi_datatype_t *rdtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); - -#if 0 -int mca_coll_ml_bcast_small_dynamic_root(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); -int mca_coll_ml_bcast_small_known_root(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module); -#endif - -/* Topology discovery function */ - -int mca_coll_ml_fulltree_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies); -int mca_coll_ml_allreduce_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies); -int mca_coll_ml_fulltree_exclude_basesmsocket_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies); -int mca_coll_ml_fulltree_ptp_only_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies); -int mca_coll_ml_fulltree_iboffload_only_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies); - -void mca_coll_ml_allreduce_matrix_init(mca_coll_ml_module_t *ml_module, - const mca_bcol_base_component_2_0_0_t *bcol_component); -static inline int mca_coll_ml_err(const char* fmt, ...) -{ - va_list list; - int ret; - - va_start(list, fmt); - ret = vfprintf(stderr, fmt, list); - va_end(list); - return ret; -} - - -#define ML_ERROR(args) \ -do { \ - mca_coll_ml_err("[%s]%s[%s:%d:%s] COLL-ML ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_coll_ml_err args; \ - mca_coll_ml_err("\n"); \ -} while(0) - -#if OPAL_ENABLE_DEBUG -#define ML_VERBOSE(level, args) \ -do { \ - if(mca_coll_ml_component.verbose >= level) { \ - mca_coll_ml_err("[%s]%s[%s:%d:%s] COLL-ML ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_coll_ml_err args; \ - mca_coll_ml_err("\n"); \ - } \ -} while(0) -#else -#define ML_VERBOSE(level, args) -#endif - -#define IS_BCOL_TYPE_IDENTICAL(bcol1, bcol2) \ - ( (NULL != bcol1 && NULL != bcol2) && \ - ( /* chech if the len is the same */ \ - (strlen(((mca_base_component_t *)((bcol1)->bcol_component))->mca_component_name) == \ - strlen(((mca_base_component_t *)((bcol2)->bcol_component))->mca_component_name)) \ - && /* check if the string are identical */ \ - (0 == strncmp(((mca_base_component_t *)((bcol1)->bcol_component))->mca_component_name, \ - ((mca_base_component_t *)((bcol2)->bcol_component))->mca_component_name, \ - strlen(((mca_base_component_t *)((bcol2)->bcol_component))->mca_component_name))) \ - ) ? true : false) - -#define GET_BCOL(module, indx) ((module)->component_pairs[(indx)].bcol_modules[0]) - -#define GET_BCOL_SYNC_FN(bcol) ((bcol)->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING] \ - [BCOL_SYNC][1][0][0]) - -/* Allocator macros */ -#define BUFFER_INDEX(bank,nbuffs,buffer) (bank*nbuffs+buffer) - -#define ML_GET_FRAG_SIZE(op, coll) \ - ((op)->fragment_data.message_descriptor->n_bytes_total - \ - (op)->fragment_data.message_descriptor->n_bytes_scheduled < \ - (size_t) OP_ML_MODULE((op))->small_message_thresholds[coll] ? \ - (op)->fragment_data.message_descriptor->n_bytes_total - \ - (op)->fragment_data.message_descriptor->n_bytes_scheduled : \ - (size_t) OP_ML_MODULE((op))->small_message_thresholds[coll]) - -/* Abort mpi process in case of fatal error */ -void mca_coll_ml_abort_ml(char *message); - -#define ML_SET_VARIABLE_PARAMS_BCAST(op, ml, cnt, datatype, b_desc, \ - s_offset, r_offset, frag_len, buf) \ -do { \ - op->variable_fn_params.sequence_num = \ - OPAL_THREAD_ADD32(&((ml)->collective_sequence_num), 1); \ - op->variable_fn_params.count = cnt; \ - op->variable_fn_params.dtype = datatype; \ - op->variable_fn_params.buffer_index = (b_desc)->buffer_index; \ - op->variable_fn_params.src_desc = (b_desc); \ - op->variable_fn_params.sbuf_offset = s_offset; \ - op->variable_fn_params.rbuf_offset = r_offset; \ - op->variable_fn_params.frag_size = frag_len; \ - op->variable_fn_params.sbuf = buf; \ -} while (0) - -#define MCA_COLL_ML_OP_BASIC_SETUP(op, total_bytes, offset_into_user_buff, src, dst, collective_schedule) \ - do { \ - op->coll_schedule = collective_schedule; \ - op->process_fn = NULL; \ - op->full_message.n_bytes_total = total_bytes; \ - op->full_message.n_bytes_delivered = 0; \ - op->full_message.n_bytes_scheduled = 0; \ - op->full_message.dest_user_addr = dst; \ - op->full_message.src_user_addr = src; \ - op->full_message.n_active = 0; \ - op->full_message.n_bytes_per_proc_total = 0; \ - op->full_message.send_count = 0; \ - op->full_message.recv_count = 0; \ - op->full_message.send_extent = 0; \ - op->full_message.recv_extent = 0; \ - op->full_message.offset_into_send_buffer = 0; \ - op->full_message.offset_into_recv_buffer = 0; \ - op->full_message.send_data_type = 0; \ - op->full_message.recv_data_type = 0; \ - op->full_message.fragment_launcher = 0; \ - op->sequential_routine.current_active_bcol_fn = 0; \ - op->sequential_routine.current_bcol_status = SEQ_TASK_NOT_STARTED; \ - \ - op->fragment_data.offset_into_user_buffer = offset_into_user_buff; \ - /* Pasha, is it constant ? what to put here */ \ - op->fragment_data.fragment_size = total_bytes; \ - op->fragment_data.message_descriptor = &op->full_message; \ - op->fragment_data.current_coll_op = -1; \ - } while (0) - -/* This routine re-orders and packs user data. The assumption is that - * there is per-process data, the amount of data is the same for all * ranks, - * and the user data is contigous. - */ -int mca_coll_ml_pack_reorder_contiguous_data( - mca_coll_ml_collective_operation_progress_t *coll_op); - -/* This routine re-orders and packs user data. The assumption is that - * there is per-process data, the amount of data is the same for all * ranks, - * and the user data is noncontigous. - */ -int mca_coll_ml_pack_reorder_noncontiguous_data( - mca_coll_ml_collective_operation_progress_t *coll_op); - -END_C_DECLS - - -#endif /* MCA_COLL_ML_ML_H */ diff --git a/ompi/mca/coll/ml/coll_ml_allgather.c b/ompi/mca/coll/ml/coll_ml_allgather.c deleted file mode 100644 index 95011126279..00000000000 --- a/ompi/mca/coll/ml/coll_ml_allgather.c +++ /dev/null @@ -1,631 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include - -#include "ompi/constants.h" -#include "opal/threads/mutex.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/bcol.h" -#include "opal/sys/atomic.h" -#include "coll_ml.h" -#include "coll_ml_select.h" -#include "coll_ml_allocation.h" - -static int mca_coll_ml_allgather_small_unpack_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - bool rcontig = coll_op->full_message.recv_data_continguous; - int n_ranks_in_comm = ompi_comm_size(OP_ML_MODULE(coll_op)->comm); - - void *dest = (void *)((uintptr_t)coll_op->full_message.dest_user_addr + - (uintptr_t)coll_op->full_message.n_bytes_delivered); - void *src = (void *)((uintptr_t)coll_op->fragment_data.buffer_desc->data_addr + - (size_t)coll_op->variable_fn_params.rbuf_offset); - - if (rcontig) { - memcpy(dest, src, n_ranks_in_comm * coll_op->full_message.n_bytes_scheduled); - } else { - mca_coll_ml_convertor_unpack(src, n_ranks_in_comm * coll_op->full_message.n_bytes_scheduled, - &coll_op->fragment_data.message_descriptor->recv_convertor); - } - - return OMPI_SUCCESS; -} - -static inline void copy_data (mca_coll_ml_collective_operation_progress_t *coll_op, rank_properties_t *rank_props, int soffset) { - bool rcontig = coll_op->fragment_data.message_descriptor->recv_data_continguous; - size_t total_bytes = coll_op->fragment_data.message_descriptor->n_bytes_total; - size_t pack_len = coll_op->fragment_data.fragment_size; - int doffset = rank_props->rank; - void *dest, *src; - - src = (void *) ((uintptr_t)coll_op->fragment_data.buffer_desc->data_addr + - (size_t)coll_op->variable_fn_params.rbuf_offset + soffset * pack_len); - - if (rcontig) { - dest = (void *) ((uintptr_t) coll_op->full_message.dest_user_addr + - (uintptr_t) coll_op->fragment_data.offset_into_user_buffer + - doffset * total_bytes); - - memcpy(dest, src, pack_len); - } else { - size_t position; - opal_convertor_t *recv_convertor = - &coll_op->fragment_data.message_descriptor->recv_convertor; - - position = (size_t) coll_op->fragment_data.offset_into_user_buffer + - doffset * total_bytes; - - opal_convertor_set_position(recv_convertor, &position); - mca_coll_ml_convertor_unpack(src, pack_len, recv_convertor); - } -} - -static int mca_coll_ml_allgather_noncontiguous_unpack_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int i, j, n_level_one_sbgps; - size_t soffset; - - mca_coll_ml_topology_t *topo_info = coll_op->coll_schedule->topo_info; - sub_group_params_t *array_of_all_subgroup_ranks = topo_info->array_of_all_subgroups; - - n_level_one_sbgps = array_of_all_subgroup_ranks->level_one_index; - - for (i = 0 ; i < n_level_one_sbgps; i++) { - /* determine where in the source buffer the data can be found */ - soffset = array_of_all_subgroup_ranks[i].index_of_first_element; - for (j = 0 ; j < array_of_all_subgroup_ranks[i].n_ranks; j++, ++soffset) { - copy_data (coll_op, array_of_all_subgroup_ranks[i].rank_data + j, soffset); - } - } - - return OMPI_SUCCESS; -} - -/* Allgather dependencies seem easy, everyone needs to work from the "bottom up". - * Following Pasha, I too will put the simplest dependencies graph and change it later - * when we add hierarchy. Basically, allgather has the same dependency profile as the - * sequential broadcast except that there is only a single ordering of tasks. - */ -static int mca_coll_ml_allgather_task_setup(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int fn_idx, h_level, my_index, root; - mca_sbgp_base_module_t *sbgp; - mca_coll_ml_topology_t *topo = coll_op->coll_schedule->topo_info; - - fn_idx = coll_op->sequential_routine.current_active_bcol_fn; - h_level = coll_op->coll_schedule->component_functions[fn_idx].h_level; - sbgp = topo->component_pairs[h_level]. - subgroup_module; - my_index = sbgp->my_index; - - /* In the case of allgather, the local leader is always the root */ - root = 0; - if (my_index == root) { - coll_op->variable_fn_params.root_flag = true; - coll_op->variable_fn_params.root_route = NULL; - } else { - coll_op->variable_fn_params.root_flag = false; - coll_op->variable_fn_params.root_route = &topo->route_vector[root]; - } - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_allgather_frag_progress(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - /* local variables */ - int ret; - size_t frag_len, dt_size; - - void *buf; - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc; - mca_coll_ml_collective_operation_progress_t *new_op; - - mca_coll_ml_module_t *ml_module = OP_ML_MODULE(coll_op); - bool scontig = coll_op->fragment_data.message_descriptor->send_data_continguous; - - ompi_datatype_type_size(coll_op->variable_fn_params.dtype, &dt_size); - /* Keep the pipeline filled with fragments */ - while (coll_op->fragment_data.message_descriptor->n_active < - coll_op->fragment_data.message_descriptor->pipeline_depth) { - /* If an active fragment happens to have completed the collective during - * a hop into the progress engine, then don't launch a new fragment, - * instead break and return. - */ - if (coll_op->fragment_data.message_descriptor->n_bytes_scheduled - == coll_op->fragment_data.message_descriptor->n_bytes_total) { - break; - } - /* Get an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - if (NULL == src_buffer_desc) { - /* If there exist outstanding fragments, then break out - * and let an active fragment deal with this later, - * there are no buffers available. - */ - if (0 < coll_op->fragment_data.message_descriptor->n_active) { - return OMPI_SUCCESS; - } else { - /* The fragment is already on list and - * the we still have no ml resources - * Return busy */ - if (coll_op->pending & REQ_OUT_OF_MEMORY) { - ML_VERBOSE(10,("Out of resources %p", coll_op)); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - coll_op->pending |= REQ_OUT_OF_MEMORY; - opal_list_append(&((OP_ML_MODULE(coll_op))->waiting_for_memory_list), - (opal_list_item_t *)coll_op); - ML_VERBOSE(10,("Out of resources %p adding to pending queue", coll_op)); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - } - - /* Get a new collective descriptor and initialize it */ - new_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allgather_functions[ML_SMALL_DATA_ALLGATHER], - coll_op->fragment_data.message_descriptor->src_user_addr, - coll_op->fragment_data.message_descriptor->dest_user_addr, - coll_op->fragment_data.message_descriptor->n_bytes_total, - coll_op->fragment_data.message_descriptor->n_bytes_scheduled); - - new_op->fragment_data.current_coll_op = coll_op->fragment_data.current_coll_op; - new_op->fragment_data.message_descriptor = coll_op->fragment_data.message_descriptor; - - /* set the task setup callback */ - new_op->sequential_routine.seq_task_setup = mca_coll_ml_allgather_task_setup; - - /* - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(new_op, - src_buffer_desc->buffer_index, src_buffer_desc); - */ - - /* We need this address for pointer arithmetic in memcpy */ - buf = coll_op->fragment_data.message_descriptor->src_user_addr; - - if (!scontig) { - frag_len = ml_module->small_message_thresholds[BCOL_ALLGATHER]; - mca_coll_ml_convertor_get_send_frag_size( - ml_module, &frag_len, - coll_op->fragment_data.message_descriptor); - - mca_coll_ml_convertor_pack( - (void *) ((uintptr_t) src_buffer_desc->data_addr + - frag_len * coll_op->coll_schedule->topo_info->hier_layout_info[0].offset + - frag_len * coll_op->coll_schedule->topo_info->hier_layout_info[0].level_one_index), - frag_len, &coll_op->fragment_data.message_descriptor->send_convertor); - } else { - /* calculate new frag length, there are some issues here */ - frag_len = (coll_op->fragment_data.message_descriptor->n_bytes_total - - coll_op->fragment_data.message_descriptor->n_bytes_scheduled < - coll_op->fragment_data.fragment_size ? - coll_op->fragment_data.message_descriptor->n_bytes_total - - coll_op->fragment_data.message_descriptor->n_bytes_scheduled : - coll_op->fragment_data.fragment_size); - - /* everybody copies in, based on the new values */ - memcpy((void *) ((uintptr_t)src_buffer_desc->data_addr + - frag_len * new_op->coll_schedule->topo_info->hier_layout_info[0].offset + - frag_len * new_op->coll_schedule->topo_info->hier_layout_info[0].level_one_index), - (void *) ((uintptr_t) buf + (uintptr_t) - coll_op->fragment_data.message_descriptor->n_bytes_scheduled), frag_len); - } - - new_op->variable_fn_params.sbuf = (void *) src_buffer_desc->data_addr; - new_op->variable_fn_params.rbuf = (void *) src_buffer_desc->data_addr; - - /* update the number of bytes scheduled */ - new_op->fragment_data.message_descriptor->n_bytes_scheduled += frag_len; - /* everyone needs an unpack function */ - new_op->process_fn = mca_coll_ml_allgather_noncontiguous_unpack_data; - - new_op->fragment_data.fragment_size = frag_len; - new_op->fragment_data.buffer_desc = src_buffer_desc; - - /* Setup fragment specific data */ - ++(new_op->fragment_data.message_descriptor->n_active); - - ML_VERBOSE(10, ("Start more, My index %d ", - new_op->fragment_data.buffer_desc->buffer_index)); - - /* this is a bit buggy */ - ML_SET_VARIABLE_PARAMS_BCAST( - new_op, - OP_ML_MODULE(new_op), - frag_len /* yes, we have consistent units, so this makes sense */, - MPI_BYTE /* we fragment according to buffer size - * we don't reduce the data thus we needn't - * keep "whole" datatypes, we may freely - * fragment without regard for multiples - * of any specific datatype - */, - src_buffer_desc, - 0, - 0, - frag_len, - src_buffer_desc->data_addr); - /* initialize first coll */ - ret = new_op->sequential_routine.seq_task_setup(new_op); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(3, ("Fragment failed to initialize itself")); - return ret; - } - - new_op->variable_fn_params.buffer_size = frag_len; - new_op->variable_fn_params.hier_factor = coll_op->variable_fn_params.hier_factor; - new_op->variable_fn_params.root = 0; - - MCA_COLL_ML_SET_NEW_FRAG_ORDER_INFO(new_op); - - /* append this collective !! */ - OPAL_THREAD_LOCK(&(mca_coll_ml_component.sequential_collectives_mutex)); - opal_list_append(&mca_coll_ml_component.sequential_collectives, - (opal_list_item_t *)new_op); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.sequential_collectives_mutex)); - } - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ -int mca_coll_ml_allgather_start (void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module, - ompi_request_t **req) -{ - size_t pack_len, sdt_size; - int ret, n_fragments = 1, comm_size; - - mca_coll_ml_topology_t *topo_info; - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc; - - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - - mca_coll_ml_collective_operation_progress_t *coll_op; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - - ptrdiff_t lb, extent; - bool scontig, rcontig, in_place = false; - - /* check for in place setting */ - if (MPI_IN_PLACE == sbuf) { - in_place = true; - sdtype = rdtype; - scount = rcount; - } - - /* scontig could be != to rcontig */ - scontig = ompi_datatype_is_contiguous_memory_layout(sdtype, scount); - rcontig = ompi_datatype_is_contiguous_memory_layout(rdtype, rcount); - - comm_size = ompi_comm_size(comm); - - ML_VERBOSE(10, ("Starting allgather")); - - assert(NULL != sdtype); - /* Calculate size of the data, - * at this stage, only contiguous data is supported */ - - /* this is valid for allagther */ - ompi_datatype_type_size(sdtype, &sdt_size); - pack_len = scount * sdt_size; - - if (in_place) { - sbuf = (char *) rbuf + ompi_comm_rank(comm) * pack_len; - } - - /* Allocate collective schedule and pack message */ - /* this is the total ending message size that will need to fit in the ml-buffer */ - if (pack_len <= (size_t) ml_module->small_message_thresholds[BCOL_ALLGATHER]) { - /* The len of the message can not be larger than ML buffer size */ - ML_VERBOSE(10, ("Single frag %d %d %d", pack_len, comm_size, ml_module->payload_block->size_buffer)); - assert(pack_len * comm_size <= ml_module->payload_block->size_buffer); - - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - /* change 1 */ - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allgather_functions[ML_SMALL_DATA_ALLGATHER], - sbuf, rbuf, pack_len, 0 /* offset for first pack */); - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, - src_buffer_desc->buffer_index, src_buffer_desc); - - coll_op->fragment_data.current_coll_op = ML_SMALL_DATA_ALLGATHER; - /* task setup callback function */ - coll_op->sequential_routine.seq_task_setup = mca_coll_ml_allgather_task_setup; - - /* change 2 */ - if (!scontig) { - coll_op->full_message.n_bytes_scheduled = - mca_coll_ml_convertor_prepare(sdtype, scount, sbuf, - &coll_op->full_message.send_convertor, MCA_COLL_ML_NET_STREAM_SEND); - - mca_coll_ml_convertor_pack( - (void *) ((uintptr_t) src_buffer_desc->data_addr + pack_len * - (coll_op->coll_schedule->topo_info->hier_layout_info[0].offset + - coll_op->coll_schedule->topo_info->hier_layout_info[0].level_one_index)), - pack_len, &coll_op->full_message.send_convertor); - } else { - /* change 3 */ - memcpy((void *)((uintptr_t) src_buffer_desc->data_addr + pack_len * - (coll_op->coll_schedule->topo_info->hier_layout_info[0].offset + - coll_op->coll_schedule->topo_info->hier_layout_info[0].level_one_index)), - sbuf, pack_len); - - coll_op->full_message.n_bytes_scheduled = pack_len; - } - - if (!rcontig) { - mca_coll_ml_convertor_prepare(rdtype, rcount * comm_size, rbuf, - &coll_op->full_message.recv_convertor, MCA_COLL_ML_NET_STREAM_RECV); - } - - if (coll_op->coll_schedule->topo_info->ranks_contiguous) { - coll_op->process_fn = mca_coll_ml_allgather_small_unpack_data; - } else { - coll_op->process_fn = mca_coll_ml_allgather_noncontiguous_unpack_data; - } - - /* whole ml-buffer is used to send AND receive */ - coll_op->variable_fn_params.sbuf = (void *) src_buffer_desc->data_addr; - coll_op->variable_fn_params.rbuf = (void *) src_buffer_desc->data_addr; - - /* we can set the initial offset here */ - coll_op->variable_fn_params.sbuf_offset = 0; - coll_op->variable_fn_params.rbuf_offset = 0; - - coll_op->variable_fn_params.count = scount; - coll_op->fragment_data.fragment_size = - coll_op->full_message.n_bytes_scheduled; - - /* For small CINCO, we may use the native datatype */ - coll_op->variable_fn_params.dtype = sdtype; - coll_op->variable_fn_params.buffer_size = pack_len; - coll_op->variable_fn_params.root = 0; - } else if (cm->enable_fragmentation || pack_len * comm_size < (1 << 20)) { - /* calculate the number of fragments and the size of each frag */ - size_t n_dts_per_frag, frag_len; - int pipeline_depth = mca_coll_ml_component.pipeline_depth; - - /* Calculate the number of fragments required for this message careful watch the integer division !*/ - frag_len = (pack_len <= (size_t) ml_module->small_message_thresholds[BCOL_ALLGATHER] ? - pack_len : (size_t) ml_module->small_message_thresholds[BCOL_ALLGATHER]); - - n_dts_per_frag = frag_len / sdt_size; - n_fragments = (pack_len + sdt_size * n_dts_per_frag - 1) / (sdt_size * n_dts_per_frag); - pipeline_depth = (n_fragments < pipeline_depth ? n_fragments : pipeline_depth); - - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - /* change 4 */ - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allgather_functions[ML_SMALL_DATA_ALLGATHER], - sbuf, rbuf, pack_len, - 0 /* offset for first pack */); - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, - src_buffer_desc->buffer_index, src_buffer_desc); - topo_info = coll_op->coll_schedule->topo_info; - - /* task setup callback function */ - coll_op->sequential_routine.seq_task_setup = mca_coll_ml_allgather_task_setup; - - if (!scontig) { - coll_op->full_message.send_converter_bytes_packed = - mca_coll_ml_convertor_prepare( - sdtype, scount, NULL, - &coll_op->full_message.dummy_convertor, - MCA_COLL_ML_NET_STREAM_SEND); - - coll_op->full_message.dummy_conv_position = 0; - mca_coll_ml_convertor_get_send_frag_size( - ml_module, &frag_len, - &coll_op->full_message); - - /* change 5 */ - mca_coll_ml_convertor_prepare(sdtype, scount, sbuf, - &coll_op->full_message.send_convertor, MCA_COLL_ML_NET_STREAM_SEND); - - mca_coll_ml_convertor_pack( - (void *) ((uintptr_t) src_buffer_desc->data_addr + frag_len * - (topo_info->hier_layout_info[0].offset + - topo_info->hier_layout_info[0].level_one_index)), - frag_len, &coll_op->full_message.send_convertor); - } else { - /* change 6 */ - memcpy((void *)((uintptr_t)src_buffer_desc->data_addr + frag_len * - (topo_info->hier_layout_info[0].offset + - topo_info->hier_layout_info[0].level_one_index)), - sbuf, frag_len); - } - - if (!rcontig) { - mca_coll_ml_convertor_prepare(rdtype, rcount * comm_size, rbuf, - &coll_op->full_message.recv_convertor, MCA_COLL_ML_NET_STREAM_RECV); - } - - coll_op->process_fn = mca_coll_ml_allgather_noncontiguous_unpack_data; - - /* hopefully this doesn't royaly screw things up idea behind this is the - * whole ml-buffer is used to send and receive - */ - coll_op->variable_fn_params.sbuf = (void *) src_buffer_desc->data_addr; - coll_op->variable_fn_params.rbuf = (void *) src_buffer_desc->data_addr; - - /* we can set the initial offset here */ - coll_op->variable_fn_params.sbuf_offset = 0; - coll_op->variable_fn_params.rbuf_offset = 0; - - coll_op->fragment_data.buffer_desc = src_buffer_desc; - - coll_op->fragment_data.fragment_size = frag_len; - coll_op->fragment_data.message_descriptor->n_active = 1; - - coll_op->full_message.n_bytes_scheduled = frag_len; - coll_op->full_message.fragment_launcher = mca_coll_ml_allgather_frag_progress; - - coll_op->full_message.pipeline_depth = pipeline_depth; - coll_op->fragment_data.current_coll_op = ML_SMALL_DATA_ALLGATHER; - - /* remember this is different for frags !! Caused data corruption when - * not properly set. Need to be sure you have consistent units. - */ - coll_op->variable_fn_params.count = frag_len; - coll_op->variable_fn_params.dtype = MPI_BYTE; /* for fragmented data, we work in - * units of bytes. This means that - * all of our arithmetic is done - * in terms of bytes - */ - - coll_op->variable_fn_params.root = 0; - coll_op->variable_fn_params.frag_size = frag_len; - coll_op->variable_fn_params.buffer_size = frag_len; - } else { - /* change 7 */ - ML_VERBOSE(10, ("ML_ALLGATHER_LARGE_DATA_KNOWN case.")); - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allgather_functions[ML_LARGE_DATA_ALLGATHER], - sbuf, rbuf, pack_len, 0 /* offset for first pack */); - topo_info = coll_op->coll_schedule->topo_info; - if (MCA_BCOL_BASE_NO_ML_BUFFER_FOR_LARGE_MSG & topo_info->all_bcols_mode) { - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, MCA_COLL_ML_NO_BUFFER, NULL); - } else { - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, src_buffer_desc->buffer_index, src_buffer_desc); - } - - /* not sure if I really need this here */ - coll_op->sequential_routine.seq_task_setup = mca_coll_ml_allgather_task_setup; - coll_op->process_fn = NULL; - /* probably the most important piece */ - coll_op->variable_fn_params.sbuf = sbuf; - coll_op->variable_fn_params.rbuf = rbuf; - coll_op->variable_fn_params.sbuf_offset = 0; - coll_op->variable_fn_params.rbuf_offset = 0; - coll_op->variable_fn_params.count = scount; - coll_op->variable_fn_params.dtype = sdtype;/* for zero copy, we want the - * native datatype and actual count - */ - coll_op->variable_fn_params.root = 0; - - /* you still need to copy in your own data into the rbuf */ - /* don't need to do this if you have in place data */ - if (!in_place) { - memcpy((char *) rbuf + ompi_comm_rank(comm) * pack_len, sbuf, pack_len); - } - } - - coll_op->full_message.send_count = scount; - coll_op->full_message.recv_count = rcount; - - coll_op->full_message.send_data_continguous = scontig; - coll_op->full_message.recv_data_continguous = rcontig; - - ompi_datatype_get_extent(sdtype, &lb, &extent); - coll_op->full_message.send_extent = (size_t) extent; - - ompi_datatype_get_extent(rdtype, &lb, &extent); - coll_op->full_message.recv_extent = (size_t) extent; - - - /* Fill in the function arguments */ - coll_op->variable_fn_params.sequence_num = - OPAL_THREAD_ADD32(&(ml_module->collective_sequence_num), 1); - coll_op->variable_fn_params.hier_factor = comm_size; - - MCA_COLL_ML_SET_ORDER_INFO(coll_op, n_fragments); - - - ret = mca_coll_ml_launch_sequential_collective (coll_op); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - - *req = &coll_op->full_message.super; - - return OMPI_SUCCESS; -} - -int mca_coll_ml_allgather(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module) -{ - ompi_request_t *req; - int ret; - - ML_VERBOSE(10, ("Starting blocking allgather")); - - ret = mca_coll_ml_allgather_start (sbuf, scount, sdtype, - rbuf, rcount, rdtype, - comm, module, &req); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return ret; - } - - ret = ompi_request_wait (&req, MPI_STATUS_IGNORE); - - ML_VERBOSE(10, ("Blocking allgather is complete")); - - return ret; -} - -int mca_coll_ml_allgather_nb(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, - struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module) -{ - int ret; - - ML_VERBOSE(10, ("Starting non-blocking allgather")); - - ret = mca_coll_ml_allgather_start (sbuf, scount, sdtype, - rbuf, rcount, rdtype, - comm, module, req); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return ret; - } - - ML_VERBOSE(10, ("Non-blocking allgather started")); - - return ret; -} diff --git a/ompi/mca/coll/ml/coll_ml_allocation.c b/ompi/mca/coll/ml/coll_ml_allocation.c deleted file mode 100644 index 555c5e9aff8..00000000000 --- a/ompi/mca/coll/ml/coll_ml_allocation.c +++ /dev/null @@ -1,223 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#ifdef HAVE_STDLIB_H -#include -#endif /* HAVE_STDLIB_H */ - -#include "coll_ml.h" -#include "coll_ml_inlines.h" -#include "coll_ml_allocation.h" - -long memory_buffer_index; - -mca_bcol_base_memory_block_desc_t *mca_coll_ml_allocate_block(struct mca_coll_ml_component_t *ml_component, - mca_bcol_base_memory_block_desc_t *ml_memblock) -{ - mca_bcol_base_memory_block_desc_t *ret = NULL; - mca_bcol_base_memory_block_desc_t *memory_block = NULL; - mca_coll_ml_lmngr_t *memory_manager = NULL; - - if (ml_memblock) { - ML_ERROR(("Memory already allocated - expecting NULL pointer")); - return ret; - } - memory_block = (mca_bcol_base_memory_block_desc_t*) calloc(1, sizeof(mca_bcol_base_memory_block_desc_t)); - - if (NULL == memory_block){ - ML_ERROR(("Couldn't allocate memory for ml_memblock")); - return ret; - } - - memory_manager = &ml_component->memory_manager; - memory_block->block = mca_coll_ml_lmngr_alloc(memory_manager); - memory_block->size_block = memory_manager->list_block_size; - - if (!memory_block->block){ - ML_VERBOSE(1, ("lmngr failed.")); - ret = NULL; - goto exit_ERROR; - } - - return memory_block; - -exit_ERROR: - if (memory_block){ - free(memory_block); - return ret; - } - - return ret; -} - -void mca_coll_ml_free_block (mca_bcol_base_memory_block_desc_t *ml_memblock) -{ - if (!ml_memblock) - return; - - if (ml_memblock->buffer_descs){ - free(ml_memblock->buffer_descs); - } - - mca_coll_ml_lmngr_free(ml_memblock->block); - free(ml_memblock->bank_release_counters); - free(ml_memblock->ready_for_memsync); - free(ml_memblock->bank_is_busy); - free(ml_memblock); -} - -int mca_coll_ml_initialize_block(mca_bcol_base_memory_block_desc_t *ml_memblock, - uint32_t num_buffers, - uint32_t num_banks, - uint32_t buffer_size, - int32_t data_offset, - opal_list_t *bcols_in_use) -{ - int ret = OMPI_SUCCESS; - uint32_t bank_loop, buff_loop; - uint64_t addr_offset = 0; - mca_bcol_base_payload_buffer_desc_t *pbuff_descs = NULL,*pbuff_desc = NULL; - - if (0 == num_banks || 0 == num_buffers || 0 == buffer_size) { - return OMPI_ERR_BAD_PARAM; - } - - if (NULL == ml_memblock){ - ML_ERROR(("Memory block not initialized")); - ret = OMPI_ERROR; - goto exit_ERROR; - } - - if (ml_memblock->size_block < (num_buffers * num_banks * buffer_size) ){ - ML_ERROR(("Not enough memory for all buffers and banks in the memory block")); - ret = OMPI_ERROR; - goto exit_ERROR; - } - - pbuff_descs = (mca_bcol_base_payload_buffer_desc_t*) malloc(sizeof(mca_bcol_base_payload_buffer_desc_t) - * num_banks * num_buffers); - if (NULL == pbuff_descs) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - for(bank_loop = 0; bank_loop < num_banks; bank_loop++) - for(buff_loop = 0; buff_loop < num_buffers; buff_loop++){ - pbuff_desc = &pbuff_descs[bank_loop*num_buffers + buff_loop]; - - pbuff_desc->base_data_addr = (void *) - ((char *)ml_memblock->block->base_addr + addr_offset); - pbuff_desc->data_addr = (void *) - ((char *)pbuff_desc->base_data_addr + (size_t)data_offset); - - addr_offset+=buffer_size; - pbuff_desc->buffer_index = BUFFER_INDEX(bank_loop,num_buffers,buff_loop); - - pbuff_desc->bank_index=bank_loop; - pbuff_desc->generation_number=0; - } - - /* Initialize ml memory block */ - /* gvm FIX:This counter when zero indicates that the bank is ready for - * recycle. This is initialized to number of bcol components as each bcol is responsible for - * releasing the buffers of a bank. This initialization will have - * faulty behavior, example in case of multiple interfaces, when more than - * one bcol module of the component type is in use. - */ - ml_memblock->bank_release_counters = (uint32_t *) calloc(num_banks, sizeof(uint32_t)); - if (NULL == ml_memblock->bank_release_counters) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - ml_memblock->ready_for_memsync = (bool *) calloc(num_banks, sizeof(bool)); - if (NULL == ml_memblock->ready_for_memsync) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - ml_memblock->bank_is_busy = (bool *) calloc(num_banks, sizeof(bool)); - if (NULL == ml_memblock->bank_is_busy) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - /* Set index for first bank to sync */ - ml_memblock->memsync_counter = 0; - - /* use first bank and first buffer */ - ml_memblock->next_free_buffer = 0; - - ml_memblock->block_addr_offset = addr_offset; - ml_memblock->num_buffers_per_bank = num_buffers; - ml_memblock->num_banks = num_banks; - ml_memblock->size_buffer = buffer_size; - ml_memblock->buffer_descs = pbuff_descs; - - return ret; - -exit_ERROR: - /* Free all buffer descriptors */ - if (pbuff_descs){ - free(pbuff_descs); - } - - return ret; -} - -mca_bcol_base_payload_buffer_desc_t *mca_coll_ml_alloc_buffer (mca_coll_ml_module_t *module) -{ - uint64_t bindex; - uint32_t bank, buffer, num_buffers; - mca_bcol_base_memory_block_desc_t *ml_memblock = module->payload_block; - mca_bcol_base_payload_buffer_desc_t *pbuff_descs = NULL, - *ml_membuffer = NULL; - - /* Return a buffer */ - num_buffers = ml_memblock->num_buffers_per_bank; - pbuff_descs = ml_memblock->buffer_descs; - bindex = ml_memblock->next_free_buffer; - buffer = bindex % num_buffers; - bank = bindex/num_buffers; - - ML_VERBOSE(10, ("ML allocator: allocating buffer index %d, bank index %d", buffer, bank)); - - /* First buffer in bank, use next bank */ - if (0 == buffer) { - if(!ml_memblock->bank_is_busy[bank]) { - /* the bank is free, mark it busy */ - ml_memblock->bank_is_busy[bank] = true; - ML_VERBOSE(10, ("ML allocator: reset bank %d to value %d", bank, - ml_memblock->bank_release_counters[bank])); - } else { - /* the bank is busy, return NULL and upper layer will handle it */ - ML_VERBOSE(10, ("No free payload buffers are available for use." - " Next memory bank is still used by one of bcols")); - return NULL; - } - } - - assert(true == ml_memblock->bank_is_busy[bank]); - - ml_membuffer = &pbuff_descs[bindex]; - ML_VERBOSE(10, ("ML allocator: ml buffer index %d", bindex)); - - /* Compute next free buffer */ - buffer = (buffer == num_buffers - 1) ? 0 : buffer + 1; - if (0 == buffer) { - bank = (bank == ml_memblock->num_banks - 1) ? 0 : bank + 1; - } - - ml_memblock->next_free_buffer = BUFFER_INDEX(bank,num_buffers,buffer); - - return ml_membuffer; -} diff --git a/ompi/mca/coll/ml/coll_ml_allocation.h b/ompi/mca/coll/ml/coll_ml_allocation.h deleted file mode 100644 index 7bb7f63242c..00000000000 --- a/ompi/mca/coll/ml/coll_ml_allocation.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_ML_ALLOC_H -#define MCA_ML_ALLOC_H - -#include "ompi_config.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/base/base.h" -#include "opal/sys/atomic.h" -#include "opal/mca/mpool/base/base.h" -#include "coll_ml_lmngr.h" - -/* - Returns a block of memory from mpool - - ARGS: - IN ml_component: component descriptor - OUT ml_memblock: block_addr - Starting address of the memory block - size - Size of the block - register_info - Register information passed from the mpool - - Return - On Sucess : Returns size of memory block - On Failure: Returns -1 - - */ - -struct mca_coll_ml_component_t; -struct mca_coll_ml_module_t; - -mca_bcol_base_memory_block_desc_t *mca_coll_ml_allocate_block( - struct mca_coll_ml_component_t *ml_component, - struct mca_bcol_base_memory_block_desc_t *ml_memblock - ); - /* Allocate the memory from mpool */ - /* Register the memory block with bcols */ - -void mca_coll_ml_free_block( - mca_bcol_base_memory_block_desc_t *ml_memblock - ); - - - - -/* - Initialize the memory block and map into buffers and memory banks, and - also buffer descriptors are initialized. - - IN ml_memblock: Memory block descriptor - IN num_buffers: number of buffers - IN num_banks: number of banks - Return - On Sucess: OMPI_SUCCESS - On Failure: OMPI_ERROR - */ -int mca_coll_ml_initialize_block( - mca_bcol_base_memory_block_desc_t *ml_memblock, - uint32_t num_buffers, - uint32_t num_banks, - uint32_t buffer_size, - int32_t data_offset, - opal_list_t *bcols_in_use - ); - /* Map blocks into buffers and banks */ - /* Initialize the descriptors */ - - - -/* - Allocate a memory buffer from the block - IN ml_memblock: Memory block descriptor - OUT ml_membuffer: Buffer allocated for data from the block - - Return - On Sucess: OMPI_SUCCESS - On Failure: OMPI_ERROR - */ -mca_bcol_base_payload_buffer_desc_t *mca_coll_ml_alloc_buffer( - struct mca_coll_ml_module_t *module); - -int mca_coll_ml_free_buffer( - mca_bcol_base_memory_block_desc_t *ml_memblock, - struct mca_bcol_base_payload_buffer_desc_t *ml_membuffer - ); - -/* - Register the memory block with bcol component - - IN ml_memblock: Memory block descriptor - OUT registerations (ml_memblock) - - Return - On Sucess: OMPI_SUCCESS - On Failure: OMPI_ERROR - - */ -int mca_coll_ml_register_block_bcol( - mca_bcol_base_memory_block_desc_t *ml_memblock - ); - -#endif /* MCA_ML_ALLOC_H */ diff --git a/ompi/mca/coll/ml/coll_ml_allreduce.c b/ompi/mca/coll/ml/coll_ml_allreduce.c deleted file mode 100644 index e5ee83dbe3e..00000000000 --- a/ompi/mca/coll/ml/coll_ml_allreduce.c +++ /dev/null @@ -1,551 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include - -#include "ompi/constants.h" -#include "opal/threads/mutex.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/bcol.h" -#include "opal/sys/atomic.h" -#include "coll_ml.h" -#include "coll_ml_select.h" -#include "coll_ml_allocation.h" - -static int mca_coll_ml_allreduce_small_unpack(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int ret; - /* need to put in more */ - int count = coll_op->variable_fn_params.count; - ompi_datatype_t *dtype = coll_op->variable_fn_params.dtype; - - void *dest = (void *)((uintptr_t)coll_op->full_message.dest_user_addr + - (uintptr_t)coll_op->fragment_data.offset_into_user_buffer); - void *src = (void *)((uintptr_t)coll_op->fragment_data.buffer_desc->data_addr + - (size_t)coll_op->variable_fn_params.rbuf_offset); - - ret = ompi_datatype_copy_content_same_ddt(dtype, (int32_t) count, (char *) dest, - (char *) src); - if (ret < 0) { - return OMPI_ERROR; - } - - ML_VERBOSE(10, ("sbuf addr %p, sbuf offset %d, rbuf addr %p, rbuf offset %d.", - src, coll_op->variable_fn_params.sbuf_offset, dest, - coll_op->variable_fn_params.rbuf_offset)); - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_allreduce_task_setup(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int fn_idx, h_level, my_index, root; - mca_sbgp_base_module_t *sbgp; - mca_coll_ml_topology_t *topo = coll_op->coll_schedule->topo_info; - - fn_idx = coll_op->sequential_routine.current_active_bcol_fn; - h_level = coll_op->coll_schedule->component_functions[fn_idx].h_level; - sbgp = topo->component_pairs[h_level].subgroup_module; - my_index = sbgp->my_index; - - /* In the case of allreduce, the local leader is always the root */ - root = 0; - if (my_index == root) { - coll_op->variable_fn_params.root_flag = true; - coll_op->variable_fn_params.root_route = NULL; - } else { - coll_op->variable_fn_params.root_flag = false; - coll_op->variable_fn_params.root_route = &topo->route_vector[root]; - } - - /* NTH: This was copied from the old allreduce launcher. */ - if (0 < fn_idx) { - coll_op->variable_fn_params.sbuf = coll_op->variable_fn_params.rbuf; - coll_op->variable_fn_params.userbuf = coll_op->variable_fn_params.rbuf; - } - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_allreduce_frag_progress(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - /* local variables */ - void *buf; - - size_t dt_size; - int ret, frag_len, count; - - ptrdiff_t lb, extent; - - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc; - mca_coll_ml_collective_operation_progress_t *new_op; - - mca_coll_ml_module_t *ml_module = OP_ML_MODULE(coll_op); - - ret = ompi_datatype_get_extent(coll_op->variable_fn_params.dtype, &lb, &extent); - if (ret < 0) { - return OMPI_ERROR; - } - - dt_size = (size_t) extent; - - /* Keep the pipeline filled with fragments */ - while (coll_op->fragment_data.message_descriptor->n_active < - coll_op->fragment_data.message_descriptor->pipeline_depth) { - /* If an active fragment happens to have completed the collective during - * a hop into the progress engine, then don't launch a new fragment, - * instead break and return. - */ - if (coll_op->fragment_data.message_descriptor->n_bytes_scheduled - == coll_op->fragment_data.message_descriptor->n_bytes_total) { - break; - } - - /* Get an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(OP_ML_MODULE(coll_op)); - if (NULL == src_buffer_desc) { - /* If there exist outstanding fragments, then break out - * and let an active fragment deal with this later, - * there are no buffers available. - */ - if (0 < coll_op->fragment_data.message_descriptor->n_active) { - return OMPI_SUCCESS; - } - - /* It is useless to call progress from here, since - * ml progress can't be executed as result ml memsync - * call will not be completed and no memory will be - * recycled. So we put the element on the list, and we will - * progress it later when memsync will recycle some memory*/ - - /* The fragment is already on list and - * the we still have no ml resources - * Return busy */ - if (!(coll_op->pending & REQ_OUT_OF_MEMORY)) { - coll_op->pending |= REQ_OUT_OF_MEMORY; - opal_list_append(&((OP_ML_MODULE(coll_op))->waiting_for_memory_list), - (opal_list_item_t *)coll_op); - ML_VERBOSE(10,("Out of resources %p adding to pending queue", coll_op)); - } else { - ML_VERBOSE(10,("Out of resources %p", coll_op)); - } - - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - /* Get a new collective descriptor and initialize it */ - new_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allreduce_functions[coll_op->fragment_data.current_coll_op], - coll_op->fragment_data.message_descriptor->src_user_addr, - coll_op->fragment_data.message_descriptor->dest_user_addr, - coll_op->fragment_data.message_descriptor->n_bytes_total, - coll_op->fragment_data.message_descriptor->n_bytes_scheduled); - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(new_op, - src_buffer_desc->buffer_index, src_buffer_desc); - - new_op->fragment_data.current_coll_op = coll_op->fragment_data.current_coll_op; - new_op->fragment_data.message_descriptor = coll_op->fragment_data.message_descriptor; - - /* set the task setup callback */ - new_op->sequential_routine.seq_task_setup = mca_coll_ml_allreduce_task_setup; - /* We need this address for pointer arithmetic in memcpy */ - buf = coll_op->fragment_data.message_descriptor->src_user_addr; - /* calculate the number of data types in this packet */ - count = (coll_op->fragment_data.message_descriptor->n_bytes_total - - coll_op->fragment_data.message_descriptor->n_bytes_scheduled < - (size_t) OP_ML_MODULE(coll_op)->small_message_thresholds[BCOL_ALLREDUCE] ? - (coll_op->fragment_data.message_descriptor->n_bytes_total - - coll_op->fragment_data.message_descriptor->n_bytes_scheduled) / dt_size : - (size_t) coll_op->variable_fn_params.count); - - /* calculate the fragment length */ - frag_len = count*dt_size; - - ret = ompi_datatype_copy_content_same_ddt(coll_op->variable_fn_params.dtype, count, - (char *) src_buffer_desc->data_addr, (char *) ((uintptr_t) buf + (uintptr_t) - coll_op->fragment_data.message_descriptor->n_bytes_scheduled)); - if (ret < 0) { - return OMPI_ERROR; - } - - /* No unpack for root */ - new_op->process_fn = mca_coll_ml_allreduce_small_unpack; - - /* Setup fragment specific data */ - new_op->fragment_data.message_descriptor->n_bytes_scheduled += frag_len; - new_op->fragment_data.buffer_desc = src_buffer_desc; - new_op->fragment_data.fragment_size = frag_len; - (new_op->fragment_data.message_descriptor->n_active)++; - - ML_SET_VARIABLE_PARAMS_BCAST( - new_op, - OP_ML_MODULE(new_op), - count, - MPI_BYTE, - src_buffer_desc, - 0, - 0, - frag_len, - src_buffer_desc->data_addr); - /* Fill in bcast specific arguments */ - /* TBD: remove buffer_size */ - new_op->variable_fn_params.buffer_size = frag_len; - new_op->variable_fn_params.count = count; - new_op->variable_fn_params.hier_factor = coll_op->variable_fn_params.hier_factor; - new_op->variable_fn_params.op = coll_op->variable_fn_params.op; - new_op->variable_fn_params.dtype = coll_op->variable_fn_params.dtype; - new_op->variable_fn_params.root = 0; - new_op->variable_fn_params.sbuf = src_buffer_desc->data_addr; - new_op->variable_fn_params.rbuf = src_buffer_desc->data_addr; - new_op->sequential_routine.current_bcol_status = SEQ_TASK_PENDING; - - MCA_COLL_ML_SET_NEW_FRAG_ORDER_INFO(new_op); - - ML_VERBOSE(10,("FFFF Contig + fragmentation [0-sk, 1-lk, 3-su, 4-lu] %d %d %d", - new_op->variable_fn_params.buffer_size, - new_op->fragment_data.fragment_size, - new_op->fragment_data.message_descriptor->n_bytes_scheduled)); - /* initialize first coll */ - ret = new_op->sequential_routine.seq_task_setup(new_op); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(3,("Fragment failed to initialize itself")); - return ret; - } - - /* append this collective !! */ - OPAL_THREAD_LOCK(&(mca_coll_ml_component.sequential_collectives_mutex)); - opal_list_append(&mca_coll_ml_component.sequential_collectives, - (opal_list_item_t *)new_op); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.sequential_collectives_mutex)); - - } - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ -int parallel_allreduce_start(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, - mca_coll_ml_module_t *ml_module, - ompi_request_t **req, - int small_data_allreduce, - int large_data_allreduce) -{ - int ret, n_fragments = 1, frag_len, - pipeline_depth, n_dts_per_frag ; - - ptrdiff_t lb, extent; - size_t pack_len, dt_size; - - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc; - mca_coll_ml_collective_operation_progress_t *coll_op; - - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - - bool contiguous = ompi_datatype_is_contiguous_memory_layout(dtype, count); - - if (MPI_IN_PLACE == sbuf) { - sbuf = rbuf; - } - - ret = ompi_datatype_get_extent(dtype, &lb, &extent); - if (ret < 0) { - return OMPI_ERROR; - } - - dt_size = (size_t) extent; - pack_len = count * dt_size; - - ML_VERBOSE(1,("The allreduce requested %d enable fragmentation %d ", - pack_len, - cm->enable_fragmentation)); - if (pack_len <= (size_t) ml_module->small_message_thresholds[BCOL_ALLREDUCE]) { - /* The len of the message can not be larger than ML buffer size */ - assert(pack_len <= ml_module->payload_block->size_buffer); - - ML_VERBOSE(1,("Using small data allreduce (threshold = %d)", - ml_module->small_message_thresholds[BCOL_ALLREDUCE])); - - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (OPAL_UNLIKELY(NULL == src_buffer_desc)) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allreduce_functions[small_data_allreduce], - sbuf, rbuf, pack_len, 0); - - coll_op->variable_fn_params.rbuf = src_buffer_desc->data_addr; - coll_op->variable_fn_params.sbuf = src_buffer_desc->data_addr; - coll_op->variable_fn_params.count = count; - - ret = ompi_datatype_copy_content_same_ddt(dtype, count, - (void *) (uintptr_t) src_buffer_desc->data_addr, (char *) sbuf); - if (ret < 0){ - return OMPI_ERROR; - } - - /* unpack function */ - coll_op->process_fn = mca_coll_ml_allreduce_small_unpack; - } else if (cm->enable_fragmentation || !contiguous) { - ML_VERBOSE(1,("Using Fragmented Allreduce")); - - /* fragment the data */ - /* check for retarded application programming decisions */ - if (dt_size > (size_t) ml_module->small_message_thresholds[BCOL_ALLREDUCE]) { - ML_ERROR(("Sorry, but we don't support datatypes that large")); - return OMPI_ERROR; - } - - /* calculate the number of data types that can fit per ml-buffer */ - n_dts_per_frag = ml_module->small_message_thresholds[BCOL_ALLREDUCE] / dt_size; - - /* calculate the number of fragments */ - n_fragments = (count + n_dts_per_frag - 1) / n_dts_per_frag; /* round up */ - - /* calculate the actual pipeline depth */ - pipeline_depth = n_fragments < cm->pipeline_depth ? n_fragments : cm->pipeline_depth; - - /* calculate the fragment size */ - frag_len = n_dts_per_frag * dt_size; - - /* allocate an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allreduce_functions[small_data_allreduce], - sbuf, rbuf, pack_len, 0 /* offset for first pack */); - - /* task setup callback function */ - coll_op->sequential_routine.seq_task_setup = mca_coll_ml_allreduce_task_setup; - - coll_op->process_fn = mca_coll_ml_allreduce_small_unpack; - - coll_op->variable_fn_params.sbuf = (void *) src_buffer_desc->data_addr; - coll_op->variable_fn_params.rbuf = (void *) src_buffer_desc->data_addr; - - coll_op->fragment_data.message_descriptor->n_active = 1; - coll_op->full_message.n_bytes_scheduled = frag_len; - coll_op->full_message.fragment_launcher = mca_coll_ml_allreduce_frag_progress; - coll_op->full_message.pipeline_depth = pipeline_depth; - coll_op->fragment_data.current_coll_op = small_data_allreduce; - coll_op->fragment_data.fragment_size = frag_len; - - coll_op->variable_fn_params.count = n_dts_per_frag; /* seems fishy */ - coll_op->variable_fn_params.buffer_size = frag_len; - - /* copy into the ml-buffer */ - ret = ompi_datatype_copy_content_same_ddt(dtype, n_dts_per_frag, - (char *) src_buffer_desc->data_addr, (char *) sbuf); - if (ret < 0) { - return OMPI_ERROR; - } - } else { - ML_VERBOSE(1,("Using zero-copy ptp allreduce")); - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_allreduce_functions[large_data_allreduce], - sbuf, rbuf, pack_len, 0); - - coll_op->variable_fn_params.userbuf = - coll_op->variable_fn_params.sbuf = sbuf; - - coll_op->variable_fn_params.rbuf = rbuf; - - /* The ML buffer is used for testing. Later, when we - * switch to use knem/mmap/portals this should be replaced - * appropriately - */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - coll_op->variable_fn_params.count = count; - } - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, src_buffer_desc->buffer_index, - src_buffer_desc); - - /* set the offset */ - coll_op->variable_fn_params.sbuf_offset = 0; - coll_op->variable_fn_params.rbuf_offset = 0; - - /* Fill in the function arguments */ - coll_op->variable_fn_params.sequence_num = - OPAL_THREAD_ADD32(&(ml_module->collective_sequence_num), 1); - coll_op->sequential_routine.current_active_bcol_fn = 0; - coll_op->variable_fn_params.dtype = dtype; - coll_op->variable_fn_params.op = op; - coll_op->variable_fn_params.root = 0; - coll_op->sequential_routine.seq_task_setup = mca_coll_ml_allreduce_task_setup; /* invoked after each level in sequential - * progress call - */ - MCA_COLL_ML_SET_ORDER_INFO(coll_op, n_fragments); - - ret = mca_coll_ml_launch_sequential_collective (coll_op); - if (ret != OMPI_SUCCESS) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - - *req = &coll_op->full_message.super; - - return OMPI_SUCCESS; -} - -int mca_coll_ml_allreduce(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, - mca_coll_base_module_t *module) -{ - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t*)module; - ompi_request_t *req; - int ret; - - if (OPAL_UNLIKELY(!ompi_op_is_commute(op))) { - /* coll/ml does not handle non-communative operations at this time. fallback - * on another collective module */ - return ml_module->fallback.coll_allreduce (sbuf, rbuf, count, dtype, op, comm, - ml_module->fallback.coll_allreduce_module); - } - - ret = parallel_allreduce_start(sbuf, rbuf, count, dtype, op, comm, - (mca_coll_ml_module_t *) module, &req, - ML_SMALL_DATA_ALLREDUCE, - ML_LARGE_DATA_ALLREDUCE); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_ERROR(("Failed to launch")); - return ret; - } - - ompi_request_wait_completion(req); - ompi_request_free(&req); - - ML_VERBOSE(10, ("Blocking NB allreduce is done")); - - return OMPI_SUCCESS; -} - -int mca_coll_ml_allreduce_nb(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module) -{ - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t*)module; - int ret; - - if (OPAL_UNLIKELY(!ompi_op_is_commute(op))) { - /* coll/ml does not handle non-communative operations at this time. fallback - * on another collective module */ - return ml_module->fallback.coll_iallreduce (sbuf, rbuf, count, dtype, op, comm, req, - ml_module->fallback.coll_iallreduce_module); - } - - ret = parallel_allreduce_start(sbuf, rbuf, count, dtype, op, comm, - (mca_coll_ml_module_t *) module, req, - ML_SMALL_DATA_ALLREDUCE, - ML_LARGE_DATA_ALLREDUCE); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_ERROR(("Failed to launch")); - return ret; - } - - ML_VERBOSE(10, ("Blocking NB allreduce is done")); - - return OMPI_SUCCESS; -} - -int mca_coll_ml_allreduce_dispatch(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - struct ompi_communicator_t *comm, mca_coll_base_module_t *module) -{ - int rc; - bool use_extra_topo; - ompi_request_t *req; - - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - - use_extra_topo = (count > 1) ? - !ml_module->allreduce_matrix[op->op_type][dtype->id][BCOL_MULTI_ELEM_TYPE] : - !ml_module->allreduce_matrix[op->op_type][dtype->id][BCOL_SINGLE_ELEM_TYPE]; - - if (use_extra_topo) { - rc = parallel_allreduce_start(sbuf, rbuf, count, dtype, - op, comm, ml_module, &req, - ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE, - ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE); - } else { - rc = parallel_allreduce_start(sbuf, rbuf, count, dtype, - op, comm, ml_module, &req, - ML_SMALL_DATA_ALLREDUCE, - ML_LARGE_DATA_ALLREDUCE); - } - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("Failed to launch")); - return rc; - } - - ompi_request_wait_completion(req); - ompi_request_free(&req); - - return OMPI_SUCCESS; -} - -int mca_coll_ml_allreduce_dispatch_nb(void *sbuf, void *rbuf, int count, - ompi_datatype_t *dtype, ompi_op_t *op, - ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module) -{ - int rc; - bool use_extra_topo; - - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - - use_extra_topo = (count > 1) ? - !ml_module->allreduce_matrix[op->op_type][dtype->id][BCOL_MULTI_ELEM_TYPE] : - !ml_module->allreduce_matrix[op->op_type][dtype->id][BCOL_SINGLE_ELEM_TYPE]; - - if (use_extra_topo) { - rc = parallel_allreduce_start(sbuf, rbuf, count, dtype, - op, comm, ml_module, req, - ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE, - ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE); - } else { - rc = parallel_allreduce_start(sbuf, rbuf, count, dtype, - op, comm, ml_module, req, - ML_SMALL_DATA_ALLREDUCE, - ML_LARGE_DATA_ALLREDUCE); - } - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("Failed to launch")); - return rc; - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_barrier.c b/ompi/mca/coll/ml/coll_ml_barrier.c deleted file mode 100644 index ce593be5194..00000000000 --- a/ompi/mca/coll/ml/coll_ml_barrier.c +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "opal/threads/mutex.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/coll/coll.h" -#include "opal/sys/atomic.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" - -static void mca_coll_ml_barrier_task_setup( - mca_coll_ml_task_status_t *task_status, - int index, mca_coll_ml_compound_functions_t *func) -{ - task_status->rt_num_dependencies = func->num_dependencies; - task_status->rt_num_dependent_tasks = func->num_dependent_tasks; - task_status->rt_dependent_task_indices = func->dependent_task_indices; -} - -static int mca_coll_ml_barrier_launch(mca_coll_ml_module_t *ml_module, - ompi_request_t **req) -{ - opal_free_list_item_t *item; - mca_coll_ml_collective_operation_progress_t *coll_op; - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL; - - /* allocate an ml buffer for signaling purposes */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - - /* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */ - item = opal_free_list_wait (&(ml_module->coll_ml_collective_descriptors)); - - coll_op = (mca_coll_ml_collective_operation_progress_t *) item; - assert(NULL != coll_op); - - ML_VERBOSE(10, ("Get coll request %p", coll_op)); - - MCA_COLL_ML_OP_BASIC_SETUP(coll_op, 0, 0, NULL, NULL, ml_module->coll_ml_barrier_function); - - coll_op->fragment_data.buffer_desc = src_buffer_desc; - coll_op->dag_description.num_tasks_completed = 0; - - coll_op->variable_fn_params.buffer_index = src_buffer_desc->buffer_index; - - coll_op->variable_fn_params.sequence_num = - OPAL_THREAD_ADD32(&(ml_module->collective_sequence_num), 1); - - /* Pointer to a coll finalize function */ - coll_op->process_fn = NULL; - - (*req) = &coll_op->full_message.super; - - OMPI_REQUEST_INIT((*req), false); - - (*req)->req_status._cancelled = 0; - (*req)->req_state = OMPI_REQUEST_ACTIVE; - (*req)->req_status.MPI_ERROR = OMPI_SUCCESS; - - /* Set order info if there is a bcol needs ordering */ - MCA_COLL_ML_SET_ORDER_INFO(coll_op, 1); - - return mca_coll_ml_generic_collectives_launcher(coll_op, mca_coll_ml_barrier_task_setup); -} - -/** - * Hierarchical blocking barrier - */ -int mca_coll_ml_barrier_intra(struct ompi_communicator_t *comm, - mca_coll_base_module_t *module) -{ - int rc; - ompi_request_t *req; - - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - -#if OPAL_ENABLE_DEBUG - static int barriers_count = 0; -#endif - - ML_VERBOSE(10, ("Barrier num %d start.", ++barriers_count)); - - rc = mca_coll_ml_barrier_launch(ml_module, &req); - if (OPAL_UNLIKELY(rc != OMPI_SUCCESS)) { - ML_ERROR(("Failed to launch a barrier.")); - return rc; - } - - /* Blocking barrier */ - ompi_request_wait_completion(req); - ompi_request_free(&req); - - ML_VERBOSE(10, ("Barrier num %d was done.", barriers_count)); - - return OMPI_SUCCESS; -} - -/** - * Hierarchical non-blocking barrier - */ -int mca_coll_ml_ibarrier_intra(struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module) -{ - int rc; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - -#if OPAL_ENABLE_DEBUG - static int barriers_count = 0; -#endif - - ML_VERBOSE(10, ("IBarrier num %d start.", ++barriers_count)); - - rc = mca_coll_ml_barrier_launch(ml_module, req); - if (OPAL_UNLIKELY(rc != OMPI_SUCCESS)) { - ML_ERROR(("Failed to launch a barrier.")); - return rc; - } - - ML_VERBOSE(10, ("IBarrier num %d was done.", barriers_count)); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_bcast.c b/ompi/mca/coll/ml/coll_ml_bcast.c deleted file mode 100644 index 891838f9442..00000000000 --- a/ompi/mca/coll/ml/coll_ml_bcast.c +++ /dev/null @@ -1,849 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include -#include - -#include "opal/threads/mutex.h" -#include "opal/sys/atomic.h" - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/bcol.h" - -#include "coll_ml.h" -#include "coll_ml_inlines.h" -#include "coll_ml_colls.h" -#include "coll_ml_allocation.h" - -#define ML_BUFFER_ALLOC_WAIT(ml, buffer) \ -do { \ - buffer = mca_coll_ml_alloc_buffer(ml); \ - while (NULL == buffer) { \ - opal_progress(); \ - buffer = mca_coll_ml_alloc_buffer(ml); \ - } \ -} while (0) - -#define COLL_ML_SETUP_ORDERING_INFO(op, last, prev) \ -do { \ - /* Don't change order of commands !!!! */ \ - (op)->prev_frag = prev; \ - (op)->fragment_data.message_descriptor->last_started_frag = last; \ - /* op->next_to_process_frag = NULL; */ \ -} while (0) - -#define ALLOCATE_AND_PACK_CONTIG_BCAST_FRAG(ml_module, op, coll_index, root, \ - total_len, frag_len, buf, ml_buff_desc) \ -do { \ - op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, \ - ml_module->coll_ml_bcast_functions[coll_index], \ - buf, buf, \ - total_len, \ - 0 /* offset for first pack */); \ - if (OPAL_LIKELY(frag_len > 0)) { \ - if (ompi_comm_rank(ml_module->comm) == root) { \ - /* single frag, pack the data */ \ - memcpy((void *)(uintptr_t)(ml_buff_desc)->data_addr, \ - buf, frag_len); \ - /* No unpack for root */ \ - op->process_fn = NULL; \ - } else { \ - op->process_fn = mca_coll_ml_bcast_small_unpack_data; \ - } \ - } \ - op->full_message.n_bytes_scheduled = frag_len; \ -} while (0) - -#define SMALL_BCAST 0 -#define LARGE_BCAST (SMALL_BCAST + 1) - -/* bcast data unpack */ -static int mca_coll_ml_bcast_converter_unpack_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - struct iovec iov; - uint32_t iov_count = 1; - size_t max_data = 0; - - mca_coll_ml_collective_operation_progress_t *next_op; - mca_coll_ml_module_t *ml_module = - (mca_coll_ml_module_t *) coll_op->coll_module; - - size_t max_index = - ml_module->payload_block->num_banks * ml_module->payload_block->num_buffers_per_bank; - - bool is_first = true; - int ret; - - /* Check if the fragment delivered in order */ - if (coll_op->fragment_data.buffer_desc->buffer_index != - coll_op->fragment_data.message_descriptor->next_expected_index) { - mca_coll_ml_collective_operation_progress_t *prev_coll_op = coll_op->prev_frag; - assert(NULL == prev_coll_op->next_to_process_frag); - /* make sure that previous process will have pointer to the out - of order process */ - prev_coll_op->next_to_process_frag = coll_op; - assert(!(coll_op->pending & REQ_OUT_OF_ORDER)); - coll_op->pending |= REQ_OUT_OF_ORDER; - /* we will unpack it later */ - ML_VERBOSE(10, ("Get %d expecting %d previous %d", - coll_op->fragment_data.buffer_desc->buffer_index, - coll_op->fragment_data.message_descriptor->next_expected_index, - prev_coll_op->fragment_data.buffer_desc->buffer_index)); - return ORTE_ERR_NO_MATCH_YET; - } - - do { - iov.iov_len = coll_op->fragment_data.fragment_size; - iov.iov_base = (void *)((uintptr_t) coll_op->fragment_data.buffer_desc->data_addr); - - ML_VERBOSE(10, ("Data unpack with convertern index %d", - coll_op->fragment_data.buffer_desc->buffer_index)); - - opal_convertor_unpack(&coll_op->fragment_data.message_descriptor->recv_convertor, - &iov, &iov_count, &max_data); - - /* update next index */ - ++coll_op->fragment_data.message_descriptor->next_expected_index; - if (coll_op->fragment_data.message_descriptor->next_expected_index >= max_index) { - coll_op->fragment_data.message_descriptor->next_expected_index = 0; - } - - /* Return to queue if the packet is done, - the exeption is first packet, we release it later. - */ - next_op = coll_op->next_to_process_frag; - coll_op->next_to_process_frag = NULL; - if ((!is_first) && - (0 != coll_op->fragment_data.offset_into_user_buffer)) { - assert(coll_op->pending & REQ_OUT_OF_ORDER); - coll_op->pending ^= REQ_OUT_OF_ORDER; - /* Pasha: On one hand - I'm not sure that conceptually it is right place to call buffer recycling. Potentially, - coll_ml_fragment_completion_processing() sounds like right place for out of order unpack/sync handling. - * On the other hand - non contiguous data is not supper common and we would like to minimize effect on critical pass - * for non contiguous data types. */ - ret = mca_coll_ml_buffer_recycling(coll_op); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return OMPI_ERROR; - } - - CHECK_AND_RECYCLE(coll_op); - } - - coll_op = next_op; - is_first = false; - } while (NULL != coll_op); - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_bcast_small_unpack_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - void * dest = (void *)((uintptr_t) coll_op->full_message.dest_user_addr + - (uintptr_t) coll_op->full_message.n_bytes_delivered); - void * src = (void *)((uintptr_t) coll_op->fragment_data.buffer_desc->data_addr); - - memcpy(dest, src, coll_op->fragment_data.fragment_size); - return OMPI_SUCCESS; -} - -static int mca_coll_ml_bcast_large_unpack_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - void * dest = (void *)((uintptr_t) coll_op->fragment_data.message_descriptor->dest_user_addr + - (uintptr_t) coll_op->fragment_data.offset_into_user_buffer); - void * src = (void *)((uintptr_t) coll_op->fragment_data.buffer_desc->data_addr); - - memcpy(dest, src, coll_op->fragment_data.fragment_size); - return OMPI_SUCCESS; -} - -static int mca_coll_ml_bcast_frag_converter_progress(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - /* local variables */ - int ret, frag_len; - size_t max_data = 0; - - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL; - mca_coll_ml_collective_operation_progress_t *new_op = NULL; - mca_coll_ml_task_setup_fn_t task_setup = NULL; - mca_coll_ml_module_t *ml_module = OP_ML_MODULE(coll_op); - - /* Keep the pipeline filled with fragments */ - while (coll_op->fragment_data.message_descriptor->n_active < - mca_coll_ml_component.pipeline_depth) { - /* If an active fragment happens to have completed the collective during - * a hop into the progress engine, then don't launch a new fragment, - * instead break and return. - */ - if (coll_op->fragment_data.message_descriptor->n_bytes_scheduled - == coll_op->fragment_data.message_descriptor->n_bytes_total) { - break; - } - - /* Get an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - if (OPAL_UNLIKELY(NULL == src_buffer_desc)) { - /* If there exist outstanding fragments, then break out - * and let an active fragment deal with this later, - * there are no buffers available. - */ - if (0 < coll_op->fragment_data.message_descriptor->n_active) { - return OMPI_SUCCESS; - } - - /* It is useless to call progress from here, since - * ml progress can't be executed as result ml memsync - * call will not be completed and no memory will be - * recycled. So we put the element on the list, and we will - * progress it later when memsync will recycle some memory*/ - - /* The fragment is already on list and - * the we still have no ml resources - * Return busy */ - if (!(coll_op->pending & REQ_OUT_OF_MEMORY)) { - coll_op->pending |= REQ_OUT_OF_MEMORY; - opal_list_append(&ml_module->waiting_for_memory_list, - (opal_list_item_t *)coll_op); - } - - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - /* Get a new collective descriptor and initialize it */ - new_op = mca_coll_ml_duplicate_op_prog_single_frag_dag - (ml_module, coll_op); - /* We need this address for pointer arithmetic in memcpy */ - frag_len = ML_GET_FRAG_SIZE(coll_op, BCOL_BCAST); - /* Decide based on global flag, not variable one */ - if (coll_op->fragment_data.message_descriptor->root) { - struct iovec iov; - uint32_t iov_count = 1; - - /* OBJ_RETAIN(new_op->variable_fn_params.dtype); */ - iov.iov_base = (IOVBASE_TYPE*) src_buffer_desc->data_addr; - iov.iov_len = ml_module->small_message_thresholds[BCOL_BCAST]; - assert(0 != iov.iov_len); - - max_data = ml_module->small_message_thresholds[BCOL_BCAST]; - opal_convertor_pack(&new_op->fragment_data.message_descriptor->send_convertor, - &iov, &iov_count, &max_data); - - new_op->process_fn = NULL; - new_op->variable_fn_params.root_flag = true; - new_op->variable_fn_params.root_route = NULL; - - task_setup = OP_ML_MODULE(new_op)-> - coll_ml_bcast_functions[new_op->fragment_data.current_coll_op]-> - task_setup_fn[COLL_ML_ROOT_TASK_FN]; - } else { - new_op->process_fn = mca_coll_ml_bcast_converter_unpack_data; - new_op->variable_fn_params.root_flag = false; - new_op->variable_fn_params.root_route = coll_op->variable_fn_params.root_route; - - task_setup = OP_ML_MODULE(new_op)-> - coll_ml_bcast_functions[new_op->fragment_data.current_coll_op]-> - task_setup_fn[COLL_ML_GENERAL_TASK_FN]; - - max_data = ml_module->small_message_thresholds[BCOL_BCAST]; - mca_coll_ml_convertor_get_send_frag_size( - ml_module, &max_data, - new_op->fragment_data.message_descriptor); - } - - new_op->fragment_data.message_descriptor->n_bytes_scheduled += max_data; - new_op->fragment_data.fragment_size = max_data; - new_op->fragment_data.buffer_desc = src_buffer_desc; - - /* Setup fragment specific data */ - ++(new_op->fragment_data.message_descriptor->n_active); - - COLL_ML_SETUP_ORDERING_INFO(new_op, new_op, - new_op->fragment_data.message_descriptor->last_started_frag); - ML_VERBOSE(10, ("Start more, My index %d my prev %d", - new_op->fragment_data.buffer_desc->buffer_index, - new_op->prev_frag->fragment_data.buffer_desc->buffer_index)); - - ML_SET_VARIABLE_PARAMS_BCAST( - new_op, - OP_ML_MODULE(new_op), - frag_len, - MPI_BYTE, - src_buffer_desc, - 0, - 0, - frag_len, - src_buffer_desc->data_addr); - - /* TBD: remove buffer_size */ - new_op->variable_fn_params.buffer_size = coll_op->variable_fn_params.buffer_size; - new_op->variable_fn_params.hier_factor = coll_op->variable_fn_params.hier_factor; - - /* Set order info for new frag if there is a bcol needs ordering */ - MCA_COLL_ML_SET_NEW_FRAG_ORDER_INFO(new_op); - - /* Launch this collective !! */ - ret = mca_coll_ml_generic_collectives_append_to_queue(new_op, task_setup); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_ERROR(("Failed to launch")); - return ret; - } - } - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_bcast_frag_progress(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - /* local variables */ - int ret; - int frag_len, current_coll_op = coll_op->fragment_data.current_coll_op; - size_t dt_size; - void *buf; - - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL; - mca_coll_ml_collective_operation_progress_t *new_op = NULL; - mca_coll_ml_task_setup_fn_t task_setup = NULL; - - ompi_datatype_type_size(coll_op->variable_fn_params.dtype, &dt_size); - - /* Keep the pipeline filled with fragments */ - while (coll_op->fragment_data.message_descriptor->n_active < - coll_op->fragment_data.message_descriptor->pipeline_depth) { - /* If an active fragment happens to have completed the collective during - * a hop into the progress engine, then don't launch a new fragment, - * instead break and return. - */ - if (coll_op->fragment_data.message_descriptor->n_bytes_scheduled - == coll_op->fragment_data.message_descriptor->n_bytes_total) { - break; - } - - /* Get an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(OP_ML_MODULE(coll_op)); - if (NULL == src_buffer_desc) { - /* If there exist outstanding fragments, then break out - * and let an active fragment deal with this later, - * there are no buffers available. - */ - if (0 < coll_op->fragment_data.message_descriptor->n_active) { - return OMPI_SUCCESS; - } - - /* It is useless to call progress from here, since - * ml progress can't be executed as result ml memsync - * call will not be completed and no memory will be - * recycled. So we put the element on the list, and we will - * progress it later when memsync will recycle some memory*/ - - /* The fragment is already on list and - * the we still have no ml resources - * Return busy */ - if (!(coll_op->pending & REQ_OUT_OF_MEMORY)) { - ML_VERBOSE(10,("Out of resources %p adding to pending queue", coll_op)); - coll_op->pending |= REQ_OUT_OF_MEMORY; - opal_list_append(&((OP_ML_MODULE(coll_op))->waiting_for_memory_list), - (opal_list_item_t *) coll_op); - } else { - ML_VERBOSE(10,("Out of resources %p", coll_op)); - } - - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - /* Get a new collective descriptor and initialize it */ - new_op = mca_coll_ml_duplicate_op_prog_single_frag_dag - (OP_ML_MODULE(coll_op), coll_op); - /* We need this address for pointer arithmetic in memcpy */ - buf = coll_op->fragment_data.message_descriptor->dest_user_addr; - frag_len = ML_GET_FRAG_SIZE(coll_op, BCOL_BCAST); - - /* Decide based on global flag, not variable one */ - if (coll_op->fragment_data.message_descriptor->root) { - memcpy((void *)(uintptr_t)src_buffer_desc->data_addr, - (void *) ((uintptr_t) buf + (uintptr_t) coll_op-> - fragment_data.message_descriptor->n_bytes_scheduled) , frag_len); - - /* No unpack for root */ - new_op->process_fn = NULL; - new_op->variable_fn_params.root_flag = true; - new_op->variable_fn_params.root_route = NULL; - task_setup = OP_ML_MODULE(new_op)->coll_ml_bcast_functions[current_coll_op]-> - task_setup_fn[COLL_ML_ROOT_TASK_FN]; - - } else { - new_op->process_fn = mca_coll_ml_bcast_large_unpack_data; - new_op->variable_fn_params.root_flag = false; - new_op->variable_fn_params.root_route = coll_op->variable_fn_params.root_route; - task_setup = OP_ML_MODULE(new_op)->coll_ml_bcast_functions[current_coll_op]-> - task_setup_fn[COLL_ML_GENERAL_TASK_FN]; - } - - /* Setup fragment specific data */ - new_op->fragment_data.message_descriptor->n_bytes_scheduled += frag_len; - new_op->fragment_data.buffer_desc = src_buffer_desc; - new_op->fragment_data.fragment_size = frag_len; - new_op->fragment_data.message_descriptor->n_active++; - - ML_SET_VARIABLE_PARAMS_BCAST( - new_op, - OP_ML_MODULE(new_op), - frag_len, - MPI_BYTE, - src_buffer_desc, - 0, - 0, - frag_len, - src_buffer_desc->data_addr); - - /* Fill in bcast specific arguments */ - /* TBD: remove buffer_size */ - new_op->variable_fn_params.buffer_size = coll_op->variable_fn_params.buffer_size; - new_op->variable_fn_params.hier_factor = coll_op->variable_fn_params.hier_factor; - - /* Set order info for new frag if there is a bcol needs ordering */ - MCA_COLL_ML_SET_NEW_FRAG_ORDER_INFO(new_op); - - ML_VERBOSE(10, ("FFFF Contig + fragmentation [0-sk, 1-lk, 3-su, 4-lu] %d %d %d", - new_op->variable_fn_params.buffer_size , - new_op->fragment_data.fragment_size, - new_op->fragment_data.message_descriptor->n_bytes_scheduled)); - - /* Launch this collective !! */ - ret = mca_coll_ml_generic_collectives_append_to_queue(new_op, task_setup); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - } - - return OMPI_SUCCESS; -} - -#define BCAST_FRAGMENTATION_IS_ENABLED(module) \ - (module->bcast_fn_index_table[LARGE_BCAST] < ML_BCAST_LARGE_DATA_KNOWN) - -static inline __opal_attribute_always_inline__ - int parallel_bcast_start(void *buf, int count, struct ompi_datatype_t *dtype, - int root, mca_coll_base_module_t *module, ompi_request_t **req) -{ - size_t pack_len = 0; - size_t dt_size = 0; - bool contig = false; - int bcast_index, n_fragments = 1; - - mca_coll_ml_collective_operation_progress_t * coll_op = NULL; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL; - mca_coll_ml_task_setup_fn_t task_setup; - OPAL_PTRDIFF_TYPE lb, extent; - - /* actual starting place of the user buffer (lb added) */ - void *actual_buf; - - ML_VERBOSE(10, ("Starting bcast, mca_coll_ml_bcast_uknown_root buf: %p", buf)); - - ompi_datatype_type_size(dtype, &dt_size); - pack_len = count * dt_size; - - /* Setup data buffer */ - ML_BUFFER_ALLOC_WAIT(ml_module, src_buffer_desc); - /* Get information about memory layout */ - contig = opal_datatype_is_contiguous_memory_layout((opal_datatype_t *)dtype, count); - - ompi_datatype_get_extent (dtype, &lb, &extent); - - actual_buf = (void *) ((uintptr_t) buf + lb); - - /* Allocate collective schedule and pack message */ - if (contig) { - if (pack_len <= (size_t) ml_module->small_message_thresholds[BCOL_BCAST]) { - assert(pack_len <= ml_module->payload_block->size_buffer); - bcast_index = ml_module->bcast_fn_index_table[SMALL_BCAST]; - - ML_VERBOSE(10, ("Contig + small message %d [0-sk, 1-lk, 3-su, 4-lu]", bcast_index)); - ALLOCATE_AND_PACK_CONTIG_BCAST_FRAG(ml_module, coll_op, bcast_index, root, pack_len, - pack_len, actual_buf, src_buffer_desc); - - ML_SET_VARIABLE_PARAMS_BCAST(coll_op, ml_module, count, dtype, - src_buffer_desc, 0, 0, ml_module->payload_block->size_buffer, - (src_buffer_desc->data_addr)); - } else if (BCAST_FRAGMENTATION_IS_ENABLED(ml_module)) { - /* We moved the fragmentation decision from communication creation time to - runtime, since for large messages the if latency is not so critical */ - size_t n_dts_per_frag; - int frag_len, pipeline_depth = mca_coll_ml_component.pipeline_depth; - bcast_index = ml_module->bcast_fn_index_table[LARGE_BCAST]; - - ML_VERBOSE(10, ("Contig + fragmentation %d [0-sk, 1-lk, 3-su, 4-lu]", bcast_index)); - - /* Calculate the number of fragments required for this message */ - frag_len = (pack_len < (size_t) ml_module->small_message_thresholds[BCOL_BCAST] ? - pack_len : (size_t) ml_module->small_message_thresholds[BCOL_BCAST]); - - n_dts_per_frag = frag_len/dt_size; - n_fragments = (pack_len + dt_size*n_dts_per_frag - 1)/(dt_size*n_dts_per_frag); - pipeline_depth = (n_fragments < pipeline_depth ? n_fragments : pipeline_depth); - - ALLOCATE_AND_PACK_CONTIG_BCAST_FRAG(ml_module, coll_op, bcast_index, root, pack_len, - frag_len, actual_buf, src_buffer_desc); - ML_SET_VARIABLE_PARAMS_BCAST(coll_op, ml_module, (frag_len/dt_size), dtype, - src_buffer_desc, 0, 0, frag_len, (src_buffer_desc->data_addr)); - - coll_op->full_message.fragment_launcher = mca_coll_ml_bcast_frag_progress; - coll_op->full_message.pipeline_depth = pipeline_depth; - /* Initialize fragment specific information */ - coll_op->fragment_data.current_coll_op = bcast_index; - /* coll_op->fragment_data.message_descriptor->n_bytes_scheduled += frag_len; */ - coll_op->fragment_data.fragment_size = frag_len; - coll_op->fragment_data.message_descriptor->n_active++; - /* should be removed */ - coll_op->variable_fn_params.buffer_size = frag_len; - - ML_VERBOSE(10, ("Contig + fragmentation [0-sk, 1-lk, 3-su, 4-lu] %d %d", - coll_op->variable_fn_params.buffer_size, - coll_op->fragment_data.fragment_size)); - } else { - bcast_index = ml_module->bcast_fn_index_table[LARGE_BCAST]; - ML_VERBOSE(10, ("Contig + zero copy %d [0-sk, 1-lk, 3-su, 4-lu]", bcast_index)); - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_bcast_functions[bcast_index], - actual_buf, actual_buf, pack_len, - 0 /* offset for first pack */); - /* For large messages (bcast) this points to userbuf */ - /* Pasha: temporary work around for basesmuma, userbuf should - be removed */ - coll_op->variable_fn_params.userbuf = buf; - coll_op->process_fn = NULL; - coll_op->full_message.n_bytes_scheduled = pack_len; - - ML_SET_VARIABLE_PARAMS_BCAST(coll_op, ml_module, count, dtype, - src_buffer_desc, 0, 0, - ml_module->payload_block->size_buffer, buf); - } - } else { - /* Non contiguous data type */ - bcast_index = ml_module->bcast_fn_index_table[SMALL_BCAST]; - ML_VERBOSE(10, ("NON Contig + fragmentation %d [0-sk, 1-lk, 3-su, 4-lu]", bcast_index)); - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_bcast_functions[bcast_index], - actual_buf, actual_buf, pack_len, - 0 /* offset for first pack */); - if (OPAL_LIKELY(pack_len > 0)) { - size_t max_data = 0; - - if (ompi_comm_rank(ml_module->comm) == root) { - struct iovec iov; - uint32_t iov_count = 1; - - opal_convertor_copy_and_prepare_for_send( - ompi_mpi_local_convertor, - &dtype->super, count, buf, 0, - &coll_op->full_message.send_convertor); - - opal_convertor_get_packed_size(&coll_op->full_message.send_convertor, - &coll_op->full_message.send_converter_bytes_packed); - - coll_op->full_message.n_bytes_total = - coll_op->full_message.send_converter_bytes_packed; - - iov.iov_base = (IOVBASE_TYPE*) src_buffer_desc->data_addr; - iov.iov_len = ml_module->small_message_thresholds[BCOL_BCAST]; - max_data = ml_module->small_message_thresholds[BCOL_BCAST]; - opal_convertor_pack(&coll_op->full_message.send_convertor, - &iov, &iov_count, &max_data); - coll_op->process_fn = NULL; - coll_op->full_message.n_bytes_scheduled = max_data; - - /* We need prepare the data for future pipe line comunication */ - coll_op->full_message.fragment_launcher = mca_coll_ml_bcast_frag_converter_progress; - coll_op->full_message.pipeline_depth = mca_coll_ml_component.pipeline_depth; - coll_op->full_message.root = true; - - } else { - opal_convertor_copy_and_prepare_for_send( - ompi_mpi_local_convertor, - &dtype->super, count, NULL, 0, - &coll_op->full_message.dummy_convertor); - - /* In non-root case we use it for #bytes remaining to receive */ - opal_convertor_get_packed_size(&coll_op->full_message.dummy_convertor, - &coll_op->full_message.send_converter_bytes_packed); - - opal_convertor_copy_and_prepare_for_recv( - ompi_mpi_local_convertor, - &dtype->super, count, buf, 0, - &coll_op->full_message.recv_convertor); - - opal_convertor_get_unpacked_size(&coll_op->full_message.recv_convertor, - &coll_op->full_message.recv_converter_bytes_packed); - - coll_op->full_message.root = false; - coll_op->full_message.n_bytes_total = - coll_op->full_message.recv_converter_bytes_packed; - coll_op->process_fn = mca_coll_ml_bcast_converter_unpack_data; - - coll_op->full_message.fragment_launcher = mca_coll_ml_bcast_frag_converter_progress; - coll_op->full_message.pipeline_depth = mca_coll_ml_component.pipeline_depth; - - max_data = ml_module->small_message_thresholds[BCOL_BCAST]; - coll_op->full_message.dummy_conv_position = 0; - mca_coll_ml_convertor_get_send_frag_size( - ml_module, &max_data, - &coll_op->full_message); - - coll_op->full_message.n_bytes_scheduled = max_data; - } - } - coll_op->fragment_data.current_coll_op = bcast_index; - coll_op->fragment_data.message_descriptor->n_active++; - coll_op->fragment_data.fragment_size = coll_op->full_message.n_bytes_scheduled; - - /* Set initial index */ - coll_op->full_message.next_expected_index = src_buffer_desc->buffer_index; - - /* Prepare linking information for future frags */ - COLL_ML_SETUP_ORDERING_INFO(coll_op, coll_op, NULL); - - /* Since the data is already packed we will use MPI_BYTE and byte count as datatype */ - ML_SET_VARIABLE_PARAMS_BCAST(coll_op, ml_module, coll_op->full_message.n_bytes_scheduled, MPI_BYTE, - src_buffer_desc, 0, 0, ml_module->payload_block->size_buffer,(src_buffer_desc->data_addr)); - - n_fragments = (coll_op->full_message.n_bytes_total + - ml_module->small_message_thresholds[BCOL_BCAST] - 1) / ml_module->small_message_thresholds[BCOL_BCAST]; - } - - coll_op->variable_fn_params.hier_factor = 1; - coll_op->fragment_data.buffer_desc = src_buffer_desc; - - /* Set order info if there is a bcol needs ordering */ - MCA_COLL_ML_SET_ORDER_INFO(coll_op, n_fragments); - - if (ompi_comm_rank(ml_module->comm) == root) { - coll_op->full_message.root = - coll_op->variable_fn_params.root_flag = true; - coll_op->variable_fn_params.root_route = NULL; - task_setup = ml_module->coll_ml_bcast_functions[bcast_index]-> - task_setup_fn[COLL_ML_ROOT_TASK_FN]; - } else { - coll_op->full_message.root = - coll_op->variable_fn_params.root_flag = false; - - coll_op->variable_fn_params.root_route = - (NULL == coll_op->coll_schedule->topo_info->route_vector ? - NULL : &coll_op->coll_schedule->topo_info->route_vector[root]); - - task_setup = ml_module->coll_ml_bcast_functions[bcast_index]-> - task_setup_fn[COLL_ML_GENERAL_TASK_FN]; - } - - *req = &coll_op->full_message.super; - return mca_coll_ml_generic_collectives_launcher(coll_op, task_setup); -} - -int mca_coll_ml_parallel_bcast(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module) -{ - int ret; - ompi_request_t *req; - - ret = parallel_bcast_start(buf, count, dtype, root, module, &req); - if (OPAL_UNLIKELY(ret != OMPI_SUCCESS)) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - - /* Blocking bcast */ - ompi_request_wait_completion(req); - ompi_request_free(&req); - - ML_VERBOSE(10, ("Bcast is done mca_coll_ml_bcast_known")); - - return OMPI_SUCCESS; -} - -int mca_coll_ml_parallel_bcast_nb(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module) -{ - int ret; - - ret = parallel_bcast_start(buf, count, dtype, root, module, req); - if (OPAL_UNLIKELY(ret != OMPI_SUCCESS)) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - - ML_VERBOSE(10, ("Bcast is done mca_coll_ml_bcast_known")); - - return OMPI_SUCCESS; -} - -int mca_coll_ml_bcast_sequential_root(void *buf, int count, struct ompi_datatype_t *dtype, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module) -{ - - /* local variables */ - int ret, fn_idx; - size_t pack_len = 0; - size_t dt_size = 0; - - mca_coll_ml_collective_operation_progress_t * coll_op = NULL; - mca_coll_ml_compound_functions_t *fixed_schedule; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) module; - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL; - mca_bcol_base_coll_fn_desc_t *func; - OPAL_PTRDIFF_TYPE lb, extent; - - /* actual starting place of the user buffer (lb added) */ - void *actual_buf; - - ML_VERBOSE(10, ("Starting static bcast, small messages")); - - assert(NULL != dtype); - /* Calculate size of the data, - * on this stage only contiguous data is supported */ - ompi_datatype_type_size(dtype, &dt_size); - pack_len = count * dt_size; - ompi_datatype_get_extent (dtype, &lb, &extent); - - actual_buf = (void *) ((uintptr_t) buf + lb); - - /* Setup data buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - /* Allocate collective schedule and pack message */ - if (pack_len <= (size_t) ml_module->small_message_thresholds[BCOL_BCAST]) { - /* The len of the message can not be larger than ML buffer size */ - assert(pack_len <= ml_module->payload_block->size_buffer); - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_bcast_functions[ML_BCAST_SMALL_DATA_SEQUENTIAL], - actual_buf, actual_buf, pack_len, - 0 /* offset for first pack */); - if (ompi_comm_rank(comm) == root) { - /* single frag, pack the data */ - memcpy((void *)(uintptr_t)src_buffer_desc->data_addr, - buf, pack_len); - /* No unpack for root */ - coll_op->process_fn = NULL; - } else { - coll_op->process_fn = mca_coll_ml_bcast_small_unpack_data; - } - - coll_op->variable_fn_params.sbuf = - src_buffer_desc->data_addr; - } else { - ML_VERBOSE(10, ("ML_BCAST_LARGE_DATA_KNOWN case.")); - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_bcast_functions[ML_BCAST_LARGE_DATA_SEQUENTIAL], - actual_buf, actual_buf, pack_len, - 0 /* offset for first pack */); - /* For large messages (bcast) this points to userbuf */ - /* Pasha: temporary work around for basesmuma, userbuf should - be removed */ - coll_op->variable_fn_params.userbuf = - coll_op->variable_fn_params.sbuf = actual_buf; - - coll_op->process_fn = NULL; - } - - /* Fill in the function arguments */ - coll_op->variable_fn_params.sequence_num = - OPAL_THREAD_ADD32(&(ml_module->collective_sequence_num), 1); - coll_op->variable_fn_params.count = count; - coll_op->variable_fn_params.dtype = dtype; - - coll_op->variable_fn_params.buffer_index = src_buffer_desc->buffer_index; - coll_op->variable_fn_params.src_desc = src_buffer_desc; - coll_op->variable_fn_params.sbuf_offset = 0; - coll_op->variable_fn_params.rbuf_offset = 0; - - /* pasha - why we duplicate it ? */ - coll_op->fragment_data.buffer_desc = src_buffer_desc; - - /* pack data into payload buffer - NOTE: assume no fragmenation at this stage */ - if (ompi_comm_rank(comm) == root) { - coll_op->variable_fn_params.root_flag = true; - coll_op->variable_fn_params.root_route = - &coll_op->coll_schedule->topo_info->route_vector[root]; - - coll_op->full_message.n_bytes_scheduled = pack_len; - } else { - coll_op->variable_fn_params.root_flag = false; - coll_op->variable_fn_params.root_route = - &coll_op->coll_schedule->topo_info->route_vector[root]; - } - - /* seems like we should fix a schedule here and now */ - fixed_schedule = coll_op->coll_schedule-> - comp_fn_arr[coll_op->variable_fn_params.root_route->level]; - - /* now we set this schedule as the compound function list */ - coll_op->coll_schedule->component_functions = fixed_schedule; - - coll_op->sequential_routine.current_active_bcol_fn = 0; - - while (true) { - /* ready, aim, fire collective(s)!! */ - fn_idx = coll_op->sequential_routine.current_active_bcol_fn; - - func = fixed_schedule[fn_idx].bcol_function; - ret = func->coll_fn(&coll_op->variable_fn_params, - (struct mca_bcol_base_function_t *) &fixed_schedule[fn_idx].constant_group_data); - /* set the coll_fn_started flag to true */ - if (BCOL_FN_COMPLETE == ret) { - /* done with this routine, bump the active counter */ - coll_op->sequential_routine.current_active_bcol_fn++; - coll_op->variable_fn_params.root_flag = true; - /* check for collective completion */ - if (coll_op->sequential_routine.current_active_bcol_fn == - coll_op->coll_schedule->n_fns) { - /* handle fragment completion */ - ret = coll_ml_fragment_completion_processing(coll_op); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - mca_coll_ml_abort_ml("Failed to run coll_ml_fragment_completion_processing"); - } - - /* break out of while loop */ - break; - } - } else { - /* put entire collective opperation onto sequential queue */ - opal_list_append(&mca_coll_ml_component.sequential_collectives, - (opal_list_item_t *) coll_op); - break; - } - } - - /* Blocking bcast */ - ompi_request_wait_completion(&coll_op->full_message.super); - ompi_request_free((ompi_request_t **) &coll_op); - - ML_VERBOSE(10, ("Bcast is done")); - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_colls.h b/ompi/mca/coll/ml/coll_ml_colls.h deleted file mode 100644 index 35bb4da072a..00000000000 --- a/ompi/mca/coll/ml/coll_ml_colls.h +++ /dev/null @@ -1,552 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_COLL_ML_COLLS_H -#define MCA_COLL_ML_COLLS_H - -#include "ompi_config.h" -#include "ompi/mca/bcol/bcol.h" - -#define COLL_ML_FN_NAME_LEN 256 - - -/* utility information used to coordinate activities, such as resource - * management between different functions in the hierarchy - */ -struct mca_coll_ml_utility_data_t { - - /* RLG - temp fix !!!! - really need to remove this, but right now - do not want to change the signature of the collective primitives to - use coll_ml_utility_data_t rather than mca_bcol_base_function_t */ - int dummy; - - /* module */ - struct mca_bcol_base_module_t *bcol_module; - - /* */ - int index_in_consecutive_same_bcol_calls; - - /* number of times functions from this bcol are called in order */ - int n_of_this_type_in_a_row; - - /* number of times functions from this module are called - * in the collective operation. */ - int n_of_this_type_in_collective; - int index_of_this_type_in_collective; - -}; -typedef struct mca_coll_ml_utility_data_t mca_coll_ml_utility_data_t; - - -/* forward declaration */ -struct mca_coll_ml_collective_operation_progress_t; -struct mca_coll_ml_task_status_t; - -typedef int (* mca_coll_ml_process_op_fn_t) - (struct mca_coll_ml_collective_operation_progress_t *coll_op); - -typedef int (* mca_coll_ml_task_comp_fn_t) - (struct mca_coll_ml_task_status_t *coll_op); - -typedef int (* mca_coll_ml_fragment_launch_fn_t) - ( struct mca_coll_ml_collective_operation_progress_t *coll_op); - -typedef int (* mca_coll_ml_sequential_task_setup_fn_t) - ( struct mca_coll_ml_collective_operation_progress_t *coll_op); -/* This data structure defines the dependencies for a given - * compound operation. We will use this as a basis for implementing - * collective operations. - */ -struct mca_coll_ml_compound_functions_t { - /* label */ - char fn_name[COLL_ML_FN_NAME_LEN]; - - /* hierarchy level that is used for this bcol */ - int h_level; - - /* the list of functions that make up this task */ - /* coll_bcol_collective_description_t *bcol_function; */ - mca_bcol_base_coll_fn_desc_t *bcol_function; - /* task completion function for this compound function */ - mca_coll_ml_task_comp_fn_t task_comp_fn; - - /* module specific information that is a constant on a per group - * basis - */ - mca_coll_ml_utility_data_t constant_group_data; - - /* number of dependencies to be satified before these function can be - * started */ - int num_dependencies; - - /* - * number of notifications to perform on completion. The assumption - * is that a counter will be incremented. - */ - int num_dependent_tasks; - - /* - * pointers to counters that need be updated. This assumes - * an array of tasks is used to describe the ML level - * collective operation, with these indecies referencing elements - * in this array. - */ - int *dependent_task_indices; - -}; - -typedef struct mca_coll_ml_compound_functions_t mca_coll_ml_compound_functions_t; - -/* Forward declaration for operation_description_t */ -struct mca_coll_ml_module_t; - -enum { - COLL_ML_GENERAL_TASK_FN, - COLL_ML_ROOT_TASK_FN, - COLL_ML_MAX_TASK_FN -}; - -enum { - SEQ_TASK_NOT_STARTED, - SEQ_TASK_PENDING, - SEQ_TASK_IN_PROG -}; - -typedef void (*mca_coll_ml_task_setup_fn_t) (struct mca_coll_ml_task_status_t *task_status, int index, struct mca_coll_ml_compound_functions_t *func); - -/* - * Collective operation definition - */ -struct mca_coll_ml_collective_operation_description_t { - - /* - * Type of collective opeartion - there are two types: - * 1) sequential progress through the collectives is sufficient - * 2) general treatment, popping tasks onto execution queus is needed. - */ - int progress_type; - - struct mca_coll_ml_topology_t *topo_info; - - /* - * number of functions in collective operation - */ - int n_fns; - - /* - * list of functions - */ - mca_coll_ml_compound_functions_t *component_functions; - - /* - * array of lists of functions - */ - mca_coll_ml_compound_functions_t **comp_fn_arr; - - /* - * indices into the list - fixes a sequential schedule - */ - int *sch_idx; - - /* - * Task setup functions, so far we have only 3 - root and non-root - */ - mca_coll_ml_task_setup_fn_t task_setup_fn[COLL_ML_MAX_TASK_FN]; - - /* number of functions are called for bcols need ordering */ - int n_fns_need_ordering; -}; -typedef struct mca_coll_ml_collective_operation_description_t - mca_coll_ml_collective_operation_description_t; - -/* Data structure used to track the state of individual bcol - * functions. This is used to track dependencies and completion - * to progress the ML level function correctly. - * - * mca_coll_ml_task_status_t will be associated with an - * mca_coll_ml_collective_operation_progress_t structure for - * the duration of the lifetime of a communicator. - * An array of task statuses will be stored with - * the mca_coll_ml_collective_operation_progress_t data structure, so - * that the taks status elements do not need to be moved back to - * a free list before they are re-used. When the ML level function - * is complete, all mca_coll_ml_task_status_t are available for - * re-use. - */ -struct mca_coll_ml_task_status_t{ - /* need to move this between lists to progress this correctly */ - opal_list_item_t item; - - /* number of dependencies satisfied */ - int n_dep_satisfied; - - /* *************************************************************** - * Pasha: - * I'm adding to the status: num_dependencies, num_dependent_tasks and - * dependent_task_indices. The information originally resided on mca_coll_ml_compound_functions_t. - * For collective operation with static nature it is not problem. - * But for Bcast operation, where run time parameters, like root, actually - * define the dependency. rt prefix mean run-time. - */ - - /* number of dependencies to be satisfied before these function can be - * started */ - int rt_num_dependencies; - - /* - * number of notifications to perform on completion. The assumption - * is that a counter will be incremented. - */ - int rt_num_dependent_tasks; - - /* - * pointers to counters that need be updated. This assumes - * an array of tasks is used to describe the ML level - * collective operation, with these indecies referencing elements - * in this array. - */ - int *rt_dependent_task_indices; - /* - * - * ***************************************************************/ - - /* index in collective schedule */ - int my_index_in_coll_schedule; - - /* function pointers */ - mca_bcol_base_coll_fn_desc_t *bcol_fn; - - /* association with a specific collective task - the ML - * mca_coll_ml_collective_operation_progress_t stores the - * specific function parameters */ - struct mca_coll_ml_collective_operation_progress_t *ml_coll_operation; - - mca_coll_ml_task_comp_fn_t task_comp_fn; -}; -typedef struct mca_coll_ml_task_status_t mca_coll_ml_task_status_t; - -typedef enum mca_coll_ml_pending_type_t { - REQ_OUT_OF_ORDER = 1, - REQ_OUT_OF_MEMORY = 1 << 1 -} mca_coll_ml_pending_type_t; - -/* Forward declaration */ -struct mca_bcol_base_payload_buffer_desc_t; -/* Data structure used to track ML level collective operation - * progress. - */ -struct mca_coll_ml_collective_operation_progress_t { - /* need this to put on a list properly */ - /* Full message information */ - struct full_message_t { - /* make this a list item */ - ompi_request_t super; - /* Next expected fragment. - * It used for controling order of converter unpack operation */ - size_t next_expected_index; - /* Pointer to last intilized fragment. - * It used for controling order of converter unpack operation */ - struct mca_coll_ml_collective_operation_progress_t *last_started_frag; - /* destination data address in user memory */ - void *dest_user_addr; - /* source data address in user memory */ - void *src_user_addr; - /* total message size */ - size_t n_bytes_total; - /* per-process total message size - relevant for operations - * such as gather and scatter, where each rank has it's - * own unique data - */ - size_t n_bytes_per_proc_total; - size_t max_n_bytes_per_proc_total; - /* data processes - from a local perspective */ - size_t n_bytes_delivered; - /* current offset - where to continue with next fragment */ - size_t n_bytes_scheduled; - /* number of fragments needed to process this message */ - size_t n_fragments; - /* number of active frags */ - int n_active; - /* actual pipeline depth */ - int pipeline_depth; - /* am I the real root of the collective ? */ - bool root; - /* collective fragment launcher */ - mca_coll_ml_fragment_launch_fn_t fragment_launcher; - /* is data contingous */ - bool send_data_continguous; - bool recv_data_continguous; - /* data type count */ - int64_t send_count; - int64_t recv_count; - /* extent of the data types */ - size_t send_extent; - size_t recv_extent; - /* send data type */ - struct ompi_datatype_t * send_data_type; - /* needed for non-contigous buffers */ - size_t offset_into_send_buffer; - /* receive data type */ - struct ompi_datatype_t * recv_data_type; - /* needed for non-contigous buffers */ - size_t offset_into_recv_buffer; - /* Convertors for non contigous data */ - opal_convertor_t send_convertor; - opal_convertor_t recv_convertor; - /* Will be used by receiver for #bytes calc in the next frag */ - opal_convertor_t dummy_convertor; - size_t dummy_conv_position; - /* Size of packed data */ - size_t send_converter_bytes_packed; - size_t recv_converter_bytes_packed; - /* In case if ordering is needed: order num for next frag */ - int next_frag_num; - /* The variable is used by non-blocking memory synchronization code - * for caching bank index */ - int bank_index_to_recycle; - /* need a handle for collective progress e.g. alltoall*/ - bcol_fragment_descriptor_t frag_info; - } full_message; - - /* collective operation being progressed */ - mca_coll_ml_collective_operation_description_t *coll_schedule; - /* */ - mca_coll_ml_process_op_fn_t process_fn; - - mca_coll_base_module_t *coll_module; - - /* If not null , we have to release next fragment */ - struct mca_coll_ml_collective_operation_progress_t *next_to_process_frag; - /* pointer to previous fragment */ - struct mca_coll_ml_collective_operation_progress_t *prev_frag; - /* This flag marks that the fragment is pending on the waiting - * to be processed prior to recycling - */ - enum mca_coll_ml_pending_type_t pending; - - /* Fragment data */ - struct fragment_data_t { - /* current buffer pointer - offset (in bytes) into the user data */ - size_t offset_into_user_buffer; - size_t offset_into_user_buffer_per_proc; - - /* amount of data (in bytes) in this fragment - amount of data - * actually processed */ - size_t fragment_size; - size_t per_rank_fragment_size; - size_t data_type_count_per_frag; - - /* pointer to full message progress data */ - struct full_message_t *message_descriptor; - - /* ML buffer descriptor attached to this buffer */ - struct mca_bcol_base_payload_buffer_desc_t *buffer_desc; - /* handle for collective progress, e.g. alltoall */ - bcol_fragment_descriptor_t bcol_fragment_desc; - - /* Which collective algorithm */ - int current_coll_op; - } fragment_data; - - /* specific function parameters */ - /* the assumption is that the variable parameters passed into - * the ML level function will persist until the collective operation - * is complete. For a blocking function this is until the collective - * function is exited, and for nonblocking collective functions this - * is until test or wait completes the collective. - */ - int global_root; - bcol_function_args_t variable_fn_params; - - struct{ - /* current active function - for sequential algorithms */ - int current_active_bcol_fn; - - /* current function status - not started, or in progress. - * When the routine has completed, the active bcol index is - * incremented, so no need to keep track of a completed - * status. - */ - int current_bcol_status; - - /* use this call back to setup algorithm specific info - after each level necessary - */ - mca_coll_ml_sequential_task_setup_fn_t seq_task_setup; - - } sequential_routine; - - struct{ - /* - * BCOL function status - individual elements will be posted to - * ml level component queues, as appropriate. - */ - mca_coll_ml_task_status_t *status_array; - - /* number of completed tasks - need this for collective completion. - * Resource completion is tracked by each BCOL module . - */ - int num_tasks_completed; - } dag_description; -}; -typedef struct mca_coll_ml_collective_operation_progress_t -mca_coll_ml_collective_operation_progress_t; -OBJ_CLASS_DECLARATION(mca_coll_ml_collective_operation_progress_t); - -#define OP_ML_MODULE(op) ((mca_coll_ml_module_t *)((op)->coll_module)) -#define GET_COMM(op) ((OP_ML_MODULE(op))->comm) -#define IS_COLL_SYNCMEM(op) (ML_MEMSYNC == op->fragment_data.current_coll_op) - -#define CHECK_AND_RECYCLE(op) \ -do { \ - if (0 == (op)->pending) { \ - /* Caching 2 values that we can't to touch on op after returing it */ \ - /* back to the free list (free list may release memory on distruct )*/ \ - struct ompi_communicator_t *comm = GET_COMM(op); \ - bool is_coll_sync = IS_COLL_SYNCMEM(op); \ - ML_VERBOSE(10, ("Releasing %p", op)); \ - OMPI_REQUEST_FINI(&(op)->full_message.super); \ - opal_free_list_return (&(((mca_coll_ml_module_t *)(op)->coll_module)-> \ - coll_ml_collective_descriptors), \ - (opal_free_list_item_t *)op); \ - /* Special check for memory synchronization completion */ \ - /* We have to return it first to free list, since the communicator */ \ - /* release potentially may trigger ML module distraction and having */ \ - /* the element not on the list may cause memory leak. */ \ - if (OPAL_UNLIKELY(is_coll_sync)) { \ - if (OMPI_COMM_IS_INTRINSIC(comm)) { \ - opal_show_help("help-mpi-coll-ml.txt", \ - "coll-ml-check-fatal-error", true, \ - comm->c_name); \ - ompi_mpi_abort(comm, 6); \ - } else { \ - opal_show_help("help-mpi-coll-ml.txt", \ - "coll-ml-check-error", true, \ - comm->c_name); \ - /* After this point it is UNSAFE to touch ml module */ \ - /* or communicator */ \ - OBJ_RELEASE(comm); \ - } \ - } \ - } \ -} while (0) - -#define MCA_COLL_ML_SET_ORDER_INFO(coll_progress, num_frags) \ -do { \ - mca_coll_ml_topology_t *topo = (coll_progress)->coll_schedule->topo_info; \ - bcol_function_args_t *variable_params = &(coll_progress)->variable_fn_params; \ - if (topo->topo_ordering_info.num_bcols_need_ordering > 0) { \ - variable_params->order_info.bcols_started = 0; \ - variable_params->order_info.order_num = \ - topo->topo_ordering_info.next_order_num; \ - variable_params->order_info.n_fns_need_ordering = \ - (coll_progress)->coll_schedule->n_fns_need_ordering; \ - topo->topo_ordering_info.next_order_num += num_frags; \ - (coll_progress)->fragment_data.message_descriptor->next_frag_num = \ - variable_params->order_info.order_num + 1; \ - } \ -} while (0) - -#define MCA_COLL_ML_SET_NEW_FRAG_ORDER_INFO(coll_progress) \ -do { \ - mca_coll_ml_topology_t *topo = (coll_progress)->coll_schedule->topo_info; \ - if (topo->topo_ordering_info.num_bcols_need_ordering > 0) { \ - bcol_function_args_t *variable_params = &(coll_progress)->variable_fn_params; \ - struct fragment_data_t *frag_data = &(coll_progress)->fragment_data; \ - variable_params->order_info.bcols_started = 0; \ - variable_params->order_info.order_num = frag_data->message_descriptor->next_frag_num; \ - variable_params->order_info.n_fns_need_ordering = \ - (coll_progress)->coll_schedule->n_fns_need_ordering; \ - frag_data->message_descriptor->next_frag_num++; \ - } \ -} while (0) - -#define MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule) \ -do { \ - int i; \ - (schedule)->n_fns_need_ordering = 0; \ - for (i = 0; i < (schedule)->n_fns; ++i) { \ - mca_bcol_base_module_t *current_bcol = \ - (schedule)->component_functions[i].constant_group_data.bcol_module; \ - assert (NULL != current_bcol); \ - if (current_bcol->bcol_component->need_ordering) { \ - (schedule)->n_fns_need_ordering++; \ - } \ - } \ -} while (0) - -enum { - MCA_COLL_ML_NET_STREAM_SEND, - MCA_COLL_ML_NET_STREAM_RECV -}; - -static inline __opal_attribute_always_inline__ - int mca_coll_ml_convertor_prepare(ompi_datatype_t *dtype, int count, void *buff, - opal_convertor_t *convertor, int stream) -{ - size_t bytes_packed; - - if (MCA_COLL_ML_NET_STREAM_SEND == stream) { - opal_convertor_copy_and_prepare_for_send( - ompi_mpi_local_convertor, - &dtype->super, count, buff, 0, - convertor); - } else { - opal_convertor_copy_and_prepare_for_recv( - ompi_mpi_local_convertor, - &dtype->super, count, buff, 0, - convertor); - } - - opal_convertor_get_packed_size(convertor, &bytes_packed); - - return bytes_packed; -} - -static inline __opal_attribute_always_inline__ - int mca_coll_ml_convertor_pack(void *data_addr, size_t buff_size, - opal_convertor_t *convertor) -{ - struct iovec iov; - - size_t max_data = 0; - uint32_t iov_count = 1; - - iov.iov_base = (IOVBASE_TYPE*) data_addr; - iov.iov_len = buff_size; - - opal_convertor_pack(convertor, &iov, &iov_count, &max_data); - - return max_data; -} - -static inline __opal_attribute_always_inline__ - int mca_coll_ml_convertor_unpack(void *data_addr, size_t buff_size, - opal_convertor_t *convertor) -{ - struct iovec iov; - - size_t max_data = 0; - uint32_t iov_count = 1; - - iov.iov_base = (void *) (uintptr_t) data_addr; - iov.iov_len = buff_size; - - opal_convertor_unpack(convertor, &iov, &iov_count, &max_data); - - return max_data; -} -#endif /* MCA_COLL_ML_COLLS_H */ - diff --git a/ompi/mca/coll/ml/coll_ml_component.c b/ompi/mca/coll/ml/coll_ml_component.c deleted file mode 100644 index 4b4cf277c15..00000000000 --- a/ompi/mca/coll/ml/coll_ml_component.c +++ /dev/null @@ -1,449 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - * - * Most of the description of the data layout is in the - * coll_sm_module.c file. - */ - -#include "ompi_config.h" - -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/mca/coll/base/base.h" -#include "opal/mca/mpool/base/base.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/sbgp/base/base.h" - -#include "coll_ml.h" -#include "coll_ml_inlines.h" - -#include "ompi/patterns/net/netpatterns.h" -#include "coll_ml_mca.h" -#include "coll_ml_custom_utils.h" - - -/* - * Public string showing the coll ompi_ml V2 component version number - */ -const char *mca_coll_ml_component_version_string = -"Open MPI ml-V2 collective MCA component version " OMPI_VERSION; - -/* - * Local functions - */ - -static int ml_open(void); -static int ml_close(void); -static int coll_ml_progress(void); - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_coll_ml_component_t mca_coll_ml_component = { - - /* First, fill in the super */ - - .super = { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .collm_version = { - MCA_COLL_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "ml", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open, close, and register functions */ - - .mca_open_component = ml_open, - .mca_close_component = ml_close, - .mca_register_component_params = mca_coll_ml_register_params - }, - .collm_data = { - /* The component is not checkpoint ready */ - MCA_BASE_METADATA_PARAM_NONE - }, - - /* Initialization / querying functions */ - .collm_init_query = mca_coll_ml_init_query, - .collm_comm_query = mca_coll_ml_comm_query, - }, -}; - -void mca_coll_ml_abort_ml(char *message) -{ - ML_ERROR(("ML Collective FATAL ERROR: %s", message)); - /* shutdown the MPI */ - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_INTERN); -} -/* - * progress function - */ - -#define INDEX(task) ((task)->my_index_in_coll_schedule) -#define ACTIVE_L (&mca_coll_ml_component.active_tasks) -#define PENDING_L (&mca_coll_ml_component.pending_tasks) -#define SEQ_L (&mca_coll_ml_component.sequential_collectives) - -static int coll_ml_progress() -{ - - int rc = OMPI_SUCCESS; - int fn_idx; - - mca_coll_ml_task_status_t *task_status, *task_status_tmp; - mca_coll_ml_collective_operation_progress_t *seq_coll_op; - mca_coll_ml_collective_operation_progress_t *seq_coll_op_tmp; - - mca_bcol_base_module_collective_fn_primitives_t progress_fn, - coll_fn; - mca_coll_ml_utility_data_t *const_args; - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - - /* Pasha: Not sure that is it correct way to resolve the problem. - Iprobe call for progress engine. The progress engine calls for our - progress and as result the first element on the list is progressed again - and so we call for Iprobe again.... as result we get HUGE stack. - - One way to prevent it - remove the item from the list, and once you finish - to process it - put it back. - - Other way - put flag on component, if the progress is running - exit immediate. - */ - if (cm->progress_is_busy) { - /* We are already working...*/ - return OMPI_SUCCESS; - } else { - cm->progress_is_busy = true; - } - - /* progress sequential collective operations */ - /* RLG - need to do better here for parallel progress */ - OPAL_THREAD_LOCK(&(cm->sequential_collectives_mutex)); - OPAL_LIST_FOREACH_SAFE(seq_coll_op, seq_coll_op_tmp, SEQ_L, mca_coll_ml_collective_operation_progress_t) { - do { - fn_idx = seq_coll_op->sequential_routine.current_active_bcol_fn; - /* initialize the task */ - - if (SEQ_TASK_IN_PROG == seq_coll_op->sequential_routine.current_bcol_status){ - progress_fn = seq_coll_op->coll_schedule-> - component_functions[fn_idx].bcol_function->progress_fn; - } else { - /* PPP Pasha - apparently task setup should be called only here. see linr 190 */ - progress_fn = seq_coll_op->coll_schedule-> - component_functions[fn_idx].bcol_function->coll_fn; - } - - const_args = &seq_coll_op->coll_schedule->component_functions[fn_idx].constant_group_data; - /* RLG - note need to move to useing coll_ml_utility_data_t as - * collective argument, rather than mca_bcol_base_function_t - */ - rc = progress_fn(&(seq_coll_op->variable_fn_params), (mca_bcol_base_function_t *)const_args); - if (BCOL_FN_COMPLETE == rc) { - /* done with this routine */ - seq_coll_op->sequential_routine.current_active_bcol_fn++; - /* this is totally hardwired for bcast, need a general call-back */ - - fn_idx = seq_coll_op->sequential_routine.current_active_bcol_fn; - if (fn_idx == seq_coll_op->coll_schedule->n_fns) { - /* done with this collective - recycle descriptor */ - - /* remove from the progress list */ - (void) opal_list_remove_item(SEQ_L, (opal_list_item_t *)seq_coll_op); - - /* handle fragment completion */ - rc = coll_ml_fragment_completion_processing(seq_coll_op); - - if (OMPI_SUCCESS != rc) { - mca_coll_ml_abort_ml("Failed to run coll_ml_fragment_completion_processing"); - } - } else { - rc = seq_coll_op->sequential_routine.seq_task_setup(seq_coll_op); - if (OMPI_SUCCESS != rc) { - mca_coll_ml_abort_ml("Failed to run sequential task setup"); - } - - seq_coll_op->sequential_routine.current_bcol_status = SEQ_TASK_PENDING; - continue; - } - } else if (BCOL_FN_NOT_STARTED == rc) { - seq_coll_op->sequential_routine.current_bcol_status = SEQ_TASK_PENDING; - } else if (BCOL_FN_STARTED == rc) { - seq_coll_op->sequential_routine.current_bcol_status = SEQ_TASK_IN_PROG; - } - - break; - } while (true); - } - OPAL_THREAD_UNLOCK(&(cm->sequential_collectives_mutex)); - - /* general dag's */ - /* see if active tasks can be progressed */ - OPAL_THREAD_LOCK(&(cm->active_tasks_mutex)); - OPAL_LIST_FOREACH(task_status, ACTIVE_L, mca_coll_ml_task_status_t) { - /* progress task */ - progress_fn = task_status->bcol_fn->progress_fn; - const_args = &task_status->ml_coll_operation->coll_schedule-> - component_functions[INDEX(task_status)].constant_group_data; - rc = progress_fn(&(task_status->ml_coll_operation->variable_fn_params), - (mca_bcol_base_function_t *)const_args); - if (BCOL_FN_COMPLETE == rc) { - ML_VERBOSE(3, ("GOT BCOL_COMPLETED!!!!")); - rc = mca_coll_ml_task_completion_processing(&task_status, ACTIVE_L); - if (OMPI_SUCCESS != rc) { - mca_coll_ml_abort_ml("Failed to run mca_coll_ml_task_completion_processing"); - } - } else if (BCOL_FN_STARTED == rc) { - /* nothing to do */ - } else { - mca_coll_ml_abort_ml("Failed to run mca_coll_ml_task_completion_processing"); - } - } - OPAL_THREAD_UNLOCK(&(cm->active_tasks_mutex)); - - /* see if new tasks can be initiated */ - OPAL_THREAD_LOCK(&(cm->pending_tasks_mutex)); - OPAL_LIST_FOREACH_SAFE(task_status, task_status_tmp, PENDING_L, mca_coll_ml_task_status_t) { - /* check to see if dependencies are satisfied */ - int n_dependencies = task_status->rt_num_dependencies; - int n_dependencies_satisfied = task_status->n_dep_satisfied; - - if (n_dependencies == n_dependencies_satisfied) { - /* initiate the task */ - coll_fn = task_status->bcol_fn->coll_fn; - const_args = &task_status->ml_coll_operation->coll_schedule-> - component_functions[INDEX(task_status)].constant_group_data; - rc = coll_fn(&(task_status->ml_coll_operation->variable_fn_params), - (mca_bcol_base_function_t *)const_args); - if (BCOL_FN_COMPLETE == rc) { - ML_VERBOSE(3, ("GOT BCOL_COMPLETED!")); - rc = mca_coll_ml_task_completion_processing(&task_status, PENDING_L); - if (OMPI_SUCCESS != rc) { - mca_coll_ml_abort_ml("Failed to run mca_coll_ml_task_completion_processing"); - } - } else if ( BCOL_FN_STARTED == rc ) { - ML_VERBOSE(3, ("GOT BCOL_STARTED!")); - (void) opal_list_remove_item(PENDING_L, (opal_list_item_t *)task_status); - /* RLG - is there potential for deadlock here ? Need to - * look at this closely - */ - OPAL_THREAD_LOCK(&(cm->active_tasks_mutex)); - opal_list_append(ACTIVE_L, (opal_list_item_t *)task_status); - OPAL_THREAD_UNLOCK(&(cm->active_tasks_mutex)); - } else if( BCOL_FN_NOT_STARTED == rc ) { - /* nothing to do */ - ML_VERBOSE(10, ("GOT BCOL_FN_NOT_STARTED!")); - } else { - OPAL_THREAD_UNLOCK(&(cm->pending_tasks_mutex)); - /* error will be returned - RLG : need to reconsider return - * types - we have no way to convey error information - * the way the code is implemented now */ - ML_VERBOSE(3, ("GOT error !")); - rc = OMPI_ERROR; - OMPI_ERRHANDLER_RETURN(rc,MPI_COMM_WORLD,rc,"Error returned from bcol function: aborting"); - break; - } - } - } - OPAL_THREAD_UNLOCK(&(cm->pending_tasks_mutex)); - - /* return */ - cm->progress_is_busy = false; - - return rc; -} - - -static void adjust_coll_config_by_mca_param(void) -{ - /* setting bcast mca params */ - if (COLL_ML_STATIC_BCAST == mca_coll_ml_component.bcast_algorithm) { - mca_coll_ml_component.coll_config[ML_BCAST][ML_SMALL_MSG].algorithm_id = ML_BCAST_SMALL_DATA_KNOWN; - mca_coll_ml_component.coll_config[ML_BCAST][ML_LARGE_MSG].algorithm_id = ML_BCAST_LARGE_DATA_KNOWN; - } else if (COLL_ML_SEQ_BCAST == mca_coll_ml_component.bcast_algorithm) { - mca_coll_ml_component.coll_config[ML_BCAST][ML_SMALL_MSG].algorithm_id = ML_BCAST_SMALL_DATA_SEQUENTIAL; - mca_coll_ml_component.coll_config[ML_BCAST][ML_LARGE_MSG].algorithm_id = ML_BCAST_LARGE_DATA_SEQUENTIAL; - } else { /* Unknown root */ - mca_coll_ml_component.coll_config[ML_BCAST][ML_SMALL_MSG].algorithm_id = ML_BCAST_SMALL_DATA_UNKNOWN; - mca_coll_ml_component.coll_config[ML_BCAST][ML_LARGE_MSG].algorithm_id = ML_BCAST_LARGE_DATA_UNKNOWN; - } -} - -/* - * Open the component - */ -static int ml_open(void) -{ - /* local variables */ - int rc, c_idx, m_idx; - mca_coll_ml_component_t *cs = &mca_coll_ml_component; - - /* set the starting sequence number */ - cs->base_sequence_number = -1; - cs->progress_is_busy = false; - - /* If the priority is zero (default) disable the component */ - if (mca_coll_ml_component.ml_priority <= 0) { - return OMPI_ERR_NOT_AVAILABLE; - } - - /* Init memory structures (no real memory is allocated) */ - OBJ_CONSTRUCT(&cs->memory_manager, mca_coll_ml_lmngr_t); - - if (OMPI_SUCCESS != (rc = mca_base_framework_open(&ompi_sbgp_base_framework, 0))) { - fprintf(stderr," failure in open mca_sbgp_base_open \n"); - return rc; - } - if (OMPI_SUCCESS != (rc = mca_base_framework_open(&ompi_bcol_base_framework, 0))) { - fprintf(stderr," failure in open mca_bcol_base_open \n"); - return rc; - } - - /* Reset collective tunings cache */ - for (c_idx = 0; c_idx < ML_NUM_OF_FUNCTIONS; c_idx++) { - for (m_idx = 0; m_idx < ML_NUM_MSG; m_idx++) { - mca_coll_ml_reset_config(&cs->coll_config[c_idx][m_idx]); - } - } - - adjust_coll_config_by_mca_param(); - - /* Load configuration file and cache the configuration on component */ - rc = mca_coll_ml_config_file_init(); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - - - /* reigster the progress function */ - rc = opal_progress_register(coll_ml_progress); - if (OMPI_SUCCESS != rc ) { - fprintf(stderr," failed to register the ml progress function \n"); - fflush(stderr); - return rc; - } - - OBJ_CONSTRUCT(&(cs->pending_tasks_mutex), opal_mutex_t); - OBJ_CONSTRUCT(&(cs->pending_tasks), opal_list_t); - OBJ_CONSTRUCT(&(cs->active_tasks_mutex), opal_mutex_t); - OBJ_CONSTRUCT(&(cs->active_tasks), opal_list_t); - OBJ_CONSTRUCT(&(cs->sequential_collectives_mutex), opal_mutex_t); - OBJ_CONSTRUCT(&(cs->sequential_collectives), opal_list_t); - - rc = netpatterns_init(); - if (OMPI_SUCCESS != rc) { - return rc; - } - - cs->topo_discovery_fn[COLL_ML_HR_FULL] = - mca_coll_ml_fulltree_hierarchy_discovery; - - cs->topo_discovery_fn[COLL_ML_HR_ALLREDUCE] = - mca_coll_ml_allreduce_hierarchy_discovery; - - cs->topo_discovery_fn[COLL_ML_HR_NBS] = - mca_coll_ml_fulltree_exclude_basesmsocket_hierarchy_discovery; - - cs->topo_discovery_fn[COLL_ML_HR_SINGLE_PTP] = - mca_coll_ml_fulltree_ptp_only_hierarchy_discovery; - - cs->topo_discovery_fn[COLL_ML_HR_SINGLE_IBOFFLOAD] = - mca_coll_ml_fulltree_iboffload_only_hierarchy_discovery; - - cs->need_allreduce_support = false; - - return OMPI_SUCCESS; -} - -/* - * Close the component - */ -static int ml_close(void) -{ - int ret; - - mca_coll_ml_component_t *cs = &mca_coll_ml_component; - - /* There is not need to release/close resource if the - * priority was set to zero */ - if (cs->ml_priority <= 0) { - return OMPI_SUCCESS; - } - - OBJ_DESTRUCT(&cs->memory_manager); - OBJ_DESTRUCT(&cs->pending_tasks_mutex); - OBJ_DESTRUCT(&cs->pending_tasks); - OBJ_DESTRUCT(&cs->active_tasks_mutex); - OBJ_DESTRUCT(&cs->active_tasks); - OBJ_DESTRUCT(&cs->sequential_collectives_mutex); - OBJ_DESTRUCT(&cs->sequential_collectives); - - /* deregister progress function */ - ret = opal_progress_unregister(coll_ml_progress); - if (OMPI_SUCCESS != ret ) { - OMPI_ERROR_LOG(ret); - return ret; - } - - /* close the sbgp and bcol frameworks */ - if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_sbgp_base_framework))) { - OMPI_ERROR_LOG(ret); - return ret; - } - - if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_bcol_base_framework))) { - OMPI_ERROR_LOG(ret); - return ret; - } - - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_coll_ml_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - int ret; - - /* at this stage there is no reason to disaulify this component */ - /* Add here bcol init nand sbgp init */ - ret = mca_sbgp_base_init(enable_progress_threads, enable_mpi_threads); - if (OMPI_SUCCESS != ret) { - return ret; - } - - ret = mca_bcol_base_init(enable_progress_threads, enable_mpi_threads); - if (OMPI_SUCCESS != ret) { - return ret; - } - - /* done */ - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_config.c b/ompi/mca/coll/ml/coll_ml_config.c deleted file mode 100644 index aedc4aaf813..00000000000 --- a/ompi/mca/coll/ml/coll_ml_config.c +++ /dev/null @@ -1,629 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "coll_ml.h" -#include "coll_ml_inlines.h" -#include "coll_ml_config.h" -#include "coll_ml_lex.h" - -static char *key_buffer = NULL; -static size_t key_buffer_len = 0; - -typedef struct section_config_t { - char *section_name; - int section_id; - per_collective_configuration_t config; -} section_config_t; - -typedef struct coll_config_t { - char *coll_name; - int coll_id; - section_config_t section; -} coll_config_t; - -static int algorithm_name_to_id(char *name) -{ - assert (NULL != name); - if (!strcasecmp(name,"ML_BCAST_SMALL_DATA_KNOWN")) - return ML_BCAST_SMALL_DATA_KNOWN; - if (!strcasecmp(name,"ML_BCAST_SMALL_DATA_UNKNOWN")) - return ML_BCAST_SMALL_DATA_UNKNOWN; - if (!strcasecmp(name,"ML_BCAST_SMALL_DATA_SEQUENTIAL")) - return ML_BCAST_SMALL_DATA_SEQUENTIAL; - if (!strcasecmp(name,"ML_BCAST_LARGE_DATA_KNOWN")) - return ML_BCAST_LARGE_DATA_KNOWN; - if (!strcasecmp(name,"ML_BCAST_LARGE_DATA_UNKNOWN")) - return ML_BCAST_LARGE_DATA_UNKNOWN; - if (!strcasecmp(name,"ML_BCAST_LARGE_DATA_SEQUENTIAL")) - return ML_BCAST_LARGE_DATA_SEQUENTIAL; - if (!strcasecmp(name,"ML_N_DATASIZE_BINS")) - return ML_N_DATASIZE_BINS; - if (!strcasecmp(name,"ML_NUM_BCAST_FUNCTIONS")) - return ML_NUM_BCAST_FUNCTIONS; - if (!strcasecmp(name,"ML_SCATTER_SMALL_DATA_KNOWN")) - return ML_SCATTER_SMALL_DATA_KNOWN; - if (!strcasecmp(name,"ML_SCATTER_N_DATASIZE_BINS")) - return ML_SCATTER_N_DATASIZE_BINS; - if (!strcasecmp(name,"ML_SCATTER_SMALL_DATA_UNKNOWN")) - return ML_SCATTER_SMALL_DATA_UNKNOWN; - if (!strcasecmp(name,"ML_SCATTER_SMALL_DATA_SEQUENTIAL")) - return ML_SCATTER_SMALL_DATA_SEQUENTIAL; - if (!strcasecmp(name,"ML_NUM_SCATTER_FUNCTIONS")) - return ML_NUM_SCATTER_FUNCTIONS; - if (!strcasecmp(name,"ML_SMALL_DATA_ALLREDUCE")) - return ML_SMALL_DATA_ALLREDUCE; - if (!strcasecmp(name,"ML_LARGE_DATA_ALLREDUCE")) - return ML_LARGE_DATA_ALLREDUCE; - if (!strcasecmp(name,"ML_SMALL_DATA_REDUCE")) - return ML_SMALL_DATA_ALLREDUCE; - if (!strcasecmp(name,"ML_LARGE_DATA_REDUCE")) - return ML_LARGE_DATA_ALLREDUCE; - if (!strcasecmp(name,"ML_SMALL_DATA_REDUCE")) - return ML_SMALL_DATA_REDUCE; - if (!strcasecmp(name,"ML_LARGE_DATA_REDUCE")) - return ML_LARGE_DATA_REDUCE; - if (!strcasecmp(name,"ML_NUM_ALLREDUCE_FUNCTIONS")) - return ML_NUM_ALLREDUCE_FUNCTIONS; - if (!strcasecmp(name,"ML_SMALL_DATA_ALLTOALL")) - return ML_SMALL_DATA_ALLTOALL; - if (!strcasecmp(name,"ML_LARGE_DATA_ALLTOALL")) - return ML_LARGE_DATA_ALLTOALL; - if (!strcasecmp(name,"ML_NUM_ALLTOALL_FUNCTIONS")) - return ML_NUM_ALLTOALL_FUNCTIONS; - if (!strcasecmp(name,"ML_SMALL_DATA_ALLGATHER")) - return ML_SMALL_DATA_ALLGATHER; - if (!strcasecmp(name,"ML_LARGE_DATA_ALLGATHER")) - return ML_LARGE_DATA_ALLGATHER; - if (!strcasecmp(name,"ML_NUM_ALLGATHER_FUNCTIONS")) - return ML_NUM_ALLGATHER_FUNCTIONS; - if (!strcasecmp(name,"ML_SMALL_DATA_GATHER")) - return ML_SMALL_DATA_GATHER; - if (!strcasecmp(name,"ML_LARGE_DATA_GATHER")) - return ML_LARGE_DATA_GATHER; - if (!strcasecmp(name,"ML_NUM_GATHER_FUNCTIONS")) - return ML_NUM_GATHER_FUNCTIONS; - if (!strcasecmp(name,"ML_BARRIER_DEFAULT")) - return ML_BARRIER_DEFAULT; - - /* ERROR */ - return ML_UNDEFINED; -} - -static int hierarchy_name_to_id(char *name) -{ - assert (NULL != name); - if (!strcasecmp(name, "FULL_HR")) { - return COLL_ML_HR_FULL; - } - if (!strcasecmp(name, "FULL_HR_NO_BASESOCKET")) { - return COLL_ML_HR_NBS; - } - if (!strcasecmp(name, "PTP_ONLY")) { - return COLL_ML_HR_SINGLE_PTP; - } - if (!strcasecmp(name, "IBOFFLOAD_ONLY")) { - return COLL_ML_HR_SINGLE_IBOFFLOAD; - } - /* Error */ - return ML_UNDEFINED; -} - -static int section_name_to_id(char *name) -{ - assert (NULL != name); - if (!strcasecmp(name, "SMALL")) { - return ML_SMALL_MSG; - } - - if (!strcasecmp(name, "LARGE")) { - return ML_LARGE_MSG; - } - /* Error */ - return ML_UNDEFINED; -} - -static int coll_name_to_id(char *name) -{ - assert (NULL != name); - if (!strcasecmp(name, "ALLGATHER")) { - return ML_ALLGATHER; - } - if (!strcasecmp(name, "ALLGATHERV")) { - return ML_ALLGATHERV; - } - if (!strcasecmp(name, "ALLREDUCE")) { - return ML_ALLREDUCE; - } - if (!strcasecmp(name, "ALLTOALL")) { - return ML_ALLTOALL; - } - if (!strcasecmp(name, "ALLTOALLV")) { - return ML_ALLTOALLV; - } - if (!strcasecmp(name, "ALLTOALLW")) { - return ML_ALLTOALLW; - } - if (!strcasecmp(name, "ALLTOALLW")) { - return ML_ALLTOALLW; - } - if (!strcasecmp(name, "BARRIER")) { - return ML_BARRIER; - } - if (!strcasecmp(name, "BCAST")) { - return ML_BCAST; - } - if (!strcasecmp(name, "EXSCAN")) { - return ML_EXSCAN; - } - if (!strcasecmp(name, "GATHER")) { - return ML_GATHER; - } - if (!strcasecmp(name, "GATHERV")) { - return ML_GATHERV; - } - if (!strcasecmp(name, "REDUCE")) { - return ML_REDUCE; - } - if (!strcasecmp(name, "REDUCE_SCATTER")) { - return ML_REDUCE_SCATTER; - } - if (!strcasecmp(name, "SCAN")) { - return ML_SCAN; - } - if (!strcasecmp(name, "SCATTER")) { - return ML_SCATTER; - } - if (!strcasecmp(name, "SCATTERV")) { - return ML_SCATTERV; - } - - /* nonblocking functions */ - - if (!strcasecmp(name, "IALLGATHER")) { - return ML_IALLGATHER; - } - if (!strcasecmp(name, "IALLGATHERV")) { - return ML_IALLGATHERV; - } - if (!strcasecmp(name, "IALLREDUCE")) { - return ML_IALLREDUCE; - } - if (!strcasecmp(name, "IALLTOALL")) { - return ML_IALLTOALL; - } - if (!strcasecmp(name, "IALLTOALLV")) { - return ML_IALLTOALLV; - } - if (!strcasecmp(name, "IALLTOALLW")) { - return ML_IALLTOALLW; - } - if (!strcasecmp(name, "IALLTOALLW")) { - return ML_IALLTOALLW; - } - if (!strcasecmp(name, "IBARRIER")) { - return ML_IBARRIER; - } - if (!strcasecmp(name, "IBCAST")) { - return ML_IBCAST; - } - if (!strcasecmp(name, "IEXSCAN")) { - return ML_IEXSCAN; - } - if (!strcasecmp(name, "IGATHER")) { - return ML_IGATHER; - } - if (!strcasecmp(name, "IGATHERV")) { - return ML_IGATHERV; - } - if (!strcasecmp(name, "IREDUCE")) { - return ML_IREDUCE; - } - if (!strcasecmp(name, "IREDUCE_SCATTER")) { - return ML_IREDUCE_SCATTER; - } - if (!strcasecmp(name, "ISCAN")) { - return ML_ISCAN; - } - if (!strcasecmp(name, "ISCATTER")) { - return ML_ISCATTER; - } - if (!strcasecmp(name, "ISCATTERV")) { - return ML_ISCATTERV; - } - - /* Error - collecives name was not matched */ - return ML_UNDEFINED; -} -static int set_collective_name(coll_config_t *coll_config) -{ - int coll_id = - coll_name_to_id(coll_ml_config_yytext); - - if (ML_UNDEFINED == coll_id) { - return OMPI_ERROR; - } - - coll_config->coll_id = coll_id; - coll_config->coll_name = strdup(coll_ml_config_yytext); - - return OMPI_SUCCESS; -} - -static int set_section_name(section_config_t *section_config) -{ - int section_id; - - section_id = section_name_to_id(coll_ml_config_yytext); - - if (ML_UNDEFINED == section_id) { - return OMPI_ERROR; - } - - section_config->section_id = section_id; - section_config->section_name = strdup(coll_ml_config_yytext); - - return OMPI_SUCCESS; -} - -void mca_coll_ml_reset_config(per_collective_configuration_t *config) -{ - config->topology_id = ML_UNDEFINED; - config->threshold = ML_UNDEFINED; - config->algorithm_id = ML_UNDEFINED; - config->fragmentation_enabled = ML_UNDEFINED; -} - -static void reset_section(section_config_t *section_cf) -{ - if (section_cf->section_name) { - free (section_cf->section_name); - section_cf->section_name = NULL; - } - - section_cf->section_id = ML_UNDEFINED; - mca_coll_ml_reset_config(§ion_cf->config); -} - -static void reset_collective(coll_config_t *coll_cf) -{ - if (coll_cf->coll_name) { - free (coll_cf->coll_name); - coll_cf->coll_name = NULL; - } - - coll_cf->coll_id = ML_UNDEFINED; - reset_section(&coll_cf->section); -} - -/* - * String to integer; - */ -static int string_to_int(char *str) -{ - while (isspace(*str)) { - ++str; - } - - /* Nope -- just decimal, so use atoi() */ - return atoi(str); -} - -static int parse_algorithm_key(section_config_t *section, char *value) -{ - int ret; - ret = algorithm_name_to_id(value); - if (ML_UNDEFINED == ret) { - return OMPI_ERROR; - } else { - section->config.algorithm_id = ret; - } - - return OMPI_SUCCESS; -} - -static int parse_threshold_key(section_config_t *section, char *value) -{ - assert (NULL != value); - - if(!strcasecmp(value, "unlimited")) { - section->config.threshold = -1; - } else { - section->config.threshold = string_to_int(value); - } - - return OMPI_SUCCESS; -} - -static int parse_hierarchy_key(section_config_t *section, char *value) -{ - int ret; - - ret = hierarchy_name_to_id(value); - if (ML_UNDEFINED == ret) { - return OMPI_ERROR; - } - - section->config.topology_id = ret; - - return OMPI_SUCCESS; -} - -static int parse_fragmentation_key(section_config_t *section, char *value) -{ - assert (NULL != value); - - if(!strcasecmp(value, "enable")) { - section->config.fragmentation_enabled = 1; - } else if (!strcasecmp(value, "disable")) { - section->config.fragmentation_enabled = 0; - } else { - ML_ERROR(("Line %d, unexpected fragmentation value %s. Legal values are: enable/disable", - coll_ml_config_yynewlines, value)); - return OMPI_ERROR; - } - return OMPI_SUCCESS; -} - -/* Save configuration that have been collected so far */ -static int save_settings(coll_config_t *coll_config) -{ - per_collective_configuration_t *cf; - - if (ML_UNDEFINED == coll_config->coll_id || ML_UNDEFINED == coll_config->section.section_id) { - return OMPI_ERROR; - } - - cf = &mca_coll_ml_component.coll_config[coll_config->coll_id][coll_config->section.section_id]; - - cf->topology_id = coll_config->section.config.topology_id; - cf->threshold = coll_config->section.config.threshold; - cf->algorithm_id = coll_config->section.config.algorithm_id; - cf->fragmentation_enabled = coll_config->section.config.fragmentation_enabled; - - return OMPI_SUCCESS; -} - -/* - * Parse a single line - */ -static int parse_line(section_config_t *section) -{ - int val, ret = OMPI_SUCCESS; - char *value = NULL; - - /* Save the name name */ - if (key_buffer_len < strlen(coll_ml_config_yytext) + 1) { - char *tmp; - key_buffer_len = strlen(coll_ml_config_yytext) + 1; - tmp = (char *) realloc(key_buffer, key_buffer_len); - if (NULL == tmp) { - free(key_buffer); - key_buffer_len = 0; - key_buffer = NULL; - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - key_buffer = tmp; - } - strncpy(key_buffer, coll_ml_config_yytext, key_buffer_len); - - /* The first thing we have to see is an "=" */ - val = coll_ml_config_yylex(); - if (coll_ml_config_parse_done || COLL_ML_CONFIG_PARSE_EQUAL != val) { - ML_ERROR(("Line %d, expected = before key: %s", - coll_ml_config_yynewlines, - key_buffer)); - return OMPI_ERROR; - } - - /* Next we get the value */ - val = coll_ml_config_yylex(); - if (COLL_ML_CONFIG_PARSE_SINGLE_WORD == val || - COLL_ML_CONFIG_PARSE_VALUE == val) { - value = strdup(coll_ml_config_yytext); - - /* Now we need to see the newline */ - val = coll_ml_config_yylex(); - if (COLL_ML_CONFIG_PARSE_NEWLINE != val && - COLL_ML_CONFIG_PARSE_DONE != val) { - ML_ERROR(("Line %d, expected new line after %s", - coll_ml_config_yynewlines, - key_buffer)); - free(value); - return OMPI_ERROR; - } - } - - /* If we did not get EOL or EOF, something is wrong */ - else if (COLL_ML_CONFIG_PARSE_DONE != val && - COLL_ML_CONFIG_PARSE_NEWLINE != val) { - ML_ERROR(("Line %d, expected new line or end of line", - coll_ml_config_yynewlines)); - ret = OMPI_ERROR; - goto Error; - } - - /* Line parsing is done, read the values */ - if (!strcasecmp(key_buffer, "algorithm")) { - ret = parse_algorithm_key(section, value); - if (OMPI_SUCCESS != ret) { - goto Error; - } - } - - else if (!strcasecmp(key_buffer, "threshold")) { - ret = parse_threshold_key(section, value); - if (OMPI_SUCCESS != ret) { - goto Error; - } - } - - else if (!strcasecmp(key_buffer, "hierarchy")) { - ret = parse_hierarchy_key(section, value); - if (OMPI_SUCCESS != ret) { - goto Error; - } - } - - else if (!strcasecmp(key_buffer, "fragmentation")) { - ret = parse_fragmentation_key(section, value); - if (OMPI_SUCCESS != ret) { - goto Error; - } - /* Failed to parse the key */ - } else { - ML_ERROR(("Line %d, unknown key %s", - coll_ml_config_yynewlines, key_buffer)); - } - - /* All done */ -Error: - if (NULL != value) { - free(value); - } - - return ret; -} - -/**************************************************************************/ - -/* - * Parse a single file - */ -static int parse_file(char *filename) -{ - int val; - int ret = OMPI_SUCCESS; - bool first_section = true, first_coll = true; - coll_config_t coll_config; - - memset (&coll_config, 0, sizeof (coll_config)); - reset_collective(&coll_config); - - /* Open the file */ - coll_ml_config_yyin = fopen(filename, "r"); - if (NULL == coll_ml_config_yyin) { - ML_ERROR(("Failed to open config file %s", filename)); - ret = OMPI_ERR_NOT_FOUND; - goto cleanup; - } - - /* Do the parsing */ - coll_ml_config_parse_done = false; - coll_ml_config_yynewlines = 1; - coll_ml_config_init_buffer(coll_ml_config_yyin); - while (!coll_ml_config_parse_done) { - val = coll_ml_config_yylex(); - switch (val) { - case COLL_ML_CONFIG_PARSE_DONE: - case COLL_ML_CONFIG_PARSE_NEWLINE: - break; - case COLL_ML_CONFIG_PARSE_COLLECTIVE: - /* dump all the information to last section that was defined */ - if (!first_coll) { - ret = save_settings(&coll_config); - - if (OMPI_SUCCESS != ret) { - ML_ERROR(("Error in syntax for collective %s", coll_config.coll_name)); - goto cleanup; - } - } - - /* reset collective config */ - reset_collective(&coll_config); - - first_coll = false; - first_section = true; - - ret = set_collective_name(&coll_config); - if (OMPI_SUCCESS != ret) { - goto cleanup; - } - break; - case COLL_ML_CONFIG_PARSE_SECTION: - if (ML_UNDEFINED == coll_config.coll_id) { - ML_ERROR(("Collective section wasn't defined !")); - ret = OMPI_ERROR; - goto cleanup; - } - - if (!first_section) { - /* dump all the information to last section that was defined */ - ret = save_settings(&coll_config); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("Error in syntax for collective %s section %s", coll_config.coll_name, - coll_config.section.section_name)); - goto cleanup; - } - } - - first_section = false; - - /* reset all section values */ - reset_section(&coll_config.section); - - /* set new section name */ - ret = set_section_name(&coll_config.section); - if (OMPI_SUCCESS != ret) { - goto cleanup; - } - break; - case COLL_ML_CONFIG_PARSE_SINGLE_WORD: - if (ML_UNDEFINED == coll_config.coll_id || - ML_UNDEFINED == coll_config.section.section_id) { - ML_ERROR(("Collective section or sub-section was not defined !")); - ret = OMPI_ERROR; - goto cleanup; - } else { - parse_line(&coll_config.section); - } - break; - - default: - /* anything else is an error */ - ML_ERROR(("Unexpected token!")); - ret = OMPI_ERROR; - goto cleanup; - break; - } - } - - save_settings(&coll_config); - fclose(coll_ml_config_yyin); - coll_ml_config_yylex_destroy (); - ret = OMPI_SUCCESS; - -cleanup: - reset_collective(&coll_config); - if (NULL != key_buffer) { - free(key_buffer); - key_buffer = NULL; - key_buffer_len = 0; - } - return ret; -} - -int mca_coll_ml_config_file_init(void) -{ - return parse_file(mca_coll_ml_component.config_file_name); -} - diff --git a/ompi/mca/coll/ml/coll_ml_config.h b/ompi/mca/coll/ml/coll_ml_config.h deleted file mode 100644 index 92a39d50305..00000000000 --- a/ompi/mca/coll/ml/coll_ml_config.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef COLL_ML_CONFIG_H_ -#define COLL_ML_CONFIG_H_ - -#include "opal_config.h" -#include - -BEGIN_C_DECLS - -#define ML_UNDEFINED -1 - -struct per_collective_configuration_t { - int topology_id; - int threshold; - int algorithm_id; - int fragmentation_enabled; -}; -typedef struct per_collective_configuration_t per_collective_configuration_t; - -void mca_coll_ml_reset_config(per_collective_configuration_t *config); -int mca_coll_ml_config_file_init(void); - -END_C_DECLS -#endif diff --git a/ompi/mca/coll/ml/coll_ml_copy_fns.c b/ompi/mca/coll/ml/coll_ml_copy_fns.c deleted file mode 100644 index 447e0df101e..00000000000 --- a/ompi/mca/coll/ml/coll_ml_copy_fns.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "opal/threads/mutex.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/bcol.h" -#include "opal/sys/atomic.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/mca/coll/ml/coll_ml_allocation.h" -#include "coll_ml_colls.h" -#include -#include - - - -/* This routine re-orders and packs user data. The assumption is that - * there is per-process data, the amount of data is the same for all - * ranks, and the user data is contigous. - */ -int mca_coll_ml_pack_reorder_contiguous_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int i, rank; - void *user_buf, *library_buf; - size_t bytes_per_proc; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) - coll_op->coll_module; - mca_coll_ml_topology_t *topo_info = coll_op->coll_schedule->topo_info; - ptrdiff_t ptr_dif; - - /* get the offset into each processes data. The assumption is that - * we are manipulating the same amount of data for each process. - */ - - /* figure out how much data per-proc to copy */ - bytes_per_proc=coll_op->fragment_data.per_rank_fragment_size; - - /* loop over all the ranks in the communicator */ - for( i=0 ; i < ompi_comm_size(ml_module->comm) ; i++ ) { - - /* look up the rank of the i'th element in the sorted list */ - rank = topo_info->sort_list[i]; - - /* get the pointer to user data */ - user_buf=coll_op->full_message.src_user_addr; - /* compute offset into the user buffer */ - - /* offset for data already processed */ - ptr_dif=rank*coll_op->full_message.n_bytes_per_proc_total+ - coll_op->fragment_data.offset_into_user_buffer_per_proc; - user_buf=(void *) ((char *)user_buf+ptr_dif); - /* - rank*coll_op->full_message.n_bytes_per_proc_total+ - coll_op->fragment_data.offset_into_user_buffer_per_proc); - */ - - /* get the pointer to the ML buffer */ - library_buf= (void *) - ((char *)coll_op->variable_fn_params.src_desc->data_addr+i*bytes_per_proc); - - /* copy the data */ - memcpy(library_buf, user_buf, bytes_per_proc); - - } - - return OMPI_SUCCESS; -} - -/* This routine re-orders and packs user data. The assumption is that - * there is per-process data, the amount of data is the same for all - * ranks, and the user data is contigous. - */ -int mca_coll_ml_pack_reorder_noncontiguous_data(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int i, rank; - void *user_buf, *library_buf; - size_t bytes_per_proc; - ptrdiff_t ptr_dif; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *) - coll_op->coll_module; - mca_coll_ml_topology_t *topo_info = coll_op->coll_schedule->topo_info; - - /* get the offset into each processes data. The assumption is that - * we are manipulating the same amount of data for each process. - */ - - /* figure out how much data per-proc to copy */ - bytes_per_proc = coll_op->fragment_data.per_rank_fragment_size; - - /* loop over all the ranks in the communicator */ - for(i = 0; i < ompi_comm_size(ml_module->comm); i++ ) { - - /* look up the rank of the i'th element in the sorted list */ - rank = topo_info->sort_list[i]; - - /* get the pointer to user data */ - user_buf=coll_op->full_message.src_user_addr; - /* compute offset into the user buffer */ - - /* offset for data already processed */ - ptr_dif=rank*coll_op->full_message.send_count* - coll_op->full_message.send_extent+ - coll_op->fragment_data.offset_into_user_buffer_per_proc; - user_buf=(void *) ((char *)user_buf+ptr_dif); - - /* get the pointer to the ML buffer */ - library_buf= (void *) - ((char *)coll_op->variable_fn_params.src_desc->data_addr+i*bytes_per_proc); - - /* copy the data */ - memcpy(library_buf, user_buf, bytes_per_proc); - - } - - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/coll/ml/coll_ml_custom_utils.c b/ompi/mca/coll/ml/coll_ml_custom_utils.c deleted file mode 100644 index c00c4a5439b..00000000000 --- a/ompi/mca/coll/ml/coll_ml_custom_utils.c +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include -#include -#include - -#include "opal/util/output.h" -#include "opal/class/opal_list.h" -#include "opal/class/opal_object.h" -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/threads/mutex.h" -#include "opal/sys/atomic.h" - -#include "ompi/op/op.h" -#include "ompi/constants.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/coll/base/base.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/patterns/comm/coll_ops.h" - -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/communicator/communicator.h" - -#include "ompi/mca/bcol/base/base.h" -#include "coll_ml_custom_utils.h" - -/* - * Local types - */ - -struct avail_coll_t { - opal_list_item_t super; - int ac_priority; - mca_coll_base_module_2_1_0_t *ac_module; -}; -typedef struct avail_coll_t avail_coll_t; - -/* - * Stuff for the OBJ interface - * If topo_index == COLL_ML_TOPO_MAX it looks over all possilbe topologies, otherwhise it looks - * in the topology that was specified. - */ - -int mca_coll_ml_check_if_bcol_is_used(const char *bcol_name, const mca_coll_ml_module_t *ml_module, - int topo_index) -{ - int i, rc, hier, *ranks_in_comm, - is_used = 0, - comm_size = ompi_comm_size(ml_module->comm); - int n_hier, tp , max_tp; - const mca_coll_ml_topology_t *topo_info; - - ranks_in_comm = (int *) malloc(comm_size * sizeof(int)); - if (OPAL_UNLIKELY(NULL == ranks_in_comm)) { - ML_ERROR(("Memory allocation failed.")); - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_NO_MEM); - /* not reached but causes a clang warning to not return here */ - return OMPI_ERR_OUT_OF_RESOURCE; - } - - for (i = 0; i < comm_size; ++i) { - ranks_in_comm[i] = i; - } - - if (COLL_ML_TOPO_MAX == topo_index) { - tp = 0; - max_tp = COLL_ML_TOPO_MAX; - } else { - tp = topo_index; - max_tp = topo_index + 1; - } - - for (; tp < max_tp; tp++) { - topo_info = &ml_module->topo_list[tp]; - n_hier = topo_info->n_levels; - for (hier = 0; hier < n_hier; ++hier) { - hierarchy_pairs *pair = &topo_info->component_pairs[hier]; - mca_bcol_base_component_t *b_cm = pair->bcol_component; - if(0 == strcmp(bcol_name, - b_cm->bcol_version.mca_component_name)) { - is_used = 1; - break; - } - } - } - - rc = comm_allreduce_pml(&is_used, &is_used, 1, MPI_INT, - ompi_comm_rank(ml_module->comm), MPI_MAX, - comm_size, ranks_in_comm, ml_module->comm); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("comm_allreduce_pml failed.")); - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_OP); - } - - free(ranks_in_comm); - - return is_used; -} - -/* The function is very different from the above function */ -int mca_coll_ml_check_if_bcol_is_requested(const char *component_name) -{ - mca_base_component_list_item_t *bcol_comp; - - ML_VERBOSE(10, ("Loop over bcol components")); - OPAL_LIST_FOREACH(bcol_comp, &mca_bcol_base_components_in_use, mca_base_component_list_item_t) { - if(0 == strcmp(component_name, - ((mca_bcol_base_component_2_0_0_t *) - bcol_comp->cli_component)->bcol_version.mca_component_name)) { - return true; - } - } - - /* the component was not resquested */ - return false; -} diff --git a/ompi/mca/coll/ml/coll_ml_custom_utils.h b/ompi/mca/coll/ml/coll_ml_custom_utils.h deleted file mode 100644 index 7d6a8feb00f..00000000000 --- a/ompi/mca/coll/ml/coll_ml_custom_utils.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#ifndef MCA_COLL_ML_CUSTOM_UTILS_H -#define MCA_COLL_ML_CUSTOM_UTILS_H - -#include "ompi_config.h" - -#include "coll_ml.h" - -/* the function is used to check if the bcol name is used in this ml module */ -int mca_coll_ml_check_if_bcol_is_used(const char *bcol_name, const mca_coll_ml_module_t *ml_module, - int topo_index); - -/* The function is used to check if the bcol component was REQUESTED by user */ -int mca_coll_ml_check_if_bcol_is_requested(const char *component_name); - -END_C_DECLS - -#endif /* MCA_COLL_ML_ML_H */ diff --git a/ompi/mca/coll/ml/coll_ml_descriptors.c b/ompi/mca/coll/ml/coll_ml_descriptors.c deleted file mode 100644 index 4060c27ed72..00000000000 --- a/ompi/mca/coll/ml/coll_ml_descriptors.c +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -#include "ompi_config.h" -#include "coll_ml.h" -#include "coll_ml_inlines.h" - - -static inline void mca_coll_ml_fragment_constructor(mca_coll_ml_fragment_t *frag) -{ - frag->fn_args = NULL; -} - -static inline void mca_coll_ml_fragment_destructor(mca_coll_ml_fragment_t *frag) -{ - if (frag->fn_args) { - free(frag->fn_args); - frag->fn_args = NULL; - } -} - -static inline void mca_coll_ml_descriptor_constructor(mca_coll_ml_descriptor_t *descriptor) -{ - - OBJ_CONSTRUCT(&(descriptor->fragment),mca_coll_ml_fragment_t); - - /* this fragment is alway associated with this message descriptor */ - descriptor->fragment.full_msg_descriptor=descriptor; - -} - - -static inline void mca_coll_ml_descriptor_destructor(mca_coll_ml_descriptor_t *descriptor) -{ - OBJ_DESTRUCT(&(descriptor->fragment)); -} - -OBJ_CLASS_INSTANCE( - mca_coll_ml_fragment_t, - opal_list_item_t, - mca_coll_ml_fragment_constructor, - mca_coll_ml_fragment_destructor); - -OBJ_CLASS_INSTANCE( - mca_coll_ml_descriptor_t, - ompi_request_t, - mca_coll_ml_descriptor_constructor, - mca_coll_ml_descriptor_destructor); - diff --git a/ompi/mca/coll/ml/coll_ml_functions.h b/ompi/mca/coll/ml/coll_ml_functions.h deleted file mode 100644 index 5d0d0d7b1af..00000000000 --- a/ompi/mca/coll/ml/coll_ml_functions.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#ifndef MCA_COLL_ML_FUNCTIONS_H -#define MCA_COLL_ML_FUNCTIONS_H - -#include "ompi_config.h" - -BEGIN_C_DECLS - -#define ML_MEMSYNC -100 - -enum { - ML_BARRIER_DEFAULT -}; - /* small data algorithm */ -/* broadcast functions */ -enum { - /* small data algorithm */ - ML_BCAST_SMALL_DATA_KNOWN, - /* small data - dynamic decision making supported */ - ML_BCAST_SMALL_DATA_UNKNOWN, - /* Sequential algorithm */ - ML_BCAST_SMALL_DATA_SEQUENTIAL, - - ML_BCAST_LARGE_DATA_KNOWN, - - ML_BCAST_LARGE_DATA_UNKNOWN, - - ML_BCAST_LARGE_DATA_SEQUENTIAL, - - /* marker - all routines about this are expected to be used in - * selection logic that is based on size of the data */ - ML_N_DATASIZE_BINS, - - /* number of functions - also counts some markers, but ... */ - ML_NUM_BCAST_FUNCTIONS -}; - - -/* scatter functions */ -enum { - /* small data algorithm */ - ML_SCATTER_SMALL_DATA_KNOWN, - - /* marker - all routines about this are expected to be used in - * selection logic that is based on size of the data */ - ML_SCATTER_N_DATASIZE_BINS, - - /* small data - dynamic decision making supported */ - ML_SCATTER_SMALL_DATA_UNKNOWN, - - /* Sequential algorithm */ - ML_SCATTER_SMALL_DATA_SEQUENTIAL, - - /* number of functions - also counts some markers, but ... */ - ML_NUM_SCATTER_FUNCTIONS -}; - - -/* Allreduce functions */ -enum { - /* small data algorithm */ - ML_SMALL_DATA_ALLREDUCE, - - /* Large data algorithm */ - ML_LARGE_DATA_ALLREDUCE, - - /* If some of bcols doesn't support - all possibles types, use these extra algthms */ - /* small data algorithm */ - ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE, - - /* large data algorithm */ - ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE, - - /* number of functions */ - ML_NUM_ALLREDUCE_FUNCTIONS -}; - -/* Reduce functions */ -enum { - /* small data algorithm */ - ML_SMALL_DATA_REDUCE, - - /* Large data algorithm */ - ML_LARGE_DATA_REDUCE, - - /* number of functions */ - ML_NUM_REDUCE_FUNCTIONS -}; -/* Alltoall functions */ -enum { - /* small data algorithm */ - ML_SMALL_DATA_ALLTOALL, - /* large all to all */ - ML_LARGE_DATA_ALLTOALL, - /* number of functions */ - ML_NUM_ALLTOALL_FUNCTIONS -}; - -/* Allgather functions */ -enum { - /* small data */ - ML_SMALL_DATA_ALLGATHER, - /* large data */ - ML_LARGE_DATA_ALLGATHER, - /* number of functions */ - ML_NUM_ALLGATHER_FUNCTIONS -}; - -/* gather functions */ -enum { - /* small data */ - ML_SMALL_DATA_GATHER, - /* large data */ - ML_LARGE_DATA_GATHER, - /* number of functions */ - ML_NUM_GATHER_FUNCTIONS -}; - -END_C_DECLS - -#endif /* MCA_COLL_ML_FUNCTIONS_H */ diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithm_memsync_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithm_memsync_setup.c deleted file mode 100644 index f50d040f619..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithm_memsync_setup.c +++ /dev/null @@ -1,195 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml_functions.h" - -static int mca_coll_ml_build_memsync_schedule( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc) -{ - int i_hier, rc, i_fn, n_fcns, i, - n_hiers = topo_info->n_levels; - - bool call_for_top_func; - mca_bcol_base_module_t *bcol_module; - - mca_coll_ml_compound_functions_t *comp_fn; - mca_coll_ml_collective_operation_description_t *schedule; - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - calloc(1, sizeof(mca_coll_ml_collective_operation_description_t)); - - schedule = *coll_desc; - if (OPAL_UNLIKELY(NULL == schedule)) { - ML_ERROR(("Can't allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - if (topo_info->global_highest_hier_group_index == - topo_info->component_pairs[n_hiers - 1].bcol_index) { - /* The process that is member of highest level subgroup - should call for top algorithms in addition to fan-in/out steps */ - call_for_top_func = true; - n_fcns = 2 * n_hiers - 1; /* Up + Top + Down */ - } else { - /* The process is not member of highest level subgroup, - as result it does not call for top algorithm, - but it calls for all fan-in/out steps */ - call_for_top_func = false; - n_fcns = 2 * n_hiers; - } - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = n_fcns; - schedule->topo_info = topo_info; - - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(n_fcns, sizeof(struct mca_coll_ml_compound_functions_t)); - - if (OPAL_UNLIKELY(NULL == schedule->component_functions)) { - ML_ERROR(("Can't allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto Barrier_Setup_Error; - } - - for (i_fn = 0; i_fn < n_fcns; ++i_fn) { - i_hier = (i_fn < n_hiers ? i_fn : n_fcns - i_fn - 1); - comp_fn = &schedule->component_functions[i_fn]; - - /* The hierarchial level */ - comp_fn->h_level = i_hier; - bcol_module = GET_BCOL(topo_info, i_hier); - - /* The UP direction */ - if (1 + i_fn < n_hiers || (1 + i_fn == n_hiers && !call_for_top_func)) { - /* Pasha: We do not have memory syncronization FANIN function, instead I use barrier. - * In future we have to replace it with memsync fan-in function - * comp_fn->bcol_function = - * bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_FANIN][1][0][0]; - */ - comp_fn->bcol_function = GET_BCOL_SYNC_FN(bcol_module); - - - assert(NULL != comp_fn->bcol_function); - - /* Each function call with index K is depended of all K-1 previous indices - - in simple words we will do sequential Fan-In calls */ - comp_fn->num_dependencies = i_fn; - comp_fn->num_dependent_tasks = n_fcns - i_fn - 1; - - /* Init component function */ - strcpy(comp_fn->fn_name, "MEMSYNC-FANIN"); - - /* On the highest level */ - } else if ((1 + i_fn == n_hiers && call_for_top_func)) { - comp_fn->bcol_function = GET_BCOL_SYNC_FN(bcol_module); - - /* Each function call with index K is depended of all K-1 previous indices - - in simple words we do sequential calls */ - comp_fn->num_dependencies = n_hiers - 1; /* All Fan-Ins */ - comp_fn->num_dependent_tasks = n_fcns - n_hiers; /* All Fan-Outs */ - - /* Init component function */ - strcpy(comp_fn->fn_name, "MEMSYNC-BARRIER"); - - assert(NULL != comp_fn->bcol_function); - ML_VERBOSE(10, ("func indx %d set to BARRIER %p", i_fn, comp_fn->bcol_function)); - - /* The DOWN direction */ - } else { - /* Pasha: We do not have memory syncronization FANOUT function, instead I use barrier. - * In future we have to replace it with memsync fan-out function - * comp_fn->bcol_function = - * bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_FANOUT][1][0][0]; - */ - comp_fn->bcol_function = GET_BCOL_SYNC_FN(bcol_module); - - /* Each function call with index K is depended of all UP and TOP algths */ - comp_fn->num_dependencies = n_hiers; - comp_fn->num_dependent_tasks = 0; - - /* Init component function */ - strcpy(comp_fn->fn_name, "MEMSYNC-FANOUT"); - } - - assert(NULL != comp_fn->bcol_function); - ML_VERBOSE(10, ("func indx %d set to %p", i_fn, comp_fn->bcol_function)); - - if (comp_fn->num_dependent_tasks > 0) { - comp_fn->dependent_task_indices = (int *) calloc(comp_fn->num_dependent_tasks, sizeof(int)); - if (OPAL_UNLIKELY(NULL == comp_fn->dependent_task_indices)) { - ML_ERROR(("Can't allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto Barrier_Setup_Error; - } - - /* All indexes follow after this one */ - for (i = 0; i < comp_fn->num_dependent_tasks; ++i) { - comp_fn->dependent_task_indices[i] = i_fn + i + 1; - } - } - - /* No need completion func for Barrier */ - comp_fn->task_comp_fn = NULL; - - ML_VERBOSE(10, ("Setting collective [Barrier] fn_idx %d, n_of_this_type_in_a_row %d, " - "index_in_consecutive_same_bcol_calls %d.", - i_fn, comp_fn->constant_group_data.n_of_this_type_in_a_row, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls)); - } - - rc = ml_coll_barrier_constant_group_data_setup(topo_info, schedule); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("Failed to init const group data.")); - goto Barrier_Setup_Error; - } - - schedule->progress_type = 0; - - return OMPI_SUCCESS; - -Barrier_Setup_Error: - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - schedule->component_functions = NULL; - } - - free (schedule); - *coll_desc = NULL; - - return rc; -} - -int ml_coll_memsync_setup(mca_coll_ml_module_t *ml_module) -{ - int ret; - /* For barrier syncronization we use barrier topology */ - mca_coll_ml_topology_t *topo_info = - &ml_module->topo_list[ml_module->collectives_topology_map[ML_BARRIER][ML_SMALL_MSG]]; - - ret = mca_coll_ml_build_memsync_schedule(topo_info, - &ml_module->coll_ml_memsync_function); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup static bcast")); - return ret; - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms.c deleted file mode 100644 index efbb9fac36e..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms.c +++ /dev/null @@ -1,187 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/mca/coll/ml/coll_ml_allocation.h" - -/* collective managment descriptor initialization - called right after - * the constructor by opal_free_list code - */ -static void mca_coll_ml_collective_operation_progress_init - (opal_free_list_item_t* item, void* ctx) -{ - int i; - int max_dag_size = ((struct coll_desc_init *)ctx)->max_dag_size; - size_t max_n_bytes_per_proc_total = - ((struct coll_desc_init *)ctx)->max_n_bytes_per_proc_total; - mca_coll_ml_collective_operation_progress_t *coll_op = - (mca_coll_ml_collective_operation_progress_t *) item; - - coll_op->dag_description.status_array = - (mca_coll_ml_task_status_t *) - calloc(max_dag_size, sizeof(mca_coll_ml_task_status_t)); - assert(coll_op->dag_description.status_array); - - /* initialize individual elements */ - for (i = 0; i < max_dag_size; i++ ) { - /* Pasha: We assume here index syncronization between - task indexes and indexes in component_function array - (mca_coll_ml_collective_operation_description) - */ - coll_op->dag_description.status_array[i]. - my_index_in_coll_schedule = i; - coll_op->dag_description.status_array[i]. - ml_coll_operation = coll_op; - - OBJ_CONSTRUCT(&coll_op->dag_description.status_array[i].item, opal_list_item_t); - } - - /* set the size per proc of the ML buffer */ - coll_op->full_message.max_n_bytes_per_proc_total= - max_n_bytes_per_proc_total; - - /* set the pointer to the bcol module */ - coll_op->coll_module = - ((struct coll_desc_init *)ctx)->bcol_base_module; - -} - -int ml_coll_schedule_setup(mca_coll_ml_module_t *ml_module) -{ - /* local variables */ - int ret = OMPI_SUCCESS, comm_size; - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - size_t ml_per_proc_buffer_size; - - /* Barrier */ - ret = ml_coll_hier_barrier_setup(ml_module); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - /* Broadcast */ - ret = ml_coll_hier_bcast_setup(ml_module); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - /* Allreduce */ - if (!mca_coll_ml_component.use_knomial_allreduce) { - ret = ml_coll_hier_allreduce_setup(ml_module); - } else { - ret = ml_coll_hier_allreduce_setup_new(ml_module); - } - - if( OMPI_SUCCESS != ret ) { - return ret; - } - - - /* Alltoall */ - /* - ret = ml_coll_hier_alltoall_setup_new(ml_module); - - if( OMPI_SUCCESS != ret ) { - return ret; - } - */ - - /* Allgather */ - ret = ml_coll_hier_allgather_setup(ml_module); - - if( OMPI_SUCCESS != ret ) { - return ret; - } - - /* Gather */ - /* - ret = ml_coll_hier_gather_setup(ml_module); - - if( OMPI_SUCCESS != ret ) { - return ret; - } - */ - - /* Reduce */ - ret = ml_coll_hier_reduce_setup(ml_module); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - /* Scatter */ - /* - ret = ml_coll_hier_scatter_setup(ml_module); - if( OMPI_SUCCESS != ret ) { - return ret; - } - */ - - ret = ml_coll_memsync_setup(ml_module); - if( OMPI_SUCCESS != ret ) { - return ret; - } - - /* nonblocking Reduce */ - - /* Alltoall */ - - /* nonblocking alltoall */ - - /* max_dag_size will be set here, so initialize it */ - - /* Pasha: Do we have to keep the max_dag_size ? - In most generic case, it will be equal to max_fn_calls */ - ml_module->max_dag_size = ml_module->max_fn_calls; - - assert(ml_module->max_dag_size > 0); - - /* initialize the mca_coll_ml_collective_operation_progress_t free list */ - /* NOTE: as part of initialization each routine needs to make sure that - * the module element max_dag_size is set large enough - space for - * tracking collective progress is allocated based on this value. */ - - /* figure out what the size of the ml buffer is */ - ml_per_proc_buffer_size=ml_module->payload_block->size_buffer; - comm_size=ompi_comm_size(ml_module->comm); - ml_per_proc_buffer_size/=comm_size; - ml_module->coll_desc_init_data.max_dag_size=ml_module->max_dag_size; - ml_module->coll_desc_init_data.max_n_bytes_per_proc_total=ml_per_proc_buffer_size; - ml_module->coll_desc_init_data.bcol_base_module=(mca_coll_base_module_t *) - ml_module; - - ret = opal_free_list_init ( - &(ml_module->coll_ml_collective_descriptors), - sizeof(mca_coll_ml_collective_operation_progress_t), - /* no special alignment needed */ - 8, - OBJ_CLASS(mca_coll_ml_collective_operation_progress_t), - /* no payload data */ - 0, 0, - /* NOTE: hack - need to parametrize this */ - cm->free_list_init_size, - cm->free_list_max_size, - cm->free_list_grow_size, - /* No Mpool */ - NULL, 0, NULL, - mca_coll_ml_collective_operation_progress_init, - (void *)&(ml_module->coll_desc_init_data) - ); - if (OMPI_SUCCESS != ret) { - return ret; - } - - /* done */ - return ret; -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_allgather_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_allgather_setup.c deleted file mode 100644 index cd964d41dd9..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_allgather_setup.c +++ /dev/null @@ -1,240 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml_functions.h" -#include "ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.h" -#include "ompi/patterns/net/netpatterns_knomial_tree.h" - -#define SMALL_MSG_RANGE 1 -#define LARGE_MSG_RANGE 5 - -static int mca_coll_ml_build_allgather_schedule(mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc, int bcol_func_index) -{ - int ret; /* exit code in case of error */ - int nfn = 0; - int i; - int *scratch_indx = NULL, - *scratch_num = NULL; - - mca_coll_ml_collective_operation_description_t *schedule = NULL; - mca_coll_ml_compound_functions_t *comp_fn; - mca_coll_ml_schedule_hier_info_t h_info; - - ML_VERBOSE(9, ("Setting hierarchy, inputs : n_levels %d, hiest %d ", - topo_info->n_levels, topo_info->global_highest_hier_group_index)); - MCA_COLL_ML_INIT_HIER_INFO(h_info, topo_info->n_levels, - topo_info->global_highest_hier_group_index, topo_info); - - ret = mca_coll_ml_schedule_init_scratch(topo_info, &h_info, - &scratch_indx, &scratch_num); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("Can't mca_coll_ml_schedule_init_scratch.")); - goto Error; - } - assert(NULL != scratch_indx); - assert(NULL != scratch_num); - - schedule = *coll_desc = - mca_coll_ml_schedule_alloc(&h_info); - if (NULL == schedule) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - /* Setting topology information */ - schedule->topo_info = topo_info; - - /* Set dependencies equal to number of hierarchies */ - for (i = 0; i < h_info.num_up_levels; i++) { - int query_conf[MCA_COLL_ML_QUERY_SIZE]; - MCA_COLL_ML_SET_QUERY(query_conf, DATA_SRC_KNOWN, BLOCKING, BCOL_GATHER, bcol_func_index, 0, 0); - comp_fn = &schedule->component_functions[i]; - MCA_COLL_ML_SET_COMP_FN(comp_fn, i, topo_info, - i, scratch_indx, scratch_num, query_conf, "GATHER_DATA"); - } - - nfn = i; - if (h_info.call_for_top_function) { - int query_conf[MCA_COLL_ML_QUERY_SIZE]; - MCA_COLL_ML_SET_QUERY(query_conf, DATA_SRC_KNOWN, NON_BLOCKING, BCOL_ALLGATHER, bcol_func_index, 0, 0); - comp_fn = &schedule->component_functions[nfn]; - MCA_COLL_ML_SET_COMP_FN(comp_fn, nfn, topo_info, - nfn, scratch_indx, scratch_num, query_conf, "ALLGATHER_DATA"); - ++nfn; - } - - /* coming down the hierarchy */ - for (i = h_info.num_up_levels - 1; i >= 0; i--, nfn++) { - int query_conf[MCA_COLL_ML_QUERY_SIZE]; - MCA_COLL_ML_SET_QUERY(query_conf, DATA_SRC_KNOWN, NON_BLOCKING, BCOL_BCAST, bcol_func_index, 0, 0); - comp_fn = &schedule->component_functions[nfn]; - MCA_COLL_ML_SET_COMP_FN(comp_fn, i, topo_info, - nfn, scratch_indx, scratch_num, query_conf, "BCAST_DATA"); - } - - /* Fill the rest of constant data */ - mca_coll_ml_call_types(&h_info, schedule); - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - - Error: - if (NULL != scratch_indx) { - free(scratch_indx); - } - if (NULL != scratch_num) { - free(scratch_num); - } - - return ret; -} - -int ml_coll_hier_allgather_setup(mca_coll_ml_module_t *ml_module) -{ - /* Hierarchy Setup */ - int ret, topo_index, alg; - mca_coll_ml_topology_t *topo_info = ml_module->topo_list; - - ML_VERBOSE(10,("entering allgather setup")); - -#if 0 - /* used to validate the recursive k - ing allgather tree */ - { - /* debug print */ - int ii, jj; - netpatterns_k_exchange_node_t exchange_node; - - ret = netpatterns_setup_recursive_knomial_allgather_tree_node(8, 3, 3, &exchange_node); - fprintf(stderr,"log tree order %d tree_order %d\n", exchange_node.log_tree_order,exchange_node.tree_order); - if( EXCHANGE_NODE == exchange_node.node_type){ - if( exchange_node.n_extra_sources > 0){ - fprintf(stderr,"Receiving data from extra rank %d\n",exchange_node.rank_extra_sources_array[0]); - } - for( ii = 0; ii < exchange_node.log_tree_order; ii++){ - for( jj = 0; jj < (exchange_node.tree_order-1); jj++) { - if( exchange_node.rank_exchanges[ii][jj] >= 0){ - fprintf(stderr,"level %d I send %d bytes to %d from offset %d \n",ii+1, - exchange_node.payload_info[ii][jj].s_len, - exchange_node.rank_exchanges[ii][jj], - exchange_node.payload_info[ii][jj].s_offset); - fprintf(stderr,"level %d I receive %d bytes from %d at offset %d\n",ii+1, - exchange_node.payload_info[ii][jj].r_len, - exchange_node.rank_exchanges[ii][jj], - exchange_node.payload_info[ii][jj].r_offset); - } - } - } - fprintf(stderr,"exchange_node.n_extra_sources %d\n",exchange_node.n_extra_sources); - fprintf(stderr,"exchange_node.myid_reindex %d\n",exchange_node.reindex_myid); - if( exchange_node.n_extra_sources > 0){ - fprintf(stderr,"Sending back data to extra rank %d\n",exchange_node.rank_extra_sources_array[0]); - } - } else { - fprintf(stderr,"I am an extra and send to proxy %d\n", - exchange_node.rank_extra_sources_array[0]); - } - } -#endif - - alg = mca_coll_ml_component.coll_config[ML_ALLGATHER][ML_SMALL_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLGATHER][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLGATHER] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_allgather_schedule(&ml_module->topo_list[topo_index], - &ml_module->coll_ml_allgather_functions[alg], - SMALL_MSG_RANGE); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup static alltoall")); - return ret; - } - - alg = mca_coll_ml_component.coll_config[ML_ALLGATHER][ML_LARGE_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLGATHER][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLGATHER] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_allgather_schedule(&ml_module->topo_list[topo_index], - &ml_module->coll_ml_allgather_functions[alg], - LARGE_MSG_RANGE); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup static alltoall")); - return ret; - } - - return OMPI_SUCCESS; -} - -void ml_coll_hier_allgather_cleanup(mca_coll_ml_module_t *ml_module) -{ - /* Hierarchy Setup */ - int topo_index, alg; - mca_coll_ml_topology_t *topo_info = ml_module->topo_list; - - alg = mca_coll_ml_component.coll_config[ML_ALLGATHER][ML_SMALL_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLGATHER][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLGATHER] = NULL; - return; - } - - if (NULL == ml_module->coll_ml_allgather_functions[alg]) { - return; - } - - if (ml_module->coll_ml_allgather_functions[alg]->component_functions) { - free(ml_module->coll_ml_allgather_functions[alg]->component_functions); - ml_module->coll_ml_allgather_functions[alg]->component_functions = NULL; - } - - if (ml_module->coll_ml_allgather_functions[alg]) { - free(ml_module->coll_ml_allgather_functions[alg]); - ml_module->coll_ml_allgather_functions[alg] = NULL; - } - - alg = mca_coll_ml_component.coll_config[ML_ALLGATHER][ML_LARGE_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLGATHER][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLGATHER] = NULL; - return; - } - - if (ml_module->coll_ml_allgather_functions[alg]->component_functions) { - free(ml_module->coll_ml_allgather_functions[alg]->component_functions); - ml_module->coll_ml_allgather_functions[alg]->component_functions = NULL; - } - - if (ml_module->coll_ml_allgather_functions[alg]) { - free(ml_module->coll_ml_allgather_functions[alg]); - ml_module->coll_ml_allgather_functions[alg] = NULL; - } -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_allreduce_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_allreduce_setup.c deleted file mode 100644 index a371d51b7a3..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_allreduce_setup.c +++ /dev/null @@ -1,434 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml_functions.h" - -#define ALLREDUCE_SMALL 1 -#define ALLREDUCE_LARGE 5 -#define SMALL_MSG_RANGE 1 -#define LARGE_MSG_RANGE 5 - -static int mca_coll_ml_build_allreduce_schedule( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc, int bcol_func_index) -{ - - bool call_for_top_function, prev_is_zero; - int n_hiers = topo_info->n_levels; - int i_hier, j_hier; - int cnt, value_to_set = 0; - int ret; /* exit code in case of error */ - int nfn=0; - int *scratch_indx = NULL, - *scratch_num = NULL; - int global_high_hierarchy_index = - topo_info->global_highest_hier_group_index; - - mca_coll_ml_collective_operation_description_t *schedule; - mca_coll_ml_compound_functions_t *comp_fn; - mca_bcol_base_module_t *prev_bcol, - *bcol_module; - int num_up_levels,nbcol_functions,i; - - if (global_high_hierarchy_index == - topo_info->component_pairs[n_hiers - 1].bcol_index) { - /* The process that is member of highest level subgroup - should call for top algorithms in addition to fan-in/out steps*/ - call_for_top_function = true; - /* hier level run only top algorithm, so we deduct 1 */ - num_up_levels = n_hiers - 1; - /* Top algorithm is called only once, so we deduct 1 */ - nbcol_functions = 2 * n_hiers - 1; - } else { - /* The process is not member of highest level subgroup, - as result it does not call for top algorithm, - but it calls for all fan-in/out steps */ - call_for_top_function = false; - num_up_levels = n_hiers; - nbcol_functions = 2 * n_hiers; - } - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - calloc(1, sizeof(mca_coll_ml_collective_operation_description_t)); - schedule = *coll_desc; - if (NULL == schedule) { - ML_ERROR(("Can't allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - scratch_indx = (int *) calloc(n_hiers * 2, sizeof (int)); - if (NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Allreduce_Setup_Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (n_hiers * 2)); - if (NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Allreduce_Setup_Error; - } - - prev_bcol = NULL; - - for (i = 0, cnt = 0; i < num_up_levels; ++i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - prev_bcol = GET_BCOL(topo_info, i); - } - } - - /* top - only if the proc arrive to highest_level_is_global_highest_level */ - if (call_for_top_function) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, n_hiers - 1))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - prev_bcol = GET_BCOL(topo_info, n_hiers - 1); - } - - ++cnt; - } - - /* going down */ - for (i = num_up_levels - 1; i >= 0; --i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - prev_bcol = GET_BCOL(topo_info, i); - } - } - - i = cnt - 1; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i]) { - prev_is_zero = true; - } - - scratch_num[i] = value_to_set; - --i; - } while(i >= 0); - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = nbcol_functions; - schedule->topo_info = topo_info; - schedule->progress_type = 0; - - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(nbcol_functions, sizeof(struct mca_coll_ml_compound_functions_t)); - - if (NULL == schedule->component_functions) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Allreduce_Setup_Error; - } - - for (i = 0; i < num_up_levels; i++) { - comp_fn = &schedule->component_functions[i]; - comp_fn->h_level = i; /* hierarchy level */ - bcol_module = GET_BCOL(topo_info, i); - - /* strcpy (comp_fn->fn_name, "ALLREDUCE_SMALL_DATA"); */ - - comp_fn->num_dependent_tasks = 0; - comp_fn->num_dependencies = 0; - - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_REDUCE][bcol_func_index][0][0]; - if (NULL == comp_fn->bcol_function) { - /* if there isn't a bcol function for this then we can't continue */ - ret = OMPI_ERR_NOT_SUPPORTED; - goto Allreduce_Setup_Error; - } - - comp_fn->task_comp_fn = NULL; - - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[i]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[i]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - } - - nfn = i; - if (call_for_top_function) { - comp_fn = &schedule->component_functions[nfn]; - comp_fn->h_level = nfn; /* hierarchy level */ - bcol_module = GET_BCOL(topo_info, nfn); - - assert (NULL != bcol_module); - - /* strcpy (comp_fn->fn_name, "ALLREDUCE_SMALL_DATA"); */ - - /* The allreduce should depend on the reduce */ - comp_fn->num_dependent_tasks = 0; - comp_fn->num_dependencies = 0; - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_ALLREDUCE][bcol_func_index][0][0]; - if (NULL == comp_fn->bcol_function) { - /* if there isn't a bcol function for this then we can't continue */ - ret = OMPI_ERR_NOT_SUPPORTED; - goto Allreduce_Setup_Error; - } - - comp_fn->task_comp_fn = NULL; - - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[nfn]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[nfn]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ++nfn; - } - - for (i = num_up_levels - 1; i >= 0; i--) { - comp_fn = &schedule->component_functions[nfn]; - comp_fn->h_level = i; /* hierarchy level */ - bcol_module = GET_BCOL(topo_info, i); - - assert (NULL != bcol_module); - - /* strcpy (comp_fn->fn_name, "ALLREDUCE_SMALL_DATA"); */ - - comp_fn->num_dependent_tasks = 0; - comp_fn->num_dependencies = 0; - - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_BCAST][bcol_func_index][0][0]; - if (NULL == comp_fn->bcol_function) { - /* if there isn't a bcol function for this then we can't continue */ - ret = OMPI_ERR_NOT_SUPPORTED; - goto Allreduce_Setup_Error; - } - - comp_fn->task_comp_fn = NULL; - - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[nfn]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[nfn]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ++nfn; - } - - /* Fill the rest of constant data */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - mca_bcol_base_module_t *current_bcol = - schedule->component_functions[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < n_hiers; j_hier++) { - if (current_bcol == - schedule->component_functions[j_hier]. - constant_group_data.bcol_module) { - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective = cnt; - cnt++; - } - } - - schedule->component_functions[i_hier]. - constant_group_data.n_of_this_type_in_collective = cnt; - } - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - -Allreduce_Setup_Error: - - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - } - *coll_desc = NULL; - free (schedule); - - return ret; -} - -int ml_coll_hier_allreduce_setup_new(mca_coll_ml_module_t *ml_module) -{ - /* Hierarchy Setup */ - int ret; - int topo_index; - int alg; - mca_coll_ml_topology_t *topo_info = ml_module->topo_list; - - alg = mca_coll_ml_component.coll_config[ML_ALLREDUCE][ML_SMALL_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_allreduce_schedule( - &ml_module->topo_list[topo_index], - &ml_module->coll_ml_allreduce_functions[alg], - SMALL_MSG_RANGE); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup Small Message Allreduce")); - return ret; - } - - alg = mca_coll_ml_component.coll_config[ML_ALLREDUCE][ML_LARGE_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_allreduce_schedule( - &ml_module->topo_list[topo_index], - &ml_module->coll_ml_allreduce_functions[alg], - LARGE_MSG_RANGE); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup Large Message Allreduce")); - return ret; - } - - if (true == mca_coll_ml_component.need_allreduce_support) { - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE]; - if (ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_allreduce_schedule( - &ml_module->topo_list[topo_index], - &ml_module->coll_ml_allreduce_functions[ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE], - SMALL_MSG_RANGE); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup Extra Small Message Allreduce")); - return ret; - } - - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE]; - if (ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_allreduce_schedule( - &ml_module->topo_list[topo_index], - &ml_module->coll_ml_allreduce_functions[ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE], - LARGE_MSG_RANGE); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup Extra Large Message Allreduce")); - return ret; - } - } - - return OMPI_SUCCESS; -} - -void ml_coll_hier_allreduce_cleanup_new(mca_coll_ml_module_t *ml_module) -{ - /* Hierarchy Setup */ - int topo_index; - int alg; - mca_coll_ml_topology_t *topo_info = ml_module->topo_list; - - alg = mca_coll_ml_component.coll_config[ML_ALLREDUCE][ML_SMALL_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return; - } - - if (NULL == ml_module->coll_ml_allreduce_functions[alg]) { - return; - } - - free(ml_module->coll_ml_allreduce_functions[alg]->component_functions); - ml_module->coll_ml_allreduce_functions[alg]->component_functions = NULL; - free(ml_module->coll_ml_allreduce_functions[alg]); - ml_module->coll_ml_allreduce_functions[alg] = NULL; - - alg = mca_coll_ml_component.coll_config[ML_ALLREDUCE][ML_LARGE_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return; - } - - free(ml_module->coll_ml_allreduce_functions[alg]->component_functions); - ml_module->coll_ml_allreduce_functions[alg]->component_functions = NULL; - free(ml_module->coll_ml_allreduce_functions[alg]); - ml_module->coll_ml_allreduce_functions[alg] = NULL; - - if (true == mca_coll_ml_component.need_allreduce_support) { - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE]; - if (ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return; - } - - alg = ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE; - free(ml_module->coll_ml_allreduce_functions[alg]->component_functions); - ml_module->coll_ml_allreduce_functions[alg]->component_functions = NULL; - free(ml_module->coll_ml_allreduce_functions[alg]); - ml_module->coll_ml_allreduce_functions[alg] = NULL; - - topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE]; - if (ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index was defined")); - topo_info->hierarchical_algorithms[ML_ALLREDUCE] = NULL; - return; - } - - alg = ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE; - free(ml_module->coll_ml_allreduce_functions[alg]->component_functions); - ml_module->coll_ml_allreduce_functions[alg]->component_functions = NULL; - free(ml_module->coll_ml_allreduce_functions[alg]); - ml_module->coll_ml_allreduce_functions[alg] = NULL; - } -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_barrier_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_barrier_setup.c deleted file mode 100644 index 54aeac6f86d..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_barrier_setup.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml_functions.h" - -static int mca_coll_ml_build_barrier_schedule( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t - **coll_desc, - mca_coll_ml_module_t *ml_module) -{ - int i_hier, rc, i_fn, n_fcns, i, - n_hiers = topo_info->n_levels; - - bool call_for_top_func; - mca_bcol_base_module_t *bcol_module; - - mca_coll_ml_compound_functions_t *comp_fn; - mca_coll_ml_collective_operation_description_t *schedule; - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - malloc(sizeof(mca_coll_ml_collective_operation_description_t)); - - schedule = *coll_desc; - if (OPAL_UNLIKELY(NULL == schedule)) { - ML_ERROR(("Can't allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto Barrier_Setup_Error; - } - - if (topo_info->global_highest_hier_group_index == - topo_info->component_pairs[n_hiers - 1].bcol_index) { - /* The process that is member of highest level subgroup - should call for top algorithms in addition to fan-in/out steps */ - call_for_top_func = true; - n_fcns = 2 * n_hiers - 1; /* Up + Top + Down */ - } else { - /* The process is not member of highest level subgroup, - as result it does not call for top algorithm, - but it calls for all fan-in/out steps */ - call_for_top_func = false; - n_fcns = 2 * n_hiers; - } - - if( ml_module->max_fn_calls < n_fcns ) { - ml_module->max_fn_calls = n_fcns; - } - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = n_fcns; - schedule->topo_info = topo_info; - - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(n_fcns, sizeof(struct mca_coll_ml_compound_functions_t)); - - if (OPAL_UNLIKELY(NULL == schedule->component_functions)) { - ML_ERROR(("Can't allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto Barrier_Setup_Error; - } - for (i_fn = 0; i_fn < n_fcns; ++i_fn) { - i_hier = (i_fn < n_hiers ? i_fn : n_fcns - i_fn - 1); - comp_fn = &schedule->component_functions[i_fn]; - - /* The hierarchial level */ - comp_fn->h_level = i_hier; - bcol_module = GET_BCOL(topo_info, i_hier); - - /* The UP direction */ - if (1 + i_fn < n_hiers || (1 + i_fn == n_hiers && !call_for_top_func)) { - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_FANIN][1][0][0]; - - if (NULL == comp_fn->bcol_function) { - ML_VERBOSE(10, ("no function available for BCOL_FANIN, NON_BLOCKING, DATA_SRC_KNOWN")); - rc = OMPI_ERR_NOT_AVAILABLE; - goto Barrier_Setup_Error; - } - - /* Each function call with index K is depended of all K-1 previous indices - - in simple words we will do sequential Fan-In calls */ - comp_fn->num_dependencies = (0 == i_fn) ? 0 : 1; - comp_fn->num_dependent_tasks = 1; - /* Init component function */ - strcpy(comp_fn->fn_name, "FANIN"); - /* On the highest level */ - } else if ((1 + i_fn == n_hiers && call_for_top_func)) { - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_BARRIER][1][0][0]; - - if (NULL == comp_fn->bcol_function) { - ML_VERBOSE(10, ("no function available for BCOL_BARRIER, NON_BLOCKING, DATA_SRC_KNOWN")); - rc = OMPI_ERR_NOT_AVAILABLE; - goto Barrier_Setup_Error; - } - - /* Each function call with index K is depended of all K-1 previous indices - - in simple words we do sequential calls */ - comp_fn->num_dependencies = (1 == n_hiers) ? 0 : 1; /* All Fan-Ins */ - comp_fn->num_dependent_tasks = n_fcns - n_hiers; /* All Fan-Outs */ - - /* Init component function */ - strcpy(comp_fn->fn_name, "BARRIER"); - - ML_VERBOSE(10, ("func indx %d set to BARRIER %p", i_fn, comp_fn->bcol_function)); - - /* The DOWN direction */ - } else { - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_FANOUT][1][0][0]; - - if (NULL == comp_fn->bcol_function) { - ML_VERBOSE(10, ("no function available for BCOL_FANOUT, NON_BLOCKING, DATA_SRC_KNOWN")); - rc = OMPI_ERR_NOT_AVAILABLE; - goto Barrier_Setup_Error; - } - - /* Each function call with index K is depended of all UP and TOP algths */ - comp_fn->num_dependencies = 1; - comp_fn->num_dependent_tasks = call_for_top_func ? 0 : - (i_fn + 1 == n_fcns ? 0 : 1); - - /* Init component function */ - strcpy(comp_fn->fn_name, "FANOUT"); - } - - ML_VERBOSE(10, ("func indx %d set to %p", i_fn, comp_fn->bcol_function)); - - if (comp_fn->num_dependent_tasks > 0) { - comp_fn->dependent_task_indices = (int *) calloc(comp_fn->num_dependent_tasks, sizeof(int)); - if (OPAL_UNLIKELY(NULL == comp_fn->dependent_task_indices)) { - ML_ERROR(("Can't allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto Barrier_Setup_Error; - } - - /* All indexes follow after this one */ - for (i = 0; i < comp_fn->num_dependent_tasks; ++i) { - comp_fn->dependent_task_indices[i] = i_fn + i + 1; - } - } else { - comp_fn->dependent_task_indices = NULL; - } - - - /* No need completion func for Barrier */ - comp_fn->task_comp_fn = NULL; - - ML_VERBOSE(10, ("Setting collective [Barrier] fn_idx %d, n_of_this_type_in_a_row %d, " - "index_in_consecutive_same_bcol_calls %d.", - i_fn, comp_fn->constant_group_data.n_of_this_type_in_a_row, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls)); - } - - rc = ml_coll_barrier_constant_group_data_setup(topo_info, schedule); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("Failed to init const group data.")); - goto Barrier_Setup_Error; - } - - schedule->progress_type = 0; - - return OMPI_SUCCESS; - -Barrier_Setup_Error: - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - schedule->component_functions = NULL; - } - - return rc; -} - -int ml_coll_hier_barrier_setup(mca_coll_ml_module_t *ml_module) -{ - int rc; - mca_coll_ml_topology_t *topo_info = - &ml_module->topo_list[ml_module->collectives_topology_map[ML_BARRIER][ML_SMALL_MSG]]; - - rc = mca_coll_ml_build_barrier_schedule(topo_info, - &ml_module->coll_ml_barrier_function, ml_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - /* Make sure to reset the barrier pointer to NULL */ - topo_info->hierarchical_algorithms[BCOL_BARRIER] = NULL; - - return rc; - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_bcast_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_bcast_setup.c deleted file mode 100644 index 627baf63441..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_bcast_setup.c +++ /dev/null @@ -1,851 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml_functions.h" - -static int mca_coll_ml_task_comp_dynamic_root_small_message - (struct mca_coll_ml_task_status_t *task) { - - task->ml_coll_operation->variable_fn_params.root_flag = true; - - return OMPI_SUCCESS; -} - - -int mca_coll_ml_setup_scratch_vals(mca_coll_ml_compound_functions_t *func_list, - int *scratch_indx, int *scratch_num, int n_hiers) -{ - int i_hier, j_hier; - int cnt, value_to_set = 0; - bool prev_is_zero; - mca_coll_ml_compound_functions_t *comp_fn; - mca_bcol_base_module_t *prev_bcol = NULL, - *bcol_module; - - /* Calculate scratch numbers */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - bcol_module = func_list[i_hier].constant_group_data.bcol_module; - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, bcol_module)) { - scratch_indx[i_hier] = scratch_indx[i_hier - 1] + 1; - } else { - scratch_indx[i_hier] = 0; - prev_bcol = bcol_module; - } - } - - --i_hier; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i_hier] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i_hier]) { - prev_is_zero = true; - } - - scratch_num[i_hier] = value_to_set; - --i_hier; - } while(i_hier >= 0); - - - /* Each hierarchy has one function to be implemented */ - /* this is the basic setup required of the bcol function */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - /* We want to be generic, but on this stage we support only single - * bcol per hierarchy level - */ - comp_fn = &func_list[i_hier]; - comp_fn->h_level = i_hier; /* hierarchy level */ - - /* we can change this */ - comp_fn->task_comp_fn = mca_coll_ml_task_comp_dynamic_root_small_message; - /* assert(NULL != comp_fn->bcol_function); */ - /* Constants */ - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ML_VERBOSE(10, ("Setting collective [bcast] fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - i_hier, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls, - comp_fn->constant_group_data.n_of_this_type_in_a_row)); - } - - /* Fill the rest of constant data */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - mca_bcol_base_module_t *current_bcol = - func_list[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < n_hiers; j_hier++) { - if (current_bcol == - func_list[j_hier]. - constant_group_data.bcol_module) { - func_list[j_hier].constant_group_data. - index_of_this_type_in_collective = cnt; - - cnt++; - } - } - func_list[i_hier].constant_group_data.n_of_this_type_in_collective = cnt; - } - - return OMPI_SUCCESS; - -} - -static void mca_coll_ml_zero_dep_bcast(mca_coll_ml_task_status_t *task_status, int index, mca_coll_ml_compound_functions_t *func) -{ - /* no real dependency, set everything to zero */ - task_status->rt_num_dependencies = 0; - task_status->rt_num_dependent_tasks = 0; - task_status->rt_dependent_task_indices = NULL; -} - -/* - * Build schedule without runtime attributes - */ -static int mca_coll_ml_build_bcast_dynamic_schedule_no_attributes( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc, int bcol_func_index) -{ - - int n_hiers = topo_info->n_levels; - int i_hier, j_hier; - int cnt, value_to_set = 0; - int ret; /* exit code in case of error */ - bool prev_is_zero; - int *scratch_indx = NULL, - *scratch_num = NULL; - - mca_coll_ml_collective_operation_description_t *schedule; - mca_coll_ml_compound_functions_t *comp_fn; - mca_bcol_base_module_t *prev_bcol, - *bcol_module; - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - calloc(1, sizeof(mca_coll_ml_collective_operation_description_t)); - schedule = *coll_desc; - if (NULL == schedule) { - ML_ERROR(("Can't allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - scratch_indx = (int *) calloc(n_hiers, sizeof (int)); - if (NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (n_hiers)); - if (NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - prev_bcol = NULL; - - /* Calculate scratch numbers */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i_hier))) { - scratch_indx[i_hier] = scratch_indx[i_hier - 1] + 1; - } else { - scratch_indx[i_hier] = 0; - prev_bcol = GET_BCOL(topo_info, i_hier); - } - } - - --i_hier; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i_hier] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i_hier]) { - prev_is_zero = true; - } - - scratch_num[i_hier] = value_to_set; - --i_hier; - } while(i_hier >= 0); - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = n_hiers; - schedule->topo_info = topo_info; - schedule->progress_type = 0; /* Pasha: Not really defined, puting zero */ - - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(n_hiers, sizeof(struct mca_coll_ml_compound_functions_t)); - if (NULL == schedule->component_functions) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - /* Each hierarchy has one function to be implemented */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - /* We want to be generic, but on this stage we support only single - * bcol per hierarchy level - */ - comp_fn = &schedule->component_functions[i_hier]; - comp_fn->h_level = i_hier; /* hierarchy level */ - bcol_module = GET_BCOL(topo_info, i_hier); - /* Init component function */ - strcpy (comp_fn->fn_name, "BCAST_TEST_SMALL_DYNAMIC"); - comp_fn->num_dependent_tasks = 0; - comp_fn->num_dependencies = 0; - comp_fn->dependent_task_indices = NULL; - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_UNKNOWN][NON_BLOCKING][BCOL_BCAST][bcol_func_index][0][0]; - comp_fn->task_comp_fn = mca_coll_ml_task_comp_dynamic_root_small_message; - assert(NULL != comp_fn->bcol_function); - /* - comp_fn->bcol_function->progress_fn = - bcol_module->filtered_fns_table[BCOL_BCAST][1][0][0]; - */ - /* Constants */ - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ML_VERBOSE(10, ("Setting collective [bcast] fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - i_hier, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls, - comp_fn->constant_group_data.n_of_this_type_in_a_row)); - } - - /* Fill the rest of constant data */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - mca_bcol_base_module_t *current_bcol = - schedule->component_functions[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < n_hiers; j_hier++) { - if (current_bcol == - schedule->component_functions[j_hier]. - constant_group_data.bcol_module) { - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective = cnt; - ML_VERBOSE(10, ("Pasha: Setting collective [bcast small][count %d], fn_idx %d, collective_alg->functions[i].index_of_this_type_in_collective %d", - cnt, i_hier, - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective)); - cnt++; - } - } - - schedule->component_functions[i_hier]. - constant_group_data.n_of_this_type_in_collective = cnt; - } - - schedule->task_setup_fn[COLL_ML_ROOT_TASK_FN] = mca_coll_ml_zero_dep_bcast; - schedule->task_setup_fn[COLL_ML_GENERAL_TASK_FN] = mca_coll_ml_zero_dep_bcast; - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - -Bcast_Setup_Error: - - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - } - - return ret; -} - -static int mca_coll_ml_build_bcast_sequential_schedule_no_attributes( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc, int bcol_func_index) -{ - - int n_hiers = topo_info->n_levels; - int i_hier, j_hier; - int cnt, value_to_set = 0; - int ret; /* exit code in case of error */ - bool prev_is_zero; - int *scratch_indx = NULL, - *scratch_num = NULL; - - mca_coll_ml_collective_operation_description_t *schedule; - mca_coll_ml_compound_functions_t *comp_fn; - mca_coll_ml_compound_functions_t *comp_fns_temp; - mca_bcol_base_module_t *prev_bcol, - *bcol_module; - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - calloc(1, sizeof(mca_coll_ml_collective_operation_description_t)); - schedule = *coll_desc; - if (NULL == schedule) { - ML_ERROR(("Can't allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - scratch_indx = (int *) calloc(n_hiers, sizeof (int)); - if (NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (n_hiers)); - if (NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - prev_bcol = NULL; - - /* Calculate scratch numbers */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i_hier))) { - scratch_indx[i_hier] = scratch_indx[i_hier - 1] + 1; - } else { - scratch_indx[i_hier] = 0; - prev_bcol = GET_BCOL(topo_info, i_hier); - } - } - - --i_hier; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i_hier] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i_hier]) { - prev_is_zero = true; - } - - scratch_num[i_hier] = value_to_set; - --i_hier; - } while(i_hier >= 0); - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = n_hiers; - schedule->topo_info = topo_info; - schedule->progress_type = 0; /* Pasha: Not really defined, puting zero - * Josh: would be nice to define it as "sequential" - * or "concurrent" - */ - - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(n_hiers, sizeof(struct mca_coll_ml_compound_functions_t)); - if (NULL == schedule->component_functions) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - /* Allocate the schedule list */ - schedule->comp_fn_arr = (struct mca_coll_ml_compound_functions_t **) - calloc(n_hiers,sizeof(struct mca_coll_ml_compound_functions_t *)); - if (NULL == schedule->comp_fn_arr) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - /* Each hierarchy has one function to be implemented */ - /* this is the basic setup required of the bcol function */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - /* We want to be generic, but on this stage we support only single - * bcol per hierarchy level - */ - comp_fn = &schedule->component_functions[i_hier]; - comp_fn->h_level = i_hier; /* hierarchy level */ - bcol_module = GET_BCOL(topo_info, i_hier); - /* Init component function */ - strcpy (comp_fn->fn_name, "BCAST_TEST_SMALL_SEQUENTIAL"); - - /* should be very simple, shouldn't require any kind of fancy dependencies set*/ - - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_BCAST][bcol_func_index][0][0]; - - /* initialize the coll_fn_started flag to false */ - /*comp_fn->coll_fn_started = false;*/ - /* debug print */ - - /* - if(comp_fn->coll_fn_started){ - fprintf(stderr,"this statement is true\n"); - } else { - fprintf(stderr,"done setting to false \n"); - } - */ - - comp_fn->task_comp_fn = mca_coll_ml_task_comp_dynamic_root_small_message; - /* assert(NULL != comp_fn->bcol_function); */ - /* Constants */ - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ML_VERBOSE(10, ("Setting collective [bcast] fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - i_hier, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls, - comp_fn->constant_group_data.n_of_this_type_in_a_row)); - } - - /* Fill the rest of constant data */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - mca_bcol_base_module_t *current_bcol = - schedule->component_functions[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < n_hiers; j_hier++) { - if (current_bcol == - schedule->component_functions[j_hier]. - constant_group_data.bcol_module) { - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective = cnt; - ML_VERBOSE(10, ("Pasha: Setting collective [bcast small][count %d], fn_idx %d, collective_alg->functions[i].index_of_this_type_in_collective %d", - cnt, i_hier, - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective)); - cnt++; - } - } - schedule->component_functions[i_hier]. - constant_group_data.n_of_this_type_in_collective = cnt; - } - /* Now that the functions have been set-up properly, we can simple permute the ordering a bit */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - /* first one is trivial */ - comp_fns_temp = (struct mca_coll_ml_compound_functions_t *) - calloc(n_hiers, sizeof(struct mca_coll_ml_compound_functions_t)); - /* else we need to build the schedule */ - - for(j_hier = 0; j_hier < n_hiers; j_hier++) { - /* put the i_hier-th function first in the list */ - if( 0 == j_hier ) { - comp_fns_temp[j_hier] = schedule->component_functions[i_hier]; - } else if( j_hier <= i_hier ) { - comp_fns_temp[j_hier] = schedule->component_functions[j_hier-1]; - } else { - comp_fns_temp[j_hier] = schedule->component_functions[j_hier]; - } - } - /* now let's attach this list to our array of lists */ - schedule->comp_fn_arr[i_hier] = comp_fns_temp; - - } - - -#if 1 - /* I'm going to just loop over each schedule and - * set up the scratch indices, scratch numbers - * and other constant data - */ - for( i_hier = 1; i_hier < n_hiers; i_hier++) { - /* calculate the scratch indices and associated numbers */ - ret = mca_coll_ml_setup_scratch_vals(schedule->comp_fn_arr[i_hier], scratch_indx, - scratch_num, n_hiers); - if( OMPI_SUCCESS != ret ) { - ret = OMPI_ERROR; - goto Bcast_Setup_Error; - } - - } -#endif - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - -Bcast_Setup_Error: - - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - } - - if (NULL != schedule->comp_fn_arr) { - free(schedule->comp_fn_arr); - } - free (schedule); - *coll_desc = NULL; - - return ret; -} - -static void mca_coll_ml_static_bcast_root(mca_coll_ml_task_status_t *task_status, int index, - mca_coll_ml_compound_functions_t *func) -{ - task_status->rt_num_dependencies = 0; - task_status->rt_num_dependent_tasks = 0; - task_status->rt_dependent_task_indices = 0; -} - -static void mca_coll_ml_static_bcast_non_root(mca_coll_ml_task_status_t *task_status, int index, - mca_coll_ml_compound_functions_t *func) -{ - /* Make active only the first level of hierarchy the gets the data, all the rest of levels - will be activated by dependency list */ - if (task_status->ml_coll_operation->variable_fn_params.root_route->level == index) { - task_status->rt_num_dependencies = 0; - task_status->rt_num_dependent_tasks = func->num_dependent_tasks; - task_status->rt_dependent_task_indices = func->dependent_task_indices; - task_status->ml_coll_operation->variable_fn_params.root = - task_status->ml_coll_operation->variable_fn_params.root_route->rank; - } else { - task_status->rt_num_dependencies = 1; /* wait for root */ - task_status->rt_num_dependent_tasks = 0; /* no depended task */ - task_status->rt_dependent_task_indices = NULL; /* NULL */ - } -} - -static int mca_coll_ml_build_bcast_known_schedule_no_attributes( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc, int bcol_func_index) -{ - - int n_hiers = topo_info->n_levels; - int i_hier, j_hier; - int cnt, value_to_set = 0; - int ret; /* exit code in case of error */ - bool prev_is_zero; - int *scratch_indx = NULL, - *scratch_num = NULL; - - mca_coll_ml_collective_operation_description_t *schedule; - mca_coll_ml_compound_functions_t *comp_fn; - mca_bcol_base_module_t *prev_bcol, - *bcol_module; - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - calloc(1, sizeof(mca_coll_ml_collective_operation_description_t)); - schedule = *coll_desc; - if (NULL == schedule) { - ML_ERROR(("Can't allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - scratch_indx = (int *) calloc(n_hiers, sizeof (int)); - if (NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (n_hiers)); - if (NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - prev_bcol = NULL; - - /* Calculate scratch numbers */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i_hier))) { - scratch_indx[i_hier] = scratch_indx[i_hier - 1] + 1; - } else { - prev_bcol = GET_BCOL(topo_info, i_hier); - } - } - - --i_hier; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i_hier] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i_hier]) { - prev_is_zero = true; - } - - scratch_num[i_hier] = value_to_set; - --i_hier; - } while(i_hier >= 0); - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = n_hiers; - schedule->topo_info = topo_info; - schedule->progress_type = 0; /* Pasha: Not really defined, puting zero */ - - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(n_hiers, sizeof(struct mca_coll_ml_compound_functions_t)); - if (NULL == schedule->component_functions) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Bcast_Setup_Error; - } - - /* Each hierarchy has one function to be implemented */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - int j; - /* We want to be generic, but on this stage we support only single - * bcol per hierarchy level - */ - comp_fn = &schedule->component_functions[i_hier]; - comp_fn->h_level = i_hier; /* hierarchy level */ - bcol_module = GET_BCOL(topo_info, i_hier); - /* Init component function */ - strcpy (comp_fn->fn_name, "BCAST_TEST_SMALL_STATIC"); - /* Hack for single layer of hierarchy */ - if (1 == n_hiers) { - comp_fn->num_dependent_tasks = n_hiers - 1; - comp_fn->num_dependencies = 0; - } else { - comp_fn->num_dependent_tasks = n_hiers; /* root will have n_hier - 1 depended tasks, non root zero*/ - comp_fn->num_dependencies = 0; /* root will have zero dependencies */ - } - - if (0 != comp_fn->num_dependent_tasks) { - comp_fn->dependent_task_indices = (int *)calloc(n_hiers, sizeof(int)); - for (j = 0; j < n_hiers; j++) { - comp_fn->dependent_task_indices[j] = j; /* only root will use this one */ - } - } - - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_BCAST][bcol_func_index][0][0]; - - comp_fn->task_comp_fn = mca_coll_ml_task_comp_dynamic_root_small_message; - /* assert(NULL != comp_fn->bcol_function); */ - /* Constants */ - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ML_VERBOSE(10, ("Setting collective [bcast] fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - i_hier, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls, - comp_fn->constant_group_data.n_of_this_type_in_a_row)); - } - - /* Fill the rest of constant data */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - mca_bcol_base_module_t *current_bcol = - schedule->component_functions[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < n_hiers; j_hier++) { - if (current_bcol == - schedule->component_functions[j_hier]. - constant_group_data.bcol_module) { - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective = cnt; - ML_VERBOSE(10, ("Pasha: Setting collective [bcast small][count %d], fn_idx %d, collective_alg->functions[i].index_of_this_type_in_collective %d", - cnt, i_hier, - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective)); - cnt++; - } - } - schedule->component_functions[i_hier]. - constant_group_data.n_of_this_type_in_collective = cnt; - } - - schedule->task_setup_fn[COLL_ML_ROOT_TASK_FN] = mca_coll_ml_static_bcast_root; - schedule->task_setup_fn[COLL_ML_GENERAL_TASK_FN] = mca_coll_ml_static_bcast_non_root; - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - -Bcast_Setup_Error: - - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - } - free (schedule); - *coll_desc = NULL; - - return ret; -} - - - -#define BCAST_SMALL 1 -#define BCAST_LARGE 5 - -int ml_coll_hier_bcast_setup(mca_coll_ml_module_t *ml_module) -{ - /* Hierarchy Setup */ - int ret, i , size_code, alg; - int topo_index = 0; - mca_coll_ml_topology_t *topo_info = ml_module->topo_list; - - for (i = 0; i < ML_NUM_MSG; i++) { - - switch (i) { - case ML_SMALL_MSG: - size_code = BCAST_SMALL; - break; - case ML_LARGE_MSG: - size_code = BCAST_LARGE; - break; - default: - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return OMPI_ERROR; - } - - alg = mca_coll_ml_component.coll_config[ML_BCAST][i].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_BCAST][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return OMPI_ERROR; - } - - switch (alg) { - case ML_BCAST_SMALL_DATA_KNOWN: - case ML_BCAST_LARGE_DATA_KNOWN: - ret = mca_coll_ml_build_bcast_known_schedule_no_attributes(&topo_info[topo_index], - &ml_module->coll_ml_bcast_functions[alg], size_code); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup static bcast")); - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return ret; - } - break; - case ML_BCAST_SMALL_DATA_UNKNOWN: - case ML_BCAST_LARGE_DATA_UNKNOWN: - ret = mca_coll_ml_build_bcast_dynamic_schedule_no_attributes(&topo_info[topo_index], - &ml_module->coll_ml_bcast_functions[alg], size_code); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup dynamic bcast")); - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return ret; - } - break; - case ML_BCAST_SMALL_DATA_SEQUENTIAL: - case ML_BCAST_LARGE_DATA_SEQUENTIAL: - ret = mca_coll_ml_build_bcast_sequential_schedule_no_attributes(&topo_info[topo_index], - &ml_module->coll_ml_bcast_functions[alg], size_code); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup static bcast")); - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return ret; - } - break; - default: - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return OMPI_ERROR; - } - assert(NULL != ml_module->coll_ml_bcast_functions[alg] && - NULL != ml_module->coll_ml_bcast_functions[alg]); - } - - topo_info->hierarchical_algorithms[BCOL_BCAST] = NULL; - return ret; -} - -void ml_coll_hier_bcast_cleanup(mca_coll_ml_module_t *ml_module) -{ - /* Hierarchy Setup */ - int i, alg; - int topo_index = 0; - mca_coll_ml_topology_t *topo_info = ml_module->topo_list; - - assert (NULL != ml_module); - - for (i = 0; i < ML_NUM_MSG; i++) { - - switch (i) { - case ML_SMALL_MSG: - case ML_LARGE_MSG: - break; - default: - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return; - } - - alg = mca_coll_ml_component.coll_config[ML_BCAST][i].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_BCAST][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - return; - } - - if (NULL != ml_module->coll_ml_bcast_functions[alg]) { - if (ML_BCAST_SMALL_DATA_KNOWN <= alg && ML_BCAST_LARGE_DATA_SEQUENTIAL >= alg) { - if (ml_module->coll_ml_bcast_functions[alg]->component_functions) { - free(ml_module->coll_ml_bcast_functions[alg]->component_functions); - ml_module->coll_ml_bcast_functions[alg]->component_functions = NULL; - } - - free(ml_module->coll_ml_bcast_functions[alg]); - ml_module->coll_ml_bcast_functions[alg] = NULL; - } else { - topo_info->hierarchical_algorithms[ML_BCAST] = NULL; - } - } - } -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.c deleted file mode 100644 index baab9624468..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.h" - -int mca_coll_ml_schedule_init_scratch(mca_coll_ml_topology_t *topo_info, - mca_coll_ml_schedule_hier_info_t *h_info, - int **out_scratch_indx, int **out_scratch_num) -{ - bool prev_is_zero; - int i, cnt; - int n_hiers = h_info->n_hiers; - int value_to_set = 0; - mca_bcol_base_module_t *prev_bcol = NULL; - int *scratch_indx, *scratch_num; - - scratch_indx = *out_scratch_indx = - (int *) calloc(n_hiers * 2, sizeof(int)); - if (NULL == *out_scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - scratch_num = *out_scratch_num = - (int *) calloc(n_hiers * 2, sizeof(int)); - if (NULL == *out_scratch_num) { - ML_ERROR(("Can't allocate memory.")); - free(out_scratch_indx); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - for (i = 0, cnt = 0; i < h_info->num_up_levels; ++i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, i); - } - } - - /* top - only if the proc arrive to highest_level_is_global_highest_level */ - if (h_info->call_for_top_function) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, n_hiers - 1))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, n_hiers - 1); - } - ++cnt; - } - - /* going down */ - for (i = h_info->num_up_levels - 1; i >= 0; --i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, i); - } - } - - i = cnt - 1; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i]) { - prev_is_zero = true; - } - - scratch_num[i] = value_to_set; - --i; - } while(i >= 0); - - return OMPI_SUCCESS; -} - -mca_coll_ml_collective_operation_description_t * - mca_coll_ml_schedule_alloc(mca_coll_ml_schedule_hier_info_t *h_info) -{ - mca_coll_ml_collective_operation_description_t *schedule = NULL; - - schedule = (mca_coll_ml_collective_operation_description_t *) - malloc(sizeof(mca_coll_ml_collective_operation_description_t)); - if (NULL == schedule) { - ML_ERROR(("Can't allocate memory.")); - return NULL; - } - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = h_info->nbcol_functions; - schedule->progress_type = 0; - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(h_info->nbcol_functions, sizeof(struct mca_coll_ml_compound_functions_t)); - if (NULL == schedule->component_functions) { - ML_ERROR(("Can't allocate memory.")); - free(schedule); - return NULL; - } - return schedule; -} - -void mca_coll_ml_call_types(mca_coll_ml_schedule_hier_info_t *h_info, - mca_coll_ml_collective_operation_description_t *schedule) -{ - int i_hier, j_hier, cnt; - mca_bcol_base_module_t *current_bcol = NULL; - - for (i_hier = 0; i_hier < h_info->n_hiers; i_hier++) { - current_bcol = - schedule->component_functions[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < h_info->n_hiers; j_hier++) { - if (current_bcol == - schedule->component_functions[j_hier]. - constant_group_data.bcol_module) { - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective = cnt; - cnt++; - } - } - schedule->component_functions[i_hier]. - constant_group_data.n_of_this_type_in_collective = cnt; - } -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.h b/ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.h deleted file mode 100644 index ba5f9aea990..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_common_setup.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_COLL_ML_COMMON_SETUP_H -#define MCA_COLL_ML_COMMON_SETUP_H - -#include "ompi_config.h" - -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/coll/ml/coll_ml.h" - -struct mca_coll_ml_schedule_hier_info_t { - int n_hiers; - int num_up_levels; - int nbcol_functions; - bool call_for_top_function; -}; -typedef struct mca_coll_ml_schedule_hier_info_t - mca_coll_ml_schedule_hier_info_t; - -#define MCA_COLL_ML_INIT_HIER_INFO(info, n_hr, g_hr, ml_module) \ -do { \ - info.n_hiers = n_hr; \ - if (g_hr == \ - ml_module->component_pairs[n_hr - 1].bcol_index) { \ - /* The process that is member of highest level subgroup \ - should call for top algorithms in addition to fan-in/out steps*/ \ - ML_VERBOSE(9, ("Setting top %d %d", n_hr, ml_module->component_pairs[g_hr - 1].bcol_index)); \ - info.call_for_top_function = true; \ - /* hier level run only top algorithm, so we deduct 1 */ \ - info.num_up_levels = n_hr - 1; \ - /* Top algorithm is called only once, so we deduct 1 */ \ - info.nbcol_functions = 2 * n_hr - 1; \ - } else { \ - ML_VERBOSE(9, ("not setting top %d %d", n_hr, ml_module->component_pairs[g_hr - 1].bcol_index)); \ - /* The process is not member of highest level subgroup, \ - as result it does not call for top algorithm, \ - but it calls for all fan-in/out steps */ \ - info.call_for_top_function = false; \ - info.num_up_levels = n_hr; \ - info.nbcol_functions = 2 * n_hr; \ - } \ -} while (0); - -#define MCA_COLL_ML_SET_COMP_FN(fn, level, module, s_level, \ - scratch_indx, scratch_num, qc, name) \ -do { \ - fn->h_level = level; /* hierarchy level */ \ - strcpy (fn->fn_name, "name"); \ - fn->num_dependent_tasks = 0; \ - fn->num_dependencies = 0; \ - fn->task_comp_fn = NULL; \ - fn->constant_group_data.bcol_module = GET_BCOL(module, level); \ - fn->constant_group_data.index_in_consecutive_same_bcol_calls = \ - scratch_indx[s_level];\ - fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[s_level]; \ - fn->constant_group_data.n_of_this_type_in_collective = 0; \ - fn->constant_group_data.index_of_this_type_in_collective = 0; \ - fn->bcol_function = fn->constant_group_data.bcol_module-> \ - filtered_fns_table[qc[0]] \ - [qc[1]] \ - [qc[2]] \ - [qc[3]] \ - [qc[4]] \ - [qc[5]]; \ -} while (0); - -#define MCA_COLL_ML_QUERY_SIZE 6 - -#define MCA_COLL_ML_SET_QUERY(query, src_type, blocking, coll_type, index, other0, other1) \ -do { \ - query[0] = src_type; \ - query[1] = blocking; \ - query[2] = coll_type; \ - query[3] = index; \ - query[4] = other0; \ - query[5] = other1; \ -} while (0); - -int mca_coll_ml_schedule_init_scratch(mca_coll_ml_topology_t *topo_info, - mca_coll_ml_schedule_hier_info_t *h_info, - int **out_scratch_indx, int **out_scratch_num); - -mca_coll_ml_collective_operation_description_t* -mca_coll_ml_schedule_alloc(mca_coll_ml_schedule_hier_info_t *h_info); - -void mca_coll_ml_call_types(mca_coll_ml_schedule_hier_info_t *h_info, - mca_coll_ml_collective_operation_description_t *schedule); -#endif diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_reduce_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_reduce_setup.c deleted file mode 100644 index 579f77d12b7..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_reduce_setup.c +++ /dev/null @@ -1,371 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/include/ompi/constants.h" -#include "ompi/mca/coll/ml/coll_ml_functions.h" -static int mca_coll_ml_task_comp_static_reduce - (struct mca_coll_ml_task_status_t *task) { - - task->ml_coll_operation->variable_fn_params.root_flag = true; - - return OMPI_SUCCESS; -} - -static void mca_coll_ml_static_reduce_non_root(mca_coll_ml_task_status_t *task_status, int index, - mca_coll_ml_compound_functions_t *func) -{ - /* I am not a root rank, but someone in my group is a root*/ - if (task_status->ml_coll_operation->variable_fn_params.root_route->level == index) { - task_status->rt_num_dependencies = func->num_dependencies; - task_status->rt_num_dependent_tasks = 0; - task_status->rt_dependent_task_indices = NULL; - task_status->ml_coll_operation->variable_fn_params.root = - task_status->ml_coll_operation->variable_fn_params.root_route->rank; - } else { - task_status->rt_num_dependencies = 0; - task_status->rt_num_dependent_tasks = 1; - task_status->rt_dependent_task_indices = &task_status->ml_coll_operation->variable_fn_params.root_route->level; - } - -} - -static void mca_coll_ml_static_reduce_root(mca_coll_ml_task_status_t *task_status, int index, - mca_coll_ml_compound_functions_t *func) -{ - task_status->rt_num_dependencies = func->num_dependencies; - task_status->rt_num_dependent_tasks = 0; - task_status->rt_dependent_task_indices = NULL; -} - -/* - * Fill up the collective descriptor - * - */ -static int mca_coll_ml_build_static_reduce_schedule( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t **coll_desc) -{ - int i_hier, j_hier, n_fcns, - n_hiers = topo_info->n_levels; - int *scratch_indx = NULL, - *scratch_num = NULL; - int cnt, value_to_set = 0; - int ret = OMPI_SUCCESS; - bool prev_is_zero; - mca_coll_ml_compound_functions_t *comp_fns_temp; - mca_bcol_base_module_t *prev_bcol, - *bcol_module; - mca_coll_ml_compound_functions_t *comp_fn; - mca_coll_ml_collective_operation_description_t *schedule = NULL; - - *coll_desc = (mca_coll_ml_collective_operation_description_t *) - calloc(1, sizeof(mca_coll_ml_collective_operation_description_t)); - - schedule = *coll_desc; - if (OPAL_UNLIKELY(NULL == schedule)) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - scratch_indx = (int *) calloc (n_hiers, sizeof (int)); - if (NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (n_hiers)); - if (NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - prev_bcol = NULL; - - /* Calculate scratch numbers */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i_hier))) { - scratch_indx[i_hier] = scratch_indx[i_hier - 1] + 1; - } else { - scratch_indx[i_hier] = 0; - prev_bcol = GET_BCOL(topo_info, i_hier); - } - } - - --i_hier; - prev_is_zero = true; - - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i_hier] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i_hier]) { - prev_is_zero = true; - } - - scratch_num[i_hier] = value_to_set; - --i_hier; - } while(i_hier >= 0); - - /* All hierarchies call one function, unlike other collectives */ - n_fcns = n_hiers; - - /* Set dependencies equal to number of hierarchies */ - schedule->n_fns = n_fcns; - schedule->topo_info = topo_info; - schedule->progress_type = 0; - /* Allocated the component function */ - schedule->component_functions = (struct mca_coll_ml_compound_functions_t *) - calloc(n_fcns, sizeof(struct mca_coll_ml_compound_functions_t)); - - if (OPAL_UNLIKELY(NULL == schedule->component_functions)) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - - for (i_hier = 0; i_hier < n_hiers; ++i_hier) { - comp_fn = &schedule->component_functions[i_hier]; - - /* The hierarchial level */ - comp_fn->h_level = i_hier; - bcol_module = GET_BCOL(topo_info, i_hier); - - comp_fn->bcol_function = - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][BCOL_REDUCE][1][0][0]; - - strcpy(comp_fn->fn_name, "REDUCE"); - ML_VERBOSE(10, ("func indx %d set to %p", i_hier, comp_fn->bcol_function)); - - - ML_VERBOSE(1,("In ML_REDUCE_SETUP .. looks fine here")); - /* No need completion func for Barrier */ - comp_fn->task_comp_fn = mca_coll_ml_task_comp_static_reduce; - - /* Constants */ - comp_fn->constant_group_data.bcol_module = bcol_module; - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls = scratch_indx[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_a_row = scratch_num[i_hier]; - comp_fn->constant_group_data.n_of_this_type_in_collective = 0; - comp_fn->constant_group_data.index_of_this_type_in_collective = 0; - - ML_VERBOSE(10, ("Setting collective [reduce] fn_idx %d, n_of_this_type_in_a_row %d, " - "index_in_consecutive_same_bcol_calls %d.", - i_hier, comp_fn->constant_group_data.n_of_this_type_in_a_row, - comp_fn->constant_group_data.index_in_consecutive_same_bcol_calls)); - } - - - /* Fill the rest of constant data */ - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - mca_bcol_base_module_t *current_bcol = - schedule->component_functions[i_hier]. - constant_group_data.bcol_module; - cnt = 0; - for (j_hier = 0; j_hier < n_hiers; j_hier++) { - if (current_bcol == - schedule->component_functions[j_hier]. - constant_group_data.bcol_module) { - schedule->component_functions[j_hier]. - constant_group_data.index_of_this_type_in_collective = cnt; - cnt++; - } - } - schedule->component_functions[i_hier]. - constant_group_data.n_of_this_type_in_collective = cnt; - } - - /* Manju: Reduction should always use the fixed schedule. - * The subgroups that this process is leader should be executed first, then - * it should execute the subgroups where this process is not a leader, and - * then execute the subgroup that includes the root. - */ - - /* Allocate the schedule list */ - schedule->comp_fn_arr = (struct mca_coll_ml_compound_functions_t **) - calloc(n_hiers,sizeof(struct mca_coll_ml_compound_functions_t *)); - if (NULL == schedule->comp_fn_arr) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - /* Now that the functions have been set-up properly, we can simple permute the ordering a bit */ - - for (i_hier = 0; i_hier < n_hiers; i_hier++) { - /* first one is trivial */ - int leader_hierarchy = 0; - int non_leader_hierarchy = 0; - int func_index; - - comp_fns_temp = (struct mca_coll_ml_compound_functions_t *) - calloc(n_hiers, sizeof(struct mca_coll_ml_compound_functions_t)); - - leader_hierarchy = 0; - non_leader_hierarchy = n_hiers - 2; - - for(j_hier = 0; j_hier < n_hiers - 1 ; j_hier++) { - - func_index = j_hier < i_hier ? j_hier : j_hier + 1; - /* I'm a leader for this group */ - if (0 == topo_info->component_pairs->subgroup_module->my_index) { - comp_fns_temp[leader_hierarchy++] = - schedule->component_functions[func_index]; - } - else { - comp_fns_temp[non_leader_hierarchy--] = - schedule->component_functions[func_index]; - } - } - - comp_fns_temp[j_hier] = schedule->component_functions[i_hier]; - /* now let's attach this list to our array of lists */ - schedule->comp_fn_arr[i_hier] = comp_fns_temp; - } - - /* Manju: Do we need this ? */ - - /* I'm going to just loop over each schedule and - * set up the scratch indices, scratch numbers - * and other constant data - */ - /* - for( i_hier = 1; i_hier < n_hiers; i_hier++) { - ret = mca_coll_ml_setup_scratch_vals(schedule->comp_fn_arr[i_hier], scratch_indx, - scratch_num, n_hiers); - if( OMPI_SUCCESS != ret ) { - ret = OMPI_ERROR; - goto Error; - } - - } - */ - - /* Do I need this ? */ - schedule->task_setup_fn[COLL_ML_ROOT_TASK_FN] = mca_coll_ml_static_reduce_root; - schedule->task_setup_fn[COLL_ML_GENERAL_TASK_FN] = mca_coll_ml_static_reduce_non_root; - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - /* reduce does not use the component functions so we no longer need this. see - * coll_ml_reduce.c:442 */ - free (schedule->component_functions); - schedule->component_functions = NULL; - - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - -Error: - if (NULL != scratch_num) { - free (scratch_num); - } - - if (NULL != scratch_indx) { - free (scratch_indx); - } - - if (NULL != schedule) { - if (NULL != schedule->component_functions) { - free(schedule->component_functions); - schedule->component_functions = NULL; - } - free (schedule); - *coll_desc = NULL; - } - - return ret; -} - - -int ml_coll_hier_reduce_setup(mca_coll_ml_module_t *ml_module) -{ - int alg, ret, topo_index=0; - mca_coll_ml_topology_t *topo_info = - &ml_module->topo_list[ml_module->collectives_topology_map[ML_REDUCE][ML_SMALL_MSG]]; - - if ( ml_module->max_fn_calls < topo_info->n_levels ) { - ml_module->max_fn_calls = topo_info->n_levels; - } - - - alg = mca_coll_ml_component.coll_config[ML_REDUCE][ML_SMALL_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_REDUCE][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_REDUCE] = NULL; - return OMPI_ERROR; - } - - ret = mca_coll_ml_build_static_reduce_schedule(&ml_module->topo_list[topo_index], - &ml_module->coll_ml_reduce_functions[alg]); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to setup static reduce")); - return ret; - } - - - return OMPI_SUCCESS; -} - -void ml_coll_hier_reduce_cleanup(mca_coll_ml_module_t *ml_module) -{ - int alg, i, topo_index=0; - mca_coll_ml_topology_t *topo_info = - &ml_module->topo_list[ml_module->collectives_topology_map[ML_REDUCE][ML_SMALL_MSG]]; - - if ( ml_module->max_fn_calls < topo_info->n_levels ) { - ml_module->max_fn_calls = topo_info->n_levels; - } - - - alg = mca_coll_ml_component.coll_config[ML_REDUCE][ML_SMALL_MSG].algorithm_id; - topo_index = ml_module->collectives_topology_map[ML_REDUCE][alg]; - if (ML_UNDEFINED == alg || ML_UNDEFINED == topo_index) { - ML_ERROR(("No topology index or algorithm was defined")); - topo_info->hierarchical_algorithms[ML_REDUCE] = NULL; - return; - } - - if (NULL == ml_module->coll_ml_reduce_functions[alg]) { - return; - } - - if (ml_module->coll_ml_reduce_functions[alg]->comp_fn_arr) { - for (i=0; itopo_list[topo_index].n_levels; i++) { - if (ml_module->coll_ml_reduce_functions[alg]->comp_fn_arr[i]) { - free(ml_module->coll_ml_reduce_functions[alg]->comp_fn_arr[i]); - ml_module->coll_ml_reduce_functions[alg]->comp_fn_arr[i] = NULL; - } - } - - free(ml_module->coll_ml_reduce_functions[alg]->comp_fn_arr); - ml_module->coll_ml_reduce_functions[alg]->comp_fn_arr = NULL; - } - - ml_module->coll_ml_reduce_functions[alg]->component_functions = NULL; - - free(ml_module->coll_ml_reduce_functions[alg]); - ml_module->coll_ml_reduce_functions[alg] = NULL; -} diff --git a/ompi/mca/coll/ml/coll_ml_hier_algorithms_setup.c b/ompi/mca/coll/ml/coll_ml_hier_algorithms_setup.c deleted file mode 100644 index 8751a25ab9a..00000000000 --- a/ompi/mca/coll/ml/coll_ml_hier_algorithms_setup.c +++ /dev/null @@ -1,539 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/include/ompi/constants.h" - -int ml_coll_up_and_down_hier_setup(mca_coll_ml_module_t *ml_module, - mca_coll_ml_topology_t *topo_info, - int up_function_idx, - int top_function_idx, - int down_function_idx, - int collective) -{ - /* local variables */ - int i, j, cnt, value_to_set = -1; - int ret = OMPI_SUCCESS, num_up_levels; - - int num_hierarchies = topo_info->n_levels; - int global_high_hierarchy_index = topo_info->global_highest_hier_group_index; - - bool call_for_top_function, prev_is_zero; - - int *scratch_indx = NULL, *scratch_num = NULL; - - coll_ml_collective_description_t *collective_alg = NULL; - mca_bcol_base_module_t *bcol_module = NULL, - *prev_bcol = NULL; - - /* RLG: one blocking barrier collective algorithm - this is really a hack, - * we need to figure out how to do this in a bit more extensible - * manner. - */ - collective_alg = (coll_ml_collective_description_t *) - malloc(sizeof(coll_ml_collective_description_t)); - if (NULL == collective_alg) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - /* am I a member of the highest level subgroup ? */ - if (global_high_hierarchy_index == - topo_info->component_pairs[num_hierarchies - 1].bcol_index) { - /* The process that is member of highest level subgroup - should call for top algorithms in addition to fan-in/out steps*/ - call_for_top_function = true; - /* hier level run only top algorithm, so we deduct 1 */ - num_up_levels = num_hierarchies - 1; - /* Top algorithm is called only once, so we deduct 1 */ - collective_alg->n_functions = 2 * num_hierarchies - 1; - } else { - /* The process is not member of highest level subgroup, - as result it does not call for top algorithm, - but it calls for all fan-in/out steps */ - call_for_top_function = false; - num_up_levels = num_hierarchies; - collective_alg->n_functions = 2 * num_hierarchies; - } - - ML_VERBOSE(10, ("high_index %d == bcol_index %d: Call top %d, num_up_levels %d, collective_alg->n_functions %d", - global_high_hierarchy_index, - topo_info->component_pairs[num_hierarchies - 1].bcol_index, - call_for_top_function, - num_up_levels, - collective_alg->n_functions )); - - /* allocate space for the functions */ - collective_alg->functions = (mca_bcol_base_function_t *) - calloc(collective_alg->n_functions, sizeof(mca_bcol_base_function_t)); - if( NULL == collective_alg->functions) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - /* Algorithm Description: - * ===================== - * The algorithm used here for an N level system - * - up to level N-2, inclusive : up algorithm (fan in in barrier, reduce in Allreduce) - * - level N-1: top algorithm (barrier or allreduce) - * - level N-2, to level 0: down algorithm (fanout) - */ - - - /* Starting scratch_num and scratch_index calculations */ - /* =================================================== */ - - /* Figure out how many of the same bcols are called in a row. - * The index of the bcol in row we store in scratch_indx and - * the total number of bcols in the row we store in scratch_num */ - scratch_indx = (int *) calloc (2 * num_hierarchies, sizeof (int)); - if(NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (2 * num_hierarchies)); - if(NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Error; - } - - /* We go through all stages of algorithm (up, top, down) - * and calculate bcol index. If previous bcol is the same type as current - * one the counter index is increased, other way the index is zero */ - prev_bcol = NULL; - /* going up */ - for (i = 0, cnt = 0; i < num_up_levels; ++i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, i); - } - } - - /* top - only if the proc arrive to highest_level_is_global_highest_level */ - if (call_for_top_function) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, num_hierarchies - 1))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, num_hierarchies - 1); - } - - ++cnt; - } - - /* going down */ - for (i = num_up_levels - 1; i >= 0; --i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, i); - } - } - - /* - * Calculate the number of the same bcols in row. - * We parse the index array, if index is zero - * it means that the row is done and we start - * to calculate next bcols row. The maximum number - * for the row is equal to maximal bcol index in the row + 1 - */ - i = cnt - 1; - prev_is_zero = true; - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i]) { - prev_is_zero = true; - } - - scratch_num[i] = value_to_set; - --i; - } while(i >= 0); - - /* =========================================================== */ - /* We are done with scratch_num and scratch_index calculations */ - - /* Setup function call for each algorithm step */ - cnt = 0; - /* up phase */ - for (i = 0; i < num_up_levels; i++) { - bcol_module = GET_BCOL(topo_info, i); - collective_alg->functions[cnt].fn_idx = up_function_idx; - collective_alg->functions[cnt].bcol_module = bcol_module; - collective_alg->functions[cnt].index_in_consecutive_same_bcol_calls = scratch_indx[cnt]; - collective_alg->functions[cnt].n_of_this_type_in_a_row = scratch_num[cnt]; - ML_VERBOSE(10, ("Setting collective [collective code %d][count %d], fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - collective, cnt, collective_alg->functions[cnt].fn_idx, - collective_alg->functions[cnt].index_in_consecutive_same_bcol_calls, - collective_alg->functions[cnt].n_of_this_type_in_a_row)); - ++cnt; - } - - /* top function */ - if (call_for_top_function) { - bcol_module = GET_BCOL(topo_info, num_hierarchies - 1); - collective_alg->functions[cnt].fn_idx = top_function_idx; - collective_alg->functions[cnt].bcol_module = bcol_module; - collective_alg->functions[cnt].index_in_consecutive_same_bcol_calls = scratch_indx[cnt]; - collective_alg->functions[cnt].n_of_this_type_in_a_row = scratch_num[cnt]; - ML_VERBOSE(10, ("Setting collective [collective code %d][count %d], fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - collective, cnt, collective_alg->functions[cnt].fn_idx, - collective_alg->functions[cnt].index_in_consecutive_same_bcol_calls, - collective_alg->functions[cnt].n_of_this_type_in_a_row)); - ++cnt; - } - - /* down phase*/ - for (i = num_up_levels - 1; i >= 0; i--) { - bcol_module = GET_BCOL(topo_info, i); - collective_alg->functions[cnt].fn_idx = down_function_idx; - collective_alg->functions[cnt].bcol_module = bcol_module; - collective_alg->functions[cnt].index_in_consecutive_same_bcol_calls = scratch_indx[cnt]; - collective_alg->functions[cnt].n_of_this_type_in_a_row = scratch_num[cnt]; - ML_VERBOSE(10, ("Setting collective [collective code %d][count %d], fn_idx %d, index_in_consecutive_same_bcol_calls %d, n_of_this_type_in_a_row %d", - collective, cnt, collective_alg->functions[cnt].fn_idx, - collective_alg->functions[cnt].index_in_consecutive_same_bcol_calls, - collective_alg->functions[cnt].n_of_this_type_in_a_row)); - ++cnt; - } - - /* figure out how many times this bcol is used in this collective call */ - for (i = 0; i < collective_alg->n_functions; i++) { - mca_bcol_base_module_t *current_bcol= - collective_alg->functions[i].bcol_module; - - cnt = 0; - for (j = 0; j < collective_alg->n_functions; ++j) { - if (current_bcol == - collective_alg->functions[j].bcol_module) { - collective_alg->functions[j].index_of_this_type_in_collective = cnt; - ML_VERBOSE(10, ("Pasha: Setting collective [collective code %d][count %d], fn_idx %d, collective_alg->functions[i].index_of_this_type_in_collective %d", - collective, cnt, i, - collective_alg->functions[j].index_of_this_type_in_collective)); - cnt++; - } - } - - collective_alg->functions[i].n_of_this_type_in_collective=cnt; - ML_VERBOSE(10, ("Pasha: Setting collective [collective code %d][count %d], fn_idx %d, collective_alg->functions[i].n_of_this_type_in_collective %d", - collective, cnt, i, - collective_alg->functions[i].n_of_this_type_in_collective)); - } - - /* set Barrier algorithm */ - topo_info->hierarchical_algorithms[collective] = collective_alg; - /* Setup maximum number function calls, it is used for resource allocation */ - ml_module->max_fn_calls = (collective_alg->n_functions > ml_module->max_fn_calls) ? - collective_alg->n_functions : ml_module->max_fn_calls; - /* Ishai: What is this n_buffers? I did not find where it is being used*/ - topo_info->hierarchical_algorithms[collective]->n_buffers = 1; - - /* Release temporary memories */ - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - return OMPI_SUCCESS; - -Error: - if (NULL != collective_alg->functions) { - free(collective_alg->functions); - } - - if (NULL != collective_alg) { - free(collective_alg); - } - - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - return ret; -} - -int ml_coll_hier_allreduce_setup(mca_coll_ml_module_t *ml_module) -{ - int topo_index = - ml_module->collectives_topology_map[ML_ALLREDUCE][ML_SMALL_DATA_ALLREDUCE]; - int ret = ml_coll_up_and_down_hier_setup(ml_module, - &ml_module->topo_list[topo_index], - BCOL_REDUCE, - BCOL_ALLREDUCE, - BCOL_BCAST, - BCOL_ALLREDUCE); - - if (OMPI_SUCCESS == ret) { - return ret; - } - - /* Make sure to reset the allreduce pointer to NULL */ - ml_module->topo_list[topo_index].hierarchical_algorithms[BCOL_ALLREDUCE] = NULL; - return ret; -} - -#if 0 -/* - * Manju: New setup function in coll_ml_hier_algorithms_reduce_setup.c - */ -/* Ishai: Reduce is not an hier algorithm (it is rooted) - it needs a different ML algorithm */ -/* Need to rewrite */ -int ml_coll_hier_reduce_setup(mca_coll_ml_module_t *ml_module) -{ - int topo_index = ml_module->collectives_topology_map[ML_ALLREDUCE][ML_SMALL_DATA_GATHER]; - /* Hierarchy Setup */ - int ret = ml_coll_up_and_down_hier_setup(ml_module, - &ml_module->topo_list[topo_index], - BCOL_REDUCE, /*NULL,*/ - BCOL_REDUCE, - BCOL_REDUCE, /*NULL,*/ - BCOL_REDUCE); - if (OMPI_SUCCESS == ret) { - return ret; - } - /* Make sure to reset the bcast pointer to NULL */ - ml_module->topo_list[topo_index].hierarchical_algorithms[BCOL_BCAST] = NULL; - return ret; -} -#endif - -int ml_coll_barrier_constant_group_data_setup( - mca_coll_ml_topology_t *topo_info, - mca_coll_ml_collective_operation_description_t *schedule) -{ - /* local variables */ - int i, j, cnt, value_to_set = -1, ret = OMPI_SUCCESS, num_up_levels, - num_hierarchies = topo_info->n_levels, n_functions = schedule->n_fns, - global_high_hierarchy_index = topo_info->global_highest_hier_group_index; - - bool call_for_top_function, prev_is_zero; - mca_coll_ml_utility_data_t *constant_group_data = NULL; - - int *scratch_indx = NULL, *scratch_num = NULL; - - mca_bcol_base_module_t *prev_bcol = NULL, - *bcol_module = NULL; - - /* Am I a member of the highest level subgroup ? */ - if (global_high_hierarchy_index == - topo_info->component_pairs[num_hierarchies - 1].bcol_index) { - /* The process that is member of highest level subgroup - should call for top algorithms in addition to fan-in/out steps*/ - call_for_top_function = true; - /* hier level run only top algorithm, so we deduct 1 */ - num_up_levels = num_hierarchies - 1; - } else { - /* The process is not member of highest level subgroup, - as result it does not call for top algorithm, - but it calls for all fan-in/out steps */ - call_for_top_function = false; - num_up_levels = num_hierarchies; - } - - /* Algorithm Description: - * ===================== - * The algorithm used here for an N level system - * - up to level N-2, inclusive : up algorithm (Fan-In in Barrier) - * - level N-1: top algorithm (Barrier algth) - * - level N-2, to level 0: down algorithm (Fan-out) - */ - - - /* Starting scratch_num and scratch_index calculations */ - /* =================================================== */ - - /* Figure out how many of the same bcols are called in a row. - * The index of the bcol in row we store in scratch_indx and - * the total number of bcols in the row we store in scratch_num */ - scratch_indx = (int *) calloc (2 * num_hierarchies, sizeof (int)); - if(NULL == scratch_indx) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Const_Data_Setup_Error; - } - - scratch_num = (int *) malloc(sizeof(int) * (2 * num_hierarchies)); - if(NULL == scratch_num) { - ML_ERROR(("Can't allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto Const_Data_Setup_Error; - } - - /* We go through all stages of algorithm (up, top, down) - * and calculate bcol index. If previous bcol is the same type as current - * one the counter index is increased, other way the index is zero */ - prev_bcol = NULL; - - /* Going up */ - for (i = 0, cnt = 0; i < num_up_levels; ++i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, i); - } - } - - /* Top - only if the proc arrive to highest_level_is_global_highest_level */ - if (call_for_top_function) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, num_hierarchies - 1))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, num_hierarchies - 1); - } - - ++cnt; - } - - /* Going down */ - for (i = num_up_levels - 1; i >= 0; --i, ++cnt) { - if (IS_BCOL_TYPE_IDENTICAL(prev_bcol, GET_BCOL(topo_info, i))) { - scratch_indx[cnt] = scratch_indx[cnt - 1] + 1; - } else { - scratch_indx[cnt] = 0; - prev_bcol = GET_BCOL(topo_info, i); - } - } - - /* - * Calculate the number of the same bcols in row. - * We parse the index array, if index is zero - * it means that the row is done and we start - * to calculate next bcols row. The maximum number - * for the row is equal to maximal bcol index in the row + 1 - */ - i = cnt - 1; - prev_is_zero = true; - do { - if (prev_is_zero) { - value_to_set = scratch_indx[i] + 1; - prev_is_zero = false; - } - - if (0 == scratch_indx[i]) { - prev_is_zero = true; - } - - scratch_num[i] = value_to_set; - --i; - } while(i >= 0); - - /* =========================================================== */ - /* We are done with scratch_num and scratch_index calculations */ - - /* Setup function call for each algorithm step */ - cnt = 0; - - /* Up phase */ - for (i = 0; i < num_up_levels; ++i) { - bcol_module = GET_BCOL(topo_info, i); - constant_group_data = &schedule->component_functions[cnt].constant_group_data; - - constant_group_data->bcol_module = bcol_module; - constant_group_data->index_in_consecutive_same_bcol_calls = scratch_indx[cnt]; - constant_group_data->n_of_this_type_in_a_row = scratch_num[cnt]; - - ++cnt; - } - - /* Top function */ - if (call_for_top_function) { - bcol_module = GET_BCOL(topo_info, num_hierarchies - 1); - constant_group_data = &schedule->component_functions[cnt].constant_group_data; - - constant_group_data->bcol_module = bcol_module; - constant_group_data->index_in_consecutive_same_bcol_calls = scratch_indx[cnt]; - constant_group_data->n_of_this_type_in_a_row = scratch_num[cnt]; - - ++cnt; - } - - /* Down phase */ - for (i = num_up_levels - 1; i >= 0; --i) { - bcol_module = GET_BCOL(topo_info, i); - constant_group_data = &schedule->component_functions[cnt].constant_group_data; - - constant_group_data->bcol_module = bcol_module; - - /* All Fan-Outs will be done in parallel */ - constant_group_data->index_in_consecutive_same_bcol_calls = 0; - constant_group_data->n_of_this_type_in_a_row = 1; - - ++cnt; - } - - /* Figure out how many times this bcol is used in this collective call */ - for (i = 0; i < n_functions; ++i) { - struct mca_coll_ml_compound_functions_t *component_functions = - schedule->component_functions; - mca_bcol_base_module_t *current_bcol = - component_functions[i].constant_group_data.bcol_module; - - /* silence clang warning about possible NULL dereference of component_functions. - * this case is a developer error if it occurs */ - assert (NULL != component_functions && NULL != constant_group_data); - - cnt = 0; - for (j = 0; j < n_functions; ++j) { - if (current_bcol == - component_functions[j].constant_group_data.bcol_module) { - constant_group_data->index_of_this_type_in_collective = cnt; - - ++cnt; - } - } - - component_functions[i].constant_group_data.n_of_this_type_in_collective = cnt; - } - - MCA_COLL_ML_SET_SCHEDULE_ORDER_INFO(schedule); - - /* Release temporary memories */ - free(scratch_num); - free(scratch_indx); - - return OMPI_SUCCESS; - -Const_Data_Setup_Error: - if (NULL != scratch_indx) { - free(scratch_indx); - } - - if (NULL != scratch_num) { - free(scratch_num); - } - - return ret; -} diff --git a/ompi/mca/coll/ml/coll_ml_inlines.h b/ompi/mca/coll/ml/coll_ml_inlines.h deleted file mode 100644 index ea326508992..00000000000 --- a/ompi/mca/coll/ml/coll_ml_inlines.h +++ /dev/null @@ -1,637 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#ifndef MCA_COLL_ML_INLINES_H -#define MCA_COLL_ML_INLINES_H - -#include "ompi_config.h" - -BEGIN_C_DECLS - -static inline __opal_attribute_always_inline__ int ml_fls(int num) -{ - int i = 1; - int j = 0; - - if (0 == num) { - return 0; - } - - while (i < num) { - i *= 2; - j++; - } - - if (i > num) { - j--; - } - - return j; -} - -static inline __opal_attribute_always_inline__ - int mca_coll_ml_buffer_recycling(mca_coll_ml_collective_operation_progress_t *ml_request) -{ - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *)ml_request->coll_module; - mca_bcol_base_memory_block_desc_t *ml_memblock = ml_module->payload_block; - uint64_t bank_index = ml_request->fragment_data.buffer_desc->bank_index; - int rc; - - opal_atomic_add(&ml_memblock->bank_release_counters[bank_index], 1); - - /* Check if the bank is ready for recycling */ - if (ml_memblock->bank_release_counters[bank_index] == - ml_memblock->num_buffers_per_bank ) { - ml_memblock->ready_for_memsync[bank_index] = true; - - ML_VERBOSE(10, ("Sync count %d, bank %d", ml_memblock->memsync_counter, bank_index)); - assert(ml_memblock->bank_is_busy); - if (ml_memblock->memsync_counter == (int)bank_index) { - while(ml_memblock->ready_for_memsync[ml_memblock->memsync_counter]) { - ML_VERBOSE(10, ("Calling for service barrier: ml_buffer_index - %d %d %d == %d.", - ml_request->fragment_data.buffer_desc->buffer_index, - ml_memblock->memsync_counter, - ml_memblock->bank_release_counters[ml_memblock->memsync_counter], - ml_memblock->num_buffers_per_bank)); - /* Setting the ready flag to 0 - unready - done */ - ml_memblock->ready_for_memsync[ml_memblock->memsync_counter] = false; - - rc = mca_coll_ml_memsync_intra(ml_module, ml_memblock->memsync_counter); - if (OMPI_SUCCESS != rc) { - ML_ERROR(("Failed to start memory sync !!!")); - return rc; - } - - opal_atomic_add(&ml_memblock->memsync_counter, 1); - if (ml_memblock->memsync_counter == (int)ml_memblock->num_banks) { - ml_memblock->memsync_counter = 0; - } - ML_VERBOSE(10, ("After service barrier.")); - } - } else { - ML_VERBOSE(10, ("Out of order %d", ml_memblock->memsync_counter)); - } - } - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int coll_ml_fragment_completion_processing( - mca_coll_ml_collective_operation_progress_t *coll_op) -{ - /* local variables */ - int ret = OMPI_SUCCESS; - size_t bytes_in_this_frag; - struct full_message_t *full_msg_desc = coll_op->fragment_data.message_descriptor; - bool ready_to_release = true, out_of_resource = false; - - ML_VERBOSE(10, ("Coll_op %p processing completion", coll_op)); - /* Call unpack/pack function */ - if (OPAL_LIKELY(NULL != coll_op->process_fn)) { - ret = coll_op->process_fn(coll_op); - switch(ret) { - case OMPI_SUCCESS: - ML_VERBOSE(10, ("unpack done")); - ready_to_release = true; - break; - case ORTE_ERR_NO_MATCH_YET: - ML_VERBOSE(10, ("unexpected packet")); - ready_to_release = false; - break; - default: - ML_ERROR(("Error, unexpected error code %d", ret)); - return ret; - } - } - - bytes_in_this_frag = coll_op->fragment_data.fragment_size; - - ML_VERBOSE(10, ("Delivered %d bytes in frag %d total %d", - full_msg_desc->n_bytes_delivered, - bytes_in_this_frag, - full_msg_desc->n_bytes_total)); - - /* check for full message completion */ - if(full_msg_desc->n_bytes_delivered + bytes_in_this_frag == - full_msg_desc->n_bytes_total) { - /* message complete - don't update number of bytes delivered, just - * mark the message complete - */ - full_msg_desc->n_bytes_delivered += bytes_in_this_frag; - - /* decrement the number of fragments */ - full_msg_desc->n_active--; - - ML_VERBOSE(10, ("Signaling completion")); - - /* here we need to be sure that we point to the first fragment only */ - ompi_request_complete(&(coll_op->fragment_data.message_descriptor->super), true); - coll_op->fragment_data.message_descriptor->super.req_status.MPI_ERROR = OMPI_SUCCESS; - } else { - assert(NULL != coll_op->fragment_data.buffer_desc); - /* update the number of bytes delivered */ - full_msg_desc->n_bytes_delivered += bytes_in_this_frag; - /* decrement the number of fragments */ - full_msg_desc->n_active--; - /* here we need to start the next fragment */ - ML_VERBOSE(10, ("Launch frags for %p", coll_op)); - if (full_msg_desc->n_bytes_scheduled < full_msg_desc->n_bytes_total) { - ret = coll_op->fragment_data.message_descriptor->fragment_launcher(coll_op); - if (OPAL_UNLIKELY(OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret)) { - out_of_resource = true; - } else if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Failed to launch fragment")); - return ret; - } - } - } - - if (ready_to_release) { - /* Check if we have to recycle memory. - * Note: It is safe to recycle ML buffers since the ML buffer data - * already was unpacked to user buffer - */ - if (NULL != coll_op->fragment_data.buffer_desc) { - ret = mca_coll_ml_buffer_recycling(coll_op); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return ret; - } - } - /* if this is not fragment 0, return fragment to the free list. - * fragment 0 will be returned in mca_ml_request_free() which - * is called from the MPI wait() and test() routines. - * We can recover the pointer to the fragement descriptor from - * the MPI level request object, wich is the first element - * in the fragment descriptor. - */ - /* I contend that this is a bug. This is not the right way to check - * for the first fragment as it assumes that the first fragment would always - * for any collective have zero as the first offset or that other subsequent - * fragments would not. It is not safe to assume this. The correct check is - * the following one - */ - - ML_VERBOSE(10, ("Master ? %p %d", coll_op, coll_op->fragment_data.offset_into_user_buffer)); - /* This check is in fact a bug. Not the correct definiton of first - * fragment. First fragment is the only fragment that satisfies the - * following criteria - */ - /*if (0 != coll_op->fragment_data.offset_into_user_buffer && - !out_of_resource) { - */ - if (((&coll_op->full_message != coll_op->fragment_data.message_descriptor) && - !out_of_resource) || IS_COLL_SYNCMEM(coll_op)) { - /* non-zero offset ==> this is not fragment 0 */ - CHECK_AND_RECYCLE(coll_op); - } - } - - /* return */ - return OMPI_SUCCESS; -} - -/* task completion */ -static inline __opal_attribute_always_inline__ int coll_ml_task_dependency_processing( - mca_coll_ml_task_status_t *task) -{ - /* update dependencies */ - mca_coll_ml_collective_operation_progress_t *my_schedule_instance = - task->ml_coll_operation; - int n_dependent_tasks = task->rt_num_dependent_tasks; - int dep_task; - - for (dep_task = 0; dep_task < n_dependent_tasks; dep_task++) - { - int task_index; - task_index = task->rt_dependent_task_indices[dep_task]; - my_schedule_instance->dag_description.status_array[task_index].n_dep_satisfied++; - } - - /* return */ - return OMPI_SUCCESS; -} - -/* collective task completion processing - - * "task" may be removed from list in this routine. - * Thread safety is assumed to be handled outside this routine. - */ -static inline __opal_attribute_always_inline__ int mca_coll_ml_task_completion_processing( - mca_coll_ml_task_status_t **task_status_g, opal_list_t *list) -{ - /* local variables */ - int ret = OMPI_SUCCESS; - mca_coll_ml_task_status_t *task_status = *task_status_g; - - mca_coll_ml_collective_operation_progress_t *coll_op = - task_status->ml_coll_operation; - - /* Pasha: Since all our collectives so far use the root - flag, I replacing the call for custom call back function - with setting root_flag. - If we will see that we need some custom functionality, - we will enable it later. - */ - - task_status->ml_coll_operation->variable_fn_params.root_flag = true; - -#if 0 - /* process task completion function, - if any was defined */ - if (OPAL_LIKELY(NULL != task_status->task_comp_fn)) { - ret = task_status->task_comp_fn(task_status); - if (ret != OMPI_SUCCESS) { - return ret; - } - } -#endif - - /* update dependencies */ - ret = coll_ml_task_dependency_processing(task_status); - if (ret != OMPI_SUCCESS) { - ML_VERBOSE(3,("Failed to coll_ml_task_dependency_processing")); - return ret; - } - - /* process task completion function, - if any was defined */ - if (OPAL_LIKELY(NULL != task_status->task_comp_fn)) { - ret = task_status->task_comp_fn(task_status); - if (ret != OMPI_SUCCESS) { - ML_VERBOSE(3,("Failed to task_comp_fn")); - return ret; - } - } - - /* remove the descriptor from the incomplete list - (Pasha: if the list was provided) */ - /* No need to put this an any new list - it is associcated - * with the mca_coll_ml_collective_operation_progress_t - * descriptor already - */ - - if (NULL != list) { - (*task_status_g) = (mca_coll_ml_task_status_t *) - opal_list_remove_item(list, (opal_list_item_t *)(task_status)); - } - - /* update completion counter */ - coll_op->dag_description.num_tasks_completed++; - - if(coll_op->dag_description.num_tasks_completed == - coll_op->coll_schedule->n_fns) - { - /* the actual fragment descriptor is not on any list, as - * we can get at it from the task descriptors - */ - ret = coll_ml_fragment_completion_processing(coll_op); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(3,("Failed to coll_ml_fragment_completion_processing")); - return ret; - } - } - - /* return */ - return ret; -} - -static inline __opal_attribute_always_inline__ int mca_coll_ml_generic_collectives_append_to_queue( - mca_coll_ml_collective_operation_progress_t *op_prog, - mca_coll_ml_task_setup_fn_t task_setup) -{ - int fn_index; - mca_coll_ml_collective_operation_description_t *op_desc = - op_prog->coll_schedule; - mca_coll_ml_compound_functions_t *func = NULL; - mca_coll_ml_task_status_t *task_status = NULL; - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - - ML_VERBOSE(9, ("Calling mca_coll_ml_generic_collectives_launcher")); - - /* Init all tasks, before we start them */ - for (fn_index = 0; fn_index < op_desc->n_fns; fn_index++) { - func = &op_desc->component_functions[fn_index]; - task_status = &op_prog->dag_description.status_array[fn_index]; - - ML_VERBOSE(9, ("Processing function index %d", fn_index)); - - assert(NULL != func); - - /* Init task status */ - task_status->n_dep_satisfied = 0; /* start from zero */ - task_status->bcol_fn = func->bcol_function; - /* setup run time parametres */ - /* Pasha: do we need the if proctection ? */ - if (OPAL_LIKELY(NULL != task_setup)) { - task_setup(task_status, fn_index, func); - } - - /* the pointer to operation progress supposed to be set during - construction time. Just want to make sure that it is ok */ - assert(task_status->ml_coll_operation == op_prog); - - /* We assume that all pointer to functions are defined and it - is not reson to check for null */ - assert(NULL != func->bcol_function->coll_fn); - - /* In order to preserve ordering on all ranks we have to add it to tail */ - /* TBD: Need to review the way we launch fragments */ - ML_VERBOSE(9, ("The task %p dependency is %d, appending it on pending list", - (void *)task_status, func->num_dependencies)); - OPAL_THREAD_LOCK(&(mca_coll_ml_component.pending_tasks_mutex)); - opal_list_append(&cm->pending_tasks, (opal_list_item_t *)task_status); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.pending_tasks_mutex)); - } - - ML_VERBOSE(9, ("Collective was launched !")); - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ int mca_coll_ml_generic_collectives_launcher( - mca_coll_ml_collective_operation_progress_t *op_prog, - mca_coll_ml_task_setup_fn_t task_setup) -{ - int fn_index; - int rc, ret; - mca_coll_ml_collective_operation_description_t *op_desc = - op_prog->coll_schedule; - mca_coll_ml_compound_functions_t *func = NULL; - mca_coll_ml_task_status_t *task_status = NULL; - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - - ML_VERBOSE(9, ("Calling mca_coll_ml_generic_collectives_launcher")); - - /* Init all tasks, before we start them */ - for (fn_index = 0; fn_index < op_desc->n_fns; fn_index++) { - func = &op_desc->component_functions[fn_index]; - task_status = &op_prog->dag_description.status_array[fn_index]; - - ML_VERBOSE(9, ("Processing function index %d", fn_index)); - - assert(NULL != func); - - /* Init task status */ - task_status->n_dep_satisfied = 0; /* start from zero */ - /* task_status->my_index_in_coll_schedule = fn_index; - pasha: the value is set during init */ - task_status->bcol_fn = func->bcol_function; - /* Pasha: disabling support for custom complition functions - task_status->task_comp_fn = func->task_comp_fn; - */ - - /* setup run time parametres */ - /* Pasha: do we need the if proctection ? */ - if (OPAL_LIKELY(NULL != task_setup)) { - task_setup(task_status, fn_index, func); - } - - /* the pointer to operation progress supposed to be set during - construction time. Just want to make sure that it is ok */ - assert(task_status->ml_coll_operation == op_prog); - /* Task status is done */ - - /* launch the task and put it on corresponding list (if required) */ - - /* We assume that all pointer to functions are defined and it - is not reason to check for null */ - assert(NULL != func->bcol_function->coll_fn); - } - - /* try to start startable */ - for (fn_index = 0; fn_index < op_desc->n_fns; fn_index++) { - func = &op_desc->component_functions[fn_index]; - task_status = &op_prog->dag_description.status_array[fn_index]; - /* fire the collective immediately if it has no dependencies */ - if (0 == task_status->rt_num_dependencies) { - rc = func->bcol_function->coll_fn(&op_prog->variable_fn_params, - /* Pasha: Need to update the prototype of the func, - right now it is ugly hack for compilation */ - (struct mca_bcol_base_function_t *)&func->constant_group_data); - switch(rc) { - case BCOL_FN_NOT_STARTED: - /* put it on pending list */ - ML_VERBOSE(9, ("Call to bcol collecitive return BCOL_FN_NOT_STARTED, putting the task on pending list")); - OPAL_THREAD_LOCK(&(mca_coll_ml_component.pending_tasks_mutex)); - opal_list_append(&cm->pending_tasks, (opal_list_item_t *)task_status); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.pending_tasks_mutex)); - break; - case BCOL_FN_STARTED: - /* put it on started list */ - ML_VERBOSE(9, ("Call to bcol collecitive return BCOL_FN_STARTED, puting the task on active list")); - OPAL_THREAD_LOCK(&(mca_coll_ml_component.active_tasks_mutex)); - opal_list_append(&cm->active_tasks, (opal_list_item_t *)task_status); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.active_tasks_mutex)); - break; - case BCOL_FN_COMPLETE: - /* the task is done ! lets start relevant dependencies */ - ML_VERBOSE(9, ("Call to bcol collecitive return BCOL_FN_COMPLETE")); - /* the task does not belong to any list, yes. So passing NULL */ - ret = mca_coll_ml_task_completion_processing(&task_status, NULL); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(9, ("Failed to mca_coll_ml_task_completion_processing")); - return ret; - } - break; - default: - ML_ERROR(("Unknow exit status %d", rc)); - return OMPI_ERROR; - } - } else { - /* the task is depend on other, lets put it on pending list */ - ML_VERBOSE(9, ("The task %p dependency is %d, putting it on pending list", - (void *)task_status, func->num_dependencies)); - OPAL_THREAD_LOCK(&(mca_coll_ml_component.pending_tasks_mutex)); - opal_list_append(&cm->pending_tasks, (opal_list_item_t *)task_status); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.pending_tasks_mutex)); - } - } - ML_VERBOSE(9, ("Collective was launched !")); - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ mca_coll_ml_collective_operation_progress_t * -mca_coll_ml_alloc_op_prog_single_frag_dag( - mca_coll_ml_module_t *ml_module, - mca_coll_ml_collective_operation_description_t *coll_schedule, - void *src, void *dst, size_t total_bytes, - size_t offset_into_user_buffer - ) -{ - opal_free_list_item_t *item; - mca_coll_ml_collective_operation_progress_t *coll_op = NULL; - ompi_request_t *req; - - /* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */ - item = opal_free_list_wait (&(ml_module->coll_ml_collective_descriptors)); - - coll_op = (mca_coll_ml_collective_operation_progress_t *) item; - ML_VERBOSE(10, (">>> Allocating coll op %p", coll_op)); - assert(NULL != coll_op); - assert(coll_op->dag_description.status_array[0].item.opal_list_item_refcount == 0); - req = &(coll_op->full_message.super); - - OMPI_REQUEST_INIT(req, false); - /* Mark the request ACTIVE. It is critical for MPI_Test()*/ - req->req_state = OMPI_REQUEST_ACTIVE; - req->req_status._cancelled = 0; - req->req_status.MPI_ERROR = OMPI_SUCCESS; - - MCA_COLL_ML_OP_BASIC_SETUP(coll_op, total_bytes, - offset_into_user_buffer, src, dst, coll_schedule); - - /* We do not set sequential, since it is not sequential call */ - coll_op->dag_description.num_tasks_completed = 0; - - /* Release reference counter have to be zero */ - assert(0 == coll_op->pending); - - return coll_op; -} - -static inline __opal_attribute_always_inline__ mca_coll_ml_collective_operation_progress_t * -mca_coll_ml_duplicate_op_prog_single_frag_dag( - mca_coll_ml_module_t *ml_module, - mca_coll_ml_collective_operation_progress_t *old_op) -{ - mca_coll_ml_collective_operation_progress_t *new_op = NULL; - - new_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_bcast_functions[old_op->fragment_data.current_coll_op], - old_op->fragment_data.message_descriptor->dest_user_addr, - old_op->fragment_data.message_descriptor->src_user_addr, - old_op->fragment_data.message_descriptor->n_bytes_total, - old_op->fragment_data.message_descriptor->n_bytes_scheduled); - - new_op->fragment_data.current_coll_op = old_op->fragment_data.current_coll_op; - new_op->fragment_data.message_descriptor = old_op->fragment_data.message_descriptor; - - return new_op; -} - -static inline __opal_attribute_always_inline__ mca_coll_ml_collective_operation_progress_t * - mca_coll_ml_alloc_op_prog_single_frag_seq( - mca_coll_ml_module_t *ml_module, - mca_coll_ml_collective_operation_description_t *coll_schedule, - void *src, void *dst, - size_t total_bytes, - size_t offset_into_user_buffer - ) -{ - opal_free_list_item_t *item; - mca_coll_ml_collective_operation_progress_t *coll_op = NULL; - - /* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */ - item = opal_free_list_wait (&(ml_module->coll_ml_collective_descriptors)); - - coll_op = (mca_coll_ml_collective_operation_progress_t *) item; - - assert(NULL != coll_op); - - MCA_COLL_ML_OP_BASIC_SETUP(coll_op, total_bytes, - offset_into_user_buffer, src, dst, coll_schedule); - - /* set sequential data */ - /* pasha - do we have something to set ? */ - - return coll_op; -} - -static inline __opal_attribute_always_inline__ - void mca_coll_ml_convertor_get_send_frag_size(mca_coll_ml_module_t *ml_module, - size_t *frag_size, struct full_message_t *message_descriptor) -{ - size_t fragment_size = *frag_size; - opal_convertor_t *dummy_convertor = &message_descriptor->dummy_convertor; - - /* The last frag needs special service */ - if (fragment_size > - (size_t) message_descriptor->send_converter_bytes_packed) { - *frag_size = message_descriptor->send_converter_bytes_packed; - message_descriptor->send_converter_bytes_packed = 0; - - return; - } - if( (message_descriptor->dummy_conv_position + fragment_size) > - message_descriptor->n_bytes_total ) { - message_descriptor->dummy_conv_position = (message_descriptor->dummy_conv_position + fragment_size) - - message_descriptor->n_bytes_total; - } else { - message_descriptor->dummy_conv_position += fragment_size; - } - - opal_convertor_generic_simple_position(dummy_convertor, &message_descriptor->dummy_conv_position); - *frag_size -= dummy_convertor->partial_length; - - message_descriptor->send_converter_bytes_packed -= (*frag_size); -} - -static inline __opal_attribute_always_inline__ int -mca_coll_ml_launch_sequential_collective (mca_coll_ml_collective_operation_progress_t *coll_op) -{ - mca_bcol_base_coll_fn_desc_t *bcol_func; - int ifunc, n_fn, ih, ret; - mca_coll_ml_collective_operation_description_t *sched = - coll_op->coll_schedule; - - n_fn = sched->n_fns; - ih = coll_op->sequential_routine.current_active_bcol_fn; - - /* if collectives are already pending just add this one to the list */ - if (opal_list_get_size (&mca_coll_ml_component.sequential_collectives)) { - opal_list_append(&mca_coll_ml_component.sequential_collectives, (opal_list_item_t *) coll_op); - - return OMPI_SUCCESS; - } - - for (ifunc = ih; ifunc < n_fn; ifunc++, coll_op->sequential_routine.current_active_bcol_fn++) { - ret = coll_op->sequential_routine.seq_task_setup(coll_op); - if (OMPI_SUCCESS != ret) { - return ret; - } - - bcol_func = (sched->component_functions[ifunc].bcol_function); - ret = bcol_func->coll_fn(&coll_op->variable_fn_params, - (struct mca_bcol_base_function_t *) &sched->component_functions[ifunc].constant_group_data); - - if (BCOL_FN_COMPLETE == ret) { - if (ifunc == n_fn - 1) { - ret = coll_ml_fragment_completion_processing(coll_op); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - mca_coll_ml_abort_ml("Failed to run coll_ml_fragment_completion_processing"); - } - - return OMPI_SUCCESS; - } - } else { - if (BCOL_FN_STARTED == ret) { - coll_op->sequential_routine.current_bcol_status = SEQ_TASK_IN_PROG; - } else { - coll_op->sequential_routine.current_bcol_status = SEQ_TASK_PENDING; - } - - ML_VERBOSE(10, ("Adding pending bcol to the progress list to access by ml_progress func-id %d", ifunc)); - opal_list_append(&mca_coll_ml_component.sequential_collectives, (opal_list_item_t *) coll_op); - - break; - } - } - - return OMPI_SUCCESS; -} - -END_C_DECLS - -#endif diff --git a/ompi/mca/coll/ml/coll_ml_lex.h b/ompi/mca/coll/ml/coll_ml_lex.h deleted file mode 100644 index d09fe45bf99..00000000000 --- a/ompi/mca/coll/ml/coll_ml_lex.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef COLL_ML_LEX_H_ -#define COLL_ML_LEX_H_ - -#include "opal_config.h" -#include - -BEGIN_C_DECLS - -int coll_ml_config_yylex(void); -int coll_ml_config_init_buffer(FILE *file); -int coll_ml_config_yylex_destroy(void); - -extern FILE *coll_ml_config_yyin; -extern bool coll_ml_config_parse_done; -extern char *coll_ml_config_yytext; -extern int coll_ml_config_yynewlines; - -/* - * Make lex-generated files not issue compiler warnings - */ -#define YY_STACK_USED 0 -#define YY_ALWAYS_INTERACTIVE 0 -#define YY_NEVER_INTERACTIVE 0 -#define YY_MAIN 0 -#define YY_NO_UNPUT 1 -#define YY_SKIP_YYWRAP 1 - -enum { - COLL_ML_CONFIG_PARSE_DONE, - COLL_ML_CONFIG_PARSE_ERROR, - COLL_ML_CONFIG_PARSE_NEWLINE, - COLL_ML_CONFIG_PARSE_SECTION, - COLL_ML_CONFIG_PARSE_COLLECTIVE, - COLL_ML_CONFIG_PARSE_EQUAL, - COLL_ML_CONFIG_PARSE_SINGLE_WORD, - COLL_ML_CONFIG_PARSE_VALUE, - COLL_ML_CONFIG_PARSE_MAX -}; -END_C_DECLS -#endif diff --git a/ompi/mca/coll/ml/coll_ml_lex.l b/ompi/mca/coll/ml/coll_ml_lex.l deleted file mode 100644 index b97b04e0413..00000000000 --- a/ompi/mca/coll/ml/coll_ml_lex.l +++ /dev/null @@ -1,141 +0,0 @@ -%option nounput -%option noinput - -%{ /* -*- C -*- */ -#include "opal_config.h" - -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "coll_ml_lex.h" - -BEGIN_C_DECLS - -/* - * local functions - */ -static int coll_ml_config_yywrap(void); - -END_C_DECLS - -/* - * global variables - */ -int coll_ml_config_yynewlines = 1; -bool coll_ml_config_parse_done = false; -char *coll_ml_config_string = NULL; - -%} - -WHITE [\f\t\v ] -CHAR [A-Za-z0-9_\-\.] -NAME_CHAR [A-Za-z0-9_\-\.\\\/] - -%x comment -%x section_name -%x collective_name -%x section_end -%x collective_end -%x value - -%% - -{WHITE}*\n { ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } -#.*\n { ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } -"//".*\n { ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } - -"/*" { BEGIN(comment); - return COLL_ML_CONFIG_PARSE_NEWLINE; } -[^*\n]* ; /* Eat up non '*'s */ -"*"+[^*/\n]* ; /* Eat '*'s not followed by a '/' */ -\n { ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } -"*"+"/" { BEGIN(INITIAL); /* Done with block comment */ - return COLL_ML_CONFIG_PARSE_NEWLINE; } - -{WHITE}*\[{WHITE}* { BEGIN(collective_name); } -({NAME_CHAR}|{WHITE})*{NAME_CHAR}/{WHITE}*\] { - BEGIN(collective_end); - return COLL_ML_CONFIG_PARSE_COLLECTIVE; } -\n { ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_ERROR; } -. { return COLL_ML_CONFIG_PARSE_ERROR; } -{WHITE}*\]{WHITE}*\n { - BEGIN(INITIAL); - ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } - -{WHITE}*\<{WHITE}* { BEGIN(section_name); } -({NAME_CHAR}|{WHITE})*{NAME_CHAR}/{WHITE}*\> { - BEGIN(section_end); - return COLL_ML_CONFIG_PARSE_SECTION; } -\n { ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_ERROR; } -. { return COLL_ML_CONFIG_PARSE_ERROR; } -{WHITE}*\>{WHITE}*\n { - BEGIN(INITIAL); - ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } - -{WHITE}*"="{WHITE}* { BEGIN(value); - return COLL_ML_CONFIG_PARSE_EQUAL; } -{WHITE}+ ; /* whitespace */ -{CHAR}+ { return COLL_ML_CONFIG_PARSE_SINGLE_WORD; } - -{WHITE}*\n { BEGIN(INITIAL); - ++coll_ml_config_yynewlines; - return COLL_ML_CONFIG_PARSE_NEWLINE; } -[^\n]*[^\t \n]/[\t ]* { - return COLL_ML_CONFIG_PARSE_VALUE; } - -. { return COLL_ML_CONFIG_PARSE_ERROR; } -%% - -/* Old flex (2.5.4a? and older) does not define a destroy function */ -#if !defined(YY_FLEX_SUBMINOR_VERSION) -#define YY_FLEX_SUBMINOR_VERSION 0 -#endif - -#if (YY_FLEX_MAJOR_VERSION < 2) || (YY_FLEX_MAJOR_VERSION == 2 && (YY_FLEX_MINOR_VERSION < 5 || (YY_FLEX_MINOR_VERSION == 5 && YY_FLEX_SUBMINOR_VERSION < 5))) -int coll_ml_config_yylex_destroy(void) -{ - if (NULL != YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER); -#if defined(YY_CURRENT_BUFFER_LVALUE) - YY_CURRENT_BUFFER_LVALUE = NULL; -#else - YY_CURRENT_BUFFER = NULL; -#endif /* YY_CURRENT_BUFFER_LVALUE */ - } - return YY_NULL; -} -#endif - -static int coll_ml_config_yywrap(void) -{ - coll_ml_config_parse_done = true; - return 1; -} - - -/* - * Ensure that we have a valid yybuffer to use. Specifically, if this - * scanner is invoked a second time, finish_parsing() (above) will - * have been executed, and the current buffer will have been freed. - * Flex doesn't recognize this fact because as far as it's concerned, - * its internal state was already initialized, so it thinks it should - * have a valid buffer. Hence, here we ensure to give it a valid - * buffer. - */ -int coll_ml_config_init_buffer(FILE *file) -{ - YY_BUFFER_STATE buf = yy_create_buffer(file, YY_BUF_SIZE); - yy_switch_to_buffer(buf); - - return 0; -} diff --git a/ompi/mca/coll/ml/coll_ml_lmngr.c b/ompi/mca/coll/ml/coll_ml_lmngr.c deleted file mode 100644 index 1ff72027a7d..00000000000 --- a/ompi/mca/coll/ml/coll_ml_lmngr.c +++ /dev/null @@ -1,330 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "opal/class/opal_list.h" -#include "opal/threads/mutex.h" -#include "coll_ml.h" -#include "coll_ml_inlines.h" -#include "coll_ml_mca.h" -#include "coll_ml_lmngr.h" -#ifndef HAVE_POSIX_MEMALIGN -#include "opal/align.h" -#include "opal_stdint.h" -#endif -#include "opal/util/sys_limits.h" - -/* Constructor for list memory manager */ -static void construct_lmngr(mca_coll_ml_lmngr_t *lmngr) -{ - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - - ML_VERBOSE(7, ("Constructing new list manager %p", (void *)lmngr)); - - /* No real memory is allocated, only basic init. - The real memory will be allocated on demand, on first block allocation */ - - /* I caching this block size, alignment and list size - since maybe in future we will want to define different parameters - for lists */ - lmngr->list_block_size = cm->lmngr_block_size; - lmngr->list_alignment = cm->lmngr_alignment; - lmngr->list_size = cm->lmngr_size; - lmngr->n_resources = 0; - lmngr->base_addr = NULL; /* If the base addr is not null, the struct was initilized - and memory was allocated */ - /* Not sure that lock is required */ - OBJ_CONSTRUCT(&lmngr->mem_lock, opal_mutex_t); - - /* Only construct the list, no memry initialisation */ - OBJ_CONSTRUCT(&lmngr->blocks_list, opal_list_t); -} - -static void destruct_lmngr(mca_coll_ml_lmngr_t *lmngr) -{ - int max_nc = lmngr->n_resources; - int rc, i; - bcol_base_network_context_t *nc; - opal_list_item_t *item; - - ML_VERBOSE(6, ("Destructing list manager %p", (void *)lmngr)); - - while (NULL != (item = opal_list_remove_first(&lmngr->blocks_list))) { - OBJ_RELEASE(item); - } - - OBJ_DESTRUCT(&lmngr->blocks_list); - - if (NULL != lmngr->alloc_base) { - for( i = 0; i < max_nc; i++ ) { - nc = lmngr->net_context[i]; - rc = nc->deregister_memory_fn(nc->context_data, - lmngr->reg_desc[nc->context_id]); - if(rc != OMPI_SUCCESS) { - ML_ERROR(("Failed to unregister , lmngr %p", (void *)lmngr)); - } - } - - ML_VERBOSE(10, ("Release base addr %p", lmngr->alloc_base)); - - free(lmngr->alloc_base); - lmngr->alloc_base = NULL; - lmngr->base_addr = NULL; - } - - lmngr->list_block_size = 0; - lmngr->list_alignment = 0; - lmngr->list_size = 0; - lmngr->n_resources = 0; - - OBJ_DESTRUCT(&lmngr->mem_lock); -} - -OBJ_CLASS_INSTANCE(mca_coll_ml_lmngr_t, - opal_object_t, - construct_lmngr, - destruct_lmngr); - -int mca_coll_ml_lmngr_tune(mca_coll_ml_lmngr_t *lmngr, - size_t block_size, size_t list_size, size_t alignment) -{ - ML_VERBOSE(7, ("Tunning list manager")); - - if (OPAL_UNLIKELY(NULL == lmngr->base_addr)) { - ML_VERBOSE(7, ("The list manager is already initialized, you can not tune it")); - return OMPI_ERROR; - } - - lmngr->list_block_size = block_size; - lmngr->list_alignment = alignment; - lmngr->list_size = list_size; - - return OMPI_SUCCESS; -} - -int mca_coll_ml_lmngr_reg(void) -{ - int tmp, ret = OMPI_SUCCESS; - - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - -#define CHECK(expr) do {\ - tmp = (expr); \ - if (0 > tmp) ret = tmp; \ - } while (0) - - ML_VERBOSE(7, ("Setting parameters for list manager")); - - cm->lmngr_size = 8; - CHECK(mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - "memory_manager_list_size", "Memory manager list size", - MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &cm->lmngr_size)); - - /* The size list couldn't be less than possible max of ML modules, - it = max supported communicators by ML */ - if (cm->lmngr_size < cm->max_comm) { - cm->lmngr_size = cm->max_comm; - } - - mca_coll_ml_component.lmngr_block_size = cm->payload_buffer_size * - cm->n_payload_buffs_per_bank * - cm->n_payload_mem_banks * - cm->lmngr_size; - - CHECK(mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - "memory_manager_block_size", "Memory manager block size", - MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_ml_component.lmngr_block_size)); - - cm->lmngr_alignment = opal_getpagesize(); - CHECK(mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - "memory_manager_alignment", "Memory manager alignment", - MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_ml_component.lmngr_block_size)); - - return ret; -} - -static int lmngr_register(mca_coll_ml_lmngr_t *lmngr, bcol_base_network_context_t *nc) -{ - int rc, j; - int max_nc = lmngr->n_resources; - - rc = nc->register_memory_fn(nc->context_data, - lmngr->base_addr, - lmngr->list_size * lmngr->list_block_size, - &lmngr->reg_desc[nc->context_id]); - - if(rc != OMPI_SUCCESS) { - int ret_val; - ML_VERBOSE(7, ("Failed to register [%d], unrolling the registration", rc)); - /* deregistser the successful registrations */ - for( j = 0; j < max_nc; j++ ) { - /* set the registration parameter to point to the current - * resource description */ - nc = lmngr->net_context[j]; - ret_val = nc->deregister_memory_fn(nc->context_data, - lmngr->reg_desc[nc->context_id]); - if(ret_val != OMPI_SUCCESS) { - return ret_val; - } - } - - return rc; - } - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_lmngr_init(mca_coll_ml_lmngr_t *lmngr) -{ - int i, num_blocks; - int rc; - unsigned char *addr; - bcol_base_network_context_t *nc; - - ML_VERBOSE(7, ("List initialization")); - -#ifdef HAVE_POSIX_MEMALIGN - if((errno = posix_memalign(&lmngr->base_addr, - lmngr->list_alignment, - lmngr->list_size * lmngr->list_block_size)) != 0) { - ML_ERROR(("Failed to allocate memory: %d [%s]", errno, strerror(errno))); - return OMPI_ERROR; - } - lmngr->alloc_base = lmngr->base_addr; -#else - lmngr->alloc_base = - malloc(lmngr->list_size * lmngr->list_block_size + lmngr->list_alignment); - if(NULL == lmngr->alloc_base) { - ML_ERROR(("Failed to allocate memory: %d [%s]", errno, strerror(errno))); - return OMPI_ERROR; - } - - lmngr->base_addr = (void*)OPAL_ALIGN((uintptr_t)lmngr->alloc_base, - lmngr->list_alignment, uintptr_t); -#endif - - assert(lmngr->n_resources < MCA_COLL_ML_MAX_REG_INFO); - - for(i= 0 ;i < lmngr->n_resources ;i++) { - nc = lmngr->net_context[i]; - ML_VERBOSE(7, ("Call registration for resource index %d", i)); - rc = lmngr_register(lmngr, nc); - if (OMPI_SUCCESS != rc) { - ML_ERROR(("Failed to lmngr register: %d [%s]", errno, strerror(errno))); - return rc; - } - } - - /* slice the memory to blocks */ - addr = (unsigned char *) lmngr->base_addr; - for(num_blocks = 0; num_blocks < (int)lmngr->list_size; num_blocks++) { - mca_bcol_base_lmngr_block_t *item = OBJ_NEW(mca_bcol_base_lmngr_block_t); - item->base_addr = (void *)addr; - item->lmngr = lmngr; - /* ML_VERBOSE(10, ("Appending block # %d %p", num_blocks, (void *)addr)); */ - opal_list_append(&lmngr->blocks_list, (opal_list_item_t *)item); - /* advance the address */ - addr += lmngr->list_block_size; - } - - ML_VERBOSE(7, ("List initialization done %d", - opal_list_get_size(&lmngr->blocks_list))); - return OMPI_SUCCESS; -} - -mca_bcol_base_lmngr_block_t* mca_coll_ml_lmngr_alloc ( - mca_coll_ml_lmngr_t *lmngr) -{ - int rc; - opal_list_t *list = &lmngr->blocks_list; - - /* Check if the list manager was initialized */ - if(OPAL_UNLIKELY(NULL == lmngr->base_addr)) { - ML_VERBOSE(7 ,("Starting memory initialization")); - rc = mca_coll_ml_lmngr_init(lmngr); - if (OMPI_SUCCESS != rc) { - ML_ERROR(("Failed to init memory")); - return NULL; - } - } - - if(OPAL_UNLIKELY(opal_list_is_empty(list))) { - /* Upper layer need to handle the NULL */ - ML_VERBOSE(1, ("List manager is empty.")); - return NULL; - } - - return (mca_bcol_base_lmngr_block_t *)opal_list_remove_first(list); -} - -void mca_coll_ml_lmngr_free(mca_bcol_base_lmngr_block_t *block) -{ - opal_list_append(&block->lmngr->blocks_list, (opal_list_item_t *)block); -} - -int mca_coll_ml_lmngr_append_nc(mca_coll_ml_lmngr_t *lmngr, bcol_base_network_context_t *nc) -{ - int i, rc; - - ML_VERBOSE(7, ("Append new network context %p to list manager %p", - nc, lmngr)); - - if (NULL == nc) { - return OMPI_ERROR; - } - - /* check if we already have the context on the list. - if we do have - do not do anything, just return success - */ - if (OPAL_UNLIKELY(MCA_COLL_ML_MAX_REG_INFO == lmngr->n_resources)) { - ML_ERROR(("MPI overflows maximum supported network contexts is %d", MCA_COLL_ML_MAX_REG_INFO)); - return OMPI_ERROR; - } - - for (i = 0; i < lmngr->n_resources; i++) { - if (lmngr->net_context[i] == nc) { - ML_VERBOSE(7, ("It is not new ")); - return OMPI_SUCCESS; - } - } - - ML_VERBOSE(7, ("Adding new context")); - - /* Setting context id */ - nc->context_id = lmngr->n_resources; - lmngr->net_context[lmngr->n_resources] = nc; - - lmngr->n_resources++; - - /* Register the memory with new context */ - if (NULL != lmngr->base_addr) { - rc = lmngr_register(lmngr, nc); - if (OMPI_SUCCESS == rc) { - return rc; - } - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_lmngr.h b/ompi/mca/coll/ml/coll_ml_lmngr.h deleted file mode 100644 index 9547128663a..00000000000 --- a/ompi/mca/coll/ml/coll_ml_lmngr.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_ML_LMNGR_H -#define MCA_ML_LMNGR_H - -#include "ompi_config.h" -#include "opal/class/opal_list.h" -#include "ompi/mca/bcol/bcol.h" - -#define MCA_COLL_ML_MAX_REG_INFO 32 - -/* LMNGR - List manager for registred memory */ -struct mca_coll_ml_lmngr_t { - opal_object_t super; - /* lock to control list access */ - opal_mutex_t mem_lock; - - /* list of memory chunks */ - opal_list_t blocks_list; - - /* base (allocated) address of the memory pool */ - void* base_addr; - void *alloc_base; - - /* size of memory chunks */ - size_t list_block_size; - - /* memory chunk alignment */ - size_t list_alignment; - - /* init list size */ - size_t list_size; - - /* number network context of resources - In other words, number of different registration - functions that will be used. For example in case - of iboffload for each device (PD) we will have - different entry - */ - int n_resources; - - /* registration descriptor */ - void * reg_desc[MCA_COLL_ML_MAX_REG_INFO]; - - /* bcol network context array */ - struct bcol_base_network_context_t * net_context[MCA_COLL_ML_MAX_REG_INFO]; -}; -typedef struct mca_coll_ml_lmngr_t mca_coll_ml_lmngr_t; -OBJ_CLASS_DECLARATION(mca_coll_ml_lmngr_t); - -/* read user defined parametres for list manager */ -int mca_coll_ml_lmngr_reg(void); -/* If programmer want to user other than default mca -parametres, he can use the tune function. The tune -function must be run before list initialization, -otherway error will be returned */ -int mca_coll_ml_lmngr_tune(mca_coll_ml_lmngr_t *lmngr, - size_t block_size, size_t list_size, size_t alignment); - -/* Append new network context to the existing list memory manager */ -int mca_coll_ml_lmngr_append_nc(mca_coll_ml_lmngr_t *lmngr, bcol_base_network_context_t *nc); - -/* Allocate a block from memory list manager */ -mca_bcol_base_lmngr_block_t* mca_coll_ml_lmngr_alloc ( - mca_coll_ml_lmngr_t *lmngr); - -/* Return block to list memory manager */ -void mca_coll_ml_lmngr_free (mca_bcol_base_lmngr_block_t *block); - -#endif diff --git a/ompi/mca/coll/ml/coll_ml_mca.c b/ompi/mca/coll/ml/coll_ml_mca.c deleted file mode 100644 index 46be88c3705..00000000000 --- a/ompi/mca/coll/ml/coll_ml_mca.c +++ /dev/null @@ -1,300 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "coll_ml.h" -#include "coll_ml_inlines.h" -#include "coll_ml_mca.h" -#include "coll_ml_lmngr.h" -#include "ompi/patterns/net/netpatterns.h" -#include "opal/mca/installdirs/installdirs.h" - -/* - * Local flags - */ -enum { - REGINT_NEG_ONE_OK = 0x01, - REGINT_GE_ZERO = 0x02, - REGINT_GE_ONE = 0x04, - REGINT_NONZERO = 0x08, - REGINT_MAX = 0x88 -}; - -enum { - REGSTR_EMPTY_OK = 0x01, - REGSTR_MAX = 0x88 -}; - -/* - * Enumerators - */ -mca_base_var_enum_value_t fragmentation_enable_enum[] = { - {0, "disable"}, - {1, "enable"}, - {2, "auto"}, - {-1, NULL} -}; - -mca_base_var_enum_value_t bcast_algorithms[] = { - {COLL_ML_STATIC_BCAST, "static"}, - {COLL_ML_SEQ_BCAST, "sequential"}, - {COLL_ML_UNKNOWN_BCAST, "unknown-root"}, - {-1, NULL} -}; - -/* - * utility routine for string parameter registration - */ -static int reg_string(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - const char* default_value, char **storage, - int flags) -{ - int index; - - *storage = (char *) default_value; - index = mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_STRING, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "coll", "ml", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGSTR_EMPTY_OK) && (NULL == *storage || 0 == strlen(*storage))) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -/* - * utility routine for integer parameter registration - */ -static int reg_int(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - int default_value, int *storage, int flags) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_INT, - NULL, 0, 0,OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "coll", "ml", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGINT_NEG_ONE_OK) && -1 == *storage) { - return OMPI_SUCCESS; - } - - if ((0 != (flags & REGINT_GE_ZERO) && *storage < 0) || - (0 != (flags & REGINT_GE_ONE) && *storage < 1) || - (0 != (flags & REGINT_NONZERO) && 0 == *storage)) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -static int reg_bool(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - bool default_value, bool *storage) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_BOOL, - NULL, 0, 0,OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "coll", "ml", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - return OMPI_SUCCESS; -} - -static int reg_ullint(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - unsigned long long default_value, unsigned long long *storage, int flags) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_coll_ml_component.super.collm_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_UNSIGNED_LONG_LONG, - NULL, 0, 0,OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "coll", "ml", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if ((0 != (flags & REGINT_GE_ONE) && *storage < 1) || - (0 != (flags & REGINT_NONZERO) && 0 == *storage)) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_verify_params(void) -{ - int dummy; - - /* Make sure that the the number of memory banks is a power of 2 */ - mca_coll_ml_component.n_payload_mem_banks = - roundup_to_power_radix(2, mca_coll_ml_component.n_payload_mem_banks, - &dummy); - - /* Make sure that the the number of buffers is a power of 2 */ - mca_coll_ml_component.n_payload_buffs_per_bank = - roundup_to_power_radix(2, mca_coll_ml_component.n_payload_buffs_per_bank, - &dummy); - - return OMPI_SUCCESS; -} - -int mca_coll_ml_register_params(void) -{ - mca_base_var_enum_t *new_enum; - int ret, tmp; - char *str = NULL; - - ret = OMPI_SUCCESS; -#define CHECK(expr) do { \ - tmp = (expr); \ - if (OMPI_SUCCESS != tmp) ret = tmp; \ - } while (0) - - /* register openib component parameters */ - - CHECK(reg_int("priority", NULL, "ML component priority" - "(from 0(low) to 90 (high))", 27, &mca_coll_ml_component.ml_priority, 0)); - - CHECK(reg_int("verbose", NULL, "Output some verbose ML information " - "(0 = no output, nonzero = output)", 0, &mca_coll_ml_component.verbose, 0)); - - CHECK(reg_int("max_comm", NULL, "Maximum number of communicators that can use coll/ml", 24, - (int *) &mca_coll_ml_component.max_comm, 0)); - - CHECK(reg_int("min_comm_size", NULL, "Minimum size of communicator to use coll/ml", 0, - &mca_coll_ml_component.min_comm_size, 0)); - - CHECK(reg_int("n_payload_mem_banks", NULL, "Number of payload memory banks", 2, - &mca_coll_ml_component.n_payload_mem_banks, 0)); - - CHECK(reg_int("n_payload_buffs_per_bank", NULL, "Number of payload buffers per bank", 16, - &mca_coll_ml_component.n_payload_buffs_per_bank, 0)); - - /* RLG: need to handle alignment and size */ - CHECK(reg_ullint("payload_buffer_size", NULL, "Size of payload buffers", 4*1024, - &mca_coll_ml_component.payload_buffer_size, 0)); - - /* get the pipeline depth, default is 2 */ - CHECK(reg_int("pipeline_depth", NULL, "Size of fragmentation pipeline", 2, - &mca_coll_ml_component.pipeline_depth, 0)); - - CHECK(reg_int("free_list_init_size", NULL, "Initial size of free lists in coll/ml", 128, - &mca_coll_ml_component.free_list_init_size, 0)); - - CHECK(reg_int("free_list_grow_size", NULL, "Initial size of free lists in coll/ml", 64, - &mca_coll_ml_component.free_list_grow_size, 0)); - - CHECK(reg_int("free_list_max_size", NULL, "Initial size of free lists in coll/ml", -1, - &mca_coll_ml_component.free_list_max_size, 0)); - - mca_coll_ml_component.use_knomial_allreduce = 1; - - tmp = mca_base_var_enum_create ("coll_ml_bcast_algorithm", bcast_algorithms, &new_enum); - if (OPAL_SUCCESS != tmp) { - return tmp; - } - - mca_coll_ml_component.bcast_algorithm = COLL_ML_STATIC_BCAST; - tmp = mca_base_component_var_register (&mca_coll_ml_component.super.collm_version, "bcast_algorithm", - "Algorithm to use for broadcast", MCA_BASE_VAR_TYPE_INT, - new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_ml_component.bcast_algorithm); - OBJ_RELEASE(new_enum); - if (0 > tmp) { - ret = tmp; - } - - CHECK(reg_bool("disable_allgather", NULL, "Disable Allgather", false, - &mca_coll_ml_component.disable_allgather)); - - CHECK(reg_bool("disable_reduce", NULL, "Disable Reduce", false, - &mca_coll_ml_component.disable_reduce)); - - tmp = mca_base_var_enum_create ("coll_ml_enable_fragmentation_enum", fragmentation_enable_enum, &new_enum); - if (OPAL_SUCCESS != tmp) { - return tmp; - } - - /* default to auto-enable fragmentation */ - mca_coll_ml_component.enable_fragmentation = 2; - tmp = mca_base_component_var_register (&mca_coll_ml_component.super.collm_version, "enable_fragmentation", - "Disable/Enable fragmentation for large messages", MCA_BASE_VAR_TYPE_INT, - new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_ml_component.enable_fragmentation); - if (0 > tmp) { - ret = tmp; - } - OBJ_RELEASE(new_enum); - - asprintf(&str, "%s/mca-coll-ml.config", - opal_install_dirs.opaldatadir); - if (NULL == str) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - CHECK(reg_string("config_file", NULL, - "ML collectives configuration file", - str, &mca_coll_ml_component.config_file_name, - 0)); - free(str); - - /* Reading parameters for list manager */ - CHECK(mca_coll_ml_lmngr_reg()); - - /* Verify the parameters */ - CHECK(mca_coll_ml_verify_params()); - - return ret; -} diff --git a/ompi/mca/coll/ml/coll_ml_mca.h b/ompi/mca/coll/ml/coll_ml_mca.h deleted file mode 100644 index 7730bd284dd..00000000000 --- a/ompi/mca/coll/ml/coll_ml_mca.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - /** @file */ - -#ifndef MCA_COLL_ML_MCA_H -#define MCA_COLL_ML_MCA_H - -#include -#include "ompi_config.h" - -int mca_coll_ml_register_params(void); - -#endif diff --git a/ompi/mca/coll/ml/coll_ml_memsync.c b/ompi/mca/coll/ml/coll_ml_memsync.c deleted file mode 100644 index 560fb137b25..00000000000 --- a/ompi/mca/coll/ml/coll_ml_memsync.c +++ /dev/null @@ -1,175 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "opal/threads/mutex.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/coll/coll.h" -#include "opal/sys/atomic.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#include "ompi/mca/coll/ml/coll_ml_allocation.h" - -static int mca_coll_ml_memsync_recycle_memory(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t *)coll_op->coll_module; - mca_bcol_base_memory_block_desc_t *ml_memblock = ml_module->payload_block; - mca_coll_ml_collective_operation_progress_t *pending_op = NULL; - int bank = coll_op->full_message.bank_index_to_recycle; - int rc; - bool have_resources = true; - - assert(bank >= 0 || - bank < (int)ml_memblock->num_banks || - ML_MEMSYNC == coll_op->fragment_data.current_coll_op); - - ML_VERBOSE(10,("MEMSYNC: bank %d was recycled coll_op %p", bank, coll_op)); - - /* set the bank as free */ - - ml_memblock->bank_is_busy[bank] = false; - ml_memblock->bank_release_counters[bank] = 0; - - /* Check if we have any requests that are waiting for memory */ - while(opal_list_get_size(&ml_module->waiting_for_memory_list) && have_resources) { - pending_op = (mca_coll_ml_collective_operation_progress_t *) - opal_list_get_first(&ml_module->waiting_for_memory_list); - - ML_VERBOSE(10, ("Trying to start pending %p", pending_op)); - assert(pending_op->pending & REQ_OUT_OF_MEMORY); - rc = pending_op->fragment_data.message_descriptor->fragment_launcher(pending_op); - switch (rc) { - case OMPI_SUCCESS: - ML_VERBOSE(10, ("Pending fragment was started %p", pending_op)); - pending_op->pending ^= REQ_OUT_OF_MEMORY; - opal_list_remove_item(&ml_module->waiting_for_memory_list, - (opal_list_item_t *)pending_op); - if (0 != pending_op->fragment_data.offset_into_user_buffer) { - /* non-zero offset ==> this is not fragment 0 */ - CHECK_AND_RECYCLE(pending_op); - } - break; - case OMPI_ERR_TEMP_OUT_OF_RESOURCE: - ML_VERBOSE(10, ("Already on the list %p", pending_op)); - have_resources = false; - break; - default: - ML_ERROR(("Error happened %d", rc)); - return rc; - } - } - - ML_VERBOSE(10, ("Memsync done %p", coll_op)); - return OMPI_SUCCESS; -} - -static void mca_coll_ml_barrier_task_setup( - mca_coll_ml_task_status_t *task_status, - int index, mca_coll_ml_compound_functions_t *func) -{ - task_status->rt_num_dependencies = func->num_dependencies; - task_status->rt_num_dependent_tasks = func->num_dependent_tasks; - task_status->rt_dependent_task_indices = func->dependent_task_indices; -} - -static inline __opal_attribute_always_inline__ int mca_coll_ml_memsync_launch(mca_coll_ml_module_t *ml_module, - ompi_request_t **req, int bank_index) -{ - mca_coll_ml_collective_operation_progress_t *coll_op; - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_memsync_function, - NULL, NULL, 0, 0); - - assert(NULL != coll_op); - - ML_VERBOSE(10, ("Get coll request %p", coll_op)); - - coll_op->fragment_data.buffer_desc = NULL; - - /* Caching bank index for future memory recycling callback */ - coll_op->full_message.bank_index_to_recycle = bank_index; - - coll_op->fragment_data.current_coll_op = ML_MEMSYNC; - /* I don't want to define one more parameter, so under root - * we pass buffer index */ - coll_op->variable_fn_params.root = bank_index; - /* As well it's little bit ugly, since it is no wait for this request, - * in order to recycle it we have to set offset to some value > 1 */ - coll_op->fragment_data.offset_into_user_buffer = 1; - coll_op->variable_fn_params.buffer_index = MCA_COLL_ML_NO_BUFFER; - coll_op->variable_fn_params.sequence_num = -1; /* It should be safe to use -1 */ - /* Pointer to a coll finalize function */ - if (OPAL_LIKELY(ml_module->initialized)) { - coll_op->process_fn = mca_coll_ml_memsync_recycle_memory; - } else { - /* No post work on first call */ - coll_op->process_fn = NULL; - } - - ML_VERBOSE(10,("Memsync start %p", &coll_op)); - - return mca_coll_ml_generic_collectives_append_to_queue(coll_op, mca_coll_ml_barrier_task_setup); -} - -/** - * Non blocking memory syncronization - */ -int mca_coll_ml_memsync_intra(mca_coll_ml_module_t *ml_module, int bank_index) -{ - int rc; - ompi_request_t *req; - - ML_VERBOSE(8, ("MEMSYNC start")); - - if (OPAL_UNLIKELY(0 == opal_list_get_size(&ml_module->active_bcols_list))) { - /* Josh's change: In the case where only p2p is active, we have no way - * to reset the bank release counters to zero, I am doing that here since it - * would actually be "correct" to do it outside of this conditional, however - * I suspect that reseting the value to zero elsewhere would result in corrupted - * flow for non-contiguous data types - */ - - /* nasty hack to ensure that resources are released in the single level - * ptp case. - */ - mca_coll_ml_collective_operation_progress_t dummy_coll; - - dummy_coll.coll_module = (mca_coll_base_module_t *) ml_module; - dummy_coll.fragment_data.current_coll_op = ML_MEMSYNC; - dummy_coll.full_message.bank_index_to_recycle = bank_index; - - /* Handling special case when memory syncronization is not required */ - rc = mca_coll_ml_memsync_recycle_memory(&dummy_coll); - if(OPAL_UNLIKELY(rc != OMPI_SUCCESS)){ - ML_ERROR(("Failed to flush the list.")); - return rc; - } - } else { - /* retain the communicator until the operation is finished. the communicator - * will be released by CHECK_AND_RECYCLE */ - OBJ_RETAIN(ml_module->comm); - - rc = mca_coll_ml_memsync_launch(ml_module, &req, bank_index); - if (OPAL_UNLIKELY(rc != OMPI_SUCCESS)) { - ML_ERROR(("Failed to launch a barrier.")); - return rc; - } - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_module.c b/ompi/mca/coll/ml/coll_ml_module.c deleted file mode 100644 index c671cc044e3..00000000000 --- a/ompi/mca/coll/ml/coll_ml_module.c +++ /dev/null @@ -1,3128 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - * - * Most of the description of the data layout is in the - * coll_ml_module.c file. - */ - -#include "ompi_config.h" - -#include -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/coll/base/base.h" -#include "ompi/mca/sbgp/base/base.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/patterns/comm/coll_ops.h" -#include "ompi/mca/coll/ml/coll_ml.h" - -#include "opal/util/argv.h" -#include "opal/datatype/opal_datatype.h" -#include "opal/util/output.h" -#include "opal/util/arch.h" -#include "opal/align.h" - -#include "coll_ml.h" -#include "coll_ml_inlines.h" -#include "coll_ml_select.h" -#include "coll_ml_custom_utils.h" -#include "coll_ml_allocation.h" - -static int coll_ml_parse_topology (sub_group_params_t *sub_group_meta_data, size_t sub_group_count, - int *list_of_ranks_in_all_subgroups, int level_one_size); - -/* #define NEW_LEADER_SELECTION */ - -struct ranks_proxy_t { - /* number of subgroups for which the rank is a proxy */ - int number_subgroups; - /* subgrou indecies */ - int *subgroup_index; -}; -typedef struct rank_proxy_t rank_proxy_t; - -#define PROVIDE_SUFFICIENT_MEMORY(ptr, dummy_ptr, ptr_size, unit_type, in_use, \ - n_to_add,n_to_grow) \ - do { \ - if ((in_use) + (n_to_add) > (ptr_size)) { \ - (dummy_ptr) = (unit_type *) \ - realloc(ptr, sizeof(unit_type) * ((ptr_size) + (n_to_grow))); \ - if (NULL != (dummy_ptr)) { \ - (ptr) = (dummy_ptr); \ - (ptr_size) += (n_to_grow); \ - } \ - } \ - } while (0) - -/* - * Local functions - */ - -static int ml_module_enable(mca_coll_base_module_t *module, - struct ompi_communicator_t *comm); - -static int mca_coll_ml_fill_in_route_tab(mca_coll_ml_topology_t *topo, - ompi_communicator_t *comm); - -static void -mca_coll_ml_module_construct(mca_coll_ml_module_t *module) -{ - int index_topo, coll_i, st_i; - mca_coll_ml_topology_t *topo; - - memset ((char *) module + sizeof (module->super), 0, sizeof (*module) - sizeof (module->super)); - - /* It's critical to reset data_offset to zero */ - module->data_offset = -1; - - /* If the topology support zero level and no fragmentation was requested */ - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &module->topo_list[index_topo]; - topo->global_lowest_hier_group_index = -1; - topo->global_highest_hier_group_index = -1; - topo->number_of_all_subgroups = -1; - topo->n_levels = -1; - topo->all_bcols_mode = ~(0); /* set to all bits */ - topo->status = COLL_ML_TOPO_DISABLED; /* all topologies are not used by default */ - } - - for (coll_i = 0; coll_i < ML_NUM_OF_FUNCTIONS; coll_i++) { - for (st_i = 0; st_i < MCA_COLL_MAX_NUM_SUBTYPES; st_i++) { - module->collectives_topology_map[coll_i][st_i] = ML_UNDEFINED; - } - } - - for (coll_i = 0; coll_i < BCOL_NUM_OF_FUNCTIONS; ++coll_i) { - module->small_message_thresholds[coll_i] = BCOL_THRESHOLD_UNLIMITED; - } - - OBJ_CONSTRUCT(&module->active_bcols_list, opal_list_t); - OBJ_CONSTRUCT(&module->waiting_for_memory_list, opal_list_t); - OBJ_CONSTRUCT(&module->fragment_descriptors, opal_free_list_t); - OBJ_CONSTRUCT(&module->message_descriptors, opal_free_list_t); - OBJ_CONSTRUCT(&module->coll_ml_collective_descriptors, opal_free_list_t); - - memset (&module->fallback, 0, sizeof (module->fallback)); -} - -#define ML_RELEASE_FALLBACK(_coll_ml, _coll) \ - do { \ - if (_coll_ml->fallback.coll_ ## _coll ## _module) { \ - OBJ_RELEASE(_coll_ml->fallback.coll_ ## _coll ## _module); \ - _coll_ml->fallback.coll_ ## _coll ## _module = NULL; \ - } \ - } while (0); - -static void -mca_coll_ml_module_destruct(mca_coll_ml_module_t *module) -{ - int i, j, k,fnc, index_topo; - mca_coll_ml_topology_t *topo; - - ML_VERBOSE(4, ("ML module destruct")); - - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &module->topo_list[index_topo]; - if (COLL_ML_TOPO_DISABLED == topo->status) { - /* skip the topology */ - continue; - } - - if (NULL != topo->component_pairs) { - for(i = 0; i < topo->n_levels; ++i) { - for(j = 0; j < topo->component_pairs[i].num_bcol_modules; ++j) { - OBJ_RELEASE(topo->component_pairs[i].bcol_modules[j]); - } - /* free the array of bcol module */ - free(topo->component_pairs[i].bcol_modules); - - OBJ_RELEASE(topo->component_pairs[i].subgroup_module); - } - - free(topo->component_pairs); - } - - /* gvm Leak FIX Free collective algorithms structure */ - for (fnc = 0; fnc < BCOL_NUM_OF_FUNCTIONS; fnc++) { - if (NULL != topo->hierarchical_algorithms[fnc]){ - free(topo->hierarchical_algorithms[fnc]); - } - } - - /* free up the route vector memory */ - if (NULL != topo->route_vector) { - free(topo->route_vector); - } - /* free resrouce description */ - if(NULL != topo->array_of_all_subgroups) { - for( k=0 ; k < topo->number_of_all_subgroups ; k++ ) { - if(0 < topo->array_of_all_subgroups[k].n_ranks) { - free(topo->array_of_all_subgroups[k].rank_data); - topo->array_of_all_subgroups[k].rank_data = NULL; - } - } - free(topo->array_of_all_subgroups); - topo->array_of_all_subgroups = NULL; - } - if (NULL != topo->hier_layout_info) { - free(topo->hier_layout_info); - topo->hier_layout_info = NULL; - } - } - - OPAL_LIST_DESTRUCT(&(module->active_bcols_list)); - OBJ_DESTRUCT(&(module->waiting_for_memory_list)); - - /* gvm Leak FIX Remove fragment free list */ - OBJ_DESTRUCT(&(module->fragment_descriptors)); - OBJ_DESTRUCT(&(module->message_descriptors)); - /* push mca_bcol_base_memory_block_desc_t back on list manager */ - mca_coll_ml_free_block(module->payload_block); - /* release the cinvertor if it was allocated */ - if (NULL != module->reference_convertor) { - OBJ_RELEASE(module->reference_convertor); - } - - OBJ_DESTRUCT(&(module->coll_ml_collective_descriptors)); - - if (NULL != module->coll_ml_barrier_function) { - if (NULL != module->coll_ml_barrier_function->component_functions) { - free(module->coll_ml_barrier_function->component_functions); - module->coll_ml_barrier_function->component_functions = NULL; - } - free(module->coll_ml_barrier_function); - module->coll_ml_barrier_function = NULL; - } - - if (module->coll_ml_memsync_function) { - if (module->coll_ml_memsync_function->component_functions) { - free(module->coll_ml_memsync_function->component_functions); - module->coll_ml_memsync_function->component_functions = NULL; - } - free(module->coll_ml_memsync_function); - module->coll_ml_memsync_function = NULL; - } - - ml_coll_hier_allreduce_cleanup_new(module); - ml_coll_hier_allgather_cleanup(module); - ml_coll_hier_bcast_cleanup(module); - ml_coll_hier_reduce_cleanup(module); - - /* release saved collectives */ - ML_RELEASE_FALLBACK(module, allreduce); - ML_RELEASE_FALLBACK(module, allgather); - ML_RELEASE_FALLBACK(module, reduce); - ML_RELEASE_FALLBACK(module, bcast); - ML_RELEASE_FALLBACK(module, iallreduce); - ML_RELEASE_FALLBACK(module, iallgather); - ML_RELEASE_FALLBACK(module, ireduce); - ML_RELEASE_FALLBACK(module, ibcast); -} - - -static int mca_coll_ml_request_free(ompi_request_t** request) -{ - /* local variables */ - mca_coll_ml_collective_operation_progress_t *ml_request= - (mca_coll_ml_collective_operation_progress_t *)(*request); - mca_coll_ml_module_t *ml_module = OP_ML_MODULE(ml_request); - - /* The ML memory bank recycling check done, no we may - * return request and signal completion */ - - /* this fragement does not hold the message data, so ok to return */ - assert(0 == ml_request->pending); - //assert(0 == ml_request->fragment_data.offset_into_user_buffer); - assert(&ml_request->full_message == ml_request->fragment_data.message_descriptor); - assert(ml_request->dag_description.status_array[0].item.opal_list_item_refcount == 0); - ML_VERBOSE(10, ("Releasing Master %p", ml_request)); - /* Mark the request as invalid */ - OMPI_REQUEST_FINI(&ml_request->full_message.super); - opal_free_list_return (&(ml_module->coll_ml_collective_descriptors), - (opal_free_list_item_t *)ml_request); - - /* MPI needs to return with the request object set to MPI_REQUEST_NULL - */ - *request = MPI_REQUEST_NULL; - - return OMPI_SUCCESS; -} - -/* constructor for collective managment descriptor */ -static void mca_coll_ml_collective_operation_progress_construct -(mca_coll_ml_collective_operation_progress_t *desc) { - - /* initialize pointer */ - desc->dag_description.status_array = NULL; - - OBJ_CONSTRUCT(&desc->full_message.send_convertor, opal_convertor_t); - OBJ_CONSTRUCT(&desc->full_message.recv_convertor, opal_convertor_t); - - OBJ_CONSTRUCT(&desc->full_message.dummy_convertor, opal_convertor_t); - - /* intialize request free pointer */ - desc->full_message.super.req_free = mca_coll_ml_request_free; - - /* no cancel function */ - desc->full_message.super.req_cancel = NULL; - /* Collective request type */ - desc->full_message.super.req_type = OMPI_REQUEST_COLL; - /* RLG: Do we need to set req_mpi_object ? */ - - /* If not null , we have to release next fragment */ - desc->next_to_process_frag = NULL; - - /* pointer to previous fragment */ - desc->prev_frag = NULL; - - /* Pasha: moreinit */ - desc->pending = 0; -} - -/* destructor for collective managment descriptor */ -static void mca_coll_ml_collective_operation_progress_destruct -(mca_coll_ml_collective_operation_progress_t *desc) { - mca_coll_ml_module_t *ml_module = - (mca_coll_ml_module_t *) desc->coll_module; - - int i, max_dag_size = ml_module->max_dag_size; - - if (NULL != desc->dag_description.status_array) { - for (i = 0; i < max_dag_size; ++i) { - OBJ_DESTRUCT(&desc->dag_description.status_array[i].item); - } - - free(desc->dag_description.status_array); - desc->dag_description.status_array = NULL; - } - - OBJ_DESTRUCT(&desc->full_message.send_convertor); - OBJ_DESTRUCT(&desc->full_message.recv_convertor); - - OBJ_DESTRUCT(&desc->full_message.dummy_convertor); -} -/* initialize the full message descriptor - can pass in module specific - * initialization data - */ -static void init_ml_fragment_desc(opal_free_list_item_t *desc , void* ctx); -static void init_ml_message_desc(opal_free_list_item_t *desc , void* ctx) -{ - mca_coll_ml_module_t *module= (mca_coll_ml_module_t *) ctx; - mca_coll_ml_descriptor_t *msg_desc = (mca_coll_ml_descriptor_t *) desc; - - /* finish setting up the fragment descriptor */ - init_ml_fragment_desc((opal_free_list_item_t*)&(msg_desc->fragment),module); -} - -/* initialize the fragment descriptor - can pass in module specific - * initialization data - */ -static void init_ml_fragment_desc(opal_free_list_item_t *desc , void* ctx) -{ - mca_coll_ml_module_t *module= (mca_coll_ml_module_t *) ctx; - mca_coll_ml_fragment_t *frag_desc = (mca_coll_ml_fragment_t *) desc; - - /* allocated array of function arguments */ - /* RLG - we have a problem if we don't get the memory */ - /* malloc-debug does not like zero allocations */ - if (module->max_fn_calls > 0) { - frag_desc->fn_args = (bcol_function_args_t *) - malloc(sizeof(bcol_function_args_t) * module->max_fn_calls); - } - -} -static void mca_coll_ml_bcol_list_item_construct(mca_coll_ml_bcol_list_item_t *item) -{ - item->bcol_module = NULL; -} -OBJ_CLASS_INSTANCE(mca_coll_ml_bcol_list_item_t, - opal_list_item_t, - mca_coll_ml_bcol_list_item_construct, - NULL); - -static void generate_active_bcols_list(mca_coll_ml_module_t *ml_module) -{ - int i, j, index_topo; - mca_coll_ml_topology_t *topo; - bool bcol_was_found; - mca_coll_ml_bcol_list_item_t *bcol_item = NULL; - mca_bcol_base_module_t *bcol_module = NULL; - - ML_VERBOSE(10, ("Generating active bcol list ")); - - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &ml_module->topo_list[index_topo]; - if (COLL_ML_TOPO_DISABLED == topo->status) { - /* skip the topology */ - continue; - } - for( i = 0; i < topo->n_levels; i++) { - - for( j = 0; j < topo->component_pairs[i].num_bcol_modules; j++) { - bcol_module = topo->component_pairs[i].bcol_modules[j]; - - /* Check if the bcol provides synchronization function, if the - * function is not provided we skip this bcol, since it isn't used - * for memory synchronization (for instance - ptpcoll )*/ - if (NULL == GET_BCOL_SYNC_FN(bcol_module)) { - ML_VERBOSE(10,(" No sync function was provided by bcol %s", - bcol_module->bcol_component->bcol_version.mca_component_name)); - continue; - } - - bcol_was_found = false; - for(bcol_item = (mca_coll_ml_bcol_list_item_t *)opal_list_get_first(&ml_module->active_bcols_list); - !bcol_was_found && - bcol_item != (mca_coll_ml_bcol_list_item_t *)opal_list_get_end(&ml_module->active_bcols_list); - bcol_item = (mca_coll_ml_bcol_list_item_t *)opal_list_get_next((opal_list_item_t *)bcol_item)) { - if (bcol_module == bcol_item->bcol_module) { - bcol_was_found = true; - } - } - - /* append the item to the list if it was not found */ - if (!bcol_was_found) { - bcol_item = OBJ_NEW(mca_coll_ml_bcol_list_item_t); - bcol_item->bcol_module = bcol_module; - opal_list_append(&ml_module->active_bcols_list, (opal_list_item_t *)bcol_item); - } - - } - } - } -} - -static int calculate_buffer_header_size(mca_coll_ml_module_t *ml_module) -{ - mca_coll_ml_topology_t *topo; - mca_bcol_base_module_t *bcol_module; - - uint32_t offset = 0; - int i, j, *ranks_in_comm, kount = 0, - rc, data_offset = 0, index_topo, - comm_size = ompi_comm_size(ml_module->comm); - - ML_VERBOSE(10, ("Calculating offset for the ML")); - - /* probably a stupid thing to do, but we have to loop over twice */ - - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &ml_module->topo_list[index_topo]; - if (COLL_ML_TOPO_DISABLED == topo->status) { - /* skip the topology */ - continue; - } - - for (i = 0; i < topo->n_levels; i++) { - for (j = 0; j < topo->component_pairs[i].num_bcol_modules; j++) { - bcol_module = topo->component_pairs[i].bcol_modules[j]; - if (0 < bcol_module->header_size) { - /* bump the kounter */ - kount++; - /* find the largest header request */ - if (offset < bcol_module->header_size) { - offset = bcol_module->header_size; - } - } - - /* Set bcol mode bits */ - topo->all_bcols_mode &= bcol_module->supported_mode; - } - } - - offset = OPAL_ALIGN(offset, BCOL_HEAD_ALIGN, uint32_t); - /* select largest offset between multiple topologies */ - if (data_offset < (int) offset) { - data_offset = (int) offset; - } - } - - ranks_in_comm = (int *) malloc(comm_size * sizeof(int)); - if (OPAL_UNLIKELY(NULL == ranks_in_comm)) { - ML_ERROR(("Memory allocation failed.")); - return OMPI_ERROR; - } - - for (i = 0; i < comm_size; ++i) { - ranks_in_comm[i] = i; - } - - rc = comm_allreduce_pml(&data_offset, &data_offset, 1, - MPI_INT, ompi_comm_rank(ml_module->comm), - MPI_MAX, comm_size, - ranks_in_comm, ml_module->comm); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("comm_allreduce_pml failed.")); - return OMPI_ERROR; - } - - ml_module->data_offset = (uint32_t) data_offset; - free(ranks_in_comm); - - ML_VERBOSE(10, ("The offset is %d", ml_module->data_offset)); - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_register_bcols(mca_coll_ml_module_t *ml_module) -{ - /* local variables */ - int i, j, index_topo; - int ret = OMPI_SUCCESS; - mca_bcol_base_module_t *bcol_module; - mca_coll_ml_topology_t *topo; - - /* loop over all bcols and register the ml memory block which each */ - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &ml_module->topo_list[index_topo]; - if (COLL_ML_TOPO_DISABLED == topo->status) { - /* skip the topology */ - continue; - } - - for (i = 0; i < topo->n_levels; i++) { - for (j = 0; j < topo->component_pairs[i].num_bcol_modules; j++) { - bcol_module = topo->component_pairs[i].bcol_modules[j]; - if (NULL != bcol_module->bcol_memory_init) { - ret = bcol_module->bcol_memory_init(ml_module->payload_block, - ml_module->data_offset, - bcol_module, - (NULL != bcol_module->network_context) ? - bcol_module->network_context->context_data: NULL); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("Bcol registration failed on ml level!!")); - return ret; - } - } - } - } - } - - return OMPI_SUCCESS; -} - -static int ml_module_memory_initialization(mca_coll_ml_module_t *ml_module) -{ - int ret; - int nbanks, nbuffers, buf_size; - mca_coll_ml_component_t *cs = &mca_coll_ml_component; - - ml_module->payload_block = mca_coll_ml_allocate_block(cs,ml_module->payload_block); - - if (NULL == ml_module->payload_block) { - ML_VERBOSE(1, ("mca_coll_ml_allocate_block exited with error.")); - return OMPI_ERROR; - } - - /* get memory block parameters */ - nbanks = cs->n_payload_mem_banks; - nbuffers = cs->n_payload_buffs_per_bank; - buf_size = cs->payload_buffer_size; - - ML_VERBOSE(10, ("Call for initialize block.")); - - ret = mca_coll_ml_initialize_block(ml_module->payload_block, - nbuffers, nbanks, buf_size, ml_module->data_offset, - NULL); - if (OMPI_SUCCESS != ret) { - return ret; - } - - ML_VERBOSE(10, ("Call for register bcols.")); - - /* inititialize the memory with all of the bcols: - loop through the bcol modules and invoke the memory init */ - ret = mca_coll_ml_register_bcols(ml_module); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("mca_coll_ml_register_bcols returned an error.")); - /* goto CLEANUP; */ - return ret; - } - - return OMPI_SUCCESS; -} - -/* do some sanity checks */ -static int check_global_view_of_subgroups( int n_procs_selected, - int n_procs_in, int ll_p1, int* all_selected, - mca_sbgp_base_module_t *module ) -{ - /* local variables */ - int ret=OMPI_SUCCESS; - int i, sum; - - bool local_leader_found=false; - - /* is there a single local-leader */ - for (i = 0; i < n_procs_selected; i++) { - if( ll_p1 == -all_selected[module->group_list[i]]) { - /* found the local leader */ - if( local_leader_found ) { - /* more than one local leader - don't know how to - * handle this, so bail - */ - ML_VERBOSE(1, ("More than a single leader for a group.")); - ret=OMPI_ERROR; - goto exit_ERROR; - } else { - local_leader_found=true; - } - } - } - - /* check to make sure that all agree on the same size of - * the group - */ - sum=0; - for (i = 0; i < n_procs_in; i++) { - if(ll_p1==all_selected[i]) { - sum++; - } else if( ll_p1 == -all_selected[i]) { - sum++; - } - } - if( sum != n_procs_selected ) { - ML_VERBOSE(1, ("number of procs in the group unexpected. Expected %d Got %d",n_procs_selected,sum)); - ret=OMPI_ERROR; - goto exit_ERROR; - } - /* check to make sure that all have the same list of ranks. - */ - for (i = 0; i < n_procs_selected; i++) { - if(ll_p1!=all_selected[module->group_list[i]] && - ll_p1!=-all_selected[module->group_list[i]] ) { - ret=OMPI_ERROR; - ML_VERBOSE(1, ("Mismatch in rank list - element #%d - %d ",i,all_selected[module->group_list[i]])); - goto exit_ERROR; - } - } - - /* return */ - return ret; - - exit_ERROR: - /* return */ - return ret; -} - -static int ml_init_k_nomial_trees(mca_coll_ml_topology_t *topo, int *list_of_ranks_in_all_subgroups, int my_rank_in_list) -{ - int *list_n_connected; - int group_size, rank, i, j, knt, offset, k, my_sbgp = 0; - int my_root, level_one_knt; - sub_group_params_t *array_of_all_subgroup_ranks = topo-> - array_of_all_subgroups; - int num_total_subgroups = topo->number_of_all_subgroups; - int n_hier = topo->n_levels; - - hierarchy_pairs *pair = NULL; - mca_coll_ml_leader_offset_info_t *loc_leader = (mca_coll_ml_leader_offset_info_t *) - malloc(sizeof(mca_coll_ml_leader_offset_info_t)*(n_hier+1)); - - if (NULL == loc_leader) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* first thing I want to know is where does the first level end */ - level_one_knt = 0; - - while (level_one_knt < num_total_subgroups && 0 == array_of_all_subgroup_ranks[level_one_knt].level_in_hierarchy) { - level_one_knt++; - } - - /* fprintf(stderr,"PPP %d %d %d ", level_one_knt, array_of_all_subgroup_ranks[0].level_in_hierarchy, num_total_subgroups); */ - - /* I want to cache this number for unpack*/ - array_of_all_subgroup_ranks->level_one_index = level_one_knt; - - /* determine whether or not ranks are contiguous */ - topo->ranks_contiguous = true; - for (i = 0, knt = 0 ; i < level_one_knt && topo->ranks_contiguous ; ++i) { - for (j = 0 ; j < array_of_all_subgroup_ranks[i].n_ranks ; ++j, ++knt) { - if (knt != list_of_ranks_in_all_subgroups[knt]) { - topo->ranks_contiguous = false; - break; - } - } - } - - loc_leader[0].offset = 0; - - /* now find my first level offset, and my index in level one */ - for (i = 0, loc_leader[0].level_one_index = -1 ; i < level_one_knt ; ++i) { - offset = array_of_all_subgroup_ranks[i].index_of_first_element; - for (k = 0 ; k < array_of_all_subgroup_ranks[i].n_ranks ; ++k) { - rank = list_of_ranks_in_all_subgroups[k + offset]; - if (rank == my_rank_in_list) { - loc_leader[0].offset = offset; - loc_leader[0].level_one_index = k; - i = level_one_knt; - break; - } - } - } - - /* every rank MUST appear at level 0 */ - assert (loc_leader[0].level_one_index > -1); - - for (i = 0 ; i < n_hier ; ++i) { - pair = &topo->component_pairs[i]; - /* find the size of the group */ - group_size = pair->subgroup_module->group_size; - /* malloc some memory for the new list to cache - on the bcol module - */ - list_n_connected = (int *) calloc(group_size, sizeof (int)); - if (NULL == list_n_connected) { - free (loc_leader); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* next thing to do is to find out which subgroup I'm in - * at this particular level - */ - for (j = 0, knt = 0, my_sbgp = -1 ; j < num_total_subgroups && 0 > my_sbgp ; ++j) { - offset = array_of_all_subgroup_ranks[j].index_of_first_element; - - /* in the 1-level case just skip any group of size 1 and move on - * to the real group. */ - if (1 == n_hier && 1 == array_of_all_subgroup_ranks[j].n_ranks) { - continue; - } - - for (k = 0; k < array_of_all_subgroup_ranks[j].n_ranks; k++) { - rank = list_of_ranks_in_all_subgroups[k+offset]; - /* we can not use the level_in_topology flag to determine the - * level since not all levels may be represented so keep a count - * of the number of times this ranks shows up. when it has been - * seen the correct number of times we are done. */ - if (rank == my_rank_in_list && ++knt == (i+1)){ - my_sbgp = j; - /* tag whether I am a local leader or not at this level */ - loc_leader[i].leader = (my_rank_in_list == array_of_all_subgroup_ranks[j].root_rank_in_comm); - break; - } - } - } - - /* should have found a subgroup */ - assert (my_sbgp > -1); - - for (j = 0 ; j < group_size ; ++j) { - list_n_connected[j] = array_of_all_subgroup_ranks[my_sbgp]. - rank_data[j].num_of_ranks_represented; - } - - /* now find all sbgps that the root of this sbgp belongs to - * previous to this "my_sbgp" */ - my_root = array_of_all_subgroup_ranks[my_sbgp].root_rank_in_comm; - - for (j = 0, knt = 0 ; j < my_sbgp ; ++j) { - if (array_of_all_subgroup_ranks[j].root_rank_in_comm == my_root) { - for (k = 1; k < array_of_all_subgroup_ranks[j].n_ranks; ++k) { - knt += array_of_all_subgroup_ranks[j].rank_data[k]. - num_of_ranks_represented; - } - - } - } - - /* and then I add one for the root itself */ - list_n_connected[0] = knt + 1; - - /* now cache this on the bcol module */ - pair->bcol_modules[0]->list_n_connected = list_n_connected; - - /* I should do one more round here and figure out my offset at this level - * the calculation is simple: Am I a local leader in this level? If so, then I keep the offset - * from the previous level. Else, I find out how "far away" the local leader is from me and set - * this as the new offset. - */ - /* do this after first level */ - if (i > 0) { - /* if I'm not the local leader */ - if( !loc_leader[i].leader) { - /* then I am not a local leader at this level */ - offset = array_of_all_subgroup_ranks[my_sbgp].index_of_first_element; - for (k = 0, knt = 0 ; k < array_of_all_subgroup_ranks[my_sbgp].n_ranks ; ++k) { - rank = list_of_ranks_in_all_subgroups[k+offset]; - if (rank == my_rank_in_list) { - break; - } - - knt += list_n_connected[k]; - } - loc_leader[i].offset = loc_leader[i-1].offset - knt; - } else { - /* if I am the local leader, then keep the same offset */ - loc_leader[i].offset = loc_leader[i-1].offset; - } - } - - pair->bcol_modules[0]->hier_scather_offset = loc_leader[i].offset; - - /*setup the tree */ - pair->bcol_modules[0]->k_nomial_tree(pair->bcol_modules[0]); - } - - /* see if I am in the last subgroup, if I am, - * then I am a root for the bcast operation - */ - offset = array_of_all_subgroup_ranks[n_hier - 1].index_of_first_element; - for( i = 0; i < array_of_all_subgroup_ranks[n_hier - 1].n_ranks; i++){ - rank = list_of_ranks_in_all_subgroups[i + offset]; - if( rank == my_rank_in_list ){ - loc_leader[n_hier - 1].offset = 0; - loc_leader[n_hier - 1].leader = true; - } - } - - /* set the last offset to 0 and set the leader according to your top level position */ - loc_leader[n_hier].offset = 0; - if(loc_leader[n_hier - 1].leader){ - loc_leader[n_hier].leader = true; - } else { - loc_leader[n_hier].leader = false; - } - - /* what other goodies do I want to cache on the ml-module? */ - topo->hier_layout_info = loc_leader; - - return OMPI_SUCCESS; -} - -static int ml_setup_full_tree_data(mca_coll_ml_topology_t *topo, - ompi_communicator_t *comm, - int my_highest_group_index, int *map_to_comm_ranks, - int *num_total_subgroups, sub_group_params_t **array_of_all_subgroup_ranks, - int **list_of_ranks_in_all_subgroups) -{ - - int ret = OMPI_SUCCESS; - int i, in_buf, root, my_rank,sum; - int in_num_total_subgroups = *num_total_subgroups; - int *scratch_space = NULL; - - /* figure out who holds all the sub-group information - only those - * ranks in the top level know this data at this point */ - my_rank = ompi_comm_rank(comm); - if( (my_highest_group_index == topo->global_highest_hier_group_index ) - && - ( my_rank == - topo->component_pairs[topo->n_levels-1].subgroup_module->group_list[0]) - ) { - in_buf=my_rank; - } else { - /* since this will be a sum allreduce - contributing 0 will not - * change the value */ - in_buf=0; - } - ret = comm_allreduce_pml(&in_buf, &root, 1, MPI_INT, - my_rank, MPI_SUM, - ompi_comm_size(comm), map_to_comm_ranks, - comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_allreduce_pml failed. root reduction")); - goto exit_ERROR; - } - - /* broadcast the number of groups */ - ret=comm_bcast_pml(num_total_subgroups, root, 1, - MPI_INT, my_rank, ompi_comm_size(comm), - map_to_comm_ranks,comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_bcast_pml failed. num_total_subgroups bcast")); - goto exit_ERROR; - } - - scratch_space=(int *)malloc(4*sizeof(int)*(*num_total_subgroups)); - if (OPAL_UNLIKELY(NULL == scratch_space)) { - ML_VERBOSE(10, ("Cannot allocate memory scratch_space.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - if( my_rank == root ) { - for(i=0 ; i < (*num_total_subgroups) ; i++ ) { - scratch_space[4*i]=(*array_of_all_subgroup_ranks)[i].root_rank_in_comm; - scratch_space[4*i+1]=(*array_of_all_subgroup_ranks)[i].n_ranks; - scratch_space[4*i+2]=(*array_of_all_subgroup_ranks)[i].index_of_first_element; - scratch_space[4*i+3]=(*array_of_all_subgroup_ranks)[i].level_in_hierarchy; - } - } - ret=comm_bcast_pml(scratch_space, root, 4*(*num_total_subgroups), - MPI_INT, my_rank, ompi_comm_size(comm), - map_to_comm_ranks, comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_allreduce_pml failed. scratch_space bcast")); - goto exit_ERROR; - } - if( my_rank != root ) { - if( in_num_total_subgroups != (*num_total_subgroups) ) { - /* free old array_of_all_subgroup_ranks array - need to fill it - * with the global data - assume that if the array size is the - * same, all data is correct, and in the same order */ - free((*array_of_all_subgroup_ranks)); - (*array_of_all_subgroup_ranks)=(sub_group_params_t *) - malloc(sizeof(sub_group_params_t)*(*num_total_subgroups)); - if (OPAL_UNLIKELY(NULL == (*array_of_all_subgroup_ranks))) { - ML_VERBOSE(10, ("Cannot allocate memory array_of_all_subgroup_ranks.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - for(i=0 ; i < (*num_total_subgroups) ; i++ ) { - (*array_of_all_subgroup_ranks)[i].root_rank_in_comm=scratch_space[4*i]; - (*array_of_all_subgroup_ranks)[i].n_ranks=scratch_space[4*i+1]; - (*array_of_all_subgroup_ranks)[i].index_of_first_element=scratch_space[4*i+2]; - (*array_of_all_subgroup_ranks)[i].level_in_hierarchy=scratch_space[4*i+3]; - } - } - } - /* figure out how many entries in all the subgroups - ranks that apear - * in k subgroups appear k times in the list */ - sum=0; - for(i=0 ; i < (*num_total_subgroups) ; i++ ) { - sum+=(*array_of_all_subgroup_ranks)[i].n_ranks; - } - if( in_num_total_subgroups != (*num_total_subgroups) && sum > 0 ) { - (*list_of_ranks_in_all_subgroups)=(int *) - realloc((*list_of_ranks_in_all_subgroups),sizeof(int)*sum); - if (OPAL_UNLIKELY(NULL == (*list_of_ranks_in_all_subgroups))) { - ML_VERBOSE(10, ("Cannot allocate memory *list_of_ranks_in_all_subgroups.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - } - ret = comm_bcast_pml(*list_of_ranks_in_all_subgroups, root, sum, - MPI_INT, my_rank, ompi_comm_size(comm), - map_to_comm_ranks, comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("Bcast failed for list_of_ranks_in_all_subgroups ")); - goto exit_ERROR; - } - - /* - * The data that is needed for a given rooted operation is: - * - subgroup,rank information for the source of the data. - * That is, which rank in the subgroup will recieve the - * data and distribute to the rest of the ranks. - * - the ranks that this data will be sent to. This is - * described by the ranks in the current subgroups, and - * the subroups for which each rank is a proxy for, - * recursively in the communication tree. - * - * The assumption is that data will be delived to each subgroup - * in an order, that is, all the data destined to subgroup rank 0 - * will appear 1st, then that for rank 1, etc. This implies that - * the data destined to rank 0, for example, will include the - * data for rank 0, as well as all the ranks that appear following - * it in the tree - in order. - * - * Proxies: A rank may be a proxy for more than a single subgroup. - * When a rank is proxy for more than a single subgroup, we - * maintain a fixed order of subgroups for which this is a - * proxy, with an assumption that the data for the first subgroup - * appears first in the list, then that for the second, etc. - * Since the data for the proxy (which is a member of this subgroup) - * appears only once in the data list, the assumption is that the - * proxy will be the root for this operation, and it is the first - * set of data in the data list. This means, that the data offset - * for the second ranks in each subgroup will include all the data - * for the previous subgroups, recursively. This lets us maintain - * the simple addressing scheme of contigous data per rank in - * the subcommunicator. - * - * The information needed for each rank in the subgroup are the - * group indices for which it is a proxy. - */ - /* - * fill in the vertecies in the hierarchichal communications graph - */ - - /* figure out how detailed connection information, so that we can - * can figure out how the data needs to be ordered for sending it - * though the tree in various collective algorithms that have per-rank - * data associated with them. - */ - - /* this function does a depth first traversal of the tree data and - * builds rank data and ensures that hierarchy level 0 is in the - * correct order for collective algorithms with per-rank data. - */ - coll_ml_parse_topology (*array_of_all_subgroup_ranks, *num_total_subgroups, - *list_of_ranks_in_all_subgroups, ompi_comm_size (comm)); - - /* The list of ranks in all subgroups is the same as the old sort list. This is the same - * order needed for both scatter and gather. */ - topo->sort_list = (*list_of_ranks_in_all_subgroups); - - /* return */ - exit_ERROR: - if (scratch_space) { - free(scratch_space); - } - - return ret; -} - -static int get_new_subgroup_data (int32_t *all_selected, int size_of_all_selected, - sub_group_params_t **sub_group_meta_data, - int *size_of_sub_group_meta_data, - int **list_of_ranks_in_all_subgroups, - int *size_of_list_of_ranks_in_all_subgroups, - int *num_ranks_in_list_of_ranks_in_all_subgroups, - int *num_total_subgroups, - int *map_to_comm_ranks, int level_in_hierarchy - ) { - - /* local data */ - int rc=OMPI_SUCCESS; - int rank_in_list,old_sg_size=(*num_total_subgroups); - int sg_index, array_id, offset, sg_id; - sub_group_params_t *dummy1 = NULL; - int32_t **dummy2 = NULL; - int32_t *dummy3 = NULL; - int32_t **temp = NULL; - int knt1 = 0, - knt2 = 0, - knt3 = 0; - - /* loop over all elements in the array of ranks selected, looking for - * newly selected ranks - these form the new subgroups */ - for(rank_in_list = 0 ; rank_in_list < size_of_all_selected ; rank_in_list++ ) { - int sg_root, current_rank_in_comm; - /* get root's rank in the communicator */ - sg_root=all_selected[rank_in_list]; - - if( 0 == sg_root ) { - /* this rank not selected - go to the next rank */ - continue; - } - - if( sg_root < 0 ) { - sg_root=-sg_root-1; - } else { - sg_root-=1; - } - - current_rank_in_comm=map_to_comm_ranks[rank_in_list]; - - /* loop over existing groups, and see if this is a member of a new group - * or if this group has already been found. - */ - for (sg_index = old_sg_size, sg_id = -1 ; sg_index < (*num_total_subgroups) ; sg_index++) { - if ((*sub_group_meta_data)[sg_index].root_rank_in_comm == sg_root) { - /* add rank to the list */ - (*sub_group_meta_data)[sg_index].n_ranks++; - sg_id = sg_index; - break; - } - } - - if (-1 == sg_id) { - /* did not find existing sub-group, create new one */ - /* intialize new subgroup */ - PROVIDE_SUFFICIENT_MEMORY((*sub_group_meta_data), dummy1, - (*size_of_sub_group_meta_data), - sub_group_params_t, (*num_total_subgroups), 1, 5); - if (OPAL_UNLIKELY(NULL == (*sub_group_meta_data))) { - ML_VERBOSE(10, ("Cannot allocate memory for sub_group_meta_data.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - /* do this for the temporary memory slots */ - PROVIDE_SUFFICIENT_MEMORY(temp, dummy2, - knt1, int32_t *, knt2, 1, 5); - if (OPAL_UNLIKELY(NULL == temp)) { - ML_VERBOSE(10, ("Cannot allocate memory for temporary storage")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - (*sub_group_meta_data)[(*num_total_subgroups)].root_rank_in_comm = sg_root; - (*sub_group_meta_data)[(*num_total_subgroups)].n_ranks = 1; - - /* no need for this here - use a temporary ptr */ - temp[knt2]= - (int *)calloc(size_of_all_selected, sizeof(int)); - if (OPAL_UNLIKELY(NULL == temp[knt2] ) ){ - ML_VERBOSE(10, ("Cannot allocate memory for sub_group_meta_data.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - sg_id = (*num_total_subgroups)++; - knt3 = ++knt2; - } else { - knt3 = sg_id - old_sg_size + 1; - } - - array_id = (*sub_group_meta_data)[sg_id].n_ranks-1; - temp[knt3-1][array_id] = current_rank_in_comm; - } - - /* linearize the data - one rank will ship this to all the other - * ranks the communicator - */ - /* make sure there is enough memory to hold the list */ - PROVIDE_SUFFICIENT_MEMORY((*list_of_ranks_in_all_subgroups),dummy3, - (*size_of_list_of_ranks_in_all_subgroups), - int, (*num_ranks_in_list_of_ranks_in_all_subgroups), - size_of_all_selected,size_of_all_selected); - if (OPAL_UNLIKELY(NULL == (*list_of_ranks_in_all_subgroups))) { - ML_VERBOSE(10, ("Cannot allocate memory for list_of_ranks_in_all_subgroups.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - /* loop over new subgroups */ - for( sg_id=old_sg_size ; sg_id < (*num_total_subgroups) ; sg_id++ ) { - offset=(*num_ranks_in_list_of_ranks_in_all_subgroups); - - (*sub_group_meta_data)[sg_id].index_of_first_element=offset; - - for( array_id=0 ; array_id < (*sub_group_meta_data)[sg_id].n_ranks ; - array_id++ ) { - (*list_of_ranks_in_all_subgroups)[offset+array_id]= - temp[sg_id-old_sg_size][array_id]; - } - (*num_ranks_in_list_of_ranks_in_all_subgroups)+= - (*sub_group_meta_data)[sg_id].n_ranks; - (*sub_group_meta_data)[sg_id].level_in_hierarchy=level_in_hierarchy; - /* this causes problems on XT5 starting at 6144 cores */ - free(temp[sg_id-old_sg_size]); - } - - /* clean up temporary storage */ - exit_ERROR: - if (NULL != temp) { - free(temp); - } - - /* return */ - return rc; -} - -static int topo_parse (sub_group_params_t *sub_group_meta_data, int index, int *dst, int *src, int *dst_offset) -{ - int src_offset = sub_group_meta_data[index].index_of_first_element; - int total_ranks_represented = 0, ranks_represented; - - if (0 == sub_group_meta_data[index].level_in_hierarchy) { - ML_VERBOSE(10, ("Copying data for index %d to %d. Ranks at this level: %d", index, *dst_offset, - sub_group_meta_data[index].n_ranks)); - - /* move level one subgroup data */ - memmove (dst + *dst_offset, src + src_offset, sizeof (int) * sub_group_meta_data[index].n_ranks); - - /* update the offset of this subgroup since it may have been moved */ - sub_group_meta_data[index].index_of_first_element = *dst_offset; - *dst_offset += sub_group_meta_data[index].n_ranks; - } - - ML_VERBOSE(10, ("Subgroup %d has %d ranks. level = %d", index, sub_group_meta_data[index].n_ranks, - sub_group_meta_data[index].level_in_hierarchy)); - - /* fill in subgroup ranks */ - sub_group_meta_data[index].rank_data=(rank_properties_t *) - malloc(sizeof(rank_properties_t) * sub_group_meta_data[index].n_ranks); - if (OPAL_UNLIKELY(NULL == sub_group_meta_data[index].rank_data)) { - ML_VERBOSE(10, ("Cannot allocate memory for rank_data ")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* recurse on all subgroups */ - for (int j = 0 ; j < sub_group_meta_data[index].n_ranks ; ++j) { - int rank = src[j + src_offset]; - int next_level; - - /* determine if this rank is the root of the subgroup */ - if (rank == sub_group_meta_data[index].root_rank_in_comm) { - sub_group_meta_data[index].root_index = j; - } - - sub_group_meta_data[index].rank_data[j].leaf = true; - sub_group_meta_data[index].rank_data[j].rank = rank; - - if (sub_group_meta_data[index].level_in_hierarchy) { - ML_VERBOSE(10, ("Looking for subgroup containing %d as root", rank)); - - for (next_level = index - 1 ; next_level >= 0 ; --next_level) { - if (rank == sub_group_meta_data[next_level].root_rank_in_comm) { - ML_VERBOSE(10, ("Subgroup %d has root %d", next_level, rank)); - break; - } - } - - /* all ranks are represented in the lowest level. this subgroup is not at the lowest level - * so it must be a root at a lower level */ - assert (next_level >= 0); - - /* not a leaf node */ - sub_group_meta_data[index].rank_data[j].leaf = false; - ranks_represented = topo_parse (sub_group_meta_data, next_level, dst, src, dst_offset); - if (0 > ranks_represented) { - return ranks_represented; - } - sub_group_meta_data[index].rank_data[j].num_of_ranks_represented = ranks_represented; - - total_ranks_represented += ranks_represented; - } else { - /* leaf node */ - sub_group_meta_data[index].rank_data[j].leaf = true; - sub_group_meta_data[index].rank_data[j].num_of_ranks_represented = 1; - - total_ranks_represented++; - } - - ML_VERBOSE(10, ("Group %d, level %d, index %d, rank %d represents %d ranks", index, - sub_group_meta_data[index].level_in_hierarchy, j, rank, - sub_group_meta_data[index].rank_data[j].num_of_ranks_represented)); - } - - return total_ranks_represented; -} - -/* put level one in leaf order */ -static int coll_ml_parse_topology (sub_group_params_t *sub_group_meta_data, size_t sub_group_count, - int *list_of_ranks_in_all_subgroups, int level_one_size) -{ - int *tmp_data; - int offset, rc; - - tmp_data = calloc (level_one_size, sizeof (int)); - if (NULL == tmp_data) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* do a DFS parse of the topology and ensure that level 1 is in the correct scatter/gather order */ - offset = 0; - rc = topo_parse (sub_group_meta_data, sub_group_count - 1, tmp_data, list_of_ranks_in_all_subgroups, &offset); - if (0 > rc) { - free (tmp_data); - return rc; - } - - /* all ranks in level one should be represented in the re-order buffer */ - assert (offset == level_one_size); - - /* copy re-ordered level 1 (0) */ - if (0 != offset) { - /* copy new level one data back into the list of all subgroups */ - memmove (list_of_ranks_in_all_subgroups, tmp_data, sizeof (int) * offset); - } - - free (tmp_data); - - return OMPI_SUCCESS; -} - -static int append_new_network_context(hierarchy_pairs *pair) -{ - int i; - int rc; - mca_coll_ml_lmngr_t *memory_manager = &mca_coll_ml_component.memory_manager; - bcol_base_network_context_t *nc = NULL; - - for (i = 0; i < pair->num_bcol_modules; i++) { - nc = pair->bcol_modules[i]->network_context; - if (NULL != nc) { - rc = mca_coll_ml_lmngr_append_nc(memory_manager, nc); - if (OMPI_SUCCESS != rc) { - return OMPI_ERROR; - } - /* caching the network context id on bcol */ - pair->bcol_modules[i]->context_index = nc->context_id; - } - } - - return OMPI_SUCCESS; -} - -static int ml_module_set_small_msg_thresholds(mca_coll_ml_module_t *ml_module) -{ - const mca_coll_ml_topology_t *topo_info; - mca_bcol_base_module_t *bcol_module; - hierarchy_pairs *pair; - - int i, j, rc, hier, *ranks_in_comm, n_hier, tp, - comm_size = ompi_comm_size(ml_module->comm); - - for (tp = 0; tp < COLL_ML_TOPO_MAX; ++tp) { - topo_info = &ml_module->topo_list[tp]; - if (COLL_ML_TOPO_DISABLED == topo_info->status) { - /* Skip the topology */ - continue; - } - - n_hier = topo_info->n_levels; - for (hier = 0; hier < n_hier; ++hier) { - pair = &topo_info->component_pairs[hier]; - - for (i = 0; i < pair->num_bcol_modules; ++i) { - bcol_module = pair->bcol_modules[i]; - - if (NULL != bcol_module->set_small_msg_thresholds) { - bcol_module->set_small_msg_thresholds(bcol_module); - } - - for (j = 0; j < BCOL_NUM_OF_FUNCTIONS; ++j) { - if (ml_module->small_message_thresholds[j] > - bcol_module->small_message_thresholds[j]) { - ml_module->small_message_thresholds[j] = - bcol_module->small_message_thresholds[j]; - } - } - } - - } - } - - ranks_in_comm = (int *) malloc(comm_size * sizeof(int)); - if (OPAL_UNLIKELY(NULL == ranks_in_comm)) { - ML_ERROR(("Memory allocation failed.")); - return OMPI_ERROR; - } - - for (i = 0; i < comm_size; ++i) { - ranks_in_comm[i] = i; - } - - rc = comm_allreduce_pml(ml_module->small_message_thresholds, - ml_module->small_message_thresholds, - BCOL_NUM_OF_FUNCTIONS, MPI_INT, - ompi_comm_rank(ml_module->comm), MPI_MIN, - comm_size, ranks_in_comm, ml_module->comm); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - ML_ERROR(("comm_allreduce_pml failed.")); - return OMPI_ERROR; - } - - free(ranks_in_comm); - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_read_allbcols_settings(mca_coll_ml_module_t *ml_module, - int n_hierarchies) -{ - int i, j, - ret = OMPI_SUCCESS; - int *ranks_map = NULL, - *bcols_in_use = NULL, - *bcols_in_use_all_ranks = NULL; - bool use_user_bufs, limit_size_user_bufs; - ssize_t length_ml_payload; - int64_t frag_size; - const mca_bcol_base_component_2_0_0_t *bcol_component = NULL; - mca_base_component_list_item_t *bcol_cli = NULL; - int bcol_index; - - /* If this assert fails, it means that you changed initialization - * order and the date offset , that is critical for this section of code, - * have not been initilized. - * DO NOT REMOVE THIS ASSERT !!! - */ - assert(ml_module->data_offset >= 0); - - /* need to figure out which bcol's are participating - * in the hierarchy across the communicator, so that we can set - * appropriate segmentation parameters. - */ - bcols_in_use = (int *) calloc(2 * n_hierarchies, sizeof(int)); - if (OPAL_UNLIKELY(NULL == bcols_in_use)) { - ML_VERBOSE(10, ("Cannot allocate memory for bcols_in_use.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - /* setup pointers to arrays that will hold bcol parameters. Since - * given bols are not instantiated in all processes, need to get this - * information from those ranks that have instantiated these - * parameters - */ - bcols_in_use_all_ranks = bcols_in_use+n_hierarchies; - - /* get list of bcols that I am using */ - for (j = 0; j < COLL_ML_TOPO_MAX; j++) { - mca_coll_ml_topology_t *topo_info = &ml_module->topo_list[j]; - if (COLL_ML_TOPO_DISABLED == topo_info->status) { - /* skip the topology */ - continue; - } - - for(i = 0; i < topo_info->n_levels; i++ ) { - int ind; - ind = topo_info->component_pairs[i].bcol_index; - bcols_in_use[ind] = 1; - } - } - - /* set one to one mapping */ - ranks_map = (int *) malloc(sizeof(int) * ompi_comm_size(ml_module->comm)); - if (NULL == ranks_map) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - for (i = 0; i < ompi_comm_size(ml_module->comm); i++) { - ranks_map[i] = i; - } - - /* reduce over all the ranks to figure out which bcols are - * participating at this level - */ - ret = comm_allreduce_pml(bcols_in_use, bcols_in_use_all_ranks, - n_hierarchies, MPI_INT, ompi_comm_rank(ml_module->comm), - MPI_MAX, ompi_comm_size(ml_module->comm), - ranks_map, ml_module->comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_allreduce_pml failed. bcols_in_use reduction")); - goto exit_ERROR; - } - - /* - * figure out fragmenation parameters - */ - - /* size of ml buffer */ - length_ml_payload = mca_coll_ml_component.payload_buffer_size - ml_module->data_offset; - - /* figure out if data will be segmented for pipelining - - * for non-contigous data will just use a fragment the size - * of the ml payload buffer */ - - /* check to see if any bcols impose a limit */ - limit_size_user_bufs = false; - use_user_bufs = true; - frag_size = length_ml_payload; - bcol_index = 0; - - OPAL_LIST_FOREACH(bcol_cli, &mca_bcol_base_components_in_use, mca_base_component_list_item_t) { - /* check to see if this bcol is being used */ - if (!bcols_in_use_all_ranks[bcol_index++]) { - /* not in use */ - continue; - } - - bcol_component = (mca_bcol_base_component_2_0_0_t *) bcol_cli->cli_component; - - /* check to see if user buffers can be used */ - if (!bcol_component->can_use_user_buffers) { - /* need to use library buffers, so all will do this */ - use_user_bufs = false; - } - - /* figure out fragement size */ - if (bcol_component->max_frag_size != FRAG_SIZE_NO_LIMIT ){ - /* user buffers need to be limited in size */ - limit_size_user_bufs = true; - - if (0 == frag_size) { - /* nothing set yet */ - frag_size = bcol_component->max_frag_size; - } else if (frag_size < bcol_component->max_frag_size) { - /* stricter constraint on fragment size */ - frag_size = bcol_component->max_frag_size; - } - } - } - - if (!use_user_bufs || limit_size_user_bufs) { - /* we need to limit the user buffer size or use library buffers */ - ml_module->fragment_size = frag_size; - } else { - /* entire message may be processed in single chunk */ - ml_module->fragment_size = FRAG_SIZE_NO_LIMIT; - } - - /* for non-contigous data - just use the ML buffers */ - ml_module->ml_fragment_size = length_ml_payload; - - /* set whether we can use user buffers */ - ml_module->use_user_buffers = use_user_bufs; - - ML_VERBOSE(10, ("Seting payload size to %d %d [%d %d]", - ml_module->ml_fragment_size, length_ml_payload, - mca_coll_ml_component.payload_buffer_size, - ml_module->data_offset)); - - exit_ERROR: - if (NULL != ranks_map) { - free(ranks_map); - } - if (NULL != bcols_in_use) { - free(bcols_in_use); - } - - return ret; -} - -static int ml_discover_hierarchy(mca_coll_ml_module_t *ml_module) -{ - ompi_proc_t *my_proc = NULL; - - int n_hierarchies = 0, - i = 0, ret = OMPI_SUCCESS; - - int size_bcol_list, size_sbgp_list; - - size_bcol_list = opal_list_get_size(&mca_bcol_base_components_in_use); - size_sbgp_list = opal_list_get_size(&mca_sbgp_base_components_in_use); - - if ((size_bcol_list != size_sbgp_list) || size_sbgp_list < 1 || size_bcol_list < 1) { - ML_ERROR(("Error: (size of mca_bcol_base_components_in_use = %d)" - " != (size of mca_sbgp_base_components_in_use = %d) or zero.", - size_bcol_list, size_sbgp_list)); - return OMPI_ERROR; - } - - n_hierarchies = size_sbgp_list; - - my_proc = ompi_proc_local(); - /* create the converter, for current implementation we - support homogenius comunicators only */ - ml_module->reference_convertor = - opal_convertor_create(my_proc->super.proc_arch, 0); - - if (OPAL_UNLIKELY(NULL == ml_module->reference_convertor)) { - return OMPI_ERROR; - } - - /* Do loop over all supported hiearchies. - To Do. We would like to have mca parameter that will allow control list - of topolgies that user would like use. Right now we will run - */ - for (i = 0; i < COLL_ML_TOPO_MAX; i++) { - if (COLL_ML_TOPO_ENABLED == ml_module->topo_list[i].status) { - ret = mca_coll_ml_component.topo_discovery_fn[i](ml_module, n_hierarchies); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return ret; - } - } - } - - /* Local query for bcol header size */ - ret = calculate_buffer_header_size(ml_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return ret; - } - - /* Get BCOL tuning, like support for zero copy, fragment size, and etc. - * This query involves global synchronization over all processes */ - ret = mca_coll_ml_read_allbcols_settings(ml_module, n_hierarchies); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - return ret; - } - /* Here is the safe point to call ml_module_memory_initialization , please - be very careful,if you decide to move this arround.*/ - ret = ml_module_memory_initialization(ml_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - /* make sure to release just allocated memory */ - mca_coll_ml_free_block(ml_module->payload_block); - return ret; - } - - ret = ml_module_set_small_msg_thresholds(ml_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - /* make sure to release just allocated memory */ - mca_coll_ml_free_block(ml_module->payload_block); - return ret; - } - - { - /* Syncronization barrier to make sure that all sides finsihed - * to register the memory */ - int ret, i; - int *comm_ranks = NULL; - - comm_ranks = (int *)calloc(ompi_comm_size(ml_module->comm), sizeof(int)); - if (OPAL_UNLIKELY(NULL == comm_ranks)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - for (i = 0; i < ompi_comm_size(ml_module->comm); i++) { - comm_ranks[i] = i; - } - - ret = comm_allreduce_pml(&ret, &i, - 1, MPI_INT, ompi_comm_rank(ml_module->comm), - MPI_MIN, ompi_comm_size(ml_module->comm), comm_ranks, - ml_module->comm); - - free(comm_ranks); - - if (OMPI_SUCCESS != ret) { - ML_ERROR(("comm_allreduce - failed to collect max_comm data")); - return ret; - } - /* Barrier done */ - } - - return ret; -} - -static int mca_coll_ml_tree_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - mca_coll_ml_topology_t *topo, int n_hierarchies, - const char *exclude_sbgp_name, const char *include_sbgp_name) -{ - /* local variables */ - char *ptr_output = NULL; - sbgp_base_component_keyval_t *sbgp_cli = NULL; - mca_base_component_list_item_t *bcol_cli = NULL; - hierarchy_pairs *pair = NULL; - - mca_sbgp_base_module_t *module = NULL; - ompi_proc_t **copy_procs = NULL, - *my_proc = NULL; - - const mca_sbgp_base_component_2_0_0_t *sbgp_component = NULL; - - - int i_hier = 0, n_hier = 0, ll_p1, bcol_index = 0, - n_procs_in = 0, group_index = 0, n_remain = 0, - i, j, ret = OMPI_SUCCESS, my_rank_in_list = 0, - n_procs_selected = 0, original_group_size = 0, i_am_done = 0, - local_leader, my_rank_in_subgroup, my_rank_in_remaining_list = 0, - my_rank_in_comm; - - int32_t my_lowest_group_index = -1, my_highest_group_index = -1; - - int *map_to_comm_ranks = NULL, *bcols_in_use = NULL; - - int32_t *all_selected = NULL, - *index_proc_selected = NULL; - - short all_reduce_buffer2_in[2]; - short all_reduce_buffer2_out[2]; - sub_group_params_t *array_of_all_subgroup_ranks=NULL; - /* this pointer should probably be an int32_t and not an int type */ - int32_t *list_of_ranks_in_all_subgroups=NULL; - int num_ranks_in_all_subgroups=0,num_total_subgroups=0; - int size_of_array_of_all_subgroup_ranks=0; - int size_of_list_of_ranks_in_all_subgroups=0; - int32_t in_allgather_value; - - if (NULL != exclude_sbgp_name && NULL != include_sbgp_name) { - ret = OMPI_ERROR; - goto exit_ERROR; - } - - ML_VERBOSE(10,("include %s exclude %s size %d", include_sbgp_name, exclude_sbgp_name, n_hierarchies)); - - /* allocates scratch space */ - all_selected = (int32_t *) calloc(ompi_comm_size(ml_module->comm), sizeof(int32_t)); - if (OPAL_UNLIKELY(NULL == all_selected)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - map_to_comm_ranks = (int *) calloc(ompi_comm_size(ml_module->comm), sizeof(int)); - if (OPAL_UNLIKELY(NULL == map_to_comm_ranks)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - /* - ** obtain list of procs - */ - /* create private copy for manipulation */ - copy_procs = (ompi_proc_t **) calloc(ompi_comm_size(ml_module->comm), - sizeof(ompi_proc_t *)); - if (OPAL_UNLIKELY(NULL == copy_procs)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - for (i = 0; i < ompi_comm_size(ml_module->comm); i++) { - copy_procs[i] = ompi_comm_peer_lookup (ml_module->comm, i); - map_to_comm_ranks[i] = i; - } - - my_rank_in_comm = ompi_comm_rank (ml_module->comm); - n_procs_in = ompi_comm_size(ml_module->comm); - original_group_size = n_procs_in; - - /* setup information for all-reduce over out of band */ - index_proc_selected = (int32_t *) malloc(sizeof(int32_t) * n_procs_in); - if (OPAL_UNLIKELY(NULL == index_proc_selected)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - /* get my proc pointer - used to identify myself in the list */ - my_proc = ompi_proc_local(); - my_rank_in_list = ompi_comm_rank(ml_module->comm); - - topo->component_pairs = (hierarchy_pairs *) calloc(n_hierarchies, sizeof(hierarchy_pairs)); - if (OPAL_UNLIKELY(NULL == topo->component_pairs)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - n_hier = 0; - /* - * Algorithm for subgrouping: - * 1) Start with all the ranks in the communicator - * 2) iterate over all (exclusive) hierarchy selection rules - * A) Apply subgrouping function to the remaining set of ranks - * - After the call to subgrouping subgroup_module->group_list - * has the index of ranks selected, from the list or ranks - * passed in. - * - map_to_comm_ranks maintains the mapping of the remaining - * ranks, to their rank in the communicator - * B) Each rank initializes a scratch array the size of the - * remaining ranks to 0, and then fills in the entry that - * corresponds to itself only with the value -/+R. If the - * rank is the local leader for the subgroup, the value of -R - * is entered, other wise R is entered. R is the root of the - * selected subgroup plus 1, so that for rank 0, +R has a - * different value than -R. - * C) The vector is then reduced, with the results going to all - * ranks, over the list of remaining ranks. As a result, - * the ranks of a given subgroup will show up with the value R, - * for all but the local-leader, which will have the value of -R. - * This is also used for error checking. - * D) subgroup_module->group_list is changed to contain the ranks - * of each member of the group within the communicator. - * E) Local rank with the group is determined. - * F) the list or remaining ranks is compacted, removing all selected - * ranks that are not the local-leader of the group. - * map_to_comm_ranks is also compacted. - * 3) This is terminated once all ranks are selected. - */ - - /* loop over hierarchies */ - sbgp_cli = (sbgp_base_component_keyval_t *) opal_list_get_first(&mca_sbgp_base_components_in_use); - bcol_cli = (mca_base_component_list_item_t *) opal_list_get_first(&mca_bcol_base_components_in_use); - - ML_VERBOSE(10, ("Loop over hierarchies.")); - - i_hier = 0; - while ((opal_list_item_t *) sbgp_cli != opal_list_get_end(&mca_sbgp_base_components_in_use)){ - /* number of processes selected with this sbgp on all ranks */ - int global_n_procs_selected; - - /* silence clang warnings */ - assert (NULL != bcol_cli && NULL != sbgp_cli); - - /* - ** obtain the list of ranks in the current level - */ - - sbgp_component = (mca_sbgp_base_component_2_0_0_t *) sbgp_cli->component.cli_component; - - /* Skip excluded levels */ - if (NULL != exclude_sbgp_name) { - - ML_VERBOSE(10,("EXCLUDE compare %s to %s", include_sbgp_name, - sbgp_component->sbgp_version.mca_component_name)); - if(0 == strcmp(exclude_sbgp_name, - sbgp_component->sbgp_version.mca_component_name)) { - /* take the next element */ - sbgp_cli = (sbgp_base_component_keyval_t *) opal_list_get_next((opal_list_item_t *) sbgp_cli); - bcol_cli = (mca_base_component_list_item_t *) opal_list_get_next((opal_list_item_t *) bcol_cli); - continue; - } - } - - if (NULL != include_sbgp_name) { - ML_VERBOSE(10,("INCLUDE compare %s to %s", include_sbgp_name, - sbgp_component->sbgp_version.mca_component_name)); - if(0 != strcmp(include_sbgp_name, - sbgp_component->sbgp_version.mca_component_name)) { - /* take the next element */ - sbgp_cli = (sbgp_base_component_keyval_t *) opal_list_get_next((opal_list_item_t *) sbgp_cli); - bcol_cli = (mca_base_component_list_item_t *) opal_list_get_next((opal_list_item_t *) bcol_cli); - continue; - } - } - - ML_VERBOSE(10,("Passed include %s exclude %s", include_sbgp_name, exclude_sbgp_name)); - - /* discover subgroup */ - ML_VERBOSE(10, ("Discover subgroup: hier level - %d.", i_hier)); - module = sbgp_component->select_procs(copy_procs, n_procs_in, - ml_module->comm, - sbgp_cli->key_value, &ptr_output); - if (NULL == module) { - /* no module created */ - n_procs_selected = 0; - /* We must continue and participate in the allgather. - * It's not clear that one can enter this conditional - * during "normal" execution. We need to review - * all modules. - */ - - /* THE CODE SNIPPET COMMENTED OUT BELOW IS DANGEROUS CODE THAT - * COULD RESULT IN A HANG - THE "CONTINUE" STATEMENT MAY RESULT IN - * RANKS BYPASSING THE ALLGATHER IN NON-SYMMETRIC CASES - */ - - /* - sbgp_cli = (sbgp_base_component_keyval_t *) opal_list_get_next((opal_list_item_t *) sbgp_cli); - bcol_cli = (mca_base_component_list_item_t *) opal_list_get_next((opal_list_item_t *) bcol_cli); - continue; - */ - - /* Skipping subgroups of size one will cause these processes to be missed in list of level one - * indices. */ - } else if (NULL == module->group_list || (1 == module->group_size && i_hier)) { - /* bypass modules that have no group_list */ - n_procs_selected = 0; - OBJ_RELEASE(module); - module=NULL; - } else { - n_procs_selected = module->group_size; - } - - ML_VERBOSE(10, ("Hier level - %d; group size - %d", i_hier, n_procs_selected)); - - /* setup array indicating all procs that were selected */ - for (i = 0; i < n_procs_in; i++) { - index_proc_selected[i] = 0; - } - - /* figure out my rank in the subgroup */ - my_rank_in_subgroup=-1; - ll_p1=-1; - in_allgather_value = 0; - if (n_procs_selected) { - /* I need to contribute to the vector */ - for (group_index = 0; group_index < n_procs_selected; group_index++) { - /* set my rank within the group */ - if (map_to_comm_ranks[module->group_list[group_index]] == my_rank_in_comm) { - my_rank_in_subgroup=group_index; - module->my_index = group_index; - /* currently the indecies are still given in terms of - * the rank in the list of remaining ranks */ - my_rank_in_remaining_list=module->group_list[group_index]; - } - } - - if( -1 != my_rank_in_subgroup ) { - /* I am contributing to this subgroup */ - -#ifdef NEW_LEADER_SELECTION -#if 0 - int lleader_index; - /* Select the local leader */ - lleader_index = coll_ml_select_leader(ml_module,module, map_to_comm_ranks, - copy_procs,n_procs_selected); - - local_leader = map_to_comm_ranks[module->group_list[lleader_index]]; -#endif -#else - - /* local leader is rank within list or remaining ranks */ - local_leader = map_to_comm_ranks[module->group_list[0]]; - -#endif - ML_VERBOSE(10,("The local leader selected for hierarchy %d is rank %d ", - i_hier, local_leader)); - - ll_p1 = local_leader + 1; - if (local_leader == my_rank_in_comm) { - in_allgather_value = - index_proc_selected[my_rank_in_remaining_list] = -ll_p1; - } else { - in_allgather_value = - index_proc_selected[my_rank_in_remaining_list] = ll_p1; - } - } - } - - /* gather the information from all the other remaining ranks */ - ML_VERBOSE(10, ("Call for comm_allreduce_pml.")); - ret = comm_allgather_pml(&in_allgather_value, - all_selected, 1, MPI_INT, my_rank_in_list, - n_procs_in, map_to_comm_ranks ,ml_module->comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_allreduce_pml failed.")); - goto exit_ERROR; - } - - /* do some sanity checks */ - if( -1 != my_rank_in_subgroup ) { - ret = check_global_view_of_subgroups(n_procs_selected, - n_procs_in, ll_p1, all_selected, module ); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("check_global_view_of_subgroups failed.")); - goto exit_ERROR; - } - } - - /* - ** change the list of procs stored on the module to ranks within - ** the communicator. - */ - - ML_VERBOSE(10, ("Change the list of procs; hier level - %d.", i_hier)); - for (group_index = 0; group_index < n_procs_selected; group_index++) { - module->group_list[group_index] = map_to_comm_ranks[module->group_list[group_index]]; - /* set my rank within the group */ - if (module->group_list[group_index] == ompi_comm_rank(ml_module->comm)) { - module->my_index = group_index; - } - } - - /* - * accumulate data on the new subgroups created - */ - /*XXX*/ - global_n_procs_selected = num_ranks_in_all_subgroups; - ret = get_new_subgroup_data(all_selected, n_procs_in, - &array_of_all_subgroup_ranks, - &size_of_array_of_all_subgroup_ranks, - &list_of_ranks_in_all_subgroups, - &size_of_list_of_ranks_in_all_subgroups, - &num_ranks_in_all_subgroups, - &num_total_subgroups, map_to_comm_ranks,i_hier); - - if( OMPI_SUCCESS != ret ) { - ML_VERBOSE(10, (" Error: get_new_subgroup_data returned %d ",ret)); - goto exit_ERROR; - } - - /* the global number of processes selected at this level is the difference - * in the number of procs in all subgroups between this level and the - * last */ - global_n_procs_selected = num_ranks_in_all_subgroups - global_n_procs_selected; - - /* am I done ? */ - i_am_done=0; - if ( (all_selected[my_rank_in_list] == ll_p1) && - /* if I was not a member of any group, still need to continue */ - n_procs_selected ){ - i_am_done = 1; - } - /* get my rank in the list */ - n_remain = 0; - my_rank_in_list = -1; - for (i = 0; i < n_procs_in; i++) { - if (all_selected[i] > 0 ) { - /* this proc will not be used in the next hierarchy */ - continue; - } - /* reset my_rank_in_list, n_procs_in */ - copy_procs[n_remain] = copy_procs[i]; - map_to_comm_ranks[n_remain] = map_to_comm_ranks[i]; - - if (my_proc == copy_procs[n_remain]){ - my_rank_in_list = n_remain; - } - - n_remain++; - } - - /* check to make sure we did not get a size 1 group if more than - * one rank are still remaning to be grouped */ - if ((1 == n_procs_selected) && n_remain > 1) { - OBJ_RELEASE(module); - n_procs_selected = 0; - } - - if( 0 < n_procs_selected ) { - /* increment the level counter */ - pair = &topo->component_pairs[n_hier]; - - /* add this to the list of sub-group/bcol pairs in use */ - pair->subgroup_module = module; - pair->bcol_component = (mca_bcol_base_component_t *) - ((mca_base_component_list_item_t *) bcol_cli)->cli_component; - - pair->bcol_index = bcol_index; - - /* create bcol modules */ - ML_VERBOSE(10, ("Create bcol modules.")); - pair->bcol_modules = pair->bcol_component->collm_comm_query(module, &pair->num_bcol_modules); - /* failed to create a new module */ - if (OPAL_UNLIKELY(NULL == pair->bcol_modules)) { - ML_VERBOSE(10, ("Failed to create new modules.")); - ret = OMPI_ERROR; - goto exit_ERROR; - } - - if (pair->bcol_component->need_ordering) { - topo->topo_ordering_info.num_bcols_need_ordering += pair->num_bcol_modules; - } - - /* Append new network contexts to our memory managment */ - ML_VERBOSE(10, ("Append new network contexts to our memory managment.")); - if (OPAL_UNLIKELY(OMPI_SUCCESS != append_new_network_context(pair))) { - ML_VERBOSE(10, ("Exit with error. - append new network context")); - ret = OMPI_ERROR; - goto exit_ERROR; - } - - for (i = 0; i < pair->num_bcol_modules; ++i) { - /* set the starting sequence number */ - pair->bcol_modules[i]->squence_number_offset = - mca_coll_ml_component.base_sequence_number; - - /* cache the sub-group size */ - pair->bcol_modules[i]->size_of_subgroup= - module->group_size; - - /* set the bcol id */ - pair->bcol_modules[i]->bcol_id = (int16_t) bcol_index; - - /* Set bcol mode bits */ - topo->all_bcols_mode &= (( mca_bcol_base_module_t *) pair->bcol_modules[i])->supported_mode; - } - - /* - * set largest power of 2 for this group - */ - module->n_levels_pow2 = ml_fls(module->group_size); - /* silence a clang warning */ - assert (module->n_levels_pow2 > 0 && module->n_levels_pow2 < 32); - module->pow_2 = 1 << module->n_levels_pow2; - - n_hier++; - - if (-1 == my_lowest_group_index) { - my_lowest_group_index = bcol_index; - } - - my_highest_group_index = bcol_index; - } - - /* if n_remain is 1, and the communicator size is not 1, and module - ** is not NULL, I am done - */ - if ((1 == n_remain) && (1 < original_group_size) && - (NULL != module)) { - i_am_done = 1; - } - - /* am I done ? */ - if (1 == i_am_done) { - /* nothing more to do */ - goto SelectionDone; - } - - /* take the next element */ - sbgp_cli = (sbgp_base_component_keyval_t *) opal_list_get_next((opal_list_item_t *) sbgp_cli); - bcol_cli = (mca_base_component_list_item_t *) opal_list_get_next((opal_list_item_t *) bcol_cli); - - /* if no processes were selected anywhere with this sbgp module don't bother - * incrementing the hierarchy index. this resolves issues where (for example) - * process binding is not enabled or supported. */ - if (global_n_procs_selected) { - /* The way initialization is currently written *all* ranks MUST appear - * in the first level (0) of the hierarchy. If any rank is not in the first - * level then the calculation of gather/scatter offsets will be wrong. - * NTH: DO NOT REMOVE this assert until this changes! */ - assert (i_hier || global_n_procs_selected == n_procs_in); - i_hier++; - } - - ++bcol_index; - - n_procs_in = n_remain; - } - - SelectionDone: - - if (topo->topo_ordering_info.num_bcols_need_ordering > 0) { - for (j = 0; j < n_hier; ++j) { - pair = &topo->component_pairs[j]; - if (pair->bcol_component->need_ordering) { - for (i = 0; i < pair->num_bcol_modules; ++i) { - pair->bcol_modules[i]->next_inorder = &topo->topo_ordering_info.next_inorder; - } - } - } - } - - /* If I was not done, it means that we skipped all subgroups and no hierarchy was build */ - if (0 == i_am_done) { - - if (NULL != include_sbgp_name || NULL != exclude_sbgp_name) { - /* User explicitly asked for specific type of topology, which generates empty group */ - opal_show_help("help-mpi-coll-ml.txt", - "empty-sub-group", true, - NULL != include_sbgp_name ? include_sbgp_name : exclude_sbgp_name); - ret = OMPI_ERROR; - goto exit_ERROR; - } - - ML_VERBOSE(10, ("Constructing empty hierarchy")); - ret = OMPI_SUCCESS; - goto exit_ERROR; - } - - topo->n_levels = n_hier; - - /* Find lowest and highest index of the groups in this communicator. - ** This will be needed in deciding where in the hierarchical collective - ** sequence of calls these particular groups belong. - ** It is done with one allreduce call to save allreduce overhead. - */ - all_reduce_buffer2_in[0] = (short)my_lowest_group_index; - all_reduce_buffer2_in[1] = (short)-my_highest_group_index; - /* restore map to ranks for the original communicator */ - for (i = 0; i < ompi_comm_size(ml_module->comm); i++) { - map_to_comm_ranks[i] = i; - } - - ret = comm_allreduce_pml(all_reduce_buffer2_in, all_reduce_buffer2_out, - 2, MPI_SHORT, ompi_comm_rank(ml_module->comm), - MPI_MIN, original_group_size, - map_to_comm_ranks, ml_module->comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_allreduce_pml failed. all_reduce_buffer2_in reduction")); - goto exit_ERROR; - } - - topo->global_lowest_hier_group_index = all_reduce_buffer2_out[0]; - topo->global_highest_hier_group_index = -all_reduce_buffer2_out[1]; - - ML_VERBOSE(10, ("The lowest index and highest index was successfully found.")); - - ML_VERBOSE(10, ("ml_discover_hierarchy done, n_levels %d lowest_group_index %d highest_group_index %d," - " original_group_size %d my_lowest_group_index %d my_highest_group_index %d", - topo->n_levels, topo->global_lowest_hier_group_index, - topo->global_highest_hier_group_index, - original_group_size, - my_lowest_group_index, - my_highest_group_index)); - - /* - * setup detailed subgroup information - */ - ret = ml_setup_full_tree_data(topo, ml_module->comm, my_highest_group_index, - map_to_comm_ranks,&num_total_subgroups,&array_of_all_subgroup_ranks, - &list_of_ranks_in_all_subgroups); - - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_VERBOSE(10, ("comm_allreduce_pml failed: bcols_in_use reduction %d ",ret)); - goto exit_ERROR; - } - - /* cache the ML hierarchical description on the tree */ - topo->number_of_all_subgroups = num_total_subgroups; - topo->array_of_all_subgroups = array_of_all_subgroup_ranks; - - ret = ml_init_k_nomial_trees(topo, list_of_ranks_in_all_subgroups, ompi_comm_rank(ml_module->comm)); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - goto exit_ERROR; - } - - /* Set the route table if know-root type of algorithms is used */ - if (COLL_ML_STATIC_BCAST == mca_coll_ml_component.bcast_algorithm) { - ret = mca_coll_ml_fill_in_route_tab(topo, ml_module->comm); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("mca_coll_ml_fill_in_route_tab returned an error.")); - goto exit_ERROR; - } - } - - /* - ** If all ranks are selected, there will be a single rank that remains - - ** the root of the last group. Check to make sure that all ranks are - ** selected, and if not, return an error. We can't handle the collectives - ** correctly with this module. - */ - - exit_ERROR: - - ML_VERBOSE(10, ("Discovery done")); - - /* free temp resources */ - if (NULL != all_selected) { - free(all_selected); - all_selected = NULL; - } - - if (NULL != copy_procs) { - free(copy_procs); - copy_procs = NULL; - } - - if (NULL != map_to_comm_ranks) { - free(map_to_comm_ranks); - map_to_comm_ranks = NULL; - } - - if (NULL != index_proc_selected) { - free(index_proc_selected); - index_proc_selected = NULL; - } - - if (NULL != bcols_in_use) { - free(bcols_in_use); - bcols_in_use = NULL; - } - - if (NULL != list_of_ranks_in_all_subgroups) { - free(list_of_ranks_in_all_subgroups); - list_of_ranks_in_all_subgroups = NULL; - } - - return ret; -} - -void mca_coll_ml_allreduce_matrix_init(mca_coll_ml_module_t *ml_module, - const mca_bcol_base_component_2_0_0_t *bcol_component) -{ - int op, dt, et; - - for (op = 0; op < OMPI_OP_NUM_OF_TYPES; ++op) { - for (dt = 0; dt < OMPI_DATATYPE_MAX_PREDEFINED; ++dt) { - for (et = 0; et < BCOL_NUM_OF_ELEM_TYPES; ++et) { - ml_module->allreduce_matrix[op][dt][et] = - bcol_component->coll_support(op, dt, et); - } - } - } -} - -int mca_coll_ml_fulltree_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies) -{ - return mca_coll_ml_tree_hierarchy_discovery(ml_module, - &ml_module->topo_list[COLL_ML_HR_FULL], - n_hierarchies, NULL, NULL); -} - -int mca_coll_ml_allreduce_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies) -{ - mca_base_component_list_item_t *bcol_cli; - const mca_bcol_base_component_2_0_0_t *bcol_component; - - sbgp_base_component_keyval_t *sbgp_cli; - const mca_sbgp_base_component_2_0_0_t *sbgp_component; - - sbgp_cli = (sbgp_base_component_keyval_t *) - opal_list_get_first(&mca_sbgp_base_components_in_use); - - OPAL_LIST_FOREACH(bcol_cli, &mca_bcol_base_components_in_use, mca_base_component_list_item_t) { - bcol_component = (mca_bcol_base_component_2_0_0_t *) bcol_cli->cli_component; - - /* silence false-positive clang warning */ - assert (NULL != sbgp_cli); - - if (NULL != bcol_component->coll_support_all_types && - !bcol_component->coll_support_all_types(BCOL_ALLREDUCE)) { - mca_base_component_list_item_t *bcol_cli_next; - const mca_bcol_base_component_2_0_0_t *bcol_component_next; - - bcol_cli_next = (mca_base_component_list_item_t *) - opal_list_get_next((opal_list_item_t *) bcol_cli); - - mca_coll_ml_component.need_allreduce_support = true; - mca_coll_ml_allreduce_matrix_init(ml_module, bcol_component); - - sbgp_component = (mca_sbgp_base_component_2_0_0_t *) - sbgp_cli->component.cli_component; - - ML_VERBOSE(10, ("Topology build: sbgp %s will be excluded.", - sbgp_component->sbgp_version.mca_component_name)); - - - /* If there isn't additional component supports all types => print warning */ - if (1 == opal_list_get_size(&mca_bcol_base_components_in_use) || - (opal_list_item_t *) bcol_cli_next == - opal_list_get_end(&mca_bcol_base_components_in_use)) { - opal_show_help("help-mpi-coll-ml.txt", - "allreduce-not-supported", true, - bcol_component->bcol_version.mca_component_name); - - } else { - bcol_component_next = (mca_bcol_base_component_2_0_0_t *) - bcol_cli_next->cli_component; - - if (NULL != bcol_component_next->coll_support_all_types && - !bcol_component_next->coll_support_all_types(BCOL_ALLREDUCE)) { - - opal_show_help("help-mpi-coll-ml.txt", - "allreduce-alt-nosupport", true, - bcol_component->bcol_version.mca_component_name); - - } - } - - return mca_coll_ml_tree_hierarchy_discovery(ml_module, - &ml_module->topo_list[COLL_ML_HR_ALLREDUCE], - n_hierarchies, sbgp_component->sbgp_version.mca_component_name, NULL); - } - - sbgp_cli = (sbgp_base_component_keyval_t *) opal_list_get_next((opal_list_item_t *) sbgp_cli); - } - - return OMPI_SUCCESS; -} - -int mca_coll_ml_fulltree_exclude_basesmsocket_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies) -{ - return mca_coll_ml_tree_hierarchy_discovery(ml_module, - &ml_module->topo_list[COLL_ML_HR_NBS], - n_hierarchies, "basesmsocket", NULL); -} - -int mca_coll_ml_fulltree_ptp_only_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies) -{ - return mca_coll_ml_tree_hierarchy_discovery(ml_module, - &ml_module->topo_list[COLL_ML_HR_SINGLE_PTP], - n_hierarchies, NULL, "p2p"); -} - -int mca_coll_ml_fulltree_iboffload_only_hierarchy_discovery(mca_coll_ml_module_t *ml_module, - int n_hierarchies) -{ - return mca_coll_ml_tree_hierarchy_discovery(ml_module, - &ml_module->topo_list[COLL_ML_HR_SINGLE_IBOFFLOAD], - n_hierarchies, NULL, "ibnet"); -} - -#define IS_REACHABLE 1 -#define IS_NOT_REACHABLE -1 - -static int mca_coll_ml_fill_in_route_tab(mca_coll_ml_topology_t *topo, ompi_communicator_t *comm) -{ - int i, rc, level, comm_size = 0, - my_rank = ompi_comm_rank(comm); - - int32_t **route_table = NULL; - int32_t *all_reachable_ranks = NULL; - - struct ompi_proc_t **sbgp_procs = NULL; - - mca_sbgp_base_module_t *sbgp_group = NULL; - comm_size = ompi_comm_size(comm); - - all_reachable_ranks = (int32_t *) malloc(comm_size * sizeof(int32_t)); - if (NULL == all_reachable_ranks) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - for (i = 0; i < comm_size; ++i) { - all_reachable_ranks[i] = IS_NOT_REACHABLE; - } - - route_table = (int32_t **) calloc(topo->n_levels, sizeof(int32_t *)); - if (NULL == route_table) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - topo->route_vector = (mca_bcol_base_route_info_t *) - calloc(comm_size, sizeof(mca_bcol_base_route_info_t)); - if (NULL == topo->route_vector) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - all_reachable_ranks[my_rank] = IS_REACHABLE; - - for (level = 0; level < topo->n_levels; ++level) { - sbgp_group = topo->component_pairs[level].subgroup_module; - - route_table[level] = (int32_t *) malloc(comm_size * sizeof(int32_t)); - if (NULL == route_table[level]) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - rc = OMPI_ERR_OUT_OF_RESOURCE; - goto exit_ERROR; - } - - for (i = 0; i < comm_size; ++i) { - if (IS_NOT_REACHABLE != all_reachable_ranks[i]) { - all_reachable_ranks[i] = sbgp_group->my_index; - } - } - - rc = comm_allreduce_pml(all_reachable_ranks, - route_table[level], - comm_size, - MPI_INT, sbgp_group->my_index, - MPI_MAX, sbgp_group->group_size, - sbgp_group->group_list, - comm); - if (OMPI_SUCCESS != rc) { - ML_VERBOSE(10, ("comm_allreduce failed.")); - goto exit_ERROR; - } - - for (i = 0; i < comm_size; ++i) { - if (IS_NOT_REACHABLE != - route_table[level][i]) { - all_reachable_ranks[i] = IS_REACHABLE; - } - } - } - - assert(0 < level); - - /* If there are unreachable ranks => - reach them through leader of my upper layer */ - for (i = 0; i < comm_size; ++i) { - if (IS_NOT_REACHABLE == - route_table[level - 1][i]) { - route_table[level - 1][i] = 0; - } - } - - free(all_reachable_ranks); - - for (i = 0; i < comm_size; ++i) { - for (level = 0; level < topo->n_levels; ++level) { - if (IS_NOT_REACHABLE != route_table[level][i]) { - topo->route_vector[i].level = level; - topo->route_vector[i].rank = route_table[level][i]; - break; - } - } - } - -#if OPAL_ENABLE_DEBUG -#define COLL_ML_ROUTE_BUFF_SIZE (1024*1024) - /* Only bother creating the string if we're actually going to - print it out (i.e., if the verbose level is >= 10) */ - if (mca_coll_ml_component.verbose >= 10) { - int ii, jj; - char *buff, *output; - - output = buff = calloc(1, COLL_ML_ROUTE_BUFF_SIZE); - assert(NULL != output); - - sprintf(output, "ranks: "); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - - for(ii = 0; ii < comm_size; ++ii) { - sprintf(output, " %2d", ii); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - } - - for (ii = 0; ii < topo->n_levels; ++ii) { - sprintf(output, "\nlevel: %d ", ii); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - for(jj = 0; jj < comm_size; ++jj) { - sprintf(output, " %2d", route_table[ii][jj]); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - } - } - - sprintf(output, "\n\nThe vector is:\n============\nranks: "); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - - for(ii = 0; ii < comm_size; ++ii) { - sprintf(output, " %6d", ii); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - } - - sprintf(output, "\nlevel x rank: "); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - - for(ii = 0; ii < comm_size; ++ii) { - sprintf(output, " (%d, %d)", - topo->route_vector[ii].level, - topo->route_vector[ii].rank); - - output = buff + strlen(buff); - assert(COLL_ML_ROUTE_BUFF_SIZE + buff > output); - } - - ML_VERBOSE(10, ("\nThe table is:\n============%s", buff)); - free(buff); - } -#endif - - for (level = 0; level < topo->n_levels; ++level) { - free(route_table[level]); - } - - free(route_table); - - return OMPI_SUCCESS; - - exit_ERROR: - - ML_VERBOSE(10, ("Exit with error status - %d.", rc)); - if (NULL != route_table) { - for (level = 0; level < topo->n_levels; ++level) { - if (NULL != route_table[level]) { - free(route_table[level]); - } - } - - free(route_table); - } - - if (NULL != sbgp_procs) { - free(sbgp_procs); - } - - if (NULL != all_reachable_ranks) { - free(all_reachable_ranks); - } - - return rc; -} - -static void init_coll_func_pointers(mca_coll_ml_module_t *ml_module) -{ - mca_coll_base_module_2_1_0_t *coll_base = &ml_module->super; - - int iboffload_used = - mca_coll_ml_check_if_bcol_is_used("iboffload", ml_module, COLL_ML_TOPO_MAX); - - /* initialize coll component function pointers */ - coll_base->coll_module_enable = ml_module_enable; - coll_base->ft_event = NULL; - - if (mca_coll_ml_component.disable_allgather) { - coll_base->coll_allgather = NULL; - coll_base->coll_iallgather = NULL; - } else { - coll_base->coll_allgather = mca_coll_ml_allgather; - coll_base->coll_iallgather = mca_coll_ml_allgather_nb; - } - - coll_base->coll_allgatherv = NULL; - - if (mca_coll_ml_component.use_knomial_allreduce) { - if (true == mca_coll_ml_component.need_allreduce_support) { - coll_base->coll_allreduce = mca_coll_ml_allreduce_dispatch; - coll_base->coll_iallreduce = mca_coll_ml_allreduce_dispatch_nb; - } else { - coll_base->coll_allreduce = mca_coll_ml_allreduce; - coll_base->coll_iallreduce = mca_coll_ml_allreduce_nb; - } - } else { - coll_base->coll_allreduce = NULL; - } - - coll_base->coll_alltoall = NULL; - coll_base->coll_ialltoall = NULL; - - coll_base->coll_alltoallv = NULL; - coll_base->coll_alltoallw = NULL; - - coll_base->coll_barrier = mca_coll_ml_barrier_intra; - - /* Use the sequential broadcast */ - if (COLL_ML_SEQ_BCAST == mca_coll_ml_component.bcast_algorithm) { - coll_base->coll_bcast = mca_coll_ml_bcast_sequential_root; - } else { - coll_base->coll_bcast = mca_coll_ml_parallel_bcast; - } - - coll_base->coll_exscan = NULL; - coll_base->coll_gather = NULL; - /* - coll_base->coll_gather = mca_coll_ml_gather; - */ - /* Current iboffload/ptpcoll version have no support for gather */ - if (iboffload_used || - mca_coll_ml_check_if_bcol_is_used("ptpcoll", ml_module, COLL_ML_TOPO_MAX)) { - coll_base->coll_gather = NULL; - } - - - coll_base->coll_gatherv = NULL; - if (mca_coll_ml_component.disable_reduce) { - coll_base->coll_reduce = NULL; - } else { - coll_base->coll_reduce = mca_coll_ml_reduce; - } - coll_base->coll_reduce_scatter = NULL; - coll_base->coll_scan = NULL; - coll_base->coll_scatter = NULL; -#if 0 - coll_base->coll_scatter = mca_coll_ml_scatter_sequential; -#endif - coll_base->coll_scatterv = NULL; - - coll_base->coll_iallgatherv = NULL; - coll_base->coll_ialltoallv = NULL; - coll_base->coll_ialltoallw = NULL; - coll_base->coll_ibarrier = mca_coll_ml_ibarrier_intra; - - coll_base->coll_ibcast = mca_coll_ml_parallel_bcast_nb; - coll_base->coll_iexscan = NULL; - coll_base->coll_igather = NULL; - coll_base->coll_igatherv = NULL; - coll_base->coll_ireduce = mca_coll_ml_reduce_nb; - coll_base->coll_ireduce_scatter = NULL; - coll_base->coll_iscan = NULL; - coll_base->coll_iscatter = NULL; - coll_base->coll_iscatterv = NULL; -} - -static int init_lists(mca_coll_ml_module_t *ml_module) -{ - mca_coll_ml_component_t *cs = &mca_coll_ml_component; - int num_elements = cs->free_list_init_size; - int max_elements = cs->free_list_max_size; - int elements_per_alloc = cs->free_list_grow_size; - size_t length_payload = 0; - size_t length; - int ret; - - /* initialize full message descriptors - moving this to the - * module, as the fragment has resrouce requirements that - * are communicator dependent */ - /* no data associated with the message descriptor */ - - length = sizeof(mca_coll_ml_descriptor_t); - ret = opal_free_list_init(&(ml_module->message_descriptors), length, - opal_cache_line_size, OBJ_CLASS(mca_coll_ml_descriptor_t), - length_payload, 0, - num_elements, max_elements, elements_per_alloc, - NULL, 0, NULL, - init_ml_message_desc, ml_module); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - ML_ERROR(("opal_free_list_init exit with error")); - return ret; - } - - /* initialize fragement descriptors - always associate one fragment - * descriptr with full message descriptor, so that we can minimize - * small message latency */ - - /* create a free list of fragment descriptors */ - /*length_payload=sizeof(something);*/ - length = sizeof(mca_coll_ml_fragment_t); - ret = opal_free_list_init (&(ml_module->fragment_descriptors), length, - opal_cache_line_size, OBJ_CLASS(mca_coll_ml_fragment_t), - length_payload, 0, - num_elements, max_elements, elements_per_alloc, - NULL, 0, NULL, - init_ml_fragment_desc, ml_module); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("opal_free_list_init exit with error")); - return ret; - } - - return OMPI_SUCCESS; -} - -static int check_for_max_supported_ml_modules(struct ompi_communicator_t *comm) -{ - int i, ret; - mca_coll_ml_component_t *cs = &mca_coll_ml_component; - int *comm_ranks = NULL; - - comm_ranks = (int *)calloc(ompi_comm_size(comm), sizeof(int)); - if (OPAL_UNLIKELY(NULL == comm_ranks)) { - ML_VERBOSE(10, ("Cannot allocate memory.")); - return OMPI_ERR_OUT_OF_RESOURCE; - } - for (i = 0; i < ompi_comm_size(comm); i++) { - comm_ranks[i] = i; - } - - ret = comm_allreduce_pml(&cs->max_comm, &cs->max_comm, - 1 , MPI_INT, ompi_comm_rank(comm), - MPI_MIN, ompi_comm_size(comm), comm_ranks, - comm); - if (OMPI_SUCCESS != ret) { - ML_ERROR(("comm_allreduce - failed to collect max_comm data")); - return ret; - } - - if (0 >= cs->max_comm || - ompi_comm_size(comm) < cs->min_comm_size) { - return OMPI_ERROR; - } else { - --cs->max_comm; - } - - free(comm_ranks); - - return OMPI_SUCCESS; -} - -#if OPAL_ENABLE_DEBUG -#define DEBUG_ML_COMM_QUERY() \ - do { \ - static int verbosity_level = 5; \ - static int module_num = 0; \ - ML_VERBOSE(10, ("ML module - %p num %d for comm - %p, " \ - "comm size - %d, ML component prio - %d.", \ - ml_module, ++module_num, comm, ompi_comm_size(comm), *priority)); \ - /* For now I want to always print that we enter ML - \ - at the past there was an issue that we did not enter ML and actually run with tuned. \ - Still I do not want to print it for each module - only for the first. */ \ - ML_VERBOSE(verbosity_level, ("ML module - %p was successfully created", ml_module)); \ - verbosity_level = 10; \ - } while(0) - -#else -#define DEBUG_ML_COMM_QUERY() -#endif - -static int mca_coll_ml_need_multi_topo(int bcol_collective) -{ - mca_base_component_list_item_t *bcol_cli; - const mca_bcol_base_component_2_0_0_t *bcol_component; - - for (bcol_cli = (mca_base_component_list_item_t *) - opal_list_get_first(&mca_bcol_base_components_in_use); - (opal_list_item_t *) bcol_cli != - opal_list_get_end(&mca_bcol_base_components_in_use); - bcol_cli = (mca_base_component_list_item_t *) - opal_list_get_next((opal_list_item_t *) bcol_cli)) { - bcol_component = (mca_bcol_base_component_2_0_0_t *) bcol_cli->cli_component; - if (NULL != bcol_component->coll_support_all_types && - !bcol_component->coll_support_all_types(bcol_collective)) { - return true; - } - } - - return false; -} - -/* We may call this function ONLY AFTER algorithm initialization */ -static int setup_bcast_table(mca_coll_ml_module_t *module) -{ - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - bool has_zero_copy; - - /* setup bcast index table */ - if (COLL_ML_STATIC_BCAST == cm->bcast_algorithm) { - module->bcast_fn_index_table[0] = ML_BCAST_SMALL_DATA_KNOWN; - - has_zero_copy = !!(MCA_BCOL_BASE_ZERO_COPY & - module->coll_ml_bcast_functions[ML_BCAST_LARGE_DATA_KNOWN]->topo_info->all_bcols_mode); - - if (1 == cm->enable_fragmentation || (2 == cm->enable_fragmentation && !has_zero_copy)) { - module->bcast_fn_index_table[1] = ML_BCAST_SMALL_DATA_KNOWN; - } else if (!has_zero_copy) { - - opal_show_help("help-mpi-coll-ml.txt", - "fragmentation-disabled", true); - return OMPI_ERROR; - - } else { - module->bcast_fn_index_table[1] = ML_BCAST_LARGE_DATA_KNOWN; - } - } else { - module->bcast_fn_index_table[0] = ML_BCAST_SMALL_DATA_UNKNOWN; - - if (NULL == module->coll_ml_bcast_functions[ML_BCAST_LARGE_DATA_UNKNOWN]) { - - opal_show_help("help-mpi-coll-ml.txt", - "static-bcast-disabled", true); - - return OMPI_ERROR; - } - - has_zero_copy = !!(MCA_BCOL_BASE_ZERO_COPY & - module->coll_ml_bcast_functions[ML_BCAST_LARGE_DATA_UNKNOWN]->topo_info->all_bcols_mode); - - if (1 == cm->enable_fragmentation || (2 == cm->enable_fragmentation && !has_zero_copy)) { - module->bcast_fn_index_table[1] = ML_BCAST_SMALL_DATA_UNKNOWN; - } else if (!has_zero_copy) { - - opal_show_help("help-mpi-coll-ml.txt", - "fragmentation-disabled", true); - - return OMPI_ERROR; - } else { - /* If the topology support zero level and no fragmentation was requested */ - module->bcast_fn_index_table[1] = ML_BCAST_LARGE_DATA_UNKNOWN; - } - } - - return OMPI_SUCCESS; -} - -static void ml_check_for_enabled_topologies (int map[][MCA_COLL_MAX_NUM_SUBTYPES], mca_coll_ml_topology_t *topo_list) -{ - int coll_i, st_i; - for (coll_i = 0; coll_i < MCA_COLL_MAX_NUM_COLLECTIVES; coll_i++) { - for (st_i = 0; st_i < MCA_COLL_MAX_NUM_SUBTYPES; st_i++) { - if (map[coll_i][st_i] > -1) { - /* The topology is used, so set it to enabled */ - assert(map[coll_i][st_i] <= COLL_ML_TOPO_MAX); - topo_list[map[coll_i][st_i]].status = COLL_ML_TOPO_ENABLED; - } - } - } -} - -static void setup_default_topology_map(mca_coll_ml_module_t *ml_module) -{ - int i, j; - for (i = 0; i < MCA_COLL_MAX_NUM_COLLECTIVES; i++) { - for (j = 0; j < MCA_COLL_MAX_NUM_SUBTYPES; j++) { - ml_module->collectives_topology_map[i][j] = -1; - } - } - - ml_module->collectives_topology_map[ML_BARRIER][ML_BARRIER_DEFAULT] = COLL_ML_HR_FULL; - - ml_module->collectives_topology_map[ML_BCAST][ML_BCAST_SMALL_DATA_KNOWN] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_BCAST][ML_BCAST_SMALL_DATA_UNKNOWN] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_BCAST][ML_BCAST_SMALL_DATA_SEQUENTIAL] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_BCAST][ML_BCAST_LARGE_DATA_KNOWN] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_BCAST][ML_BCAST_LARGE_DATA_UNKNOWN] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_BCAST][ML_BCAST_LARGE_DATA_UNKNOWN] = COLL_ML_HR_FULL; - - ml_module->collectives_topology_map[ML_ALLGATHER][ML_SMALL_DATA_ALLGATHER] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_ALLGATHER][ML_LARGE_DATA_ALLGATHER] = COLL_ML_HR_FULL; - - ml_module->collectives_topology_map[ML_GATHER][ML_SMALL_DATA_GATHER] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_GATHER][ML_LARGE_DATA_GATHER] = COLL_ML_HR_FULL; - - ml_module->collectives_topology_map[ML_ALLTOALL][ML_SMALL_DATA_ALLTOALL] = COLL_ML_HR_SINGLE_IBOFFLOAD; - ml_module->collectives_topology_map[ML_ALLTOALL][ML_LARGE_DATA_ALLTOALL] = COLL_ML_HR_SINGLE_IBOFFLOAD; - - ml_module->collectives_topology_map[ML_ALLREDUCE][ML_SMALL_DATA_ALLREDUCE] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_ALLREDUCE][ML_LARGE_DATA_ALLREDUCE] = COLL_ML_HR_FULL; - - if (mca_coll_ml_need_multi_topo(BCOL_ALLREDUCE)) { - ml_module->collectives_topology_map[ML_ALLREDUCE][ML_SMALL_DATA_EXTRA_TOPO_ALLREDUCE] = COLL_ML_HR_ALLREDUCE; - ml_module->collectives_topology_map[ML_ALLREDUCE][ML_LARGE_DATA_EXTRA_TOPO_ALLREDUCE] = COLL_ML_HR_ALLREDUCE; - } - - ml_module->collectives_topology_map[ML_REDUCE][ML_SMALL_DATA_REDUCE] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_REDUCE][ML_LARGE_DATA_REDUCE] = COLL_ML_HR_FULL; - - - ml_module->collectives_topology_map[ML_SCATTER][ML_SCATTER_SMALL_DATA_KNOWN] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_SCATTER][ML_SCATTER_N_DATASIZE_BINS] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_SCATTER][ML_SCATTER_SMALL_DATA_UNKNOWN] = COLL_ML_HR_FULL; - ml_module->collectives_topology_map[ML_SCATTER][ML_SCATTER_SMALL_DATA_SEQUENTIAL] = COLL_ML_HR_FULL; -} - -#define GET_CF(I, J) (&mca_coll_ml_component.coll_config[I][J]); - -static void load_cached_config(mca_coll_ml_module_t *ml_module) -{ - int c_idx, m_idx, alg; - per_collective_configuration_t *cf = NULL; - - for (c_idx = 0; c_idx < ML_NUM_OF_FUNCTIONS; c_idx++) { - for (m_idx = 0; m_idx < ML_NUM_MSG; m_idx++) { - cf = GET_CF(c_idx, m_idx); - /* load topology tunings */ - if (ML_UNDEFINED != cf->topology_id && - ML_UNDEFINED != cf->algorithm_id) { - alg = - cf->algorithm_id; - ml_module->collectives_topology_map[c_idx][alg] = - cf->topology_id; - } - } - } -} - -/* Pasha: In future I would suggest to convert this configuration to some sophisticated mca parameter or - even configuration file. On this stage of project I will set it statically and later we will change it - to run time parameter */ -static void setup_topology_coll_map(mca_coll_ml_module_t *ml_module) -{ - /* Load default topology setup */ - setup_default_topology_map(ml_module); - - /* Load configuration file */ - load_cached_config(ml_module); - - ml_check_for_enabled_topologies(ml_module->collectives_topology_map, ml_module->topo_list); -} - -/* query to see if the module is available for use on the given - * communicator, and if so, what it's priority is. This is where - * the backing shared-memory file is created. - */ -mca_coll_base_module_t * -mca_coll_ml_comm_query(struct ompi_communicator_t *comm, int *priority) -{ - /* local variables */ - int ret = OMPI_SUCCESS; - - mca_coll_ml_module_t *ml_module = NULL; - mca_coll_ml_component_t *cs = &mca_coll_ml_component; - bool iboffload_was_requested = mca_coll_ml_check_if_bcol_is_requested("iboffload"); - - ML_VERBOSE(10, ("ML comm query start.")); - - /** - * No support for inter-communicator yet. - */ - if (OMPI_COMM_IS_INTER(comm)) { - *priority = -1; - return NULL; - } - - if (MPI_THREAD_MULTIPLE == ompi_mpi_thread_provided) { - ML_VERBOSE(10, ("coll:ml: MPI_THREAD_MULTIPLE not suppported; skipping this component")); - *priority = -1; - return NULL; - } - - - /* NTH: Disabled this check until we have a better one. */ -#if 0 - if (!ompi_rte_proc_is_bound) { - /* do not enable coll/ml unless this process is bound (for now) */ - *priority = -1; - return NULL; - } -#endif - - /** - * If it is inter-communicator and size is less than 2 we have specialized modules - * to handle the intra collective communications. - */ - if (OMPI_COMM_IS_INTRA(comm) && ompi_comm_size(comm) < 2) { - ML_VERBOSE(10, ("It is inter-communicator and size is less than 2.")); - *priority = -1; - return NULL; - } - - /** - * In current implementation we limit number of supported ML modules in cases when - * iboffload companent was requested - */ - if (iboffload_was_requested) { - ret = check_for_max_supported_ml_modules(comm); - if (OMPI_SUCCESS != ret) { - /* We have nothing to cleanup yet, so just return NULL */ - ML_VERBOSE(10, ("check_for_max_supported_ml_modules returns ERROR, return NULL")); - *priority = -1; - return NULL; - } - } - - ML_VERBOSE(10, ("Create ML module start.")); - - /* allocate and initialize an ml module */ - ml_module = OBJ_NEW(mca_coll_ml_module_t); - if (NULL == ml_module) { - return NULL; - } - - /* Get our priority */ - *priority = cs->ml_priority; - - /** Set initial ML values **/ - ml_module->comm = comm; - /* set the starting sequence number */ - ml_module->collective_sequence_num = cs->base_sequence_number; - ml_module->no_data_collective_sequence_num = cs->base_sequence_number; - /* initialize the size of the largest collective communication description */ - ml_module->max_fn_calls = 0; - -#ifdef NEW_LEADER_SELECTION - coll_ml_construct_resource_graphs(ml_module); -#endif - - /* Set topology - function map */ - setup_topology_coll_map(ml_module); - - /** - * This is the core of the function: - * setup communicator hierarchy - the ml component is available for - * caching information about the sbgp modules selected. - */ - ret = ml_discover_hierarchy(ml_module); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(1, ("ml_discover_hierarchy exited with error.")); - goto CLEANUP; - } - - /* gvm Disabled for debuggin */ - ret = mca_coll_ml_build_filtered_fn_table(ml_module); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(1, ("mca_coll_ml_build_filtered_fn_table returned an error.")); - goto CLEANUP; - } - - /* Generate active bcols list */ - generate_active_bcols_list(ml_module); - - /* setup collective schedules - note that a given bcol may have more than - one module instantiated. We may want to use the same collective cap - capabilities over more than one set of procs. Each module will store - the relevant information for a given set of procs */ - ML_VERBOSE(10, ("Call for setup schedule.")); - ret = ml_coll_schedule_setup(ml_module); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(1, ("ml_coll_schedule_setup exit with error")); - goto CLEANUP; - } - - /* Setup bcast table */ - ML_VERBOSE(10, ("Setup bcast table")); - ret = setup_bcast_table(ml_module); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(1, ("setup_bcast_table exit with error")); - goto CLEANUP; - } - - ML_VERBOSE(10, ("Setup pointer to collectives calls.")); - init_coll_func_pointers(ml_module); - - ML_VERBOSE(10, ("Setup free lists")); - ret = init_lists(ml_module); - if (OMPI_SUCCESS != ret) { - goto CLEANUP; - } - - DEBUG_ML_COMM_QUERY(); - - /* Compute the bruck's buffer constant -- temp buffer requirements */ - { - int comm_size =ompi_comm_size(comm); - int count = 1, log_comm_size = 0; - - /* compute log of comm_size */ - while (count < comm_size) { - count = count << 1; - log_comm_size++; - } - - ml_module->brucks_buffer_threshold_const = - (comm_size / 2 + comm_size % 2) * (log_comm_size) ; - - - ml_module->log_comm_size = log_comm_size; - } - - if (iboffload_was_requested) { - /* HACK: Calling memory sync barrier first time to make sure - * that iboffload create qps for service barrier in right order, - * otherwise we may have deadlock and really nasty data corruptions. - * If you plan to remove this one - please talk to me first. - * Pasha. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Work around for deadlock caused by connection setup - for asyc service barrier. Asyc service barrier use own set of - MQ and QP _BUT_ the exchange operation uses the MQ that is used for - primary set of collectives operations like Allgahter, Barrier,etc. - As result exchange wait operation could be pushed to primary MQ and - cause dead-lock. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Create connection for service barrier and memory address exchange - for ml buffers and asyc service barrier - */ - ret = mca_coll_ml_memsync_intra(ml_module, 0); - if (OMPI_SUCCESS != ret) { - goto CLEANUP; - } - opal_progress(); - } - - /* The module is ready */ - ml_module->initialized = true; - - return &(ml_module->super); - - CLEANUP: - /* Vasily: RLG: Need to cleanup free lists */ - if (NULL != ml_module) { - OBJ_RELEASE(ml_module); - } - - return NULL; -} - -/* copied slightly modified from coll/hcoll */ -#define ML_SAVE_FALLBACK(_coll_ml, _coll) \ - do { \ - _coll_ml->fallback.coll_ ## _coll = comm->c_coll.coll_ ## _coll; \ - _coll_ml->fallback.coll_ ## _coll ## _module = comm->c_coll.coll_ ## _coll ## _module; \ - if (comm->c_coll.coll_ ## _coll && comm->c_coll.coll_ ## _coll ## _module) { \ - OBJ_RETAIN(_coll_ml->fallback.coll_ ## _coll ## _module); \ - } \ - } while(0) - -static void ml_save_fallback_colls (mca_coll_ml_module_t *coll_ml, - struct ompi_communicator_t *comm) -{ - memset (&coll_ml->fallback, 0, sizeof (coll_ml->fallback)); - /* save lower-priority collectives to handle cases not yet handled - * by coll/ml */ - ML_SAVE_FALLBACK(coll_ml, allreduce); - ML_SAVE_FALLBACK(coll_ml, allgather); - ML_SAVE_FALLBACK(coll_ml, reduce); - ML_SAVE_FALLBACK(coll_ml, bcast); - ML_SAVE_FALLBACK(coll_ml, iallreduce); - ML_SAVE_FALLBACK(coll_ml, iallgather); - ML_SAVE_FALLBACK(coll_ml, ireduce); - ML_SAVE_FALLBACK(coll_ml, ibcast); -} - -/* - * Init module on the communicator - */ -static int -ml_module_enable(mca_coll_base_module_t *module, - struct ompi_communicator_t *comm) -{ - /* local variables */ - char output_buffer[2 * MPI_MAX_OBJECT_NAME]; - - ml_save_fallback_colls ((mca_coll_ml_module_t *) module, comm); - - memset(&output_buffer[0], 0, sizeof(output_buffer)); - snprintf(output_buffer, sizeof(output_buffer), "%s (cid %d)", comm->c_name, - comm->c_contextid); - - ML_VERBOSE(10, ("coll:ml:enable: new communicator: %s.", output_buffer)); - - /* All done */ - return OMPI_SUCCESS; -} - -OBJ_CLASS_INSTANCE(mca_coll_ml_module_t, - mca_coll_base_module_t, - mca_coll_ml_module_construct, - mca_coll_ml_module_destruct); - -OBJ_CLASS_INSTANCE(mca_coll_ml_collective_operation_progress_t, - ompi_request_t, - mca_coll_ml_collective_operation_progress_construct, - mca_coll_ml_collective_operation_progress_destruct); diff --git a/ompi/mca/coll/ml/coll_ml_payload_buffers.h b/ompi/mca/coll/ml/coll_ml_payload_buffers.h deleted file mode 100644 index d4ac765342f..00000000000 --- a/ompi/mca/coll/ml/coll_ml_payload_buffers.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_ML_PAYLOAD_BUFFERS_H -#define MCA_ML_PAYLOAD_BUFFERS_H - -#include "ompi/include/ompi/constants.h" -#include "opal/threads/mutex.h" - -struct buffer_t { - /* payload */ - void *payload; - - /* next payload buffer - need this because of wrap around, and - * because we want to allocate several buffers at once, but only - * manipulate one entry - */ - struct buffer_t *next_buffer; -}; -typedef struct buffer_t buffer_t; - -struct ml_buffers_t { - /* fifo size */ - int fifo_size; - - /* write index - next to allocate */ - int head_index; - opal_mutex_t head_lock; - - /* read index - next to free */ - int tail_index; - - /* number available - used to detect full queue */ - int n_segments_available; - - /* mask - assumes that fifo link is a power of 2 */ - int mask; - - /* fifo */ - buffer_t *fifo; -}; - -typedef struct ml_buffers_t ml_buffers_t; - -/* Initialization function */ - -static inline int ml_fifo_init( - int fifo_size, void *memory_chunk, size_t size_of_memory_chunk, - size_t segment_alignment, - size_t segment_size, ml_buffers_t *buffer_fifo) -{ - /* local variable */ - ptrdiff_t allocation_base, memory_chunk_ptr; - size_t memory_to_allocate, allocated_fifo_size, - allocated_segment_size, seg; - - /* make sure fifo size is power of 2, and round up if not - want - * efficient addressing */ - if( 0 >= fifo_size ) { - return OMPI_ERROR; - } - allocated_fifo_size=1; - while ( allocated_fifo_size < (size_t)fifo_size ) { - allocated_fifo_size*=2; - } - - /* set buffer size to match its alignment - round size up */ - allocated_segment_size=segment_size; - if( 0 >= segment_alignment ) { - /* multiples of alignmnet */ - allocated_segment_size=( (allocated_segment_size-1)/segment_alignment)+1; - allocated_segment_size=allocated_segment_size*segment_alignment; - } - - /* adjust base pointer to segment alignment */ - memory_chunk_ptr = (ptrdiff_t )memory_chunk; - allocation_base=( ( memory_chunk_ptr-1)/segment_alignment)+1; - allocation_base=allocated_segment_size*segment_alignment; - - /* check for input consistency */ - memory_to_allocate=size_of_memory_chunk-(allocation_base-memory_chunk_ptr); - if( (allocated_segment_size * allocated_fifo_size) < memory_to_allocate ) { - return OMPI_ERROR; - } - - /* allocate the fifo array */ - buffer_fifo->fifo=(buffer_t *)malloc(sizeof(buffer_t)*allocated_fifo_size); - if( NULL == buffer_fifo->fifo) { - return OMPI_ERROR; - } - - /* Initialize structure */ - for( seg=0 ; seg < allocated_fifo_size ; seg++ ) { - buffer_fifo->fifo[seg].payload= - (void *)(allocation_base+seg*allocated_segment_size); - } - for( seg=0 ; seg < allocated_fifo_size-1 ; seg++ ) { - buffer_fifo->fifo[seg].next_buffer= - &(buffer_fifo->fifo[seg+1]); - } - buffer_fifo->fifo[allocated_fifo_size-1].next_buffer= - &(buffer_fifo->fifo[0]); - - buffer_fifo->head_index=0; - buffer_fifo->tail_index=0; - buffer_fifo->n_segments_available=allocated_fifo_size; - buffer_fifo->fifo_size=allocated_fifo_size; - buffer_fifo->mask=buffer_fifo->fifo_size-1; - OBJ_CONSTRUCT(&(buffer_fifo->head_lock), opal_mutex_t); - - /* return */ - return OMPI_SUCCESS; -} - -/* - * Allocate several buffers. Either all requested buffers are allocated, - * or none are allocated. - */ -static inline buffer_t *ml_fifo_alloc_n_buffers(int n_to_allocate, - ml_buffers_t *buffer_fifo) -{ - /* local variables */ - buffer_t *ret=NULL; - - /* RLG - probably want to try a few times before giving up */ - if(!OPAL_THREAD_TRYLOCK(&(buffer_fifo->head_lock))) { - if( buffer_fifo->n_segments_available >= n_to_allocate ) { - ret=&(buffer_fifo->fifo[buffer_fifo->head_index]); - buffer_fifo->head_index=(buffer_fifo->head_index+n_to_allocate); - /* wrap around */ - buffer_fifo->head_index&=buffer_fifo->mask; - - buffer_fifo->n_segments_available -= n_to_allocate; - } - OPAL_THREAD_UNLOCK(&(buffer_fifo->head_lock)); - } /* end of allocatoin */ - - return ret; -} - -/* return buffers */ -static inline void ml_fifo_return_n_buffers(int n_to_return, - ml_buffers_t *buffer_fifo) -{ - - OPAL_THREAD_LOCK(&(buffer_fifo->head_lock)); - - /* move tail pointer - RLG: Do we really need the tail pointer ? */ - buffer_fifo->tail_index=(buffer_fifo->tail_index+n_to_return); - /* wrap around */ - buffer_fifo->tail_index&=buffer_fifo->mask; - - /* adjust number of available buffers */ - buffer_fifo->n_segments_available += n_to_return; - - OPAL_THREAD_UNLOCK(&(buffer_fifo->head_lock)); - -} - -#endif - diff --git a/ompi/mca/coll/ml/coll_ml_progress.c b/ompi/mca/coll/ml/coll_ml_progress.c deleted file mode 100644 index 9954e348006..00000000000 --- a/ompi/mca/coll/ml/coll_ml_progress.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi/mca/coll/ml/coll_ml.h" - -/* - * This routine is used to progress a series of communication - * primitives. - * - * Assumptions: - * - A message is described by a message descriptor - * - Each message has a setup function associated with it, which is - * algorithm specific. When a fragment is being prepared, this - * progress is used to setup the arguments that will be passed into - * each routine called to complete a given function. The idea here - * is that when the progress routines is called, the full communication - * pattern has already been described in the setup function, with - * progress function being generic. - * - Each fragment is described by a fragment descriptor - * - Each message descriptor has a fragment descriptor permanently - * associated with it. - * - The message will be proressed as long as the individul - * functions complete. When an indivicual funciton does not - * complete, the current state will be saved, for future - * restart. - * - return status - * OMPI_COMPLETE: funciton completed - * OMPI_INCOMPLETE: need to continue progressing the funciton - * any other return value - error condition - */ - -int coll_ml_progress_individual_message(mca_coll_ml_fragment_t *frag_descriptor) -{ - /* local variables */ - int fn_index, ret = OMPI_SUCCESS; - uint32_t n_frags_complete; - int starting_fn_index=frag_descriptor->current_fn_index; - coll_ml_collective_description_t *local_comm_description= - frag_descriptor->full_msg_descriptor->local_comm_description; - - /* loop over functions */ - for( fn_index=starting_fn_index ; fn_index < local_comm_description->n_functions; - fn_index ++ ) { - mca_bcol_base_module_t *bcol_module= - local_comm_description->functions[fn_index].bcol_module; - ret =(bcol_module->bcol_function_table[local_comm_description->functions[fn_index].fn_idx]) - (&(frag_descriptor->fn_args[fn_index]), &local_comm_description->functions[fn_index]); - if( ML_OMPI_COMPLETE != ret ) { - /* since function incomplete, need to decide what to do */ - if( ML_OMPI_INCOMPLETE == ret ) { - /* need to return to this later */ - /* mark where to continue */ - frag_descriptor->current_fn_index=fn_index; - /* RLG - is this really best ? Only advantage is that - * if we exit the loop, we can assume message is - * complete - */ - return OMPI_SUCCESS; - } else { - /* some sort of error condition */ - frag_descriptor->current_fn_index=fn_index; - return ret; - } - } - - } - - /* looks like we are done */ - /* increment counter for number of completed fragments */ - n_frags_complete = OPAL_THREAD_ADD_SIZE_T( - &(frag_descriptor->full_msg_descriptor->frags_complete), 1); - - /* - * release resrouces - */ - - /* fragment resources */ - - /* full message resources */ - if ( n_frags_complete == frag_descriptor->full_msg_descriptor->n_fragments) - { - /* free any fragments that still need to be freed - * NOTE: at this level we do not handle any resrouces - * aside from the pre-registered buffers, all these - * are handled in the bcol level */ - - /* return the buffers to the ml free list */ - - /* mark as complete - so MPI can complete - * the message descriptor will be freed by a call - * to mpi_test/mpi_wait/... as the message descriptor - * also holds the mpi request object */ - - } - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/coll/ml/coll_ml_reduce.c b/ompi/mca/coll/ml/coll_ml_reduce.c deleted file mode 100644 index 53798524368..00000000000 --- a/ompi/mca/coll/ml/coll_ml_reduce.c +++ /dev/null @@ -1,526 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file */ - -#include "ompi_config.h" - -#include "ompi/constants.h" -#include "opal/threads/mutex.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/coll/coll.h" -#include "ompi/mca/bcol/bcol.h" -#include "opal/sys/atomic.h" -#include "ompi/mca/coll/ml/coll_ml.h" -#include "ompi/mca/coll/ml/coll_ml_allocation.h" -#include "ompi/mca/coll/ml/coll_ml_inlines.h" -#define REDUCE_SMALL_MESSAGE_THRESHOLD 2048 - -static int mca_coll_ml_reduce_unpack(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int ret; - /* need to put in more */ - int count = coll_op->variable_fn_params.count; - ompi_datatype_t *dtype = coll_op->variable_fn_params.dtype; - - void *dest = (void *)((uintptr_t)coll_op->full_message.dest_user_addr + - (uintptr_t)coll_op->fragment_data.offset_into_user_buffer); - void *src = (void *)((uintptr_t)coll_op->fragment_data.buffer_desc->data_addr + - (size_t)coll_op->variable_fn_params.rbuf_offset); - - ret = ompi_datatype_copy_content_same_ddt(dtype, (int32_t) count, (char *) dest, - (char *) src); - if (ret < 0) { - return OMPI_ERROR; - } - - if (coll_op->variable_fn_params.root_flag) { - ML_VERBOSE(1,("In reduce unpack %d", - *(int *)((unsigned char*) src))); - } - - ML_VERBOSE(10, ("sbuf addr %p, sbuf offset %d, sbuf val %lf, rbuf addr %p, rbuf offset %d, rbuf val %lf.", - coll_op->variable_fn_params.sbuf, coll_op->variable_fn_params.sbuf_offset, - *(double *) ((unsigned char *) coll_op->variable_fn_params.sbuf + - (size_t) coll_op->variable_fn_params.sbuf_offset), - coll_op->variable_fn_params.rbuf, coll_op->variable_fn_params.rbuf_offset, - *(double *) ((unsigned char *) coll_op->variable_fn_params.rbuf + - (size_t) coll_op->variable_fn_params.rbuf_offset))); - - return OMPI_SUCCESS; -} - - -static int -mca_coll_ml_reduce_task_setup (mca_coll_ml_collective_operation_progress_t *coll_op) -{ - int fn_idx, h_level, next_h_level, my_index; - mca_sbgp_base_module_t *sbgp; - mca_coll_ml_topology_t *topo = coll_op->coll_schedule->topo_info; - - fn_idx = coll_op->sequential_routine.current_active_bcol_fn; - h_level = coll_op->coll_schedule->component_functions[fn_idx].h_level; - next_h_level = (fn_idx < coll_op->coll_schedule->n_fns - 1) ? - coll_op->coll_schedule->component_functions[fn_idx+1].h_level : -1; - sbgp = topo->component_pairs[h_level].subgroup_module; - my_index = sbgp->my_index; - - if (coll_op->variable_fn_params.root_flag) { - ML_VERBOSE(1,("In task completion Data in receiver buffer %d ", - *(int *)((unsigned char*) coll_op->variable_fn_params.rbuf + - coll_op->variable_fn_params.rbuf_offset))); - } - - /* determine the root for this level of the hierarchy */ - if (coll_op->coll_schedule->topo_info->route_vector[coll_op->global_root].level == next_h_level || - coll_op->global_root == sbgp->group_list[my_index]) { - /* I am the global root or I will be talking to the global root in the next round. */ - coll_op->variable_fn_params.root = my_index; - } else if (coll_op->coll_schedule->topo_info->route_vector[coll_op->global_root].level == h_level) { - /* the root is in this level of my hierarchy */ - coll_op->variable_fn_params.root = coll_op->coll_schedule->topo_info->route_vector[coll_op->global_root].rank; - } else { - coll_op->variable_fn_params.root = 0; - } - - /* Set the route vector for this root */ - coll_op->variable_fn_params.root_route = - &coll_op->coll_schedule->topo_info->route_vector[sbgp->group_list[coll_op->variable_fn_params.root]]; - - /* Am I the root of this hierarchy? */ - coll_op->variable_fn_params.root_flag = (my_index == coll_op->variable_fn_params.root); - - /* For hierarchy switch btw source and destination buffer - * No need to make this switch for the first call .. - * */ - if (0 < fn_idx) { - int tmp_offset = coll_op->variable_fn_params.sbuf_offset; - coll_op->variable_fn_params.sbuf_offset = - coll_op->variable_fn_params.rbuf_offset; - coll_op->variable_fn_params.rbuf_offset = tmp_offset; - } - - return OMPI_SUCCESS; -} - -static int mca_coll_ml_reduce_frag_progress(mca_coll_ml_collective_operation_progress_t *coll_op) -{ - /* local variables */ - void *buf; - - size_t dt_size; - int ret, frag_len, count; - - ptrdiff_t lb, extent; - - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc; - mca_coll_ml_collective_operation_progress_t *new_op; - - mca_coll_ml_module_t *ml_module = OP_ML_MODULE(coll_op); - - ret = ompi_datatype_get_extent(coll_op->variable_fn_params.dtype, &lb, &extent); - if (ret < 0) { - return OMPI_ERROR; - } - - dt_size = (size_t) extent; - - /* Keep the pipeline filled with fragments */ - while (coll_op->fragment_data.message_descriptor->n_active < - coll_op->fragment_data.message_descriptor->pipeline_depth) { - /* If an active fragment happens to have completed the collective during - * a hop into the progress engine, then don't launch a new fragment, - * instead break and return. - */ - if (coll_op->fragment_data.message_descriptor->n_bytes_scheduled - == coll_op->fragment_data.message_descriptor->n_bytes_total) { - break; - } - - /* Get an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(OP_ML_MODULE(coll_op)); - if (NULL == src_buffer_desc) { - /* If there exist outstanding fragments, then break out - * and let an active fragment deal with this later, - * there are no buffers available. - */ - if (0 < coll_op->fragment_data.message_descriptor->n_active) { - return OMPI_SUCCESS; - } else { - /* It is useless to call progress from here, since - * ml progress can't be executed as result ml memsync - * call will not be completed and no memory will be - * recycled. So we put the element on the list, and we will - * progress it later when memsync will recycle some memory*/ - - /* The fragment is already on list and - * the we still have no ml resources - * Return busy */ - if (coll_op->pending & REQ_OUT_OF_MEMORY) { - ML_VERBOSE(10,("Out of resources %p", coll_op)); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - - coll_op->pending |= REQ_OUT_OF_MEMORY; - opal_list_append(&((OP_ML_MODULE(coll_op))->waiting_for_memory_list), - (opal_list_item_t *)coll_op); - ML_VERBOSE(10,("Out of resources %p adding to pending queue", coll_op)); - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - } - } - - /* Get a new collective descriptor and initialize it */ - new_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_reduce_functions[ML_SMALL_DATA_REDUCE], - coll_op->fragment_data.message_descriptor->src_user_addr, - coll_op->fragment_data.message_descriptor->dest_user_addr, - coll_op->fragment_data.message_descriptor->n_bytes_total, - coll_op->fragment_data.message_descriptor->n_bytes_scheduled); - - ML_VERBOSE(1,(" In Reduce fragment progress %d %d ", - coll_op->fragment_data.message_descriptor->n_bytes_total, - coll_op->fragment_data.message_descriptor->n_bytes_scheduled)); - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(new_op, - src_buffer_desc->buffer_index, src_buffer_desc); - - new_op->fragment_data.current_coll_op = coll_op->fragment_data.current_coll_op; - new_op->fragment_data.message_descriptor = coll_op->fragment_data.message_descriptor; - - /* set the task setup callback */ - new_op->sequential_routine.seq_task_setup = mca_coll_ml_reduce_task_setup; - /* We need this address for pointer arithmetic in memcpy */ - buf = (void*)coll_op->fragment_data.message_descriptor->src_user_addr; - /* calculate the number of data types in this packet */ - count = (coll_op->fragment_data.message_descriptor->n_bytes_total - - coll_op->fragment_data.message_descriptor->n_bytes_scheduled < - ((size_t) OP_ML_MODULE(coll_op)->small_message_thresholds[BCOL_REDUCE]/4 )? - (coll_op->fragment_data.message_descriptor->n_bytes_total - - coll_op->fragment_data.message_descriptor->n_bytes_scheduled) / dt_size : - (size_t) coll_op->variable_fn_params.count); - - /* calculate the fragment length */ - frag_len = count * dt_size; - - ret = ompi_datatype_copy_content_same_ddt(coll_op->variable_fn_params.dtype, count, - (char *) src_buffer_desc->data_addr, (char *) ((uintptr_t) buf + (uintptr_t) - coll_op->fragment_data.message_descriptor->n_bytes_scheduled)); - if (ret < 0) { - return OMPI_ERROR; - } - - /* if root unpack the data */ - if (ompi_comm_rank(ml_module->comm) == coll_op->global_root ) { - new_op->process_fn = mca_coll_ml_reduce_unpack; - new_op->variable_fn_params.root_flag = true; - } else { - new_op->process_fn = NULL; - new_op->variable_fn_params.root_flag = false; - } - - new_op->variable_fn_params.root_route = coll_op->variable_fn_params.root_route; - - /* Setup fragment specific data */ - new_op->fragment_data.message_descriptor->n_bytes_scheduled += frag_len; - new_op->fragment_data.buffer_desc = src_buffer_desc; - new_op->fragment_data.fragment_size = frag_len; - (new_op->fragment_data.message_descriptor->n_active)++; - - /* Set in Reduce Buffer arguments */ - ML_SET_VARIABLE_PARAMS_BCAST(new_op, OP_ML_MODULE(new_op), count, - coll_op->variable_fn_params.dtype, src_buffer_desc, - 0, (ml_module->payload_block->size_buffer - - ml_module->data_offset)/2, frag_len, - src_buffer_desc->data_addr); - - new_op->variable_fn_params.buffer_size = frag_len; - new_op->variable_fn_params.sbuf = src_buffer_desc->data_addr; - new_op->variable_fn_params.rbuf = src_buffer_desc->data_addr; - new_op->variable_fn_params.root = coll_op->variable_fn_params.root; - new_op->global_root = coll_op->global_root; - new_op->variable_fn_params.op = coll_op->variable_fn_params.op; - new_op->variable_fn_params.hier_factor = coll_op->variable_fn_params.hier_factor; - new_op->sequential_routine.current_bcol_status = SEQ_TASK_PENDING; - MCA_COLL_ML_SET_NEW_FRAG_ORDER_INFO(new_op); - - ML_VERBOSE(10,("FFFF Contig + fragmentation [0-sk, 1-lk, 3-su, 4-lu] %d %d %d", - new_op->variable_fn_params.buffer_size, - new_op->fragment_data.fragment_size, - new_op->fragment_data.message_descriptor->n_bytes_scheduled)); - /* initialize first coll */ - new_op->sequential_routine.seq_task_setup(new_op); - - /* append this collective !! */ - OPAL_THREAD_LOCK(&(mca_coll_ml_component.sequential_collectives_mutex)); - opal_list_append(&mca_coll_ml_component.sequential_collectives, - (opal_list_item_t *)new_op); - OPAL_THREAD_UNLOCK(&(mca_coll_ml_component.sequential_collectives_mutex)); - - } - - return OMPI_SUCCESS; -} - -static inline __opal_attribute_always_inline__ -int parallel_reduce_start (void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - int root, - struct ompi_communicator_t *comm, - mca_coll_ml_module_t *ml_module, - ompi_request_t **req, - int small_data_reduce, - int large_data_reduce) { - ptrdiff_t lb, extent; - size_t pack_len, dt_size; - mca_bcol_base_payload_buffer_desc_t *src_buffer_desc = NULL; - mca_coll_ml_collective_operation_progress_t * coll_op = NULL; - bool contiguous = ompi_datatype_is_contiguous_memory_layout(dtype, count); - mca_coll_ml_component_t *cm = &mca_coll_ml_component; - int ret, n_fragments = 1, frag_len, - pipeline_depth, n_dts_per_frag, rank; - - if (MPI_IN_PLACE == sbuf) { - sbuf = rbuf; - } - - ret = ompi_datatype_get_extent(dtype, &lb, &extent); - if (ret < 0) { - return OMPI_ERROR; - } - - rank = ompi_comm_rank (comm); - - dt_size = (size_t) extent; - pack_len = count * dt_size; - - /* We use a separate recieve and send buffer so only half the buffer is usable. */ - if (pack_len < (size_t) ml_module->small_message_thresholds[BCOL_REDUCE] / 4) { - /* The len of the message can not be larger than ML buffer size */ - assert(pack_len <= ml_module->payload_block->size_buffer); - - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - - ML_VERBOSE(10,("Using small data reduce (threshold = %d)", - REDUCE_SMALL_MESSAGE_THRESHOLD)); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_reduce_functions[small_data_reduce], - sbuf, rbuf, pack_len, 0); - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, - src_buffer_desc->buffer_index, src_buffer_desc); - - coll_op->variable_fn_params.rbuf = src_buffer_desc->data_addr; - coll_op->variable_fn_params.sbuf = src_buffer_desc->data_addr; - coll_op->variable_fn_params.buffer_index = src_buffer_desc->buffer_index; - coll_op->variable_fn_params.src_desc = src_buffer_desc; - coll_op->variable_fn_params.count = count; - - ret = ompi_datatype_copy_content_same_ddt(dtype, count, - (void *) (uintptr_t) src_buffer_desc->data_addr, (char *) sbuf); - if (ret < 0){ - return OMPI_ERROR; - } - - } else if (cm->enable_fragmentation || !contiguous) { - ML_VERBOSE(1,("Using Fragmented Reduce ")); - - /* fragment the data */ - /* check for retarded application programming decisions */ - if (dt_size > (size_t) ml_module->small_message_thresholds[BCOL_REDUCE] / 4) { - ML_ERROR(("Sorry, but we don't support datatypes that large")); - return OMPI_ERROR; - } - - /* calculate the number of data types that can fit per ml-buffer */ - n_dts_per_frag = ml_module->small_message_thresholds[BCOL_REDUCE] / (4 * dt_size); - - /* calculate the number of fragments */ - n_fragments = (count + n_dts_per_frag - 1) / n_dts_per_frag; /* round up */ - - /* calculate the actual pipeline depth */ - pipeline_depth = n_fragments < cm->pipeline_depth ? n_fragments : cm->pipeline_depth; - - /* calculate the fragment size */ - frag_len = n_dts_per_frag * dt_size; - - /* allocate an ml buffer */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_reduce_functions[small_data_reduce], - sbuf,rbuf, - pack_len, - 0 /* offset for first pack */); - - MCA_COLL_IBOFFLOAD_SET_ML_BUFFER_INFO(coll_op, - src_buffer_desc->buffer_index, src_buffer_desc); - - - coll_op->variable_fn_params.sbuf = (void *) src_buffer_desc->data_addr; - coll_op->variable_fn_params.rbuf = (void *) src_buffer_desc->data_addr; - - coll_op->fragment_data.message_descriptor->n_active = 1; - coll_op->full_message.n_bytes_scheduled = frag_len; - coll_op->full_message.fragment_launcher = mca_coll_ml_reduce_frag_progress; - coll_op->full_message.pipeline_depth = pipeline_depth; - coll_op->fragment_data.current_coll_op = small_data_reduce; - coll_op->fragment_data.fragment_size = frag_len; - - coll_op->variable_fn_params.count = n_dts_per_frag; /* seems fishy */ - coll_op->variable_fn_params.buffer_size = frag_len; - coll_op->variable_fn_params.src_desc = src_buffer_desc; - /* copy into the ml-buffer */ - ret = ompi_datatype_copy_content_same_ddt(dtype, n_dts_per_frag, - (char *) src_buffer_desc->data_addr, (char *) sbuf); - if (ret < 0) { - return OMPI_ERROR; - } - } else { - ML_VERBOSE(1,("Using zero-copy ptp reduce")); - coll_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module, - ml_module->coll_ml_reduce_functions[large_data_reduce], - sbuf, rbuf, pack_len, 0); - - coll_op->variable_fn_params.userbuf = - coll_op->variable_fn_params.sbuf = sbuf; - - coll_op->variable_fn_params.rbuf = rbuf; - - /* The ML buffer is used for testing. Later, when we - * switch to use knem/mmap/portals this should be replaced - * appropriately - */ - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - while (NULL == src_buffer_desc) { - opal_progress(); - src_buffer_desc = mca_coll_ml_alloc_buffer(ml_module); - } - - coll_op->variable_fn_params.buffer_index = src_buffer_desc->buffer_index; - coll_op->variable_fn_params.src_desc = src_buffer_desc; - coll_op->variable_fn_params.count = count; - } - - coll_op->process_fn = (rank != root) ? NULL : mca_coll_ml_reduce_unpack; - - /* Set common parts */ - coll_op->fragment_data.buffer_desc = src_buffer_desc; - coll_op->variable_fn_params.dtype = dtype; - coll_op->variable_fn_params.op = op; - - /* NTH: the root, root route, and root flag are set in the task setup */ - - /* Fill in the function arguments */ - coll_op->variable_fn_params.sbuf_offset = 0; - coll_op->variable_fn_params.rbuf_offset = (ml_module->payload_block->size_buffer - - ml_module->data_offset)/2; - - /* Keep track of the global root of this operation */ - coll_op->global_root = root; - - coll_op->variable_fn_params.sequence_num = - OPAL_THREAD_ADD32(&(ml_module->collective_sequence_num), 1); - coll_op->sequential_routine.current_active_bcol_fn = 0; - /* set the task setup callback */ - coll_op->sequential_routine.seq_task_setup = mca_coll_ml_reduce_task_setup; - - /* Reduce requires the schedule to be fixed. If we use other (changing) schedule, - the operation might result in different result. */ - coll_op->coll_schedule->component_functions = coll_op->coll_schedule-> - comp_fn_arr[coll_op->coll_schedule->topo_info->route_vector[root].level]; - - /* Launch the collective */ - ret = mca_coll_ml_launch_sequential_collective (coll_op); - if (OMPI_SUCCESS != ret) { - ML_VERBOSE(10, ("Failed to launch reduce collective")); - return ret; - } - - *req = &coll_op->full_message.super; - - return OMPI_SUCCESS; -} - - -int mca_coll_ml_reduce(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - int root, struct ompi_communicator_t *comm, - mca_coll_base_module_t *module) { - - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t*)module; - int ret = OMPI_SUCCESS; - ompi_request_t *req; - - if (OPAL_UNLIKELY(!ompi_op_is_commute(op) || !opal_datatype_is_contiguous_memory_layout(&dtype->super, count))) { - /* coll/ml does not handle non-communative operations at this time. fallback - * on another collective module */ - return ml_module->fallback.coll_reduce (sbuf, rbuf, count, dtype, op, root, comm, - ml_module->fallback.coll_reduce_module); - } - - ML_VERBOSE(10,("Calling Ml Reduce ")); - ret = parallel_reduce_start(sbuf, rbuf, count, dtype, op, - root, comm, (mca_coll_ml_module_t *)module, - &req, ML_SMALL_DATA_REDUCE, - ML_LARGE_DATA_REDUCE); - if (OPAL_UNLIKELY(ret != OMPI_SUCCESS)) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - - /* Blocking reduce */ - ret = ompi_request_wait(&req, MPI_STATUS_IGNORE); - - ML_VERBOSE(10, ("Blocking Reduce is done")); - - return ret; -} - - -int mca_coll_ml_reduce_nb(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, struct ompi_op_t *op, - int root, struct ompi_communicator_t *comm, - ompi_request_t **req, - mca_coll_base_module_t *module) { - - int ret = OMPI_SUCCESS; - mca_coll_ml_module_t *ml_module = (mca_coll_ml_module_t*)module; - - if (OPAL_UNLIKELY(!ompi_op_is_commute(op) || !opal_datatype_is_contiguous_memory_layout(&dtype->super, count))) { - /* coll/ml does not handle non-communative operations at this time. fallback - * on another collective module */ - return ml_module->fallback.coll_ireduce (sbuf, rbuf, count, dtype, op, root, comm, req, - ml_module->fallback.coll_ireduce_module); - } - - ML_VERBOSE(10,("Calling Ml Reduce ")); - ret = parallel_reduce_start(sbuf, rbuf, count, dtype, op, - root, comm, ml_module, - req, ML_SMALL_DATA_REDUCE, - ML_LARGE_DATA_REDUCE); - if (OPAL_UNLIKELY(ret != OMPI_SUCCESS)) { - ML_VERBOSE(10, ("Failed to launch")); - return ret; - } - - - ML_VERBOSE(10, ("Non-blocking Reduce is done")); - - return OMPI_SUCCESS; - -} diff --git a/ompi/mca/coll/ml/coll_ml_resource_affinity.c b/ompi/mca/coll/ml/coll_ml_resource_affinity.c deleted file mode 100644 index 23d9a0fc71e..00000000000 --- a/ompi/mca/coll/ml/coll_ml_resource_affinity.c +++ /dev/null @@ -1,147 +0,0 @@ -#include "opal/mca/carto/carto.h" -#include "opal/mca/carto/base/base.h" -#include "opal/util/output.h" -#include "opal/class/opal_graph.h" -#include "opal/mca/paffinity/base/base.h" -#include "ompi/constants.h" - -#include "orte/mca/ess/ess.h" -#include "coll_ml_resource_affinity.h" - -int get_dev_distance_for_all_procs(opal_carto_graph_t *graph, const char *device) -{ - opal_paffinity_base_cpu_set_t cpus; - opal_carto_base_node_t *device_node; - int min_distance = -1, i, num_processors; - - if(opal_paffinity_base_get_processor_info(&num_processors) != OMPI_SUCCESS) { - num_processors = 100; /* Choose something big enough */ - } - - device_node = opal_carto_base_find_node(graph, device); - - /* no topology info for device found. Assume that it is close */ - if(NULL == device_node) - return 0; - - OPAL_PAFFINITY_CPU_ZERO(cpus); - opal_paffinity_base_get(&cpus); - - for (i = 0; i < num_processors; i++) { - opal_carto_base_node_t *slot_node; - int distance, socket, core; - char *slot; - - if(!OPAL_PAFFINITY_CPU_ISSET(i, cpus)) - continue; - - opal_paffinity_base_get_map_to_socket_core(i, &socket, &core); - asprintf(&slot, "socket%d", socket); - - slot_node = opal_carto_base_find_node(graph, slot); - - free(slot); - - if(NULL == slot_node) - return 0; - - distance = opal_carto_base_spf(graph, slot_node, device_node); - - if(distance < 0) - return 0; - - if(min_distance < 0 || min_distance > distance) - min_distance = distance; - } - - return min_distance; -} - -int get_dev_distance_proc(opal_carto_graph_t *graph, - const char *device,int rank, struct ompi_proc_t *proc){ - opal_paffinity_base_cpu_set_t cpus; - opal_carto_base_node_t *device_node; - opal_carto_base_node_t *slot_node; - int distance, socket, core; - char *slot; - int process_id; - int nrank; - - nrank = orte_ess.get_node_rank(&(proc->proc_name)); - - opal_paffinity_base_get_physical_processor_id(nrank, &process_id); - - device_node = opal_carto_base_find_node(graph, device); - - /* no topology info for device found. Assume that it is close */ - if(NULL == device_node) - return 0; - - OPAL_PAFFINITY_CPU_ZERO(cpus); - opal_paffinity_base_get(&cpus); - - - - opal_paffinity_base_get_map_to_socket_core(process_id, &socket, &core); - asprintf(&slot, "socket%d", socket); - ML_VERBOSE(10,("The socket addres is %d",socket)); - - slot_node = opal_carto_base_find_node(graph, slot); - - free(slot); - - if(NULL == slot_node) - return -1; - - distance = opal_carto_base_spf(graph, slot_node, device_node); - - if(distance < 0) - return -1; - - return distance; - -} - -int coll_ml_select_leader(mca_coll_ml_module_t *ml_module, - mca_sbgp_base_module_t *sbgp_module, - int *rank_in_comm, - struct ompi_proc_t ** procs, - int nprocs){ - - int rank, dist1, dist2,dist; - int min_dist = 10000; - int i,leader = 10000; - struct ompi_proc_t *proc = NULL; - - for (i=0; igroup_list[i]]; - proc = procs[sbgp_module->group_list[i]]; - dist1 = get_dev_distance_proc(ml_module->sm_graph,"mem0",rank,proc); - dist2 = get_dev_distance_proc(ml_module->ib_graph,"mthca0",rank,proc); - - dist = dist1 + dist2; - - ML_VERBOSE(10,("The distance for proc %d dist1 %d, dist2 %d",i,dist1,dist2)); - if ((dist < min_dist) || ((dist == min_dist) && (i < leader))) { - leader = i; - min_dist = dist; - } - } - - return leader; -} - - -int coll_ml_construct_resource_graphs(mca_coll_ml_module_t *ml_module){ - - opal_carto_base_get_host_graph(&ml_module->sm_graph,"Memory"); - opal_carto_base_get_host_graph(&ml_module->ib_graph,"Infiniband"); - - /* debug - opal_graph_print(ml_module->sm_graph); - */ - return 0; - -} diff --git a/ompi/mca/coll/ml/coll_ml_resource_affinity.h b/ompi/mca/coll/ml/coll_ml_resource_affinity.h deleted file mode 100644 index c64c214ee00..00000000000 --- a/ompi/mca/coll/ml/coll_ml_resource_affinity.h +++ /dev/null @@ -1,19 +0,0 @@ -#include "opal/mca/carto/carto.h" -#include "opal/mca/carto/base/base.h" -#include "opal/util/output.h" -#include "opal/class/opal_graph.h" -#include "coll_ml.h" - - -/* Get the host graph for SM and Infiniband */ -int discover_on_node_resources(const char device); -int get_dev_distance_for_all_procs(opal_carto_graph_t *graph, - const char *device); -int get_dev_distance_proc(opal_carto_graph_t *graph, - const char *device,int rank,struct ompi_proc_t *proc); -int coll_ml_select_leader(mca_coll_ml_module_t *ml_module, - mca_sbgp_base_module_t *sbgp_module, - int *rank_in_comm, - struct ompi_proc_t ** procs, - int nprocs); -int coll_ml_construct_resource_graphs(mca_coll_ml_module_t *ml_module); diff --git a/ompi/mca/coll/ml/coll_ml_select.c b/ompi/mca/coll/ml/coll_ml_select.c deleted file mode 100644 index 429ca5d4d94..00000000000 --- a/ompi/mca/coll/ml/coll_ml_select.c +++ /dev/null @@ -1,359 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2013 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/* - * Code for selecting a collective function. The selection is based on - * comm-time attributes and invoke-time attributes. - * - * comm-time attributes: Attributes, which can used to filter available - * collective functions at communicator init time. Example attributes include - * comm size and msg size supported by bcols. - * - * invoke-time attributes: Attributes, which can be used to select function - * for given collective when a collective is invoked. - * - */ - -#include "coll_ml_select.h" - -static int msg_to_range(size_t msg_len) -{ - int range; - - if (msg_len < MSG_RANGE_INITIAL) { - return 1; - } - - range = (int) log10((double)((msg_len / MSG_RANGE_INITIAL))); - - if (range > NUM_MSG_RANGES) - return NUM_MSG_RANGES; - - return range; -} - -static int cmp_comm_attribs(struct mca_bcol_base_coll_fn_comm_attributes_t *attrib_var, - struct mca_bcol_base_coll_fn_comm_attributes_t *attrib_bcol){ - - - if (!(attrib_var->comm_size_max <= attrib_bcol->comm_size_max)) { - return -1 ; - } - -#if 0 /* Manju: pelase fix it*/ - if (attrib_var->data_src != attrib_bcol->data_src) { - return -1; - } - - if (attrib_var->waiting_semantics != - attrib_bcol->waiting_semantics) { - return -1; - } -#endif - - return 0; -} - -/* - * Table that holds function names - */ -static int init_invoke_table(mca_coll_ml_module_t *ml_module) -{ - int i=0,j=0,k=0, index_topo; - int bcoll_type; - struct mca_bcol_base_module_t *bcol_module = NULL; - int j_bcol_module=0; - int i_hier=0; - mca_coll_ml_topology_t *topo; - - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &ml_module->topo_list[index_topo]; - if (COLL_ML_TOPO_DISABLED == topo->status) { - /* skip the topology */ - continue; - } - for (i_hier = 0; i_hier < topo->n_levels; i_hier++) { - - for (j_bcol_module = 0; - j_bcol_module < topo->component_pairs[i_hier].num_bcol_modules; - ++j_bcol_module) { - - bcol_module = topo->component_pairs[i_hier].bcol_modules[j_bcol_module]; - - for (bcoll_type = 0; bcoll_type < BCOL_NUM_OF_FUNCTIONS ; bcoll_type++){ - for (i=0; ifiltered_fns_table[DATA_SRC_UNKNOWN][BLOCKING][bcoll_type][i][j][k] - = NULL; - - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][BLOCKING][bcoll_type][i][j][k] - = NULL; - - bcol_module->filtered_fns_table[DATA_SRC_UNKNOWN][NON_BLOCKING][bcoll_type][i][j][k] - = NULL; - - bcol_module->filtered_fns_table[DATA_SRC_KNOWN][NON_BLOCKING][bcoll_type][i][j][k] - = NULL; - - } - } - } - } - } - - } - } - - return 0; -} - -static int add_to_invoke_table(mca_bcol_base_module_t *bcol_module, - mca_bcol_base_coll_fn_desc_t *fn_filtered, - mca_coll_ml_module_t *ml_module) -{ - struct mca_bcol_base_coll_fn_invoke_attributes_t *inv_attribs = NULL; - int bcoll_type, data_src_type, waiting_semantic; - int range_min,range_max; - int i=0,j=0,k=0,mask=1; - - - - if((NULL == fn_filtered->inv_attr)||(NULL == fn_filtered->comm_attr)) { - return OMPI_ERROR; - } - - ML_VERBOSE(10, ("Calling add_to_invoke_table %p",fn_filtered->coll_fn)); - - inv_attribs = fn_filtered->inv_attr; - bcoll_type = fn_filtered->comm_attr->bcoll_type; - data_src_type = fn_filtered->comm_attr->data_src; - waiting_semantic = fn_filtered->comm_attr->waiting_semantics; - - range_min = msg_to_range(inv_attribs->bcol_msg_min); - range_max = msg_to_range(inv_attribs->bcol_msg_max); - - for (j=0; jdatatype_bitmap & (mask << k)) && (inv_attribs->op_types_bitmap & (mask << j))){ - - for (i=range_min; i<=range_max; i++) { - bcol_module->filtered_fns_table[data_src_type][waiting_semantic][bcoll_type][i][j][k] - = fn_filtered; - ML_VERBOSE(21, ("Putting functions %d %d %d %d %p", bcoll_type, i, j, k, fn_filtered)); - } - } - } - } - - return 0; - -} - -/* - * Maps count to msg range that is used for - * function table - * RANGE 0 is for small messages (say small msg =10k) - * MSG RANGE 1 - 10K - 100K - * RANGE 2 - 100K -1M - * RANGE 3 - 1M - 10M - * - * This is valid only when MSG_RANGE_INC is 10. - * For other values the function should replace log10 to log with - * base=MSG_RANGE_INC - */ -static int count_to_msg_range(int count,struct ompi_datatype_t *dtype) -{ - size_t msg_len =0,dt_size; - int range = 0 ; - - ompi_datatype_type_size(dtype, &dt_size); - msg_len = count*dt_size; - - if (msg_len < MSG_RANGE_INITIAL) { - return 1; - } - - range = (int) log10((double)((msg_len/MSG_RANGE_INITIAL))); - - if (range > NUM_MSG_RANGES) - return NUM_MSG_RANGES; - - return range; - -} - -/* Based on the attributes filled in comm_select_attributes - select functions for invoke time filtering */ - - -static int build_algorithms_table(mca_coll_ml_module_t *ml_module,struct - mca_bcol_base_coll_fn_comm_attributes_t *my_comm_attrib) -{ - int i_hier, j_bcol_module, k_bcol_fn, index_topo; - struct mca_bcol_base_module_t *bcol_module = NULL; - opal_list_t *fn_filtered_list; - opal_list_item_t *item; - mca_coll_ml_topology_t *topo; - - /* - * Go through each hierarchy and for each - * bcol module in the hierarchy, select the alogrithms. - */ - for (index_topo = 0; index_topo < COLL_ML_TOPO_MAX; index_topo++) { - topo = &ml_module->topo_list[index_topo]; - for (i_hier = 0; i_hier < topo->n_levels; i_hier++) { - my_comm_attrib->comm_size_max = - topo->component_pairs[i_hier].subgroup_module->group_size; - - for (j_bcol_module = 0; - j_bcol_module < topo->component_pairs[i_hier].num_bcol_modules; - ++j_bcol_module) { - - bcol_module = topo->component_pairs[i_hier].bcol_modules[j_bcol_module]; - - /* Go through all bcols and available bcol functions */ - for (k_bcol_fn = 0; k_bcol_fn < BCOL_NUM_OF_FUNCTIONS; k_bcol_fn++) { - struct mca_bcol_base_coll_fn_desc_t *fn_filtered = NULL; - - /* Query the function attributes */ - fn_filtered_list = - &(bcol_module->bcol_fns_table[k_bcol_fn]); - - - if (0 == opal_list_get_size(fn_filtered_list)) { - continue; - } - /* All definitions of a collective type is stored in the list - * Each item in the list is checked for compatability in the - * attributes and stored in the filtered list */ - for (item = opal_list_get_first(fn_filtered_list); - item != opal_list_get_end(fn_filtered_list); - item = opal_list_get_next(item)){ - - fn_filtered = (struct mca_bcol_base_coll_fn_desc_t *)item; - if (cmp_comm_attribs(my_comm_attrib, fn_filtered->comm_attr) < 0) { - /* Criteria not satisfied continue to next bcol function */ - continue; - } - - /* - * Add bcol function to be available for invoke time selection - */ - add_to_invoke_table(bcol_module, fn_filtered, ml_module); - } - - } - } - } - } - - return 0; - -} - -int mca_coll_ml_build_filtered_fn_table(mca_coll_ml_module_t *ml_module) -{ - - struct mca_bcol_base_coll_fn_comm_attributes_t *my_comm_attrib = NULL; - - - /* Init table storing all filtered functions */ - init_invoke_table(ml_module); - - my_comm_attrib = malloc(sizeof(struct mca_bcol_base_coll_fn_comm_attributes_t)); - - if (!my_comm_attrib) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - my_comm_attrib->comm_size_min = 0; - - /* - * This values should be passed using (maybe) mca parameters - */ -#if 0 /* Manju: pelase fix it*/ - my_comm_attrib->data_src = DATA_SRC_KNOWN; - my_comm_attrib->waiting_semantics = BLOCKING; -#endif - - if (build_algorithms_table(ml_module,my_comm_attrib)) { - return OMPI_ERROR; - } - - free(my_comm_attrib); - - return OMPI_SUCCESS; - -} - -#if 0 -static struct mca_bcol_base_coll_fn_invoke_attributes_t *mca_construct_invoke_attributes( - struct ompi_datatype_t *dtype, int count, - struct ompi_op_t op_type) -{ - size_t dt_size, msg_size; - struct mca_bcol_base_coll_fn_invoke_attributes_t *inv_attribs = NULL; - - ompi_datatype_type_size(dtype, &dt_size); - msg_size = count*dt_size; - - - inv_attribs = malloc(sizeof(struct mca_bcol_base_coll_fn_invoke_attributes_t)); - - /* Fix : We might need to have range for msg size - For now selection will - * be based on maximum value - */ - inv_attribs->bcol_msg_min = 0; - inv_attribs->bcol_msg_max = msg_size; - - return inv_attribs; -} -#endif - -int mca_select_bcol_function(mca_bcol_base_module_t *bcol_module, - int bcoll_type, - bcol_function_args_t *bcol_fn_arguments, - mca_bcol_base_function_t *ml_fn_arguments ) -{ - - struct mca_bcol_base_coll_fn_desc_t *fn_filtered = NULL; - int msg_range=0; - int ret; - int data_src_type = DATA_SRC_KNOWN, waiting_type = BLOCKING; - - msg_range = - count_to_msg_range(bcol_fn_arguments->count, - bcol_fn_arguments->dtype); - if ((BCOL_ALLREDUCE == bcoll_type) || (BCOL_REDUCE == bcoll_type)) { - /* needs to be resolved, the op structure has changed, there is no field called "op_type" */ - fn_filtered = - bcol_module->filtered_fns_table[data_src_type][waiting_type][bcoll_type][msg_range][bcol_fn_arguments->dtype->id][bcol_fn_arguments->op->op_type]; - } - else { - fn_filtered = - bcol_module->filtered_fns_table[data_src_type][waiting_type][bcoll_type][msg_range][bcol_fn_arguments->dtype->id][0]; - - } - - if (NULL == fn_filtered) { - return OMPI_ERROR; - } - - ret = (fn_filtered->coll_fn)(bcol_fn_arguments,ml_fn_arguments); - return ret; -} - diff --git a/ompi/mca/coll/ml/coll_ml_select.h b/ompi/mca/coll/ml/coll_ml_select.h deleted file mode 100644 index 3c7fa40a07c..00000000000 --- a/ompi/mca/coll/ml/coll_ml_select.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef MCA_COLL_ML_SELECT_H -#define MCA_COLL_ML_SELECT_H - - -#include "ompi_config.h" - -#include -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/op/op.h" -#include "ompi/mca/bcol/bcol.h" -#include "coll_ml.h" -#include "coll_ml_inlines.h" - - - -/* Forward declaration */ -struct mca_coll_ml_module_t; - -int mca_select_bcol_function(mca_bcol_base_module_t *bcol_module, - int bcoll_type, - bcol_function_args_t *bcol_fn_arguments, - mca_bcol_base_function_t *ml_fn_arguments ); -/* - * Goes through the function table and filters the collectives functions - * based on comm-time attributes. - */ -int mca_coll_ml_build_filtered_fn_table(struct mca_coll_ml_module_t *ml_module); - -#endif /* MCA_COLL_ML_SELECT_H */ diff --git a/ompi/mca/coll/ml/configure.m4 b/ompi/mca/coll/ml/configure.m4 deleted file mode 100644 index 79e7bfeab1a..00000000000 --- a/ompi/mca/coll/ml/configure.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2014 Intel, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# MCA_coll_ml_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_ompi_coll_ml_CONFIG], [ - AC_CONFIG_FILES([ompi/mca/coll/ml/Makefile]) - - AS_IF([test "$OPAL_HAVE_HWLOC" = 1], - [$1], - [$2]) -]) diff --git a/ompi/mca/coll/ml/help-mpi-coll-ml.txt b/ompi/mca/coll/ml/help-mpi-coll-ml.txt deleted file mode 100644 index 874516f7ac4..00000000000 --- a/ompi/mca/coll/ml/help-mpi-coll-ml.txt +++ /dev/null @@ -1,64 +0,0 @@ -# -*- text -*- -# -# Copyright (c) 2009-2014 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2014 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English help file for Open MPI's Hierarchical Collective -# Component (coll/ml). -# -[empty-sub-group] -ML topology configuration explicitly requested for this subgroup: - - %s - -Such configuration results in a creation of empty groups. As a result, ML -framework cannot configure requested collective operations. ML framework will be -disabled. One configuration that might enable ML component is --mca bcol_base_string basesmuma,ptpcoll ---mca sbgp_base_subgroups_string basesmuma,p2p - -[allreduce-not-supported] -This BCOL is configured in one of the hierarchy : - - %s - -The BCOL does not support Allreduce for all -operations and datatype combination. In addition, you did not suggest -alternate topology building configurations. - -[allreduce-alt-nosupport] -The hierarchy is configured with alternate BCOL: - - %s - -Both the original topology and alternate topology not support Allreduce for all -operations and datatype combination. In addition, you did not suggest -alternate topology building configurations. - -[fragmentation-disabled] - -ML could not be used because the mca param coll_ml_enable_fragmentation -was set to zero and there is a bcol that does not support -zero copy method. - -[static-bcast-disabled] - -ML could not be used because the mca param coll_ml_bcast_algorithm -was not set to static and other broadcast implementation was available. - -[coll-ml-check-error] - -ML detected an error on communicator %s - -This communicator cannot be used any more - -[coll-ml-check-fatal-error] - -ML detected an unrecoverable error on intrinsic communicator %s - -The program will now abort diff --git a/ompi/mca/coll/ml/mca-coll-ml.config b/ompi/mca/coll/ml/mca-coll-ml.config deleted file mode 100644 index bdf43792b06..00000000000 --- a/ompi/mca/coll/ml/mca-coll-ml.config +++ /dev/null @@ -1,170 +0,0 @@ -################################## -# ML collective configuration file -################################## -# NOTE (by Pasha): -# Since ML configuration infrastructure is limited on this stage we do not support some tunings, even so parser -# understands this values and keys, but we do not have place to load all this values. -# threshold - ML infrastructure does not handle multiple thresholds. -# fragmentation - ML infrastructure does not fragmentation tuning per collective. -################################## - -# Defining collective section -[BARRIER] -# Defining message size section. We will support small/large. In future we may add more options. Barrier is very specific case, because it is only collective that does not transfer any data, so for this specific case we use small - -# Since ML does not define any algorithm for BARRIER, we just use default. Later we have to introduce some algorithm name for Barrier -algorithm = ML_BARRIER_DEFAULT - -# Hierarchy setup: -# -# full_hr - means all possible levels of hierarchy (list of possible is defined by user command line) -# full_hr_no_basesocket - means all possible levels of hierarchy (list of possible is defined by user command line) -# except the basesocket subgroup. -# ptp_only - only ptp hierarchy -# iboffload_only - only iboffload hierarhcy -hierarchy = full_hr - -[IBARRIER] - -algorithm = ML_BARRIER_DEFAULT -hierarchy = full_hr - -[BCAST] - -# bcast supports: ML_BCAST_SMALL_DATA_KNOWN, ML_BCAST_SMALL_DATA_UNKNOWN, ML_BCAST_SMALL_DATA_SEQUENTIAL -algorithm = ML_BCAST_SMALL_DATA_KNOWN -hierarchy = full_hr - -# bcast supports: ML_BCAST_LARGE_DATA_KNOWN, ML_BCAST_LARGE_DATA_UNKNOWN, ML_BCAST_LARGE_DATA_SEQUENTIAL -algorithm = ML_BCAST_LARGE_DATA_KNOWN -hierarchy = full_hr - -[IBCAST] - -algorithm = ML_BCAST_SMALL_DATA_KNOWN -hierarchy = full_hr - -algorithm = ML_BCAST_LARGE_DATA_KNOWN -hierarchy = full_hr - -[GATHER] - -# gather supports: ML_SMALL_DATA_GATHER -algorithm = ML_SMALL_DATA_GATHER -hierarchy = full_hr - -# gather supports: ML_LARGE_DATA_GATHER -algorithm = ML_LARGE_DATA_GATHER -hierarchy = full_hr - -[IGATHER] - -# gather supports: ML_SMALL_DATA_GATHER -algorithm = ML_SMALL_DATA_GATHER -hierarchy = full_hr - -# gather supports: ML_LARGE_DATA_GATHER -algorithm = ML_LARGE_DATA_GATHER -hierarchy = full_hr - -[ALLGATHER] - -# allgather supports: ML_SMALL_DATA_ALLGATHER -algorithm = ML_SMALL_DATA_ALLGATHER -hierarchy = full_hr - -# allgather supports: ML_LARGE_DATA_ALLGATHER -algorithm = ML_LARGE_DATA_ALLGATHER -hierarchy = full_hr - -[IALLGATHER] - -# allgather supports: ML_SMALL_DATA_ALLGATHER -algorithm = ML_SMALL_DATA_ALLGATHER -hierarchy = full_hr - -# allgather supports: ML_LARGE_DATA_ALLGATHER -algorithm = ML_LARGE_DATA_ALLGATHER -hierarchy = full_hr - -[ALLTOALL] - -# alltoall supports: ML_SMALL_DATA_ALLTOALL -algorithm = ML_SMALL_DATA_ALLTOALL -hierarchy = ptp_only - -# alltoall supports: ML_LARGE_DATA_ALLTOALL -algorithm = ML_LARGE_DATA_ALLTOALL -hierarchy = ptp_only - -[IALLTOALL] - -# alltoall supports: ML_SMALL_DATA_ALLTOALL -algorithm = ML_SMALL_DATA_ALLTOALL -hierarchy = ptp_only - -# alltoall supports: ML_LARGE_DATA_ALLTOALL -algorithm = ML_LARGE_DATA_ALLTOALL -hierarchy = ptp_only - -[ALLREDUCE] - -# allreduce supports: ML_SMALL_DATA_ALLREDUCE -algorithm = ML_SMALL_DATA_ALLREDUCE -hierarchy = full_hr - -# allreduce supports: ML_LARGE_DATA_ALLREDUCE -algorithm = ML_LARGE_DATA_ALLREDUCE -hierarchy = full_hr - -[IALLREDUCE] - -# allreduce supports: ML_SMALL_DATA_ALLREDUCE -algorithm = ML_SMALL_DATA_ALLREDUCE -hierarchy = full_hr - -# allreduce supports: ML_LARGE_DATA_ALLREDUCE -algorithm = ML_LARGE_DATA_ALLREDUCE -hierarchy = full_hr - -[REDUCE] - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_SMALL_DATA_REDUCE -hierarchy = full_hr - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_LARGE_DATA_REDUCE -hierarchy = full_hr - -[IREDUCE] - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_SMALL_DATA_REDUCE -hierarchy = full_hr - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_LARGE_DATA_REDUCE -hierarchy = full_hr - - - -[SCATTER] - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_SCATTER_SMALL_DATA_SEQUENTIAL -hierarchy = full_hr - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_SCATTER_SMALL_DATA_SEQUENTIAL -hierarchy = full_hr - -[ISCATTER] - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_SCATTER_SMALL_DATA_SEQUENTIAL -hierarchy = full_hr - -# scatter supports: ML_SCATTER_SMALL_DATA_SEQUENTIAL -algorithm = ML_SCATTER_SMALL_DATA_SEQUENTIAL -hierarchy = full_hr diff --git a/ompi/mca/coll/ml/owner.txt b/ompi/mca/coll/ml/owner.txt deleted file mode 100644 index 51ea04a5175..00000000000 --- a/ompi/mca/coll/ml/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ORNL? -status: unmaintained diff --git a/ompi/mca/sbgp/Makefile.am b/ompi/mca/sbgp/Makefile.am deleted file mode 100644 index 6e62a802e9f..00000000000 --- a/ompi/mca/sbgp/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - - -# main library setup -noinst_LTLIBRARIES = libmca_sbgp.la -libmca_sbgp_la_SOURCES = - -# header setup -nobase_ompi_HEADERS = -nobase_nodist_ompi_HEADERS = - -# local files -headers = sbgp.h -libmca_sbgp_la_SOURCES += $(headers) $(nodist_headers) - -# Conditionally install the header files -if WANT_INSTALL_HEADERS -nobase_ompi_HEADERS += $(headers) -nobase_nodist_ompi_HEADERS += $(nodist_headers) -ompidir = $(ompiincludedir)/ompi/mca/sbgp -else -ompidir = $(includedir) -endif - -include base/Makefile.am - -distclean-local: - rm -f base/static-components.h diff --git a/ompi/mca/sbgp/base/Makefile.am b/ompi/mca/sbgp/base/Makefile.am deleted file mode 100644 index c64efb79709..00000000000 --- a/ompi/mca/sbgp/base/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - - -headers += \ - base/base.h -libmca_sbgp_la_SOURCES += \ - base/sbgp_base_frame.c \ - base/sbgp_base_init.c diff --git a/ompi/mca/sbgp/base/base.h b/ompi/mca/sbgp/base/base.h deleted file mode 100644 index 8b803127861..00000000000 --- a/ompi/mca/sbgp/base/base.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_SBGP_BASE_H -#define MCA_SBGP_BASE_H - -#include "ompi_config.h" - -#include "ompi/mca/mca.h" -#include "opal/mca/base/mca_base_framework.h" -/* - * Global functions for SBGP - */ - -/* components in use */ -OMPI_MODULE_DECLSPEC extern opal_list_t mca_sbgp_base_components_in_use; -OMPI_MODULE_DECLSPEC extern int mca_sbgp_base_components_in_use_inited; -OMPI_DECLSPEC extern char *ompi_sbgp_subgroups_string; - -BEGIN_C_DECLS - -/* - * MCA Framework - */ -OMPI_DECLSPEC extern mca_base_framework_t ompi_sbgp_base_framework; - -/* select a component */ -OMPI_DECLSPEC int mca_sbgp_base_init(bool, bool); - -/* subgrouping component and key value */ -struct sbgp_base_component_keyval_t { - mca_base_component_list_item_t component; - char *key_value; -}; -typedef struct sbgp_base_component_keyval_t sbgp_base_component_keyval_t; -OBJ_CLASS_DECLARATION(sbgp_base_component_keyval_t); - -END_C_DECLS - -#endif /* MCA_SBGP_BASE_H */ diff --git a/ompi/mca/sbgp/base/owner.txt b/ompi/mca/sbgp/base/owner.txt deleted file mode 100644 index 55663d3bb8a..00000000000 --- a/ompi/mca/sbgp/base/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ? -status: ? diff --git a/ompi/mca/sbgp/base/sbgp_base_close.c b/ompi/mca/sbgp/base/sbgp_base_close.c deleted file mode 100644 index cc7dd26c4e7..00000000000 --- a/ompi/mca/sbgp/base/sbgp_base_close.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" - -#include - -#include "ompi/constants.h" -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/mca/sbgp/base/base.h" -#include "ompi/include/ompi/constants.h" - - -int mca_sbgp_base_close(void) -{ - - /* Close all remaining available modules */ - - mca_base_components_close(ompi_sbgp_base_framework.framework_output, - &mca_sbgp_base_components_opened, NULL); - - /* Close the framework output */ - opal_output_close (ompi_sbgp_base_framework.framework_output); - ompi_sbgp_base_framework.framework_output = -1; - - /* All done */ - - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/sbgp/base/sbgp_base_frame.c b/ompi/mca/sbgp/base/sbgp_base_frame.c deleted file mode 100644 index a0091e35328..00000000000 --- a/ompi/mca/sbgp/base/sbgp_base_frame.c +++ /dev/null @@ -1,205 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012-2014 Los Alamos National Security, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include - -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNIST_H */ -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" - -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/mca/sbgp/base/base.h" -#include "ompi/include/ompi/constants.h" -#include "opal/util/argv.h" - -/* - * The following file was created by configure. It contains extern - * statements and the definition of an array of pointers to each - * component's public mca_base_component_t struct. - */ - -#include "ompi/mca/sbgp/base/static-components.h" - -/* -** * Global variables -** */ -opal_list_t mca_sbgp_base_components_in_use = {{0}}; -int mca_sbgp_base_components_in_use_inited=0; -OMPI_DECLSPEC char *ompi_sbgp_subgroups_string = NULL; - -static void mca_sbgp_base_destruct (mca_sbgp_base_module_t *module) -{ - /* free the list of ranks */ - if(module->group_list ) { - free(module->group_list); - module->group_list=NULL; - } -} - -OBJ_CLASS_INSTANCE(mca_sbgp_base_module_t, - opal_object_t, - NULL, - mca_sbgp_base_destruct); - -OBJ_CLASS_INSTANCE(sbgp_base_component_keyval_t, - mca_base_component_list_item_t, - NULL, - NULL); - -/* get list of subgrouping coponents to use */ -static int ompi_sbgp_set_components_to_use(opal_list_t *sbgp_components_avail, - opal_list_t *sbgp_components_in_use) -{ - /* local variables */ - const mca_base_component_t *component; - mca_base_component_list_item_t *cli; - sbgp_base_component_keyval_t *clj; - char **subgroups_requested = NULL, **sbgp_string = NULL; - char *sbgp_component, *sbgp_key; - const char *component_name; - int i, sbgp_size = 0, - sbgp_string_size = 0, - rc = OMPI_SUCCESS; - - /* split the list of requested subgroups */ - subgroups_requested = opal_argv_split(ompi_sbgp_subgroups_string, ','); - if(NULL == subgroups_requested) { - return OMPI_ERROR; - } - sbgp_size = opal_argv_count (subgroups_requested); - - /* Initialize list */ - OBJ_CONSTRUCT(sbgp_components_in_use, opal_list_t); - - /* loop over list of components requested */ - for (i = 0; i < sbgp_size; i++) { - /* get key-value */ - sbgp_string = opal_argv_split(subgroups_requested[i], ':'); - if (NULL == sbgp_string) { - rc = OMPI_ERR_OUT_OF_RESOURCE; - break; - } - - sbgp_string_size = opal_argv_count (sbgp_string); - if (sbgp_string_size < 1 || sbgp_string_size > 2) { - opal_output(ompi_sbgp_base_framework.framework_output, - "Requested SBGP configuration is illegal %s", - subgroups_requested[i]); - opal_argv_free (sbgp_string); - rc = OMPI_ERROR; - break; - } - - /* it is garanteed that sbgp_string[1] will either be NULL (count = 1) or a string */ - sbgp_key = sbgp_string[1]; - sbgp_component = sbgp_string[0]; - - /* loop over discovered components */ - OPAL_LIST_FOREACH(cli, sbgp_components_avail, mca_base_component_list_item_t) { - component = cli->cli_component; - component_name = component->mca_component_name; - - /* key_value[0] has the component name, and key_value[1], if - ** it is not NULL, has the key_value associated with this - ** instance of the compoenent - */ - - if (0 == strcmp (component_name, sbgp_component)) { - /* found selected component */ - clj = OBJ_NEW(sbgp_base_component_keyval_t); - if (NULL == clj) { - rc = OPAL_ERR_OUT_OF_RESOURCE; - opal_argv_free (sbgp_string); - goto exit_ERROR; - } - /* fprintf(stderr,"sbgp selecting %s %s\n", sbgp_component, component_name); */ - - clj->component.cli_component = component; - if (NULL != sbgp_key) { - clj->key_value = strdup(sbgp_key); - } else { - clj->key_value = NULL; - } - opal_list_append(sbgp_components_in_use, (opal_list_item_t *)clj); - break; - } - } - - opal_argv_free (sbgp_string); - } - - /* Note: Need to add error checking to make sure all requested functions - ** were found */ - - /* - ** release resources - ** */ - exit_ERROR: - opal_argv_free (subgroups_requested); - - return rc; -} - -static int mca_sbgp_base_register(mca_base_register_flag_t flags) -{ - /* get list of sub-grouping functions to use */ - ompi_sbgp_subgroups_string = "basesmsocket,basesmuma,ibnet,p2p"; - (void) mca_base_var_register("ompi", "sbgp", "base", "subgroups_string", - "Default set of subgroup operations to apply ", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_LOCAL, - &ompi_sbgp_subgroups_string); - - return OMPI_SUCCESS; -} - -static int mca_sbgp_base_close(void) -{ - opal_list_item_t *item; - - while (NULL != (item = opal_list_remove_first (&mca_sbgp_base_components_in_use))) { - OBJ_RELEASE(item); - } - - OBJ_DESTRUCT(&mca_sbgp_base_components_in_use); - - return mca_base_framework_components_close(&ompi_sbgp_base_framework, NULL); -} - -/** - * Function for finding and opening either all MCA components, or the one - * that was specifically requested via a MCA parameter. - */ -static int mca_sbgp_base_open(mca_base_open_flag_t flags) -{ - int ret; - - if (OMPI_SUCCESS != (ret = mca_base_framework_components_open(&ompi_sbgp_base_framework, flags))) { - return ret; - } - - ret = ompi_sbgp_set_components_to_use(&ompi_sbgp_base_framework.framework_components, - &mca_sbgp_base_components_in_use); - - return ret; -} - -MCA_BASE_FRAMEWORK_DECLARE(ompi, sbgp, "OMPI Subgroup Subsystem", mca_sbgp_base_register, - mca_sbgp_base_open, mca_sbgp_base_close, - mca_sbgp_base_static_components, 0); - diff --git a/ompi/mca/sbgp/base/sbgp_base_init.c b/ompi/mca/sbgp/base/sbgp_base_init.c deleted file mode 100644 index d1f66da9b53..00000000000 --- a/ompi/mca/sbgp/base/sbgp_base_init.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/mca/sbgp/base/base.h" -#include "ompi/include/ompi/constants.h" - -int mca_sbgp_base_init(bool enable_progress_threads, bool enable_mpi_threads) -{ - mca_sbgp_base_component *sbgp_component = NULL; - mca_base_component_list_item_t *cli; - opal_list_item_t *item; - int ret; - - /* loop over component initialization functions */ - for (item = opal_list_get_first((opal_list_t *) &mca_sbgp_base_components_in_use); - opal_list_get_end((opal_list_t *) &mca_sbgp_base_components_in_use) != item; - item = opal_list_get_next(item)) { - - cli = (mca_base_component_list_item_t *) item; - sbgp_component = (mca_sbgp_base_component *)cli->cli_component; - - ret = sbgp_component->sbgp_init_query(true, true); - if( OMPI_SUCCESS != ret) { - return ret; - } - } - - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/sbgp/basesmsocket/Makefile.am b/ompi/mca/sbgp/basesmsocket/Makefile.am deleted file mode 100644 index d08cd5c14c4..00000000000 --- a/ompi/mca/sbgp/basesmsocket/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - sbgp_basesmsocket.h \ - sbgp_basesmsocket_component.c \ - sbgp_basesmsocket_module.c - - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_sbgp_basesmsocket_DSO -component_install += mca_sbgp_basesmsocket.la -else -component_noinst += libmca_sbgp_basesmsocket.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_sbgp_basesmsocket_la_SOURCES = $(sources) -mca_sbgp_basesmsocket_la_LDFLAGS = -module -avoid-version -mca_sbgp_basesmsocket_la_LIBADD = - -noinst_LTLIBRARIES = $(component_noinst) -libmca_sbgp_basesmsocket_la_SOURCES =$(sources) -libmca_sbgp_basesmsocket_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/sbgp/basesmsocket/configure.m4 b/ompi/mca/sbgp/basesmsocket/configure.m4 deleted file mode 100644 index afc86046737..00000000000 --- a/ompi/mca/sbgp/basesmsocket/configure.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2012 Los Alamos National Security, LLC. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# MCA_sbgp_basesmsocket_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_ompi_sbgp_basesmsocket_CONFIG], [ - AC_CONFIG_FILES([ompi/mca/sbgp/basesmsocket/Makefile]) - - AS_IF([test "$OPAL_HAVE_HWLOC" = 1], - [$1], - [$2]) -]) diff --git a/ompi/mca/sbgp/basesmsocket/owner.txt b/ompi/mca/sbgp/basesmsocket/owner.txt deleted file mode 100644 index 55663d3bb8a..00000000000 --- a/ompi/mca/sbgp/basesmsocket/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ? -status: ? diff --git a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket.h b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket.h deleted file mode 100644 index 739f913335e..00000000000 --- a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_BCOL_basesmsocket_EXPORT_H -#define MCA_BCOL_basesmsocket_EXPORT_H - -#include "ompi_config.h" - -#include "mpi.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "ompi/mca/sbgp/base/base.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" -#include "ompi/proc/proc.h" -#include "opal/util/output.h" - -BEGIN_C_DECLS - -#ifdef HAVE_SCHED_YIELD -# include -# define SPIN sched_yield() -#else /* no switch available */ -# define SPIN -#endif - -#define BASESMSOCKET_VERBOSE(level, ...) \ - do { \ - OPAL_OUTPUT_VERBOSE((ompi_sbgp_base_framework.framework_output, level, \ - __VA_ARGS__)); \ - } while(0); - -/** - * Structure to hold the basic shared memory coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ -struct mca_sbgp_basesmsocket_component_t { - /** Base coll component */ - mca_sbgp_base_component_2_0_0_t super; -}; - -/** - * Convenience typedef - */ -typedef struct mca_sbgp_basesmsocket_component_t - mca_sbgp_basesmsocket_component_t; - - -/* -** Base sub-group module -**/ - -struct mca_sbgp_basesmsocket_module_t { - /** Collective modules all inherit from opal_object */ - mca_sbgp_base_module_t super; - -}; -typedef struct mca_sbgp_basesmsocket_module_t mca_sbgp_basesmsocket_module_t; -OBJ_CLASS_DECLARATION(mca_sbgp_basesmsocket_module_t); - -/** -* Global component instance -*/ -OMPI_MODULE_DECLSPEC extern mca_sbgp_basesmsocket_component_t mca_sbgp_basesmsocket_component; - - -END_C_DECLS - -#endif /* MCA_BCOL_basesmsocket_EXPORT_H */ diff --git a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c deleted file mode 100644 index 79307da19fa..00000000000 --- a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_component.c +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" - -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#include "opal/mca/hwloc/hwloc.h" -#include "opal/mca/hwloc/base/base.h" -#include "opal/dss/dss_internal.h" -#include "opal/class/opal_object.h" - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "sbgp_basesmsocket.h" - -#include "ompi/patterns/comm/coll_ops.h" - - -/* - * Public string showing the coll ompi_sm V2 component version number - */ -const char *mca_sbgp_basesmsocket_component_version_string = - "Open MPI sbgp - basesmsocket collective MCA component version " OMPI_VERSION; - - -/* - * Local functions - */ - -static int basesmsocket_register(void); -static int basesmsocket_open(void); -static int basesmsocket_close(void); -static mca_sbgp_base_module_t *mca_sbgp_basesmsocket_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, - struct ompi_communicator_t *comm, - char *key, - void *output_data - ); -static int mca_sbgp_basesmsocket_init_query(bool enable_progress_threads, - bool enable_mpi_threads); -/*----end local functions ----*/ - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_sbgp_basesmsocket_component_t mca_sbgp_basesmsocket_component = { - - /* First, fill in the super */ - - { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .sbgp_version = { - MCA_SBGP_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "basesmsocket", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = basesmsocket_open, - .mca_close_component = basesmsocket_close, - .mca_register_component_params = basesmsocket_register, - }, - - .sbgp_init_query = mca_sbgp_basesmsocket_init_query, - .select_procs = mca_sbgp_basesmsocket_select_procs, - .priority = 0, - } -}; - -/* - * Register the component - */ -static int basesmsocket_register(void) -{ - mca_sbgp_basesmsocket_component_t *cs = &mca_sbgp_basesmsocket_component; - - cs->super.priority = 90; - (void) mca_base_component_var_register(&mca_sbgp_basesmsocket_component.super.sbgp_version, - "priority", "Priority for the sbgp basesmsocket component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, &cs->super.priority); - - return OMPI_SUCCESS; -} - -/* - * Open the component - */ -static int basesmsocket_open(void) -{ - return OMPI_SUCCESS; -} - -/* - * Close the component - */ -static int basesmsocket_close(void) -{ - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_sbgp_basesmsocket_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* at this stage there is no reason to disaulify this component */ - - /* done */ - return OMPI_SUCCESS; -} - -#if 0 -/* NTH: this is no longer used but may be used if we can determine the binding policy*/ -static int mca_sbgp_map_to_logical_socket_id(int *socket) -{ - int ret = OMPI_SUCCESS; - hwloc_obj_t obj; - hwloc_obj_t first_pu_object; - hwloc_bitmap_t good; - int pu_os_index = -1, my_logical_socket_id = -1; - int this_pus_logical_socket_id = -1; - - *socket = my_logical_socket_id; - - /* bozo check */ - if (NULL == opal_hwloc_topology) { - return OPAL_ERR_NOT_INITIALIZED; - } - - good = hwloc_bitmap_alloc(); - if (NULL == good) { - return OPAL_ERR_OUT_OF_RESOURCE; - } - - /* get this process' CPU binding */ - if( 0 != hwloc_get_cpubind(opal_hwloc_topology,good, 0)){ - /* report some error */ - BASESMSOCKET_VERBOSE(10, "The global variable opal_hwloc_topology appears not to have been initialized\n"); - hwloc_bitmap_free(good); - return OMPI_ERROR; - } - - /* find the first logical PU object in the hwloc tree */ - first_pu_object = hwloc_get_obj_by_type(opal_hwloc_topology, HWLOC_OBJ_PU, 0); - - - /* get the next bit in the bitmap (note: if pu_os_index == -1, then the - * first bit is returned - */ - /* traverse the hwloc tree */ - while( -1 != (pu_os_index = hwloc_bitmap_next(good, pu_os_index) ) ) { - /* Traverse all PUs in the machine in logical order, in the simple case - * there should only be a single PU that this process is bound to, right? - * - */ - for( obj = first_pu_object; obj != NULL; obj = obj->next_cousin ) {/* WTF is a "next_cousin" ? */ - /* is this PU the same as the bit I pulled off the mask? */ - if( obj->os_index == (unsigned int) pu_os_index) { - /* Then I found it, break out of for loop */ - break; - } - } - - if( NULL != obj) { - /* if we found the PU, then go upward in the tree - * looking for the enclosing socket - */ - while( (NULL != obj) && ( HWLOC_OBJ_SOCKET != obj->type) ){ - obj = obj->parent; - } - - if( NULL == obj ) { - /* then we couldn't find an enclosing socket, report this */ - } else { - /* We found the enclosing socket */ - if( -1 == my_logical_socket_id ){ - /* this is the first PU that I'm bound to */ - this_pus_logical_socket_id = obj->logical_index; - my_logical_socket_id = this_pus_logical_socket_id; - } else { - /* this is not the first PU that I'm bound to. - * Seems I'm bound to more than a single PU. Question - * is, am I bound to the same socket?? - */ - /* in order to get rid of the compiler warning, I had to cast - * "this_pus_logical_socket_id", at a glance this seems ok, - * but if subgrouping problems arise, maybe look here. I shall - * tag this line with the "mark of the beast" for grepability - * 666 - */ - if( (unsigned int) this_pus_logical_socket_id != obj->logical_index ){ - /* 666 */ - /* Then we're bound to more than one socket...fail */ - this_pus_logical_socket_id = -1; - my_logical_socket_id = -1; - break; - } - } - } - - } - - /* end while */ - } - *socket = my_logical_socket_id; - hwloc_bitmap_free(good); - - return ret; - -} -#endif - -/* This routine is used to find the list of procs that run on the -** same host as the calling process. -*/ - -static mca_sbgp_base_module_t *mca_sbgp_basesmsocket_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, - struct ompi_communicator_t *comm, - char *key, - void *output_data - ) -{ - /* local variables */ - mca_sbgp_basesmsocket_module_t *module; - int proc, cnt, n_local_peers; - - /* initialize data */ - for (proc = 0, n_local_peers = 0 ; proc < n_procs_in ; ++proc) { - if (OPAL_PROC_ON_LOCAL_SOCKET(procs[proc]->super.proc_flags)) { - n_local_peers++; - } - } - - /* we need to return a module even if there is only one local peer. this - * covers the case where there may be a basesmsocket module on one rank - * but not another */ - if (0 == n_local_peers) { - return NULL; - } - - /* create a new module */ - module = OBJ_NEW(mca_sbgp_basesmsocket_module_t); - if (!module) { - return NULL; - } - - module->super.group_size = n_local_peers; - module->super.group_comm = comm; - module->super.group_list = NULL; - module->super.group_net = OMPI_SBGP_SOCKET; - - /* allocate memory and fill in the group_list */ - module->super.group_list = (int *) calloc (n_local_peers, sizeof(int)); - if (NULL == module->super.group_list) { - OBJ_RELEASE(module); - return NULL; - } - - for (proc = 0, cnt = 0 ; proc < n_procs_in ; ++proc) { - if (OPAL_PROC_ON_LOCAL_SOCKET(procs[proc]->super.proc_flags)) { - module->super.group_list[cnt++] = proc; - } - } - - /* Return the module */ - return (mca_sbgp_base_module_t *) module; -} diff --git a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c b/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c deleted file mode 100644 index 7f075eecdd8..00000000000 --- a/ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket_module.c +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/sbgp/basesmsocket/sbgp_basesmsocket.h" - -OBJ_CLASS_INSTANCE(mca_sbgp_basesmsocket_module_t, - mca_sbgp_base_module_t, NULL, NULL); diff --git a/ompi/mca/sbgp/basesmuma/Makefile.am b/ompi/mca/sbgp/basesmuma/Makefile.am deleted file mode 100644 index 1547f8e9505..00000000000 --- a/ompi/mca/sbgp/basesmuma/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - sbgp_basesmuma.h \ - sbgp_basesmuma_component.c \ - sbgp_basesmuma_module.c - - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_sbgp_basesmuma_DSO -component_install += mca_sbgp_basesmuma.la -else -component_noinst += libmca_sbgp_basesmuma.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_sbgp_basesmuma_la_SOURCES = $(sources) -mca_sbgp_basesmuma_la_LDFLAGS = -module -avoid-version -mca_sbgp_basesmuma_la_LIBADD = - -noinst_LTLIBRARIES = $(component_noinst) -libmca_sbgp_basesmuma_la_SOURCES =$(sources) -libmca_sbgp_basesmuma_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/sbgp/basesmuma/owner.txt b/ompi/mca/sbgp/basesmuma/owner.txt deleted file mode 100644 index 55663d3bb8a..00000000000 --- a/ompi/mca/sbgp/basesmuma/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ? -status: ? diff --git a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma.h b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma.h deleted file mode 100644 index efe501e0466..00000000000 --- a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#ifndef MCA_BCOL_basesmuma_EXPORT_H -#define MCA_BCOL_basesmuma_EXPORT_H - -#include "ompi_config.h" - -#include "mpi.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" -#include "ompi/proc/proc.h" - -BEGIN_C_DECLS - -#ifdef HAVE_SCHED_YIELD -# include -# define SPIN sched_yield() -#else /* no switch available */ -# define SPIN -#endif - - - /** - * Structure to hold the basic shared memory coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ - struct mca_sbgp_basesmuma_component_t { - /** Base coll component */ - mca_sbgp_base_component_2_0_0_t super; - - }; - - /** - * Convenience typedef - */ - typedef struct mca_sbgp_basesmuma_component_t - mca_sbgp_basesmuma_component_t; - - - /* - ** Base sub-group module - **/ - - struct mca_sbgp_basesmuma_module_t { - /** Collective modules all inherit from opal_object */ - mca_sbgp_base_module_t super; - - }; - typedef struct mca_sbgp_basesmuma_module_t mca_sbgp_basesmuma_module_t; - OBJ_CLASS_DECLARATION(mca_sbgp_basesmuma_module_t); - - /** - * Global component instance - */ - OMPI_MODULE_DECLSPEC extern mca_sbgp_basesmuma_component_t mca_sbgp_basesmuma_component; - - -END_C_DECLS - -#endif /* MCA_BCOL_basesmuma_EXPORT_H */ diff --git a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c deleted file mode 100644 index 4c6e2328600..00000000000 --- a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_component.c +++ /dev/null @@ -1,208 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "sbgp_basesmuma.h" - - -/* - * Public string showing the coll ompi_sm V2 component version number - */ -const char *mca_sbgp_basesmuma_component_version_string = - "Open MPI sbgp - basesmuma collective MCA component version " OMPI_VERSION; - - -/* - * Local functions - */ - -static int basesmuma_register(void); -static int basesmuma_open(void); -static int basesmuma_close(void); -static mca_sbgp_base_module_t *mca_sbgp_basesmuma_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, struct ompi_communicator_t *comm, char *key, void *output_data); - -static int mca_sbgp_basesmuma_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_sbgp_basesmuma_component_t mca_sbgp_basesmuma_component = { - - /* First, fill in the super */ - - { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .sbgp_version = { - MCA_SBGP_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "basesmuma", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open, close, and register functions */ - - .mca_open_component = basesmuma_open, - .mca_close_component = basesmuma_close, - .mca_register_component_params = basesmuma_register, - }, - .sbgp_init_query = mca_sbgp_basesmuma_init_query, - .select_procs = mca_sbgp_basesmuma_select_procs, - .priority = 0, - } -}; - -/* - * Register the component - */ -static int basesmuma_register(void) -{ - mca_sbgp_basesmuma_component_t *cs = &mca_sbgp_basesmuma_component; - - /* set component priority */ - cs->super.priority = 90; - (void) mca_base_component_var_register(&cs->super.sbgp_version, - "priority", "Priority of the sbgp basesmuma", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &cs->super.priority); - return OMPI_SUCCESS; -} - -/* - * Open the component - */ -static int basesmuma_open(void) -{ - return OMPI_SUCCESS; -} - - -/* - * Close the component - */ -static int basesmuma_close(void) -{ - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_sbgp_basesmuma_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* at this stage there is no reason to disaulify this component */ - - /* done */ - return OMPI_SUCCESS; -} - -/* This routine is used to find the list of procs that run on the -** same host as the calling process. -*/ -static mca_sbgp_base_module_t *mca_sbgp_basesmuma_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, - struct ompi_communicator_t *comm, - char *key, - void *output_data - ) -{ - /* local variables */ - int cnt,proc,local,last_local_proc; - mca_sbgp_basesmuma_module_t *module; - - module=OBJ_NEW(mca_sbgp_basesmuma_module_t); - if (!module ) { - return NULL; - } - module->super.group_size=0; - module->super.group_comm = comm; - module->super.group_list = NULL; - module->super.group_net = OMPI_SBGP_MUMA; - for (proc = 0, cnt = 0, last_local_proc = 0 ; proc < n_procs_in ; ++proc) { - local = OPAL_PROC_ON_LOCAL_NODE(procs[proc]->super.proc_flags); - if (local) { - last_local_proc = proc; - cnt++; - } - } - /* if no other local procs found skip to end */ - - if( 2 > cnt ) { - /* There's always at least one - namely myself */ - assert(1 == cnt); - module->super.group_size = 1; - module->super.group_list = (int *) malloc (sizeof (int)); - module->super.group_list[0] = last_local_proc; - /* let ml handle this case */ - goto OneLocalPeer; - } - - /* generate list of local ranks */ - module->super.group_size=cnt; - if( cnt > 0 ) { - module->super.group_list=(int *)malloc(sizeof(int)*cnt); - if(NULL == module->super.group_list){ - goto Error; - } - } - - for (proc = 0, cnt = 0 ; proc < n_procs_in ; ++proc) { - local = OPAL_PROC_ON_LOCAL_NODE(procs[proc]->super.proc_flags); - if( local ) { - module->super.group_list[cnt++] = proc; - } - } -OneLocalPeer: - /* successful completion */ - return (mca_sbgp_base_module_t *)module; - - /* return with error */ - -Error: - - /* clean up */ - if( NULL != module->super.group_list ) { - free(module->super.group_list); - module->super.group_list=NULL; - } - - OBJ_RELEASE(module); - - return NULL; -} diff --git a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c b/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c deleted file mode 100644 index 79028c4e25a..00000000000 --- a/ompi/mca/sbgp/basesmuma/sbgp_basesmuma_module.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/sbgp/basesmuma/sbgp_basesmuma.h" - -/* - * Local functions - */ -static void -mca_sbgp_basesmuma_module_construct(mca_sbgp_basesmuma_module_t *module) -{ -} - -static void -mca_sbgp_basesmuma_module_destruct(mca_sbgp_basesmuma_module_t *module) -{ - /* done */ -} - -OBJ_CLASS_INSTANCE(mca_sbgp_basesmuma_module_t, - mca_sbgp_base_module_t, - mca_sbgp_basesmuma_module_construct, - mca_sbgp_basesmuma_module_destruct); diff --git a/ompi/mca/sbgp/ibnet/.opal_ignore b/ompi/mca/sbgp/ibnet/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ompi/mca/sbgp/ibnet/Makefile.am b/ompi/mca/sbgp/ibnet/Makefile.am deleted file mode 100644 index df6b2bb17ae..00000000000 --- a/ompi/mca/sbgp/ibnet/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = $(sbgp_ibnet_CPPFLAGS) $(btl_openib_CPPFLAGS) - -sources = \ - sbgp_ibnet.h \ - sbgp_ibnet_mca.h \ - sbgp_ibnet_mca.c \ - sbgp_ibnet_component.c \ - sbgp_ibnet_module.c - - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_sbgp_ibnet_DSO -component_install += mca_sbgp_ibnet.la -else -component_noinst += libmca_sbgp_ibnet.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_sbgp_ibnet_la_SOURCES = $(sources) -mca_sbgp_ibnet_la_LDFLAGS = -module -avoid-version $(sbgp_ibnet_LDFLAGS) $(btl_openib_LDFLAGS) -mca_sbgp_ibnet_la_LIBADD = $(sbgp_ibnet_LIBS) $(btl_openib_LIBS) \ - $(OMPI_TOP_BUILDDIR)/ompi/mca/common/verbs/libmca_common_verbs.la \ - $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ofacm/libmca_common_ofacm.la - -noinst_LTLIBRARIES = $(component_noinst) -libmca_sbgp_ibnet_la_SOURCES =$(sources) -libmca_sbgp_ibnet_la_LDFLAGS = -module -avoid-version - -$(OMPI_TOP_BUILDDIR)/ompi/mca/common/ofacm/libmca_common_ofacm.la: foo.c - cd $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ofacm && $(MAKE) - -$(OMPI_TOP_BUILDDIR)/ompi/mca/common/ofautils/libmca_common_ofautils.la: foo.c - cd $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ofautils && $(MAKE) - -foo.c: diff --git a/ompi/mca/sbgp/ibnet/configure.m4 b/ompi/mca/sbgp/ibnet/configure.m4 deleted file mode 100644 index 40124f0cefb..00000000000 --- a/ompi/mca/sbgp/ibnet/configure.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_ompi_sbgp_ibnet_CONFIG([should_build]) -# ------------------------------------------ -# AC_DEFUN([MCA_ompi_sbgp_ibnet_POST_CONFIG], [ -# ]) - - -# MCA_ompi_sbgp_ibnet_CONFIG([action-if-can-compile], -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_ompi_sbgp_ibnet_CONFIG],[ - AC_CONFIG_FILES([ompi/mca/sbgp/ibnet/Makefile]) - sbgp_ofa_happy="no" - sbgp_mlnx_ofed_happy="no" - - OPAL_CHECK_OPENFABRICS([sbgp_ibnet], [sbgp_ofa_happy="yes"]) - OPAL_CHECK_MLNX_OPENFABRICS([sbgp_ibnet], [sbgp_mlnx_ofed_happy="yes"]) - - AS_IF([test "$sbgp_ofa_happy" = "yes" -a "$sbgp_mlnx_ofed_happy" = "yes"], - [$1], - [$2]) - - # substitute in the things needed to build iboffload - AC_SUBST([sbgp_ibnet_CFLAGS]) - AC_SUBST([sbgp_ibnet_CPPFLAGS]) - AC_SUBST([sbgp_ibnet_LDFLAGS]) - AC_SUBST([sbgp_ibnet_LIBS]) -])dnl diff --git a/ompi/mca/sbgp/ibnet/owner.txt b/ompi/mca/sbgp/ibnet/owner.txt deleted file mode 100644 index 55663d3bb8a..00000000000 --- a/ompi/mca/sbgp/ibnet/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ? -status: ? diff --git a/ompi/mca/sbgp/ibnet/sbgp_ibnet.h b/ompi/mca/sbgp/ibnet/sbgp_ibnet.h deleted file mode 100644 index f29ffc33db7..00000000000 --- a/ompi/mca/sbgp/ibnet/sbgp_ibnet.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#ifndef MCA_BCOL_ibnet_EXPORT_H -#define MCA_BCOL_ibnet_EXPORT_H - -#include "ompi_config.h" - -#include "mpi.h" -#include "infiniband/verbs.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" -#include "ompi/proc/proc.h" -#include "ompi/mca/common/ofacm/connect.h" - -BEGIN_C_DECLS - -#ifdef HAVE_SCHED_YIELD -# include -# define SPIN sched_yield() -#else /* no switch available */ -# define SPIN -#endif - -typedef enum { - OFFLOAD_CONNECTX_B0, - OFFLOAD_DISABLE -} coll_offload_support; - -/** - * Structure to hold the basic shared memory coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ -struct mca_sbgp_ibnet_component_t { - /** Base coll component */ - mca_sbgp_base_component_2_0_0_t super; - - /** Enable disable verbose mode */ - int verbose; - - /* Maximum allowed number of subroups */ - int max_sbgps; - /* Enable disable default subnet id warning */ - bool warn_default_gid_prefix; - bool warn_nonexistent_if; - /* IB MTU requested by user */ - int mtu; /** MTU on this port */ - /** IB partition definition */ - int pkey_val; - /* Keeping hca data */ - char *if_include; - char **if_include_list; - char *if_exclude; - char **if_exclude_list; - /** Dummy argv-style list; a copy of names from the - if_[in|ex]clude list that we use for error checking (to ensure - that they all exist) */ - char **if_list; - /** List of iboffload devices that have at list one active port */ - opal_list_t devices; - int curr_max_group_id; - uint32_t total_active_ports; -}; - -/** - * Convenience typedef - */ -typedef struct mca_sbgp_ibnet_component_t -mca_sbgp_ibnet_component_t; - -/* IB port OBJ*/ -struct mca_sbgp_ibnet_port_t { - uint16_t id; /** Port number */ - int stat; /** Port status - Active,Init,etc.. */ - enum ibv_mtu mtu; /** MTU on this port */ - coll_offload_support coll_offload; /** Collectives offload mode */ - uint64_t subnet_id; /** Sunnet id for the port */ - /* uint8_t src_path_bits; */ - uint16_t lid; - uint16_t lmc; - /** Array of the peer's CPCs available on this port */ - uint32_t num_cpcs; - bool used; - ompi_common_ofacm_base_module_data_t *pm_cpc_data; - ompi_common_ofacm_base_module_t *local_cpc; /* selected cpc*/ - ompi_common_ofacm_base_module_data_t *remote_cpc_data; /* data for remote cpc */ -}; - -typedef struct mca_sbgp_ibnet_port_t mca_sbgp_ibnet_port_t; - -typedef enum { - MCA_SBGP_IBNET_NONE = 0, - MCA_SBGP_IBNET_NODE_LEADER = 1<<0, - MCA_SBGP_IBNET_SOCKET_LEADER = 1<<1, - MCA_SBGP_IBNET_SWITCH_LEADER = 1<<2 -} mca_sbgp_ibnet_duty_t; - -typedef enum { - MCA_SBGP_IBNET_ALL_NET, - MCA_SBGP_IBNET_NODE_NET, - MCA_SBGP_IBNET_NONE_NET -} mca_sbgp_ibnet_mode_t; - -struct mca_sbgp_ibnet_proc_t { - opal_list_item_t super; - ompi_proc_t *ompi_proc; /* Ompi proc pointer */ - int ompi_proc_index; /* Index of the proc in array */ - uint32_t rank; /* vpid, remote proc rank */ - uint32_t num_ports; /* number of remote ports */ - int *use_port; /* the size of this array is equal to number of cgroups that points to this proc. - Each cgroup has own index "I". The array keep remote port number that ne need to use - for cgroup "I" - use_port[I]. We need it for iboffload module */ - mca_sbgp_ibnet_port_t *remote_ports_info; /* the array keeps remote port information */ - mca_sbgp_ibnet_duty_t duty; /* Socket leader, Node leader, switch leader, etc. */ -}; - -typedef struct mca_sbgp_ibnet_proc_t mca_sbgp_ibnet_proc_t; -OBJ_CLASS_DECLARATION(mca_sbgp_ibnet_proc_t); - -/* Device OBJ */ -struct mca_sbgp_ibnet_device_t { - opal_list_item_t super; - struct ibv_device* ib_dev; /* pointer to device, from device list */ - int device_index; /* device index in device list */ - struct ibv_device_attr ib_dev_attr; /* attributes of the device */ - int num_act_ports; - int num_allowed_ports; - struct mca_sbgp_ibnet_port_t *ports; - /* CPC stuff */ - ompi_common_ofacm_base_module_t **cpcs; /* Array of CPCs */ - uint8_t num_cpcs; /* Number of elements in cpc array */ -}; - -typedef struct mca_sbgp_ibnet_device_t mca_sbgp_ibnet_device_t; -OBJ_CLASS_DECLARATION(mca_sbgp_ibnet_device_t); - -struct mca_sbgp_ibnet_connection_group_info_t { - int device_index; /* device index in device list */ - uint32_t port; /* port number */ - /* Used for detect number of a port to communicate with remote proc, - index in use_port arrray in the mca_sbgp_ibnet_proc_t structure */ - uint32_t index; - /* array of procs connected with this group */ - uint32_t num_procs; - opal_pointer_array_t *ibnet_procs; -}; -typedef struct mca_sbgp_ibnet_connection_group_info_t - mca_sbgp_ibnet_connection_group_info_t; - -/* - ** Base sub-group module - **/ -struct mca_sbgp_ibnet_module_t { - /** Collective modules all inherit from opal_object */ - mca_sbgp_base_module_t super; - int group_id; - /* opal_pointer_array_t *ibnet_procs; */ - /* number of connection groups */ - int num_cgroups; - /* - * Array of connection groups. There are same procs in these groups, - * but they were created over different ports (and different devices maybe). - */ - mca_sbgp_ibnet_connection_group_info_t *cgroups; - mca_sbgp_ibnet_mode_t mode; /* working mode of the module, it is ALL by default */ -}; -typedef struct mca_sbgp_ibnet_module_t mca_sbgp_ibnet_module_t; -OBJ_CLASS_DECLARATION(mca_sbgp_ibnet_module_t); - -/* Error and verbose prints */ - -static inline int mca_sbgp_ibnet_err(const char* fmt, ...) -{ - va_list list; - int ret; - - va_start(list, fmt); - ret = vfprintf(stderr, fmt, list); - va_end(list); - return ret; -} - -#define IBNET_ERROR(args) \ - do { \ - mca_sbgp_ibnet_err("[%s]%s[%s:%d:%s] IBNET ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_sbgp_ibnet_err args; \ - mca_sbgp_ibnet_err("\n"); \ - } while(0); - -#if OPAL_ENABLE_DEBUG -#define IBNET_VERBOSE(level, args) \ - do { \ - if(mca_sbgp_ibnet_component.verbose >= level) { \ - mca_sbgp_ibnet_err("[%s]%s[%s:%d:%s] IBNET ", \ - ompi_process_info.nodename, \ - OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ - __FILE__, __LINE__, __func__); \ - mca_sbgp_ibnet_err args; \ - mca_sbgp_ibnet_err("\n"); \ - } \ - } while(0); -#else -#define IBNET_VERBOSE(level, args) -#endif - -#define MCA_SBGP_IBNET_PKEY_MASK 0x7fff - -/* Error and verbose prints - end */ - -/* This routine is used to find the list of procs that run on the - ** same host as the calling process. - */ -mca_sbgp_base_module_t *mca_sbgp_ibnet_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, struct ompi_communicator_t *comm, char *key, void *output_data); - -/** - * Global component instance - */ -OMPI_MODULE_DECLSPEC extern mca_sbgp_ibnet_component_t mca_sbgp_ibnet_component; - - -END_C_DECLS - -#endif /* MCA_BCOL_ibnet_EXPORT_H */ diff --git a/ompi/mca/sbgp/ibnet/sbgp_ibnet_component.c b/ompi/mca/sbgp/ibnet/sbgp_ibnet_component.c deleted file mode 100644 index 15df331ad30..00000000000 --- a/ompi/mca/sbgp/ibnet/sbgp_ibnet_component.c +++ /dev/null @@ -1,600 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include "infiniband/verbs.h" -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "opal/util/argv.h" -#include "opal/include/opal/types.h" -#include "opal_stdint.h" -#include "sbgp_ibnet.h" -#include "sbgp_ibnet_mca.h" -#include "ompi/mca/common/ofacm/base.h" -#include "ompi/mca/common/ofacm/connect.h" -#include "ompi/mca/common/verbs/common_verbs.h" - -/* - * Public string showing the coll ompi_sm V2 component version number - */ -const char *mca_sbgp_ibnet_component_version_string = - "Open MPI sbgp - ibnet collective MCA component version " OMPI_VERSION; - -/* - * Local functions - */ - -static int mca_sbgp_ibnet_open(void); -static int mca_sbgp_ibnet_close(void); -static int mca_sbgp_ibnet_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_sbgp_ibnet_component_t mca_sbgp_ibnet_component = { - - /* First, fill in the super */ - - { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .sbgp_version = { - MCA_SBGP_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "ibnet", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = mca_sbgp_ibnet_open, - .mca_close_component = mca_sbgp_ibnet_close, - .mca_register_component_params = mca_sbgp_ibnet_register_params, - }, - - .sbgp_init_query = mca_sbgp_ibnet_init_query, - .select_procs =mca_sbgp_ibnet_select_procs, - .priority = 0, - }, - - /* verbose mode */ - false, - - /* Maximum allowed number of subroups*/ - 0, - - /* Enable disable default subnet id warning */ - false, - false, - - /* IB MTU requested by user */ - 0, - - /* IB partition definition */ - 0, - - /* Keeping hca data */ - NULL, - NULL, - NULL, - NULL, - - /** Dummy argv-style list; a copy of names from the - if_[in|ex]clude list that we use for error checking (to ensure - that they all exist) */ - NULL, -}; - -static int mca_sbgp_ibnet_dummy_init_query( - bool enable_progress_threads, bool enable_mpi_threads) -{ - return OMPI_SUCCESS; -} - -/* - * Open the component - */ -static int mca_sbgp_ibnet_open(void) -{ - /* local variables */ - mca_sbgp_ibnet_component_t *cs = &mca_sbgp_ibnet_component; - - mca_sbgp_ibnet_component.pkey_val &= SBGP_IBNET_IB_PKEY_MASK; - - cs->total_active_ports = 0; - cs->curr_max_group_id = 100; - - OBJ_CONSTRUCT(&cs->devices, opal_list_t); - - return OMPI_SUCCESS; -} - -/* - * Close the component - */ -static int mca_sbgp_ibnet_close(void) -{ - mca_sbgp_ibnet_component_t *cs = &mca_sbgp_ibnet_component; - - OBJ_DESTRUCT(&cs->devices); - - return OMPI_SUCCESS; -} - -static void mca_sbgp_ibnet_device_constructor - (mca_sbgp_ibnet_device_t *device) -{ - /* Init OFACM stuf */ - device->ib_dev = NULL; - device->device_index = -1; - device->num_act_ports = 0; - memset(&device->ib_dev_attr, 0, sizeof(struct ibv_device_attr)); - device->cpcs= NULL; - device->num_cpcs = 0; - device->ports = NULL; -} - -static void mca_sbgp_ibnet_device_destructor - (mca_sbgp_ibnet_device_t *device) -{ - /* release memory */ - if (NULL != device->ports) { - free(device->ports); - } -} - -OBJ_CLASS_INSTANCE(mca_sbgp_ibnet_device_t, - opal_list_item_t, - mca_sbgp_ibnet_device_constructor, - mca_sbgp_ibnet_device_destructor); - -static int -get_port_list(mca_sbgp_ibnet_device_t *device, int *allowed_ports) -{ - char *name; - const char *dev_name; - int i, j, k, num_ports = 0; - - dev_name = ibv_get_device_name(device->ib_dev); - name = (char*) malloc(strlen(dev_name) + 4); - if (NULL == name) { - return 0; - } - - num_ports = 0; - if (NULL != mca_sbgp_ibnet_component.if_include_list) { - /* If only the device name is given (eg. mtdevice0,mtdevice1) use all - ports */ - i = 0; - - while (mca_sbgp_ibnet_component.if_include_list[i]) { - if (0 == strcmp(dev_name, - mca_sbgp_ibnet_component.if_include_list[i])) { - num_ports = device->ib_dev_attr.phys_port_cnt; - - IBNET_VERBOSE(10, ("if_include_list - %s.\n", mca_sbgp_ibnet_component.if_include_list[i])); - goto done; - } - ++i; - } - - /* Include only requested ports on the device */ - for (i = 1; i <= device->ib_dev_attr.phys_port_cnt; ++i) { - sprintf(name, "%s:%d", dev_name, i); - - for (j = 0; - NULL != mca_sbgp_ibnet_component.if_include_list[j]; ++j) { - if (0 == strcmp(name, - mca_sbgp_ibnet_component.if_include_list[j])) { - - IBNET_VERBOSE(10, ("Allowed port %d: idx %d; if_include_list - %s\n", - i, num_ports, mca_sbgp_ibnet_component.if_include_list[j])); - - allowed_ports[num_ports++] = i; - break; - } - } - } - } else if (NULL != mca_sbgp_ibnet_component.if_exclude_list) { - /* If only the device name is given (eg. mtdevice0,mtdevice1) exclude - all ports */ - i = 0; - while (mca_sbgp_ibnet_component.if_exclude_list[i]) { - if (0 == strcmp(dev_name, - mca_sbgp_ibnet_component.if_exclude_list[i])) { - num_ports = 0; - goto done; - } - ++i; - } - /* Exclude the specified ports on this device */ - for (i = 1; i <= device->ib_dev_attr.phys_port_cnt; ++i) { - sprintf(name,"%s:%d",dev_name,i); - for (j = 0; - NULL != mca_sbgp_ibnet_component.if_exclude_list[j]; ++j) { - if (0 == strcmp(name, - mca_sbgp_ibnet_component.if_exclude_list[j])) { - /* If found, set a sentinel value */ - j = -1; - break; - } - } - /* If we didn't find it, it's ok to include in the list */ - if (-1 != j) { - allowed_ports[num_ports++] = i; - } - } - } else { - /* Assume that all ports are allowed. num_ports will be adjusted - below to reflect whether this is true or not. */ - for (i = 1; i <= device->ib_dev_attr.phys_port_cnt; ++i) { - allowed_ports[num_ports++] = i; - } - } - -done: - - /* Remove the following from the error-checking if_list: - - bare device name - - device name suffixed with port number */ - if (NULL != mca_sbgp_ibnet_component.if_list) { - for (i = 0; NULL != mca_sbgp_ibnet_component.if_list[i]; ++i) { - /* Look for raw device name */ - if (0 == strcmp(mca_sbgp_ibnet_component.if_list[i], dev_name)) { - j = opal_argv_count(mca_sbgp_ibnet_component.if_list); - opal_argv_delete(&j, &(mca_sbgp_ibnet_component.if_list), - i, 1); - --i; - } - } - - for (i = 1; i <= device->ib_dev_attr.phys_port_cnt; ++i) { - sprintf(name, "%s:%d", dev_name, i); - for (j = 0; NULL != mca_sbgp_ibnet_component.if_list[j]; ++j) { - if (0 == strcmp(mca_sbgp_ibnet_component.if_list[j], name)) { - k = opal_argv_count(mca_sbgp_ibnet_component.if_list); - opal_argv_delete(&k, &(mca_sbgp_ibnet_component.if_list), - j, 1); - --j; - break; - } - } - } - } - - free(name); - - return num_ports; -} - -static int ibnet_init_port(struct mca_sbgp_ibnet_device_t *device, - int port_index, struct ibv_port_attr *ib_port_attr, - struct ibv_context *ib_dev_context) -{ - union ibv_gid gid; - struct mca_sbgp_ibnet_port_t *p = &device->ports[port_index]; - - /* Set port data */ - p->lmc = (1 << ib_port_attr->lmc); - p->lid = ib_port_attr->lid; - p->stat = ib_port_attr->state; - p->mtu = ib_port_attr->active_mtu; - - IBNET_VERBOSE(10, ("Setting port data (%s:%d) lid=%d, lmc=%d, stat=%d, mtu=%d\n", - ibv_get_device_name(device->ib_dev), p->id, p->lid, - p->lmc, p->stat, p->mtu)); - - if (0 != ibv_query_gid(ib_dev_context, p->id, 0, &gid)) { - IBNET_ERROR(("ibv_query_gid failed (%s:%d)\n", - ibv_get_device_name(device->ib_dev), p->id)); - return OMPI_ERR_NOT_FOUND; - } - /* set subnet data */ - p->subnet_id = ntoh64(gid.global.subnet_prefix); - -/* p->subnet_id = gid.global.subnet_prefix; */ - - IBNET_VERBOSE(10, ("my IB-only subnet_id for HCA %d %s port %d is %lx\n" PRIx64, - gid.global.subnet_prefix,ibv_get_device_name(device->ib_dev), p->id, p->subnet_id)); - - return OMPI_SUCCESS; -} - -/* Find active port */ -static mca_sbgp_ibnet_device_t* ibnet_load_ports(struct ibv_device *ib_dev, int device_index) -{ - struct ibv_context *ib_dev_context = NULL; - mca_sbgp_ibnet_device_t *device = NULL; - int *allowed_ports = NULL; - int rc, port_cnt, port, i, ret, p = 0; - -#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) - if (IBV_TRANSPORT_IB != ib_dev->transport_type) { - IBNET_VERBOSE(10, ("Skipping non IB device %s", - ibv_get_device_name(ib_dev))); - goto error; - } -#endif - - device = OBJ_NEW(mca_sbgp_ibnet_device_t); - device->ib_dev = ib_dev; - device->device_index = device_index; - ib_dev_context = ibv_open_device(ib_dev); - - if(NULL == ib_dev_context) { - IBNET_ERROR(("Error obtaining device context for %s errno says %s", - ibv_get_device_name(device->ib_dev), strerror(errno))); - goto error; - } - - if(ibv_query_device(ib_dev_context, &device->ib_dev_attr)) { - IBNET_ERROR(("error obtaining device attributes for %s errno says %s", - ibv_get_device_name(ib_dev), strerror(errno))); - goto error; - } - - allowed_ports = (int *) calloc(device->ib_dev_attr.phys_port_cnt, sizeof(int)); - if (NULL == allowed_ports) { - goto error; - } - - port_cnt = get_port_list(device, allowed_ports); - if (0 == port_cnt) { - goto error; - } - -#if OPAL_ENABLE_DEBUG - for (i = 0; i < port_cnt; ++i) { - IBNET_VERBOSE(10, ("allowed port %d with idx %d.\n", allowed_ports[i], i)); - } -#endif - - device->num_allowed_ports = port_cnt; - device->ports = (mca_sbgp_ibnet_port_t *) calloc(port_cnt, sizeof(mca_sbgp_ibnet_port_t)); - if (NULL == device->ports) { - goto error; - } - - /* Note ports are 1 based (i >= 1) */ - for(port = 0; port < port_cnt; port++) { - struct ibv_port_attr ib_port_attr; - - i = allowed_ports[port]; - if(ibv_query_port(ib_dev_context, i, &ib_port_attr)){ - IBNET_ERROR(("Error getting port attributes for device %s " - "port number %d errno says %s", - ibv_get_device_name(device->ib_dev), i, strerror(errno))); - continue; - } - - if(IBV_PORT_ACTIVE == ib_port_attr.state) { - /* Pasha: Need to think how we want to handle MTUs - if (ib_port_attr.active_mtu < mca_bcol_iboffload_component.mtu){ - device->mtu = ib_port_attr.active_mtu; - } - */ - /* start to put port info */ - device->ports[p].id = i; - device->ports[p].stat = ib_port_attr.state; - device->ports[p].mtu = ib_port_attr.active_mtu; - - device->ports[p].used = true; - - if (0 == mca_sbgp_ibnet_component.pkey_val) { - ret = ibnet_init_port(device, p, &ib_port_attr, ib_dev_context); - if (OMPI_SUCCESS != ret) { - IBNET_ERROR(("Device %s " - "port number %d , failed to init port, errno says %s", - ibv_get_device_name(device->ib_dev), - i, strerror(errno))); - continue; - } - } else { - uint16_t pkey,j; - device->ports[p].used = false; - - for (j = 0; j < device->ib_dev_attr.max_pkeys; j++) { - if(ibv_query_pkey(ib_dev_context, i, j, &pkey)){ - IBNET_ERROR(("error getting pkey for index %d, device %s " - "port number %d errno says %s", - j, ibv_get_device_name(device->ib_dev), i, strerror(errno))); - continue; - } - - pkey = ntohs(pkey) & MCA_SBGP_IBNET_PKEY_MASK; - if (pkey == (uint32_t) mca_sbgp_ibnet_component.pkey_val){ - ret = ibnet_init_port(device, p, &ib_port_attr, ib_dev_context); - if (OMPI_SUCCESS != ret) { - IBNET_ERROR(("Device %s " - "port number %d , failed to init port, errno says %s", - ibv_get_device_name(device->ib_dev), - i, strerror(errno))); - continue; - } - } - } - } - - p++; /* One port was loaded, go to the next one */ - } - } - - device->num_act_ports = p; - /* Update total number of active ports */ - mca_sbgp_ibnet_component.total_active_ports += p; - - if (0 != device->num_act_ports) { - ompi_common_ofacm_base_dev_desc_t dev; - /* Init dev */ - dev.ib_dev = ib_dev; - dev.ib_dev_context = ib_dev_context; - dev.capabilities = 0; - - rc = ompi_common_ofacm_base_select_for_local_port( - &dev, &device->cpcs, (int *)&device->num_cpcs); - /* If we get NOT_SUPPORTED, then no CPC was found for this - port. But that's not a fatal error -- just keep going; - let's see if we find any usable openib modules or not. */ - if (OMPI_SUCCESS != rc) { - /* All others *are* fatal. Note that we already did a - show_help in the lower layer */ - IBNET_VERBOSE(10, ("Device %s, no CPC found", - ibv_get_device_name(device->ib_dev))); - goto error; - } - } - - /* we do not continue to use the device we just collect data, - * so close it for now. We will open it later in iboffload coll*/ - if(ibv_close_device(ib_dev_context)) { - IBNET_ERROR(("Device %s, failed to close the device %s", - ibv_get_device_name(device->ib_dev), strerror(errno))); - } - - if (0 == device->num_act_ports) { - goto error; - } - - /* Pasha - I do not like the error flow here */ - free(allowed_ports); - - return device; - -error: - - if (NULL != allowed_ports) { - free(allowed_ports); - } - - OBJ_DESTRUCT(device); - - return NULL; -} - -/* Create list of IB hca that have active port */ -static int ibnet_load_devices(void) -{ - int num_devs, i; - struct ibv_device **ib_devs = NULL; - - mca_sbgp_ibnet_device_t *device = NULL; - mca_sbgp_ibnet_component_t *cs = &mca_sbgp_ibnet_component; - - IBNET_VERBOSE(7, ("Entering to ibnet_load_devices")); - - /* Get list of devices */ - ib_devs = ompi_ibv_get_device_list(&num_devs); - - if(0 == num_devs || NULL == ib_devs) { - IBNET_VERBOSE(10, ("No ib devices found")); - /* No hca error*/ - opal_show_help("help-mpi-btl-base.txt", "btl:no-nics", true); - return OMPI_ERROR; - } - - for (i = 0; i < num_devs; i++) { - device = ibnet_load_ports(ib_devs[i], i); - if (NULL != device) { - IBNET_VERBOSE(10, ("Device %s was appended to device list with index %d.\n", - ibv_get_device_name(device->ib_dev), i)); - opal_list_append(&cs->devices, - (opal_list_item_t *) device); - } - } - - if (opal_list_is_empty(&cs->devices)) { - /* No relevand devices were found, return error */ - IBNET_ERROR(("No active devices found")); - return OMPI_ERROR; - /* Maybe need to add error here*/ - } - - ompi_ibv_free_device_list(ib_devs); - - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_sbgp_ibnet_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - int rc, list_count = 0; - - /* Parse the include and exclude lists, checking for errors */ - mca_sbgp_ibnet_component.if_list = NULL; - mca_sbgp_ibnet_component.if_include_list = NULL; - mca_sbgp_ibnet_component.if_exclude_list = NULL; - - IBNET_VERBOSE(7, ("Calling mca_sbgp_ibnet_init_query")); - - if (NULL != mca_sbgp_ibnet_component.if_include) { - list_count++; - } - - if (NULL != mca_sbgp_ibnet_component.if_exclude) { - list_count++; - } - - if (list_count > 1) { - IBNET_ERROR(("Bad --mca (if_include, if_exclude) parameters !")); - return OMPI_ERROR; - } else if (NULL != mca_sbgp_ibnet_component.if_include) { - mca_sbgp_ibnet_component.if_include_list = - opal_argv_split(mca_sbgp_ibnet_component.if_include, ','); - mca_sbgp_ibnet_component.if_list = - opal_argv_copy(mca_sbgp_ibnet_component.if_include_list); - } else if (NULL != mca_sbgp_ibnet_component.if_exclude) { - mca_sbgp_ibnet_component.if_exclude_list = - opal_argv_split(mca_sbgp_ibnet_component.if_exclude, ','); - mca_sbgp_ibnet_component.if_list = - opal_argv_copy(mca_sbgp_ibnet_component.if_exclude_list); - } - - /* Init CPC components */ - rc = ompi_common_ofacm_base_init(); - if (OMPI_SUCCESS != rc) { - return rc; - } - - /* Load all devices and active ports */ - rc = ibnet_load_devices(); - if (OMPI_SUCCESS != rc) { - return rc; - } - - mca_sbgp_ibnet_component.super.sbgp_init_query = - mca_sbgp_ibnet_dummy_init_query; - - return OMPI_SUCCESS; -} diff --git a/ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.c b/ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.c deleted file mode 100644 index a9c2553c0ef..00000000000 --- a/ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/bcol/bcol.h" -#include "ompi/mca/bcol/base/base.h" -#include "ompi/mca/common/ofacm/base.h" - -#include "sbgp_ibnet.h" -#include "sbgp_ibnet_mca.h" - -/* - * Local flags - */ -enum { - REGINT_NEG_ONE_OK = 0x01, - REGINT_GE_ZERO = 0x02, - REGINT_GE_ONE = 0x04, - REGINT_NONZERO = 0x08, - REGINT_MAX = 0x88 -}; - -enum { - REGSTR_EMPTY_OK = 0x01, - - REGSTR_MAX = 0x88 -}; - -static mca_base_var_enum_value_t mtu_values[] = { - {IBV_MTU_512, "256B"}, - {IBV_MTU_512, "512B"}, - {IBV_MTU_1024, "1k"}, - {IBV_MTU_2048, "2k"}, - {IBV_MTU_4096, "4k"}, - {0, NULL} -}; - -/* - * utility routine for string parameter registration - */ -static int reg_string(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - const char* default_value, char **storage, - int flags) -{ - int index; - - /* the MCA variable system will not change this value */ - *storage = (char *) default_value; - index = mca_base_component_var_register(&mca_sbgp_ibnet_component.super.sbgp_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_STRING, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "sbgp", "ibnet", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGSTR_EMPTY_OK) && (NULL == *storage || 0 == strlen(*storage))) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -/* - * utility routine for integer parameter registration - */ -static int reg_int(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - int default_value, int *storage, int flags) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_sbgp_ibnet_component.super.sbgp_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_INT, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "sbgp", "ibnet", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - if (0 != (flags & REGINT_NEG_ONE_OK) && -1 == *storage) { - return OMPI_SUCCESS; - } - - if ((0 != (flags & REGINT_GE_ZERO) && *storage < 0) || - (0 != (flags & REGINT_GE_ONE) && *storage < 1) || - (0 != (flags & REGINT_NONZERO) && 0 == *storage)) { - opal_output(0, "Bad parameter value for parameter \"%s\"", - param_name); - return OMPI_ERR_BAD_PARAM; - } - - return OMPI_SUCCESS; -} - -/* - * utility routine for boolean parameter registration - */ -static int reg_bool(const char* param_name, - const char* deprecated_param_name, - const char* param_desc, - bool default_value, bool *storage) -{ - int index; - - *storage = default_value; - index = mca_base_component_var_register(&mca_sbgp_ibnet_component.super.sbgp_version, - param_name, param_desc, MCA_BASE_VAR_TYPE_BOOL, - NULL, 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - if (NULL != deprecated_param_name) { - (void) mca_base_var_register_synonym(index, "ompi", "sbgp", "ibnet", deprecated_param_name, - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - } - - return OMPI_SUCCESS; -} - -int mca_sbgp_ibnet_register_params(void) -{ - mca_base_var_enum_t *new_enum; - char *msg; - int ret, tmp; - - ret = OMPI_SUCCESS; - -#define CHECK(expr) do { \ - tmp = (expr); \ - if (OMPI_SUCCESS != tmp) ret = tmp; \ - } while (0) - - /* register openib component parameters */ - - CHECK(reg_int("priority", NULL, - "IB offload component priority" - "(from 0(low) to 90 (high))", 90, &mca_sbgp_ibnet_component.super.priority, 0)); - - CHECK(reg_int("verbose", NULL, - "Output some verbose IB offload BTL information " - "(0 = no output, nonzero = output)", 0, &mca_sbgp_ibnet_component.verbose, 0)); - - CHECK(reg_bool("warn_default_gid_prefix", NULL, - "Warn when there is more than one active ports and at least one of them connected to the network with only default GID prefix configured (0 = do not warn; any other value = warn)", - true, &mca_sbgp_ibnet_component.warn_default_gid_prefix)); - CHECK(reg_bool("warn_nonexistent_if", NULL, - "Warn if non-existent devices and/or ports are specified in the sbgp_ibnet_if_[in|ex]clude MCA parameters (0 = do not warn; any other value = warn)", - true, &mca_sbgp_ibnet_component.warn_nonexistent_if)); - - CHECK(reg_int("max_sbgps", NULL, - "Maximum allowed number of subroups", - 100, &mca_sbgp_ibnet_component.max_sbgps, 0)); - - CHECK(reg_int("pkey", "ib_pkey_val", - "OpenFabrics partition key (pkey) value. " - "Unsigned integer decimal or hex values are allowed (e.g., \"3\" or \"0x3f\") and will be masked against the maximum allowable IB paritition key value (0x7fff)", - 0, &mca_sbgp_ibnet_component.pkey_val, 0)); - mca_sbgp_ibnet_component.pkey_val &= SBGP_IBNET_IB_PKEY_MASK; - - asprintf(&msg, "OpenFabrics MTU, in bytes (if not specified in INI files). Valid values are: %d=256 bytes, %d=512 bytes, %d=1024 bytes, %d=2048 bytes, %d=4096 bytes", - IBV_MTU_256, - IBV_MTU_512, - IBV_MTU_1024, - IBV_MTU_2048, - IBV_MTU_4096); - if (NULL == msg) { - /* Don't try to recover from this */ - return OMPI_ERR_OUT_OF_RESOURCE; - } - - CHECK(mca_base_var_enum_create("sbgp_ibnet_mtu", mtu_values, &new_enum)); - if (OPAL_SUCCESS != ret) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - mca_sbgp_ibnet_component.mtu = IBV_MTU_1024; - ret = mca_base_component_var_register(&mca_sbgp_ibnet_component.super.sbgp_version, - "mtu", msg, MCA_BASE_VAR_TYPE_INT, new_enum, - 0, 0, OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, &mca_sbgp_ibnet_component.mtu); - OBJ_RELEASE(new_enum); - free(msg); - - if (0 > ret) { - return ret; - } - - (void) mca_base_var_register_synonym(ret, "ompi", "sbgp", "ibnet", "ib_mtu", - MCA_BASE_VAR_SYN_FLAG_DEPRECATED); - - CHECK(reg_string("if_include", NULL, - "Comma-delimited list of devices/ports to be used (e.g. \"mthca0,mthca1:2\"; empty value means to use all ports found). Mutually exclusive with sbgp_ibnet_if_exclude.", - NULL, &mca_sbgp_ibnet_component.if_include, - 0)); - - CHECK(reg_string("if_exclude", NULL, - "Comma-delimited list of device/ports to be excluded (empty value means to not exclude any ports). Mutually exclusive with sbgp_ibnet_if_include.", - NULL, &mca_sbgp_ibnet_component.if_exclude, - 0)); - - /* Register any MCA params for the connect pseudo-components */ - if (OMPI_SUCCESS == ret) { - ret = ompi_common_ofacm_base_register(&mca_sbgp_ibnet_component.super.sbgp_version); - } - - return ret; -} diff --git a/ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.h b/ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.h deleted file mode 100644 index 58fd8adcb2c..00000000000 --- a/ompi/mca/sbgp/ibnet/sbgp_ibnet_mca.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - /** @file */ - -#ifndef MCA_SBGP_IBNET_MCA_H -#define MCA_SBGP_IBNET_MCA_H - -#include -#include "ompi_config.h" - -#define SBGP_IBNET_IB_PKEY_MASK 0x7fff - -int mca_sbgp_ibnet_register_params(void); - -#endif diff --git a/ompi/mca/sbgp/ibnet/sbgp_ibnet_module.c b/ompi/mca/sbgp/ibnet/sbgp_ibnet_module.c deleted file mode 100644 index fa5d54d1716..00000000000 --- a/ompi/mca/sbgp/ibnet/sbgp_ibnet_module.c +++ /dev/null @@ -1,1029 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#include -#include -#include -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/sbgp/ibnet/sbgp_ibnet.h" -#include "ompi/mca/common/ofacm/base.h" -#include "ompi/mca/common/ofacm/connect.h" -#include "ompi/patterns/comm/coll_ops.h" -/* - * Unused -static int ibnet_module_enable(mca_sbgp_base_module_t *module, - struct ompi_communicator_t *comm); - -*/ - -/* - * Local functions - */ -static void -mca_sbgp_ibnet_module_construct(mca_sbgp_ibnet_module_t *module) -{ - module->cgroups = NULL; - module->group_id = 0; -} - -static void -mca_sbgp_ibnet_module_destruct(mca_sbgp_ibnet_module_t *module) -{ - -} - -OBJ_CLASS_INSTANCE(mca_sbgp_ibnet_module_t, - mca_sbgp_base_module_t, - mca_sbgp_ibnet_module_construct, - mca_sbgp_ibnet_module_destruct); - -static void -mca_sbgp_ibnet_proc_construct(mca_sbgp_ibnet_proc_t *proc) -{ - /* done */ - proc->ompi_proc = 0; - proc->num_ports = 0; - proc->use_port = NULL; - proc->remote_ports_info = NULL; - proc->duty = MCA_SBGP_IBNET_NONE; -} - -static void -mca_sbgp_ibnet_proc_destruct(mca_sbgp_ibnet_proc_t *proc) -{ - /* done */ - if (NULL != proc->remote_ports_info) { - free(proc->remote_ports_info); - /* Pasha: need to check if we need - * to release some data from inside of the proc*/ - } - - if (NULL != proc->use_port) { - free(proc->use_port); - } -} - -OBJ_CLASS_INSTANCE(mca_sbgp_ibnet_proc_t, - opal_list_item_t, - mca_sbgp_ibnet_proc_construct, - mca_sbgp_ibnet_proc_destruct); - - -/* Pack all data to gather buffer */ -static int pack_gather_sbuff(char* sbuffer) -{ - int port, cpc; - coll_offload_support coll_offload_flag = OFFLOAD_CONNECTX_B0; /**< Pasha: add query for collectives offload support */ - - char* pack_ptr = sbuffer; - - mca_sbgp_ibnet_device_t *device = NULL; - uint32_t my_rank = ompi_process_info.my_name.vpid; - opal_list_t *devices = &mca_sbgp_ibnet_component.devices; - - /* Message format: - * - my rank (uint32_t) - * - number of active ports (uint32_t) - * - for each active port: - * + lid (uint16_t) - * + subnetid (uint64_t) - * + mtu (uint32_t) - * + colloffload (uint8_t) - * + num of cpcs (uint8_t) - * + for each cpc: (uint8_t) - * * cpc index (uint8_t) - * * cpc priority (uint8_t) - * * cpc buffer len (uint8_t) - * * cpc buffer (byte * buffer_len) - * - */ - - /* Start to put data */ - - /* Pack my rank , I need it because allgather doesn't work as expected */ - IBNET_VERBOSE(10, ("Send pack rank = %d\n", my_rank)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint32_t))); - - memcpy(pack_ptr, &my_rank, sizeof(uint32_t)); - pack_ptr += sizeof(uint32_t); - - /* Put number of ports that we send */ - IBNET_VERBOSE(10, ("Send pack num of ports = %d\n", mca_sbgp_ibnet_component.total_active_ports)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint32_t))); - - memcpy(pack_ptr, &mca_sbgp_ibnet_component.total_active_ports, sizeof(uint32_t)); - pack_ptr += sizeof(uint32_t); - - /* Go through list of device and build the message*/ - for (device = (mca_sbgp_ibnet_device_t *) opal_list_get_first(devices); - device != (mca_sbgp_ibnet_device_t *) opal_list_get_end(devices); - device = (mca_sbgp_ibnet_device_t *) opal_list_get_next((opal_list_item_t *)device)) { - for (port = 0; port < device->num_allowed_ports; ++port) { - if (!device->ports[port].used) { - continue; - } - - /* put port num */ - IBNET_VERBOSE(10, ("Send pack port num = %d\n", device->ports[port].id)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint16_t))); - - memcpy(pack_ptr, &device->ports[port].id, sizeof(uint16_t)); - pack_ptr += sizeof(uint16_t); - - /* put lid */ - IBNET_VERBOSE(10, ("Send pack lid = %d\n", device->ports[port].lid)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint16_t))); - - memcpy(pack_ptr, &device->ports[port].lid, sizeof(uint16_t)); - pack_ptr += sizeof(uint16_t); - - /* put subnetid */ - IBNET_VERBOSE(10, ("Send pack subnet id = %lx\n", device->ports[port].subnet_id)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint64_t))); - - memcpy(pack_ptr, &device->ports[port].subnet_id, sizeof(uint64_t)); - pack_ptr += sizeof(uint64_t); - - /* put default mtu */ - IBNET_VERBOSE(10, ("Send pack MTU = %d\n", device->ports[port].mtu)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint32_t))); - - memcpy(pack_ptr, &device->ports[port].mtu, sizeof(uint32_t)); - pack_ptr += sizeof(uint32_t); - - /* collectives offload support */ - IBNET_VERBOSE(10, ("Send pack collectives offload = %d\n", OFFLOAD_CONNECTX_B0)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint8_t))); - - /* Pasha: add query for collectives offload support */ - memcpy(pack_ptr, &coll_offload_flag, sizeof(uint8_t)); - pack_ptr += sizeof(uint8_t); - - /* number of cpcs for this port */ - IBNET_VERBOSE(10, ("Send pack number of cpcs = %d\n", device->num_cpcs)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint8_t))); - - memcpy(pack_ptr, &device->num_cpcs, sizeof(uint8_t)); - pack_ptr += sizeof(uint8_t); - - for (cpc = 0; cpc < device->num_cpcs; cpc++) { - uint8_t cpc_index; - uint8_t cpc_buflen; - - /* cpc index */ - cpc_index = ompi_common_ofacm_base_get_cpc_index(device->cpcs[cpc]->data.cbm_component); - - IBNET_VERBOSE(10, ("Send pack cpc index = %d\n", cpc_index)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint8_t))); - - memcpy(pack_ptr, &cpc_index, sizeof(uint8_t)); - pack_ptr += sizeof(uint8_t); - - /* cpc priority */ - IBNET_VERBOSE(10, ("Send pack cpc priority = %d\n", - device->cpcs[cpc]->data.cbm_priority)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint8_t))); - - memcpy(pack_ptr, &device->cpcs[cpc]->data.cbm_priority, sizeof(uint8_t)); - pack_ptr += sizeof(uint8_t); - - /* cpc buffer length in bytes */ - cpc_buflen = device->cpcs[cpc]->data.cbm_modex_message_len; - - IBNET_VERBOSE(10, ("Send pack cpc message len = %d\n", cpc_buflen)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint8_t))); - - memcpy(pack_ptr, &cpc_buflen, sizeof(uint8_t)); - pack_ptr += sizeof(uint8_t); - - /* cpc buffer */ - if (0 != cpc_buflen) { - IBNET_VERBOSE(10, ("Send pack cpc buffer len = %d\n", cpc_buflen)); - IBNET_VERBOSE(10, ("packing %d of %d\n", 1, sizeof(uint8_t))); - - memcpy(pack_ptr, device->cpcs[cpc]->data.cbm_modex_message, cpc_buflen); - pack_ptr += (size_t) cpc_buflen; - } - } - } - } - - return OMPI_SUCCESS; -} - -/* Translation vpid to ompi_proc */ -static int vpid_to_proc(ompi_vpid_t vpid, - struct ompi_proc_t ** procs, int n_procs_in, ompi_proc_t** out_proc) -{ - int i; - for (i = 0; i < n_procs_in; i++) { - if (vpid == procs[i]->proc_name.vpid) { - *out_proc = procs[i]; - return i; - } - } - - return OMPI_ERROR; -} - -static int unpack_and_load_gather_rbuff(char *rbuffer, int max_sent_bytes, - struct ompi_proc_t ** procs, int n_procs_in, opal_list_t *peers_data) -{ - - int i; - char* unpack_ptr; - - /* Message format: - * - my rank (uint32_t) - * - number of active ports (uint32_t) - * - for each active port: - * + lid (uint16_t) - * + subnetid (uint64_t) - * + mtu (uint32_t) - * + colloffload (uint8_t) - * + num of cpcs (uint8_t) - * + for each cpc: (uint8_t) - * * cpc index (uint8_t) - * * cpc priority (uint8_t) - * * cpc buffer len (uint8_t) - * * cpc buffer (byte*buffer_len) - * - */ - - /* Start to unpack data */ - for(i = 0; i < n_procs_in; i++) { - uint32_t p; - mca_sbgp_ibnet_proc_t *ibnet_proc; - - unpack_ptr = rbuffer + (size_t) (i * max_sent_bytes); - - /* create new proc */ - ibnet_proc = OBJ_NEW(mca_sbgp_ibnet_proc_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint32_t))); - IBNET_VERBOSE(10, ("Recive remote rank %d\n", ibnet_proc->rank)); - - memcpy(&ibnet_proc->rank, unpack_ptr, sizeof(uint32_t)); - unpack_ptr += sizeof(uint32_t); - - /* set back pointer to ompi_proc */ - ibnet_proc->ompi_proc_index = - vpid_to_proc(ibnet_proc->rank, procs, - n_procs_in, &ibnet_proc->ompi_proc); - if (OMPI_ERROR == ibnet_proc->ompi_proc_index) { - return OMPI_ERROR; - } - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint32_t))); - IBNET_VERBOSE(10, ("Recive number of ports %d\n", ibnet_proc->num_ports)); - - memcpy(&ibnet_proc->num_ports, unpack_ptr, sizeof(uint32_t)); - unpack_ptr += sizeof(uint32_t); - - /* prepare place for port data*/ - ibnet_proc->remote_ports_info = calloc(ibnet_proc->num_ports, sizeof(mca_sbgp_ibnet_port_t)); - if (NULL == ibnet_proc->remote_ports_info) { - return OMPI_ERROR; - } - - /* load the data */ - for(p = 0; p < ibnet_proc->num_ports; p++) { - mca_sbgp_ibnet_port_t *port = &ibnet_proc->remote_ports_info[p]; - uint32_t cpc; - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint16_t))); - IBNET_VERBOSE(10, ("Recive id %d\n", port->id)); - - memcpy(&port->id, unpack_ptr, sizeof(uint16_t)); - unpack_ptr += sizeof(uint16_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint16_t))); - IBNET_VERBOSE(10, ("Recive lid %d\n", port->lid)); - - memcpy(&port->lid, unpack_ptr, sizeof(uint16_t)); - unpack_ptr += sizeof(uint16_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint64_t))); - IBNET_VERBOSE(10, ("Recive subnet id %lx\n", port->subnet_id)); - - memcpy(&port->subnet_id, unpack_ptr, sizeof(uint64_t)); - unpack_ptr += sizeof(uint64_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint32_t))); - IBNET_VERBOSE(10, ("Recive mtu %d\n", port->mtu)); - - memcpy(&port->mtu, unpack_ptr, sizeof(uint32_t)); - unpack_ptr += sizeof(uint32_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint8_t))); - IBNET_VERBOSE(10, ("Recive offload %d\n", port->coll_offload)); - - memcpy(&port->coll_offload, unpack_ptr, sizeof(uint8_t)); - unpack_ptr += sizeof(uint8_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint8_t))); - IBNET_VERBOSE(10, ("Recive number of cpcs %d\n", port->num_cpcs)); - - memcpy(&port->num_cpcs, unpack_ptr, sizeof(uint8_t)); - unpack_ptr += sizeof(uint8_t); - - port->pm_cpc_data = calloc(port->num_cpcs, - sizeof(ompi_common_ofacm_base_module_data_t)); - if (NULL == port->pm_cpc_data) { - return OMPI_ERROR; - } - - /* load cpc data */ - for (cpc = 0; cpc < port->num_cpcs; cpc++) { - ompi_common_ofacm_base_module_data_t *cpc_data = - &port->pm_cpc_data[cpc]; - uint8_t cpc_index = -1; - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint8_t))); - IBNET_VERBOSE(10, ("Recive cpc index %d\n", cpc_index)); - - memcpy(&cpc_index, unpack_ptr, sizeof(uint8_t)); - unpack_ptr += sizeof(uint8_t); - - cpc_data->cbm_component = - ompi_common_ofacm_base_get_cpc_byindex(cpc_index); - if (NULL == cpc_data->cbm_component) { - IBNET_VERBOSE(10, ("Failed to resolve cpc index %d\n", cpc_index)); - return OMPI_ERROR; - } - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint8_t))); - IBNET_VERBOSE(10, ("Recive priority %d\n", cpc_data->cbm_priority)); - - memcpy(&cpc_data->cbm_priority, unpack_ptr, sizeof(uint8_t)); - unpack_ptr += sizeof(uint8_t); - - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, 1, sizeof(uint8_t))); - IBNET_VERBOSE(10, ("Recive cpc message len %d\n", cpc_data->cbm_modex_message_len)); - - memcpy(&cpc_data->cbm_modex_message_len, unpack_ptr, sizeof(uint8_t)); - unpack_ptr += sizeof(uint8_t); - - if (0 != cpc_data->cbm_modex_message_len) { - int cpc_buflen = cpc_data->cbm_modex_message_len; - - IBNET_VERBOSE(10, ("Recive cpc message data with len %d\n", cpc_buflen)); - IBNET_VERBOSE(10, ("element=%d unpacking %d of %d\n", i, cpc_buflen, cpc_buflen)); - - memcpy(&cpc_data->cbm_modex_message, unpack_ptr, cpc_buflen); - unpack_ptr += (size_t) cpc_buflen; - } - } - } - - /* Put the new proc to the list */ - opal_list_append(peers_data, (opal_list_item_t*) ibnet_proc); - } - - assert((uint32_t) n_procs_in == opal_list_get_size(peers_data)); - return OMPI_SUCCESS; -} - -static int cmp_cgroups(const void *p1, const void *p2) -{ - mca_sbgp_ibnet_connection_group_info_t *g1 = - (mca_sbgp_ibnet_connection_group_info_t *)p1; - mca_sbgp_ibnet_connection_group_info_t *g2 = - (mca_sbgp_ibnet_connection_group_info_t *)p2; - return (g2->num_procs - g1->num_procs); -} - -static int set_ibnet_proc_on_cgroup( - mca_sbgp_ibnet_connection_group_info_t *cgroup, - mca_sbgp_ibnet_proc_t *ibnet_proc, - mca_sbgp_ibnet_device_t *device, - mca_sbgp_ibnet_module_t *module) -{ - uint32_t p; - int k, rc, p_indx; /* port index in array of device */ - - for (p_indx = 0; p_indx < device->num_allowed_ports; ++p_indx) { - if (cgroup->port == device->ports[p_indx].id) { - break; - } - } - - assert(device->num_act_ports > p_indx); - - if (NULL == ibnet_proc->use_port) { - ibnet_proc->use_port = calloc(module->num_cgroups, sizeof(int)); - if (NULL == ibnet_proc->use_port) { - IBNET_ERROR(("Failed to allocate use_port array.")); - return OMPI_ERROR; - } - } - - IBNET_VERBOSE(10, ("Local port is %d, idx - %d.\n", - device->ports[p_indx].id, p_indx)); - - for(p = 0; p < ibnet_proc->num_ports; p++) { - if (device->ports[p_indx].subnet_id == - ibnet_proc->remote_ports_info[p].subnet_id) { - ompi_common_ofacm_base_module_t *local_cpc = NULL; - ompi_common_ofacm_base_module_data_t *remote_cpc_data = NULL; - /* check if we have matching cpc on both sides */ - if (OMPI_SUCCESS != - ompi_common_ofacm_base_find_match(device->cpcs, - device->num_cpcs, - ibnet_proc->remote_ports_info[p].pm_cpc_data, - ibnet_proc->remote_ports_info[p].num_cpcs, - &local_cpc, - &remote_cpc_data)) { - /* Failed to match, can not use the port */ - IBNET_VERBOSE(10, ("Failed to match, can not use the port - %d.\n", p + 1)); - continue; - } - - for (k = 0; k < module->num_cgroups && ((p + 1) != (uint32_t) ibnet_proc->use_port[k]); ++k) - ; - - if (k < module->num_cgroups) { - /* The port in use - another connection group use it */ - continue; - } - - /* It means that connection group 'cgroup' communicates with - this proc over its own remote port */ - ibnet_proc->use_port[cgroup->index] = p + 1; - /* if it is no group array we need to create it*/ - if(OPAL_UNLIKELY(NULL == cgroup->ibnet_procs)) { - cgroup->ibnet_procs = OBJ_NEW(opal_pointer_array_t); - rc = opal_pointer_array_init(cgroup->ibnet_procs, 10, INT_MAX, 10); - if (OPAL_SUCCESS != rc) { - IBNET_ERROR(("Failed to allocate opal_pointer_array")); - return OMPI_ERROR; - } - } - - IBNET_VERBOSE(10, ("Device idx %d, local port idx %d; " - "adding rank %d to the module %p, rem port %d", - device->device_index, p_indx, ibnet_proc->rank, - module, ibnet_proc->remote_ports_info[p].id)); - /* No need to remove: opal_list_remove_item(peers_data, (opal_list_item_t*)ibnet_proc); */ - rc = opal_pointer_array_set_item(cgroup->ibnet_procs, - /* num_selected, */ cgroup->num_procs, - (void *) ibnet_proc); - if (OPAL_SUCCESS != rc) { - IBNET_ERROR( ("Failed to set rank %d to index %d", - ibnet_proc->rank, 1 + cgroup->num_procs)); - return OMPI_ERROR; - } - - /* put selected cpc data to this proc */ - ibnet_proc->remote_ports_info[p].local_cpc = local_cpc; - ibnet_proc->remote_ports_info[p].remote_cpc_data = remote_cpc_data; - - ++cgroup->num_procs; - /* we done for the proc, go to next one */ - break; - } - } - - return OMPI_SUCCESS; -} - -static int setup_cgroup_all( - mca_sbgp_ibnet_connection_group_info_t *cgroup, - mca_sbgp_ibnet_device_t *device, - mca_sbgp_ibnet_module_t *module, - opal_list_t *peers_data) -{ - int rc; - mca_sbgp_ibnet_proc_t *ibnet_proc = NULL; - - for (ibnet_proc = (mca_sbgp_ibnet_proc_t *) opal_list_get_first(peers_data); - ibnet_proc != (mca_sbgp_ibnet_proc_t *) opal_list_get_end(peers_data); - ibnet_proc = (mca_sbgp_ibnet_proc_t *) - opal_list_get_next((opal_list_item_t *)ibnet_proc)) { - - rc = set_ibnet_proc_on_cgroup(cgroup, ibnet_proc, device, module); - if (OMPI_SUCCESS != rc) { - return rc; - } - } - - return OMPI_SUCCESS; -} - -static int setup_cgroup_node(mca_sbgp_ibnet_connection_group_info_t *cgroup, mca_sbgp_ibnet_device_t *device, - mca_sbgp_ibnet_module_t *module, opal_list_t *peers_data) -{ - int rc, local = 0; - mca_sbgp_ibnet_proc_t *ibnet_proc = NULL; - - for (ibnet_proc = (mca_sbgp_ibnet_proc_t *)opal_list_get_first(peers_data); - ibnet_proc != (mca_sbgp_ibnet_proc_t *)opal_list_get_end(peers_data); - ibnet_proc = (mca_sbgp_ibnet_proc_t *) - opal_list_get_next((opal_list_item_t *)ibnet_proc)) { - - local = OPAL_PROC_ON_LOCAL_NODE(ibnet_proc->ompi_proc->super.proc_flags); - if (0 == local) { - /* the remote process resides on different node */ - continue; - } - - /* the process resides on the same machine */ - rc = set_ibnet_proc_on_cgroup(cgroup, ibnet_proc, device, module); - if (OMPI_SUCCESS != rc) { - return rc; - } - } - - return OMPI_SUCCESS; -} - -/* The function should be the heart of the ibnet component. - * Main purpose: - * The function should run over list of all peers and select only "reachable" peers. - * Peer that have subnet_id equal to subnet id that I have on my ports is reachable. - * All peers that have the same number of active ports on the same subnet maybe grouped - * to subgroup? - * Need to think more about the select logic on this stage I just return list of all - * procs - */ -static int select_procs(mca_sbgp_ibnet_module_t *module, opal_list_t *peers_data) -{ - mca_sbgp_ibnet_device_t *device = NULL; - mca_sbgp_ibnet_proc_t *ibnet_proc = NULL; - mca_sbgp_ibnet_connection_group_info_t *cgroup = NULL; - - uint32_t p = 0; - int i = 0, j, rc = OMPI_SUCCESS; - int num_grouped = 0, - groups_to_use = 1; - - mca_sbgp_ibnet_component_t *cs = &mca_sbgp_ibnet_component; - - IBNET_VERBOSE(10, ("Start to select procs.\n")); - - module->num_cgroups = 0; - for (device = (mca_sbgp_ibnet_device_t *) opal_list_get_first(&cs->devices); - device != (mca_sbgp_ibnet_device_t *) opal_list_get_end(&cs->devices); - device = (mca_sbgp_ibnet_device_t *) - opal_list_get_next((opal_list_item_t *) device)) { - module->num_cgroups += device->num_act_ports; - IBNET_VERBOSE(10, ("Device num %d with index %d num of active ports %d\n", - ++i, device->device_index, device->num_act_ports)); - } - - module->cgroups = calloc(module->num_cgroups, - sizeof(mca_sbgp_ibnet_connection_group_info_t)); - - if (NULL == module->cgroups) { - IBNET_ERROR(("Failed to allocate cgroups")); - goto select_error; - } - - IBNET_VERBOSE(10, ("Num of cgroups - %d.\n", module->num_cgroups)); - - /* 1. Run over all active ports and build connection group - * for each one */ - for (device = (mca_sbgp_ibnet_device_t *) opal_list_get_first(&cs->devices); - device != (mca_sbgp_ibnet_device_t *) opal_list_get_end(&cs->devices); - device = (mca_sbgp_ibnet_device_t *) - opal_list_get_next((opal_list_item_t *)device)) { - /* run over active ports on the device */ - for(j = 0; j < device->num_act_ports; j++) { - cgroup = &module->cgroups[num_grouped]; - - /* Init cgroups structs */ - cgroup->device_index = device->device_index; - cgroup->index = num_grouped; - cgroup->port = device->ports[j].id; - cgroup->num_procs = 0; - - /* Setup comunication group */ - switch(module->mode) { - case MCA_SBGP_IBNET_ALL_NET: - rc = setup_cgroup_all(cgroup, device, module, peers_data); - break; - case MCA_SBGP_IBNET_NODE_NET: - rc = setup_cgroup_node(cgroup, device, module, peers_data); - break; - default: - rc = OMPI_ERROR; - IBNET_ERROR(("Module mode is unknow, fatal error")); - } - - if (OMPI_SUCCESS != rc) { - IBNET_ERROR(("Failed to setup cgroup.")); - goto select_error; - } - - if (0 != cgroup->num_procs) { - ++num_grouped; - } - } - } - - if (0 == num_grouped) { - /* No connection group was found */ - IBNET_ERROR(("No connection group was found.")); - goto select_error; - } - - /* If we have more than one single cgroup, - * we need to return groups that connects - * to exactly the same peers - */ - if (num_grouped > 1) { - - /* 2. Sort connection groups by size */ - qsort(module->cgroups, num_grouped, - sizeof(mca_sbgp_ibnet_connection_group_info_t), - cmp_cgroups); - - /* 3. What is the number of groups with maximal size */ - /* The first is Maximal */ - for (groups_to_use = 1; groups_to_use < num_grouped; groups_to_use++) { - if (module->cgroups[0].num_procs != module->cgroups[groups_to_use].num_procs) { - break; - } - } - - /* Ishai - It looks that noone is uses this groups_to_use value. In any case there is a bug in it. */ - /* 4. Check that all the maximal size groups are - * connect to the same peers, if not we just use FIRST cgroup */ - if (groups_to_use > 1) { - /* we need to check that all groups connects - * the same set of peers. */ - for (j = groups_to_use - 1; j > 0; j--) { - for (p = 0; p < module->cgroups[0].num_procs; p++) { - /* compare proc by proc....*/ - if (opal_pointer_array_get_item(module->cgroups[0].ibnet_procs, p) != - opal_pointer_array_get_item(module->cgroups[j].ibnet_procs, p)) { - /* peers are not equal, ignore this group and go to the next one */ - groups_to_use--; - if (j != groups_to_use) { - /* it was not the last group, swap last and this one */ - mca_sbgp_ibnet_connection_group_info_t tmp = module->cgroups[j]; - module->cgroups[j] = module->cgroups[groups_to_use]; - module->cgroups[groups_to_use] = tmp; - } - - break; /* go to the next group */ - } - } - } - } - } - /* updating sgroup number */ - module->num_cgroups = groups_to_use; - /* put array of ranks and size */ - - module->super.group_size = module->cgroups[0].num_procs; - module->super.group_list = (int *) calloc(module->super.group_size, sizeof(int)); - if (NULL == module->super.group_list) { - IBNET_ERROR(("Failed to allocate memory for group list")); - goto select_error; - } - - for (i = 0; i < module->super.group_size; i++) { - ibnet_proc = (mca_sbgp_ibnet_proc_t *) - opal_pointer_array_get_item(module->cgroups[0].ibnet_procs, i); - - assert(NULL != ibnet_proc); - IBNET_VERBOSE(10, ("Adding rank %d to group list", ibnet_proc->rank)); - - module->super.group_list[i] = ibnet_proc->ompi_proc_index; - } - - /* Let proc with lowest index be a leader of the subgroup */ - ibnet_proc = (mca_sbgp_ibnet_proc_t *) - opal_pointer_array_get_item(module->cgroups[0].ibnet_procs, 0); - - assert(NULL != ibnet_proc); - ibnet_proc->duty = MCA_SBGP_IBNET_NODE_LEADER; - -#if OPAL_ENABLE_DEBUG - IBNET_VERBOSE(10, ("Ibnet module: size - %d, num_cgroups - %d.\n", - module->super.group_size, module->num_cgroups)); - - for (i = 0; i < module->num_cgroups; ++i) { - IBNET_VERBOSE(10, ("cgroup %d uses port %d.\n", - i + 1, module->cgroups[i].port)); - } -#endif - - return OMPI_SUCCESS; - -select_error: - if (NULL != module->cgroups) { - for (i = 0; i < num_grouped; i++) { - if (NULL != module->cgroups[i].ibnet_procs) { - /* Ishai: When do we destruct it if the fucntion was successful - only at the end of the process? */ - OBJ_DESTRUCT(module->cgroups[i].ibnet_procs); - } - } - - free(module->cgroups); - } - - if (0 != module->super.group_size && - NULL != module->super.group_list) { - free(module->super.group_list); - } - - for (ibnet_proc = (mca_sbgp_ibnet_proc_t *) opal_list_get_first(peers_data); - ibnet_proc != (mca_sbgp_ibnet_proc_t *) opal_list_get_end(peers_data); - ibnet_proc = (mca_sbgp_ibnet_proc_t *) - opal_list_get_next((opal_list_item_t *) ibnet_proc)) { - if (NULL != ibnet_proc->use_port) { - free(ibnet_proc->use_port); - } - } - - return rc; -} - -/* This routine is used to find the list of procs that run on the -** same host as the calling process. -*/ - -#define IBNET_ALL "all" -#define IBNET_NODE "node" - -static int key2mode(char *key) -{ - if (NULL == key) { - IBNET_VERBOSE(6, ("key is NULL, return MCA_SBGP_IBNET_ALL")); - return MCA_SBGP_IBNET_ALL_NET; - } - if (strlen(IBNET_ALL) == strlen(key) && - 0 == strncmp(IBNET_ALL, key, strlen(IBNET_ALL))) { - IBNET_VERBOSE(6, ("key is MCA_SBGP_IBNET_ALL")); - return MCA_SBGP_IBNET_ALL_NET; - } - if (strlen(IBNET_NODE) == strlen(key) && - 0 == strncmp(IBNET_NODE, key, strlen(IBNET_NODE))) { - IBNET_VERBOSE(6, ("key is NODE")); - return MCA_SBGP_IBNET_NODE_NET; - } - - IBNET_VERBOSE(6, ("key was not detected, return MCA_SBGP_IBNET_NONE")); - return MCA_SBGP_IBNET_NONE_NET; -} - -static int mca_sbgp_ibnet_calc_sbuff_size(void) -{ - int bytes_tosend = 0, port, cpc; - mca_sbgp_ibnet_device_t *device; - - opal_list_t *devices = &mca_sbgp_ibnet_component.devices; - - bytes_tosend += sizeof(uint32_t); /* OPAL_UINT32 rank */ - bytes_tosend += sizeof(uint32_t); /* OPAL_UINT32 num of active ports */ - - /* Go through list of device and build the message*/ - for (device = (mca_sbgp_ibnet_device_t *) opal_list_get_first(devices); - device != (mca_sbgp_ibnet_device_t *) opal_list_get_end(devices); - device = (mca_sbgp_ibnet_device_t *) opal_list_get_next((opal_list_item_t *) device)) { - for (port = 0; port < device->num_allowed_ports; ++port) { - if (!device->ports[port].used) { - continue; - } - - /* OPAL_UINT16 port num */ - bytes_tosend += sizeof(uint16_t); - - /* OPAL_UINT16 lid */ - bytes_tosend += sizeof(uint16_t); - - /* OPAL_UINT64 subnetid */ - bytes_tosend += sizeof(uint64_t); - - /* OPAL_UINT32 default mtu */ - bytes_tosend += sizeof(uint32_t); - - /* OPAL_UINT8 collectives offload support */ - bytes_tosend += sizeof(uint8_t); - - /* OPAL_UINT8 number of cpcs for this port */ - bytes_tosend += sizeof(uint8_t); - - for (cpc = 0; cpc < device->num_cpcs; ++cpc) { - /* OPAL_UINT8 cpc index */ - bytes_tosend += sizeof(uint8_t); - - /* OPAL_UINT8 cpc priority */ - bytes_tosend += sizeof(uint8_t); - - /* cpc buffer length (OPAL_UINT8) in bytes */ - bytes_tosend += device->cpcs[cpc]->data.cbm_modex_message_len; - bytes_tosend += sizeof(uint8_t); - } - } - } - - return bytes_tosend; -} - -mca_sbgp_base_module_t *mca_sbgp_ibnet_select_procs(struct ompi_proc_t **procs, - int n_procs_in, - struct ompi_communicator_t *comm, - char *key, - void *output_data - ) -{ - /* local variables */ - opal_list_t peers_data; - mca_sbgp_ibnet_module_t *module; - - uint32_t rc; - char *sbuff = NULL, *rbuff = NULL; - - int *sbgp_procs_ranks = NULL, *ranks_in_comm = NULL; - int i, my_rank_in_group = -1, my_rank, num_bytes_tosend; - - struct mca_sbgp_ibnet_proc_t *ibnet_proc = NULL; - mca_sbgp_ibnet_component_t *cs = &mca_sbgp_ibnet_component; - - /* Create the module */ - module = OBJ_NEW(mca_sbgp_ibnet_module_t); - if (OPAL_UNLIKELY(NULL == module)) { - return NULL; - } - - module->num_cgroups = 0; - module->cgroups = NULL; - module->mode = key2mode(key); - - if (OPAL_UNLIKELY(MCA_SBGP_IBNET_NONE_NET == module->mode)) { - goto Error_module; - } - - module->super.group_size = 0; - module->super.group_list = NULL; - module->super.group_comm = comm; - module->super.group_net = OMPI_SBGP_IBCX2; - - ranks_in_comm = (int *) malloc(n_procs_in * sizeof(int)); - if (OPAL_UNLIKELY(NULL == ranks_in_comm)) { - IBNET_ERROR(("Cannot allocate memory.\n")); - goto Error; - } - - my_rank = ompi_comm_rank(&ompi_mpi_comm_world.comm); - - for (i = 0; i < n_procs_in; i++) { - ranks_in_comm[i] = procs[i]->proc_name.vpid; - if (my_rank == ranks_in_comm[i]) { - my_rank_in_group = i; - } - } - - /* Prepare send data */ - num_bytes_tosend = mca_sbgp_ibnet_calc_sbuff_size(); - - rc = comm_allreduce_pml(&num_bytes_tosend, - &num_bytes_tosend, 1, - MPI_INT, my_rank_in_group, - MPI_MAX, n_procs_in, - ranks_in_comm, &ompi_mpi_comm_world.comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto Error; - } - - IBNET_VERBOSE(10, ("The size of the send buff is %d\n", num_bytes_tosend)); - - assert(num_bytes_tosend > 0); - - /* Allocate send/recv buffers for allgather comunication */ - sbuff = (char *) malloc(num_bytes_tosend); - rbuff = (char *) malloc(num_bytes_tosend * n_procs_in); - if (OPAL_UNLIKELY(NULL == sbuff || NULL == rbuff)) { - IBNET_ERROR(("Failed to allocate buffers for send/recv ibnet allgather\n")); - goto Error; - } - - rc = pack_gather_sbuff(sbuff); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto Error; - } - - rc = comm_allgather_pml((void *) sbuff, (void *) rbuff, - num_bytes_tosend, MPI_BYTE, - my_rank_in_group, n_procs_in, - ranks_in_comm, &ompi_mpi_comm_world.comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - IBNET_ERROR(("Allgather call failed.\n")); - goto Error; - } - - /* Prepare list for arraving data */ - OBJ_CONSTRUCT(&peers_data, opal_list_t); - - /* Load the data to peers data */ - rc = unpack_and_load_gather_rbuff(rbuff, num_bytes_tosend, - procs, n_procs_in, &peers_data); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto Error; - } - - /* Select logic */ - rc = select_procs(module, &peers_data); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto Error; - } - - /* Put group id */ - sbgp_procs_ranks = (int *) malloc(module->super.group_size * - sizeof(int)); - if (OPAL_UNLIKELY(NULL == sbgp_procs_ranks)) { - IBNET_ERROR(("Cannot allocate memory.\n")); - goto Error; - } - - for (i = 0; i < module->super.group_size; ++i) { - ibnet_proc = (struct mca_sbgp_ibnet_proc_t *) - opal_pointer_array_get_item( - module->cgroups[0].ibnet_procs, i); - - sbgp_procs_ranks[i] = ibnet_proc->ompi_proc->proc_name.vpid; - if (my_rank == sbgp_procs_ranks[i]) { - my_rank_in_group = i; - } - - } - - assert(my_rank_in_group >= 0); - - rc = comm_allreduce_pml(&cs->curr_max_group_id, - &cs->curr_max_group_id, 1, - MPI_INT, my_rank_in_group, - MPI_MAX, module->super.group_size, - sbgp_procs_ranks, &ompi_mpi_comm_world.comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - goto Error; - } - - module->group_id = cs->curr_max_group_id; - cs->curr_max_group_id++; - - /* successful completion */ - /* clean up the temporary structures */ - OBJ_DESTRUCT(&peers_data); - - free(sbuff); - free(rbuff); - - free(ranks_in_comm); - free(sbgp_procs_ranks); - - IBNET_VERBOSE(10, ("Return ibnet module.\n")); - return (mca_sbgp_base_module_t *) module; - - /* return with error */ -Error: - /* clean up */ - if(NULL != module->super.group_list) { - free(module->super.group_list); - module->super.group_list = NULL; - } - - /* clean up the temporary structures */ - OBJ_DESTRUCT(&peers_data); - - if (NULL != sbgp_procs_ranks) { - free(sbgp_procs_ranks); - } - - if (NULL != ranks_in_comm) { - free(ranks_in_comm); - } - - if (NULL != sbuff) { - free(sbuff); - } - - if (NULL != rbuff) { - free(rbuff); - } - -Error_module: - OBJ_RELEASE(module); - - return NULL; -} diff --git a/ompi/mca/sbgp/p2p/Makefile.am b/ompi/mca/sbgp/p2p/Makefile.am deleted file mode 100644 index b4941a63765..00000000000 --- a/ompi/mca/sbgp/p2p/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. -# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - sbgp_p2p.h \ - sbgp_p2p_component.c \ - sbgp_p2p_module.c - - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -component_noinst = -component_install = -if MCA_BUILD_ompi_sbgp_p2p_DSO -component_install += mca_sbgp_p2p.la -else -component_noinst += libmca_sbgp_p2p.la -endif - -# See ompi/mca/btl/sm/Makefile.am for an explanation of -# libmca_common_sm.la. - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_sbgp_p2p_la_SOURCES = $(sources) -mca_sbgp_p2p_la_LDFLAGS = -module -avoid-version -mca_sbgp_p2p_la_LIBADD = - -noinst_LTLIBRARIES = $(component_noinst) -libmca_sbgp_p2p_la_SOURCES =$(sources) -libmca_sbgp_p2p_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/sbgp/p2p/configure.m4 b/ompi/mca/sbgp/p2p/configure.m4 deleted file mode 100644 index 820602aa6ad..00000000000 --- a/ompi/mca/sbgp/p2p/configure.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2013 Sandia National Laboratories. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_ompi_sbgp_p2p_POST_CONFIG(will_build) -# ---------------------------------------- -# The p2p sbgp requires a BML endpoint tag to compile, so require it. -# Require in POST_CONFIG instead of CONFIG so that we only require it -# if we're not disabled. -AC_DEFUN([MCA_ompi_sbgp_p2p_POST_CONFIG], [ - AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([BML])]) -])dnl - -# MCA_ompi_sbgp_p2p_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -# We can always build, unless we were explicitly disabled. -AC_DEFUN([MCA_ompi_sbgp_p2p_CONFIG],[ - AC_CONFIG_FILES([ompi/mca/sbgp/p2p/Makefile]) - [$1] -])dnl diff --git a/ompi/mca/sbgp/p2p/owner.txt b/ompi/mca/sbgp/p2p/owner.txt deleted file mode 100644 index 55663d3bb8a..00000000000 --- a/ompi/mca/sbgp/p2p/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ? -status: ? diff --git a/ompi/mca/sbgp/p2p/sbgp_p2p.h b/ompi/mca/sbgp/p2p/sbgp_p2p.h deleted file mode 100644 index f8fa5fc1942..00000000000 --- a/ompi/mca/sbgp/p2p/sbgp_p2p.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#ifndef MCA_BCOL_p2p_EXPORT_H -#define MCA_BCOL_p2p_EXPORT_H - -#include "ompi_config.h" - -#include "mpi.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/sbgp/sbgp.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/request/request.h" -#include "ompi/proc/proc.h" - -BEGIN_C_DECLS - -#ifdef HAVE_SCHED_YIELD -# include -# define SPIN sched_yield() -#else /* no switch available */ -# define SPIN -#endif - - - /** - * Structure to hold the basic shared memory coll component. First it holds the - * base coll component, and then holds a bunch of - * sm-coll-component-specific stuff (e.g., current MCA param - * values). - */ - struct mca_sbgp_p2p_component_t { - /** Base coll component */ - mca_sbgp_base_component_2_0_0_t super; - - }; - - /** - * Convenience typedef - */ - typedef struct mca_sbgp_p2p_component_t - mca_sbgp_p2p_component_t; - - - /* - ** Base sub-group module - **/ - - struct mca_sbgp_p2p_module_t { - /** Collective modules all inherit from opal_object */ - mca_sbgp_base_module_t super; - - }; - typedef struct mca_sbgp_p2p_module_t mca_sbgp_p2p_module_t; - OBJ_CLASS_DECLARATION(mca_sbgp_p2p_module_t); - - /* This routine is used to find the list of procs that run on the - ** same host as the calling process. - */ - /* - struct mca_sbgp_base_module_t *mca_sbgp_p2p_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, char *key, void *output_data); - */ - - /** - * Global component instance - */ - OMPI_MODULE_DECLSPEC extern mca_sbgp_p2p_component_t mca_sbgp_p2p_component; - - -END_C_DECLS - -#endif /* MCA_BCOL_p2p_EXPORT_H */ diff --git a/ompi/mca/sbgp/p2p/sbgp_p2p_component.c b/ompi/mca/sbgp/p2p/sbgp_p2p_component.c deleted file mode 100644 index 2fd93da4041..00000000000 --- a/ompi/mca/sbgp/p2p/sbgp_p2p_component.c +++ /dev/null @@ -1,224 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "sbgp_p2p.h" -#include "ompi/mca/bml/bml.h" - - -/* - * Public string showing the coll ompi_sm V2 component version number - */ -const char *mca_sbgp_p2p_component_version_string = - "Open MPI sbgp - p2p collective MCA component version " OMPI_VERSION; - - -/* - * Local functions - */ - -static int p2p_register(void); -static int p2p_open(void); -static int p2p_close(void); -static mca_sbgp_base_module_t * mca_sbgp_p2p_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, struct ompi_communicator_t *comm, char *key, void *output_data); - -static int mca_sbgp_p2p_init_query(bool enable_progress_threads, - bool enable_mpi_threads); - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_sbgp_p2p_component_t mca_sbgp_p2p_component = { - - - { - /* First, the mca_component_t struct containing meta - information about the component itself */ - - .sbgp_version = { - MCA_SBGP_BASE_VERSION_2_0_0, - /* Component name and version */ - - .mca_component_name = "p2p", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = p2p_open, - .mca_close_component = p2p_close, - .mca_register_component_params = p2p_register, - }, - - .sbgp_init_query = mca_sbgp_p2p_init_query, - .select_procs = mca_sbgp_p2p_select_procs, - .priority = 0, - } - -}; - -static int p2p_register(void) -{ - mca_sbgp_p2p_component_t *cs = &mca_sbgp_p2p_component; - cs->super.priority = 90; - (void) mca_base_component_var_register(&cs->super.sbgp_version, - "priority", "Priority for the sbgp p2p component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &cs->super.priority); - - return OMPI_SUCCESS; -} - -/* - * Open the component - */ -static int p2p_open(void) -{ - return OMPI_SUCCESS; -} - - -/* - * Close the component - */ -static int p2p_close(void) -{ - return OMPI_SUCCESS; -} - -/* query to see if the component is available for use, and can - * satisfy the thread and progress requirements - */ -int mca_sbgp_p2p_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* at this stage there is no reason to disaulify this component */ - - /* done */ - return OMPI_SUCCESS; -} -/* This routine is used to find the list of procs that run on the -** same host as the calling process. -*/ -static mca_sbgp_base_module_t * mca_sbgp_p2p_select_procs(struct ompi_proc_t ** procs, - int n_procs_in, - struct ompi_communicator_t *comm, - char *key, - void *output_data - ) -{ - /* local variables */ - int cnt, proc, my_rank; - mca_sbgp_p2p_module_t *module; - - /* find my rank in the group */ - for (my_rank = -1, proc = 0 ; proc < n_procs_in ; ++proc) { - if (ompi_proc_local() == procs[proc]) { - my_rank = proc; - } - } - - /* I am not in the list - so will form no local subgroup */ - if (0 > my_rank) { - return NULL; - } - - module = OBJ_NEW(mca_sbgp_p2p_module_t); - if (!module ) { - return NULL; - } - - module->super.group_size = 0; - module->super.group_comm = comm; - module->super.group_net = OMPI_SBGP_P2P; - - /* allocate resources */ - module->super.group_list = (int *) calloc (n_procs_in, sizeof (int)); - if (NULL == module->super.group_list) { - goto Error; - } - - for (cnt = 0, proc = 0 ; proc < n_procs_in ; ++proc) { -#if defined(OMPI_PROC_ENDPOINT_TAG_BML) - mca_bml_base_endpoint_t* endpoint = - (mca_bml_base_endpoint_t*) procs[proc]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; -#endif - - if (my_rank == proc || !key) { - module->super.group_list[cnt++] = proc; - continue; - } - -#if defined(OMPI_PROC_ENDPOINT_TAG_BML) - if (NULL != endpoint) { - int num_btls = mca_bml_base_btl_array_get_size(&(endpoint->btl_eager)); - /* loop over btls */ - - for (int i_btl = 0 ; i_btl < num_btls ; ++i_btl) { - /* I am checking for specific btl */ - if (strcmp(endpoint->btl_eager.bml_btls[i_btl].btl-> - btl_component->btl_version.mca_component_name, key)) { - module->super.group_list[cnt++] = proc; - break; - } - } - } -#endif - } - - if (0 == cnt) { - goto Error; - } - - module->super.group_size = cnt; - module->super.group_list = (int *) realloc (module->super.group_list, sizeof (int) * cnt); - if (NULL == module->super.group_list) { - /* Shouldn't ever happen */ - goto Error; - } - - /* successful return */ - return (mca_sbgp_base_module_t *)module; - - /* return with error */ -Error: - /* clean up */ - if (NULL != module->super.group_list) { - free (module->super.group_list); - module->super.group_list = NULL; - } - OBJ_RELEASE(module); - - return NULL; -} diff --git a/ompi/mca/sbgp/p2p/sbgp_p2p_module.c b/ompi/mca/sbgp/p2p/sbgp_p2p_module.c deleted file mode 100644 index 40a1c104bb3..00000000000 --- a/ompi/mca/sbgp/p2p/sbgp_p2p_module.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - */ - -#include "ompi_config.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include -#include - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/sbgp/p2p/sbgp_p2p.h" - -/* - * Local functions - */ -static void -mca_sbgp_p2p_module_construct(mca_sbgp_p2p_module_t *module) -{ -} - -static void -mca_sbgp_p2p_module_destruct(mca_sbgp_p2p_module_t *module) -{ - /* done */ -} - - -OBJ_CLASS_INSTANCE(mca_sbgp_p2p_module_t, - mca_sbgp_base_module_t, - mca_sbgp_p2p_module_construct, - mca_sbgp_p2p_module_destruct); diff --git a/ompi/mca/sbgp/sbgp.h b/ompi/mca/sbgp/sbgp.h deleted file mode 100644 index e6235e57b80..00000000000 --- a/ompi/mca/sbgp/sbgp.h +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. - * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_SBGP_H -#define MCA_SBGP_H - -#include "ompi_config.h" -#include "opal/class/opal_list.h" -#include "ompi/mca/mca.h" -#include "ompi/communicator/communicator.h" - -#include "opal/util/show_help.h" - -#if defined(c_plusplus) || defined(__cplusplus) -extern "C" { -#endif - -/** - * List of supported network types - */ - -typedef int (*mca_sbgp_component_init_query_fn_t) - (bool enable_progress_threads, bool enable_mpi_threads); - -typedef enum { - OMPI_SBGP_MUMA = 1 << 0, /* Muma */ - OMPI_SBGP_SOCKET = 1 << 1, /* CPU socket */ - OMPI_SBGP_P2P = 1 << 2, /* Point 2 point networks */ - OMPI_SBGP_IBCX2 = 1 << 3, /* Infiniband ConnextX2 */ - OMPI_SBGP_IB = 1 << 4 /* Infiniband */ -} mca_sbgp_net_type; - -/* - * Interface function for routine that will extract subgroups - * - * @param procs (IN) List of mpi processes to filter - * @param n_procs_in (IN) Number of input processes - * @param key (IN) optional key - * @param output_data (OUT) component specific output - * @return module, NULL if one is not created. - * - */ - -struct mca_sbgp_base_module_2_0_0_t { - - /** Collective modules all inherit from opal_object */ - opal_object_t super; - /* group size */ - int group_size; - - /* largest power of 2 in group */ - int pow_2; - - /* number of levels in the tree */ - int n_levels_pow2; - - /* my index in the group list, - * pointer to my rank */ - int my_index; - /* List of ranks. - * Actually we return to ML array of - * indexes to ompi_proc. - * And ML is responsible to replace - * the indexes to ranks */ - int *group_list; - /* pointer to *father* communicator, - * Not sure if we really need it now. I know my rank via my index, - * and ompi_proc I can cache on sbgp module. - * For ib I do not need it */ - struct ompi_communicator_t *group_comm; - /* network supported by this groups */ - mca_sbgp_net_type group_net; - - /*FIXME: - * I don't know where to add the use_hdl flag since the - * mca_bcol_basesmuma_comm_query takes just two input parameters. - */ - bool use_hdl; - -}; -typedef struct mca_sbgp_base_module_2_0_0_t mca_sbgp_base_module_2_0_0_t; -typedef struct mca_sbgp_base_module_2_0_0_t mca_sbgp_base_module_t; -/* typedef mca_sbgp_base_module_2_0_0_t mca_sbgp_base_module_t; */ -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_sbgp_base_module_t); - -typedef mca_sbgp_base_module_t *(*mca_sbgp_create_subgroup_fn_t)( - struct ompi_proc_t ** procs, int n_procs_in, - struct ompi_communicator_t *comm, char *key, - void *output_data - ); - -/** - * Subgrouping component interface - * - * Component interface for the sub-gorup framework. A public - * instance of this structure, called - * mca_sbgp_[component_name]_component, must exist in any sub-group - * component. - */ -struct mca_sbgp_base_component_2_0_0_t { - /** Base component description */ - mca_base_component_t sbgp_version; - - /** Sbgp component init query function */ - mca_sbgp_component_init_query_fn_t sbgp_init_query; - - /** process selection function */ - mca_sbgp_create_subgroup_fn_t select_procs; - - /** priority */ - int priority; - -}; -typedef struct mca_sbgp_base_component_2_0_0_t mca_sbgp_base_component_2_0_0_t; -typedef struct mca_sbgp_base_component_2_0_0_t mca_sbgp_base_component; - - -/* -* Macro for use in components that are of type coll -*/ -#define MCA_SBGP_BASE_VERSION_2_0_0 \ - OMPI_MCA_BASE_VERSION_2_1_0("sbgp", 2, 0, 0) - -#if defined(c_plusplus) || defined(__cplusplus) -} -#endif -#endif /* MCA_SBGP_H */ diff --git a/opal/mca/reachable/Makefile.am b/opal/mca/reachable/Makefile.am deleted file mode 100644 index 9fa66a78a84..00000000000 --- a/opal/mca/reachable/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2014 Intel, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = $(LTDLINCL) $(reachable_CPPFLAGS) - -# main library setup -noinst_LTLIBRARIES = libmca_reachable.la -libmca_reachable_la_SOURCES = - -# pkgdata setup -dist_opaldata_DATA = - -# local files -headers = reachable.h -libmca_reachable_la_SOURCES += $(headers) - -# Conditionally install the header files -if WANT_INSTALL_HEADERS -opaldir = $(opalincludedir)/$(subdir) -nobase_opal_HEADERS = $(headers) -endif - -include base/Makefile.am - -distclean-local: - rm -f base/static-components.h diff --git a/opal/mca/reachable/base/Makefile.am b/opal/mca/reachable/base/Makefile.am deleted file mode 100644 index 9214aae6814..00000000000 --- a/opal/mca/reachable/base/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. -# Copyright (c) 2014 Intel, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -headers += \ - base/base.h - -libmca_reachable_la_SOURCES += \ - base/reachable_base_frame.c \ - base/reachable_base_select.c diff --git a/opal/mca/reachable/base/base.h b/opal/mca/reachable/base/base.h deleted file mode 100644 index ed737e7841d..00000000000 --- a/opal/mca/reachable/base/base.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - */ - -#ifndef MCA_REACHABLE_BASE_H -#define MCA_REACHABLE_BASE_H - -#include "opal_config.h" -#include "opal/types.h" - -#include "opal/mca/mca.h" -#include "opal/mca/base/mca_base_framework.h" - -#include "opal/mca/reachable/reachable.h" - -BEGIN_C_DECLS - -OPAL_DECLSPEC extern mca_base_framework_t opal_reachable_base_framework; - -/** - * Select a reachable module - */ -OPAL_DECLSPEC int opal_reachable_base_select(void); - -END_C_DECLS - -#endif diff --git a/opal/mca/reachable/base/owner.txt b/opal/mca/reachable/base/owner.txt deleted file mode 100644 index 85b4416d206..00000000000 --- a/opal/mca/reachable/base/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: INTEL -status: active diff --git a/opal/mca/reachable/base/reachable_base_frame.c b/opal/mca/reachable/base/reachable_base_frame.c deleted file mode 100644 index d9781086ab9..00000000000 --- a/opal/mca/reachable/base/reachable_base_frame.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "opal_config.h" -#include "opal/constants.h" - -#include "opal/mca/mca.h" -#include "opal/util/output.h" -#include "opal/mca/base/base.h" - -#include "opal/mca/reachable/base/base.h" - - -/* - * The following file was created by configure. It contains extern - * components and the definition of an array of pointers to each - * module's public mca_base_module_t struct. - */ - -#include "opal/mca/reachable/base/static-components.h" - -opal_reachable_base_module_t opal_reachable = {0}; - -static int opal_reachable_base_frame_register(mca_base_register_flag_t flags) -{ - return OPAL_SUCCESS; -} - -static int opal_reachable_base_frame_close(void) -{ - return mca_base_framework_components_close(&opal_reachable_base_framework, NULL); -} - -static int opal_reachable_base_frame_open(mca_base_open_flag_t flags) -{ - /* Open up all available components */ - return mca_base_framework_components_open(&opal_reachable_base_framework, flags); -} - -MCA_BASE_FRAMEWORK_DECLARE(opal, reachable, "OPAL Reachability Framework", - opal_reachable_base_frame_register, - opal_reachable_base_frame_open, - opal_reachable_base_frame_close, - mca_reachable_base_static_components, 0); diff --git a/opal/mca/reachable/base/reachable_base_select.c b/opal/mca/reachable/base/reachable_base_select.c deleted file mode 100644 index a1e00807658..00000000000 --- a/opal/mca/reachable/base/reachable_base_select.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "opal_config.h" - -#include "opal/constants.h" -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/mca/reachable/reachable.h" -#include "opal/mca/reachable/base/base.h" - -/* - * Globals - */ - -int opal_reachable_base_select(void) -{ - int ret; - opal_reachable_base_component_t *best_component = NULL; - opal_reachable_base_module_t *best_module = NULL; - - /* - * Select the best component - */ - if( OPAL_SUCCESS != mca_base_select("reachable", opal_reachable_base_framework.framework_output, - &opal_reachable_base_framework.framework_components, - (mca_base_module_t **) &best_module, - (mca_base_component_t **) &best_component) ) { - /* notify caller that no available component found */ - return OPAL_ERR_NOT_FOUND; - } - - /* Save the winner */ - opal_reachable = *best_module; - - /* Initialize the winner */ - ret = opal_reachable.init(); - - return ret; -} diff --git a/opal/mca/reachable/netlink/Makefile.am b/opal/mca/reachable/netlink/Makefile.am deleted file mode 100644 index 19a411e5ab1..00000000000 --- a/opal/mca/reachable/netlink/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - reachable_netlink.h \ - reachable_netlink_component.c \ - reachable_netlink_module.c \ - libnl1_utils.h \ - libnl3_utils.h \ - libnl_utils.h \ - reachable_netlink_utils_common.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_opal_reachable_netlink_DSO -component_noinst = -component_install = mca_reachable_netlink.la -else -component_noinst = libmca_reachable_netlink.la -component_install = -endif - -AM_CPPFLAGS = \ - $(opal_reachable_netlink_LIBNL_CPPFLAGS) \ - -DHAVE_LIBNL3=$(HAVE_LIBNL3) - -mcacomponentdir = $(opallibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_reachable_netlink_la_SOURCES = $(sources) -mca_reachable_netlink_la_LDFLAGS = -module -avoid-version -mca_reachable_netlink_la_LIBADD = $(opal_reachable_netlink_LIBNL_LIBS) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_reachable_netlink_la_SOURCES =$(sources) -libmca_reachable_netlink_la_LDFLAGS = -module -avoid-version -libmca_reachable_netlink_la_LIBADD = $(opal_reachable_netlink_LIBNL_LIBS) diff --git a/opal/mca/reachable/netlink/configure.m4 b/opal/mca/reachable/netlink/configure.m4 deleted file mode 100644 index 8f28a1ef682..00000000000 --- a/opal/mca/reachable/netlink/configure.m4 +++ /dev/null @@ -1,178 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -dnl -dnl Portions of this software copied from libfabric -dnl (https://github.com/ofiwg/libfabric) -dnl - -dnl BSD license -dnl -dnl Redistribution and use in source and binary forms, with or without -dnl modification, are permitted provided that the following conditions -dnl are met: -dnl -dnl * Redistributions of source code must retain the above copyright -dnl notice, this list of conditions and the following disclaimer. -dnl -dnl * Redistributions in binary form must reproduce the above -dnl copyright notice, this list of conditions and the following -dnl disclaimer in the documentation and/or other materials provided -dnl with the distribution. -dnl -dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -dnl FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -dnl COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -dnl INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -dnl BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -dnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -dnl LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -dnl POSSIBILITY OF SUCH DAMAGE. - - -dnl Check for libnl; prefer version 3 instead of version 1. Abort (i.e., -dnl AC_MSG_ERROR) if neither libnl v1 or v3 can be found. -dnl -dnl Outputs: -dnl -dnl - Set $1 to the CPPFLAGS necessary to compile with libnl -dnl - Set $2 to the LIBS necessary to link with libnl -dnl - If $3 is 1, AC_MSG_ERROR (i.e., abort) if neither libnl or -dnl libnl3 can be found -dnl - Set HAVE_LIBNL3 to 1 if libnl3 will be used; 0 if libnl1 will be used -dnl - AC_SUBST $HAVE_LIBNL3 -dnl - AC_DEFINE HAVE_LIBNL3 -dnl -dnl -------------------------------------------------------- -AC_DEFUN([OPAL_REACHABLE_NETLINK_CHECK_LIBNL3],[ - # More libnl v1/v3 sadness: the two versions are not compatible - # and will not work correctly if simultaneously linked into the - # same applications. Unfortunately, they *will* link into the - # same image! On platforms like SLES 12, libibverbs depends on - # libnl-3.so.200 and friends, while a naive implementation of - # our configure logic would link libnl.so.1 to libdaplusnic, - # resulting in both versions in the dependency map at the same - # time. As a coarse fix, just check for libnl-3 first and use - # it if present on the system. - - # GROSS: libnl wants us to either use pkg-config (which we - # can't assume is always present) or we need to look in a - # particular directory for the right libnl3 include files. For - # now, just hard code the special path into this logic. - - save_CPPFLAGS=$CPPFLAGS - save_LIBS=$LIBS - - $1="-I/usr/include/libnl3" - CPPFLAGS="$$1 $CPPFLAGS" - AC_MSG_CHECKING([for /usr/include/libnl3]) - AS_IF([test -d "/usr/include/libnl3"], - [AC_MSG_RESULT([present]) - AC_CHECK_HEADER( - [netlink/version.h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -#include -#include -#ifndef LIBNL_VER_MAJ -#error "LIBNL_VER_MAJ not defined!" -#endif -/* to the best of our knowledge, version.h only exists in libnl3 */ -#if LIBNL_VER_MAJ < 3 -#error "LIBNL_VER_MAJ < 3, this is very unusual" -#endif - ]],[[/* empty body */]])], - [HAVE_LIBNL3=1], dnl our program compiled - [HAVE_LIBNL3=0])], dnl our program failed to compile - [HAVE_LIBNL3=0], dnl AC_CHECK_HEADER failed - [#include - ])], - [AC_MSG_RESULT([missing]) - HAVE_LIBNL3=0]) dnl "/usr/include/libnl3" does not exist - - # nl_recvmsgs_report is a symbol that is only present in v3 - AS_IF([test "$HAVE_LIBNL3" -eq 1], - [AC_SEARCH_LIBS([nl_recvmsgs_report], [nl-3], - [# We also need libnl-route-3 - AC_SEARCH_LIBS([nl_rtgen_request], [nl-route-3], - [$2="-lnl-3 -lnl-route-3" - HAVE_LIBNL3=1], - [HAVE_LIBNL3=0])], - [HAVE_LIBNL3=0])]) - - AS_IF([test "$HAVE_LIBNL3" -eq 1], - [AC_MSG_NOTICE([using libnl-3])], - [# restore $1 since we are falling back to libnl (v1) - $1="" - AC_SEARCH_LIBS([nl_connect], [nl], - [$2="-lnl"], - [AC_MSG_WARN([Cannot find libnl-3 nor libnl]) - AS_IF([test "$3" = "1"], - [AC_MSG_ERROR([Cannot continue])]) - ]) - AC_MSG_NOTICE([using libnl (v1)])]) - - # libnl_utils.h does not include configure-generated config.h, - # so it may not see the HAVE_LIBNL3 #define. Hence, we set - # HAVE_LIBNL3 as both a C preprocessor macro (in case some - # other file includes config.h before libnl_utils.h) and a - # Makefile macro (so that the app can set HAVE_LIBNL3 via - # CPPFLAGS). Also, this macro may be used in multiple - # different libraries; setting HAVE_LIBNL3 both ways lets the - # application choose which way to set it. - AC_SUBST([HAVE_LIBNL3]) - AC_DEFINE_UNQUOTED([HAVE_LIBNL3],[$HAVE_LIBNL3], - [set to 1 if should use libnl v3, set to 0 for libnl v11]) - - LIBS=$save_LIBS - AS_UNSET([save_LIBS]) - CPPFLAGS=$save_CPPFLAGS - AS_UNSET([save_CPPFLAGS]) -]) - -dnl ============================================================== - -# MCA_opal_reachable_netlink_CONFIG([action-if-can-compile], -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_opal_reachable_netlink_CONFIG],[ - AC_CONFIG_FILES([opal/mca/reachable/netlink/Makefile]) - - OPAL_VAR_SCOPE_PUSH([opal_reachable_netlink_happy]) - - opal_reachable_netlink_happy=1 - AC_CHECK_HEADER([linux/netlink.h], [], - [opal_reachable_netlink_happy=0], [ -#include -#include -]) - - AS_IF([test $opal_reachable_netlink_happy -eq 1], - [OPAL_REACHABLE_NETLINK_CHECK_LIBNL3( - [opal_reachable_netlink_LIBNL_CPPFLAGS], - [opal_reachable_netlink_LIBNL_LIBS], - [0]) - ]) - AS_IF([test "$opal_reachable_netlink_LIBNL_LIBS" == ""], - [opal_reachable_netlink_happy=0]) - - AC_SUBST(opal_reachable_netlink_LIBNL_CPPFLAGS) - AC_SUBST(opal_reachable_netlink_LIBNL_LIBS) - - AS_IF([test $opal_reachable_netlink_happy -eq 1], - [$1], - [$2]) - - OPAL_VAR_SCOPE_POP() -]) diff --git a/opal/mca/reachable/netlink/libnl1_utils.h b/opal/mca/reachable/netlink/libnl1_utils.h deleted file mode 100644 index 6665c587115..00000000000 --- a/opal/mca/reachable/netlink/libnl1_utils.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved. - * - * Portions of this software copied from libfabric - * (https://github.com/ofiwg/libfabric) - * - * LICENSE_BEGIN - * - * BSD license: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * LICENSE_END - * - * - */ - -#ifndef LIBNL1_UTILS_H -#define LIBNL1_UTILS_H - -#include -#include -#include -#include -#include - -typedef struct nl_handle NL_HANDLE; - -#define NLMSG_SIZE(size) nlmsg_msg_size(size) -#define NL_GETERROR(err) nl_geterror() -#define NL_HANDLE_ALLOC nl_handle_alloc -#define NL_HANDLE_FREE nl_handle_destroy -#define NL_DISABLE_SEQ_CHECK nl_disable_sequence_check -#define INC_CB_MSGCNT(arg) \ - do { \ - arg->msg_cnt++; \ - } while (0) - -/* - * the return value of nl_recvmsgs_default does not tell - * whether it returns because of successful read or socket - * timeout. This is a limitation in libnl1. So we compare - * message count before and after the call to decide if there - * is no new message arriving. In this case, this function - * needs to terminate to prevent the caller from - * blocking forever. - * NL_CB_MSG_IN traps every received message, so - * there should be no premature exit - */ -#define NL_RECVMSGS(nlh, cb_arg, rc, err, out) \ - do { \ - int msg_cnt = cb_arg.msg_cnt; \ - err = nl_recvmsgs_default(nlh); \ - if (err < 0) { \ - opal_output(0, "Failed to receive netlink reply message, error %s\n", \ - NL_GETERROR(err)); \ - goto out; \ - } \ - if (msg_cnt == cb_arg.msg_cnt) {\ - err = rc; \ - goto out; \ - } \ - } while (0) - -struct usnic_rt_cb_arg { - uint32_t nh_addr; - int oif; - int found; - int msg_cnt; - struct usnic_nl_sk *unlsk; -}; - -#endif /* LIBNL1_UTILS_H */ diff --git a/opal/mca/reachable/netlink/libnl3_utils.h b/opal/mca/reachable/netlink/libnl3_utils.h deleted file mode 100644 index ea99c88fc1c..00000000000 --- a/opal/mca/reachable/netlink/libnl3_utils.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved. - * - * Portions of this software copied from libfabric - * (https://github.com/ofiwg/libfabric) - * - * LICENSE_BEGIN - * - * BSD license: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * LICENSE_END - */ - -#ifndef LIBNL3_UTILS_H -#define LIBNL3_UTILS_H - -#include -#include -#include -#include -#include - -typedef struct nl_sock NL_HANDLE; - -#define NLMSG_SIZE(size) nlmsg_size(size) -#define NL_GETERROR(err) nl_geterror(err) -#define NL_HANDLE_ALLOC nl_socket_alloc -#define NL_HANDLE_FREE nl_socket_free -#define NL_DISABLE_SEQ_CHECK nl_socket_disable_seq_check -#define INC_CB_MSGCNT(arg) - -/* err will be returned as -NLE_AGAIN */ -/* if the socket times out */ -#define NL_RECVMSGS(nlh, cb_arg, rc, err, out) \ - do { \ - err = nl_recvmsgs_default(nlh); \ - if (err < 0) { \ - opal_output(0, "Failed to receive netlink reply message, error %s\n", \ - NL_GETERROR(err)); \ - if (err == -NLE_AGAIN) \ - err = rc; \ - goto out; \ - } \ - } while (0) - -struct usnic_rt_cb_arg { - uint32_t nh_addr; - int oif; - int found; - int replied; - struct usnic_nl_sk *unlsk; -}; - -#endif /* LIBNL3_UTILS_H */ diff --git a/opal/mca/reachable/netlink/libnl_utils.h b/opal/mca/reachable/netlink/libnl_utils.h deleted file mode 100644 index 379f8546c2c..00000000000 --- a/opal/mca/reachable/netlink/libnl_utils.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2014-2015, Cisco Systems, Inc. All rights reserved. - * - * Portions of this software copied from libfabric - * (https://github.com/ofiwg/libfabric) - * - * LICENSE_BEGIN - * - * BSD license: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * LICENSE_END - * - * - */ - -#ifndef LIBNL_UTILS_H -#define LIBNL_UTILS_H - -#if !defined (HAVE_LIBNL3) -#error You must define HAVE_LIBNL3 to 0 or 1 before including libnl_utils.h -#elif HAVE_LIBNL3 -#include "libnl3_utils.h" -#else -#include "libnl1_utils.h" -#endif - -struct usnic_nl_sk { - NL_HANDLE *nlh; - uint32_t seq; -}; - -int opal_reachable_netlink_nl_rt_lookup(uint32_t src_addr, - uint32_t dst_addr, int oif, - uint32_t *nh_addr); - -#endif /* LIBNL_UTILS_H */ diff --git a/opal/mca/reachable/netlink/owner.txt b/opal/mca/reachable/netlink/owner.txt deleted file mode 100644 index 85b4416d206..00000000000 --- a/opal/mca/reachable/netlink/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: INTEL -status: active diff --git a/opal/mca/reachable/netlink/reachable_netlink.h b/opal/mca/reachable/netlink/reachable_netlink.h deleted file mode 100644 index 3581d89a315..00000000000 --- a/opal/mca/reachable/netlink/reachable_netlink.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_REACHABLE_NETLINK_H -#define MCA_REACHABLE_NETLINK_H - -#include "opal_config.h" - -#include "opal/mca/reachable/reachable.h" - -BEGIN_C_DECLS - -OPAL_DECLSPEC extern opal_reachable_base_component_t - mca_reachable_netlink_component; - -OPAL_DECLSPEC extern const opal_reachable_base_module_t - opal_reachable_netlink_module; - -END_C_DECLS - -#endif /* MCA_REACHABLE_NETLINK_H */ diff --git a/opal/mca/reachable/netlink/reachable_netlink_component.c b/opal/mca/reachable/netlink/reachable_netlink_component.c deleted file mode 100644 index f958eb75c49..00000000000 --- a/opal/mca/reachable/netlink/reachable_netlink_component.c +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - */ - -#include "opal_config.h" - -#include "opal/constants.h" -#include "opal/util/proc.h" -#include "opal/mca/reachable/reachable.h" -#include "reachable_netlink.h" - -/* - * Public string showing the reachable netlink component version number - */ -const char *opal_reachable_netlink_component_version_string = - "OPAL netlink reachable MCA component version " OPAL_VERSION; - -/* - * Local function - */ -static int reachable_netlink_open(void); -static int reachable_netlink_close(void); -static int reachable_netlink_component_query(mca_base_module_t **module, int *priority); -static int component_register(void); - - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -opal_reachable_base_component_t mca_reachable_netlink_component = { - - /* First, the mca_component_t struct containing meta information - about the component itself */ - - .base_version = { - /* Indicate that we are a reachable v1.1.0 component (which also - implies a specific MCA version) */ - - OPAL_REACHABLE_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "netlink", - MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, - OPAL_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = reachable_netlink_open, - .mca_close_component = reachable_netlink_close, - .mca_query_component = reachable_netlink_component_query, - .mca_register_component_params = component_register, - }, - /* Next the MCA v1.0.0 component meta data */ - .base_data = { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } -}; - -static int reachable_netlink_open(void) -{ - /* construct the component fields */ - - return OPAL_SUCCESS; -} - -static int reachable_netlink_close(void) -{ - return OPAL_SUCCESS; -} - -static int component_register(void) -{ - return OPAL_SUCCESS; -} - -static int -reachable_netlink_component_query(mca_base_module_t **module, int *priority) -{ - *priority = 50; - *module = (mca_base_module_t *) &opal_reachable_netlink_module; - return OPAL_SUCCESS; -} diff --git a/opal/mca/reachable/netlink/reachable_netlink_module.c b/opal/mca/reachable/netlink/reachable_netlink_module.c deleted file mode 100644 index 60c8e075aee..00000000000 --- a/opal/mca/reachable/netlink/reachable_netlink_module.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Cisco Systems. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/types.h" - -#include "opal/mca/reachable/base/base.h" -#include "reachable_netlink.h" - -/* Local variables */ -static int init_counter = 0; - - -static int netlink_init(void) -{ - ++init_counter; - - return OPAL_SUCCESS; -} - -static int netlink_fini(void) -{ - --init_counter; - - return OPAL_SUCCESS; -} - -static opal_if_t* netlink_reachable(opal_list_t *local_if, - opal_list_t *remote_if) -{ - /* JMS Fill me in */ - return NULL; -} - -const opal_reachable_base_module_t opal_reachable_netlink_module = { - netlink_init, - netlink_fini, - netlink_reachable -}; diff --git a/opal/mca/reachable/netlink/reachable_netlink_utils_common.c b/opal/mca/reachable/netlink/reachable_netlink_utils_common.c deleted file mode 100644 index 81abe44e204..00000000000 --- a/opal/mca/reachable/netlink/reachable_netlink_utils_common.c +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved. - * - * Portions of this software copied from libfabric - * (https://github.com/ofiwg/libfabric) - * - * LICENSE_BEGIN - * - * BSD license: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * LICENSE_END - * - * - */ - -#include "opal_config.h" - -#include -#include -#include - -#include "libnl_utils.h" - -/* Adapt this copied code for Open MPI */ -#include "opal/util/output.h" - - -static struct nla_policy route_policy[RTA_MAX+1] = { - [RTA_IIF] = { .type = NLA_STRING, - .maxlen = IFNAMSIZ, }, - [RTA_OIF] = { .type = NLA_U32 }, - [RTA_PRIORITY] = { .type = NLA_U32 }, - [RTA_FLOW] = { .type = NLA_U32 }, - [RTA_MP_ALGO] = { .type = NLA_U32 }, - [RTA_CACHEINFO] = { .minlen = sizeof(struct rta_cacheinfo) }, - [RTA_METRICS] = { .type = NLA_NESTED }, - [RTA_MULTIPATH] = { .type = NLA_NESTED }, -}; - -static int usnic_is_nlreply_expected(struct usnic_nl_sk *unlsk, - struct nlmsghdr *nlm_hdr) -{ -#if OPAL_ENABLE_DEBUG - if (nlm_hdr->nlmsg_pid != nl_socket_get_local_port(unlsk->nlh) - || nlm_hdr->nlmsg_seq != unlsk->seq) { - opal_output(0, "Not an expected reply msg pid: %u local pid: %u msg seq: %u expected seq: %u\n", - nlm_hdr->nlmsg_pid, - nl_socket_get_local_port(unlsk->nlh), - nlm_hdr->nlmsg_seq, unlsk->seq); - return 0; - } -#endif - - return 1; -} - -static int usnic_is_nlreply_err(struct nlmsghdr *nlm_hdr) -{ - if (nlm_hdr->nlmsg_type == NLMSG_ERROR) { - struct nlmsgerr *e = (struct nlmsgerr *)nlmsg_data(nlm_hdr); - if (nlm_hdr->nlmsg_len >= (__u32)NLMSG_SIZE(sizeof(*e))) - opal_output(0, - "Received a netlink error message"); - else - opal_output(0, - "Received a truncated netlink error message\n"); - return 1; - } - - return 0; -} - -static int usnic_nl_send_query(struct usnic_nl_sk *unlsk, - struct nl_msg *msg, - int protocol, int flag) -{ - struct nlmsghdr *nlhdr; - - nlhdr = nlmsg_hdr(msg); - nlhdr->nlmsg_pid = nl_socket_get_local_port(unlsk->nlh); - nlhdr->nlmsg_seq = ++unlsk->seq; - nlmsg_set_proto(msg, protocol); - nlhdr->nlmsg_flags = flag; - - return nl_send(unlsk->nlh, msg); -} - -static int usnic_nl_set_rcvsk_timer(NL_HANDLE *nlh) -{ - int err = 0; - struct timeval timeout; - - timeout.tv_sec = 1; - timeout.tv_usec = 0; - - err = setsockopt(nl_socket_get_fd(nlh), SOL_SOCKET, SO_RCVTIMEO, - (char *)&timeout, sizeof(timeout)); -#if OPAL_ENABLE_DEBUG - if (err < 0) - opal_output(0, "Failed to set SO_RCVTIMEO for nl socket"); -#endif - - return err; -} - -static int usnic_nl_sk_alloc(struct usnic_nl_sk **p_sk, int protocol) -{ - struct usnic_nl_sk *unlsk; - NL_HANDLE *nlh; - int err; - - unlsk = calloc(1, sizeof(*unlsk)); - if (!unlsk) { - opal_output(0, "Failed to allocate usnic_nl_sk struct\n"); - return ENOMEM; - } - - nlh = NL_HANDLE_ALLOC(); - if (!nlh) { - opal_output(0, "Failed to allocate nl handle\n"); - err = ENOMEM; - goto err_free_unlsk; - } - - err = nl_connect(nlh, protocol); - if (err < 0) { - opal_output(0, "Failed to connnect netlink route socket error: %s\n", - NL_GETERROR(err)); - err = EINVAL; - goto err_free_nlh; - } - - NL_DISABLE_SEQ_CHECK(nlh); - err = usnic_nl_set_rcvsk_timer(nlh); - if (err < 0) - goto err_close_nlh; - - unlsk->nlh = nlh; - unlsk->seq = time(NULL); - *p_sk = unlsk; - return 0; - - err_close_nlh: - nl_close(nlh); - err_free_nlh: - NL_HANDLE_FREE(nlh); - err_free_unlsk: - free(unlsk); - return err; -} - -static void usnic_nl_sk_free(struct usnic_nl_sk *unlsk) -{ - nl_close(unlsk->nlh); - NL_HANDLE_FREE(unlsk->nlh); - free(unlsk); -} - -static int usnic_rt_raw_parse_cb(struct nl_msg *msg, void *arg) -{ - struct usnic_rt_cb_arg *lookup_arg = (struct usnic_rt_cb_arg *)arg; - struct usnic_nl_sk *unlsk = lookup_arg->unlsk; - struct nlmsghdr *nlm_hdr = nlmsg_hdr(msg); - struct rtmsg *rtm; - struct nlattr *tb[RTA_MAX + 1]; - int found = 0; - int err; - - INC_CB_MSGCNT(lookup_arg); - - if (!usnic_is_nlreply_expected(unlsk, nlm_hdr)) { -#if OPAL_ENABLE_DEBUG - nl_msg_dump(msg, stderr); -#endif - return NL_SKIP; - } - - if (usnic_is_nlreply_err(nlm_hdr)) { -#if OPAL_ENABLE_DEBUG - nl_msg_dump(msg, stderr); -#endif - return NL_SKIP; - } - - if (nlm_hdr->nlmsg_type != RTM_NEWROUTE) { -#if OPAL_ENABLE_DEBUG - char buf[128]; - nl_nlmsgtype2str(nlm_hdr->nlmsg_type, buf, sizeof(buf)); - opal_output(0, "Received an invalid route request reply message type: %s\n", - buf); - nl_msg_dump(msg, stderr); -#endif - return NL_SKIP; - } - - rtm = nlmsg_data(nlm_hdr); - if (rtm->rtm_family != AF_INET) { -#if OPAL_ENABLE_DEBUG - opal_output(0, "RTM message contains invalid AF family: %u\n", - rtm->rtm_family); - nl_msg_dump(msg, stderr); -#endif - return NL_SKIP; - } - - err = nlmsg_parse(nlm_hdr, sizeof(struct rtmsg), tb, RTA_MAX, - route_policy); - if (err < 0) { -#if OPAL_ENABLE_DEBUG - opal_output(0, "nlmsg parse error %s\n", NL_GETERROR(err)); - nl_msg_dump(msg, stderr); -#endif - return NL_SKIP; - } - - if (tb[RTA_OIF]) { - if (nla_get_u32(tb[RTA_OIF]) == (uint32_t)lookup_arg->oif) - found = 1; - else - opal_output(0, "Retrieved route has a different outgoing interface %d (expected %d)\n", - nla_get_u32(tb[RTA_OIF]), - lookup_arg->oif); - } - - if (found && tb[RTA_GATEWAY]) - lookup_arg->nh_addr = nla_get_u32(tb[RTA_GATEWAY]); - - lookup_arg->found = found; - return NL_STOP; -} - -int opal_reachable_netlink_nl_rt_lookup(uint32_t src_addr, - uint32_t dst_addr, int oif, - uint32_t *nh_addr) -{ - struct usnic_nl_sk *unlsk; - struct nl_msg *nlm; - struct rtmsg rmsg; - struct usnic_rt_cb_arg arg; - int err; - - unlsk = NULL; - err = usnic_nl_sk_alloc(&unlsk, NETLINK_ROUTE); - if (err) - return err; - - memset(&rmsg, 0, sizeof(rmsg)); - rmsg.rtm_family = AF_INET; - rmsg.rtm_dst_len = sizeof(dst_addr) * CHAR_BIT; - rmsg.rtm_src_len = sizeof(src_addr) * CHAR_BIT; - - nlm = nlmsg_alloc_simple(RTM_GETROUTE, 0); - if (!nlm) { - opal_output(0, "Failed to alloc nl message, %s\n", - NL_GETERROR(err)); - err = ENOMEM; - goto out; - } - nlmsg_append(nlm, &rmsg, sizeof(rmsg), NLMSG_ALIGNTO); - nla_put_u32(nlm, RTA_DST, dst_addr); - nla_put_u32(nlm, RTA_SRC, src_addr); - - err = usnic_nl_send_query(unlsk, nlm, NETLINK_ROUTE, NLM_F_REQUEST); - nlmsg_free(nlm); - if (err < 0) { - opal_output(0, "Failed to send RTM_GETROUTE query message, error %s\n", - NL_GETERROR(err)); - err = EINVAL; - goto out; - } - - memset(&arg, 0, sizeof(arg)); - arg.oif = oif; - arg.unlsk = unlsk; - err = nl_socket_modify_cb(unlsk->nlh, NL_CB_MSG_IN, NL_CB_CUSTOM, - usnic_rt_raw_parse_cb, &arg); - if (err != 0) { - opal_output(0, "Failed to setup callback function, error %s\n", - NL_GETERROR(err)); - err = EINVAL; - goto out; - } - - NL_RECVMSGS(unlsk->nlh, arg, EHOSTUNREACH, err, out); - - if (arg.found) { - *nh_addr = arg.nh_addr; - err = 0; - } else { - err = EHOSTUNREACH; - } - - out: - usnic_nl_sk_free(unlsk); - return err; -} diff --git a/opal/mca/reachable/reachable.h b/opal/mca/reachable/reachable.h deleted file mode 100644 index 77630b7d0d5..00000000000 --- a/opal/mca/reachable/reachable.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef OPAL_REACHABLE_H -#define OPAL_REACHABLE_H - -#include "opal_config.h" -#include "opal/types.h" - -#include "opal/mca/mca.h" -#include "opal/mca/if/if.h" - -BEGIN_C_DECLS - - -/* Init */ -typedef int (*opal_reachable_base_module_init_fn_t)(void); - -/* Finalize */ -typedef int (*opal_reachable_base_module_fini_fn_t)(void); - -/* Given a list of local interfaces and a list of remote - * interfaces, return the interface that is the "best" - * for connecting to the remote process. - * - * local_if: list of local opal_if_t interfaces - * remote_if: list of opal_if_t interfaces for the remote - * process - * - * return value: pointer to opal_if_t on local_if that is - * the "best" option for connecting. NULL - * indicates that the remote process cannot - * be reached on any interface - */ -typedef opal_if_t* -(*opal_reachable_base_module_reachable_fn_t)(opal_list_t *local_if, - opal_list_t *remote_if); - - -/* - * the standard public API data structure - */ -typedef struct { - /* currently used APIs */ - opal_reachable_base_module_init_fn_t init; - opal_reachable_base_module_fini_fn_t finalize; - opal_reachable_base_module_reachable_fn_t reachable; -} opal_reachable_base_module_t; - -typedef struct { - mca_base_component_t base_version; - mca_base_component_data_t base_data; - int priority; -} opal_reachable_base_component_t; - -/* - * Macro for use in components that are of type reachable - */ -#define OPAL_REACHABLE_BASE_VERSION_2_0_0 \ - OPAL_MCA_BASE_VERSION_2_1_0("reachable", 2, 0, 0) - -/* Global structure for accessing reachability functions */ -OPAL_DECLSPEC extern opal_reachable_base_module_t opal_reachable; - - -END_C_DECLS - -#endif diff --git a/opal/mca/reachable/weighted/.opal_ignore b/opal/mca/reachable/weighted/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/opal/mca/reachable/weighted/Makefile.am b/opal/mca/reachable/weighted/Makefile.am deleted file mode 100644 index 667f48723b3..00000000000 --- a/opal/mca/reachable/weighted/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2014 Intel, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - reachable_weighted.h \ - reachable_weighted_component.c \ - reachable_weighted.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_opal_reachable_weighted_DSO -component_noinst = -component_install = mca_reachable_weighted.la -else -component_noinst = libmca_reachable_weighted.la -component_install = -endif - -mcacomponentdir = $(opallibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_reachable_weighted_la_SOURCES = $(sources) -mca_reachable_weighted_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_reachable_weighted_la_SOURCES =$(sources) -libmca_reachable_weighted_la_LDFLAGS = -module -avoid-version diff --git a/opal/mca/reachable/weighted/owner.txt b/opal/mca/reachable/weighted/owner.txt deleted file mode 100644 index 85b4416d206..00000000000 --- a/opal/mca/reachable/weighted/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: INTEL -status: active diff --git a/opal/mca/reachable/weighted/reachable_weighted.c b/opal/mca/reachable/weighted/reachable_weighted.c deleted file mode 100644 index ccc41bb58bd..00000000000 --- a/opal/mca/reachable/weighted/reachable_weighted.c +++ /dev/null @@ -1,275 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014 Mellanox Technologies, Inc. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/types.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "opal/mca/if/if.h" - -#include "opal/mca/reachable/base/base.h" -#include "reachable_weighted.h" - -static int weighted_init(void); -static int weighted_fini(void); -static opal_if_t* weighted_reachable(opal_list_t *local_if, - opal_list_t *remote_if); - -/* - * describes the quality of a possible connection between a local and - * a remote network interface - */ -enum connection_quality { - CQ_NO_CONNECTION, - CQ_PRIVATE_DIFFERENT_NETWORK, - CQ_PRIVATE_SAME_NETWORK, - CQ_PUBLIC_DIFFERENT_NETWORK, - CQ_PUBLIC_SAME_NETWORK -}; - - -const opal_reachable_base_module_t opal_reachable_weighted_module = { - weighted_init, - weighted_fini, - weighted_reachable -}; - -// local variables -static int init_cntr = 0; - -static int weighted_init(void) -{ - ++init_cntr; - - return OPAL_SUCCESS; -} - -static int weighted_fini(void) -{ - --init_cntr; - - return OPAL_SUCCESS; -} - -static opal_if_t* weighted_reachable(opal_list_t *local_if, - opal_list_t *remote_if) -{ - size_t perm_size, num_local_interfaces, num_peer_interfaces; - enum connection_quality **weights; - - /* - * assign weights to each possible pair of interfaces - */ - num_local_interfaces = opal_list_get_size(local_if); - num_peer_interfaces = opal_list_get_size(remote_if); - - perm_size = num_local_interfaces; - if (num_peer_interfaces > perm_size) { - perm_size = num_peer_interfaces; - } - - weights = (enum connection_quality**)malloc(perm_size * sizeof(enum connection_quality*)); - - best_addr = (mca_btl_tcp_addr_t ***) malloc(perm_size - * sizeof(mca_btl_tcp_addr_t **)); - for(i = 0; i < perm_size; ++i) { - weights[i] = (enum connection_quality*) malloc(perm_size * sizeof(enum connection_quality)); - memset(weights[i], 0, perm_size * sizeof(enum connection_quality)); - - best_addr[i] = (mca_btl_tcp_addr_t **) malloc(perm_size * sizeof(mca_btl_tcp_addr_t *)); - memset(best_addr[i], 0, perm_size * sizeof(mca_btl_tcp_addr_t *)); - } - - for(i=0; iipv4_address && - NULL != peer_interfaces[j]->ipv4_address) { - - /* check for loopback */ - if ((opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv4_address) - && !opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv4_address)) - || (opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv4_address) - && !opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv4_address)) - || (opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv4_address) - && !opal_ifislocal(proc_hostname))) { - - /* No connection is possible on these interfaces */ - - /* check for RFC1918 */ - } else if(opal_net_addr_isipv4public((struct sockaddr*) local_interfaces[i]->ipv4_address) - && opal_net_addr_isipv4public((struct sockaddr*) - peer_interfaces[j]->ipv4_address)) { - if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv4_address, - (struct sockaddr*) peer_interfaces[j]->ipv4_address, - local_interfaces[i]->ipv4_netmask)) { - weights[i][j] = CQ_PUBLIC_SAME_NETWORK; - } else { - weights[i][j] = CQ_PUBLIC_DIFFERENT_NETWORK; - } - best_addr[i][j] = peer_interfaces[j]->ipv4_endpoint_addr; - continue; - } else { - if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv4_address, - (struct sockaddr*) peer_interfaces[j]->ipv4_address, - local_interfaces[i]->ipv4_netmask)) { - weights[i][j] = CQ_PRIVATE_SAME_NETWORK; - } else { - weights[i][j] = CQ_PRIVATE_DIFFERENT_NETWORK; - } - best_addr[i][j] = peer_interfaces[j]->ipv4_endpoint_addr; - } - } - - /* check state of ipv6 address pair - ipv6 is always public, - * since link-local addresses are skipped in opal_ifinit() - */ - if(NULL != local_interfaces[i]->ipv6_address && - NULL != peer_interfaces[j]->ipv6_address) { - - /* check for loopback */ - if ((opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv6_address) - && !opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv6_address)) - || (opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv6_address) - && !opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv6_address)) - || (opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv6_address) - && !opal_ifislocal(proc_hostname))) { - - /* No connection is possible on these interfaces */ - - } else if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv6_address, - (struct sockaddr*) peer_interfaces[j]->ipv6_address, - local_interfaces[i]->ipv6_netmask)) { - weights[i][j] = CQ_PUBLIC_SAME_NETWORK; - } else { - weights[i][j] = CQ_PUBLIC_DIFFERENT_NETWORK; - } - best_addr[i][j] = peer_interfaces[j]->ipv6_endpoint_addr; - } - - } /* for each peer interface */ - } /* for each local interface */ - - /* - * determine the size of the set to permute (max number of - * interfaces - */ - - best_assignment = (unsigned int *) malloc (perm_size * sizeof(int)); - - a = (int *) malloc(perm_size * sizeof(int)); - if (NULL == a) { - return OPAL_ERR_OUT_OF_RESOURCE; - } - - /* Can only find the best set of connections when the number of - * interfaces is not too big. When it gets larger, we fall back - * to a simpler and faster (and not as optimal) algorithm. - * See ticket https://svn.open-mpi.org/trac/ompi/ticket/2031 - * for more details about this issue. */ - if (perm_size <= MAX_PERMUTATION_INTERFACES) { - memset(a, 0, perm_size * sizeof(int)); - max_assignment_cardinality = -1; - max_assignment_weight = -1; - visit(0, -1, perm_size, a); - - rc = OPAL_ERR_UNREACH; - for(i = 0; i < perm_size; ++i) { - if(best_assignment[i] > num_peer_interfaces - || weights[i][best_assignment[i]] == CQ_NO_CONNECTION - || peer_interfaces[best_assignment[i]]->inuse - || NULL == peer_interfaces[best_assignment[i]]) { - continue; - } - peer_interfaces[best_assignment[i]]->inuse++; - btl_endpoint->endpoint_addr = best_addr[i][best_assignment[i]]; - btl_endpoint->endpoint_addr->addr_inuse++; - rc = OPAL_SUCCESS; - break; - } - } else { - enum mca_btl_tcp_connection_quality max; - int i_max = 0, j_max = 0; - /* Find the best connection that is not in use. Save away - * the indices of the best location. */ - max = CQ_NO_CONNECTION; - for(i=0; iinuse) { - if (weights[i][j] > max) { - max = weights[i][j]; - i_max = i; - j_max = j; - } - } - } - } - /* Now see if there is a some type of connection available. */ - rc = OPAL_ERR_UNREACH; - if (CQ_NO_CONNECTION != max) { - peer_interfaces[j_max]->inuse++; - btl_endpoint->endpoint_addr = best_addr[i_max][j_max]; - btl_endpoint->endpoint_addr->addr_inuse++; - rc = OPAL_SUCCESS; - } - } - - for(i = 0; i < perm_size; ++i) { - free(weights[i]); - free(best_addr[i]); - } - - for(i = 0; i < num_peer_interfaces; ++i) { - if(NULL != peer_interfaces[i]->ipv4_address) { - free(peer_interfaces[i]->ipv4_address); - } - if(NULL != peer_interfaces[i]->ipv6_address) { - free(peer_interfaces[i]->ipv6_address); - } - free(peer_interfaces[i]); - } - free(peer_interfaces); - peer_interfaces = NULL; - max_peer_interfaces = 0; - - for(i = 0; i < num_local_interfaces; ++i) { - if(NULL != local_interfaces[i]->ipv4_address) { - free(local_interfaces[i]->ipv4_address); - } - if(NULL != local_interfaces[i]->ipv6_address) { - free(local_interfaces[i]->ipv6_address); - } - free(local_interfaces[i]); - } - free(local_interfaces); - local_interfaces = NULL; - max_local_interfaces = 0; - - free(weights); - free(best_addr); - free(best_assignment); - free(a); - return false; -} diff --git a/opal/mca/reachable/weighted/reachable_weighted.h b/opal/mca/reachable/weighted/reachable_weighted.h deleted file mode 100644 index 04113b10468..00000000000 --- a/opal/mca/reachable/weighted/reachable_weighted.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_REACHABLE_WEIGHTED_H -#define MCA_REACHABLE_WEIGHTED_H - -#include "opal_config.h" - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_UN_H -#include -#endif - -#include "opal/mca/mca.h" -#include "opal/mca/event/event.h" -#include "opal/util/proc.h" - -#include "opal/mca/pmix/base/base.h" - -BEGIN_C_DECLS - -typedef struct { - opal_reachable_base_component_t super; -} opal_reachable_weighted_component_t; - -OPAL_DECLSPEC extern opal_reachable_weighted_component_t mca_reachable_weighted_component; - -OPAL_DECLSPEC extern const opal_reachable_base_module_t opal_reachable_weighted_module; - - -END_C_DECLS - -#endif /* MCA_REACHABLE_WEIGHTED_H */ diff --git a/opal/mca/reachable/weighted/reachable_weighted_component.c b/opal/mca/reachable/weighted/reachable_weighted_component.c deleted file mode 100644 index fbbd27308e8..00000000000 --- a/opal/mca/reachable/weighted/reachable_weighted_component.c +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014 Intel, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. 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 "opal_config.h" - -#include "opal/constants.h" -#include "opal/util/proc.h" -#include "opal/mca/reachable/reachable.h" -#include "reachable_weighted.h" - -/* - * Public string showing the reachable weighted component version number - */ -const char *opal_reachable_weighted_component_version_string = - "OPAL weighted reachable MCA component version " OPAL_VERSION; - -/* - * Local function - */ -static int reachable_weighted_open(void); -static int reachable_weighted_close(void); -static int reachable_weighted_component_query(mca_base_module_t **module, int *priority); -static int component_register(void); - - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -opal_reachable_weighted_component_t mca_reachable_weighted_component = { - { - - /* First, the mca_component_t struct containing meta information - about the component itself */ - - .base_version = { - /* Indicate that we are a reachable v1.1.0 component (which also - implies a specific MCA version) */ - - OPAL_REACHABLE_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "weighted", - MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, - OPAL_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = reachable_weighted_open, - .mca_close_component = reachable_weighted_close, - .mca_query_component = reachable_weighted_component_query, - .mca_register_component_params = component_register, - }, - /* Next the MCA v1.0.0 component meta data */ - .base_version = { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - }, - } -}; - -static int reachable_weighted_open(void) -{ - /* construct the component fields */ - - return OPAL_SUCCESS; -} - -static int reachable_weighted_close(void) -{ - return OPAL_SUCCESS; -} - -static int component_register(void) -{ - return OPAL_SUCCESS; -} - -static int reachable_weighted_component_query(mca_base_module_t **module, int *priority) -{ - *priority = 1; - *module = (mca_base_module_t *)&opal_reachable_weighted_module; - return OPAL_SUCCESS; -} From b4c092ac9ab884e085461169ab038457edf82d16 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 25 Jun 2015 10:22:02 -0700 Subject: [PATCH 0004/1704] pml/bfo: per advice from @rolfv, remove for 2.0.0 This came from verbal discussion at the June 2015 developer meeting. --- ompi/mca/pml/bfo/.opal_ignore | 0 ompi/mca/pml/bfo/Makefile.am | 76 - ompi/mca/pml/bfo/README | 340 ---- ompi/mca/pml/bfo/configure.m4 | 27 - ompi/mca/pml/bfo/help-mpi-pml-bfo.txt | 20 - ompi/mca/pml/bfo/owner.txt | 7 - ompi/mca/pml/bfo/pml_bfo.c | 875 ---------- ompi/mca/pml/bfo/pml_bfo.h | 362 ---- ompi/mca/pml/bfo/pml_bfo_comm.c | 100 -- ompi/mca/pml/bfo/pml_bfo_comm.h | 81 - ompi/mca/pml/bfo/pml_bfo_component.c | 274 ---- ompi/mca/pml/bfo/pml_bfo_component.h | 33 - ompi/mca/pml/bfo/pml_bfo_cuda.c | 162 -- ompi/mca/pml/bfo/pml_bfo_failover.c | 2187 ------------------------- ompi/mca/pml/bfo/pml_bfo_failover.h | 398 ----- ompi/mca/pml/bfo/pml_bfo_hdr.h | 539 ------ ompi/mca/pml/bfo/pml_bfo_iprobe.c | 171 -- ompi/mca/pml/bfo/pml_bfo_irecv.c | 308 ---- ompi/mca/pml/bfo/pml_bfo_isend.c | 129 -- ompi/mca/pml/bfo/pml_bfo_progress.c | 78 - ompi/mca/pml/bfo/pml_bfo_rdma.c | 118 -- ompi/mca/pml/bfo/pml_bfo_rdma.h | 42 - ompi/mca/pml/bfo/pml_bfo_rdmafrag.c | 30 - ompi/mca/pml/bfo/pml_bfo_rdmafrag.h | 74 - ompi/mca/pml/bfo/pml_bfo_recvfrag.c | 743 --------- ompi/mca/pml/bfo/pml_bfo_recvfrag.h | 172 -- ompi/mca/pml/bfo/pml_bfo_recvreq.c | 1163 ------------- ompi/mca/pml/bfo/pml_bfo_recvreq.h | 449 ----- ompi/mca/pml/bfo/pml_bfo_sendreq.c | 1404 ---------------- ompi/mca/pml/bfo/pml_bfo_sendreq.h | 498 ------ ompi/mca/pml/bfo/pml_bfo_start.c | 148 -- ompi/mca/pml/bfo/post_configure.sh | 1 - 32 files changed, 11009 deletions(-) delete mode 100644 ompi/mca/pml/bfo/.opal_ignore delete mode 100644 ompi/mca/pml/bfo/Makefile.am delete mode 100644 ompi/mca/pml/bfo/README delete mode 100644 ompi/mca/pml/bfo/configure.m4 delete mode 100644 ompi/mca/pml/bfo/help-mpi-pml-bfo.txt delete mode 100644 ompi/mca/pml/bfo/owner.txt delete mode 100644 ompi/mca/pml/bfo/pml_bfo.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_comm.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_comm.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_component.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_component.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_cuda.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_failover.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_failover.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_hdr.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_iprobe.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_irecv.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_isend.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_progress.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_rdma.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_rdma.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_rdmafrag.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_rdmafrag.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_recvfrag.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_recvfrag.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_recvreq.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_recvreq.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_sendreq.c delete mode 100644 ompi/mca/pml/bfo/pml_bfo_sendreq.h delete mode 100644 ompi/mca/pml/bfo/pml_bfo_start.c delete mode 100644 ompi/mca/pml/bfo/post_configure.sh diff --git a/ompi/mca/pml/bfo/.opal_ignore b/ompi/mca/pml/bfo/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ompi/mca/pml/bfo/Makefile.am b/ompi/mca/pml/bfo/Makefile.am deleted file mode 100644 index c11a8fd4035..00000000000 --- a/ompi/mca/pml/bfo/Makefile.am +++ /dev/null @@ -1,76 +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-2009 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 Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. -# -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = -DPML_BFO=1 - -dist_ompidata_DATA = \ - help-mpi-pml-bfo.txt - -EXTRA_DIST = post_configure.sh - -bfo_sources = \ - pml_bfo.c \ - pml_bfo.h \ - pml_bfo_comm.c \ - pml_bfo_comm.h \ - pml_bfo_component.c \ - pml_bfo_component.h \ - pml_bfo_failover.c \ - pml_bfo_failover.h \ - pml_bfo_hdr.h \ - pml_bfo_iprobe.c \ - pml_bfo_irecv.c \ - pml_bfo_isend.c \ - pml_bfo_progress.c \ - pml_bfo_rdma.c \ - pml_bfo_rdma.h \ - pml_bfo_rdmafrag.c \ - pml_bfo_rdmafrag.h \ - pml_bfo_recvfrag.c \ - pml_bfo_recvfrag.h \ - pml_bfo_recvreq.c \ - pml_bfo_recvreq.h \ - pml_bfo_sendreq.c \ - pml_bfo_sendreq.h \ - pml_bfo_start.c - -# If we have CUDA support requested, build the CUDA file also -if OPAL_cuda_support -bfo_sources += \ - pml_bfo_cuda.c -endif - -if MCA_BUILD_ompi_pml_bfo_DSO -component_noinst = -component_install = mca_pml_bfo.la -else -component_noinst = libmca_pml_bfo.la -component_install = -endif - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_pml_bfo_la_SOURCES = $(bfo_sources) -mca_pml_bfo_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_pml_bfo_la_SOURCES = $(bfo_sources) -libmca_pml_bfo_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/pml/bfo/README b/ompi/mca/pml/bfo/README deleted file mode 100644 index 1351f12c653..00000000000 --- a/ompi/mca/pml/bfo/README +++ /dev/null @@ -1,340 +0,0 @@ -Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - -BFO DESIGN DOCUMENT -This document describes the use and design of the bfo. In addition, -there is a section at the end explaining why this functionality was -not merged into the ob1 PML. - -1. GENERAL USAGE -First, one has to configure the failover code into the openib BTL so -that bfo will work correctly. To do this: -configure --enable-btl-openib-failover. - -Then, when running one needs to select the bfo PML explicitly. -mpirun --mca pml bfo - -Note that one needs to both configure with --enable-btl-openib-failover -and run with --mca pml bfo to get the failover support. If one of -these two steps is skipped, then the MPI job will just abort in the -case of an error like it normally does with the ob1 PML. - -2. GENERAL FUNCTION -The bfo failover feature requires two or more openib BTLs in use. In -normal operation, it will stripe the communication over the multiple -BTLs. When an error is detected, it will stop using the BTL that -incurred the error and continue the communication over the remaining -BTL. Once a BTL has been mapped out, it cannot be used by the job -again, even if the underlying fabric becomes functional again. Only -new jobs started after the fabric comes back up will use both BTLs. - -The bfo works in conjunction with changes that were made in the openib -BTL. As noted above, those changes need to be configured into the -BTL for everything to work properly. - -The bfo only fails over between openib BTLs. It cannot failover from -an openib BTL to TCP, for example. - -3. GENERAL DESIGN -The bfo (Btl FailOver) PML was designed to work in clusters that have -multiple openib BTLs. It was designed to be lightweight so as to -avoid any adverse effects on latency. To that end, there is no -tracking of fragments or messages in the bfo PML. Rather, it depends -on the underlying BTL to notify it of each fragment that has an error. -The bfo then decides what needs to be done based on the type of -fragment that gets an error. - -No additional sequence numbers were introduced in the bfo. Instead, -it makes use of the sequence numbers that exist in the MATCH, RNDV and -RGET fragment header. In that way, duplicate fragments that have -MATCH information in them can be detected. Other fragments, like PUT -and ACK, are never retransmitted so it does not matter that they do -not have sequence numbers. The FIN header was a special case in that -it was changed to include the MATCH header so that the tag, source, -and context fields could be used to check for duplicate FINs. - -Note that the assumption is that the underlying BTL will always issue -a callback with an error flag when it thinks a fragment has an error. -This means that even after an error is detected on a BTL, the BTL -continues to be checked for any other messages that may also complete -with an error. This is potentially a unique characteristic of the -openib BTL when running over RC connections that allows the BFO to -work properly. - -One scenario that is particularly difficult to handle is the case -where a fragment has an error but the message actually makes it to the -other side. It is because of this that all fragments need to be -checked to make sure they are not a duplicate. This scenario also -complicates some of the rendezvous protocols as the two sides may not -agree where the problem occurred. For example, one can imagine a -sender getting an error on a final FIN message, but the FIN message -actually arrives at the other side. The receiver thinks the -communication is done and moves on. The sender thinks there was a -problem, and that the communication needs to restart. - -It is also important to note that a message cannot signal a successful -completion and *not* make it to the receiver. This would probably cause -the bfo to hang. - -4. ERRORS -Errors are detected in the openib BTL layer and propagated to the PML -layer. Typically, the errors occur while polling the completion -queue, but can happen in other areas as well. When an error occurs, -an additional callback is called so the PML can map out the connection -for future sending. Then the callback associated with the fragment is -called, but with the error field set to OMPI_ERROR. This way, the PML -knows that this fragment may not have made it to the remote side. - -The first callback into the PML is via the mca_pml_bfo_error_handler() -callback and the PML uses this to remove a connection for future -sending. If the error_proc_t field is NULL, then the entire BTL is -removed for any future communication. If the error_proc_t is not -NULL, then the BTL is only removed for the connection associated with -the error_proc_t. - -The second callback is the standard one for a completion event, and -this can trigger various activities in the PML. The regular callback -function is called but the status is set to OMPI_ERROR. The PML layer -detects this and calls some failover specific routines depending on -the type of fragment that got the error. - - -5. RECOVERY OF MATCH FRAGMENTS -Note: For a general description of how the various fragments interact, -see Appendix 1 at the end of this document. - -In the case of a MATCH fragment, the fragment is simply resent. Care -has to be taken with a MATCH fragment that is sent via the standard -interface and one that is sent via the sendi interface. In the -standard send, the send request is still available and is therefore -reset reused to send the MATCH fragment. In the case of the sendi -fragment, the send request is gone, so the fragment is regenerated -from the information contained within the fragment. - -6. RECOVERY OF RNDV or LARGE MESSAGE RDMA -In the case of a large message RDMA transfer or a RNDV transfer where -the message consists of several fragments, the restart is a little -more complicated. This includes fragments like RNDV, PUT, RGET, FRAG, -FIN, and RDMA write and RDMA read completions. In most cases, the -requests associated with these fragments are reset and restarted. - -First, it should be pointed out that a new variable was added to the -send and receive requests. This variable tracks outstanding send -events that have not yet received their completion events. This new -variable is used so that a request is not restarted until all the -outstanding events have completed. If one does not wait for the -outstanding events to complete, then one may restart a request and -then a completion event will happen on the wrong request. - -There is a second variable added to each request and that is one that -shows whether the request is already in an error state. When a request -reaches the state that it has an error flagged on it and the outstanding -completion events are down to zero, it can start the restart dance -as described below. - -7. SPECIAL CASE FOR FIN FRAGMENT -Like the MATCH fragment, the FIN message is also simply resent. Like -the sendi MATCH fragment, there may be no request associated with the -FIN message when it gets an error, so the fragment is recreated from -the information in the fragment. The FIN fragment was modified to -have additional information like what is in a MATCH fragment including -the context, source, and tag. In this way, we can figure out if the -FIN message is a duplicate on the receiving side. - -8. RESTART DANCE -When the bfo determines that there are no outstanding completion events, -a restart dance is initiated. There are four new PML message types that -have been created to participate in the dance. - 1. RNDVRESTARTNOTIFY - 2. RECVERRNOTIFY - 3. RNDVRESTARTACK - 4. RNDVRESTARTNACK - -When the send request is in an error state and the outstanding -completion events is zero, RNDVRESTARTNOTIFY is sent from the sender -to the receiver to let it know that the communication needs to be -restarted. Upon receipt of the RNDVRESTARTNOTIFY, the receiver first -checks to make sure that it is still pointing to a valid receiver -request. If so, it marks the receive request in error. It then -checks to see if there are any outstanding completion events on the -receiver. If there are no outstanding completion events, the receiver -sends the RNDVRESTARTACK. If there are outstanding completion events, -then the RNDVRESTARTACK gets sent later when a completion event occurs -that brings the outstanding event count to zero. - -In the case that the receiver determines that it is no longer looking -at a valid receive request, which means the request is complete, the -receiver responds with a RNDVRESTARTNACK. While rare, this case can -happen for example, when a final FRAG message triggers an error on the -sender, but actually makes it to the receiver. - -The RECVERRNOTIFY fragment is used so the receiver can let the sender -sender know that it had an error. The sender then waits for all of -its completion events, and then sends a RNDVRESTARTNOTIFY. - -All the handling of these new messages is contained in the -pml_bfo_failover files. - -9. BTL SUPPORT -The openib BTL also supplies a lot of support for the bfo PML. First, -fragments can be stored in the BTL during normal operation if -resources become scarce. This means that when an error is detected in -the BTL, it needs to scour its internal queues for fragments that are -destined for the BTL and error them out. The function -error_out_all_pending_frags() takes care of this functionality. And -some of the fragments stored can be coalesced, so care has to be taken -to tease out each message from a coalesced fragment. - -There is also some special code in the BTL to handle some strange -occurrences that were observed in the BTL. First, there are times -where only one half of the connection gets an error. This can result -in a mismatch between what the PML thinks is available to it and can -cause hangs. Therefore, when a BTL detects an error, it sends a -special message down the working BTL connection to tell the remote -side that it needs to be brought down as well. - -Secondly, it has been observed that a message can get stuck in the -eager RDMA connection between two BTLs. In this case, an error is -detected on one side, but the other side never sees the message. -Therefore, a special message is sent to the other side telling it to -move along in the eager RDMA connection. This is all somewhat -confusing. See the code in the btl_openib_failover.c file for the -details. - -10. MERGING -Every effort was made to try and merge the bfo PML into the ob1 PML. -The idea was that any upgrades to the ob1 PML would automatically make -it into the bfo PML and this would enhance maintainability of all the -code. However, it was deemed that this merging would cause more -problems than it would solve. What was attempted and why the -conclusion was made are documented here. - -One can look at the bfo and easily see the differences between it and -ob1. All the bfo specific code is surrounded by #if PML_BFO. In -addition, there are two additional files in the bfo, -pml_bfo_failover.c and pml_bfo_failover.h. - -To merge them, the following was attempted. First, add all the code -in #if regions into the ob1 PML. As of this writing, there are 73 -#ifs that would have to be added into ob1. - -Secondly, remove almost all the pml_bfo files and replace them with -links to the ob1 files. - -Third, create a new header file that did name shifting of all the -functions so that ob1 and bfo could live together. This also included -having to create macros for the names of header files as well. To -help illustrate the name shifting issue, here is what the file might -look like in the bfo directory. - -/* Need macros for the header files as they are different in the - * different PMLs */ -#define PML "bfo" -#define PML_OB1_H "pml_bfo.h" -#define PML_OB1_COMM_H "pml_bfo_comm.h" -#define PML_OB1_COMPONENT_H "pml_bfo_component.h" -#define PML_OB1_HDR_H "pml_bfo_hdr.h" -#define PML_OB1_RDMA_H "pml_bfo_rdma.h" -#define PML_OB1_RDMAFRAG_H "pml_bfo_rdmafrag.h" -#define PML_OB1_RECVFRAG_H "pml_bfo_recvfrag.h" -#define PML_OB1_RECVREQ_H "pml_bfo_recvreq.h" -#define PML_OB1_SENDREQ_H "pml_bfo_sendreq.h" - -/* Name shifting of functions from ob1 to bfo (incomplete list) */ -#define mca_pml_ob1 mca_pml_bfo -#define mca_pml_ob1_t mca_pml_bfo_t -#define mca_pml_ob1_component mca_pml_bfo_component -#define mca_pml_ob1_add_procs mca_pml_bfo_add_procs -#define mca_pml_ob1_del_procs mca_pml_bfo_del_procs -#define mca_pml_ob1_enable mca_pml_bfo_enable -#define mca_pml_ob1_progress mca_pml_bfo_progress -#define mca_pml_ob1_add_comm mca_pml_bfo_add_comm -#define mca_pml_ob1_del_comm mca_pml_bfo_del_comm -#define mca_pml_ob1_irecv_init mca_pml_bfo_irecv_init -#define mca_pml_ob1_irecv mca_pml_bfo_irecv -#define mca_pml_ob1_recv mca_pml_bfo_recv -#define mca_pml_ob1_isend_init mca_pml_bfo_isend_init -#define mca_pml_ob1_isend mca_pml_bfo_isend -#define mca_pml_ob1_send mca_pml_bfo_send -#define mca_pml_ob1_iprobe mca_pml_bfo_iprobe -[...and much more ...] - -The pml_bfo_hdr.h file was not a link because the changes in it were -so extensive. Also the Makefile was kept separate so it could include -the additional failover files as well as add a compile directive that -would force the files to be compiled as bfo instead of ob1. - -After these changes were made, several independent developers reviewed -the results and concluded that making these changes would have too -much of a negative impact on ob1 maintenance. First, the code became -much harder to read with all the additional #ifdefs. Secondly, the -possibility of adding other features, like csum, to ob1 would only -make this issue even worse. Therefore, it was decided to keep the bfo -PML separate from ob1. - -11. UTILITIES -In an ideal world, any bug fixes that are made in the ob1 PML would -also be made in the csum and the bfo PMLs. However, that does not -always happen. Therefore, there are two new utilities added to the -contrib directory. - -check-ob1-revision.pl -check-ob1-pml-diffs.pl - -The first one can be run to see if ob1 has changed from its last known -state. Here is an example. - - machine =>check-ob1-revision.pl -Running svn diff -r24138 ../ompi/mca/pml/ob1 -No new changes detected in ob1. Everything is fine. - -If there are differences, then one needs to review them and potentially -add them to the bfo (and csum also if one feels like it). -After that, bump up the value in the script to the latest value. - -The second script allows one to see the differences between the ob1 -and bfo PML. Here is an example. - - machine =>check-ob1-pml-diffs.pl - -Starting script to check differences between bfo and ob1... -Files Compared: pml_ob1.c and pml_bfo.c -No differences encountered -Files Compared: pml_ob1.h and pml_bfo.h -[...snip...] -Files Compared: pml_ob1_start.c and pml_bfo_start.c -No differences encountered - -There is a lot more in the script that tells how it is used. - - -Appendix 1: SIMPLE OVERVIEW OF COMMUNICATION PROTOCOLS -The drawings below attempt to describe some of the general flow of -fragments in the various protocols that are supported in the PMLs. -The "read" and "write" are actual RDMA actions and do not pertain to -fragments that are sent. As can be inferred, they use FIN messages to -indicate their completion. - - -MATCH PROTOCOL -sender >->->-> MATCH >->->-> receiver - -SEND WITH MULTIPLE FRAGMENTS -sender >->->-> RNDV >->->-> receiver - <-<-<-< ACK <-<-<-< - >->->-> FRAG >->->-> - >->->-> FRAG >->->-> - >->->-> FRAG >->->-> - -RDMA PUT -sender >->->-> RNDV >->->-> receiver - <-<-<-< PUT <-<-<-< - <-<-<-< PUT <-<-<-< - >->->-> write >->->-> - >->->-> FIN >->->-> - >->->-> write >->->-> - >->->-> FIN >->->-> - -RMA GET -sender >->->-> RGET >->->-> receiver - <-<-<-< read <-<-<-< - <-<-<-< FIN <-<-<-< \ No newline at end of file diff --git a/ompi/mca/pml/bfo/configure.m4 b/ompi/mca/pml/bfo/configure.m4 deleted file mode 100644 index dbf0a3bacf2..00000000000 --- a/ompi/mca/pml/bfo/configure.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2013 Sandia National Laboratories. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_ompi_pml_bfo_POST_CONFIG(will_build) -# ---------------------------------------- -# The BFO PML requires a BML endpoint tag to compile, so require it. -# Require in POST_CONFIG instead of CONFIG so that we only require it -# if we're not disabled. -AC_DEFUN([MCA_ompi_pml_bfo_POST_CONFIG], [ - AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([BML])]) -])dnl - -# MCA_ompi_pml_bfo_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -# We can always build, unless we were explicitly disabled. -AC_DEFUN([MCA_ompi_pml_bfo_CONFIG],[ - AC_CONFIG_FILES([ompi/mca/pml/bfo/Makefile]) - [$1] -])dnl diff --git a/ompi/mca/pml/bfo/help-mpi-pml-bfo.txt b/ompi/mca/pml/bfo/help-mpi-pml-bfo.txt deleted file mode 100644 index b3c44ec80ec..00000000000 --- a/ompi/mca/pml/bfo/help-mpi-pml-bfo.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -*- text -*- -# -# Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -[eager_limit_too_small] -The "eager limit" MCA parameter in the %s BTL was set to a value which -is too low for Open MPI to function properly. Please re-run your job -with a higher eager limit value for this BTL; the exact MCA parameter -name and its corresponding minimum value is shown below. - - Local host: %s - BTL name: %s - BTL eager limit value: %d (set via btl_%s_eager_limit) - BTL eager limit minimum: %d - MCA parameter name: btl_%s_eager_limit diff --git a/ompi/mca/pml/bfo/owner.txt b/ompi/mca/pml/bfo/owner.txt deleted file mode 100644 index 9e43c5910a8..00000000000 --- a/ompi/mca/pml/bfo/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: ? -status: unmaintained diff --git a/ompi/mca/pml/bfo/pml_bfo.c b/ompi/mca/pml/bfo/pml_bfo.c deleted file mode 100644 index 47c2ad2019f..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo.c +++ /dev/null @@ -1,875 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2009 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2006-2008 University of Houston. All rights reserved. - * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include - -#include "opal/class/opal_bitmap.h" -#include "opal/util/output.h" -#include "opal/util/show_help.h" -#include "opal/mca/btl/btl.h" -#include "opal/mca/btl/base/base.h" -#include "opal/mca/pmix/pmix.h" - -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/base/base.h" -#include "ompi/mca/pml/base/base.h" -#include "ompi/mca/bml/base/base.h" -#include "ompi/runtime/ompi_cr.h" - -#include "pml_bfo.h" -#include "pml_bfo_component.h" -#include "pml_bfo_comm.h" -#include "pml_bfo_hdr.h" -#include "pml_bfo_recvfrag.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_rdmafrag.h" -#if PML_BFO -#include "pml_bfo_failover.h" -#endif /* PML_BFO */ - -mca_pml_bfo_t mca_pml_bfo = { - { - mca_pml_bfo_add_procs, - mca_pml_bfo_del_procs, - mca_pml_bfo_enable, - mca_pml_bfo_progress, - mca_pml_bfo_add_comm, - mca_pml_bfo_del_comm, - mca_pml_bfo_irecv_init, - mca_pml_bfo_irecv, - mca_pml_bfo_recv, - mca_pml_bfo_isend_init, - mca_pml_bfo_isend, - mca_pml_bfo_send, - mca_pml_bfo_iprobe, - mca_pml_bfo_probe, - mca_pml_bfo_start, - mca_pml_bfo_improbe, - mca_pml_bfo_mprobe, - mca_pml_bfo_imrecv, - mca_pml_bfo_mrecv, - mca_pml_bfo_dump, - mca_pml_bfo_ft_event, - 65535, - INT_MAX - } -}; - - -void mca_pml_bfo_error_handler( struct mca_btl_base_module_t* btl, - int32_t flags, ompi_proc_t* errproc, - char* btlinfo ); - -int mca_pml_bfo_enable(bool enable) -{ - if( false == enable ) { - return OMPI_SUCCESS; - } - - OBJ_CONSTRUCT(&mca_pml_bfo.lock, opal_mutex_t); - - /* fragments */ - OBJ_CONSTRUCT(&mca_pml_bfo.rdma_frags, ompi_free_list_t); - ompi_free_list_init_new( &mca_pml_bfo.rdma_frags, - sizeof(mca_pml_bfo_rdma_frag_t), - opal_cache_line_size, - OBJ_CLASS(mca_pml_bfo_rdma_frag_t), - 0,opal_cache_line_size, - mca_pml_bfo.free_list_num, - mca_pml_bfo.free_list_max, - mca_pml_bfo.free_list_inc, - NULL ); - - OBJ_CONSTRUCT(&mca_pml_bfo.recv_frags, ompi_free_list_t); - - ompi_free_list_init_new( &mca_pml_bfo.recv_frags, - sizeof(mca_pml_bfo_recv_frag_t) + mca_pml_bfo.unexpected_limit, - opal_cache_line_size, - OBJ_CLASS(mca_pml_bfo_recv_frag_t), - 0,opal_cache_line_size, - mca_pml_bfo.free_list_num, - mca_pml_bfo.free_list_max, - mca_pml_bfo.free_list_inc, - NULL ); - - OBJ_CONSTRUCT(&mca_pml_bfo.pending_pckts, ompi_free_list_t); - ompi_free_list_init_new( &mca_pml_bfo.pending_pckts, - sizeof(mca_pml_bfo_pckt_pending_t), - opal_cache_line_size, - OBJ_CLASS(mca_pml_bfo_pckt_pending_t), - 0,opal_cache_line_size, - mca_pml_bfo.free_list_num, - mca_pml_bfo.free_list_max, - mca_pml_bfo.free_list_inc, - NULL ); - - - OBJ_CONSTRUCT(&mca_pml_bfo.buffers, ompi_free_list_t); - OBJ_CONSTRUCT(&mca_pml_bfo.send_ranges, ompi_free_list_t); - ompi_free_list_init_new( &mca_pml_bfo.send_ranges, - sizeof(mca_pml_bfo_send_range_t) + - (mca_pml_bfo.max_send_per_range - 1) * sizeof(mca_pml_bfo_com_btl_t), - opal_cache_line_size, - OBJ_CLASS(mca_pml_bfo_send_range_t), - 0,opal_cache_line_size, - mca_pml_bfo.free_list_num, - mca_pml_bfo.free_list_max, - mca_pml_bfo.free_list_inc, - NULL ); - - /* pending operations */ - OBJ_CONSTRUCT(&mca_pml_bfo.send_pending, opal_list_t); - OBJ_CONSTRUCT(&mca_pml_bfo.recv_pending, opal_list_t); - OBJ_CONSTRUCT(&mca_pml_bfo.pckt_pending, opal_list_t); - OBJ_CONSTRUCT(&mca_pml_bfo.rdma_pending, opal_list_t); - /* missing communicator pending list */ - OBJ_CONSTRUCT(&mca_pml_bfo.non_existing_communicator_pending, opal_list_t); - - /** - * If we get here this is the PML who get selected for the run. We - * should get ownership for the send and receive requests list, and - * initialize them with the size of our own requests. - */ - ompi_free_list_init_new( &mca_pml_base_send_requests, - sizeof(mca_pml_bfo_send_request_t) + - (mca_pml_bfo.max_rdma_per_request - 1) * - sizeof(mca_pml_bfo_com_btl_t), - opal_cache_line_size, - OBJ_CLASS(mca_pml_bfo_send_request_t), - 0,opal_cache_line_size, - mca_pml_bfo.free_list_num, - mca_pml_bfo.free_list_max, - mca_pml_bfo.free_list_inc, - NULL ); - - ompi_free_list_init_new( &mca_pml_base_recv_requests, - sizeof(mca_pml_bfo_recv_request_t) + - (mca_pml_bfo.max_rdma_per_request - 1) * - sizeof(mca_pml_bfo_com_btl_t), - opal_cache_line_size, - OBJ_CLASS(mca_pml_bfo_recv_request_t), - 0,opal_cache_line_size, - mca_pml_bfo.free_list_num, - mca_pml_bfo.free_list_max, - mca_pml_bfo.free_list_inc, - NULL ); - - mca_pml_bfo.enabled = true; - return OMPI_SUCCESS; -} - -int mca_pml_bfo_add_comm(ompi_communicator_t* comm) -{ - /* allocate pml specific comm data */ - mca_pml_bfo_comm_t* pml_comm = OBJ_NEW(mca_pml_bfo_comm_t); - opal_list_item_t *item, *next_item; - mca_pml_bfo_recv_frag_t* frag; - mca_pml_bfo_comm_proc_t* pml_proc; - mca_pml_bfo_match_hdr_t* hdr; - int i; - - if (NULL == pml_comm) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* should never happen, but it was, so check */ - if (comm->c_contextid > mca_pml_bfo.super.pml_max_contextid) { - OBJ_RELEASE(pml_comm); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - mca_pml_bfo_comm_init_size(pml_comm, comm->c_remote_group->grp_proc_count); - comm->c_pml_comm = pml_comm; - - for( i = 0; i < comm->c_remote_group->grp_proc_count; i++ ) { - pml_comm->procs[i].ompi_proc = ompi_group_peer_lookup(comm->c_remote_group,i); - OBJ_RETAIN(pml_comm->procs[i].ompi_proc); - } - /* Grab all related messages from the non_existing_communicator pending queue */ - for( item = opal_list_get_first(&mca_pml_bfo.non_existing_communicator_pending); - item != opal_list_get_end(&mca_pml_bfo.non_existing_communicator_pending); - item = next_item ) { - frag = (mca_pml_bfo_recv_frag_t*)item; - next_item = opal_list_get_next(item); - hdr = &frag->hdr.hdr_match; - - /* Is this fragment for the current communicator ? */ - if( frag->hdr.hdr_match.hdr_ctx != comm->c_contextid ) - continue; - - /* As we now know we work on a fragment for this communicator - * we should remove it from the - * non_existing_communicator_pending list. */ - opal_list_remove_item( &mca_pml_bfo.non_existing_communicator_pending, - item ); - - add_fragment_to_unexpected: - - /* We generate the MSG_ARRIVED event as soon as the PML is aware - * of a matching fragment arrival. Independing if it is received - * on the correct order or not. This will allow the tools to - * figure out if the messages are not received in the correct - * order (if multiple network interfaces). - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_ARRIVED, comm, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - /* There is no matching to be done, and no lock to be held on the communicator as - * we know at this point that the communicator has not yet been returned to the user. - * The only required protection is around the non_existing_communicator_pending queue. - * We just have to push the fragment into the unexpected list of the corresponding - * proc, or into the out-of-order (cant_match) list. - */ - pml_proc = &(pml_comm->procs[hdr->hdr_src]); - - if( ((uint16_t)hdr->hdr_seq) == ((uint16_t)pml_proc->expected_sequence) ) { - /* We're now expecting the next sequence number. */ - pml_proc->expected_sequence++; - opal_list_append( &pml_proc->unexpected_frags, (opal_list_item_t*)frag ); - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_INSERT_IN_UNEX_Q, comm, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - /* And now the ugly part. As some fragments can be inserted in the cant_match list, - * every time we succesfully add a fragment in the unexpected list we have to make - * sure the next one is not in the cant_match. Otherwise, we will endup in a deadlock - * situation as the cant_match is only checked when a new fragment is received from - * the network. - */ - for(frag = (mca_pml_bfo_recv_frag_t *)opal_list_get_first(&pml_proc->frags_cant_match); - frag != (mca_pml_bfo_recv_frag_t *)opal_list_get_end(&pml_proc->frags_cant_match); - frag = (mca_pml_bfo_recv_frag_t *)opal_list_get_next(frag)) { - hdr = &frag->hdr.hdr_match; - /* If the message has the next expected seq from that proc... */ - if(hdr->hdr_seq != pml_proc->expected_sequence) - continue; - - opal_list_remove_item(&pml_proc->frags_cant_match, (opal_list_item_t*)frag); - goto add_fragment_to_unexpected; - } - } else { - opal_list_append( &pml_proc->frags_cant_match, (opal_list_item_t*)frag ); - } - } - return OMPI_SUCCESS; -} - -int mca_pml_bfo_del_comm(ompi_communicator_t* comm) -{ - mca_pml_bfo_comm_t* pml_comm = comm->c_pml_comm; - int i; - - for( i = 0; i < comm->c_remote_group->grp_proc_count; i++ ) { - OBJ_RELEASE(pml_comm->procs[i].ompi_proc); - } - OBJ_RELEASE(comm->c_pml_comm); - comm->c_pml_comm = NULL; - return OMPI_SUCCESS; -} - - -/* - * For each proc setup a datastructure that indicates the BTLs - * that can be used to reach the destination. - * - */ - -int mca_pml_bfo_add_procs(ompi_proc_t** procs, size_t nprocs) -{ - opal_bitmap_t reachable; - int rc; - opal_list_item_t *item; - - if(nprocs == 0) - return OMPI_SUCCESS; - - OBJ_CONSTRUCT(&reachable, opal_bitmap_t); - rc = opal_bitmap_init(&reachable, (int)nprocs); - if(OMPI_SUCCESS != rc) - return rc; - - /* - * JJH: Disable this in FT enabled builds since - * we use a wrapper PML. It will cause this check to - * return failure as all processes will return the wrapper PML - * component in use instead of the wrapped PML component underneath. - */ -#if OPAL_ENABLE_FT_CR == 0 - /* make sure remote procs are using the same PML as us */ - if (OMPI_SUCCESS != (rc = mca_pml_base_pml_check_selected("bfo", - procs, - nprocs))) { - return rc; - } -#endif - - rc = mca_bml.bml_add_procs( nprocs, - procs, - &reachable ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - /* Check that values supplied by all initialized btls will work - for us. Note that this is the list of all initialized BTLs, - not the ones used for the just added procs. This is a little - overkill and inaccurate, as we may end up not using the BTL in - question and all add_procs calls after the first one are - duplicating an already completed check. But the final - initialization of the PML occurs before the final - initialization of the BTLs, and iterating through the in-use - BTLs requires iterating over the procs, as the BML does not - expose all currently in use btls. */ - - for (item = opal_list_get_first(&mca_btl_base_modules_initialized) ; - item != opal_list_get_end(&mca_btl_base_modules_initialized) ; - item = opal_list_get_next(item)) { - mca_btl_base_selected_module_t *sm = - (mca_btl_base_selected_module_t*) item; - if (sm->btl_module->btl_eager_limit < sizeof(mca_pml_bfo_hdr_t)) { - opal_show_help("help-mpi-pml-bfo.txt", "eager_limit_too_small", - true, - sm->btl_component->btl_version.mca_component_name, - ompi_process_info.nodename, - sm->btl_component->btl_version.mca_component_name, - sm->btl_module->btl_eager_limit, - sm->btl_component->btl_version.mca_component_name, - sizeof(mca_pml_bfo_hdr_t), - sm->btl_component->btl_version.mca_component_name); - rc = OMPI_ERR_BAD_PARAM; - goto cleanup_and_return; - } - } - - - /* TODO: Move these callback registration to another place */ - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_MATCH, - mca_pml_bfo_recv_frag_callback_match, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_RNDV, - mca_pml_bfo_recv_frag_callback_rndv, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_RGET, - mca_pml_bfo_recv_frag_callback_rget, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_ACK, - mca_pml_bfo_recv_frag_callback_ack, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_FRAG, - mca_pml_bfo_recv_frag_callback_frag, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_PUT, - mca_pml_bfo_recv_frag_callback_put, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_FIN, - mca_pml_bfo_recv_frag_callback_fin, - NULL ); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - -#if PML_BFO - rc = mca_pml_bfo_register_callbacks(); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; -#endif /* PML_BFO */ - /* register error handlers */ - rc = mca_bml.bml_register_error((mca_btl_base_module_error_cb_fn_t)mca_pml_bfo_error_handler); - if(OMPI_SUCCESS != rc) - goto cleanup_and_return; - - cleanup_and_return: - OBJ_DESTRUCT(&reachable); - - return rc; -} - -/* - * iterate through each proc and notify any PTLs associated - * with the proc that it is/has gone away - */ - -int mca_pml_bfo_del_procs(ompi_proc_t** procs, size_t nprocs) -{ - return mca_bml.bml_del_procs(nprocs, procs); -} - -/* - * diagnostics - */ - -int mca_pml_bfo_dump(struct ompi_communicator_t* comm, int verbose) -{ - struct mca_pml_comm_t* pml_comm = comm->c_pml_comm; - int i; - - /* iterate through all procs on communicator */ - for( i = 0; i < (int)pml_comm->num_procs; i++ ) { - mca_pml_bfo_comm_proc_t* proc = &pml_comm->procs[i]; - mca_bml_base_endpoint_t* ep = (mca_bml_base_endpoint_t*)proc->ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - size_t n; - - opal_output(0, "[Rank %d]\n", i); - /* dump all receive queues */ - - /* dump all btls */ - for(n=0; nbtl_eager.arr_size; n++) { - mca_bml_base_btl_t* bml_btl = &ep->btl_eager.bml_btls[n]; - bml_btl->btl->btl_dump(bml_btl->btl, bml_btl->btl_endpoint, verbose); - } - } - return OMPI_SUCCESS; -} - -static void mca_pml_bfo_fin_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; - -#if PML_BFO - if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { - mca_pml_bfo_repost_fin(des); - return; - } - MCA_PML_BFO_CHECK_EAGER_BML_BTL_ON_FIN_COMPLETION(bml_btl, btl, des); -#endif /* PML_BFO */ - /* check for pending requests */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -/** - * Send an FIN to the peer. If we fail to send this ack (no more available - * fragments or the send failed) this function automatically add the FIN - * to the list of pending FIN, Which guarantee that the FIN will be sent - * later. - */ -int mca_pml_bfo_send_fin( ompi_proc_t* proc, - mca_bml_base_btl_t* bml_btl, - opal_ptr_t hdr_des, - uint8_t order, -#if PML_BFO - uint32_t status, - uint16_t seq, - uint8_t restartseq, - uint16_t ctx, uint32_t src) -#else /* PML_BFO */ - uint32_t status ) -#endif /* PML_BFO */ -{ - mca_btl_base_descriptor_t* fin; - mca_pml_bfo_fin_hdr_t* hdr; - int rc; - - mca_bml_base_alloc(bml_btl, &fin, order, sizeof(mca_pml_bfo_fin_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP); - - if(NULL == fin) { - MCA_PML_BFO_ADD_FIN_TO_PENDING(proc, hdr_des, bml_btl, order, status); - return OMPI_ERR_OUT_OF_RESOURCE; - } - fin->des_cbfunc = mca_pml_bfo_fin_completion; - fin->des_cbdata = NULL; - - /* fill in header */ - hdr = (mca_pml_bfo_fin_hdr_t*)fin->des_local->seg_addr.pval; - hdr->hdr_common.hdr_flags = 0; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_FIN; - hdr->hdr_des = hdr_des; - hdr->hdr_fail = status; -#if PML_BFO - fin->des_cbdata = proc; - hdr->hdr_match.hdr_seq = seq; - hdr->hdr_match.hdr_ctx = ctx; - hdr->hdr_match.hdr_src = src; - hdr->hdr_match.hdr_common.hdr_flags = restartseq; /* use unused hdr_flags field */ -#endif /* PML_BFO */ - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_FIN, proc); - - /* queue request */ - rc = mca_bml_base_send( bml_btl, - fin, - MCA_PML_BFO_HDR_TYPE_FIN ); - if( OPAL_LIKELY( rc >= 0 ) ) { - if( OPAL_LIKELY( 1 == rc ) ) { - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); - } - return OMPI_SUCCESS; - } - mca_bml_base_free(bml_btl, fin); - MCA_PML_BFO_ADD_FIN_TO_PENDING(proc, hdr_des, bml_btl, order, status); - return OMPI_ERR_OUT_OF_RESOURCE; -} - -void mca_pml_bfo_process_pending_packets(mca_bml_base_btl_t* bml_btl) -{ - mca_pml_bfo_pckt_pending_t *pckt; - int32_t i, rc, s = (int32_t)opal_list_get_size(&mca_pml_bfo.pckt_pending); - - for(i = 0; i < s; i++) { - mca_bml_base_btl_t *send_dst = NULL; - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - pckt = (mca_pml_bfo_pckt_pending_t*) - opal_list_remove_first(&mca_pml_bfo.pckt_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - if(NULL == pckt) - break; - if(pckt->bml_btl != NULL && - pckt->bml_btl->btl == bml_btl->btl) { - send_dst = pckt->bml_btl; - } else { - mca_bml_base_endpoint_t* endpoint = - (mca_bml_base_endpoint_t*) pckt->proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - send_dst = mca_bml_base_btl_array_find( - &endpoint->btl_eager, bml_btl->btl); - } - if(NULL == send_dst) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.pckt_pending, - (opal_list_item_t*)pckt); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - continue; - } - - switch(pckt->hdr.hdr_common.hdr_type) { - case MCA_PML_BFO_HDR_TYPE_ACK: - rc = mca_pml_bfo_recv_request_ack_send_btl(pckt->proc, - send_dst, - pckt->hdr.hdr_ack.hdr_src_req.lval, - pckt->hdr.hdr_ack.hdr_dst_req.pval, - pckt->hdr.hdr_ack.hdr_send_offset, - pckt->hdr.hdr_common.hdr_flags & MCA_PML_BFO_HDR_FLAGS_NORDMA); - if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == rc) ) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.pckt_pending, - (opal_list_item_t*)pckt); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - return; - } - break; - case MCA_PML_BFO_HDR_TYPE_FIN: - rc = mca_pml_bfo_send_fin(pckt->proc, send_dst, - pckt->hdr.hdr_fin.hdr_des, - pckt->order, -#if PML_BFO - pckt->hdr.hdr_fin.hdr_fail, - pckt->hdr.hdr_fin.hdr_match.hdr_seq, - pckt->hdr.hdr_fin.hdr_match.hdr_common.hdr_flags, - pckt->hdr.hdr_fin.hdr_match.hdr_ctx, - pckt->hdr.hdr_fin.hdr_match.hdr_src); -#else /* PML_BFO */ - pckt->hdr.hdr_fin.hdr_fail); -#endif /* PML_BFO */ - if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == rc) ) { - return; - } - break; - default: - opal_output(0, "[%s:%d] wrong header type\n", - __FILE__, __LINE__); - break; - } - /* We're done with this packet, return it back to the free list */ - MCA_PML_BFO_PCKT_PENDING_RETURN(pckt); - } -} - -void mca_pml_bfo_process_pending_rdma(void) -{ - mca_pml_bfo_rdma_frag_t* frag; - int32_t i, rc, s = (int32_t)opal_list_get_size(&mca_pml_bfo.rdma_pending); - - for(i = 0; i < s; i++) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - frag = (mca_pml_bfo_rdma_frag_t*) - opal_list_remove_first(&mca_pml_bfo.rdma_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - if(NULL == frag) - break; - if(frag->rdma_state == MCA_PML_BFO_RDMA_PUT) { - frag->retries++; - rc = mca_pml_bfo_send_request_put_frag(frag); - } else { - rc = mca_pml_bfo_recv_request_get_frag(frag); - } - if(OMPI_ERR_OUT_OF_RESOURCE == rc) - break; - } -} - - -void mca_pml_bfo_error_handler( - struct mca_btl_base_module_t* btl, int32_t flags, - ompi_proc_t* errproc, char* btlinfo ) { -#if PML_BFO - if (flags & MCA_BTL_ERROR_FLAGS_NONFATAL) { - mca_pml_bfo_failover_error_handler(btl, flags, errproc, btlinfo); - return; - } -#endif /* PML_BFO */ - ompi_rte_abort(-1, NULL); -} - -#if OPAL_ENABLE_FT_CR == 0 -int mca_pml_bfo_ft_event( int state ) { - return OMPI_SUCCESS; -} -#else -int mca_pml_bfo_ft_event( int state ) -{ - static bool first_continue_pass = false; - ompi_proc_t** procs = NULL; - size_t num_procs; - int ret, p; - - if(OPAL_CRS_CHECKPOINT == state) { - if( opal_cr_timing_barrier_enabled ) { - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCPBR1); - opal_pmix.fence(NULL, 0); - } - - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P0); - } - else if(OPAL_CRS_CONTINUE == state) { - first_continue_pass = !first_continue_pass; - - if( !first_continue_pass ) { - if( opal_cr_timing_barrier_enabled ) { - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_COREBR0); - opal_pmix.fence(NULL, 0); - } - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P2); - } - - if (opal_cr_continue_like_restart && !first_continue_pass) { - /* - * Get a list of processes - */ - procs = ompi_proc_all(&num_procs); - if(NULL == procs) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* - * Refresh the proc structure, and publish our proc info in the modex. - * NOTE: Do *not* call ompi_proc_finalize as there are many places in - * the code that point to indv. procs in this strucutre. For our - * needs here we only need to fix up the modex, bml and pml - * references. - */ - if (OMPI_SUCCESS != (ret = ompi_proc_refresh())) { - opal_output(0, - "pml:bfo: ft_event(Restart): proc_refresh Failed %d", - ret); - for(p = 0; p < (int)num_procs; ++p) { - OBJ_RELEASE(procs[p]); - } - free (procs); - return ret; - } - } - } - else if(OPAL_CRS_RESTART_PRE == state ) { - /* Nothing here */ - } - else if(OPAL_CRS_RESTART == state ) { - /* - * Get a list of processes - */ - procs = ompi_proc_all(&num_procs); - if(NULL == procs) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* - * Clean out the modex information since it is invalid now. - * ompi_rte_purge_proc_attrs(); - * This happens at the ORTE level, so doing it again here will cause - * some issues with socket caching. - */ - - - /* - * Refresh the proc structure, and publish our proc info in the modex. - * NOTE: Do *not* call ompi_proc_finalize as there are many places in - * the code that point to indv. procs in this strucutre. For our - * needs here we only need to fix up the modex, bml and pml - * references. - */ - if (OMPI_SUCCESS != (ret = ompi_proc_refresh())) { - opal_output(0, - "pml:bfo: ft_event(Restart): proc_refresh Failed %d", - ret); - for(p = 0; p < (int)num_procs; ++p) { - OBJ_RELEASE(procs[p]); - } - free (procs); - return ret; - } - } - else if(OPAL_CRS_TERM == state ) { - ; - } - else { - ; - } - - /* Call the BML - * BML is expected to call ft_event in - * - BTL(s) - * - MPool(s) - */ - if( OMPI_SUCCESS != (ret = mca_bml.bml_ft_event(state))) { - opal_output(0, "pml:base: ft_event: BML ft_event function failed: %d\n", - ret); - } - - if(OPAL_CRS_CHECKPOINT == state) { - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P1); - - if( opal_cr_timing_barrier_enabled ) { - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR0); - /* JJH Cannot barrier here due to progress engine -- ompi_rte_barrier();*/ - } - } - else if(OPAL_CRS_CONTINUE == state) { - if( !first_continue_pass ) { - if( opal_cr_timing_barrier_enabled ) { - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR1); - opal_pmix.fence(NULL, 0); - } - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P3); - } - - if (opal_cr_continue_like_restart && !first_continue_pass) { - /* - * Exchange the modex information once again. - * BTLs will have republished their modex information. - */ - opal_pmix.fence(NULL, 0); - - /* - * Startup the PML stack now that the modex is running again - * Add the new procs (BTLs redo modex recv's) - */ - if( OMPI_SUCCESS != (ret = mca_pml_bfo_add_procs(procs, num_procs) ) ) { - opal_output(0, "pml:bfo: ft_event(Restart): Failed in add_procs (%d)", ret); - return ret; - } - - /* Is this barrier necessary ? JJH */ - opal_pmix.fence(NULL, 0); - - if( NULL != procs ) { - for(p = 0; p < (int)num_procs; ++p) { - OBJ_RELEASE(procs[p]); - } - free(procs); - procs = NULL; - } - } - if( !first_continue_pass ) { - if( opal_cr_timing_barrier_enabled ) { - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR2); - opal_pmix.fence(NULL, 0); - } - OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCP1); - } - } - else if(OPAL_CRS_RESTART_PRE == state ) { - /* Nothing here */ - } - else if(OPAL_CRS_RESTART == state ) { - /* - * Exchange the modex information once again. - * BTLs will have republished their modex information. - */ - opal_pmix.fence(NULL, 0); - - /* - * Startup the PML stack now that the modex is running again - * Add the new procs (BTLs redo modex recv's) - */ - if( OMPI_SUCCESS != (ret = mca_pml_bfo_add_procs(procs, num_procs) ) ) { - opal_output(0, "pml:bfo: ft_event(Restart): Failed in add_procs (%d)", ret); - return ret; - } - - /* Is this barrier necessary ? JJH */ - opal_pmix.fence(NULL, 0); - - if( NULL != procs ) { - for(p = 0; p < (int)num_procs; ++p) { - OBJ_RELEASE(procs[p]); - } - free(procs); - procs = NULL; - } - } - else if(OPAL_CRS_TERM == state ) { - ; - } - else { - ; - } - - return OMPI_SUCCESS; -} -#endif /* OPAL_ENABLE_FT_CR */ - -int mca_pml_bfo_com_btl_comp(const void *v1, const void *v2) -{ - const mca_pml_bfo_com_btl_t *b1 = (const mca_pml_bfo_com_btl_t *) v1; - const mca_pml_bfo_com_btl_t *b2 = (const mca_pml_bfo_com_btl_t *) v2; - - if(b1->bml_btl->btl_weight < b2->bml_btl->btl_weight) - return 1; - if(b1->bml_btl->btl_weight > b2->bml_btl->btl_weight) - return -1; - - return 0; -} - diff --git a/ompi/mca/pml/bfo/pml_bfo.h b/ompi/mca/pml/bfo/pml_bfo.h deleted file mode 100644 index 80d8b30e459..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo.h +++ /dev/null @@ -1,362 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 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 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ - -#ifndef MCA_PML_BFO_H -#define MCA_PML_BFO_H - -#include "ompi_config.h" -#include "opal/class/ompi_free_list.h" -#include "ompi/request/request.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/base/pml_base_request.h" -#include "ompi/mca/pml/base/pml_base_bsend.h" -#include "ompi/mca/pml/base/pml_base_sendreq.h" -#include "ompi/datatype/ompi_datatype.h" -#include "pml_bfo_hdr.h" -#include "ompi/mca/bml/base/base.h" -#include "ompi/proc/proc.h" -#include "opal/mca/allocator/base/base.h" - -BEGIN_C_DECLS - -/** - * BFO PML module - */ - -struct mca_pml_bfo_t { - mca_pml_base_module_t super; - - int priority; - int free_list_num; /* initial size of free list */ - int free_list_max; /* maximum size of free list */ - int free_list_inc; /* number of elements to grow free list */ - unsigned int send_pipeline_depth; - unsigned int recv_pipeline_depth; - unsigned int rdma_put_retries_limit; - int max_rdma_per_request; - int max_send_per_range; - bool leave_pinned; - int leave_pinned_pipeline; - - /* lock queue access */ - opal_mutex_t lock; - - /* free lists */ - ompi_free_list_t rdma_frags; - ompi_free_list_t recv_frags; - ompi_free_list_t pending_pckts; - ompi_free_list_t buffers; - ompi_free_list_t send_ranges; - - /* list of pending operations */ - opal_list_t pckt_pending; - opal_list_t send_pending; - opal_list_t recv_pending; - opal_list_t rdma_pending; - /* List of pending fragments without a matching communicator */ - opal_list_t non_existing_communicator_pending; - bool enabled; - char* allocator_name; - mca_allocator_base_module_t* allocator; - unsigned int unexpected_limit; -}; -typedef struct mca_pml_bfo_t mca_pml_bfo_t; - -extern mca_pml_bfo_t mca_pml_bfo; -extern int mca_pml_bfo_output; - -/* - * PML interface functions. - */ - -extern int mca_pml_bfo_add_comm( - struct ompi_communicator_t* comm -); - -extern int mca_pml_bfo_del_comm( - struct ompi_communicator_t* comm -); - -extern int mca_pml_bfo_add_procs( - struct ompi_proc_t **procs, - size_t nprocs -); - -extern int mca_pml_bfo_del_procs( - struct ompi_proc_t **procs, - size_t nprocs -); - -extern int mca_pml_bfo_enable( bool enable ); - -extern int mca_pml_bfo_progress(void); - -extern int mca_pml_bfo_iprobe( int dst, - int tag, - struct ompi_communicator_t* comm, - int *matched, - ompi_status_public_t* status ); - -extern int mca_pml_bfo_probe( int dst, - int tag, - struct ompi_communicator_t* comm, - ompi_status_public_t* status ); - -extern int mca_pml_bfo_improbe( int dst, - int tag, - struct ompi_communicator_t* comm, - int *matched, - struct ompi_message_t **message, - ompi_status_public_t* status ); - -extern int mca_pml_bfo_mprobe( int dst, - int tag, - struct ompi_communicator_t* comm, - struct ompi_message_t **message, - ompi_status_public_t* status ); - -extern int mca_pml_bfo_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_bfo_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_bfo_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_bfo_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_bfo_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_bfo_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_bfo_imrecv( void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - struct ompi_request_t **request ); - -extern int mca_pml_bfo_mrecv( void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - ompi_status_public_t* status ); - -extern int mca_pml_bfo_dump( struct ompi_communicator_t* comm, - int verbose ); - -extern int mca_pml_bfo_start( size_t count, - ompi_request_t** requests ); - -extern int mca_pml_bfo_ft_event( int state ); - -END_C_DECLS - -struct mca_pml_bfo_pckt_pending_t { - ompi_free_list_item_t super; - ompi_proc_t* proc; - mca_pml_bfo_hdr_t hdr; - struct mca_bml_base_btl_t *bml_btl; - uint8_t order; -}; -typedef struct mca_pml_bfo_pckt_pending_t mca_pml_bfo_pckt_pending_t; -OBJ_CLASS_DECLARATION(mca_pml_bfo_pckt_pending_t); - -#define MCA_PML_BFO_PCKT_PENDING_ALLOC(pckt) \ -do { \ - ompi_free_list_item_t* item; \ - OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.pending_pckts, item); \ - pckt = (mca_pml_bfo_pckt_pending_t*)item; \ -} while (0) - -#define MCA_PML_BFO_PCKT_PENDING_RETURN(pckt) \ -do { \ - /* return packet */ \ - OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.pending_pckts, \ - (ompi_free_list_item_t*)pckt); \ -} while(0) - -#define MCA_PML_BFO_ADD_FIN_TO_PENDING(P, D, B, O, S) \ - do { \ - mca_pml_bfo_pckt_pending_t *_pckt; \ - \ - MCA_PML_BFO_PCKT_PENDING_ALLOC(_pckt); \ - _pckt->hdr.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_FIN; \ - _pckt->hdr.hdr_fin.hdr_des = (D); \ - _pckt->hdr.hdr_fin.hdr_fail = (S); \ - _pckt->proc = (P); \ - _pckt->bml_btl = (B); \ - _pckt->order = (O); \ - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); \ - opal_list_append(&mca_pml_bfo.pckt_pending, \ - (opal_list_item_t*)_pckt); \ - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); \ - } while(0) - - -int mca_pml_bfo_send_fin(ompi_proc_t* proc, mca_bml_base_btl_t* bml_btl, -#if PML_BFO - opal_ptr_t hdr_des, uint8_t order, uint32_t status, - uint16_t seq, uint8_t reqseq, uint16_t ctx, uint32_t src); -#else /* PML_BFO */ - opal_ptr_t hdr_des, uint8_t order, uint32_t status); -#endif /* PML_BFO */ - -/* This function tries to resend FIN/ACK packets from pckt_pending queue. - * Packets are added to the queue when sending of FIN or ACK is failed due to - * resource unavailability. bml_btl passed to the function doesn't represents - * packet's destination, it represents BTL on which resource was freed, so only - * this BTL should be considered for resending packets */ -void mca_pml_bfo_process_pending_packets(mca_bml_base_btl_t* bml_btl); - -/* This function retries failed PUT/GET operations on frag. When RDMA operation - * cannot be accomplished for some reason, frag is put on the rdma_pending list. - * Later the operation is retried. The destination of RDMA operation is stored - * inside the frag structure */ -void mca_pml_bfo_process_pending_rdma(void); - -#define MCA_PML_BFO_PROGRESS_PENDING(bml_btl) \ - do { \ - if(opal_list_get_size(&mca_pml_bfo.pckt_pending)) \ - mca_pml_bfo_process_pending_packets(bml_btl); \ - if(opal_list_get_size(&mca_pml_bfo.recv_pending)) \ - mca_pml_bfo_recv_request_process_pending(); \ - if(opal_list_get_size(&mca_pml_bfo.send_pending)) \ - mca_pml_bfo_send_request_process_pending(bml_btl); \ - if(opal_list_get_size(&mca_pml_bfo.rdma_pending)) \ - mca_pml_bfo_process_pending_rdma(); \ - } while (0) - -/* - * Compute the total number of bytes on supplied descriptor - */ -static inline int mca_pml_bfo_compute_segment_length (size_t seg_size, void *segments, size_t count, - size_t hdrlen) { - size_t i, length; - - for (i = 0, length = -hdrlen ; i < count ; ++i) { - mca_btl_base_segment_t *segment = - (mca_btl_base_segment_t *)((char *) segments + i * seg_size); - - length += segment->seg_len; - } - - return length; -} - -static inline int mca_pml_bfo_compute_segment_length_base (mca_btl_base_segment_t *segments, - size_t count, size_t hdrlen) { - size_t i, length; - - for (i = 0, length = -hdrlen ; i < count ; ++i) { - length += segments[i].seg_len; - } - - return length; -} - -/* represent BTL chosen for sending request */ -struct mca_pml_bfo_com_btl_t { - mca_bml_base_btl_t *bml_btl; - struct mca_mpool_base_registration_t* btl_reg; - size_t length; -}; -typedef struct mca_pml_bfo_com_btl_t mca_pml_bfo_com_btl_t; - -int mca_pml_bfo_com_btl_comp(const void *v1, const void *v2); - -/* Calculate what percentage of a message to send through each BTL according to - * relative weight */ -static inline void -mca_pml_bfo_calc_weighted_length( mca_pml_bfo_com_btl_t *btls, int num_btls, size_t size, - double weight_total ) -{ - int i; - size_t length_left; - - /* shortcut for common case for only one BTL */ - if( OPAL_LIKELY(1 == num_btls) ) { - btls[0].length = size; - return; - } - - /* sort BTLs according of their weights so BTLs with smaller weight will - * not hijack all of the traffic */ - qsort( btls, num_btls, sizeof(mca_pml_bfo_com_btl_t), - mca_pml_bfo_com_btl_comp ); - - for(length_left = size, i = 0; i < num_btls; i++) { - mca_bml_base_btl_t* bml_btl = btls[i].bml_btl; - size_t length = 0; - if( OPAL_UNLIKELY(0 != length_left) ) { - length = (length_left > bml_btl->btl->btl_eager_limit)? - ((size_t)(size * (bml_btl->btl_weight / weight_total))) : - length_left; - - if(length > length_left) - length = length_left; - length_left -= length; - } - btls[i].length = length; - } - - /* account for rounding errors */ - btls[0].length += length_left; -} - -#endif diff --git a/ompi/mca/pml/bfo/pml_bfo_comm.c b/ompi/mca/pml/bfo/pml_bfo_comm.c deleted file mode 100644 index 6e00f6ca2ee..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_comm.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include - -#include "pml_bfo.h" -#include "pml_bfo_comm.h" - - - -static void mca_pml_bfo_comm_proc_construct(mca_pml_bfo_comm_proc_t* proc) -{ - proc->expected_sequence = 1; - proc->ompi_proc = NULL; - proc->send_sequence = 0; - OBJ_CONSTRUCT(&proc->frags_cant_match, opal_list_t); - OBJ_CONSTRUCT(&proc->specific_receives, opal_list_t); - OBJ_CONSTRUCT(&proc->unexpected_frags, opal_list_t); -} - - -static void mca_pml_bfo_comm_proc_destruct(mca_pml_bfo_comm_proc_t* proc) -{ - OBJ_DESTRUCT(&proc->frags_cant_match); - OBJ_DESTRUCT(&proc->specific_receives); - OBJ_DESTRUCT(&proc->unexpected_frags); -} - - -static OBJ_CLASS_INSTANCE( - mca_pml_bfo_comm_proc_t, - opal_object_t, - mca_pml_bfo_comm_proc_construct, - mca_pml_bfo_comm_proc_destruct); - - -static void mca_pml_bfo_comm_construct(mca_pml_bfo_comm_t* comm) -{ - OBJ_CONSTRUCT(&comm->wild_receives, opal_list_t); - OBJ_CONSTRUCT(&comm->matching_lock, opal_mutex_t); - comm->recv_sequence = 0; - comm->procs = NULL; - comm->last_probed = 0; - comm->num_procs = 0; -} - - -static void mca_pml_bfo_comm_destruct(mca_pml_bfo_comm_t* comm) -{ - size_t i; - for(i=0; inum_procs; i++) - OBJ_DESTRUCT((&comm->procs[i])); - if(NULL != comm->procs) - free(comm->procs); - OBJ_DESTRUCT(&comm->wild_receives); - OBJ_DESTRUCT(&comm->matching_lock); -} - - -OBJ_CLASS_INSTANCE( - mca_pml_bfo_comm_t, - opal_object_t, - mca_pml_bfo_comm_construct, - mca_pml_bfo_comm_destruct); - - -int mca_pml_bfo_comm_init_size(mca_pml_bfo_comm_t* comm, size_t size) -{ - size_t i; - - /* send message sequence-number support - sender side */ - comm->procs = (mca_pml_bfo_comm_proc_t*)malloc(sizeof(mca_pml_bfo_comm_proc_t)*size); - if(NULL == comm->procs) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - for(i=0; iprocs+i, mca_pml_bfo_comm_proc_t); - } - comm->num_procs = size; - return OMPI_SUCCESS; -} - - diff --git a/ompi/mca/pml/bfo/pml_bfo_comm.h b/ompi/mca/pml/bfo/pml_bfo_comm.h deleted file mode 100644 index 06273ce9e93..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_comm.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ -#ifndef MCA_PML_BFO_COMM_H -#define MCA_PML_BFO_COMM_H - -#include "opal/threads/mutex.h" -#include "opal/class/opal_list.h" -#include "ompi/proc/proc.h" -BEGIN_C_DECLS - - -struct mca_pml_bfo_comm_proc_t { - opal_object_t super; - uint16_t expected_sequence; /**< send message sequence number - receiver side */ - struct ompi_proc_t* ompi_proc; -#if OPAL_ENABLE_MULTI_THREADS - volatile int32_t send_sequence; /**< send side sequence number */ -#else - int32_t send_sequence; /**< send side sequence number */ -#endif - opal_list_t frags_cant_match; /**< out-of-order fragment queues */ - opal_list_t specific_receives; /**< queues of unmatched specific receives */ - opal_list_t unexpected_frags; /**< unexpected fragment queues */ -}; -typedef struct mca_pml_bfo_comm_proc_t mca_pml_bfo_comm_proc_t; - - -/** - * Cached on ompi_communicator_t to hold queues/state - * used by the PML<->PTL interface for matching logic. - */ -struct mca_pml_comm_t { - opal_object_t super; -#if OPAL_ENABLE_MULTI_THREADS - volatile uint32_t recv_sequence; /**< recv request sequence number - receiver side */ -#else - uint32_t recv_sequence; /**< recv request sequence number - receiver side */ -#endif - opal_mutex_t matching_lock; /**< matching lock */ - opal_list_t wild_receives; /**< queue of unmatched wild (source process not specified) receives */ - mca_pml_bfo_comm_proc_t* procs; - size_t num_procs; - size_t last_probed; -}; -typedef struct mca_pml_comm_t mca_pml_bfo_comm_t; - -OBJ_CLASS_DECLARATION(mca_pml_bfo_comm_t); - - -/** - * Initialize an instance of mca_pml_bfo_comm_t based on the communicator size. - * - * @param comm Instance of mca_pml_bfo_comm_t - * @param size Size of communicator - * @return OMPI_SUCCESS or error status on failure. - */ - -extern int mca_pml_bfo_comm_init_size(mca_pml_bfo_comm_t* comm, size_t size); - -END_C_DECLS -#endif - diff --git a/ompi/mca/pml/bfo/pml_bfo_component.c b/ompi/mca/pml/bfo/pml_bfo_component.c deleted file mode 100644 index 274f5fb0475..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_component.c +++ /dev/null @@ -1,274 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2009 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-2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "opal/mca/event/event.h" -#include "mpi.h" -#include "ompi/runtime/params.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/base/pml_base_bsend.h" -#include "pml_bfo.h" -#include "pml_bfo_hdr.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_rdmafrag.h" -#include "pml_bfo_recvfrag.h" -#include "ompi/mca/bml/base/base.h" -#include "pml_bfo_component.h" -#include "opal/mca/allocator/base/base.h" -#include "opal/runtime/opal_params.h" - -OBJ_CLASS_INSTANCE( mca_pml_bfo_pckt_pending_t, - ompi_free_list_item_t, - NULL, - NULL ); - -static int mca_pml_bfo_component_register(void); -static int mca_pml_bfo_component_open(void); -static int mca_pml_bfo_component_close(void); -static mca_pml_base_module_t* -mca_pml_bfo_component_init( int* priority, bool enable_progress_threads, - bool enable_mpi_threads ); -static int mca_pml_bfo_component_fini(void); -int mca_pml_bfo_output = 0; -static int mca_pml_bfo_verbose = 0; - -mca_pml_base_component_2_0_0_t mca_pml_bfo_component = { - - /* First, the mca_base_component_t struct containing meta - information about the component itself */ - - .pmlm_version = { - MCA_PML_BASE_VERSION_2_0_0, - - .mca_component_name = "bfo", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - .mca_open_component = mca_pml_bfo_component_open, - .mca_close_component = mca_pml_bfo_component_close, - .mca_register_component_params = mca_pml_bfo_component_register, - }, - .pmlm_data = { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - }, - - .pmlm_init = mca_pml_bfo_component_init, - .pmlm_finalize = mca_pml_bfo_component_fini, -}; - -void *mca_pml_bfo_seg_alloc( struct mca_mpool_base_module_t* mpool, - size_t* size, - mca_mpool_base_registration_t** registration); - -void mca_pml_bfo_seg_free( struct mca_mpool_base_module_t* mpool, - void* segment ); - -static inline int mca_pml_bfo_param_register_int( - const char* param_name, - int default_value, - int *storage) -{ - *storage = default_value; - (void) mca_base_component_var_register(&mca_pml_bfo_component.pmlm_version, param_name, - NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - - return *storage; -} - -static inline unsigned int mca_pml_bfo_param_register_uint( - const char* param_name, - unsigned int default_value, - unsigned int *storage) -{ - *storage = default_value; - (void) mca_base_component_var_register(&mca_pml_bfo_component.pmlm_version, param_name, - NULL, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, storage); - - return *storage; -} - -static int mca_pml_bfo_component_register(void) -{ - int default_priority; - -#if PML_BFO - default_priority = 5; -#else /* PML_BFO */ - default_priority = 20; - mca_pml_bfo_param_register_int("priority", 20); -#endif /* PML_BFO */ - - (void) mca_pml_bfo_param_register_int("verbose", 0, &mca_pml_bfo_verbose); - (void) mca_pml_bfo_param_register_int("free_list_num", 4, &mca_pml_bfo.free_list_num); - (void) mca_pml_bfo_param_register_int("free_list_max", -1, &mca_pml_bfo.free_list_max); - (void) mca_pml_bfo_param_register_int("free_list_inc", 64, &mca_pml_bfo.free_list_inc); - (void) mca_pml_bfo_param_register_int("priority", default_priority, &mca_pml_bfo.priority); - (void) mca_pml_bfo_param_register_uint("send_pipeline_depth", 3, &mca_pml_bfo.send_pipeline_depth); - (void) mca_pml_bfo_param_register_uint("recv_pipeline_depth", 4, &mca_pml_bfo.recv_pipeline_depth); - (void) mca_pml_bfo_param_register_uint("rdma_put_retries_limit", 5, &mca_pml_bfo.rdma_put_retries_limit); - (void) mca_pml_bfo_param_register_int("max_rdma_per_request", 4, &mca_pml_bfo.max_rdma_per_request); - (void) mca_pml_bfo_param_register_int("max_send_per_range", 4, &mca_pml_bfo.max_send_per_range); - (void) mca_pml_bfo_param_register_uint("unexpected_limit", 128, &mca_pml_bfo.unexpected_limit); - - mca_pml_bfo.allocator_name = "bucket"; - (void) mca_base_component_var_register(&mca_pml_bfo_component.pmlm_version, - "allocator", - "Name of allocator component for unexpected messages", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &mca_pml_bfo.allocator_name); - - return OMPI_SUCCESS; -} - -static int mca_pml_bfo_component_open(void) -{ - mca_pml_bfo_output = opal_output_open(NULL); - opal_output_set_verbosity(mca_pml_bfo_output, mca_pml_bfo_verbose); - - mca_pml_bfo.enabled = false; - return mca_base_framework_open(&ompi_bml_base_framework, 0); -} - - -static int mca_pml_bfo_component_close(void) -{ - int rc; - - if (OMPI_SUCCESS != (rc = mca_base_framework_close(&ompi_bml_base_framework))) { - return rc; - } - opal_output_close(mca_pml_bfo_output); - - return OMPI_SUCCESS; -} - - -static mca_pml_base_module_t* -mca_pml_bfo_component_init( int* priority, - bool enable_progress_threads, - bool enable_mpi_threads ) -{ - mca_allocator_base_component_t* allocator_component; - - opal_output_verbose( 10, mca_pml_bfo_output, - "in bfo, my priority is %d\n", mca_pml_bfo.priority); - - if((*priority) > mca_pml_bfo.priority) { - *priority = mca_pml_bfo.priority; - return NULL; - } - *priority = mca_pml_bfo.priority; - - allocator_component = mca_allocator_component_lookup( mca_pml_bfo.allocator_name ); - if(NULL == allocator_component) { - opal_output(0, "mca_pml_bfo_component_init: can't find allocator: %s\n", mca_pml_bfo.allocator_name); - return NULL; - } - - mca_pml_bfo.allocator = allocator_component->allocator_init(true, - mca_pml_bfo_seg_alloc, - mca_pml_bfo_seg_free, NULL); - if(NULL == mca_pml_bfo.allocator) { - opal_output(0, "mca_pml_bfo_component_init: unable to initialize allocator\n"); - return NULL; - } - - - if(OMPI_SUCCESS != mca_bml_base_init( enable_progress_threads, - enable_mpi_threads)) { - return NULL; - } - - /* Set this here (vs in component_open()) because - opal_leave_pinned* may have been set after MCA params were - read (e.g., by the openib btl) */ - mca_pml_bfo.leave_pinned = (1 == opal_leave_pinned); - mca_pml_bfo.leave_pinned_pipeline = (int) opal_leave_pinned_pipeline; - - return &mca_pml_bfo.super; -} - -int mca_pml_bfo_component_fini(void) -{ - int rc; - - /* Shutdown BML */ - if(OMPI_SUCCESS != (rc = mca_bml.bml_finalize())) - return rc; - - if(!mca_pml_bfo.enabled) - return OMPI_SUCCESS; /* never selected.. return success.. */ - mca_pml_bfo.enabled = false; /* not anymore */ - - OBJ_DESTRUCT(&mca_pml_bfo.rdma_pending); - OBJ_DESTRUCT(&mca_pml_bfo.pckt_pending); - OBJ_DESTRUCT(&mca_pml_bfo.recv_pending); - OBJ_DESTRUCT(&mca_pml_bfo.send_pending); - OBJ_DESTRUCT(&mca_pml_bfo.non_existing_communicator_pending); - OBJ_DESTRUCT(&mca_pml_bfo.buffers); - OBJ_DESTRUCT(&mca_pml_bfo.pending_pckts); - OBJ_DESTRUCT(&mca_pml_bfo.recv_frags); - OBJ_DESTRUCT(&mca_pml_bfo.rdma_frags); - OBJ_DESTRUCT(&mca_pml_bfo.lock); - - if(OMPI_SUCCESS != (rc = mca_pml_bfo.allocator->alc_finalize(mca_pml_bfo.allocator))) { - return rc; - } - -#if 0 - if (mca_pml_base_send_requests.fl_num_allocated != - mca_pml_base_send_requests.super.opal_list_length) { - opal_output(0, "bfo send requests: %d allocated %d returned\n", - mca_pml_base_send_requests.fl_num_allocated, - mca_pml_base_send_requests.super.opal_list_length); - } - if (mca_pml_base_recv_requests.fl_num_allocated != - mca_pml_base_recv_requests.super.opal_list_length) { - opal_output(0, "bfo recv requests: %d allocated %d returned\n", - mca_pml_base_recv_requests.fl_num_allocated, - mca_pml_base_recv_requests.super.opal_list_length); - } -#endif - - return OMPI_SUCCESS; -} - -void *mca_pml_bfo_seg_alloc( struct mca_mpool_base_module_t* mpool, - size_t* size, - mca_mpool_base_registration_t** registration) { - return malloc(*size); -} - -void mca_pml_bfo_seg_free( struct mca_mpool_base_module_t* mpool, - void* segment ) { - free(segment); -} diff --git a/ompi/mca/pml/bfo/pml_bfo_component.h b/ompi/mca/pml/bfo/pml_bfo_component.h deleted file mode 100644 index 2fd08d018eb..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_component.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ - -#ifndef MCA_PML_BFO_COMPONENT_H -#define MCA_PML_BFO_COMPONENT_H - -BEGIN_C_DECLS - -/* - * PML module functions. - */ -OMPI_MODULE_DECLSPEC extern mca_pml_base_component_2_0_0_t mca_pml_bfo_component; - -END_C_DECLS - -#endif diff --git a/ompi/mca/pml/bfo/pml_bfo_cuda.c b/ompi/mca/pml/bfo/pml_bfo_cuda.c deleted file mode 100644 index 3bb3c9537fc..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_cuda.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2008 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2008 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 NVIDIA Corporation. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "opal/prefetch.h" -#include "opal/mca/btl/btl.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/constants.h" -#include "ompi/mca/pml/pml.h" -#include "pml_bfo.h" -#include "pml_bfo_hdr.h" -#include "pml_bfo_rdmafrag.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_sendreq.h" -#include "ompi/mca/bml/base/base.h" -#include "ompi/memchecker.h" - -size_t mca_pml_bfo_rdma_cuda_btls( - mca_bml_base_endpoint_t* bml_endpoint, - unsigned char* base, - size_t size, - mca_pml_bfo_com_btl_t* rdma_btls); - -int mca_pml_bfo_cuda_need_buffers(void * rreq, - mca_btl_base_module_t* btl); - -/** - * Handle the CUDA buffer. - */ -int mca_pml_bfo_send_request_start_cuda(mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size) { - int rc; -#if OPAL_CUDA_SUPPORT_41 - sendreq->req_send.req_base.req_convertor.flags &= ~CONVERTOR_CUDA; - if (opal_convertor_need_buffers(&sendreq->req_send.req_base.req_convertor) == false) { - unsigned char *base; - opal_convertor_get_current_pointer( &sendreq->req_send.req_base.req_convertor, (void**)&base ); - /* Set flag back */ - sendreq->req_send.req_base.req_convertor.flags |= CONVERTOR_CUDA; - if( 0 != (sendreq->req_rdma_cnt = (uint32_t)mca_pml_bfo_rdma_cuda_btls( - sendreq->req_endpoint, - base, - sendreq->req_send.req_bytes_packed, - sendreq->req_rdma))) { - rc = mca_pml_bfo_send_request_start_rdma(sendreq, bml_btl, - sendreq->req_send.req_bytes_packed); - if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - mca_pml_bfo_free_rdma_resources(sendreq); - } - } else { - if (bml_btl->btl_flags & MCA_BTL_FLAGS_CUDA_PUT) { - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, size, - MCA_PML_BFO_HDR_FLAGS_CONTIG); - } else { - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, size, 0); - } - } - } else { - /* Do not send anything with first rendezvous message as copying GPU - * memory into RNDV message is expensive. */ - sendreq->req_send.req_base.req_convertor.flags |= CONVERTOR_CUDA; - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, 0, 0); - } -#else - /* Just do the rendezvous but set initial data to be sent to zero */ - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, 0, 0); -#endif /* OPAL_CUDA_SUPPORT_41 */ - return rc; -} - - - -size_t mca_pml_bfo_rdma_cuda_btls( - mca_bml_base_endpoint_t* bml_endpoint, - unsigned char* base, - size_t size, - mca_pml_bfo_com_btl_t* rdma_btls) -{ - int num_btls = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_send); - double weight_total = 0; - int num_btls_used = 0, n; - - /* shortcut when there are no rdma capable btls */ - if(num_btls == 0) { - return 0; - } - - /* check to see if memory is registered */ - for(n = 0; n < num_btls && num_btls_used < mca_pml_bfo.max_rdma_per_request; - n++) { - mca_bml_base_btl_t* bml_btl = - mca_bml_base_btl_array_get_index(&bml_endpoint->btl_send, n); - - if (bml_btl->btl_flags & MCA_BTL_FLAGS_CUDA_GET) { - mca_mpool_base_registration_t* reg = NULL; - mca_mpool_base_module_t *btl_mpool = bml_btl->btl->btl_mpool; - - if( NULL != btl_mpool ) { - /* register the memory */ - btl_mpool->mpool_register(btl_mpool, base, size, 0, ®); - } - - if(NULL == reg) - continue; - - rdma_btls[num_btls_used].bml_btl = bml_btl; - rdma_btls[num_btls_used].btl_reg = reg; - weight_total += bml_btl->btl_weight; - num_btls_used++; - } - } - - /* if we don't use leave_pinned and all BTLs that already have this memory - * registered amount to less then half of available bandwidth - fall back to - * pipeline protocol */ - if(0 == num_btls_used || (!mca_pml_bfo.leave_pinned && weight_total < 0.5)) - return 0; - - mca_pml_bfo_calc_weighted_length(rdma_btls, num_btls_used, size, - weight_total); - - return num_btls_used; -} - -int mca_pml_bfo_cuda_need_buffers(void * rreq, - mca_btl_base_module_t* btl) -{ - mca_pml_bfo_recv_request_t* recvreq = (mca_pml_bfo_recv_request_t*)rreq; - if ((recvreq->req_recv.req_base.req_convertor.flags & CONVERTOR_CUDA) && - (btl->btl_flags & MCA_BTL_FLAGS_CUDA_GET)) { - recvreq->req_recv.req_base.req_convertor.flags &= ~CONVERTOR_CUDA; - if(opal_convertor_need_buffers(&recvreq->req_recv.req_base.req_convertor) == true) { - recvreq->req_recv.req_base.req_convertor.flags |= CONVERTOR_CUDA; - return true; - } else { - recvreq->req_recv.req_base.req_convertor.flags |= CONVERTOR_CUDA; - return false; - } - } - return true; -} - diff --git a/ompi/mca/pml/bfo/pml_bfo_failover.c b/ompi/mca/pml/bfo/pml_bfo_failover.c deleted file mode 100644 index 25e6228954d..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_failover.c +++ /dev/null @@ -1,2187 +0,0 @@ -/* - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. - * Copyright (c) 2013 Intel, Inc. All rights reserved - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * Functions that implement failover capabilities. To utilize the - * failover feature, one needs to configure the library with - * --enable-openib-failover. Then the system that is being used - * must have two or more openib BTLs in use. When an error occurs, - * the BTL will call into this PML to map out the offending BTL and - * continue using the one that is still working. - * Most of the differences between the ob1 PML and the bfo PML are - * contained in this file. - */ - -#include "ompi_config.h" - -#include -#include - -#include "opal/class/opal_bitmap.h" -#include "opal/mca/btl/btl.h" -#include "opal/mca/btl/base/base.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/base/base.h" -#include "ompi/mca/pml/base/base.h" -#include "pml_bfo.h" -#include "pml_bfo_component.h" -#include "pml_bfo_comm.h" -#include "pml_bfo_hdr.h" -#include "pml_bfo_recvfrag.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_rdmafrag.h" -#include "pml_bfo_failover.h" -#include "ompi/mca/bml/base/base.h" - -#include "ompi/runtime/ompi_cr.h" - -static void mca_pml_bfo_error_pending_packets(mca_btl_base_module_t* btl, - mca_bml_base_endpoint_t* ep); - -/** - * When running with failover enabled, check the PML sequence numbers - * to see if we have received a duplicate message. This check is done - * for for all MATCH fragments. It is also done for RNDV and RGET - * fragments that do not have the MCA_PML_BFO_HDR_FLAGS_RESTART flag - * set. - * We set the window size to half the total range of sequence numbers. - * We only enter this code when the seq_num is not the expected one. - * A few more notes on the algorithm used here. In normal operation, - * the expected value will either be equal to or less than the - * sequence number of the header. This is because we are using this - * sequence number to detect packets arriving prior to them being - * expected. If we determine that expected is less than header, then - * make sure this is not a rollover case. We do that by adding the - * maxnum to the expected. - * @param proc Pointer to proc from where message came - * @param hdr Pointer to header of message - */ -bool mca_pml_bfo_is_duplicate_msg(mca_pml_bfo_comm_proc_t* proc, - mca_pml_bfo_match_hdr_t *hdr) -{ - const int window = 32768; - const int maxnum = 65536; - mca_pml_bfo_recv_frag_t *frag; - -#if 0 - opal_output(0, "checking dup, exp=%d, act=%d, type=%d, cant_match=%d\n", - (uint16_t)proc->expected_sequence, - hdr->hdr_seq, hdr->hdr_common.hdr_type, - opal_list_get_size(&proc->frags_cant_match)); -#endif - - /* Few cases near end of values where expected may equal 65535 and - * an out of order shows up that may equal something like 1. */ - if (OPAL_UNLIKELY((uint16_t)proc->expected_sequence > hdr->hdr_seq)) { - if (((uint16_t)proc->expected_sequence - hdr->hdr_seq) < window) { - opal_output_verbose(20, mca_pml_bfo_output, - "%s:%d: frag duplicated, exp=%d, act=%d, type=%d\n", - __FILE__, __LINE__, (uint16_t)proc->expected_sequence, - hdr->hdr_seq, hdr->hdr_common.hdr_type); - return true; - } - } else { - /* This is the normal flow through this code. We also need to - * use the maxnum to ensure that we handle cases where the - * expected number has rolled over but then a duplicate message - * shows up that is greater than it. */ - if ((((uint16_t)proc->expected_sequence + maxnum) - hdr->hdr_seq) < window) { - opal_output_verbose(20, mca_pml_bfo_output, - "%s:%d: frag duplicated, exp=%d, act=%d, type=%d\n", - __FILE__, __LINE__, (uint16_t)proc->expected_sequence, - hdr->hdr_seq, hdr->hdr_common.hdr_type); - return true; - } - } - - /* Need to explicitly check against any out of order fragments. Unfortunately, we - * always have to do this since we can get a duplicate out of order fragment. */ - if(OPAL_UNLIKELY(opal_list_get_size(&proc->frags_cant_match) > 0)) { - for(frag = (mca_pml_bfo_recv_frag_t*)opal_list_get_first(&proc->frags_cant_match); - frag != (mca_pml_bfo_recv_frag_t*)opal_list_get_end(&proc->frags_cant_match); - frag = (mca_pml_bfo_recv_frag_t*)opal_list_get_next(frag)) - { - mca_pml_bfo_match_hdr_t* mhdr = &frag->hdr.hdr_match; - - if(mhdr->hdr_seq == hdr->hdr_seq) { - opal_output_verbose(20, mca_pml_bfo_output, - "%s:%d: frag duplicated on frags_cant_match list, seq=%d, type=%d\n", - __FILE__, __LINE__, hdr->hdr_seq, hdr->hdr_common.hdr_type); - return true; - } - } - } - - return false; -} - -/** - * This function checks to see if we have received a duplicate FIN - * message. This is done by first pulling the pointer of the request - * that the FIN message is pointing to from the message. We then - * check the various fields in the request to the fields in the header - * and make sure they match. If they do not, then the request must - * have been recycled already and this is a duplicate FIN message. We - * have to do this check on every FIN message that we receive. - */ -bool mca_pml_bfo_is_duplicate_fin(mca_pml_bfo_hdr_t* hdr, mca_btl_base_descriptor_t* rdma, - mca_btl_base_module_t* btl) -{ - mca_pml_base_request_t* basereq; - /* When running with failover enabled, need to ensure that this - * is not a duplicate FIN message. */ - if (btl->btl_flags & MCA_BTL_FLAGS_FAILOVER_SUPPORT) { - /* The first check is to make sure the descriptor is pointing - * to a valid request. The descriptor may be pointing to NULL - * if it was freed and not reused yet. */ - if (NULL == rdma->des_cbdata) { - opal_output_verbose(20, mca_pml_bfo_output, - "FIN: received: dropping because not pointing to valid descriptor " - "PML=%d CTX=%d SRC=%d RQS=%d", - hdr->hdr_fin.hdr_match.hdr_seq, - hdr->hdr_fin.hdr_match.hdr_ctx, - hdr->hdr_fin.hdr_match.hdr_src, - hdr->hdr_fin.hdr_match.hdr_common.hdr_flags); - return true; - } - - basereq = (mca_pml_base_request_t*)rdma->des_cbdata; - /* Now we know the descriptor is pointing to a non-null request. - * Does it match what we expect? To make sure the receiver request - * matches the FIN message, check the context number, source of the - * message, and MPI sequence number. Then make sure that it also - * matches the internal sequencing number of the requests. We need - * to look at the type of request we are pointing at to figure out - * what fields to access. */ - if (basereq->req_type == MCA_PML_REQUEST_RECV) { - mca_pml_bfo_recv_request_t* recvreq = (mca_pml_bfo_recv_request_t*)basereq; - if ((hdr->hdr_fin.hdr_match.hdr_ctx != - recvreq->req_recv.req_base.req_comm->c_contextid) || - (hdr->hdr_fin.hdr_match.hdr_src != - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE) || - (hdr->hdr_fin.hdr_match.hdr_seq != (uint16_t)recvreq->req_msgseq)) { - opal_output_verbose(5, mca_pml_bfo_output, - "FIN: received on receiver: dropping because no match " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d " - "RQS:exp=%d,act=%d, dst_req=%p", - (uint16_t)recvreq->req_msgseq, hdr->hdr_fin.hdr_match.hdr_seq, - recvreq->req_recv.req_base.req_comm->c_contextid, - hdr->hdr_fin.hdr_match.hdr_ctx, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - hdr->hdr_fin.hdr_match.hdr_src, - recvreq->req_restartseq, - hdr->hdr_fin.hdr_match.hdr_common.hdr_flags, - (void *)recvreq); - return true; - } - if (hdr->hdr_fin.hdr_match.hdr_common.hdr_flags != recvreq->req_restartseq) { - opal_output_verbose(5, mca_pml_bfo_output, - "FIN: received on receiver: dropping because old " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d " - "RQS:exp=%d,act=%d, dst_req=%p", - (uint16_t)recvreq->req_msgseq, hdr->hdr_fin.hdr_match.hdr_seq, - recvreq->req_recv.req_base.req_comm->c_contextid, - hdr->hdr_fin.hdr_match.hdr_ctx, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - hdr->hdr_fin.hdr_match.hdr_src, - recvreq->req_restartseq, - hdr->hdr_fin.hdr_match.hdr_common.hdr_flags, - (void *)recvreq); - return true; - } - } else if (basereq->req_type == MCA_PML_REQUEST_SEND) { - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)basereq; - if ((hdr->hdr_fin.hdr_match.hdr_ctx != - sendreq->req_send.req_base.req_comm->c_contextid) || - (hdr->hdr_fin.hdr_match.hdr_src != - sendreq->req_send.req_base.req_peer) || - (hdr->hdr_fin.hdr_match.hdr_seq != - (uint16_t)sendreq->req_send.req_base.req_sequence)) { - uint16_t seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - opal_output_verbose(5, mca_pml_bfo_output, - "FIN: received on sender: dropping because no match " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d " - "RQS:exp=%d,act=%d, dst_req=%p", - seq, hdr->hdr_fin.hdr_match.hdr_seq, - sendreq->req_send.req_base.req_comm->c_contextid, - hdr->hdr_fin.hdr_match.hdr_ctx, - sendreq->req_send.req_base.req_peer, - hdr->hdr_fin.hdr_match.hdr_src, - sendreq->req_restartseq, - hdr->hdr_fin.hdr_match.hdr_common.hdr_flags, - (void *)sendreq); - return true; - } - if (hdr->hdr_fin.hdr_match.hdr_common.hdr_flags != sendreq->req_restartseq) { - uint16_t seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - opal_output_verbose(5, mca_pml_bfo_output, - "FIN: received on sender: dropping because old " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d " - "RQS:exp=%d,act=%d, dst_req=%p", - seq, hdr->hdr_fin.hdr_match.hdr_seq, - sendreq->req_send.req_base.req_comm->c_contextid, - hdr->hdr_fin.hdr_match.hdr_ctx, - sendreq->req_send.req_base.req_peer, - hdr->hdr_fin.hdr_match.hdr_src, - sendreq->req_restartseq, - hdr->hdr_fin.hdr_match.hdr_common.hdr_flags, - (void *)sendreq); - return true; - } - } else { - /* We can get here if the descriptor has been reused, but - * not as an RDMA descriptor. In that case, the callback - * function has been set to something else. Clearly the - * descriptor we are interested is gone, so just drop the - * FIN message. */ - opal_output_verbose(5, mca_pml_bfo_output, - "FIN: received: dropping because descriptor has been reused " - "PML=%d CTX=%d SRC=%d RQS=%d rdma->des_flags=%d", - hdr->hdr_fin.hdr_match.hdr_seq, hdr->hdr_fin.hdr_match.hdr_ctx, - hdr->hdr_fin.hdr_match.hdr_src, hdr->hdr_fin.hdr_match.hdr_common.hdr_flags, - rdma->des_flags); - return true; - } - } - return false; -} - -/** - * Repost a FIN message if we get an error on the completion event. - */ -void mca_pml_bfo_repost_fin(struct mca_btl_base_descriptor_t* des) { - /* In the error case, we will repost the FIN message. I had - * considered restarting the request. The problem is that the - * request may be already complete when we detect that a FIN - * message got an error on its completion event. For example, with - * the PUT protocol, if the RDMA writes succeed and all the data - * has been sent, then the request is marked as complete and can be - * freed. Therefore, an error on the FIN message has no request to - * refer back to. So, we will just repost it. However, we are also - * faced with the case where the FIN message has an error but it - * actually makes it to the other side. In that case we are now - * sending a FIN message to a non-existent request on the receiver - * side. To handle that, we have added the match information to - * the FIN message. That way, we can check on the receiving side - * to ensure that it is pointing to a valid request. */ - mca_pml_bfo_fin_hdr_t* hdr; - mca_bml_base_endpoint_t* bml_endpoint; - ompi_proc_t *proc; - mca_bml_base_btl_t* bml_btl; - - proc = (ompi_proc_t*) des->des_cbdata; - bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - hdr = (mca_pml_bfo_fin_hdr_t*)des->des_local->seg_addr.pval; - - opal_output_verbose(20, mca_pml_bfo_output, - "REPOST: BFO_HDR_TYPE_FIN: seq=%d,myrank=%d,peer=%d,hdr->hdr_fail=%d,src=%d", - hdr->hdr_match.hdr_seq, OMPI_PROC_MY_NAME->vpid, OMPI_CAST_RTE_NAME(&proc->super.proc_name)->vpid, - hdr->hdr_fail, hdr->hdr_match.hdr_src); - - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - - /* Reconstruct the fin for sending on the other BTL */ - mca_pml_bfo_send_fin(proc, bml_btl, - hdr->hdr_des, MCA_BTL_NO_ORDER, - hdr->hdr_fail, hdr->hdr_match.hdr_seq, - hdr->hdr_match.hdr_common.hdr_flags, - hdr->hdr_match.hdr_ctx, hdr->hdr_match.hdr_src); - return; -} - -/** - * This function is called when a RNDV or RGET is received with the - * FLAGS_RESTART flag set. This means this message already has a - * receive request already associated with it. - */ -mca_pml_bfo_recv_request_t* mca_pml_bfo_get_request(mca_pml_bfo_match_hdr_t *hdr) { - mca_pml_bfo_recv_request_t *match = NULL; - mca_pml_bfo_rendezvous_hdr_t * rhdr = (mca_pml_bfo_rendezvous_hdr_t *) hdr; - match = (mca_pml_bfo_recv_request_t *) rhdr->hdr_dst_req.pval; - - /* Check to see if we have received a duplicate RNDV (or RGET). This can - * occur because we got an error when we reposted the RNDV. Therefore, - * we make sure that the request has not completed from underneath us - * and been recycled. Secondly, make sure we are not getting it a - * second time for the same request. */ - if ((rhdr->hdr_match.hdr_ctx != match->req_recv.req_base.req_comm->c_contextid) || - (rhdr->hdr_match.hdr_src != match->req_recv.req_base.req_ompi.req_status.MPI_SOURCE) || - (rhdr->hdr_match.hdr_seq != (uint16_t)match->req_msgseq) || - (rhdr->hdr_restartseq == match->req_restartseq)) { - if (hdr->hdr_common.hdr_type == MCA_PML_BFO_HDR_TYPE_RNDV) { - opal_output_verbose(20, mca_pml_bfo_output, - "RNDV: received with RESTART flag: duplicate, dropping " - "PML:exp=%d,act=%d RQS=%d, src_req=%p, dst_req=%p, peer=%d", - match->req_msgseq, rhdr->hdr_match.hdr_seq, match->req_restartseq, - match->remote_req_send.pval, (void *)match, - match->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - } else { - opal_output_verbose(20, mca_pml_bfo_output, - "RGET: received with RESTART flag: duplicate, dropping " - "PML:exp=%d,act=%d RQS=%d, src_req=%p, dst_req=%p, peer=%d", - match->req_msgseq, rhdr->hdr_match.hdr_seq, match->req_restartseq, - match->remote_req_send.pval, (void *)match, - match->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - } - return NULL; - } - - mca_pml_bfo_recv_request_reset(match); - if (hdr->hdr_common.hdr_type == MCA_PML_BFO_HDR_TYPE_RNDV) { - opal_output_verbose(30, mca_pml_bfo_output, - "RNDV: received with RESTART flag: restarting recv, " - "PML:exp=%d,act=%d RQS(new)=%d, src_req=%p, dst_req=%p, peer=%d", - match->req_msgseq, rhdr->hdr_match.hdr_seq, match->req_restartseq, - match->remote_req_send.pval, (void *)match, - match->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - } else { - opal_output_verbose(30, mca_pml_bfo_output, - "RGET: received with RESTART flag: restarting recv, " - "PML:exp=%d,act=%d RQS(new)=%d, src_req=%p, dst_req=%p, peer=%d", - match->req_msgseq, rhdr->hdr_match.hdr_seq, match->req_restartseq, - match->remote_req_send.pval, (void *)match, - match->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - } - return match; -} - -/** - * Callback for when a RNDVRESTARTNOTIFY message is received. A - * RNDVRESTARTNOTIFY message is sent from the sender to the receiver - * telling the receiver that the message is going to be started over. - * The receiver first makes sure that the request being pointed to is - * still valid. If it is not, that means the receiver must have - * completed the request and therefore we need to send a NACK back to - * the sender. The receiver then makes sure this is not a duplicate - * message. If it is a duplicate, it will just drop it. Otherwise, - * it will then send a RNDVRESTARTACK message if there are no - * outstanding events on the receiver. Otherwise, it will just change - * the state of the request and wait for another event to send the - * RNDVRESTARTACK to the sender. - */ -void mca_pml_bfo_recv_frag_callback_rndvrestartnotify(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_recv_request_t* recvreq; - ompi_proc_t* ompi_proc; - ompi_process_name_t orte_proc; - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY); - recvreq = (mca_pml_bfo_recv_request_t*)hdr->hdr_restart.hdr_dst_req.pval; - - /* Check to see if the receive request is still valid. If the - * request is recycled, that means the original request must have - * completed and we therefore need to send a NACK back to the sender. - * Note that when the request is gone, we need to pull some information - * off the header so that we can figure out where to send the NACK - * message back to. */ - if ((hdr->hdr_match.hdr_ctx != recvreq->req_recv.req_base.req_comm->c_contextid) || - (hdr->hdr_match.hdr_src != recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE) || - (hdr->hdr_match.hdr_seq != (uint16_t)recvreq->req_msgseq)) { - orte_proc.jobid = hdr->hdr_restart.hdr_jobid; - orte_proc.vpid = hdr->hdr_restart.hdr_vpid; - - ompi_proc = ompi_proc_find(&orte_proc); - opal_output_verbose(20, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: received: does not match request, sending NACK back " - "PML:req=%d,hdr=%d CTX:req=%d,hdr=%d SRC:req=%d,hdr=%d " - "RQS:req=%d,hdr=%d src_req=%p, dst_req=%p, peer=%d, hdr->hdr_jobid=%d, " - "hdr->hdr_vpid=%d, proc_hostname=%s", - (uint16_t)recvreq->req_msgseq, hdr->hdr_match.hdr_seq, - recvreq->req_recv.req_base.req_comm->c_contextid, hdr->hdr_match.hdr_ctx, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - hdr->hdr_match.hdr_src, recvreq->req_restartseq, - hdr->hdr_restart.hdr_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - hdr->hdr_restart.hdr_jobid, hdr->hdr_restart.hdr_vpid, - (NULL == ompi_proc->super.proc_hostname) ? "unknown" : ompi_proc->super.proc_hostname); - mca_pml_bfo_recv_request_rndvrestartnack(des, ompi_proc, false); - return; - } - - /* We know that we have the correct receive request. Make sure this is not - * a duplicate RNDVRESTARTNOTIFY on this request. */ - if (hdr->hdr_restart.hdr_restartseq == recvreq->req_restartseq) { - opal_output_verbose(20, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: received duplicate: dropping RNDVRESTARTNOTIFY " - "message PML:req=%d,hdr=%d CTX:req=%d,hdr=%d SRC:req=%d,hdr=%d " - "RQS:req=%d,hdr=%d src_req=%p, dst_req=%p, peer=%d", - (uint16_t)recvreq->req_msgseq, hdr->hdr_match.hdr_seq, - recvreq->req_recv.req_base.req_comm->c_contextid, hdr->hdr_match.hdr_ctx, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - hdr->hdr_match.hdr_src, recvreq->req_restartseq, - hdr->hdr_restart.hdr_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - return; - } - - /* Increment restart number. */ - recvreq->req_restartseq++; - recvreq->req_errstate |= RECVREQ_RNDVRESTART_RECVED; - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: received: outstanding receive events=%d, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - recvreq->req_events, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - - if (0 == recvreq->req_events) { - mca_pml_bfo_recv_request_rndvrestartack(recvreq, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY, - OMPI_SUCCESS, btl); - } - - return; -} - -/** - * Callback for when a RNDVRESTARTACK message is received. This - * message is sent from the receiver to the sender to acknowledge - * the receipt of the RNDVRESTARTNOTIFY message. At this point, - * the sender can reset the send request and restart the message. - */ -void mca_pml_bfo_recv_frag_callback_rndvrestartack(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_send_request_t* sendreq; - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK); - sendreq = (mca_pml_bfo_send_request_t*)hdr->hdr_restart.hdr_src_req.pval; - - /* Check to see if we have received a duplicate message. The - * first three comparisons make sure that we are not looking at a - * recycled request. The last check makes sure we are not getting - * a duplicate message for this specific request. All of this is - * needed because the receiver might get an error and repost the - * RNDVRESTARTACK message, but the RNDVRESTARTACK was actually received. */ - if ((hdr->hdr_match.hdr_ctx != sendreq->req_send.req_base.req_comm->c_contextid) || - (hdr->hdr_match.hdr_src != sendreq->req_send.req_base.req_peer) || - (hdr->hdr_match.hdr_seq != (uint16_t)sendreq->req_send.req_base.req_sequence) || - (hdr->hdr_restart.hdr_restartseq != sendreq->req_restartseq)) { - opal_output_verbose(20, mca_pml_bfo_output, - "RNDVRESTARTACK: received: does not match request, dropping " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d EXP:exp=%d,act=%d " - "src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, hdr->hdr_match.hdr_seq, - sendreq->req_send.req_base.req_comm->c_contextid, hdr->hdr_match.hdr_ctx, - sendreq->req_send.req_base.req_peer, hdr->hdr_match.hdr_src, - sendreq->req_restartseq, hdr->hdr_restart.hdr_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - return; - } - - sendreq->req_restart++; - if (2 == sendreq->req_restart) { - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTACK: received: restarting send " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - hdr->hdr_match.hdr_seq, hdr->hdr_restart.hdr_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - mca_pml_bfo_send_request_restart(sendreq, false, 0); - } else { - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTACK received: waiting for RNDVRESTARTNOTIFY completion " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - hdr->hdr_match.hdr_seq, hdr->hdr_restart.hdr_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - } - return; -} - - -/** - * Callback for when a RECVERRNOTIFY message is received. This message - * is sent from the receiver to the sender and tells the sender that - * the receiver has seen an error. This will trigger the sender - * to start the request restart sequence. - */ -void mca_pml_bfo_recv_frag_callback_recverrnotify(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_send_request_t* sendreq; - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY); - sendreq = (mca_pml_bfo_send_request_t*)hdr->hdr_restart.hdr_src_req.pval; - - /* First make sure that this message is pointing to a valid request. - * This can be determined if the communicator context, the source of - * the message, and the MPI sequence number all match. */ - if ((hdr->hdr_match.hdr_ctx != sendreq->req_send.req_base.req_comm->c_contextid) || - (hdr->hdr_match.hdr_src != sendreq->req_send.req_base.req_peer) || - (hdr->hdr_match.hdr_seq != (uint16_t)sendreq->req_send.req_base.req_sequence)) { - opal_output_verbose(20, mca_pml_bfo_output, - "RECVERRNOTIFY: received: does not match request, dropping " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d RQS:exp=%d,act=%d " - "src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, hdr->hdr_match.hdr_seq, - sendreq->req_send.req_base.req_comm->c_contextid, hdr->hdr_match.hdr_ctx, - sendreq->req_send.req_base.req_peer, hdr->hdr_match.hdr_src, - sendreq->req_restartseq, hdr->hdr_restart.hdr_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - return; - } - - /* If a good ACK was never received, then the first ACK received - * might be a RECVERRNOTIFY message. In that case, the sendreq does not - * have a valid req_recv pointer in it. Therefore, check for that - * case and update the field in the sendreq if necessary. */ - if (NULL == sendreq->req_recv.pval) { - sendreq->req_recv = hdr->hdr_restart.hdr_dst_req; - } - - /* Now check to see a restart needs to be issued. The request - * sequence number in the header is compared against the current - * request sequence number in the send request. If the header - * sequence number is greater than or equal to the send request - * number, then a rndvrestartnotify is issued. There are some cases - * where a few extra rndvrestartnotifys are issued. That is OK as - * it will all work itself out. The idea is to prevent many - * restarts unnecessarily. This still allows multiple restarts to - * happen. It could be that sometime later another error occurs - * which initiates a restart. That is OK as it will have the new - * sequence number and all is well. */ - if (hdr->hdr_restart.hdr_restartseq >= sendreq->req_restartseq) { - assert(sendreq->req_send.req_base.req_ompi.req_state == OMPI_REQUEST_ACTIVE); - sendreq->req_error++; - opal_output_verbose(30, mca_pml_bfo_output, - "RECVERRNOTIFY: received: sendreq has error, outstanding events=%d, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - sendreq->req_events, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, (void *)sendreq, - sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - - if (0 == sendreq->req_events) { - mca_pml_bfo_send_request_rndvrestartnotify(sendreq, false, - MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY, - OMPI_SUCCESS, btl); - } - } else { - opal_output_verbose(30, mca_pml_bfo_output, - "RECVERRNOTIFY: received: error has already been noted, ignoring " - "PML:exp=%d,act=%d RQS:exp=%d,act=%d src_req=%p, dst_req=%p, peer=%d", - sendreq->req_restartseq, hdr->hdr_restart.hdr_restartseq, - (uint16_t)sendreq->req_send.req_base.req_sequence, hdr->hdr_match.hdr_seq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - } - return; -} - -/** - * Callback for when a RNDVRESTARTNACK message is received. This message - * is sent from the receiver to the sender and tells the sender that - * the receiver has already completed the message and there is nothing - * else to be done. The sender should then just make the send request - * complete. - */ -void mca_pml_bfo_recv_frag_callback_rndvrestartnack(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_send_request_t* sendreq; - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK); - sendreq = (mca_pml_bfo_send_request_t*)hdr->hdr_restart.hdr_src_req.pval; - - /* Not convinced a RNDVRESTARTNACK that does not match a request can - * happen, but have the check in here anyways for now */ - if ((hdr->hdr_match.hdr_ctx != sendreq->req_send.req_base.req_comm->c_contextid) || - (hdr->hdr_match.hdr_src != sendreq->req_send.req_base.req_peer) || - (hdr->hdr_match.hdr_seq != (uint16_t)sendreq->req_send.req_base.req_sequence) || - (hdr->hdr_restart.hdr_restartseq != sendreq->req_restartseq)) { - opal_output_verbose(20, mca_pml_bfo_output, - "RNDVRESTARTNACK: received: does not match request, dropping " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d EXP:exp=%d,act=%d " - "src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, hdr->hdr_match.hdr_seq, - sendreq->req_send.req_base.req_comm->c_contextid, hdr->hdr_match.hdr_ctx, - sendreq->req_send.req_base.req_peer, hdr->hdr_match.hdr_src, - sendreq->req_restartseq, hdr->hdr_restart.hdr_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - return; - } - - opal_output_verbose(20, mca_pml_bfo_output, - "RNDVRESTARTNACK: received: marking send request as complete " - "PML=%d CTX=%d SRC=%d EXP=%d " - "src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_send.req_base.req_peer, sendreq->req_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - /* Mark the sender complete. This data exchange is over. */ - send_request_pml_complete(sendreq); - return; -} - - -/** - * This function gets called when failover is enabled and an error - * occurs during the rendezvous protocol. A message is sent to the - * receiving side notifying the request that the communication is - * going to be starting over. However, none of the information in the - * send request is reset yet, so that any in flight fragments can - * still find a home. Information in the send request gets reset when - * the completion event for this send occurs AND an ACK has been - * received back from the receiver. - */ -void mca_pml_bfo_send_request_rndvrestartnotify(mca_pml_bfo_send_request_t* sendreq, - bool repost, mca_btl_base_tag_t tag, - int status, mca_btl_base_module_t* btl) -{ - mca_btl_base_descriptor_t* des; - mca_pml_bfo_restart_hdr_t* restart; - int rc; - mca_bml_base_btl_t* bml_btl; - ompi_proc_t* proc = (ompi_proc_t*)sendreq->req_send.req_base.req_proc; - mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - /* If this message is not a repost, then update the sequence number. */ - if (!repost) { - /* Bump up the rendezvous request sequence number. */ - sendreq->req_restartseq++; - } - - assert(0 == sendreq->req_events); - assert(0 != bml_endpoint->btl_eager.arr_size); - - /* In the case that this is started because the receiver has - * sent us a message, then attempt to use a different BTL than the - * error message was received on. This may potentially tickle the - * error sooner if this side has not seen it yet. */ - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - if (bml_btl->btl == btl) { - /* If there is more than one BTL left, then we will get a - * different one. If there is only one, we will just get - * the same one back again. That is OK. */ - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - } - - /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_restart_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | - MCA_BTL_DES_SEND_ALWAYS_CALLBACK); - if( OPAL_UNLIKELY(NULL == des) ) { - opal_output(0, "%s:%d Our of resources, cannot proceed", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - - /* fill out header */ - restart = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - restart->hdr_match.hdr_common.hdr_flags = 0; - restart->hdr_match.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY; - restart->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - restart->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - restart->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - restart->hdr_restartseq = sendreq->req_restartseq; - restart->hdr_src_req.pval = sendreq; - restart->hdr_dst_req = sendreq->req_recv; - restart->hdr_dst_rank = sendreq->req_send.req_base.req_peer; /* Needed for NACKs */ - restart->hdr_jobid = OMPI_PROC_MY_NAME->jobid; - restart->hdr_vpid = OMPI_PROC_MY_NAME->vpid; - - bfo_hdr_hton(restart, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY, proc); - - /* initialize descriptor */ - des->des_cbfunc = mca_pml_bfo_rndvrestartnotify_completion; - - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: sent: PML=%d, RQS(new)=%d, CTX=%d, SRC=%d, " - "src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, sendreq->req_restartseq, - restart->hdr_match.hdr_ctx, restart->hdr_match.hdr_src, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY); - if( OPAL_UNLIKELY( rc < 0 ) ) { - opal_output(0, "[%s:%d] Cannot send rndvrestartnotify message", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - -} - -/** - * This function restarts a RNDV send request. When this is called, - * all the fields in the send request are reset and the send is - * started over. The sendreq->req_restartseq will be non-zero which will - * trigger a special flag in the RNDV header which indicates the match - * has already happened on the receiving side. - */ -void mca_pml_bfo_send_request_restart(mca_pml_bfo_send_request_t* sendreq, - bool repost, mca_btl_base_tag_t tag) -{ - size_t offset = 0; - opal_list_item_t *first_item; - opal_list_item_t *last_item; - mca_bml_base_endpoint_t* endpoint; - size_t i; - - /* If the tag is something valid, it was a repost. We could also - * check the repost field as well. Maybe I can drop the - * repost and have the tag double as it. */ - switch (tag) { - case MCA_PML_BFO_HDR_TYPE_RNDV: - opal_output_verbose(30, mca_pml_bfo_output, - "RNDV: completion failed, reset and repost: PML=%d, RQS=%d, " - "CTX=%d, SRC=%d, src_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, sendreq->req_restartseq, - sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_send.req_base.req_comm->c_my_rank, (void *)sendreq, - sendreq->req_send.req_base.req_peer); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - opal_output_verbose(30, mca_pml_bfo_output, - "RGET: completion failed, reset and repost: PML=%d, RQS=%d, " - "CTX=%d, SRC=%d, src_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, sendreq->req_restartseq, - sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_send.req_base.req_comm->c_my_rank, (void *)sendreq, - sendreq->req_send.req_base.req_peer); - break; - default: - break; - } - - /* Return mpool resources, they get reacquired when request starts over. */ - mca_pml_bfo_free_rdma_resources(sendreq); - - /* Release any memory in use if this is a buffered send */ - if (sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED && - sendreq->req_send.req_addr != sendreq->req_send.req_base.req_addr) { - mca_pml_base_bsend_request_fini((ompi_request_t*)sendreq); - } - - /* Clear out any unsent send ranges. Recreate the functionality - * from the get_send_range() and get_next_send_range() functions. */ - OPAL_THREAD_LOCK(&sendreq->req_send_range_lock); - first_item = opal_list_get_begin(&sendreq->req_send_ranges); - last_item = opal_list_get_last(&sendreq->req_send_ranges); - while (first_item != last_item) { - opal_list_remove_item(&sendreq->req_send_ranges, last_item); - OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.send_ranges, (ompi_free_list_item_t *)last_item); - last_item = opal_list_get_last(&sendreq->req_send_ranges); - } - OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock); - - /* Reset the converter to the beginning. */ - opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, - &offset); - - /* Bump up internal sequence number to handle possible duplicate - * RNDV messages. In the case of reposting a RNDV message, do not - * increment the value. That way, a duplicate message can be - * detected. */ - if (!repost) { - sendreq->req_restartseq++; - } - - /* This code here is essentially the same is mca_pml_bfo_send_request_start() - * but with a few modifications since we are restarting the request, not - * starting entirely from scratch. */ - endpoint = (mca_bml_base_endpoint_t*)sendreq->req_send.req_base.req_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - sendreq->req_endpoint = endpoint; - sendreq->req_state = 0; - sendreq->req_lock = 0; - sendreq->req_pipeline_depth = 0; - sendreq->req_bytes_delivered = 0; - sendreq->req_pending = MCA_PML_BFO_SEND_PENDING_NONE; - - /* Note that we do not reset the following three items. - * They stay with their original values. - * sendreq->req_send.req_base.req_sequence - * sendreq->req_restartseq - * sendreq->req_recv.pval - */ - sendreq->req_restart = 0; /* reset in case we restart again */ - sendreq->req_error = 0; /* clear error state */ - sendreq->req_events = 0; /* clear events, probably 0 anyways */ - - MCA_PML_BASE_SEND_START( &sendreq->req_send.req_base ); - - for(i = 0; i < mca_bml_base_btl_array_get_size(&endpoint->btl_eager); i++) { - mca_bml_base_btl_t* bml_btl; - int rc; - - /* select a btl */ - bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); - rc = mca_pml_bfo_send_request_start_btl(sendreq, bml_btl); - if(OPAL_LIKELY(OMPI_ERR_OUT_OF_RESOURCE != rc)) - return; - } - add_request_to_send_pending(sendreq, MCA_PML_BFO_SEND_PENDING_START, true); -} - -/** - * This function will repost a match fragment. This function has to - * handle the case where there may not be a request associated with - * the fragment and just use the information in the fragment to - * repost the send. - */ -void mca_pml_bfo_repost_match_fragment(struct mca_btl_base_descriptor_t* des) -{ - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)des->des_cbdata; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; - struct mca_bml_base_endpoint_t* endpoint; - int rc; - size_t offset = 0; - - /* At this point a determination has to be made whether the - * BFO_HDR_TYPE_MATCH fragment was sent via the sendi interface or - * via the regular send interface. This is important because if it - * was sent via the sendi interface, then the request associated - * with it has already been completed and released. This can be - * determined by looking at the des->des_flags field of the - * descriptor. If the ALWAYS_CALLBACK flag is set then it is known - * that there is a valid send request associated with the fragment - * and it can be used to extricate information. If ALWAYS_CALLBACK - * is not set, then the endpoint information is in the callback - * data field and where to resend the fragment can be determined - * from the fragment. */ - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - endpoint = sendreq->req_endpoint; - opal_output_verbose(30, mca_pml_bfo_output, - "MATCH: repost: src_req=%p", - (void *)sendreq); - } else { - endpoint = des->des_cbdata; - opal_output_verbose(30, mca_pml_bfo_output, - "MATCH: repost: des=%p (sendi fragment)", - (void *)des); - } - - assert(0 != endpoint->btl_eager.arr_size); - bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); - - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - /* Reset the converter to the beginning if the message is - * not a zero-length message. In the case of zero-length - * message, the convertor is not being used. */ - if (0 != sendreq->req_send.req_bytes_packed) { - opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, - &offset); - } - rc = mca_pml_bfo_send_request_start_btl(sendreq, bml_btl); - if (OMPI_SUCCESS == rc) { - return; - } else if (OMPI_ERR_OUT_OF_RESOURCE == rc) { - opal_output_verbose(30, mca_pml_bfo_output, - "Warning: delaying reposting of BFO_HDR_TYPE_MATCH, btls=%d", - (int)sendreq->req_endpoint->btl_eager.arr_size); - add_request_to_send_pending(sendreq, MCA_PML_BFO_SEND_PENDING_START, true); - return; - } else { - opal_output(0, "%s:%d FATAL ERROR, cannot repost BFO_HDR_TYPE_MATCH", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - } else { - /* No send request available so alloc and repost explicitly */ - mca_btl_base_descriptor_t* newdes = NULL; - mca_btl_base_segment_t* oldseg; - mca_btl_base_segment_t* newseg; - - oldseg = des->des_local; - /* The alloc routine must be called with the MCA_BTL_NO_ORDER - * flag so that the allocation routine works. The allocation - * will fill in the order flag in the descriptor. */ - mca_bml_base_alloc( bml_btl, &newdes, - MCA_BTL_NO_ORDER, - oldseg->seg_len, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP); - if (OPAL_UNLIKELY(NULL == newdes)) { - opal_output(0, "%s:%d FATAL ERROR, cannot repost BFO_HDR_TYPE_MATCH", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - newseg = newdes->des_local; - /* Copy over all the data that is actually sent over the wire */ - memcpy(newseg->seg_addr.pval, oldseg->seg_addr.pval, oldseg->seg_len); - newseg->seg_len = oldseg->seg_len; - - /* This call will either return OMPI_SUCCESS or OMPI_ERROR. The - * OMPI_SUCCESS only says that the send request can be freed. - * It may be that the message was queued up in the BTL. */ - rc = mca_bml_base_send(bml_btl, newdes, MCA_PML_BFO_HDR_TYPE_MATCH); - - /* Some BTLs will set the CALLBACK flag but we do not want that - * as there is no longer a request associated with this descriptor. - * Therefore, always make sure it is cleared. */ - newdes->des_flags &= ~MCA_BTL_DES_SEND_ALWAYS_CALLBACK; - - if( OPAL_LIKELY( rc >= 0 )) { - /* Just let the normal flow of data free whatever needs - * to be freed */ - return; - } else { - opal_output(0, "%s:%d FATAL ERROR, cannot repost BFO_HDR_TYPE_MATCH", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - } - /* No need to free any descriptors. The BTLs take care of it since - * we originally allocated with MCA_BTL_DES_FLAGS_BTL_OWNERSHIP. */ -} - -/** - * Completion callback for rndvrestartnotify completion event. If the - * RNDVRESTARTACK has already been received, then reset and restart. - * Otherwise, just update the state and let the RNDVRESTARTACK trigger - * the reset and restart. - */ -void -mca_pml_bfo_rndvrestartnotify_completion(mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status) -{ - mca_pml_bfo_restart_hdr_t* restart; - mca_pml_bfo_send_request_t* sendreq; - - restart = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - sendreq = (mca_pml_bfo_send_request_t*) restart->hdr_src_req.pval; - - /* Need to resend this message in the case that it fails */ - if( OPAL_UNLIKELY((OMPI_SUCCESS != status))) { - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: completion failed: repost " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, - (void *)sendreq, sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - /* Repost the message and indicate it is a repost, not a new one. No need - * to check the req_events as this is the only possible outstanding send - * event when we have posted this message. We also know the sendreq is still - * available because nothing can proceed until this completion event happens - * successfully as we track the req_restart value. */ - mca_pml_bfo_send_request_rndvrestartnotify(sendreq, true, - MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY, - status, btl); - return; - } - - /* The req_restart value is incremented to indicate completion of - * the RNDVRESTARTNOTIFY message. Then (typically) the arrival of the - * ACK message will cause the request to reset and restart. Need to - * make sure that RNDVRESTARTNOTIFY callback has been called as well as - * the ACK back from the receiver prior to resetting and restarting - * the request. This is needed in case we get an error on the - * RNDVRESTARTNOTIFY message, but it actually makes it over. We want - * to make sure the send request has not restarted yet. So, keep a - * counter that counts to 2. */ - sendreq->req_restart++; - if (2 == sendreq->req_restart) { - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: completion: restarting request " - "PML=%d, RQS=%d, CTX=%d, src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, - sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_recv.pval, (void *)sendreq, - sendreq->req_send.req_base.req_peer); - mca_pml_bfo_send_request_restart(sendreq, false, 0); - } else { - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNOTIFY: completion: waiting for ack " - "PML=%d, RQS=%d, CTX=%d, src_req=%p, dst_req=%p, peer=%d", - (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, - sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_recv.pval, (void *)sendreq, - sendreq->req_send.req_base.req_peer); - } -} - -/** - * This function is called when an error is detected on a completion - * event on the receiving side. This can come from a ACK, PUT, RDMA - * read (GET) or RECVERRNOTIFY completion event. When this happens, check - * the state of the request and decide if the sender needs be notified - * that a problem was seen. If no RECVERRNOTIFY message has been sent and - * no RNDVRESTARTNOTIFY has been received from the sender, then send a - * message telling the sender an error was seen. - */ -void mca_pml_bfo_recv_request_recverrnotify(mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_tag_t tag, int status) -{ - mca_btl_base_descriptor_t* des; - mca_pml_bfo_restart_hdr_t* restart; - ompi_proc_t* proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; - mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - mca_bml_base_btl_t* bml_btl; - int rc; - - assert(0 != bml_endpoint->btl_eager.arr_size); - - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - - /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_restart_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | - MCA_BTL_DES_SEND_ALWAYS_CALLBACK); - if( OPAL_UNLIKELY(NULL == des) ) { - opal_output(0, "%s:%d Out of resources, cannot proceed", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - - /* fill out header */ - restart = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - restart->hdr_match.hdr_common.hdr_flags = 0; - restart->hdr_match.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY; - restart->hdr_match.hdr_ctx = recvreq->req_recv.req_base.req_comm->c_contextid; - restart->hdr_match.hdr_src = recvreq->req_recv.req_base.req_comm->c_my_rank; - restart->hdr_match.hdr_seq = (uint16_t)recvreq->req_msgseq; - restart->hdr_restartseq = recvreq->req_restartseq; - restart->hdr_src_req = recvreq->remote_req_send; - restart->hdr_dst_req.pval = recvreq; - - bfo_hdr_hton(restart, MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY, proc); - - /* initialize descriptor */ - des->des_cbfunc = mca_pml_bfo_recv_restart_completion; - - opal_output_verbose(30, mca_pml_bfo_output, - "RECVERRNOTIFY: sending to sender, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d, btl=%p", - recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, - (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - (void *)bml_btl->btl); - - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY); - if( OPAL_UNLIKELY( rc < 0 ) ) { - opal_output(0, "[%s:%d] Cannot send recverrnotify message", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - /* Prevent future error messages on this request */ - recvreq->req_errstate |= RECVREQ_RECVERRSENT; -} - -/** - * This function is called when it may be time to send a RNDVRESTARTACK - * message back to the sending side. This can happen because we - * received a RNDVRESTARTNOTIFY message from the sender. This can - * also happen if we have noticed that the request has received the - * RNDVRESTARTNOTIFY message, but has not yet sent out the RNDVRESTARTACK - * because there were still some pending receive events on the request. - * That means we can enter this routine from a completion event on a ACK, - * PUT, or RDMA read as well as from the receipt of a RNDVRESTARTNOTIFY - * message. If all is good, we sent the RNDVRESTARTACK message back to - * the sender. Then sometime later a message will arrive telling us - * to reset and restart the receive request. - */ -void mca_pml_bfo_recv_request_rndvrestartack(mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_tag_t tag, int status, - mca_btl_base_module_t* btl) -{ - mca_btl_base_descriptor_t* des; - mca_pml_bfo_restart_hdr_t* restart; - ompi_proc_t* proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; - mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - mca_bml_base_btl_t* bml_btl; - int rc; - - assert((recvreq->req_errstate & RECVREQ_RNDVRESTART_RECVED) == RECVREQ_RNDVRESTART_RECVED); - assert((recvreq->req_errstate & RECVREQ_RNDVRESTART_ACKED) == 0); - assert(0 != bml_endpoint->btl_eager.arr_size); - - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - - /* Attempt to use a different BTL than the error message was - * received on. This may potentially tickle the error sooner if - * this side has not seen it yet. */ - if (bml_btl->btl == btl) { - /* If there is more than one BTL left, then we will get a - * different one. If there is only one, we will just get - * the same one back again. That is OK. */ - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - } - - /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_restart_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | - MCA_BTL_DES_SEND_ALWAYS_CALLBACK); - if( OPAL_UNLIKELY(NULL == des) ) { - opal_output(0, "%s:%d Out of resources, cannot proceed", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - - /* fill out header */ - restart = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - restart->hdr_match.hdr_common.hdr_flags = 0; - restart->hdr_match.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK; - restart->hdr_match.hdr_ctx = recvreq->req_recv.req_base.req_comm->c_contextid; - restart->hdr_match.hdr_src = recvreq->req_recv.req_base.req_comm->c_my_rank; - restart->hdr_match.hdr_seq = (uint16_t)recvreq->req_msgseq; - restart->hdr_restartseq = recvreq->req_restartseq; - restart->hdr_src_req = recvreq->remote_req_send; - restart->hdr_dst_req.pval = recvreq; - - bfo_hdr_hton(restart, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK, proc); - - /* initialize descriptor */ - des->des_cbfunc = mca_pml_bfo_recv_restart_completion; - des->des_cbdata = (void *)proc; - - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTACK: due to PML tag=%d completion, sending to " - "sender, PML=%d, RQS=%d, src_req=%p, dst_req=%p, status=%d, " - "peer=%d, btl=%p", - tag, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, status, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, - (void *)bml_btl->btl); - - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK); - if( OPAL_UNLIKELY( rc < 0 ) ) { - opal_output(0, "[%s:%d] Cannot send rndvrestartack message", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - /* Move to the next state so we do not send anymore ACKs */ - recvreq->req_errstate &= ~RECVREQ_RNDVRESTART_RECVED; - recvreq->req_errstate |= RECVREQ_RNDVRESTART_ACKED; -} - -/** - * Called after the receipt of a RNDVRESTARTNOTIFY message to a request - * that no longer matches. This can happen if the sender detected an - * error, but the receiver actually received all the data. Therefore - * send a NACK back instead of the ACK so that the sender can complete - * its request. This happens very rarely. Note that we need to make - * use of the hdr_dst_rank that we received from the notify message. - * This is so the sending side make sure the message matches a valid - * request on the sending side. - */ -void mca_pml_bfo_recv_request_rndvrestartnack(mca_btl_base_descriptor_t* olddes, - ompi_proc_t* ompi_proc, bool repost) -{ - mca_btl_base_segment_t* segments; - mca_pml_bfo_restart_hdr_t* hdr; /* hdr of NOTIFY message */ - mca_pml_bfo_restart_hdr_t* nack; /* hdr of NACK message */ - mca_btl_base_descriptor_t* des; - mca_bml_base_endpoint_t* bml_endpoint; - mca_bml_base_btl_t* bml_btl; - int rc; - - if (repost) { - /* In the case where we are reposting the NACK, the information - * is in the src area, since we are reposting a send. In addition, - * we get the ompi_proc from the old descriptor. */ - ompi_proc = olddes->des_cbdata; - } - - segments = olddes->des_local; - hdr = (mca_pml_bfo_restart_hdr_t*)segments->seg_addr.pval; - - bml_endpoint = ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - assert(0 != bml_endpoint->btl_eager.arr_size); - bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - - /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_restart_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | - MCA_BTL_DES_SEND_ALWAYS_CALLBACK); - if( OPAL_UNLIKELY(NULL == des) ) { - opal_output(0, "%s:%d Out of resources, cannot proceed", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - - /* fill out header */ - nack = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - nack->hdr_match.hdr_common.hdr_flags = 0; - nack->hdr_match.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK; - nack->hdr_match.hdr_ctx = hdr->hdr_match.hdr_ctx; - nack->hdr_match.hdr_src = hdr->hdr_dst_rank; /* Receiver rank */ - nack->hdr_match.hdr_seq = hdr->hdr_match.hdr_seq; - nack->hdr_restartseq = hdr->hdr_restartseq; - nack->hdr_src_req = hdr->hdr_src_req; - nack->hdr_dst_req.pval = 0; - - bfo_hdr_hton(nack, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK, ompi_proc); - - /* Initialize descriptor. Save away ompi_proc in case we need - * to respost this fragmnet. */ - des->des_cbfunc = mca_pml_bfo_recv_restart_completion; - des->des_cbdata = ompi_proc; - - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNACK: sending to sender, " - "PML=%d, RQS=%d, CTX=%d, SRC=%d, peer=%d", - nack->hdr_match.hdr_seq, nack->hdr_restartseq, - nack->hdr_match.hdr_ctx, nack->hdr_match.hdr_src, - OMPI_CAST_RTE_NAME(&ompi_proc->super.proc_name)->vpid); - - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK); - if( OPAL_UNLIKELY( rc < 0 ) ) { - opal_output(0, "[%s:%d] Cannot send rndvrestartnack message", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } -} - - -/** - * Reset all the receive request fields to match what a request - * looks like when it is first started. This gets called when - * the rendezvous/rget message is being restarted. - */ -void mca_pml_bfo_recv_request_reset(mca_pml_bfo_recv_request_t* match) { - int i; - - assert(true != match->req_recv.req_base.req_pml_complete); - - /* Free up any resources that were reserved for this receive. This - * was copied from the receive completion code. */ - for(i = 0; i < (int)match->req_rdma_cnt; i++) { - mca_mpool_base_registration_t* btl_reg = match->req_rdma[i].btl_reg; - if( NULL != btl_reg && btl_reg->mpool != NULL) { - btl_reg->mpool->mpool_deregister( btl_reg->mpool, btl_reg ); - } - } - match->req_rdma_cnt = 0; - - /* This code is mostly copied from mca_pml_bfo_recv_req_start. - * Note 1: Leave req_bytes_expected as the original value. No - * need to adjust this as it is set when convertor is created. - * Note 2: Leave req_bytes_delivered as the original value. - * This is created when the convertor is created and represents - * the expected bytes from the user. */ - assert(0 == match->req_events); - match->req_errstate = 0; - match->req_lock = 0; - match->req_pipeline_depth = 0; - match->req_bytes_received = 0; - match->req_rdma_idx = 0; - match->req_rdma_offset = 0; - match->req_send_offset = 0; - match->req_pending = false; - match->req_ack_sent = false; - match->req_restartseq++; - - /* These really should not need to be set, but this matches some - * of the initialization within MCA_PML_BASE_RECV_START. */ - match->req_recv.req_base.req_pml_complete = false; - match->req_recv.req_base.req_ompi.req_complete = false; - match->req_recv.req_base.req_ompi.req_state = OMPI_REQUEST_ACTIVE; - - /* Reset the convertor */ - opal_convertor_set_position(&match->req_recv.req_base.req_convertor, - &match->req_rdma_offset); - return; -} - -/* - * Completion callback for RNDVRESTARTACK, RNDVRESTARTNACK and RECVERRNOTIFY. - */ -void mca_pml_bfo_recv_restart_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - if(OPAL_UNLIKELY(OMPI_SUCCESS != status)) { - mca_pml_bfo_common_hdr_t* common = des->des_local->seg_addr.pval; - mca_pml_bfo_restart_hdr_t* restart; /* RESTART header */ - mca_pml_bfo_recv_request_t* recvreq; - - switch (common->hdr_type) { - case MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK: - restart = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - recvreq = (mca_pml_bfo_recv_request_t*) restart->hdr_dst_req.pval; - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTACK: completion failed: try again " - "PML:req=%d,hdr=%d RQS:req=%d,hdr=%d CTX:req=%d,hdr=%d " - "src_req=%p, dst_req=%p, peer=%d", - recvreq->req_msgseq, restart->hdr_match.hdr_seq, - recvreq->req_restartseq, restart->hdr_restartseq, - recvreq->req_recv.req_base.req_comm->c_contextid, - restart->hdr_match.hdr_ctx, - recvreq->remote_req_send.pval, - (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - - /* Adjust the states back to avoid assert errors */ - recvreq->req_errstate &= ~RECVREQ_RNDVRESTART_ACKED; - recvreq->req_errstate |= RECVREQ_RNDVRESTART_RECVED; - mca_pml_bfo_recv_request_rndvrestartack(recvreq, MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK, - status, btl); - break; - case MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK: - opal_output_verbose(30, mca_pml_bfo_output, - "RNDVRESTARTNACK: completion failed: try again " - "des=%p ", (void *)des); - /* Just blast it again. No request associated with it. */ - mca_pml_bfo_recv_request_rndvrestartnack(des, NULL, true); - break; - case MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY: - restart = (mca_pml_bfo_restart_hdr_t*)des->des_local->seg_addr.pval; - recvreq = (mca_pml_bfo_recv_request_t*) restart->hdr_dst_req.pval; - /* With just two BTLs, this should never happen as we are - * typically sending the RECVERRNOTIFY message on the - * working BTL. But, just in case, if we get an error, - * send it again. */ - opal_output_verbose(30, mca_pml_bfo_output, - "RECVERRNOTIFY: completion failed: try again, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, - (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - mca_pml_bfo_recv_request_recverrnotify(recvreq, MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY, - status); - break; - default: - opal_output(0, "[%s:%d] Unknown callback error", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - } -} - -/* - * Remove a btl for future communication on an endpoint. - */ -void mca_pml_bfo_map_out_btl(struct mca_btl_base_module_t* btl, - ompi_proc_t *errproc, char *btlname) -{ - mca_bml_base_endpoint_t* ep; - bool remove = false; - int i; - - ep = (mca_bml_base_endpoint_t*)errproc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - /* The bml_del_proc_btl function does not indicate if it - * actually removed a btl, so let me check up front. This is - * done so that we can only print out messages when a btl is - * actually going to be removed. These arrays are small so it - * is OK to walk through all of them even though it may be - * redundant. */ - for( i = 0; i < (int)ep->btl_eager.arr_size; i++ ) { - if( ep->btl_eager.bml_btls[i].btl == btl ) { - remove = true; - } - } - for( i = 0; i < (int)ep->btl_send.arr_size; i++ ) { - if( ep->btl_send.bml_btls[i].btl == btl ) { - remove = true; - } - } - for( i = 0; i < (int)ep->btl_rdma.arr_size; i++ ) { - if( ep->btl_rdma.bml_btls[i].btl == btl ) { - remove = true; - } - } - - if (true == remove) { - mca_bml.bml_del_proc_btl(errproc, btl); - - opal_output_verbose(10, mca_pml_bfo_output, - "BTL %s error: rank=%d mapping out %s " - "to rank=%d on node=%s \n", - btl->btl_component->btl_version.mca_component_name, - OMPI_PROC_MY_NAME->vpid, - btlname, OMPI_CAST_RTE_NAME(&errproc->super.proc_name)->vpid, - (NULL == errproc->super.proc_hostname) ? "unknown" : errproc->super.proc_hostname); - - /* Need to search for any pending packets associated - * with this endpoint and remove them. We may also - * have to restarts depending on the state of the - * requests. */ - mca_pml_bfo_error_pending_packets(btl, ep); - - if ((ep->btl_eager.arr_size == 0) && - (ep->btl_send.arr_size == 0) && - (ep->btl_rdma.arr_size == 0)) { - opal_output(0, "%s:%d: No more interfaces, aborting", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - } -} - -void mca_pml_bfo_failover_error_handler(struct mca_btl_base_module_t* btl, - int32_t flags, ompi_proc_t *errproc, char *btlname) -{ - ompi_proc_t** procs; - size_t p, num_procs; - - /* If we are in here, we know that the we were called - * with the flags == MCA_BTL_ERROR_FLAGS_NONFATAL so no - * need to check it in here. */ - assert(flags & MCA_BTL_ERROR_FLAGS_NONFATAL); - - procs = ompi_proc_all(&num_procs); - - if(NULL == procs) { - opal_output(0, "%s:%d: Out of memory, giving up.", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - - if (NULL == btlname) { - btlname = "unknown"; - } - - /* If the process to map out is not specified then map out the - * entire BTL. Otherwise, only map out the BTL for the specific - * remote process. */ - if (NULL == errproc) { - for( p = 0; p < num_procs; p++ ) { - mca_pml_bfo_map_out_btl(btl, procs[p], btlname); - } - } else { - mca_pml_bfo_map_out_btl(btl, errproc, btlname); - } - free(procs); -} - -/** - * This function is called since when we are mapping out a BML. This - * will walk through the four PML lists and dispatch with the - * fragments/requests. There are four different lists and each one is - * handled slighty differently. In all cases, we first see if the - * message is associated with the endpoint that is being mapped out. - * If not, then just leave it alone and put it back on the list. If - * it is associated with the endpoint, then a each list handles it - * slighlty differently. Also, in some cases, we actually adjust the - * pointers to the BMLs in the messages as they may have changed when - * the BML is mapped out. That is because this is called after we - * have mapped out the offending BML and adjusted the array of - * available BMLs. - */ -static void mca_pml_bfo_error_pending_packets(mca_btl_base_module_t* btl, - mca_bml_base_endpoint_t* ep) { - int32_t i, s; - - /* The pckt_pending list contains both ACK and FIN messages. - * ACKs can be sent over any BTL associated with the endpoint. - * Therefore, the bml_btl entry for ACKS is NULL and they do - * not need to be adjusted. It is also worth noting that - * the ACK will be the only outstanding message associated - * with a request so we can just let nature takes it course. - * - * FIN messages do have a BML associated with them, but they - * can also be sent over any BTL. Therefore, adjust the bml - * pointer in the pckt to ensure it points at a valid BML. - */ - - s = (int32_t)opal_list_get_size(&mca_pml_bfo.pckt_pending); - for(i = 0; i < s; i++) { - mca_pml_bfo_pckt_pending_t *pckt; - opal_output_verbose(0, mca_pml_bfo_output, - "INFO: pckt_pending list has %d entries", s); -#if 1 - /* TODO: Error out until code is tested */ - opal_output_verbose(0, mca_pml_bfo_output, - "%s:%d: Support not implemented, aborting", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - pckt = (mca_pml_bfo_pckt_pending_t*) - opal_list_remove_first(&mca_pml_bfo.pckt_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - - /* My guess is that this can happen in the threaded - * case where the other thread removed some packets - * after we determined the size of the list. */ - if(NULL == pckt) - break; - - /* If there is no bml stored on the packet, then just - * put it back on the list as there is nothing to adjust. - * This appears to be true with ACK packets. */ - if (NULL == pckt->bml_btl) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.pckt_pending, - (opal_list_item_t*)pckt); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - continue; - } - - /* Now see if this endpoint matches the one we are mapping - * out. If so, adjust the bml entry so to ensure it is - * not pointing at a stale bml. We do not really care - * which BML it is pointing at as long as it is valid. - * In either case, then put entry back on the list. */ - if (pckt->proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML] == ep) { - opal_output_verbose(15, mca_pml_bfo_output, - "INFO: Found matching pckt on pckt_pending list, adjusting bml"); - pckt->bml_btl = mca_bml_base_btl_array_get_next(&ep->btl_eager); - } - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.pckt_pending, - (opal_list_item_t*)pckt); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - - } - - /* This next list holds rdma fragments. We need to walk through - * the list and see if any are associated with the endpoint - * we are mapping out. If not, then just put back on the - * list. If they are, then we need to error them out. One issue - * is that we need to deal with the case where there may be more - * then one pending rdma fragment for a request. */ - s = (int32_t)opal_list_get_size(&mca_pml_bfo.rdma_pending); - for(i = 0; i < s; i++) { - mca_pml_bfo_rdma_frag_t* frag; - mca_pml_bfo_send_request_t* sendreq; - mca_pml_bfo_recv_request_t* recvreq; - opal_output_verbose(0, mca_pml_bfo_output, - "INFO: rdma_pending list has %d entries", s); -#if 1 - /* TODO: Error out until code is tested */ - opal_output_verbose(0, mca_pml_bfo_output, - "%s:%d: Support not implemented, aborting", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - frag = (mca_pml_bfo_rdma_frag_t*) - opal_list_remove_first(&mca_pml_bfo.rdma_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - - /* My guess is that this can happen in the threaded - * case where the other thread removed some packets - * after we determined the size of the list. */ - if(NULL == frag) - break; - - /* Check to see if it matches our endpoint. If it does, - * then check if it matches the BTL that is being mapped - * out. If it does not, then just readjust the BML pointer. - * If it does, then we need to do something with it. */ - if (frag->rdma_ep != ep) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.rdma_pending, - (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - continue; - } - - /* If we are here, then we know we are working on the same - * endpoint. Now check the BTL. */ - if (frag->rdma_btl != btl) { - opal_output_verbose(15, mca_pml_bfo_output, - "INFO: Found matching frag on rdma_pending list, adjusting bml"); - /* The BTL this RDMA is associated with is not the - * one that is getting mapped out, so just adjust the - * BML pointer and put back on the list. */ - frag->rdma_bml = mca_bml_base_btl_array_find(&ep->btl_rdma, frag->rdma_btl); - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.rdma_pending, - (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - continue; - } - - /* Now we call the restart routine. This is just like if we got - * a completion event after calling an RDMA write. This will - * take care of figuring out if we need to restart the request - * or wait for any outstanding events to complete. */ - if(frag->rdma_state == MCA_PML_BFO_RDMA_PUT) { - opal_output_verbose(15, mca_pml_bfo_output, - "INFO: Found matching PUT frag on rdma_pending list, restarting"); - sendreq = frag->rdma_req; - mca_pml_bfo_send_request_rndvrestartnotify(sendreq, false, - MCA_PML_BFO_HDR_TYPE_PUT, 2, btl); - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); - } else { - opal_output_verbose(15, mca_pml_bfo_output, - "INFO: Found matching RGET frag on rdma_pending list, sending reqerror"); - /* This is just like what we do on an rget completion event */ - recvreq = (mca_pml_bfo_recv_request_t*)frag->rdma_req; - mca_pml_bfo_recv_request_recverrnotify(recvreq, MCA_PML_BFO_HDR_TYPE_RGET, 2); - - /* See if the request has received a RNDVRESTARTNOTIFY */ - if( OPAL_UNLIKELY(recvreq->req_errstate)) { - if (recvreq->req_errstate & RECVREQ_RNDVRESTART_RECVED) { - mca_pml_bfo_recv_request_rndvrestartack(recvreq, - MCA_PML_BFO_HDR_TYPE_RGET, - 2, btl); - } - } - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); - } - } - - s = opal_list_get_size(&mca_pml_bfo.send_pending); - /* Look for pending events on our endpoint */ - for(i = 0; i < s; i++) { - mca_pml_bfo_send_request_t* sendreq; - ompi_proc_t* proc; - mca_bml_base_endpoint_t* bml_endpoint; - opal_output_verbose(0, mca_pml_bfo_output, - "INFO: send_pending list has %d entries", s); -#if 1 - /* TODO: Error out until code is tested */ - opal_output_verbose(0, mca_pml_bfo_output, - "%s:%d: Support not implemented, aborting", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - sendreq = (mca_pml_bfo_send_request_t*) - opal_list_remove_first(&mca_pml_bfo.send_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - - /* My guess is that this can happen in the threaded - * case where the other thread removed some packets - * after we determined the size of the list. */ - if(NULL == sendreq) - break; - - proc = (ompi_proc_t*)sendreq->req_send.req_base.req_proc; - bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - /* Check to see if it matches our endpoint. If it does not, - * then just put it back on the list as there is nothing - * we need to do with it. */ - if (bml_endpoint != ep) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.send_pending, - (opal_list_item_t*)sendreq); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - continue; - } - - switch(sendreq->req_pending) { - case MCA_PML_BFO_SEND_PENDING_SCHEDULE: - /* If this send request is using the endpoint that received - * the error, then let us error it out. In the case - * where there is only one fragment left to be scheduled - * and it would have gone over the good BTL, this is - * not necessary. But, we will use simplicity here - * and assume that some of the fragments are still - * scheduled to go over the broken BTL. */ - sendreq->req_error++; - mca_pml_bfo_send_request_rndvrestartnotify(sendreq, false, - MCA_PML_BFO_HDR_TYPE_FRAG, 2, btl); - break; - case MCA_PML_BFO_SEND_PENDING_START: - /* If the request has not even started, then just put it back - * on the list. Nothing else to do with it. */ - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.send_pending, - (opal_list_item_t*)sendreq); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - break; - default: - opal_output(0, "[%s:%d] wrong send request type\n", - __FILE__, __LINE__); - break; - } - } - - s = (int)opal_list_get_size(&mca_pml_bfo.recv_pending); - for(i = 0; i < s; i++) { - mca_pml_bfo_recv_request_t* recvreq; - ompi_proc_t* proc; - mca_bml_base_endpoint_t* bml_endpoint; - opal_output_verbose(0, mca_pml_bfo_output, - "INFO: recv_pending list has %d entries", s); -#if 1 - /* TODO: Error out until code is tested */ - opal_output_verbose(0, mca_pml_bfo_output, - "%s:%d: Support not implemented, aborting", - __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - recvreq = (mca_pml_bfo_recv_request_t*) - opal_list_remove_first(&mca_pml_bfo.recv_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - - /* My guess is that this can happen in the threaded - * case where the other thread removed some packets - * after we determined the size of the list. */ - if(NULL == recvreq) - break; - - proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; - bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - if (bml_endpoint != ep) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.recv_pending, - (opal_list_item_t*)recvreq); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - continue; - } - - mca_pml_bfo_recv_request_recverrnotify(recvreq, MCA_PML_BFO_HDR_TYPE_PUT, 2); - } -} - -/** - * Call each time we get a completion event on ACK or PUT message. - * These types of messages are receive control type messages. This - * function is only called if the underlying BTL supports failover. - * Otherwise, there is no need for this check. - */ -void mca_pml_bfo_check_recv_ctl_completion_status(mca_btl_base_module_t* btl, - struct mca_btl_base_descriptor_t* des, - int status) -{ - mca_pml_bfo_common_hdr_t * common = des->des_local->seg_addr.pval; - mca_pml_bfo_rdma_hdr_t* hdr; /* PUT header */ - struct mca_btl_base_descriptor_t* rdma_des; - mca_pml_bfo_recv_request_t* recvreq; - - if(OPAL_UNLIKELY(OMPI_SUCCESS != status)) { - switch (common->hdr_type) { - case MCA_PML_BFO_HDR_TYPE_ACK: - recvreq = des->des_cbdata; - - /* Record the error. Send RECVERRNOTIFY if necessary. */ - if (recvreq->req_errstate) { - opal_output_verbose(30, mca_pml_bfo_output, - "ACK: completion failed, error already seen, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - } else { - opal_output_verbose(30, mca_pml_bfo_output, - "ACK: completion failed, sending RECVERRNOTIFY to sender, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - mca_pml_bfo_recv_request_recverrnotify(recvreq, MCA_PML_BFO_HDR_TYPE_ACK, status); - } - break; - - case MCA_PML_BFO_HDR_TYPE_PUT: - hdr = (mca_pml_bfo_rdma_hdr_t*)des->des_local->seg_addr.pval; - rdma_des = hdr->hdr_des.pval; - recvreq = des->des_cbdata; - if ((NULL != rdma_des->des_cbdata) && (recvreq == rdma_des->des_cbdata)) { - /* We now record the error, send the RECVERRNOTIFY if - * necessary, and free the descriptor. Prior to this, - * we want to ensure that we have not reached the case - * where the PUT message actually made it over and we - * have already received a FIN back. We first check to - * see if the RDMA descriptor cbdata is pointing to - * NULL. If it is, this means that the PUT message must - * have made it over and a corresponding FIN already - * made it back and freed the RDMA descriptor. Second, - * if it is non-null, we make sure that it is pointing - * to the same request as the PUT descriptor is. If - * it is not, again we assume that the FIN came back - * and freed it. And we can count on the fact that the - * recvreq has not been freed or reused as it is held - * until this very completion event occurs. */ - if (recvreq->req_errstate) { - opal_output_verbose(30, mca_pml_bfo_output, - "PUT: completion failed, error already seen, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - } else { - opal_output_verbose(30, mca_pml_bfo_output, - "PUT: completion failed, sending RECVERRNOTIFY to sender, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - mca_pml_bfo_recv_request_recverrnotify(recvreq, MCA_PML_BFO_HDR_TYPE_PUT, status); - } -#if 0 - /* TODO: Add descriptor to receive request so it can - * be freed only when receive request is freed and - * only if needed. */ - btl->btl_free(btl, rdma_des); -#endif - } - break; - default: - ompi_rte_abort(-1, NULL); - } - } - - switch (common->hdr_type) { - case MCA_PML_BFO_HDR_TYPE_ACK: - recvreq = des->des_cbdata; - recvreq->req_events--; - assert(recvreq->req_events >= 0); - if(OPAL_UNLIKELY (recvreq->req_errstate & RECVREQ_RNDVRESTART_RECVED)) { - opal_output_verbose(30, mca_pml_bfo_output, - "ACK: completion: recvreq in error, outstanding events=%d " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, status=%d, peer=%d", - recvreq->req_events, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, status, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - if (0 == recvreq->req_events) { - mca_pml_bfo_recv_request_rndvrestartack(recvreq, MCA_PML_BFO_HDR_TYPE_ACK, - status, btl); - } - return; - } - recv_request_pml_complete_check(recvreq); - break; - case MCA_PML_BFO_HDR_TYPE_PUT: - recvreq = des->des_cbdata; - recvreq->req_events--; - assert(recvreq->req_events >= 0); - if(OPAL_UNLIKELY(recvreq->req_errstate & RECVREQ_RNDVRESTART_RECVED)) { - opal_output_verbose(30, mca_pml_bfo_output, - "PUT: completion: recvreq in error, outstanding events=%d " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, status=%d, peer=%d", - recvreq->req_events, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, status, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - if (0 == recvreq->req_events) { - mca_pml_bfo_recv_request_rndvrestartack(recvreq, MCA_PML_BFO_HDR_TYPE_PUT, - status, btl); - } - return; - } - recv_request_pml_complete_check(recvreq); - break; - } -} - -/** - * Register four functions to handle extra PML message types that - * are utilized when a failover occurs. - */ -int mca_pml_bfo_register_callbacks(void) { - int rc; - /* The following four functions are utilized when failover - * support for openib is enabled. */ - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY, - mca_pml_bfo_recv_frag_callback_rndvrestartnotify, - NULL ); - if(OMPI_SUCCESS != rc) - return rc; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK, - mca_pml_bfo_recv_frag_callback_rndvrestartack, - NULL ); - if(OMPI_SUCCESS != rc) - return rc; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK, - mca_pml_bfo_recv_frag_callback_rndvrestartnack, - NULL ); - if(OMPI_SUCCESS != rc) - return rc; - - rc = mca_bml.bml_register( MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY, - mca_pml_bfo_recv_frag_callback_recverrnotify, - NULL ); - if(OMPI_SUCCESS != rc) - return rc; - - return rc; -} - -/** - * Update a few fields when we are restarting either a RNDV or - * RGET type message. - */ -void mca_pml_bfo_update_rndv_fields(mca_pml_bfo_hdr_t* hdr, - mca_pml_bfo_send_request_t* sendreq, char *type) -{ - hdr->hdr_common.hdr_flags |= MCA_PML_BFO_HDR_FLAGS_RESTART; - hdr->hdr_rndv.hdr_dst_req = sendreq->req_recv; - hdr->hdr_rndv.hdr_restartseq = sendreq->req_restartseq; - opal_output_verbose(30, mca_pml_bfo_output, - "%s: restarting: PML=%d, RQS=%d, CTX=%d, SRC=%d, " - "src_req=%p, dst_req=%p, peer=%d", - type, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, - sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_send.req_base.req_comm->c_my_rank, (void *)sendreq, - sendreq->req_recv.pval, sendreq->req_send.req_base.req_peer); -} - -/** - * The following set of functions are all called when it is determined - * that the cached bml_btl->btl does not match the btl handed back - * by the callback function. This means that the bml_btl array has - * been shuffled and the bml_btl matching the btl has to be found - * back. If it cannot be found, then just find a different one to - * use. - */ -void mca_pml_bfo_update_eager_bml_btl_recv_ctl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - struct mca_btl_base_descriptor_t* des) -{ - if ((*bml_btl)->btl != btl) { - mca_pml_bfo_common_hdr_t * common = des->des_local->seg_addr.pval; - mca_pml_bfo_ack_hdr_t* ack; /* ACK header */ - mca_pml_bfo_recv_request_t* recvreq = NULL; - char *type = NULL; - - switch (common->hdr_type) { - case MCA_PML_BFO_HDR_TYPE_ACK: - ack = (mca_pml_bfo_ack_hdr_t*)des->des_local->seg_addr.pval; - recvreq = (mca_pml_bfo_recv_request_t*) ack->hdr_dst_req.pval; - type = "ACK"; - break; - case MCA_PML_BFO_HDR_TYPE_PUT: - recvreq = des->des_cbdata; - type = "PUT"; - break; - default: - /* In theory, this can never happen. */ - opal_output(0, "%s:%d FATAL ERROR, unknown header (hdr=%d)", - __FILE__, __LINE__, common->hdr_type); - ompi_rte_abort(-1, NULL); - } - - mca_pml_bfo_find_recvreq_eager_bml_btl(bml_btl, btl, recvreq, type); - } -} - -void mca_pml_bfo_find_sendreq_eager_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_send_request_t* sendreq, - char* type) -{ - if ((*bml_btl)->btl != btl) { - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML does not match BTL, find it back, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, (void *)sendreq, - sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - *bml_btl = mca_bml_base_btl_array_find(&sendreq->req_endpoint->btl_eager, btl); - if (NULL == *bml_btl) { - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML is gone, find another one, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, (void *)sendreq, - sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - *bml_btl = mca_bml_base_btl_array_get_next(&sendreq->req_endpoint->btl_eager); - } - } -} - -void mca_pml_bfo_find_sendreq_rdma_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_send_request_t* sendreq, - char* type) -{ - if ((*bml_btl)->btl != btl) { - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML does not match BTL, find it back, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, (void *)sendreq, - sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - *bml_btl = mca_bml_base_btl_array_find(&sendreq->req_endpoint->btl_rdma, btl); - if (NULL == *bml_btl) { - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML is gone, find another one, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, (void *)sendreq, - sendreq->req_recv.pval, - sendreq->req_send.req_base.req_peer); - *bml_btl = mca_bml_base_btl_array_get_next(&sendreq->req_endpoint->btl_rdma); - } - } -} - -void mca_pml_bfo_find_recvreq_eager_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_recv_request_t* recvreq, - char* type) -{ - if ((*bml_btl)->btl != btl) { - ompi_proc_t *proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; - mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML does not match BTL, find it back, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - - *bml_btl = mca_bml_base_btl_array_find(&bml_endpoint->btl_eager, btl); - if (NULL == *bml_btl) { - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML is gone, find another one, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - - *bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_eager); - } - } -} - -void mca_pml_bfo_find_recvreq_rdma_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_recv_request_t* recvreq, - char* type) -{ - if ((*bml_btl)->btl != btl) { - ompi_proc_t *proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; - mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML does not match BTL, find it back, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - - *bml_btl = mca_bml_base_btl_array_find(&bml_endpoint->btl_rdma, btl); - if (NULL == *bml_btl) { - opal_output_verbose(25, mca_pml_bfo_output, - "%s completion: BML is gone, find another one, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", - type, recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->remote_req_send.pval, (void *)recvreq, - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); - - *bml_btl = mca_bml_base_btl_array_get_next(&bml_endpoint->btl_rdma); - } - } -} - -/** - * The completion event for the RNDV message has returned with an - * error. We know that the send request we are looking at is valid - * because it cannot be completed until the sendreq->req_state value - * reaches 0. And for the sendreq->req_state to reach 0, the - * completion event on the RNDV message must occur. So, we do not - * bother checking whether the send request is valid, because we know - * it is, but we put a few asserts in for good measure. We then check - * a few fields in the request to decide what to do. If the - * sendreq->req_error is set, that means that something has happend - * already to the request and we do not want to restart it. - * Presumably, we may have received a RECVERRNOTIFY message from the - * receiver. We also check the sendreq->req_acked field to see if it - * has been acked. If it has, then again we do not restart everything - * because obviously the RNDV message has made it to the other side. - */ -bool mca_pml_bfo_rndv_completion_status_error(struct mca_btl_base_descriptor_t* des, - mca_pml_bfo_send_request_t* sendreq) -{ - assert(((mca_pml_bfo_hdr_t*)((des)->des_local->seg_addr.pval))->hdr_match.hdr_ctx == - (sendreq)->req_send.req_base.req_comm->c_contextid); - assert(((mca_pml_bfo_hdr_t*)((des)->des_local->seg_addr.pval))->hdr_match.hdr_src == - (sendreq)->req_send.req_base.req_comm->c_my_rank); - assert(((mca_pml_bfo_hdr_t*)((des)->des_local->seg_addr.pval))->hdr_match.hdr_seq == - (uint16_t)(sendreq)->req_send.req_base.req_sequence); - if ((!(sendreq)->req_error) && (NULL == (sendreq)->req_recv.pval)) { - (sendreq)->req_events--; - /* Assume RNDV did not make it, so restart from the beginning. */ - mca_pml_bfo_send_request_restart(sendreq, true, MCA_PML_BFO_HDR_TYPE_RNDV); - return true; - } - return false; -} - -/** - * Check to see if an error has occurred on this send request. If it has - * and there are no outstanding events, then we can start the restart dance. - */ -void mca_pml_bfo_completion_sendreq_has_error(mca_pml_bfo_send_request_t* sendreq, - int status, - mca_btl_base_module_t* btl, - int type, - char *description) -{ - opal_output_verbose(30, mca_pml_bfo_output, - "%s: completion: sendreq has error, outstanding events=%d, " - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, status=%d, peer=%d", - description, - sendreq->req_events, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, (void *)sendreq, - sendreq->req_recv.pval, - status, sendreq->req_send.req_base.req_peer); - if (0 == sendreq->req_events) { - mca_pml_bfo_send_request_rndvrestartnotify(sendreq, false, - type, status, btl); - } -} - -/* If we get an error on the RGET message, then first make sure that - * header matches the send request that we are pointing to. This is - * necessary, because even though the sending side got an error, the - * RGET may have made it to the receiving side and the message transfer - * may have completed. This would then mean the send request has been - * completed and perhaps in use by another communication. So there is - * no need to restart this request. Therefore, ensure that we are - * looking at the same request that the header thinks we are looking - * at. If not, then there is nothing else to be done. */ -void mca_pml_bfo_send_ctl_completion_status_error(struct mca_btl_base_descriptor_t* des) -{ - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)des->des_cbdata; - mca_pml_bfo_hdr_t* hdr = des->des_local->seg_addr.pval; - switch (hdr->hdr_common.hdr_type) { - case MCA_PML_BFO_HDR_TYPE_RGET: - if ((hdr->hdr_match.hdr_ctx != sendreq->req_send.req_base.req_comm->c_contextid) || - (hdr->hdr_match.hdr_src != sendreq->req_send.req_base.req_comm->c_my_rank) || - (hdr->hdr_match.hdr_seq != (uint16_t)sendreq->req_send.req_base.req_sequence)) { - opal_output_verbose(30, mca_pml_bfo_output, - "RGET: completion event: dropping because no valid request " - "PML:exp=%d,act=%d CTX:exp=%d,act=%d SRC:exp=%d,act=%d " - "RQS:exp=%d,act=%d, dst_req=%p", - (uint16_t)sendreq->req_send.req_base.req_sequence, - hdr->hdr_match.hdr_seq, - sendreq->req_send.req_base.req_comm->c_contextid, - hdr->hdr_match.hdr_ctx, - sendreq->req_send.req_base.req_comm->c_my_rank, - hdr->hdr_match.hdr_src, - sendreq->req_restartseq, hdr->hdr_rndv.hdr_restartseq, - (void *)sendreq); - return; - } - mca_pml_bfo_send_request_restart(sendreq, true, MCA_PML_BFO_HDR_TYPE_RGET); - return; - default: - opal_output(0, "%s:%d FATAL ERROR, unknown header (hdr=%d)", - __FILE__, __LINE__, hdr->hdr_common.hdr_type); - ompi_rte_abort(-1, NULL); - } -} diff --git a/ompi/mca/pml/bfo/pml_bfo_failover.h b/ompi/mca/pml/bfo/pml_bfo_failover.h deleted file mode 100644 index dbfc9ab2451..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_failover.h +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * Functions that implement failover capabilities. - */ - -#ifndef MCA_PML_BFO_FAILOVER_H -#define MCA_PML_BFO_FAILOVER_H - -#include "opal/mca/btl/btl.h" -#include "pml_bfo_hdr.h" - -BEGIN_C_DECLS - -bool mca_pml_bfo_is_duplicate_msg(mca_pml_bfo_comm_proc_t* proc, - mca_pml_bfo_match_hdr_t *hdr); -bool mca_pml_bfo_is_duplicate_fin(mca_pml_bfo_hdr_t* hdr, mca_btl_base_descriptor_t* rdma, - mca_btl_base_module_t* btl); - -mca_pml_bfo_recv_request_t* mca_pml_bfo_get_request(mca_pml_bfo_match_hdr_t *hdr); - -void mca_pml_bfo_send_request_restart(mca_pml_bfo_send_request_t* sendreq, - bool repost, mca_btl_base_tag_t tag); -void mca_pml_bfo_send_request_rndvrestartnotify(mca_pml_bfo_send_request_t* sendreq, - bool repost, mca_btl_base_tag_t tag, int status, - mca_btl_base_module_t* btl); - -void -mca_pml_bfo_rndvrestartnotify_completion(mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status); -void -mca_pml_bfo_check_recv_ctl_completion_status(mca_btl_base_module_t* btl, - struct mca_btl_base_descriptor_t* des, - int status); - -/* Reset a receive request to the beginning */ -void mca_pml_bfo_recv_request_reset(mca_pml_bfo_recv_request_t* recvreq); -/* Notify sender that receiver detected an error */ -void mca_pml_bfo_recv_request_recverrnotify(mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_tag_t tag, int status); -/* Ack the RNDVRESTARTNOTIFY message */ -void mca_pml_bfo_recv_request_rndvrestartack(mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_tag_t tag, int status, - mca_btl_base_module_t* btl); -/* Nack the RNDVRESTARTNOTIFY message */ -void mca_pml_bfo_recv_request_rndvrestartnack(mca_btl_base_descriptor_t* olddes, - ompi_proc_t* ompi_proc, bool repost); - -void mca_pml_bfo_recv_restart_completion(mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status); -void mca_pml_bfo_failover_error_handler(struct mca_btl_base_module_t* btl, - int32_t flags, ompi_proc_t *errproc, char *btlname); -void mca_pml_bfo_repost_match_fragment(struct mca_btl_base_descriptor_t* des); -void mca_pml_bfo_repost_fin(struct mca_btl_base_descriptor_t* des); - -void mca_pml_bfo_map_out_btl(struct mca_btl_base_module_t* btl, - ompi_proc_t *errproc, char *btlname); - -extern void mca_pml_bfo_map_out( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -int mca_pml_bfo_register_callbacks(void); - -void mca_pml_bfo_update_rndv_fields(mca_pml_bfo_hdr_t* hdr, - mca_pml_bfo_send_request_t*, char *type); - -void mca_pml_bfo_update_bml_btl(mca_bml_base_btl_t** bml_btl, mca_btl_base_module_t* btl, - struct mca_btl_base_descriptor_t* des); - -void mca_pml_bfo_find_recvreq_eager_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_recv_request_t* recvreq, - char* type); - -void mca_pml_bfo_find_sendreq_eager_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_send_request_t* sendreq, - char* type); - -void mca_pml_bfo_find_sendreq_rdma_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_send_request_t* sendreq, - char* type); - -void mca_pml_bfo_update_eager_bml_btl_recv_ctl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - struct mca_btl_base_descriptor_t* des); -void mca_pml_bfo_find_recvreq_rdma_bml_btl(mca_bml_base_btl_t** bml_btl, - mca_btl_base_module_t* btl, - mca_pml_bfo_recv_request_t* recvreq, - char* type); - -bool mca_pml_bfo_rndv_completion_status_error(struct mca_btl_base_descriptor_t* des, - mca_pml_bfo_send_request_t* sendreq); -void mca_pml_bfo_send_ctl_completion_status_error(struct mca_btl_base_descriptor_t* des); - - -void mca_pml_bfo_completion_sendreq_has_error(mca_pml_bfo_send_request_t* sendreq, - int status, - mca_btl_base_module_t* btl, - int type, - char *description); -/** - * Four new callbacks for the four new message types. - */ -extern void mca_pml_bfo_recv_frag_callback_rndvrestartnotify( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -extern void mca_pml_bfo_recv_frag_callback_rndvrestartack( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -extern void mca_pml_bfo_recv_frag_callback_rndvrestartnack( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -extern void mca_pml_bfo_recv_frag_callback_recverrnotify( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -/** - * A bunch of macros to help isolate failover code from regular ob1 code. - */ - -/* Drop any ACK fragments if request is in error state. Do not want - * to initiate any more activity. */ -#define MCA_PML_BFO_ERROR_CHECK_ON_ACK_CALLBACK(sendreq) \ - if( OPAL_UNLIKELY((sendreq)->req_error)) { \ - opal_output_verbose(20, mca_pml_bfo_output, \ - "ACK: received: dropping because request in error, " \ - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", \ - (uint16_t)(sendreq)->req_send.req_base.req_sequence, \ - (sendreq)->req_restartseq, \ - (void *)(sendreq), (sendreq)->req_recv.pval, \ - (sendreq)->req_send.req_base.req_peer); \ - return; \ - } - -/* Drop any FRAG fragments if request is in error state. Do not want - * to initiate any more activity. */ -#define MCA_PML_BFO_ERROR_CHECK_ON_FRAG_CALLBACK(recvreq) \ - if( OPAL_UNLIKELY((recvreq)->req_errstate)) { \ - opal_output_verbose(20, mca_pml_bfo_output, \ - "FRAG: received: dropping because request in error, " \ - "PML=%d, src_req=%p, dst_req=%p, peer=%d, offset=%d", \ - (uint16_t)(recvreq)->req_msgseq, \ - (recvreq)->remote_req_send.pval, \ - (void *)(recvreq), \ - (recvreq)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE, \ - (int)hdr->hdr_frag.hdr_frag_offset); \ - return; \ - } - -/* Drop any PUT fragments if request is in error state. Do not want - * to initiate any more activity. */ -#define MCA_PML_BFO_ERROR_CHECK_ON_PUT_CALLBACK(sendreq) \ - if( OPAL_UNLIKELY((sendreq)->req_error)) { \ - opal_output_verbose(20, mca_pml_bfo_output, \ - "PUT: received: dropping because request in error, " \ - "PML=%d, src_req=%p, dst_req=%p, peer=%d", \ - (uint16_t)(sendreq)->req_send.req_base.req_sequence, \ - (void *)(sendreq), (sendreq)->req_recv.pval, \ - (sendreq)->req_send.req_base.req_peer); \ - return; \ - } - -/** - * Macros for pml_bfo_recvreq.c file. - */ - -/* This can happen if a FIN message arrives after the request was - * marked in error. So, just drop the message. Note that the status - * field is not being checked. That is because the status field is the - * value returned in the FIN hdr.hdr_fail field and may be used for - * other things. Note that we allow the various fields to be updated - * in case this actually completes the request and the sending side - * thinks it is done. */ -#define MCA_PML_BFO_ERROR_CHECK_ON_FIN_FOR_PUT(recvreq) \ - if( OPAL_UNLIKELY((recvreq)->req_errstate)) { \ - opal_output_verbose(20, mca_pml_bfo_output, \ - "FIN: received on broken request, skipping, " \ - "PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", \ - (recvreq)->req_msgseq, (recvreq)->req_restartseq, \ - (recvreq)->remote_req_send.pval, (void *)(recvreq), \ - (recvreq)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); \ - /* Even though in error, it still might complete. */ \ - recv_request_pml_complete_check(recvreq); \ - return; \ - } - -#define MCA_PML_BFO_ERROR_CHECK_ON_RDMA_READ_COMPLETION(recvreq) \ - if ((recvreq)->req_errstate) { \ - opal_output_verbose(30, mca_pml_bfo_output, \ - "RDMA read: completion failed, error already seen, " \ - "PML=%d, RQS=%d, src_req=%lx, dst_req=%lx, peer=%d", \ - (recvreq)->req_msgseq, (recvreq)->req_restartseq, \ - (unsigned long)(recvreq)->remote_req_send.pval, \ - (unsigned long)(recvreq), \ - (recvreq)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); \ - return; \ - } else { \ - opal_output_verbose(30, mca_pml_bfo_output, \ - "RDMA read: completion failed, sending RECVERRNOTIFY to " \ - "sender, PML=%d, RQS=%d, src_req=%lx, dst_req=%lx, peer=%d", \ - (recvreq)->req_msgseq, (recvreq)->req_restartseq, \ - (unsigned long)(recvreq)->remote_req_send.pval, \ - (unsigned long)(recvreq), \ - (recvreq)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); \ - mca_pml_bfo_recv_request_recverrnotify(recvreq, MCA_PML_BFO_HDR_TYPE_RGET, status); \ - } - -#define MCA_PML_BFO_SECOND_ERROR_CHECK_ON_RDMA_READ_COMPLETION(recvreq, status, btl) \ - /* See if the request has received a RNDVRESTARTNOTIFY */ \ - if( OPAL_UNLIKELY(recvreq->req_errstate)) { \ - if (recvreq->req_errstate & RECVREQ_RNDVRESTART_RECVED) { \ - opal_output_verbose(30, mca_pml_bfo_output, \ - "RDMA read: completion: recvreq has error, outstanding events=%d " \ - "PML=%d, RQS=%d, src_req=%lx, dst_req=%lx, status=%d, peer=%d", \ - recvreq->req_events, recvreq->req_msgseq, recvreq->req_restartseq, \ - (unsigned long)recvreq->remote_req_send.pval, \ - (unsigned long)recvreq, status, \ - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE); \ - if (0 == recvreq->req_events) { \ - mca_pml_bfo_recv_request_rndvrestartack(recvreq, MCA_PML_BFO_HDR_TYPE_RGET, \ - status, btl); \ - } \ - } \ - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); \ - return; \ - } - -/** - * Macros for pml_bfo_sendreq.c file. - */ - -/* This macro is called on the sending side after receiving - * a PUT message. There is a chance that this PUT message - * has shown up and is attempting to modify the state of - * the req_state, but the req_state is no longer being tracked - * because the RNDV message has turned into a RGET message - * because it got an error on the RNDV completion. - */ -#define MCA_PML_BFO_VERIFY_SENDREQ_REQ_STATE_VALUE(sendreq) \ - if (sendreq->req_state == -1) { \ - OPAL_THREAD_ADD32(&sendreq->req_state, 1); \ - } - -/* Now check the error state. This request can be in error if the - * RNDV message made it over, but the receiver got an error trying to - * send the ACK back and therefore sent a RECVERRNOTIFY message. In - * that case, we want to start the restart dance as the receiver has - * matched this message already. Only restart if there are no - * outstanding events on send request. */ -#define MCA_PML_BFO_RNDV_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl, type, description) \ - if( OPAL_UNLIKELY ((sendreq)->req_error)) { \ - mca_pml_bfo_completion_sendreq_has_error(sendreq, status, \ - btl, type, description); \ - return; \ - } - -/** - * This macro is called within the frag completion function in two - * places. It is called to see if any errors occur prior to the - * completion event on the frag. It is then called a second time - * after the scheduling routine is called as the scheduling routine - * may have detected that a BTL that was cached on the request had - * been removed and therefore marked the request in error. In that - * case, the scheduling of fragments can no longer proceed properly, - * and if there are no outstanding events, iniated the restart dance. - */ -#define MCA_PML_BFO_FRAG_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl, type, description) \ - if( OPAL_UNLIKELY((sendreq)->req_error)) { \ - mca_pml_bfo_completion_sendreq_has_error(sendreq, status, \ - btl, type, description); \ - return; \ - } - -/* This can happen if a FIN message arrives after the request was - * marked in error. So, just drop the message. Note that the status - * field is not checked here. That is because that is the value - * returned in the FIN hdr.hdr_fail field and may be used for other - * things. */ -#define MCA_PML_BFO_RGET_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, btl, des) \ - if( OPAL_UNLIKELY(sendreq->req_error)) { \ - opal_output_verbose(30, mca_pml_bfo_output, \ - "FIN: received on broken request, skipping, " \ - "PML=%d, src_req=%lx, dst_req=%lx, peer=%d", \ - (uint16_t)sendreq->req_send.req_base.req_sequence, \ - (unsigned long)sendreq, (unsigned long)sendreq->req_recv.pval, \ - sendreq->req_send.req_base.req_peer); \ - btl->btl_free(btl, des); \ - return; \ - } - - -/* Check if there has been an error on the send request when we get - * a completion event on the RDMA write. */ -#define MCA_PML_BFO_PUT_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl) \ - if ( OPAL_UNLIKELY(sendreq->req_error)) { \ - mca_pml_bfo_completion_sendreq_has_error(sendreq, status, btl, \ - MCA_PML_BFO_HDR_TYPE_PUT, "RDMA write"); \ - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); \ - return; \ - } - -#define MCA_PML_BFO_CHECK_FOR_RNDV_RESTART(hdr, sendreq, type) \ - if (0 < sendreq->req_restartseq) { \ - mca_pml_bfo_update_rndv_fields(hdr, sendreq, type); \ - } - -/* If a bml_btl gets mapped out, then we need to adjust it based - * on the btl from the callback function. These macros are called on - * every callback to make sure things are copacetic. - */ -#define MCA_PML_BFO_CHECK_EAGER_BML_BTL_ON_FIN_COMPLETION(bml_btl, btl, des) \ - if (bml_btl->btl != btl) { \ - ompi_proc_t *proc = (ompi_proc_t*) des->des_cbdata; \ - mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; \ - bml_btl = mca_bml_base_btl_array_find(&bml_endpoint->btl_eager, btl); \ - } -#define MCA_PML_BFO_CHECK_SENDREQ_EAGER_BML_BTL(bml_btl, btl, sendreq, type) \ - if (bml_btl->btl != btl) { \ - mca_pml_bfo_find_sendreq_eager_bml_btl(&bml_btl, btl, sendreq, type); \ - } -#define MCA_PML_BFO_CHECK_SENDREQ_RDMA_BML_BTL(bml_btl, btl, sendreq, type) \ - if (bml_btl->btl != btl) { \ - mca_pml_bfo_find_sendreq_rdma_bml_btl(&bml_btl, btl, sendreq, type); \ - } - -#define MCA_PML_BFO_CHECK_RECVREQ_EAGER_BML_BTL(bml_btl, btl, recvreq, type) \ - if (bml_btl->btl != btl) { \ - mca_pml_bfo_find_recvreq_eager_bml_btl(&bml_btl, btl, recvreq, type); \ - } - -#define MCA_PML_BFO_CHECK_RECVREQ_RDMA_BML_BTL(bml_btl, btl, recvreq, type) \ - if (bml_btl->btl != btl) { \ - mca_pml_bfo_find_recvreq_rdma_bml_btl(&bml_btl, btl, recvreq, type); \ - } - -#define MCA_PML_BFO_CHECK_RECVREQ_EAGER_BML_BTL_RECV_CTL(bml_btl, btl, des) \ - if (bml_btl->btl != btl) { \ - mca_pml_bfo_update_eager_bml_btl_recv_ctl(&bml_btl, btl, des); \ - } - -#define MCA_PML_BFO_CHECK_FOR_REMOVED_BML(sendreq, frag, btl) \ - if( OPAL_UNLIKELY(NULL == frag->rdma_bml) ) { \ - opal_output_verbose(30, mca_pml_bfo_output, \ - "PUT received: no matching BTL to RDMA write to, oustanding " \ - "events=%d, PML=%d, RQS=%d, src_req=%p, dst_req=%p, peer=%d", \ - sendreq->req_events, \ - (uint16_t)sendreq->req_send.req_base.req_sequence, \ - sendreq->req_restartseq, (void *)sendreq, \ - sendreq->req_recv.pval, sendreq->req_send.req_base.req_peer); \ - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); \ - sendreq->req_error++; \ - if (0 == sendreq->req_events) { \ - mca_pml_bfo_send_request_rndvrestartnotify(sendreq, false, \ - MCA_PML_BFO_HDR_TYPE_PUT, \ - OMPI_ERROR, btl); \ - } \ - return; \ - } - -/* This macro checks to see if the cached number of BTLs in the - * send request still matches the value from the endpoint. - * If it does not, this means that a BTL was removed from the - * available list. In this case, start the request over. - */ -#define MCA_PML_BFO_CHECK_FOR_REMOVED_BTL(sendreq, range) \ - if ((int)mca_bml_base_btl_array_get_size(&sendreq->req_endpoint->btl_send) \ - != range->range_btl_cnt) { \ - sendreq->req_error++; \ - return OMPI_ERROR; \ - } - - -END_C_DECLS - -#endif diff --git a/ompi/mca/pml/bfo/pml_bfo_hdr.h b/ompi/mca/pml/bfo/pml_bfo_hdr.h deleted file mode 100644 index b8c8d145245..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_hdr.h +++ /dev/null @@ -1,539 +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 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 IBM Corporation. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ -#ifndef MCA_PML_BFO_HEADER_H -#define MCA_PML_BFO_HEADER_H - -#include "ompi_config.h" -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#include "opal/types.h" -#include "opal/util/arch.h" -#include "opal/mca/btl/btl.h" -#include "ompi/proc/proc.h" - -#define MCA_PML_BFO_HDR_TYPE_MATCH (MCA_BTL_TAG_PML + 1) -#define MCA_PML_BFO_HDR_TYPE_RNDV (MCA_BTL_TAG_PML + 2) -#define MCA_PML_BFO_HDR_TYPE_RGET (MCA_BTL_TAG_PML + 3) -#define MCA_PML_BFO_HDR_TYPE_ACK (MCA_BTL_TAG_PML + 4) -#define MCA_PML_BFO_HDR_TYPE_NACK (MCA_BTL_TAG_PML + 5) -#define MCA_PML_BFO_HDR_TYPE_FRAG (MCA_BTL_TAG_PML + 6) -#define MCA_PML_BFO_HDR_TYPE_GET (MCA_BTL_TAG_PML + 7) -#define MCA_PML_BFO_HDR_TYPE_PUT (MCA_BTL_TAG_PML + 8) -#define MCA_PML_BFO_HDR_TYPE_FIN (MCA_BTL_TAG_PML + 9) -#if PML_BFO -#define MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNOTIFY (MCA_BTL_TAG_PML + 10) -#define MCA_PML_BFO_HDR_TYPE_RNDVRESTARTACK (MCA_BTL_TAG_PML + 11) -#define MCA_PML_BFO_HDR_TYPE_RNDVRESTARTNACK (MCA_BTL_TAG_PML + 12) -#define MCA_PML_BFO_HDR_TYPE_RECVERRNOTIFY (MCA_BTL_TAG_PML + 13) -#endif /* PML_BFO */ - -#define MCA_PML_BFO_HDR_FLAGS_ACK 1 /* is an ack required */ -#define MCA_PML_BFO_HDR_FLAGS_NBO 2 /* is the hdr in network byte order */ -#define MCA_PML_BFO_HDR_FLAGS_PIN 4 /* is user buffer pinned */ -#define MCA_PML_BFO_HDR_FLAGS_CONTIG 8 /* is user buffer contiguous */ -#define MCA_PML_BFO_HDR_FLAGS_NORDMA 16 /* rest will be send by copy-in-out */ -#if PML_BFO -#define MCA_PML_BFO_HDR_FLAGS_RESTART 32 /* restart RNDV because of error */ -#endif /* PML_BFO */ - -/** - * Common hdr attributes - must be first element in each hdr type - */ -struct mca_pml_bfo_common_hdr_t { - uint8_t hdr_type; /**< type of envelope */ - uint8_t hdr_flags; /**< flags indicating how fragment should be processed */ -}; -typedef struct mca_pml_bfo_common_hdr_t mca_pml_bfo_common_hdr_t; - -#define MCA_PML_BFO_COMMON_HDR_NTOH(h) -#define MCA_PML_BFO_COMMON_HDR_HTON(h) - -/** - * Header definition for the first fragment, contains the - * attributes required to match the corresponding posted receive. - */ -struct mca_pml_bfo_match_hdr_t { - mca_pml_bfo_common_hdr_t hdr_common; /**< common attributes */ - uint16_t hdr_ctx; /**< communicator index */ - int32_t hdr_src; /**< source rank */ - int32_t hdr_tag; /**< user tag */ - uint16_t hdr_seq; /**< message sequence number */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[2]; /**< explicitly pad to 16 bytes. Compilers seem to already prefer to do this, but make it explicit just in case */ -#endif -}; -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT -#define OMPI_PML_BFO_MATCH_HDR_LEN 16 -#else -#define OMPI_PML_BFO_MATCH_HDR_LEN 14 -#endif - -typedef struct mca_pml_bfo_match_hdr_t mca_pml_bfo_match_hdr_t; - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_MATCH_HDR_FILL(h) \ -do { \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ -} while(0) -#else -#define MCA_PML_BFO_MATCH_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -#define MCA_PML_BFO_MATCH_HDR_NTOH(h) \ -do { \ - MCA_PML_BFO_COMMON_HDR_NTOH((h).hdr_common); \ - (h).hdr_ctx = ntohs((h).hdr_ctx); \ - (h).hdr_src = ntohl((h).hdr_src); \ - (h).hdr_tag = ntohl((h).hdr_tag); \ - (h).hdr_seq = ntohs((h).hdr_seq); \ -} while (0) - -#define MCA_PML_BFO_MATCH_HDR_HTON(h) \ -do { \ - MCA_PML_BFO_COMMON_HDR_HTON((h).hdr_common); \ - MCA_PML_BFO_MATCH_HDR_FILL(h); \ - (h).hdr_ctx = htons((h).hdr_ctx); \ - (h).hdr_src = htonl((h).hdr_src); \ - (h).hdr_tag = htonl((h).hdr_tag); \ - (h).hdr_seq = htons((h).hdr_seq); \ -} while (0) - -/** - * Header definition for the first fragment when an acknowledgment - * is required. This could be the first fragment of a large message - * or a short message that requires an ack (synchronous). - */ -struct mca_pml_bfo_rendezvous_hdr_t { - mca_pml_bfo_match_hdr_t hdr_match; - uint64_t hdr_msg_length; /**< message length */ - opal_ptr_t hdr_src_req; /**< pointer to source request - returned in ack */ -#if PML_BFO - opal_ptr_t hdr_dst_req; /**< pointer to dst req */ - uint8_t hdr_restartseq; /**< restart sequence */ -#endif /* PML_BFO */ -}; -typedef struct mca_pml_bfo_rendezvous_hdr_t mca_pml_bfo_rendezvous_hdr_t; - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_RNDV_HDR_FILL(h) \ - MCA_PML_BFO_MATCH_HDR_FILL((h).hdr_match) -#else -#define MCA_PML_BFO_RNDV_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -/* Note that hdr_src_req is not put in network byte order because it - is never processed by the receiver, other than being copied into - the ack header */ -#define MCA_PML_BFO_RNDV_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_MATCH_HDR_NTOH((h).hdr_match); \ - (h).hdr_msg_length = ntoh64((h).hdr_msg_length); \ - } while (0) - -#define MCA_PML_BFO_RNDV_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_MATCH_HDR_HTON((h).hdr_match); \ - MCA_PML_BFO_RNDV_HDR_FILL(h); \ - (h).hdr_msg_length = hton64((h).hdr_msg_length); \ - } while (0) - -/** - * Header definition for a combined rdma rendezvous/get - */ -struct mca_pml_bfo_rget_hdr_t { - mca_pml_bfo_rendezvous_hdr_t hdr_rndv; - uint32_t hdr_seg_cnt; /**< number of segments for rdma */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[4]; -#endif - opal_ptr_t hdr_des; /**< source descriptor */ -}; -typedef struct mca_pml_bfo_rget_hdr_t mca_pml_bfo_rget_hdr_t; - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_RGET_HDR_FILL(h) \ -do { \ - MCA_PML_BFO_RNDV_HDR_FILL((h).hdr_rndv); \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ - (h).hdr_padding[2] = 0; \ - (h).hdr_padding[3] = 0; \ -} while(0) -#else -#define MCA_PML_BFO_RGET_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -#define MCA_PML_BFO_RGET_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_RNDV_HDR_NTOH((h).hdr_rndv); \ - (h).hdr_seg_cnt = ntohl((h).hdr_seg_cnt); \ - } while (0) - -#define MCA_PML_BFO_RGET_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_RNDV_HDR_HTON((h).hdr_rndv); \ - MCA_PML_BFO_RGET_HDR_FILL(h); \ - (h).hdr_seg_cnt = htonl((h).hdr_seg_cnt); \ - } while (0) - -/** - * Header for subsequent fragments. - */ -struct mca_pml_bfo_frag_hdr_t { - mca_pml_bfo_common_hdr_t hdr_common; /**< common attributes */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[6]; -#endif - uint64_t hdr_frag_offset; /**< offset into message */ - opal_ptr_t hdr_src_req; /**< pointer to source request */ - opal_ptr_t hdr_dst_req; /**< pointer to matched receive */ -}; -typedef struct mca_pml_bfo_frag_hdr_t mca_pml_bfo_frag_hdr_t; - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_FRAG_HDR_FILL(h) \ -do { \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ - (h).hdr_padding[2] = 0; \ - (h).hdr_padding[3] = 0; \ - (h).hdr_padding[4] = 0; \ - (h).hdr_padding[5] = 0; \ -} while(0) -#else -#define MCA_PML_BFO_FRAG_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -#define MCA_PML_BFO_FRAG_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_NTOH((h).hdr_common); \ - (h).hdr_frag_offset = ntoh64((h).hdr_frag_offset); \ - } while (0) - -#define MCA_PML_BFO_FRAG_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_HTON((h).hdr_common); \ - MCA_PML_BFO_FRAG_HDR_FILL(h); \ - (h).hdr_frag_offset = hton64((h).hdr_frag_offset); \ - } while (0) - -/** - * Header used to acknowledgment outstanding fragment(s). - */ - -struct mca_pml_bfo_ack_hdr_t { - mca_pml_bfo_common_hdr_t hdr_common; /**< common attributes */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[6]; -#endif - opal_ptr_t hdr_src_req; /**< source request */ - opal_ptr_t hdr_dst_req; /**< matched receive request */ - uint64_t hdr_send_offset; /**< starting point of copy in/out */ -}; -typedef struct mca_pml_bfo_ack_hdr_t mca_pml_bfo_ack_hdr_t; - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_ACK_HDR_FILL(h) \ -do { \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ - (h).hdr_padding[2] = 0; \ - (h).hdr_padding[3] = 0; \ - (h).hdr_padding[4] = 0; \ - (h).hdr_padding[5] = 0; \ -} while (0) -#else -#define MCA_PML_BFO_ACK_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -/* Note that the request headers are not put in NBO because the - src_req is already in receiver's byte order and the dst_req is not - used by the receiver for anything other than backpointers in return - headers */ -#define MCA_PML_BFO_ACK_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_NTOH((h).hdr_common); \ - (h).hdr_send_offset = ntoh64((h).hdr_send_offset); \ - } while (0) - -#define MCA_PML_BFO_ACK_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_HTON((h).hdr_common); \ - MCA_PML_BFO_ACK_HDR_FILL(h); \ - (h).hdr_send_offset = hton64((h).hdr_send_offset); \ - } while (0) - -/** - * Header used to initiate an RDMA operation. - */ - -struct mca_pml_bfo_rdma_hdr_t { - mca_pml_bfo_common_hdr_t hdr_common; /**< common attributes */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[2]; /** two to pad out the hdr to a 4 byte alignment. hdr_req will then be 8 byte aligned after 4 for hdr_seg_cnt */ -#endif - uint32_t hdr_seg_cnt; /**< number of segments for rdma */ - opal_ptr_t hdr_req; /**< destination request */ -#if PML_BFO - opal_ptr_t hdr_dst_req; /**< pointer to destination request */ -#endif /* PML_BFO */ - opal_ptr_t hdr_des; /**< source descriptor */ - uint64_t hdr_rdma_offset; /**< current offset into user buffer */ - mca_btl_base_segment_t hdr_segs[1]; /**< list of segments for rdma */ -}; -typedef struct mca_pml_bfo_rdma_hdr_t mca_pml_bfo_rdma_hdr_t; - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_RDMA_HDR_FILL(h) \ -do { \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ -} while(0) -#else -#define MCA_PML_BFO_RDMA_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -#define MCA_PML_BFO_RDMA_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_NTOH((h).hdr_common); \ - (h).hdr_seg_cnt = ntohl((h).hdr_seg_cnt); \ - (h).hdr_rdma_offset = ntoh64((h).hdr_rdma_offset); \ - } while (0) - -#define MCA_PML_BFO_RDMA_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_HTON((h).hdr_common); \ - MCA_PML_BFO_RDMA_HDR_FILL(h); \ - (h).hdr_seg_cnt = htonl((h).hdr_seg_cnt); \ - (h).hdr_rdma_offset = hton64((h).hdr_rdma_offset); \ - } while (0) - -/** - * Header used to complete an RDMA operation. - */ - -struct mca_pml_bfo_fin_hdr_t { - mca_pml_bfo_common_hdr_t hdr_common; /**< common attributes */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[2]; -#endif -#if PML_BFO - /* Match info is needed to check for duplicate FIN messages. */ - mca_pml_bfo_match_hdr_t hdr_match; -#endif /* PML_BFO */ - uint32_t hdr_fail; /**< RDMA operation failed */ - opal_ptr_t hdr_des; /**< completed descriptor */ -}; -typedef struct mca_pml_bfo_fin_hdr_t mca_pml_bfo_fin_hdr_t; - -#if PML_BFO -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_FIN_HDR_FILL(h) \ -do { \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ - MCA_PML_BFO_MATCH_HDR_FILL((h).hdr_match); \ -} while (0) -#else -#define MCA_PML_BFO_FIN_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -#define MCA_PML_BFO_FIN_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_NTOH((h).hdr_common); \ - MCA_PML_BFO_MATCH_HDR_NTOH((h).hdr_match); \ - } while (0) - -#define MCA_PML_BFO_FIN_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_HTON((h).hdr_common); \ - MCA_PML_BFO_MATCH_HDR_HTON((h).hdr_match); \ - MCA_PML_BFO_FIN_HDR_FILL(h); \ - } while (0) -#else /* PML_BFO */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG -#define MCA_PML_BFO_FIN_HDR_FILL(h) \ -do { \ - (h).hdr_padding[0] = 0; \ - (h).hdr_padding[1] = 0; \ -} while (0) -#else -#define MCA_PML_BFO_FIN_HDR_FILL(h) -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG */ - -#define MCA_PML_BFO_FIN_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_NTOH((h).hdr_common); \ - } while (0) - -#define MCA_PML_BFO_FIN_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_COMMON_HDR_HTON((h).hdr_common); \ - MCA_PML_BFO_FIN_HDR_FILL(h); \ - } while (0) -#endif /* PML_BFO */ - -#if PML_BFO -/** - * Header used to restart a rendezvous request. - */ -struct mca_pml_bfo_restart_hdr_t { - mca_pml_bfo_match_hdr_t hdr_match; /**< needed to avoid duplicate messages */ - uint8_t hdr_restartseq; /**< restart sequence */ -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - uint8_t hdr_padding[3]; -#endif - opal_ptr_t hdr_src_req; /**< source request */ - opal_ptr_t hdr_dst_req; /**< matched receive request */ - int32_t hdr_dst_rank; /**< needed to send NACK */ - uint32_t hdr_jobid; /**< needed to send NACK */ - uint32_t hdr_vpid; /**< needed to send NACK */ -}; -typedef struct mca_pml_bfo_restart_hdr_t mca_pml_bfo_restart_hdr_t; - -/* Only need to put parts of the restart header in NBO. No need - to do hdr_src_req and hdr_dst_req as they are only used on the - by the process that originated them. */ -#define MCA_PML_BFO_RESTART_HDR_NTOH(h) \ - do { \ - MCA_PML_BFO_MATCH_HDR_NTOH((h).hdr_match); \ - (h).hdr_dst_rank = ntohl((h).hdr_dst_rank); \ - (h).hdr_jobid = ntohl((h).hdr_jobid); \ - (h).hdr_vpid = ntohl((h).hdr_vpid); \ - } while (0) - -#define MCA_PML_BFO_RESTART_HDR_HTON(h) \ - do { \ - MCA_PML_BFO_MATCH_HDR_HTON((h).hdr_match); \ - (h).hdr_dst_rank = htonl((h).hdr_dst_rank); \ - (h).hdr_jobid = htonl((h).hdr_jobid); \ - (h).hdr_vpid = htonl((h).hdr_vpid); \ - } while (0) - -#endif /* PML_BFO */ -/** - * Union of defined hdr types. - */ -union mca_pml_bfo_hdr_t { - mca_pml_bfo_common_hdr_t hdr_common; - mca_pml_bfo_match_hdr_t hdr_match; - mca_pml_bfo_rendezvous_hdr_t hdr_rndv; - mca_pml_bfo_rget_hdr_t hdr_rget; - mca_pml_bfo_frag_hdr_t hdr_frag; - mca_pml_bfo_ack_hdr_t hdr_ack; - mca_pml_bfo_rdma_hdr_t hdr_rdma; - mca_pml_bfo_fin_hdr_t hdr_fin; -#if PML_BFO - mca_pml_bfo_restart_hdr_t hdr_restart; -#endif /* PML_BFO */ -}; -typedef union mca_pml_bfo_hdr_t mca_pml_bfo_hdr_t; - -#if !defined(WORDS_BIGENDIAN) && OPAL_ENABLE_HETEROGENEOUS_SUPPORT -static inline __opal_attribute_always_inline__ void -bfo_hdr_ntoh(mca_pml_bfo_hdr_t *hdr, const uint8_t hdr_type) -{ - if(!(hdr->hdr_common.hdr_flags & MCA_PML_BFO_HDR_FLAGS_NBO)) - return; - - switch(hdr_type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - MCA_PML_BFO_MATCH_HDR_NTOH(hdr->hdr_match); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - MCA_PML_BFO_RNDV_HDR_NTOH(hdr->hdr_rndv); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - MCA_PML_BFO_RGET_HDR_NTOH(hdr->hdr_rget); - break; - case MCA_PML_BFO_HDR_TYPE_ACK: - MCA_PML_BFO_ACK_HDR_NTOH(hdr->hdr_ack); - break; - case MCA_PML_BFO_HDR_TYPE_FRAG: - MCA_PML_BFO_FRAG_HDR_NTOH(hdr->hdr_frag); - break; - case MCA_PML_BFO_HDR_TYPE_PUT: - MCA_PML_BFO_RDMA_HDR_NTOH(hdr->hdr_rdma); - break; - case MCA_PML_BFO_HDR_TYPE_FIN: - MCA_PML_BFO_FIN_HDR_NTOH(hdr->hdr_fin); - break; - default: - assert(0); - break; - } -} -#else -#define bfo_hdr_ntoh(h, t) do{}while(0) -#endif - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT -#define bfo_hdr_hton(h, t, p) \ - bfo_hdr_hton_intr((mca_pml_bfo_hdr_t*)h, t, p) -static inline __opal_attribute_always_inline__ void -bfo_hdr_hton_intr(mca_pml_bfo_hdr_t *hdr, const uint8_t hdr_type, - const ompi_proc_t *proc) -{ -#ifdef WORDS_BIGENDIAN - hdr->hdr_common.hdr_flags |= MCA_PML_BFO_HDR_FLAGS_NBO; -#else - - if(!(proc->super.proc_arch & OPAL_ARCH_ISBIGENDIAN)) - return; - - hdr->hdr_common.hdr_flags |= MCA_PML_BFO_HDR_FLAGS_NBO; - switch(hdr_type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - MCA_PML_BFO_MATCH_HDR_HTON(hdr->hdr_match); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - MCA_PML_BFO_RNDV_HDR_HTON(hdr->hdr_rndv); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - MCA_PML_BFO_RGET_HDR_HTON(hdr->hdr_rget); - break; - case MCA_PML_BFO_HDR_TYPE_ACK: - MCA_PML_BFO_ACK_HDR_HTON(hdr->hdr_ack); - break; - case MCA_PML_BFO_HDR_TYPE_FRAG: - MCA_PML_BFO_FRAG_HDR_HTON(hdr->hdr_frag); - break; - case MCA_PML_BFO_HDR_TYPE_PUT: - MCA_PML_BFO_RDMA_HDR_HTON(hdr->hdr_rdma); - break; - case MCA_PML_BFO_HDR_TYPE_FIN: - MCA_PML_BFO_FIN_HDR_HTON(hdr->hdr_fin); - break; - default: - assert(0); - break; - } -#endif -} -#else -#define bfo_hdr_hton(h, t, p) do{}while(0) -#endif -#endif diff --git a/ompi/mca/pml/bfo/pml_bfo_iprobe.c b/ompi/mca/pml/bfo/pml_bfo_iprobe.c deleted file mode 100644 index 1f07c2425b6..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_iprobe.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 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-2012 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "ompi/request/request.h" -#include "ompi/message/message.h" -#include "pml_bfo_recvreq.h" - - -int mca_pml_bfo_iprobe(int src, - int tag, - struct ompi_communicator_t *comm, - int *matched, ompi_status_public_t * status) -{ - int rc = OMPI_SUCCESS; - mca_pml_bfo_recv_request_t recvreq; - - OBJ_CONSTRUCT( &recvreq, mca_pml_bfo_recv_request_t ); - recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML; - recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_IPROBE; - - MCA_PML_BFO_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true); - MCA_PML_BFO_RECV_REQUEST_START(&recvreq); - - if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) { - if( NULL != status ) { - *status = recvreq.req_recv.req_base.req_ompi.req_status; - } - rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR; - *matched = 1; - } else { - *matched = 0; - opal_progress(); - } - MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); - return rc; -} - - -int mca_pml_bfo_probe(int src, - int tag, - struct ompi_communicator_t *comm, - ompi_status_public_t * status) -{ - int rc = OMPI_SUCCESS; - mca_pml_bfo_recv_request_t recvreq; - - OBJ_CONSTRUCT( &recvreq, mca_pml_bfo_recv_request_t ); - recvreq.req_recv.req_base.req_ompi.req_type = OMPI_REQUEST_PML; - recvreq.req_recv.req_base.req_type = MCA_PML_REQUEST_PROBE; - - MCA_PML_BFO_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, true); - MCA_PML_BFO_RECV_REQUEST_START(&recvreq); - - ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi); - rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR; - if (NULL != status) { - *status = recvreq.req_recv.req_base.req_ompi.req_status; - } - - MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); - return rc; -} - - -int -mca_pml_bfo_improbe(int src, - int tag, - struct ompi_communicator_t *comm, - int *matched, - struct ompi_message_t **message, - ompi_status_public_t * status) -{ - int rc = OMPI_SUCCESS; - mca_pml_bfo_recv_request_t *recvreq; - - *message = ompi_message_alloc(); - if (NULL == *message) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - - MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq); - if (NULL == recvreq) - return OMPI_ERR_OUT_OF_RESOURCE; - recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_IMPROBE; - - /* initialize the request enough to probe and get the status */ - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt, - src, tag, comm, false); - MCA_PML_BFO_RECV_REQUEST_START(recvreq); - - if( recvreq->req_recv.req_base.req_ompi.req_complete == true ) { - if( NULL != status ) { - *status = recvreq->req_recv.req_base.req_ompi.req_status; - } - *matched = 1; - - (*message)->comm = comm; - (*message)->req_ptr = recvreq; - (*message)->peer = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE; - (*message)->count = recvreq->req_recv.req_base.req_ompi.req_status._ucount; - - rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR; - } else { - *matched = 0; - - /* we only free if we didn't match, because we're going to - translate the request into a receive request later on if it - was matched */ - MCA_PML_BFO_RECV_REQUEST_RETURN( recvreq ); - ompi_message_return(*message); - *message = MPI_MESSAGE_NULL; - - opal_progress(); - } - - return rc; -} - - -int -mca_pml_bfo_mprobe(int src, - int tag, - struct ompi_communicator_t *comm, - struct ompi_message_t **message, - ompi_status_public_t * status) -{ - int rc = OMPI_SUCCESS; - mca_pml_bfo_recv_request_t *recvreq; - - *message = ompi_message_alloc(); - if (NULL == *message) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - - MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq); - if (NULL == recvreq) - return OMPI_ERR_TEMP_OUT_OF_RESOURCE; - recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_MPROBE; - - /* initialize the request enough to probe and get the status */ - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt, - src, tag, comm, false); - MCA_PML_BFO_RECV_REQUEST_START(recvreq); - - ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi); - rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR; - - if( NULL != status ) { - *status = recvreq->req_recv.req_base.req_ompi.req_status; - } - - (*message)->comm = comm; - (*message)->req_ptr = recvreq; - (*message)->peer = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE; - (*message)->count = recvreq->req_recv.req_base.req_ompi.req_status._ucount; - - return rc; -} diff --git a/ompi/mca/pml/bfo/pml_bfo_irecv.c b/ompi/mca/pml/bfo/pml_bfo_irecv.c deleted file mode 100644 index 0278a93a921..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_irecv.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 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 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "ompi/request/request.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_recvfrag.h" -#include "ompi/peruse/peruse-internal.h" -#include "ompi/message/message.h" - -int mca_pml_bfo_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) -{ - mca_pml_bfo_recv_request_t *recvreq; - MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq); - if (NULL == recvreq) - return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, - addr, - count, datatype, src, tag, comm, true); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &((recvreq)->req_recv.req_base), - PERUSE_RECV); - - *request = (ompi_request_t *) recvreq; - return OMPI_SUCCESS; -} - -int mca_pml_bfo_irecv(void *addr, - size_t count, - ompi_datatype_t * datatype, - int src, - int tag, - struct ompi_communicator_t *comm, - struct ompi_request_t **request) -{ - mca_pml_bfo_recv_request_t *recvreq; - MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq); - if (NULL == recvreq) - return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, - addr, - count, datatype, src, tag, comm, false); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &((recvreq)->req_recv.req_base), - PERUSE_RECV); - - MCA_PML_BFO_RECV_REQUEST_START(recvreq); - *request = (ompi_request_t *) recvreq; - return OMPI_SUCCESS; -} - - -int mca_pml_bfo_recv(void *addr, - size_t count, - ompi_datatype_t * datatype, - int src, - int tag, - struct ompi_communicator_t *comm, - ompi_status_public_t * status) -{ - int rc; - mca_pml_bfo_recv_request_t *recvreq; - MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq); - if (NULL == recvreq) - return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, - addr, - count, datatype, src, tag, comm, false); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &((recvreq)->req_recv.req_base), - PERUSE_RECV); - - MCA_PML_BFO_RECV_REQUEST_START(recvreq); - ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi); - - if (NULL != status) { /* return status */ - *status = recvreq->req_recv.req_base.req_ompi.req_status; - } - rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR; - ompi_request_free( (ompi_request_t**)&recvreq ); - return rc; -} - - -int -mca_pml_bfo_imrecv( void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - struct ompi_request_t **request ) -{ - mca_pml_bfo_recv_frag_t* frag; - mca_pml_bfo_recv_request_t *recvreq; - mca_pml_bfo_hdr_t *hdr; - int src, tag; - ompi_communicator_t *comm; - mca_pml_bfo_comm_proc_t* proc; - mca_pml_bfo_comm_t* bfo_comm; - uint64_t seq; - - /* get the request from the message and the frag from the request - before we overwrite everything */ - recvreq = (mca_pml_bfo_recv_request_t*) (*message)->req_ptr; - frag = (mca_pml_bfo_recv_frag_t*) recvreq->req_recv.req_base.req_addr; - src = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE; - tag = recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG; - comm = (*message)->comm; - bfo_comm = recvreq->req_recv.req_base.req_comm->c_pml_comm; - seq = recvreq->req_recv.req_base.req_sequence; - - /* make the request a recv request again */ - /* The old request kept pointers to comm and the char datatype. - We're about to release those, but need to make sure comm - doesn't go out of scope (we don't care about the char datatype - anymore). So retain comm, then release the frag, then reinit - the frag (which will retain comm), then release comm (but the - frag still has it's ref, so it'll stay in scope). Make - sense? */ - OBJ_RETAIN(comm); - MCA_PML_BASE_RECV_REQUEST_FINI(&recvreq->req_recv); - recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV; - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, - buf, - count, datatype, - src, tag, comm, false); - OBJ_RELEASE(comm); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &((recvreq)->req_recv.req_base), - PERUSE_RECV); - - /* init/re-init the request */ - recvreq->req_lock = 0; - recvreq->req_pipeline_depth = 0; - recvreq->req_bytes_received = 0; - /* What about req_rdma_cnt ? */ - recvreq->req_rdma_idx = 0; - recvreq->req_pending = false; - recvreq->req_ack_sent = false; - - MCA_PML_BASE_RECV_START(&recvreq->req_recv.req_base); - - /* Note - sequence number already assigned */ - recvreq->req_recv.req_base.req_sequence = seq; - - proc = &bfo_comm->procs[recvreq->req_recv.req_base.req_peer]; - recvreq->req_recv.req_base.req_proc = proc->ompi_proc; - prepare_recv_req_converter(recvreq); - - /* we can't go through the match, since we already have the match. - Cheat and do what REQUEST_START does, but without the frag - search */ - hdr = (mca_pml_bfo_hdr_t*)frag->segments->seg_addr.pval; - switch(hdr->hdr_common.hdr_type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - mca_pml_bfo_recv_request_progress_match(recvreq, frag->btl, frag->segments, - frag->num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - mca_pml_bfo_recv_request_progress_rndv(recvreq, frag->btl, frag->segments, - frag->num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - mca_pml_bfo_recv_request_progress_rget(recvreq, frag->btl, frag->segments, - frag->num_segments); - break; - default: - assert(0); - } - MCA_PML_BFO_RECV_FRAG_RETURN(frag); - - ompi_message_return(*message); - *message = MPI_MESSAGE_NULL; - *request = (ompi_request_t *) recvreq; - - return OMPI_SUCCESS; -} - - -int -mca_pml_bfo_mrecv( void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - ompi_status_public_t* status ) -{ - mca_pml_bfo_recv_frag_t* frag; - mca_pml_bfo_recv_request_t *recvreq; - mca_pml_bfo_hdr_t *hdr; - int src, tag, rc; - ompi_communicator_t *comm; - mca_pml_bfo_comm_proc_t* proc; - mca_pml_bfo_comm_t* bfo_comm; - uint64_t seq; - - /* get the request from the message and the frag from the request - before we overwrite everything */ - comm = (*message)->comm; - recvreq = (mca_pml_bfo_recv_request_t*) (*message)->req_ptr; - frag = (mca_pml_bfo_recv_frag_t*) recvreq->req_recv.req_base.req_addr; - src = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE; - tag = recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG; - seq = recvreq->req_recv.req_base.req_sequence; - bfo_comm = recvreq->req_recv.req_base.req_comm->c_pml_comm; - - /* make the request a recv request again */ - /* The old request kept pointers to comm and the char datatype. - We're about to release those, but need to make sure comm - doesn't go out of scope (we don't care about the char datatype - anymore). So retain comm, then release the frag, then reinit - the frag (which will retain comm), then release comm (but the - frag still has it's ref, so it'll stay in scope). Make - sense? */ - OBJ_RETAIN(comm); - MCA_PML_BASE_RECV_REQUEST_FINI(&recvreq->req_recv); - recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV; - MCA_PML_BFO_RECV_REQUEST_INIT(recvreq, - buf, - count, datatype, - src, tag, comm, false); - OBJ_RELEASE(comm); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &((recvreq)->req_recv.req_base), - PERUSE_RECV); - - /* init/re-init the request */ - recvreq->req_lock = 0; - recvreq->req_pipeline_depth = 0; - recvreq->req_bytes_received = 0; - recvreq->req_rdma_cnt = 0; - recvreq->req_rdma_idx = 0; - recvreq->req_pending = false; - - MCA_PML_BASE_RECV_START(&recvreq->req_recv.req_base); - - /* Note - sequence number already assigned */ - recvreq->req_recv.req_base.req_sequence = seq; - - proc = &bfo_comm->procs[recvreq->req_recv.req_base.req_peer]; - recvreq->req_recv.req_base.req_proc = proc->ompi_proc; - prepare_recv_req_converter(recvreq); - - /* we can't go through the match, since we already have the match. - Cheat and do what REQUEST_START does, but without the frag - search */ - hdr = (mca_pml_bfo_hdr_t*)frag->segments->seg_addr.pval; - switch(hdr->hdr_common.hdr_type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - mca_pml_bfo_recv_request_progress_match(recvreq, frag->btl, frag->segments, - frag->num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - mca_pml_bfo_recv_request_progress_rndv(recvreq, frag->btl, frag->segments, - frag->num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - mca_pml_bfo_recv_request_progress_rget(recvreq, frag->btl, frag->segments, - frag->num_segments); - break; - default: - assert(0); - } - - ompi_message_return(*message); - *message = MPI_MESSAGE_NULL; - ompi_request_wait_completion(&(recvreq->req_recv.req_base.req_ompi)); - - MCA_PML_BFO_RECV_FRAG_RETURN(frag); - - if (NULL != status) { /* return status */ - *status = recvreq->req_recv.req_base.req_ompi.req_status; - } - rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR; - ompi_request_free( (ompi_request_t**)&recvreq ); - return rc; -} - diff --git a/ompi/mca/pml/bfo/pml_bfo_isend.c b/ompi/mca/pml/bfo/pml_bfo_isend.c deleted file mode 100644 index bd14fac91b6..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_isend.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 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 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "pml_bfo.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_recvreq.h" -#include "ompi/peruse/peruse-internal.h" - -int mca_pml_bfo_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) -{ - mca_pml_bfo_send_request_t *sendreq = NULL; - MCA_PML_BFO_SEND_REQUEST_ALLOC(comm, dst, sendreq); - if (NULL == sendreq) - return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_BFO_SEND_REQUEST_INIT(sendreq, - buf, - count, - datatype, - dst, tag, - comm, sendmode, true); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &(sendreq)->req_send.req_base, - PERUSE_SEND); - - *request = (ompi_request_t *) sendreq; - return OMPI_SUCCESS; -} - - -int mca_pml_bfo_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) -{ - int rc; - mca_pml_bfo_send_request_t *sendreq = NULL; - - MCA_PML_BFO_SEND_REQUEST_ALLOC(comm, dst, sendreq); - if (NULL == sendreq) - return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_BFO_SEND_REQUEST_INIT(sendreq, - buf, - count, - datatype, - dst, tag, - comm, sendmode, false); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &(sendreq)->req_send.req_base, - PERUSE_SEND); - - MCA_PML_BFO_SEND_REQUEST_START(sendreq, rc); - *request = (ompi_request_t *) sendreq; - return rc; -} - - -int mca_pml_bfo_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) -{ - int rc; - mca_pml_bfo_send_request_t *sendreq; - - MCA_PML_BFO_SEND_REQUEST_ALLOC(comm, dst, sendreq); - if (NULL == sendreq) - return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_BFO_SEND_REQUEST_INIT(sendreq, - buf, - count, - datatype, - dst, tag, - comm, sendmode, false); - - PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, - &(sendreq)->req_send.req_base, - PERUSE_SEND); - - MCA_PML_BFO_SEND_REQUEST_START(sendreq, rc); - if (rc != OMPI_SUCCESS) { - MCA_PML_BFO_SEND_REQUEST_RETURN( sendreq ); - return rc; - } - - ompi_request_wait_completion(&sendreq->req_send.req_base.req_ompi); - - rc = sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR; - ompi_request_free( (ompi_request_t**)&sendreq ); - return rc; -} diff --git a/ompi/mca/pml/bfo/pml_bfo_progress.c b/ompi/mca/pml/bfo/pml_bfo_progress.c deleted file mode 100644 index 07c92125d02..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_progress.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2008 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 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "pml_bfo.h" -#include "pml_bfo_sendreq.h" -#include "ompi/mca/bml/base/base.h" - -int mca_pml_bfo_progress(void) -{ - int i, queue_length = opal_list_get_size(&mca_pml_bfo.send_pending); - int j, completed_requests = 0; - bool send_succedded; - - if( OPAL_LIKELY(0 == queue_length) ) - return 0; - - for( i = 0; i < queue_length; i++ ) { - mca_pml_bfo_send_pending_t pending_type = MCA_PML_BFO_SEND_PENDING_NONE; - mca_pml_bfo_send_request_t* sendreq; - mca_bml_base_endpoint_t* endpoint; - - sendreq = get_request_from_send_pending(&pending_type); - if(OPAL_UNLIKELY(NULL == sendreq)) - break; - - switch(pending_type) { - case MCA_PML_BFO_SEND_PENDING_NONE: - assert(0); - return 0; - case MCA_PML_BFO_SEND_PENDING_SCHEDULE: - if( mca_pml_bfo_send_request_schedule_exclusive(sendreq) == - OMPI_ERR_OUT_OF_RESOURCE ) { - return 0; - } - completed_requests++; - break; - case MCA_PML_BFO_SEND_PENDING_START: - endpoint = sendreq->req_endpoint; - send_succedded = false; - for(j = 0; j < (int)mca_bml_base_btl_array_get_size(&endpoint->btl_eager); j++) { - mca_bml_base_btl_t* bml_btl; - int rc; - - /* select a btl */ - bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); - rc = mca_pml_bfo_send_request_start_btl(sendreq, bml_btl); - if( OPAL_LIKELY(OMPI_SUCCESS == rc) ) { - send_succedded = true; - completed_requests++; - break; - } - } - if( false == send_succedded ) { - add_request_to_send_pending(sendreq, MCA_PML_BFO_SEND_PENDING_START, true); - } - } - } - return completed_requests; -} - diff --git a/ompi/mca/pml/bfo/pml_bfo_rdma.c b/ompi/mca/pml/bfo/pml_bfo_rdma.c deleted file mode 100644 index bad66e8fd21..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_rdma.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - -#include "ompi_config.h" -#include "ompi/constants.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/bml/bml.h" -#include "opal/mca/mpool/mpool.h" -#include "pml_bfo.h" -#include "pml_bfo_rdma.h" - -/* Use this registration if no registration needed for a BTL instead of NULL. - * This will help other code to distinguish case when memory is not registered - * from case when registration is not needed */ -static mca_mpool_base_registration_t pml_bfo_dummy_reg; - -/* - * Check to see if memory is registered or can be registered. Build a - * set of registrations on the request. - */ - -size_t mca_pml_bfo_rdma_btls( - mca_bml_base_endpoint_t* bml_endpoint, - unsigned char* base, - size_t size, - mca_pml_bfo_com_btl_t* rdma_btls) -{ - int num_btls = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_rdma); - double weight_total = 0; - int num_btls_used = 0, n; - - /* shortcut when there are no rdma capable btls */ - if(num_btls == 0) { - return 0; - } - - /* check to see if memory is registered */ - for(n = 0; n < num_btls && num_btls_used < mca_pml_bfo.max_rdma_per_request; - n++) { - mca_bml_base_btl_t* bml_btl = - mca_bml_base_btl_array_get_index(&bml_endpoint->btl_rdma, - (bml_endpoint->btl_rdma_index + n) % num_btls); - mca_mpool_base_registration_t* reg = &pml_bfo_dummy_reg; - mca_mpool_base_module_t *btl_mpool = bml_btl->btl->btl_mpool; - - if( NULL != btl_mpool ) { - if(!mca_pml_bfo.leave_pinned) { - /* look through existing registrations */ - btl_mpool->mpool_find(btl_mpool, base, size, ®); - } else { - /* register the memory */ - btl_mpool->mpool_register(btl_mpool, base, size, 0, ®); - } - - if(NULL == reg) - continue; - } - - rdma_btls[num_btls_used].bml_btl = bml_btl; - rdma_btls[num_btls_used].btl_reg = reg; - weight_total += bml_btl->btl_weight; - num_btls_used++; - } - - /* if we don't use leave_pinned and all BTLs that already have this memory - * registered amount to less then half of available bandwidth - fall back to - * pipeline protocol */ - if(0 == num_btls_used || (!mca_pml_bfo.leave_pinned && weight_total < 0.5)) - return 0; - - mca_pml_bfo_calc_weighted_length(rdma_btls, num_btls_used, size, - weight_total); - - bml_endpoint->btl_rdma_index = (bml_endpoint->btl_rdma_index + 1) % num_btls; - return num_btls_used; -} - -size_t mca_pml_bfo_rdma_pipeline_btls( mca_bml_base_endpoint_t* bml_endpoint, - size_t size, - mca_pml_bfo_com_btl_t* rdma_btls ) -{ - int i, num_btls = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_rdma); - double weight_total = 0; - - for(i = 0; i < num_btls && i < mca_pml_bfo.max_rdma_per_request; i++) { - rdma_btls[i].bml_btl = - mca_bml_base_btl_array_get_next(&bml_endpoint->btl_rdma); - if(NULL != rdma_btls[i].bml_btl->btl->btl_mpool) - rdma_btls[i].btl_reg = NULL; - else - rdma_btls[i].btl_reg = &pml_bfo_dummy_reg; - - weight_total += rdma_btls[i].bml_btl->btl_weight; - } - - mca_pml_bfo_calc_weighted_length(rdma_btls, i, size, weight_total); - - return i; -} diff --git a/ompi/mca/pml/bfo/pml_bfo_rdma.h b/ompi/mca/pml/bfo/pml_bfo_rdma.h deleted file mode 100644 index 8572682d36a..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_rdma.h +++ /dev/null @@ -1,42 +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 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ - -#ifndef MCA_PML_BFO_RDMA_H -#define MCA_PML_BFO_RDMA_H - -struct mca_bml_base_endpoint_t; - -/* - * Of the set of available btls that support RDMA, - * find those that already have registrations - or - * register if required (for leave_pinned option) - */ -size_t mca_pml_bfo_rdma_btls(struct mca_bml_base_endpoint_t* endpoint, - unsigned char* base, size_t size, struct mca_pml_bfo_com_btl_t* btls); - -/* Choose RDMA BTLs to use for sending of a request by pipeline protocol. - * Calculate number of bytes to send through each BTL according to available - * bandwidth */ -size_t mca_pml_bfo_rdma_pipeline_btls(struct mca_bml_base_endpoint_t* endpoint, - size_t size, mca_pml_bfo_com_btl_t* rdma_btls); -#endif - diff --git a/ompi/mca/pml/bfo/pml_bfo_rdmafrag.c b/ompi/mca/pml/bfo/pml_bfo_rdmafrag.c deleted file mode 100644 index b99e30a8de5..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_rdmafrag.c +++ /dev/null @@ -1,30 +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 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "pml_bfo.h" -#include "pml_bfo_rdmafrag.h" - - -OBJ_CLASS_INSTANCE( - mca_pml_bfo_rdma_frag_t, - ompi_free_list_item_t, - NULL, - NULL); diff --git a/ompi/mca/pml/bfo/pml_bfo_rdmafrag.h b/ompi/mca/pml/bfo/pml_bfo_rdmafrag.h deleted file mode 100644 index 832597a5a23..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_rdmafrag.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 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 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ - -#ifndef MCA_PML_BFO_RDMAFRAG_H -#define MCA_PML_BFO_RDMAFRAG_H - -#include "pml_bfo_hdr.h" - -BEGIN_C_DECLS - -typedef enum { - MCA_PML_BFO_RDMA_PUT, - MCA_PML_BFO_RDMA_GET -} mca_pml_bfo_rdma_state_t; - -struct mca_pml_bfo_rdma_frag_t { - ompi_free_list_item_t super; - mca_bml_base_btl_t* rdma_bml; -#if PML_BFO - mca_btl_base_module_t* rdma_btl; -#endif /* PML_BFO */ - mca_pml_bfo_hdr_t rdma_hdr; - mca_pml_bfo_rdma_state_t rdma_state; - size_t rdma_length; - uint8_t rdma_segs[MCA_BTL_SEG_MAX_SIZE * MCA_BTL_DES_MAX_SEGMENTS]; - void *rdma_req; - struct mca_bml_base_endpoint_t* rdma_ep; - opal_convertor_t convertor; - mca_mpool_base_registration_t* reg; - uint32_t retries; -}; -typedef struct mca_pml_bfo_rdma_frag_t mca_pml_bfo_rdma_frag_t; - -OBJ_CLASS_DECLARATION(mca_pml_bfo_rdma_frag_t); - - -#define MCA_PML_BFO_RDMA_FRAG_ALLOC(frag) \ -do { \ - ompi_free_list_item_t* item; \ - OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.rdma_frags, item); \ - frag = (mca_pml_bfo_rdma_frag_t*)item; \ -} while(0) - -#define MCA_PML_BFO_RDMA_FRAG_RETURN(frag) \ -do { \ - /* return fragment */ \ - OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.rdma_frags, \ - (ompi_free_list_item_t*)frag); \ -} while(0) - - -END_C_DECLS - -#endif - diff --git a/ompi/mca/pml/bfo/pml_bfo_recvfrag.c b/ompi/mca/pml/bfo/pml_bfo_recvfrag.c deleted file mode 100644 index 6ef8f4f58d1..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_recvfrag.c +++ /dev/null @@ -1,743 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2007 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2006-2008 University of Houston. All rights reserved. - * Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - */ - -#include "ompi_config.h" - -#include "opal/class/opal_list.h" -#include "opal/threads/mutex.h" -#include "opal/prefetch.h" - -#include "ompi/constants.h" -#include "ompi/communicator/communicator.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/peruse/peruse-internal.h" -#include "ompi/memchecker.h" - -#include "pml_bfo.h" -#include "pml_bfo_comm.h" -#include "pml_bfo_recvfrag.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_hdr.h" -#if PML_BFO -#include "pml_bfo_failover.h" -#endif /* PML_BFO */ - -OBJ_CLASS_INSTANCE( mca_pml_bfo_buffer_t, - ompi_free_list_item_t, - NULL, - NULL ); - -OBJ_CLASS_INSTANCE( mca_pml_bfo_recv_frag_t, - opal_list_item_t, - NULL, - NULL ); - -/** - * Static functions. - */ - -/** - * Append a unexpected descriptor to a queue. This function will allocate and - * initialize the fragment (if necessary) and then will add it to the specified - * queue. The allocated fragment is not returned to the caller. - */ -static void -append_frag_to_list(opal_list_t *queue, mca_btl_base_module_t *btl, - mca_pml_bfo_match_hdr_t *hdr, mca_btl_base_segment_t* segments, - size_t num_segments, mca_pml_bfo_recv_frag_t* frag) -{ - if(NULL == frag) { - MCA_PML_BFO_RECV_FRAG_ALLOC(frag); - MCA_PML_BFO_RECV_FRAG_INIT(frag, hdr, segments, num_segments, btl); - } - opal_list_append(queue, (opal_list_item_t*)frag); -} - -/** - * Match incoming recv_frags against posted receives. - * Supports out of order delivery. - * - * @param frag_header (IN) Header of received recv_frag. - * @param frag_desc (IN) Received recv_frag descriptor. - * @param match_made (OUT) Flag indicating wether a match was made. - * @param additional_matches (OUT) List of additional matches - * @return OMPI_SUCCESS or error status on failure. - */ -static int mca_pml_bfo_recv_frag_match( mca_btl_base_module_t *btl, - mca_pml_bfo_match_hdr_t *hdr, - mca_btl_base_segment_t* segments, - size_t num_segments, - int type); - -static mca_pml_bfo_recv_request_t* -match_one(mca_btl_base_module_t *btl, - mca_pml_bfo_match_hdr_t *hdr, mca_btl_base_segment_t* segments, - size_t num_segments, ompi_communicator_t *comm_ptr, - mca_pml_bfo_comm_proc_t *proc, - mca_pml_bfo_recv_frag_t* frag); - -void mca_pml_bfo_recv_frag_callback_match(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) -{ - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_match_hdr_t* hdr = (mca_pml_bfo_match_hdr_t*)segments->seg_addr.pval; - ompi_communicator_t *comm_ptr; - mca_pml_bfo_recv_request_t *match = NULL; - mca_pml_bfo_comm_t *comm; - mca_pml_bfo_comm_proc_t *proc; - size_t num_segments = des->des_local_count; - size_t bytes_received = 0; - - assert(num_segments <= MCA_BTL_DES_MAX_SEGMENTS); - - if( OPAL_UNLIKELY(segments->seg_len < OMPI_PML_BFO_MATCH_HDR_LEN) ) { - return; - } - bfo_hdr_ntoh(((mca_pml_bfo_hdr_t*) hdr), MCA_PML_BFO_HDR_TYPE_MATCH); - - /* communicator pointer */ - comm_ptr = ompi_comm_lookup(hdr->hdr_ctx); - if(OPAL_UNLIKELY(NULL == comm_ptr)) { - /* This is a special case. A message for a not yet existing - * communicator can happens. Instead of doing a matching we - * will temporarily add it the a pending queue in the PML. - * Later on, when the communicator is completely instantiated, - * this pending queue will be searched and all matching fragments - * moved to the right communicator. - */ - append_frag_to_list( &mca_pml_bfo.non_existing_communicator_pending, - btl, hdr, segments, num_segments, NULL ); - return; - } - comm = (mca_pml_bfo_comm_t *)comm_ptr->c_pml_comm; - - /* source sequence number */ - proc = &comm->procs[hdr->hdr_src]; - - /* We generate the MSG_ARRIVED event as soon as the PML is aware - * of a matching fragment arrival. Independing if it is received - * on the correct order or not. This will allow the tools to - * figure out if the messages are not received in the correct - * order (if multiple network interfaces). - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_ARRIVED, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - /* get next expected message sequence number - if threaded - * run, lock to make sure that if another thread is processing - * a frag from the same message a match is made only once. - * Also, this prevents other posted receives (for a pair of - * end points) from being processed, and potentially "loosing" - * the fragment. - */ - OPAL_THREAD_LOCK(&comm->matching_lock); - - /* get sequence number of next message that can be processed */ - if(OPAL_UNLIKELY((((uint16_t) hdr->hdr_seq) != ((uint16_t) proc->expected_sequence)) || - (opal_list_get_size(&proc->frags_cant_match) > 0 ))) { - goto slow_path; - } - - /* This is the sequence number we were expecting, so we can try - * matching it to already posted receives. - */ - - /* We're now expecting the next sequence number. */ - proc->expected_sequence++; - - /* We generate the SEARCH_POSTED_QUEUE only when the message is - * received in the correct sequence. Otherwise, we delay the event - * generation until we reach the correct sequence number. - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_BEGIN, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - match = match_one(btl, hdr, segments, num_segments, comm_ptr, proc, NULL); - - /* The match is over. We generate the SEARCH_POSTED_Q_END here, - * before going into the mca_pml_bfo_check_cantmatch_for_match so - * we can make a difference for the searching time for all - * messages. - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_END, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - /* release matching lock before processing fragment */ - OPAL_THREAD_UNLOCK(&comm->matching_lock); - - if(OPAL_LIKELY(match)) { - bytes_received = segments->seg_len - OMPI_PML_BFO_MATCH_HDR_LEN; - match->req_recv.req_bytes_packed = bytes_received; - - MCA_PML_BFO_RECV_REQUEST_MATCHED(match, hdr); - if(match->req_bytes_expected > 0) { - struct iovec iov[MCA_BTL_DES_MAX_SEGMENTS]; - uint32_t iov_count = 1; - - /* - * Make user buffer accessable(defined) before unpacking. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - match->req_recv.req_base.req_addr, - match->req_recv.req_base.req_count, - match->req_recv.req_base.req_datatype); - ); - - iov[0].iov_len = bytes_received; - iov[0].iov_base = (IOVBASE_TYPE*)((unsigned char*)segments->seg_addr.pval + - OMPI_PML_BFO_MATCH_HDR_LEN); - while (iov_count < num_segments) { - bytes_received += segments[iov_count].seg_len; - iov[iov_count].iov_len = segments[iov_count].seg_len; - iov[iov_count].iov_base = (IOVBASE_TYPE*)((unsigned char*)segments[iov_count].seg_addr.pval); - iov_count++; - } - opal_convertor_unpack( &match->req_recv.req_base.req_convertor, - iov, - &iov_count, - &bytes_received ); - match->req_bytes_received = bytes_received; - /* - * Unpacking finished, make the user buffer unaccessable again. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - match->req_recv.req_base.req_addr, - match->req_recv.req_base.req_count, - match->req_recv.req_base.req_datatype); - ); - } - - /* no need to check if complete we know we are.. */ - /* don't need a rmb as that is for checking */ - recv_request_pml_complete(match); - } - return; - - slow_path: - OPAL_THREAD_UNLOCK(&comm->matching_lock); -#if PML_BFO - if (true == mca_pml_bfo_is_duplicate_msg(proc, hdr)) { - return; - } -#endif /* PML_BFO */ - mca_pml_bfo_recv_frag_match(btl, hdr, segments, - num_segments, MCA_PML_BFO_HDR_TYPE_MATCH); -} - - -void mca_pml_bfo_recv_frag_callback_rndv(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) -{ - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - - if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_bfo_common_hdr_t)) ) { - return; - } - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_RNDV); - mca_pml_bfo_recv_frag_match(btl, &hdr->hdr_match, segments, - des->des_local_count, MCA_PML_BFO_HDR_TYPE_RNDV); - return; -} - -void mca_pml_bfo_recv_frag_callback_rget(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) -{ - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - - if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_bfo_common_hdr_t)) ) { - return; - } - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_RGET); - mca_pml_bfo_recv_frag_match(btl, &hdr->hdr_match, segments, - des->des_local_count, MCA_PML_BFO_HDR_TYPE_RGET); - return; -} - - - -void mca_pml_bfo_recv_frag_callback_ack(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) -{ - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_send_request_t* sendreq; - - if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_bfo_common_hdr_t)) ) { - return; - } - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_ACK); - sendreq = (mca_pml_bfo_send_request_t*)hdr->hdr_ack.hdr_src_req.pval; - sendreq->req_recv = hdr->hdr_ack.hdr_dst_req; -#if PML_BFO - MCA_PML_BFO_ERROR_CHECK_ON_ACK_CALLBACK(sendreq); -#endif /* PML_BFO */ - - /* if the request should be delivered entirely by copy in/out - * then throttle sends */ - if(hdr->hdr_common.hdr_flags & MCA_PML_BFO_HDR_FLAGS_NORDMA) - sendreq->req_throttle_sends = true; - - mca_pml_bfo_send_request_copy_in_out(sendreq, - hdr->hdr_ack.hdr_send_offset, - sendreq->req_send.req_bytes_packed - - hdr->hdr_ack.hdr_send_offset); - - if (sendreq->req_state != 0) { - /* Typical receipt of an ACK message causes req_state to be - * decremented. However, a send request that started as an - * RGET request can become a RNDV. For example, when the - * receiver determines that its receive buffer is not - * contiguous and therefore cannot support the RGET - * protocol. A send request that started with the RGET - * protocol has req_state == 0 and as such should not be - * decremented. - */ - OPAL_THREAD_ADD32(&sendreq->req_state, -1); - } - - if(send_request_pml_complete_check(sendreq) == false) - mca_pml_bfo_send_request_schedule(sendreq); - - return; -} - -void mca_pml_bfo_recv_frag_callback_frag(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_recv_request_t* recvreq; - - if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_bfo_common_hdr_t)) ) { - return; - } - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_FRAG); - recvreq = (mca_pml_bfo_recv_request_t*)hdr->hdr_frag.hdr_dst_req.pval; -#if PML_BFO - MCA_PML_BFO_ERROR_CHECK_ON_FRAG_CALLBACK(recvreq); -#endif /* PML_BFO */ - mca_pml_bfo_recv_request_progress_frag(recvreq,btl,segments,des->des_local_count); - - return; -} - - -void mca_pml_bfo_recv_frag_callback_put(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_pml_bfo_send_request_t* sendreq; - - if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_bfo_common_hdr_t)) ) { - return; - } - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_PUT); - sendreq = (mca_pml_bfo_send_request_t*)hdr->hdr_rdma.hdr_req.pval; -#if PML_BFO - MCA_PML_BFO_ERROR_CHECK_ON_PUT_CALLBACK(sendreq); -#endif /* PML_BFO */ - mca_pml_bfo_send_request_put(sendreq,btl,&hdr->hdr_rdma); - - return; -} - - -void mca_pml_bfo_recv_frag_callback_fin(mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* des, - void* cbdata ) { - mca_btl_base_segment_t* segments = des->des_local; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - mca_btl_base_descriptor_t* rdma; - - if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_bfo_common_hdr_t)) ) { - return; - } - - bfo_hdr_ntoh(hdr, MCA_PML_BFO_HDR_TYPE_FIN); - rdma = (mca_btl_base_descriptor_t*)hdr->hdr_fin.hdr_des.pval; -#if PML_BFO - if (true == mca_pml_bfo_is_duplicate_fin(hdr, rdma, btl)) { - return; - } -#endif /* PML_BFO */ - rdma->des_cbfunc(btl, NULL, rdma, - hdr->hdr_fin.hdr_fail ? OMPI_ERROR : OMPI_SUCCESS); - - return; -} - - - -#define PML_MAX_SEQ ~((mca_pml_sequence_t)0); - -static inline mca_pml_bfo_recv_request_t* get_posted_recv(opal_list_t *queue) -{ - if(opal_list_get_size(queue) == 0) - return NULL; - - return (mca_pml_bfo_recv_request_t*)opal_list_get_first(queue); -} - -static inline mca_pml_bfo_recv_request_t* get_next_posted_recv( - opal_list_t *queue, - mca_pml_bfo_recv_request_t* req) -{ - opal_list_item_t *i = opal_list_get_next((opal_list_item_t*)req); - - if(opal_list_get_end(queue) == i) - return NULL; - - return (mca_pml_bfo_recv_request_t*)i; -} - -static mca_pml_bfo_recv_request_t *match_incomming( - mca_pml_bfo_match_hdr_t *hdr, mca_pml_bfo_comm_t *comm, - mca_pml_bfo_comm_proc_t *proc) -{ - mca_pml_bfo_recv_request_t *specific_recv, *wild_recv; - mca_pml_sequence_t wild_recv_seq, specific_recv_seq; - int tag = hdr->hdr_tag; - - specific_recv = get_posted_recv(&proc->specific_receives); - wild_recv = get_posted_recv(&comm->wild_receives); - - wild_recv_seq = wild_recv ? - wild_recv->req_recv.req_base.req_sequence : PML_MAX_SEQ; - specific_recv_seq = specific_recv ? - specific_recv->req_recv.req_base.req_sequence : PML_MAX_SEQ; - - /* they are equal only if both are PML_MAX_SEQ */ - while(wild_recv_seq != specific_recv_seq) { - mca_pml_bfo_recv_request_t **match; - opal_list_t *queue; - int req_tag; - mca_pml_sequence_t *seq; - - if (OPAL_UNLIKELY(wild_recv_seq < specific_recv_seq)) { - match = &wild_recv; - queue = &comm->wild_receives; - seq = &wild_recv_seq; - } else { - match = &specific_recv; - queue = &proc->specific_receives; - seq = &specific_recv_seq; - } - - req_tag = (*match)->req_recv.req_base.req_tag; - if(req_tag == tag || (req_tag == OMPI_ANY_TAG && tag >= 0)) { - opal_list_remove_item(queue, (opal_list_item_t*)(*match)); - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_REQ_REMOVE_FROM_POSTED_Q, - &((*match)->req_recv.req_base), PERUSE_RECV); - return *match; - } - - *match = get_next_posted_recv(queue, *match); - *seq = (*match) ? (*match)->req_recv.req_base.req_sequence : PML_MAX_SEQ; - } - - return NULL; -} - -static mca_pml_bfo_recv_request_t* -match_one(mca_btl_base_module_t *btl, - mca_pml_bfo_match_hdr_t *hdr, mca_btl_base_segment_t* segments, - size_t num_segments, ompi_communicator_t *comm_ptr, - mca_pml_bfo_comm_proc_t *proc, - mca_pml_bfo_recv_frag_t* frag) -{ - mca_pml_bfo_recv_request_t *match; - mca_pml_bfo_comm_t *comm = (mca_pml_bfo_comm_t *)comm_ptr->c_pml_comm; - - do { - match = match_incomming(hdr, comm, proc); - - /* if match found, process data */ - if(OPAL_LIKELY(NULL != match)) { - match->req_recv.req_base.req_proc = proc->ompi_proc; - - if(OPAL_UNLIKELY(MCA_PML_REQUEST_PROBE == match->req_recv.req_base.req_type)) { - /* complete the probe */ - mca_pml_bfo_recv_request_matched_probe(match, btl, segments, - num_segments); - /* attempt to match actual request */ - continue; - } else if (MCA_PML_REQUEST_MPROBE == match->req_recv.req_base.req_type) { - /* create a receive frag and associate it with the - request, which is then completed so that it can be - restarted later during mrecv */ - mca_pml_bfo_recv_frag_t *tmp; - if(NULL == frag) { - MCA_PML_BFO_RECV_FRAG_ALLOC(tmp); - MCA_PML_BFO_RECV_FRAG_INIT(tmp, hdr, segments, num_segments, btl); - } else { - tmp = frag; - } - - match->req_recv.req_base.req_addr = tmp; - mca_pml_bfo_recv_request_matched_probe(match, btl, segments, - num_segments); - /* this frag is already processed, so we want to break out - of the loop and not end up back on the unexpected queue. */ - return NULL; - } - - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_MSG_MATCH_POSTED_REQ, - &(match->req_recv.req_base), PERUSE_RECV); - return match; - } - - /* if no match found, place on unexpected queue */ - append_frag_to_list(&proc->unexpected_frags, btl, hdr, segments, - num_segments, frag); - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_INSERT_IN_UNEX_Q, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - return NULL; - } while(true); -} - -static mca_pml_bfo_recv_frag_t* check_cantmatch_for_match(mca_pml_bfo_comm_proc_t *proc) -{ - mca_pml_bfo_recv_frag_t *frag; - - /* search the list for a fragment from the send with sequence - * number next_msg_seq_expected - */ - for(frag = (mca_pml_bfo_recv_frag_t*)opal_list_get_first(&proc->frags_cant_match); - frag != (mca_pml_bfo_recv_frag_t*)opal_list_get_end(&proc->frags_cant_match); - frag = (mca_pml_bfo_recv_frag_t*)opal_list_get_next(frag)) - { - mca_pml_bfo_match_hdr_t* hdr = &frag->hdr.hdr_match; - /* - * If the message has the next expected seq from that proc... - */ - if(hdr->hdr_seq != proc->expected_sequence) - continue; - - opal_list_remove_item(&proc->frags_cant_match, (opal_list_item_t*)frag); - return frag; - } - - return NULL; -} - -/** - * RCS/CTS receive side matching - * - * @param hdr list of parameters needed for matching - * This list is also embeded in frag, - * but this allows to save a memory copy when - * a match is made in this routine. (IN) - * @param frag pointer to receive fragment which we want - * to match (IN/OUT). If a match is not made, - * hdr is copied to frag. - * @param match_made parameter indicating if we matched frag/ - * hdr (OUT) - * @param additional_matches if a match is made with frag, we - * may be able to match fragments that previously - * have arrived out-of-order. If this is the - * case, the associated fragment descriptors are - * put on this list for further processing. (OUT) - * - * @return OMPI error code - * - * This routine is used to try and match a newly arrived message fragment - * to pre-posted receives. The following assumptions are made - * - fragments are received out of order - * - for long messages, e.g. more than one fragment, a RTS/CTS algorithm - * is used. - * - 2nd and greater fragments include a receive descriptor pointer - * - fragments may be dropped - * - fragments may be corrupt - * - this routine may be called simultaneously by more than one thread - */ -static int mca_pml_bfo_recv_frag_match( mca_btl_base_module_t *btl, - mca_pml_bfo_match_hdr_t *hdr, - mca_btl_base_segment_t* segments, - size_t num_segments, - int type) -{ - /* local variables */ - uint16_t next_msg_seq_expected, frag_msg_seq; - ompi_communicator_t *comm_ptr; - mca_pml_bfo_recv_request_t *match = NULL; - mca_pml_bfo_comm_t *comm; - mca_pml_bfo_comm_proc_t *proc; - mca_pml_bfo_recv_frag_t* frag = NULL; - - /* communicator pointer */ - comm_ptr = ompi_comm_lookup(hdr->hdr_ctx); - if(OPAL_UNLIKELY(NULL == comm_ptr)) { - /* This is a special case. A message for a not yet existing - * communicator can happens. Instead of doing a matching we - * will temporarily add it the a pending queue in the PML. - * Later on, when the communicator is completely instantiated, - * this pending queue will be searched and all matching fragments - * moved to the right communicator. - */ - append_frag_to_list( &mca_pml_bfo.non_existing_communicator_pending, - btl, hdr, segments, num_segments, NULL ); - return OMPI_SUCCESS; - } - comm = (mca_pml_bfo_comm_t *)comm_ptr->c_pml_comm; - - /* source sequence number */ - frag_msg_seq = hdr->hdr_seq; - proc = &comm->procs[hdr->hdr_src]; - - /** - * We generate the MSG_ARRIVED event as soon as the PML is aware of a matching - * fragment arrival. Independing if it is received on the correct order or not. - * This will allow the tools to figure out if the messages are not received in the - * correct order (if multiple network interfaces). - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_ARRIVED, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - /* get next expected message sequence number - if threaded - * run, lock to make sure that if another thread is processing - * a frag from the same message a match is made only once. - * Also, this prevents other posted receives (for a pair of - * end points) from being processed, and potentially "loosing" - * the fragment. - */ - OPAL_THREAD_LOCK(&comm->matching_lock); - -#if PML_BFO - if(OPAL_UNLIKELY(hdr->hdr_common.hdr_flags & MCA_PML_BFO_HDR_FLAGS_RESTART)) { - if (NULL == (match = mca_pml_bfo_get_request(hdr))) { - return OMPI_SUCCESS; - } - } else { -#endif /* PML_BFO */ - /* get sequence number of next message that can be processed */ - next_msg_seq_expected = (uint16_t)proc->expected_sequence; - if(OPAL_UNLIKELY(frag_msg_seq != next_msg_seq_expected)) - goto wrong_seq; - - /* - * This is the sequence number we were expecting, - * so we can try matching it to already posted - * receives. - */ - -out_of_order_match: - /* We're now expecting the next sequence number. */ - proc->expected_sequence++; - - /** - * We generate the SEARCH_POSTED_QUEUE only when the message is received - * in the correct sequence. Otherwise, we delay the event generation until - * we reach the correct sequence number. - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_BEGIN, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - match = match_one(btl, hdr, segments, num_segments, comm_ptr, proc, frag); - - /** - * The match is over. We generate the SEARCH_POSTED_Q_END here, before going - * into the mca_pml_bfo_check_cantmatch_for_match so we can make a difference - * for the searching time for all messages. - */ - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_END, comm_ptr, - hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - - /* release matching lock before processing fragment */ - OPAL_THREAD_UNLOCK(&comm->matching_lock); - -#if PML_BFO - } -#endif /* PML_BFO */ - if(OPAL_LIKELY(match)) { - switch(type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - mca_pml_bfo_recv_request_progress_match(match, btl, segments, num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - mca_pml_bfo_recv_request_progress_rndv(match, btl, segments, num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - mca_pml_bfo_recv_request_progress_rget(match, btl, segments, num_segments); - break; - } - - if(OPAL_UNLIKELY(frag)) - MCA_PML_BFO_RECV_FRAG_RETURN(frag); - } - - /* - * Now that new message has arrived, check to see if - * any fragments on the c_c_frags_cant_match list - * may now be used to form new matchs - */ - if(OPAL_UNLIKELY(opal_list_get_size(&proc->frags_cant_match) > 0)) { - OPAL_THREAD_LOCK(&comm->matching_lock); - if((frag = check_cantmatch_for_match(proc))) { - hdr = &frag->hdr.hdr_match; - segments = frag->segments; - num_segments = frag->num_segments; - btl = frag->btl; - type = hdr->hdr_common.hdr_type; - goto out_of_order_match; - } - OPAL_THREAD_UNLOCK(&comm->matching_lock); - } - - return OMPI_SUCCESS; -wrong_seq: - /* - * This message comes after the next expected, so it - * is ahead of sequence. Save it for later. - */ -#if PML_BFO - if (true == mca_pml_bfo_is_duplicate_msg(proc, hdr)) { - return OMPI_SUCCESS; - } -#endif /* PML_BFO */ - append_frag_to_list(&proc->frags_cant_match, btl, hdr, segments, - num_segments, NULL); - OPAL_THREAD_UNLOCK(&comm->matching_lock); - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/pml/bfo/pml_bfo_recvfrag.h b/ompi/mca/pml/bfo/pml_bfo_recvfrag.h deleted file mode 100644 index 3c975cb810b..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_recvfrag.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ - -#ifndef MCA_PML_BFO_RECVFRAG_H -#define MCA_PML_BFO_RECVFRAG_H - -#include "pml_bfo_hdr.h" - -BEGIN_C_DECLS - -struct mca_pml_bfo_buffer_t { - size_t len; - void * addr; -}; -typedef struct mca_pml_bfo_buffer_t mca_pml_bfo_buffer_t; - - -struct mca_pml_bfo_recv_frag_t { - ompi_free_list_item_t super; - mca_pml_bfo_hdr_t hdr; - size_t num_segments; - mca_btl_base_module_t* btl; - mca_btl_base_segment_t segments[MCA_BTL_DES_MAX_SEGMENTS]; - mca_pml_bfo_buffer_t buffers[MCA_BTL_DES_MAX_SEGMENTS]; - unsigned char addr[1]; -}; -typedef struct mca_pml_bfo_recv_frag_t mca_pml_bfo_recv_frag_t; - -OBJ_CLASS_DECLARATION(mca_pml_bfo_recv_frag_t); - - -#define MCA_PML_BFO_RECV_FRAG_ALLOC(frag) \ -do { \ - ompi_free_list_item_t* item; \ - OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.recv_frags, item); \ - frag = (mca_pml_bfo_recv_frag_t*)item; \ -} while(0) - - -#define MCA_PML_BFO_RECV_FRAG_INIT(frag, hdr, segs, cnt, btl ) \ -do { \ - size_t i, _size; \ - mca_btl_base_segment_t* macro_segments = frag->segments; \ - mca_pml_bfo_buffer_t* buffers = frag->buffers; \ - unsigned char* _ptr = (unsigned char*)frag->addr; \ - /* init recv_frag */ \ - frag->btl = btl; \ - frag->hdr = *(mca_pml_bfo_hdr_t*)hdr; \ - frag->num_segments = 1; \ - _size = segs[0].seg_len; \ - for( i = 1; i < cnt; i++ ) { \ - _size += segs[i].seg_len; \ - } \ - /* copy over data */ \ - if(_size <= mca_pml_bfo.unexpected_limit ) { \ - macro_segments[0].seg_addr.pval = frag->addr; \ - } else { \ - buffers[0].len = _size; \ - buffers[0].addr = (char*) \ - mca_pml_bfo.allocator->alc_alloc( mca_pml_bfo.allocator, \ - buffers[0].len, \ - 0, NULL); \ - _ptr = (unsigned char*)(buffers[0].addr); \ - macro_segments[0].seg_addr.pval = buffers[0].addr; \ - } \ - macro_segments[0].seg_len = _size; \ - for( i = 0; i < cnt; i++ ) { \ - memcpy( _ptr, segs[i].seg_addr.pval, segs[i].seg_len); \ - _ptr += segs[i].seg_len; \ - } \ - } while(0) - - -#define MCA_PML_BFO_RECV_FRAG_RETURN(frag) \ -do { \ - if( frag->segments[0].seg_len > mca_pml_bfo.unexpected_limit ) { \ - /* return buffers */ \ - mca_pml_bfo.allocator->alc_free( mca_pml_bfo.allocator, \ - frag->buffers[0].addr ); \ - } \ - frag->num_segments = 0; \ - \ - /* return recv_frag */ \ - OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.recv_frags, \ - (ompi_free_list_item_t*)frag); \ - } while(0) - - -/** - * Callback from BTL on receipt of a recv_frag (match). - */ - -extern void mca_pml_bfo_recv_frag_callback_match( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -/** - * Callback from BTL on receipt of a recv_frag (rndv). - */ - -extern void mca_pml_bfo_recv_frag_callback_rndv( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); -/** - * Callback from BTL on receipt of a recv_frag (rget). - */ - -extern void mca_pml_bfo_recv_frag_callback_rget( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - -/** - * Callback from BTL on receipt of a recv_frag (ack). - */ - -extern void mca_pml_bfo_recv_frag_callback_ack( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); -/** - * Callback from BTL on receipt of a recv_frag (frag). - */ - -extern void mca_pml_bfo_recv_frag_callback_frag( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); -/** - * Callback from BTL on receipt of a recv_frag (put). - */ - -extern void mca_pml_bfo_recv_frag_callback_put( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); -/** - * Callback from BTL on receipt of a recv_frag (fin). - */ - -extern void mca_pml_bfo_recv_frag_callback_fin( mca_btl_base_module_t *btl, - mca_btl_base_tag_t tag, - mca_btl_base_descriptor_t* descriptor, - void* cbdata ); - - -END_C_DECLS - -#endif - diff --git a/ompi/mca/pml/bfo/pml_bfo_recvreq.c b/ompi/mca/pml/bfo/pml_bfo_recvreq.c deleted file mode 100644 index bce99353a2d..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_recvreq.c +++ /dev/null @@ -1,1163 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2008 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "opal/util/arch.h" -#include "opal/mca/btl/btl.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/bml/bml.h" -#include "pml_bfo_comm.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_recvfrag.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_rdmafrag.h" -#include "ompi/mca/bml/base/base.h" -#include "ompi/memchecker.h" - -#if OPAL_CUDA_SUPPORT -int mca_pml_bfo_cuda_need_buffers(mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_module_t* btl); -#endif /* OPAL_CUDA_SUPPORT */ -#if PML_BFO -#include "pml_bfo_failover.h" -#endif /* PML_BFO */ - -void mca_pml_bfo_recv_request_process_pending(void) -{ - mca_pml_bfo_recv_request_t* recvreq; - int rc, i, s = (int)opal_list_get_size(&mca_pml_bfo.recv_pending); - - for(i = 0; i < s; i++) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - recvreq = (mca_pml_bfo_recv_request_t*) - opal_list_remove_first(&mca_pml_bfo.recv_pending); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - if( OPAL_UNLIKELY(NULL == recvreq) ) - break; - recvreq->req_pending = false; - rc = mca_pml_bfo_recv_request_schedule_exclusive(recvreq, NULL); - if(OMPI_ERR_OUT_OF_RESOURCE == rc) - break; - } -} - -static int mca_pml_bfo_recv_request_free(struct ompi_request_t** request) -{ - mca_pml_bfo_recv_request_t* recvreq = *(mca_pml_bfo_recv_request_t**)request; - - assert( false == recvreq->req_recv.req_base.req_free_called ); - - OPAL_THREAD_LOCK(&ompi_request_lock); - recvreq->req_recv.req_base.req_free_called = true; - - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_NOTIFY, - &(recvreq->req_recv.req_base), PERUSE_RECV ); - - if( true == recvreq->req_recv.req_base.req_pml_complete ) { - /* make buffer defined when the request is compeleted, - and before releasing the objects. */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - - MCA_PML_BFO_RECV_REQUEST_RETURN( recvreq ); - } - - OPAL_THREAD_UNLOCK(&ompi_request_lock); - *request = MPI_REQUEST_NULL; - return OMPI_SUCCESS; -} - -static int mca_pml_bfo_recv_request_cancel(struct ompi_request_t* ompi_request, int complete) -{ - mca_pml_bfo_recv_request_t* request = (mca_pml_bfo_recv_request_t*)ompi_request; - mca_pml_bfo_comm_t* comm = request->req_recv.req_base.req_comm->c_pml_comm; - - if( true == ompi_request->req_complete ) { /* way to late to cancel this one */ - /* - * Receive request completed, make user buffer accessable. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - request->req_recv.req_base.req_addr, - request->req_recv.req_base.req_count, - request->req_recv.req_base.req_datatype); - ); - return OMPI_SUCCESS; - } - - /* The rest should be protected behind the match logic lock */ - OPAL_THREAD_LOCK(&comm->matching_lock); - if( OMPI_ANY_TAG == ompi_request->req_status.MPI_TAG ) { /* the match has not been already done */ - if( request->req_recv.req_base.req_peer == OMPI_ANY_SOURCE ) { - opal_list_remove_item( &comm->wild_receives, (opal_list_item_t*)request ); - } else { - mca_pml_bfo_comm_proc_t* proc = comm->procs + request->req_recv.req_base.req_peer; - opal_list_remove_item(&proc->specific_receives, (opal_list_item_t*)request); - } - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_REMOVE_FROM_POSTED_Q, - &(request->req_recv.req_base), PERUSE_RECV ); - /** - * As now the PML is done with this request we have to force the pml_complete - * to true. Otherwise, the request will never be freed. - */ - request->req_recv.req_base.req_pml_complete = true; - } - OPAL_THREAD_UNLOCK(&comm->matching_lock); - - OPAL_THREAD_LOCK(&ompi_request_lock); - ompi_request->req_status._cancelled = true; - /* This macro will set the req_complete to true so the MPI Test/Wait* functions - * on this request will be able to complete. As the status is marked as - * cancelled the cancel state will be detected. - */ - MCA_PML_BFO_RECV_REQUEST_MPI_COMPLETE(request); - OPAL_THREAD_UNLOCK(&ompi_request_lock); - /* - * Receive request cancelled, make user buffer accessable. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - request->req_recv.req_base.req_addr, - request->req_recv.req_base.req_count, - request->req_recv.req_base.req_datatype); - ); - return OMPI_SUCCESS; -} - -static void mca_pml_bfo_recv_request_construct(mca_pml_bfo_recv_request_t* request) -{ - request->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV; - request->req_recv.req_base.req_ompi.req_free = mca_pml_bfo_recv_request_free; - request->req_recv.req_base.req_ompi.req_cancel = mca_pml_bfo_recv_request_cancel; - request->req_rdma_cnt = 0; - OBJ_CONSTRUCT(&request->lock, opal_mutex_t); -} - -OBJ_CLASS_INSTANCE( - mca_pml_bfo_recv_request_t, - mca_pml_base_recv_request_t, - mca_pml_bfo_recv_request_construct, - NULL); - - -/* - * Release resources. - */ - -static void mca_pml_bfo_recv_ctl_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*)des->des_context; - -#if PML_BFO - if (btl->btl_flags & MCA_BTL_FLAGS_FAILOVER_SUPPORT) { - mca_pml_bfo_check_recv_ctl_completion_status(btl, des, status); - } - MCA_PML_BFO_CHECK_RECVREQ_EAGER_BML_BTL_RECV_CTL(bml_btl, btl, des); -#endif /* PML_BFO */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -/* - * Put operation has completed remotely - update request status - */ - -static void mca_pml_bfo_put_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*)des->des_context; - mca_pml_bfo_recv_request_t* recvreq = (mca_pml_bfo_recv_request_t*)des->des_cbdata; - size_t bytes_received = 0; - - if( OPAL_LIKELY(status == OMPI_SUCCESS) ) { - bytes_received = mca_pml_bfo_compute_segment_length (btl->btl_seg_size, - (void *) des->des_remote, - des->des_remote_count, 0); - } - OPAL_THREAD_ADD_SIZE_T(&recvreq->req_pipeline_depth,-1); - -#if PML_BFO - btl->btl_free(btl, des); - MCA_PML_BFO_ERROR_CHECK_ON_FIN_FOR_PUT(recvreq); - MCA_PML_BFO_CHECK_RECVREQ_EAGER_BML_BTL(bml_btl, btl, recvreq, "PUT"); -#else /* PML_BFO */ - mca_bml_base_free(bml_btl, des); -#endif /* PML_BFO */ - - /* check completion status */ - OPAL_THREAD_ADD_SIZE_T(&recvreq->req_bytes_received, bytes_received); - if(recv_request_pml_complete_check(recvreq) == false && - recvreq->req_rdma_offset < recvreq->req_send_offset) { - /* schedule additional rdma operations */ - mca_pml_bfo_recv_request_schedule(recvreq, bml_btl); - } - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -/* - * - */ - -int mca_pml_bfo_recv_request_ack_send_btl( - ompi_proc_t* proc, mca_bml_base_btl_t* bml_btl, - uint64_t hdr_src_req, void *hdr_dst_req, uint64_t hdr_send_offset, - bool nordma) -{ - mca_btl_base_descriptor_t* des; - mca_pml_bfo_ack_hdr_t* ack; - int rc; - - /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_ack_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK); - if( OPAL_UNLIKELY(NULL == des) ) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /* fill out header */ - ack = (mca_pml_bfo_ack_hdr_t*)des->des_local->seg_addr.pval; - ack->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_ACK; - ack->hdr_common.hdr_flags = nordma ? MCA_PML_BFO_HDR_FLAGS_NORDMA : 0; - ack->hdr_src_req.lval = hdr_src_req; - ack->hdr_dst_req.pval = hdr_dst_req; - ack->hdr_send_offset = hdr_send_offset; - - bfo_hdr_hton(ack, MCA_PML_BFO_HDR_TYPE_ACK, proc); - - /* initialize descriptor */ - des->des_cbfunc = mca_pml_bfo_recv_ctl_completion; -#if PML_BFO - des->des_cbdata = hdr_dst_req; -#endif /* PML_BFO */ - - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_ACK); - if( OPAL_LIKELY( rc >= 0 ) ) { -#if PML_BFO - if ((bml_btl->btl_flags & MCA_BTL_FLAGS_FAILOVER_SUPPORT) && - (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK)) { - ((mca_pml_bfo_recv_request_t *)hdr_dst_req)->req_events++; - } -#endif /* PML_BFO */ - return OMPI_SUCCESS; - } - mca_bml_base_free(bml_btl, des); - return OMPI_ERR_OUT_OF_RESOURCE; -} - -static int mca_pml_bfo_recv_request_ack( - mca_pml_bfo_recv_request_t* recvreq, - mca_pml_bfo_rendezvous_hdr_t* hdr, - size_t bytes_received) -{ - ompi_proc_t* proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; - mca_bml_base_endpoint_t* bml_endpoint = NULL; - - bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - /* by default copy everything */ - recvreq->req_send_offset = bytes_received; - if(hdr->hdr_msg_length > bytes_received) { - size_t rdma_num = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_rdma); - /* - * lookup request buffer to determine if memory is already - * registered. - */ - - if(opal_convertor_need_buffers(&recvreq->req_recv.req_base.req_convertor) == 0 && - hdr->hdr_match.hdr_common.hdr_flags & MCA_PML_BFO_HDR_FLAGS_CONTIG && - rdma_num != 0) { - unsigned char *base; - opal_convertor_get_current_pointer( &recvreq->req_recv.req_base.req_convertor, (void**)&(base) ); - - if(hdr->hdr_match.hdr_common.hdr_flags & MCA_PML_BFO_HDR_FLAGS_PIN) - recvreq->req_rdma_cnt = mca_pml_bfo_rdma_btls(bml_endpoint, - base, recvreq->req_recv.req_bytes_packed, - recvreq->req_rdma ); - else - recvreq->req_rdma_cnt = 0; - - /* memory is already registered on both sides */ - if (recvreq->req_rdma_cnt != 0) { - recvreq->req_send_offset = hdr->hdr_msg_length; - /* are rdma devices available for long rdma protocol */ - } else if(bml_endpoint->btl_send_limit < hdr->hdr_msg_length) { - /* use convertor to figure out the rdma offset for this request */ - recvreq->req_send_offset = hdr->hdr_msg_length - - bml_endpoint->btl_pipeline_send_length; - - if(recvreq->req_send_offset < bytes_received) - recvreq->req_send_offset = bytes_received; - - /* use converter to figure out the rdma offset for this - * request */ - opal_convertor_set_position(&recvreq->req_recv.req_base.req_convertor, - &recvreq->req_send_offset); - - recvreq->req_rdma_cnt = - mca_pml_bfo_rdma_pipeline_btls(bml_endpoint, - recvreq->req_send_offset - bytes_received, - recvreq->req_rdma); - } - } - /* nothing to send by copy in/out - no need to ack */ - if(recvreq->req_send_offset == hdr->hdr_msg_length) - return OMPI_SUCCESS; - } - /* let know to shedule function there is no need to put ACK flag */ - recvreq->req_ack_sent = true; - return mca_pml_bfo_recv_request_ack_send(proc, hdr->hdr_src_req.lval, - recvreq, recvreq->req_send_offset, - recvreq->req_send_offset == bytes_received); -} - -/** - * Return resources used by the RDMA - */ - -static void mca_pml_bfo_rget_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*)des->des_context; - mca_pml_bfo_rdma_frag_t* frag = (mca_pml_bfo_rdma_frag_t*)des->des_cbdata; - mca_pml_bfo_recv_request_t* recvreq = (mca_pml_bfo_recv_request_t*)frag->rdma_req; - -#if PML_BFO - if (btl->btl_flags & MCA_BTL_FLAGS_FAILOVER_SUPPORT) { - recvreq->req_events--; - } -#endif /* PML_BFO */ - /* check completion status */ - if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { -#if PML_BFO - MCA_PML_BFO_ERROR_CHECK_ON_RDMA_READ_COMPLETION(recvreq); -#else /* PML_BFO */ - /* TSW - FIX */ - OMPI_ERROR_LOG(status); - ompi_rte_abort(-1, NULL); -#endif /* PML_BFO */ - } -#if PML_BFO - MCA_PML_BFO_SECOND_ERROR_CHECK_ON_RDMA_READ_COMPLETION(recvreq, status, btl); - MCA_PML_BFO_CHECK_RECVREQ_RDMA_BML_BTL(bml_btl, btl, recvreq, "RDMA write"); -#endif /* PML_BFO */ - - mca_pml_bfo_send_fin(recvreq->req_recv.req_base.req_proc, - bml_btl, - frag->rdma_hdr.hdr_rget.hdr_des, -#if PML_BFO - des->order, 0, (uint16_t)recvreq->req_msgseq, recvreq->req_restartseq, - recvreq->req_recv.req_base.req_comm->c_contextid, - recvreq->req_recv.req_base.req_comm->c_my_rank); -#else /* PML_BFO */ - des->order, 0); -#endif /* PML_BFO */ - - /* is receive request complete */ - OPAL_THREAD_ADD_SIZE_T(&recvreq->req_bytes_received, frag->rdma_length); - recv_request_pml_complete_check(recvreq); - - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); - - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - - -/* - * - */ -int mca_pml_bfo_recv_request_get_frag( mca_pml_bfo_rdma_frag_t* frag ) -{ - mca_pml_bfo_recv_request_t* recvreq = (mca_pml_bfo_recv_request_t*)frag->rdma_req; - mca_bml_base_btl_t* bml_btl = frag->rdma_bml; - mca_btl_base_descriptor_t* descriptor; - size_t save_size = frag->rdma_length; - int rc; - - /* prepare descriptor */ - mca_bml_base_prepare_dst( bml_btl, - NULL, - &recvreq->req_recv.req_base.req_convertor, - MCA_BTL_NO_ORDER, - 0, - &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK | - MCA_BTL_DES_FLAGS_GET, - &descriptor ); - if( OPAL_UNLIKELY(NULL == descriptor) ) { - frag->rdma_length = save_size; - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.rdma_pending, (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - descriptor->des_remote = (mca_btl_base_segment_t *) frag->rdma_segs; - descriptor->des_remote_count = frag->rdma_hdr.hdr_rdma.hdr_seg_cnt; - descriptor->des_cbfunc = mca_pml_bfo_rget_completion; - descriptor->des_cbdata = frag; - - PERUSE_TRACE_COMM_OMPI_EVENT(PERUSE_COMM_REQ_XFER_CONTINUE, - &(recvreq->req_recv.req_base), - frag->rdma_length, PERUSE_RECV); - - /* queue up get request */ - rc = mca_bml_base_get(bml_btl,descriptor); - if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { - mca_bml_base_free(bml_btl, descriptor); - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.rdma_pending, - (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - return OMPI_ERR_OUT_OF_RESOURCE; - } else { - OMPI_ERROR_LOG(rc); - ompi_rte_abort(-1, NULL); - } - } -#if PML_BFO - if ((bml_btl->btl_flags & MCA_BTL_FLAGS_FAILOVER_SUPPORT) && - (descriptor->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK)) { - recvreq->req_events++; - } -#endif /* PML_BFO */ - - return OMPI_SUCCESS; -} - - - - -/* - * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. - */ - -void mca_pml_bfo_recv_request_progress_frag( mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments ) -{ - size_t bytes_received, data_offset = 0; - size_t bytes_delivered __opal_attribute_unused__; /* is being set to zero in MCA_PML_BFO_RECV_REQUEST_UNPACK */ - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - - bytes_received = mca_pml_bfo_compute_segment_length_base (segments, num_segments, - sizeof(mca_pml_bfo_frag_hdr_t)); - data_offset = hdr->hdr_frag.hdr_frag_offset; - /* - * Make user buffer accessable(defined) before unpacking. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - MCA_PML_BFO_RECV_REQUEST_UNPACK( recvreq, - segments, - num_segments, - sizeof(mca_pml_bfo_frag_hdr_t), - data_offset, - bytes_received, - bytes_delivered ); - /* - * Unpacking finished, make the user buffer unaccessable again. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - - OPAL_THREAD_ADD_SIZE_T(&recvreq->req_bytes_received, bytes_received); - /* check completion status */ - if(recv_request_pml_complete_check(recvreq) == false && - recvreq->req_rdma_offset < recvreq->req_send_offset) { - /* schedule additional rdma operations */ - mca_pml_bfo_recv_request_schedule(recvreq, NULL); - } -} - -/* - * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. - */ - -void mca_pml_bfo_recv_request_progress_rget( mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments ) -{ - mca_pml_bfo_rget_hdr_t* hdr = (mca_pml_bfo_rget_hdr_t*)segments->seg_addr.pval; - mca_bml_base_endpoint_t* bml_endpoint = NULL; - mca_pml_bfo_rdma_frag_t* frag; - size_t i, size = 0; - - recvreq->req_recv.req_bytes_packed = hdr->hdr_rndv.hdr_msg_length; - -#if PML_BFO - recvreq->remote_req_send = hdr->hdr_rndv.hdr_src_req; -#endif /* PML_BFO */ - MCA_PML_BFO_RECV_REQUEST_MATCHED(recvreq, &hdr->hdr_rndv.hdr_match); - - /* if receive buffer is not contiguous we can't just RDMA read into it, so - * fall back to copy in/out protocol. It is a pity because buffer on the - * sender side is already registered. We need to be smarter here, perhaps - * do couple of RDMA reads */ - if(opal_convertor_need_buffers(&recvreq->req_recv.req_base.req_convertor) == true) { -#if OPAL_CUDA_SUPPORT - if (mca_pml_bfo_cuda_need_buffers(recvreq, btl)) { - mca_pml_bfo_recv_request_ack(recvreq, &hdr->hdr_rndv, 0); - return; - } -#else /* OPAL_CUDA_SUPPORT */ - mca_pml_bfo_recv_request_ack(recvreq, &hdr->hdr_rndv, 0); - return; -#endif /* OPAL_CUDA_SUPPORT */ - } - - MCA_PML_BFO_RDMA_FRAG_ALLOC(frag); - if( OPAL_UNLIKELY(NULL == frag) ) { - /* GLB - FIX */ - OMPI_ERROR_LOG(OMPI_ERR_OUT_OF_RESOURCE); - ompi_rte_abort(-1, NULL); - } - - /* lookup bml datastructures */ - bml_endpoint = (mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs)); - - /* allocate/initialize a fragment */ - memmove (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt); - - for(i = 0; i < hdr->hdr_seg_cnt; i++) { - mca_btl_base_segment_t *seg = (mca_btl_base_segment_t *)(frag->rdma_segs + i * btl->btl_seg_size); - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - if ((recvreq->req_recv.req_base.req_proc->super.proc_arch & OPAL_ARCH_ISBIGENDIAN) != - (ompi_proc_local()->super.proc_arch & OPAL_ARCH_ISBIGENDIAN)) { - size += opal_swap_bytes4(seg->seg_len); - } else -#endif - { - size += seg->seg_len; - } - } -#if PML_BFO - frag->rdma_btl = btl; -#endif /* PML_BFO */ - frag->rdma_bml = mca_bml_base_btl_array_find(&bml_endpoint->btl_rdma, btl); -#if OPAL_CUDA_SUPPORT - if( OPAL_UNLIKELY(NULL == frag->rdma_bml) ) { - if (recvreq->req_recv.req_base.req_convertor.flags & CONVERTOR_CUDA) { - /* Check to see if this is a CUDA get */ - if (btl->btl_flags & MCA_BTL_FLAGS_CUDA_GET) { - frag->rdma_bml = mca_bml_base_btl_array_find(&bml_endpoint->btl_send, btl); - } - if( OPAL_UNLIKELY(NULL == frag->rdma_bml) ) { - opal_output(0, "[%s:%d] invalid bml for rdma get", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } - } else { - /* Just default back to send and receive. Must be mix of GPU and HOST memory. */ - mca_pml_bfo_recv_request_ack(recvreq, &hdr->hdr_rndv, 0); - return; - } - } -#else /* OPAL_CUDA_SUPPORT */ - if( OPAL_UNLIKELY(NULL == frag->rdma_bml) ) { - opal_output(0, "[%s:%d] invalid bml for rdma get", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); - } -#endif /* OPAL_CUDA_SUPPORT */ - frag->rdma_hdr.hdr_rget = *hdr; - frag->rdma_req = recvreq; - frag->rdma_ep = bml_endpoint; - frag->rdma_length = size; - frag->rdma_state = MCA_PML_BFO_RDMA_GET; - frag->reg = NULL; - - mca_pml_bfo_recv_request_get_frag(frag); - return; -} - -/* - * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. - */ - -void mca_pml_bfo_recv_request_progress_rndv( mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments ) -{ - size_t bytes_received; - size_t bytes_delivered __opal_attribute_unused__; /* is being set to zero in MCA_PML_BFO_RECV_REQUEST_UNPACK */ - size_t data_offset = 0; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - - bytes_received = mca_pml_bfo_compute_segment_length_base (segments, num_segments, - sizeof(mca_pml_bfo_rendezvous_hdr_t)); - - recvreq->req_recv.req_bytes_packed = hdr->hdr_rndv.hdr_msg_length; - recvreq->remote_req_send = hdr->hdr_rndv.hdr_src_req; - recvreq->req_rdma_offset = bytes_received; - MCA_PML_BFO_RECV_REQUEST_MATCHED(recvreq, &hdr->hdr_match); - mca_pml_bfo_recv_request_ack(recvreq, &hdr->hdr_rndv, bytes_received); - /** - * The PUT protocol do not attach any data to the original request. - * Therefore, we might want to avoid unpacking if there is nothing to - * unpack. - */ - if( 0 < bytes_received ) { - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - MCA_PML_BFO_RECV_REQUEST_UNPACK( recvreq, - segments, - num_segments, - sizeof(mca_pml_bfo_rendezvous_hdr_t), - data_offset, - bytes_received, - bytes_delivered ); - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - } - OPAL_THREAD_ADD_SIZE_T(&recvreq->req_bytes_received, bytes_received); - /* check completion status */ - if(recv_request_pml_complete_check(recvreq) == false && - recvreq->req_rdma_offset < recvreq->req_send_offset) { - /* schedule additional rdma operations */ - mca_pml_bfo_recv_request_schedule(recvreq, NULL); - } -} - -/* - * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. - */ -void mca_pml_bfo_recv_request_progress_match( mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments ) -{ - size_t bytes_received, data_offset = 0; - size_t bytes_delivered __opal_attribute_unused__; /* is being set to zero in MCA_PML_BFO_RECV_REQUEST_UNPACK */ - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - - bytes_received = mca_pml_bfo_compute_segment_length_base (segments, num_segments, - OMPI_PML_BFO_MATCH_HDR_LEN); - - recvreq->req_recv.req_bytes_packed = bytes_received; - - MCA_PML_BFO_RECV_REQUEST_MATCHED(recvreq, &hdr->hdr_match); - /* - * Make user buffer accessable(defined) before unpacking. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - MCA_PML_BFO_RECV_REQUEST_UNPACK( recvreq, - segments, - num_segments, - OMPI_PML_BFO_MATCH_HDR_LEN, - data_offset, - bytes_received, - bytes_delivered); - /* - * Unpacking finished, make the user buffer unaccessable again. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - recvreq->req_recv.req_base.req_addr, - recvreq->req_recv.req_base.req_count, - recvreq->req_recv.req_base.req_datatype); - ); - - /* - * No need for atomic here, as we know there is only one fragment - * for this request. - */ - recvreq->req_bytes_received += bytes_received; - recv_request_pml_complete(recvreq); -} - - -/** - * Handle completion of a probe request - */ - -void mca_pml_bfo_recv_request_matched_probe( mca_pml_bfo_recv_request_t* recvreq, - mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments ) -{ - size_t bytes_packed = 0; - mca_pml_bfo_hdr_t* hdr = (mca_pml_bfo_hdr_t*)segments->seg_addr.pval; - - switch(hdr->hdr_common.hdr_type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - bytes_packed = mca_pml_bfo_compute_segment_length_base (segments, num_segments, - OMPI_PML_BFO_MATCH_HDR_LEN); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - case MCA_PML_BFO_HDR_TYPE_RGET: - bytes_packed = hdr->hdr_rndv.hdr_msg_length; - break; - } - - /* set completion status */ - recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG = hdr->hdr_match.hdr_tag; - recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = hdr->hdr_match.hdr_src; - recvreq->req_bytes_received = bytes_packed; - recvreq->req_bytes_expected = bytes_packed; - - recv_request_pml_complete(recvreq); -} - - -/* - * Schedule RDMA protocol. - * -*/ - -int mca_pml_bfo_recv_request_schedule_once( mca_pml_bfo_recv_request_t* recvreq, - mca_bml_base_btl_t *start_bml_btl ) -{ - mca_bml_base_btl_t* bml_btl; - int num_tries = recvreq->req_rdma_cnt, num_fail = 0; - size_t i, prev_bytes_remaining = 0; - size_t bytes_remaining = recvreq->req_send_offset - - recvreq->req_rdma_offset; - - /* if starting bml_btl is provided schedule next fragment on it first */ - if(start_bml_btl != NULL) { - for(i = 0; i < recvreq->req_rdma_cnt; i++) { - if(recvreq->req_rdma[i].bml_btl != start_bml_btl) - continue; - /* something left to be send? */ - if( OPAL_LIKELY(recvreq->req_rdma[i].length) ) - recvreq->req_rdma_idx = i; - break; - } - } - - while(bytes_remaining > 0 && - recvreq->req_pipeline_depth < mca_pml_bfo.recv_pipeline_depth) { - size_t size, seg_size; - mca_pml_bfo_rdma_hdr_t* hdr; - mca_btl_base_descriptor_t* dst; - mca_btl_base_descriptor_t* ctl; - mca_mpool_base_registration_t * reg = NULL; - mca_btl_base_module_t* btl; - int rc, rdma_idx; - - if(prev_bytes_remaining == bytes_remaining) { - if(++num_fail == num_tries) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - if(false == recvreq->req_pending) { - opal_list_append(&mca_pml_bfo.recv_pending, - (opal_list_item_t*)recvreq); - recvreq->req_pending = true; - } - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - return OMPI_ERR_OUT_OF_RESOURCE; - } - } else { - num_fail = 0; - prev_bytes_remaining = bytes_remaining; - } - - do { - rdma_idx = recvreq->req_rdma_idx; - bml_btl = recvreq->req_rdma[rdma_idx].bml_btl; - reg = recvreq->req_rdma[rdma_idx].btl_reg; - size = recvreq->req_rdma[rdma_idx].length; - if(++recvreq->req_rdma_idx >= recvreq->req_rdma_cnt) - recvreq->req_rdma_idx = 0; - } while(!size); - btl = bml_btl->btl; - - /* makes sure that we don't exceed BTL max rdma size - * if memory is not pinned already */ - if( (NULL == reg) && (btl->btl_rdma_pipeline_frag_size != 0) && - (size > btl->btl_rdma_pipeline_frag_size)) { - size = btl->btl_rdma_pipeline_frag_size; - } - - /* take lock to protect converter against concurrent access - * from unpack */ - OPAL_THREAD_LOCK(&recvreq->lock); - opal_convertor_set_position( &recvreq->req_recv.req_base.req_convertor, - &recvreq->req_rdma_offset ); - - /* prepare a descriptor for RDMA */ - mca_bml_base_prepare_dst(bml_btl, reg, - &recvreq->req_recv.req_base.req_convertor, - MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | - MCA_BTL_DES_FLAGS_PUT, &dst); - OPAL_THREAD_UNLOCK(&recvreq->lock); - - if(OPAL_UNLIKELY(dst == NULL)) { - continue; - } - - dst->des_cbfunc = mca_pml_bfo_put_completion; - dst->des_cbdata = recvreq; - - seg_size = btl->btl_seg_size * dst->des_local_count; - - /* prepare a descriptor for rdma control message */ - mca_bml_base_alloc(bml_btl, &ctl, MCA_BTL_NO_ORDER, sizeof(mca_pml_bfo_rdma_hdr_t) + seg_size, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK); - - if( OPAL_UNLIKELY(NULL == ctl) ) { - mca_bml_base_free(bml_btl,dst); - continue; - } - ctl->des_cbfunc = mca_pml_bfo_recv_ctl_completion; -#if PML_BFO - ctl->des_cbdata = recvreq; -#endif /* PML_BFO */ - - /* fill in rdma header */ - hdr = (mca_pml_bfo_rdma_hdr_t*)ctl->des_local->seg_addr.pval; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_PUT; - hdr->hdr_common.hdr_flags = - (!recvreq->req_ack_sent) ? MCA_PML_BFO_HDR_TYPE_ACK : 0; - hdr->hdr_req = recvreq->remote_req_send; -#if PML_BFO - hdr->hdr_dst_req.pval = recvreq; /* only needed in the first put message */ -#endif /* PML_BFO */ - hdr->hdr_des.pval = dst; - hdr->hdr_rdma_offset = recvreq->req_rdma_offset; - hdr->hdr_seg_cnt = dst->des_local_count; - - /* copy segments */ - memmove (hdr + 1, dst->des_local, seg_size); - - if(!recvreq->req_ack_sent) - recvreq->req_ack_sent = true; - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_PUT, recvreq->req_recv.req_base.req_proc); - - PERUSE_TRACE_COMM_OMPI_EVENT( PERUSE_COMM_REQ_XFER_CONTINUE, - &(recvreq->req_recv.req_base), size, - PERUSE_RECV); - - /* send rdma request to peer */ - rc = mca_bml_base_send(bml_btl, ctl, MCA_PML_BFO_HDR_TYPE_PUT); - if( OPAL_LIKELY( rc >= 0 ) ) { -#if PML_BFO - if ((btl->btl_flags & MCA_BTL_FLAGS_FAILOVER_SUPPORT) && - (ctl->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK)) { - recvreq->req_events++; - } -#endif /* PML_BFO */ - /* update request state */ - recvreq->req_rdma_offset += size; - OPAL_THREAD_ADD_SIZE_T(&recvreq->req_pipeline_depth, 1); - recvreq->req_rdma[rdma_idx].length -= size; - bytes_remaining -= size; - } else { - mca_bml_base_free(bml_btl,ctl); - mca_bml_base_free(bml_btl,dst); - } - } - - return OMPI_SUCCESS; -} - -#define IS_PROB_REQ(R) \ - ((MCA_PML_REQUEST_IPROBE == (R)->req_recv.req_base.req_type) || \ - (MCA_PML_REQUEST_PROBE == (R)->req_recv.req_base.req_type) || \ - (MCA_PML_REQUEST_IMPROBE == (R)->req_recv.req_base.req_type) || \ - (MCA_PML_REQUEST_MPROBE == (R)->req_recv.req_base.req_type)) -#define IS_MPROB_REQ(R) \ - ((MCA_PML_REQUEST_IMPROBE == (R)->req_recv.req_base.req_type) || \ - (MCA_PML_REQUEST_MPROBE == (R)->req_recv.req_base.req_type)) - -static inline void append_recv_req_to_queue(opal_list_t *queue, - mca_pml_bfo_recv_request_t *req) -{ - if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE || - req->req_recv.req_base.req_type == MCA_PML_REQUEST_IMPROBE)) - return; - - opal_list_append(queue, (opal_list_item_t*)req); - - /** - * We don't want to generate this kind of event for MPI_Probe. Hopefully, - * the compiler will optimize out the empty if loop in the case where PERUSE - * support is not required by the user. - */ - if(req->req_recv.req_base.req_type != MCA_PML_REQUEST_PROBE || - req->req_recv.req_base.req_type != MCA_PML_REQUEST_MPROBE) { - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_REQ_INSERT_IN_POSTED_Q, - &(req->req_recv.req_base), PERUSE_RECV); - } -} - -/* - * this routine tries to match a posted receive. If a match is found, - * it places the request in the appropriate matched receive list. This - * function has to be called with the communicator matching lock held. -*/ -static mca_pml_bfo_recv_frag_t* -recv_req_match_specific_proc( const mca_pml_bfo_recv_request_t *req, - mca_pml_bfo_comm_proc_t *proc ) -{ - opal_list_t* unexpected_frags = &proc->unexpected_frags; - opal_list_item_t *i; - mca_pml_bfo_recv_frag_t* frag; - int tag = req->req_recv.req_base.req_tag; - - if(opal_list_get_size(unexpected_frags) == 0) - return NULL; - - if( OMPI_ANY_TAG == tag ) { - for (i = opal_list_get_first(unexpected_frags); - i != opal_list_get_end(unexpected_frags); - i = opal_list_get_next(i)) { - frag = (mca_pml_bfo_recv_frag_t*)i; - - if( frag->hdr.hdr_match.hdr_tag >= 0 ) - return frag; - } - } else { - for (i = opal_list_get_first(unexpected_frags); - i != opal_list_get_end(unexpected_frags); - i = opal_list_get_next(i)) { - frag = (mca_pml_bfo_recv_frag_t*)i; - - if( frag->hdr.hdr_match.hdr_tag == tag ) - return frag; - } - } - return NULL; -} - -/* - * this routine is used to try and match a wild posted receive - where - * wild is determined by the value assigned to the source process -*/ -static mca_pml_bfo_recv_frag_t* -recv_req_match_wild( mca_pml_bfo_recv_request_t* req, - mca_pml_bfo_comm_proc_t **p) -{ - mca_pml_bfo_comm_t* comm = req->req_recv.req_base.req_comm->c_pml_comm; - mca_pml_bfo_comm_proc_t* proc = comm->procs; - size_t i; - - /* - * Loop over all the outstanding messages to find one that matches. - * There is an outer loop over lists of messages from each - * process, then an inner loop over the messages from the - * process. - * - * In order to avoid starvation do this in a round-robin fashion. - */ - for (i = comm->last_probed + 1; i < comm->num_procs; i++) { - mca_pml_bfo_recv_frag_t* frag; - - /* loop over messages from the current proc */ - if((frag = recv_req_match_specific_proc(req, &proc[i]))) { - *p = &proc[i]; - comm->last_probed = i; - req->req_recv.req_base.req_proc = proc[i].ompi_proc; - prepare_recv_req_converter(req); - return frag; /* match found */ - } - } - for (i = 0; i <= comm->last_probed; i++) { - mca_pml_bfo_recv_frag_t* frag; - - /* loop over messages from the current proc */ - if((frag = recv_req_match_specific_proc(req, &proc[i]))) { - *p = &proc[i]; - comm->last_probed = i; - req->req_recv.req_base.req_proc = proc[i].ompi_proc; - prepare_recv_req_converter(req); - return frag; /* match found */ - } - } - - *p = NULL; - return NULL; -} - - -void mca_pml_bfo_recv_req_start(mca_pml_bfo_recv_request_t *req) -{ - mca_pml_bfo_comm_t* comm = req->req_recv.req_base.req_comm->c_pml_comm; - mca_pml_bfo_comm_proc_t* proc; - mca_pml_bfo_recv_frag_t* frag; - opal_list_t *queue; - mca_pml_bfo_hdr_t* hdr; - - /* init/re-init the request */ - req->req_lock = 0; - req->req_pipeline_depth = 0; - req->req_bytes_received = 0; - req->req_bytes_expected = 0; - /* What about req_rdma_cnt ? */ -#if PML_BFO - req->req_rdma_cnt = 0; - req->req_events = 0; - req->req_restartseq = 0; - req->req_errstate = 0; -#endif /* PML_BFO */ - req->req_rdma_idx = 0; - req->req_pending = false; - req->req_ack_sent = false; - - MCA_PML_BASE_RECV_START(&req->req_recv.req_base); - - OPAL_THREAD_LOCK(&comm->matching_lock); - /** - * The laps of time between the ACTIVATE event and the SEARCH_UNEX one include - * the cost of the request lock. - */ - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_SEARCH_UNEX_Q_BEGIN, - &(req->req_recv.req_base), PERUSE_RECV); - - /* assign sequence number */ - req->req_recv.req_base.req_sequence = comm->recv_sequence++; - - /* attempt to match posted recv */ - if(req->req_recv.req_base.req_peer == OMPI_ANY_SOURCE) { - frag = recv_req_match_wild(req, &proc); - queue = &comm->wild_receives; -#if !OPAL_ENABLE_HETEROGENEOUS_SUPPORT - /* As we are in a homogeneous environment we know that all remote - * architectures are exactly the same as the local one. Therefore, - * we can safely construct the convertor based on the proc - * information of rank 0. - */ - if( NULL == frag ) { - req->req_recv.req_base.req_proc = ompi_proc_local_proc; - prepare_recv_req_converter(req); - } -#endif /* !OPAL_ENABLE_HETEROGENEOUS_SUPPORT */ - } else { - proc = &comm->procs[req->req_recv.req_base.req_peer]; - req->req_recv.req_base.req_proc = proc->ompi_proc; - frag = recv_req_match_specific_proc(req, proc); - queue = &proc->specific_receives; - /* wild cardrecv will be prepared on match */ - prepare_recv_req_converter(req); - } - - if(OPAL_UNLIKELY(NULL == frag)) { - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_SEARCH_UNEX_Q_END, - &(req->req_recv.req_base), PERUSE_RECV); - /* We didn't find any matches. Record this irecv so we can match - it when the message comes in. */ - append_recv_req_to_queue(queue, req); - req->req_match_received = false; - OPAL_THREAD_UNLOCK(&comm->matching_lock); - } else { - if(OPAL_LIKELY(!IS_PROB_REQ(req))) { - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_REQ_MATCH_UNEX, - &(req->req_recv.req_base), PERUSE_RECV); - - hdr = (mca_pml_bfo_hdr_t*)frag->segments->seg_addr.pval; - PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_REMOVE_FROM_UNEX_Q, - req->req_recv.req_base.req_comm, - hdr->hdr_match.hdr_src, - hdr->hdr_match.hdr_tag, - PERUSE_RECV); - - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_SEARCH_UNEX_Q_END, - &(req->req_recv.req_base), PERUSE_RECV); - - opal_list_remove_item(&proc->unexpected_frags, - (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&comm->matching_lock); - - switch(hdr->hdr_common.hdr_type) { - case MCA_PML_BFO_HDR_TYPE_MATCH: - mca_pml_bfo_recv_request_progress_match(req, frag->btl, frag->segments, - frag->num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RNDV: - mca_pml_bfo_recv_request_progress_rndv(req, frag->btl, frag->segments, - frag->num_segments); - break; - case MCA_PML_BFO_HDR_TYPE_RGET: - mca_pml_bfo_recv_request_progress_rget(req, frag->btl, frag->segments, - frag->num_segments); - break; - default: - assert(0); - } - - MCA_PML_BFO_RECV_FRAG_RETURN(frag); - - } else if (OPAL_UNLIKELY(IS_MPROB_REQ(req))) { - /* Remove the fragment from the match list, as it's now - matched. Stash it somewhere in the request (which, - yes, is a complete hack), where it will be plucked out - during the end of mprobe. The request will then be - "recreated" as a receive request, and the frag will be - restarted with this request during mrecv */ - opal_list_remove_item(&proc->unexpected_frags, - (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&comm->matching_lock); - - req->req_recv.req_base.req_addr = frag; - mca_pml_bfo_recv_request_matched_probe(req, frag->btl, - frag->segments, frag->num_segments); - - } else { - OPAL_THREAD_UNLOCK(&comm->matching_lock); - mca_pml_bfo_recv_request_matched_probe(req, frag->btl, - frag->segments, frag->num_segments); - } - } -} diff --git a/ompi/mca/pml/bfo/pml_bfo_recvreq.h b/ompi/mca/pml/bfo/pml_bfo_recvreq.h deleted file mode 100644 index 4aa05d1dbda..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_recvreq.h +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2014 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2007 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ -#ifndef OMPI_PML_BFO_RECV_REQUEST_H -#define OMPI_PML_BFO_RECV_REQUEST_H - -#include "pml_bfo.h" -#include "pml_bfo_rdma.h" -#include "pml_bfo_rdmafrag.h" -#include "ompi/proc/proc.h" -#include "ompi/mca/pml/bfo/pml_bfo_comm.h" -#include "opal/mca/mpool/base/base.h" -#include "ompi/mca/pml/base/pml_base_recvreq.h" -#if PML_BFO -#define RECVREQ_RECVERRSENT 0x01 -#define RECVREQ_RNDVRESTART_RECVED 0x02 -#define RECVREQ_RNDVRESTART_ACKED 0x04 -#endif /* PML_BFO */ - -BEGIN_C_DECLS - -struct mca_pml_bfo_recv_request_t { - mca_pml_base_recv_request_t req_recv; - opal_ptr_t remote_req_send; -#if PML_BFO - int32_t req_msgseq; /* PML sequence number */ - int32_t req_events; /* number of outstanding events on request */ - int32_t req_restartseq; /* sequence number of restarted request */ - int32_t req_errstate; /* state of request if in error */ -#endif /* PML_BFO */ - int32_t req_lock; - size_t req_pipeline_depth; - size_t req_bytes_received; /**< amount of data transferred into the user buffer */ - size_t req_bytes_expected; /**< local size of the data as suggested by the user */ - size_t req_rdma_offset; - size_t req_send_offset; - uint32_t req_rdma_cnt; - uint32_t req_rdma_idx; - bool req_pending; - bool req_ack_sent; /**< whether ack was sent to the sender */ - bool req_match_received; /**< Prevent request to be completed prematurely */ - opal_mutex_t lock; - mca_pml_bfo_com_btl_t req_rdma[1]; -}; -typedef struct mca_pml_bfo_recv_request_t mca_pml_bfo_recv_request_t; - -OBJ_CLASS_DECLARATION(mca_pml_bfo_recv_request_t); - -static inline bool lock_recv_request(mca_pml_bfo_recv_request_t *recvreq) -{ - return OPAL_THREAD_ADD32(&recvreq->req_lock, 1) == 1; -} - -static inline bool unlock_recv_request(mca_pml_bfo_recv_request_t *recvreq) -{ - return OPAL_THREAD_ADD32(&recvreq->req_lock, -1) == 0; -} - -/** - * Allocate a recv request from the modules free list. - * - * @param rc (OUT) OMPI_SUCCESS or error status on failure. - * @return Receive request. - */ -#define MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq) \ -do { \ - ompi_free_list_item_t* item; \ - OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \ - recvreq = (mca_pml_bfo_recv_request_t*)item; \ -} while(0) - - -/** - * Initialize a receive request with call parameters. - * - * @param request (IN) Receive request. - * @param addr (IN) User buffer. - * @param count (IN) Number of elements of indicated datatype. - * @param datatype (IN) User defined datatype. - * @param src (IN) Source rank w/in the communicator. - * @param tag (IN) User defined tag. - * @param comm (IN) Communicator. - * @param persistent (IN) Is this a ersistent request. - */ -#define MCA_PML_BFO_RECV_REQUEST_INIT( request, \ - addr, \ - count, \ - datatype, \ - src, \ - tag, \ - comm, \ - persistent) \ -do { \ - MCA_PML_BASE_RECV_REQUEST_INIT( &(request)->req_recv, \ - addr, \ - count, \ - datatype, \ - src, \ - tag, \ - comm, \ - persistent); \ -} while(0) - -/** - * Mark the request as completed at MPI level for internal purposes. - * - * @param recvreq (IN) Receive request. - */ -#define MCA_PML_BFO_RECV_REQUEST_MPI_COMPLETE( recvreq ) \ - do { \ - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \ - &(recvreq->req_recv.req_base), PERUSE_RECV ); \ - ompi_request_complete( &(recvreq->req_recv.req_base.req_ompi), true ); \ - } while (0) - -/* - * Free the PML receive request - */ -#define MCA_PML_BFO_RECV_REQUEST_RETURN(recvreq) \ - { \ - MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \ - OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \ - (ompi_free_list_item_t*)(recvreq)); \ - } - -/** - * Complete receive request. Request structure cannot be accessed after calling - * this function any more. - * - * @param recvreq (IN) Receive request. - */ -static inline void -recv_request_pml_complete(mca_pml_bfo_recv_request_t *recvreq) -{ - size_t i; - - assert(false == recvreq->req_recv.req_base.req_pml_complete); - - if(recvreq->req_recv.req_bytes_packed > 0) { - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_END, - &recvreq->req_recv.req_base, PERUSE_RECV ); - } - - for(i = 0; i < recvreq->req_rdma_cnt; i++) { - mca_mpool_base_registration_t* btl_reg = recvreq->req_rdma[i].btl_reg; - if( NULL != btl_reg && btl_reg->mpool != NULL) { - btl_reg->mpool->mpool_deregister( btl_reg->mpool, btl_reg ); - } - } - recvreq->req_rdma_cnt = 0; -#if PML_BFO - recvreq->req_msgseq -= 100; -#endif /* PML_BFO */ - - OPAL_THREAD_LOCK(&ompi_request_lock); - if(true == recvreq->req_recv.req_base.req_free_called) { - if( MPI_SUCCESS != recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR ) { - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST); - } - MCA_PML_BFO_RECV_REQUEST_RETURN(recvreq); - } else { - /* initialize request status */ - recvreq->req_recv.req_base.req_pml_complete = true; - recvreq->req_recv.req_base.req_ompi.req_status._ucount = - recvreq->req_bytes_received; - if (recvreq->req_recv.req_bytes_packed > recvreq->req_bytes_expected) { - recvreq->req_recv.req_base.req_ompi.req_status._ucount = - recvreq->req_recv.req_bytes_packed; - recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR = - MPI_ERR_TRUNCATE; - } - MCA_PML_BFO_RECV_REQUEST_MPI_COMPLETE(recvreq); - } - OPAL_THREAD_UNLOCK(&ompi_request_lock); -} - -static inline bool -recv_request_pml_complete_check(mca_pml_bfo_recv_request_t *recvreq) -{ -#if OPAL_ENABLE_MULTI_THREADS - opal_atomic_rmb(); -#endif - if(recvreq->req_match_received && - recvreq->req_bytes_received >= recvreq->req_recv.req_bytes_packed && -#if PML_BFO - (0 == recvreq->req_events) && lock_recv_request(recvreq)) { -#else /* PML_BFO */ - lock_recv_request(recvreq)) { -#endif /* PML_BFO */ - recv_request_pml_complete(recvreq); - return true; - } - - return false; -} - -extern void mca_pml_bfo_recv_req_start(mca_pml_bfo_recv_request_t *req); -#define MCA_PML_BFO_RECV_REQUEST_START(r) mca_pml_bfo_recv_req_start(r) - -static inline void prepare_recv_req_converter(mca_pml_bfo_recv_request_t *req) -{ - if( req->req_recv.req_base.req_datatype->super.size | req->req_recv.req_base.req_count ) { - opal_convertor_copy_and_prepare_for_recv( - req->req_recv.req_base.req_proc->super.proc_convertor, - &(req->req_recv.req_base.req_datatype->super), - req->req_recv.req_base.req_count, - req->req_recv.req_base.req_addr, - 0, - &req->req_recv.req_base.req_convertor); - opal_convertor_get_unpacked_size(&req->req_recv.req_base.req_convertor, - &req->req_bytes_expected); - } -} - -#define MCA_PML_BFO_RECV_REQUEST_MATCHED(request, hdr) \ - recv_req_matched(request, hdr) - -static inline void recv_req_matched(mca_pml_bfo_recv_request_t *req, - mca_pml_bfo_match_hdr_t *hdr) -{ - req->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = hdr->hdr_src; - req->req_recv.req_base.req_ompi.req_status.MPI_TAG = hdr->hdr_tag; - req->req_match_received = true; -#if PML_BFO - req->req_msgseq = hdr->hdr_seq; -#endif /* PML_BFO */ -#if OPAL_ENABLE_MULTI_THREADS - opal_atomic_wmb(); -#endif - if(req->req_recv.req_bytes_packed > 0) { -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - if(MPI_ANY_SOURCE == req->req_recv.req_base.req_peer) { - /* non wildcard prepared during post recv */ - prepare_recv_req_converter(req); - } -#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT */ - PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_REQ_XFER_BEGIN, - &req->req_recv.req_base, PERUSE_RECV); - } -} - - -/** - * - */ - -#define MCA_PML_BFO_RECV_REQUEST_UNPACK( request, \ - segments, \ - num_segments, \ - seg_offset, \ - data_offset, \ - bytes_received, \ - bytes_delivered) \ -do { \ - bytes_delivered = 0; \ - if(request->req_recv.req_bytes_packed > 0) { \ - struct iovec iov[MCA_BTL_DES_MAX_SEGMENTS]; \ - uint32_t iov_count = 0; \ - size_t max_data = bytes_received; \ - size_t n, offset = seg_offset; \ - mca_btl_base_segment_t* segment = segments; \ - \ - OPAL_THREAD_LOCK(&request->lock); \ - for( n = 0; n < num_segments; n++, segment++ ) { \ - if(offset >= segment->seg_len) { \ - offset -= segment->seg_len; \ - } else { \ - iov[iov_count].iov_len = segment->seg_len - offset; \ - iov[iov_count].iov_base = (IOVBASE_TYPE*) \ - ((unsigned char*)segment->seg_addr.pval + offset); \ - iov_count++; \ - offset = 0; \ - } \ - } \ - PERUSE_TRACE_COMM_OMPI_EVENT (PERUSE_COMM_REQ_XFER_CONTINUE, \ - &(recvreq->req_recv.req_base), max_data, \ - PERUSE_RECV); \ - opal_convertor_set_position( &(request->req_recv.req_base.req_convertor), \ - &data_offset ); \ - opal_convertor_unpack( &(request)->req_recv.req_base.req_convertor, \ - iov, \ - &iov_count, \ - &max_data ); \ - bytes_delivered = max_data; \ - OPAL_THREAD_UNLOCK(&request->lock); \ - } \ -} while (0) - - -/** - * - */ - -void mca_pml_bfo_recv_request_progress_match( - mca_pml_bfo_recv_request_t* req, - struct mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments); - -/** - * - */ - -void mca_pml_bfo_recv_request_progress_frag( - mca_pml_bfo_recv_request_t* req, - struct mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments); - -/** - * - */ - -void mca_pml_bfo_recv_request_progress_rndv( - mca_pml_bfo_recv_request_t* req, - struct mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments); - -/** - * - */ - -void mca_pml_bfo_recv_request_progress_rget( - mca_pml_bfo_recv_request_t* req, - struct mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments); - -/** - * - */ - -void mca_pml_bfo_recv_request_matched_probe( - mca_pml_bfo_recv_request_t* req, - struct mca_btl_base_module_t* btl, - mca_btl_base_segment_t* segments, - size_t num_segments); - -/** - * - */ - -int mca_pml_bfo_recv_request_schedule_once( - mca_pml_bfo_recv_request_t* req, mca_bml_base_btl_t* start_bml_btl); - -static inline int mca_pml_bfo_recv_request_schedule_exclusive( - mca_pml_bfo_recv_request_t* req, - mca_bml_base_btl_t* start_bml_btl) -{ - int rc; - - do { - rc = mca_pml_bfo_recv_request_schedule_once(req, start_bml_btl); - if(rc == OMPI_ERR_OUT_OF_RESOURCE) - break; - } while(!unlock_recv_request(req)); - - if(OMPI_SUCCESS == rc) - recv_request_pml_complete_check(req); - - return rc; -} - -static inline void mca_pml_bfo_recv_request_schedule( - mca_pml_bfo_recv_request_t* req, - mca_bml_base_btl_t* start_bml_btl) -{ - if(!lock_recv_request(req)) - return; - - (void)mca_pml_bfo_recv_request_schedule_exclusive(req, start_bml_btl); -} - -#define MCA_PML_BFO_ADD_ACK_TO_PENDING(P, S, D, O) \ - do { \ - mca_pml_bfo_pckt_pending_t *_pckt; \ - \ - MCA_PML_BFO_PCKT_PENDING_ALLOC(_pckt); \ - _pckt->hdr.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_ACK; \ - _pckt->hdr.hdr_ack.hdr_src_req.lval = (S); \ - _pckt->hdr.hdr_ack.hdr_dst_req.pval = (D); \ - _pckt->hdr.hdr_ack.hdr_send_offset = (O); \ - _pckt->proc = (P); \ - _pckt->bml_btl = NULL; \ - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); \ - opal_list_append(&mca_pml_bfo.pckt_pending, \ - (opal_list_item_t*)_pckt); \ - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); \ - } while(0) - -int mca_pml_bfo_recv_request_ack_send_btl(ompi_proc_t* proc, - mca_bml_base_btl_t* bml_btl, uint64_t hdr_src_req, void *hdr_dst_req, - uint64_t hdr_rdma_offset, bool nordma); - -static inline int mca_pml_bfo_recv_request_ack_send(ompi_proc_t* proc, - uint64_t hdr_src_req, void *hdr_dst_req, uint64_t hdr_send_offset, - bool nordma) -{ - size_t i; - mca_bml_base_btl_t* bml_btl; - mca_bml_base_endpoint_t* endpoint = - (mca_bml_base_endpoint_t*)proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - - for(i = 0; i < mca_bml_base_btl_array_get_size(&endpoint->btl_eager); i++) { - bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); - if(mca_pml_bfo_recv_request_ack_send_btl(proc, bml_btl, hdr_src_req, - hdr_dst_req, hdr_send_offset, nordma) == OMPI_SUCCESS) - return OMPI_SUCCESS; - } - - MCA_PML_BFO_ADD_ACK_TO_PENDING(proc, hdr_src_req, hdr_dst_req, - hdr_send_offset); - - return OMPI_ERR_OUT_OF_RESOURCE; -} - -int mca_pml_bfo_recv_request_get_frag(mca_pml_bfo_rdma_frag_t* frag); - -/* This function tries to continue recvreq that stuck due to resource - * unavailability. Recvreq is added to recv_pending list if scheduling of put - * operation cannot be accomplished for some reason. */ -void mca_pml_bfo_recv_request_process_pending(void); - -END_C_DECLS - -#endif - diff --git a/ompi/mca/pml/bfo/pml_bfo_sendreq.c b/ompi/mca/pml/bfo/pml_bfo_sendreq.c deleted file mode 100644 index 8f5624db29e..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_sendreq.c +++ /dev/null @@ -1,1404 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2008 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) 2008 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "opal/prefetch.h" -#include "opal/mca/btl/btl.h" -#include "opal/mca/mpool/mpool.h" -#include "ompi/constants.h" -#include "ompi/mca/pml/pml.h" -#include "pml_bfo.h" -#include "pml_bfo_hdr.h" -#include "pml_bfo_sendreq.h" -#include "pml_bfo_rdmafrag.h" -#include "pml_bfo_recvreq.h" -#if PML_BFO -#include "pml_bfo_failover.h" -#endif /* PML_BFO */ -#include "ompi/mca/bml/base/base.h" -#include "ompi/memchecker.h" - -OBJ_CLASS_INSTANCE(mca_pml_bfo_send_range_t, ompi_free_list_item_t, - NULL, NULL); - -void mca_pml_bfo_send_request_process_pending(mca_bml_base_btl_t *bml_btl) -{ - int rc, i, s = opal_list_get_size(&mca_pml_bfo.send_pending); - - /* advance pending requests */ - for(i = 0; i < s; i++) { - mca_pml_bfo_send_pending_t pending_type = MCA_PML_BFO_SEND_PENDING_NONE; - mca_pml_bfo_send_request_t* sendreq; - mca_bml_base_btl_t *send_dst; - - sendreq = get_request_from_send_pending(&pending_type); - if(OPAL_UNLIKELY(NULL == sendreq)) - break; - - switch(pending_type) { - case MCA_PML_BFO_SEND_PENDING_SCHEDULE: - rc = mca_pml_bfo_send_request_schedule_exclusive(sendreq); - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { - return; - } - break; - case MCA_PML_BFO_SEND_PENDING_START: - send_dst = mca_bml_base_btl_array_find( - &sendreq->req_endpoint->btl_eager, bml_btl->btl); - if (NULL == send_dst) { - /* Put request back onto pending list and try next one. */ - add_request_to_send_pending(sendreq, - MCA_PML_BFO_SEND_PENDING_START, true); - } else { - rc = mca_pml_bfo_send_request_start_btl(sendreq, send_dst); - if (OMPI_ERR_OUT_OF_RESOURCE == rc) { - /* No more resources on this btl so prepend to the pending - * list to minimize reordering and give up for now. */ - add_request_to_send_pending(sendreq, - MCA_PML_BFO_SEND_PENDING_START, false); - return; - } - } - break; - default: - opal_output(0, "[%s:%d] wrong send request type\n", - __FILE__, __LINE__); - break; - } - } -} - -/* - * The free call mark the final stage in a request life-cycle. Starting from this - * point the request is completed at both PML and user level, and can be used - * for others p2p communications. Therefore, in the case of the BFO PML it should - * be added to the free request list. - */ -static int mca_pml_bfo_send_request_free(struct ompi_request_t** request) -{ - mca_pml_bfo_send_request_t* sendreq = *(mca_pml_bfo_send_request_t**)request; - - assert( false == sendreq->req_send.req_base.req_free_called ); - - OPAL_THREAD_LOCK(&ompi_request_lock); - sendreq->req_send.req_base.req_free_called = true; - - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_NOTIFY, - &(sendreq->req_send.req_base), PERUSE_SEND ); - - if( true == sendreq->req_send.req_base.req_pml_complete ) { - /* make buffer defined when the request is compeleted, - and before releasing the objects. */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - - MCA_PML_BFO_SEND_REQUEST_RETURN( sendreq ); - } - - OPAL_THREAD_UNLOCK(&ompi_request_lock); - - *request = MPI_REQUEST_NULL; - return OMPI_SUCCESS; -} - -static int mca_pml_bfo_send_request_cancel(struct ompi_request_t* request, int complete) -{ - /* we dont cancel send requests by now */ - return OMPI_SUCCESS; -} - -static void mca_pml_bfo_send_request_construct(mca_pml_bfo_send_request_t* req) -{ - req->req_send.req_base.req_type = MCA_PML_REQUEST_SEND; - req->req_send.req_base.req_ompi.req_free = mca_pml_bfo_send_request_free; - req->req_send.req_base.req_ompi.req_cancel = mca_pml_bfo_send_request_cancel; - req->req_rdma_cnt = 0; - req->req_throttle_sends = false; - OBJ_CONSTRUCT(&req->req_send_ranges, opal_list_t); - OBJ_CONSTRUCT(&req->req_send_range_lock, opal_mutex_t); -} - -static void mca_pml_bfo_send_request_destruct(mca_pml_bfo_send_request_t* req) -{ - OBJ_DESTRUCT(&req->req_send_ranges); - OBJ_DESTRUCT(&req->req_send_range_lock); -} - -OBJ_CLASS_INSTANCE( mca_pml_bfo_send_request_t, - mca_pml_base_send_request_t, - mca_pml_bfo_send_request_construct, - mca_pml_bfo_send_request_destruct ); - -/** - * Completion of a short message - nothing left to schedule. - */ - -static inline void -mca_pml_bfo_match_completion_free_request( mca_bml_base_btl_t* bml_btl, - mca_pml_bfo_send_request_t* sendreq ) -{ - if( sendreq->req_send.req_bytes_packed > 0 ) { - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_BEGIN, - &(sendreq->req_send.req_base), PERUSE_SEND ); - } - - /* signal request completion */ - send_request_pml_complete(sendreq); - - /* check for pending requests */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -static void -mca_pml_bfo_match_completion_free( struct mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)des->des_cbdata; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; - - /* check completion status */ - if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { -#if PML_BFO - mca_pml_bfo_repost_match_fragment(des); - return; -#else /* PML_BFO */ - /* TSW - FIX */ - opal_output(0, "%s:%d FATAL", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif /* PML_BFO */ - } -#if PML_BFO - MCA_PML_BFO_CHECK_SENDREQ_EAGER_BML_BTL(bml_btl, btl, sendreq, "MATCH"); -#endif /* PML_BFO */ - mca_pml_bfo_match_completion_free_request( bml_btl, sendreq ); -} - -static inline void -mca_pml_bfo_rndv_completion_request( mca_bml_base_btl_t* bml_btl, - mca_pml_bfo_send_request_t* sendreq, - size_t req_bytes_delivered ) -{ - if( sendreq->req_send.req_bytes_packed > 0 ) { - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_BEGIN, - &(sendreq->req_send.req_base), PERUSE_SEND ); - } - - OPAL_THREAD_ADD_SIZE_T(&sendreq->req_bytes_delivered, req_bytes_delivered); - - /* advance the request */ - OPAL_THREAD_ADD32(&sendreq->req_state, -1); - - send_request_pml_complete_check(sendreq); - - /* check for pending requests */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -/* - * Completion of the first fragment of a long message that - * requires an acknowledgement - */ -static void -mca_pml_bfo_rndv_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)des->des_cbdata; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*)des->des_context; - size_t req_bytes_delivered; - - /* check completion status */ - if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { -#if PML_BFO - if (true == mca_pml_bfo_rndv_completion_status_error(des, sendreq)) - return; -#else /* PML_BFO */ - /* TSW - FIX */ - opal_output(0, "%s:%d FATAL", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif /* PML_BFO */ - } -#if PML_BFO - sendreq->req_events--; - MCA_PML_BFO_RNDV_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl, - MCA_PML_BFO_HDR_TYPE_RNDV, "RNDV"); -#endif /* PML_BFO */ - - /* count bytes of user data actually delivered. As the rndv completion only - * happens in one thread, the increase of the req_bytes_delivered does not - * have to be atomic. - */ - req_bytes_delivered = mca_pml_bfo_compute_segment_length (btl->btl_seg_size, - (void *) des->des_local, - des->des_local_count, - sizeof(mca_pml_bfo_rendezvous_hdr_t)); - -#if PML_BFO - MCA_PML_BFO_CHECK_SENDREQ_EAGER_BML_BTL(bml_btl, btl, sendreq, "RNDV"); -#endif /* PML_BFO */ - mca_pml_bfo_rndv_completion_request( bml_btl, sendreq, req_bytes_delivered ); -} - - -/** - * Completion of a get request. - */ - -static void -mca_pml_bfo_rget_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)des->des_cbdata; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*)des->des_context; - size_t req_bytes_delivered; -#if PML_BFO - MCA_PML_BFO_RGET_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, btl, des); -#endif /* PML_BFO */ - - /* count bytes of user data actually delivered and check for request completion */ - req_bytes_delivered = mca_pml_bfo_compute_segment_length (btl->btl_seg_size, - (void *) des->des_local, - des->des_local_count, 0); - OPAL_THREAD_ADD_SIZE_T(&sendreq->req_bytes_delivered, req_bytes_delivered); - - send_request_pml_complete_check(sendreq); - /* free the descriptor */ -#if PML_BFO - btl->btl_free(btl, des); - MCA_PML_BFO_CHECK_SENDREQ_RDMA_BML_BTL(bml_btl, btl, sendreq, "RGET"); -#else /* PML_BFO */ - mca_bml_base_free(bml_btl, des); -#endif /* PML_BFO */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - - -/** - * Completion of a control message - return resources. - */ - -static void -mca_pml_bfo_send_ctl_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; - -#if PML_BFO - if(OPAL_UNLIKELY(OMPI_SUCCESS != status)) { - mca_pml_bfo_send_ctl_completion_status_error(des); - return; - } - MCA_PML_BFO_CHECK_SENDREQ_EAGER_BML_BTL(bml_btl, btl, des->des_cbdata, "RGET"); -#endif /* PML_BFO */ - /* check for pending requests */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -/** - * Completion of additional fragments of a large message - may need - * to schedule additional fragments. - */ - -static void -mca_pml_bfo_frag_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)des->des_cbdata; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; - size_t req_bytes_delivered; -#if PML_BFO - sendreq->req_events--; -#endif /* PML_BFO */ - - /* check completion status */ - if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { -#if PML_BFO - sendreq->req_error++; -#else /* PML_BFO */ - /* TSW - FIX */ - opal_output(0, "%s:%d FATAL", __FILE__, __LINE__); - ompi_rte_abort(-1, NULL); -#endif /* PML_BFO */ - } - - /* count bytes of user data actually delivered */ - req_bytes_delivered = mca_pml_bfo_compute_segment_length (btl->btl_seg_size, - (void *) des->des_local, - des->des_local_count, - sizeof(mca_pml_bfo_frag_hdr_t)); - - OPAL_THREAD_ADD_SIZE_T(&sendreq->req_pipeline_depth, -1); - OPAL_THREAD_ADD_SIZE_T(&sendreq->req_bytes_delivered, req_bytes_delivered); - -#if PML_BFO - MCA_PML_BFO_FRAG_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl, - MCA_PML_BFO_HDR_TYPE_FRAG, "FRAG"); -#endif /* PML_BFO */ - if(send_request_pml_complete_check(sendreq) == false) { - mca_pml_bfo_send_request_schedule(sendreq); -#if PML_BFO - MCA_PML_BFO_FRAG_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl, - MCA_PML_BFO_HDR_TYPE_FRAG, - "FRAG (BTL removal)"); -#endif /* PML_BFO */ - } - - /* check for pending requests */ -#if PML_BFO - MCA_PML_BFO_CHECK_SENDREQ_EAGER_BML_BTL(bml_btl, btl, sendreq, "FRAG"); -#endif /* PML_BFO */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -/** - * Buffer the entire message and mark as complete. - */ - -int mca_pml_bfo_send_request_start_buffered( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size) -{ - mca_btl_base_descriptor_t* des; - mca_btl_base_segment_t* segment; - mca_pml_bfo_hdr_t* hdr; - struct iovec iov; - unsigned int iov_count; - size_t max_data, req_bytes_delivered; - int rc; - - /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, - MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_rendezvous_hdr_t) + size, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP); - if( OPAL_UNLIKELY(NULL == des) ) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - segment = des->des_local; - - /* pack the data into the BTL supplied buffer */ - iov.iov_base = (IOVBASE_TYPE*)((unsigned char*)segment->seg_addr.pval + - sizeof(mca_pml_bfo_rendezvous_hdr_t)); - iov.iov_len = size; - iov_count = 1; - max_data = size; - if((rc = opal_convertor_pack( &sendreq->req_send.req_base.req_convertor, - &iov, - &iov_count, - &max_data)) < 0) { - mca_bml_base_free(bml_btl, des); - return rc; - } - req_bytes_delivered = max_data; - - /* build rendezvous header */ - hdr = (mca_pml_bfo_hdr_t*)segment->seg_addr.pval; - hdr->hdr_common.hdr_flags = 0; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RNDV; - hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; - hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; - hdr->hdr_rndv.hdr_src_req.pval = sendreq; -#if PML_BFO - MCA_PML_BFO_CHECK_FOR_RNDV_RESTART(hdr, sendreq, "RNDV(buffered)"); -#endif /* PML_BFO */ - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_RNDV, - sendreq->req_send.req_base.req_proc); - - /* update lengths */ - segment->seg_len = sizeof(mca_pml_bfo_rendezvous_hdr_t) + max_data; - - des->des_cbfunc = mca_pml_bfo_rndv_completion; - des->des_cbdata = sendreq; - - /* buffer the remainder of the message */ - rc = mca_pml_base_bsend_request_alloc((ompi_request_t*)sendreq); - if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - mca_bml_base_free(bml_btl, des); - return rc; - } - - iov.iov_base = (IOVBASE_TYPE*)(((unsigned char*)sendreq->req_send.req_addr) + max_data); - iov.iov_len = max_data = sendreq->req_send.req_bytes_packed - max_data; - - if((rc = opal_convertor_pack( &sendreq->req_send.req_base.req_convertor, - &iov, - &iov_count, - &max_data)) < 0) { - mca_bml_base_free(bml_btl, des); - return rc; - } - - /* re-init convertor for packed data */ - opal_convertor_prepare_for_send( &sendreq->req_send.req_base.req_convertor, - &(ompi_mpi_byte.dt.super), - sendreq->req_send.req_bytes_packed, - sendreq->req_send.req_addr ); - - /* wait for ack and completion */ - sendreq->req_state = 2; - - /* request is complete at mpi level */ - OPAL_THREAD_LOCK(&ompi_request_lock); - MCA_PML_BFO_SEND_REQUEST_MPI_COMPLETE(sendreq, true); - OPAL_THREAD_UNLOCK(&ompi_request_lock); - - /* send */ - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_RNDV); - if( OPAL_LIKELY( rc >= 0 ) ) { - if( OPAL_LIKELY( 1 == rc ) ) { - mca_pml_bfo_rndv_completion_request( bml_btl, sendreq, req_bytes_delivered); - } -#if PML_BFO - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - sendreq->req_events++; - } -#endif /* PML_BFO */ - return OMPI_SUCCESS; - } - mca_bml_base_free(bml_btl, des ); - return rc; -} - - -/** - * We work on a buffered request with a size smaller than the eager size - * or the BTL is not able to send the data IN_PLACE. Request a segment - * that is used for initial hdr and any eager data. This is used only - * from the _START macro. - */ -int mca_pml_bfo_send_request_start_copy( mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size ) -{ - mca_btl_base_descriptor_t* des = NULL; - mca_btl_base_segment_t* segment; - mca_pml_bfo_hdr_t* hdr; - struct iovec iov; - unsigned int iov_count; - size_t max_data = size; - int rc; - - if(NULL != bml_btl->btl->btl_sendi) { - mca_pml_bfo_match_hdr_t match; - match.hdr_common.hdr_flags = 0; - match.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_MATCH; - match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - match.hdr_tag = sendreq->req_send.req_base.req_tag; - match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - - bfo_hdr_hton(&match, MCA_PML_BFO_HDR_TYPE_MATCH, - sendreq->req_send.req_base.req_proc); - - /* try to send immediately */ - rc = mca_bml_base_sendi( bml_btl, &sendreq->req_send.req_base.req_convertor, - &match, OMPI_PML_BFO_MATCH_HDR_LEN, - size, MCA_BTL_NO_ORDER, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, - MCA_PML_BFO_HDR_TYPE_MATCH, - &des); - if( OPAL_LIKELY(OMPI_SUCCESS == rc) ) { -#if PML_BFO - /* Needed in case of failover */ - if (NULL != des) { - des->des_cbfunc = mca_pml_bfo_match_completion_free; - des->des_cbdata = sendreq->req_endpoint; - } -#endif /* PML_BFO */ - /* signal request completion */ - send_request_pml_complete(sendreq); - - /* check for pending requests */ - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); - return OMPI_SUCCESS; - } - } else { - /* allocate descriptor */ - mca_bml_base_alloc( bml_btl, &des, - MCA_BTL_NO_ORDER, - OMPI_PML_BFO_MATCH_HDR_LEN + size, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP); - } - if( OPAL_UNLIKELY(NULL == des) ) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - segment = des->des_local; - - if(size > 0) { - /* pack the data into the supplied buffer */ - iov.iov_base = (IOVBASE_TYPE*)((unsigned char*)segment->seg_addr.pval + - OMPI_PML_BFO_MATCH_HDR_LEN); - iov.iov_len = size; - iov_count = 1; - /* - * Before copy the user buffer, make the target part - * accessible. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - (void)opal_convertor_pack( &sendreq->req_send.req_base.req_convertor, - &iov, &iov_count, &max_data ); - /* - * Packing finished, make the user buffer unaccessable. - */ - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - } - - - /* build match header */ - hdr = (mca_pml_bfo_hdr_t*)segment->seg_addr.pval; - hdr->hdr_common.hdr_flags = 0; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_MATCH; - hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; - hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_MATCH, - sendreq->req_send.req_base.req_proc); - - /* update lengths */ - segment->seg_len = OMPI_PML_BFO_MATCH_HDR_LEN + max_data; - - /* short message */ - des->des_cbdata = sendreq; - des->des_cbfunc = mca_pml_bfo_match_completion_free; - - /* send */ - rc = mca_bml_base_send_status(bml_btl, des, MCA_PML_BFO_HDR_TYPE_MATCH); - if( OPAL_LIKELY( rc >= OMPI_SUCCESS ) ) { - if( OPAL_LIKELY( 1 == rc ) ) { - mca_pml_bfo_match_completion_free_request( bml_btl, sendreq ); - } - return OMPI_SUCCESS; - } - if (OMPI_ERR_RESOURCE_BUSY == rc) { - /* No more resources. Allow the upper level to queue the send */ - rc = OMPI_ERR_OUT_OF_RESOURCE; - } - - mca_bml_base_free (bml_btl, des); - - return rc; -} - -/** - * BTL can send directly from user buffer so allow the BTL - * to prepare the segment list. Start sending a small message. - */ - -int mca_pml_bfo_send_request_start_prepare( mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size ) -{ - mca_btl_base_descriptor_t* des; - mca_btl_base_segment_t* segment; - mca_pml_bfo_hdr_t* hdr; - int rc; - - /* prepare descriptor */ - mca_bml_base_prepare_src( bml_btl, - NULL, - &sendreq->req_send.req_base.req_convertor, - MCA_BTL_NO_ORDER, - OMPI_PML_BFO_MATCH_HDR_LEN, - &size, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, - &des ); - if( OPAL_UNLIKELY(NULL == des) ) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - segment = des->des_local; - - /* build match header */ - hdr = (mca_pml_bfo_hdr_t*)segment->seg_addr.pval; - hdr->hdr_common.hdr_flags = 0; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_MATCH; - hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; - hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_MATCH, - sendreq->req_send.req_base.req_proc); - - /* short message */ - des->des_cbfunc = mca_pml_bfo_match_completion_free; - des->des_cbdata = sendreq; - - /* send */ - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_MATCH); - if( OPAL_LIKELY( rc >= 0 ) ) { - if( OPAL_LIKELY( 1 == rc ) ) { - mca_pml_bfo_match_completion_free_request( bml_btl, sendreq ); - } - return OMPI_SUCCESS; - } - mca_bml_base_free(bml_btl, des ); - return rc; -} - - -/** - * We have contigous data that is registered - schedule across - * available nics. - */ - -int mca_pml_bfo_send_request_start_rdma( mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size ) -{ - /* - * When req_rdma array is constructed the first element of the array always - * assigned different btl in round robin fashion (if there are more than - * one RDMA capable BTLs). This way round robin distribution of RDMA - * operation is achieved. - */ - - mca_btl_base_descriptor_t* des, *src = NULL; - mca_btl_base_segment_t* segment; - mca_pml_bfo_hdr_t* hdr; - bool need_local_cb = false; - int rc; - - bml_btl = sendreq->req_rdma[0].bml_btl; - if((sendreq->req_rdma_cnt == 1) && (bml_btl->btl_flags & (MCA_BTL_FLAGS_GET | MCA_BTL_FLAGS_CUDA_GET))) { - mca_mpool_base_registration_t* reg = sendreq->req_rdma[0].btl_reg; - size_t seg_size; - size_t old_position = sendreq->req_send.req_base.req_convertor.bConverted; - - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - /* prepare source descriptor/segment(s) */ - /* PML owns this descriptor and will free it in */ - /* get_completion */ - mca_bml_base_prepare_src( bml_btl, - reg, - &sendreq->req_send.req_base.req_convertor, - MCA_BTL_NO_ORDER, - 0, - &size, - MCA_BTL_DES_FLAGS_GET, - &src ); - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - if( OPAL_UNLIKELY(NULL == src) ) { - opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, - &old_position); - return OMPI_ERR_OUT_OF_RESOURCE; - } - src->des_cbfunc = mca_pml_bfo_rget_completion; - src->des_cbdata = sendreq; - - seg_size = bml_btl->btl->btl_seg_size * src->des_local_count; - - /* allocate space for get hdr + segment list */ - mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_rget_hdr_t) + seg_size, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP); - if( OPAL_UNLIKELY(NULL == des) ) { - opal_convertor_set_position( &sendreq->req_send.req_base.req_convertor, - &old_position ); - mca_bml_base_free(bml_btl, src); - return OMPI_ERR_OUT_OF_RESOURCE; - } - segment = des->des_local; - - /* build match header */ - hdr = (mca_pml_bfo_hdr_t*)segment->seg_addr.pval; - hdr->hdr_common.hdr_flags = MCA_PML_BFO_HDR_FLAGS_CONTIG|MCA_PML_BFO_HDR_FLAGS_PIN; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RGET; - hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; - hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; - hdr->hdr_rndv.hdr_src_req.pval = sendreq; -#if PML_BFO - MCA_PML_BFO_CHECK_FOR_RNDV_RESTART(hdr, sendreq, "RGET"); -#endif /* PML_BFO */ - hdr->hdr_rget.hdr_des.pval = src; - hdr->hdr_rget.hdr_seg_cnt = src->des_local_count; - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_RGET, - sendreq->req_send.req_base.req_proc); - - /* copy segment data */ - memmove (&hdr->hdr_rget + 1, src->des_local, seg_size); - - des->des_cbfunc = mca_pml_bfo_send_ctl_completion; - - /** - * Well, it's a get so we will not know when the peer get the data anyway. - * If we generate the PERUSE event here, at least we will know when do we - * sent the GET message ... - */ - if( sendreq->req_send.req_bytes_packed > 0 ) { - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_BEGIN, - &(sendreq->req_send.req_base), PERUSE_SEND ); - } - - } else { - - /* allocate a rendezvous header - dont eager send any data - * receiver will schedule rdma put(s) of the entire message - */ - - mca_bml_base_alloc(bml_btl, &des, - MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_rendezvous_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP); - if( OPAL_UNLIKELY(NULL == des)) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - segment = des->des_local; - - /* build hdr */ - hdr = (mca_pml_bfo_hdr_t*)segment->seg_addr.pval; - hdr->hdr_common.hdr_flags = MCA_PML_BFO_HDR_FLAGS_CONTIG|MCA_PML_BFO_HDR_FLAGS_PIN; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RNDV; - hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; - hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; - hdr->hdr_rndv.hdr_src_req.pval = sendreq; -#if PML_BFO - MCA_PML_BFO_CHECK_FOR_RNDV_RESTART(hdr, sendreq, "RNDV"); -#endif /* PML_BFO */ - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_RNDV, - sendreq->req_send.req_base.req_proc); - - /* update lengths with number of bytes actually packed */ - segment->seg_len = sizeof(mca_pml_bfo_rendezvous_hdr_t); - - /* first fragment of a long message */ - des->des_cbfunc = mca_pml_bfo_rndv_completion; - need_local_cb = true; - - /* wait for ack and completion */ - sendreq->req_state = 2; - } - - des->des_cbdata = sendreq; - - /* send */ - rc = mca_bml_base_send(bml_btl, des, hdr->hdr_common.hdr_type); - if( OPAL_LIKELY( rc >= 0 ) ) { - if( OPAL_LIKELY( 1 == rc ) && (true == need_local_cb)) { - mca_pml_bfo_rndv_completion_request( bml_btl, sendreq, 0 ); - } -#if PML_BFO - if (MCA_PML_BFO_HDR_TYPE_RNDV == hdr->hdr_common.hdr_type) { - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - sendreq->req_events++; - } - } -#endif /* PML_BFO */ - return OMPI_SUCCESS; - } - mca_bml_base_free(bml_btl, des); - if (NULL != src) { - mca_bml_base_free (bml_btl, src); - } - - return rc; -} - - -/** - * Rendezvous is required. Not doing rdma so eager send up to - * the btls eager limit. - */ - -int mca_pml_bfo_send_request_start_rndv( mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size, - int flags ) -{ - mca_btl_base_descriptor_t* des; - mca_btl_base_segment_t* segment; - mca_pml_bfo_hdr_t* hdr; - int rc; - - /* prepare descriptor */ - if(size == 0) { - mca_bml_base_alloc( bml_btl, - &des, - MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_rendezvous_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP ); - } else { - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - mca_bml_base_prepare_src( bml_btl, - NULL, - &sendreq->req_send.req_base.req_convertor, - MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_rendezvous_hdr_t), - &size, - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, - &des ); - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - } - - if( OPAL_UNLIKELY(NULL == des) ) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - segment = des->des_local; - - /* build hdr */ - hdr = (mca_pml_bfo_hdr_t*)segment->seg_addr.pval; - hdr->hdr_common.hdr_flags = flags; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_RNDV; - hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; - hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; - hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; - hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; - hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; - hdr->hdr_rndv.hdr_src_req.pval = sendreq; -#if PML_BFO - MCA_PML_BFO_CHECK_FOR_RNDV_RESTART(hdr, sendreq, "RNDV"); -#endif /* PML_BFO */ - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_RNDV, - sendreq->req_send.req_base.req_proc); - - /* first fragment of a long message */ - des->des_cbdata = sendreq; - des->des_cbfunc = mca_pml_bfo_rndv_completion; - - /* wait for ack and completion */ - sendreq->req_state = 2; - - /* send */ - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_RNDV); - if( OPAL_LIKELY( rc >= 0 ) ) { - if( OPAL_LIKELY( 1 == rc ) ) { - mca_pml_bfo_rndv_completion_request( bml_btl, sendreq, size ); - } -#if PML_BFO - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - sendreq->req_events++; - } -#endif /* PML_BFO */ - return OMPI_SUCCESS; - } - mca_bml_base_free(bml_btl, des ); - return rc; -} - -void mca_pml_bfo_send_request_copy_in_out( mca_pml_bfo_send_request_t *sendreq, - uint64_t send_offset, - uint64_t send_length ) -{ - mca_pml_bfo_send_range_t *sr; - ompi_free_list_item_t *i; - mca_bml_base_endpoint_t* bml_endpoint = sendreq->req_endpoint; - int num_btls = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_send); - int n; - double weight_total = 0; - - if( OPAL_UNLIKELY(0 == send_length) ) - return; - - OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.send_ranges, i); - - sr = (mca_pml_bfo_send_range_t*)i; - - sr->range_send_offset = send_offset; - sr->range_send_length = send_length; - sr->range_btl_idx = 0; - - for(n = 0; n < num_btls && n < mca_pml_bfo.max_send_per_range; n++) { - sr->range_btls[n].bml_btl = - mca_bml_base_btl_array_get_next(&bml_endpoint->btl_send); - weight_total += sr->range_btls[n].bml_btl->btl_weight; - } - - sr->range_btl_cnt = n; - mca_pml_bfo_calc_weighted_length(sr->range_btls, n, send_length, - weight_total); - - OPAL_THREAD_LOCK(&sendreq->req_send_range_lock); - opal_list_append(&sendreq->req_send_ranges, (opal_list_item_t*)sr); - OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock); -} - -static inline mca_pml_bfo_send_range_t * -get_send_range_nolock(mca_pml_bfo_send_request_t* sendreq) -{ - opal_list_item_t *item; - - item = opal_list_get_first(&sendreq->req_send_ranges); - - if(opal_list_get_end(&sendreq->req_send_ranges) == item) - return NULL; - - return (mca_pml_bfo_send_range_t*)item; -} - -static inline mca_pml_bfo_send_range_t * -get_send_range(mca_pml_bfo_send_request_t* sendreq) -{ - mca_pml_bfo_send_range_t *range; - - OPAL_THREAD_LOCK(&sendreq->req_send_range_lock); - range = get_send_range_nolock(sendreq); - OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock); - - return range; -} - -static inline mca_pml_bfo_send_range_t * -get_next_send_range(mca_pml_bfo_send_request_t* sendreq, - mca_pml_bfo_send_range_t *range) -{ - OPAL_THREAD_LOCK(&sendreq->req_send_range_lock); - opal_list_remove_item(&sendreq->req_send_ranges, (opal_list_item_t *)range); - OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.send_ranges, &range->base); - range = get_send_range_nolock(sendreq); - OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock); - - return range; -} - -/** - * Schedule pipeline of send descriptors for the given request. - * Up to the rdma threshold. If this is a send based protocol, - * the rdma threshold is the end of the message. Otherwise, schedule - * fragments up to the threshold to overlap initial registration/setup - * costs of the rdma. Only one thread can be inside this function. - */ - -int -mca_pml_bfo_send_request_schedule_once(mca_pml_bfo_send_request_t* sendreq) -{ - size_t prev_bytes_remaining = 0; - mca_pml_bfo_send_range_t *range; - int num_fail = 0; - - /* check pipeline_depth here before attempting to get any locks */ - if(true == sendreq->req_throttle_sends && - sendreq->req_pipeline_depth >= mca_pml_bfo.send_pipeline_depth) - return OMPI_SUCCESS; - - range = get_send_range(sendreq); - - while(range && (false == sendreq->req_throttle_sends || - sendreq->req_pipeline_depth < mca_pml_bfo.send_pipeline_depth)) { - mca_pml_bfo_frag_hdr_t* hdr; - mca_btl_base_descriptor_t* des; - int rc, btl_idx; - size_t size, offset, data_remaining = 0; - mca_bml_base_btl_t* bml_btl; - - assert(range->range_send_length != 0); -#if PML_BFO - MCA_PML_BFO_CHECK_FOR_REMOVED_BTL(sendreq, range); -#endif /* PML_BFO */ - - if(prev_bytes_remaining == range->range_send_length) - num_fail++; - else - num_fail = 0; - - prev_bytes_remaining = range->range_send_length; - - if( OPAL_UNLIKELY(num_fail == range->range_btl_cnt) ) { - assert(sendreq->req_pending == MCA_PML_BFO_SEND_PENDING_NONE); - add_request_to_send_pending(sendreq, - MCA_PML_BFO_SEND_PENDING_SCHEDULE, true); - /* Note that request remains locked. send_request_process_pending() - * function will call shedule_exclusive() directly without taking - * the lock */ - return OMPI_ERR_OUT_OF_RESOURCE; - } - -cannot_pack: - do { - btl_idx = range->range_btl_idx; - if(++range->range_btl_idx == range->range_btl_cnt) - range->range_btl_idx = 0; - } while(!range->range_btls[btl_idx].length); - - bml_btl = range->range_btls[btl_idx].bml_btl; - /* If there is a remaining data from another BTL that was too small - * for converter to pack then send it through another BTL */ - range->range_btls[btl_idx].length += data_remaining; - size = range->range_btls[btl_idx].length; - - /* makes sure that we don't exceed BTL max send size */ - if(bml_btl->btl->btl_max_send_size != 0) { - size_t max_send_size = bml_btl->btl->btl_max_send_size - - sizeof(mca_pml_bfo_frag_hdr_t); - - if (size > max_send_size) { - size = max_send_size; - } - } - - /* pack into a descriptor */ - offset = (size_t)range->range_send_offset; - opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, - &offset); - range->range_send_offset = (uint64_t)offset; - - data_remaining = size; - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_defined, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - mca_bml_base_prepare_src(bml_btl, NULL, - &sendreq->req_send.req_base.req_convertor, - MCA_BTL_NO_ORDER, - sizeof(mca_pml_bfo_frag_hdr_t), - &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK, &des); - MEMCHECKER( - memchecker_call(&opal_memchecker_base_mem_noaccess, - sendreq->req_send.req_base.req_addr, - sendreq->req_send.req_base.req_count, - sendreq->req_send.req_base.req_datatype); - ); - - if( OPAL_UNLIKELY(des == NULL || size == 0) ) { - if(des) { - /* Converter can't pack this chunk. Append to another chunk - * from other BTL */ - mca_bml_base_free(bml_btl, des); - range->range_btls[btl_idx].length -= data_remaining; - goto cannot_pack; - } - continue; - } - - des->des_cbfunc = mca_pml_bfo_frag_completion; - des->des_cbdata = sendreq; - - /* setup header */ - hdr = (mca_pml_bfo_frag_hdr_t*)des->des_local->seg_addr.pval; - hdr->hdr_common.hdr_flags = 0; - hdr->hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_FRAG; - hdr->hdr_frag_offset = range->range_send_offset; - hdr->hdr_src_req.pval = sendreq; - hdr->hdr_dst_req = sendreq->req_recv; - - bfo_hdr_hton(hdr, MCA_PML_BFO_HDR_TYPE_FRAG, - sendreq->req_send.req_base.req_proc); - -#if OMPI_WANT_PERUSE - PERUSE_TRACE_COMM_OMPI_EVENT(PERUSE_COMM_REQ_XFER_CONTINUE, - &(sendreq->req_send.req_base), size, PERUSE_SEND); -#endif /* OMPI_WANT_PERUSE */ - - /* initiate send - note that this may complete before the call returns */ - rc = mca_bml_base_send(bml_btl, des, MCA_PML_BFO_HDR_TYPE_FRAG); - if( OPAL_LIKELY(rc >= 0) ) { - /* update state */ - range->range_btls[btl_idx].length -= size; - range->range_send_length -= size; - range->range_send_offset += size; - OPAL_THREAD_ADD_SIZE_T(&sendreq->req_pipeline_depth, 1); - if(range->range_send_length == 0) { - range = get_next_send_range(sendreq, range); - prev_bytes_remaining = 0; - } -#if PML_BFO - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - sendreq->req_events++; - } -#endif /* PML_BFO */ - } else { - mca_bml_base_free(bml_btl,des); - } - } - - return OMPI_SUCCESS; -} - - -/** - * An RDMA put operation has completed: - * (1) Update request status and if required set completed - * (2) Send FIN control message to the destination - */ - -static void mca_pml_bfo_put_completion( mca_btl_base_module_t* btl, - struct mca_btl_base_endpoint_t* ep, - struct mca_btl_base_descriptor_t* des, - int status ) -{ - mca_pml_bfo_rdma_frag_t* frag = (mca_pml_bfo_rdma_frag_t*)des->des_cbdata; - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)frag->rdma_req; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; - - /* check completion status */ - if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { -#if PML_BFO - sendreq->req_error++; -#else /* PML_BFO */ - /* TSW - FIX */ - OMPI_ERROR_LOG(status); - ompi_rte_abort(-1, NULL); -#endif /* PML_BFO */ - } -#if PML_BFO - sendreq->req_events--; - MCA_PML_BFO_PUT_COMPLETION_SENDREQ_ERROR_CHECK(sendreq, status, btl); - MCA_PML_BFO_CHECK_SENDREQ_EAGER_BML_BTL(bml_btl, btl, sendreq, "RDMA write"); -#endif /* PML_BFO */ - - mca_pml_bfo_send_fin(sendreq->req_send.req_base.req_proc, - bml_btl, - frag->rdma_hdr.hdr_rdma.hdr_des, -#if PML_BFO - des->order, 0, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_send.req_base.req_comm->c_my_rank); -#else /* PML_BFO */ - des->order, 0); -#endif /* PML_BFO */ - - /* check for request completion */ - OPAL_THREAD_ADD_SIZE_T(&sendreq->req_bytes_delivered, frag->rdma_length); - - send_request_pml_complete_check(sendreq); - - MCA_PML_BFO_RDMA_FRAG_RETURN(frag); - - MCA_PML_BFO_PROGRESS_PENDING(bml_btl); -} - -int mca_pml_bfo_send_request_put_frag( mca_pml_bfo_rdma_frag_t* frag ) -{ - mca_mpool_base_registration_t* reg = NULL; - mca_bml_base_btl_t* bml_btl = frag->rdma_bml; - mca_btl_base_descriptor_t* des; - size_t save_size = frag->rdma_length; - int rc; - - /* setup descriptor */ - mca_bml_base_prepare_src( bml_btl, - reg, - &frag->convertor, - MCA_BTL_NO_ORDER, - 0, - &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | - MCA_BTL_DES_FLAGS_PUT, - &des ); - - if( OPAL_UNLIKELY(NULL == des) ) { - if(frag->retries < mca_pml_bfo.rdma_put_retries_limit) { - size_t offset = (size_t)frag->rdma_hdr.hdr_rdma.hdr_rdma_offset; - frag->rdma_length = save_size; - opal_convertor_set_position(&frag->convertor, &offset); - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.rdma_pending, (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - } else { - mca_pml_bfo_send_request_t *sendreq = - (mca_pml_bfo_send_request_t*)frag->rdma_req; - - /* tell receiver to unregister memory */ - mca_pml_bfo_send_fin(sendreq->req_send.req_base.req_proc, - bml_btl, frag->rdma_hdr.hdr_rdma.hdr_des, -#if PML_BFO - MCA_BTL_NO_ORDER, 1, (uint16_t)sendreq->req_send.req_base.req_sequence, - sendreq->req_restartseq, sendreq->req_send.req_base.req_comm->c_contextid, - sendreq->req_send.req_base.req_comm->c_my_rank); -#else /* PML_BFO */ - MCA_BTL_NO_ORDER, 1); -#endif /* PML_BFO */ - - /* send fragment by copy in/out */ - mca_pml_bfo_send_request_copy_in_out(sendreq, - frag->rdma_hdr.hdr_rdma.hdr_rdma_offset, frag->rdma_length); - /* if a pointer to a receive request is not set it means that - * ACK was not yet received. Don't schedule sends before ACK */ - if(NULL != sendreq->req_recv.pval) - mca_pml_bfo_send_request_schedule(sendreq); - } - return OMPI_ERR_OUT_OF_RESOURCE; - } - - des->des_remote = (mca_btl_base_segment_t *) frag->rdma_segs; - des->des_remote_count = frag->rdma_hdr.hdr_rdma.hdr_seg_cnt; - des->des_cbfunc = mca_pml_bfo_put_completion; - des->des_cbdata = frag; - - PERUSE_TRACE_COMM_OMPI_EVENT( PERUSE_COMM_REQ_XFER_CONTINUE, - &(((mca_pml_bfo_send_request_t*)frag->rdma_req)->req_send.req_base), save_size, PERUSE_SEND ); - - rc = mca_bml_base_put(bml_btl, des); - if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - mca_bml_base_free(bml_btl, des); - frag->rdma_length = save_size; - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - opal_list_append(&mca_pml_bfo.rdma_pending, (opal_list_item_t*)frag); - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - return OMPI_ERR_OUT_OF_RESOURCE; - } else { - /* TSW - FIX */ - OMPI_ERROR_LOG(rc); - ompi_rte_abort(-1, NULL); - } - } -#if PML_BFO - if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { - ((mca_pml_bfo_send_request_t*)frag->rdma_req)->req_events++; - } -#endif /* PML_BFO */ - return OMPI_SUCCESS; -} - -/** - * Receiver has scheduled an RDMA operation: - * (1) Allocate an RDMA fragment to maintain the state of the operation - * (2) Call BTL prepare_src to pin/prepare source buffers - * (3) Queue the RDMA put - */ - -void mca_pml_bfo_send_request_put( mca_pml_bfo_send_request_t* sendreq, - mca_btl_base_module_t* btl, - mca_pml_bfo_rdma_hdr_t* hdr ) -{ - mca_bml_base_endpoint_t *bml_endpoint = sendreq->req_endpoint; - mca_pml_bfo_rdma_frag_t* frag; - size_t i, size = 0; - - if(hdr->hdr_common.hdr_flags & MCA_PML_BFO_HDR_TYPE_ACK) { - OPAL_THREAD_ADD32(&sendreq->req_state, -1); - } -#if PML_BFO - MCA_PML_BFO_VERIFY_SENDREQ_REQ_STATE_VALUE(sendreq); - sendreq->req_recv = hdr->hdr_dst_req; /* only needed once, but it is OK */ -#endif /* PML_BFO */ - - MCA_PML_BFO_RDMA_FRAG_ALLOC(frag); - if( OPAL_UNLIKELY(NULL == frag) ) { - /* TSW - FIX */ - OMPI_ERROR_LOG(OMPI_ERR_OUT_OF_RESOURCE); - ompi_rte_abort(-1, NULL); - } - - assert (btl->btl_seg_size * hdr->hdr_seg_cnt <= sizeof (frag->rdma_segs)); - - /* setup fragment */ - memmove (frag->rdma_segs, hdr + 1, btl->btl_seg_size * hdr->hdr_seg_cnt); - - for( i = 0; i < hdr->hdr_seg_cnt; i++ ) { - mca_btl_base_segment_t *seg = (mca_btl_base_segment_t *) ((uintptr_t)(frag->rdma_segs) + i * btl->btl_seg_size); - -#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT - if ((sendreq->req_send.req_base.req_proc->super.proc_arch & OPAL_ARCH_ISBIGENDIAN) != - (ompi_proc_local()->super.proc_arch & OPAL_ARCH_ISBIGENDIAN)) { - size += opal_swap_bytes4(seg->seg_len); - } else -#endif - { - size += seg->seg_len; - } - } - - frag->rdma_bml = mca_bml_base_btl_array_find(&bml_endpoint->btl_rdma, btl); -#if PML_BFO - MCA_PML_BFO_CHECK_FOR_REMOVED_BML(sendreq, frag, btl); - frag->rdma_btl = btl; /* in case frag ends up on pending */ -#endif /* PML_BFO */ - frag->rdma_hdr.hdr_rdma = *hdr; - frag->rdma_req = sendreq; - frag->rdma_ep = bml_endpoint; - frag->rdma_length = size; - frag->rdma_state = MCA_PML_BFO_RDMA_PUT; - frag->reg = NULL; - frag->retries = 0; - - /* lookup the corresponding registration */ - for(i=0; ireq_rdma_cnt; i++) { - if(sendreq->req_rdma[i].bml_btl == frag->rdma_bml) { - frag->reg = sendreq->req_rdma[i].btl_reg; - break; - } - } - - /* RDMA writes may proceed in parallel to send and to each other, so - * create clone of the convertor for each RDMA fragment - */ - size = hdr->hdr_rdma_offset; - opal_convertor_clone_with_position(&sendreq->req_send.req_base.req_convertor, - &frag->convertor, 0, &size); - - mca_pml_bfo_send_request_put_frag(frag); -} - diff --git a/ompi/mca/pml/bfo/pml_bfo_sendreq.h b/ompi/mca/pml/bfo/pml_bfo_sendreq.h deleted file mode 100644 index cd8419c6ce4..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_sendreq.h +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2014 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-2012 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef OMPI_PML_BFO_SEND_REQUEST_H -#define OMPI_PML_BFO_SEND_REQUEST_H - -#include "opal/mca/btl/btl.h" -#include "opal/mca/mpool/base/base.h" -#include "opal/datatype/opal_convertor.h" -#include "ompi/mca/pml/base/pml_base_sendreq.h" -#include "pml_bfo_comm.h" -#include "pml_bfo_hdr.h" -#include "pml_bfo_rdma.h" -#include "pml_bfo_rdmafrag.h" -#include "ompi/mca/bml/bml.h" - -BEGIN_C_DECLS - -typedef enum { - MCA_PML_BFO_SEND_PENDING_NONE, - MCA_PML_BFO_SEND_PENDING_SCHEDULE, - MCA_PML_BFO_SEND_PENDING_START -} mca_pml_bfo_send_pending_t; - -struct mca_pml_bfo_send_request_t { - mca_pml_base_send_request_t req_send; - mca_bml_base_endpoint_t* req_endpoint; - opal_ptr_t req_recv; -#if PML_BFO - int32_t req_events; /* number of outstanding events on request */ - int32_t req_restartseq; /* sequence number of restarted request */ - int32_t req_restart; /* state of restarted request */ - int32_t req_error; /* non-zero when error has occurred on request */ -#endif /* PML_BFO */ - int32_t req_state; - int32_t req_lock; - bool req_throttle_sends; - size_t req_pipeline_depth; - size_t req_bytes_delivered; - uint32_t req_rdma_cnt; - mca_pml_bfo_send_pending_t req_pending; - opal_mutex_t req_send_range_lock; - opal_list_t req_send_ranges; - mca_pml_bfo_com_btl_t req_rdma[1]; -}; -typedef struct mca_pml_bfo_send_request_t mca_pml_bfo_send_request_t; - -OBJ_CLASS_DECLARATION(mca_pml_bfo_send_request_t); - -struct mca_pml_bfo_send_range_t { - ompi_free_list_item_t base; - uint64_t range_send_offset; - uint64_t range_send_length; - int range_btl_idx; - int range_btl_cnt; - mca_pml_bfo_com_btl_t range_btls[1]; -}; -typedef struct mca_pml_bfo_send_range_t mca_pml_bfo_send_range_t; -OBJ_CLASS_DECLARATION(mca_pml_bfo_send_range_t); - -static inline bool lock_send_request(mca_pml_bfo_send_request_t *sendreq) -{ - return OPAL_THREAD_ADD32(&sendreq->req_lock, 1) == 1; -} - -static inline bool unlock_send_request(mca_pml_bfo_send_request_t *sendreq) -{ - return OPAL_THREAD_ADD32(&sendreq->req_lock, -1) == 0; -} - -static inline void -add_request_to_send_pending(mca_pml_bfo_send_request_t* sendreq, - const mca_pml_bfo_send_pending_t type, - const bool append) -{ - opal_list_item_t *item = (opal_list_item_t*)sendreq; - - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - sendreq->req_pending = type; - if(append) - opal_list_append(&mca_pml_bfo.send_pending, item); - else - opal_list_prepend(&mca_pml_bfo.send_pending, item); - - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); -} - -static inline mca_pml_bfo_send_request_t* -get_request_from_send_pending(mca_pml_bfo_send_pending_t *type) -{ - mca_pml_bfo_send_request_t *sendreq; - - OPAL_THREAD_LOCK(&mca_pml_bfo.lock); - sendreq = (mca_pml_bfo_send_request_t*) - opal_list_remove_first(&mca_pml_bfo.send_pending); - if(sendreq) { - *type = sendreq->req_pending; - sendreq->req_pending = MCA_PML_BFO_SEND_PENDING_NONE; - } - OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); - - return sendreq; -} - -#define MCA_PML_BFO_SEND_REQUEST_ALLOC( comm, \ - dst, \ - sendreq) \ - { \ - ompi_proc_t *proc = ompi_comm_peer_lookup( comm, dst ); \ - ompi_free_list_item_t* item; \ - \ - sendreq = NULL; \ - if( OPAL_LIKELY(NULL != proc) ) { \ - OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \ - sendreq = (mca_pml_bfo_send_request_t*)item; \ - sendreq->req_send.req_base.req_proc = proc; \ - } \ - } - - -#define MCA_PML_BFO_SEND_REQUEST_INIT( sendreq, \ - buf, \ - count, \ - datatype, \ - dst, \ - tag, \ - comm, \ - sendmode, \ - persistent) \ - { \ - MCA_PML_BASE_SEND_REQUEST_INIT(&sendreq->req_send, \ - buf, \ - count, \ - datatype, \ - dst, \ - tag, \ - comm, \ - sendmode, \ - persistent, \ - 0); /* convertor_flags */ \ - (sendreq)->req_recv.pval = NULL; \ - } - - -static inline void mca_pml_bfo_free_rdma_resources(mca_pml_bfo_send_request_t* sendreq) -{ - size_t r; - - /* return mpool resources */ - for(r = 0; r < sendreq->req_rdma_cnt; r++) { - mca_mpool_base_registration_t* reg = sendreq->req_rdma[r].btl_reg; - if( NULL != reg && reg->mpool != NULL ) { - reg->mpool->mpool_deregister(reg->mpool, reg); - } - } - sendreq->req_rdma_cnt = 0; -} - - -/** - * Start a send request. - */ - -#define MCA_PML_BFO_SEND_REQUEST_START(sendreq, rc) \ - do { \ - rc = mca_pml_bfo_send_request_start(sendreq); \ - } while (0) - - -/* - * Mark a send request as completed at the MPI level. - */ - -#define MCA_PML_BFO_SEND_REQUEST_MPI_COMPLETE(sendreq, with_signal) \ -do { \ - (sendreq)->req_send.req_base.req_ompi.req_status.MPI_SOURCE = \ - (sendreq)->req_send.req_base.req_comm->c_my_rank; \ - (sendreq)->req_send.req_base.req_ompi.req_status.MPI_TAG = \ - (sendreq)->req_send.req_base.req_tag; \ - (sendreq)->req_send.req_base.req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; \ - (sendreq)->req_send.req_base.req_ompi.req_status._ucount = \ - (sendreq)->req_send.req_bytes_packed; \ - ompi_request_complete( &((sendreq)->req_send.req_base.req_ompi), (with_signal) ); \ - \ - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \ - &(sendreq->req_send.req_base), PERUSE_SEND); \ -} while(0) - -/* - * Release resources associated with a request - */ - -#define MCA_PML_BFO_SEND_REQUEST_RETURN(sendreq) \ - do { \ - /* Let the base handle the reference counts */ \ - MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \ - OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \ - (ompi_free_list_item_t*)sendreq); \ - } while(0) - - -/* - * The PML has completed a send request. Note that this request - * may have been orphaned by the user or have already completed - * at the MPI level. - * This function will never be called directly from the upper level, as it - * should only be an internal call to the PML. - * - */ -static inline void -send_request_pml_complete(mca_pml_bfo_send_request_t *sendreq) -{ - assert(false == sendreq->req_send.req_base.req_pml_complete); - - if(sendreq->req_send.req_bytes_packed > 0) { - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_END, - &(sendreq->req_send.req_base), PERUSE_SEND); - } - - /* return mpool resources */ - mca_pml_bfo_free_rdma_resources(sendreq); - - if (sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED && - sendreq->req_send.req_addr != sendreq->req_send.req_base.req_addr) { - mca_pml_base_bsend_request_fini((ompi_request_t*)sendreq); - } - - OPAL_THREAD_LOCK(&ompi_request_lock); - if(false == sendreq->req_send.req_base.req_ompi.req_complete) { - /* Should only be called for long messages (maybe synchronous) */ - MCA_PML_BFO_SEND_REQUEST_MPI_COMPLETE(sendreq, true); - } else { - if( MPI_SUCCESS != sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR ) { - ompi_mpi_abort(&ompi_mpi_comm_world.comm, MPI_ERR_REQUEST); - } - } - sendreq->req_send.req_base.req_pml_complete = true; -#if PML_BFO - sendreq->req_send.req_base.req_sequence -= 100; -#endif /* PML_BFO */ - - if(sendreq->req_send.req_base.req_free_called) { - MCA_PML_BFO_SEND_REQUEST_RETURN(sendreq); - } - OPAL_THREAD_UNLOCK(&ompi_request_lock); -} - -/* returns true if request was completed on PML level */ -static inline bool -send_request_pml_complete_check(mca_pml_bfo_send_request_t *sendreq) -{ -#if OPAL_ENABLE_MULTI_THREADS - opal_atomic_rmb(); -#endif - /* if no more events are expected for the request and the whole message is - * already sent and send fragment scheduling isn't running in another - * thread then complete the request on PML level. From now on, if user - * called free on this request, the request structure can be reused for - * another request or if the request is persistent it can be restarted */ - if(sendreq->req_state == 0 && - sendreq->req_bytes_delivered >= sendreq->req_send.req_bytes_packed - && lock_send_request(sendreq)) { - send_request_pml_complete(sendreq); - return true; - } - - return false; -} - -/** - * Schedule additional fragments - */ -int -mca_pml_bfo_send_request_schedule_once(mca_pml_bfo_send_request_t*); - -static inline int -mca_pml_bfo_send_request_schedule_exclusive(mca_pml_bfo_send_request_t* sendreq) -{ - int rc; - do { - rc = mca_pml_bfo_send_request_schedule_once(sendreq); - if(rc == OMPI_ERR_OUT_OF_RESOURCE) - break; - } while(!unlock_send_request(sendreq)); - - if(OMPI_SUCCESS == rc) - send_request_pml_complete_check(sendreq); - - return rc; -} - -static inline void -mca_pml_bfo_send_request_schedule(mca_pml_bfo_send_request_t* sendreq) -{ - /* - * Only allow one thread in this routine for a given request. - * However, we cannot block callers on a mutex, so simply keep track - * of the number of times the routine has been called and run through - * the scheduling logic once for every call. - */ - - if(!lock_send_request(sendreq)) - return; - - mca_pml_bfo_send_request_schedule_exclusive(sendreq); -} - -#if OPAL_CUDA_SUPPORT -int mca_pml_bfo_send_request_start_cuda( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size); -#endif /* OPAL_CUDA_SUPPORT */ - -/** - * Start the specified request - */ - -int mca_pml_bfo_send_request_start_buffered( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size); - -int mca_pml_bfo_send_request_start_copy( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size); - -int mca_pml_bfo_send_request_start_prepare( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size); - -int mca_pml_bfo_send_request_start_rdma( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size); - -int mca_pml_bfo_send_request_start_rndv( - mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl, - size_t size, - int flags); - -static inline int -mca_pml_bfo_send_request_start_btl( mca_pml_bfo_send_request_t* sendreq, - mca_bml_base_btl_t* bml_btl ) -{ - size_t size = sendreq->req_send.req_bytes_packed; - mca_btl_base_module_t* btl = bml_btl->btl; - size_t eager_limit = btl->btl_eager_limit - sizeof(mca_pml_bfo_hdr_t); - int rc; - - if( OPAL_LIKELY(size <= eager_limit) ) { - switch(sendreq->req_send.req_send_mode) { - case MCA_PML_BASE_SEND_SYNCHRONOUS: - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, size, 0); - break; - case MCA_PML_BASE_SEND_BUFFERED: - rc = mca_pml_bfo_send_request_start_copy(sendreq, bml_btl, size); - break; - case MCA_PML_BASE_SEND_COMPLETE: - rc = mca_pml_bfo_send_request_start_prepare(sendreq, bml_btl, size); - break; - default: - if (size != 0 && bml_btl->btl_flags & MCA_BTL_FLAGS_SEND_INPLACE) { - rc = mca_pml_bfo_send_request_start_prepare(sendreq, bml_btl, size); - } else { - rc = mca_pml_bfo_send_request_start_copy(sendreq, bml_btl, size); - } - break; - } - } else { - size = eager_limit; - if(OPAL_UNLIKELY(btl->btl_rndv_eager_limit < eager_limit)) - size = btl->btl_rndv_eager_limit; - if(sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED) { - rc = mca_pml_bfo_send_request_start_buffered(sendreq, bml_btl, size); - } else if - (opal_convertor_need_buffers(&sendreq->req_send.req_base.req_convertor) == false) { - unsigned char *base; - opal_convertor_get_current_pointer( &sendreq->req_send.req_base.req_convertor, (void**)&base ); - - if( 0 != (sendreq->req_rdma_cnt = (uint32_t)mca_pml_bfo_rdma_btls( - sendreq->req_endpoint, - base, - sendreq->req_send.req_bytes_packed, - sendreq->req_rdma))) { - rc = mca_pml_bfo_send_request_start_rdma(sendreq, bml_btl, - sendreq->req_send.req_bytes_packed); - if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - mca_pml_bfo_free_rdma_resources(sendreq); - } - } else { - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, size, - MCA_PML_BFO_HDR_FLAGS_CONTIG); - } - } else { -#if OPAL_CUDA_SUPPORT - if (sendreq->req_send.req_base.req_convertor.flags & CONVERTOR_CUDA) { - return mca_pml_bfo_send_request_start_cuda(sendreq, bml_btl, size); - } -#endif /* OPAL_CUDA_SUPPORT */ - rc = mca_pml_bfo_send_request_start_rndv(sendreq, bml_btl, size, 0); - } - } - - return rc; -} - -static inline int -mca_pml_bfo_send_request_start( mca_pml_bfo_send_request_t* sendreq ) -{ - mca_pml_bfo_comm_t* comm = sendreq->req_send.req_base.req_comm->c_pml_comm; - mca_bml_base_endpoint_t* endpoint = (mca_bml_base_endpoint_t*) - sendreq->req_send.req_base.req_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; - size_t i; - - if( OPAL_UNLIKELY(endpoint == NULL) ) { - return OMPI_ERR_UNREACH; - } - - sendreq->req_endpoint = endpoint; - sendreq->req_state = 0; - sendreq->req_lock = 0; - sendreq->req_pipeline_depth = 0; - sendreq->req_bytes_delivered = 0; - sendreq->req_pending = MCA_PML_BFO_SEND_PENDING_NONE; - sendreq->req_send.req_base.req_sequence = OPAL_THREAD_ADD32( - &comm->procs[sendreq->req_send.req_base.req_peer].send_sequence,1); -#if PML_BFO - sendreq->req_restartseq = 0; /* counts up restarts */ - sendreq->req_restart = 0; /* reset in case we restart again */ - sendreq->req_error = 0; /* clear error state */ - sendreq->req_events = 0; /* clear events, probably 0 anyways */ -#endif /* PML_BFO */ - - MCA_PML_BASE_SEND_START( &sendreq->req_send.req_base ); - - for(i = 0; i < mca_bml_base_btl_array_get_size(&endpoint->btl_eager); i++) { - mca_bml_base_btl_t* bml_btl; - int rc; - - /* select a btl */ - bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); - rc = mca_pml_bfo_send_request_start_btl(sendreq, bml_btl); - if( OPAL_LIKELY(OMPI_ERR_OUT_OF_RESOURCE != rc) ) - return rc; - } - add_request_to_send_pending(sendreq, MCA_PML_BFO_SEND_PENDING_START, true); - - return OMPI_SUCCESS; -} - -/** - * Initiate a put scheduled by the receiver. - */ - -void mca_pml_bfo_send_request_put( mca_pml_bfo_send_request_t* sendreq, - mca_btl_base_module_t* btl, - mca_pml_bfo_rdma_hdr_t* hdr ); - -int mca_pml_bfo_send_request_put_frag(mca_pml_bfo_rdma_frag_t* frag); - -/* This function tries to continue sendreq that was stuck because of resource - * unavailability. A sendreq may be added to send_pending list if there is no - * resource to send initial packet or there is not resource to schedule data - * for sending. The reason the sendreq was added to the list is stored inside - * sendreq struct and appropriate operation is retried when resource became - * available. bml_btl passed to the function doesn't represents sendreq - * destination, it represents BTL on which resource was freed, so only this BTL - * should be considered for sending packets */ -void mca_pml_bfo_send_request_process_pending(mca_bml_base_btl_t *bml_btl); - -void mca_pml_bfo_send_request_copy_in_out(mca_pml_bfo_send_request_t *sendreq, - uint64_t send_offset, uint64_t send_length); - -END_C_DECLS - -#endif /* OMPI_PML_BFO_SEND_REQUEST_H */ diff --git a/ompi/mca/pml/bfo/pml_bfo_start.c b/ompi/mca/pml/bfo/pml_bfo_start.c deleted file mode 100644 index f9c166d6a45..00000000000 --- a/ompi/mca/pml/bfo/pml_bfo_start.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2007 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "pml_bfo.h" -#include "pml_bfo_recvreq.h" -#include "pml_bfo_sendreq.h" -#include "ompi/memchecker.h" - - -int mca_pml_bfo_start(size_t count, ompi_request_t** requests) -{ - int rc; - size_t i; - bool reuse_old_request = true; - - for(i=0; ireq_type) { - continue; - } - - /* If the persistent request is currently active - obtain the - * request lock and verify the status is incomplete. if the - * pml layer has not completed the request - mark the request - * as free called - so that it will be freed when the request - * completes - and create a new request. - */ - - reuse_old_request = true; - switch(pml_request->req_ompi.req_state) { - case OMPI_REQUEST_INACTIVE: - if(pml_request->req_pml_complete == true) - break; - /* otherwise fall through */ - case OMPI_REQUEST_ACTIVE: { - - ompi_request_t *request; - OPAL_THREAD_LOCK(&ompi_request_lock); - if (pml_request->req_pml_complete == false) { - /* free request after it completes */ - pml_request->req_free_called = true; - } else { - /* can reuse the existing request */ - OPAL_THREAD_UNLOCK(&ompi_request_lock); - break; - } - - reuse_old_request = false; - /* allocate a new request */ - switch(pml_request->req_type) { - case MCA_PML_REQUEST_SEND: { - mca_pml_base_send_mode_t sendmode = - ((mca_pml_base_send_request_t*)pml_request)->req_send_mode; - rc = mca_pml_bfo_isend_init( - pml_request->req_addr, - pml_request->req_count, - pml_request->req_datatype, - pml_request->req_peer, - pml_request->req_tag, - sendmode, - pml_request->req_comm, - &request); - break; - } - case MCA_PML_REQUEST_RECV: - rc = mca_pml_bfo_irecv_init( - pml_request->req_addr, - pml_request->req_count, - pml_request->req_datatype, - pml_request->req_peer, - pml_request->req_tag, - pml_request->req_comm, - &request); - break; - default: - rc = OMPI_ERR_REQUEST; - break; - } - OPAL_THREAD_UNLOCK(&ompi_request_lock); - if(OMPI_SUCCESS != rc) - return rc; - pml_request = (mca_pml_base_request_t*)request; - requests[i] = request; - break; - } - default: - return OMPI_ERR_REQUEST; - } - - /* start the request */ - switch(pml_request->req_type) { - case MCA_PML_REQUEST_SEND: - { - mca_pml_bfo_send_request_t* sendreq = (mca_pml_bfo_send_request_t*)pml_request; - MEMCHECKER( - memchecker_call(&opal_memchecker_base_isdefined, - pml_request->req_addr, pml_request->req_count, - pml_request->req_datatype); - ); - if( reuse_old_request && (sendreq->req_send.req_bytes_packed != 0) ) { - size_t offset = 0; - /** - * Reset the convertor in case we're dealing with the original - * request, which when completed do not reset the convertor. - */ - opal_convertor_set_position( &sendreq->req_send.req_base.req_convertor, - &offset ); - } - MCA_PML_BFO_SEND_REQUEST_START(sendreq, rc); - if(rc != OMPI_SUCCESS) - return rc; - break; - } - case MCA_PML_REQUEST_RECV: - { - mca_pml_bfo_recv_request_t* recvreq = (mca_pml_bfo_recv_request_t*)pml_request; - MCA_PML_BFO_RECV_REQUEST_START(recvreq); - break; - } - default: - return OMPI_ERR_REQUEST; - } - } - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/pml/bfo/post_configure.sh b/ompi/mca/pml/bfo/post_configure.sh deleted file mode 100644 index 77a7d52608a..00000000000 --- a/ompi/mca/pml/bfo/post_configure.sh +++ /dev/null @@ -1 +0,0 @@ -DIRECT_CALL_HEADER="ompi/mca/pml/bfo/pml_bfo.h" From 724c85be9c4e0dfa220f87032d9cf8bb2c7fbe2a Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 24 Jun 2015 20:40:12 -0700 Subject: [PATCH 0005/1704] Add a common/libfabric component to the opal layer where we can place common functions (cherry picked from commit ea0e21bb067ff8f1325bef891fbe168a7ec89535) --- ompi/mca/mtl/ofi/Makefile.am | 6 +- ompi/mca/mtl/ofi/configure.m4 | 5 +- opal/mca/common/libfabric/Makefile.am | 102 +++++++++++++++++++ opal/mca/common/libfabric/common_libfabric.c | 21 ++++ opal/mca/common/libfabric/common_libfabric.h | 16 +++ opal/mca/common/libfabric/configure.m4 | 31 ++++++ opal/mca/common/libfabric/owner.txt | 7 ++ 7 files changed, 185 insertions(+), 3 deletions(-) create mode 100644 opal/mca/common/libfabric/Makefile.am create mode 100644 opal/mca/common/libfabric/common_libfabric.c create mode 100644 opal/mca/common/libfabric/common_libfabric.h create mode 100644 opal/mca/common/libfabric/configure.m4 create mode 100644 opal/mca/common/libfabric/owner.txt diff --git a/ompi/mca/mtl/ofi/Makefile.am b/ompi/mca/mtl/ofi/Makefile.am index 7312ba4fdf0..6e8a4caaac0 100644 --- a/ompi/mca/mtl/ofi/Makefile.am +++ b/ompi/mca/mtl/ofi/Makefile.am @@ -11,7 +11,7 @@ EXTRA_DIST = post_configure.sh -AM_CPPFLAGS = $(ompi_mtl_ofi_CPPFLAGS) +AM_CPPFLAGS = $(ompi_mtl_ofi_CPPFLAGS) $(opal_common_libfabric_CPPFLAGS) dist_ompidata_DATA = help-mtl-ofi.txt @@ -43,8 +43,10 @@ mca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources) mca_mtl_ofi_la_LDFLAGS = \ $(ompi_mtl_ofi_LDFLAGS) \ -module -avoid-version -mca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS) +mca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS) \ + $(OPAL_TOP_BUILDDIR)/opal/mca/common/libfabric/lib@OPAL_LIB_PREFIX@mca_common_libfabric.la noinst_LTLIBRARIES = $(component_noinst) libmca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources) libmca_mtl_ofi_la_LDFLAGS = -module -avoid-version + diff --git a/ompi/mca/mtl/ofi/configure.m4 b/ompi/mca/mtl/ofi/configure.m4 index 39bf83ad99a..436083ea66d 100644 --- a/ompi/mca/mtl/ofi/configure.m4 +++ b/ompi/mca/mtl/ofi/configure.m4 @@ -23,7 +23,10 @@ AC_DEFUN([MCA_ompi_mtl_ofi_POST_CONFIG], [ AC_DEFUN([MCA_ompi_mtl_ofi_CONFIG],[ AC_CONFIG_FILES([ompi/mca/mtl/ofi/Makefile]) - OPAL_CHECK_LIBFABRIC([ompi_mtl_ofi], + # ensure we already ran the common libfabric config + AC_REQUIRE([MCA_opal_common_libfabric_CONFIG]) + + AS_IF([test "$opal_common_libfabric_happy" = "yes"], [$1], [$2]) ])dnl diff --git a/opal/mca/common/libfabric/Makefile.am b/opal/mca/common/libfabric/Makefile.am new file mode 100644 index 00000000000..5da6be35cd6 --- /dev/null +++ b/opal/mca/common/libfabric/Makefile.am @@ -0,0 +1,102 @@ +# +# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2004-2013 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. +# Copyright (c) 2004-2009 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-2013 NVIDIA Corporation. All rights reserved. +# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Intel, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# A word of explanation... +# +# This library is linked against various MCA components because the +# support for libfabrics is needed in various places. +# +# Note that building this common component statically and linking +# against other dynamic components is *not* supported! + +AM_CPPFLAGS = $(opal_common_libfabric_CPPFLAGS) + +# Header files + +headers = \ + common_libfabric.h + +# Source files + +sources = \ + common_libfabric.c + +# As per above, we'll either have an installable or noinst result. +# The installable one should follow the same MCA prefix naming rules +# (i.e., libmca__.la). The noinst one can be named +# whatever it wants, although libmca___noinst.la is +# recommended. + +# To simplify components that link to this library, we will *always* +# have an output libtool library named libmca__.la -- even +# for case 2) described above (i.e., so there's no conditional logic +# necessary in component Makefile.am's that link to this library). +# Hence, if we're creating a noinst version of this library (i.e., +# case 2), we sym link it to the libmca__.la name +# (libtool will do the Right Things under the covers). See the +# all-local and clean-local rules, below, for how this is effected. + +lib_LTLIBRARIES = +noinst_LTLIBRARIES = +comp_inst = lib@OPAL_LIB_PREFIX@mca_common_libfabric.la +comp_noinst = lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst.la + +if MCA_BUILD_opal_common_libfabric_DSO +lib_LTLIBRARIES += $(comp_inst) +else +noinst_LTLIBRARIES += $(comp_noinst) +endif + +lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_SOURCES = $(headers) $(sources) +lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_LDFLAGS = \ + $(opal_common_libfabric_LDFLAGS) \ + -version-info $(libmca_opal_common_libfabric_so_version) +lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_LIBADD = $(opal_common_libfabric_LIBS) + +lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_SOURCES = $(headers) $(sources) +lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_LDFLAGS = $(opal_common_libfabric_LDFLAGS) +lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_LIBADD = $(opal_common_libfabric_LIBS) + +# Conditionally install the header files + +if WANT_INSTALL_HEADERS +opaldir = $(opalincludedir)/$(subdir) +opal_HEADERS = $(headers) +endif + +# These two rules will sym link the "noinst" libtool library filename +# to the installable libtool library filename in the case where we are +# compiling this component statically (case 2), described above). + +V=0 +OMPI_V_LN_SCOMP = $(ompi__v_LN_SCOMP_$V) +ompi__v_LN_SCOMP_ = $(ompi__v_LN_SCOMP_$AM_DEFAULT_VERBOSITY) +ompi__v_LN_SCOMP_0 = @echo " LN_S " `basename $(comp_inst)`; + +all-local: + $(OMPI_V_LN_SCOMP) if test -z "$(lib_LTLIBRARIES)"; then \ + rm -f "$(comp_inst)"; \ + $(LN_S) "$(comp_noinst)" "$(comp_inst)"; \ + fi + +clean-local: + if test -z "$(lib_LTLIBRARIES)"; then \ + rm -f "$(comp_inst)"; \ + fi diff --git a/opal/mca/common/libfabric/common_libfabric.c b/opal/mca/common/libfabric/common_libfabric.c new file mode 100644 index 00000000000..cb989af93c5 --- /dev/null +++ b/opal/mca/common/libfabric/common_libfabric.c @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2015 Intel, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "opal_config.h" +#include "opal/constants.h" + +#include +#include + +#include "common_libfabric.h" + +int mca_common_libfabric_register_mca_variables(void) +{ + return OPAL_SUCCESS; +} diff --git a/opal/mca/common/libfabric/common_libfabric.h b/opal/mca/common/libfabric/common_libfabric.h new file mode 100644 index 00000000000..10bc05598f8 --- /dev/null +++ b/opal/mca/common/libfabric/common_libfabric.h @@ -0,0 +1,16 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2015 Intel, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef OPAL_MCA_COMMON_LIBFABRIC_H +#define OPAL_MCA_COMMON_LIBFABRIC_H + +OPAL_DECLSPEC int mca_common_libfabric_register_mca_variables(void); + +#endif /* OPAL_MCA_COMMON_LIBFABRIC_H */ diff --git a/opal/mca/common/libfabric/configure.m4 b/opal/mca/common/libfabric/configure.m4 new file mode 100644 index 00000000000..911e2a9300a --- /dev/null +++ b/opal/mca/common/libfabric/configure.m4 @@ -0,0 +1,31 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. +# Copyright (c) 2013 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. +# Copyright (c) 2015 Intel, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# +# If LIBFABRIC support was requested, then build the LIBFABRIC support library. +# This code checks just makes sure the check was done earlier by the +# opal_check_libfabric.m4 code. +# + +AC_DEFUN([MCA_opal_common_libfabric_CONFIG],[ + AC_CONFIG_FILES([opal/mca/common/libfabric/Makefile]) + + # check for libfabric request + OPAL_CHECK_LIBFABRIC([opal_common_libfabric], + [opal_common_libfabric_happy=yes + $1], + [opal_common_libfabric_happy=no + $2]) + +])dnl diff --git a/opal/mca/common/libfabric/owner.txt b/opal/mca/common/libfabric/owner.txt new file mode 100644 index 00000000000..5fe87e2d40c --- /dev/null +++ b/opal/mca/common/libfabric/owner.txt @@ -0,0 +1,7 @@ +# +# owner/status file +# owner: institution that is responsible for this package +# status: e.g. active, maintenance, unmaintained +# +owner: Intel +status:active From 71989a1216b007ed892880da503fd1d2a09f2dd2 Mon Sep 17 00:00:00 2001 From: Yohann Burette Date: Tue, 9 Jun 2015 11:06:42 -0700 Subject: [PATCH 0006/1704] mtl/ofi: cancels are now tracked by an error entry. (cherry picked from commit 483ff23db1cf42b63fe804a59df1dd28e3d2ceac) --- ompi/mca/mtl/ofi/mtl_ofi.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 48cdee2747a..819dcc9b730 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -524,11 +524,13 @@ ompi_mtl_ofi_recv_error_callback(struct fi_cq_err_entry *error, status->MPI_TAG = MTL_OFI_GET_TAG(ofi_req->match_bits); status->MPI_SOURCE = MTL_OFI_GET_SOURCE(ofi_req->match_bits); - /* FIXME: This could be done on a single line... */ switch (error->err) { case FI_EMSGSIZE: status->MPI_ERROR = MPI_ERR_TRUNCATE; break; + case FI_ECANCELED: + status->_cancelled = true; + break; default: status->MPI_ERROR = MPI_ERR_INTERN; } @@ -638,11 +640,13 @@ ompi_mtl_ofi_mrecv_error_callback(struct fi_cq_err_entry *error, status->MPI_TAG = MTL_OFI_GET_TAG(ofi_req->match_bits); status->MPI_SOURCE = MTL_OFI_GET_SOURCE(ofi_req->match_bits); - /* FIXME: This could be done on a single line... */ switch (error->err) { case FI_EMSGSIZE: status->MPI_ERROR = MPI_ERR_TRUNCATE; break; + case FI_ECANCELED: + status->_cancelled = true; + break; default: status->MPI_ERROR = MPI_ERR_INTERN; } @@ -944,10 +948,16 @@ ompi_mtl_ofi_cancel(struct mca_mtl_base_module_t *mtl, ret = fi_cancel((fid_t)ompi_mtl_ofi.ep, &ofi_req->ctx); if (0 == ret) { /** - * The request was successfully cancelled. + * Wait for the request to be cancelled. + */ + while (!ofi_req->super.ompi_req->req_status._cancelled) { + opal_progress(); + } + } else { + /** + * Could not cancel the request. */ - ofi_req->super.ompi_req->req_status._cancelled = true; - ofi_req->super.completion_callback(&ofi_req->super); + ofi_req->super.ompi_req->req_status._cancelled = false; } } break; From 6accd46f172f3a040758823f8d6e24a4f712fb65 Mon Sep 17 00:00:00 2001 From: Yohann Burette Date: Tue, 9 Jun 2015 11:09:29 -0700 Subject: [PATCH 0007/1704] mtl/ofi: message truncation is now indicated by FI_ETRUNC. (cherry picked from commit 7fd5ded327240bd328e84b5173d5bfee6f789123) --- ompi/mca/mtl/ofi/mtl_ofi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 819dcc9b730..1f9883b5939 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -182,7 +182,7 @@ ompi_mtl_ofi_send_error_callback(struct fi_cq_err_entry *error, ompi_mtl_ofi_request_t *ofi_req) { switch(error->err) { - case FI_EMSGSIZE: + case FI_ETRUNC: ofi_req->status.MPI_ERROR = MPI_ERR_TRUNCATE; break; default: @@ -525,7 +525,7 @@ ompi_mtl_ofi_recv_error_callback(struct fi_cq_err_entry *error, status->MPI_SOURCE = MTL_OFI_GET_SOURCE(ofi_req->match_bits); switch (error->err) { - case FI_EMSGSIZE: + case FI_ETRUNC: status->MPI_ERROR = MPI_ERR_TRUNCATE; break; case FI_ECANCELED: @@ -641,7 +641,7 @@ ompi_mtl_ofi_mrecv_error_callback(struct fi_cq_err_entry *error, status->MPI_SOURCE = MTL_OFI_GET_SOURCE(ofi_req->match_bits); switch (error->err) { - case FI_EMSGSIZE: + case FI_ETRUNC: status->MPI_ERROR = MPI_ERR_TRUNCATE; break; case FI_ECANCELED: From 2815f667855e4836aa314546751b16db179723e3 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 25 Jun 2015 13:22:39 -0700 Subject: [PATCH 0008/1704] usnic: switch to use the new libfabric common library The usnic BTL configure.m4 no longer needs to OPAL_CHECK_LIBFABRIC; it just uses the results from opal/mca/common/libfabric's configure.m4. We also now don't need to link against libfabric -- they just link against the opal_common_libfabric library. (cherry picked from commit a172bd161e30e3402d4f949cb724e81bcf05d353) --- opal/mca/btl/usnic/Makefile.am | 6 +++--- opal/mca/btl/usnic/configure.m4 | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/opal/mca/btl/usnic/Makefile.am b/opal/mca/btl/usnic/Makefile.am index 9cc9140a085..afc60243eb2 100644 --- a/opal/mca/btl/usnic/Makefile.am +++ b/opal/mca/btl/usnic/Makefile.am @@ -19,7 +19,7 @@ # $HEADER$ # -AM_CPPFLAGS = -DBTL_IN_OPAL=1 $(opal_btl_usnic_CPPFLAGS) +AM_CPPFLAGS = -DBTL_IN_OPAL=1 $(opal_common_libfabric_CPPFLAGS) EXTRA_DIST = README.txt README.test @@ -91,12 +91,12 @@ mca_btl_usnic_la_SOURCES = $(component_sources) mca_btl_usnic_la_LDFLAGS = \ $(opal_btl_usnic_LDFLAGS) \ -module -avoid-version -mca_btl_usnic_la_LIBADD = $(opal_btl_usnic_LIBS) +mca_btl_usnic_la_LIBADD = \ + $(OPAL_TOP_BUILDDIR)/opal/mca/common/libfabric/lib@OPAL_LIB_PREFIX@mca_common_libfabric.la noinst_LTLIBRARIES = $(lib) libmca_btl_usnic_la_SOURCES = $(lib_sources) libmca_btl_usnic_la_LDFLAGS = -module -avoid-version $(opal_btl_usnic_LDFLAGS) -libmca_btl_usnic_la_LIBADD = $(opal_btl_usnic_LIBS) if OPAL_BTL_USNIC_BUILD_UNIT_TESTS usnic_btl_run_tests_CPPFLAGS = \ diff --git a/opal/mca/btl/usnic/configure.m4 b/opal/mca/btl/usnic/configure.m4 index 62d63e5fbb5..55ec9232b29 100644 --- a/opal/mca/btl/usnic/configure.m4 +++ b/opal/mca/btl/usnic/configure.m4 @@ -94,15 +94,15 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[ ]) # The usnic BTL requires libfabric support. - AS_IF([test "$opal_btl_usnic_happy" = "yes"], - [OPAL_CHECK_LIBFABRIC([opal_btl_usnic], - [opal_btl_usnic_happy=yes], - [opal_btl_usnic_happy=no])]) + AS_IF([test "$opal_btl_usnic_happy" = "yes" && \ + test "$opal_common_libfabric_happy" = "yes"], + [opal_btl_usnic_happy=yes], + [opal_btl_usnic_happy=no]) # Make sure we can find the libfabric usnic extensions header AS_IF([test "$opal_btl_usnic_happy" = "yes" ], [opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS - CPPFLAGS="$opal_btl_usnic_CPPFLAGS $CPPFLAGS" + CPPFLAGS="$opal_common_libfabric_CPPFLAGS $CPPFLAGS" AC_CHECK_HEADER([rdma/fi_ext_usnic.h], [], [opal_btl_usnic_happy=no]) From e08d21153d6100730c494b6247fd6af1db25aa1f Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 25 Jun 2015 10:02:14 -0600 Subject: [PATCH 0009/1704] ownership: update ownership files per discussions at OMPI devel workshop Signed-off-by: Howard Pritchard Conflicts: ompi/mca/bcol/base/owner.txt ompi/mca/bcol/iboffload/owner.txt ompi/mca/bcol/ptpcoll/owner.txt ompi/mca/sbgp/base/owner.txt ompi/mca/sbgp/basesmsocket/owner.txt ompi/mca/sbgp/basesmuma/owner.txt ompi/mca/sbgp/ibnet/owner.txt ompi/mca/sbgp/p2p/owner.txt opal/mca/reachable/base/owner.txt opal/mca/reachable/netlink/owner.txt opal/mca/reachable/weighted/owner.txt --- ompi/mca/bcol/basesmuma/owner.txt | 7 +++++++ ompi/mca/coll/sm/owner.txt | 4 ++-- ompi/mca/crcp/base/owner.txt | 2 +- ompi/mca/crcp/bkmrk/owner.txt | 2 +- ompi/mca/op/base/owner.txt | 2 +- ompi/mca/op/example/owner.txt | 2 +- ompi/mca/op/x86/owner.txt | 2 +- ompi/mca/osc/base/owner.txt | 2 +- ompi/mca/osc/pt2pt/owner.txt | 2 +- ompi/mca/osc/rdma/owner.txt | 4 ++-- ompi/mca/osc/sm/owner.txt | 4 ++-- ompi/mca/pml/crcpw/owner.txt | 2 +- ompi/mca/pml/v/owner.txt | 2 +- opal/mca/allocator/base/owner.txt | 2 +- opal/mca/btl/openib/owner.txt | 2 +- opal/mca/crs/dmtcp/owner.txt | 4 ++-- opal/mca/if/solaris_ipv6/owner.txt | 2 +- opal/mca/memchecker/base/owner.txt | 2 +- opal/mca/memchecker/valgrind/owner.txt | 2 +- orte/mca/dfs/app/owner.txt | 4 ++-- orte/mca/dfs/base/owner.txt | 4 ++-- orte/mca/dfs/orted/owner.txt | 4 ++-- orte/mca/ras/gridengine/owner.txt | 2 +- orte/mca/ras/loadleveler/owner.txt | 4 ++-- orte/mca/rmaps/lama/owner.txt | 4 ++-- orte/mca/rmaps/mindist/owner.txt | 4 ++-- orte/mca/rml/ftrm/owner.txt | 2 +- orte/mca/snapc/base/owner.txt | 2 +- orte/mca/snapc/full/owner.txt | 2 +- orte/mca/sstore/base/owner.txt | 2 +- orte/mca/sstore/central/owner.txt | 2 +- orte/mca/sstore/stage/owner.txt | 2 +- 32 files changed, 48 insertions(+), 41 deletions(-) create mode 100644 ompi/mca/bcol/basesmuma/owner.txt diff --git a/ompi/mca/bcol/basesmuma/owner.txt b/ompi/mca/bcol/basesmuma/owner.txt new file mode 100644 index 00000000000..1c86df367bf --- /dev/null +++ b/ompi/mca/bcol/basesmuma/owner.txt @@ -0,0 +1,7 @@ +# +# owner/status file +# owner: institution that is responsible for this package +# status: e.g. active, maintenance, unmaintained +# +owner: ORNL +status: unmaintained diff --git a/ompi/mca/coll/sm/owner.txt b/ompi/mca/coll/sm/owner.txt index 07ad487d187..29b7476009c 100644 --- a/ompi/mca/coll/sm/owner.txt +++ b/ompi/mca/coll/sm/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: LANL? -status: maintenance +owner: nobody +status: unmaintained diff --git a/ompi/mca/crcp/base/owner.txt b/ompi/mca/crcp/base/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/ompi/mca/crcp/base/owner.txt +++ b/ompi/mca/crcp/base/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/ompi/mca/crcp/bkmrk/owner.txt b/ompi/mca/crcp/bkmrk/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/ompi/mca/crcp/bkmrk/owner.txt +++ b/ompi/mca/crcp/bkmrk/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/ompi/mca/op/base/owner.txt b/ompi/mca/op/base/owner.txt index e6150b6b0fc..e6967790514 100644 --- a/ompi/mca/op/base/owner.txt +++ b/ompi/mca/op/base/owner.txt @@ -4,4 +4,4 @@ # status: e.g. active, maintenance, unmaintained # owner: project -status: active +status: unmaintained diff --git a/ompi/mca/op/example/owner.txt b/ompi/mca/op/example/owner.txt index 0cc0384f0eb..2d23c9be654 100644 --- a/ompi/mca/op/example/owner.txt +++ b/ompi/mca/op/example/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: CISCO +owner: project status: maintenance diff --git a/ompi/mca/op/x86/owner.txt b/ompi/mca/op/x86/owner.txt index 0cc0384f0eb..4ad6f408ca3 100644 --- a/ompi/mca/op/x86/owner.txt +++ b/ompi/mca/op/x86/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: CISCO +owner: INTEL status: maintenance diff --git a/ompi/mca/osc/base/owner.txt b/ompi/mca/osc/base/owner.txt index e6150b6b0fc..48ac538cbb0 100644 --- a/ompi/mca/osc/base/owner.txt +++ b/ompi/mca/osc/base/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: project +owner: LANL status: active diff --git a/ompi/mca/osc/pt2pt/owner.txt b/ompi/mca/osc/pt2pt/owner.txt index e6150b6b0fc..48ac538cbb0 100644 --- a/ompi/mca/osc/pt2pt/owner.txt +++ b/ompi/mca/osc/pt2pt/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: project +owner: LANL status: active diff --git a/ompi/mca/osc/rdma/owner.txt b/ompi/mca/osc/rdma/owner.txt index c766c3ebc75..6f5dee6d347 100644 --- a/ompi/mca/osc/rdma/owner.txt +++ b/ompi/mca/osc/rdma/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: dead? +owner: LANL +status: active? diff --git a/ompi/mca/osc/sm/owner.txt b/ompi/mca/osc/sm/owner.txt index af11a265bb0..52961b5d12f 100644 --- a/ompi/mca/osc/sm/owner.txt +++ b/ompi/mca/osc/sm/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: maintenance? +owner: LANL +status: maintenance diff --git a/ompi/mca/pml/crcpw/owner.txt b/ompi/mca/pml/crcpw/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/ompi/mca/pml/crcpw/owner.txt +++ b/ompi/mca/pml/crcpw/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/ompi/mca/pml/v/owner.txt b/ompi/mca/pml/v/owner.txt index b46973d4c9a..c47a2d510b1 100644 --- a/ompi/mca/pml/v/owner.txt +++ b/ompi/mca/pml/v/owner.txt @@ -4,4 +4,4 @@ # status: e.g. active, maintenance, unmaintained # owner: UTK -status: maintenance? +status: maintenance diff --git a/opal/mca/allocator/base/owner.txt b/opal/mca/allocator/base/owner.txt index 44825b1295e..2d23c9be654 100644 --- a/opal/mca/allocator/base/owner.txt +++ b/opal/mca/allocator/base/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? +owner: project status: maintenance diff --git a/opal/mca/btl/openib/owner.txt b/opal/mca/btl/openib/owner.txt index 57b23bfe7a9..92eb51d94bd 100644 --- a/opal/mca/btl/openib/owner.txt +++ b/opal/mca/btl/openib/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner:MELLANOX +owner:Chelsio status:maintenance diff --git a/opal/mca/crs/dmtcp/owner.txt b/opal/mca/crs/dmtcp/owner.txt index b6eb68b0d24..ed1d89a44ab 100644 --- a/opal/mca/crs/dmtcp/owner.txt +++ b/opal/mca/crs/dmtcp/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: UTK -status: inactive +owner: U Brit.Columbia +status: unmaintained diff --git a/opal/mca/if/solaris_ipv6/owner.txt b/opal/mca/if/solaris_ipv6/owner.txt index ef8355c226a..6b13fdc7a25 100644 --- a/opal/mca/if/solaris_ipv6/owner.txt +++ b/opal/mca/if/solaris_ipv6/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ORACLE? +owner: nobody status: maintenance diff --git a/opal/mca/memchecker/base/owner.txt b/opal/mca/memchecker/base/owner.txt index 6bf8abd5c25..e6967790514 100644 --- a/opal/mca/memchecker/base/owner.txt +++ b/opal/mca/memchecker/base/owner.txt @@ -4,4 +4,4 @@ # status: e.g. active, maintenance, unmaintained # owner: project -status:active +status: unmaintained diff --git a/opal/mca/memchecker/valgrind/owner.txt b/opal/mca/memchecker/valgrind/owner.txt index a0ac5fc377e..e7bcdd98ce4 100644 --- a/opal/mca/memchecker/valgrind/owner.txt +++ b/opal/mca/memchecker/valgrind/owner.txt @@ -4,4 +4,4 @@ # status: e.g. active, maintenance, unmaintained # owner: HLRS? -status: maintenance +status: unmaintained diff --git a/orte/mca/dfs/app/owner.txt b/orte/mca/dfs/app/owner.txt index 55663d3bb8a..4ad6f408ca3 100644 --- a/orte/mca/dfs/app/owner.txt +++ b/orte/mca/dfs/app/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: ? +owner: INTEL +status: maintenance diff --git a/orte/mca/dfs/base/owner.txt b/orte/mca/dfs/base/owner.txt index 55663d3bb8a..4ad6f408ca3 100644 --- a/orte/mca/dfs/base/owner.txt +++ b/orte/mca/dfs/base/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: ? +owner: INTEL +status: maintenance diff --git a/orte/mca/dfs/orted/owner.txt b/orte/mca/dfs/orted/owner.txt index 55663d3bb8a..4ad6f408ca3 100644 --- a/orte/mca/dfs/orted/owner.txt +++ b/orte/mca/dfs/orted/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: ? +owner: INTEL +status: maintenance diff --git a/orte/mca/ras/gridengine/owner.txt b/orte/mca/ras/gridengine/owner.txt index 9e43c5910a8..5361011bda4 100644 --- a/orte/mca/ras/gridengine/owner.txt +++ b/orte/mca/ras/gridengine/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? +owner: INTEL status: unmaintained diff --git a/orte/mca/ras/loadleveler/owner.txt b/orte/mca/ras/loadleveler/owner.txt index 52bb44ba68e..af4ebbf6a60 100644 --- a/orte/mca/ras/loadleveler/owner.txt +++ b/orte/mca/ras/loadleveler/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IBM? -status: unmaintained +owner: IBM +status: maintenance diff --git a/orte/mca/rmaps/lama/owner.txt b/orte/mca/rmaps/lama/owner.txt index 55663d3bb8a..0cc0384f0eb 100644 --- a/orte/mca/rmaps/lama/owner.txt +++ b/orte/mca/rmaps/lama/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: ? +owner: CISCO +status: maintenance diff --git a/orte/mca/rmaps/mindist/owner.txt b/orte/mca/rmaps/mindist/owner.txt index 55663d3bb8a..6163d58e4cb 100644 --- a/orte/mca/rmaps/mindist/owner.txt +++ b/orte/mca/rmaps/mindist/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? -status: ? +owner: MELLANOX +status: maintenance diff --git a/orte/mca/rml/ftrm/owner.txt b/orte/mca/rml/ftrm/owner.txt index 9e43c5910a8..f1dfe8edb40 100644 --- a/orte/mca/rml/ftrm/owner.txt +++ b/orte/mca/rml/ftrm/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: ? +owner: NVIDIA status: unmaintained diff --git a/orte/mca/snapc/base/owner.txt b/orte/mca/snapc/base/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/orte/mca/snapc/base/owner.txt +++ b/orte/mca/snapc/base/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/orte/mca/snapc/full/owner.txt b/orte/mca/snapc/full/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/orte/mca/snapc/full/owner.txt +++ b/orte/mca/snapc/full/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/orte/mca/sstore/base/owner.txt b/orte/mca/sstore/base/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/orte/mca/sstore/base/owner.txt +++ b/orte/mca/sstore/base/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/orte/mca/sstore/central/owner.txt b/orte/mca/sstore/central/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/orte/mca/sstore/central/owner.txt +++ b/orte/mca/sstore/central/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained diff --git a/orte/mca/sstore/stage/owner.txt b/orte/mca/sstore/stage/owner.txt index 8ad5fc38ed2..29b7476009c 100644 --- a/orte/mca/sstore/stage/owner.txt +++ b/orte/mca/sstore/stage/owner.txt @@ -3,5 +3,5 @@ # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # -owner: IU? +owner: nobody status: unmaintained From 109ccd218e602c5f453e18a69e33b63ff87a9e4d Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sun, 28 Jun 2015 14:07:45 -0700 Subject: [PATCH 0010/1704] Now that it has been officially released, update the embedded HWLOC to 1.11.0 (cherry picked from commit open-mpi/ompi@75ceec663ae3f907f7bbb94494f59139e471750c) --- opal/mca/hwloc/hwloc1110/README-ompi.txt | 36 +- opal/mca/hwloc/hwloc1110/hwloc/NEWS | 7 +- opal/mca/hwloc/hwloc1110/hwloc/README | 670 +++++++++++------- opal/mca/hwloc/hwloc1110/hwloc/VERSION | 8 +- opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in | 2 +- opal/mca/hwloc/hwloc1110/hwloc/src/topology.c | 113 ++- 6 files changed, 474 insertions(+), 362 deletions(-) diff --git a/opal/mca/hwloc/hwloc1110/README-ompi.txt b/opal/mca/hwloc/hwloc1110/README-ompi.txt index 948285aaff0..ba333aa5da4 100644 --- a/opal/mca/hwloc/hwloc1110/README-ompi.txt +++ b/opal/mca/hwloc/hwloc1110/README-ompi.txt @@ -1,35 +1,3 @@ -Applied the following patches from the upstream hwloc 1.9 branch after -the v1.9.1 release: +Applied the following patches from the upstream hwloc 1.11 branch after +the v1.11.0 release: -All relevant commits up to open-mpi/hwloc@4e23b12 (i.e., the HEAD as -of 27 March 2015). "Relevant" commits are defined as those that -included files that are embedded in the Open MPI tree (e.g., updates -to files in docs/, utils/, etc. aren't relevant because they are not -embedded in the Open MPI tree). To be specific, the following commits -have been cherry-picked over to Open MPI: - -* open-mpi/hwloc@7c03216 v1.9.1 released, doing 1.9.2rc1 now -* open-mpi/hwloc@b35ced8 misc.h: Fix hwloc_strncasecmp() build under strict flags on BSD -* open-mpi/hwloc@d8c3f3d misc.h: Fix hwloc_strncasecmp() with some icc -* open-mpi/hwloc@f705a23 Use gcc's __asm__ version of the asm extension, which can be used in all standards -* open-mpi/hwloc@307726a configure: fix the check for X11/Xutil.h -* open-mpi/hwloc@ec58c05 errors: improve the advice to send hwloc-gather-topology files in the OS error message -* open-mpi/hwloc@35c743d NEWS update -* open-mpi/hwloc@868170e API: clearly state that os_index isn't unique while logical_index is -* open-mpi/hwloc@851532d x86 and OSF: Don't forget to set NUMA node nodeset -* open-mpi/hwloc@790aa2e cpuid-x86: Fix duplicate asm labels in case of heavy inlining on x86-32 -* open-mpi/hwloc@dd09aa5 debug: fix an overzealous assertion about the parent cpuset vs its children -* open-mpi/hwloc@769b9b5 core: fix the merging of identical objects in presence of Misc objects -* open-mpi/hwloc@71da0f1 core: reorder children in merge_useless_child() as well -* open-mpi/hwloc@c9cef07 hpux: improve hwloc_hpux_find_ldom() looking for NUMA node -* open-mpi/hwloc@cdffea6 x86: use ulong for cache sizes, uint won't be enough in the near future -* open-mpi/hwloc@55b0676 x86: use Group instead of Misc for unknown x2apic levels -* open-mpi/hwloc@7764ce5 synthetic: Misc levels are not allowed in the synthetic description -* open-mpi/hwloc@5b2dce1 error: point to the FAQ when displaying the big OS error message -* open-mpi/hwloc@c7bd9e6 pci: fix SR-IOV VF vendor/device names -* open-mpi/hwloc@a0f72ef distances: when we fail to insert an intermediate group, don't try to group further above -* open-mpi/hwloc@e419811 AIX: Fix PU os_index -* open-mpi/hwloc@08ab793 groups: add complete sets when inserting distance/pci groups -* open-mpi/hwloc@c66e714 core: only update root->complete sets if insert succeeds -* open-mpi/hwloc@01da9b9 bitmap: fix a corner case in hwloc_bitmap_isincluded() with infinite sets -* open-mpi/hwloc@e7b192b pci: fix bridge depth diff --git a/opal/mca/hwloc/hwloc1110/hwloc/NEWS b/opal/mca/hwloc/hwloc1110/hwloc/NEWS index 91f8c654f44..df246fe0db8 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/NEWS +++ b/opal/mca/hwloc/hwloc1110/hwloc/NEWS @@ -63,8 +63,10 @@ Version 1.11.0 - Automatically scales graphical box width to the inner text in Cairo, ASCII and Windows outputs. - Add --rect to lstopo to force rectangular layout even for NUMA nodes. - - Objects may have a Type info attribute to specific a better type name + - Add --restrict-flags to configure the behavior of --restrict. + - Objects may have a "Type" info attribute to specify a better type name and display it in lstopo. + - Really export all verbose information to the given output file. + hwloc-annotate - May now operate on all types of objects, including I/O. - May now insert Misc objects in the topology. @@ -75,12 +77,15 @@ Version 1.11.0 thanks to Imre Kerr for reporting the problem. + Fix PCI Bridge-specific depth attribute. + Fix hwloc_bitmap_intersect() for two infinite bitmaps. + + Fix some corner cases in the building of levels on large NUMA machines + with non-uniform NUMA groups and I/Os. + Improve the performance of object insertion by cpuset for large topologies. + Prefix verbose XML import errors with the source name. + Improve pkg-config checks and error messages. + Fix excluding after a component with an argument in the HWLOC_COMPONENTS environment variable. +* Documentation + Fix the recommended way in documentation and examples to allocate memory on some node, it should use HWLOC_MEMBIND_BIND. Thanks to Nicolas Bouzat for reporting the issue. diff --git a/opal/mca/hwloc/hwloc1110/hwloc/README b/opal/mca/hwloc/hwloc1110/hwloc/README index 9c3ae62d28a..fed93191f99 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/README +++ b/opal/mca/hwloc/hwloc1110/hwloc/README @@ -1,34 +1,33 @@ Introduction -hwloc provides command line tools and a C API to obtain the -hierarchical map of key computing elements, such as: NUMA memory nodes, -shared caches, processor packages, processor cores, processing units -(logical processors or "threads") and even I/O devices. hwloc also -gathers various attributes such as cache and memory information, and is -portable across a variety of different operating systems and platforms. -Additionally it may assemble the topologies of multiple machines into a -single one so as to let applications consult the topology of an entire -fabric or cluster at once. - -hwloc primarily aims at helping high-performance computing (HPC) -applications, but is also applicable to any project seeking to exploit -code and/or data locality on modern computing platforms. - -Note that the hwloc project represents the merger of the libtopology -project from inria and the Portable Linux Processor Affinity (PLPA) -sub-project from Open MPI. Both of these prior projects are now -deprecated. The first hwloc release was essentially a "re-branding" of -the libtopology code base, but with both a few genuinely new features -and a few PLPA-like features added in. Prior releases of hwloc included -documentation about switching from PLPA to hwloc; this documentation -has been dropped on the assumption that everyone who was using PLPA has -already switched to hwloc. +hwloc provides command line tools and a C API to obtain the hierarchical map of +key computing elements, such as: NUMA memory nodes, shared caches, processor +packages, processor cores, processing units (logical processors or "threads") +and even I/O devices. hwloc also gathers various attributes such as cache and +memory information, and is portable across a variety of different operating +systems and platforms. Additionally it may assemble the topologies of multiple +machines into a single one so as to let applications consult the topology of an +entire fabric or cluster at once. + +hwloc primarily aims at helping high-performance computing (HPC) applications, +but is also applicable to any project seeking to exploit code and/or data +locality on modern computing platforms. + +Note that the hwloc project represents the merger of the libtopology project +from inria and the Portable Linux Processor Affinity (PLPA) sub-project from +Open MPI. Both of these prior projects are now deprecated. The first hwloc +release was essentially a "re-branding" of the libtopology code base, but with +both a few genuinely new features and a few PLPA-like features added in. Prior +releases of hwloc included documentation about switching from PLPA to hwloc; +this documentation has been dropped on the assumption that everyone who was +using PLPA has already switched to hwloc. hwloc supports the following operating systems: - * Linux (including old kernels not having sysfs topology information, - with knowledge of cpusets, offline CPUs, ScaleMP vSMP, NumaScale - NumaConnect, and Kerrighed support) on all supported hardware, - including Intel Xeon Phi (either standalone or as a coprocessor). + + * Linux (including old kernels not having sysfs topology information, with + knowledge of cpusets, offline CPUs, ScaleMP vSMP, NumaScale NumaConnect, + and Kerrighed support) on all supported hardware, including Intel Xeon Phi + (either standalone or as a coprocessor). * Solaris * AIX * Darwin / OS X @@ -39,127 +38,126 @@ hwloc supports the following operating systems: * Microsoft Windows * IBM BlueGene/Q Compute Node Kernel (CNK) -Since it uses standard Operating System information, hwloc's support is -mostly independant from the processor type (x86, powerpc, ...) and just -relies on the Operating System support. The only exception to this is -kFreeBSD, which does not support topology information, and hwloc thus -uses an x86-only CPUID-based backend (which can be used for other OSes -too, see the Components and plugins section). - -To check whether hwloc works on a particular machine, just try to build -it and run lstopo or lstopo-no-graphics. If some things do not look -right (e.g. bogus or missing cache information), see Questions and Bugs -below. - -hwloc only reports the number of processors on unsupported operating -systems; no topology information is available. - -For development and debugging purposes, hwloc also offers the ability -to work on "fake" topologies: - * Symmetrical tree of resources generated from a list of level - arities - * Remote machine simulation through the gathering of Linux sysfs - topology files - -hwloc can display the topology in a human-readable format, either in -graphical mode (X11), or by exporting in one of several different -formats, including: plain text, PDF, PNG, and FIG (see CLI Examples -below). Note that some of the export formats require additional support -libraries. - -hwloc offers a programming interface for manipulating topologies and -objects. It also brings a powerful CPU bitmap API that is used to -describe topology objects location on physical/logical processors. See -the Programming Interface below. It may also be used to binding -applications onto certain cores or memory nodes. Several utility -programs are also provided to ease command-line manipulation of -topology objects, binding of processes, and so on. +Since it uses standard Operating System information, hwloc's support is mostly +independant from the processor type (x86, powerpc, ...) and just relies on the +Operating System support. The only exception to this is kFreeBSD, which does +not support topology information, and hwloc thus uses an x86-only CPUID-based +backend (which can be used for other OSes too, see the Components and plugins +section). + +To check whether hwloc works on a particular machine, just try to build it and +run lstopo or lstopo-no-graphics. If some things do not look right (e.g. bogus +or missing cache information), see Questions and Bugs below. + +hwloc only reports the number of processors on unsupported operating systems; +no topology information is available. + +For development and debugging purposes, hwloc also offers the ability to work +on "fake" topologies: + + * Symmetrical tree of resources generated from a list of level arities + * Remote machine simulation through the gathering of Linux sysfs topology + files + +hwloc can display the topology in a human-readable format, either in graphical +mode (X11), or by exporting in one of several different formats, including: +plain text, PDF, PNG, and FIG (see CLI Examples below). Note that some of the +export formats require additional support libraries. + +hwloc offers a programming interface for manipulating topologies and objects. +It also brings a powerful CPU bitmap API that is used to describe topology +objects location on physical/logical processors. See the Programming Interface +below. It may also be used to binding applications onto certain cores or memory +nodes. Several utility programs are also provided to ease command-line +manipulation of topology objects, binding of processes, and so on. Perl bindings are available from Bernd Kallies on CPAN. Python bindings are available from Guy Streeter: + * Fedora RPM and tarball. * git tree (html). Installation -hwloc (http://www.open-mpi.org/projects/hwloc/) is available under the -BSD license. It is hosted as a sub-project of the overall Open MPI -project (http://www.open-mpi.org/). Note that hwloc does not require -any functionality from Open MPI -- it is a wholly separate (and much -smaller!) project and code base. It just happens to be hosted as part -of the overall Open MPI project. +hwloc (http://www.open-mpi.org/projects/hwloc/) is available under the BSD +license. It is hosted as a sub-project of the overall Open MPI project (http:// +www.open-mpi.org/). Note that hwloc does not require any functionality from +Open MPI -- it is a wholly separate (and much smaller!) project and code base. +It just happens to be hosted as part of the overall Open MPI project. + +Nightly development snapshots are available on the web site. Additionally, the +code can be directly cloned from Git: -Nightly development snapshots are available on the web site. -Additionally, the code can be directly cloned from Git: shell$ git clone https://github.com/open-mpi/hwloc.git shell$ cd hwloc shell$ ./autogen.sh -Note that GNU Autoconf >=2.63, Automake >=1.10 and Libtool >=2.2.6 are -required when building from a Git clone. +Note that GNU Autoconf >=2.63, Automake >=1.10 and Libtool >=2.2.6 are required +when building from a Git clone. Installation by itself is the fairly common GNU-based process: + shell$ ./configure --prefix=... shell$ make shell$ make install -The hwloc command-line tool "lstopo" produces human-readable topology -maps, as mentioned above. It can also export maps to the "fig" file -format. Support for PDF, Postscript, and PNG exporting is provided if -the "Cairo" development package (usually cairo-devel or libcairo2-dev) -can be found in "lstopo" when hwloc is configured and build. +The hwloc command-line tool "lstopo" produces human-readable topology maps, as +mentioned above. It can also export maps to the "fig" file format. Support for +PDF, Postscript, and PNG exporting is provided if the "Cairo" development +package (usually cairo-devel or libcairo2-dev) can be found in "lstopo" when +hwloc is configured and build. + +The hwloc core may also benefit from the following development packages: -The hwloc core may also benefit from the following development -packages: - * libnuma for memory binding and migration support on Linux - (numactl-devel or libnuma-dev package). + * libnuma for memory binding and migration support on Linux (numactl-devel or + libnuma-dev package). * libpciaccess for full I/O device discovery (libpciaccess-devel or - libpciaccess-dev package). On Linux, PCI discovery may still be - performed (without vendor/device names) even if libpciaccess cannot - be used. + libpciaccess-dev package). On Linux, PCI discovery may still be performed + (without vendor/device names) even if libpciaccess cannot be used. + * the AMD OpenCL implementation for OpenCL device discovery. * the NVIDIA CUDA Toolkit for CUDA device discovery. * the NVIDIA Tesla Development Kit for NVML device discovery. - * the NV-CONTROL X extension library (NVCtrl) for NVIDIA display - discovery. + * the NV-CONTROL X extension library (NVCtrl) for NVIDIA display discovery. * libxml2 for full XML import/export support (otherwise, the internal - minimalistic parser will only be able to import XML files that were - exported by the same hwloc release). See Importing and exporting - topologies from/to XML files for details. The relevant development - package is usually libxml2-devel or libxml2-dev. - * libudev on Linux for easier discovery of OS device information - (otherwise hwloc will try to manually parse udev raw files). The - relevant development package is usually libudev-devel or - libudev-dev. - * libtool's ltdl library for dynamic plugin loading. The relevant - development package is usually libtool-ltdl-devel or libltdl-dev. - -PCI and XML support may be statically built inside the main hwloc -library, or as separate dynamically-loaded plugins (see the Components -and plugins section). - -Note that because of the possibility of GPL taint, the pciutils library -libpci will not be used (remember that hwloc is BSD-licensed). - -Also note that if you install supplemental libraries in non-standard -locations, hwloc's configure script may not be able to find them -without some help. You may need to specify additional CPPFLAGS, -LDFLAGS, or PKG_CONFIG_PATH values on the configure command line. + minimalistic parser will only be able to import XML files that were + exported by the same hwloc release). See Importing and exporting topologies + from/to XML files for details. The relevant development package is usually + libxml2-devel or libxml2-dev. + * libudev on Linux for easier discovery of OS device information (otherwise + hwloc will try to manually parse udev raw files). The relevant development + package is usually libudev-devel or libudev-dev. + * libtool's ltdl library for dynamic plugin loading. The relevant development + package is usually libtool-ltdl-devel or libltdl-dev. + +PCI and XML support may be statically built inside the main hwloc library, or +as separate dynamically-loaded plugins (see the Components and plugins +section). + +Note that because of the possibility of GPL taint, the pciutils library libpci +will not be used (remember that hwloc is BSD-licensed). + +Also note that if you install supplemental libraries in non-standard locations, +hwloc's configure script may not be able to find them without some help. You +may need to specify additional CPPFLAGS, LDFLAGS, or PKG_CONFIG_PATH values on +the configure command line. For example, if libpciaccess was installed into /opt/pciaccess, hwloc's -configure script may not find it be default. Try adding PKG_CONFIG_PATH -to the ./configure command line, like this: +configure script may not find it be default. Try adding PKG_CONFIG_PATH to the +./configure command line, like this: + ./configure PKG_CONFIG_PATH=/opt/pciaccess/lib/pkgconfig ... CLI Examples -On a 4-package 2-core machine with hyper-threading, the lstopo tool may -show the following graphical output: +On a 4-package 2-core machine with hyper-threading, the lstopo tool may show +the following graphical output: - dudley.png +dudley.png Here's the equivalent output in textual form: + Machine (16GB) Package L#0 + L3 L#0 (4096KB) L2 L#0 (1024KB) + L1 L#0 (16KB) + Core L#0 @@ -190,17 +188,17 @@ Machine (16GB) PU L#14 (P#7) PU L#15 (P#15) -Note that there is also an equivalent output in XML that is meant for -exporting/importing topologies but it is hardly readable to -human-beings (see Importing and exporting topologies from/to XML files -for details). +Note that there is also an equivalent output in XML that is meant for exporting +/importing topologies but it is hardly readable to human-beings (see Importing +and exporting topologies from/to XML files for details). -On a 4-package 2-core Opteron NUMA machine, the lstopo tool may show -the following graphical output: +On a 4-package 2-core Opteron NUMA machine, the lstopo tool may show the +following graphical output: - hagrid.png +hagrid.png Here's the equivalent output in textual form: + Machine (32GB) NUMANode L#0 (P#0 8190MB) + Package L#0 L2 L#0 (1024KB) + L1 L#0 (64KB) + Core L#0 + PU L#0 (P#0) @@ -215,12 +213,13 @@ Machine (32GB) L2 L#6 (1024KB) + L1 L#6 (64KB) + Core L#6 + PU L#6 (P#6) L2 L#7 (1024KB) + L1 L#7 (64KB) + Core L#7 + PU L#7 (P#7) -On a 2-package quad-core Xeon (pre-Nehalem, with 2 dual-core dies into -each package): +On a 2-package quad-core Xeon (pre-Nehalem, with 2 dual-core dies into each +package): - emmett.png +emmett.png Here's the same output in textual form: + Machine (16GB) Package L#0 L2 L#0 (4096KB) @@ -239,117 +238,290 @@ Machine (16GB) Programming Interface -The basic interface is available in hwloc.h. Some higher-level -functions are available in hwloc/helper.h to reduce the need to -manually manipulate objects and follow links between them. -Documentation for all these is provided later in this document. -Developers may also want to look at hwloc/inlines.h which contains the -actual inline code of some hwloc.h routines, and at this document, +The basic interface is available in hwloc.h. Some higher-level functions are +available in hwloc/helper.h to reduce the need to manually manipulate objects +and follow links between them. Documentation for all these is provided later in +this document. Developers may also want to look at hwloc/inlines.h which +contains the actual inline code of some hwloc.h routines, and at this document, which provides good higher-level topology traversal examples. -To precisely define the vocabulary used by hwloc, a Terms and -Definitions section is available and should probably be read first. +To precisely define the vocabulary used by hwloc, a Terms and Definitions +section is available and should probably be read first. -Each hwloc object contains a cpuset describing the list of processing -units that it contains. These bitmaps may be used for CPU binding and -Memory binding. hwloc offers an extensive bitmap manipulation interface -in hwloc/bitmap.h. +Each hwloc object contains a cpuset describing the list of processing units +that it contains. These bitmaps may be used for CPU binding and Memory binding. +hwloc offers an extensive bitmap manipulation interface in hwloc/bitmap.h. -Moreover, hwloc also comes with additional helpers for interoperability -with several commonly used environments. See the Interoperability With -Other Software section for details. +Moreover, hwloc also comes with additional helpers for interoperability with +several commonly used environments. See the Interoperability With Other +Software section for details. -The complete API documentation is available in a full set of HTML -pages, man pages, and self-contained PDF files (formatted for both both -US letter and A4 formats) in the source tarball in doc/doxygen-doc/. +The complete API documentation is available in a full set of HTML pages, man +pages, and self-contained PDF files (formatted for both both US letter and A4 +formats) in the source tarball in doc/doxygen-doc/. -NOTE: If you are building the documentation from a Git clone, you will -need to have Doxygen and pdflatex installed -- the documentation will -be built during the normal "make" process. The documentation is -installed during "make install" to $prefix/share/doc/hwloc/ and your -systems default man page tree (under $prefix, of course). +NOTE: If you are building the documentation from a Git clone, you will need to +have Doxygen and pdflatex installed -- the documentation will be built during +the normal "make" process. The documentation is installed during "make install" +to $prefix/share/doc/hwloc/ and your systems default man page tree (under +$prefix, of course). Portability -As shown in CLI Examples, hwloc can obtain information on a wide -variety of hardware topologies. However, some platforms and/or -operating system versions will only report a subset of this -information. For example, on an PPC64-based system with 32 cores (each -with 2 hardware threads) running a default 2.6.18-based kernel from -RHEL 5.4, hwloc is only able to glean information about NUMA nodes and -processor units (PUs). No information about caches, packages, or cores -is available. - -Similarly, Operating System have varying support for CPU and memory -binding, e.g. while some Operating Systems provide interfaces for all -kinds of CPU and memory bindings, some others provide only interfaces -for a limited number of kinds of CPU and memory binding, and some do -not provide any binding interface at all. Hwloc's binding functions -would then simply return the ENOSYS error (Function not implemented), -meaning that the underlying Operating System does not provide any -interface for them. CPU binding and Memory binding provide more -information on which hwloc binding functions should be preferred -because interfaces for them are usually available on the supported -Operating Systems. - -Here's the graphical output from lstopo on this platform when -Simultaneous Multi-Threading (SMT) is enabled: - - ppc64-with-smt.png - -And here's the graphical output from lstopo on this platform when SMT -is disabled: - - ppc64-without-smt.png - -Notice that hwloc only sees half the PUs when SMT is disabled. PU #15, -for example, seems to change location from NUMA node #0 to #1. In -reality, no PUs "moved" -- they were simply re-numbered when hwloc only -saw half as many. Hence, PU #15 in the SMT-disabled picture probably -corresponds to PU #30 in the SMT-enabled picture. - -This same "PUs have disappeared" effect can be seen on other platforms --- even platforms / OSs that provide much more information than the -above PPC64 system. This is an unfortunate side-effect of how operating -systems report information to hwloc. - -Note that upgrading the Linux kernel on the same PPC64 system mentioned -above to 2.6.34, hwloc is able to discover all the topology -information. The following picture shows the entire topology layout -when SMT is enabled: - - ppc64-full-with-smt.png - -Developers using the hwloc API or XML output for portable applications -should therefore be extremely careful to not make any assumptions about -the structure of data that is returned. For example, per the above -reported PPC topology, it is not safe to assume that PUs will always be -descendants of cores. - -Additionally, future hardware may insert new topology elements that are -not available in this version of hwloc. Long-lived applications that -are meant to span multiple different hardware platforms should also be -careful about making structure assumptions. For example, there may -someday be an element "lower" than a PU, or perhaps a new element may -exist between a core and a PU. +As shown in CLI Examples, hwloc can obtain information on a wide variety of +hardware topologies. However, some platforms and/or operating system versions +will only report a subset of this information. For example, on an PPC64-based +system with 32 cores (each with 2 hardware threads) running a default +2.6.18-based kernel from RHEL 5.4, hwloc is only able to glean information +about NUMA nodes and processor units (PUs). No information about caches, +packages, or cores is available. + +Similarly, Operating System have varying support for CPU and memory binding, +e.g. while some Operating Systems provide interfaces for all kinds of CPU and +memory bindings, some others provide only interfaces for a limited number of +kinds of CPU and memory binding, and some do not provide any binding interface +at all. Hwloc's binding functions would then simply return the ENOSYS error +(Function not implemented), meaning that the underlying Operating System does +not provide any interface for them. CPU binding and Memory binding provide more +information on which hwloc binding functions should be preferred because +interfaces for them are usually available on the supported Operating Systems. + +Here's the graphical output from lstopo on this platform when Simultaneous +Multi-Threading (SMT) is enabled: + +ppc64-with-smt.png + +And here's the graphical output from lstopo on this platform when SMT is +disabled: + +ppc64-without-smt.png + +Notice that hwloc only sees half the PUs when SMT is disabled. PU #15, for +example, seems to change location from NUMA node #0 to #1. In reality, no PUs +"moved" -- they were simply re-numbered when hwloc only saw half as many. +Hence, PU #15 in the SMT-disabled picture probably corresponds to PU #30 in the +SMT-enabled picture. + +This same "PUs have disappeared" effect can be seen on other platforms -- even +platforms / OSs that provide much more information than the above PPC64 system. +This is an unfortunate side-effect of how operating systems report information +to hwloc. + +Note that upgrading the Linux kernel on the same PPC64 system mentioned above +to 2.6.34, hwloc is able to discover all the topology information. The +following picture shows the entire topology layout when SMT is enabled: + +ppc64-full-with-smt.png + +Developers using the hwloc API or XML output for portable applications should +therefore be extremely careful to not make any assumptions about the structure +of data that is returned. For example, per the above reported PPC topology, it +is not safe to assume that PUs will always be descendants of cores. + +Additionally, future hardware may insert new topology elements that are not +available in this version of hwloc. Long-lived applications that are meant to +span multiple different hardware platforms should also be careful about making +structure assumptions. For example, there may someday be an element "lower" +than a PU, or perhaps a new element may exist between a core and a PU. API Example -The following small C example (named ``hwloc-hello.c'') prints the -topology of the machine and bring the process to the first logical -processor of the second core of the machine. More examples are -available in the doc/examples/ directory of the source tree. +The following small C example (named ``hwloc-hello.c'') prints the topology of +the machine and bring the process to the first logical processor of the second +core of the machine. More examples are available in the doc/examples/ directory +of the source tree. + +/* Example hwloc API program. + * + * See other examples under doc/examples/ in the source tree + * for more details. + * + * Copyright (c) 2009-2015 Inria. All rights reserved. + * Copyright (c) 2009-2011 Universit?eacute; Bordeaux + * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. + * + * hwloc-hello.c + */ + +#include +#include +#include +#include + +static void print_children(hwloc_topology_t topology, hwloc_obj_t obj, + int depth) +{ + char type[32], attr[1024]; + unsigned i; + + hwloc_obj_type_snprintf(type, sizeof(type), obj, 0); + printf("%*s%s", 2*depth, "", type); + if (obj->os_index != (unsigned) -1) + printf("#%u", obj->os_index); + hwloc_obj_attr_snprintf(attr, sizeof(attr), obj, " ", 0); + if (*attr) + printf("(%s)", attr); + printf("\n"); + for (i = 0; i < obj->arity; i++) { + print_children(topology, obj->children[i], depth + 1); + } +} + +int main(void) +{ + int depth; + unsigned i, n; + unsigned long size; + int levels; + char string[128]; + int topodepth; + hwloc_topology_t topology; + hwloc_cpuset_t cpuset; + hwloc_obj_t obj; + + /* Allocate and initialize topology object. */ + hwloc_topology_init(&topology); + + /* ... Optionally, put detection configuration here to ignore + some objects types, define a synthetic topology, etc.... + + The default is to detect all the objects of the machine that + the caller is allowed to access. See Configure Topology + Detection. */ + + /* Perform the topology detection. */ + hwloc_topology_load(topology); + + /* Optionally, get some additional topology information + in case we need the topology depth later. */ + topodepth = hwloc_topology_get_depth(topology); + + /***************************************************************** + * First example: + * Walk the topology with an array style, from level 0 (always + * the system level) to the lowest level (always the proc level). + *****************************************************************/ + for (depth = 0; depth < topodepth; depth++) { + printf("*** Objects at level %d\n", depth); + for (i = 0; i < hwloc_get_nbobjs_by_depth(topology, depth); + i++) { + hwloc_obj_type_snprintf(string, sizeof(string), + hwloc_get_obj_by_depth +(topology, depth, i), 0); + printf("Index %u: %s\n", i, string); + } + } + + /***************************************************************** + * Second example: + * Walk the topology with a tree style. + *****************************************************************/ + printf("*** Printing overall tree\n"); + print_children(topology, hwloc_get_root_obj(topology), 0); + + /***************************************************************** + * Third example: + * Print the number of packages. + *****************************************************************/ + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PACKAGE); + if (depth == HWLOC_TYPE_DEPTH_UNKNOWN) { + printf("*** The number of packages is unknown\n"); + } else { + printf("*** %u package(s)\n", + hwloc_get_nbobjs_by_depth(topology, depth)); + } + + /***************************************************************** + * Fourth example: + * Compute the amount of cache that the first logical processor + * has above it. + *****************************************************************/ + levels = 0; + size = 0; + for (obj = hwloc_get_obj_by_type(topology, HWLOC_OBJ_PU, 0); + obj; + obj = obj->parent) + if (obj->type == HWLOC_OBJ_CACHE) { + levels++; + size += obj->attr->cache.size; + } + printf("*** Logical processor 0 has %d caches totaling %luKB\n", + levels, size / 1024); + + /***************************************************************** + * Fifth example: + * Bind to only one thread of the last core of the machine. + * + * First find out where cores are, or else smaller sets of CPUs if + * the OS doesn't have the notion of a "core". + *****************************************************************/ + depth = hwloc_get_type_or_below_depth(topology, HWLOC_OBJ_CORE); + + /* Get last core. */ + obj = hwloc_get_obj_by_depth(topology, depth, + hwloc_get_nbobjs_by_depth(topology, depth) - 1); + if (obj) { + /* Get a copy of its cpuset that we may modify. */ + cpuset = hwloc_bitmap_dup(obj->cpuset); + + /* Get only one logical processor (in case the core is + SMT/hyper-threaded). */ + hwloc_bitmap_singlify(cpuset); + + /* And try to bind ourself there. */ + if (hwloc_set_cpubind(topology, cpuset, 0)) { + char *str; + int error = errno; + hwloc_bitmap_asprintf(&str, obj->cpuset); + printf("Couldn't bind to cpuset %s: %s\n", str, strerror(error)); + free(str); + } + + /* Free our cpuset copy */ + hwloc_bitmap_free(cpuset); + } + + /***************************************************************** + * Sixth example: + * Allocate some memory on the last NUMA node, bind some existing + * memory to the last NUMA node. + *****************************************************************/ + /* Get last node. */ + n = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_NUMANODE); + if (n) { + void *m; + size = 1024*1024; + + obj = hwloc_get_obj_by_type(topology, HWLOC_OBJ_NUMANODE, n - 1); + m = hwloc_alloc_membind_nodeset(topology, size, obj->nodeset, + HWLOC_MEMBIND_BIND, 0); + hwloc_free(topology, m, size); + + m = malloc(size); + hwloc_set_area_membind_nodeset(topology, m, size, obj->nodeset, + HWLOC_MEMBIND_BIND, 0); + free(m); + } + + /* Destroy topology object. */ + hwloc_topology_destroy(topology); + + return 0; +} + +hwloc provides a pkg-config executable to obtain relevant compiler and linker +flags. For example, it can be used thusly to compile applications that utilize +the hwloc library (assuming GNU Make): -hwloc provides a pkg-config executable to obtain relevant compiler and -linker flags. For example, it can be used thusly to compile -applications that utilize the hwloc library (assuming GNU Make): CFLAGS += $(pkg-config --cflags hwloc) LDLIBS += $(pkg-config --libs hwloc) cc hwloc-hello.c $(CFLAGS) -o hwloc-hello $(LDLIBS) -On a machine with 4GB of RAM and 2 processor packages -- each package -of which has two processing cores -- the output from running -hwloc-hello could be something like the following: +On a machine with 4GB of RAM and 2 processor packages -- each package of which +has two processing cores -- the output from running hwloc-hello could be +something like the following: + shell$ ./hwloc-hello *** Objects at level 0 Index 0: Machine(3938MB) @@ -383,45 +555,43 @@ shell$ Questions and Bugs -Questions should be sent to the devel mailing list -(http://www.open-mpi.org/community/lists/hwloc.php). Bug reports should -be reported in the tracker (https://git.open-mpi.org/trac/hwloc/). - -If hwloc discovers an incorrect topology for your machine, the very -first thing you should check is to ensure that you have the most recent -updates installed for your operating system. Indeed, most of hwloc -topology discovery relies on hardware information retrieved through the -operation system (e.g., via the /sys virtual filesystem of the Linux -kernel). If upgrading your OS or Linux kernel does not solve your -problem, you may also want to ensure that you are running the most -recent version of the BIOS for your machine. - -If those things fail, contact us on the mailing list for additional -help. Please attach the output of lstopo after having given the ---enable-debug option to ./configure and rebuilt completely, to get -debugging output. Also attach the /proc + /sys tarball generated by the -installed script hwloc-gather-topology when submitting problems about -Linux, or send the output of kstat cpu_info in the Solaris case, or the -output of sysctl hw in the Darwin or BSD cases. +Questions should be sent to the devel mailing list (http://www.open-mpi.org/ +community/lists/hwloc.php). Bug reports should be reported in the tracker ( +https://git.open-mpi.org/trac/hwloc/). + +If hwloc discovers an incorrect topology for your machine, the very first thing +you should check is to ensure that you have the most recent updates installed +for your operating system. Indeed, most of hwloc topology discovery relies on +hardware information retrieved through the operation system (e.g., via the /sys +virtual filesystem of the Linux kernel). If upgrading your OS or Linux kernel +does not solve your problem, you may also want to ensure that you are running +the most recent version of the BIOS for your machine. + +If those things fail, contact us on the mailing list for additional help. +Please attach the output of lstopo after having given the --enable-debug option +to ./configure and rebuilt completely, to get debugging output. Also attach the +/proc + /sys tarball generated by the installed script hwloc-gather-topology +when submitting problems about Linux, or send the output of kstat cpu_info in +the Solaris case, or the output of sysctl hw in the Darwin or BSD cases. History / Credits -hwloc is the evolution and merger of the libtopology -(http://runtime.bordeaux.inria.fr/libtopology/) project and the -Portable Linux Processor Affinity (PLPA) -(http://www.open-mpi.org/projects/plpa/) project. Because of functional -and ideological overlap, these two code bases and ideas were merged and -released under the name "hwloc" as an Open MPI sub-project. +hwloc is the evolution and merger of the libtopology (http:// +runtime.bordeaux.inria.fr/libtopology/) project and the Portable Linux +Processor Affinity (PLPA) (http://www.open-mpi.org/projects/plpa/) project. +Because of functional and ideological overlap, these two code bases and ideas +were merged and released under the name "hwloc" as an Open MPI sub-project. -libtopology was initially developed by the inria Runtime Team-Project -(http://runtime.bordeaux.inria.fr/) (headed by Raymond Namyst -(http://dept-info.labri.fr/~namyst/). PLPA was initially developed by -the Open MPI development team as a sub-project. Both are now deprecated -in favor of hwloc, which is distributed as an Open MPI sub-project. +libtopology was initially developed by the inria Runtime Team-Project (http:// +runtime.bordeaux.inria.fr/) (headed by Raymond Namyst (http:// +dept-info.labri.fr/~namyst/). PLPA was initially developed by the Open MPI +development team as a sub-project. Both are now deprecated in favor of hwloc, +which is distributed as an Open MPI sub-project. Further Reading The documentation chapters include + * Terms and Definitions * Command-Line Tools * Environment Variables @@ -439,8 +609,4 @@ The documentation chapters include * Frequently Asked Questions Make sure to have had a look at those too! - __________________________________________________________________ - - Generated on 5 Jun 2015 for Hardware Locality (hwloc) by doxygen - 1.6.1 diff --git a/opal/mca/hwloc/hwloc1110/hwloc/VERSION b/opal/mca/hwloc/hwloc1110/hwloc/VERSION index fae47659b67..243693b0650 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/VERSION +++ b/opal/mca/hwloc/hwloc1110/hwloc/VERSION @@ -16,17 +16,17 @@ release=0 # requirement is that it must be entirely printable ASCII characters # and have no white space. -greek=rc2 +greek= # The date when this release was created -date="Unreleased developer copy" +date="Jun 18, 2015" # If snapshot=1, then use the value from snapshot_version as the # entire hwloc version (i.e., ignore major, minor, release, and # greek). This is only set to 1 when making snapshot tarballs. -snapshot=1 -snapshot_version=dev-450-g1cc3012 +snapshot=0 +snapshot_version=${major}.${minor}.${release}${greek}-git # The shared library version of hwloc's public library. This version # is maintained in accordance with the "Library Interface Versions" diff --git a/opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in b/opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in index 23327a8c9fc..266319bb383 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in +++ b/opal/mca/hwloc/hwloc1110/hwloc/hwloc.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: hwloc Description: Hardware locality detection and management library -Version: @VERSION@ +Version: @HWLOC_VERSION@ Requires.private: @HWLOC_REQUIRES@ Cflags: -I${includedir} Libs: -L${libdir} -lhwloc diff --git a/opal/mca/hwloc/hwloc1110/hwloc/src/topology.c b/opal/mca/hwloc/hwloc1110/hwloc/src/topology.c index 01be27453b4..1636730a842 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/src/topology.c +++ b/opal/mca/hwloc/hwloc1110/hwloc/src/topology.c @@ -576,20 +576,6 @@ hwloc_topology_dup(hwloc_topology_t *newp, return -1; } -/* - * How to compare objects based on types. - * - * Note that HIGHER/LOWER is only a (consistent) heuristic, used to sort - * objects with same cpuset consistently. - * Only EQUAL / not EQUAL can be relied upon. - */ - -enum hwloc_type_cmp_e { - HWLOC_TYPE_HIGHER, - HWLOC_TYPE_DEEPER, - HWLOC_TYPE_EQUAL -}; - /* WARNING: The indexes of this array MUST match the ordering that of the obj_order_type[] array, below. Specifically, the values must be laid out such that: @@ -702,7 +688,15 @@ int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2) return order1 - order2; } -static enum hwloc_type_cmp_e +enum hwloc_obj_cmp_e { + HWLOC_OBJ_EQUAL = HWLOC_BITMAP_EQUAL, /**< \brief Equal */ + HWLOC_OBJ_INCLUDED = HWLOC_BITMAP_INCLUDED, /**< \brief Strictly included into */ + HWLOC_OBJ_CONTAINS = HWLOC_BITMAP_CONTAINS, /**< \brief Strictly contains */ + HWLOC_OBJ_INTERSECTS = HWLOC_BITMAP_INTERSECTS, /**< \brief Intersects, but no inclusion! */ + HWLOC_OBJ_DIFFERENT = HWLOC_BITMAP_DIFFERENT /**< \brief No intersection */ +}; + +static enum hwloc_obj_cmp_e hwloc_type_cmp(hwloc_obj_t obj1, hwloc_obj_t obj2) { hwloc_obj_type_t type1 = obj1->type; @@ -711,60 +705,52 @@ hwloc_type_cmp(hwloc_obj_t obj1, hwloc_obj_t obj2) compare = hwloc_compare_types(type1, type2); if (compare == HWLOC_TYPE_UNORDERED) - return HWLOC_TYPE_EQUAL; /* we cannot do better */ + return HWLOC_OBJ_DIFFERENT; /* we cannot do better */ if (compare > 0) - return HWLOC_TYPE_DEEPER; + return HWLOC_OBJ_INCLUDED; if (compare < 0) - return HWLOC_TYPE_HIGHER; + return HWLOC_OBJ_CONTAINS; /* Caches have the same types but can have different depths. */ if (type1 == HWLOC_OBJ_CACHE) { if (obj1->attr->cache.depth < obj2->attr->cache.depth) - return HWLOC_TYPE_DEEPER; + return HWLOC_OBJ_INCLUDED; else if (obj1->attr->cache.depth > obj2->attr->cache.depth) - return HWLOC_TYPE_HIGHER; + return HWLOC_OBJ_CONTAINS; else if (obj1->attr->cache.type > obj2->attr->cache.type) /* consider icache deeper than dcache and dcache deeper than unified */ - return HWLOC_TYPE_DEEPER; + return HWLOC_OBJ_INCLUDED; else if (obj1->attr->cache.type < obj2->attr->cache.type) /* consider icache deeper than dcache and dcache deeper than unified */ - return HWLOC_TYPE_HIGHER; + return HWLOC_OBJ_CONTAINS; } /* Group objects have the same types but can have different depths. */ if (type1 == HWLOC_OBJ_GROUP) { if (obj1->attr->group.depth == (unsigned) -1 || obj2->attr->group.depth == (unsigned) -1) - return HWLOC_TYPE_EQUAL; + return HWLOC_OBJ_EQUAL; if (obj1->attr->group.depth < obj2->attr->group.depth) - return HWLOC_TYPE_DEEPER; + return HWLOC_OBJ_INCLUDED; else if (obj1->attr->group.depth > obj2->attr->group.depth) - return HWLOC_TYPE_HIGHER; + return HWLOC_OBJ_CONTAINS; } /* Bridges objects have the same types but can have different depths. */ if (type1 == HWLOC_OBJ_BRIDGE) { if (obj1->attr->bridge.depth < obj2->attr->bridge.depth) - return HWLOC_TYPE_DEEPER; + return HWLOC_OBJ_INCLUDED; else if (obj1->attr->bridge.depth > obj2->attr->bridge.depth) - return HWLOC_TYPE_HIGHER; + return HWLOC_OBJ_CONTAINS; } - return HWLOC_TYPE_EQUAL; + return HWLOC_OBJ_EQUAL; } /* * How to compare objects based on cpusets. */ -enum hwloc_obj_cmp_e { - HWLOC_OBJ_EQUAL = HWLOC_BITMAP_EQUAL, /**< \brief Equal */ - HWLOC_OBJ_INCLUDED = HWLOC_BITMAP_INCLUDED, /**< \brief Strictly included into */ - HWLOC_OBJ_CONTAINS = HWLOC_BITMAP_CONTAINS, /**< \brief Strictly contains */ - HWLOC_OBJ_INTERSECTS = HWLOC_BITMAP_INTERSECTS, /**< \brief Intersects, but no inclusion! */ - HWLOC_OBJ_DIFFERENT = HWLOC_BITMAP_DIFFERENT /**< \brief No intersection */ -}; - static int hwloc_obj_cmp_sets(hwloc_obj_t obj1, hwloc_obj_t obj2) { @@ -786,32 +772,6 @@ hwloc_obj_cmp_sets(hwloc_obj_t obj1, hwloc_obj_t obj2) return hwloc_bitmap_compare_inclusion(set1, set2); } -static int -hwloc_obj_cmp_types(hwloc_obj_t obj1, hwloc_obj_t obj2) -{ - /* Same sets, subsort by type to have a consistent ordering. */ - int typeres = hwloc_type_cmp(obj1, obj2); - if (typeres == HWLOC_TYPE_DEEPER) - return HWLOC_OBJ_INCLUDED; - if (typeres == HWLOC_TYPE_HIGHER) - return HWLOC_OBJ_CONTAINS; - - /* HWLOC_TYPE_EQUAL */ - - if (obj1->type == HWLOC_OBJ_MISC) { - /* Misc objects may vary by name */ - int res = strcmp(obj1->name, obj2->name); - if (res < 0) - return HWLOC_OBJ_INCLUDED; - if (res > 0) - return HWLOC_OBJ_CONTAINS; - if (res == 0) - return HWLOC_OBJ_EQUAL; - } - /* Same sets and types! Let's hope it's coherent. */ - return HWLOC_OBJ_EQUAL; -} - /* Compare object cpusets based on complete_cpuset if defined (always correctly ordered), * or fallback to the main cpusets (only correctly ordered during early insert before disallowed/offline bits are cleared). * @@ -968,7 +928,15 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur */ } else { /* otherwise compare actual types to decide of the inclusion */ - res = hwloc_obj_cmp_types(obj, child); + res = hwloc_type_cmp(obj, child); + if (res == HWLOC_OBJ_EQUAL && obj->type == HWLOC_OBJ_MISC) { + /* Misc objects may vary by name */ + int ret = strcmp(obj->name, child->name); + if (ret < 0) + res = HWLOC_OBJ_INCLUDED; + else if (ret > 0) + res = HWLOC_OBJ_CONTAINS; + } } } @@ -2056,18 +2024,23 @@ hwloc_connect_children(hwloc_obj_t parent) } /* - * Check whether there is an object below ROOT that has the same type as OBJ + * Check whether there is an object below ROOT that has the same type as OBJ. + * Only used for building levels. + * Stop at I/O or Misc since these don't go into levels, and we never have + * normal objects under them. */ static int find_same_type(hwloc_obj_t root, hwloc_obj_t obj) { hwloc_obj_t child; - if (hwloc_type_cmp(root, obj) == HWLOC_TYPE_EQUAL) + if (hwloc_type_cmp(root, obj) == HWLOC_OBJ_EQUAL) return 1; for (child = root->first_child; child; child = child->next_sibling) - if (find_same_type(child, obj)) + if (!hwloc_obj_type_is_io(child->type) + && child->type != HWLOC_OBJ_MISC + && find_same_type(child, obj)) return 1; return 0; @@ -2088,7 +2061,7 @@ hwloc_level_take_objects(hwloc_obj_t top_obj, unsigned i, j; for (i = 0; i < n_current_objs; i++) - if (hwloc_type_cmp(top_obj, current_objs[i]) == HWLOC_TYPE_EQUAL) { + if (hwloc_type_cmp(top_obj, current_objs[i]) == HWLOC_OBJ_EQUAL) { /* Take it, add children. */ taken_objs[taken_i++] = current_objs[i]; for (j = 0; j < current_objs[i]->arity; j++) @@ -2276,7 +2249,7 @@ hwloc_connect_levels(hwloc_topology_t topology) /* See if this is actually the topmost object */ for (i = 0; i < n_objs; i++) { - if (hwloc_type_cmp(top_obj, objs[i]) != HWLOC_TYPE_EQUAL) { + if (hwloc_type_cmp(top_obj, objs[i]) != HWLOC_OBJ_EQUAL) { if (find_same_type(objs[i], top_obj)) { /* OBJS[i] is strictly above an object of the same type as TOP_OBJ, so it * is above TOP_OBJ. */ @@ -2292,7 +2265,7 @@ hwloc_connect_levels(hwloc_topology_t topology) n_taken_objs = 0; n_new_objs = 0; for (i = 0; i < n_objs; i++) - if (hwloc_type_cmp(top_obj, objs[i]) == HWLOC_TYPE_EQUAL) { + if (hwloc_type_cmp(top_obj, objs[i]) == HWLOC_OBJ_EQUAL) { n_taken_objs++; n_new_objs += objs[i]->arity; } @@ -3150,7 +3123,7 @@ hwloc_topology_check(struct hwloc_topology *topology) assert(obj->logical_index == j); /* check that all objects in the level have the same type */ if (prev) { - assert(hwloc_type_cmp(obj, prev) == HWLOC_TYPE_EQUAL); + assert(hwloc_type_cmp(obj, prev) == HWLOC_OBJ_EQUAL); assert(prev->next_cousin == obj); assert(obj->prev_cousin == prev); } From 6fc3bba9a56b64544ec3814b5f92367cacaae751 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 29 Jun 2015 08:32:46 -0700 Subject: [PATCH 0011/1704] errcode.h: fix typo: errnum, not errno MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to Ã…ke Sandgren for pointing out the error. (cherry picked from commit open-mpi/ompi@91d3b5f55517b4aa67dd311f6eb4db377d355fdf) --- ompi/errhandler/errcode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/errhandler/errcode.h b/ompi/errhandler/errcode.h index f6111069c2a..262f34ec9f4 100644 --- a/ompi/errhandler/errcode.h +++ b/ompi/errhandler/errcode.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 University of Houston. All rights reserved. - * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ @@ -98,7 +98,7 @@ static inline int ompi_mpi_errnum_is_class ( int errnum ) { ompi_mpi_errcode_t *err; - if (errno < 0) { + if (errnum < 0) { return false; } From 6630f887026dd159759ed49bbed399d7e3b1a869 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 25 Jun 2015 11:23:42 -0700 Subject: [PATCH 0012/1704] MPI extensions: build extensions by default * affinity: will build unless disabled. * cr: will build if FT is enabled, unless it is disabled. It will also complain/abort if you --with-mpi-ext=cr, but FT is disabled. * example: will only build if --with-mpi-ext=example (and .ompi_ignore is removed) (cherry picked from commit fca193d3165d3985981d988a49e42c77fcfeb42d) --- config/ompi_ext.m4 | 7 +++++-- ompi/mpiext/affinity/configure.m4 | 10 +++++++--- ompi/mpiext/cr/configure.m4 | 27 ++++++++++++++++++++++----- ompi/mpiext/example/configure.m4 | 12 +++++++++--- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/config/ompi_ext.m4 b/config/ompi_ext.m4 index aa798ab3f5e..17029a25638 100644 --- a/config/ompi_ext.m4 +++ b/config/ompi_ext.m4 @@ -45,8 +45,11 @@ AC_DEFUN([OMPI_EXT],[ AC_MSG_RESULT([ompi_mpiext_list]) AC_MSG_CHECKING([which MPI extension should be enabled]) - if test "$enable_mpi_ext" = "yes" || test "$enable_mpi_ext" = "all"; then - msg="All Extensions" + if test "$enable_mpi_ext" = "" || \ + test "$enable_mpi_ext" = "yes" || \ + test "$enable_mpi_ext" = "all"; then + enable_mpi_ext=all + msg="All Available Extensions" str="`echo ENABLE_EXT_ALL=1`" eval $str else diff --git a/ompi/mpiext/affinity/configure.m4 b/ompi/mpiext/affinity/configure.m4 index 51925443428..95a4ca7fe96 100644 --- a/ompi/mpiext/affinity/configure.m4 +++ b/ompi/mpiext/affinity/configure.m4 @@ -2,7 +2,7 @@ # # Copyright (c) 2004-2009 The Trustees of Indiana University. # All rights reserved. -# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -16,6 +16,10 @@ AC_DEFUN([OMPI_MPIEXT_affinity_CONFIG], [ AC_CONFIG_FILES([ompi/mpiext/affinity/Makefile]) AC_CONFIG_FILES([ompi/mpiext/affinity/c/Makefile]) - # This example can always build, so we just execute $1. - $1 + # This example can always build, so we just execute $1 if it was + # requested. + AS_IF([test "$ENABLE_affinity" = "1" || \ + test "$ENABLE_EXT_ALL" = "1"], + [$1], + [$2]) ]) diff --git a/ompi/mpiext/cr/configure.m4 b/ompi/mpiext/cr/configure.m4 index dc228b255da..757118442f6 100644 --- a/ompi/mpiext/cr/configure.m4 +++ b/ompi/mpiext/cr/configure.m4 @@ -2,7 +2,7 @@ # # Copyright (c) 2004-2010 The Trustees of Indiana University. # All rights reserved. -# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -16,8 +16,25 @@ AC_DEFUN([OMPI_MPIEXT_cr_CONFIG],[ AC_CONFIG_FILES([ompi/mpiext/cr/Makefile]) AC_CONFIG_FILES([ompi/mpiext/cr/c/Makefile]) - # If we don't want FT, don't compile this component - AS_IF([test "$opal_want_ft_cr" = "1"], - [$1], - [$2]) + OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cr_happy]) + + # If we don't want FT, don't compile this extention + AS_IF([test "$ENABLE_cr" = "1" || \ + test "$ENABLE_EXT_ALL" = "1"], + [ompi_mpi_ext_cr_happy=1], + [ompi_mpi_ext_cr_happy=0]) + + AS_IF([test "$ompi_mpi_ext_cr_happy" = "1" && \ + test "$opal_want_ft_cr" = "1"], + [$1], + [ # Error if the user specifically asked for this extension, + # but we can't build it. + AS_IF([test "$ENABLE_cr" = "1"], + [AC_MSG_WARN([Requested "cr" MPI extension, but cannot build it]) + AC_MSG_WARN([because fault tolerance is not enabled.]) + AC_MSG_WARN([Try again with --enable-ft]) + AC_MSG_ERROR([Cannot continue])]) + $2]) + + OPAL_VAR_SCOPE_POP ]) diff --git a/ompi/mpiext/example/configure.m4 b/ompi/mpiext/example/configure.m4 index 1ae1e9f67c5..29c1b428853 100644 --- a/ompi/mpiext/example/configure.m4 +++ b/ompi/mpiext/example/configure.m4 @@ -2,7 +2,7 @@ # # Copyright (c) 2004-2009 The Trustees of Indiana University. # All rights reserved. -# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -20,8 +20,14 @@ AC_DEFUN([OMPI_MPIEXT_example_CONFIG],[ AC_CONFIG_FILES([ompi/mpiext/example/use-mpi/Makefile]) AC_CONFIG_FILES([ompi/mpiext/example/use-mpi-f08/Makefile]) - # This example can always build, so we just execute $1. - $1 + # If your extension can build, run $1. Otherwise, run $2. For + # the purposes of this example, we don't want it to build in most + # cases. So only build if someone specifies an --enable-mpi-ext + # value that contains the token "example". + AS_IF([test "$ENABLE_example" = "1" || \ + test "$ENABLE_EXT_ALL" = "1"], + [$1], + [$2]) ]) # only need to set this if the component needs init/finalize hooks From 5f77fef156cfbbb0c6d99304a5ea2439a83ea2d2 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 25 Jun 2015 21:01:17 -0700 Subject: [PATCH 0013/1704] Remove manpages when doing distclean in the OMPI extensions area (cherry picked from commit open-mpi/ompi@2fa8167383836d617a7f19e6bc2231ce754ff8f9) --- ompi/mpiext/affinity/c/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ompi/mpiext/affinity/c/Makefile.am b/ompi/mpiext/affinity/c/Makefile.am index c0471d46dd7..8d8275d9256 100644 --- a/ompi/mpiext/affinity/c/Makefile.am +++ b/ompi/mpiext/affinity/c/Makefile.am @@ -48,3 +48,6 @@ nodist_man_MANS = OMPI_Affinity_str.3 # Man page sources EXTRA_DIST = $(nodist_man_MANS:.3=.3in) example.c + +distclean-local: + rm -f $(nodist_man_MANS) From 8a38b7a57d7672df6ca46552619a4210ab6d54a8 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 29 Jun 2015 09:54:03 +0900 Subject: [PATCH 0014/1704] mpiext/affinity: #if OPAL_HAVE_HWLOC most parts of the code that allow this extension to compile if configure'd with --without-hwloc (cherry picked from commit 6994d742fdd6ed9e3407929416dca0ec0b941588) --- ompi/mpiext/affinity/c/mpiext_affinity_str.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ompi/mpiext/affinity/c/mpiext_affinity_str.c b/ompi/mpiext/affinity/c/mpiext_affinity_str.c index de59be38b72..37f87fe1931 100644 --- a/ompi/mpiext/affinity/c/mpiext_affinity_str.c +++ b/ompi/mpiext/affinity/c/mpiext_affinity_str.c @@ -38,12 +38,14 @@ static const char FUNC_NAME[] = "OMPI_Affinity"; static const char ompi_nobind_str[] = "Open MPI did not bind this process"; static const char not_bound_str[] = "Not bound (i.e., bound to all processors)"; +#if OPAL_HAVE_HWLOC static int get_rsrc_ompi_bound(char str[OMPI_AFFINITY_STRING_MAX]); static int get_rsrc_current_binding(char str[OMPI_AFFINITY_STRING_MAX]); static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]); static int get_layout_ompi_bound(char str[OMPI_AFFINITY_STRING_MAX]); static int get_layout_current_binding(char str[OMPI_AFFINITY_STRING_MAX]); static int get_layout_exists(char str[OMPI_AFFINITY_STRING_MAX]); +#endif /* OPAL_HAVE_HWLOC */ /*---------------------------------------------------------------------------*/ @@ -52,19 +54,25 @@ int OMPI_Affinity_str(ompi_affinity_fmt_t fmt_type, char current_binding[OMPI_AFFINITY_STRING_MAX], char exists[OMPI_AFFINITY_STRING_MAX]) { +#if OPAL_HAVE_HWLOC int ret; +#endif /* OPAL_HAVE_HWLOC */ memset(ompi_bound, 0, OMPI_AFFINITY_STRING_MAX); memset(current_binding, 0, OMPI_AFFINITY_STRING_MAX); /* If we have no hwloc support, return nothing */ - if (NULL == opal_hwloc_topology) { +#if OPAL_HAVE_HWLOC + if (NULL == opal_hwloc_topology) +#endif /* OPAL_HAVE_HWLOC */ + { strncpy(ompi_bound, "Not supported", OMPI_AFFINITY_STRING_MAX); strncpy(current_binding, "Not supported", OMPI_AFFINITY_STRING_MAX); strncpy(exists, "Not supported", OMPI_AFFINITY_STRING_MAX); return MPI_SUCCESS; } +#if OPAL_HAVE_HWLOC /* Otherwise, return useful information */ switch (fmt_type) { case OMPI_AFFINITY_RSRC_STRING_FMT: @@ -86,8 +94,10 @@ int OMPI_Affinity_str(ompi_affinity_fmt_t fmt_type, } return MPI_SUCCESS; +#endif /* OPAL_HAVE_HWLOC */ } +#if OPAL_HAVE_HWLOC /*---------------------------------------------------------------------------*/ /* @@ -275,7 +285,7 @@ static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]) } } } - } + } return OMPI_SUCCESS; } @@ -418,3 +428,4 @@ static int get_layout_exists(char str[OMPI_AFFINITY_STRING_MAX]) return OMPI_SUCCESS; } +#endif /* OPAL_HAVE_HWLOC */ From 64b92141d40b831d7503b64a4d68ad4b62e93e69 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 29 Jun 2015 09:36:10 -0700 Subject: [PATCH 0015/1704] mpiext_affinity_str.c: minor stylistic updates No real functional changes: * Reduce #if's a little -- have a single "no hwloc" and "hwloc" section. * Make a common subroutine (no_hwloc_support()) for when we don't have any hwloc support (cherry picked from commit f6882a85bbc1ee0ab347f31a838e5936e025bff9) --- ompi/mpiext/affinity/c/mpiext_affinity_str.c | 58 ++++++++++++++------ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/ompi/mpiext/affinity/c/mpiext_affinity_str.c b/ompi/mpiext/affinity/c/mpiext_affinity_str.c index 37f87fe1931..02983aa40af 100644 --- a/ompi/mpiext/affinity/c/mpiext_affinity_str.c +++ b/ompi/mpiext/affinity/c/mpiext_affinity_str.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights * reserved. @@ -38,41 +38,69 @@ static const char FUNC_NAME[] = "OMPI_Affinity"; static const char ompi_nobind_str[] = "Open MPI did not bind this process"; static const char not_bound_str[] = "Not bound (i.e., bound to all processors)"; +/************************************************************************** + * Utility routine + **************************************************************************/ + +static no_hwloc_support(char ompi_bound[OMPI_AFFINITY_STRING_MAX], + char current_binding[OMPI_AFFINITY_STRING_MAX], + char exists[OMPI_AFFINITY_STRING_MAX]) +{ + strncpy(ompi_bound, "Not supported", OMPI_AFFINITY_STRING_MAX); + strncpy(current_binding, "Not supported", OMPI_AFFINITY_STRING_MAX); + strncpy(exists, "Not supported", OMPI_AFFINITY_STRING_MAX); +} + +/************************************************************************** + * If we have no hwloc support compiled in, do almost nothing. + **************************************************************************/ + +#if !OPAL_HAVE_HWLOC +/* + * If hwloc support was not compiled in, then just return "Not + * supported". + */ +int OMPI_Affinity_str(ompi_affinity_fmt_t fmt_type, + char ompi_bound[OMPI_AFFINITY_STRING_MAX], + char current_binding[OMPI_AFFINITY_STRING_MAX], + char exists[OMPI_AFFINITY_STRING_MAX]) +{ + no_hwloc_support(ompi_bound, current_binding, exists); + return MPI_SUCCESS; +} +#endif // !OPAL_HAVE_HWLOC + +/************************************************************************** + * If we have hwloc support compiled in, do the actual work. + **************************************************************************/ + #if OPAL_HAVE_HWLOC + static int get_rsrc_ompi_bound(char str[OMPI_AFFINITY_STRING_MAX]); static int get_rsrc_current_binding(char str[OMPI_AFFINITY_STRING_MAX]); static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]); static int get_layout_ompi_bound(char str[OMPI_AFFINITY_STRING_MAX]); static int get_layout_current_binding(char str[OMPI_AFFINITY_STRING_MAX]); static int get_layout_exists(char str[OMPI_AFFINITY_STRING_MAX]); -#endif /* OPAL_HAVE_HWLOC */ -/*---------------------------------------------------------------------------*/ int OMPI_Affinity_str(ompi_affinity_fmt_t fmt_type, - char ompi_bound[OMPI_AFFINITY_STRING_MAX], + char ompi_bound[OMPI_AFFINITY_STRING_MAX], char current_binding[OMPI_AFFINITY_STRING_MAX], char exists[OMPI_AFFINITY_STRING_MAX]) { -#if OPAL_HAVE_HWLOC int ret; -#endif /* OPAL_HAVE_HWLOC */ memset(ompi_bound, 0, OMPI_AFFINITY_STRING_MAX); memset(current_binding, 0, OMPI_AFFINITY_STRING_MAX); /* If we have no hwloc support, return nothing */ -#if OPAL_HAVE_HWLOC - if (NULL == opal_hwloc_topology) -#endif /* OPAL_HAVE_HWLOC */ - { - strncpy(ompi_bound, "Not supported", OMPI_AFFINITY_STRING_MAX); - strncpy(current_binding, "Not supported", OMPI_AFFINITY_STRING_MAX); - strncpy(exists, "Not supported", OMPI_AFFINITY_STRING_MAX); + if (NULL == opal_hwloc_topology) { + no_hwloc_support(ompi_bound, current_binding, exists); + return MPI_SUCCESS; } -#if OPAL_HAVE_HWLOC /* Otherwise, return useful information */ switch (fmt_type) { case OMPI_AFFINITY_RSRC_STRING_FMT: @@ -94,10 +122,8 @@ int OMPI_Affinity_str(ompi_affinity_fmt_t fmt_type, } return MPI_SUCCESS; -#endif /* OPAL_HAVE_HWLOC */ } -#if OPAL_HAVE_HWLOC /*---------------------------------------------------------------------------*/ /* From c41b1fd35f1e9061a516ab541426da00fdffafce Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 29 Jun 2015 14:42:03 -0400 Subject: [PATCH 0016/1704] sharedfp/addproc: remove for 2.x Per Edgar's advice (http://www.open-mpi.org/community/lists/devel/2015/06/17553.php) remove addproc (at least for now -- it may return later in the v2.x series). --- ompi/mca/sharedfp/addproc/.opal_ignore | 0 ompi/mca/sharedfp/addproc/.opal_unignore | 1 - ompi/mca/sharedfp/addproc/Makefile.am | 63 ----- ompi/mca/sharedfp/addproc/owner.txt | 7 - ompi/mca/sharedfp/addproc/sharedfp_addproc.c | 97 -------- ompi/mca/sharedfp/addproc/sharedfp_addproc.h | 164 ------------- .../addproc/sharedfp_addproc_component.c | 104 -------- .../addproc/sharedfp_addproc_control.c | 231 ------------------ .../addproc/sharedfp_addproc_control.h | 37 --- .../addproc/sharedfp_addproc_file_open.c | 158 ------------ .../sharedfp/addproc/sharedfp_addproc_iread.c | 85 ------- .../addproc/sharedfp_addproc_iwrite.c | 84 ------- .../sharedfp/addproc/sharedfp_addproc_read.c | 196 --------------- .../sharedfp_addproc_request_position.c | 75 ------ .../sharedfp/addproc/sharedfp_addproc_seek.c | 69 ------ .../sharedfp/addproc/sharedfp_addproc_write.c | 196 --------------- 16 files changed, 1567 deletions(-) delete mode 100644 ompi/mca/sharedfp/addproc/.opal_ignore delete mode 100644 ompi/mca/sharedfp/addproc/.opal_unignore delete mode 100644 ompi/mca/sharedfp/addproc/Makefile.am delete mode 100644 ompi/mca/sharedfp/addproc/owner.txt delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc.h delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_component.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_control.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_control.h delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_iread.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_iwrite.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_read.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_request_position.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_seek.c delete mode 100644 ompi/mca/sharedfp/addproc/sharedfp_addproc_write.c diff --git a/ompi/mca/sharedfp/addproc/.opal_ignore b/ompi/mca/sharedfp/addproc/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ompi/mca/sharedfp/addproc/.opal_unignore b/ompi/mca/sharedfp/addproc/.opal_unignore deleted file mode 100644 index debe198de7d..00000000000 --- a/ompi/mca/sharedfp/addproc/.opal_unignore +++ /dev/null @@ -1 +0,0 @@ -gabriel diff --git a/ompi/mca/sharedfp/addproc/Makefile.am b/ompi/mca/sharedfp/addproc/Makefile.am deleted file mode 100644 index ba5eab9eb90..00000000000 --- a/ompi/mca/sharedfp/addproc/Makefile.am +++ /dev/null @@ -1,63 +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) 2013 University of Houston. 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). - -if MCA_BUILD_ompi_sharedfp_addproc_DSO -component_noinst = -component_install = mca_sharedfp_addproc.la -else -component_noinst = libmca_sharedfp_addproc.la -component_install = -endif - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_sharedfp_addproc_la_SOURCES = $(sources) -mca_sharedfp_addproc_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_sharedfp_addproc_la_SOURCES = $(sources) -libmca_sharedfp_addproc_la_LDFLAGS = -module -avoid-version - -# Source files - -#IMPORTANT: Update here when adding new source code files to the library -sources = \ - sharedfp_addproc.h \ - sharedfp_addproc.c \ - sharedfp_addproc_component.c \ - sharedfp_addproc_seek.c \ - sharedfp_addproc_request_position.c \ - sharedfp_addproc_write.c \ - sharedfp_addproc_iwrite.c \ - sharedfp_addproc_read.c \ - sharedfp_addproc_iread.c \ - sharedfp_addproc_file_open.c - -#The additional process is spawned by executing this executable -bin_PROGRAMS = mca_sharedfp_addproc_control - -mca_sharedfp_addproc_control_SOURCES = \ - sharedfp_addproc_control.h \ - sharedfp_addproc_control.c - -mca_sharedfp_addproc_control_LDADD = $(top_builddir)/ompi/libmpi.la diff --git a/ompi/mca/sharedfp/addproc/owner.txt b/ompi/mca/sharedfp/addproc/owner.txt deleted file mode 100644 index f886026a69e..00000000000 --- a/ompi/mca/sharedfp/addproc/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: UH -status: maintenance diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc.c deleted file mode 100644 index 3e528dd0032..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2013 University of Houston. 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 fules, - * keeping these symbols as the only symbols in this file prevents - * utility programs such as "ompi_info" from having to import entire - * modules just to query their version and parameters - */ - -#include "ompi_config.h" -#include "mpi.h" -#include "ompi/mca/sharedfp/sharedfp.h" -#include "ompi/mca/sharedfp/addproc/sharedfp_addproc.h" - -/* - * ******************************************************************* - * ************************ actions structure ************************ - * ******************************************************************* - */ - /* IMPORTANT: Update here when adding sharedfp component interface functions*/ -static mca_sharedfp_base_module_1_0_0_t addproc = { - mca_sharedfp_addproc_module_init, /* initalise after being selected */ - mca_sharedfp_addproc_module_finalize, /* close a module on a communicator */ - mca_sharedfp_addproc_seek, - mca_sharedfp_addproc_get_position, - mca_sharedfp_addproc_read, - mca_sharedfp_addproc_read_ordered, - mca_sharedfp_addproc_read_ordered_begin, - mca_sharedfp_addproc_read_ordered_end, - mca_sharedfp_addproc_iread, - mca_sharedfp_addproc_write, - mca_sharedfp_addproc_write_ordered, - mca_sharedfp_addproc_write_ordered_begin, - mca_sharedfp_addproc_write_ordered_end, - mca_sharedfp_addproc_iwrite, - mca_sharedfp_addproc_file_open, - mca_sharedfp_addproc_file_close -}; -/* - * ******************************************************************* - * ************************* structure ends ************************** - * ******************************************************************* - */ - -int mca_sharedfp_addproc_component_init_query(bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* Nothing to do */ - - return OMPI_SUCCESS; -} - -struct mca_sharedfp_base_module_1_0_0_t * - mca_sharedfp_addproc_component_file_query - (mca_io_ompio_file_t *fh, int *priority) { - *priority = mca_sharedfp_addproc_priority; - - /*test, and update priority*/ - - return &addproc; -} - -int mca_sharedfp_addproc_component_file_unquery (mca_io_ompio_file_t *file) -{ - /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need - * to be undone if this module is not selected */ - - return OMPI_SUCCESS; -} - -int mca_sharedfp_addproc_module_init (mca_io_ompio_file_t *file) -{ - return OMPI_SUCCESS; -} - - -int mca_sharedfp_addproc_module_finalize (mca_io_ompio_file_t *file) -{ - return OMPI_SUCCESS; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc.h b/ompi/mca/sharedfp/addproc/sharedfp_addproc.h deleted file mode 100644 index 14672830304..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_SHAREDFP_ADDPROC_H -#define MCA_SHAREDFP_ADDPROC_H - -#include "ompi_config.h" -#include "ompi/mca/mca.h" -#include "ompi/mca/sharedfp/sharedfp.h" -#include "ompi/mca/io/ompio/io_ompio.h" -#include - -BEGIN_C_DECLS - -int mca_sharedfp_addproc_component_init_query(bool enable_progress_threads, - bool enable_mpi_threads); -struct mca_sharedfp_base_module_1_0_0_t * - mca_sharedfp_addproc_component_file_query (mca_io_ompio_file_t *file, int *priority); -int mca_sharedfp_addproc_component_file_unquery (mca_io_ompio_file_t *file); - -int mca_sharedfp_addproc_module_init (mca_io_ompio_file_t *file); -int mca_sharedfp_addproc_module_finalize (mca_io_ompio_file_t *file); - -extern int mca_sharedfp_addproc_priority; -extern int mca_sharedfp_addproc_verbose; -#if 0 -extern char[MPI_MAX_HOSTNAME_LEN] mca_sharedfp_addproc_control_host; -#endif - -OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_addproc_component; -/* - * ****************************************************************** - * ********* functions which are implemented in this module ********* - * ****************************************************************** - */ -/*IMPORANT: Update here when implementing functions from sharedfp API*/ - -int mca_sharedfp_addproc_seek (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, int whence); -int mca_sharedfp_addproc_get_position (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE * offset); -int mca_sharedfp_addproc_file_open (struct ompi_communicator_t *comm, - char* filename, - int amode, - struct ompi_info_t *info, - mca_io_ompio_file_t *fh); -int mca_sharedfp_addproc_file_close (mca_io_ompio_file_t *fh); -int mca_sharedfp_addproc_read (mca_io_ompio_file_t *fh, - void *buf, int count, MPI_Datatype datatype, MPI_Status *status); -int mca_sharedfp_addproc_read_ordered (mca_io_ompio_file_t *fh, - void *buf, int count, struct ompi_datatype_t *datatype, - ompi_status_public_t *status - ); -int mca_sharedfp_addproc_read_ordered_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); -int mca_sharedfp_addproc_read_ordered_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status); -int mca_sharedfp_addproc_iread (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_request_t **request); -int mca_sharedfp_addproc_write (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_status_public_t *status); -int mca_sharedfp_addproc_write_ordered (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_status_public_t *status); -int mca_sharedfp_addproc_write_ordered_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); -int mca_sharedfp_addproc_write_ordered_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status); -int mca_sharedfp_addproc_iwrite (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_request_t **request); -/****************************************************/ -/*The following are structures and definitions * - * copied over directly from uhio codebase */ -/****************************************************/ - -/*This structure will hang off of the mca_sharedfp_base_data_t's - *selected_module_data attribute - */ -struct mca_sharedfp_addproc_data -{ - MPI_Comm intercom; -}; - -typedef struct mca_sharedfp_addproc_data addproc_data; - - -int mca_sharedfp_addproc_request_position (struct mca_sharedfp_base_data_t * sh, - int bytes_requested, - OMPI_MPI_OFFSET_TYPE * offset); - -#define DO_ACK 0 /* To be set by the Environment Variable*/ -#define REQUEST_TAG 99 -#define ACK_TAG 1 -#define OFFSET_TAG 98 -#define END_TAG 97 - -#define SEEK_END_TAG 91 -#define SEEK_SET_TAG 92 -#define SEEK_CUR_TAG 93 -#define GET_POSITION_TAG 94 - -#define NUM_OF_SPAWNS 1 - -struct list { - - int procNo; - long numBytesArrAddr; - struct list *Next; -}; - -struct Stat { - int tag; - int source; - long* recvBuff; -}; - - -double uhio_shared_gettime(void); - -typedef struct list node; -typedef struct Stat statusStruct; - -/* - * ****************************************************************** - * ************ functions implemented in this module end ************ - * ****************************************************************** - */ - -END_C_DECLS - -#endif /* MCA_SHAREDFP_ADDPROC_H */ diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_component.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_component.c deleted file mode 100644 index 0b66d83bac0..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_component.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * 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) 2013 University of Houston. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. 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 "ompi_config.h" -#include "sharedfp_addproc.h" -#include "mpi.h" - -/* - * Public string showing the sharedfp addproc component version number - */ -const char *mca_sharedfp_addproc_component_version_string = - "OMPI/MPI addproc SHAREDFP MCA component version " OMPI_VERSION; - -/* - * Global variables - */ -int mca_sharedfp_addproc_priority=1; -int mca_sharedfp_addproc_verbose=0; -#if 0 -char[MPI_MAX_HOSTNAME_LEN] mca_sharedfp_addproc_control_host; -#endif - -static int addproc_register(void); - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ -mca_sharedfp_base_component_2_0_0_t mca_sharedfp_addproc_component = { - - /* First, the mca_component_t struct containing meta information - about the component itself */ - - .sharedfpm_version = { - MCA_SHAREDFP_BASE_VERSION_2_0_0, - - /* Component name and version */ - .mca_component_name = "addproc", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - .mca_register_component_params = addproc_register, - }, - .sharedfpm_data = { - /* This component is checkpointable */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - }, - .sharedfpm_init_query = mca_sharedfp_addproc_component_init_query, /* get thread level */ - .sharedfpm_file_query = mca_sharedfp_addproc_component_file_query, /* get priority and actions */ - .sharedfpm_file_unquery = mca_sharedfp_addproc_component_file_unquery, /* undo what was done by previous function */ -}; - - -static int addproc_register(void) -{ - mca_sharedfp_addproc_priority = 1; - (void) mca_base_component_var_register(&mca_sharedfp_addproc_component.sharedfpm_version, - "priority", "Priority of the addproc sharedfp component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, &mca_sharedfp_addproc_priority); - mca_sharedfp_addproc_verbose = 0; - (void) mca_base_component_var_register(&mca_sharedfp_addproc_component.sharedfpm_version, - "verbose", "Verbosity of the addproc sharedfp component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, &mca_sharedfp_addproc_verbose); - - -#if 0 - memset (mca_sharedfp_addproc_control_host, 0, MPI_MAX_HOSTNAME_LEN); - (void) mca_base_component_var_register(&mca_sharedfp_addproc_component.sharedfpm_version, - "control_host", "Name of the host where to spawn the control process(default:none)", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, &mca_sharedfp_addproc_control_host); - -#endif - return OMPI_SUCCESS; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_control.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_control.c deleted file mode 100644 index f3c7b06b461..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_control.c +++ /dev/null @@ -1,231 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "sharedfp_addproc_control.h" - -/* #define PRINT_TAG 1 */ -void nodeDelete(node **front, node **rear) -{ - node *delNode; - if ((*front) == NULL && (*rear)==NULL) { - printf("The queue is empty\n"); - } - else { - delNode = *front; - if (*front == *rear) { - *rear = NULL; - } - (*front) = (*front)->Next; - - free(delNode); - } - - return; -} - -void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr) -{ - node *newNode; - newNode = (node*)malloc(sizeof(node)); - - newNode->Next = NULL; - newNode->procNo = procNo; - newNode->numBytesArrAddr = numBytesArrAddr; - - - if ((*front == NULL) && (*rear == NULL)) { - *front = newNode; - *rear = newNode; -#if 0 - printf("Front and rear both NULL\n"); -#endif - fflush(stdout); - } - else { - (*rear)->Next = newNode; - *rear=newNode; -#if 0 - printf("Front and rear both not NULL\n"); -#endif - fflush(stdout); - } - - return; -} - -int Check_Request_Offset(int tag_received) -{ -#if 0 - printf("Tag received %d\n",tag_received); -#endif - - if (tag_received == REQUEST_TAG) { -#if 0 - printf("Return from Check_Request_Offset\n"); -#endif - return 1; - } - - - return 0; -} - -int Check_Acknowledgement(int tag_received) -{ - if (tag_received == ACK_TAG) - return 1; - - return 0; -} - -int End_control_shared_request(int tag_received) -{ - if (tag_received == END_TAG) - return 1; - - - return 0; -} - - -int main(int argc, char **argv) -{ - long recvBuff; - long offsetValue; - long endoffile; - int size; - int tag_received; - int END_FLAG = 0; - - int recvcount = 1; - MPI_Status status; - MPI_Comm parentComm; - static MPI_Offset offset = 0; - - /*statusStruct arr;*/ - - node *rear, *front; - rear = front = NULL; - -#if 0 - printf("addproc_control: MPI_INIT\n"); fflush(stdout); -#endif - MPI_Init(&argc,&argv); - -#if 0 - printf("addproc_control: MPI_Comm_size\n"); fflush(stdout); -#endif - MPI_Comm_size(MPI_COMM_WORLD,&size); - - - endoffile = 0; - -#if 0 - printf("addproc_control: start listening\n"); fflush(stdout); -#endif - while(!END_FLAG) { - - /* Receive request from other processes */ - MPI_Comm_get_parent(&parentComm); - - MPI_Recv(&recvBuff,recvcount,OMPI_OFFSET_DATATYPE,MPI_ANY_SOURCE,MPI_ANY_TAG,parentComm,&status); - tag_received = status.MPI_TAG; - - switch (tag_received) - { - - case REQUEST_TAG: -#if 0 - printf("addproc_control: Offset requested by the process %d\n",status.MPI_SOURCE); fflush(stdout); -#endif - /* Insert the node into the linked list */ - nodeInsert(&front,&rear,status.MPI_SOURCE,recvBuff); - break; - case END_TAG: -#if 0 - printf("addproc_control: End Control tag received\n"); fflush(stdout); -#endif - END_FLAG = 1; - break; - case SEEK_SET_TAG: - offset = recvBuff; - MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,SEEK_SET_TAG,parentComm); -#if 0 - printf("addproc_control: Seek set tag received\n"); fflush(stdout); -#endif - break; - case SEEK_CUR_TAG: -#if 0 - printf("addproc_control: Seek CUR Tag received\n"); fflush(stdout); -#endif - /*set the pointer to the offset*/ - offset += recvBuff; - MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,SEEK_CUR_TAG,parentComm); - break; - case SEEK_END_TAG: -#if 0 - printf("addproc_control: Seek END TAG received\n"); fflush(stdout); -#endif - offset = endoffile; - offset += recvBuff; - MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,SEEK_END_TAG,parentComm); - break; - case GET_POSITION_TAG: -#if 0 - printf("\naddproc_control: Get Position tag received\n"); fflush(stdout); -#endif - /*Send the offset as requested*/ - MPI_Send(&offset,1,OMPI_OFFSET_DATATYPE,status.MPI_SOURCE,GET_POSITION_TAG,parentComm); - break; - default: - printf("addproc_control: Unknown tag received\n"); fflush(stdout); - break; - } - - while (front != NULL) { - - offsetValue = offset; - - offset += front->numBytesArrAddr; - - /* Store the end of file */ - if (endoffile < offset) - endoffile = offset; - - - /* MPI_Send to the correct process */ - - MPI_Send(&offsetValue,1,OMPI_OFFSET_DATATYPE, front->procNo, OFFSET_TAG, - parentComm); - nodeDelete(&front,&rear); - - } - - } /* End of while(1) loop */ - -#if 0 - printf("addproc_control: finalizing mpi...\n"); fflush(stdout); -#endif - MPI_Finalize(); - -#if 0 - printf("addproc_control: Exiting...\n"); -#endif - return 0; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_control.h b/ompi/mca/sharedfp/addproc/sharedfp_addproc_control.h deleted file mode 100644 index 40072e57f40..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_control.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2008 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_SHAREDFP_addproc_control_H -#define MCA_SHAREDFP_addproc_control_H - -#include -#include "mpi.h" -#include "sharedfp_addproc.h" - -BEGIN_C_DECLS - -void nodeDelete(node **front, node **rear); -void nodeInsert(node **front, node **rear, int procNo, long numBytesArrAddr); -int Check_Request_Offset(int tag_received); -int Check_Acknowledgement(int tag_received); -int End_control_shared_request(int tag_received); - -END_C_DECLS - -#endif /* MCA_SHAREDFP_addproc_control_H */ diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c deleted file mode 100644 index 07abc1113d1..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c +++ /dev/null @@ -1,158 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/sharedfp/sharedfp.h" -#include "ompi/mca/pml/pml.h" - -#include -#include -#include "ompi/mca/sharedfp/base/base.h" - -int mca_sharedfp_addproc_file_open (struct ompi_communicator_t *comm, - char* filename, - int amode, - struct ompi_info_t *info, - mca_io_ompio_file_t *fh) -{ - int ret = OMPI_SUCCESS, err; - int rank; - struct mca_sharedfp_base_data_t* sh; - mca_io_ompio_file_t * shfileHandle; - MPI_Comm newInterComm; - struct mca_sharedfp_addproc_data * addproc_data = NULL; - - /*-------------------------------------------------*/ - /*Open the same file again without shared file pointer*/ - /*-------------------------------------------------*/ - shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); - ret = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false); - if ( OMPI_SUCCESS != ret) { - printf( "mca_sharedfp_addproc_file_open: Error during file open\n"); - return ret; - } - - /*Memory is allocated here for the sh structure*/ - if ( mca_sharedfp_addproc_verbose ) { - printf( "mca_sharedfp_addproc_file_open: malloc f_sharedfp_ptr struct\n"); - } - sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t)); - if ( NULL == sh ){ - printf( "mca_sharedfp_addproc_file_open: Error, unable to malloc f_sharedfp_ptr struct\n"); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /*Populate the sh file structure based on the implementation*/ - sh->sharedfh = shfileHandle; /* Shared file pointer*/ - sh->global_offset = 0; /* Global Offset*/ - sh->comm = comm; /* Communicator*/ - sh->selected_module_data = NULL; - - rank = ompi_comm_rank ( sh->comm ); - - if ( mca_sharedfp_addproc_verbose ) { - printf( "mca_sharedfp_addproc_file_open: START spawn by rank=%d\n",rank); - } - - /*Spawn a new process which will maintain the offsets for this file open*/ - ret = MPI_Comm_spawn("mca_sharedfp_addproc_control", MPI_ARGV_NULL, 1, MPI_INFO_NULL, - 0, sh->comm, &newInterComm, &err); - if ( OMPI_SUCCESS != ret ) { - printf( "mca_sharedfp_addproc_file_open: error spawning control process ret=%d\n", - ret); - } - - /*If spawning successful*/ - if (newInterComm) { - addproc_data = (struct mca_sharedfp_addproc_data*)malloc(sizeof(struct mca_sharedfp_addproc_data)); - if ( NULL == addproc_data ){ - printf( "mca_sharedfp_addproc_file_open: Error, unable to malloc addproc_data struct\n"); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - /*Store the new Intercommunicator*/ - addproc_data->intercom = newInterComm; - - /*save the addproc data*/ - sh->selected_module_data = addproc_data; - /*remember the shared file handle*/ - fh->f_sharedfp_data = sh; - } - else{ - printf( "mca_sharedfp_addproc_file_open: DONE spawn by rank=%d, errcode[success=%d, err=%d]=%d\n", - rank, MPI_SUCCESS, MPI_ERR_SPAWN, ret); - ret = OMPI_ERROR; - } - - return ret; -} - -int mca_sharedfp_addproc_file_close (mca_io_ompio_file_t *fh) -{ - struct mca_sharedfp_base_data_t *sh=NULL; - int err = OMPI_SUCCESS; - long sendBuff = 0; - int count = 1; - int rank; - struct mca_sharedfp_addproc_data * addproc_data = NULL; - - if ( NULL == fh->f_sharedfp_data){ - /* Can happen with lazy initialization of the sharedfp structures */ - if ( mca_sharedfp_addproc_verbose ) { - printf( "sharedfp_addproc_file_close - shared file pointer structure not initialized\n"); - } - return OMPI_SUCCESS; - } - sh = fh->f_sharedfp_data; - - rank = ompi_comm_rank ( sh->comm ); - - /* Make sure that all processes are ready to release the - ** shared file pointer resources - */ - sh->comm->c_coll.coll_barrier(sh->comm, sh->comm->c_coll.coll_barrier_module ); - - addproc_data = (struct mca_sharedfp_addproc_data*)(sh->selected_module_data); - - if (addproc_data) { - /*tell additional proc to stop listening*/ - if(0 == rank){ - MCA_PML_CALL(send( &sendBuff, count, OMPI_OFFSET_DATATYPE, 0, END_TAG, - MCA_PML_BASE_SEND_STANDARD, addproc_data->intercom)); - } - - /* Free intercommunicator */ - if(addproc_data->intercom){ - ompi_comm_free(&(addproc_data->intercom)); - } - free(addproc_data); - } - - /* Close the main file opened by this component*/ - err = ompio_io_ompio_file_close(sh->sharedfh); - - /*free shared file pointer data struct*/ - free(sh); - return err; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_iread.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_iread.c deleted file mode 100644 index 5b1ef44e166..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_iread.c +++ /dev/null @@ -1,85 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/sharedfp/sharedfp.h" - -int mca_sharedfp_addproc_iread(mca_io_ompio_file_t *fh, - void *buf, - int count, - ompi_datatype_t *datatype, - MPI_Request * request) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE offset = 0; - long bytesRequested = 0; - size_t numofBytes; - struct mca_sharedfp_base_data_t *sh = NULL; - - if(NULL == fh->f_sharedfp_data){ - opal_output(0, "sharedfp_addproc_iread - shared file pointer structure not initialized correctly\n"); - return OMPI_ERROR; - } - - /* Calculate the number of bytes to write */ - opal_datatype_type_size ( &datatype->super ,&numofBytes); - bytesRequested = count * numofBytes; - - if ( mca_sharedfp_addproc_verbose ){ - printf("mca_sharedfp_addproc_iread: Bytes Requested is %ld\n",bytesRequested); - } - /* Retrieve the shared file data struct */ - sh = fh->f_sharedfp_data; - - /*Request to the additional process for the offset*/ - ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offset); - if( OMPI_SUCCESS == ret ){ - if ( mca_sharedfp_addproc_verbose ){ - printf("mca_sharedfp_addproc_iread: Offset received is %lld\n",offset); - } - /* Read from the file */ - ret = ompio_io_ompio_file_iread_at ( sh->sharedfh, offset, buf, count, datatype, request); - } - - return ret; -} -int mca_sharedfp_addproc_read_ordered_begin(mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - opal_output(0,"mca_sharedfp_addproc_read_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; - -} - - -int mca_sharedfp_addproc_read_ordered_end(mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - opal_output(0,"mca_sharedfp_addproc_read_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; - -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_iwrite.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_iwrite.c deleted file mode 100644 index b846652db1a..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_iwrite.c +++ /dev/null @@ -1,84 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/sharedfp/sharedfp.h" - -int mca_sharedfp_addproc_iwrite(mca_io_ompio_file_t *fh, - void *buf, - int count, - ompi_datatype_t *datatype, - MPI_Request * request) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE offset = 0; - long bytesRequested = 0; - size_t numofBytes; - struct mca_sharedfp_base_data_t *sh = NULL; - - if(NULL == fh->f_sharedfp_data){ - opal_output(0, "sharedfp_addproc_iwrite: shared file pointer structure not initialized correctly\n"); - return OMPI_ERROR; - } - - /* Calculate the number of bytes to write */ - opal_datatype_type_size ( &datatype->super, &numofBytes); - bytesRequested = count * numofBytes; - - /* Retrieve the shared file data struct */ - sh = fh->f_sharedfp_data; - - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_iwrite: Bytes Requested is %ld\n",bytesRequested); - } - /* Request the offset to write bytesRequested bytes */ - ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offset); - if ( OMPI_SUCCESS == ret ) { - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_iwrite: Offset received is %lld\n",offset); - } - /* Write to the file */ - ret = ompio_io_ompio_file_iwrite_at(sh->sharedfh,offset,buf,count,datatype,request); - } - - return ret; -} - -int mca_sharedfp_addproc_write_ordered_begin(mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - opal_output(0,"mca_sharedfp_addproc_write_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; -} - - -int mca_sharedfp_addproc_write_ordered_end(mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - opal_output(0,"mca_sharedfp_addproc_write_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_read.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_read.c deleted file mode 100644 index f59ce94dd36..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_read.c +++ /dev/null @@ -1,196 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/sharedfp/sharedfp.h" - -int mca_sharedfp_addproc_read ( mca_io_ompio_file_t *fh, - void *buf, int count, MPI_Datatype datatype, MPI_Status *status) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE offset = 0; - long bytesRequested = 0; - size_t numofBytes; - struct mca_sharedfp_base_data_t *sh = NULL; - mca_sharedfp_base_module_t * shared_fp_base_module = NULL; - - if(NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_addproc_verbose ) { - printf("sharedfp_addproc_read: opening the shared file pointer file\n"); - } - shared_fp_base_module = fh->f_sharedfp; - - ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, - fh->f_filename, - fh->f_amode, - fh->f_info, - fh); - if ( OMPI_SUCCESS != ret ) { - opal_output(0,"sharedfp_addproc_read - error opening the shared file pointer\n"); - return ret; - } - } - - /* Calculate the number of bytes to write */ - opal_datatype_type_size ( &datatype->super ,&numofBytes); - bytesRequested = count * numofBytes; - - if ( mca_sharedfp_addproc_verbose ){ - printf("mca_sharedfp_addproc_read: Bytes Requested is %ld\n", bytesRequested); - } - /* Retrieve the shared file data struct */ - sh = fh->f_sharedfp_data; - - /*Request to the additional process for the offset*/ - ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offset); - if( OMPI_SUCCESS == ret ){ - if ( mca_sharedfp_addproc_verbose ){ - printf("mca_sharedfp_addproc_read: Offset received is %lld\n",offset); - } - /* Read from the file */ - ret = ompio_io_ompio_file_read_at(sh->sharedfh,offset,buf,count,datatype,status); - } - - return ret; -} - -int mca_sharedfp_addproc_read_ordered (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_status_public_t *status) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE offset = 0, offsetReceived = 0; - long sendBuff = 0; - long *buff=NULL; - long offsetBuff, bytesRequested = 0; - size_t numofBytes; - int rank, size, i; - struct mca_sharedfp_base_data_t *sh = NULL; - mca_sharedfp_base_module_t * shared_fp_base_module = NULL; - - if(NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_addproc_verbose ) { - printf("sharedfp_addproc_read_ordered: opening the shared file pointer file\n"); - } - shared_fp_base_module = fh->f_sharedfp; - - ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, - fh->f_filename, - fh->f_amode, - fh->f_info, - fh); - if ( OMPI_SUCCESS != ret ) { - opal_output(0,"sharedfp_addproc_read_ordered - error opening the shared file pointer\n"); - return ret; - } - } - - - /*Retrieve the new communicator*/ - sh = fh->f_sharedfp_data; - - /* Calculate the number of bytes to read*/ - opal_datatype_type_size ( &datatype->super, &numofBytes); - sendBuff = count * numofBytes; - - /* Get the ranks in the communicator */ - rank = ompi_comm_rank ( sh->comm); - size = ompi_comm_size ( sh->comm); - - if ( 0 == rank ) { - buff = (long*)malloc(sizeof(long) * size); - if ( NULL == buff ) - return OMPI_ERR_OUT_OF_RESOURCE; - } - - ret = sh->comm->c_coll.coll_gather( &sendBuff, 1, OMPI_OFFSET_DATATYPE, - buff, 1, OMPI_OFFSET_DATATYPE, 0, sh->comm, - sh->comm->c_coll.coll_gather_module); - if ( OMPI_SUCCESS != ret ) { - goto exit; - } - - /* All the counts are present now in the recvBuff. - The size of recvBuff is sizeof_newComm - */ - if ( 0 == rank ) { - for (i = 0; i < size ; i ++) { - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_read_ordered: Buff is %ld\n",buff[i]); - } - bytesRequested += buff[i]; - - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_read_ordered: Bytes requested are %ld\n",bytesRequested); - } - } - - /* Request the offset to read bytesRequested bytes - ** only the root process needs to do the request, - ** since the root process will then tell the other - ** processes at what offset they should read their - ** share of the data. - */ - ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offsetReceived); - if( OMPI_SUCCESS != ret ){ - goto exit; - } - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_read_ordered: Offset received is %lld\n",offsetReceived); - } - buff[0] += offsetReceived; - - - for (i = 1 ; i < size; i++) { - buff[i] += buff[i-1]; - } - } - - /* Scatter the results to the other processes*/ - ret = sh->comm->c_coll.coll_scatter ( buff, 1, OMPI_OFFSET_DATATYPE, &offsetBuff, - 1, OMPI_OFFSET_DATATYPE, 0, sh->comm, - sh->comm->c_coll.coll_scatter_module ); - if ( OMPI_SUCCESS != ret ) { - goto exit; - } - - /*Each process now has its own individual offset in recvBUFF*/ - offset = offsetBuff - sendBuff; - - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_read_ordered: Offset returned is %lld\n",offset); - } - - /* read from the file */ - ret = ompio_io_ompio_file_read_at_all(sh->sharedfh,offset,buf,count,datatype,status); - -exit: - if ( NULL != buff ) { - free ( buff ); - } - - return ret; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_request_position.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_request_position.c deleted file mode 100644 index 4fdd741407d..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_request_position.c +++ /dev/null @@ -1,75 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/sharedfp/sharedfp.h" - -int mca_sharedfp_addproc_request_position(struct mca_sharedfp_base_data_t * sh, - int bytes_requested, - OMPI_MPI_OFFSET_TYPE *offset) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE position = 0; - long sendBuff = bytes_requested ; - int count = 1; - - - struct mca_sharedfp_addproc_data * addproc_data = sh->selected_module_data; - - *offset = 0; - - ret = MCA_PML_CALL(send( &sendBuff, count, OMPI_OFFSET_DATATYPE, 0, REQUEST_TAG, - MCA_PML_BASE_SEND_STANDARD, addproc_data->intercom)); - if ( OMPI_SUCCESS != ret ) { - return ret; - } - ret = MCA_PML_CALL(recv( &position, count, OMPI_OFFSET_DATATYPE, 0, OFFSET_TAG, - addproc_data->intercom, MPI_STATUS_IGNORE)); - - *offset = position; - return ret; -} - -int mca_sharedfp_addproc_get_position(mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE * offset) -{ - int ret = OMPI_SUCCESS; - struct mca_sharedfp_base_data_t *sh = NULL; - - if(NULL == fh->f_sharedfp_data){ - opal_output(0, "sharedfp_addproc_get_position - shared file pointer structure not initialized correctly\n"); - return OMPI_ERROR; - } - - /* Retrieve the shared file data struct*/ - sh = fh->f_sharedfp_data; - - /* Requesting the offset to write 0 bytes, - ** returns the current offset w/o updating it - */ - ret = mca_sharedfp_addproc_request_position(sh, 0, offset); - - return ret; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_seek.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_seek.c deleted file mode 100644 index c3b5f0e0fe9..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_seek.c +++ /dev/null @@ -1,69 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/sharedfp/sharedfp.h" - -int -mca_sharedfp_addproc_seek (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, int whence) -{ - int rank; - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE position = 0; - struct mca_sharedfp_base_data_t *sh = NULL; - struct mca_sharedfp_addproc_data * addproc_data = sh->selected_module_data; - long buff = 0; - - if(NULL == fh->f_sharedfp_data){ - opal_output(0, "sharedfp_addproc_write_ordered - shared file pointer structure not initialized correctly\n"); - return OMPI_ERROR; - } - - sh = fh->f_sharedfp_data; - rank = ompi_comm_rank ( sh->comm ); - buff = offset; - - - /* This is a collective call, - * only one process needs to communicate with the */ - if(0 == rank){ - ret = MCA_PML_CALL(send ( &buff, 1, OMPI_OFFSET_DATATYPE, 0, whence, - MCA_PML_BASE_SEND_STANDARD, - addproc_data->intercom)); - if ( OMPI_SUCCESS != ret ) { - return OMPI_ERROR; - } - ret = MCA_PML_CALL(recv(&position, 1, OMPI_OFFSET_DATATYPE, 0, whence, - addproc_data->intercom, MPI_STATUS_IGNORE)); - if ( OMPI_SUCCESS != ret ) { - return OMPI_ERROR; - } - - } - ret = sh->comm->c_coll.coll_barrier(sh->comm, sh->comm->c_coll.coll_barrier_module); - - return ret; -} diff --git a/ompi/mca/sharedfp/addproc/sharedfp_addproc_write.c b/ompi/mca/sharedfp/addproc/sharedfp_addproc_write.c deleted file mode 100644 index ab6e530921a..00000000000 --- a/ompi/mca/sharedfp/addproc/sharedfp_addproc_write.c +++ /dev/null @@ -1,196 +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) 2013 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "ompi_config.h" -#include "sharedfp_addproc.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/sharedfp/sharedfp.h" - -int mca_sharedfp_addproc_write (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_status_public_t *status) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE offset = 0; - long bytesRequested = 0; - size_t numofBytes; - struct mca_sharedfp_base_data_t *sh = NULL; - mca_sharedfp_base_module_t * shared_fp_base_module = NULL; - - if(NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_addproc_verbose ) { - printf("sharedfp_addproc_write: opening the shared file pointer file\n"); - } - shared_fp_base_module = fh->f_sharedfp; - - ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, - fh->f_filename, - fh->f_amode, - fh->f_info, - fh); - if ( OMPI_SUCCESS != ret ) { - opal_output(0,"sharedfp_addproc_write - error opening the shared file pointer\n"); - return ret; - } - } - - /* Calculate the number of bytes to write*/ - opal_datatype_type_size ( &datatype->super, &numofBytes); - bytesRequested = count * numofBytes; - - /*Retrieve the shared file data structure */ - sh = fh->f_sharedfp_data; - - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_write: sharedfp_addproc_write: Bytes Requested is %ld\n",bytesRequested); - } - - /*Request the offset to write bytesRequested bytes*/ - ret = mca_sharedfp_addproc_request_position( sh, bytesRequested, &offset); - if ( OMPI_SUCCESS == ret ) { - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_write: Offset received is %lld\n",offset); - } - /* Write to the file */ - ret = ompio_io_ompio_file_write_at(sh->sharedfh,offset,buf,count,datatype,status); - } - - return ret; -} - -int mca_sharedfp_addproc_write_ordered (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, - ompi_status_public_t *status) -{ - int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE offset = 0, offsetReceived = 0; - long sendBuff = 0; - long *buff=NULL; - long offsetBuff; - long bytesRequested = 0; - int recvcnt = 1, sendcnt = 1; - size_t numofBytes; - int rank, size, i; - struct mca_sharedfp_base_data_t *sh = NULL; - mca_sharedfp_base_module_t * shared_fp_base_module = NULL; - - if ( NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_addproc_verbose ) { - printf("sharedfp_addproc_write_ordered: opening the shared file pointer\n"); - } - shared_fp_base_module = fh->f_sharedfp; - - ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, - fh->f_filename, - fh->f_amode, - fh->f_info, - fh); - if ( OMPI_SUCCESS != ret ) { - opal_output(0,"sharedfp_addproc_write_ordered - error opening the shared file pointer\n"); - return ret; - } - } - - /*Retrieve the shared file pointer structure*/ - sh = fh->f_sharedfp_data; - - /* Calculate the number of bytes to write*/ - opal_datatype_type_size ( &datatype->super, &numofBytes); - sendBuff = count * numofBytes; - - /* Get the ranks in the communicator */ - rank = ompi_comm_rank ( sh->comm ); - size = ompi_comm_size ( sh->comm ); - - if ( 0 == rank ) { - buff = (long*)malloc(sizeof(long) * size); - if ( NULL == buff ) - return OMPI_ERR_OUT_OF_RESOURCE; - } - - ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, buff, - recvcnt, OMPI_OFFSET_DATATYPE, 0, sh->comm, - sh->comm->c_coll.coll_gather_module); - if( OMPI_SUCCESS != ret ){ - goto exit; - } - - /* All the counts are present now in the recvBuff. - The size of recvBuff is sizeof_newComm - */ - if ( 0 == rank ) { - for (i = 0; i < size ; i ++) { - bytesRequested += buff[i]; - - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_write_ordered: Bytes requested are %ld\n",bytesRequested); - } - } - - /* Request the offset to write bytesRequested bytes - ** only the root process needs to do the request, - ** since the root process will then tell the other - ** processes at what offset they should write their - ** share of the data. - */ - ret = mca_sharedfp_addproc_request_position(sh,bytesRequested,&offsetReceived); - if( OMPI_SUCCESS != ret ){ - goto exit; - } - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_write_ordered: Offset received is %lld\n",offsetReceived); - } - buff[0] += offsetReceived; - - for (i = 1 ; i < size; i++) { - buff[i] += buff[i-1]; - } - } - - /* Scatter the results to the other processes*/ - ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, &offsetBuff, - recvcnt, OMPI_OFFSET_DATATYPE, 0, sh->comm, - sh->comm->c_coll.coll_scatter_module ); - if( OMPI_SUCCESS != ret ){ - goto exit; - } - - /*Each process now has its own individual offset in recvBUFF*/ - offset = offsetBuff - sendBuff; - - if ( mca_sharedfp_addproc_verbose ){ - printf("sharedfp_addproc_write_ordered: Offset returned is %lld\n",offset); - } - - /* write to the file */ - ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset,buf,count,datatype,status); - -exit: - if ( NULL != buff ) { - free ( buff ); - } - return ret; -} From db1839e74e39f8fa37fa06b77cea14aa8ac1cd64 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 30 Jun 2015 09:37:00 +0900 Subject: [PATCH 0017/1704] mpiext/affinity: fix missing function type (cherry picked from commit open-mpi/ompi@a4cc83f4f769f006aa374931befd77a083e13352) --- ompi/mpiext/affinity/c/mpiext_affinity_str.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ompi/mpiext/affinity/c/mpiext_affinity_str.c b/ompi/mpiext/affinity/c/mpiext_affinity_str.c index 02983aa40af..653c91ebb6d 100644 --- a/ompi/mpiext/affinity/c/mpiext_affinity_str.c +++ b/ompi/mpiext/affinity/c/mpiext_affinity_str.c @@ -5,11 +5,14 @@ * Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. + * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * Simple routine to expose three things to the MPI process: @@ -42,9 +45,9 @@ static const char not_bound_str[] = "Not bound (i.e., bound to all processors)"; * Utility routine **************************************************************************/ -static no_hwloc_support(char ompi_bound[OMPI_AFFINITY_STRING_MAX], - char current_binding[OMPI_AFFINITY_STRING_MAX], - char exists[OMPI_AFFINITY_STRING_MAX]) +static void no_hwloc_support(char ompi_bound[OMPI_AFFINITY_STRING_MAX], + char current_binding[OMPI_AFFINITY_STRING_MAX], + char exists[OMPI_AFFINITY_STRING_MAX]) { strncpy(ompi_bound, "Not supported", OMPI_AFFINITY_STRING_MAX); strncpy(current_binding, "Not supported", OMPI_AFFINITY_STRING_MAX); From c779fefbe905032390fff16ee8b608792d512e66 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 1 Jul 2015 09:10:49 -0600 Subject: [PATCH 0018/1704] Fix PGI compilation of opal_condition test PGI was failing to build this test due to the {} initializers of some of the global variables. The initializers were added to remove common symbols from the test repository. This commit removes the initializers and makes the variables static which should fix both the compile issue and avoid the common symbols. This commit additionally removes the check for OPAL_ENABLE_MULTI_THREADS since Open MPI requires thread support. Signed-off-by: Nathan Hjelm --- test/threads/opal_condition.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/test/threads/opal_condition.c b/test/threads/opal_condition.c index 17703a0c6bf..77fc7ab557d 100644 --- a/test/threads/opal_condition.c +++ b/test/threads/opal_condition.c @@ -29,25 +29,9 @@ #include "opal/threads/condition.h" #include "opal/sys/atomic.h" - -#if !OPAL_ENABLE_MULTI_THREADS - -/* If we don't have thread support, there's no point in running this - test */ - -int main(int argc, char *argv[]) -{ - printf("OMPI was compiled without thread support -- skipping this test\n"); - return 77; -} - -#else - -/* Only have the body of this test if we have thread support */ - -opal_mutex_t mutex = {}; -opal_condition_t thr1_cond = {}; -opal_condition_t thr2_cond = {}; +static opal_mutex_t mutex; +static opal_condition_t thr1_cond; +static opal_condition_t thr2_cond; static volatile int thr1_count = 0; static volatile int thr2_count = 0; @@ -134,5 +118,3 @@ int main(int argc, char** argv) return test_finalize(); } - -#endif /* OPAL_ENABLE_MULTI_THREADS */ From b8ed642804abe5005269eb1df074290225230008 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 2 Jul 2015 07:55:03 -0700 Subject: [PATCH 0019/1704] libfabric: fix wrappers for static builds Need to set the WRAPPER_EXTRA flags so that the wrappers for static builds pull in -lfabric. Also update/fix some comments. (cherry picked from commit f1353947ffd0f1f395e3b90ce33fe28eb60f105f) --- opal/mca/common/libfabric/configure.m4 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/opal/mca/common/libfabric/configure.m4 b/opal/mca/common/libfabric/configure.m4 index 911e2a9300a..49e7d46c895 100644 --- a/opal/mca/common/libfabric/configure.m4 +++ b/opal/mca/common/libfabric/configure.m4 @@ -5,6 +5,7 @@ # of Tennessee Research Foundation. All rights # reserved. # Copyright (c) 2015 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -12,18 +13,16 @@ # $HEADER$ # -# -# If LIBFABRIC support was requested, then build the LIBFABRIC support library. -# This code checks just makes sure the check was done earlier by the -# opal_check_libfabric.m4 code. -# - AC_DEFUN([MCA_opal_common_libfabric_CONFIG],[ AC_CONFIG_FILES([opal/mca/common/libfabric/Makefile]) - # check for libfabric request + # Check for libfabric. Note that $opal_common_libfabric_happy is + # used in other configure.m4's to know if libfabric configured + # successfully. OPAL_CHECK_LIBFABRIC([opal_common_libfabric], [opal_common_libfabric_happy=yes + common_libfabric_WRAPPER_EXTRA_LDFLAGS=$opal_common_libfabric_LDFLAGS + common_libfabric_WRAPPER_EXTRA_LIBS=$opal_common_libfabric_LIBS $1], [opal_common_libfabric_happy=no $2]) From 55ca1b2c4220413bb215c242f68e527b7b8cdc0e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 29 Jun 2015 09:08:35 -0700 Subject: [PATCH 0020/1704] mpi_f08: fix MPI_BUFFER_DETACH binding (cherry picked from commit open-mpi/ompi@fc69c0be247857d7c5dc7d7c05bfaac2b8ae8589) --- ompi/mpi/fortran/use-mpi-f08/buffer_detach_f08.F90 | 5 +++-- ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h | 3 ++- ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 | 12 ++++-------- .../use-mpi-f08/profile/pbuffer_detach_f08.F90 | 5 +++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-f08/buffer_detach_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/buffer_detach_f08.F90 index 4249416e564..7c7815175d2 100644 --- a/ompi/mpi/fortran/use-mpi-f08/buffer_detach_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/buffer_detach_f08.F90 @@ -1,6 +1,6 @@ ! -*- f90 -*- ! -! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. ! $COPYRIGHT$ @@ -9,8 +9,9 @@ subroutine MPI_Buffer_detach_f08(buffer_addr,size,ierror) use :: mpi_f08, only : ompi_buffer_detach_f + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buffer_addr + TYPE(C_PTR), INTENT(OUT) :: buffer_addr INTEGER, INTENT(OUT) :: size INTEGER, OPTIONAL, INTENT(OUT) :: ierror integer :: c_ierror diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index a692e6055b0..6d120106e7d 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -191,8 +191,9 @@ end subroutine ompi_buffer_attach_f subroutine ompi_buffer_detach_f(buffer_addr,size,ierror) & BIND(C, name="ompi_buffer_detach_f") + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buffer_addr + TYPE(C_PTR), INTENT(OUT) :: buffer_addr INTEGER, INTENT(OUT) :: size INTEGER, INTENT(OUT) :: ierror end subroutine ompi_buffer_detach_f diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 index 1cabdff5f29..9cacb2de344 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 @@ -1,7 +1,7 @@ ! -*- f90 -*- ! -! Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2015 Los Alamos National Security, LLC. ! All rights reserved. ! Copyright (c) 2012 The University of Tennessee and The University ! of Tennessee Research Foundation. All rights @@ -71,13 +71,9 @@ end subroutine MPI_Buffer_attach_f08 interface MPI_Buffer_detach subroutine MPI_Buffer_detach_f08(buffer_addr,size,ierror) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR implicit none - !DEC$ ATTRIBUTES NO_ARG_CHECK :: buffer_addr - !GCC$ ATTRIBUTES NO_ARG_CHECK :: buffer_addr - !$PRAGMA IGNORE_TKR buffer_addr - !DIR$ IGNORE_TKR buffer_addr - !IBM* IGNORE_TKR buffer_addr - OMPI_FORTRAN_IGNORE_TKR_TYPE :: buffer_addr + TYPE(C_PTR), INTENT(OUT) :: buffer_addr INTEGER, INTENT(OUT) :: size INTEGER, OPTIONAL, INTENT(OUT) :: ierror end subroutine MPI_Buffer_detach_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pbuffer_detach_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pbuffer_detach_f08.F90 index d39799b29a9..28125b90341 100644 --- a/ompi/mpi/fortran/use-mpi-f08/profile/pbuffer_detach_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pbuffer_detach_f08.F90 @@ -1,6 +1,6 @@ ! -*- f90 -*- ! -! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. ! $COPYRIGHT$ @@ -8,9 +8,10 @@ #include "ompi/mpi/fortran/configure-fortran-output.h" subroutine PMPI_Buffer_detach_f08(buffer_addr,size,ierror) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR use :: mpi_f08, only : ompi_buffer_detach_f implicit none - OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buffer_addr + TYPE(C_PTR), INTENT(OUT) :: buffer_addr INTEGER, INTENT(OUT) :: size INTEGER, OPTIONAL, INTENT(OUT) :: ierror integer :: c_ierror From f27822e24a0e15f105f72fededfa925717f4d1df Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 3 Jul 2015 08:56:34 -0700 Subject: [PATCH 0021/1704] mpi_f08: fix MPI_BUFFER_DETACH interfaces Add an mpi_f08-specific implementation for MPI_BUFFER_DETACH. Per MPI-3.1:3.6, p45, the buffer argument is ignored in MPI_BUFFER_DETACH for mpif.h and the mpi module. But in the mpi_f08 module, the buffer argument is treated like it is in the C binding. (cherry picked from commit open-mpi/ompi@bd94da7de48079f1e1251c01c6295729baa48263) --- ompi/mpi/fortran/mpif-h/buffer_detach_f.c | 39 +++++++++++++++---- .../use-mpi-f08/mpi-f-interfaces-bind.h | 5 ++- .../use-mpi-f08/pmpi-f-interfaces-bind.h | 10 ++++- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c index a5cfad15eb1..3811baa3857 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c @@ -10,7 +10,7 @@ * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -65,14 +65,17 @@ OMPI_GENERATE_F77_BINDINGS (MPI_BUFFER_DETACH, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif +/* + * MPI-3.1 section 3.6, page 45, states that the mpif.h and mpi module + * interfaces for MPI_BUFFER_DETACH ignore the buffer argument. + * Therefore, for the mpif.h and mpi module interfaces, we use a dummy + * variable and leave the value handed in alone. + * + * The mpi_f08 implementation for MPI_BUFFER_DETACH is a separate + * routine -- see below. + */ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) { - /* - * It does not make sense in fortran to return a pointer - * here as the user may get a behavior that is unexpected. - * Therefore, we use a dummy variable and leave the value - * handed in alone. - */ int c_ierr; void *dummy; OMPI_SINGLE_NAME_DECL(size); @@ -83,3 +86,25 @@ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) OMPI_SINGLE_INT_2_FINT(size); } } + +/* + * Per above, this is the mpi_f08 module implementation of + * MPI_BUFFER_DETACH. It handles the buffer arugment just like the C + * binding. + */ +void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) +{ + int c_ierr; + void *dummy; + + OMPI_SINGLE_NAME_DECL(size); + c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); + if (NULL != ierr) { + *(void **)buffer = dummy; + *ierr = OMPI_INT_2_FINT(c_ierr); + } + + if (MPI_SUCCESS == c_ierr) { + OMPI_SINGLE_INT_2_FINT(size); + } +} diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index 6d120106e7d..097d104a06e 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -189,8 +189,11 @@ subroutine ompi_buffer_attach_f(buffer,size,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_buffer_attach_f +! Note that we have an F08-specific C implementation function for +! MPI_BUFFER_DETACH (i.e., it is different than the mpif.h / mpi +! module C implementation function). subroutine ompi_buffer_detach_f(buffer_addr,size,ierror) & - BIND(C, name="ompi_buffer_detach_f") + BIND(C, name="ompi_buffer_detach_f08") USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR implicit none TYPE(C_PTR), INTENT(OUT) :: buffer_addr diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h index 7a8b5b1a64f..e87d8fcfb88 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h @@ -89,8 +89,16 @@ subroutine pompi_buffer_attach_f(buffer,size,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine pompi_buffer_attach_f +! Note that we have an F08-specific C implementation function for +! PMPI_BUFFER_DETACH (i.e., it is different than the mpif.h / mpi +! module C implementation function). +! +! Note, too, we don't need a "p" version of the C implementation +! function -- Fortran's interfaces provide MPI_ and PMPI_ names for +! us; they can just both be bound to the same back-end +! ompi_buffer_detach_f08 C function. subroutine pompi_buffer_detach_f(buffer_addr,size,ierror) & - BIND(C, name="pompi_buffer_detach_f") + BIND(C, name="ompi_buffer_detach_f08") implicit none OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buffer_addr INTEGER, INTENT(OUT) :: size From 6dcaf809f23f1cc5430a584f35fd9b5d265724b1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 4 Jul 2015 05:17:42 -0700 Subject: [PATCH 0022/1704] mpi_f08: further fixes for MPI_BUFFER_DETACH A few minor fixes in addition to open-mpi/ompi@bd94da7de48079f1e1251c01c and open-mpi/ompi@fc69c0be247857d7c5dc7d7c0. (cherry picked from commit open-mpi/ompi@4694b16256b1f0ad6e782e43a1e4c7d6760fe298) --- ompi/mpi/fortran/mpif-h/buffer_detach_f.c | 9 ++++----- ompi/mpi/fortran/mpif-h/prototypes_mpi.h | 8 +++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c index 3811baa3857..4b1bf5226c2 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c @@ -79,6 +79,7 @@ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) int c_ierr; void *dummy; OMPI_SINGLE_NAME_DECL(size); + c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); @@ -96,15 +97,13 @@ void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) { int c_ierr; void *dummy; - OMPI_SINGLE_NAME_DECL(size); + c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); - if (NULL != ierr) { - *(void **)buffer = dummy; - *ierr = OMPI_INT_2_FINT(c_ierr); - } + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) { + *(void **)buffer = dummy; OMPI_SINGLE_INT_2_FINT(size); } } diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index 2c68dac5509..87166584c08 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2013 Universite Bordeaux 1 * Copyright (c) 2013 Los Alamos National Security, LLC. All rights @@ -457,6 +457,12 @@ PN2(void, MPI_Comm_null_delete_fn, mpi_comm_null_delete_fn, MPI_COMM_NULL_DELETE PN2(void, MPI_Comm_null_copy_fn, mpi_comm_null_copy_fn, MPI_COMM_NULL_COPY_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr)); PN2(void, MPI_Comm_dup_fn, mpi_comm_dup_fn, MPI_COMM_DUP_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr)); +/* + * The following is an mpi_f08-module-specific function that does not + * fit in to the normal/templated prototypes, above. + */ +void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr); + END_C_DECLS #endif From 8d3bd60bacc2d58dbf53eb51e740c630333a55e5 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 2 Jul 2015 15:47:38 +0900 Subject: [PATCH 0023/1704] mpi_f08: fix typo in binding name replace MPI_Win_flush_all_local with MPI_Win_flush_local_all (cherry picked from commit open-mpi/ompi@fa50e0d712b6d019bf35271afa809c5db994388b) --- ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 | 8 ++++---- ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 index 1cabdff5f29..71952062ae3 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 @@ -3419,14 +3419,14 @@ subroutine MPI_Win_flush_local_f08(rank,win,ierror) end subroutine MPI_Win_flush_local_f08 end interface MPI_Win_flush_local -interface MPI_Win_flush_all_local -subroutine MPI_Win_flush_all_local_f08(win,ierror) +interface MPI_Win_flush_local_all +subroutine MPI_Win_flush_local_all_f08(win,ierror) use :: mpi_f08_types, only : MPI_Win implicit none TYPE(MPI_Win), INTENT(IN) :: win INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine MPI_Win_flush_all_local_f08 -end interface MPI_Win_flush_all_local +end subroutine MPI_Win_flush_local_all_f08 +end interface MPI_Win_flush_local_all interface MPI_Win_flush_all subroutine MPI_Win_flush_all_f08(win,ierror) diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 index 4e9606a2b8a..9ba20c5264d 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 @@ -3312,14 +3312,14 @@ subroutine PMPI_Win_flush_local_f08(rank,win,ierror) end subroutine PMPI_Win_flush_local_f08 end interface PMPI_Win_flush_local -interface PMPI_Win_flush_all_local -subroutine PMPI_Win_flush_all_local_f08(win,ierror) +interface PMPI_Win_flush_local_all +subroutine PMPI_Win_flush_local_all_f08(win,ierror) use :: mpi_f08_types, only : MPI_Win implicit none TYPE(MPI_Win), INTENT(IN) :: win INTEGER, OPTIONAL, INTENT(OUT) :: ierror -end subroutine PMPI_Win_flush_all_local_f08 -end interface PMPI_Win_flush_all_local +end subroutine PMPI_Win_flush_local_all_f08 +end interface PMPI_Win_flush_local_all interface PMPI_Win_flush_all subroutine PMPI_Win_flush_all_f08(win,ierror) From e7fc282b4d741d5ce5ec8973aa573d3dea173990 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 2 Jul 2015 17:13:07 +0900 Subject: [PATCH 0024/1704] mpif: fix typo in interface name * MPI_Comm_dup_with_info * MPI_Comm_split_type * PMPI_Comm_split_type (cherry picked from commit open-mpi/ompi@6356c4b113508c43feadc677903955709b13b9b4) --- .../use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 16433d793af..e5ba03a36d7 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -1153,7 +1153,7 @@ end subroutine MPI_Comm_dup end interface -interface MPI_Comm_dup +interface MPI_Comm_dup_with_info subroutine MPI_Comm_dup_with_info(comm, info, newcomm, ierror) integer, intent(in) :: comm @@ -1627,7 +1627,7 @@ end subroutine PMPI_Comm_split end interface -interface MPI_Comm_split +interface MPI_Comm_split_type subroutine MPI_Comm_split_type(comm, split_type, key, info, newcomm, ierror) integer, intent(in) :: comm @@ -1640,7 +1640,7 @@ end subroutine MPI_Comm_split_type end interface -interface PMPI_Comm_split +interface PMPI_Comm_split_type subroutine PMPI_Comm_split_type(comm, split_type, key, info, newcomm, ierror) integer, intent(in) :: comm From 625c2808880e5cd1b12d28df1761ec8c35b59182 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 6 Jul 2015 09:45:01 +0900 Subject: [PATCH 0025/1704] btl/openib: queue pending fragments once only when running out of credit Fixes open-mpi/ompi#640 (cherry picked from commit open-mpi/ompi@9f171de4125643345c605637356234499182ee6d) --- opal/mca/btl/openib/btl_openib_component.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 56beb0b9c4b..507073e47e6 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -3376,12 +3376,15 @@ progress_pending_frags_wqe(mca_btl_base_endpoint_t *ep, const int qpn) frag = opal_list_remove_first(&ep->qps[qpn].no_wqe_pending_frags[i]); if(NULL == frag) break; + assert(0 == frag->opal_list_item_refcount); tmp_ep = to_com_frag(frag)->endpoint; ret = mca_btl_openib_endpoint_post_send(tmp_ep, to_send_frag(frag)); if (OPAL_SUCCESS != ret) { /* NTH: this handles retrying if we are out of credits but other errors are not * handled (maybe abort?). */ - opal_list_prepend (&ep->qps[qpn].no_wqe_pending_frags[i], (opal_list_item_t *) frag); + if (OPAL_ERR_RESOURCE_BUSY != ret) { + opal_list_prepend (&ep->qps[qpn].no_wqe_pending_frags[i], (opal_list_item_t *) frag); + } break; } } From ccedc82429ada754e74d45e2d58bdf0c3f1697ee Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 6 Jul 2015 09:52:27 -0700 Subject: [PATCH 0026/1704] fortran: only compile f08 buffer_detach once Since there is no profiling version of the f08 buffer_detach function (or, more specifically, the Fortran compile does the name mangling of MPI and PMPI to the back-end C function for us), ensure that it is only compiled once. Also, per Gilles' observation, the f08-related #pragmas are no longer relevant. (cherry picked from commit open-mpi/ompi@e28f01679338fe10b358e7a036ef99b451daf184) --- ompi/mpi/fortran/mpif-h/buffer_detach_f.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c index 4b1bf5226c2..b950fcabc2b 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c @@ -29,7 +29,6 @@ #pragma weak pmpi_buffer_detach__ = ompi_buffer_detach_f #pragma weak PMPI_Buffer_detach_f = ompi_buffer_detach_f -#pragma weak PMPI_Buffer_detach_f08 = ompi_buffer_detach_f #elif OMPI_PROFILE_LAYER OMPI_GENERATE_F77_BINDINGS (PMPI_BUFFER_DETACH, pmpi_buffer_detach, @@ -47,7 +46,6 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_BUFFER_DETACH, #pragma weak mpi_buffer_detach__ = ompi_buffer_detach_f #pragma weak MPI_Buffer_detach_f = ompi_buffer_detach_f -#pragma weak MPI_Buffer_detach_f08 = ompi_buffer_detach_f #endif #if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER @@ -92,7 +90,12 @@ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) * Per above, this is the mpi_f08 module implementation of * MPI_BUFFER_DETACH. It handles the buffer arugment just like the C * binding. + * + * Note that we only need to build this function once -- not for both + * profiling and non-profiling. So protect it with an appropriate + * #if. */ +#if !OMPI_PROFILE_LAYER void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) { int c_ierr; @@ -107,3 +110,4 @@ void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) OMPI_SINGLE_INT_2_FINT(size); } } +#endif // !OMPI_PROFILE_LAYER From 9f77762abe2723cb4ed2dd3230248b49f9453454 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 7 Jul 2015 07:32:37 -0700 Subject: [PATCH 0027/1704] mpi_f08: move the f08 version of buffer_detach to use-mpi-f08 @ggouaillardet was right -- we should have put the ompi_buffer_detach_f08() function in the use-mpi-f08 directory to begin with. Putting it in the mpif-h directory made it complicated as to whether the function would be built or not (e.g., whether weak symbols were supported or not, whether the profiling layer was disabled or not, ...etc.). Just put it in the use-mpi-f08 directory and always build it (when the mpi_f08 module is built, of course), and keep it simple. (cherry picked from commit open-mpi/ompi@8ff60c47cc9b576346dc5c0a0ca214f813f92439) --- ompi/mpi/fortran/mpif-h/buffer_detach_f.c | 36 +++-------- ompi/mpi/fortran/mpif-h/prototypes_mpi.h | 6 -- ompi/mpi/fortran/use-mpi-f08/Makefile.am | 1 + ompi/mpi/fortran/use-mpi-f08/buffer_detach.c | 65 ++++++++++++++++++++ 4 files changed, 73 insertions(+), 35 deletions(-) create mode 100644 ompi/mpi/fortran/use-mpi-f08/buffer_detach.c diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c index b950fcabc2b..6eaa7f8e64b 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c @@ -63,14 +63,18 @@ OMPI_GENERATE_F77_BINDINGS (MPI_BUFFER_DETACH, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -/* +/* (this comment is repeated in ompi/mpi/fortran/use-mpi-f08/buffer_detach.c) + * * MPI-3.1 section 3.6, page 45, states that the mpif.h and mpi module * interfaces for MPI_BUFFER_DETACH ignore the buffer argument. * Therefore, for the mpif.h and mpi module interfaces, we use a dummy * variable and leave the value handed in alone. * - * The mpi_f08 implementation for MPI_BUFFER_DETACH is a separate - * routine -- see below. + * The mpi_f08 implementation for MPI_BUFFER_DETACH therefore is a + * separate routine in the use-mpi-f08 directory (it's not built in + * the mpif-h directory because of all the different combinations of + * supporting weak symbols (or not), building the profiling layer (or + * not), etc.). */ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) { @@ -85,29 +89,3 @@ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) OMPI_SINGLE_INT_2_FINT(size); } } - -/* - * Per above, this is the mpi_f08 module implementation of - * MPI_BUFFER_DETACH. It handles the buffer arugment just like the C - * binding. - * - * Note that we only need to build this function once -- not for both - * profiling and non-profiling. So protect it with an appropriate - * #if. - */ -#if !OMPI_PROFILE_LAYER -void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) -{ - int c_ierr; - void *dummy; - OMPI_SINGLE_NAME_DECL(size); - - c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); - if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - - if (MPI_SUCCESS == c_ierr) { - *(void **)buffer = dummy; - OMPI_SINGLE_INT_2_FINT(size); - } -} -#endif // !OMPI_PROFILE_LAYER diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index 87166584c08..bc468bb96d7 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -457,12 +457,6 @@ PN2(void, MPI_Comm_null_delete_fn, mpi_comm_null_delete_fn, MPI_COMM_NULL_DELETE PN2(void, MPI_Comm_null_copy_fn, mpi_comm_null_copy_fn, MPI_COMM_NULL_COPY_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr)); PN2(void, MPI_Comm_dup_fn, mpi_comm_dup_fn, MPI_COMM_DUP_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr)); -/* - * The following is an mpi_f08-module-specific function that does not - * fit in to the normal/templated prototypes, above. - */ -void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr); - END_C_DECLS #endif diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index f5ed4c12d14..f68138513e0 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -103,6 +103,7 @@ mpi_api_files = \ bcast_f08.F90 \ bsend_f08.F90 \ bsend_init_f08.F90 \ + buffer_detach.c \ buffer_attach_f08.F90 \ buffer_detach_f08.F90 \ cancel_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c b/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c new file mode 100644 index 00000000000..45f3d155858 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c @@ -0,0 +1,65 @@ +/* + * 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) 2011-2015 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "mpi.h" +#include "ompi/mpi/fortran/base/fint_2_int.h" + +/* + * This function implemented in this file is only called from Fortran, + * so we never bothered to put a prototype for it in any C header + * file. To avoid compiler warnings about no protoype, we prototype + * it here. + */ +OMPI_DECLSPEC void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, + MPI_Fint *ierr); + +/* (this comment is repeated in ompi/mpi/fortran/mpif-h/buffer_detach_f.c) + * + * MPI-3.1 section 3.6, page 45, states that the mpif.h and mpi module + * interfaces for MPI_BUFFER_DETACH ignore the buffer argument. + * Therefore, for the mpif.h and mpi module interfaces, we use a dummy + * variable and leave the value handed in alone. + * + * The mpi_f08 implementation for MPI_BUFFER_DETACH therefore is a + * separate routine in the use-mpi-f08 directory (it's not built in + * the mpif-h directory because of all the different combinations of + * supporting weak symbols (or not), building the profiling layer (or + * not), etc.). + * + * Note that we only need to build this function once -- the F08 + * interfaces for MPI_BUFFER_ATTACH and PMPI_BUFFER_ATTACH both + * bind(C) to the name ompi_buffer_detach_f08. + */ +void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) +{ + int c_ierr; + void *dummy; + + c_ierr = MPI_Buffer_detach(&dummy, size); + if (NULL != ierr) { + *ierr = OMPI_INT_2_FINT(c_ierr); + } + + if (MPI_SUCCESS == c_ierr) { + *(void **)buffer = dummy; + } +} From 490c182cdf04649c62f6f53fd194a398b40fb931 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Thu, 2 Jul 2015 11:11:15 -0400 Subject: [PATCH 0028/1704] Add the ability to send host buffers through one sized staging buffers and CUDA buffers through different sized buffers. Fixes performance issues (cherry picked from commit open-mpi/ompi@30a872b4787c144e5210a907c47edc942e29c603) --- ompi/mca/pml/ob1/pml_ob1_sendreq.c | 10 +++++++++- opal/mca/btl/base/btl_base_mca.c | 8 ++++++++ opal/mca/btl/btl.h | 3 +++ opal/mca/btl/openib/btl_openib_mca.c | 5 +++++ opal/mca/btl/openib/help-mpi-btl-openib.txt | 6 ++++++ opal/mca/btl/smcuda/btl_smcuda_component.c | 20 ++++++++++++++++++-- 6 files changed, 49 insertions(+), 3 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c index 832a0c50249..116338d6a82 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c @@ -965,9 +965,17 @@ mca_pml_ob1_send_request_schedule_once(mca_pml_ob1_send_request_t* sendreq) /* makes sure that we don't exceed BTL max send size */ if(bml_btl->btl->btl_max_send_size != 0) { +#if OPAL_CUDA_SUPPORT + size_t max_send_size; + if ((sendreq->req_send.req_base.req_convertor.flags & CONVERTOR_CUDA) && (bml_btl->btl->btl_cuda_max_send_size != 0)) { + max_send_size = bml_btl->btl->btl_cuda_max_send_size - sizeof(mca_pml_ob1_frag_hdr_t); + } else { + max_send_size = bml_btl->btl->btl_max_send_size - sizeof(mca_pml_ob1_frag_hdr_t); + } +#else /* OPAL_CUDA_SUPPORT */ size_t max_send_size = bml_btl->btl->btl_max_send_size - sizeof(mca_pml_ob1_frag_hdr_t); - +#endif /* OPAL_CUDA_SUPPORT */ if (size > max_send_size) { size = max_send_size; } diff --git a/opal/mca/btl/base/btl_base_mca.c b/opal/mca/btl/base/btl_base_mca.c index 5c14a32aaf0..df5baacb8a2 100644 --- a/opal/mca/btl/base/btl_base_mca.c +++ b/opal/mca/btl/base/btl_base_mca.c @@ -135,6 +135,14 @@ int mca_btl_base_param_register(mca_base_component_t *version, MCA_BASE_VAR_SCOPE_READONLY, &module->btl_cuda_rdma_limit); #endif /* OPAL_CUDA_GDR_SUPPORT */ +#if OPAL_CUDA_SUPPORT + module->btl_cuda_max_send_size = 0; + (void) mca_base_component_var_register(version, "cuda_max_send_size", "Maximum size (in bytes) of a single GPU \"phase 2\" fragment of a long message when using the pipeline protocol (must be >= 1) (only valid on smcuda btl)", + MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0, + OPAL_INFO_LVL_4, + MCA_BASE_VAR_SCOPE_READONLY, + &module->btl_cuda_max_send_size); +#endif /* OPAL_CUDA_SUPPORT */ (void) mca_base_component_var_register(version, "max_send_size", "Maximum size (in bytes) of a single \"phase 2\" fragment of a long message when using the pipeline protocol (must be >= 1)", MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0, diff --git a/opal/mca/btl/btl.h b/opal/mca/btl/btl.h index b41e54b353e..885a6fc0f44 100644 --- a/opal/mca/btl/btl.h +++ b/opal/mca/btl/btl.h @@ -1170,6 +1170,9 @@ struct mca_btl_base_module_t { size_t btl_cuda_eager_limit; /**< switch from eager to RDMA */ size_t btl_cuda_rdma_limit; /**< switch from RDMA to rndv pipeline */ #endif /* OPAL_CUDA_GDR_SUPPORT */ +#if OPAL_CUDA_SUPPORT + size_t btl_cuda_max_send_size; /**< set if CUDA max send_size is different from host max send size */ +#endif /* OPAL_CUDA_SUPPORT */ }; typedef struct mca_btl_base_module_t mca_btl_base_module_t; diff --git a/opal/mca/btl/openib/btl_openib_mca.c b/opal/mca/btl/openib/btl_openib_mca.c index 790e3a06103..dea9cbde82c 100644 --- a/opal/mca/btl/openib/btl_openib_mca.c +++ b/opal/mca/btl/openib/btl_openib_mca.c @@ -815,6 +815,11 @@ int btl_openib_verify_mca_params (void) } } #endif /* Workaround */ + if (0 != mca_btl_openib_module.super.btl_cuda_max_send_size) { + opal_show_help("help-mpi-btl-openib.txt", "do_not_set_openib_value", + true, opal_process_info.nodename); + mca_btl_openib_module.super.btl_cuda_max_send_size = 0; + } #endif #if BTL_OPENIB_MALLOC_HOOKS_ENABLED diff --git a/opal/mca/btl/openib/help-mpi-btl-openib.txt b/opal/mca/btl/openib/help-mpi-btl-openib.txt index 94dcc7b8f50..7266893b6ea 100644 --- a/opal/mca/btl/openib/help-mpi-btl-openib.txt +++ b/opal/mca/btl/openib/help-mpi-btl-openib.txt @@ -700,3 +700,9 @@ with CUDA GPU Direct RDMA. Either disable GPU Direct RDMA support or enable "leave pinned" support. Deactivating the openib BTL. Local host: %s +# +[do_not_set_openib_value] +Open MPI has detected that you have attempted to set the btl_openib_cuda_max_send_size +value. This is not supported. Setting back to default value of 0. + + Local host: %s diff --git a/opal/mca/btl/smcuda/btl_smcuda_component.c b/opal/mca/btl/smcuda/btl_smcuda_component.c index 38c4418adfb..6ca5e7862cb 100644 --- a/opal/mca/btl/smcuda/btl_smcuda_component.c +++ b/opal/mca/btl/smcuda/btl_smcuda_component.c @@ -175,7 +175,7 @@ static int smcuda_register(void) #endif /* OPAL_CUDA_SUPPORT */ mca_btl_smcuda.super.btl_eager_limit = 4*1024; mca_btl_smcuda.super.btl_rndv_eager_limit = 4*1024; - mca_btl_smcuda.super.btl_max_send_size = 128*1024; + mca_btl_smcuda.super.btl_max_send_size = 32*1024; mca_btl_smcuda.super.btl_rdma_pipeline_send_length = 64*1024; mca_btl_smcuda.super.btl_rdma_pipeline_frag_size = 64*1024; mca_btl_smcuda.super.btl_min_rdma_pipeline_size = 64*1024; @@ -187,7 +187,12 @@ static int smcuda_register(void) /* Call the BTL based to register its MCA params */ mca_btl_base_param_register(&mca_btl_smcuda_component.super.btl_version, &mca_btl_smcuda.super); - +#if OPAL_CUDA_SUPPORT + /* If user has not set the value, then set to the defalt */ + if (0 == mca_btl_smcuda.super.btl_cuda_max_send_size) { + mca_btl_smcuda.super.btl_cuda_max_send_size = 128*1024; + } +#endif /* OPAL_CUDA_SUPPORT */ return mca_btl_smcuda_component_verify(); } @@ -216,6 +221,17 @@ static int mca_btl_smcuda_component_open(void) mca_btl_smcuda_component.max_frag_size = mca_btl_smcuda.super.btl_max_send_size; mca_btl_smcuda_component.eager_limit = mca_btl_smcuda.super.btl_eager_limit; +#if OPAL_CUDA_SUPPORT + /* Possibly adjust max_frag_size if the cuda size is bigger */ + if (mca_btl_smcuda.super.btl_cuda_max_send_size > mca_btl_smcuda.super.btl_max_send_size) { + mca_btl_smcuda_component.max_frag_size = mca_btl_smcuda.super.btl_cuda_max_send_size; + } + opal_output_verbose(10, opal_btl_base_framework.framework_output, + "btl: smcuda: cuda_max_send_size=%d, max_send_size=%d, max_frag_size=%d", + (int)mca_btl_smcuda.super.btl_cuda_max_send_size, (int)mca_btl_smcuda.super.btl_max_send_size, + (int)mca_btl_smcuda_component.max_frag_size); +#endif /* OPAL_CUDA_SUPPORT */ + /* initialize objects */ OBJ_CONSTRUCT(&mca_btl_smcuda_component.sm_lock, opal_mutex_t); OBJ_CONSTRUCT(&mca_btl_smcuda_component.sm_frags_eager, opal_free_list_t); From 7e3059e8b8239cb5fdb3c07fe60709ae0c444861 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 8 Jul 2015 03:55:50 -0700 Subject: [PATCH 0029/1704] mpi_f08: restore C/Fortran compatibility with F08 BUFFER_DETACH The C int/Fint interoperability code was erroneously removed when this function was moved to the use-mpi-f08 directory. (cherry picked from commit open-mpi/ompi@d5e16839e95af2b6e97bc71418b8e807dc60904d) --- ompi/mpi/fortran/use-mpi-f08/buffer_detach.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c b/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c index 45f3d155858..d2bbe2f4d89 100644 --- a/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c +++ b/ompi/mpi/fortran/use-mpi-f08/buffer_detach.c @@ -53,13 +53,15 @@ void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) { int c_ierr; void *dummy; + OMPI_SINGLE_NAME_DECL(size); - c_ierr = MPI_Buffer_detach(&dummy, size); + c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); if (NULL != ierr) { *ierr = OMPI_INT_2_FINT(c_ierr); } if (MPI_SUCCESS == c_ierr) { + OMPI_SINGLE_INT_2_FINT(size); *(void **)buffer = dummy; } } From 6ce9ee715af5e9f9d9e64527cfa92730a9a4cda7 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 30 Jun 2015 12:05:59 -0600 Subject: [PATCH 0030/1704] ompi/java: add MPI_Rget and MPI_Rput java bindings Wrote tests for ompi tests, but will commit later. Signed-off-by: Nathaniel Graham Conflicts: ompi/mpi/java/c/mpi_Win.c ompi/mpi/java/java/Win.java --- ompi/mpi/java/c/mpi_Win.c | 51 +++++++++++++++++++++ ompi/mpi/java/java/Win.java | 89 +++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) diff --git a/ompi/mpi/java/c/mpi_Win.c b/ompi/mpi/java/c/mpi_Win.c index 3b06833414f..bfb60e4868a 100644 --- a/ompi/mpi/java/c/mpi_Win.c +++ b/ompi/mpi/java/c/mpi_Win.c @@ -242,3 +242,54 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_free( ompi_java_exceptionCheck(env, rc); return (jlong)win; } + +JNIEXPORT jlong JNICALL Java_mpi_Win_getInfo( + JNIEnv *env, jobject jthis, jlong handle) +{ + MPI_Win win = (MPI_Win)handle; + MPI_Info info; + int rc = MPI_Win_get_info((MPI_Win)win, &info); + ompi_java_exceptionCheck(env, rc); + return (jlong)info; +} + +JNIEXPORT void JNICALL Java_mpi_Win_setInfo( + JNIEnv *env, jobject jthis, jlong handle, jlong i) +{ + MPI_Win win = (MPI_Win)handle; + MPI_Info info = (MPI_Info)i; + int rc = MPI_Win_set_info(win, info); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT jlong JNICALL Java_mpi_Win_rPut(JNIEnv *env, jobject jthis, + jlong win, jobject origin_addr, jint origin_count, jlong origin_type, + jint target_rank, jint target_disp, jint target_count, jlong target_datatype, + jint basetype) +{ + void *origPtr = ompi_java_getDirectBufferAddress(env, origin_addr); + MPI_Request request; + + int rc = MPI_Rput(origPtr, origin_count, (MPI_Datatype)origin_type, + target_rank, (MPI_Aint)target_disp, target_count, (MPI_Datatype)target_datatype, + (MPI_Win)win, &request); + + ompi_java_exceptionCheck(env, rc); + return (jlong)request; +} + +JNIEXPORT jlong JNICALL Java_mpi_Win_rGet(JNIEnv *env, jobject jthis, jlong win, + jobject origin, jint orgCount, jlong orgType, jint targetRank, jint targetDisp, + jint targetCount, jlong targetType, jint base) +{ + void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); + MPI_Request request; + + int rc = MPI_Rget(orgPtr, orgCount, (MPI_Datatype)orgType, + targetRank, (MPI_Aint)targetDisp, targetCount, + (MPI_Datatype)targetType, (MPI_Win)win, &request); + + ompi_java_exceptionCheck(env, rc); + return (jlong)request; +} + diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index 9d3678236c6..0f15183e905 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -405,4 +405,93 @@ public void deleteAttr(int keyval) throws MPIException private native long free(long win) throws MPIException; +/** + * Java binding of the MPI operation {@code MPI_WIN_GET_INFO}. + * @throws MPIException + */ +public Info getInfo() throws MPIException +{ + MPI.check(); + return new Info(getInfo(handle)); +} + +private native long getInfo(long win) + throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_SET_INFO}. + * @param info the new info + * @throws MPIException + */ +public void setInfo(Info info) throws MPIException +{ + MPI.check(); + setInfo(handle, info.handle); +} + +private native void setInfo(long win, long info) + throws MPIException; + +/** + *

Java binding of the MPI operation {@code MPI_RPUT}. + * @param origin_addr initial address of origin buffer + * @param origin_count number of entries in origin buffer + * @param origin_datatype datatype of each entry in origin buffer + * @param target_rank rank of target + * @param target_disp displacement from start of window to target buffer + * @param target_count number of entries in target buffer + * @param target_datatype datatype of each entry in target buffer + * @return RMA request + * @throws MPIException + */ +public final Request rPut(Buffer origin_addr, int origin_count, + Datatype origin_datatype, int target_rank, int target_disp, + int target_count, Datatype target_datatype) + throws MPIException +{ + if(!origin_addr.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rPut(handle, origin_addr, origin_count, + origin_datatype.handle, target_rank, target_disp, + target_count, target_datatype.handle, getBaseType(origin_datatype, target_datatype))); +} + +private native long rPut(long win, Buffer origin_addr, int origin_count, + long origin_datatype, int target_rank, int target_disp, + int target_count, long target_datatype, int baseType) + throws MPIException; + +/** + * Java binding of {@code MPI_RGET}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @return RMA request + * @throws MPIException + */ +public final Request rGet(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType) + throws MPIException +{ + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rGet(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + getBaseType(orgType, targetType))); +} + +private native long rGet( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + int baseType) throws MPIException; + } // Win From f63be3b102a91c2abc83b2a25bf4e51826b42106 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 9 Jul 2015 13:37:49 +0900 Subject: [PATCH 0031/1704] configury: fix a typo in XRC support detection Thanks to Ben Menadue for the report (cherry picked from commit open-mpi/ompi@8eede3c7f13e4932be3c0133a41077cd16d2e30e) --- config/opal_check_openfabrics.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/opal_check_openfabrics.m4 b/config/opal_check_openfabrics.m4 index 9a2b4cfcc2b..713da266b64 100644 --- a/config/opal_check_openfabrics.m4 +++ b/config/opal_check_openfabrics.m4 @@ -155,7 +155,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp ibv_cmd_open_xrcd], [], [$1_have_xrc=0]) AC_CHECK_DECLS([IBV_SRQT_XRC], - [], [$1_have_xrc=0]) + [], [$1_have_xrc=0], [#include ]) fi if test "$enable_connectx_xrc" = "yes" \ From 536ef17fe0b5f61c2cc3c7c4ec955058090f5065 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Wed, 8 Jul 2015 17:11:25 -0400 Subject: [PATCH 0032/1704] Force smcuda BTL to use CUDA IPC path for all GPU buffers where possible (cherry picked from commit open-mpi/ompi@cdffa4724d8e2e84a0bbbe2427d267a544d01bdc) --- opal/mca/btl/smcuda/btl_smcuda.c | 7 +++++++ opal/mca/btl/smcuda/btl_smcuda_component.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/opal/mca/btl/smcuda/btl_smcuda.c b/opal/mca/btl/smcuda/btl_smcuda.c index c4930ab8097..1952ffd5572 100644 --- a/opal/mca/btl/smcuda/btl_smcuda.c +++ b/opal/mca/btl/smcuda/btl_smcuda.c @@ -885,6 +885,13 @@ int mca_btl_smcuda_sendi( struct mca_btl_base_module_t* btl, if (mca_common_cuda_enabled && (IPC_INIT == endpoint->ipcstate) && mca_btl_smcuda_component.use_cuda_ipc) { mca_btl_smcuda_send_cuda_ipc_request(btl, endpoint); } + /* We do not want to use this path when we have CUDA IPC support */ + if ((convertor->flags & CONVERTOR_CUDA) && (IPC_ACKED == endpoint->ipcstate)) { + if (NULL != descriptor) { + *descriptor = mca_btl_smcuda_alloc(btl, endpoint, order, payload_size+header_size, flags); + } + return OPAL_ERR_RESOURCE_BUSY; + } #endif /* OPAL_CUDA_SUPPORT */ /* this check should be unnecessary... turn into an assertion? */ diff --git a/opal/mca/btl/smcuda/btl_smcuda_component.c b/opal/mca/btl/smcuda/btl_smcuda_component.c index 6ca5e7862cb..01066694fe9 100644 --- a/opal/mca/btl/smcuda/btl_smcuda_component.c +++ b/opal/mca/btl/smcuda/btl_smcuda_component.c @@ -192,6 +192,11 @@ static int smcuda_register(void) if (0 == mca_btl_smcuda.super.btl_cuda_max_send_size) { mca_btl_smcuda.super.btl_cuda_max_send_size = 128*1024; } + /* If user has not set the value, then set to magic number which will be converted to the minimum + * size needed to fit the PML header (see pml_ob1.c) */ + if (0 == mca_btl_smcuda.super.btl_cuda_eager_limit) { + mca_btl_smcuda.super.btl_cuda_eager_limit = SIZE_MAX; /* magic number */ + } #endif /* OPAL_CUDA_SUPPORT */ return mca_btl_smcuda_component_verify(); } From 37c698ee55451418a456985cca665362a0b1c036 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Thu, 9 Jul 2015 12:51:55 -0400 Subject: [PATCH 0033/1704] Make explicit call to initalize MCA parameters in common CUDA code. This allows us to view them with ompi_info and possibly modify with tools interface (cherry picked from commit open-mpi/ompi@ae0f3cfee71330aff25e8830aa096241d9047623) Conflicts: opal/mca/common/cuda/common_cuda.c --- opal/mca/btl/openib/btl_openib_component.c | 6 +- opal/mca/btl/smcuda/btl_smcuda_component.c | 1 + opal/mca/common/cuda/common_cuda.c | 76 ++++++++++++---------- opal/mca/common/cuda/common_cuda.h | 2 +- 4 files changed, 50 insertions(+), 35 deletions(-) diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 56beb0b9c4b..f820dff7189 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -16,7 +16,7 @@ * reserved. * Copyright (c) 2006-2007 Voltaire All rights reserved. * Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2011-2015 NVIDIA Corporation. All rights reserved. * Copyright (c) 2012 Oak Ridge National Laboratory. All rights reserved * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * Copyright (c) 2014-2015 Research Organization for Information Science @@ -200,6 +200,10 @@ static int btl_openib_component_register(void) return OPAL_ERR_NOT_AVAILABLE; } +#if OPAL_CUDA_SUPPORT + mca_common_cuda_register_mca_variables(); +#endif + return OPAL_SUCCESS; } diff --git a/opal/mca/btl/smcuda/btl_smcuda_component.c b/opal/mca/btl/smcuda/btl_smcuda_component.c index 01066694fe9..2936df3d189 100644 --- a/opal/mca/btl/smcuda/btl_smcuda_component.c +++ b/opal/mca/btl/smcuda/btl_smcuda_component.c @@ -197,6 +197,7 @@ static int smcuda_register(void) if (0 == mca_btl_smcuda.super.btl_cuda_eager_limit) { mca_btl_smcuda.super.btl_cuda_eager_limit = SIZE_MAX; /* magic number */ } + mca_common_cuda_register_mca_variables(); #endif /* OPAL_CUDA_SUPPORT */ return mca_btl_smcuda_component_verify(); } diff --git a/opal/mca/common/cuda/common_cuda.c b/opal/mca/common/cuda/common_cuda.c index 966d9bdf0b8..6a92378dbb7 100644 --- a/opal/mca/common/cuda/common_cuda.c +++ b/opal/mca/common/cuda/common_cuda.c @@ -115,6 +115,7 @@ cudaFunctionTable_t cuFunc; static int stage_one_init_ref_count = 0; static bool stage_three_init_complete = false; static bool common_cuda_initialized = false; +static bool common_cuda_mca_parames_registered = false; static int mca_common_cuda_verbose; static int mca_common_cuda_output = 0; bool mca_common_cuda_enabled = false; @@ -223,42 +224,14 @@ static void cuda_dump_memhandle(int, void *, char *) __opal_attribute_unused__ ; #endif /* OPAL_CUDA_SUPPORT_41 */ - -/** - * This is the first stage of initialization. This function is - * called explicitly by any BTLs that can support CUDA-aware. - * It is called during the component open phase of initialization. - * This function will register some mca variables and then open - * and load the symbols needed from the CUDA driver library. Look for - * the SONAME of the library which is libcuda.so.1. In most cases, - * this will result in the library found. However, there are some - * setups that require the extra steps for searching. Any failure - * will result in this initialization failing and status will be set - * showing that. - */ -int mca_common_cuda_stage_one_init(void) +/* This is a seperate function so we can see these variables with ompi_info and + * also set them with the tools interface */ +void mca_common_cuda_register_mca_variables(void) { - int retval, i, j; - char *cudalibs[] = {"libcuda.so.1", "libcuda.dylib", NULL}; - char *searchpaths[] = {"", "/usr/lib64", NULL}; - char **errmsgs = NULL; - char *errmsg = NULL; - int errsize; - bool stage_one_init_passed = false; - stage_one_init_ref_count++; - if (stage_one_init_ref_count > 1) { - opal_output_verbose(10, mca_common_cuda_output, - "CUDA: stage_one_init_ref_count is now %d, no need to init", - stage_one_init_ref_count); - return OPAL_SUCCESS; + if (false == common_cuda_mca_parames_registered) { + common_cuda_mca_parames_registered = true; } - - OBJ_CONSTRUCT(&common_cuda_init_lock, opal_mutex_t); - OBJ_CONSTRUCT(&common_cuda_htod_lock, opal_mutex_t); - OBJ_CONSTRUCT(&common_cuda_dtoh_lock, opal_mutex_t); - OBJ_CONSTRUCT(&common_cuda_ipc_lock, opal_mutex_t); - /* Set different levels of verbosity in the cuda related code. */ mca_common_cuda_verbose = 0; (void) mca_base_var_register("ompi", "mpi", "common_cuda", "verbose", @@ -327,6 +300,43 @@ int mca_common_cuda_stage_one_init(void) MCA_BASE_VAR_SCOPE_READONLY, &mca_common_cuda_cumemcpy_timing); #endif /* OPAL_ENABLE_DEBUG */ +} + +/** + * This is the first stage of initialization. This function is called + * explicitly by any BTLs that can support CUDA-aware. It is called during + * the component open phase of initialization. This fuction will look for + * the SONAME of the library which is libcuda.so.1. In most cases, this will + * result in the library found. However, there are some setups that require + * the extra steps for searching. This function will then load the symbols + * needed from the CUDA driver library. Any failure will result in this + * initialization failing and status will be set showing that. + */ +int mca_common_cuda_stage_one_init(void) +{ + int retval, i, j; + char *cudalibs[] = {"libcuda.so.1", "libcuda.dylib", NULL}; + char *searchpaths[] = {"", "/usr/lib64", NULL}; + char **errmsgs = NULL; + char *errmsg = NULL; + int errsize; + bool stage_one_init_passed = false; + + stage_one_init_ref_count++; + if (stage_one_init_ref_count > 1) { + opal_output_verbose(10, mca_common_cuda_output, + "CUDA: stage_one_init_ref_count is now %d, no need to init", + stage_one_init_ref_count); + return OPAL_SUCCESS; + } + + /* This is a no-op in most cases as the parameters were registered earlier */ + mca_common_cuda_register_mca_variables(); + + OBJ_CONSTRUCT(&common_cuda_init_lock, opal_mutex_t); + OBJ_CONSTRUCT(&common_cuda_htod_lock, opal_mutex_t); + OBJ_CONSTRUCT(&common_cuda_dtoh_lock, opal_mutex_t); + OBJ_CONSTRUCT(&common_cuda_ipc_lock, opal_mutex_t); mca_common_cuda_output = opal_output_open(NULL); opal_output_set_verbosity(mca_common_cuda_output, mca_common_cuda_verbose); diff --git a/opal/mca/common/cuda/common_cuda.h b/opal/mca/common/cuda/common_cuda.h index 7da817de512..c0cd59c359b 100644 --- a/opal/mca/common/cuda/common_cuda.h +++ b/opal/mca/common/cuda/common_cuda.h @@ -44,7 +44,7 @@ struct mca_mpool_common_cuda_reg_t { typedef struct mca_mpool_common_cuda_reg_t mca_mpool_common_cuda_reg_t; extern bool mca_common_cuda_enabled; -OPAL_DECLSPEC int mca_common_cuda_register_mca_variables(void); +OPAL_DECLSPEC void mca_common_cuda_register_mca_variables(void); OPAL_DECLSPEC void mca_common_cuda_register(void *ptr, size_t amount, char *msg); From ffd8dd4ff5e71ac16fd9dab304c494d8aea45edf Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Fri, 10 Jul 2015 11:23:22 -0400 Subject: [PATCH 0034/1704] One word change from none to all - new default (cherry picked from commit open-mpi/ompi@f1fff56d743827b4fe2f1699fed8f52853dcc7e3) --- config/ompi_ext.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ompi_ext.m4 b/config/ompi_ext.m4 index 17029a25638..85b2880c964 100644 --- a/config/ompi_ext.m4 +++ b/config/ompi_ext.m4 @@ -38,7 +38,7 @@ AC_DEFUN([OMPI_EXT],[ # AC_ARG_ENABLE(mpi-ext, AC_HELP_STRING([--enable-mpi-ext[=LIST]], - [Comma-separated list of extensions that should be built. Possible values: ompi_mpiext_list. Example: "--enable-mpi-ext=foo,bar" will enable building the MPI extensions "foo" and "bar". If LIST is empty or the special value "all", then all available MPI extensions will be built (default: none).])) + [Comma-separated list of extensions that should be built. Possible values: ompi_mpiext_list. Example: "--enable-mpi-ext=foo,bar" will enable building the MPI extensions "foo" and "bar". If LIST is empty or the special value "all", then all available MPI extensions will be built (default: all).])) # print some nice messages about what we're about to do... AC_MSG_CHECKING([for available MPI Extensions]) From 5b659528eacce08a402c95bd037cff04e9bb9de8 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 7 Jul 2015 16:04:17 -0600 Subject: [PATCH 0035/1704] Additional Java Bindings Java bindings for the following functions: MPI_RACCUMULATE, MPI_GET_ACCUMULATE, MPI_RGET_ACCUMULATE, MPI_WIN_LOCK_ALL, MPI_WIN_UNLOCK_ALL, MPI_WIN_SYNC, MPI_WIN_FLUSH, MPI_WIN_FLUSH_ALL, MPI_COMPARE_AND_SWAP, and MPI_FETCH_AND_OP. Also includes Java bindings for the Operations MPI_REPLACE and MPI_NO_OP. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Op.c | 2 +- ompi/mpi/java/c/mpi_Win.c | 103 ++++++++++++++++ ompi/mpi/java/java/MPI.java | 4 +- ompi/mpi/java/java/Win.java | 231 ++++++++++++++++++++++++++++++++++++ 4 files changed, 338 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/java/c/mpi_Op.c b/ompi/mpi/java/c/mpi_Op.c index 5016860d870..0d5acfbbac6 100644 --- a/ompi/mpi/java/c/mpi_Op.c +++ b/ompi/mpi/java/c/mpi_Op.c @@ -69,7 +69,7 @@ JNIEXPORT void JNICALL Java_mpi_Op_getOp(JNIEnv *env, jobject jthis, jint type) static MPI_Op Ops[] = { MPI_OP_NULL, MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND, MPI_BAND, MPI_LOR, MPI_BOR, MPI_LXOR, - MPI_BXOR, MPI_MINLOC, MPI_MAXLOC + MPI_BXOR, MPI_MINLOC, MPI_MAXLOC, MPI_REPLACE, MPI_NO_OP }; (*env)->SetLongField(env,jthis, ompi_java.OpHandle, (jlong)Ops[type]); } diff --git a/ompi/mpi/java/c/mpi_Win.c b/ompi/mpi/java/c/mpi_Win.c index bfb60e4868a..c1492af51b7 100644 --- a/ompi/mpi/java/c/mpi_Win.c +++ b/ompi/mpi/java/c/mpi_Win.c @@ -293,3 +293,106 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_rGet(JNIEnv *env, jobject jthis, jlong win, return (jlong)request; } +JNIEXPORT jlong JNICALL Java_mpi_Win_rAccumulate(JNIEnv *env, jobject jthis, jlong win, + jobject origin, jint orgCount, jlong orgType, jint targetRank, jint targetDisp, + jint targetCount, jlong targetType, jobject jOp, jlong hOp, jint baseType) +{ + void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); + MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); + MPI_Request request; + + int rc = MPI_Raccumulate(orgPtr, orgCount, (MPI_Datatype)orgType, + targetRank, (MPI_Aint)targetDisp, targetCount, + (MPI_Datatype)targetType, op, (MPI_Win)win, &request); + + ompi_java_exceptionCheck(env, rc); + return (jlong)request; +} + +JNIEXPORT void JNICALL Java_mpi_Win_getAccumulate(JNIEnv *env, jobject jthis, jlong win, + jobject origin, jint orgCount, jlong orgType, jobject resultBuff, jint resultCount, + jlong resultType, jint targetRank, jint targetDisp, jint targetCount, jlong targetType, + jobject jOp, jlong hOp, jint baseType) +{ + void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); + void *resultPtr = (*env)->GetDirectBufferAddress(env, resultBuff); + MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); + + int rc = MPI_Get_accumulate(orgPtr, orgCount, (MPI_Datatype)orgType, + resultPtr, resultCount, (MPI_Datatype)resultType, + targetRank, (MPI_Aint)targetDisp, targetCount, + (MPI_Datatype)targetType, op, (MPI_Win)win); + + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT jlong JNICALL Java_mpi_Win_rGetAccumulate(JNIEnv *env, jobject jthis, jlong win, + jobject origin, jint orgCount, jlong orgType, jobject resultBuff, jint resultCount, + jlong resultType, jint targetRank, jint targetDisp, jint targetCount, jlong targetType, + jobject jOp, jlong hOp, jint baseType) +{ + void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); + void *resultPtr = (*env)->GetDirectBufferAddress(env, resultBuff); + MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); + MPI_Request request; + + int rc = MPI_Rget_accumulate(orgPtr, orgCount, (MPI_Datatype)orgType, + resultPtr, resultCount, (MPI_Datatype)resultType, + targetRank, (MPI_Aint)targetDisp, targetCount, + (MPI_Datatype)targetType, op, (MPI_Win)win, &request); + + ompi_java_exceptionCheck(env, rc); + return (jlong)request; +} + +JNIEXPORT void JNICALL Java_mpi_Win_lockAll(JNIEnv *env, jobject jthis, jlong win, jint assertion) +{ + int rc = MPI_Win_lock_all(assertion, (MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_unlockAll(JNIEnv *env, jobject jthis, jlong win) +{ + int rc = MPI_Win_unlock_all((MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_sync(JNIEnv *env, jobject jthis, jlong win) +{ + int rc = MPI_Win_sync((MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_flush(JNIEnv *env, jobject jthis, jlong win, jint targetRank) +{ + int rc = MPI_Win_flush(targetRank, (MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_flushAll(JNIEnv *env, jobject jthis, jlong win) +{ + int rc = MPI_Win_flush_all((MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_compareAndSwap (JNIEnv *env, jobject jthis, jlong win, jobject origin, + jobject compareAddr, jobject resultAddr, jlong dataType, jint targetRank, jint targetDisp) +{ + void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); + void *compPtr = (*env)->GetDirectBufferAddress(env, compareAddr); + void *resultPtr = (*env)->GetDirectBufferAddress(env, resultAddr); + + int rc = MPI_Compare_and_swap(orgPtr, compPtr, resultPtr, dataType, targetRank, targetDisp, (MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_fetchAndOp(JNIEnv *env, jobject jthis, jlong win, jobject origin, + jobject resultAddr, jlong dataType, jint targetRank, jint targetDisp, jobject jOp, jlong hOp, jint baseType) +{ + void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); + void *resultPtr = (*env)->GetDirectBufferAddress(env, resultAddr); + MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); + + int rc = MPI_Fetch_and_op(orgPtr, resultPtr, dataType, targetRank, targetDisp, op, (MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index 16af6a22c8c..7f59dd52b29 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -68,7 +68,7 @@ public final class MPI public static final int ANY_SOURCE, ANY_TAG; public static final Op MAX, MIN, SUM, PROD, LAND, BAND, - LOR, BOR, LXOR, BXOR; + LOR, BOR, LXOR, BXOR, REPLACE, NO_OP; /** * Global minimum operator. @@ -241,6 +241,8 @@ public final class MPI BXOR = new Op(10); MINLOC = new Op(11); MAXLOC = new Op(12); + REPLACE = new Op(13); + NO_OP = new Op(14); GROUP_EMPTY = new Group(Group.getEmpty()); REQUEST_NULL = new Request(Request.getNull()); diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index 0f15183e905..fb777ef8ddd 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -494,4 +494,235 @@ private native long rGet( int targetRank, int targetDisp, int targetCount, long targetType, int baseType) throws MPIException; +/** + * Java binding of {@code MPI_RACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @return RMA request + * @throws MPIException + */ +public Request rAccumulate(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException +{ + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rAccumulate(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType))); +} + +private native long rAccumulate( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + +/** + * Java binding of {@code MPI_GET_ACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param resultAddr result buffer + * @param resultCount number of entries in result buffer + * @param resultType datatype of each entry in result buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @throws MPIException + */ + +public void getAccumulate(Buffer origin, int orgCount, Datatype orgType, + Buffer resultAddr, int resultCount, Datatype resultType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException +{ + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + getAccumulate(handle, origin, orgCount, orgType.handle, + resultAddr, resultCount, resultType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType)); +} + +private native void getAccumulate( + long win, Buffer origin, int orgCount, long orgType, + Buffer resultAddr, int resultCount, long resultType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + +/** + * Java binding of {@code MPI_RGET_ACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param resultAddr result buffer + * @param resultCount number of entries in result buffer + * @param resultType datatype of each entry in result buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @return RMA request + * @throws MPIException + */ + +public Request rGetAccumulate(Buffer origin, int orgCount, Datatype orgType, + Buffer resultAddr, int resultCount, Datatype resultType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException +{ + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rGetAccumulate(handle, origin, orgCount, orgType.handle, + resultAddr, resultCount, resultType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType))); +} + +private native long rGetAccumulate( + long win, Buffer origin, int orgCount, long orgType, + Buffer resultAddr, int resultCount, long resultType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_LOCK_ALL}. + * @param assertion program assertion + * @throws MPIException + */ +public void lockAll(int assertion) throws MPIException +{ + MPI.check(); + lockAll(handle, assertion); +} + +private native void lockAll(long win, int assertion) + throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_UNLOCK_ALL}. + * @throws MPIException + */ +public void unlockAll() throws MPIException +{ + MPI.check(); + unlockAll(handle); +} + +private native void unlockAll(long win) throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_SYNC}. + * @throws MPIException + */ +public void sync() throws MPIException +{ + MPI.check(); + sync(handle); +} + +private native void sync(long win) throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH}. + * @param targetRank rank of target window + * @throws MPIException + */ +public void flush(int targetRank) throws MPIException +{ + MPI.check(); + flush(handle, targetRank); +} + +private native void flush(long win, int targetRank) throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH_ALL}. + * @throws MPIException + */ +public void flushAll() throws MPIException +{ + MPI.check(); + flushAll(handle); +} + +private native void flushAll(long win) throws MPIException; + +/** + * Java binding of {@code MPI_COMPARE_AND_SWAP}. + * @param origin origin buffer + * @param compareAddr compare buffer + * @param resultAddr result buffer + * @param targetType datatype of each entry in target buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @throws MPIException + */ + +public void compareAndSwap(Buffer origin, Buffer compareAddr, Buffer resultAddr, + Datatype targetType, int targetRank, int targetDisp) + throws MPIException +{ + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + compareAndSwap(handle, origin, compareAddr, resultAddr, + targetType.handle, targetRank, targetDisp); +} + +private native void compareAndSwap( + long win, Buffer origin, Buffer compareAddr, Buffer resultAddr, + long targetType, int targetRank, int targetDisp) throws MPIException; + +/** + * Java binding of {@code MPI_FETCH_AND_OP}. + * @param origin origin buffer + * @param resultAddr result buffer + * @param dataType datatype of entry in origin, result, and target buffers + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param op reduce operation + * @throws MPIException + */ + +public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, + int targetRank, int targetDisp, Op op) + throws MPIException +{ + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + fetchAndOp(handle, origin, resultAddr, dataType.handle, targetRank, + targetDisp, op, op.handle, getBaseType(dataType, dataType)); //neccessary? +} + +private native void fetchAndOp( + long win, Buffer origin, Buffer resultAddr, long targetType, int targetRank, + int targetDisp, Op jOp, long hOp, int baseType) throws MPIException; + } // Win From f6bee49cd5cdb9f58ab09fef991b066abd354686 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 7 Jul 2015 16:14:21 -0600 Subject: [PATCH 0036/1704] Copyright additions Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Op.c | 2 ++ ompi/mpi/java/java/MPI.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ompi/mpi/java/c/mpi_Op.c b/ompi/mpi/java/c/mpi_Op.c index 0d5acfbbac6..0aac510f76d 100644 --- a/ompi/mpi/java/c/mpi_Op.c +++ b/ompi/mpi/java/c/mpi_Op.c @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index 7f59dd52b29..b0440569d83 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow From 7b5be1ac9ee19fb87f06bbb4d610de86d704cd6c Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Fri, 10 Jul 2015 16:16:24 -0400 Subject: [PATCH 0037/1704] Bring cuda mpiext over to 2.x. They are ready. --- ompi/mpiext/cuda/Makefile.am | 24 ++++++++++ ompi/mpiext/cuda/README.txt | 11 +++++ .../mpiext/cuda/c/MPIX_Query_cuda_support.3in | 34 +++++++++++++ ompi/mpiext/cuda/c/Makefile.am | 48 +++++++++++++++++++ ompi/mpiext/cuda/c/mpiext_cuda.c | 31 ++++++++++++ ompi/mpiext/cuda/c/mpiext_cuda_c.h | 16 +++++++ ompi/mpiext/cuda/configure.m4 | 42 ++++++++++++++++ 7 files changed, 206 insertions(+) create mode 100644 ompi/mpiext/cuda/Makefile.am create mode 100644 ompi/mpiext/cuda/README.txt create mode 100644 ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3in create mode 100644 ompi/mpiext/cuda/c/Makefile.am create mode 100644 ompi/mpiext/cuda/c/mpiext_cuda.c create mode 100644 ompi/mpiext/cuda/c/mpiext_cuda_c.h create mode 100644 ompi/mpiext/cuda/configure.m4 diff --git a/ompi/mpiext/cuda/Makefile.am b/ompi/mpiext/cuda/Makefile.am new file mode 100644 index 00000000000..3d8db46ce94 --- /dev/null +++ b/ompi/mpiext/cuda/Makefile.am @@ -0,0 +1,24 @@ +# +# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 NVIDIA, Inc. All rights reserved +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# This Makefile is not traversed during a normal "make all" in an OMPI +# build. It *is* traversed during "make dist", however. So you can +# put EXTRA_DIST targets in here. +# +# You can also use this as a convenience for building this MPI +# extension (i.e., "make all" in this directory to invoke "make all" +# in all the subdirectories). + +SUBDIRS = c + +EXTRA_DIST = README.txt diff --git a/ompi/mpiext/cuda/README.txt b/ompi/mpiext/cuda/README.txt new file mode 100644 index 00000000000..9042305369c --- /dev/null +++ b/ompi/mpiext/cuda/README.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2015 NVIDIA, Inc. All rights reserved. + +$COPYRIGHT$ + +Rolf vandeVaart + + +This extension provides a macro for compile time check of CUDA aware support. +It also provides a function for runtime check of CUDA aware support. + +See MPIX_Query_cuda_support(3) for more details. diff --git a/ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3in b/ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3in new file mode 100644 index 00000000000..676ec570bc9 --- /dev/null +++ b/ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3in @@ -0,0 +1,34 @@ +.\" Copyright 2007-2010 Oracle and/or its affiliates. All rights reserved. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright (c) 2015 NVIDIA, Inc. All rights reserved. +.TH MPIx_CUDA_SUPPORT 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPIX_Query_cuda_support\fP \- Returns 1 if there is CUDA aware support and 0 if there is not. + +.SH SYNTAX +.ft R +.SH C Syntax +.nf +#include +#include + +int MPIX_Query_cuda_support(void) +.fi +.SH Fortran Syntax +There is no Fortran binding for this function. +. +.SH C++ Syntax +There is no C++ binding for this function. +. +.SH DESCRIPTION +.ft R + +.SH Examples +.ft R + +.SH See Also +.ft R +.nf + +.fi diff --git a/ompi/mpiext/cuda/c/Makefile.am b/ompi/mpiext/cuda/c/Makefile.am new file mode 100644 index 00000000000..41f0ab5fd52 --- /dev/null +++ b/ompi/mpiext/cuda/c/Makefile.am @@ -0,0 +1,48 @@ +# +# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 NVIDIA, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# This file builds the C bindings for MPI extensions. It must be +# present in all MPI extensions. + +# We must set these #defines so that the inner OMPI MPI prototype +# header files do the Right Thing. +AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1 + +include $(top_srcdir)/Makefile.ompi-rules + +# Convenience libtool library that will be slurped up into libmpi.la. +noinst_LTLIBRARIES = libmpiext_cuda_c.la + +# This is where the top-level header file (that is included in +# ) must be installed. +ompidir = $(ompiincludedir)/ompi/mpiext/cuda/c + +# This is the header file that is installed. +ompi_HEADERS = mpiext_cuda_c.h + +# Sources for the convenience libtool library. Other than the one +# header file, all source files in the extension have no file naming +# conventions. +libmpiext_cuda_c_la_SOURCES = \ + $(ompi_HEADERS) \ + mpiext_cuda.c +libmpiext_cuda_c_la_LDFLAGS = -module -avoid-version + +# Man page installation +nodist_man_MANS = MPIX_Query_cuda_support.3 + +# Man page sources +EXTRA_DIST = $(nodist_man_MANS:.3=.3in) + +distclean-local: + rm -f $(nodist_man_MANS) diff --git a/ompi/mpiext/cuda/c/mpiext_cuda.c b/ompi/mpiext/cuda/c/mpiext_cuda.c new file mode 100644 index 00000000000..4510e5fc518 --- /dev/null +++ b/ompi/mpiext/cuda/c/mpiext_cuda.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2015 NVIDIA, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + */ + +#include "ompi_config.h" + +#include +#include + +#include "opal/constants.h" +#include "ompi/mpiext/cuda/c/mpiext_cuda_c.h" + +/* The fact that this code is configured and compiled means that we have CUDA aware + support. We may expand on this API to return more features in the future. */ +int MPIX_Query_cuda_support(void) +{ + return OPAL_SUCCESS; +} diff --git a/ompi/mpiext/cuda/c/mpiext_cuda_c.h b/ompi/mpiext/cuda/c/mpiext_cuda_c.h new file mode 100644 index 00000000000..00fd6216f85 --- /dev/null +++ b/ompi/mpiext/cuda/c/mpiext_cuda_c.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2004-2009 The Trustees of Indiana University. + * All rights reserved. + * Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015 NVIDIA, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + */ + +#define MPIX_CUDA_AWARE_SUPPORT 1 +OMPI_DECLSPEC int MPIX_Query_cuda_support(void); diff --git a/ompi/mpiext/cuda/configure.m4 b/ompi/mpiext/cuda/configure.m4 new file mode 100644 index 00000000000..a0d9e8d2369 --- /dev/null +++ b/ompi/mpiext/cuda/configure.m4 @@ -0,0 +1,42 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2010 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Intel, Inc. All rights reserved. +# Copyright (c) 2015 NVIDIA, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# OMPI_MPIEXT_cuda_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[ + AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile]) + AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile]) + + OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cuda_happy]) + + # If we don't want CUDA, don't compile this extention + AS_IF([test "$ENABLE_cuda" = "1" || \ + test "$ENABLE_EXT_ALL" = "1"], + [ompi_mpi_ext_cuda_happy=1], + [ompi_mpi_ext_cuda_happy=0]) + + AS_IF([test "$ompi_mpi_ext_cuda_happy" = "1" && \ + test "$CUDA_SUPPORT" = "1"], + [$1], + [ # Error if the user specifically asked for this extension, + # but we can't build it. + AS_IF([test "$ENABLE_cuda" = "1"], + [AC_MSG_WARN([Requested "cuda" MPI extension, but cannot build it]) + AC_MSG_WARN([because cuda support is not enabled.]) + AC_MSG_WARN([Try again with --with-cuda]) + AC_MSG_ERROR([Cannot continue])]) + $2]) + + OPAL_VAR_SCOPE_POP +]) From e191689338d9a9293e0f8f74669624a1cc1ef3ba Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 10 Jul 2015 20:15:43 -0700 Subject: [PATCH 0038/1704] MPI_Scatter.3in: fix typo Thanks to Akshay Venkatesh for noticing the mistake. (cherry-picked from open-mpi/ompi@efc4c93d7aeffd2bae3d9b860dfcacf2c7eff406) --- ompi/mpi/man/man3/MPI_Scatter.3in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mpi/man/man3/MPI_Scatter.3in b/ompi/mpi/man/man3/MPI_Scatter.3in index 48563b622f5..ef59d4ebfef 100644 --- a/ompi/mpi/man/man3/MPI_Scatter.3in +++ b/ompi/mpi/man/man3/MPI_Scatter.3in @@ -144,7 +144,7 @@ sets of 100 ints from the root to each process in the group. .fi .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform a gather operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIrecvbuf\fR. In this case, \fIrecvcount\fR and \fIrecvtype\fR are ignored, and the root process sends no data to itself. +When the communicator is an intracommunicator, you can perform a scatter operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIrecvbuf\fR. In this case, \fIrecvcount\fR and \fIrecvtype\fR are ignored, and the root process sends no data to itself. .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp From 5298108915db0fcaceae479f1acc041c2db1aceb Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 10 Jul 2015 10:21:46 +0900 Subject: [PATCH 0039/1704] configury: fix XRC detection on OFED < 3.12 Thanks Paul Hargrove for the report (cherry picked from commit open-mpi/ompi@9a49d42f81e3ec2b63aa4e7805d4c5e44a90abab) --- config/opal_check_openfabrics.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/opal_check_openfabrics.m4 b/config/opal_check_openfabrics.m4 index 713da266b64..ed4fadb90ff 100644 --- a/config/opal_check_openfabrics.m4 +++ b/config/opal_check_openfabrics.m4 @@ -152,7 +152,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ # ibv_cmd_open_xrcd (aka XRC Domains) was added in OFED 3.12 if test "$enable_connectx_xrc" = "yes"; then $1_have_xrc=1 - AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp ibv_cmd_open_xrcd], + AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], [], [$1_have_xrc=0]) AC_CHECK_DECLS([IBV_SRQT_XRC], [], [$1_have_xrc=0], From 92cc5cd9e7fd091854a38f9887c9b574688a77ea Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 13 Jul 2015 09:56:51 +0900 Subject: [PATCH 0040/1704] configury: fix XRC detection on OFED < 3.12 since ibv_create_xrc_rcv_qp is now deprecated, and in order to be "future-proof", we have to consider the case in which only XRC Domains are supported. also, correctly handle distro that ship broken ibverbs devel headers Thanks Paul Hargrove for the detailled report. (cherry picked from commit open-mpi/ompi@f7cf7d50708e997be77ee320661790af7fe34f97) --- config/opal_check_openfabrics.m4 | 35 ++++++++++++++++++++----- opal/mca/btl/openib/btl_openib.h | 4 +-- opal/mca/btl/openib/btl_openib_async.c | 11 +++----- opal/mca/btl/openib/btl_openib_async.h | 2 +- opal/mca/btl/openib/btl_openib_atomic.c | 7 ++++- opal/mca/btl/openib/btl_openib_put.c | 7 +++-- 6 files changed, 46 insertions(+), 20 deletions(-) diff --git a/config/opal_check_openfabrics.m4 b/config/opal_check_openfabrics.m4 index ed4fadb90ff..692a9500e8f 100644 --- a/config/opal_check_openfabrics.m4 +++ b/config/opal_check_openfabrics.m4 @@ -148,21 +148,42 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ AC_CHECK_MEMBERS([struct ibv_device.transport_type], [], [], [#include ]) + # We have to check functions both exits *and* are declared + # since some distro ship broken ibverbs devel headers + # IBV_DEVICE_XRC is common to all OFED versions # ibv_create_xrc_rcv_qp was added in OFED 1.3 # ibv_cmd_open_xrcd (aka XRC Domains) was added in OFED 3.12 if test "$enable_connectx_xrc" = "yes"; then - $1_have_xrc=1 - AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], - [], [$1_have_xrc=0]) - AC_CHECK_DECLS([IBV_SRQT_XRC], - [], [$1_have_xrc=0], + AC_CHECK_DECLS([IBV_DEVICE_XRC], + [$1_have_xrc=1 + $1_have_xrc_domains=1], + [], [#include ]) fi if test "$enable_connectx_xrc" = "yes" \ && test $$1_have_xrc -eq 1; then - AC_CHECK_FUNCS([ibv_cmd_open_xrcd], [$1_have_xrc_domains=1]) + AC_CHECK_DECLS([ibv_create_xrc_rcv_qp], + [AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], + [], [$1_have_xrc=0])], + [$1_have_xrc=0], + [#include ]) + fi + if test "$enable_connectx_xrc" = "yes" \ + && test $$1_have_xrc_domains -eq 1; then + AC_CHECK_DECLS([ibv_cmd_open_xrcd], + [AC_CHECK_DECLS([IBV_SRQT_XRC], + [AC_CHECK_FUNCS([ibv_cmd_open_xrcd], + [], [$1_have_xrc_domains=0])], + [$1_have_xrc_domains=0], + [#include ])], + [$1_have_xrc_domains=0], + [#include ]) + # XRC and XRC Domains should be considered as exclusive + if test "$$1_have_xrc" -eq 1 && \ + test "$$1_have_xrc_domains" -eq 1; then + $1_have_xrc=0 + fi fi - if test "no" != "$enable_openib_dynamic_sl"; then # We need ib_types.h file, which is installed with opensm-devel diff --git a/opal/mca/btl/openib/btl_openib.h b/opal/mca/btl/openib/btl_openib.h index f7741e5cd9e..92506bc5d0e 100644 --- a/opal/mca/btl/openib/btl_openib.h +++ b/opal/mca/btl/openib/btl_openib.h @@ -53,8 +53,8 @@ BEGIN_C_DECLS -#define HAVE_XRC (1 == OPAL_HAVE_CONNECTX_XRC) -#define ENABLE_DYNAMIC_SL (1 == OPAL_ENABLE_DYNAMIC_SL) +#define HAVE_XRC (OPAL_HAVE_CONNECTX_XRC || OPAL_HAVE_CONNECTX_XRC_DOMAINS) +#define ENABLE_DYNAMIC_SL OPAL_ENABLE_DYNAMIC_SL #define MCA_BTL_IB_LEAVE_PINNED 1 #define IB_DEFAULT_GID_PREFIX 0xfe80000000000000ll diff --git a/opal/mca/btl/openib/btl_openib_async.c b/opal/mca/btl/openib/btl_openib_async.c index 7f6ec499d9b..d5cc5cc303f 100644 --- a/opal/mca/btl/openib/btl_openib_async.c +++ b/opal/mca/btl/openib/btl_openib_async.c @@ -122,7 +122,7 @@ static mca_btl_openib_endpoint_t * qp2endpoint(struct ibv_qp *qp, mca_btl_openib return NULL; } -#if HAVE_XRC && !OPAL_HAVE_CONNECTX_XRC_DOMAINS +#if OPAL_HAVE_CONNECTX_XRC /* XRC recive QP to endpoint */ static mca_btl_openib_endpoint_t * xrc_qp2endpoint(uint32_t qp_num, mca_btl_openib_device_t *device) { @@ -352,24 +352,21 @@ static int btl_openib_async_deviceh(struct mca_btl_openib_async_poll *devices_po } event_type = event.event_type; -#if HAVE_XRC +#if OPAL_HAVE_CONNECTX_XRC /* is it XRC event ?*/ -#if OPAL_HAVE_CONNECTX_XRC_DOMAINS -#else bool xrc_event = false; if (IBV_XRC_QP_EVENT_FLAG & event.event_type) { xrc_event = true; /* Clean the bitnd handel as usual */ event_type ^= IBV_XRC_QP_EVENT_FLAG; } -#endif #endif switch(event_type) { case IBV_EVENT_PATH_MIG: BTL_ERROR(("Alternative path migration event reported")); if (APM_ENABLED) { BTL_ERROR(("Trying to find additional path...")); -#if HAVE_XRC && !OPAL_HAVE_CONNECTX_XRC_DOMAINS +#if OPAL_HAVE_CONNECTX_XRC if (xrc_event) mca_btl_openib_load_apm_xrc_rcv(event.element.xrc_qp_num, xrc_qp2endpoint(event.element.xrc_qp_num, device)); @@ -653,7 +650,7 @@ void mca_btl_openib_load_apm(struct ibv_qp *qp, mca_btl_openib_endpoint_t *ep) qp->qp_num, strerror(errno), errno)); } -#if HAVE_XRC && ! OPAL_HAVE_CONNECTX_XRC_DOMAINS +#if OPAL_HAVE_CONNECTX_XRC void mca_btl_openib_load_apm_xrc_rcv(uint32_t qp_num, mca_btl_openib_endpoint_t *ep) { struct ibv_qp_init_attr qp_init_attr; diff --git a/opal/mca/btl/openib/btl_openib_async.h b/opal/mca/btl/openib/btl_openib_async.h index c9243821d38..33137546a46 100644 --- a/opal/mca/btl/openib/btl_openib_async.h +++ b/opal/mca/btl/openib/btl_openib_async.h @@ -19,7 +19,7 @@ int start_async_event_thread(void); void mca_btl_openib_load_apm(struct ibv_qp *qp, mca_btl_openib_endpoint_t *ep); int btl_openib_async_command_done(int exp); -#if HAVE_XRC && ! OPAL_HAVE_CONNECTX_XRC_DOMAINS +#if OPAL_HAVE_CONNECTX_XRC void mca_btl_openib_load_apm_xrc_rcv(uint32_t qp_num, mca_btl_openib_endpoint_t *ep); #endif diff --git a/opal/mca/btl/openib/btl_openib_atomic.c b/opal/mca/btl/openib/btl_openib_atomic.c index f96ce4c681b..bc15c665699 100644 --- a/opal/mca/btl/openib/btl_openib_atomic.c +++ b/opal/mca/btl/openib/btl_openib_atomic.c @@ -73,7 +73,12 @@ static int mca_btl_openib_atomic_internal (struct mca_btl_base_module_t *btl, st #if HAVE_XRC if (MCA_BTL_XRC_ENABLED && BTL_OPENIB_QP_TYPE_XRC(qp)) { - frag->sr_desc.xrc_remote_srq_num=endpoint->rem_info.rem_srqs[qp].rem_srq_num; +#if OPAL_HAVE_CONNECTX_XRC_DOMAINS + frag->sr_desc.qp_type.xrc.remote_srqn = endpoint->rem_info.rem_srqs[qp].rem_srq_num; +#else + frag->sr_desc.xrc_remote_srq_num = endpoint->rem_info.rem_srqs[qp].rem_srq_num; +#endif + } #endif diff --git a/opal/mca/btl/openib/btl_openib_put.c b/opal/mca/btl/openib/btl_openib_put.c index d7839c1c2ce..25b5d3f5322 100644 --- a/opal/mca/btl/openib/btl_openib_put.c +++ b/opal/mca/btl/openib/btl_openib_put.c @@ -103,10 +103,13 @@ int mca_btl_openib_put (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint #if HAVE_XRC if (MCA_BTL_XRC_ENABLED && BTL_OPENIB_QP_TYPE_XRC(qp)) { -#if OPAL_HAVE_CONNECTX_XRC_DOMAINS + +#if OPAL_HAVE_CONNECTX_XRC + to_out_frag(frag)->sr_desc.xrc_remote_srq_num = ep->rem_info.rem_srqs[qp].rem_srq_num; +#elif OPAL_HAVE_CONNECTX_XRC_DOMAINS to_out_frag(frag)->sr_desc.qp_type.xrc.remote_srqn = ep->rem_info.rem_srqs[qp].rem_srq_num; #else - to_out_frag(frag)->sr_desc.xrc_remote_srq_num = ep->rem_info.rem_srqs[qp].rem_srq_num; +#error "that should never happen" #endif } #endif From 944d0a13054f786dc8c2b60002fab0fa17ef90d7 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Tue, 14 Jul 2015 10:53:19 -0500 Subject: [PATCH 0041/1704] fix the logic for setting stripe size and stripe count in the lustre fs module. Takes now also the MPI_Info object into consideration. Conflicts: ompi/mca/fs/lustre/fs_lustre_file_open.c --- ompi/mca/fs/lustre/fs_lustre_component.c | 6 ++-- ompi/mca/fs/lustre/fs_lustre_file_open.c | 38 +++++++++++++++++++----- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/ompi/mca/fs/lustre/fs_lustre_component.c b/ompi/mca/fs/lustre/fs_lustre_component.c index ccf2580c8d7..c6dc1fadfa1 100644 --- a/ompi/mca/fs/lustre/fs_lustre_component.c +++ b/ompi/mca/fs/lustre/fs_lustre_component.c @@ -43,7 +43,7 @@ int mca_fs_lustre_priority = 20; to 64KB. MCA parameter Can be changed at runtime also*/ -int mca_fs_lustre_stripe_size = 1048576; +int mca_fs_lustre_stripe_size = 0; int mca_fs_lustre_stripe_width = 0; /* * Instantiate the public struct with all of our public information @@ -81,7 +81,7 @@ lustre_register(void) MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_lustre_priority); - mca_fs_lustre_stripe_size = 1048576; + mca_fs_lustre_stripe_size = 0; (void) mca_base_component_var_register(&mca_fs_lustre_component.fsm_version, "stripe_size", "stripe size of a file over lustre", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, @@ -89,7 +89,7 @@ lustre_register(void) MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_lustre_stripe_size); mca_fs_lustre_stripe_width = 0; (void) mca_base_component_var_register(&mca_fs_lustre_component.fsm_version, - "stripe_width", "stripe width of a file over lustre", + "stripe_width", "stripe count of a file over lustre", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_lustre_stripe_width); diff --git a/ompi/mca/fs/lustre/fs_lustre_file_open.c b/ompi/mca/fs/lustre/fs_lustre_file_open.c index 6792bb5a52e..02d3bb2ec61 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_open.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_open.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -50,6 +50,10 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, int amode; int old_mask, perm; int rc; + int flag; + int fs_lustre_stripe_size = -1; + int fs_lustre_stripe_width = -1; + char char_stripe[MPI_MAX_INFO_KEY]; struct lov_user_md *lump=NULL; @@ -74,13 +78,33 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, if (access_mode & MPI_MODE_EXCL) amode = amode | O_EXCL; - if ((mca_fs_lustre_stripe_size || mca_fs_lustre_stripe_width) && + + ompi_info_get (info, "stripe_size", MPI_MAX_INFO_VAL, char_stripe, &flag); + if ( flag ) { + sscanf ( char_stripe, "%d", &fs_lustre_stripe_size ); + } + + ompi_info_get (info, "stripe_width", MPI_MAX_INFO_VAL, char_stripe, &flag); + if ( flag ) { + sscanf ( char_stripe, "%d", &fs_lustre_stripe_width ); + } + + if (fs_lustre_stripe_size < 0) { + fs_lustre_stripe_size = mca_fs_lustre_stripe_size; + } + + if (fs_lustre_stripe_width < 0) { + fs_lustre_stripe_width = mca_fs_lustre_stripe_width; + } + + + if ( (fs_lustre_stripe_size>0 || fs_lustre_stripe_width>0) && (amode&O_CREAT) && (amode&O_RDWR)) { if (0 == fh->f_rank) { - llapi_file_create(filename, - mca_fs_lustre_stripe_size, + llapi_file_create(filename, + fs_lustre_stripe_size, -1, /* MSC need to change that */ - mca_fs_lustre_stripe_width, + fs_lustre_stripe_width, 0); /* MSC need to change that */ fh->fd = open(filename, O_CREAT | O_RDWR | O_LOV_DELAY_CREATE, perm); @@ -106,13 +130,13 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, else { lump = (struct lov_user_md *) malloc (sizeof(struct lov_user_md)); if (NULL == lump ){ - fprintf(stderr,"Cannot Allocate Lump for extracting stripe size\n"); + fprintf(stderr,"Cannot allocate memory for extracting stripe size\n"); return OMPI_ERROR; } rc = llapi_file_get_stripe(filename, lump); if (rc != 0) { fprintf(stderr, "get_stripe failed: %d (%s)\n",errno, strerror(errno)); - return -1; + return OMPI_ERROR; } fh->f_stripe_size = lump->lmm_stripe_size; } From 37cff292ec6e2bf3e38c469e9cc0c20a575b89da Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 6 Jul 2015 10:39:09 -0500 Subject: [PATCH 0042/1704] - first cut on the io interface changes - add the C interfaces for the new non-blocking collective I/O functions of MPI 3.1 Conflicts: ompi/mca/io/io.h --- ompi/include/mpi.h.in | 17 ++++ ompi/mca/io/io.h | 31 ++++++- ompi/mca/io/ompio/io_ompio_module.c | 4 + ompi/mca/io/romio314/src/io_romio314_module.c | 4 + ompi/mpi/c/Makefile.am | 4 + ompi/mpi/c/file_iread_all.c | 84 +++++++++++++++++ ompi/mpi/c/file_iread_at_all.c | 86 +++++++++++++++++ ompi/mpi/c/file_iwrite_all.c | 89 ++++++++++++++++++ ompi/mpi/c/file_iwrite_at_all.c | 92 +++++++++++++++++++ 9 files changed, 406 insertions(+), 5 deletions(-) create mode 100644 ompi/mpi/c/file_iread_all.c create mode 100644 ompi/mpi/c/file_iread_at_all.c create mode 100644 ompi/mpi/c/file_iwrite_all.c create mode 100644 ompi/mpi/c/file_iwrite_at_all.c diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index ffb510a4b71..f041dd4fb17 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -16,6 +16,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2011-2013 INRIA. All rights reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -1385,6 +1386,10 @@ OMPI_DECLSPEC int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); OMPI_DECLSPEC int MPI_File_read_all(MPI_File fh, void *buf, int count, @@ -1397,6 +1402,10 @@ OMPI_DECLSPEC int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence); OMPI_DECLSPEC int MPI_File_get_position(MPI_File fh, MPI_Offset *offset); OMPI_DECLSPEC int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, @@ -2077,6 +2086,10 @@ OMPI_DECLSPEC int PMPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); OMPI_DECLSPEC int PMPI_File_read_all(MPI_File fh, void *buf, int count, @@ -2089,6 +2102,10 @@ OMPI_DECLSPEC int PMPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iwrite_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_seek(MPI_File fh, MPI_Offset offset, int whence); OMPI_DECLSPEC int PMPI_File_get_position(MPI_File fh, MPI_Offset *offset); OMPI_DECLSPEC int PMPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, diff --git a/ompi/mca/io/io.h b/ompi/mca/io/io.h index 554ca2ff0c9..8f87f19ed13 100644 --- a/ompi/mca/io/io.h +++ b/ompi/mca/io/io.h @@ -13,6 +13,7 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -188,6 +189,15 @@ typedef int (*mca_io_base_module_file_iwrite_at_fn_t) int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iread_at_all_fn_t) + (struct ompi_file_t *fh, MPI_Offset offset, void *buf, + int count, struct ompi_datatype_t *datatype, + struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iwrite_at_all_fn_t) + (struct ompi_file_t *fh, MPI_Offset offset, void *buf, + int count, struct ompi_datatype_t *datatype, + struct ompi_request_t **request); + typedef int (*mca_io_base_module_file_read_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t * datatype, struct ompi_status_public_t *status); @@ -208,6 +218,13 @@ typedef int (*mca_io_base_module_file_iwrite_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iread_all_fn_t) + (struct ompi_file_t *fh, void *buf, int count, + struct ompi_datatype_t *datatype, struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iwrite_all_fn_t) + (struct ompi_file_t *fh, void *buf, int count, + struct ompi_datatype_t *datatype, struct ompi_request_t **request); + typedef int (*mca_io_base_module_file_seek_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, int whence); typedef int (*mca_io_base_module_file_get_position_fn_t) @@ -300,10 +317,12 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_read_at_all_fn_t io_module_file_read_at_all; mca_io_base_module_file_write_at_fn_t io_module_file_write_at; mca_io_base_module_file_write_at_all_fn_t io_module_file_write_at_all; - - mca_io_base_module_file_iread_at_fn_t io_module_file_iread_at; - mca_io_base_module_file_iwrite_at_fn_t io_module_file_iwrite_at; - + + mca_io_base_module_file_iread_at_fn_t io_module_file_iread_at; + mca_io_base_module_file_iwrite_at_fn_t io_module_file_iwrite_at; + mca_io_base_module_file_iread_at_all_fn_t io_module_file_iread_at_all; + mca_io_base_module_file_iwrite_at_all_fn_t io_module_file_iwrite_at_all; + mca_io_base_module_file_read_fn_t io_module_file_read; mca_io_base_module_file_read_all_fn_t io_module_file_read_all; mca_io_base_module_file_write_fn_t io_module_file_write; @@ -311,7 +330,9 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_iread_fn_t io_module_file_iread; mca_io_base_module_file_iwrite_fn_t io_module_file_iwrite; - + mca_io_base_module_file_iread_all_fn_t io_module_file_iread_all; + mca_io_base_module_file_iwrite_all_fn_t io_module_file_iwrite_all; + mca_io_base_module_file_seek_fn_t io_module_file_seek; mca_io_base_module_file_get_position_fn_t io_module_file_get_position; mca_io_base_module_file_get_byte_offset_fn_t io_module_file_get_byte_offset; diff --git a/ompi/mca/io/ompio/io_ompio_module.c b/ompi/mca/io/ompio/io_ompio_module.c index 5f10cfa1625..300e90d787c 100644 --- a/ompi/mca/io/ompio/io_ompio_module.c +++ b/ompi/mca/io/ompio/io_ompio_module.c @@ -49,6 +49,8 @@ mca_io_base_module_2_0_0_t mca_io_ompio_module = { mca_io_ompio_file_iread_at, mca_io_ompio_file_iwrite_at, + mca_io_ompio_file_iread_at_all, + mca_io_ompio_file_iwrite_at_all, /* non-indexed IO operations */ mca_io_ompio_file_read, @@ -58,6 +60,8 @@ mca_io_base_module_2_0_0_t mca_io_ompio_module = { mca_io_ompio_file_iread, mca_io_ompio_file_iwrite, + mca_io_ompio_file_iread_all, + mca_io_ompio_file_iwrite_all, mca_io_ompio_file_seek, mca_io_ompio_file_get_position, diff --git a/ompi/mca/io/romio314/src/io_romio314_module.c b/ompi/mca/io/romio314/src/io_romio314_module.c index cb46168ae4c..3a40046cbdf 100644 --- a/ompi/mca/io/romio314/src/io_romio314_module.c +++ b/ompi/mca/io/romio314/src/io_romio314_module.c @@ -59,6 +59,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = { mca_io_romio314_file_write_at_all, mca_io_romio314_file_iread_at, mca_io_romio314_file_iwrite_at, + NULL, /* iread_at_all */ + NULL, /* iwrite_at_all */ /* non-indexed IO operations */ mca_io_romio314_file_read, @@ -67,6 +69,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = { mca_io_romio314_file_write_all, mca_io_romio314_file_iread, mca_io_romio314_file_iwrite, + NULL, /* iread_all */ + NULL, /* iwrite_all */ mca_io_romio314_file_seek, mca_io_romio314_file_get_position, diff --git a/ompi/mpi/c/Makefile.am b/ompi/mpi/c/Makefile.am index a62c2c72d60..335096f6ed7 100644 --- a/ompi/mpi/c/Makefile.am +++ b/ompi/mpi/c/Makefile.am @@ -406,10 +406,14 @@ libmpi_c_mpi_la_SOURCES += \ file_get_type_extent.c \ file_get_view.c \ file_iread_at.c \ + file_iread_at_all.c \ file_iread.c \ + file_iread_all.c \ file_iread_shared.c \ file_iwrite_at.c \ + file_iwrite_at_all.c \ file_iwrite.c \ + file_iwrite_all.c \ file_iwrite_shared.c \ file_open.c \ file_preallocate.c \ diff --git a/ompi/mpi/c/file_iread_all.c b/ompi/mpi/c/file_iread_all.c new file mode 100644 index 00000000000..76d0c7198e1 --- /dev/null +++ b/ompi/mpi/c/file_iread_all.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2004-2007 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-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iread_all = PMPI_File_iread_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iread_all"; + + +int MPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_RECV(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iread_all(fh, buf, count, datatype, request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} diff --git a/ompi/mpi/c/file_iread_at_all.c b/ompi/mpi/c/file_iread_at_all.c new file mode 100644 index 00000000000..8ec0adbbca7 --- /dev/null +++ b/ompi/mpi/c/file_iread_at_all.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2004-2007 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-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iread_at_all = PMPI_File_iread_at_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iread_at_all"; + + +int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_RECV(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iread_at_all(fh, offset, buf, count, datatype, + request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} diff --git a/ompi/mpi/c/file_iwrite_all.c b/ompi/mpi/c/file_iwrite_all.c new file mode 100644 index 00000000000..8022b28223b --- /dev/null +++ b/ompi/mpi/c/file_iwrite_all.c @@ -0,0 +1,89 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2007 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-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iwrite_all = PMPI_File_iwrite_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iwrite_all"; + + +int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, MPI_Datatype + datatype, MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_SEND(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + /* XXX -- CONST -- do not cast away const -- update mca/io */ + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iwrite_all(fh, (void *) buf, count, datatype, request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} diff --git a/ompi/mpi/c/file_iwrite_at_all.c b/ompi/mpi/c/file_iwrite_at_all.c new file mode 100644 index 00000000000..21fc0affeed --- /dev/null +++ b/ompi/mpi/c/file_iwrite_at_all.c @@ -0,0 +1,92 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2007 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-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iwrite_at_all = PMPI_File_iwrite_at_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iwrite_at_all"; + + +int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_SEND(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + /* XXX -- CONST -- do not cast away const -- update mca/io */ + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iwrite_at_all(fh, offset, (void *) buf, count, datatype, + request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} From 488860a60278ea5b2da954df384b9f0387053a90 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 8 Jul 2015 10:50:37 -0500 Subject: [PATCH 0043/1704] make the c interface functions compile and work and start with the fortran interface functions. --- ompi/mpi/c/profile/Makefile.am | 4 ++++ ompi/mpi/c/profile/defines.h | 4 ++++ ompi/mpi/fortran/mpif-h/Makefile.am | 4 ++++ ompi/mpi/fortran/mpif-h/profile/defines.h | 4 ++++ ompi/mpi/fortran/mpif-h/prototypes_mpi.h | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/ompi/mpi/c/profile/Makefile.am b/ompi/mpi/c/profile/Makefile.am index aeb7fa88b05..d51cca9606b 100644 --- a/ompi/mpi/c/profile/Makefile.am +++ b/ompi/mpi/c/profile/Makefile.am @@ -391,9 +391,13 @@ nodist_libmpi_c_pmpi_la_SOURCES += \ pfile_get_view.c \ pfile_iread_at.c \ pfile_iread.c \ + pfile_iread_at_all.c \ + pfile_iread_all.c \ pfile_iread_shared.c \ pfile_iwrite_at.c \ pfile_iwrite.c \ + pfile_iwrite_at_all.c \ + pfile_iwrite_all.c \ pfile_iwrite_shared.c \ pfile_open.c \ pfile_preallocate.c \ diff --git a/ompi/mpi/c/profile/defines.h b/ompi/mpi/c/profile/defines.h index 574482c64cd..782d31d8885 100644 --- a/ompi/mpi/c/profile/defines.h +++ b/ompi/mpi/c/profile/defines.h @@ -143,9 +143,13 @@ #define MPI_File_get_view PMPI_File_get_view #define MPI_File_iread_at PMPI_File_iread_at #define MPI_File_iread PMPI_File_iread +#define MPI_File_iread_at_all PMPI_File_iread_at_all +#define MPI_File_iread_all PMPI_File_iread_all #define MPI_File_iread_shared PMPI_File_iread_shared #define MPI_File_iwrite_at PMPI_File_iwrite_at #define MPI_File_iwrite PMPI_File_iwrite +#define MPI_File_iwrite_at_all PMPI_File_iwrite_at_all +#define MPI_File_iwrite_all PMPI_File_iwrite_all #define MPI_File_iwrite_shared PMPI_File_iwrite_shared #define MPI_File_open PMPI_File_open #define MPI_File_preallocate PMPI_File_preallocate diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index c9fc687e2fc..024601ff78c 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -448,9 +448,13 @@ libmpi_mpifh_la_SOURCES += \ file_get_view_f.c \ file_iread_at_f.c \ file_iread_f.c \ + file_iread_at_all_f.c \ + file_iread_all_f.c \ file_iread_shared_f.c \ file_iwrite_at_f.c \ file_iwrite_f.c \ + file_iwrite_at_all_f.c \ + file_iwrite_all_f.c \ file_iwrite_shared_f.c \ file_open_f.c \ file_preallocate_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/profile/defines.h b/ompi/mpi/fortran/mpif-h/profile/defines.h index 579ae0d5696..f169ea1fc29 100644 --- a/ompi/mpi/fortran/mpif-h/profile/defines.h +++ b/ompi/mpi/fortran/mpif-h/profile/defines.h @@ -126,12 +126,16 @@ #define ompi_file_write_at_f pompi_file_write_at_f #define ompi_file_write_at_all_f pompi_file_write_at_all_f #define ompi_file_iread_at_f pompi_file_iread_at_f +#define ompi_file_iwrite_at_all_f pompi_file_iwrite_at_all_f +#define ompi_file_iread_at_all_f pompi_file_iread_at_all_f #define ompi_file_iwrite_at_f pompi_file_iwrite_at_f #define ompi_file_read_f pompi_file_read_f #define ompi_file_read_all_f pompi_file_read_all_f #define ompi_file_write_f pompi_file_write_f #define ompi_file_write_all_f pompi_file_write_all_f #define ompi_file_iread_f pompi_file_iread_f +#define ompi_file_iwrite_all_f pompi_file_iwrite_all_f +#define ompi_file_iread_all_f pompi_file_iread_all_f #define ompi_file_iwrite_f pompi_file_iwrite_f #define ompi_file_seek_f pompi_file_seek_f #define ompi_file_get_position_f pompi_file_get_position_f diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index bc468bb96d7..9299a4a1483 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -185,12 +185,16 @@ PN2(void, MPI_File_write_at, mpi_file_write_at, MPI_FILE_WRITE_AT, (MPI_Fint *fh PN2(void, MPI_File_write_at_all, mpi_file_write_at_all, MPI_FILE_WRITE_AT_ALL, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_iread_at, mpi_file_iread_at, MPI_FILE_IREAD_AT, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_iwrite_at, mpi_file_iwrite_at, MPI_FILE_IWRITE_AT, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iread_at_all, mpi_file_iread_at_all, MPI_FILE_IREAD_AT_ALL, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iwrite_at_all, mpi_file_iwrite_at_all, MPI_FILE_IWRITE_AT_ALL, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_read, mpi_file_read, MPI_FILE_READ, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_read_all, mpi_file_read_all, MPI_FILE_READ_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_write, mpi_file_write, MPI_FILE_WRITE, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_write_all, mpi_file_write_all, MPI_FILE_WRITE_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_iread, mpi_file_iread, MPI_FILE_IREAD, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_iwrite, mpi_file_iwrite, MPI_FILE_IWRITE, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iread_all, mpi_file_iread_all, MPI_FILE_IREAD_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iwrite_all, mpi_file_iwrite_all, MPI_FILE_IWRITE_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_seek, mpi_file_seek, MPI_FILE_SEEK, (MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *whence, MPI_Fint *ierr)); PN2(void, MPI_File_get_position, mpi_file_get_position, MPI_FILE_GET_POSITION, (MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr)); PN2(void, MPI_File_get_byte_offset, mpi_file_get_byte_offset, MPI_FILE_GET_BYTE_OFFSET, (MPI_Fint *fh, MPI_Offset *offset, MPI_Offset *disp, MPI_Fint *ierr)); From b04918027a342b67639ebd76d2d113fbee728f10 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 8 Jul 2015 12:19:49 -0500 Subject: [PATCH 0044/1704] add fortran interfaces to the new nb collective I/O functions --- ompi/mpi/fortran/mpif-h/file_iread_all_f.c | 84 ++++++++++++ ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c | 87 ++++++++++++ ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c | 83 ++++++++++++ .../mpi/fortran/mpif-h/file_iwrite_at_all_f.c | 86 ++++++++++++ ompi/mpi/fortran/use-mpi-f08/Makefile.am | 4 + .../use-mpi-f08/file_iread_all_f08.F90 | 25 ++++ .../use-mpi-f08/file_iread_at_all_f08.F90 | 27 ++++ .../use-mpi-f08/file_iwrite_all_f08.F90 | 26 ++++ .../use-mpi-f08/file_iwrite_at_all_f08.F90 | 27 ++++ .../mpi-ignore-tkr-file-interfaces.h.in | 124 ++++++++++++++++++ 10 files changed, 573 insertions(+) create mode 100644 ompi/mpi/fortran/mpif-h/file_iread_all_f.c create mode 100644 ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c create mode 100644 ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c create mode 100644 ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 diff --git a/ompi/mpi/fortran/mpif-h/file_iread_all_f.c b/ompi/mpi/fortran/mpif-h/file_iread_all_f.c new file mode 100644 index 00000000000..9ed3701362c --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iread_all_f.c @@ -0,0 +1,84 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IREAD_ALL = ompi_file_iread_all_f +#pragma weak pmpi_file_iread_all = ompi_file_iread_all_f +#pragma weak pmpi_file_iread_all_ = ompi_file_iread_all_f +#pragma weak pmpi_file_iread_all__ = ompi_file_iread_all_f + +#pragma weak PMPI_File_iread_all_f = ompi_file_iread_all_f +#pragma weak PMPI_File_iread_all_f08 = ompi_file_iread_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IREAD_ALL, + pmpi_file_iread_all, + pmpi_file_iread_all_, + pmpi_file_iread_all__, + pompi_file_iread_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IREAD_ALL = ompi_file_iread_all_f +#pragma weak mpi_file_iread_all = ompi_file_iread_all_f +#pragma weak mpi_file_iread_all_ = ompi_file_iread_all_f +#pragma weak mpi_file_iread_all__ = ompi_file_iread_all_f + +#pragma weak MPI_File_iread_all_f = ompi_file_iread_all_f +#pragma weak MPI_File_iread_all_f08 = ompi_file_iread_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IREAD_ALL, + mpi_file_iread_all, + mpi_file_iread_all_, + mpi_file_iread_all__, + ompi_file_iread_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iread_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iread_all(c_fh, OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c b/ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c new file mode 100644 index 00000000000..17a86363858 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c @@ -0,0 +1,87 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IREAD_AT_ALL = ompi_file_iread_at_all_f +#pragma weak pmpi_file_iread_at_all = ompi_file_iread_at_all_f +#pragma weak pmpi_file_iread_at_all_ = ompi_file_iread_at_all_f +#pragma weak pmpi_file_iread_at_all__ = ompi_file_iread_at_all_f + +#pragma weak PMPI_File_iread_at_all_f = ompi_file_iread_at_all_f +#pragma weak PMPI_File_iread_at_all_f08 = ompi_file_iread_at_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IREAD_AT_ALL, + pmpi_file_iread_at_all, + pmpi_file_iread_at_all_, + pmpi_file_iread_at_all__, + pompi_file_iread_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IREAD_AT_ALL = ompi_file_iread_at_all_f +#pragma weak mpi_file_iread_at_all = ompi_file_iread_at_all_f +#pragma weak mpi_file_iread_at_all_ = ompi_file_iread_at_all_f +#pragma weak mpi_file_iread_at_all__ = ompi_file_iread_at_all_f + +#pragma weak MPI_File_iread_at_all_f = ompi_file_iread_at_all_f +#pragma weak MPI_File_iread_at_all_f08 = ompi_file_iread_at_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER + OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IREAD_AT_ALL, + mpi_file_iread_at_all, + mpi_file_iread_at_all_, + mpi_file_iread_at_all__, + ompi_file_iread_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iread_at_all_f(MPI_Fint *fh, MPI_Offset *offset, + char *buf, MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iread_at_all(c_fh, (MPI_Offset) *offset, + OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, + &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c new file mode 100644 index 00000000000..cd515de1635 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c @@ -0,0 +1,83 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IWRITE_ALL = ompi_file_iwrite_all_f +#pragma weak pmpi_file_iwrite_all = ompi_file_iwrite_all_f +#pragma weak pmpi_file_iwrite_all_ = ompi_file_iwrite_all_f +#pragma weak pmpi_file_iwrite_all__ = ompi_file_iwrite_all_f + +#pragma weak PMPI_File_iwrite_all_f = ompi_file_iwrite_all_f +#pragma weak PMPI_File_iwrite_all_f08 = ompi_file_iwrite_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IWRITE_ALL, + pmpi_file_iwrite_all, + pmpi_file_iwrite_all_, + pmpi_file_iwrite_all__, + pompi_file_iwrite_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IWRITE_ALL = ompi_file_iwrite_all_f +#pragma weak mpi_file_iwrite_all = ompi_file_iwrite_all_f +#pragma weak mpi_file_iwrite_all_ = ompi_file_iwrite_all_f +#pragma weak mpi_file_iwrite_all__ = ompi_file_iwrite_all_f + +#pragma weak MPI_File_iwrite_all_f = ompi_file_iwrite_all_f +#pragma weak MPI_File_iwrite_all_f08 = ompi_file_iwrite_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE_ALL, + mpi_file_iwrite_all, + mpi_file_iwrite_all_, + mpi_file_iwrite_all__, + ompi_file_iwrite_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iwrite_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iwrite_all(c_fh, OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c new file mode 100644 index 00000000000..d4a252f553b --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c @@ -0,0 +1,86 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IWRITE_AT_ALL = ompi_file_iwrite_at_all_f +#pragma weak pmpi_file_iwrite_at_all = ompi_file_iwrite_at_all_f +#pragma weak pmpi_file_iwrite_at_all_ = ompi_file_iwrite_at_all_f +#pragma weak pmpi_file_iwrite_at_all__ = ompi_file_iwrite_at_all_f + +#pragma weak PMPI_File_iwrite_at_all_f = ompi_file_iwrite_at_all_f +#pragma weak PMPI_File_iwrite_at_all_f08 = ompi_file_iwrite_at_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IWRITE_AT_ALL, + pmpi_file_iwrite_at_all, + pmpi_file_iwrite_at_all_, + pmpi_file_iwrite_at_all__, + pompi_file_iwrite_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IWRITE_AT_ALL = ompi_file_iwrite_at_all_f +#pragma weak mpi_file_iwrite_at_all = ompi_file_iwrite_at_all_f +#pragma weak mpi_file_iwrite_at_all_ = ompi_file_iwrite_at_all_f +#pragma weak mpi_file_iwrite_at_all__ = ompi_file_iwrite_at_all_f + +#pragma weak MPI_File_iwrite_at_all_f = ompi_file_iwrite_at_all_f +#pragma weak MPI_File_iwrite_at_all_f08 = ompi_file_iwrite_at_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE_AT_ALL, + mpi_file_iwrite_at_all, + mpi_file_iwrite_at_all_, + mpi_file_iwrite_at_all__, + ompi_file_iwrite_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iwrite_at_all_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, + MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iwrite_at_all(c_fh, (MPI_Offset) *offset, + OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index f68138513e0..029330350fc 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -393,9 +393,13 @@ mpi_api_files += \ file_get_view_f08.F90 \ file_iread_at_f08.F90 \ file_iread_f08.F90 \ + file_iread_at_all_f08.F90 \ + file_iread_all_f08.F90 \ file_iread_shared_f08.F90 \ file_iwrite_at_f08.F90 \ file_iwrite_f08.F90 \ + file_iwrite_at_all_f08.F90 \ + file_iwrite_all_f08.F90 \ file_iwrite_shared_f08.F90 \ file_open_f08.F90 \ file_preallocate_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 new file mode 100644 index 00000000000..f280e911c30 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 @@ -0,0 +1,25 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + use :: mpi_f08, only : ompi_file_iread_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iread_all_f(fh%MPI_VAL,buf,count,datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iread_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 new file mode 100644 index 00000000000..9cc7f317df9 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 @@ -0,0 +1,27 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + use :: mpi_f08, only : ompi_file_iread_at_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iread_at_all_f(fh%MPI_VAL,offset,buf,count,& + datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iread_at_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 new file mode 100644 index 00000000000..c36c68abf10 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 @@ -0,0 +1,26 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + use :: mpi_f08, only : ompi_file_iwrite_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iwrite_all_f(fh%MPI_VAL,buf,count,& + datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iwrite_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 new file mode 100644 index 00000000000..315b466ffea --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 @@ -0,0 +1,27 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + use :: mpi_f08, only : ompi_file_iwrite_at_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iwrite_at_all_f(fh%MPI_VAL,offset,buf,count,& + datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iwrite_at_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in index 09b15caa208..bc5d667bd4e 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in @@ -377,6 +377,35 @@ end subroutine PMPI_File_iread end interface +interface MPI_File_iread_all + +subroutine MPI_File_iread_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iread_all + +end interface + +interface PMPI_File_iread_all + +subroutine PMPI_File_iread_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iread_all + +end interface interface MPI_File_iread_at @@ -412,6 +441,39 @@ end subroutine PMPI_File_iread_at end interface +interface MPI_File_iread_at_all + +subroutine MPI_File_iread_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iread_at_all + +end interface + +interface PMPI_File_iread_at_all + +subroutine PMPI_File_iread_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iread_at_all + +end interface interface MPI_File_iread_shared @@ -474,6 +536,35 @@ end subroutine PMPI_File_iwrite end interface +interface MPI_File_iwrite_all + +subroutine MPI_File_iwrite_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iwrite_all + +end interface + +interface PMPI_File_iwrite_all + +subroutine PMPI_File_iwrite_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iwrite_all + +end interface interface MPI_File_iwrite_at @@ -509,6 +600,39 @@ end subroutine PMPI_File_iwrite_at end interface +interface MPI_File_iwrite_at_all + +subroutine MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iwrite_at_all + +end interface + +interface PMPI_File_iwrite_at_all + +subroutine PMPI_File_iwrite_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iwrite_at_all + +end interface interface MPI_File_iwrite_shared From 18a496954474a1a1cde09e95bd16b1198b8a9a25 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 8 Jul 2015 13:27:05 -0500 Subject: [PATCH 0045/1704] add the manpages for the new MPI-3.1 non-blocking collective I/O operations. --- ompi/mpi/man/man3/MPI_File_iread_all.3in | 86 ++++++++++++++ ompi/mpi/man/man3/MPI_File_iread_at_all.3in | 112 ++++++++++++++++++ ompi/mpi/man/man3/MPI_File_iwrite_all.3in | 91 +++++++++++++++ ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in | 114 +++++++++++++++++++ ompi/mpi/man/man3/Makefile.extra | 4 + 5 files changed, 407 insertions(+) create mode 100644 ompi/mpi/man/man3/MPI_File_iread_all.3in create mode 100644 ompi/mpi/man/man3/MPI_File_iread_at_all.3in create mode 100644 ompi/mpi/man/man3/MPI_File_iwrite_all.3in create mode 100644 ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in diff --git a/ompi/mpi/man/man3/MPI_File_iread_all.3in b/ompi/mpi/man/man3/MPI_File_iread_all.3in new file mode 100644 index 00000000000..79df566711c --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iread_all.3in @@ -0,0 +1,86 @@ +.\" -*- nroff -*- +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iread_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iread_all\fP \- Reads a file starting at the location specified by the individual file pointer (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iread_all(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, + MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax +.nf + INCLUDE 'mpif.h' + MPI_FILE_IREAD_ALL(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP,\fI IERROR\fP) + BUF(*) + INTEGER FH, COUNT, DATATYPE, REQUEST, IERROR + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iread(void* \fIbuf\fP, int \fIcount\fP, + const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT/OUTPUT PARAMETER +.ft R +.TP 1i +fh +File handle (handle). + +.SH INPUT PARAMETERS +.ft R +.TP 1i +count +Number of elements in the buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +buf +Initial address of buffer (choice). +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iread_all is a nonblocking version of MPI_File_read_all. It attempts to read from the file associated with +.I fh +at the current individual file pointer position maintained by the system in which a total number of +.I count +data items having +.I datatype +type are read into the user's buffer +.I buf. +The data is taken out of those parts of the +file specified by the current view. MPI_File_iread_all stores the +number of data-type elements actually read in +.I status. +All other fields of +.I status +are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/MPI_File_iread_at_all.3in b/ompi/mpi/man/man3/MPI_File_iread_at_all.3in new file mode 100644 index 00000000000..0a6891e7b76 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iread_at_all.3in @@ -0,0 +1,112 @@ +.\" -*- nroff -*- +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iread_at_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iread_at_all\fP \- Reads a file at an explicitly specified offset (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iread_at_all(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax (see FORTRAN 77 NOTES) +.nf + INCLUDE 'mpif.h' + MPI_FILE_IREAD_AT_ALL(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP, \fIIERROR\fP) + \fIBUF\fP(*) + INTEGER \fIFH, COUNT, DATATYPE, REQUEST, IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iread_at(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT PARAMETERS +.ft R +.TP 1i +fh +File handle (handle). +.ft R +.TP 1i +offset +File offset (integer). +.ft R +.TP 1i +count +Number of elements in the buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +buf +Initial address of the buffer (choice). +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iread_at_all is the nonblocking version of MPI_File_read_at_all. + +MPI_File_iread_at_all is a nonblocking routine that attempts to read from the file associated with +.I fh +at the +.I offset +position a total number of +.I count +data items having +.I datatype +type into the user's buffer +.I buf. +The +.I offset +is in etype units relative to the current view. That is, holes are not counted +when locating an offset. The data is taken out of those parts of the +file specified by the current view. MPI_File_iread_at_all stores the +number of +.I datatype +elements actually read in +.I status. +All other fields of +.I status +are undefined. + +.SH FORTRAN 77 NOTES +.ft R +The MPI standard prescribes portable Fortran syntax for +the \fIOFFSET\fP argument only for Fortran 90. Sun FORTRAN 77 +users may use the non-portable syntax +.sp +.nf + INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP +.fi +.sp +where MPI_OFFSET_KIND is a constant defined in mpif.h +and gives the length of the declared integer in bytes. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_all.3in b/ompi/mpi/man/man3/MPI_File_iwrite_all.3in new file mode 100644 index 00000000000..c5310cea344 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iwrite_all.3in @@ -0,0 +1,91 @@ +.\" -*- nroff -*- +.\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iwrite_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iwrite_all\fP \- Writes a file starting at the location specified by the individual file pointer (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iwrite_all(MPI_File \fIfh\fP, const void \fI*buf\fP, int \fIcount\fP, + MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax +.nf + INCLUDE 'mpif.h' + MPI_FILE_IWRITE_ALL(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP,\fI IERROR\fP) + BUF(*) + INTEGER FH, COUNT, DATATYPE, REQUEST, IERROR + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iwrite(const void* \fIbuf\fP, int \fIcount\fP, + const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT/OUTPUT PARAMETER +.ft R +.TP 1i +fh +File handle (handle). + +.SH INPUT PARAMETERS +.ft R +.TP 1i +buf +Initial address of buffer (choice). +.ft R +.TP 1i +count +Number of elements in buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETER +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iwrite_all is a nonblocking version of the MPI_File_write_all interface. It attempts to write into the file associated with +.I fh +(at the current individual file pointer position maintained by the system) a total number of +.I count +data items having +.I datatype +type from the user's buffer +.I buf. +The data is written into those parts of the +file specified by the current view. MPI_File_iwrite_all stores the +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status +are undefined. +.sp +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in b/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in new file mode 100644 index 00000000000..4fc63814f3d --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in @@ -0,0 +1,114 @@ +.\" -*- nroff -*- +.\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iwrite_at_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iwrite_at_all\fP \- Writes a file at an explicitly specified offset (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iwrite_at_all(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + const void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax (see FORTRAN 77 NOTES) +.nf + INCLUDE 'mpif.h' + MPI_FILE_IWRITE_AT_ALL(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP, \fIIERROR\fP) + \fIBUF\fP(*) + INTEGER \fIFH, COUNT, DATATYPE, REQUEST, IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iwrite_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT/OUTPUT PARAMETER +.ft R +.TP 1i +fh +File handle (handle). + +.SH INPUT PARAMETERS +.ft R +.TP 1i +offset +File offset (integer). +.ft R +.TP 1i +buf +Initial address of buffer (choice). +.ft R +.TP 1i +count +Number of elements in buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iwrite_at_all is a nonblocking version of MPI_File_write_at_all. It attempts to write into the file associated with +.I fh +(at the +.I offset +position) a total number of +.I count +data items having +.I datatype +type from the user's buffer +.I buf. +The offset is in +.I etype +units relative to the current view. That is, holes are not counted +when locating an offset. The data is written into those parts of the +file specified by the current view. MPI_File_iwrite_at_all stores the +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status +are undefined. The request structure can be passed to MPI_Wait or MPI_Test, which will return a status with the number of bytes actually accessed. +.sp +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. + +.SH FORTRAN 77 NOTES +.ft R +The MPI standard prescribes portable Fortran syntax for +the \fIOFFSET\fP argument only for Fortran 90. FORTRAN 77 +users may use the non-portable syntax +.sp +.nf + INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP +.fi +.sp +where MPI_OFFSET_KIND is a constant defined in mpif.h +and gives the length of the declared integer in bytes. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/Makefile.extra b/ompi/mpi/man/man3/Makefile.extra index b683d915927..4c1dc401683 100644 --- a/ompi/mpi/man/man3/Makefile.extra +++ b/ompi/mpi/man/man3/Makefile.extra @@ -124,9 +124,13 @@ mpi_api_man_pages = \ mpi/man/man3/MPI_File_get_view.3 \ mpi/man/man3/MPI_File_iread.3 \ mpi/man/man3/MPI_File_iread_at.3 \ + mpi/man/man3/MPI_File_iread_all.3 \ + mpi/man/man3/MPI_File_iread_at_all.3 \ mpi/man/man3/MPI_File_iread_shared.3 \ mpi/man/man3/MPI_File_iwrite.3 \ mpi/man/man3/MPI_File_iwrite_at.3 \ + mpi/man/man3/MPI_File_iwrite_all.3 \ + mpi/man/man3/MPI_File_iwrite_at_all.3 \ mpi/man/man3/MPI_File_iwrite_shared.3 \ mpi/man/man3/MPI_File_open.3 \ mpi/man/man3/MPI_File_preallocate.3 \ From 1d9de8d956ab72bdec92bf88ec5eed2239661a05 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 9 Jul 2015 10:54:44 -0500 Subject: [PATCH 0046/1704] make the f08 interface actually compile. --- .../use-mpi-f08/mpi-f-interfaces-bind.h | 48 ++++++++++++ .../use-mpi-f08/mpi-f08-interfaces.F90 | 74 +++++++++++++++++++ .../use-mpi-f08/pmpi-f-interfaces-bind.h | 48 ++++++++++++ .../use-mpi-f08/pmpi-f08-interfaces.F90 | 74 +++++++++++++++++++ 4 files changed, 244 insertions(+) diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index 097d104a06e..3dc3a83e196 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -2731,6 +2731,30 @@ subroutine ompi_file_iread_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_file_iread_at_f +subroutine ompi_file_iread_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iread_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iread_all_f + +subroutine ompi_file_iread_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iread_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iread_at_all_f + subroutine ompi_file_iread_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="ompi_file_iread_shared_f") implicit none @@ -2766,6 +2790,30 @@ subroutine ompi_file_iwrite_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_file_iwrite_at_f +subroutine ompi_file_iwrite_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iwrite_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iwrite_all_f + +subroutine ompi_file_iwrite_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iwrite_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iwrite_at_all_f + subroutine ompi_file_iwrite_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="ompi_file_iwrite_shared_f") implicit none diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 index f0f5c88356c..1ea74f65fd5 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 @@ -3679,6 +3679,43 @@ subroutine MPI_File_iread_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine MPI_File_iread_at_f08 end interface MPI_File_iread_at +interface MPI_File_iread_all +subroutine MPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iread_all_f08 +end interface MPI_File_iread_all + +interface MPI_File_iread_at_all +subroutine MPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iread_at_all_f08 +end interface MPI_File_iread_at_all + interface MPI_File_iread_shared subroutine MPI_File_iread_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request @@ -3734,6 +3771,43 @@ subroutine MPI_File_iwrite_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine MPI_File_iwrite_at_f08 end interface MPI_File_iwrite_at +interface MPI_File_iwrite_all +subroutine MPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iwrite_all_f08 +end interface MPI_File_iwrite_all + +interface MPI_File_iwrite_at_all +subroutine MPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iwrite_at_all_f08 +end interface MPI_File_iwrite_at_all + interface MPI_File_iwrite_shared subroutine MPI_File_iwrite_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h index e87d8fcfb88..3405f673137 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h @@ -2516,6 +2516,30 @@ subroutine pompi_file_iread_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine pompi_file_iread_at_f +subroutine pompi_file_iread_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iread_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iread_all_f + +subroutine pompi_file_iread_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iread_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iread_at_all_f + subroutine pompi_file_iread_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="pompi_file_iread_shared_f") implicit none @@ -2551,6 +2575,30 @@ subroutine pompi_file_iwrite_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine pompi_file_iwrite_at_f +subroutine pompi_file_iwrite_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iwrite_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iwrite_all_f + +subroutine pompi_file_iwrite_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iwrite_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iwrite_at_all_f + subroutine pompi_file_iwrite_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="pompi_file_iwrite_shared_f") implicit none diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 index 9ba20c5264d..86529f7f2ce 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 @@ -3576,6 +3576,43 @@ subroutine PMPI_File_iread_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine PMPI_File_iread_at_f08 end interface PMPI_File_iread_at +interface PMPI_File_iread_all +subroutine PMPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iread_all_f08 +end interface PMPI_File_iread_all + +interface PMPI_File_iread_at_all +subroutine PMPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iread_at_all_f08 +end interface PMPI_File_iread_at_all + interface PMPI_File_iread_shared subroutine PMPI_File_iread_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request @@ -3631,6 +3668,43 @@ subroutine PMPI_File_iwrite_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine PMPI_File_iwrite_at_f08 end interface PMPI_File_iwrite_at +interface PMPI_File_iwrite_all +subroutine PMPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iwrite_all_f08 +end interface PMPI_File_iwrite_all + +interface PMPI_File_iwrite_at_all +subroutine PMPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iwrite_at_all_f08 +end interface PMPI_File_iwrite_at_all + interface PMPI_File_iwrite_shared subroutine PMPI_File_iwrite_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request From aed305b8ed102e39d9c6bfdedaf8c1415d83855b Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 16 Jul 2015 11:23:41 +0900 Subject: [PATCH 0047/1704] fortran: add missing non blocking i/o files to Makefile fixes open-mpi/ompi@01f752a5041187a7000cd1f357e8accac1c4f01e --- ompi/mpi/fortran/mpif-h/profile/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 39b5a332328..529470b27b8 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -374,9 +374,13 @@ linked_files += \ pfile_get_view_f.c \ pfile_iread_at_f.c \ pfile_iread_f.c \ + pfile_iread_at_all_f.c \ + pfile_iread_all_f.c \ pfile_iread_shared_f.c \ pfile_iwrite_at_f.c \ pfile_iwrite_f.c \ + pfile_iwrite_at_all_f.c \ + pfile_iwrite_all_f.c \ pfile_iwrite_shared_f.c \ pfile_open_f.c \ pfile_preallocate_f.c \ From 198d71e645e2f5cc72e69e2a235b3cbb38678782 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 2 Jul 2015 17:03:32 -0700 Subject: [PATCH 0048/1704] usnic: correctly count CRC errors Handle the differences between libfabric v1.0.0 and v1.1.0 in the return value of fi_cq_readerr(). Also consolidate CRC and truncation errors into the same handling block, since truncation errors are typically another symptom of CRC errors. This ensures that buffers get reposted properly. (cherry picked from commit 9bc7a54e0c8a82e23791a6a57c46f03e7d57252b) --- opal/mca/btl/usnic/btl_usnic.h | 7 +++ opal/mca/btl/usnic/btl_usnic_component.c | 61 ++++++++++++++++-------- 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic.h b/opal/mca/btl/usnic/btl_usnic.h index aafd7ff055a..6f4531184a9 100644 --- a/opal/mca/btl/usnic/btl_usnic.h +++ b/opal/mca/btl/usnic/btl_usnic.h @@ -213,6 +213,13 @@ typedef struct opal_btl_usnic_component_t { /* Prefix for the connectivity map filename (map will be output if the prefix is non-NULL) */ char *connectivity_map_prefix; + + /** Expected return value from fi_cq_readerr() upon success. In + libfabric v1.0.0 / API v1.0, the usnic provider returned + sizeof(fi_cq_err_entry) upon success. In libfabric >=v1.1 / + API >=v1.1, the usnic provider returned 1 upon success. */ + ssize_t cq_readerr_success_value; + ssize_t cq_readerr_try_again_value; } opal_btl_usnic_component_t; OPAL_MODULE_DECLSPEC extern opal_btl_usnic_component_t mca_btl_usnic_component; diff --git a/opal/mca/btl/usnic/btl_usnic_component.c b/opal/mca/btl/usnic/btl_usnic_component.c index c2bd218e2b1..a9befbbb47b 100644 --- a/opal/mca/btl/usnic/btl_usnic_component.c +++ b/opal/mca/btl/usnic/btl_usnic_component.c @@ -664,6 +664,28 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules, opal_output_verbose(5, USNIC_OUT, "btl:usnic: usNIC fabrics found"); + /* Due to ambiguities in documentation, in libfabric v1.0.0 (i.e., + API v1.0) the usnic provider returned sizeof(struct + fi_cq_err_entry) from fi_cq_readerr() upon success. + + The ambiguities were clarified in libfabric v1.1.0 (i.e., API + v1.1); the usnic provider returned 1 from fi_cq_readerr() upon + success. + */ + uint32_t libfabric_api; + libfabric_api = fi_version(); + if (1 == FI_MAJOR(libfabric_api) && + 0 == FI_MINOR(libfabric_api)) { + // Old fi_cq_readerr() behavior: success=sizeof(...), try again=0 + mca_btl_usnic_component.cq_readerr_success_value = + sizeof(struct fi_cq_err_entry); + mca_btl_usnic_component.cq_readerr_try_again_value = 0; + } else { + // New fi_cq_readerr() behavior: success=1, try again=-FI_EAGAIN + mca_btl_usnic_component.cq_readerr_success_value = 1; + mca_btl_usnic_component.cq_readerr_try_again_value = -FI_EAGAIN; + } + /* libnl initialization */ opal_proc_t *me = opal_proc_local_get(); opal_process_name_t *name = &(me->proc_name); @@ -1145,17 +1167,27 @@ usnic_handle_cq_error(opal_btl_usnic_module_t* module, } rc = fi_cq_readerr(channel->cq, &err_entry, 0); - if (rc != sizeof(err_entry)) { - BTL_ERROR(("%s: cq_readerr ret = %d", - module->fabric_info->fabric_attr->name, rc)); + if (rc == mca_btl_usnic_component.cq_readerr_try_again_value) { + return; + } else if (rc != mca_btl_usnic_component.cq_readerr_success_value) { + BTL_ERROR(("%s: cq_readerr ret = %d (expected %d)", + module->fabric_info->fabric_attr->name, rc, + (int) mca_btl_usnic_component.cq_readerr_success_value)); channel->chan_error = true; - } else if (err_entry.prov_errno == 1) { + } + + /* Silently count CRC errors. Truncation errors are usually a + different symptom of a CRC error. */ + else if (FI_ECRC == err_entry.prov_errno || + FI_ETRUNC == err_entry.prov_errno) { #if MSGDEBUG1 static int once = 0; if (once++ == 0) { - BTL_ERROR(("%s: Channel %d, CRC error", - module->fabric_info->fabric_attr->name, - channel->chan_index)); + BTL_ERROR(("%s: Channel %d, %s", + module->fabric_info->fabric_attr->name, + channel->chan_index, + FI_ECRC == err_entry.prov_errno ? + "CRC error" : "message truncation")); } #endif @@ -1171,23 +1203,10 @@ usnic_handle_cq_error(opal_btl_usnic_module_t* module, rseg->rs_next = channel->repost_recv_head; channel->repost_recv_head = rseg; } - } else if (FI_ETRUNC == err_entry.prov_errno) { - /* This error is usually a different symptom of a CRC error */ -#if MSGDEBUG1 - static int once = 0; - if (once++ == 0) { - BTL_ERROR(("%s: Channel %d, message truncation", - module->fabric_info->fabric_attr->name, - channel->chan_index)); - } -#endif - - /* silently count CRC errors */ - ++module->stats.num_crc_errors; } else { BTL_ERROR(("%s: CQ[%d] prov_err = %d", module->fabric_info->fabric_attr->name, channel->chan_index, - err_entry.prov_errno)); + err_entry.prov_errno)); channel->chan_error = true; } } From 4e0afc819276500f6b162f4e414f01ced06c5471 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 3 Jul 2015 06:13:01 -0700 Subject: [PATCH 0049/1704] usnic: make more OS-bypass memory Valgrind-defined This helps reduce false positives when running MPI apps through Valgrind. (cherry picked from commit ddd0de6cfc48aaa145e7e7da1b9ecf4972d164da) --- opal/mca/btl/usnic/btl_usnic_component.c | 3 +++ opal/mca/btl/usnic/btl_usnic_recv.h | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_component.c b/opal/mca/btl/usnic/btl_usnic_component.c index a9befbbb47b..26e66e630fa 100644 --- a/opal/mca/btl/usnic/btl_usnic_component.c +++ b/opal/mca/btl/usnic/btl_usnic_component.c @@ -1109,6 +1109,9 @@ static int usnic_handle_completion( seg = (opal_btl_usnic_segment_t*)completion->op_context; rseg = (opal_btl_usnic_recv_segment_t*)seg; + /* Make the completion be Valgrind-defined */ + opal_memchecker_base_mem_defined(seg, sizeof(*seg)); + /* Handle work completions */ switch(seg->us_type) { diff --git a/opal/mca/btl/usnic/btl_usnic_recv.h b/opal/mca/btl/usnic/btl_usnic_recv.h index 227c5e62fdc..e0d2ef216a2 100644 --- a/opal/mca/btl/usnic/btl_usnic_recv.h +++ b/opal/mca/btl/usnic/btl_usnic_recv.h @@ -267,6 +267,9 @@ opal_btl_usnic_recv_fast(opal_btl_usnic_module_t *module, int delta; int i; + /* Make the whole payload Valgrind defined */ + opal_memchecker_base_mem_defined(seg->rs_protocol_header, seg->rs_len); + bseg = &seg->rs_base; /* Find out who sent this segment */ @@ -286,10 +289,6 @@ opal_btl_usnic_dump_hex(bseg->us_btl_header, bseg->us_btl_header->payload_len + bseg->us_btl_header->payload_type) && seg->rs_base.us_btl_header->put_addr == NULL) { - /* Valgrind help */ - opal_memchecker_base_mem_defined( - (void*)(seg->rs_protocol_header), seg->rs_len); - seq = seg->rs_base.us_btl_header->pkt_seq; delta = SEQ_DIFF(seq, endpoint->endpoint_next_contig_seq_to_recv); if (delta < 0 || delta >= WINDOW_SIZE) { @@ -382,6 +381,9 @@ opal_btl_usnic_recv(opal_btl_usnic_module_t *module, opal_btl_usnic_endpoint_t *endpoint; int rc; + /* Make the whole payload Valgrind defined */ + opal_memchecker_base_mem_defined(seg->rs_protocol_header, seg->rs_len); + bseg = &seg->rs_base; /* Find out who sent this segment */ From c91f4d74f6d3006f663aa079a15f9be21fa015b5 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 9 Jul 2015 11:58:00 -0700 Subject: [PATCH 0050/1704] usnic: handle FI_MSG_PREFIX differences libfabric v1.0.0->v1.1.0 In libfabric v1.0.0 (i.e., API v1.0), the usnic provider handled FI_MSG_PREFIX inconsistently between sends and receives. This has been fixed in libfabric v1.1.0 (i.e., API v1.1): FI_MSG_PREFIX is handled consistently for both sends and receives. Run-time detect which libfabric we are running with and adapt behavior appropriately. (cherry picked from commit f265358fbea5bac277150fcc26478fe20063a241) --- opal/mca/btl/usnic/btl_usnic.h | 6 +++ opal/mca/btl/usnic/btl_usnic_component.c | 30 ++++++++++++-- opal/mca/btl/usnic/btl_usnic_frag.c | 27 ++++++------ opal/mca/btl/usnic/btl_usnic_module.c | 52 +++++++++++++++++++----- opal/mca/btl/usnic/btl_usnic_send.h | 6 +-- 5 files changed, 90 insertions(+), 31 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic.h b/opal/mca/btl/usnic/btl_usnic.h index 6f4531184a9..6444ca6b0fc 100644 --- a/opal/mca/btl/usnic/btl_usnic.h +++ b/opal/mca/btl/usnic/btl_usnic.h @@ -220,6 +220,12 @@ typedef struct opal_btl_usnic_component_t { API >=v1.1, the usnic provider returned 1 upon success. */ ssize_t cq_readerr_success_value; ssize_t cq_readerr_try_again_value; + + /** Offset into the send buffer where the payload will go. For + libfabric v1.0.0 / API v1.0, this is 0. For libfabric >=v1.1 + / API >=v1.1, this is the endpoint.msg_prefix_size (i.e., + component.transport_header_len). */ + uint32_t prefix_send_offset; } opal_btl_usnic_component_t; OPAL_MODULE_DECLSPEC extern opal_btl_usnic_component_t mca_btl_usnic_component; diff --git a/opal/mca/btl/usnic/btl_usnic_component.c b/opal/mca/btl/usnic/btl_usnic_component.c index 26e66e630fa..7302fe6f06f 100644 --- a/opal/mca/btl/usnic/btl_usnic_component.c +++ b/opal/mca/btl/usnic/btl_usnic_component.c @@ -163,6 +163,7 @@ static int usnic_component_open(void) mca_btl_usnic_component.usnic_all_modules = NULL; mca_btl_usnic_component.usnic_active_modules = NULL; mca_btl_usnic_component.transport_header_len = -1; + mca_btl_usnic_component.prefix_send_offset = 0; /* initialize objects */ OBJ_CONSTRUCT(&mca_btl_usnic_component.usnic_procs, opal_list_t); @@ -630,7 +631,29 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules, hints.ep_attr = &ep_attr; hints.fabric_attr = &fabric_attr; - ret = fi_getinfo(FI_VERSION(1, 0), NULL, 0, 0, &hints, &info_list); + /* This code understands libfabric API v1.0 and v1.1. Even if we + were compiled with libfabric API v1.0, we still want to request + v1.1 -- here's why: + + - In libfabric v1.0.0 (i.e., API v1.0), the usnic provider did + not check the value of the "version" parameter passed into + fi_getinfo() + + - If you pass FI_VERSION(1,0) to libfabric v1.1.0 (i.e., API + v1.1), the usnic provider will disable FI_MSG_PREFIX support + (on the assumption that the application will not handle + FI_MSG_PREFIX properly). This can happen if you compile OMPI + against libfabric v1.0.0 (i.e., API v1.0) and run OMPI + against libfabric v1.1.0 (i.e., API v1.1). + + So never request API v1.0 -- always request a minimum of + v1.1. */ + uint32_t libfabric_api; + libfabric_api = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION); + if (libfabric_api == FI_VERSION(1, 0)) { + libfabric_api = FI_VERSION(1, 1); + } + ret = fi_getinfo(libfabric_api, NULL, 0, 0, &hints, &info_list); if (0 != ret) { opal_output_verbose(5, USNIC_OUT, "btl:usnic: disqualifiying myself due to fi_getinfo failure: %s (%d)", strerror(-ret), ret); @@ -671,8 +694,9 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules, The ambiguities were clarified in libfabric v1.1.0 (i.e., API v1.1); the usnic provider returned 1 from fi_cq_readerr() upon success. - */ - uint32_t libfabric_api; + + So query to see what version of the libfabric API we are + running with, and adapt accordingly. */ libfabric_api = fi_version(); if (1 == FI_MAJOR(libfabric_api) && 0 == FI_MINOR(libfabric_api)) { diff --git a/opal/mca/btl/usnic/btl_usnic_frag.c b/opal/mca/btl/usnic/btl_usnic_frag.c index 5944e02cbad..02c80402e1b 100644 --- a/opal/mca/btl/usnic/btl_usnic_frag.c +++ b/opal/mca/btl/usnic/btl_usnic_frag.c @@ -30,23 +30,22 @@ #include "btl_usnic_ack.h" static void -common_send_seg_helper( - opal_btl_usnic_send_segment_t *seg, - int offset) +common_send_seg_helper(opal_btl_usnic_send_segment_t *seg) { opal_btl_usnic_segment_t *bseg; - bseg = &seg->ss_base; - - bseg->us_btl_header = (opal_btl_usnic_btl_header_t *) - (((char*) bseg->us_list.ptr) + offset); - bseg->us_btl_header->sender = mca_btl_usnic_component.my_hashed_rte_name; - + /* send ptr for fi_send(). ss_len will be filled in right before + the actual send. */ + seg->ss_ptr = (uint8_t *) seg->ss_base.us_list.ptr; seg->ss_send_posted = 0; seg->ss_ack_pending = false; - /* send ptr, len will be filled in just before send */ - seg->ss_ptr = (uint8_t *)bseg->us_btl_header; + /* Offset the BTL header by (prefix_send_offset) bytes into the + raw buffer */ + bseg = &seg->ss_base; + bseg->us_btl_header = (opal_btl_usnic_btl_header_t *) + (seg->ss_ptr + mca_btl_usnic_component.prefix_send_offset); + bseg->us_btl_header->sender = mca_btl_usnic_component.my_hashed_rte_name; } static void @@ -59,7 +58,7 @@ chunk_seg_constructor( bseg->us_type = OPAL_BTL_USNIC_SEG_CHUNK; /* some more common initializaiton */ - common_send_seg_helper(seg, mca_btl_usnic_component.transport_header_len); + common_send_seg_helper(seg); /* payload starts next byte beyond BTL chunk header */ bseg->us_payload.raw = (uint8_t *)(bseg->us_btl_chunk_header + 1); @@ -77,7 +76,7 @@ frag_seg_constructor( bseg->us_type = OPAL_BTL_USNIC_SEG_FRAG; /* some more common initializaiton */ - common_send_seg_helper(seg, mca_btl_usnic_component.transport_header_len); + common_send_seg_helper(seg); /* payload starts next byte beyond BTL header */ bseg->us_payload.raw = (uint8_t *)(bseg->us_btl_header + 1); @@ -95,7 +94,7 @@ ack_seg_constructor( bseg->us_type = OPAL_BTL_USNIC_SEG_ACK; /* some more common initializaiton */ - common_send_seg_helper(ack, mca_btl_usnic_component.transport_header_len); + common_send_seg_helper(ack); /* ACK value embedded in BTL header */ bseg->us_btl_header->payload_type = OPAL_BTL_USNIC_PAYLOAD_TYPE_ACK; diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index 2b36af126bd..56aacfb9ae8 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -1421,7 +1421,7 @@ static int create_ep(opal_btl_usnic_module_t* module, opal_process_info.my_local_rank); } - rc = fi_getinfo(FI_VERSION(1, 0), NULL, 0, 0, hint, &channel->info); + rc = fi_getinfo(FI_VERSION(1, 1), NULL, 0, 0, hint, &channel->info); fi_freeinfo(hint); if (0 != rc) { opal_show_help("help-mpi-btl-usnic.txt", @@ -1634,6 +1634,9 @@ static int init_one_channel(opal_btl_usnic_module_t *module, goto error; } + assert(channel->info->ep_attr->msg_prefix_size == + (uint32_t) mca_btl_usnic_component.transport_header_len); + /* * Initialize pool of receive segments. Round MTU up to cache * line size so that each segment is guaranteed to start on a @@ -1777,6 +1780,33 @@ static void init_find_transport_header_len(opal_btl_usnic_module_t *module) module->fabric_info->ep_attr->msg_prefix_size; mca_btl_usnic_component.transport_protocol = module->fabric_info->ep_attr->protocol; + + /* The usnic provider in libfabric v1.0.0 (i.e., API v1.0) treated + FI_MSG_PREFIX inconsistently between senders and receivers. It + was corrected in libfabric v1.1.0 (i.e., API v1.1), meaning + that FI_MSG_PREFIX is treated consistently between senders and + receivers. + + So check what version of the libfabric API we have, and setup + to use the "old" (inconsistent) MSG_PREFIX behavior, or the + "new" MSG_PREFIX (consistent) behavior. + + NOTE: This is a little redundant; we're setting a + component-level attribute during each module's setup. We do + this here (and not earlier, when we check fi_version() during + the component setup) because we can't obtain the value of the + endpoint msg_prefix_size until we setup the first module. + Also, it's safe because each module will set the component + attribute to the same value. So it's ok. */ + uint32_t libfabric_api; + libfabric_api = fi_version(); + if (1 == FI_MAJOR(libfabric_api) && + 0 == FI_MINOR(libfabric_api)) { + mca_btl_usnic_component.prefix_send_offset = 0; + } else { + mca_btl_usnic_component.prefix_send_offset = + module->fabric_info->ep_attr->msg_prefix_size; + } } /* @@ -1835,13 +1865,15 @@ static void init_payload_lengths(opal_btl_usnic_module_t *module) /* Find the max payload this port can handle */ module->max_frag_payload = module->local_modex.max_msg_size - /* start with the MTU */ - sizeof(opal_btl_usnic_btl_header_t); /* subtract size of - the BTL header */ + sizeof(opal_btl_usnic_btl_header_t) - /* subtract size of + the BTL header */ + mca_btl_usnic_component.prefix_send_offset; /* same, but use chunk header */ module->max_chunk_payload = module->local_modex.max_msg_size - - sizeof(opal_btl_usnic_btl_chunk_header_t); + sizeof(opal_btl_usnic_btl_chunk_header_t) - + mca_btl_usnic_component.prefix_send_offset; /* Priorirty queue MTU and max size */ if (0 == module->max_tiny_msg_size) { @@ -2097,7 +2129,6 @@ static void init_freelists(opal_btl_usnic_module_t *module) uint32_t segsize; segsize = (module->local_modex.max_msg_size + - module->fabric_info->ep_attr->msg_prefix_size + opal_cache_line_size - 1) & ~(opal_cache_line_size - 1); @@ -2105,7 +2136,7 @@ static void init_freelists(opal_btl_usnic_module_t *module) OBJ_CONSTRUCT(&module->small_send_frags, opal_free_list_t); rc = usnic_compat_free_list_init(&module->small_send_frags, sizeof(opal_btl_usnic_small_send_frag_t) + - mca_btl_usnic_component.transport_header_len, + mca_btl_usnic_component.prefix_send_offset, opal_cache_line_size, OBJ_CLASS(opal_btl_usnic_small_send_frag_t), segsize, @@ -2123,7 +2154,7 @@ static void init_freelists(opal_btl_usnic_module_t *module) OBJ_CONSTRUCT(&module->large_send_frags, opal_free_list_t); rc = usnic_compat_free_list_init(&module->large_send_frags, sizeof(opal_btl_usnic_large_send_frag_t) + - mca_btl_usnic_component.transport_header_len, + mca_btl_usnic_component.prefix_send_offset, opal_cache_line_size, OBJ_CLASS(opal_btl_usnic_large_send_frag_t), 0, /* payload size */ @@ -2141,7 +2172,7 @@ static void init_freelists(opal_btl_usnic_module_t *module) OBJ_CONSTRUCT(&module->put_dest_frags, opal_free_list_t); rc = usnic_compat_free_list_init(&module->put_dest_frags, sizeof(opal_btl_usnic_put_dest_frag_t) + - mca_btl_usnic_component.transport_header_len, + mca_btl_usnic_component.prefix_send_offset, opal_cache_line_size, OBJ_CLASS(opal_btl_usnic_put_dest_frag_t), 0, /* payload size */ @@ -2160,7 +2191,7 @@ static void init_freelists(opal_btl_usnic_module_t *module) OBJ_CONSTRUCT(&module->chunk_segs, opal_free_list_t); rc = usnic_compat_free_list_init(&module->chunk_segs, sizeof(opal_btl_usnic_chunk_segment_t) + - mca_btl_usnic_component.transport_header_len, + mca_btl_usnic_component.prefix_send_offset, opal_cache_line_size, OBJ_CLASS(opal_btl_usnic_chunk_segment_t), segsize, @@ -2178,12 +2209,11 @@ static void init_freelists(opal_btl_usnic_module_t *module) /* ACK segments freelist */ uint32_t ack_segment_len; ack_segment_len = (sizeof(opal_btl_usnic_btl_header_t) + - module->fabric_info->ep_attr->msg_prefix_size + opal_cache_line_size - 1) & ~(opal_cache_line_size - 1); OBJ_CONSTRUCT(&module->ack_segs, opal_free_list_t); rc = usnic_compat_free_list_init(&module->ack_segs, sizeof(opal_btl_usnic_ack_segment_t) + - mca_btl_usnic_component.transport_header_len, + mca_btl_usnic_component.prefix_send_offset, opal_cache_line_size, OBJ_CLASS(opal_btl_usnic_ack_segment_t), ack_segment_len, diff --git a/opal/mca/btl/usnic/btl_usnic_send.h b/opal/mca/btl/usnic/btl_usnic_send.h index 02fd2e90795..796008d2f7d 100644 --- a/opal/mca/btl/usnic/btl_usnic_send.h +++ b/opal/mca/btl/usnic/btl_usnic_send.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -79,7 +79,7 @@ opal_btl_usnic_post_segment( /* Send the segment */ ret = fi_send(channel->ep, sseg->ss_ptr, - sseg->ss_len, + sseg->ss_len + mca_btl_usnic_component.prefix_send_offset, NULL, endpoint->endpoint_remote_addrs[channel_id], sseg); @@ -128,7 +128,7 @@ opal_btl_usnic_post_ack( ret = fi_send(channel->ep, sseg->ss_ptr, - sseg->ss_len, + sseg->ss_len + mca_btl_usnic_component.prefix_send_offset, NULL, endpoint->endpoint_remote_addrs[channel_id], sseg); From 814d37a2a0009784ae10ab721e4e6c058c23506e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 9 Jul 2015 10:45:43 -0700 Subject: [PATCH 0051/1704] usnic: temporarily disable the BTL put method The usnic BTL put method is currently broken. Disable it until we can fix it properly. (cherry picked from commit ba429dc8900ce8b7dc0c38943ab8a7c6faf8a63f) --- opal/mca/btl/usnic/btl_usnic_compat.c | 19 +++++++++++++++++++ opal/mca/btl/usnic/btl_usnic_module.c | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/opal/mca/btl/usnic/btl_usnic_compat.c b/opal/mca/btl/usnic/btl_usnic_compat.c index fb08c8378fa..d5ebb9274ed 100644 --- a/opal/mca/btl/usnic/btl_usnic_compat.c +++ b/opal/mca/btl/usnic/btl_usnic_compat.c @@ -715,6 +715,25 @@ opal_btl_usnic_put(struct mca_btl_base_module_t *base_module, sfrag->sf_size = size; sfrag->sf_ack_bytes_left = size; + + + /* JMS NOTE: This is currently broken, and is deactivated by + removing the MCA_BTL_FLAGS_PUT from .btl_flags in btl_module.c. + + Overwriting the uf_local_seg values is not a good idea, and + doesn't do anything to actually send the data in the + progression past finish_put_or_send(). + + The proper fix is to change the plumbing here to eventually + call fi_sendv() with an iov[0] = the internal buffer that's + already allocated, and iov[1] = the user's buffer. The usnic + provider in fi_sendv() will be smart enough to figure out which + is more performance: memcpy'ing the 2 buffers together and + doing a single xfer down to the hardware, or actually doing a + SG list down to the hardware. */ + + + opal_btl_usnic_frag_t *frag; frag = &sfrag->sf_base; frag->uf_local_seg[0].seg_len = size; diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index 56aacfb9ae8..a1277cb4718 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -2338,7 +2338,6 @@ opal_btl_usnic_module_t opal_btl_usnic_module_template = { .btl_exclusivity = MCA_BTL_EXCLUSIVITY_DEFAULT, .btl_flags = MCA_BTL_FLAGS_SEND | - MCA_BTL_FLAGS_PUT | MCA_BTL_FLAGS_SEND_INPLACE, .btl_add_procs = usnic_add_procs, From d75968d6bb687e3c9304060aa3663528c06a63b3 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 9 Jul 2015 08:56:51 -0700 Subject: [PATCH 0052/1704] usnic: misc compiler warnings fixes (cherry picked from commit cd87c8ad41e09cbd7c5ad23144520d05c173c2f0) --- opal/mca/btl/usnic/btl_usnic_frag.c | 5 +++-- opal/mca/btl/usnic/btl_usnic_module.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_frag.c b/opal/mca/btl/usnic/btl_usnic_frag.c index 02c80402e1b..469b1410d65 100644 --- a/opal/mca/btl/usnic/btl_usnic_frag.c +++ b/opal/mca/btl/usnic/btl_usnic_frag.c @@ -175,12 +175,13 @@ send_frag_constructor(opal_btl_usnic_send_frag_t *frag) static void send_frag_destructor(opal_btl_usnic_send_frag_t *frag) { - mca_btl_base_descriptor_t *desc; - +#if OPAL_ENABLE_DEBUG /* make sure nobody twiddled these values after the constructor */ + mca_btl_base_descriptor_t *desc; desc = &frag->sf_base.uf_base; assert(desc->USNIC_SEND_LOCAL == frag->sf_base.uf_local_seg); assert(0 == frag->sf_base.uf_local_seg[0].seg_len); +#endif /* PML may change desc->des_remote to point elsewhere, cannot assert that it * still points to our embedded segment */ diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index a1277cb4718..6e82f4493c2 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -2125,7 +2125,7 @@ static void init_random_objects(opal_btl_usnic_module_t *module) static void init_freelists(opal_btl_usnic_module_t *module) { - int rc; + int rc __opal_attribute_unused__; uint32_t segsize; segsize = (module->local_modex.max_msg_size + From 1d5c91939f4b4d1ab37b8b828e20dee5c56cd120 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 9 Jul 2015 09:12:53 -0700 Subject: [PATCH 0053/1704] usnic: "sin" assignment needs to be outside the #if The "sin" variable is used below; need to ensure that it is assigned for all builds (not just debug builds). (cherry picked from commit f9c65a701e3fcf6d62118dc7d87ace96946d149e) --- opal/mca/btl/usnic/btl_usnic_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index 6e82f4493c2..ce138b8f99b 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -1450,12 +1450,13 @@ static int create_ep(opal_btl_usnic_module_t* module, sa = (struct sockaddr *)channel->info->src_addr; assert(AF_INET == sa->sa_family); } +#endif + sin = (struct sockaddr_in *)channel->info->src_addr; assert(sizeof(struct sockaddr_in) == channel->info->src_addrlen); /* no matter the version of libfabric, this should hold */ assert(0 == sin->sin_port); -#endif rc = fi_endpoint(module->domain, channel->info, &channel->ep, NULL); if (0 != rc || NULL == channel->ep) { From 1085a3e6e6e36dd26a92eeb3dbfbe64ab2f142a1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 10 Jul 2015 10:09:15 -0700 Subject: [PATCH 0054/1704] usnic: minor code cleanups (cherry picked from commit 3327fa56b59876820198808dcb40e0e941084fb0) --- opal/mca/btl/usnic/btl_usnic.h | 8 ++++---- opal/mca/btl/usnic/btl_usnic_ack.c | 1 + opal/mca/btl/usnic/btl_usnic_component.c | 9 --------- opal/mca/btl/usnic/btl_usnic_recv.c | 2 +- opal/mca/btl/usnic/btl_usnic_send.c | 4 ++++ 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic.h b/opal/mca/btl/usnic/btl_usnic.h index 6444ca6b0fc..76b3b0ccc2f 100644 --- a/opal/mca/btl/usnic/btl_usnic.h +++ b/opal/mca/btl/usnic/btl_usnic.h @@ -93,7 +93,7 @@ extern opal_rng_buff_t opal_btl_usnic_rand_buff; /* Set to >0 to randomly drop received frags. The higher the number, the more frequent the drops. */ -#define WANT_RECV_FRAG_DROPS 0 +#define WANT_RECV_DROPS 0 /* Set to >0 to randomly fail to send an ACK, mimicing a lost ACK. The higher the number, the more frequent the failed-to-send-ACK. */ #define WANT_FAIL_TO_SEND_ACK 0 @@ -102,10 +102,10 @@ extern opal_rng_buff_t opal_btl_usnic_rand_buff; the failed-to-resend-frag. */ #define WANT_FAIL_TO_RESEND_FRAG 0 -#if WANT_RECV_FRAG_DROPS > 0 -#define FAKE_RECV_FRAG_DROP (opal_rand(&opal_btl_usnic_rand_buff) < WANT_RECV_FRAG_DROPS) +#if WANT_RECV_DROPS > 0 +#define FAKE_RECV_DROP (opal_rand(&opal_btl_usnic_rand_buff) < WANT_RECV_DROPS) #else -#define FAKE_RECV_FRAG_DROP 0 +#define FAKE_RECV_DROP 0 #endif #if WANT_FAIL_TO_SEND_ACK > 0 diff --git a/opal/mca/btl/usnic/btl_usnic_ack.c b/opal/mca/btl/usnic/btl_usnic_ack.c index 03492bc5489..907e72a194a 100644 --- a/opal/mca/btl/usnic/btl_usnic_ack.c +++ b/opal/mca/btl/usnic/btl_usnic_ack.c @@ -252,6 +252,7 @@ opal_btl_usnic_ack_complete(opal_btl_usnic_module_t *module, opal_btl_usnic_ack_segment_t *ack) { opal_btl_usnic_ack_segment_return(module, ack); + ++module->mod_channels[ack->ss_channel].credits; } /*****************************************************************************/ diff --git a/opal/mca/btl/usnic/btl_usnic_component.c b/opal/mca/btl/usnic/btl_usnic_component.c index 7302fe6f06f..bc26c4d283f 100644 --- a/opal/mca/btl/usnic/btl_usnic_component.c +++ b/opal/mca/btl/usnic/btl_usnic_component.c @@ -1143,27 +1143,18 @@ static int usnic_handle_completion( case OPAL_BTL_USNIC_SEG_ACK: opal_btl_usnic_ack_complete(module, (opal_btl_usnic_ack_segment_t *)seg); -{ opal_btl_usnic_send_segment_t *sseg = (opal_btl_usnic_send_segment_t *)seg; -++module->mod_channels[sseg->ss_channel].credits; -} break; /**** Send of frag segment completion ****/ case OPAL_BTL_USNIC_SEG_FRAG: opal_btl_usnic_frag_send_complete(module, (opal_btl_usnic_frag_segment_t*)seg); -{ opal_btl_usnic_send_segment_t *sseg = (opal_btl_usnic_send_segment_t *)seg; -++module->mod_channels[sseg->ss_channel].credits; -} break; /**** Send of chunk segment completion ****/ case OPAL_BTL_USNIC_SEG_CHUNK: opal_btl_usnic_chunk_send_complete(module, (opal_btl_usnic_chunk_segment_t*)seg); -{ opal_btl_usnic_send_segment_t *sseg = (opal_btl_usnic_send_segment_t *)seg; -++module->mod_channels[sseg->ss_channel].credits; -} break; /**** Receive completions ****/ diff --git a/opal/mca/btl/usnic/btl_usnic_recv.c b/opal/mca/btl/usnic/btl_usnic_recv.c index 0f94c131be5..c77388ef23d 100644 --- a/opal/mca/btl/usnic/btl_usnic_recv.c +++ b/opal/mca/btl/usnic/btl_usnic_recv.c @@ -77,7 +77,7 @@ void opal_btl_usnic_recv_call(opal_btl_usnic_module_t *module, /* Find out who sent this segment */ endpoint = seg->rs_endpoint; - if (FAKE_RECV_FRAG_DROP || OPAL_UNLIKELY(NULL == endpoint)) { + if (FAKE_RECV_DROP || OPAL_UNLIKELY(NULL == endpoint)) { /* No idea who this was from, so drop it */ #if MSGDEBUG1 opal_output(0, "=== Unknown sender; dropped: seq %" UDSEQ, diff --git a/opal/mca/btl/usnic/btl_usnic_send.c b/opal/mca/btl/usnic/btl_usnic_send.c index aff68722aa1..b0965c635da 100644 --- a/opal/mca/btl/usnic/btl_usnic_send.c +++ b/opal/mca/btl/usnic/btl_usnic_send.c @@ -66,6 +66,8 @@ opal_btl_usnic_frag_send_complete(opal_btl_usnic_module_t *module, /* see if this endpoint needs to be made ready-to-send */ opal_btl_usnic_check_rts(frag->sf_endpoint); + + ++module->mod_channels[sseg->ss_channel].credits; } /* @@ -97,6 +99,8 @@ opal_btl_usnic_chunk_send_complete(opal_btl_usnic_module_t *module, /* see if this endpoint needs to be made ready-to-send */ opal_btl_usnic_check_rts(frag->sf_endpoint); + + ++module->mod_channels[sseg->ss_channel].credits; } /* Responsible for completing non-fastpath parts of a put or send operation, From 06df02871a78b9a3711c558cc57df02ca7dfd380 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 10 Jul 2015 12:40:48 -0700 Subject: [PATCH 0055/1704] usnic: gracefully handle when we can't alloc an ACK The comment didn't match the debugging code (which was ugly, and apparently never happens, anyway). Just return and let the sender retransmit. (cherry picked from commit 633da6641e5abb69c496b66314fab688dbb8cb57) --- opal/mca/btl/usnic/btl_usnic_ack.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_ack.c b/opal/mca/btl/usnic/btl_usnic_ack.c index 907e72a194a..3a6ae5baac6 100644 --- a/opal/mca/btl/usnic/btl_usnic_ack.c +++ b/opal/mca/btl/usnic/btl_usnic_ack.c @@ -201,8 +201,7 @@ opal_btl_usnic_ack_send( /* Get an ACK frag. If we don't get one, just discard this ACK. */ ack = opal_btl_usnic_ack_segment_alloc(module); if (OPAL_UNLIKELY(NULL == ack)) { - opal_output(0, "====================== No frag for sending the ACK -- skipped"); - abort(); + return; } /* send the seq of the lowest item in the window that From 2db9a5604336733a199090679f2cc828301877e2 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 22 Jul 2015 08:44:12 -0400 Subject: [PATCH 0056/1704] README: updates for network options - Add libfabric options - Remove sctp options (the SCTP BTL was removed from the tree) - Put the network options in alphabetical order (cherry picked from commit open-mpi/ompi@516b14d6230333dd7c2cb6c4775b995cb8114b35) --- README | 61 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/README b/README index bf3d3001ed1..ac8b57d9d2e 100644 --- a/README +++ b/README @@ -848,6 +848,21 @@ NETWORKING SUPPORT / OPTIONS same server. See http://runtime.bordeaux.inria.fr/knem/ for details. +--with-libfabric= + Specify the directory where the OpenFabrics Interfaces libfabric + library and header files are located. This option is generally only + necessary if the libfabric headers and libraries are not in default + compiler/linker search paths. + + Libfabric is the support library for OpenFabrics Interfaces-based + network adapters, such as Cisco usNIC, Intel Omniscale PSM, etc. + +--with-libfabric-libdir= + Look in directory for the libfabric libraries. By default, Open MPI + will look in /lib and /lib64, which covers most cases. This option is only + needed for special configurations. + --with-mxm= Specify the directory where the Mellanox MXM library and header files are located. This option is generally only necessary if the @@ -861,24 +876,6 @@ NETWORKING SUPPORT / OPTIONS look in /lib and /lib64, which covers most cases. This option is only needed for special configurations. ---with-usnic - Abort configure if Cisco usNIC support cannot be built. - ---with-verbs= - Specify the directory where the verbs (also know as OpenFabrics, and - previously known as OpenIB) libraries and header files are located. - This option is generally only necessary if the verbs headers and - libraries are not in default compiler/linker search paths. - - "OpenFabrics" refers to operating system bypass networks, such as - InfiniBand, usNIC, iWARP, and RoCE (aka "IBoIP"). - ---with-verbs-libdir= - Look in directory for the verbs libraries. By default, Open MPI - will look in /lib and /lib64, - which covers most cases. This option is only needed for special - configurations. - --with-portals4= Specify the directory where the Portals4 libraries and header files are located. This option is generally only necessary if the Portals4 @@ -912,20 +909,26 @@ NETWORKING SUPPORT / OPTIONS look in /lib and /lib64, which covers most cases. This option is only needed for special configurations. ---with-sctp= - Specify the directory where the SCTP libraries and header files are - located. This option is generally only necessary if the SCTP headers - and libraries are not in default compiler/linker search paths. +--with-scif=

+ Look in directory for Intel SCIF support libraries - SCTP is a special network stack over Ethernet networks. +--with-verbs= + Specify the directory where the verbs (also know as OpenFabrics, and + previously known as OpenIB) libraries and header files are located. + This option is generally only necessary if the verbs headers and + libraries are not in default compiler/linker search paths. ---with-sctp-libdir= - Look in directory for the SCTP libraries. By default, Open MPI will - look in /lib and /lib64, which covers - most cases. This option is only needed for special configurations. + "OpenFabrics" refers to operating system bypass networks, such as + InfiniBand, usNIC, iWARP, and RoCE (aka "IBoIP"). ---with-scif= - Look in directory for Intel SCIF support libraries +--with-verbs-libdir= + Look in directory for the verbs libraries. By default, Open MPI + will look in /lib and /lib64, + which covers most cases. This option is only needed for special + configurations. + +--with-usnic + Abort configure if Cisco usNIC support cannot be built. RUN-TIME SYSTEM SUPPORT From 6e78b7aabc4c32294afadd77340989f606288999 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 22 Jul 2015 09:10:50 -0400 Subject: [PATCH 0057/1704] topo/basic: remove stale (empty) .windows file (cherry picked from commit open-mpi/ompi@24ca887bd84b8995c0739ec26450b7c9628723d2) --- ompi/mca/topo/basic/.windows | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ompi/mca/topo/basic/.windows diff --git a/ompi/mca/topo/basic/.windows b/ompi/mca/topo/basic/.windows deleted file mode 100644 index e69de29bb2d..00000000000 From 58534da8ce7138a6c575d26e57f31dbf62f48d28 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 22 Jul 2015 09:20:43 -0400 Subject: [PATCH 0058/1704] topo/basic: also remove .windows from Makefile.am (cherry picked from commit open-mpi/ompi@6929aca1b734c564968ccd5ba607e3280d0af057) --- ompi/mca/topo/basic/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ompi/mca/topo/basic/Makefile.am b/ompi/mca/topo/basic/Makefile.am index 75693d9fa65..9c261f7029d 100644 --- a/ompi/mca/topo/basic/Makefile.am +++ b/ompi/mca/topo/basic/Makefile.am @@ -4,6 +4,7 @@ # reserved. # Copyright (c) 2011-2013 INRIA. All rights reserved. # Copyright (c) 2011-2013 Université Bordeaux 1 +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -11,8 +12,6 @@ # $HEADER$ # -EXTRA_DIST = .windows - sources = \ topo_basic.h \ topo_basic_component.c From fef0b47a2330521e14200fa1a9c40e1364bb5097 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Mon, 20 Jul 2015 17:07:26 -0400 Subject: [PATCH 0059/1704] Add a workaroud for issue in libcuda.so library (cherry picked from commit open-mpi/ompi@7703c964960226b4010bb55b7d998ec1160bd63a) --- opal/mca/common/cuda/common_cuda.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/opal/mca/common/cuda/common_cuda.c b/opal/mca/common/cuda/common_cuda.c index 6a92378dbb7..5a7f16eede0 100644 --- a/opal/mca/common/cuda/common_cuda.c +++ b/opal/mca/common/cuda/common_cuda.c @@ -1749,6 +1749,9 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t void *attrdata[] = {(void *)&memType, (void *)&ctx, (void *)&isManaged}; res = cuFunc.cuPointerGetAttributes(3, attributes, attrdata, dbuf); + OPAL_OUTPUT_VERBOSE((101, mca_common_cuda_output, + "dbuf=%p, memType=%d, ctx=%p, isManaged=%d, res=%d", + (void *)dbuf, (int)memType, (void *)ctx, isManaged, res)); /* Mark unified memory buffers with a flag. This will allow all unified * memory to be forced through host buffers. Note that this memory can @@ -1822,6 +1825,26 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t } } + /* WORKAROUND - They are times when the above code determines a pice of memory + * is GPU memory, but it actually is not. That has been seen on multi-GPU systems + * with 6 or 8 GPUs on them. Therefore, we will do this extra check. Note if we + * made it this far, then the assumption at this point is we have GPU memory. + * Unfotunately, this extra call is costing us another 100 ns almost doubling + * the cost of this entire function. */ + { + CUdeviceptr pbase; + size_t psize; + res = cuFunc.cuMemGetAddressRange(&pbase, &psize, dbuf); + if (CUDA_SUCCESS != res) { + opal_output_verbose(5, mca_common_cuda_output, + "CUDA: cuMemGetAddressRange failed on this pointer: res=%d, buf=%p " + "Overriding check and setting to host pointer. ", + res, (void *)dbuf); + /* This cannot be GPU memory if the previous call failed */ + return 0; + } + } + /* First access on a device pointer finalizes CUDA support initialization. * If initialization fails, disable support. */ if (!stage_three_init_complete) { @@ -1829,6 +1852,7 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t opal_cuda_support = 0; } } + return 1; } From 5fab51368747c477f10e575077db2d44a57dde60 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 9 Jul 2015 16:22:47 -0600 Subject: [PATCH 0060/1704] More one sided java bindings. Bindings for the MPI_WIN_FLUSH_LOCAL, MPI_WIN_FLUSH_LOCAL_ALL, MPI_WIN_ALLOCATE, MPI_WIN_ALLOCATE_SHARED, and MPI_COMM_SPLIT_TYPE. Also added several necessary constants. Signed-off-by: Nathaniel Graham Conflicts: ompi/mpi/java/c/mpi_Win.c ompi/mpi/java/java/Comm.java ompi/mpi/java/java/Win.java --- ompi/mpi/java/c/mpi_Intracomm.c | 11 ++++ ompi/mpi/java/c/mpi_Win.c | 72 +++++++++++++++++++++++ ompi/mpi/java/java/Comm.java | 5 ++ ompi/mpi/java/java/Intracomm.java | 20 +++++++ ompi/mpi/java/java/Win.java | 95 ++++++++++++++++++++++++++++++- 5 files changed, 202 insertions(+), 1 deletion(-) diff --git a/ompi/mpi/java/c/mpi_Intracomm.c b/ompi/mpi/java/c/mpi_Intracomm.c index cb7bcbc0e7b..4544e38cba1 100644 --- a/ompi/mpi/java/c/mpi_Intracomm.c +++ b/ompi/mpi/java/c/mpi_Intracomm.c @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,6 +70,15 @@ JNIEXPORT jlong JNICALL Java_mpi_Intracomm_split( return (jlong)newcomm; } +JNIEXPORT jlong JNICALL Java_mpi_Intracomm_splitType( + JNIEnv *env, jobject jthis, jlong comm, jint splitType, jint key, jlong info) +{ + MPI_Comm newcomm; + int rc = MPI_Comm_split_type((MPI_Comm)comm, splitType, key, (MPI_Info)info, &newcomm); + ompi_java_exceptionCheck(env, rc); + return (jlong)newcomm; +} + JNIEXPORT jlong JNICALL Java_mpi_Intracomm_create( JNIEnv *env, jobject jthis, jlong comm, jlong group) { diff --git a/ompi/mpi/java/c/mpi_Win.c b/ompi/mpi/java/c/mpi_Win.c index c1492af51b7..21361f837d2 100644 --- a/ompi/mpi/java/c/mpi_Win.c +++ b/ompi/mpi/java/c/mpi_Win.c @@ -41,6 +41,66 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_createWin( return (jlong)win; } +JNIEXPORT jlong JNICALL Java_mpi_Win_allocateWin(JNIEnv *env, jobject jthis, + jint size, jint dispUnit, jlong info, jlong comm, jobject jBase) +{ + void *basePtr = (*env)->GetDirectBufferAddress(env, jBase); + MPI_Win win; + + int rc = MPI_Win_allocate((MPI_Aint)size, dispUnit, + (MPI_Info)info, (MPI_Comm)comm, basePtr, &win); + + ompi_java_exceptionCheck(env, rc); + return (jlong)win; +} + +JNIEXPORT jlong JNICALL Java_mpi_Win_allocateSharedWin(JNIEnv *env, jobject jthis, + jint size, jint dispUnit, jlong info, jlong comm, jobject jBase) +{ + void *basePtr = (*env)->GetDirectBufferAddress(env, jBase); + MPI_Win win; + + int rc = MPI_Win_allocate_shared((MPI_Aint)size, dispUnit, + (MPI_Info)info, (MPI_Comm)comm, basePtr, &win); + + ompi_java_exceptionCheck(env, rc); + return (jlong)win; +} + +JNIEXPORT jlong JNICALL Java_mpi_Win_createDynamicWin( + JNIEnv *env, jobject jthis, + jlong info, jlong comm) +{ + MPI_Win win; + + int rc = MPI_Win_create_dynamic( + (MPI_Info)info, (MPI_Comm)comm, &win); + + ompi_java_exceptionCheck(env, rc); + return (jlong)win; +} + +JNIEXPORT void JNICALL Java_mpi_Win_attach( + JNIEnv *env, jobject jthis, jlong win, jobject jBase, + jint size) +{ + void *base = (*env)->GetDirectBufferAddress(env, jBase); + + int rc = MPI_Win_attach((MPI_Win)win, base, (MPI_Aint)size); + + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_detach( + JNIEnv *env, jobject jthis, jlong win, jobject jBase) +{ + void *base = (*env)->GetDirectBufferAddress(env, jBase); + + int rc = MPI_Win_detach((MPI_Win)win, base); + + ompi_java_exceptionCheck(env, rc); +} + JNIEXPORT jlong JNICALL Java_mpi_Win_getGroup( JNIEnv *env, jobject jthis, jlong win) { @@ -396,3 +456,15 @@ JNIEXPORT void JNICALL Java_mpi_Win_fetchAndOp(JNIEnv *env, jobject jthis, jlong int rc = MPI_Fetch_and_op(orgPtr, resultPtr, dataType, targetRank, targetDisp, op, (MPI_Win)win); ompi_java_exceptionCheck(env, rc); } + +JNIEXPORT void JNICALL Java_mpi_Win_flushLocal(JNIEnv *env, jobject jthis, jlong win, jint targetRank) +{ + int rc = MPI_Win_flush_local(targetRank, (MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} + +JNIEXPORT void JNICALL Java_mpi_Win_flushLocalAll(JNIEnv *env, jobject jthis, jlong win) +{ + int rc = MPI_Win_flush_local_all((MPI_Win)win); + ompi_java_exceptionCheck(env, rc); +} diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 7417550fba1..0174da00fcf 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -9,6 +9,10 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -63,6 +67,7 @@ */ public class Comm implements Freeable { +public final static int TYPE_SHARED = 0; protected final static int SELF = 1; protected final static int WORLD = 2; protected long handle; diff --git a/ompi/mpi/java/java/Intracomm.java b/ompi/mpi/java/java/Intracomm.java index fb0b042730b..a1eb7347171 100644 --- a/ompi/mpi/java/java/Intracomm.java +++ b/ompi/mpi/java/java/Intracomm.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -139,6 +141,24 @@ public final Intracomm split(int colour, int key) throws MPIException private native long split(long comm, int colour, int key) throws MPIException; +/** + * Partition the group associated with this communicator and create + * a new communicator within each subgroup. + *

Java binding of the MPI operation {@code MPI_COMM_SPLIT_TYPE}. + * @param splitType type of processes to be grouped together + * @param key control of rank assignment + * @param info info argument + * @return new communicator + * @throws MPIException + */ +public final Intracomm splitType(int splitType, int key, Info info) throws MPIException +{ + MPI.check(); + return new Intracomm(splitType(handle, splitType, key, info.handle)); +} + +private native long splitType(long comm, int colour, int key, long info) throws MPIException; + /** * Create a new communicator. *

Java binding of the MPI operation {@code MPI_COMM_CREATE}. diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index fb777ef8ddd..fb1fda78654 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -26,6 +26,9 @@ public final class Win implements Freeable { private long handle; +public static final int WIN_NULL = 0; +public static final int FLAVOR_PRIVATE = 0; +public static final int FLAVOR_SHARED = 1; /** * Java binding of {@code MPI_WIN_CREATE}. @@ -65,6 +68,69 @@ private native long createWin( Buffer base, int size, int dispUnit, long info, long comm) throws MPIException; +/** + * Java binding of {@code MPI_WIN_ALLOCATE} and {@code MPI_WIN_ALLOCATE_SHARED}. + * @param size size of window (buffer elements) + * @param dispUnit local unit size for displacements (buffer elements) + * @param info info object + * @param comm communicator + * @param base initial address of window + * @param flavor FLAVOR_PRIVATE or FLAVOR_SHARED + * @throws MPIException + */ +public Win(int size, int dispUnit, Info info, Comm comm, Buffer base, int flavor) + throws MPIException +{ + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + int baseSize; + + if(base instanceof ByteBuffer) + baseSize = 1; + else if(base instanceof CharBuffer || base instanceof ShortBuffer) + baseSize = 2; + else if(base instanceof IntBuffer || base instanceof FloatBuffer) + baseSize = 4; + else if(base instanceof LongBuffer || base instanceof DoubleBuffer) + baseSize = 8; + else + throw new AssertionError(); + + int sizeBytes = size * baseSize, + dispBytes = dispUnit * baseSize; + + if(flavor == 0) { + handle = allocateWin(sizeBytes, dispBytes, info.handle, comm.handle, base); + } else if(flavor == 1) { + handle = allocateSharedWin(sizeBytes, dispBytes, info.handle, comm.handle, base); + } +} + +private native long allocateWin( + int size, int dispUnit, long info, long comm, Buffer base) + throws MPIException; + +private native long allocateSharedWin( + int size, int dispUnit, long info, long comm, Buffer base) + throws MPIException; + +/** + * Java binding of {@code MPI_WIN_CREATE_DYNAMIC}. + * @param info info object + * @param comm communicator + * @throws MPIException + */ +public Win(Info info, Comm comm) + throws MPIException +{ + handle = createDynamicWin(info.handle, comm.handle); +} + +private native long createDynamicWin( + long info, long comm) + throws MPIException; + private int getBaseType(Datatype orgType, Datatype targetType) { int baseType = orgType.baseType; @@ -718,11 +784,38 @@ public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, throw new IllegalArgumentException("The origin must be direct buffer."); fetchAndOp(handle, origin, resultAddr, dataType.handle, targetRank, - targetDisp, op, op.handle, getBaseType(dataType, dataType)); //neccessary? + targetDisp, op, op.handle, getBaseType(dataType, dataType)); } private native void fetchAndOp( long win, Buffer origin, Buffer resultAddr, long targetType, int targetRank, int targetDisp, Op jOp, long hOp, int baseType) throws MPIException; +/** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL}. + * @param targetRank rank of target window + * @throws MPIException + */ + +public void flushLocal(int targetRank) throws MPIException +{ + MPI.check(); + flushLocal(handle, targetRank); +} + +private native void flushLocal(long win, int targetRank) throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL_ALL}. + * @throws MPIException + */ + +public void flushLocalAll() throws MPIException +{ + MPI.check(); + flushLocalAll(handle); +} + +private native void flushLocalAll(long win) throws MPIException; + } // Win From c203e020f547396dc8632686773141f6d3957d2e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 23 Jul 2015 06:18:43 -0700 Subject: [PATCH 0061/1704] orte/test/system: fix compiler warnings Note that the opal_hotel test still doesn't compile; it looks like it needs to be updated to the new requirement to pass an event base. (cherry picked from commit open-mpi/ompi@60609cbb79a99d6a8ed946e07f699135aa0a2a8d) --- orte/test/system/binom.c | 2 +- orte/test/system/mapper.c | 1 + orte/test/system/opal-evpri-test.c | 4 ++-- orte/test/system/opal_interface.c | 2 +- orte/test/system/radix.c | 2 +- orte/test/system/regex.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/orte/test/system/binom.c b/orte/test/system/binom.c index 486d0563a15..e807a33ad22 100644 --- a/orte/test/system/binom.c +++ b/orte/test/system/binom.c @@ -30,7 +30,7 @@ static void construct(orte_routed_tree_t *rt) rt->vpid = ORTE_VPID_INVALID; OBJ_CONSTRUCT(&rt->relatives, opal_bitmap_t); } -static destruct(orte_routed_tree_t *rt) +static void destruct(orte_routed_tree_t *rt) { OBJ_DESTRUCT(&rt->relatives); } diff --git a/orte/test/system/mapper.c b/orte/test/system/mapper.c index f43422c16d3..ae92075649d 100644 --- a/orte/test/system/mapper.c +++ b/orte/test/system/mapper.c @@ -2,6 +2,7 @@ */ #include +#include #include "orte/constants.h" diff --git a/orte/test/system/opal-evpri-test.c b/orte/test/system/opal-evpri-test.c index 70fd2313de7..20dfce741f9 100644 --- a/orte/test/system/opal-evpri-test.c +++ b/orte/test/system/opal-evpri-test.c @@ -3,8 +3,8 @@ #include #include +#include "opal/runtime/opal.h" #include "opal/mca/event/event.h" - #include "orte/mca/state/state_types.h" #define SIGPRI 0 @@ -62,7 +62,7 @@ main(int argc, char **argv) opal_event_t ev1, ev2; orte_state_caddy_t *caddy; - opal_init(); + opal_init(&argc, &argv); /* assign some signal traps */ if (opal_event_signal_set(orte_event_base, &ev1, SIGTERM, cbfunc, &ev1) < 0) { diff --git a/orte/test/system/opal_interface.c b/orte/test/system/opal_interface.c index 27f67581173..df76264c46c 100644 --- a/orte/test/system/opal_interface.c +++ b/orte/test/system/opal_interface.c @@ -29,7 +29,7 @@ int main(int argc, char* argv[]) if (OPAL_SUCCESS != mca_base_framework_open(&opal_if_base_framework, 0)) { fprintf(stderr, "opal_interface: couldn't get interfaces\n"); - return; + return 1; } for (intf = (opal_if_t*)opal_list_get_first(&opal_if_list); diff --git a/orte/test/system/radix.c b/orte/test/system/radix.c index 68a2d22b7ca..a0a9c03dd99 100644 --- a/orte/test/system/radix.c +++ b/orte/test/system/radix.c @@ -70,7 +70,7 @@ int down_search(int me, int num_procs, } } -main(int argc, char **argv) +int main(int argc, char **argv) { opal_list_t children; opal_list_item_t *item; diff --git a/orte/test/system/regex.c b/orte/test/system/regex.c index cc0805d8f38..6985fcb7bb8 100644 --- a/orte/test/system/regex.c +++ b/orte/test/system/regex.c @@ -15,7 +15,7 @@ #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/runtime.h" -main(int argc, char **argv) +int main(int argc, char **argv) { int rc; char *regex, *save; From bb74ca3a863fcaa78a089f4b4c2ba9b69e2a81ce Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 23 Jul 2015 14:37:55 -0400 Subject: [PATCH 0062/1704] NEWS and README: various updates - Add the v1.10 NEWS bullets - Minor updates for PSM/PSM2, MPI extensions (cherry picked from commit open-mpi/ompi@3a5537486eb482d2da7c118c87ada7bb91f6e278) --- NEWS | 66 ++++++++++++++++++++++++++++++++++++++++++++++------------ README | 43 +++++++++++++++++++++++++------------- 2 files changed, 81 insertions(+), 28 deletions(-) diff --git a/NEWS b/NEWS index dc66c05f72b..af2ec4e6897 100644 --- a/NEWS +++ b/NEWS @@ -53,22 +53,62 @@ included in the vX.Y.Z section and be denoted as: (** also appeared: A.B.C) -- indicating that this item was previously included in release version vA.B.C. -Master (not on release branches yet) ------------------------------------- -- ompi_info parsable output now escapes double quotes in values, and - also quotes values can contains colons. Thanks to Lev Givon for the - suggestion. -- CUDA-aware support can now handle GPUs within a node that do not - support CUDA IPC. Earlier versions would get error and abort. -- Do not build the MPI C++ bindings by default. They must be enabled - via --enable-mpi-cxx. -- Remove embedded VampirTrace. It is in maintenance mode since 2013. - Please consider Score-P (score-p.org) as an external replacement. -- usNIC BTL updated to use libfabric. -- OFI MTL. +1.10.0 +------ +** NOTE: The v1.10.0 release marks the transition to Open MPI's new +** version numbering scheme. The v1.10.x release series is based on +** the v1.8.x series, but with a few new features. v2.x will be the +** next series after the v1.10.x series, and complete the transition +** to the new version numbering scheme. See README for more details. + +- Added libfabric support (see README for more details): + - usNIC BTL updated to use libfabric. + - Added OFI MTL (usable with PSM in libfabric v1.1.0). +- Added Intel Omni-Path support via new PSM2 MTL. +- Added "yalla" PML for faster MXM support. +- Added persistent distributed virtual machine (pDVM) support for fast + workflow executions. +- Fix typo in MPI_Scatter(3) man page. Thanks to Akshay Venkatesh for + noticing the mistake. +- Add rudimentary protection from TCP port scanners. +- Fix typo in Open MPI error handling. Thanks to Åke Sandgren for + pointing out the error. +- Increased the performance of the CM PML (i.e., the Portals, PSM, + PSM2, MXM, and OFI transports). +- Restored visibility of blocking send requests in message queue + debuggers (e.g., TotalView, DDT). +- Fixed obscure IPv6-related bug in the TCP BTL. +- Add support for the "no_locks" MPI_Info key for one-sided + functionality. +- Fixed ibv_fork support for verbs-based networks. +- Fixed a variety of small bugs in OpenSHMEM. +- Fixed MXM configure with additional CPPFLAGS and LDFLAGS. Thanks to + David Shrader for the patch. +- Fixed incorrect memalign threshhold in the openib BTL. Thanks to + Xavier Besseron for pointing out the issue. + + +1.8.7 +---- +** NOTE: v1.8.7 technically breaks ABI with prior versions +** in the 1.8 series because it repairs two incorrect API +** signatures. However, users will only need to recompile +** if they were using those functions - which they couldn't +** have been, because the signatures were wrong :-) + +- Plugged a memory leak that impacted blocking sends - Fixed incorrect declaration for MPI_T_pvar_get_index and added missing return code MPI_T_INVALID_NAME. +- Fixed an uninitialized variable in PMI2 support +- Added new vendor part id for Mellanox ConnectX4-LX +- Fixed NBC_Copy for legitimate zero-size messages +- Fixed MPI_Win_post and MPI_Win_start for zero-size messages +- Protect the OOB ports from segfaulting when accessed by port scanners +- Fixed several Fortran typos +- Fixed configure detection of XRC support +- Fixed support for highly heterogeneous systems to avoid + memory corruption when printing out the bindings 1.8.6 diff --git a/README b/README index ac8b57d9d2e..a4253c44973 100644 --- a/README +++ b/README @@ -604,16 +604,17 @@ Network Support - "cm" supports a smaller number of networks (and they cannot be used together), but may provide better overall MPI performance: - - InfiniPath PSM + - QLogic InfiniPath / Intel True Scale PSM + - Intel Omni-Path PSM2 - Mellanox MXM - Portals4 - - OpenFabrics Interfaces ("libfabric") + - OpenFabrics Interfaces ("libfabric" tag matching) - Open MPI will, by default, choose to use "cm" when the InfiniPath - PSM or the Mellanox MXM MTL can be used. Otherwise, "ob1" will be - used and the corresponding BTLs will be selected. Users can force - the use of ob1 or cm if desired by setting the "pml" MCA parameter - at run-time: + Open MPI will, by default, choose to use "cm" when one of the + above transports can be used. Otherwise, "ob1" will be used and + the corresponding BTLs will be selected. Users can force the use + of ob1 or cm if desired by setting the "pml" MCA parameter at + run-time: shell$ mpirun --mca pml ob1 ... or @@ -855,7 +856,7 @@ NETWORKING SUPPORT / OPTIONS compiler/linker search paths. Libfabric is the support library for OpenFabrics Interfaces-based - network adapters, such as Cisco usNIC, Intel Omniscale PSM, etc. + network adapters, such as Cisco usNIC, Intel True Scale PSM, etc. --with-libfabric-libdir= Look in directory for the libfabric libraries. By default, Open MPI @@ -896,9 +897,9 @@ NETWORKING SUPPORT / OPTIONS Set configuration values for Portals 4 --with-psm= - Specify the directory where the InfiniPath PSM library and - header files are located. This option is generally only necessary - if the InfiniPath headers and libraries are not in default + Specify the directory where the QLogic InfiniPath / Intel True Scale + PSM library and header files are located. This option is generally + only necessary if the PSM headers and libraries are not in default compiler/linker search paths. PSM is the support library for QLogic InfiniPath and Intel TrueScale @@ -909,6 +910,20 @@ NETWORKING SUPPORT / OPTIONS look in /lib and /lib64, which covers most cases. This option is only needed for special configurations. +--with-psm2= + Specify the directory where the Intel Omni-Path PSM2 library and + header files are located. This option is generally only necessary + if the PSM2 headers and libraries are not in default compiler/linker + search paths. + + PSM is the support library for Intel Omni-Path network adapters. + +--with-psm2-libdir= + Look in directory for the PSM2 libraries. By default, Open MPI will + look in /lib and /lib64, which + covers most cases. This option is only needed for special + configurations. + --with-scif=

Look in directory for Intel SCIF support libraries @@ -1625,10 +1640,8 @@ MPI implementations! Compiling the extensions ------------------------ -Open MPI extensions are not enabled by default; they must be enabled -by Open MPI's configure script. The --enable-mpi-ext command line -switch accepts a comma-delimited list of extensions to enable, or, if -it is specified without a list, all extensions are enabled. +Open MPI extensions are all enabled by default; they can be disabled +via the --disable-mpi-ext command line switch. Since extensions are meant to be used by advanced users only, this file does not document which extensions are available or what they From 71c472ebb37679159f60d7881573b23c1735893b Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Thu, 23 Jul 2015 15:38:44 -0400 Subject: [PATCH 0063/1704] Update extensions section to include cuda (cherry picked from commit ompi-mpi/ompi@d184f260adddf9fab307adc94f2c8e08853485cf) --- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index a4253c44973..4707eaa1863 100644 --- a/README +++ b/README @@ -709,6 +709,9 @@ Open MPI Extensions - cr: Provides routines to access to checkpoint restart routines. See ompi/mpiext/cr/mpiext_cr_c.h for a listing of availble functions. + - cuda: When the library is compiled with CUDA-aware support, it provides + two things. First, a macro MPIX_CUDA_AWARE_SUPPORT. Secondly, the + function MPIX_Query_cuda_support that can be used to query for support. - example: A non-functional extension; its only purpose is to provide an example for how to create other extensions. From 3b7d9383fb7d55744e8f62af7c453ee6dbe8dfe3 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 24 Jul 2015 07:34:59 -0700 Subject: [PATCH 0064/1704] Update the orte/system/opal_hotel test (cherry picked from commit open-mpi/ompi@93f7a51275821bf9dee8868b3d9a05df948775ae) --- orte/test/system/opal_hotel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orte/test/system/opal_hotel.c b/orte/test/system/opal_hotel.c index 4347b5a0904..e78c5753225 100644 --- a/orte/test/system/opal_hotel.c +++ b/orte/test/system/opal_hotel.c @@ -47,7 +47,8 @@ int main(int argc, char* argv[]) } OBJ_CONSTRUCT(&hotel, opal_hotel_t); - opal_hotel_init(&hotel, NUM_RMS, 3000000, OPAL_EV_SYS_HI_PRI, evict_cbfunc); + opal_hotel_init(&hotel, NUM_RMS, opal_sync_event_base, + 3000000, OPAL_EV_SYS_HI_PRI, evict_cbfunc); /* prep the occupants */ for (i=0; i < NUM_OCC; i++) { From 800239168ce6084f810f281d1ff93e2bca7aff0b Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 23 Jul 2015 15:00:53 -0700 Subject: [PATCH 0065/1704] plm/alps: fix orted based launch failures. Turns out that when one builds Open MPI with --disable-dlopen for Cray, a whole bunch of cray specific libraries get linked in to the orted executable. One of these is Cray PMI. The Cray PMI has a ctor which, if run, causes job launches using mpirun to fail. This commit suppresses the running of the ctor and thus prevents failure to launch. Signed-off-by: Howard Pritchard --- orte/mca/plm/alps/plm_alps_module.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/orte/mca/plm/alps/plm_alps_module.c b/orte/mca/plm/alps/plm_alps_module.c index 15b67884550..d1b7c77f4ab 100644 --- a/orte/mca/plm/alps/plm_alps_module.c +++ b/orte/mca/plm/alps/plm_alps_module.c @@ -292,6 +292,17 @@ static void launch_daemons(int fd, short args, void *cbdata) opal_argv_append(&argc, &argv, "1"); opal_argv_append(&argc, &argv, "-cc"); opal_argv_append(&argc, &argv, "none"); + /* + * stuff below is necessary in the event that we've sadly configured Open MPI with --disable-dlopen, + * which results in the orted's being linked against all kinds of unnecessary cray libraries, including + * the cray pmi, which has a ctor that cause bad things if run when using mpirun/orted based launch. + * + * Code below adds env. variables for aprun to forward which suppresses the action of the Cray PMI ctor. + */ + opal_argv_append(&argc, &argv, "-e"); + opal_argv_append(&argc, &argv, "PMI_NO_PREINITIALIZE=1"); + opal_argv_append(&argc, &argv, "-e"); + opal_argv_append(&argc, &argv, "PMI_NO_FORK=1"); /* create nodelist */ nodelist_argv = NULL; From c2308c87626bfbf74de7d0c0cec30a3df4ea947d Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 25 Jul 2015 08:01:36 -0400 Subject: [PATCH 0066/1704] get_library_version: always use "X.Y.Z" version number format Fix one last place where we would write only "X.Y" if Z was 0 (we now always write all three X, Y, Z values, even if Z is zero). (cherry picked from commit open-mpi/ompi@5e159feb5a29add909a14fd5892cb8cf2004e235) --- ompi/mpi/c/get_library_version.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ompi/mpi/c/get_library_version.c b/ompi/mpi/c/get_library_version.c index 9bf5decc556..ec276c86845 100644 --- a/ompi/mpi/c/get_library_version.c +++ b/ompi/mpi/c/get_library_version.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -74,16 +74,11 @@ int MPI_Get_library_version(char *version, int *resultlen) len_left = sizeof(tmp); memset(tmp, 0, MPI_MAX_LIBRARY_VERSION_STRING); - snprintf(tmp, MPI_MAX_LIBRARY_VERSION_STRING, "Open MPI v%d.%d", - OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION); + snprintf(tmp, MPI_MAX_LIBRARY_VERSION_STRING, "Open MPI v%d.%d.%d", + OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, OMPI_RELEASE_VERSION); ptr += strlen(tmp); len_left -= strlen(tmp); - if (OMPI_RELEASE_VERSION > 0) { - snprintf(ptr, len_left, ".%d", OMPI_RELEASE_VERSION); - ptr = tmp + strlen(tmp); - len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp); - } if (NULL != OMPI_GREEK_VERSION && strlen(OMPI_GREEK_VERSION) > 0) { snprintf(ptr, len_left, "%s", OMPI_GREEK_VERSION); ptr = tmp + strlen(tmp); From d736faa49b750d562f6ac0ed61a9bb5e916c0b15 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 27 Jul 2015 12:04:53 -0500 Subject: [PATCH 0067/1704] Merge pull request #745 from edgargabriel/pr/sharedfp-sm-logic3 --- ompi/mca/sharedfp/sm/configure.m4 | 38 ++++++ ompi/mca/sharedfp/sm/sharedfp_sm.c | 16 +-- ompi/mca/sharedfp/sm/sharedfp_sm.h | 13 +- ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c | 111 +++++++++--------- .../sharedfp/sm/sharedfp_sm_get_position.c | 2 +- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 26 ++-- ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c | 34 +++--- ompi/mca/sharedfp/sm/sharedfp_sm_read.c | 62 +++++----- .../sm/sharedfp_sm_request_position.c | 23 ++-- ompi/mca/sharedfp/sm/sharedfp_sm_seek.c | 71 +++++------ ompi/mca/sharedfp/sm/sharedfp_sm_write.c | 66 +++++------ 11 files changed, 242 insertions(+), 220 deletions(-) create mode 100644 ompi/mca/sharedfp/sm/configure.m4 diff --git a/ompi/mca/sharedfp/sm/configure.m4 b/ompi/mca/sharedfp/sm/configure.m4 new file mode 100644 index 00000000000..2ec2cd54995 --- /dev/null +++ b/ompi/mca/sharedfp/sm/configure.m4 @@ -0,0 +1,38 @@ +# -*- 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-2012 The Regents of the University of California. +# All rights reserved. +# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2008-2015 University of Houston. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_sharedfp_sm_CONFIG(action-if-can-compile, +# [action-if-cant-compile]) +# ------------------------------------------------ +AC_DEFUN([MCA_ompi_sharedfp_sm_CONFIG],[ + AC_CONFIG_FILES([ompi/mca/sharedfp/sm/Makefile]) + + sharedfp_sm_happy=no + AC_CHECK_HEADER([semaphore.h], + [AC_CHECK_FUNCS([sem_open],[sharedfp_sm_happy=yes],[])]) + + AC_CHECK_HEADER([semaphore.h], + [AC_CHECK_FUNCS([sem_init],[sharedfp_sm_happy=yes],[])]) + + AS_IF([test "$sharedfp_sm_happy" = "yes"], + [$1], + [$2]) +])dnl diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm.c b/ompi/mca/sharedfp/sm/sharedfp_sm.c index bef74b72329..6aa8f1c4553 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm.c @@ -83,14 +83,14 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(m ompi_group_t *group = comm->c_local_group; for (i = 0; i < size; ++i) { - proc = ompi_group_peer_lookup(group,i); - if (!OPAL_PROC_ON_LOCAL_NODE(proc->super.proc_flags)){ - opal_output(ompi_sharedfp_base_framework.framework_output, - "mca_sharedfp_sm_component_file_query: Disqualifying myself: (%d/%s) " - "not all processes are on the same node.", - comm->c_contextid, comm->c_name); - return NULL; - } + proc = ompi_group_peer_lookup(group,i); + if (!OPAL_PROC_ON_LOCAL_NODE(proc->super.proc_flags)){ + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_component_file_query: Disqualifying myself: (%d/%s) " + "not all processes are on the same node.", + comm->c_contextid, comm->c_name); + return NULL; + } } /* This module can run */ *priority = mca_sharedfp_sm_priority; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm.h b/ompi/mca/sharedfp/sm/sharedfp_sm.h index b308c0e33e0..c71942411be 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm.h +++ b/ompi/mca/sharedfp/sm/sharedfp_sm.h @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -100,9 +101,8 @@ int mca_sharedfp_sm_iwrite (mca_io_ompio_file_t *fh, /*--------------------------------------------------------------* *Structures and definitions only for this component *--------------------------------------------------------------*/ - -struct sm_offset{ - sem_t *mutex; /* the mutex: a Posix memory-based unnamed semaphore */ +struct mca_sharedfp_sm_offset{ + sem_t mutex; /* the mutex: a POSIX memory-based unnamed semaphore */ long long offset; /* and the shared file pointer offset */ }; @@ -111,10 +111,13 @@ struct sm_offset{ */ struct mca_sharedfp_sm_data { - struct sm_offset * sm_offset_ptr; + struct mca_sharedfp_sm_offset * sm_offset_ptr; /*save filename so that we can remove the file on close*/ char * sm_filename; - sem_t *mutex; /* the mutex: a Posix memory-based named semaphore */ + /* The mutex: it will either point to a POSIX memory-based named + semaphore, or it will point to the a POSIX memory-based unnamed + semaphore located in sm_offset_ptr->mutex. */ + sem_t *mutex; char *sem_name; /* Name of the semaphore */ }; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c index d6c15a92ad4..3b38c0a9fb5 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c @@ -13,6 +13,7 @@ * Copyright (c) 2013 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -54,8 +55,8 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, mca_io_ompio_file_t * shfileHandle; char * filename_basename; char * sm_filename; - struct sm_offset * sm_offset_ptr; - struct sm_offset sm_offset; + struct mca_sharedfp_sm_offset * sm_offset_ptr; + struct mca_sharedfp_sm_offset sm_offset; int sm_fd; int rank; @@ -71,27 +72,27 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /*Memory is allocated here for the sh structure*/ if ( mca_sharedfp_sm_verbose ) { - printf( "mca_sharedfp_sm_file_open: malloc f_sharedfp_ptr struct\n"); + printf( "mca_sharedfp_sm_file_open: malloc f_sharedfp_ptr struct\n"); } sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t)); if ( NULL == sh ) { - opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to malloc f_sharedfp_ptr struct\n"); - free(shfileHandle); - return OMPI_ERR_OUT_OF_RESOURCE; + opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to malloc f_sharedfp_ptr struct\n"); + free(shfileHandle); + return OMPI_ERR_OUT_OF_RESOURCE; } /*Populate the sh file structure based on the implementation*/ - sh->sharedfh = shfileHandle; /* Shared file pointer*/ - sh->global_offset = 0; /* Global Offset*/ - sh->comm = comm; /* Communicator*/ + sh->sharedfh = shfileHandle; /* Shared file pointer*/ + sh->global_offset = 0; /* Global Offset*/ + sh->comm = comm; /* Communicator*/ sh->selected_module_data = NULL; rank = ompi_comm_rank ( sh->comm ); /*Open a shared memory segment which will hold the shared file pointer*/ if ( mca_sharedfp_sm_verbose ) { - printf( "mca_sharedfp_sm_file_open: allocatge shared memory segment.\n"); + printf( "mca_sharedfp_sm_file_open: allocatge shared memory segment.\n"); } @@ -135,26 +136,25 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, return OMPI_ERROR; } - free(sm_filename); sm_data->sm_filename = sm_filename; /*TODO: is it necessary to write to the file first?*/ if( 0 == rank ){ - memset ( &sm_offset, 0, sizeof (struct sm_offset )); - write ( sm_fd, &sm_offset, sizeof(struct sm_offset)); + memset ( &sm_offset, 0, sizeof (struct mca_sharedfp_sm_offset )); + write ( sm_fd, &sm_offset, sizeof(struct mca_sharedfp_sm_offset)); } comm->c_coll.coll_barrier (comm, comm->c_coll.coll_barrier_module ); /*the file has been written to, now we can map*/ - sm_offset_ptr = mmap(NULL, sizeof(struct sm_offset), PROT_READ | PROT_WRITE, - MAP_SHARED, sm_fd, 0); - + sm_offset_ptr = mmap(NULL, sizeof(struct mca_sharedfp_sm_offset), PROT_READ | PROT_WRITE, + MAP_SHARED, sm_fd, 0); + close(sm_fd); if ( sm_offset_ptr==MAP_FAILED){ - err = OMPI_ERROR; - printf("mca_sharedfp_sm_file_open: Error, unable to mmap file: %s\n",sm_filename); - printf("%s\n", strerror(errno)); + err = OMPI_ERROR; + printf("mca_sharedfp_sm_file_open: Error, unable to mmap file: %s\n",sm_filename); + printf("%s\n", strerror(errno)); free(sm_filename); free(sm_data); free(sh); @@ -165,43 +165,38 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /* Initialize semaphore so that is shared between processes. */ /* the semaphore is shared by keeping it in the shared memory segment */ -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - if(sem_init(&sm_offset_ptr->mutex, 1, 1) != -1){ -#else +#if defined(HAVE_SEM_OPEN) sm_data->sem_name = (char*) malloc( sizeof(char) * (strlen(filename_basename)+32) ); sprintf(sm_data->sem_name,"OMPIO_sharedfp_sem_%s",filename_basename); if( (sm_data->mutex = sem_open(sm_data->sem_name, O_CREAT, 0644, 1)) != SEM_FAILED ) { +#elif defined(HAVE_SEM_INIT) + sm_data->mutex = &sm_offset_ptr->mutex; + if(sem_init(&sm_offset_ptr->mutex, 1, 1) != -1){ #endif - /*If opening was successful*/ - /*Store the new file handle*/ - sm_data->sm_offset_ptr = sm_offset_ptr; - /* Assign the sm_data to sh->selected_module_data*/ - sh->selected_module_data = sm_data; - /*remember the shared file handle*/ - fh->f_sharedfp_data = sh; - - /*write initial zero*/ - if(rank==0){ - MPI_Offset position=0; - -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - sem_wait(sm_offset_ptr->mutex); - sm_offset_ptr->offset=position; - sem_post(sm_offset_ptr->mutex); -#else - sem_wait(sm_data->mutex); - sm_offset_ptr->offset=position; - sem_post(sm_data->mutex); -#endif - } + /*If opening was successful*/ + /*Store the new file handle*/ + sm_data->sm_offset_ptr = sm_offset_ptr; + /* Assign the sm_data to sh->selected_module_data*/ + sh->selected_module_data = sm_data; + /*remember the shared file handle*/ + fh->f_sharedfp_data = sh; + + /*write initial zero*/ + if(rank==0){ + MPI_Offset position=0; + + sem_wait(sm_data->mutex); + sm_offset_ptr->offset=position; + sem_post(sm_data->mutex); + } }else{ free(sm_filename); - free(sm_data); - free(sh); - free(shfileHandle); - munmap(sm_offset_ptr, sizeof(struct sm_offset)); - err = OMPI_ERROR; + free(sm_data); + free(sh); + free(shfileHandle); + munmap(sm_offset_ptr, sizeof(struct mca_sharedfp_sm_offset)); + err = OMPI_ERROR; } comm->c_coll.coll_barrier (comm, comm->c_coll.coll_barrier_module ); @@ -218,9 +213,9 @@ int mca_sharedfp_sm_file_close (mca_io_ompio_file_t *fh) struct mca_sharedfp_sm_data * file_data=NULL; if( NULL == fh->f_sharedfp_data ){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_file_close: shared file pointer structure not initialized\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_file_close: shared file pointer structure not initialized\n"); + } return OMPI_SUCCESS; } sh = fh->f_sharedfp_data; @@ -236,14 +231,14 @@ int mca_sharedfp_sm_file_close (mca_io_ompio_file_t *fh) /*Close sm handle*/ if (file_data->sm_offset_ptr) { /* destroy semaphore */ -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - sem_destroy(file_data->sm_offset_ptr->mutex); -#else - sem_unlink (file_data->sem_name); - free (file_data->sem_name); +#if defined(HAVE_SEM_OPEN) + sem_unlink (file_data->sem_name); + free (file_data->sem_name); +#elif defined(HAVE_SEM_INIT) + sem_destroy(&file_data->sm_offset_ptr->mutex); #endif /*Release the shared memory segment.*/ - munmap(file_data->sm_offset_ptr,sizeof(struct sm_offset)); + munmap(file_data->sm_offset_ptr,sizeof(struct mca_sharedfp_sm_offset)); /*Q: Do we need to delete the file? */ remove(file_data->sm_filename); } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c b/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c index 0ff66c5d5ff..35e8b609bae 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c @@ -37,7 +37,7 @@ mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ opal_output(ompi_sharedfp_base_framework.framework_output, - "sharedfp_sm_write - opening the shared file pointer\n"); + "sharedfp_sm_write - opening the shared file pointer\n"); shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index 9d04a4e5fdc..a6066093357 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -26,10 +26,10 @@ #include "ompi/mca/sharedfp/sharedfp.h" int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, - void *buf, - int count, - ompi_datatype_t *datatype, - MPI_Request * request) + void *buf, + int count, + ompi_datatype_t *datatype, + MPI_Request * request) { int ret = OMPI_SUCCESS; OMPI_MPI_OFFSET_TYPE offset = 0; @@ -39,9 +39,9 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, mca_sharedfp_base_module_t * shared_fp_base_module = NULL; if( NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iread: opening the shared file pointer\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_iread: opening the shared file pointer\n"); + } shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, @@ -63,15 +63,15 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iread: Bytes Requested is %ld\n",bytesRequested); + printf("sharedfp_sm_iread: Bytes Requested is %ld\n",bytesRequested); } /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iread: Offset received is %lld\n",offset); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_iread: Offset received is %lld\n",offset); + } /* Read the file */ ret = ompio_io_ompio_file_iread_at(sh->sharedfh,offset,buf,count,datatype,request); } @@ -90,8 +90,8 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, int mca_sharedfp_sm_read_ordered_end(mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) + void *buf, + ompi_status_public_t *status) { opal_output(0,"mca_sharedfp_sm_read_ordered_end: NOT IMPLEMENTED\n"); return OMPI_ERROR; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c index 81eae8b8610..92d060afe1d 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c @@ -39,20 +39,20 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, mca_sharedfp_base_module_t * shared_fp_base_module = NULL; if( NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iwrite - opening the shared file pointer\n"); - } - shared_fp_base_module = fh->f_sharedfp; + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_iwrite - opening the shared file pointer\n"); + } + shared_fp_base_module = fh->f_sharedfp; - ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, - fh->f_filename, - fh->f_amode, - fh->f_info, - fh); - if ( OMPI_SUCCESS != ret ) { - opal_output(0,"sharedfp_sm_iwrite - error opening the shared file pointer\n"); - return ret; - } + ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, + fh->f_filename, + fh->f_amode, + fh->f_info, + fh); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_sm_iwrite - error opening the shared file pointer\n"); + return ret; + } } /* Calculate the number of bytes to write */ @@ -63,15 +63,15 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iwrite: Bytes Requested is %ld\n",bytesRequested); + printf("sharedfp_sm_iwrite: Bytes Requested is %ld\n",bytesRequested); } /* Request the offset to write bytesRequested bytes */ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iwrite: Offset received is %lld\n",offset); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_iwrite: Offset received is %lld\n",offset); + } /* Write to the file */ ret = ompio_io_ompio_file_iwrite_at(sh->sharedfh,offset,buf,count,datatype,request); } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c index 04cc34e69e9..5b02d81b018 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c @@ -36,9 +36,9 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, mca_sharedfp_base_module_t * shared_fp_base_module = NULL; if( NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read - opening the shared file pointer\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_read - opening the shared file pointer\n"); + } shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, @@ -60,16 +60,16 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read: Bytes Requested is %ld\n",bytesRequested); + printf("sharedfp_sm_read: Bytes Requested is %ld\n",bytesRequested); } /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read: Offset received is %lld\n",offset); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_read: Offset received is %lld\n",offset); + } /* Read the file */ ret = ompio_io_ompio_file_read_at(sh->sharedfh,offset,buf,count,datatype,status); @@ -98,9 +98,9 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, mca_sharedfp_base_module_t * shared_fp_base_module = NULL; if ( NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read_ordered: opening the shared file pointer\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_read_ordered: opening the shared file pointer\n"); + } shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, @@ -132,10 +132,10 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, } ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, - buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, - sh->comm, sh->comm->c_coll.coll_gather_module ); + buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_gather_module ); if( OMPI_SUCCESS != ret){ - goto exit; + goto exit; } /* All the counts are present now in the recvBuff. @@ -143,25 +143,25 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, */ if ( 0 == rank ) { for (i = 0; i < size ; i ++) { - bytesRequested += buff[i]; - if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered: Bytes requested are %ld\n",bytesRequested); - } + bytesRequested += buff[i]; + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_read_ordered: Bytes requested are %ld\n",bytesRequested); + } } /* Request the offset to read bytesRequested bytes - ** only the root process needs to do the request, - ** since the root process will then tell the other - ** processes at what offset they should read their - ** share of the data. - */ + ** only the root process needs to do the request, + ** since the root process will then tell the other + ** processes at what offset they should read their + ** share of the data. + */ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offsetReceived); if( OMPI_SUCCESS != ret){ - goto exit; + goto exit; + } + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_read_ordered: Offset received is %lld\n",offsetReceived); } - if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered: Offset received is %lld\n",offsetReceived); - } buff[0] += offsetReceived; for (i = 1 ; i < size; i++) { @@ -171,16 +171,16 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, /* Scatter the results to the other processes*/ ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, - &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, - sh->comm, sh->comm->c_coll.coll_scatter_module ); + &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); if( OMPI_SUCCESS != ret){ - goto exit; + goto exit; } /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered: Offset returned is %lld\n",offset); + printf("mca_sharedfp_sm_read_ordered: Offset returned is %lld\n",offset); } /* read to the file */ @@ -188,7 +188,7 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, exit: if ( NULL != buff ) { - free ( buff ); + free ( buff ); } return ret; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c b/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c index 6414c792097..68c291b83e3 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2015 University of Houston. All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,51 +37,43 @@ int mca_sharedfp_sm_request_position(struct mca_sharedfp_base_data_t * sh, OMPI_MPI_OFFSET_TYPE position = 0; OMPI_MPI_OFFSET_TYPE old_offset; struct mca_sharedfp_sm_data * sm_data = sh->selected_module_data; - struct sm_offset * sm_offset_ptr = NULL; + struct mca_sharedfp_sm_offset * sm_offset_ptr = NULL; int rank = ompi_comm_rank ( sh->comm); *offset = 0; if ( mca_sharedfp_sm_verbose ) { - printf("Aquiring lock, rank=%d...",rank); + printf("Aquiring lock, rank=%d...",rank); } sm_offset_ptr = sm_data->sm_offset_ptr; /* Aquire an exclusive lock */ -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - sem_wait(sm_offset_ptr->mutex); -#else sem_wait(sm_data->mutex); -#endif if ( mca_sharedfp_sm_verbose ) { - printf("Succeeded! Acquired sm lock.for rank=%d\n",rank); + printf("Succeeded! Acquired sm lock.for rank=%d\n",rank); } old_offset=sm_offset_ptr->offset; if ( mca_sharedfp_sm_verbose ) { - printf("Read last_offset=%lld!\n",old_offset); + printf("Read last_offset=%lld!\n",old_offset); } position = old_offset + bytes_requested; if ( mca_sharedfp_sm_verbose ) { - printf("old_offset=%lld, bytes_requested=%d, new offset=%lld!\n",old_offset,bytes_requested,position); + printf("old_offset=%lld, bytes_requested=%d, new offset=%lld!\n",old_offset,bytes_requested,position); } sm_offset_ptr->offset=position; if ( mca_sharedfp_sm_verbose ) { - printf("Releasing sm lock...rank=%d",rank); + printf("Releasing sm lock...rank=%d",rank); } -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - sem_post(sm_offset_ptr->mutex); -#else sem_post(sm_data->mutex); -#endif if ( mca_sharedfp_sm_verbose ) { - printf("Released lock! released lock.for rank=%d\n",rank); + printf("Released lock! released lock.for rank=%d\n",rank); } *offset = old_offset; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c b/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c index a3d475101ab..37cf453c30f 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2015 University of Houston. All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,12 +39,12 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, struct mca_sharedfp_base_data_t *sh = NULL; mca_sharedfp_base_module_t * shared_fp_base_module = NULL; struct mca_sharedfp_sm_data * sm_data = NULL; - struct sm_offset * sm_offset_ptr = NULL; + struct mca_sharedfp_sm_offset * sm_offset_ptr = NULL; if( NULL == fh->f_sharedfp_data ) { - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: opening the shared file pointer\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: opening the shared file pointer\n"); + } shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, @@ -67,40 +68,40 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, opal_output(0,"sharedfp_sm_seek - MPI_SEEK_SET, offset must be > 0, got offset=%lld.\n",offset); ret = -1; } - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_SET new_offset=%lld\n",offset); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: MPI_SEEK_SET new_offset=%lld\n",offset); + } } - else if( MPI_SEEK_CUR == whence){ + else if( MPI_SEEK_CUR == whence){ OMPI_MPI_OFFSET_TYPE current_position; ret = mca_sharedfp_sm_get_position ( fh, ¤t_position); - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_CUR: curr=%lld, offset=%lld, call status=%d\n", - current_position,offset,status); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: MPI_SEEK_CUR: curr=%lld, offset=%lld, call status=%d\n", + current_position,offset,status); + } offset = current_position + offset; - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_CUR: new_offset=%lld\n",offset); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: MPI_SEEK_CUR: new_offset=%lld\n",offset); + } if(offset < 0){ opal_output(0,"sharedfp_sm_seek - MPI_SEEK_CURE, offset must be > 0, got offset=%lld.\n",offset); ret = -1; } } - else if( MPI_SEEK_END == whence){ + else if( MPI_SEEK_END == whence){ end_position=0; ompio_io_ompio_file_get_size(sh->sharedfh,&end_position); offset = end_position + offset; - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_END: file_get_size=%lld\n",end_position); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: MPI_SEEK_END: file_get_size=%lld\n",end_position); + } if(offset < 0){ opal_output(0,"sharedfp_sm_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset); ret = -1; } } - else { + else { opal_output(0,"sharedfp_sm_seek - whence=%i is not supported\n",whence); ret = -1; } @@ -114,31 +115,23 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, /*-------------------*/ /*lock the file */ /*--------------------*/ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: Aquiring lock, rank=%d...",rank); fflush(stdout); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: Aquiring lock, rank=%d...",rank); fflush(stdout); + } /* Aquire an exclusive lock */ sm_offset_ptr = sm_data->sm_offset_ptr; -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - sem_wait(sm_offset_ptr->mutex); -#else - sem_wait(sm_data->mutex); -#endif + sem_wait(sm_data->mutex); - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: Success! Acquired sm lock.for rank=%d\n",rank); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: Success! Acquired sm lock.for rank=%d\n",rank); + } sm_offset_ptr->offset=offset; - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: Releasing sm lock...rank=%d",rank); fflush(stdout); - } -#ifdef OMPIO_SHAREDFP_USE_UNNAMED_SEMAPHORES - sem_post(sm_offset_ptr->mutex); -#else - sem_post(sm_data->mutex); -#endif + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_seek: Releasing sm lock...rank=%d",rank); fflush(stdout); + } + sem_post(sm_data->mutex); } /* since we are only letting process 0, update the current pointer diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c index 15cd325a0e8..68b61eeac2e 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c @@ -39,9 +39,9 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, mca_sharedfp_base_module_t * shared_fp_base_module = NULL; if( NULL == fh->f_sharedfp_data ){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write: opening the shared file pointer\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_write: opening the shared file pointer\n"); + } shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, @@ -63,15 +63,15 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write: Requested is %ld\n",bytesRequested); + printf("sharedfp_sm_write: Requested is %ld\n",bytesRequested); } /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write: fset received is %lld\n",offset); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_write: fset received is %lld\n",offset); + } /* Write to the file*/ ret = ompio_io_ompio_file_write_at(sh->sharedfh,offset,buf,count,datatype,status); @@ -102,9 +102,9 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, mca_sharedfp_base_module_t * shared_fp_base_module = NULL; if( NULL == fh->f_sharedfp_data){ - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: opening the shared file pointer\n"); - } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_write_ordered: opening the shared file pointer\n"); + } shared_fp_base_module = fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, @@ -136,11 +136,11 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, return OMPI_ERR_OUT_OF_RESOURCE; } - ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, - buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, - sh->comm, sh->comm->c_coll.coll_gather_module ); + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, + buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_gather_module ); if ( OMPI_SUCCESS != ret ) { - goto exit; + goto exit; } /* All the counts are present now in the recvBuff. @@ -148,25 +148,25 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, */ if ( 0 == rank ) { for (i = 0; i < size ; i ++) { - bytesRequested += buff[i]; - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: Bytes requested are %ld\n",bytesRequested); - } - } + bytesRequested += buff[i]; + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_write_ordered: Bytes requested are %ld\n",bytesRequested); + } + } /* Request the offset to write bytesRequested bytes - ** only the root process needs to do the request, - ** since the root process will then tell the other - ** processes at what offset they should write their - ** share of the data. - */ + ** only the root process needs to do the request, + ** since the root process will then tell the other + ** processes at what offset they should write their + ** share of the data. + */ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offsetReceived); if( OMPI_SUCCESS != ret){ - goto exit; + goto exit; + } + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_write_ordered: Offset received is %lld\n",offsetReceived); } - if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: Offset received is %lld\n",offsetReceived); - } buff[0] += offsetReceived; for (i = 1 ; i < size; i++) { @@ -176,25 +176,25 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, /* Scatter the results to the other processes*/ ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, - &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, - sh->comm, sh->comm->c_coll.coll_scatter_module ); + &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); if ( OMPI_SUCCESS != ret ) { - goto exit; + goto exit; } /* Each process now has its own individual offset */ offset = offsetBuff - sendBuff; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: Offset returned is %lld\n",offset); + printf("sharedfp_sm_write_ordered: Offset returned is %lld\n",offset); } /* write to the file */ ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset,buf,count,datatype,status); exit: if ( NULL != buff ) { - free ( buff ); + free ( buff ); } return ret; From 856fa93cd6e3becf8f7ac765cfd688d6dbb03c09 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 20 Jul 2015 10:01:30 -0500 Subject: [PATCH 0068/1704] fix the delete selection logic in io/base. With the previous version, there was a mismatch in the version number and no component was selected for file_delete. --- ompi/mca/io/base/io_base_delete.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mca/io/base/io_base_delete.c b/ompi/mca/io/base/io_base_delete.c index d1609237d4e..4b326f5cfbb 100644 --- a/ompi/mca/io/base/io_base_delete.c +++ b/ompi/mca/io/base/io_base_delete.c @@ -286,9 +286,9 @@ static avail_io_t *query(const mca_base_component_t *component, /* io v2.0.0 */ - if (2 == component->mca_major_version && - 0 == component->mca_minor_version && - 0 == component->mca_release_version) { + if (MCA_BASE_VERSION_MAJOR == component->mca_major_version && + MCA_BASE_VERSION_MINOR == component->mca_minor_version && + MCA_BASE_VERSION_RELEASE == component->mca_release_version) { ioc_200 = (mca_io_base_component_2_0_0_t *) component; return query_2_0_0(ioc_200, filename, info); From 9636bedc6723e25f5c9200ec62af1d386a808846 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 20 Jul 2015 10:03:16 -0500 Subject: [PATCH 0069/1704] make ompio return gracefully in case something goes wrong early in file_open. --- ompi/mca/io/ompio/io_ompio_component.c | 4 ++-- ompi/mca/io/ompio/io_ompio_file_open.c | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index b1f862bf86e..8cb2bc84755 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2015 Research Organization for Information Science @@ -257,7 +257,7 @@ file_query(struct ompi_file_t *file, /* Allocate a space for this module to hang private data (e.g., the OMPIO file handle) */ - data = malloc(sizeof(mca_io_ompio_data_t)); + data = calloc(1, sizeof(mca_io_ompio_data_t)); if (NULL == data) { return NULL; } diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index a6f45683a43..bf30dd1f548 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -80,6 +80,9 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, int remote_arch; + ompio_fh->f_iov_type = MPI_DATATYPE_NULL; + ompio_fh->f_comm = MPI_COMM_NULL; + if ( ((amode&MPI_MODE_RDONLY)?1:0) + ((amode&MPI_MODE_RDWR)?1:0) + ((amode&MPI_MODE_WRONLY)?1:0) != 1 ) { return MPI_ERR_AMODE; @@ -94,7 +97,6 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, return MPI_ERR_AMODE; } - ompio_fh->f_iov_type = MPI_DATATYPE_NULL; ompio_fh->f_rank = ompi_comm_rank (comm); ompio_fh->f_size = ompi_comm_size (comm); remote_arch = opal_local_arch; @@ -319,14 +321,27 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh) if( NULL != ompio_fh->f_sharedfp ){ ret = ompio_fh->f_sharedfp->sharedfp_file_close(ompio_fh); } - ret = ompio_fh->f_fs->fs_file_close (ompio_fh); + if ( NULL != ompio_fh->f_fs ) { + /* The pointer might not be set if file_close() is + ** called from the file destructor in case of an error + ** during file_open() + */ + ret = ompio_fh->f_fs->fs_file_close (ompio_fh); + } if ( delete_flag && 0 == ompio_fh->f_rank ) { mca_io_ompio_file_delete ( ompio_fh->f_filename, MPI_INFO_NULL ); } - mca_fs_base_file_unselect (ompio_fh); - mca_fbtl_base_file_unselect (ompio_fh); - mca_fcoll_base_file_unselect (ompio_fh); + if ( NULL != ompio_fh->f_fs ) { + mca_fs_base_file_unselect (ompio_fh); + } + if ( NULL != ompio_fh->f_fbtl ) { + mca_fbtl_base_file_unselect (ompio_fh); + } + + if ( NULL != ompio_fh->f_fcoll ) { + mca_fcoll_base_file_unselect (ompio_fh); + } if ( NULL != ompio_fh->f_sharedfp) { mca_sharedfp_base_file_unselect (ompio_fh); } From 249aee0271d08a6b279cfd321bbbcc08c22692a5 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 27 Jul 2015 12:43:45 -0500 Subject: [PATCH 0070/1704] mark the request as ACTIVE --- ompi/mca/io/ompio/io_ompio_file_read.c | 1 + ompi/mca/io/ompio/io_ompio_file_write.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ompi/mca/io/ompio/io_ompio_file_read.c b/ompi/mca/io/ompio/io_ompio_file_read.c index 2cf699c53f5..1150bf27fc6 100644 --- a/ompi/mca/io/ompio/io_ompio_file_read.c +++ b/ompi/mca/io/ompio/io_ompio_file_read.c @@ -225,6 +225,7 @@ int ompio_io_ompio_file_iread (mca_io_ompio_file_t *fh, ompio_req = OBJ_NEW(mca_ompio_request_t); ompio_req->req_type = MCA_OMPIO_REQUEST_READ; + ompio_req->req_ompi.req_state = OMPI_REQUEST_ACTIVE; if ( 0 == count ) { ompi_request_complete (&ompio_req->req_ompi, 0); diff --git a/ompi/mca/io/ompio/io_ompio_file_write.c b/ompi/mca/io/ompio/io_ompio_file_write.c index 1cc22ef7366..08038ddc66f 100644 --- a/ompi/mca/io/ompio/io_ompio_file_write.c +++ b/ompi/mca/io/ompio/io_ompio_file_write.c @@ -215,6 +215,7 @@ int ompio_io_ompio_file_iwrite (mca_io_ompio_file_t *fh, ompio_req = OBJ_NEW(mca_ompio_request_t); ompio_req->req_type = MCA_OMPIO_REQUEST_WRITE; + ompio_req->req_ompi.req_state = OMPI_REQUEST_ACTIVE; if ( 0 == count ) { ompi_request_complete (&ompio_req->req_ompi, 0); From 5fb4040f2350b42a4346fae9abb59ef97c83484c Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 27 Jul 2015 15:53:40 -0500 Subject: [PATCH 0071/1704] - fix the delete priority of the ompio component - some application use MPI_File_delete as a collective function (e.g. IOR), which I think is not really covered by the standard. Right now, one process succeeds and theother ones return an error code. Fix that by not returning no error if the file that we try to delete does not exist anymore, to make these applications work. --- ompi/mca/io/ompio/io_ompio_component.c | 2 +- ompi/mca/io/ompio/io_ompio_file_open.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index 8cb2bc84755..9f64fca0684 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -136,7 +136,7 @@ static int register_component(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &priority_param); - delete_priority_param = 10; + delete_priority_param = 30; (void) mca_base_component_var_register(&mca_io_ompio_component.io_version, "delete_priority", "Delete priority of the io ompio component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index bf30dd1f548..057c57e7af4 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -394,8 +394,9 @@ int mca_io_ompio_file_delete (char *filename, ret = unlink(filename); - if (0 > ret) { - return OMPI_ERROR; + if (0 > ret && ENOENT != errno ) { + opal_output (1, "errno = %d %s\n", errno, strerror(errno)); + return MPI_ERR_ACCESS; } return OMPI_SUCCESS; From c2d7b1733cfb002c9fe78d030999635954b301ef Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 28 Jul 2015 11:22:27 +0900 Subject: [PATCH 0072/1704] coll/libnbc: ireduce_scatter_block silence malloc(0) warning reported by Lisandro (back-ported from open-mpi/ompi@318a1a40a4ab345f417b8932326d4dd2e68d82bc) --- .../coll_libnbc_ireduce_scatter_block.c | 125 +++++++++--------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c b/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c index bb0f0b7cbde..e9770d8e851 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c +++ b/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c @@ -7,7 +7,7 @@ * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2014 Research Organization for Information Science + * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * * Author(s): Torsten Hoefler @@ -63,80 +63,81 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec maxr = (int)ceil((log((double)p)/LOG2)); - count = 0; - for(r=0;rtmpbuf = malloc(ext*count*2); - if(handle->tmpbuf == NULL) { printf("Error in malloc()\n"); return NBC_OOR; } + if (0 < count) { + handle->tmpbuf = malloc(ext*count*2); + if(handle->tmpbuf == NULL) { printf("Error in malloc()\n"); return NBC_OOR; } - redbuf = ((char*)handle->tmpbuf)+(ext*count); + redbuf = ((char*)handle->tmpbuf)+(ext*count); - /* copy data to redbuf if we only have a single node */ - if((p==1) && !inplace) { - res = NBC_Copy(sendbuf, count, datatype, redbuf, count, datatype, comm); - if (NBC_OK != res) { printf("Error in NBC_Copy() (%i)\n", res); return res; } - } + /* copy data to redbuf if we only have a single node */ + if((p==1) && !inplace) { + res = NBC_Copy(sendbuf, count, datatype, redbuf, count, datatype, comm); + if (NBC_OK != res) { printf("Error in NBC_Copy() (%i)\n", res); return res; } + } - firstred = 1; - for(r=1; r<=maxr; r++) { - if((rank % (1<tmpbuf); printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } - /* we have to wait until we have the data */ - res = NBC_Sched_barrier(schedule); - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } + firstred = 1; + for(r=1; r<=maxr; r++) { + if((rank % (1<tmpbuf); printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } + /* we have to wait until we have the data */ + res = NBC_Sched_barrier(schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } + if(firstred) { + /* take reduce data from the sendbuf in the first round -> save copy */ + res = NBC_Sched_op(redbuf-(unsigned long)handle->tmpbuf, true, sendbuf, false, 0, true, count, datatype, op, schedule); + firstred = 0; + } else { + /* perform the reduce in my local buffer */ + res = NBC_Sched_op(redbuf-(unsigned long)handle->tmpbuf, true, redbuf-(unsigned long)handle->tmpbuf, true, 0, true, count, datatype, op, schedule); + } + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_op() (%i)\n", res); return res; } + /* this cannot be done until handle->tmpbuf is unused :-( */ + res = NBC_Sched_barrier(schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } + } + } else { + /* we have to send this round */ + peer = rank - (1<<(r-1)); if(firstred) { - /* take reduce data from the sendbuf in the first round -> save copy */ - res = NBC_Sched_op(redbuf-(unsigned long)handle->tmpbuf, true, sendbuf, false, 0, true, count, datatype, op, schedule); - firstred = 0; + /* we have to send the senbuf */ + res = NBC_Sched_send(sendbuf, false, count, datatype, peer, schedule); } else { - /* perform the reduce in my local buffer */ - res = NBC_Sched_op(redbuf-(unsigned long)handle->tmpbuf, true, redbuf-(unsigned long)handle->tmpbuf, true, 0, true, count, datatype, op, schedule); + /* we send an already reduced value from redbuf */ + res = NBC_Sched_send(redbuf-(unsigned long)handle->tmpbuf, true, count, datatype, peer, schedule); } - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_op() (%i)\n", res); return res; } - /* this cannot be done until handle->tmpbuf is unused :-( */ - res = NBC_Sched_barrier(schedule); - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } - } - } else { - /* we have to send this round */ - peer = rank - (1<<(r-1)); - if(firstred) { - /* we have to send the senbuf */ - res = NBC_Sched_send(sendbuf, false, count, datatype, peer, schedule); - } else { - /* we send an already reduced value from redbuf */ - res = NBC_Sched_send(redbuf-(unsigned long)handle->tmpbuf, true, count, datatype, peer, schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_send() (%i)\n", res); return res; } + /* leave the game */ + break; } - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_send() (%i)\n", res); return res; } - /* leave the game */ - break; } - } - res = NBC_Sched_barrier(schedule); - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } + res = NBC_Sched_barrier(schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } - /* rank 0 is root and sends - all others receive */ - if(rank != 0) { - res = NBC_Sched_recv(recvbuf, false, recvcount, datatype, 0, schedule); - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } - } + /* rank 0 is root and sends - all others receive */ + if(rank != 0) { + res = NBC_Sched_recv(recvbuf, false, recvcount, datatype, 0, schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } + } - if(rank == 0) { - offset = 0; - for(r=1;rtmpbuf, true, recvcount, datatype, r, schedule); - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_send() (%i)\n", res); return res; } + if(rank == 0) { + offset = 0; + for(r=1;rtmpbuf, true, recvcount, datatype, r, schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_send() (%i)\n", res); return res; } + } + res = NBC_Sched_copy(redbuf-(unsigned long)handle->tmpbuf, true, recvcount, datatype, recvbuf, false, recvcount, datatype, schedule); + if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_copy() (%i)\n", res); return res; } } - res = NBC_Sched_copy(redbuf-(unsigned long)handle->tmpbuf, true, recvcount, datatype, recvbuf, false, recvcount, datatype, schedule); - if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_copy() (%i)\n", res); return res; } } /*NBC_PRINT_SCHED(*schedule);*/ From 57b56ccbb5b79d59ded4318e52ec266b746c8e60 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 28 Jul 2015 09:16:13 +0900 Subject: [PATCH 0073/1704] oob/tcp: fix a race condition when finalizing the oob/tcp component (cherry picked from commit open-mpi/ompi@429bdf1af7dd28b37237e5fd0fd61a2907a3c268) --- orte/mca/oob/tcp/oob_tcp_component.c | 44 +++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/orte/mca/oob/tcp/oob_tcp_component.c b/orte/mca/oob/tcp/oob_tcp_component.c index a6a8bc1ac6a..425743c7a3d 100644 --- a/orte/mca/oob/tcp/oob_tcp_component.c +++ b/orte/mca/oob/tcp/oob_tcp_component.c @@ -16,6 +16,8 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,6 +70,7 @@ #include "orte/util/parse_options.h" #include "orte/util/show_help.h" #include "orte/runtime/orte_globals.h" +#include "orte/runtime/orte_wait.h" #include "orte/mca/oob/tcp/oob_tcp.h" #include "orte/mca/oob/tcp/oob_tcp_component.h" @@ -630,10 +633,22 @@ static int component_startup(void) return rc; } +static void cleanup(int sd, short args, void *cbdata) +{ + opal_list_item_t * item; + bool *active = (bool*)cbdata; + while (NULL != (item = opal_list_remove_first(&mca_oob_tcp_component.listeners))) { + OBJ_RELEASE(item); + } + if (NULL != active) { + *active = false; + } +} + static void component_shutdown(void) { int i = 0; - opal_list_item_t *item; + bool active; opal_output_verbose(2, orte_oob_base_framework.framework_output, "%s TCP SHUTDOWN", @@ -644,16 +659,37 @@ static void component_shutdown(void) /* tell the thread to exit */ write(mca_oob_tcp_component.stop_thread[1], &i, sizeof(int)); opal_thread_join(&mca_oob_tcp_component.listen_thread, NULL); + } else { + opal_output_verbose(2, orte_oob_base_framework.framework_output, + "no hnp or not active"); } - while (NULL != (item = opal_list_remove_first(&mca_oob_tcp_component.listeners))) { - OBJ_RELEASE(item); - } + /* because the listeners are in a separate + * async thread for apps, we can't just release them here. + * Instead, we push it into that event thread and release + * them there */ + if (ORTE_PROC_IS_APP) { + opal_event_t ev; + active = true; + opal_event_set(orte_event_base, &ev, -1, + OPAL_EV_WRITE, cleanup, &active); + opal_event_set_priority(&ev, ORTE_ERROR_PRI); + opal_event_active(&ev, OPAL_EV_WRITE, 1); + ORTE_WAIT_FOR_COMPLETION(active); + } else { + /* we can call the destruct directly */ + cleanup(0, 0, NULL); + } + opal_output_verbose(2, orte_oob_base_framework.framework_output, + "all listeners released"); /* shutdown the module */ if (NULL != mca_oob_tcp_module.api.finalize) { mca_oob_tcp_module.api.finalize(); } + opal_output_verbose(2, orte_oob_base_framework.framework_output, + "%s TCP SHUTDOWN done", + ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); } static int component_send(orte_rml_send_t *msg) From 41b10d0a9c5ca3fb8d37339c0d27234a2e5c53bf Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Tue, 28 Jul 2015 09:28:37 -0500 Subject: [PATCH 0074/1704] remove the C++ interfaces for the new non-blocking collective I/O functions. They are not defined in MPI 3.1 --- ompi/mpi/man/man3/MPI_File_iread_all.3in | 7 ------- ompi/mpi/man/man3/MPI_File_iread_at_all.3in | 7 ------- ompi/mpi/man/man3/MPI_File_iwrite_all.3in | 7 ------- ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in | 7 ------- 4 files changed, 28 deletions(-) diff --git a/ompi/mpi/man/man3/MPI_File_iread_all.3in b/ompi/mpi/man/man3/MPI_File_iread_all.3in index 79df566711c..716e423a3e8 100644 --- a/ompi/mpi/man/man3/MPI_File_iread_all.3in +++ b/ompi/mpi/man/man3/MPI_File_iread_all.3in @@ -23,13 +23,6 @@ C Syntax BUF(*) INTEGER FH, COUNT, DATATYPE, REQUEST, IERROR -.fi -.SH C++ Syntax -.nf -#include -MPI::Request MPI::File::Iread(void* \fIbuf\fP, int \fIcount\fP, - const MPI::Datatype& \fIdatatype\fP) - .fi .SH INPUT/OUTPUT PARAMETER .ft R diff --git a/ompi/mpi/man/man3/MPI_File_iread_at_all.3in b/ompi/mpi/man/man3/MPI_File_iread_at_all.3in index 0a6891e7b76..b5166801d31 100644 --- a/ompi/mpi/man/man3/MPI_File_iread_at_all.3in +++ b/ompi/mpi/man/man3/MPI_File_iread_at_all.3in @@ -25,13 +25,6 @@ C Syntax INTEGER \fIFH, COUNT, DATATYPE, REQUEST, IERROR\fP INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP -.fi -.SH C++ Syntax -.nf -#include -MPI::Request MPI::File::Iread_at(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, - int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) - .fi .SH INPUT PARAMETERS .ft R diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_all.3in b/ompi/mpi/man/man3/MPI_File_iwrite_all.3in index c5310cea344..3fc0a030493 100644 --- a/ompi/mpi/man/man3/MPI_File_iwrite_all.3in +++ b/ompi/mpi/man/man3/MPI_File_iwrite_all.3in @@ -24,13 +24,6 @@ C Syntax BUF(*) INTEGER FH, COUNT, DATATYPE, REQUEST, IERROR -.fi -.SH C++ Syntax -.nf -#include -MPI::Request MPI::File::Iwrite(const void* \fIbuf\fP, int \fIcount\fP, - const MPI::Datatype& \fIdatatype\fP) - .fi .SH INPUT/OUTPUT PARAMETER .ft R diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in b/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in index 4fc63814f3d..ea9cab315e2 100644 --- a/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in +++ b/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in @@ -25,13 +25,6 @@ C Syntax INTEGER \fIFH, COUNT, DATATYPE, REQUEST, IERROR\fP INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP -.fi -.SH C++ Syntax -.nf -#include -MPI::Request MPI::File::Iwrite_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, - int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) - .fi .SH INPUT/OUTPUT PARAMETER .ft R From 71d15521c1c815c160c302424166b9e342ce10b6 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Fri, 10 Jul 2015 09:58:58 -0600 Subject: [PATCH 0075/1704] Fixes for javadoc warnings. Added missings @params and @throws as well as adding definitions for the @throws tags. Signed-off-by: Nathaniel Graham Conflicts: ompi/mpi/java/java/Comm.java ompi/mpi/java/java/Datatype.java ompi/mpi/java/java/File.java ompi/mpi/java/java/Freeable.java ompi/mpi/java/java/GraphComm.java ompi/mpi/java/java/Group.java ompi/mpi/java/java/Info.java ompi/mpi/java/java/Intercomm.java ompi/mpi/java/java/Intracomm.java ompi/mpi/java/java/MPI.java ompi/mpi/java/java/Message.java ompi/mpi/java/java/Prequest.java ompi/mpi/java/java/Request.java ompi/mpi/java/java/Status.java ompi/mpi/java/java/Struct.java ompi/mpi/java/java/UserFunction.java ompi/mpi/java/java/Win.java --- ompi/mpi/java/java/CartComm.java | 18 +-- ompi/mpi/java/java/Comm.java | 212 +++++++++++++-------------- ompi/mpi/java/java/Datatype.java | 44 +++--- ompi/mpi/java/java/DoubleInt.java | 2 + ompi/mpi/java/java/File.java | 106 +++++++------- ompi/mpi/java/java/FloatInt.java | 2 + ompi/mpi/java/java/Freeable.java | 2 +- ompi/mpi/java/java/GraphComm.java | 12 +- ompi/mpi/java/java/Group.java | 22 +-- ompi/mpi/java/java/Info.java | 15 +- ompi/mpi/java/java/Int2.java | 2 + ompi/mpi/java/java/Intercomm.java | 12 +- ompi/mpi/java/java/Intracomm.java | 67 ++++----- ompi/mpi/java/java/LongInt.java | 3 + ompi/mpi/java/java/MPI.java | 30 ++-- ompi/mpi/java/java/Message.java | 7 +- ompi/mpi/java/java/Op.java | 2 +- ompi/mpi/java/java/Prequest.java | 4 +- ompi/mpi/java/java/Request.java | 33 +++-- ompi/mpi/java/java/ShortInt.java | 3 + ompi/mpi/java/java/Status.java | 6 +- ompi/mpi/java/java/Struct.java | 22 +-- ompi/mpi/java/java/UserFunction.java | 18 ++- ompi/mpi/java/java/Win.java | 124 +++++++++++----- 24 files changed, 420 insertions(+), 348 deletions(-) diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index 2ce61edba5c..2d3c1084bd3 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -90,7 +90,7 @@ protected CartComm(long[] commRequest) * Duplicates this communicator. *

Java binding of {@code MPI_COMM_DUP}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public CartComm dup() throws MPIException { @@ -104,7 +104,7 @@ protected CartComm(long[] commRequest) *

The new communicator can't be used before the operation completes. * The request object must be obtained calling {@link #getRequest}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred. */ @Override public CartComm iDup() throws MPIException { @@ -119,7 +119,7 @@ protected CartComm(long[] commRequest) *

The number of dimensions can be obtained from the size of (eg) * {@code dims} field of the returned object. * @return object containing dimensions, periods and local coordinates - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public CartParms getTopo() throws MPIException { @@ -134,7 +134,7 @@ public CartParms getTopo() throws MPIException *

Java binding of the MPI operation {@code MPI_CART_RANK}. * @param coords Cartesian coordinates of a process * @return rank of the specified process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getRank(int[] coords) throws MPIException { @@ -149,7 +149,7 @@ public int getRank(int[] coords) throws MPIException *

Java binding of the MPI operation {@code MPI_CART_COORDS}. * @param rank rank of a process * @return Cartesian coordinates of the specified process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int[] getCoords(int rank) throws MPIException { @@ -165,7 +165,7 @@ public int[] getCoords(int rank) throws MPIException * @param direction coordinate dimension of shift * @param disp displacement * @return object containing ranks of source and destination processes - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public ShiftParms shift(int direction, int disp) throws MPIException { @@ -182,7 +182,7 @@ private native ShiftParms shift(long comm, int direction, int disp) * @param remainDims by dimension, {@code true} if dimension is to be kept, * {@code false} otherwise * @return communicator containing subgrid including this process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public CartComm sub(boolean[] remainDims) throws MPIException { @@ -200,7 +200,7 @@ public CartComm sub(boolean[] remainDims) throws MPIException * @param periods {@code true} if grid is periodic, * {@code false} if not, in each dimension * @return reordered rank of calling process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int map(int[] dims, boolean[] periods) throws MPIException { @@ -216,7 +216,7 @@ private native int map(long comm, int[] dims, boolean[] periods) *

Java binding of the MPI operation {@code MPI_DIMS_CREATE}. * @param nnodes number of nodes in a grid * @param dims array specifying the number of nodes in each dimension - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void createDims(int nnodes, int[] dims) throws MPIException { diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 0174da00fcf..060402f2333 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -127,7 +127,7 @@ protected final void setType(int type) * Duplicates this communicator. *

Java binding of {@code MPI_COMM_DUP}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Comm dup() throws MPIException { @@ -143,7 +143,7 @@ public Comm dup() throws MPIException *

The new communicator can't be used before the operation completes. * The request object must be obtained calling {@link #getRequest}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Comm iDup() throws MPIException { @@ -168,7 +168,7 @@ public final Request getRequest() * Size of group of this communicator. *

Java binding of the MPI operation {@code MPI_COMM_SIZE}. * @return number of processors in the group of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int getSize() throws MPIException { @@ -182,7 +182,7 @@ public final int getSize() throws MPIException * Rank of this process in group of this communicator. *

Java binding of the MPI operation {@code MPI_COMM_RANK}. * @return rank of the calling process in the group of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int getRank() throws MPIException { @@ -205,7 +205,7 @@ public final int getRank() throws MPIException * {@code MPI.SIMILAR} results if the underlying groups are similar * but the communicators differ by context.
* {@code MPI.UNEQUAL} results otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int compare(Comm comm1, Comm comm2) throws MPIException { @@ -217,7 +217,7 @@ public static int compare(Comm comm1, Comm comm2) throws MPIException /** * Java binding of the MPI operation {@code MPI_COMM_FREE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override final public void free() throws MPIException { @@ -239,7 +239,7 @@ public final boolean isNull() /** * Java binding of {@code MPI_COMM_SET_INFO}. * @param info info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void setInfo(Info info) throws MPIException { @@ -252,7 +252,7 @@ public final void setInfo(Info info) throws MPIException /** * Java binding of {@code MPI_COMM_GET_INFO}. * @return new info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Info getInfo() throws MPIException { @@ -264,7 +264,7 @@ public final Info getInfo() throws MPIException /** * Java binding of the MPI operation {@code MPI_COMM_DISCONNECT}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void disconnect() throws MPIException { @@ -278,7 +278,7 @@ public final void disconnect() throws MPIException * Return group associated with a communicator. *

Java binding of the MPI operation {@code MPI_COMM_GROUP}. * @return group corresponding to this communicator group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Group getGroup() throws MPIException { @@ -295,7 +295,7 @@ public final Group getGroup() throws MPIException *

Java binding of the MPI operation {@code MPI_COMM_TEST_INTER}. * @return {@code true} if this is an inter-communicator, * {@code false} otherwise - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final boolean isInter() throws MPIException { @@ -318,7 +318,7 @@ public final boolean isInter() throws MPIException * @param remoteLeader rank of remote group leader in this communicator * @param tag "safe" tag * @return new inter-communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm createIntercomm(Comm localComm, int localLeader, int remoteLeader, int tag) @@ -344,7 +344,7 @@ private native long createIntercomm( * @param type datatype of each item in send buffer * @param dest rank of destination * @param tag message tag - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void send(Object buf, int count, Datatype type, int dest, int tag) throws MPIException @@ -375,7 +375,7 @@ private native void send( * @param source rank of source * @param tag message tag * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Status recv(Object buf, int count, Datatype type, int source, int tag) @@ -420,7 +420,7 @@ private native void recv( * @param source rank of source * @param recvtag receive tag * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) * @see mpi.Comm#recv(Object, int, Datatype, int, int) */ @@ -478,7 +478,7 @@ private native void sendRecv( * @param source rank of source * @param recvtag receive tag * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) * @see mpi.Comm#recv(Object, int, Datatype, int, int) */ @@ -520,7 +520,7 @@ private native void sendRecvReplace( * @param type datatype of each item in send buffer * @param dest rank of destination * @param tag message tag - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final void bSend(Object buf, int count, Datatype type, int dest, int tag) @@ -551,7 +551,7 @@ private native void bSend( * @param type datatype of each item in send buffer * @param dest rank of destination * @param tag message tag - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final void sSend(Object buf, int count, Datatype type, int dest, int tag) @@ -582,7 +582,7 @@ private native void sSend( * @param type datatype of each item in send buffer * @param dest rank of destination * @param tag message tag - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final void rSend(Object buf, int count, Datatype type, int dest, int tag) @@ -616,7 +616,7 @@ private native void rSend( * @param dest rank of destination * @param tag message tag * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Request iSend(Buffer buf, int count, @@ -641,7 +641,7 @@ private native long iSend( * @param dest rank of destination * @param tag message tag * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Request ibSend(Buffer buf, int count, @@ -666,7 +666,7 @@ private native long ibSend( * @param dest rank of destination * @param tag message tag * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Request isSend(Buffer buf, int count, @@ -691,7 +691,7 @@ private native long isSend( * @param dest rank of destination * @param tag message tag * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Request irSend(Buffer buf, int count, @@ -716,7 +716,7 @@ private native long irSend( * @param source rank of source * @param tag message tag * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#recv(Object, int, Datatype, int, int) */ public final Request iRecv(Buffer buf, int count, @@ -744,7 +744,7 @@ private native long iRecv( * @param dest rank of destination * @param tag message tag * @return persistent communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Prequest sendInit(Buffer buf, int count, @@ -769,7 +769,7 @@ private native long sendInit( * @param dest rank of destination * @param tag message tag * @return persistent communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Prequest bSendInit(Buffer buf, int count, @@ -794,7 +794,7 @@ private native long bSendInit( * @param dest rank of destination * @param tag message tag * @return persistent communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Prequest sSendInit(Buffer buf, int count, @@ -819,7 +819,7 @@ private native long sSendInit( * @param dest rank of destination * @param tag message tag * @return persistent communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#send(Object, int, Datatype, int, int) */ public final Prequest rSendInit(Buffer buf, int count, @@ -844,7 +844,7 @@ private native long rSendInit( * @param source rank of source * @param tag message tag * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. * @see mpi.Comm#recv(Object, int, Datatype, int, int) */ public final Prequest recvInit(Buffer buf, int count, @@ -876,7 +876,7 @@ private native long recvInit( * @param outbuf output buffer * @param position initial position in output buffer * @return final position in output buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int pack(Object inbuf, int incount, Datatype type, byte[] outbuf, int position) @@ -914,7 +914,7 @@ private native int pack( * @param outcount number of items in output buffer * @param type datatype of each item in output buffer * @return final position in input buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int unpack(byte[] inbuf, int position, Object outbuf, int outcount, Datatype type) @@ -945,7 +945,7 @@ private native int unpack( * @param incount number of items in input buffer * @param type datatype of each item in input buffer * @return upper bound on size of packed message - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int packSize(int incount, Datatype type) throws MPIException { @@ -967,7 +967,7 @@ private native int packSize(long comm, int incount, long type) * @param tag message tag * @return status object if such a message is currently available, * {@code null} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Status iProbe(int source, int tag) throws MPIException { @@ -986,7 +986,7 @@ private native Status iProbe(long comm, int source, int tag) * @param source rank of source * @param tag message tag * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Status probe(int source, int tag) throws MPIException { @@ -1005,7 +1005,7 @@ private native void probe(long comm, int source, int tag, long[] stat) * Create a new attribute key. *

Java binding of the MPI operation {@code MPI_COMM_CREATE_KEYVAL}. * @return attribute key for future access - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int createKeyval() throws MPIException { @@ -1019,7 +1019,7 @@ public static int createKeyval() throws MPIException * Frees an attribute key for communicators. *

Java binding of the MPI operation {@code MPI_COMM_FREE_KEYVAL}. * @param keyval attribute key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void freeKeyval(int keyval) throws MPIException { @@ -1034,7 +1034,7 @@ public static void freeKeyval(int keyval) throws MPIException *

Java binding of the MPI operation {@code MPI_COMM_SET_ATTR}. * @param keyval attribute key * @param value attribute value - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void setAttr(int keyval, Object value) throws MPIException { @@ -1050,7 +1050,7 @@ private native void setAttr(long comm, int keyval, byte[] value) *

Java binding of the MPI operation {@code MPI_COMM_GET_ATTR}. * @param keyval attribute key * @return attribute value or null if no attribute is associated with the key. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Object getAttr(int keyval) throws MPIException { @@ -1085,7 +1085,7 @@ private native Object getAttr_predefined(long comm, int keyval) * Deletes an attribute value associated with a key on a communicator. *

Java binding of the MPI operation {@code MPI_COMM_DELETE_ATTR}. * @param keyval attribute key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void deleteAttr(int keyval) throws MPIException { @@ -1103,7 +1103,7 @@ public final void deleteAttr(int keyval) throws MPIException *

The return value will be one of {@code MPI.GRAPH}, {@code MPI.CART} * or {@code MPI.UNDEFINED}. * @return topology type of communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int getTopology() throws MPIException { @@ -1119,7 +1119,7 @@ public final int getTopology() throws MPIException * Abort MPI. *

Java binding of the MPI operation {@code MPI_ABORT}. * @param errorcode error code for Unix or POSIX environments - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void abort(int errorcode) throws MPIException { @@ -1135,7 +1135,7 @@ public final void abort(int errorcode) throws MPIException * Associates a new error handler with communicator at the calling process. *

Java binding of the MPI operation {@code MPI_ERRHANDLER_SET}. * @param errhandler new MPI error handler for communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void setErrhandler(Errhandler errhandler) throws MPIException { @@ -1150,7 +1150,7 @@ private native void setErrhandler(long comm, long errhandler) * Returns the error handler currently associated with the communicator. *

Java binding of the MPI operation {@code MPI_ERRHANDLER_GET}. * @return MPI error handler currently associated with communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Errhandler getErrhandler() throws MPIException { @@ -1166,7 +1166,7 @@ public final Errhandler getErrhandler() throws MPIException * A call to {@code barrier} blocks the caller until all process * in the group have called it. *

Java binding of the MPI operation {@code MPI_BARRIER}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void barrier() throws MPIException { @@ -1180,7 +1180,7 @@ public final void barrier() throws MPIException * Nonblocking barrier sinchronization. *

Java binding of the MPI operation {@code MPI_IBARRIER}. * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iBarrier() throws MPIException { @@ -1198,7 +1198,7 @@ public final Request iBarrier() throws MPIException * @param count number of items in buffer * @param type datatype of each item in buffer * @param root rank of broadcast root - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void bcast(Object buf, int count, Datatype type, int root) throws MPIException @@ -1229,7 +1229,7 @@ private native void bcast( * @param type datatype of each item in buffer * @param root rank of broadcast root * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iBcast(Buffer buf, int count, Datatype type, int root) throws MPIException @@ -1253,7 +1253,7 @@ private native long iBcast( * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @param root rank of receiving process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void gather( Object sendbuf, int sendcount, Datatype sendtype, @@ -1296,7 +1296,7 @@ public final void gather( * @param count number of items to send/receive * @param type datatype of each item in buffer * @param root rank of receiving process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void gather(Object buf, int count, Datatype type, int root) throws MPIException @@ -1333,7 +1333,7 @@ private native void gather( * @param recvtype datatype of each item in receive buffer * @param root rank of receiving process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iGather( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -1358,7 +1358,7 @@ public final Request iGather( * @param type datatype of each item in buffer * @param root rank of receiving process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iGather(Buffer buf, int count, Datatype type, int root) throws MPIException @@ -1387,7 +1387,7 @@ private native long iGather( * @param displs displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer * @param root rank of receiving process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, @@ -1431,7 +1431,7 @@ public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, * @param displs displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer * @param root rank of receiving process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void gatherv(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root) @@ -1461,7 +1461,7 @@ public final void gatherv(Object recvbuf, int[] recvcount, int[] displs, * @param sendcount number of items to send * @param sendtype datatype of each item in send buffer * @param root rank of receiving process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, int root) @@ -1502,7 +1502,7 @@ private native void gatherv( * @param recvtype datatype of each item in receive buffer * @param root rank of receiving process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iGatherv( Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, @@ -1529,7 +1529,7 @@ public final Request iGatherv( * @param recvtype datatype of each item in receive buffer * @param root rank of receiving process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype, int root) @@ -1553,7 +1553,7 @@ public final Request iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, * @param sendtype datatype of each item in send buffer * @param root rank of receiving process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iGatherv(Buffer sendbuf, int sendcount, Datatype sendtype, int root) @@ -1582,7 +1582,7 @@ private native long iGatherv( * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @param root rank of sending process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scatter( Object sendbuf, int sendcount, Datatype sendtype, @@ -1625,7 +1625,7 @@ public final void scatter( * @param count number of items to send/receive * @param type datatype of each item in buffer * @param root rank of sending process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scatter(Object buf, int count, Datatype type, int root) throws MPIException @@ -1661,7 +1661,7 @@ private native void scatter( * @param recvtype datatype of each item in receive buffer * @param root rank of sending process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScatter( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -1686,7 +1686,7 @@ public final Request iScatter( * @param type datatype of each item in buffer * @param root rank of sending process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScatter(Buffer buf, int count, Datatype type, int root) throws MPIException @@ -1714,7 +1714,7 @@ private native long iScatter( * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @param root rank of sending process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scatterv( Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, @@ -1757,7 +1757,7 @@ public final void scatterv( * @param displs displacements from which to take outgoing data * @param sendtype datatype of each item in send buffer * @param root rank of sending process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scatterv(Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, int root) @@ -1787,7 +1787,7 @@ public final void scatterv(Object sendbuf, int[] sendcount, int[] displs, * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @param root rank of sending process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scatterv(Object recvbuf, int recvcount, Datatype recvtype, int root) @@ -1827,7 +1827,7 @@ private native void scatterv( * @param recvtype datatype of each item in receive buffer * @param root rank of sending process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScatterv( Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, @@ -1853,7 +1853,7 @@ public final Request iScatterv( * @param sendtype datatype of each item in send buffer * @param root rank of sending process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, int root) @@ -1876,7 +1876,7 @@ public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, * @param recvtype datatype of each item in receive buffer * @param root rank of sending process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScatterv(Buffer recvbuf, int recvcount, Datatype recvtype, int root) @@ -1903,7 +1903,7 @@ private native long iScatterv( * @param recvbuf receive buffer * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allGather(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) @@ -1942,7 +1942,7 @@ public final void allGather(Object sendbuf, int sendcount, Datatype sendtype, * @param buf receive buffer * @param count number of items to receive * @param type datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allGather(Object buf, int count, Datatype type) throws MPIException @@ -1977,7 +1977,7 @@ private native void allGather( * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllGather( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -1999,7 +1999,7 @@ public final Request iAllGather( * @param count number of items to receive * @param type datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllGather(Buffer buf, int count, Datatype type) throws MPIException @@ -2023,7 +2023,7 @@ private native long iAllGather( * @param recvcount number of elements received from each process * @param displs displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allGatherv( Object sendbuf, int sendcount, Datatype sendtype, @@ -2064,7 +2064,7 @@ public final void allGatherv( * @param recvcount number of elements received from each process * @param displs displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allGatherv(Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) @@ -2102,7 +2102,7 @@ private native void allGatherv( * @param displs displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllGatherv( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -2126,7 +2126,7 @@ public final Request iAllGatherv( * @param displs displacements at which to place incoming data * @param type datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllGatherv( Buffer buf, int[] count, int[] displs, Datatype type) @@ -2154,7 +2154,7 @@ private native long iAllGatherv( * @param recvbuf receive buffer * @param recvcount number of items received from any process * @param recvtype datatype of receive buffer items - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allToAll(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int recvcount, Datatype recvtype) @@ -2203,7 +2203,7 @@ private native void allToAll( * @param recvcount number of items received from any process * @param recvtype datatype of receive buffer items * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, int recvcount, Datatype recvtype) @@ -2233,7 +2233,7 @@ private native long iAllToAll( * @param recvcount number of elements received from each process * @param rdispls displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allToAllv( Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, @@ -2287,7 +2287,7 @@ private native void allToAllv( * @param rdispls displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllToAllv( Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, @@ -2315,7 +2315,7 @@ private native long iAllToAllv(long comm, * @param recvbuf receive buffer * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void neighborAllGather( Object sendbuf, int sendcount, Datatype sendtype, @@ -2364,7 +2364,7 @@ private native void neighborAllGather( * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iNeighborAllGather( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -2393,7 +2393,7 @@ private native long iNeighborAllGather( * @param recvcount number of elements that are received from each neighbor * @param displs displacements at which to place incoming data * @param recvtype datatype of receive buffer elements - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void neighborAllGatherv( Object sendbuf, int sendcount, Datatype sendtype, @@ -2442,7 +2442,7 @@ private native void neighborAllGatherv( * @param displs displacements at which to place incoming data * @param recvtype datatype of receive buffer elements * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iNeighborAllGatherv( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -2470,7 +2470,7 @@ private native long iNeighborAllGatherv( * @param recvbuf receive buffer * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void neighborAllToAll( Object sendbuf, int sendcount, Datatype sendtype, @@ -2519,7 +2519,7 @@ private native void neighborAllToAll( * @param recvcount number of items to receive * @param recvtype datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iNeighborAllToAll( Buffer sendbuf, int sendcount, Datatype sendtype, @@ -2548,7 +2548,7 @@ private native long iNeighborAllToAll( * @param recvcount number of elements received from each process * @param rdispls displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void neighborAllToAllv( Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, @@ -2600,7 +2600,7 @@ private native void neighborAllToAllv( * @param rdispls displacements at which to place incoming data * @param recvtype datatype of each item in receive buffer * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iNeighborAllToAllv( Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, @@ -2637,7 +2637,7 @@ private native long iNeighborAllToAllv( * @param type data type of each item in send buffer * @param op reduce operation * @param root rank of root process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void reduce(Object sendbuf, Object recvbuf, int count, Datatype type, Op op, int root) @@ -2679,7 +2679,7 @@ public final void reduce(Object sendbuf, Object recvbuf, int count, * @param type data type of each item in buffer * @param op reduce operation * @param root rank of root process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void reduce(Object buf, int count, Datatype type, Op op, int root) throws MPIException @@ -2717,7 +2717,7 @@ private native void reduce( * @param op reduce operation * @param root rank of root process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iReduce(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op, int root) @@ -2744,7 +2744,7 @@ public final Request iReduce(Buffer sendbuf, Buffer recvbuf, * @param op reduce operation * @param root rank of root process * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iReduce(Buffer buf, int count, Datatype type, Op op, int root) @@ -2773,7 +2773,7 @@ private native long iReduce( * @param count number of items in send buffer * @param type data type of each item in send buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allReduce(Object sendbuf, Object recvbuf, int count, Datatype type, Op op) @@ -2813,7 +2813,7 @@ public final void allReduce(Object sendbuf, Object recvbuf, * @param count number of items in send buffer * @param type data type of each item in send buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void allReduce(Object buf, int count, Datatype type, Op op) throws MPIException @@ -2848,7 +2848,7 @@ private native void allReduce( * @param type data type of each item in send buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllReduce(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op) @@ -2872,7 +2872,7 @@ public final Request iAllReduce(Buffer sendbuf, Buffer recvbuf, * @param type data type of each item in send buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iAllReduce(Buffer buf, int count, Datatype type, Op op) throws MPIException @@ -2900,7 +2900,7 @@ private native long iAllReduce( * @param recvcounts numbers of result elements distributed to each process * @param type data type of each item in send buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void reduceScatter(Object sendbuf, Object recvbuf, int[] recvcounts, Datatype type, Op op) @@ -2941,7 +2941,7 @@ public final void reduceScatter(Object sendbuf, Object recvbuf, * @param counts numbers of result elements distributed to each process * @param type data type of each item in send buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void reduceScatter(Object buf, int[] counts, Datatype type, Op op) throws MPIException @@ -2977,7 +2977,7 @@ private native void reduceScatter( * @param type data type of each item in send buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iReduceScatter(Buffer sendbuf, Buffer recvbuf, int[] recvcounts, Datatype type, Op op) @@ -3003,7 +3003,7 @@ public final Request iReduceScatter(Buffer sendbuf, Buffer recvbuf, * @param type data type of each item in send buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iReduceScatter( Buffer buf, int[] counts, Datatype type, Op op) @@ -3030,7 +3030,7 @@ private native long iReduceScatter( * @param recvcount element count per block * @param type data type of each item in send buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void reduceScatterBlock(Object sendbuf, Object recvbuf, int recvcount, Datatype type, Op op) @@ -3069,7 +3069,7 @@ public final void reduceScatterBlock(Object sendbuf, Object recvbuf, * @param count element count per block * @param type data type of each item in send buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void reduceScatterBlock( Object buf, int count, Datatype type, Op op) @@ -3104,7 +3104,7 @@ private native void reduceScatterBlock( * @param type data type of each item in send buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iReduceScatterBlock( Buffer sendbuf, Buffer recvbuf, int recvcount, Datatype type, Op op) @@ -3128,7 +3128,7 @@ public final Request iReduceScatterBlock( * @param type data type of each item in send buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iReduceScatterBlock( Buffer buf, int count, Datatype type, Op op) @@ -3157,7 +3157,7 @@ private native long iReduceScatterBlock( * @param count number of elements * @param type data type of each item * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void reduceLocal( Object inBuf, Object inOutBuf, int count, Datatype type, Op op) @@ -3209,7 +3209,7 @@ private static native void reduceLocalUf( /** * Sets the print name for the communicator. * @param name name for the communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void setName(String name) throws MPIException { @@ -3222,7 +3222,7 @@ public final void setName(String name) throws MPIException /** * Return the print name from the communicator. * @return name of the communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final String getName() throws MPIException { diff --git a/ompi/mpi/java/java/Datatype.java b/ompi/mpi/java/java/Datatype.java index e72b96a23ab..5a968891403 100644 --- a/ompi/mpi/java/java/Datatype.java +++ b/ompi/mpi/java/java/Datatype.java @@ -137,7 +137,7 @@ private Datatype(int baseType, int baseSize, long handle) * Returns the lower bound of a datatype. *

Java binding of the MPI operation {@code MPI_TYPE_GET_EXTENT}. * @return lower bound of datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getLb() throws MPIException { @@ -151,7 +151,7 @@ public int getLb() throws MPIException * Returns the extent of a datatype. *

Java binding of the MPI operation {@code MPI_TYPE_GET_EXTENT}. * @return datatype extent - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getExtent() throws MPIException { @@ -176,7 +176,7 @@ private void getLbExtent() throws MPIException * Returns the true lower bound of a datatype. *

Java binding of the MPI operation {@code MPI_TYPE_GET_TRUE_EXTENT}. * @return lower bound of datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getTrueLb() throws MPIException { @@ -190,7 +190,7 @@ public int getTrueLb() throws MPIException * Returns the true extent of a datatype. *

Java binding of the MPI operation {@code MPI_TYPE_GET_TRUE_EXTENT}. * @return datatype true extent - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getTrueExtent() throws MPIException { @@ -216,7 +216,7 @@ private void getTrueLbExtent() throws MPIException * elements it represents. *

Java binding of the MPI operation {@code MPI_TYPE_SIZE}. * @return datatype size - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getSize() throws MPIException { @@ -229,7 +229,7 @@ public int getSize() throws MPIException /** * Commits a derived datatype. * Java binding of the MPI operation {@code MPI_TYPE_COMMIT}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void commit() throws MPIException { @@ -242,7 +242,7 @@ public void commit() throws MPIException /** * Frees the datatype. *

Java binding of the MPI operation {@code MPI_TYPE_FREE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public void free() throws MPIException { @@ -282,7 +282,7 @@ public boolean isNull() /** * Java binding of {@code MPI_TYPE_DUP}. * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Datatype dup() throws MPIException { @@ -301,7 +301,7 @@ public Datatype dup() throws MPIException * @param count replication count * @param oldType old datatype * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createContiguous(int count, Datatype oldType) throws MPIException @@ -323,7 +323,7 @@ public static Datatype createContiguous(int count, Datatype oldType) * @param stride number of elements between start of each block * @param oldType old datatype * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createVector(int count, int blockLength, int stride, Datatype oldType) @@ -348,7 +348,7 @@ private static native long getVector( * @param stride number of bytes between start of each block * @param oldType old datatype * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createHVector(int count, int blockLength, int stride, Datatype oldType) @@ -376,7 +376,7 @@ private static native long getHVector( * @param displacements displacement of each block in units of old type * @param oldType old datatype * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createIndexed(int[] blockLengths, int[] displacements, Datatype oldType) @@ -400,7 +400,7 @@ private static native long getIndexed( * @param displacements byte displacement in buffer for each block * @param oldType old datatype * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createHIndexed(int[] blockLengths, int[] displacements, Datatype oldType) @@ -425,7 +425,7 @@ private static native long getHIndexed( * @param displacements byte displacement of each block * @param types type of elements in each block * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createStruct(int[] blockLengths, int[] displacements, Datatype[] types) @@ -452,7 +452,7 @@ private static native long getStruct( * @param lb new lower bound of datatype (address integer) * @param extent new extent of datatype (address integer) * @return new datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Datatype createResized(Datatype oldType, int lb, int extent) throws MPIException @@ -467,7 +467,7 @@ public static Datatype createResized(Datatype oldType, int lb, int extent) /** * Sets the print name for the datatype. * @param name name for the datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setName(String name) throws MPIException { @@ -480,7 +480,7 @@ public void setName(String name) throws MPIException /** * Return the print name from the datatype. * @return name of the datatype - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public String getName() throws MPIException { @@ -494,7 +494,7 @@ public String getName() throws MPIException * Create a new attribute key. *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_KEYVAL}. * @return attribute key for future access - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int createKeyval() throws MPIException { @@ -508,7 +508,7 @@ public static int createKeyval() throws MPIException * Frees an attribute key. *

Java binding of the MPI operation {@code MPI_TYPE_FREE_KEYVAL}. * @param keyval attribute key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void freeKeyval(int keyval) throws MPIException { @@ -523,7 +523,7 @@ public static void freeKeyval(int keyval) throws MPIException *

Java binding of the MPI operation {@code MPI_TYPE_SET_ATTR}. * @param keyval attribute key * @param value attribute value - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setAttr(int keyval, Object value) throws MPIException { @@ -539,7 +539,7 @@ private native void setAttr(long type, int keyval, byte[] value) *

Java binding of the MPI operation {@code MPI_TYPE_GET_ATTR}. * @param keyval attribute key * @return attribute value or null if no attribute is associated with the key. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Object getAttr(int keyval) throws MPIException { @@ -554,7 +554,7 @@ public Object getAttr(int keyval) throws MPIException * Deletes an attribute value associated with a key. *

Java binding of the MPI operation {@code MPI_TYPE_DELETE_ATTR}. * @param keyval attribute key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void deleteAttr(int keyval) throws MPIException { diff --git a/ompi/mpi/java/java/DoubleInt.java b/ompi/mpi/java/java/DoubleInt.java index 18b5712ea67..eb6ada66fb2 100644 --- a/ompi/mpi/java/java/DoubleInt.java +++ b/ompi/mpi/java/java/DoubleInt.java @@ -27,6 +27,8 @@ public final class DoubleInt extends Struct /** * The struct object will be created only in MPI class. + * @param intOff int offset + * @param intSize int size * @see MPI#doubleInt */ protected DoubleInt(int intOff, int intSize) diff --git a/ompi/mpi/java/java/File.java b/ompi/mpi/java/java/File.java index f02374931d0..5a2b4530666 100644 --- a/ompi/mpi/java/java/File.java +++ b/ompi/mpi/java/java/File.java @@ -45,7 +45,7 @@ public final class File * @param comm communicator * @param filename name of the file to open * @param amode file access mode - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public File(Comm comm, String filename, int amode) throws MPIException { @@ -59,7 +59,7 @@ public File(Comm comm, String filename, int amode) throws MPIException * @param filename name of the file to open * @param amode file access mode * @param info info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public File(Comm comm, String filename, int amode, Info info) throws MPIException @@ -73,7 +73,7 @@ private native long open(long comm, String filename, int amode, long info) /** * Java binding of {@code MPI_FILE_CLOSE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void close() throws MPIException { @@ -86,7 +86,7 @@ public void close() throws MPIException /** * Java binding of {@code MPI_FILE_DELETE} using {@code MPI_INFO_NULL}. * @param filename name of the file to delete - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void delete(String filename) throws MPIException { @@ -98,7 +98,7 @@ public static void delete(String filename) throws MPIException * Java binding of {@code MPI_FILE_DELETE}. * @param filename name of the file to delete * @param info info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void delete(String filename, Info info) throws MPIException { @@ -112,7 +112,7 @@ private static native void delete(String filename, long info) /** * Java binding of {@code MPI_FILE_SET_SIZE}. * @param size size to truncate or expand file - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setSize(long size) throws MPIException { @@ -125,7 +125,7 @@ public void setSize(long size) throws MPIException /** * Java binding of {@code MPI_FILE_PREALLOCATE}. * @param size size to preallocate file - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void preallocate(long size) throws MPIException { @@ -138,7 +138,7 @@ public void preallocate(long size) throws MPIException /** * Java binding of {@code MPI_FILE_GET_SIZE}. * @return size of file in bytes - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public long getSize() throws MPIException { @@ -151,7 +151,7 @@ public long getSize() throws MPIException /** * Java binding of {@code MPI_FILE_GET_GROUP}. * @return group wich opened the file - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group getGroup() throws MPIException { @@ -164,7 +164,7 @@ public Group getGroup() throws MPIException /** * Java binding of {@code MPI_FILE_GET_AMODE}. * @return file access mode to open the file - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getAMode() throws MPIException { @@ -177,7 +177,7 @@ public int getAMode() throws MPIException /** * Java binding of {@code MPI_FILE_SET_INFO}. * @param info info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setInfo(Info info) throws MPIException { @@ -190,7 +190,7 @@ public void setInfo(Info info) throws MPIException /** * Java binding of {@code MPI_FILE_GET_INFO}. * @return new info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Info getInfo() throws MPIException { @@ -206,7 +206,7 @@ public Info getInfo() throws MPIException * @param etype elementary datatype * @param filetype filetype * @param datarep data representation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setView(long disp, Datatype etype, Datatype filetype, String datarep) @@ -224,7 +224,7 @@ public void setView(long disp, Datatype etype, * @param filetype filetype * @param datarep data representation * @param info info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setView(long disp, Datatype etype, Datatype filetype, String datarep, Info info) @@ -255,7 +255,7 @@ public FileView getView() * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readAt(long offset, Object buf, int count, Datatype type) throws MPIException @@ -288,7 +288,7 @@ private native void readAt( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readAtAll(long offset, Object buf, int count, Datatype type) throws MPIException @@ -321,7 +321,7 @@ private native void readAtAll( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeAt(long offset, Object buf, int count, Datatype type) throws MPIException @@ -354,7 +354,7 @@ private native void writeAt( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeAtAll(long offset, Object buf, int count, Datatype type) throws MPIException @@ -387,7 +387,7 @@ private native void writeAtAll( * @param count number of items in buffer * @param type datatype of each buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request iReadAt(long offset, Buffer buf, int count, Datatype type) throws MPIException @@ -408,7 +408,7 @@ private native long iReadAt( * @param count number of items in buffer * @param type datatype of each buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request iWriteAt(long offset, Buffer buf, int count, Datatype type) throws MPIException @@ -428,7 +428,7 @@ private native long iWriteAt( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status read(Object buf, int count, Datatype type) throws MPIException { @@ -457,7 +457,7 @@ private native void read( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readAll(Object buf, int count, Datatype type) throws MPIException { @@ -486,7 +486,7 @@ private native void readAll( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status write(Object buf, int count, Datatype type) throws MPIException { @@ -515,7 +515,7 @@ private native void write( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeAll(Object buf, int count, Datatype type) throws MPIException { @@ -544,7 +544,7 @@ private native void writeAll( * @param count number of items in buffer * @param type datatype of each buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request iRead(Buffer buf, int count, Datatype type) throws MPIException { @@ -562,7 +562,7 @@ private native long iRead(long fh, Buffer buf, int count, long type) * @param count number of items in buffer * @param type datatype of each buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request iWrite(Buffer buf, int count, Datatype type) throws MPIException { @@ -578,7 +578,7 @@ private native long iWrite(long fh, Buffer buf, int count, long type) * Java binding of {@code MPI_FILE_SEEK}. * @param offset file offset * @param whence update mode - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void seek(long offset, int whence) throws MPIException { @@ -591,7 +591,7 @@ public void seek(long offset, int whence) throws MPIException /** * Java binding of {@code MPI_FILE_GET_POSITION}. * @return offset of individual pointer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public long getPosition() throws MPIException { @@ -605,7 +605,7 @@ public long getPosition() throws MPIException * Java binding of {@code MPI_FILE_GET_BYTE_OFFSET}. * @param offset offset * @return absolute byte position of offset - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public long getByteOffset(long offset) throws MPIException { @@ -621,7 +621,7 @@ public long getByteOffset(long offset) throws MPIException * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readShared(Object buf, int count, Datatype type) throws MPIException @@ -653,7 +653,7 @@ private native void readShared( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeShared(Object buf, int count, Datatype type) throws MPIException @@ -685,7 +685,7 @@ private native void writeShared( * @param count number of items in buffer * @param type datatype of each buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request iReadShared(Buffer buf, int count, Datatype type) throws MPIException @@ -704,7 +704,7 @@ private native long iReadShared(long fh, Buffer buf, int count, long type) * @param count number of items in buffer * @param type datatype of each buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request iWriteShared(Buffer buf, int count, Datatype type) throws MPIException @@ -723,7 +723,7 @@ private native long iWriteShared(long fh, Buffer buf, int count, long type) * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readOrdered(Object buf, int count, Datatype type) throws MPIException @@ -755,7 +755,7 @@ private native void readOrdered( * @param count number of items in buffer * @param type datatype of each buffer element * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeOrdered(Object buf, int count, Datatype type) throws MPIException @@ -785,7 +785,7 @@ private native void writeOrdered( * Java binding of {@code MPI_FILE_SEEK_SHARED}. * @param offset file offset * @param whence update mode - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void seekShared(long offset, int whence) throws MPIException { @@ -799,7 +799,7 @@ private native void seekShared(long fh, long offset, int whence) /** * Java binding of {@code MPI_FILE_GET_POSITION_SHARED}. * @return offset of individual pointer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public long getPositionShared() throws MPIException { @@ -815,7 +815,7 @@ public long getPositionShared() throws MPIException * @param buf buffer * @param count number of items in buffer * @param type datatype of each buffer element - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void readAtAllBegin(long offset, Object buf, int count, Datatype type) throws MPIException @@ -852,7 +852,7 @@ private native void readAtAllBegin( * Java binding of {@code MPI_FILE_READ_AT_ALL_END}. * @param buf buffer * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readAtAllEnd(Object buf) throws MPIException { @@ -879,7 +879,7 @@ private native void readAtAllEnd(long fh, Object buf, long[] stat) * @param buf buffer * @param count number of items in buffer * @param type datatype of each buffer element - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void writeAtAllBegin(long offset, Object buf, int count, Datatype type) throws MPIException @@ -916,7 +916,7 @@ private native void writeAtAllBegin( * Java binding of {@code MPI_FILE_WRITE_AT_ALL_END}. * @param buf buffer * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeAtAllEnd(Object buf) throws MPIException { @@ -942,7 +942,7 @@ private native void writeAtAllEnd(long fh, Object buf, long[] stat) * @param buf buffer * @param count number of items in buffer * @param type datatype of each buffer element - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void readAllBegin(Object buf, int count, Datatype type) throws MPIException @@ -978,7 +978,7 @@ private native void readAllBegin(long fh, Object buf, int count, long type) * Java binding of {@code MPI_FILE_READ_ALL_END}. * @param buf buffer * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readAllEnd(Object buf) throws MPIException { @@ -1004,7 +1004,7 @@ private native void readAllEnd(long fh, Object buf, long[] stat) * @param buf buffer * @param count number of items in buffer * @param type datatype of each buffer element - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void writeAllBegin(Object buf, int count, Datatype type) throws MPIException @@ -1040,7 +1040,7 @@ private native void writeAllBegin(long fh, Object buf, int count, long type) * Java binding of {@code MPI_FILE_WRITE_ALL_END}. * @param buf buffer * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeAllEnd(Object buf) throws MPIException { @@ -1066,7 +1066,7 @@ private native void writeAllEnd(long fh, Object buf, long[] stat) * @param buf buffer * @param count number of items in buffer * @param type datatype of each buffer element - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void readOrderedBegin(Object buf, int count, Datatype type) throws MPIException @@ -1102,7 +1102,7 @@ private native void readOrderedBegin(long fh, Object buf, int count, long type) * Java binding of {@code MPI_FILE_READ_ORDERED_END}. * @param buf buffer * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status readOrderedEnd(Object buf) throws MPIException { @@ -1128,7 +1128,7 @@ private native void readOrderedEnd(long fh, Object buf, long[] stat) * @param buf buffer * @param count number of items in buffer * @param type datatype of each buffer element - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void writeOrderedBegin(Object buf, int count, Datatype type) throws MPIException @@ -1164,7 +1164,7 @@ private native void writeOrderedBegin(long fh, Object buf, int count, long type) * Java binding of {@code MPI_FILE_WRITE_ORDERED_END}. * @param buf buffer * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status writeOrderedEnd(Object buf) throws MPIException { @@ -1194,9 +1194,9 @@ private Status getBeginStatus() /** * Java binding of {@code MPI_FILE_GET_TYPE_EXTENT}. - * @param type + * @param type type of data * @return datatype extent - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getTypeExtent(Datatype type) throws MPIException { @@ -1209,7 +1209,7 @@ public int getTypeExtent(Datatype type) throws MPIException /** * Java binding of {@code MPI_FILE_SET_ATOMICITY}. * @param atomicity true to set atomic mode, false to set nonatomic mode - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setAtomicity(boolean atomicity) throws MPIException { @@ -1222,7 +1222,7 @@ private native void setAtomicity(long fh, boolean atomicity) /** * Java binding of {@code MPI_FILE_SYNC}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void sync() throws MPIException { diff --git a/ompi/mpi/java/java/FloatInt.java b/ompi/mpi/java/java/FloatInt.java index 60991cfd50c..5950440c93a 100644 --- a/ompi/mpi/java/java/FloatInt.java +++ b/ompi/mpi/java/java/FloatInt.java @@ -27,6 +27,8 @@ public final class FloatInt extends Struct /** * The struct object will be created only in MPI class. + * @param intOff int offset + * @param intSize int size * @see MPI#floatInt */ protected FloatInt(int intOff, int intSize) diff --git a/ompi/mpi/java/java/Freeable.java b/ompi/mpi/java/java/Freeable.java index 7ce1163ff7c..7b9c0697e70 100644 --- a/ompi/mpi/java/java/Freeable.java +++ b/ompi/mpi/java/java/Freeable.java @@ -50,7 +50,7 @@ public interface Freeable { /** * Frees a freeable object. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ void free() throws MPIException; } diff --git a/ompi/mpi/java/java/GraphComm.java b/ompi/mpi/java/java/GraphComm.java index 9424f383cc5..65639334f8e 100644 --- a/ompi/mpi/java/java/GraphComm.java +++ b/ompi/mpi/java/java/GraphComm.java @@ -90,7 +90,7 @@ protected GraphComm(long[] commRequest) * Duplicates this communicator. *

Java binding of {@code MPI_COMM_DUP}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public GraphComm dup() throws MPIException { @@ -104,7 +104,7 @@ protected GraphComm(long[] commRequest) * The request object must be obtained calling {@link #getRequest}. *

Java binding of {@code MPI_COMM_IDUP}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public GraphComm iDup() throws MPIException { @@ -120,7 +120,7 @@ protected GraphComm(long[] commRequest) * from the sizes of the {@code index} and {@code edges} fields * of the returned object. * @return object defining node degress and edges of graph - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public GraphParms getDims() throws MPIException { @@ -137,7 +137,7 @@ public GraphParms getDims() throws MPIException *

The number of neighbors can be extracted from the size of the result. * @param rank rank of a process in the group of this communicator * @return array of ranks of neighbouring processes to one specified - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int[] getNeighbors(int rank) throws MPIException { @@ -150,7 +150,7 @@ public int[] getNeighbors(int rank) throws MPIException /** * Gets the adjacency information for a distributed graph topology. * @return adjacency information for a distributed graph topology - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public DistGraphNeighbors getDistGraphNeighbors() throws MPIException { @@ -168,7 +168,7 @@ private native DistGraphNeighbors getDistGraphNeighbors(long comm) * @param index node degrees * @param edges graph edges * @return reordered rank of calling process - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int map(int[] index, int[] edges) throws MPIException { diff --git a/ompi/mpi/java/java/Group.java b/ompi/mpi/java/java/Group.java index f7d93b1247c..0b225cd98be 100644 --- a/ompi/mpi/java/java/Group.java +++ b/ompi/mpi/java/java/Group.java @@ -70,7 +70,7 @@ protected Group(long handle) /** * Java binding of the MPI operation {@code MPI_GROUP_SIZE}. * @return number of processes in the group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getSize() throws MPIException { @@ -85,7 +85,7 @@ public int getSize() throws MPIException *

Java binding of the MPI operation {@code MPI_GROUP_RANK}. * @return rank of this process in the group, or {@code MPI.UNDEFINED} * if this process is not a member of the group. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getRank() throws MPIException { @@ -123,7 +123,7 @@ public boolean isNull() * @param ranks1 array of valid ranks in group1 * @param group2 another group * @return array of corresponding ranks in group2 - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int[] translateRanks(Group group1, int[] ranks1, Group group2) throws MPIException @@ -143,7 +143,7 @@ private static native int[] translateRanks( * @return {@code MPI.IDENT} if the group members and group order are exactly * the same in both groups, {@code MPI.SIMILAR} if the group members are * the same but the order is different, {@code MPI.UNEQUAL} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int compare(Group group1, Group group2) throws MPIException { @@ -159,7 +159,7 @@ public static int compare(Group group1, Group group2) throws MPIException * @param group1 first group * @param group2 second group * @return union group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Group union(Group group1, Group group2) throws MPIException { @@ -175,7 +175,7 @@ public static Group union(Group group1, Group group2) throws MPIException * @param group1 first group * @param group2 second group * @return intersection group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Group intersection(Group group1, Group group2) throws MPIException { @@ -191,7 +191,7 @@ public static Group intersection(Group group1, Group group2) throws MPIException * @param group1 first group * @param group2 second group * @return difference group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Group difference(Group group1, Group group2) throws MPIException { @@ -206,7 +206,7 @@ public static Group difference(Group group1, Group group2) throws MPIException *

Java binding of the MPI operation {@code MPI_GROUP_INCL}. * @param ranks ranks from this group to appear in new group * @return new group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group incl(int[] ranks) throws MPIException { @@ -221,7 +221,7 @@ public Group incl(int[] ranks) throws MPIException *

Java binding of the MPI operation {@code MPI_GROUP_EXCL}. * @param ranks ranks from this group not to appear in new group * @return new group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group excl(int[] ranks) throws MPIException { @@ -241,7 +241,7 @@ public Group excl(int[] ranks) throws MPIException * of triplets. The size of the second dimension is 3. * @param ranges array of integer triplets * @return new group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group rangeIncl(int[][] ranges) throws MPIException { @@ -259,7 +259,7 @@ public Group rangeIncl(int[][] ranges) throws MPIException * indicating ranks in this group to be excluded from the new group. * @param ranges array of integer triplets * @return new group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group rangeExcl(int[][] ranges) throws MPIException { diff --git a/ompi/mpi/java/java/Info.java b/ompi/mpi/java/java/Info.java index c836b3aae02..04ff3acfbe7 100644 --- a/ompi/mpi/java/java/Info.java +++ b/ompi/mpi/java/java/Info.java @@ -28,6 +28,7 @@ public final class Info implements Freeable /** * Java binding of the MPI operation {@code MPI_INFO_CREATE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Info() throws MPIException { @@ -54,7 +55,7 @@ protected static Info newEnv() * Java binding of the MPI operation {@code MPI_INFO_SET}. * @param key key * @param value value - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void set(String key, String value) throws MPIException { @@ -69,7 +70,7 @@ private native void set(long handle, String key, String value) * Java binding of the MPI operation {@code MPI_INFO_SET}. * @param key key * @return value or {@code null} if key is not defined - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public String get(String key) throws MPIException { @@ -82,7 +83,7 @@ public String get(String key) throws MPIException /** * Java binding of the MPI operation {@code MPI_INFO_SET}. * @param key key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void delete(String key) throws MPIException { @@ -95,7 +96,7 @@ public void delete(String key) throws MPIException /** * Java binding of the MPI operation {@code MPI_INFO_GET_NKEYS}. * @return number of defined keys - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int size() throws MPIException { @@ -109,7 +110,7 @@ public int size() throws MPIException * Java binding of the MPI operation {@code MPI_INFO_GET_NTHKEY}. * @param i key number * @return key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public String getKey(int i) throws MPIException { @@ -140,7 +141,7 @@ public String getKey(int i) throws MPIException /** * Java binding of the MPI operation {@code MPI_INFO_DUP}. * @return info object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Info dup() throws MPIException { @@ -152,7 +153,7 @@ public Info dup() throws MPIException /** * Java binding of the MPI operation {@code MPI_INFO_FREE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public void free() throws MPIException { diff --git a/ompi/mpi/java/java/Int2.java b/ompi/mpi/java/java/Int2.java index fd36d4f8f63..73c93a6fec4 100644 --- a/ompi/mpi/java/java/Int2.java +++ b/ompi/mpi/java/java/Int2.java @@ -27,6 +27,8 @@ public final class Int2 extends Struct /** * The struct object will be created only in MPI class. + * @param intOff int offset + * @param intSize int size * @see MPI#int2 */ protected Int2(int intOff, int intSize) diff --git a/ompi/mpi/java/java/Intercomm.java b/ompi/mpi/java/java/Intercomm.java index 8609c1a6c4a..f36f21295c1 100644 --- a/ompi/mpi/java/java/Intercomm.java +++ b/ompi/mpi/java/java/Intercomm.java @@ -83,7 +83,7 @@ protected Intercomm(long[] commRequest) * Duplicates this communicator. *

Java binding of {@code MPI_COMM_DUP}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public Intercomm dup() throws MPIException { @@ -97,7 +97,7 @@ protected Intercomm(long[] commRequest) *

The new communicator can't be used before the operation completes. * The request object must be obtained calling {@link #getRequest}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public Intercomm iDup() throws MPIException { @@ -111,7 +111,7 @@ protected Intercomm(long[] commRequest) * Size of remote group. *

Java binding of the MPI operation {@code MPI_COMM_REMOTE_SIZE}. * @return number of process in remote group of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getRemoteSize() throws MPIException { @@ -125,7 +125,7 @@ public int getRemoteSize() throws MPIException * Return the remote group. *

Java binding of the MPI operation {@code MPI_COMM_REMOTE_GROUP}. * @return remote group of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group getRemoteGroup() throws MPIException { @@ -140,7 +140,7 @@ public Group getRemoteGroup() throws MPIException *

Java binding of the MPI operation {@code MPI_INTERCOMM_MERGE}. * @param high true if the local group has higher ranks in combined group * @return new intra-communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Intracomm merge(boolean high) throws MPIException { @@ -153,7 +153,7 @@ public Intracomm merge(boolean high) throws MPIException /** * Java binding of {@code MPI_COMM_GET_PARENT}. * @return the parent communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Intercomm getParent() throws MPIException { diff --git a/ompi/mpi/java/java/Intracomm.java b/ompi/mpi/java/java/Intracomm.java index a1eb7347171..f572252e449 100644 --- a/ompi/mpi/java/java/Intracomm.java +++ b/ompi/mpi/java/java/Intracomm.java @@ -102,7 +102,7 @@ protected Intracomm(long[] commRequest) * Duplicates this communicator. *

Java binding of {@code MPI_COMM_DUP}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public Intracomm dup() throws MPIException { @@ -116,7 +116,7 @@ protected Intracomm(long[] commRequest) *

The new communicator can't be used before the operation completes. * The request object must be obtained calling {@link #getRequest}. * @return copy of this communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public Intracomm iDup() throws MPIException { @@ -131,7 +131,7 @@ protected Intracomm(long[] commRequest) * @param colour control of subset assignment * @param key control of rank assignment * @return new communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intracomm split(int colour, int key) throws MPIException { @@ -149,7 +149,7 @@ public final Intracomm split(int colour, int key) throws MPIException * @param key control of rank assignment * @param info info argument * @return new communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intracomm splitType(int splitType, int key, Info info) throws MPIException { @@ -164,7 +164,7 @@ public final Intracomm splitType(int splitType, int key, Info info) throws MPIEx *

Java binding of the MPI operation {@code MPI_COMM_CREATE}. * @param group group which is a subset of the group of this communicator * @return new communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intracomm create(Group group) throws MPIException { @@ -191,7 +191,7 @@ public final Intracomm create(Group group) throws MPIException * @param reorder {@code true} if ranking may be reordered, * {@code false} if not * @return new cartesian topology communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final CartComm createCart(int[] dims, boolean[] periods, boolean reorder) throws MPIException @@ -214,7 +214,7 @@ private native long createCart( * @param reorder {@code true} if ranking may be reordered, * {@code false} if not * @return new graph topology communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final GraphComm createGraph(int[] index, int[] edges, boolean reorder) throws MPIException @@ -239,7 +239,7 @@ private native long createGraph( * @param info hints on optimization and interpretation of weights * @param reorder the process may be reordered (true) or not (false) * @return communicator with distributed graph topology - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final GraphComm createDistGraph( int[] sources, int[] degrees, int[] destinations, @@ -265,7 +265,7 @@ public final GraphComm createDistGraph( * @param info hints on optimization and interpretation of weights * @param reorder the process may be reordered (true) or not (false) * @return communicator with distributed graph topology - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final GraphComm createDistGraph( int[] sources, int[] degrees, int[] destinations, @@ -300,7 +300,7 @@ private native long createDistGraph( * @param info hints on optimization and interpretation of weights * @param reorder the process may be reordered (true) or not (false) * @return communicator with distributed graph topology - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final GraphComm createDistGraphAdjacent( int[] sources, int[] sourceWeights, @@ -328,7 +328,7 @@ public final GraphComm createDistGraphAdjacent( * @param info hints on optimization and interpretation of weights * @param reorder the process may be reordered (true) or not (false) * @return communicator with distributed graph topology - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final GraphComm createDistGraphAdjacent( int[] sources, int[] destinations, Info info, boolean reorder) @@ -355,7 +355,7 @@ private native long createDistGraphAdjacent( * @param count number of items in input buffer * @param type data type of each item in input buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scan(Object sendbuf, Object recvbuf, int count, Datatype type, Op op) @@ -395,7 +395,7 @@ public final void scan(Object sendbuf, Object recvbuf, * @param count number of items in input buffer * @param type data type of each item in input buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void scan(Object recvbuf, int count, Datatype type, Op op) throws MPIException @@ -430,7 +430,7 @@ private native void scan( * @param type data type of each item in input buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScan(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op) @@ -453,7 +453,7 @@ public final Request iScan(Buffer sendbuf, Buffer recvbuf, * @param type data type of each item in buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iScan(Buffer buf, int count, Datatype type, Op op) throws MPIException @@ -479,7 +479,7 @@ private native long iScan( * @param count number of items in input buffer * @param type data type of each item in input buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void exScan(Object sendbuf, Object recvbuf, int count, Datatype type, Op op) @@ -519,7 +519,7 @@ public final void exScan(Object sendbuf, Object recvbuf, * @param count number of items in input buffer * @param type data type of each item in input buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void exScan(Object buf, int count, Datatype type, Op op) throws MPIException @@ -554,7 +554,7 @@ private native void exScan( * @param type data type of each item in input buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iExScan(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op) @@ -577,7 +577,7 @@ public final Request iExScan(Buffer sendbuf, Buffer recvbuf, * @param type data type of each item in input buffer * @param op reduce operation * @return communication request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request iExScan(Buffer buf, int count, Datatype type, Op op) throws MPIException @@ -598,7 +598,7 @@ private native long iExScan( /** * Java binding of {@code MPI_OPEN_PORT} using {@code MPI_INFO_NULL}. * @return port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static String openPort() throws MPIException { @@ -610,7 +610,7 @@ public static String openPort() throws MPIException * Java binding of {@code MPI_OPEN_PORT}. * @param info implementation-specific information * @return port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static String openPort(Info info) throws MPIException { @@ -623,7 +623,7 @@ public static String openPort(Info info) throws MPIException /** * Java binding of {@code MPI_CLOSE_PORT}. * @param name port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void closePort(String name) throws MPIException { @@ -638,6 +638,7 @@ public static void closePort(String name) throws MPIException * @param port port name * @param root rank in comm of root node * @return intercommunicator with client as remote group + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm accept(String port, int root) throws MPIException { @@ -651,7 +652,7 @@ public final Intercomm accept(String port, int root) throws MPIException * @param info implementation-specific information * @param root rank in comm of root node * @return intercommunicator with client as remote group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm accept(String port, Info info, int root) throws MPIException @@ -668,7 +669,7 @@ private native long accept(long comm, String port, long info, int root) * @param port port name * @param root rank in comm of root node * @return intercommunicator with server as remote group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm connect(String port, int root) throws MPIException { @@ -682,7 +683,7 @@ public final Intercomm connect(String port, int root) throws MPIException * @param info implementation-specific information * @param root rank in comm of root node * @return intercommunicator with server as remote group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm connect(String port, Info info, int root) throws MPIException @@ -698,7 +699,7 @@ private native long connect(long comm, String port, long info, int root) * Java binding of {@code MPI_PUBLISH_NAME} using {@code MPI_INFO_NULL}. * @param service service name * @param port port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void publishName(String service, String port) throws MPIException @@ -712,7 +713,7 @@ public static void publishName(String service, String port) * @param service service name * @param info implementation-specific information * @param port port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void publishName(String service, Info info, String port) throws MPIException @@ -728,7 +729,7 @@ private native static void publishName(String service, long info, String port) * Java binding of {@code MPI_UNPUBLISH_NAME} using {@code MPI_INFO_NULL}. * @param service service name * @param port port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void unpublishName(String service, String port) throws MPIException @@ -742,7 +743,7 @@ public static void unpublishName(String service, String port) * @param service service name * @param info implementation-specific information * @param port port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void unpublishName(String service, Info info, String port) throws MPIException @@ -758,7 +759,7 @@ private native static void unpublishName(String service, long info, String port) * Java binding of {@code MPI_LOOKUP_NAME} using {@code MPI_INFO_NULL}. * @param service service name * @return port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static String lookupName(String service) throws MPIException { @@ -771,7 +772,7 @@ public static String lookupName(String service) throws MPIException * @param service service name * @param info mplementation-specific information * @return port name - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static String lookupName(String service, Info info) throws MPIException { @@ -795,7 +796,7 @@ private native static String lookupName(String service, long info) * @param errcodes one code per process; if this parameter is null, * {@code MPI_ERRCODES_IGNORE} will be used. * @return intercommunicator between original group and the newly spawned group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm spawn(String command, String[] argv, int maxprocs, Info info, int root, int[] errcodes) @@ -824,7 +825,7 @@ private native long spawn(long comm, String command, String[] argv, * @param errcodes one code per process; if this parameter is null, * {@code MPI_ERRCODES_IGNORE} will be used. * @return intercommunicator between original group and the newly spawned group - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Intercomm spawnMultiple( String[] commands, String[][] argv, int[] maxprocs, diff --git a/ompi/mpi/java/java/LongInt.java b/ompi/mpi/java/java/LongInt.java index 5b80817d49b..fcde87c2363 100644 --- a/ompi/mpi/java/java/LongInt.java +++ b/ompi/mpi/java/java/LongInt.java @@ -27,6 +27,9 @@ public final class LongInt extends Struct /** * The struct object will be created only in MPI class. + * @param longSize size of long + * @param intOff int offset + * @param intSize int size * @see MPI#longInt */ protected LongInt(int longSize, int intOff, int intSize) diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index b0440569d83..0733767641f 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -435,7 +435,7 @@ private static void initCommon() throws MPIException *

Java binding of the MPI operation {@code MPI_INIT}. * @param args arguments to the {@code main} method. * @return arguments - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static String[] Init(String[] args) throws MPIException { @@ -455,7 +455,7 @@ public static String[] Init(String[] args) throws MPIException * @param args arguments to the {@code main} method. * @param required desired level of thread support * @return provided level of thread support - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int InitThread(String[] args, int required) throws MPIException { @@ -473,7 +473,7 @@ private static native int InitThread_jni(String[] args, int required) /** * Java binding of the MPI operation {@code MPI_QUERY_THREAD}. * @return provided level of thread support - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int queryThread() throws MPIException { @@ -486,7 +486,7 @@ public static int queryThread() throws MPIException /** * Java binding of the MPI operation {@code MPI_IS_THREAD_MAIN}. * @return true if it is the main thread - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static boolean isThreadMain() throws MPIException { @@ -499,7 +499,7 @@ public static boolean isThreadMain() throws MPIException /** * Finalize MPI. *

Java binding of the MPI operation {@code MPI_FINALIZE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void Finalize() throws MPIException { @@ -514,7 +514,7 @@ public static void Finalize() throws MPIException * Returns an elapsed time on the calling processor. *

Java binding of the MPI operation {@code MPI_WTIME}. * @return time in seconds since an arbitrary time in the past. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static double wtime() throws MPIException { @@ -528,7 +528,7 @@ public static double wtime() throws MPIException * Returns resolution of timer. *

Java binding of the MPI operation {MPI_WTICK}. * @return resolution of {@code wtime} in seconds. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static double wtick() throws MPIException { @@ -542,7 +542,7 @@ public static double wtick() throws MPIException * Returns the name of the processor on which it is called. *

Java binding of the MPI operation {@code MPI_GET_PROCESSOR_NAME}. * @return A unique specifier for the actual node. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ static public String getProcessorName() throws MPIException { @@ -559,7 +559,7 @@ static public String getProcessorName() throws MPIException *

Java binding of the MPI operation {@code MPI_INITIALIZED}. * @return {@code true} if {@code Init} has been called, * {@code false} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ static public native boolean isInitialized() throws MPIException; @@ -568,7 +568,7 @@ static public String getProcessorName() throws MPIException *

Java binding of the MPI operation {@code MPI_FINALIZED}. * @return {@code true} if {@code Finalize} has been called, * {@code false} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ static public native boolean isFinalized() throws MPIException; @@ -576,7 +576,7 @@ static public String getProcessorName() throws MPIException * Attaches a user-provided buffer for sending. *

Java binding of the MPI operation {@code MPI_BUFFER_ATTACH}. * @param buffer initial buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ static public void attachBuffer(byte[] buffer) throws MPIException { @@ -591,7 +591,7 @@ static public void attachBuffer(byte[] buffer) throws MPIException * Removes an existing buffer (for use in sending). *

Java binding of the MPI operation {@code MPI_BUFFER_DETACH}. * @return initial buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ static public byte[] detachBuffer() throws MPIException { @@ -618,7 +618,7 @@ public static void pControl(int level, Object obj) /** * Check if MPI has been initialized and hasn't been finalized. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ protected static void check() throws MPIException { @@ -772,8 +772,8 @@ protected static void assertDirectBuffer(Buffer buf) /** * Asserts that buffers are direct. - * @param sendbuf - * @param recvbuf + * @param sendbuf The send buffer + * @param recvbuf The receive buffer */ protected static void assertDirectBuffer(Buffer sendbuf, Buffer recvbuf) { diff --git a/ompi/mpi/java/java/Message.java b/ompi/mpi/java/java/Message.java index 82588b6b75a..2a429bd46ef 100644 --- a/ompi/mpi/java/java/Message.java +++ b/ompi/mpi/java/java/Message.java @@ -76,7 +76,7 @@ public boolean isNoProc() * @param tag message tag * @param comm communicator * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status mProbe(int source, int tag, Comm comm) throws MPIException { @@ -95,7 +95,7 @@ private native long mProbe(int source, int tag, long comm, long[] status) * @param tag message tag * @param comm communicator * @return status object if there is a message, {@code null} otherwise - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status imProbe(int source, int tag, Comm comm) throws MPIException { @@ -112,6 +112,7 @@ private native Status imProbe(int source, int tag, long comm) * @param count number of elements in receve buffer * @param type datatype of each receive buffer element * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Status mRecv(Object buf, int count, Datatype type) throws MPIException { @@ -142,7 +143,7 @@ private native long mRecv( * @param count number of elements in receve buffer * @param type datatype of each receive buffer element * @return request object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request imRecv(Buffer buf, int count, Datatype type) throws MPIException diff --git a/ompi/mpi/java/java/Op.java b/ompi/mpi/java/java/Op.java index bc417672425..f680449a441 100644 --- a/ompi/mpi/java/java/Op.java +++ b/ompi/mpi/java/java/Op.java @@ -118,7 +118,7 @@ public boolean isCommutative() /** * Java binding of the MPI operation {@code MPI_OP_FREE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public native void free() throws MPIException; diff --git a/ompi/mpi/java/java/Prequest.java b/ompi/mpi/java/java/Prequest.java index 342191b99a6..2ddd018d161 100644 --- a/ompi/mpi/java/java/Prequest.java +++ b/ompi/mpi/java/java/Prequest.java @@ -52,6 +52,7 @@ public final class Prequest extends Request { /** * Constructor used by {@code sendInit}, etc. + * @param handle Handle for the Prequest object */ protected Prequest(long handle) { @@ -65,6 +66,7 @@ protected Prequest(long handle) * one of the {@code wait} or {@code test} operations. * On successful completion the request becomes inactive again. * It can be reactivated by a further call to {@code Start}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void start() throws MPIException { @@ -77,7 +79,7 @@ public void start() throws MPIException * Activate a list of communication requests. *

Java binding of the MPI operation {@code MPI_STARTALL}. * @param requests array of requests - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void startAll(Prequest[] requests) throws MPIException { diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index b9ddee9f819..afe2a800912 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -100,6 +100,7 @@ protected Request(long handle) /** * Mark a pending nonblocking communication for cancellation. * Java binding of the MPI operation {@code MPI_CANCEL}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void cancel() throws MPIException { @@ -123,7 +124,7 @@ public final boolean isNull() *

Java binding of the MPI operation {@code MPI_WAIT}. *

After the call returns, the request object becomes inactive. * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Status waitStatus() throws MPIException { @@ -139,7 +140,7 @@ public final Status waitStatus() throws MPIException * Blocks until the operation identified by the request is complete. *

Java binding of the MPI operation {@code MPI_WAIT}. *

After the call returns, the request object becomes inactive. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final void waitFor() throws MPIException { @@ -156,7 +157,7 @@ public final void waitFor() throws MPIException *

After the call, if the operation is complete (ie, if the return * value is non-null), the request object becomes inactive. * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Status testStatus() throws MPIException { @@ -173,7 +174,7 @@ public final Status testStatus() throws MPIException *

After the call, if the operation is complete (ie, if the return * value is true), the request object becomes inactive. * @return true if the operation identified by the request, false otherwise - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final boolean test() throws MPIException { @@ -193,7 +194,7 @@ public final boolean test() throws MPIException * of array of {@code requests} becomes inactive. * @param requests array of requests * @return status object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Status waitAnyStatus(Request[] requests) throws MPIException { @@ -217,7 +218,7 @@ private static native void waitAnyStatus(long[] requests, long[] status) * @return The index in array of {@code requests} for the request that * completed. If all of the requests are MPI_REQUEST_NULL, then index * is returned as {@code MPI.UNDEFINED}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int waitAny(Request[] requests) throws MPIException { @@ -240,7 +241,7 @@ public static int waitAny(Request[] requests) throws MPIException * If no request completed, {testAny} returns {@code null}. * @param requests array of requests * @return status object if one request completed, {@code null} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Status testAnyStatus(Request[] requests) throws MPIException { @@ -261,7 +262,7 @@ public static Status testAnyStatus(Request[] requests) throws MPIException * @param requests array of requests * @return index of operation that completed, or {@code MPI.UNDEFINED} * if none completed. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int testAny(Request[] requests) throws MPIException { @@ -283,7 +284,7 @@ public static int testAny(Request[] requests) throws MPIException * elements of the status array will contain null status references. * @param requests array of requests * @return array of statuses - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Status[] waitAllStatus(Request[] requests) throws MPIException { @@ -302,7 +303,7 @@ private static native Status[] waitAllStatus(long[] requests) * requests in the array have completed. *

Java binding of the MPI operation {@code MPI_WAITALL}. * @param requests array of requests - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void waitAll(Request[] requests) throws MPIException { @@ -323,7 +324,7 @@ public static void waitAll(Request[] requests) throws MPIException * @param requests array of requests * @return array of statuses if all operations have completed, * {@code null} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Status[] testAllStatus(Request[] requests) throws MPIException { @@ -344,7 +345,7 @@ private static native Status[] testAllStatus(long[] requests) * @param requests array of requests * @return {@code true} if all operations have completed, * {@code false} otherwise. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static boolean testAll(Request[] requests) throws MPIException { @@ -369,7 +370,7 @@ public static boolean testAll(Request[] requests) throws MPIException * @param requests array of requests * @return array of statuses or {@code null} if the number of operations * completed is {@code MPI_UNDEFINED}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Status[] waitSomeStatus(Request[] requests) throws MPIException { @@ -393,7 +394,7 @@ private static native Status[] waitSomeStatus(long[] requests) * @param requests array of requests * @return array of indexes of {@code requests} that completed or {@code null} * if the number of operations completed is {@code MPI_UNDEFINED}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int[] waitSome(Request[] requests) throws MPIException { @@ -413,7 +414,7 @@ public static int[] waitSome(Request[] requests) throws MPIException * length zero, otherwise the return value are as for {@code waitSome}. * @param requests array of requests * @return array of statuses - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static Status[] testSomeStatus(Request[] requests) throws MPIException { @@ -434,7 +435,7 @@ private static native Status[] testSomeStatus(long[] requests) * length zero, otherwise the return value are as for {@code waitSome}. * @param requests array of requests * @return array of indexes of {@code requests} that completed. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int[] testSome(Request[] requests) throws MPIException { diff --git a/ompi/mpi/java/java/ShortInt.java b/ompi/mpi/java/java/ShortInt.java index bb764d4bcc3..6e81f9baa18 100644 --- a/ompi/mpi/java/java/ShortInt.java +++ b/ompi/mpi/java/java/ShortInt.java @@ -27,6 +27,9 @@ public final class ShortInt extends Struct /** * The struct object will be created only in MPI class. + * @param shortSize short size + * @param intOff int offset + * @param intSize int size * @see MPI#shortInt */ protected ShortInt(int shortSize, int intOff, int intSize) diff --git a/ompi/mpi/java/java/Status.java b/ompi/mpi/java/java/Status.java index 393fcd35181..4830e05e5f7 100644 --- a/ompi/mpi/java/java/Status.java +++ b/ompi/mpi/java/java/Status.java @@ -72,7 +72,7 @@ protected Status() *

Java binding of the MPI operation {@code MPI_GET_COUNT}. * @param datatype datatype of each item in receive buffer * @return number of received entries - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getCount(Datatype datatype) throws MPIException { @@ -94,7 +94,7 @@ private native int getCount( * Tests if the communication was cancelled. *

Java binding of the MPI operation {@code MPI_TEST_CANCELLED}. * @return true if the operation was succesfully cancelled, false otherwise - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public boolean isCancelled() throws MPIException { @@ -117,7 +117,7 @@ private native boolean isCancelled( *

Java binding of the MPI operation {@code MPI_GET_ELEMENTS}. * @param datatype datatype used by receive operation * @return number of received basic elements - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public int getElements(Datatype datatype) throws MPIException { diff --git a/ompi/mpi/java/java/Struct.java b/ompi/mpi/java/java/Struct.java index a65d76b4fbc..b7d1c831435 100644 --- a/ompi/mpi/java/java/Struct.java +++ b/ompi/mpi/java/java/Struct.java @@ -64,7 +64,7 @@ private void createStruct() throws MPIException /** * Returns the extent of the struct data type. * @return Extent of the struct data type. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int getExtent() throws MPIException { @@ -75,7 +75,7 @@ public final int getExtent() throws MPIException /** * Returns the data type of the struct. * @return The data type of the struct. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Datatype getType() throws MPIException { @@ -102,7 +102,7 @@ private T newData(ByteBuffer buffer, int offset) * Gets a Data object in order to access to the buffer. * @param buffer the Data object will read/write on this buffer. * @return Data object - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final T getData(ByteBuffer buffer) throws MPIException { @@ -116,7 +116,7 @@ public final T getData(ByteBuffer buffer) throws MPIException * @param buffer The Data object will read/write on this buffer. * @param index Index of the struct in the buffer. * @return Data object. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final T getData(ByteBuffer buffer, int index) throws MPIException @@ -129,7 +129,7 @@ public final T getData(ByteBuffer buffer, int index) * Gets a Data object in order to access to the byte array. * @param array The Data object will read/write on this byte array. * @return Data object. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final T getData(byte[] array) throws MPIException { @@ -144,7 +144,7 @@ public final T getData(byte[] array) throws MPIException * @param array The Data object will read/write on this byte array. * @param index Index of the struct in the array. * @return Data object. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final T getData(byte[] array, int index) throws MPIException @@ -323,7 +323,7 @@ public final int addDouble(int length) * Adds a struct field to this struct. * @param struct Type of the field. * @return Offset of the new field. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int addStruct(Struct struct) throws MPIException { @@ -335,7 +335,7 @@ public final int addStruct(Struct struct) throws MPIException * @param struct Type of the array. * @param length Length of the array. * @return Offset of the new field. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int addStruct(Struct struct, int length) throws MPIException { @@ -347,7 +347,7 @@ public final int addStruct(Struct struct, int length) throws MPIException * Adds a field of the specified data type. * @param type Data type. * @return Offset of the new field. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int addData(Datatype type) throws MPIException { @@ -359,7 +359,7 @@ public final int addData(Datatype type) throws MPIException * @param type Data type. * @param length Length of the array. * @return Offset of the new field. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final int addData(Datatype type, int length) throws MPIException { @@ -776,7 +776,7 @@ protected final ByteBuffer getBuffer(Datatype type, int field) * @param field Offset of the buffer array. * @param index Index of the buffer in the array. * @return Buffer object. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ protected final ByteBuffer getBuffer(Datatype type, int field, int index) throws MPIException diff --git a/ompi/mpi/java/java/UserFunction.java b/ompi/mpi/java/java/UserFunction.java index 6a497cda7ea..65e4cf2f6f9 100644 --- a/ompi/mpi/java/java/UserFunction.java +++ b/ompi/mpi/java/java/UserFunction.java @@ -54,10 +54,11 @@ public abstract class UserFunction { /** * User-defined function for a new {@code Op}. - * @param inVec array of values to combine with {@code inoutvec} elements - * @param inOutVec in-out array of accumulator locations - * @param count number of items in arrays - * @param datatype type of each item + * @param inVec array of values to combine with {@code inoutvec} elements + * @param inOutVec in-out array of accumulator locations + * @param count number of items in arrays + * @param datatype type of each item + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void call(Object inVec, Object inOutVec, int count, Datatype datatype) throws MPIException @@ -67,10 +68,11 @@ public void call(Object inVec, Object inOutVec, int count, Datatype datatype) /** * User-defined function for a new {@code Op}. - * @param in direct byte buffer to combine with {@code inOut} buffer - * @param inOut in-out direct byte buffer of accumulator locations - * @param count number of items in buffers - * @param datatype type of each item + * @param in direct byte buffer to combine with {@code inOut} buffer + * @param inOut in-out direct byte buffer of accumulator locations + * @param count number of items in buffers + * @param datatype type of each item + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void call(ByteBuffer in, ByteBuffer inOut, int count, Datatype datatype) throws MPIException diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index fb1fda78654..0d3f13b3d29 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -37,7 +37,7 @@ public final class Win implements Freeable * @param dispUnit local unit size for displacements (buffer elements) * @param info info object * @param comm communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Win(Buffer base, int size, int dispUnit, Info info, Comm comm) throws MPIException @@ -76,7 +76,7 @@ private native long createWin( * @param comm communicator * @param base initial address of window * @param flavor FLAVOR_PRIVATE or FLAVOR_SHARED - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Win(int size, int dispUnit, Info info, Comm comm, Buffer base, int flavor) throws MPIException @@ -119,7 +119,7 @@ private native long allocateSharedWin( * Java binding of {@code MPI_WIN_CREATE_DYNAMIC}. * @param info info object * @param comm communicator - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Win(Info info, Comm comm) throws MPIException @@ -145,10 +145,58 @@ private int getBaseType(Datatype orgType, Datatype targetType) return baseType; } +/** + * Java binding of {@code MPI_WIN_ATTACH}. + * @param base initial address of window + * @param size size of window (buffer elements) + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ +public void attach(Buffer base, int size) throws MPIException +{ + MPI.check(); + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + int baseSize; + + if(base instanceof ByteBuffer) + baseSize = 1; + else if(base instanceof CharBuffer || base instanceof ShortBuffer) + baseSize = 2; + else if(base instanceof IntBuffer || base instanceof FloatBuffer) + baseSize = 4; + else if(base instanceof LongBuffer || base instanceof DoubleBuffer) + baseSize = 8; + else + throw new AssertionError(); + + int sizeBytes = size * baseSize; + + attach(handle, base, sizeBytes); +} + +private native void attach(long win, Buffer base, int size) throws MPIException; + +/** + * Java binding of {@code MPI_WIN_DETACH}. + * @param base initial address of window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ +public void detach(Buffer base) throws MPIException +{ + MPI.check(); + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + detach(handle, base); +} + +private native void detach(long win, Buffer base) throws MPIException; + /** * Java binding of the MPI operation {@code MPI_GET_GROUP}. * @return group of processes which share access to the window - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Group getGroup() throws MPIException { @@ -167,7 +215,7 @@ public Group getGroup() throws MPIException * @param targetDisp displacement from start of window to target buffer * @param targetCount number of entries in target buffer * @param targetType datatype of each entry in target buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void put(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, @@ -198,6 +246,7 @@ private native void put( * @param targetDisp displacement from start of window to target buffer * @param targetCount number of entries in target buffer * @param targetType datatype of each entry in target buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void get(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, @@ -229,6 +278,7 @@ private native void get( * @param targetCount number of entries in target buffer * @param targetType datatype of each entry in target buffer * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void accumulate(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, @@ -253,6 +303,7 @@ private native void accumulate( /** * Java binding of {@code MPI_WIN_FENCE}. * @param assertion program assertion + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void fence(int assertion) throws MPIException { @@ -266,7 +317,7 @@ public void fence(int assertion) throws MPIException * Java binding of the MPI operation {@code MPI_WIN_START}. * @param group group of target processes * @param assertion program assertion - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void start(Group group, int assertion) throws MPIException { @@ -279,7 +330,7 @@ private native void start(long win, long group, int assertion) /** * Java binding of the MPI operation {@code MPI_WIN_COMPLETE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void complete() throws MPIException { @@ -293,7 +344,7 @@ public void complete() throws MPIException * Java binding of the MPI operation {@code MPI_WIN_POST}. * @param group group of origin processes * @param assertion program assertion - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void post(Group group, int assertion) throws MPIException { @@ -306,7 +357,7 @@ private native void post(long win, long group, int assertion) /** * Java binding of the MPI operation {@code MPI_WIN_WAIT}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void waitFor() throws MPIException { @@ -319,7 +370,7 @@ public void waitFor() throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_TEST}. * @return true if success - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public boolean test() throws MPIException { @@ -334,7 +385,7 @@ public boolean test() throws MPIException * @param lockType either MPI.LOCK_EXCLUSIVE or MPI.LOCK_SHARED * @param rank rank of locked window * @param assertion program assertion - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void lock(int lockType, int rank, int assertion) throws MPIException { @@ -348,7 +399,7 @@ private native void lock(long win, int lockType, int rank, int assertion) /** * Java binding of the MPI operation {@code MPI_WIN_UNLOCK}. * @param rank rank of window - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void unlock(int rank) throws MPIException { @@ -361,7 +412,7 @@ public void unlock(int rank) throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_SET_ERRHANDLER}. * @param errhandler new MPI error handler for window - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setErrhandler(Errhandler errhandler) throws MPIException { @@ -375,7 +426,7 @@ private native void setErrhandler(long win, long errhandler) /** * Java binding of the MPI operation {@code MPI_WIN_CALL_ERRHANDLER}. * @param errorCode error code - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void callErrhandler(int errorCode) throws MPIException { @@ -389,7 +440,7 @@ private native void callErrhandler(long handle, int errorCode) * Create a new attribute key. *

Java binding of the MPI operation {@code MPI_WIN_CREATE_KEYVAL}. * @return attribute key for future access - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static int createKeyval() throws MPIException { @@ -403,7 +454,7 @@ public static int createKeyval() throws MPIException * Frees an attribute key. *

Java binding of the MPI operation {@code MPI_WIN_FREE_KEYVAL}. * @param keyval attribute key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public static void freeKeyval(int keyval) throws MPIException { @@ -418,7 +469,7 @@ public static void freeKeyval(int keyval) throws MPIException *

Java binding of the MPI operation {@code MPI_WIN_SET_ATTR}. * @param keyval attribute key * @param value attribute value - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setAttr(int keyval, Object value) throws MPIException { @@ -434,7 +485,7 @@ private native void setAttr(long win, int keyval, byte[] value) *

Java binding of the MPI operation {@code MPI_WIN_GET_ATTR}. * @param keyval attribute key * @return attribute value or null if no attribute is associated with the key. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Object getAttr(int keyval) throws MPIException { @@ -449,7 +500,7 @@ public Object getAttr(int keyval) throws MPIException * Deletes an attribute value associated with a key. *

Java binding of the MPI operation {@code MPI_WIN_DELETE_ATTR}. * @param keyval attribute key - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void deleteAttr(int keyval) throws MPIException { @@ -461,7 +512,7 @@ public void deleteAttr(int keyval) throws MPIException /** * Java binding of {@code MPI_WIN_FREE}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public void free() throws MPIException { @@ -473,7 +524,8 @@ public void deleteAttr(int keyval) throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_GET_INFO}. - * @throws MPIException + * @return Info Info object associated with this window + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Info getInfo() throws MPIException { @@ -487,7 +539,7 @@ private native long getInfo(long win) /** * Java binding of the MPI operation {@code MPI_WIN_SET_INFO}. * @param info the new info - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void setInfo(Info info) throws MPIException { @@ -508,7 +560,7 @@ private native void setInfo(long win, long info) * @param target_count number of entries in target buffer * @param target_datatype datatype of each entry in target buffer * @return RMA request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request rPut(Buffer origin_addr, int origin_count, Datatype origin_datatype, int target_rank, int target_disp, @@ -538,7 +590,7 @@ private native long rPut(long win, Buffer origin_addr, int origin_count, * @param targetCount number of entries in target buffer * @param targetType datatype of each entry in target buffer * @return RMA request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public final Request rGet(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, @@ -571,7 +623,7 @@ private native long rGet( * @param targetType datatype of each entry in target buffer * @param op reduce operation * @return RMA request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request rAccumulate(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, @@ -606,7 +658,7 @@ private native long rAccumulate( * @param targetCount number of entries in target buffer * @param targetType datatype of each entry in target buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void getAccumulate(Buffer origin, int orgCount, Datatype orgType, @@ -646,7 +698,7 @@ private native void getAccumulate( * @param targetType datatype of each entry in target buffer * @param op reduce operation * @return RMA request - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Request rGetAccumulate(Buffer origin, int orgCount, Datatype orgType, @@ -675,7 +727,7 @@ private native long rGetAccumulate( /** * Java binding of the MPI operation {@code MPI_WIN_LOCK_ALL}. * @param assertion program assertion - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void lockAll(int assertion) throws MPIException { @@ -688,7 +740,7 @@ private native void lockAll(long win, int assertion) /** * Java binding of the MPI operation {@code MPI_WIN_UNLOCK_ALL}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void unlockAll() throws MPIException { @@ -700,7 +752,7 @@ public void unlockAll() throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_SYNC}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void sync() throws MPIException { @@ -713,7 +765,7 @@ public void sync() throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH}. * @param targetRank rank of target window - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flush(int targetRank) throws MPIException { @@ -725,7 +777,7 @@ public void flush(int targetRank) throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH_ALL}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flushAll() throws MPIException { @@ -743,7 +795,7 @@ public void flushAll() throws MPIException * @param targetType datatype of each entry in target buffer * @param targetRank rank of target * @param targetDisp displacement from start of window to target buffer - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void compareAndSwap(Buffer origin, Buffer compareAddr, Buffer resultAddr, @@ -771,7 +823,7 @@ private native void compareAndSwap( * @param targetRank rank of target * @param targetDisp displacement from start of window to target buffer * @param op reduce operation - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, @@ -794,7 +846,7 @@ private native void fetchAndOp( /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL}. * @param targetRank rank of target window - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flushLocal(int targetRank) throws MPIException @@ -807,7 +859,7 @@ public void flushLocal(int targetRank) throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL_ALL}. - * @throws MPIException + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flushLocalAll() throws MPIException From 07c9d775795ef58fa0c7e751363c7b08877a00b5 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Fri, 10 Jul 2015 16:04:22 -0600 Subject: [PATCH 0076/1704] Added suppression statements. There are a few places where adding the @param for the variable javadoc wants does not make sense, so I added suppression statements in those areas. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/Struct.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ompi/mpi/java/java/Struct.java b/ompi/mpi/java/java/Struct.java index b7d1c831435..e7d4fa1a90a 100644 --- a/ompi/mpi/java/java/Struct.java +++ b/ompi/mpi/java/java/Struct.java @@ -98,6 +98,7 @@ private T newData(ByteBuffer buffer, int offset) return (T)d; } +@SuppressWarnings("javadoc") /** * Gets a Data object in order to access to the buffer. * @param buffer the Data object will read/write on this buffer. @@ -110,6 +111,7 @@ public final T getData(ByteBuffer buffer) throws MPIException return newData(buffer, 0); } +@SuppressWarnings("javadoc") /** * Gets a Data object in order to access to the struct at the * specified position of a struct array stored in a Buffer. @@ -125,6 +127,7 @@ public final T getData(ByteBuffer buffer, int index) return newData(buffer, index * extent); } +@SuppressWarnings("javadoc") /** * Gets a Data object in order to access to the byte array. * @param array The Data object will read/write on this byte array. @@ -138,6 +141,7 @@ public final T getData(byte[] array) throws MPIException return getData(buffer); } +@SuppressWarnings("javadoc") /** * Gets a Data object in order to access to the struct at the * specified position of a struct array stored in a byte array. @@ -725,7 +729,8 @@ protected final void putDouble(int field, int index, double v) assert validType(field, index, MPI.DOUBLE) : typeMismatch; buffer.putDouble(offset + field + index * 8, v); } - + + @SuppressWarnings("javadoc") /** * Gets the struct data of a field. * @param struct Struct type. @@ -740,6 +745,7 @@ D getData(S struct, int field) return s.newData(buffer, offset + field); } + @SuppressWarnings("javadoc") /** * Gets the struct data at the specified position of a struct array. * @param struct Struct type. From 4b4d551cbef6cd747518e25d35df026b26df2b67 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 28 Jul 2015 16:09:22 -0600 Subject: [PATCH 0077/1704] Fix for doubled sentence. --- ompi/mpi/java/java/CartComm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index 2d3c1084bd3..e5c8ca970fe 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -104,7 +104,7 @@ protected CartComm(long[] commRequest) *

The new communicator can't be used before the operation completes. * The request object must be obtained calling {@link #getRequest}. * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public CartComm iDup() throws MPIException { From 06ee9cba3055ae4cc744c9bae09b2e41afa4a3e3 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 27 Jul 2015 15:26:21 +0900 Subject: [PATCH 0078/1704] f08: misc Makefile fixes (cherry picked from commit open-mpi/ompi@7af52385955f097e4dca3616b4b5b8dfe785ebeb) --- ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am | 12 +++++++++++- ompi/mpi/fortran/use-mpi-f08/Makefile.am | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am b/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am index f9f48f4db5e..8a08bded7fd 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am @@ -1,6 +1,8 @@ # -*- makefile -*- # # Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # # $COPYRIGHT$ # @@ -60,7 +62,15 @@ mpi-f08-types.lo: mpi-f08-types.f90 mpi-f08-interfaces.lo: mpi-f08-interfaces.F90 mpi-f08-types.lo OMPI_Fortran_binding.lo: OMPI_Fortran_binding.f90 mpi-f08-types.lo -$(mpi_api_files): mpi-f08.lo + +# +# Automake doesn't do Fortran dependency analysis, so must list them +# manually here. Bummer! +# + +mpi_api_lo_files = $(mpi_api_files:.f90=.lo) + +$(mpi_api_lo_files): mpi-f08.lo mpi-f08.lo: mpi-f08-types.lo mpi-f08.lo: OMPI_Fortran_binding.lo diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 029330350fc..42072dc9132 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -103,7 +103,6 @@ mpi_api_files = \ bcast_f08.F90 \ bsend_f08.F90 \ bsend_init_f08.F90 \ - buffer_detach.c \ buffer_attach_f08.F90 \ buffer_detach_f08.F90 \ cancel_f08.F90 \ @@ -795,6 +794,7 @@ libmpi_usempif08_la_SOURCES = \ mpi-f08.F90 \ mpi-f-interfaces-bind.h pmpi-f-interfaces-bind.h \ attr-fn-f08-callback-interfaces.h \ + buffer_detach.c \ conversion-fn-null-f08-interface.h \ constants.h \ constants.c From 3f4fd58c2c6afca03b9c7533f47c9ac2e8535a98 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 24 Jul 2015 09:51:21 +0900 Subject: [PATCH 0079/1704] fortran: fix f08 bindings only define the unique fortran symbol depending on - CAPS - PLAIN - SINGLE_UNDERSCORE - DOUBLE_UNDERSCORE and bind the f08 symbol to the uniquely defined C symbol. Use real data structures to make the code simpler. (perl script written by Jeff) (back-ported from commit open-mpi/ompi@9c77c6b66d48871d1ac0da843ff8c4e9dd39c75b) --- .gitignore | 3 + config/ompi_setup_mpi_fortran.m4 | 14 +- ompi/include/Makefile.am | 26 ++- ompi/mpi/fortran/base/Makefile.am | 7 +- ompi/mpi/fortran/base/constants.h | 170 +-------------- ompi/mpi/fortran/base/gen-mpi-mangling.pl | 206 ++++++++++++++++++ .../use-mpi-f08-desc/mpi-f08-types.f90 | 5 +- .../mpi/fortran/use-mpi-f08/mpi-f08-types.F90 | 12 +- ompi/runtime/ompi_mpi_init.c | 27 +-- oshmem/runtime/oshmem_shmem_init.c | 1 + 10 files changed, 263 insertions(+), 208 deletions(-) create mode 100755 ompi/mpi/fortran/base/gen-mpi-mangling.pl diff --git a/.gitignore b/.gitignore index 10da50d4a86..7e923b9c443 100644 --- a/.gitignore +++ b/.gitignore @@ -140,9 +140,12 @@ ompi/debuggers/predefined_pad_test ompi/include/mpi.h ompi/include/mpif-config.h ompi/include/mpif.h +ompi/include/mpif-c-constants-decl.h +ompi/include/mpif-c-constants.h ompi/include/mpif-common.h ompi/include/mpi-ext.h ompi/include/mpif-ext.h +ompi/include/mpif-f08-types.h ompi/include/mpif-handles.h ompi/include/mpif-io-constants.h ompi/include/mpif-constants.h diff --git a/config/ompi_setup_mpi_fortran.m4 b/config/ompi_setup_mpi_fortran.m4 index 2f8150e241a..c1f195b46bc 100644 --- a/config/ompi_setup_mpi_fortran.m4 +++ b/config/ompi_setup_mpi_fortran.m4 @@ -101,17 +101,25 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ # AC_DEFINE these results, even in the --disable-mpi-fortran case, # for ompi_info. AC_DEFINE_UNQUOTED([OMPI_FORTRAN_DOUBLE_UNDERSCORE], - [$ompi_fortran_double_underscore], + [$ompi_fortran_double_underscore], [Whether fortran symbols have a trailing double underscore or not]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_SINGLE_UNDERSCORE], + OMPI_FORTRAN_DOUBLE_UNDERSCORE=$ompi_fortran_double_underscore + AC_SUBST(OMPI_FORTRAN_DOUBLE_UNDERSCORE) + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_SINGLE_UNDERSCORE], [$ompi_fortran_single_underscore], [Whether fortran symbols have a trailing underscore or not]) + OMPI_FORTRAN_SINGLE_UNDERSCORE=$ompi_fortran_single_underscore + AC_SUBST(OMPI_FORTRAN_SINGLE_UNDERSCORE) AC_DEFINE_UNQUOTED([OMPI_FORTRAN_CAPS], [$ompi_fortran_caps], [Whether fortran symbols are all caps or not]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_PLAIN], + OMPI_FORTRAN_CAPS=$ompi_fortran_caps + AC_SUBST(OMPI_FORTRAN_CAPS) + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_PLAIN], [$ompi_fortran_plain], [Whether fortran symbols have no trailing underscore or not]) + OMPI_FORTRAN_PLAIN=$ompi_fortran_plain + AC_SUBST(OMPI_FORTRAN_PLAIN) # Check to see if any of the MPI Fortran bindings were # specifically requested. If so, and we weren't able to setup the diff --git a/ompi/include/Makefile.am b/ompi/include/Makefile.am index 62768eccc35..d80c5c75bc0 100644 --- a/ompi/include/Makefile.am +++ b/ompi/include/Makefile.am @@ -53,7 +53,8 @@ nodist_include_HEADERS = \ mpif.h \ mpif-ext.h \ mpif-sizeof.h \ - mpi_portable_platform.h + mpif-c-constants-decl.h \ + mpi_portable_platform.h if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS nodist_include_HEADERS += \ @@ -62,8 +63,8 @@ endif include ompi/Makefile.am -# This is complicated, but mpif-values.pl generates -# several mpif-*.h files in this directory (during autogen.pl). +# This is complicated, but mpif-values.pl generates several +# mpif-*.h files in this directory (during autogen.pl). # Hence, if any of those files change, it's safer to just force the # user to re-autogen. #mpif.h: mpif-constants.h mpif-handles.h mpif-io-constants.h mpif-io-handles.h @@ -88,6 +89,21 @@ mpif-sizeof.h: --real16=$(OMPI_HAVE_FORTRAN_REAL16) \ --complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32) +# +# mpif-c-constants-decl.h, among other files, is generated based on some +# results from configure tests. +# + +mpif_mangling_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-mangling.pl +mpif-c-constants-decl.h: $(top_builddir)/config.status +mpif-c-constants-decl.h: $(mpif_mangling_pl) +mpif-c-constants-decl.h: + $(OMPI_V_GEN) $(mpif_mangling_pl) \ + --caps $(OMPI_FORTRAN_CAPS) \ + --plain $(OMPI_FORTRAN_PLAIN) \ + --single $(OMPI_FORTRAN_SINGLE_UNDERSCORE) \ + --double $(OMPI_FORTRAN_DOUBLE_UNDERSCORE) + if WANT_INSTALL_HEADERS ompidir = $(ompiincludedir) nobase_dist_ompi_HEADERS = $(headers) @@ -103,7 +119,9 @@ CLEANFILES = mpif-sizeof.f90 # Remove the auto-generated files (they are generated by configure) # Since there is no mpi-ext.h.in, autogen does not know to cleanup this file. distclean-local: - rm -f mpi-ext.h mpif-ext.h mpi_portable_platform.h mpif-sizeof.h + rm -f mpi-ext.h mpif-ext.h mpi_portable_platform.h \ + mpif-sizeof.h \ + mpif-c-constants-decl.h mpif-c-constants.h mpif-f08-types.h mpi_portable_platform.h: $(top_srcdir)/opal/include/opal/opal_portable_platform.h -@rm -f mpi_portable_platform.h diff --git a/ompi/mpi/fortran/base/Makefile.am b/ompi/mpi/fortran/base/Makefile.am index bb7a9c233c9..6eb1987bd04 100644 --- a/ompi/mpi/fortran/base/Makefile.am +++ b/ompi/mpi/fortran/base/Makefile.am @@ -9,7 +9,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,7 +24,8 @@ noinst_LTLIBRARIES = EXTRA_DIST = \ attr-fn-int-callback-interfaces.h \ conversion-fn-null-int-interface.h \ - gen-mpi-sizeof.pl + gen-mpi-sizeof.pl \ + gen-mpi-mangling.pl #----------------------------------------------------------------------------- diff --git a/ompi/mpi/fortran/base/constants.h b/ompi/mpi/fortran/base/constants.h index 914c63d8b3e..984ebcadebc 100644 --- a/ompi/mpi/fortran/base/constants.h +++ b/ompi/mpi/fortran/base/constants.h @@ -9,9 +9,11 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2012 Universite Bordeaux 1 + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +26,7 @@ #include "ompi_config.h" +#if OMPI_BUILD_FORTRAN_BINDINGS /* * Several variables are used to link against MPI F77 constants which * correspond to addresses, e.g. MPI_BOTTOM, and are implemented via @@ -85,168 +88,7 @@ * file. */ -#define DECL(type, upper_case, lower_case, single_u, double_u) \ -OMPI_DECLSPEC extern type upper_case; \ -OMPI_DECLSPEC extern type lower_case; \ -OMPI_DECLSPEC extern type single_u; \ -OMPI_DECLSPEC extern type double_u - -/* Note that the rationale for the types of each of these variables is - discussed in ompi/include/mpif-common.h. Do not change the types - without also changing ompi/runtime/ompi_mpi_init.c and - ompi/include/mpif-common.h. */ - -DECL(int, MPI_FORTRAN_BOTTOM, mpi_fortran_bottom, - mpi_fortran_bottom_, mpi_fortran_bottom__); -DECL(int, MPI_FORTRAN_IN_PLACE, mpi_fortran_in_place, - mpi_fortran_in_place_, mpi_fortran_in_place__); -DECL(int, MPI_FORTRAN_UNWEIGHTED, mpi_fortran_unweighted, - mpi_fortran_unweighted_, mpi_fortran_unweighted__); -DECL(int, MPI_FORTRAN_WEIGHTS_EMPTY, mpi_fortran_weights_empty, - mpi_fortran_weights_empty_, mpi_fortran_weights_empty__); -DECL(char *, MPI_FORTRAN_ARGV_NULL, mpi_fortran_argv_null, - mpi_fortran_argv_null_, mpi_fortran_argv_null__); -DECL(char *, MPI_FORTRAN_ARGVS_NULL, mpi_fortran_argvs_null, - mpi_fortran_argvs_null_, mpi_fortran_argvs_null__); -DECL(int *, MPI_FORTRAN_ERRCODES_IGNORE, mpi_fortran_errcodes_ignore, - mpi_fortran_errcodes_ignore_, mpi_fortran_errcodes_ignore__); -DECL(int *, MPI_FORTRAN_STATUS_IGNORE, mpi_fortran_status_ignore, - mpi_fortran_status_ignore_, mpi_fortran_status_ignore__); -DECL(int *, MPI_FORTRAN_STATUSES_IGNORE, mpi_fortran_statuses_ignore, - mpi_fortran_statuses_ignore_, mpi_fortran_statuses_ignore__); - -/* - * Create macros to do the checking. Only check for all 4 if we have - * weak symbols. Otherwise, just check for the one relevant symbol. - */ -#if OPAL_HAVE_WEAK_SYMBOLS -#define OMPI_IS_FORTRAN_BOTTOM(addr) \ - (addr == (void*) &MPI_FORTRAN_BOTTOM || \ - addr == (void*) &mpi_fortran_bottom || \ - addr == (void*) &mpi_fortran_bottom_ || \ - addr == (void*) &mpi_fortran_bottom__) -#define OMPI_IS_FORTRAN_IN_PLACE(addr) \ - (addr == (void*) &MPI_FORTRAN_IN_PLACE || \ - addr == (void*) &mpi_fortran_in_place || \ - addr == (void*) &mpi_fortran_in_place_ || \ - addr == (void*) &mpi_fortran_in_place__) -#define OMPI_IS_FORTRAN_UNWEIGHTED(addr) \ - (addr == (void*) &MPI_FORTRAN_UNWEIGHTED || \ - addr == (void*) &mpi_fortran_unweighted || \ - addr == (void*) &mpi_fortran_unweighted_ || \ - addr == (void*) &mpi_fortran_unweighted__) -#define OMPI_IS_FORTRAN_WEIGHTS_EMPTY(addr) \ - (addr == (void*) &MPI_FORTRAN_WEIGHTS_EMPTY || \ - addr == (void*) &mpi_fortran_weights_empty || \ - addr == (void*) &mpi_fortran_weights_empty_ || \ - addr == (void*) &mpi_fortran_weights_empty__) -#define OMPI_IS_FORTRAN_ARGV_NULL(addr) \ - (addr == (void*) &MPI_FORTRAN_ARGV_NULL || \ - addr == (void*) &mpi_fortran_argv_null || \ - addr == (void*) &mpi_fortran_argv_null_ || \ - addr == (void*) &mpi_fortran_argv_null__) -#define OMPI_IS_FORTRAN_ARGVS_NULL(addr) \ - (addr == (void*) &MPI_FORTRAN_ARGVS_NULL || \ - addr == (void*) &mpi_fortran_argvs_null || \ - addr == (void*) &mpi_fortran_argvs_null_ || \ - addr == (void*) &mpi_fortran_argvs_null__) -#define OMPI_IS_FORTRAN_ERRCODES_IGNORE(addr) \ - (addr == (void*) &MPI_FORTRAN_ERRCODES_IGNORE || \ - addr == (void*) &mpi_fortran_errcodes_ignore || \ - addr == (void*) &mpi_fortran_errcodes_ignore_ || \ - addr == (void*) &mpi_fortran_errcodes_ignore__) -#define OMPI_IS_FORTRAN_STATUS_IGNORE(addr) \ - (addr == (void*) &MPI_FORTRAN_STATUS_IGNORE || \ - addr == (void*) &mpi_fortran_status_ignore || \ - addr == (void*) &mpi_fortran_status_ignore_ || \ - addr == (void*) &mpi_fortran_status_ignore__) -#define OMPI_IS_FORTRAN_STATUSES_IGNORE(addr) \ - (addr == (void*) &MPI_FORTRAN_STATUSES_IGNORE || \ - addr == (void*) &mpi_fortran_statuses_ignore || \ - addr == (void*) &mpi_fortran_statuses_ignore_ || \ - addr == (void*) &mpi_fortran_statuses_ignore__) - -#elif OMPI_FORTRAN_CAPS -#define OMPI_IS_FORTRAN_BOTTOM(addr) \ - (addr == (void*) &MPI_FORTRAN_BOTTOM) -#define OMPI_IS_FORTRAN_IN_PLACE(addr) \ - (addr == (void*) &MPI_FORTRAN_IN_PLACE) -#define OMPI_IS_FORTRAN_UNWEIGHTED(addr) \ - (addr == (void*) &MPI_FORTRAN_UNWEIGHTED) -#define OMPI_IS_FORTRAN_WEIGHTS_EMPTY(addr) \ - (addr == (void*) &MPI_FORTRAN_WEIGHTS_EMPTY) -#define OMPI_IS_FORTRAN_ARGV_NULL(addr) \ - (addr == (void*) &MPI_FORTRAN_ARGV_NULL) -#define OMPI_IS_FORTRAN_ARGVS_NULL(addr) \ - (addr == (void*) &MPI_FORTRAN_ARGVS_NULL) -#define OMPI_IS_FORTRAN_ERRCODES_IGNORE(addr) \ - (addr == (void*) &MPI_FORTRAN_ERRCODES_IGNORE) -#define OMPI_IS_FORTRAN_STATUS_IGNORE(addr) \ - (addr == (void*) &MPI_FORTRAN_STATUS_IGNORE) -#define OMPI_IS_FORTRAN_STATUSES_IGNORE(addr) \ - (addr == (void*) &MPI_FORTRAN_STATUSES_IGNORE) - -#elif OMPI_FORTRAN_PLAIN -#define OMPI_IS_FORTRAN_BOTTOM(addr) \ - (addr == (void*) &mpi_fortran_bottom) -#define OMPI_IS_FORTRAN_IN_PLACE(addr) \ - (addr == (void*) &mpi_fortran_in_place) -#define OMPI_IS_FORTRAN_UNWEIGHTED(addr) \ - (addr == (void*) &mpi_fortran_unweighted) -#define OMPI_IS_FORTRAN_WEIGHTS_EMPTY(addr) \ - (addr == (void*) &mpi_fortran_weights_empty) -#define OMPI_IS_FORTRAN_ARGV_NULL(addr) \ - (addr == (void*) &mpi_fortran_argv_null) -#define OMPI_IS_FORTRAN_ARGVS_NULL(addr) \ - (addr == (void*) &mpi_fortran_argvs_null) -#define OMPI_IS_FORTRAN_ERRCODES_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_errcodes_ignore) -#define OMPI_IS_FORTRAN_STATUS_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_status_ignore) -#define OMPI_IS_FORTRAN_STATUSES_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_statuses_ignore) - -#elif OMPI_FORTRAN_SINGLE_UNDERSCORE -#define OMPI_IS_FORTRAN_BOTTOM(addr) \ - (addr == (void*) &mpi_fortran_bottom_) -#define OMPI_IS_FORTRAN_IN_PLACE(addr) \ - (addr == (void*) &mpi_fortran_in_place_) -#define OMPI_IS_FORTRAN_UNWEIGHTED(addr) \ - (addr == (void*) &mpi_fortran_unweighted_) -#define OMPI_IS_FORTRAN_WEIGHTS_EMPTY(addr) \ - (addr == (void*) &mpi_fortran_weights_empty_) -#define OMPI_IS_FORTRAN_ARGV_NULL(addr) \ - (addr == (void*) &mpi_fortran_argv_null_) -#define OMPI_IS_FORTRAN_ARGVS_NULL(addr) \ - (addr == (void*) &mpi_fortran_argvs_null_) -#define OMPI_IS_FORTRAN_ERRCODES_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_errcodes_ignore_) -#define OMPI_IS_FORTRAN_STATUS_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_status_ignore_) -#define OMPI_IS_FORTRAN_STATUSES_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_statuses_ignore_) - -#else -#define OMPI_IS_FORTRAN_BOTTOM(addr) \ - (addr == (void*) &mpi_fortran_bottom__) -#define OMPI_IS_FORTRAN_IN_PLACE(addr) \ - (addr == (void*) &mpi_fortran_in_place__) -#define OMPI_IS_FORTRAN_UNWEIGHTED(addr) \ - (addr == (void*) &mpi_fortran_unweighted__) -#define OMPI_IS_FORTRAN_WEIGHTS_EMPTY(addr) \ - (addr == (void*) &mpi_fortran_weights_empty__) -#define OMPI_IS_FORTRAN_ARGV_NULL(addr) \ - (addr == (void*) &mpi_fortran_argv_null__) -#define OMPI_IS_FORTRAN_ARGVS_NULL(addr) \ - (addr == (void*) &mpi_fortran_argvs_null__) -#define OMPI_IS_FORTRAN_ERRCODES_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_errcodes_ignore__) -#define OMPI_IS_FORTRAN_STATUS_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_status_ignore__) -#define OMPI_IS_FORTRAN_STATUSES_IGNORE(addr) \ - (addr == (void*) &mpi_fortran_statuses_ignore__) - -#endif /* weak / specific symbol type */ +#include "mpif-c-constants-decl.h" /* Convert between Fortran and C MPI_BOTTOM */ #define OMPI_F2C_BOTTOM(addr) (OMPI_IS_FORTRAN_BOTTOM(addr) ? MPI_BOTTOM : (addr)) @@ -254,4 +96,6 @@ DECL(int *, MPI_FORTRAN_STATUSES_IGNORE, mpi_fortran_statuses_ignore, #define OMPI_F2C_UNWEIGHTED(addr) (OMPI_IS_FORTRAN_UNWEIGHTED(addr) ? MPI_UNWEIGHTED : (addr)) #define OMPI_F2C_WEIGHTS_EMPTY(addr) (OMPI_IS_FORTRAN_WEIGHTS_EMPTY(addr) ? MPI_WEIGHTS_EMPTY : (addr)) +#endif /* OMPI_BUILD_FORTRAN_BINDINGS */ + #endif /* OMPI_FORTRAN_BASE_CONSTANTS_H */ diff --git a/ompi/mpi/fortran/base/gen-mpi-mangling.pl b/ompi/mpi/fortran/base/gen-mpi-mangling.pl new file mode 100755 index 00000000000..d061eed89dc --- /dev/null +++ b/ompi/mpi/fortran/base/gen-mpi-mangling.pl @@ -0,0 +1,206 @@ +#!/usr/bin/env perl +# +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Subroutine to generate a bunch of Fortran declarations and symbols +# + +use strict; + +use Getopt::Long; + +my $caps_arg; +my $plain_arg; +my $single_underscore_arg; +my $double_underscore_arg; +my $help_arg = 0; + +&Getopt::Long::Configure("bundling"); +my $ok = Getopt::Long::GetOptions("caps=i" => \$caps_arg, + "plain=i" => \$plain_arg, + "single=i" => \$single_underscore_arg, + "double=i" => \$double_underscore_arg, + "help|h" => \$help_arg); + +if ($help_arg || !$ok) { + print "Usage: $0 [--caps|--plain|--single|--double] [--help]\n"; + exit(1 - $ok); +} + +my $file_c_constants_decl = "mpif-c-constants-decl.h"; +my $file_c_constants = "mpif-c-constants.h"; +my $file_f08_types = "mpif-f08-types.h"; + +# If we are not building fortran, then just make empty files +if ($caps_arg + $plain_arg + $single_underscore_arg + + $double_underscore_arg == 0) { + system("touch $file_c_constants_decl"); + system("touch $file_c_constants"); + system("touch $file_f08_types"); + exit(0); +} + +############################################################### + +# Declare a hash of all the Fortran sentinel values + +my $fortran; + +$fortran->{bottom} = { + c_type => "int", + c_name => "mpi_fortran_bottom", + f_type => "integer", + f_name => "MPI_BOTTOM", +}; +$fortran->{in_place} = { + c_type => "int", + c_name => "mpi_fortran_in_place", + f_type => "integer", + f_name => "MPI_IN_PLACE", +}; +$fortran->{unweighted} = { + c_type => "int", + c_name => "mpi_fortran_unweighted", + f_type => "integer", + f_name => "MPI_UNWEIGHTED", +}; +$fortran->{weights_empty} = { + c_type => "int", + c_name => "mpi_fortran_weights_empty", + f_type => "integer", + f_name => "MPI_WEIGHTS_EMPTY", +}; + +$fortran->{argv_null} = { + c_type => "char *", + c_name => "mpi_fortran_argv_null", + f_type => "integer", + f_name => "MPI_ARGV_NULL", +}; +$fortran->{argvs_null} = { + c_type => "char *", + c_name => "mpi_fortran_argvs_null", + f_type => "integer", + f_name => "MPI_ARGVS_NULL", +}; + +$fortran->{errcodes_ignore} = { + c_type => "int *", + c_name => "mpi_fortran_errcodes_ignore", + f_type => "integer", + f_name => "MPI_ERRCODES_IGNORE", +}; +$fortran->{status_ignore} = { + c_type => "int *", + c_name => "mpi_fortran_status_ignore", + f_type => "type(MPI_STATUS)", + f_name => "MPI_STATUS_IGNORE", +}; +$fortran->{statuses_ignore} = { + c_type => "int *", + c_name => "mpi_fortran_statuses_ignore", + f_type => "type(MPI_STATUS)", + f_name => "MPI_STATUSES_IGNORE(1)", +}; + +############################################################### + +sub mangle { + my $name = shift; + + if ($plain_arg) { + return $name; + } elsif ($caps_arg) { + return uc($name); + } elsif ($single_underscore_arg) { + return $name . "_"; + } elsif ($double_underscore_arg) { + return $name . "__"; + } else { + die "Unknown name mangling type"; + } +} + +sub gen_c_constants_decl { + open(OUT, ">$file_c_constants_decl") || + die "Can't write to $file_c_constants_decl"; + + print OUT "/* WARNING: This is a generated file! Edits will be lost! */ +/* + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * \$COPYRIGHT\$ + * + * This file was generated by gen-mpi-mangling.pl + */ + +/* Note that the rationale for the types of each of these variables is + discussed in ompi/include/mpif-common.h. Do not change the types + without also changing ompi/runtime/ompi_mpi_init.c and + ompi/include/mpif-common.h. */\n\n"; + + foreach my $key (sort(keys(%{$fortran}))) { + my $f = $fortran->{$key}; + my $m = mangle($f->{c_name}); + print OUT "extern $f->{c_type} $m; +#define OMPI_IS_FORTRAN_" . uc($key) . "(addr) \\ + (addr == (void*) &$m)\n\n"; + } + + close(OUT); +} + +sub gen_c_constants { + open(OUT, ">$file_c_constants") || + die "Can't write to $file_c_constants"; + + print OUT "/* WARNING: This is a generated file! Edits will be lost! */ +/* + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * \$COPYRIGHT\$ + * + * This file was generated by gen-mpi-mangling.pl + */\n\n"; + + foreach my $key (sort(keys(%{$fortran}))) { + my $f = $fortran->{$key}; + my $m = mangle($f->{c_name}); + print OUT "$f->{c_type} $m;\n"; + } + + close (OUT); +} + +sub gen_f08_types { + open(OUT, ">$file_f08_types") || + die "Can't write to $file_f08_types"; + + print OUT "! WARNING: This is a generated file! Edits will be lost! */ +! +! Copyright (c) 2015 Research Organization for Information Science +! and Technology (RIST). All rights reserved. +! Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +! \$COPYRIGHT\$ +! +! This file was generated by gen-mpi-mangling.pl +!\n\n"; + + foreach my $key (sort(keys(%{$fortran}))) { + my $f = $fortran->{$key}; + print OUT "$f->{f_type}, bind(C, name=\"".mangle($f->{c_name})."\") :: $f->{f_name}\n"; + } + + close (OUT); +} + +gen_c_constants_decl(); +gen_c_constants(); +gen_f08_types(); + +exit(0); diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08-types.f90 b/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08-types.f90 index dbfcc16b9bb..ec6fbf2ca31 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08-types.f90 +++ b/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08-types.f90 @@ -3,6 +3,8 @@ ! Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. +! Copyright (c) 2015 Research Organization for Information Science +! and Technology (RIST). All rights reserved. ! ! This file creates mappings between MPI C types (e.g., MPI_Comm) and ! variables (e.g., MPI_COMM_WORLD) and corresponding Fortran names @@ -151,7 +153,6 @@ module mpi_f08_types ! ! STATUS/STATUSES_IGNORE ! - type(MPI_STATUS), bind(C, name="mpi_fortran_status_ignore") :: MPI_STATUS_IGNORE - type(MPI_STATUS), bind(C, name="mpi_fortran_statuses_ignore") :: MPI_STATUSES_IGNORE(1) +#include "mpif-f08-types.h" end module mpi_f08_types diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-types.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-types.F90 index 43fcf5301e8..40049aaf53e 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-types.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-types.F90 @@ -3,6 +3,8 @@ ! Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. +! Copyright (c) 2015 Research Organization for Information Science +! and Technology (RIST). All rights reserved. ! $COPYRIGHT$ ! ! This file creates mappings between MPI C types (e.g., MPI_Comm) and @@ -164,15 +166,7 @@ module mpi_f08_types !... Special sentinel constants !------------------------------ - type(MPI_STATUS), bind(C, name="mpi_fortran_status_ignore") :: MPI_STATUS_IGNORE - type(MPI_STATUS), bind(C, name="mpi_fortran_statuses_ignore") :: MPI_STATUSES_IGNORE(1) - integer, bind(C, name="mpi_fortran_bottom") :: MPI_BOTTOM - integer, bind(C, name="mpi_fortran_in_place") :: MPI_IN_PLACE - integer, bind(C, name="mpi_fortran_argv_null") :: MPI_ARGV_NULL - integer, bind(C, name="mpi_fortran_argvs_null") :: MPI_ARGVS_NULL - integer, bind(C, name="mpi_fortran_errcodes_ignore") :: MPI_ERRCODES_IGNORE - integer, bind(C, name="mpi_fortran_unweighted") :: MPI_UNWEIGHTED - integer, bind(C, name="mpi_fortran_weights_empty") :: MPI_WEIGHTS_EMPTY +#include "mpif-f08-types.h" !... Interfaces for operators with handles !----------------------------------------- diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 596449ded3a..7edd98dc5ff 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2006-2009 University of Houston. All rights reserved. @@ -257,30 +257,7 @@ MPI_Fint *MPI_F_STATUSES_IGNORE = NULL; ompi/include/mpif-common.h. */ -#define INST(type, value, upper_case, lower_case, single_u, double_u) \ -type lower_case = value; \ -type upper_case = value; \ -type single_u = value; \ -type double_u = value - -INST(int, -1, MPI_FORTRAN_BOTTOM, mpi_fortran_bottom, - mpi_fortran_bottom_, mpi_fortran_bottom__); -INST(int, -1, MPI_FORTRAN_IN_PLACE, mpi_fortran_in_place, - mpi_fortran_in_place_, mpi_fortran_in_place__); -INST(int, -1, MPI_FORTRAN_UNWEIGHTED, mpi_fortran_unweighted, - mpi_fortran_unweighted_, mpi_fortran_unweighted__); -INST(int, -1, MPI_FORTRAN_WEIGHTS_EMPTY, mpi_fortran_weights_empty, - mpi_fortran_weights_empty_, mpi_fortran_weights_empty__); -INST(char *, NULL, MPI_FORTRAN_ARGV_NULL, mpi_fortran_argv_null, - mpi_fortran_argv_null_, mpi_fortran_argv_null__); -INST(char *, NULL, MPI_FORTRAN_ARGVS_NULL, mpi_fortran_argvs_null, - mpi_fortran_argvs_null_, mpi_fortran_argvs_null__); -INST(int *, NULL, MPI_FORTRAN_ERRCODES_IGNORE, mpi_fortran_errcodes_ignore, - mpi_fortran_errcodes_ignore_, mpi_fortran_errcodes_ignore__); -INST(int *, NULL, MPI_FORTRAN_STATUS_IGNORE, mpi_fortran_status_ignore, - mpi_fortran_status_ignore_, mpi_fortran_status_ignore__); -INST(int *, NULL, MPI_FORTRAN_STATUSES_IGNORE, mpi_fortran_statuses_ignore, - mpi_fortran_statuses_ignore_, mpi_fortran_statuses_ignore__); +#include "mpif-c-constants.h" /* * Hash tables for MPI_Type_create_f90* functions diff --git a/oshmem/runtime/oshmem_shmem_init.c b/oshmem/runtime/oshmem_shmem_init.c index 2fada1a6035..9a8de5760d0 100644 --- a/oshmem/runtime/oshmem_shmem_init.c +++ b/oshmem/runtime/oshmem_shmem_init.c @@ -4,6 +4,7 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow From 8d58e5847f6854a4dd6c8d9dd4fe76bec5ba2a82 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 29 Jul 2015 10:00:27 +0900 Subject: [PATCH 0080/1704] fortran: optimize testall and waitall when MPI_STATUSES_IGNORE is used (back-ported from commit open-mpi/ompi@83375bcc5c69121ebad7c1df67211ac08729c570) --- ompi/mpi/fortran/mpif-h/testall_f.c | 7 ++++--- ompi/mpi/fortran/mpif-h/waitall_f.c | 15 ++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/testall_f.c b/ompi/mpi/fortran/mpif-h/testall_f.c index bfb698ec2a2..fd946c35633 100644 --- a/ompi/mpi/fortran/mpif-h/testall_f.c +++ b/ompi/mpi/fortran/mpif-h/testall_f.c @@ -10,6 +10,8 @@ * 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 (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -107,11 +109,10 @@ void ompi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_l /* All Fortran Compilers have FALSE == 0, so just check for any nonzero value (because TRUE is not always == 1) */ - if (MPI_SUCCESS == c_ierr && *flag) { + if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && *flag) { for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) { array_of_requests[i] = c_req[i]->req_f_to_c_index; - if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && - !OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { + if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); } } diff --git a/ompi/mpi/fortran/mpif-h/waitall_f.c b/ompi/mpi/fortran/mpif-h/waitall_f.c index 5cabd6274e4..8428245ea1f 100644 --- a/ompi/mpi/fortran/mpif-h/waitall_f.c +++ b/ompi/mpi/fortran/mpif-h/waitall_f.c @@ -5,15 +5,17 @@ * 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, + * 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 (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -102,12 +104,11 @@ void ompi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests, c_ierr = MPI_Waitall(OMPI_FINT_2_INT(*count), c_req, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - if (MPI_SUCCESS == c_ierr) { + if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) { for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) { array_of_requests[i] = c_req[i]->req_f_to_c_index; - if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && - !OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { - MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); + if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { + MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); } } } From 1c58473b43ea3d3c8e1ffeee1fd1e7f2a3aea2d3 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 21 Jul 2015 16:14:51 -0600 Subject: [PATCH 0081/1704] Java bindings for alltoallw functions. Includes bindings for MPI_ALLTOALLW and MPI_IALLTOALLW. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpiJava.h | 9 +++- ompi/mpi/java/c/mpi_Comm.c | 76 ++++++++++++++++++++++++++++++ ompi/mpi/java/c/mpi_MPI.c | 24 ++++++++++ ompi/mpi/java/java/Comm.java | 91 ++++++++++++++++++++++++++++++++++++ 4 files changed, 199 insertions(+), 1 deletion(-) diff --git a/ompi/mpi/java/c/mpiJava.h b/ompi/mpi/java/c/mpiJava.h index 3b9303ac86d..80ba1d491c3 100644 --- a/ompi/mpi/java/c/mpiJava.h +++ b/ompi/mpi/java/c/mpiJava.h @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -95,7 +97,7 @@ void ompi_java_releaseReadPtr( /* Gets a buffer pointer for writing. */ void ompi_java_getWritePtr( void **ptr, ompi_java_buffer_t **item, JNIEnv *env, - jobject buf, jboolean db, int count, MPI_Datatype type); + jobject buf, jboolean db, int count, MPI_Datatype type); /* Gets a buffer pointer for writing. * 'size' is the number of processes. */ @@ -133,6 +135,11 @@ void ompi_java_releaseIntArray( void ompi_java_forgetIntArray( JNIEnv *env, jintArray array, jint *jptr, int *cptr); +void ompi_java_getDatatypeArray( + JNIEnv *env, jlongArray array, jlong **jptr, MPI_Datatype **cptr); +void ompi_java_forgetDatatypeArray( + JNIEnv *env, jlongArray array, jlong *jptr, MPI_Datatype *cptr); + void ompi_java_getBooleanArray( JNIEnv *env, jbooleanArray array, jboolean **jptr, int **cptr); void ompi_java_releaseBooleanArray( diff --git a/ompi/mpi/java/c/mpi_Comm.c b/ompi/mpi/java/c/mpi_Comm.c index edabfed97be..acfc0d0afcd 100644 --- a/ompi/mpi/java/c/mpi_Comm.c +++ b/ompi/mpi/java/c/mpi_Comm.c @@ -1581,6 +1581,82 @@ JNIEXPORT jlong JNICALL Java_mpi_Comm_iAllToAllv( return (jlong)request; } +JNIEXPORT void JNICALL Java_mpi_Comm_allToAllw( + JNIEnv *env, jobject jthis, jlong jComm, + jobject sendBuf, jintArray sCount, jintArray sDispls, jlongArray sTypes, + jobject recvBuf, jintArray rCount, jintArray rDispls, jlongArray rTypes) +{ + MPI_Comm comm = (MPI_Comm)jComm; + + jlong* jSTypes, *jRTypes; + MPI_Datatype *cSTypes, *cRTypes; + + ompi_java_getDatatypeArray(env, sTypes, &jSTypes, &cSTypes); + ompi_java_getDatatypeArray(env, rTypes, &jRTypes, &cRTypes); + + jint *jSCount, *jRCount, *jSDispls, *jRDispls; + int *cSCount, *cRCount, *cSDispls, *cRDispls; + ompi_java_getIntArray(env, sCount, &jSCount, &cSCount); + ompi_java_getIntArray(env, rCount, &jRCount, &cRCount); + ompi_java_getIntArray(env, sDispls, &jSDispls, &cSDispls); + ompi_java_getIntArray(env, rDispls, &jRDispls, &cRDispls); + + void *sPtr = ompi_java_getDirectBufferAddress(env, sendBuf), + *rPtr = ompi_java_getDirectBufferAddress(env, recvBuf); + + int rc = MPI_Alltoallw( + sPtr, cSCount, cSDispls, cSTypes, + rPtr, cRCount, cRDispls, cRTypes, comm); + + ompi_java_exceptionCheck(env, rc); + ompi_java_forgetIntArray(env, sCount, jSCount, cSCount); + ompi_java_forgetIntArray(env, rCount, jRCount, cRCount); + ompi_java_forgetIntArray(env, sDispls, jSDispls, cSDispls); + ompi_java_forgetIntArray(env, rDispls, jRDispls, cRDispls); + ompi_java_forgetDatatypeArray(env, sTypes, jSTypes, cSTypes); + ompi_java_forgetDatatypeArray(env, rTypes, jRTypes, cRTypes); +} + +JNIEXPORT jlong JNICALL Java_mpi_Comm_iAllToAllw( + JNIEnv *env, jobject jthis, jlong jComm, + jobject sendBuf, jintArray sCount, jintArray sDispls, jlongArray sTypes, + jobject recvBuf, jintArray rCount, jintArray rDispls, jlongArray rTypes) +{ + MPI_Comm comm = (MPI_Comm)jComm; + + jlong* jSTypes, *jRTypes; + MPI_Datatype *cSTypes, *cRTypes; + + ompi_java_getDatatypeArray(env, sTypes, &jSTypes, &cSTypes); + ompi_java_getDatatypeArray(env, rTypes, &jRTypes, &cRTypes); + + jint *jSCount, *jRCount, *jSDispls, *jRDispls; + int *cSCount, *cRCount, *cSDispls, *cRDispls; + ompi_java_getIntArray(env, sCount, &jSCount, &cSCount); + ompi_java_getIntArray(env, rCount, &jRCount, &cRCount); + ompi_java_getIntArray(env, sDispls, &jSDispls, &cSDispls); + ompi_java_getIntArray(env, rDispls, &jRDispls, &cRDispls); + + void *sPtr = ompi_java_getDirectBufferAddress(env, sendBuf), + *rPtr = ompi_java_getDirectBufferAddress(env, recvBuf); + + MPI_Request request; + + int rc = MPI_Ialltoallw( + sPtr, cSCount, cSDispls, cSTypes, + rPtr, cRCount, cRDispls, cRTypes, comm, &request); + + ompi_java_exceptionCheck(env, rc); + ompi_java_forgetIntArray(env, sCount, jSCount, cSCount); + ompi_java_forgetIntArray(env, rCount, jRCount, cRCount); + ompi_java_forgetIntArray(env, sDispls, jSDispls, cSDispls); + ompi_java_forgetIntArray(env, rDispls, jRDispls, cRDispls); + ompi_java_forgetDatatypeArray(env, sTypes, jSTypes, cSTypes); + ompi_java_forgetDatatypeArray(env, rTypes, jRTypes, cRTypes); + + return (jlong)request; +} + JNIEXPORT void JNICALL Java_mpi_Comm_neighborAllGather( JNIEnv *env, jobject jthis, jlong jComm, jobject sBuf, jboolean sdb, jint sOff, diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index e856bbfa3ba..f2f0ff62e5a 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -979,6 +979,30 @@ void ompi_java_forgetIntArray(JNIEnv *env, jintArray array, (*env)->ReleaseIntArrayElements(env, array, jptr, JNI_ABORT); } +void ompi_java_getDatatypeArray(JNIEnv *env, jlongArray array, + jlong **jptr, MPI_Datatype **cptr) +{ + jlong *jLongs = (*env)->GetLongArrayElements(env, array, NULL); + *jptr = jLongs; + + int i, length = (*env)->GetArrayLength(env, array); + MPI_Datatype *cDatatypes = calloc(length, sizeof(MPI_Datatype)); + + for(i = 0; i < length; i++){ + cDatatypes[i] = (MPI_Datatype)jLongs[i]; + } + *cptr = cDatatypes; +} + +void ompi_java_forgetDatatypeArray(JNIEnv *env, jlongArray array, + jlong *jptr, MPI_Datatype *cptr) +{ + if(jptr != cptr) + free(cptr); + + (*env)->ReleaseLongArrayElements(env, array, jptr, JNI_ABORT); +} + void ompi_java_getBooleanArray(JNIEnv *env, jbooleanArray array, jboolean **jptr, int **cptr) { diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 060402f2333..081e69be657 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -229,6 +229,7 @@ public static int compare(Comm comm1, Comm comm2) throws MPIException /** * Test if communicator object is null (has been freed). + * Java binding of {@code MPI_COMM_NULL}. * @return true if the comm object is null, false otherwise */ public final boolean isNull() @@ -2307,6 +2308,79 @@ private native long iAllToAllv(long comm, Buffer recvbuf, int[] recvcount, int[] rdispls, long recvtype) throws MPIException; +/** + * Adds flexibility to {@code allToAll}: location of data for send is //here + * specified by {@code sDispls} and location to place data on receive + * side is specified by {@code rDispls}. + *

Java binding of the MPI operation {@code MPI_ALLTOALLW}. + * @param sendBuf send buffer + * @param sendCount number of items sent to each buffer + * @param sDispls displacements from which to take outgoing data + * @param sendTypes datatypes of send buffer items + * @param recvBuf receive buffer + * @param recvCount number of elements received from each process + * @param rDispls displacements at which to place incoming data + * @param recvTypes datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ +public final void allToAllw( + Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) + throws MPIException +{ + MPI.check(); + assertDirectBuffer(sendBuf, recvBuf); + + long[] sendHandles = convertTypeArray(sendTypes); + long[] recvHandles = convertTypeArray(recvTypes); + + allToAllw(handle, sendBuf, sendCount, sDispls, + sendHandles, recvBuf, recvCount, rDispls, + recvHandles); +} + +private native void allToAllw(long comm, + Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) + throws MPIException; + +/** + * Adds flexibility to {@code iAllToAll}: location of data for send is + * specified by {@code sDispls} and location to place data on receive + * side is specified by {@code rDispls}. + *

Java binding of the MPI operation {@code MPI_IALLTOALLW}. + * @param sendBuf send buffer + * @param sendCount number of items sent to each buffer + * @param sDispls displacements from which to take outgoing data + * @param sendTypes datatype send buffer items + * @param recvBuf receive buffer + * @param recvCount number of elements received from each process + * @param rDispls displacements at which to place incoming data + * @param recvTypes datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ +public final Request iAllToAllw( + Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) + throws MPIException +{ + MPI.check(); + assertDirectBuffer(sendBuf, recvBuf); + + long[] sendHandles = convertTypeArray(sendTypes); + long[] recvHandles = convertTypeArray(recvTypes); + + return new Request(iAllToAllw( + handle, sendBuf, sendCount, sDispls, sendHandles, + recvBuf, recvCount, rDispls, recvHandles)); +} + +private native long iAllToAllw(long comm, + Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) + throws MPIException; + /** * Java binding of {@code MPI_NEIGHBOR_ALLGATHER}. * @param sendbuf send buffer @@ -3232,4 +3306,21 @@ public final String getName() throws MPIException private native String getName(long handle) throws MPIException; +/** + * A helper method to convert an array of Datatypes to + * an array of longs (handles). + * @param dArray Array of Datatypes + * @return converted Datatypes + */ +private long[] convertTypeArray(Datatype[] dArray) { + long[] lArray = new long[dArray.length]; + + for(int i = 0; i < lArray.length; i++) { + if(dArray[i] != null) { + lArray[i] = dArray[i].handle; + } + } + return lArray; +} + } // Comm From 512ded2eaea2b4284dd63b893e77ae7a8b74564b Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 21 Jul 2015 16:39:59 -0600 Subject: [PATCH 0082/1704] White space fixes Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpiJava.h | 2 +- ompi/mpi/java/c/mpi_Comm.c | 8 ++++---- ompi/mpi/java/java/Comm.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ompi/mpi/java/c/mpiJava.h b/ompi/mpi/java/c/mpiJava.h index 80ba1d491c3..48c4e3e6eea 100644 --- a/ompi/mpi/java/c/mpiJava.h +++ b/ompi/mpi/java/c/mpiJava.h @@ -97,7 +97,7 @@ void ompi_java_releaseReadPtr( /* Gets a buffer pointer for writing. */ void ompi_java_getWritePtr( void **ptr, ompi_java_buffer_t **item, JNIEnv *env, - jobject buf, jboolean db, int count, MPI_Datatype type); + jobject buf, jboolean db, int count, MPI_Datatype type); /* Gets a buffer pointer for writing. * 'size' is the number of processes. */ diff --git a/ompi/mpi/java/c/mpi_Comm.c b/ompi/mpi/java/c/mpi_Comm.c index acfc0d0afcd..f5e756bab7d 100644 --- a/ompi/mpi/java/c/mpi_Comm.c +++ b/ompi/mpi/java/c/mpi_Comm.c @@ -1605,8 +1605,8 @@ JNIEXPORT void JNICALL Java_mpi_Comm_allToAllw( *rPtr = ompi_java_getDirectBufferAddress(env, recvBuf); int rc = MPI_Alltoallw( - sPtr, cSCount, cSDispls, cSTypes, - rPtr, cRCount, cRDispls, cRTypes, comm); + sPtr, cSCount, cSDispls, cSTypes, + rPtr, cRCount, cRDispls, cRTypes, comm); ompi_java_exceptionCheck(env, rc); ompi_java_forgetIntArray(env, sCount, jSCount, cSCount); @@ -1643,8 +1643,8 @@ JNIEXPORT jlong JNICALL Java_mpi_Comm_iAllToAllw( MPI_Request request; int rc = MPI_Ialltoallw( - sPtr, cSCount, cSDispls, cSTypes, - rPtr, cRCount, cRDispls, cRTypes, comm, &request); + sPtr, cSCount, cSDispls, cSTypes, + rPtr, cRCount, cRDispls, cRTypes, comm, &request); ompi_java_exceptionCheck(env, rc); ompi_java_forgetIntArray(env, sCount, jSCount, cSCount); diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 081e69be657..2bf80716014 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -2336,7 +2336,7 @@ public final void allToAllw( allToAllw(handle, sendBuf, sendCount, sDispls, sendHandles, recvBuf, recvCount, rDispls, - recvHandles); + recvHandles); } private native void allToAllw(long comm, From 32f2d209837163baa6d98f5c41da0fa512d87a51 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Wed, 22 Jul 2015 11:04:41 -0600 Subject: [PATCH 0083/1704] Adding missed copyrights. I did not add the LANL copyrights to the files I touched while fixing the javadoc errors. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/CartComm.java | 2 ++ ompi/mpi/java/java/Datatype.java | 2 ++ ompi/mpi/java/java/DoubleInt.java | 2 ++ ompi/mpi/java/java/File.java | 2 ++ ompi/mpi/java/java/FloatInt.java | 2 ++ ompi/mpi/java/java/Freeable.java | 2 ++ ompi/mpi/java/java/GraphComm.java | 2 ++ ompi/mpi/java/java/Group.java | 2 ++ ompi/mpi/java/java/Info.java | 2 ++ ompi/mpi/java/java/Int2.java | 2 ++ ompi/mpi/java/java/Intercomm.java | 2 ++ ompi/mpi/java/java/LongInt.java | 2 ++ ompi/mpi/java/java/Message.java | 2 ++ ompi/mpi/java/java/Op.java | 2 ++ ompi/mpi/java/java/Prequest.java | 2 ++ ompi/mpi/java/java/Request.java | 2 ++ ompi/mpi/java/java/ShortInt.java | 2 ++ ompi/mpi/java/java/Status.java | 2 ++ ompi/mpi/java/java/Struct.java | 2 ++ ompi/mpi/java/java/UserFunction.java | 2 ++ 20 files changed, 40 insertions(+) diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index e5c8ca970fe..665e5ff35ac 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Datatype.java b/ompi/mpi/java/java/Datatype.java index 5a968891403..be3c9b80e42 100644 --- a/ompi/mpi/java/java/Datatype.java +++ b/ompi/mpi/java/java/Datatype.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/DoubleInt.java b/ompi/mpi/java/java/DoubleInt.java index eb6ada66fb2..b122afc68b3 100644 --- a/ompi/mpi/java/java/DoubleInt.java +++ b/ompi/mpi/java/java/DoubleInt.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/File.java b/ompi/mpi/java/java/File.java index 5a2b4530666..9777895af2c 100644 --- a/ompi/mpi/java/java/File.java +++ b/ompi/mpi/java/java/File.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/FloatInt.java b/ompi/mpi/java/java/FloatInt.java index 5950440c93a..b2c0a584f3f 100644 --- a/ompi/mpi/java/java/FloatInt.java +++ b/ompi/mpi/java/java/FloatInt.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Freeable.java b/ompi/mpi/java/java/Freeable.java index 7b9c0697e70..e889720ccfe 100644 --- a/ompi/mpi/java/java/Freeable.java +++ b/ompi/mpi/java/java/Freeable.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/GraphComm.java b/ompi/mpi/java/java/GraphComm.java index 65639334f8e..d40d21422d8 100644 --- a/ompi/mpi/java/java/GraphComm.java +++ b/ompi/mpi/java/java/GraphComm.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Group.java b/ompi/mpi/java/java/Group.java index 0b225cd98be..1eaf3042afd 100644 --- a/ompi/mpi/java/java/Group.java +++ b/ompi/mpi/java/java/Group.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Info.java b/ompi/mpi/java/java/Info.java index 04ff3acfbe7..3d1b2f7a678 100644 --- a/ompi/mpi/java/java/Info.java +++ b/ompi/mpi/java/java/Info.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Int2.java b/ompi/mpi/java/java/Int2.java index 73c93a6fec4..2f3a585405e 100644 --- a/ompi/mpi/java/java/Int2.java +++ b/ompi/mpi/java/java/Int2.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Intercomm.java b/ompi/mpi/java/java/Intercomm.java index f36f21295c1..1b206f5e6a0 100644 --- a/ompi/mpi/java/java/Intercomm.java +++ b/ompi/mpi/java/java/Intercomm.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/LongInt.java b/ompi/mpi/java/java/LongInt.java index fcde87c2363..fd5f85cf0aa 100644 --- a/ompi/mpi/java/java/LongInt.java +++ b/ompi/mpi/java/java/LongInt.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Message.java b/ompi/mpi/java/java/Message.java index 2a429bd46ef..b4efbec6f77 100644 --- a/ompi/mpi/java/java/Message.java +++ b/ompi/mpi/java/java/Message.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Op.java b/ompi/mpi/java/java/Op.java index f680449a441..ffd3ffbf6db 100644 --- a/ompi/mpi/java/java/Op.java +++ b/ompi/mpi/java/java/Op.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Prequest.java b/ompi/mpi/java/java/Prequest.java index 2ddd018d161..fd7b88706b6 100644 --- a/ompi/mpi/java/java/Prequest.java +++ b/ompi/mpi/java/java/Prequest.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index afe2a800912..dd86880ca7f 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/ShortInt.java b/ompi/mpi/java/java/ShortInt.java index 6e81f9baa18..c335e10c6ec 100644 --- a/ompi/mpi/java/java/ShortInt.java +++ b/ompi/mpi/java/java/ShortInt.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Status.java b/ompi/mpi/java/java/Status.java index 4830e05e5f7..81ed8efebf9 100644 --- a/ompi/mpi/java/java/Status.java +++ b/ompi/mpi/java/java/Status.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/Struct.java b/ompi/mpi/java/java/Struct.java index e7d4fa1a90a..65695cb9d66 100644 --- a/ompi/mpi/java/java/Struct.java +++ b/ompi/mpi/java/java/Struct.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/java/java/UserFunction.java b/ompi/mpi/java/java/UserFunction.java index 65e4cf2f6f9..e3630413d8e 100644 --- a/ompi/mpi/java/java/UserFunction.java +++ b/ompi/mpi/java/java/UserFunction.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow From 340c84fe01d9d3d02f3dabec48d70fed23ab7020 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 30 Jul 2015 15:39:03 -0600 Subject: [PATCH 0084/1704] White space fix Github revealed some weird spacing. --- ompi/mpi/java/c/mpi_Comm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/java/c/mpi_Comm.c b/ompi/mpi/java/c/mpi_Comm.c index f5e756bab7d..b086f23a46b 100644 --- a/ompi/mpi/java/c/mpi_Comm.c +++ b/ompi/mpi/java/c/mpi_Comm.c @@ -1619,8 +1619,8 @@ JNIEXPORT void JNICALL Java_mpi_Comm_allToAllw( JNIEXPORT jlong JNICALL Java_mpi_Comm_iAllToAllw( JNIEnv *env, jobject jthis, jlong jComm, - jobject sendBuf, jintArray sCount, jintArray sDispls, jlongArray sTypes, - jobject recvBuf, jintArray rCount, jintArray rDispls, jlongArray rTypes) + jobject sendBuf, jintArray sCount, jintArray sDispls, jlongArray sTypes, + jobject recvBuf, jintArray rCount, jintArray rDispls, jlongArray rTypes) { MPI_Comm comm = (MPI_Comm)jComm; From 4e99043e6a521b53e4337e657b196564cd4a225a Mon Sep 17 00:00:00 2001 From: "Nysal Jan K.A" Date: Thu, 30 Jul 2015 19:52:40 +0530 Subject: [PATCH 0085/1704] Fix an invalid memory access in mrecv & imrecv After the call to PML mrecv/imrecv, the message handle is set to MPI_MESSAGE_NULL. Use the cached communicator while invoking the error handler. --- ompi/mpi/c/imrecv.c | 2 +- ompi/mpi/c/mrecv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/c/imrecv.c b/ompi/mpi/c/imrecv.c index a23e4315d94..8811ca34963 100644 --- a/ompi/mpi/c/imrecv.c +++ b/ompi/mpi/c/imrecv.c @@ -67,5 +67,5 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype type, OPAL_CR_ENTER_LIBRARY(); rc = MCA_PML_CALL(imrecv(buf, count, type, message, request)); - OMPI_ERRHANDLER_RETURN(rc, (*message)->comm, rc, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/mrecv.c b/ompi/mpi/c/mrecv.c index ad4f6535b76..b5263e3b067 100644 --- a/ompi/mpi/c/mrecv.c +++ b/ompi/mpi/c/mrecv.c @@ -75,5 +75,5 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype type, opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int)); ); - OMPI_ERRHANDLER_RETURN(rc, (*message)->comm, rc, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } From 938c6fbca1d07464bfde95f5e6a6608070576f09 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 23 Jul 2015 14:52:01 -0600 Subject: [PATCH 0086/1704] Java Environment Variable Bindings Added the bindings for MPI_GET_VERSION and MPI_GET_LIBRARY_VERSION. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpiJava.h | 2 + ompi/mpi/java/c/mpi_MPI.c | 27 +++++++++++++ ompi/mpi/java/java/MPI.java | 25 ++++++++++++ ompi/mpi/java/java/Makefile.am | 4 ++ ompi/mpi/java/java/Version.java | 68 +++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+) create mode 100644 ompi/mpi/java/java/Version.java diff --git a/ompi/mpi/java/c/mpiJava.h b/ompi/mpi/java/c/mpiJava.h index 48c4e3e6eea..c8ce4f7e866 100644 --- a/ompi/mpi/java/c/mpiJava.h +++ b/ompi/mpi/java/c/mpiJava.h @@ -31,6 +31,8 @@ typedef struct { jmethodID CartParmsInit; jclass ShiftParmsClass; jmethodID ShiftParmsInit; + jclass VersionClass; + jmethodID VersionInit; jclass GraphParmsClass; jmethodID GraphParmsInit; jclass DistGraphNeighborsClass; diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index f2f0ff62e5a..27c2d28ec0d 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -208,6 +208,7 @@ static void deleteClasses(JNIEnv *env) { (*env)->DeleteGlobalRef(env, ompi_java.CartParmsClass); (*env)->DeleteGlobalRef(env, ompi_java.ShiftParmsClass); + (*env)->DeleteGlobalRef(env, ompi_java.VersionClass); (*env)->DeleteGlobalRef(env, ompi_java.GraphParmsClass); (*env)->DeleteGlobalRef(env, ompi_java.DistGraphNeighborsClass); (*env)->DeleteGlobalRef(env, ompi_java.StatusClass); @@ -261,6 +262,12 @@ JNIEXPORT jobject JNICALL Java_mpi_MPI_newDoubleInt(JNIEnv *env, jclass clazz) return (*env)->NewObject(env, c, m, iOff, sizeof(int)); } +JNIEXPORT void JNICALL Java_mpi_MPI_initVersion(JNIEnv *env, jclass jthis) +{ + ompi_java.VersionClass = findClass(env, "mpi/Version"); + ompi_java.VersionInit = (*env)->GetMethodID(env, ompi_java.VersionClass, "", "(II)V"); +} + JNIEXPORT jobjectArray JNICALL Java_mpi_MPI_Init_1jni( JNIEnv *env, jclass clazz, jobjectArray argv) { @@ -357,6 +364,26 @@ JNIEXPORT void JNICALL Java_mpi_MPI_Finalize_1jni(JNIEnv *env, jclass obj) deleteClasses(env); } +JNIEXPORT jobject JNICALL Java_mpi_MPI_getVersionJNI(JNIEnv *env, jclass jthis) +{ + int version, subversion; + int rc = MPI_Get_version(&version, &subversion); + ompi_java_exceptionCheck(env, rc); + + return (*env)->NewObject(env, ompi_java.VersionClass, + ompi_java.VersionInit, version, subversion); +} + +JNIEXPORT jstring JNICALL Java_mpi_MPI_getLibVersionJNI(JNIEnv *env, jclass jthis) +{ + int length; + char version[MPI_MAX_LIBRARY_VERSION_STRING]; + int rc = MPI_Get_library_version(version, &length); + ompi_java_exceptionCheck(env, rc); + + return (*env)->NewStringUTF(env, version); +} + JNIEXPORT jint JNICALL Java_mpi_MPI_getProcessorName( JNIEnv *env, jclass obj, jbyteArray buf) { diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index 0733767641f..b3ff3bc023e 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -394,6 +394,8 @@ public final class MPI ERR_WIN = c.ERR_WIN; ERR_LASTCODE = c.ERR_LASTCODE; ERR_SYSRESOURCE = c.ERR_SYSRESOURCE; + + initVersion(); } private static native Int2 newInt2(); @@ -401,6 +403,7 @@ public final class MPI private static native LongInt newLongInt(); private static native FloatInt newFloatInt(); private static native DoubleInt newDoubleInt(); +private static native void initVersion(); private static void initCommon() throws MPIException { @@ -538,6 +541,28 @@ public static double wtick() throws MPIException private static native double wtick_jni(); +/** + * Returns a version object representing the version of MPI being used. + *

Java binding of the MPI operation {@code MPI_GET_VERSION}. + * @return A version object representing the version and subversion of MPI being used. + */ +public static Version getVersion() { + return getVersionJNI(); +} + +private static native Version getVersionJNI(); + +/** + * Returns the version of the MPI Library + *

Java binding of the MPI operation {@code MPI_GET_LIBRARY_VERSION}. + * @return A string representation of the MPI Library + */ +public static String getLibVersion() { + return getLibVersionJNI(); +} + +private static native String getLibVersionJNI(); + /** * Returns the name of the processor on which it is called. *

Java binding of the MPI operation {@code MPI_GET_PROCESSOR_NAME}. diff --git a/ompi/mpi/java/java/Makefile.am b/ompi/mpi/java/java/Makefile.am index 99335c52880..72b35d58f27 100644 --- a/ompi/mpi/java/java/Makefile.am +++ b/ompi/mpi/java/java/Makefile.am @@ -1,6 +1,8 @@ # -*- makefile -*- # # Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Los Alamos National Security, LLC. All rights +# reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -56,6 +58,7 @@ JAVA_SRC_FILES = \ Status.java \ Struct.java \ UserFunction.java \ + Version.java \ Win.java EXTRA_DIST = $(JAVA_SRC_FILES) @@ -88,6 +91,7 @@ JAVA_H = \ mpi_Request.h \ mpi_ShiftParms.h \ mpi_Status.h \ + mpi_Version.h \ mpi_Win.h # A little verbosity magic; see Makefile.ompi-rules for an explanation. diff --git a/ompi/mpi/java/java/Version.java b/ompi/mpi/java/java/Version.java new file mode 100644 index 00000000000..e63911210d4 --- /dev/null +++ b/ompi/mpi/java/java/Version.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + * + * This file is almost a complete re-write for Open MPI compared to the + * original mpiJava package. Its license and copyright are listed below. + * See for more information. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * File : Version.java + * Author : Nathaniel Graham + * Created : Thu Jul 23 09:25 2015 + */ + +package mpi; + +/** + * Version and Subversion for MPI + */ +public final class Version +{ +private final int version; +private final int subVersion; + +protected Version(int version, int subVersion) +{ + this.version = version; + this.subVersion = subVersion; +} + +/** + * Gets the MPI version. + * @return MPI version + */ +public int getVersion() +{ + return version; +} + +/** + * Gets the MPI subversion. + * @return MPI subversion + */ +public int getSubVersion() +{ + return subVersion; +} + +} // Version From 2e373092a0604d45b5dafad387567aa3e2fcf25c Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 23 Jul 2015 18:01:19 -0600 Subject: [PATCH 0087/1704] Java bindings for window name get and set Includes bindings for MPI_WIN_GET_NAME and MPI_WIN_SET_NAME. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Win.c | 22 ++++++++++++++++++++++ ompi/mpi/java/java/Win.java | 26 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/ompi/mpi/java/c/mpi_Win.c b/ompi/mpi/java/c/mpi_Win.c index 21361f837d2..66399433e21 100644 --- a/ompi/mpi/java/c/mpi_Win.c +++ b/ompi/mpi/java/c/mpi_Win.c @@ -468,3 +468,25 @@ JNIEXPORT void JNICALL Java_mpi_Win_flushLocalAll(JNIEnv *env, jobject jthis, jl int rc = MPI_Win_flush_local_all((MPI_Win)win); ompi_java_exceptionCheck(env, rc); } + +JNIEXPORT void JNICALL Java_mpi_Win_setName( + JNIEnv *env, jobject jthis, jlong handle, jstring jname) +{ + const char *name = (*env)->GetStringUTFChars(env, jname, NULL); + int rc = MPI_Win_set_name((MPI_Comm)handle, (char*)name); + ompi_java_exceptionCheck(env, rc); + (*env)->ReleaseStringUTFChars(env, jname, name); +} + +JNIEXPORT jstring JNICALL Java_mpi_Win_getName( + JNIEnv *env, jobject jthis, jlong handle) +{ + char name[MPI_MAX_OBJECT_NAME]; + int len; + int rc = MPI_Win_get_name((MPI_Comm)handle, name, &len); + + if(ompi_java_exceptionCheck(env, rc)) + return NULL; + + return (*env)->NewStringUTF(env, name); +} diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index 0d3f13b3d29..0956f38a027 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -870,4 +870,30 @@ public void flushLocalAll() throws MPIException private native void flushLocalAll(long win) throws MPIException; +/** + * Java binding of the MPI operation {@code MPI_WIN_GET_NAME}. + * @return the name associated with this window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ +public String getName() throws MPIException +{ + MPI.check(); + return getName(handle); +} + +private native String getName(long handle) throws MPIException; + +/** + * Java binding of the MPI operation {@code MPI_WIN_SET_NAME}. + * @param name the name to associate with this window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ +public void setName(String name) throws MPIException +{ + MPI.check(); + setName(handle, name); +} + +private native void setName(long handle, String name) throws MPIException; + } // Win From 12daab632f734d69196153c2c0cb3d2b2cfb6d80 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 31 Jul 2015 12:03:54 -0700 Subject: [PATCH 0088/1704] usnic: convert to use fi_recvmsg / FI_MORE Minor optimization to post 16 receive buffers at a time (vs. 1). (cherry picked from commit 2e7f794aae2f42d2685bf2c1cbddc40b93a25a0c) --- opal/mca/btl/usnic/btl_usnic_module.c | 1 + opal/mca/btl/usnic/btl_usnic_module.h | 1 + opal/mca/btl/usnic/btl_usnic_recv.h | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index ce138b8f99b..7ca6af3f8c8 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -1609,6 +1609,7 @@ static int init_one_channel(opal_btl_usnic_module_t *module, channel->fastsend_wqe_thresh = sd_num - 10; channel->credits = sd_num; + channel->rx_post_cnt = 0; /* We did math up in component_init() to know that there should be enough CQs available. So if create_cq() fails, then either the diff --git a/opal/mca/btl/usnic/btl_usnic_module.h b/opal/mca/btl/usnic/btl_usnic_module.h index ea6e44cfab8..4f23eeac447 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.h +++ b/opal/mca/btl/usnic/btl_usnic_module.h @@ -69,6 +69,7 @@ typedef struct opal_btl_usnic_channel_t { int chan_sd_num; int credits; /* RFXXX until libfab credits fixed */ + uint32_t rx_post_cnt; /* fastsend enabled if num_credits_available >= fastsend_wqe_thresh */ unsigned fastsend_wqe_thresh; diff --git a/opal/mca/btl/usnic/btl_usnic_recv.h b/opal/mca/btl/usnic/btl_usnic_recv.h index e0d2ef216a2..4773bba4aaf 100644 --- a/opal/mca/btl/usnic/btl_usnic_recv.h +++ b/opal/mca/btl/usnic/btl_usnic_recv.h @@ -23,12 +23,27 @@ void opal_btl_usnic_recv_call(opal_btl_usnic_module_t *module, static inline int opal_btl_usnic_post_recv_list(opal_btl_usnic_channel_t *channel) { + struct iovec iov; + struct fi_msg msg; + uint64_t flag; opal_btl_usnic_recv_segment_t *rseg; int rc; + msg.msg_iov = &iov; + msg.iov_count = 1; for (rseg = channel->repost_recv_head; NULL != rseg; rseg = rseg->rs_next) { - rc = fi_recv(channel->ep, rseg->rs_protocol_header, - rseg->rs_len, NULL, FI_ADDR_UNSPEC, rseg); + msg.context = rseg; + iov.iov_base = rseg->rs_protocol_header; + iov.iov_len = rseg->rs_len; + + ++channel->rx_post_cnt; + if (OPAL_UNLIKELY((channel->rx_post_cnt & 15) == 0)) { + flag = 0; + } else { + flag = FI_MORE; + } + + rc = fi_recvmsg(channel->ep, &msg, flag); if (0 != rc) { return rc; } From 677d7408567e0e91a73cebcbf20f32d676e232d7 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 31 Jul 2015 11:39:47 -0700 Subject: [PATCH 0089/1704] usnic: ensure that we have libfabric >= v1.1 (cherry picked from commit 0ee8295e6e49877f9cdb6a90916ce60ece1617c7) --- opal/mca/btl/usnic/configure.m4 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/opal/mca/btl/usnic/configure.m4 b/opal/mca/btl/usnic/configure.m4 index 55ec9232b29..c4cfa841160 100644 --- a/opal/mca/btl/usnic/configure.m4 +++ b/opal/mca/btl/usnic/configure.m4 @@ -99,6 +99,26 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[ [opal_btl_usnic_happy=yes], [opal_btl_usnic_happy=no]) + # The usnic BTL requires at least libfabric v1.1 (there was a + # critical bug in libfabric v1.0). + AS_IF([test "$opal_btl_usnic_happy" = "yes"], + [AC_MSG_CHECKING([whether libfabric is >= v1.1]) + opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS + CPPFLAGS="$opal_common_libfabric_CPPFLAGS $CPPFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[ +#if !defined(FI_MAJOR_VERSION) +#error your version of libfabric is too old +#elif FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) < FI_VERSION(1, 1) +#error your version of libfabric is too old +#endif +]])], + [opal_btl_usnic_happy=yes], + [opal_btl_usnic_happy=no]) + AC_MSG_RESULT([$opal_btl_usnic_happy]) + CPPFLAGS=$opal_btl_usnic_CPPFLAGS_save + ]) + # Make sure we can find the libfabric usnic extensions header AS_IF([test "$opal_btl_usnic_happy" = "yes" ], [opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS From 0365de06bb12937242c2fdf24076cd96cdf154e3 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 31 Jul 2015 11:40:03 -0700 Subject: [PATCH 0090/1704] usnic: remove a stale shell variable name (cherry picked from commit cbcd16b399cfc7ca1cc043c0c107cbee55c93cb9) --- opal/mca/btl/usnic/configure.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opal/mca/btl/usnic/configure.m4 b/opal/mca/btl/usnic/configure.m4 index c4cfa841160..3ca084f1dae 100644 --- a/opal/mca/btl/usnic/configure.m4 +++ b/opal/mca/btl/usnic/configure.m4 @@ -47,7 +47,7 @@ AC_DEFUN([MCA_opal_btl_usnic_CONFIG],[ ]) AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[ - OPAL_VAR_SCOPE_PUSH([unit_tests opal_btl_usnic_CPPFLAGS_save]) + OPAL_VAR_SCOPE_PUSH([unit_tests]) # see README.test for information about this scheme AC_ARG_ENABLE([opal-btl-usnic-unit-tests], From 4270932250cddc2b411759759c1c4f0020aa7108 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sat, 1 Aug 2015 10:01:02 -0700 Subject: [PATCH 0091/1704] Fix an annoying segfault caused by incorrect indentation in a loop that causes the buffer to not be created prior to packing. (cherry picked from commit 9bc384282a310421c08df54bbc6a3d1307d014ce) --- orte/orted/pmix/pmix_server_process_msgs.c | 100 ++++++++++----------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/orte/orted/pmix/pmix_server_process_msgs.c b/orte/orted/pmix/pmix_server_process_msgs.c index a160a5e74a1..edd60c603d2 100644 --- a/orte/orted/pmix/pmix_server_process_msgs.c +++ b/orte/orted/pmix/pmix_server_process_msgs.c @@ -330,8 +330,8 @@ void pmix_server_process_message(pmix_server_peer_t *peer) * was actually provided so we don't hang if no modex data is being given */ OPAL_LIST_FOREACH_SAFE(req, nextreq, &pmix_server_pending_dmx_reqs, pmix_server_dmx_req_t) { if (0 == opal_compare_proc(id, req->target)) { - /* yes - deliver a copy */ reply = OBJ_NEW(opal_buffer_t); + /* yes - deliver a copy */ if (NULL == req->proxy) { /* pack the status */ ret = OPAL_SUCCESS; @@ -370,59 +370,59 @@ void pmix_server_process_message(pmix_server_peer_t *peer) OBJ_DESTRUCT(&buf); /* pass the local blob(s) */ opal_dss.copy_payload(reply, &blocal); - } - /* use the PMIX send to return the data */ - PMIX_SERVER_QUEUE_SEND(req->peer, req->tag, reply); - } else { - /* pack the id of the requested proc */ - if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) { - ORTE_ERROR_LOG(rc); - OBJ_RELEASE(reply); - OBJ_DESTRUCT(&xfer); - OBJ_RELEASE(sig); - return; - } - /* pack the status */ - ret = OPAL_SUCCESS; - if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &ret, 1, OPAL_INT))) { - ORTE_ERROR_LOG(rc); - OBJ_RELEASE(reply); - return; - } - /* always pass the hostname */ - OBJ_CONSTRUCT(&buf, opal_buffer_t); - OBJ_CONSTRUCT(&kv, opal_value_t); - kv.key = strdup(PMIX_HOSTNAME); - kv.type = OPAL_STRING; - kv.data.string = strdup(orte_process_info.nodename); - kp = &kv; - if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf, &kp, 1, OPAL_VALUE))) { - ORTE_ERROR_LOG(rc); - OBJ_RELEASE(reply); - OBJ_DESTRUCT(&buf); + /* use the PMIX send to return the data */ + PMIX_SERVER_QUEUE_SEND(req->peer, req->tag, reply); + } else { + /* pack the id of the requested proc */ + if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) { + ORTE_ERROR_LOG(rc); + OBJ_RELEASE(reply); + OBJ_DESTRUCT(&xfer); + OBJ_RELEASE(sig); + return; + } + /* pack the status */ + ret = OPAL_SUCCESS; + if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &ret, 1, OPAL_INT))) { + ORTE_ERROR_LOG(rc); + OBJ_RELEASE(reply); + return; + } + /* always pass the hostname */ + OBJ_CONSTRUCT(&buf, opal_buffer_t); + OBJ_CONSTRUCT(&kv, opal_value_t); + kv.key = strdup(PMIX_HOSTNAME); + kv.type = OPAL_STRING; + kv.data.string = strdup(orte_process_info.nodename); + kp = &kv; + if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf, &kp, 1, OPAL_VALUE))) { + ORTE_ERROR_LOG(rc); + OBJ_RELEASE(reply); + OBJ_DESTRUCT(&buf); + OBJ_DESTRUCT(&kv); + return; + } OBJ_DESTRUCT(&kv); - return; - } - OBJ_DESTRUCT(&kv); - /* pack the hostname blob */ - bptr = &buf; - if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &bptr, 1, OPAL_BUFFER))) { - ORTE_ERROR_LOG(rc); - OBJ_RELEASE(reply); - OBJ_DESTRUCT(&xfer); + /* pack the hostname blob */ + bptr = &buf; + if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &bptr, 1, OPAL_BUFFER))) { + ORTE_ERROR_LOG(rc); + OBJ_RELEASE(reply); + OBJ_DESTRUCT(&xfer); + OBJ_DESTRUCT(&buf); + return; + } OBJ_DESTRUCT(&buf); - return; + /* pass the remote blob(s) */ + opal_dss.copy_payload(reply, &bremote); + /* use RML to send the response */ + orte_rml.send_buffer_nb(&req->proxy->name, reply, + ORTE_RML_TAG_DIRECT_MODEX_RESP, + orte_rml_send_callback, NULL); } - OBJ_DESTRUCT(&buf); - /* pass the remote blob(s) */ - opal_dss.copy_payload(reply, &bremote); - /* use RML to send the response */ - orte_rml.send_buffer_nb(&req->proxy->name, reply, - ORTE_RML_TAG_DIRECT_MODEX_RESP, - orte_rml_send_callback, NULL); + opal_list_remove_item(&pmix_server_pending_dmx_reqs, &req->super); + OBJ_RELEASE(req); } - opal_list_remove_item(&pmix_server_pending_dmx_reqs, &req->super); - OBJ_RELEASE(req); } OBJ_DESTRUCT(&blocal); OBJ_DESTRUCT(&bremote); From 7814cd947d4985a509cb9934aebaf253de45767b Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 3 Aug 2015 08:52:11 +0900 Subject: [PATCH 0092/1704] Revert "fortran: optimize testall and waitall when MPI_STATUSES_IGNORE is used" This reverts commit 8d58e5847f6854a4dd6c8d9dd4fe76bec5ba2a82. (cherry-picked from commit open-mpi/ompi@2fa8f4d53ac973519fe6081f245abe0952fed26d) --- ompi/mpi/fortran/mpif-h/testall_f.c | 7 +++---- ompi/mpi/fortran/mpif-h/waitall_f.c | 15 +++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/testall_f.c b/ompi/mpi/fortran/mpif-h/testall_f.c index fd946c35633..bfb698ec2a2 100644 --- a/ompi/mpi/fortran/mpif-h/testall_f.c +++ b/ompi/mpi/fortran/mpif-h/testall_f.c @@ -10,8 +10,6 @@ * 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 (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -109,10 +107,11 @@ void ompi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_l /* All Fortran Compilers have FALSE == 0, so just check for any nonzero value (because TRUE is not always == 1) */ - if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && *flag) { + if (MPI_SUCCESS == c_ierr && *flag) { for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) { array_of_requests[i] = c_req[i]->req_f_to_c_index; - if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { + if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && + !OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); } } diff --git a/ompi/mpi/fortran/mpif-h/waitall_f.c b/ompi/mpi/fortran/mpif-h/waitall_f.c index 8428245ea1f..5cabd6274e4 100644 --- a/ompi/mpi/fortran/mpif-h/waitall_f.c +++ b/ompi/mpi/fortran/mpif-h/waitall_f.c @@ -5,17 +5,15 @@ * 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, + * 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 (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -104,11 +102,12 @@ void ompi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests, c_ierr = MPI_Waitall(OMPI_FINT_2_INT(*count), c_req, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) { + if (MPI_SUCCESS == c_ierr) { for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) { array_of_requests[i] = c_req[i]->req_f_to_c_index; - if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { - MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); + if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && + !OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { + MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); } } } From 140f1d0b392f00008c71be2b6e98cce590d15ea9 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 29 Jul 2015 17:10:39 -0500 Subject: [PATCH 0093/1704] - the memory chunk that has to be allocated for the llapi_get_stripe function seems to have changed compared to earlier version. This implementation now follows the code snipplet from the man pages. - implementation of file_get_size and set_size --- ompi/mca/fs/lustre/fs_lustre_file_get_size.c | 13 +++++++++++-- ompi/mca/fs/lustre/fs_lustre_file_set_size.c | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ompi/mca/fs/lustre/fs_lustre_file_get_size.c b/ompi/mca/fs/lustre/fs_lustre_file_get_size.c index 35c73cf40cb..d38fea450e3 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_get_size.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_get_size.c @@ -33,9 +33,18 @@ * Returns: - Success if size is get */ int -mca_fs_lustre_file_get_size (mca_io_ompio_file_t *file_handle, +mca_fs_lustre_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size) { - printf ("LUSTRE GET SIZE\n"); + *size = lseek(fh->fd, 0, SEEK_END); + if (-1 == *size) { + perror ("lseek"); + return OMPI_ERROR; + } + + if (-1 == (lseek(fh->fd, fh->f_offset, SEEK_SET))) { + perror ("lseek"); + return OMPI_ERROR; + } return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/lustre/fs_lustre_file_set_size.c b/ompi/mca/fs/lustre/fs_lustre_file_set_size.c index c5492a31eb3..96b9a30e4a6 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_set_size.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_set_size.c @@ -33,9 +33,21 @@ * Returns: - Success if size is set */ int -mca_fs_lustre_file_set_size (mca_io_ompio_file_t *file_handle, +mca_fs_lustre_file_set_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size) { - printf ("LUSTRE SET SIZE\n"); + int err = 0; + + err = ftruncate(fh->fd, size); + + fh->f_comm->c_coll.coll_bcast (&err, + 1, + MPI_INT, + OMPIO_ROOT, + fh->f_comm, + fh->f_comm->c_coll.coll_bcast_module); + if (-1 == err) { + return OMPI_ERROR; + } return OMPI_SUCCESS; } From dd21399774bc46aef92272844ad2bf13eaea6e79 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 29 Jul 2015 17:13:55 -0500 Subject: [PATCH 0094/1704] the memory chunk that has to be allocated for the llapi_get_stripe function seems to have changed compared to earlier version. This implementation now follows the code snipplet from the man pages. --- ompi/mca/fs/lustre/fs_lustre_file_open.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/ompi/mca/fs/lustre/fs_lustre_file_open.c b/ompi/mca/fs/lustre/fs_lustre_file_open.c index 02d3bb2ec61..5d3719c6d75 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_open.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_open.c @@ -40,6 +40,19 @@ * Accepts: - same arguments as MPI_File_open() * Returns: - Success if new file handle */ +static void *alloc_lum() +{ + int v1, v3, join; + + v1 = sizeof(struct lov_user_md_v1) + + LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1); + v3 = sizeof(struct lov_user_md_v3) + + LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1); + + return malloc(MAX(v1, v3)); +} + + int mca_fs_lustre_file_open (struct ompi_communicator_t *comm, char* filename, @@ -97,7 +110,6 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, fs_lustre_stripe_width = mca_fs_lustre_stripe_width; } - if ( (fs_lustre_stripe_size>0 || fs_lustre_stripe_width>0) && (amode&O_CREAT) && (amode&O_RDWR)) { if (0 == fh->f_rank) { @@ -121,6 +133,7 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, fh->fd = open (filename, amode, perm); if (fh->fd < 0) { + opal_output(1, "error opening file %s\n", filename); return OMPI_ERROR; } @@ -128,17 +141,21 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, fh->f_stripe_size = mca_fs_lustre_stripe_size; } else { - lump = (struct lov_user_md *) malloc (sizeof(struct lov_user_md)); + lump = alloc_lum(); if (NULL == lump ){ fprintf(stderr,"Cannot allocate memory for extracting stripe size\n"); return OMPI_ERROR; } rc = llapi_file_get_stripe(filename, lump); if (rc != 0) { - fprintf(stderr, "get_stripe failed: %d (%s)\n",errno, strerror(errno)); + opal_output(1, "get_stripe failed: %d (%s)\n", errno, strerror(errno)); return OMPI_ERROR; } fh->f_stripe_size = lump->lmm_stripe_size; + + // if ( NULL != lump ) { + // free ( lump ); + // } } return OMPI_SUCCESS; } From 13471d021936cd5a792d7eb634f8c8558e54f555 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 30 Jul 2015 17:24:01 -0500 Subject: [PATCH 0095/1704] make sure the final number of aggregators is recorded correctly when not using our aggregator selection logic. --- ompi/mca/io/ompio/io_ompio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 93e792d8155..dd8c1f665f2 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -1053,6 +1053,7 @@ int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, } fh->f_aggregator_index = 0; + fh->f_final_num_aggrs = num_aggregators; return OMPI_SUCCESS; } From 88ca3026e5af88efb3e6360f93e93accb44ab990 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Fri, 24 Jul 2015 11:02:13 -0600 Subject: [PATCH 0096/1704] Formatting fixes for Java files. Fixed tab indenting as well as some of the block comments at the top of a few of the files. Signed-off-by: Nathaniel Graham Conflicts: ompi/mpi/java/java/CartComm.java ompi/mpi/java/java/Comm.java ompi/mpi/java/java/Constant.java ompi/mpi/java/java/Errhandler.java ompi/mpi/java/java/Intercomm.java ompi/mpi/java/java/Intracomm.java ompi/mpi/java/java/MPI.java ompi/mpi/java/java/Request.java ompi/mpi/java/java/Struct.java ompi/mpi/java/java/UserFunction.java --- ompi/mpi/java/java/CartComm.java | 386 +- ompi/mpi/java/java/CartParms.java | 142 +- ompi/mpi/java/java/Comm.java | 6163 ++++++++++---------- ompi/mpi/java/java/Constant.java | 173 +- ompi/mpi/java/java/Datatype.java | 1076 ++-- ompi/mpi/java/java/DistGraphNeighbors.java | 146 +- ompi/mpi/java/java/DoubleComplex.java | 240 +- ompi/mpi/java/java/DoubleInt.java | 154 +- ompi/mpi/java/java/Errhandler.java | 50 +- ompi/mpi/java/java/File.java | 2394 ++++---- ompi/mpi/java/java/FileView.java | 100 +- ompi/mpi/java/java/FloatComplex.java | 240 +- ompi/mpi/java/java/FloatInt.java | 154 +- ompi/mpi/java/java/Freeable.java | 44 +- ompi/mpi/java/java/GraphComm.java | 288 +- ompi/mpi/java/java/GraphParms.java | 146 +- ompi/mpi/java/java/Group.java | 470 +- ompi/mpi/java/java/Info.java | 300 +- ompi/mpi/java/java/Int2.java | 178 +- ompi/mpi/java/java/Intercomm.java | 258 +- ompi/mpi/java/java/Intracomm.java | 1602 ++--- ompi/mpi/java/java/LongInt.java | 190 +- ompi/mpi/java/java/MPI.java | 2836 ++++++--- ompi/mpi/java/java/MPIException.java | 116 +- ompi/mpi/java/java/Message.java | 246 +- ompi/mpi/java/java/Op.java | 184 +- ompi/mpi/java/java/Prequest.java | 106 +- ompi/mpi/java/java/Request.java | 840 +-- ompi/mpi/java/java/ShiftParms.java | 82 +- ompi/mpi/java/java/ShortInt.java | 196 +- ompi/mpi/java/java/Status.java | 278 +- ompi/mpi/java/java/Struct.java | 1540 ++--- ompi/mpi/java/java/UserFunction.java | 308 +- ompi/mpi/java/java/Win.java | 1740 +++--- 34 files changed, 12151 insertions(+), 11215 deletions(-) diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index 665e5ff35ac..d14c4372203 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Cartcomm.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -52,181 +52,181 @@ */ public final class CartComm extends Intracomm { -static -{ - init(); -} - -private static native void init(); - -protected CartComm(long handle) throws MPIException -{ - super(handle); -} - -protected CartComm(long[] commRequest) -{ - super(commRequest); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return copy of this communicator - */ -@Override public CartComm clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public CartComm dup() throws MPIException -{ - MPI.check(); - return new CartComm(dup(handle)); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_IDUP}. - *

The new communicator can't be used before the operation completes. - * The request object must be obtained calling {@link #getRequest}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public CartComm iDup() throws MPIException -{ - MPI.check(); - return new CartComm(iDup(handle)); -} - -/** - * Returns cartesian topology information. - *

Java binding of the MPI operations {@code MPI_CARTDIM_GET} and - * {@code MPI_CART_GET}. - *

The number of dimensions can be obtained from the size of (eg) - * {@code dims} field of the returned object. - * @return object containing dimensions, periods and local coordinates - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public CartParms getTopo() throws MPIException -{ - MPI.check(); - return getTopo(handle); -} - -private native CartParms getTopo(long comm) throws MPIException; - -/** - * Translate logical process coordinates to process rank. - *

Java binding of the MPI operation {@code MPI_CART_RANK}. - * @param coords Cartesian coordinates of a process - * @return rank of the specified process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getRank(int[] coords) throws MPIException -{ - MPI.check(); - return getRank(handle, coords); -} - -private native int getRank(long comm, int[] coords) throws MPIException; - -/** - * Translate process rank to logical process coordinates. - *

Java binding of the MPI operation {@code MPI_CART_COORDS}. - * @param rank rank of a process - * @return Cartesian coordinates of the specified process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int[] getCoords(int rank) throws MPIException -{ - MPI.check(); - return getCoords(handle, rank); -} - -private native int[] getCoords(long comm, int rank) throws MPIException; - -/** - * Compute source and destination ranks for "shift" communication. - *

Java binding of the MPI operation {@code MPI_CART_SHIFT}. - * @param direction coordinate dimension of shift - * @param disp displacement - * @return object containing ranks of source and destination processes - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public ShiftParms shift(int direction, int disp) throws MPIException -{ - MPI.check(); - return shift(handle, direction, disp); -} - -private native ShiftParms shift(long comm, int direction, int disp) - throws MPIException; - -/** - * Partition cartesian communicator into subgroups of lower dimension. - *

Java binding of the MPI operation {@code MPI_CART_SUB}. - * @param remainDims by dimension, {@code true} if dimension is to be kept, - * {@code false} otherwise - * @return communicator containing subgrid including this process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public CartComm sub(boolean[] remainDims) throws MPIException -{ - MPI.check(); - return new CartComm(sub(handle, remainDims)); -} - -private native long sub(long comm, boolean[] remainDims) throws MPIException; - -/** - * Compute an optimal placement. - *

Java binding of the MPI operation {@code MPI_CART_MAP}. - *

The number of dimensions is taken to be size of the {@code dims} argument. - * @param dims the number of processes in each dimension - * @param periods {@code true} if grid is periodic, - * {@code false} if not, in each dimension - * @return reordered rank of calling process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int map(int[] dims, boolean[] periods) throws MPIException -{ - MPI.check(); - return map(handle, dims, periods); -} - -private native int map(long comm, int[] dims, boolean[] periods) - throws MPIException; - -/** - * Select a balanced distribution of processes per coordinate direction. - *

Java binding of the MPI operation {@code MPI_DIMS_CREATE}. - * @param nnodes number of nodes in a grid - * @param dims array specifying the number of nodes in each dimension - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void createDims(int nnodes, int[] dims) throws MPIException -{ - MPI.check(); - createDims_jni(nnodes, dims); -} - -private static native void createDims_jni(int nnodes, int[] dims) - throws MPIException; + static + { + init(); + } + + private static native void init(); + + protected CartComm(long handle) throws MPIException + { + super(handle); + } + + protected CartComm(long[] commRequest) + { + super(commRequest); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return copy of this communicator + */ + @Override public CartComm clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public CartComm dup() throws MPIException + { + MPI.check(); + return new CartComm(dup(handle)); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_IDUP}. + *

The new communicator can't be used before the operation completes. + * The request object must be obtained calling {@link #getRequest}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred. + */ + @Override public CartComm iDup() throws MPIException + { + MPI.check(); + return new CartComm(iDup(handle)); + } + + /** + * Returns cartesian topology information. + *

Java binding of the MPI operations {@code MPI_CARTDIM_GET} and + * {@code MPI_CART_GET}. + *

The number of dimensions can be obtained from the size of (eg) + * {@code dims} field of the returned object. + * @return object containing dimensions, periods and local coordinates + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public CartParms getTopo() throws MPIException + { + MPI.check(); + return getTopo(handle); + } + + private native CartParms getTopo(long comm) throws MPIException; + + /** + * Translate logical process coordinates to process rank. + *

Java binding of the MPI operation {@code MPI_CART_RANK}. + * @param coords Cartesian coordinates of a process + * @return rank of the specified process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getRank(int[] coords) throws MPIException + { + MPI.check(); + return getRank(handle, coords); + } + + private native int getRank(long comm, int[] coords) throws MPIException; + + /** + * Translate process rank to logical process coordinates. + *

Java binding of the MPI operation {@code MPI_CART_COORDS}. + * @param rank rank of a process + * @return Cartesian coordinates of the specified process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int[] getCoords(int rank) throws MPIException + { + MPI.check(); + return getCoords(handle, rank); + } + + private native int[] getCoords(long comm, int rank) throws MPIException; + + /** + * Compute source and destination ranks for "shift" communication. + *

Java binding of the MPI operation {@code MPI_CART_SHIFT}. + * @param direction coordinate dimension of shift + * @param disp displacement + * @return object containing ranks of source and destination processes + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public ShiftParms shift(int direction, int disp) throws MPIException + { + MPI.check(); + return shift(handle, direction, disp); + } + + private native ShiftParms shift(long comm, int direction, int disp) + throws MPIException; + + /** + * Partition cartesian communicator into subgroups of lower dimension. + *

Java binding of the MPI operation {@code MPI_CART_SUB}. + * @param remainDims by dimension, {@code true} if dimension is to be kept, + * {@code false} otherwise + * @return communicator containing subgrid including this process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public CartComm sub(boolean[] remainDims) throws MPIException + { + MPI.check(); + return new CartComm(sub(handle, remainDims)); + } + + private native long sub(long comm, boolean[] remainDims) throws MPIException; + + /** + * Compute an optimal placement. + *

Java binding of the MPI operation {@code MPI_CART_MAP}. + *

The number of dimensions is taken to be size of the {@code dims} argument. + * @param dims the number of processes in each dimension + * @param periods {@code true} if grid is periodic, + * {@code false} if not, in each dimension + * @return reordered rank of calling process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int map(int[] dims, boolean[] periods) throws MPIException + { + MPI.check(); + return map(handle, dims, periods); + } + + private native int map(long comm, int[] dims, boolean[] periods) + throws MPIException; + + /** + * Select a balanced distribution of processes per coordinate direction. + *

Java binding of the MPI operation {@code MPI_DIMS_CREATE}. + * @param nnodes number of nodes in a grid + * @param dims array specifying the number of nodes in each dimension + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void createDims(int nnodes, int[] dims) throws MPIException + { + MPI.check(); + createDims_jni(nnodes, dims); + } + + private static native void createDims_jni(int nnodes, int[] dims) + throws MPIException; } // Cartcomm diff --git a/ompi/mpi/java/java/CartParms.java b/ompi/mpi/java/java/CartParms.java index 1be8bee063e..7d1645369b9 100644 --- a/ompi/mpi/java/java/CartParms.java +++ b/ompi/mpi/java/java/CartParms.java @@ -9,31 +9,33 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : CartParms.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -50,65 +52,65 @@ */ public final class CartParms { -/** Number of processes for each cartesian dimension. */ -private final int[] dims; + /** Number of processes for each cartesian dimension. */ + private final int[] dims; -/** Periodicity (true/false) for each cartesian dimension. */ -private final boolean[] periods; + /** Periodicity (true/false) for each cartesian dimension. */ + private final boolean[] periods; -/** Coordinates of calling process in cartesian structure. */ -private final int[] coords; + /** Coordinates of calling process in cartesian structure. */ + private final int[] coords; -/** - * Constructs a cartesian topology information object. - * @param dims number of processes for each cartesian dimension. - * @param periods periodicity (true/false) for each cartesian dimension. - * @param coords coordinates of calling process in cartesian structure. - */ -protected CartParms(int[] dims, boolean[] periods, int[] coords) -{ - this.dims = dims; - this.periods = periods; - this.coords = coords; -} + /** + * Constructs a cartesian topology information object. + * @param dims number of processes for each cartesian dimension. + * @param periods periodicity (true/false) for each cartesian dimension. + * @param coords coordinates of calling process in cartesian structure. + */ + protected CartParms(int[] dims, boolean[] periods, int[] coords) + { + this.dims = dims; + this.periods = periods; + this.coords = coords; + } -/** - * Returns the number of dimensions. - * @return number of dimensions. - */ -public int getDimCount() -{ - return dims.length; -} + /** + * Returns the number of dimensions. + * @return number of dimensions. + */ + public int getDimCount() + { + return dims.length; + } -/** - * Returns the number of processes for a cartesian dimension. - * @param i cartesian dimension. - * @return number of processes for a cartesian dimension. - */ -public int getDim(int i) -{ - return dims[i]; -} + /** + * Returns the number of processes for a cartesian dimension. + * @param i cartesian dimension. + * @return number of processes for a cartesian dimension. + */ + public int getDim(int i) + { + return dims[i]; + } -/** - * Returns the periodicity (true/false) for a cartesian dimension. - * @param i cartesian dimension. - * @return periodicity for a cartesian dimension. - */ -public boolean getPeriod(int i) -{ - return periods[i]; -} + /** + * Returns the periodicity (true/false) for a cartesian dimension. + * @param i cartesian dimension. + * @return periodicity for a cartesian dimension. + */ + public boolean getPeriod(int i) + { + return periods[i]; + } -/** - * Returns the coordinate of calling process for a cartesian dimension. - * @param i cartesian dimension. - * @return coordinate of calling process for a cartesian dimension. - */ -public int getCoord(int i) -{ - return coords[i]; -} + /** + * Returns the coordinate of calling process for a cartesian dimension. + * @param i cartesian dimension. + * @return coordinate of calling process for a cartesian dimension. + */ + public int getCoord(int i) + { + return coords[i]; + } } // CartParms diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 2bf80716014..c0f3aff524c 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -18,26 +18,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Comm.java * Author : Sang Lim, Sung-Hoon Ko, Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 @@ -45,9 +45,9 @@ * Updated : $Date: 2001/08/07 16:36:25 $ * Copyright: Northeast Parallel Architectures Center * at Syracuse University 1998 - */ - -/* + * + * + * * IMPLEMENTATION DETAILS * * All methods with buffers that can be direct or non direct have @@ -67,3260 +67,3261 @@ */ public class Comm implements Freeable { -public final static int TYPE_SHARED = 0; -protected final static int SELF = 1; -protected final static int WORLD = 2; -protected long handle; -private Request request; + public final static int TYPE_SHARED = 0; + protected final static int SELF = 1; + protected final static int WORLD = 2; + protected long handle; + private Request request; -private static long nullHandle; + private static long nullHandle; -static -{ - init(); -} + static + { + init(); + } -private static native void init(); + private static native void init(); -protected Comm() -{ -} + protected Comm() + { + } -protected Comm(long handle) -{ - this.handle = handle; -} + protected Comm(long handle) + { + this.handle = handle; + } -protected Comm(long[] commRequest) -{ - handle = commRequest[0]; - request = new Request(commRequest[1]); -} + protected Comm(long[] commRequest) + { + handle = commRequest[0]; + request = new Request(commRequest[1]); + } -protected final void setType(int type) -{ - getComm(type); -} + protected final void setType(int type) + { + getComm(type); + } -private native void getComm(int type); + private native void getComm(int type); + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return copy of this communicator + */ + @Override public Comm clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return copy of this communicator - */ -@Override public Comm clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Comm dup() throws MPIException + { + MPI.check(); + return new Comm(dup(handle)); + } -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Comm dup() throws MPIException -{ - MPI.check(); - return new Comm(dup(handle)); -} + protected final native long dup(long comm) throws MPIException; + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_IDUP}. + *

The new communicator can't be used before the operation completes. + * The request object must be obtained calling {@link #getRequest}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Comm iDup() throws MPIException + { + MPI.check(); + return new Comm(iDup(handle)); + } -protected final native long dup(long comm) throws MPIException; + protected final native long[] iDup(long comm) throws MPIException; + + /** + * Returns the associated request to this communicator if it was + * created using {@link #iDup}. + * @return associated request if this communicator was created + * using {@link #iDup}, or null otherwise. + */ + public final Request getRequest() + { + return request; + } -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_IDUP}. - *

The new communicator can't be used before the operation completes. - * The request object must be obtained calling {@link #getRequest}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Comm iDup() throws MPIException -{ - MPI.check(); - return new Comm(iDup(handle)); -} + /** + * Size of group of this communicator. + *

Java binding of the MPI operation {@code MPI_COMM_SIZE}. + * @return number of processors in the group of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int getSize() throws MPIException + { + MPI.check(); + return getSize(handle); + } -protected final native long[] iDup(long comm) throws MPIException; + private native int getSize(long comm) throws MPIException; + + /** + * Rank of this process in group of this communicator. + *

Java binding of the MPI operation {@code MPI_COMM_RANK}. + * @return rank of the calling process in the group of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int getRank() throws MPIException + { + MPI.check(); + return getRank(handle); + } -/** - * Returns the associated request to this communicator if it was - * created using {@link #iDup}. - * @return associated request if this communicator was created - * using {@link #iDup}, or null otherwise. - */ -public final Request getRequest() -{ - return request; -} + private native int getRank(long comm) throws MPIException; + + /** + * Compare two communicators. + *

Java binding of the MPI operation {@code MPI_COMM_COMPARE}. + * @param comm1 first communicator + * @param comm2 second communicator + * @return + * {@code MPI.IDENT} results if the {@code comm1} and {@code comm2} + * are references to the same object (ie, if {@code comm1 == comm2}).
+ * {@code MPI.CONGRUENT} results if the underlying groups are identical + * but the communicators differ by context.
+ * {@code MPI.SIMILAR} results if the underlying groups are similar + * but the communicators differ by context.
+ * {@code MPI.UNEQUAL} results otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int compare(Comm comm1, Comm comm2) throws MPIException + { + MPI.check(); + return compare(comm1.handle, comm2.handle); + } -/** - * Size of group of this communicator. - *

Java binding of the MPI operation {@code MPI_COMM_SIZE}. - * @return number of processors in the group of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int getSize() throws MPIException -{ - MPI.check(); - return getSize(handle); -} + private static native int compare(long comm1, long comm2) throws MPIException; -private native int getSize(long comm) throws MPIException; + /** + * Java binding of the MPI operation {@code MPI_COMM_FREE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override final public void free() throws MPIException + { + MPI.check(); + handle = free(handle); + } -/** - * Rank of this process in group of this communicator. - *

Java binding of the MPI operation {@code MPI_COMM_RANK}. - * @return rank of the calling process in the group of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int getRank() throws MPIException -{ - MPI.check(); - return getRank(handle); -} + private native long free(long comm) throws MPIException; -private native int getRank(long comm) throws MPIException; + /** + * Test if communicator object is null (has been freed). + * Java binding of {@code MPI_COMM_NULL}. + * @return true if the comm object is null, false otherwise + */ + public final boolean isNull() + { + return handle == nullHandle; + } -/** - * Compare two communicators. - *

Java binding of the MPI operation {@code MPI_COMM_COMPARE}. - * @param comm1 first communicator - * @param comm2 second communicator - * @return - * {@code MPI.IDENT} results if the {@code comm1} and {@code comm2} - * are references to the same object (ie, if {@code comm1 == comm2}).
- * {@code MPI.CONGRUENT} results if the underlying groups are identical - * but the communicators differ by context.
- * {@code MPI.SIMILAR} results if the underlying groups are similar - * but the communicators differ by context.
- * {@code MPI.UNEQUAL} results otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int compare(Comm comm1, Comm comm2) throws MPIException -{ - MPI.check(); - return compare(comm1.handle, comm2.handle); -} + /** + * Java binding of {@code MPI_COMM_SET_INFO}. + * @param info info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void setInfo(Info info) throws MPIException + { + MPI.check(); + setInfo(handle, info.handle); + } -private static native int compare(long comm1, long comm2) throws MPIException; + private native void setInfo(long comm, long info) throws MPIException; + + /** + * Java binding of {@code MPI_COMM_GET_INFO}. + * @return new info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Info getInfo() throws MPIException + { + MPI.check(); + return new Info(getInfo(handle)); + } -/** - * Java binding of the MPI operation {@code MPI_COMM_FREE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override final public void free() throws MPIException -{ - MPI.check(); - handle = free(handle); -} + private native long getInfo(long comm) throws MPIException; -private native long free(long comm) throws MPIException; + /** + * Java binding of the MPI operation {@code MPI_COMM_DISCONNECT}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void disconnect() throws MPIException + { + MPI.check(); + handle = disconnect(handle); + } -/** - * Test if communicator object is null (has been freed). - * Java binding of {@code MPI_COMM_NULL}. - * @return true if the comm object is null, false otherwise - */ -public final boolean isNull() -{ - return handle == nullHandle; -} + private native long disconnect(long comm) throws MPIException; + + /** + * Return group associated with a communicator. + *

Java binding of the MPI operation {@code MPI_COMM_GROUP}. + * @return group corresponding to this communicator group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Group getGroup() throws MPIException + { + MPI.check(); + return new Group(getGroup(handle)); + } -/** - * Java binding of {@code MPI_COMM_SET_INFO}. - * @param info info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void setInfo(Info info) throws MPIException -{ - MPI.check(); - setInfo(handle, info.handle); -} + private native long getGroup(long comm); + + // Inter-communication + + /** + * Test if this communicator is an inter-communicator. + *

Java binding of the MPI operation {@code MPI_COMM_TEST_INTER}. + * @return {@code true} if this is an inter-communicator, + * {@code false} otherwise + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final boolean isInter() throws MPIException + { + MPI.check(); + return isInter(handle); + } -private native void setInfo(long fh, long info) throws MPIException; + private native boolean isInter(long comm) throws MPIException; + + /** + * Create an inter-communicator. + *

+ * Java binding of the MPI operation {@code MPI_INTERCOMM_CREATE}. + *

+ * This operation is defined as a method on the "peer communicator", + * making it analogous to a {@code send} or {@code recv} communication + * with the remote group leader. + * @param localComm local intra-communicator + * @param localLeader rank of local group leader in {@code localComm} + * @param remoteLeader rank of remote group leader in this communicator + * @param tag "safe" tag + * @return new inter-communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm createIntercomm(Comm localComm, int localLeader, + int remoteLeader, int tag) + throws MPIException + { + MPI.check(); + + return new Intercomm(createIntercomm(handle, localComm.handle, + localLeader, remoteLeader, tag)); + } -/** - * Java binding of {@code MPI_COMM_GET_INFO}. - * @return new info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Info getInfo() throws MPIException -{ - MPI.check(); - return new Info(getInfo(handle)); -} + private native long createIntercomm( + long comm, long localComm, int localLeader, + int remoteLeader, int tag) throws MPIException; + + // Blocking Send and Recv + + /** + * Blocking send operation. + *

Java binding of the MPI operation {@code MPI_SEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void send(Object buf, int count, Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -private native long getInfo(long fh) throws MPIException; + send(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); + } -/** - * Java binding of the MPI operation {@code MPI_COMM_DISCONNECT}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void disconnect() throws MPIException -{ - MPI.check(); - handle = disconnect(handle); -} + private native void send( + long comm, Object buf, boolean db, int offset, int count, + long type, int baseType, int dest, int tag) throws MPIException; + + /** + * Blocking receive operation. + *

Java binding of the MPI operation {@code MPI_RECV}. + * @param buf receive buffer + * @param count number of items in receive buffer + * @param type datatype of each item in receive buffer + * @param source rank of source + * @param tag message tag + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Status recv(Object buf, int count, + Datatype type, int source, int tag) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -private native long disconnect(long comm) throws MPIException; + Status status = new Status(); -/** - * Return group associated with a communicator. - *

Java binding of the MPI operation {@code MPI_COMM_GROUP}. - * @return group corresponding to this communicator group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Group getGroup() throws MPIException -{ - MPI.check(); - return new Group(getGroup(handle)); -} + recv(handle, buf, db, off, count, + type.handle, type.baseType, source, tag, status.data); -private native long getGroup(long comm); + return status; + } -// Inter-communication + private native void recv( + long comm, Object buf, boolean db, int offset, int count, + long type, int basetype, int source, int tag, long[] stat) + throws MPIException; + + // Send-Recv + + /** + * Execute a blocking send and receive operation. + *

Java binding of the MPI operation {@code MPI_SENDRECV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param dest rank of destination + * @param sendtag send tag + * @param recvbuf receive buffer + * @param recvcount number of items in receive buffer + * @param recvtype datatype of each item in receive buffer + * @param source rank of source + * @param recvtag receive tag + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + * @see mpi.Comm#recv(Object, int, Datatype, int, int) + */ + public final Status sendRecv( + Object sendbuf, int sendcount, Datatype sendtype, int dest, int sendtag, + Object recvbuf, int recvcount, Datatype recvtype, int source, int recvtag) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Test if this communicator is an inter-communicator. - *

Java binding of the MPI operation {@code MPI_COMM_TEST_INTER}. - * @return {@code true} if this is an inter-communicator, - * {@code false} otherwise - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final boolean isInter() throws MPIException -{ - MPI.check(); - return isInter(handle); -} + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -private native boolean isInter(long comm) throws MPIException; + Status status = new Status(); -/** - * Create an inter-communicator. - *

- * Java binding of the MPI operation {@code MPI_INTERCOMM_CREATE}. - *

- * This operation is defined as a method on the "peer communicator", - * making it analogous to a {@code send} or {@code recv} communication - * with the remote group leader. - * @param localComm local intra-communicator - * @param localLeader rank of local group leader in {@code localComm} - * @param remoteLeader rank of remote group leader in this communicator - * @param tag "safe" tag - * @return new inter-communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm createIntercomm(Comm localComm, int localLeader, - int remoteLeader, int tag) - throws MPIException -{ - MPI.check(); + sendRecv(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, dest, sendtag, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType, source, recvtag, status.data); - return new Intercomm(createIntercomm(handle, localComm.handle, - localLeader, remoteLeader, tag)); -} + return status; + } -private native long createIntercomm( - long comm, long localComm, int localLeader, - int remoteLeader, int tag) throws MPIException; + private native void sendRecv( + long comm, Object sbuf, boolean sdb, int soffset, int scount, + long sType, int sBaseType, int dest, int stag, + Object rbuf, boolean rdb, int roffset, int rcount, + long rType, int rBaseType, int source, int rtag, + long[] stat) throws MPIException; + + /** + * Execute a blocking send and receive operation, + * receiving message into send buffer. + *

Java binding of the MPI operation {@code MPI_SENDRECV_REPLACE}. + * @param buf buffer + * @param count number of items to send + * @param type datatype of each item in buffer + * @param dest rank of destination + * @param sendtag send tag + * @param source rank of source + * @param recvtag receive tag + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + * @see mpi.Comm#recv(Object, int, Datatype, int, int) + */ + public final Status sendRecvReplace( + Object buf, int count, Datatype type, + int dest, int sendtag, int source, int recvtag) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -// Blocking Send and Recv + Status status = new Status(); -/** - * Blocking send operation. - *

Java binding of the MPI operation {@code MPI_SEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void send(Object buf, int count, Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; + sendRecvReplace(handle, buf, db, off, count, type.handle, type.baseType, + dest, sendtag, source, recvtag, status.data); - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } + return status; + } - send(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); -} + private native void sendRecvReplace( + long comm, Object buf, boolean db, int offset, int count, + long type, int baseType, int dest, int stag, + int source, int rtag, long[] stat) throws MPIException; + + // Communication Modes + + /** + * Send in buffered mode. + *

Java binding of the MPI operation {@code MPI_BSEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final void bSend(Object buf, int count, Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -private native void send( - long comm, Object buf, boolean db, int offset, int count, - long type, int baseType, int dest, int tag) throws MPIException; + bSend(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); + } -/** - * Blocking receive operation. - *

Java binding of the MPI operation {@code MPI_RECV}. - * @param buf receive buffer - * @param count number of items in receive buffer - * @param type datatype of each item in receive buffer - * @param source rank of source - * @param tag message tag - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Status recv(Object buf, int count, - Datatype type, int source, int tag) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; + private native void bSend( + long comm, Object buf, boolean db, int offset, int count, + long type, int baseType, int dest, int tag) throws MPIException; + + /** + * Send in synchronous mode. + *

Java binding of the MPI operation {@code MPI_SSEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final void sSend(Object buf, int count, Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } + sSend(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); + } - Status status = new Status(); + private native void sSend( + long comm, Object buf, boolean db, int offset, int count, + long type, int baseType, int dest, int tag) throws MPIException; + + /** + * Send in ready mode. + *

Java binding of the MPI operation {@code MPI_RSEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final void rSend(Object buf, int count, Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } - recv(handle, buf, db, off, count, - type.handle, type.baseType, source, tag, status.data); + rSend(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); + } - return status; -} + private native void rSend( + long comm, Object buf, boolean db, int offset, int count, + long type, int baseType, int dest, int tag) throws MPIException; + + // Nonblocking communication + + /** + * Start a standard mode, nonblocking send. + *

Java binding of the MPI operation {@code MPI_ISEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Request iSend(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iSend(handle, buf, count, type.handle, dest, tag)); + } -private native void recv( - long comm, Object buf, boolean db, int offset, int count, - long type, int basetype, int source, int tag, long[] stat) - throws MPIException; + private native long iSend( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Start a buffered mode, nonblocking send. + *

Java binding of the MPI operation MPI_IBSEND. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Request ibSend(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(ibSend(handle, buf, count, type.handle, dest, tag)); + } -// Send-Recv + private native long ibSend( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Start a synchronous mode, nonblocking send. + *

Java binding of the MPI operation {@code MPI_ISSEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Request isSend(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(isSend(handle, buf, count, type.handle, dest, tag)); + } -/** - * Execute a blocking send and receive operation. - *

Java binding of the MPI operation {@code MPI_SENDRECV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param dest rank of destination - * @param sendtag send tag - * @param recvbuf receive buffer - * @param recvcount number of items in receive buffer - * @param recvtype datatype of each item in receive buffer - * @param source rank of source - * @param recvtag receive tag - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - * @see mpi.Comm#recv(Object, int, Datatype, int, int) - */ -public final Status sendRecv( - Object sendbuf, int sendcount, Datatype sendtype, int dest, int sendtag, - Object recvbuf, int recvcount, Datatype recvtype, int source, int recvtag) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - Status status = new Status(); - - sendRecv(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, dest, sendtag, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType, source, recvtag, status.data); - - return status; -} - -private native void sendRecv( - long comm, Object sbuf, boolean sdb, int soffset, int scount, - long sType, int sBaseType, int dest, int stag, - Object rbuf, boolean rdb, int roffset, int rcount, - long rType, int rBaseType, int source, int rtag, - long[] stat) throws MPIException; + private native long isSend( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Start a ready mode, nonblocking send. + *

Java binding of the MPI operation {@code MPI_IRSEND}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Request irSend(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(irSend(handle, buf, count, type.handle, dest, tag)); + } -/** - * Execute a blocking send and receive operation, - * receiving message into send buffer. - *

Java binding of the MPI operation {@code MPI_SENDRECV_REPLACE}. - * @param buf buffer - * @param count number of items to send - * @param type datatype of each item in buffer - * @param dest rank of destination - * @param sendtag send tag - * @param source rank of source - * @param recvtag receive tag - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - * @see mpi.Comm#recv(Object, int, Datatype, int, int) - */ -public final Status sendRecvReplace( - Object buf, int count, Datatype type, - int dest, int sendtag, int source, int recvtag) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; + private native long irSend( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Start a nonblocking receive. + *

Java binding of the MPI operation {@code MPI_IRECV}. + * @param buf receive buffer + * @param count number of items in receive buffer + * @param type datatype of each item in receive buffer + * @param source rank of source + * @param tag message tag + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#recv(Object, int, Datatype, int, int) + */ + public final Request iRecv(Buffer buf, int count, + Datatype type, int source, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iRecv(handle, buf, count, type.handle, source, tag)); + } - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } + private native long iRecv( + long comm, Buffer buf, int count, long type, int source, int tag) + throws MPIException; + + + // Persistent communication requests + + /** + * Creates a persistent communication request for a standard mode send. + *

Java binding of the MPI operation {@code MPI_SEND_INIT}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return persistent communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Prequest sendInit(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Prequest(sendInit(handle, buf, count, type.handle, dest, tag)); + } - Status status = new Status(); + private native long sendInit( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Creates a persistent communication request for a buffered mode send. + *

Java binding of the MPI operation {@code MPI_BSEND_INIT}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return persistent communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Prequest bSendInit(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Prequest(bSendInit(handle, buf, count, type.handle, dest, tag)); + } - sendRecvReplace(handle, buf, db, off, count, type.handle, type.baseType, - dest, sendtag, source, recvtag, status.data); + private native long bSendInit( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Creates a persistent communication request for a synchronous mode send. + *

Java binding of the MPI operation {@code MPI_SSEND_INIT}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return persistent communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Prequest sSendInit(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Prequest(sSendInit(handle, buf, count, type.handle, dest, tag)); + } - return status; -} + private native long sSendInit( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Creates a persistent communication request for a ready mode send. + *

Java binding of the MPI operation {@code MPI_RSEND_INIT}. + * @param buf send buffer + * @param count number of items to send + * @param type datatype of each item in send buffer + * @param dest rank of destination + * @param tag message tag + * @return persistent communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#send(Object, int, Datatype, int, int) + */ + public final Prequest rSendInit(Buffer buf, int count, + Datatype type, int dest, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Prequest(rSendInit(handle, buf, count, type.handle, dest, tag)); + } -private native void sendRecvReplace( - long comm, Object buf, boolean db, int offset, int count, - long type, int baseType, int dest, int stag, - int source, int rtag, long[] stat) throws MPIException; + private native long rSendInit( + long comm, Buffer buf, int count, long type, int dest, int tag) + throws MPIException; + + /** + * Creates a persistent communication request for a receive operation. + *

Java binding of the MPI operation {@code MPI_RECV_INIT}. + * @param buf receive buffer + * @param count number of items in receive buffer + * @param type datatype of each item in receive buffer + * @param source rank of source + * @param tag message tag + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @see mpi.Comm#recv(Object, int, Datatype, int, int) + */ + public final Prequest recvInit(Buffer buf, int count, + Datatype type, int source, int tag) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Prequest(recvInit(handle, buf, count, type.handle, source, tag)); + } -// Communication Modes + private native long recvInit( + long comm, Buffer buf, int count, long type, int source, int tag) + throws MPIException; + + // Pack and Unpack + + /** + * Packs message in send buffer {@code inbuf} into space specified in + * {@code outbuf}. + *

+ * Java binding of the MPI operation {@code MPI_PACK}. + *

+ * The return value is the output value of {@code position} - the + * inital value incremented by the number of bytes written. + * @param inbuf input buffer + * @param incount number of items in input buffer + * @param type datatype of each item in input buffer + * @param outbuf output buffer + * @param position initial position in output buffer + * @return final position in output buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int pack(Object inbuf, int incount, Datatype type, + byte[] outbuf, int position) + throws MPIException + { + MPI.check(); + int offset = 0; + boolean indb = false; + + if(inbuf instanceof Buffer && !(indb = ((Buffer)inbuf).isDirect())) + { + offset = type.getOffset(inbuf); + inbuf = ((Buffer)inbuf).array(); + } -/** - * Send in buffered mode. - *

Java binding of the MPI operation {@code MPI_BSEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final void bSend(Object buf, int count, Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; + return pack(handle, inbuf, indb, offset, incount, + type.handle, outbuf, position); + } - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } + private native int pack( + long comm, Object inbuf, boolean indb, int offset, int incount, + long type, byte[] outbuf, int position) throws MPIException; + + /** + * Unpacks message in receive buffer {@code outbuf} into space specified in + * {@code inbuf}. + *

+ * Java binding of the MPI operation {@code MPI_UNPACK}. + *

+ * The return value is the output value of {@code position} - the + * inital value incremented by the number of bytes read. + * @param inbuf input buffer + * @param position initial position in input buffer + * @param outbuf output buffer + * @param outcount number of items in output buffer + * @param type datatype of each item in output buffer + * @return final position in input buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int unpack(byte[] inbuf, int position, + Object outbuf, int outcount, Datatype type) + throws MPIException + { + MPI.check(); + int offset = 0; + boolean outdb = false; + + if(outbuf instanceof Buffer && !(outdb = ((Buffer)outbuf).isDirect())) + { + offset = type.getOffset(outbuf); + outbuf = ((Buffer)outbuf).array(); + } - bSend(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); -} + return unpack(handle, inbuf, position, outbuf, outdb, + offset, outcount, type.handle); + } -private native void bSend( - long comm, Object buf, boolean db, int offset, int count, - long type, int baseType, int dest, int tag) throws MPIException; + private native int unpack( + long comm, byte[] inbuf, int position, Object outbuf, boolean outdb, + int offset, int outcount, long type) throws MPIException; + + /** + * Returns an upper bound on the increment of {@code position} effected + * by {@code pack}. + *

Java binding of the MPI operation {@code MPI_PACK_SIZE}. + * @param incount number of items in input buffer + * @param type datatype of each item in input buffer + * @return upper bound on size of packed message + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int packSize(int incount, Datatype type) throws MPIException + { + MPI.check(); + return packSize(handle, incount, type.handle); + } -/** - * Send in synchronous mode. - *

Java binding of the MPI operation {@code MPI_SSEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final void sSend(Object buf, int count, Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; + private native int packSize(long comm, int incount, long type) + throws MPIException; + + // Probe and Cancel + + /** + * Check if there is an incoming message matching the pattern specified. + *

Java binding of the MPI operation {@code MPI_IPROBE}. + *

If such a message is currently available, a status object similar + * to the return value of a matching {@code recv} operation is returned. + * @param source rank of source + * @param tag message tag + * @return status object if such a message is currently available, + * {@code null} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Status iProbe(int source, int tag) throws MPIException + { + MPI.check(); + return iProbe(handle, source, tag); + } - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } + private native Status iProbe(long comm, int source, int tag) + throws MPIException; + + /** + * Wait until there is an incoming message matching the pattern specified. + *

Java binding of the MPI operation {@code MPI_PROBE}. + *

Returns a status object similar to the return value of a matching + * {@code recv} operation. + * @param source rank of source + * @param tag message tag + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Status probe(int source, int tag) throws MPIException + { + MPI.check(); + Status status = new Status(); + probe(handle, source, tag, status.data); + return status; + } - sSend(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); -} + private native void probe(long comm, int source, int tag, long[] stat) + throws MPIException; + + // Caching + + /** + * Create a new attribute key. + *

Java binding of the MPI operation {@code MPI_COMM_CREATE_KEYVAL}. + * @return attribute key for future access + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int createKeyval() throws MPIException + { + MPI.check(); + return createKeyval_jni(); + } -private native void sSend( - long comm, Object buf, boolean db, int offset, int count, - long type, int baseType, int dest, int tag) throws MPIException; + private static native int createKeyval_jni() throws MPIException; + + /** + * Frees an attribute key for communicators. + *

Java binding of the MPI operation {@code MPI_COMM_FREE_KEYVAL}. + * @param keyval attribute key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void freeKeyval(int keyval) throws MPIException + { + MPI.check(); + freeKeyval_jni(keyval); + } -/** - * Send in ready mode. - *

Java binding of the MPI operation {@code MPI_RSEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final void rSend(Object buf, int count, Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; + private static native void freeKeyval_jni(int keyval) throws MPIException; + + /** + * Stores attribute value associated with a key. + *

Java binding of the MPI operation {@code MPI_COMM_SET_ATTR}. + * @param keyval attribute key + * @param value attribute value + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void setAttr(int keyval, Object value) throws MPIException + { + MPI.check(); + setAttr(handle, keyval, MPI.attrSet(value)); + } - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } + private native void setAttr(long comm, int keyval, byte[] value) + throws MPIException; + + /** + * Retrieves attribute value by key. + *

Java binding of the MPI operation {@code MPI_COMM_GET_ATTR}. + * @param keyval attribute key + * @return attribute value or null if no attribute is associated with the key. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Object getAttr(int keyval) throws MPIException + { + MPI.check(); + + if( keyval == MPI.TAG_UB || + keyval == MPI.HOST || + keyval == MPI.IO || + keyval == MPI.APPNUM || + keyval == MPI.LASTUSEDCODE || + keyval == MPI.UNIVERSE_SIZE) + { + return getAttr_predefined(handle, keyval); + } + else if(keyval == MPI.WTIME_IS_GLOBAL) + { + Integer value = (Integer)getAttr_predefined(handle, keyval); + return value==null ? null : value.intValue() != 0; + } + else + { + return MPI.attrGet(getAttr(handle, keyval)); + } + } - rSend(handle, buf, db, off, count, type.handle, type.baseType, dest, tag); -} + private native Object getAttr_predefined(long comm, int keyval) + throws MPIException; + + private native byte[] getAttr(long comm, int keyval) throws MPIException; + + /** + * Deletes an attribute value associated with a key on a communicator. + *

Java binding of the MPI operation {@code MPI_COMM_DELETE_ATTR}. + * @param keyval attribute key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void deleteAttr(int keyval) throws MPIException + { + MPI.check(); + deleteAttr(handle, keyval); + } -private native void rSend( - long comm, Object buf, boolean db, int offset, int count, - long type, int baseType, int dest, int tag) throws MPIException; + private native void deleteAttr(long comm, int keyval) throws MPIException; + + // Process Topologies + + /** + * Returns the type of topology associated with the communicator. + *

Java binding of the MPI operation {@code MPI_TOPO_TEST}. + *

The return value will be one of {@code MPI.GRAPH}, {@code MPI.CART} + * or {@code MPI.UNDEFINED}. + * @return topology type of communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int getTopology() throws MPIException + { + MPI.check(); + return getTopology(handle); + } -// Nonblocking communication + private native int getTopology(long comm) throws MPIException; -/** - * Start a standard mode, nonblocking send. - *

Java binding of the MPI operation {@code MPI_ISEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Request iSend(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iSend(handle, buf, count, type.handle, dest, tag)); -} + // Enviromental Management -private native long iSend( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + /** + * Abort MPI. + *

Java binding of the MPI operation {@code MPI_ABORT}. + * @param errorcode error code for Unix or POSIX environments + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void abort(int errorcode) throws MPIException + { + MPI.check(); + abort(handle, errorcode); + } -/** - * Start a buffered mode, nonblocking send. - *

Java binding of the MPI operation MPI_IBSEND. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Request ibSend(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(ibSend(handle, buf, count, type.handle, dest, tag)); -} + private native void abort(long comm, int errorcode) throws MPIException; -private native long ibSend( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + // Error handler -/** - * Start a synchronous mode, nonblocking send. - *

Java binding of the MPI operation {@code MPI_ISSEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Request isSend(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(isSend(handle, buf, count, type.handle, dest, tag)); -} + /** + * Associates a new error handler with communicator at the calling process. + *

Java binding of the MPI operation {@code MPI_ERRHANDLER_SET}. + * @param errhandler new MPI error handler for communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void setErrhandler(Errhandler errhandler) throws MPIException + { + MPI.check(); + setErrhandler(handle, errhandler.handle); + } -private native long isSend( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + private native void setErrhandler(long comm, long errhandler) + throws MPIException; + + /** + * Returns the error handler currently associated with the communicator. + *

Java binding of the MPI operation {@code MPI_ERRHANDLER_GET}. + * @return MPI error handler currently associated with communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Errhandler getErrhandler() throws MPIException + { + MPI.check(); + return new Errhandler(getErrhandler(handle)); + } -/** - * Start a ready mode, nonblocking send. - *

Java binding of the MPI operation {@code MPI_IRSEND}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Request irSend(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(irSend(handle, buf, count, type.handle, dest, tag)); -} + private native long getErrhandler(long comm); -private native long irSend( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + // Collective Communication -/** - * Start a nonblocking receive. - *

Java binding of the MPI operation {@code MPI_IRECV}. - * @param buf receive buffer - * @param count number of items in receive buffer - * @param type datatype of each item in receive buffer - * @param source rank of source - * @param tag message tag - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#recv(Object, int, Datatype, int, int) - */ -public final Request iRecv(Buffer buf, int count, - Datatype type, int source, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iRecv(handle, buf, count, type.handle, source, tag)); -} + /** + * A call to {@code barrier} blocks the caller until all process + * in the group have called it. + *

Java binding of the MPI operation {@code MPI_BARRIER}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void barrier() throws MPIException + { + MPI.check(); + barrier(handle); + } -private native long iRecv( - long comm, Buffer buf, int count, long type, int source, int tag) - throws MPIException; + private native void barrier(long comm) throws MPIException; + + /** + * Nonblocking barrier sinchronization. + *

Java binding of the MPI operation {@code MPI_IBARRIER}. + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iBarrier() throws MPIException + { + MPI.check(); + return new Request(iBarrier(handle)); + } + private native long iBarrier(long comm) throws MPIException; + + /** + * Broadcast a message from the process with rank {@code root} + * to all processes of the group. + *

Java binding of the MPI operation {@code MPI_BCAST}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each item in buffer + * @param root rank of broadcast root + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void bcast(Object buf, int count, Datatype type, int root) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -// Persistent communication requests + bcast(handle, buf, db, off, count, type.handle, type.baseType, root); + } -/** - * Creates a persistent communication request for a standard mode send. - *

Java binding of the MPI operation {@code MPI_SEND_INIT}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return persistent communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Prequest sendInit(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Prequest(sendInit(handle, buf, count, type.handle, dest, tag)); -} + private native void bcast( + long comm, Object buf, boolean db, int offset, int count, + long type, int basetype, int root) throws MPIException; + + /** + * Broadcast a message from the process with rank {@code root} + * to all processes of the group. + *

Java binding of the MPI operation {@code MPI_IBCAST}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each item in buffer + * @param root rank of broadcast root + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iBcast(Buffer buf, int count, Datatype type, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iBcast(handle, buf, count, type.handle, root)); + } -private native long sendInit( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + private native long iBcast( + long comm, Buffer buf, int count, long type, int root) + throws MPIException; + + /** + * Each process sends the contents of its send buffer to the root process. + *

Java binding of the MPI operation {@code MPI_GATHER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of receiving process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void gather( + Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Creates a persistent communication request for a buffered mode send. - *

Java binding of the MPI operation {@code MPI_BSEND_INIT}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return persistent communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Prequest bSendInit(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Prequest(bSendInit(handle, buf, count, type.handle, dest, tag)); -} + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -private native long bSendInit( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + gather(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType, root); + } -/** - * Creates a persistent communication request for a synchronous mode send. - *

Java binding of the MPI operation {@code MPI_SSEND_INIT}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return persistent communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Prequest sSendInit(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Prequest(sSendInit(handle, buf, count, type.handle, dest, tag)); -} + /** + * Each process sends the contents of its send buffer to the root process. + *

Java binding of the MPI operation {@code MPI_GATHER} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * The buffer is used by the root process to receive data, + * and it is used by the non-root processes to send data. + * @param buf buffer + * @param count number of items to send/receive + * @param type datatype of each item in buffer + * @param root rank of receiving process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void gather(Object buf, int count, Datatype type, int root) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -private native long sSendInit( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + gather(handle, null, false, 0, 0, 0, 0, + buf, db, off, count, type.handle, type.baseType, root); + } -/** - * Creates a persistent communication request for a ready mode send. - *

Java binding of the MPI operation {@code MPI_RSEND_INIT}. - * @param buf send buffer - * @param count number of items to send - * @param type datatype of each item in send buffer - * @param dest rank of destination - * @param tag message tag - * @return persistent communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#send(Object, int, Datatype, int, int) - */ -public final Prequest rSendInit(Buffer buf, int count, - Datatype type, int dest, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Prequest(rSendInit(handle, buf, count, type.handle, dest, tag)); -} + private native void gather( + long comm, Object sendBuf, boolean sdb, int sendOff, int sendCount, + long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOff, int recvCount, + long recvType, int recvBaseType, int root) + throws MPIException; + + /** + * Each process sends the contents of its send buffer to the root process. + *

Java binding of the MPI operation {@code MPI_IGATHER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of receiving process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iGather( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iGather(handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, recvtype.handle, root)); + } -private native long rSendInit( - long comm, Buffer buf, int count, long type, int dest, int tag) - throws MPIException; + /** + * Each process sends the contents of its send buffer to the root process. + *

Java binding of the MPI operation {@code MPI_IGATHER} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * The buffer is used by the root process to receive data, + * and it is used by the non-root processes to send data. + * @param buf buffer + * @param count number of items to send/receive + * @param type datatype of each item in buffer + * @param root rank of receiving process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iGather(Buffer buf, int count, Datatype type, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + + return new Request(iGather(handle, null, 0, 0, + buf, count, type.handle, root)); + } -/** - * Creates a persistent communication request for a receive operation. - *

Java binding of the MPI operation {@code MPI_RECV_INIT}. - * @param buf receive buffer - * @param count number of items in receive buffer - * @param type datatype of each item in receive buffer - * @param source rank of source - * @param tag message tag - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - * @see mpi.Comm#recv(Object, int, Datatype, int, int) - */ -public final Prequest recvInit(Buffer buf, int count, - Datatype type, int source, int tag) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Prequest(recvInit(handle, buf, count, type.handle, source, tag)); -} + private native long iGather( + long comm, Buffer sendbuf, int sendcount, long sendtype, + Buffer recvbuf, int recvcount, long recvtype, + int root) throws MPIException; + + /** + * Extends functionality of {@code gather} by allowing varying + * counts of data from each process. + *

Java binding of the MPI operation {@code MPI_GATHERV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @param root rank of receiving process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int[] recvcount, int[] displs, + Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -private native long recvInit( - long comm, Buffer buf, int count, long type, int source, int tag) - throws MPIException; + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -// Pack and Unpack + gatherv(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, displs, + recvtype.handle, recvtype.baseType, root); + } -/** - * Packs message in send buffer {@code inbuf} into space specified in - * {@code outbuf}. - *

- * Java binding of the MPI operation {@code MPI_PACK}. - *

- * The return value is the output value of {@code position} - the - * inital value incremented by the number of bytes written. - * @param inbuf input buffer - * @param incount number of items in input buffer - * @param type datatype of each item in input buffer - * @param outbuf output buffer - * @param position initial position in output buffer - * @return final position in output buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int pack(Object inbuf, int incount, Datatype type, - byte[] outbuf, int position) - throws MPIException -{ - MPI.check(); - int offset = 0; - boolean indb = false; + /** + * Extends functionality of {@code gather} by allowing varying + * counts of data from each process. + *

Java binding of the MPI operation {@code MPI_GATHERV} using + * {@code MPI_IN_PLACE} instead of the send buffer in the root process. + * This method must be used in the root process. + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @param root rank of receiving process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void gatherv(Object recvbuf, int[] recvcount, int[] displs, + Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + int recvoff = 0; + boolean rdb = false; + + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } - if(inbuf instanceof Buffer && !(indb = ((Buffer)inbuf).isDirect())) - { - offset = type.getOffset(inbuf); - inbuf = ((Buffer)inbuf).array(); - } + gatherv(handle, null, false, 0, 0, 0, 0, recvbuf, rdb, recvoff, recvcount, + displs, recvtype.handle, recvtype.baseType, root); + } - return pack(handle, inbuf, indb, offset, incount, - type.handle, outbuf, position); -} + /** + * Extends functionality of {@code gather} by allowing varying + * counts of data from each process. + *

Java binding of the MPI operation {@code MPI_GATHERV} using + * {@code MPI_IN_PLACE} instead of the send buffer in the root process. + * This method must be used in the non-root processes. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param root rank of receiving process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void gatherv(Object sendbuf, int sendcount, + Datatype sendtype, int root) + throws MPIException + { + MPI.check(); + int sendoff = 0; + boolean sdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -private native int pack( - long comm, Object inbuf, boolean indb, int offset, int incount, - long type, byte[] outbuf, int position) throws MPIException; + gatherv(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + null, false, 0, null, null, 0, 0, root); + } -/** - * Unpacks message in receive buffer {@code outbuf} into space specified in - * {@code inbuf}. - *

- * Java binding of the MPI operation {@code MPI_UNPACK}. - *

- * The return value is the output value of {@code position} - the - * inital value incremented by the number of bytes read. - * @param inbuf input buffer - * @param position initial position in input buffer - * @param outbuf output buffer - * @param outcount number of items in output buffer - * @param type datatype of each item in output buffer - * @return final position in input buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int unpack(byte[] inbuf, int position, - Object outbuf, int outcount, Datatype type) - throws MPIException -{ - MPI.check(); - int offset = 0; - boolean outdb = false; + private native void gatherv( + long comm, Object sendBuf, boolean sdb, int sendOffset, + int sendCount, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, + int[] recvCount, int[] displs, long recvType, int recvBaseType, + int root) throws MPIException; + + /** + * Extends functionality of {@code gather} by allowing varying + * counts of data from each process. + *

Java binding of the MPI operation {@code MPI_IGATHERV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @param root rank of receiving process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iGatherv( + Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, + int[] recvcount, int[] displs, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iGatherv( + handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, displs, recvtype.handle, root)); + } - if(outbuf instanceof Buffer && !(outdb = ((Buffer)outbuf).isDirect())) - { - offset = type.getOffset(outbuf); - outbuf = ((Buffer)outbuf).array(); - } + /** + * Extends functionality of {@code gather} by allowing varying + * counts of data from each process. + *

Java binding of the MPI operation {@code MPI_IGATHERV} using + * {@code MPI_IN_PLACE} instead of the send buffer in the root process. + * This method must be used in the root process. + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @param root rank of receiving process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, + Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(recvbuf); + + return new Request(iGatherv(handle, null, 0, 0, + recvbuf, recvcount, displs, recvtype.handle, root)); + } - return unpack(handle, inbuf, position, outbuf, outdb, - offset, outcount, type.handle); -} + /** + * Extends functionality of {@code gather} by allowing varying + * counts of data from each process. + *

Java binding of the MPI operation {@code MPI_IGATHERV} using + * {@code MPI_IN_PLACE} instead of the send buffer in the root process. + * This method must be used in the non-root processes. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param root rank of receiving process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iGatherv(Buffer sendbuf, int sendcount, + Datatype sendtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf); + + return new Request(iGatherv(handle, sendbuf, sendcount, sendtype.handle, + null, null, null, 0, root)); + } -private native int unpack( - long comm, byte[] inbuf, int position, Object outbuf, boolean outdb, - int offset, int outcount, long type) throws MPIException; + private native long iGatherv( + long handle, Buffer sendbuf, int sendcount, long sendtype, + Buffer recvbuf, int[] recvcount, int[] displs, + long recvtype, int root) + throws MPIException; + + /** + * Inverse of the operation {@code gather}. + *

Java binding of the MPI operation {@code MPI_SCATTER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of sending process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scatter( + Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Returns an upper bound on the increment of {@code position} effected - * by {@code pack}. - *

Java binding of the MPI operation {@code MPI_PACK_SIZE}. - * @param incount number of items in input buffer - * @param type datatype of each item in input buffer - * @return upper bound on size of packed message - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int packSize(int incount, Datatype type) throws MPIException -{ - MPI.check(); - return packSize(handle, incount, type.handle); -} + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -private native int packSize(long comm, int incount, long type) - throws MPIException; + scatter(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType, root); + } -// Probe and Cancel + /** + * Inverse of the operation {@code gather}. + *

Java binding of the MPI operation {@code MPI_SCATTER} + * using {@code MPI_IN_PLACE} instead of the receive buffer. + * The buffer is used by the root process to send data, + * and it is used by the non-root processes to receive data. + * @param buf send/receive buffer + * @param count number of items to send/receive + * @param type datatype of each item in buffer + * @param root rank of sending process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scatter(Object buf, int count, Datatype type, int root) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -/** - * Check if there is an incoming message matching the pattern specified. - *

Java binding of the MPI operation {@code MPI_IPROBE}. - *

If such a message is currently available, a status object similar - * to the return value of a matching {@code recv} operation is returned. - * @param source rank of source - * @param tag message tag - * @return status object if such a message is currently available, - * {@code null} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Status iProbe(int source, int tag) throws MPIException -{ - MPI.check(); - return iProbe(handle, source, tag); -} + scatter(handle, buf, db, off, count, type.handle, type.baseType, + null, false, 0, 0, 0, 0, root); + } -private native Status iProbe(long comm, int source, int tag) - throws MPIException; + private native void scatter( + long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, + long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, int recvCount, + long recvType, int recvBaseType, int root) throws MPIException; + + /** + * Inverse of the operation {@code gather}. + *

Java binding of the MPI operation {@code MPI_ISCATTER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of sending process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScatter( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iScatter(handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, recvtype.handle, root)); + } -/** - * Wait until there is an incoming message matching the pattern specified. - *

Java binding of the MPI operation {@code MPI_PROBE}. - *

Returns a status object similar to the return value of a matching - * {@code recv} operation. - * @param source rank of source - * @param tag message tag - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Status probe(int source, int tag) throws MPIException -{ - MPI.check(); - Status status = new Status(); - probe(handle, source, tag, status.data); - return status; -} + /** + * Inverse of the operation {@code gather}. + *

Java binding of the MPI operation {@code MPI_ISCATTER} + * using {@code MPI_IN_PLACE} instead of the receive buffer. + * The buffer is used by the root process to send data, + * and it is used by the non-root processes to receive data. + * @param buf send/receive buffer + * @param count number of items to send/receive + * @param type datatype of each item in buffer + * @param root rank of sending process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScatter(Buffer buf, int count, Datatype type, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + + return new Request(iScatter(handle, buf, count, type.handle, + null, 0, 0, root)); + } -private native void probe(long comm, int source, int tag, long[] stat) - throws MPIException; + private native long iScatter( + long comm, Buffer sendbuf, int sendcount, long sendtype, + Buffer recvbuf, int recvcount, long recvtype, int root) + throws MPIException; + + /** + * Inverse of the operation {@code gatherv}. + *

Java binding of the MPI operation {@code MPI_SCATTERV}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each process + * @param displs displacements from which to take outgoing data + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of sending process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scatterv( + Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -// Caching + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Create a new attribute key. - *

Java binding of the MPI operation {@code MPI_COMM_CREATE_KEYVAL}. - * @return attribute key for future access - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int createKeyval() throws MPIException -{ - MPI.check(); - return createKeyval_jni(); -} + scatterv(handle, sendbuf, sdb, sendoff, sendcount, displs, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType, root); + } -private static native int createKeyval_jni() throws MPIException; + /** + * Inverse of the operation {@code gatherv}. + *

Java binding of the MPI operation {@code MPI_SCATTERV} using + * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. + * This method must be used in the root process. + * @param sendbuf send buffer + * @param sendcount number of items sent to each process + * @param displs displacements from which to take outgoing data + * @param sendtype datatype of each item in send buffer + * @param root rank of sending process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scatterv(Object sendbuf, int[] sendcount, int[] displs, + Datatype sendtype, int root) + throws MPIException + { + MPI.check(); + int sendoff = 0; + boolean sdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Frees an attribute key for communicators. - *

Java binding of the MPI operation {@code MPI_COMM_FREE_KEYVAL}. - * @param keyval attribute key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void freeKeyval(int keyval) throws MPIException -{ - MPI.check(); - freeKeyval_jni(keyval); -} + scatterv(handle, sendbuf, sdb, sendoff, sendcount, displs, + sendtype.handle, sendtype.baseType, + null, false, 0, 0, 0, 0, root); + } -private static native void freeKeyval_jni(int keyval) throws MPIException; + /** + * Inverse of the operation {@code gatherv}. + *

Java binding of the MPI operation {@code MPI_SCATTERV} using + * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. + * This method must be used in the non-root processes. + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of sending process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scatterv(Object recvbuf, int recvcount, + Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + int recvoff = 0; + boolean rdb = false; + + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Stores attribute value associated with a key. - *

Java binding of the MPI operation {@code MPI_COMM_SET_ATTR}. - * @param keyval attribute key - * @param value attribute value - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void setAttr(int keyval, Object value) throws MPIException -{ - MPI.check(); - setAttr(handle, keyval, MPI.attrSet(value)); -} + scatterv(handle, null, false, 0, null, null, 0, 0, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType, root); + } -private native void setAttr(long comm, int keyval, byte[] value) - throws MPIException; + private native void scatterv( + long comm, Object sendBuf, boolean sdb, int sendOffset, + int[] sendCount, int[] displs, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, int recvCount, + long recvType, int recvBaseType, int root) + throws MPIException; + + /** + * Inverse of the operation {@code gatherv}. + *

Java binding of the MPI operation {@code MPI_ISCATTERV}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each process + * @param displs displacements from which to take outgoing data + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of sending process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScatterv( + Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iScatterv( + handle, sendbuf, sendcount, displs, sendtype.handle, + recvbuf, recvcount, recvtype.handle, root)); + } -/** - * Retrieves attribute value by key. - *

Java binding of the MPI operation {@code MPI_COMM_GET_ATTR}. - * @param keyval attribute key - * @return attribute value or null if no attribute is associated with the key. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Object getAttr(int keyval) throws MPIException -{ - MPI.check(); - - if( keyval == MPI.TAG_UB || - keyval == MPI.HOST || - keyval == MPI.IO || - keyval == MPI.APPNUM || - keyval == MPI.LASTUSEDCODE || - keyval == MPI.UNIVERSE_SIZE) - { - return getAttr_predefined(handle, keyval); - } - else if(keyval == MPI.WTIME_IS_GLOBAL) - { - Integer value = (Integer)getAttr_predefined(handle, keyval); - return value==null ? null : value.intValue() != 0; - } - else - { - return MPI.attrGet(getAttr(handle, keyval)); - } -} - -private native Object getAttr_predefined(long comm, int keyval) - throws MPIException; - -private native byte[] getAttr(long comm, int keyval) throws MPIException; + /** + * Inverse of the operation {@code gatherv}. + *

Java binding of the MPI operation {@code MPI_ISCATTERV} using + * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. + * This method must be used in the root process. + * @param sendbuf send buffer + * @param sendcount number of items sent to each process + * @param displs displacements from which to take outgoing data + * @param sendtype datatype of each item in send buffer + * @param root rank of sending process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, + Datatype sendtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf); + + return new Request(iScatterv(handle, sendbuf, sendcount, displs, + sendtype.handle, null, 0, 0, root)); + } -/** - * Deletes an attribute value associated with a key on a communicator. - *

Java binding of the MPI operation {@code MPI_COMM_DELETE_ATTR}. - * @param keyval attribute key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void deleteAttr(int keyval) throws MPIException -{ - MPI.check(); - deleteAttr(handle, keyval); -} + /** + * Inverse of the operation {@code gatherv}. + *

Java binding of the MPI operation {@code MPI_ISCATTERV} using + * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. + * This method must be used in the non-root processes. + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @param root rank of sending process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScatterv(Buffer recvbuf, int recvcount, + Datatype recvtype, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(recvbuf); + + return new Request(iScatterv(handle, null, null, null, 0, + recvbuf, recvcount, recvtype.handle, root)); + } -private native void deleteAttr(long comm, int keyval) throws MPIException; + private native long iScatterv( + long comm, Buffer sendbuf, int[] sendcount, int[] displs, long sendtype, + Buffer recvbuf, int recvcount, long recvtype, int root) + throws MPIException; + + /** + * Similar to {@code gather}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_ALLGATHER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allGather(Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -// Process Topologies + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Returns the type of topology associated with the communicator. - *

Java binding of the MPI operation {@code MPI_TOPO_TEST}. - *

The return value will be one of {@code MPI.GRAPH}, {@code MPI.CART} - * or {@code MPI.UNDEFINED}. - * @return topology type of communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int getTopology() throws MPIException -{ - MPI.check(); - return getTopology(handle); -} + allGather(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType); + } -private native int getTopology(long comm) throws MPIException; + /** + * Similar to {@code gather}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_ALLGATHER} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count number of items to receive + * @param type datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allGather(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -// Enviromental Management + allGather(handle, null, false, 0, 0, 0, 0, + buf, db, off, count, type.handle, type.baseType); + } -/** - * Abort MPI. - *

Java binding of the MPI operation {@code MPI_ABORT}. - * @param errorcode error code for Unix or POSIX environments - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void abort(int errorcode) throws MPIException -{ - MPI.check(); - abort(handle, errorcode); -} + private native void allGather( + long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, + long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, int recvCount, + long recvType, int recvBaseType) throws MPIException; + + /** + * Similar to {@code gather}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_IALLGATHER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllGather( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iAllGather(handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, recvtype.handle)); + } -private native void abort(long comm, int errorcode) throws MPIException; -// Error handler - -/** - * Associates a new error handler with communicator at the calling process. - *

Java binding of the MPI operation {@code MPI_ERRHANDLER_SET}. - * @param errhandler new MPI error handler for communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void setErrhandler(Errhandler errhandler) throws MPIException -{ - MPI.check(); - setErrhandler(handle, errhandler.handle); -} - -private native void setErrhandler(long comm, long errhandler) - throws MPIException; - -/** - * Returns the error handler currently associated with the communicator. - *

Java binding of the MPI operation {@code MPI_ERRHANDLER_GET}. - * @return MPI error handler currently associated with communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Errhandler getErrhandler() throws MPIException -{ - MPI.check(); - return new Errhandler(getErrhandler(handle)); -} - -private native long getErrhandler(long comm); - -// Collective Communication - -/** - * A call to {@code barrier} blocks the caller until all process - * in the group have called it. - *

Java binding of the MPI operation {@code MPI_BARRIER}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void barrier() throws MPIException -{ - MPI.check(); - barrier(handle); -} - -private native void barrier(long comm) throws MPIException; - -/** - * Nonblocking barrier sinchronization. - *

Java binding of the MPI operation {@code MPI_IBARRIER}. - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iBarrier() throws MPIException -{ - MPI.check(); - return new Request(iBarrier(handle)); -} - -private native long iBarrier(long comm) throws MPIException; - -/** - * Broadcast a message from the process with rank {@code root} - * to all processes of the group. - *

Java binding of the MPI operation {@code MPI_BCAST}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each item in buffer - * @param root rank of broadcast root - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void bcast(Object buf, int count, Datatype type, int root) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - bcast(handle, buf, db, off, count, type.handle, type.baseType, root); -} - -private native void bcast( - long comm, Object buf, boolean db, int offset, int count, - long type, int basetype, int root) throws MPIException; - -/** - * Broadcast a message from the process with rank {@code root} - * to all processes of the group. - *

Java binding of the MPI operation {@code MPI_IBCAST}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each item in buffer - * @param root rank of broadcast root - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iBcast(Buffer buf, int count, Datatype type, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iBcast(handle, buf, count, type.handle, root)); -} - -private native long iBcast( - long comm, Buffer buf, int count, long type, int root) - throws MPIException; - -/** - * Each process sends the contents of its send buffer to the root process. - *

Java binding of the MPI operation {@code MPI_GATHER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of receiving process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void gather( - Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - gather(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType, root); -} - -/** - * Each process sends the contents of its send buffer to the root process. - *

Java binding of the MPI operation {@code MPI_GATHER} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * The buffer is used by the root process to receive data, - * and it is used by the non-root processes to send data. - * @param buf buffer - * @param count number of items to send/receive - * @param type datatype of each item in buffer - * @param root rank of receiving process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void gather(Object buf, int count, Datatype type, int root) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - gather(handle, null, false, 0, 0, 0, 0, - buf, db, off, count, type.handle, type.baseType, root); -} - -private native void gather( - long comm, Object sendBuf, boolean sdb, int sendOff, int sendCount, - long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOff, int recvCount, - long recvType, int recvBaseType, int root) - throws MPIException; - -/** - * Each process sends the contents of its send buffer to the root process. - *

Java binding of the MPI operation {@code MPI_IGATHER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of receiving process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iGather( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iGather(handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, recvtype.handle, root)); -} - -/** - * Each process sends the contents of its send buffer to the root process. - *

Java binding of the MPI operation {@code MPI_IGATHER} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * The buffer is used by the root process to receive data, - * and it is used by the non-root processes to send data. - * @param buf buffer - * @param count number of items to send/receive - * @param type datatype of each item in buffer - * @param root rank of receiving process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iGather(Buffer buf, int count, Datatype type, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - - return new Request(iGather(handle, null, 0, 0, - buf, count, type.handle, root)); -} - -private native long iGather( - long comm, Buffer sendbuf, int sendcount, long sendtype, - Buffer recvbuf, int recvcount, long recvtype, - int root) throws MPIException; - -/** - * Extends functionality of {@code gather} by allowing varying - * counts of data from each process. - *

Java binding of the MPI operation {@code MPI_GATHERV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @param root rank of receiving process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void gatherv(Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int[] recvcount, int[] displs, - Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - gatherv(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, displs, - recvtype.handle, recvtype.baseType, root); -} - -/** - * Extends functionality of {@code gather} by allowing varying - * counts of data from each process. - *

Java binding of the MPI operation {@code MPI_GATHERV} using - * {@code MPI_IN_PLACE} instead of the send buffer in the root process. - * This method must be used in the root process. - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @param root rank of receiving process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void gatherv(Object recvbuf, int[] recvcount, int[] displs, - Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - int recvoff = 0; - boolean rdb = false; - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - gatherv(handle, null, false, 0, 0, 0, 0, recvbuf, rdb, recvoff, recvcount, - displs, recvtype.handle, recvtype.baseType, root); -} - -/** - * Extends functionality of {@code gather} by allowing varying - * counts of data from each process. - *

Java binding of the MPI operation {@code MPI_GATHERV} using - * {@code MPI_IN_PLACE} instead of the send buffer in the root process. - * This method must be used in the non-root processes. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param root rank of receiving process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void gatherv(Object sendbuf, int sendcount, - Datatype sendtype, int root) - throws MPIException -{ - MPI.check(); - int sendoff = 0; - boolean sdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - gatherv(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - null, false, 0, null, null, 0, 0, root); -} - -private native void gatherv( - long comm, Object sendBuf, boolean sdb, int sendOffset, - int sendCount, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, - int[] recvCount, int[] displs, long recvType, int recvBaseType, - int root) throws MPIException; - -/** - * Extends functionality of {@code gather} by allowing varying - * counts of data from each process. - *

Java binding of the MPI operation {@code MPI_IGATHERV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @param root rank of receiving process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iGatherv( - Buffer sendbuf, int sendcount, Datatype sendtype, Buffer recvbuf, - int[] recvcount, int[] displs, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iGatherv( - handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, displs, recvtype.handle, root)); -} - -/** - * Extends functionality of {@code gather} by allowing varying - * counts of data from each process. - *

Java binding of the MPI operation {@code MPI_IGATHERV} using - * {@code MPI_IN_PLACE} instead of the send buffer in the root process. - * This method must be used in the root process. - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @param root rank of receiving process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, - Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(recvbuf); - - return new Request(iGatherv(handle, null, 0, 0, - recvbuf, recvcount, displs, recvtype.handle, root)); -} - -/** - * Extends functionality of {@code gather} by allowing varying - * counts of data from each process. - *

Java binding of the MPI operation {@code MPI_IGATHERV} using - * {@code MPI_IN_PLACE} instead of the send buffer in the root process. - * This method must be used in the non-root processes. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param root rank of receiving process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iGatherv(Buffer sendbuf, int sendcount, - Datatype sendtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf); - - return new Request(iGatherv(handle, sendbuf, sendcount, sendtype.handle, - null, null, null, 0, root)); -} - -private native long iGatherv( - long handle, Buffer sendbuf, int sendcount, long sendtype, - Buffer recvbuf, int[] recvcount, int[] displs, - long recvtype, int root) - throws MPIException; - -/** - * Inverse of the operation {@code gather}. - *

Java binding of the MPI operation {@code MPI_SCATTER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of sending process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scatter( - Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - scatter(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType, root); -} - -/** - * Inverse of the operation {@code gather}. - *

Java binding of the MPI operation {@code MPI_SCATTER} - * using {@code MPI_IN_PLACE} instead of the receive buffer. - * The buffer is used by the root process to send data, - * and it is used by the non-root processes to receive data. - * @param buf send/receive buffer - * @param count number of items to send/receive - * @param type datatype of each item in buffer - * @param root rank of sending process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scatter(Object buf, int count, Datatype type, int root) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - scatter(handle, buf, db, off, count, type.handle, type.baseType, - null, false, 0, 0, 0, 0, root); -} - -private native void scatter( - long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, - long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, int recvCount, - long recvType, int recvBaseType, int root) throws MPIException; - -/** - * Inverse of the operation {@code gather}. - *

Java binding of the MPI operation {@code MPI_ISCATTER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of sending process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScatter( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iScatter(handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, recvtype.handle, root)); -} - -/** - * Inverse of the operation {@code gather}. - *

Java binding of the MPI operation {@code MPI_ISCATTER} - * using {@code MPI_IN_PLACE} instead of the receive buffer. - * The buffer is used by the root process to send data, - * and it is used by the non-root processes to receive data. - * @param buf send/receive buffer - * @param count number of items to send/receive - * @param type datatype of each item in buffer - * @param root rank of sending process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScatter(Buffer buf, int count, Datatype type, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - - return new Request(iScatter(handle, buf, count, type.handle, - null, 0, 0, root)); -} - -private native long iScatter( - long comm, Buffer sendbuf, int sendcount, long sendtype, - Buffer recvbuf, int recvcount, long recvtype, int root) - throws MPIException; - -/** - * Inverse of the operation {@code gatherv}. - *

Java binding of the MPI operation {@code MPI_SCATTERV}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each process - * @param displs displacements from which to take outgoing data - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of sending process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scatterv( - Object sendbuf, int[] sendcount, int[] displs, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - scatterv(handle, sendbuf, sdb, sendoff, sendcount, displs, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType, root); -} - -/** - * Inverse of the operation {@code gatherv}. - *

Java binding of the MPI operation {@code MPI_SCATTERV} using - * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. - * This method must be used in the root process. - * @param sendbuf send buffer - * @param sendcount number of items sent to each process - * @param displs displacements from which to take outgoing data - * @param sendtype datatype of each item in send buffer - * @param root rank of sending process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scatterv(Object sendbuf, int[] sendcount, int[] displs, - Datatype sendtype, int root) - throws MPIException -{ - MPI.check(); - int sendoff = 0; - boolean sdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - scatterv(handle, sendbuf, sdb, sendoff, sendcount, displs, - sendtype.handle, sendtype.baseType, - null, false, 0, 0, 0, 0, root); -} - -/** - * Inverse of the operation {@code gatherv}. - *

Java binding of the MPI operation {@code MPI_SCATTERV} using - * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. - * This method must be used in the non-root processes. - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of sending process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scatterv(Object recvbuf, int recvcount, - Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - int recvoff = 0; - boolean rdb = false; - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - scatterv(handle, null, false, 0, null, null, 0, 0, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType, root); -} - -private native void scatterv( - long comm, Object sendBuf, boolean sdb, int sendOffset, - int[] sendCount, int[] displs, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, int recvCount, - long recvType, int recvBaseType, int root) - throws MPIException; - -/** - * Inverse of the operation {@code gatherv}. - *

Java binding of the MPI operation {@code MPI_ISCATTERV}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each process - * @param displs displacements from which to take outgoing data - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of sending process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScatterv( - Buffer sendbuf, int[] sendcount, int[] displs, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iScatterv( - handle, sendbuf, sendcount, displs, sendtype.handle, - recvbuf, recvcount, recvtype.handle, root)); -} - -/** - * Inverse of the operation {@code gatherv}. - *

Java binding of the MPI operation {@code MPI_ISCATTERV} using - * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. - * This method must be used in the root process. - * @param sendbuf send buffer - * @param sendcount number of items sent to each process - * @param displs displacements from which to take outgoing data - * @param sendtype datatype of each item in send buffer - * @param root rank of sending process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, - Datatype sendtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf); - - return new Request(iScatterv(handle, sendbuf, sendcount, displs, - sendtype.handle, null, 0, 0, root)); -} - -/** - * Inverse of the operation {@code gatherv}. - *

Java binding of the MPI operation {@code MPI_ISCATTERV} using - * {@code MPI_IN_PLACE} instead of the receive buffer in the root process. - * This method must be used in the non-root processes. - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @param root rank of sending process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScatterv(Buffer recvbuf, int recvcount, - Datatype recvtype, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(recvbuf); - - return new Request(iScatterv(handle, null, null, null, 0, - recvbuf, recvcount, recvtype.handle, root)); -} - -private native long iScatterv( - long comm, Buffer sendbuf, int[] sendcount, int[] displs, long sendtype, - Buffer recvbuf, int recvcount, long recvtype, int root) - throws MPIException; - -/** - * Similar to {@code gather}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_ALLGATHER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allGather(Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - allGather(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType); -} - -/** - * Similar to {@code gather}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_ALLGATHER} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count number of items to receive - * @param type datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allGather(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - allGather(handle, null, false, 0, 0, 0, 0, - buf, db, off, count, type.handle, type.baseType); -} - -private native void allGather( - long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, - long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, int recvCount, - long recvType, int recvBaseType) throws MPIException; - -/** - * Similar to {@code gather}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_IALLGATHER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllGather( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllGather(handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, recvtype.handle)); -} - -/** - * Similar to {@code gather}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_IALLGATHER} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count number of items to receive - * @param type datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllGather(Buffer buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iAllGather(handle, null, 0, 0, buf, count, type.handle)); -} - -private native long iAllGather( - long comm, Buffer sendbuf, int sendcount, long sendtype, - Buffer recvbuf, int recvcount, long recvtype) throws MPIException; - -/** - * Similar to {@code gatherv}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_ALLGATHERV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allGatherv( - Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - allGatherv(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, displs, - recvtype.handle, recvtype.baseType); -} - -/** - * Similar to {@code gatherv}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_ALLGATHERV} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allGatherv(Object recvbuf, int[] recvcount, - int[] displs, Datatype recvtype) - throws MPIException -{ - MPI.check(); - int recvoff = 0; - boolean rdb = false; - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - allGatherv(handle, null, false, 0, 0, 0, 0, - recvbuf, rdb, recvoff, recvcount, - displs, recvtype.handle, recvtype.baseType); -} - -private native void allGatherv( - long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, - long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, int[] recvCount, - int[] displs, long recvType, int recvBasetype) throws MPIException; - -/** - * Similar to {@code gatherv}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_IALLGATHERV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param displs displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllGatherv( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllGatherv( - handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, displs, recvtype.handle)); -} - -/** - * Similar to {@code gatherv}, but all processes receive the result. - *

Java binding of the MPI operation {@code MPI_IALLGATHERV} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count number of elements received from each process - * @param displs displacements at which to place incoming data - * @param type datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllGatherv( - Buffer buf, int[] count, int[] displs, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - - return new Request(iAllGatherv( - handle, null, 0, 0, buf, count, displs, type.handle)); -} - -private native long iAllGatherv( - long handle, Buffer sendbuf, int sendcount, long sendtype, - Buffer recvbuf, int[] recvcount, int[] displs, long recvtype) - throws MPIException; - -/** - * Extension of {@code allGather} to the case where each process sends - * distinct data to each of the receivers. - *

Java binding of the MPI operation {@code MPI_ALLTOALL}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each process - * @param sendtype datatype send buffer items - * @param recvbuf receive buffer - * @param recvcount number of items received from any process - * @param recvtype datatype of receive buffer items - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allToAll(Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - allToAll(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType); -} - -private native void allToAll( - long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, - long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, int recvCount, - long recvType, int recvBaseType) throws MPIException; - -/** - * Extension of {@code allGather} to the case where each process sends - * distinct data to each of the receivers. - *

Java binding of the MPI operation {@code MPI_IALLTOALL}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each process - * @param sendtype datatype send buffer items - * @param recvbuf receive buffer - * @param recvcount number of items received from any process - * @param recvtype datatype of receive buffer items - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllToAll(handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, recvtype.handle)); -} - -private native long iAllToAll( - long comm, Buffer sendbuf, int sendcount, long sendtype, - Buffer recvbuf, int recvcount, long recvtype) throws MPIException; - -/** - * Adds flexibility to {@code allToAll}: location of data for send is - * specified by {@code sdispls} and location to place data on receive - * side is specified by {@code rdispls}. - *

Java binding of the MPI operation {@code MPI_ALLTOALLV}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each buffer - * @param sdispls displacements from which to take outgoing data - * @param sendtype datatype send buffer items - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param rdispls displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allToAllv( - Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, - Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - allToAllv(handle, sendbuf, sdb, sendoff, sendcount, sdispls, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, rdispls, - recvtype.handle, recvtype.baseType); -} - -private native void allToAllv( - long comm, Object sendBuf, boolean sdb, int sendOffset, - int[] sendCount, int[] sdispls, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, - int[] recvCount, int[] rdispls, long recvType, int recvBaseType) - throws MPIException; - -/** - * Adds flexibility to {@code allToAll}: location of data for send is - * specified by {@code sdispls} and location to place data on receive - * side is specified by {@code rdispls}. - *

Java binding of the MPI operation {@code MPI_IALLTOALLV}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each buffer - * @param sdispls displacements from which to take outgoing data - * @param sendtype datatype send buffer items - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param rdispls displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllToAllv( - Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, - Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllToAllv( - handle, sendbuf, sendcount, sdispls, sendtype.handle, - recvbuf, recvcount, rdispls, recvtype.handle)); -} - -private native long iAllToAllv(long comm, - Buffer sendbuf, int[] sendcount, int[] sdispls, long sendtype, - Buffer recvbuf, int[] recvcount, int[] rdispls, long recvtype) - throws MPIException; - -/** - * Adds flexibility to {@code allToAll}: location of data for send is //here - * specified by {@code sDispls} and location to place data on receive - * side is specified by {@code rDispls}. - *

Java binding of the MPI operation {@code MPI_ALLTOALLW}. - * @param sendBuf send buffer - * @param sendCount number of items sent to each buffer - * @param sDispls displacements from which to take outgoing data - * @param sendTypes datatypes of send buffer items - * @param recvBuf receive buffer - * @param recvCount number of elements received from each process - * @param rDispls displacements at which to place incoming data - * @param recvTypes datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allToAllw( - Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, - Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendBuf, recvBuf); - - long[] sendHandles = convertTypeArray(sendTypes); - long[] recvHandles = convertTypeArray(recvTypes); - - allToAllw(handle, sendBuf, sendCount, sDispls, - sendHandles, recvBuf, recvCount, rDispls, - recvHandles); -} - -private native void allToAllw(long comm, - Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, - Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) - throws MPIException; - -/** - * Adds flexibility to {@code iAllToAll}: location of data for send is - * specified by {@code sDispls} and location to place data on receive - * side is specified by {@code rDispls}. - *

Java binding of the MPI operation {@code MPI_IALLTOALLW}. - * @param sendBuf send buffer - * @param sendCount number of items sent to each buffer - * @param sDispls displacements from which to take outgoing data - * @param sendTypes datatype send buffer items - * @param recvBuf receive buffer - * @param recvCount number of elements received from each process - * @param rDispls displacements at which to place incoming data - * @param recvTypes datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllToAllw( - Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, - Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendBuf, recvBuf); - - long[] sendHandles = convertTypeArray(sendTypes); - long[] recvHandles = convertTypeArray(recvTypes); - - return new Request(iAllToAllw( - handle, sendBuf, sendCount, sDispls, sendHandles, - recvBuf, recvCount, rDispls, recvHandles)); -} - -private native long iAllToAllw(long comm, - Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, - Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) - throws MPIException; - -/** - * Java binding of {@code MPI_NEIGHBOR_ALLGATHER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void neighborAllGather( - Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - neighborAllGather(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType); -} - -private native void neighborAllGather( - long comm, Object sendBuf, boolean sdb, int sendOffset, - int sendCount, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOffset, - int recvCount, long recvType, int recvBaseType) - throws MPIException; - -/** - * Java binding of {@code MPI_INEIGHBOR_ALLGATHER}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iNeighborAllGather( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iNeighborAllGather( - handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, recvtype.handle)); -} + /** + * Similar to {@code gather}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_IALLGATHER} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count number of items to receive + * @param type datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllGather(Buffer buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iAllGather(handle, null, 0, 0, buf, count, type.handle)); + } -private native long iNeighborAllGather( - long comm, Buffer sendBuf, int sendCount, long sendType, - Buffer recvBuf, int recvCount, long recvType) - throws MPIException; + private native long iAllGather( + long comm, Buffer sendbuf, int sendcount, long sendtype, + Buffer recvbuf, int recvcount, long recvtype) throws MPIException; + + /** + * Similar to {@code gatherv}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_ALLGATHERV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allGatherv( + Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Java binding of {@code MPI_NEIGHBOR_ALLGATHERV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of elements that are received from each neighbor - * @param displs displacements at which to place incoming data - * @param recvtype datatype of receive buffer elements - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void neighborAllGatherv( - Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - neighborAllGatherv(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, displs, - recvtype.handle, recvtype.baseType); -} - -private native void neighborAllGatherv( - long comm, Object sendBuf, boolean sdb, int sendOff, - int sendCount, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOff, - int[] recvCount, int[] displs, long recvType, int recvBaseType); + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Java binding of {@code MPI_INEIGHBOR_ALLGATHERV}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of elements that are received from each neighbor - * @param displs displacements at which to place incoming data - * @param recvtype datatype of receive buffer elements - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iNeighborAllGatherv( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); + allGatherv(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, displs, + recvtype.handle, recvtype.baseType); + } - return new Request(iNeighborAllGatherv( - handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, displs, recvtype.handle)); -} + /** + * Similar to {@code gatherv}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_ALLGATHERV} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allGatherv(Object recvbuf, int[] recvcount, + int[] displs, Datatype recvtype) + throws MPIException + { + MPI.check(); + int recvoff = 0; + boolean rdb = false; + + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -private native long iNeighborAllGatherv( - long comm, Buffer sendBuf, int sendCount, long sendType, - Buffer recvBuf, int[] recvCount, int[] displs, long recvType) - throws MPIException; + allGatherv(handle, null, false, 0, 0, 0, 0, + recvbuf, rdb, recvoff, recvcount, + displs, recvtype.handle, recvtype.baseType); + } -/** - * Java binding of {@code MPI_NEIGHBOR_ALLTOALL}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void neighborAllToAll( - Object sendbuf, int sendcount, Datatype sendtype, - Object recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - neighborAllToAll(handle, sendbuf, sdb, sendoff, sendcount, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, - recvtype.handle, recvtype.baseType); -} - -private native void neighborAllToAll( - long comm, Object sendBuf, boolean sdb, int sendOff, - int sendCount, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOff, - int recvCount, long recvType, int recvBaseType) - throws MPIException; + private native void allGatherv( + long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, + long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, int[] recvCount, + int[] displs, long recvType, int recvBasetype) throws MPIException; + + /** + * Similar to {@code gatherv}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_IALLGATHERV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param displs displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllGatherv( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iAllGatherv( + handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, displs, recvtype.handle)); + } -/** - * Java binding of {@code MPI_INEIGHBOR_ALLTOALL}. - * @param sendbuf send buffer - * @param sendcount number of items to send - * @param sendtype datatype of each item in send buffer - * @param recvbuf receive buffer - * @param recvcount number of items to receive - * @param recvtype datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iNeighborAllToAll( - Buffer sendbuf, int sendcount, Datatype sendtype, - Buffer recvbuf, int recvcount, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); + /** + * Similar to {@code gatherv}, but all processes receive the result. + *

Java binding of the MPI operation {@code MPI_IALLGATHERV} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count number of elements received from each process + * @param displs displacements at which to place incoming data + * @param type datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllGatherv( + Buffer buf, int[] count, int[] displs, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + + return new Request(iAllGatherv( + handle, null, 0, 0, buf, count, displs, type.handle)); + } - return new Request(iNeighborAllToAll( - handle, sendbuf, sendcount, sendtype.handle, - recvbuf, recvcount, recvtype.handle)); -} + private native long iAllGatherv( + long handle, Buffer sendbuf, int sendcount, long sendtype, + Buffer recvbuf, int[] recvcount, int[] displs, long recvtype) + throws MPIException; + + /** + * Extension of {@code allGather} to the case where each process sends + * distinct data to each of the receivers. + *

Java binding of the MPI operation {@code MPI_ALLTOALL}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each process + * @param sendtype datatype send buffer items + * @param recvbuf receive buffer + * @param recvcount number of items received from any process + * @param recvtype datatype of receive buffer items + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allToAll(Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -private native long iNeighborAllToAll( - long comm, Buffer sendBuf, int sendCount, long sendType, - Buffer recvBuf, int recvCount, long recvType); + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Java binding of {@code MPI_NEIGHBOR_ALLTOALLV}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each buffer - * @param sdispls displacements from which to take outgoing data - * @param sendtype datatype send buffer items - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param rdispls displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void neighborAllToAllv( - Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, - Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = sendtype.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = recvtype.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - neighborAllToAllv(handle, - sendbuf, sdb, sendoff, sendcount, sdispls, - sendtype.handle, sendtype.baseType, - recvbuf, rdb, recvoff, recvcount, rdispls, - recvtype.handle, recvtype.baseType); -} - -private native void neighborAllToAllv( - long comm, Object sendBuf, boolean sdb, int sendOff, - int[] sendCount, int[] sdispls, long sendType, int sendBaseType, - Object recvBuf, boolean rdb, int recvOff, - int[] recvCount, int[] rdispls, long recvType, int recvBaseType) - throws MPIException; + allToAll(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType); + } -/** - * Java binding of {@code MPI_INEIGHBOR_ALLTOALLV}. - * @param sendbuf send buffer - * @param sendcount number of items sent to each buffer - * @param sdispls displacements from which to take outgoing data - * @param sendtype datatype send buffer items - * @param recvbuf receive buffer - * @param recvcount number of elements received from each process - * @param rdispls displacements at which to place incoming data - * @param recvtype datatype of each item in receive buffer - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iNeighborAllToAllv( - Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, - Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); + private native void allToAll( + long comm, Object sendBuf, boolean sdb, int sendOffset, int sendCount, + long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, int recvCount, + long recvType, int recvBaseType) throws MPIException; + + /** + * Extension of {@code allGather} to the case where each process sends + * distinct data to each of the receivers. + *

Java binding of the MPI operation {@code MPI_IALLTOALL}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each process + * @param sendtype datatype send buffer items + * @param recvbuf receive buffer + * @param recvcount number of items received from any process + * @param recvtype datatype of receive buffer items + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iAllToAll(handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, recvtype.handle)); + } - return new Request(iNeighborAllToAllv( - handle, sendbuf, sendcount, sdispls, sendtype.handle, - recvbuf, recvcount, rdispls, recvtype.handle)); -} + private native long iAllToAll( + long comm, Buffer sendbuf, int sendcount, long sendtype, + Buffer recvbuf, int recvcount, long recvtype) throws MPIException; + + /** + * Adds flexibility to {@code allToAll}: location of data for send is + * specified by {@code sdispls} and location to place data on receive + * side is specified by {@code rdispls}. + *

Java binding of the MPI operation {@code MPI_ALLTOALLV}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each buffer + * @param sdispls displacements from which to take outgoing data + * @param sendtype datatype send buffer items + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param rdispls displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allToAllv( + Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, + Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -private native long iNeighborAllToAllv( - long comm, Buffer sendBuf, int[] sendCount, int[] sdispls, long sType, - Buffer recvBuf, int[] recvCount, int[] rdispls, long rType) - throws MPIException; + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and return the combined value in the output buffer of the - * root process. - *

- * Java binding of the MPI operation {@code MPI_REDUCE}. - *

- * The predefined operations are available in Java as {@code MPI.MAX}, - * {@code MPI.MIN}, {@code MPI.SUM}, {@code MPI.PROD}, {@code MPI.LAND}, - * {@code MPI.BAND}, {@code MPI.LOR}, {@code MPI.BOR}, {@code MPI.LXOR}, - * {@code MPI.BXOR}, {@code MPI.MINLOC} and {@code MPI.MAXLOC}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param count number of items in send buffer - * @param type data type of each item in send buffer - * @param op reduce operation - * @param root rank of root process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void reduce(Object sendbuf, Object recvbuf, int count, - Datatype type, Op op, int root) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); + allToAllv(handle, sendbuf, sdb, sendoff, sendcount, sdispls, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, rdispls, + recvtype.handle, recvtype.baseType); + } - int sendoff = 0, - recvoff = 0; + private native void allToAllv( + long comm, Object sendBuf, boolean sdb, int sendOffset, + int[] sendCount, int[] sdispls, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, + int[] recvCount, int[] rdispls, long recvType, int recvBaseType) + throws MPIException; + + /** + * Adds flexibility to {@code allToAll}: location of data for send is + * specified by {@code sdispls} and location to place data on receive + * side is specified by {@code rdispls}. + *

Java binding of the MPI operation {@code MPI_IALLTOALLV}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each buffer + * @param sdispls displacements from which to take outgoing data + * @param sendtype datatype send buffer items + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param rdispls displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllToAllv( + Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, + Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iAllToAllv( + handle, sendbuf, sendcount, sdispls, sendtype.handle, + recvbuf, recvcount, rdispls, recvtype.handle)); + } - boolean sdb = false, - rdb = false; + private native long iAllToAllv(long comm, + Buffer sendbuf, int[] sendcount, int[] sdispls, long sendtype, + Buffer recvbuf, int[] recvcount, int[] rdispls, long recvtype) + throws MPIException; + + /** + * Adds flexibility to {@code allToAll}: location of data for send is //here + * specified by {@code sDispls} and location to place data on receive + * side is specified by {@code rDispls}. + *

Java binding of the MPI operation {@code MPI_ALLTOALLW}. + * @param sendBuf send buffer + * @param sendCount number of items sent to each buffer + * @param sDispls displacements from which to take outgoing data + * @param sendTypes datatypes of send buffer items + * @param recvBuf receive buffer + * @param recvCount number of elements received from each process + * @param rDispls displacements at which to place incoming data + * @param recvTypes datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allToAllw( + Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendBuf, recvBuf); + + long[] sendHandles = convertTypeArray(sendTypes); + long[] recvHandles = convertTypeArray(recvTypes); + + allToAllw(handle, sendBuf, sendCount, sDispls, + sendHandles, recvBuf, recvCount, rDispls, + recvHandles); + } - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = type.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } + private native void allToAllw(long comm, + Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) + throws MPIException; + + /** + * Adds flexibility to {@code iAllToAll}: location of data for send is + * specified by {@code sDispls} and location to place data on receive + * side is specified by {@code rDispls}. + *

Java binding of the MPI operation {@code MPI_IALLTOALLW}. + * @param sendBuf send buffer + * @param sendCount number of items sent to each buffer + * @param sDispls displacements from which to take outgoing data + * @param sendTypes datatype send buffer items + * @param recvBuf receive buffer + * @param recvCount number of elements received from each process + * @param rDispls displacements at which to place incoming data + * @param recvTypes datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllToAllw( + Buffer sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendBuf, recvBuf); + + long[] sendHandles = convertTypeArray(sendTypes); + long[] recvHandles = convertTypeArray(recvTypes); + + return new Request(iAllToAllw( + handle, sendBuf, sendCount, sDispls, sendHandles, + recvBuf, recvCount, rDispls, recvHandles)); + } - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } + private native long iAllToAllw(long comm, + Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, + Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) + throws MPIException; + + /** + * Java binding of {@code MPI_NEIGHBOR_ALLGATHER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void neighborAllGather( + Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } - reduce(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, - count, type.handle, type.baseType, op, op.handle, root); -} + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and return the combined value in the output buffer of the - * root process. - *

Java binding of the MPI operation {@code MPI_REDUCE} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf send/receive buffer - * @param count number of items in buffer - * @param type data type of each item in buffer - * @param op reduce operation - * @param root rank of root process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void reduce(Object buf, int count, Datatype type, Op op, int root) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - reduce(handle, null, false, 0, buf, db, off, count, - type.handle, type.baseType, op, op.handle, root); -} - -private native void reduce( - long comm, Object sendbuf, boolean sdb, int sendoff, - Object recvbuf, boolean rdb, int recvoff, int count, - long type, int baseType, Op jOp, long hOp, int root) - throws MPIException; + neighborAllGather(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and return the combined value in the output buffer of the - * root process. - *

Java binding of the MPI operation {@code MPI_IREDUCE}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param count number of items in send buffer - * @param type data type of each item in send buffer - * @param op reduce operation - * @param root rank of root process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iReduce(Buffer sendbuf, Buffer recvbuf, - int count, Datatype type, Op op, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - op.setDatatype(type); + private native void neighborAllGather( + long comm, Object sendBuf, boolean sdb, int sendOffset, + int sendCount, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOffset, + int recvCount, long recvType, int recvBaseType) + throws MPIException; + + /** + * Java binding of {@code MPI_INEIGHBOR_ALLGATHER}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iNeighborAllGather( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iNeighborAllGather( + handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, recvtype.handle)); + } - return new Request(iReduce( - handle, sendbuf, recvbuf, count, - type.handle, type.baseType, op, op.handle, root)); -} + private native long iNeighborAllGather( + long comm, Buffer sendBuf, int sendCount, long sendType, + Buffer recvBuf, int recvCount, long recvType) + throws MPIException; + + /** + * Java binding of {@code MPI_NEIGHBOR_ALLGATHERV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of elements that are received from each neighbor + * @param displs displacements at which to place incoming data + * @param recvtype datatype of receive buffer elements + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void neighborAllGatherv( + Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and return the combined value in the output buffer of the - * root process. - *

Java binding of the MPI operation {@code MPI_IREDUCE} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf send/receive buffer - * @param count number of items in buffer - * @param type data type of each item in buffer - * @param op reduce operation - * @param root rank of root process - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iReduce(Buffer buf, int count, - Datatype type, Op op, int root) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - op.setDatatype(type); + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } - return new Request(iReduce( - handle, null, buf, count, - type.handle, type.baseType, op, op.handle, root)); -} + neighborAllGatherv(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, displs, + recvtype.handle, recvtype.baseType); + } -private native long iReduce( - long comm, Buffer sendbuf, Buffer recvbuf, int count, - long type, int baseType, Op jOp, long hOp, int root) - throws MPIException; + private native void neighborAllGatherv( + long comm, Object sendBuf, boolean sdb, int sendOff, + int sendCount, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOff, + int[] recvCount, int[] displs, long recvType, int recvBaseType); + + /** + * Java binding of {@code MPI_INEIGHBOR_ALLGATHERV}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of elements that are received from each neighbor + * @param displs displacements at which to place incoming data + * @param recvtype datatype of receive buffer elements + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iNeighborAllGatherv( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int[] recvcount, int[] displs, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iNeighborAllGatherv( + handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, displs, recvtype.handle)); + } -/** - * Same as {@code reduce} except that the result appears in receive - * buffer of all process in the group. - *

Java binding of the MPI operation {@code MPI_ALLREDUCE}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param count number of items in send buffer - * @param type data type of each item in send buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allReduce(Object sendbuf, Object recvbuf, - int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); + private native long iNeighborAllGatherv( + long comm, Buffer sendBuf, int sendCount, long sendType, + Buffer recvBuf, int[] recvCount, int[] displs, long recvType) + throws MPIException; + + /** + * Java binding of {@code MPI_NEIGHBOR_ALLTOALL}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void neighborAllToAll( + Object sendbuf, int sendcount, Datatype sendtype, + Object recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } - int sendoff = 0, - recvoff = 0; + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } - boolean sdb = false, - rdb = false; + neighborAllToAll(handle, sendbuf, sdb, sendoff, sendcount, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, + recvtype.handle, recvtype.baseType); + } - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = type.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } + private native void neighborAllToAll( + long comm, Object sendBuf, boolean sdb, int sendOff, + int sendCount, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOff, + int recvCount, long recvType, int recvBaseType) + throws MPIException; + + /** + * Java binding of {@code MPI_INEIGHBOR_ALLTOALL}. + * @param sendbuf send buffer + * @param sendcount number of items to send + * @param sendtype datatype of each item in send buffer + * @param recvbuf receive buffer + * @param recvcount number of items to receive + * @param recvtype datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iNeighborAllToAll( + Buffer sendbuf, int sendcount, Datatype sendtype, + Buffer recvbuf, int recvcount, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iNeighborAllToAll( + handle, sendbuf, sendcount, sendtype.handle, + recvbuf, recvcount, recvtype.handle)); + } - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } + private native long iNeighborAllToAll( + long comm, Buffer sendBuf, int sendCount, long sendType, + Buffer recvBuf, int recvCount, long recvType); + + /** + * Java binding of {@code MPI_NEIGHBOR_ALLTOALLV}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each buffer + * @param sdispls displacements from which to take outgoing data + * @param sendtype datatype send buffer items + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param rdispls displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void neighborAllToAllv( + Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, + Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = sendtype.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } - allReduce(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, - count, type.handle, type.baseType, op, op.handle); -} + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = recvtype.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Same as {@code reduce} except that the result appears in receive - * buffer of all process in the group. - *

Java binding of the MPI operation {@code MPI_ALLREDUCE} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count number of items in send buffer - * @param type data type of each item in send buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void allReduce(Object buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - allReduce(handle, null, false, 0, buf, db, off, count, - type.handle, type.baseType, op, op.handle); -} - -private native void allReduce( - long comm, Object sendbuf, boolean sdb, int sendoff, - Object recvbuf, boolean rdb, int recvoff, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; + neighborAllToAllv(handle, + sendbuf, sdb, sendoff, sendcount, sdispls, + sendtype.handle, sendtype.baseType, + recvbuf, rdb, recvoff, recvcount, rdispls, + recvtype.handle, recvtype.baseType); + } -/** - * Same as {@code reduce} except that the result appears in receive - * buffer of all process in the group. - *

Java binding of the MPI operation {@code MPI_IALLREDUCE}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param count number of items in send buffer - * @param type data type of each item in send buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllReduce(Buffer sendbuf, Buffer recvbuf, - int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(sendbuf, recvbuf); - op.setDatatype(type); + private native void neighborAllToAllv( + long comm, Object sendBuf, boolean sdb, int sendOff, + int[] sendCount, int[] sdispls, long sendType, int sendBaseType, + Object recvBuf, boolean rdb, int recvOff, + int[] recvCount, int[] rdispls, long recvType, int recvBaseType) + throws MPIException; + + /** + * Java binding of {@code MPI_INEIGHBOR_ALLTOALLV}. + * @param sendbuf send buffer + * @param sendcount number of items sent to each buffer + * @param sdispls displacements from which to take outgoing data + * @param sendtype datatype send buffer items + * @param recvbuf receive buffer + * @param recvcount number of elements received from each process + * @param rdispls displacements at which to place incoming data + * @param recvtype datatype of each item in receive buffer + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iNeighborAllToAllv( + Buffer sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, + Buffer recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iNeighborAllToAllv( + handle, sendbuf, sendcount, sdispls, sendtype.handle, + recvbuf, recvcount, rdispls, recvtype.handle)); + } - return new Request(iAllReduce(handle, sendbuf, recvbuf, count, - type.handle, type.baseType, op, op.handle)); -} + private native long iNeighborAllToAllv( + long comm, Buffer sendBuf, int[] sendCount, int[] sdispls, long sType, + Buffer recvBuf, int[] recvCount, int[] rdispls, long rType) + throws MPIException; + + /** + * Combine elements in input buffer of each process using the reduce + * operation, and return the combined value in the output buffer of the + * root process. + *

+ * Java binding of the MPI operation {@code MPI_REDUCE}. + *

+ * The predefined operations are available in Java as {@code MPI.MAX}, + * {@code MPI.MIN}, {@code MPI.SUM}, {@code MPI.PROD}, {@code MPI.LAND}, + * {@code MPI.BAND}, {@code MPI.LOR}, {@code MPI.BOR}, {@code MPI.LXOR}, + * {@code MPI.BXOR}, {@code MPI.MINLOC} and {@code MPI.MAXLOC}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param count number of items in send buffer + * @param type data type of each item in send buffer + * @param op reduce operation + * @param root rank of root process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void reduce(Object sendbuf, Object recvbuf, int count, + Datatype type, Op op, int root) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = type.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Same as {@code reduce} except that the result appears in receive - * buffer of all process in the group. - *

Java binding of the MPI operation {@code MPI_IALLREDUCE} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count number of items in send buffer - * @param type data type of each item in send buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iAllReduce(Buffer buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(buf); + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } - return new Request(iAllReduce( - handle, null, buf, count, - type.handle, type.baseType, op, op.handle)); -} + reduce(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, + count, type.handle, type.baseType, op, op.handle, root); + } -private native long iAllReduce( - long comm, Buffer sendbuf, Buffer recvbuf, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; + /** + * Combine elements in input buffer of each process using the reduce + * operation, and return the combined value in the output buffer of the + * root process. + *

Java binding of the MPI operation {@code MPI_REDUCE} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf send/receive buffer + * @param count number of items in buffer + * @param type data type of each item in buffer + * @param op reduce operation + * @param root rank of root process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void reduce(Object buf, int count, Datatype type, Op op, int root) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and scatter the combined values over the output buffers - * of the processes. - *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param recvcounts numbers of result elements distributed to each process - * @param type data type of each item in send buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void reduceScatter(Object sendbuf, Object recvbuf, - int[] recvcounts, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); + reduce(handle, null, false, 0, buf, db, off, count, + type.handle, type.baseType, op, op.handle, root); + } - int sendoff = 0, - recvoff = 0; + private native void reduce( + long comm, Object sendbuf, boolean sdb, int sendoff, + Object recvbuf, boolean rdb, int recvoff, int count, + long type, int baseType, Op jOp, long hOp, int root) + throws MPIException; + + /** + * Combine elements in input buffer of each process using the reduce + * operation, and return the combined value in the output buffer of the + * root process. + *

Java binding of the MPI operation {@code MPI_IREDUCE}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param count number of items in send buffer + * @param type data type of each item in send buffer + * @param op reduce operation + * @param root rank of root process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iReduce(Buffer sendbuf, Buffer recvbuf, + int count, Datatype type, Op op, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + op.setDatatype(type); + + return new Request(iReduce( + handle, sendbuf, recvbuf, count, + type.handle, type.baseType, op, op.handle, root)); + } - boolean sdb = false, - rdb = false; + /** + * Combine elements in input buffer of each process using the reduce + * operation, and return the combined value in the output buffer of the + * root process. + *

Java binding of the MPI operation {@code MPI_IREDUCE} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf send/receive buffer + * @param count number of items in buffer + * @param type data type of each item in buffer + * @param op reduce operation + * @param root rank of root process + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iReduce(Buffer buf, int count, + Datatype type, Op op, int root) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + op.setDatatype(type); + + return new Request(iReduce( + handle, null, buf, count, + type.handle, type.baseType, op, op.handle, root)); + } - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = type.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } + private native long iReduce( + long comm, Buffer sendbuf, Buffer recvbuf, int count, + long type, int baseType, Op jOp, long hOp, int root) + throws MPIException; + + /** + * Same as {@code reduce} except that the result appears in receive + * buffer of all process in the group. + *

Java binding of the MPI operation {@code MPI_ALLREDUCE}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param count number of items in send buffer + * @param type data type of each item in send buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allReduce(Object sendbuf, Object recvbuf, + int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = type.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } - reduceScatter(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, - recvcounts, type.handle, type.baseType, op, op.handle); -} + allReduce(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, + count, type.handle, type.baseType, op, op.handle); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and scatter the combined values over the output buffers - * of the processes. - *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param counts numbers of result elements distributed to each process - * @param type data type of each item in send buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void reduceScatter(Object buf, int[] counts, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - reduceScatter(handle, null, false, 0, buf, db, off, counts, - type.handle, type.baseType, op, op.handle); -} - -private native void reduceScatter( - long comm, Object sendbuf, boolean sdb, int sendoff, - Object recvbuf, boolean rdb, int recvoff, int[] recvcounts, - long type, int baseType, Op jOp, long hOp) throws MPIException; + /** + * Same as {@code reduce} except that the result appears in receive + * buffer of all process in the group. + *

Java binding of the MPI operation {@code MPI_ALLREDUCE} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count number of items in send buffer + * @param type data type of each item in send buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void allReduce(Object buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and scatter the combined values over the output buffers - * of the processes. - *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param recvcounts numbers of result elements distributed to each process - * @param type data type of each item in send buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iReduceScatter(Buffer sendbuf, Buffer recvbuf, - int[] recvcounts, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(sendbuf, recvbuf); + allReduce(handle, null, false, 0, buf, db, off, count, + type.handle, type.baseType, op, op.handle); + } - return new Request(iReduceScatter( - handle, sendbuf, recvbuf, recvcounts, - type.handle, type.baseType, op, op.handle)); -} + private native void allReduce( + long comm, Object sendbuf, boolean sdb, int sendoff, + Object recvbuf, boolean rdb, int recvoff, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Same as {@code reduce} except that the result appears in receive + * buffer of all process in the group. + *

Java binding of the MPI operation {@code MPI_IALLREDUCE}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param count number of items in send buffer + * @param type data type of each item in send buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllReduce(Buffer sendbuf, Buffer recvbuf, + int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + assertDirectBuffer(sendbuf, recvbuf); + op.setDatatype(type); + + return new Request(iAllReduce(handle, sendbuf, recvbuf, count, + type.handle, type.baseType, op, op.handle)); + } -/** - * Combine elements in input buffer of each process using the reduce - * operation, and scatter the combined values over the output buffers - * of the processes. - *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param counts numbers of result elements distributed to each process - * @param type data type of each item in send buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iReduceScatter( - Buffer buf, int[] counts, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(buf); + /** + * Same as {@code reduce} except that the result appears in receive + * buffer of all process in the group. + *

Java binding of the MPI operation {@code MPI_IALLREDUCE} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count number of items in send buffer + * @param type data type of each item in send buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iAllReduce(Buffer buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(buf); + + return new Request(iAllReduce( + handle, null, buf, count, + type.handle, type.baseType, op, op.handle)); + } - return new Request(iReduceScatter( - handle, null, buf, counts, - type.handle, type.baseType, op, op.handle)); -} + private native long iAllReduce( + long comm, Buffer sendbuf, Buffer recvbuf, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Combine elements in input buffer of each process using the reduce + * operation, and scatter the combined values over the output buffers + * of the processes. + *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param recvcounts numbers of result elements distributed to each process + * @param type data type of each item in send buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void reduceScatter(Object sendbuf, Object recvbuf, + int[] recvcounts, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = type.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -private native long iReduceScatter( - long handle, Buffer sendbuf, Object recvbuf, int[] recvcounts, - long type, int baseType, Op jOp, long hOp) throws MPIException; + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Combine values and scatter the results. - *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER_BLOCK}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param recvcount element count per block - * @param type data type of each item in send buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void reduceScatterBlock(Object sendbuf, Object recvbuf, - int recvcount, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); + reduceScatter(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, + recvcounts, type.handle, type.baseType, op, op.handle); + } - int sendoff = 0, - recvoff = 0; + /** + * Combine elements in input buffer of each process using the reduce + * operation, and scatter the combined values over the output buffers + * of the processes. + *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param counts numbers of result elements distributed to each process + * @param type data type of each item in send buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void reduceScatter(Object buf, int[] counts, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } - boolean sdb = false, - rdb = false; + reduceScatter(handle, null, false, 0, buf, db, off, counts, + type.handle, type.baseType, op, op.handle); + } - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = type.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } + private native void reduceScatter( + long comm, Object sendbuf, boolean sdb, int sendoff, + Object recvbuf, boolean rdb, int recvoff, int[] recvcounts, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Combine elements in input buffer of each process using the reduce + * operation, and scatter the combined values over the output buffers + * of the processes. + *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param recvcounts numbers of result elements distributed to each process + * @param type data type of each item in send buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iReduceScatter(Buffer sendbuf, Buffer recvbuf, + int[] recvcounts, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iReduceScatter( + handle, sendbuf, recvbuf, recvcounts, + type.handle, type.baseType, op, op.handle)); + } - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } + /** + * Combine elements in input buffer of each process using the reduce + * operation, and scatter the combined values over the output buffers + * of the processes. + *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param counts numbers of result elements distributed to each process + * @param type data type of each item in send buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iReduceScatter( + Buffer buf, int[] counts, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(buf); + + return new Request(iReduceScatter( + handle, null, buf, counts, + type.handle, type.baseType, op, op.handle)); + } - reduceScatterBlock(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, - recvcount, type.handle, type.baseType, op, op.handle); -} + private native long iReduceScatter( + long handle, Buffer sendbuf, Object recvbuf, int[] recvcounts, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Combine values and scatter the results. + *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER_BLOCK}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param recvcount element count per block + * @param type data type of each item in send buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void reduceScatterBlock(Object sendbuf, Object recvbuf, + int recvcount, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = type.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } -/** - * Combine values and scatter the results. - *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER_BLOCK} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count element count per block - * @param type data type of each item in send buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void reduceScatterBlock( - Object buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - reduceScatterBlock(handle, null, false, 0, buf, db, off, count, - type.handle, type.baseType, op, op.handle); -} - -private native void reduceScatterBlock( - long comm, Object sendBuf, boolean sdb, int sOffset, - Object recvBuf, boolean rdb, int rOffset, int rCount, - long type, int baseType, Op jOp, long hOp) throws MPIException; + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } -/** - * Combine values and scatter the results. - *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER_BLOCK}. - * @param sendbuf send buffer - * @param recvbuf receive buffer - * @param recvcount element count per block - * @param type data type of each item in send buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iReduceScatterBlock( - Buffer sendbuf, Buffer recvbuf, int recvcount, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(sendbuf, recvbuf); + reduceScatterBlock(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, + recvcount, type.handle, type.baseType, op, op.handle); + } - return new Request(iReduceScatterBlock( - handle, sendbuf, recvbuf, recvcount, - type.handle, type.baseType, op, op.handle)); -} + /** + * Combine values and scatter the results. + *

Java binding of the MPI operation {@code MPI_REDUCE_SCATTER_BLOCK} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count element count per block + * @param type data type of each item in send buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void reduceScatterBlock( + Object buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } -/** - * Combine values and scatter the results. - *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER_BLOCK} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer - * @param count element count per block - * @param type data type of each item in send buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iReduceScatterBlock( - Buffer buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(buf); + reduceScatterBlock(handle, null, false, 0, buf, db, off, count, + type.handle, type.baseType, op, op.handle); + } - return new Request(iReduceScatterBlock( - handle, null, buf, count, type.handle, - type.baseType, op, op.handle)); -} + private native void reduceScatterBlock( + long comm, Object sendBuf, boolean sdb, int sOffset, + Object recvBuf, boolean rdb, int rOffset, int rCount, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Combine values and scatter the results. + *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER_BLOCK}. + * @param sendbuf send buffer + * @param recvbuf receive buffer + * @param recvcount element count per block + * @param type data type of each item in send buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iReduceScatterBlock( + Buffer sendbuf, Buffer recvbuf, int recvcount, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iReduceScatterBlock( + handle, sendbuf, recvbuf, recvcount, + type.handle, type.baseType, op, op.handle)); + } -private native long iReduceScatterBlock( - long handle, Buffer sendbuf, Buffer recvbuf, int recvcount, - long type, int baseType, Op jOp, long hOp) throws MPIException; + /** + * Combine values and scatter the results. + *

Java binding of the MPI operation {@code MPI_IREDUCE_SCATTER_BLOCK} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer + * @param count element count per block + * @param type data type of each item in send buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iReduceScatterBlock( + Buffer buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(buf); + + return new Request(iReduceScatterBlock( + handle, null, buf, count, type.handle, + type.baseType, op, op.handle)); + } -/** - * Apply the operation given by {@code op} element-wise to the - * elements of {@code inBuf} and {@code inOutBuf} with the result - * stored element-wise in {@code inOutBuf}. - *

Java binding of the MPI operation {@code MPI_REDUCE_LOCAL}. - * @param inBuf input buffer - * @param inOutBuf input buffer, will contain combined output - * @param count number of elements - * @param type data type of each item - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void reduceLocal( - Object inBuf, Object inOutBuf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - - int inOff = 0, - inOutOff = 0; - - boolean idb = false, - iodb = false; - - if(inBuf instanceof Buffer && !(idb = ((Buffer)inBuf).isDirect())) - { - inOff = type.getOffset(inBuf); - inBuf = ((Buffer)inBuf).array(); - } - - if(inOutBuf instanceof Buffer && !(iodb = ((Buffer)inOutBuf).isDirect())) - { - inOutOff = type.getOffset(inOutBuf); - inOutBuf = ((Buffer)inOutBuf).array(); - } - - if(op.uf == null) - { - reduceLocal(inBuf, idb, inOff, inOutBuf, iodb, inOutOff, - count, type.handle, op.handle); - } - else - { - reduceLocalUf(inBuf, idb, inOff, inOutBuf, iodb, inOutOff, - count, type.handle, type.baseType, op, op.handle); - } -} - -private static native void reduceLocal( - Object inBuf, boolean idb, int inOff, - Object inOutBuf, boolean iodb, int inOutOff, int count, - long type, long op) throws MPIException; - -private static native void reduceLocalUf( - Object inBuf, boolean idb, int inOff, - Object inOutBuf, boolean iodb, int inOutOff, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; + private native long iReduceScatterBlock( + long handle, Buffer sendbuf, Buffer recvbuf, int recvcount, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Apply the operation given by {@code op} element-wise to the + * elements of {@code inBuf} and {@code inOutBuf} with the result + * stored element-wise in {@code inOutBuf}. + *

Java binding of the MPI operation {@code MPI_REDUCE_LOCAL}. + * @param inBuf input buffer + * @param inOutBuf input buffer, will contain combined output + * @param count number of elements + * @param type data type of each item + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void reduceLocal( + Object inBuf, Object inOutBuf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + + int inOff = 0, + inOutOff = 0; + + boolean idb = false, + iodb = false; + + if(inBuf instanceof Buffer && !(idb = ((Buffer)inBuf).isDirect())) + { + inOff = type.getOffset(inBuf); + inBuf = ((Buffer)inBuf).array(); + } -/** - * Sets the print name for the communicator. - * @param name name for the communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void setName(String name) throws MPIException -{ - MPI.check(); - setName(handle, name); -} + if(inOutBuf instanceof Buffer && !(iodb = ((Buffer)inOutBuf).isDirect())) + { + inOutOff = type.getOffset(inOutBuf); + inOutBuf = ((Buffer)inOutBuf).array(); + } -private native void setName(long handle, String name) throws MPIException; + if(op.uf == null) + { + reduceLocal(inBuf, idb, inOff, inOutBuf, iodb, inOutOff, + count, type.handle, op.handle); + } + else + { + reduceLocalUf(inBuf, idb, inOff, inOutBuf, iodb, inOutOff, + count, type.handle, type.baseType, op, op.handle); + } + } -/** - * Return the print name from the communicator. - * @return name of the communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final String getName() throws MPIException -{ - MPI.check(); - return getName(handle); -} + private static native void reduceLocal( + Object inBuf, boolean idb, int inOff, + Object inOutBuf, boolean iodb, int inOutOff, int count, + long type, long op) throws MPIException; + + private static native void reduceLocalUf( + Object inBuf, boolean idb, int inOff, + Object inOutBuf, boolean iodb, int inOutOff, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Sets the print name for the communicator. + * @param name name for the communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void setName(String name) throws MPIException + { + MPI.check(); + setName(handle, name); + } -private native String getName(long handle) throws MPIException; + private native void setName(long handle, String name) throws MPIException; + + /** + * Return the print name from the communicator. + * @return name of the communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final String getName() throws MPIException + { + MPI.check(); + return getName(handle); + } -/** - * A helper method to convert an array of Datatypes to - * an array of longs (handles). - * @param dArray Array of Datatypes - * @return converted Datatypes - */ -private long[] convertTypeArray(Datatype[] dArray) { - long[] lArray = new long[dArray.length]; - - for(int i = 0; i < lArray.length; i++) { - if(dArray[i] != null) { - lArray[i] = dArray[i].handle; + private native String getName(long handle) throws MPIException; + + /** + * A helper method to convert an array of Datatypes to + * an array of longs (handles). + * @param dArray Array of Datatypes + * @return converted Datatypes + */ + private long[] convertTypeArray(Datatype[] dArray) { + long[] lArray = new long[dArray.length]; + + for(int i = 0; i < lArray.length; i++) { + if(dArray[i] != null) { + lArray[i] = dArray[i].handle; + } } + return lArray; } - return lArray; -} } // Comm diff --git a/ompi/mpi/java/java/Constant.java b/ompi/mpi/java/java/Constant.java index e60ada57d86..5512fe85d68 100644 --- a/ompi/mpi/java/java/Constant.java +++ b/ompi/mpi/java/java/Constant.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -20,103 +22,100 @@ class Constant { - protected int THREAD_SINGLE, THREAD_FUNNELED, THREAD_SERIALIZED, - THREAD_MULTIPLE; + protected int THREAD_SINGLE, THREAD_FUNNELED, THREAD_SERIALIZED, THREAD_MULTIPLE; + + protected int GRAPH, DIST_GRAPH, CART; + protected int ANY_SOURCE, ANY_TAG; + protected int PROC_NULL; + protected int UNDEFINED; + protected int IDENT, CONGRUENT, SIMILAR, UNEQUAL; + protected int TAG_UB, HOST, IO, WTIME_IS_GLOBAL; - protected int GRAPH, DIST_GRAPH, CART; - protected int ANY_SOURCE, ANY_TAG; - protected int PROC_NULL; - protected int UNDEFINED; - protected int IDENT, CONGRUENT, SIMILAR, UNEQUAL; - protected int TAG_UB, HOST, IO, WTIME_IS_GLOBAL; + protected int APPNUM, LASTUSEDCODE, UNIVERSE_SIZE, WIN_BASE, WIN_SIZE, WIN_DISP_UNIT; - protected int APPNUM, LASTUSEDCODE, UNIVERSE_SIZE, WIN_BASE, WIN_SIZE, - WIN_DISP_UNIT; + protected int VERSION, SUBVERSION; + protected int ROOT, KEYVAL_INVALID, BSEND_OVERHEAD; + protected int MAX_OBJECT_NAME, MAX_PORT_NAME, MAX_DATAREP_STRING; + protected int MAX_INFO_KEY, MAX_INFO_VAL; + protected int ORDER_C, ORDER_FORTRAN; - protected int VERSION, SUBVERSION; - protected int ROOT, KEYVAL_INVALID, BSEND_OVERHEAD; - protected int MAX_OBJECT_NAME, MAX_PORT_NAME, MAX_DATAREP_STRING; - protected int MAX_INFO_KEY, MAX_INFO_VAL; - protected int ORDER_C, ORDER_FORTRAN; - protected int DISTRIBUTE_BLOCK, DISTRIBUTE_CYCLIC, DISTRIBUTE_NONE, - DISTRIBUTE_DFLT_DARG; + protected int DISTRIBUTE_BLOCK, DISTRIBUTE_CYCLIC, DISTRIBUTE_NONE, DISTRIBUTE_DFLT_DARG; - protected int MODE_CREATE, MODE_RDONLY, MODE_WRONLY, MODE_RDWR, - MODE_DELETE_ON_CLOSE, MODE_UNIQUE_OPEN, MODE_EXCL, - MODE_APPEND, MODE_SEQUENTIAL; + protected int MODE_CREATE, MODE_RDONLY, MODE_WRONLY, MODE_RDWR, + MODE_DELETE_ON_CLOSE, MODE_UNIQUE_OPEN, MODE_EXCL, + MODE_APPEND, MODE_SEQUENTIAL; - protected int DISPLACEMENT_CURRENT; - protected int SEEK_SET, SEEK_CUR, SEEK_END; + protected int DISPLACEMENT_CURRENT; + protected int SEEK_SET, SEEK_CUR, SEEK_END; - protected int MODE_NOCHECK, MODE_NOPRECEDE, MODE_NOPUT, MODE_NOSTORE, - MODE_NOSUCCEED; + protected int MODE_NOCHECK, MODE_NOPRECEDE, MODE_NOPUT, MODE_NOSTORE, MODE_NOSUCCEED; - protected int LOCK_EXCLUSIVE, LOCK_SHARED; + protected int LOCK_EXCLUSIVE, LOCK_SHARED; - // Error classes and codes - protected int SUCCESS; - protected int ERR_BUFFER; - protected int ERR_COUNT; - protected int ERR_TYPE; - protected int ERR_TAG; - protected int ERR_COMM; - protected int ERR_RANK; - protected int ERR_REQUEST; - protected int ERR_ROOT; - protected int ERR_GROUP; - protected int ERR_OP; - protected int ERR_TOPOLOGY; - protected int ERR_DIMS; - protected int ERR_ARG; - protected int ERR_UNKNOWN; - protected int ERR_TRUNCATE; - protected int ERR_OTHER; - protected int ERR_INTERN; - protected int ERR_IN_STATUS; - protected int ERR_PENDING; - protected int ERR_ACCESS; - protected int ERR_AMODE; - protected int ERR_ASSERT; - protected int ERR_BAD_FILE; - protected int ERR_BASE; - protected int ERR_CONVERSION; - protected int ERR_DISP; - protected int ERR_DUP_DATAREP; - protected int ERR_FILE_EXISTS; - protected int ERR_FILE_IN_USE; - protected int ERR_FILE; - protected int ERR_INFO_KEY; - protected int ERR_INFO_NOKEY; - protected int ERR_INFO_VALUE; - protected int ERR_INFO; - protected int ERR_IO; - protected int ERR_KEYVAL; - protected int ERR_LOCKTYPE; - protected int ERR_NAME; - protected int ERR_NO_MEM; - protected int ERR_NOT_SAME; - protected int ERR_NO_SPACE; - protected int ERR_NO_SUCH_FILE; - protected int ERR_PORT; - protected int ERR_QUOTA; - protected int ERR_READ_ONLY; - protected int ERR_RMA_CONFLICT; - protected int ERR_RMA_SYNC; - protected int ERR_SERVICE; - protected int ERR_SIZE; - protected int ERR_SPAWN; - protected int ERR_UNSUPPORTED_DATAREP; - protected int ERR_UNSUPPORTED_OPERATION; - protected int ERR_WIN; - protected int ERR_LASTCODE; - protected int ERR_SYSRESOURCE; + // Error classes and codes + protected int SUCCESS; + protected int ERR_BUFFER; + protected int ERR_COUNT; + protected int ERR_TYPE; + protected int ERR_TAG; + protected int ERR_COMM; + protected int ERR_RANK; + protected int ERR_REQUEST; + protected int ERR_ROOT; + protected int ERR_GROUP; + protected int ERR_OP; + protected int ERR_TOPOLOGY; + protected int ERR_DIMS; + protected int ERR_ARG; + protected int ERR_UNKNOWN; + protected int ERR_TRUNCATE; + protected int ERR_OTHER; + protected int ERR_INTERN; + protected int ERR_IN_STATUS; + protected int ERR_PENDING; + protected int ERR_ACCESS; + protected int ERR_AMODE; + protected int ERR_ASSERT; + protected int ERR_BAD_FILE; + protected int ERR_BASE; + protected int ERR_CONVERSION; + protected int ERR_DISP; + protected int ERR_DUP_DATAREP; + protected int ERR_FILE_EXISTS; + protected int ERR_FILE_IN_USE; + protected int ERR_FILE; + protected int ERR_INFO_KEY; + protected int ERR_INFO_NOKEY; + protected int ERR_INFO_VALUE; + protected int ERR_INFO; + protected int ERR_IO; + protected int ERR_KEYVAL; + protected int ERR_LOCKTYPE; + protected int ERR_NAME; + protected int ERR_NO_MEM; + protected int ERR_NOT_SAME; + protected int ERR_NO_SPACE; + protected int ERR_NO_SUCH_FILE; + protected int ERR_PORT; + protected int ERR_QUOTA; + protected int ERR_READ_ONLY; + protected int ERR_RMA_CONFLICT; + protected int ERR_RMA_SYNC; + protected int ERR_SERVICE; + protected int ERR_SIZE; + protected int ERR_SPAWN; + protected int ERR_UNSUPPORTED_DATAREP; + protected int ERR_UNSUPPORTED_OPERATION; + protected int ERR_WIN; + protected int ERR_LASTCODE; + protected int ERR_SYSRESOURCE; - protected Constant() - { - setConstant(); - } + protected Constant() + { + setConstant(); + } - private native void setConstant(); + private native void setConstant(); } // Constant diff --git a/ompi/mpi/java/java/Datatype.java b/ompi/mpi/java/java/Datatype.java index be3c9b80e42..d7849fd3d5d 100644 --- a/ompi/mpi/java/java/Datatype.java +++ b/ompi/mpi/java/java/Datatype.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Datatype.java * Author : Sang Lim, Sung-Hoon Ko, Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 @@ -54,526 +54,526 @@ */ public final class Datatype implements Freeable { -protected long handle; -protected int baseType; -protected int baseSize; - -// Cache to avoid unnecessary jni calls. -private int lb, extent, trueLb, trueExtent; - -protected static final int NULL = 0; -protected static final int BYTE = 1; -protected static final int CHAR = 2; -protected static final int SHORT = 3; -protected static final int BOOLEAN = 4; -protected static final int INT = 5; -protected static final int LONG = 6; -protected static final int FLOAT = 7; -protected static final int DOUBLE = 8; -protected static final int PACKED = 9; -protected static final int INT2 = 10; -protected static final int SHORT_INT = 11; -protected static final int LONG_INT = 12; -protected static final int FLOAT_INT = 13; -protected static final int DOUBLE_INT = 14; -protected static final int FLOAT_COMPLEX = 15; -protected static final int DOUBLE_COMPLEX = 16; - -static -{ - init(); -} - -private static native void init(); - -/* - * Constructor used in static initializer of 'MPI'. - * - * (Called before MPI.Init(), so cannot make any native MPI calls.) - * - * (Initialization done in separate 'setBasic', so can create - * datatype objects for 'BYTE', etc in static initializers invoked before - * MPI.Init(), then initialize objects after MPI initialized.) - */ -protected Datatype() -{ -} - -protected void setBasic(int type) -{ - baseType = type; - handle = getDatatype(type); - baseSize = type == NULL ? 0 : getSize(handle); -} - -protected void setBasic(int type, Datatype oldType) -{ - baseType = oldType.baseType; - handle = getDatatype(type); - baseSize = oldType.baseSize; -} - -private static native long getDatatype(int type); - -/* - * Constructor used in 'create*' methods. - */ -private Datatype(Datatype oldType, long handle) -{ - baseType = oldType.baseType; - baseSize = oldType.baseSize; - this.handle = handle; -} - -/* - * Constructor used in 'create*' methods. - */ -private Datatype(int baseType, int baseSize, long handle) -{ - this.baseType = baseType; - this.baseSize = baseSize; - this.handle = handle; -} - -/** - * Returns the lower bound of a datatype. - *

Java binding of the MPI operation {@code MPI_TYPE_GET_EXTENT}. - * @return lower bound of datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getLb() throws MPIException -{ - if(extent == 0) - getLbExtent(); - - return lb; -} - -/** - * Returns the extent of a datatype. - *

Java binding of the MPI operation {@code MPI_TYPE_GET_EXTENT}. - * @return datatype extent - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getExtent() throws MPIException -{ - if(extent == 0) - getLbExtent(); - - return extent; -} - -private void getLbExtent() throws MPIException -{ - MPI.check(); - int lbExt[] = new int[2]; - getLbExtent(handle, lbExt); - lb = lbExt[0] / baseSize; - extent = lbExt[1] / baseSize; -} - -private native void getLbExtent(long handle, int[] lbExt); - -/** - * Returns the true lower bound of a datatype. - *

Java binding of the MPI operation {@code MPI_TYPE_GET_TRUE_EXTENT}. - * @return lower bound of datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getTrueLb() throws MPIException -{ - if(trueExtent == 0) - getTrueLbExtent(); - - return trueLb; -} - -/** - * Returns the true extent of a datatype. - *

Java binding of the MPI operation {@code MPI_TYPE_GET_TRUE_EXTENT}. - * @return datatype true extent - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getTrueExtent() throws MPIException -{ - if(trueExtent == 0) - getTrueLbExtent(); - - return trueExtent; -} - -private void getTrueLbExtent() throws MPIException -{ - MPI.check(); - int lbExt[] = new int[2]; - getTrueLbExtent(handle, lbExt); - trueLb = lbExt[0] / baseSize; - trueExtent = lbExt[1] / baseSize; -} - -private native void getTrueLbExtent(long handle, int[] lbExt); - -/** - * Returns the total size of a datatype - the number of buffer - * elements it represents. - *

Java binding of the MPI operation {@code MPI_TYPE_SIZE}. - * @return datatype size - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getSize() throws MPIException -{ - MPI.check(); - return getSize(handle) / baseSize; -} - -private native int getSize(long type); - -/** - * Commits a derived datatype. - * Java binding of the MPI operation {@code MPI_TYPE_COMMIT}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void commit() throws MPIException -{ - MPI.check(); - commit(handle); -} - -private native void commit(long type); - -/** - * Frees the datatype. - *

Java binding of the MPI operation {@code MPI_TYPE_FREE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public void free() throws MPIException -{ - MPI.check(); - handle = free(handle); -} - -private native long free(long type) throws MPIException; - -/** - * Returns {@code true} if this datatype is MPI_DATATYPE_NULL. - * @return {@code true} if this datatype is MPI_DATATYPE_NULL - */ -public boolean isNull() -{ - return handle == MPI.DATATYPE_NULL.handle; -} - -/** - * Java binding of {@code MPI_TYPE_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return new datatype - */ -@Override public Datatype clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} - -/** - * Java binding of {@code MPI_TYPE_DUP}. - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Datatype dup() throws MPIException -{ - MPI.check(); - return new Datatype(this, dup(handle)); -} - -private native long dup(long type) throws MPIException; - -/** - * Construct new datatype representing replication of old datatype into - * contiguous locations. - *

Java binding of the MPI operation {@code MPI_TYPE_CONTIGUOUS}. - *

The base type of the new datatype is the same as the base type of - * {@code oldType}. - * @param count replication count - * @param oldType old datatype - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createContiguous(int count, Datatype oldType) - throws MPIException -{ - MPI.check(); - return new Datatype(oldType, getContiguous(count, oldType.handle)); -} - -private static native long getContiguous(int count, long oldType); - -/** - * Construct new datatype representing replication of old datatype into - * locations that consist of equally spaced blocks. - *

Java binding of the MPI operation {@code MPI_TYPE_VECTOR}. - *

The base type of the new datatype is the same as the base type of - * {@code oldType}. - * @param count number of blocks - * @param blockLength number of elements in each block - * @param stride number of elements between start of each block - * @param oldType old datatype - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createVector(int count, int blockLength, - int stride, Datatype oldType) - throws MPIException -{ - MPI.check(); - long handle = getVector(count, blockLength, stride, oldType.handle); - return new Datatype(oldType, handle); -} - -private static native long getVector( - int count, int blockLength, int stride, long oldType) - throws MPIException; - -/** - * Identical to {@code createVector} except that the stride is expressed - * directly in terms of the buffer index, rather than the units of - * the old type. - *

Java binding of the MPI operation {@code MPI_TYPE_HVECTOR}. - * @param count number of blocks - * @param blockLength number of elements in each - * @param stride number of bytes between start of each block - * @param oldType old datatype - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createHVector(int count, int blockLength, - int stride, Datatype oldType) - throws MPIException -{ - MPI.check(); - long handle = getHVector(count, blockLength, stride, oldType.handle); - return new Datatype(oldType, handle); -} - -private static native long getHVector( - int count, int blockLength, int stride, long oldType) - throws MPIException; - -/** - * Construct new datatype representing replication of old datatype into - * a sequence of blocks where each block can contain a different number - * of copies and have a different displacement. - *

Java binding of the MPI operation {@code MPI_TYPE_INDEXED}. - *

The number of blocks is taken to be size of the {@code blockLengths} - * argument. The second argument, {@code displacements}, should be the - * same size. The base type of the new datatype is the same as the base - * type of {@code oldType}. - * @param blockLengths number of elements per block - * @param displacements displacement of each block in units of old type - * @param oldType old datatype - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createIndexed(int[] blockLengths, - int[] displacements, Datatype oldType) - throws MPIException -{ - MPI.check(); - long handle = getIndexed(blockLengths, displacements, oldType.handle); - return new Datatype(oldType, handle); -} - -private static native long getIndexed( - int[] blockLengths, int[] displacements, long oldType) - throws MPIException; - -/** - * Identical to {@code createIndexed} except that the displacements are - * expressed directly in terms of the buffer index, rather than the - * units of the old type. - *

Java binding of the MPI operation {@code MPI_TYPE_HINDEXED}. - * @param blockLengths number of elements per block - * @param displacements byte displacement in buffer for each block - * @param oldType old datatype - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createHIndexed(int[] blockLengths, - int[] displacements, Datatype oldType) - throws MPIException -{ - MPI.check(); - long handle = getHIndexed(blockLengths, displacements, oldType.handle); - return new Datatype(oldType, handle); -} - -private static native long getHIndexed( - int[] blockLengths, int[] displacements, long oldType) - throws MPIException; - -/** - * The most general type constructor. - *

Java binding of the MPI operation {@code MPI_TYPE_STRUCT}. - *

The number of blocks is taken to be size of the {@code blockLengths} - * argument. The second and third arguments, {@code displacements}, - * and {@code types}, should be the same size. - * @param blockLengths number of elements in each block - * @param displacements byte displacement of each block - * @param types type of elements in each block - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createStruct(int[] blockLengths, - int[] displacements, Datatype[] types) - throws MPIException -{ - MPI.check(); - long handle = getStruct(blockLengths, displacements, types); - return new Datatype(MPI.BYTE, handle); -} - -private static native long getStruct( - int[] blockLengths, int[] displacements, Datatype[] types) - throws MPIException; - -/* - * JMS add proper documentation here - * JMS int != Aint! This needs to be fixed throughout. - */ -/** - * Create a datatype with a new lower bound and extent from an existing - * datatype. - *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_RESIZED}. - * @param oldType input datatype - * @param lb new lower bound of datatype (address integer) - * @param extent new extent of datatype (address integer) - * @return new datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Datatype createResized(Datatype oldType, int lb, int extent) - throws MPIException -{ - MPI.check(); - long handle = getResized(oldType.handle, lb, extent); - return new Datatype(oldType, handle); -} - -private static native long getResized(long oldType, int lb, int extent); - -/** - * Sets the print name for the datatype. - * @param name name for the datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setName(String name) throws MPIException -{ - MPI.check(); - setName(handle, name); -} - -private native void setName(long handle, String name) throws MPIException; - -/** - * Return the print name from the datatype. - * @return name of the datatype - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public String getName() throws MPIException -{ - MPI.check(); - return getName(handle); -} - -private native String getName(long handle) throws MPIException; - -/** - * Create a new attribute key. - *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_KEYVAL}. - * @return attribute key for future access - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int createKeyval() throws MPIException -{ - MPI.check(); - return createKeyval_jni(); -} - -private static native int createKeyval_jni() throws MPIException; - -/** - * Frees an attribute key. - *

Java binding of the MPI operation {@code MPI_TYPE_FREE_KEYVAL}. - * @param keyval attribute key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void freeKeyval(int keyval) throws MPIException -{ - MPI.check(); - freeKeyval_jni(keyval); -} - -private static native void freeKeyval_jni(int keyval) throws MPIException; - -/** - * Stores attribute value associated with a key. - *

Java binding of the MPI operation {@code MPI_TYPE_SET_ATTR}. - * @param keyval attribute key - * @param value attribute value - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setAttr(int keyval, Object value) throws MPIException -{ - MPI.check(); - setAttr(handle, keyval, MPI.attrSet(value)); -} - -private native void setAttr(long type, int keyval, byte[] value) - throws MPIException; - -/** - * Retrieves attribute value by key. - *

Java binding of the MPI operation {@code MPI_TYPE_GET_ATTR}. - * @param keyval attribute key - * @return attribute value or null if no attribute is associated with the key. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Object getAttr(int keyval) throws MPIException -{ - MPI.check(); - Object obj = getAttr(handle, keyval); - return obj instanceof byte[] ? MPI.attrGet((byte[])obj) : obj; -} - -private native Object getAttr(long type, int keyval) throws MPIException; - -/** - * Deletes an attribute value associated with a key. - *

Java binding of the MPI operation {@code MPI_TYPE_DELETE_ATTR}. - * @param keyval attribute key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void deleteAttr(int keyval) throws MPIException -{ - MPI.check(); - deleteAttr(handle, keyval); -} - -private native void deleteAttr(long type, int keyval) throws MPIException; - -/** - * Gets the offset of a buffer in bytes. - * @param buffer buffer - * @return offset in bytes - */ -protected int getOffset(Object buffer) -{ - return baseSize * ((Buffer)buffer).arrayOffset(); -} + protected long handle; + protected int baseType; + protected int baseSize; + + // Cache to avoid unnecessary jni calls. + private int lb, extent, trueLb, trueExtent; + + protected static final int NULL = 0; + protected static final int BYTE = 1; + protected static final int CHAR = 2; + protected static final int SHORT = 3; + protected static final int BOOLEAN = 4; + protected static final int INT = 5; + protected static final int LONG = 6; + protected static final int FLOAT = 7; + protected static final int DOUBLE = 8; + protected static final int PACKED = 9; + protected static final int INT2 = 10; + protected static final int SHORT_INT = 11; + protected static final int LONG_INT = 12; + protected static final int FLOAT_INT = 13; + protected static final int DOUBLE_INT = 14; + protected static final int FLOAT_COMPLEX = 15; + protected static final int DOUBLE_COMPLEX = 16; + + static + { + init(); + } + + private static native void init(); + + /* + * Constructor used in static initializer of 'MPI'. + * + * (Called before MPI.Init(), so cannot make any native MPI calls.) + * + * (Initialization done in separate 'setBasic', so can create + * datatype objects for 'BYTE', etc in static initializers invoked before + * MPI.Init(), then initialize objects after MPI initialized.) + */ + protected Datatype() + { + } + + protected void setBasic(int type) + { + baseType = type; + handle = getDatatype(type); + baseSize = type == NULL ? 0 : getSize(handle); + } + + protected void setBasic(int type, Datatype oldType) + { + baseType = oldType.baseType; + handle = getDatatype(type); + baseSize = oldType.baseSize; + } + + private static native long getDatatype(int type); + + /* + * Constructor used in 'create*' methods. + */ + private Datatype(Datatype oldType, long handle) + { + baseType = oldType.baseType; + baseSize = oldType.baseSize; + this.handle = handle; + } + + /* + * Constructor used in 'create*' methods. + */ + private Datatype(int baseType, int baseSize, long handle) + { + this.baseType = baseType; + this.baseSize = baseSize; + this.handle = handle; + } + + /** + * Returns the lower bound of a datatype. + *

Java binding of the MPI operation {@code MPI_TYPE_GET_EXTENT}. + * @return lower bound of datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getLb() throws MPIException + { + if(extent == 0) + getLbExtent(); + + return lb; + } + + /** + * Returns the extent of a datatype. + *

Java binding of the MPI operation {@code MPI_TYPE_GET_EXTENT}. + * @return datatype extent + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getExtent() throws MPIException + { + if(extent == 0) + getLbExtent(); + + return extent; + } + + private void getLbExtent() throws MPIException + { + MPI.check(); + int lbExt[] = new int[2]; + getLbExtent(handle, lbExt); + lb = lbExt[0] / baseSize; + extent = lbExt[1] / baseSize; + } + + private native void getLbExtent(long handle, int[] lbExt); + + /** + * Returns the true lower bound of a datatype. + *

Java binding of the MPI operation {@code MPI_TYPE_GET_TRUE_EXTENT}. + * @return lower bound of datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getTrueLb() throws MPIException + { + if(trueExtent == 0) + getTrueLbExtent(); + + return trueLb; + } + + /** + * Returns the true extent of a datatype. + *

Java binding of the MPI operation {@code MPI_TYPE_GET_TRUE_EXTENT}. + * @return datatype true extent + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getTrueExtent() throws MPIException + { + if(trueExtent == 0) + getTrueLbExtent(); + + return trueExtent; + } + + private void getTrueLbExtent() throws MPIException + { + MPI.check(); + int lbExt[] = new int[2]; + getTrueLbExtent(handle, lbExt); + trueLb = lbExt[0] / baseSize; + trueExtent = lbExt[1] / baseSize; + } + + private native void getTrueLbExtent(long handle, int[] lbExt); + + /** + * Returns the total size of a datatype - the number of buffer + * elements it represents. + *

Java binding of the MPI operation {@code MPI_TYPE_SIZE}. + * @return datatype size + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getSize() throws MPIException + { + MPI.check(); + return getSize(handle) / baseSize; + } + + private native int getSize(long type); + + /** + * Commits a derived datatype. + * Java binding of the MPI operation {@code MPI_TYPE_COMMIT}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void commit() throws MPIException + { + MPI.check(); + commit(handle); + } + + private native void commit(long type); + + /** + * Frees the datatype. + *

Java binding of the MPI operation {@code MPI_TYPE_FREE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public void free() throws MPIException + { + MPI.check(); + handle = free(handle); + } + + private native long free(long type) throws MPIException; + + /** + * Returns {@code true} if this datatype is MPI_DATATYPE_NULL. + * @return {@code true} if this datatype is MPI_DATATYPE_NULL + */ + public boolean isNull() + { + return handle == MPI.DATATYPE_NULL.handle; + } + + /** + * Java binding of {@code MPI_TYPE_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return new datatype + */ + @Override public Datatype clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * Java binding of {@code MPI_TYPE_DUP}. + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Datatype dup() throws MPIException + { + MPI.check(); + return new Datatype(this, dup(handle)); + } + + private native long dup(long type) throws MPIException; + + /** + * Construct new datatype representing replication of old datatype into + * contiguous locations. + *

Java binding of the MPI operation {@code MPI_TYPE_CONTIGUOUS}. + *

The base type of the new datatype is the same as the base type of + * {@code oldType}. + * @param count replication count + * @param oldType old datatype + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createContiguous(int count, Datatype oldType) + throws MPIException + { + MPI.check(); + return new Datatype(oldType, getContiguous(count, oldType.handle)); + } + + private static native long getContiguous(int count, long oldType); + + /** + * Construct new datatype representing replication of old datatype into + * locations that consist of equally spaced blocks. + *

Java binding of the MPI operation {@code MPI_TYPE_VECTOR}. + *

The base type of the new datatype is the same as the base type of + * {@code oldType}. + * @param count number of blocks + * @param blockLength number of elements in each block + * @param stride number of elements between start of each block + * @param oldType old datatype + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createVector(int count, int blockLength, + int stride, Datatype oldType) + throws MPIException + { + MPI.check(); + long handle = getVector(count, blockLength, stride, oldType.handle); + return new Datatype(oldType, handle); + } + + private static native long getVector( + int count, int blockLength, int stride, long oldType) + throws MPIException; + + /** + * Identical to {@code createVector} except that the stride is expressed + * directly in terms of the buffer index, rather than the units of + * the old type. + *

Java binding of the MPI operation {@code MPI_TYPE_HVECTOR}. + * @param count number of blocks + * @param blockLength number of elements in each + * @param stride number of bytes between start of each block + * @param oldType old datatype + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createHVector(int count, int blockLength, + int stride, Datatype oldType) + throws MPIException + { + MPI.check(); + long handle = getHVector(count, blockLength, stride, oldType.handle); + return new Datatype(oldType, handle); + } + + private static native long getHVector( + int count, int blockLength, int stride, long oldType) + throws MPIException; + + /** + * Construct new datatype representing replication of old datatype into + * a sequence of blocks where each block can contain a different number + * of copies and have a different displacement. + *

Java binding of the MPI operation {@code MPI_TYPE_INDEXED}. + *

The number of blocks is taken to be size of the {@code blockLengths} + * argument. The second argument, {@code displacements}, should be the + * same size. The base type of the new datatype is the same as the base + * type of {@code oldType}. + * @param blockLengths number of elements per block + * @param displacements displacement of each block in units of old type + * @param oldType old datatype + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createIndexed(int[] blockLengths, + int[] displacements, Datatype oldType) + throws MPIException + { + MPI.check(); + long handle = getIndexed(blockLengths, displacements, oldType.handle); + return new Datatype(oldType, handle); + } + + private static native long getIndexed( + int[] blockLengths, int[] displacements, long oldType) + throws MPIException; + + /** + * Identical to {@code createIndexed} except that the displacements are + * expressed directly in terms of the buffer index, rather than the + * units of the old type. + *

Java binding of the MPI operation {@code MPI_TYPE_HINDEXED}. + * @param blockLengths number of elements per block + * @param displacements byte displacement in buffer for each block + * @param oldType old datatype + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createHIndexed(int[] blockLengths, + int[] displacements, Datatype oldType) + throws MPIException + { + MPI.check(); + long handle = getHIndexed(blockLengths, displacements, oldType.handle); + return new Datatype(oldType, handle); + } + + private static native long getHIndexed( + int[] blockLengths, int[] displacements, long oldType) + throws MPIException; + + /** + * The most general type constructor. + *

Java binding of the MPI operation {@code MPI_TYPE_STRUCT}. + *

The number of blocks is taken to be size of the {@code blockLengths} + * argument. The second and third arguments, {@code displacements}, + * and {@code types}, should be the same size. + * @param blockLengths number of elements in each block + * @param displacements byte displacement of each block + * @param types type of elements in each block + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createStruct(int[] blockLengths, + int[] displacements, Datatype[] types) + throws MPIException + { + MPI.check(); + long handle = getStruct(blockLengths, displacements, types); + return new Datatype(MPI.BYTE, handle); + } + + private static native long getStruct( + int[] blockLengths, int[] displacements, Datatype[] types) + throws MPIException; + + /* + * JMS add proper documentation here + * JMS int != Aint! This needs to be fixed throughout. + */ + /** + * Create a datatype with a new lower bound and extent from an existing + * datatype. + *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_RESIZED}. + * @param oldType input datatype + * @param lb new lower bound of datatype (address integer) + * @param extent new extent of datatype (address integer) + * @return new datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Datatype createResized(Datatype oldType, int lb, int extent) + throws MPIException + { + MPI.check(); + long handle = getResized(oldType.handle, lb, extent); + return new Datatype(oldType, handle); + } + + private static native long getResized(long oldType, int lb, int extent); + + /** + * Sets the print name for the datatype. + * @param name name for the datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setName(String name) throws MPIException + { + MPI.check(); + setName(handle, name); + } + + private native void setName(long handle, String name) throws MPIException; + + /** + * Return the print name from the datatype. + * @return name of the datatype + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public String getName() throws MPIException + { + MPI.check(); + return getName(handle); + } + + private native String getName(long handle) throws MPIException; + + /** + * Create a new attribute key. + *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_KEYVAL}. + * @return attribute key for future access + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int createKeyval() throws MPIException + { + MPI.check(); + return createKeyval_jni(); + } + + private static native int createKeyval_jni() throws MPIException; + + /** + * Frees an attribute key. + *

Java binding of the MPI operation {@code MPI_TYPE_FREE_KEYVAL}. + * @param keyval attribute key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void freeKeyval(int keyval) throws MPIException + { + MPI.check(); + freeKeyval_jni(keyval); + } + + private static native void freeKeyval_jni(int keyval) throws MPIException; + + /** + * Stores attribute value associated with a key. + *

Java binding of the MPI operation {@code MPI_TYPE_SET_ATTR}. + * @param keyval attribute key + * @param value attribute value + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setAttr(int keyval, Object value) throws MPIException + { + MPI.check(); + setAttr(handle, keyval, MPI.attrSet(value)); + } + + private native void setAttr(long type, int keyval, byte[] value) + throws MPIException; + + /** + * Retrieves attribute value by key. + *

Java binding of the MPI operation {@code MPI_TYPE_GET_ATTR}. + * @param keyval attribute key + * @return attribute value or null if no attribute is associated with the key. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Object getAttr(int keyval) throws MPIException + { + MPI.check(); + Object obj = getAttr(handle, keyval); + return obj instanceof byte[] ? MPI.attrGet((byte[])obj) : obj; + } + + private native Object getAttr(long type, int keyval) throws MPIException; + + /** + * Deletes an attribute value associated with a key. + *

Java binding of the MPI operation {@code MPI_TYPE_DELETE_ATTR}. + * @param keyval attribute key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void deleteAttr(int keyval) throws MPIException + { + MPI.check(); + deleteAttr(handle, keyval); + } + + private native void deleteAttr(long type, int keyval) throws MPIException; + + /** + * Gets the offset of a buffer in bytes. + * @param buffer buffer + * @return offset in bytes + */ + protected int getOffset(Object buffer) + { + return baseSize * ((Buffer)buffer).arrayOffset(); + } } // Datatype diff --git a/ompi/mpi/java/java/DistGraphNeighbors.java b/ompi/mpi/java/java/DistGraphNeighbors.java index b8dc8e9391b..f10326a1aae 100644 --- a/ompi/mpi/java/java/DistGraphNeighbors.java +++ b/ompi/mpi/java/java/DistGraphNeighbors.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -23,85 +25,85 @@ */ public final class DistGraphNeighbors { -private final int[] sources, sourceWeights, destinations, destWeights; -private final boolean weighted; + private final int[] sources, sourceWeights, destinations, destWeights; + private final boolean weighted; -protected DistGraphNeighbors( - int[] sources, int[] sourceWeights, - int[] destinations, int[] destWeights, boolean weighted) -{ - this.sources = sources; - this.sourceWeights = sourceWeights; - this.destinations = destinations; - this.destWeights = destWeights; - this.weighted = weighted; -} + protected DistGraphNeighbors( + int[] sources, int[] sourceWeights, + int[] destinations, int[] destWeights, boolean weighted) + { + this.sources = sources; + this.sourceWeights = sourceWeights; + this.destinations = destinations; + this.destWeights = destWeights; + this.weighted = weighted; + } -/** - * Gets the number of edges into this process. - * @return number of edges into this process - */ -public int getInDegree() -{ - return sources.length; -} + /** + * Gets the number of edges into this process. + * @return number of edges into this process + */ + public int getInDegree() + { + return sources.length; + } -/** - * Gets the number of edges out of this process. - * @return number of edges out of this process - */ -public int getOutDegree() -{ - return destinations.length; -} + /** + * Gets the number of edges out of this process. + * @return number of edges out of this process + */ + public int getOutDegree() + { + return destinations.length; + } -/** - * Returns false if {@code MPI_UNWEIGHTED} was supplied during creation. - * @return false if {@code MPI_UNWEIGHTED} was supplied, true otherwise - */ -public boolean isWeighted() -{ - return weighted; -} + /** + * Returns false if {@code MPI_UNWEIGHTED} was supplied during creation. + * @return false if {@code MPI_UNWEIGHTED} was supplied, true otherwise + */ + public boolean isWeighted() + { + return weighted; + } -/** - * Gets a process for which the calling processs is a destination. - * @param i source index - * @return process for which the calling processs is a destination - */ -public int getSource(int i) -{ - return sources[i]; -} + /** + * Gets a process for which the calling processs is a destination. + * @param i source index + * @return process for which the calling processs is a destination + */ + public int getSource(int i) + { + return sources[i]; + } -/** - * Gets the weight of an edge into the calling process. - * @param i source index - * @return weight of the edge into the calling process - */ -public int getSourceWeight(int i) -{ - return sourceWeights[i]; -} + /** + * Gets the weight of an edge into the calling process. + * @param i source index + * @return weight of the edge into the calling process + */ + public int getSourceWeight(int i) + { + return sourceWeights[i]; + } -/** - * Gets a process for which the calling process is a source - * @param i destination index - * @return process for which the calling process is a source - */ -public int getDestination(int i) -{ - return destinations[i]; -} + /** + * Gets a process for which the calling process is a source + * @param i destination index + * @return process for which the calling process is a source + */ + public int getDestination(int i) + { + return destinations[i]; + } -/** - * Gets the weight of an edge out of the calling process. - * @param i destination index - * @return weight of an edge out of the calling process - */ -public int getDestinationWeight(int i) -{ - return destWeights[i]; -} + /** + * Gets the weight of an edge out of the calling process. + * @param i destination index + * @return weight of an edge out of the calling process + */ + public int getDestinationWeight(int i) + { + return destWeights[i]; + } } // DistGraphNeighbors diff --git a/ompi/mpi/java/java/DoubleComplex.java b/ompi/mpi/java/java/DoubleComplex.java index e9497e218ba..45a90ae2682 100644 --- a/ompi/mpi/java/java/DoubleComplex.java +++ b/ompi/mpi/java/java/DoubleComplex.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,124 +27,124 @@ */ public final class DoubleComplex { -private final int offset; -private final DoubleBuffer buffer; - -private DoubleComplex(DoubleBuffer buffer, int index) -{ - this.buffer = buffer; - this.offset = index * 2; -} - -/** - * Wraps a complex number stored in a buffer - * @param buffer buffer - * @return complex number - */ -public static DoubleComplex get(DoubleBuffer buffer) -{ - return new DoubleComplex(buffer, 0); -} - -/** - * Wraps the complex number at the specified position - * of an array of complex numbers stored in a buffer. - * @param buffer buffer - * @param index index - * @return complex number - */ -public static DoubleComplex get(DoubleBuffer buffer, int index) -{ - return new DoubleComplex(buffer, index); -} - -/** - * Wraps a complex number stored in the first two values of an array. - * @param array array - * @return complex number - */ -public static DoubleComplex get(double[] array) -{ - return new DoubleComplex(DoubleBuffer.wrap(array), 0); -} - -/** - * Wraps the complex number at the specified position of - * an array of complex numbers stored in an array of doubles. - * @param array array - * @param index index - * @return complex number - */ -public static DoubleComplex get(double[] array, int index) -{ - return new DoubleComplex(DoubleBuffer.wrap(array), index); -} - -/** - * Wraps a complex number stored in a buffer - * @param buffer buffer - * @return complex number - */ -public static DoubleComplex get(ByteBuffer buffer) -{ - return new DoubleComplex(buffer.asDoubleBuffer(), 0); -} - -/** - * Wraps the complex number at the specified position - * of an array of complex numbers stored in a buffer. - * @param buffer buffer - * @param index index - * @return complex number - */ -public static DoubleComplex get(ByteBuffer buffer, int index) -{ - return new DoubleComplex(buffer.asDoubleBuffer(), index); -} - -/** - * Gets the real value. - * @return real value - */ -public double getReal() -{ - return buffer.get(offset); -} - -/** - * Gets the imaginary value. - * @return imaginary value. - */ -public double getImag() -{ - return buffer.get(offset + 1); -} - -/** - * Puts the real value. - * @param real real value - */ -public void putReal(double real) -{ - buffer.put(offset, real); -} - -/** - * Puts the imaginary value. - * @param imag imaginary value - */ -public void putImag(double imag) -{ - buffer.put(offset + 1, imag); -} - -/** - * Gets the buffer where the complex number is stored. - * @return buffer where the complex number is stored - */ -public DoubleBuffer getBuffer() -{ - return offset == 0 ? buffer : MPI.slice(buffer, offset); -} + private final int offset; + private final DoubleBuffer buffer; + + private DoubleComplex(DoubleBuffer buffer, int index) + { + this.buffer = buffer; + this.offset = index * 2; + } + + /** + * Wraps a complex number stored in a buffer + * @param buffer buffer + * @return complex number + */ + public static DoubleComplex get(DoubleBuffer buffer) + { + return new DoubleComplex(buffer, 0); + } + + /** + * Wraps the complex number at the specified position + * of an array of complex numbers stored in a buffer. + * @param buffer buffer + * @param index index + * @return complex number + */ + public static DoubleComplex get(DoubleBuffer buffer, int index) + { + return new DoubleComplex(buffer, index); + } + + /** + * Wraps a complex number stored in the first two values of an array. + * @param array array + * @return complex number + */ + public static DoubleComplex get(double[] array) + { + return new DoubleComplex(DoubleBuffer.wrap(array), 0); + } + + /** + * Wraps the complex number at the specified position of + * an array of complex numbers stored in an array of doubles. + * @param array array + * @param index index + * @return complex number + */ + public static DoubleComplex get(double[] array, int index) + { + return new DoubleComplex(DoubleBuffer.wrap(array), index); + } + + /** + * Wraps a complex number stored in a buffer + * @param buffer buffer + * @return complex number + */ + public static DoubleComplex get(ByteBuffer buffer) + { + return new DoubleComplex(buffer.asDoubleBuffer(), 0); + } + + /** + * Wraps the complex number at the specified position + * of an array of complex numbers stored in a buffer. + * @param buffer buffer + * @param index index + * @return complex number + */ + public static DoubleComplex get(ByteBuffer buffer, int index) + { + return new DoubleComplex(buffer.asDoubleBuffer(), index); + } + + /** + * Gets the real value. + * @return real value + */ + public double getReal() + { + return buffer.get(offset); + } + + /** + * Gets the imaginary value. + * @return imaginary value. + */ + public double getImag() + { + return buffer.get(offset + 1); + } + + /** + * Puts the real value. + * @param real real value + */ + public void putReal(double real) + { + buffer.put(offset, real); + } + + /** + * Puts the imaginary value. + * @param imag imaginary value + */ + public void putImag(double imag) + { + buffer.put(offset + 1, imag); + } + + /** + * Gets the buffer where the complex number is stored. + * @return buffer where the complex number is stored + */ + public DoubleBuffer getBuffer() + { + return offset == 0 ? buffer : MPI.slice(buffer, offset); + } } // DoubleComplex diff --git a/ompi/mpi/java/java/DoubleInt.java b/ompi/mpi/java/java/DoubleInt.java index b122afc68b3..ace535d0bba 100644 --- a/ompi/mpi/java/java/DoubleInt.java +++ b/ompi/mpi/java/java/DoubleInt.java @@ -25,91 +25,91 @@ */ public final class DoubleInt extends Struct { -private final int iOff, iSize; + private final int iOff, iSize; -/** - * The struct object will be created only in MPI class. - * @param intOff int offset - * @param intSize int size - * @see MPI#doubleInt - */ -protected DoubleInt(int intOff, int intSize) -{ - int dOff = addDouble(); - assert dOff == 0; + /** + * The struct object will be created only in MPI class. + * @param intOff int offset + * @param intSize int size + * @see MPI#doubleInt + */ + protected DoubleInt(int intOff, int intSize) + { + int dOff = addDouble(); + assert dOff == 0; - iSize = intSize; - setOffset(intOff); + iSize = intSize; + setOffset(intOff); - switch(iSize) - { - case 4: iOff = addInt(); break; - case 8: iOff = addLong(); break; - default: throw new AssertionError("Unsupported int size: "+ iSize); - } + switch(iSize) + { + case 4: iOff = addInt(); break; + case 8: iOff = addLong(); break; + default: throw new AssertionError("Unsupported int size: "+ iSize); + } - assert(intOff == iOff); -} + assert(intOff == iOff); + } -/** - * Creates a Data object. - * @return new Data object. - */ -@Override protected DoubleInt.Data newData() -{ - return new DoubleInt.Data(); -} + /** + * Creates a Data object. + * @return new Data object. + */ + @Override protected DoubleInt.Data newData() + { + return new DoubleInt.Data(); + } -/** - * Class for reading/writing data in a struct stored in a byte buffer. - */ -public final class Data extends Struct.Data -{ - /** - * Gets the double value. - * @return double value - */ - public double getValue() - { - return getDouble(0); - } + /** + * Class for reading/writing data in a struct stored in a byte buffer. + */ + public final class Data extends Struct.Data + { + /** + * Gets the double value. + * @return double value + */ + public double getValue() + { + return getDouble(0); + } - /** - * Gets the int value. - * @return int value - */ - public int getIndex() - { - switch(iSize) - { - case 4: return getInt(iOff); - case 8: return (int)getLong(iOff); - default: throw new AssertionError(); - } - } + /** + * Gets the int value. + * @return int value + */ + public int getIndex() + { + switch(iSize) + { + case 4: return getInt(iOff); + case 8: return (int)getLong(iOff); + default: throw new AssertionError(); + } + } - /** - * Puts the double value. - * @param v double value - */ - public void putValue(double v) - { - putDouble(0, v); - } + /** + * Puts the double value. + * @param v double value + */ + public void putValue(double v) + { + putDouble(0, v); + } - /** - * Puts the int value. - * @param v int value - */ - public void putIndex(int v) - { - switch(iSize) - { - case 4: putInt(iOff, v); break; - case 8: putLong(iOff, v); break; - default: throw new AssertionError(); - } - } -} // Data + /** + * Puts the int value. + * @param v int value + */ + public void putIndex(int v) + { + switch(iSize) + { + case 4: putInt(iOff, v); break; + case 8: putLong(iOff, v); break; + default: throw new AssertionError(); + } + } + } // Data } // DoubleInt diff --git a/ompi/mpi/java/java/Errhandler.java b/ompi/mpi/java/java/Errhandler.java index b78efa2fefb..0df546ec7a3 100644 --- a/ompi/mpi/java/java/Errhandler.java +++ b/ompi/mpi/java/java/Errhandler.java @@ -9,31 +9,33 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Errhandler.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -50,14 +52,14 @@ */ public final class Errhandler { -protected long handle; + protected long handle; -protected static native long getFatal(); -protected static native long getReturn(); + protected static native long getFatal(); + protected static native long getReturn(); -protected Errhandler(long handle) -{ - this.handle = handle; -} + protected Errhandler(long handle) + { + this.handle = handle; + } } // Errhandler diff --git a/ompi/mpi/java/java/File.java b/ompi/mpi/java/java/File.java index 9777895af2c..259511f3bdb 100644 --- a/ompi/mpi/java/java/File.java +++ b/ompi/mpi/java/java/File.java @@ -16,8 +16,8 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * IMPLEMENTATION DETAILS * * All methods with buffers that can be direct or non direct have @@ -38,1200 +38,1200 @@ */ public final class File { -private long handle; -private FileView view = new FileView(0, MPI.BYTE, MPI.BYTE, "native"); -private Status beginStatus; - -/** - * Java binding of {@code MPI_FILE_OPEN} using {@code MPI_INFO_NULL}. - * @param comm communicator - * @param filename name of the file to open - * @param amode file access mode - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public File(Comm comm, String filename, int amode) throws MPIException -{ - MPI.check(); - handle = open(comm.handle, filename, amode, Info.NULL); -} - -/** - * Java binding of {@code MPI_FILE_OPEN}. - * @param comm communicator - * @param filename name of the file to open - * @param amode file access mode - * @param info info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public File(Comm comm, String filename, int amode, Info info) - throws MPIException -{ - MPI.check(); - handle = open(comm.handle, filename, amode, info.handle); -} - -private native long open(long comm, String filename, int amode, long info) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_CLOSE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void close() throws MPIException -{ - MPI.check(); - handle = close(handle); -} - -private native long close(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_DELETE} using {@code MPI_INFO_NULL}. - * @param filename name of the file to delete - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void delete(String filename) throws MPIException -{ - MPI.check(); - delete(filename, Info.NULL); -} - -/** - * Java binding of {@code MPI_FILE_DELETE}. - * @param filename name of the file to delete - * @param info info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void delete(String filename, Info info) throws MPIException -{ - MPI.check(); - delete(filename, info.handle); -} - -private static native void delete(String filename, long info) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SET_SIZE}. - * @param size size to truncate or expand file - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setSize(long size) throws MPIException -{ - MPI.check(); - setSize(handle, size); -} - -private native void setSize(long fh, long size) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_PREALLOCATE}. - * @param size size to preallocate file - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void preallocate(long size) throws MPIException -{ - MPI.check(); - preallocate(handle, size); -} - -private native void preallocate(long fh, long size) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_SIZE}. - * @return size of file in bytes - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public long getSize() throws MPIException -{ - MPI.check(); - return getSize(handle); -} - -private native long getSize(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_GROUP}. - * @return group wich opened the file - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group getGroup() throws MPIException -{ - MPI.check(); - return new Group(getGroup(handle)); -} - -private native long getGroup(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_AMODE}. - * @return file access mode to open the file - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getAMode() throws MPIException -{ - MPI.check(); - return getAMode(handle); -} - -private native int getAMode(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SET_INFO}. - * @param info info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setInfo(Info info) throws MPIException -{ - MPI.check(); - setInfo(handle, info.handle); -} - -private native void setInfo(long fh, long info) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_INFO}. - * @return new info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Info getInfo() throws MPIException -{ - MPI.check(); - return new Info(getInfo(handle)); -} - -private native long getInfo(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SET_VIEW} using {@code MPI_INFO_NULL}. - * @param disp displacement - * @param etype elementary datatype - * @param filetype filetype - * @param datarep data representation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setView(long disp, Datatype etype, - Datatype filetype, String datarep) - throws MPIException -{ - MPI.check(); - setView(handle, disp, etype.handle, filetype.handle, datarep, Info.NULL); - view = new FileView(disp, etype, filetype, datarep); -} - -/** - * Java binding of {@code MPI_FILE_SET_VIEW}. - * @param disp displacement - * @param etype elementary datatype - * @param filetype filetype - * @param datarep data representation - * @param info info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setView(long disp, Datatype etype, - Datatype filetype, String datarep, Info info) - throws MPIException -{ - MPI.check(); - setView(handle, disp, etype.handle, filetype.handle, datarep, info.handle); - view = new FileView(disp, etype, filetype, datarep); -} - -private native void setView( - long fh, long disp, long etype, - long filetype, String datarep, long info) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_VIEW}. - * @return file view - */ -public FileView getView() -{ - return view; -} - -/** - * Java binding of {@code MPI_FILE_READ_AT}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readAt(long offset, Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readAt(handle, offset, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void readAt( - long fh, long fileOffset, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_AT_ALL}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readAtAll(long offset, Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readAtAll(handle, offset, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void readAtAll( - long fh, long fileOffset, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_AT}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeAt(long offset, Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeAt(handle, offset, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void writeAt( - long fh, long fileOffset, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_AT_ALL}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeAtAll(long offset, Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeAtAll(handle, offset, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void writeAtAll( - long fh, long fileOffset, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_IREAD_AT}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request iReadAt(long offset, Buffer buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iReadAt(handle, offset, buf, count, type.handle)); -} - -private native long iReadAt( - long fh, long offset, Buffer buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_IWRITE_AT}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request iWriteAt(long offset, Buffer buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iWriteAt(handle, offset, buf, count, type.handle)); -} - -private native long iWriteAt( - long fh, long offset, Buffer buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status read(Object buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - read(handle, buf, db, off, count, type.handle, type.baseType, status.data); - return status; -} - -private native void read( - long fh, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_ALL}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readAll(Object buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readAll(handle, buf,db,off, count, type.handle, type.baseType, status.data); - return status; -} - -private native void readAll( - long fh, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status write(Object buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - write(handle, buf, db, off, count, type.handle, type.baseType, status.data); - return status; -} - -private native void write( - long fh, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_ALL}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeAll(Object buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeAll(handle, buf,db,off, count, type.handle,type.baseType, status.data); - return status; -} - -private native void writeAll( - long fh, Object buf, boolean db, int offset, - int count, long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_IREAD}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request iRead(Buffer buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iRead(handle, buf, count, type.handle)); -} - -private native long iRead(long fh, Buffer buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_IWRITE}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request iWrite(Buffer buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iWrite(handle, buf, count, type.handle)); -} - -private native long iWrite(long fh, Buffer buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SEEK}. - * @param offset file offset - * @param whence update mode - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void seek(long offset, int whence) throws MPIException -{ - MPI.check(); - seek(handle, offset, whence); -} - -private native void seek(long fh, long offset, int whence) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_POSITION}. - * @return offset of individual pointer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public long getPosition() throws MPIException -{ - MPI.check(); - return getPosition(handle); -} - -private native long getPosition(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_BYTE_OFFSET}. - * @param offset offset - * @return absolute byte position of offset - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public long getByteOffset(long offset) throws MPIException -{ - MPI.check(); - return getByteOffset(handle, offset); -} - -private native long getByteOffset(long fh, long offset) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_SHARED}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readShared(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readShared(handle, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void readShared( - long fh, Object buf, boolean db, int offset, int count, - long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_SHARED}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeShared(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeShared(handle, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void writeShared( - long fh, Object buf, boolean db, int offset, int count, - long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_IREAD_SHARED}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request iReadShared(Buffer buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iReadShared(handle, buf, count, type.handle)); -} - -private native long iReadShared(long fh, Buffer buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_IWRITE_SHARED}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request iWriteShared(Buffer buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(iWriteShared(handle, buf, count, type.handle)); -} - -private native long iWriteShared(long fh, Buffer buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_ORDERED}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readOrdered(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readOrdered(handle, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void readOrdered( - long fh, Object buf, boolean db, int offset, int count, - long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_ORDERED}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeOrdered(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeOrdered(handle, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native void writeOrdered( - long fh, Object buf, boolean db, int offset, int count, - long type, int baseType, long[] stat) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SEEK_SHARED}. - * @param offset file offset - * @param whence update mode - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void seekShared(long offset, int whence) throws MPIException -{ - MPI.check(); - seekShared(handle, offset, whence); -} - -private native void seekShared(long fh, long offset, int whence) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_GET_POSITION_SHARED}. - * @return offset of individual pointer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public long getPositionShared() throws MPIException -{ - MPI.check(); - return getPositionShared(handle); -} - -private native long getPositionShared(long fh) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_AT_ALL_BEGIN}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void readAtAllBegin(long offset, Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - readAtAllBegin(handle, offset, buf, count, type.handle); - } - else - { - int off = 0; - Status status = new Status(); - - if(isHeapBuffer(buf)) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readAtAll(handle, offset, buf, false, off, count, - type.handle, type.baseType, status.data); - - beginStatus = status; - } -} - -private native void readAtAllBegin( - long fh, long offset, Object buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_AT_ALL_END}. - * @param buf buffer - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readAtAllEnd(Object buf) throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - Status status = new Status(); - readAtAllEnd(handle, buf, status.data); - return status; - } - else - { - return getBeginStatus(); - } -} - -private native void readAtAllEnd(long fh, Object buf, long[] stat) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_AT_ALL_BEGIN}. - * @param offset file offset - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void writeAtAllBegin(long offset, Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - writeAtAllBegin(handle, offset, buf, count, type.handle); - } - else - { - int off = 0; - Status status = new Status(); - - if(isHeapBuffer(buf)) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeAtAll(handle, offset, buf, false, off, count, - type.handle, type.baseType, status.data); - - beginStatus = status; - } -} - -private native void writeAtAllBegin( - long fh, long fileOffset, Object buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_AT_ALL_END}. - * @param buf buffer - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeAtAllEnd(Object buf) throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - Status status = new Status(); - writeAtAllEnd(handle, buf, status.data); - return status; - } - else - { - return getBeginStatus(); - } -} - -private native void writeAtAllEnd(long fh, Object buf, long[] stat) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_ALL_BEGIN}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void readAllBegin(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - readAllBegin(handle, buf, count, type.handle); - } - else - { - int off = 0; - Status status = new Status(); - - if(isHeapBuffer(buf)) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readAll(handle, buf, false, off, count, - type.handle, type.baseType, status.data); - - beginStatus = status; - } -} - -private native void readAllBegin(long fh, Object buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_ALL_END}. - * @param buf buffer - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readAllEnd(Object buf) throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - Status status = new Status(); - readAllEnd(handle, buf, status.data); - return status; - } - else - { - return getBeginStatus(); - } -} - -private native void readAllEnd(long fh, Object buf, long[] stat) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_ALL_BEGIN}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void writeAllBegin(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - writeAllBegin(handle, buf, count, type.handle); - } - else - { - int off = 0; - Status status = new Status(); - - if(isHeapBuffer(buf)) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeAll(handle, buf, false, off, count, - type.handle, type.baseType, status.data); - - beginStatus = status; - } -} - -private native void writeAllBegin(long fh, Object buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_ALL_END}. - * @param buf buffer - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeAllEnd(Object buf) throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - Status status = new Status(); - writeAllEnd(handle, buf, status.data); - return status; - } - else - { - return getBeginStatus(); - } -} - -private native void writeAllEnd(long fh, Object buf, long[] stat) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_ORDERED_BEGIN}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void readOrderedBegin(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - readOrderedBegin(handle, buf, count, type.handle); - } - else - { - int off = 0; - Status status = new Status(); - - if(isHeapBuffer(buf)) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - readOrdered(handle, buf, false, off, count, - type.handle, type.baseType, status.data); - - beginStatus = status; - } -} - -private native void readOrderedBegin(long fh, Object buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_READ_ORDERED_END}. - * @param buf buffer - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status readOrderedEnd(Object buf) throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - Status status = new Status(); - readOrderedEnd(handle, buf, status.data); - return status; - } - else - { - return getBeginStatus(); - } -} - -private native void readOrderedEnd(long fh, Object buf, long[] stat) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_ORDERED_BEGIN}. - * @param buf buffer - * @param count number of items in buffer - * @param type datatype of each buffer element - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void writeOrderedBegin(Object buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - writeOrderedBegin(handle, buf, count, type.handle); - } - else - { - int off = 0; - Status status = new Status(); - - if(isHeapBuffer(buf)) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - writeOrdered(handle, buf, false, off, count, - type.handle, type.baseType, status.data); - - beginStatus = status; - } -} - -private native void writeOrderedBegin(long fh, Object buf, int count, long type) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_WRITE_ORDERED_END}. - * @param buf buffer - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status writeOrderedEnd(Object buf) throws MPIException -{ - MPI.check(); - - if(isDirectBuffer(buf)) - { - Status status = new Status(); - writeOrderedEnd(handle, buf, status.data); - return status; - } - else - { - return getBeginStatus(); - } -} - -private native void writeOrderedEnd(long fh, Object buf, long[] stat) - throws MPIException; - -private Status getBeginStatus() -{ - Status s = beginStatus; - beginStatus = null; - return s; -} - -/** - * Java binding of {@code MPI_FILE_GET_TYPE_EXTENT}. - * @param type type of data - * @return datatype extent - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getTypeExtent(Datatype type) throws MPIException -{ - MPI.check(); - return getTypeExtent(handle, type.handle) / type.baseSize; -} - -private native int getTypeExtent(long fh, long type) throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SET_ATOMICITY}. - * @param atomicity true to set atomic mode, false to set nonatomic mode - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setAtomicity(boolean atomicity) throws MPIException -{ - MPI.check(); - setAtomicity(handle, atomicity); -} - -private native void setAtomicity(long fh, boolean atomicity) - throws MPIException; - -/** - * Java binding of {@code MPI_FILE_SYNC}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void sync() throws MPIException -{ - MPI.check(); - sync(handle); -} - -private native void sync(long handle) throws MPIException; + private long handle; + private FileView view = new FileView(0, MPI.BYTE, MPI.BYTE, "native"); + private Status beginStatus; + + /** + * Java binding of {@code MPI_FILE_OPEN} using {@code MPI_INFO_NULL}. + * @param comm communicator + * @param filename name of the file to open + * @param amode file access mode + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public File(Comm comm, String filename, int amode) throws MPIException + { + MPI.check(); + handle = open(comm.handle, filename, amode, Info.NULL); + } + + /** + * Java binding of {@code MPI_FILE_OPEN}. + * @param comm communicator + * @param filename name of the file to open + * @param amode file access mode + * @param info info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public File(Comm comm, String filename, int amode, Info info) + throws MPIException + { + MPI.check(); + handle = open(comm.handle, filename, amode, info.handle); + } + + private native long open(long comm, String filename, int amode, long info) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_CLOSE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void close() throws MPIException + { + MPI.check(); + handle = close(handle); + } + + private native long close(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_DELETE} using {@code MPI_INFO_NULL}. + * @param filename name of the file to delete + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void delete(String filename) throws MPIException + { + MPI.check(); + delete(filename, Info.NULL); + } + + /** + * Java binding of {@code MPI_FILE_DELETE}. + * @param filename name of the file to delete + * @param info info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void delete(String filename, Info info) throws MPIException + { + MPI.check(); + delete(filename, info.handle); + } + + private static native void delete(String filename, long info) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SET_SIZE}. + * @param size size to truncate or expand file + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setSize(long size) throws MPIException + { + MPI.check(); + setSize(handle, size); + } + + private native void setSize(long fh, long size) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_PREALLOCATE}. + * @param size size to preallocate file + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void preallocate(long size) throws MPIException + { + MPI.check(); + preallocate(handle, size); + } + + private native void preallocate(long fh, long size) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_SIZE}. + * @return size of file in bytes + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public long getSize() throws MPIException + { + MPI.check(); + return getSize(handle); + } + + private native long getSize(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_GROUP}. + * @return group wich opened the file + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group getGroup() throws MPIException + { + MPI.check(); + return new Group(getGroup(handle)); + } + + private native long getGroup(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_AMODE}. + * @return file access mode to open the file + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getAMode() throws MPIException + { + MPI.check(); + return getAMode(handle); + } + + private native int getAMode(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SET_INFO}. + * @param info info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setInfo(Info info) throws MPIException + { + MPI.check(); + setInfo(handle, info.handle); + } + + private native void setInfo(long fh, long info) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_INFO}. + * @return new info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Info getInfo() throws MPIException + { + MPI.check(); + return new Info(getInfo(handle)); + } + + private native long getInfo(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SET_VIEW} using {@code MPI_INFO_NULL}. + * @param disp displacement + * @param etype elementary datatype + * @param filetype filetype + * @param datarep data representation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setView(long disp, Datatype etype, + Datatype filetype, String datarep) + throws MPIException + { + MPI.check(); + setView(handle, disp, etype.handle, filetype.handle, datarep, Info.NULL); + view = new FileView(disp, etype, filetype, datarep); + } + + /** + * Java binding of {@code MPI_FILE_SET_VIEW}. + * @param disp displacement + * @param etype elementary datatype + * @param filetype filetype + * @param datarep data representation + * @param info info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setView(long disp, Datatype etype, + Datatype filetype, String datarep, Info info) + throws MPIException + { + MPI.check(); + setView(handle, disp, etype.handle, filetype.handle, datarep, info.handle); + view = new FileView(disp, etype, filetype, datarep); + } + + private native void setView( + long fh, long disp, long etype, + long filetype, String datarep, long info) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_VIEW}. + * @return file view + */ + public FileView getView() + { + return view; + } + + /** + * Java binding of {@code MPI_FILE_READ_AT}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readAt(long offset, Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readAt(handle, offset, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void readAt( + long fh, long fileOffset, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_AT_ALL}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readAtAll(long offset, Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readAtAll(handle, offset, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void readAtAll( + long fh, long fileOffset, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_AT}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeAt(long offset, Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeAt(handle, offset, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void writeAt( + long fh, long fileOffset, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_AT_ALL}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeAtAll(long offset, Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeAtAll(handle, offset, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void writeAtAll( + long fh, long fileOffset, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_IREAD_AT}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request iReadAt(long offset, Buffer buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iReadAt(handle, offset, buf, count, type.handle)); + } + + private native long iReadAt( + long fh, long offset, Buffer buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_IWRITE_AT}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request iWriteAt(long offset, Buffer buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iWriteAt(handle, offset, buf, count, type.handle)); + } + + private native long iWriteAt( + long fh, long offset, Buffer buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status read(Object buf, int count, Datatype type) throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + read(handle, buf, db, off, count, type.handle, type.baseType, status.data); + return status; + } + + private native void read( + long fh, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_ALL}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readAll(Object buf, int count, Datatype type) throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readAll(handle, buf,db,off, count, type.handle, type.baseType, status.data); + return status; + } + + private native void readAll( + long fh, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status write(Object buf, int count, Datatype type) throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + write(handle, buf, db, off, count, type.handle, type.baseType, status.data); + return status; + } + + private native void write( + long fh, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_ALL}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeAll(Object buf, int count, Datatype type) throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeAll(handle, buf,db,off, count, type.handle,type.baseType, status.data); + return status; + } + + private native void writeAll( + long fh, Object buf, boolean db, int offset, + int count, long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_IREAD}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request iRead(Buffer buf, int count, Datatype type) throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iRead(handle, buf, count, type.handle)); + } + + private native long iRead(long fh, Buffer buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_IWRITE}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request iWrite(Buffer buf, int count, Datatype type) throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iWrite(handle, buf, count, type.handle)); + } + + private native long iWrite(long fh, Buffer buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SEEK}. + * @param offset file offset + * @param whence update mode + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void seek(long offset, int whence) throws MPIException + { + MPI.check(); + seek(handle, offset, whence); + } + + private native void seek(long fh, long offset, int whence) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_POSITION}. + * @return offset of individual pointer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public long getPosition() throws MPIException + { + MPI.check(); + return getPosition(handle); + } + + private native long getPosition(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_BYTE_OFFSET}. + * @param offset offset + * @return absolute byte position of offset + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public long getByteOffset(long offset) throws MPIException + { + MPI.check(); + return getByteOffset(handle, offset); + } + + private native long getByteOffset(long fh, long offset) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_SHARED}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readShared(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readShared(handle, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void readShared( + long fh, Object buf, boolean db, int offset, int count, + long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_SHARED}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeShared(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeShared(handle, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void writeShared( + long fh, Object buf, boolean db, int offset, int count, + long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_IREAD_SHARED}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request iReadShared(Buffer buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iReadShared(handle, buf, count, type.handle)); + } + + private native long iReadShared(long fh, Buffer buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_IWRITE_SHARED}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request iWriteShared(Buffer buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(iWriteShared(handle, buf, count, type.handle)); + } + + private native long iWriteShared(long fh, Buffer buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_ORDERED}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readOrdered(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readOrdered(handle, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void readOrdered( + long fh, Object buf, boolean db, int offset, int count, + long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_ORDERED}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeOrdered(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeOrdered(handle, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native void writeOrdered( + long fh, Object buf, boolean db, int offset, int count, + long type, int baseType, long[] stat) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SEEK_SHARED}. + * @param offset file offset + * @param whence update mode + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void seekShared(long offset, int whence) throws MPIException + { + MPI.check(); + seekShared(handle, offset, whence); + } + + private native void seekShared(long fh, long offset, int whence) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_GET_POSITION_SHARED}. + * @return offset of individual pointer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public long getPositionShared() throws MPIException + { + MPI.check(); + return getPositionShared(handle); + } + + private native long getPositionShared(long fh) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_AT_ALL_BEGIN}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void readAtAllBegin(long offset, Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + readAtAllBegin(handle, offset, buf, count, type.handle); + } + else + { + int off = 0; + Status status = new Status(); + + if(isHeapBuffer(buf)) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readAtAll(handle, offset, buf, false, off, count, + type.handle, type.baseType, status.data); + + beginStatus = status; + } + } + + private native void readAtAllBegin( + long fh, long offset, Object buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_AT_ALL_END}. + * @param buf buffer + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readAtAllEnd(Object buf) throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + Status status = new Status(); + readAtAllEnd(handle, buf, status.data); + return status; + } + else + { + return getBeginStatus(); + } + } + + private native void readAtAllEnd(long fh, Object buf, long[] stat) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_AT_ALL_BEGIN}. + * @param offset file offset + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void writeAtAllBegin(long offset, Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + writeAtAllBegin(handle, offset, buf, count, type.handle); + } + else + { + int off = 0; + Status status = new Status(); + + if(isHeapBuffer(buf)) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeAtAll(handle, offset, buf, false, off, count, + type.handle, type.baseType, status.data); + + beginStatus = status; + } + } + + private native void writeAtAllBegin( + long fh, long fileOffset, Object buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_AT_ALL_END}. + * @param buf buffer + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeAtAllEnd(Object buf) throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + Status status = new Status(); + writeAtAllEnd(handle, buf, status.data); + return status; + } + else + { + return getBeginStatus(); + } + } + + private native void writeAtAllEnd(long fh, Object buf, long[] stat) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_ALL_BEGIN}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void readAllBegin(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + readAllBegin(handle, buf, count, type.handle); + } + else + { + int off = 0; + Status status = new Status(); + + if(isHeapBuffer(buf)) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readAll(handle, buf, false, off, count, + type.handle, type.baseType, status.data); + + beginStatus = status; + } + } + + private native void readAllBegin(long fh, Object buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_ALL_END}. + * @param buf buffer + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readAllEnd(Object buf) throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + Status status = new Status(); + readAllEnd(handle, buf, status.data); + return status; + } + else + { + return getBeginStatus(); + } + } + + private native void readAllEnd(long fh, Object buf, long[] stat) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_ALL_BEGIN}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void writeAllBegin(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + writeAllBegin(handle, buf, count, type.handle); + } + else + { + int off = 0; + Status status = new Status(); + + if(isHeapBuffer(buf)) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeAll(handle, buf, false, off, count, + type.handle, type.baseType, status.data); + + beginStatus = status; + } + } + + private native void writeAllBegin(long fh, Object buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_ALL_END}. + * @param buf buffer + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeAllEnd(Object buf) throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + Status status = new Status(); + writeAllEnd(handle, buf, status.data); + return status; + } + else + { + return getBeginStatus(); + } + } + + private native void writeAllEnd(long fh, Object buf, long[] stat) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_ORDERED_BEGIN}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void readOrderedBegin(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + readOrderedBegin(handle, buf, count, type.handle); + } + else + { + int off = 0; + Status status = new Status(); + + if(isHeapBuffer(buf)) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + readOrdered(handle, buf, false, off, count, + type.handle, type.baseType, status.data); + + beginStatus = status; + } + } + + private native void readOrderedBegin(long fh, Object buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_READ_ORDERED_END}. + * @param buf buffer + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status readOrderedEnd(Object buf) throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + Status status = new Status(); + readOrderedEnd(handle, buf, status.data); + return status; + } + else + { + return getBeginStatus(); + } + } + + private native void readOrderedEnd(long fh, Object buf, long[] stat) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_ORDERED_BEGIN}. + * @param buf buffer + * @param count number of items in buffer + * @param type datatype of each buffer element + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void writeOrderedBegin(Object buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + writeOrderedBegin(handle, buf, count, type.handle); + } + else + { + int off = 0; + Status status = new Status(); + + if(isHeapBuffer(buf)) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + writeOrdered(handle, buf, false, off, count, + type.handle, type.baseType, status.data); + + beginStatus = status; + } + } + + private native void writeOrderedBegin(long fh, Object buf, int count, long type) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_WRITE_ORDERED_END}. + * @param buf buffer + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status writeOrderedEnd(Object buf) throws MPIException + { + MPI.check(); + + if(isDirectBuffer(buf)) + { + Status status = new Status(); + writeOrderedEnd(handle, buf, status.data); + return status; + } + else + { + return getBeginStatus(); + } + } + + private native void writeOrderedEnd(long fh, Object buf, long[] stat) + throws MPIException; + + private Status getBeginStatus() + { + Status s = beginStatus; + beginStatus = null; + return s; + } + + /** + * Java binding of {@code MPI_FILE_GET_TYPE_EXTENT}. + * @param type type of data + * @return datatype extent + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getTypeExtent(Datatype type) throws MPIException + { + MPI.check(); + return getTypeExtent(handle, type.handle) / type.baseSize; + } + + private native int getTypeExtent(long fh, long type) throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SET_ATOMICITY}. + * @param atomicity true to set atomic mode, false to set nonatomic mode + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setAtomicity(boolean atomicity) throws MPIException + { + MPI.check(); + setAtomicity(handle, atomicity); + } + + private native void setAtomicity(long fh, boolean atomicity) + throws MPIException; + + /** + * Java binding of {@code MPI_FILE_SYNC}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void sync() throws MPIException + { + MPI.check(); + sync(handle); + } + + private native void sync(long handle) throws MPIException; } // File diff --git a/ompi/mpi/java/java/FileView.java b/ompi/mpi/java/java/FileView.java index 1b854248a31..7fc96feb05b 100644 --- a/ompi/mpi/java/java/FileView.java +++ b/ompi/mpi/java/java/FileView.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -23,59 +25,59 @@ */ public final class FileView { -private final long disp; -private final Datatype etype, filetype; -private final String datarep; + private final long disp; + private final Datatype etype, filetype; + private final String datarep; -/** - * Constructs a file view. - * @param disp displacement - * @param etype elementary datatype - * @param filetype file type - * @param datarep data representation - */ -public FileView(long disp, Datatype etype, Datatype filetype, String datarep) -{ - this.disp = disp; - this.etype = etype; - this.filetype = filetype; - this.datarep = datarep; -} + /** + * Constructs a file view. + * @param disp displacement + * @param etype elementary datatype + * @param filetype file type + * @param datarep data representation + */ + public FileView(long disp, Datatype etype, Datatype filetype, String datarep) + { + this.disp = disp; + this.etype = etype; + this.filetype = filetype; + this.datarep = datarep; + } -/** - * Gets the displacement. - * @return displacement - */ -public long getDisp() -{ - return disp; -} + /** + * Gets the displacement. + * @return displacement + */ + public long getDisp() + { + return disp; + } -/** - * Gets the elementary datatype. - * @return elementary datatype - */ -public Datatype getEType() -{ - return etype; -} + /** + * Gets the elementary datatype. + * @return elementary datatype + */ + public Datatype getEType() + { + return etype; + } -/** - * Gets the file type. - * @return file type - */ -public Datatype getFileType() -{ - return filetype; -} + /** + * Gets the file type. + * @return file type + */ + public Datatype getFileType() + { + return filetype; + } -/** - * Gets the data representation. - * @return data representation - */ -public String getDataRep() -{ - return datarep; -} + /** + * Gets the data representation. + * @return data representation + */ + public String getDataRep() + { + return datarep; + } } // FileView diff --git a/ompi/mpi/java/java/FloatComplex.java b/ompi/mpi/java/java/FloatComplex.java index 9e7d527f74f..a347a76be43 100644 --- a/ompi/mpi/java/java/FloatComplex.java +++ b/ompi/mpi/java/java/FloatComplex.java @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,124 +27,124 @@ */ public final class FloatComplex { -private final int offset; -private final FloatBuffer buffer; - -private FloatComplex(FloatBuffer buffer, int index) -{ - this.buffer = buffer; - this.offset = index * 2; -} - -/** - * Wraps a complex number stored in a buffer - * @param buffer buffer - * @return complex number - */ -public static FloatComplex get(FloatBuffer buffer) -{ - return new FloatComplex(buffer, 0); -} - -/** - * Wraps the complex number at the specified position - * of an array of complex numbers stored in a buffer. - * @param buffer buffer - * @param index index - * @return complex number - */ -public static FloatComplex get(FloatBuffer buffer, int index) -{ - return new FloatComplex(buffer, index); -} - -/** - * Wraps a complex number stored in the first two values of an array. - * @param array array - * @return complex number - */ -public static FloatComplex get(float[] array) -{ - return new FloatComplex(FloatBuffer.wrap(array), 0); -} - -/** - * Wraps the complex number at the specified position of - * an array of complex numbers stored in an array of floats. - * @param array array - * @param index index - * @return complex number - */ -public static FloatComplex get(float[] array, int index) -{ - return new FloatComplex(FloatBuffer.wrap(array), index); -} - -/** - * Wraps a complex number stored in a buffer - * @param buffer buffer - * @return complex number - */ -public static FloatComplex get(ByteBuffer buffer) -{ - return new FloatComplex(buffer.asFloatBuffer(), 0); -} - -/** - * Wraps the complex number at the specified position - * of an array of complex numbers stored in a buffer. - * @param buffer buffer - * @param index index - * @return complex number - */ -public static FloatComplex get(ByteBuffer buffer, int index) -{ - return new FloatComplex(buffer.asFloatBuffer(), index); -} - -/** - * Gets the real value. - * @return real value - */ -public float getReal() -{ - return buffer.get(offset); -} - -/** - * Gets the imaginary value. - * @return imaginary value. - */ -public float getImag() -{ - return buffer.get(offset + 1); -} - -/** - * Puts the real value. - * @param real real value - */ -public void putReal(float real) -{ - buffer.put(offset, real); -} - -/** - * Puts the imaginary value. - * @param imag imaginary value - */ -public void putImag(float imag) -{ - buffer.put(offset + 1, imag); -} - -/** - * Gets the buffer where the complex number is stored. - * @return buffer where the complex number is stored - */ -public FloatBuffer getBuffer() -{ - return offset == 0 ? buffer : MPI.slice(buffer, offset); -} + private final int offset; + private final FloatBuffer buffer; + + private FloatComplex(FloatBuffer buffer, int index) + { + this.buffer = buffer; + this.offset = index * 2; + } + + /** + * Wraps a complex number stored in a buffer + * @param buffer buffer + * @return complex number + */ + public static FloatComplex get(FloatBuffer buffer) + { + return new FloatComplex(buffer, 0); + } + + /** + * Wraps the complex number at the specified position + * of an array of complex numbers stored in a buffer. + * @param buffer buffer + * @param index index + * @return complex number + */ + public static FloatComplex get(FloatBuffer buffer, int index) + { + return new FloatComplex(buffer, index); + } + + /** + * Wraps a complex number stored in the first two values of an array. + * @param array array + * @return complex number + */ + public static FloatComplex get(float[] array) + { + return new FloatComplex(FloatBuffer.wrap(array), 0); + } + + /** + * Wraps the complex number at the specified position of + * an array of complex numbers stored in an array of floats. + * @param array array + * @param index index + * @return complex number + */ + public static FloatComplex get(float[] array, int index) + { + return new FloatComplex(FloatBuffer.wrap(array), index); + } + + /** + * Wraps a complex number stored in a buffer + * @param buffer buffer + * @return complex number + */ + public static FloatComplex get(ByteBuffer buffer) + { + return new FloatComplex(buffer.asFloatBuffer(), 0); + } + + /** + * Wraps the complex number at the specified position + * of an array of complex numbers stored in a buffer. + * @param buffer buffer + * @param index index + * @return complex number + */ + public static FloatComplex get(ByteBuffer buffer, int index) + { + return new FloatComplex(buffer.asFloatBuffer(), index); + } + + /** + * Gets the real value. + * @return real value + */ + public float getReal() + { + return buffer.get(offset); + } + + /** + * Gets the imaginary value. + * @return imaginary value. + */ + public float getImag() + { + return buffer.get(offset + 1); + } + + /** + * Puts the real value. + * @param real real value + */ + public void putReal(float real) + { + buffer.put(offset, real); + } + + /** + * Puts the imaginary value. + * @param imag imaginary value + */ + public void putImag(float imag) + { + buffer.put(offset + 1, imag); + } + + /** + * Gets the buffer where the complex number is stored. + * @return buffer where the complex number is stored + */ + public FloatBuffer getBuffer() + { + return offset == 0 ? buffer : MPI.slice(buffer, offset); + } } // FloatComplex diff --git a/ompi/mpi/java/java/FloatInt.java b/ompi/mpi/java/java/FloatInt.java index b2c0a584f3f..f01cb3d3169 100644 --- a/ompi/mpi/java/java/FloatInt.java +++ b/ompi/mpi/java/java/FloatInt.java @@ -25,91 +25,91 @@ */ public final class FloatInt extends Struct { -private final int iOff, iSize; + private final int iOff, iSize; -/** - * The struct object will be created only in MPI class. - * @param intOff int offset - * @param intSize int size - * @see MPI#floatInt - */ -protected FloatInt(int intOff, int intSize) -{ - int fOff = addFloat(); - assert fOff == 0; + /** + * The struct object will be created only in MPI class. + * @param intOff int offset + * @param intSize int size + * @see MPI#floatInt + */ + protected FloatInt(int intOff, int intSize) + { + int fOff = addFloat(); + assert fOff == 0; - iSize = intSize; - setOffset(intOff); + iSize = intSize; + setOffset(intOff); - switch(iSize) - { - case 4: iOff = addInt(); break; - case 8: iOff = addLong(); break; - default: throw new AssertionError("Unsupported int size: "+ iSize); - } + switch(iSize) + { + case 4: iOff = addInt(); break; + case 8: iOff = addLong(); break; + default: throw new AssertionError("Unsupported int size: "+ iSize); + } - assert(intOff == iOff); -} + assert(intOff == iOff); + } -/** - * Creates a Data object. - * @return new Data object. - */ -@Override protected Data newData() -{ - return new Data(); -} + /** + * Creates a Data object. + * @return new Data object. + */ + @Override protected Data newData() + { + return new Data(); + } -/** - * Class for reading/writing data in a struct stored in a byte buffer. - */ -public final class Data extends Struct.Data -{ - /** - * Gets the float value. - * @return float value - */ - public float getValue() - { - return getFloat(0); - } + /** + * Class for reading/writing data in a struct stored in a byte buffer. + */ + public final class Data extends Struct.Data + { + /** + * Gets the float value. + * @return float value + */ + public float getValue() + { + return getFloat(0); + } - /** - * Gets the int value. - * @return int value - */ - public int getIndex() - { - switch(iSize) - { - case 4: return getInt(iOff); - case 8: return (int)getLong(iOff); - default: throw new AssertionError(); - } - } + /** + * Gets the int value. + * @return int value + */ + public int getIndex() + { + switch(iSize) + { + case 4: return getInt(iOff); + case 8: return (int)getLong(iOff); + default: throw new AssertionError(); + } + } - /** - * Puts the float value. - * @param v float value - */ - public void putValue(float v) - { - putFloat(0, v); - } + /** + * Puts the float value. + * @param v float value + */ + public void putValue(float v) + { + putFloat(0, v); + } - /** - * Puts the int value. - * @param v int value - */ - public void putIndex(int v) - { - switch(iSize) - { - case 4: putInt(iOff, v); break; - case 8: putLong(iOff, v); break; - default: throw new AssertionError(); - } - } -} // Data + /** + * Puts the int value. + * @param v int value + */ + public void putIndex(int v) + { + switch(iSize) + { + case 4: putInt(iOff, v); break; + case 8: putLong(iOff, v); break; + default: throw new AssertionError(); + } + } + } // Data } // FloatInt diff --git a/ompi/mpi/java/java/Freeable.java b/ompi/mpi/java/java/Freeable.java index e889720ccfe..3b03125a816 100644 --- a/ompi/mpi/java/java/Freeable.java +++ b/ompi/mpi/java/java/Freeable.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Freeable.java * Author : Bryan Carpenter * Created : Wed Jan 15 23:14:43 EST 2003 @@ -50,10 +50,10 @@ */ public interface Freeable { - /** - * Frees a freeable object. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - void free() throws MPIException; + /** + * Frees a freeable object. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + void free() throws MPIException; } diff --git a/ompi/mpi/java/java/GraphComm.java b/ompi/mpi/java/java/GraphComm.java index d40d21422d8..b69d529a47f 100644 --- a/ompi/mpi/java/java/GraphComm.java +++ b/ompi/mpi/java/java/GraphComm.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Graphcomm.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -52,132 +52,132 @@ */ public final class GraphComm extends Intracomm { -static -{ - init(); -} - -private static native void init(); - -protected GraphComm(long handle) throws MPIException -{ - super(handle); -} - -protected GraphComm(long[] commRequest) -{ - super(commRequest); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return copy of this communicator - */ -@Override public GraphComm clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public GraphComm dup() throws MPIException -{ - MPI.check(); - return new GraphComm(dup(handle)); -} - -/** - * Duplicates this communicator. - *

The new communicator can't be used before the operation completes. - * The request object must be obtained calling {@link #getRequest}. - *

Java binding of {@code MPI_COMM_IDUP}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public GraphComm iDup() throws MPIException -{ - MPI.check(); - return new GraphComm(iDup(handle)); -} - -/** - * Returns graph topology information. - *

Java binding of the MPI operations {@code MPI_GRAPHDIMS_GET} - * and {@code MPI_GRAPH_GET}. - *

The number of nodes and number of edges can be extracted - * from the sizes of the {@code index} and {@code edges} fields - * of the returned object. - * @return object defining node degress and edges of graph - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public GraphParms getDims() throws MPIException -{ - MPI.check(); - return getDims(handle); -} - -private native GraphParms getDims(long comm) throws MPIException; - -/** - * Provides adjacency information for general graph topology. - *

Java binding of the MPI operations {@code MPI_GRAPH_NEIGHBORS_COUNT} - * and {@code MPI_GRAPH_NEIGHBORS}. - *

The number of neighbors can be extracted from the size of the result. - * @param rank rank of a process in the group of this communicator - * @return array of ranks of neighbouring processes to one specified - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int[] getNeighbors(int rank) throws MPIException -{ - MPI.check(); - return getNeighbors(handle, rank); -} - -private native int[] getNeighbors(long comm, int rank) throws MPIException; - -/** - * Gets the adjacency information for a distributed graph topology. - * @return adjacency information for a distributed graph topology - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public DistGraphNeighbors getDistGraphNeighbors() throws MPIException -{ - MPI.check(); - return getDistGraphNeighbors(handle); -} - -private native DistGraphNeighbors getDistGraphNeighbors(long comm) - throws MPIException; - -/** - * Compute an optimal placement. - *

Java binding of the MPI operation {@code MPI_GRAPH_MAP}. - *

The number of nodes is taken to be size of the {@code index} argument. - * @param index node degrees - * @param edges graph edges - * @return reordered rank of calling process - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int map(int[] index, int[] edges) throws MPIException -{ - MPI.check(); - return map(handle, index, edges); -} - -private native int map(long comm, int[] index, int[] edges) throws MPIException; + static + { + init(); + } + + private static native void init(); + + protected GraphComm(long handle) throws MPIException + { + super(handle); + } + + protected GraphComm(long[] commRequest) + { + super(commRequest); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return copy of this communicator + */ + @Override public GraphComm clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public GraphComm dup() throws MPIException + { + MPI.check(); + return new GraphComm(dup(handle)); + } + + /** + * Duplicates this communicator. + *

The new communicator can't be used before the operation completes. + * The request object must be obtained calling {@link #getRequest}. + *

Java binding of {@code MPI_COMM_IDUP}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public GraphComm iDup() throws MPIException + { + MPI.check(); + return new GraphComm(iDup(handle)); + } + + /** + * Returns graph topology information. + *

Java binding of the MPI operations {@code MPI_GRAPHDIMS_GET} + * and {@code MPI_GRAPH_GET}. + *

The number of nodes and number of edges can be extracted + * from the sizes of the {@code index} and {@code edges} fields + * of the returned object. + * @return object defining node degress and edges of graph + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public GraphParms getDims() throws MPIException + { + MPI.check(); + return getDims(handle); + } + + private native GraphParms getDims(long comm) throws MPIException; + + /** + * Provides adjacency information for general graph topology. + *

Java binding of the MPI operations {@code MPI_GRAPH_NEIGHBORS_COUNT} + * and {@code MPI_GRAPH_NEIGHBORS}. + *

The number of neighbors can be extracted from the size of the result. + * @param rank rank of a process in the group of this communicator + * @return array of ranks of neighbouring processes to one specified + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int[] getNeighbors(int rank) throws MPIException + { + MPI.check(); + return getNeighbors(handle, rank); + } + + private native int[] getNeighbors(long comm, int rank) throws MPIException; + + /** + * Gets the adjacency information for a distributed graph topology. + * @return adjacency information for a distributed graph topology + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public DistGraphNeighbors getDistGraphNeighbors() throws MPIException + { + MPI.check(); + return getDistGraphNeighbors(handle); + } + + private native DistGraphNeighbors getDistGraphNeighbors(long comm) + throws MPIException; + + /** + * Compute an optimal placement. + *

Java binding of the MPI operation {@code MPI_GRAPH_MAP}. + *

The number of nodes is taken to be size of the {@code index} argument. + * @param index node degrees + * @param edges graph edges + * @return reordered rank of calling process + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int map(int[] index, int[] edges) throws MPIException + { + MPI.check(); + return map(handle, index, edges); + } + + private native int map(long comm, int[] index, int[] edges) throws MPIException; } // Graphcomm diff --git a/ompi/mpi/java/java/GraphParms.java b/ompi/mpi/java/java/GraphParms.java index 3608a4d9aa8..6c702c4c2db 100644 --- a/ompi/mpi/java/java/GraphParms.java +++ b/ompi/mpi/java/java/GraphParms.java @@ -9,31 +9,33 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : GraphParms.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -50,66 +52,66 @@ */ public final class GraphParms { -/** Node degrees. */ -private final int[] index; + /** Node degrees. */ + private final int[] index; -/** Graph edges. */ -private final int[] edges; + /** Graph edges. */ + private final int[] edges; -/** - * Constructs a graph topology information object. - * @param index node degrees. - * @param edges graph edges. - */ -protected GraphParms(int[] index, int[] edges) -{ - this.index = index; - this.edges = edges; -} + /** + * Constructs a graph topology information object. + * @param index node degrees. + * @param edges graph edges. + */ + protected GraphParms(int[] index, int[] edges) + { + this.index = index; + this.edges = edges; + } -/** - * Returns the number of nodes. - * @return number of nodes. - */ -public int getIndexCount() -{ - return index.length; -} + /** + * Returns the number of nodes. + * @return number of nodes. + */ + public int getIndexCount() + { + return index.length; + } -/** - * Returns the index of the node {@code i}. - *

{@code getIndex(0)} returns the degree of the node {@code 0}, and - * {@code getIndex(i)-getIndex(i-1)} is the degree of the node {@code i}. - * @param i position of the node. - * @return the index. - */ -public int getIndex(int i) -{ - return index[i]; -} + /** + * Returns the index of the node {@code i}. + *

{@code getIndex(0)} returns the degree of the node {@code 0}, and + * {@code getIndex(i)-getIndex(i-1)} is the degree of the node {@code i}. + * @param i position of the node. + * @return the index. + */ + public int getIndex(int i) + { + return index[i]; + } -/** - * Returns the number of edges. - * @return number of edges. - */ -public int getEdgeCount() -{ - return edges.length; -} + /** + * Returns the number of edges. + * @return number of edges. + */ + public int getEdgeCount() + { + return edges.length; + } -/** - * Returns the edge {@code i}. - *

The list of neighbors of node zero is stored in {@code getEdge(j)}, - * for {@code 0} ≤ {@code j} ≤ {@code getIndex(0)-1} and the list - * of neighbors of node {@code i}, {@code i} > {@code 0}, is stored - * in {@code getEdge(j)}, {@code getIndex(i-1)} ≤ {@code j} ≤ - * {@code getIndex(i)-1}. - * @param i index of the edge. - * @return the edge. - */ -public int getEdge(int i) -{ - return edges[i]; -} + /** + * Returns the edge {@code i}. + *

The list of neighbors of node zero is stored in {@code getEdge(j)}, + * for {@code 0} ≤ {@code j} ≤ {@code getIndex(0)-1} and the list + * of neighbors of node {@code i}, {@code i} > {@code 0}, is stored + * in {@code getEdge(j)}, {@code getIndex(i-1)} ≤ {@code j} ≤ + * {@code getIndex(i)-1}. + * @param i index of the edge. + * @return the edge. + */ + public int getEdge(int i) + { + return edges[i]; + } } // GraphParms diff --git a/ompi/mpi/java/java/Group.java b/ompi/mpi/java/java/Group.java index 1eaf3042afd..2afa293d52d 100644 --- a/ompi/mpi/java/java/Group.java +++ b/ompi/mpi/java/java/Group.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Group.java * Author : Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 @@ -52,223 +52,223 @@ */ public final class Group implements Freeable { -protected long handle; -private static long nullHandle; - -static -{ - init(); -} - -private static native void init(); - -protected static native long getEmpty(); - -protected Group(long handle) -{ - this.handle = handle; -} - -/** - * Java binding of the MPI operation {@code MPI_GROUP_SIZE}. - * @return number of processes in the group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getSize() throws MPIException -{ - MPI.check(); - return getSize(handle); -} - -private native int getSize(long group) throws MPIException; - -/** - * Rank of this process in the group. - *

Java binding of the MPI operation {@code MPI_GROUP_RANK}. - * @return rank of this process in the group, or {@code MPI.UNDEFINED} - * if this process is not a member of the group. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getRank() throws MPIException -{ - MPI.check(); - return getRank(handle); -} - -private native int getRank(long group) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_GROUP_FREE}. - */ -@Override public void free() throws MPIException -{ - MPI.check(); - handle = free(handle); -} - -private native long free(long group); - -/** - * Test if group object is null. - * @return true if the group object is null. - */ -public boolean isNull() -{ - return handle == nullHandle; -} - -/** - * Translate ranks within one group to ranks within another. - *

Java binding of the MPI operation {@code MPI_GROUP_TRANSLATE_RANKS}. - *

Result elements are {@code MPI.UNDEFINED} where no correspondence exists. - * @param group1 a group - * @param ranks1 array of valid ranks in group1 - * @param group2 another group - * @return array of corresponding ranks in group2 - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int[] translateRanks(Group group1, int[] ranks1, Group group2) - throws MPIException -{ - MPI.check(); - return translateRanks(group1.handle, ranks1, group2.handle); -} - -private static native int[] translateRanks( - long group1, int[] ranks1, long group2) throws MPIException; - -/** - * Compare two groups. - *

Java binding of the MPI operation {@code MPI_GROUP_COMPARE}. - * @param group1 first group - * @param group2 second group - * @return {@code MPI.IDENT} if the group members and group order are exactly - * the same in both groups, {@code MPI.SIMILAR} if the group members are - * the same but the order is different, {@code MPI.UNEQUAL} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int compare(Group group1, Group group2) throws MPIException -{ - MPI.check(); - return compare(group1.handle, group2.handle); -} - -private static native int compare(long group1, long group2) throws MPIException; - -/** - * Set union of two groups. - *

Java binding of the MPI operation {@code MPI_GROUP_UNION}. - * @param group1 first group - * @param group2 second group - * @return union group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Group union(Group group1, Group group2) throws MPIException -{ - MPI.check(); - return new Group(union(group1.handle, group2.handle)); -} - -private static native long union(long group1, long group2); - -/** - * Set intersection of two groups. - * Java binding of the MPI operation {@code MPI_GROUP_INTERSECTION}. - * @param group1 first group - * @param group2 second group - * @return intersection group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Group intersection(Group group1, Group group2) throws MPIException -{ - MPI.check(); - return new Group(intersection(group1.handle, group2.handle)); -} - -private static native long intersection(long group1, long group2); - -/** - * Set difference of two groups. - * Java binding of the MPI operation {@code MPI_GROUP_DIFFERENCE}. - * @param group1 first group - * @param group2 second group - * @return difference group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Group difference(Group group1, Group group2) throws MPIException -{ - MPI.check(); - return new Group(difference(group1.handle, group2.handle)); -} - -private static native long difference(long group1, long group2); - -/** - * Create a subset group including specified processes. - *

Java binding of the MPI operation {@code MPI_GROUP_INCL}. - * @param ranks ranks from this group to appear in new group - * @return new group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group incl(int[] ranks) throws MPIException -{ - MPI.check(); - return new Group(incl(handle, ranks)); -} - -private native long incl(long group, int[] ranks); - -/** - * Create a subset group excluding specified processes. - *

Java binding of the MPI operation {@code MPI_GROUP_EXCL}. - * @param ranks ranks from this group not to appear in new group - * @return new group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group excl(int[] ranks) throws MPIException -{ - MPI.check(); - return new Group(excl(handle, ranks)); -} - -private native long excl(long group, int[] ranks); - -/** - * Create a subset group including processes specified - * by strided intervals of ranks. - *

Java binding of the MPI operation {@code MPI_GROUP_RANGE_INCL}. - *

The triplets are of the form (first rank, last rank, stride) - * indicating ranks in this group to be included in the new group. - * The size of the first dimension of {@code ranges} is the number - * of triplets. The size of the second dimension is 3. - * @param ranges array of integer triplets - * @return new group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group rangeIncl(int[][] ranges) throws MPIException -{ - MPI.check(); - return new Group(rangeIncl(handle, ranges)); -} - -private native long rangeIncl(long group, int[][] ranges); - -/** - * Create a subset group excluding processes specified - * by strided intervals of ranks. - *

Java binding of the MPI operation {@code MPI_GROUP_RANGE_EXCL}. - *

Triplet array is defined as for {@code rangeIncl}, the ranges - * indicating ranks in this group to be excluded from the new group. - * @param ranges array of integer triplets - * @return new group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group rangeExcl(int[][] ranges) throws MPIException -{ - MPI.check(); - return new Group(rangeExcl(handle, ranges)); -} - -private native long rangeExcl(long group, int[][] ranges); + protected long handle; + private static long nullHandle; + + static + { + init(); + } + + private static native void init(); + + protected static native long getEmpty(); + + protected Group(long handle) + { + this.handle = handle; + } + + /** + * Java binding of the MPI operation {@code MPI_GROUP_SIZE}. + * @return number of processes in the group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getSize() throws MPIException + { + MPI.check(); + return getSize(handle); + } + + private native int getSize(long group) throws MPIException; + + /** + * Rank of this process in the group. + *

Java binding of the MPI operation {@code MPI_GROUP_RANK}. + * @return rank of this process in the group, or {@code MPI.UNDEFINED} + * if this process is not a member of the group. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getRank() throws MPIException + { + MPI.check(); + return getRank(handle); + } + + private native int getRank(long group) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_GROUP_FREE}. + */ + @Override public void free() throws MPIException + { + MPI.check(); + handle = free(handle); + } + + private native long free(long group); + + /** + * Test if group object is null. + * @return true if the group object is null. + */ + public boolean isNull() + { + return handle == nullHandle; + } + + /** + * Translate ranks within one group to ranks within another. + *

Java binding of the MPI operation {@code MPI_GROUP_TRANSLATE_RANKS}. + *

Result elements are {@code MPI.UNDEFINED} where no correspondence exists. + * @param group1 a group + * @param ranks1 array of valid ranks in group1 + * @param group2 another group + * @return array of corresponding ranks in group2 + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int[] translateRanks(Group group1, int[] ranks1, Group group2) + throws MPIException + { + MPI.check(); + return translateRanks(group1.handle, ranks1, group2.handle); + } + + private static native int[] translateRanks( + long group1, int[] ranks1, long group2) throws MPIException; + + /** + * Compare two groups. + *

Java binding of the MPI operation {@code MPI_GROUP_COMPARE}. + * @param group1 first group + * @param group2 second group + * @return {@code MPI.IDENT} if the group members and group order are exactly + * the same in both groups, {@code MPI.SIMILAR} if the group members are + * the same but the order is different, {@code MPI.UNEQUAL} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int compare(Group group1, Group group2) throws MPIException + { + MPI.check(); + return compare(group1.handle, group2.handle); + } + + private static native int compare(long group1, long group2) throws MPIException; + + /** + * Set union of two groups. + *

Java binding of the MPI operation {@code MPI_GROUP_UNION}. + * @param group1 first group + * @param group2 second group + * @return union group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Group union(Group group1, Group group2) throws MPIException + { + MPI.check(); + return new Group(union(group1.handle, group2.handle)); + } + + private static native long union(long group1, long group2); + + /** + * Set intersection of two groups. + * Java binding of the MPI operation {@code MPI_GROUP_INTERSECTION}. + * @param group1 first group + * @param group2 second group + * @return intersection group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Group intersection(Group group1, Group group2) throws MPIException + { + MPI.check(); + return new Group(intersection(group1.handle, group2.handle)); + } + + private static native long intersection(long group1, long group2); + + /** + * Set difference of two groups. + * Java binding of the MPI operation {@code MPI_GROUP_DIFFERENCE}. + * @param group1 first group + * @param group2 second group + * @return difference group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Group difference(Group group1, Group group2) throws MPIException + { + MPI.check(); + return new Group(difference(group1.handle, group2.handle)); + } + + private static native long difference(long group1, long group2); + + /** + * Create a subset group including specified processes. + *

Java binding of the MPI operation {@code MPI_GROUP_INCL}. + * @param ranks ranks from this group to appear in new group + * @return new group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group incl(int[] ranks) throws MPIException + { + MPI.check(); + return new Group(incl(handle, ranks)); + } + + private native long incl(long group, int[] ranks); + + /** + * Create a subset group excluding specified processes. + *

Java binding of the MPI operation {@code MPI_GROUP_EXCL}. + * @param ranks ranks from this group not to appear in new group + * @return new group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group excl(int[] ranks) throws MPIException + { + MPI.check(); + return new Group(excl(handle, ranks)); + } + + private native long excl(long group, int[] ranks); + + /** + * Create a subset group including processes specified + * by strided intervals of ranks. + *

Java binding of the MPI operation {@code MPI_GROUP_RANGE_INCL}. + *

The triplets are of the form (first rank, last rank, stride) + * indicating ranks in this group to be included in the new group. + * The size of the first dimension of {@code ranges} is the number + * of triplets. The size of the second dimension is 3. + * @param ranges array of integer triplets + * @return new group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group rangeIncl(int[][] ranges) throws MPIException + { + MPI.check(); + return new Group(rangeIncl(handle, ranges)); + } + + private native long rangeIncl(long group, int[][] ranges); + + /** + * Create a subset group excluding processes specified + * by strided intervals of ranks. + *

Java binding of the MPI operation {@code MPI_GROUP_RANGE_EXCL}. + *

Triplet array is defined as for {@code rangeIncl}, the ranges + * indicating ranks in this group to be excluded from the new group. + * @param ranges array of integer triplets + * @return new group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group rangeExcl(int[][] ranges) throws MPIException + { + MPI.check(); + return new Group(rangeExcl(handle, ranges)); + } + + private native long rangeExcl(long group, int[][] ranges); } // Group diff --git a/ompi/mpi/java/java/Info.java b/ompi/mpi/java/java/Info.java index 3d1b2f7a678..4ce4c03e0fe 100644 --- a/ompi/mpi/java/java/Info.java +++ b/ompi/mpi/java/java/Info.java @@ -25,155 +25,155 @@ */ public final class Info implements Freeable { -protected long handle; -protected static final long NULL = getNull(); - -/** - * Java binding of the MPI operation {@code MPI_INFO_CREATE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Info() throws MPIException -{ - MPI.check(); - handle = create(); -} - -protected Info(long handle) -{ - this.handle = handle; -} - -private native long create(); - -protected static Info newEnv() -{ - return new Info(getEnv()); -} - -private native static long getEnv(); -private native static long getNull(); - -/** - * Java binding of the MPI operation {@code MPI_INFO_SET}. - * @param key key - * @param value value - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void set(String key, String value) throws MPIException -{ - MPI.check(); - set(handle, key, value); -} - -private native void set(long handle, String key, String value) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_INFO_SET}. - * @param key key - * @return value or {@code null} if key is not defined - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public String get(String key) throws MPIException -{ - MPI.check(); - return get(handle, key); -} - -private native String get(long handle, String key) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_INFO_SET}. - * @param key key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void delete(String key) throws MPIException -{ - MPI.check(); - delete(handle, key); -} - -private native void delete(long handle, String key) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_INFO_GET_NKEYS}. - * @return number of defined keys - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int size() throws MPIException -{ - MPI.check(); - return size(handle); -} - -private native int size(long handle) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_INFO_GET_NTHKEY}. - * @param i key number - * @return key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public String getKey(int i) throws MPIException -{ - MPI.check(); - return getKey(handle, i); -} - -private native String getKey(long handle, int i) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_INFO_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return info object - */ -@Override public Info clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} - -/** - * Java binding of the MPI operation {@code MPI_INFO_DUP}. - * @return info object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Info dup() throws MPIException -{ - MPI.check(); - return new Info(dup(handle)); -} - -private native long dup(long handle) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_INFO_FREE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public void free() throws MPIException -{ - MPI.check(); - handle = free(handle); -} - -private native long free(long handle) throws MPIException; - -/** - * Tests if the info object is {@code MPI_INFO_NULL} (has been freed). - * @return true if the info object is {@code MPI_INFO_NULL}, false otherwise. - */ -public boolean isNull() -{ - return isNull(handle); -} - -private native boolean isNull(long handle); + protected long handle; + protected static final long NULL = getNull(); + + /** + * Java binding of the MPI operation {@code MPI_INFO_CREATE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Info() throws MPIException + { + MPI.check(); + handle = create(); + } + + protected Info(long handle) + { + this.handle = handle; + } + + private native long create(); + + protected static Info newEnv() + { + return new Info(getEnv()); + } + + private native static long getEnv(); + private native static long getNull(); + + /** + * Java binding of the MPI operation {@code MPI_INFO_SET}. + * @param key key + * @param value value + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void set(String key, String value) throws MPIException + { + MPI.check(); + set(handle, key, value); + } + + private native void set(long handle, String key, String value) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_INFO_SET}. + * @param key key + * @return value or {@code null} if key is not defined + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public String get(String key) throws MPIException + { + MPI.check(); + return get(handle, key); + } + + private native String get(long handle, String key) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_INFO_SET}. + * @param key key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void delete(String key) throws MPIException + { + MPI.check(); + delete(handle, key); + } + + private native void delete(long handle, String key) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_INFO_GET_NKEYS}. + * @return number of defined keys + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int size() throws MPIException + { + MPI.check(); + return size(handle); + } + + private native int size(long handle) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_INFO_GET_NTHKEY}. + * @param i key number + * @return key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public String getKey(int i) throws MPIException + { + MPI.check(); + return getKey(handle, i); + } + + private native String getKey(long handle, int i) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_INFO_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return info object + */ + @Override public Info clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * Java binding of the MPI operation {@code MPI_INFO_DUP}. + * @return info object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Info dup() throws MPIException + { + MPI.check(); + return new Info(dup(handle)); + } + + private native long dup(long handle) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_INFO_FREE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public void free() throws MPIException + { + MPI.check(); + handle = free(handle); + } + + private native long free(long handle) throws MPIException; + + /** + * Tests if the info object is {@code MPI_INFO_NULL} (has been freed). + * @return true if the info object is {@code MPI_INFO_NULL}, false otherwise. + */ + public boolean isNull() + { + return isNull(handle); + } + + private native boolean isNull(long handle); } // Info diff --git a/ompi/mpi/java/java/Int2.java b/ompi/mpi/java/java/Int2.java index 2f3a585405e..6c38274b154 100644 --- a/ompi/mpi/java/java/Int2.java +++ b/ompi/mpi/java/java/Int2.java @@ -25,103 +25,103 @@ */ public final class Int2 extends Struct { -private final int iOff, iSize; + private final int iOff, iSize; -/** - * The struct object will be created only in MPI class. - * @param intOff int offset - * @param intSize int size - * @see MPI#int2 - */ -protected Int2(int intOff, int intSize) -{ - iSize = intSize; - int off = addIntField(); - assert off == 0; - setOffset(intOff); - iOff = addIntField(); - assert intOff == iOff; -} + /** + * The struct object will be created only in MPI class. + * @param intOff int offset + * @param intSize int size + * @see MPI#int2 + */ + protected Int2(int intOff, int intSize) + { + iSize = intSize; + int off = addIntField(); + assert off == 0; + setOffset(intOff); + iOff = addIntField(); + assert intOff == iOff; + } -private int addIntField() -{ - switch(iSize) - { - case 4: return addInt(); - case 8: return addLong(); - default: throw new AssertionError("Unsupported int size: "+ iSize); - } -} + private int addIntField() + { + switch(iSize) + { + case 4: return addInt(); + case 8: return addLong(); + default: throw new AssertionError("Unsupported int size: "+ iSize); + } + } -/** - * Creates a Data object. - * @return new Data object. - */ -@Override protected Int2.Data newData() -{ - return new Int2.Data(); -} + /** + * Creates a Data object. + * @return new Data object. + */ + @Override protected Int2.Data newData() + { + return new Int2.Data(); + } -/** - * Class for reading/writing data in a struct stored in a byte buffer. - */ -public final class Data extends Struct.Data -{ - /** - * Gets the first int. - * @return first int - */ - public int getValue() - { - return get(0); - } + /** + * Class for reading/writing data in a struct stored in a byte buffer. + */ + public final class Data extends Struct.Data + { + /** + * Gets the first int. + * @return first int + */ + public int getValue() + { + return get(0); + } - /** - * Gets the second int. - * @return second int - */ - public int getIndex() - { - return get(iOff); - } + /** + * Gets the second int. + * @return second int + */ + public int getIndex() + { + return get(iOff); + } - /** - * Puts the first int. - * @param v first value - */ - public void putValue(int v) - { - put(0, v); - } + /** + * Puts the first int. + * @param v first value + */ + public void putValue(int v) + { + put(0, v); + } - /** - * Puts the second int. - * @param v second int - */ - public void putIndex(int v) - { - put(iOff, v); - } + /** + * Puts the second int. + * @param v second int + */ + public void putIndex(int v) + { + put(iOff, v); + } - private int get(int off) - { - switch(iSize) - { - case 4: return getInt(off); - case 8: return (int)getLong(off); - default: throw new AssertionError(); - } - } + private int get(int off) + { + switch(iSize) + { + case 4: return getInt(off); + case 8: return (int)getLong(off); + default: throw new AssertionError(); + } + } - private void put(int off, int v) - { - switch(iSize) - { - case 4: putInt(off, v); break; - case 8: putLong(off, v); break; - default: throw new AssertionError(); - } - } -} // Data + private void put(int off, int v) + { + switch(iSize) + { + case 4: putInt(off, v); break; + case 8: putLong(off, v); break; + default: throw new AssertionError(); + } + } + } // Data } // Int2 diff --git a/ompi/mpi/java/java/Intercomm.java b/ompi/mpi/java/java/Intercomm.java index 1b206f5e6a0..0369b38376d 100644 --- a/ompi/mpi/java/java/Intercomm.java +++ b/ompi/mpi/java/java/Intercomm.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Intercomm.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -52,117 +52,117 @@ */ public final class Intercomm extends Comm { -protected Intercomm(long handle) -{ - super(handle); -} - -protected Intercomm(long[] commRequest) -{ - super(commRequest); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return copy of this communicator - */ -@Override public Intercomm clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public Intercomm dup() throws MPIException -{ - MPI.check(); - return new Intercomm(dup(handle)); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_IDUP}. - *

The new communicator can't be used before the operation completes. - * The request object must be obtained calling {@link #getRequest}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public Intercomm iDup() throws MPIException -{ - MPI.check(); - return new Intercomm(iDup(handle)); -} - -// Inter-Communication - -/** - * Size of remote group. - *

Java binding of the MPI operation {@code MPI_COMM_REMOTE_SIZE}. - * @return number of process in remote group of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getRemoteSize() throws MPIException -{ - MPI.check(); - return getRemoteSize_jni(); -} - -private native int getRemoteSize_jni() throws MPIException; - -/** - * Return the remote group. - *

Java binding of the MPI operation {@code MPI_COMM_REMOTE_GROUP}. - * @return remote group of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group getRemoteGroup() throws MPIException -{ - MPI.check(); - return new Group(getRemoteGroup_jni()); -} - -private native long getRemoteGroup_jni(); - -/** - * Creates an intracommuncator from an intercommunicator - *

Java binding of the MPI operation {@code MPI_INTERCOMM_MERGE}. - * @param high true if the local group has higher ranks in combined group - * @return new intra-communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Intracomm merge(boolean high) throws MPIException -{ - MPI.check(); - return new Intracomm(merge_jni(high)); -} - -private native long merge_jni(boolean high); - -/** - * Java binding of {@code MPI_COMM_GET_PARENT}. - * @return the parent communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Intercomm getParent() throws MPIException -{ - MPI.check(); - return new Intercomm(getParent_jni()); -} - -private native static long getParent_jni() throws MPIException; + protected Intercomm(long handle) + { + super(handle); + } + + protected Intercomm(long[] commRequest) + { + super(commRequest); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return copy of this communicator + */ + @Override public Intercomm clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public Intercomm dup() throws MPIException + { + MPI.check(); + return new Intercomm(dup(handle)); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_IDUP}. + *

The new communicator can't be used before the operation completes. + * The request object must be obtained calling {@link #getRequest}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public Intercomm iDup() throws MPIException + { + MPI.check(); + return new Intercomm(iDup(handle)); + } + + // Inter-Communication + + /** + * Size of remote group. + *

Java binding of the MPI operation {@code MPI_COMM_REMOTE_SIZE}. + * @return number of process in remote group of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getRemoteSize() throws MPIException + { + MPI.check(); + return getRemoteSize_jni(); + } + + private native int getRemoteSize_jni() throws MPIException; + + /** + * Return the remote group. + *

Java binding of the MPI operation {@code MPI_COMM_REMOTE_GROUP}. + * @return remote group of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group getRemoteGroup() throws MPIException + { + MPI.check(); + return new Group(getRemoteGroup_jni()); + } + + private native long getRemoteGroup_jni(); + + /** + * Creates an intracommuncator from an intercommunicator + *

Java binding of the MPI operation {@code MPI_INTERCOMM_MERGE}. + * @param high true if the local group has higher ranks in combined group + * @return new intra-communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Intracomm merge(boolean high) throws MPIException + { + MPI.check(); + return new Intracomm(merge_jni(high)); + } + + private native long merge_jni(boolean high); + + /** + * Java binding of {@code MPI_COMM_GET_PARENT}. + * @return the parent communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Intercomm getParent() throws MPIException + { + MPI.check(); + return new Intercomm(getParent_jni()); + } + + private native static long getParent_jni() throws MPIException; } // Intercomm diff --git a/ompi/mpi/java/java/Intracomm.java b/ompi/mpi/java/java/Intracomm.java index f572252e449..b1f0c687260 100644 --- a/ompi/mpi/java/java/Intracomm.java +++ b/ompi/mpi/java/java/Intracomm.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Intracommm.java * Author : Sang Lim, Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 @@ -43,9 +43,9 @@ * Updated : $Date: 2002/12/16 15:25:13 $ * Copyright: Northeast Parallel Architectures Center * at Syracuse University 1998 - */ - -/* + * + * + * * IMPLEMENTATION DETAILS * * All methods with buffers that can be direct or non direct have @@ -65,786 +65,786 @@ */ public class Intracomm extends Comm { -protected Intracomm() -{ -} - -protected Intracomm(long handle) -{ - super(handle); -} - -protected Intracomm(long[] commRequest) -{ - super(commRequest); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - *

It is recommended to use {@link #dup} instead of {@link #clone} - * because the last can't throw an {@link mpi.MPIException}. - * @return copy of this communicator - */ -@Override public Intracomm clone() -{ - try - { - return dup(); - } - catch(MPIException e) - { - throw new RuntimeException(e.getMessage()); - } -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_DUP}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public Intracomm dup() throws MPIException -{ - MPI.check(); - return new Intracomm(dup(handle)); -} - -/** - * Duplicates this communicator. - *

Java binding of {@code MPI_COMM_IDUP}. - *

The new communicator can't be used before the operation completes. - * The request object must be obtained calling {@link #getRequest}. - * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public Intracomm iDup() throws MPIException -{ - MPI.check(); - return new Intracomm(iDup(handle)); -} - -/** - * Partition the group associated with this communicator and create - * a new communicator within each subgroup. - *

Java binding of the MPI operation {@code MPI_COMM_SPLIT}. - * @param colour control of subset assignment - * @param key control of rank assignment - * @return new communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intracomm split(int colour, int key) throws MPIException -{ - MPI.check(); - return new Intracomm(split(handle, colour, key)); -} - -private native long split(long comm, int colour, int key) throws MPIException; - -/** - * Partition the group associated with this communicator and create - * a new communicator within each subgroup. - *

Java binding of the MPI operation {@code MPI_COMM_SPLIT_TYPE}. - * @param splitType type of processes to be grouped together - * @param key control of rank assignment - * @param info info argument - * @return new communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intracomm splitType(int splitType, int key, Info info) throws MPIException -{ - MPI.check(); - return new Intracomm(splitType(handle, splitType, key, info.handle)); -} - -private native long splitType(long comm, int colour, int key, long info) throws MPIException; - -/** - * Create a new communicator. - *

Java binding of the MPI operation {@code MPI_COMM_CREATE}. - * @param group group which is a subset of the group of this communicator - * @return new communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intracomm create(Group group) throws MPIException -{ - MPI.check(); - return new Intracomm(create(handle, group.handle)); -} - -private native long create(long comm, long group); - -// Topology Constructors - -/** - * Creates a communicator to which the Cartesian topology - * information is attached. - * Create a cartesian topology communicator whose group is a subset - * of the group of this communicator. - *

Java binding of the MPI operation {@code MPI_CART_CREATE}. - *

The number of dimensions of the Cartesian grid is taken to be the - * size of the {@code dims} argument. The array {@code periods} must - * be the same size. - * @param dims the number of processes in each dimension - * @param periods {@code true} if grid is periodic, - * {@code false} if not, in each dimension - * @param reorder {@code true} if ranking may be reordered, - * {@code false} if not - * @return new cartesian topology communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final CartComm createCart(int[] dims, boolean[] periods, boolean reorder) - throws MPIException -{ - MPI.check(); - return new CartComm(createCart(handle, dims, periods, reorder)); -} - -private native long createCart( - long comm, int[] dims, boolean[] periods, boolean reorder) - throws MPIException; - -/** - * Creates a communicator to which the graph topology information is attached. - *

Java binding of the MPI operation {@code MPI_GRAPH_CREATE}. - *

The number of nodes in the graph, nnodes, is taken - * to be size of the {@code index} argument. - * @param index node degrees - * @param edges graph edges - * @param reorder {@code true} if ranking may be reordered, - * {@code false} if not - * @return new graph topology communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final GraphComm createGraph(int[] index, int[] edges, boolean reorder) - throws MPIException -{ - MPI.check(); - return new GraphComm(createGraph(handle, index, edges, reorder)); -} - -private native long createGraph( - long comm, int[] index, int[] edges, boolean reorder) - throws MPIException; - -/** - * Creates a communicator to which the distributed graph topology - * information is attached. - *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE}. - *

The number of source nodes is the size of the {@code sources} argument. - * @param sources source nodes for which this process specifies edges - * @param degrees number of destinations for each source node - * @param destinations destination nodes for the source nodes - * @param weights weights for source to destination edges - * @param info hints on optimization and interpretation of weights - * @param reorder the process may be reordered (true) or not (false) - * @return communicator with distributed graph topology - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final GraphComm createDistGraph( - int[] sources, int[] degrees, int[] destinations, - int[] weights, Info info, boolean reorder) - throws MPIException -{ - MPI.check(); - - return new GraphComm(createDistGraph( - handle, sources, degrees, destinations, - weights, info.handle, reorder, true)); -} - -/** - * Creates a communicator to which the distributed graph topology - * information is attached. - *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE} - * using {@code MPI_UNWEIGHTED}. - *

The number of source nodes is the size of the {@code sources} argument. - * @param sources source nodes for which this process specifies edges - * @param degrees number of destinations for each source node - * @param destinations destination nodes for the source nodes - * @param info hints on optimization and interpretation of weights - * @param reorder the process may be reordered (true) or not (false) - * @return communicator with distributed graph topology - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final GraphComm createDistGraph( - int[] sources, int[] degrees, int[] destinations, - Info info, boolean reorder) - throws MPIException -{ - MPI.check(); - - return new GraphComm(createDistGraph( - handle, sources, degrees, destinations, - null, info.handle, reorder, false)); -} - -private native long createDistGraph( - long comm, int[] sources, int[] degrees, int[] destinations, - int[] weights, long info, boolean reorder, boolean weighted) - throws MPIException; - - -/** - * Creates a communicator to which the distributed graph topology - * information is attached. - *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE_ADJACENT}. - *

The number of source/destination nodes is the size of the - * {@code sources}/{@code destinations} argument. - * @param sources ranks of processes for which the calling process - * is a destination - * @param sourceWeights weights of the edges into the calling process - * @param destinations ranks of processes for which the calling process - * is a source - * @param destWeights weights of the edges out of the calling process - * @param info hints on optimization and interpretation of weights - * @param reorder the process may be reordered (true) or not (false) - * @return communicator with distributed graph topology - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final GraphComm createDistGraphAdjacent( - int[] sources, int[] sourceWeights, - int[] destinations, int[] destWeights, Info info, boolean reorder) - throws MPIException -{ - MPI.check(); - - return new GraphComm(createDistGraphAdjacent( - handle, sources, sourceWeights, destinations, - destWeights, info.handle, reorder, true)); -} - -/** - * Creates a communicator to which the distributed graph topology - * information is attached. - *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE_ADJACENT} - * using {@code MPI_UNWEIGHTED}. - *

The number of source/destination nodes is the size of the - * {@code sources}/{@code destinations} argument. - * @param sources ranks of processes for which the calling process - * is a destination - * @param destinations ranks of processes for which the calling process - * is a source - * @param info hints on optimization and interpretation of weights - * @param reorder the process may be reordered (true) or not (false) - * @return communicator with distributed graph topology - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final GraphComm createDistGraphAdjacent( - int[] sources, int[] destinations, Info info, boolean reorder) - throws MPIException -{ - MPI.check(); - - return new GraphComm(createDistGraphAdjacent( - handle, sources, null, destinations, null, - info.handle, reorder, false)); -} - -private native long createDistGraphAdjacent( - long comm, int[] sources, int []sourceweights, int[] destinations, - int[] distweights, long info, boolean reorder, boolean weighted) - throws MPIException; - - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_SCAN}. - * @param sendbuf send buffer array - * @param recvbuf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scan(Object sendbuf, Object recvbuf, - int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = type.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - op.setDatatype(type); - - scan(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, - count, type.handle, type.baseType, op, op.handle); -} - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_SCAN} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param recvbuf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void scan(Object recvbuf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - int recvoff = 0; - boolean rdb = false; - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - op.setDatatype(type); - - scan(handle, null, false, 0, recvbuf, rdb, recvoff, - count, type.handle, type.baseType, op, op.handle); -} - -private native void scan( - long comm, Object sendbuf, boolean sdb, int sendoff, - Object recvbuf, boolean rdb, int recvoff, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_ISCAN}. - * @param sendbuf send buffer array - * @param recvbuf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScan(Buffer sendbuf, Buffer recvbuf, - int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iScan(handle, sendbuf, recvbuf, count, - type.handle, type.baseType, op, op.handle)); -} - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_ISCAN} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf send/receive buffer array - * @param count number of items in buffer - * @param type data type of each item in buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iScan(Buffer buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(buf); - - return new Request(iScan( - handle, null, buf, count, - type.handle, type.baseType, op, op.handle)); -} - -private native long iScan( - long comm, Buffer sendbuf, Buffer recvbuf, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_EXSCAN}. - * @param sendbuf send buffer array - * @param recvbuf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void exScan(Object sendbuf, Object recvbuf, - int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - - int sendoff = 0, - recvoff = 0; - - boolean sdb = false, - rdb = false; - - if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) - { - sendoff = type.getOffset(sendbuf); - sendbuf = ((Buffer)sendbuf).array(); - } - - if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) - { - recvoff = type.getOffset(recvbuf); - recvbuf = ((Buffer)recvbuf).array(); - } - - op.setDatatype(type); - - exScan(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, - count, type.handle, type.baseType, op, op.handle); -} - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_EXSCAN} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void exScan(Object buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - op.setDatatype(type); - - exScan(handle, null, false, 0, buf, db, off, count, - type.handle, type.baseType, op, op.handle); -} - -private native void exScan( - long comm, Object sendbuf, boolean sdb, int sendoff, - Object recvbuf, boolean rdb, int recvoff, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_IEXSCAN}. - * @param sendbuf send buffer array - * @param recvbuf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iExScan(Buffer sendbuf, Buffer recvbuf, - int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iExScan(handle, sendbuf, recvbuf, count, - type.handle, type.baseType, op, op.handle)); -} - -/** - * Perform a prefix reduction on data distributed across the group. - *

Java binding of the MPI operation {@code MPI_IEXSCAN} - * using {@code MPI_IN_PLACE} instead of the send buffer. - * @param buf receive buffer array - * @param count number of items in input buffer - * @param type data type of each item in input buffer - * @param op reduce operation - * @return communication request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request iExScan(Buffer buf, int count, Datatype type, Op op) - throws MPIException -{ - MPI.check(); - op.setDatatype(type); - assertDirectBuffer(buf); - - return new Request(iExScan( - handle, null, buf, count, - type.handle, type.baseType, op, op.handle)); -} - -private native long iExScan( - long comm, Buffer sendbuf, Buffer recvbuf, int count, - long type, int baseType, Op jOp, long hOp) throws MPIException; - -/** - * Java binding of {@code MPI_OPEN_PORT} using {@code MPI_INFO_NULL}. - * @return port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static String openPort() throws MPIException -{ - MPI.check(); - return openPort(Info.NULL); -} - -/** - * Java binding of {@code MPI_OPEN_PORT}. - * @param info implementation-specific information - * @return port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static String openPort(Info info) throws MPIException -{ - MPI.check(); - return openPort(info.handle); -} - -private native static String openPort(long info) throws MPIException; - -/** - * Java binding of {@code MPI_CLOSE_PORT}. - * @param name port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void closePort(String name) throws MPIException -{ - MPI.check(); - closePort_jni(name); -} - -private native static void closePort_jni(String name) throws MPIException; - -/** - * Java binding of {@code MPI_COMM_ACCEPT} using {@code MPI_INFO_NULL}. - * @param port port name - * @param root rank in comm of root node - * @return intercommunicator with client as remote group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm accept(String port, int root) throws MPIException -{ - MPI.check(); - return new Intercomm(accept(handle, port, Info.NULL, root)); -} - -/** - * Java binding of {@code MPI_COMM_ACCEPT}. - * @param port port name - * @param info implementation-specific information - * @param root rank in comm of root node - * @return intercommunicator with client as remote group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm accept(String port, Info info, int root) - throws MPIException -{ - MPI.check(); - return new Intercomm(accept(handle, port, info.handle, root)); -} - -private native long accept(long comm, String port, long info, int root) - throws MPIException; - -/** - * Java binding of {@code MPI_COMM_CONNECT} using {@code MPI_INFO_NULL}. - * @param port port name - * @param root rank in comm of root node - * @return intercommunicator with server as remote group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm connect(String port, int root) throws MPIException -{ - MPI.check(); - return new Intercomm(connect(handle, port, Info.NULL, root)); -} - -/** - * Java binding of {@code MPI_COMM_CONNECT}. - * @param port port name - * @param info implementation-specific information - * @param root rank in comm of root node - * @return intercommunicator with server as remote group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm connect(String port, Info info, int root) - throws MPIException -{ - MPI.check(); - return new Intercomm(connect(handle, port, info.handle, root)); -} - -private native long connect(long comm, String port, long info, int root) - throws MPIException; - -/** - * Java binding of {@code MPI_PUBLISH_NAME} using {@code MPI_INFO_NULL}. - * @param service service name - * @param port port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void publishName(String service, String port) - throws MPIException -{ - MPI.check(); - publishName(service, Info.NULL, port); -} - -/** - * Java binding of {@code MPI_PUBLISH_NAME}. - * @param service service name - * @param info implementation-specific information - * @param port port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void publishName(String service, Info info, String port) - throws MPIException -{ - MPI.check(); - publishName(service, info.handle, port); -} - -private native static void publishName(String service, long info, String port) - throws MPIException; - -/** - * Java binding of {@code MPI_UNPUBLISH_NAME} using {@code MPI_INFO_NULL}. - * @param service service name - * @param port port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void unpublishName(String service, String port) - throws MPIException -{ - MPI.check(); - unpublishName(service, Info.NULL, port); -} - -/** - * Java binding of {@code MPI_UNPUBLISH_NAME}. - * @param service service name - * @param info implementation-specific information - * @param port port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void unpublishName(String service, Info info, String port) - throws MPIException -{ - MPI.check(); - unpublishName(service, info.handle, port); -} - -private native static void unpublishName(String service, long info, String port) - throws MPIException; - -/** - * Java binding of {@code MPI_LOOKUP_NAME} using {@code MPI_INFO_NULL}. - * @param service service name - * @return port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static String lookupName(String service) throws MPIException -{ - MPI.check(); - return lookupName(service, Info.NULL); -} - -/** - * Java binding of {@code MPI_LOOKUP_NAME}. - * @param service service name - * @param info mplementation-specific information - * @return port name - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static String lookupName(String service, Info info) throws MPIException -{ - MPI.check(); - return lookupName(service, info.handle); -} - -private native static String lookupName(String service, long info) - throws MPIException; - -/** - * Java binding of {@code MPI_COMM_SPAWN}. - * This intracommunicator will contain the group of spawned processes. - * @param command name of program to be spawned - * @param argv arguments to command; if this parameter is null, - * {@code MPI_ARGV_NULL} will be used. - * @param maxprocs maximum number of processes to start - * @param info info object telling the runtime where - * and how to start the processes - * @param root rank of process in which previous arguments are examined - * @param errcodes one code per process; if this parameter is null, - * {@code MPI_ERRCODES_IGNORE} will be used. - * @return intercommunicator between original group and the newly spawned group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm spawn(String command, String[] argv, int maxprocs, - Info info, int root, int[] errcodes) - throws MPIException -{ - MPI.check(); - - return new Intercomm(spawn(handle, command, argv, maxprocs, - info.handle, root, errcodes)); -} - -private native long spawn(long comm, String command, String[] argv, - int maxprocs, long info, int root, int[] errcodes) - throws MPIException; - -/** - * Java binding of {@code MPI_COMM_SPAWN_MULTIPLE}. - * This intracommunicator will contain the group of spawned processes. - * @param commands programs to be executed - * @param argv arguments for commands; if this parameter is null, - * {@code MPI_ARGVS_NULL} will be used. - * @param maxprocs maximum number of processes to start for each command - * @param info info objects telling the runtime where - * and how to start the processes - * @param root rank of process in which previous arguments are examined - * @param errcodes one code per process; if this parameter is null, - * {@code MPI_ERRCODES_IGNORE} will be used. - * @return intercommunicator between original group and the newly spawned group - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Intercomm spawnMultiple( - String[] commands, String[][] argv, int[] maxprocs, - Info[] info, int root, int[] errcodes) - throws MPIException -{ - MPI.check(); - - long hInfo[] = new long[info.length]; - - for(int i = 0; i < info.length; i++) - hInfo[i] = info[i].handle; - - return new Intercomm(spawnMultiple(handle, commands, argv, maxprocs, - hInfo, root, errcodes)); -} - -private native long spawnMultiple( - long comm, String[] commands, String[][] argv, int[] maxprocs, - long[] info, int root, int[] errcodes) throws MPIException; + protected Intracomm() + { + } + + protected Intracomm(long handle) + { + super(handle); + } + + protected Intracomm(long[] commRequest) + { + super(commRequest); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + *

It is recommended to use {@link #dup} instead of {@link #clone} + * because the last can't throw an {@link mpi.MPIException}. + * @return copy of this communicator + */ + @Override public Intracomm clone() + { + try + { + return dup(); + } + catch(MPIException e) + { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_DUP}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public Intracomm dup() throws MPIException + { + MPI.check(); + return new Intracomm(dup(handle)); + } + + /** + * Duplicates this communicator. + *

Java binding of {@code MPI_COMM_IDUP}. + *

The new communicator can't be used before the operation completes. + * The request object must be obtained calling {@link #getRequest}. + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public Intracomm iDup() throws MPIException + { + MPI.check(); + return new Intracomm(iDup(handle)); + } + + /** + * Partition the group associated with this communicator and create + * a new communicator within each subgroup. + *

Java binding of the MPI operation {@code MPI_COMM_SPLIT}. + * @param colour control of subset assignment + * @param key control of rank assignment + * @return new communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intracomm split(int colour, int key) throws MPIException + { + MPI.check(); + return new Intracomm(split(handle, colour, key)); + } + + private native long split(long comm, int colour, int key) throws MPIException; + + /** + * Partition the group associated with this communicator and create + * a new communicator within each subgroup. + *

Java binding of the MPI operation {@code MPI_COMM_SPLIT_TYPE}. + * @param splitType type of processes to be grouped together + * @param key control of rank assignment + * @param info info argument + * @return new communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intracomm splitType(int splitType, int key, Info info) throws MPIException + { + MPI.check(); + return new Intracomm(splitType(handle, splitType, key, info.handle)); + } + + private native long splitType(long comm, int colour, int key, long info) throws MPIException; + + /** + * Create a new communicator. + *

Java binding of the MPI operation {@code MPI_COMM_CREATE}. + * @param group group which is a subset of the group of this communicator + * @return new communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intracomm create(Group group) throws MPIException + { + MPI.check(); + return new Intracomm(create(handle, group.handle)); + } + + private native long create(long comm, long group); + + // Topology Constructors + + /** + * Creates a communicator to which the Cartesian topology + * information is attached. + * Create a cartesian topology communicator whose group is a subset + * of the group of this communicator. + *

Java binding of the MPI operation {@code MPI_CART_CREATE}. + *

The number of dimensions of the Cartesian grid is taken to be the + * size of the {@code dims} argument. The array {@code periods} must + * be the same size. + * @param dims the number of processes in each dimension + * @param periods {@code true} if grid is periodic, + * {@code false} if not, in each dimension + * @param reorder {@code true} if ranking may be reordered, + * {@code false} if not + * @return new cartesian topology communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final CartComm createCart(int[] dims, boolean[] periods, boolean reorder) + throws MPIException + { + MPI.check(); + return new CartComm(createCart(handle, dims, periods, reorder)); + } + + private native long createCart( + long comm, int[] dims, boolean[] periods, boolean reorder) + throws MPIException; + + /** + * Creates a communicator to which the graph topology information is attached. + *

Java binding of the MPI operation {@code MPI_GRAPH_CREATE}. + *

The number of nodes in the graph, nnodes, is taken + * to be size of the {@code index} argument. + * @param index node degrees + * @param edges graph edges + * @param reorder {@code true} if ranking may be reordered, + * {@code false} if not + * @return new graph topology communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final GraphComm createGraph(int[] index, int[] edges, boolean reorder) + throws MPIException + { + MPI.check(); + return new GraphComm(createGraph(handle, index, edges, reorder)); + } + + private native long createGraph( + long comm, int[] index, int[] edges, boolean reorder) + throws MPIException; + + /** + * Creates a communicator to which the distributed graph topology + * information is attached. + *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE}. + *

The number of source nodes is the size of the {@code sources} argument. + * @param sources source nodes for which this process specifies edges + * @param degrees number of destinations for each source node + * @param destinations destination nodes for the source nodes + * @param weights weights for source to destination edges + * @param info hints on optimization and interpretation of weights + * @param reorder the process may be reordered (true) or not (false) + * @return communicator with distributed graph topology + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final GraphComm createDistGraph( + int[] sources, int[] degrees, int[] destinations, + int[] weights, Info info, boolean reorder) + throws MPIException + { + MPI.check(); + + return new GraphComm(createDistGraph( + handle, sources, degrees, destinations, + weights, info.handle, reorder, true)); + } + + /** + * Creates a communicator to which the distributed graph topology + * information is attached. + *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE} + * using {@code MPI_UNWEIGHTED}. + *

The number of source nodes is the size of the {@code sources} argument. + * @param sources source nodes for which this process specifies edges + * @param degrees number of destinations for each source node + * @param destinations destination nodes for the source nodes + * @param info hints on optimization and interpretation of weights + * @param reorder the process may be reordered (true) or not (false) + * @return communicator with distributed graph topology + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final GraphComm createDistGraph( + int[] sources, int[] degrees, int[] destinations, + Info info, boolean reorder) + throws MPIException + { + MPI.check(); + + return new GraphComm(createDistGraph( + handle, sources, degrees, destinations, + null, info.handle, reorder, false)); + } + + private native long createDistGraph( + long comm, int[] sources, int[] degrees, int[] destinations, + int[] weights, long info, boolean reorder, boolean weighted) + throws MPIException; + + + /** + * Creates a communicator to which the distributed graph topology + * information is attached. + *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE_ADJACENT}. + *

The number of source/destination nodes is the size of the + * {@code sources}/{@code destinations} argument. + * @param sources ranks of processes for which the calling process + * is a destination + * @param sourceWeights weights of the edges into the calling process + * @param destinations ranks of processes for which the calling process + * is a source + * @param destWeights weights of the edges out of the calling process + * @param info hints on optimization and interpretation of weights + * @param reorder the process may be reordered (true) or not (false) + * @return communicator with distributed graph topology + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final GraphComm createDistGraphAdjacent( + int[] sources, int[] sourceWeights, + int[] destinations, int[] destWeights, Info info, boolean reorder) + throws MPIException + { + MPI.check(); + + return new GraphComm(createDistGraphAdjacent( + handle, sources, sourceWeights, destinations, + destWeights, info.handle, reorder, true)); + } + + /** + * Creates a communicator to which the distributed graph topology + * information is attached. + *

Java binding of the MPI operation {@code MPI_DIST_GRAPH_CREATE_ADJACENT} + * using {@code MPI_UNWEIGHTED}. + *

The number of source/destination nodes is the size of the + * {@code sources}/{@code destinations} argument. + * @param sources ranks of processes for which the calling process + * is a destination + * @param destinations ranks of processes for which the calling process + * is a source + * @param info hints on optimization and interpretation of weights + * @param reorder the process may be reordered (true) or not (false) + * @return communicator with distributed graph topology + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final GraphComm createDistGraphAdjacent( + int[] sources, int[] destinations, Info info, boolean reorder) + throws MPIException + { + MPI.check(); + + return new GraphComm(createDistGraphAdjacent( + handle, sources, null, destinations, null, + info.handle, reorder, false)); + } + + private native long createDistGraphAdjacent( + long comm, int[] sources, int []sourceweights, int[] destinations, + int[] distweights, long info, boolean reorder, boolean weighted) + throws MPIException; + + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_SCAN}. + * @param sendbuf send buffer array + * @param recvbuf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scan(Object sendbuf, Object recvbuf, + int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = type.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } + + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } + + op.setDatatype(type); + + scan(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, + count, type.handle, type.baseType, op, op.handle); + } + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_SCAN} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param recvbuf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void scan(Object recvbuf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + int recvoff = 0; + boolean rdb = false; + + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } + + op.setDatatype(type); + + scan(handle, null, false, 0, recvbuf, rdb, recvoff, + count, type.handle, type.baseType, op, op.handle); + } + + private native void scan( + long comm, Object sendbuf, boolean sdb, int sendoff, + Object recvbuf, boolean rdb, int recvoff, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_ISCAN}. + * @param sendbuf send buffer array + * @param recvbuf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScan(Buffer sendbuf, Buffer recvbuf, + int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iScan(handle, sendbuf, recvbuf, count, + type.handle, type.baseType, op, op.handle)); + } + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_ISCAN} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf send/receive buffer array + * @param count number of items in buffer + * @param type data type of each item in buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iScan(Buffer buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(buf); + + return new Request(iScan( + handle, null, buf, count, + type.handle, type.baseType, op, op.handle)); + } + + private native long iScan( + long comm, Buffer sendbuf, Buffer recvbuf, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_EXSCAN}. + * @param sendbuf send buffer array + * @param recvbuf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void exScan(Object sendbuf, Object recvbuf, + int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + + int sendoff = 0, + recvoff = 0; + + boolean sdb = false, + rdb = false; + + if(sendbuf instanceof Buffer && !(sdb = ((Buffer)sendbuf).isDirect())) + { + sendoff = type.getOffset(sendbuf); + sendbuf = ((Buffer)sendbuf).array(); + } + + if(recvbuf instanceof Buffer && !(rdb = ((Buffer)recvbuf).isDirect())) + { + recvoff = type.getOffset(recvbuf); + recvbuf = ((Buffer)recvbuf).array(); + } + + op.setDatatype(type); + + exScan(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, + count, type.handle, type.baseType, op, op.handle); + } + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_EXSCAN} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void exScan(Object buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + op.setDatatype(type); + + exScan(handle, null, false, 0, buf, db, off, count, + type.handle, type.baseType, op, op.handle); + } + + private native void exScan( + long comm, Object sendbuf, boolean sdb, int sendoff, + Object recvbuf, boolean rdb, int recvoff, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_IEXSCAN}. + * @param sendbuf send buffer array + * @param recvbuf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iExScan(Buffer sendbuf, Buffer recvbuf, + int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(sendbuf, recvbuf); + + return new Request(iExScan(handle, sendbuf, recvbuf, count, + type.handle, type.baseType, op, op.handle)); + } + + /** + * Perform a prefix reduction on data distributed across the group. + *

Java binding of the MPI operation {@code MPI_IEXSCAN} + * using {@code MPI_IN_PLACE} instead of the send buffer. + * @param buf receive buffer array + * @param count number of items in input buffer + * @param type data type of each item in input buffer + * @param op reduce operation + * @return communication request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request iExScan(Buffer buf, int count, Datatype type, Op op) + throws MPIException + { + MPI.check(); + op.setDatatype(type); + assertDirectBuffer(buf); + + return new Request(iExScan( + handle, null, buf, count, + type.handle, type.baseType, op, op.handle)); + } + + private native long iExScan( + long comm, Buffer sendbuf, Buffer recvbuf, int count, + long type, int baseType, Op jOp, long hOp) throws MPIException; + + /** + * Java binding of {@code MPI_OPEN_PORT} using {@code MPI_INFO_NULL}. + * @return port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static String openPort() throws MPIException + { + MPI.check(); + return openPort(Info.NULL); + } + + /** + * Java binding of {@code MPI_OPEN_PORT}. + * @param info implementation-specific information + * @return port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static String openPort(Info info) throws MPIException + { + MPI.check(); + return openPort(info.handle); + } + + private native static String openPort(long info) throws MPIException; + + /** + * Java binding of {@code MPI_CLOSE_PORT}. + * @param name port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void closePort(String name) throws MPIException + { + MPI.check(); + closePort_jni(name); + } + + private native static void closePort_jni(String name) throws MPIException; + + /** + * Java binding of {@code MPI_COMM_ACCEPT} using {@code MPI_INFO_NULL}. + * @param port port name + * @param root rank in comm of root node + * @return intercommunicator with client as remote group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm accept(String port, int root) throws MPIException + { + MPI.check(); + return new Intercomm(accept(handle, port, Info.NULL, root)); + } + + /** + * Java binding of {@code MPI_COMM_ACCEPT}. + * @param port port name + * @param info implementation-specific information + * @param root rank in comm of root node + * @return intercommunicator with client as remote group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm accept(String port, Info info, int root) + throws MPIException + { + MPI.check(); + return new Intercomm(accept(handle, port, info.handle, root)); + } + + private native long accept(long comm, String port, long info, int root) + throws MPIException; + + /** + * Java binding of {@code MPI_COMM_CONNECT} using {@code MPI_INFO_NULL}. + * @param port port name + * @param root rank in comm of root node + * @return intercommunicator with server as remote group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm connect(String port, int root) throws MPIException + { + MPI.check(); + return new Intercomm(connect(handle, port, Info.NULL, root)); + } + + /** + * Java binding of {@code MPI_COMM_CONNECT}. + * @param port port name + * @param info implementation-specific information + * @param root rank in comm of root node + * @return intercommunicator with server as remote group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm connect(String port, Info info, int root) + throws MPIException + { + MPI.check(); + return new Intercomm(connect(handle, port, info.handle, root)); + } + + private native long connect(long comm, String port, long info, int root) + throws MPIException; + + /** + * Java binding of {@code MPI_PUBLISH_NAME} using {@code MPI_INFO_NULL}. + * @param service service name + * @param port port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void publishName(String service, String port) + throws MPIException + { + MPI.check(); + publishName(service, Info.NULL, port); + } + + /** + * Java binding of {@code MPI_PUBLISH_NAME}. + * @param service service name + * @param info implementation-specific information + * @param port port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void publishName(String service, Info info, String port) + throws MPIException + { + MPI.check(); + publishName(service, info.handle, port); + } + + private native static void publishName(String service, long info, String port) + throws MPIException; + + /** + * Java binding of {@code MPI_UNPUBLISH_NAME} using {@code MPI_INFO_NULL}. + * @param service service name + * @param port port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void unpublishName(String service, String port) + throws MPIException + { + MPI.check(); + unpublishName(service, Info.NULL, port); + } + + /** + * Java binding of {@code MPI_UNPUBLISH_NAME}. + * @param service service name + * @param info implementation-specific information + * @param port port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void unpublishName(String service, Info info, String port) + throws MPIException + { + MPI.check(); + unpublishName(service, info.handle, port); + } + + private native static void unpublishName(String service, long info, String port) + throws MPIException; + + /** + * Java binding of {@code MPI_LOOKUP_NAME} using {@code MPI_INFO_NULL}. + * @param service service name + * @return port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static String lookupName(String service) throws MPIException + { + MPI.check(); + return lookupName(service, Info.NULL); + } + + /** + * Java binding of {@code MPI_LOOKUP_NAME}. + * @param service service name + * @param info mplementation-specific information + * @return port name + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static String lookupName(String service, Info info) throws MPIException + { + MPI.check(); + return lookupName(service, info.handle); + } + + private native static String lookupName(String service, long info) + throws MPIException; + + /** + * Java binding of {@code MPI_COMM_SPAWN}. + * This intracommunicator will contain the group of spawned processes. + * @param command name of program to be spawned + * @param argv arguments to command; if this parameter is null, + * {@code MPI_ARGV_NULL} will be used. + * @param maxprocs maximum number of processes to start + * @param info info object telling the runtime where + * and how to start the processes + * @param root rank of process in which previous arguments are examined + * @param errcodes one code per process; if this parameter is null, + * {@code MPI_ERRCODES_IGNORE} will be used. + * @return intercommunicator between original group and the newly spawned group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm spawn(String command, String[] argv, int maxprocs, + Info info, int root, int[] errcodes) + throws MPIException + { + MPI.check(); + + return new Intercomm(spawn(handle, command, argv, maxprocs, + info.handle, root, errcodes)); + } + + private native long spawn(long comm, String command, String[] argv, + int maxprocs, long info, int root, int[] errcodes) + throws MPIException; + + /** + * Java binding of {@code MPI_COMM_SPAWN_MULTIPLE}. + * This intracommunicator will contain the group of spawned processes. + * @param commands programs to be executed + * @param argv arguments for commands; if this parameter is null, + * {@code MPI_ARGVS_NULL} will be used. + * @param maxprocs maximum number of processes to start for each command + * @param info info objects telling the runtime where + * and how to start the processes + * @param root rank of process in which previous arguments are examined + * @param errcodes one code per process; if this parameter is null, + * {@code MPI_ERRCODES_IGNORE} will be used. + * @return intercommunicator between original group and the newly spawned group + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intercomm spawnMultiple( + String[] commands, String[][] argv, int[] maxprocs, + Info[] info, int root, int[] errcodes) + throws MPIException + { + MPI.check(); + + long hInfo[] = new long[info.length]; + + for(int i = 0; i < info.length; i++) + hInfo[i] = info[i].handle; + + return new Intercomm(spawnMultiple(handle, commands, argv, maxprocs, + hInfo, root, errcodes)); + } + + private native long spawnMultiple( + long comm, String[] commands, String[][] argv, int[] maxprocs, + long[] info, int root, int[] errcodes) throws MPIException; } // Intracomm diff --git a/ompi/mpi/java/java/LongInt.java b/ompi/mpi/java/java/LongInt.java index fd5f85cf0aa..1ecdbc2e033 100644 --- a/ompi/mpi/java/java/LongInt.java +++ b/ompi/mpi/java/java/LongInt.java @@ -25,110 +25,110 @@ */ public final class LongInt extends Struct { -private final int lSize, iOff, iSize; + private final int lSize, iOff, iSize; -/** - * The struct object will be created only in MPI class. - * @param longSize size of long - * @param intOff int offset - * @param intSize int size - * @see MPI#longInt - */ -protected LongInt(int longSize, int intOff, int intSize) -{ - lSize = longSize; - iSize = intSize; - int lOff; + /** + * The struct object will be created only in MPI class. + * @param longSize size of long + * @param intOff int offset + * @param intSize int size + * @see MPI#longInt + */ + protected LongInt(int longSize, int intOff, int intSize) + { + lSize = longSize; + iSize = intSize; + int lOff; - switch(lSize) - { - case 4: lOff = addInt(); break; - case 8: lOff = addLong(); break; - default: throw new AssertionError("Unsupported long size: "+ lSize); - } + switch(lSize) + { + case 4: lOff = addInt(); break; + case 8: lOff = addLong(); break; + default: throw new AssertionError("Unsupported long size: "+ lSize); + } - assert lOff == 0; - setOffset(intOff); + assert lOff == 0; + setOffset(intOff); - switch(iSize) - { - case 4: iOff = addInt(); break; - case 8: iOff = addLong(); break; - default: throw new AssertionError("Unsupported int size: "+ iSize); - } + switch(iSize) + { + case 4: iOff = addInt(); break; + case 8: iOff = addLong(); break; + default: throw new AssertionError("Unsupported int size: "+ iSize); + } - assert(intOff == iOff); -} + assert(intOff == iOff); + } -/** - * Creates a Data object. - * @return new Data object. - */ -@Override protected LongInt.Data newData() -{ - return new LongInt.Data(); -} + /** + * Creates a Data object. + * @return new Data object. + */ + @Override protected LongInt.Data newData() + { + return new LongInt.Data(); + } -/** - * Class for reading/writing data in a struct stored in a byte buffer. - */ -public final class Data extends Struct.Data -{ - /** - * Gets the long value. - * @return long value - */ - public long getValue() - { - switch(lSize) - { - case 8: return getLong(0); - case 4: return getInt(0); - default: throw new AssertionError(); - } - } + /** + * Class for reading/writing data in a struct stored in a byte buffer. + */ + public final class Data extends Struct.Data + { + /** + * Gets the long value. + * @return long value + */ + public long getValue() + { + switch(lSize) + { + case 8: return getLong(0); + case 4: return getInt(0); + default: throw new AssertionError(); + } + } - /** - * Gets the int value. - * @return int value - */ - public int getIndex() - { - switch(iSize) - { - case 4: return getInt(iOff); - case 8: return (int)getLong(iOff); - default: throw new AssertionError(); - } - } + /** + * Gets the int value. + * @return int value + */ + public int getIndex() + { + switch(iSize) + { + case 4: return getInt(iOff); + case 8: return (int)getLong(iOff); + default: throw new AssertionError(); + } + } - /** - * Puts the long value. - * @param v long value - */ - public void putValue(long v) - { - switch(lSize) - { - case 8: putLong(0, v); break; - case 4: putInt(0, (int)v); break; - default: throw new AssertionError(); - } - } + /** + * Puts the long value. + * @param v long value + */ + public void putValue(long v) + { + switch(lSize) + { + case 8: putLong(0, v); break; + case 4: putInt(0, (int)v); break; + default: throw new AssertionError(); + } + } - /** - * Puts the int value. - * @param v int value - */ - public void putIndex(int v) - { - switch(iSize) - { - case 4: putInt(iOff, v); break; - case 8: putLong(iOff, v); break; - default: throw new AssertionError(); - } - } -} // Data + /** + * Puts the int value. + * @param v int value + */ + public void putIndex(int v) + { + switch(iSize) + { + case 4: putInt(iOff, v); break; + case 8: putLong(iOff, v); break; + default: throw new AssertionError(); + } + } + } // Data } // LongInt diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index b3ff3bc023e..42a7bbe8eea 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : MPI.java * Author : Sang Lim, Sung-Hoon Ko, Xinying Li, Bryan Carpenter * (contributions from MAEDA Atusi) @@ -56,947 +56,1865 @@ */ public final class MPI { -private static boolean initialized, finalized; -private static byte[] buffer = null; // Buffer allocation -private static final int MAX_PROCESSOR_NAME = 256; -private static final ByteOrder nativeOrder = ByteOrder.nativeOrder(); - -public static final Intracomm COMM_WORLD, COMM_SELF; - -public static final int THREAD_SINGLE, THREAD_FUNNELED, THREAD_SERIALIZED, - THREAD_MULTIPLE; - -public static final int GRAPH, DIST_GRAPH, CART; -public static final int ANY_SOURCE, ANY_TAG; - -public static final Op MAX, MIN, SUM, PROD, LAND, BAND, - LOR, BOR, LXOR, BXOR, REPLACE, NO_OP; - -/** - * Global minimum operator. - *

{@code MINLOC} and {@link #MAXLOC} can be used with each of the following - * datatypes: {@link #INT2}, {@link #SHORT_INT}, {@link #LONG_INT}, - * {@link #FLOAT_INT} and {@link #DOUBLE_INT}. - */ -public static final Op MINLOC; - -/** Global maximum operator. See {@link #MINLOC}.*/ -public static final Op MAXLOC; - -public static final Datatype DATATYPE_NULL; - -public static final Datatype BYTE, CHAR, SHORT, BOOLEAN, - INT, LONG, FLOAT, DOUBLE, PACKED, - FLOAT_COMPLEX, DOUBLE_COMPLEX; - -/** Struct which must be used with {@link #int2}. */ -public static final Datatype INT2; -/** Struct which must be used with {@link #shortInt}. */ -public static final Datatype SHORT_INT; -/** Struct which must be used with {@link #longInt}. */ -public static final Datatype LONG_INT; -/** Struct which must be used with {@link #floatInt}. */ -public static final Datatype FLOAT_INT; -/** Struct which must be used with {@link #doubleInt}. */ -public static final Datatype DOUBLE_INT; - -/** Struct object for {@link #INT2} datatype. */ -public static final Int2 int2; -/** Struct object for {@link #SHORT_INT} datatype. */ -public static final ShortInt shortInt; -/** Struct object for {@link #LONG_INT} datatype. */ -public static final LongInt longInt; -/** Struct object for {@link #FLOAT_INT} datatype. */ -public static final FloatInt floatInt; -/** Struct object for {@link #DOUBLE_INT} datatype. */ -public static final DoubleInt doubleInt; - -public static final Request REQUEST_NULL; -public static final Group GROUP_EMPTY; -public static final Info INFO_ENV, INFO_NULL; - -public static final int PROC_NULL; -public static final int UNDEFINED; -public static final int IDENT, CONGRUENT, SIMILAR, UNEQUAL; -public static final int TAG_UB, HOST, IO, WTIME_IS_GLOBAL; - -public static final int APPNUM, LASTUSEDCODE, UNIVERSE_SIZE, WIN_BASE, - WIN_SIZE, WIN_DISP_UNIT; - -public static final int VERSION, SUBVERSION; -public static final int ROOT, KEYVAL_INVALID, BSEND_OVERHEAD; -public static final int MAX_OBJECT_NAME, MAX_PORT_NAME, MAX_DATAREP_STRING; -public static final int MAX_INFO_KEY, MAX_INFO_VAL; -public static final int ORDER_C, ORDER_FORTRAN; -public static final int DISTRIBUTE_BLOCK, DISTRIBUTE_CYCLIC, DISTRIBUTE_NONE, - DISTRIBUTE_DFLT_DARG; - -public static final int MODE_CREATE, MODE_RDONLY, MODE_WRONLY, MODE_RDWR, - MODE_DELETE_ON_CLOSE, MODE_UNIQUE_OPEN, MODE_EXCL, - MODE_APPEND, MODE_SEQUENTIAL; -public static final int DISPLACEMENT_CURRENT; -public static final int SEEK_SET, SEEK_CUR, SEEK_END; - -public static final int MODE_NOCHECK, MODE_NOPRECEDE, MODE_NOPUT, - MODE_NOSTORE, MODE_NOSUCCEED; -public static final int LOCK_EXCLUSIVE, LOCK_SHARED; - -public static final Errhandler ERRORS_ARE_FATAL, ERRORS_RETURN; - -// Error classes and codes -public static final int SUCCESS; -public static final int ERR_BUFFER; -public static final int ERR_COUNT; -public static final int ERR_TYPE; -public static final int ERR_TAG; -public static final int ERR_COMM; -public static final int ERR_RANK; -public static final int ERR_REQUEST; -public static final int ERR_ROOT; -public static final int ERR_GROUP; -public static final int ERR_OP; -public static final int ERR_TOPOLOGY; -public static final int ERR_DIMS; -public static final int ERR_ARG; -public static final int ERR_UNKNOWN; -public static final int ERR_TRUNCATE; -public static final int ERR_OTHER; -public static final int ERR_INTERN; -public static final int ERR_IN_STATUS; -public static final int ERR_PENDING; -public static final int ERR_ACCESS; -public static final int ERR_AMODE; -public static final int ERR_ASSERT; -public static final int ERR_BAD_FILE; -public static final int ERR_BASE; -public static final int ERR_CONVERSION; -public static final int ERR_DISP; -public static final int ERR_DUP_DATAREP; -public static final int ERR_FILE_EXISTS; -public static final int ERR_FILE_IN_USE; -public static final int ERR_FILE; -public static final int ERR_INFO_KEY; -public static final int ERR_INFO_NOKEY; -public static final int ERR_INFO_VALUE; -public static final int ERR_INFO; -public static final int ERR_IO; -public static final int ERR_KEYVAL; -public static final int ERR_LOCKTYPE; -public static final int ERR_NAME; -public static final int ERR_NO_MEM; -public static final int ERR_NOT_SAME; -public static final int ERR_NO_SPACE; -public static final int ERR_NO_SUCH_FILE; -public static final int ERR_PORT; -public static final int ERR_QUOTA; -public static final int ERR_READ_ONLY; -public static final int ERR_RMA_CONFLICT; -public static final int ERR_RMA_SYNC; -public static final int ERR_SERVICE; -public static final int ERR_SIZE; -public static final int ERR_SPAWN; -public static final int ERR_UNSUPPORTED_DATAREP; -public static final int ERR_UNSUPPORTED_OPERATION; -public static final int ERR_WIN; -public static final int ERR_LASTCODE; -public static final int ERR_SYSRESOURCE; - -static -{ - System.loadLibrary("mpi_java"); - - DATATYPE_NULL = new Datatype(); - - BYTE = new Datatype(); - CHAR = new Datatype(); - SHORT = new Datatype(); - BOOLEAN = new Datatype(); - INT = new Datatype(); - LONG = new Datatype(); - FLOAT = new Datatype(); - DOUBLE = new Datatype(); - PACKED = new Datatype(); - INT2 = new Datatype(); - - SHORT_INT = new Datatype(); - LONG_INT = new Datatype(); - FLOAT_INT = new Datatype(); - DOUBLE_INT = new Datatype(); - FLOAT_COMPLEX = new Datatype(); - DOUBLE_COMPLEX = new Datatype(); - - int2 = newInt2(); - shortInt = newShortInt(); - longInt = newLongInt(); - floatInt = newFloatInt(); - doubleInt = newDoubleInt(); - - MAX = new Op(1); - MIN = new Op(2); - SUM = new Op(3); - PROD = new Op(4); - LAND = new Op(5); - BAND = new Op(6); - LOR = new Op(7); - BOR = new Op(8); - LXOR = new Op(9); - BXOR = new Op(10); - MINLOC = new Op(11); - MAXLOC = new Op(12); - REPLACE = new Op(13); - NO_OP = new Op(14); - - GROUP_EMPTY = new Group(Group.getEmpty()); - REQUEST_NULL = new Request(Request.getNull()); - INFO_ENV = Info.newEnv(); - INFO_NULL = new Info(Info.NULL); - - Constant c = new Constant(); - - THREAD_SINGLE = c.THREAD_SINGLE; - THREAD_FUNNELED = c.THREAD_FUNNELED; - THREAD_SERIALIZED = c.THREAD_SERIALIZED; - THREAD_MULTIPLE = c.THREAD_MULTIPLE; - - GRAPH = c.GRAPH; - DIST_GRAPH = c.DIST_GRAPH; - CART = c.CART; - - ANY_SOURCE = c.ANY_SOURCE; - ANY_TAG = c.ANY_TAG; - PROC_NULL = c.PROC_NULL; - - UNDEFINED = c.UNDEFINED; - - IDENT = c.IDENT; - CONGRUENT = c.CONGRUENT; - SIMILAR = c.SIMILAR; - UNEQUAL = c.UNEQUAL; - - TAG_UB = c.TAG_UB; - HOST = c.HOST; - IO = c.IO; - WTIME_IS_GLOBAL = c.WTIME_IS_GLOBAL; - - APPNUM = c.APPNUM; - LASTUSEDCODE = c.LASTUSEDCODE; - UNIVERSE_SIZE = c.UNIVERSE_SIZE; - WIN_BASE = c.WIN_BASE; - WIN_SIZE = c.WIN_SIZE; - WIN_DISP_UNIT = c.WIN_DISP_UNIT; - - VERSION = c.VERSION; - SUBVERSION = c.SUBVERSION; - - ROOT = c.ROOT; - KEYVAL_INVALID = c.KEYVAL_INVALID; - BSEND_OVERHEAD = c.BSEND_OVERHEAD; - - MAX_OBJECT_NAME = c.MAX_OBJECT_NAME; - MAX_PORT_NAME = c.MAX_PORT_NAME; - MAX_DATAREP_STRING = c.MAX_DATAREP_STRING; - - MAX_INFO_KEY = c.MAX_INFO_KEY; - MAX_INFO_VAL = c.MAX_INFO_VAL; - - ORDER_C = c.ORDER_C; - ORDER_FORTRAN = c.ORDER_FORTRAN; - - DISTRIBUTE_BLOCK = c.DISTRIBUTE_BLOCK; - DISTRIBUTE_CYCLIC = c.DISTRIBUTE_CYCLIC; - DISTRIBUTE_NONE = c.DISTRIBUTE_NONE; - DISTRIBUTE_DFLT_DARG = c.DISTRIBUTE_DFLT_DARG; - - MODE_CREATE = c.MODE_CREATE; - MODE_RDONLY = c.MODE_RDONLY; - MODE_WRONLY = c.MODE_WRONLY; - MODE_RDWR = c.MODE_RDWR; - MODE_DELETE_ON_CLOSE = c.MODE_DELETE_ON_CLOSE; - MODE_UNIQUE_OPEN = c.MODE_UNIQUE_OPEN; - MODE_EXCL = c.MODE_EXCL; - MODE_APPEND = c.MODE_APPEND; - MODE_SEQUENTIAL = c.MODE_SEQUENTIAL; - - DISPLACEMENT_CURRENT = c.DISPLACEMENT_CURRENT; - - SEEK_SET = c.SEEK_SET; - SEEK_CUR = c.SEEK_CUR; - SEEK_END = c.SEEK_END; - - MODE_NOCHECK = c.MODE_NOCHECK; - MODE_NOPRECEDE = c.MODE_NOPRECEDE; - MODE_NOPUT = c.MODE_NOPUT; - MODE_NOSTORE = c.MODE_NOSTORE; - MODE_NOSUCCEED = c.MODE_NOSUCCEED; - LOCK_EXCLUSIVE = c.LOCK_EXCLUSIVE; - LOCK_SHARED = c.LOCK_SHARED; - - ERRORS_ARE_FATAL = new Errhandler(Errhandler.getFatal()); - ERRORS_RETURN = new Errhandler(Errhandler.getReturn()); - - COMM_WORLD = new Intracomm(); - COMM_SELF = new Intracomm(); - - // Error classes and codes - SUCCESS = c.SUCCESS; - ERR_BUFFER = c.ERR_BUFFER; - ERR_COUNT = c.ERR_COUNT; - ERR_TYPE = c.ERR_TYPE; - ERR_TAG = c.ERR_TAG; - ERR_COMM = c.ERR_COMM; - ERR_RANK = c.ERR_RANK; - ERR_REQUEST = c.ERR_REQUEST; - ERR_ROOT = c.ERR_ROOT; - ERR_GROUP = c.ERR_GROUP; - ERR_OP = c.ERR_OP; - ERR_TOPOLOGY = c.ERR_TOPOLOGY; - ERR_DIMS = c.ERR_DIMS; - ERR_ARG = c.ERR_ARG; - ERR_UNKNOWN = c.ERR_UNKNOWN; - ERR_TRUNCATE = c.ERR_TRUNCATE; - ERR_OTHER = c.ERR_OTHER; - ERR_INTERN = c.ERR_INTERN; - ERR_IN_STATUS = c.ERR_IN_STATUS; - ERR_PENDING = c.ERR_PENDING; - ERR_ACCESS = c.ERR_ACCESS; - ERR_AMODE = c.ERR_AMODE; - ERR_ASSERT = c.ERR_ASSERT; - ERR_BAD_FILE = c.ERR_BAD_FILE; - ERR_BASE = c.ERR_BASE; - ERR_CONVERSION = c.ERR_CONVERSION; - ERR_DISP = c.ERR_DISP; - ERR_DUP_DATAREP = c.ERR_DUP_DATAREP; - ERR_FILE_EXISTS = c.ERR_FILE_EXISTS; - ERR_FILE_IN_USE = c.ERR_FILE_IN_USE; - ERR_FILE = c.ERR_FILE; - ERR_INFO_KEY = c.ERR_INFO_KEY; - ERR_INFO_NOKEY = c.ERR_INFO_NOKEY; - ERR_INFO_VALUE = c.ERR_INFO_VALUE; - ERR_INFO = c.ERR_INFO; - ERR_IO = c.ERR_IO; - ERR_KEYVAL = c.ERR_KEYVAL; - ERR_LOCKTYPE = c.ERR_LOCKTYPE; - ERR_NAME = c.ERR_NAME; - ERR_NO_MEM = c.ERR_NO_MEM; - ERR_NOT_SAME = c.ERR_NOT_SAME; - ERR_NO_SPACE = c.ERR_NO_SPACE; - ERR_NO_SUCH_FILE = c.ERR_NO_SUCH_FILE; - ERR_PORT = c.ERR_PORT; - ERR_QUOTA = c.ERR_QUOTA; - ERR_READ_ONLY = c.ERR_READ_ONLY; - ERR_RMA_CONFLICT = c.ERR_RMA_CONFLICT; - ERR_RMA_SYNC = c.ERR_RMA_SYNC; - ERR_SERVICE = c.ERR_SERVICE; - ERR_SIZE = c.ERR_SIZE; - ERR_SPAWN = c.ERR_SPAWN; - ERR_UNSUPPORTED_DATAREP = c.ERR_UNSUPPORTED_DATAREP; - ERR_UNSUPPORTED_OPERATION = c.ERR_UNSUPPORTED_OPERATION; - ERR_WIN = c.ERR_WIN; - ERR_LASTCODE = c.ERR_LASTCODE; - ERR_SYSRESOURCE = c.ERR_SYSRESOURCE; - - initVersion(); -} - -private static native Int2 newInt2(); -private static native ShortInt newShortInt(); -private static native LongInt newLongInt(); -private static native FloatInt newFloatInt(); -private static native DoubleInt newDoubleInt(); -private static native void initVersion(); - -private static void initCommon() throws MPIException -{ - initialized = true; - - DATATYPE_NULL.setBasic(Datatype.NULL); - - BYTE.setBasic(Datatype.BYTE); - CHAR.setBasic(Datatype.CHAR); - SHORT.setBasic(Datatype.SHORT); - BOOLEAN.setBasic(Datatype.BOOLEAN); - INT.setBasic(Datatype.INT); - LONG.setBasic(Datatype.LONG); - FLOAT.setBasic(Datatype.FLOAT); - DOUBLE.setBasic(Datatype.DOUBLE); - PACKED.setBasic(Datatype.PACKED); - - INT2.setBasic(Datatype.INT2, MPI.BYTE); - SHORT_INT.setBasic(Datatype.SHORT_INT, MPI.BYTE); - LONG_INT.setBasic(Datatype.LONG_INT, MPI.BYTE); - FLOAT_INT.setBasic(Datatype.FLOAT_INT, MPI.BYTE); - DOUBLE_INT.setBasic(Datatype.DOUBLE_INT, MPI.BYTE); - FLOAT_COMPLEX.setBasic(Datatype.FLOAT_COMPLEX, MPI.FLOAT); - DOUBLE_COMPLEX.setBasic(Datatype.DOUBLE_COMPLEX, MPI.DOUBLE); - - COMM_WORLD.setType(Intracomm.WORLD); - COMM_SELF.setType(Intracomm.SELF); -} - -/** - * Initialize MPI. - *

Java binding of the MPI operation {@code MPI_INIT}. - * @param args arguments to the {@code main} method. - * @return arguments - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static String[] Init(String[] args) throws MPIException -{ - if(initialized) - throw new MPIException("MPI is already initialized."); - - String[] newArgs = Init_jni(args); - initCommon(); - return newArgs; -} - -private static native String [] Init_jni(String[] args); - -/** - * Initialize MPI with threads. - *

Java binding of the MPI operation {@code MPI_INIT_THREAD}. - * @param args arguments to the {@code main} method. - * @param required desired level of thread support - * @return provided level of thread support - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int InitThread(String[] args, int required) throws MPIException -{ - if(initialized) - throw new MPIException("MPI is already initialized."); - - int provided = InitThread_jni(args, required); - initCommon(); - return provided; -} - -private static native int InitThread_jni(String[] args, int required) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_QUERY_THREAD}. - * @return provided level of thread support - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int queryThread() throws MPIException -{ - MPI.check(); - return queryThread_jni(); -} - -private static native int queryThread_jni() throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_IS_THREAD_MAIN}. - * @return true if it is the main thread - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static boolean isThreadMain() throws MPIException -{ - MPI.check(); - return isThreadMain_jni(); -} - -private static native boolean isThreadMain_jni() throws MPIException; - -/** - * Finalize MPI. - *

Java binding of the MPI operation {@code MPI_FINALIZE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void Finalize() throws MPIException -{ - check(); - Finalize_jni(); - finalized = true; -} - -private static native void Finalize_jni() throws MPIException; - -/** - * Returns an elapsed time on the calling processor. - *

Java binding of the MPI operation {@code MPI_WTIME}. - * @return time in seconds since an arbitrary time in the past. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static double wtime() throws MPIException -{ - check(); - return wtime_jni(); -} - -private static native double wtime_jni(); - -/** - * Returns resolution of timer. - *

Java binding of the MPI operation {MPI_WTICK}. - * @return resolution of {@code wtime} in seconds. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static double wtick() throws MPIException -{ - check(); - return wtick_jni(); -} - -private static native double wtick_jni(); - -/** - * Returns a version object representing the version of MPI being used. - *

Java binding of the MPI operation {@code MPI_GET_VERSION}. - * @return A version object representing the version and subversion of MPI being used. - */ -public static Version getVersion() { - return getVersionJNI(); -} - -private static native Version getVersionJNI(); - -/** - * Returns the version of the MPI Library - *

Java binding of the MPI operation {@code MPI_GET_LIBRARY_VERSION}. - * @return A string representation of the MPI Library - */ -public static String getLibVersion() { - return getLibVersionJNI(); -} - -private static native String getLibVersionJNI(); - -/** - * Returns the name of the processor on which it is called. - *

Java binding of the MPI operation {@code MPI_GET_PROCESSOR_NAME}. - * @return A unique specifier for the actual node. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -static public String getProcessorName() throws MPIException -{ - check(); - byte[] buf = new byte[MAX_PROCESSOR_NAME]; - int lengh = getProcessorName(buf); - return new String(buf,0,lengh); -} - -static private native int getProcessorName(byte[] buf); - -/** - * Test if MPI has been initialized. - *

Java binding of the MPI operation {@code MPI_INITIALIZED}. - * @return {@code true} if {@code Init} has been called, - * {@code false} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -static public native boolean isInitialized() throws MPIException; - -/** - * Test if MPI has been finalized. - *

Java binding of the MPI operation {@code MPI_FINALIZED}. - * @return {@code true} if {@code Finalize} has been called, - * {@code false} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -static public native boolean isFinalized() throws MPIException; - -/** - * Attaches a user-provided buffer for sending. - *

Java binding of the MPI operation {@code MPI_BUFFER_ATTACH}. - * @param buffer initial buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -static public void attachBuffer(byte[] buffer) throws MPIException -{ - check(); - MPI.buffer = buffer; - attachBuffer_jni(buffer); -} - -static private native void attachBuffer_jni(byte[] buffer); - -/** - * Removes an existing buffer (for use in sending). - *

Java binding of the MPI operation {@code MPI_BUFFER_DETACH}. - * @return initial buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -static public byte[] detachBuffer() throws MPIException -{ - check(); - detachBuffer_jni(buffer); - byte[] result = MPI.buffer; - MPI.buffer = null; - return result; -} - -static private native void detachBuffer_jni(byte[] buffer); - -/** - * Controls profiling. - *

This method is not implemented. - *

Java binding of the MPI operation {@code MPI_PCONTROL}. - * @param level Profiling level. - * @param obj Profiling information. - */ -public static void pControl(int level, Object obj) -{ - // Nothing to do here. -} - -/** - * Check if MPI has been initialized and hasn't been finalized. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -protected static void check() throws MPIException -{ - if(!initialized) - throw new MPIException("MPI is not initialized."); - - if(finalized) - throw new MPIException("MPI is finalized."); -} - -protected static byte[] attrSet(Object value) throws MPIException -{ - try - { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream os = new ObjectOutputStream(baos); - os.writeObject(value); - os.close(); - return baos.toByteArray(); - } - catch(IOException ex) - { - MPIException mpiex = new MPIException(ex); - mpiex.setStackTrace(ex.getStackTrace()); - throw mpiex; - } -} - -protected static Object attrGet(byte[] value) throws MPIException -{ - if(value == null) - return null; - - try - { - ByteArrayInputStream bais = new ByteArrayInputStream(value); - ObjectInputStream is = new ObjectInputStream(bais); - Object obj = is.readObject(); - is.close(); - return obj; - } - catch(ClassNotFoundException ex) - { - throw new MPIException(ex); - } - catch(IOException ex) - { - throw new MPIException(ex); - } -} - -/** - * Allocates a new direct byte buffer. - * @param capacity The new buffer's capacity, in bytes - * @return The new byte buffer - */ -public static ByteBuffer newByteBuffer(int capacity) -{ - ByteBuffer buf = ByteBuffer.allocateDirect(capacity); - buf.order(nativeOrder); - return buf; -} - -/** - * Allocates a new direct char buffer. - * @param capacity The new buffer's capacity, in chars - * @return The new char buffer - */ -public static CharBuffer newCharBuffer(int capacity) -{ - assert capacity <= Integer.MAX_VALUE / 2; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); - buf.order(nativeOrder); - return buf.asCharBuffer(); -} - -/** - * Allocates a new direct short buffer. - * @param capacity The new buffer's capacity, in shorts - * @return The new short buffer - */ -public static ShortBuffer newShortBuffer(int capacity) -{ - assert capacity <= Integer.MAX_VALUE / 2; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); - buf.order(nativeOrder); - return buf.asShortBuffer(); -} - -/** - * Allocates a new direct int buffer. - * @param capacity The new buffer's capacity, in ints - * @return The new int buffer - */ -public static IntBuffer newIntBuffer(int capacity) -{ - assert capacity <= Integer.MAX_VALUE / 4; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); - buf.order(nativeOrder); - return buf.asIntBuffer(); -} - -/** - * Allocates a new direct long buffer. - * @param capacity The new buffer's capacity, in longs - * @return The new long buffer - */ -public static LongBuffer newLongBuffer(int capacity) -{ - assert capacity <= Integer.MAX_VALUE / 8; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); - buf.order(nativeOrder); - return buf.asLongBuffer(); -} - -/** - * Allocates a new direct float buffer. - * @param capacity The new buffer's capacity, in floats - * @return The new float buffer - */ -public static FloatBuffer newFloatBuffer(int capacity) -{ - assert capacity <= Integer.MAX_VALUE / 4; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); - buf.order(nativeOrder); - return buf.asFloatBuffer(); -} - -/** - * Allocates a new direct double buffer. - * @param capacity The new buffer's capacity, in doubles - * @return The new double buffer - */ -public static DoubleBuffer newDoubleBuffer(int capacity) -{ - assert capacity <= Integer.MAX_VALUE / 8; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); - buf.order(nativeOrder); - return buf.asDoubleBuffer(); -} - -/** - * Asserts that a buffer is direct. - * @param buf buffer - */ -protected static void assertDirectBuffer(Buffer buf) -{ - if(!buf.isDirect()) - throw new IllegalArgumentException("The buffer must be direct."); -} - -/** - * Asserts that buffers are direct. - * @param sendbuf The send buffer - * @param recvbuf The receive buffer - */ -protected static void assertDirectBuffer(Buffer sendbuf, Buffer recvbuf) -{ - if(!sendbuf.isDirect()) - throw new IllegalArgumentException("The send buffer must be direct."); - - if(!recvbuf.isDirect()) - throw new IllegalArgumentException("The recv. buffer must be direct."); -} - -/** - * Checks if an object is a direct buffer. - * @param obj object - * @return true if the object is a direct buffer - */ -protected static boolean isDirectBuffer(Object obj) -{ - return obj instanceof Buffer && ((Buffer)obj).isDirect(); -} - -/** - * Checks if an object is a heap buffer. - * @param obj object - * @return true if the object is a heap buffer - */ -protected static boolean isHeapBuffer(Object obj) -{ - return obj instanceof Buffer && !((Buffer)obj).isDirect(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static ByteBuffer slice(ByteBuffer buf, int offset) -{ - return ((ByteBuffer)buf.clear().position(offset)) - .slice().order(nativeOrder); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static CharBuffer slice(CharBuffer buf, int offset) -{ - return ((CharBuffer)buf.clear().position(offset)).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static ShortBuffer slice(ShortBuffer buf, int offset) -{ - return ((ShortBuffer)buf.clear().position(offset)).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static IntBuffer slice(IntBuffer buf, int offset) -{ - return ((IntBuffer)buf.clear().position(offset)).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static LongBuffer slice(LongBuffer buf, int offset) -{ - return ((LongBuffer)buf.clear().position(offset)).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static FloatBuffer slice(FloatBuffer buf, int offset) -{ - return ((FloatBuffer)buf.clear().position(offset)).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static DoubleBuffer slice(DoubleBuffer buf, int offset) -{ - return ((DoubleBuffer)buf.clear().position(offset)).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static ByteBuffer slice(byte[] buf, int offset) -{ - return ByteBuffer.wrap(buf, offset, buf.length - offset) - .slice().order(nativeOrder); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static CharBuffer slice(char[] buf, int offset) -{ - return CharBuffer.wrap(buf, offset, buf.length - offset).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static ShortBuffer slice(short[] buf, int offset) -{ - return ShortBuffer.wrap(buf, offset, buf.length - offset).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static IntBuffer slice(int[] buf, int offset) -{ - return IntBuffer.wrap(buf, offset, buf.length - offset).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static LongBuffer slice(long[] buf, int offset) -{ - return LongBuffer.wrap(buf, offset, buf.length - offset).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static FloatBuffer slice(float[] buf, int offset) -{ - return FloatBuffer.wrap(buf, offset, buf.length - offset).slice(); -} - -/** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ -public static DoubleBuffer slice(double[] buf, int offset) -{ - return DoubleBuffer.wrap(buf, offset, buf.length - offset).slice(); -} + private static boolean initialized, finalized; + private static byte[] buffer = null; // Buffer allocation + private static final int MAX_PROCESSOR_NAME = 256; + private static final ByteOrder nativeOrder = ByteOrder.nativeOrder(); + + public static final Intracomm COMM_WORLD, COMM_SELF; + + public static final int THREAD_SINGLE, THREAD_FUNNELED, THREAD_SERIALIZED, + THREAD_MULTIPLE; + + public static final int GRAPH, DIST_GRAPH, CART; + public static final int ANY_SOURCE, ANY_TAG; + + public static final Op MAX, MIN, SUM, PROD, LAND, BAND, + LOR, BOR, LXOR, BXOR, REPLACE, NO_OP; + + /** + * Global minimum operator. + *

{@code MINLOC} and {@link #MAXLOC} can be used with each of the following + * datatypes: {@link #INT2}, {@link #SHORT_INT}, {@link #LONG_INT}, + * {@link #FLOAT_INT} and {@link #DOUBLE_INT}. + */ + public static final Op MINLOC; + + /** Global maximum operator. See {@link #MINLOC}.*/ + public static final Op MAXLOC; + + public static final Datatype DATATYPE_NULL; + + public static final Datatype BYTE, CHAR, SHORT, BOOLEAN, + INT, LONG, FLOAT, DOUBLE, PACKED, + FLOAT_COMPLEX, DOUBLE_COMPLEX; + + /** Struct which must be used with {@link #int2}. */ + public static final Datatype INT2; + /** Struct which must be used with {@link #shortInt}. */ + public static final Datatype SHORT_INT; + /** Struct which must be used with {@link #longInt}. */ + public static final Datatype LONG_INT; + /** Struct which must be used with {@link #floatInt}. */ + public static final Datatype FLOAT_INT; + /** Struct which must be used with {@link #doubleInt}. */ + public static final Datatype DOUBLE_INT; + + /** Struct object for {@link #INT2} datatype. */ + public static final Int2 int2; + /** Struct object for {@link #SHORT_INT} datatype. */ + public static final ShortInt shortInt; + /** Struct object for {@link #LONG_INT} datatype. */ + public static final LongInt longInt; + /** Struct object for {@link #FLOAT_INT} datatype. */ + public static final FloatInt floatInt; + /** Struct object for {@link #DOUBLE_INT} datatype. */ + public static final DoubleInt doubleInt; + + public static final Request REQUEST_NULL; + public static final Group GROUP_EMPTY; + public static final Info INFO_ENV, INFO_NULL; + + public static final int PROC_NULL; + public static final int UNDEFINED; + public static final int IDENT, CONGRUENT, SIMILAR, UNEQUAL; + public static final int TAG_UB, HOST, IO, WTIME_IS_GLOBAL; + + public static final int APPNUM, LASTUSEDCODE, UNIVERSE_SIZE, WIN_BASE, + WIN_SIZE, WIN_DISP_UNIT; + + public static final int VERSION, SUBVERSION; + public static final int ROOT, KEYVAL_INVALID, BSEND_OVERHEAD; + public static final int MAX_OBJECT_NAME, MAX_PORT_NAME, MAX_DATAREP_STRING; + public static final int MAX_INFO_KEY, MAX_INFO_VAL; + public static final int ORDER_C, ORDER_FORTRAN; + public static final int DISTRIBUTE_BLOCK, DISTRIBUTE_CYCLIC, DISTRIBUTE_NONE, + DISTRIBUTE_DFLT_DARG; + + public static final int MODE_CREATE, MODE_RDONLY, MODE_WRONLY, MODE_RDWR, + MODE_DELETE_ON_CLOSE, MODE_UNIQUE_OPEN, MODE_EXCL, + MODE_APPEND, MODE_SEQUENTIAL; + public static final int DISPLACEMENT_CURRENT; + public static final int SEEK_SET, SEEK_CUR, SEEK_END; + + public static final int MODE_NOCHECK, MODE_NOPRECEDE, MODE_NOPUT, + MODE_NOSTORE, MODE_NOSUCCEED; + public static final int LOCK_EXCLUSIVE, LOCK_SHARED; + + public static final Errhandler ERRORS_ARE_FATAL, ERRORS_RETURN; + + // Error classes and codes + public static final int SUCCESS; + public static final int ERR_BUFFER; + public static final int ERR_COUNT; + public static final int ERR_TYPE; + public static final int ERR_TAG; + public static final int ERR_COMM; + public static final int ERR_RANK; + public static final int ERR_REQUEST; + public static final int ERR_ROOT; + public static final int ERR_GROUP; + public static final int ERR_OP; + public static final int ERR_TOPOLOGY; + public static final int ERR_DIMS; + public static final int ERR_ARG; + public static final int ERR_UNKNOWN; + public static final int ERR_TRUNCATE; + public static final int ERR_OTHER; + public static final int ERR_INTERN; + public static final int ERR_IN_STATUS; + public static final int ERR_PENDING; + public static final int ERR_ACCESS; + public static final int ERR_AMODE; + public static final int ERR_ASSERT; + public static final int ERR_BAD_FILE; + public static final int ERR_BASE; + public static final int ERR_CONVERSION; + public static final int ERR_DISP; + public static final int ERR_DUP_DATAREP; + public static final int ERR_FILE_EXISTS; + public static final int ERR_FILE_IN_USE; + public static final int ERR_FILE; + public static final int ERR_INFO_KEY; + public static final int ERR_INFO_NOKEY; + public static final int ERR_INFO_VALUE; + public static final int ERR_INFO; + public static final int ERR_IO; + public static final int ERR_KEYVAL; + public static final int ERR_LOCKTYPE; + public static final int ERR_NAME; + public static final int ERR_NO_MEM; + public static final int ERR_NOT_SAME; + public static final int ERR_NO_SPACE; + public static final int ERR_NO_SUCH_FILE; + public static final int ERR_PORT; + public static final int ERR_QUOTA; + public static final int ERR_READ_ONLY; + public static final int ERR_RMA_CONFLICT; + public static final int ERR_RMA_SYNC; + public static final int ERR_SERVICE; + public static final int ERR_SIZE; + public static final int ERR_SPAWN; + public static final int ERR_UNSUPPORTED_DATAREP; + public static final int ERR_UNSUPPORTED_OPERATION; + public static final int ERR_WIN; + public static final int ERR_LASTCODE; + public static final int ERR_SYSRESOURCE; + + static + { + System.loadLibrary("mpi_java"); + + DATATYPE_NULL = new Datatype(); + + BYTE = new Datatype(); + CHAR = new Datatype(); + SHORT = new Datatype(); + BOOLEAN = new Datatype(); + INT = new Datatype(); + LONG = new Datatype(); + FLOAT = new Datatype(); + DOUBLE = new Datatype(); + PACKED = new Datatype(); + INT2 = new Datatype(); + + SHORT_INT = new Datatype(); + LONG_INT = new Datatype(); + FLOAT_INT = new Datatype(); + DOUBLE_INT = new Datatype(); + FLOAT_COMPLEX = new Datatype(); + DOUBLE_COMPLEX = new Datatype(); + + int2 = newInt2(); + shortInt = newShortInt(); + longInt = newLongInt(); + floatInt = newFloatInt(); + doubleInt = newDoubleInt(); + + MAX = new Op(1); + MIN = new Op(2); + SUM = new Op(3); + PROD = new Op(4); + LAND = new Op(5); + BAND = new Op(6); + LOR = new Op(7); + BOR = new Op(8); + LXOR = new Op(9); + BXOR = new Op(10); + MINLOC = new Op(11); + MAXLOC = new Op(12); + REPLACE = new Op(13); + NO_OP = new Op(14); + + GROUP_EMPTY = new Group(Group.getEmpty()); + REQUEST_NULL = new Request(Request.getNull()); + INFO_ENV = Info.newEnv(); + INFO_NULL = new Info(Info.NULL); + + Constant c = new Constant(); + + THREAD_SINGLE = c.THREAD_SINGLE; + THREAD_FUNNELED = c.THREAD_FUNNELED; + THREAD_SERIALIZED = c.THREAD_SERIALIZED; + THREAD_MULTIPLE = c.THREAD_MULTIPLE; + + GRAPH = c.GRAPH; + DIST_GRAPH = c.DIST_GRAPH; + CART = c.CART; + + ANY_SOURCE = c.ANY_SOURCE; + ANY_TAG = c.ANY_TAG; + PROC_NULL = c.PROC_NULL; + + UNDEFINED = c.UNDEFINED; + + IDENT = c.IDENT; + CONGRUENT = c.CONGRUENT; + SIMILAR = c.SIMILAR; + UNEQUAL = c.UNEQUAL; + + TAG_UB = c.TAG_UB; + HOST = c.HOST; + IO = c.IO; + WTIME_IS_GLOBAL = c.WTIME_IS_GLOBAL; + + APPNUM = c.APPNUM; + LASTUSEDCODE = c.LASTUSEDCODE; + UNIVERSE_SIZE = c.UNIVERSE_SIZE; + WIN_BASE = c.WIN_BASE; + WIN_SIZE = c.WIN_SIZE; + WIN_DISP_UNIT = c.WIN_DISP_UNIT; + + VERSION = c.VERSION; + SUBVERSION = c.SUBVERSION; + + ROOT = c.ROOT; + KEYVAL_INVALID = c.KEYVAL_INVALID; + BSEND_OVERHEAD = c.BSEND_OVERHEAD; + + MAX_OBJECT_NAME = c.MAX_OBJECT_NAME; + MAX_PORT_NAME = c.MAX_PORT_NAME; + MAX_DATAREP_STRING = c.MAX_DATAREP_STRING; + + MAX_INFO_KEY = c.MAX_INFO_KEY; + MAX_INFO_VAL = c.MAX_INFO_VAL; + + ORDER_C = c.ORDER_C; + ORDER_FORTRAN = c.ORDER_FORTRAN; + + DISTRIBUTE_BLOCK = c.DISTRIBUTE_BLOCK; + DISTRIBUTE_CYCLIC = c.DISTRIBUTE_CYCLIC; + DISTRIBUTE_NONE = c.DISTRIBUTE_NONE; + DISTRIBUTE_DFLT_DARG = c.DISTRIBUTE_DFLT_DARG; + + MODE_CREATE = c.MODE_CREATE; + MODE_RDONLY = c.MODE_RDONLY; + MODE_WRONLY = c.MODE_WRONLY; + MODE_RDWR = c.MODE_RDWR; + MODE_DELETE_ON_CLOSE = c.MODE_DELETE_ON_CLOSE; + MODE_UNIQUE_OPEN = c.MODE_UNIQUE_OPEN; + MODE_EXCL = c.MODE_EXCL; + MODE_APPEND = c.MODE_APPEND; + MODE_SEQUENTIAL = c.MODE_SEQUENTIAL; + + DISPLACEMENT_CURRENT = c.DISPLACEMENT_CURRENT; + + SEEK_SET = c.SEEK_SET; + SEEK_CUR = c.SEEK_CUR; + SEEK_END = c.SEEK_END; + + MODE_NOCHECK = c.MODE_NOCHECK; + MODE_NOPRECEDE = c.MODE_NOPRECEDE; + MODE_NOPUT = c.MODE_NOPUT; + MODE_NOSTORE = c.MODE_NOSTORE; + MODE_NOSUCCEED = c.MODE_NOSUCCEED; + LOCK_EXCLUSIVE = c.LOCK_EXCLUSIVE; + LOCK_SHARED = c.LOCK_SHARED; + + ERRORS_ARE_FATAL = new Errhandler(Errhandler.getFatal()); + ERRORS_RETURN = new Errhandler(Errhandler.getReturn()); + + COMM_WORLD = new Intracomm(); + COMM_SELF = new Intracomm(); + + // Error classes and codes + SUCCESS = c.SUCCESS; + ERR_BUFFER = c.ERR_BUFFER; + ERR_COUNT = c.ERR_COUNT; + ERR_TYPE = c.ERR_TYPE; + ERR_TAG = c.ERR_TAG; + ERR_COMM = c.ERR_COMM; + ERR_RANK = c.ERR_RANK; + ERR_REQUEST = c.ERR_REQUEST; + ERR_ROOT = c.ERR_ROOT; + ERR_GROUP = c.ERR_GROUP; + ERR_OP = c.ERR_OP; + ERR_TOPOLOGY = c.ERR_TOPOLOGY; + ERR_DIMS = c.ERR_DIMS; + ERR_ARG = c.ERR_ARG; + ERR_UNKNOWN = c.ERR_UNKNOWN; + ERR_TRUNCATE = c.ERR_TRUNCATE; + ERR_OTHER = c.ERR_OTHER; + ERR_INTERN = c.ERR_INTERN; + ERR_IN_STATUS = c.ERR_IN_STATUS; + ERR_PENDING = c.ERR_PENDING; + ERR_ACCESS = c.ERR_ACCESS; + ERR_AMODE = c.ERR_AMODE; + ERR_ASSERT = c.ERR_ASSERT; + ERR_BAD_FILE = c.ERR_BAD_FILE; + ERR_BASE = c.ERR_BASE; + ERR_CONVERSION = c.ERR_CONVERSION; + ERR_DISP = c.ERR_DISP; + ERR_DUP_DATAREP = c.ERR_DUP_DATAREP; + ERR_FILE_EXISTS = c.ERR_FILE_EXISTS; + ERR_FILE_IN_USE = c.ERR_FILE_IN_USE; + ERR_FILE = c.ERR_FILE; + ERR_INFO_KEY = c.ERR_INFO_KEY; + ERR_INFO_NOKEY = c.ERR_INFO_NOKEY; + ERR_INFO_VALUE = c.ERR_INFO_VALUE; + ERR_INFO = c.ERR_INFO; + ERR_IO = c.ERR_IO; + ERR_KEYVAL = c.ERR_KEYVAL; + ERR_LOCKTYPE = c.ERR_LOCKTYPE; + ERR_NAME = c.ERR_NAME; + ERR_NO_MEM = c.ERR_NO_MEM; + ERR_NOT_SAME = c.ERR_NOT_SAME; + ERR_NO_SPACE = c.ERR_NO_SPACE; + ERR_NO_SUCH_FILE = c.ERR_NO_SUCH_FILE; + ERR_PORT = c.ERR_PORT; + ERR_QUOTA = c.ERR_QUOTA; + ERR_READ_ONLY = c.ERR_READ_ONLY; + ERR_RMA_CONFLICT = c.ERR_RMA_CONFLICT; + ERR_RMA_SYNC = c.ERR_RMA_SYNC; + ERR_SERVICE = c.ERR_SERVICE; + ERR_SIZE = c.ERR_SIZE; + ERR_SPAWN = c.ERR_SPAWN; + ERR_UNSUPPORTED_DATAREP = c.ERR_UNSUPPORTED_DATAREP; + ERR_UNSUPPORTED_OPERATION = c.ERR_UNSUPPORTED_OPERATION; + ERR_WIN = c.ERR_WIN; + ERR_LASTCODE = c.ERR_LASTCODE; + ERR_SYSRESOURCE = c.ERR_SYSRESOURCE; + + initVersion(); + } + + private static native Int2 newInt2(); + private static native ShortInt newShortInt(); + private static native LongInt newLongInt(); + private static native FloatInt newFloatInt(); + private static native DoubleInt newDoubleInt(); + private static native void initVersion(); + + private static void initCommon() throws MPIException + { + initialized = true; + + DATATYPE_NULL.setBasic(Datatype.NULL); + + BYTE.setBasic(Datatype.BYTE); + CHAR.setBasic(Datatype.CHAR); + SHORT.setBasic(Datatype.SHORT); + BOOLEAN.setBasic(Datatype.BOOLEAN); + INT.setBasic(Datatype.INT); + LONG.setBasic(Datatype.LONG); + FLOAT.setBasic(Datatype.FLOAT); + DOUBLE.setBasic(Datatype.DOUBLE); + PACKED.setBasic(Datatype.PACKED); + + INT2.setBasic(Datatype.INT2, MPI.BYTE); + SHORT_INT.setBasic(Datatype.SHORT_INT, MPI.BYTE); + LONG_INT.setBasic(Datatype.LONG_INT, MPI.BYTE); + FLOAT_INT.setBasic(Datatype.FLOAT_INT, MPI.BYTE); + DOUBLE_INT.setBasic(Datatype.DOUBLE_INT, MPI.BYTE); + FLOAT_COMPLEX.setBasic(Datatype.FLOAT_COMPLEX, MPI.FLOAT); + DOUBLE_COMPLEX.setBasic(Datatype.DOUBLE_COMPLEX, MPI.DOUBLE); + + COMM_WORLD.setType(Intracomm.WORLD); + COMM_SELF.setType(Intracomm.SELF); + } + + /** + * Initialize MPI. + *

Java binding of the MPI operation {@code MPI_INIT}. + * @param args arguments to the {@code main} method. + * @return arguments + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static String[] Init(String[] args) throws MPIException + { + if(initialized) + throw new MPIException("MPI is already initialized."); + + String[] newArgs = Init_jni(args); + initCommon(); + return newArgs; + } + + private static native String [] Init_jni(String[] args); + + /** + * Initialize MPI with threads. + *

Java binding of the MPI operation {@code MPI_INIT_THREAD}. + * @param args arguments to the {@code main} method. + * @param required desired level of thread support + * @return provided level of thread support + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int InitThread(String[] args, int required) throws MPIException + { + if(initialized) + throw new MPIException("MPI is already initialized."); + + int provided = InitThread_jni(args, required); + initCommon(); + return provided; + } + + private static native int InitThread_jni(String[] args, int required) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_QUERY_THREAD}. + * @return provided level of thread support + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int queryThread() throws MPIException + { + MPI.check(); + return queryThread_jni(); + } + + private static native int queryThread_jni() throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_IS_THREAD_MAIN}. + * @return true if it is the main thread + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static boolean isThreadMain() throws MPIException + { + MPI.check(); + return isThreadMain_jni(); + } + + private static native boolean isThreadMain_jni() throws MPIException; + + /** + * Finalize MPI. + *

Java binding of the MPI operation {@code MPI_FINALIZE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void Finalize() throws MPIException + { + check(); + Finalize_jni(); + finalized = true; + } + + private static native void Finalize_jni() throws MPIException; + + /** + * Returns an elapsed time on the calling processor. + *

Java binding of the MPI operation {@code MPI_WTIME}. + * @return time in seconds since an arbitrary time in the past. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static double wtime() throws MPIException + { + check(); + return wtime_jni(); + } + + private static native double wtime_jni(); + + /** + * Returns resolution of timer. + *

Java binding of the MPI operation {MPI_WTICK}. + * @return resolution of {@code wtime} in seconds. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static double wtick() throws MPIException + { + check(); + return wtick_jni(); + } + + private static native double wtick_jni(); + + /** + * Returns a version object representing the version of MPI being used. + *

Java binding of the MPI operation {@code MPI_GET_VERSION}. + * @return A version object representing the version and subversion of MPI being used. + */ + public static Version getVersion() { + return getVersionJNI(); + } + + private static native Version getVersionJNI(); + + /** + * Returns the version of the MPI Library + *

Java binding of the MPI operation {@code MPI_GET_LIBRARY_VERSION}. + * @return A string representation of the MPI Library + */ + public static String getLibVersion() { + return getLibVersionJNI(); + } + + private static native String getLibVersionJNI(); + + /** + * Returns the name of the processor on which it is called. + *

Java binding of the MPI operation {@code MPI_GET_PROCESSOR_NAME}. + * @return A unique specifier for the actual node. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public String getProcessorName() throws MPIException + { + check(); + byte[] buf = new byte[MAX_PROCESSOR_NAME]; + int lengh = getProcessorName(buf); + return new String(buf,0,lengh); + } + + static private native int getProcessorName(byte[] buf); + + /** + * Test if MPI has been initialized. + *

Java binding of the MPI operation {@code MPI_INITIALIZED}. + * @return {@code true} if {@code Init} has been called, + * {@code false} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public native boolean isInitialized() throws MPIException; + + /** + * Test if MPI has been finalized. + *

Java binding of the MPI operation {@code MPI_FINALIZED}. + * @return {@code true} if {@code Finalize} has been called, + * {@code false} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public native boolean isFinalized() throws MPIException; + + /** + * Attaches a user-provided buffer for sending. + *

Java binding of the MPI operation {@code MPI_BUFFER_ATTACH}. + * @param buffer initial buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public void attachBuffer(byte[] buffer) throws MPIException + { + check(); + MPI.buffer = buffer; + attachBuffer_jni(buffer); + } + + static private native void attachBuffer_jni(byte[] buffer); + + /** + * Removes an existing buffer (for use in sending). + *

Java binding of the MPI operation {@code MPI_BUFFER_DETACH}. + * @return initial buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public byte[] detachBuffer() throws MPIException + { + check(); + detachBuffer_jni(buffer); + byte[] result = MPI.buffer; + MPI.buffer = null; + return result; + } + + static private native void detachBuffer_jni(byte[] buffer); + + /** + * Controls profiling. + *

This method is not implemented. + *

Java binding of the MPI operation {@code MPI_PCONTROL}. + * @param level Profiling level. + * @param obj Profiling information. + */ + public static void pControl(int level, Object obj) + { + // Nothing to do here. + } + + /** + * Check if MPI has been initialized and hasn't been finalized. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + protected static void check() throws MPIException + { + if(!initialized) + throw new MPIException("MPI is not initialized."); + + if(finalized) + throw new MPIException("MPI is finalized."); + } + + protected static byte[] attrSet(Object value) throws MPIException + { + try + { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream os = new ObjectOutputStream(baos); + os.writeObject(value); + os.close(); + return baos.toByteArray(); + } + catch(IOException ex) + { + MPIException mpiex = new MPIException(ex); + mpiex.setStackTrace(ex.getStackTrace()); + throw mpiex; + } + } + + protected static Object attrGet(byte[] value) throws MPIException + { + if(value == null) + return null; + + try + { + ByteArrayInputStream bais = new ByteArrayInputStream(value); + ObjectInputStream is = new ObjectInputStream(bais); + Object obj = is.readObject(); + is.close(); + return obj; + } + catch(ClassNotFoundException ex) + { + throw new MPIException(ex); + } + catch(IOException ex) + { + throw new MPIException(ex); + } + } + + /** + * Allocates a new direct byte buffer. + * @param capacity The new buffer's capacity, in bytes + * @return The new byte buffer + */ + public static ByteBuffer newByteBuffer(int capacity) + { + ByteBuffer buf = ByteBuffer.allocateDirect(capacity); + buf.order(nativeOrder); + return buf; + } + + /** + * Allocates a new direct char buffer. + * @param capacity The new buffer's capacity, in chars + * @return The new char buffer + */ + public static CharBuffer newCharBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 2; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); + buf.order(nativeOrder); + return buf.asCharBuffer(); + } + + /** + * Allocates a new direct short buffer. + * @param capacity The new buffer's capacity, in shorts + * @return The new short buffer + */ + public static ShortBuffer newShortBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 2; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); + buf.order(nativeOrder); + return buf.asShortBuffer(); + } + + /** + * Allocates a new direct int buffer. + * @param capacity The new buffer's capacity, in ints + * @return The new int buffer + */ + public static IntBuffer newIntBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 4; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); + buf.order(nativeOrder); + return buf.asIntBuffer(); + } + + /** + * Allocates a new direct long buffer. + * @param capacity The new buffer's capacity, in longs + * @return The new long buffer + */ + public static LongBuffer newLongBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 8; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); + buf.order(nativeOrder); + return buf.asLongBuffer(); + } + + /** + * Allocates a new direct float buffer. + * @param capacity The new buffer's capacity, in floats + * @return The new float buffer + */ + public static FloatBuffer newFloatBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 4; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); + buf.order(nativeOrder); + return buf.asFloatBuffer(); + } + + /** + * Allocates a new direct double buffer. + * @param capacity The new buffer's capacity, in doubles + * @return The new double buffer + */ + public static DoubleBuffer newDoubleBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 8; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); + buf.order(nativeOrder); + return buf.asDoubleBuffer(); + } + + /** + * Asserts that a buffer is direct. + * @param buf buffer + */ + protected static void assertDirectBuffer(Buffer buf) + { + if(!buf.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + } + + /** + * Asserts that buffers are direct. + * @param sendbuf The send buffer + * @param recvbuf The receive buffer + */ + protected static void assertDirectBuffer(Buffer sendbuf, Buffer recvbuf) + { + if(!sendbuf.isDirect()) + throw new IllegalArgumentException("The send buffer must be direct."); + + if(!recvbuf.isDirect()) + throw new IllegalArgumentException("The recv. buffer must be direct."); + } + + /** + * Checks if an object is a direct buffer. + * @param obj object + * @return true if the object is a direct buffer + */ + protected static boolean isDirectBuffer(Object obj) + { + return obj instanceof Buffer && ((Buffer)obj).isDirect(); + } + + /** + * Checks if an object is a heap buffer. + * @param obj object + * @return true if the object is a heap buffer + */ + protected static boolean isHeapBuffer(Object obj) + { + return obj instanceof Buffer && !((Buffer)obj).isDirect(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ByteBuffer slice(ByteBuffer buf, int offset) + { + return ((ByteBuffer)buf.clear().position(offset)) + .slice().order(nativeOrder); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static CharBuffer slice(CharBuffer buf, int offset) + { + return ((CharBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ShortBuffer slice(ShortBuffer buf, int offset) + { + return ((ShortBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static IntBuffer slice(IntBuffer buf, int offset) + { + return ((IntBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static LongBuffer slice(LongBuffer buf, int offset) + { + return ((LongBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static FloatBuffer slice(FloatBuffer buf, int offset) + { + return ((FloatBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static DoubleBuffer slice(DoubleBuffer buf, int offset) + { + return ((DoubleBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ByteBuffer slice(byte[] buf, int offset) + { + return ByteBuffer.wrap(buf, offset, buf.length - offset) + .slice().order(nativeOrder); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static CharBuffer slice(char[] buf, int offset) + { + return CharBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ShortBuffer slice(short[] buf, int offset) + { + return ShortBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static IntBuffer slice(int[] buf, int offset) + { + return IntBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static LongBuffer slice(long[] buf, int offset) + { + return LongBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static FloatBuffer slice(float[] buf, int offset) + { + return FloatBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static DoubleBuffer slice(double[] buf, int offset) + { + return DoubleBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + ======= + private static boolean initialized, finalized; + private static byte[] buffer = null; // Buffer allocation + private static final int MAX_PROCESSOR_NAME = 256; + private static final ByteOrder nativeOrder = ByteOrder.nativeOrder(); + + public static final Intracomm COMM_WORLD, COMM_SELF; + + public static final int THREAD_SINGLE, THREAD_FUNNELED, THREAD_SERIALIZED, + THREAD_MULTIPLE; + + public static final int GRAPH, DIST_GRAPH, CART; + public static final int ANY_SOURCE, ANY_TAG; + + public static final Op MAX, MIN, SUM, PROD, LAND, BAND, + LOR, BOR, LXOR, BXOR, REPLACE, NO_OP; + + /** + * Global minimum operator. + *

{@code MINLOC} and {@link #MAXLOC} can be used with each of the following + * datatypes: {@link #INT2}, {@link #SHORT_INT}, {@link #LONG_INT}, + * {@link #FLOAT_INT} and {@link #DOUBLE_INT}. + */ + public static final Op MINLOC; + + /** Global maximum operator. See {@link #MINLOC}.*/ + public static final Op MAXLOC; + + public static final Datatype DATATYPE_NULL; + + public static final Datatype BYTE, CHAR, SHORT, BOOLEAN, + INT, LONG, FLOAT, DOUBLE, PACKED, + FLOAT_COMPLEX, DOUBLE_COMPLEX; + + /** Struct which must be used with {@link #int2}. */ + public static final Datatype INT2; + /** Struct which must be used with {@link #shortInt}. */ + public static final Datatype SHORT_INT; + /** Struct which must be used with {@link #longInt}. */ + public static final Datatype LONG_INT; + /** Struct which must be used with {@link #floatInt}. */ + public static final Datatype FLOAT_INT; + /** Struct which must be used with {@link #doubleInt}. */ + public static final Datatype DOUBLE_INT; + + /** Struct object for {@link #INT2} datatype. */ + public static final Int2 int2; + /** Struct object for {@link #SHORT_INT} datatype. */ + public static final ShortInt shortInt; + /** Struct object for {@link #LONG_INT} datatype. */ + public static final LongInt longInt; + /** Struct object for {@link #FLOAT_INT} datatype. */ + public static final FloatInt floatInt; + /** Struct object for {@link #DOUBLE_INT} datatype. */ + public static final DoubleInt doubleInt; + + public static final Request REQUEST_NULL; + public static final Group GROUP_EMPTY; + public static final Info INFO_ENV, INFO_NULL; + + public static final int PROC_NULL; + public static final int UNDEFINED; + public static final int IDENT, CONGRUENT, SIMILAR, UNEQUAL; + public static final int TAG_UB, HOST, IO, WTIME_IS_GLOBAL; + + public static final int APPNUM, LASTUSEDCODE, UNIVERSE_SIZE, WIN_BASE, + WIN_SIZE, WIN_DISP_UNIT; + + public static final int VERSION, SUBVERSION; + public static final int ROOT, KEYVAL_INVALID, BSEND_OVERHEAD; + public static final int MAX_OBJECT_NAME, MAX_PORT_NAME, MAX_DATAREP_STRING; + public static final int MAX_INFO_KEY, MAX_INFO_VAL; + public static final int ORDER_C, ORDER_FORTRAN; + public static final int DISTRIBUTE_BLOCK, DISTRIBUTE_CYCLIC, DISTRIBUTE_NONE, + DISTRIBUTE_DFLT_DARG; + + public static final int MODE_CREATE, MODE_RDONLY, MODE_WRONLY, MODE_RDWR, + MODE_DELETE_ON_CLOSE, MODE_UNIQUE_OPEN, MODE_EXCL, + MODE_APPEND, MODE_SEQUENTIAL; + public static final int DISPLACEMENT_CURRENT; + public static final int SEEK_SET, SEEK_CUR, SEEK_END; + + public static final int MODE_NOCHECK, MODE_NOPRECEDE, MODE_NOPUT, + MODE_NOSTORE, MODE_NOSUCCEED; + public static final int LOCK_EXCLUSIVE, LOCK_SHARED; + + public static final Errhandler ERRORS_ARE_FATAL, ERRORS_RETURN; + + // Error classes and codes + public static final int SUCCESS; + public static final int ERR_BUFFER; + public static final int ERR_COUNT; + public static final int ERR_TYPE; + public static final int ERR_TAG; + public static final int ERR_COMM; + public static final int ERR_RANK; + public static final int ERR_REQUEST; + public static final int ERR_ROOT; + public static final int ERR_GROUP; + public static final int ERR_OP; + public static final int ERR_TOPOLOGY; + public static final int ERR_DIMS; + public static final int ERR_ARG; + public static final int ERR_UNKNOWN; + public static final int ERR_TRUNCATE; + public static final int ERR_OTHER; + public static final int ERR_INTERN; + public static final int ERR_IN_STATUS; + public static final int ERR_PENDING; + public static final int ERR_ACCESS; + public static final int ERR_AMODE; + public static final int ERR_ASSERT; + public static final int ERR_BAD_FILE; + public static final int ERR_BASE; + public static final int ERR_CONVERSION; + public static final int ERR_DISP; + public static final int ERR_DUP_DATAREP; + public static final int ERR_FILE_EXISTS; + public static final int ERR_FILE_IN_USE; + public static final int ERR_FILE; + public static final int ERR_INFO_KEY; + public static final int ERR_INFO_NOKEY; + public static final int ERR_INFO_VALUE; + public static final int ERR_INFO; + public static final int ERR_IO; + public static final int ERR_KEYVAL; + public static final int ERR_LOCKTYPE; + public static final int ERR_NAME; + public static final int ERR_NO_MEM; + public static final int ERR_NOT_SAME; + public static final int ERR_NO_SPACE; + public static final int ERR_NO_SUCH_FILE; + public static final int ERR_PORT; + public static final int ERR_QUOTA; + public static final int ERR_READ_ONLY; + public static final int ERR_RMA_CONFLICT; + public static final int ERR_RMA_SYNC; + public static final int ERR_SERVICE; + public static final int ERR_SIZE; + public static final int ERR_SPAWN; + public static final int ERR_UNSUPPORTED_DATAREP; + public static final int ERR_UNSUPPORTED_OPERATION; + public static final int ERR_WIN; + public static final int ERR_LASTCODE; + public static final int ERR_SYSRESOURCE; + + static + { + System.loadLibrary("mpi_java"); + + DATATYPE_NULL = new Datatype(); + + BYTE = new Datatype(); + CHAR = new Datatype(); + SHORT = new Datatype(); + BOOLEAN = new Datatype(); + INT = new Datatype(); + LONG = new Datatype(); + FLOAT = new Datatype(); + DOUBLE = new Datatype(); + PACKED = new Datatype(); + INT2 = new Datatype(); + + SHORT_INT = new Datatype(); + LONG_INT = new Datatype(); + FLOAT_INT = new Datatype(); + DOUBLE_INT = new Datatype(); + FLOAT_COMPLEX = new Datatype(); + DOUBLE_COMPLEX = new Datatype(); + + int2 = newInt2(); + shortInt = newShortInt(); + longInt = newLongInt(); + floatInt = newFloatInt(); + doubleInt = newDoubleInt(); + + MAX = new Op(1); + MIN = new Op(2); + SUM = new Op(3); + PROD = new Op(4); + LAND = new Op(5); + BAND = new Op(6); + LOR = new Op(7); + BOR = new Op(8); + LXOR = new Op(9); + BXOR = new Op(10); + MINLOC = new Op(11); + MAXLOC = new Op(12); + REPLACE = new Op(13); + NO_OP = new Op(14); + + GROUP_EMPTY = new Group(Group.getEmpty()); + REQUEST_NULL = new Request(Request.getNull()); + INFO_ENV = Info.newEnv(); + INFO_NULL = new Info(Info.NULL); + + Constant c = new Constant(); + + THREAD_SINGLE = c.THREAD_SINGLE; + THREAD_FUNNELED = c.THREAD_FUNNELED; + THREAD_SERIALIZED = c.THREAD_SERIALIZED; + THREAD_MULTIPLE = c.THREAD_MULTIPLE; + + GRAPH = c.GRAPH; + DIST_GRAPH = c.DIST_GRAPH; + CART = c.CART; + + ANY_SOURCE = c.ANY_SOURCE; + ANY_TAG = c.ANY_TAG; + PROC_NULL = c.PROC_NULL; + + UNDEFINED = c.UNDEFINED; + + IDENT = c.IDENT; + CONGRUENT = c.CONGRUENT; + SIMILAR = c.SIMILAR; + UNEQUAL = c.UNEQUAL; + + TAG_UB = c.TAG_UB; + HOST = c.HOST; + IO = c.IO; + WTIME_IS_GLOBAL = c.WTIME_IS_GLOBAL; + + APPNUM = c.APPNUM; + LASTUSEDCODE = c.LASTUSEDCODE; + UNIVERSE_SIZE = c.UNIVERSE_SIZE; + WIN_BASE = c.WIN_BASE; + WIN_SIZE = c.WIN_SIZE; + WIN_DISP_UNIT = c.WIN_DISP_UNIT; + + VERSION = c.VERSION; + SUBVERSION = c.SUBVERSION; + + ROOT = c.ROOT; + KEYVAL_INVALID = c.KEYVAL_INVALID; + BSEND_OVERHEAD = c.BSEND_OVERHEAD; + + MAX_OBJECT_NAME = c.MAX_OBJECT_NAME; + MAX_PORT_NAME = c.MAX_PORT_NAME; + MAX_DATAREP_STRING = c.MAX_DATAREP_STRING; + + MAX_INFO_KEY = c.MAX_INFO_KEY; + MAX_INFO_VAL = c.MAX_INFO_VAL; + + ORDER_C = c.ORDER_C; + ORDER_FORTRAN = c.ORDER_FORTRAN; + + DISTRIBUTE_BLOCK = c.DISTRIBUTE_BLOCK; + DISTRIBUTE_CYCLIC = c.DISTRIBUTE_CYCLIC; + DISTRIBUTE_NONE = c.DISTRIBUTE_NONE; + DISTRIBUTE_DFLT_DARG = c.DISTRIBUTE_DFLT_DARG; + + MODE_CREATE = c.MODE_CREATE; + MODE_RDONLY = c.MODE_RDONLY; + MODE_WRONLY = c.MODE_WRONLY; + MODE_RDWR = c.MODE_RDWR; + MODE_DELETE_ON_CLOSE = c.MODE_DELETE_ON_CLOSE; + MODE_UNIQUE_OPEN = c.MODE_UNIQUE_OPEN; + MODE_EXCL = c.MODE_EXCL; + MODE_APPEND = c.MODE_APPEND; + MODE_SEQUENTIAL = c.MODE_SEQUENTIAL; + + DISPLACEMENT_CURRENT = c.DISPLACEMENT_CURRENT; + + SEEK_SET = c.SEEK_SET; + SEEK_CUR = c.SEEK_CUR; + SEEK_END = c.SEEK_END; + + MODE_NOCHECK = c.MODE_NOCHECK; + MODE_NOPRECEDE = c.MODE_NOPRECEDE; + MODE_NOPUT = c.MODE_NOPUT; + MODE_NOSTORE = c.MODE_NOSTORE; + MODE_NOSUCCEED = c.MODE_NOSUCCEED; + LOCK_EXCLUSIVE = c.LOCK_EXCLUSIVE; + LOCK_SHARED = c.LOCK_SHARED; + + ERRORS_ARE_FATAL = new Errhandler(Errhandler.getFatal()); + ERRORS_RETURN = new Errhandler(Errhandler.getReturn()); + + COMM_WORLD = new Intracomm(); + COMM_SELF = new Intracomm(); + + // Error classes and codes + SUCCESS = c.SUCCESS; + ERR_BUFFER = c.ERR_BUFFER; + ERR_COUNT = c.ERR_COUNT; + ERR_TYPE = c.ERR_TYPE; + ERR_TAG = c.ERR_TAG; + ERR_COMM = c.ERR_COMM; + ERR_RANK = c.ERR_RANK; + ERR_REQUEST = c.ERR_REQUEST; + ERR_ROOT = c.ERR_ROOT; + ERR_GROUP = c.ERR_GROUP; + ERR_OP = c.ERR_OP; + ERR_TOPOLOGY = c.ERR_TOPOLOGY; + ERR_DIMS = c.ERR_DIMS; + ERR_ARG = c.ERR_ARG; + ERR_UNKNOWN = c.ERR_UNKNOWN; + ERR_TRUNCATE = c.ERR_TRUNCATE; + ERR_OTHER = c.ERR_OTHER; + ERR_INTERN = c.ERR_INTERN; + ERR_IN_STATUS = c.ERR_IN_STATUS; + ERR_PENDING = c.ERR_PENDING; + ERR_ACCESS = c.ERR_ACCESS; + ERR_AMODE = c.ERR_AMODE; + ERR_ASSERT = c.ERR_ASSERT; + ERR_BAD_FILE = c.ERR_BAD_FILE; + ERR_BASE = c.ERR_BASE; + ERR_CONVERSION = c.ERR_CONVERSION; + ERR_DISP = c.ERR_DISP; + ERR_DUP_DATAREP = c.ERR_DUP_DATAREP; + ERR_FILE_EXISTS = c.ERR_FILE_EXISTS; + ERR_FILE_IN_USE = c.ERR_FILE_IN_USE; + ERR_FILE = c.ERR_FILE; + ERR_INFO_KEY = c.ERR_INFO_KEY; + ERR_INFO_NOKEY = c.ERR_INFO_NOKEY; + ERR_INFO_VALUE = c.ERR_INFO_VALUE; + ERR_INFO = c.ERR_INFO; + ERR_IO = c.ERR_IO; + ERR_KEYVAL = c.ERR_KEYVAL; + ERR_LOCKTYPE = c.ERR_LOCKTYPE; + ERR_NAME = c.ERR_NAME; + ERR_NO_MEM = c.ERR_NO_MEM; + ERR_NOT_SAME = c.ERR_NOT_SAME; + ERR_NO_SPACE = c.ERR_NO_SPACE; + ERR_NO_SUCH_FILE = c.ERR_NO_SUCH_FILE; + ERR_PORT = c.ERR_PORT; + ERR_QUOTA = c.ERR_QUOTA; + ERR_READ_ONLY = c.ERR_READ_ONLY; + ERR_RMA_CONFLICT = c.ERR_RMA_CONFLICT; + ERR_RMA_SYNC = c.ERR_RMA_SYNC; + ERR_SERVICE = c.ERR_SERVICE; + ERR_SIZE = c.ERR_SIZE; + ERR_SPAWN = c.ERR_SPAWN; + ERR_UNSUPPORTED_DATAREP = c.ERR_UNSUPPORTED_DATAREP; + ERR_UNSUPPORTED_OPERATION = c.ERR_UNSUPPORTED_OPERATION; + ERR_WIN = c.ERR_WIN; + ERR_LASTCODE = c.ERR_LASTCODE; + ERR_SYSRESOURCE = c.ERR_SYSRESOURCE; + } + + private static native Int2 newInt2(); + private static native ShortInt newShortInt(); + private static native LongInt newLongInt(); + private static native FloatInt newFloatInt(); + private static native DoubleInt newDoubleInt(); + + private static void initCommon() throws MPIException + { + initialized = true; + + DATATYPE_NULL.setBasic(Datatype.NULL); + + BYTE.setBasic(Datatype.BYTE); + CHAR.setBasic(Datatype.CHAR); + SHORT.setBasic(Datatype.SHORT); + BOOLEAN.setBasic(Datatype.BOOLEAN); + INT.setBasic(Datatype.INT); + LONG.setBasic(Datatype.LONG); + FLOAT.setBasic(Datatype.FLOAT); + DOUBLE.setBasic(Datatype.DOUBLE); + PACKED.setBasic(Datatype.PACKED); + + INT2.setBasic(Datatype.INT2, MPI.BYTE); + SHORT_INT.setBasic(Datatype.SHORT_INT, MPI.BYTE); + LONG_INT.setBasic(Datatype.LONG_INT, MPI.BYTE); + FLOAT_INT.setBasic(Datatype.FLOAT_INT, MPI.BYTE); + DOUBLE_INT.setBasic(Datatype.DOUBLE_INT, MPI.BYTE); + FLOAT_COMPLEX.setBasic(Datatype.FLOAT_COMPLEX, MPI.FLOAT); + DOUBLE_COMPLEX.setBasic(Datatype.DOUBLE_COMPLEX, MPI.DOUBLE); + + COMM_WORLD.setType(Intracomm.WORLD); + COMM_SELF.setType(Intracomm.SELF); + } + + /** + * Initialize MPI. + *

Java binding of the MPI operation {@code MPI_INIT}. + * @param args arguments to the {@code main} method. + * @return arguments + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static String[] Init(String[] args) throws MPIException + { + if(initialized) + throw new MPIException("MPI is already initialized."); + + String[] newArgs = Init_jni(args); + initCommon(); + return newArgs; + } + + private static native String [] Init_jni(String[] args); + + /** + * Initialize MPI with threads. + *

Java binding of the MPI operation {@code MPI_INIT_THREAD}. + * @param args arguments to the {@code main} method. + * @param required desired level of thread support + * @return provided level of thread support + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int InitThread(String[] args, int required) throws MPIException + { + if(initialized) + throw new MPIException("MPI is already initialized."); + + int provided = InitThread_jni(args, required); + initCommon(); + return provided; + } + + private static native int InitThread_jni(String[] args, int required) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_QUERY_THREAD}. + * @return provided level of thread support + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int queryThread() throws MPIException + { + MPI.check(); + return queryThread_jni(); + } + + private static native int queryThread_jni() throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_IS_THREAD_MAIN}. + * @return true if it is the main thread + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static boolean isThreadMain() throws MPIException + { + MPI.check(); + return isThreadMain_jni(); + } + + private static native boolean isThreadMain_jni() throws MPIException; + + /** + * Finalize MPI. + *

Java binding of the MPI operation {@code MPI_FINALIZE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void Finalize() throws MPIException + { + check(); + Finalize_jni(); + finalized = true; + } + + private static native void Finalize_jni() throws MPIException; + + /** + * Returns an elapsed time on the calling processor. + *

Java binding of the MPI operation {@code MPI_WTIME}. + * @return time in seconds since an arbitrary time in the past. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static double wtime() throws MPIException + { + check(); + return wtime_jni(); + } + + private static native double wtime_jni(); + + /** + * Returns resolution of timer. + *

Java binding of the MPI operation {MPI_WTICK}. + * @return resolution of {@code wtime} in seconds. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static double wtick() throws MPIException + { + check(); + return wtick_jni(); + } + + private static native double wtick_jni(); + + /** + * Returns the name of the processor on which it is called. + *

Java binding of the MPI operation {@code MPI_GET_PROCESSOR_NAME}. + * @return A unique specifier for the actual node. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public String getProcessorName() throws MPIException + { + check(); + byte[] buf = new byte[MAX_PROCESSOR_NAME]; + int lengh = getProcessorName(buf); + return new String(buf,0,lengh); + } + + static private native int getProcessorName(byte[] buf); + + /** + * Test if MPI has been initialized. + *

Java binding of the MPI operation {@code MPI_INITIALIZED}. + * @return {@code true} if {@code Init} has been called, + * {@code false} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public native boolean isInitialized() throws MPIException; + + /** + * Test if MPI has been finalized. + *

Java binding of the MPI operation {@code MPI_FINALIZED}. + * @return {@code true} if {@code Finalize} has been called, + * {@code false} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public native boolean isFinalized() throws MPIException; + + /** + * Attaches a user-provided buffer for sending. + *

Java binding of the MPI operation {@code MPI_BUFFER_ATTACH}. + * @param buffer initial buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public void attachBuffer(byte[] buffer) throws MPIException + { + check(); + MPI.buffer = buffer; + attachBuffer_jni(buffer); + } + + static private native void attachBuffer_jni(byte[] buffer); + + /** + * Removes an existing buffer (for use in sending). + *

Java binding of the MPI operation {@code MPI_BUFFER_DETACH}. + * @return initial buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + static public byte[] detachBuffer() throws MPIException + { + check(); + detachBuffer_jni(buffer); + byte[] result = MPI.buffer; + MPI.buffer = null; + return result; + } + + static private native void detachBuffer_jni(byte[] buffer); + + /** + * Controls profiling. + *

This method is not implemented. + *

Java binding of the MPI operation {@code MPI_PCONTROL}. + * @param level Profiling level. + * @param obj Profiling information. + */ + public static void pControl(int level, Object obj) + { + // Nothing to do here. + } + + /** + * Check if MPI has been initialized and hasn't been finalized. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + protected static void check() throws MPIException + { + if(!initialized) + throw new MPIException("MPI is not initialized."); + + if(finalized) + throw new MPIException("MPI is finalized."); + } + + protected static byte[] attrSet(Object value) throws MPIException + { + try + { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream os = new ObjectOutputStream(baos); + os.writeObject(value); + os.close(); + return baos.toByteArray(); + } + catch(IOException ex) + { + MPIException mpiex = new MPIException(ex); + mpiex.setStackTrace(ex.getStackTrace()); + throw mpiex; + } + } + + protected static Object attrGet(byte[] value) throws MPIException + { + if(value == null) + return null; + + try + { + ByteArrayInputStream bais = new ByteArrayInputStream(value); + ObjectInputStream is = new ObjectInputStream(bais); + Object obj = is.readObject(); + is.close(); + return obj; + } + catch(ClassNotFoundException ex) + { + throw new MPIException(ex); + } + catch(IOException ex) + { + throw new MPIException(ex); + } + } + + /** + * Allocates a new direct byte buffer. + * @param capacity The new buffer's capacity, in bytes + * @return The new byte buffer + */ + public static ByteBuffer newByteBuffer(int capacity) + { + ByteBuffer buf = ByteBuffer.allocateDirect(capacity); + buf.order(nativeOrder); + return buf; + } + + /** + * Allocates a new direct char buffer. + * @param capacity The new buffer's capacity, in chars + * @return The new char buffer + */ + public static CharBuffer newCharBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 2; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); + buf.order(nativeOrder); + return buf.asCharBuffer(); + } + + /** + * Allocates a new direct short buffer. + * @param capacity The new buffer's capacity, in shorts + * @return The new short buffer + */ + public static ShortBuffer newShortBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 2; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); + buf.order(nativeOrder); + return buf.asShortBuffer(); + } + + /** + * Allocates a new direct int buffer. + * @param capacity The new buffer's capacity, in ints + * @return The new int buffer + */ + public static IntBuffer newIntBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 4; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); + buf.order(nativeOrder); + return buf.asIntBuffer(); + } + + /** + * Allocates a new direct long buffer. + * @param capacity The new buffer's capacity, in longs + * @return The new long buffer + */ + public static LongBuffer newLongBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 8; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); + buf.order(nativeOrder); + return buf.asLongBuffer(); + } + + /** + * Allocates a new direct float buffer. + * @param capacity The new buffer's capacity, in floats + * @return The new float buffer + */ + public static FloatBuffer newFloatBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 4; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); + buf.order(nativeOrder); + return buf.asFloatBuffer(); + } + + /** + * Allocates a new direct double buffer. + * @param capacity The new buffer's capacity, in doubles + * @return The new double buffer + */ + public static DoubleBuffer newDoubleBuffer(int capacity) + { + assert capacity <= Integer.MAX_VALUE / 8; + ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); + buf.order(nativeOrder); + return buf.asDoubleBuffer(); + } + + /** + * Asserts that a buffer is direct. + * @param buf buffer + */ + protected static void assertDirectBuffer(Buffer buf) + { + if(!buf.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + } + + /** + * Asserts that buffers are direct. + * @param sendbuf The send buffer + * @param recvbuf The receive buffer + */ + protected static void assertDirectBuffer(Buffer sendbuf, Buffer recvbuf) + { + if(!sendbuf.isDirect()) + throw new IllegalArgumentException("The send buffer must be direct."); + + if(!recvbuf.isDirect()) + throw new IllegalArgumentException("The recv. buffer must be direct."); + } + + /** + * Checks if an object is a direct buffer. + * @param obj object + * @return true if the object is a direct buffer + */ + protected static boolean isDirectBuffer(Object obj) + { + return obj instanceof Buffer && ((Buffer)obj).isDirect(); + } + + /** + * Checks if an object is a heap buffer. + * @param obj object + * @return true if the object is a heap buffer + */ + protected static boolean isHeapBuffer(Object obj) + { + return obj instanceof Buffer && !((Buffer)obj).isDirect(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ByteBuffer slice(ByteBuffer buf, int offset) + { + return ((ByteBuffer)buf.clear().position(offset)) + .slice().order(nativeOrder); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static CharBuffer slice(CharBuffer buf, int offset) + { + return ((CharBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ShortBuffer slice(ShortBuffer buf, int offset) + { + return ((ShortBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static IntBuffer slice(IntBuffer buf, int offset) + { + return ((IntBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static LongBuffer slice(LongBuffer buf, int offset) + { + return ((LongBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static FloatBuffer slice(FloatBuffer buf, int offset) + { + return ((FloatBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static DoubleBuffer slice(DoubleBuffer buf, int offset) + { + return ((DoubleBuffer)buf.clear().position(offset)).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ByteBuffer slice(byte[] buf, int offset) + { + return ByteBuffer.wrap(buf, offset, buf.length - offset) + .slice().order(nativeOrder); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static CharBuffer slice(char[] buf, int offset) + { + return CharBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static ShortBuffer slice(short[] buf, int offset) + { + return ShortBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static IntBuffer slice(int[] buf, int offset) + { + return IntBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static LongBuffer slice(long[] buf, int offset) + { + return LongBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static FloatBuffer slice(float[] buf, int offset) + { + return FloatBuffer.wrap(buf, offset, buf.length - offset).slice(); + } + + /** + * Creates a new buffer whose content is a shared subsequence of a buffer. + *

The content of the new buffer will start at the specified offset. + * @param buf buffer + * @param offset offset + * @return the new buffer. + */ + public static DoubleBuffer slice(double[] buf, int offset) + { + return DoubleBuffer.wrap(buf, offset, buf.length - offset).slice(); + } } // MPI diff --git a/ompi/mpi/java/java/MPIException.java b/ompi/mpi/java/java/MPIException.java index 4cce5bfce46..27fcb36187e 100644 --- a/ompi/mpi/java/java/MPIException.java +++ b/ompi/mpi/java/java/MPIException.java @@ -9,31 +9,33 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : MPIException.java * Author : Bryan Carpenter * Created : Tue Sep 14 13:03:57 EDT 1999 @@ -52,50 +54,50 @@ */ public final class MPIException extends Exception { -private int errorCode, errorClass; + private int errorCode, errorClass; -protected MPIException(int code, int clazz, String message) -{ - super(message); - errorCode = code; - errorClass = clazz; -} + protected MPIException(int code, int clazz, String message) + { + super(message); + errorCode = code; + errorClass = clazz; + } -/** - * Creates an exception. - * @param message message associated to the exception - */ -public MPIException(String message) -{ - super(message); -} + /** + * Creates an exception. + * @param message message associated to the exception + */ + public MPIException(String message) + { + super(message); + } -/** - * Creates an exception: - * @param cause cause associated to the exception - */ -public MPIException(Throwable cause) -{ - super(cause); - setStackTrace(cause.getStackTrace()); -} + /** + * Creates an exception: + * @param cause cause associated to the exception + */ + public MPIException(Throwable cause) + { + super(cause); + setStackTrace(cause.getStackTrace()); + } -/** - * Gets the MPI error code. - * @return error code - */ -public int getErrorCode() -{ - return errorCode; -} + /** + * Gets the MPI error code. + * @return error code + */ + public int getErrorCode() + { + return errorCode; + } -/** - * Gets the MPI error class. - * @return error class - */ -public int getErrorClass() -{ - return errorClass; -} + /** + * Gets the MPI error class. + * @return error class + */ + public int getErrorClass() + { + return errorClass; + } } // MPIException diff --git a/ompi/mpi/java/java/Message.java b/ompi/mpi/java/java/Message.java index b4efbec6f77..e042b1c4020 100644 --- a/ompi/mpi/java/java/Message.java +++ b/ompi/mpi/java/java/Message.java @@ -16,8 +16,8 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * IMPLEMENTATION DETAILS * * All methods with buffers that can be direct or non direct have @@ -36,126 +36,126 @@ */ public final class Message { -protected long handle; -private static long NULL, NO_PROC; - -static -{ - init(); -} - -private static native void init(); - -/** - * Creates a {@code MPI_MESSAGE_NULL}. - */ -public Message() -{ - handle = NULL; -} - -/** - * Tests if the message is {@code MPI_MESSAGE_NULL}. - * @return true if the message is {@code MPI_MESSAGE_NULL}. - */ -public boolean isNull() -{ - return handle == NULL; -} - -/** - * Tests if the message is {@code MPI_MESSAGE_NO_PROC}. - * @return true if the message is {@code MPI_MESSAGE_NO_PROC}. - */ -public boolean isNoProc() -{ - return handle == NO_PROC; -} - -/** - * Java binding of {@code MPI_MPROBE}. - * @param source rank of the source - * @param tag message tag - * @param comm communicator - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status mProbe(int source, int tag, Comm comm) throws MPIException -{ - MPI.check(); - Status status = new Status(); - handle = mProbe(source, tag, comm.handle, status.data); - return status; -} - -private native long mProbe(int source, int tag, long comm, long[] status) - throws MPIException; - -/** - * Java binding of {@code MPI_IMPROBE}. - * @param source rank of the source - * @param tag message tag - * @param comm communicator - * @return status object if there is a message, {@code null} otherwise - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status imProbe(int source, int tag, Comm comm) throws MPIException -{ - MPI.check(); - return imProbe(source, tag, comm.handle); -} - -private native Status imProbe(int source, int tag, long comm) - throws MPIException; - -/** - * Java binding of {@code MPI_MRECV}. - * @param buf receive buffer - * @param count number of elements in receve buffer - * @param type datatype of each receive buffer element - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Status mRecv(Object buf, int count, Datatype type) throws MPIException -{ - MPI.check(); - int off = 0; - boolean db = false; - Status status = new Status(); - - if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) - { - off = type.getOffset(buf); - buf = ((Buffer)buf).array(); - } - - handle = mRecv(handle, buf, db, off, count, - type.handle, type.baseType, status.data); - - return status; -} - -private native long mRecv( - long message, Object buf, boolean db, int offset, int count, - long type, int baseType, long[] status) throws MPIException; - -/** - * Java binding of {@code MPI_IMRECV}. - * @param buf receive buffer - * @param count number of elements in receve buffer - * @param type datatype of each receive buffer element - * @return request object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request imRecv(Buffer buf, int count, Datatype type) - throws MPIException -{ - MPI.check(); - assertDirectBuffer(buf); - return new Request(imRecv(handle, buf, count, type.handle)); -} - -private native long imRecv(long message, Object buf, int count, long type) - throws MPIException; + protected long handle; + private static long NULL, NO_PROC; + + static + { + init(); + } + + private static native void init(); + + /** + * Creates a {@code MPI_MESSAGE_NULL}. + */ + public Message() + { + handle = NULL; + } + + /** + * Tests if the message is {@code MPI_MESSAGE_NULL}. + * @return true if the message is {@code MPI_MESSAGE_NULL}. + */ + public boolean isNull() + { + return handle == NULL; + } + + /** + * Tests if the message is {@code MPI_MESSAGE_NO_PROC}. + * @return true if the message is {@code MPI_MESSAGE_NO_PROC}. + */ + public boolean isNoProc() + { + return handle == NO_PROC; + } + + /** + * Java binding of {@code MPI_MPROBE}. + * @param source rank of the source + * @param tag message tag + * @param comm communicator + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status mProbe(int source, int tag, Comm comm) throws MPIException + { + MPI.check(); + Status status = new Status(); + handle = mProbe(source, tag, comm.handle, status.data); + return status; + } + + private native long mProbe(int source, int tag, long comm, long[] status) + throws MPIException; + + /** + * Java binding of {@code MPI_IMPROBE}. + * @param source rank of the source + * @param tag message tag + * @param comm communicator + * @return status object if there is a message, {@code null} otherwise + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status imProbe(int source, int tag, Comm comm) throws MPIException + { + MPI.check(); + return imProbe(source, tag, comm.handle); + } + + private native Status imProbe(int source, int tag, long comm) + throws MPIException; + + /** + * Java binding of {@code MPI_MRECV}. + * @param buf receive buffer + * @param count number of elements in receve buffer + * @param type datatype of each receive buffer element + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Status mRecv(Object buf, int count, Datatype type) throws MPIException + { + MPI.check(); + int off = 0; + boolean db = false; + Status status = new Status(); + + if(buf instanceof Buffer && !(db = ((Buffer)buf).isDirect())) + { + off = type.getOffset(buf); + buf = ((Buffer)buf).array(); + } + + handle = mRecv(handle, buf, db, off, count, + type.handle, type.baseType, status.data); + + return status; + } + + private native long mRecv( + long message, Object buf, boolean db, int offset, int count, + long type, int baseType, long[] status) throws MPIException; + + /** + * Java binding of {@code MPI_IMRECV}. + * @param buf receive buffer + * @param count number of elements in receve buffer + * @param type datatype of each receive buffer element + * @return request object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request imRecv(Buffer buf, int count, Datatype type) + throws MPIException + { + MPI.check(); + assertDirectBuffer(buf); + return new Request(imRecv(handle, buf, count, type.handle)); + } + + private native long imRecv(long message, Object buf, int count, long type) + throws MPIException; } // Message diff --git a/ompi/mpi/java/java/Op.java b/ompi/mpi/java/java/Op.java index ffd3ffbf6db..e65de6bea60 100644 --- a/ompi/mpi/java/java/Op.java +++ b/ompi/mpi/java/java/Op.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Op.java * Author : Xinying Li, Sang LIm * Created : Thu Apr 9 12:22:15 1998 @@ -54,80 +54,80 @@ */ public final class Op implements Freeable { -protected final UserFunction uf; -private boolean commute; -private Datatype datatype; -protected long handle; - -static -{ - init(); -} - -private static native void init(); - -protected Op(int type) -{ - getOp(type); - uf = null; - commute = true; -} - -private native void getOp(int type); - -/** - * Bind a user-defined global reduction operation to an {@code Op} object. - *

Java binding of the MPI operation {@code MPI_OP_CREATE}. - * @param function user defined function - * @param commute {@code true} if commutative, {@code false} otherwise - */ -public Op(UserFunction function, boolean commute) -{ - handle = 0; // When JNI code gets the handle it will be initialized. - uf = function; - this.commute = commute; -} - -protected void setDatatype(Datatype t) -{ - datatype = t; -} - -protected void call(Object invec, Object inoutvec, int count) - throws MPIException -{ - if(datatype.baseType == Datatype.BOOLEAN) - { - uf.call(invec, inoutvec, count, datatype); - } - else - { - uf.call(((ByteBuffer)invec).order(ByteOrder.nativeOrder()), - ((ByteBuffer)inoutvec).order(ByteOrder.nativeOrder()), - count, datatype); - } -} - -/** - * Test if the operation is conmutative. - *

Java binding of the MPI operation {@code MPI_OP_COMMUTATIVE}. - * @return {@code true} if commutative, {@code false} otherwise - */ -public boolean isCommutative() -{ - return commute; -} - -/** - * Java binding of the MPI operation {@code MPI_OP_FREE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public native void free() throws MPIException; - -/** - * Test if operation object is null. - * @return true if the operation object is null, false otherwise - */ -public native boolean isNull(); + protected final UserFunction uf; + private boolean commute; + private Datatype datatype; + protected long handle; + + static + { + init(); + } + + private static native void init(); + + protected Op(int type) + { + getOp(type); + uf = null; + commute = true; + } + + private native void getOp(int type); + + /** + * Bind a user-defined global reduction operation to an {@code Op} object. + *

Java binding of the MPI operation {@code MPI_OP_CREATE}. + * @param function user defined function + * @param commute {@code true} if commutative, {@code false} otherwise + */ + public Op(UserFunction function, boolean commute) + { + handle = 0; // When JNI code gets the handle it will be initialized. + uf = function; + this.commute = commute; + } + + protected void setDatatype(Datatype t) + { + datatype = t; + } + + protected void call(Object invec, Object inoutvec, int count) + throws MPIException + { + if(datatype.baseType == Datatype.BOOLEAN) + { + uf.call(invec, inoutvec, count, datatype); + } + else + { + uf.call(((ByteBuffer)invec).order(ByteOrder.nativeOrder()), + ((ByteBuffer)inoutvec).order(ByteOrder.nativeOrder()), + count, datatype); + } + } + + /** + * Test if the operation is conmutative. + *

Java binding of the MPI operation {@code MPI_OP_COMMUTATIVE}. + * @return {@code true} if commutative, {@code false} otherwise + */ + public boolean isCommutative() + { + return commute; + } + + /** + * Java binding of the MPI operation {@code MPI_OP_FREE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public native void free() throws MPIException; + + /** + * Test if operation object is null. + * @return true if the operation object is null, false otherwise + */ + public native boolean isNull(); } // Op diff --git a/ompi/mpi/java/java/Prequest.java b/ompi/mpi/java/java/Prequest.java index fd7b88706b6..b633330af35 100644 --- a/ompi/mpi/java/java/Prequest.java +++ b/ompi/mpi/java/java/Prequest.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Prequest.java * Author : Sang Lim, Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 @@ -52,45 +52,45 @@ */ public final class Prequest extends Request { -/** - * Constructor used by {@code sendInit}, etc. - * @param handle Handle for the Prequest object - */ -protected Prequest(long handle) -{ - super(handle); -} + /** + * Constructor used by {@code sendInit}, etc. + * @param handle Handle for the Prequest object + */ + protected Prequest(long handle) + { + super(handle); + } -/** - * Activate a persistent communication request. - *

Java binding of the MPI operation {@code MPI_START}. - * The communication is completed by using the request in - * one of the {@code wait} or {@code test} operations. - * On successful completion the request becomes inactive again. - * It can be reactivated by a further call to {@code Start}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void start() throws MPIException -{ - handle = start(handle); -} + /** + * Activate a persistent communication request. + *

Java binding of the MPI operation {@code MPI_START}. + * The communication is completed by using the request in + * one of the {@code wait} or {@code test} operations. + * On successful completion the request becomes inactive again. + * It can be reactivated by a further call to {@code Start}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void start() throws MPIException + { + handle = start(handle); + } -private native long start(long request) throws MPIException; + private native long start(long request) throws MPIException; -/** - * Activate a list of communication requests. - *

Java binding of the MPI operation {@code MPI_STARTALL}. - * @param requests array of requests - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void startAll(Prequest[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - startAll(r); - setHandles(requests, r); -} + /** + * Activate a list of communication requests. + *

Java binding of the MPI operation {@code MPI_STARTALL}. + * @param requests array of requests + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void startAll(Prequest[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + startAll(r); + setHandles(requests, r); + } -private native static void startAll(long[] requests) throws MPIException; + private native static void startAll(long[] requests) throws MPIException; } // Prequest diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index dd86880ca7f..8b400abb7a8 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -16,35 +16,35 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* File : Request.java + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * File : Request.java * Author : Sang Lim, Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 * Revision : $Revision: 1.11 $ * Updated : $Date: 2001/08/07 16:36:25 $ * Copyright: Northeast Parallel Architectures Center * at Syracuse University 1998 - */ - -/* + * + * + * * Note: in a send request for a buffer containing objects, the primary * `MPI_Request' referenced by `handle' is the request to send the data. * The request to send the header is in the secondary field, `hdrReq'. @@ -52,9 +52,9 @@ * the primary `MPI_Request' is the request to send the header. * The receive of the data is not initiated until a `wait' or `test' * operation succeeds. - */ - -/* + * + * + * * Probably `Request' should be an abstract class, and there should * be several concrete subclasses. At the moment requests are created * in a few different ways, and the differently constructed requests are @@ -68,402 +68,402 @@ */ public class Request implements Freeable { -protected long handle; - -static -{ - init(); -} - -private static native void init(); - -protected static native long getNull(); - -protected Request(long handle) -{ - this.handle = handle; -} - -/** - * Set the request object to be void. - * Java binding of the MPI operation {@code MPI_REQUEST_FREE}. - */ -@Override public void free() throws MPIException -{ - if(!isNull()) - { - MPI.check(); - handle = free(handle); - } -} - -private native long free(long req) throws MPIException; - -/** - * Mark a pending nonblocking communication for cancellation. - * Java binding of the MPI operation {@code MPI_CANCEL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void cancel() throws MPIException -{ - MPI.check(); - cancel(handle); -} - -private native void cancel(long request) throws MPIException; - -/** - * Test if request object is null. - * @return true if the request object is null, false otherwise - */ -public final boolean isNull() -{ - return handle == 0 || handle == MPI.REQUEST_NULL.handle; -} - -/** - * Blocks until the operation identified by the request is complete. - *

Java binding of the MPI operation {@code MPI_WAIT}. - *

After the call returns, the request object becomes inactive. - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Status waitStatus() throws MPIException -{ - MPI.check(); - Status status = new Status(); - handle = waitStatus(handle, status.data); - return status; -} - -private native long waitStatus(long request, long[] stat) throws MPIException; - -/** - * Blocks until the operation identified by the request is complete. - *

Java binding of the MPI operation {@code MPI_WAIT}. - *

After the call returns, the request object becomes inactive. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final void waitFor() throws MPIException -{ - MPI.check(); - handle = waitFor(handle); -} - -private native long waitFor(long request) throws MPIException; - -/** - * Returns a status object if the operation identified by the request - * is complete, or a null reference otherwise. - *

Java binding of the MPI operation {@code MPI_TEST}. - *

After the call, if the operation is complete (ie, if the return - * value is non-null), the request object becomes inactive. - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Status testStatus() throws MPIException -{ - MPI.check(); - return testStatus(handle); -} - -private native Status testStatus(long request) throws MPIException; - -/** - * Returns true if the operation identified by the request - * is complete, or false otherwise. - *

Java binding of the MPI operation {@code MPI_TEST}. - *

After the call, if the operation is complete (ie, if the return - * value is true), the request object becomes inactive. - * @return true if the operation identified by the request, false otherwise - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final boolean test() throws MPIException -{ - MPI.check(); - return test(handle); -} - -private native boolean test(long handle) throws MPIException; - -/** - * Blocks until one of the operations associated with the active - * requests in the array has completed. - *

Java binding of the MPI operation {@code MPI_WAITANY}. - *

The index in array of {@code requests} for the request that - * completed can be obtained from the returned status object through - * the {@code Status.getIndex()} method. The corresponding element - * of array of {@code requests} becomes inactive. - * @param requests array of requests - * @return status object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Status waitAnyStatus(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - Status status = new Status(); - waitAnyStatus(r, status.data); - setHandles(requests, r); - return status; -} - -private static native void waitAnyStatus(long[] requests, long[] status) - throws MPIException; - -/** - * Blocks until one of the operations associated with the active - * requests in the array has completed. - *

Java binding of the MPI operation {@code MPI_WAITANY}. - *

The request that completed becomes inactive. - * @param requests array of requests - * @return The index in array of {@code requests} for the request that - * completed. If all of the requests are MPI_REQUEST_NULL, then index - * is returned as {@code MPI.UNDEFINED}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int waitAny(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - int index = waitAny(r); - setHandles(requests, r); - return index; -} - -private static native int waitAny(long[] requests) throws MPIException; - -/** - * Tests for completion of either one or none of the operations - * associated with active requests. - *

Java binding of the MPI operation {@code MPI_TESTANY}. - *

If some request completed, the index in array of {@code requests} - * for that request can be obtained from the returned status object. - * The corresponding element in array of {@code requests} becomes inactive. - * If no request completed, {testAny} returns {@code null}. - * @param requests array of requests - * @return status object if one request completed, {@code null} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Status testAnyStatus(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - Status status = testAnyStatus(r); - setHandles(requests, r); - return status; -} - -private static native Status testAnyStatus(long[] requests) throws MPIException; - -/** - * Tests for completion of either one or none of the operations - * associated with active requests. - *

Java binding of the MPI operation {@code MPI_TESTANY}. - *

If some request completed, ii becomes inactive. - * @param requests array of requests - * @return index of operation that completed, or {@code MPI.UNDEFINED} - * if none completed. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int testAny(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - int index = testAny(r); - setHandles(requests, r); - return index; -} - -private static native int testAny(long[] requests) throws MPIException; - -/** - * Blocks until all of the operations associated with the active - * requests in the array have completed. - *

Java binding of the MPI operation {@code MPI_WAITALL}. - *

On exit, requests become inactive. If the input value of - * array of {@code requests} contains inactive requests, corresponding - * elements of the status array will contain null status references. - * @param requests array of requests - * @return array of statuses - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Status[] waitAllStatus(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - Status[] status = waitAllStatus(r); - setHandles(requests, r); - return status; -} - -private static native Status[] waitAllStatus(long[] requests) - throws MPIException; - -/** - * Blocks until all of the operations associated with the active - * requests in the array have completed. - *

Java binding of the MPI operation {@code MPI_WAITALL}. - * @param requests array of requests - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void waitAll(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - waitAll(r); - setHandles(requests, r); -} - -private static native void waitAll(long[] requests) throws MPIException; - -/** - * Tests for completion of all of the operations associated - * with active requests. - *

Java binding of the MPI operation {@code MPI_TESTALL}. - *

If all operations have completed, the exit value of the argument array - * is as for {@code waitAllStatus}. - * @param requests array of requests - * @return array of statuses if all operations have completed, - * {@code null} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Status[] testAllStatus(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - Status[] status = testAllStatus(r); - setHandles(requests, r); - return status; -} - -private static native Status[] testAllStatus(long[] requests) - throws MPIException; - -/** - * Tests for completion of all of the operations associated - * with active requests. - *

Java binding of the MPI operation {@code MPI_TESTALL}. - * @param requests array of requests - * @return {@code true} if all operations have completed, - * {@code false} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static boolean testAll(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - boolean completed = testAll(r); - setHandles(requests, r); - return completed; -} - -private static native boolean testAll(long[] requests) throws MPIException; - -/** - * Blocks until at least one of the operations associated with the active - * requests in the array has completed. - *

Java binding of the MPI operation {@code MPI_WAITSOME}. - *

The size of the result array will be the number of operations that - * completed. The index in array of {@code requests} for each request that - * completed can be obtained from the returned status objects through the - * {@code Status.getIndex()} method. The corresponding element in - * array of {@code requests} becomes inactive. - * @param requests array of requests - * @return array of statuses or {@code null} if the number of operations - * completed is {@code MPI_UNDEFINED}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Status[] waitSomeStatus(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - Status[] status = waitSomeStatus(r); - setHandles(requests, r); - return status; -} - -private static native Status[] waitSomeStatus(long[] requests) - throws MPIException; - -/** - * Blocks until at least one of the operations associated with the active - * active requests in the array has completed. - *

Java binding of the MPI operation {@code MPI_WAITSOME}. - *

The size of the result array will be the number of operations that - * completed. The corresponding element in array of {@code requests} becomes - * inactive. - * @param requests array of requests - * @return array of indexes of {@code requests} that completed or {@code null} - * if the number of operations completed is {@code MPI_UNDEFINED}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int[] waitSome(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - int[] indexes = waitSome(r); - setHandles(requests, r); - return indexes; -} - -private static native int[] waitSome(long[] requests) throws MPIException; - -/** - * Behaves like {@code waitSome}, except that it returns immediately. - *

Java binding of the MPI operation {@code MPI_TESTSOME}. - *

If no operation has completed, {@code testSome} returns an array of - * length zero, otherwise the return value are as for {@code waitSome}. - * @param requests array of requests - * @return array of statuses - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static Status[] testSomeStatus(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - Status[] status = testSomeStatus(r); - setHandles(requests, r); - return status; -} - -private static native Status[] testSomeStatus(long[] requests) - throws MPIException; - -/** - * Behaves like {@code waitSome}, except that it returns immediately. - *

Java binding of the MPI operation {@code MPI_TESTSOME}. - *

If no operation has completed, {@code testSome} returns an array of - * length zero, otherwise the return value are as for {@code waitSome}. - * @param requests array of requests - * @return array of indexes of {@code requests} that completed. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int[] testSome(Request[] requests) throws MPIException -{ - MPI.check(); - long[] r = getHandles(requests); - int[] indexes = testSome(r); - setHandles(requests, r); - return indexes; -} - -private static native int[] testSome(long[] requests) throws MPIException; - -protected static long[] getHandles(Request[] r) -{ - long[] h = new long[r.length]; - - for(int i = 0; i < r.length; i++) - h[i] = r[i].handle; - - return h; -} - -protected static void setHandles(Request[] r, long[] h) -{ - for(int i = 0; i < r.length; i++) - r[i].handle = h[i]; -} + protected long handle; + + static + { + init(); + } + + private static native void init(); + + protected static native long getNull(); + + protected Request(long handle) + { + this.handle = handle; + } + + /** + * Set the request object to be void. + * Java binding of the MPI operation {@code MPI_REQUEST_FREE}. + */ + @Override public void free() throws MPIException + { + if(!isNull()) + { + MPI.check(); + handle = free(handle); + } + } + + private native long free(long req) throws MPIException; + + /** + * Mark a pending nonblocking communication for cancellation. + * Java binding of the MPI operation {@code MPI_CANCEL}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void cancel() throws MPIException + { + MPI.check(); + cancel(handle); + } + + private native void cancel(long request) throws MPIException; + + /** + * Test if request object is null. + * @return true if the request object is null, false otherwise + */ + public final boolean isNull() + { + return handle == 0 || handle == MPI.REQUEST_NULL.handle; + } + + /** + * Blocks until the operation identified by the request is complete. + *

Java binding of the MPI operation {@code MPI_WAIT}. + *

After the call returns, the request object becomes inactive. + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Status waitStatus() throws MPIException + { + MPI.check(); + Status status = new Status(); + handle = waitStatus(handle, status.data); + return status; + } + + private native long waitStatus(long request, long[] stat) throws MPIException; + + /** + * Blocks until the operation identified by the request is complete. + *

Java binding of the MPI operation {@code MPI_WAIT}. + *

After the call returns, the request object becomes inactive. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final void waitFor() throws MPIException + { + MPI.check(); + handle = waitFor(handle); + } + + private native long waitFor(long request) throws MPIException; + + /** + * Returns a status object if the operation identified by the request + * is complete, or a null reference otherwise. + *

Java binding of the MPI operation {@code MPI_TEST}. + *

After the call, if the operation is complete (ie, if the return + * value is non-null), the request object becomes inactive. + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Status testStatus() throws MPIException + { + MPI.check(); + return testStatus(handle); + } + + private native Status testStatus(long request) throws MPIException; + + /** + * Returns true if the operation identified by the request + * is complete, or false otherwise. + *

Java binding of the MPI operation {@code MPI_TEST}. + *

After the call, if the operation is complete (ie, if the return + * value is true), the request object becomes inactive. + * @return true if the operation identified by the request, false otherwise + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final boolean test() throws MPIException + { + MPI.check(); + return test(handle); + } + + private native boolean test(long handle) throws MPIException; + + /** + * Blocks until one of the operations associated with the active + * requests in the array has completed. + *

Java binding of the MPI operation {@code MPI_WAITANY}. + *

The index in array of {@code requests} for the request that + * completed can be obtained from the returned status object through + * the {@code Status.getIndex()} method. The corresponding element + * of array of {@code requests} becomes inactive. + * @param requests array of requests + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Status waitAnyStatus(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + Status status = new Status(); + waitAnyStatus(r, status.data); + setHandles(requests, r); + return status; + } + + private static native void waitAnyStatus(long[] requests, long[] status) + throws MPIException; + + /** + * Blocks until one of the operations associated with the active + * requests in the array has completed. + *

Java binding of the MPI operation {@code MPI_WAITANY}. + *

The request that completed becomes inactive. + * @param requests array of requests + * @return The index in array of {@code requests} for the request that + * completed. If all of the requests are MPI_REQUEST_NULL, then index + * is returned as {@code MPI.UNDEFINED}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int waitAny(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + int index = waitAny(r); + setHandles(requests, r); + return index; + } + + private static native int waitAny(long[] requests) throws MPIException; + + /** + * Tests for completion of either one or none of the operations + * associated with active requests. + *

Java binding of the MPI operation {@code MPI_TESTANY}. + *

If some request completed, the index in array of {@code requests} + * for that request can be obtained from the returned status object. + * The corresponding element in array of {@code requests} becomes inactive. + * If no request completed, {testAny} returns {@code null}. + * @param requests array of requests + * @return status object if one request completed, {@code null} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Status testAnyStatus(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + Status status = testAnyStatus(r); + setHandles(requests, r); + return status; + } + + private static native Status testAnyStatus(long[] requests) throws MPIException; + + /** + * Tests for completion of either one or none of the operations + * associated with active requests. + *

Java binding of the MPI operation {@code MPI_TESTANY}. + *

If some request completed, ii becomes inactive. + * @param requests array of requests + * @return index of operation that completed, or {@code MPI.UNDEFINED} + * if none completed. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int testAny(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + int index = testAny(r); + setHandles(requests, r); + return index; + } + + private static native int testAny(long[] requests) throws MPIException; + + /** + * Blocks until all of the operations associated with the active + * requests in the array have completed. + *

Java binding of the MPI operation {@code MPI_WAITALL}. + *

On exit, requests become inactive. If the input value of + * array of {@code requests} contains inactive requests, corresponding + * elements of the status array will contain null status references. + * @param requests array of requests + * @return array of statuses + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Status[] waitAllStatus(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + Status[] status = waitAllStatus(r); + setHandles(requests, r); + return status; + } + + private static native Status[] waitAllStatus(long[] requests) + throws MPIException; + + /** + * Blocks until all of the operations associated with the active + * requests in the array have completed. + *

Java binding of the MPI operation {@code MPI_WAITALL}. + * @param requests array of requests + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void waitAll(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + waitAll(r); + setHandles(requests, r); + } + + private static native void waitAll(long[] requests) throws MPIException; + + /** + * Tests for completion of all of the operations associated + * with active requests. + *

Java binding of the MPI operation {@code MPI_TESTALL}. + *

If all operations have completed, the exit value of the argument array + * is as for {@code waitAllStatus}. + * @param requests array of requests + * @return array of statuses if all operations have completed, + * {@code null} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Status[] testAllStatus(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + Status[] status = testAllStatus(r); + setHandles(requests, r); + return status; + } + + private static native Status[] testAllStatus(long[] requests) + throws MPIException; + + /** + * Tests for completion of all of the operations associated + * with active requests. + *

Java binding of the MPI operation {@code MPI_TESTALL}. + * @param requests array of requests + * @return {@code true} if all operations have completed, + * {@code false} otherwise. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static boolean testAll(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + boolean completed = testAll(r); + setHandles(requests, r); + return completed; + } + + private static native boolean testAll(long[] requests) throws MPIException; + + /** + * Blocks until at least one of the operations associated with the active + * requests in the array has completed. + *

Java binding of the MPI operation {@code MPI_WAITSOME}. + *

The size of the result array will be the number of operations that + * completed. The index in array of {@code requests} for each request that + * completed can be obtained from the returned status objects through the + * {@code Status.getIndex()} method. The corresponding element in + * array of {@code requests} becomes inactive. + * @param requests array of requests + * @return array of statuses or {@code null} if the number of operations + * completed is {@code MPI_UNDEFINED}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Status[] waitSomeStatus(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + Status[] status = waitSomeStatus(r); + setHandles(requests, r); + return status; + } + + private static native Status[] waitSomeStatus(long[] requests) + throws MPIException; + + /** + * Blocks until at least one of the operations associated with the active + * active requests in the array has completed. + *

Java binding of the MPI operation {@code MPI_WAITSOME}. + *

The size of the result array will be the number of operations that + * completed. The corresponding element in array of {@code requests} becomes + * inactive. + * @param requests array of requests + * @return array of indexes of {@code requests} that completed or {@code null} + * if the number of operations completed is {@code MPI_UNDEFINED}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int[] waitSome(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + int[] indexes = waitSome(r); + setHandles(requests, r); + return indexes; + } + + private static native int[] waitSome(long[] requests) throws MPIException; + + /** + * Behaves like {@code waitSome}, except that it returns immediately. + *

Java binding of the MPI operation {@code MPI_TESTSOME}. + *

If no operation has completed, {@code testSome} returns an array of + * length zero, otherwise the return value are as for {@code waitSome}. + * @param requests array of requests + * @return array of statuses + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static Status[] testSomeStatus(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + Status[] status = testSomeStatus(r); + setHandles(requests, r); + return status; + } + + private static native Status[] testSomeStatus(long[] requests) + throws MPIException; + + /** + * Behaves like {@code waitSome}, except that it returns immediately. + *

Java binding of the MPI operation {@code MPI_TESTSOME}. + *

If no operation has completed, {@code testSome} returns an array of + * length zero, otherwise the return value are as for {@code waitSome}. + * @param requests array of requests + * @return array of indexes of {@code requests} that completed. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int[] testSome(Request[] requests) throws MPIException + { + MPI.check(); + long[] r = getHandles(requests); + int[] indexes = testSome(r); + setHandles(requests, r); + return indexes; + } + + private static native int[] testSome(long[] requests) throws MPIException; + + protected static long[] getHandles(Request[] r) + { + long[] h = new long[r.length]; + + for(int i = 0; i < r.length; i++) + h[i] = r[i].handle; + + return h; + } + + protected static void setHandles(Request[] r, long[] h) + { + for(int i = 0; i < r.length; i++) + r[i].handle = h[i]; + } } // Request diff --git a/ompi/mpi/java/java/ShiftParms.java b/ompi/mpi/java/java/ShiftParms.java index 30311eda497..4bc9cf52373 100644 --- a/ompi/mpi/java/java/ShiftParms.java +++ b/ompi/mpi/java/java/ShiftParms.java @@ -9,31 +9,33 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : ShiftParms.java * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 @@ -50,31 +52,31 @@ */ public final class ShiftParms { -private final int rankSource; -private final int rankDest; + private final int rankSource; + private final int rankDest; -protected ShiftParms(int rankSource, int rankDest) -{ - this.rankSource = rankSource; - this.rankDest = rankDest; -} + protected ShiftParms(int rankSource, int rankDest) + { + this.rankSource = rankSource; + this.rankDest = rankDest; + } -/** - * Gets the source rank. - * @return source rank - */ -public int getRankSource() -{ - return rankSource; -} + /** + * Gets the source rank. + * @return source rank + */ + public int getRankSource() + { + return rankSource; + } -/** - * Gets the destination rank. - * @return destination rank - */ -public int getRankDest() -{ - return rankDest; -} + /** + * Gets the destination rank. + * @return destination rank + */ + public int getRankDest() + { + return rankDest; + } } // ShiftParms diff --git a/ompi/mpi/java/java/ShortInt.java b/ompi/mpi/java/java/ShortInt.java index c335e10c6ec..3da028a9f4e 100644 --- a/ompi/mpi/java/java/ShortInt.java +++ b/ompi/mpi/java/java/ShortInt.java @@ -25,113 +25,113 @@ */ public final class ShortInt extends Struct { -private final int sSize, iOff, iSize; + private final int sSize, iOff, iSize; -/** - * The struct object will be created only in MPI class. - * @param shortSize short size - * @param intOff int offset - * @param intSize int size - * @see MPI#shortInt - */ -protected ShortInt(int shortSize, int intOff, int intSize) -{ - sSize = shortSize; - iSize = intSize; - int sOff; + /** + * The struct object will be created only in MPI class. + * @param shortSize short size + * @param intOff int offset + * @param intSize int size + * @see MPI#shortInt + */ + protected ShortInt(int shortSize, int intOff, int intSize) + { + sSize = shortSize; + iSize = intSize; + int sOff; - switch(sSize) - { - case 2: sOff = addShort(); break; - case 4: sOff = addInt(); break; - case 8: sOff = addLong(); break; - default: throw new AssertionError("Unsupported short size: "+ sSize); - } + switch(sSize) + { + case 2: sOff = addShort(); break; + case 4: sOff = addInt(); break; + case 8: sOff = addLong(); break; + default: throw new AssertionError("Unsupported short size: "+ sSize); + } - assert sOff == 0; - setOffset(intOff); + assert sOff == 0; + setOffset(intOff); - switch(iSize) - { - case 4: iOff = addInt(); break; - case 8: iOff = addLong(); break; - default: throw new AssertionError("Unsupported int size: "+ iSize); - } + switch(iSize) + { + case 4: iOff = addInt(); break; + case 8: iOff = addLong(); break; + default: throw new AssertionError("Unsupported int size: "+ iSize); + } - assert(intOff == iOff); -} + assert(intOff == iOff); + } -/** - * Creates a Data object. - * @return new Data object. - */ -@Override protected Data newData() -{ - return new Data(); -} + /** + * Creates a Data object. + * @return new Data object. + */ + @Override protected Data newData() + { + return new Data(); + } -/** - * Class for reading/writing data in a struct stored in a byte buffer. - */ -public final class Data extends Struct.Data -{ - /** - * Gets the short value. - * @return short value - */ - public short getValue() - { - switch(sSize) - { - case 2: return getShort(0); - case 4: return (short)getInt(0); - case 8: return (short)getLong(0); - default: throw new AssertionError(); - } - } + /** + * Class for reading/writing data in a struct stored in a byte buffer. + */ + public final class Data extends Struct.Data + { + /** + * Gets the short value. + * @return short value + */ + public short getValue() + { + switch(sSize) + { + case 2: return getShort(0); + case 4: return (short)getInt(0); + case 8: return (short)getLong(0); + default: throw new AssertionError(); + } + } - /** - * Gets the int value. - * @return int value - */ - public int getIndex() - { - switch(iSize) - { - case 4: return getInt(iOff); - case 8: return (int)getLong(iOff); - default: throw new AssertionError(); - } - } + /** + * Gets the int value. + * @return int value + */ + public int getIndex() + { + switch(iSize) + { + case 4: return getInt(iOff); + case 8: return (int)getLong(iOff); + default: throw new AssertionError(); + } + } - /** - * Puts the short value. - * @param v short value - */ - public void putValue(short v) - { - switch(sSize) - { - case 2: putShort(0, v); break; - case 4: putInt(0, v); break; - case 8: putLong(0, v); break; - default: throw new AssertionError(); - } - } + /** + * Puts the short value. + * @param v short value + */ + public void putValue(short v) + { + switch(sSize) + { + case 2: putShort(0, v); break; + case 4: putInt(0, v); break; + case 8: putLong(0, v); break; + default: throw new AssertionError(); + } + } - /** - * Puts the int value. - * @param v int value - */ - public void putIndex(int v) - { - switch(iSize) - { - case 4: putInt(iOff, v); break; - case 8: putLong(iOff, v); break; - default: throw new AssertionError(); - } - } -} // Data + /** + * Puts the int value. + * @param v int value + */ + public void putIndex(int v) + { + switch(iSize) + { + case 4: putInt(iOff, v); break; + case 8: putLong(iOff, v); break; + default: throw new AssertionError(); + } + } + } // Data } // ShortInt diff --git a/ompi/mpi/java/java/Status.java b/ompi/mpi/java/java/Status.java index 81ed8efebf9..8d101a8c620 100644 --- a/ompi/mpi/java/java/Status.java +++ b/ompi/mpi/java/java/Status.java @@ -16,26 +16,26 @@ * Additional copyrights may follow * * $HEADER$ - */ -/* + * + * * This file is almost a complete re-write for Open MPI compared to the * original mpiJava package. Its license and copyright are listed below. * See for more information. - */ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -/* + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * * File : Status.java * Author : Sang Lim, Sung-Hoon Ko, Xinying Li, Bryan Carpenter * Created : Thu Apr 9 12:22:15 1998 @@ -52,127 +52,127 @@ */ public final class Status { -protected final long[] data; - -static -{ - init(); -} - -private static native void init(); - -/** - * Status objects must be created only by the MPI methods. - */ -protected Status() -{ - data = new long[6]; -} - -/** - * Returns the number of received entries. - *

Java binding of the MPI operation {@code MPI_GET_COUNT}. - * @param datatype datatype of each item in receive buffer - * @return number of received entries - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getCount(Datatype datatype) throws MPIException -{ - MPI.check(); - int i = 0; - int source = (int)data[i++]; - int tag = (int)data[i++]; - int error = (int)data[i++]; - int cancelled = (int)data[i++]; - long ucount = data[i++]; - return getCount(source, tag, error, cancelled, ucount, datatype.handle); -} - -private native int getCount( - int source, int tag, int error, - int cancelled, long ucount, long datatype) throws MPIException; - -/** - * Tests if the communication was cancelled. - *

Java binding of the MPI operation {@code MPI_TEST_CANCELLED}. - * @return true if the operation was succesfully cancelled, false otherwise - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public boolean isCancelled() throws MPIException -{ - MPI.check(); - int i = 0; - int source = (int)data[i++]; - int tag = (int)data[i++]; - int error = (int)data[i++]; - int cancelled = (int)data[i++]; - long ucount = data[i++]; - return isCancelled(source, tag, error, cancelled, ucount); -} - -private native boolean isCancelled( - int source, int tag, int error, int cancelled, long ucount) - throws MPIException; - -/** - * Retrieves the number of basic elements from status. - *

Java binding of the MPI operation {@code MPI_GET_ELEMENTS}. - * @param datatype datatype used by receive operation - * @return number of received basic elements - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public int getElements(Datatype datatype) throws MPIException -{ - MPI.check(); - int i = 0; - int source = (int)data[i++]; - int tag = (int)data[i++]; - int error = (int)data[i++]; - int cancelled = (int)data[i++]; - long ucount = data[i++]; - return getElements(source, tag, error, cancelled, ucount, datatype.handle); -} - -private native int getElements( - int source, int tag, int error, - int cancelled, long ucount, long datatype) throws MPIException; - -/** - * Returns the "source" of message. - *

Java binding of the MPI value {@code MPI_SOURCE}. - * @return source of message - */ -public int getSource() -{ - return (int)data[0]; -} - -/** - * Returns the "tag" of message. - *

Java binding of the MPI value {@code MPI_TAG}. - * @return tag of message - */ -public int getTag() -{ - return (int)data[1]; -} - -/** - * Returns the {@code MPI_ERROR} of message. - * @return error of message. - */ -public int getError() -{ - return (int)data[2]; -} - -/** - * Returns the index of message. - * @return index of message. - */ -public int getIndex() -{ - return (int)data[5]; -} + protected final long[] data; + + static + { + init(); + } + + private static native void init(); + + /** + * Status objects must be created only by the MPI methods. + */ + protected Status() + { + data = new long[6]; + } + + /** + * Returns the number of received entries. + *

Java binding of the MPI operation {@code MPI_GET_COUNT}. + * @param datatype datatype of each item in receive buffer + * @return number of received entries + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getCount(Datatype datatype) throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + return getCount(source, tag, error, cancelled, ucount, datatype.handle); + } + + private native int getCount( + int source, int tag, int error, + int cancelled, long ucount, long datatype) throws MPIException; + + /** + * Tests if the communication was cancelled. + *

Java binding of the MPI operation {@code MPI_TEST_CANCELLED}. + * @return true if the operation was succesfully cancelled, false otherwise + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public boolean isCancelled() throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + return isCancelled(source, tag, error, cancelled, ucount); + } + + private native boolean isCancelled( + int source, int tag, int error, int cancelled, long ucount) + throws MPIException; + + /** + * Retrieves the number of basic elements from status. + *

Java binding of the MPI operation {@code MPI_GET_ELEMENTS}. + * @param datatype datatype used by receive operation + * @return number of received basic elements + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public int getElements(Datatype datatype) throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + return getElements(source, tag, error, cancelled, ucount, datatype.handle); + } + + private native int getElements( + int source, int tag, int error, + int cancelled, long ucount, long datatype) throws MPIException; + + /** + * Returns the "source" of message. + *

Java binding of the MPI value {@code MPI_SOURCE}. + * @return source of message + */ + public int getSource() + { + return (int)data[0]; + } + + /** + * Returns the "tag" of message. + *

Java binding of the MPI value {@code MPI_TAG}. + * @return tag of message + */ + public int getTag() + { + return (int)data[1]; + } + + /** + * Returns the {@code MPI_ERROR} of message. + * @return error of message. + */ + public int getError() + { + return (int)data[2]; + } + + /** + * Returns the index of message. + * @return index of message. + */ + public int getIndex() + { + return (int)data[5]; + } } // Status diff --git a/ompi/mpi/java/java/Struct.java b/ompi/mpi/java/java/Struct.java index 65695cb9d66..43edbe62db6 100644 --- a/ompi/mpi/java/java/Struct.java +++ b/ompi/mpi/java/java/Struct.java @@ -28,775 +28,775 @@ */ public abstract class Struct { -private int extent; -private ArrayList fields = new ArrayList(); - -private Datatype datatype, types[]; -private int offsets[], lengths[]; -private static final String typeMismatch = "Type mismatch"; - -private void commit() throws MPIException -{ - if(datatype == null) - createStruct(); -} - -private void createStruct() throws MPIException -{ - int count = fields.size(); - types = new Datatype[count]; - offsets = new int[count]; - lengths = new int[count]; - - for(int i = 0; i < count; i++) - { - Field f = fields.get(i); - - types[i] = f.type instanceof Struct ? ((Struct)f.type).datatype - : (Datatype)f.type; - offsets[i] = f.offset; - lengths[i] = f.length; - } - - datatype = Datatype.createStruct(lengths, offsets, types); - datatype.commit(); - extent = datatype.getExtent(); -} - -/** - * Returns the extent of the struct data type. - * @return Extent of the struct data type. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int getExtent() throws MPIException -{ - commit(); - return extent; -} - -/** - * Returns the data type of the struct. - * @return The data type of the struct. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Datatype getType() throws MPIException -{ - commit(); - return datatype; -} - -/** - * Creates a Data object. - * @return New Data object. - */ -protected abstract Data newData(); - -@SuppressWarnings("unchecked") -private T newData(ByteBuffer buffer, int offset) -{ - Data d = newData(); - d.buffer = buffer; - d.offset = offset; - return (T)d; -} - -@SuppressWarnings("javadoc") -/** - * Gets a Data object in order to access to the buffer. - * @param buffer the Data object will read/write on this buffer. - * @return Data object - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final T getData(ByteBuffer buffer) throws MPIException -{ - commit(); - return newData(buffer, 0); -} - -@SuppressWarnings("javadoc") -/** - * Gets a Data object in order to access to the struct at the - * specified position of a struct array stored in a Buffer. - * @param buffer The Data object will read/write on this buffer. - * @param index Index of the struct in the buffer. - * @return Data object. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final T getData(ByteBuffer buffer, int index) - throws MPIException -{ - commit(); - return newData(buffer, index * extent); -} - -@SuppressWarnings("javadoc") -/** - * Gets a Data object in order to access to the byte array. - * @param array The Data object will read/write on this byte array. - * @return Data object. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final T getData(byte[] array) throws MPIException -{ - ByteBuffer buffer = ByteBuffer.wrap(array); - buffer.order(ByteOrder.nativeOrder()); - return getData(buffer); -} - -@SuppressWarnings("javadoc") -/** - * Gets a Data object in order to access to the struct at the - * specified position of a struct array stored in a byte array. - * @param array The Data object will read/write on this byte array. - * @param index Index of the struct in the array. - * @return Data object. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final T getData(byte[] array, int index) - throws MPIException -{ - ByteBuffer buffer = ByteBuffer.wrap(array); - buffer.order(ByteOrder.nativeOrder()); - return getData(buffer, index); -} - -private int addField(Object type, int typeExtent, int length) -{ - if(datatype != null) - throw new AssertionError("The struct data type was committed."); - - int offset = extent; - extent += typeExtent * length; - fields.add(new Field(type, offset, length)); - return offset; -} - -/** - * Sets the offset of the next field. - *

The offset must be greater or equal to the accumulated extent. - * @param offset offset of the next field - * @return this object in order to allow adding fields in a chained expression - */ -public final Struct setOffset(int offset) -{ - if(datatype != null) - throw new AssertionError("The struct data type was committed."); - - if(offset < extent) - { - throw new IllegalArgumentException( - "The offset must be greater or equal to the accumulated extent."); - } - - extent = offset; - return this; -} - -/** - * Adds a byte field to this struct. - * @return Offset of the new field. - */ -public final int addByte() -{ - return addByte(1); -} - -/** - * Adds a byte array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addByte(int length) -{ - return addField(MPI.BYTE, 1, length); -} - -/** - * Adds a char field to this struct. - * @return Offset of the new field. - */ -public final int addChar() -{ - return addChar(1); -} - -/** - * Adds a char array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addChar(int length) -{ - return addField(MPI.CHAR, 2, length); -} - -/** - * Adds a short field to this struct. - * @return Offset of the new field. - */ -public final int addShort() -{ - return addShort(1); -} - -/** - * Adds a short array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addShort(int length) -{ - return addField(MPI.SHORT, 2, length); -} - -/** - * Adds an int field to this struct. - * @return Offset of the new field. - */ -public final int addInt() -{ - return addInt(1); -} - -/** - * Adds an int array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addInt(int length) -{ - return addField(MPI.INT, 4, length); -} - -/** - * Adds a long field to this struct. - * @return Offset of the new field. - */ -public final int addLong() -{ - return addLong(1); -} - -/** - * Adds a long array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addLong(int length) -{ - return addField(MPI.LONG, 8, length); -} - -/** - * Adds a float field to this struct. - * @return Offset of the new field. - */ -public final int addFloat() -{ - return addFloat(1); -} - -/** - * Adds a float array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addFloat(int length) -{ - return addField(MPI.FLOAT, 4, length); -} - -/** - * Adds a double field to this struct. - * @return Offset of the new field. - */ -public final int addDouble() -{ - return addDouble(1); -} - -/** - * Adds a double array to this struct. - * @param length Length of the array. - * @return Offset of the new field. - */ -public final int addDouble(int length) -{ - return addField(MPI.DOUBLE, 8, length); -} - -/** - * Adds a struct field to this struct. - * @param struct Type of the field. - * @return Offset of the new field. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int addStruct(Struct struct) throws MPIException -{ - return addStruct(struct, 1); -} - -/** - * Adds an array of structs to this struct. - * @param struct Type of the array. - * @param length Length of the array. - * @return Offset of the new field. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int addStruct(Struct struct, int length) throws MPIException -{ - struct.commit(); - return addField(struct, struct.extent, length); -} - -/** - * Adds a field of the specified data type. - * @param type Data type. - * @return Offset of the new field. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int addData(Datatype type) throws MPIException -{ - return addData(type, 1); -} - -/** - * Adds an array of the specified data type. - * @param type Data type. - * @param length Length of the array. - * @return Offset of the new field. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final int addData(Datatype type, int length) throws MPIException -{ - return addField(type, type.getExtent() * type.baseSize, length); -} - -private boolean validType(int fieldOffset, int index, Datatype type) -{ - int i = Arrays.binarySearch(offsets, fieldOffset); - return index >= 0 && index < lengths[i] && type == types[i]; -} - -private static class Field -{ - private Object type; - private int offset, length; - - private Field(Object type, int offset, int length) - { - this.type = type; - this.offset = offset; - this.length = length; - } - -} // Field - -/** - * Base class for reading/writing data in a struct stored in a byte buffer. - */ -public abstract class Data -{ - private ByteBuffer buffer; - private int offset; - - /** - * Gets the buffer where this struct data is stored. - *

The buffer can be used in {@code send}/{@code recv} operations. - * @return Buffer where the struct data is stored. - */ - public final ByteBuffer getBuffer() - { - return offset == 0 ? buffer : MPI.slice(buffer, offset); - } - - /** - * Gets the byte value of a field. - * @param field Offset of the field. - * @return Byte value. - */ - protected final byte getByte(int field) - { - assert validType(field, 0, MPI.BYTE) : typeMismatch; - return buffer.get(offset + field); - } - - /** - * Gets the byte value at the specified position of a byte array. - * @param field Offset of the byte array. - * @param index Index of the byte in the array. - * @return Byte value. - */ - protected final byte getByte(int field, int index) - { - assert validType(field, index, MPI.BYTE) : typeMismatch; - return buffer.get(offset + field + index); - } - - /** - * Puts a byte value in a field. - * @param field Offset of the field. - * @param v Byte value. - */ - protected final void putByte(int field, byte v) - { - assert validType(field, 0, MPI.BYTE) : typeMismatch; - buffer.put(offset + field, v); - } - - /** - * Puts a byte value at the specified position of a byte array. - * @param field Offset of the byte array. - * @param index Index of the byte in the array. - * @param v Byte value. - */ - protected final void putByte(int field, int index, byte v) - { - assert validType(field, index, MPI.BYTE) : typeMismatch; - buffer.put(offset + field + index, v); - } - - /** - * Gets the char value of a field. - * @param field Offset of the field. - * @return Char value. - */ - protected final char getChar(int field) - { - assert validType(field, 0, MPI.CHAR) : typeMismatch; - return buffer.getChar(offset + field); - } - - /** - * Gets the char value at the specified position of a char array. - * @param field Offset of the char array. - * @param index Index of the char in the array. - * @return Char value. - */ - protected final char getChar(int field, int index) - { - assert validType(field, index, MPI.CHAR) : typeMismatch; - return buffer.getChar(offset + field + index * 2); - } - - /** - * Puts a char value in a field. - * @param field Offset of the field. - * @param v Char value. - */ - protected final void putChar(int field, char v) - { - assert validType(field, 0, MPI.CHAR) : typeMismatch; - buffer.putChar(offset + field, v); - } - - /** - * Puts a char value at the specified position of a char array. - * @param field Offset of the char array. - * @param index Index of the char in the array. - * @param v Char value. - */ - protected final void putChar(int field, int index, char v) - { - assert validType(field, index, MPI.CHAR) : typeMismatch; - buffer.putChar(offset + field + index * 2, v); - } - - /** - * Gets the short value of a field. - * @param field Offset of the field. - * @return Short value. - */ - protected final short getShort(int field) - { - assert validType(field, 0, MPI.SHORT) : typeMismatch; - return buffer.getShort(offset + field); - } - - /** - * Gets the short value at the specified position of a short array. - * @param field Offset of the short array. - * @param index Index of the short in the array. - * @return Short value. - */ - protected final short getShort(int field, int index) - { - assert validType(field, index, MPI.SHORT) : typeMismatch; - return buffer.getShort(offset + field + index * 2); - } - - /** - * Puts a short value in a field. - * @param field Offset of the field. - * @param v Short value. - */ - protected final void putShort(int field, short v) - { - assert validType(field, 0, MPI.SHORT) : typeMismatch; - buffer.putShort(offset + field, v); - } - - /** - * Puts a short value at the specified position of a short array. - * @param field Offset of the short array. - * @param index Index of the short in the array. - * @param v Short value. - */ - protected final void putShort(int field, int index, short v) - { - assert validType(field, index, MPI.SHORT) : typeMismatch; - buffer.putShort(offset + field + index * 2, v); - } - - /** - * Gets the int value of a field. - * @param field Offset of the field. - * @return Int value. - */ - protected final int getInt(int field) - { - assert validType(field, 0, MPI.INT) : typeMismatch; - return buffer.getInt(offset + field); - } - - /** - * Gets the int value at the specified position of an int array. - * @param field Offset of the int array. - * @param index Index of the int in the array. - * @return Int value. - */ - protected final int getInt(int field, int index) - { - assert validType(field, index, MPI.INT) : typeMismatch; - return buffer.getInt(offset + field + index * 4); - } - - /** - * Puts an int value in a field. - * @param field Offset of the field. - * @param v Int value. - */ - protected final void putInt(int field, int v) - { - assert validType(field, 0, MPI.INT) : typeMismatch; - buffer.putInt(offset + field, v); - } - - /** - * Puts an int value at the specified position of an int array. - * @param field Offset of the int array. - * @param index Index of the int in the array. - * @param v Int value. - */ - protected final void putInt(int field, int index, int v) - { - assert validType(field, index, MPI.INT) : typeMismatch; - buffer.putInt(offset + field + index * 4, v); - } - - /** - * Gets the long value of a field. - * @param field Offset of the field. - * @return Long value. - */ - protected final long getLong(int field) - { - assert validType(field, 0, MPI.LONG) : typeMismatch; - return buffer.getLong(offset + field); - } - - /** - * Gets the long value at the specified position of a long array. - * @param field Offset of the long array. - * @param index Index of the long in the array. - * @return Long value. - */ - protected final long getLong(int field, int index) - { - assert validType(field, index, MPI.LONG) : typeMismatch; - return buffer.getLong(offset + field + index * 8); - } - - /** - * Puts a long value in a field. - * @param field Offset of the field. - * @param v Long value. - */ - protected final void putLong(int field, long v) - { - assert validType(field, 0, MPI.LONG) : typeMismatch; - buffer.putLong(offset + field, v); - } - - /** - * Puts a long value at the specified position of a long array. - * @param field Offset of the long array. - * @param index Index of the long in the array. - * @param v Long value. - */ - protected final void putLong(int field, int index, long v) - { - assert validType(field, index, MPI.LONG) : typeMismatch; - buffer.putLong(offset + field + index * 8, v); - } - - /** - * Gets the float value of a field. - * @param field Offset of the field. - * @return Float value. - */ - protected final float getFloat(int field) - { - assert validType(field, 0, MPI.FLOAT) : typeMismatch; - return buffer.getFloat(offset + field); - } - - /** - * Gets the float value at the specified position of a float array. - * @param field Offset of the float array. - * @param index Index of the float in the array. - * @return Float value. - */ - protected final float getFloat(int field, int index) - { - assert validType(field, index, MPI.FLOAT) : typeMismatch; - return buffer.getFloat(offset + field + index * 4); - } - - /** - * Puts a float value in a field. - * @param field Offset of the field. - * @param v Float value. - */ - protected final void putFloat(int field, float v) - { - assert validType(field, 0, MPI.FLOAT) : typeMismatch; - buffer.putFloat(offset + field, v); - } - - /** - * Puts a float value at the specified position of a float array. - * @param field Offset of the float array. - * @param index Index of the float in the array. - * @param v Float value. - */ - protected final void putFloat(int field, int index, float v) - { - assert validType(field, index, MPI.FLOAT) : typeMismatch; - buffer.putFloat(offset + field + index * 4, v); - } - - /** - * Gets the double value of a field. - * @param field Offset of the field. - * @return Double value. - */ - protected final double getDouble(int field) - { - assert validType(field, 0, MPI.DOUBLE) : typeMismatch; - return buffer.getDouble(offset + field); - } - - /** - * Gets the double value at the specified position of a double array. - * @param field Offset of the double array. - * @param index Index of the double in the array. - * @return Double value. - */ - protected final double getDouble(int field, int index) - { - assert validType(field, index, MPI.DOUBLE) : typeMismatch; - return buffer.getDouble(offset + field + index * 8); - } - - /** - * Puts a double value in a field. - * @param field Offset of the field. - * @param v Double value. - */ - protected final void putDouble(int field, double v) - { - assert validType(field, 0, MPI.DOUBLE) : typeMismatch; - buffer.putDouble(offset + field, v); - } - - /** - * Puts a double value at the specified position of a double array. - * @param field Offset of the double array. - * @param index Index of the double in the array. - * @param v Double value. - */ - protected final void putDouble(int field, int index, double v) - { - assert validType(field, index, MPI.DOUBLE) : typeMismatch; - buffer.putDouble(offset + field + index * 8, v); - } - - @SuppressWarnings("javadoc") - /** - * Gets the struct data of a field. - * @param struct Struct type. - * @param field Offset of the field. - * @return Struct data. - */ - protected final - D getData(S struct, int field) - { - Struct s = (Struct)struct; - assert validType(field, 0, s.datatype) : typeMismatch; - return s.newData(buffer, offset + field); - } - - @SuppressWarnings("javadoc") - /** - * Gets the struct data at the specified position of a struct array. - * @param struct Struct type. - * @param field Offset of the struct array. - * @param index Index of the struct in the array. - * @return Struct data. - */ - protected final - D getData(S struct, int field, int index) - { - Struct s = (Struct)struct; - assert validType(field, index, s.datatype) : typeMismatch; - return s.newData(buffer, offset + field + index * s.extent); - } - - /** - * Gets the buffer of a field. - *

The buffer can be used in {@code send}/{@code recv} operations. - * @param type Data type of the buffer. - * @param field Offset of the field. - * @return Buffer object. - */ - protected final ByteBuffer getBuffer(Datatype type, int field) - { - assert validType(field, 0, type) : typeMismatch; - int position = offset + field; - return position == 0 ? buffer : MPI.slice(buffer, position); - } - - /** - * Gets the buffer data at the specified position of a buffer array. - *

The buffer can be used in {@code send}/{@code recv} operations. - * @param type Data type of the buffer. - * @param field Offset of the buffer array. - * @param index Index of the buffer in the array. - * @return Buffer object. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - protected final ByteBuffer getBuffer(Datatype type, int field, int index) - throws MPIException - { - assert validType(field, index, type) : typeMismatch; - - int extent = type.getExtent() * type.baseSize, - position = offset + field + index * extent; - - return position == 0 ? buffer : MPI.slice(buffer, position); - } - -} // Data + private int extent; + private ArrayList fields = new ArrayList(); + + private Datatype datatype, types[]; + private int offsets[], lengths[]; + private static final String typeMismatch = "Type mismatch"; + + private void commit() throws MPIException + { + if(datatype == null) + createStruct(); + } + + private void createStruct() throws MPIException + { + int count = fields.size(); + types = new Datatype[count]; + offsets = new int[count]; + lengths = new int[count]; + + for(int i = 0; i < count; i++) + { + Field f = fields.get(i); + + types[i] = f.type instanceof Struct ? ((Struct)f.type).datatype + : (Datatype)f.type; + offsets[i] = f.offset; + lengths[i] = f.length; + } + + datatype = Datatype.createStruct(lengths, offsets, types); + datatype.commit(); + extent = datatype.getExtent(); + } + + /** + * Returns the extent of the struct data type. + * @return Extent of the struct data type. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int getExtent() throws MPIException + { + commit(); + return extent; + } + + /** + * Returns the data type of the struct. + * @return The data type of the struct. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Datatype getType() throws MPIException + { + commit(); + return datatype; + } + + /** + * Creates a Data object. + * @return New Data object. + */ + protected abstract Data newData(); + + @SuppressWarnings("unchecked") + private T newData(ByteBuffer buffer, int offset) + { + Data d = newData(); + d.buffer = buffer; + d.offset = offset; + return (T)d; + } + + @SuppressWarnings("javadoc") + /** + * Gets a Data object in order to access to the buffer. + * @param buffer the Data object will read/write on this buffer. + * @return Data object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final T getData(ByteBuffer buffer) throws MPIException + { + commit(); + return newData(buffer, 0); + } + + @SuppressWarnings("javadoc") + /** + * Gets a Data object in order to access to the struct at the + * specified position of a struct array stored in a Buffer. + * @param buffer The Data object will read/write on this buffer. + * @param index Index of the struct in the buffer. + * @return Data object. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final T getData(ByteBuffer buffer, int index) + throws MPIException + { + commit(); + return newData(buffer, index * extent); + } + + @SuppressWarnings("javadoc") + /** + * Gets a Data object in order to access to the byte array. + * @param array The Data object will read/write on this byte array. + * @return Data object. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final T getData(byte[] array) throws MPIException + { + ByteBuffer buffer = ByteBuffer.wrap(array); + buffer.order(ByteOrder.nativeOrder()); + return getData(buffer); + } + + @SuppressWarnings("javadoc") + /** + * Gets a Data object in order to access to the struct at the + * specified position of a struct array stored in a byte array. + * @param array The Data object will read/write on this byte array. + * @param index Index of the struct in the array. + * @return Data object. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final T getData(byte[] array, int index) + throws MPIException + { + ByteBuffer buffer = ByteBuffer.wrap(array); + buffer.order(ByteOrder.nativeOrder()); + return getData(buffer, index); + } + + private int addField(Object type, int typeExtent, int length) + { + if(datatype != null) + throw new AssertionError("The struct data type was committed."); + + int offset = extent; + extent += typeExtent * length; + fields.add(new Field(type, offset, length)); + return offset; + } + + /** + * Sets the offset of the next field. + *

The offset must be greater or equal to the accumulated extent. + * @param offset offset of the next field + * @return this object in order to allow adding fields in a chained expression + */ + public final Struct setOffset(int offset) + { + if(datatype != null) + throw new AssertionError("The struct data type was committed."); + + if(offset < extent) + { + throw new IllegalArgumentException( + "The offset must be greater or equal to the accumulated extent."); + } + + extent = offset; + return this; + } + + /** + * Adds a byte field to this struct. + * @return Offset of the new field. + */ + public final int addByte() + { + return addByte(1); + } + + /** + * Adds a byte array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addByte(int length) + { + return addField(MPI.BYTE, 1, length); + } + + /** + * Adds a char field to this struct. + * @return Offset of the new field. + */ + public final int addChar() + { + return addChar(1); + } + + /** + * Adds a char array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addChar(int length) + { + return addField(MPI.CHAR, 2, length); + } + + /** + * Adds a short field to this struct. + * @return Offset of the new field. + */ + public final int addShort() + { + return addShort(1); + } + + /** + * Adds a short array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addShort(int length) + { + return addField(MPI.SHORT, 2, length); + } + + /** + * Adds an int field to this struct. + * @return Offset of the new field. + */ + public final int addInt() + { + return addInt(1); + } + + /** + * Adds an int array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addInt(int length) + { + return addField(MPI.INT, 4, length); + } + + /** + * Adds a long field to this struct. + * @return Offset of the new field. + */ + public final int addLong() + { + return addLong(1); + } + + /** + * Adds a long array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addLong(int length) + { + return addField(MPI.LONG, 8, length); + } + + /** + * Adds a float field to this struct. + * @return Offset of the new field. + */ + public final int addFloat() + { + return addFloat(1); + } + + /** + * Adds a float array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addFloat(int length) + { + return addField(MPI.FLOAT, 4, length); + } + + /** + * Adds a double field to this struct. + * @return Offset of the new field. + */ + public final int addDouble() + { + return addDouble(1); + } + + /** + * Adds a double array to this struct. + * @param length Length of the array. + * @return Offset of the new field. + */ + public final int addDouble(int length) + { + return addField(MPI.DOUBLE, 8, length); + } + + /** + * Adds a struct field to this struct. + * @param struct Type of the field. + * @return Offset of the new field. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int addStruct(Struct struct) throws MPIException + { + return addStruct(struct, 1); + } + + /** + * Adds an array of structs to this struct. + * @param struct Type of the array. + * @param length Length of the array. + * @return Offset of the new field. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int addStruct(Struct struct, int length) throws MPIException + { + struct.commit(); + return addField(struct, struct.extent, length); + } + + /** + * Adds a field of the specified data type. + * @param type Data type. + * @return Offset of the new field. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int addData(Datatype type) throws MPIException + { + return addData(type, 1); + } + + /** + * Adds an array of the specified data type. + * @param type Data type. + * @param length Length of the array. + * @return Offset of the new field. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final int addData(Datatype type, int length) throws MPIException + { + return addField(type, type.getExtent() * type.baseSize, length); + } + + private boolean validType(int fieldOffset, int index, Datatype type) + { + int i = Arrays.binarySearch(offsets, fieldOffset); + return index >= 0 && index < lengths[i] && type == types[i]; + } + + private static class Field + { + private Object type; + private int offset, length; + + private Field(Object type, int offset, int length) + { + this.type = type; + this.offset = offset; + this.length = length; + } + + } // Field + + /** + * Base class for reading/writing data in a struct stored in a byte buffer. + */ + public abstract class Data + { + private ByteBuffer buffer; + private int offset; + + /** + * Gets the buffer where this struct data is stored. + *

The buffer can be used in {@code send}/{@code recv} operations. + * @return Buffer where the struct data is stored. + */ + public final ByteBuffer getBuffer() + { + return offset == 0 ? buffer : MPI.slice(buffer, offset); + } + + /** + * Gets the byte value of a field. + * @param field Offset of the field. + * @return Byte value. + */ + protected final byte getByte(int field) + { + assert validType(field, 0, MPI.BYTE) : typeMismatch; + return buffer.get(offset + field); + } + + /** + * Gets the byte value at the specified position of a byte array. + * @param field Offset of the byte array. + * @param index Index of the byte in the array. + * @return Byte value. + */ + protected final byte getByte(int field, int index) + { + assert validType(field, index, MPI.BYTE) : typeMismatch; + return buffer.get(offset + field + index); + } + + /** + * Puts a byte value in a field. + * @param field Offset of the field. + * @param v Byte value. + */ + protected final void putByte(int field, byte v) + { + assert validType(field, 0, MPI.BYTE) : typeMismatch; + buffer.put(offset + field, v); + } + + /** + * Puts a byte value at the specified position of a byte array. + * @param field Offset of the byte array. + * @param index Index of the byte in the array. + * @param v Byte value. + */ + protected final void putByte(int field, int index, byte v) + { + assert validType(field, index, MPI.BYTE) : typeMismatch; + buffer.put(offset + field + index, v); + } + + /** + * Gets the char value of a field. + * @param field Offset of the field. + * @return Char value. + */ + protected final char getChar(int field) + { + assert validType(field, 0, MPI.CHAR) : typeMismatch; + return buffer.getChar(offset + field); + } + + /** + * Gets the char value at the specified position of a char array. + * @param field Offset of the char array. + * @param index Index of the char in the array. + * @return Char value. + */ + protected final char getChar(int field, int index) + { + assert validType(field, index, MPI.CHAR) : typeMismatch; + return buffer.getChar(offset + field + index * 2); + } + + /** + * Puts a char value in a field. + * @param field Offset of the field. + * @param v Char value. + */ + protected final void putChar(int field, char v) + { + assert validType(field, 0, MPI.CHAR) : typeMismatch; + buffer.putChar(offset + field, v); + } + + /** + * Puts a char value at the specified position of a char array. + * @param field Offset of the char array. + * @param index Index of the char in the array. + * @param v Char value. + */ + protected final void putChar(int field, int index, char v) + { + assert validType(field, index, MPI.CHAR) : typeMismatch; + buffer.putChar(offset + field + index * 2, v); + } + + /** + * Gets the short value of a field. + * @param field Offset of the field. + * @return Short value. + */ + protected final short getShort(int field) + { + assert validType(field, 0, MPI.SHORT) : typeMismatch; + return buffer.getShort(offset + field); + } + + /** + * Gets the short value at the specified position of a short array. + * @param field Offset of the short array. + * @param index Index of the short in the array. + * @return Short value. + */ + protected final short getShort(int field, int index) + { + assert validType(field, index, MPI.SHORT) : typeMismatch; + return buffer.getShort(offset + field + index * 2); + } + + /** + * Puts a short value in a field. + * @param field Offset of the field. + * @param v Short value. + */ + protected final void putShort(int field, short v) + { + assert validType(field, 0, MPI.SHORT) : typeMismatch; + buffer.putShort(offset + field, v); + } + + /** + * Puts a short value at the specified position of a short array. + * @param field Offset of the short array. + * @param index Index of the short in the array. + * @param v Short value. + */ + protected final void putShort(int field, int index, short v) + { + assert validType(field, index, MPI.SHORT) : typeMismatch; + buffer.putShort(offset + field + index * 2, v); + } + + /** + * Gets the int value of a field. + * @param field Offset of the field. + * @return Int value. + */ + protected final int getInt(int field) + { + assert validType(field, 0, MPI.INT) : typeMismatch; + return buffer.getInt(offset + field); + } + + /** + * Gets the int value at the specified position of an int array. + * @param field Offset of the int array. + * @param index Index of the int in the array. + * @return Int value. + */ + protected final int getInt(int field, int index) + { + assert validType(field, index, MPI.INT) : typeMismatch; + return buffer.getInt(offset + field + index * 4); + } + + /** + * Puts an int value in a field. + * @param field Offset of the field. + * @param v Int value. + */ + protected final void putInt(int field, int v) + { + assert validType(field, 0, MPI.INT) : typeMismatch; + buffer.putInt(offset + field, v); + } + + /** + * Puts an int value at the specified position of an int array. + * @param field Offset of the int array. + * @param index Index of the int in the array. + * @param v Int value. + */ + protected final void putInt(int field, int index, int v) + { + assert validType(field, index, MPI.INT) : typeMismatch; + buffer.putInt(offset + field + index * 4, v); + } + + /** + * Gets the long value of a field. + * @param field Offset of the field. + * @return Long value. + */ + protected final long getLong(int field) + { + assert validType(field, 0, MPI.LONG) : typeMismatch; + return buffer.getLong(offset + field); + } + + /** + * Gets the long value at the specified position of a long array. + * @param field Offset of the long array. + * @param index Index of the long in the array. + * @return Long value. + */ + protected final long getLong(int field, int index) + { + assert validType(field, index, MPI.LONG) : typeMismatch; + return buffer.getLong(offset + field + index * 8); + } + + /** + * Puts a long value in a field. + * @param field Offset of the field. + * @param v Long value. + */ + protected final void putLong(int field, long v) + { + assert validType(field, 0, MPI.LONG) : typeMismatch; + buffer.putLong(offset + field, v); + } + + /** + * Puts a long value at the specified position of a long array. + * @param field Offset of the long array. + * @param index Index of the long in the array. + * @param v Long value. + */ + protected final void putLong(int field, int index, long v) + { + assert validType(field, index, MPI.LONG) : typeMismatch; + buffer.putLong(offset + field + index * 8, v); + } + + /** + * Gets the float value of a field. + * @param field Offset of the field. + * @return Float value. + */ + protected final float getFloat(int field) + { + assert validType(field, 0, MPI.FLOAT) : typeMismatch; + return buffer.getFloat(offset + field); + } + + /** + * Gets the float value at the specified position of a float array. + * @param field Offset of the float array. + * @param index Index of the float in the array. + * @return Float value. + */ + protected final float getFloat(int field, int index) + { + assert validType(field, index, MPI.FLOAT) : typeMismatch; + return buffer.getFloat(offset + field + index * 4); + } + + /** + * Puts a float value in a field. + * @param field Offset of the field. + * @param v Float value. + */ + protected final void putFloat(int field, float v) + { + assert validType(field, 0, MPI.FLOAT) : typeMismatch; + buffer.putFloat(offset + field, v); + } + + /** + * Puts a float value at the specified position of a float array. + * @param field Offset of the float array. + * @param index Index of the float in the array. + * @param v Float value. + */ + protected final void putFloat(int field, int index, float v) + { + assert validType(field, index, MPI.FLOAT) : typeMismatch; + buffer.putFloat(offset + field + index * 4, v); + } + + /** + * Gets the double value of a field. + * @param field Offset of the field. + * @return Double value. + */ + protected final double getDouble(int field) + { + assert validType(field, 0, MPI.DOUBLE) : typeMismatch; + return buffer.getDouble(offset + field); + } + + /** + * Gets the double value at the specified position of a double array. + * @param field Offset of the double array. + * @param index Index of the double in the array. + * @return Double value. + */ + protected final double getDouble(int field, int index) + { + assert validType(field, index, MPI.DOUBLE) : typeMismatch; + return buffer.getDouble(offset + field + index * 8); + } + + /** + * Puts a double value in a field. + * @param field Offset of the field. + * @param v Double value. + */ + protected final void putDouble(int field, double v) + { + assert validType(field, 0, MPI.DOUBLE) : typeMismatch; + buffer.putDouble(offset + field, v); + } + + /** + * Puts a double value at the specified position of a double array. + * @param field Offset of the double array. + * @param index Index of the double in the array. + * @param v Double value. + */ + protected final void putDouble(int field, int index, double v) + { + assert validType(field, index, MPI.DOUBLE) : typeMismatch; + buffer.putDouble(offset + field + index * 8, v); + } + + @SuppressWarnings("javadoc") + /** + * Gets the struct data of a field. + * @param struct Struct type. + * @param field Offset of the field. + * @return Struct data. + */ + protected final + D getData(S struct, int field) + { + Struct s = (Struct)struct; + assert validType(field, 0, s.datatype) : typeMismatch; + return s.newData(buffer, offset + field); + } + + @SuppressWarnings("javadoc") + /** + * Gets the struct data at the specified position of a struct array. + * @param struct Struct type. + * @param field Offset of the struct array. + * @param index Index of the struct in the array. + * @return Struct data. + */ + protected final + D getData(S struct, int field, int index) + { + Struct s = (Struct)struct; + assert validType(field, index, s.datatype) : typeMismatch; + return s.newData(buffer, offset + field + index * s.extent); + } + + /** + * Gets the buffer of a field. + *

The buffer can be used in {@code send}/{@code recv} operations. + * @param type Data type of the buffer. + * @param field Offset of the field. + * @return Buffer object. + */ + protected final ByteBuffer getBuffer(Datatype type, int field) + { + assert validType(field, 0, type) : typeMismatch; + int position = offset + field; + return position == 0 ? buffer : MPI.slice(buffer, position); + } + + /** + * Gets the buffer data at the specified position of a buffer array. + *

The buffer can be used in {@code send}/{@code recv} operations. + * @param type Data type of the buffer. + * @param field Offset of the buffer array. + * @param index Index of the buffer in the array. + * @return Buffer object. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + protected final ByteBuffer getBuffer(Datatype type, int field, int index) + throws MPIException + { + assert validType(field, index, type) : typeMismatch; + + int extent = type.getExtent() * type.baseSize, + position = offset + field + index * extent; + + return position == 0 ? buffer : MPI.slice(buffer, position); + } + + } // Data } // Struct diff --git a/ompi/mpi/java/java/UserFunction.java b/ompi/mpi/java/java/UserFunction.java index e3630413d8e..22a57bed4b5 100644 --- a/ompi/mpi/java/java/UserFunction.java +++ b/ompi/mpi/java/java/UserFunction.java @@ -34,7 +34,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -*/ + */ /* * File : User_function.java * Author : Xinying Li @@ -54,158 +54,158 @@ */ public abstract class UserFunction { -/** - * User-defined function for a new {@code Op}. - * @param inVec array of values to combine with {@code inoutvec} elements - * @param inOutVec in-out array of accumulator locations - * @param count number of items in arrays - * @param datatype type of each item - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void call(Object inVec, Object inOutVec, int count, Datatype datatype) - throws MPIException -{ - throw new UnsupportedOperationException("Not supported yet."); -} - -/** - * User-defined function for a new {@code Op}. - * @param in direct byte buffer to combine with {@code inOut} buffer - * @param inOut in-out direct byte buffer of accumulator locations - * @param count number of items in buffers - * @param datatype type of each item - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void call(ByteBuffer in, ByteBuffer inOut, int count, Datatype datatype) - throws MPIException -{ - switch(datatype.baseType) - { - case Datatype.BYTE: - vCall(in, inOut, count, datatype); - break; - case Datatype.CHAR: - vCall(in.asCharBuffer(), inOut.asCharBuffer(), count, datatype); - break; - case Datatype.SHORT: - vCall(in.asShortBuffer(), inOut.asShortBuffer(), count, datatype); - break; - case Datatype.INT: - vCall(in.asIntBuffer(), inOut.asIntBuffer(), count, datatype); - break; - case Datatype.LONG: - vCall(in.asLongBuffer(), inOut.asLongBuffer(), count, datatype); - break; - case Datatype.FLOAT: - vCall(in.asFloatBuffer(), inOut.asFloatBuffer(), count, datatype); - break; - case Datatype.DOUBLE: - vCall(in.asDoubleBuffer(), inOut.asDoubleBuffer(), count, datatype); - break; - case Datatype.PACKED: - vCall(in, inOut, count, datatype); - break; - default: - throw new IllegalArgumentException("Unsupported datatype."); - } -} - -private void vCall(ByteBuffer in, ByteBuffer inOut, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - byte[] inVec = new byte[count * extent], - inOutVec = new byte[count * extent]; - - in.get(inVec); - inOut.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOut.clear(); - inOut.put(inOutVec); -} - -private void vCall(CharBuffer inBuf, CharBuffer inOutBuf, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - char[] inVec = new char[count * extent], - inOutVec = new char[count * extent]; - - inBuf.get(inVec); - inOutBuf.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOutBuf.clear(); - inOutBuf.put(inOutVec); -} - -private void vCall(ShortBuffer inBuf, ShortBuffer inOutBuf, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - short[] inVec = new short[count * extent], - inOutVec = new short[count * extent]; - - inBuf.get(inVec); - inOutBuf.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOutBuf.clear(); - inOutBuf.put(inOutVec); -} - -private void vCall(IntBuffer inBuf, IntBuffer inOutBuf, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - int[] inVec = new int[count * extent], - inOutVec = new int[count * extent]; - - inBuf.get(inVec); - inOutBuf.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOutBuf.clear(); - inOutBuf.put(inOutVec); -} - -private void vCall(LongBuffer inBuf, LongBuffer inOutBuf, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - long[] inVec = new long[count * extent], - inOutVec = new long[count * extent]; - - inBuf.get(inVec); - inOutBuf.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOutBuf.clear(); - inOutBuf.put(inOutVec); -} - -private void vCall(FloatBuffer inBuf, FloatBuffer inOutBuf, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - float[] inVec = new float[count * extent], - inOutVec = new float[count * extent]; - - inBuf.get(inVec); - inOutBuf.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOutBuf.clear(); - inOutBuf.put(inOutVec); -} - -private void vCall(DoubleBuffer inBuf, DoubleBuffer inOutBuf, - int count, Datatype datatype) throws MPIException -{ - int extent = datatype.getExtent(); - double[] inVec = new double[count * extent], - inOutVec = new double[count * extent]; - - inBuf.get(inVec); - inOutBuf.get(inOutVec); - call(inVec, inOutVec, count, datatype); - inOutBuf.clear(); - inOutBuf.put(inOutVec); -} + /** + * User-defined function for a new {@code Op}. + * @param inVec array of values to combine with {@code inoutvec} elements + * @param inOutVec in-out array of accumulator locations + * @param count number of items in arrays + * @param datatype type of each item + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void call(Object inVec, Object inOutVec, int count, Datatype datatype) + throws MPIException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + /** + * User-defined function for a new {@code Op}. + * @param in direct byte buffer to combine with {@code inOut} buffer + * @param inOut in-out direct byte buffer of accumulator locations + * @param count number of items in buffers + * @param datatype type of each item + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void call(ByteBuffer in, ByteBuffer inOut, int count, Datatype datatype) + throws MPIException + { + switch(datatype.baseType) + { + case Datatype.BYTE: + vCall(in, inOut, count, datatype); + break; + case Datatype.CHAR: + vCall(in.asCharBuffer(), inOut.asCharBuffer(), count, datatype); + break; + case Datatype.SHORT: + vCall(in.asShortBuffer(), inOut.asShortBuffer(), count, datatype); + break; + case Datatype.INT: + vCall(in.asIntBuffer(), inOut.asIntBuffer(), count, datatype); + break; + case Datatype.LONG: + vCall(in.asLongBuffer(), inOut.asLongBuffer(), count, datatype); + break; + case Datatype.FLOAT: + vCall(in.asFloatBuffer(), inOut.asFloatBuffer(), count, datatype); + break; + case Datatype.DOUBLE: + vCall(in.asDoubleBuffer(), inOut.asDoubleBuffer(), count, datatype); + break; + case Datatype.PACKED: + vCall(in, inOut, count, datatype); + break; + default: + throw new IllegalArgumentException("Unsupported datatype."); + } + } + + private void vCall(ByteBuffer in, ByteBuffer inOut, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + byte[] inVec = new byte[count * extent], + inOutVec = new byte[count * extent]; + + in.get(inVec); + inOut.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOut.clear(); + inOut.put(inOutVec); + } + + private void vCall(CharBuffer inBuf, CharBuffer inOutBuf, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + char[] inVec = new char[count * extent], + inOutVec = new char[count * extent]; + + inBuf.get(inVec); + inOutBuf.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOutBuf.clear(); + inOutBuf.put(inOutVec); + } + + private void vCall(ShortBuffer inBuf, ShortBuffer inOutBuf, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + short[] inVec = new short[count * extent], + inOutVec = new short[count * extent]; + + inBuf.get(inVec); + inOutBuf.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOutBuf.clear(); + inOutBuf.put(inOutVec); + } + + private void vCall(IntBuffer inBuf, IntBuffer inOutBuf, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + int[] inVec = new int[count * extent], + inOutVec = new int[count * extent]; + + inBuf.get(inVec); + inOutBuf.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOutBuf.clear(); + inOutBuf.put(inOutVec); + } + + private void vCall(LongBuffer inBuf, LongBuffer inOutBuf, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + long[] inVec = new long[count * extent], + inOutVec = new long[count * extent]; + + inBuf.get(inVec); + inOutBuf.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOutBuf.clear(); + inOutBuf.put(inOutVec); + } + + private void vCall(FloatBuffer inBuf, FloatBuffer inOutBuf, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + float[] inVec = new float[count * extent], + inOutVec = new float[count * extent]; + + inBuf.get(inVec); + inOutBuf.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOutBuf.clear(); + inOutBuf.put(inOutVec); + } + + private void vCall(DoubleBuffer inBuf, DoubleBuffer inOutBuf, + int count, Datatype datatype) throws MPIException + { + int extent = datatype.getExtent(); + double[] inVec = new double[count * extent], + inOutVec = new double[count * extent]; + + inBuf.get(inVec); + inOutBuf.get(inOutVec); + call(inVec, inOutVec, count, datatype); + inOutBuf.clear(); + inOutBuf.put(inOutVec); + } } // UserFunction diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index 0956f38a027..09321e9de69 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -25,875 +25,875 @@ */ public final class Win implements Freeable { -private long handle; -public static final int WIN_NULL = 0; -public static final int FLAVOR_PRIVATE = 0; -public static final int FLAVOR_SHARED = 1; - -/** - * Java binding of {@code MPI_WIN_CREATE}. - * @param base initial address of window - * @param size size of window (buffer elements) - * @param dispUnit local unit size for displacements (buffer elements) - * @param info info object - * @param comm communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Win(Buffer base, int size, int dispUnit, Info info, Comm comm) - throws MPIException -{ - if(!base.isDirect()) - throw new IllegalArgumentException("The buffer must be direct."); - - int baseSize; - - if(base instanceof ByteBuffer) - baseSize = 1; - else if(base instanceof CharBuffer || base instanceof ShortBuffer) - baseSize = 2; - else if(base instanceof IntBuffer || base instanceof FloatBuffer) - baseSize = 4; - else if(base instanceof LongBuffer || base instanceof DoubleBuffer) - baseSize = 8; - else - throw new AssertionError(); - - int sizeBytes = size * baseSize, - dispBytes = dispUnit * baseSize; - - handle = createWin(base, sizeBytes, dispBytes, info.handle, comm.handle); -} - -private native long createWin( - Buffer base, int size, int dispUnit, long info, long comm) - throws MPIException; - -/** - * Java binding of {@code MPI_WIN_ALLOCATE} and {@code MPI_WIN_ALLOCATE_SHARED}. - * @param size size of window (buffer elements) - * @param dispUnit local unit size for displacements (buffer elements) - * @param info info object - * @param comm communicator - * @param base initial address of window - * @param flavor FLAVOR_PRIVATE or FLAVOR_SHARED - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Win(int size, int dispUnit, Info info, Comm comm, Buffer base, int flavor) - throws MPIException -{ - if(!base.isDirect()) - throw new IllegalArgumentException("The buffer must be direct."); - - int baseSize; - - if(base instanceof ByteBuffer) - baseSize = 1; - else if(base instanceof CharBuffer || base instanceof ShortBuffer) - baseSize = 2; - else if(base instanceof IntBuffer || base instanceof FloatBuffer) - baseSize = 4; - else if(base instanceof LongBuffer || base instanceof DoubleBuffer) - baseSize = 8; - else - throw new AssertionError(); - - int sizeBytes = size * baseSize, - dispBytes = dispUnit * baseSize; - - if(flavor == 0) { - handle = allocateWin(sizeBytes, dispBytes, info.handle, comm.handle, base); - } else if(flavor == 1) { - handle = allocateSharedWin(sizeBytes, dispBytes, info.handle, comm.handle, base); - } -} - -private native long allocateWin( - int size, int dispUnit, long info, long comm, Buffer base) - throws MPIException; - -private native long allocateSharedWin( - int size, int dispUnit, long info, long comm, Buffer base) - throws MPIException; - -/** - * Java binding of {@code MPI_WIN_CREATE_DYNAMIC}. - * @param info info object - * @param comm communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Win(Info info, Comm comm) - throws MPIException -{ - handle = createDynamicWin(info.handle, comm.handle); -} - -private native long createDynamicWin( - long info, long comm) - throws MPIException; - -private int getBaseType(Datatype orgType, Datatype targetType) -{ - int baseType = orgType.baseType; - - if(baseType != targetType.baseType) - { - throw new IllegalArgumentException( - "Both datatype arguments must be constructed "+ - "from the same predefined datatype."); - } - - return baseType; -} - -/** - * Java binding of {@code MPI_WIN_ATTACH}. - * @param base initial address of window - * @param size size of window (buffer elements) - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void attach(Buffer base, int size) throws MPIException -{ - MPI.check(); - if(!base.isDirect()) - throw new IllegalArgumentException("The buffer must be direct."); - - int baseSize; - - if(base instanceof ByteBuffer) - baseSize = 1; - else if(base instanceof CharBuffer || base instanceof ShortBuffer) - baseSize = 2; - else if(base instanceof IntBuffer || base instanceof FloatBuffer) - baseSize = 4; - else if(base instanceof LongBuffer || base instanceof DoubleBuffer) - baseSize = 8; - else - throw new AssertionError(); - - int sizeBytes = size * baseSize; - - attach(handle, base, sizeBytes); -} - -private native void attach(long win, Buffer base, int size) throws MPIException; - -/** - * Java binding of {@code MPI_WIN_DETACH}. - * @param base initial address of window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void detach(Buffer base) throws MPIException -{ - MPI.check(); - if(!base.isDirect()) - throw new IllegalArgumentException("The buffer must be direct."); - - detach(handle, base); -} - -private native void detach(long win, Buffer base) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_GET_GROUP}. - * @return group of processes which share access to the window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Group getGroup() throws MPIException -{ - MPI.check(); - return new Group(getGroup(handle)); -} - -private native long getGroup(long win) throws MPIException; - -/** - * Java binding of {@code MPI_PUT}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void put(Buffer origin, int orgCount, Datatype orgType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - put(handle, origin, orgCount, orgType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - getBaseType(orgType, targetType)); -} - -private native void put( - long win, Buffer origin, int orgCount, long orgType, - int targetRank, int targetDisp, int targetCount, long targetType, - int baseType) throws MPIException; - -/** - * Java binding of {@code MPI_GET}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void get(Buffer origin, int orgCount, Datatype orgType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - get(handle, origin, orgCount, orgType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - getBaseType(orgType, targetType)); -} - -private native void get( - long win, Buffer origin, int orgCount, long orgType, - int targetRank, int targetDisp, int targetCount, long targetType, - int baseType) throws MPIException; - -/** - * Java binding of {@code MPI_ACCUMULATE}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void accumulate(Buffer origin, int orgCount, Datatype orgType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType, Op op) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - accumulate(handle, origin, orgCount, orgType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - op, op.handle, getBaseType(orgType, targetType)); -} - -private native void accumulate( - long win, Buffer origin, int orgCount, long orgType, - int targetRank, int targetDisp, int targetCount, long targetType, - Op jOp, long hOp, int baseType) throws MPIException; - -/** - * Java binding of {@code MPI_WIN_FENCE}. - * @param assertion program assertion - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void fence(int assertion) throws MPIException -{ - MPI.check(); - fence(handle, assertion); -} - -private native void fence(long win, int assertion) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_START}. - * @param group group of target processes - * @param assertion program assertion - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void start(Group group, int assertion) throws MPIException -{ - MPI.check(); - start(handle, group.handle, assertion); -} - -private native void start(long win, long group, int assertion) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_COMPLETE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void complete() throws MPIException -{ - MPI.check(); - complete(handle); -} - -private native void complete(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_POST}. - * @param group group of origin processes - * @param assertion program assertion - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void post(Group group, int assertion) throws MPIException -{ - MPI.check(); - post(handle, group.handle, assertion); -} - -private native void post(long win, long group, int assertion) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_WAIT}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void waitFor() throws MPIException -{ - MPI.check(); - waitFor(handle); -} - -private native void waitFor(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_TEST}. - * @return true if success - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public boolean test() throws MPIException -{ - MPI.check(); - return test(handle); -} - -private native boolean test(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_LOCK}. - * @param lockType either MPI.LOCK_EXCLUSIVE or MPI.LOCK_SHARED - * @param rank rank of locked window - * @param assertion program assertion - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void lock(int lockType, int rank, int assertion) throws MPIException -{ - MPI.check(); - lock(handle, lockType, rank, assertion); -} - -private native void lock(long win, int lockType, int rank, int assertion) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_UNLOCK}. - * @param rank rank of window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void unlock(int rank) throws MPIException -{ - MPI.check(); - unlock(handle, rank); -} - -private native void unlock(long win, int rank) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_SET_ERRHANDLER}. - * @param errhandler new MPI error handler for window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setErrhandler(Errhandler errhandler) throws MPIException -{ - MPI.check(); - setErrhandler(handle, errhandler.handle); -} - -private native void setErrhandler(long win, long errhandler) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_CALL_ERRHANDLER}. - * @param errorCode error code - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void callErrhandler(int errorCode) throws MPIException -{ - callErrhandler(handle, errorCode); -} - -private native void callErrhandler(long handle, int errorCode) - throws MPIException; - -/** - * Create a new attribute key. - *

Java binding of the MPI operation {@code MPI_WIN_CREATE_KEYVAL}. - * @return attribute key for future access - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static int createKeyval() throws MPIException -{ - MPI.check(); - return createKeyval_jni(); -} - -private static native int createKeyval_jni() throws MPIException; - -/** - * Frees an attribute key. - *

Java binding of the MPI operation {@code MPI_WIN_FREE_KEYVAL}. - * @param keyval attribute key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public static void freeKeyval(int keyval) throws MPIException -{ - MPI.check(); - freeKeyval_jni(keyval); -} - -private static native void freeKeyval_jni(int keyval) throws MPIException; - -/** - * Stores attribute value associated with a key. - *

Java binding of the MPI operation {@code MPI_WIN_SET_ATTR}. - * @param keyval attribute key - * @param value attribute value - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setAttr(int keyval, Object value) throws MPIException -{ - MPI.check(); - setAttr(handle, keyval, MPI.attrSet(value)); -} - -private native void setAttr(long win, int keyval, byte[] value) - throws MPIException; - -/** - * Retrieves attribute value by key. - *

Java binding of the MPI operation {@code MPI_WIN_GET_ATTR}. - * @param keyval attribute key - * @return attribute value or null if no attribute is associated with the key. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Object getAttr(int keyval) throws MPIException -{ - MPI.check(); - Object obj = getAttr(handle, keyval); - return obj instanceof byte[] ? MPI.attrGet((byte[])obj) : obj; -} - -private native Object getAttr(long win, int keyval) throws MPIException; - -/** - * Deletes an attribute value associated with a key. - *

Java binding of the MPI operation {@code MPI_WIN_DELETE_ATTR}. - * @param keyval attribute key - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void deleteAttr(int keyval) throws MPIException -{ - MPI.check(); - deleteAttr(handle, keyval); -} - -private native void deleteAttr(long win, int keyval) throws MPIException; - -/** - * Java binding of {@code MPI_WIN_FREE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -@Override public void free() throws MPIException -{ - MPI.check(); - handle = free(handle); -} - -private native long free(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_GET_INFO}. - * @return Info Info object associated with this window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Info getInfo() throws MPIException -{ - MPI.check(); - return new Info(getInfo(handle)); -} - -private native long getInfo(long win) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_SET_INFO}. - * @param info the new info - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setInfo(Info info) throws MPIException -{ - MPI.check(); - setInfo(handle, info.handle); -} - -private native void setInfo(long win, long info) - throws MPIException; - -/** - *

Java binding of the MPI operation {@code MPI_RPUT}. - * @param origin_addr initial address of origin buffer - * @param origin_count number of entries in origin buffer - * @param origin_datatype datatype of each entry in origin buffer - * @param target_rank rank of target - * @param target_disp displacement from start of window to target buffer - * @param target_count number of entries in target buffer - * @param target_datatype datatype of each entry in target buffer - * @return RMA request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request rPut(Buffer origin_addr, int origin_count, - Datatype origin_datatype, int target_rank, int target_disp, - int target_count, Datatype target_datatype) - throws MPIException -{ - if(!origin_addr.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rPut(handle, origin_addr, origin_count, - origin_datatype.handle, target_rank, target_disp, - target_count, target_datatype.handle, getBaseType(origin_datatype, target_datatype))); -} - -private native long rPut(long win, Buffer origin_addr, int origin_count, - long origin_datatype, int target_rank, int target_disp, - int target_count, long target_datatype, int baseType) - throws MPIException; - -/** - * Java binding of {@code MPI_RGET}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @return RMA request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public final Request rGet(Buffer origin, int orgCount, Datatype orgType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rGet(handle, origin, orgCount, orgType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - getBaseType(orgType, targetType))); -} - -private native long rGet( - long win, Buffer origin, int orgCount, long orgType, - int targetRank, int targetDisp, int targetCount, long targetType, - int baseType) throws MPIException; - -/** - * Java binding of {@code MPI_RACCUMULATE}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @param op reduce operation - * @return RMA request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public Request rAccumulate(Buffer origin, int orgCount, Datatype orgType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType, Op op) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rAccumulate(handle, origin, orgCount, orgType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - op, op.handle, getBaseType(orgType, targetType))); -} - -private native long rAccumulate( - long win, Buffer origin, int orgCount, long orgType, - int targetRank, int targetDisp, int targetCount, long targetType, - Op jOp, long hOp, int baseType) throws MPIException; - -/** - * Java binding of {@code MPI_GET_ACCUMULATE}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param resultAddr result buffer - * @param resultCount number of entries in result buffer - * @param resultType datatype of each entry in result buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - -public void getAccumulate(Buffer origin, int orgCount, Datatype orgType, - Buffer resultAddr, int resultCount, Datatype resultType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType, Op op) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - getAccumulate(handle, origin, orgCount, orgType.handle, - resultAddr, resultCount, resultType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - op, op.handle, getBaseType(orgType, targetType)); -} - -private native void getAccumulate( - long win, Buffer origin, int orgCount, long orgType, - Buffer resultAddr, int resultCount, long resultType, - int targetRank, int targetDisp, int targetCount, long targetType, - Op jOp, long hOp, int baseType) throws MPIException; - -/** - * Java binding of {@code MPI_RGET_ACCUMULATE}. - * @param origin origin buffer - * @param orgCount number of entries in origin buffer - * @param orgType datatype of each entry in origin buffer - * @param resultAddr result buffer - * @param resultCount number of entries in result buffer - * @param resultType datatype of each entry in result buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param targetCount number of entries in target buffer - * @param targetType datatype of each entry in target buffer - * @param op reduce operation - * @return RMA request - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - -public Request rGetAccumulate(Buffer origin, int orgCount, Datatype orgType, - Buffer resultAddr, int resultCount, Datatype resultType, - int targetRank, int targetDisp, int targetCount, - Datatype targetType, Op op) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rGetAccumulate(handle, origin, orgCount, orgType.handle, - resultAddr, resultCount, resultType.handle, - targetRank, targetDisp, targetCount, targetType.handle, - op, op.handle, getBaseType(orgType, targetType))); -} - -private native long rGetAccumulate( - long win, Buffer origin, int orgCount, long orgType, - Buffer resultAddr, int resultCount, long resultType, - int targetRank, int targetDisp, int targetCount, long targetType, - Op jOp, long hOp, int baseType) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_LOCK_ALL}. - * @param assertion program assertion - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void lockAll(int assertion) throws MPIException -{ - MPI.check(); - lockAll(handle, assertion); -} - -private native void lockAll(long win, int assertion) - throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_UNLOCK_ALL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void unlockAll() throws MPIException -{ - MPI.check(); - unlockAll(handle); -} - -private native void unlockAll(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_SYNC}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void sync() throws MPIException -{ - MPI.check(); - sync(handle); -} - -private native void sync(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_FLUSH}. - * @param targetRank rank of target window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void flush(int targetRank) throws MPIException -{ - MPI.check(); - flush(handle, targetRank); -} - -private native void flush(long win, int targetRank) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_FLUSH_ALL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void flushAll() throws MPIException -{ - MPI.check(); - flushAll(handle); -} - -private native void flushAll(long win) throws MPIException; - -/** - * Java binding of {@code MPI_COMPARE_AND_SWAP}. - * @param origin origin buffer - * @param compareAddr compare buffer - * @param resultAddr result buffer - * @param targetType datatype of each entry in target buffer - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - -public void compareAndSwap(Buffer origin, Buffer compareAddr, Buffer resultAddr, - Datatype targetType, int targetRank, int targetDisp) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - compareAndSwap(handle, origin, compareAddr, resultAddr, - targetType.handle, targetRank, targetDisp); -} - -private native void compareAndSwap( - long win, Buffer origin, Buffer compareAddr, Buffer resultAddr, - long targetType, int targetRank, int targetDisp) throws MPIException; - -/** - * Java binding of {@code MPI_FETCH_AND_OP}. - * @param origin origin buffer - * @param resultAddr result buffer - * @param dataType datatype of entry in origin, result, and target buffers - * @param targetRank rank of target - * @param targetDisp displacement from start of window to target buffer - * @param op reduce operation - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - -public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, - int targetRank, int targetDisp, Op op) - throws MPIException -{ - MPI.check(); - - if(!origin.isDirect()) - throw new IllegalArgumentException("The origin must be direct buffer."); - - fetchAndOp(handle, origin, resultAddr, dataType.handle, targetRank, - targetDisp, op, op.handle, getBaseType(dataType, dataType)); -} - -private native void fetchAndOp( - long win, Buffer origin, Buffer resultAddr, long targetType, int targetRank, - int targetDisp, Op jOp, long hOp, int baseType) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL}. - * @param targetRank rank of target window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - -public void flushLocal(int targetRank) throws MPIException -{ - MPI.check(); - flushLocal(handle, targetRank); -} - -private native void flushLocal(long win, int targetRank) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL_ALL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - -public void flushLocalAll() throws MPIException -{ - MPI.check(); - flushLocalAll(handle); -} - -private native void flushLocalAll(long win) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_GET_NAME}. - * @return the name associated with this window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public String getName() throws MPIException -{ - MPI.check(); - return getName(handle); -} - -private native String getName(long handle) throws MPIException; - -/** - * Java binding of the MPI operation {@code MPI_WIN_SET_NAME}. - * @param name the name to associate with this window - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ -public void setName(String name) throws MPIException -{ - MPI.check(); - setName(handle, name); -} - -private native void setName(long handle, String name) throws MPIException; + private long handle; + public static final int WIN_NULL = 0; + public static final int FLAVOR_PRIVATE = 0; + public static final int FLAVOR_SHARED = 1; + + /** + * Java binding of {@code MPI_WIN_CREATE}. + * @param base initial address of window + * @param size size of window (buffer elements) + * @param dispUnit local unit size for displacements (buffer elements) + * @param info info object + * @param comm communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Win(Buffer base, int size, int dispUnit, Info info, Comm comm) + throws MPIException + { + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + int baseSize; + + if(base instanceof ByteBuffer) + baseSize = 1; + else if(base instanceof CharBuffer || base instanceof ShortBuffer) + baseSize = 2; + else if(base instanceof IntBuffer || base instanceof FloatBuffer) + baseSize = 4; + else if(base instanceof LongBuffer || base instanceof DoubleBuffer) + baseSize = 8; + else + throw new AssertionError(); + + int sizeBytes = size * baseSize, + dispBytes = dispUnit * baseSize; + + handle = createWin(base, sizeBytes, dispBytes, info.handle, comm.handle); + } + + private native long createWin( + Buffer base, int size, int dispUnit, long info, long comm) + throws MPIException; + + /** + * Java binding of {@code MPI_WIN_ALLOCATE} and {@code MPI_WIN_ALLOCATE_SHARED}. + * @param size size of window (buffer elements) + * @param dispUnit local unit size for displacements (buffer elements) + * @param info info object + * @param comm communicator + * @param base initial address of window + * @param flavor FLAVOR_PRIVATE or FLAVOR_SHARED + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Win(int size, int dispUnit, Info info, Comm comm, Buffer base, int flavor) + throws MPIException + { + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + int baseSize; + + if(base instanceof ByteBuffer) + baseSize = 1; + else if(base instanceof CharBuffer || base instanceof ShortBuffer) + baseSize = 2; + else if(base instanceof IntBuffer || base instanceof FloatBuffer) + baseSize = 4; + else if(base instanceof LongBuffer || base instanceof DoubleBuffer) + baseSize = 8; + else + throw new AssertionError(); + + int sizeBytes = size * baseSize, + dispBytes = dispUnit * baseSize; + + if(flavor == 0) { + handle = allocateWin(sizeBytes, dispBytes, info.handle, comm.handle, base); + } else if(flavor == 1) { + handle = allocateSharedWin(sizeBytes, dispBytes, info.handle, comm.handle, base); + } + } + + private native long allocateWin( + int size, int dispUnit, long info, long comm, Buffer base) + throws MPIException; + + private native long allocateSharedWin( + int size, int dispUnit, long info, long comm, Buffer base) + throws MPIException; + + /** + * Java binding of {@code MPI_WIN_CREATE_DYNAMIC}. + * @param info info object + * @param comm communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Win(Info info, Comm comm) + throws MPIException + { + handle = createDynamicWin(info.handle, comm.handle); + } + + private native long createDynamicWin( + long info, long comm) + throws MPIException; + + private int getBaseType(Datatype orgType, Datatype targetType) + { + int baseType = orgType.baseType; + + if(baseType != targetType.baseType) + { + throw new IllegalArgumentException( + "Both datatype arguments must be constructed "+ + "from the same predefined datatype."); + } + + return baseType; + } + + /** + * Java binding of {@code MPI_WIN_ATTACH}. + * @param base initial address of window + * @param size size of window (buffer elements) + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void attach(Buffer base, int size) throws MPIException + { + MPI.check(); + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + int baseSize; + + if(base instanceof ByteBuffer) + baseSize = 1; + else if(base instanceof CharBuffer || base instanceof ShortBuffer) + baseSize = 2; + else if(base instanceof IntBuffer || base instanceof FloatBuffer) + baseSize = 4; + else if(base instanceof LongBuffer || base instanceof DoubleBuffer) + baseSize = 8; + else + throw new AssertionError(); + + int sizeBytes = size * baseSize; + + attach(handle, base, sizeBytes); + } + + private native void attach(long win, Buffer base, int size) throws MPIException; + + /** + * Java binding of {@code MPI_WIN_DETACH}. + * @param base initial address of window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void detach(Buffer base) throws MPIException + { + MPI.check(); + if(!base.isDirect()) + throw new IllegalArgumentException("The buffer must be direct."); + + detach(handle, base); + } + + private native void detach(long win, Buffer base) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_GET_GROUP}. + * @return group of processes which share access to the window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Group getGroup() throws MPIException + { + MPI.check(); + return new Group(getGroup(handle)); + } + + private native long getGroup(long win) throws MPIException; + + /** + * Java binding of {@code MPI_PUT}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void put(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + put(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + getBaseType(orgType, targetType)); + } + + private native void put( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + int baseType) throws MPIException; + + /** + * Java binding of {@code MPI_GET}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void get(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + get(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + getBaseType(orgType, targetType)); + } + + private native void get( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + int baseType) throws MPIException; + + /** + * Java binding of {@code MPI_ACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void accumulate(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + accumulate(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType)); + } + + private native void accumulate( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + + /** + * Java binding of {@code MPI_WIN_FENCE}. + * @param assertion program assertion + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void fence(int assertion) throws MPIException + { + MPI.check(); + fence(handle, assertion); + } + + private native void fence(long win, int assertion) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_START}. + * @param group group of target processes + * @param assertion program assertion + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void start(Group group, int assertion) throws MPIException + { + MPI.check(); + start(handle, group.handle, assertion); + } + + private native void start(long win, long group, int assertion) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_COMPLETE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void complete() throws MPIException + { + MPI.check(); + complete(handle); + } + + private native void complete(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_POST}. + * @param group group of origin processes + * @param assertion program assertion + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void post(Group group, int assertion) throws MPIException + { + MPI.check(); + post(handle, group.handle, assertion); + } + + private native void post(long win, long group, int assertion) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_WAIT}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void waitFor() throws MPIException + { + MPI.check(); + waitFor(handle); + } + + private native void waitFor(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_TEST}. + * @return true if success + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public boolean test() throws MPIException + { + MPI.check(); + return test(handle); + } + + private native boolean test(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_LOCK}. + * @param lockType either MPI.LOCK_EXCLUSIVE or MPI.LOCK_SHARED + * @param rank rank of locked window + * @param assertion program assertion + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void lock(int lockType, int rank, int assertion) throws MPIException + { + MPI.check(); + lock(handle, lockType, rank, assertion); + } + + private native void lock(long win, int lockType, int rank, int assertion) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_UNLOCK}. + * @param rank rank of window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void unlock(int rank) throws MPIException + { + MPI.check(); + unlock(handle, rank); + } + + private native void unlock(long win, int rank) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_SET_ERRHANDLER}. + * @param errhandler new MPI error handler for window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setErrhandler(Errhandler errhandler) throws MPIException + { + MPI.check(); + setErrhandler(handle, errhandler.handle); + } + + private native void setErrhandler(long win, long errhandler) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_CALL_ERRHANDLER}. + * @param errorCode error code + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void callErrhandler(int errorCode) throws MPIException + { + callErrhandler(handle, errorCode); + } + + private native void callErrhandler(long handle, int errorCode) + throws MPIException; + + /** + * Create a new attribute key. + *

Java binding of the MPI operation {@code MPI_WIN_CREATE_KEYVAL}. + * @return attribute key for future access + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static int createKeyval() throws MPIException + { + MPI.check(); + return createKeyval_jni(); + } + + private static native int createKeyval_jni() throws MPIException; + + /** + * Frees an attribute key. + *

Java binding of the MPI operation {@code MPI_WIN_FREE_KEYVAL}. + * @param keyval attribute key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public static void freeKeyval(int keyval) throws MPIException + { + MPI.check(); + freeKeyval_jni(keyval); + } + + private static native void freeKeyval_jni(int keyval) throws MPIException; + + /** + * Stores attribute value associated with a key. + *

Java binding of the MPI operation {@code MPI_WIN_SET_ATTR}. + * @param keyval attribute key + * @param value attribute value + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setAttr(int keyval, Object value) throws MPIException + { + MPI.check(); + setAttr(handle, keyval, MPI.attrSet(value)); + } + + private native void setAttr(long win, int keyval, byte[] value) + throws MPIException; + + /** + * Retrieves attribute value by key. + *

Java binding of the MPI operation {@code MPI_WIN_GET_ATTR}. + * @param keyval attribute key + * @return attribute value or null if no attribute is associated with the key. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Object getAttr(int keyval) throws MPIException + { + MPI.check(); + Object obj = getAttr(handle, keyval); + return obj instanceof byte[] ? MPI.attrGet((byte[])obj) : obj; + } + + private native Object getAttr(long win, int keyval) throws MPIException; + + /** + * Deletes an attribute value associated with a key. + *

Java binding of the MPI operation {@code MPI_WIN_DELETE_ATTR}. + * @param keyval attribute key + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void deleteAttr(int keyval) throws MPIException + { + MPI.check(); + deleteAttr(handle, keyval); + } + + private native void deleteAttr(long win, int keyval) throws MPIException; + + /** + * Java binding of {@code MPI_WIN_FREE}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public void free() throws MPIException + { + MPI.check(); + handle = free(handle); + } + + private native long free(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_GET_INFO}. + * @return Info Info object associated with this window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Info getInfo() throws MPIException + { + MPI.check(); + return new Info(getInfo(handle)); + } + + private native long getInfo(long win) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_SET_INFO}. + * @param info the new info + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setInfo(Info info) throws MPIException + { + MPI.check(); + setInfo(handle, info.handle); + } + + private native void setInfo(long win, long info) + throws MPIException; + + /** + *

Java binding of the MPI operation {@code MPI_RPUT}. + * @param origin_addr initial address of origin buffer + * @param origin_count number of entries in origin buffer + * @param origin_datatype datatype of each entry in origin buffer + * @param target_rank rank of target + * @param target_disp displacement from start of window to target buffer + * @param target_count number of entries in target buffer + * @param target_datatype datatype of each entry in target buffer + * @return RMA request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request rPut(Buffer origin_addr, int origin_count, + Datatype origin_datatype, int target_rank, int target_disp, + int target_count, Datatype target_datatype) + throws MPIException + { + if(!origin_addr.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rPut(handle, origin_addr, origin_count, + origin_datatype.handle, target_rank, target_disp, + target_count, target_datatype.handle, getBaseType(origin_datatype, target_datatype))); + } + + private native long rPut(long win, Buffer origin_addr, int origin_count, + long origin_datatype, int target_rank, int target_disp, + int target_count, long target_datatype, int baseType) + throws MPIException; + + /** + * Java binding of {@code MPI_RGET}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @return RMA request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Request rGet(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rGet(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + getBaseType(orgType, targetType))); + } + + private native long rGet( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + int baseType) throws MPIException; + + /** + * Java binding of {@code MPI_RACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @return RMA request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Request rAccumulate(Buffer origin, int orgCount, Datatype orgType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rAccumulate(handle, origin, orgCount, orgType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType))); + } + + private native long rAccumulate( + long win, Buffer origin, int orgCount, long orgType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + + /** + * Java binding of {@code MPI_GET_ACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param resultAddr result buffer + * @param resultCount number of entries in result buffer + * @param resultType datatype of each entry in result buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + + public void getAccumulate(Buffer origin, int orgCount, Datatype orgType, + Buffer resultAddr, int resultCount, Datatype resultType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + getAccumulate(handle, origin, orgCount, orgType.handle, + resultAddr, resultCount, resultType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType)); + } + + private native void getAccumulate( + long win, Buffer origin, int orgCount, long orgType, + Buffer resultAddr, int resultCount, long resultType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + + /** + * Java binding of {@code MPI_RGET_ACCUMULATE}. + * @param origin origin buffer + * @param orgCount number of entries in origin buffer + * @param orgType datatype of each entry in origin buffer + * @param resultAddr result buffer + * @param resultCount number of entries in result buffer + * @param resultType datatype of each entry in result buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param targetCount number of entries in target buffer + * @param targetType datatype of each entry in target buffer + * @param op reduce operation + * @return RMA request + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + + public Request rGetAccumulate(Buffer origin, int orgCount, Datatype orgType, + Buffer resultAddr, int resultCount, Datatype resultType, + int targetRank, int targetDisp, int targetCount, + Datatype targetType, Op op) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + return new Request(rGetAccumulate(handle, origin, orgCount, orgType.handle, + resultAddr, resultCount, resultType.handle, + targetRank, targetDisp, targetCount, targetType.handle, + op, op.handle, getBaseType(orgType, targetType))); + } + + private native long rGetAccumulate( + long win, Buffer origin, int orgCount, long orgType, + Buffer resultAddr, int resultCount, long resultType, + int targetRank, int targetDisp, int targetCount, long targetType, + Op jOp, long hOp, int baseType) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_LOCK_ALL}. + * @param assertion program assertion + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void lockAll(int assertion) throws MPIException + { + MPI.check(); + lockAll(handle, assertion); + } + + private native void lockAll(long win, int assertion) + throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_UNLOCK_ALL}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void unlockAll() throws MPIException + { + MPI.check(); + unlockAll(handle); + } + + private native void unlockAll(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_SYNC}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void sync() throws MPIException + { + MPI.check(); + sync(handle); + } + + private native void sync(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH}. + * @param targetRank rank of target window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void flush(int targetRank) throws MPIException + { + MPI.check(); + flush(handle, targetRank); + } + + private native void flush(long win, int targetRank) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH_ALL}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void flushAll() throws MPIException + { + MPI.check(); + flushAll(handle); + } + + private native void flushAll(long win) throws MPIException; + + /** + * Java binding of {@code MPI_COMPARE_AND_SWAP}. + * @param origin origin buffer + * @param compareAddr compare buffer + * @param resultAddr result buffer + * @param targetType datatype of each entry in target buffer + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + + public void compareAndSwap(Buffer origin, Buffer compareAddr, Buffer resultAddr, + Datatype targetType, int targetRank, int targetDisp) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + compareAndSwap(handle, origin, compareAddr, resultAddr, + targetType.handle, targetRank, targetDisp); + } + + private native void compareAndSwap( + long win, Buffer origin, Buffer compareAddr, Buffer resultAddr, + long targetType, int targetRank, int targetDisp) throws MPIException; + + /** + * Java binding of {@code MPI_FETCH_AND_OP}. + * @param origin origin buffer + * @param resultAddr result buffer + * @param dataType datatype of entry in origin, result, and target buffers + * @param targetRank rank of target + * @param targetDisp displacement from start of window to target buffer + * @param op reduce operation + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + + public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, + int targetRank, int targetDisp, Op op) + throws MPIException + { + MPI.check(); + + if(!origin.isDirect()) + throw new IllegalArgumentException("The origin must be direct buffer."); + + fetchAndOp(handle, origin, resultAddr, dataType.handle, targetRank, + targetDisp, op, op.handle, getBaseType(dataType, dataType)); + } + + private native void fetchAndOp( + long win, Buffer origin, Buffer resultAddr, long targetType, int targetRank, + int targetDisp, Op jOp, long hOp, int baseType) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL}. + * @param targetRank rank of target window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + + public void flushLocal(int targetRank) throws MPIException + { + MPI.check(); + flushLocal(handle, targetRank); + } + + private native void flushLocal(long win, int targetRank) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL_ALL}. + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + + public void flushLocalAll() throws MPIException + { + MPI.check(); + flushLocalAll(handle); + } + + private native void flushLocalAll(long win) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_GET_NAME}. + * @return the name associated with this window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public String getName() throws MPIException + { + MPI.check(); + return getName(handle); + } + + private native String getName(long handle) throws MPIException; + + /** + * Java binding of the MPI operation {@code MPI_WIN_SET_NAME}. + * @param name the name to associate with this window + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setName(String name) throws MPIException + { + MPI.check(); + setName(handle, name); + } + + private native void setName(long handle, String name) throws MPIException; } // Win From 42213b16138b75e238cec6f7ae2d1cd683600527 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Mon, 3 Aug 2015 15:14:47 -0600 Subject: [PATCH 0097/1704] Conflict fix Fixing a conflict in MPI.java Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/MPI.java | 918 ------------------------------------ 1 file changed, 918 deletions(-) diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index 42a7bbe8eea..ca8976d10cc 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -998,923 +998,5 @@ public static DoubleBuffer slice(double[] buf, int offset) { return DoubleBuffer.wrap(buf, offset, buf.length - offset).slice(); } - ======= - private static boolean initialized, finalized; - private static byte[] buffer = null; // Buffer allocation - private static final int MAX_PROCESSOR_NAME = 256; - private static final ByteOrder nativeOrder = ByteOrder.nativeOrder(); - - public static final Intracomm COMM_WORLD, COMM_SELF; - - public static final int THREAD_SINGLE, THREAD_FUNNELED, THREAD_SERIALIZED, - THREAD_MULTIPLE; - - public static final int GRAPH, DIST_GRAPH, CART; - public static final int ANY_SOURCE, ANY_TAG; - - public static final Op MAX, MIN, SUM, PROD, LAND, BAND, - LOR, BOR, LXOR, BXOR, REPLACE, NO_OP; - - /** - * Global minimum operator. - *

{@code MINLOC} and {@link #MAXLOC} can be used with each of the following - * datatypes: {@link #INT2}, {@link #SHORT_INT}, {@link #LONG_INT}, - * {@link #FLOAT_INT} and {@link #DOUBLE_INT}. - */ - public static final Op MINLOC; - - /** Global maximum operator. See {@link #MINLOC}.*/ - public static final Op MAXLOC; - - public static final Datatype DATATYPE_NULL; - - public static final Datatype BYTE, CHAR, SHORT, BOOLEAN, - INT, LONG, FLOAT, DOUBLE, PACKED, - FLOAT_COMPLEX, DOUBLE_COMPLEX; - - /** Struct which must be used with {@link #int2}. */ - public static final Datatype INT2; - /** Struct which must be used with {@link #shortInt}. */ - public static final Datatype SHORT_INT; - /** Struct which must be used with {@link #longInt}. */ - public static final Datatype LONG_INT; - /** Struct which must be used with {@link #floatInt}. */ - public static final Datatype FLOAT_INT; - /** Struct which must be used with {@link #doubleInt}. */ - public static final Datatype DOUBLE_INT; - - /** Struct object for {@link #INT2} datatype. */ - public static final Int2 int2; - /** Struct object for {@link #SHORT_INT} datatype. */ - public static final ShortInt shortInt; - /** Struct object for {@link #LONG_INT} datatype. */ - public static final LongInt longInt; - /** Struct object for {@link #FLOAT_INT} datatype. */ - public static final FloatInt floatInt; - /** Struct object for {@link #DOUBLE_INT} datatype. */ - public static final DoubleInt doubleInt; - - public static final Request REQUEST_NULL; - public static final Group GROUP_EMPTY; - public static final Info INFO_ENV, INFO_NULL; - - public static final int PROC_NULL; - public static final int UNDEFINED; - public static final int IDENT, CONGRUENT, SIMILAR, UNEQUAL; - public static final int TAG_UB, HOST, IO, WTIME_IS_GLOBAL; - - public static final int APPNUM, LASTUSEDCODE, UNIVERSE_SIZE, WIN_BASE, - WIN_SIZE, WIN_DISP_UNIT; - - public static final int VERSION, SUBVERSION; - public static final int ROOT, KEYVAL_INVALID, BSEND_OVERHEAD; - public static final int MAX_OBJECT_NAME, MAX_PORT_NAME, MAX_DATAREP_STRING; - public static final int MAX_INFO_KEY, MAX_INFO_VAL; - public static final int ORDER_C, ORDER_FORTRAN; - public static final int DISTRIBUTE_BLOCK, DISTRIBUTE_CYCLIC, DISTRIBUTE_NONE, - DISTRIBUTE_DFLT_DARG; - - public static final int MODE_CREATE, MODE_RDONLY, MODE_WRONLY, MODE_RDWR, - MODE_DELETE_ON_CLOSE, MODE_UNIQUE_OPEN, MODE_EXCL, - MODE_APPEND, MODE_SEQUENTIAL; - public static final int DISPLACEMENT_CURRENT; - public static final int SEEK_SET, SEEK_CUR, SEEK_END; - - public static final int MODE_NOCHECK, MODE_NOPRECEDE, MODE_NOPUT, - MODE_NOSTORE, MODE_NOSUCCEED; - public static final int LOCK_EXCLUSIVE, LOCK_SHARED; - - public static final Errhandler ERRORS_ARE_FATAL, ERRORS_RETURN; - - // Error classes and codes - public static final int SUCCESS; - public static final int ERR_BUFFER; - public static final int ERR_COUNT; - public static final int ERR_TYPE; - public static final int ERR_TAG; - public static final int ERR_COMM; - public static final int ERR_RANK; - public static final int ERR_REQUEST; - public static final int ERR_ROOT; - public static final int ERR_GROUP; - public static final int ERR_OP; - public static final int ERR_TOPOLOGY; - public static final int ERR_DIMS; - public static final int ERR_ARG; - public static final int ERR_UNKNOWN; - public static final int ERR_TRUNCATE; - public static final int ERR_OTHER; - public static final int ERR_INTERN; - public static final int ERR_IN_STATUS; - public static final int ERR_PENDING; - public static final int ERR_ACCESS; - public static final int ERR_AMODE; - public static final int ERR_ASSERT; - public static final int ERR_BAD_FILE; - public static final int ERR_BASE; - public static final int ERR_CONVERSION; - public static final int ERR_DISP; - public static final int ERR_DUP_DATAREP; - public static final int ERR_FILE_EXISTS; - public static final int ERR_FILE_IN_USE; - public static final int ERR_FILE; - public static final int ERR_INFO_KEY; - public static final int ERR_INFO_NOKEY; - public static final int ERR_INFO_VALUE; - public static final int ERR_INFO; - public static final int ERR_IO; - public static final int ERR_KEYVAL; - public static final int ERR_LOCKTYPE; - public static final int ERR_NAME; - public static final int ERR_NO_MEM; - public static final int ERR_NOT_SAME; - public static final int ERR_NO_SPACE; - public static final int ERR_NO_SUCH_FILE; - public static final int ERR_PORT; - public static final int ERR_QUOTA; - public static final int ERR_READ_ONLY; - public static final int ERR_RMA_CONFLICT; - public static final int ERR_RMA_SYNC; - public static final int ERR_SERVICE; - public static final int ERR_SIZE; - public static final int ERR_SPAWN; - public static final int ERR_UNSUPPORTED_DATAREP; - public static final int ERR_UNSUPPORTED_OPERATION; - public static final int ERR_WIN; - public static final int ERR_LASTCODE; - public static final int ERR_SYSRESOURCE; - - static - { - System.loadLibrary("mpi_java"); - - DATATYPE_NULL = new Datatype(); - - BYTE = new Datatype(); - CHAR = new Datatype(); - SHORT = new Datatype(); - BOOLEAN = new Datatype(); - INT = new Datatype(); - LONG = new Datatype(); - FLOAT = new Datatype(); - DOUBLE = new Datatype(); - PACKED = new Datatype(); - INT2 = new Datatype(); - - SHORT_INT = new Datatype(); - LONG_INT = new Datatype(); - FLOAT_INT = new Datatype(); - DOUBLE_INT = new Datatype(); - FLOAT_COMPLEX = new Datatype(); - DOUBLE_COMPLEX = new Datatype(); - - int2 = newInt2(); - shortInt = newShortInt(); - longInt = newLongInt(); - floatInt = newFloatInt(); - doubleInt = newDoubleInt(); - - MAX = new Op(1); - MIN = new Op(2); - SUM = new Op(3); - PROD = new Op(4); - LAND = new Op(5); - BAND = new Op(6); - LOR = new Op(7); - BOR = new Op(8); - LXOR = new Op(9); - BXOR = new Op(10); - MINLOC = new Op(11); - MAXLOC = new Op(12); - REPLACE = new Op(13); - NO_OP = new Op(14); - - GROUP_EMPTY = new Group(Group.getEmpty()); - REQUEST_NULL = new Request(Request.getNull()); - INFO_ENV = Info.newEnv(); - INFO_NULL = new Info(Info.NULL); - - Constant c = new Constant(); - - THREAD_SINGLE = c.THREAD_SINGLE; - THREAD_FUNNELED = c.THREAD_FUNNELED; - THREAD_SERIALIZED = c.THREAD_SERIALIZED; - THREAD_MULTIPLE = c.THREAD_MULTIPLE; - - GRAPH = c.GRAPH; - DIST_GRAPH = c.DIST_GRAPH; - CART = c.CART; - - ANY_SOURCE = c.ANY_SOURCE; - ANY_TAG = c.ANY_TAG; - PROC_NULL = c.PROC_NULL; - - UNDEFINED = c.UNDEFINED; - - IDENT = c.IDENT; - CONGRUENT = c.CONGRUENT; - SIMILAR = c.SIMILAR; - UNEQUAL = c.UNEQUAL; - - TAG_UB = c.TAG_UB; - HOST = c.HOST; - IO = c.IO; - WTIME_IS_GLOBAL = c.WTIME_IS_GLOBAL; - - APPNUM = c.APPNUM; - LASTUSEDCODE = c.LASTUSEDCODE; - UNIVERSE_SIZE = c.UNIVERSE_SIZE; - WIN_BASE = c.WIN_BASE; - WIN_SIZE = c.WIN_SIZE; - WIN_DISP_UNIT = c.WIN_DISP_UNIT; - - VERSION = c.VERSION; - SUBVERSION = c.SUBVERSION; - - ROOT = c.ROOT; - KEYVAL_INVALID = c.KEYVAL_INVALID; - BSEND_OVERHEAD = c.BSEND_OVERHEAD; - - MAX_OBJECT_NAME = c.MAX_OBJECT_NAME; - MAX_PORT_NAME = c.MAX_PORT_NAME; - MAX_DATAREP_STRING = c.MAX_DATAREP_STRING; - - MAX_INFO_KEY = c.MAX_INFO_KEY; - MAX_INFO_VAL = c.MAX_INFO_VAL; - - ORDER_C = c.ORDER_C; - ORDER_FORTRAN = c.ORDER_FORTRAN; - - DISTRIBUTE_BLOCK = c.DISTRIBUTE_BLOCK; - DISTRIBUTE_CYCLIC = c.DISTRIBUTE_CYCLIC; - DISTRIBUTE_NONE = c.DISTRIBUTE_NONE; - DISTRIBUTE_DFLT_DARG = c.DISTRIBUTE_DFLT_DARG; - - MODE_CREATE = c.MODE_CREATE; - MODE_RDONLY = c.MODE_RDONLY; - MODE_WRONLY = c.MODE_WRONLY; - MODE_RDWR = c.MODE_RDWR; - MODE_DELETE_ON_CLOSE = c.MODE_DELETE_ON_CLOSE; - MODE_UNIQUE_OPEN = c.MODE_UNIQUE_OPEN; - MODE_EXCL = c.MODE_EXCL; - MODE_APPEND = c.MODE_APPEND; - MODE_SEQUENTIAL = c.MODE_SEQUENTIAL; - - DISPLACEMENT_CURRENT = c.DISPLACEMENT_CURRENT; - - SEEK_SET = c.SEEK_SET; - SEEK_CUR = c.SEEK_CUR; - SEEK_END = c.SEEK_END; - - MODE_NOCHECK = c.MODE_NOCHECK; - MODE_NOPRECEDE = c.MODE_NOPRECEDE; - MODE_NOPUT = c.MODE_NOPUT; - MODE_NOSTORE = c.MODE_NOSTORE; - MODE_NOSUCCEED = c.MODE_NOSUCCEED; - LOCK_EXCLUSIVE = c.LOCK_EXCLUSIVE; - LOCK_SHARED = c.LOCK_SHARED; - - ERRORS_ARE_FATAL = new Errhandler(Errhandler.getFatal()); - ERRORS_RETURN = new Errhandler(Errhandler.getReturn()); - - COMM_WORLD = new Intracomm(); - COMM_SELF = new Intracomm(); - - // Error classes and codes - SUCCESS = c.SUCCESS; - ERR_BUFFER = c.ERR_BUFFER; - ERR_COUNT = c.ERR_COUNT; - ERR_TYPE = c.ERR_TYPE; - ERR_TAG = c.ERR_TAG; - ERR_COMM = c.ERR_COMM; - ERR_RANK = c.ERR_RANK; - ERR_REQUEST = c.ERR_REQUEST; - ERR_ROOT = c.ERR_ROOT; - ERR_GROUP = c.ERR_GROUP; - ERR_OP = c.ERR_OP; - ERR_TOPOLOGY = c.ERR_TOPOLOGY; - ERR_DIMS = c.ERR_DIMS; - ERR_ARG = c.ERR_ARG; - ERR_UNKNOWN = c.ERR_UNKNOWN; - ERR_TRUNCATE = c.ERR_TRUNCATE; - ERR_OTHER = c.ERR_OTHER; - ERR_INTERN = c.ERR_INTERN; - ERR_IN_STATUS = c.ERR_IN_STATUS; - ERR_PENDING = c.ERR_PENDING; - ERR_ACCESS = c.ERR_ACCESS; - ERR_AMODE = c.ERR_AMODE; - ERR_ASSERT = c.ERR_ASSERT; - ERR_BAD_FILE = c.ERR_BAD_FILE; - ERR_BASE = c.ERR_BASE; - ERR_CONVERSION = c.ERR_CONVERSION; - ERR_DISP = c.ERR_DISP; - ERR_DUP_DATAREP = c.ERR_DUP_DATAREP; - ERR_FILE_EXISTS = c.ERR_FILE_EXISTS; - ERR_FILE_IN_USE = c.ERR_FILE_IN_USE; - ERR_FILE = c.ERR_FILE; - ERR_INFO_KEY = c.ERR_INFO_KEY; - ERR_INFO_NOKEY = c.ERR_INFO_NOKEY; - ERR_INFO_VALUE = c.ERR_INFO_VALUE; - ERR_INFO = c.ERR_INFO; - ERR_IO = c.ERR_IO; - ERR_KEYVAL = c.ERR_KEYVAL; - ERR_LOCKTYPE = c.ERR_LOCKTYPE; - ERR_NAME = c.ERR_NAME; - ERR_NO_MEM = c.ERR_NO_MEM; - ERR_NOT_SAME = c.ERR_NOT_SAME; - ERR_NO_SPACE = c.ERR_NO_SPACE; - ERR_NO_SUCH_FILE = c.ERR_NO_SUCH_FILE; - ERR_PORT = c.ERR_PORT; - ERR_QUOTA = c.ERR_QUOTA; - ERR_READ_ONLY = c.ERR_READ_ONLY; - ERR_RMA_CONFLICT = c.ERR_RMA_CONFLICT; - ERR_RMA_SYNC = c.ERR_RMA_SYNC; - ERR_SERVICE = c.ERR_SERVICE; - ERR_SIZE = c.ERR_SIZE; - ERR_SPAWN = c.ERR_SPAWN; - ERR_UNSUPPORTED_DATAREP = c.ERR_UNSUPPORTED_DATAREP; - ERR_UNSUPPORTED_OPERATION = c.ERR_UNSUPPORTED_OPERATION; - ERR_WIN = c.ERR_WIN; - ERR_LASTCODE = c.ERR_LASTCODE; - ERR_SYSRESOURCE = c.ERR_SYSRESOURCE; - } - - private static native Int2 newInt2(); - private static native ShortInt newShortInt(); - private static native LongInt newLongInt(); - private static native FloatInt newFloatInt(); - private static native DoubleInt newDoubleInt(); - - private static void initCommon() throws MPIException - { - initialized = true; - - DATATYPE_NULL.setBasic(Datatype.NULL); - - BYTE.setBasic(Datatype.BYTE); - CHAR.setBasic(Datatype.CHAR); - SHORT.setBasic(Datatype.SHORT); - BOOLEAN.setBasic(Datatype.BOOLEAN); - INT.setBasic(Datatype.INT); - LONG.setBasic(Datatype.LONG); - FLOAT.setBasic(Datatype.FLOAT); - DOUBLE.setBasic(Datatype.DOUBLE); - PACKED.setBasic(Datatype.PACKED); - - INT2.setBasic(Datatype.INT2, MPI.BYTE); - SHORT_INT.setBasic(Datatype.SHORT_INT, MPI.BYTE); - LONG_INT.setBasic(Datatype.LONG_INT, MPI.BYTE); - FLOAT_INT.setBasic(Datatype.FLOAT_INT, MPI.BYTE); - DOUBLE_INT.setBasic(Datatype.DOUBLE_INT, MPI.BYTE); - FLOAT_COMPLEX.setBasic(Datatype.FLOAT_COMPLEX, MPI.FLOAT); - DOUBLE_COMPLEX.setBasic(Datatype.DOUBLE_COMPLEX, MPI.DOUBLE); - - COMM_WORLD.setType(Intracomm.WORLD); - COMM_SELF.setType(Intracomm.SELF); - } - - /** - * Initialize MPI. - *

Java binding of the MPI operation {@code MPI_INIT}. - * @param args arguments to the {@code main} method. - * @return arguments - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static String[] Init(String[] args) throws MPIException - { - if(initialized) - throw new MPIException("MPI is already initialized."); - - String[] newArgs = Init_jni(args); - initCommon(); - return newArgs; - } - - private static native String [] Init_jni(String[] args); - - /** - * Initialize MPI with threads. - *

Java binding of the MPI operation {@code MPI_INIT_THREAD}. - * @param args arguments to the {@code main} method. - * @param required desired level of thread support - * @return provided level of thread support - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static int InitThread(String[] args, int required) throws MPIException - { - if(initialized) - throw new MPIException("MPI is already initialized."); - - int provided = InitThread_jni(args, required); - initCommon(); - return provided; - } - - private static native int InitThread_jni(String[] args, int required) - throws MPIException; - - /** - * Java binding of the MPI operation {@code MPI_QUERY_THREAD}. - * @return provided level of thread support - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static int queryThread() throws MPIException - { - MPI.check(); - return queryThread_jni(); - } - - private static native int queryThread_jni() throws MPIException; - - /** - * Java binding of the MPI operation {@code MPI_IS_THREAD_MAIN}. - * @return true if it is the main thread - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static boolean isThreadMain() throws MPIException - { - MPI.check(); - return isThreadMain_jni(); - } - - private static native boolean isThreadMain_jni() throws MPIException; - - /** - * Finalize MPI. - *

Java binding of the MPI operation {@code MPI_FINALIZE}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static void Finalize() throws MPIException - { - check(); - Finalize_jni(); - finalized = true; - } - - private static native void Finalize_jni() throws MPIException; - - /** - * Returns an elapsed time on the calling processor. - *

Java binding of the MPI operation {@code MPI_WTIME}. - * @return time in seconds since an arbitrary time in the past. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static double wtime() throws MPIException - { - check(); - return wtime_jni(); - } - - private static native double wtime_jni(); - - /** - * Returns resolution of timer. - *

Java binding of the MPI operation {MPI_WTICK}. - * @return resolution of {@code wtime} in seconds. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - public static double wtick() throws MPIException - { - check(); - return wtick_jni(); - } - - private static native double wtick_jni(); - - /** - * Returns the name of the processor on which it is called. - *

Java binding of the MPI operation {@code MPI_GET_PROCESSOR_NAME}. - * @return A unique specifier for the actual node. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - static public String getProcessorName() throws MPIException - { - check(); - byte[] buf = new byte[MAX_PROCESSOR_NAME]; - int lengh = getProcessorName(buf); - return new String(buf,0,lengh); - } - - static private native int getProcessorName(byte[] buf); - - /** - * Test if MPI has been initialized. - *

Java binding of the MPI operation {@code MPI_INITIALIZED}. - * @return {@code true} if {@code Init} has been called, - * {@code false} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - static public native boolean isInitialized() throws MPIException; - - /** - * Test if MPI has been finalized. - *

Java binding of the MPI operation {@code MPI_FINALIZED}. - * @return {@code true} if {@code Finalize} has been called, - * {@code false} otherwise. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - static public native boolean isFinalized() throws MPIException; - - /** - * Attaches a user-provided buffer for sending. - *

Java binding of the MPI operation {@code MPI_BUFFER_ATTACH}. - * @param buffer initial buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - static public void attachBuffer(byte[] buffer) throws MPIException - { - check(); - MPI.buffer = buffer; - attachBuffer_jni(buffer); - } - - static private native void attachBuffer_jni(byte[] buffer); - - /** - * Removes an existing buffer (for use in sending). - *

Java binding of the MPI operation {@code MPI_BUFFER_DETACH}. - * @return initial buffer - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - static public byte[] detachBuffer() throws MPIException - { - check(); - detachBuffer_jni(buffer); - byte[] result = MPI.buffer; - MPI.buffer = null; - return result; - } - - static private native void detachBuffer_jni(byte[] buffer); - - /** - * Controls profiling. - *

This method is not implemented. - *

Java binding of the MPI operation {@code MPI_PCONTROL}. - * @param level Profiling level. - * @param obj Profiling information. - */ - public static void pControl(int level, Object obj) - { - // Nothing to do here. - } - - /** - * Check if MPI has been initialized and hasn't been finalized. - * @throws MPIException Signals that an MPI exception of some sort has occurred. - */ - protected static void check() throws MPIException - { - if(!initialized) - throw new MPIException("MPI is not initialized."); - - if(finalized) - throw new MPIException("MPI is finalized."); - } - - protected static byte[] attrSet(Object value) throws MPIException - { - try - { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream os = new ObjectOutputStream(baos); - os.writeObject(value); - os.close(); - return baos.toByteArray(); - } - catch(IOException ex) - { - MPIException mpiex = new MPIException(ex); - mpiex.setStackTrace(ex.getStackTrace()); - throw mpiex; - } - } - - protected static Object attrGet(byte[] value) throws MPIException - { - if(value == null) - return null; - - try - { - ByteArrayInputStream bais = new ByteArrayInputStream(value); - ObjectInputStream is = new ObjectInputStream(bais); - Object obj = is.readObject(); - is.close(); - return obj; - } - catch(ClassNotFoundException ex) - { - throw new MPIException(ex); - } - catch(IOException ex) - { - throw new MPIException(ex); - } - } - - /** - * Allocates a new direct byte buffer. - * @param capacity The new buffer's capacity, in bytes - * @return The new byte buffer - */ - public static ByteBuffer newByteBuffer(int capacity) - { - ByteBuffer buf = ByteBuffer.allocateDirect(capacity); - buf.order(nativeOrder); - return buf; - } - - /** - * Allocates a new direct char buffer. - * @param capacity The new buffer's capacity, in chars - * @return The new char buffer - */ - public static CharBuffer newCharBuffer(int capacity) - { - assert capacity <= Integer.MAX_VALUE / 2; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); - buf.order(nativeOrder); - return buf.asCharBuffer(); - } - - /** - * Allocates a new direct short buffer. - * @param capacity The new buffer's capacity, in shorts - * @return The new short buffer - */ - public static ShortBuffer newShortBuffer(int capacity) - { - assert capacity <= Integer.MAX_VALUE / 2; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 2); - buf.order(nativeOrder); - return buf.asShortBuffer(); - } - - /** - * Allocates a new direct int buffer. - * @param capacity The new buffer's capacity, in ints - * @return The new int buffer - */ - public static IntBuffer newIntBuffer(int capacity) - { - assert capacity <= Integer.MAX_VALUE / 4; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); - buf.order(nativeOrder); - return buf.asIntBuffer(); - } - - /** - * Allocates a new direct long buffer. - * @param capacity The new buffer's capacity, in longs - * @return The new long buffer - */ - public static LongBuffer newLongBuffer(int capacity) - { - assert capacity <= Integer.MAX_VALUE / 8; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); - buf.order(nativeOrder); - return buf.asLongBuffer(); - } - - /** - * Allocates a new direct float buffer. - * @param capacity The new buffer's capacity, in floats - * @return The new float buffer - */ - public static FloatBuffer newFloatBuffer(int capacity) - { - assert capacity <= Integer.MAX_VALUE / 4; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 4); - buf.order(nativeOrder); - return buf.asFloatBuffer(); - } - - /** - * Allocates a new direct double buffer. - * @param capacity The new buffer's capacity, in doubles - * @return The new double buffer - */ - public static DoubleBuffer newDoubleBuffer(int capacity) - { - assert capacity <= Integer.MAX_VALUE / 8; - ByteBuffer buf = ByteBuffer.allocateDirect(capacity * 8); - buf.order(nativeOrder); - return buf.asDoubleBuffer(); - } - - /** - * Asserts that a buffer is direct. - * @param buf buffer - */ - protected static void assertDirectBuffer(Buffer buf) - { - if(!buf.isDirect()) - throw new IllegalArgumentException("The buffer must be direct."); - } - - /** - * Asserts that buffers are direct. - * @param sendbuf The send buffer - * @param recvbuf The receive buffer - */ - protected static void assertDirectBuffer(Buffer sendbuf, Buffer recvbuf) - { - if(!sendbuf.isDirect()) - throw new IllegalArgumentException("The send buffer must be direct."); - - if(!recvbuf.isDirect()) - throw new IllegalArgumentException("The recv. buffer must be direct."); - } - - /** - * Checks if an object is a direct buffer. - * @param obj object - * @return true if the object is a direct buffer - */ - protected static boolean isDirectBuffer(Object obj) - { - return obj instanceof Buffer && ((Buffer)obj).isDirect(); - } - - /** - * Checks if an object is a heap buffer. - * @param obj object - * @return true if the object is a heap buffer - */ - protected static boolean isHeapBuffer(Object obj) - { - return obj instanceof Buffer && !((Buffer)obj).isDirect(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static ByteBuffer slice(ByteBuffer buf, int offset) - { - return ((ByteBuffer)buf.clear().position(offset)) - .slice().order(nativeOrder); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static CharBuffer slice(CharBuffer buf, int offset) - { - return ((CharBuffer)buf.clear().position(offset)).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static ShortBuffer slice(ShortBuffer buf, int offset) - { - return ((ShortBuffer)buf.clear().position(offset)).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static IntBuffer slice(IntBuffer buf, int offset) - { - return ((IntBuffer)buf.clear().position(offset)).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static LongBuffer slice(LongBuffer buf, int offset) - { - return ((LongBuffer)buf.clear().position(offset)).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static FloatBuffer slice(FloatBuffer buf, int offset) - { - return ((FloatBuffer)buf.clear().position(offset)).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static DoubleBuffer slice(DoubleBuffer buf, int offset) - { - return ((DoubleBuffer)buf.clear().position(offset)).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static ByteBuffer slice(byte[] buf, int offset) - { - return ByteBuffer.wrap(buf, offset, buf.length - offset) - .slice().order(nativeOrder); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static CharBuffer slice(char[] buf, int offset) - { - return CharBuffer.wrap(buf, offset, buf.length - offset).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static ShortBuffer slice(short[] buf, int offset) - { - return ShortBuffer.wrap(buf, offset, buf.length - offset).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static IntBuffer slice(int[] buf, int offset) - { - return IntBuffer.wrap(buf, offset, buf.length - offset).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static LongBuffer slice(long[] buf, int offset) - { - return LongBuffer.wrap(buf, offset, buf.length - offset).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static FloatBuffer slice(float[] buf, int offset) - { - return FloatBuffer.wrap(buf, offset, buf.length - offset).slice(); - } - - /** - * Creates a new buffer whose content is a shared subsequence of a buffer. - *

The content of the new buffer will start at the specified offset. - * @param buf buffer - * @param offset offset - * @return the new buffer. - */ - public static DoubleBuffer slice(double[] buf, int offset) - { - return DoubleBuffer.wrap(buf, offset, buf.length - offset).slice(); - } } // MPI From 8af6aeeee512e355d84bc8b342660f86c5b0b2c0 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Mon, 3 Aug 2015 16:18:39 -0600 Subject: [PATCH 0098/1704] Fix duplicated comment Fix a duplicated comment in CartComm.java --- ompi/mpi/java/java/CartComm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index d14c4372203..3325ed38c49 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -106,7 +106,7 @@ protected CartComm(long[] commRequest) *

The new communicator can't be used before the operation completes. * The request object must be obtained calling {@link #getRequest}. * @return copy of this communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ @Override public CartComm iDup() throws MPIException { From cc18ed974a2a4f83316e349f129fc7b17aca70a9 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 4 Aug 2015 09:20:48 -0600 Subject: [PATCH 0099/1704] Revert "oob/tcp: fix a race condition when finalizing the oob/tcp component" --- orte/mca/oob/tcp/oob_tcp_component.c | 44 +++------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/orte/mca/oob/tcp/oob_tcp_component.c b/orte/mca/oob/tcp/oob_tcp_component.c index 425743c7a3d..a6a8bc1ac6a 100644 --- a/orte/mca/oob/tcp/oob_tcp_component.c +++ b/orte/mca/oob/tcp/oob_tcp_component.c @@ -16,8 +16,6 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -70,7 +68,6 @@ #include "orte/util/parse_options.h" #include "orte/util/show_help.h" #include "orte/runtime/orte_globals.h" -#include "orte/runtime/orte_wait.h" #include "orte/mca/oob/tcp/oob_tcp.h" #include "orte/mca/oob/tcp/oob_tcp_component.h" @@ -633,22 +630,10 @@ static int component_startup(void) return rc; } -static void cleanup(int sd, short args, void *cbdata) -{ - opal_list_item_t * item; - bool *active = (bool*)cbdata; - while (NULL != (item = opal_list_remove_first(&mca_oob_tcp_component.listeners))) { - OBJ_RELEASE(item); - } - if (NULL != active) { - *active = false; - } -} - static void component_shutdown(void) { int i = 0; - bool active; + opal_list_item_t *item; opal_output_verbose(2, orte_oob_base_framework.framework_output, "%s TCP SHUTDOWN", @@ -659,37 +644,16 @@ static void component_shutdown(void) /* tell the thread to exit */ write(mca_oob_tcp_component.stop_thread[1], &i, sizeof(int)); opal_thread_join(&mca_oob_tcp_component.listen_thread, NULL); - } else { - opal_output_verbose(2, orte_oob_base_framework.framework_output, - "no hnp or not active"); } - /* because the listeners are in a separate - * async thread for apps, we can't just release them here. - * Instead, we push it into that event thread and release - * them there */ - if (ORTE_PROC_IS_APP) { - opal_event_t ev; - active = true; - opal_event_set(orte_event_base, &ev, -1, - OPAL_EV_WRITE, cleanup, &active); - opal_event_set_priority(&ev, ORTE_ERROR_PRI); - opal_event_active(&ev, OPAL_EV_WRITE, 1); - ORTE_WAIT_FOR_COMPLETION(active); - } else { - /* we can call the destruct directly */ - cleanup(0, 0, NULL); - } - opal_output_verbose(2, orte_oob_base_framework.framework_output, - "all listeners released"); + while (NULL != (item = opal_list_remove_first(&mca_oob_tcp_component.listeners))) { + OBJ_RELEASE(item); + } /* shutdown the module */ if (NULL != mca_oob_tcp_module.api.finalize) { mca_oob_tcp_module.api.finalize(); } - opal_output_verbose(2, orte_oob_base_framework.framework_output, - "%s TCP SHUTDOWN done", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); } static int component_send(orte_rml_send_t *msg) From 03b0a42459a5cceb8556d36dff86f730d02b02b3 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Fri, 24 Jul 2015 16:14:35 -0600 Subject: [PATCH 0100/1704] Additional java bindings for the Comm class Added bindings for MPI_COMM_CREATE_GROUP and MPI_COMM_DUP_WITH_INFO. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Comm.c | 9 +++++++++ ompi/mpi/java/c/mpi_Intracomm.c | 9 +++++++++ ompi/mpi/java/java/CartComm.java | 13 +++++++++++++ ompi/mpi/java/java/Comm.java | 15 +++++++++++++++ ompi/mpi/java/java/GraphComm.java | 13 +++++++++++++ ompi/mpi/java/java/Intercomm.java | 15 ++++++++++++++- ompi/mpi/java/java/Intracomm.java | 31 ++++++++++++++++++++++++++++++- 7 files changed, 103 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/java/c/mpi_Comm.c b/ompi/mpi/java/c/mpi_Comm.c index b086f23a46b..40df88c3880 100644 --- a/ompi/mpi/java/c/mpi_Comm.c +++ b/ompi/mpi/java/c/mpi_Comm.c @@ -214,6 +214,15 @@ JNIEXPORT jlongArray JNICALL Java_mpi_Comm_iDup( return jcr; } +JNIEXPORT jlong JNICALL Java_mpi_Comm_dupWithInfo( + JNIEnv *env, jobject jthis, jlong comm, jlong info) +{ + MPI_Comm newcomm; + int rc = MPI_Comm_dup_with_info((MPI_Comm)comm, (MPI_Info)info, &newcomm); + ompi_java_exceptionCheck(env, rc); + return (jlong)newcomm; +} + JNIEXPORT jint JNICALL Java_mpi_Comm_getSize( JNIEnv *env, jobject jthis, jlong comm) { diff --git a/ompi/mpi/java/c/mpi_Intracomm.c b/ompi/mpi/java/c/mpi_Intracomm.c index 4544e38cba1..6bf97ab0860 100644 --- a/ompi/mpi/java/c/mpi_Intracomm.c +++ b/ompi/mpi/java/c/mpi_Intracomm.c @@ -88,6 +88,15 @@ JNIEXPORT jlong JNICALL Java_mpi_Intracomm_create( return (jlong)newcomm; } +JNIEXPORT jlong JNICALL Java_mpi_Intracomm_createGroup( + JNIEnv *env, jobject jthis, jlong comm, jlong group, int tag) +{ + MPI_Comm newcomm; + int rc = MPI_Comm_create_group((MPI_Comm)comm, (MPI_Group)group, tag, &newcomm); + ompi_java_exceptionCheck(env, rc); + return (jlong)newcomm; +} + JNIEXPORT jlong JNICALL Java_mpi_Intracomm_createCart( JNIEnv *env, jobject jthis, jlong comm, jintArray dims, jbooleanArray periods, jboolean reorder) diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index 3325ed38c49..9b6b71ecb3e 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -114,6 +114,19 @@ protected CartComm(long[] commRequest) return new CartComm(iDup(handle)); } + /** + * Duplicates this communicator with the info object used in the call. + *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. + * @param info info object to associate with the new communicator + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public CartComm dupWithInfo(Info info) throws MPIException + { + MPI.check(); + return new CartComm(dupWithInfo(handle, info.handle)); + } + /** * Returns cartesian topology information. *

Java binding of the MPI operations {@code MPI_CARTDIM_GET} and diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index c0f3aff524c..9e20da719cb 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -152,7 +152,22 @@ public Comm iDup() throws MPIException } protected final native long[] iDup(long comm) throws MPIException; + + /** + * Duplicates this communicator with the info object used in the call. + *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. + * @param info info object to associate with the new communicator + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Comm dupWithInfo(Info info) throws MPIException + { + MPI.check(); + return new Comm(dupWithInfo(handle, info.handle)); + } + protected final native long dupWithInfo(long comm, long info) throws MPIException; + /** * Returns the associated request to this communicator if it was * created using {@link #iDup}. diff --git a/ompi/mpi/java/java/GraphComm.java b/ompi/mpi/java/java/GraphComm.java index b69d529a47f..8416ee836b4 100644 --- a/ompi/mpi/java/java/GraphComm.java +++ b/ompi/mpi/java/java/GraphComm.java @@ -114,6 +114,19 @@ protected GraphComm(long[] commRequest) return new GraphComm(iDup(handle)); } + /** + * Duplicates this communicator with the info object used in the call. + *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. + * @param info info object to associate with the new communicator + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public GraphComm dupWithInfo(Info info) throws MPIException + { + MPI.check(); + return new GraphComm(dupWithInfo(handle, info.handle)); + } + /** * Returns graph topology information. *

Java binding of the MPI operations {@code MPI_GRAPHDIMS_GET} diff --git a/ompi/mpi/java/java/Intercomm.java b/ompi/mpi/java/java/Intercomm.java index 0369b38376d..ab34fdfde17 100644 --- a/ompi/mpi/java/java/Intercomm.java +++ b/ompi/mpi/java/java/Intercomm.java @@ -106,7 +106,20 @@ protected Intercomm(long[] commRequest) MPI.check(); return new Intercomm(iDup(handle)); } - + + /** + * Duplicates this communicator with the info object used in the call. + *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. + * @param info info object to associate with the new communicator + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public Intercomm dupWithInfo(Info info) throws MPIException + { + MPI.check(); + return new Intercomm(dupWithInfo(handle, info.handle)); + } + // Inter-Communication /** diff --git a/ompi/mpi/java/java/Intracomm.java b/ompi/mpi/java/java/Intracomm.java index b1f0c687260..f85a57bde91 100644 --- a/ompi/mpi/java/java/Intracomm.java +++ b/ompi/mpi/java/java/Intracomm.java @@ -123,7 +123,20 @@ protected Intracomm(long[] commRequest) MPI.check(); return new Intracomm(iDup(handle)); } - + + /** + * Duplicates this communicator with the info object used in the call. + *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. + * @param info info object to associate with the new communicator + * @return copy of this communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + @Override public Intracomm dupWithInfo(Info info) throws MPIException + { + MPI.check(); + return new Intracomm(dupWithInfo(handle, info.handle)); + } + /** * Partition the group associated with this communicator and create * a new communicator within each subgroup. @@ -173,7 +186,23 @@ public final Intracomm create(Group group) throws MPIException } private native long create(long comm, long group); + + /** + * Create a new intracommunicator for the given group. + *

Java binding of the MPI operation {@code MPI_COMM_CREATE_GROUP}. + * @param group group which is a subset of the group of this communicator + * @param tag an integer tag + * @return new communicator + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Intracomm createGroup(Group group, int tag) throws MPIException + { + MPI.check(); + return new Intracomm(createGroup(handle, group.handle, tag)); + } + private native long createGroup(long comm, long group, int tag); + // Topology Constructors /** From b3d8b89ab482eee3581e4b08a35d1b472a412bbf Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Wed, 29 Jul 2015 09:47:03 -0600 Subject: [PATCH 0101/1704] Java bindings for Status methods Includes java bindings for the MPI_STATUS_SET_ELEMENTS and MPI_STATUS_SET_CANCELLED. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Status.c | 22 ++++++++++++++ ompi/mpi/java/java/Status.java | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/ompi/mpi/java/c/mpi_Status.c b/ompi/mpi/java/c/mpi_Status.c index dc6e9799e74..55af867e145 100644 --- a/ompi/mpi/java/c/mpi_Status.c +++ b/ompi/mpi/java/c/mpi_Status.c @@ -109,6 +109,28 @@ JNIEXPORT jint JNICALL Java_mpi_Status_getElements( return count; } +JNIEXPORT jint JNICALL Java_mpi_Status_setElements( + JNIEnv *env, jobject jthis, jint source, jint tag, + jint error, jint cancelled, jlong ucount, jlong jType, int count) +{ + MPI_Status stat; + getStatus(&stat, source, tag, error, cancelled, ucount); + MPI_Datatype datatype = (MPI_Datatype)jType; + int rc = MPI_Status_set_elements(&stat, datatype, count); + ompi_java_exceptionCheck(env, rc); + return stat._ucount; +} + +JNIEXPORT void JNICALL Java_mpi_Status_setCancelled( + JNIEnv *env, jobject jthis, jint source, jint tag, + jint error, jint cancelled, jlong ucount, int flag) +{ + MPI_Status stat; + getStatus(&stat, source, tag, error, cancelled, ucount); + int rc = MPI_Status_set_cancelled(&stat, flag); + ompi_java_exceptionCheck(env, rc); +} + jobject ompi_java_status_new(JNIEnv *env, MPI_Status *status) { jlongArray jData = (*env)->NewLongArray(env, 6); diff --git a/ompi/mpi/java/java/Status.java b/ompi/mpi/java/java/Status.java index 8d101a8c620..2cc21462925 100644 --- a/ompi/mpi/java/java/Status.java +++ b/ompi/mpi/java/java/Status.java @@ -137,6 +137,59 @@ private native int getElements( int source, int tag, int error, int cancelled, long ucount, long datatype) throws MPIException; + /** + * Sets the number of basic elements for this status object. + *

Java binding of the MPI operation {@code MPI_STATUS_SET_ELEMENTS}. + * @param datatype datatype used by receive operation + * @param count number of elements to associate with the status + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setElements(Datatype datatype, int count) throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + data[4] = setElements(source, tag, error, cancelled, ucount, datatype.handle, count); + } + + private native int setElements( + int source, int tag, int error, + int cancelled, long ucount, long datatype, int count) throws MPIException; + + /** + * Sets the cancelled flag. + *

Java binding of the MPI operation {@code MPI_STATUS_SET_CANCELLED}. + * @param flag if true indicates request was cancelled + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setCancelled(boolean flag) throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + + if(flag) { + setCancelled(source, tag, error, cancelled, ucount, 1); + data[3] = 1; + } else { + setCancelled(source, tag, error, cancelled, ucount, 0); + data[3] = 0; + } + + } + + private native void setCancelled( + int source, int tag, int error, + int cancelled, long ucount, int flag) throws MPIException; + /** * Returns the "source" of message. *

Java binding of the MPI value {@code MPI_SOURCE}. From 154dbd5fdd4cc9e53eaab202fc6003a38e64d940 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Wed, 29 Jul 2015 12:04:46 -0600 Subject: [PATCH 0102/1704] Java binding for MPI_REQUEST_GET_STATUS This adds the java binding for MPI_REQUEST_GET_STATUS. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Request.c | 12 ++++++++++++ ompi/mpi/java/java/Request.java | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/ompi/mpi/java/c/mpi_Request.c b/ompi/mpi/java/c/mpi_Request.c index d6e7cb894c0..58010869022 100644 --- a/ompi/mpi/java/c/mpi_Request.c +++ b/ompi/mpi/java/c/mpi_Request.c @@ -171,6 +171,18 @@ JNIEXPORT jobject JNICALL Java_mpi_Request_testStatus( return flag ? ompi_java_status_new(env, &status) : NULL; } +JNIEXPORT jobject JNICALL Java_mpi_Request_getStatus( + JNIEnv *env, jobject jthis, jlong handle) +{ + MPI_Request req = (MPI_Request)handle; + int flag; + MPI_Status status; + int rc = MPI_Request_get_status(req, &flag, &status); + ompi_java_exceptionCheck(env, rc); + (*env)->SetLongField(env, jthis, ompi_java.ReqHandle, (jlong)req); + return flag ? ompi_java_status_new(env, &status) : NULL; +} + JNIEXPORT jboolean JNICALL Java_mpi_Request_test( JNIEnv *env, jobject jthis, jlong handle) { diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index 8b400abb7a8..a2831d74fe0 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -169,6 +169,23 @@ public final Status testStatus() throws MPIException private native Status testStatus(long request) throws MPIException; + /** + * Returns a status object if the operation identified by the request + * is complete, or a null reference otherwise. + *

Java binding of the MPI operation {@code MPI_REQUEST_GET_STATUS}. + *

After the call, if the operation is complete (ie, if the return + * value is non-null), the request object remains active. + * @return status object + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public final Status getStatus() throws MPIException + { + MPI.check(); + return getStatus(handle); + } + + private native Status getStatus(long request) throws MPIException; + /** * Returns true if the operation identified by the request * is complete, or false otherwise. From 24e779195d99954ad9e02717dbc4563272fd4b36 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Mon, 27 Jul 2015 09:15:14 -0600 Subject: [PATCH 0103/1704] mtl/ofi: retain inline progress function Retain inline progress function for ofi mtl, but have a non-inlined progress function which is registered with the opal progress mechanism. @jithinjosepkl I've bad news about the psm provider. I still notice segfaults - not always - but frequently at finalize when using the psm provider. I don't notice this when using the sockets provider. Signed-off-by: Howard Pritchard --- ompi/mca/mtl/ofi/mtl_ofi.h | 39 ++---------------------- ompi/mca/mtl/ofi/mtl_ofi_component.c | 44 +++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 1f9883b5939..73601b76cef 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -52,6 +52,8 @@ extern int ompi_mtl_ofi_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t **procs); +int ompi_mtl_ofi_progress_no_inline(void); + __opal_attribute_always_inline__ static inline int ompi_mtl_ofi_progress(void) { @@ -115,42 +117,7 @@ ompi_mtl_ofi_progress(void) /* MTL interface functions */ -__opal_attribute_always_inline__ static inline int -ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl) -{ - opal_progress_unregister(ompi_mtl_ofi_progress); - - /** - * Close all the OFI objects - */ - if (fi_close((fid_t)ompi_mtl_ofi.ep)) { - opal_output(ompi_mtl_base_framework.framework_output, - "fi_close failed: %s", strerror(errno)); - abort(); - } - if (fi_close((fid_t)ompi_mtl_ofi.cq)) { - opal_output(ompi_mtl_base_framework.framework_output, - "fi_close failed: %s", strerror(errno)); - abort(); - } - if (fi_close((fid_t)ompi_mtl_ofi.av)) { - opal_output(ompi_mtl_base_framework.framework_output, - "fi_close failed: %s", strerror(errno)); - abort(); - } - if (fi_close((fid_t)ompi_mtl_ofi.domain)) { - opal_output(ompi_mtl_base_framework.framework_output, - "fi_close failed: %s", strerror(errno)); - abort(); - } - if (fi_close((fid_t)ompi_mtl_ofi.fabric)) { - opal_output(ompi_mtl_base_framework.framework_output, - "fi_close failed: %s", strerror(errno)); - abort(); - } - - return OMPI_SUCCESS; -} +int ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl); __opal_attribute_always_inline__ static inline int ompi_mtl_ofi_get_error(int error_num) diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c index c16dc966cd5..ea3984f38a5 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi_component.c +++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c @@ -101,6 +101,11 @@ ompi_mtl_ofi_component_close(void) return OMPI_SUCCESS; } +int +ompi_mtl_ofi_progress_no_inline(void) +{ + ompi_mtl_ofi_progress(); +} static mca_mtl_base_module_t* ompi_mtl_ofi_component_init(bool enable_progress_threads, @@ -338,7 +343,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads, /** * Activate progress callback. */ - ret = opal_progress_register(ompi_mtl_ofi_progress); + ret = opal_progress_register(ompi_mtl_ofi_progress_no_inline); if (OMPI_SUCCESS != ret) { opal_output_verbose(1, ompi_mtl_base_framework.framework_output, "%s:%d: opal_progress_register failed: %d\n", @@ -373,5 +378,42 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads, return NULL; } +int +ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl) +{ + opal_progress_unregister(ompi_mtl_ofi_progress_no_inline); + + /** + * * Close all the OFI objects + * */ + if (fi_close((fid_t)ompi_mtl_ofi.ep)) { + opal_output(ompi_mtl_base_framework.framework_output, + "fi_close failed: %s", strerror(errno)); + abort(); + } + if (fi_close((fid_t)ompi_mtl_ofi.cq)) { + opal_output(ompi_mtl_base_framework.framework_output, + "fi_close failed: %s", strerror(errno)); + abort(); + } + if (fi_close((fid_t)ompi_mtl_ofi.av)) { + opal_output(ompi_mtl_base_framework.framework_output, + "fi_close failed: %s", strerror(errno)); + abort(); + } + if (fi_close((fid_t)ompi_mtl_ofi.domain)) { + opal_output(ompi_mtl_base_framework.framework_output, + "fi_close failed: %s", strerror(errno)); + abort(); + } + if (fi_close((fid_t)ompi_mtl_ofi.fabric)) { + opal_output(ompi_mtl_base_framework.framework_output, + "fi_close failed: %s", strerror(errno)); + abort(); + } + + return OMPI_SUCCESS; +} + From 1e11cd96868373b478df9e9532697a1698115b13 Mon Sep 17 00:00:00 2001 From: yohann Date: Wed, 29 Jul 2015 14:14:34 -0700 Subject: [PATCH 0104/1704] mtl/ofi: add missing return. --- ompi/mca/mtl/ofi/mtl_ofi_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c index ea3984f38a5..bce68e4fa47 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi_component.c +++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c @@ -104,7 +104,7 @@ ompi_mtl_ofi_component_close(void) int ompi_mtl_ofi_progress_no_inline(void) { - ompi_mtl_ofi_progress(); + return ompi_mtl_ofi_progress(); } static mca_mtl_base_module_t* From 663db1ea37ba5661e8215f6180eb0b35c8a30e65 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 30 Jul 2015 15:00:13 -0600 Subject: [PATCH 0105/1704] Status X Functons Includes java bindings for MPI_GET_ELEMENTS_X and MPI_STATUS_SET_ELEMENTS_X. This PR also adds the Count object which represents MPI_Count. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/Makefile.am | 29 +++++----- ompi/mpi/java/c/mpiJava.h | 2 + ompi/mpi/java/c/mpi_Count.c | 52 ++++++++++++++++++ ompi/mpi/java/c/mpi_MPI.c | 1 + ompi/mpi/java/c/mpi_Status.c | 28 ++++++++++ ompi/mpi/java/java/Count.java | 96 ++++++++++++++++++++++++++++++++++ ompi/mpi/java/java/Makefile.am | 70 +++++++++++++------------ ompi/mpi/java/java/Status.java | 46 ++++++++++++++++ 8 files changed, 277 insertions(+), 47 deletions(-) create mode 100644 ompi/mpi/java/c/mpi_Count.c create mode 100644 ompi/mpi/java/java/Count.java diff --git a/ompi/mpi/java/c/Makefile.am b/ompi/mpi/java/c/Makefile.am index 6b90e27e30f..c54f1aff610 100644 --- a/ompi/mpi/java/c/Makefile.am +++ b/ompi/mpi/java/c/Makefile.am @@ -2,6 +2,8 @@ # # Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015 Los Alamos National Security, LLC. All rights +# reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,23 +24,24 @@ ompi_HEADERS = \ lib_LTLIBRARIES = libmpi_java.la libmpi_java_la_SOURCES = \ - mpi_CartComm.c \ - mpi_Comm.c \ + mpi_CartComm.c \ + mpi_Comm.c \ mpi_Constant.c \ - mpi_Datatype.c \ - mpi_Errhandler.c \ + mpi_Count.c \ + mpi_Datatype.c \ + mpi_Errhandler.c \ mpi_File.c \ - mpi_GraphComm.c \ - mpi_Group.c \ + mpi_GraphComm.c \ + mpi_Group.c \ mpi_Info.c \ - mpi_Intercomm.c \ - mpi_Intracomm.c \ + mpi_Intercomm.c \ + mpi_Intracomm.c \ mpi_Message.c \ - mpi_MPI.c \ - mpi_Op.c \ - mpi_Request.c \ - mpi_Prequest.c \ - mpi_Status.c \ + mpi_MPI.c \ + mpi_Op.c \ + mpi_Request.c \ + mpi_Prequest.c \ + mpi_Status.c \ mpi_Win.c libmpi_java_la_LIBADD = $(top_builddir)/ompi/libmpi.la diff --git a/ompi/mpi/java/c/mpiJava.h b/ompi/mpi/java/c/mpiJava.h index c8ce4f7e866..da565075c30 100644 --- a/ompi/mpi/java/c/mpiJava.h +++ b/ompi/mpi/java/c/mpiJava.h @@ -33,6 +33,8 @@ typedef struct { jmethodID ShiftParmsInit; jclass VersionClass; jmethodID VersionInit; + jclass CountClass; + jmethodID CountInit; jclass GraphParmsClass; jmethodID GraphParmsInit; jclass DistGraphNeighborsClass; diff --git a/ompi/mpi/java/c/mpi_Count.c b/ompi/mpi/java/c/mpi_Count.c new file mode 100644 index 00000000000..e7a3c4a4dd5 --- /dev/null +++ b/ompi/mpi/java/c/mpi_Count.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + * + * This file is almost a complete re-write for Open MPI compared to the + * original mpiJava package. Its license and copyright are listed below. + * See for more information. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * File : Version.java + * Author : Nathaniel Graham + * Created : Thu Jul 30 09:34 2015 + */ + +#include "ompi_config.h" + +#include +#ifdef HAVE_TARGETCONDITIONALS_H +#include +#endif + +#include "mpi.h" +#include "mpi_Count.h" +#include "mpiJava.h" + +JNIEXPORT void JNICALL Java_mpi_Count_initCount(JNIEnv *env, jclass jthis) +{ + jclass c = (*env)->FindClass(env, "mpi/Count"); + ompi_java.CountClass = (*env)->NewGlobalRef(env, c); + ompi_java.CountInit = (*env)->GetMethodID(env, ompi_java.CountClass, "", "(J)V"); + + (*env)->DeleteLocalRef(env, c); +} diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index 27c2d28ec0d..523ca25d9a6 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -209,6 +209,7 @@ static void deleteClasses(JNIEnv *env) (*env)->DeleteGlobalRef(env, ompi_java.CartParmsClass); (*env)->DeleteGlobalRef(env, ompi_java.ShiftParmsClass); (*env)->DeleteGlobalRef(env, ompi_java.VersionClass); + (*env)->DeleteGlobalRef(env, ompi_java.CountClass); (*env)->DeleteGlobalRef(env, ompi_java.GraphParmsClass); (*env)->DeleteGlobalRef(env, ompi_java.DistGraphNeighborsClass); (*env)->DeleteGlobalRef(env, ompi_java.StatusClass); diff --git a/ompi/mpi/java/c/mpi_Status.c b/ompi/mpi/java/c/mpi_Status.c index 55af867e145..1220a542787 100644 --- a/ompi/mpi/java/c/mpi_Status.c +++ b/ompi/mpi/java/c/mpi_Status.c @@ -109,6 +109,21 @@ JNIEXPORT jint JNICALL Java_mpi_Status_getElements( return count; } +JNIEXPORT jobject JNICALL Java_mpi_Status_getElementsX( + JNIEnv *env, jobject jthis, jint source, jint tag, + jint error, jint cancelled, jlong ucount, jlong jType) +{ + MPI_Count count; + MPI_Status stat; + getStatus(&stat, source, tag, error, cancelled, ucount); + MPI_Datatype datatype = (MPI_Datatype)jType; + int rc = MPI_Get_elements_x(&stat, datatype, &count); + ompi_java_exceptionCheck(env, rc); + + return (*env)->NewObject(env, ompi_java.CountClass, + ompi_java.CountInit, (jlong)count); +} + JNIEXPORT jint JNICALL Java_mpi_Status_setElements( JNIEnv *env, jobject jthis, jint source, jint tag, jint error, jint cancelled, jlong ucount, jlong jType, int count) @@ -121,6 +136,19 @@ JNIEXPORT jint JNICALL Java_mpi_Status_setElements( return stat._ucount; } +JNIEXPORT jlong JNICALL Java_mpi_Status_setElementsX( + JNIEnv *env, jobject jthis, jint source, jint tag, + jint error, jint cancelled, jlong ucount, jlong jType, jlong jcount) +{ + MPI_Status stat; + MPI_Count count = (long)jcount; + getStatus(&stat, source, tag, error, cancelled, ucount); + MPI_Datatype datatype = (MPI_Datatype)jType; + int rc = MPI_Status_set_elements_x(&stat, datatype, count); + ompi_java_exceptionCheck(env, rc); + return (jlong)stat._ucount; +} + JNIEXPORT void JNICALL Java_mpi_Status_setCancelled( JNIEnv *env, jobject jthis, jint source, jint tag, jint error, jint cancelled, jlong ucount, int flag) diff --git a/ompi/mpi/java/java/Count.java b/ompi/mpi/java/java/Count.java new file mode 100644 index 00000000000..56a890d3a92 --- /dev/null +++ b/ompi/mpi/java/java/Count.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + * + * This file is almost a complete re-write for Open MPI compared to the + * original mpiJava package. Its license and copyright are listed below. + * See for more information. + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + * File : Count.java + * Author : Nathaniel Graham + * Created : Thu Jul 29 17:13 2015 + */ + +package mpi; + +/** + * This class represents {@code MPI_Count}. + */ +public final class Count implements Comparable +{ + private long count; + + static + { + System.loadLibrary("mpi_java"); + initCount(); + } + + private static native void initCount(); + + public Count(long count) + { + this.count = count; + } + + /** + * Gets value associated with this Count object. + * @return Count value + */ + public long getCount() + { + return this.count; + } + + /** + * Sets the value associated with this Count object. + * @param count the value to set for this count object + */ + public void setCount(long count) + { + this.count = count; + } + + @Override + public boolean equals(Object obj) + { + if(obj instanceof Count) { + if(this.count == ((Count)obj).getCount()) { + return true; + } + } + return false; + } + + public int compareTo(Object obj) + { + if(obj instanceof Count) { + if(this.count - ((Count)obj).getCount() > 0) { + return 1; + } else if(this.count - ((Count)obj).getCount() == 0) { + return 0; + } + } + return -1; + } +} // Count diff --git a/ompi/mpi/java/java/Makefile.am b/ompi/mpi/java/java/Makefile.am index 72b35d58f27..43eb560140e 100644 --- a/ompi/mpi/java/java/Makefile.am +++ b/ompi/mpi/java/java/Makefile.am @@ -25,37 +25,38 @@ include $(top_srcdir)/Makefile.ompi-rules # just list them here in EXTRA_DIST so that they get picked up by # "make dist". JAVA_SRC_FILES = \ - CartComm.java \ - CartParms.java \ - Comm.java \ + CartComm.java \ + CartParms.java \ + Comm.java \ Constant.java \ - Datatype.java \ + Count.java \ + Datatype.java \ DistGraphNeighbors.java \ DoubleInt.java \ DoubleComplex.java \ - Errhandler.java \ + Errhandler.java \ FloatComplex.java \ FloatInt.java \ File.java \ FileView.java \ - Freeable.java \ - GraphComm.java \ - GraphParms.java \ - Group.java \ + Freeable.java \ + GraphComm.java \ + GraphParms.java \ + Group.java \ Info.java \ Int2.java \ - Intercomm.java \ - Intracomm.java \ + Intercomm.java \ + Intracomm.java \ LongInt.java \ Message.java \ - MPI.java \ - MPIException.java \ - Op.java \ - Prequest.java \ - Request.java \ - ShiftParms.java \ + MPI.java \ + MPIException.java \ + Op.java \ + Prequest.java \ + Request.java \ + ShiftParms.java \ ShortInt.java \ - Status.java \ + Status.java \ Struct.java \ UserFunction.java \ Version.java \ @@ -71,26 +72,27 @@ if OMPI_WANT_JAVA_BINDINGS # we have a specific list of files here, as opposed to deriving them # from JAVA_SRC_FILES. JAVA_H = \ - mpi_MPI.h \ - mpi_CartParms.h \ - mpi_CartComm.h \ - mpi_Comm.h \ + mpi_MPI.h \ + mpi_CartParms.h \ + mpi_CartComm.h \ + mpi_Comm.h \ mpi_Constant.h \ - mpi_Datatype.h \ - mpi_Errhandler.h \ + mpi_Count.h \ + mpi_Datatype.h \ + mpi_Errhandler.h \ mpi_File.h \ - mpi_GraphParms.h \ - mpi_GraphComm.h \ - mpi_Group.h \ + mpi_GraphParms.h \ + mpi_GraphComm.h \ + mpi_Group.h \ mpi_Info.h \ - mpi_Intercomm.h \ - mpi_Intracomm.h \ + mpi_Intercomm.h \ + mpi_Intracomm.h \ mpi_Message.h \ - mpi_Op.h \ - mpi_Prequest.h \ - mpi_Request.h \ - mpi_ShiftParms.h \ - mpi_Status.h \ + mpi_Op.h \ + mpi_Prequest.h \ + mpi_Request.h \ + mpi_ShiftParms.h \ + mpi_Status.h \ mpi_Version.h \ mpi_Win.h diff --git a/ompi/mpi/java/java/Status.java b/ompi/mpi/java/java/Status.java index 2cc21462925..d71484b49b2 100644 --- a/ompi/mpi/java/java/Status.java +++ b/ompi/mpi/java/java/Status.java @@ -137,6 +137,29 @@ private native int getElements( int source, int tag, int error, int cancelled, long ucount, long datatype) throws MPIException; + /** + * Retrieves the number of basic elements from status. + *

Java binding of the MPI operation {@code MPI_GET_ELEMENTS_X}. + * @param datatype datatype used by receive operation + * @return number of received basic elements + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public Count getElementsX(Datatype datatype) throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + return getElementsX(source, tag, error, cancelled, ucount, datatype.handle); + } + + private native Count getElementsX( + int source, int tag, int error, + int cancelled, long ucount, long datatype) throws MPIException; + /** * Sets the number of basic elements for this status object. *

Java binding of the MPI operation {@code MPI_STATUS_SET_ELEMENTS}. @@ -160,6 +183,29 @@ private native int setElements( int source, int tag, int error, int cancelled, long ucount, long datatype, int count) throws MPIException; + /** + * Sets the number of basic elements for this status object. + *

Java binding of the MPI operation {@code MPI_STATUS_SET_ELEMENTS_X}. + * @param datatype datatype used by receive operation + * @param count number of elements to associate with the status + * @throws MPIException Signals that an MPI exception of some sort has occurred. + */ + public void setElementsX(Datatype datatype, Count count) throws MPIException + { + MPI.check(); + int i = 0; + int source = (int)data[i++]; + int tag = (int)data[i++]; + int error = (int)data[i++]; + int cancelled = (int)data[i++]; + long ucount = data[i++]; + data[4] = setElementsX(source, tag, error, cancelled, ucount, datatype.handle, count.getCount()); + } + + private native long setElementsX( + int source, int tag, int error, + int cancelled, long ucount, long datatype, long count) throws MPIException; + /** * Sets the cancelled flag. *

Java binding of the MPI operation {@code MPI_STATUS_SET_CANCELLED}. From 6d2f03fbbf7045e630c4ab648bf52724fe0f3441 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 30 Jul 2015 15:07:19 -0600 Subject: [PATCH 0106/1704] White Space Fixes Github revealed some wierd spacing issues. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_Count.c | 6 +++--- ompi/mpi/java/c/mpi_Status.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ompi/mpi/java/c/mpi_Count.c b/ompi/mpi/java/c/mpi_Count.c index e7a3c4a4dd5..0ef8827c017 100644 --- a/ompi/mpi/java/c/mpi_Count.c +++ b/ompi/mpi/java/c/mpi_Count.c @@ -45,8 +45,8 @@ JNIEXPORT void JNICALL Java_mpi_Count_initCount(JNIEnv *env, jclass jthis) { jclass c = (*env)->FindClass(env, "mpi/Count"); - ompi_java.CountClass = (*env)->NewGlobalRef(env, c); - ompi_java.CountInit = (*env)->GetMethodID(env, ompi_java.CountClass, "", "(J)V"); + ompi_java.CountClass = (*env)->NewGlobalRef(env, c); + ompi_java.CountInit = (*env)->GetMethodID(env, ompi_java.CountClass, "", "(J)V"); - (*env)->DeleteLocalRef(env, c); + (*env)->DeleteLocalRef(env, c); } diff --git a/ompi/mpi/java/c/mpi_Status.c b/ompi/mpi/java/c/mpi_Status.c index 1220a542787..b22acfc0752 100644 --- a/ompi/mpi/java/c/mpi_Status.c +++ b/ompi/mpi/java/c/mpi_Status.c @@ -121,7 +121,7 @@ JNIEXPORT jobject JNICALL Java_mpi_Status_getElementsX( ompi_java_exceptionCheck(env, rc); return (*env)->NewObject(env, ompi_java.CountClass, - ompi_java.CountInit, (jlong)count); + ompi_java.CountInit, (jlong)count); } JNIEXPORT jint JNICALL Java_mpi_Status_setElements( From 45e479442400282093f931a435bcbc6f9368149b Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 30 Jul 2015 15:17:55 -0600 Subject: [PATCH 0107/1704] Commenting fixes for Datatype.java Some of the @code tags were incorrect. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/Datatype.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/java/java/Datatype.java b/ompi/mpi/java/java/Datatype.java index d7849fd3d5d..d6f571078c7 100644 --- a/ompi/mpi/java/java/Datatype.java +++ b/ompi/mpi/java/java/Datatype.java @@ -344,7 +344,7 @@ private static native long getVector( * Identical to {@code createVector} except that the stride is expressed * directly in terms of the buffer index, rather than the units of * the old type. - *

Java binding of the MPI operation {@code MPI_TYPE_HVECTOR}. + *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_HVECTOR}. * @param count number of blocks * @param blockLength number of elements in each * @param stride number of bytes between start of each block @@ -397,7 +397,7 @@ private static native long getIndexed( * Identical to {@code createIndexed} except that the displacements are * expressed directly in terms of the buffer index, rather than the * units of the old type. - *

Java binding of the MPI operation {@code MPI_TYPE_HINDEXED}. + *

Java binding of the MPI operation {@code MPI_TYPE_CREATE_HINDEXED}. * @param blockLengths number of elements per block * @param displacements byte displacement in buffer for each block * @param oldType old datatype From edaa7cf5fc1da86fb3063a3804537488ab83df25 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 5 Aug 2015 05:27:23 -0700 Subject: [PATCH 0108/1704] libnbc: __FUNCTION__ -> __func__ fixes (cherry picked from commit a0ebbee6efa4c0bb3490baba4b15ac99b169dc02) --- ompi/mca/coll/libnbc/libdict/dict_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/coll/libnbc/libdict/dict_private.h b/ompi/mca/coll/libnbc/libdict/dict_private.h index 5939182e19b..da2b6dbdeab 100644 --- a/ompi/mca/coll/libnbc/libdict/dict_private.h +++ b/ompi/mca/coll/libnbc/libdict/dict_private.h @@ -47,7 +47,7 @@ typedef int (*icompare_func) __P((void *, void *itor2)); # define ASSERT(expr) \ if (!(expr)) \ fprintf(stderr, "\n%s:%d (%s) assertion failed: `%s'\n", \ - __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr), \ + __FILE__, __LINE__, __func__, #expr), \ abort() # else # define ASSERT(expr) \ From 458e3263da90d9ed6c2e4d76b429e3f07f0c24ec Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 5 Aug 2015 05:27:54 -0700 Subject: [PATCH 0109/1704] oshmem: __FUNCTION__ -> __func__ fixes (cherry picked from commit 5065978a1e12762552e08bbce8230e6c0155db23) --- oshmem/mca/atomic/base/base.h | 5 +++-- oshmem/mca/memheap/base/base.h | 7 ++++--- oshmem/mca/scoll/base/base.h | 5 +++-- oshmem/mca/spml/base/base.h | 7 ++++--- oshmem/mca/sshmem/base/base.h | 7 ++++--- oshmem/shmem/shmem_api_logger.h | 5 +++-- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/oshmem/mca/atomic/base/base.h b/oshmem/mca/atomic/base/base.h index 2b4c815a265..7503c313a00 100644 --- a/oshmem/mca/atomic/base/base.h +++ b/oshmem/mca/atomic/base/base.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -42,14 +43,14 @@ OSHMEM_DECLSPEC extern mca_base_framework_t oshmem_atomic_base_framework; #ifdef OPAL_ENABLE_DEBUG #define ATOMIC_VERBOSE(level, ...) \ oshmem_output_verbose(level, oshmem_atomic_base_framework.framework_output, \ - "%s:%d - %s()", __ATOMIC_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "%s:%d - %s()", __ATOMIC_FILE__, __LINE__, __func__, __VA_ARGS__) #else #define ATOMIC_VERBOSE(level, ...) #endif #define ATOMIC_ERROR(...) \ oshmem_output(oshmem_atomic_base_framework.framework_output, \ - "Error %s:%d - %s()", __ATOMIC_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Error %s:%d - %s()", __ATOMIC_FILE__, __LINE__, __func__, __VA_ARGS__) END_C_DECLS diff --git a/oshmem/mca/memheap/base/base.h b/oshmem/mca/memheap/base/base.h index 396b5f52b6a..068161650f1 100644 --- a/oshmem/mca/memheap/base/base.h +++ b/oshmem/mca/memheap/base/base.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -133,18 +134,18 @@ OSHMEM_DECLSPEC extern mca_base_framework_t oshmem_memheap_base_framework; #ifdef OPAL_ENABLE_DEBUG #define MEMHEAP_VERBOSE(level, ...) \ oshmem_output_verbose(level, oshmem_memheap_base_framework.framework_output, \ - "%s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "%s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) #else #define MEMHEAP_VERBOSE(level, ...) #endif #define MEMHEAP_ERROR(...) \ oshmem_output(oshmem_memheap_base_framework.framework_output, \ - "Error %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Error %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) #define MEMHEAP_WARN(...) \ oshmem_output_verbose(0, oshmem_memheap_base_framework.framework_output, \ - "Warning %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Warning %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) END_C_DECLS diff --git a/oshmem/mca/scoll/base/base.h b/oshmem/mca/scoll/base/base.h index c0366debe8d..0bf3b3168d7 100644 --- a/oshmem/mca/scoll/base/base.h +++ b/oshmem/mca/scoll/base/base.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -54,14 +55,14 @@ OSHMEM_DECLSPEC extern mca_base_framework_t oshmem_scoll_base_framework; #ifdef OPAL_ENABLE_DEBUG #define SCOLL_VERBOSE(level, ...) \ oshmem_output_verbose(level, oshmem_scoll_base_framework.framework_output, \ - "%s:%d - %s()", __SCOLL_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "%s:%d - %s()", __SCOLL_FILE__, __LINE__, __func__, __VA_ARGS__) #else #define SCOLL_VERBOSE(...) #endif #define SCOLL_ERROR(...) \ oshmem_output(oshmem_scoll_base_framework.framework_output, \ - "Error %s:%d - %s()", __SCOLL_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Error %s:%d - %s()", __SCOLL_FILE__, __LINE__, __func__, __VA_ARGS__) END_C_DECLS diff --git a/oshmem/mca/spml/base/base.h b/oshmem/mca/spml/base/base.h index 2235dae09d9..669fe1a7092 100644 --- a/oshmem/mca/spml/base/base.h +++ b/oshmem/mca/spml/base/base.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -83,18 +84,18 @@ OSHMEM_DECLSPEC extern mca_base_framework_t oshmem_spml_base_framework; #ifdef OPAL_ENABLE_DEBUG #define SPML_VERBOSE(level, ...) \ oshmem_output_verbose(level, oshmem_spml_base_framework.framework_output, \ - "%s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "%s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) #else #define SPML_VERBOSE(level, ...) #endif #define SPML_ERROR(...) \ oshmem_output(oshmem_spml_base_framework.framework_output, \ - "Error %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Error %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) #define SPML_WARNING(...) \ oshmem_output_verbose(0, oshmem_spml_base_framework.framework_output, \ - "Warning %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Warning %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) END_C_DECLS diff --git a/oshmem/mca/sshmem/base/base.h b/oshmem/mca/sshmem/base/base.h index 513f3596ba9..27c86014fd7 100644 --- a/oshmem/mca/sshmem/base/base.h +++ b/oshmem/mca/sshmem/base/base.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -133,18 +134,18 @@ OSHMEM_DECLSPEC extern mca_base_framework_t oshmem_sshmem_base_framework; #if OPAL_ENABLE_DEBUG #define SSHMEM_VERBOSE(level, ...) \ oshmem_output_verbose(level, oshmem_sshmem_base_framework.framework_output, \ - "%s:%d - %s()", __SSHMEM_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "%s:%d - %s()", __SSHMEM_FILE__, __LINE__, __func__, __VA_ARGS__) #else #define SSHMEM_VERBOSE(level, ...) #endif #define SSHMEM_ERROR(...) \ oshmem_output(oshmem_sshmem_base_framework.framework_output, \ - "Error %s:%d - %s()", __SSHMEM_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Error %s:%d - %s()", __SSHMEM_FILE__, __LINE__, __func__, __VA_ARGS__) #define SSHMEM_WARN(...) \ oshmem_output_verbose(0, oshmem_sshmem_base_framework.framework_output, \ - "Warning %s:%d - %s()", __SSHMEM_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Warning %s:%d - %s()", __SSHMEM_FILE__, __LINE__, __func__, __VA_ARGS__) /* diff --git a/oshmem/shmem/shmem_api_logger.h b/oshmem/shmem/shmem_api_logger.h index fb9bb5031a0..4d089cd7c6e 100644 --- a/oshmem/shmem/shmem_api_logger.h +++ b/oshmem/shmem/shmem_api_logger.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,13 +30,13 @@ OSHMEM_DECLSPEC extern int shmem_api_logger_output; #ifdef OPAL_ENABLE_DEBUG #define SHMEM_API_VERBOSE(level, ...) \ oshmem_output_verbose(level, shmem_api_logger_output, \ - "%s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "%s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) #else #define SHMEM_API_VERBOSE(level, ...) #endif #define SHMEM_API_ERROR(...) \ oshmem_output(shmem_api_logger_output, \ - "Error: %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) + "Error: %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__) #endif /*SHMEM_API_LOGGER_H*/ From aca751a9d6d1030c2a0eaecc6153888788685b9e Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 14 Jul 2015 12:12:37 -0600 Subject: [PATCH 0110/1704] opal/fifo: add missing memory barrier master commit open-mpi/ompi@9abccbd9fc72966173b7d876f65022a2ba5d4daa Signed-off-by: Nathan Hjelm --- opal/class/opal_fifo.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opal/class/opal_fifo.h b/opal/class/opal_fifo.h index 8c866aa5b22..79ba5bae6b7 100644 --- a/opal/class/opal_fifo.h +++ b/opal/class/opal_fifo.h @@ -189,6 +189,8 @@ static inline opal_list_item_t *opal_fifo_push_atomic (opal_fifo_t *fifo, item->opal_list_next = &fifo->opal_fifo_ghost; + opal_atomic_wmb (); + /* try to get the tail */ tail_item = opal_atomic_swap_ptr (&fifo->opal_fifo_tail.data.item, item); From 2e1767a9191dc5321f5e91d9a0b775ab083595e6 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 4 Aug 2015 08:54:06 -0600 Subject: [PATCH 0111/1704] opal/lifo: add missing opal_atomic_wmb and remove unnecessary opal_atomic_rmb master commit open-mpi/ompi@6003a4dae148964b2fb175c7fe5e3bff03e6c9d3 Signed-off-by: Nathan Hjelm --- opal/class/opal_lifo.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opal/class/opal_lifo.h b/opal/class/opal_lifo.h index ca66a6e9a5d..2297de56c1d 100644 --- a/opal/class/opal_lifo.h +++ b/opal/class/opal_lifo.h @@ -187,20 +187,22 @@ static inline opal_list_item_t *opal_lifo_pop_atomic (opal_lifo_t* lifo) { opal_list_item_t *item; while ((item = (opal_list_item_t *) lifo->opal_lifo_head.data.item) != &lifo->opal_lifo_ghost) { - opal_atomic_rmb(); - /* ensure it is safe to pop the head */ if (opal_atomic_swap_32((volatile int32_t *) &item->item_free, 1)) { continue; } + opal_atomic_wmb (); + /* try to swap out the head pointer */ if (opal_atomic_cmpset_ptr (&lifo->opal_lifo_head.data.item, item, (void *) item->opal_list_next)) { break; } + /* NTH: don't need another atomic here */ item->item_free = 0; + /* Do some kind of pause to release the bus */ } From cbbdd301ac8b53b2aa4e20b85bcfaec0d9e8001d Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Wed, 5 Aug 2015 14:09:22 -0400 Subject: [PATCH 0112/1704] Build CUDA extensions always and fix return value (cherry picked from commit open-mpi/ompi@cb84a85d172c812b6a04113bb41df0a79085e65d) --- ompi/mpiext/cuda/c/mpiext_cuda.c | 6 +++--- ompi/mpiext/cuda/configure.m4 | 21 +++------------------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/ompi/mpiext/cuda/c/mpiext_cuda.c b/ompi/mpiext/cuda/c/mpiext_cuda.c index 4510e5fc518..499d1441c39 100644 --- a/ompi/mpiext/cuda/c/mpiext_cuda.c +++ b/ompi/mpiext/cuda/c/mpiext_cuda.c @@ -23,9 +23,9 @@ #include "opal/constants.h" #include "ompi/mpiext/cuda/c/mpiext_cuda_c.h" -/* The fact that this code is configured and compiled means that we have CUDA aware - support. We may expand on this API to return more features in the future. */ +/* If CUDA-aware support is configured in, return 1. Otherwise, return 0. + * This API may be extended to return more features in the future. */ int MPIX_Query_cuda_support(void) { - return OPAL_SUCCESS; + return OPAL_CUDA_SUPPORT; } diff --git a/ompi/mpiext/cuda/configure.m4 b/ompi/mpiext/cuda/configure.m4 index a0d9e8d2369..09a458fffb9 100644 --- a/ompi/mpiext/cuda/configure.m4 +++ b/ompi/mpiext/cuda/configure.m4 @@ -18,25 +18,10 @@ AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[ AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile]) AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile]) - OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cuda_happy]) - - # If we don't want CUDA, don't compile this extention + # We compile this whether CUDA support was requested or not. It allows + # us to to detect if we have CUDA support. AS_IF([test "$ENABLE_cuda" = "1" || \ test "$ENABLE_EXT_ALL" = "1"], - [ompi_mpi_ext_cuda_happy=1], - [ompi_mpi_ext_cuda_happy=0]) - - AS_IF([test "$ompi_mpi_ext_cuda_happy" = "1" && \ - test "$CUDA_SUPPORT" = "1"], [$1], - [ # Error if the user specifically asked for this extension, - # but we can't build it. - AS_IF([test "$ENABLE_cuda" = "1"], - [AC_MSG_WARN([Requested "cuda" MPI extension, but cannot build it]) - AC_MSG_WARN([because cuda support is not enabled.]) - AC_MSG_WARN([Try again with --with-cuda]) - AC_MSG_ERROR([Cannot continue])]) - $2]) - - OPAL_VAR_SCOPE_POP + [$2]) ]) From b21100bda3ab44953fe90bfd75999802a002e507 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 6 Aug 2015 06:49:33 -0700 Subject: [PATCH 0113/1704] .gitignore: add man page in CUDA extension (cherry picked from commit open-mpi/ompi@c9e91ff4fca0b02026ccfcb904ec7ff2a3fa49b2) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7e923b9c443..381700afe5e 100644 --- a/.gitignore +++ b/.gitignore @@ -234,6 +234,8 @@ ompi/mpiext/example/tests/progress_mpifh ompi/mpiext/example/tests/progress_usempi ompi/mpiext/example/tests/progress_usempif08 +ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3 + ompi/tools/mpisync/mpisync ompi/tools/mpisync/mpirun_prof ompi/tools/mpisync/ompi_timing_post From f56e7eb96ccec6c877a7461b191e8548ccb13b33 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 6 Aug 2015 10:54:28 -0700 Subject: [PATCH 0114/1704] CSCuv67889: usnic: fix an error corner case Ensure that we have non-NULL on all levels of pointers, which will save us if there are exitable errors very early during component / module initialization. (cherry picked from commit open-mpi/ompi@b5c37dbfe2ce6353c756d161c1cd4e75d5f5f127) --- opal/mca/btl/usnic/btl_usnic_util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_util.c b/opal/mca/btl/usnic/btl_usnic_util.c index a66303d8867..1039bf00196 100644 --- a/opal/mca/btl/usnic/btl_usnic_util.c +++ b/opal/mca/btl/usnic/btl_usnic_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,7 +25,9 @@ void opal_btl_usnic_exit(opal_btl_usnic_module_t *module) if (NULL == module) { /* Find the first module with an error callback */ for (int i = 0; i < mca_btl_usnic_component.num_modules; ++i) { - if (NULL != mca_btl_usnic_component.usnic_active_modules[i]->pml_error_callback) { + if (NULL != mca_btl_usnic_component.usnic_active_modules && + NULL != mca_btl_usnic_component.usnic_active_modules[i] && + NULL != mca_btl_usnic_component.usnic_active_modules[i]->pml_error_callback) { module = mca_btl_usnic_component.usnic_active_modules[i]; break; } From 8ae8b784a3dfae461bbb73b2cd9bff72593e79c5 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 6 Aug 2015 04:38:44 -0700 Subject: [PATCH 0115/1704] autogen.pl: ensure to patch *all* Autotools output Per open-mpi/ompi#751, ensure to patch up all Autotools output (not just in some cases). Also, adjust the patching process to only write our verbose statements and a new configure script if the content actually changed as result of the patching. (cherry picked from commit open-mpi/ompi@982455aaa4f100ebdde634594d53e832e7db0398) --- autogen.pl | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/autogen.pl b/autogen.pl index 9694250aafa..6b6b9bf469b 100755 --- a/autogen.pl +++ b/autogen.pl @@ -180,7 +180,6 @@ sub process_subdir { print "--- Found configure.in|ac; running autoreconf...\n"; safe_system("autoreconf -ivf"); print "--- Patching autotools output... :-(\n"; - patch_autotools_output($start); } else { my_die "Found subdir, but no autogen.sh or configure.in|ac to do anything"; } @@ -189,6 +188,9 @@ sub process_subdir { my_die "Did not generate a \"configure\" executable in $dir.\n" if (! -x "configure"); + # Fix known issues in Autotools output + patch_autotools_output($start); + # Chdir back to where we came from chdir($start); } @@ -900,6 +902,11 @@ sub patch_autotools_output { unlink("config/ltmain.sh.rej"); } + # If there's no configure script, there's nothing else to do. + return + if (! -f "configure"); + my @verbose_out; + # Total ugh. We have to patch the configure script itself. See below # for explainations why. open(IN, "configure") || my_die "Can't open configure"; @@ -907,6 +914,7 @@ sub patch_autotools_output { $c .= $_ while(); close(IN); + my $c_orig = $c; # LT <=2.2.6b need to be patched for the PGI 10.0 fortran compiler # name (pgfortran). The following comes from the upstream LT patches: @@ -915,7 +923,7 @@ sub patch_autotools_output { # Note that that patch is part of Libtool (which is not in this OMPI # source tree); we can't fix it. So all we can do is patch the # resulting configure script. :-( - verbose "$indent_str"."Patching configure for Libtool PGI 10 fortran compiler name\n"; + push(@verbose_out, $indent_str . "Patching configure for Libtool PGI 10 fortran compiler name\n"); $c =~ s/gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn/gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn/g; $c =~ s/pgcc\* \| pgf77\* \| pgf90\* \| pgf95\*\)/pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)/g; $c =~ s/pgf77\* \| pgf90\* \| pgf95\*\)/pgf77* | pgf90* | pgf95* | pgfortran*)/g; @@ -925,7 +933,7 @@ sub patch_autotools_output { # Libtool install; all we can do is patch the resulting configure # script. :-( The following comes from the upstream patch: # http://lists.gnu.org/archive/html/libtool-patches/2009-11/msg00016.html - verbose "$indent_str"."Patching configure for Libtool PGI version number regexps\n"; + push(@verbose_out, $indent_str . "Patching configure for Libtool PGI version number regexps\n"); $c =~ s/\*pgCC\\ \[1-5\]\* \| \*pgcpp\\ \[1-5\]\*/*pgCC\\ [1-5]\.* | *pgcpp\\ [1-5]\.*/g; # Similar issue as above -- fix the case statements that handle the Sun @@ -960,16 +968,24 @@ sub patch_autotools_output { ;; "; - verbose "$indent_str"."Patching configure for Sun Studio Fortran version strings ($tag)\n"; + push(@verbose_out, $indent_str . "Patching configure for Sun Studio Fortran version strings ($tag)\n"); $c =~ s/$search_string/$replace_string/; } # See http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=v2.2.6-201-g519bf91 for details # Note that this issue was fixed in LT 2.2.8, however most distros are still using 2.2.6b - verbose "$indent_str"."Patching configure for IBM xlf libtool bug\n"; + push(@verbose_out, $indent_str . "Patching configure for IBM xlf libtool bug\n"); $c =~ s/(\$LD -shared \$libobjs \$deplibs \$)compiler_flags( -soname \$soname)/$1linker_flags$2/g; + # Only write out verbose statements and a new configure if the + # configure content actually changed + return + if ($c eq $c_orig); + foreach my $str (@verbose_out) { + verbose($str); + } + open(OUT, ">configure.patched") || my_die "Can't open configure.patched"; print OUT $c; close(OUT); @@ -1289,6 +1305,8 @@ sub patch_autotools_output { } safe_system($cmd); +patch_autotools_output("."); + #--------------------------------------------------------------------------- verbose " From 4740cb0887652606cf2bd1ef8de1f09470cc8d5e Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 7 Aug 2015 11:47:32 +0900 Subject: [PATCH 0116/1704] configury: fix libtool.m4 issue for Libtool >= v2.4.3 Patch generated configure files to fix the libtool.m4 bug the bug that started with Libtool 2.4.3. (cherry picked from commit open-mpi/ompi@67fdfdda7da8f94448ea4e5fc51e05128fdfce10) --- autogen.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autogen.pl b/autogen.pl index 6b6b9bf469b..6d308dc427f 100755 --- a/autogen.pl +++ b/autogen.pl @@ -5,6 +5,8 @@ # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. # Copyright (c) 2013-2014 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -978,6 +980,12 @@ sub patch_autotools_output { push(@verbose_out, $indent_str . "Patching configure for IBM xlf libtool bug\n"); $c =~ s/(\$LD -shared \$libobjs \$deplibs \$)compiler_flags( -soname \$soname)/$1linker_flags$2/g; + # Fix consequence of broken libtool.m4 from libtool 2.4.3 + # see http://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00002.html + push(@verbose_out, $indent_str . "Patching configure for libtool.m4 bug\n"); + $c =~ s/test x-L = \"\$p\"/test x-L = \"x\$p\"/g; + $c =~ s/test x-R = \"\$p\"/test x-R = \"x\$p\"/g; + # Only write out verbose statements and a new configure if the # configure content actually changed return From 564960f310eed265132740b2fef0f7f2ac71ca99 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Fri, 7 Aug 2015 09:52:56 -0400 Subject: [PATCH 0117/1704] Refs open-mpi/ompi#627. Fix support for multi-threads with CUDA 7.0 (cherry picked from commit open-mpi/ompi@8cc6bef09020d23f36e7e015b3f5c4a7a1e71739) Conflicts: opal/mca/common/cuda/common_cuda.c --- opal/mca/common/cuda/common_cuda.c | 35 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/opal/mca/common/cuda/common_cuda.c b/opal/mca/common/cuda/common_cuda.c index 5a7f16eede0..aabd5e2a5be 100644 --- a/opal/mca/common/cuda/common_cuda.c +++ b/opal/mca/common/cuda/common_cuda.c @@ -1739,19 +1739,19 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t int res; CUmemorytype memType = 0; CUdeviceptr dbuf = (CUdeviceptr)pUserBuf; - CUcontext ctx = NULL; + CUcontext ctx = NULL, memCtx = NULL; #if OPAL_CUDA_GET_ATTRIBUTES uint32_t isManaged = 0; /* With CUDA 7.0, we can get multiple attributes with a single call */ CUpointer_attribute attributes[3] = {CU_POINTER_ATTRIBUTE_MEMORY_TYPE, CU_POINTER_ATTRIBUTE_CONTEXT, CU_POINTER_ATTRIBUTE_IS_MANAGED}; - void *attrdata[] = {(void *)&memType, (void *)&ctx, (void *)&isManaged}; + void *attrdata[] = {(void *)&memType, (void *)&memCtx, (void *)&isManaged}; res = cuFunc.cuPointerGetAttributes(3, attributes, attrdata, dbuf); - OPAL_OUTPUT_VERBOSE((101, mca_common_cuda_output, - "dbuf=%p, memType=%d, ctx=%p, isManaged=%d, res=%d", - (void *)dbuf, (int)memType, (void *)ctx, isManaged, res)); + OPAL_OUTPUT_VERBOSE((101, mca_common_cuda_output, + "dbuf=%p, memType=%d, memCtx=%p, isManaged=%d, res=%d", + (void *)dbuf, (int)memType, (void *)memCtx, isManaged, res)); /* Mark unified memory buffers with a flag. This will allow all unified * memory to be forced through host buffers. Note that this memory can @@ -1787,6 +1787,7 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t } /* Must be a device pointer */ assert(memType == CU_MEMORYTYPE_DEVICE); +#endif /* OPAL_CUDA_GET_ATTRIBUTES */ /* This piece of code was added in to handle in a case involving * OMP threads. The user had initialized CUDA and then spawned @@ -1797,25 +1798,25 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t * and set the current context to that. It is rare that we will not * have a context. */ res = cuFunc.cuCtxGetCurrent(&ctx); -#endif /* OPAL_CUDA_GET_ATTRIBUTES */ if (OPAL_UNLIKELY(NULL == ctx)) { if (CUDA_SUCCESS == res) { - res = cuFunc.cuPointerGetAttribute(&ctx, +#if !OPAL_CUDA_GET_ATTRIBUTES + res = cuFunc.cuPointerGetAttribute(&memCtx, CU_POINTER_ATTRIBUTE_CONTEXT, dbuf); - if (res != CUDA_SUCCESS) { + if (OPAL_UNLIKELEY(res != CUDA_SUCCESS)) { opal_output(0, "CUDA: error calling cuPointerGetAttribute: " "res=%d, ptr=%p aborting...", res, pUserBuf); return OPAL_ERROR; + } +#endif /* OPAL_CUDA_GET_ATTRIBUTES */ + res = cuFunc.cuCtxSetCurrent(memCtx); + if (OPAL_UNLIKELY(res != CUDA_SUCCESS)) { + opal_output(0, "CUDA: error calling cuCtxSetCurrent: " + "res=%d, ptr=%p aborting...", res, pUserBuf); + return OPAL_ERROR; } else { - res = cuFunc.cuCtxSetCurrent(ctx); - if (res != CUDA_SUCCESS) { - opal_output(0, "CUDA: error calling cuCtxSetCurrent: " - "res=%d, ptr=%p aborting...", res, pUserBuf); - return OPAL_ERROR; - } else { - opal_output_verbose(10, mca_common_cuda_output, - "CUDA: cuCtxSetCurrent passed: ptr=%p", pUserBuf); - } + OPAL_OUTPUT_VERBOSE((10, mca_common_cuda_output, + "CUDA: cuCtxSetCurrent passed: ptr=%p", pUserBuf)); } } else { /* Print error and proceed */ From 40ba25f4a9aa2e2b5361c84ae1f2059fdf855e75 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Fri, 7 Aug 2015 12:16:06 -0600 Subject: [PATCH 0118/1704] Add explicit implementation of Cloneable Added Cloneable to the implemented interface list as per Coverity suggestion. The required methods were already implemented, but it was not explicitly stated. This is an intent revealing change. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/Comm.java | 2 +- ompi/mpi/java/java/Datatype.java | 2 +- ompi/mpi/java/java/Info.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 9e20da719cb..99741003d35 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -65,7 +65,7 @@ /** * The {@code Comm} class represents communicators. */ -public class Comm implements Freeable +public class Comm implements Freeable, Cloneable { public final static int TYPE_SHARED = 0; protected final static int SELF = 1; diff --git a/ompi/mpi/java/java/Datatype.java b/ompi/mpi/java/java/Datatype.java index d6f571078c7..50f63e7b0b9 100644 --- a/ompi/mpi/java/java/Datatype.java +++ b/ompi/mpi/java/java/Datatype.java @@ -52,7 +52,7 @@ /** * The {@code Datatype} class represents {@code MPI_Datatype} handles. */ -public final class Datatype implements Freeable +public final class Datatype implements Freeable, Cloneable { protected long handle; protected int baseType; diff --git a/ompi/mpi/java/java/Info.java b/ompi/mpi/java/java/Info.java index 4ce4c03e0fe..d648d909432 100644 --- a/ompi/mpi/java/java/Info.java +++ b/ompi/mpi/java/java/Info.java @@ -23,7 +23,7 @@ /** * This class represents {@code MPI_Info}. */ -public final class Info implements Freeable +public final class Info implements Freeable, Cloneable { protected long handle; protected static final long NULL = getNull(); From 412d0d4f5dec2d56a2c14716b6ad6179b2c3638b Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Wed, 5 Aug 2015 13:27:18 -0700 Subject: [PATCH 0119/1704] plm/alps: remove unneeded env. variable setting In order to address issue #741, the orted's now are always launched with the Cray PMI environment variables PMI_NO_FORK PMI_NO_PREINITIALIZE set to disable running of the library's ctor. So there's no longer a need to set these for the application(s) being launched by the orted's. cherry-pick of open-mpi/ompi@1b55d14 Signed-off-by: Howard Pritchard --- orte/mca/plm/alps/plm_alps_module.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/orte/mca/plm/alps/plm_alps_module.c b/orte/mca/plm/alps/plm_alps_module.c index d1b7c77f4ab..8bb4d5698ac 100644 --- a/orte/mca/plm/alps/plm_alps_module.c +++ b/orte/mca/plm/alps/plm_alps_module.c @@ -155,20 +155,6 @@ static int plm_alps_init(void) */ static int plm_alps_launch_job(orte_job_t *jdata) { - orte_app_context_t *app; - - for (int i = 0 ; i < jdata->apps->size ; ++i) { - int env_count; - - if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) { - continue; - } - - for (env_count = 0 ; app->env && app->env[env_count] ; ++env_count); - /* disable PMI for the application. this will prevent the pmi library from printing useless warnings */ - opal_argv_append (&env_count, &app->env, "PMI_NO_FORK=1"); - opal_argv_append (&env_count, &app->env, "PMI_NO_PREINITIALIZE=1"); - } if (ORTE_FLAG_TEST(jdata, ORTE_JOB_FLAG_RESTART)) { /* this is a restart situation - skip to the mapping stage */ From 161f89f7479689b7e8a6034d60fe49f648937283 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Wed, 5 Aug 2015 16:11:04 -0600 Subject: [PATCH 0120/1704] mca/topo: suppress picky warning When configured with --enable-picky topo_base_lazy_init.c compiles with a warning: CC base/topo_base_lazy_init.lo base/topo_base_lazy_init.c:46:67: warning: implicit conversion from enumeration type 'enum mca_base_register_flag_t' to different enumeration type 'mca_base_open_flag_t' (aka 'enum mca_base_open_flag_t') [-Wenum-conversion] err = mca_base_framework_open (&ompi_topo_base_framework, MCA_BASE_REGISTER_DEFAULT); This commit fixes this implicit conversion problem. cherry-pick of open-mpi/ompi@10aac80 Signed-off-by: Howard Pritchard --- ompi/mca/topo/base/topo_base_lazy_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/topo/base/topo_base_lazy_init.c b/ompi/mca/topo/base/topo_base_lazy_init.c index 42dc376f756..3e9e57ae7d8 100644 --- a/ompi/mca/topo/base/topo_base_lazy_init.c +++ b/ompi/mca/topo/base/topo_base_lazy_init.c @@ -43,7 +43,7 @@ int mca_topo_base_lazy_init(void) * Register and open all available components, giving them a chance to access the MCA parameters. */ - err = mca_base_framework_open (&ompi_topo_base_framework, MCA_BASE_REGISTER_DEFAULT); + err = mca_base_framework_open (&ompi_topo_base_framework, MCA_BASE_OPEN_DEFAULT); if (OMPI_SUCCESS != err) { return err; } From 6f61b145a1c98c30ffcfe18956cb7a316cedb32e Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 13 Jul 2015 10:17:13 +0900 Subject: [PATCH 0121/1704] configury: fix fortran binding checks for ompi extensions (cherry picked from commit open-mpi/ompi@66ef1c3c558023dc5ea8ff9f9bb3544bbadce7cf) --- config/ompi_ext.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ompi_ext.m4 b/config/ompi_ext.m4 index 85b2880c964..9f0560820e0 100644 --- a/config/ompi_ext.m4 +++ b/config/ompi_ext.m4 @@ -176,7 +176,7 @@ EOF # Make an AM conditional to see whether we're building the mpi_ext # module. Note that we only build it if we support the ignore-tkr # mpi module. - AS_IF([test $OMPI_BUILD_FORTRAN_USEMPI_BINDINGS -eq 1 && \ + AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1], [OMPI_BUILD_FORTRAN_USEMPI_EXT=1], [OMPI_BUILD_FORTRAN_USEMPI_EXT=0]) @@ -213,7 +213,7 @@ EOF # Only build this mpi_f08_ext module if we're building the "use # mpi_f08" module *and* it's the non-descriptor one. - AS_IF([test $OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS -eq 1 && \ + AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ test $OMPI_BUILD_FORTRAN_F08_SUBARRAYS -eq 0], [OMPI_BUILD_FORTRAN_USEMPIF08_EXT=1], [OMPI_BUILD_FORTRAN_USEMPIF08_EXT=0]) From 219253027ab6e0ce7645518d88746a7e08238c64 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 11 Aug 2015 08:35:22 -0600 Subject: [PATCH 0122/1704] pml/crcpw - remote crcpw pml First in a series of commits to remove unmaintained checkpoint/restart related code from the v2.x release branch. Signed-off-by: Howard Pritchard --- ompi/mca/pml/crcpw/Makefile.am | 42 -- ompi/mca/pml/crcpw/configure.m4 | 28 - ompi/mca/pml/crcpw/owner.txt | 7 - ompi/mca/pml/crcpw/pml_crcpw.h | 149 ---- ompi/mca/pml/crcpw/pml_crcpw_component.c | 192 ------ ompi/mca/pml/crcpw/pml_crcpw_module.c | 842 ----------------------- 6 files changed, 1260 deletions(-) delete mode 100644 ompi/mca/pml/crcpw/Makefile.am delete mode 100644 ompi/mca/pml/crcpw/configure.m4 delete mode 100644 ompi/mca/pml/crcpw/owner.txt delete mode 100644 ompi/mca/pml/crcpw/pml_crcpw.h delete mode 100644 ompi/mca/pml/crcpw/pml_crcpw_component.c delete mode 100644 ompi/mca/pml/crcpw/pml_crcpw_module.c diff --git a/ompi/mca/pml/crcpw/Makefile.am b/ompi/mca/pml/crcpw/Makefile.am deleted file mode 100644 index 381c37fd35a..00000000000 --- a/ompi/mca/pml/crcpw/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2004-2007 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$ -# - -crcpw_sources = \ - pml_crcpw.h \ - pml_crcpw_component.c \ - pml_crcpw_module.c - -if MCA_BUILD_ompi_pml_crcpw_DSO -component_noinst = -component_install = mca_pml_crcpw.la -else -component_noinst = libmca_pml_crcpw.la -component_install = -endif - - -mcacomponentdir = $(ompilibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_pml_crcpw_la_SOURCES = $(crcpw_sources) -mca_pml_crcpw_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_pml_crcpw_la_SOURCES = $(crcpw_sources) -libmca_pml_crcpw_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/pml/crcpw/configure.m4 b/ompi/mca/pml/crcpw/configure.m4 deleted file mode 100644 index b09529be4f5..00000000000 --- a/ompi/mca/pml/crcpw/configure.m4 +++ /dev/null @@ -1,28 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2010 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 (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_pml_crcpw_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_ompi_pml_crcpw_CONFIG],[ - AC_CONFIG_FILES([ompi/mca/pml/crcpw/Makefile]) - - # If we don't want FT, don't compile this component - AS_IF([test "$opal_want_ft_cr" = "1"], - [$1], - [$2]) -])dnl diff --git a/ompi/mca/pml/crcpw/owner.txt b/ompi/mca/pml/crcpw/owner.txt deleted file mode 100644 index 29b7476009c..00000000000 --- a/ompi/mca/pml/crcpw/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: nobody -status: unmaintained diff --git a/ompi/mca/pml/crcpw/pml_crcpw.h b/ompi/mca/pml/crcpw/pml_crcpw.h deleted file mode 100644 index 5f6b8008362..00000000000 --- a/ompi/mca/pml/crcpw/pml_crcpw.h +++ /dev/null @@ -1,149 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2007 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2006 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ - -#ifndef MCA_PML_CRCPW_H -#define MCA_PML_CRCPW_H - -#include "ompi_config.h" - -#include "opal/class/opal_free_list.h" -#include "ompi/request/request.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/base/pml_base_request.h" -#include "ompi/mca/pml/base/pml_base_bsend.h" -#include "ompi/mca/pml/base/pml_base_sendreq.h" -#include "ompi/datatype/ompi_datatype.h" -#include "ompi/mca/crcp/crcp.h" -#include "ompi/mca/crcp/base/base.h" - -BEGIN_C_DECLS - - /** - * CRCPW PML module - */ - struct mca_pml_crcpw_component_t { - mca_pml_base_component_t super; - int verbose; - int priority; - int output_handle; - bool pml_crcp_wrapped; - }; - typedef struct mca_pml_crcpw_component_t mca_pml_crcpw_component_t; - OMPI_MODULE_DECLSPEC extern mca_pml_crcpw_component_t mca_pml_crcpw_component; - - struct mca_pml_crcpw_module_t { - mca_pml_base_module_t super; - mca_pml_base_component_t wrapped_pml_component; - mca_pml_base_module_t wrapped_pml_module; - }; - typedef struct mca_pml_crcpw_module_t mca_pml_crcpw_module_t; - extern mca_pml_crcpw_module_t mca_pml_crcpw_module; - - /* Free list of PML states */ - OMPI_MODULE_DECLSPEC extern opal_free_list_t pml_state_list; - OMPI_MODULE_DECLSPEC extern bool pml_crcpw_is_finalized; - - /* - * PML module functions. - */ - int mca_pml_crcpw_component_open(void); - int mca_pml_crcpw_component_close(void); - - mca_pml_base_module_t* mca_pml_crcpw_component_init(int *priority, - bool enable_progress_threads, - bool enable_mpi_threads - ); - - int mca_pml_crcpw_component_finalize(void); - - /* - * PML interface functions. - */ - int mca_pml_crcpw_enable( bool enable ); - - int mca_pml_crcpw_add_comm( struct ompi_communicator_t* comm ); - int mca_pml_crcpw_del_comm( struct ompi_communicator_t* comm ); - - int mca_pml_crcpw_add_procs( struct ompi_proc_t **procs, size_t nprocs ); - int mca_pml_crcpw_del_procs( struct ompi_proc_t **procs, size_t nprocs ); - - int mca_pml_crcpw_progress(void); - - int mca_pml_crcpw_iprobe(int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status ); - - int mca_pml_crcpw_probe( int dst, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status ); - - - int mca_pml_crcpw_improbe( int dst, - int tag, - struct ompi_communicator_t* comm, - int *matched, - struct ompi_message_t **message, - ompi_status_public_t* status ); - - int mca_pml_crcpw_mprobe( int dst, - int tag, - struct ompi_communicator_t* comm, - struct ompi_message_t **message, - ompi_status_public_t* status ); - - int mca_pml_crcpw_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 ); - - int mca_pml_crcpw_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 ); - - int mca_pml_crcpw_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 ); - - int mca_pml_crcpw_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); - - int mca_pml_crcpw_irecv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, struct ompi_request_t **request ); - - int mca_pml_crcpw_recv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, ompi_status_public_t* status); - - int mca_pml_crcpw_imrecv( void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - struct ompi_request_t **request ); - - int mca_pml_crcpw_mrecv( void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - ompi_status_public_t* status ); - - int mca_pml_crcpw_dump( struct ompi_communicator_t* comm, int verbose ); - - int mca_pml_crcpw_start( size_t count, ompi_request_t** requests ); - - int mca_pml_crcpw_ft_event(int state); - -END_C_DECLS - -#endif /* MCA_PML_CRCPW_H */ diff --git a/ompi/mca/pml/crcpw/pml_crcpw_component.c b/ompi/mca/pml/crcpw/pml_crcpw_component.c deleted file mode 100644 index 64bbfe455d1..00000000000 --- a/ompi/mca/pml/crcpw/pml_crcpw_component.c +++ /dev/null @@ -1,192 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2009 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-2006 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "opal/runtime/opal.h" -#include "opal/util/output.h" -#include "opal/mca/event/event.h" -#include "opal/mca/btl/base/base.h" - -#include "mpi.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/base/pml_base_bsend.h" -#include "ompi/mca/pml/crcpw/pml_crcpw.h" -#include "ompi/mca/bml/base/base.h" - -static int mca_pml_crcpw_component_register(void); - -mca_pml_crcpw_component_t mca_pml_crcpw_component = { - { - /* First, the mca_base_component_t struct containing meta - information about the component itself */ - - .pmlm_version = { - MCA_PML_BASE_VERSION_2_0_0, - - .mca_component_name = "crcpw", - MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, - OMPI_RELEASE_VERSION), - .mca_open_component = mca_pml_crcpw_component_open, - .mca_close_component = mca_pml_crcpw_component_close, - .mca_register_component_params = mca_pml_crcpw_component_register, - }, - .pmlm_data = { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - }, - - .pmlm_init = mca_pml_crcpw_component_init, - .pmlm_finalize = mca_pml_crcpw_component_finalize, - }, - /* Verbosity */ - 0, - /* Priority */ - PML_SELECT_WRAPPER_PRIORITY, - /* Are we being used as a wrapper? */ - false -}; - -opal_free_list_t pml_state_list; -bool pml_crcpw_is_finalized = false; - -static int mca_pml_crcpw_component_register(void) -{ - /* - * Register some MCA parameters - */ - mca_pml_crcpw_component.priority = PML_SELECT_WRAPPER_PRIORITY; - (void) mca_base_component_var_register(&mca_pml_crcpw_component.super.pmlm_version, "priority", - "Priority of the PML crcpw component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &mca_pml_crcpw_component.priority); - - mca_pml_crcpw_component.verbose = 0; - (void) mca_base_component_var_register(&mca_pml_crcpw_component.super.pmlm_version, "verbose", - "Verbose level for the PML crcpw component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &mca_pml_crcpw_component.verbose); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_component_open(void) -{ - opal_output_verbose( 10, mca_pml_crcpw_component.output_handle, - "pml:crcpw: component_open: Open"); - - mca_pml_crcpw_component.output_handle = opal_output_open(NULL); - if ( 0 != mca_pml_crcpw_component.verbose) { - opal_output_set_verbosity(mca_pml_crcpw_component.output_handle, - mca_pml_crcpw_component.verbose); - } - - /* - * Debug Output - */ - opal_output_verbose(10, mca_pml_crcpw_component.output_handle, - "pml:crcpw: open()"); - opal_output_verbose(20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: open: priority = %d", - mca_pml_crcpw_component.priority); - opal_output_verbose(20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: open: verbosity = %d", - mca_pml_crcpw_component.verbose); - - return OMPI_SUCCESS; -} - - -int mca_pml_crcpw_component_close(void) -{ - opal_output_verbose( 20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: component_close: Close"); - - return OMPI_SUCCESS; -} - - -mca_pml_base_module_t* mca_pml_crcpw_component_init(int* priority, - bool enable_progress_threads, - bool enable_mpi_threads) -{ - /* We use the PML_SELECT_WRAPPER_PRIORITY to indicate when this - * component should wrap around what is already selected - * If it is not set to this seminal value, then we are doing a - * normal selection operation - */ - if(*priority == PML_SELECT_WRAPPER_PRIORITY ) { - opal_output_verbose( 20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: component_init: Wrap the selected component %s", - mca_pml_base_selected_component.pmlm_version.mca_component_name); - - mca_pml_crcpw_module.wrapped_pml_component = mca_pml_base_selected_component; - mca_pml_crcpw_module.wrapped_pml_module = mca_pml; - mca_pml_crcpw_component.pml_crcp_wrapped = true; - - opal_output_verbose( 20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: component_init: Initalize Wrapper"); - - OBJ_CONSTRUCT(&pml_state_list, opal_free_list_t); - opal_free_list_init (&pml_state_list, - sizeof(ompi_crcp_base_pml_state_t), - opal_cache_line_size, - OBJ_CLASS(ompi_crcp_base_pml_state_t), - 0,opal_cache_line_size, - 5, /* Initial number */ - -1, /* Max = Unlimited */ - 64, /* Increment by */ - NULL, 0, NULL, NULL, NULL); - } - else { - opal_output_verbose( 20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: component_init: Priority %d", - mca_pml_crcpw_component.priority); - } - - - *priority = mca_pml_crcpw_component.priority; - - pml_crcpw_is_finalized = false; - - return &mca_pml_crcpw_module.super; -} - -int mca_pml_crcpw_component_finalize(void) -{ - opal_output_verbose( 20, mca_pml_crcpw_component.output_handle, - "pml:crcpw: component_finalize: Finalize"); - - OBJ_DESTRUCT(&pml_state_list); - - pml_crcpw_is_finalized = true; - - if(mca_pml_crcpw_component.pml_crcp_wrapped) { - return mca_pml_crcpw_module.wrapped_pml_component.pmlm_finalize(); - } - - return OMPI_SUCCESS; -} - diff --git a/ompi/mca/pml/crcpw/pml_crcpw_module.c b/ompi/mca/pml/crcpw/pml_crcpw_module.c deleted file mode 100644 index 51ed4442213..00000000000 --- a/ompi/mca/pml/crcpw/pml_crcpw_module.c +++ /dev/null @@ -1,842 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2006 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include -#include - -#include "opal/mca/btl/base/base.h" -#include "ompi/mca/pml/pml.h" -#include "ompi/mca/pml/crcpw/pml_crcpw.h" -#include "ompi/mca/bml/base/base.h" - -#include "opal/class/opal_free_list.h" - -mca_pml_crcpw_module_t mca_pml_crcpw_module = { - { - mca_pml_crcpw_add_procs, - mca_pml_crcpw_del_procs, - mca_pml_crcpw_enable, - mca_pml_crcpw_progress, - mca_pml_crcpw_add_comm, - mca_pml_crcpw_del_comm, - mca_pml_crcpw_irecv_init, - mca_pml_crcpw_irecv, - mca_pml_crcpw_recv, - mca_pml_crcpw_isend_init, - mca_pml_crcpw_isend, - mca_pml_crcpw_send, - mca_pml_crcpw_iprobe, - mca_pml_crcpw_probe, - mca_pml_crcpw_start, - mca_pml_crcpw_improbe, - mca_pml_crcpw_mprobe, - mca_pml_crcpw_imrecv, - mca_pml_crcpw_mrecv, - mca_pml_crcpw_dump, - mca_pml_crcpw_ft_event, - - 32768, - INT_MAX - } -}; - -#define PML_CRCP_STATE_ALLOC(pml_state) \ -do { \ - if( !pml_crcpw_is_finalized ) { \ - pml_state = (ompi_crcp_base_pml_state_t*) \ - opal_free_list_wait (&pml_state_list); \ - } \ -} while(0); - -#define PML_CRCP_STATE_RETURN(pml_state) \ -do { \ - if( !pml_crcpw_is_finalized ) { \ - opal_free_list_return (&pml_state_list, \ - (opal_free_list_item_t*)pml_state); \ - } \ -} while(0); - -int mca_pml_crcpw_enable(bool enable) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - if( OPAL_UNLIKELY(NULL == ompi_crcp.pml_enable) ) { - return mca_pml_crcpw_module.wrapped_pml_module.pml_enable(enable); - } - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_enable(enable, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_enable(enable) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_enable(enable, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_add_comm(ompi_communicator_t* comm) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - if( OPAL_UNLIKELY(NULL == ompi_crcp.pml_add_comm) ) { - return mca_pml_crcpw_module.wrapped_pml_module.pml_add_comm(comm); - } - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_add_comm(comm, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_add_comm(comm) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_add_comm(comm, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_del_comm(ompi_communicator_t* comm) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - if( OPAL_UNLIKELY(NULL == ompi_crcp.pml_del_comm) ) { - return mca_pml_crcpw_module.wrapped_pml_module.pml_del_comm(comm); - } - - PML_CRCP_STATE_ALLOC(pml_state); - if( NULL == pml_state ) { - return mca_pml_crcpw_module.wrapped_pml_module.pml_del_comm(comm); - } - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_del_comm(comm, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_del_comm(comm) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_del_comm(comm, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_add_procs(ompi_proc_t** procs, size_t nprocs) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_add_procs(procs, nprocs, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_add_procs(procs, nprocs) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_add_procs(procs, nprocs, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_del_procs(ompi_proc_t** procs, size_t nprocs) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_del_procs(procs, nprocs, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_del_procs(procs, nprocs) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_del_procs(procs, nprocs, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_iprobe(int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_iprobe(dst, tag, comm, matched, status, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_DONE == pml_state->state) { - goto CLEANUP; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_iprobe(dst, tag, comm, matched, status) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_iprobe(dst, tag, comm, matched, status, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - CLEANUP: - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_probe( int dst, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_probe(dst, tag, comm, status, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_DONE == pml_state->state) { - goto CLEANUP; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_probe(dst, tag, comm, status) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_probe(dst, tag, comm, status, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - CLEANUP: - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_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 ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_isend_init(buf, count, datatype, dst, tag, mode, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_isend_init(buf, count, datatype, dst, tag, mode, comm, request) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_isend_init(buf, count, datatype, dst, tag, mode, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_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 ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_isend(buf, count, datatype, dst, tag, mode, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_isend(buf, count, datatype, dst, tag, mode, comm, request) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_isend(buf, count, datatype, dst, tag, mode, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - opal_cr_stall_check = false; - OPAL_CR_TEST_CHECKPOINT_READY(); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_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 ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_send(buf, count, datatype, dst, tag, mode, comm, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_send(buf, count, datatype, dst, tag, mode, comm) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_send(buf, count, datatype, dst, tag, mode, comm, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - opal_cr_stall_check = false; - OPAL_CR_TEST_CHECKPOINT_READY(); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_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) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_irecv_init(buf, count, datatype, src, tag, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_irecv_init(buf, count, datatype, src, tag, comm, request) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_irecv_init(buf, count, datatype, src, tag, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_irecv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, struct ompi_request_t **request ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_irecv(buf, count, datatype, src, tag, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_DONE == pml_state->state) { - goto CLEANUP; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_irecv(buf, count, datatype, src, tag, comm, request) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_irecv(buf, count, datatype, src, tag, comm, request, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - CLEANUP: - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_recv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, ompi_status_public_t* given_status) -{ - int ret = OMPI_SUCCESS, actual_ret = OMPI_SUCCESS; - ompi_status_public_t* status = NULL; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - if( given_status == NULL) { - status = (ompi_status_public_t*)malloc(sizeof(ompi_status_public_t)); - } - else { - status = given_status; - } - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_recv(buf, count, datatype, src, tag, comm, status, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_DONE == pml_state->state) { - goto CLEANUP; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (actual_ret = mca_pml_crcpw_module.wrapped_pml_module.pml_recv(buf, count, datatype, src, tag, comm, status) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_recv(buf, count, datatype, src, tag, comm, status, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( given_status == NULL) { - free(status); - } - - CLEANUP: - PML_CRCP_STATE_RETURN(pml_state); - - opal_cr_stall_check = false; - OPAL_CR_TEST_CHECKPOINT_READY(); - - return actual_ret; -} - -int mca_pml_crcpw_dump( struct ompi_communicator_t* comm, int verbose ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_dump(comm, verbose, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_dump(comm, verbose) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_dump(comm, verbose, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_progress(void) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - if( OPAL_LIKELY(NULL == ompi_crcp.pml_progress) ) { - return mca_pml_crcpw_module.wrapped_pml_module.pml_progress(); - } - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_progress(pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_progress() ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_progress(pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - -int mca_pml_crcpw_start( size_t count, ompi_request_t** requests ) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_start(count, requests, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_DONE == pml_state->state) { - goto CLEANUP; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_start(count, requests) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_start(count, requests, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - CLEANUP: - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} - - -int -mca_pml_crcpw_improbe(int dst, - int tag, - struct ompi_communicator_t* comm, - int *matched, - struct ompi_message_t **message, - ompi_status_public_t* status) -{ - return OMPI_ERR_NOT_SUPPORTED; -} - - -int -mca_pml_crcpw_mprobe(int dst, - int tag, - struct ompi_communicator_t* comm, - struct ompi_message_t **message, - ompi_status_public_t* status) -{ - return OMPI_ERR_NOT_SUPPORTED; -} - - -int -mca_pml_crcpw_imrecv(void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - struct ompi_request_t **request) -{ - return OMPI_ERR_NOT_SUPPORTED; -} - - -int -mca_pml_crcpw_mrecv(void *buf, - size_t count, - ompi_datatype_t *datatype, - struct ompi_message_t **message, - ompi_status_public_t* status) -{ - return OMPI_ERR_NOT_SUPPORTED; -} - - -int mca_pml_crcpw_ft_event(int state) -{ - int ret; - ompi_crcp_base_pml_state_t * pml_state = NULL; - - PML_CRCP_STATE_ALLOC(pml_state); - - pml_state->wrapped_pml_component = &(mca_pml_crcpw_module.wrapped_pml_component); - pml_state->wrapped_pml_module = &(mca_pml_crcpw_module.wrapped_pml_module); - - pml_state->state = OMPI_CRCP_PML_PRE; - pml_state = ompi_crcp.pml_ft_event(state, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - if( OMPI_CRCP_PML_SKIP != pml_state->state && - NULL != mca_pml_crcpw_module.wrapped_pml_module.pml_ft_event) { - if( OMPI_SUCCESS != (ret = mca_pml_crcpw_module.wrapped_pml_module.pml_ft_event(state) ) ) { - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - } - - pml_state->state = OMPI_CRCP_PML_POST; - pml_state = ompi_crcp.pml_ft_event(state, pml_state); - if( OMPI_SUCCESS != pml_state->error_code) { - ret = pml_state->error_code; - PML_CRCP_STATE_RETURN(pml_state); - return ret; - } - - PML_CRCP_STATE_RETURN(pml_state); - - return OMPI_SUCCESS; -} From 7b7a06728c6d5e6c9d38794f81f803c471d0f125 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 11 Aug 2015 12:35:41 -0700 Subject: [PATCH 0123/1704] lama: remove for the v2.x series --- orte/mca/rmaps/lama/.opal_ignore | 0 orte/mca/rmaps/lama/Makefile.am | 40 - orte/mca/rmaps/lama/configure.m4 | 19 - orte/mca/rmaps/lama/help-orte-rmaps-lama.txt | 173 -- orte/mca/rmaps/lama/owner.txt | 7 - orte/mca/rmaps/lama/rmaps_lama.h | 177 -- orte/mca/rmaps/lama/rmaps_lama_component.c | 136 -- orte/mca/rmaps/lama/rmaps_lama_max_tree.c | 1182 ----------- orte/mca/rmaps/lama/rmaps_lama_module.c | 1916 ------------------ orte/mca/rmaps/lama/rmaps_lama_params.c | 878 -------- 10 files changed, 4528 deletions(-) delete mode 100644 orte/mca/rmaps/lama/.opal_ignore delete mode 100644 orte/mca/rmaps/lama/Makefile.am delete mode 100644 orte/mca/rmaps/lama/configure.m4 delete mode 100644 orte/mca/rmaps/lama/help-orte-rmaps-lama.txt delete mode 100644 orte/mca/rmaps/lama/owner.txt delete mode 100644 orte/mca/rmaps/lama/rmaps_lama.h delete mode 100644 orte/mca/rmaps/lama/rmaps_lama_component.c delete mode 100644 orte/mca/rmaps/lama/rmaps_lama_max_tree.c delete mode 100644 orte/mca/rmaps/lama/rmaps_lama_module.c delete mode 100644 orte/mca/rmaps/lama/rmaps_lama_params.c diff --git a/orte/mca/rmaps/lama/.opal_ignore b/orte/mca/rmaps/lama/.opal_ignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/orte/mca/rmaps/lama/Makefile.am b/orte/mca/rmaps/lama/Makefile.am deleted file mode 100644 index fabcb55e3f6..00000000000 --- a/orte/mca/rmaps/lama/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. -# -# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -dist_ortedata_DATA = help-orte-rmaps-lama.txt - -sources = \ - rmaps_lama_module.c \ - rmaps_lama_max_tree.c \ - rmaps_lama_params.c \ - rmaps_lama.h \ - rmaps_lama_component.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_rmaps_lama_DSO -component_noinst = -component_install = mca_rmaps_lama.la -else -component_noinst = libmca_rmaps_lama.la -component_install = -endif - -mcacomponentdir = $(ortelibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_rmaps_lama_la_SOURCES = $(sources) -mca_rmaps_lama_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_rmaps_lama_la_SOURCES =$(sources) -libmca_rmaps_lama_la_LDFLAGS = -module -avoid-version diff --git a/orte/mca/rmaps/lama/configure.m4 b/orte/mca/rmaps/lama/configure.m4 deleted file mode 100644 index 2424644aa72..00000000000 --- a/orte/mca/rmaps/lama/configure.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2012 Los Alamos National Security, LLC. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# MCA_rmaps_lama_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_orte_rmaps_lama_CONFIG], [ - AC_CONFIG_FILES([orte/mca/rmaps/lama/Makefile]) - - AS_IF([test "$OPAL_HAVE_HWLOC" = 1], - [$1], - [$2]) -]) diff --git a/orte/mca/rmaps/lama/help-orte-rmaps-lama.txt b/orte/mca/rmaps/lama/help-orte-rmaps-lama.txt deleted file mode 100644 index fa3a987b4df..00000000000 --- a/orte/mca/rmaps/lama/help-orte-rmaps-lama.txt +++ /dev/null @@ -1,173 +0,0 @@ -# -*- text -*- -# -# Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. -# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. -# -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English general help file for LAMA Mapper. -# -[orte-rmaps-lama:multi-apps-and-zero-np] -RMAPS found multiple applications to be launched, with at least one that failed -to specify the number of processes to execute. When specifying multiple -applications, you must specify how many processes of each to launch via the --np argument. -# -[orte-rmaps-lama:oversubscribe] -RMaps LAMA detected oversubscription after mapping %d of %d processes. -Since you have asked not to oversubscribe the resources the job will not -be launched. If you would instead like to oversubscribe the resources -try using the --oversubscribe option to mpirun. -# -[orte-rmaps-lama:no-resources-available] -RMaps LAMA detected that there are not enough resources to map the -remainder of the job. Check the command line options, and the number of -nodes allocated to this job. - Application Context : %d - # of Processes Successfully Mapped: %d - # of Processes Requested : %d - Mapping : %s - Binding : %s - MPPR : %s - Ordering : %s -# -[orte-rmaps-lama:merge-conflict-bad-prune-src] -RMaps LAMA detected that it needed to prune a level of the hierarchy that -was necessary for one of the command line parameters. Check your allocation -and the options below to make sure they are correct. - Conflicting Level Description: %s - Mapping : %s - Binding : %s - MPPR : %s - Ordering : %s -# -[invalid mapping option] -The specified mapping option is not supported with the LAMA rmaps -mapper: - - Specified mapping option: %s - Reason it is invalid: %s - -LAMA supports the following options to the mpirun --map-by option: - - node, numa, socket, l1cache, l2cache, l3cache, core, hwthread, slot - -Alternatively, LAMA supports specifying a sequence of letters in the -rmaps_lama_map MCA parameter; each letter indicates a "direction" for -mapping. The rmaps_lama_map MCA parameter is richer/more flexible -than the --may-by CLI option. If rmaps_lama_map is specified, the -following letters must be specified: - - h: hardware thread - c: processor core - s: processor socket - n: node (server) - -The following may also optionally be included in the mapping string: - - N: NUMA node - L1: L1 cache - L2: L2 cache - L3: L3 cache - -For example, the two commands below are equivalent: - - mpirun --mca rmaps lama --mca rmaps_lama_map csNh ... - mpirun --mca rmaps lama --map-by core ... -# -[invalid binding option] -The specified binding option is not supported with the LAMA rmaps -mapper: - - Specified binding option: %s - Reason it is invalid: %s - -LAMA binding options can be specified via the mpirun --bind-to command -line option or rmaps_lama_bind MCA param: - - --bind-to rmaps_lama_binding - Locality option option - ---------------- --------- ------------------ - Hardware thread hwthread h - Processor core core c - Processor socket socket s - NUMA node numa N - L1 cache l1cache L1 - L2 cache l2cache L2 - L3 cache l3cache L3 - Node (server) node n - -The --bind-to option assumes a single locality (e.g., bind each MPI -process to a single core, socket, etc.). The rmaps_lama_bind MCA -param requires an integer specifying how many localities to which to -bind. For example, the following two command lines are equivalent, -and bind each MPI process to a single core: - - mpirun --btl rmaps lama --mca rmaps_lama_bind 1c ... - mpirun --btl rmaps lama --bind-to core ... - -The rmaps_lama_bind MCA parameter is more flexible than the --bind-to -CLI option, because it allows binding to multiple resources. For -example, specifing an rmaps_lama_bind value of "2c" binds each MPI -process to two cores. -# -[invalid ordering option] -The specified ordering option is not supported. - - Specified ordering option: %s - -The LAMA ordering can be specified via the rmaps_lama_ordering MCA -parameter. - -Two options are supported for ordering ranks in MPI_COMM_WORLD (MCW): - - s: Sequential. MCW rank ordering is sequential by hardware thread - across all nodes. E.g., MCW rank 0 is the first process on node - 0; MCW rank 1 is the second process on node 0, and so on. - n: Natural. MCW rank ordering follows the "natural" mapping layout. - For example, in a by-socket layout, MCW rank 0 is the first - process on the 1st socket on node 0. MCW rank 1 is then the - first process on the 2nd socket on node 0. And so on. -# -[invalid mppr option] -The specified Max Processes Per Resource (MPPR) value is invalid (in -the rmaps_lama_mppr MCA paramter): - - Specified MPPR: %s - Reason is is invalid: %s - -The MPPR is a comma-delimited list of specifications indicating how -many processes are allowed on a given type of resource before an MPI -job is considered to have oversubscribed that resource. Each -specification is a token in the format of "NUMBER:RESOURCE". For -example, the default MPPR of "1:c" means that Open MPI will map one -process per processor core before considering cores to be -oversubscribed. - -Multiple specifications may be useful; for example "1:c,2:s" maintains -the default one-process-per-core limitation, but places an additional -limitation of only two processes per processor socket (assuming that -there are more than two cores per socket). - -The LAMA MPPR specifications are set via the rmaps_lama_mppr MCA -parameter. The following resources can be specified: - - Hardware thread h - Processor core c - Processor socket s - NUMA node N - L1 cache L1 - L2 cache L2 - L3 cache L3 - Node (server) n -# -[internal error] -An unexpected internal error occurred in the LAMA mapper; your job -will now fail. Sorry. - - File: %s - Message: %s diff --git a/orte/mca/rmaps/lama/owner.txt b/orte/mca/rmaps/lama/owner.txt deleted file mode 100644 index 0cc0384f0eb..00000000000 --- a/orte/mca/rmaps/lama/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: CISCO -status: maintenance diff --git a/orte/mca/rmaps/lama/rmaps_lama.h b/orte/mca/rmaps/lama/rmaps_lama.h deleted file mode 100644 index cea27e56a6e..00000000000 --- a/orte/mca/rmaps/lama/rmaps_lama.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. - * - * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - * - * Resource Mapping - */ -#ifndef ORTE_RMAPS_LAMA_H -#define ORTE_RMAPS_LAMA_H - -#include "orte_config.h" - -#include "opal/class/opal_tree.h" - -#include "orte/mca/rmaps/rmaps.h" - -BEGIN_C_DECLS - -ORTE_MODULE_DECLSPEC extern orte_rmaps_base_component_t mca_rmaps_lama_component; - -extern orte_rmaps_base_module_t orte_rmaps_lama_module; - - -/********************************* - * Structures & Defines - *********************************/ -/* - * JJH: Can we reuse the opal_hwloc_level_t data structure in - * opal/mca/hwloc/hwloc.h - */ -typedef enum { - LAMA_LEVEL_MACHINE = 0, - LAMA_LEVEL_BOARD = 1, - LAMA_LEVEL_NUMA = 2, - LAMA_LEVEL_SOCKET = 3, - LAMA_LEVEL_CACHE_L3 = 4, - LAMA_LEVEL_CACHE_L2 = 5, - LAMA_LEVEL_CACHE_L1 = 6, - LAMA_LEVEL_CORE = 7, - LAMA_LEVEL_PU = 8, - LAMA_LEVEL_UNKNOWN = 9 -} rmaps_lama_level_type_t; - -typedef enum { - LAMA_ORDER_NATURAL = 0, - LAMA_ORDER_SEQ = 1 -} rmaps_lama_order_type_t; - -struct rmaps_lama_level_info_t { - rmaps_lama_level_type_t type; - int max_resources; -}; -typedef struct rmaps_lama_level_info_t rmaps_lama_level_info_t; - -/* - * Structure to attach to the hwloc tree - * Accounting for mppr - */ -struct rmaps_lama_hwloc_user_t { - opal_object_t super; - - opal_pointer_array_t *node_mppr; -}; -typedef struct rmaps_lama_hwloc_user_t rmaps_lama_hwloc_user_t; -OBJ_CLASS_DECLARATION(rmaps_lama_hwloc_user_t); - -struct rmaps_lama_node_mppr_t { - int max; - int cur; -}; -typedef struct rmaps_lama_node_mppr_t rmaps_lama_node_mppr_t; - -rmaps_lama_level_type_t lama_type_str_to_enum(char *param); -char * lama_type_enum_to_str(rmaps_lama_level_type_t param); - - -/********************************* - * Command Line Interface Parsing - *********************************/ -/* - * User defined command line interface (CLI) arguments - */ -extern char * rmaps_lama_cmd_map; -extern char * rmaps_lama_cmd_bind; -extern char * rmaps_lama_cmd_mppr; -extern char * rmaps_lama_cmd_ordering; -extern bool rmaps_lama_timing_enabled; -extern bool rmaps_lama_can_oversubscribe; -extern bool rmaps_lama_am_oversubscribing; - -/* - * Internal representations of command line arguments - */ -extern int lama_mapping_num_layouts; -extern rmaps_lama_level_type_t *lama_mapping_layout; - -extern rmaps_lama_level_type_t lama_binding_level; - -extern rmaps_lama_level_info_t *lama_mppr_levels; -extern int lama_mppr_num_levels; - -/* - * Homogeneous system optimization - */ -extern bool lama_mppr_max_tree_homogeneous_system; - -/* - * Maximum length of digits in CLI - */ -#define MAX_BIND_DIGIT_LEN 4 - -int rmaps_lama_process_alias_params(orte_job_t *jdata); - -int rmaps_lama_parse_mapping(char *layout, - rmaps_lama_level_type_t **layout_types, - rmaps_lama_level_type_t **layout_types_sorted, - int *num_types); -int rmaps_lama_parse_binding(char *layout, - rmaps_lama_level_type_t *binding_level, - int *num_types); -int rmaps_lama_parse_mppr(char *layout, - rmaps_lama_level_info_t **mppr_levels, - int *num_types); -int rmaps_lama_parse_ordering(char *layout, - rmaps_lama_order_type_t *order); - -bool rmaps_lama_ok_to_prune_level(rmaps_lama_level_type_t level); - -/********************************* - * Max Tree Structure - *********************************/ -struct rmaps_lama_max_tree_item_t { - opal_tree_item_t tree_element; - - rmaps_lama_level_type_t type; -}; -typedef struct rmaps_lama_max_tree_item_t rmaps_lama_max_tree_item_t; - - -/* - * Union all topologies into the max tree - */ -int rmaps_lama_build_max_tree(orte_job_t *jdata, opal_list_t *node_list, - opal_tree_t * max_tree, bool *is_homogeneous); - -/* - * Find a matching subtree - */ -hwloc_obj_t * rmaps_lama_find_nth_subtree_match(hwloc_topology_t hwloc_topo, - hwloc_obj_t parent_obj, - int nth, - rmaps_lama_level_type_t lama_key); -hwloc_obj_t * rmaps_lama_find_parent(hwloc_topology_t hwloc_topo, - hwloc_obj_t *child_obj, - rmaps_lama_level_type_t lama_key); - -/* - * Create Empty Tree - */ -opal_tree_t * rmaps_lama_create_empty_max_tree(void); - -/* - * Pretty Print - */ -void rmaps_lama_max_tree_pretty_print_tree(opal_tree_t *tree); - -END_C_DECLS - -#endif /* ORTE_RMAPS_LAMA_H */ diff --git a/orte/mca/rmaps/lama/rmaps_lama_component.c b/orte/mca/rmaps/lama/rmaps_lama_component.c deleted file mode 100644 index a2ae980c727..00000000000 --- a/orte/mca/rmaps/lama/rmaps_lama_component.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. - * - * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include "opal/mca/base/base.h" - -#include "orte/mca/rmaps/base/rmaps_private.h" -#include "orte/mca/rmaps/base/base.h" - -#include "rmaps_lama.h" - -/* - * Local functions - */ - -static int orte_rmaps_lama_register(void); -static int orte_rmaps_lama_query(mca_base_module_t **module, int *priority); - -static int module_priority; - -char * rmaps_lama_cmd_map = NULL; -char * rmaps_lama_cmd_bind = NULL; -char * rmaps_lama_cmd_mppr = NULL; -char * rmaps_lama_cmd_ordering = NULL; -bool rmaps_lama_timing_enabled = false; -bool rmaps_lama_can_oversubscribe = false; -bool rmaps_lama_am_oversubscribing = false; - -orte_rmaps_base_component_t mca_rmaps_lama_component = { - .base_version = { - ORTE_RMAPS_BASE_VERSION_2_0_0, - - .mca_component_name = "lama", - MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION, - ORTE_RELEASE_VERSION), - .mca_query_component = orte_rmaps_lama_query, - .mca_register_component_params = orte_rmaps_lama_register, - }, - .base_data = { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - }, -}; - - -static int orte_rmaps_lama_register(void) -{ - mca_base_component_t *c = &mca_rmaps_lama_component.base_version; - - /* JMS Artifically low for now */ - module_priority = 0; - (void) mca_base_component_var_register (c, "priority", "Priority of the LAMA rmaps component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &module_priority); - - rmaps_lama_timing_enabled = false; - (void) mca_base_component_var_register (c, "timing", - "Enable timing information. [Default = disabled]", - MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &rmaps_lama_timing_enabled); - - rmaps_lama_cmd_map = NULL; - (void) mca_base_component_var_register (c, "map", "LAMA Map: Process layout iteration ordering (See documentation)", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_5, - MCA_BASE_VAR_SCOPE_READONLY, - &rmaps_lama_cmd_map); - - rmaps_lama_cmd_bind = NULL; - (void) mca_base_component_var_register (c, "bind", "LAMA Bind: Bind to the specified number of resources (See documentation)", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_5, - MCA_BASE_VAR_SCOPE_READONLY, - &rmaps_lama_cmd_bind); - - rmaps_lama_cmd_mppr = NULL; - (void) mca_base_component_var_register (c, "mppr", "LAMA MPPR: Maximum number of the specified resources available (See documentation)", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_5, - MCA_BASE_VAR_SCOPE_READONLY, - &rmaps_lama_cmd_mppr); - - rmaps_lama_cmd_ordering = NULL; - (void) mca_base_component_var_register (c, "ordering", "LAMA Ordering: Ordering (s) sequential, (n) natural - Default: n (See documentation)", - MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, - OPAL_INFO_LVL_5, - MCA_BASE_VAR_SCOPE_READONLY, - &rmaps_lama_cmd_ordering); - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Priority %3d", - module_priority); - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Map : %s", - (NULL == rmaps_lama_cmd_map) ? "NULL" : rmaps_lama_cmd_map); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Bind : %s", - (NULL == rmaps_lama_cmd_bind) ? "NULL" : rmaps_lama_cmd_bind); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: MPPR : %s", - (NULL == rmaps_lama_cmd_mppr) ? "NULL" : rmaps_lama_cmd_mppr); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Order : %s", - (NULL == rmaps_lama_cmd_ordering) ? "NULL" : rmaps_lama_cmd_ordering); - - return ORTE_SUCCESS; -} - - -static int orte_rmaps_lama_query(mca_base_module_t **module, int *priority) -{ - /* Only run on the HNP */ - - *priority = module_priority; - *module = (mca_base_module_t *)&orte_rmaps_lama_module; - - return ORTE_SUCCESS; -} diff --git a/orte/mca/rmaps/lama/rmaps_lama_max_tree.c b/orte/mca/rmaps/lama/rmaps_lama_max_tree.c deleted file mode 100644 index d14a8207a70..00000000000 --- a/orte/mca/rmaps/lama/rmaps_lama_max_tree.c +++ /dev/null @@ -1,1182 +0,0 @@ -/* - * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. - * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * Max Tree Support Functions - * - */ -#include "rmaps_lama.h" - -#include "orte/util/show_help.h" - -#include "orte/mca/errmgr/errmgr.h" - -#include "orte/mca/rmaps/base/rmaps_private.h" -#include "orte/mca/rmaps/base/base.h" - -/********************************* - * Max Tree Construction - *********************************/ -/* - * Convert an hwloc tree to an opal_tree - */ -static int rmaps_lama_convert_hwloc_tree_to_opal_tree(opal_tree_t *opal_tree, - hwloc_topology_t *hwloc_topo); - -/* - * Convert an hwloc subtree to an opal subtree - */ -static int rmaps_lama_convert_hwloc_subtree(hwloc_obj_t obj, - opal_tree_item_t *parent_item); - -/* - * Convert LAMA key to HWLOC key/depth - */ -static int rmaps_lama_convert_lama_key_to_hwloc_key(rmaps_lama_level_type_t lama_key, - hwloc_obj_type_t *hwloc_key, int *depth); - -/* - * Convert HWLOC key/depth to LAMA key - */ -static int rmaps_lama_convert_hwloc_key_to_lama_key(hwloc_obj_type_t hwloc_key, int depth, - rmaps_lama_level_type_t *lama_key); - -/* - * Compare two HWLOC topologies for similar structure - */ -static int rmaps_lama_hwloc_compare_topos(hwloc_topology_t *left, hwloc_topology_t *right); -static int rmaps_lama_hwloc_compare_subtrees(hwloc_obj_t left, hwloc_obj_t right); - -/* - * Merge two opal_trees - */ -static int rmaps_lama_merge_trees(opal_tree_t *src_tree, opal_tree_t *into_tree, - opal_tree_item_t *src_parent, opal_tree_item_t *into_parent); - -/* - * Prune the max tree to just those levels specified - */ -static int rmaps_lama_prune_max_tree(opal_tree_t *max_tree, opal_tree_item_t *parent_item); - -/* - * Annotate the hwloc tree for MPPR accounting - */ -static int rmaps_lama_annotate_node_for_mppr(orte_node_t *node, hwloc_obj_t obj); - -/* - * Access the MPPR for the specified key - */ -static int rmaps_lama_get_mppr_for_key(orte_node_t *node, rmaps_lama_level_type_t lama_key); - -/* - * Recursive core of nth_subtree_match - */ -static int rmaps_lama_find_nth_subtree_match_core(hwloc_topology_t hwloc_topo, - hwloc_obj_t parent_obj, - int nth, - int *num_found, - hwloc_obj_type_t hwloc_key, - int depth, - hwloc_obj_t *cur_child); - -static void rmaps_lama_max_tree_item_construct(rmaps_lama_max_tree_item_t *item) -{ - item->type = LAMA_LEVEL_UNKNOWN; -} - - -/********************************* - * Max Tree Accessors/Functions - *********************************/ -OBJ_CLASS_INSTANCE(rmaps_lama_max_tree_item_t, - opal_tree_item_t, - rmaps_lama_max_tree_item_construct, NULL); - -static int lama_max_tree_comp(opal_tree_item_t *item, void *key); -static int lama_max_tree_serialize(opal_tree_item_t *item, opal_buffer_t *buffer); -static int lama_max_tree_deserialize(opal_buffer_t *buffer, opal_tree_item_t **item); -static void * lama_max_tree_get_key(opal_tree_item_t *item); - - -/********************************* - * Max Tree Pretty Print - *********************************/ -static char * rmaps_lama_max_tree_pretty_print_subtree_element_get(opal_tree_t *tree, - opal_tree_item_t *parent, - int level); -static void pretty_print_subtree(opal_tree_t *tree, opal_tree_item_t *parent, int level); -static void pretty_print_subtree_element(opal_tree_t *tree, opal_tree_item_t *parent, int level); - - -/********************************* - * Function Defintions - *********************************/ -int rmaps_lama_build_max_tree(orte_job_t *jdata, opal_list_t *node_list, - opal_tree_t * max_tree, bool *is_homogeneous) -{ - int ret; - opal_tree_t *tmp_tree = NULL; - hwloc_topology_t topo, *last_topo = NULL; - orte_node_t *cur_node = NULL; - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Building the Max Tree..."); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - - /* - * Assume homogeneous system, unless otherwise noted - */ - *is_homogeneous = true; - - /* - * Process all other unique trees from remote daemons who are in - * this allocation - */ - for(cur_node = (orte_node_t*)opal_list_get_first(node_list); - cur_node != (orte_node_t*)opal_list_get_end(node_list); - cur_node = (orte_node_t*)opal_list_get_next(cur_node) ) { - if (NULL == (topo = cur_node->topology)) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- No Tree Available: %s (skipping)", cur_node->name); - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Converting Remote Tree: %s", cur_node->name); - - /* - * Convert to opal_tree - */ - tmp_tree = rmaps_lama_create_empty_max_tree(); - rmaps_lama_convert_hwloc_tree_to_opal_tree(tmp_tree, &topo); - if( 11 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - rmaps_lama_max_tree_pretty_print_tree(tmp_tree); - } - - /* - * Compare the current and last topologies if we are still considering - * this max tree to represent a homogeneous system. - */ - if( *is_homogeneous ) { - if( NULL == last_topo ) { - last_topo = &topo; - } else { - if( 0 != rmaps_lama_hwloc_compare_topos(last_topo, &topo) ) { - *is_homogeneous = false; - } - } - } - - /* - * Prune the input tree so that is only contains levels that the user - * asked for. - */ - if( 11 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Pruning input Tree..."); - } - if( ORTE_SUCCESS != (ret = rmaps_lama_prune_max_tree(tmp_tree, opal_tree_get_root(tmp_tree))) ) { - return ret; - } - if( 11 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Input Tree... - Post Prune"); - rmaps_lama_max_tree_pretty_print_tree(tmp_tree); - } - - /* - * Merge into max_tree - */ - if( opal_tree_is_empty(max_tree) ) { - opal_tree_dup(tmp_tree, max_tree); - } else { - if( ORTE_SUCCESS != (ret = rmaps_lama_merge_trees(tmp_tree, - max_tree, - opal_tree_get_root(tmp_tree), - opal_tree_get_root(max_tree) ))) { - return ret; - } - } - - /* - * Release and move on... - */ - OBJ_RELEASE(tmp_tree); - tmp_tree = NULL; - } - - - /* - * Fill out the MPPR accounting information for each node - */ - for(cur_node = (orte_node_t*)opal_list_get_first(node_list); - cur_node != (orte_node_t*)opal_list_get_end(node_list); - cur_node = (orte_node_t*)opal_list_get_next(cur_node) ) { - if( ORTE_SUCCESS != (ret = rmaps_lama_annotate_node_for_mppr(cur_node, - hwloc_get_obj_by_depth(cur_node->topology, 0, 0))) ) { - ORTE_ERROR_LOG(ret); - return ret; - } - } - - /* - * JJH: NEEDS TESTING - * Note: This check is in place, but not used at the moment due to lack of - * system availability. Pending system availability and further testing, - * just assume heterogeneous. - */ - *is_homogeneous = false; - - /* - * Display the final Max Tree - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Final Max Tree... - %s system", - (*is_homogeneous ? "Homogeneous" : "Heterogeneous") ); - if( 11 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - rmaps_lama_max_tree_pretty_print_tree(max_tree); - } - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - - return ORTE_SUCCESS; -} - -static int rmaps_lama_convert_hwloc_tree_to_opal_tree(opal_tree_t *opal_tree, hwloc_topology_t *hwloc_topo) -{ - hwloc_obj_t topo_root; - - if( 15 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - opal_output_verbose(15, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Converting Topology:"); - /* opal_dss.dump(0, opal_hwloc_topology, OPAL_HWLOC_TOPO); */ - opal_dss.dump(0, *hwloc_topo, OPAL_HWLOC_TOPO); - } - - topo_root = hwloc_get_root_obj(*hwloc_topo); - - rmaps_lama_convert_hwloc_subtree(topo_root, - opal_tree_get_root(opal_tree)); - - return ORTE_SUCCESS; -} - -static int rmaps_lama_convert_hwloc_subtree(hwloc_obj_t obj, - opal_tree_item_t *parent_item) -{ - rmaps_lama_max_tree_item_t *max_tree_item = NULL; - char * key_child_str = NULL; - char * key_parent_str = NULL; - - while (obj) { - /* - * Create new tree item - */ - max_tree_item = OBJ_NEW(rmaps_lama_max_tree_item_t); - - /* - * Convert the HWLOC object to the LAMA key - */ - rmaps_lama_convert_hwloc_key_to_lama_key(obj->type, - obj->attr->cache.depth, - &(max_tree_item->type)); - - /* - * Append tree item to parent. Unless it is the same as the - * parent (L1 instruction vs data cache). JJH: Newer versions - * of hwloc can differentiate from the obj->attr->cache.type. - */ - if( NULL != obj->parent && - obj->parent->type == obj->type && - obj->parent->attr->cache.depth == obj->attr->cache.depth ) { - key_child_str = lama_type_enum_to_str(max_tree_item->type); - key_parent_str = lama_type_enum_to_str(((rmaps_lama_max_tree_item_t*)parent_item)->type); - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Warning: Identical level detected: " - "Child [%s] vs Parent [%s]", - key_child_str, key_parent_str); - free(key_child_str); - free(key_parent_str); - - /* - * Add descendants if they exist - */ - if (obj->first_child) { - rmaps_lama_convert_hwloc_subtree(obj->first_child, - parent_item); - } - } else { - opal_tree_add_child(parent_item, &max_tree_item->tree_element); - - /* - * Add descendants if they exist - */ - if (obj->first_child) { - rmaps_lama_convert_hwloc_subtree(obj->first_child, - &max_tree_item->tree_element); - } - } - - /* - * Advance to next sibling - */ - obj = obj->next_sibling; - } - - return ORTE_SUCCESS; -} - -static int rmaps_lama_annotate_node_for_mppr(orte_node_t *node, hwloc_obj_t obj) -{ - rmaps_lama_hwloc_user_t *hwloc_userdata = NULL; - rmaps_lama_node_mppr_t *mppr_accounting = NULL; - rmaps_lama_level_type_t lama_key; - opal_hwloc_topo_data_t *opal_hwloc_topo = NULL; - int i; - - /* - * Attach our user pointer to the topology, if it is not already there. - * We will fill it in as needed later. - * - * Note: opal/mca/hwloc/base/hwloc_base_util.c attaches their own object - * to the userdata. There is a pointer in that structure we can use without - * interfering with what OPAL is trying to do. - */ - if( NULL == obj->userdata ) { - /* Some objects may not have topo data associated with them - * JJH: This is memory leak :/ Fix. - */ - obj->userdata = (void*)OBJ_NEW(opal_hwloc_topo_data_t); - } - if( NULL != obj->userdata ) { - opal_hwloc_topo = (opal_hwloc_topo_data_t*)(obj->userdata); - - if( NULL == opal_hwloc_topo->userdata ) { - hwloc_userdata = OBJ_NEW(rmaps_lama_hwloc_user_t); - opal_hwloc_topo->userdata = hwloc_userdata; - } else { - hwloc_userdata = (rmaps_lama_hwloc_user_t*)(opal_hwloc_topo->userdata); - } - } - - - /* - * Add node information if it is not already there - */ - mppr_accounting = (rmaps_lama_node_mppr_t*)opal_pointer_array_get_item(hwloc_userdata->node_mppr, node->index); - if( NULL == mppr_accounting ) { - /* - * Add MPPR accounting for this node associated with this object - */ - rmaps_lama_convert_hwloc_key_to_lama_key(obj->type, obj->attr->cache.depth, &lama_key); - - mppr_accounting = (rmaps_lama_node_mppr_t*)malloc(sizeof(rmaps_lama_node_mppr_t)); - mppr_accounting->max = rmaps_lama_get_mppr_for_key(node, lama_key); - mppr_accounting->cur = 0; - - opal_pointer_array_set_item(hwloc_userdata->node_mppr, node->index, mppr_accounting); - } - - - /* - * Decend tree - */ - for(i = 0; i < (int)obj->arity; ++i ) { - rmaps_lama_annotate_node_for_mppr(node, - obj->children[i]); - } - - return ORTE_SUCCESS; -} - -static int rmaps_lama_get_mppr_for_key(orte_node_t *node, rmaps_lama_level_type_t lama_key) -{ - int i; - - for( i = 0; i < lama_mppr_num_levels; ++i ) { - if( lama_key == lama_mppr_levels[i].type ) { - return lama_mppr_levels[i].max_resources; - } - } - - return -1; -} - -static int rmaps_lama_convert_lama_key_to_hwloc_key(rmaps_lama_level_type_t lama_key, hwloc_obj_type_t *hwloc_key, int *depth) -{ - *depth = 0; - - switch(lama_key) { - case LAMA_LEVEL_MACHINE: - *hwloc_key = HWLOC_OBJ_MACHINE; - break; - /* Note: HWLOC does not support boards */ -#if 0 - case LAMA_LEVEL_BOARD: - *hwloc_key = HWLOC_OBJ_MACHINE; - break; -#endif - case LAMA_LEVEL_SOCKET: - *hwloc_key = HWLOC_OBJ_SOCKET; - break; - case LAMA_LEVEL_CORE: - *hwloc_key = HWLOC_OBJ_CORE; - break; - case LAMA_LEVEL_PU: - *hwloc_key = HWLOC_OBJ_PU; - break; - case LAMA_LEVEL_CACHE_L1: - *hwloc_key = HWLOC_OBJ_CACHE; - *depth = 1; - break; - case LAMA_LEVEL_CACHE_L2: - *hwloc_key = HWLOC_OBJ_CACHE; - *depth = 2; - break; - case LAMA_LEVEL_CACHE_L3: - *hwloc_key = HWLOC_OBJ_CACHE; - *depth = 3; - break; - case LAMA_LEVEL_NUMA: - *hwloc_key = HWLOC_OBJ_NODE; - break; - default: - *hwloc_key = HWLOC_OBJ_TYPE_MAX; - break; - } - - return ORTE_SUCCESS; -} - -static int rmaps_lama_convert_hwloc_key_to_lama_key(hwloc_obj_type_t hwloc_key, int depth, rmaps_lama_level_type_t *lama_key) -{ - switch(hwloc_key) { - case HWLOC_OBJ_MACHINE: - *lama_key = LAMA_LEVEL_MACHINE; - break; - /* Node: HWLOC does not support boards */ -#if 0 - case HWLOC_OBJ_BOARD: - *lama_key = LAMA_LEVEL_BOARD; - break; -#endif - case HWLOC_OBJ_SOCKET: - *lama_key = LAMA_LEVEL_SOCKET; - break; - case HWLOC_OBJ_CORE: - *lama_key = LAMA_LEVEL_CORE; - break; - case HWLOC_OBJ_PU: - *lama_key = LAMA_LEVEL_PU; - break; - case HWLOC_OBJ_CACHE: - if( 1 == depth ) { - *lama_key = LAMA_LEVEL_CACHE_L1; - } - else if( 2 == depth ) { - *lama_key = LAMA_LEVEL_CACHE_L2; - } - else if( 3 == depth ) { - *lama_key = LAMA_LEVEL_CACHE_L3; - } - else { - *lama_key = LAMA_LEVEL_UNKNOWN; - } - break; - case HWLOC_OBJ_NODE: - *lama_key = LAMA_LEVEL_NUMA; - break; - default: - *lama_key = LAMA_LEVEL_UNKNOWN; - break; - } - - return ORTE_SUCCESS; -} - -static int rmaps_lama_hwloc_compare_topos(hwloc_topology_t *left, hwloc_topology_t *right) -{ - hwloc_obj_t left_root; - hwloc_obj_t right_root; - - /* - * Note: I hope that there is a 'better' way of doing this natively with - * HWLOC, but it is not obvious if they have the ability to compare - * topologies. So do a depth first comparison of the trees. - * You may be able to use the below: - * OPAL_EQUAL != opal_dss.compare(*last_topo, topo, OPAL_HWLOC_TOPO); - */ - - left_root = hwloc_get_obj_by_depth(*left, 0, 0); - right_root = hwloc_get_obj_by_depth(*right, 0, 0); - - return rmaps_lama_hwloc_compare_subtrees(left_root, right_root); -} - -static int rmaps_lama_hwloc_compare_subtrees(hwloc_obj_t left, hwloc_obj_t right) -{ - int i, ret; - - /* - * Check Types - */ - if( 0 != (ret = hwloc_compare_types(left->type, right->type)) ) { - return ret; - } - - /* - * Check 'arity' at this level - */ - if( left->arity > right->arity ) { - return -1; - } - else if( left->arity < right->arity ) { - return 1; - } - - /* - * Check all subtrees - */ - for(i = 0; i < (int)left->arity; ++i ) { - if( 0 != (ret = rmaps_lama_hwloc_compare_subtrees(left->children[i], - right->children[i])) ) { - return ret; - } - } - - /* - * Subtree is the same if we get here - */ - return 0; -} - -static int rmaps_lama_merge_trees(opal_tree_t *src_tree, opal_tree_t *max_tree, - opal_tree_item_t *src_parent, opal_tree_item_t *max_parent) -{ - int ret, exit_status = ORTE_SUCCESS; - rmaps_lama_level_type_t *key_src, *key_max; - opal_tree_item_t *child_item = NULL, *max_grandparent = NULL; - opal_tree_item_t *max_child_item = NULL; - int num_max, num_src; - int i; - char *key_src_str = NULL; - char *key_max_str = NULL; -#if 1 - char *str = NULL; -#endif - - /* - * Basecase - */ - if( NULL == src_parent ) { - return ORTE_SUCCESS; - } - - key_src = (rmaps_lama_level_type_t*)src_tree->get_key(src_parent); - key_max = (rmaps_lama_level_type_t*)max_tree->get_key(max_parent); - - key_src_str = lama_type_enum_to_str(*key_src); - key_max_str = lama_type_enum_to_str(*key_max); - - if( 15 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: CHECK: Merge Trees: Keys Src (%2d - %s) vs Max (%2d - %s)", - *key_src, key_src_str, *key_max, key_max_str); - } - - /* - * Make sure keys at this level match. - * - * JJH: Give up if they do not match. - * JJH: We should pick a victim and prune from the tree - * JJH: preferably from the 'native' tree. - */ - if( 0 != max_tree->comp(max_parent, src_tree->get_key(src_parent)) ) { - /* - * If the source conflicts due to cache, iterate to children to find a match. - * JJH: Double check this for different heterogenous systems - */ - if( LAMA_LEVEL_CACHE_L3 == *key_src || - LAMA_LEVEL_CACHE_L2 == *key_src || - LAMA_LEVEL_CACHE_L1 == *key_src || - LAMA_LEVEL_NUMA == *key_src ) { - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Warning: Merge Trees: " - "Src with Conflicting Memory Hierarchy [Src (%2d - %s) vs Max (%2d - %s)]", - *key_src, key_src_str, *key_max, key_max_str); - - /* - * If we are pruning a cache level, then check to make sure it is - * not important to the process layout. - */ - if( !rmaps_lama_ok_to_prune_level(*key_src) ) { - orte_show_help("help-orte-rmaps-lama.txt", - "orte-rmaps-lama:merge-conflict-bad-prune-src", - true, - key_src_str, - (NULL == rmaps_lama_cmd_map ? "[Not Provided]" : rmaps_lama_cmd_map), - (NULL == rmaps_lama_cmd_bind ? "[Not Provided]" : rmaps_lama_cmd_bind), - (NULL == rmaps_lama_cmd_mppr ? "[Not Provided]" : rmaps_lama_cmd_mppr), - (NULL == rmaps_lama_cmd_ordering ? "[Not Provided]" : rmaps_lama_cmd_ordering)); - exit_status = ORTE_ERROR; - goto cleanup; - } - - /* - * If the number of children at this pruned level was larger than - * the max tree arity at this level, then duplicate the max_tree - * element the approprate number of times - */ - max_grandparent = opal_tree_get_parent(max_parent); - num_max = opal_tree_num_children(max_grandparent); - num_src = opal_tree_num_children(src_parent); - - for(i = 0; i < (num_src - num_max); ++i ) { -#if 1 - str = rmaps_lama_max_tree_pretty_print_subtree_element_get(max_tree, max_parent, 0); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Merge: Appending child %s - post prune", - str); - free(str); -#endif - /* Duplicate max child subtree */ - opal_tree_copy_subtree(max_tree, max_parent, max_tree, max_grandparent); - } - - /* - * Iterate to children, until we find a match - */ - for(child_item = opal_tree_get_first_child(src_parent); - child_item != NULL; - child_item = opal_tree_get_next_sibling(child_item) ) { - - if( ORTE_SUCCESS != (ret = rmaps_lama_merge_trees(src_tree, - max_tree, - child_item, - max_parent)) ) { - exit_status = ret; - goto cleanup; - } - } - - exit_status = ORTE_SUCCESS; - goto cleanup; - } - /* - * If the max tree conflicts due to cache, then we need to prune the - * max tree until it matches. - * JJH: If we are pruning a level of the hierarchy then make sure we - * JJH: don't need it for the process layout. - */ - else if( LAMA_LEVEL_CACHE_L3 == *key_max || - LAMA_LEVEL_CACHE_L2 == *key_max || - LAMA_LEVEL_CACHE_L1 == *key_max || - LAMA_LEVEL_NUMA == *key_max ) { - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Warning: Merge Trees: " - "Max with Conflicting Memory Hierarchy [Src (%2d - %s) vs Max (%2d - %s)]", - *key_src, key_src_str, *key_max, key_max_str); - - /* - * If we are pruning a cache level, then check to make sure it is - * not important to the process layout. - */ - if( !rmaps_lama_ok_to_prune_level(*key_max) ) { - orte_show_help("help-orte-rmaps-lama.txt", - "orte-rmaps-lama:merge-conflict-bad-prune-src", - true, - key_max_str, - (NULL == rmaps_lama_cmd_map ? "[Not Provided]" : rmaps_lama_cmd_map), - (NULL == rmaps_lama_cmd_bind ? "[Not Provided]" : rmaps_lama_cmd_bind), - (NULL == rmaps_lama_cmd_mppr ? "[Not Provided]" : rmaps_lama_cmd_mppr), - (NULL == rmaps_lama_cmd_ordering ? "[Not Provided]" : rmaps_lama_cmd_ordering)); - exit_status = ORTE_ERROR; - goto cleanup; - } - - max_child_item = opal_tree_get_first_child(max_parent); - /* Prune parent */ - opal_tree_remove_item(max_tree, max_parent); - - /* Try again with child */ - exit_status = rmaps_lama_merge_trees(src_tree, - max_tree, - src_parent, - max_child_item); - goto cleanup; - } - - /* - * If we cannot resolve it, give up. - */ - opal_output(0, "mca:rmaps:lama: Error: Merge Trees: " - "Different Keys Src (%2d - %s) vs Max (%2d - %s) - Do not know how to resolve - give up!", - *key_src, key_src_str, *key_max, key_max_str); - - exit_status = ORTE_ERROR; - goto cleanup; - } - - num_max = opal_tree_num_children(max_parent); - num_src = opal_tree_num_children(src_parent); - - /* - * If the 'native' tree has more children than the 'max' tree. - * Add the missing children to the 'max' tree. - */ - if( num_max < num_src ) { - i = 0; - for(child_item = opal_tree_get_first_child(src_parent); - child_item != NULL; - child_item = opal_tree_get_next_sibling(child_item)) { - if(i >= num_max ) { -#if 1 - str = rmaps_lama_max_tree_pretty_print_subtree_element_get(src_tree, child_item, 0); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Merge: Appending child %s", - str); - free(str); -#endif - /* Add child's subtree to max */ - opal_tree_copy_subtree(src_tree, child_item, max_tree, max_parent); - } - ++i; - } - } - - /* - * Recursively search all children of 'native' tree. - * - * Note: Only need to add the children to the 'left-most' branch of the - * 'max' tree since that is the only branch that is searched during mapping. - * But do the whole thing for good measure. - */ - for( child_item = opal_tree_get_first_child(src_parent), - max_child_item = opal_tree_get_first_child(max_parent); - child_item != NULL; - child_item = opal_tree_get_next_sibling(child_item), - max_child_item = opal_tree_get_next_sibling(max_child_item) ) { - - if( ORTE_SUCCESS != (ret = rmaps_lama_merge_trees(src_tree, - max_tree, - child_item, - max_child_item)) ) { - exit_status = ret; - goto cleanup; - } - } - - cleanup: - if( NULL != key_src_str ) { - free(key_src_str); - key_src_str = NULL; - } - - if( NULL != key_max_str ) { - free(key_max_str); - key_max_str = NULL; - } - - return exit_status; -} - -static int rmaps_lama_prune_max_tree(opal_tree_t *max_tree, opal_tree_item_t *parent_item) -{ - int ret; - opal_tree_item_t *child_item = NULL, *next_item; - int i; - bool found; - rmaps_lama_level_type_t *key_max; - char *tmp_str = NULL; - - /* - * Basecase - */ - if( NULL == parent_item ) { - return ORTE_SUCCESS; - } - - /* - * Recursively decend tree - Depth first - * Basecase: No children, loop skipped - */ - child_item = opal_tree_get_first_child(parent_item); - while( child_item != NULL ) { - /* Do this before the recursive call, since it might remove this - * child so we need to preserve a pointer to the next sibling. - */ - next_item = opal_tree_get_next_sibling(child_item); - - if( ORTE_SUCCESS != (ret = rmaps_lama_prune_max_tree(max_tree, - child_item)) ) { - return ret; - } - - child_item = next_item; - } - - key_max = (rmaps_lama_level_type_t*)max_tree->get_key(parent_item); - - /* - * Check keys against the user supplied layout - */ - found = false; - for(i = 0; i < lama_mapping_num_layouts; ++i ) { - if( 0 == max_tree->comp(parent_item, &lama_mapping_layout[i]) ) { - found = true; - break; - } - } - - if( !found ) { - if( 15 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - tmp_str = lama_type_enum_to_str(*key_max); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Before pruning %s", - tmp_str); - free(tmp_str); - rmaps_lama_max_tree_pretty_print_tree(max_tree); - } - - opal_tree_remove_item(max_tree, parent_item); - - return ORTE_SUCCESS; - } - - return ORTE_SUCCESS; -} - - -hwloc_obj_t * rmaps_lama_find_nth_subtree_match(hwloc_topology_t hwloc_topo, - hwloc_obj_t parent_obj, - int nth, - rmaps_lama_level_type_t lama_key) -{ - hwloc_obj_t *cur_child = NULL; - hwloc_obj_type_t hwloc_key; - int depth; - int num_found; -#if 0 - char str[128]; -#endif - - cur_child = (hwloc_obj_t*)malloc(sizeof(hwloc_obj_t) * 1); - - /* - * Convert LAMA key to HWLOC key - */ - rmaps_lama_convert_lama_key_to_hwloc_key(lama_key, &hwloc_key, &depth); - - /* - * Decend tree looking for the n'th matching subtree - */ - num_found = -1; - rmaps_lama_find_nth_subtree_match_core(hwloc_topo, - parent_obj, - nth, - &num_found, - hwloc_key, - depth, - cur_child); - - /* - * Check to see if we found it - */ -#if 0 - hwloc_obj_snprintf(str, sizeof(str), hwloc_topo, *cur_child, "#", 0); - if( nth == num_found ) { - printf("--> FOUND : %-20s \t -- \t %2d of %2d\n", str, nth, num_found); - } - else { - printf("--> MISSING : %-20s \t -- \t %2d of %2d\n", str, nth, num_found); - } -#endif - - if( nth == num_found ) { - return cur_child; - } - else { - free(cur_child); - return NULL; - } -} - -static int rmaps_lama_find_nth_subtree_match_core(hwloc_topology_t hwloc_topo, - hwloc_obj_t parent_obj, - int nth, - int *num_found, - hwloc_obj_type_t hwloc_key, - int depth, - hwloc_obj_t *cur_child) -{ - unsigned i; - bool found = false; - -#if 0 - { - char str[128]; - hwloc_obj_snprintf(str, sizeof(str), hwloc_topo, parent_obj, "#", 0); - printf("--> Checking -- %-20s \t -- \t %2d of %2d\n", str, nth, *num_found); - } -#endif - - /* - * Check if the keys match - */ - if( hwloc_key == parent_obj->type ) { - if( HWLOC_OBJ_CACHE == parent_obj->type && - depth == (int)parent_obj->attr->cache.depth ) { - *num_found += 1; - found = true; - } else { - *num_found += 1; - found = true; - } - } - - /* - * Basecase: - * If we have found the correct item, return - */ - if( nth == *num_found ) { - *cur_child = parent_obj; - return ORTE_SUCCESS; - } - - /* - * Do no go any deeper in the tree than we have to - */ - if( !found ) { - for(i = 0; i < parent_obj->arity; ++i ) { - rmaps_lama_find_nth_subtree_match_core(hwloc_topo, - parent_obj->children[i], - nth, - num_found, - hwloc_key, - depth, - cur_child); - if( nth == *num_found ) { - return ORTE_SUCCESS; - } - } - } - - return ORTE_SUCCESS; -} - -hwloc_obj_t * rmaps_lama_find_parent(hwloc_topology_t hwloc_topo, - hwloc_obj_t *child_obj, - rmaps_lama_level_type_t lama_key) -{ - hwloc_obj_t *cur_parent = NULL; - hwloc_obj_type_t hwloc_key; - int depth; - - /* - * Convert LAMA key to HWLOC key - */ - rmaps_lama_convert_lama_key_to_hwloc_key(lama_key, &hwloc_key, &depth); - - /* - * Sanity check - */ - if( hwloc_key == (*child_obj)->type ) { - if( HWLOC_OBJ_CACHE == (*child_obj)->type && - depth == (int)(*child_obj)->attr->cache.depth ) { - return child_obj; - } else { - return child_obj; - } - } - - cur_parent = (hwloc_obj_t*)malloc(sizeof(hwloc_obj_t) * 1); - if (NULL == cur_parent) { - return NULL; - } - - /* - * Accend tree to find mathing parent - */ - *cur_parent = (*child_obj)->parent; - while(NULL != *cur_parent ) { - if( hwloc_key == (*cur_parent)->type ) { - if( HWLOC_OBJ_CACHE == (*cur_parent)->type && - depth == (int)(*cur_parent)->attr->cache.depth ) { - return cur_parent; - } else { - return cur_parent; - } - } - - *cur_parent = (*cur_parent)->parent; - } - - free(cur_parent); - return NULL; -} - - -/********************************* - * Max Tree Structure Functions - *********************************/ -opal_tree_t * rmaps_lama_create_empty_max_tree(void) -{ - opal_tree_t *tmp_tree = NULL; - - tmp_tree = OBJ_NEW(opal_tree_t); - opal_tree_init(tmp_tree, - &lama_max_tree_comp, - &lama_max_tree_serialize, - &lama_max_tree_deserialize, - &lama_max_tree_get_key); - - return tmp_tree; -} - -static int lama_max_tree_comp(opal_tree_item_t *item, void *key) -{ - if( ((rmaps_lama_max_tree_item_t *)item)->type == *((rmaps_lama_level_type_t *)key) ) { - return 0; - } - - return -1; -} - -static int lama_max_tree_serialize(opal_tree_item_t *item, opal_buffer_t *buffer) -{ - opal_dss.pack(buffer, &(((rmaps_lama_max_tree_item_t *)item)->type), 1, OPAL_INT); - - return ORTE_SUCCESS; -} - -static int lama_max_tree_deserialize(opal_buffer_t *buffer, opal_tree_item_t **item) -{ - rmaps_lama_max_tree_item_t *element; - orte_std_cntr_t n = 1; - - element = OBJ_NEW(rmaps_lama_max_tree_item_t); - if( OPAL_SUCCESS == opal_dss.unpack(buffer, &(element->type), &n, OPAL_INT) ) { - *item = (opal_tree_item_t*)element; - } else { - *item = NULL; - } - - return ORTE_SUCCESS; -} - -static void * lama_max_tree_get_key(opal_tree_item_t *item) -{ - return &(((rmaps_lama_max_tree_item_t *)item)->type); -} - - -/********************************* - * Pretty Print Functions - *********************************/ -void rmaps_lama_max_tree_pretty_print_tree(opal_tree_t *tree) -{ - if( NULL == tree ) { - return; - } - - if( opal_tree_is_empty(tree) ) { - return; - } - - pretty_print_subtree(tree, opal_tree_get_root(tree), 0); - - return; -} - -static char * rmaps_lama_max_tree_pretty_print_subtree_element_get(opal_tree_t *tree, - opal_tree_item_t *parent, - int level) -{ - char *element_str = NULL; - char *spacer = NULL; - char *label = NULL; - rmaps_lama_level_type_t *type = NULL; - int i; - - if( NULL == parent ) { - return NULL; - } - - spacer = (char *)malloc(sizeof(char) * (level+1)); - for(i = 0; i < level; ++i ) { - spacer[i] = ' '; - } - spacer[level] = '\0'; - - type = (rmaps_lama_level_type_t *)(tree->get_key(parent)); - label = lama_type_enum_to_str(*type); - - asprintf(&element_str, "%s[%s \t : %3d, %3d", - spacer, label, - parent->opal_tree_num_children, parent->opal_tree_num_ancestors); - - free(spacer); - free(label); - - return element_str; -} - -static void pretty_print_subtree(opal_tree_t *tree, opal_tree_item_t *parent, int level) -{ - opal_tree_item_t *child = NULL; - - if( NULL == parent ) { - return; - } - - /* - * Display Self - */ - pretty_print_subtree_element(tree, parent, level); - - /* - * Depth-first display children - * Basecase; If no children - return - */ - level++; - for(child = opal_tree_get_first_child(parent); - child != NULL; - child = opal_tree_get_next_sibling(child) ) { - pretty_print_subtree(tree, child, level); - } - - return; - -} - -static void pretty_print_subtree_element(opal_tree_t *tree, opal_tree_item_t *parent, int level) -{ - char *element_str = NULL; - - if( NULL == parent ) { - return; - } - - element_str = rmaps_lama_max_tree_pretty_print_subtree_element_get(tree, parent, level); - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Tree Element: %s", - element_str); - - free(element_str); - - return; -} diff --git a/orte/mca/rmaps/lama/rmaps_lama_module.c b/orte/mca/rmaps/lama/rmaps_lama_module.c deleted file mode 100644 index c200d414d87..00000000000 --- a/orte/mca/rmaps/lama/rmaps_lama_module.c +++ /dev/null @@ -1,1916 +0,0 @@ -/* - * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. - * - * Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" -#include "orte/types.h" - -#include -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H -#include -#endif /* HAVE_STRING_H */ - -#include "opal/mca/hwloc/hwloc.h" - -#include "opal/util/argv.h" -#include "opal/class/opal_tree.h" - -#include "orte/util/show_help.h" -#include "orte/util/error_strings.h" - -#include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/rmaps/base/rmaps_private.h" -#include "orte/mca/rmaps/base/base.h" - -#include "orte/runtime/orte_globals.h" - -#include "rmaps_lama.h" - -#include MCA_timer_IMPLEMENTATION_HEADER - - -/********************************* - * Module setup - *********************************/ -static int orte_rmaps_lama_map(orte_job_t *jdata); -orte_rmaps_base_module_t orte_rmaps_lama_module = { - orte_rmaps_lama_map -}; - - -/********************************* - * Timer - *********************************/ -#define RMAPS_LAMA_TIMER_TOTAL 0 -#define RMAPS_LAMA_TIMER_PARSE_PARAMS 1 -#define RMAPS_LAMA_TIMER_BUILD_MAX_TREE 2 -#define RMAPS_LAMA_TIMER_MAPPING 3 -#define RMAPS_LAMA_TIMER_ORDERING 4 -#define RMAPS_LAMA_TIMER_MAX 5 - -static double rmaps_lama_get_time(void); -static void rmaps_lama_set_time(int idx, bool is_start); -static void rmaps_lama_display_all_timers(void); -static void rmaps_lama_clear_timers(void); -static void rmaps_lama_display_indv_timer_core(double diff, char *str); - -static double timer_start[RMAPS_LAMA_TIMER_MAX]; -static double timer_end[RMAPS_LAMA_TIMER_MAX]; -static double timer_accum[RMAPS_LAMA_TIMER_MAX]; - -#define RMAPS_LAMA_CLEAR_TIMERS() \ - { \ - if( rmaps_lama_timing_enabled ) { \ - rmaps_lama_clear_timers(); \ - } \ - } -#define RMAPS_LAMA_START_TIMER(idx) \ - { \ - if( rmaps_lama_timing_enabled ) { \ - rmaps_lama_set_time(idx, true); \ - } \ - } -#define RMAPS_LAMA_END_TIMER(idx) \ - { \ - if( rmaps_lama_timing_enabled ) { \ - rmaps_lama_set_time(idx, false); \ - } \ - } -#define RMAPS_LAMA_DISPLAY_TIMERS() \ - { \ - if( rmaps_lama_timing_enabled ) { \ - rmaps_lama_display_all_timers(); \ - } \ - } - - -/********************************* - * Structures & Defines - *********************************/ -static void rmaps_lama_hwloc_user_construct(rmaps_lama_hwloc_user_t *item); -static void rmaps_lama_hwloc_user_destruct(rmaps_lama_hwloc_user_t *item); - -OBJ_CLASS_INSTANCE(rmaps_lama_hwloc_user_t, - opal_object_t, - rmaps_lama_hwloc_user_construct, - rmaps_lama_hwloc_user_destruct); - - -/********************************* - * Globals - *********************************/ -/* - * Mapping - */ -rmaps_lama_level_type_t *lama_mapping_layout = NULL; -static rmaps_lama_level_type_t *lama_mapping_layout_sort = NULL; -int lama_mapping_num_layouts = 0; - -/* - * Binding - */ -rmaps_lama_level_type_t lama_binding_level = LAMA_LEVEL_UNKNOWN; -static int lama_binding_num_levels = 0; - -/* - * MPPR - */ -rmaps_lama_level_info_t *lama_mppr_levels = NULL; -int lama_mppr_num_levels = 0; - -/* - * Ordering - */ -static rmaps_lama_order_type_t lama_ordering = LAMA_ORDER_NATURAL; - -/* - * Homogeneous system optimization - */ -bool lama_mppr_max_tree_homogeneous_system = false; - - -/********************************* - * Support Macros - *********************************/ - - -/********************************* - * Support functions - *********************************/ -/* - * Preprocess the command line arguments - */ -static int orte_rmaps_lama_process_params(orte_job_t *jdata); - -/* - * Mapping Support: - * Core mapping function - */ -static int orte_rmaps_lama_map_core(orte_job_t *jdata); - -/* - * Mapping Support: - * Recursive function for mapping process - */ -static int rmaps_lama_map_core_iter_level(orte_job_t *jdata, - orte_app_context_t *cur_app_context, - opal_list_t *node_list, - orte_node_t **cur_mach_ptr, - opal_tree_t *max_tree, - int cur_level, - int mach_level, - int **pu_idx_ref, - int **last_pu_idx_ref, - int *num_mapped, - int max_procs, - int *iter_passes); - -/* - * Mapping Support: - * Access the next machine in the node list - */ -static orte_node_t* get_next_machine(orte_job_t *jdata, opal_list_t *node_list, - opal_list_item_t *cur_mach); - -/* - * Mapping Support: - * Check the availability of the requested slot on the specified node - */ -static int check_node_availability(orte_node_t *cur_node, - opal_tree_t *max_tree, - int *pu_idx_ref, - char **slot_list); - -/* - * Mapping Support: - * Debugging PU display - */ -static void display_pu_ref(int *ref, int size, int rank, orte_proc_t *proc); -static char * pu_ref_to_str(int *ref, int size); - -/* - * Mapping Support: - * Convert the process layout 'layer' to the sorted position for the PU - */ -static int convert_layer_to_sort_idx(rmaps_lama_level_type_t layer); - -/* - * MPPR Support: - * Check to make sure a process can be placed on this resource given the - * MPPR restrictions. - */ -static int rmaps_lama_check_mppr(orte_node_t *node, - hwloc_obj_t *child_obj); -static int rmaps_lama_iter_mppr_parents(orte_node_t *node, - hwloc_obj_t *child_obj, - bool check_only); -static int rmaps_lama_iter_mppr_children(orte_node_t *node, - hwloc_obj_t *child_obj, - bool check_only); - -/* - * MPPR Support: - * Increment parents of this child to account for a process being placed - * on this resource. - */ -static int rmaps_lama_inc_mppr(orte_node_t *node, - hwloc_obj_t *child_obj); - -/* - * Mapping Support: - * Return the native representation of the slot list - */ -static char * get_native_slot_list(orte_node_t *cur_node, - hwloc_obj_t *pu_obj, - int *put_idx_ref); - -/* - * Ordering Support: - * Reorder sequentially - */ -static int rmaps_lama_ordering_sequential(orte_job_t *jdata); - -/* - * Map a single process to a specific node - */ -static int orte_rmaps_lama_map_process(orte_job_t *jdata, - orte_node_t *node, - int app_idx, - orte_proc_t **proc); - -/********************************* - * Main Module function to map a job - *********************************/ -static int orte_rmaps_lama_map(orte_job_t *jdata) -{ - int ret, exit_status = ORTE_SUCCESS; - mca_base_component_t *loc_comp = &mca_rmaps_lama_component.base_version; - - RMAPS_LAMA_CLEAR_TIMERS(); - RMAPS_LAMA_START_TIMER(RMAPS_LAMA_TIMER_TOTAL); - - /* - * Sanity Check: - * If we are not the 'chosen' mapper, then exit here - */ - if (NULL != jdata->map->req_mapper && - 0 != strcasecmp(jdata->map->req_mapper, loc_comp->mca_component_name)) { - /* a mapper has been specified, and it isn't me */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: job %s not using lama mapper (using %s)", - ORTE_JOBID_PRINT(jdata->jobid), - jdata->map->req_mapper); - return ORTE_ERR_TAKE_NEXT_OPTION; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Mapping job %s", - ORTE_JOBID_PRINT(jdata->jobid)); - - /* - * Identify this as the mapper responsible for this job - */ - if (NULL != jdata->map->last_mapper) { - free(jdata->map->last_mapper); - } - jdata->map->last_mapper = strdup(loc_comp->mca_component_name); - - /* - * Start at the beginning... - */ - jdata->num_procs = 0; - - /* - * Process the command line arguments - */ - RMAPS_LAMA_START_TIMER(RMAPS_LAMA_TIMER_PARSE_PARAMS); - if( ORTE_SUCCESS != (ret = orte_rmaps_lama_process_params(jdata)) ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - RMAPS_LAMA_END_TIMER(RMAPS_LAMA_TIMER_PARSE_PARAMS); - - /* - * Actually map the job - */ - if( ORTE_SUCCESS != (ret = orte_rmaps_lama_map_core(jdata)) ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - - /* - * All Done - */ - - RMAPS_LAMA_END_TIMER(RMAPS_LAMA_TIMER_TOTAL); - RMAPS_LAMA_DISPLAY_TIMERS(); - - - cleanup: - if( NULL != lama_mapping_layout ) { - free(lama_mapping_layout); - lama_mapping_layout = NULL; - } - - if( NULL != lama_mapping_layout_sort ) { - free(lama_mapping_layout_sort); - lama_mapping_layout_sort = NULL; - } - - if( NULL != lama_mppr_levels ) { - free(lama_mppr_levels); - lama_mppr_levels = NULL; - } - - return exit_status; -} - - -/********************************* - * User defined lookup structure for hwloc topology - *********************************/ -static void rmaps_lama_hwloc_user_construct(rmaps_lama_hwloc_user_t *item) -{ - item->node_mppr = OBJ_NEW(opal_pointer_array_t); - opal_pointer_array_init(item->node_mppr, - ORTE_GLOBAL_ARRAY_BLOCK_SIZE, - ORTE_GLOBAL_ARRAY_MAX_SIZE, - ORTE_GLOBAL_ARRAY_BLOCK_SIZE); -} - -static void rmaps_lama_hwloc_user_destruct(rmaps_lama_hwloc_user_t *item) -{ - orte_std_cntr_t i; - - if( NULL != item->node_mppr ) { - for(i = 0; i < item->node_mppr->size; ++i) { - if( NULL != item->node_mppr->addr[i] ) { - OBJ_RELEASE(item->node_mppr->addr[i]); - item->node_mppr->addr[i] = NULL; - } - } - OBJ_RELEASE(item->node_mppr); - item->node_mppr = NULL; - } -} - - -/********************************* - * Command line parameter parsing functions - *********************************/ -static int orte_rmaps_lama_process_params(orte_job_t *jdata) -{ - int ret, i; - char *type_str = NULL; - - /* - * Process map/bind/order/mppr aliases. It will print its own - * error message if something went wrong. - */ - if( ORTE_SUCCESS != (ret = rmaps_lama_process_alias_params(jdata) ) ) { - ORTE_ERROR_LOG(ret); - return ret; - } - - /* - * Parse: Binding. It will print its own error message if - * something goes wrong. - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Binding : [%s]", - rmaps_lama_cmd_bind); - if( ORTE_SUCCESS != (ret = rmaps_lama_parse_binding(rmaps_lama_cmd_bind, - &lama_binding_level, - &lama_binding_num_levels)) ) { - ORTE_ERROR_LOG(ret); - return ret; - } - - if( 10 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - type_str = lama_type_enum_to_str(lama_binding_level); - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Binding : %*d x %10s", - MAX_BIND_DIGIT_LEN, lama_binding_num_levels, type_str); - free(type_str); - type_str = NULL; - } - /* Reset the binding option since we are going to do it ourselves */ - OPAL_SET_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NONE); - - /* - * Parse: Mapping from Process Layout string. It will print its - * own error message if something goes wrong. - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Mapping : [%s]", - rmaps_lama_cmd_map); - if( ORTE_SUCCESS != (ret = rmaps_lama_parse_mapping(rmaps_lama_cmd_map, - &lama_mapping_layout, - &lama_mapping_layout_sort, - &lama_mapping_num_layouts)) ) { - ORTE_ERROR_LOG(ret); - return ret; - } - - if( 10 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - for( i = 0; i < lama_mapping_num_layouts; ++i ) { - type_str = lama_type_enum_to_str(lama_mapping_layout[i]); - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Mapping : (%d) %10s (%d vs %d)", - i, type_str, - lama_mapping_layout[i], lama_mapping_layout_sort[i]); - free(type_str); - type_str = NULL; - } - } - - /* - * Parse: MPPR. It will print its own error message if something - * goes wrong. - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- MPPR : [%s]", - rmaps_lama_cmd_mppr); - if( ORTE_SUCCESS != (ret = rmaps_lama_parse_mppr(rmaps_lama_cmd_mppr, - &lama_mppr_levels, - &lama_mppr_num_levels)) ) { - ORTE_ERROR_LOG(ret); - return ret; - } - - if( 10 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - for( i = 0; i < lama_mppr_num_levels; ++i ) { - type_str = lama_type_enum_to_str(lama_mppr_levels[i].type); - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- MPPR : %*d at %10s", - MAX_BIND_DIGIT_LEN, lama_mppr_levels[i].max_resources, type_str); - free(type_str); - type_str = NULL; - } - } - - /* - * Parse: Ordering - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Ordering : [%s]", - rmaps_lama_cmd_ordering); - if( ORTE_SUCCESS != (ret = rmaps_lama_parse_ordering(rmaps_lama_cmd_ordering, - &lama_ordering)) ) { - ORTE_ERROR_LOG(ret); - return ret; - } - - if( 10 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - if( LAMA_ORDER_NATURAL == lama_ordering ) { - type_str = strdup("Natural"); - } - else if( LAMA_ORDER_SEQ == lama_ordering ) { - type_str = strdup("Sequential"); - } - else { - type_str = strdup("Unknown"); - } - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ----- Ordering : %10s", - type_str); - free(type_str); - type_str = NULL; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - - return ORTE_SUCCESS; -} - - -/********************************* - * Support functions - *********************************/ -rmaps_lama_level_type_t lama_type_str_to_enum(char *param) -{ - if( 0 == strncmp(param, "n", strlen("n")) ) { - return LAMA_LEVEL_MACHINE; - } - else if( 0 == strncmp(param, "b", strlen("b")) ) { - return LAMA_LEVEL_BOARD; - } - else if( 0 == strncmp(param, "s", strlen("s")) ) { - return LAMA_LEVEL_SOCKET; - } - else if( 0 == strncmp(param, "c", strlen("c")) ) { - return LAMA_LEVEL_CORE; - } - else if( 0 == strncmp(param, "h", strlen("h")) ) { - return LAMA_LEVEL_PU; - } - else if( 0 == strncmp(param, "L1", strlen("L1")) ) { - return LAMA_LEVEL_CACHE_L1; - } - else if( 0 == strncmp(param, "L2", strlen("L2")) ) { - return LAMA_LEVEL_CACHE_L2; - } - else if( 0 == strncmp(param, "L3", strlen("L3")) ) { - return LAMA_LEVEL_CACHE_L3; - } - else if( 0 == strncmp(param, "N", strlen("N")) ) { - return LAMA_LEVEL_NUMA; - } - - return LAMA_LEVEL_UNKNOWN; -} - -char * lama_type_enum_to_str(rmaps_lama_level_type_t param) -{ - if( LAMA_LEVEL_MACHINE == param ) { - return strdup("Machine"); - } - else if( LAMA_LEVEL_BOARD == param ) { - return strdup("Board"); - } - else if( LAMA_LEVEL_SOCKET == param ) { - return strdup("Socket"); - } - else if( LAMA_LEVEL_CORE == param ) { - return strdup("Core"); - } - else if( LAMA_LEVEL_PU == param ) { - return strdup("Hw. Thread"); - } - else if( LAMA_LEVEL_CACHE_L1 == param ) { - return strdup("L1 Cache"); - } - else if( LAMA_LEVEL_CACHE_L2 == param ) { - return strdup("L2 Cache"); - } - else if( LAMA_LEVEL_CACHE_L3 == param ) { - return strdup("L3 Cache"); - } - else if( LAMA_LEVEL_NUMA == param ) { - return strdup("NUMA"); - } - - return strdup("Unknown"); -} - -/********************************* - * Core Mapper function - *********************************/ -static int orte_rmaps_lama_map_core(orte_job_t *jdata) -{ - int ret, exit_status = ORTE_SUCCESS; - int cur_app_idx = 0; - int num_slots; - orte_app_context_t *cur_app_context = NULL; - orte_node_t *cur_mach = NULL; - orte_node_t **cur_mach_ptr = NULL; - orte_proc_t *proc = NULL; - opal_list_t *node_list = NULL; - opal_list_item_t *item = NULL; - opal_tree_t *max_tree = NULL; - int *pu_idx_ref = NULL; - int *last_pu_idx_ref = NULL; - int i, num_mapped, last_num_mapped, mach_level = -1; - orte_std_cntr_t j; - int max_procs_to_map; - int iter_passes; - char * last_level_str = NULL; - bool initial_map = true; - - /* - * Setup PU reference - * Find the position of the 'machine' - */ - pu_idx_ref = (int*)malloc(sizeof(int) * lama_mapping_num_layouts); - if (NULL == pu_idx_ref) { - return ORTE_ERROR; - } - last_pu_idx_ref = (int*)malloc(sizeof(int) * lama_mapping_num_layouts); - if (NULL == last_pu_idx_ref) { - free(pu_idx_ref); - return ORTE_ERROR; - } - - for( i = 0; i < lama_mapping_num_layouts; ++i ) { - pu_idx_ref[i] = 0; - last_pu_idx_ref[i] = -1; - if( LAMA_LEVEL_MACHINE == lama_mapping_layout[i] ) { - mach_level = i; - } - } - - /* - * Foreach app context - */ - for(cur_app_idx = 0; cur_app_idx < jdata->apps->size; ++cur_app_idx ) { - if( NULL == (cur_app_context = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, cur_app_idx))) { - continue; - } - - /* - * Get the list of nodes for this app_context. - */ - node_list = OBJ_NEW(opal_list_t); - ret = orte_rmaps_base_get_target_nodes(node_list, - &num_slots, - cur_app_context, - jdata->map->mapping, - initial_map, false); - if(ORTE_SUCCESS != ret ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - /* Flag that all subsequent requests should not reset the node->mapped flag */ - initial_map = false; - - /* - * If a bookmark exists from some prior mapping, then start from there - */ - cur_mach = (orte_node_t*)orte_rmaps_base_get_starting_point(node_list, jdata); - - /* - * If the application did not specify the number of procs - * then set it to the number of 'slots' - * JJH: TODO: Revisit 'max_procs' calculation - */ - if (0 == cur_app_context->num_procs) { - cur_app_context->num_procs = num_slots; - } - max_procs_to_map = cur_app_context->num_procs; - - /* - * Build the Max Tree - */ - RMAPS_LAMA_START_TIMER(RMAPS_LAMA_TIMER_BUILD_MAX_TREE); - max_tree = rmaps_lama_create_empty_max_tree(); - if( ORTE_SUCCESS != (ret = rmaps_lama_build_max_tree(jdata, node_list, - max_tree, - &lama_mppr_max_tree_homogeneous_system)) ) { - exit_status = ret; - goto cleanup; - } - RMAPS_LAMA_END_TIMER(RMAPS_LAMA_TIMER_BUILD_MAX_TREE); - - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Mapping: -----------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - RMAPS_LAMA_START_TIMER(RMAPS_LAMA_TIMER_MAPPING); - - /* - * Clear PU reference - */ - for( i = 0; i < lama_mapping_num_layouts; ++i ) { - pu_idx_ref[i] = 0; - } - - /* - * Mapping: Recursively loop over all levels - */ - num_mapped = 0; - last_num_mapped = 0; - iter_passes = 0; - cur_mach_ptr = (orte_node_t**)malloc(sizeof(orte_node_t*)); - *cur_mach_ptr = cur_mach; - while( max_procs_to_map > num_mapped ) { - ret = rmaps_lama_map_core_iter_level(jdata, - cur_app_context, - node_list, - cur_mach_ptr, - max_tree, - lama_mapping_num_layouts-1, - mach_level, - &pu_idx_ref, - &last_pu_idx_ref, - &num_mapped, - max_procs_to_map, - &iter_passes); - if( ORTE_SUCCESS != ret ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - - /* - * We only get here (without finishing the mapping) if we are going to - * start oversubscribing resources. - */ - if( max_procs_to_map > num_mapped ) { - if( !rmaps_lama_can_oversubscribe ) { - orte_show_help("help-orte-rmaps-lama.txt", - "orte-rmaps-lama:oversubscribe", - true, - num_mapped, max_procs_to_map); - exit_status = ORTE_ERROR; - goto cleanup; - } else { - rmaps_lama_am_oversubscribing = true; - } - } - - /* - * Check to see if we have made any progress in the mapping loop - */ - if( 0 < cur_app_idx && 2 == iter_passes ) { - /* - * Give it another pass: - * This is an edge case when we are trying to restart from a - * bookmark left by a previous app context. If this app context - * is starting from exactly the beginning of the allocation - * then the recursive loop could return out here after the - * increment pass. This is indicated by (iter_passes = 2). - * Since no processes were mapped, we just try again. - */ - } - else if( last_num_mapped == num_mapped ) { - orte_show_help("help-orte-rmaps-lama.txt", - "orte-rmaps-lama:no-resources-available", - true, - cur_app_idx, - num_mapped, max_procs_to_map, - (NULL == rmaps_lama_cmd_map ? "[Not Provided]" : rmaps_lama_cmd_map), - (NULL == rmaps_lama_cmd_bind ? "[Not Provided]" : rmaps_lama_cmd_bind), - (NULL == rmaps_lama_cmd_mppr ? "[Not Provided]" : rmaps_lama_cmd_mppr), - (NULL == rmaps_lama_cmd_ordering ? "[Not Provided]" : rmaps_lama_cmd_ordering)); - exit_status = ORTE_ERROR; - goto cleanup; - } else { - last_num_mapped = num_mapped; - } - } - - /* - * Display Bookmark for debugging - */ - last_level_str = pu_ref_to_str(last_pu_idx_ref, lama_mapping_num_layouts); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Bookmark: --> Node %10s PU %10s", - jdata->bookmark->name, last_level_str); - free(last_level_str); - last_level_str = NULL; - - /* - * Clenup for next iteration - */ - if( NULL != node_list ) { - while(NULL != (item = opal_list_remove_first(node_list))) { - OBJ_RELEASE(item); - } - OBJ_RELEASE(node_list); - node_list = NULL; - } - - OBJ_RELEASE(max_tree); - max_tree = NULL; - } - - RMAPS_LAMA_END_TIMER(RMAPS_LAMA_TIMER_MAPPING); - - - /* - * Ordering - */ - RMAPS_LAMA_START_TIMER(RMAPS_LAMA_TIMER_ORDERING); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - if( LAMA_ORDER_SEQ == lama_ordering ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Ordering: Sequential ------------"); - - if( ORTE_SUCCESS != (ret = rmaps_lama_ordering_sequential(jdata)) ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - } - else { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Ordering: Natural ---------------"); -#if 0 - /* - * We compute our own vpids inline with the algorithm. So no need to use the - * orte_rmaps_base_compute_vpids() function. - */ -#endif - } - RMAPS_LAMA_END_TIMER(RMAPS_LAMA_TIMER_ORDERING); - - - /* - * Display Mapping - */ - if( 10 <= opal_output_get_verbosity(orte_rmaps_base_framework.framework_output) ) { - char *cpu_bitmap; - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - for( j = 0; j < jdata->procs->size; ++j) { - if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, j))) { - continue; - } - cpu_bitmap = NULL; - orte_get_attribute(&proc->attributes, ORTE_PROC_CPU_BITMAP, (void**)&cpu_bitmap, OPAL_STRING); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Ordering: Proc. %2d on Node %10s - Slot %s", - proc->name.vpid, proc->node->name, cpu_bitmap); - if (NULL != cpu_bitmap) { - free(cpu_bitmap); - } - } - } - - - /* - * All done - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Finished ------------------------"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - - - cleanup: - if( NULL != node_list ) { - while(NULL != (item = opal_list_remove_first(node_list))) { - OBJ_RELEASE(item); - } - OBJ_RELEASE(node_list); - } - - if( NULL != max_tree ) { - OBJ_RELEASE(max_tree); - } - - free(pu_idx_ref); - free(last_pu_idx_ref); - - if( NULL != last_level_str ) { - free(last_level_str); - } - - return exit_status; -} - -static int rmaps_lama_map_core_iter_level(orte_job_t *jdata, - orte_app_context_t *cur_app_context, - opal_list_t *node_list, - orte_node_t **cur_mach_ptr, - opal_tree_t *max_tree, - int cur_level, - int mach_level, - int **pu_idx_ref, - int **last_pu_idx_ref, - int *num_mapped, - int max_procs, - int *iter_passes) -{ - int ret, exit_status = ORTE_SUCCESS; - int i, j; - opal_tree_item_t *tree_for_level = NULL; - int max_subtree_arity = 0; - char * level_str = NULL; - char * last_level_str = NULL; - char * slot_list = NULL; - orte_proc_t *proc = NULL; - int pu_idx = 0; - - /* - * Find the current tree for this level - * If it is the machine level, then we need to access the information from - * the node list, not the max_tree. - */ - if( cur_level != mach_level ) { - tree_for_level = opal_tree_find_with(opal_tree_get_root(max_tree), - &lama_mapping_layout[cur_level]); - /* - * We do not need subtree, but the arity of the subtree - * JJH TODO: This should be an opal_tree function. - */ - max_subtree_arity = 1; /* include self */ - while( NULL != (tree_for_level = opal_tree_get_next_sibling(tree_for_level)) ) { - ++max_subtree_arity; - } - } - else if( NULL == *cur_mach_ptr ) { - *cur_mach_ptr = get_next_machine(jdata, node_list, (opal_list_item_t*)(*cur_mach_ptr)); - } - - pu_idx = convert_layer_to_sort_idx(lama_mapping_layout[cur_level]); - level_str = lama_type_enum_to_str(lama_mapping_layout[cur_level]); - - /* - * Do we need to advance to a bookmark - */ - if( (*last_pu_idx_ref)[0] >= 0 && 0 == *iter_passes ) { - /* - * Display last mapped - */ - last_level_str = pu_ref_to_str(*last_pu_idx_ref, lama_mapping_num_layouts); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Bookmark: --> Last Mapped: Node %10s (bkmrk %10s) PU %10s - Level %2d", - (NULL == *cur_mach_ptr ? "(NULL)" : (*cur_mach_ptr)->name), - jdata->bookmark->name, last_level_str, (*last_pu_idx_ref)[pu_idx]); - free(last_level_str); - last_level_str = NULL; - - /* - * Set the level starting point to the last known index - */ - i = (*last_pu_idx_ref)[pu_idx]; - } else { - i = 0; - } - - - /* - * Loop over all siblings at this level - * Initial condition above, Increment at bottom, Break check at bottom - */ - while( 1 ) { - /* - * Define the PU index - */ - (*pu_idx_ref)[pu_idx] = i; - - if( (*last_pu_idx_ref)[0] >= 0 && 0 == *iter_passes ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Mapping: --> Level %2d: %10s (%2d) - I %2d - Arity %2d - %10s - Increment only", - cur_level+1, - level_str, pu_idx, i, max_subtree_arity, - (NULL == *cur_mach_ptr ? "" : (*cur_mach_ptr)->name)); - } else { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Mapping: --> Level %2d: %10s (%2d) - I %2d - Arity %2d - %10s", - cur_level+1, - level_str, pu_idx, i, max_subtree_arity, - (NULL == *cur_mach_ptr ? "" : (*cur_mach_ptr)->name)); - } - - - /* - * If not the inner most loop, iterate to the next level down - */ - if( cur_level > 0 ) { - ret = rmaps_lama_map_core_iter_level(jdata, - cur_app_context, - node_list, - cur_mach_ptr, - max_tree, - cur_level - 1, - mach_level, - pu_idx_ref, - last_pu_idx_ref, - num_mapped, - max_procs, - iter_passes); - if( ORTE_SUCCESS != ret ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - } - /* - * If we are restarting the iteration from a previous bookmark then - * the first pass through is a no-op mapping pass that just increments - * the PU reference. - * Called by innermost loop - */ - else if( (*last_pu_idx_ref)[0] >= 0 && 0 == *iter_passes ) { - *iter_passes += 1; - } - /* - * Try to map at this location - */ - else { - /* - * On first pass, make sure we increment this, just so we do not - * accidentally think this is an increment pass. - */ - if( 0 == *iter_passes ) { - *iter_passes += 1; - } - - /* - * Display the PU ref for debugging - */ - display_pu_ref(*pu_idx_ref, lama_mapping_num_layouts, *num_mapped, proc); - - - /* - * Check to see if this resource is available on this node. - * - * In a heterogeneous or otherwise non-uniformly restricted - * environment we may iterate to a resource that is not - * available either because it does not exist, or is not - * available for allocation (off-lined, sub-node allocation). - * Additionally, we need to check resource constrains expressed - * in the MPPR and binding. - */ - ret = check_node_availability((*cur_mach_ptr), - max_tree, - *pu_idx_ref, - &slot_list); - if( ORTE_SUCCESS != ret || NULL == slot_list ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:hwtopo: Mapping: --> Level %2d: %s - INVALID/SKIP", - cur_level+1, - level_str); - /* - * By not mapping here we just let the iterations continue - * until a suitable match is found or we have exhausted all - * possible locations to match and thus cannot map any more. - */ - } - else { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Mapping: --> Level %2d: %s - Slot List (%s)", - cur_level+1, - level_str, slot_list); - - /* - * Map this process onto the resource specified - * level_tree_objs[*] and cur_mach point to the specific resource - */ - proc = NULL; - ret = orte_rmaps_lama_map_process(jdata, - (*cur_mach_ptr), - cur_app_context->idx, - &proc); - if( ORTE_SUCCESS != ret ) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto bailout; - } - - /* - * Set the binding for this process - */ - orte_set_attribute(&proc->attributes, ORTE_PROC_CPU_BITMAP, ORTE_ATTR_GLOBAL, slot_list, OPAL_STRING); - /* - * Insert the proc into the 'native' ordering location. - */ - proc->name.vpid = jdata->num_procs; - if (ORTE_SUCCESS != (ret = opal_pointer_array_set_item(jdata->procs, - proc->name.vpid, proc))) { - ORTE_ERROR_LOG(ret); - exit_status = ret; - goto cleanup; - } - jdata->num_procs += 1; - - /* - * Save a bookmark so we can return here later if necessary - */ - for( j = 0; j < lama_mapping_num_layouts; ++j ) { - (*last_pu_idx_ref)[j] = (*pu_idx_ref)[j]; - } - jdata->bookmark = (orte_node_t*)(*cur_mach_ptr); - - (*num_mapped)++; - } - } - - /* - * Increment loop - * - * If we are binding, then we may need to advance the binding layer - * by more than one. - */ - if( cur_level != mach_level ) { - if( lama_binding_level == lama_mapping_layout[cur_level] ) { - i += lama_binding_num_levels; - } else { - ++i; - } - } else { - /* - * Note: Currently we do not allow for 'binding' to multiple machines - * But keep the code just in case we want to play with 'stride' later - */ - if( lama_binding_level == lama_mapping_layout[cur_level] && lama_binding_num_levels > 1) { - opal_output(0, "mca:rmaps:lama: ERROR: Cannot bind to multiple machines - SHOULD NEVER HAPPEN: %s", - rmaps_lama_cmd_bind); - exit_status = ORTE_ERROR; - goto bailout; -#if 0 - for( j = 0; j < lama_binding_num_levels; ++j ) { - cur_mach = get_next_machine(jdata, node_list, (opal_list_item_t*)cur_mach); - if( NULL == cur_mach ) { - break; - } - ++i; - } -#endif - } else { - *cur_mach_ptr = get_next_machine(jdata, node_list, (opal_list_item_t*)(*cur_mach_ptr)); - ++i; - } - } - - /* - * Check if we are done mapping before iterating again - */ - if( max_procs <= *num_mapped ) { - exit_status = ORTE_SUCCESS; - goto cleanup; - } - - /* - * Check if we are done looping - */ - if( cur_level != mach_level ) { - if( i >= max_subtree_arity ) { - break; - } - } else { - if( NULL == *cur_mach_ptr ) { - break; - } - } - } - - - /* - * Sanity Check: Check if we are done mapping - */ - if( max_procs <= *num_mapped ) { - exit_status = ORTE_SUCCESS; - goto cleanup; - } - - cleanup: - /* - * If the outermost layer, the increment the number of iteration passes. - */ - if( cur_level == lama_mapping_num_layouts-1 ) { - *iter_passes += 1; - } - - bailout: - if( NULL != level_str ) { - free(level_str); - level_str = NULL; - } - - if( NULL != slot_list ) { - free(slot_list); - slot_list = NULL; - } - - return exit_status; -} - -static orte_node_t* get_next_machine(orte_job_t *jdata, opal_list_t *node_list, - opal_list_item_t *cur_mach) -{ - orte_node_t *next_mach = NULL; - - if( NULL == cur_mach ) { - next_mach = (orte_node_t*)opal_list_get_first(node_list); - } - else if( opal_list_get_last(node_list) == cur_mach ) { - next_mach = NULL; - } - else { - next_mach = (orte_node_t*)opal_list_get_next(cur_mach); - } - - return next_mach; -} - -static int orte_rmaps_lama_map_process(orte_job_t *jdata, - orte_node_t *node, - int app_idx, - orte_proc_t **proc) -{ - int ret; - - /* - * Add this node to the map, but only once - */ - if( !ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED) ) { - if (ORTE_SUCCESS > (ret = opal_pointer_array_add(jdata->map->nodes, (void*)node))) { - ORTE_ERROR_LOG(ret); - return ret; - } - ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED); - OBJ_RETAIN(node); /* maintain accounting on object */ - ++(jdata->map->num_nodes); - } - - /* - * Setup the process object - */ - if (NULL == (*proc = orte_rmaps_base_setup_proc(jdata, node, app_idx))) { - ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); - return ORTE_ERR_OUT_OF_RESOURCE; - } - - return ORTE_SUCCESS; -} - -static int rmaps_lama_ordering_sequential(orte_job_t *jdata) -{ - orte_job_map_t *map; - orte_proc_t *proc = NULL, *swap = NULL; - orte_std_cntr_t i, j; - int cur_rank = 0; - orte_node_t *cur_node = NULL; - - map = jdata->map; - - opal_output_verbose(15, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - - /* - * Assign the ranks sequentially - */ - for( i = 0; i < map->nodes->size; ++i) { - if (NULL == (cur_node = (orte_node_t*)opal_pointer_array_get_item(map->nodes, i))) { - continue; - } - for( j = 0; j < cur_node->procs->size; ++j) { - if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(cur_node->procs, j))) { - continue; - } - /* ignore procs from other jobs */ - if (proc->name.jobid != jdata->jobid) { - continue; - } - - opal_output_verbose(15, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Ordering: Rename Proc. %2d to %2d (Rev. %s)", - proc->name.vpid, cur_rank, proc->node->name); - proc->name.vpid = cur_rank; - ++cur_rank; - } - } - - /* - * Fix the job structure ordering - Sort by new vpid - * - * If we do not do this then the remote daemons assign the incorrect - * ranks to the processes since they use the relative ordering in the - * jdata->procs structure to determine vpids locally. - * - * JJH: Look at combining these loops with the loop in the core so we - * JJH: do not have to iterate over the list two times - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - cur_rank = 0; - for( j = 0; j < jdata->procs->size; ++j) { - if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, j))) { - continue; - } - - opal_output_verbose(15, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Ordering: Proc. %2d on Node %s", - proc->name.vpid, proc->node->name); - - while((int)proc->name.vpid != cur_rank ) { - swap = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, proc->name.vpid); - - opal_pointer_array_set_item(jdata->procs, proc->name.vpid, proc); - opal_pointer_array_set_item(jdata->procs, cur_rank, swap); - - opal_output_verbose(15, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Ordering: \t SWAP Proc. %2d (%d) and Proc. %2d (%d)", - proc->name.vpid, cur_rank, swap->name.vpid, proc->name.vpid); - proc = swap; - } - ++cur_rank; - } - - return ORTE_SUCCESS; -} - -static int convert_layer_to_sort_idx(rmaps_lama_level_type_t layer) -{ - int i; - - for(i = 0; i < lama_mapping_num_layouts; ++i ) { - if( lama_mapping_layout_sort[i] == layer ) { - return i; - } - } - - return 0; -} - -static void display_pu_ref(int *ref, int size, int rank, orte_proc_t *proc) -{ - char *str = NULL; - - str = pu_ref_to_str(ref, size); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Mapping: PU Ref: %s [Rank %2d] Name: %s", - str, rank, - (NULL == proc ? "(null)" : ORTE_NAME_PRINT(&proc->name))); - - free(str); - - return; -} - -static char * pu_ref_to_str(int *ref, int size) -{ - int i, idx; - char *str = NULL; - - str = (char *)malloc(sizeof(char) * (2 * size)); - for(i = 0, idx = 0; i < size; ++i, idx += 2) { - sprintf(&(str[idx]), "%2d", ref[i]); - } - - return str; -} - -static int check_node_availability(orte_node_t *cur_node, - opal_tree_t *max_tree, - int *pu_idx_ref, - char **slot_list) -{ - int exit_status = ORTE_SUCCESS; - int i; - char * level_str = NULL; - hwloc_obj_t *topo_child = NULL, *topo_parent, *topo_allocated; - - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Checking: Node (%s) -------------", - cur_node->name); - opal_output_verbose(11, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: ---------------------------------"); - - - /* - * Determine if the current node has the necessary hardware - * as described by the PU index. - * Find the hwloc object reference for the resource pointed to - * by the PU index. - * JJH TODO: If homogeneous system then this could be simplified. - */ - topo_allocated = topo_parent = (hwloc_obj_t*)malloc(sizeof(hwloc_obj_t) * 1); - if (NULL == topo_parent) { - return ORTE_ERROR; - } - *topo_parent = hwloc_get_obj_by_depth(cur_node->topology, 0, 0); - for( i = 0; i < lama_mapping_num_layouts; ++i ) { - /* - * Skip 'machine' level - */ - if( LAMA_LEVEL_MACHINE == lama_mapping_layout_sort[i] ) { - continue; - } - /* - * Skip 'board' level - * JJH: HWLOC does not support BOARD at the moment - */ - if( LAMA_LEVEL_BOARD == lama_mapping_layout_sort[i] ) { - continue; - } - - level_str = lama_type_enum_to_str(lama_mapping_layout_sort[i]); - opal_output_verbose(11, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Checking: %2d of %s", - pu_idx_ref[i], level_str); - - /* - * Find the nth subtree matching the current key - */ - topo_child = rmaps_lama_find_nth_subtree_match(cur_node->topology, - *topo_parent, - pu_idx_ref[i], - lama_mapping_layout_sort[i]); - - /* - * If it does not exist, then this node is not capable of matching - * so it is unavailable. - */ - if( NULL == topo_child ) { - opal_output_verbose(11, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Check failed: Node %s does not have a %10s %2d", - cur_node->name, level_str, pu_idx_ref[i]); - exit_status = ORTE_ERROR; - goto cleanup; - } - - /* - * Keep decending the tree - */ - topo_parent = topo_child; - free(level_str); - level_str = NULL; - } - - /* - * We have sufficient hardware :) - */ - - - /* - * Return the native slot list to bind to - * Internally checks the MPPR - */ - *slot_list = get_native_slot_list(cur_node, topo_parent, pu_idx_ref); - if( NULL == *slot_list ) { - goto cleanup; - } - - cleanup: - if( NULL != level_str ) { - free(level_str); - level_str = NULL; - } - - if( ORTE_SUCCESS != exit_status ) { - if( NULL != *slot_list ) { - free(*slot_list); - *slot_list = NULL; - } - } - - free(topo_allocated); - - return exit_status; -} - -static int rmaps_lama_check_mppr(orte_node_t *node, - hwloc_obj_t *child_obj) -{ - int ret; - - /* - * Optimization if no MPPR provided - */ - if( NULL == lama_mppr_levels ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: No MPPR to check - Skip..."); - return ORTE_SUCCESS; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Check ---------------------------"); - /* - * Check Parents (excluding self) - */ - if( ORTE_SUCCESS != (ret = rmaps_lama_iter_mppr_parents(node, &(*child_obj)->parent, true)) ) { - return ret; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Check ---------------------------"); - - /* - * Check Children (including self) - */ - if( ORTE_SUCCESS != (ret = rmaps_lama_iter_mppr_children(node, child_obj, true)) ) { - return ret; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Check ---------------------------"); - - return ORTE_SUCCESS; -} - -static int rmaps_lama_inc_mppr(orte_node_t *node, - hwloc_obj_t *child_obj) -{ - int ret; - - /* - * Optimization if no MPPR provided - */ - if( NULL == lama_mppr_levels ) { - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: No MPPR to increment - Skip..."); - return ORTE_SUCCESS; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Inc ---------------------------"); - /* - * Increment Parents (excluding self) - */ - if( ORTE_SUCCESS != (ret = rmaps_lama_iter_mppr_parents(node, &(*child_obj)->parent, false)) ) { - return ret; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Inc ---------------------------"); - - /* - * Increment Children (including self) - */ - if( ORTE_SUCCESS != (ret = rmaps_lama_iter_mppr_children(node, child_obj, false)) ) { - return ret; - } - - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Inc ---------------------------"); - - return ORTE_SUCCESS; -} - -static int rmaps_lama_iter_mppr_parents(orte_node_t *node, - hwloc_obj_t *child_obj, - bool check_only) -{ - rmaps_lama_hwloc_user_t *hwloc_userdata = NULL; - rmaps_lama_node_mppr_t *mppr_accounting = NULL; - char str[128]; - - /* - * Basecase - */ - if( NULL == *child_obj ) { - return ORTE_SUCCESS; - } - - /* - * Check self - */ - /* - * Access MPPR info for this object - */ - hwloc_userdata = (rmaps_lama_hwloc_user_t*)((opal_hwloc_topo_data_t*)(*child_obj)->userdata)->userdata; - mppr_accounting = (rmaps_lama_node_mppr_t*)opal_pointer_array_get_item(hwloc_userdata->node_mppr, node->index); - - hwloc_obj_snprintf(str, sizeof(str), node->topology, *child_obj, "#", 0); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: %s: P [%2d] %10s - %20s - Max %3d , Cur %3d (Oversub.: %s / %s)", - (check_only ? "Checking " : "Increment"), - node->index, node->name, str, - mppr_accounting->max, - (check_only ? mppr_accounting->cur : mppr_accounting->cur + 1), - (rmaps_lama_am_oversubscribing ? "T" : "F"), - (rmaps_lama_can_oversubscribe ? "T" : "F") ); - - /* - * Check limits - Error on first to exceed - */ - if( check_only ) { - if( mppr_accounting->max >= 0 && !rmaps_lama_am_oversubscribing) { - if( (mppr_accounting->cur)+1 > mppr_accounting->max ) { - return ORTE_ERROR; - } - } - } - /* - * Increment current number allocated below this level - */ - else { - mppr_accounting->cur += 1; - } - - /* - * Go to parent - */ - return rmaps_lama_iter_mppr_parents(node, &((*child_obj)->parent), check_only); -} - -static int rmaps_lama_iter_mppr_children(orte_node_t *node, - hwloc_obj_t *child_obj, - bool check_only) -{ - int ret; - rmaps_lama_hwloc_user_t *hwloc_userdata = NULL; - rmaps_lama_node_mppr_t *mppr_accounting = NULL; - char str[128]; - int i; - - /* - * Check self - */ - /* - * Access MPPR info for this object - */ - hwloc_userdata = (rmaps_lama_hwloc_user_t*)((opal_hwloc_topo_data_t*)(*child_obj)->userdata)->userdata; - mppr_accounting = (rmaps_lama_node_mppr_t*)opal_pointer_array_get_item(hwloc_userdata->node_mppr, node->index); - - hwloc_obj_snprintf(str, sizeof(str), node->topology, *child_obj, "#", 0); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: %s: C [%2d] %10s - %20s - Max %3d , Cur %3d (Oversub.: %s / %s)", - (check_only ? "Checking " : "Increment"), - node->index, node->name, str, - mppr_accounting->max, - (check_only ? mppr_accounting->cur : mppr_accounting->cur + 1), - (rmaps_lama_am_oversubscribing ? "T" : "F"), - (rmaps_lama_can_oversubscribe ? "T" : "F") ); - - /* - * Check limits - Error on first to exceed - */ - if( check_only ) { - if( mppr_accounting->max >= 0 && !rmaps_lama_am_oversubscribing) { - if( (mppr_accounting->cur)+1 > mppr_accounting->max ) { - return ORTE_ERROR; - } - } - } - /* - * Increment current number allocated below this level - */ - else { - mppr_accounting->cur += 1; - } - - /* - * Check all children - */ - for(i = 0; i < (int)(*child_obj)->arity; ++i ) { - if( ORTE_SUCCESS != (ret = rmaps_lama_iter_mppr_children(node, &((*child_obj)->children[i]), check_only)) ) { - return ret; - } - } - - return ORTE_SUCCESS; -} - - -static char * get_native_slot_list(orte_node_t *cur_node, hwloc_obj_t *pu_obj, int *put_idx_ref) -{ - int i; - char *slot_list = NULL; - hwloc_obj_t *binding_parent = NULL; - hwloc_obj_t *cur_parent = NULL; - hwloc_cpuset_t binding_cpuset; - hwloc_cpuset_t scratch_cpuset; - char *type_str = NULL; - - /* - * Sanity check - */ - if( NULL == pu_obj ) { - return NULL; - } - - /* - * Determine the cpumask to send to the backend for binding - */ - - /* - * Iterate up the tree until we reach the binding parent - */ - binding_parent = rmaps_lama_find_parent(cur_node->topology, pu_obj, lama_binding_level); - if( NULL == binding_parent ) { - return NULL; - } - - /* - * Iterate across cousins until we find enough resources or hit the node boundary - */ - binding_cpuset = hwloc_bitmap_alloc(); - hwloc_bitmap_zero(binding_cpuset); - - scratch_cpuset = hwloc_bitmap_alloc(); - - cur_parent = binding_parent; - - for(i = 0; i < lama_binding_num_levels; ++i) { - /* - * Check MPPR Availability - */ - if( ORTE_SUCCESS != rmaps_lama_check_mppr(cur_node, cur_parent) ) { - goto cleanup; - } - - /* - * Accumulate the bitmask - * - * JJH: TODO: Add resource offline check (?) - */ - hwloc_bitmap_zero(scratch_cpuset); - /* JJH: Maybe use opal_hwloc_base_get_available_cpus(cur_node->topology, (*cur_parent)) ? - * They do pretty much the same thing, but with more checks... - */ - hwloc_bitmap_and(scratch_cpuset, (*cur_parent)->allowed_cpuset, (*cur_parent)->online_cpuset); - hwloc_bitmap_or(binding_cpuset, scratch_cpuset, binding_cpuset); - -#if 0 - { - hwloc_obj_snprintf(str, sizeof(str), cur_node->topology, *cur_parent, "#", 0); - printf("--> BINDING TO -- %-20s \t -- %2d of %2d -- %2d vs %2d\n",str, - i, lama_binding_level, - (*binding_parent)->logical_index, (*cur_parent)->logical_index); - - hwloc_bitmap_snprintf(str, sizeof(str), (*cur_parent)->allowed_cpuset ); - printf("--> CPU A : %-20s\n", str); - hwloc_bitmap_snprintf(str, sizeof(str), (*cur_parent)->online_cpuset ); - printf("--> CPU B : %-20s\n", str); - hwloc_bitmap_snprintf(str, sizeof(str), scratch_cpuset); - printf("--> CPU C : %-20s\n", str); - hwloc_bitmap_snprintf(str, sizeof(str), binding_cpuset); - printf("--> CPU D : %-20s\n", str); - } -#endif - - /* - * Iterate to the next cousin. - * If we exceed the boundary of the node, then send up an error. - */ - if( (i+1) < lama_binding_num_levels && NULL == (*cur_parent)->next_cousin ) { - type_str = lama_type_enum_to_str(lama_binding_level); - opal_output_verbose(10, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Error: Not able to bind to %*d x %10s - Stopped at %*d", - MAX_BIND_DIGIT_LEN, lama_binding_num_levels, - type_str, - MAX_BIND_DIGIT_LEN, i); - free(type_str); - type_str = NULL; - goto cleanup; - } - /* - * Point to the next cousin - */ - if( NULL != (*cur_parent)->next_cousin ) { - cur_parent = &((*cur_parent)->next_cousin); - } - } - - /* - * Account for the process placement in the MPPR - * Assumes a previous check - * We cannot do this in the loop, since if the MPPR check fails we would - * need to roll back previous increments. - */ - cur_parent = binding_parent; - for(i = 0; i < lama_binding_num_levels; ++i) { - /* - * Account for the process placement in the MPPR - * Assumes a previous check. - */ - if( ORTE_SUCCESS != rmaps_lama_inc_mppr(cur_node, cur_parent) ) { - goto cleanup; - } - - /* - * Point to the next cousin - */ - if( NULL != (*cur_parent)->next_cousin ) { - cur_parent = &((*cur_parent)->next_cousin); - } - } - - /* - * Convert the cpuset to a slot_list for the remote daemon - */ - hwloc_bitmap_list_asprintf(&slot_list, binding_cpuset); - - cleanup: - hwloc_bitmap_free(scratch_cpuset); - hwloc_bitmap_free(binding_cpuset); - free(binding_parent); - - return slot_list; -} - - -/********************************* - * Timer Support - *********************************/ -static double rmaps_lama_get_time(void) -{ - double wtime; - -#if OPAL_TIMER_USEC_NATIVE - wtime = (double)opal_timer_base_get_usec() / 1000000.0; -#else - struct timeval tv; - gettimeofday(&tv, NULL); - wtime = tv.tv_sec; - wtime += (double)tv.tv_usec / 1000000.0; -#endif - - return wtime; -} - -static void rmaps_lama_set_time(int idx, bool is_start) -{ - if(idx < RMAPS_LAMA_TIMER_MAX ) { - if( is_start ) { - timer_start[idx] = rmaps_lama_get_time(); - } else { - timer_end[idx] = rmaps_lama_get_time(); - timer_accum[idx] += timer_end[idx] - timer_start[idx]; - } - } -} - -static void rmaps_lama_display_all_timers(void) -{ - double diff = 0.0; - double total = 0.0; - char * label = NULL; - - opal_output(0, - "mca:rmaps:lama: Timing: ---------------------------\n"); - - /* - * Timer: Parse Parameters - */ - label = strdup("Parse Params"); - diff = timer_accum[RMAPS_LAMA_TIMER_PARSE_PARAMS]; - rmaps_lama_display_indv_timer_core(diff, label); - free(label); - total += diff; - - /* - * Timer: Build Max Tree - */ - label = strdup("Build Max Tree"); - diff = timer_accum[RMAPS_LAMA_TIMER_BUILD_MAX_TREE]; - rmaps_lama_display_indv_timer_core(diff, label); - free(label); - total += diff; - - /* - * Timer: Mapping - */ - label = strdup("Mapping"); - diff = timer_accum[RMAPS_LAMA_TIMER_MAPPING]; - rmaps_lama_display_indv_timer_core(diff, label); - free(label); - total += diff; - - /* - * Timer: Ordering - */ - label = strdup("Ordering"); - diff = timer_accum[RMAPS_LAMA_TIMER_ORDERING]; - rmaps_lama_display_indv_timer_core(diff, label); - free(label); - total += diff; - - /* - * Timer: Total Overhead - */ - label = strdup("Other Overhead"); - diff = timer_accum[RMAPS_LAMA_TIMER_TOTAL]; - rmaps_lama_display_indv_timer_core(diff - total, label); - free(label); - - /* - * Timer: Total - */ - label = strdup("Total"); - diff = timer_accum[RMAPS_LAMA_TIMER_TOTAL]; - rmaps_lama_display_indv_timer_core(diff, label); - free(label); - - opal_output(0, - "mca:rmaps:lama: ---------------------------------"); -} - -static void rmaps_lama_clear_timers(void) -{ - int i; - for(i = 0; i < RMAPS_LAMA_TIMER_MAX; ++i) { - timer_start[i] = 0.0; - timer_end[i] = 0.0; - timer_accum[i] = 0.0; - } -} - - -static void rmaps_lama_display_indv_timer_core(double diff, char *str) -{ - double perc = 0; - double total = 0; - - total = timer_end[RMAPS_LAMA_TIMER_TOTAL] - timer_start[RMAPS_LAMA_TIMER_TOTAL]; - perc = (diff/total) * 100; - - opal_output(0, - "mca:rmaps:lama: \t%-20s = %10.2f ms\t%6.2f %s\n", - str, (diff * 1000), perc, "%"); - return; -} diff --git a/orte/mca/rmaps/lama/rmaps_lama_params.c b/orte/mca/rmaps/lama/rmaps_lama_params.c deleted file mode 100644 index a5df2ff422e..00000000000 --- a/orte/mca/rmaps/lama/rmaps_lama_params.c +++ /dev/null @@ -1,878 +0,0 @@ -/* - * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. - * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * Processing for command line interface options - * - */ -#include "rmaps_lama.h" - -#include "opal/util/argv.h" - -#include "orte/mca/rmaps/base/rmaps_private.h" -#include "orte/mca/rmaps/base/base.h" -#include "orte/util/show_help.h" - -#include - -/********************************* - * Local Functions - *********************************/ -/* - * QSort: Integer comparison - */ -static int lama_parse_int_sort(const void *a, const void *b); - -/* - * Convert the '-ppr' syntax from the 'ppr' component to the 'lama' '-mppr' syntax. - */ -static char * rmaps_lama_covert_ppr(char * given_ppr); - -/********************************* - * Parsing Functions - *********************************/ -int rmaps_lama_process_alias_params(orte_job_t *jdata) -{ - int exit_status = ORTE_SUCCESS; - - /* - * Mapping options - * Note: L1, L2, L3 are not exposed in orterun to the user, so - * there is no need to specify them here. - */ - if( NULL == rmaps_lama_cmd_map ) { - /* orte_rmaps_base.mapping */ - switch( ORTE_GET_MAPPING_POLICY(jdata->map->mapping) ) { - case ORTE_MAPPING_BYNODE: - /* rmaps_lama_cmd_map = strdup("nbNsL3L2L1ch"); */ - rmaps_lama_cmd_map = strdup("nbsch"); - break; - case ORTE_MAPPING_BYBOARD: - /* rmaps_lama_cmd_map = strdup("bnNsL3L2L1ch"); */ - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - "by board", "mapping by board not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - break; - case ORTE_MAPPING_BYNUMA: - /* rmaps_lama_cmd_map = strdup("NbnsL3L2L1ch"); */ - rmaps_lama_cmd_map = strdup("Nbnsch"); - break; - case ORTE_MAPPING_BYSOCKET: - /* rmaps_lama_cmd_map = strdup("sNbnL3L2L1ch"); */ - rmaps_lama_cmd_map = strdup("sbnch"); - break; - case ORTE_MAPPING_BYL3CACHE: - rmaps_lama_cmd_map = strdup("L3sNbnL2L1ch"); - break; - case ORTE_MAPPING_BYL2CACHE: - rmaps_lama_cmd_map = strdup("L2sNbnL1ch"); - break; - case ORTE_MAPPING_BYL1CACHE: - rmaps_lama_cmd_map = strdup("L1sNbnch"); - break; - case ORTE_MAPPING_BYCORE: - case ORTE_MAPPING_BYSLOT: - /* rmaps_lama_cmd_map = strdup("cL1L2L3sNbnh"); */ - rmaps_lama_cmd_map = strdup("csbnh"); - break; - case ORTE_MAPPING_BYHWTHREAD: - /* rmaps_lama_cmd_map = strdup("hcL1L2L3sNbn"); */ - rmaps_lama_cmd_map = strdup("hcsbn"); - break; - case ORTE_MAPPING_RR: - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - "round robin", "mapping by round robin not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - case ORTE_MAPPING_SEQ: - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - "sequential", "mapping by sequential not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - case ORTE_MAPPING_BYUSER: - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - "by user", "mapping by user not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - default: - /* - * Default is map-by core - */ - rmaps_lama_cmd_map = strdup("cL1L2L3sNbnh"); - break; - } - } - - /* - * Binding Options - */ - if( NULL == rmaps_lama_cmd_bind ) { - /* - * No binding specified, use default - */ - if( !OPAL_BINDING_POLICY_IS_SET(jdata->map->binding) || - !OPAL_BINDING_REQUIRED(opal_hwloc_binding_policy) || - OPAL_BIND_TO_NONE == OPAL_GET_BINDING_POLICY(jdata->map->binding) ) { - rmaps_lama_cmd_bind = NULL; - } - - switch( OPAL_GET_BINDING_POLICY(jdata->map->binding) ) { - case OPAL_BIND_TO_BOARD: - /* rmaps_lama_cmd_bind = strdup("1b"); */ - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - "by board", "binding to board not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - break; - case OPAL_BIND_TO_NUMA: - rmaps_lama_cmd_bind = strdup("1N"); - break; - case OPAL_BIND_TO_SOCKET: - rmaps_lama_cmd_bind = strdup("1s"); - break; - case OPAL_BIND_TO_L3CACHE: - rmaps_lama_cmd_bind = strdup("1L3"); - break; - case OPAL_BIND_TO_L2CACHE: - rmaps_lama_cmd_bind = strdup("1L2"); - break; - case OPAL_BIND_TO_L1CACHE: - rmaps_lama_cmd_bind = strdup("1L1"); - break; - case OPAL_BIND_TO_CORE: - rmaps_lama_cmd_bind = strdup("1c"); - break; - case OPAL_BIND_TO_HWTHREAD: - rmaps_lama_cmd_bind = strdup("1h"); - break; - case OPAL_BIND_TO_CPUSET: - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - "by CPU set", "binding to CPU set not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - break; - default: - rmaps_lama_cmd_bind = NULL; - break; - } - } - - /* - * Ordering (a.k.a. Ranking) Options - */ - if( NULL == rmaps_lama_cmd_ordering ) { - /* orte_rmaps_base.ranking */ - switch( ORTE_GET_RANKING_POLICY(jdata->map->ranking) ) { - case ORTE_RANK_BY_SLOT: - rmaps_lama_cmd_ordering = strdup("s"); - break; - case ORTE_RANK_BY_NODE: - case ORTE_RANK_BY_NUMA: - case ORTE_RANK_BY_SOCKET: - case ORTE_RANK_BY_L3CACHE: - case ORTE_RANK_BY_L2CACHE: - case ORTE_RANK_BY_L1CACHE: - case ORTE_RANK_BY_CORE: - case ORTE_RANK_BY_HWTHREAD: - rmaps_lama_cmd_ordering = strdup("n"); - break; - case ORTE_RANK_BY_BOARD: - /* rmaps_lama_cmd_ordering = strdup("n"); */ - orte_show_help("help-orte-rmaps-lama.txt", - "invalid ordering option", - true, - "by board", "ordering by board not supported by LAMA"); - exit_status = ORTE_ERR_NOT_SUPPORTED; - goto cleanup; - break; - default: - rmaps_lama_cmd_ordering = strdup("n"); - break; - } - } - - /* - * MPPR - */ - if( NULL == rmaps_lama_cmd_mppr ) { - /* - * The ppr is given in the map - */ - if( NULL != jdata->map->ppr) { - rmaps_lama_cmd_mppr = rmaps_lama_covert_ppr(jdata->map->ppr); - } - } - - /* - * Oversubscription - */ - if( ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping) ) { - rmaps_lama_can_oversubscribe = false; - } - else { - rmaps_lama_can_oversubscribe = true; - } - - /* - * Display revised values - */ - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Revised Parameters -----"); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Map : %s", - rmaps_lama_cmd_map); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Bind : %s", - rmaps_lama_cmd_bind); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: MPPR : %s", - rmaps_lama_cmd_mppr); - opal_output_verbose(5, orte_rmaps_base_framework.framework_output, - "mca:rmaps:lama: Order : %s", - rmaps_lama_cmd_ordering); - - cleanup: - return exit_status; -} - -static char * rmaps_lama_covert_ppr(char * given_ppr) -{ - return strdup(given_ppr); -} - -int rmaps_lama_parse_mapping(char *layout, - rmaps_lama_level_type_t **layout_types, - rmaps_lama_level_type_t **layout_types_sorted, - int *num_types) -{ - int exit_status = ORTE_SUCCESS; - char param[3]; - int i, j, len; - bool found_req_param_n = false; - bool found_req_param_h = false; - bool found_req_param_bind = false; - - /* - * Sanity Check: - * There is no default layout, so if we get here and nothing is specified - * then this is an error. - */ - if( NULL == layout ) { - orte_show_help("help-orte-rmaps-lama.txt", - "internal error", - true, - "rmaps_lama_parse_mapping", - "internal error 1"); - return ORTE_ERROR; - } - - *num_types = 0; - - /* - * Extract and convert all the keys - */ - len = strlen(layout); - for(i = 0; i < len; ++i) { - /* - * L1 : L1 Cache - * L2 : L2 Cache - * L3 : L3 Cache - */ - if( layout[i] == 'L' ) { - param[0] = layout[i]; - ++i; - /* - * Check for 2 characters - */ - if( i >= len ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - layout, "cache level missing number"); - exit_status = ORTE_ERROR; - goto cleanup; - } - param[1] = layout[i]; - param[2] = '\0'; - } - /* - * n : Machine - * b : Board - * s : Socket - * c : Core - * h : Hardware Thread - * N : NUMA Node - */ - else { - param[0] = layout[i]; - param[1] = '\0'; - } - - /* - * Append level - */ - *num_types += 1; - *layout_types = (rmaps_lama_level_type_t*)realloc(*layout_types, sizeof(rmaps_lama_level_type_t) * (*num_types)); - (*layout_types)[(*num_types)-1] = lama_type_str_to_enum(param); - } - - /* - * Check for duplicates and unknowns - * Copy to sorted list - */ - *layout_types_sorted = (rmaps_lama_level_type_t*)malloc(sizeof(rmaps_lama_level_type_t) * (*num_types)); - for( i = 0; i < *num_types; ++i ) { - /* - * Copy for later sorting - */ - (*layout_types_sorted)[i] = (*layout_types)[i]; - - /* - * Look for unknown and unsupported options - */ - if( LAMA_LEVEL_UNKNOWN <= (*layout_types)[i] ) { - char *msg; - asprintf(&msg, "unknown mapping level at position %d", i + 1); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } - - if( LAMA_LEVEL_MACHINE == (*layout_types)[i] ) { - found_req_param_n = true; - } - - if( LAMA_LEVEL_PU == (*layout_types)[i] ) { - found_req_param_h = true; - } - - if( lama_binding_level == (*layout_types)[i] ) { - found_req_param_bind = true; - } - - /* - * Look for duplicates - */ - for( j = i+1; j < *num_types; ++j ) { - if( (*layout_types)[i] == (*layout_types)[j] ) { - char *msg; - asprintf(&msg, "duplicate mapping levels at position %d and %d", - i + 1, j + 1); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } - } - } - - /* - * The user is required to specify at least the: - * - machine - * - hardware thread (needed for lower bound binding) JJH: We should be able to lift this... - * - binding layer (need it to stride the mapping) - * Only print the error message once, for brevity. - */ - if( !found_req_param_n ) { - char *msg; - asprintf(&msg, "missing required 'n' mapping token"); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } - else if(!found_req_param_h) { - char *msg; - asprintf(&msg, "missing required 'h' mapping token"); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } else if (!found_req_param_bind) { - char *msg; - asprintf(&msg, "missing required mapping token for the current binding level"); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mapping option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } - - /* - * Sort the items - */ - qsort((*layout_types_sorted ), (*num_types), sizeof(int), lama_parse_int_sort); - - cleanup: - return exit_status; -} - -int rmaps_lama_parse_binding(char *layout, rmaps_lama_level_type_t *binding_level, int *num_types) -{ - int exit_status = ORTE_SUCCESS; - char param[3]; - char num[MAX_BIND_DIGIT_LEN]; - int i, n, p, len; - - /* - * Default: If nothing specified - * - Bind to machine - */ - if( NULL == layout ) { - *binding_level = LAMA_LEVEL_MACHINE; - *num_types = 1; - return ORTE_SUCCESS; - } - - *num_types = 0; - - /* - * Extract and convert all the keys - */ - len = strlen(layout); - n = 0; - p = 0; - for(i = 0; i < len; ++i) { - /* - * Must start with a digit - */ - if( isdigit(layout[i]) ) { - /* - * Check: Digits must come first - */ - if( p != 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "missing digit(s) before binding level token"); - exit_status = ORTE_ERROR; - goto cleanup; - } - - num[n] = layout[i]; - ++n; - /* - * Check: Exceed bound of number of digits - */ - if( n >= MAX_BIND_DIGIT_LEN ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "too many digits"); - exit_status = ORTE_ERROR; - goto cleanup; - } - } - /* - * Extract the level - */ - else { - /* - * Check: Digits must come first - */ - if( n == 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "missing digit(s) before binding level token"); - exit_status = ORTE_ERROR; - goto cleanup; - } - /* - * Check: Only one level allowed - */ - if( p != 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "only one binding level may be specified"); - exit_status = ORTE_ERROR; - goto cleanup; - } - - /* - * L1 : L1 Cache - * L2 : L2 Cache - * L3 : L3 Cache - */ - if( layout[i] == 'L' ) { - param[0] = layout[i]; - ++i; - /* - * Check for 2 characters - */ - if( i >= len ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "only one binding level may be specified"); - exit_status = ORTE_ERROR; - goto cleanup; - } - param[1] = layout[i]; - p = 2; - } - /* - * n : Machine - * b : Board - * s : Socket - * c : Core - * h : Hardware Thread - * N : NUMA Node - */ - else { - param[0] = layout[i]; - p = 1; - } - param[p] = '\0'; - } - } - /* - * Check that the level was specified - */ - if( p == 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "binding specification is empty"); - exit_status = ORTE_ERROR; - goto cleanup; - } - num[n] = '\0'; - - *binding_level = lama_type_str_to_enum(param); - *num_types = atoi(num); - - /* - * Check for unknown level - */ - if( LAMA_LEVEL_UNKNOWN <= *binding_level ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid binding option", - true, - layout, "unknown binding level"); - exit_status = ORTE_ERROR; - goto cleanup; - } - - cleanup: - return exit_status; -} - -int rmaps_lama_parse_mppr(char *layout, rmaps_lama_level_info_t **mppr_levels, int *num_types) -{ - int exit_status = ORTE_SUCCESS; - char param[3]; - char num[MAX_BIND_DIGIT_LEN]; - char **argv = NULL; - int argc = 0; - int i, j, len; - int p, n; - - /* - * Default: Unrestricted allocation - * 'oversubscribe' flag accounted for elsewhere - */ - if( NULL == layout ) { - *mppr_levels = NULL; - *num_types = 0; - return ORTE_SUCCESS; - } - - *num_types = 0; - - /* - * Split by ',' - * <#:level>,<#:level>,... - */ - argv = opal_argv_split(layout, ','); - argc = opal_argv_count(argv); - for(j = 0; j < argc; ++j) { - /* - * Parse <#:level> - */ - len = strlen(argv[j]); - n = 0; - p = 0; - for(i = 0; i < len; ++i) { - /* - * Skip the ':' separator and whitespace - */ - if( argv[j][i] == ':' || isblank(argv[j][i])) { - continue; - } - /* - * Must start with a digit - */ - else if( isdigit(argv[j][i]) ) { - /* - * Check: Digits must come first - */ - if( p != 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, "missing digit(s) before resource specification"); - exit_status = ORTE_ERROR; - goto cleanup; - } - - num[n] = argv[j][i]; - ++n; - /* - * Check: Exceed bound of number of digits - */ - if( n >= MAX_BIND_DIGIT_LEN ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, "too many digits"); - exit_status = ORTE_ERROR; - goto cleanup; - } - } - /* - * Extract the level - */ - else { - /* - * Check: Digits must come first - */ - if( n == 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, "missing digit(s) before resource specification"); - exit_status = ORTE_ERROR; - goto cleanup; - } - /* - * Check: Only one level allowed - */ - if( p != 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, "only one resource type may be listed per specification"); - exit_status = ORTE_ERROR; - goto cleanup; - } - - /* - * L1 : L1 Cache - * L2 : L2 Cache - * L3 : L3 Cache - */ - if( argv[j][i] == 'L' ) { - param[0] = argv[j][i]; - ++i; - /* - * Check for 2 characters - */ - if( i >= len ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, "cache level missing number"); - exit_status = ORTE_ERROR; - goto cleanup; - } - param[1] = argv[j][i]; - p = 2; - } - /* - * n : Machine - * b : Board - * s : Socket - * c : Core - * h : Hardware Thread - * N : NUMA Node - */ - else { - param[0] = argv[j][i]; - p = 1; - } - param[p] = '\0'; - } - } - - /* - * Whitespace, just skip - */ - if( n == 0 && p == 0 ) { - continue; - } - - /* - * Check that the level was specified - */ - if( p == 0 ) { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, "resource type not specified"); - exit_status = ORTE_ERROR; - goto cleanup; - } - num[n] = '\0'; - - /* - * Append level - */ - *num_types += 1; - *mppr_levels = (rmaps_lama_level_info_t*)realloc(*mppr_levels, sizeof(rmaps_lama_level_info_t) * (*num_types)); - (*mppr_levels)[(*num_types)-1].type = lama_type_str_to_enum(param); - (*mppr_levels)[(*num_types)-1].max_resources = atoi(num); - - } - - /* - * Check for duplicates and unknowns - */ - for( i = 0; i < *num_types; ++i ) { - /* - * Look for unknown and unsupported options - */ - if( LAMA_LEVEL_UNKNOWN <= (*mppr_levels)[i].type ) { - char *msg; - asprintf(&msg, "unknown resource type at position %d", i + 1); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } - - /* - * Look for duplicates - */ - for( j = i+1; j < *num_types; ++j ) { - if( (*mppr_levels)[i].type == (*mppr_levels)[j].type ) { - char *msg; - asprintf(&msg, "duplicate resource tpyes at position %d and %d", - i + 1, j + 1); - orte_show_help("help-orte-rmaps-lama.txt", - "invalid mppr option", - true, - layout, msg); - free(msg); - exit_status = ORTE_ERROR; - goto cleanup; - } - } - } - - cleanup: - if( NULL != argv ) { - opal_argv_free(argv); - argv = NULL; - } - - return exit_status; -} - -int rmaps_lama_parse_ordering(char *layout, - rmaps_lama_order_type_t *order) -{ - /* - * Default: Natural ordering - */ - if( NULL == layout ) { - *order = LAMA_ORDER_NATURAL; - return ORTE_SUCCESS; - } - - /* - * Sequential Ordering - */ - if( 0 == strncmp(layout, "s", strlen("s")) || - 0 == strncmp(layout, "S", strlen("S")) ) { - *order = LAMA_ORDER_SEQ; - } - /* - * Natural Ordering - */ - else if( 0 == strncmp(layout, "n", strlen("n")) || - 0 == strncmp(layout, "N", strlen("N")) ) { - *order = LAMA_ORDER_NATURAL; - } - /* - * Check for unknown options - */ - else { - orte_show_help("help-orte-rmaps-lama.txt", - "invalid ordering option", - true, - "unsupported ordering option", layout); - return ORTE_ERROR; - } - - return ORTE_SUCCESS; -} - -bool rmaps_lama_ok_to_prune_level(rmaps_lama_level_type_t level) -{ - int i; - - for( i = 0; i < lama_mapping_num_layouts; ++i ) { - if( level == lama_mapping_layout[i] ) { - return false; - } - } - - return true; -} - -/********************************* - * Support Functions - *********************************/ -static int lama_parse_int_sort(const void *a, const void *b) { - int left = *((int*)a); - int right = *((int*)b); - - if( left < right ) { - return -1; - } - else if( left > right ) { - return 1; - } - else { - return 0; - } -} From b91fbe7662c2d4a5608cf1069174b7fd36ccdb88 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Mon, 10 Aug 2015 15:54:36 -0600 Subject: [PATCH 0124/1704] Java null handle bugfix A helper method in Request.java could cause a crash if the request array that was passed contained nulls. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/Request.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index a2831d74fe0..19ebbae665a 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -471,8 +471,12 @@ protected static long[] getHandles(Request[] r) { long[] h = new long[r.length]; - for(int i = 0; i < r.length; i++) - h[i] = r[i].handle; + for(int i = 0; i < r.length; i++) { + if(r[i] != null) + h[i] = r[i].handle; + else + h[i] = 0; + } return h; } From fa225323f9d6c04db5c4ac6bdd2a3d992e3f577e Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 26 Jun 2015 01:40:57 -0700 Subject: [PATCH 0125/1704] Protect the oob/tcp component from port scanners --- orte/mca/oob/tcp/oob_tcp_connection.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/orte/mca/oob/tcp/oob_tcp_connection.c b/orte/mca/oob/tcp/oob_tcp_connection.c index fd0b53bc1d5..4e785e4d0c6 100644 --- a/orte/mca/oob/tcp/oob_tcp_connection.c +++ b/orte/mca/oob/tcp/oob_tcp_connection.c @@ -1009,7 +1009,11 @@ static bool tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, int sd, if (opal_socket_errno != EINTR && opal_socket_errno != EAGAIN && opal_socket_errno != EWOULDBLOCK) { - if (peer->state == MCA_OOB_TCP_CONNECT_ACK) { + if (NULL == peer) { + /* protect against things like port scanners */ + CLOSE_THE_SOCKET(sd); + return false; + } else if (peer->state == MCA_OOB_TCP_CONNECT_ACK) { /* If we overflow the listen backlog, it's possible that even though we finished the three way handshake, the remote host was unable to @@ -1038,12 +1042,8 @@ static bool tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, int sd, (NULL == peer) ? "UNKNOWN" : ORTE_NAME_PRINT(&(peer->name)), strerror(opal_socket_errno), opal_socket_errno); - if (NULL != peer) { - peer->state = MCA_OOB_TCP_FAILED; - mca_oob_tcp_peer_close(peer); - } else { - CLOSE_THE_SOCKET(sd); - } + peer->state = MCA_OOB_TCP_FAILED; + mca_oob_tcp_peer_close(peer); return false; } } From 2be7c781c3440b2dbedf0c3596a6b96b71947ab9 Mon Sep 17 00:00:00 2001 From: "Nysal Jan K.A" Date: Wed, 12 Aug 2015 15:24:54 +0530 Subject: [PATCH 0126/1704] Fix PMI and PMI2 builds (cherry picked from commit open-mpi/ompi@2d2ea63) --- config/opal_check_pmi.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/opal_check_pmi.m4 b/config/opal_check_pmi.m4 index 9112eaf9b07..bf010b3def8 100644 --- a/config/opal_check_pmi.m4 +++ b/config/opal_check_pmi.m4 @@ -41,7 +41,7 @@ AC_DEFUN([OPAL_CHECK_PMI_LIB], AC_MSG_CHECKING([for $3.h in $1/include]) AS_IF([test -f $1/include/$3.h], [AC_MSG_RESULT([found]) - opal_check_$3_mycppflags="-I$3/include"], + opal_check_$3_mycppflags="-I$1/include"], [AC_MSG_RESULT([not found]) AC_MSG_CHECKING([for $3.h in $1/include/slurm]) AS_IF([test -f $1/include/slurm/$3.h], @@ -76,7 +76,7 @@ AC_DEFUN([OPAL_CHECK_PMI_LIB], [opal_check_$3_lib_happy=no])], [opal_check_$3_lib_happy=no AC_MSG_RESULT([not found])]) - + # check for presence of lib64 directory - if found, see if the # desired library is present and matches our build requirements files=`ls $2/lib64/lib$3.* 2> /dev/null | wc -l` @@ -195,12 +195,12 @@ AC_DEFUN([OPAL_CHECK_PMI],[ AS_IF([test "$opal_enable_pmi2" = "yes"], [AS_IF([test "$default_pmi_loc" = "no" || test "$slurm_pmi_found" = "yes"], - [opal_pmi2_CPPFLAGS="$pmi_CPPFLAGS" + [opal_pmi2_CPPFLAGS="$pmi2_CPPFLAGS" AC_SUBST(opal_pmi2_CPPFLAGS)]) AS_IF([test "$default_pmi_libloc" = "no" || test "$slurm_pmi_found" = "yes"], - [opal_pmi2_LDFLAGS="$pmi_LDFLAGS" + [opal_pmi2_LDFLAGS="$pmi2_LDFLAGS" AC_SUBST(opal_pmi2_LDFLAGS) - opal_pmi2_rpath="$pmi_rpath" + opal_pmi2_rpath="$pmi2_rpath" AC_SUBST(opal_pmi2_rpath)])]) # since support was explicitly requested, then we should error out From bae87dbdd9b2df4f4face3945d390a623f80ae49 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 23 Jun 2015 11:49:11 -0700 Subject: [PATCH 0127/1704] Silence a warning by converting the bitmap to a string prior to printing the error --- orte/mca/rtc/hwloc/rtc_hwloc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/orte/mca/rtc/hwloc/rtc_hwloc.c b/orte/mca/rtc/hwloc/rtc_hwloc.c index 51c95655708..6c127c2e8bc 100644 --- a/orte/mca/rtc/hwloc/rtc_hwloc.c +++ b/orte/mca/rtc/hwloc/rtc_hwloc.c @@ -105,14 +105,16 @@ static void set(orte_job_t *jobdat, rc = hwloc_set_cpubind(opal_hwloc_topology, sum->available, 0); /* if we got an error and this wasn't a default binding policy, then report it */ if (rc < 0 && OPAL_BINDING_POLICY_IS_SET(jobdat->map->binding)) { - char *tmp = NULL; if (errno == ENOSYS) { msg = "hwloc indicates cpu binding not supported"; } else if (errno == EXDEV) { msg = "hwloc indicates cpu binding cannot be enforced"; } else { + char *tmp; + (void)hwloc_bitmap_list_asprintf(&tmp, sum->available); asprintf(&msg, "hwloc_set_cpubind returned \"%s\" for bitmap \"%s\"", - opal_strerror(rc), sum->available); + opal_strerror(rc), tmp); + free(tmp); } if (OPAL_BINDING_REQUIRED(jobdat->map->binding)) { /* If binding is required, send an error up the pipe (which exits @@ -126,16 +128,8 @@ static void set(orte_job_t *jobdat, "help-orte-odls-default.txt", "not bound", orte_process_info.nodename, context->app, msg, __FILE__, __LINE__); - if (NULL != tmp) { - free(tmp); - free(msg); - } return; } - if (NULL != tmp) { - free(tmp); - free(msg); - } } } if (0 == rc && opal_hwloc_report_bindings) { From d20b4e3ff5025bc76ab50372b26c7c0d4cadbfb6 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 30 Jul 2015 17:30:07 -0500 Subject: [PATCH 0128/1704] Performance tuning: make sure the individual component is selected for 1 and 2 process communicators (important for some benchmarks) --- ompi/mca/fcoll/base/fcoll_base_file_select.c | 3 +++ ompi/mca/fcoll/individual/fcoll_individual_module.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ompi/mca/fcoll/base/fcoll_base_file_select.c b/ompi/mca/fcoll/base/fcoll_base_file_select.c index 433098af365..9dba84ed432 100644 --- a/ompi/mca/fcoll/base/fcoll_base_file_select.c +++ b/ompi/mca/fcoll/base/fcoll_base_file_select.c @@ -262,6 +262,9 @@ int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, char *name) file->f_cc_size >= file->f_stripe_size) { return 1; } + if ( 2 >= (int)file->f_size ){ + return 1; + } } if (!strcmp (name, "dynamic")) { if ((int)file->f_cc_size < file->f_bytes_per_agg && diff --git a/ompi/mca/fcoll/individual/fcoll_individual_module.c b/ompi/mca/fcoll/individual/fcoll_individual_module.c index b9c95a86bae..eb30d6c41c9 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_module.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_module.c @@ -64,6 +64,9 @@ mca_fcoll_individual_component_file_query (mca_io_ompio_file_t *fh, int *priorit if (*priority < 50) { *priority = 50; } + if ( 2 >= fh->f_size ) { + *priority = 100; + } } return &individual; From a0704b9b468e1f38235b24caa38e42e6978a8970 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 7 Aug 2015 11:50:25 -0500 Subject: [PATCH 0129/1704] free the datatypes that were created using type_dup during file_set_view --- ompi/mca/io/ompio/io_ompio_file_open.c | 8 ++++++++ ompi/mca/io/ompio/io_ompio_file_set_view.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index 057c57e7af4..3d85a20a219 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -380,6 +380,14 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh) ompi_datatype_destroy (&ompio_fh->f_iov_type); } + if ( MPI_DATATYPE_NULL != ompio_fh->f_etype ) { + ompi_datatype_destroy (&ompio_fh->f_etype); + } + if ( MPI_DATATYPE_NULL != ompio_fh->f_filetype ){ + ompi_datatype_destroy (&ompio_fh->f_filetype); + } + + if (MPI_COMM_NULL != ompio_fh->f_comm && (ompio_fh->f_flags & OMPIO_SHAREDFP_IS_SET) ) { ompi_comm_free (&ompio_fh->f_comm); } diff --git a/ompi/mca/io/ompio/io_ompio_file_set_view.c b/ompi/mca/io/ompio/io_ompio_file_set_view.c index 812e3096b73..7cbdec6801d 100644 --- a/ompi/mca/io/ompio/io_ompio_file_set_view.c +++ b/ompi/mca/io/ompio/io_ompio_file_set_view.c @@ -138,7 +138,10 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, data = (mca_io_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; - + + ompi_datatype_destroy (&fh->f_etype); + ompi_datatype_destroy (&fh->f_filetype); + if (NULL != fh->f_decoded_iov) { free (fh->f_decoded_iov); fh->f_decoded_iov = NULL; From abaac84476bcf362ecdfc7701f8a2dc9ec14216e Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 7 Aug 2015 12:49:58 -0500 Subject: [PATCH 0130/1704] Performance tuning. make sure we catch if the user wants to set the default fileview and replace it with our optimized default file view. Otherwise, performance will suffer. file_get_view should still return the correct filetype, not our optimized default file view. This is the correct version compared to ffa67b96933acafb3cfacf39a074d3dc1fe134ae, which unfortunately broke some test cases in mpi_test_suite. Thanks for @ggouaillardet for reporting this! Conflicts: ompi/mca/io/ompio/io_ompio.c ompi/mca/io/ompio/io_ompio_file_set_view.c --- ompi/mca/io/ompio/io_ompio.c | 8 ++--- ompi/mca/io/ompio/io_ompio.h | 3 ++ ompi/mca/io/ompio/io_ompio_file_open.c | 4 +++ ompi/mca/io/ompio/io_ompio_file_set_view.c | 42 +++++++++++++++++----- 4 files changed, 44 insertions(+), 13 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index dd8c1f665f2..bcb48a77c27 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -102,7 +102,6 @@ static int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, int num_merge_aggrs); - int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh) { @@ -133,15 +132,16 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh) fh->f_init_num_aggrs = -1; fh->f_init_aggr_list = NULL; - ompi_datatype_create_contiguous(1048576, + ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE, &ompi_mpi_byte.dt, &default_file_view); ompi_datatype_commit (&default_file_view); fh->f_etype = &ompi_mpi_byte.dt; fh->f_filetype = default_file_view; - - + ompi_datatype_duplicate ( &ompi_mpi_byte.dt, &fh->f_orig_filetype ); + + /* Default file View */ fh->f_iov_type = MPI_DATATYPE_NULL; fh->f_stripe_size = mca_io_ompio_bytes_per_agg; diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index 0649f7a01e6..e15769edac9 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -57,7 +57,9 @@ OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info; #define OMPIO_CONTIGUOUS_FVIEW 0x00000010 #define OMPIO_AGGREGATOR_IS_SET 0x00000020 #define OMPIO_SHAREDFP_IS_SET 0x00000040 + #define QUEUESIZE 2048 +#define MCA_IO_DEFAULT_FILE_VIEW_SIZE 4*1024*1024 #define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b)) #define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a)) @@ -320,6 +322,7 @@ struct mca_io_ompio_file_t { size_t f_view_size; ompi_datatype_t *f_etype; ompi_datatype_t *f_filetype; + ompi_datatype_t *f_orig_filetype; /* the fileview passed by the user to us */ size_t f_etype_size; /* contains IO requests that needs to be read/written */ diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index 3d85a20a219..75e6226947f 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -387,6 +387,10 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh) ompi_datatype_destroy (&ompio_fh->f_filetype); } + if ( MPI_DATATYPE_NULL != ompio_fh->f_orig_filetype ){ + ompi_datatype_destroy (&ompio_fh->f_orig_filetype); + } + if (MPI_COMM_NULL != ompio_fh->f_comm && (ompio_fh->f_flags & OMPIO_SHAREDFP_IS_SET) ) { ompi_comm_free (&ompio_fh->f_comm); diff --git a/ompi/mca/io/ompio/io_ompio_file_set_view.c b/ompi/mca/io/ompio/io_ompio_file_set_view.c index 7cbdec6801d..a45e2acf7bc 100644 --- a/ompi/mca/io/ompio/io_ompio_file_set_view.c +++ b/ompi/mca/io/ompio/io_ompio_file_set_view.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -135,12 +135,15 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, { mca_io_ompio_data_t *data; mca_io_ompio_file_t *fh; + size_t ftype_size; + OPAL_PTRDIFF_TYPE ftype_extent, lb; data = (mca_io_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; ompi_datatype_destroy (&fh->f_etype); ompi_datatype_destroy (&fh->f_filetype); + ompi_datatype_destroy (&fh->f_orig_filetype); if (NULL != fh->f_decoded_iov) { free (fh->f_decoded_iov); @@ -157,14 +160,35 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, fh->f_flags |= OMPIO_FILE_VIEW_IS_SET; fh->f_datarep = strdup (datarep); - - mca_io_ompio_set_view_internal (fh, - disp, - etype, - filetype, - datarep, - info); + ompi_datatype_duplicate (filetype, &fh->f_orig_filetype ); + opal_datatype_get_extent(&filetype->super, &lb, &ftype_extent); + opal_datatype_type_size (&filetype->super, &ftype_size); + + if ( etype == filetype && + ompi_datatype_is_predefined (filetype ) && + ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){ + ompi_datatype_t *newfiletype; + ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE, + &ompi_mpi_byte.dt, + &newfiletype); + ompi_datatype_commit (&newfiletype); + mca_io_ompio_set_view_internal (fh, + disp, + etype, + newfiletype, + datarep, + info); + ompi_datatype_destroy ( &newfiletype ); + } + else { + mca_io_ompio_set_view_internal (fh, + disp, + etype, + filetype, + datarep, + info); + } if (OMPI_SUCCESS != mca_fcoll_base_file_select (&data->ompio_fh, NULL)) { @@ -189,7 +213,7 @@ int mca_io_ompio_file_get_view (struct ompi_file_t *fp, *disp = fh->f_disp; ompi_datatype_duplicate (fh->f_etype, etype); - ompi_datatype_duplicate (fh->f_filetype, filetype); + ompi_datatype_duplicate (fh->f_orig_filetype, filetype); strcpy (datarep, fh->f_datarep); return OMPI_SUCCESS; From cb67db0d3acbcf6dfe8f16f3d19b414156dc9a98 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 7 Aug 2015 13:06:39 -0500 Subject: [PATCH 0131/1704] Performance tuning: change the default behavior of ompio to *not* segment individual read/write operations. In most cases, performance seems to be better if not segmented. --- ompi/mca/io/ompio/io_ompio_component.c | 6 +++--- ompi/mca/io/ompio/io_ompio_file_read.c | 7 ++++++- ompi/mca/io/ompio/io_ompio_file_write.c | 7 ++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index 9f64fca0684..239ec425ae6 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -31,7 +31,7 @@ #include "ompi/mca/io/io.h" #include "io_ompio.h" -int mca_io_ompio_cycle_buffer_size = OMPIO_PREALLOC_MAX_BUF_SIZE; +int mca_io_ompio_cycle_buffer_size = -1; int mca_io_ompio_bytes_per_agg = OMPIO_PREALLOC_MAX_BUF_SIZE; int mca_io_ompio_num_aggregators = -1; int mca_io_ompio_record_offset_info = 0; @@ -162,10 +162,10 @@ static int register_component(void) MCA_BASE_VAR_SCOPE_READONLY, &mca_io_ompio_coll_timing_info); - mca_io_ompio_cycle_buffer_size = OMPIO_PREALLOC_MAX_BUF_SIZE; + mca_io_ompio_cycle_buffer_size = -1; (void) mca_base_component_var_register(&mca_io_ompio_component.io_version, "cycle_buffer_size", - "Cycle buffer size of individual reads/writes", + "Data size issued by individual reads/writes per call", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, diff --git a/ompi/mca/io/ompio/io_ompio_file_read.c b/ompi/mca/io/ompio/io_ompio_file_read.c index 1150bf27fc6..fe30169b168 100644 --- a/ompi/mca/io/ompio/io_ompio_file_read.c +++ b/ompi/mca/io/ompio/io_ompio_file_read.c @@ -106,7 +106,12 @@ int ompio_io_ompio_file_read (mca_io_ompio_file_t *fh, &decoded_iov, &iov_count); - bytes_per_cycle = mca_io_ompio_cycle_buffer_size; + if ( -1 == mca_io_ompio_cycle_buffer_size ) { + bytes_per_cycle = max_data; + } + else { + bytes_per_cycle = mca_io_ompio_cycle_buffer_size; + } cycles = ceil((float)max_data/bytes_per_cycle); #if 0 diff --git a/ompi/mca/io/ompio/io_ompio_file_write.c b/ompi/mca/io/ompio/io_ompio_file_write.c index 08038ddc66f..28d8e4a3a7c 100644 --- a/ompi/mca/io/ompio/io_ompio_file_write.c +++ b/ompi/mca/io/ompio/io_ompio_file_write.c @@ -103,7 +103,12 @@ int ompio_io_ompio_file_write (mca_io_ompio_file_t *fh, &decoded_iov, &iov_count); - bytes_per_cycle = mca_io_ompio_cycle_buffer_size; + if ( -1 == mca_io_ompio_cycle_buffer_size ) { + bytes_per_cycle = max_data; + } + else { + bytes_per_cycle = mca_io_ompio_cycle_buffer_size; + } cycles = ceil((float)max_data/bytes_per_cycle); #if 0 From 86dcdf9716a3c98e078dad89756350091445ca8e Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 7 Aug 2015 13:30:50 -0500 Subject: [PATCH 0132/1704] free memory correctly in case of an error. Fixes CID 131540 and CID 1315419 --- .../sharedfp_individual_file_open.c | 22 ++++++++++++++++++- .../sharedfp_lockedfile_file_open.c | 5 +++++ ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c index 01dac1eceb2..a0d33fe7a61 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c @@ -59,6 +59,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, if ( NULL == sh ){ opal_output(0, "mca_sharedfp_individual_file_open: Error, unable to malloc " "f_sharedfp_ptr struct\n"); + free (shfileHandle ); return OMPI_ERR_OUT_OF_RESOURCE; } @@ -93,6 +94,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, MPI_INFO_NULL, datafilehandle, false); if ( OMPI_SUCCESS != err) { opal_output(0, "mca_sharedfp_individual_file_open: Error during datafile file open\n"); + free (shfileHandle ); + free (sh); return err; } @@ -105,15 +108,32 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, } /* metadata filename created by appending .metadata.$rank to the original filename*/ - metadatafilename = (char*) malloc ( len ); + metadatafilename = (char*) malloc ( len ); + if ( NULL == metadatafilename ) { + free (shfileHandle ); + free (sh); + opal_output(0, "mca_sharedfp_individual_file_open: Error during memory allocation\n"); + return OMPI_ERR_OUT_OF_RESOURCE; + } snprintf ( metadatafilename, len, "%s%s%d", filename, ".metadata.",rank); metadatafilehandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + if ( NULL == metadatafilehandle ) { + free (shfileHandle ); + free (sh); + free (metadatafilename); + opal_output(0, "mca_sharedfp_individual_file_open: Error during memory allocation\n"); + return OMPI_ERR_OUT_OF_RESOURCE; + } err = ompio_io_ompio_file_open ( MPI_COMM_SELF,metadatafilename, MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, metadatafilehandle, false); if ( OMPI_SUCCESS != err) { opal_output(0, "mca_sharedfp_individual_file_open: Error during metadatafile file open\n"); + free (shfileHandle ); + free (sh); + free (metadatafilename); + free (metadatafilehandle); return err; } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c index 4687a70c9fe..c21e8e15ba2 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c @@ -58,6 +58,7 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t)); if ( NULL == sh){ opal_output(0, "mca_sharedfp_lockedfile_file_open: Error, unable to malloc f_sharedfp_ptr struct\n"); + free ( shfileHandle); return OMPI_ERR_OUT_OF_RESOURCE; } /*Populate the sh file structure based on the implementation*/ @@ -77,6 +78,8 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, module_data = (struct mca_sharedfp_lockedfile_data*)malloc(sizeof(struct mca_sharedfp_lockedfile_data)); if ( NULL == module_data ) { printf("mca_sharedfp_lockedfile_file_open: Error, unable to malloc lockedfile_data struct\n"); + free (shfileHandle); + free (sh); return OMPI_ERR_OUT_OF_RESOURCE; } @@ -101,6 +104,8 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, handle = open ( lockedfilename, O_RDWR, 0644 ); if ( -1 == handle ) { printf("[%d]mca_sharedfp_lockedfile_file_open: Error during file open\n", rank); + free (shfileHandle); + free (sh); free(module_data); return OMPI_ERROR; } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c index 3b38c0a9fb5..c6916e9a4e6 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c @@ -64,9 +64,14 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /*Open the same file again without shared file pointer*/ /*----------------------------------------------------*/ shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + if ( NULL == shfileHandle ) { + opal_output(0, "mca_sharedfp_sm_file_open: Error during memory allocation\n"); + return OMPI_ERR_OUT_OF_RESOURCE; + } err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false); if ( OMPI_SUCCESS != err) { opal_output(0, "mca_sharedfp_sm_file_open: Error during file open\n"); + free (shfileHandle); return err; } From cadb089720704898c98fe7d3c03421d3823896eb Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 24 Jun 2015 22:01:09 -0700 Subject: [PATCH 0133/1704] Initialize variable to make clang happy --- orte/mca/rtc/hwloc/rtc_hwloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orte/mca/rtc/hwloc/rtc_hwloc.c b/orte/mca/rtc/hwloc/rtc_hwloc.c index 51c95655708..1a5190007ac 100644 --- a/orte/mca/rtc/hwloc/rtc_hwloc.c +++ b/orte/mca/rtc/hwloc/rtc_hwloc.c @@ -66,7 +66,7 @@ static void set(orte_job_t *jobdat, hwloc_obj_t root; opal_hwloc_topo_data_t *sum; orte_app_context_t *context; - int rc; + int rc=ORTE_ERROR; char *msg, *param; char *cpu_bitmap; From 52408993e9908dab987cecd7284db7b4addaea57 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 30 Jul 2015 17:24:01 -0500 Subject: [PATCH 0134/1704] make sure the final number of aggregators is recorded correctly when not using our aggregator selection logic. From 318c06ac31a08b339efcc1ddeb1d8d9b78c4eaf3 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 7 Aug 2015 16:32:53 -0500 Subject: [PATCH 0135/1704] Performance tuning: increase the priority of the sm sharedfp component to ensure that it is selected if it can run. --- ompi/mca/sharedfp/sm/sharedfp_sm_component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_component.c b/ompi/mca/sharedfp/sm/sharedfp_sm_component.c index 3f629da8a28..69a0e06a0c3 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_component.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_component.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ @@ -38,7 +38,7 @@ const char *mca_sharedfp_sm_component_version_string = /* * Global variables */ -int mca_sharedfp_sm_priority=10; +int mca_sharedfp_sm_priority=30; int mca_sharedfp_sm_verbose=0; static int sm_register(void); @@ -72,7 +72,7 @@ mca_sharedfp_base_component_2_0_0_t mca_sharedfp_sm_component = { static int sm_register(void) { - mca_sharedfp_sm_priority = 10; + mca_sharedfp_sm_priority = 30; (void) mca_base_component_var_register(&mca_sharedfp_sm_component.sharedfpm_version, "priority", "Priority of the sm sharedfp component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, From b1b101354f90c2e58a45cfcb2b46f896708bf894 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 24 Jun 2015 10:00:01 -0600 Subject: [PATCH 0136/1704] more c99 updates This commit does two things. It removes checks for C99 required headers (stdlib.h, string.h, signal.h, etc). Additionally it removes definitions for required C99 types (intptr_t, int64_t, int32_t, etc). Signed-off-by: Nathan Hjelm Conflicts: ompi/mca/coll/ml/coll_ml_allocation.c opal/include/opal_stdint.h opal/mca/reachable/weighted/reachable_weighted.c orte/mca/rmaps/lama/rmaps_lama_module.c --- configure.ac | 15 +- ompi/attribute/attribute_predefined.c | 2 - ompi/datatype/ompi_datatype.h | 6 - ompi/datatype/ompi_datatype_create.c | 2 - ompi/debuggers/ompi_mpihandles_dll.c | 4 - ompi/debuggers/ompi_msgq_dll.c | 4 - ompi/errhandler/errcode.c | 2 - ompi/errhandler/errhandler.c | 2 - ompi/info/info.c | 4 - ompi/mca/coll/cuda/coll_cuda_module.c | 2 - ompi/mca/coll/sm/coll_sm_bcast.c | 2 - ompi/mca/coll/sm/coll_sm_module.c | 2 - ompi/mca/coll/sm/coll_sm_reduce.c | 2 - ompi/mca/dpm/base/base.h | 2 - ompi/mca/dpm/base/dpm_base_null_fns.c | 2 - ompi/mca/dpm/dpm.h | 2 - ompi/mca/dpm/orte/dpm_orte.c | 2 - .../romio314/romio/adio/ad_xfs/ad_xfs_open.c | 2 - .../romio314/romio/adio/common/system_hints.c | 4 - ompi/mca/op/base/op_base_frame.c | 2 - ompi/mca/osc/osc.h | 2 - ompi/mca/pml/base/pml_base_frame.c | 2 - ompi/mca/pml/base/pml_base_select.c | 2 - ompi/mca/pml/v/pml_v_output.c | 2 - ompi/mca/topo/base/topo_base_cart_get.c | 2 - .../vprotocol/base/vprotocol_base_select.c | 2 - ompi/mpi/java/c/mpi_Intracomm.c | 2 - ompi/mpi/java/c/mpi_MPI.c | 4 - ompi/peruse/peruse.c | 2 - ompi/peruse/peruse_module.c | 2 - ompi/runtime/ompi_mpi_params.c | 4 - ompi/tools/ompi_info/ompi_info.c | 2 - opal/class/opal_hash_table.h | 2 - opal/class/opal_object.h | 2 - opal/datatype/opal_convertor.c | 3 - .../opal_copy_functions_heterogeneous.c | 2 - opal/datatype/opal_datatype_internal.h | 4 - opal/dss/dss_internal.h | 8 +- opal/include/opal/sys/atomic_impl.h | 2 - opal/include/opal/types.h | 2 - opal/include/opal_config_bottom.h | 7 - opal/include/opal_stdint.h | 241 +----------------- .../mca/allocator/base/allocator_base_frame.c | 2 - opal/mca/btl/self/btl_self.h | 2 - opal/mca/btl/self/btl_self_component.c | 2 - opal/mca/btl/sm/btl_sm.h | 2 - opal/mca/btl/sm/btl_sm_component.c | 2 - opal/mca/btl/smcuda/btl_smcuda.h | 2 - opal/mca/btl/smcuda/btl_smcuda_component.c | 2 - opal/mca/btl/tcp/btl_tcp_endpoint.c | 2 - opal/mca/btl/usnic/btl_usnic_mca.c | 2 - opal/mca/btl/vader/btl_vader.h | 2 - opal/mca/common/verbs/common_verbs_qp_type.c | 2 - opal/mca/crs/base/crs_base_fns.c | 2 - opal/mca/crs/none/crs_none_module.c | 2 - opal/mca/crs/self/crs_self_module.c | 2 - opal/mca/event/event.h | 4 - opal/mca/hwloc/hwloc.h | 4 - .../hwloc1110/hwloc/include/private/private.h | 2 - opal/mca/mpool/base/mpool_base_alloc.c | 4 - opal/mca/mpool/sm/mpool_sm_component.c | 2 - opal/mca/pmix/native/pmix_native.c | 2 - opal/mca/pstat/linux/pstat_linux_module.c | 2 - opal/mca/pstat/test/pstat_test.c | 2 - opal/mca/sec/basic/sec_basic.c | 2 - opal/mca/sec/keystone/sec_keystone.c | 2 - opal/mca/sec/munge/sec_munge.c | 2 - opal/mca/shmem/base/shmem_base_select.c | 2 - opal/mca/shmem/mmap/shmem_mmap_module.c | 4 - .../shmem/posix/shmem_posix_common_utils.c | 2 - opal/mca/shmem/posix/shmem_posix_component.c | 2 - opal/mca/shmem/posix/shmem_posix_module.c | 2 - opal/mca/shmem/shmem_types.h | 4 - opal/mca/shmem/sysv/shmem_sysv_component.c | 2 - opal/mca/shmem/sysv/shmem_sysv_module.c | 2 - opal/mca/timer/linux/timer_linux_component.c | 2 - opal/runtime/opal_cr.c | 4 - opal/runtime/opal_params.c | 2 - opal/threads/condition.h | 2 - opal/threads/threads.h | 2 - opal/tools/opal-checkpoint/opal-checkpoint.c | 6 - opal/tools/opal-restart/opal-restart.c | 4 - opal/tools/wrappers/opal_wrapper.c | 4 - opal/util/argv.c | 4 - opal/util/basename.c | 2 - opal/util/cmd_line.c | 2 - opal/util/crc.c | 4 - opal/util/error.c | 4 - opal/util/keyval_parse.c | 2 - opal/util/opal_getcwd.c | 2 - opal/util/opal_pty.c | 2 - opal/util/output.h | 2 - opal/util/stacktrace.c | 5 - opal/util/sys_limits.c | 2 - opal/util/timings.c | 2 - opal/win32/win_compat.h | 2 - orte/mca/dfs/app/dfs_app.c | 2 - orte/mca/dfs/base/dfs_base_frame.c | 2 - orte/mca/dfs/base/dfs_base_select.c | 2 - orte/mca/dfs/orted/dfs_orted.c | 2 - orte/mca/dfs/test/dfs_test.c | 2 - orte/mca/errmgr/base/errmgr_base_fns.c | 2 - orte/mca/errmgr/base/errmgr_base_frame.c | 2 - orte/mca/errmgr/base/errmgr_base_select.c | 2 - orte/mca/errmgr/base/errmgr_base_tool.c | 2 - .../errmgr/default_app/errmgr_default_app.c | 2 - .../errmgr/default_hnp/errmgr_default_hnp.c | 2 - .../default_orted/errmgr_default_orted.c | 2 - .../errmgr/default_tool/errmgr_default_tool.c | 2 - orte/mca/ess/lsf/ess_lsf_module.c | 2 - orte/mca/ess/pmi/ess_pmi_module.c | 2 - orte/mca/ess/singleton/ess_singleton_module.c | 2 - orte/mca/ess/slurm/ess_slurm_module.c | 2 - orte/mca/ess/tm/ess_tm_module.c | 2 - orte/mca/filem/base/filem_base_fns.c | 2 - orte/mca/filem/base/filem_base_receive.c | 2 - orte/mca/filem/base/filem_base_select.c | 2 - orte/mca/filem/raw/filem_raw_module.c | 2 - orte/mca/iof/base/base.h | 2 - orte/mca/iof/base/iof_base_frame.c | 2 - orte/mca/iof/base/iof_base_output.c | 4 - orte/mca/iof/hnp/iof_hnp.c | 2 - orte/mca/iof/hnp/iof_hnp_read.c | 2 - orte/mca/iof/hnp/iof_hnp_receive.c | 2 - orte/mca/iof/hnp/iof_hnp_send.c | 2 - orte/mca/iof/mr_hnp/iof_mrhnp.c | 2 - orte/mca/iof/mr_hnp/iof_mrhnp_read.c | 2 - orte/mca/iof/mr_hnp/iof_mrhnp_receive.c | 2 - orte/mca/iof/mr_orted/iof_mrorted.c | 2 - orte/mca/iof/mr_orted/iof_mrorted_read.c | 2 - orte/mca/iof/mr_orted/iof_mrorted_receive.c | 2 - orte/mca/iof/orted/iof_orted.c | 2 - orte/mca/iof/orted/iof_orted_read.c | 2 - orte/mca/iof/orted/iof_orted_receive.c | 2 - orte/mca/iof/tool/iof_tool.c | 2 - orte/mca/iof/tool/iof_tool_receive.c | 2 - orte/mca/notifier/base/notifier_base_frame.c | 2 - orte/mca/notifier/base/notifier_base_select.c | 2 - orte/mca/notifier/notifier.h | 4 - orte/mca/notifier/smtp/notifier_smtp_module.c | 4 - .../notifier/syslog/notifier_syslog_module.c | 2 - orte/mca/odls/alps/odls_alps_module.c | 6 - orte/mca/odls/base/odls_base_default_fns.c | 2 - orte/mca/odls/base/odls_base_frame.c | 2 - orte/mca/odls/default/odls_default_module.c | 6 - orte/mca/plm/alps/plm_alps_module.c | 4 - orte/mca/plm/base/plm_base_orted_cmds.c | 2 - orte/mca/plm/base/plm_base_receive.c | 2 - orte/mca/plm/lsf/plm_lsf_module.c | 2 - orte/mca/plm/rsh/plm_rsh.h | 2 - orte/mca/plm/rsh/plm_rsh_module.c | 2 - orte/mca/plm/slurm/plm_slurm_module.c | 4 - orte/mca/plm/tm/plm_tm_module.c | 2 - orte/mca/qos/base/qos_base_channel_handlers.c | 2 - orte/mca/qos/noop/qos_noop_channel_handlers.c | 2 - orte/mca/ras/base/ras_base_allocate.c | 2 - orte/mca/rmaps/base/rmaps_base_frame.c | 2 - orte/mca/rmaps/mindist/rmaps_mindist_module.c | 2 - orte/mca/rmaps/ppr/rmaps_ppr.c | 2 - orte/mca/rmaps/rank_file/rmaps_rank_file.c | 2 - .../rank_file/rmaps_rank_file_component.c | 2 - orte/mca/rmaps/resilient/rmaps_resilient.c | 2 - orte/mca/rmaps/round_robin/rmaps_rr.c | 2 - orte/mca/rmaps/seq/rmaps_seq.c | 2 - orte/mca/rmaps/staged/rmaps_staged.c | 2 - orte/mca/rml/base/rml_base_channel_handlers.c | 2 - orte/mca/rml/base/rml_base_frame.c | 2 - orte/mca/rml/base/rml_base_msg_handlers.c | 2 - orte/mca/rml/base/rml_base_receive.c | 2 - orte/mca/rtc/base/rtc_base_frame.c | 2 - orte/mca/rtc/freq/rtc_freq.c | 2 - orte/mca/rtc/hwloc/rtc_hwloc.c | 2 - orte/mca/schizo/base/schizo_base_frame.c | 2 - orte/mca/snapc/base/snapc_base_fns.c | 2 - orte/mca/snapc/base/snapc_base_frame.c | 2 - orte/mca/snapc/base/snapc_base_select.c | 2 - orte/mca/snapc/full/snapc_full_app.c | 4 - orte/mca/snapc/full/snapc_full_global.c | 2 - orte/mca/snapc/full/snapc_full_local.c | 4 - orte/mca/sstore/base/sstore_base_fns.c | 2 - orte/mca/sstore/base/sstore_base_select.c | 2 - orte/mca/sstore/central/sstore_central_app.c | 2 - .../sstore/central/sstore_central_global.c | 2 - .../mca/sstore/central/sstore_central_local.c | 2 - .../sstore/central/sstore_central_module.c | 2 - orte/mca/sstore/stage/sstore_stage_app.c | 2 - orte/mca/sstore/stage/sstore_stage_global.c | 2 - orte/mca/sstore/stage/sstore_stage_local.c | 2 - orte/mca/sstore/stage/sstore_stage_module.c | 2 - orte/mca/state/app/state_app.c | 2 - orte/mca/state/base/state_base_frame.c | 2 - orte/mca/state/base/state_base_select.c | 2 - orte/mca/state/dvm/state_dvm.c | 2 - orte/mca/state/hnp/state_hnp.c | 2 - orte/mca/state/novm/state_novm.c | 2 - orte/mca/state/orted/state_orted.c | 2 - orte/mca/state/staged_hnp/state_staged_hnp.c | 2 - .../state/staged_orted/state_staged_orted.c | 2 - orte/mca/state/tool/state_tool.c | 2 - orte/orted/orted.h | 2 - orte/orted/orted_comm.c | 2 - orte/orted/orted_main.c | 2 - .../data_type_support/orte_dt_compare_fns.c | 2 - .../data_type_support/orte_dt_copy_fns.c | 2 - orte/runtime/orte_data_server.c | 2 - orte/runtime/orte_quit.c | 2 - orte/runtime/orte_wait.c | 2 - orte/runtime/orte_wait.h | 2 - orte/tools/orte-checkpoint/orte-checkpoint.c | 4 - orte/tools/orte-clean/orte-clean.c | 4 - orte/tools/orte-dvm/orte-dvm.c | 4 - orte/tools/orte-info/orte-info.c | 2 - orte/tools/orte-info/output.c | 2 - orte/tools/orte-migrate/orte-migrate.c | 4 - orte/tools/orte-ps/orte-ps.c | 4 - orte/tools/orte-restart/orte-restart.c | 4 - orte/tools/orte-server/orte-server.c | 2 - orte/tools/orte-submit/orte-submit.c | 4 - orte/tools/orted/orted.c | 2 - orte/tools/orterun/orterun.c | 4 - orte/util/dash_host/dash_host.c | 2 - orte/util/error_strings.c | 2 - orte/util/pre_condition_transports.c | 4 - orte/util/proc_info.h | 2 - oshmem/mca/spml/base/spml_base_frame.c | 2 - oshmem/mca/spml/base/spml_base_select.c | 2 - oshmem/mca/sshmem/base/sshmem_base_select.c | 2 - oshmem/mca/sshmem/mmap/sshmem_mmap_module.c | 4 - .../mca/sshmem/sysv/sshmem_sysv_component.c | 2 - oshmem/mca/sshmem/sysv/sshmem_sysv_module.c | 2 - oshmem/mca/sshmem/verbs/sshmem_verbs_module.c | 4 - oshmem/tools/oshmem_info/oshmem_info.c | 2 - test/class/ompi_rb_tree.c | 2 - test/class/opal_hash_table.c | 2 - test/class/opal_proc_table.c | 2 - test/datatype/ddt_pack.c | 4 - test/datatype/opal_ddt_lib.c | 5 +- 237 files changed, 15 insertions(+), 819 deletions(-) diff --git a/configure.ac b/configure.ac index a46a7c6d1ed..528a676b33b 100644 --- a/configure.ac +++ b/configure.ac @@ -592,18 +592,17 @@ AC_CACHE_SAVE opal_show_title "Header file tests" AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \ - dlfcn.h execinfo.h err.h fcntl.h grp.h inttypes.h libgen.h \ + dlfcn.h execinfo.h err.h fcntl.h grp.h libgen.h \ libutil.h memory.h netdb.h netinet/in.h netinet/tcp.h \ - poll.h pthread.h pty.h pwd.h sched.h stdint.h stddef.h \ - stdlib.h string.h strings.h stropts.h sys/fcntl.h sys/ipc.h sys/shm.h \ + poll.h pthread.h pty.h pwd.h sched.h \ + strings.h stropts.h sys/fcntl.h sys/ipc.h sys/shm.h \ sys/ioctl.h sys/mman.h sys/param.h sys/queue.h \ sys/resource.h sys/select.h sys/socket.h sys/sockio.h \ - stdarg.h sys/stat.h sys/statfs.h sys/statvfs.h sys/time.h sys/tree.h \ + sys/stat.h sys/statfs.h sys/statvfs.h sys/time.h sys/tree.h \ sys/types.h sys/uio.h sys/un.h net/uio.h sys/utsname.h sys/vfs.h sys/wait.h syslog.h \ - time.h termios.h ulimit.h unistd.h util.h utmp.h malloc.h \ - ifaddrs.h crt_externs.h regex.h signal.h \ - mntent.h paths.h \ - ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h limits.h db.h ndbm.h]) + termios.h ulimit.h unistd.h util.h utmp.h malloc.h \ + ifaddrs.h crt_externs.h regex.h mntent.h paths.h \ + ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h db.h ndbm.h]) AC_CHECK_HEADERS([sys/mount.h], [], [], [AC_INCLUDES_DEFAULT diff --git a/ompi/attribute/attribute_predefined.c b/ompi/attribute/attribute_predefined.c index c2d3d631f1c..731f4795035 100644 --- a/ompi/attribute/attribute_predefined.c +++ b/ompi/attribute/attribute_predefined.c @@ -81,9 +81,7 @@ #include "ompi_config.h" -#ifdef HAVE_STDLIB_H #include -#endif #include "mpi.h" diff --git a/ompi/datatype/ompi_datatype.h b/ompi/datatype/ompi_datatype.h index 55aeaa9e6d2..c3c1a8b07fb 100644 --- a/ompi/datatype/ompi_datatype.h +++ b/ompi/datatype/ompi_datatype.h @@ -28,15 +28,9 @@ #include "ompi_config.h" #include -#ifdef HAVE_STDINT_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif -#ifdef HAVE_LIMITS_H #include -#endif #include "ompi/constants.h" #include "opal/datatype/opal_convertor.h" diff --git a/ompi/datatype/ompi_datatype_create.c b/ompi/datatype/ompi_datatype_create.c index b73eb781cab..d97d9c942ac 100644 --- a/ompi/datatype/ompi_datatype_create.c +++ b/ompi/datatype/ompi_datatype_create.c @@ -20,9 +20,7 @@ #include "ompi_config.h" #include -#ifdef HAVE_STRING_H #include -#endif #include "opal/class/opal_pointer_array.h" #include "ompi/datatype/ompi_datatype.h" diff --git a/ompi/debuggers/ompi_mpihandles_dll.c b/ompi/debuggers/ompi_mpihandles_dll.c index 1f598d6b905..035a6b5b7bf 100644 --- a/ompi/debuggers/ompi_mpihandles_dll.c +++ b/ompi/debuggers/ompi_mpihandles_dll.c @@ -36,12 +36,8 @@ #include "ompi_config.h" -#if defined(HAVE_STRING_H) #include -#endif /* defined(HAVE_STRING_H) */ -#if defined(HAVE_STDLIB_H) #include -#endif /* defined(HAVE_STDLIB_H) */ #include "ompi/mca/pml/base/pml_base_request.h" #include "mpihandles_interface.h" diff --git a/ompi/debuggers/ompi_msgq_dll.c b/ompi/debuggers/ompi_msgq_dll.c index fabe6cb268a..f3295a10997 100644 --- a/ompi/debuggers/ompi_msgq_dll.c +++ b/ompi/debuggers/ompi_msgq_dll.c @@ -71,12 +71,8 @@ #ifdef HAVE_NO_C_CONST #define const #endif -#if defined(HAVE_STRING_H) #include -#endif /* defined(HAVE_STRING_H) */ -#if defined(HAVE_STDLIB_H) #include -#endif /* defined(HAVE_STDLIB_H) */ /* Notice to developers!!!! * The following include files with _dbg.h suffixes contains definitions diff --git a/ompi/errhandler/errcode.c b/ompi/errhandler/errcode.c index 984b0d8edf6..b344119c459 100644 --- a/ompi/errhandler/errcode.c +++ b/ompi/errhandler/errcode.c @@ -26,9 +26,7 @@ #include "ompi_config.h" #include -#ifdef HAVE_STRING_H #include -#endif #include "mpi.h" diff --git a/ompi/errhandler/errhandler.c b/ompi/errhandler/errhandler.c index 54eaf5aebb5..5bda0a28114 100644 --- a/ompi/errhandler/errhandler.c +++ b/ompi/errhandler/errhandler.c @@ -23,9 +23,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "ompi/communicator/communicator.h" #include "ompi/win/win.h" diff --git a/ompi/info/info.c b/ompi/info/info.c index fded842fa76..bccef678f31 100644 --- a/ompi/info/info.c +++ b/ompi/info/info.c @@ -26,13 +26,9 @@ #include "ompi_config.h" #include "ompi/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/ompi/mca/coll/cuda/coll_cuda_module.c b/ompi/mca/coll/cuda/coll_cuda_module.c index e5496db01e5..49803ce3ce7 100644 --- a/ompi/mca/coll/cuda/coll_cuda_module.c +++ b/ompi/mca/coll/cuda/coll_cuda_module.c @@ -12,9 +12,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include "coll_cuda.h" diff --git a/ompi/mca/coll/sm/coll_sm_bcast.c b/ompi/mca/coll/sm/coll_sm_bcast.c index 7817481045b..1aaa8df6ddc 100644 --- a/ompi/mca/coll/sm/coll_sm_bcast.c +++ b/ompi/mca/coll/sm/coll_sm_bcast.c @@ -19,9 +19,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/datatype/opal_convertor.h" #include "ompi/constants.h" diff --git a/ompi/mca/coll/sm/coll_sm_module.c b/ompi/mca/coll/sm/coll_sm_module.c index 1bd83f6ca37..80d04ea0973 100644 --- a/ompi/mca/coll/sm/coll_sm_module.c +++ b/ompi/mca/coll/sm/coll_sm_module.c @@ -34,9 +34,7 @@ #include "ompi_config.h" #include -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SCHED_H #include #endif diff --git a/ompi/mca/coll/sm/coll_sm_reduce.c b/ompi/mca/coll/sm/coll_sm_reduce.c index 3f34094fb6a..62ec2f95798 100644 --- a/ompi/mca/coll/sm/coll_sm_reduce.c +++ b/ompi/mca/coll/sm/coll_sm_reduce.c @@ -19,9 +19,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/datatype/opal_convertor.h" #include "opal/sys/atomic.h" diff --git a/ompi/mca/dpm/base/base.h b/ompi/mca/dpm/base/base.h index d83a908ed4f..3860710d9d6 100644 --- a/ompi/mca/dpm/base/base.h +++ b/ompi/mca/dpm/base/base.h @@ -25,9 +25,7 @@ #include "ompi_config.h" #include "ompi/constants.h" -#if HAVE_TIME_H #include -#endif #if HAVE_SYS_TIME_H #include #endif diff --git a/ompi/mca/dpm/base/dpm_base_null_fns.c b/ompi/mca/dpm/base/dpm_base_null_fns.c index 47b9b53748b..55e86a633ae 100644 --- a/ompi/mca/dpm/base/dpm_base_null_fns.c +++ b/ompi/mca/dpm/base/dpm_base_null_fns.c @@ -26,9 +26,7 @@ #include "ompi_config.h" #include #include -#if HAVE_TIME_H #include -#endif #if HAVE_SYS_TIME_H #include #endif diff --git a/ompi/mca/dpm/dpm.h b/ompi/mca/dpm/dpm.h index 1acd7024fbf..195e9bd3c14 100644 --- a/ompi/mca/dpm/dpm.h +++ b/ompi/mca/dpm/dpm.h @@ -31,9 +31,7 @@ #include "ompi_config.h" -#if HAVE_TIME_H #include -#endif #if HAVE_SYS_TIME_H #include #endif diff --git a/ompi/mca/dpm/orte/dpm_orte.c b/ompi/mca/dpm/orte/dpm_orte.c index 4dea4d03125..165cd59e8b1 100644 --- a/ompi/mca/dpm/orte/dpm_orte.c +++ b/ompi/mca/dpm/orte/dpm_orte.c @@ -31,9 +31,7 @@ #include #include #include -#if HAVE_TIME_H #include -#endif #if HAVE_SYS_TIME_H #include #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c index 5c0a9a2b8ae..c5bd405f58d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c @@ -9,9 +9,7 @@ #include "ad_xfs.h" #include -#ifdef HAVE_STDDEF_H #include -#endif #ifndef HAVE_LSEEK64 #define lseek64 lseek diff --git a/ompi/mca/io/romio314/romio/adio/common/system_hints.c b/ompi/mca/io/romio314/romio/adio/common/system_hints.c index fd6cba5cb5e..35161026c13 100644 --- a/ompi/mca/io/romio314/romio/adio/common/system_hints.c +++ b/ompi/mca/io/romio314/romio/adio/common/system_hints.c @@ -15,12 +15,8 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/ompi/mca/op/base/op_base_frame.c b/ompi/mca/op/base/op_base_frame.c index 35b53f56824..ffe0dde776c 100644 --- a/ompi/mca/op/base/op_base_frame.c +++ b/ompi/mca/op/base/op_base_frame.c @@ -20,9 +20,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" #include "ompi/mca/mca.h" diff --git a/ompi/mca/osc/osc.h b/ompi/mca/osc/osc.h index e852f68e0d5..bac4b085a9f 100644 --- a/ompi/mca/osc/osc.h +++ b/ompi/mca/osc/osc.h @@ -32,9 +32,7 @@ #include "opal_config.h" -#ifdef HAVE_STDDEF_H #include -#endif #include "ompi/mca/mca.h" diff --git a/ompi/mca/pml/base/pml_base_frame.c b/ompi/mca/pml/base/pml_base_frame.c index 84186f2434c..1f947ea5462 100644 --- a/ompi/mca/pml/base/pml_base_frame.c +++ b/ompi/mca/pml/base/pml_base_frame.c @@ -26,9 +26,7 @@ #include "ompi_config.h" #include -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNIST_H */ diff --git a/ompi/mca/pml/base/pml_base_select.c b/ompi/mca/pml/base/pml_base_select.c index 62717bf4740..b046cf42229 100644 --- a/ompi/mca/pml/base/pml_base_select.c +++ b/ompi/mca/pml/base/pml_base_select.c @@ -23,9 +23,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/class/opal_list.h" #include "opal/util/output.h" diff --git a/ompi/mca/pml/v/pml_v_output.c b/ompi/mca/pml/v/pml_v_output.c index 671ff51e4c2..c16ee7f4b9b 100644 --- a/ompi/mca/pml/v/pml_v_output.c +++ b/ompi/mca/pml/v/pml_v_output.c @@ -17,9 +17,7 @@ #if defined(HAVE_UNISTD_H) #include #endif -#if defined(HAVE_STRING_H) #include -#endif int pml_v_output_open(char *output, int verbosity) { opal_output_stream_t lds; diff --git a/ompi/mca/topo/base/topo_base_cart_get.c b/ompi/mca/topo/base/topo_base_cart_get.c index 4d3c8df8ca5..efd63663309 100644 --- a/ompi/mca/topo/base/topo_base_cart_get.c +++ b/ompi/mca/topo/base/topo_base_cart_get.c @@ -20,9 +20,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "ompi/mca/topo/base/base.h" #include "ompi/communicator/communicator.h" diff --git a/ompi/mca/vprotocol/base/vprotocol_base_select.c b/ompi/mca/vprotocol/base/vprotocol_base_select.c index 99baa9606e9..4938705d2e8 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base_select.c +++ b/ompi/mca/vprotocol/base/vprotocol_base_select.c @@ -13,9 +13,7 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "base.h" #include "ompi/mca/mca.h" diff --git a/ompi/mpi/java/c/mpi_Intracomm.c b/ompi/mpi/java/c/mpi_Intracomm.c index 6bf97ab0860..00c8953495d 100644 --- a/ompi/mpi/java/c/mpi_Intracomm.c +++ b/ompi/mpi/java/c/mpi_Intracomm.c @@ -49,9 +49,7 @@ #include "ompi_config.h" #include -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_TARGETCONDITIONALS_H #include #endif diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index 523ca25d9a6..8d8d56289d0 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -54,12 +54,8 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_TARGETCONDITIONALS_H #include #endif diff --git a/ompi/peruse/peruse.c b/ompi/peruse/peruse.c index 19d76631ea5..743aca74ad9 100644 --- a/ompi/peruse/peruse.c +++ b/ompi/peruse/peruse.c @@ -12,9 +12,7 @@ */ #include "ompi_config.h" -#ifdef HAVE_STRING_H # include -#endif #include "mpi.h" #include "ompi/peruse/peruse.h" #include "ompi/peruse/peruse-internal.h" diff --git a/ompi/peruse/peruse_module.c b/ompi/peruse/peruse_module.c index e540409e955..0d3873cf7b2 100644 --- a/ompi/peruse/peruse_module.c +++ b/ompi/peruse/peruse_module.c @@ -13,9 +13,7 @@ */ #include "ompi_config.h" -#ifdef HAVE_STDLIB_H # include -#endif #include "mpi.h" #include "ompi/peruse/peruse.h" #include "ompi/peruse/peruse-internal.h" diff --git a/ompi/runtime/ompi_mpi_params.c b/ompi/runtime/ompi_mpi_params.c index b3938be92e7..7a607c792b4 100644 --- a/ompi/runtime/ompi_mpi_params.c +++ b/ompi/runtime/ompi_mpi_params.c @@ -24,12 +24,8 @@ #include "ompi_config.h" -#ifdef HAVE_STRING_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif /* HAVE_TIME_H */ #include "ompi/constants.h" #include "ompi/datatype/ompi_datatype.h" diff --git a/ompi/tools/ompi_info/ompi_info.c b/ompi/tools/ompi_info/ompi_info.c index cc0cb4cfad0..05be454cb05 100644 --- a/ompi/tools/ompi_info/ompi_info.c +++ b/ompi/tools/ompi_info/ompi_info.c @@ -36,9 +36,7 @@ #include #endif #include -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/version.h" #include "opal/mca/installdirs/installdirs.h" diff --git a/opal/class/opal_hash_table.h b/opal/class/opal_hash_table.h index ddf29a1b91f..ad591e001e5 100644 --- a/opal/class/opal_hash_table.h +++ b/opal/class/opal_hash_table.h @@ -37,9 +37,7 @@ #include "opal_config.h" -#ifdef HAVE_STDINT_H #include -#endif #include "opal/class/opal_list.h" #include "opal/util/proc.h" diff --git a/opal/class/opal_object.h b/opal/class/opal_object.h index 02d9b17ada7..e8fe51966da 100644 --- a/opal/class/opal_object.h +++ b/opal/class/opal_object.h @@ -116,9 +116,7 @@ #include "opal_config.h" #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #include "opal/sys/atomic.h" diff --git a/opal/datatype/opal_convertor.c b/opal/datatype/opal_convertor.c index 9a211ba845d..29d8f955db3 100644 --- a/opal/datatype/opal_convertor.c +++ b/opal/datatype/opal_convertor.c @@ -25,10 +25,7 @@ #include #include - -#ifdef HAVE_STDINT_H #include -#endif #include "opal/prefetch.h" #include "opal/util/arch.h" diff --git a/opal/datatype/opal_copy_functions_heterogeneous.c b/opal/datatype/opal_copy_functions_heterogeneous.c index 3cefc2cf147..8ff6d1644d1 100644 --- a/opal/datatype/opal_copy_functions_heterogeneous.c +++ b/opal/datatype/opal_copy_functions_heterogeneous.c @@ -16,9 +16,7 @@ #include "opal_config.h" #include -#ifdef HAVE_STDINT_H #include -#endif #include "opal/util/arch.h" diff --git a/opal/datatype/opal_datatype_internal.h b/opal/datatype/opal_datatype_internal.h index a113db7c348..761d06c119c 100644 --- a/opal/datatype/opal_datatype_internal.h +++ b/opal/datatype/opal_datatype_internal.h @@ -26,12 +26,8 @@ #include "opal_config.h" -#ifdef HAVE_STDARG_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif #if defined(VERBOSE) #include "opal/util/output.h" diff --git a/opal/dss/dss_internal.h b/opal/dss/dss_internal.h index 0c262bd8123..fd80947885a 100644 --- a/opal/dss/dss_internal.h +++ b/opal/dss/dss_internal.h @@ -36,12 +36,10 @@ #include "opal/dss/dss.h" #include "opal/util/proc.h" -#ifdef HAVE_STRING_H -# if !defined(STDC_HEADERS) && HAVE_MEMORY_H -# include -# endif -# include +#if !defined(STDC_HEADERS) && HAVE_MEMORY_H +# include #endif +#include BEGIN_C_DECLS diff --git a/opal/include/opal/sys/atomic_impl.h b/opal/include/opal/sys/atomic_impl.h index 496fecdcc40..eab4c02a463 100644 --- a/opal/include/opal/sys/atomic_impl.h +++ b/opal/include/opal/sys/atomic_impl.h @@ -22,9 +22,7 @@ /* Inline C implementation of the functions defined in atomic.h */ -#ifdef HAVE_STDLIB_H #include -#endif /********************************************************************** * diff --git a/opal/include/opal/types.h b/opal/include/opal/types.h index 7738f6807df..c82a6f9005c 100644 --- a/opal/include/opal/types.h +++ b/opal/include/opal/types.h @@ -22,9 +22,7 @@ #include "opal_config.h" -#ifdef HAVE_STDINT_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/opal/include/opal_config_bottom.h b/opal/include/opal_config_bottom.h index 3cfc7f8b8a7..c7b05fa6c49 100644 --- a/opal/include/opal_config_bottom.h +++ b/opal/include/opal_config_bottom.h @@ -241,10 +241,6 @@ # define OPAL_MODULE_DECLSPEC # endif -/* - * Do we have ? - */ -#ifdef HAVE_STDINT_H #if !defined(__STDC_LIMIT_MACROS) && (defined(c_plusplus) || defined (__cplusplus)) /* When using a C++ compiler, the max / min value #defines for std types are only included if __STDC_LIMIT_MACROS is set before @@ -252,10 +248,7 @@ #define __STDC_LIMIT_MACROS #endif #include "opal_config.h" -#include -#else #include "opal_stdint.h" -#endif /*********************************************************************** * diff --git a/opal/include/opal_stdint.h b/opal/include/opal_stdint.h index d08b22073b9..001bbe4a757 100644 --- a/opal/include/opal_stdint.h +++ b/opal/include/opal_stdint.h @@ -1,3 +1,4 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology @@ -9,6 +10,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,113 +30,12 @@ * Include what we can and define what is missing. */ #include +#include #ifdef HAVE_SYS_TYPES_H #include #endif -/* 8-bit */ - -#if SIZEOF_CHAR == 1 - -#ifndef HAVE_INT8_T -typedef signed char int8_t; -#endif - -#ifndef HAVE_UINT8_T -typedef unsigned char uint8_t; -#endif - -#else - -#error Failed to define 8-bit types - -#endif - -/* 16-bit */ - -#if SIZEOF_SHORT == 2 - -#ifndef HAVE_INT16_T -typedef signed short int16_t; -#endif - -#ifndef HAVE_UINT16_T -typedef unsigned short uint16_t; -#endif - -#else - -#error Failed to define 16-bit types - -#endif - -/* 32-bit */ - -#if SIZEOF_INT == 4 - -#ifndef HAVE_INT32_T -typedef signed int int32_t; -#endif - -#ifndef HAVE_UINT32_T -typedef unsigned int uint32_t; -#endif - -#elif SIZEOF_LONG == 4 - -#ifndef HAVE_INT32_T -typedef signed long int32_t; -#endif - -#ifndef HAVE_UINT32_T -typedef unsigned long uint32_t; -#endif - -#else - -#error Failed to define 32-bit types - -#endif - -/* 64-bit */ - -#if SIZEOF_INT == 8 - -#ifndef HAVE_INT64_T -typedef signed int int64_t; -#endif - -#ifndef HAVE_UINT64_T -typedef unsigned int uint64_t; -#endif - -#elif SIZEOF_LONG == 8 - -#ifndef HAVE_INT64_T -typedef signed long int64_t; -#endif - -#ifndef HAVE_UINT64_T -typedef unsigned long uint64_t; -#endif - -#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8 - -#ifndef HAVE_INT64_T -typedef signed long long int64_t; -#endif - -#ifndef HAVE_UINT64_T -typedef unsigned long long uint64_t; -#endif - -#else - -#error Failed to define 64-bit types - -#endif - /* 128-bit */ #ifdef HAVE_INT128_T @@ -204,143 +106,8 @@ typedef unsigned long long uintptr_t; #endif -/* fix up some constants that may be missing */ -#ifndef SIZE_MAX -# if SIZEOF_VOID_P == SIZEOF_INT -# define SIZE_MAX UINT_MAX -# elif SIZEOF_VOID_P == SIZEOF_LONG -# define SIZE_MAX ULONG_MAX -# else -# error Failed to find value for SIZE_MAX -# endif -#endif /* ifndef SIZE_MAX */ - - /* inttypes.h printf specifiers */ -#ifdef HAVE_INTTYPES_H # include -#else - -# if SIZEOF_LONG == 8 -# define __PRI64_PREFIX "l" -# define __PRIPTR_PREFIX "l" -# else -# define __PRI64_PREFIX "ll" -# define __PRIPTR_PREFIX -# endif - -/* Decimal notation. */ -# define PRId8 "d" -# define PRId16 "d" -# define PRId32 "d" -# define PRId64 __PRI64_PREFIX "d" - -# define PRIdLEAST8 "d" -# define PRIdLEAST16 "d" -# define PRIdLEAST32 "d" -# define PRIdLEAST64 __PRI64_PREFIX "d" - -# define PRIdFAST8 "d" -# define PRIdFAST16 __PRIPTR_PREFIX "d" -# define PRIdFAST32 __PRIPTR_PREFIX "d" -# define PRIdFAST64 __PRI64_PREFIX "d" - -# define PRIi8 "i" -# define PRIi16 "i" -# define PRIi32 "i" -# define PRIi64 __PRI64_PREFIX "i" - -# define PRIiLEAST8 "i" -# define PRIiLEAST16 "i" -# define PRIiLEAST32 "i" -# define PRIiLEAST64 __PRI64_PREFIX "i" - -# define PRIiFAST8 "i" -# define PRIiFAST16 __PRIPTR_PREFIX "i" -# define PRIiFAST32 __PRIPTR_PREFIX "i" -# define PRIiFAST64 __PRI64_PREFIX "i" - -/* Octal notation. */ -# define PRIo8 "o" -# define PRIo16 "o" -# define PRIo32 "o" -# define PRIo64 __PRI64_PREFIX "o" - -# define PRIoLEAST8 "o" -# define PRIoLEAST16 "o" -# define PRIoLEAST32 "o" -# define PRIoLEAST64 __PRI64_PREFIX "o" - -# define PRIoFAST8 "o" -# define PRIoFAST16 __PRIPTR_PREFIX "o" -# define PRIoFAST32 __PRIPTR_PREFIX "o" -# define PRIoFAST64 __PRI64_PREFIX "o" - -/* Unsigned integers. */ -# define PRIu8 "u" -# define PRIu16 "u" -# define PRIu32 "u" -# define PRIu64 __PRI64_PREFIX "u" - -# define PRIuLEAST8 "u" -# define PRIuLEAST16 "u" -# define PRIuLEAST32 "u" -# define PRIuLEAST64 __PRI64_PREFIX "u" - -# define PRIuFAST8 "u" -# define PRIuFAST16 __PRIPTR_PREFIX "u" -# define PRIuFAST32 __PRIPTR_PREFIX "u" -# define PRIuFAST64 __PRI64_PREFIX "u" - -/* lowercase hexadecimal notation. */ -# define PRIx8 "x" -# define PRIx16 "x" -# define PRIx32 "x" -# define PRIx64 __PRI64_PREFIX "x" - -# define PRIxLEAST8 "x" -# define PRIxLEAST16 "x" -# define PRIxLEAST32 "x" -# define PRIxLEAST64 __PRI64_PREFIX "x" - -# define PRIxFAST8 "x" -# define PRIxFAST16 __PRIPTR_PREFIX "x" -# define PRIxFAST32 __PRIPTR_PREFIX "x" -# define PRIxFAST64 __PRI64_PREFIX "x" - -/* UPPERCASE hexadecimal notation. */ -# define PRIX8 "X" -# define PRIX16 "X" -# define PRIX32 "X" -# define PRIX64 __PRI64_PREFIX "X" - -# define PRIXLEAST8 "X" -# define PRIXLEAST16 "X" -# define PRIXLEAST32 "X" -# define PRIXLEAST64 __PRI64_PREFIX "X" - -# define PRIXFAST8 "X" -# define PRIXFAST16 __PRIPTR_PREFIX "X" -# define PRIXFAST32 __PRIPTR_PREFIX "X" -# define PRIXFAST64 __PRI64_PREFIX "X" - -/* Macros for printing `intmax_t' and `uintmax_t'. */ -# define PRIdMAX __PRI64_PREFIX "d" -# define PRIiMAX __PRI64_PREFIX "i" -# define PRIoMAX __PRI64_PREFIX "o" -# define PRIuMAX __PRI64_PREFIX "u" -# define PRIxMAX __PRI64_PREFIX "x" -# define PRIXMAX __PRI64_PREFIX "X" - -/* Macros for printing `intptr_t' and `uintptr_t'. */ -# define PRIdPTR __PRIPTR_PREFIX "d" -# define PRIiPTR __PRIPTR_PREFIX "i" -# define PRIoPTR __PRIPTR_PREFIX "o" -# define PRIuPTR __PRIPTR_PREFIX "u" -# define PRIxPTR __PRIPTR_PREFIX "x" -# define PRIXPTR __PRIPTR_PREFIX "X" - -#endif #ifndef PRIsize_t # if defined(ACCEPT_C99) diff --git a/opal/mca/allocator/base/allocator_base_frame.c b/opal/mca/allocator/base/allocator_base_frame.c index a87c2e19e8d..d687cba58d3 100644 --- a/opal/mca/allocator/base/allocator_base_frame.c +++ b/opal/mca/allocator/base/allocator_base_frame.c @@ -19,9 +19,7 @@ #include "opal_config.h" #include -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" diff --git a/opal/mca/btl/self/btl_self.h b/opal/mca/btl/self/btl_self.h index e3988e30299..b61a167f5da 100644 --- a/opal/mca/btl/self/btl_self.h +++ b/opal/mca/btl/self/btl_self.h @@ -26,9 +26,7 @@ #include "opal_config.h" -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ diff --git a/opal/mca/btl/self/btl_self_component.c b/opal/mca/btl/self/btl_self_component.c index 3690cda80dd..f04f41fff0b 100644 --- a/opal/mca/btl/self/btl_self_component.c +++ b/opal/mca/btl/self/btl_self_component.c @@ -23,9 +23,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ diff --git a/opal/mca/btl/sm/btl_sm.h b/opal/mca/btl/sm/btl_sm.h index 09e03fbbe96..77a8df7a3fc 100644 --- a/opal/mca/btl/sm/btl_sm.h +++ b/opal/mca/btl/sm/btl_sm.h @@ -31,9 +31,7 @@ #include #include #include -#ifdef HAVE_STDINT_H #include -#endif /* HAVE_STDINT_H */ #ifdef HAVE_SCHED_H #include #endif /* HAVE_SCHED_H */ diff --git a/opal/mca/btl/sm/btl_sm_component.c b/opal/mca/btl/sm/btl_sm_component.c index 2d6b01e8652..791d6080855 100644 --- a/opal/mca/btl/sm/btl_sm_component.c +++ b/opal/mca/btl/sm/btl_sm_component.c @@ -30,9 +30,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ diff --git a/opal/mca/btl/smcuda/btl_smcuda.h b/opal/mca/btl/smcuda/btl_smcuda.h index b94b6e7fc6a..4c9953932f1 100644 --- a/opal/mca/btl/smcuda/btl_smcuda.h +++ b/opal/mca/btl/smcuda/btl_smcuda.h @@ -31,9 +31,7 @@ #include #include #include -#ifdef HAVE_STDINT_H #include -#endif /* HAVE_STDINT_H */ #ifdef HAVE_SCHED_H #include #endif /* HAVE_SCHED_H */ diff --git a/opal/mca/btl/smcuda/btl_smcuda_component.c b/opal/mca/btl/smcuda/btl_smcuda_component.c index 2936df3d189..98f8ead8b4b 100644 --- a/opal/mca/btl/smcuda/btl_smcuda_component.c +++ b/opal/mca/btl/smcuda/btl_smcuda_component.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ diff --git a/opal/mca/btl/tcp/btl_tcp_endpoint.c b/opal/mca/btl/tcp/btl_tcp_endpoint.c index e2676ef40ef..a6a284c3c1b 100644 --- a/opal/mca/btl/tcp/btl_tcp_endpoint.c +++ b/opal/mca/btl/tcp/btl_tcp_endpoint.c @@ -48,9 +48,7 @@ #ifdef HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ -#ifdef HAVE_TIME_H #include -#endif /* HAVE_TIME_H */ #include "opal/mca/event/event.h" #include "opal/util/net.h" diff --git a/opal/mca/btl/usnic/btl_usnic_mca.c b/opal/mca/btl/usnic/btl_usnic_mca.c index 087951c235d..fcdc1a1d086 100644 --- a/opal/mca/btl/usnic/btl_usnic_mca.c +++ b/opal/mca/btl/usnic/btl_usnic_mca.c @@ -23,9 +23,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include "opal/mca/base/mca_base_var.h" diff --git a/opal/mca/btl/vader/btl_vader.h b/opal/mca/btl/vader/btl_vader.h index bbaaf7eb6cf..12ce6351f8b 100644 --- a/opal/mca/btl/vader/btl_vader.h +++ b/opal/mca/btl/vader/btl_vader.h @@ -32,9 +32,7 @@ #include #include -#ifdef HAVE_STDINT_H # include -#endif /* HAVE_STDINT_H */ #ifdef HAVE_SCHED_H # include #endif /* HAVE_SCHED_H */ diff --git a/opal/mca/common/verbs/common_verbs_qp_type.c b/opal/mca/common/verbs/common_verbs_qp_type.c index 2e5132e15ac..5507defff86 100644 --- a/opal/mca/common/verbs/common_verbs_qp_type.c +++ b/opal/mca/common/verbs/common_verbs_qp_type.c @@ -12,9 +12,7 @@ #include "opal/constants.h" #include -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #include "common_verbs.h" diff --git a/opal/mca/crs/base/crs_base_fns.c b/opal/mca/crs/base/crs_base_fns.c index fbcadb3356c..54dc5eec7dc 100644 --- a/opal/mca/crs/base/crs_base_fns.c +++ b/opal/mca/crs/base/crs_base_fns.c @@ -23,9 +23,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/opal/mca/crs/none/crs_none_module.c b/opal/mca/crs/none/crs_none_module.c index c05327359f2..6302977eed9 100644 --- a/opal/mca/crs/none/crs_none_module.c +++ b/opal/mca/crs/none/crs_none_module.c @@ -15,9 +15,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include diff --git a/opal/mca/crs/self/crs_self_module.c b/opal/mca/crs/self/crs_self_module.c index 3d83653a2e2..49c8dfcc9c9 100644 --- a/opal/mca/crs/self/crs_self_module.c +++ b/opal/mca/crs/self/crs_self_module.c @@ -24,9 +24,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_DLFCN_H #include #endif diff --git a/opal/mca/event/event.h b/opal/mca/event/event.h index abf2f6feaca..0bc435f146d 100644 --- a/opal/mca/event/event.h +++ b/opal/mca/event/event.h @@ -22,12 +22,8 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#ifdef HAVE_STDINT_H #include -#endif -#ifdef HAVE_STDARG_H #include -#endif #include "opal/class/opal_pointer_array.h" diff --git a/opal/mca/hwloc/hwloc.h b/opal/mca/hwloc/hwloc.h index 319fa909a82..7e3cd483111 100644 --- a/opal/mca/hwloc/hwloc.h +++ b/opal/mca/hwloc/hwloc.h @@ -21,12 +21,8 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#ifdef HAVE_STDINT_H #include -#endif -#ifdef HAVE_STDARG_H #include -#endif #include "opal/class/opal_list.h" #include "opal/class/opal_value_array.h" diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h b/opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h index 0d592986ddc..441f5cadc21 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h +++ b/opal/mca/hwloc/hwloc1110/hwloc/include/private/private.h @@ -31,9 +31,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STDINT_H #include -#endif #ifdef HAVE_SYS_UTSNAME_H #include #endif diff --git a/opal/mca/mpool/base/mpool_base_alloc.c b/opal/mca/mpool/base/mpool_base_alloc.c index 6a253d2d87a..18286576939 100644 --- a/opal/mca/mpool/base/mpool_base_alloc.c +++ b/opal/mca/mpool/base/mpool_base_alloc.c @@ -22,12 +22,8 @@ */ #include "opal_config.h" -#ifdef HAVE_STDINT_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/mpool/mpool.h" #include "base.h" #include "mpool_base_tree.h" diff --git a/opal/mca/mpool/sm/mpool_sm_component.c b/opal/mca/mpool/sm/mpool_sm_component.c index 644389a449f..cd9f6c9214b 100644 --- a/opal/mca/mpool/sm/mpool_sm_component.c +++ b/opal/mca/mpool/sm/mpool_sm_component.c @@ -26,9 +26,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H*/ -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #include #include "opal/mca/base/base.h" diff --git a/opal/mca/pmix/native/pmix_native.c b/opal/mca/pmix/native/pmix_native.c index 4ad1861ceca..451b3206ba1 100644 --- a/opal/mca/pmix/native/pmix_native.c +++ b/opal/mca/pmix/native/pmix_native.c @@ -18,9 +18,7 @@ #include "opal/constants.h" #include "opal/types.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/opal/mca/pstat/linux/pstat_linux_module.c b/opal/mca/pstat/linux/pstat_linux_module.c index 438facce8e8..3dc492d008d 100644 --- a/opal/mca/pstat/linux/pstat_linux_module.c +++ b/opal/mca/pstat/linux/pstat_linux_module.c @@ -34,9 +34,7 @@ #include #include #include -#ifdef HAVE_TIME_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/opal/mca/pstat/test/pstat_test.c b/opal/mca/pstat/test/pstat_test.c index 80288c50db3..fc3128689e2 100644 --- a/opal/mca/pstat/test/pstat_test.c +++ b/opal/mca/pstat/test/pstat_test.c @@ -25,9 +25,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/opal/mca/sec/basic/sec_basic.c b/opal/mca/sec/basic/sec_basic.c index 37845f1ef7a..9ec475323ef 100644 --- a/opal/mca/sec/basic/sec_basic.c +++ b/opal/mca/sec/basic/sec_basic.c @@ -11,9 +11,7 @@ #include "opal_config.h" #include "opal/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal_stdint.h" #include "opal/dss/dss_types.h" diff --git a/opal/mca/sec/keystone/sec_keystone.c b/opal/mca/sec/keystone/sec_keystone.c index cdaf5c09881..50ce6f9d5ae 100644 --- a/opal/mca/sec/keystone/sec_keystone.c +++ b/opal/mca/sec/keystone/sec_keystone.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #include diff --git a/opal/mca/sec/munge/sec_munge.c b/opal/mca/sec/munge/sec_munge.c index e6980f1c0fb..6129edd6327 100644 --- a/opal/mca/sec/munge/sec_munge.c +++ b/opal/mca/sec/munge/sec_munge.c @@ -13,9 +13,7 @@ #include "opal_config.h" #include "opal/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #include "opal_stdint.h" diff --git a/opal/mca/shmem/base/shmem_base_select.c b/opal/mca/shmem/base/shmem_base_select.c index 02cd97dcaa1..766f0321968 100644 --- a/opal/mca/shmem/base/shmem_base_select.c +++ b/opal/mca/shmem/base/shmem_base_select.c @@ -21,9 +21,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/constants.h" #include "opal/util/output.h" diff --git a/opal/mca/shmem/mmap/shmem_mmap_module.c b/opal/mca/shmem/mmap/shmem_mmap_module.c index 031d0c9f4de..8e52890070e 100644 --- a/opal/mca/shmem/mmap/shmem_mmap_module.c +++ b/opal/mca/shmem/mmap/shmem_mmap_module.c @@ -37,15 +37,11 @@ #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ -#ifdef HAVE_TIME_H #include -#endif /* HAVE_NETDB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ diff --git a/opal/mca/shmem/posix/shmem_posix_common_utils.c b/opal/mca/shmem/posix/shmem_posix_common_utils.c index cb9b6f0f5e1..58517aff49f 100644 --- a/opal/mca/shmem/posix/shmem_posix_common_utils.c +++ b/opal/mca/shmem/posix/shmem_posix_common_utils.c @@ -29,9 +29,7 @@ #ifdef HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #if OPAL_HAVE_SOLARIS && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */ #include diff --git a/opal/mca/shmem/posix/shmem_posix_component.c b/opal/mca/shmem/posix/shmem_posix_component.c index 7f78b9eb45d..e12560bdefa 100644 --- a/opal/mca/shmem/posix/shmem_posix_component.c +++ b/opal/mca/shmem/posix/shmem_posix_component.c @@ -31,9 +31,7 @@ #include -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_SYS_MMAN_H #include #endif /* HAVE_SYS_MMAN_H */ diff --git a/opal/mca/shmem/posix/shmem_posix_module.c b/opal/mca/shmem/posix/shmem_posix_module.c index 110c83320c3..d441b635b90 100644 --- a/opal/mca/shmem/posix/shmem_posix_module.c +++ b/opal/mca/shmem/posix/shmem_posix_module.c @@ -42,9 +42,7 @@ #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ diff --git a/opal/mca/shmem/shmem_types.h b/opal/mca/shmem/shmem_types.h index ee7f9b202d4..f9092911bd1 100644 --- a/opal/mca/shmem/shmem_types.h +++ b/opal/mca/shmem/shmem_types.h @@ -33,12 +33,8 @@ #include "opal_config.h" -#ifdef HAVE_STDDEF_H #include -#endif /* HAVE_STDDEF_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ BEGIN_C_DECLS diff --git a/opal/mca/shmem/sysv/shmem_sysv_component.c b/opal/mca/shmem/sysv/shmem_sysv_component.c index 6875c01259f..6d4a2b7cf1d 100644 --- a/opal/mca/shmem/sysv/shmem_sysv_component.c +++ b/opal/mca/shmem/sysv/shmem_sysv_component.c @@ -34,9 +34,7 @@ #ifdef HAVE_SYS_MMAN_H #include #endif /* HAVE_SYS_MMAN_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ diff --git a/opal/mca/shmem/sysv/shmem_sysv_module.c b/opal/mca/shmem/sysv/shmem_sysv_module.c index 5e9ce76c347..0ab88dc4641 100644 --- a/opal/mca/shmem/sysv/shmem_sysv_module.c +++ b/opal/mca/shmem/sysv/shmem_sysv_module.c @@ -45,9 +45,7 @@ #if HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ diff --git a/opal/mca/timer/linux/timer_linux_component.c b/opal/mca/timer/linux/timer_linux_component.c index de6264dab5e..509d605fee0 100644 --- a/opal/mca/timer/linux/timer_linux_component.c +++ b/opal/mca/timer/linux/timer_linux_component.c @@ -24,9 +24,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/mca/timer/timer.h" #include "opal/mca/timer/base/base.h" diff --git a/opal/runtime/opal_cr.c b/opal/runtime/opal_cr.c index 534b98d670a..0684bf1cf62 100644 --- a/opal/runtime/opal_cr.c +++ b/opal/runtime/opal_cr.c @@ -30,9 +30,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include @@ -46,9 +44,7 @@ #ifdef HAVE_SYS_STAT_H #include /* for mkfifo */ #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/class/opal_object.h" #include "opal/util/opal_environ.h" diff --git a/opal/runtime/opal_params.c b/opal/runtime/opal_params.c index 18372d6e43b..d161ae06800 100644 --- a/opal/runtime/opal_params.c +++ b/opal/runtime/opal_params.c @@ -29,9 +29,7 @@ #include "opal_config.h" #include -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/constants.h" #include "opal/runtime/opal.h" diff --git a/opal/threads/condition.h b/opal/threads/condition.h index 40ca3571b8a..56181ce9199 100644 --- a/opal/threads/condition.h +++ b/opal/threads/condition.h @@ -26,9 +26,7 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#ifdef HAVE_TIME_H #include -#endif #include #include "opal/threads/mutex.h" diff --git a/opal/threads/threads.h b/opal/threads/threads.h index c73bef7f942..dbef5489774 100644 --- a/opal/threads/threads.h +++ b/opal/threads/threads.h @@ -26,9 +26,7 @@ #include "opal_config.h" #include -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/class/opal_object.h" #if OPAL_ENABLE_DEBUG diff --git a/opal/tools/opal-checkpoint/opal-checkpoint.c b/opal/tools/opal-checkpoint/opal-checkpoint.c index 7d3c8926dc5..5376334006a 100644 --- a/opal/tools/opal-checkpoint/opal-checkpoint.c +++ b/opal/tools/opal-checkpoint/opal-checkpoint.c @@ -31,9 +31,7 @@ #include #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ @@ -49,12 +47,8 @@ #ifdef HAVE_SYS_WAIT_H #include #endif -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/constants.h" diff --git a/opal/tools/opal-restart/opal-restart.c b/opal/tools/opal-restart/opal-restart.c index cbbb2bc3bcf..5998935118e 100644 --- a/opal/tools/opal-restart/opal-restart.c +++ b/opal/tools/opal-restart/opal-restart.c @@ -38,9 +38,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_SYS_STAT_H #include #endif @@ -53,9 +51,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/constants.h" diff --git a/opal/tools/wrappers/opal_wrapper.c b/opal/tools/wrappers/opal_wrapper.c index 6ce11e1b284..9a4de55fc57 100644 --- a/opal/tools/wrappers/opal_wrapper.c +++ b/opal/tools/wrappers/opal_wrapper.c @@ -24,9 +24,7 @@ #include #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ @@ -39,9 +37,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif /* HAVE_SYS_WAIT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/installdirs/installdirs.h" #include "opal/runtime/opal.h" diff --git a/opal/util/argv.c b/opal/util/argv.c index 84ed781c630..46eb0a1a0b7 100644 --- a/opal/util/argv.c +++ b/opal/util/argv.c @@ -22,12 +22,8 @@ */ #include "opal_config.h" -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/util/argv.h" #include "opal/constants.h" diff --git a/opal/util/basename.c b/opal/util/basename.c index f293162b2a6..cd43cbb2529 100644 --- a/opal/util/basename.c +++ b/opal/util/basename.c @@ -23,9 +23,7 @@ #include "opal_config.h" #include -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_LIBGEN_H #include #endif /* HAVE_LIBGEN_H */ diff --git a/opal/util/cmd_line.c b/opal/util/cmd_line.c index 91c7e490cf9..3cb205953b9 100644 --- a/opal/util/cmd_line.c +++ b/opal/util/cmd_line.c @@ -24,9 +24,7 @@ #include "opal_config.h" #include -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #include "opal/class/opal_object.h" diff --git a/opal/util/crc.c b/opal/util/crc.c index cd697cbc66f..30cf285cc29 100644 --- a/opal/util/crc.c +++ b/opal/util/crc.c @@ -22,15 +22,11 @@ #ifdef HAVE_STDIO_H #include #endif /* HAVE_STDIO_H */ -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ diff --git a/opal/util/error.c b/opal/util/error.c index f49393ff8fa..6189e50b1f6 100644 --- a/opal/util/error.c +++ b/opal/util/error.c @@ -23,14 +23,10 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include -#ifdef HAVE_STDLIB_H #include -#endif #include "opal/util/error.h" #include "opal/constants.h" diff --git a/opal/util/keyval_parse.c b/opal/util/keyval_parse.c index 8561ecb7c6d..8285d681186 100644 --- a/opal/util/keyval_parse.c +++ b/opal/util/keyval_parse.c @@ -26,9 +26,7 @@ #include "opal/util/keyval/keyval_lex.h" #include "opal/util/output.h" #include "opal/threads/mutex.h" -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ int opal_util_keyval_parse_lineno = 0; diff --git a/opal/util/opal_getcwd.c b/opal/util/opal_getcwd.c index 3f0308fcbb0..a768f4efc93 100644 --- a/opal/util/opal_getcwd.c +++ b/opal/util/opal_getcwd.c @@ -20,9 +20,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/basename.h" #include "opal/util/opal_getcwd.h" diff --git a/opal/util/opal_pty.c b/opal/util/opal_pty.c index 0a29bd068f4..c5170022436 100644 --- a/opal/util/opal_pty.c +++ b/opal/util/opal_pty.c @@ -71,9 +71,7 @@ # include #endif #include -#ifdef HAVE_STRING_H # include -#endif #ifdef HAVE_GRP_H #include #endif diff --git a/opal/util/output.h b/opal/util/output.h index c946cef40e7..cbac413f825 100644 --- a/opal/util/output.h +++ b/opal/util/output.h @@ -65,9 +65,7 @@ #include "opal_config.h" -#ifdef HAVE_STDARG_H #include -#endif #include "opal/class/opal_object.h" diff --git a/opal/util/stacktrace.c b/opal/util/stacktrace.c index c4f58314082..6df6dfd2e09 100644 --- a/opal/util/stacktrace.c +++ b/opal/util/stacktrace.c @@ -25,13 +25,8 @@ #include #endif -#ifdef HAVE_STRING_H #include -#endif - -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/util/stacktrace.h" #include "opal/mca/backtrace/backtrace.h" diff --git a/opal/util/sys_limits.c b/opal/util/sys_limits.c index 1a6ea4d0e91..9336a391ac8 100644 --- a/opal/util/sys_limits.c +++ b/opal/util/sys_limits.c @@ -25,9 +25,7 @@ #include "opal_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_SYS_TYPES_H diff --git a/opal/util/timings.c b/opal/util/timings.c index 6c0590acd76..a54feb7b270 100644 --- a/opal/util/timings.c +++ b/opal/util/timings.c @@ -15,9 +15,7 @@ #include #include -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_SYS_TYPES_H diff --git a/opal/win32/win_compat.h b/opal/win32/win_compat.h index 528519fa97d..06de1dee593 100644 --- a/opal/win32/win_compat.h +++ b/opal/win32/win_compat.h @@ -72,9 +72,7 @@ #include #include #include -#ifdef HAVE_STDINT_H #include -#endif /** * For all file io operations diff --git a/orte/mca/dfs/app/dfs_app.c b/orte/mca/dfs/app/dfs_app.c index 3bd69303b0d..398029b5566 100644 --- a/orte/mca/dfs/app/dfs_app.c +++ b/orte/mca/dfs/app/dfs_app.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/orte/mca/dfs/base/dfs_base_frame.c b/orte/mca/dfs/base/dfs_base_frame.c index 8b88fb3c9d0..b82b6021194 100644 --- a/orte/mca/dfs/base/dfs_base_frame.c +++ b/orte/mca/dfs/base/dfs_base_frame.c @@ -14,9 +14,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/orte/mca/dfs/base/dfs_base_select.c b/orte/mca/dfs/base/dfs_base_select.c index 16484b65350..1a44b721b65 100644 --- a/orte/mca/dfs/base/dfs_base_select.c +++ b/orte/mca/dfs/base/dfs_base_select.c @@ -11,9 +11,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/mca/base/base.h" diff --git a/orte/mca/dfs/orted/dfs_orted.c b/orte/mca/dfs/orted/dfs_orted.c index c49ffe415b5..d72b5303ecd 100644 --- a/orte/mca/dfs/orted/dfs_orted.c +++ b/orte/mca/dfs/orted/dfs_orted.c @@ -18,9 +18,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/orte/mca/dfs/test/dfs_test.c b/orte/mca/dfs/test/dfs_test.c index f699a4a3741..13012bc9e8a 100644 --- a/orte/mca/dfs/test/dfs_test.c +++ b/orte/mca/dfs/test/dfs_test.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/orte/mca/errmgr/base/errmgr_base_fns.c b/orte/mca/errmgr/base/errmgr_base_fns.c index e965d5756c0..1c0dc61103a 100644 --- a/orte/mca/errmgr/base/errmgr_base_fns.c +++ b/orte/mca/errmgr/base/errmgr_base_fns.c @@ -27,9 +27,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #if HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ diff --git a/orte/mca/errmgr/base/errmgr_base_frame.c b/orte/mca/errmgr/base/errmgr_base_frame.c index 264e4ec8253..1f771142d63 100644 --- a/orte/mca/errmgr/base/errmgr_base_frame.c +++ b/orte/mca/errmgr/base/errmgr_base_frame.c @@ -26,9 +26,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/orte/mca/errmgr/base/errmgr_base_select.c b/orte/mca/errmgr/base/errmgr_base_select.c index 7a21caa1431..1615633eadc 100644 --- a/orte/mca/errmgr/base/errmgr_base_select.c +++ b/orte/mca/errmgr/base/errmgr_base_select.c @@ -22,9 +22,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/mca/base/base.h" diff --git a/orte/mca/errmgr/base/errmgr_base_tool.c b/orte/mca/errmgr/base/errmgr_base_tool.c index ef19b18e835..2c4bd462a7f 100644 --- a/orte/mca/errmgr/base/errmgr_base_tool.c +++ b/orte/mca/errmgr/base/errmgr_base_tool.c @@ -14,9 +14,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #if HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ diff --git a/orte/mca/errmgr/default_app/errmgr_default_app.c b/orte/mca/errmgr/default_app/errmgr_default_app.c index d1768f0d9cc..d2a400bc993 100644 --- a/orte/mca/errmgr/default_app/errmgr_default_app.c +++ b/orte/mca/errmgr/default_app/errmgr_default_app.c @@ -22,9 +22,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" #include "opal/dss/dss.h" diff --git a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c index bfdf8dafd18..e01138c54e3 100644 --- a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c +++ b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c @@ -23,9 +23,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_WAIT_H #include #endif diff --git a/orte/mca/errmgr/default_orted/errmgr_default_orted.c b/orte/mca/errmgr/default_orted/errmgr_default_orted.c index c83f38372ba..42ebe55fd3e 100644 --- a/orte/mca/errmgr/default_orted/errmgr_default_orted.c +++ b/orte/mca/errmgr/default_orted/errmgr_default_orted.c @@ -22,9 +22,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" #include "opal/dss/dss.h" diff --git a/orte/mca/errmgr/default_tool/errmgr_default_tool.c b/orte/mca/errmgr/default_tool/errmgr_default_tool.c index 0c4bc315bba..94d08dc2b79 100644 --- a/orte/mca/errmgr/default_tool/errmgr_default_tool.c +++ b/orte/mca/errmgr/default_tool/errmgr_default_tool.c @@ -23,9 +23,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" #include "opal/dss/dss.h" diff --git a/orte/mca/ess/lsf/ess_lsf_module.c b/orte/mca/ess/lsf/ess_lsf_module.c index cd24c716d12..52b3b29f31c 100644 --- a/orte/mca/ess/lsf/ess_lsf_module.c +++ b/orte/mca/ess/lsf/ess_lsf_module.c @@ -25,9 +25,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #include diff --git a/orte/mca/ess/pmi/ess_pmi_module.c b/orte/mca/ess/pmi/ess_pmi_module.c index a9050cabab1..45543f4a69b 100644 --- a/orte/mca/ess/pmi/ess_pmi_module.c +++ b/orte/mca/ess/pmi/ess_pmi_module.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #ifdef HAVE_NETDB_H #include diff --git a/orte/mca/ess/singleton/ess_singleton_module.c b/orte/mca/ess/singleton/ess_singleton_module.c index 378c01fc93f..582b04a8b09 100644 --- a/orte/mca/ess/singleton/ess_singleton_module.c +++ b/orte/mca/ess/singleton/ess_singleton_module.c @@ -26,9 +26,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/ess/slurm/ess_slurm_module.c b/orte/mca/ess/slurm/ess_slurm_module.c index 4ed455baac1..dde8e03a2c9 100644 --- a/orte/mca/ess/slurm/ess_slurm_module.c +++ b/orte/mca/ess/slurm/ess_slurm_module.c @@ -25,9 +25,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include diff --git a/orte/mca/ess/tm/ess_tm_module.c b/orte/mca/ess/tm/ess_tm_module.c index 3fdb4195db7..6eda221f8df 100644 --- a/orte/mca/ess/tm/ess_tm_module.c +++ b/orte/mca/ess/tm/ess_tm_module.c @@ -24,9 +24,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include diff --git a/orte/mca/filem/base/filem_base_fns.c b/orte/mca/filem/base/filem_base_fns.c index 870e0d09b81..49608d96a5e 100644 --- a/orte/mca/filem/base/filem_base_fns.c +++ b/orte/mca/filem/base/filem_base_fns.c @@ -18,9 +18,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/filem/base/filem_base_receive.c b/orte/mca/filem/base/filem_base_receive.c index 9970e546f88..33e22f077f5 100644 --- a/orte/mca/filem/base/filem_base_receive.c +++ b/orte/mca/filem/base/filem_base_receive.c @@ -27,9 +27,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/filem/base/filem_base_select.c b/orte/mca/filem/base/filem_base_select.c index c7385273170..9f1e8ae4536 100644 --- a/orte/mca/filem/base/filem_base_select.c +++ b/orte/mca/filem/base/filem_base_select.c @@ -18,9 +18,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" diff --git a/orte/mca/filem/raw/filem_raw_module.c b/orte/mca/filem/raw/filem_raw_module.c index 6d7ce41f199..de70fe2b7a8 100644 --- a/orte/mca/filem/raw/filem_raw_module.c +++ b/orte/mca/filem/raw/filem_raw_module.c @@ -19,9 +19,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/iof/base/base.h b/orte/mca/iof/base/base.h index 013900a2a33..058e92120af 100644 --- a/orte/mca/iof/base/base.h +++ b/orte/mca/iof/base/base.h @@ -41,9 +41,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/class/opal_list.h" #include "opal/class/opal_bitmap.h" diff --git a/orte/mca/iof/base/iof_base_frame.c b/orte/mca/iof/base/iof_base_frame.c index 51e8b3a52af..2abacf4fd65 100644 --- a/orte/mca/iof/base/iof_base_frame.c +++ b/orte/mca/iof/base/iof_base_frame.c @@ -25,9 +25,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #include "orte/mca/mca.h" diff --git a/orte/mca/iof/base/iof_base_output.c b/orte/mca/iof/base/iof_base_output.c index 8d1b9eddcaf..965bdf777cb 100644 --- a/orte/mca/iof/base/iof_base_output.c +++ b/orte/mca/iof/base/iof_base_output.c @@ -26,16 +26,12 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_TIME_H #include -#endif #include #include "opal/util/output.h" diff --git a/orte/mca/iof/hnp/iof_hnp.c b/orte/mca/iof/hnp/iof_hnp.c index 4d771e13c03..350cee45c62 100644 --- a/orte/mca/iof/hnp/iof_hnp.c +++ b/orte/mca/iof/hnp/iof_hnp.c @@ -29,9 +29,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include diff --git a/orte/mca/iof/hnp/iof_hnp_read.c b/orte/mca/iof/hnp/iof_hnp_read.c index 2660a5640f6..e14d7454ea3 100644 --- a/orte/mca/iof/hnp/iof_hnp_read.c +++ b/orte/mca/iof/hnp/iof_hnp_read.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/hnp/iof_hnp_receive.c b/orte/mca/iof/hnp/iof_hnp_receive.c index 6e93c0a9d2b..e64a517a72b 100644 --- a/orte/mca/iof/hnp/iof_hnp_receive.c +++ b/orte/mca/iof/hnp/iof_hnp_receive.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include #else diff --git a/orte/mca/iof/hnp/iof_hnp_send.c b/orte/mca/iof/hnp/iof_hnp_send.c index 4ecee93c0dc..401ee204056 100644 --- a/orte/mca/iof/hnp/iof_hnp_send.c +++ b/orte/mca/iof/hnp/iof_hnp_send.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp.c b/orte/mca/iof/mr_hnp/iof_mrhnp.c index e31eafd24dc..2c8775548d4 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp.c @@ -16,9 +16,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp_read.c b/orte/mca/iof/mr_hnp/iof_mrhnp_read.c index 4cc7123edd6..cf8f8af7c0a 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp_read.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp_read.c @@ -16,9 +16,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c b/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c index b2e599914c8..32aec972b92 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c @@ -16,9 +16,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include #else diff --git a/orte/mca/iof/mr_orted/iof_mrorted.c b/orte/mca/iof/mr_orted/iof_mrorted.c index a211ae90021..d6aa59708f6 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted.c +++ b/orte/mca/iof/mr_orted/iof_mrorted.c @@ -18,9 +18,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include diff --git a/orte/mca/iof/mr_orted/iof_mrorted_read.c b/orte/mca/iof/mr_orted/iof_mrorted_read.c index 67c3538d142..ef43ef87399 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted_read.c +++ b/orte/mca/iof/mr_orted/iof_mrorted_read.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/mr_orted/iof_mrorted_receive.c b/orte/mca/iof/mr_orted/iof_mrorted_receive.c index a137535156c..e894576f67c 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted_receive.c +++ b/orte/mca/iof/mr_orted/iof_mrorted_receive.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/orted/iof_orted.c b/orte/mca/iof/orted/iof_orted.c index 400f62719c8..549e5d0053d 100644 --- a/orte/mca/iof/orted/iof_orted.c +++ b/orte/mca/iof/orted/iof_orted.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_FCNTL_H #include diff --git a/orte/mca/iof/orted/iof_orted_read.c b/orte/mca/iof/orted/iof_orted_read.c index 4d7d9157dc1..554216f4de2 100644 --- a/orte/mca/iof/orted/iof_orted_read.c +++ b/orte/mca/iof/orted/iof_orted_read.c @@ -26,9 +26,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/orted/iof_orted_receive.c b/orte/mca/iof/orted/iof_orted_receive.c index 56c7e5fc02d..6eca4191113 100644 --- a/orte/mca/iof/orted/iof_orted_receive.c +++ b/orte/mca/iof/orted/iof_orted_receive.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/iof/tool/iof_tool.c b/orte/mca/iof/tool/iof_tool.c index aed40c2c83f..ffdb0fb7a4a 100644 --- a/orte/mca/iof/tool/iof_tool.c +++ b/orte/mca/iof/tool/iof_tool.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/tool/iof_tool_receive.c b/orte/mca/iof/tool/iof_tool_receive.c index 8ff709b5faa..75b0ea8e272 100644 --- a/orte/mca/iof/tool/iof_tool_receive.c +++ b/orte/mca/iof/tool/iof_tool_receive.c @@ -27,9 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" diff --git a/orte/mca/notifier/base/notifier_base_frame.c b/orte/mca/notifier/base/notifier_base_frame.c index 23a459f86a7..ff666978025 100644 --- a/orte/mca/notifier/base/notifier_base_frame.c +++ b/orte/mca/notifier/base/notifier_base_frame.c @@ -24,9 +24,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/util/argv.h" diff --git a/orte/mca/notifier/base/notifier_base_select.c b/orte/mca/notifier/base/notifier_base_select.c index a0b1ef7addb..021b41da692 100644 --- a/orte/mca/notifier/base/notifier_base_select.c +++ b/orte/mca/notifier/base/notifier_base_select.c @@ -21,9 +21,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/mca/base/base.h" diff --git a/orte/mca/notifier/notifier.h b/orte/mca/notifier/notifier.h index 0d448f2f2f6..7ca5b51d129 100644 --- a/orte/mca/notifier/notifier.h +++ b/orte/mca/notifier/notifier.h @@ -39,12 +39,8 @@ #include "orte_config.h" -#ifdef HAVE_STDARG_H #include -#endif -#ifdef HAVE_LIMITS_H #include -#endif #ifdef HAVE_SYSLOG_H #include #endif diff --git a/orte/mca/notifier/smtp/notifier_smtp_module.c b/orte/mca/notifier/smtp/notifier_smtp_module.c index 1e1a821b18f..51035c4a747 100644 --- a/orte/mca/notifier/smtp/notifier_smtp_module.c +++ b/orte/mca/notifier/smtp/notifier_smtp_module.c @@ -27,15 +27,11 @@ #include #include -#ifdef HAVE_STDARG_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/util/show_help.h" #include "opal/util/argv.h" diff --git a/orte/mca/notifier/syslog/notifier_syslog_module.c b/orte/mca/notifier/syslog/notifier_syslog_module.c index 5bbd1917dae..7a0bbad682e 100644 --- a/orte/mca/notifier/syslog/notifier_syslog_module.c +++ b/orte/mca/notifier/syslog/notifier_syslog_module.c @@ -28,9 +28,7 @@ #ifdef HAVE_SYSLOG_H #include #endif -#ifdef HAVE_STDARG_H #include -#endif #include "opal/util/show_help.h" diff --git a/orte/mca/odls/alps/odls_alps_module.c b/orte/mca/odls/alps/odls_alps_module.c index 83611fc5e17..e3f12f2669b 100644 --- a/orte/mca/odls/alps/odls_alps_module.c +++ b/orte/mca/odls/alps/odls_alps_module.c @@ -68,9 +68,7 @@ #include "orte/constants.h" #include "orte/types.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include @@ -95,15 +93,11 @@ #ifdef HAVE_NETDB_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_STDARG_H #include -#endif #ifdef HAVE_SYS_SELECT_H #include #endif diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index ec0ac9b8298..4472912ad3b 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -39,9 +39,7 @@ #ifdef HAVE_SYS_PARAM_H #include #endif -#ifdef HAVE_TIME_H #include -#endif #include diff --git a/orte/mca/odls/base/odls_base_frame.c b/orte/mca/odls/base/odls_base_frame.c index c3cd38936d1..018c5378a75 100644 --- a/orte/mca/odls/base/odls_base_frame.c +++ b/orte/mca/odls/base/odls_base_frame.c @@ -26,9 +26,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/class/opal_ring_buffer.h" #include "orte/mca/mca.h" diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index f79fe63eba0..9a90f391780 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -68,9 +68,7 @@ #include "orte/constants.h" #include "orte/types.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include @@ -95,15 +93,11 @@ #ifdef HAVE_NETDB_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_STDARG_H #include -#endif #ifdef HAVE_SYS_SELECT_H #include #endif diff --git a/orte/mca/plm/alps/plm_alps_module.c b/orte/mca/plm/alps/plm_alps_module.c index d1b7c77f4ab..d65ce674df9 100644 --- a/orte/mca/plm/alps/plm_alps_module.c +++ b/orte/mca/plm/alps/plm_alps_module.c @@ -36,12 +36,8 @@ #include #endif #include -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/plm/base/plm_base_orted_cmds.c b/orte/mca/plm/base/plm_base_orted_cmds.c index 17d7b95c260..0b359ee639e 100644 --- a/orte/mca/plm/base/plm_base_orted_cmds.c +++ b/orte/mca/plm/base/plm_base_orted_cmds.c @@ -23,9 +23,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/orte/mca/plm/base/plm_base_receive.c b/orte/mca/plm/base/plm_base_receive.c index 22957dd09c5..dcc7cbe333e 100644 --- a/orte/mca/plm/base/plm_base_receive.c +++ b/orte/mca/plm/base/plm_base_receive.c @@ -28,9 +28,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/orte/mca/plm/lsf/plm_lsf_module.c b/orte/mca/plm/lsf/plm_lsf_module.c index b910a1d56d3..17d0af9bc12 100644 --- a/orte/mca/plm/lsf/plm_lsf_module.c +++ b/orte/mca/plm/lsf/plm_lsf_module.c @@ -37,9 +37,7 @@ #include #endif #include -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/plm/rsh/plm_rsh.h b/orte/mca/plm/rsh/plm_rsh.h index 61d3ee1fcb6..ca007274e30 100644 --- a/orte/mca/plm/rsh/plm_rsh.h +++ b/orte/mca/plm/rsh/plm_rsh.h @@ -33,9 +33,7 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#if HAVE_TIME_H #include -#endif #include "opal/threads/condition.h" #include "orte/mca/mca.h" diff --git a/orte/mca/plm/rsh/plm_rsh_module.c b/orte/mca/plm/rsh/plm_rsh_module.c index 88bcba2d468..656db837458 100644 --- a/orte/mca/plm/rsh/plm_rsh_module.c +++ b/orte/mca/plm/rsh/plm_rsh_module.c @@ -48,9 +48,7 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#ifdef HAVE_TIME_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/plm/slurm/plm_slurm_module.c b/orte/mca/plm/slurm/plm_slurm_module.c index 6917ff1a017..4e6ac1636a6 100644 --- a/orte/mca/plm/slurm/plm_slurm_module.c +++ b/orte/mca/plm/slurm/plm_slurm_module.c @@ -28,17 +28,13 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include #endif #include -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/plm/tm/plm_tm_module.c b/orte/mca/plm/tm/plm_tm_module.c index 47ffdbc63a0..a4c3f9c8fd9 100644 --- a/orte/mca/plm/tm/plm_tm_module.c +++ b/orte/mca/plm/tm/plm_tm_module.c @@ -30,9 +30,7 @@ #include "orte/constants.h" #include "orte/types.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include diff --git a/orte/mca/qos/base/qos_base_channel_handlers.c b/orte/mca/qos/base/qos_base_channel_handlers.c index 1f8cdccbff3..51e8afa1836 100644 --- a/orte/mca/qos/base/qos_base_channel_handlers.c +++ b/orte/mca/qos/base/qos_base_channel_handlers.c @@ -16,9 +16,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/mca/qos/noop/qos_noop_channel_handlers.c b/orte/mca/qos/noop/qos_noop_channel_handlers.c index 5083ab48d15..e351a25d801 100644 --- a/orte/mca/qos/noop/qos_noop_channel_handlers.c +++ b/orte/mca/qos/noop/qos_noop_channel_handlers.c @@ -16,9 +16,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/mca/ras/base/ras_base_allocate.c b/orte/mca/ras/base/ras_base_allocate.c index a0bc8e979b2..cb849b7cefc 100644 --- a/orte/mca/ras/base/ras_base_allocate.c +++ b/orte/mca/ras/base/ras_base_allocate.c @@ -21,9 +21,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/mca/rmaps/base/rmaps_base_frame.c b/orte/mca/rmaps/base/rmaps_base_frame.c index 1f6b830afb1..b560ba26c0f 100644 --- a/orte/mca/rmaps/base/rmaps_base_frame.c +++ b/orte/mca/rmaps/base/rmaps_base_frame.c @@ -25,9 +25,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/util/argv.h" diff --git a/orte/mca/rmaps/mindist/rmaps_mindist_module.c b/orte/mca/rmaps/mindist/rmaps_mindist_module.c index 9e2ac015ad7..26107a8268e 100644 --- a/orte/mca/rmaps/mindist/rmaps_mindist_module.c +++ b/orte/mca/rmaps/mindist/rmaps_mindist_module.c @@ -30,9 +30,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/base/mca_base_var.h" diff --git a/orte/mca/rmaps/ppr/rmaps_ppr.c b/orte/mca/rmaps/ppr/rmaps_ppr.c index fcb5de8dc74..c483b502d4a 100644 --- a/orte/mca/rmaps/ppr/rmaps_ppr.c +++ b/orte/mca/rmaps/ppr/rmaps_ppr.c @@ -18,9 +18,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/hwloc/base/base.h" #include "opal/util/argv.h" diff --git a/orte/mca/rmaps/rank_file/rmaps_rank_file.c b/orte/mca/rmaps/rank_file/rmaps_rank_file.c index 0669ae4f758..7fc47cfd9d2 100644 --- a/orte/mca/rmaps/rank_file/rmaps_rank_file.c +++ b/orte/mca/rmaps/rank_file/rmaps_rank_file.c @@ -33,9 +33,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/util/argv.h" #include "opal/util/if.h" diff --git a/orte/mca/rmaps/rank_file/rmaps_rank_file_component.c b/orte/mca/rmaps/rank_file/rmaps_rank_file_component.c index a053f107405..4b69874a4ac 100644 --- a/orte/mca/rmaps/rank_file/rmaps_rank_file_component.c +++ b/orte/mca/rmaps/rank_file/rmaps_rank_file_component.c @@ -25,9 +25,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/mca/base/base.h" #include "opal/mca/hwloc/base/base.h" diff --git a/orte/mca/rmaps/resilient/rmaps_resilient.c b/orte/mca/rmaps/resilient/rmaps_resilient.c index 76c75960924..8e2042ec295 100644 --- a/orte/mca/rmaps/resilient/rmaps_resilient.c +++ b/orte/mca/rmaps/resilient/rmaps_resilient.c @@ -22,9 +22,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #include "opal/util/argv.h" diff --git a/orte/mca/rmaps/round_robin/rmaps_rr.c b/orte/mca/rmaps/round_robin/rmaps_rr.c index 2676ed965bd..ebafd87d2e7 100644 --- a/orte/mca/rmaps/round_robin/rmaps_rr.c +++ b/orte/mca/rmaps/round_robin/rmaps_rr.c @@ -28,9 +28,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rmaps/seq/rmaps_seq.c b/orte/mca/rmaps/seq/rmaps_seq.c index f4a8116baa1..9ba67445d3c 100644 --- a/orte/mca/rmaps/seq/rmaps_seq.c +++ b/orte/mca/rmaps/seq/rmaps_seq.c @@ -30,9 +30,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include #include "opal/util/if.h" diff --git a/orte/mca/rmaps/staged/rmaps_staged.c b/orte/mca/rmaps/staged/rmaps_staged.c index 712bc0a977a..54d77b72b68 100644 --- a/orte/mca/rmaps/staged/rmaps_staged.c +++ b/orte/mca/rmaps/staged/rmaps_staged.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/hwloc/base/base.h" #include "opal/dss/dss.h" diff --git a/orte/mca/rml/base/rml_base_channel_handlers.c b/orte/mca/rml/base/rml_base_channel_handlers.c index cd5112106d6..9d0092887f5 100644 --- a/orte/mca/rml/base/rml_base_channel_handlers.c +++ b/orte/mca/rml/base/rml_base_channel_handlers.c @@ -17,9 +17,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/mca/rml/base/rml_base_frame.c b/orte/mca/rml/base/rml_base_frame.c index b28adc81a6a..54dc454426d 100644 --- a/orte/mca/rml/base/rml_base_frame.c +++ b/orte/mca/rml/base/rml_base_frame.c @@ -17,9 +17,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/dss/dss.h" #include "orte/mca/mca.h" diff --git a/orte/mca/rml/base/rml_base_msg_handlers.c b/orte/mca/rml/base/rml_base_msg_handlers.c index f35e4922c83..758bf9105f2 100644 --- a/orte/mca/rml/base/rml_base_msg_handlers.c +++ b/orte/mca/rml/base/rml_base_msg_handlers.c @@ -28,9 +28,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/mca/rml/base/rml_base_receive.c b/orte/mca/rml/base/rml_base_receive.c index 3fbc2516c72..a8c6b1247b4 100644 --- a/orte/mca/rml/base/rml_base_receive.c +++ b/orte/mca/rml/base/rml_base_receive.c @@ -27,9 +27,7 @@ */ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/mca/rtc/base/rtc_base_frame.c b/orte/mca/rtc/base/rtc_base_frame.c index e013ba56e55..9012e9b5509 100644 --- a/orte/mca/rtc/base/rtc_base_frame.c +++ b/orte/mca/rtc/base/rtc_base_frame.c @@ -12,9 +12,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/class/opal_list.h" diff --git a/orte/mca/rtc/freq/rtc_freq.c b/orte/mca/rtc/freq/rtc_freq.c index ebdc6f0efb3..4721719ffb0 100644 --- a/orte/mca/rtc/freq/rtc_freq.c +++ b/orte/mca/rtc/freq/rtc_freq.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_DIRENT_H #include #endif /* HAVE_DIRENT_H */ diff --git a/orte/mca/rtc/hwloc/rtc_hwloc.c b/orte/mca/rtc/hwloc/rtc_hwloc.c index 51c95655708..281560f2bb8 100644 --- a/orte/mca/rtc/hwloc/rtc_hwloc.c +++ b/orte/mca/rtc/hwloc/rtc_hwloc.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/mca/hwloc/hwloc.h" #include "opal/util/argv.h" diff --git a/orte/mca/schizo/base/schizo_base_frame.c b/orte/mca/schizo/base/schizo_base_frame.c index 5cf96b6581f..264549c74f4 100644 --- a/orte/mca/schizo/base/schizo_base_frame.c +++ b/orte/mca/schizo/base/schizo_base_frame.c @@ -12,9 +12,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/util/argv.h" diff --git a/orte/mca/snapc/base/snapc_base_fns.c b/orte/mca/snapc/base/snapc_base_fns.c index 45207d79197..b8df3f1cd5c 100644 --- a/orte/mca/snapc/base/snapc_base_fns.c +++ b/orte/mca/snapc/base/snapc_base_fns.c @@ -19,9 +19,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ diff --git a/orte/mca/snapc/base/snapc_base_frame.c b/orte/mca/snapc/base/snapc_base_frame.c index 191e8eb05a2..8f82464afb6 100644 --- a/orte/mca/snapc/base/snapc_base_frame.c +++ b/orte/mca/snapc/base/snapc_base_frame.c @@ -21,9 +21,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/orte/mca/snapc/base/snapc_base_select.c b/orte/mca/snapc/base/snapc_base_select.c index 368e2bcbedc..4b8feaeac27 100644 --- a/orte/mca/snapc/base/snapc_base_select.c +++ b/orte/mca/snapc/base/snapc_base_select.c @@ -17,9 +17,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" diff --git a/orte/mca/snapc/full/snapc_full_app.c b/orte/mca/snapc/full/snapc_full_app.c index 88e90ca7d60..1dd5a8d5edd 100644 --- a/orte/mca/snapc/full/snapc_full_app.c +++ b/orte/mca/snapc/full/snapc_full_app.c @@ -30,12 +30,8 @@ #ifdef HAVE_SYS_STAT_H #include /* for mkfifo */ #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_SIGNAL_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif #include "orte/runtime/orte_cr.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/snapc/full/snapc_full_global.c b/orte/mca/snapc/full/snapc_full_global.c index 193c7ed22c7..10d0419840c 100644 --- a/orte/mca/snapc/full/snapc_full_global.c +++ b/orte/mca/snapc/full/snapc_full_global.c @@ -21,9 +21,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/include/opal/prefetch.h" #include "opal/util/output.h" diff --git a/orte/mca/snapc/full/snapc_full_local.c b/orte/mca/snapc/full/snapc_full_local.c index c2051708f7e..0596fc1d9d0 100644 --- a/orte/mca/snapc/full/snapc_full_local.c +++ b/orte/mca/snapc/full/snapc_full_local.c @@ -22,9 +22,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ @@ -37,9 +35,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif -#ifdef HAVE_STRING_H #include -#endif #include "opal/runtime/opal_progress.h" #include "opal/runtime/opal_cr.h" diff --git a/orte/mca/sstore/base/sstore_base_fns.c b/orte/mca/sstore/base/sstore_base_fns.c index 6da71b0f36b..9fe8f04721b 100644 --- a/orte/mca/sstore/base/sstore_base_fns.c +++ b/orte/mca/sstore/base/sstore_base_fns.c @@ -13,9 +13,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/mca/sstore/base/sstore_base_select.c b/orte/mca/sstore/base/sstore_base_select.c index 27fb0733989..b7816ffdd24 100644 --- a/orte/mca/sstore/base/sstore_base_select.c +++ b/orte/mca/sstore/base/sstore_base_select.c @@ -10,9 +10,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" diff --git a/orte/mca/sstore/central/sstore_central_app.c b/orte/mca/sstore/central/sstore_central_app.c index 06d2b0d3353..71ee550f667 100644 --- a/orte/mca/sstore/central/sstore_central_app.c +++ b/orte/mca/sstore/central/sstore_central_app.c @@ -14,9 +14,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/central/sstore_central_global.c b/orte/mca/sstore/central/sstore_central_global.c index 8fbb24fa7b2..6c56f3566da 100644 --- a/orte/mca/sstore/central/sstore_central_global.c +++ b/orte/mca/sstore/central/sstore_central_global.c @@ -17,9 +17,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/central/sstore_central_local.c b/orte/mca/sstore/central/sstore_central_local.c index fb927fa6374..f12bd16ed14 100644 --- a/orte/mca/sstore/central/sstore_central_local.c +++ b/orte/mca/sstore/central/sstore_central_local.c @@ -17,9 +17,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/central/sstore_central_module.c b/orte/mca/sstore/central/sstore_central_module.c index 493d9ecd1e1..d86cf008938 100644 --- a/orte/mca/sstore/central/sstore_central_module.c +++ b/orte/mca/sstore/central/sstore_central_module.c @@ -14,9 +14,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/stage/sstore_stage_app.c b/orte/mca/sstore/stage/sstore_stage_app.c index e92013821b8..110dc382141 100644 --- a/orte/mca/sstore/stage/sstore_stage_app.c +++ b/orte/mca/sstore/stage/sstore_stage_app.c @@ -14,9 +14,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/stage/sstore_stage_global.c b/orte/mca/sstore/stage/sstore_stage_global.c index d112388b88b..63ab281e13e 100644 --- a/orte/mca/sstore/stage/sstore_stage_global.c +++ b/orte/mca/sstore/stage/sstore_stage_global.c @@ -17,9 +17,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/stage/sstore_stage_local.c b/orte/mca/sstore/stage/sstore_stage_local.c index 1ae22603738..bb85ef6a536 100644 --- a/orte/mca/sstore/stage/sstore_stage_local.c +++ b/orte/mca/sstore/stage/sstore_stage_local.c @@ -17,9 +17,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/sstore/stage/sstore_stage_module.c b/orte/mca/sstore/stage/sstore_stage_module.c index 6c77445de18..8372f30fa9d 100644 --- a/orte/mca/sstore/stage/sstore_stage_module.c +++ b/orte/mca/sstore/stage/sstore_stage_module.c @@ -14,9 +14,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #include #include diff --git a/orte/mca/state/app/state_app.c b/orte/mca/state/app/state_app.c index 790fa86ab7e..55a6385168e 100644 --- a/orte/mca/state/app/state_app.c +++ b/orte/mca/state/app/state_app.c @@ -14,9 +14,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" diff --git a/orte/mca/state/base/state_base_frame.c b/orte/mca/state/base/state_base_frame.c index 96dc8d92810..f7f4ff19c86 100644 --- a/orte/mca/state/base/state_base_frame.c +++ b/orte/mca/state/base/state_base_frame.c @@ -15,9 +15,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/orte/mca/state/base/state_base_select.c b/orte/mca/state/base/state_base_select.c index 9c52b943b3c..8efc4bf8522 100644 --- a/orte/mca/state/base/state_base_select.c +++ b/orte/mca/state/base/state_base_select.c @@ -12,9 +12,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/mca/mca.h" #include "opal/mca/base/base.h" diff --git a/orte/mca/state/dvm/state_dvm.c b/orte/mca/state/dvm/state_dvm.c index d795bbcaefc..a46fb428f2c 100644 --- a/orte/mca/state/dvm/state_dvm.c +++ b/orte/mca/state/dvm/state_dvm.c @@ -13,9 +13,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" diff --git a/orte/mca/state/hnp/state_hnp.c b/orte/mca/state/hnp/state_hnp.c index 5225bd3d5e8..220ec17b5b4 100644 --- a/orte/mca/state/hnp/state_hnp.c +++ b/orte/mca/state/hnp/state_hnp.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" diff --git a/orte/mca/state/novm/state_novm.c b/orte/mca/state/novm/state_novm.c index 1612d6efb08..1bb303d4b2f 100644 --- a/orte/mca/state/novm/state_novm.c +++ b/orte/mca/state/novm/state_novm.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" diff --git a/orte/mca/state/orted/state_orted.c b/orte/mca/state/orted/state_orted.c index fc41826fcd8..a23dbb08b5b 100644 --- a/orte/mca/state/orted/state_orted.c +++ b/orte/mca/state/orted/state_orted.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" #include "opal/dss/dss.h" diff --git a/orte/mca/state/staged_hnp/state_staged_hnp.c b/orte/mca/state/staged_hnp/state_staged_hnp.c index 147ab29c713..87e3c3cfdf4 100644 --- a/orte/mca/state/staged_hnp/state_staged_hnp.c +++ b/orte/mca/state/staged_hnp/state_staged_hnp.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" diff --git a/orte/mca/state/staged_orted/state_staged_orted.c b/orte/mca/state/staged_orted/state_staged_orted.c index 2360adbdc98..16e7f2e8d26 100644 --- a/orte/mca/state/staged_orted/state_staged_orted.c +++ b/orte/mca/state/staged_orted/state_staged_orted.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" #include "opal/dss/dss.h" diff --git a/orte/mca/state/tool/state_tool.c b/orte/mca/state/tool/state_tool.c index 8c8b1fe9e7d..9ef3118373b 100644 --- a/orte/mca/state/tool/state_tool.c +++ b/orte/mca/state/tool/state_tool.c @@ -15,9 +15,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/output.h" diff --git a/orte/orted/orted.h b/orte/orted/orted.h index 2f8b2a59cd1..bccd71bd6c3 100644 --- a/orte/orted/orted.h +++ b/orte/orted/orted.h @@ -22,9 +22,7 @@ #include "orte_config.h" #include "orte/types.h" -#ifdef HAVE_TIME_H #include -#endif #include "opal/dss/dss_types.h" #include "opal/class/opal_pointer_array.h" diff --git a/orte/orted/orted_comm.c b/orte/orted/orted_comm.c index aa7356d56d2..a330a69c24a 100644 --- a/orte/orted/orted_comm.c +++ b/orte/orted/orted_comm.c @@ -40,9 +40,7 @@ #include #include #include -#ifdef HAVE_TIME_H #include -#endif #include "opal/mca/event/event.h" diff --git a/orte/orted/orted_main.c b/orte/orted/orted_main.c index b327f966cbd..cc8b043c0cf 100644 --- a/orte/orted/orted_main.c +++ b/orte/orted/orted_main.c @@ -28,9 +28,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #include diff --git a/orte/runtime/data_type_support/orte_dt_compare_fns.c b/orte/runtime/data_type_support/orte_dt_compare_fns.c index c776e9efd2f..6e004aa790f 100644 --- a/orte/runtime/data_type_support/orte_dt_compare_fns.c +++ b/orte/runtime/data_type_support/orte_dt_compare_fns.c @@ -19,9 +19,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include diff --git a/orte/runtime/data_type_support/orte_dt_copy_fns.c b/orte/runtime/data_type_support/orte_dt_copy_fns.c index 37fd945c6f3..87c3a82badd 100644 --- a/orte/runtime/data_type_support/orte_dt_copy_fns.c +++ b/orte/runtime/data_type_support/orte_dt_copy_fns.c @@ -25,9 +25,7 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/argv.h" #include "opal/dss/dss.h" diff --git a/orte/runtime/orte_data_server.c b/orte/runtime/orte_data_server.c index b56064c75c9..8a3e9a4a6c0 100644 --- a/orte/runtime/orte_data_server.c +++ b/orte/runtime/orte_data_server.c @@ -23,9 +23,7 @@ #include "orte/constants.h" #include "orte/types.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_SYS_TIME_H #include diff --git a/orte/runtime/orte_quit.c b/orte/runtime/orte_quit.c index 39b28dbc2eb..04e676b7c5b 100644 --- a/orte/runtime/orte_quit.c +++ b/orte/runtime/orte_quit.c @@ -26,9 +26,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include diff --git a/orte/runtime/orte_wait.c b/orte/runtime/orte_wait.c index b63d9c3c7b5..9cb1d51b182 100644 --- a/orte/runtime/orte_wait.c +++ b/orte/runtime/orte_wait.c @@ -24,9 +24,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_UNISTD_H #include diff --git a/orte/runtime/orte_wait.h b/orte/runtime/orte_wait.h index 57a980a1633..93ac0234598 100644 --- a/orte/runtime/orte_wait.h +++ b/orte/runtime/orte_wait.h @@ -35,9 +35,7 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_TIME_H #include -#endif #if HAVE_SYS_TIME_H #include #endif diff --git a/orte/tools/orte-checkpoint/orte-checkpoint.c b/orte/tools/orte-checkpoint/orte-checkpoint.c index db98b5ff121..0ee04e6d1fc 100644 --- a/orte/tools/orte-checkpoint/orte-checkpoint.c +++ b/orte/tools/orte-checkpoint/orte-checkpoint.c @@ -31,9 +31,7 @@ #include #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ @@ -49,9 +47,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif /* HAVE_SYS_WAIT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/util/cmd_line.h" diff --git a/orte/tools/orte-clean/orte-clean.c b/orte/tools/orte-clean/orte-clean.c index 804bb8f5498..cd2ea591bf3 100644 --- a/orte/tools/orte-clean/orte-clean.c +++ b/orte/tools/orte-clean/orte-clean.c @@ -30,9 +30,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ @@ -45,9 +43,7 @@ #ifdef HAVE_SYS_PARAM_H #include #endif /* HAVE_SYS_PARAM_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_DIRENT_H #include #endif /* HAVE_DIRENT_H */ diff --git a/orte/tools/orte-dvm/orte-dvm.c b/orte/tools/orte-dvm/orte-dvm.c index c88438512f3..acc44d972de 100644 --- a/orte/tools/orte-dvm/orte-dvm.c +++ b/orte/tools/orte-dvm/orte-dvm.c @@ -25,13 +25,9 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ diff --git a/orte/tools/orte-info/orte-info.c b/orte/tools/orte-info/orte-info.c index 934e19f4669..e370cce0ed5 100644 --- a/orte/tools/orte-info/orte-info.c +++ b/orte/tools/orte-info/orte-info.c @@ -37,9 +37,7 @@ #include #endif #include -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/mca/installdirs/installdirs.h" #include "opal/class/opal_object.h" diff --git a/orte/tools/orte-info/output.c b/orte/tools/orte-info/output.c index 89a57eb2c8b..76974cb0129 100644 --- a/orte/tools/orte-info/output.c +++ b/orte/tools/orte-info/output.c @@ -24,9 +24,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_TERMIOS_H #include #endif diff --git a/orte/tools/orte-migrate/orte-migrate.c b/orte/tools/orte-migrate/orte-migrate.c index 654339f7c6a..b8d62d81085 100644 --- a/orte/tools/orte-migrate/orte-migrate.c +++ b/orte/tools/orte-migrate/orte-migrate.c @@ -22,9 +22,7 @@ #include #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ @@ -40,9 +38,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif /* HAVE_SYS_WAIT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/util/cmd_line.h" diff --git a/orte/tools/orte-ps/orte-ps.c b/orte/tools/orte-ps/orte-ps.c index 669f975aedb..8f10b6d0aa1 100644 --- a/orte/tools/orte-ps/orte-ps.c +++ b/orte/tools/orte-ps/orte-ps.c @@ -38,9 +38,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ @@ -50,9 +48,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif /* HAVE_SYS_WAIT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_DIRENT_H #include #endif /* HAVE_DIRENT_H */ diff --git a/orte/tools/orte-restart/orte-restart.c b/orte/tools/orte-restart/orte-restart.c index 7063e0c3637..3fe6166abb6 100644 --- a/orte/tools/orte-restart/orte-restart.c +++ b/orte/tools/orte-restart/orte-restart.c @@ -34,9 +34,7 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ @@ -46,9 +44,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif /* HAVE_SYS_WAIT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/runtime/opal.h" #include "opal/runtime/opal_cr.h" diff --git a/orte/tools/orte-server/orte-server.c b/orte/tools/orte-server/orte-server.c index 45d5c8e61ea..5035631b3bb 100644 --- a/orte/tools/orte-server/orte-server.c +++ b/orte/tools/orte-server/orte-server.c @@ -23,9 +23,7 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include #include diff --git a/orte/tools/orte-submit/orte-submit.c b/orte/tools/orte-submit/orte-submit.c index 518de0ca3ac..49145167bc3 100644 --- a/orte/tools/orte-submit/orte-submit.c +++ b/orte/tools/orte-submit/orte-submit.c @@ -27,13 +27,9 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ diff --git a/orte/tools/orted/orted.c b/orte/tools/orted/orted.c index 8aac553449d..34a5bea75aa 100644 --- a/orte/tools/orted/orted.c +++ b/orte/tools/orted/orted.c @@ -22,9 +22,7 @@ #include "orte_config.h" #include -#ifdef HAVE_LIMITS_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 3761ea1143a..5a030afc0fe 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -27,13 +27,9 @@ #include "orte_config.h" #include "orte/constants.h" -#ifdef HAVE_STRING_H #include -#endif #include -#ifdef HAVE_STDLIB_H #include -#endif /* HAVE_STDLIB_H */ #ifdef HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ diff --git a/orte/util/dash_host/dash_host.c b/orte/util/dash_host/dash_host.c index 5964f50705e..3eab88914ec 100644 --- a/orte/util/dash_host/dash_host.c +++ b/orte/util/dash_host/dash_host.c @@ -22,9 +22,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/util/error_strings.c b/orte/util/error_strings.c index c41208cc4d0..ed67ca5db99 100644 --- a/orte/util/error_strings.c +++ b/orte/util/error_strings.c @@ -29,10 +29,8 @@ #ifdef HAVE_SYS_SIGNAL_H #include #else -#ifdef HAVE_SIGNAL_H #include #endif -#endif #include "orte/mca/plm/plm_types.h" #include "orte/util/error_strings.h" diff --git a/orte/util/pre_condition_transports.c b/orte/util/pre_condition_transports.c index fdda6f4b0e8..9187bb559cc 100644 --- a/orte/util/pre_condition_transports.c +++ b/orte/util/pre_condition_transports.c @@ -21,9 +21,7 @@ #include "orte_config.h" -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif @@ -36,9 +34,7 @@ #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_TIME_H #include -#endif #include "opal/mca/base/mca_base_var.h" #include "opal/util/alfg.h" diff --git a/orte/util/proc_info.h b/orte/util/proc_info.h index 046dedcc77a..f166b5b594c 100644 --- a/orte/util/proc_info.h +++ b/orte/util/proc_info.h @@ -31,9 +31,7 @@ #include "orte_config.h" -#ifdef HAVE_STDINT_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include diff --git a/oshmem/mca/spml/base/spml_base_frame.c b/oshmem/mca/spml/base/spml_base_frame.c index 164df3b1592..22a58a2ee36 100644 --- a/oshmem/mca/spml/base/spml_base_frame.c +++ b/oshmem/mca/spml/base/spml_base_frame.c @@ -16,9 +16,7 @@ #include "oshmem_config.h" #include -#ifdef HAVE_STRING_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNIST_H */ diff --git a/oshmem/mca/spml/base/spml_base_select.c b/oshmem/mca/spml/base/spml_base_select.c index 36183a90f2a..cfb64a56a5e 100644 --- a/oshmem/mca/spml/base/spml_base_select.c +++ b/oshmem/mca/spml/base/spml_base_select.c @@ -12,9 +12,7 @@ #include "oshmem_config.h" -#ifdef HAVE_STRING_H #include -#endif #include "opal/util/show_help.h" #include "opal/mca/base/base.h" diff --git a/oshmem/mca/sshmem/base/sshmem_base_select.c b/oshmem/mca/sshmem/base/sshmem_base_select.c index f59fbdf5112..8762e27c506 100644 --- a/oshmem/mca/sshmem/base/sshmem_base_select.c +++ b/oshmem/mca/sshmem/base/sshmem_base_select.c @@ -10,9 +10,7 @@ #include "oshmem_config.h" -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #include "opal/constants.h" #include "opal/util/output.h" diff --git a/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c b/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c index 8cb3663c967..8d5ef386dbd 100644 --- a/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c +++ b/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c @@ -23,15 +23,11 @@ #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ -#ifdef HAVE_TIME_H #include -#endif /* HAVE_NETDB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ diff --git a/oshmem/mca/sshmem/sysv/sshmem_sysv_component.c b/oshmem/mca/sshmem/sysv/sshmem_sysv_component.c index c66a99e8ef7..4c72c571cfe 100644 --- a/oshmem/mca/sshmem/sysv/sshmem_sysv_component.c +++ b/oshmem/mca/sshmem/sysv/sshmem_sysv_component.c @@ -18,9 +18,7 @@ #ifdef HAVE_SYS_MMAN_H #include #endif /* HAVE_SYS_MMAN_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ diff --git a/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c b/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c index 73f41c21162..10a5225435f 100644 --- a/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c +++ b/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c @@ -33,9 +33,7 @@ #if HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ diff --git a/oshmem/mca/sshmem/verbs/sshmem_verbs_module.c b/oshmem/mca/sshmem/verbs/sshmem_verbs_module.c index 101293f5411..381e2781bd0 100644 --- a/oshmem/mca/sshmem/verbs/sshmem_verbs_module.c +++ b/oshmem/mca/sshmem/verbs/sshmem_verbs_module.c @@ -23,15 +23,11 @@ #ifdef HAVE_SYS_TYPES_H #include #endif /* HAVE_SYS_TYPES_H */ -#ifdef HAVE_STRING_H #include -#endif /* HAVE_STRING_H */ #ifdef HAVE_NETDB_H #include #endif /* HAVE_NETDB_H */ -#ifdef HAVE_TIME_H #include -#endif /* HAVE_NETDB_H */ #ifdef HAVE_SYS_STAT_H #include #endif /* HAVE_SYS_STAT_H */ diff --git a/oshmem/tools/oshmem_info/oshmem_info.c b/oshmem/tools/oshmem_info/oshmem_info.c index 8c42fbfc372..38be24d4eb6 100644 --- a/oshmem/tools/oshmem_info/oshmem_info.c +++ b/oshmem/tools/oshmem_info/oshmem_info.c @@ -25,9 +25,7 @@ #include #endif #include -#ifdef HAVE_SIGNAL_H #include -#endif #include "opal/version.h" #include "opal/mca/installdirs/installdirs.h" diff --git a/test/class/ompi_rb_tree.c b/test/class/ompi_rb_tree.c index 11979b9d9de..fa4a7354a34 100644 --- a/test/class/ompi_rb_tree.c +++ b/test/class/ompi_rb_tree.c @@ -21,9 +21,7 @@ */ #include "opal_config.h" -#ifdef HAVE_STDINT_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #else diff --git a/test/class/opal_hash_table.c b/test/class/opal_hash_table.c index e1a071a843e..cec6630d4b7 100644 --- a/test/class/opal_hash_table.c +++ b/test/class/opal_hash_table.c @@ -22,9 +22,7 @@ */ #include "opal_config.h" -#ifdef HAVE_STDINT_H #include -#endif #include #include "support.h" #include "opal/class/opal_object.h" diff --git a/test/class/opal_proc_table.c b/test/class/opal_proc_table.c index 9b57e8c6325..2f7e3ce8550 100644 --- a/test/class/opal_proc_table.c +++ b/test/class/opal_proc_table.c @@ -24,9 +24,7 @@ */ #include "opal_config.h" -#ifdef HAVE_STDINT_H #include -#endif #include #include "support.h" #include "opal/class/opal_object.h" diff --git a/test/datatype/ddt_pack.c b/test/datatype/ddt_pack.c index 584ee0a5e69..d316d3c5aee 100644 --- a/test/datatype/ddt_pack.c +++ b/test/datatype/ddt_pack.c @@ -25,12 +25,8 @@ #include "opal/datatype/opal_convertor.h" #include "ompi/proc/proc.h" -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif #include diff --git a/test/datatype/opal_ddt_lib.c b/test/datatype/opal_ddt_lib.c index ce232cd5023..5fabd90a2b7 100644 --- a/test/datatype/opal_ddt_lib.c +++ b/test/datatype/opal_ddt_lib.c @@ -14,12 +14,9 @@ #include "opal_config.h" #include -#ifdef HAVE_STRING_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif + #include "opal_ddt_lib.h" #include "opal/constants.h" From d5d8fb4a58ca41798c67f4b2afcb070a2005d83a Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 2 Jun 2015 19:09:01 +0900 Subject: [PATCH 0137/1704] MPI_Win_{get,set}_info : add man pages --- ompi/mpi/man/man3/MPI_Win_get_info.3in | 65 +++++++++++++++++++++++++ ompi/mpi/man/man3/MPI_Win_set_info.3in | 67 ++++++++++++++++++++++++++ ompi/mpi/man/man3/Makefile.extra | 2 + 3 files changed, 134 insertions(+) create mode 100644 ompi/mpi/man/man3/MPI_Win_get_info.3in create mode 100644 ompi/mpi/man/man3/MPI_Win_set_info.3in diff --git a/ompi/mpi/man/man3/MPI_Win_get_info.3in b/ompi/mpi/man/man3/MPI_Win_get_info.3in new file mode 100644 index 00000000000..dd3f0c17cc7 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_Win_get_info.3in @@ -0,0 +1,65 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 Research Organization for Information Science +.\" and Technology (RIST). All rights reserved. +.\" $COPYRIGHT$ +.TH MPI_Win_get_info 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_Win_get_info\fP \- Retrieves active window info hints +. +.SH SYNTAX +.ft R +.SH C Syntax +.nf +#include +int MPI_Win_get_info(MPI_Win \fIwin\fP, MPI_Info \fI*info_used\fP) +. +.fi +.SH Fortran Syntax +.nf +INCLUDE 'mpif.h' +MPI_WIN_GET_INFO(\fIWIN, INFO_USED, IERROR\fP) + INTEGER \fICOMM, INFO_USED, IERROR \fP +. +.fi +.SH INPUT PARAMETERS +.ft R +.TP 1i +win +Window from which to receive active info hints +. +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +info_used +New info object returned with all active hints on this window. +.TP 1i +IERROR +Fortran only: Error status (integer). +. +.SH DESCRIPTION +.ft R +MPI_Win_get_info returns a new info object containing the hints of +the window associated with +.IR win . +The current setting of all hints actually used by the system related +to this window is returned in +.IR info_used . +If no such hints exist, a handle to a newly created info object is +returned that contains no key/value pair. The user is responsible for +freeing info_used via MPI_Info_free. +. +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value +of the function and Fortran routines in the last argument. +.sp +Before the error value is returned, the current MPI error handler is +called. By default, this error handler aborts the MPI job, except for +I/O function errors. The error handler may be changed with +MPI_Comm_set_errhandler; the predefined error handler +MPI_ERRORS_RETURN may be used to cause error values to be +returned. Note that MPI does not guarantee that an MPI program can +continue past an error. +. +.SH SEE ALSO +MPI_Win_set_info, +MPI_Win_free diff --git a/ompi/mpi/man/man3/MPI_Win_set_info.3in b/ompi/mpi/man/man3/MPI_Win_set_info.3in new file mode 100644 index 00000000000..67b0e1d16ee --- /dev/null +++ b/ompi/mpi/man/man3/MPI_Win_set_info.3in @@ -0,0 +1,67 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 Research Organization for Information Science +.\" and Technology (RIST). All rights reserved. +.\" $COPYRIGHT$ +.TH MPI_Win_set_info 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_Win_set_info\fP \- Set window info hints +. +.SH SYNTAX +.ft R +.SH C Syntax +.nf +#include +int MPI_Win_set_info(MPI_Win \fIwin\fP, MPI_Info \fIinfo\fP) +. +.fi +.SH Fortran Syntax +.nf +INCLUDE 'mpif.h' +MPI_WIN_SET_INFO(\fIWIN, INFO, IERROR\fP) + INTEGER \fIWIN, INFO, IERROR \fP +. +.fi +.SH INPUT PARAMETERS +.ft R +.TP 1i +win +Window on which to set info hints +.TP 1i +info +Info object containing hints to be set on +.I win +. +.SH OUTPUT PARAMETERS +.TP 1i +IERROR +Fortran only: Error status (integer). +. +.SH DESCRIPTION +.ft R +MPI_WIN_SET_INFO sets new values for the hints of the window +associated with +.IR win. +MPI_WIN_SET_INFO is a collective routine. The info object may be +different on each process, but any info entries that an implementation +requires to be the same on all processes must appear with the same +value in each process's +.I info +object. +. +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value +of the function and Fortran routines in the last argument. +.sp +Before the error value is returned, the current MPI error handler is +called. By default, this error handler aborts the MPI job, except for +I/O function errors. The error handler may be changed with +MPI_Comm_set_errhandler; the predefined error handler +MPI_ERRORS_RETURN may be used to cause error values to be +returned. Note that MPI does not guarantee that an MPI program can +continue past an error. +. +.SH SEE ALSO +MPI_Win_get_info, +MPI_Info_create, +MPI_Info_set, +MPI_Info_free diff --git a/ompi/mpi/man/man3/Makefile.extra b/ompi/mpi/man/man3/Makefile.extra index 4c1dc401683..aeec287f18b 100644 --- a/ompi/mpi/man/man3/Makefile.extra +++ b/ompi/mpi/man/man3/Makefile.extra @@ -399,12 +399,14 @@ mpi_api_man_pages = \ mpi/man/man3/MPI_Win_get_attr.3 \ mpi/man/man3/MPI_Win_get_errhandler.3 \ mpi/man/man3/MPI_Win_get_group.3 \ + mpi/man/man3/MPI_Win_get_info.3 \ mpi/man/man3/MPI_Win_get_name.3 \ mpi/man/man3/MPI_Win_lock.3 \ mpi/man/man3/MPI_Win_lock_all.3 \ mpi/man/man3/MPI_Win_post.3 \ mpi/man/man3/MPI_Win_set_attr.3 \ mpi/man/man3/MPI_Win_set_errhandler.3 \ + mpi/man/man3/MPI_Win_set_info.3 \ mpi/man/man3/MPI_Win_set_name.3 \ mpi/man/man3/MPI_Win_start.3 \ mpi/man/man3/MPI_Win_sync.3 \ From 725a11c3dde91fad3406385b6c9de7745a66e99a Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 11 Aug 2015 14:52:36 +0900 Subject: [PATCH 0138/1704] configury: fix hcoll detection * do not add -I/.../include/hcoll -I /.../include/hcoll/api to CPPFLAGS * allow configure --with-hcoll * search hcoll libs in both DIR/lib and DIR/lib64 * fix the description of the --with-hcoll option Thanks to David Shrader and Ake Sandgren for bringing this issue to our atte (cherry picked from commit open-mpi/ompi@df98a73131652b3c6c6328d33c039e9f66a88eb7) --- config/ompi_check_libhcoll.m4 | 62 ++++++++++--------------- ompi/mca/coll/hcoll/Makefile.am | 4 +- ompi/mca/coll/hcoll/coll_hcoll.h | 8 ++-- ompi/mca/coll/hcoll/coll_hcoll_dtypes.h | 2 +- ompi/mca/coll/hcoll/coll_hcoll_ops.c | 8 ++-- ompi/mca/coll/hcoll/coll_hcoll_rte.c | 8 ++-- ompi/mca/coll/hcoll/configure.m4 | 5 +- 7 files changed, 47 insertions(+), 50 deletions(-) diff --git a/config/ompi_check_libhcoll.m4 b/config/ompi_check_libhcoll.m4 index 165e5177629..8c8e842a754 100644 --- a/config/ompi_check_libhcoll.m4 +++ b/config/ompi_check_libhcoll.m4 @@ -17,52 +17,40 @@ dnl # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_HCOLL],[ - OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_hcoll_libdir ompi_check_hcoll_incdir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save]) + OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save]) AC_ARG_WITH([hcoll], [AC_HELP_STRING([--with-hcoll(=DIR)], - [Build hcoll (Mellanox Hierarchical Collectives) support, searching for libraries in DIR])]) - OPAL_CHECK_WITHDIR([hcoll], [$with_hcoll], [lib/libhcoll.so]) + [Build hcoll (Mellanox Hierarchical Collectives) support, optionally adding + DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])]) AS_IF([test "$with_hcoll" != "no"], - [AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"], - [ompi_check_hcoll_dir=$with_hcoll - ompi_check_hcoll_libdir="$ompi_check_hcoll_dir/lib" - ompi_check_hcoll_incdir="$ompi_check_hcoll_dir/include" - ompi_check_hcoll_libs=hcoll + [ompi_check_hcoll_libs=hcoll + AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"], + [ompi_check_hcoll_dir=$with_hcoll]) - coll_hcoll_extra_CPPFLAGS="-I$ompi_check_hcoll_incdir/hcoll -I$ompi_check_hcoll_incdir/hcoll/api" + CPPFLAGS_save=$CPPFLAGS + LDFLAGS_save=$LDFLAGS + LIBS_save=$LIBS - AC_SUBST([coll_hcoll_extra_CPPFLAGS]) - AC_SUBST([coll_hcoll_HOME], "$ompi_check_hcoll_dir") - - - CPPFLAGS_save=$CPPFLAGS - LDFLAGS_save=$LDFLAGS - LIBS_save=$LIBS - CPPFLAGS="$CPPFLAGS $coll_hcoll_extra_CPPFLAGS" - - OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1) - OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1) - OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1) - - OPAL_CHECK_PACKAGE([$1], - [hcoll_api.h], - [$ompi_check_hcoll_libs], - [hcoll_get_version], - [], - [$ompi_check_hcoll_dir], - [$ompi_check_hcoll_libdir], - [ompi_check_hcoll_happy="yes"], - [ompi_check_hcoll_happy="no"]) - - CPPFLAGS=$CPPFLAGS_save - LDFLAGS=$LDFLAGS_save - LIBS=$LIBS_save], - [ompi_check_hcoll_happy="no"]) - ]) + OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1) + OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1) + OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1) + OPAL_CHECK_PACKAGE([$1], + [hcoll/api/hcoll_api.h], + [$ompi_check_hcoll_libs], + [hcoll_get_version], + [], + [$ompi_check_hcoll_dir], + [], + [ompi_check_hcoll_happy="yes"], + [ompi_check_hcoll_happy="no"]) + CPPFLAGS=$CPPFLAGS_save + LDFLAGS=$LDFLAGS_save + LIBS=$LIBS_save], + [ompi_check_hcoll_happy=no]) AS_IF([test "$ompi_check_hcoll_happy" = "yes" && test "$enable_progress_threads" = "yes"], [AC_MSG_WARN([hcoll driver does not currently support progress threads. Disabling HCOLL.]) diff --git a/ompi/mca/coll/hcoll/Makefile.am b/ompi/mca/coll/hcoll/Makefile.am index 709b5376cda..dafa2b32f91 100644 --- a/ompi/mca/coll/hcoll/Makefile.am +++ b/ompi/mca/coll/hcoll/Makefile.am @@ -2,6 +2,8 @@ # # # Copyright (c) 2011 Mellanox Technologies. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -10,7 +12,7 @@ # # -AM_CPPFLAGS = $(coll_hcoll_CPPFLAGS) -DCOLL_HCOLL_HOME=\"$(coll_hcoll_HOME)\" $(coll_hcoll_extra_CPPFLAGS) +AM_CPPFLAGS = $(coll_hcoll_CPPFLAGS) coll_hcoll_sources = \ coll_hcoll.h \ diff --git a/ompi/mca/coll/hcoll/coll_hcoll.h b/ompi/mca/coll/hcoll/coll_hcoll.h index 3483dc50e88..8211061a2f2 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll.h +++ b/ompi/mca/coll/hcoll/coll_hcoll.h @@ -1,5 +1,7 @@ /** - Copyright (c) 2011 Mellanox Technologies. All rights reserved. + Copyright (c) 2011 Mellanox Technologies. All rights reserved. + Copyright (c) 2015 Research Organization for Information Science + and Technology (RIST). All rights reserved. $COPYRIGHT$ Additional copyrights may follow @@ -25,8 +27,8 @@ #include "orte/runtime/orte_globals.h" -#include "hcoll_api.h" -#include "hcoll_constants.h" +#include "hcoll/api/hcoll_api.h" +#include "hcoll/api/hcoll_constants.h" #include "coll_hcoll_debug.h" diff --git a/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h b/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h index c1c83aa4455..a578bc9d474 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h +++ b/ompi/mca/coll/hcoll/coll_hcoll_dtypes.h @@ -7,7 +7,7 @@ #include "ompi/datatype/ompi_datatype.h" #include "ompi/mca/op/op.h" -#include "hcoll_dte.h" +#include "hcoll/api/hcoll_dte.h" /*to keep this at hand: Ids of the basic opal_datatypes: #define OPAL_DATATYPE_INT1 4 diff --git a/ompi/mca/coll/hcoll/coll_hcoll_ops.c b/ompi/mca/coll/hcoll/coll_hcoll_ops.c index 266f1e2103b..c27486ae735 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_ops.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_ops.c @@ -1,5 +1,7 @@ /** - Copyright (c) 2011 Mellanox Technologies. All rights reserved. + Copyright (c) 2011 Mellanox Technologies. All rights reserved. + Copyright (c) 2015 Research Organization for Information Science + and Technology (RIST). All rights reserved. $COPYRIGHT$ Additional copyrights may follow @@ -10,9 +12,9 @@ #include "ompi_config.h" #include "ompi/constants.h" #include "coll_hcoll.h" -#include "hcoll_constants.h" +#include "hcoll/api/hcoll_constants.h" #include "coll_hcoll_dtypes.h" -#include "hcoll_dte.h" +#include "hcoll/api/hcoll_dte.h" int mca_coll_hcoll_barrier(struct ompi_communicator_t *comm, mca_coll_base_module_t *module){ int rc; diff --git a/ompi/mca/coll/hcoll/coll_hcoll_rte.c b/ompi/mca/coll/hcoll/coll_hcoll_rte.c index 22f2ef63e9d..447074cdaa4 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_rte.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_rte.c @@ -7,6 +7,8 @@ * reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -39,9 +41,9 @@ #include "ompi/mca/pml/pml.h" -#include "hcoll_dte.h" -#include "hcoll_api.h" -#include "hcoll_constants.h" +#include "hcoll/api/hcoll_dte.h" +#include "hcoll/api/hcoll_api.h" +#include "hcoll/api/hcoll_constants.h" /* * Local functions */ diff --git a/ompi/mca/coll/hcoll/configure.m4 b/ompi/mca/coll/hcoll/configure.m4 index 78734309a5e..f3f57532e22 100644 --- a/ompi/mca/coll/hcoll/configure.m4 +++ b/ompi/mca/coll/hcoll/configure.m4 @@ -1,7 +1,9 @@ # -*- shell-script -*- # # -# Copyright (c) 2011 Mellanox Technologies. All rights reserved. +# Copyright (c) 2011 Mellanox Technologies. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -23,7 +25,6 @@ AC_DEFUN([MCA_ompi_coll_hcoll_CONFIG],[ AS_IF([test "$coll_hcoll_happy" = "yes"], [coll_hcoll_WRAPPER_EXTRA_LDFLAGS="$coll_hcoll_LDFLAGS" coll_hcoll_CPPFLAGS="$coll_hcoll_CPPFLAGS" - coll_hcoll_WRAPPER_EXTRA_CPPFLAGS="$coll_hcoll_CPPFLAGS" coll_hcoll_WRAPPER_EXTRA_LIBS="$coll_hcoll_LIBS" $1], [$2]) From 9dd3a025b0bc49a37e4cb4af6f39ef8093f7b7f7 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 11 Aug 2015 17:17:47 +0900 Subject: [PATCH 0139/1704] configury: fix fca detection * do not add -I/.../include/fca -I /.../include/fca_core to CPPFLAGS * allow configure --with-fca * search fca libs in both DIR/lib and DIR/lib64 * fix the description of the --with-fca option (cherry picked from commit open-mpi/ompi@1a238d3a4f98eb68490ec6fc996fd47de4a89792) --- config/ompi_check_libfca.m4 | 60 +++++++++++++--------------- ompi/mca/coll/fca/coll_fca_api.h | 8 ++-- oshmem/mca/scoll/fca/configure.m4 | 3 +- oshmem/mca/scoll/fca/scoll_fca_api.h | 8 ++-- 4 files changed, 39 insertions(+), 40 deletions(-) diff --git a/config/ompi_check_libfca.m4 b/config/ompi_check_libfca.m4 index 058464b420f..9720599164f 100644 --- a/config/ompi_check_libfca.m4 +++ b/config/ompi_check_libfca.m4 @@ -17,49 +17,43 @@ dnl # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_FCA],[ - OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libdir ompi_check_fca_incdir ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save]) + OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save]) AC_ARG_WITH([fca], [AC_HELP_STRING([--with-fca(=DIR)], - [Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])]) - OPAL_CHECK_WITHDIR([fca], [$with_fca], [lib/libfca.so]) + [Build fca (Mellanox Fabric Collective Accelerator) support, optionally adding + DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])]) AS_IF([test "$with_fca" != "no"], - [AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"], - [ompi_check_fca_dir=$with_fca - ompi_check_fca_libdir="$ompi_check_fca_dir/lib" - ompi_check_fca_incdir="$ompi_check_fca_dir/include" - ompi_check_fca_libs=fca + [ompi_check_fca_libs=fca + AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"], + [ompi_check_fca_dir=$with_fca + AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")], + [AC_SUBST([coll_fca_HOME], "/")]) - coll_fca_extra_CPPFLAGS="-I$ompi_check_fca_incdir/fca -I$ompi_check_fca_incdir/fca_core" - AC_SUBST([coll_fca_extra_CPPFLAGS]) - AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir") + CPPFLAGS_save=$CPPFLAGS + LDFLAGS_save=$LDFLAGS + LIBS_save=$LIBS - CPPFLAGS_save=$CPPFLAGS - LDFLAGS_save=$LDFLAGS - LIBS_save=$LIBS - CPPFLAGS="$CPPFLAGS $coll_fca_extra_CPPFLAGS" + OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1) + OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1) + OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1) - OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1) - OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1) - OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1) + OPAL_CHECK_PACKAGE([$1], + [fca/fca_api.h], + [$ompi_check_fca_libs], + [fca_get_version], + [], + [$ompi_check_fca_dir], + [], + [ompi_check_fca_happy="yes"], + [ompi_check_fca_happy="no"]) - OPAL_CHECK_PACKAGE([$1], - [fca_api.h], - [$ompi_check_fca_libs], - [fca_get_version], - [], - [$ompi_check_fca_dir], - [$ompi_check_fca_libdir], - [ompi_check_fca_happy="yes"], - [ompi_check_fca_happy="no"]) - - CPPFLAGS=$CPPFLAGS_save - LDFLAGS=$LDFLAGS_save - LIBS=$LIBS_save], - [ompi_check_fca_happy="no"]) - ]) + CPPFLAGS=$CPPFLAGS_save + LDFLAGS=$LDFLAGS_save + LIBS=$LIBS_save], + [ompi_check_fca_happy="no"]) AS_IF([test "$ompi_check_fca_happy" = "yes" && test "$enable_progress_threads" = "yes"], [AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.]) diff --git a/ompi/mca/coll/fca/coll_fca_api.h b/ompi/mca/coll/fca/coll_fca_api.h index a16f7b56e32..705c9ecbcb5 100644 --- a/ompi/mca/coll/fca/coll_fca_api.h +++ b/ompi/mca/coll/fca/coll_fca_api.h @@ -1,5 +1,7 @@ /** - Copyright (c) 2011 Mellanox Technologies. All rights reserved. + Copyright (c) 2011 Mellanox Technologies. All rights reserved. + Copyright (c) 2015 Research Organization for Information Science + and Technology (RIST). All rights reserved. $COPYRIGHT$ Additional copyrights may follow @@ -9,8 +11,8 @@ #include "ompi_config.h" -#include -#include +#include +#include #ifndef FCA_API #define OMPI_FCA_VERSION 12 diff --git a/oshmem/mca/scoll/fca/configure.m4 b/oshmem/mca/scoll/fca/configure.m4 index d585547ab65..683dafa6845 100644 --- a/oshmem/mca/scoll/fca/configure.m4 +++ b/oshmem/mca/scoll/fca/configure.m4 @@ -3,6 +3,8 @@ # # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -24,7 +26,6 @@ AC_DEFUN([MCA_oshmem_scoll_fca_CONFIG],[ AS_IF([test "$scoll_fca_happy" = "yes"], [scoll_fca_WRAPPER_EXTRA_LDFLAGS="$scoll_fca_LDFLAGS" scoll_fca_CPPFLAGS="$scoll_fca_CPPFLAGS" - scoll_fca_WRAPPER_EXTRA_CPPFLAGS="$scoll_fca_CPPFLAGS" scoll_fca_WRAPPER_EXTRA_LIBS="$scoll_fca_LIBS" $1], [$2]) diff --git a/oshmem/mca/scoll/fca/scoll_fca_api.h b/oshmem/mca/scoll/fca/scoll_fca_api.h index 3ed0c75a984..48742d9e737 100644 --- a/oshmem/mca/scoll/fca/scoll_fca_api.h +++ b/oshmem/mca/scoll/fca/scoll_fca_api.h @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -9,9 +11,9 @@ */ #include "oshmem_config.h" -#include -#include -#include +#include +#include +#include #ifndef FCA_API #define OSHMEM_FCA_VERSION 12 From e61f26fd0cf67788141c142381273c34b8d65018 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 13 Aug 2015 11:03:23 +0900 Subject: [PATCH 0140/1704] configury: fix --with-mxm * search mxm libs in both DIR/lib and DIR/lib64 * fix the description of the --with-mxm option (cherry picked from commit open-mpi/ompi@288e13ba7cfed6ce0248bbcba0cf939456de2d81) --- config/ompi_check_mxm.m4 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/config/ompi_check_mxm.m4 b/config/ompi_check_mxm.m4 index 7336fb2320d..2bccd07514b 100644 --- a/config/ompi_check_mxm.m4 +++ b/config/ompi_check_mxm.m4 @@ -18,11 +18,11 @@ dnl AC_DEFUN([OMPI_CHECK_MXM],[ AC_ARG_WITH([mxm], [AC_HELP_STRING([--with-mxm(=DIR)], - [Build Mellanox Messaging support])]) - OPAL_CHECK_WITHDIR([mxm], [$with_mxm], [include/mxm/api/mxm_api.h]) + [Build Mellanox Messaging support, optionally adding + DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])]) AC_ARG_WITH([mxm-libdir], [AC_HELP_STRING([--with-mxm-libdir=DIR], - [Search for Mellanox Messaging libraries in DIR])]) + [Search for Mellanox MXM libraries in DIR])]) OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*]) ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS" @@ -33,18 +33,15 @@ AC_DEFUN([OMPI_CHECK_MXM],[ [AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"], [ ompi_check_mxm_dir="$with_mxm" - ompi_check_mxm_libdir="$with_mxm/lib" ]) AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"], [ompi_check_mxm_libdir="$with_mxm_libdir"]) - AS_IF([test ! -z "$ompi_check_mxm_libdir"], [ompi_check_mxm_extra_libs="-L$ompi_check_mxm_libdir"],[]) - OPAL_CHECK_PACKAGE([$1], [mxm/api/mxm_api.h], [mxm], [mxm_cleanup], - [$ompi_check_mxm_extra_libs], + [], [$ompi_check_mxm_dir], [$ompi_check_mxm_libdir], [ompi_check_mxm_happy="yes"], From 4a18b7c85a2db56ebee058ce0ea68f11c7108196 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 13 Aug 2015 17:08:24 +0900 Subject: [PATCH 0141/1704] yalla: fix Makefile.am LDFLAGS (cherry picked from commit open-mpi/ompi@6b2fe9120e532e6c43b83dca4351e2fde1afc7cf) --- ompi/mca/pml/yalla/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ompi/mca/pml/yalla/Makefile.am b/ompi/mca/pml/yalla/Makefile.am index a0f64874766..0ca79ef7dd7 100644 --- a/ompi/mca/pml/yalla/Makefile.am +++ b/ompi/mca/pml/yalla/Makefile.am @@ -1,5 +1,7 @@ # -# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. +# Copyright (c) 2001-2014 Mellanox Technologies Ltd. ALL RIGHTS RESERVED. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -36,10 +38,10 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_pml_yalla_la_SOURCES = $(local_sources) mca_pml_yalla_la_LIBADD = $(pml_yalla_LIBS) -mca_pml_yalla_la_LDFLAGS = -module -avoid-version +mca_pml_yalla_la_LDFLAGS = -module -avoid-version $(pml_yalla_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) libmca_pml_yalla_la_SOURCES = $(local_sources) libmca_pml_yalla_la_LIBADD = $(pml_yalla_LIBS) -libmca_pml_yalla_la_LDFLAGS = -module -avoid-version +libmca_pml_yalla_la_LDFLAGS = -module -avoid-version $(pml_yalla_LDFLAGS) From 928ee3619af67c41e6e689eec94c16a76f5f4a7b Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 14 Aug 2015 09:10:03 +0900 Subject: [PATCH 0142/1704] btl/openib: remove OFED version runtime check when XRC is used this test seems broken : - some false positive were reported - it fails to detect some OFED version mismatch this commit simply removes this test, which means the application will likely fail if XRC is used ad OFED version is different between compile time and runtime (cherry picked from commit open-mpi/ompi@d02ccd67de45145bfe0f858f80e092b152ba379d) --- opal/mca/btl/openib/btl_openib_component.c | 4 ---- opal/mca/btl/openib/btl_openib_xrc.c | 23 ---------------------- opal/mca/btl/openib/btl_openib_xrc.h | 2 -- 3 files changed, 29 deletions(-) diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index e49a446969c..97f8b2a95f1 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -1011,10 +1011,6 @@ static void device_destruct(mca_btl_openib_device_t *device) #if HAVE_XRC - if (!mca_btl_openib_xrc_check_api()) { - return; - } - if (MCA_BTL_XRC_ENABLED) { if (OPAL_SUCCESS != mca_btl_openib_close_xrc_domain(device)) { BTL_VERBOSE(("XRC Internal error. Failed to close xrc domain")); diff --git a/opal/mca/btl/openib/btl_openib_xrc.c b/opal/mca/btl/openib/btl_openib_xrc.c index 8a837817aa5..3fc0e32c29f 100644 --- a/opal/mca/btl/openib/btl_openib_xrc.c +++ b/opal/mca/btl/openib/btl_openib_xrc.c @@ -39,29 +39,6 @@ OBJ_CLASS_INSTANCE(ib_address_t, ib_address_constructor, ib_address_destructor); -/* run-time check for which libibverbs XRC API we really have underneath */ -bool mca_btl_openib_xrc_check_api() -{ - void *lib = dlopen(NULL, RTLD_NOW); /* current program */ - if (!lib) { - BTL_ERROR(("XRC error: could not find XRC API version")); - return false; - } - -#if OPAL_HAVE_CONNECTX_XRC_DOMAINS - if (NULL != dlsym(lib, "ibv_open_xrcd")) { - BTL_ERROR(("XRC error: bad XRC API (require XRC from OFED 3.12+)")); - return false; - } -#else - if (NULL != dlsym(lib, "ibv_create_xrc_rcv_qp")) { - BTL_ERROR(("XRC error: bad XRC API (require XRC from OFED pre 3.12).")); - return false; - } -#endif - return true; -} - /* This func. opens XRC domain */ int mca_btl_openib_open_xrc_domain(struct mca_btl_openib_device_t *device) { diff --git a/opal/mca/btl/openib/btl_openib_xrc.h b/opal/mca/btl/openib/btl_openib_xrc.h index 4f537b3e8b0..72e1509c1c6 100644 --- a/opal/mca/btl/openib/btl_openib_xrc.h +++ b/opal/mca/btl/openib/btl_openib_xrc.h @@ -51,6 +51,4 @@ int mca_btl_openib_close_xrc_domain(struct mca_btl_openib_device_t *device); int mca_btl_openib_ib_address_add_new (uint16_t lid, uint64_t s_id, opal_jobid_t ep_jobid, mca_btl_openib_endpoint_t *ep); -bool mca_btl_openib_xrc_check_api(void); - #endif From 787c0a71c5fc7999eed34c5f3cd85e96387884d4 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Thu, 13 Aug 2015 14:59:07 -0400 Subject: [PATCH 0143/1704] Add static definitions where needed and remove one unused definition (cherry picked from commit open-mpi/ompi@cb8c86910ed2e567705a020a117271108676b0d7) --- opal/mca/common/cuda/common_cuda.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opal/mca/common/cuda/common_cuda.c b/opal/mca/common/cuda/common_cuda.c index aabd5e2a5be..8568cc22b19 100644 --- a/opal/mca/common/cuda/common_cuda.c +++ b/opal/mca/common/cuda/common_cuda.c @@ -108,9 +108,9 @@ struct cudaFunctionTable { #if OPAL_CUDA_GET_ATTRIBUTES int (*cuPointerGetAttributes)(unsigned int, CUpointer_attribute *, void **, CUdeviceptr); #endif /* OPAL_CUDA_GET_ATTRIBUTES */ -} cudaFunctionTable; +}; typedef struct cudaFunctionTable cudaFunctionTable_t; -cudaFunctionTable_t cuFunc; +static cudaFunctionTable_t cuFunc; static int stage_one_init_ref_count = 0; static bool stage_three_init_complete = false; @@ -175,13 +175,13 @@ struct mca_btl_base_descriptor_t **cuda_event_dtoh_frag_array = NULL; struct mca_btl_base_descriptor_t **cuda_event_htod_frag_array = NULL; /* First free/available location in cuda_event_status_array */ -int cuda_event_ipc_first_avail, cuda_event_dtoh_first_avail, cuda_event_htod_first_avail; +static int cuda_event_ipc_first_avail, cuda_event_dtoh_first_avail, cuda_event_htod_first_avail; /* First currently-being used location in the cuda_event_status_array */ -int cuda_event_ipc_first_used, cuda_event_dtoh_first_used, cuda_event_htod_first_used; +static int cuda_event_ipc_first_used, cuda_event_dtoh_first_used, cuda_event_htod_first_used; /* Number of status items currently in use */ -int cuda_event_ipc_num_used, cuda_event_dtoh_num_used, cuda_event_htod_num_used; +static int cuda_event_ipc_num_used, cuda_event_dtoh_num_used, cuda_event_htod_num_used; /* Size of array holding events */ int cuda_event_max = 400; From 5793e1992c474c7ea197969ed299553e1392183f Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 14 Aug 2015 07:49:15 -0700 Subject: [PATCH 0144/1704] Makefile.am's: if calling OPAL functions, must link to it On some OSs (e.g., Ubuntu 14.04.2 LTS), the linker is configured such that the symbols of library dependencies are not available to the application. Hence, we need to explicitly list such dependencies when creating the executable. For this commit, these tests are use OPAL function calls, so we must explicitly link in libopen-pal.so. (cherry picked from commit open-mpi/ompi@42b9a966d622c190e65c2f3fbbc998da7b066f6f) --- ompi/debuggers/Makefile.am | 4 +++- test/class/Makefile.am | 21 +++++++++++---------- test/datatype/Makefile.am | 32 +++++++++++++++++++++++--------- 3 files changed, 37 insertions(+), 20 deletions(-) diff --git a/ompi/debuggers/Makefile.am b/ompi/debuggers/Makefile.am index d9b08e298bb..47d733ea526 100644 --- a/ompi/debuggers/Makefile.am +++ b/ompi/debuggers/Makefile.am @@ -43,7 +43,9 @@ headers = \ # Simple checks to ensure that the DSOs are functional dlopen_test_SOURCES = dlopen_test.c -dlopen_test_LDADD = $(top_builddir)/ompi/libmpi.la +dlopen_test_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la dlopen_test_DEPENDENCIES = $(ompi_predefined_LDADD) predefined_gap_test_SOURCES = predefined_gap_test.c diff --git a/test/class/Makefile.am b/test/class/Makefile.am index 63df20cb1fc..a3b4081ffbf 100644 --- a/test/class/Makefile.am +++ b/test/class/Makefile.am @@ -10,7 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ @@ -41,61 +41,62 @@ TESTS = $(check_PROGRAMS) opal_bitmap_SOURCES = opal_bitmap.c opal_bitmap_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_bitmap_DEPENDENCIES = $(opal_bitmap_LDADD) opal_list_SOURCES = opal_list.c opal_list_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_list_DEPENDENCIES = $(opal_list_LDADD) opal_tree_SOURCES = opal_tree.c opal_tree_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_tree_DEPENDENCIES = $(opal_tree_LDADD) opal_hash_table_SOURCES = opal_hash_table.c opal_hash_table_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_hash_table_DEPENDENCIES = $(opal_hash_table_LDADD) opal_proc_table_SOURCES = opal_proc_table.c opal_proc_table_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_proc_table_DEPENDENCIES = $(opal_proc_table_LDADD) opal_pointer_array_SOURCES = opal_pointer_array.c opal_pointer_array_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_pointer_array_DEPENDENCIES = $(opal_pointer_array_LDADD) opal_value_array_SOURCES = opal_value_array.c opal_value_array_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_value_array_DEPENDENCIES = $(opal_value_array_LDADD) ompi_rb_tree_SOURCES = ompi_rb_tree.c ompi_rb_tree_LDADD = \ $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a ompi_rb_tree_DEPENDENCIES = $(ompi_rb_tree_LDADD) opal_lifo_SOURCES = opal_lifo.c opal_lifo_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_lifo_DEPENDENCIES = $(opal_lifo_LDADD) opal_fifo_SOURCES = opal_fifo.c opal_fifo_LDADD = \ - $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ $(top_builddir)/test/support/libsupport.a opal_fifo_DEPENDENCIES = $(opal_fifo_LDADD) diff --git a/test/datatype/Makefile.am b/test/datatype/Makefile.am index fb775ee98a3..227556924d6 100644 --- a/test/datatype/Makefile.am +++ b/test/datatype/Makefile.am @@ -23,31 +23,45 @@ check_PROGRAMS = $(TESTS) $(MPI_CHECKS) unpack_ooo_SOURCES = unpack_ooo.c ddt_lib.c ddt_lib.h unpack_ooo_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -unpack_ooo_LDADD = $(top_builddir)/ompi/libmpi.la +unpack_ooo_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la ddt_test_SOURCES = ddt_test.c ddt_lib.c ddt_lib.h ddt_test_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -ddt_test_LDADD = $(top_builddir)/ompi/libmpi.la +ddt_test_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la ddt_raw_SOURCES = ddt_raw.c ddt_lib.c ddt_lib.h ddt_raw_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -ddt_raw_LDADD = $(top_builddir)/ompi/libmpi.la +ddt_raw_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la ddt_pack_SOURCES = ddt_pack.c ddt_pack_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -ddt_pack_LDADD = $(top_builddir)/ompi/libmpi.la +ddt_pack_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la checksum_SOURCES = checksum.c checksum_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -checksum_LDADD = $(top_builddir)/ompi/libmpi.la +checksum_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la position_SOURCES = position.c position_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -position_LDADD = $(top_builddir)/ompi/libmpi.la +position_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la position_noncontig_SOURCES = position_noncontig.c position_noncontig_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -position_noncontig_LDADD = $(top_builddir)/ompi/libmpi.la +position_noncontig_LDADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la to_self_SOURCES = to_self.c to_self_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) @@ -55,5 +69,5 @@ to_self_LDADD = $(top_builddir)/ompi/libmpi.la opal_datatype_test_SOURCES = opal_datatype_test.c opal_ddt_lib.c opal_ddt_lib.h opal_datatype_test_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS) -opal_datatype_test_LDADD = $(top_builddir)/opal/libopen-pal.la - +opal_datatype_test_LDADD = \ + $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la From 59dc8a6c62e8725e1f8a150cd39141531df59ef5 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 13 Aug 2015 11:04:18 +0900 Subject: [PATCH 0145/1704] configury: fix description of the --with-knem option --- config/opal_check_knem.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/opal_check_knem.m4 b/config/opal_check_knem.m4 index 14d1eec1748..6d2d7c0f0f0 100644 --- a/config/opal_check_knem.m4 +++ b/config/opal_check_knem.m4 @@ -25,7 +25,7 @@ AC_DEFUN([OPAL_CHECK_KNEM],[ OPAL_VAR_SCOPE_PUSH([opal_check_knem_happy opal_check_knem_$1_save_CPPFLAGS opal_check_knem_dir]) AC_ARG_WITH([knem], [AC_HELP_STRING([--with-knem(=DIR)], - [Build knem Linux kernel module support, searching for headers in DIR])]) + [Build knem Linux kernel module support, searching for headers in DIR/include])]) OPAL_CHECK_WITHDIR([knem], [$with_knem], [include/knem_io.h]) opal_check_knem_$1_save_CPPFLAGS="$CPPFLAGS" From e8a4ed709849befc7afdf8de2c08a78110b60bc3 Mon Sep 17 00:00:00 2001 From: Rob Latham Date: Wed, 3 Jun 2015 11:37:59 -0500 Subject: [PATCH 0146/1704] hint processing should not open files move opening of files from hint processing and into open routines. This is MPICH commit 92f1c69f0de8 and 22a77dceda11 see https://trac.mpich.org/projects/mpich/ticket/2261 Ref: https://github.com/open-mpi/ompi/issues/158 Signed-off-by: Pavan Balaji Conflicts: ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c --- .../romio/adio/ad_lustre/ad_lustre_hints.c | 86 +++-------- .../romio/adio/ad_lustre/ad_lustre_open.c | 145 +++++++++++++----- 2 files changed, 124 insertions(+), 107 deletions(-) diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c index 051cfb0c4c7..e30d433dac6 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c @@ -20,8 +20,7 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) char *value; int flag; ADIO_Offset stripe_val[3], str_factor = -1, str_unit=0, start_iodev=-1; - struct lov_user_md lum = { 0 }; - int err, myrank, fd_sys, perm, amode, old_mask; + int err, myrank; static char myname[] = "ADIOI_LUSTRE_SETINFO"; value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); @@ -47,18 +46,25 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* striping information */ ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, value, &flag); - if (flag) + if (flag) { + ADIOI_Info_set(fd->info, "striping_unit", value); str_unit=atoll(value); + } ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, value, &flag); - if (flag) + if (flag) { + ADIOI_Info_set(fd->info, "striping_factor", value); str_factor=atoll(value); + } ADIOI_Info_get(users_info, "romio_lustre_start_iodevice", MPI_MAX_INFO_VAL, value, &flag); - if (flag) + if (flag) { + ADIOI_Info_set(fd->info, "romio_lustre_start_iodevice", value); start_iodev=atoll(value); + } + /* direct read and write */ ADIOI_Info_get(users_info, "direct_read", MPI_MAX_INFO_VAL, @@ -84,72 +90,20 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } MPI_Bcast(stripe_val, 3, MPI_OFFSET, 0, fd->comm); + /* do not open file in hint processing. Open file in open routines, + * where we can better deal with EXCL flag . Continue to check the + * "all processors set a value" condition holds. */ if (stripe_val[0] != str_factor || stripe_val[1] != str_unit || stripe_val[2] != start_iodev) { - FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: All keys" - "-striping_factor:striping_unit:start_iodevice " - "need to be identical across all processes\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } else if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) { - /* if user has specified striping info, process 0 tries to set it */ - if (!myrank) { - if (fd->perm == ADIO_PERM_NULL) { - old_mask = umask(022); - umask(old_mask); - perm = old_mask ^ 0666; - } - else perm = fd->perm; - - amode = 0; - if (fd->access_mode & ADIO_CREATE) - amode = amode | O_CREAT; - if (fd->access_mode & ADIO_RDONLY) - amode = amode | O_RDONLY; - if (fd->access_mode & ADIO_WRONLY) - amode = amode | O_WRONLY; - if (fd->access_mode & ADIO_RDWR) - amode = amode | O_RDWR; - if (fd->access_mode & ADIO_EXCL) - amode = amode | O_EXCL; - - /* we need to create file so ensure this is set */ - amode = amode | O_LOV_DELAY_CREATE | O_CREAT; - - fd_sys = open(fd->filename, amode, perm); - if (fd_sys == -1) { - if (errno != EEXIST) - fprintf(stderr, - "Failure to open file %s %d %d\n",strerror(errno), amode, perm); - } else { - lum.lmm_magic = LOV_USER_MAGIC; - lum.lmm_pattern = 0; - lum.lmm_stripe_size = str_unit; - /* crude check for overflow of lustre internal datatypes. - * Silently cap to large value if user provides a value - * larger than lustre supports */ - if (lum.lmm_stripe_size != str_unit) { - lum.lmm_stripe_size = UINT_MAX; - } - lum.lmm_stripe_count = str_factor; - if ( lum.lmm_stripe_count != str_factor) { - lum.lmm_stripe_count = USHRT_MAX; - } - lum.lmm_stripe_offset = start_iodev; - if (lum.lmm_stripe_offset != start_iodev) { - lum.lmm_stripe_offset = USHRT_MAX; - } - - err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum); - if (err == -1 && errno != EEXIST) { - fprintf(stderr, "Failure to set stripe info %s \n", strerror(errno)); - } - close(fd_sys); - } - } /* End of striping parameters validation */ + MPIO_ERR_CREATE_CODE_INFO_NOT_SAME("ADIOI_LUSTRE_SetInfo", + "str_factor or str_unit or start_iodev", + error_code); + ADIOI_Free(value); + return; } - MPI_Barrier(fd->comm); } + /* get other hint */ if (users_info != MPI_INFO_NULL) { /* CO: IO Clients/OST, diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c index e06cb24d7aa..7423b551945 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c @@ -18,14 +18,17 @@ void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) { int perm, old_mask, amode, amode_direct; - int lumlen; + int lumlen, myrank, flag, set_layout=0, err; struct lov_user_md *lum = NULL; char *value; + ADIO_Offset str_factor = -1, str_unit=0, start_iodev=-1; #if defined(MPICH) || !defined(PRINT_ERR_MSG) static char myname[] = "ADIOI_LUSTRE_OPEN"; #endif + MPI_Comm_rank(fd->comm, &myrank); + if (fd->perm == ADIO_PERM_NULL) { old_mask = umask(022); umask(old_mask); @@ -47,46 +50,103 @@ void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) amode_direct = amode | O_DIRECT; - fd->fd_sys = open(fd->filename, amode|O_CREAT, perm); - - if (fd->fd_sys != -1) { - int err; - - /* get file striping information and set it in info */ - /* odd malloc here because lov_user_md contains some fixed data and - * then a list of 'lmm_objects' representing stripe */ - lumlen = sizeof(struct lov_user_md) + - MAX_LOV_UUID_COUNT * sizeof(struct lov_user_ost_data); - /* furthermore, Pascal Deveze reports that, even though we pass a - * "GETSTRIPE" (read) flag to the ioctl, if some of the values of this - * struct are uninitialzed, the call can give an error. calloc in case - * there are other members that must be initialized and in case - * lov_user_md struct changes in future */ - lum = (struct lov_user_md *)ADIOI_Calloc(1,lumlen); - lum->lmm_magic = LOV_USER_MAGIC; - err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *)lum); - if (!err) { - value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - - fd->hints->striping_unit = lum->lmm_stripe_size; - sprintf(value, "%d", lum->lmm_stripe_size); - ADIOI_Info_set(fd->info, "striping_unit", value); - - fd->hints->striping_factor = lum->lmm_stripe_count; - sprintf(value, "%d", lum->lmm_stripe_count); - ADIOI_Info_set(fd->info, "striping_factor", value); - - fd->hints->fs_hints.lustre.start_iodevice = lum->lmm_stripe_offset; - sprintf(value, "%d", lum->lmm_stripe_offset); - ADIOI_Info_set(fd->info, "romio_lustre_start_iodevice", value); - - ADIOI_Free(value); - } - ADIOI_Free(lum); - - if (fd->access_mode & ADIO_APPEND) - fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); - } + } + /* odd length here because lov_user_md contains some fixed data and + * then a list of 'lmm_objects' representing stripe */ + lumlen = sizeof(struct lov_user_md) + + MAX_LOV_UUID_COUNT * sizeof(struct lov_user_ost_data); + lum = (struct lov_user_md *)ADIOI_Calloc(1,lumlen); + + value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); + /* we already validated in LUSTRE_SetInfo that these are going to be the same */ + if (fd->info != MPI_INFO_NULL) { + /* striping information */ + ADIOI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, + value, &flag); + if (flag) + str_unit=atoll(value); + + ADIOI_Info_get(fd->info, "striping_factor", MPI_MAX_INFO_VAL, + value, &flag); + if (flag) + str_factor=atoll(value); + + ADIOI_Info_get(fd->info, "romio_lustre_start_iodevice", + MPI_MAX_INFO_VAL, value, &flag); + if (flag) + start_iodev=atoll(value); + } + if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) + set_layout = 1; + + /* if hints were set, we need to delay creation of any lustre objects. + * However, if we open the file with O_LOV_DELAY_CREATE and don't call the + * follow-up ioctl, subsequent writes will fail */ + if (myrank == 0 && set_layout) + amode = amode | O_LOV_DELAY_CREATE; + + fd->fd_sys = open(fd->filename, amode, perm); + if (fd->fd_sys == -1) goto fn_exit; + + /* we can only set these hints on new files */ + /* It was strange and buggy to open the file in the hint path. Instead, + * we'll apply the file tunings at open time */ + if ((amode & O_CREAT) && set_layout ) { + /* if user has specified striping info, process 0 tries to set it */ + if (!myrank) { + lum->lmm_magic = LOV_USER_MAGIC; + lum->lmm_pattern = 0; + /* crude check for overflow of lustre internal datatypes. + * Silently cap to large value if user provides a value + * larger than lustre supports */ + if (str_unit > UINT_MAX) + lum->lmm_stripe_size = UINT_MAX; + else + lum->lmm_stripe_size = str_unit; + + if (str_factor > USHRT_MAX) + lum->lmm_stripe_count = USHRT_MAX; + else + lum->lmm_stripe_count = str_factor; + + if (start_iodev > USHRT_MAX) + lum->lmm_stripe_offset = USHRT_MAX; + else + lum->lmm_stripe_offset = start_iodev; + err = ioctl(fd->fd_sys, LL_IOC_LOV_SETSTRIPE, lum); + if (err == -1 && errno != EEXIST) { + fprintf(stderr, "Failure to set stripe info %s \n", strerror(errno)); + /* not a fatal error, but user might care to know */ + } + } /* End of striping parameters validation */ + } + + /* Pascal Deveze reports that, even though we pass a + * "GETSTRIPE" (read) flag to the ioctl, if some of the values of this + * struct are uninitialzed, the call can give an error. zero it out in case + * there are other members that must be initialized and in case + * lov_user_md struct changes in future */ + memset(lum, 0, lumlen); + lum->lmm_magic = LOV_USER_MAGIC; + err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *)lum); + if (!err) { + + fd->hints->striping_unit = lum->lmm_stripe_size; + sprintf(value, "%d", lum->lmm_stripe_size); + ADIOI_Info_set(fd->info, "striping_unit", value); + + fd->hints->striping_factor = lum->lmm_stripe_count; + sprintf(value, "%d", lum->lmm_stripe_count); + ADIOI_Info_set(fd->info, "striping_factor", value); + + fd->hints->fs_hints.lustre.start_iodevice = lum->lmm_stripe_offset; + sprintf(value, "%d", lum->lmm_stripe_offset); + ADIOI_Info_set(fd->info, "romio_lustre_start_iodevice", value); + + } + + if (fd->access_mode & ADIO_APPEND) + fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND)) fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); @@ -101,6 +161,9 @@ void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) fd->direct_write = fd->direct_read = 0; } } +fn_exit: + ADIOI_Free(lum); + ADIOI_Free(value); /* --BEGIN ERROR HANDLING-- */ if (fd->fd_sys == -1 || ((fd->fd_direct == -1) && From 5d734567942e4595beefd997fb8ee173a5d5391a Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Fri, 14 Aug 2015 11:40:04 -0700 Subject: [PATCH 0147/1704] romio: fix random closing bracket fix the romio patch from ANL Signed-off-by: Howard Pritchard --- ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c index 7423b551945..079e4dbb307 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c @@ -50,7 +50,6 @@ void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) amode_direct = amode | O_DIRECT; - } /* odd length here because lov_user_md contains some fixed data and * then a list of 'lmm_objects' representing stripe */ lumlen = sizeof(struct lov_user_md) + From 0c29de9add786e5b58b7f47fad0cbb74d57cba14 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Fri, 14 Aug 2015 12:50:54 -0400 Subject: [PATCH 0148/1704] This is a combination of 2 commits. Fix macro return value when not CUDA-aware (cherry picked from commit open-mpi/ompi@0e87478e4023dd50283c1b4919c725c0a8183bb2) ompi_ext.m4: allow extensions to have config.h.in Previously, extensions were required to have a config.h for their C bindings. This commit allows them to have a config.h.in, in case their C bindings header file is generated. (cherry picked from commit open-mpi/ompi@6a7d5271c431aec20750460ba906c9de21a265bd) --- config/ompi_ext.m4 | 2 +- ompi/mpiext/cuda/c/{mpiext_cuda_c.h => mpiext_cuda_c.h.in} | 2 +- ompi/mpiext/cuda/configure.m4 | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) rename ompi/mpiext/cuda/c/{mpiext_cuda_c.h => mpiext_cuda_c.h.in} (88%) diff --git a/config/ompi_ext.m4 b/config/ompi_ext.m4 index 9f0560820e0..40be85af98c 100644 --- a/config/ompi_ext.m4 +++ b/config/ompi_ext.m4 @@ -456,7 +456,7 @@ AC_DEFUN([EXT_PROCESS_COMPONENT],[ AC_MSG_CHECKING([if MPI Extension $component has C bindings]) - AS_IF([test ! -e "$test_header"], + AS_IF([test ! -e "$test_header" && test ! -e "$test_header.in"], [ # There *must* be C bindings AC_MSG_RESULT([no]) AC_MSG_WARN([C bindings for MPI extensions are required]) diff --git a/ompi/mpiext/cuda/c/mpiext_cuda_c.h b/ompi/mpiext/cuda/c/mpiext_cuda_c.h.in similarity index 88% rename from ompi/mpiext/cuda/c/mpiext_cuda_c.h rename to ompi/mpiext/cuda/c/mpiext_cuda_c.h.in index 00fd6216f85..0a95eeb3cb3 100644 --- a/ompi/mpiext/cuda/c/mpiext_cuda_c.h +++ b/ompi/mpiext/cuda/c/mpiext_cuda_c.h.in @@ -12,5 +12,5 @@ * */ -#define MPIX_CUDA_AWARE_SUPPORT 1 +#define MPIX_CUDA_AWARE_SUPPORT @MPIX_CUDA_AWARE_SUPPORT@ OMPI_DECLSPEC int MPIX_Query_cuda_support(void); diff --git a/ompi/mpiext/cuda/configure.m4 b/ompi/mpiext/cuda/configure.m4 index 09a458fffb9..cba2953a3f5 100644 --- a/ompi/mpiext/cuda/configure.m4 +++ b/ompi/mpiext/cuda/configure.m4 @@ -17,6 +17,10 @@ AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[ AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile]) AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile]) + AC_CONFIG_HEADER([ompi/mpiext/cuda/c/mpiext_cuda_c.h]) + + AC_DEFINE_UNQUOTED([MPIX_CUDA_AWARE_SUPPORT],[$CUDA_SUPPORT], + [Macro that is set to 1 when CUDA-aware support is configured in and 0 when it is not]) # We compile this whether CUDA support was requested or not. It allows # us to to detect if we have CUDA support. From f14c04f6119413a12e563ffe720981d45f6a9b09 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 12 Aug 2015 09:45:07 -0500 Subject: [PATCH 0149/1704] fix the lustre compilation problems for older lustre versions. Add the prototype for the static function to avoid a warning message. --- ompi/mca/fs/lustre/fs_lustre.h | 6 ++++++ ompi/mca/fs/lustre/fs_lustre_file_open.c | 16 +++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ompi/mca/fs/lustre/fs_lustre.h b/ompi/mca/fs/lustre/fs_lustre.h index 18fb8a33256..5c65b661e4d 100644 --- a/ompi/mca/fs/lustre/fs_lustre.h +++ b/ompi/mca/fs/lustre/fs_lustre.h @@ -31,6 +31,12 @@ extern int mca_fs_lustre_stripe_width; BEGIN_C_DECLS + +#ifndef LOV_MAX_STRIPE_COUNT +#define LOV_MAX_STRIPE_COUNT 160 +#endif + + int mca_fs_lustre_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fs_base_module_1_0_0_t * diff --git a/ompi/mca/fs/lustre/fs_lustre_file_open.c b/ompi/mca/fs/lustre/fs_lustre_file_open.c index 5d3719c6d75..a230d0bd725 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_open.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_open.c @@ -33,13 +33,8 @@ #include #include -/* - * file_open_lustre - * - * Function: - opens a new file - * Accepts: - same arguments as MPI_File_open() - * Returns: - Success if new file handle - */ +static void *alloc_lum(); + static void *alloc_lum() { int v1, v3, join; @@ -52,6 +47,13 @@ static void *alloc_lum() return malloc(MAX(v1, v3)); } +/* + * file_open_lustre + * + * Function: - opens a new file + * Accepts: - same arguments as MPI_File_open() + * Returns: - Success if new file handle + */ int mca_fs_lustre_file_open (struct ompi_communicator_t *comm, From b9355d18ec735163447fdaa856a7bc98722154f0 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 13 Aug 2015 15:36:16 -0500 Subject: [PATCH 0150/1704] move the inclusion of the lustre_user and lliblustreapi header files to the fs_lustre.h file. --- ompi/mca/fs/lustre/fs_lustre.h | 2 ++ ompi/mca/fs/lustre/fs_lustre_file_open.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mca/fs/lustre/fs_lustre.h b/ompi/mca/fs/lustre/fs_lustre.h index 5c65b661e4d..ec8a45e2f7e 100644 --- a/ompi/mca/fs/lustre/fs_lustre.h +++ b/ompi/mca/fs/lustre/fs_lustre.h @@ -31,6 +31,8 @@ extern int mca_fs_lustre_stripe_width; BEGIN_C_DECLS +#include +#include #ifndef LOV_MAX_STRIPE_COUNT #define LOV_MAX_STRIPE_COUNT 160 diff --git a/ompi/mca/fs/lustre/fs_lustre_file_open.c b/ompi/mca/fs/lustre/fs_lustre_file_open.c index a230d0bd725..e6f2fa48eda 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_open.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_open.c @@ -30,8 +30,6 @@ #include "ompi/info/info.h" #include -#include -#include static void *alloc_lum(); From f41f31064605659d8bed9484d2373b1fa234b408 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 13 Aug 2015 20:03:58 -0500 Subject: [PATCH 0151/1704] Performance tuning: incorporate the usage of non-blocking operations in our array group-communication operations. --- ompi/mca/io/ompio/io_ompio_coll_array.c | 128 ++++++++++++++++-------- 1 file changed, 88 insertions(+), 40 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio_coll_array.c b/ompi/mca/io/ompio/io_ompio_coll_array.c index cf46a656a9d..c961fc4c9bb 100644 --- a/ompi/mca/io/ompio/io_ompio_coll_array.c +++ b/ompi/mca/io/ompio/io_ompio_coll_array.c @@ -130,6 +130,7 @@ int ompi_io_ompio_gatherv_array (void *sbuf, int err = OMPI_SUCCESS; char *ptmp; OPAL_PTRDIFF_TYPE extent, lb; + ompi_request_t **reqs=NULL; rank = ompi_comm_rank (comm); @@ -153,7 +154,10 @@ int ompi_io_ompio_gatherv_array (void *sbuf, if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - + reqs = (ompi_request_t **) malloc ( procs_per_group *sizeof(ompi_request_t *)); + if ( NULL == reqs ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } for (i=0; i 0) { - err = MCA_PML_CALL(recv(ptmp, - rcounts[i], - rdtype, - procs_in_group[i], - OMPIO_TAG_GATHERV, - comm, - MPI_STATUS_IGNORE)); + err = MCA_PML_CALL(irecv(ptmp, + rcounts[i], + rdtype, + procs_in_group[i], + OMPIO_TAG_GATHERV, + comm, + &reqs[i])); } + else { + reqs[i] = MPI_REQUEST_NULL; + } } if (OMPI_SUCCESS != err) { + free ( reqs ); return err; } } /* All done */ - + err = ompi_request_wait_all ( procs_per_group, reqs, MPI_STATUSES_IGNORE ); + if ( NULL != reqs ) { + free ( reqs ); + } return err; } @@ -207,6 +219,7 @@ int ompi_io_ompio_scatterv_array (void *sbuf, int err = OMPI_SUCCESS; char *ptmp; OPAL_PTRDIFF_TYPE extent, lb; + ompi_request_t ** reqs=NULL; rank = ompi_comm_rank (comm); @@ -230,7 +243,11 @@ int ompi_io_ompio_scatterv_array (void *sbuf, if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - + reqs = ( ompi_request_t **) malloc ( procs_per_group * sizeof ( ompi_request_t *)); + if (NULL == reqs ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + for (i=0 ; i 0) { - err = MCA_PML_CALL(send(ptmp, - scounts[i], - sdtype, - procs_in_group[i], - OMPIO_TAG_SCATTERV, - MCA_PML_BASE_SEND_STANDARD, - comm)); + err = MCA_PML_CALL(isend(ptmp, + scounts[i], + sdtype, + procs_in_group[i], + OMPIO_TAG_SCATTERV, + MCA_PML_BASE_SEND_STANDARD, + comm, + &reqs[i])); + } + else { + reqs[i] = MPI_REQUEST_NULL; } } - if (OMPI_SUCCESS != err) { + if (OMPI_SUCCESS != err) { + free ( reqs ); return err; } } /* All done */ - + err = ompi_request_wait_all ( procs_per_group, reqs, MPI_STATUSES_IGNORE ); + if ( NULL != reqs ) { + free ( reqs ); + } return err; } @@ -337,7 +363,8 @@ int ompi_io_ompio_gather_array (void *sbuf, OPAL_PTRDIFF_TYPE incr; OPAL_PTRDIFF_TYPE extent, lb; int err = OMPI_SUCCESS; - + ompi_request_t ** reqs=NULL; + rank = ompi_comm_rank (comm); /* Everyone but the writers sends data and returns. */ @@ -356,8 +383,13 @@ int ompi_io_ompio_gather_array (void *sbuf, opal_datatype_get_extent (&rdtype->super, &lb, &extent); incr = extent * rcount; - for (i = 0, ptmp = (char *) rbuf; - i < procs_per_group; + reqs = ( ompi_request_t **) malloc ( procs_per_group * sizeof ( ompi_request_t *)); + if (NULL == reqs ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + + for (i = 0, ptmp = (char *) rbuf; + i < procs_per_group; ++i, ptmp += incr) { if (procs_in_group[i] == rank) { if (MPI_IN_PLACE != sbuf) { @@ -371,15 +403,16 @@ int ompi_io_ompio_gather_array (void *sbuf, else { err = OMPI_SUCCESS; } + reqs[i] = MPI_REQUEST_NULL; } else { - err = MCA_PML_CALL(recv(ptmp, - rcount, - rdtype, - procs_in_group[i], - OMPIO_TAG_GATHER, - comm, - MPI_STATUS_IGNORE)); + err = MCA_PML_CALL(irecv(ptmp, + rcount, + rdtype, + procs_in_group[i], + OMPIO_TAG_GATHER, + comm, + &reqs[i])); /* for (k=0 ; k<4 ; k++) printf ("RECV %p %d \n", @@ -389,11 +422,16 @@ int ompi_io_ompio_gather_array (void *sbuf, } if (OMPI_SUCCESS != err) { + free ( reqs ); return err; } } /* All done */ + err = ompi_request_wait_all ( procs_per_group, reqs, MPI_STATUSES_IGNORE ); + if ( NULL != reqs ) { + free ( reqs ); + } return err; } @@ -408,7 +446,8 @@ int ompi_io_ompio_bcast_array (void *buff, { int i, rank; int err = OMPI_SUCCESS; - + ompi_request_t ** reqs=NULL; + rank = ompi_comm_rank (comm); /* Non-writers receive the data. */ @@ -424,24 +463,33 @@ int ompi_io_ompio_bcast_array (void *buff, } /* Writers sends data to all others. */ - + reqs = ( ompi_request_t **) malloc ( procs_per_group * sizeof ( ompi_request_t *)); + if (NULL == reqs ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } for (i=0 ; i Date: Fri, 14 Aug 2015 08:53:04 -0500 Subject: [PATCH 0152/1704] Code cleanup for the time breakdown feature in ompio/fcoll - make the internal structure follow the Open MPI naming convention - provide a single flag/macro which controls the compilation/utilization of this feature, to avoid that somebody using this has to modify every single fcoll component. A configure option could be added later if desired. --- .../dynamic/fcoll_dynamic_file_read_all.c | 25 ++++++----- .../dynamic/fcoll_dynamic_file_write_all.c | 17 ++++---- .../fcoll/static/fcoll_static_file_read_all.c | 24 +++++------ .../static/fcoll_static_file_write_all.c | 25 ++++++----- .../two_phase/fcoll_two_phase_file_read_all.c | 41 +++++++++---------- .../fcoll_two_phase_file_write_all.c | 41 +++++++++---------- ompi/mca/io/ompio/io_ompio.c | 29 +++++++------ ompi/mca/io/ompio/io_ompio.h | 21 +++++----- ompi/mca/io/ompio/io_ompio_file_open.c | 4 +- 9 files changed, 110 insertions(+), 117 deletions(-) diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c index e4cabc64a92..bccd9d7420f 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,7 +29,6 @@ #include "ompi/mca/pml/pml.h" #include - #define TIME_BREAKDOWN 1 #define DEBUG_ON 0 /*Used for loading file-offsets per aggregator*/ @@ -97,11 +96,11 @@ MPI_Request *send_req=NULL, *recv_req=NULL; - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0; double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0; double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0; - print_entry nentry; + mca_io_ompio_print_entry nentry; #endif @@ -333,7 +332,7 @@ current_index = 0; - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif for (index = 0; index < cycles; index++) { @@ -612,7 +611,7 @@ } - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_read_time = MPI_Wtime(); #endif @@ -624,7 +623,7 @@ } } - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_read_time = MPI_Wtime(); read_time += end_read_time - start_read_time; #endif @@ -664,7 +663,7 @@ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif for (i=0;if_procs_per_group;i++){ @@ -686,7 +685,7 @@ goto exit; } } - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rcomm_time = MPI_Wtime(); rcomm_time += end_rcomm_time - start_rcomm_time; #endif @@ -710,7 +709,7 @@ } } - #if TIME_BREAKDOWN + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif recv_req = (MPI_Request *) malloc (sizeof (MPI_Request)); @@ -786,7 +785,7 @@ receive_buf = NULL; } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rcomm_time = MPI_Wtime(); rcomm_time += end_rcomm_time - start_rcomm_time; #endif @@ -833,8 +832,8 @@ } } } - - #if TIME_BREAKDOWN + + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rexch = MPI_Wtime(); read_exch += end_rexch - start_rexch; nentry.time[0] = read_time; diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c index 75391d8219e..859ec9de93e 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c @@ -31,7 +31,6 @@ #define DEBUG_ON 0 -#define TIME_BREAKDOWN 0 /*Used for loading file-offsets per aggregator*/ typedef struct local_io_array{ @@ -99,11 +98,11 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, int recv_req_count=0; -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0; double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0; double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0; - print_entry nentry; + mca_io_ompio_print_entry nentry; #endif @@ -352,7 +351,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_exch = MPI_Wtime(); #endif @@ -699,7 +698,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, printf("%d : global_count : %ld, bytes_sent : %d\n", fh->f_rank,global_count, bytes_sent); #endif -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_comm_time = MPI_Wtime(); #endif @@ -855,7 +854,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_comm_time = MPI_Wtime(); comm_time += (end_comm_time - start_comm_time); #endif @@ -871,7 +870,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_write_time = MPI_Wtime(); #endif @@ -933,7 +932,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, goto exit; } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_write_time = MPI_Wtime(); write_time += end_write_time - start_write_time; #endif @@ -973,7 +972,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_exch = MPI_Wtime(); exch_write += end_exch - start_exch; nentry.time[0] = write_time; diff --git a/ompi/mca/fcoll/static/fcoll_static_file_read_all.c b/ompi/mca/fcoll/static/fcoll_static_file_read_all.c index 2cb77698618..a00617d7ea9 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_read_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_read_all.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. * * $COPYRIGHT$ @@ -33,7 +33,6 @@ #include #define DEBUG_ON 0 -#define TIME_BREAKDOWN 0 typedef struct local_io_array { @@ -96,11 +95,11 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, MPI_Request *send_req=NULL, *recv_req=NULL; /* MPI_Request *grecv_req=NULL, *gsend_req=NULL; */ -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0; double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0; double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0; - print_entry nentry; + mca_io_ompio_print_entry nentry; #endif #if DEBUG_ON MPI_Aint gc_in; @@ -359,8 +358,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } } #endif - -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif @@ -456,7 +454,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif @@ -471,7 +469,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rcomm_time = MPI_Wtime(); rcomm_time += end_rcomm_time - start_rcomm_time; #endif @@ -708,7 +706,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, fh->f_io_array[i].length); } #endif -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_read_time = MPI_Wtime(); #endif @@ -720,7 +718,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_read_time = MPI_Wtime(); read_time += end_read_time - start_read_time; #endif @@ -768,7 +766,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif @@ -805,7 +803,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rcomm_time = MPI_Wtime(); rcomm_time += end_rcomm_time - start_rcomm_time; #endif @@ -894,7 +892,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rexch = MPI_Wtime(); read_exch += end_rexch - start_rexch; nentry.time[0] = read_time; diff --git a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c index f1cb7cd9887..435a4bb4413 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. * * $COPYRIGHT$ @@ -32,7 +32,6 @@ #include #define DEBUG_ON 0 -#define TIME_BREAKDOWN 0 typedef struct local_io_array{ OMPI_MPI_OFFSET_TYPE offset; @@ -93,11 +92,11 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, ompi_datatype_t *types[3]; ompi_datatype_t *io_array_type=MPI_DATATYPE_NULL; /*----------------------------------------------*/ -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0; double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0; double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0; - print_entry nentry; + mca_io_ompio_print_entry nentry; #endif @@ -349,7 +348,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } #endif -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_exch = MPI_Wtime(); #endif @@ -673,7 +672,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, bytes_to_write_in_cycle, fh->f_procs_per_group); #endif -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_comm_time = MPI_Wtime(); #endif global_buf = (char *) malloc (global_count); @@ -800,7 +799,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } #endif } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_comm_time = MPI_Wtime(); comm_time += end_comm_time - start_comm_time; #endif @@ -850,8 +849,8 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, fh->f_io_array[i].length); } #endif - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_write_time = MPI_Wtime(); #endif @@ -861,9 +860,9 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - } - -#if TIME_BREAKDOWN + } + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_write_time = MPI_Wtime(); write_time += end_write_time - start_write_time; #endif @@ -897,7 +896,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_exch = MPI_Wtime(); exch_write += end_exch - start_exch; nentry.time[0] = write_time; diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c index 62c263964e1..db903caab3b 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c @@ -31,7 +31,6 @@ #include #define DEBUG 0 -#define TIME_BREAKDOWN 0 /* Two Phase implementation from ROMIO ported to OMPIO infrastructure * This is pretty much the same as ROMIO's two_phase and based on ROMIO's code @@ -99,14 +98,14 @@ static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, MPI_Aint buftype_extent, int striping_unit, int num_io_procs, int *aggregator_list); -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN static int isread_aggregator(int rank, int nprocs_for_coll, int *aggregator_list); #endif -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0; double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0; double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0; @@ -137,8 +136,8 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_start=NULL, *fd_end=NULL, min_st_offset = 0; Flatlist_node *flat_buf=NULL; mca_io_ompio_access_array_t *my_req=NULL, *others_req=NULL; -#if TIME_BREAKDOWN - print_entry nentry; +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN + mca_io_ompio_print_entry nentry; #endif if (opal_datatype_is_predefined(&datatype->super)) { fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY; @@ -439,9 +438,9 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, printf("%d count_other_req_procs : %d\n", fh->f_rank, count_other_req_procs); -#endif - -#if TIME_BREAKDOWN +#endif + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif @@ -466,7 +465,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, if (OMPI_SUCCESS != ret){ goto exit; } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rexch = MPI_Wtime(); read_exch += (end_rexch - start_rexch); nentry.time[0] = read_time; @@ -708,8 +707,8 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, if (count[i]) flag = 1; if (flag) { - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_read_time = MPI_Wtime(); #endif @@ -750,8 +749,8 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, free (fh->f_io_array); fh->f_io_array = NULL; } - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_read_time = MPI_Wtime(); read_time += (end_read_time - start_read_time); #endif @@ -857,10 +856,10 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, char **recv_buf = NULL; MPI_Request *requests=NULL; MPI_Datatype send_type; - - - -#if TIME_BREAKDOWN + + + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif @@ -1015,8 +1014,8 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, } free(recv_buf); } - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_rcomm_time = MPI_Wtime(); rcomm_time += (end_rcomm_time - start_rcomm_time); #endif @@ -1183,8 +1182,8 @@ static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, } -#if TIME_BREAKDOWN -int isread_aggregator(int rank, +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN +int isread_aggregator(int rank, int nprocs_for_coll, int *aggregator_list){ diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c index 6a2ac6a8ae4..8932ef4e16a 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c @@ -33,7 +33,6 @@ #include #define DEBUG_ON 0 -#define TIME_BREAKDOWN 0 /* Two Phase implementation from ROMIO ported to OMPIO infrastructure * This is pretty much the same as ROMIO's two_phase and based on ROMIO's code @@ -111,7 +110,7 @@ static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, int iter, MPI_Aint buftype_extent, int striping_unit, int num_io_procs, int *aggregator_list); -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN static int is_aggregator(int rank, int nprocs_for_coll, int *aggregator_list); @@ -131,7 +130,7 @@ void two_phase_heap_merge(mca_io_ompio_access_array_t *others_req, /* local function declarations ends here!*/ -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0; double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0; double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0; @@ -165,8 +164,8 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, Flatlist_node *flat_buf=NULL; mca_io_ompio_access_array_t *my_req=NULL, *others_req=NULL; MPI_Aint send_buf_addr; -#if TIME_BREAKDOWN - print_entry nentry; +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN + mca_io_ompio_print_entry nentry; #endif @@ -498,8 +497,8 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, #if DEBUG_ON printf("count_other_req_procs : %d\n", count_other_req_procs); #endif - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_exch = MPI_Wtime(); #endif @@ -522,9 +521,9 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, if (OMPI_SUCCESS != ret){ goto exit; } - - -#if TIME_BREAKDOWN + + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_exch = MPI_Wtime(); exch_write += (end_exch - start_exch); @@ -541,7 +540,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, } nentry.nprocs_for_coll = two_phase_num_io_procs; if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){ - fh->f_ompio_register_print_entry(WRITE_PRINT_QUEUE, + fh->f_register_print_entry(WRITE_PRINT_QUEUE, nentry); } #endif @@ -802,8 +801,8 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, if (flag){ - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_write_time = MPI_Wtime(); #endif @@ -843,7 +842,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, return OMPI_ERROR; } } -#if TIME_BREAKDOWN +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_write_time = MPI_Wtime(); write_time += (end_write_time - start_write_time); #endif @@ -950,9 +949,9 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, MPI_Request *requests=NULL, *send_req=NULL; ompi_datatype_t **recv_types=NULL; OMPI_MPI_OFFSET_TYPE *srt_off=NULL; - char **send_buf = NULL; - -#if TIME_BREAKDOWN + char **send_buf = NULL; + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_comm_time = MPI_Wtime(); #endif ret = fh->f_comm->c_coll.coll_alltoall (recv_size, @@ -1192,8 +1191,8 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, if ( NULL != requests ){ free(requests); } - -#if TIME_BREAKDOWN + +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_comm_time = MPI_Wtime(); comm_time += (end_comm_time - start_comm_time); #endif @@ -1494,8 +1493,8 @@ void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, } free(a); } -#if TIME_BREAKDOWN -int is_aggregator(int rank, +#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN +int is_aggregator(int rank, int nprocs_for_coll, int *aggregator_list){ diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index bcb48a77c27..e04328ce127 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -51,8 +51,8 @@ #endif #include "io_ompio.h" -print_queue *coll_write_time=NULL; -print_queue *coll_read_time=NULL; +mca_io_ompio_print_queue *coll_write_time=NULL; +mca_io_ompio_print_queue *coll_read_time=NULL; static int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, @@ -1902,7 +1902,7 @@ void mca_io_ompio_get_bytes_per_agg ( int *bytes_per_agg) } /* Print queue related function implementations */ -int ompi_io_ompio_set_print_queue (print_queue **q, +int ompi_io_ompio_set_print_queue (mca_io_ompio_print_queue **q, int queue_type){ int ret = OMPI_SUCCESS; @@ -1925,7 +1925,7 @@ int ompi_io_ompio_set_print_queue (print_queue **q, } -int ompi_io_ompio_initialize_print_queue(print_queue *q){ +int ompi_io_ompio_initialize_print_queue(mca_io_ompio_print_queue *q){ int ret = OMPI_SUCCESS; q->first = 0; @@ -1934,10 +1934,10 @@ int ompi_io_ompio_initialize_print_queue(print_queue *q){ return ret; } int ompi_io_ompio_register_print_entry (int queue_type, - print_entry x){ - + mca_io_ompio_print_entry x){ + int ret = OMPI_SUCCESS; - print_queue *q=NULL; + mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); @@ -1953,12 +1953,11 @@ int ompi_io_ompio_register_print_entry (int queue_type, } return ret; } +int ompi_io_ompio_unregister_print_entry (int queue_type, + mca_io_ompio_print_entry *x){ -int ompi_io_ompio_unregister_print_entry (int queue_type, - print_entry *x){ - int ret = OMPI_SUCCESS; - print_queue *q=NULL; + mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); if (ret != OMPI_ERROR){ if (q->count <= 0){ @@ -1976,7 +1975,7 @@ int ompi_io_ompio_unregister_print_entry (int queue_type, int ompi_io_ompio_empty_print_queue(int queue_type){ int ret = OMPI_SUCCESS; - print_queue *q=NULL; + mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); assert (ret != OMPI_ERROR); @@ -1992,7 +1991,7 @@ int ompi_io_ompio_full_print_queue(int queue_type){ int ret = OMPI_SUCCESS; - print_queue *q=NULL; + mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); assert ( ret != OMPI_ERROR); @@ -2012,8 +2011,8 @@ int ompi_io_ompio_print_time_info(int queue_type, double *time_details = NULL, *final_sum = NULL; double *final_max = NULL, *final_min = NULL; double *final_time_details=NULL; - print_queue *q=NULL; - + mca_io_ompio_print_queue *q=NULL; + ret = ompi_io_ompio_set_print_queue(&q, queue_type); assert (ret != OMPI_ERROR); diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index e15769edac9..774a99628ce 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -60,6 +60,7 @@ OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info; #define QUEUESIZE 2048 #define MCA_IO_DEFAULT_FILE_VIEW_SIZE 4*1024*1024 +#define OMPIO_FCOLL_WANT_TIME_BREAKDOWN 0 #define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b)) #define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a)) @@ -157,14 +158,14 @@ typedef struct { double time[3]; int nprocs_for_coll; int aggregator; -}print_entry; +}mca_io_ompio_print_entry; typedef struct { - print_entry entry[QUEUESIZE + 1]; + mca_io_ompio_print_entry entry[QUEUESIZE + 1]; int first; int last; int count; -} print_queue; +} mca_io_ompio_print_queue; typedef struct { int ndims; @@ -271,7 +272,7 @@ typedef int (*mca_io_ompio_set_aggregator_props_fn_t) (struct mca_io_ompio_file_ typedef int (*mca_io_ompio_full_print_queue_fn_t) (int queue_type); typedef int (*mca_io_ompio_register_print_entry_fn_t) (int queue_type, - print_entry x); + mca_io_ompio_print_entry x); /** @@ -381,8 +382,8 @@ struct mca_io_ompio_data_t { }; typedef struct mca_io_ompio_data_t mca_io_ompio_data_t; -OMPI_DECLSPEC extern print_queue *coll_write_time; -OMPI_DECLSPEC extern print_queue *coll_read_time; +OMPI_DECLSPEC extern mca_io_ompio_print_queue *coll_write_time; +OMPI_DECLSPEC extern mca_io_ompio_print_queue *coll_read_time; /* functions to retrieve the number of aggregators and the size of the temporary buffer on aggregators from the fcoll modules */ @@ -663,20 +664,20 @@ OMPI_DECLSPEC int ompi_io_ompio_bcast_array (void *buff, ompi_communicator_t *comm); OMPI_DECLSPEC int ompi_io_ompio_register_print_entry (int queue_type, - print_entry x); + mca_io_ompio_print_entry x); -OMPI_DECLSPEC int ompi_io_ompio_unregister_print_entry (int queue_type, print_entry *x); +OMPI_DECLSPEC int ompi_io_ompio_unregister_print_entry (int queue_type, mca_io_ompio_print_entry *x); OMPI_DECLSPEC int ompi_io_ompio_empty_print_queue(int queue_type); OMPI_DECLSPEC int ompi_io_ompio_full_print_queue(int queue_type); -OMPI_DECLSPEC int ompi_io_ompio_initialize_print_queue(print_queue *q); +OMPI_DECLSPEC int ompi_io_ompio_initialize_print_queue(mca_io_ompio_print_queue *q); OMPI_DECLSPEC int ompi_io_ompio_print_time_info(int queue_type, char *name_operation, mca_io_ompio_file_t *fh); -int ompi_io_ompio_set_print_queue (print_queue **q, +int ompi_io_ompio_set_print_queue (mca_io_ompio_print_queue **q, int queue_type); diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index 75e6226947f..4ef690c63e0 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -128,8 +128,8 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, ompio_fh->f_split_coll_in_use = false; /*Initialize the print_queues queues here!*/ - coll_write_time = (print_queue *) malloc (sizeof(print_queue)); - coll_read_time = (print_queue *) malloc (sizeof(print_queue)); + coll_write_time = (mca_io_ompio_print_queue *) malloc (sizeof(mca_io_ompio_print_queue)); + coll_read_time = (mca_io_ompio_print_queue *) malloc (sizeof(mca_io_ompio_print_queue)); ompi_io_ompio_initialize_print_queue(coll_write_time); ompi_io_ompio_initialize_print_queue(coll_read_time); From ad72a092ef7040d9dc687e23146f29ed2d33d0d6 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 15 Jul 2015 16:05:52 -0500 Subject: [PATCH 0153/1704] - make the split collective shared file pointer operations work - minor code restructering in io/ompio required for that. --- ompi/mca/io/ompio/io_ompio.h | 30 ++-- ompi/mca/io/ompio/io_ompio_file_read.c | 58 ++++---- ompi/mca/io/ompio/io_ompio_file_write.c | 72 +++++----- .../individual/sharedfp_individual_iwrite.c | 128 ++++++++++++++++- .../individual/sharedfp_individual_write.c | 4 +- .../lockedfile/sharedfp_lockedfile_iread.c | 127 ++++++++++++++++- .../lockedfile/sharedfp_lockedfile_iwrite.c | 127 ++++++++++++++++- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 129 +++++++++++++++++- ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c | 127 ++++++++++++++++- 9 files changed, 690 insertions(+), 112 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index 774a99628ce..8ff20b4ea8c 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -426,16 +426,6 @@ OMPI_DECLSPEC int ompio_io_ompio_file_write_at_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -OMPI_DECLSPEC int ompio_io_ompio_file_write_at_all_begin (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -OMPI_DECLSPEC int ompio_io_ompio_file_write_at_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); - OMPI_DECLSPEC int ompio_io_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, @@ -449,6 +439,12 @@ OMPI_DECLSPEC int ompio_io_ompio_file_iwrite (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_request_t **request); +OMPI_DECLSPEC int ompio_io_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request); OMPI_DECLSPEC int ompio_io_ompio_file_iread (mca_io_ompio_file_t *fh, void *buf, int count, @@ -466,6 +462,12 @@ OMPI_DECLSPEC int ompio_io_ompio_file_iread_at (mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); +OMPI_DECLSPEC int ompio_io_ompio_file_iread_at_all (mca_io_ompio_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request); OMPI_DECLSPEC int ompio_io_ompio_file_read_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, @@ -478,14 +480,6 @@ OMPI_DECLSPEC int ompio_io_ompio_file_read_at_all (mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -OMPI_DECLSPEC int ompio_io_ompio_file_read_at_all_begin (mca_io_ompio_file_t *ompio_fh, - OMPI_MPI_OFFSET_TYPE offset, - void *buf, - int count, - struct ompi_datatype_t *datatype); -OMPI_DECLSPEC int ompio_io_ompio_file_read_at_all_end (mca_io_ompio_file_t *ompio_fh, - void *buf, - ompi_status_public_t * status); OMPI_DECLSPEC int ompio_io_ompio_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); diff --git a/ompi/mca/io/ompio/io_ompio_file_read.c b/ompi/mca/io/ompio/io_ompio_file_read.c index fe30169b168..ab82e476304 100644 --- a/ompi/mca/io/ompio/io_ompio_file_read.c +++ b/ompi/mca/io/ompio/io_ompio_file_read.c @@ -463,18 +463,29 @@ int mca_io_ompio_file_iread_at_all (ompi_file_t *fh, { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fp=NULL; - OMPI_MPI_OFFSET_TYPE prev_offset; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - fp = &data->ompio_fh; + + ret = ompio_io_ompio_file_iread_at_all ( &data->ompio_fh, offset, buf, count, datatype, request ); + return ret; +} + +int ompio_io_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request) +{ + int ret = OMPI_SUCCESS; + OMPI_MPI_OFFSET_TYPE prev_offset; ompio_io_ompio_file_get_position (fp, &prev_offset ); ompi_io_ompio_set_explicit_offset (fp, offset); if ( NULL != fp->f_fcoll->fcoll_file_iread_all ) { - ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh, - buf, - count, + ret = fp->f_fcoll->fcoll_file_iread_all (fp, + buf, + count, datatype, request); } @@ -664,26 +675,16 @@ int mca_io_ompio_file_read_at_all_begin (ompi_file_t *fh, { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; - + mca_io_ompio_file_t *fp=NULL; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_read_at_all_begin ( &data->ompio_fh, offset, buf, count, datatype ); - return ret; -} - -int ompio_io_ompio_file_read_at_all_begin (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - int ret = OMPI_SUCCESS; + fp = &data->ompio_fh; - if ( true == fh->f_split_coll_in_use ) { + if ( true == fp->f_split_coll_in_use ) { printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } - ret = mca_io_ompio_file_iread_at_all ( fh->f_fh, offset, buf, count, datatype, &fh->f_split_coll_req ); - fh->f_split_coll_in_use = true; + ret = ompio_io_ompio_file_iread_at_all ( fp, offset, buf, count, datatype, &fp->f_split_coll_req ); + fp->f_split_coll_in_use = true; return ret; } @@ -693,20 +694,13 @@ int mca_io_ompio_file_read_at_all_end (ompi_file_t *fh, { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; + mca_io_ompio_file_t *fp=NULL; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_read_at_all_end ( &data->ompio_fh, buf, status ); - return ret; -} - -int ompio_io_ompio_file_read_at_all_end (mca_io_ompio_file_t *ompio_fh, - void *buf, - ompi_status_public_t * status) -{ - int ret = OMPI_SUCCESS; - ret = ompi_request_wait ( &ompio_fh->f_split_coll_req, status ); + fp = &data->ompio_fh; + ret = ompi_request_wait ( &fp->f_split_coll_req, status ); /* remove the flag again */ - ompio_fh->f_split_coll_in_use = false; + fp->f_split_coll_in_use = false; return ret; } diff --git a/ompi/mca/io/ompio/io_ompio_file_write.c b/ompi/mca/io/ompio/io_ompio_file_write.c index 28d8e4a3a7c..8a615209a97 100644 --- a/ompi/mca/io/ompio/io_ompio_file_write.c +++ b/ompi/mca/io/ompio/io_ompio_file_write.c @@ -222,7 +222,7 @@ int ompio_io_ompio_file_iwrite (mca_io_ompio_file_t *fh, ompio_req->req_type = MCA_OMPIO_REQUEST_WRITE; ompio_req->req_ompi.req_state = OMPI_REQUEST_ACTIVE; - if ( 0 == count ) { + if ( 0 == count ) { ompi_request_complete (&ompio_req->req_ompi, 0); ompio_req->req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; ompio_req->req_ompi.req_status._ucount = 0; @@ -574,19 +574,31 @@ int mca_io_ompio_file_iwrite_at_all (ompi_file_t *fh, { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fp=NULL; - OMPI_MPI_OFFSET_TYPE prev_offset; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - fp = &data->ompio_fh; + ret = ompio_io_ompio_file_iwrite_at_all ( &data->ompio_fh, offset, buf, count, datatype, request ); + return ret; +} + +int ompio_io_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request) +{ + + int ret = OMPI_SUCCESS; + OMPI_MPI_OFFSET_TYPE prev_offset; + ompio_io_ompio_file_get_position (fp, &prev_offset ); ompi_io_ompio_set_explicit_offset (fp, offset); if ( NULL != fp->f_fcoll->fcoll_file_iwrite_all ) { - ret = fp->f_fcoll->fcoll_file_iwrite_all (&data->ompio_fh, - buf, - count, + ret = fp->f_fcoll->fcoll_file_iwrite_all (fp, + buf, + count, datatype, request); } @@ -597,12 +609,14 @@ int mca_io_ompio_file_iwrite_at_all (ompi_file_t *fh, ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); } - ompi_io_ompio_set_explicit_offset (fp, prev_offset); return ret; } + + + /* Infrastructure for shared file pointer operations */ /* (Individual and collective */ /******************************************************/ @@ -778,51 +792,37 @@ int mca_io_ompio_file_write_at_all_begin (ompi_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_io_ompio_data_t *data=NULL; + mca_io_ompio_file_t *fp=NULL; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_write_at_all_begin ( &data->ompio_fh, offset, buf, count, datatype ); - return ret; -} - -int ompio_io_ompio_file_write_at_all_begin (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - int ret = OMPI_SUCCESS; + fp = &data->ompio_fh; - if ( true == fh->f_split_coll_in_use ) { + if ( true == fp->f_split_coll_in_use ) { printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } - ret = mca_io_ompio_file_iwrite_at_all ( fh->f_fh, offset, buf, count, datatype, &fh->f_split_coll_req ); - fh->f_split_coll_in_use = true; + ret = ompio_io_ompio_file_iwrite_at_all ( fp, offset, buf, count, datatype, &fp->f_split_coll_req ); + fp->f_split_coll_in_use = true; + return ret; } + int mca_io_ompio_file_write_at_all_end (ompi_file_t *fh, void *buf, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; - + mca_io_ompio_file_t *fp=NULL; + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_read_at_all_end ( &data->ompio_fh, buf, status ); - return ret; -} - -int ompio_io_ompio_file_write_at_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status) -{ - int ret = OMPI_SUCCESS; - ret = ompi_request_wait ( &fh->f_split_coll_req, status ); + fp = &data->ompio_fh; + ret = ompi_request_wait ( &fp->f_split_coll_req, status ); /* remove the flag again */ - fh->f_split_coll_in_use = false; + fp->f_split_coll_in_use = false; + return ret; } - diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c index f2663f70470..ad87090fa4c 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -90,14 +90,132 @@ int mca_sharedfp_individual_write_ordered_begin(mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype) { - opal_output(0,"mca_sharedfp_individual_write_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + int size = 0, rank = 0; + int i = 0; + size_t numofbytes = 0; + size_t totalbytes = 0; + OMPI_MPI_OFFSET_TYPE *offbuff=NULL; + OMPI_MPI_OFFSET_TYPE global_offset = 0; + OMPI_MPI_OFFSET_TYPE prev_offset = 0; + OMPI_MPI_OFFSET_TYPE temp = 0, offset = 0; + mca_sharedfp_individual_header_record *headnode = NULL; + struct mca_sharedfp_base_data_t *sh = NULL; + mca_sharedfp_base_module_t * shared_fp_base_module = NULL; + + if(fh->f_sharedfp_data==NULL){ + if ( mca_sharedfp_individual_verbose ) { + printf("sharedfp_individual_write_ordered_begin - opening the shared file pointer\n"); + } + shared_fp_base_module = fh->f_sharedfp; + + ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, + fh->f_filename, + fh->f_amode, + fh->f_info, + fh); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_individual_write_ordered_begin - error opening the shared file pointer\n"); + return ret; + } + } + + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + + /*Retrieve the sharedfp data structures*/ + sh = fh->f_sharedfp_data; + rank = ompi_comm_rank ( sh->comm ); + size = ompi_comm_size ( sh->comm ); + + /* Calculate the number of bytes of data that needs to be written*/ + opal_datatype_type_size ( &datatype->super, &numofbytes); + totalbytes = count * numofbytes; + + headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data; + if ( NULL == headnode) { + opal_output (0, "sharedfp_individual_write_ordered_begin: headnode is NULL but file is open\n"); + return OMPI_ERROR; + } + + /* Data from all the metadata is combined and written to the main file */ + ret = mca_sharedfp_individual_collaborate_data ( sh ); + if ( OMPI_SUCCESS != ret) { + return ret; + } + + if ( 0 == rank ) { + offbuff = (OMPI_MPI_OFFSET_TYPE *)malloc ( sizeof(OMPI_MPI_OFFSET_TYPE) * size); + if (NULL == offbuff ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + } + + /*collect the total bytes to be written*/ + sh->comm->c_coll.coll_gather ( &totalbytes, 1, OMPI_OFFSET_DATATYPE, + offbuff, 1, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_gather_module ); + + if ( 0 == rank ) { + prev_offset = offbuff[0]; + offbuff[0] = sh->global_offset; + + for (i = 1; i < size ; i++){ + temp = offbuff[i]; + offbuff[i] = offbuff[i - 1] + prev_offset; + prev_offset = temp; + } + + for (i = 0; i < size; i++){ + global_offset = offbuff[size - 1] + prev_offset; + } + } + + + /* Scatter the results to the other processes */ + ret = sh->comm->c_coll.coll_scatter ( offbuff, 1, OMPI_OFFSET_DATATYPE, + &offset, 1, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_individual_write_ordered_begin: Error in scattering offsets \n"); + goto exit; + } + + ret = sh->comm->c_coll.coll_bcast ( &global_offset, 1, OMPI_OFFSET_DATATYPE, + 0, sh->comm, sh->comm->c_coll.coll_bcast_module ); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_individual_write_ordered_begin: Error while bcasting global offset \n"); + goto exit; + } + + sh->global_offset = global_offset; + + /*use file_write_at_all to ensure the order*/ + ret = ompio_io_ompio_file_iwrite_at_all(sh->sharedfh,offset, buf,count,datatype, + &fh->f_split_coll_req); + fh->f_split_coll_in_use = true; + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_individual_write_ordered_begin: Error while writing the datafile \n"); + } + +exit: + if ( NULL != offbuff ) { + free ( offbuff); + } + + return ret; } int mca_sharedfp_individual_write_ordered_end(mca_io_ompio_file_t *fh, void *buf, ompi_status_public_t *status) { - opal_output(0,"mca_sharedfp_individual_write_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + ret = ompi_request_wait ( &fh->f_split_coll_req, status ); + + /* remove the flag again */ + fh->f_split_coll_in_use = false; + return ret; } diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c index f7e4cb47905..7a90b2cf766 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c @@ -104,7 +104,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_write - opening the shared file pointer\n"); + printf("sharedfp_individual_write_ordered - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -114,7 +114,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, fh->f_info, fh); if ( OMPI_SUCCESS != ret ) { - opal_output(0,"sharedfp_individual_write - error opening the shared file pointer\n"); + opal_output(0,"sharedfp_individual_write_ordered - error opening the shared file pointer\n"); return ret; } } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c index 6a828fe9565..7b754768d08 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -87,8 +87,121 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype) { - opal_output(0,"mca_sharedfp_lockedfile_write_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + mca_sharedfp_base_module_t * shared_fp_base_module=NULL; + OMPI_MPI_OFFSET_TYPE offset = 0; + long sendBuff = 0; + long *buff=NULL; + long offsetBuff; + OMPI_MPI_OFFSET_TYPE offsetReceived = 0; + long bytesRequested = 0; + int recvcnt = 1, sendcnt = 1; + size_t numofBytes; + int rank, size, i; + struct mca_sharedfp_base_data_t *sh = NULL; + + if(fh->f_sharedfp_data==NULL){ + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_read_ordered_begin: opening the shared file pointer\n"); + } + shared_fp_base_module = fh->f_sharedfp; + + ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, + fh->f_filename, + fh->f_amode, + fh->f_info, + fh); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_lockedfile_read_ordered_begin - error opening the shared file pointer\n"); + return ret; + } + } + + + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + + /*Retrieve the new communicator*/ + sh = fh->f_sharedfp_data; + + /* Calculate the number of bytes to write*/ + opal_datatype_type_size ( &datatype->super, &numofBytes); + sendBuff = count * numofBytes; + + /* Get the ranks in the communicator */ + rank = ompi_comm_rank ( sh->comm ); + size = ompi_comm_size ( sh->comm ); + + if ( 0 == rank ) { + buff = (long*) malloc (sizeof(long) * size); + if ( NULL == buff ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + } + + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, buff, recvcnt, + OMPI_OFFSET_DATATYPE, 0, sh->comm, + sh->comm->c_coll.coll_gather_module ); + if ( OMPI_SUCCESS != ret ) { + goto exit; + } + + /* All the counts are present now in the recvBuff. + The size of recvBuff is sizeof_newComm + */ + if (rank == 0) { + for ( i = 0; i < size ; i ++) { + bytesRequested += buff[i]; + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_read_ordered_begin: Bytes requested are %ld\n",bytesRequested); + } + } + + /*Request the offset to write bytesRequested bytes + only the root process needs to do the request, + since the root process will then tell the other + processes at what offset they should write their + share of the data. + */ + ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offsetReceived); + if ( OMPI_SUCCESS != ret ){ + goto exit; + } + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_read_ordered_begin: Offset received is %lld\n",offsetReceived); + } + buff[0] += offsetReceived; + for (i = 1 ; i < size; i++) { + buff[i] += buff[i-1]; + } + } + + /* Scatter the results to the other processes*/ + ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, + &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); + if ( OMPI_SUCCESS != ret ) { + goto exit; + } + + /*Each process now has its own individual offset*/ + offset = offsetBuff - sendBuff; + + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_read_ordered_begin: Offset returned is %lld\n",offset); + } + + ret = ompio_io_ompio_file_iread_at_all ( sh->sharedfh, offset, buf, count, datatype, &fh->f_split_coll_req ); + fh->f_split_coll_in_use = true; + +exit: + if ( NULL != buff ) { + free ( buff); + } + + return ret; } @@ -96,6 +209,10 @@ int mca_sharedfp_lockedfile_read_ordered_end(mca_io_ompio_file_t *fh, void *buf, ompi_status_public_t *status) { - opal_output(0,"mca_sharedfp_lockedfile_write_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + ret = ompi_request_wait ( &fh->f_split_coll_req, status ); + + /* remove the flag again */ + fh->f_split_coll_in_use = false; + return ret; } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c index 49f1917b140..6d601fa2b95 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -85,8 +85,121 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype) { - opal_output(0,"mca_sharedfp_lockedfile_write_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + mca_sharedfp_base_module_t * shared_fp_base_module=NULL; + OMPI_MPI_OFFSET_TYPE offset = 0; + long sendBuff = 0; + long *buff=NULL; + long offsetBuff; + OMPI_MPI_OFFSET_TYPE offsetReceived = 0; + long bytesRequested = 0; + int recvcnt = 1, sendcnt = 1; + size_t numofBytes; + int rank, size, i; + struct mca_sharedfp_base_data_t *sh = NULL; + + if(fh->f_sharedfp_data==NULL){ + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_write_ordered_begin: opening the shared file pointer\n"); + } + shared_fp_base_module = fh->f_sharedfp; + + ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, + fh->f_filename, + fh->f_amode, + fh->f_info, + fh); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_lockedfile_write_ordered_begin - error opening the shared file pointer\n"); + return ret; + } + } + + + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + + /*Retrieve the new communicator*/ + sh = fh->f_sharedfp_data; + + /* Calculate the number of bytes to write*/ + opal_datatype_type_size ( &datatype->super, &numofBytes); + sendBuff = count * numofBytes; + + /* Get the ranks in the communicator */ + rank = ompi_comm_rank ( sh->comm ); + size = ompi_comm_size ( sh->comm ); + + if ( 0 == rank ) { + buff = (long*) malloc (sizeof(long) * size); + if ( NULL == buff ) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + } + + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, buff, recvcnt, + OMPI_OFFSET_DATATYPE, 0, sh->comm, + sh->comm->c_coll.coll_gather_module ); + if ( OMPI_SUCCESS != ret ) { + goto exit; + } + + /* All the counts are present now in the recvBuff. + The size of recvBuff is sizeof_newComm + */ + if (rank == 0) { + for ( i = 0; i < size ; i ++) { + bytesRequested += buff[i]; + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_write_ordered_begin: Bytes requested are %ld\n",bytesRequested); + } + } + + /*Request the offset to write bytesRequested bytes + only the root process needs to do the request, + since the root process will then tell the other + processes at what offset they should write their + share of the data. + */ + ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offsetReceived); + if ( OMPI_SUCCESS != ret ){ + goto exit; + } + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_write_ordered_begin: Offset received is %lld\n",offsetReceived); + } + buff[0] += offsetReceived; + for (i = 1 ; i < size; i++) { + buff[i] += buff[i-1]; + } + } + + /* Scatter the results to the other processes*/ + ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, + &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); + if ( OMPI_SUCCESS != ret ) { + goto exit; + } + + /*Each process now has its own individual offset*/ + offset = offsetBuff - sendBuff; + + if ( mca_sharedfp_lockedfile_verbose ) { + printf("sharedfp_lockedfile_write_ordered_begin: Offset returned is %lld\n",offset); + } + + ret = ompio_io_ompio_file_iwrite_at_all ( sh->sharedfh, offset, buf, count, datatype, &fh->f_split_coll_req ); + fh->f_split_coll_in_use = true; + +exit: + if ( NULL != buff ) { + free ( buff); + } + + return ret; } @@ -95,6 +208,10 @@ int mca_sharedfp_lockedfile_write_ordered_end(mca_io_ompio_file_t *fh, void *buf, ompi_status_public_t *status) { - opal_output(0,"mca_sharedfp_lockedfile_write_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + ret = ompi_request_wait ( &fh->f_split_coll_req, status ); + + /* remove the flag again */ + fh->f_split_coll_in_use = false; + return ret; } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index a6066093357..b08410497f6 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 201302915 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -84,8 +84,123 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype) { - opal_output(0,"mca_sharedfp_sm_read_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + OMPI_MPI_OFFSET_TYPE offset = 0; + long sendBuff = 0; + long *buff=NULL; + long offsetBuff; + OMPI_MPI_OFFSET_TYPE offsetReceived = 0; + long bytesRequested = 0; + int recvcnt = 1, sendcnt = 1; + size_t numofBytes; + int rank, size, i; + struct mca_sharedfp_base_data_t *sh = NULL; + mca_sharedfp_base_module_t * shared_fp_base_module = NULL; + + if ( NULL == fh->f_sharedfp_data){ + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_read_ordered_begin: opening the shared file pointer\n"); + } + shared_fp_base_module = fh->f_sharedfp; + + ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, + fh->f_filename, + fh->f_amode, + fh->f_info, + fh); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_sm_read_ordered_begin - error opening the shared file pointer\n"); + return ret; + } + } + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + + + + /*Retrieve the new communicator*/ + sh = fh->f_sharedfp_data; + + /* Calculate the number of bytes to read*/ + opal_datatype_type_size ( &datatype->super, &numofBytes); + sendBuff = count * numofBytes; + + /* Get the ranks in the communicator */ + rank = ompi_comm_rank ( sh->comm ); + size = ompi_comm_size ( sh->comm ); + + if ( 0 == rank ) { + buff = (long*)malloc(sizeof(long) * size); + if ( NULL == buff ) + return OMPI_ERR_OUT_OF_RESOURCE; + } + + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, + buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_gather_module ); + if( OMPI_SUCCESS != ret){ + goto exit; + } + + /* All the counts are present now in the recvBuff. + ** The size of recvBuff is sizeof_newComm + */ + if ( 0 == rank ) { + for (i = 0; i < size ; i ++) { + bytesRequested += buff[i]; + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_read_ordered_begin: Bytes requested are %ld\n", + bytesRequested); + } + } + + /* Request the offset to read bytesRequested bytes + ** only the root process needs to do the request, + ** since the root process will then tell the other + ** processes at what offset they should read their + ** share of the data. + */ + ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offsetReceived); + if( OMPI_SUCCESS != ret){ + goto exit; + } + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_read_ordered_begin: Offset received is %lld\n",offsetReceived); + } + + buff[0] += offsetReceived; + for (i = 1 ; i < size; i++) { + buff[i] += buff[i-1]; + } + } + + /* Scatter the results to the other processes*/ + ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, + &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); + if( OMPI_SUCCESS != ret){ + goto exit; + } + + /*Each process now has its own individual offset in recvBUFF*/ + offset = offsetBuff - sendBuff; + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_read_ordered_begin: Offset returned is %lld\n",offset); + } + + /* read to the file */ + ret = ompio_io_ompio_file_iread_at_all(sh->sharedfh,offset,buf,count,datatype, + &fh->f_split_coll_req); + fh->f_split_coll_in_use = true; + +exit: + if ( NULL != buff ) { + free ( buff ); + } + + return ret; } @@ -93,6 +208,10 @@ int mca_sharedfp_sm_read_ordered_end(mca_io_ompio_file_t *fh, void *buf, ompi_status_public_t *status) { - opal_output(0,"mca_sharedfp_sm_read_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + ret = ompi_request_wait ( &fh->f_split_coll_req, status ); + + /* remove the flag again */ + fh->f_split_coll_in_use = false; + return ret; } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c index 92d060afe1d..94f83a8b7cb 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c @@ -85,8 +85,123 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, int count, struct ompi_datatype_t *datatype) { - opal_output(0,"mca_sharedfp_sm_write_ordered_begin: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + OMPI_MPI_OFFSET_TYPE offset = 0; + long sendBuff = 0; + long *buff=NULL; + long offsetBuff; + OMPI_MPI_OFFSET_TYPE offsetReceived = 0; + long bytesRequested = 0; + int recvcnt = 1, sendcnt = 1; + size_t numofBytes; + int rank, size, i; + struct mca_sharedfp_base_data_t *sh = NULL; + mca_sharedfp_base_module_t * shared_fp_base_module = NULL; + + if ( NULL == fh->f_sharedfp_data){ + if ( mca_sharedfp_sm_verbose ) { + printf("sharedfp_sm_write_ordered_begin: opening the shared file pointer\n"); + } + shared_fp_base_module = fh->f_sharedfp; + + ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm, + fh->f_filename, + fh->f_amode, + fh->f_info, + fh); + if ( OMPI_SUCCESS != ret ) { + opal_output(0,"sharedfp_sm_write_ordered_begin - error opening the shared file pointer\n"); + return ret; + } + } + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + + + + /*Retrieve the new communicator*/ + sh = fh->f_sharedfp_data; + + /* Calculate the number of bytes to read*/ + opal_datatype_type_size ( &datatype->super, &numofBytes); + sendBuff = count * numofBytes; + + /* Get the ranks in the communicator */ + rank = ompi_comm_rank ( sh->comm ); + size = ompi_comm_size ( sh->comm ); + + if ( 0 == rank ) { + buff = (long*)malloc(sizeof(long) * size); + if ( NULL == buff ) + return OMPI_ERR_OUT_OF_RESOURCE; + } + + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, + buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_gather_module ); + if( OMPI_SUCCESS != ret){ + goto exit; + } + + /* All the counts are present now in the recvBuff. + ** The size of recvBuff is sizeof_newComm + */ + if ( 0 == rank ) { + for (i = 0; i < size ; i ++) { + bytesRequested += buff[i]; + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_write_ordered_begin: Bytes requested are %ld\n", + bytesRequested); + } + } + + /* Request the offset to read bytesRequested bytes + ** only the root process needs to do the request, + ** since the root process will then tell the other + ** processes at what offset they should read their + ** share of the data. + */ + ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offsetReceived); + if( OMPI_SUCCESS != ret){ + goto exit; + } + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_write_ordered_begin: Offset received is %lld\n",offsetReceived); + } + + buff[0] += offsetReceived; + for (i = 1 ; i < size; i++) { + buff[i] += buff[i-1]; + } + } + + /* Scatter the results to the other processes*/ + ret = sh->comm->c_coll.coll_scatter ( buff, sendcnt, OMPI_OFFSET_DATATYPE, + &offsetBuff, recvcnt, OMPI_OFFSET_DATATYPE, 0, + sh->comm, sh->comm->c_coll.coll_scatter_module ); + if( OMPI_SUCCESS != ret){ + goto exit; + } + + /*Each process now has its own individual offset in recvBUFF*/ + offset = offsetBuff - sendBuff; + if ( mca_sharedfp_sm_verbose ) { + printf("mca_sharedfp_sm_write_ordered_begin: Offset returned is %lld\n",offset); + } + + /* read to the file */ + ret = ompio_io_ompio_file_iwrite_at_all(sh->sharedfh,offset,buf,count,datatype, + &fh->f_split_coll_req); + fh->f_split_coll_in_use = true; + +exit: + if ( NULL != buff ) { + free ( buff ); + } + + return ret; } @@ -94,6 +209,10 @@ int mca_sharedfp_sm_write_ordered_end(mca_io_ompio_file_t *fh, void *buf, ompi_status_public_t *status) { - opal_output(0,"mca_sharedfp_sm_write_ordered_end: NOT IMPLEMENTED\n"); - return OMPI_ERROR; + int ret = OMPI_SUCCESS; + ret = ompi_request_wait ( &fh->f_split_coll_req, status ); + + /* remove the flag again */ + fh->f_split_coll_in_use = false; + return ret; } From eb4b932b45a08b534a371d11e4bc4d704e7e6f60 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Tue, 28 Jul 2015 18:27:31 -0500 Subject: [PATCH 0154/1704] clean up the usage of opal_output vs. printf --- .../individual/sharedfp_individual_iwrite.c | 9 ++++--- .../lockedfile/sharedfp_lockedfile_iread.c | 25 ++++++++++++------ .../lockedfile/sharedfp_lockedfile_iwrite.c | 26 ++++++++++++------- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 23 ++++++++++------ ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c | 26 ++++++++++++------- 5 files changed, 72 insertions(+), 37 deletions(-) diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c index ad87090fa4c..5286fd572c0 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh, void *buf, @@ -40,7 +41,8 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_iwrite: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_iwrite: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -105,7 +107,8 @@ int mca_sharedfp_individual_write_ordered_begin(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_write_ordered_begin - opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_write_ordered_begin - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -121,7 +124,7 @@ int mca_sharedfp_individual_write_ordered_begin(mca_io_ompio_file_t *fh, } if ( true == fh->f_split_coll_in_use ) { - printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + opal_output(0, "Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c index 7b754768d08..23d31e60e1c 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/io/ompio/io_ompio.h" int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, @@ -41,7 +42,8 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data ) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_iread: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_iread: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -61,7 +63,8 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, bytesRequested = count * numofBytes; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_iread - Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_iread - Bytes Requested is %ld\n",bytesRequested); } @@ -72,7 +75,8 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_iread - Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_iread - Offset received is %lld\n",offset); } /* Read the file */ @@ -102,7 +106,8 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered_begin: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -119,7 +124,8 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, if ( true == fh->f_split_coll_in_use ) { - printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } @@ -155,7 +161,8 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, for ( i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered_begin: Bytes requested are %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered_begin: Bytes requested are %ld\n",bytesRequested); } } @@ -170,7 +177,8 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered_begin: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered_begin: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; for (i = 1 ; i < size; i++) { @@ -190,7 +198,8 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, offset = offsetBuff - sendBuff; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered_begin: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered_begin: Offset returned is %lld\n",offset); } ret = ompio_io_ompio_file_iread_at_all ( sh->sharedfh, offset, buf, count, datatype, &fh->f_split_coll_req ); diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c index 6d601fa2b95..bb8490da1c8 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/io/ompio/io_ompio.h" int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, @@ -41,7 +42,8 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_iwrite: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_iwrite: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -60,7 +62,8 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, opal_datatype_type_size ( &datatype->super, &numofBytes); bytesRequested = count * numofBytes; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_iwrite: Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_iwrite: Bytes Requested is %ld\n",bytesRequested); } /*Retrieve the shared file data struct*/ @@ -70,7 +73,8 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset); if ( -1 != ret) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_iwrite: Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_iwrite: Offset received is %lld\n",offset); } /* Write to the file */ @@ -100,7 +104,8 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered_begin: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -117,7 +122,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, if ( true == fh->f_split_coll_in_use ) { - printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + opal_output(0, "Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } @@ -153,7 +158,8 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, for ( i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered_begin: Bytes requested are %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered_begin: Bytes requested are %ld\n",bytesRequested); } } @@ -168,7 +174,8 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered_begin: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered_begin: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; for (i = 1 ; i < size; i++) { @@ -188,8 +195,9 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, offset = offsetBuff - sendBuff; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered_begin: Offset returned is %lld\n",offset); - } + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered_begin: Offset returned is %lld\n",offset); + } ret = ompio_io_ompio_file_iwrite_at_all ( sh->sharedfh, offset, buf, count, datatype, &fh->f_split_coll_req ); fh->f_split_coll_in_use = true; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index b08410497f6..c2e78126639 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, void *buf, @@ -40,7 +41,8 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iread: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_iread: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -70,7 +72,8 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iread: Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_iread: Offset received is %lld\n",offset); } /* Read the file */ ret = ompio_io_ompio_file_iread_at(sh->sharedfh,offset,buf,count,datatype,request); @@ -99,7 +102,8 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read_ordered_begin: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_read_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -114,7 +118,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, } } if ( true == fh->f_split_coll_in_use ) { - printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + opal_output(0,"Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } @@ -151,8 +155,9 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered_begin: Bytes requested are %ld\n", - bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_read_ordered_begin: Bytes requested are %ld\n", + bytesRequested); } } @@ -167,7 +172,8 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered_begin: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_read_ordered_begin: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; @@ -187,7 +193,8 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered_begin: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_read_ordered_begin: Offset returned is %lld\n",offset); } /* read to the file */ diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c index 94f83a8b7cb..f8e2af33af9 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, void *buf, @@ -40,7 +41,8 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iwrite - opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_iwrite - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -63,14 +65,16 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iwrite: Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_iwrite: Bytes Requested is %ld\n",bytesRequested); } /* Request the offset to write bytesRequested bytes */ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iwrite: Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_iwrite: Offset received is %lld\n",offset); } /* Write to the file */ ret = ompio_io_ompio_file_iwrite_at(sh->sharedfh,offset,buf,count,datatype,request); @@ -100,7 +104,8 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered_begin: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -115,7 +120,7 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, } } if ( true == fh->f_split_coll_in_use ) { - printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + opal_output(0, "Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } @@ -152,8 +157,9 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_write_ordered_begin: Bytes requested are %ld\n", - bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_write_ordered_begin: Bytes requested are %ld\n", + bytesRequested); } } @@ -168,7 +174,8 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_write_ordered_begin: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_write_ordered_begin: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; @@ -188,7 +195,8 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_write_ordered_begin: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_write_ordered_begin: Offset returned is %lld\n",offset); } /* read to the file */ From ed26236452947d41a6157ff1b23eb255e626033e Mon Sep 17 00:00:00 2001 From: yohann Date: Fri, 14 Aug 2015 16:23:10 -0700 Subject: [PATCH 0155/1704] mtl/ofi: Require proper ordering by OFI provider. (cherry picked from commit open-mpi/ompi@98b300e1bbe11e298a804084be33e47bc795a4c0) --- ompi/mca/mtl/ofi/mtl_ofi_component.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c index bce68e4fa47..0c414ec7a12 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi_component.c +++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c @@ -127,6 +127,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads, * ep_type: reliable datagram operation * caps: Capabilities required from the provider. * Tag matching is specified to implement MPI semantics. + * msg_order: Guarantee that messages with same tag are ordered. */ hints = fi_allocinfo(); if (!hints) { @@ -135,9 +136,11 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads, __FILE__, __LINE__); goto error; } - hints->mode = FI_CONTEXT; - hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */ - hints->caps = FI_TAGGED; /* Tag matching interface */ + hints->mode = FI_CONTEXT; + hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */ + hints->caps = FI_TAGGED; /* Tag matching interface */ + hints->tx_attr->msg_order = FI_ORDER_SAS; + hints->rx_attr->msg_order = FI_ORDER_SAS; /** * Refine filter for additional capabilities From 92fa8428ca85b7bb2d23095c7fc109d679c266a8 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 28 May 2015 08:52:52 -0700 Subject: [PATCH 0156/1704] fortran: link the opal-pal.la library directly The libmpi_*.la fortran libraries make some direct calls to libopen-pal.la. In many (most?) cases, having libmpi_* link against libmpi is sufficient (because libmpi pulls in libopen-pal). But when building RPMs on SLES, some compiler/linker flags are used that seem to make this implicit linking not sufficient -- we get missing opal symbols when creating libmpi_mpifh.la. So link in open-pal directly (vs. indirectly), which solves the problem. (cherry picked from commit open-mpi/ompi@a7f897ae49a336bcc51ce4af362553c8aabde04a) --- ompi/mpi/fortran/mpif-h/Makefile.am | 11 +++++++++-- ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am | 9 ++++++++- ompi/mpi/fortran/use-mpi-tkr/Makefile.am | 9 ++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index 024601ff78c..cfcee816fb5 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2013 Inria. All rights reserved. # Copyright (c) 2011-2013 Universite Bordeaux 1 # Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights @@ -55,7 +55,14 @@ AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1 lib_LTLIBRARIES = CLEANFILES = -libmpi_mpifh_la_LIBADD = $(top_builddir)/ompi/libmpi.la $(OMPI_MPIEXT_MPIFH_LIBS) +# Note that we invoke some OPAL functions directly in libmpi_mpifh.la, +# so we need to link in the OPAL library directly (pulling it in +# indirectly via libmpi.la does not work on all platforms). +libmpi_mpifh_la_LIBADD = \ + $(top_builddir)/ompi/libmpi.la \ + $(OMPI_MPIEXT_MPIFH_LIBS) \ + $(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_PREFIX@open-pal.la + libmpi_mpifh_la_LDFLAGS = -version-info $(libmpi_mpifh_so_version) # Are we building the mpif.h bindings at all? diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am index 7f656522734..04e2fde9485 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am @@ -1,6 +1,6 @@ # -*- makefile -*- # -# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # @@ -48,6 +48,13 @@ nodist_libmpi_usempi_ignore_tkr_la_SOURCES += \ mpi-ignore-tkr-sizeof.f90 endif +# Note that we invoke some OPAL functions directly in +# libmpi_usempi_ignore_tkr.la, so we need to link in the OPAL library +# directly (pulling it in indirectly via libmpi.la does not work on +# all platforms). +libmpi_usempi_ignore_tkr_la_LIBADD = \ + $(OMPI_MPIEXT_USEMPI_LIBS) \ + $(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_PREFIX@open-pal.la libmpi_usempi_ignore_tkr_la_LDFLAGS = \ -version-info $(libmpi_usempi_ignore_tkr_so_version) \ $(OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS) diff --git a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am index 208c73c19f0..5ce31180c22 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am @@ -10,7 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2007 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2014-2015 Research Organization for Information Science @@ -86,6 +86,13 @@ nodist_libmpi_usempi_la_SOURCES += \ mpi-tkr-sizeof.f90 endif +# Note that we invoke some OPAL functions directly in +# libmpi_usempi.la, so we need to link in the OPAL library directly +# (pulling it in indirectly via libmpi.la does not work on all +# platforms). +libmpi_usempi_la_LIBADD = \ + $(OMPI_MPIEXT_USEMPI_LIBS) \ + $(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_PREFIX@open-pal.la # Set the library version libmpi_usempi_la_LDFLAGS = \ -version-info $(libmpi_usempi_tkr_so_version) \ From 29a7622c3d87944733c58b60791db697126be4c1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 17 Aug 2015 06:52:18 -0700 Subject: [PATCH 0157/1704] fortran: only have one _LIBADD Accidentally added a 2nd _LIBADD in a prior commit. This commit merges them back into a single _LIBADD. (cherry picked from commit open-mpi/ompi@e57861b0a5d67d8e3c33b4d4a4a967344696bacc) --- ompi/mpi/fortran/use-mpi-tkr/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am index 5ce31180c22..a29ba41453d 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am @@ -74,8 +74,6 @@ libmpi_usempi_la_SOURCES = \ mpi_waitsome_f90.f90 \ mpi_wtick_f90.f90 \ mpi_wtime_f90.f90 -libmpi_usempi_la_LIBADD = \ - $(top_builddir)/ompi/mpi/fortran/mpif-h/libmpi_mpifh.la # Don't distribute mpi-tkr-sizeof-*; they're generated. @@ -91,6 +89,7 @@ endif # (pulling it in indirectly via libmpi.la does not work on all # platforms). libmpi_usempi_la_LIBADD = \ + $(top_builddir)/ompi/mpi/fortran/mpif-h/libmpi_mpifh.la \ $(OMPI_MPIEXT_USEMPI_LIBS) \ $(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_PREFIX@open-pal.la # Set the library version From 2f2696a0ff9e9caff8b3137ccb1575b27209fece Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Thu, 13 Aug 2015 13:18:29 -0600 Subject: [PATCH 0158/1704] ompi: add internal error code for MPI_ERR_RMA_FLAVOR master commit open-mpi/ompi@b933eda36b4f0de724d9b48e54e26d3728c9fe89 Signed-off-by: Nathan Hjelm --- ompi/errhandler/errcode-internal.c | 10 ++++++++++ ompi/include/ompi/constants.h | 1 + 2 files changed, 11 insertions(+) diff --git a/ompi/errhandler/errcode-internal.c b/ompi/errhandler/errcode-internal.c index 020c525fcbe..7474e2b7509 100644 --- a/ompi/errhandler/errcode-internal.c +++ b/ompi/errhandler/errcode-internal.c @@ -55,6 +55,7 @@ static ompi_errcode_intern_t ompi_err_rma_attach_intern; static ompi_errcode_intern_t ompi_err_rma_range_intern; static ompi_errcode_intern_t ompi_err_rma_conflict_intern; static ompi_errcode_intern_t ompi_err_win_intern; +static ompi_errcode_intern_t ompi_err_rma_flavor_intern; static void ompi_errcode_intern_construct(ompi_errcode_intern_t* errcode); static void ompi_errcode_intern_destruct(ompi_errcode_intern_t* errcode); @@ -250,6 +251,14 @@ int ompi_errcode_intern_init (void) opal_pointer_array_set_item(&ompi_errcodes_intern, ompi_err_win_intern.index, &ompi_err_win_intern); + OBJ_CONSTRUCT(&ompi_err_rma_flavor_intern, ompi_errcode_intern_t); + ompi_err_rma_flavor_intern.code = OMPI_ERR_RMA_FLAVOR; + ompi_err_rma_flavor_intern.mpi_code = MPI_ERR_RMA_FLAVOR; + ompi_err_rma_flavor_intern.index = pos++; + strncpy(ompi_err_rma_flavor_intern.errstring, "OMPI_ERR_RMA_FLAVOR", OMPI_MAX_ERROR_STRING); + opal_pointer_array_set_item(&ompi_errcodes_intern, ompi_err_rma_flavor_intern.index, + &ompi_err_rma_flavor_intern); + ompi_errcode_intern_lastused=pos; return OMPI_SUCCESS; } @@ -279,6 +288,7 @@ int ompi_errcode_intern_finalize(void) OBJ_DESTRUCT(&ompi_err_rma_range_intern); OBJ_DESTRUCT(&ompi_err_rma_conflict_intern); OBJ_DESTRUCT(&ompi_err_win_intern); + OBJ_DESTRUCT(&ompi_err_rma_flavor_intern); OBJ_DESTRUCT(&ompi_errcodes_intern); return OMPI_SUCCESS; diff --git a/ompi/include/ompi/constants.h b/ompi/include/ompi/constants.h index 0e33ad4ca47..dbe9001baca 100644 --- a/ompi/include/ompi/constants.h +++ b/ompi/include/ompi/constants.h @@ -71,6 +71,7 @@ enum { OMPI_ERR_RMA_RANGE = OMPI_ERR_BASE - 5, OMPI_ERR_RMA_CONFLICT = OMPI_ERR_BASE - 6, OMPI_ERR_WIN = OMPI_ERR_BASE - 7, + OMPI_ERR_RMA_FLAVOR = OMPI_ERR_BASE - 8, }; #define OMPI_ERR_MAX (OMPI_ERR_BASE - 100) From 58527c9049ff12700e046315dff4d064db20b621 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Thu, 13 Aug 2015 13:19:52 -0600 Subject: [PATCH 0159/1704] ompi/win: add internal support for returning same_size and same_disp_unit info keys master commit open-mpi/ompi@b8356dae05b1fc877e7dcedd79a701a171db0b2b :bot:assign: @jsquyres closes open-mpi/ompi#814 Signed-off-by: Nathan Hjelm --- ompi/mpi/c/win_get_info.c | 13 ++++++++----- ompi/win/win.h | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ompi/mpi/c/win_get_info.c b/ompi/mpi/c/win_get_info.c index ff9f143d90c..83ac8b1459b 100644 --- a/ompi/mpi/c/win_get_info.c +++ b/ompi/mpi/c/win_get_info.c @@ -27,6 +27,10 @@ static const char FUNC_NAME[] = "MPI_Win_get_info"; +static void _win_info_set (ompi_info_t *info, const char *key, int set) +{ + ompi_info_set (info, key, set ? "true" : "false"); +} int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used) { @@ -50,11 +54,10 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used) if (OMPI_SUCCESS == ret && *info_used) { /* set standard info keys based on what the OSC module is using */ - if (win->w_flags & OMPI_WIN_NO_LOCKS) { - ompi_info_set (*info_used, "no_locks", "true"); - } else { - ompi_info_set (*info_used, "no_locks", "false"); - } + + _win_info_set (*info_used, "no_locks", win->w_flags & OMPI_WIN_NO_LOCKS); + _win_info_set (*info_used, "same_size", win->w_flags & OMPI_WIN_SAME_SIZE); + _win_info_set (*info_used, "same_disp_unit", win->w_flags & OMPI_WIN_SAME_DISP); } OMPI_ERRHANDLER_RETURN(ret, win, ret, FUNC_NAME); diff --git a/ompi/win/win.h b/ompi/win/win.h index 7a8baec0d18..cf40c767ebf 100644 --- a/ompi/win/win.h +++ b/ompi/win/win.h @@ -41,6 +41,8 @@ BEGIN_C_DECLS #define OMPI_WIN_FREED 0x00000001 #define OMPI_WIN_INVALID 0x00000002 #define OMPI_WIN_NO_LOCKS 0x00000004 +#define OMPI_WIN_SAME_DISP 0x00000008 +#define OMPI_WIN_SAME_SIZE 0x00000010 OMPI_DECLSPEC extern opal_pointer_array_t ompi_mpi_windows; From f9a689fb1d349ebe7fd6bb3c78858dbcc9d739a0 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 17 Aug 2015 14:55:12 -0500 Subject: [PATCH 0160/1704] cleanup the usage of printf vs. opal_output --- .../sharedfp/individual/sharedfp_individual.c | 42 ++++++++------- .../sharedfp_individual_collaborate_data.c | 53 +++++++++++-------- .../sharedfp_individual_file_open.c | 11 ++-- .../sharedfp_individual_insert_metadata.c | 25 +++++---- .../individual/sharedfp_individual_read.c | 1 + .../individual/sharedfp_individual_write.c | 6 ++- .../sharedfp_lockedfile_file_open.c | 14 +++-- .../lockedfile/sharedfp_lockedfile_read.c | 24 ++++++--- .../sharedfp_lockedfile_request_position.c | 28 ++++++---- .../lockedfile/sharedfp_lockedfile_seek.c | 3 +- .../lockedfile/sharedfp_lockedfile_write.c | 24 ++++++--- ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c | 15 +++--- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 5 +- ompi/mca/sharedfp/sm/sharedfp_sm_read.c | 24 ++++++--- .../sm/sharedfp_sm_request_position.c | 19 ++++--- ompi/mca/sharedfp/sm/sharedfp_sm_seek.c | 27 ++++++---- ompi/mca/sharedfp/sm/sharedfp_sm_write.c | 24 ++++++--- 17 files changed, 217 insertions(+), 128 deletions(-) diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual.c b/ompi/mca/sharedfp/individual/sharedfp_individual.c index 83a44df5ff0..9bcc2595294 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,6 +26,7 @@ #include "ompi_config.h" #include "mpi.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/sharedfp/individual/sharedfp_individual.h" /* @@ -84,14 +85,16 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file if ( amode & MPI_MODE_WRONLY || amode & MPI_MODE_RDWR ) { wronly_flag=true; if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_component_file_query: " - "MPI_MODE_WRONLY[true=%d,false=%d]=%d\n",true,false,wronly_flag); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_component_file_query: " + "MPI_MODE_WRONLY[true=%d,false=%d]=%d\n",true,false,wronly_flag); } } else { wronly_flag=false; if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_component_file_query: Can not run!, " - "MPI_MODE_WRONLY[true=%d,false=%d]=%d\n",true,false,wronly_flag); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_component_file_query: Can not run!, " + "MPI_MODE_WRONLY[true=%d,false=%d]=%d\n",true,false,wronly_flag); } } @@ -102,27 +105,30 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file valuelen = MPI_MAX_INFO_VAL; ompi_info_get ( info,"OMPIO_SHAREDFP_RELAXED_ORDERING", valuelen, value, &flag); if ( flag ) { - if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_component_file_query: " - "OMPIO_SHAREDFP_RELAXED_ORDERING=%s\n",value); + if ( mca_sharedfp_individual_verbose ) { + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_component_file_query: " + "OMPIO_SHAREDFP_RELAXED_ORDERING=%s\n",value); } /* flag - Returns true if key defined, false if not (boolean). */ relaxed_order_flag=true; - } - else { - if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_component_file_query: " - "OMPIO_SHAREDFP_RELAXED_ORDERING MPI_Info key not set. " - "Set this key in order to increase this component's priority value.\n"); + } + else { + if ( mca_sharedfp_individual_verbose ) { + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_component_file_query: " + "OMPIO_SHAREDFP_RELAXED_ORDERING MPI_Info key not set. " + "Set this key in order to increase this component's priority value.\n"); } } } else { if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_component_file_query: " - "OMPIO_SHAREDFP_RELAXED_ORDERING MPI_Info key not set, " - "got MPI_INFO_NULL. Set this key in order to increase " - "this component's priority value.\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_component_file_query: " + "OMPIO_SHAREDFP_RELAXED_ORDERING MPI_Info key not set, " + "got MPI_INFO_NULL. Set this key in order to increase " + "this component's priority value.\n"); } } diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c b/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c index 4e7c3c785db..70a85441934 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/io/ompio/io_ompio.h" #include @@ -55,8 +56,8 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh headnode = (mca_sharedfp_individual_header_record*)sh->selected_module_data; if ( NULL == headnode) { - opal_output(0, "sharedfp_individual_collaborate_data: headnode is NULL but file is open\n"); - return OMPI_ERROR; + opal_output(0, "sharedfp_individual_collaborate_data: headnode is NULL but file is open\n"); + return OMPI_ERROR; } /* Number of nodes on each process is the sum of records @@ -65,7 +66,8 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh nodesoneachprocess = headnode->numofrecordsonfile + headnode->numofrecords; if ( mca_sharedfp_individual_verbose ) { - printf("Nodes of each process = %d\n",nodesoneachprocess); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Nodes of each process = %d\n",nodesoneachprocess); } countbuff = (int*)malloc(size * sizeof(int)); @@ -93,7 +95,7 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh if ( mca_sharedfp_individual_verbose) { for (i = 0; i < size ; i++) { - printf("sharedfp_individual_collaborate_data: Countbuff[%d] = %d\n", i, countbuff[i]); + opal_output(ompi_sharedfp_base_framework.framework_output,"sharedfp_individual_collaborate_data: Countbuff[%d] = %d\n", i, countbuff[i]); } } @@ -106,8 +108,9 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh for(i = 0; i < size; i++) { displ[i] = totalnodes; if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_collaborate_data: displ[%d] = %d\n",i,displ[i]); - } + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_collaborate_data: displ[%d] = %d\n",i,displ[i]); + } totalnodes = totalnodes + countbuff[i]; } @@ -156,10 +159,11 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh idx = mca_sharedfp_individual_getoffset(ind_ts[i],timestampbuff,totalnodes); if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_collaborate_data: Process %d writing %ld bytes to main file \n", - rank,ind_recordlength[i]); - } - + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_collaborate_data: Process %d writing %ld bytes to main file \n", + rank,ind_recordlength[i]); + } + /*Write into main data file*/ ompio_io_ompio_file_write_at( sh->sharedfh, offsetbuff[idx], buff, ind_recordlength[i], MPI_BYTE, &status); @@ -212,7 +216,7 @@ int mca_sharedfp_individual_get_timestamps_and_reclengths ( double **buff, long currnode = headnode->next; if ( mca_sharedfp_individual_verbose ) { - printf("Num is %d\n",num); + opal_output(ompi_sharedfp_base_framework.framework_output,"Num is %d\n",num); } if ( 0 == num ) { @@ -235,8 +239,9 @@ int mca_sharedfp_individual_get_timestamps_and_reclengths ( double **buff, long } if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_get_timestamps_and_reclengths: Numofrecords on file %d\n", - headnode->numofrecordsonfile); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_get_timestamps_and_reclengths: Numofrecords on file %d\n", + headnode->numofrecordsonfile); } if (headnode->numofrecordsonfile > 0) { @@ -252,9 +257,10 @@ int mca_sharedfp_individual_get_timestamps_and_reclengths ( double **buff, long metaoffset = metaoffset + sizeof(struct mca_sharedfp_individual_record2); - if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_get_timestamps_and_reclengths: Ctr = %d\n",ctr); - } + if ( mca_sharedfp_individual_verbose ) { + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_get_timestamps_and_reclengths: Ctr = %d\n",ctr); + } ctr++; } @@ -266,9 +272,9 @@ int mca_sharedfp_individual_get_timestamps_and_reclengths ( double **buff, long /* Add the records from the linked list */ currnode = headnode->next; while (currnode) { - if ( mca_sharedfp_individual_verbose ) { - printf("Ctr = %d\n",ctr); - } + if ( mca_sharedfp_individual_verbose ) { + opal_output(ompi_sharedfp_base_framework.framework_output,"Ctr = %d\n",ctr); + } /* Some error over here..need to check this code again */ /*while(headnode->next != NULL)*/ @@ -279,9 +285,10 @@ int mca_sharedfp_individual_get_timestamps_and_reclengths ( double **buff, long ctr = ctr + 1; headnode->next = currnode->next; - if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_get_timestamps_and_reclengths: node deleted from the metadatalinked list\n"); - } + if ( mca_sharedfp_individual_verbose ) { + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_get_timestamps_and_reclengths: node deleted from the metadatalinked list\n"); + } free(currnode); currnode = headnode->next; diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c index a0d33fe7a61..28a40ced62a 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -79,7 +79,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, /* NOTE: Open the data file without shared file pointer */ /*--------------------------------------------------------*/ if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_file_open: open data file.\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_file_open: open data file.\n"); } /* data filename created by appending .data.$rank to the original filename*/ @@ -104,7 +105,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, /* NOTE: Open the meta file without shared file pointer */ /*----------------------------------------------------------*/ if ( mca_sharedfp_individual_verbose ) { - printf("mca_sharedfp_individual_file_open: metadata file.\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_individual_file_open: metadata file.\n"); } /* metadata filename created by appending .metadata.$rank to the original filename*/ @@ -160,7 +162,8 @@ int mca_sharedfp_individual_file_close (mca_io_ompio_file_t *fh) if ( NULL == fh->f_sharedfp_data ){ if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_inidividual_file_close - shared file pointer structure not initialized\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_inidividual_file_close - shared file pointer structure not initialized\n"); } return OMPI_SUCCESS; } diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c b/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c index cffba81bc91..72566efe78f 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" #include #include @@ -44,8 +45,9 @@ int mca_sharedfp_individual_insert_metadata(int functype,long recordlength,struc if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_insert_metadata: Headnode->numofrecords = %d\n", - headnode->numofrecords); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_insert_metadata: Headnode->numofrecords = %d\n", + headnode->numofrecords); } /* Check if the maximum limit is reached for the records in the linked list*/ if (headnode->numofrecords == MAX_METADATA_RECORDS) { @@ -113,12 +115,17 @@ int mca_sharedfp_individual_write_metadata_file(struct mca_sharedfp_base_data_t buff.recordlength = current->recordlength; if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_write_metadata_file: Buff recordid %ld\n",buff.recordid); - printf("sharedfp_individual_write_metadata_file: Buff timestamp %f\n", buff.timestamp); - printf("sharedfp_individual_write_metadata_file: Buff localposition %lld\n",buff.localposition); - printf("sharedfp_individual_write_metadata_file: Buff recordlength %ld\n",buff.recordlength); - printf("sharedfp_individual_write_metadata_file: Size of buff %ld\n",sizeof(buff)); - } + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_write_metadata_file: Buff recordid %ld\n",buff.recordid); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_write_metadata_file: Buff timestamp %f\n", buff.timestamp); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_write_metadata_file: Buff localposition %lld\n",buff.localposition); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_write_metadata_file: Buff recordlength %ld\n",buff.recordlength); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_individual_write_metadata_file: Size of buff %ld\n",sizeof(buff)); + } headnode->next = current->next; free(current); diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_read.c b/ompi/mca/sharedfp/individual/sharedfp_individual_read.c index 27446002f45..42203a9fc11 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_read.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_read.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_individual_read ( mca_io_ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c index 7a90b2cf766..5666fb28e4f 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh, void *buf, @@ -40,7 +41,7 @@ int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data ) { if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_write: opening the shared file pointer file\n"); + opal_output(ompi_sharedfp_base_framework.framework_output,"sharedfp_individual_write: opening the shared file pointer file\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -104,7 +105,8 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_individual_verbose ) { - printf("sharedfp_individual_write_ordered - opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, +"sharedfp_individual_write_ordered - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c index c21e8e15ba2..441457e59dd 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c @@ -9,7 +9,9 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -71,13 +73,15 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, /*Open a new file which will maintain the pointer for this file open*/ if ( mca_sharedfp_lockedfile_verbose ) { - printf("mca_sharedfp_lockedfile_file_open: open locked file.\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_lockedfile_file_open: open locked file.\n"); } module_data = (struct mca_sharedfp_lockedfile_data*)malloc(sizeof(struct mca_sharedfp_lockedfile_data)); if ( NULL == module_data ) { - printf("mca_sharedfp_lockedfile_file_open: Error, unable to malloc lockedfile_data struct\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_lockedfile_file_open: Error, unable to malloc lockedfile_data struct\n"); free (shfileHandle); free (sh); return OMPI_ERR_OUT_OF_RESOURCE; @@ -103,7 +107,7 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, handle = open ( lockedfilename, O_RDWR, 0644 ); if ( -1 == handle ) { - printf("[%d]mca_sharedfp_lockedfile_file_open: Error during file open\n", rank); + opal_output(0, "[%d]mca_sharedfp_lockedfile_file_open: Error during file open\n", rank); free (shfileHandle); free (sh); free(module_data); @@ -132,7 +136,7 @@ int mca_sharedfp_lockedfile_file_close (mca_io_ompio_file_t *fh) if ( fh->f_sharedfp_data==NULL){ /* Can happen with lazy_open being set */ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_file_close - shared file pointer structure not initialized\n"); + opal_output(0, "sharedfp_lockedfile_file_close - shared file pointer structure not initialized\n"); } return OMPI_SUCCESS; } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c index 745e0a66263..65cb4b17ff1 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) @@ -37,7 +38,8 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, if ( fh->f_sharedfp_data == NULL ) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -57,7 +59,8 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, bytesRequested = count * numofBytes; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read: Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read: Bytes Requested is %ld\n",bytesRequested); } /*Retrieve the shared file data struct*/ @@ -67,7 +70,8 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset); if (-1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read: Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read: Offset received is %lld\n",offset); } /* Read the file */ @@ -98,7 +102,8 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, if ( fh->f_sharedfp_data == NULL){ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -144,7 +149,8 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered: Bytes requested are %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered: Bytes requested are %ld\n",bytesRequested); } } @@ -159,7 +165,8 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; @@ -177,7 +184,8 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, offset = offsetBuff - sendBuff; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_read_ordered: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_read_ordered: Offset returned is %lld\n",offset); } /* read to the file */ diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_request_position.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_request_position.c index 3420712b3b4..8edfa2bf8c3 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_request_position.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_request_position.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" /*Use fcntl to lock the hidden file which stores the current position*/ #include @@ -62,13 +63,14 @@ int mca_sharedfp_lockedfile_request_position(struct mca_sharedfp_base_data_t * s /* Aquire an exclusive lock */ if (fcntl(fd, F_SETLKW, &fl) == -1) { - printf("sharedfp_lockedfile_request_position: errorr acquiring lock: fcntl(%d,F_SETLKW,&fl)\n",fd); - printf("sharedfp_lockedfile_request_position: error(%i): %s", errno, strerror(errno)); + opal_output(0,"sharedfp_lockedfile_request_position: errorr acquiring lock: fcntl(%d,F_SETLKW,&fl)\n",fd); + opal_output(0,"sharedfp_lockedfile_request_position: error(%i): %s", errno, strerror(errno)); return OMPI_ERROR; } else{ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_request_position: Success: acquired lock.for fd: %d\n",fd); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_request_position: Success: acquired lock.for fd: %d\n",fd); } } @@ -76,14 +78,16 @@ int mca_sharedfp_lockedfile_request_position(struct mca_sharedfp_base_data_t * s lseek ( fd, 0, SEEK_SET ); read ( fd, &buf, sizeof(OMPI_MPI_OFFSET_TYPE)); if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_request_position: Read last_offset=%lld! ret=%d\n",buf, ret); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_request_position: Read last_offset=%lld! ret=%d\n",buf, ret); } /* increment the position */ position = buf + bytes_requested; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_request_position: old_offset=%lld, bytes_requested=%d, new offset=%lld!\n", - buf,bytes_requested,position); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_request_position: old_offset=%lld, bytes_requested=%d, new offset=%lld!\n", + buf,bytes_requested,position); } /* write to the file */ @@ -92,7 +96,8 @@ int mca_sharedfp_lockedfile_request_position(struct mca_sharedfp_base_data_t * s /* unlock the file */ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_request_position: Releasing lock..."); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_request_position: Releasing lock..."); } /* NOTE: We thought we could reuse the flock struct @@ -108,13 +113,14 @@ int mca_sharedfp_lockedfile_request_position(struct mca_sharedfp_base_data_t * s fl.l_pid = getpid(); if (fcntl(fd, F_SETLK, &fl) == -1) { - printf("sharedfp_lockedfile_request_position:failed to release lock for fd: %d\n",fd); - printf("error(%i): %s", errno, strerror(errno)); + opal_output(0,"sharedfp_lockedfile_request_position:failed to release lock for fd: %d\n",fd); + opal_output(0,"error(%i): %s", errno, strerror(errno)); return OMPI_ERROR; } else { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_request_position: released lock.for fd: %d\n",fd); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_request_position: released lock.for fd: %d\n",fd); } } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c index 1cfdce9ead2..8e7ebb1331f 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c @@ -140,7 +140,8 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh, *-------------------- */ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_seek: Releasing lock..."); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_seek: Releasing lock..."); } fl.l_type = F_UNLCK; /* set to unlock same region */ fl.l_whence = SEEK_SET; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c index 22c89251084..e504f998bfa 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, void *buf, @@ -40,7 +41,8 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data ){ if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write - opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -59,7 +61,8 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, opal_datatype_type_size( &datatype->super, &numofBytes); bytesRequested = count * numofBytes; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write: Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write: Bytes Requested is %ld\n",bytesRequested); } /*Retrieve the shared file data struct*/ @@ -69,7 +72,8 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, ret = mca_sharedfp_lockedfile_request_position ( sh, bytesRequested, &offset); if (-1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write: Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write: Offset received is %lld\n",offset); } /* Write to the file */ ret = ompio_io_ompio_file_write_at ( sh->sharedfh, offset, buf, count, datatype, status); @@ -100,7 +104,8 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data ) { if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered - opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -147,7 +152,8 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, for ( i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered: Bytes requested are %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered: Bytes requested are %ld\n",bytesRequested); } } @@ -162,7 +168,8 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; for (i = 1 ; i < size; i++) { @@ -182,7 +189,8 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, offset = offsetBuff - sendBuff; if ( mca_sharedfp_lockedfile_verbose ) { - printf("sharedfp_lockedfile_write_ordered: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_lockedfile_write_ordered: Offset returned is %lld\n",offset); } /* write to the file */ diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c index c6916e9a4e6..599c4d35d78 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c @@ -77,7 +77,8 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /*Memory is allocated here for the sh structure*/ if ( mca_sharedfp_sm_verbose ) { - printf( "mca_sharedfp_sm_file_open: malloc f_sharedfp_ptr struct\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_file_open: malloc f_sharedfp_ptr struct\n"); } sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t)); @@ -97,7 +98,8 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /*Open a shared memory segment which will hold the shared file pointer*/ if ( mca_sharedfp_sm_verbose ) { - printf( "mca_sharedfp_sm_file_open: allocatge shared memory segment.\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_file_open: allocatge shared memory segment.\n"); } @@ -133,7 +135,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if ( sm_fd == -1){ /*error opening file*/ - printf("mca_sharedfp_sm_file_open: Error, unable to open file for mmap: %s\n",sm_filename); + opal_output(0,"mca_sharedfp_sm_file_open: Error, unable to open file for mmap: %s\n",sm_filename); free(sm_filename); free(sm_data); free(sh); @@ -158,8 +160,8 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, if ( sm_offset_ptr==MAP_FAILED){ err = OMPI_ERROR; - printf("mca_sharedfp_sm_file_open: Error, unable to mmap file: %s\n",sm_filename); - printf("%s\n", strerror(errno)); + opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to mmap file: %s\n",sm_filename); + opal_output(0, "%s\n", strerror(errno)); free(sm_filename); free(sm_data); free(sh); @@ -219,7 +221,8 @@ int mca_sharedfp_sm_file_close (mca_io_ompio_file_t *fh) if( NULL == fh->f_sharedfp_data ){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_file_close: shared file pointer structure not initialized\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_file_close: shared file pointer structure not initialized\n"); } return OMPI_SUCCESS; } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index c2e78126639..7a82f5839fa 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 201302915 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -65,7 +65,8 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_iread: Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_iread: Bytes Requested is %ld\n",bytesRequested); } /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c index 5b02d81b018..d49ffae4251 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) @@ -37,7 +38,8 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read - opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_read - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -60,7 +62,8 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read: Bytes Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_read: Bytes Requested is %ld\n",bytesRequested); } /*Request the offset to write bytesRequested bytes*/ @@ -68,7 +71,8 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read: Offset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_read: Offset received is %lld\n",offset); } /* Read the file */ @@ -99,7 +103,8 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_read_ordered: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_read_ordered: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -145,7 +150,8 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered: Bytes requested are %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_read_ordered: Bytes requested are %ld\n",bytesRequested); } } @@ -160,7 +166,8 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_read_ordered: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; @@ -180,7 +187,8 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; if ( mca_sharedfp_sm_verbose ) { - printf("mca_sharedfp_sm_read_ordered: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "mca_sharedfp_sm_read_ordered: Offset returned is %lld\n",offset); } /* read to the file */ diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c b/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c index 68c291b83e3..0764f46ec37 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c @@ -25,6 +25,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" /*use a semaphore to lock the shared memory*/ #include @@ -42,7 +43,8 @@ int mca_sharedfp_sm_request_position(struct mca_sharedfp_base_data_t * sh, *offset = 0; if ( mca_sharedfp_sm_verbose ) { - printf("Aquiring lock, rank=%d...",rank); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Aquiring lock, rank=%d...",rank); } sm_offset_ptr = sm_data->sm_offset_ptr; @@ -52,28 +54,33 @@ int mca_sharedfp_sm_request_position(struct mca_sharedfp_base_data_t * sh, sem_wait(sm_data->mutex); if ( mca_sharedfp_sm_verbose ) { - printf("Succeeded! Acquired sm lock.for rank=%d\n",rank); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Succeeded! Acquired sm lock.for rank=%d\n",rank); } old_offset=sm_offset_ptr->offset; if ( mca_sharedfp_sm_verbose ) { - printf("Read last_offset=%lld!\n",old_offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Read last_offset=%lld!\n",old_offset); } position = old_offset + bytes_requested; if ( mca_sharedfp_sm_verbose ) { - printf("old_offset=%lld, bytes_requested=%d, new offset=%lld!\n",old_offset,bytes_requested,position); + opal_output(ompi_sharedfp_base_framework.framework_output, + "old_offset=%lld, bytes_requested=%d, new offset=%lld!\n",old_offset,bytes_requested,position); } sm_offset_ptr->offset=position; if ( mca_sharedfp_sm_verbose ) { - printf("Releasing sm lock...rank=%d",rank); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Releasing sm lock...rank=%d",rank); } sem_post(sm_data->mutex); if ( mca_sharedfp_sm_verbose ) { - printf("Released lock! released lock.for rank=%d\n",rank); + opal_output(ompi_sharedfp_base_framework.framework_output, + "Released lock! released lock.for rank=%d\n",rank); } *offset = old_offset; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c b/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c index 37cf453c30f..7284291f06d 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c @@ -25,6 +25,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" /*use a semaphore to lock the shared memory location*/ #include @@ -43,7 +44,8 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data ) { if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -69,19 +71,22 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, ret = -1; } if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_SET new_offset=%lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: MPI_SEEK_SET new_offset=%lld\n",offset); } } else if( MPI_SEEK_CUR == whence){ OMPI_MPI_OFFSET_TYPE current_position; ret = mca_sharedfp_sm_get_position ( fh, ¤t_position); if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_CUR: curr=%lld, offset=%lld, call status=%d\n", - current_position,offset,status); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: MPI_SEEK_CUR: curr=%lld, offset=%lld, call status=%d\n", + current_position,offset,status); } offset = current_position + offset; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_CUR: new_offset=%lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: MPI_SEEK_CUR: new_offset=%lld\n",offset); } if(offset < 0){ opal_output(0,"sharedfp_sm_seek - MPI_SEEK_CURE, offset must be > 0, got offset=%lld.\n",offset); @@ -94,7 +99,8 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, offset = end_position + offset; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: MPI_SEEK_END: file_get_size=%lld\n",end_position); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: MPI_SEEK_END: file_get_size=%lld\n",end_position); } if(offset < 0){ opal_output(0,"sharedfp_sm_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset); @@ -116,7 +122,8 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, /*lock the file */ /*--------------------*/ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: Aquiring lock, rank=%d...",rank); fflush(stdout); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: Aquiring lock, rank=%d...",rank); fflush(stdout); } /* Aquire an exclusive lock */ @@ -125,11 +132,13 @@ mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, sem_wait(sm_data->mutex); if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: Success! Acquired sm lock.for rank=%d\n",rank); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: Success! Acquired sm lock.for rank=%d\n",rank); } sm_offset_ptr->offset=offset; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_seek: Releasing sm lock...rank=%d",rank); fflush(stdout); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_seek: Releasing sm lock...rank=%d",rank); fflush(stdout); } sem_post(sm_data->mutex); } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c index 68b61eeac2e..4be286f53f6 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,6 +24,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/mca/sharedfp/base/base.h" int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, void *buf, @@ -40,7 +41,8 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data ){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -63,14 +65,16 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write: Requested is %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write: Requested is %ld\n",bytesRequested); } /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write: fset received is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write: fset received is %lld\n",offset); } /* Write to the file*/ @@ -103,7 +107,8 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: opening the shared file pointer\n"); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write_ordered: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -150,7 +155,8 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: Bytes requested are %ld\n",bytesRequested); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write_ordered: Bytes requested are %ld\n",bytesRequested); } } @@ -165,7 +171,8 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: Offset received is %lld\n",offsetReceived); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write_ordered: Offset received is %lld\n",offsetReceived); } buff[0] += offsetReceived; @@ -187,7 +194,8 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, offset = offsetBuff - sendBuff; if ( mca_sharedfp_sm_verbose ) { - printf("sharedfp_sm_write_ordered: Offset returned is %lld\n",offset); + opal_output(ompi_sharedfp_base_framework.framework_output, + "sharedfp_sm_write_ordered: Offset returned is %lld\n",offset); } /* write to the file */ ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset,buf,count,datatype,status); From abedcad78d838429e00fed87f8a003182593806d Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 27 Jul 2015 16:59:58 -0600 Subject: [PATCH 0161/1704] mca/base: standize MCA verbosity levels Up until this point we have had inconsistent usage for MCA verbosity levels. This commit attempts to correct this by recommending components use these standard levels: none (-1), error (0), component (10), warn (20), info (40), trace (60), debug (80), and max (100). master commit open-mpi/ompi@8cbf743cfa3d4595bcde3b8fbf1ff41154a1ca99 Signed-off-by: Nathan Hjelm --- opal/mca/base/base.h | 26 ++++++- opal/mca/base/mca_base_framework.c | 12 +++- opal/mca/base/mca_base_var.c | 9 ++- opal/mca/base/mca_base_var_enum.c | 111 ++++++++++++++++++++++++++++- opal/mca/base/mca_base_var_enum.h | 9 ++- 5 files changed, 158 insertions(+), 9 deletions(-) diff --git a/opal/mca/base/base.h b/opal/mca/base/base.h index 936f72684b9..5c501910f67 100644 --- a/opal/mca/base/base.h +++ b/opal/mca/base/base.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -69,6 +69,30 @@ OPAL_DECLSPEC extern bool mca_base_component_disable_dlopen; OPAL_DECLSPEC extern char *mca_base_system_default_path; OPAL_DECLSPEC extern char *mca_base_user_default_path; +/* + * Standard verbosity levels + */ +enum { + /** total silence */ + MCA_BASE_VERBOSE_NONE = -1, + /** only errors are printed */ + MCA_BASE_VERBOSE_ERROR = 0, + /** emit messages about component selection, open, and unloading */ + MCA_BASE_VERBOSE_COMPONENT = 10, + /** also emit warnings */ + MCA_BASE_VERBOSE_WARN = 20, + /** also emit general, user-relevant information, such as rationale as to why certain choices + * or code paths were taken, information gleaned from probing the local system, etc. */ + MCA_BASE_VERBOSE_INFO = 40, + /** also emit relevant tracing information (e.g., which functions were invoked / + * call stack entry/exit info) */ + MCA_BASE_VERBOSE_TRACE = 60, + /** also emit Open MPI-developer-level (i.e,. highly detailed) information */ + MCA_BASE_VERBOSE_DEBUG = 80, + /** also output anything else that might be useful */ + MCA_BASE_VERBOSE_MAX = 100, +}; + /* * Public functions */ diff --git a/opal/mca/base/mca_base_framework.c b/opal/mca/base/mca_base_framework.c index 2fd9662c78f..40953dcbfc2 100644 --- a/opal/mca/base/mca_base_framework.c +++ b/opal/mca/base/mca_base_framework.c @@ -92,10 +92,16 @@ int mca_base_framework_register (struct mca_base_framework_t *framework, } /* register a verbosity variable for this framework */ - asprintf (&desc, "Verbosity level for the %s framework (0 = no verbosity)", - framework->framework_name); + ret = asprintf (&desc, "Verbosity level for the %s framework (default: 0)", + framework->framework_name); + if (0 > ret) { + return OPAL_ERR_OUT_OF_RESOURCE; + } + + framework->framework_verbose = MCA_BASE_VERBOSE_ERROR; ret = mca_base_framework_var_register (framework, "verbose", desc, - MCA_BASE_VAR_TYPE_INT, NULL, 0, + MCA_BASE_VAR_TYPE_INT, + &mca_base_var_enum_verbose, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_LOCAL, diff --git a/opal/mca/base/mca_base_var.c b/opal/mca/base/mca_base_var.c index f2a6f7a406f..e60c5b05681 100644 --- a/opal/mca/base/mca_base_var.c +++ b/opal/mca/base/mca_base_var.c @@ -852,7 +852,7 @@ int mca_base_var_deregister(int vari) var->mbv_storage->stringval) { free (var->mbv_storage->stringval); var->mbv_storage->stringval = NULL; - } else if (MCA_BASE_VAR_TYPE_BOOL != var->mbv_type && NULL != var->mbv_enumerator) { + } else if (var->mbv_enumerator && !var->mbv_enumerator->enum_is_static) { OBJ_RELEASE(var->mbv_enumerator); } @@ -1486,7 +1486,9 @@ static int register_variable (const char *project_name, const char *framework_na OBJ_RELEASE (var->mbv_enumerator); } - OBJ_RETAIN(enumerator); + if (!enumerator->enum_is_static) { + OBJ_RETAIN(enumerator); + } } var->mbv_enumerator = enumerator; @@ -1847,7 +1849,7 @@ static void var_destructor(mca_base_var_t *var) } /* don't release the boolean enumerator */ - if (MCA_BASE_VAR_TYPE_BOOL != var->mbv_type && NULL != var->mbv_enumerator) { + if (var->mbv_enumerator && !var->mbv_enumerator->enum_is_static) { OBJ_RELEASE(var->mbv_enumerator); } @@ -1860,6 +1862,7 @@ static void var_destructor(mca_base_var_t *var) if (NULL != var->mbv_long_name) { free(var->mbv_long_name); } + if (NULL != var->mbv_description) { free(var->mbv_description); } diff --git a/opal/mca/base/mca_base_var_enum.c b/opal/mca/base/mca_base_var_enum.c index 6eddd3451d2..23741e76d9e 100644 --- a/opal/mca/base/mca_base_var_enum.c +++ b/opal/mca/base/mca_base_var_enum.c @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights + * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -23,6 +23,7 @@ #include "opal_config.h" #include "opal/mca/base/mca_base_var_enum.h" +#include "opal/mca/base/base.h" #include #include @@ -33,6 +34,10 @@ static void mca_base_var_enum_destructor (mca_base_var_enum_t *enumerator); OBJ_CLASS_INSTANCE(mca_base_var_enum_t, opal_object_t, mca_base_var_enum_constructor, mca_base_var_enum_destructor); +static int enum_dump (mca_base_var_enum_t *self, char **out); +static int enum_get_count (mca_base_var_enum_t *self, int *count); +static int enum_get_value (mca_base_var_enum_t *self, int index, int *value, const char **string_value); + static int mca_base_var_enum_bool_get_count (mca_base_var_enum_t *enumerator, int *count) { *count = 2; @@ -97,6 +102,7 @@ static int mca_base_var_enum_bool_dump (mca_base_var_enum_t *self, char **out) mca_base_var_enum_t mca_base_var_enum_bool = { .super = OPAL_OBJ_STATIC_INIT(opal_object_t), + .enum_is_static = true, .enum_name = "boolean", .get_count = mca_base_var_enum_bool_get_count, .get_value = mca_base_var_enum_bool_get_value, @@ -105,6 +111,108 @@ mca_base_var_enum_t mca_base_var_enum_bool = { .dump = mca_base_var_enum_bool_dump }; +/* verbosity enumerator */ +static mca_base_var_enum_value_t verbose_values[] = { + {MCA_BASE_VERBOSE_NONE, "none"}, + {MCA_BASE_VERBOSE_ERROR, "error"}, + {MCA_BASE_VERBOSE_COMPONENT, "component"}, + {MCA_BASE_VERBOSE_WARN, "warn"}, + {MCA_BASE_VERBOSE_INFO, "info"}, + {MCA_BASE_VERBOSE_TRACE, "trace"}, + {MCA_BASE_VERBOSE_DEBUG, "debug"}, + {MCA_BASE_VERBOSE_MAX, "max"}, + {-1, NULL} +}; + +static int mca_base_var_enum_verbose_vfs (mca_base_var_enum_t *self, const char *string_value, + int *value) +{ + char *tmp; + int v; + + /* skip whitespace */ + string_value += strspn (string_value, " \t\n\v\f\r"); + + v = strtol (string_value, &tmp, 10); + if (*tmp != '\0') { + for (int i = 0 ; verbose_values[i].string ; ++i) { + if (0 == strcmp (verbose_values[i].string, string_value)) { + *value = verbose_values[i].value; + return OPAL_SUCCESS; + } + } + + return OPAL_ERR_NOT_FOUND; + } else if (v < MCA_BASE_VERBOSE_NONE) { + v = MCA_BASE_VERBOSE_NONE; + } else if (v > MCA_BASE_VERBOSE_MAX) { + v = MCA_BASE_VERBOSE_MAX; + } + + *value = v; + + return OPAL_SUCCESS; +} + +static int mca_base_var_enum_verbose_sfv (mca_base_var_enum_t *self, const int value, + const char **string_value) +{ + static char buffer[4]; + + if (value < 0 || value > 100) { + return OPAL_ERR_VALUE_OUT_OF_BOUNDS; + } + + for (int i = 0 ; verbose_values[i].string ; ++i) { + if (verbose_values[i].value == value) { + *string_value = verbose_values[i].string; + return OPAL_SUCCESS; + } + } + + snprintf (buffer, 4, "%d", value); + if (string_value) { + *string_value = buffer; + } + + return OPAL_SUCCESS; +} + +static int mca_base_var_enum_verbose_dump (mca_base_var_enum_t *self, char **out) +{ + char *tmp; + int ret; + + ret = enum_dump (self, out); + if (OPAL_SUCCESS != ret) { + return ret; + } + + ret = asprintf (&tmp, "%s, 0 - 100", *out); + free (*out); + if (0 > ret) { + *out = NULL; + return OPAL_ERR_OUT_OF_RESOURCE; + } + + *out = tmp; + + return OPAL_SUCCESS; +} + +mca_base_var_enum_t mca_base_var_enum_verbose = { + .super = OPAL_OBJ_STATIC_INIT(opal_object_t), + .enum_is_static = true, + .enum_name = "verbosity", + .get_count = enum_get_count, + .get_value = enum_get_value, + .value_from_string = mca_base_var_enum_verbose_vfs, + .string_from_value = mca_base_var_enum_verbose_sfv, + .dump = mca_base_var_enum_verbose_dump, + .enum_value_count = 8, + .enum_values = verbose_values, +}; + int mca_base_var_enum_create (const char *name, const mca_base_var_enum_value_t *values, mca_base_var_enum_t **enumerator) { @@ -264,6 +372,7 @@ static void mca_base_var_enum_constructor (mca_base_var_enum_t *enumerator) enumerator->value_from_string = enum_value_from_string; enumerator->string_from_value = enum_string_from_value; enumerator->dump = enum_dump; + enumerator->enum_is_static = false; } static void mca_base_var_enum_destructor (mca_base_var_enum_t *enumerator) diff --git a/opal/mca/base/mca_base_var_enum.h b/opal/mca/base/mca_base_var_enum.h index a4cf7d312e3..66a4a5e6c35 100644 --- a/opal/mca/base/mca_base_var_enum.h +++ b/opal/mca/base/mca_base_var_enum.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -106,6 +106,9 @@ typedef struct mca_base_var_enum_value_t mca_base_var_enum_value_t; struct mca_base_var_enum_t { opal_object_t super; + /** Is the enumerator statically allocated */ + bool enum_is_static; + /** Name of this enumerator. This value is duplicated from the argument provided to mca_base_var_enum_create() */ char *enum_name; @@ -176,5 +179,9 @@ OPAL_DECLSPEC int mca_base_var_enum_create (const char *name, const mca_base_var */ extern mca_base_var_enum_t mca_base_var_enum_bool; +/** + * Verbosity level enumerator + */ +extern mca_base_var_enum_t mca_base_var_enum_verbose; #endif /* !defined(MCA_BASE_VAR_ENUM_H) */ From d1972b906ccafce815c10507f85fcbb4ed66ff9a Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 27 Jul 2015 17:07:10 -0600 Subject: [PATCH 0162/1704] bml/r2: use the bml framework output and set verbosity level to info master commit open-mpi/ompi@2f447b2c4c452e7a2a91549117573cfdb07c0897 Signed-off-by: Nathan Hjelm --- ompi/mca/bml/r2/bml_r2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mca/bml/r2/bml_r2.c b/ompi/mca/bml/r2/bml_r2.c index ca3d2acfaa9..a836decb1ca 100644 --- a/ompi/mca/bml/r2/bml_r2.c +++ b/ompi/mca/bml/r2/bml_r2.c @@ -284,7 +284,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, /* skip this btl if the exclusivity is less than the previous only if the btl does not provide full rdma (for one-sided) */ if(bml_btl->btl->btl_exclusivity > btl->btl_exclusivity && ((btl_flags & MCA_BTL_FLAGS_RDMA) != MCA_BTL_FLAGS_RDMA)) { btl->btl_del_procs(btl, 1, (opal_proc_t**)&proc, &btl_endpoints[p]); - opal_output_verbose(20, opal_btl_base_framework.framework_output, + opal_output_verbose(MCA_BASE_VERBOSE_INFO, ompi_bml_base_framework.framework_output, "mca: bml: Not using %s btl to %s on node %s " "because %s btl has higher exclusivity (%d > %d)", btl->btl_component->btl_version.mca_component_name, @@ -295,7 +295,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, continue; } } - opal_output_verbose(1, opal_btl_base_framework.framework_output, + opal_output_verbose(MCA_BASE_VERBOSE_INFO, ompi_bml_base_framework.framework_output, "mca: bml: Using %s btl to %s on node %s", btl->btl_component->btl_version.mca_component_name, OMPI_NAME_PRINT(&proc->super.proc_name), From 1055d5435c44184916376bcb21291d68dc1b77df Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 17 Aug 2015 10:16:25 -0600 Subject: [PATCH 0163/1704] mca/base: use standard verbosity levels master commit open-mpi/ompi@0a968de53f9ac224d0e1ceedd62471dd96e0b7f4 Signed-off-by: Nathan Hjelm --- opal/mca/base/mca_base_component_find.c | 26 ++++++------ opal/mca/base/mca_base_component_repository.c | 14 +++---- opal/mca/base/mca_base_components_close.c | 14 +++---- opal/mca/base/mca_base_components_open.c | 39 +++++++++--------- opal/mca/base/mca_base_components_register.c | 37 ++++++++--------- opal/mca/base/mca_base_components_select.c | 40 ++++++++++--------- opal/mca/base/mca_base_open.c | 2 +- 7 files changed, 89 insertions(+), 83 deletions(-) diff --git a/opal/mca/base/mca_base_component_find.c b/opal/mca/base/mca_base_component_find.c index 67e6d14853c..32cdbb9b27b 100644 --- a/opal/mca/base/mca_base_component_find.c +++ b/opal/mca/base/mca_base_component_find.c @@ -14,6 +14,8 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -133,8 +135,8 @@ int mca_base_component_find (const char *directory, mca_base_framework_t *framew find_dyn_components(directory, framework, (const char**)requested_component_names, include_mode); } else { - opal_output_verbose(40, 0, - "mca: base: component_find: dso loading for %s MCA components disabled", + opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, + "mca: base: component_find: dso loading for %s MCA components disabled", framework->framework_name); } #endif @@ -193,11 +195,11 @@ int mca_base_components_filter (mca_base_framework_t *framework, uint32_t filter if (!can_use || (filter_flags & dummy->data.param_field) != filter_flags) { if (can_use && (filter_flags & MCA_BASE_METADATA_PARAM_CHECKPOINT) && !(MCA_BASE_METADATA_PARAM_CHECKPOINT & dummy->data.param_field)) { - opal_output_verbose(10, output_id, - "mca: base: components_filter: " - "(%s) Component %s is *NOT* Checkpointable - Disabled", - component->reserved, - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_filter: " + "(%s) Component %s is *NOT* Checkpointable - Disabled", + component->reserved, + component->mca_component_name); } opal_list_remove_item (components, &cli->super); @@ -206,11 +208,11 @@ int mca_base_components_filter (mca_base_framework_t *framework, uint32_t filter OBJ_RELEASE(cli); } else if (filter_flags & MCA_BASE_METADATA_PARAM_CHECKPOINT) { - opal_output_verbose(10, output_id, - "mca: base: components_filter: " - "(%s) Component %s is Checkpointable", - component->reserved, - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_filter: " + "(%s) Component %s is Checkpointable", + component->reserved, + component->mca_component_name); } } diff --git a/opal/mca/base/mca_base_component_repository.c b/opal/mca/base/mca_base_component_repository.c index fc618ce0be8..e4eda78bdb6 100644 --- a/opal/mca/base/mca_base_component_repository.c +++ b/opal/mca/base/mca_base_component_repository.c @@ -314,10 +314,10 @@ int mca_base_component_repository_open (mca_base_framework_t *framework, char *struct_name = NULL; int vl, ret; - opal_output_verbose(40, 0, "mca_base_component_repository_open: examining dynamic %s MCA component \"%s\" at path %s", - ri->ri_type, ri->ri_name, ri->ri_path); + opal_output_verbose(MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: examining dynamic " + "%s MCA component \"%s\" at path %s", ri->ri_type, ri->ri_name, ri->ri_path); - vl = mca_base_component_show_load_errors ? 0 : 40; + vl = mca_base_component_show_load_errors ? MCA_BASE_VERBOSE_ERROR : MCA_BASE_VERBOSE_INFO; /* Ensure that this component is not already loaded (should only happen if it was statically loaded). It's an error if it's already @@ -327,7 +327,7 @@ int mca_base_component_repository_open (mca_base_framework_t *framework, OPAL_LIST_FOREACH(mitem, &framework->framework_components, mca_base_component_list_item_t) { if (0 == strcmp(mitem->cli_component->mca_component_name, ri->ri_name)) { - opal_output_verbose(40, 0, "mca_base_component_repository_open: already loaded (ignored)"); + opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: already loaded (ignored)"); return OPAL_ERR_BAD_PARAM; } } @@ -336,7 +336,7 @@ int mca_base_component_repository_open (mca_base_framework_t *framework, mitem = NULL; if (NULL != ri->ri_dlhandle) { - opal_output_verbose(40, 0, "mca_base_component_repository_open: already loaded. returning cached component"); + opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: already loaded. returning cached component"); mitem = OBJ_NEW(mca_base_component_list_item_t); if (NULL == mitem) { return OPAL_ERR_OUT_OF_RESOURCE; @@ -445,8 +445,8 @@ int mca_base_component_repository_open (mca_base_framework_t *framework, ri->ri_component_struct = mitem->cli_component = component_struct; opal_list_append(&framework->framework_components, &mitem->super); - opal_output_verbose(40, 0, "mca_base_component_repository_open: opened dynamic %s MCA component \"%s\"", - ri->ri_type, ri->ri_name); + opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: opened dynamic %s MCA " + "component \"%s\"", ri->ri_type, ri->ri_name); return OPAL_SUCCESS; } while (0); diff --git a/opal/mca/base/mca_base_components_close.c b/opal/mca/base/mca_base_components_close.c index ed0fd380cbc..7cc0a42a191 100644 --- a/opal/mca/base/mca_base_components_close.c +++ b/opal/mca/base/mca_base_components_close.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -33,9 +33,9 @@ void mca_base_component_unload (const mca_base_component_t *component, int outpu int ret; /* Unload */ - opal_output_verbose(10, output_id, - "mca: base: close: unloading component %s", - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: close: unloading component %s", + component->mca_component_name); ret = mca_base_var_group_find (component->mca_project_name, component->mca_type_name, component->mca_component_name); @@ -51,9 +51,9 @@ void mca_base_component_close (const mca_base_component_t *component, int output /* Close */ if (NULL != component->mca_close_component) { component->mca_close_component(); - opal_output_verbose(10, output_id, - "mca: base: close: component %s closed", - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: close: component %s closed", + component->mca_component_name); } mca_base_component_unload (component, output_id); diff --git a/opal/mca/base/mca_base_components_open.c b/opal/mca/base/mca_base_components_open.c index 76475333003..89303440df2 100644 --- a/opal/mca/base/mca_base_components_open.c +++ b/opal/mca/base/mca_base_components_open.c @@ -109,26 +109,26 @@ static int open_components(mca_base_framework_t *framework) } /* Announce */ - opal_output_verbose(10, output_id, "mca: base: components_open: opening %s components", - framework->framework_name); - + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_open: opening %s components", + framework->framework_name); + /* Traverse the list of components */ OPAL_LIST_FOREACH_SAFE(cli, next, components, mca_base_component_list_item_t) { const mca_base_component_t *component = cli->cli_component; - - opal_output_verbose(10, output_id, - "mca: base: components_open: found loaded component %s", - component->mca_component_name); + + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_open: found loaded component %s", + component->mca_component_name); if (NULL != component->mca_open_component) { /* Call open if register didn't call it already */ ret = component->mca_open_component(); if (OPAL_SUCCESS == ret) { - opal_output_verbose(10, output_id, - "mca: base: components_open: " - "component %s open function successful", - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_open: " + "component %s open function successful", + component->mca_component_name); } else { if (OPAL_ERR_NOT_AVAILABLE != ret) { /* If the component returns OPAL_ERR_NOT_AVAILABLE, @@ -143,15 +143,16 @@ static int open_components(mca_base_framework_t *framework) expected. */ if (mca_base_component_show_load_errors) { - opal_output(0, "mca: base: components_open: " - "component %s / %s open function failed", - component->mca_type_name, - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id, + "mca: base: components_open: component %s " + "/ %s open function failed", + component->mca_type_name, + component->mca_component_name); } - opal_output_verbose(10, output_id, - "mca: base: components_open: " - "component %s open function failed", - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_open: " + "component %s open function failed", + component->mca_component_name); } mca_base_component_close (component, output_id); diff --git a/opal/mca/base/mca_base_components_register.c b/opal/mca/base/mca_base_components_register.c index 54a06b29660..48369c2a5cf 100644 --- a/opal/mca/base/mca_base_components_register.c +++ b/opal/mca/base/mca_base_components_register.c @@ -76,25 +76,25 @@ static int register_components(mca_base_framework_t *framework) int output_id = framework->framework_output; /* Announce */ - opal_output_verbose(10, output_id, - "mca: base: components_register: registering framework %s components", - framework->framework_name); - + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_register: registering framework %s components", + framework->framework_name); + /* Traverse the list of found components */ OPAL_LIST_FOREACH_SAFE(cli, next, &framework->framework_components, mca_base_component_list_item_t) { component = (mca_base_component_t *)cli->cli_component; - opal_output_verbose(10, output_id, + opal_output_verbose(MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_register: found loaded component %s", component->mca_component_name); /* Call the component's MCA parameter registration function (or open if register doesn't exist) */ if (NULL == component->mca_register_component_params) { - opal_output_verbose(10, output_id, - "mca: base: components_register: " - "component %s has no register or open function", - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_register: " + "component %s has no register or open function", + component->mca_component_name); ret = OPAL_SUCCESS; } else { ret = component->mca_register_component_params(); @@ -114,16 +114,17 @@ static int register_components(mca_base_framework_t *framework) expected. */ if (mca_base_component_show_load_errors) { - opal_output(0, "mca: base: components_register: " - "component %s / %s register function failed", - component->mca_type_name, - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id, + "mca: base: components_register: component %s " + "/ %s register function failed", + component->mca_type_name, + component->mca_component_name); } - opal_output_verbose(10, output_id, - "mca: base: components_register: " - "component %s register function failed", - component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca: base: components_register: " + "component %s register function failed", + component->mca_component_name); } opal_list_remove_item (&framework->framework_components, &cli->super); @@ -134,7 +135,7 @@ static int register_components(mca_base_framework_t *framework) } if (NULL != component->mca_register_component_params) { - opal_output_verbose (10, output_id, "mca: base: components_register: " + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_register: " "component %s register function successful", component->mca_component_name); } diff --git a/opal/mca/base/mca_base_components_select.c b/opal/mca/base/mca_base_components_select.c index 2ec5af33664..fa21c00729b 100644 --- a/opal/mca/base/mca_base_components_select.c +++ b/opal/mca/base/mca_base_components_select.c @@ -2,6 +2,8 @@ * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -40,9 +42,9 @@ int mca_base_select(const char *type_name, int output_id, *best_module = NULL; *best_component = NULL; - opal_output_verbose(10, output_id, - "mca:base:select: Auto-selecting %s components", - type_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca:base:select: Auto-selecting %s components", + type_name); /* * Traverse the list of available components. @@ -55,18 +57,18 @@ int mca_base_select(const char *type_name, int output_id, * If there is a query function then use it. */ if (NULL == component->mca_query_component) { - opal_output_verbose(5, output_id, - "mca:base:select:(%5s) Skipping component [%s]. It does not implement a query function", - type_name, component->mca_component_name ); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca:base:select:(%5s) Skipping component [%s]. It does not implement a query function", + type_name, component->mca_component_name ); continue; } /* * Query this component for the module and priority */ - opal_output_verbose(5, output_id, - "mca:base:select:(%5s) Querying component [%s]", - type_name, component->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca:base:select:(%5s) Querying component [%s]", + type_name, component->mca_component_name); component->mca_query_component(&module, &priority); @@ -74,18 +76,18 @@ int mca_base_select(const char *type_name, int output_id, * If no module was returned, then skip component */ if (NULL == module) { - opal_output_verbose(5, output_id, - "mca:base:select:(%5s) Skipping component [%s]. Query failed to return a module", - type_name, component->mca_component_name ); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca:base:select:(%5s) Skipping component [%s]. Query failed to return a module", + type_name, component->mca_component_name ); continue; } /* * Determine if this is the best module we have seen by looking the priority */ - opal_output_verbose(5, output_id, - "mca:base:select:(%5s) Query of component [%s] set priority to %d", - type_name, component->mca_component_name, priority); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca:base:select:(%5s) Query of component [%s] set priority to %d", + type_name, component->mca_component_name, priority); if (priority > best_priority) { best_priority = priority; *best_component = component; @@ -99,7 +101,7 @@ int mca_base_select(const char *type_name, int output_id, * Make sure we found something in the process. */ if (NULL == *best_component) { - opal_output_verbose(5, output_id, + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca:base:select:(%5s) No component selected!", type_name); /* @@ -111,9 +113,9 @@ int mca_base_select(const char *type_name, int output_id, return OPAL_ERR_NOT_FOUND; } - opal_output_verbose(5, output_id, - "mca:base:select:(%5s) Selected component [%s]", - type_name, (*best_component)->mca_component_name); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, + "mca:base:select:(%5s) Selected component [%s]", + type_name, (*best_component)->mca_component_name); /* * Close the non-selected components diff --git a/opal/mca/base/mca_base_open.c b/opal/mca/base/mca_base_open.c index 1701e4c771d..c386f63b4c4 100644 --- a/opal/mca/base/mca_base_open.c +++ b/opal/mca/base/mca_base_open.c @@ -140,7 +140,7 @@ int mca_base_open(void) gethostname(hostname, 64); asprintf(&lds.lds_prefix, "[%s:%05d] ", hostname, getpid()); opal_output_reopen(0, &lds); - opal_output_verbose(5, 0, "mca: base: opening components"); + opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, 0, "mca: base: opening components"); free(lds.lds_prefix); /* Open up the component repository */ From 044a656ccec64191a3eeba64c093758e34ac33c7 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 18 Aug 2015 09:11:38 -0600 Subject: [PATCH 0164/1704] opal/asm: remove alpha support This commit removes alpha asm support. No current processor manufacturer makes chips compatible with DEC alpha and no participating organization has alpha processors. This makes it difficult to support alpha via assembly. This doesn't mean Open MPI will no longer build/work on alpha processors. It should continue to work with gcc's builtin sync atomics. master commit open-mpi/ompi@551c2ea480bac6ead334314f07dd638bfdc12c07 Signed-off-by: Nathan Hjelm --- config/opal_config_asm.m4 | 6 - opal/asm/Makefile.am | 1 - opal/asm/asm-data.txt | 9 - opal/asm/base/ALPHA.asm | 225 ------------------------ opal/include/opal/sys/Makefile.am | 1 - opal/include/opal/sys/alpha/Makefile.am | 21 --- opal/include/opal/sys/alpha/atomic.h | 169 ------------------ opal/include/opal/sys/alpha/update.sh | 35 ---- opal/include/opal/sys/architecture.h | 1 - opal/include/opal/sys/atomic.h | 4 +- 10 files changed, 2 insertions(+), 470 deletions(-) delete mode 100644 opal/asm/base/ALPHA.asm delete mode 100644 opal/include/opal/sys/alpha/Makefile.am delete mode 100644 opal/include/opal/sys/alpha/atomic.h delete mode 100644 opal/include/opal/sys/alpha/update.sh diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 index 29d9c2d8da0..66f4535869d 100644 --- a/config/opal_config_asm.m4 +++ b/config/opal_config_asm.m4 @@ -916,12 +916,6 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ OPAL_GCC_INLINE_ASSIGN='"mov %0=r0\n;;\n" : "=&r"(ret)' ;; - alpha-*|alphaev[[4-8]]-*|alphaev56-*|alphaev6[[78]]-*) - opal_cv_asm_arch="ALPHA" - OPAL_ASM_SUPPORT_64BIT=1 - OPAL_GCC_INLINE_ASSIGN='"bis [$]31,[$]31,%0" : "=&r"(ret)' - ;; - armv7*) opal_cv_asm_arch="ARM" OPAL_ASM_SUPPORT_64BIT=1 diff --git a/opal/asm/Makefile.am b/opal/asm/Makefile.am index e056a80171d..159d0d3b09f 100644 --- a/opal/asm/Makefile.am +++ b/opal/asm/Makefile.am @@ -63,7 +63,6 @@ EXTRA_DIST = \ generate-all-asm.pl \ base/aix.conf \ base/default.conf \ - base/ALPHA.asm \ base/AMD64.asm \ base/ARM.asm \ base/IA32.asm \ diff --git a/opal/asm/asm-data.txt b/opal/asm/asm-data.txt index 3f597fd8bfe..88b9b1e40f6 100644 --- a/opal/asm/asm-data.txt +++ b/opal/asm/asm-data.txt @@ -28,15 +28,6 @@ # Assembly Format field: # config_file-text-global-label_suffix-gsym-lsym-type-size-align_log-ppc_r_reg-64_bit-gnu_stack -###################################################################### -# -# Alpha -# -###################################################################### - -ALPHA default-.text-.globl-:--$-@-1-1-1-1-1 alpha-linux - - ###################################################################### # # AMD Opteron / Intel EM64T diff --git a/opal/asm/base/ALPHA.asm b/opal/asm/base/ALPHA.asm deleted file mode 100644 index a16f5b1367b..00000000000 --- a/opal/asm/base/ALPHA.asm +++ /dev/null @@ -1,225 +0,0 @@ - .set noreorder - .set volatile - .set noat - .set nomacro - .text - .align 2 - .align 4 - .globl opal_atomic_mb - .ent opal_atomic_mb -$opal_atomic_mb..ng: -opal_atomic_mb: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - mb - .set nomacro - ret $31,($26),1 - .end opal_atomic_mb - .align 2 - .align 4 - .globl opal_atomic_rmb - .ent opal_atomic_rmb -$opal_atomic_rmb..ng: -opal_atomic_rmb: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - mb - .set nomacro - ret $31,($26),1 - .end opal_atomic_rmb - .align 2 - .align 4 - .globl opal_atomic_wmb - .ent opal_atomic_wmb -$opal_atomic_wmb..ng: -opal_atomic_wmb: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - wmb - .set nomacro - ret $31,($26),1 - .end opal_atomic_wmb - .align 2 - .align 4 - .globl opal_atomic_cmpset_32 - .ent opal_atomic_cmpset_32 -$opal_atomic_cmpset_32..ng: -opal_atomic_cmpset_32: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - 1: ldl_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stl_c $0, 0($16) - beq $0, 1b - jmp 3f -2: mov $31, $0 -3: - - .set nomacro - addl $31,$0,$0 - ret $31,($26),1 - .end opal_atomic_cmpset_32 - .align 2 - .align 4 - .globl opal_atomic_cmpset_acq_32 - .ent opal_atomic_cmpset_acq_32 -$opal_atomic_cmpset_acq_32..ng: -opal_atomic_cmpset_acq_32: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - 1: ldl_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stl_c $0, 0($16) - beq $0, 1b - jmp 3f -2: mov $31, $0 -3: - - .set nomacro - addl $31,$0,$0 - .set macro - mb - .set nomacro - ret $31,($26),1 - .end opal_atomic_cmpset_acq_32 - .align 2 - .align 4 - .globl opal_atomic_cmpset_rel_32 - .ent opal_atomic_cmpset_rel_32 -$opal_atomic_cmpset_rel_32..ng: -opal_atomic_cmpset_rel_32: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - wmb - 1: ldl_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stl_c $0, 0($16) - beq $0, 1b - jmp 3f -2: mov $31, $0 -3: - - .set nomacro - addl $31,$0,$0 - ret $31,($26),1 - .end opal_atomic_cmpset_rel_32 - .align 2 - .align 4 - .globl opal_atomic_cmpset_64 - .ent opal_atomic_cmpset_64 -$opal_atomic_cmpset_64..ng: -opal_atomic_cmpset_64: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - 1: ldq_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stq_c $0, 0($16) - beq $0, 1b - jmp 3f -2: mov $31, $0 -3: - - .set nomacro - addl $31,$0,$0 - ret $31,($26),1 - .end opal_atomic_cmpset_64 - .align 2 - .align 4 - .globl opal_atomic_cmpset_acq_64 - .ent opal_atomic_cmpset_acq_64 -$opal_atomic_cmpset_acq_64..ng: -opal_atomic_cmpset_acq_64: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - 1: ldq_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stq_c $0, 0($16) - beq $0, 1b - jmp 3f -2: mov $31, $0 -3: - - .set nomacro - addl $31,$0,$0 - .set macro - mb - .set nomacro - ret $31,($26),1 - .end opal_atomic_cmpset_acq_64 - .align 2 - .align 4 - .globl opal_atomic_cmpset_rel_64 - .ent opal_atomic_cmpset_rel_64 -$opal_atomic_cmpset_rel_64..ng: -opal_atomic_cmpset_rel_64: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - wmb - 1: ldq_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stq_c $0, 0($16) - beq $0, 1b - jmp 3f -2: mov $31, $0 -3: - - .set nomacro - addl $31,$0,$0 - ret $31,($26),1 - .end opal_atomic_cmpset_rel_64 - .align 2 - .align 4 - .globl opal_sys_timer_get_cycles - .ent opal_sys_timer_get_cycles - $opal_sys_timer_get_cycles..ng: - opal_sys_timer_get_cycles: - .eflag 48 - .frame $30,0,$26,0 - .prologue 0 - .set macro - wmb - 1: ldq_l $0, 0($16) - cmpeq $0, $17, $0 - beq $0, 2f - mov $18, $0 - stq_c $0, 0($16) - beq $0, 1b - jmp 3f - 2: mov $31, $0 - 3: - - .set nomacro - rpcc $0 - ret - .end opal_sys_timer_get_cycles - diff --git a/opal/include/opal/sys/Makefile.am b/opal/include/opal/sys/Makefile.am index 6141e12ce3e..190c496525f 100644 --- a/opal/include/opal/sys/Makefile.am +++ b/opal/include/opal/sys/Makefile.am @@ -27,7 +27,6 @@ headers += \ opal/sys/timer.h \ opal/sys/cma.h -include opal/sys/alpha/Makefile.am include opal/sys/amd64/Makefile.am include opal/sys/arm/Makefile.am include opal/sys/ia32/Makefile.am diff --git a/opal/include/opal/sys/alpha/Makefile.am b/opal/include/opal/sys/alpha/Makefile.am deleted file mode 100644 index 4457ad82a28..00000000000 --- a/opal/include/opal/sys/alpha/Makefile.am +++ /dev/null @@ -1,21 +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$ -# - -# This makefile.am does not stand on its own - it is included from opal/include/Makefile.am - -headers += opal/sys/alpha/atomic.h diff --git a/opal/include/opal/sys/alpha/atomic.h b/opal/include/opal/sys/alpha/atomic.h deleted file mode 100644 index df1d788c1db..00000000000 --- a/opal/include/opal/sys/alpha/atomic.h +++ /dev/null @@ -1,169 +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$ - */ - -#ifndef OPAL_SYS_ARCH_ATOMIC_H -#define OPAL_SYS_ARCH_ATOMIC_H 1 - -/* - * On alpha, everything is load-locked, store-conditional... - */ - -#define MB() __asm__ __volatile__ ("mb"); -#define RMB() __asm__ __volatile__ ("mb"); -#define WMB() __asm__ __volatile__ ("wmb"); - -/********************************************************************** - * - * Define constants for PowerPC 32 - * - *********************************************************************/ -#define OPAL_HAVE_ATOMIC_MEM_BARRIER 1 - -#define OPAL_HAVE_ATOMIC_CMPSET_32 1 - -#define OPAL_HAVE_ATOMIC_CMPSET_64 1 - - -/********************************************************************** - * - * Memory Barriers - * - *********************************************************************/ -#if OPAL_GCC_INLINE_ASSEMBLY - -static inline void opal_atomic_mb(void) -{ - MB(); -} - - -static inline void opal_atomic_rmb(void) -{ - RMB(); -} - - -static inline void opal_atomic_wmb(void) -{ - WMB(); -} - -#endif /* OPAL_GCC_INLINE_ASSEMBLY */ - - -/********************************************************************** - * - * Atomic math operations - * - *********************************************************************/ -#if OPAL_GCC_INLINE_ASSEMBLY - -static inline int opal_atomic_cmpset_32( volatile int32_t *addr, - int32_t oldval, int32_t newval) -{ - int32_t ret; - - __asm __volatile__ ( - "1: ldl_l %0, %1 \n\t" - "cmpeq %0, %2, %0 \n\t" - "beq %0, 2f \n\t" - "mov %3, %0 \n\t" - "stl_c %0, %1 \n\t" - "beq %0, 1b \n\t" - "jmp 3f \n" - "2: mov $31, %0 \n" - "3: \n" - : "=&r" (ret), "+m" (*addr) - : "r" (oldval), "r" (newval) - : "memory"); - - return ret; -} - - -static inline int opal_atomic_cmpset_acq_32(volatile int32_t *addr, - int32_t oldval, - int32_t newval) -{ - int rc; - - rc = opal_atomic_cmpset_32(addr, oldval, newval); - opal_atomic_rmb(); - - return rc; -} - - -static inline int opal_atomic_cmpset_rel_32(volatile int32_t *addr, - int32_t oldval, - int32_t newval) -{ - opal_atomic_wmb(); - return opal_atomic_cmpset_32(addr, oldval, newval); -} - - -static inline int opal_atomic_cmpset_64( volatile int64_t *addr, - int64_t oldval, int64_t newval) -{ - int32_t ret; - - __asm__ __volatile__ ( - "1: ldq_l %0, %1 \n\t" - "cmpeq %0, %2, %0 \n\t" - "beq %0, 2f \n\t" - "mov %3, %0 \n\t" - "stq_c %0, %1 \n\t" - "beq %0, 1b \n\t" - "jmp 3f \n" - "2: mov $31, %0 \n" - "3: \n" - : "=&r" (ret), "+m" (*addr) - : "r" (oldval), "r" (newval) - : "memory"); - - return ret; -} - - -static inline int opal_atomic_cmpset_acq_64(volatile int64_t *addr, - int64_t oldval, - int64_t newval) -{ - int rc; - - rc = opal_atomic_cmpset_64(addr, oldval, newval); - opal_atomic_rmb(); - - return rc; -} - - -static inline int opal_atomic_cmpset_rel_64(volatile int64_t *addr, - int64_t oldval, - int64_t newval) -{ - opal_atomic_wmb(); - return opal_atomic_cmpset_64(addr, oldval, newval); -} - - -#endif /* OPAL_GCC_INLINE_ASSEMBLY */ - - -#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */ diff --git a/opal/include/opal/sys/alpha/update.sh b/opal/include/opal/sys/alpha/update.sh deleted file mode 100644 index 366d534549a..00000000000 --- a/opal/include/opal/sys/alpha/update.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# 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$ -# - -CFILE=/tmp/opal_atomic_$$.c - -trap "/bin/rm -f $CFILE; exit 0" 0 1 2 15 - -echo Updating asm.s from atomic.h using gcc - -cat > $CFILE< -#include -#define static -#define inline -#define OPAL_GCC_INLINE_ASSEMBLY 1 -#include "atomic.h" -EOF - -gcc -O3 -I. -S $CFILE -o asm.s diff --git a/opal/include/opal/sys/architecture.h b/opal/include/opal/sys/architecture.h index 69a3a6b132a..cc5d9a464c7 100644 --- a/opal/include/opal/sys/architecture.h +++ b/opal/include/opal/sys/architecture.h @@ -30,7 +30,6 @@ #define OPAL_IA32 0010 #define OPAL_IA64 0020 #define OPAL_AMD64 0030 -#define OPAL_ALPHA 0040 #define OPAL_POWERPC32 0050 #define OPAL_POWERPC64 0051 #define OPAL_SPARC 0060 diff --git a/opal/include/opal/sys/atomic.h b/opal/include/opal/sys/atomic.h index cae28a49b10..2971908e261 100644 --- a/opal/include/opal/sys/atomic.h +++ b/opal/include/opal/sys/atomic.h @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -140,8 +142,6 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t; #include "opal/sys/sync_builtin/atomic.h" #elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_OSX #include "opal/sys/osx/atomic.h" -#elif OPAL_ASSEMBLY_ARCH == OPAL_ALPHA -#include "opal/sys/alpha/atomic.h" #elif OPAL_ASSEMBLY_ARCH == OPAL_AMD64 #include "opal/sys/amd64/atomic.h" #elif OPAL_ASSEMBLY_ARCH == OPAL_ARM From 8b7e6d9c1b220ed6635615e0375001fb04890afa Mon Sep 17 00:00:00 2001 From: yosefe Date: Tue, 18 Aug 2015 14:56:48 +0300 Subject: [PATCH 0165/1704] yalla: fix passing on-demand mapping config to mxm. --- ompi/mca/pml/yalla/pml_yalla.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mca/pml/yalla/pml_yalla.c b/ompi/mca/pml/yalla/pml_yalla.c index a7c22497314..f3c80850aa8 100644 --- a/ompi/mca/pml/yalla/pml_yalla.c +++ b/ompi/mca/pml/yalla/pml_yalla.c @@ -109,13 +109,13 @@ int mca_pml_yalla_open(void) opal_mem_hooks_support_level())) { PML_YALLA_VERBOSE(1, "enabling on-demand memory mapping"); - opal_setenv("MXM_PML_MEM_ON_DEMAND_MAP", "y", false, &environ); + opal_setenv("MXM_MPI_MEM_ON_DEMAND_MAP", "y", false, &environ); ompi_pml_yalla.using_mem_hooks = 1; } else { PML_YALLA_VERBOSE(1, "disabling on-demand memory mapping"); ompi_pml_yalla.using_mem_hooks = 0; } - opal_setenv("MXM_PML_SINGLE_THREAD", ompi_mpi_thread_multiple ? "n" : "y", + opal_setenv("MXM_MPI_SINGLE_THREAD", ompi_mpi_thread_multiple ? "n" : "y", false, &environ); /* Read options */ From 7cb8fce689da68532dd37bdf4a120b961ef33bdf Mon Sep 17 00:00:00 2001 From: Todd Kordenbrock Date: Tue, 18 Aug 2015 11:51:16 -0500 Subject: [PATCH 0166/1704] osc-portals4: allow atomic ops on datatypes that are max_fetch_atomic_size bytes in length Portals4 supports atomic ops on datatypes less than or equal to max_fetch_atomic_size bytes. This commit fixes a bug that required the datatype to be less than max_fetch_atomic_size bytes. --- ompi/mca/osc/portals4/osc_portals4_comm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index 4a096b41037..a9c0ae05c98 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -970,7 +970,7 @@ ompi_osc_portals4_compare_and_swap(void *origin_addr, ret = ompi_datatype_type_size(dt, &length); if (OMPI_SUCCESS != ret) return ret; - assert(length < module->fetch_atomic_max); + assert(length <= module->fetch_atomic_max); result_md_offset = (ptl_size_t) result_addr; origin_md_offset = (ptl_size_t) origin_addr; @@ -1033,7 +1033,7 @@ ompi_osc_portals4_fetch_and_op(void *origin_addr, ret = ompi_datatype_type_size(dt, &length); if (OMPI_SUCCESS != ret) return ret; - assert(length < module->fetch_atomic_max); + assert(length <= module->fetch_atomic_max); (void)opal_atomic_add_64(&module->opcount, 1); From 5b28464767a2b5ddce8d140dd2d67e0be468bd77 Mon Sep 17 00:00:00 2001 From: --quiet <--quiet> Date: Thu, 20 Aug 2015 10:40:23 -0700 Subject: [PATCH 0167/1704] ofi mtl: also link in mtl_ofi_LIBS in the static case (cherry picked from commit 1e9227765ac86afbd9d15faf43b72976e29c64f7) --- ompi/mca/mtl/ofi/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ompi/mca/mtl/ofi/Makefile.am b/ompi/mca/mtl/ofi/Makefile.am index 6e8a4caaac0..7f81b4545fa 100644 --- a/ompi/mca/mtl/ofi/Makefile.am +++ b/ompi/mca/mtl/ofi/Makefile.am @@ -48,5 +48,7 @@ mca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS) \ noinst_LTLIBRARIES = $(component_noinst) libmca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources) -libmca_mtl_ofi_la_LDFLAGS = -module -avoid-version - +libmca_mtl_ofi_la_LDFLAGS = \ + $(ompi_mtl_ofi_LDFLAGS) \ + -module -avoid-version +libmca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS) From 767c6472cca85abb3447fad9c4be10eb46ed3d8d Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 21 Aug 2015 08:02:31 -0700 Subject: [PATCH 0168/1704] mailmap: add entries to the git mailmap I borked my $HOME/.gitconfig for a few commits, resulting in several commits on Aug 20, 2015 being authored by "--quiet <--quiet>". This .mailmap entry will correctly list those commits as being mine when you use "git shortlog" or "git log --use-mailmap". (cherry picked from commit open-mpi/ompi@7a7d4f2ceee7e30a732fdc69313c00571f29678c) --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index 43559a70ce2..972c6d0e3be 100644 --- a/.mailmap +++ b/.mailmap @@ -21,6 +21,8 @@ Dave Goodell Jeff Squyres +# Jeff accidentally stomped on his $HOME/.gitconfig for a short while: +Jeff Squyres --quiet <--quiet> Reese Faucette Bill D'Amico Adrian Reber From 7f690279d8202585112a3eb20448a138252d8685 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 20 Aug 2015 13:17:16 -0700 Subject: [PATCH 0169/1704] fortran sizeof: ensure mpi_sizeof*f90 is not empty Per http://www.open-mpi.org/community/lists/devel/2015/08/17775.php, some compilers don't like it when there's a .f90 file that only contains comments (and no actual Fortran code). So if OMPI determines that the Fortran compiler does not support enough Fortran mojo to support MPI_SIZEOF, generate at least one dummy Fortran subroutine that can be compiled in an otherwise barren Fortran landscape that is devoid of life and hope. (cherry picked from commit open-mpi/ompi@d5763a8288c994e1d55a333d45f1a85d64341aff) (cherry picked from commit open-mpi/ompi@edf485716ea4af9f1d97c40279f0d2d334675b9c) (cherry picked from commit open-mpi/ompi@ede9fc17b03f46349211a6456f3350a77e212013) --- ompi/mpi/fortran/base/gen-mpi-sizeof.pl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl index a422c9a4acd..1d3b9144828 100755 --- a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl +++ b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ @@ -218,12 +218,26 @@ sub output_file { ! Specifically: we need support for the INTERFACE keyword, ! ISO_FORTRAN_ENV, and the STORAGE_SIZE() intrinsic on all types. ! Apparently, this compiler does not support both of those things, so -! this file will be blank (i.e., we didn't bother generating the -! necessary stuff for MPI_SIZEOF because the compiler doesn't support +! this file will be (effecitvely) blank (i.e., we didn't bother +! generating the necessary stuff for MPI_SIZEOF because the compiler +! doesn't support ! it). ! ! If you want support for MPI_SIZEOF, please use a different Fortran ! compiler to build Open MPI.\n\n"; + + if ($want_bodies) { + print OUT "! +! Dummy subroutine, just so that there is *some* Fortran in this file +! (some compilers are unhappy if there are no Fortran statements in this +! file). +subroutine ompi_sad_panda() + implicit none + + print *, 'Open MPI is a sad panda because your Fortran compiler' + print *, 'does not support enough Fortran mojo for MPI_SIZEOF' +end subroutine ompi_sad_panda\n\n"; + } } close(OUT); From ee8ec56dc6c9447cc62ce23d5269f7261e504136 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 21 Aug 2015 07:26:11 -0700 Subject: [PATCH 0170/1704] fortran: moar fixes for the Fortran MPI_SIZEOF debacle Ensure to define ompi/pompi versions for platforms that don't have weak symbols. Also make fortran/mpif-h/profile build a separate sizeof library, just like fortran/mpifh-h does. (cherry picked from commit 9f345bd22f72583d3cbcffad10a4ee1ca062610e) --- ompi/mpi/fortran/base/gen-mpi-sizeof.pl | 14 +++++++++++--- ompi/mpi/fortran/mpif-h/profile/Makefile.am | 18 ++++++++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl index 1d3b9144828..d4fe34402a3 100755 --- a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl +++ b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl @@ -227,16 +227,24 @@ sub output_file { ! compiler to build Open MPI.\n\n"; if ($want_bodies) { + my $name = "ompi_sad_panda"; + $name = "pompi_sad_panda" + if ($pmpi_arg); print OUT "! ! Dummy subroutine, just so that there is *some* Fortran in this file -! (some compilers are unhappy if there are no Fortran statements in this +! (this is defensive programming: since the Fortran compiler doesn't +! support enough mojo, configure should set some AM_CONDITIONALs such +! that this file should not end up being compiled, but just in case +! that logic changes someday and this file *does* end up getting +! compiled, make sure that it's not entirely empty because some +! compilers are unhappy if there are no Fortran statements in this ! file). -subroutine ompi_sad_panda() +subroutine $name() implicit none print *, 'Open MPI is a sad panda because your Fortran compiler' print *, 'does not support enough Fortran mojo for MPI_SIZEOF' -end subroutine ompi_sad_panda\n\n"; +end subroutine $name\n\n"; } } diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 529470b27b8..def266be9e8 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -10,7 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2013 Inria. All rights reserved. # Copyright (c) 2011-2013 Universite Bordeaux 1 # Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights @@ -26,6 +26,9 @@ include $(top_srcdir)/Makefile.ompi-rules +CLEANFILES= +libmpi_mpifh_pmpi_la_LIBADD = + # # OMPI_PROFILING_DEFINES flag is enabled when we want our MPI_* symbols # to be replaced by PMPI_*. In other words, this flag decides @@ -430,7 +433,19 @@ $(linked_files): # psizeof_f.f90 is generated based on some results from configure tests. CLEANFILES += psizeof_f.f90 + +# Build the MPI_SIZEOF code in a separate convenience library (see +# lengthy comment in ompi/mpi/fortran/mpif-h/Makefile.am for an +# explanation why). +#if BUILD_FORTRAN_SIZEOF +noinst_LTLIBRARIES += libmpi_mpifh_psizeof.la +# Do not dist this file; it is generated +nodist_libmpi_mpifh_psizeof_la_SOURCES = psizeof_f.f90 +libmpi_mpifh_pmpi_la_LIBADD += libmpi_mpifh_psizeof.la +#endif + sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl + psizeof_f.f90: $(top_builddir)/config.status psizeof_f.f90: $(sizeof_pl) psizeof_f.f90: @@ -445,7 +460,6 @@ psizeof_f.f90: # The library itself # nodist_libmpi_mpifh_pmpi_la_SOURCES = \ - psizeof_f.f90 \ $(linked_files) # Conditionally install the header files From 496a7bdebf34d6ed5fe3782da86498694a7c1c56 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 22 Aug 2015 03:07:44 -0700 Subject: [PATCH 0171/1704] gen-mpi-sizeof: minor style change Suggested by Paul Hargrove. (cherry picked from commit 0f3a3e52bae025c3baec2773ff753255ebb5a9ba) --- ompi/mpi/fortran/base/gen-mpi-sizeof.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl index d4fe34402a3..5ea3dca3a47 100755 --- a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl +++ b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl @@ -227,9 +227,7 @@ sub output_file { ! compiler to build Open MPI.\n\n"; if ($want_bodies) { - my $name = "ompi_sad_panda"; - $name = "pompi_sad_panda" - if ($pmpi_arg); + my $name = $pmpi_arg ? "pompi_sad_panda" : "ompi_sad_panda"; print OUT "! ! Dummy subroutine, just so that there is *some* Fortran in this file ! (this is defensive programming: since the Fortran compiler doesn't From a2271bb31fa1057b04fce65c24b3e26fb0b37788 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 29 Jul 2015 11:31:23 +0900 Subject: [PATCH 0172/1704] fortran: (try to) align C objects used by Fortran Fortran uses objects (ompi_f08_mpi_comm_world, mpi_fortran_bottom,, ...) that are defined in C. Some compilers have different requirements on how these objects should be aligned. Smaller alignment in C can lead to several confusing warnings from the linker, so try to find the alignment expected by Fortran compiler, and inform the C compiler. (cherry picked from commit open-mpi/ompi@99730f798b7aef4c87d282aa24b98916fea45bb6) --- config/ompi_fortran_get_alignment.m4 | 45 ++++++++ config/ompi_setup_mpi_fortran.m4 | 8 ++ ompi/mpi/fortran/use-mpi-f08/constants.c | 132 ++++++++++++----------- 3 files changed, 123 insertions(+), 62 deletions(-) diff --git a/config/ompi_fortran_get_alignment.m4 b/config/ompi_fortran_get_alignment.m4 index c8b6cf8751c..82a9e046ef3 100644 --- a/config/ompi_fortran_get_alignment.m4 +++ b/config/ompi_fortran_get_alignment.m4 @@ -132,3 +132,48 @@ EOF AS_VAR_POPDEF([type_var])dnl OPAL_VAR_SCOPE_POP ]) + +# OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT(type, variable to set) +# ------------------------------------------ +AC_DEFUN([OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT],[ + # Use of m4_translit suggested by Eric Blake: + # http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html + AS_VAR_PUSHDEF([type_var], + m4_translit([[ompi_cv_fortran_alignment_$1]], [*], [p])) + + AC_CACHE_CHECK([alignment of Fortran $1], type_var, + [AC_LANG_PUSH([Fortran]) + AC_LINK_IFELSE([AC_LANG_SOURCE([[module alignment_mod +type, BIND(C) :: test_mpi_handle + integer :: MPI_VAL +end type test_mpi_handle +type(test_mpi_handle) :: t1 +type(test_mpi_handle) :: t2 +end module + +program falignment + use alignment_mod + OPEN(UNIT=10, FILE="conftestval") + if (LOC(t1) > LOC(t2)) then + write (10,'(I5)') LOC(t1)-LOC(t2) + else + write (10,'(I5)') LOC(t2)-LOC(t1) + endif + CLOSE(10) + +end program]])], + [AS_IF([test "$cross_compiling" = "yes"], + [AC_MSG_ERROR([Can not determine alignment of $1 when cross-compiling])], + [OPAL_LOG_COMMAND([./conftest], + [AS_VAR_SET(type_var, [`cat conftestval`])], + [AC_MSG_ERROR([Could not determine alignment of $1])])])], + + [AC_MSG_WARN([Could not determine alignment of $1]) + AC_MSG_WARN([See config.log for details]) + AC_MSG_ERROR([Cannot continue])]) + rm -rf conftest* *.mod 2> /dev/null + AC_LANG_POP([Fortran])]) + + AS_VAR_COPY([$2], [type_var]) + AS_VAR_POPDEF([type_var])dnl +])dnl diff --git a/config/ompi_setup_mpi_fortran.m4 b/config/ompi_setup_mpi_fortran.m4 index c1f195b46bc..c2f71791e37 100644 --- a/config/ompi_setup_mpi_fortran.m4 +++ b/config/ompi_setup_mpi_fortran.m4 @@ -489,6 +489,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [OMPI_FORTRAN_HAVE_ASYNCHRONOUS=0])]) OMPI_FORTRAN_F08_HANDLE_SIZE=4 + OMPI_FORTRAN_F08_HANDLE_ALIGNMENT=4 AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \ test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS], [ # How big are derived types with a single INTEGER? @@ -497,6 +498,9 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ end type test_mpi_handle], [type(test_mpi_handle)], [OMPI_FORTRAN_F08_HANDLE_SIZE]) + OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT( + [type(test_mpi_handle)], + [OMPI_FORTRAN_F08_HANDLE_ALIGNMENT]) ]) OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1 @@ -715,6 +719,10 @@ end type test_mpi_handle], $OMPI_FORTRAN_F08_HANDLE_SIZE, [How many bytes the mpi_f08 TYPE(MPI_) handles will be]) + AC_DEFINE_UNQUOTED(OMPI_FORTRAN_F08_HANDLE_ALIGNMENT, + $OMPI_FORTRAN_F08_HANDLE_ALIGNMENT, + [How many bytes the mpi_f08 TYPE(MPI_) handles will be aligned to]) + # These go into ompi/info/param.c AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK, [$OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK], diff --git a/ompi/mpi/fortran/use-mpi-f08/constants.c b/ompi/mpi/fortran/use-mpi-f08/constants.c index 797c8ebf7fb..2fa5240c1a5 100644 --- a/ompi/mpi/fortran/use-mpi-f08/constants.c +++ b/ompi/mpi/fortran/use-mpi-f08/constants.c @@ -1,5 +1,7 @@ /* * Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ * @@ -20,76 +22,82 @@ */ typedef MPI_Fint ompi_fortran_08_handle_t[OMPI_FORTRAN_F08_HANDLE_SIZE / sizeof(MPI_Fint)]; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_comm_world = {OMPI_MPI_COMM_WORLD}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_comm_self = {OMPI_MPI_COMM_SELF}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_group_empty = {OMPI_MPI_GROUP_EMPTY}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_are_fatal = {OMPI_MPI_ERRORS_ARE_FATAL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_return = {OMPI_MPI_ERRORS_RETURN}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_message_no_proc = {OMPI_MPI_MESSAGE_NO_PROC}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_info_env = {OMPI_MPI_INFO_ENV}; +#if OMPI_FORTRAN_F08_HANDLE_ALIGNMENT > OMPI_FORTRAN_F08_HANDLE_SIZE +#define OMPI_F08_HANDLE_ALIGNED __opal_attribute_aligned__(OMPI_FORTRAN_F08_HANDLE_ALIGNMENT) +#else +#define OMPI_F08_HANDLE_ALIGNED +#endif + +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_comm_world = {OMPI_MPI_COMM_WORLD}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_comm_self = {OMPI_MPI_COMM_SELF}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_group_empty = {OMPI_MPI_GROUP_EMPTY}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_errors_are_fatal = {OMPI_MPI_ERRORS_ARE_FATAL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_errors_return = {OMPI_MPI_ERRORS_RETURN}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_message_no_proc = {OMPI_MPI_MESSAGE_NO_PROC}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_info_env = {OMPI_MPI_INFO_ENV}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_max = {OMPI_MPI_MAX}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_min = {OMPI_MPI_MIN}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_sum = {OMPI_MPI_SUM}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_prod = {OMPI_MPI_PROD}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_land = {OMPI_MPI_LAND}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_band = {OMPI_MPI_BAND}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lor = {OMPI_MPI_LOR}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_bor = {OMPI_MPI_BOR}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lxor = {OMPI_MPI_LXOR}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_bxor = {OMPI_MPI_BXOR}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_maxloc = {OMPI_MPI_MAXLOC}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_minloc = {OMPI_MPI_MINLOC}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_replace = {OMPI_MPI_REPLACE}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_max = {OMPI_MPI_MAX}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_min = {OMPI_MPI_MIN}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_sum = {OMPI_MPI_SUM}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_prod = {OMPI_MPI_PROD}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_land = {OMPI_MPI_LAND}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_band = {OMPI_MPI_BAND}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_lor = {OMPI_MPI_LOR}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_bor = {OMPI_MPI_BOR}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_lxor = {OMPI_MPI_LXOR}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_bxor = {OMPI_MPI_BXOR}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_maxloc = {OMPI_MPI_MAXLOC}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_minloc = {OMPI_MPI_MINLOC}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_replace = {OMPI_MPI_REPLACE}; /* * NULL "handles" (indices) */ -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_comm_null = {OMPI_MPI_COMM_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_datatype_null = {OMPI_MPI_DATATYPE_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errhandler_null = {OMPI_MPI_ERRHANDLER_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_group_null = {OMPI_MPI_GROUP_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_info_null = {OMPI_MPI_INFO_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_message_null = {OMPI_MPI_MESSAGE_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_op_null = {OMPI_MPI_OP_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_request_null = {OMPI_MPI_REQUEST_NULL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_win_null = {OMPI_MPI_WIN_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_comm_null = {OMPI_MPI_COMM_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_datatype_null = {OMPI_MPI_DATATYPE_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_errhandler_null = {OMPI_MPI_ERRHANDLER_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_group_null = {OMPI_MPI_GROUP_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_info_null = {OMPI_MPI_INFO_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_message_null = {OMPI_MPI_MESSAGE_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_op_null = {OMPI_MPI_OP_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_request_null = {OMPI_MPI_REQUEST_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_win_null = {OMPI_MPI_WIN_NULL}; #if OMPI_PROVIDE_MPI_FILE_INTERFACE -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_file_null = {OMPI_MPI_FILE_NULL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_file_null = {OMPI_MPI_FILE_NULL}; #endif /* * common block items from ompi/include/mpif-common.h */ -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_byte = {OMPI_MPI_BYTE}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_packed = {OMPI_MPI_PACKED}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_ub = {OMPI_MPI_UB}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lb = {OMPI_MPI_LB}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_character = {OMPI_MPI_CHARACTER}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical = {OMPI_MPI_LOGICAL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer = {OMPI_MPI_INTEGER}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer1 = {OMPI_MPI_INTEGER1}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer2 = {OMPI_MPI_INTEGER2}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer4 = {OMPI_MPI_INTEGER4}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer8 = {OMPI_MPI_INTEGER8}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_integer16 = {OMPI_MPI_INTEGER16}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real = {OMPI_MPI_REAL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real4 = {OMPI_MPI_REAL4}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real8 = {OMPI_MPI_REAL8}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real16 = {OMPI_MPI_REAL16}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_double_precision = {OMPI_MPI_DOUBLE_PRECISION}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex = {OMPI_MPI_COMPLEX}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex8 = {OMPI_MPI_COMPLEX8}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex16 = {OMPI_MPI_COMPLEX16}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_complex32 = {OMPI_MPI_COMPLEX32}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_double_complex = {OMPI_MPI_DOUBLE_COMPLEX}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2real = {OMPI_MPI_2REAL}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2double_precision = {OMPI_MPI_2DOUBLE_PRECISION}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2integer = {OMPI_MPI_2INTEGER}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2complex = {OMPI_MPI_2COMPLEX}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_2double_complex = {OMPI_MPI_2DOUBLE_COMPLEX}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_real2 = {OMPI_MPI_REAL2}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical1 = {OMPI_MPI_LOGICAL1}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical2 = {OMPI_MPI_LOGICAL2}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical4 = {OMPI_MPI_LOGICAL4}; -OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_logical8 = {OMPI_MPI_LOGICAL8}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_byte = {OMPI_MPI_BYTE}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_packed = {OMPI_MPI_PACKED}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_ub = {OMPI_MPI_UB}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_lb = {OMPI_MPI_LB}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_character = {OMPI_MPI_CHARACTER}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_logical = {OMPI_MPI_LOGICAL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_integer = {OMPI_MPI_INTEGER}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_integer1 = {OMPI_MPI_INTEGER1}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_integer2 = {OMPI_MPI_INTEGER2}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_integer4 = {OMPI_MPI_INTEGER4}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_integer8 = {OMPI_MPI_INTEGER8}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_integer16 = {OMPI_MPI_INTEGER16}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_real = {OMPI_MPI_REAL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_real4 = {OMPI_MPI_REAL4}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_real8 = {OMPI_MPI_REAL8}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_real16 = {OMPI_MPI_REAL16}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_double_precision = {OMPI_MPI_DOUBLE_PRECISION}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_complex = {OMPI_MPI_COMPLEX}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_complex8 = {OMPI_MPI_COMPLEX8}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_complex16 = {OMPI_MPI_COMPLEX16}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_complex32 = {OMPI_MPI_COMPLEX32}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_double_complex = {OMPI_MPI_DOUBLE_COMPLEX}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_2real = {OMPI_MPI_2REAL}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_2double_precision = {OMPI_MPI_2DOUBLE_PRECISION}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_2integer = {OMPI_MPI_2INTEGER}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_2complex = {OMPI_MPI_2COMPLEX}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_2double_complex = {OMPI_MPI_2DOUBLE_COMPLEX}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_real2 = {OMPI_MPI_REAL2}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_logical1 = {OMPI_MPI_LOGICAL1}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_logical2 = {OMPI_MPI_LOGICAL2}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_logical4 = {OMPI_MPI_LOGICAL4}; +OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_logical8 = {OMPI_MPI_LOGICAL8}; From aaed398f50b47cd5430ee890bf1d14326cd83b34 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Tue, 18 Aug 2015 17:33:22 -0600 Subject: [PATCH 0173/1704] Java garbage collection bugfix This pull request adds an arraylist of type Buffer to the Request class. Whenever a request object is created that has associated buffers, the buffers should be added to this array list so the java garbage collector does not dispose of the buffers prematurely. This is a more robust expansion on the idea first proposed by @ggouaillardet Fixes #369 Signed-off-by: Nathaniel Graham --- ompi/mpi/java/java/Comm.java | 212 ++++++++++++++++++++---------- ompi/mpi/java/java/File.java | 24 +++- ompi/mpi/java/java/Intracomm.java | 22 ++-- ompi/mpi/java/java/Message.java | 4 +- ompi/mpi/java/java/Request.java | 33 ++++- ompi/mpi/java/java/Win.java | 20 +-- 6 files changed, 219 insertions(+), 96 deletions(-) diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index 99741003d35..b3b58876578 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -152,7 +152,7 @@ public Comm iDup() throws MPIException } protected final native long[] iDup(long comm) throws MPIException; - + /** * Duplicates this communicator with the info object used in the call. *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. @@ -162,12 +162,12 @@ public Comm iDup() throws MPIException */ public Comm dupWithInfo(Info info) throws MPIException { - MPI.check(); - return new Comm(dupWithInfo(handle, info.handle)); + MPI.check(); + return new Comm(dupWithInfo(handle, info.handle)); } protected final native long dupWithInfo(long comm, long info) throws MPIException; - + /** * Returns the associated request to this communicator if it was * created using {@link #iDup}. @@ -641,7 +641,9 @@ public final Request iSend(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Request(iSend(handle, buf, count, type.handle, dest, tag)); + Request req = new Request(iSend(handle, buf, count, type.handle, dest, tag)); + req.addSendBufRef(buf); + return req; } private native long iSend( @@ -666,7 +668,9 @@ public final Request ibSend(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Request(ibSend(handle, buf, count, type.handle, dest, tag)); + Request req = new Request(ibSend(handle, buf, count, type.handle, dest, tag)); + req.addSendBufRef(buf); + return req; } private native long ibSend( @@ -691,7 +695,9 @@ public final Request isSend(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Request(isSend(handle, buf, count, type.handle, dest, tag)); + Request req = new Request(isSend(handle, buf, count, type.handle, dest, tag)); + req.addSendBufRef(buf); + return req; } private native long isSend( @@ -716,7 +722,9 @@ public final Request irSend(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Request(irSend(handle, buf, count, type.handle, dest, tag)); + Request req = new Request(irSend(handle, buf, count, type.handle, dest, tag)); + req.addSendBufRef(buf); + return req; } private native long irSend( @@ -741,7 +749,9 @@ public final Request iRecv(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Request(iRecv(handle, buf, count, type.handle, source, tag)); + Request req = new Request(iRecv(handle, buf, count, type.handle, source, tag)); + req.addRecvBufRef(buf); + return req; } private native long iRecv( @@ -769,7 +779,9 @@ public final Prequest sendInit(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Prequest(sendInit(handle, buf, count, type.handle, dest, tag)); + Prequest preq = new Prequest(sendInit(handle, buf, count, type.handle, dest, tag)); + preq.addSendBufRef(buf); + return preq; } private native long sendInit( @@ -794,7 +806,9 @@ public final Prequest bSendInit(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Prequest(bSendInit(handle, buf, count, type.handle, dest, tag)); + Prequest preq = new Prequest(bSendInit(handle, buf, count, type.handle, dest, tag)); + preq.addSendBufRef(buf); + return preq; } private native long bSendInit( @@ -819,7 +833,9 @@ public final Prequest sSendInit(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Prequest(sSendInit(handle, buf, count, type.handle, dest, tag)); + Prequest preq = new Prequest(sSendInit(handle, buf, count, type.handle, dest, tag)); + preq.addSendBufRef(buf); + return preq; } private native long sSendInit( @@ -844,7 +860,9 @@ public final Prequest rSendInit(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Prequest(rSendInit(handle, buf, count, type.handle, dest, tag)); + Prequest preq = new Prequest(rSendInit(handle, buf, count, type.handle, dest, tag)); + preq.addSendBufRef(buf); + return preq; } private native long rSendInit( @@ -869,7 +887,9 @@ public final Prequest recvInit(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - return new Prequest(recvInit(handle, buf, count, type.handle, source, tag)); + Prequest preq = new Prequest(recvInit(handle, buf, count, type.handle, source, tag)); + preq.addRecvBufRef(buf); + return preq; } private native long recvInit( @@ -1252,7 +1272,9 @@ public final Request iBcast(Buffer buf, int count, Datatype type, int root) { MPI.check(); assertDirectBuffer(buf); - return new Request(iBcast(handle, buf, count, type.handle, root)); + Request req = new Request(iBcast(handle, buf, count, type.handle, root)); + req.addSendBufRef(buf); + return req; } private native long iBcast( @@ -1358,9 +1380,11 @@ public final Request iGather( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iGather(handle, sendbuf, sendcount, sendtype.handle, + Request req = new Request(iGather(handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, recvtype.handle, root)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -1381,9 +1405,10 @@ public final Request iGather(Buffer buf, int count, Datatype type, int root) { MPI.check(); assertDirectBuffer(buf); - - return new Request(iGather(handle, null, 0, 0, + Request req = new Request(iGather(handle, null, 0, 0, buf, count, type.handle, root)); + req.addRecvBufRef(buf); + return req; } private native long iGather( @@ -1527,10 +1552,11 @@ public final Request iGatherv( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iGatherv( + Request req = new Request(iGatherv( handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, displs, recvtype.handle, root)); + req.addSendBufRef(sendbuf); + return req; } /** @@ -1553,9 +1579,10 @@ public final Request iGatherv(Buffer recvbuf, int[] recvcount, int[] displs, { MPI.check(); assertDirectBuffer(recvbuf); - - return new Request(iGatherv(handle, null, 0, 0, + Request req = new Request(iGatherv(handle, null, 0, 0, recvbuf, recvcount, displs, recvtype.handle, root)); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -1577,9 +1604,10 @@ public final Request iGatherv(Buffer sendbuf, int sendcount, { MPI.check(); assertDirectBuffer(sendbuf); - - return new Request(iGatherv(handle, sendbuf, sendcount, sendtype.handle, + Request req = new Request(iGatherv(handle, sendbuf, sendcount, sendtype.handle, null, null, null, 0, root)); + req.addSendBufRef(sendbuf); + return req; } private native long iGatherv( @@ -1686,9 +1714,11 @@ public final Request iScatter( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iScatter(handle, sendbuf, sendcount, sendtype.handle, + Request req = new Request(iScatter(handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, recvtype.handle, root)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -1709,9 +1739,10 @@ public final Request iScatter(Buffer buf, int count, Datatype type, int root) { MPI.check(); assertDirectBuffer(buf); - - return new Request(iScatter(handle, buf, count, type.handle, + Request req = new Request(iScatter(handle, buf, count, type.handle, null, 0, 0, root)); + req.addSendBufRef(buf); + return req; } private native long iScatter( @@ -1852,10 +1883,12 @@ public final Request iScatterv( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iScatterv( + Request req = new Request(iScatterv( handle, sendbuf, sendcount, displs, sendtype.handle, recvbuf, recvcount, recvtype.handle, root)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -1877,9 +1910,10 @@ public final Request iScatterv(Buffer sendbuf, int[] sendcount, int[] displs, { MPI.check(); assertDirectBuffer(sendbuf); - - return new Request(iScatterv(handle, sendbuf, sendcount, displs, + Request req = new Request(iScatterv(handle, sendbuf, sendcount, displs, sendtype.handle, null, 0, 0, root)); + req.addSendBufRef(sendbuf); + return req; } /** @@ -1900,9 +1934,10 @@ public final Request iScatterv(Buffer recvbuf, int recvcount, { MPI.check(); assertDirectBuffer(recvbuf); - - return new Request(iScatterv(handle, null, null, null, 0, + Request req = new Request(iScatterv(handle, null, null, null, 0, recvbuf, recvcount, recvtype.handle, root)); + req.addRecvBufRef(recvbuf); + return req; } private native long iScatterv( @@ -2002,9 +2037,11 @@ public final Request iAllGather( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllGather(handle, sendbuf, sendcount, sendtype.handle, + Request req = new Request(iAllGather(handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } @@ -2023,7 +2060,9 @@ public final Request iAllGather(Buffer buf, int count, Datatype type) { MPI.check(); assertDirectBuffer(buf); - return new Request(iAllGather(handle, null, 0, 0, buf, count, type.handle)); + Request req = new Request(iAllGather(handle, null, 0, 0, buf, count, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long iAllGather( @@ -2128,10 +2167,12 @@ public final Request iAllGatherv( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllGatherv( + Request req = new Request(iAllGatherv( handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, displs, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -2151,9 +2192,10 @@ public final Request iAllGatherv( { MPI.check(); assertDirectBuffer(buf); - - return new Request(iAllGatherv( + Request req = new Request(iAllGatherv( handle, null, 0, 0, buf, count, displs, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long iAllGatherv( @@ -2228,9 +2270,11 @@ public final Request iAllToAll(Buffer sendbuf, int sendcount, Datatype sendtype, { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllToAll(handle, sendbuf, sendcount, sendtype.handle, + Request req = new Request(iAllToAll(handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } private native long iAllToAll( @@ -2313,10 +2357,12 @@ public final Request iAllToAllv( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iAllToAllv( + Request req = new Request(iAllToAllv( handle, sendbuf, sendcount, sdispls, sendtype.handle, recvbuf, recvcount, rdispls, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } private native long iAllToAllv(long comm, @@ -2386,10 +2432,12 @@ public final Request iAllToAllw( long[] sendHandles = convertTypeArray(sendTypes); long[] recvHandles = convertTypeArray(recvTypes); - - return new Request(iAllToAllw( + Request req = new Request(iAllToAllw( handle, sendBuf, sendCount, sDispls, sendHandles, recvBuf, recvCount, rDispls, recvHandles)); + req.addSendBufRef(sendBuf); + req.addRecvBufRef(recvBuf); + return req; } private native long iAllToAllw(long comm, @@ -2463,10 +2511,12 @@ public final Request iNeighborAllGather( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iNeighborAllGather( + Request req = new Request(iNeighborAllGather( handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } private native long iNeighborAllGather( @@ -2541,10 +2591,12 @@ public final Request iNeighborAllGatherv( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iNeighborAllGatherv( + Request req = new Request(iNeighborAllGatherv( handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, displs, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } private native long iNeighborAllGatherv( @@ -2618,10 +2670,12 @@ public final Request iNeighborAllToAll( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iNeighborAllToAll( + Request req = new Request(iNeighborAllToAll( handle, sendbuf, sendcount, sendtype.handle, recvbuf, recvcount, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } private native long iNeighborAllToAll( @@ -2699,10 +2753,12 @@ public final Request iNeighborAllToAllv( { MPI.check(); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iNeighborAllToAllv( + Request req = new Request(iNeighborAllToAllv( handle, sendbuf, sendcount, sdispls, sendtype.handle, recvbuf, recvcount, rdispls, recvtype.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } private native long iNeighborAllToAllv( @@ -2816,10 +2872,12 @@ public final Request iReduce(Buffer sendbuf, Buffer recvbuf, MPI.check(); assertDirectBuffer(sendbuf, recvbuf); op.setDatatype(type); - - return new Request(iReduce( + Request req = new Request(iReduce( handle, sendbuf, recvbuf, count, type.handle, type.baseType, op, op.handle, root)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -2843,10 +2901,11 @@ public final Request iReduce(Buffer buf, int count, MPI.check(); assertDirectBuffer(buf); op.setDatatype(type); - - return new Request(iReduce( + Request req = new Request(iReduce( handle, null, buf, count, type.handle, type.baseType, op, op.handle, root)); + req.addSendBufRef(buf); + return req; } private native long iReduce( @@ -2947,9 +3006,11 @@ public final Request iAllReduce(Buffer sendbuf, Buffer recvbuf, MPI.check(); assertDirectBuffer(sendbuf, recvbuf); op.setDatatype(type); - - return new Request(iAllReduce(handle, sendbuf, recvbuf, count, + Request req = new Request(iAllReduce(handle, sendbuf, recvbuf, count, type.handle, type.baseType, op, op.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -2970,10 +3031,11 @@ public final Request iAllReduce(Buffer buf, int count, Datatype type, Op op) MPI.check(); op.setDatatype(type); assertDirectBuffer(buf); - - return new Request(iAllReduce( + Request req = new Request(iAllReduce( handle, null, buf, count, type.handle, type.baseType, op, op.handle)); + req.addRecvBufRef(buf); + return req; } private native long iAllReduce( @@ -3076,10 +3138,12 @@ public final Request iReduceScatter(Buffer sendbuf, Buffer recvbuf, MPI.check(); op.setDatatype(type); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iReduceScatter( + Request req = new Request(iReduceScatter( handle, sendbuf, recvbuf, recvcounts, type.handle, type.baseType, op, op.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -3102,10 +3166,11 @@ public final Request iReduceScatter( MPI.check(); op.setDatatype(type); assertDirectBuffer(buf); - - return new Request(iReduceScatter( + Request req = new Request(iReduceScatter( handle, null, buf, counts, type.handle, type.baseType, op, op.handle)); + req.addRecvBufRef(buf); + return req; } private native long iReduceScatter( @@ -3203,10 +3268,12 @@ public final Request iReduceScatterBlock( MPI.check(); op.setDatatype(type); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iReduceScatterBlock( + Request req = new Request(iReduceScatterBlock( handle, sendbuf, recvbuf, recvcount, type.handle, type.baseType, op, op.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -3227,10 +3294,11 @@ public final Request iReduceScatterBlock( MPI.check(); op.setDatatype(type); assertDirectBuffer(buf); - - return new Request(iReduceScatterBlock( + Request req = new Request(iReduceScatterBlock( handle, null, buf, count, type.handle, type.baseType, op, op.handle)); + req.addRecvBufRef(buf); + return req; } private native long iReduceScatterBlock( diff --git a/ompi/mpi/java/java/File.java b/ompi/mpi/java/java/File.java index 259511f3bdb..f2be9489c11 100644 --- a/ompi/mpi/java/java/File.java +++ b/ompi/mpi/java/java/File.java @@ -396,7 +396,9 @@ public Request iReadAt(long offset, Buffer buf, int count, Datatype type) { MPI.check(); assertDirectBuffer(buf); - return new Request(iReadAt(handle, offset, buf, count, type.handle)); + Request req = new Request(iReadAt(handle, offset, buf, count, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long iReadAt( @@ -417,7 +419,9 @@ public Request iWriteAt(long offset, Buffer buf, int count, Datatype type) { MPI.check(); assertDirectBuffer(buf); - return new Request(iWriteAt(handle, offset, buf, count, type.handle)); + Request req = new Request(iWriteAt(handle, offset, buf, count, type.handle)); + req.addSendBufRef(buf); + return req; } private native long iWriteAt( @@ -552,7 +556,9 @@ public Request iRead(Buffer buf, int count, Datatype type) throws MPIException { MPI.check(); assertDirectBuffer(buf); - return new Request(iRead(handle, buf, count, type.handle)); + Request req = new Request(iRead(handle, buf, count, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long iRead(long fh, Buffer buf, int count, long type) @@ -570,7 +576,9 @@ public Request iWrite(Buffer buf, int count, Datatype type) throws MPIException { MPI.check(); assertDirectBuffer(buf); - return new Request(iWrite(handle, buf, count, type.handle)); + Request req = new Request(iWrite(handle, buf, count, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long iWrite(long fh, Buffer buf, int count, long type) @@ -694,7 +702,9 @@ public Request iReadShared(Buffer buf, int count, Datatype type) { MPI.check(); assertDirectBuffer(buf); - return new Request(iReadShared(handle, buf, count, type.handle)); + Request req = new Request(iReadShared(handle, buf, count, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long iReadShared(long fh, Buffer buf, int count, long type) @@ -713,7 +723,9 @@ public Request iWriteShared(Buffer buf, int count, Datatype type) { MPI.check(); assertDirectBuffer(buf); - return new Request(iWriteShared(handle, buf, count, type.handle)); + Request req = new Request(iWriteShared(handle, buf, count, type.handle)); + req.addSendBufRef(buf); + return req; } private native long iWriteShared(long fh, Buffer buf, int count, long type) diff --git a/ompi/mpi/java/java/Intracomm.java b/ompi/mpi/java/java/Intracomm.java index f85a57bde91..05df66ee6e2 100644 --- a/ompi/mpi/java/java/Intracomm.java +++ b/ompi/mpi/java/java/Intracomm.java @@ -468,9 +468,11 @@ public final Request iScan(Buffer sendbuf, Buffer recvbuf, MPI.check(); op.setDatatype(type); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iScan(handle, sendbuf, recvbuf, count, + Request req = new Request(iScan(handle, sendbuf, recvbuf, count, type.handle, type.baseType, op, op.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -490,10 +492,11 @@ public final Request iScan(Buffer buf, int count, Datatype type, Op op) MPI.check(); op.setDatatype(type); assertDirectBuffer(buf); - - return new Request(iScan( + Request req = new Request(iScan( handle, null, buf, count, type.handle, type.baseType, op, op.handle)); + req.addSendBufRef(buf); + return req; } private native long iScan( @@ -592,9 +595,11 @@ public final Request iExScan(Buffer sendbuf, Buffer recvbuf, MPI.check(); op.setDatatype(type); assertDirectBuffer(sendbuf, recvbuf); - - return new Request(iExScan(handle, sendbuf, recvbuf, count, + Request req = new Request(iExScan(handle, sendbuf, recvbuf, count, type.handle, type.baseType, op, op.handle)); + req.addSendBufRef(sendbuf); + req.addRecvBufRef(recvbuf); + return req; } /** @@ -614,10 +619,11 @@ public final Request iExScan(Buffer buf, int count, Datatype type, Op op) MPI.check(); op.setDatatype(type); assertDirectBuffer(buf); - - return new Request(iExScan( + Request req = new Request(iExScan( handle, null, buf, count, type.handle, type.baseType, op, op.handle)); + req.addRecvBufRef(buf); + return req; } private native long iExScan( diff --git a/ompi/mpi/java/java/Message.java b/ompi/mpi/java/java/Message.java index e042b1c4020..54ffb8aa98e 100644 --- a/ompi/mpi/java/java/Message.java +++ b/ompi/mpi/java/java/Message.java @@ -152,7 +152,9 @@ public Request imRecv(Buffer buf, int count, Datatype type) { MPI.check(); assertDirectBuffer(buf); - return new Request(imRecv(handle, buf, count, type.handle)); + Request req = new Request(imRecv(handle, buf, count, type.handle)); + req.addRecvBufRef(buf); + return req; } private native long imRecv(long message, Object buf, int count, long type) diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index 19ebbae665a..9ec67be1437 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -63,12 +63,17 @@ package mpi; +import java.util.ArrayList; +import java.nio.Buffer; + /** * Request object. */ public class Request implements Freeable { protected long handle; + protected Buffer sendBuf; + protected Buffer recvBuf; static { @@ -112,6 +117,32 @@ public final void cancel() throws MPIException private native void cancel(long request) throws MPIException; + /** + * Adds a receive buffer to this Request object. This method + * should be called by the internal api whenever a persistent + * request is created and any time a request object, that has + * an associated buffer, is returned from an opperation to protect + * the buffer from getting prematurely garbage collected. + * @param buf buffer to add to the array list + */ + protected final void addRecvBufRef(Buffer buf) + { + this.recvBuf = buf; + } + + /** + * Adds a send buffer to this Request object. This method + * should be called by the internal api whenever a persistent + * request is created and any time a request object, that has + * an associated buffer, is returned from an opperation to protect + * the buffer from getting prematurely garbage collected. + * @param buf buffer to add to the array list + */ + protected final void addSendBufRef(Buffer buf) + { + this.sendBuf = buf; + } + /** * Test if request object is null. * @return true if the request object is null, false otherwise @@ -185,7 +216,7 @@ public final Status getStatus() throws MPIException } private native Status getStatus(long request) throws MPIException; - + /** * Returns true if the operation identified by the request * is complete, or false otherwise. diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index 09321e9de69..59f002d0fe6 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -569,10 +569,11 @@ public final Request rPut(Buffer origin_addr, int origin_count, { if(!origin_addr.isDirect()) throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rPut(handle, origin_addr, origin_count, + Request req = new Request(rPut(handle, origin_addr, origin_count, origin_datatype.handle, target_rank, target_disp, target_count, target_datatype.handle, getBaseType(origin_datatype, target_datatype))); + req.addSendBufRef(origin_addr); + return req; } private native long rPut(long win, Buffer origin_addr, int origin_count, @@ -601,10 +602,11 @@ public final Request rGet(Buffer origin, int orgCount, Datatype orgType, if(!origin.isDirect()) throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rGet(handle, origin, orgCount, orgType.handle, + Request req = new Request(rGet(handle, origin, orgCount, orgType.handle, targetRank, targetDisp, targetCount, targetType.handle, getBaseType(orgType, targetType))); + req.addRecvBufRef(origin); + return req; } private native long rGet( @@ -634,10 +636,11 @@ public Request rAccumulate(Buffer origin, int orgCount, Datatype orgType, if(!origin.isDirect()) throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rAccumulate(handle, origin, orgCount, orgType.handle, + Request req = new Request(rAccumulate(handle, origin, orgCount, orgType.handle, targetRank, targetDisp, targetCount, targetType.handle, op, op.handle, getBaseType(orgType, targetType))); + req.addSendBufRef(origin); + return req; } private native long rAccumulate( @@ -711,11 +714,12 @@ public Request rGetAccumulate(Buffer origin, int orgCount, Datatype orgType, if(!origin.isDirect()) throw new IllegalArgumentException("The origin must be direct buffer."); - - return new Request(rGetAccumulate(handle, origin, orgCount, orgType.handle, + Request req = new Request(rGetAccumulate(handle, origin, orgCount, orgType.handle, resultAddr, resultCount, resultType.handle, targetRank, targetDisp, targetCount, targetType.handle, op, op.handle, getBaseType(orgType, targetType))); + req.addRecvBufRef(origin); + return req; } private native long rGetAccumulate( From 996821c7e0e5b306321475f07f6049d7d797f9b5 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 20 Aug 2015 12:47:01 -0600 Subject: [PATCH 0174/1704] Code cleanup Removing the ArrayList import which is no longer needed. --- ompi/mpi/java/java/Request.java | 1 - 1 file changed, 1 deletion(-) diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index 9ec67be1437..a33b8365563 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -63,7 +63,6 @@ package mpi; -import java.util.ArrayList; import java.nio.Buffer; /** From 79459e804a1bfdfa06e8365dd151a9e42f160053 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 24 Aug 2015 12:21:49 -0600 Subject: [PATCH 0175/1704] btl/openib: add missing lock calls master commit open-mpi/ompi@8205d79819b8ec3369c003f7d26e463c8f7ab4de Signed-off-by: Nathan Hjelm --- opal/mca/btl/openib/connect/btl_openib_connect_udcm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c index 85113739a02..f34bf084d9b 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c @@ -554,6 +554,8 @@ static int udcm_endpoint_init_self_xrc (struct mca_btl_base_endpoint_t *lcl_ep) lcl_ep->endpoint_state = MCA_BTL_IB_CONNECTED; + /* need to hold the endpoint lock before calling udcm_finish_connection */ + OPAL_THREAD_LOCK(&lcl_ep->endpoint_lock); rc = udcm_finish_connection (lcl_ep); } while (0); opal_mutex_unlock (&udep->udep_lock); @@ -594,6 +596,8 @@ static int udcm_endpoint_init_self (struct mca_btl_base_endpoint_t *lcl_ep) lcl_ep->endpoint_state = MCA_BTL_IB_CONNECTED; + /* need to hold the endpoint lock before calling udcm_finish_connection */ + OPAL_THREAD_LOCK(&lcl_ep->endpoint_lock); rc = udcm_finish_connection (lcl_ep); return OPAL_SUCCESS; From 252cb1e3d04ac695929f56d04eb328c5a32ce255 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 25 Aug 2015 09:53:25 -0400 Subject: [PATCH 0176/1704] README: minor re-flowing on extra-long lines No other content changes; just re-flowing of long lines. (cherry picked from commit open-mpi/ompi@e2124c61fee7bd5a156c90d559ba15f6ded34d53) --- README | 63 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/README b/README index 4707eaa1863..d542f6de9dc 100644 --- a/README +++ b/README @@ -527,37 +527,39 @@ MPI Collectives MPI process onto Mellanox QDR InfiniBand switch CPUs and HCAs. - The "ML" coll component is an implementation of MPI collective - operations that takes advantage of communication hierarchies - in modern systems. A ML collective operation is implemented by + operations that takes advantage of communication hierarchies in + modern systems. A ML collective operation is implemented by combining multiple independently progressing collective primitives implemented over different communication hierarchies, hence a ML - collective operation is also referred to as a hierarchical collective - operation. The number of collective primitives that are included in a - ML collective operation is a function of subgroups(hierarchies). - Typically, MPI processes in a single communication hierarchy such as - CPU socket, node, or subnet are grouped together into a single subgroup - (hierarchy). The number of subgroups are configurable at runtime, - and each different collective operation could be configured to have - a different of number of subgroups. + collective operation is also referred to as a hierarchical + collective operation. The number of collective primitives that are + included in a ML collective operation is a function of + subgroups(hierarchies). Typically, MPI processes in a single + communication hierarchy such as CPU socket, node, or subnet are + grouped together into a single subgroup (hierarchy). The number of + subgroups are configurable at runtime, and each different collective + operation could be configured to have a different of number of + subgroups. The component frameworks and components used by/required for a "ML" collective operation. Frameworks: - * "sbgp" - Provides functionality for grouping processes into subgroups + * "sbgp" - Provides functionality for grouping processes into + subgroups * "bcol" - Provides collective primitives optimized for a particular communication hierarchy Components: - * sbgp components - Provides grouping functionality over a CPU socket - ("basesocket"), shared memory ("basesmuma"), - Mellanox's ConnectX HCA ("ibnet"), and other - interconnects supported by PML ("p2p") - - * BCOL components - Provides optimized collective primitives for - shared memory ("basesmuma"), Mellanox's ConnectX - HCA ("iboffload"), and other interconnects supported - by PML ("ptpcoll") + * sbgp components - Provides grouping functionality over a CPU + socket ("basesocket"), shared memory + ("basesmuma"), Mellanox's ConnectX HCA + ("ibnet"), and other interconnects supported by + PML ("p2p") + * BCOL components - Provides optimized collective primitives for + shared memory ("basesmuma"), Mellanox's ConnectX + HCA ("iboffload"), and other interconnects + supported by PML ("ptpcoll") - The "cuda" coll component provides CUDA-aware support for the reduction type collectives with GPU buffers. This component is only @@ -997,10 +999,11 @@ RUN-TIME SYSTEM SUPPORT most cases. This option is only needed for special configurations. --with-pmi - Build PMI support (by default on non-Cray XE/XC systems, it is not built). - On Cray XE/XC systems, the location of pmi is detected automatically as - part of the configure process. For non-Cray systems, if the pmi2.h header - is found in addition to pmi.h, then support for PMI2 will be built. + Build PMI support (by default on non-Cray XE/XC systems, it is not + built). On Cray XE/XC systems, the location of pmi is detected + automatically as part of the configure process. For non-Cray + systems, if the pmi2.h header is found in addition to pmi.h, then + support for PMI2 will be built. --with-slurm Force the building of SLURM scheduler support. @@ -1631,9 +1634,9 @@ Open MPI API Extensions ----------------------- Open MPI contains a framework for extending the MPI API that is -available to applications. Each extension is usually a standalone set of -functionality that is distinct from other extensions (similar to how -Open MPI's plugins are usually unrelated to each other). These +available to applications. Each extension is usually a standalone set +of functionality that is distinct from other extensions (similar to +how Open MPI's plugins are usually unrelated to each other). These extensions provide new functions and/or constants that are available to MPI applications. @@ -1951,9 +1954,9 @@ Here's how the three sub-groups are defined: get their MPI/OSHMEM application to run correctly. 2. Application tuner: Generally, these are parameters that can be used to tweak MPI application performance. - 3. MPI/OSHMEM developer: Parameters that either don't fit in the other two, - or are specifically intended for debugging / development of Open - MPI itself. + 3. MPI/OSHMEM developer: Parameters that either don't fit in the + other two, or are specifically intended for debugging / + development of Open MPI itself. Each sub-group is broken down into three classifications: From 6e94214f998e082f609378c25e8e943a8ad14d94 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 19 Aug 2015 16:37:35 -0500 Subject: [PATCH 0177/1704] first cut on the fileview for shared filepointers fix. --- ompi/mca/io/ompio/io_ompio.c | 21 +-- ompi/mca/io/ompio/io_ompio_file_set_view.c | 147 ++++++++++--------- ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c | 13 +- 3 files changed, 98 insertions(+), 83 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index e04328ce127..68888115f95 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -106,7 +106,7 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh) { if (NULL != fh) { - ompi_datatype_t *types[2], *default_file_view; + ompi_datatype_t *types[2]; int blocklen[2] = {1, 1}; OPAL_PTRDIFF_TYPE d[2], base; int i; @@ -132,27 +132,22 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh) fh->f_init_num_aggrs = -1; fh->f_init_aggr_list = NULL; - ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE, - &ompi_mpi_byte.dt, - &default_file_view); - ompi_datatype_commit (&default_file_view); - - fh->f_etype = &ompi_mpi_byte.dt; - fh->f_filetype = default_file_view; - ompi_datatype_duplicate ( &ompi_mpi_byte.dt, &fh->f_orig_filetype ); - /* Default file View */ fh->f_iov_type = MPI_DATATYPE_NULL; fh->f_stripe_size = mca_io_ompio_bytes_per_agg; /*Decoded iovec of the file-view*/ fh->f_decoded_iov = NULL; - + + fh->f_etype = NULL; + fh->f_filetype = NULL; + fh->f_orig_filetype = NULL; + mca_io_ompio_set_view_internal(fh, 0, &ompi_mpi_byte.dt, - default_file_view, - "native", + &ompi_mpi_byte.dt, + "native", fh->f_info); diff --git a/ompi/mca/io/ompio/io_ompio_file_set_view.c b/ompi/mca/io/ompio/io_ompio_file_set_view.c index a45e2acf7bc..e4ac2bbce20 100644 --- a/ompi/mca/io/ompio/io_ompio_file_set_view.c +++ b/ompi/mca/io/ompio/io_ompio_file_set_view.c @@ -28,6 +28,7 @@ #include "ompi/mca/fs/base/base.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/base.h" +#include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/pml/pml.h" #include "opal/datatype/opal_convertor.h" #include "ompi/datatype/ompi_datatype.h" @@ -53,30 +54,72 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, int num_groups = 0; contg *contg_groups; + size_t ftype_size; + OPAL_PTRDIFF_TYPE ftype_extent, lb, ub; + ompi_datatype_t *newfiletype; + + if ( NULL != fh->f_etype ) { + ompi_datatype_destroy (&fh->f_etype); + } + if ( NULL != fh->f_filetype ) { + ompi_datatype_destroy (&fh->f_filetype); + } + if ( NULL != fh->f_orig_filetype ) { + ompi_datatype_destroy (&fh->f_orig_filetype); + } + if (NULL != fh->f_decoded_iov) { + free (fh->f_decoded_iov); + fh->f_decoded_iov = NULL; + } + + if (NULL != fh->f_datarep) { + free (fh->f_datarep); + fh->f_datarep = NULL; + } + + /* Reset the flags first */ + fh->f_flags = 0; + fh->f_flags |= OMPIO_FILE_VIEW_IS_SET; + fh->f_datarep = strdup (datarep); + ompi_datatype_duplicate (filetype, &fh->f_orig_filetype ); + + opal_datatype_get_extent(&filetype->super, &lb, &ftype_extent); + opal_datatype_type_size (&filetype->super, &ftype_size); + + if ( etype == filetype && + ompi_datatype_is_predefined (filetype ) && + ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){ + ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE, + &ompi_mpi_byte.dt, + &newfiletype); + ompi_datatype_commit (&newfiletype); + } + else { + newfiletype = filetype; + } - MPI_Aint lb,ub; fh->f_iov_count = 0; fh->f_disp = disp; fh->f_offset = disp; fh->f_total_bytes = 0; - - ompi_io_ompio_decode_datatype (fh, - filetype, - 1, - NULL, + + ompi_io_ompio_decode_datatype (fh, + newfiletype, + 1, + NULL, &max_data, &fh->f_decoded_iov, &fh->f_iov_count); - opal_datatype_get_extent(&filetype->super, &lb, &fh->f_view_extent); - opal_datatype_type_ub (&filetype->super, &ub); + opal_datatype_get_extent(&newfiletype->super, &lb, &fh->f_view_extent); + opal_datatype_type_ub (&newfiletype->super, &ub); opal_datatype_type_size (&etype->super, &fh->f_etype_size); - opal_datatype_type_size (&filetype->super, &fh->f_view_size); + opal_datatype_type_size (&newfiletype->super, &fh->f_view_size); ompi_datatype_duplicate (etype, &fh->f_etype); - ompi_datatype_duplicate (filetype, &fh->f_filetype); - + ompi_datatype_duplicate (newfiletype, &fh->f_filetype); + fh->f_cc_size = get_contiguous_chunk_size (fh); if (opal_datatype_is_contiguous_memory_layout(&etype->super,1)) { @@ -86,7 +129,6 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, } } - contg_groups = (contg*) calloc ( 1, fh->f_size * sizeof(contg)); if (NULL == contg_groups) { opal_output (1, "OUT OF MEMORY\n"); @@ -104,6 +146,7 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, return OMPI_ERR_OUT_OF_RESOURCE; } } + if( OMPI_SUCCESS != mca_io_ompio_fview_based_grouping(fh, &num_groups, contg_groups)){ @@ -121,7 +164,18 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, free(contg_groups[i].procs_in_contg_group); } free(contg_groups); - + + if ( etype == filetype && + ompi_datatype_is_predefined (filetype ) && + ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){ + ompi_datatype_destroy ( &newfiletype ); + } + + + if (OMPI_SUCCESS != mca_fcoll_base_file_select (fh, NULL)) { + opal_output(1, "mca_fcoll_base_file_select() failed\n"); + return OMPI_ERROR; + } return OMPI_SUCCESS; } @@ -133,70 +187,25 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, char *datarep, ompi_info_t *info) { + int ret=OMPI_SUCCESS; mca_io_ompio_data_t *data; mca_io_ompio_file_t *fh; - size_t ftype_size; - OPAL_PTRDIFF_TYPE ftype_extent, lb; + mca_io_ompio_file_t *sh; data = (mca_io_ompio_data_t *) fp->f_io_selected_data; - fh = &data->ompio_fh; - - ompi_datatype_destroy (&fh->f_etype); - ompi_datatype_destroy (&fh->f_filetype); - ompi_datatype_destroy (&fh->f_orig_filetype); - - if (NULL != fh->f_decoded_iov) { - free (fh->f_decoded_iov); - fh->f_decoded_iov = NULL; - } - - if (NULL != fh->f_datarep) { - free (fh->f_datarep); - fh->f_datarep = NULL; - } - - /* Reset the flags first */ - fh->f_flags = 0; - fh->f_flags |= OMPIO_FILE_VIEW_IS_SET; - fh->f_datarep = strdup (datarep); - ompi_datatype_duplicate (filetype, &fh->f_orig_filetype ); - - opal_datatype_get_extent(&filetype->super, &lb, &ftype_extent); - opal_datatype_type_size (&filetype->super, &ftype_size); - - if ( etype == filetype && - ompi_datatype_is_predefined (filetype ) && - ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){ - ompi_datatype_t *newfiletype; - ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE, - &ompi_mpi_byte.dt, - &newfiletype); - ompi_datatype_commit (&newfiletype); - mca_io_ompio_set_view_internal (fh, - disp, - etype, - newfiletype, - datarep, - info); - ompi_datatype_destroy ( &newfiletype ); - } - else { - mca_io_ompio_set_view_internal (fh, - disp, - etype, - filetype, - datarep, - info); - } + /* we need to call the internal file set view twice: once for the individual + file pointer, once for the shared file pointer (if it is existent) + */ + fh = &data->ompio_fh; + ret = mca_io_ompio_set_view_internal(fh, disp, etype, filetype, datarep, info); - if (OMPI_SUCCESS != mca_fcoll_base_file_select (&data->ompio_fh, - NULL)) { - opal_output(1, "mca_fcoll_base_file_select() failed\n"); - return OMPI_ERROR; + if ( NULL != fh->f_sharedfp_data) { + sh = ((struct mca_sharedfp_base_data_t *)fh->f_sharedfp_data)->sharedfh; + ret = mca_io_ompio_set_view_internal(sh, disp, etype, filetype, datarep, info); } - return OMPI_SUCCESS; + return ret; } int mca_io_ompio_file_get_view (struct ompi_file_t *fp, diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c index 599c4d35d78..a9ba2c1fa1b 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c @@ -52,11 +52,12 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, int err = OMPI_SUCCESS; struct mca_sharedfp_base_data_t* sh; struct mca_sharedfp_sm_data * sm_data = NULL; - mca_io_ompio_file_t * shfileHandle; + mca_io_ompio_file_t * shfileHandle, *ompio_fh; char * filename_basename; char * sm_filename; struct mca_sharedfp_sm_offset * sm_offset_ptr; struct mca_sharedfp_sm_offset sm_offset; + mca_io_ompio_data_t *data; int sm_fd; int rank; @@ -74,6 +75,16 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, free (shfileHandle); return err; } + shfileHandle->f_fh = fh->f_fh; + data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data; + ompio_fh = &data->ompio_fh; + + err = mca_io_ompio_set_view_internal (shfileHandle, + ompio_fh->f_disp, + ompio_fh->f_etype, + ompio_fh->f_orig_filetype, + ompio_fh->f_datarep, + MPI_INFO_NULL); /*Memory is allocated here for the sh structure*/ if ( mca_sharedfp_sm_verbose ) { From 19e5c8a80a283858990ab0d9d232e0ad22e9613e Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 19 Aug 2015 17:09:18 -0500 Subject: [PATCH 0178/1704] the offset provided to the read_at/write_at routines has to be a multiple of the etype. --- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 3 +++ ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c | 7 +++++-- ompi/mca/sharedfp/sm/sharedfp_sm_read.c | 3 +++ ompi/mca/sharedfp/sm/sharedfp_sm_write.c | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index 7a82f5839fa..439b409c1d7 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -70,6 +70,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, } /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); + offset /= sh->sharedfh->f_etype_size; if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { @@ -193,6 +194,8 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; + if ( mca_sharedfp_sm_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_read_ordered_begin: Offset returned is %lld\n",offset); diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c index f8e2af33af9..fbf9a40ce03 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c @@ -70,8 +70,9 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, } /* Request the offset to write bytesRequested bytes */ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); - - if ( -1 != ret ) { + offset /= sh->sharedfh->f_etype_size; + + if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_iwrite: Offset received is %lld\n",offset); @@ -194,6 +195,8 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; + if ( mca_sharedfp_sm_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_write_ordered_begin: Offset returned is %lld\n",offset); diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c index d49ffae4251..8f2cd77426a 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c @@ -68,6 +68,7 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); + offset /= sh->sharedfh->f_etype_size; if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { @@ -186,6 +187,8 @@ int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; + if ( mca_sharedfp_sm_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_read_ordered: Offset returned is %lld\n",offset); diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c index 4be286f53f6..430f6ad9b36 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c @@ -71,6 +71,7 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); + offset /= sh->sharedfh->f_etype_size; if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, @@ -192,6 +193,7 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, /* Each process now has its own individual offset */ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_sm_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, From bd345c142c1bf4766d4209b790b7d9c77e2441e1 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 19 Aug 2015 17:09:47 -0500 Subject: [PATCH 0179/1704] the back pointer from the ompio_file structure to the ompi_file_t structure has to be set earlier in case the user disables the lazy_open option. --- ompi/mca/io/ompio/io_ompio_file_open.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index 4ef690c63e0..b706789cdc4 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -53,14 +53,13 @@ mca_io_ompio_file_open (ompi_communicator_t *comm, return OMPI_ERR_OUT_OF_RESOURCE; } - + /*save pointer back to the file_t structure */ + data->ompio_fh.f_fh = fh; ret = ompio_io_ompio_file_open(comm,filename,amode,info,&data->ompio_fh,use_sharedfp); if ( OMPI_SUCCESS == ret ) { fh->f_flags |= OMPIO_FILE_IS_OPEN; - /*save pointer back to the file_t structure */ - data->ompio_fh.f_fh = fh; } From de3536f5e4a9184d5c1472b5168eceb9e73147a6 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 20 Aug 2015 09:26:30 -0500 Subject: [PATCH 0180/1704] bring the lockedfile component up to date with the fileview changes. --- .../lockedfile/sharedfp_lockedfile_file_open.c | 14 +++++++++++++- .../lockedfile/sharedfp_lockedfile_iread.c | 3 +++ .../lockedfile/sharedfp_lockedfile_iwrite.c | 3 +++ .../sharedfp/lockedfile/sharedfp_lockedfile_read.c | 3 +++ .../lockedfile/sharedfp_lockedfile_write.c | 3 +++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c index 441457e59dd..0721fc8341b 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c @@ -44,7 +44,8 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, int handle, rank; struct mca_sharedfp_lockedfile_data * module_data = NULL; struct mca_sharedfp_base_data_t* sh; - mca_io_ompio_file_t * shfileHandle; + mca_io_ompio_file_t * shfileHandle, *ompio_fh; + mca_io_ompio_data_t *data; /*------------------------------------------------------------*/ /*Open the same file again without shared file pointer support*/ @@ -55,6 +56,17 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, opal_output(0, "mca_sharedfp_lockedfile_file_open: Error during file open\n"); return err; } + shfileHandle->f_fh = fh->f_fh; + data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data; + ompio_fh = &data->ompio_fh; + + err = mca_io_ompio_set_view_internal (shfileHandle, + ompio_fh->f_disp, + ompio_fh->f_etype, + ompio_fh->f_orig_filetype, + ompio_fh->f_datarep, + MPI_INFO_NULL); + /*Memory is allocated here for the sh structure*/ sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t)); diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c index 23d31e60e1c..96e7ec86334 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c @@ -73,6 +73,8 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset); + offset /= sh->sharedfh->f_etype_size; + if ( -1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, @@ -196,6 +198,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c index bb8490da1c8..e5795f84d59 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c @@ -71,6 +71,8 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset); + offset /= sh->sharedfh->f_etype_size; + if ( -1 != ret) { if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, @@ -193,6 +195,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c index 65cb4b17ff1..e499afd0a9e 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c @@ -68,6 +68,8 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, /*Request the offset to write bytesRequested bytes*/ ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset); + offset /= sh->sharedfh->f_etype_size; + if (-1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, @@ -182,6 +184,7 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c index e504f998bfa..13e5daf81f8 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c @@ -70,6 +70,8 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, /* Request the offset to write bytesRequested bytes */ ret = mca_sharedfp_lockedfile_request_position ( sh, bytesRequested, &offset); + offset /= sh->sharedfh->f_etype_size; + if (-1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, @@ -187,6 +189,7 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, /*Each process now has its own individual offset*/ offset = offsetBuff - sendBuff; + offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_lockedfile_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, From 374ec8b1344e8fc9dc964664c32a8e31d9da0212 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 24 Aug 2015 08:40:10 -0500 Subject: [PATCH 0181/1704] fix coverty warning CID 1317091 (properly freeing variables in case of an error) --- .../sharedfp_individual_file_open.c | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c index 28a40ced62a..17a54028c79 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c @@ -49,6 +49,11 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, /*Open the same file again without shared file pointer*/ /*-------------------------------------------------*/ shfileHandle = (mca_io_ompio_file_t *) malloc ( sizeof(mca_io_ompio_file_t)); + if ( NULL == shfileHandle ) { + opal_output(0, "mca_sharedfp_individual_file_open: unable to allocate memory\n"); + return OMPI_ERR_OUT_OF_RESOURCE; + } + err = ompio_io_ompio_file_open ( comm, filename, amode, info, shfileHandle, false); if ( OMPI_SUCCESS != err ) { opal_output(0, "mca_sharedfp_individual_file_open: Error during file open\n"); @@ -59,7 +64,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, if ( NULL == sh ){ opal_output(0, "mca_sharedfp_individual_file_open: Error, unable to malloc " "f_sharedfp_ptr struct\n"); - free (shfileHandle ); + free ( shfileHandle ); return OMPI_ERR_OUT_OF_RESOURCE; } @@ -86,10 +91,23 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, /* data filename created by appending .data.$rank to the original filename*/ len = strlen (filename ) + 64; datafilename = (char*)malloc( len ); + if ( NULL == datafilename ) { + opal_output(0, "mca_sharedfp_individual_file_open: unable to allocate memory\n"); + free ( shfileHandle ); + free ( sh ); + return OMPI_ERR_OUT_OF_RESOURCE; + } snprintf(datafilename, len, "%s%s%d",filename,".data.",rank); datafilehandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + if ( NULL == datafilehandle ) { + opal_output(0, "mca_sharedfp_individual_file_open: unable to allocate memory\n"); + free ( shfileHandle ); + free ( sh ); + free ( datafilename ); + return OMPI_ERR_OUT_OF_RESOURCE; + } err = ompio_io_ompio_file_open(MPI_COMM_SELF, datafilename, MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, datafilehandle, false); @@ -97,6 +115,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, opal_output(0, "mca_sharedfp_individual_file_open: Error during datafile file open\n"); free (shfileHandle ); free (sh); + free (datafilename); + free (datafilehandle); return err; } @@ -114,6 +134,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, if ( NULL == metadatafilename ) { free (shfileHandle ); free (sh); + free (datafilename); + free (datafilehandle); opal_output(0, "mca_sharedfp_individual_file_open: Error during memory allocation\n"); return OMPI_ERR_OUT_OF_RESOURCE; } @@ -123,6 +145,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, if ( NULL == metadatafilehandle ) { free (shfileHandle ); free (sh); + free (datafilename); + free (datafilehandle); free (metadatafilename); opal_output(0, "mca_sharedfp_individual_file_open: Error during memory allocation\n"); return OMPI_ERR_OUT_OF_RESOURCE; @@ -134,6 +158,8 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, opal_output(0, "mca_sharedfp_individual_file_open: Error during metadatafile file open\n"); free (shfileHandle ); free (sh); + free (datafilename); + free (datafilehandle); free (metadatafilename); free (metadatafilehandle); return err; From e2f6483decb24ee91577eef8b50d8810587d93ad Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 24 Aug 2015 14:13:37 -0500 Subject: [PATCH 0182/1704] correctly free some arrays in case of an error. This fixes a whole bunch of coverty warnings. --- .../dynamic/fcoll_dynamic_file_read_all.c | 30 ++++++++++++++++ .../dynamic/fcoll_dynamic_file_write_all.c | 34 +++++++++++++++++-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c index bccd9d7420f..7b1de72103d 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c @@ -851,6 +851,16 @@ #endif exit: + if (!(fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { + if (NULL != receive_buf) { + free (receive_buf); + receive_buf = NULL; + } + } + if (NULL != global_buf) { + free (global_buf); + global_buf = NULL; + } if (NULL != sorted) { free (sorted); sorted = NULL; @@ -878,6 +888,26 @@ } if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + if (NULL != sorted_file_offsets){ + free(sorted_file_offsets); + sorted_file_offsets = NULL; + } + if (NULL != file_offsets_for_agg){ + free(file_offsets_for_agg); + file_offsets_for_agg = NULL; + } + if (NULL != memory_displacements){ + free(memory_displacements); + memory_displacements= NULL; + } + if (NULL != sendtype){ + for (i = 0; i < fh->f_procs_per_group; i++) { + ompi_datatype_destroy(sendtype+i); + } + free(sendtype); + sendtype=NULL; + } + if (NULL != disp_index){ free(disp_index); disp_index = NULL; diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c index 859ec9de93e..e9f4aa329db 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c @@ -1,4 +1,4 @@ -/* +* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. @@ -992,6 +992,26 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, exit : if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + if (NULL != sorted_file_offsets){ + free(sorted_file_offsets); + sorted_file_offsets = NULL; + } + if(NULL != file_offsets_for_agg){ + free(file_offsets_for_agg); + file_offsets_for_agg = NULL; + } + if (NULL != memory_displacements){ + free(memory_displacements); + memory_displacements = NULL; + } + if (NULL != recvtype){ + for (i =0; i< fh->f_procs_per_group; i++) { + ompi_datatype_destroy(recvtype+i); + } + free(recvtype); + recvtype=NULL; + } + if (NULL != fh->f_io_array) { free (fh->f_io_array); fh->f_io_array = NULL; @@ -1032,7 +1052,17 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } } - + + if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { + if (NULL != send_buf) { + free (send_buf); + send_buf = NULL; + } + } + if (NULL != global_buf) { + free (global_buf); + global_buf = NULL; + } if (NULL != sorted) { free (sorted); sorted = NULL; From db3be43b85f787030ac823aff497ace3a8386bc8 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Tue, 25 Aug 2015 08:46:38 -0500 Subject: [PATCH 0183/1704] last nights coverty fix introduced a new coverty complain. This commit tries to fix the new complain by coverty. --- .../fcoll/dynamic/fcoll_dynamic_file_read_all.c | 13 +++++++++---- .../fcoll/dynamic/fcoll_dynamic_file_write_all.c | 14 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c index 7b1de72103d..b9f4ad77e7b 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c @@ -350,7 +350,7 @@ } for(l=0;lf_procs_per_group;l++){ - + sendtype[l] = MPI_DATATYPE_NULL; disp_index[l] = 1; if (NULL != blocklen_per_process[l]){ @@ -804,8 +804,11 @@ free (global_buf); global_buf = NULL; } - for (i = 0; i < fh->f_procs_per_group; i++) - ompi_datatype_destroy(sendtype+i); + for (i = 0; i < fh->f_procs_per_group; i++) { + if ( MPI_DATATYPE_NULL != sendtype[i] ){ + ompi_datatype_destroy(&sendtype[i]); + } + } if (NULL != sendtype){ free(sendtype); sendtype=NULL; @@ -902,7 +905,9 @@ } if (NULL != sendtype){ for (i = 0; i < fh->f_procs_per_group; i++) { - ompi_datatype_destroy(sendtype+i); + if ( MPI_DATATYPE_NULL != sendtype[i] ) { + ompi_datatype_destroy(&sendtype[i]); + } } free(sendtype); sendtype=NULL; diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c index e9f4aa329db..7117dd476de 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c @@ -1,4 +1,4 @@ -* +/* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. @@ -372,6 +372,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } for(l=0;lf_procs_per_group;l++){ + recvtype[i] = MPI_DATATYPE_NULL; disp_index[l] = 1; if (NULL != blocklen_per_process[l]){ @@ -952,9 +953,12 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, free (fh->f_io_array); fh->f_io_array = NULL; } - for (i =0; i< fh->f_procs_per_group; i++) - ompi_datatype_destroy(recvtype+i); if (NULL != recvtype){ + for (i =0; i< fh->f_procs_per_group; i++) { + if ( MPI_DATATYPE_NULL != recvtype[i] ) { + ompi_datatype_destroy(&recvtype[i]); + } + } free(recvtype); recvtype=NULL; } @@ -1006,7 +1010,9 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } if (NULL != recvtype){ for (i =0; i< fh->f_procs_per_group; i++) { - ompi_datatype_destroy(recvtype+i); + if ( MPI_DATATYPE_NULL != recvtype[i] ) { + ompi_datatype_destroy(&recvtype[i]); + } } free(recvtype); recvtype=NULL; From 4c6c0afe91b54cd392812ba44c1848aa9d613390 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Tue, 25 Aug 2015 09:22:48 -0500 Subject: [PATCH 0184/1704] fix coverty warning 1269829 --- ompi/mca/io/ompio/io_ompio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 68888115f95..44b2b3ab51b 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -420,6 +420,18 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, } } fp = fopen("fileview_info.out", "w+"); + if ( NULL == fp ) { + for (i=0; if_size; i++) { + free(adj_matrix[i]); + } + free(adj_matrix); + free(sorted); + free(all_process); + free(per_process); + free(recvcounts); + free(displs); + return MPI_ERR_OTHER; + } fprintf(fp,"FILEVIEW\n"); column_list = (int *) malloc ( m * sizeof(int)); if (NULL == column_list){ From f6b3df21d2813f93a7e422717a1a226add0419ed Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Tue, 25 Aug 2015 09:23:37 -0500 Subject: [PATCH 0185/1704] fix coverty warning 72107 --- ompi/mca/io/ompio/io_ompio.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 44b2b3ab51b..4c0846bc927 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -1452,10 +1452,14 @@ int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh, } */ exit: - for (i=0 ; i Date: Tue, 25 Aug 2015 07:12:18 -0700 Subject: [PATCH 0186/1704] ompi_setup_mpi_fortran.m4: only set BUILD_SIZEOF if happy=1 Only set OMPI_FORTRAN_BUILD_SIZEOF to 1 if $ompi_fortran_happy is also 1 (i.e., we're building the Fortran interface). This prevents building [p]size_f.f90 and trying to compile it if there is no Fortran compiler, for example. (cherry picked from commit 93708af0139f00a4bebda1e3de4b14b77240eda2) --- config/ompi_setup_mpi_fortran.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/ompi_setup_mpi_fortran.m4 b/config/ompi_setup_mpi_fortran.m4 index c1f195b46bc..08f98472bc0 100644 --- a/config/ompi_setup_mpi_fortran.m4 +++ b/config/ompi_setup_mpi_fortran.m4 @@ -309,7 +309,8 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ # We need INTERFACE, ISO_FORTRAN_ENV, and STORAGE_SIZE() support # to build MPI_SIZEOF support - AS_IF([test $OMPI_FORTRAN_HAVE_INTERFACE -eq 1 && \ + AS_IF([test $ompi_fortran_happy -eq 1 && \ + test $OMPI_FORTRAN_HAVE_INTERFACE -eq 1 && \ test $OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV -eq 1 && \ test $OMPI_FORTRAN_HAVE_STORAGE_SIZE -eq 1], [OMPI_FORTRAN_BUILD_SIZEOF=1], From a497bc9e9a02bd688751f77298b3864ddf082026 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 25 Aug 2015 07:13:34 -0700 Subject: [PATCH 0187/1704] Fortran: remove dead Makefile.am code (cherry picked from commit 42a761e0525b2a38b473e8fcc4b457f00250321e) --- ompi/mpi/fortran/mpif-h/profile/Makefile.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index def266be9e8..3d502d62145 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -45,8 +45,6 @@ AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=1 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1 noinst_LTLIBRARIES = if BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER noinst_LTLIBRARIES += libmpi_mpifh_pmpi.la -else -noinst_LTLIBRARIES += endif headers = \ From 87c0cfbbd097f1398d78cdfe86d32ccc0b28bd9c Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 25 Aug 2015 07:13:52 -0700 Subject: [PATCH 0188/1704] Fortran: these lines should not be commented out (cherry picked from commit 2cfdeff38dda51371e720811d3f0a55428b46cbb) --- ompi/mpi/fortran/mpif-h/profile/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 3d502d62145..26ba8e6b436 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -435,12 +435,12 @@ CLEANFILES += psizeof_f.f90 # Build the MPI_SIZEOF code in a separate convenience library (see # lengthy comment in ompi/mpi/fortran/mpif-h/Makefile.am for an # explanation why). -#if BUILD_FORTRAN_SIZEOF +if BUILD_FORTRAN_SIZEOF noinst_LTLIBRARIES += libmpi_mpifh_psizeof.la # Do not dist this file; it is generated nodist_libmpi_mpifh_psizeof_la_SOURCES = psizeof_f.f90 libmpi_mpifh_pmpi_la_LIBADD += libmpi_mpifh_psizeof.la -#endif +endif sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl From 6bfca9814ceca06225742e848b471616ce2d6b90 Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Fri, 31 Jul 2015 21:32:54 +0300 Subject: [PATCH 0189/1704] oshmem: Move help file for oshmem api one level up to meet ompi structure Signed-off-by: Igor Ivanov --- oshmem/shmem/Makefile.am | 7 ++++--- oshmem/shmem/{c => }/help-shmem-api.txt | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) rename oshmem/shmem/{c => }/help-shmem-api.txt (98%) diff --git a/oshmem/shmem/Makefile.am b/oshmem/shmem/Makefile.am index 961a0c0a605..35dca0618c2 100644 --- a/oshmem/shmem/Makefile.am +++ b/oshmem/shmem/Makefile.am @@ -1,7 +1,7 @@ -# Copyright (c) 2013 Mellanox Technologies, Inc. +# Copyright (c) 2013-2015 Mellanox Technologies, Inc. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow # # $HEADER$ @@ -9,4 +9,5 @@ headers += shmem/shmem_api_logger.h \ shmem/shmem_lock.h -dist_oshmemdata_DATA += shmem/c/help-shmem-api.txt + +dist_oshmemdata_DATA += shmem/help-shmem-api.txt diff --git a/oshmem/shmem/c/help-shmem-api.txt b/oshmem/shmem/help-shmem-api.txt similarity index 98% rename from oshmem/shmem/c/help-shmem-api.txt rename to oshmem/shmem/help-shmem-api.txt index b22acb8f32b..e63f7a179a0 100644 --- a/oshmem/shmem/c/help-shmem-api.txt +++ b/oshmem/shmem/help-shmem-api.txt @@ -3,9 +3,9 @@ # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open SHMEM. From 370280ba3a9723674f5bdde66bc18d5b7fd36624 Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Fri, 31 Jul 2015 21:44:50 +0300 Subject: [PATCH 0190/1704] oshmem: Add man3 pages These man pages to OpenSHMEM API are received from openshmem.org and ported with minimum modifications. Thanks Tony Curtis for sharing man files. Signed-off-by: Igor Ivanov --- oshmem/Makefile.am | 21 +- oshmem/shmem/Makefile.am | 2 + oshmem/shmem/man/man3/Makefile.extra | 180 +++ oshmem/shmem/man/man3/OpenSHMEM.3in | 1 + oshmem/shmem/man/man3/_my_pe.3in | 41 + oshmem/shmem/man/man3/_num_pes.3in | 39 + oshmem/shmem/man/man3/intro_shmem.3in | 1312 +++++++++++++++++ oshmem/shmem/man/man3/shfree.3in | 1 + oshmem/shmem/man/man3/shmalloc.3in | 105 ++ .../shmem/man/man3/shmem_addr_accessible.3in | 56 + oshmem/shmem/man/man3/shmem_barrier.3in | 112 ++ oshmem/shmem/man/man3/shmem_barrier_all.3in | 59 + oshmem/shmem/man/man3/shmem_broadcast32.3in | 186 +++ oshmem/shmem/man/man3/shmem_broadcast64.3in | 1 + oshmem/shmem/man/man3/shmem_char_g.3in | 64 + oshmem/shmem/man/man3/shmem_char_get.3in | 207 +++ oshmem/shmem/man/man3/shmem_char_p.3in | 73 + oshmem/shmem/man/man3/shmem_char_put.3in | 214 +++ .../shmem/man/man3/shmem_clear_cache_inv.3in | 1 + .../man/man3/shmem_clear_cache_line_inv.3in | 1 + oshmem/shmem/man/man3/shmem_clear_lock.3in | 1 + oshmem/shmem/man/man3/shmem_collect32.3in | 197 +++ oshmem/shmem/man/man3/shmem_collect64.3in | 1 + .../man/man3/shmem_complexd_prod_to_all.3in | 1 + .../man/man3/shmem_complexd_sum_to_all.3in | 1 + .../man/man3/shmem_complexf_prod_to_all.3in | 1 + .../man/man3/shmem_complexf_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_double_g.3in | 1 + oshmem/shmem/man/man3/shmem_double_get.3in | 1 + oshmem/shmem/man/man3/shmem_double_iget.3in | 1 + oshmem/shmem/man/man3/shmem_double_iput.3in | 1 + .../man/man3/shmem_double_max_to_all.3in | 1 + .../man/man3/shmem_double_min_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_double_p.3in | 1 + .../man/man3/shmem_double_prod_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_double_put.3in | 1 + .../man/man3/shmem_double_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_double_swap.3in | 1 + oshmem/shmem/man/man3/shmem_fcollect32.3in | 1 + oshmem/shmem/man/man3/shmem_fcollect64.3in | 1 + oshmem/shmem/man/man3/shmem_fence.3in | 54 + oshmem/shmem/man/man3/shmem_float_g.3in | 1 + oshmem/shmem/man/man3/shmem_float_get.3in | 1 + oshmem/shmem/man/man3/shmem_float_iget.3in | 1 + oshmem/shmem/man/man3/shmem_float_iput.3in | 1 + .../shmem/man/man3/shmem_float_max_to_all.3in | 1 + .../shmem/man/man3/shmem_float_min_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_float_p.3in | 1 + .../man/man3/shmem_float_prod_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_float_put.3in | 1 + .../shmem/man/man3/shmem_float_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_float_swap.3in | 1 + oshmem/shmem/man/man3/shmem_get128.3in | 1 + oshmem/shmem/man/man3/shmem_get32.3in | 1 + oshmem/shmem/man/man3/shmem_get64.3in | 1 + oshmem/shmem/man/man3/shmem_getmem.3in | 1 + oshmem/shmem/man/man3/shmem_iget128.3in | 1 + oshmem/shmem/man/man3/shmem_iget32.3in | 1 + oshmem/shmem/man/man3/shmem_iget64.3in | 1 + oshmem/shmem/man/man3/shmem_int_add.3in | 76 + .../shmem/man/man3/shmem_int_and_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_int_cswap.3in | 127 ++ oshmem/shmem/man/man3/shmem_int_fadd.3in | 79 + oshmem/shmem/man/man3/shmem_int_finc.3in | 76 + oshmem/shmem/man/man3/shmem_int_g.3in | 1 + oshmem/shmem/man/man3/shmem_int_get.3in | 1 + oshmem/shmem/man/man3/shmem_int_iget.3in | 1 + oshmem/shmem/man/man3/shmem_int_inc.3in | 73 + oshmem/shmem/man/man3/shmem_int_iput.3in | 1 + .../shmem/man/man3/shmem_int_max_to_all.3in | 1 + .../shmem/man/man3/shmem_int_min_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_int_or_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_int_p.3in | 1 + .../shmem/man/man3/shmem_int_prod_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_int_put.3in | 1 + .../shmem/man/man3/shmem_int_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_int_swap.3in | 1 + oshmem/shmem/man/man3/shmem_int_wait.3in | 1 + .../shmem/man/man3/shmem_int_wait_until.3in | 1 + .../shmem/man/man3/shmem_int_xor_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_iput128.3in | 1 + oshmem/shmem/man/man3/shmem_iput32.3in | 1 + oshmem/shmem/man/man3/shmem_iput64.3in | 1 + oshmem/shmem/man/man3/shmem_long_add.3in | 1 + .../shmem/man/man3/shmem_long_and_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_long_cswap.3in | 1 + oshmem/shmem/man/man3/shmem_long_fadd.3in | 1 + oshmem/shmem/man/man3/shmem_long_finc.3in | 1 + oshmem/shmem/man/man3/shmem_long_g.3in | 1 + oshmem/shmem/man/man3/shmem_long_get.3in | 1 + oshmem/shmem/man/man3/shmem_long_iget.3in | 1 + oshmem/shmem/man/man3/shmem_long_inc.3in | 1 + oshmem/shmem/man/man3/shmem_long_iput.3in | 1 + .../shmem/man/man3/shmem_long_max_to_all.3in | 1 + .../shmem/man/man3/shmem_long_min_to_all.3in | 1 + .../shmem/man/man3/shmem_long_or_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_long_p.3in | 1 + .../shmem/man/man3/shmem_long_prod_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_long_put.3in | 1 + .../shmem/man/man3/shmem_long_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_long_swap.3in | 1 + oshmem/shmem/man/man3/shmem_long_wait.3in | 1 + .../shmem/man/man3/shmem_long_wait_until.3in | 1 + .../shmem/man/man3/shmem_long_xor_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_longdouble_g.3in | 1 + .../shmem/man/man3/shmem_longdouble_get.3in | 1 + .../shmem/man/man3/shmem_longdouble_iget.3in | 1 + .../shmem/man/man3/shmem_longdouble_iput.3in | 1 + .../man/man3/shmem_longdouble_max_to_all.3in | 1 + .../man/man3/shmem_longdouble_min_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_longdouble_p.3in | 1 + .../man/man3/shmem_longdouble_prod_to_all.3in | 1 + .../shmem/man/man3/shmem_longdouble_put.3in | 1 + .../man/man3/shmem_longdouble_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_add.3in | 1 + .../man/man3/shmem_longlong_and_to_all.3in | 1 + .../shmem/man/man3/shmem_longlong_cswap.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_fadd.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_finc.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_g.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_get.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_iget.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_inc.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_iput.3in | 1 + .../man/man3/shmem_longlong_max_to_all.3in | 1 + .../man/man3/shmem_longlong_min_to_all.3in | 1 + .../man/man3/shmem_longlong_or_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_p.3in | 1 + .../man/man3/shmem_longlong_prod_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_put.3in | 1 + .../man/man3/shmem_longlong_sum_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_swap.3in | 1 + oshmem/shmem/man/man3/shmem_longlong_wait.3in | 1 + .../man/man3/shmem_longlong_wait_until.3in | 1 + .../man/man3/shmem_longlong_xor_to_all.3in | 1 + oshmem/shmem/man/man3/shmem_pe_accessible.3in | 54 + oshmem/shmem/man/man3/shmem_ptr.3in | 129 ++ oshmem/shmem/man/man3/shmem_put128.3in | 1 + oshmem/shmem/man/man3/shmem_put32.3in | 1 + oshmem/shmem/man/man3/shmem_put64.3in | 1 + oshmem/shmem/man/man3/shmem_putmem.3in | 1 + oshmem/shmem/man/man3/shmem_quiet.3in | 84 ++ oshmem/shmem/man/man3/shmem_set_cache_inv.3in | 1 + .../man/man3/shmem_set_cache_line_inv.3in | 1 + oshmem/shmem/man/man3/shmem_set_lock.3in | 78 + .../shmem/man/man3/shmem_short_and_to_all.3in | 206 +++ oshmem/shmem/man/man3/shmem_short_g.3in | 1 + oshmem/shmem/man/man3/shmem_short_get.3in | 1 + oshmem/shmem/man/man3/shmem_short_iget.3in | 217 +++ oshmem/shmem/man/man3/shmem_short_iput.3in | 220 +++ .../shmem/man/man3/shmem_short_max_to_all.3in | 238 +++ .../shmem/man/man3/shmem_short_min_to_all.3in | 234 +++ .../shmem/man/man3/shmem_short_or_to_all.3in | 202 +++ oshmem/shmem/man/man3/shmem_short_p.3in | 1 + .../man/man3/shmem_short_prod_to_all.3in | 259 ++++ oshmem/shmem/man/man3/shmem_short_put.3in | 1 + .../shmem/man/man3/shmem_short_sum_to_all.3in | 281 ++++ oshmem/shmem/man/man3/shmem_short_wait.3in | 1 + .../shmem/man/man3/shmem_short_wait_until.3in | 1 + .../shmem/man/man3/shmem_short_xor_to_all.3in | 215 +++ oshmem/shmem/man/man3/shmem_swap.3in | 115 ++ oshmem/shmem/man/man3/shmem_test_lock.3in | 1 + oshmem/shmem/man/man3/shmem_udcflush.3in | 94 ++ oshmem/shmem/man/man3/shmem_udcflush_line.3in | 1 + oshmem/shmem/man/man3/shmem_wait.3in | 205 +++ oshmem/shmem/man/man3/shmem_wait_until.3in | 1 + oshmem/shmem/man/man3/shmemalign.3in | 1 + oshmem/shmem/man/man3/shrealloc.3in | 1 + oshmem/shmem/man/man3/start_pes.3in | 82 ++ 169 files changed, 6395 insertions(+), 1 deletion(-) create mode 100644 oshmem/shmem/man/man3/Makefile.extra create mode 100644 oshmem/shmem/man/man3/OpenSHMEM.3in create mode 100644 oshmem/shmem/man/man3/_my_pe.3in create mode 100644 oshmem/shmem/man/man3/_num_pes.3in create mode 100644 oshmem/shmem/man/man3/intro_shmem.3in create mode 100644 oshmem/shmem/man/man3/shfree.3in create mode 100644 oshmem/shmem/man/man3/shmalloc.3in create mode 100644 oshmem/shmem/man/man3/shmem_addr_accessible.3in create mode 100644 oshmem/shmem/man/man3/shmem_barrier.3in create mode 100644 oshmem/shmem/man/man3/shmem_barrier_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_broadcast32.3in create mode 100644 oshmem/shmem/man/man3/shmem_broadcast64.3in create mode 100644 oshmem/shmem/man/man3/shmem_char_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_char_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_char_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_char_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_clear_cache_inv.3in create mode 100644 oshmem/shmem/man/man3/shmem_clear_cache_line_inv.3in create mode 100644 oshmem/shmem/man/man3/shmem_clear_lock.3in create mode 100644 oshmem/shmem/man/man3/shmem_collect32.3in create mode 100644 oshmem/shmem/man/man3/shmem_collect64.3in create mode 100644 oshmem/shmem/man/man3/shmem_complexd_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_complexd_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_complexf_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_complexf_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_double_swap.3in create mode 100644 oshmem/shmem/man/man3/shmem_fcollect32.3in create mode 100644 oshmem/shmem/man/man3/shmem_fcollect64.3in create mode 100644 oshmem/shmem/man/man3/shmem_fence.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_float_swap.3in create mode 100644 oshmem/shmem/man/man3/shmem_get128.3in create mode 100644 oshmem/shmem/man/man3/shmem_get32.3in create mode 100644 oshmem/shmem/man/man3/shmem_get64.3in create mode 100644 oshmem/shmem/man/man3/shmem_getmem.3in create mode 100644 oshmem/shmem/man/man3/shmem_iget128.3in create mode 100644 oshmem/shmem/man/man3/shmem_iget32.3in create mode 100644 oshmem/shmem/man/man3/shmem_iget64.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_add.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_and_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_cswap.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_fadd.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_finc.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_inc.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_or_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_swap.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_wait.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_wait_until.3in create mode 100644 oshmem/shmem/man/man3/shmem_int_xor_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_iput128.3in create mode 100644 oshmem/shmem/man/man3/shmem_iput32.3in create mode 100644 oshmem/shmem/man/man3/shmem_iput64.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_add.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_and_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_cswap.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_fadd.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_finc.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_inc.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_or_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_swap.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_wait.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_wait_until.3in create mode 100644 oshmem/shmem/man/man3/shmem_long_xor_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_longdouble_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_add.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_and_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_cswap.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_fadd.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_finc.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_inc.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_or_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_swap.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_wait.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_wait_until.3in create mode 100644 oshmem/shmem/man/man3/shmem_longlong_xor_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_pe_accessible.3in create mode 100644 oshmem/shmem/man/man3/shmem_ptr.3in create mode 100644 oshmem/shmem/man/man3/shmem_put128.3in create mode 100644 oshmem/shmem/man/man3/shmem_put32.3in create mode 100644 oshmem/shmem/man/man3/shmem_put64.3in create mode 100644 oshmem/shmem/man/man3/shmem_putmem.3in create mode 100644 oshmem/shmem/man/man3/shmem_quiet.3in create mode 100644 oshmem/shmem/man/man3/shmem_set_cache_inv.3in create mode 100644 oshmem/shmem/man/man3/shmem_set_cache_line_inv.3in create mode 100644 oshmem/shmem/man/man3/shmem_set_lock.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_and_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_g.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_get.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_iget.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_iput.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_max_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_min_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_or_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_p.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_prod_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_put.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_sum_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_wait.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_wait_until.3in create mode 100644 oshmem/shmem/man/man3/shmem_short_xor_to_all.3in create mode 100644 oshmem/shmem/man/man3/shmem_swap.3in create mode 100644 oshmem/shmem/man/man3/shmem_test_lock.3in create mode 100644 oshmem/shmem/man/man3/shmem_udcflush.3in create mode 100644 oshmem/shmem/man/man3/shmem_udcflush_line.3in create mode 100644 oshmem/shmem/man/man3/shmem_wait.3in create mode 100644 oshmem/shmem/man/man3/shmem_wait_until.3in create mode 100644 oshmem/shmem/man/man3/shmemalign.3in create mode 100644 oshmem/shmem/man/man3/shrealloc.3in create mode 100644 oshmem/shmem/man/man3/start_pes.3in diff --git a/oshmem/Makefile.am b/oshmem/Makefile.am index 036183907e8..93f9f96e56e 100644 --- a/oshmem/Makefile.am +++ b/oshmem/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2013 Mellanox Technologies, Inc. +# Copyright (c) 2013-2015 Mellanox Technologies, Inc. # All rights reserved. # Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. @@ -94,6 +94,25 @@ include proc/Makefile.am include request/Makefile.am include runtime/Makefile.am include shmem/Makefile.am +include shmem/man/man3/Makefile.extra include mca/Makefile.am include tools/Makefile.am include util/Makefile.am + +# Ensure that the man page directory exists before we try to make man +# page files (because ompi/mpi/man/man3 has no config.status-generated +# Makefile) +dir_stamp = $(top_builddir)/$(subdir)/shmem/man/man3/.dir-stamp + +# Also ensure that the man pages are rebuilt if the opal_config.h file +# changes (e.g., configure was run again, meaning that the release +# date or version may have changed) +$(nodist_man_MANS): $(dir_stamp) $(top_builddir)/opal/include/opal_config.h + +$(dir_stamp): + $(MKDIR_P) `dirname $@` + touch "$@" + +# Remove the generated man pages +distclean-local: + rm -f $(nodist_man_MANS) $(dir_stamp) diff --git a/oshmem/shmem/Makefile.am b/oshmem/shmem/Makefile.am index 35dca0618c2..d8eb3e32b61 100644 --- a/oshmem/shmem/Makefile.am +++ b/oshmem/shmem/Makefile.am @@ -7,6 +7,8 @@ # $HEADER$ # +EXTRA_DIST = + headers += shmem/shmem_api_logger.h \ shmem/shmem_lock.h diff --git a/oshmem/shmem/man/man3/Makefile.extra b/oshmem/shmem/man/man3/Makefile.extra new file mode 100644 index 00000000000..965bbbb97c6 --- /dev/null +++ b/oshmem/shmem/man/man3/Makefile.extra @@ -0,0 +1,180 @@ +# -*- makefile -*- +# Copyright (c) 2015 Mellanox Technologies, Inc. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +include $(top_srcdir)/Makefile.ompi-rules + +shmem_api_man_pages = \ + shmem/man/man3/intro_shmem.3 \ + shmem/man/man3/OpenSHMEM.3 \ + shmem/man/man3/start_pes.3 \ + shmem/man/man3/_num_pes.3 \ + shmem/man/man3/_my_pe.3 \ + shmem/man/man3/shmem_pe_accessible.3 \ + shmem/man/man3/shmem_addr_accessible.3 \ + shmem/man/man3/shmalloc.3 \ + shmem/man/man3/shmemalign.3 \ + shmem/man/man3/shrealloc.3 \ + shmem/man/man3/shfree.3 \ + shmem/man/man3/shmem_ptr.3 \ + shmem/man/man3/shmem_char_p.3 \ + shmem/man/man3/shmem_short_p.3 \ + shmem/man/man3/shmem_int_p.3 \ + shmem/man/man3/shmem_long_p.3 \ + shmem/man/man3/shmem_float_p.3 \ + shmem/man/man3/shmem_double_p.3 \ + shmem/man/man3/shmem_longlong_p.3 \ + shmem/man/man3/shmem_longdouble_p.3 \ + shmem/man/man3/shmem_char_put.3 \ + shmem/man/man3/shmem_short_put.3 \ + shmem/man/man3/shmem_int_put.3 \ + shmem/man/man3/shmem_long_put.3 \ + shmem/man/man3/shmem_float_put.3 \ + shmem/man/man3/shmem_double_put.3 \ + shmem/man/man3/shmem_longlong_put.3 \ + shmem/man/man3/shmem_longdouble_put.3 \ + shmem/man/man3/shmem_put32.3 \ + shmem/man/man3/shmem_put64.3 \ + shmem/man/man3/shmem_put128.3 \ + shmem/man/man3/shmem_putmem.3 \ + shmem/man/man3/shmem_short_iput.3 \ + shmem/man/man3/shmem_int_iput.3 \ + shmem/man/man3/shmem_long_iput.3 \ + shmem/man/man3/shmem_float_iput.3 \ + shmem/man/man3/shmem_double_iput.3 \ + shmem/man/man3/shmem_longlong_iput.3 \ + shmem/man/man3/shmem_longdouble_iput.3 \ + shmem/man/man3/shmem_iput32.3 \ + shmem/man/man3/shmem_iput64.3 \ + shmem/man/man3/shmem_iput128.3 \ + shmem/man/man3/shmem_char_g.3 \ + shmem/man/man3/shmem_short_g.3 \ + shmem/man/man3/shmem_int_g.3 \ + shmem/man/man3/shmem_long_g.3 \ + shmem/man/man3/shmem_float_g.3 \ + shmem/man/man3/shmem_double_g.3 \ + shmem/man/man3/shmem_longlong_g.3 \ + shmem/man/man3/shmem_longdouble_g.3 \ + shmem/man/man3/shmem_char_get.3 \ + shmem/man/man3/shmem_short_get.3 \ + shmem/man/man3/shmem_int_get.3 \ + shmem/man/man3/shmem_long_get.3 \ + shmem/man/man3/shmem_float_get.3 \ + shmem/man/man3/shmem_double_get.3 \ + shmem/man/man3/shmem_longlong_get.3 \ + shmem/man/man3/shmem_longdouble_get.3 \ + shmem/man/man3/shmem_get32.3 \ + shmem/man/man3/shmem_get64.3 \ + shmem/man/man3/shmem_get128.3 \ + shmem/man/man3/shmem_getmem.3 \ + shmem/man/man3/shmem_short_iget.3 \ + shmem/man/man3/shmem_int_iget.3 \ + shmem/man/man3/shmem_long_iget.3 \ + shmem/man/man3/shmem_float_iget.3 \ + shmem/man/man3/shmem_double_iget.3 \ + shmem/man/man3/shmem_longlong_iget.3 \ + shmem/man/man3/shmem_longdouble_iget.3 \ + shmem/man/man3/shmem_iget32.3 \ + shmem/man/man3/shmem_iget64.3 \ + shmem/man/man3/shmem_iget128.3 \ + shmem/man/man3/shmem_swap.3 \ + shmem/man/man3/shmem_int_swap.3 \ + shmem/man/man3/shmem_long_swap.3 \ + shmem/man/man3/shmem_longlong_swap.3 \ + shmem/man/man3/shmem_float_swap.3 \ + shmem/man/man3/shmem_double_swap.3 \ + shmem/man/man3/shmem_int_cswap.3 \ + shmem/man/man3/shmem_long_cswap.3 \ + shmem/man/man3/shmem_longlong_cswap.3 \ + shmem/man/man3/shmem_int_fadd.3 \ + shmem/man/man3/shmem_long_fadd.3 \ + shmem/man/man3/shmem_longlong_fadd.3 \ + shmem/man/man3/shmem_int_finc.3 \ + shmem/man/man3/shmem_long_finc.3 \ + shmem/man/man3/shmem_longlong_finc.3 \ + shmem/man/man3/shmem_int_add.3 \ + shmem/man/man3/shmem_long_add.3 \ + shmem/man/man3/shmem_longlong_add.3 \ + shmem/man/man3/shmem_int_inc.3 \ + shmem/man/man3/shmem_long_inc.3 \ + shmem/man/man3/shmem_longlong_inc.3 \ + shmem/man/man3/shmem_set_lock.3 \ + shmem/man/man3/shmem_clear_lock.3 \ + shmem/man/man3/shmem_test_lock.3 \ + shmem/man/man3/shmem_wait.3 \ + shmem/man/man3/shmem_short_wait.3 \ + shmem/man/man3/shmem_int_wait.3 \ + shmem/man/man3/shmem_long_wait.3 \ + shmem/man/man3/shmem_longlong_wait.3 \ + shmem/man/man3/shmem_wait_until.3 \ + shmem/man/man3/shmem_short_wait_until.3 \ + shmem/man/man3/shmem_int_wait_until.3 \ + shmem/man/man3/shmem_long_wait_until.3 \ + shmem/man/man3/shmem_longlong_wait_until.3 \ + shmem/man/man3/shmem_barrier.3 \ + shmem/man/man3/shmem_barrier_all.3 \ + shmem/man/man3/shmem_fence.3 \ + shmem/man/man3/shmem_quiet.3 \ + shmem/man/man3/shmem_broadcast32.3 \ + shmem/man/man3/shmem_broadcast64.3 \ + shmem/man/man3/shmem_collect32.3 \ + shmem/man/man3/shmem_collect64.3 \ + shmem/man/man3/shmem_fcollect32.3 \ + shmem/man/man3/shmem_fcollect64.3 \ + shmem/man/man3/shmem_short_and_to_all.3 \ + shmem/man/man3/shmem_int_and_to_all.3 \ + shmem/man/man3/shmem_long_and_to_all.3 \ + shmem/man/man3/shmem_longlong_and_to_all.3 \ + shmem/man/man3/shmem_short_or_to_all.3 \ + shmem/man/man3/shmem_int_or_to_all.3 \ + shmem/man/man3/shmem_long_or_to_all.3 \ + shmem/man/man3/shmem_longlong_or_to_all.3 \ + shmem/man/man3/shmem_short_xor_to_all.3 \ + shmem/man/man3/shmem_int_xor_to_all.3 \ + shmem/man/man3/shmem_long_xor_to_all.3 \ + shmem/man/man3/shmem_longlong_xor_to_all.3 \ + shmem/man/man3/shmem_short_max_to_all.3 \ + shmem/man/man3/shmem_int_max_to_all.3 \ + shmem/man/man3/shmem_long_max_to_all.3 \ + shmem/man/man3/shmem_longlong_max_to_all.3 \ + shmem/man/man3/shmem_float_max_to_all.3 \ + shmem/man/man3/shmem_double_max_to_all.3 \ + shmem/man/man3/shmem_longdouble_max_to_all.3 \ + shmem/man/man3/shmem_short_min_to_all.3 \ + shmem/man/man3/shmem_int_min_to_all.3 \ + shmem/man/man3/shmem_long_min_to_all.3 \ + shmem/man/man3/shmem_longlong_min_to_all.3 \ + shmem/man/man3/shmem_float_min_to_all.3 \ + shmem/man/man3/shmem_double_min_to_all.3 \ + shmem/man/man3/shmem_longdouble_min_to_all.3 \ + shmem/man/man3/shmem_short_sum_to_all.3 \ + shmem/man/man3/shmem_int_sum_to_all.3 \ + shmem/man/man3/shmem_long_sum_to_all.3 \ + shmem/man/man3/shmem_longlong_sum_to_all.3 \ + shmem/man/man3/shmem_float_sum_to_all.3 \ + shmem/man/man3/shmem_double_sum_to_all.3 \ + shmem/man/man3/shmem_complexf_sum_to_all.3 \ + shmem/man/man3/shmem_complexd_sum_to_all.3 \ + shmem/man/man3/shmem_short_prod_to_all.3 \ + shmem/man/man3/shmem_int_prod_to_all.3 \ + shmem/man/man3/shmem_long_prod_to_all.3 \ + shmem/man/man3/shmem_longlong_prod_to_all.3 \ + shmem/man/man3/shmem_float_prod_to_all.3 \ + shmem/man/man3/shmem_double_prod_to_all.3 \ + shmem/man/man3/shmem_longdouble_prod_to_all.3 \ + shmem/man/man3/shmem_complexf_prod_to_all.3 \ + shmem/man/man3/shmem_complexd_prod_to_all.3 \ + shmem/man/man3/shmem_udcflush.3 \ + shmem/man/man3/shmem_udcflush_line.3 \ + shmem/man/man3/shmem_set_cache_inv.3 \ + shmem/man/man3/shmem_set_cache_line_inv.3 \ + shmem/man/man3/shmem_clear_cache_inv.3 \ + shmem/man/man3/shmem_clear_cache_line_inv.3 + +nodist_man_MANS += $(shmem_api_man_pages) +EXTRA_DIST += $(shmem_api_man_pages:.3=.3in) diff --git a/oshmem/shmem/man/man3/OpenSHMEM.3in b/oshmem/shmem/man/man3/OpenSHMEM.3in new file mode 100644 index 00000000000..97469c502b1 --- /dev/null +++ b/oshmem/shmem/man/man3/OpenSHMEM.3in @@ -0,0 +1 @@ +.so man3/intro_shmem.3 diff --git a/oshmem/shmem/man/man3/_my_pe.3in b/oshmem/shmem/man/man3/_my_pe.3in new file mode 100644 index 00000000000..ddc43b4ff78 --- /dev/null +++ b/oshmem/shmem/man/man3/_my_pe.3in @@ -0,0 +1,41 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "MY\\_PE" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +my_pe, _my_pe, shmem_my_pe \- Returns the virtual PE number of the calling PE. +.SH SYNOPSIS + +C or C++: +.Vb +#include +int _my_pe (void); +int shmem_my_pe (void); +.Ve +Fortran: +.Vb +include 'mpp/shmem.fh' +I = MY_PE () +I = SHMEM_MY_PE () +.Ve +.SH DESCRIPTION + +my_pe() or shmem_my_pe() return the processing element (PE) number of the calling PE. It accepts no +arguments. The result is an integer between 0 and npes \- 1, where npes is the total +number of PEs executing the current program. +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fInum_pes\fP(3), +\fIstart_pes\fP(3) diff --git a/oshmem/shmem/man/man3/_num_pes.3in b/oshmem/shmem/man/man3/_num_pes.3in new file mode 100644 index 00000000000..21ab515dfd3 --- /dev/null +++ b/oshmem/shmem/man/man3/_num_pes.3in @@ -0,0 +1,39 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "NUM\\_PES" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +num_pes, _num_pes, shmem_n_pes \- Returns the number of processing elements (PEs) used to run the application. +.SH SYNOPSIS + +C or C++: +.Vb +#include +int _num_pes (void); +int shmem_n_pes (void); +.Ve +Fortran: +.Vb +include 'mpp/shmem.fh' +I = NUM_PES () +I = SHMEM_N_PES () +.Ve +.SH DESCRIPTION + +num_pes() or shmem_n_pes() return the total number of PEs running in an application. +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fImy_pe\fP(3), +\fIstart_pes\fP(3) diff --git a/oshmem/shmem/man/man3/intro_shmem.3in b/oshmem/shmem/man/man3/intro_shmem.3in new file mode 100644 index 00000000000..caef30b8818 --- /dev/null +++ b/oshmem/shmem/man/man3/intro_shmem.3in @@ -0,0 +1,1312 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "INTRO\\_SHMEM" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +intro_shmem \- Introduction to the OpenSHMEM programming model +.PP +.SH DESCRIPTION + +The SHMEM programming model consists of library routines that provide low\-latency, +high\-bandwidth communication for use in highly parallelized scalable programs. The +routines in the OpenSHMEM application programming interface (API) provide a programming +model for exchanging data between cooperating parallel processes. The resulting programs +are similar in style to Message Passing Interface (MPI) programs. The SHMEM API can +be used either alone or in combination with MPI routines in the same parallel program. +.PP +An OpenSHMEM program is SPMD (single program, multiple data) in style. The SHMEM +processes, called processing elements or PEs, all start at the same time and they all run the +same program. Usually the PEs perform computation on their own subdomains of the larger +problem and periodically communicate with other PEs to exchange information on +which the next computation phase depends. +.PP +The OpenSHMEM routines minimize the overhead associated with data transfer requests, +maximize bandwidth and minimize data latency. Data latency is the period of time that +starts when a PE initiates a transfer of data and ends when a PE can use the data. +OpenSHMEM routines support remote data transfer through put operations, which transfer +data to a different PE, get operations, which transfer data from a different PE, and remote +pointers, which allow direct references to data objects owned by another PE. Other +operations supported are collective broadcast and reduction, barrier synchronization, and +atomic memory operations. An atomic memory operation is an atomic read\-and\-update +operation, such as a fetch\-and\-increment, on a remote or local data object. +.PP +.SH OPENSHMEM ROUTINES + +This section lists the significant OpenSHMEM message\-passing routines. +.TP +PE queries +.PP +.RS +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fI_num_pes\fP(3) +.TP +.B * +\fI_my_pe\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fINUM_PES\fP(3) +.TP +.B * +\fIMY_PE\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Elemental data put routines +.PP +.RS +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_double_p\fP(3) +.TP +.B * +\fIshmem_float_p\fP(3) +.TP +.B * +\fIshmem_int_p\fP(3) +.TP +.B * +\fIshmem_long_p\fP(3) +.TP +.B * +\fIshmem_short_p.\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Block data put routines +.PP +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_put32\fP(3) +.TP +.B * +\fIshmem_put64\fP(3) +.TP +.B * +\fIshmem_put128\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_double_put\fP(3) +.TP +.B * +\fIshmem_float_put\fP(3) +.TP +.B * +\fIshmem_int_put\fP(3) +.TP +.B * +\fIshmem_long_put\fP(3) +.TP +.B * +\fIshmem_short_put.\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_complex_put\fP(3) +.TP +.B * +\fIshmem_integer_put\fP(3) +.TP +.B * +\fIshmem_logical_put\fP(3) +.TP +.B * +\fIshmem_real_put\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Elemental data get routines +.PP +.RS +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_double_g\fP(3) +.TP +.B * +\fIshmem_float_g\fP(3) +.TP +.B * +\fIshmem_int_g\fP(3) +.TP +.B * +\fIshmem_long_g\fP(3) +.TP +.B * +\fIshmem_short_g\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Block data get routines +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_get32\fP(3) +.TP +.B * +\fIshmem_get64\fP(3) +.TP +.B * +\fIshmem_get128\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_double_get\fP(3) +.TP +.B * +\fIshmem_float_get\fP(3) +.TP +.B * +\fIshmem_int_get\fP(3) +.TP +.B * +\fIshmem_long_get\fP(3) +.TP +.B * +\fIshmem_short_get\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_complex_get\fP(3) +.TP +.B * +\fIshmem_integer_get\fP(3) +.TP +.B * +\fIshmem_logical_get\fP(3) +.TP +.B * +\fIshmem_real_get\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Strided put routines +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_iput32\fP(3) +.TP +.B * +\fIshmem_iput64\fP(3) +.TP +.B * +\fIshmem_iput128\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_double_iput\fP(3) +.TP +.B * +\fIshmem_float_iput\fP(3) +.TP +.B * +\fIshmem_int_iput\fP(3) +.TP +.B * +\fIshmem_long_iput\fP(3) +.TP +.B * +\fIshmem_short_iput\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_complex_iput\fP(3) +.TP +.B * +\fIshmem_integer_iput\fP(3) +.TP +.B * +\fIshmem_logical_iput\fP(3) +.TP +.B * +\fIshmem_real_iput\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Strided get routines +.PP +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_iget32\fP(3) +.TP +.B * +\fIshmem_iget64\fP(3) +.TP +.B * +\fIshmem_iget128\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_double_iget\fP(3) +.TP +.B * +\fIshmem_float_iget\fP(3) +.TP +.B * +\fIshmem_int_iget\fP(3) +.TP +.B * +\fIshmem_long_iget\fP(3) +.TP +.B * +\fIshmem_short_iget\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_complex_iget\fP(3) +.TP +.B * +\fIshmem_integer_iget\fP(3) +.TP +.B * +\fIshmem_logical_iget\fP(3) +.TP +.B * +\fIshmem_real_iget\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Point\-to\-point synchronization routines +.RS +.TP +.B * +C/C++ only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_int_wait\fP(3) +.TP +.B * +\fIshmem_int_wait_until\fP(3) +.TP +.B * +\fIshmem_long_wait\fP(3) +.TP +.B * +\fIshmem_long_wait_until\fP(3) +.TP +.B * +\fIshmem_longlong_wait\fP(3) +.TP +.B * +\fIshmem_longlong_wait_until\fP(3) +.TP +.B * +\fIshmem_short_wait\fP(3) +.TP +.B * +\fIshmem_short_wait_until\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_int4_wait\fP(3) +.TP +.B * +\fIshmem_int4_wait_until\fP(3) +.TP +.B * +\fIshmem_int8_wait\fP(3) +.TP +.B * +\fIshmem_int8_wait_until\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Barrier synchronization routines +.PP +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_barrier_all\fP(3) +.TP +.B * +\fIshmem_barrier\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Atomic memory fetch\-and\-operate (fetch\-op) routines +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.TP +.B * +shmem_swap +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Reduction routines +.RS +.TP +.B * +C/C++ only: +.RS +.TP +.B * +\fIshmem_int_and_to_all\fP(3) +.TP +.B * +\fIshmem_long_and_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_and_to_all\fP(3) +.TP +.B * +\fIshmem_short_and_to_all\fP(3) +.TP +.B * +\fIshmem_double_max_to_all\fP(3) +.TP +.B * +\fIshmem_float_max_to_all\fP(3) +.TP +.B * +\fIshmem_int_max_to_all\fP(3) +.TP +.B * +\fIshmem_long_max_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_max_to_all\fP(3) +.TP +.B * +\fIshmem_short_max_to_all\fP(3) +.TP +.B * +\fIshmem_double_min_to_all\fP(3) +.TP +.B * +\fIshmem_float_min_to_all\fP(3) +.TP +.B * +\fIshmem_int_min_to_all\fP(3) +.TP +.B * +\fIshmem_long_min_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_min_to_all\fP(3) +.TP +.B * +\fIshmem_short_min_to_all\fP(3) +.TP +.B * +\fIshmem_double_sum_to_all\fP(3) +.TP +.B * +\fIshmem_float_sum_to_all\fP(3) +.TP +.B * +\fIshmem_int_sum_to_all\fP(3) +.TP +.B * +\fIshmem_long_sum_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_sum_to_all\fP(3) +.TP +.B * +\fIshmem_short_sum_to_all\fP(3) +.TP +.B * +\fIshmem_double_prod_to_all\fP(3) +.TP +.B * +\fIshmem_float_prod_to_all\fP(3) +.TP +.B * +\fIshmem_int_prod_to_all\fP(3) +.TP +.B * +\fIshmem_long_prod_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_prod_to_all\fP(3) +.TP +.B * +\fIshmem_short_prod_to_all\fP(3) +.TP +.B * +\fIshmem_int_or_to_all\fP(3) +.TP +.B * +\fIshmem_long_or_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_or_to_all\fP(3) +.TP +.B * +\fIshmem_short_or_to_all\fP(3) +.TP +.B * +\fIshmem_int_xor_to_all\fP(3) +.TP +.B * +\fIshmem_long_xor_to_all\fP(3) +.TP +.B * +\fIshmem_longlong_xor_to_all\fP(3) +.TP +.B * +\fIshmem_short_xor_to_all\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.TP +.B * +\fIshmem_int4_and_to_all\fP(3) +.TP +.B * +\fIshmem_int8_and_to_all\fP(3) +.TP +.B * +\fIshmem_real4_max_to_all\fP(3) +.TP +.B * +\fIshmem_real8_max_to_all\fP(3) +.TP +.B * +\fIshmem_int4_max_to_all\fP(3) +.TP +.B * +\fIshmem_int8_max_to_all\fP(3) +.TP +.B * +\fIshmem_real4_min_to_all\fP(3) +.TP +.B * +\fIshmem_real8_min_to_all\fP(3) +.TP +.B * +\fIshmem_int4_min_to_all\fP(3) +.TP +.B * +\fIshmem_int8_min_to_all\fP(3) +.TP +.B * +\fIshmem_real4_sum_to_all\fP(3) +.TP +.B * +\fIshmem_real8_sum_to_all\fP(3) +.TP +.B * +\fIshmem_int4_sum_to_all\fP(3) +.TP +.B * +\fIshmem_int8_sum_to_all\fP(3) +.TP +.B * +\fIshmem_real4_prod_to_all\fP(3) +.TP +.B * +\fIshmem_real8_prod_to_all\fP(3) +.TP +.B * +\fIshmem_int4_prod_to_all\fP(3) +.TP +.B * +\fIshmem_int8_prod_to_all\fP(3) +.TP +.B * +\fIshmem_int4_or_to_all\fP(3) +.TP +.B * +\fIshmem_int8_or_to_all\fP(3) +.TP +.B * +\fIshmem_int4_xor_to_all\fP(3) +.TP +.B * +\fIshmem_int8_xor_to_all\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Broadcast routines +.PP +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_broadcast32\fP(3) +.TP +.B * +\fIshmem_broadcast64\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Cache management routines +.PP +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_udcflush\fP(3) +.TP +.B * +\fIshmem_udcflush_line\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Byte\-granularity block put routines +.PP +.RS +.TP +.B * +C/C++ and Fortran +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_putmem\fP(3) +.TP +.B * +\fIshmem_getmem\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_character_put\fP(3) +.TP +.B * +\fIshmem_character_get\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Collect routines +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_collect32\fP(3) +.TP +.B * +\fIshmem_collect64\fP(3) +.TP +.B * +\fIshmem_fcollect32\fP(3) +.TP +.B * +\fIshmem_fcollect64\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Atomic memory fetch\-and\-operate (fetch\-op) routines +.RS +.TP +.B * +C/C++ only: +.RS +.TP +.B * +\fIshmem_double_swap\fP(3) +.TP +.B * +\fIshmem_float_swap\fP(3) +.TP +.B * +\fIshmem_int_cswap\fP(3) +.TP +.B * +\fIshmem_int_fadd\fP(3) +.TP +.B * +\fIshmem_int_finc\fP(3) +.TP +.B * +\fIshmem_int_swap\fP(3) +.TP +.B * +\fIshmem_long_cswap\fP(3) +.TP +.B * +\fIshmem_long_fadd\fP(3) +.TP +.B * +\fIshmem_long_finc\fP(3) +.TP +.B * +\fIshmem_long_swap\fP(3) +.TP +.B * +\fIshmem_longlong_cswap\fP(3) +.TP +.B * +\fIshmem_longlong_fadd\fP(3) +.TP +.B * +\fIshmem_longlong_finc\fP(3) +.TP +.B * +\fIshmem_longlong_swap\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.TP +.B * +\fIshmem_int4_cswap\fP(3) +.TP +.B * +\fIshmem_int4_fadd\fP(3) +.TP +.B * +\fIshmem_int4_finc\fP(3) +.TP +.B * +\fIshmem_int4_swap\fP(3) +.TP +.B * +\fIshmem_int8_swap\fP(3) +.TP +.B * +\fIshmem_real4_swap\fP(3) +.TP +.B * +\fIshmem_real8_swap\fP(3) +.TP +.B * +\fIshmem_int8_cswap\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Atomic memory operation routines +.RS +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_int4_add\fP(3) +.TP +.B * +\fIshmem_int4_inc\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Remote memory pointer function +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_ptr\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Reduction routines +.RS +.TP +.B * +C/C++ only: +.RS +.TP +.B * +\fIshmem_longdouble_max_to_all\fP(3) +.TP +.B * +\fIshmem_longdouble_min_to_all\fP(3) +.TP +.B * +\fIshmem_longdouble_prod_to_all\fP(3) +.TP +.B * +\fIshmem_longdouble_sum_to_all\fP(3) +.RE +.RS +.PP +.RE +.TP +.B * +Fortran only: +.RS +.PP +.RS +.RE +.TP +.B * +\fIshmem_real16_max_to_all\fP(3) +.TP +.B * +\fIshmem_real16_min_to_all\fP(3) +.TP +.B * +\fIshmem_real16_prod_to_all\fP(3) +.TP +.B * +\fIshmem_real16_sum_to_all\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Accessibility query routines +.RS +.TP +.B * +C/C++ and Fortran: +.RS +.TP +.B * +\fIshmem_pe_accessible\fP(3) +.TP +.B * +\fIshmem_addr_accessible\fP(3) +.RE +.RS +.PP +.RE +.RE +.PP +.RE +.TP +Symmetric Data Objects +.PP +Consistent with the SPMD nature of the OpenSHMEM programming model is the +concept of symmetric data objects. These are arrays or variables that +exist with the same size, type, and relative address on all PEs. +Another term for symmetric data objects is "remotely accessible data objects". +In the interface definitions for OpenSHMEM data transfer routines, one or more of the +parameters are typically required to be symmetric or remotely accessible. +.PP +The following kinds of data objects are symmetric: +.RS +.TP +.B * +Fortran data objects in common blocks or with the SAVE attribute. These data +objects must not be defined in a dynamic shared object (DSO). +.TP +.B * +Non\-stack C and C++ variables. These data objects must not be defined in a DSO. +.TP +.B * +Fortran arrays allocated with \fIshpalloc\fP(3F) +.TP +.B * +C and C++ data allocated by \fIshmalloc\fP(3C) +.RE +.RS +.PP +.RE +.TP +Collective Routines +Some SHMEM routines, for example, \fIshmem_broadcast\fP(3) +and +\fIshmem_float_sum_to_all\fP(3), +are classified as collective routines +because they distribute work across a set of PEs. +They must be called concurrently by all PEs in the active set defined by the PE_start, +logPE_stride, PE_size argument triplet. The following man pages describe the OpenSHMEM +collective routines: +.RS +.TP +.B * +\fIshmem_and\fP(3) +.TP +.B * +\fIshmem_barrier\fP(3) +.TP +.B * +\fIshmem_broadcast\fP(3) +.TP +.B * +\fIshmem_collect\fP(3) +.TP +.B * +\fIshmem_max\fP(3) +.TP +.B * +\fIshmem_min\fP(3) +.TP +.B * +\fIshmem_or\fP(3) +.TP +.B * +\fIshmem_prod\fP(3) +.TP +.B * +\fIshmem_sum\fP(3) +.TP +.B * +\fIshmem_xor\fP(3) +.RE +.RS +.PP +.RE +.PP +.SH USING THE SYMMETRIC WORK ARRAY, PSYNC + +Multiple pSync arrays are often needed if a particular PE calls as OpenSHMEM collective +routine twice without intervening barrier synchronization. Problems would occur if some PEs +in the active set for call 2 arrive at call 2 before processing of call 1 is complete by all PEs in +the call 1 active set. You can use \fIshmem_barrier\fP(3) +or \fIshmem_barrier_all\fP(3) +to perform a barrier synchronization between consecutive calls to OpenSHMEM collective +routines. +.PP +There are two special cases: +.RE +.TP +.B * +The \fIshmem_barrier\fP(3) routine allows the same pSync array to be used on +consecutive calls as long as the active PE set does not change. +.TP +.B * +If the same collective routine is called multiple times with the same active set, the +calls may alternate between two pSync arrays. The SHMEM routines guarantee that a +first call is completely finished by all PEs by the time processing of a third call begins +on any PE. +.PP +Because the SHMEM routines restore pSync to its original contents, multiple calls that +use the same pSync array do not require that pSync be reinitialized after the first call. +.PP +.SH SHMEM ENVIRONMENT VARIABLES + +This section lists the significant SHMEM environment variables. +.TP +.B * +\fBSMA_VERSION\fP print the library version at start\-up. +.TP +.B * +\fBSMA_INFO\fP print helpful text about all these environment variables. +.TP +.B * +\fBSMA_SYMMETRIC_SIZE\fP number of bytes to allocate for the symmetric heap. +.TP +.B * +\fBSMA_DEBUG\fP enable debugging messages. +.PP +The first call to SHMEM must be \fIstart_pes\fP(3)\&. +This routines initialize the SHMEM runtime. +.PP +Calling any other SHMEM routines beforehand has undefined behavior. Multiple calls +to this routine is not allowed. +.PP +.SH COMPILING AND RUNNING OPENSHMEM PROGRAMS + +The OpenSHMEM specification is silent regarding how OpenSHMEM programs are compiled, +linked and run. This section shows some examples of how wrapper programs could be utilized +to compile and launch applications. The commands are styled after wrapper programs +found in many MPI implementations. +.PP +The following sample command line demonstrates running an OpenSHMEM Program using a wrapper script (\fBoshrun\fP +in this case): +.PP +.TP +.B * +C/C++: +.Vb +oshcc c_program.c +.Ve +.TP +.B * +FORTRAN: +.Vb +oshfort fortran_program.f +.Ve +.PP +The following sample command line demonstrates running an OpenSHMEM Program assuming that the library provides a wrapper script for such purpose +(named \fBoshrun\fP +for this example): +.PP +.Vb +oshrun \-np 32 ./a.out +.Ve +.PP +.SH EXAMPLES + +\fBExample 1\fP: +The following Fortran OpenSHMEM program directs all PEs to sum +simultaneously the numbers in the VALUES variable across all PEs: +.Vb +PROGRAM REDUCTION + REAL VALUES, SUM + COMMON /C/ VALUES + REAL WORK + + CALL START_PES(0) + VALUES = MY_PE() + CALL SHMEM_BARRIER_ALL ! Synchronize all PEs + SUM = 0.0 + DO I = 0, NUM_PES()\-1 + CALL SHMEM_REAL_GET(WORK, VALUES, 1, I) ! Get next value + SUM = SUM + WORK ! Sum it + ENDDO + PRINT *, 'PE ', MY_PE(), ' COMPUTED SUM=', SUM + CALL SHMEM_BARRIER_ALL +END +.Ve +\fBExample 2\fP: +The following C OpenSHMEM program transfers an array of 10 longs from +PE 0 to PE 1: +.Vb +#include + +main() { + long source[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + static long target[10]; + + start_pes(0); + if (_my_pe() == 0) { + /* put 10 elements into target on PE 1 */ + shmem_long_put(target, source, 10, 1); + } + shmem_barrier_all(); /* sync sender and receiver */ + if (_my_pe() == 1) + printf("target[0] on PE %d is %d\\n", _my_pe(), target[0]); +} +.Ve +.SH SEE ALSO + +The following man pages also contain information on OpenSHMEM routines. See the +specific man pages for implementation information. +.PP +\fIshmem_add\fP(3), +\fIshmem_and\fP(3), +\fIshmem_barrier\fP(3), +\fIshmem_barrier_all\fP(3), +\fIshmem_broadcast\fP(3), +\fIshmem_cache\fP(3), +\fIshmem_collect\fP(3), +\fIshmem_cswap\fP(3), +\fIshmem_fadd\fP(3), +\fIshmem_fence\fP(3), +\fIshmem_finc\fP(3), +\fIshmem_get\fP(3), +\fIshmem_iget\fP(3), +\fIshmem_inc\fP(3), +\fIshmem_iput\fP(3), +\fIshmem_lock\fP(3), +\fIshmem_max\fP(3), +\fIshmem_min\fP(3), +\fIshmem_my_pe\fP(3), +\fIshmem_or\fP(3), +\fIshmem_prod\fP(3), +\fIshmem_put\fP(3), +\fIshmem_quiet\fP(3), +\fIshmem_short_g\fP(3), +\fIshmem_short_p\fP(3), +\fIshmem_sum\fP(3), +\fIshmem_swap\fP(3), +\fIshmem_wait\fP(3), +\fIshmem_xor\fP(3), +\fIshmem_pe_accessible\fP(3), +\fIshmem_addr_accessible\fP(3), +\fIstart_pes\fP(3), +\fIshmalloc\fP(3C), +\fIshpalloc\fP(3F), +\fIMY_PE\fP(3I), +\fINUM_PES\fP(3I) diff --git a/oshmem/shmem/man/man3/shfree.3in b/oshmem/shmem/man/man3/shfree.3in new file mode 100644 index 00000000000..63a8ff4e8ec --- /dev/null +++ b/oshmem/shmem/man/man3/shfree.3in @@ -0,0 +1 @@ +.so man3/shmalloc.3 diff --git a/oshmem/shmem/man/man3/shmalloc.3in b/oshmem/shmem/man/man3/shmalloc.3in new file mode 100644 index 00000000000..5255598fa98 --- /dev/null +++ b/oshmem/shmem/man/man3/shmalloc.3in @@ -0,0 +1,105 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMALLOC" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmalloc\fP(3), +\fIshfree\fP(3), +\fIshmemalign\fP(3), +\fIshrealloc\fP(3) +\- Symmetric heap memory management functions. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void *shmalloc(size_t size); + +void shfree(void *ptr); + +void *shrealloc(void *ptr, size_t size); + +void *shmemalign(size_t alignment, size_t size); + +extern long malloc_error; +.Ve +.SH DESCRIPTION + +The \fBshmalloc\fP +function returns a pointer to a block of at least size bytes +suitably aligned for any use. This space is allocated from the symmetric heap (in contrast +to \fImalloc\fP(3C), +which allocates from the private heap). +.PP +The \fBshmemalign\fP +function allocates a block in the symmetric heap that has a +byte alignment specified by the alignment argument. +.PP +The \fBshfree\fP +function causes the block to which ptr points to, to be deallocated, +that is, made available for further allocation. If ptr is a null pointer, no action +occurs; otherwise, if the argument does not match a pointer earlier returned by a symmetric +heap function, or if the space has already been deallocated, malloc_error is set to indicate the +error, and shfree returns. +.PP +The \fBshrealloc\fP +function changes the size of the block to which ptr points to, to the +size (in bytes) specified by size. +.PP +The contents of the block are unchanged up to the lesser of the new and old sizes. If the new +size is larger, the value of the newly allocated portion of the block is indeterminate. If ptr is a +null pointer, the shrealloc function behaves like the shmalloc function for the specified size. If +size is 0 and ptr is not a null pointer, the block to which it points to is freed. Otherwise, if ptr +does not match a pointer earlier returned by a symmetric heap function, or if the space has +already been deallocated, the malloc_error variable is set to indicate the error, and shrealloc +returns a null pointer. If the space cannot be allocated, the block to which ptr points to is +unchanged. +.PP +The shmalloc, shfree, and shrealloc functions are provided so that multiple PEs in an +application can allocate symmetric, remotely accessible memory blocks. These memory +blocks can then be used with (shmem) communication routines. Each of these functions call +the \fIshmem_barrier_all\fP(3) +function before returning; this ensures that all PEs +participate in the memory allocation, and that the memory on other PEs can be used as soon +as the local PE returns. +.PP +The user is responsible for calling these functions with identical argument(s) on all PEs; if +differing size arguments are used, subsequent calls may not return the same symmetric heap +address on all PEs. +.PP +.SH NOTES + +The total size of the symmetric heap is determined at job startup. One can adjust the size of +the heap using the SHMEM_SYMMETRIC_HEAP_SIZE environment variable. See the +\fIintro_shmem\fP(3) +man page for futher details. +The shmalloc, shfree, and shrealloc functions differ from the private heap allocation functions +in that all PEs in an application must call them (a barrier is used to ensure this). +.PP +.SH RETURN VALUES + +The \fBshmalloc\fP +function returns a pointer to the allocated space (which should +be identical on all PEs); otherwise, it returns a null pointer (with malloc_error set). +The \fBshfree\fP +function returns no value. +The \fBshrealloc\fP +function returns a pointer to the allocated space (which +may have moved); otherwise, it returns a null pointer (with malloc_error set). +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fImy_pe\fP(3I), +\fIstart_pes\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_addr_accessible.3in b/oshmem/shmem/man/man3/shmem_addr_accessible.3in new file mode 100644 index 00000000000..bfc6e9d78ef --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_addr_accessible.3in @@ -0,0 +1,56 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_ADDR\\_ACCESSIBLE" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +shmem_addr_accessible \- Indicates if an address is accessible via OpenSHMEM operations +from the specified remote PE. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +int shmem_addr_accessible(void *addr, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +LOGICAL LOG, SHMEM_ADDR_ACCESSIBLE +INTEGER pe + +LOG = SHMEM_ADDR_ACCESSIBLE(addr, pe) +.Ve +.SH DESCRIPTION + +shmem_addr_accessible is a query function that indicates whether a local address is +accessible via SHMEM operations from the specified remote PE. +.PP +This function verifies that the remote PE is accessible via SHMEM data transfer functions from +the local PE, and that the specified address is in a symmetric data segment with respect to the +remote PE. +.PP +.SH RETURN VALUES + +C: The return value is 1 if addr is a symmetric data object and accessible via SHMEM +operations from the specified remote PE; otherwise, it is 0. +.PP +Fortran: The return value is \&.TRUE. if addr is a symmetric data object and accessible via +SHMEM operations from the specified remote PE; otherwise, it is \&.FALSE.. +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_pe_accessible\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_barrier.3in b/oshmem/shmem/man/man3/shmem_barrier.3in new file mode 100644 index 00000000000..e9e9722a04a --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_barrier.3in @@ -0,0 +1,112 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_BARRIER" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +shmem_barrier \- Performs a barrier operation on a subset of processing elements (PEs). +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_barrier(int PE_start, int logPE_stride, int PE_size, + long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PE_start, logPE_stride, PE_size +INTEGER pSync(SHMEM_BARRIER_SYNC_SIZE) + +CALL SHMEM_BARRIER(PE_start, logPE_stride, PE_size, pSync) +.Ve +.SH DESCRIPTION + +The shmem_barrier routine does not return until the subset of PEs specified by +\fBPE_start\fP, +\fBlogPE_stride\fP +and \fBPE_size\fP, +has entered this routine at the +same point of the execution path. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The arguments are as follows: +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pSync +A symmetric work array. In C/C++, pSync must be of type int and size +_SHMEM_BARRIER_SYNC_SIZE. In Fortran, pSync must be of type integer and size +SHMEM_BARRIER_SYNC_SIZE. If you are using Fortran, it must be a default integer type. +Every element of this array must be initialized to 0 before any of the PEs in the active set enter +shmem_barrier the first time. +.PP +The values of arguments PE_start, logPE_stride, and PE_size must be equal on all PEs in the +active set. The same work array must be passed in pSync to all PEs in the active set. +.PP +shmem_barrier ensures that all previously issued local stores and previously issued remote +memory updates done by any of the PEs in the active set (by using SHMEM calls, for +example \fIshmem_put\fP(3)) +are complete before returning. +.PP +The same pSync array may be reused on consecutive calls to shmem_barrier if the same +active PE set is used. +.PP +.SH NOTES + +The term symmetric is defined in \fIintro_shmem\fP(3)\&. +.PP +If the pSync array is initialized at run time, be sure to use some type of synchronization, for +example, a call to \fIshmem_barrier_all\fP(3), +before calling shmem_barrier for the first +time. +.PP +If the active set does not change, shmem_barrier can be called repeatedly with the same +pSync array. No additional synchronization beyond that implied by shmem_barrier itself is +necessary in this case. +.PP +.SH EXAMPLES + +C/C++ example: +.Vb +shmem_barrier(PE_start, logPE_stride, size, pSync); +.Ve +Fortran example: +.Vb +INTEGER PSYNC(SHMEM_BARRIER_SYNC_SIZE) +INTEGER PE_START, LOGPE_STRIDE, PE_SIZE, PSYNC +DATA PSYNC /SHMEM_BARRIER_SYNC_SIZE*0/ + +CALL SHMEM_BARRIER(PE_START, LOGPE_STRIDE, PE_SIZE, PSYNC) +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_barrier_all\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_barrier_all.3in b/oshmem/shmem/man/man3/shmem_barrier_all.3in new file mode 100644 index 00000000000..df943808096 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_barrier_all.3in @@ -0,0 +1,59 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_BARRIER\\_ALL" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +shmem_barrier_all \- Suspends the execution of the calling PE until all other PEs issue a call +to this particular shmem_barrier_all() statement. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_barrier_all(void); +.Ve +Fortran: +.Vb +include 'mpp/shmem.h' + +CALL SHMEM_BARRIER_ALL +.Ve +.SH DESCRIPTION + +The shmem_barrier_all routine does not return until all other PEs have entered this routine +at the same point of the execution path. +.PP +Prior to synchronizing with other PEs, shmem_barrier_all ensures completion of all +previously issued local memory stores and remote memory updates issued via SHMEM +functions such as \fIshmem_put32\fP(3)\&. +.PP +.SH EXAMPLES + +.Vb +setup_data() +{ + if (_my_pe() == 0) { + setup(); + } + + /* All PEs wait for PE 0 to complete setup(). */ + shmem_barrier_all(); +} +.Ve +.PP +.SH SEE ALSO + +\fIshmem_barrier\fP(3), +\fIstart_pes\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_broadcast32.3in b/oshmem/shmem/man/man3/shmem_broadcast32.3in new file mode 100644 index 00000000000..abb38e7952e --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_broadcast32.3in @@ -0,0 +1,186 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_BROADCAST" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_broadcast4\fP(3), +\fIshmem_broadcast8\fP(3), +\fIshmem_broadcast32\fP(3), +\fIshmem_broadcast64\fP(3) +\- Copy a data object from a designated PE to a target +location on all other PEs of the active set. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_broadcast32(void *target, const void *source, + size_t nelems, int PE_root, int PE_start, int logPE_stride, + int PE_size, long *pSync); + +void shmem_broadcast64(void *target, const void *source, + size_t nelems, int PE_root, int PE_start, int logPE_stride, + int PE_size, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER nelems, PE_root, PE_start, logPE_stride, PE_size +INTEGER pSync(SHMEM_BCAST_SYNC_SIZE) + +CALL SHMEM_BROADCAST4(target, source, nelems, PE_root, +& PE_start, logPE_stride, PE_size, fIpSync) + +CALL SHMEM_BROADCAST8(target, source, nelems, PE_root, +& PE_start, logPE_stride, PE_size, pSync) + +CALL SHMEM_BROADCAST32(target, source, nelems, +& PE_root, PE_start, logPE_stride, PE_size, pSync) + +CALL SHMEM_BROADCAST64(target, source, nelems, +& PE_root, PE_start, logPE_stride, PE_size, pSync) +.Ve +.SH DESCRIPTION + +The broadcast routines write the data at address source of the PE specified by +\fBPE_root\fP +to address \fBtarget\fP +on all other PEs in the active set. The active set of +PEs is defined by the triplet \fBPE_start\fP, +\fBlogPE_stride\fP +and \fBPE_size\fP\&. +The data is not copied to the target address on the PE specified by \fBPE_root\fP\&. +Before returning, the broadcast routines ensure that the elements of the pSync array are +restored to their initial values. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The arguments are as follows: +.TP +target +A symmetric data object with one of the following data types: +.RS +.TP +\fBshmem_broadcast8, shmem_broadcast64\fP: Any noncharacter type that +has an element size of 64 bits. No Fortran derived types or C/C++ structures are allowed. +.TP +\fBshmem_broadcast32\fP: Any noncharacter type that has an element size +of 32 bits. No Fortran derived types or C/C++ structures are allowed. +.TP +\fBshmem_broadcast4\fP: Any noncharacter type that has an element size +of 32 bits. +.RE +.RS +.PP +.RE +.TP +source +A symmetric data object that can be of any data type that is permissible for the +target argument. +.TP +nelems +The number of elements in source. For shmem_broadcast32 and +shmem_broadcast4, this is the number of 32\-bit halfwords. nelems must be of type integer. +If you are using Fortran, it must be a default integer value. +.TP +PE_root +Zero\-based ordinal of the PE, with respect to the active set, from which the +data is copied. Must be greater than or equal to 0 and less than PE_size. PE_root must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. log_PE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.PP +.TP +pSync +A symmetric work array. In C/C++, pSync must be of type long and size +_SHMEM_BCAST_SYNC_SIZE. +In Fortran, pSync must be of type integer and size SHMEM_BCAST_SYNC_SIZE. Every +element of this array must be initialized with the value _SHMEM_SYNC_VALUE (in C/C++) +or SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter +shmem_barrier(). +.PP +The values of arguments PE_root, PE_start, logPE_stride, and PE_size must be equal on +all PEs in the active set. The same target and source data objects and the same pSync work +array must be passed to all PEs in the active set. +.PP +Before any PE calls a broadcast routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pSync array on all PEs in the active set is not still in use from a prior call to a broadcast +routine. The target array on all PEs in the active set is ready to accept the broadcast data. +.PP +Upon return from a broadcast routine, the following are true for the local PE: If the current PE +is not the root PE, the target data object is updated. The values in the pSync array are +restored to the original values. +.SH NOTES + +The terms collective and symmetric are defined in \fIintro_shmem\fP(3)\&. +.PP +All SHMEM broadcast routines restore pSync to its original contents. Multiple calls to SHMEM +routines that use the same pSync array do not require that pSync be reinitialized after the +first call. +.PP +You must ensure the that the pSync array is not being updated by any PE in the active set +while any of the PEs participates in processing of a SHMEM broadcast routine. Be careful to +avoid these situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync array may be reused on a subsequent SHMEM broadcast routine only if none of the PEs +in the active set are still processing a prior SHMEM broadcast routine call that used the same +pSync array. In general, this can be ensured only by doing some type of synchronization. +However, in the special case of SHMEM routines being called with the same active set, you +can allocate two pSync arrays and alternate between them on successive calls. +.PP +.SH EXAMPLES + +In the following examples, the call to shmem_broadcast64 copies source on PE 4 to target +on PEs 5, 6, and 7. +.PP +C/C++ example: +.Vb +for (i=0; i < _SHMEM_BCAST_SYNC_SIZE; i++) { + pSync[i] = _SHMEM_SYNC_VALUE; +} +shmem_barrier_all(); /* Wait for all PEs to initialize pSync */ +shmem_broadcast64(target, source, nelems, 0, 4, 0, 4, pSync); +.Ve +Fortran example: +.Vb +INTEGER PSYNC(SHMEM_BCAST_SYNC_SIZE) +INTEGER TARGET, SOURCE, NELEMS, PE_ROOT, PE_START, +& LOGPE_STRIDE, PE_SIZE, PSYNC +COMMON /COM/ TARGET, SOURCE +DATA PSYNC /SHMEM_BCAST_SYNC_SIZE*SHMEM_SYNC_VALUE/ + +CALL SHMEM_BROADCAST64(TARGET, SOURCE, NELEMS, 0, 4, 0, 4, +& PSYNC) +.Ve +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_broadcast64.3in b/oshmem/shmem/man/man3/shmem_broadcast64.3in new file mode 100644 index 00000000000..b9255d50207 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_broadcast64.3in @@ -0,0 +1 @@ +.so man3/shmem_broadcast32.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_char_g.3in b/oshmem/shmem/man/man3/shmem_char_g.3in new file mode 100644 index 00000000000..722a79c6408 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_char_g.3in @@ -0,0 +1,64 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_CHAR\\_G" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_char_g\fP(3), +\fIshmem_float_g\fP(3), +\fIshmem_int_g\fP(3), +\fIshmem_long_g\fP(3), +\fIshmem_short_g\fP(3), +\fIshmem_longlong_g\fP(3), +\fIshmem_longdouble_g\fP(3) +\- These routines provide a low latency mechanism to read basic types (char, short, int, float, double, long, long long, long double) from symmetric data objects on remote PEs. +.SH SYNOPSIS + +C or C++: +.Vb +#include + + +char shmem_char_g(char *addr, int pe); + +short shmem_short_g(short *addr, int pe); + +int shmem_int_g(int *addr, int pe); + +long shmem_long_g(long *addr, int pe); + +long shmem_longlong_g(long long *addr, int pe); + +float shmem_float_g(float *addr, int pe); + +double shmem_double_g(double *addr, int pe); + +long shmem_longdouble_g(long double *addr, int pe); + +.Ve +.SH DESCRIPTION + +These routines provide a very low latency get capability for single elements of most basic types. +.PP +The arguments are as follows: +.TP +addr +The remotely accessible array element or scalar data object which will receive the +data on the remote PE. +.TP +pe +The number of the remote PE. +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_get\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_char_get.3in b/oshmem/shmem/man/man3/shmem_char_get.3in new file mode 100644 index 00000000000..80910049200 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_char_get.3in @@ -0,0 +1,207 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_GET" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_character_get\fP(3), +\fIshmem_complex_get\fP(3), +\fIshmem_double_get\fP(3), +\fIshmem_float_get\fP(3), +\fIshmem_get4\fP(3), +\fIshmem_get8\fP(3), +\fIshmem_get32\fP(3), +\fIshmem_get64\fP(3), +\fIshmem_get128\fP(3), +\fIshmem_getmem\fP(3), +\fIshmem_int_get\fP(3), +\fIshmem_integer_get\fP(3), +\fIshmem_logical_get\fP(3), +\fIshmem_long_get\fP(3), +\fIshmem_longdouble_get\fP(3), +\fIshmem_longlong_get\fP(3), +\fIshmem_real_get\fP(3), +\fIshmem_short_get\fP(3) +\- Transfers data from a specified processing element (PE). +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_get32(void *target, const void *source, + size_t len, int pe); + +void shmem_get64(void *target, const void *source, + size_t len, int pe); + +void shmem_get128(void *target, const void *source, + size_t len, int pe); + +void shmem_getmem(void *target, const void *source, + size_t len, int pe); + +void shmem_int_get(int *target, const int *source, + size_t len, int pe); + +void shmem_double_get(double *target, const double *source, + size_t len, int pe); + +void shmem_float_get(float *target, const float *source, + size_t len, int pe); + +void shmem_long_get(long *target, const long *source, + size_t len, int pe); + +void shmem_longdouble_get(long double *target, + const long double *source, size_t len, int pe); + +void shmem_longlong_get(long long *target, + const long long *source, size_t len, int pe); + +void shmem_short_get(short *target, + const short *source, size_t len, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER len, pe + +CALL SHMEM_CHARACTER_GET(target, source, len, pe) + +CALL SHMEM_COMPLEX_GET(target, source, len, pe) + +CALL SHMEM_DOUBLE_GET(target, source, len, pe) + +CALL SHMEM_GET4(target, source, len, pe) + +CALL SHMEM_GET8(target, source, len, pe) + +CALL SHMEM_GET32(target, source, len, pe) + +CALL SHMEM_GET64(target, source, len, pe) + +CALL SHMEM_GET128(target, source, len, pe) + +CALL SHMEM_GETMEM(target, source, len, pe) + +CALL SHMEM_INTEGER_GET(target, source, len, pe) + +CALL SHMEM_LOGICAL_GET(target, source, len, pe) + +CALL SHMEM_REAL_GET(target, source, len, pe) +.Ve +.SH DESCRIPTION + +The shmem_get routines transfer \fBnelems\fP +elements of the data object at address \fBsource\fP +on the remote PE \fBpe\fP, +to the data object at address \fBtarget\fP +on the local PE. These routines +return after the data has been copied to address \fBtarget\fP +on the local PE. +.PP +The arguments are as follows: +.TP +target +Local data object to be updated. +.TP +source +Data object on the PE identified by pe that contains the data to be copied. This +data object must be remotely accessible. +.TP +len +Number of elements in the target and source arrays. len must be of type integer. If +you are using Fortran, it must be a constant, variable, or array element of default +integer type. +.TP +pe +PE number of the remote PE. pe must be of type integer. If you are using Fortran, it +must be a constant, variable, or array element of default integer type. +.PP +The target and source data objects must conform to typing constraints, which are as follows: +.TP +\fBshmem_getmem\fP: Fortran: Any noncharacter type. C: Any data type. len is +scaled in bytes. +.TP +\fBshmem_get4, shmem_get32\fP: Any noncharacter type that has a storage size +equal to 32 bits. +.TP +{shmem_get8, shmem_get64}: Any noncharacter type that has a storage size equal to +64 bits. +.TP +\fBshmem_get128\fP: Any noncharacter type that has a storage size equal to 128 +bits. +.TP +\fBshmem_short_get\fP: Elements of type short. +.TP +\fBshmem_int_get\fP: Elements of type int. +.TP +\fBshmem_long_get\fP: Elements of type long. +.TP +\fBshmem_longlong_get\fP: Elements of type long long. +.TP +\fBshmem_float_get\fP: Elements of type float. +.TP +\fBshmem_double_get\fP: Elements of type double. +.TP +\fBshmem_longdouble_get\fP: Elements of type long double. +.TP +\fBSHMEM_CHARACTER_GET\fP: Elements of type character. len is the number of +characters to transfer. The actual character lengths of the source and target variables are +ignored. +.TP +\fBSHMEM_COMPLEX_GET\fP: Elements of type complex of default size. +.TP +\fBSHMEM_DOUBLE_GET\fP: (Fortran) Elements of type double precision. +.TP +\fBSHMEM_INTEGER_GET\fP: Elements of type integer. +.TP +\fBSHMEM_LOGICAL_GET\fP: Elements of type logical. +.TP +\fBSHMEM_REAL_GET\fP: Elements of type real. +.PP +If you are using Fortran, data types must be of default size. For example, a real variable must +be declared as REAL, REAL*4, or REAL(KIND=4). +.SH NOTES + +See \fIintro_shmem\fP(3) +for a definition of the term remotely accessible. +.SH EXAMPLES + +Consider this simple example for Fortran. +.Vb +PROGRAM REDUCTION + REAL VALUES, SUM + COMMON /C/ VALUES + REAL WORK + + CALL START_PES(0) ! ALLOW ANY NUMBER OF PES + VALUES = MY_PE() ! INITIALIZE IT TO SOMETHING + CALL SHMEM_BARRIER_ALL + SUM = 0.0 + DO I = 0,NUM_PES()\-1 + CALL SHMEM_REAL_GET(WORK, VALUES, 1, I) + SUM = SUM + WORK + ENDDO + PRINT *, 'PE ', MY_PE(), ' COMPUTED SUM=', SUM + CALL SHMEM_BARRIER_ALL +END +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_put\fP(3), +\fIshmem_iget\fP(3), +\fIshmem_quiet\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_char_p.3in b/oshmem/shmem/man/man3/shmem_char_p.3in new file mode 100644 index 00000000000..3d122b2d9cc --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_char_p.3in @@ -0,0 +1,73 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_CHAR\\_P" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_char_p\fP(3), +\fIshmem_float_p\fP(3), +\fIshmem_int_p\fP(3), +\fIshmem_long_p\fP(3), +\fIshmem_short_p\fP(3), +\fIshmem_longlong_p\fP(3), +\fIshmem_longdouble_p\fP(3) +\- These routines provide a low latency mechanism to write basic types (char, short, int, float, double, long, long long, long double) to symmetric data objects on remote PEs. +.SH SYNOPSIS + +C or C++: +.Vb +#include + + +void shmem_char_p(char *addr, char value, int pe); + +void shmem_short_p(short *addr, short value, int pe); + +void shmem_int_p(int *addr, int value, int pe); + +void shmem_long_p(long *addr, long value, int pe); + +void shmem_longlong_p(long long *addr, long long value, int pe); + +void shmem_float_p(float *addr, float value, int pe); + +void shmem_double_p(double *addr, double value, int pe); + +void shmem_longdouble_p(long double *addr, long double value, int pe); + +.Ve +.SH DESCRIPTION + +These routines provide a very low latency put capability for single elements of most basic types. +.PP +The arguments are as follows: +.TP +addr +The remotely accessible array element or scalar data object which will receive the +data on the remote PE. +.TP +value +The value to be transferred to addr on the remote PE. +.TP +pe +The number of the remote PE. +.PP +As with \fIshmem_put\fP(3), +these functions start the remote transfer and may return before +the data is delivered to the remote PE. Use \fIshmem_quiet\fP(3) +to force completion of all +remote PUT transfers. +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_put\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_char_put.3in b/oshmem/shmem/man/man3/shmem_char_put.3in new file mode 100644 index 00000000000..2ba020522e9 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_char_put.3in @@ -0,0 +1,214 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_PUT" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_character_put\fP(3), +\fIshmem_complex_put\fP(3), +\fIshmem_double_put\fP(3), +\fIshmem_float_put\fP(3), +\fIshmem_int_put\fP(3), +\fIshmem_integer_put\fP(3), +\fIshmem_logical_put\fP(3), +\fIshmem_long_put\fP(3), +\fIshmem_longdouble_put\fP(3), +\fIshmem_longlong_put\fP(3), +\fIshmem_put4\fP(3), +\fIshmem_put8\fP(3), +\fIshmem_put32\fP(3), +\fIshmem_put64\fP(3), +\fIshmem_put128\fP(3), +\fIshmem_putmem\fP(3), +\fIshmem_real_put\fP(3), +\fIshmem_short_put\fP(3) +\- Transfers data to a specified +processing element (PE) +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_double_put(double *target, const double *source, + size_t len, int pe); + +void shmem_float_put(float *target, const float *source, + size_t len, int pe); + +void shmem_int_put(int *target, const int *source, size_t len, + int pe); + +void shmem_long_put(long *target, const long *source, + size_t len, int pe); + +void shmem_longdouble_put(long double *target, + const long double *source, size_t len, int pe); + +void shmem_longlong_put(long long *target, + const long long *source, size_t len, int pe); + +void shmem_put32(void *target, const void *source, size_t len, + int pe); + +void shmem_put64(void *target, const void *source, size_t len, + int pe); + +void shmem_put128(void *target, const void *source, size_t len, + int pe); + +void shmem_putmem(void *target, const void *source, size_t len, + int pe); + +void shmem_short_put(short *target, const short *source, + size_t len, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER len, pe + +CALL SHMEM_CHARACTER_PUT(target, source, len, pe) + +CALL SHMEM_COMPLEX_PUT(target, source, len, pe) + +CALL SHMEM_DOUBLE_PUT(target, source, len, pe) + +CALL SHMEM_INTEGER_PUT(target, source, len, pe) + +CALL SHMEM_LOGICAL_PUT(target, source, len, pe) + +CALL SHMEM_PUT(target, source, len, pe) + +CALL SHMEM_PUT4(target, source, len, pe) + +CALL SHMEM_PUT8(target, source, len, pe) + +CALL SHMEM_PUT32(target, source, len, pe) + +CALL SHMEM_PUT64(target, source, len, pe) + +CALL SHMEM_PUT128(target, source, len, pe) + +CALL SHMEM_PUTMEM(target, source, len, pe) + +CALL SHMEM_REAL_PUT(target, source, len, pe) +.Ve +.SH DESCRIPTION + +These routines transfer \fBnelems\fP +elements of the data object at address +\fBsource\fP +on the calling PE, to the data object at address \fBtarget\fP +on the remote +PE \fBpe\fP\&. +These routines start the remote transfer and may return before the data is +delivered to the remote PE. +.PP +The delivery of data into the data object on the destination PE from different put calls may +occur in any order. Because of this, two successive put operations may deliver data out of +order unless a call to \fIshmem_fence\fP(3) +is introduced between the two calls. +.PP +The arguments are as follows: +.TP +target +Data object to be updated on the remote PE. This data object must be remotely +accessible. +.TP +source +Data object containing the data to be copied. +.TP +len +Number of elements in the target and source arrays. len must be of type integer. If +you are using Fortran, it must be a constant, variable, or array element of default integer +type. +.TP +pe +PE number of the remote PE. pe must be of type integer. If you are using Fortran, it +must be a constant, variable, or array element of default integer type. +.PP +The target and source data objects must conform to certain typing constraints, which are as +follows: +.TP +\fBshmem_putmem\fP: Fortran: Any noncharacter type. C: Any data type. len is scaled in +bytes. +.TP +\fBshmem_put4, shmem_put32:\fP Any noncharacter type that has a storage size +equal to 32 bits. +.TP +\fBshmem_put8, shmem_put64:\fP Any noncharacter type that has a storage size +equal to 64 bits. +.TP +\fBshmem_put128:\fP Any noncharacter type that has a storage size equal to 128 +bits. +.TP +\fBshmem_short_put:\fP Elements of type short. +.TP +\fBshmem_int_put:\fP Elements of type int. +.TP +\fBshmem_long_put:\fP Elements of type long. +.TP +\fBshmem_longlong_put:\fP Elements of type long long. +.TP +\fBshmem_float_put:\fP Elements of type float. +.TP +\fBshmem_double_put:\fP Elements of type double. +.TP +\fBshmem_longdouble_put:\fP Elements of type long double. +.TP +\fBSHMEM_CHARACTER_PUT:\fP Elements of type character. len is the number of +characters to transfer. The actual character lengths of the source and target variables are +ignored. +.TP +\fBSHMEM_COMPLEX_PUT:\fP Elements of type complex of default size. +.TP +\fBSHMEM_DOUBLE_PUT:\fP (Fortran) Elements of type double precision. +.TP +\fBSHMEM_INTEGER_PUT:\fP Elements of type integer. +.TP +\fBSHMEM_LOGICAL_PUT:\fP Elements of type logical. +.TP +\fBSHMEM_REAL_PUT:\fP Elements of type real. +If you are using Fortran, data types must be of default size. For example, a real variable must +be declared as REAL, REAL*4, or REAL(KIND=4). +.PP +.SH EXAMPLES + +The following shmem_put example is for C/C++ programs: +.Vb +#include +#include + +main() +{ + long source[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + static long target[10]; + start_pes(2); + + if (_my_pe() == 0) { + /* put 10 words into target on PE 1 */ + shmem_long_put(target, source, 10, 1); + } + shmem_barrier_all(); /* sync sender and receiver */ + if (_my_pe() == 1) + shmem_udcflush(); /* not required on Altix systems */ + printf("target[0] on PE %d is %d\\n", _my_pe(), target[0]); +} +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_iput\fP(3), +\fIshmem_quiet\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_clear_cache_inv.3in b/oshmem/shmem/man/man3/shmem_clear_cache_inv.3in new file mode 100644 index 00000000000..4a6a361ef97 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_clear_cache_inv.3in @@ -0,0 +1 @@ +.so man3/shmem_udcflush.3 diff --git a/oshmem/shmem/man/man3/shmem_clear_cache_line_inv.3in b/oshmem/shmem/man/man3/shmem_clear_cache_line_inv.3in new file mode 100644 index 00000000000..4a6a361ef97 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_clear_cache_line_inv.3in @@ -0,0 +1 @@ +.so man3/shmem_udcflush.3 diff --git a/oshmem/shmem/man/man3/shmem_clear_lock.3in b/oshmem/shmem/man/man3/shmem_clear_lock.3in new file mode 100644 index 00000000000..49974c4f178 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_clear_lock.3in @@ -0,0 +1 @@ +.so man3/shmem_set_lock.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_collect32.3in b/oshmem/shmem/man/man3/shmem_collect32.3in new file mode 100644 index 00000000000..bce6dc5aa00 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_collect32.3in @@ -0,0 +1,197 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_COLLECT" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_collect4\fP(3), +\fIshmem_collect8\fP(3), +\fIshmem_collect32\fP(3), +\fIshmem_collect64\fP(3), +\fIshmem_fcollect\fP(3), +\fIshmem_fcollect4\fP(3), +\fIshmem_fcollect8\fP(3), +\fIshmem_fcollect32\fP(3), +\fIshmem_fcollect64\fP(3) +\- Concatenates blocks of data from multiple processing elements (PEs) to an array in every PE +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_collect32(void *target, const void *source, + size_t nelems, int PE_start, int logPE_stride, int PE_size, + long *pSync); + +void shmem_collect64(void *target, const void *source, + size_t nelems, int PE_start, int logPE_stride, int PE_size, + long *pSync); + +void shmem_fcollect32(void *target, const void *source, + size_t nelems, int PE_start, int logPE_stride, int PE_size, + long *pSync); + +void shmem_fcollect64(void *target, const void *source, + size_t nelems, int PE_start, int logPE_stride, int PE_size, + long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER nelems +INTEGER PE_start, logPE_stride, PE_size +INTEGER pSync(SHMEM_COLLECT_SYNC_SIZE) + +CALL SHMEM_COLLECT4(target, source, nelems, PE_start, +& logPE_stride, PE_size, pSync) + +CALL SHMEM_COLLECT8(target, source, nelems, PE_start, +& logPE_stride, PE_size, pSync) + +CALL SHMEM_FCOLLECT4(target, source, nelems, PE_start, +& logPE_stride, PE_size, pSync) + +CALL SHMEM_FCOLLECT8(target, source, nelems, PE_start, +& logPE_stride, PE_size, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) collect and fcollect routines concatenate nelems 64\-bit or 32\-bit +data items from the source array into the target array, over the set of PEs defined by +PE_start, log2PE_stride, and PE_size, in processor number order. The resultant target array +contains the contribution from PE PE_start first, then the contribution from PE PE_start + +PE_stride second, and so on. The collected result is written to the target array for all PEs in +the active set. +.PP +The fcollect routines require that nelems be the same value in all participating PEs, while the +collect routines allow nelems to vary from PE to PE. +.PP +The resulting target array is as follows: +.Vb +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- + source(1..nelems) + from PE (PE_start + 0 * (2**logPE_stride)) +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- + source(1..nelems) + from PE (PE_start + 1 * (2**logPE_stride)) +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- + ... +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- + source(1..nelems) from + PE (PE_start + (PE_size \- 1) * (2**logPE_stride)) +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +.Ve +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in +the active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The arguments are as follows: +.TP +target +A symmetric array. The target argument must be large enough to accept the concatenation of the source arrays on all PEs. The data types are +as follows: +.RS +.TP +[shmem_collect8, shmem_collect64, shmem_fcollect8, and +shmem_fcollect64] any data type with an element size of 64 bits. Fortran derived types, +Fortran character type, and C/C++ structures are not permitted. +.TP +[shmem_collect4, shmem_collect32, shmem_fcollect4, and +shmem_fcollect32] any data type with an element size of 32 bits. Fortran derived types, +Fortran character type, and C/C++ structures are not permitted. +.RE +.RS +.PP +.RE +.TP +source +A symmetric data object that can be of any type permissible for the target +argument. +.TP +nelems +The number of elements in the source array. nelems must be of type integer. If +you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pSync +A symmetric work array. In C/C++, pSync must be of type int and size +_SHMEM_COLLECT_SYNC_SIZE. In Fortran, pSync must be of type integer and size +SHMEM_COLLECT_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Every element of this array must be initialized with the value _SHMEM_SYNC_VALUE in +C/C++ or SHMEM_SYNC_VALUE in Fortran before any of the PEs in the active set enter +shmem_barrier(). +.PP +The values of arguments PE_start, logPE_stride, and PE_size must be equal on all PEs in +the active set. The same target and source arrays and the same pSync work array must be +passed to all PEs in the active set. +.PP +Upon return from a collective routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.SH NOTES + +The terms collective and symmetric are defined in \fIintro_shmem\fP(3)\&. +All SHMEM collective routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM collective routine. Be careful to +avoid these situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized +pSync before any of them enter a SHMEM routine called with the pSync synchronization array. +A pSync array can be reused on a subsequent SHMEM collective routine only if none +of the PEs in the active set are still processing a prior SHMEM collective routine call that used +the same pSync array. In general, this may be ensured only by doing some type of +synchronization. However, in the special case of SHMEM routines being called with the same +active set, you can allocate two pSync arrays and alternate between them on +successive calls. +.PP +The collective routines operate on active PE sets that have a non\-power\-of\-two PE_size +with some performance degradation. They operate with no performance degradation +when nelems is a non\-power\-of\-two value. +.SH EXAMPLES + +C/C++: +.Vb +for (i=0; i < _SHMEM_COLLECT_SYNC_SIZE; i++) { + pSync[i] = _SHMEM_SYNC_VALUE; +} +shmem_barrier_all(); /* Wait for all PEs to initialize pSync */ +shmem_collect32(target, source, 64, pe_start, logPE_stride, + pe_size, pSync); +.Ve +Fortran: +.Vb +INTEGER PSYNC(SHMEM_COLLECT_SYNC_SIZE) +DATA PSYNC /SHMEM_COLLECT_SYNC_SIZE*SHMEM_SYNC_VALUE/ + +CALL SHMEM_COLLECT4(TARGET, SOURCE, 64, PE_START, +& LOGPE_STRIDE, PE_SIZE, PSYNC) +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_collect64.3in b/oshmem/shmem/man/man3/shmem_collect64.3in new file mode 100644 index 00000000000..17caf5bf98e --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_collect64.3in @@ -0,0 +1 @@ +.so man3/shmem_collect32.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_complexd_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_complexd_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_complexd_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_complexd_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_complexd_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_complexd_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_complexf_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_complexf_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_complexf_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_complexf_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_complexf_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_complexf_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_double_g.3in b/oshmem/shmem/man/man3/shmem_double_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_get.3in b/oshmem/shmem/man/man3/shmem_double_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_iget.3in b/oshmem/shmem/man/man3/shmem_double_iget.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_iget.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_iput.3in b/oshmem/shmem/man/man3/shmem_double_iput.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_iput.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_max_to_all.3in b/oshmem/shmem/man/man3/shmem_double_max_to_all.3in new file mode 100644 index 00000000000..e4ad3901e86 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_max_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_max_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_min_to_all.3in b/oshmem/shmem/man/man3/shmem_double_min_to_all.3in new file mode 100644 index 00000000000..d688221529b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_min_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_min_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_double_p.3in b/oshmem/shmem/man/man3/shmem_double_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_double_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_double_put.3in b/oshmem/shmem/man/man3/shmem_double_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_double_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_double_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_double_swap.3in b/oshmem/shmem/man/man3/shmem_double_swap.3in new file mode 100644 index 00000000000..a038a3f31e5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_double_swap.3in @@ -0,0 +1 @@ +.so man3/shmem_swap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_fcollect32.3in b/oshmem/shmem/man/man3/shmem_fcollect32.3in new file mode 100644 index 00000000000..17caf5bf98e --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_fcollect32.3in @@ -0,0 +1 @@ +.so man3/shmem_collect32.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_fcollect64.3in b/oshmem/shmem/man/man3/shmem_fcollect64.3in new file mode 100644 index 00000000000..17caf5bf98e --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_fcollect64.3in @@ -0,0 +1 @@ +.so man3/shmem_collect32.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_fence.3in b/oshmem/shmem/man/man3/shmem_fence.3in new file mode 100644 index 00000000000..12e97a55dc7 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_fence.3in @@ -0,0 +1,54 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_FENCE" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +shmem_fence \- Provides a separate ordering on the sequence of puts issued by this PE to each destination +PE. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_fence(void); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +CALL SHMEM_FENCE +.Ve +.SH DESCRIPTION + +The \fBshmem_fence()\fP +routine provides an ordering on the put operations issued by the calling +PE prior to the call to \fBshmem_fence()\fP +relative to the put operations issued by the +calling PE following the call to \fBshmem_fence()\fP\&. +It guarantees that all such prior put operations +issued to a particular destination PE are fully written to the symmetric memory of +that destination PE, before any such following put operations to that same destination PE +are written to the symmetric memory of that destination PE. +Note that the ordering is provided separately on the sequences of puts from the calling PE to +each distinct destination PE. The \fBshmem_quiet()\fP +routine should be used instead if ordering +of puts is required when multiple destination PEs are involved. +.SH NOTES + +The shmem_quiet function should be called if ordering of puts is desired when multiple remote +PEs are involved. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_float_g.3in b/oshmem/shmem/man/man3/shmem_float_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_get.3in b/oshmem/shmem/man/man3/shmem_float_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_iget.3in b/oshmem/shmem/man/man3/shmem_float_iget.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_iget.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_iput.3in b/oshmem/shmem/man/man3/shmem_float_iput.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_iput.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_max_to_all.3in b/oshmem/shmem/man/man3/shmem_float_max_to_all.3in new file mode 100644 index 00000000000..e4ad3901e86 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_max_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_max_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_min_to_all.3in b/oshmem/shmem/man/man3/shmem_float_min_to_all.3in new file mode 100644 index 00000000000..d688221529b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_min_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_min_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_float_p.3in b/oshmem/shmem/man/man3/shmem_float_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_float_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_float_put.3in b/oshmem/shmem/man/man3/shmem_float_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_float_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_float_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_float_swap.3in b/oshmem/shmem/man/man3/shmem_float_swap.3in new file mode 100644 index 00000000000..a038a3f31e5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_float_swap.3in @@ -0,0 +1 @@ +.so man3/shmem_swap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_get128.3in b/oshmem/shmem/man/man3/shmem_get128.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_get128.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_get32.3in b/oshmem/shmem/man/man3/shmem_get32.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_get32.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_get64.3in b/oshmem/shmem/man/man3/shmem_get64.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_get64.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_getmem.3in b/oshmem/shmem/man/man3/shmem_getmem.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_getmem.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_iget128.3in b/oshmem/shmem/man/man3/shmem_iget128.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_iget128.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_iget32.3in b/oshmem/shmem/man/man3/shmem_iget32.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_iget32.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_iget64.3in b/oshmem/shmem/man/man3/shmem_iget64.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_iget64.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_add.3in b/oshmem/shmem/man/man3/shmem_int_add.3in new file mode 100644 index 00000000000..ff4728492a3 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_add.3in @@ -0,0 +1,76 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_ADD" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int_add\fP(3), +\fIshmem_int4_add\fP(3), +\fIshmem_int8_add\fP(3), +\fIshmem_long_add\fP(3), +\fIshmem_longlong_add\fP(3) +\- Performs an atomic add +operation. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_int_add(int *target, int value, int pe); +void shmem_long_add(long *target, long value, int pe); +void shmem_longlong_add(long long *target, long long value, + int pe); +.Ve +Fortran: +.Vb +include 'mpp/shmem.h' + +INTEGER pe + +CALL SHMEM_INT4_ADD(target, value, pe) +CALL SHMEM_INT8_ADD(target, value, pe) +.Ve +.SH DESCRIPTION + +The atomic add routines add \fBvalue\fP +to the data at address \fBtarget\fP +on PE +\fBpe\fP\&. +The operation completes without the possibility of another process updating +target between the time of the fetch and the update. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. If +you are using C/C++, the type of target should match that implied in the SYNOPSIS section. If +you are using the Fortran compiler, it must be of type integer with an element size of 4 bytes +for SHMEM_INT4_ADD and 8 bytes for SHMEM_INT8_ADD. +.TP +value +The value to be atomically added to target. If you are using C/C++, the type of +value should match that implied in the SYNOPSIS section. If you are using Fortran, it must be +of type integer with an element size of target. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.PP +.SH NOTES + +The term remotely accessible is defined in \fIintro_shmem\fP(3)\&. +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_cache\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_int_and_to_all.3in b/oshmem/shmem/man/man3/shmem_int_and_to_all.3in new file mode 100644 index 00000000000..5b5103cd48f --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_and_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_and_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_cswap.3in b/oshmem/shmem/man/man3/shmem_int_cswap.3in new file mode 100644 index 00000000000..568e66cc2ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_cswap.3in @@ -0,0 +1,127 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_CSWAP" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int_cswap\fP(3), +\fIshmem_int4_cswap\fP(3), +\fIshmem_int8_cswap\fP(3), +\fIshmem_long_cswap\fP(3), +\fIshmem_longlong_cswap\fP(3) +\- Performs an atomic conditional swap to a remote data object +.SH SYNOPSIS + +C or C++: +.Vb +#include + +int shmem_int_cswap(int *target, int cond, int value, int pe); + +long shmem_long_cswap(long *target, long cond, long value, + int pe); + +long long shmem_longlong_cswap(longlong *target, + longlong cond, longlong value, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pe + +INTEGER(KIND=4) SHMEM_INT4_CSWAP +ires = SHMEM_INT4_CSWAP(target, cond, value, pe) + +INTEGER(KIND=8) SHMEM_INT8_CSWAP +ires = SHMEM_INT8_CSWAP(target, cond, value, pe) +.Ve +.SH DESCRIPTION + +The conditional swap routines conditionally update a target data object on an arbitrary +processing element (PE) and return the prior contents of the data object in one atomic +operation. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. If +you are using C/C++, the type of target should match that implied in the SYNOPSIS section. If +you are using the Fortran compiler, it must be of type integer with an element size of 4 bytes +for SHMEM_INT4_ADD and 8 bytes for SHMEM_INT8_ADD. +.TP +value +The value to be atomically added to target. If you are using C/C++, the type of +value should match that implied in the SYNOPSIS section. If you are using Fortran, it must be +of type integer with an element size of target. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.TP +target +The remotely accessible integer data object to be updated on the remote PE. If +you are using C/C++, the data type of target should match that implied in the SYNOPSIS +section. If you are using Fortran, it must be of the following type: +.RS +.TP +\fBSHMEM_INT4_CSWAP\fP: 4\-byte integer +.TP +\fBSHMEM_INT8_CSWAP\fP: 8\-byte integer +.RE +.RS +.PP +.RE +.TP +cond +cond is compared to the remote target value. If cond and the remote target are +equal, then value is swapped into the remote target. Otherwise, the remote target is +unchanged. In either case, the old value of the remote target is returned as the function return +value. cond must be of the same data type as target. +.TP +value +The value to be atomically written to the remote PE. value must be the same data +type as target. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.PP +.SH NOTES + +The term remotely accessible is defined in \fIintro_shmem\fP(3)\&. +.SH RETURN VALUES + +The contents that had been in the target data object on the remote PE prior to the conditional +swap. +.SH EXAMPLES + +The following call ensures that the first PE to execute the conditional swap will successfully +write its PE number to race_winner on PE 0. +.Vb +main() +{ + static int race_winner = \-1; + int oldval; + + start_pes(2); + oldval = shmem_int_cswap(&race_winner, \-1, _my_pe(), 0); + if (oldval == \-1) + printf("pe %d was first\\n",_my_pe()); +} +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_cache\fP(3), +\fIshmem_swap\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_int_fadd.3in b/oshmem/shmem/man/man3/shmem_int_fadd.3in new file mode 100644 index 00000000000..a1eb7269240 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_fadd.3in @@ -0,0 +1,79 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_FADD" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int4_fadd\fP(3), +\fIshmem_int8_fadd\fP(3), +\fIshmem_int_fadd\fP(3), +\fIshmem_long_fadd\fP(3), +\fIshmem_longlong_fadd\fP(3) +\- Performs an atomic fetch\-and\-add operation on a remote data object +.SH SYNOPSIS + +C or C++: +.Vb +#include + +int shmem_int_fadd(int *target, int value, int pe); + +long shmem_long_fadd(long *target, long value, int pe); + +long long shmem_longlong_fadd(long long *target, longlong value, + int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pe + +INTEGER(KIND=4) SHMEM_INT4_FADD, ires, target, value +ires = SHMEM_INT4_FADD(target, value, pe) + +INTEGER(KIND=8) SHMEM_INT8_FADD, ires, target, value +ires = SHMEM_INT8_FADD(target, value, pe) +.Ve +.SH DESCRIPTION + +shmem_fadd functions perform an atomic fetch\-and\-add operation. An atomic +fetch\-and\-add operation fetches the old target and adds value to target without the +possibility of another process updating target between the time of the fetch and the update. +These routines add value to target on Processing Element (PE) pe and return the previous +contents of target as an atomic operation. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. The +type of target should match that implied in the SYNOPSIS section. +.TP +value +The value to be atomically added to target. The type of value should match that +implied in the SYNOPSIS section. +.TP +pe +An integer that indicates the PE number on which target is to be updated. If you are +using Fortran, it must be a default integer value. +.PP +.SH NOTES + +The term remotely accessible is defined in \fIintro_shmem\fP(3)\&. +.SH RETURN VALUES + +The contents that had been at the target address on the remote PE prior to the atomic addition +operation. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_int_finc.3in b/oshmem/shmem/man/man3/shmem_int_finc.3in new file mode 100644 index 00000000000..0f1808693e9 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_finc.3in @@ -0,0 +1,76 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_FINC" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int4_finc\fP(3), +\fIshmem_int8_finc\fP(3), +\fIshmem_int_finc\fP(3), +\fIshmem_long_finc\fP(3), +\fIshmem_longlong_finc\fP(3) +\- Performs an atomic fetch\-and\-increment operation on a remote data object +.SH SYNOPSIS + +C or C++: +.Vb +#include + +int shmem_int_finc(int *target, int pe); + +long shmem_long_finc(long *target, int pe); + +long long shmem_longlong_finc(long long *target, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pe +INTEGER(KIND=4) SHMEM_INT4_FINC, target4 +INTEGER(KIND=8) SHMEM_INT8_FINC, target8 + +ires4 = SHMEM_INT4_FINC(target4, pe) + +ires8 = SHMEM_INT8_FINC(target8, pe) +.Ve +.SH DESCRIPTION + +The fetch and increment routines retrieve the value at address \fBtarget\fP +on PE +\fBpe\fP, +and update \fBtarget\fP +with the result of incrementing the retrieved value by +one. The operation must be completed without the possibility of another process updating +\fBtarget\fP +between the time of the fetch and the update. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. The +type of target should match that implied in the SYNOPSIS section. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.PP +.SH NOTES + +The term remotely accessible is defined in \fIintro_shmem\fP(3)\&. +.SH RETURN VALUES + +The contents that had been at the target address on the remote PE prior to the increment. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_int_g.3in b/oshmem/shmem/man/man3/shmem_int_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_get.3in b/oshmem/shmem/man/man3/shmem_int_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_iget.3in b/oshmem/shmem/man/man3/shmem_int_iget.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_iget.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_inc.3in b/oshmem/shmem/man/man3/shmem_int_inc.3in new file mode 100644 index 00000000000..0a879d766d7 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_inc.3in @@ -0,0 +1,73 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_INC" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int4_inc\fP(3), +\fIshmem_int8_inc\fP(3), +\fIshmem_int_inc\fP(3), +\fIshmem_long_inc\fP(3), +\fIshmem_longlong_inc\fP(3) +\- These routines perform an atomic increment operation on a remote data object. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +int shmem_int_inc(int *target, int pe); + +long shmem_long_inc(long *target, int pe); + +long long shmem_longlong_inc(long long *target, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pe +INTEGER(KIND=4) SHMEM_INT4_INC, target4 +INTEGER(KIND=8) SHMEM_INT8_INC, target8 + +ires4 = SHMEM_INT4_INC(target4, pe) + +ires8 = SHMEM_INT8_INC(target8, pe) +.Ve +.SH DESCRIPTION + +The atomic increment routines replace the value of \fBtarget\fP +with its value incremented by +one. The operation must be completed without the possibility of another process updating +\fBtarget\fP +between the time of the fetch and the update. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. The +type of target should match that implied in the SYNOPSIS section. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.PP +.SH NOTES + +The term remotely accessible is defined in \fIintro_shmem\fP(3)\&. +.SH RETURN VALUES + +None. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_int_iput.3in b/oshmem/shmem/man/man3/shmem_int_iput.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_iput.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_max_to_all.3in b/oshmem/shmem/man/man3/shmem_int_max_to_all.3in new file mode 100644 index 00000000000..e4ad3901e86 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_max_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_max_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_min_to_all.3in b/oshmem/shmem/man/man3/shmem_int_min_to_all.3in new file mode 100644 index 00000000000..d688221529b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_min_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_min_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_int_or_to_all.3in b/oshmem/shmem/man/man3/shmem_int_or_to_all.3in new file mode 100644 index 00000000000..c78fc060526 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_or_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_or_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_p.3in b/oshmem/shmem/man/man3/shmem_int_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_int_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_int_put.3in b/oshmem/shmem/man/man3/shmem_int_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_int_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_int_swap.3in b/oshmem/shmem/man/man3/shmem_int_swap.3in new file mode 100644 index 00000000000..a038a3f31e5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_swap.3in @@ -0,0 +1 @@ +.so man3/shmem_swap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_int_wait.3in b/oshmem/shmem/man/man3/shmem_int_wait.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_wait.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_int_wait_until.3in b/oshmem/shmem/man/man3/shmem_int_wait_until.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_wait_until.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_int_xor_to_all.3in b/oshmem/shmem/man/man3/shmem_int_xor_to_all.3in new file mode 100644 index 00000000000..cd2d696b96b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_int_xor_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_xor_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_iput128.3in b/oshmem/shmem/man/man3/shmem_iput128.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_iput128.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_iput32.3in b/oshmem/shmem/man/man3/shmem_iput32.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_iput32.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_iput64.3in b/oshmem/shmem/man/man3/shmem_iput64.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_iput64.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_add.3in b/oshmem/shmem/man/man3/shmem_long_add.3in new file mode 100644 index 00000000000..b356added7d --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_add.3in @@ -0,0 +1 @@ +.so man3/shmem_int_add.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_and_to_all.3in b/oshmem/shmem/man/man3/shmem_long_and_to_all.3in new file mode 100644 index 00000000000..5b5103cd48f --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_and_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_and_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_cswap.3in b/oshmem/shmem/man/man3/shmem_long_cswap.3in new file mode 100644 index 00000000000..b89ae230be7 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_cswap.3in @@ -0,0 +1 @@ +.so man3/shmem_int_cswap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_fadd.3in b/oshmem/shmem/man/man3/shmem_long_fadd.3in new file mode 100644 index 00000000000..bebae84923e --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_fadd.3in @@ -0,0 +1 @@ +.so man3/shmem_int_fadd.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_finc.3in b/oshmem/shmem/man/man3/shmem_long_finc.3in new file mode 100644 index 00000000000..2c75c2ab68f --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_finc.3in @@ -0,0 +1 @@ +.so man3/shmem_int_finc.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_g.3in b/oshmem/shmem/man/man3/shmem_long_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_get.3in b/oshmem/shmem/man/man3/shmem_long_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_iget.3in b/oshmem/shmem/man/man3/shmem_long_iget.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_iget.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_inc.3in b/oshmem/shmem/man/man3/shmem_long_inc.3in new file mode 100644 index 00000000000..aa2f265e1b9 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_inc.3in @@ -0,0 +1 @@ +.so man3/shmem_int_inc.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_iput.3in b/oshmem/shmem/man/man3/shmem_long_iput.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_iput.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_max_to_all.3in b/oshmem/shmem/man/man3/shmem_long_max_to_all.3in new file mode 100644 index 00000000000..e4ad3901e86 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_max_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_max_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_min_to_all.3in b/oshmem/shmem/man/man3/shmem_long_min_to_all.3in new file mode 100644 index 00000000000..d688221529b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_min_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_min_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_long_or_to_all.3in b/oshmem/shmem/man/man3/shmem_long_or_to_all.3in new file mode 100644 index 00000000000..c78fc060526 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_or_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_or_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_p.3in b/oshmem/shmem/man/man3/shmem_long_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_long_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_long_put.3in b/oshmem/shmem/man/man3/shmem_long_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_long_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_long_swap.3in b/oshmem/shmem/man/man3/shmem_long_swap.3in new file mode 100644 index 00000000000..a038a3f31e5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_swap.3in @@ -0,0 +1 @@ +.so man3/shmem_swap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_long_wait.3in b/oshmem/shmem/man/man3/shmem_long_wait.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_wait.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_long_wait_until.3in b/oshmem/shmem/man/man3/shmem_long_wait_until.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_wait_until.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_long_xor_to_all.3in b/oshmem/shmem/man/man3/shmem_long_xor_to_all.3in new file mode 100644 index 00000000000..cd2d696b96b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_long_xor_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_xor_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_g.3in b/oshmem/shmem/man/man3/shmem_longdouble_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_get.3in b/oshmem/shmem/man/man3/shmem_longdouble_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_iget.3in b/oshmem/shmem/man/man3/shmem_longdouble_iget.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_iget.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_iput.3in b/oshmem/shmem/man/man3/shmem_longdouble_iput.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_iput.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_max_to_all.3in b/oshmem/shmem/man/man3/shmem_longdouble_max_to_all.3in new file mode 100644 index 00000000000..e4ad3901e86 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_max_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_max_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_min_to_all.3in b/oshmem/shmem/man/man3/shmem_longdouble_min_to_all.3in new file mode 100644 index 00000000000..d688221529b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_min_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_min_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_longdouble_p.3in b/oshmem/shmem/man/man3/shmem_longdouble_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_longdouble_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_longdouble_put.3in b/oshmem/shmem/man/man3/shmem_longdouble_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longdouble_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_longdouble_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longdouble_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_longlong_add.3in b/oshmem/shmem/man/man3/shmem_longlong_add.3in new file mode 100644 index 00000000000..b356added7d --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_add.3in @@ -0,0 +1 @@ +.so man3/shmem_int_add.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_and_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_and_to_all.3in new file mode 100644 index 00000000000..5b5103cd48f --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_and_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_and_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_cswap.3in b/oshmem/shmem/man/man3/shmem_longlong_cswap.3in new file mode 100644 index 00000000000..b89ae230be7 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_cswap.3in @@ -0,0 +1 @@ +.so man3/shmem_int_cswap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_fadd.3in b/oshmem/shmem/man/man3/shmem_longlong_fadd.3in new file mode 100644 index 00000000000..bebae84923e --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_fadd.3in @@ -0,0 +1 @@ +.so man3/shmem_int_fadd.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_finc.3in b/oshmem/shmem/man/man3/shmem_longlong_finc.3in new file mode 100644 index 00000000000..2c75c2ab68f --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_finc.3in @@ -0,0 +1 @@ +.so man3/shmem_int_finc.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_g.3in b/oshmem/shmem/man/man3/shmem_longlong_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_get.3in b/oshmem/shmem/man/man3/shmem_longlong_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_iget.3in b/oshmem/shmem/man/man3/shmem_longlong_iget.3in new file mode 100644 index 00000000000..48dee9db503 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_iget.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iget.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_inc.3in b/oshmem/shmem/man/man3/shmem_longlong_inc.3in new file mode 100644 index 00000000000..aa2f265e1b9 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_inc.3in @@ -0,0 +1 @@ +.so man3/shmem_int_inc.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_iput.3in b/oshmem/shmem/man/man3/shmem_longlong_iput.3in new file mode 100644 index 00000000000..c7b4a30e1ab --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_iput.3in @@ -0,0 +1 @@ +.so man3/shmem_short_iput.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_max_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_max_to_all.3in new file mode 100644 index 00000000000..e4ad3901e86 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_max_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_max_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_min_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_min_to_all.3in new file mode 100644 index 00000000000..d688221529b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_min_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_min_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_longlong_or_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_or_to_all.3in new file mode 100644 index 00000000000..c78fc060526 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_or_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_or_to_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_p.3in b/oshmem/shmem/man/man3/shmem_longlong_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_prod_to_all.3in new file mode 100644 index 00000000000..39b196d0820 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_prod_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_prod_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_longlong_put.3in b/oshmem/shmem/man/man3/shmem_longlong_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_sum_to_all.3in new file mode 100644 index 00000000000..f75a4948417 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_sum_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_sum_to_all.3 diff --git a/oshmem/shmem/man/man3/shmem_longlong_swap.3in b/oshmem/shmem/man/man3/shmem_longlong_swap.3in new file mode 100644 index 00000000000..a038a3f31e5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_swap.3in @@ -0,0 +1 @@ +.so man3/shmem_swap.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_longlong_wait.3in b/oshmem/shmem/man/man3/shmem_longlong_wait.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_wait.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_longlong_wait_until.3in b/oshmem/shmem/man/man3/shmem_longlong_wait_until.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_wait_until.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_longlong_xor_to_all.3in b/oshmem/shmem/man/man3/shmem_longlong_xor_to_all.3in new file mode 100644 index 00000000000..cd2d696b96b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_longlong_xor_to_all.3in @@ -0,0 +1 @@ +.so man3/shmem_short_xor_all.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_pe_accessible.3in b/oshmem/shmem/man/man3/shmem_pe_accessible.3in new file mode 100644 index 00000000000..66b38b9224b --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_pe_accessible.3in @@ -0,0 +1,54 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_PE\\_ACCESSIBLE" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +shmem_pe_accessible \- Determines whether a processing element (PE) is accessible via +SHMEM data transfer operations. +.SH SYNOPSIS + +C: +.Vb +#include + +int shmem_pe_accessible(int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +LOGICAL LOG, SHMEM_PE_ACCESSIBLE +INTEGER pe + +LOG = SHMEM_PE_ACCESSIBLE(pe) +.Ve +.SH DESCRIPTION + +shmem_pe_accessible returns a value that indicates whether the calling PE is able to perform +OpenSHMEM communication operations with the remote PE. +.SH RETURN VALUES + +.TP +C/C++ +The return value is 1 if the specified PE is a valid remote PE for SHMEM functions; +otherwise,it is 0. +.TP +Fortran +The return value is \&.TRUE. if the specified PE is a valid remote PE for SHMEM +functions; otherwise, it is \&.FALSE.. +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_addr_accessible\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_ptr.3in b/oshmem/shmem/man/man3/shmem_ptr.3in new file mode 100644 index 00000000000..bfc1a0170c8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_ptr.3in @@ -0,0 +1,129 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_PTR" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_ptr\fP(3) +\- Returns a pointer to a data object on a specified processing element +(PE). +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void *shmem_ptr(void *target, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +POINTER (PTR, POINTEE) +INTEGER pe + +PTR = SHMEM_PTR(target, pe) +.Ve +.SH DESCRIPTION + +The shmem_ptr routine returns an address that can be used to directly reference +\fBtarget\fP +on the remote PE \fBpe\fP\&. +With this address we can perform ordinary loads +and stores to the remote address. +.PP +When a sequence of loads (gets) and stores (puts) to a data object on a remote PE does not +match the access pattern provided in a SHMEM data transfer routine like +\fIshmem_put32\fP(3) +or \fIshmem_real_iget\fP(3), +the shmem_ptr function can +provide an efficient means to accomplish the communication. +.PP +The arguments are as follows: +.TP +target +The symmetric data object to be referenced. +.TP +pe +An integer that indicates the PE number on which target is to be accessed. If you +are using Fortran, it must be a default integer value. +.PP +.SH EXAMPLES + +This Fortran program calls shmem_ptr and then PE 0 writes to the BIGD array on PE 1: +.Vb +PROGRAM REMOTEWRITE + INCLUDE 'mpp/shmem.fh' + + INTEGER BIGD(100) + SAVE BIGD + INTEGER POINTEE(*) + + POINTER (PTR,POINTEE) + CALL START_PES(0) + IF (MY_PE() .EQ. 0) THEN + ! initialize PE 1's BIGD array + PTR = SHMEM_PTR(BIGD, 1) ! get address of PE 1's BIGD + ! array + DO I=1,100 + POINTEE(I) = I + ENDDO + ENDIF + CALL SHMEM_BARRIER_ALL + IF (MY_PE() .EQ. 1) THEN + PRINT *, 'BIGD on PE 1 is: ' + PRINT *, BIGD + ENDIF +END +.Ve +This is the equivalent program written in C: +.Vb +#include +main() +{ + static int bigd[100]; + int *ptr; + int i; + + start_pes(0); + if (_my_pe() == 0) { + /* initialize PE 1's bigd array */ + ptr = shmem_ptr(bigd, 1); + for (i=0; i<100; i++) + *ptr++ = i+1; + } + shmem_barrier_all(); + if (_my_pe() == 1) { + printf("bigd on PE 1 is:\\n"); + for (i=0; i<100; i++) + printf(" %d\\n",bigd[i]); + printf("\\n"); + } +} +.Ve +.SH NOTES + +The shmem_ptr function is available only on systems where ordinary memory loads and +stores are used to implement SHMEM put and get operations. +.PP +.SH RETURN VALUES + +shmem_ptr returns a pointer to the data object on the specified remote PE. If target is not +remotely accessible, a NULL pointer is returned. +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_put\fP(3), +\fIshmem_get\fP(3) +.PP diff --git a/oshmem/shmem/man/man3/shmem_put128.3in b/oshmem/shmem/man/man3/shmem_put128.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_put128.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_put32.3in b/oshmem/shmem/man/man3/shmem_put32.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_put32.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_put64.3in b/oshmem/shmem/man/man3/shmem_put64.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_put64.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_putmem.3in b/oshmem/shmem/man/man3/shmem_putmem.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_putmem.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_quiet.3in b/oshmem/shmem/man/man3/shmem_quiet.3in new file mode 100644 index 00000000000..cd92ae17944 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_quiet.3in @@ -0,0 +1,84 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_QUIET" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_quiet\fP(3) +\- Waits for completion of all outstanding remote writes issued by a +processing element (PE). +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_quiet(void); +.Ve +Fortran: +.Vb +CALL SHMEM_QUIET +.Ve +.SH DESCRIPTION + +shmem_quiet ensures ordering of put (remote write) operations. All put operations issued to +any processing element (PE) prior to the call to shmem_quiet are guaranteed to be visible to +all other PEs no later than any subsequent memory load or store, remote put or get, or +synchronization operations that follow the call to shmem_quiet. +.SH NOTES + +shmem_quiet is most useful as a way of ensuring ordering of delivery of several put +operations. For example, you might use shmem_quiet to await delivery of a block of data +before issuing another put, which sets a completion flag on another PE. +.br +shmem_quiet is not usually needed if \fIshmem_barrier_all\fP(3) +or +\fIshmem_barrier\fP(3) +are called. The barrier routines all wait for the completion of +outstanding remote writes (puts). +.SH EXAMPLES + +.Vb +PROGRAM COMPFLAG + INCLUDE "mpp/shmem.fh" + + INTEGER FLAG_VAR, ARRAY(100), RECEIVER, SENDER + COMMON/FLAG/FLAG_VAR + COMMON/DATA/ARRAY + INTRINSIC MY_PE + + FLAG_VAR = 0 + CALL SHMEM_BARRIER_ALL ! wait for FLAG_VAR to be initialized + SENDER = 0 ! PE 0 sends the data + RECEIVER = 1 ! PE 1 receives the data + + IF (MY_PE() .EQ. 0) THEN + ARRAY = 33 + CALL SHMEM_PUT(ARRAY, ARRAY, 100, RECEIVER) ! start sending data + CALL SHMEM_QUIET ! wait for delivery + CALL SHMEM_PUT(FLAG_VAR, 1, 1, RECEIVER) ! send completion flag + ELSE IF (MY_PE() .EQ. RECEIVER) THEN + CALL SHMEM_UDCFLUSH + CALL SHMEM_WAIT(FLAG_VAR, 0) + PRINT *,ARRAY ! ARRAY has been delivered + ENDIF +END +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_barrier\fP(3), +\fIshmem_barrier_all\fP(3), +\fIshmem_fence\fP(3), +\fIshmem_put\fP(3), +\fIshmem_wait\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_set_cache_inv.3in b/oshmem/shmem/man/man3/shmem_set_cache_inv.3in new file mode 100644 index 00000000000..4a6a361ef97 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_set_cache_inv.3in @@ -0,0 +1 @@ +.so man3/shmem_udcflush.3 diff --git a/oshmem/shmem/man/man3/shmem_set_cache_line_inv.3in b/oshmem/shmem/man/man3/shmem_set_cache_line_inv.3in new file mode 100644 index 00000000000..4a6a361ef97 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_set_cache_line_inv.3in @@ -0,0 +1 @@ +.so man3/shmem_udcflush.3 diff --git a/oshmem/shmem/man/man3/shmem_set_lock.3in b/oshmem/shmem/man/man3/shmem_set_lock.3in new file mode 100644 index 00000000000..750e83a21b6 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_set_lock.3in @@ -0,0 +1,78 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_LOCK" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_set_lock\fP(3), +\fIshmem_clear_lock\fP(3), +\fIshmem_test_lock\fP(3) +\- Releases, locks, and tests a mutual exclusion memory lock. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_clear_lock(long *lock); + +void shmem_set_lock(long *lock); + +int shmem_test_lock(long *lock); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER lock, SHMEM_TEST_LOCK + +CALL SHMEM_CLEAR_LOCK(lock) + +CALL SHMEM_SET_LOCK(lock) + +I = SHMEM_TEST_LOCK(lock) +.Ve +.SH DESCRIPTION + +The shmem_set_lock routine sets a mutual exclusion lock after waiting for the lock to be +freed by any other PE currently holding the lock. Waiting PEs are assured of getting the lock +in a first\-come, first\-served manner. +.PP +The shmem_clear_lock routine releases a lock previously set by shmem_set_lock after +ensuring that all local and remote stores initiated in the critical region are complete. +.PP +The shmem_test_lock function sets a mutual exclusion lock only if it is currently cleared. +By using this function, a PE can avoid blocking on a set lock. If the lock is currently set, the +function returns without waiting. +These routines are appropriate for protecting a critical region from simultaneous update by +multiple PEs. +They accept the following arguments: +.TP +lock +A symmetric data object that is a scalar variable or an array of length 1. This +data object must be set to 0 on all processing elements (PEs) prior to the first use. lock must +be of type integer. If you are using Fortran, it must be of default kind. +.PP +.SH NOTES + +The term symmetric data object is defined on \fIintro_shmem\fP(3)\&. +.PP +.SH RETURN VALUES + +The shmem_test_lock function returns 0 if the lock was originally cleared and this call +was able to set the lock. A value of 1 is returned if the lock had been set and the call returned +without waiting to set the lock. +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_and_to_all.3in b/oshmem/shmem/man/man3/shmem_short_and_to_all.3in new file mode 100644 index 00000000000..d9204fcfe28 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_and_to_all.3in @@ -0,0 +1,206 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_AND" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int_and_to_all\fP(3), +\fIshmem_int4_and_to_all\fP(3), +\fIshmem_int8_and_to_all\fP(3), +\fIshmem_long_and_to_all\fP(3), +\fIshmem_longlong_and_to_all\fP(3), +\fIshmem_short_and_to_all\fP(3) +\- Performs a bitwise AND operation on symmetric +arrays over the active set of PEs. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_int_and_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_and_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longlong_and_to_all(long long *target, + long long *source, int nreduce, int PE_start, int logPE_stride, + int PE_size, long long *pWrk, long *pSync); + +void shmem_short_and_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); + +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_INT4_AND_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_AND_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) +.Ve +.PP +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +\fIintro_shmem\fP(3)\&. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The arguments are as follows: +.TP +target +A symmetric array, of length nreduce elements, to receive the result of the +reduction operations. The data type of target varies with the version of the reduction routine +being called. When calling from C/C++, refer to the SYNOPSIS section for data type +information. When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_int8_and_to_all\fP: Integer, with an element size of 8 bytes +.TP +\fBshmem_int4_and_to_all\fP: Integer, with an element size of 4 bytes +.RE +.RS +.PP +.RE +.TP +source +A symmetric array, of length nreduce elements, that contains one element for +each separate reduction operation. The source argument must have the same data type as +target. +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync must be of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync must be of type integer and size +SHMEM_REDUCE_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Every element of this array must be initialized with the value _SHMEM_SYNC_VALUE (in +C/C++) or SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter +the reduction routine. +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on all +PEs in the active set. The same target and source arrays, and the same pWrk and pSync work +arrays, must be passed to all PEs in the active set. +.PP +Before any PE calls a reduction routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pWrk and pSync arrays on all PEs in the active set are not still in use from a prior call to a +collective SHMEM routine. The target array on all PEs in the active set is ready to accept the +results of the reduction. +.PP +Upon return from a reduction routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.PP +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful to avoid the +following situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync or pWrk array can be reused in a subsequent reduction routine call only if none of the +PEs in the active set are still processing a prior reduction routine call that used the same +pSync or pWrk arrays. In general, this can be assured only by doing some type of +synchronization. However, in the special case of reduction routines being called with the +same active set, you can allocate two pSync and pWrk arrays and alternate between them on +successive calls. +.PP +.SH EXAMPLES + +\fBExample 1\fP: +This Fortran example statically initializes the pSync array and finds the logical AND of the integer variable FOO across all even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL PWRK(MAX(NR/2+1, SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +INTEGER FOO, FOOAND +COMMON /COM/ FOO, FOOAND, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_INT8_AND_TO_ALL(FOOAND, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *, 'Result on PE ', MY_PE(), ' is ', FOOAND +ENDIF +.Ve +\fBExample 2\fP: +Consider the following C call: +.Vb +shmem_int_and_to_all( target, source, 3, 0, 0, 8, pwrk, psync ); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_int_and_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); + +shmem_int_and_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); + +shmem_int_and_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); +.Ve +Note that two sets of pWrk and pSync arrays are used alternately because no +synchronization is done between calls. +.SH SEE ALSO + +\fIf90\fP(1), +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_g.3in b/oshmem/shmem/man/man3/shmem_short_g.3in new file mode 100644 index 00000000000..d2bbc4ad8d5 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_g.3in @@ -0,0 +1 @@ +.so man3/shmem_char_g.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_short_get.3in b/oshmem/shmem/man/man3/shmem_short_get.3in new file mode 100644 index 00000000000..6d7c165d2e8 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_get.3in @@ -0,0 +1 @@ +.so man3/shmem_char_get.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_short_iget.3in b/oshmem/shmem/man/man3/shmem_short_iget.3in new file mode 100644 index 00000000000..5538cd707b7 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_iget.3in @@ -0,0 +1,217 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_IGET" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_complex_iget\fP(3), +\fIshmem_double_iget\fP(3), +\fIshmem_float_iget\fP(3), +\fIshmem_iget4\fP(3), +\fIshmem_iget8\fP(3), +\fIshmem_iget32\fP(3), +\fIshmem_iget64\fP(3), +\fIshmem_iget128\fP(3), +\fIshmem_int_iget\fP(3), +\fIshmem_integer_iget\fP(3), +\fIshmem_logical_iget\fP(3), +\fIshmem_long_iget\fP(3), +\fIshmem_longdouble_iget\fP(3), +\fIshmem_longlong_iget\fP(3), +\fIshmem_real_iget\fP(3), +\fIshmem_short_iget\fP(3) +\- Transfers strided data from a specified processing element (PE) +.SH SYNOPSIS + +C or C++: +.Vb +#include +void shmem_iget32(void *target, const void *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_iget64(void *target, const void *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_iget128(void *target, const void *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_int_iget(int *target, const int *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_double_iget(double *target, const double *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_float_iget(float *target, const float *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_long_iget(long *target, const long *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_longdouble_iget(long double *target, + const long double *source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); + +void shmem_longlong_iget(long long *target, + const long long *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_short_iget(short *target, + const short *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER tst, sst, len, pe + +CALL SHMEM_COMPLEX_IGET(target, source, tst, sst, len, +& pe) + +CALL SHMEM_DOUBLE_IGET(target, source, tst, sst, len, +& pe) + +CALL SHMEM_IGET4(target, source, tst, sst, len, pe) + +CALL SHMEM_IGET8(target, source, tst, sst, len, pe) + +CALL SHMEM_IGET32(target, source, tst, sst, len, pe) + +CALL SHMEM_IGET64(target, source, tst, sst, len, pe) + +CALL SHMEM_IGET128(target, source, tst, sst, len, pe) + +CALL SHMEM_INTEGER_IGET(target, source, tst, sst, len, +& pe) + +CALL SHMEM_LOGICAL_IGET(target, source, tst, sst, len, +& pe) + +CALL SHMEM_REAL_IGET(target, source, tst, sst, len, pe) +.Ve +.SH DESCRIPTION + +The strided get routines retrieve array data available at address source on remote PE (pe). +The elements of the \fBsource\fP +array are separated by a stride \fBsst\fP\&. +Once the data is received, +it is stored at the local memory address \fBtarget\fP, +separated by stride \fBtst\fP\&. +The routines return +when the data has been copied into the local \fBtarget\fP +array. +.PP +The arguments are as follows: +.TP +target +Array to be updated on the local PE. +.TP +source +Array containing the data to be copied on the remote PE. +.TP +tst +The stride between consecutive elements of the target array. The stride is scaled by +the element size of the target array. A value of 1 indicates contiguous data. tst must be of +type integer. If you are calling from Fortran, it must be a default integer value. +.TP +sst +The stride between consecutive elements of the source array. The stride is scaled +by the element size of the source array. A value of 1 indicates contiguous data. sst must be +of type integer. If you are calling from Fortran, it must be a default integer value. +.TP +len +Number of elements in the target and source arrays. len must be of type integer. If +you are using Fortran, it must be a constant, variable, or array element of default integer +type. +.TP +pe +PE number of the remote PE. pe must be of type integer. If you are using Fortran, it +must be a constant, variable, or array element of default integer type. +.PP +The target and source data objects must conform to typing constraints, which are as +follows: +.TP +\fBshmem_iget32, shmem_iget4\fP: Any noncharacter type that has a storage size +equal to 32 bits. +.TP +\fBshmem_iget64, shmem_iget8\fP: Any noncharacter type that has a storage size +equal to 64 bits. +.TP +\fBshmem_iget128\fP: Any noncharacter type that has a storage size equal to +128 bits. +.TP +\fBshmem_short_iget\fP: Elements of type short. +.TP +\fBshmem_int_iget\fP: Elements of type int. +.TP +\fBshmem_long_iget\fP: Elements of type long. +.TP +\fBshmem_longlong_iget\fP: Elements of type long long. +.TP +\fBshmem_float_iget\fP: Elements of type float. +.TP +\fBshmem_double_iget\fP: Elements of type double. +.TP +\fBshmem_longdouble_iget\fP: Elements of type long double. +.TP +\fBSHMEM_COMPLEX_IGET\fP: Elements of type complex of default size. +.TP +\fBSHMEM_DOUBLE_IGET\fP: (Fortran) Elements of type double precision. +.TP +\fBSHMEM_INTEGER_IGET\fP: Elements of type integer. +.TP +\fBSHMEM_LOGICAL_IGET\fP: Elements of type logical. +.TP +\fBSHMEM_REAL_IGET\fP: Elements of type real. +.TP +\fBshmem_longdouble_iget\fP: Elements of type long double. +.TP +\fBSHMEM_COMPLEX_IGET\fP: Elements of type complex of default size. +.TP +\fBSHMEM_DOUBLE_IGET\fP: (Fortran) Elements of type double precision. +.TP +\fBSHMEM_INTEGER_IGET\fP: Elements of type integer. +.TP +\fBSHMEM_LOGICAL_IGET\fP: Elements of type logical. +.TP +\fBSHMEM_REAL_IGET\fP: Elements of type real. +.PP +If you are using Fortran, data types must be of default size. For example, a real variable must +be declared as REAL, REAL*4, or REAL(KIND=4). +.PP +.SH NOTES + +See \fIintro_shmem\fP(3) +for a definition of the term remotely accessible. +.PP +.SH EXAMPLES + +The following simple example uses shmem_logical_iget in a Fortran program. Compile +this example with the \-lsma compiler option. +.Vb +PROGRAM STRIDELOGICAL + LOGICAL SOURCE(10), TARGET(5) + SAVE SOURCE ! SAVE MAKES IT REMOTELY ACCESSIBLE + DATA SOURCE /.T.,.F.,.T.,.F.,.T.,.F.,.T.,.F.,.T.,.F./ + DATA TARGET / 5*.F. / + + CALL START_PES(2) + IF (MY_PE() .EQ. 0) THEN + CALL SHMEM_LOGICAL_IGET(TARGET, SOURCE, 1, 2, 5, 1) + PRINT*,'TARGET AFTER SHMEM_LOGICAL_IGET:',TARGET + ENDIF + CALL SHMEM_BARRIER_ALL +END +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_get\fP(3), +\fIshmem_quiet\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_iput.3in b/oshmem/shmem/man/man3/shmem_short_iput.3in new file mode 100644 index 00000000000..6582c084ed9 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_iput.3in @@ -0,0 +1,220 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_IPUT" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_complex_iput\fP(3), +\fIshmem_double_iput\fP(3), +\fIshmem_float_iput\fP(3), +\fIshmem_int_iput\fP(3), +\fIshmem_integer_iput\fP(3), +\fIshmem_iput4\fP(3), +\fIshmem_iput8\fP(3), +\fIshmem_iput32\fP(3), +\fIshmem_iput64\fP(3), +\fIshmem_iput128\fP(3), +\fIshmem_logical_iput\fP(3), +\fIshmem_long_iput\fP(3), +\fIshmem_longdouble_iput\fP(3), +\fIshmem_longlong_iput\fP(3), +\fIshmem_real_iput\fP(3), +\fIshmem_short_iput\fP(3) +\- Transfer strided data to a specified processing element (PE). +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_double_iput(double *target, const double *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_float_iput(float *target, const float *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_int_iput(int *target, const int *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_iput32(void *target, const void *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_iput64(void *target, const void *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_iput128(void *target, const void *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_long_iput(long *target, const long *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); + +void shmem_longdouble_iput(long double *target, + const long double *source, ptrdiff_t tst, ptrdiff_t sst, + size_t len, int pe); + +void shmem_longlong_iput(long long *target, + const long long *source, ptrdiff_t tst, ptrdiff_t sst, + size_t len, int pe); + +void shmem_short_iput(short *target, const short *source, + ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER tst, sst, len, pe + +CALL SHMEM_COMPLEX_IPUT(target, source, tst, sst, len, +& pe) + +CALL SHMEM_DOUBLE_IPUT(target, source, tst, sst, len, +& pe) + +CALL SHMEM_INTEGER_IPUT(target, source, tst, sst, len, +& pe) + +CALL SHMEM_IPUT4(target, source, tst, sst, len, pe) + +CALL SHMEM_IPUT8(target, source, tst, sst, len, pe) + +CALL SHMEM_IPUT32(target, source, tst, sst, len, pe) + +CALL SHMEM_IPUT64(target, source, tst, sst, len, pe) + +CALL SHMEM_IPUT128(target, source, tst, sst, len, pe) + +CALL SHMEM_LOGICAL_IPUT(target, source, tst, sst, len, +& pe) + +CALL SHMEM_REAL_IPUT(target, source, tst, sst, len, pe) +.Ve +.PP +.SH DESCRIPTION + +The shmem_iput routines read the elements of a local array (\fBsource\fP) +and write them +to a remote array (\fBtarget\fP) +on the PE indicated by \fBpe\fP\&. +These routines return +when the data has been copied out of the source array on the local PE but not necessarily +before the data has been delivered to the remote data object. +.PP +The arguments are as follows: +.TP +target +Array to be updated on the remote PE. This data object must be remotely +accessible. +.TP +source +Array containing the data to be copied. +.TP +tst +The stride between consecutive elements of the target array. The stride is scaled by +the element size of the target array. A value of 1 indicates contiguous data. tst must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +sst +The stride between consecutive elements of the source array. The stride is scaled +by the element size of the source array. A value of 1 indicates contiguous data. sst must be +of type integer. If you are using Fortran, it must be a default integer value. +.TP +len +Number of elements in the target and source arrays. len must be of type integer. If +you are using Fortran, it must be a constant, variable, or array element of default integer +type. +.TP +pe +PE number of the remote PE. pe must be of type integer. If you are using Fortran, it +must be a constant, variable, or array element of default integer type. +.PP +The target and source data objects must conform to typing constraints, which are as follows: +.PP +.TP +\fBshmem_iput32, shmem_iput4\fP: Any noncharacter type that has a storage size equal +to 32 bits. +.TP +\fBshmem_iput64, shmem_iput8\fP: Any noncharacter type that has a storage size equal +to 64 bits. +.TP +\fBshmem_iput128\fP: Any noncharacter type that has a storage size equal to 128 bits. +.TP +\fBshmem_short_iput\fP: Elements of type short. +.TP +\fBshmem_int_iput\fP: Elements of type int. +.TP +\fBshmem_long_iput\fP: Elements of type long. +.TP +\fBshmem_longlong_iput\fP: Elements of type long long. +.TP +\fBshmem_float_iput\fP: Elements of type float. +.TP +\fBshmem_double_iput\fP: Elements of type double. +.TP +\fBshmem_longdouble_iput\fP: Elements of type long double. +.TP +\fBSHMEM_COMPLEX_IPUT\fP: Elements of type complex of default size. +.TP +\fBSHMEM_DOUBLE_IPUT\fP: (Fortran) Elements of type double precision. +.TP +\fBSHMEM_INTEGER_IPUT\fP: Elements of type integer. +.TP +\fBSHMEM_LOGICAL_IPUT\fP: Elements of type logical. +.TP +\fBSHMEM_REAL_IPUT\fP: Elements of type real. +.TP +\fBSHMEM_LOGICAL_IPUT\fP: Elements of type logical. +.TP +\fBSHMEM_REAL_IPUT\fP: Elements of type real. +.PP +If you are using Fortran, data types must be of default size. For example, a real variable must +be declared as REAL, REAL*4 or REAL(KIND=4). +.PP +.SH NOTES + +See \fIintro_shmem\fP(3) +for a definition of the term remotely accessible. +.PP +.SH EXAMPLES + +Consider the following simple shmem_long_iput example for C/C++ programs. +.Vb +#include + +main() +{ + short source[10] = { 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10 }; + static short target[10]; + + start_pes(2); + if (_my_pe() == 0) { + /* put 10 words into target on PE 1 */ + shmem_short_iput(target, source, 1, 2, 5, 1); + } + shmem_barrier_all(); /* sync sender and receiver */ + if (_my_pe() == 1) { + shmem_udcflush(); /* not required on IRIX systems */ + printf("target on PE %d is %d %d %d %d %d0, _my_pe(), + (int)target[0], (int)target[1], (int)target[2], + (int)target[3], (int)target[4] ); + } + shmem_barrier_all(); /* sync before exiting */ +} +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_iget\fP(3), +\fIshmem_put\fP(3), +\fIshmem_quiet\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_max_to_all.3in b/oshmem/shmem/man/man3/shmem_short_max_to_all.3in new file mode 100644 index 00000000000..760dd45eec0 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_max_to_all.3in @@ -0,0 +1,238 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_MAX" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_double_max_to_all\fP(3), +\fIshmem_float_max_to_all\fP(3), +\fIshmem_int_max_to_all\fP(3), +\fIshmem_int4_max_to_all\fP(3), +\fIshmem_int8_max_to_all\fP(3), +\fIshmem_long_max_to_all\fP(3), +\fIshmem_longdouble_max_to_all\fP(3), +\fIshmem_longlong_max_to_all\fP(3), +\fIshmem_real4_max_to_all\fP(3), +\fIshmem_real8_max_to_all\fP(3), +\fIshmem_real16_max_to_all\fP(3), +\fIshmem_short_max_to_all\fP(3) +\- Performs a maximum function reduction across a set of processing elements (PEs). +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_double_max_to_all(double *target, double *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + double *pWrk, long *pSync); + +void shmem_float_max_to_all(float *target, float *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + float *pWrk, long *pSync); + +void shmem_int_max_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_max_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longdouble_max_to_all(long double *target, + long double *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, long double *pWrk, long *pSync); + +void shmem_longlong_max_to_all(long long *target, + long long *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, long long *pWrk, long *pSync); + + void shmem_short_max_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) + +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_INT4_MAX_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_MAX_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL4_MAX_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL8_MAX_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL16_MAX_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +\fIintro_shmem\fP(3)\&. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +.PP +The arguments are as follows: +.TP +target +A symmetric array of length nreduce elements to receive the results of the +reduction operations. The data type of target varies with the version of the reduction routine +being called. When calling from C, refer to the SYNOPSIS section for data type information. +.PP +When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_comp8_max_to_all\fP: Complex, with an element size equal to two +8\-byte real values. +.TP +\fBshmem_int4_max_to_all\fP: Integer, with an element size of 4 bytes. +.TP +\fBshmem_int8_max_to_all\fP: Integer, with an element size of 8 bytes. +.TP +\fBshmem_real4_max_to_all\fP: Real, with an element size of 4 bytes. +.TP +\fBshmem_real16_max_to_all\fP: Real, with an element size of 16 bytes. +.RE +.RS +.PP +.RE +.TP +source +A symmetric array of length nreduce elements that contains one element for +each separate reduction operation. The source argument must have the same data type as +target. +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync is of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync is of type integer and size +SHMEM_REDUCE_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Every element of this array must be initialized with the value _SHMEM_SYNC_VALUE (in +C/C++) or SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter +the reduction routine. +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on all +PEs in the active set. The same target and source arrays, and the same pWrk and pSync work +arrays, must be passed to all PEs in the active set. +.PP +Before any PE calls a reduction routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pWrk and pSync arrays on all PEs in the active set are not still in use from a prior call to a +collective SHMEM routine. The target array on all PEs in the active set is ready to accept the +results of the reduction. +.PP +Upon return from a reduction routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.PP +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful of the +following situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync or pWrk array can be reused in a subsequent reduction routine call only if none +of the PEs in the active set are still processing a prior reduction routine call that used the +same pSync or pWrk arrays. +.PP +In general, this can be assured only by doing some type of synchronization. However, in the +special case of reduction routines being called with the same active set, you can allocate two +pSync and pWrk arrays and alternate between them on successive calls. +.PP +.SH EXAMPLES + +\fBExample 1:\fP +This Fortran example statically initializes the pSync array and finds the +maximum value of real variable FOO across all even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL FOO, FOOMAX, PWRK(MAX(NR/2+1,SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +COMMON /COM/ FOO, FOOMAX, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_REAL8_MAX_TO_ALL(FOOMAX, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *, 'Result on PE ', MY_PE(), ' is ', FOOMAX +ENDIF +.Ve +\fBExample 2:\fP +Consider the following C/C++ call: +.Vb +shmem_int_max_to_all( target, source, 3, 0, 0, 8, pwrk, psync ); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_int_max_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); +shmem_int_max_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); +shmem_int_max_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); +.Ve +Note that two sets of pWrk and pSync arrays are used alternately because no synchronization +is done between calls. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_min_to_all.3in b/oshmem/shmem/man/man3/shmem_short_min_to_all.3in new file mode 100644 index 00000000000..8bdaae4e9b2 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_min_to_all.3in @@ -0,0 +1,234 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_MIN" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_double_min_to_all\fP(3), +\fIshmem_float_min_to_all\fP(3), +\fIshmem_int_min_to_all\fP(3), +\fIshmem_int4_min_to_all\fP(3), +\fIshmem_int8_min_to_all\fP(3), +\fIshmem_long_min_to_all\fP(3), +\fIshmem_longdouble_min_to_all\fP(3), +\fIshmem_longlong_min_to_all\fP(3), +\fIshmem_real4_min_to_all\fP(3), +\fIshmem_real8_min_to_all\fP(3), +\fIshmem_real16_min_to_all\fP(3), +\fIshmem_short_min_to_all\fP(3) +\- Performs a minimum function reduction across a set of processing elements (PEs) +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_double_min_to_all(double *target, double *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + double *pWrk, long *pSync); + +void shmem_float_min_to_all(float *target, float *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + float *pWrk, long *pSync); + +void shmem_int_min_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_min_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longdouble_min_to_all(long double *target, + long double *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, long double *pWrk, + long *pSync); + +void shmem_longlong_min_to_all(long long *target, + long long *source, int nreduce, int PE_start, int logPE_stride, + int PE_size, long long *pWrk, long *pSync); + +void shmem_short_min_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_INT4_MIN_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_MIN_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL4_MIN_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL8_MIN_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL16_MIN_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +\fIintro_shmem\fP(3)\&. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +.PP +The arguments are as follows: +.TP +target +A symmetric array of length nreduce elements to receive the results of the +reduction operations. The data type of target varies with the version of the reduction routine +being called. When calling from C/C++, refer to the SYNOPSIS section for data type +information. When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_int4_min_to_all\fP: Integer, with an element size of 4 bytes +.TP +\fBshmem_int8_min_to_all\fP: Integer, with an element size of 8 bytes +.TP +\fBshmem_real4_min_to_all\fP: Real, with an element size of 4 bytes +.TP +\fBshmem_real8_min_to_all\fP: Real, with an element size of 8 bytes +.TP +\fBshmem_real16_min_to_all\fP: Real, with an element size of 16 bytes +.TP +\fBsource A symmetric array\fP: of length nreduce elements, that contains one +element for each separate reduction operation. The source argument must have the same +data type as target. +.RE +.RS +.PP +.RE +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync is of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync is of type integer and size +SHMEM_REDUCE_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Every element of this array must be initialized with the value _SHMEM_SYNC_VALUE (in +C/C++) or SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter +the reduction routine. +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on all +PEs in the active set. The same target and source arrays, and the same pWrk and pSync work +arrays, must be passed to all PEs in the active set. +.PP +Before any PE calls a reduction routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pWrk and pSync arrays on all PEs in the active set are not still in use from a prior call to a +collective SHMEM routine. The target array on all PEs in the active set is ready to accept the +results of the reduction. +.PP +Upon return from a reduction routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.PP +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful of the +following situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync or pWrk array can be reused in a subsequent reduction routine call only if none +of the PEs in the active set are still processing a prior reduction routine call that used the +same pSync or pWrk arrays. In general, this can be assured only by doing some type of +synchronization. However, in the special case of reduction routines being called with the +same active set, you can allocate two pSync and pWrk arrays and alternate between them on +successive calls. +.PP +.SH EXAMPLES + +\fBExample 1:\fP +This Fortran example statically initializes the pSync array and finds the +minimum value of real variable FOO across all the even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL FOO, FOOMIN, PWRK(MAX(NR/2+1,SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +COMMON /COM/ FOO, FOOMIN, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_REAL8_MIN_TO_ALL(FOOMIN, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *, 'Result on PE ', MY_PE(), ' is ', FOOMIN +ENDIF +.Ve +\fBExample 2:\fP +Consider the following C/C++ call: +.Vb +shmem_int_min_to_all( target, source, 3, 0, 0, 8, pwrk, psync ); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_int_min_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); +shmem_int_min_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); +shmem_int_min_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); +.Ve +Note that two sets of pWrk and pSync arrays are used alternately because no synchronization +is done between calls. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_or_to_all.3in b/oshmem/shmem/man/man3/shmem_short_or_to_all.3in new file mode 100644 index 00000000000..77ebef68893 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_or_to_all.3in @@ -0,0 +1,202 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_OR" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int_or_to_all\fP(3), +\fIshmem_int4_or_to_all\fP(3), +\fIshmem_int8_or_to_all\fP(3), +\fIshmem_long_or_to_all\fP(3), +\fIshmem_longlong_or_to_all\fP(3), +\fIshmem_short_or_to_all\fP(3) +\- Performs a bitwise OR function reduction across a set of processing elements (PEs) +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_int_or_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_or_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longlong_or_to_all(long long *target, + long long *source, int nreduce, int PE_start, int logPE_stride, + int PE_size, long long *pWrk, long *pSync); + +void shmem_short_or_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_INT4_OR_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_OR_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +intro_shmem(3). +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +.PP +The arguments are as follows: +.TP +target +A symmetric array of length nreduce elements to receive the results of the +reduction operations. The data type of target varies with the version of the reduction routine +being called. When calling from C/C++, refer to the SYNOPSIS section for data type +information. When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_int8_or_to_all\fP Integer, with an element size of 8 bytes. +.TP +\fBshmem_int4_or_to_all\fP Integer, with an element size of 4 bytes. +.RE +.RS +.PP +.RE +.TP +source +A symmetric array, of length nreduce elements, that contains one element for +each separate reduction operation. The source argument must have the same data type as +target. +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync is of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync is of type integer and size +SHMEM_REDUCE_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Every element of this array must be initialized with the value _SHMEM_SYNC_VALUE (in +C/C++) or SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter +the reduction routine. +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on +all PEs in the active set. The same target and source arrays, and the same pWrk and pSync +work arrays, must be passed to all PEs in the active set. +.PP +Before any PE calls a reduction routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pWrk and pSync arrays on all PEs in the active set are not still in use from a prior call to a +collective SHMEM routine. The target array on all PEs in the active set is ready to accept the +results of the reduction. +.PP +Upon return from a reduction routine, the following are true: The target array is updated. The +values in the pSync array are restored to the original values. +.PP +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful to avoid +these situations: If the pSync array is initialized at run time, some type of synchronization is +needed to ensure that all PEs in the working set have initialized pSync before any of them +enter a SHMEM routine called with the pSync synchronization array. A pSync or pWrk array +can be reused in a subsequent reduction routine call only if none of the PEs in the active set +are still processing a prior reduction routine call that used the same pSync or pWrk arrays. In +general, this can be assured only by doing some type of synchronization. However, in the +special case of reduction routines being called with the same active set, you can allocate two +pSync and pWrk arrays and alternate between them on successive calls. +.PP +.SH EXAMPLES + +\fBExample 1:\fP +This Fortran example statically initializes the pSync array and finds the +logical OR of the integer variable FOO across all even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL PWRK(MAX(NR/2+1,SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +INTEGER FOO, FOOOR +COMMON /COM/ FOO, FOOOR, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_INT8_OR_TO_ALL(FOOOR, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *,'Result on PE ',MY_PE(),' is ',FOOOR +ENDIF +.Ve +\fBExample 2:\fP +Consider the following C/C++ call: +.Vb +shmem_int_or_to_all( target, source, 3, 0, 0, 8, pwrk, psync ); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_int_or_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); +shmem_int_or_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); +shmem_int_or_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); +.Ve +Note that two sets of pWrk and pSync arrays are used alternately because no synchronization +is done between calls. +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_p.3in b/oshmem/shmem/man/man3/shmem_short_p.3in new file mode 100644 index 00000000000..c08d60a5437 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_p.3in @@ -0,0 +1 @@ +.so man3/shmem_char_p.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_short_prod_to_all.3in b/oshmem/shmem/man/man3/shmem_short_prod_to_all.3in new file mode 100644 index 00000000000..b7544a9af84 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_prod_to_all.3in @@ -0,0 +1,259 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_PROD" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_comp4_prod_to_all\fP(3), +\fIshmem_comp8_prod_to_all\fP(3), +\fIshmem_complexd_prod_to_all\fP(3), +\fIshmem_complexf_prod_to_all\fP(3), +\fIshmem_double_prod_to_all\fP(3), +\fIshmem_float_prod_to_all\fP(3), +\fIshmem_int_prod_to_all\fP(3), +\fIshmem_int4_prod_to_all\fP(3), +\fIshmem_int8_prod_to_all\fP(3), +\fIshmem_long_prod_to_all\fP(3), +\fIshmem_longdouble_prod_to_all\fP(3), +\fIshmem_longlong_prod_to_all\fP(3), +\fIshmem_real8_prod_to_all\fP(3), +\fIshmem_real16_prod_to_all\fP(3), +\fIshmem_real4_prod_to_all\fP(3), +\fIshmem_short_prod_to_all\fP(3) +\- Performs +a product reduction across a set of processing elements (PEs) +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_complexd_prod_to_all(double complex *target, + double complex *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, double complex *pWrk, + long *pSync); + +void shmem_complexf_prod_to_all(float complex *target, + float complex *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, float complex *pWrk, + long *pSync); + +void shmem_double_prod_to_all(double *target, double *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + double *pWrk, long *pSync); + +void shmem_float_prod_to_all(float *target, float *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + float *pWrk, long *pSync); + +void shmem_int_prod_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_prod_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longdouble_prod_to_all(long double *target, + long double *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, long double *pWrk, + long *pSync); + +void shmem_longlong_prod_to_all(long long *target, + long long *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, long long *pWrk, + long *pSync); + +void shmem_short_prod_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_COMP4_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_COMP8_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT4_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL4_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL8_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL16_PROD_TO_ALL(target, source, nreduce, PE_start, +& logPE_stride, PE_size, pWrk, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +\fIintro_shmem\fP(3)\&. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +.PP +The arguments are as follows: +.TP +target +A symmetric array of length nreduce elements to receive the results of the +reduction operations. The data type of target varies with the version of the reduction routine +being called and the language used. When calling from C/C++, refer to the SYNOPSIS section +for data type information. When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_comp4_prod_to_all\fP: Complex, with an element size equal to two +4\-byte real values. +.TP +\fBshmem_comp8_prod_to_all\fP: Complex, with an element size equal to two +8\-byte real values. +.TP +\fBshmem_int4_prod_to_all\fP: Integer, with an element size of 4 bytes +.TP +\fBshmem_int8_prod_to_all\fP: Integer, with an element size of 8 bytes +.TP +\fBshmem_real4_prod_to_all\fP: Real, with an element size of 4 bytes +.TP +\fBshmem_real8_prod_to_all\fP: Real, with an element size of 8 bytes +.TP +\fBshmem_real16_prod_to_all\fP: Real, with an element size of 16 bytes +.RE +.RS +.PP +.RE +.TP +source +A symmetric array, of length nreduce elements, that contains one element for +each separate reduction operation. The source argument must have the same data type as +target. +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync is of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync is of type integer and size +SHMEM_REDUCE_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Before any of the PEs in the active set enter the reduction routine, every element of this array +must be initialized with the value _SHMEM_SYNC_VALUE (in C/C++) or +SHMEM_SYNC_VALUE (in Fortran). +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on all +PEs in the active set. The same target and source arrays, and the same pWrk and pSync work +arrays, must be passed to all PEs in the active set. Before any PE calls a reduction routine, you +must ensure that the following conditions exist (synchronization via a barrier or some +other method is often needed to ensure this): The pWrk and pSync arrays on all PEs in the +active set are not still in use from a prior call to a collective SHMEM routine. The target array +on all PEs in the active set is ready to accept the results of the reduction. +.PP +Upon return from a reduction routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful of the +following situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync or pWrk array can be reused in a subsequent reduction routine call only if none of the +PEs in the active set are still processing a prior reduction routine call that used the same +pSync or pWrk arrays. In general, this can be assured only by doing some type of +synchronization. However, in the special case of reduction routines being called with the +same active set, you can allocate two pSync and pWrk arrays and alternate between them on +successive calls. +.SH EXAMPLES + +\fBExample 1:\fP +This Fortran example statically initializes the pSync array and finds the +product of the real variable FOO across all the even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL FOO, FOOPROD, PWRK(MAX(NR/2+1,SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +COMMON /COM/ FOO, FOOPROD, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_COMP8_PROD_TO_ALL(FOOPROD, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *, 'Result on PE ', MY_PE(), ' is ', FOOPROD +ENDIF +.Ve +\fBExample 2:\fP +Consider the following C/C++ call: +.Vb +shmem_short_prod_to_all(target, source, 3, 0, 0, 8, pwrk, psync); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_short_prod_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); +shmem_short_prod_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); +shmem_short_prod_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); +.Ve +Note that two sets of pWrk and pSync arrays are used alternately because no synchronization +is done between calls. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_put.3in b/oshmem/shmem/man/man3/shmem_short_put.3in new file mode 100644 index 00000000000..e3ca73d4831 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_put.3in @@ -0,0 +1 @@ +.so man3/shmem_char_put.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_short_sum_to_all.3in b/oshmem/shmem/man/man3/shmem_short_sum_to_all.3in new file mode 100644 index 00000000000..3467a882fea --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_sum_to_all.3in @@ -0,0 +1,281 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_SUM" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_comp4_sum_to_all\fP(3), +\fIshmem_comp8_sum_to_all\fP(3), +\fIshmem_complexd_sum_to_all\fP(3), +\fIshmem_complexf_sum_to_all\fP(3), +\fIshmem_double_sum_to_all\fP(3), +\fIshmem_float_sum_to_all\fP(3), +\fIshmem_int_sum_to_all\fP(3), +\fIshmem_int4_sum_to_all\fP(3), +\fIshmem_int8_sum_to_all\fP(3), +\fIshmem_long_sum_to_all\fP(3), +\fIshmem_longdouble_sum_to_all\fP(3), +\fIshmem_longlong_sum_to_all\fP(3), +\fIshmem_real4_sum_to_all\fP(3), +\fIshmem_real8_sum_to_all\fP(3), +\fIshmem_real16_sum_to_all\fP(3), +\fIshmem_short_sum_to_all\fP(3) +\- Performs +a sum reduction across a set of processing elements (PEs) +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_complexd_sum_to_all(double complex *target, + double complex *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, double complex *pWrk, + long *pSync); + +void shmem_complexf_sum_to_all(float complex *target, + float complex *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, float complex *pWrk, + long *pSync); + +void shmem_double_sum_to_all(double *target, + double *source, int nreduce, int PE_start, int logPE_stride, + int PE_size, double *pWrk, long *pSync); + +void shmem_float_sum_to_all(float *target, float *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + float *pWrk, long *pSync); + +void shmem_int_sum_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_sum_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longdouble_sum_to_all(long double *target, + long double *source, int nreduce, int PE_start, int + logPE_stride, int PE_size, long double *pWrk, long *pSync); + +void shmem_longlong_sum_to_all(long long *target, + long long *source, int nreduce, int PE_start, + int logPE_stride, int PE_size, long long *pWrk, + long *pSync); + +void shmem_short_sum_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_COMP4_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_COMP8_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT4_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL4_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL8_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_REAL16_SUM_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +\fIintro_shmem\fP(3)\&. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. If +you are using C/C++, the type of target should match that implied in the SYNOPSIS section. +If you are using the Fortran compiler, it must be of type integer with an element size of 4 +bytes for SHMEM_INT4_ADD and 8 bytes for SHMEM_INT8_ADD. +.TP +value +The value to be atomically added to target. If you are using C/C++, the type of +value should match that implied in the SYNOPSIS section. If you are using Fortran, it must be +of type integer with an element size of target. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.TP +target +A symmetric array of length nreduce elements to receive the results of the +reduction operations. +.br +The data type of target varies with the version of the reduction routine being called and the +language used. When calling from C/C++, refer to the SYNOPSIS section for data type +information. When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_comp4_sum_to_all:\fP COMPLEX(KIND=4). +.TP +\fBshmem_comp8_sum_to_all:\fP Complex. If you are using Fortran, it must be +a default complex value. +.TP +\fBshmem_int4_sum_to_all:\fP INTEGER(KIND=4). +.TP +\fBshmem_int8_sum_to_all:\fP Integer. If you are using Fortran, it must be a +default integer value. +.TP +\fBshmem_real4_sum_to_all:\fP REAL(KIND=4). +.TP +\fBshmem_real8_sum_to_all:\fP Real. If you are using Fortran, it must be a +default real value. +.TP +\fBshmem_real16_sum_to_all:\fP Real. If you are using Fortran, it must be a +default real value. +.RE +.RS +.PP +.RE +.TP +source +A symmetric array, of length nreduce elements, that contains one element for +each separate reduction operation. The source argument must have the same data type as +target. +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync is of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync is of type integer and size +SHMEM_REDUCE_SYNC_SIZE. It must be a default integer value. Every element of this array +must be initialized with the value _SHMEM_SYNC_VALUE (in C/C++) or +SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter the reduction +routine. +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on all +PEs in the active set. The same target and source arrays, and the same pWrk and pSync work +arrays, must be passed to all PEs in the active set. +.PP +Before any PE calls a reduction routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pWrk and pSync arrays on all PEs in the active set are not still in use from a prior call to a +collective SHMEM routine. The target array on all PEs in the active set is ready to accept the +results of the reduction. +.PP +Upon return from a reduction routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +.PP +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful of the +following situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync or pWrk array can be reused in a subsequent reduction routine call only if none +of the PEs in the active set are still processing a prior reduction routine call that used the +same pSync or pWrk arrays. In general, this can be assured only by doing some +type of synchronization. However, in the special case of reduction routines being called with +the same active set, you can allocate two pSync and pWrk arrays and alternate between them +on successive calls. +.SH EXAMPLES + +\fBExample 1:\fP +This Fortran example statically initializes the pSync array and finds the +sum of the real variable FOO across all even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL FOO, FOOSUM, PWRK(MAX(NR/2+1,SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +COMMON /COM/ FOO, FOOSUM, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_INT4_SUM_TO_ALL(FOOSUM, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *, 'Result on PE ', MY_PE(), ' is ', FOOSUM +ENDIF +.Ve +\fBExample 2:\fP +Consider the following C/C++ call: +.Vb +shmem_int_sum_to_all( target, source, 3, 0, 0, 8, pwrk, psync ); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_int_sum_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); +shmem_int_sum_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); +shmem_int_sum_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); + +Note that two sets of pWrk and pSync arrays are used alternately because no +synchronization is done between calls. +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_short_wait.3in b/oshmem/shmem/man/man3/shmem_short_wait.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_wait.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_short_wait_until.3in b/oshmem/shmem/man/man3/shmem_short_wait_until.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_wait_until.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmem_short_xor_to_all.3in b/oshmem/shmem/man/man3/shmem_short_xor_to_all.3in new file mode 100644 index 00000000000..7d02702a878 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_short_xor_to_all.3in @@ -0,0 +1,215 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_XOR" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_comp4_xor_to_all\fP(3), +\fIshmem_int_xor_to_all\fP(3), +\fIshmem_int4_xor_to_all\fP(3), +\fIshmem_int8_xor_to_all\fP(3), +\fIshmem_long_xor_to_all\fP(3), +\fIshmem_longlong_xor_to_all\fP(3), +\fIshmem_short_xor_to_all\fP(3) +\- Performs a bitwise XOR operation on symmetric +arrays over the active set of PEs. +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_int_xor_to_all(int *target, int *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + int *pWrk, long *pSync); + +void shmem_long_xor_to_all(long *target, long *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + long *pWrk, long *pSync); + +void shmem_longlong_xor_to_all(long long *target, + long long *source, int nreduce, int PE_start, int logPE_stride, + int PE_size, long long *pWrk, long *pSync); + +void shmem_short_xor_to_all(short *target, short *source, + int nreduce, int PE_start, int logPE_stride, int PE_size, + short *pWrk, long *pSync); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pSync(SHMEM_REDUCE_SYNC_SIZE) +INTEGER nreduce, PE_start, logPE_stride, PE_size + +CALL SHMEM_COMP4_XOR_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT4_XOR_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) + +CALL SHMEM_INT8_XOR_TO_ALL(target, source, nreduce, +& PE_start, logPE_stride, PE_size, pWrk, pSync) +.Ve +.SH DESCRIPTION + +The shared memory (SHMEM) reduction routines compute one or more reductions across +symmetric arrays on multiple virtual PEs. A reduction performs an associative binary +operation across a set of values. For a list of other SHMEM reduction routines, see +\fIintro_shmem\fP(3)\&. +.PP +As with all SHMEM collective routines, each of these routines assumes that only PEs in the +active set call the routine. If a PE not in the active set calls a SHMEM collective routine, +undefined behavior results. +.PP +The nreduce argument determines the number of separate reductions to perform. The source +array on all PEs in the active set provides one element for each reduction. The results of the +reductions are placed in the target array on all PEs in the active set. The active set is defined +by the PE_start, logPE_stride, PE_size triplet. +.PP +The source and target arrays may be the same array, but they may not be overlapping arrays. +.PP +The arguments are as follows: +.TP +target +A symmetric array of length nreduce elements to receive the results of the +reduction operations. +The data type of target varies with the version of the reduction routine being called and the +language used. When calling from C/C++, refer to the SYNOPSIS section for data type +information. When calling from Fortran, the target data types are as follows: +.RS +.TP +\fBshmem_comp8_xor_to_all:\fP Complex, with an element size equal to two 8\- +byte real values +.TP +\fBshmem_comp4_xor_to_all:\fP Complex, with an element size equal to two 4\- +byte real values +.TP +\fBshmem_int8_xor_to_all:\fP Integer, with an element size of 8 bytes +.TP +\fBshmem_int4_xor_to_all:\fP Integer, with an element size of 4 bytes +.TP +\fBshmem_real8_xor_to_all:\fP Real, with an element size of 8 bytes +.TP +\fBshmem_real4_xor_to_all:\fP Real, with an element size of 4 bytes +.RE +.RS +.PP +.RE +.TP +source +A symmetric array, of length nreduce elements, that contains one element for +each separate reduction operation. The source argument must have the same data type as +target. +.TP +nreduce +The number of elements in the target and source arrays. nreduce must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +PE_start +The lowest virtual PE number of the active set of PEs. PE_start must be of +type integer. If you are using Fortran, it must be a default integer value. +.TP +logPE_stride +The log (base 2) of the stride between consecutive virtual PE numbers in +the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a +default integer value. +.TP +PE_size +The number of PEs in the active set. PE_size must be of type integer. If you +are using Fortran, it must be a default integer value. +.TP +pWrk +A symmetric work array. The pWrk argument must have the same data type as +target. In C/C++, this contains max(nreduce/2 + 1, +_SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. In Fortran, this contains +max(nreduce/2 + 1, SHMEM_REDUCE_MIN_WRKDATA_SIZE) elements. +.TP +pSync +A symmetric work array. In C/C++, pSync is of type long and size +_SHMEM_REDUCE_SYNC_SIZE. In Fortran, pSync is of type integer and size +SHMEM_REDUCE_SYNC_SIZE. If you are using Fortran, it must be a default integer value. +Every element of this array must be initialized with the value _SHMEM_SYNC_VALUE (in +C/C++) or SHMEM_SYNC_VALUE (in Fortran) before any of the PEs in the active set enter +the reduction routine. +.PP +The values of arguments nreduce, PE_start, logPE_stride, and PE_size must be equal on all +PEs in the active set. The same target and source arrays, and the same pWrk and pSync +work arrays, must be passed to all PEs in the active set. +.PP +Before any PE calls a reduction routine, you must ensure that the following conditions exist +(synchronization via a barrier or some other method is often needed to ensure this): The +pWrk and pSync arrays on all PEs in the active set are not still in use from a prior call to a +collective SHMEM routine. The target array on all PEs in the active set is ready to accept the +results of the reduction. +.PP +Upon return from a reduction routine, the following are true for the local PE: The target array +is updated. The values in the pSync array are restored to the original values. +.SH NOTES + +The terms collective, symmetric, and cache aligned are defined in \fIintro_shmem\fP(3)\&. +All SHMEM reduction routines reset the values in pSync before they return, so a particular +pSync buffer need only be initialized the first time it is used. +.PP +You must ensure that the pSync array is not being updated on any PE in the active set while +any of the PEs participate in processing of a SHMEM reduction routine. Be careful of the +following situations: If the pSync array is initialized at run time, some type of +synchronization is needed to ensure that all PEs in the working set have initialized pSync +before any of them enter a SHMEM routine called with the pSync synchronization array. A +pSync or pWrk array can be reused in a subsequent reduction routine call only if none of the +PEs in the active set are still processing a prior reduction routine call that used the same +pSync or pWrk arrays. In general, this can be assured only by doing some type of +synchronization. However, in the special case of reduction routines being called with the +same active set, you can allocate two pSync and pWrk arrays and alternate between them on +successive calls. +.SH EXAMPLES + +\fBExample 1:\fP +This Fortran example statically initializes the pSync array and computes +the exclusive OR of variable FOO across all even PEs. +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER PSYNC(SHMEM_REDUCE_SYNC_SIZE) +DATA PSYNC /SHMEM_REDUCE_SYNC_SIZE*SHMEM_SYNC_VALUE/ +PARAMETER (NR=1) +REAL FOO, FOOXOR, PWRK(MAX(NR/2+1,SHMEM_REDUCE_MIN_WRKDATA_SIZE)) +COMMON /COM/ FOO, FOOXOR, PWRK +INTRINSIC MY_PE + +IF ( MOD(MY_PE(),2) .EQ. 0) THEN + CALL SHMEM_REAL8_XOR_TO_ALL(FOOXOR, FOO, NR, 0, 1, N$PES/2, + & PWRK, PSYNC) + PRINT *, 'Result on PE ', MY_PE(), ' is ', FOOXOR +ENDIF +.Ve +\fBExample 2:\fP +Consider the following C/C++ call: +.Vb +shmem_short_xor_to_all( target, source, 3, 0, 0, 8, pwrk, psync ); +.Ve +The preceding call is more efficient, but semantically equivalent to, the combination of the +following calls: +.Vb +shmem_short_xor_to_all(&(target[0]), &(source[0]), 1, 0, 0, 8, + pwrk1, psync1); +shmem_short_xor_to_all(&(target[1]), &(source[1]), 1, 0, 0, 8, + pwrk2, psync2); +shmem_short_xor_to_all(&(target[2]), &(source[2]), 1, 0, 0, 8, + pwrk1, psync1); +.Ve +Note that two sets of pWrk and pSync arrays are used alternately because no synchronization +is done between calls. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_swap.3in b/oshmem/shmem/man/man3/shmem_swap.3in new file mode 100644 index 00000000000..bc8daafe0ed --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_swap.3in @@ -0,0 +1,115 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_SWAP" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_double_swap\fP(3), +\fIshmem_float_swap\fP(3), +\fIshmem_int_swap\fP(3), +\fIshmem_long_swap\fP(3), +\fIshmem_swap\fP(3), +\fIshmem_int4_swap\fP(3), +\fIshmem_int8_swap\fP(3), +\fIshmem_real4_swap\fP(3), +\fIshmem_real8_swap\fP(3), +\fIshmem_longlong_swap\fP(3) +\- Performs an atomic swap to a remote data object +.SH SYNOPSIS + +C or C++: +.Vb +#include + +double shmem_double_swap(double *target, double value, + int pe); + +float shmem_float_swap(float *target, float value, int pe); + +int shmem_int_swap(int *target, int value, int pe); + +long shmem_long_swap(long *target, long value, int pe); + +long long shmem_longlong_swap(long long *target, + long long value, int pe); + +long shmem_swap(long *target, long value, int pe); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +INTEGER pe + +INTEGER SHMEM_SWAP +ires = SHMEM_SWAP(target, value, pe) + +INTEGER(KIND=4) SHMEM_INT4_SWAP +ires = SHMEM_INT4_SWAP(target, value, pe) + +INTEGER(KIND=8) SHMEM_INT8_SWAP +ires = SHMEM_INT8_SWAP(target, value, pe) + +REAL(KIND=4) SHMEM_REAL4_SWAP +res = SHMEM_REAL4_SWAP(target, value, pe) + +REAL(KIND=8) SHMEM_REAL8_SWAP +res = SHMEM_REAL8_SWAP(target, value, pe) +.Ve +.SH DESCRIPTION + +The atomic swap routines write \fBvalue\fP +to address target on PE \fBpe\fP, +and return +the previous contents of \fBtarget\fP +in one atomic operation. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. If +you are using C/C++, the type of target should match that implied in the SYNOPSIS section. If +you are using Fortran, it must be of the following type: +.RS +.TP +\fBSHMEM_SWAP:\fP Integer of default kind +.TP +\fBSHMEM_INT4_SWAP:\fP 4\-byte integer +.TP +\fBSHMEM_INT8_SWAP:\fP 8\-byte integer +.TP +\fBSHMEM_REAL4_SWAP:\fP 4\-byte real +.TP +\fBSHMEM_REAL8_SWAP:\fP 8\-byte real +.RE +.RS +.PP +.RE +.TP +value +Value to be atomically written to the remote PE. value is the same type as target. +.TP +pe +An integer that indicates the PE number on which target is to be updated. If you are +using Fortran, it must be a default integer value. +.PP +.SH NOTES + +The term remotely accessible is defined in \fIintro_shmem\fP(3)\&. +.SH RETURN VALUES + +The contents that had been at the target address on the remote PE prior to the swap is +returned. +.SH SEE ALSO + +\fIintro_shmem\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_test_lock.3in b/oshmem/shmem/man/man3/shmem_test_lock.3in new file mode 100644 index 00000000000..49974c4f178 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_test_lock.3in @@ -0,0 +1 @@ +.so man3/shmem_set_lock.3 \ No newline at end of file diff --git a/oshmem/shmem/man/man3/shmem_udcflush.3in b/oshmem/shmem/man/man3/shmem_udcflush.3in new file mode 100644 index 00000000000..3edeb74023d --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_udcflush.3in @@ -0,0 +1,94 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_CACHE" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_clear_cache_inv\fP(3), +\fIshmem_set_cache_inv\fP(3), +\fIshmem_set_cache_line_inv\fP(3), +\fIshmem_udcflush\fP(3), +\fIshmem_udcflush_line\fP(3) +\- Controls data cache utilities +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_clear_cache_inv(void); +void shmem_clear_cache_line_inv(void *target); +void shmem_set_cache_inv(void); +void shmem_set_cache_line_inv(void *target); +void shmem_udcflush(void); +void shmem_udcflush_line(void *target); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +CALL SHMEM_CLEAR_CACHE_INV +CALL SHMEM_CLEAR_CACHE_LINE_INV(target) +CALL SHMEM_SET_CACHE_INV +CALL SHMEM_SET_CACHE_LINE_INV(target) + +CALL SHMEM_UDCFLUSH +CALL SHMEM_UDCFLUSH_LINE(target) +.Ve +.SH DESCRIPTION + +The following argument is passed to the cache line control routines: +.TP +target +A data object that is local to the processing element (PE). target can be of +any noncharacter type. If you are using Fortran, it can be of any kind. +.PP +\fBshmem_clear_cache_inv\fP +disables automatic cache coherency mode previously +enabled by shmem_set_cache_inv or shmem_set_cache_line_inv. +.PP +\fBshmem_clear_cache_line_inv\fP +disables automatic cache coherency mode for the +cache line associated with the address of \fBtarget\fP +only. +.PP +\fBshmem_set_cache_inv\fP +enables the OpenSHMEM API to automatically decide the +best strategy for cache coherency. +.PP +\fBshmem_set_cache_line_inv\fP +enables automatic cache coherency mode for the +cache line associated with the address of \fBtarget\fP +only. +.PP +\fBshmem_clear_cache_inv\fP +disables automatic cache coherency mode previously +enabled by shmem_set_cache_inv or shmem_set_cache_line_inv. +.PP +\fBshmem_udcflush\fP +makes the entire user data cache coherent. +.PP +\fBshmem_udcflush_line\fP +makes coherent the cache line that corresponds with +the address specified by target. +.PP +.SH NOTES + +These routines have been retained for improved backward compatability with legacy +architectures. +.PP +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_put\fP(3), +\fIshmem_swap\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_udcflush_line.3in b/oshmem/shmem/man/man3/shmem_udcflush_line.3in new file mode 100644 index 00000000000..4a6a361ef97 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_udcflush_line.3in @@ -0,0 +1 @@ +.so man3/shmem_udcflush.3 diff --git a/oshmem/shmem/man/man3/shmem_wait.3in b/oshmem/shmem/man/man3/shmem_wait.3in new file mode 100644 index 00000000000..f1c6aa57691 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_wait.3in @@ -0,0 +1,205 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "SHMEM\\_WAIT" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIshmem_int_wait\fP(3), +\fIshmem_int_wait\fP(3)_until, +\fIshmem_int4_wait\fP(3), +\fIshmem_int4_wait\fP(3)_until, +\fIshmem_int8_wait\fP(3), +\fIshmem_int8_wait\fP(3)_until, +\fIshmem_long_wait\fP(3), +\fIshmem_long_wait\fP(3)_until, +\fIshmem_longlong_wait\fP(3), +\fIshmem_longlong_wait\fP(3)_until, +\fIshmem_short_wait\fP(3), +\fIshmem_short_wait\fP(3)_until, +\fIshmem_wait\fP(3), +\fIshmem_wait\fP(3)_until +\- Waits for a variable on the local processing element (PE) to change +.SH SYNOPSIS + +C or C++: +.Vb +#include + +void shmem_int_wait(int *var, int value); + +void shmem_int_wait_until(int *var, int cond, int value); + +void shmem_long_wait(long *var, long value); + +void shmem_long_wait_until(long *var, int cond, long value); + +void shmem_longlong_wait(long long *var, long long value); + +void shmem_longlong_wait_until(long long *var, int cond, + long long value); + +void shmem_short_wait(short *var, short value); + +void shmem_short_wait_until(short *var, int cond, + short value); + +void shmem_wait(long *ivar, long cmp_value); + +void shmem_wait_until(long *ivar, int cmp, long value); +.Ve +Fortran: +.Vb +INCLUDE "mpp/shmem.fh" + +CALL SHMEM_INT4_WAIT(ivar, cmp_value) + +CALL SHMEM_INT4_WAIT_UNTIL(ivar, cmp, cmp_value) + +CALL SHMEM_INT8_WAIT(ivar, cmp_value) + +CALL SHMEM_INT8_WAIT_UNTIL(ivar, cmp, cmp_value) + +CALL SHMEM_WAIT(ivar, cmp_value) + +CALL SHMEM_WAIT_UNTIL(ivar, cmp, cmp_value) +.Ve +.SH DESCRIPTION + +shmem_wait and shmem_wait_until wait for \fBivar\fP +to be changed by a remote write +or atomic swap issued by a different processor. These routines can be used for point\-to\- +point directed synchronization. A call to shmem_wait does not return until some other +processor writes a value, not equal to cmp_value, into \fBivar\fP +on the waiting +processor. A call to shmem_wait_until does not return until some other processor changes +\fBivar\fP +to satisfy the condition implied by cmp and cmp_value. This mechanism is +useful when a processor needs to tell another processor that it has completed some action. +.PP +The arguments are as follows: +.TP +target +The remotely accessible integer data object to be updated on the remote PE. If +you are using C/C++, the type of target should match that implied in the SYNOPSIS section. +If you are using the Fortran compiler, it must be of type integer with an element size of 4 +bytes for SHMEM_INT4_ADD and 8 bytes for SHMEM_INT8_ADD. +.TP +value +The value to be atomically added to target. If you are using C/C++, the type of +value should match that implied in the SYNOPSIS section. If you are using Fortran, it must be +of type integer with an element size of target. +.TP +pe +An integer that indicates the PE number upon which target is to be updated. If you +are using Fortran, it must be a default integer value. +.TP +ivar +A remotely accessible integer variable that is being updated by another PE. If you +are using C/C++, the type of ivar should match that implied in the SYNOPSIS section. If you +are using Fortran, ivar must be a specific sized integer type according to +the function being called, as follows: +.RS +.TP +\fBshmem_wait, shmem_wait_until:\fP default INTEGER +.TP +\fBshmem_int4_wait, shmem_int4_wait_until:\fP INTEGER*4 +.TP +\fBshmem_int8_wait, shmem_int8_wait_until:\fP INTEGER*8 +.RE +.RS +.PP +.RE +.TP +cmp +The compare operator that compares ivar with cmp_value. cmp must be of type +integer. If you are using Fortran, it must be of default kind. If you are using C/C++, the type +of cmp should match that implied in the SYNOPSIS section. The following cmp values are +supported: +.RS +.TP +SHMEM_CMP_EQ +Equal +.TP +SHMEM_CMP_NE +Not equal +.TP +SHMEM_CMP_GT +Greater than +.TP +SHMEM_CMP_LE +Less than or equal to +.TP +SHMEM_CMP_LT +Less than +.TP +SHMEM_CMP_GE +Greater than or equal to +.RE +.RS +.PP +.RE +.TP +cmp_value +cmp_value must be of type integer. If you are using C/C++, the type of +cmp_value should match thatimplied in the SYNOPSIS section. If you are using Fortran, +cmp_value must be an integer of the same size and kind as ivar. +The shmem_wait routines return when ivar is no longer equal to cmp_value. +The shmem_wait_until routines return when the compare condition is true. The compare +condition is defined by the ivar argument compared with the cmp_value using the +comparison operator, cmp. +.PP +.SH EXAMPLES + +\fBExample 1:\fP +The following call returns when variable ivar is not equal to 100: +.Vb +INTEGER*8 IVAR + +CALL SHMEM_INT8_WAIT(IVAR, INT8(100)) +.Ve +\fBExample 2:\fP +The following call to SHMEM_INT8_WAIT_UNTIL is equivalent to the +call to SHMEM_INT8_WAIT in example 1: +.Vb +INTEGER*8 IVAR + +CALL SHMEM_INT8_WAIT_UNTIL(IVAR, SHMEM_CMP_NE, INT8(100)) +.Ve +\fBExample 3:\fP +The following C/C++ call waits until the sign bit in ivar is set by a +transfer from a remote PE: +.Vb +int ivar; + +shmem_int_wait_until(&ivar, SHMEM_CMP_LT, 0); +.Ve +\fBExample 4:\fP +The following Fortran example is in the context of a subroutine: +.Vb +SUBROUTINE EXAMPLE() + INTEGER FLAG_VAR + COMMON/FLAG/FLAG_VAR + . . . + FLAG_VAR = FLAG_VALUE ! initialize the event variable + . . . + IF (FLAG_VAR .EQ. FLAG_VALUE) THEN + CALL SHMEM_WAIT(FLAG_VAR, FLAG_VALUE) + ENDIF + FLAG_VAR = FLAG_VALUE ! reset the event variable for next time + . . . +END +.Ve +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_put\fP(3) diff --git a/oshmem/shmem/man/man3/shmem_wait_until.3in b/oshmem/shmem/man/man3/shmem_wait_until.3in new file mode 100644 index 00000000000..03267ffbc55 --- /dev/null +++ b/oshmem/shmem/man/man3/shmem_wait_until.3in @@ -0,0 +1 @@ +.so man3/shmem_wait.3 diff --git a/oshmem/shmem/man/man3/shmemalign.3in b/oshmem/shmem/man/man3/shmemalign.3in new file mode 100644 index 00000000000..63a8ff4e8ec --- /dev/null +++ b/oshmem/shmem/man/man3/shmemalign.3in @@ -0,0 +1 @@ +.so man3/shmalloc.3 diff --git a/oshmem/shmem/man/man3/shrealloc.3in b/oshmem/shmem/man/man3/shrealloc.3in new file mode 100644 index 00000000000..63a8ff4e8ec --- /dev/null +++ b/oshmem/shmem/man/man3/shrealloc.3in @@ -0,0 +1 @@ +.so man3/shmalloc.3 diff --git a/oshmem/shmem/man/man3/start_pes.3in b/oshmem/shmem/man/man3/start_pes.3in new file mode 100644 index 00000000000..0901e383022 --- /dev/null +++ b/oshmem/shmem/man/man3/start_pes.3in @@ -0,0 +1,82 @@ +.\" -*- nroff -*- +.\" Copyright (c) 2015 University of Houston. All rights reserved. +.\" Copyright (c) 2015 Mellanox Technologies, Inc. +.\" $COPYRIGHT$ +.de Vb +.ft CW +.nf +.. +.de Ve +.ft R + +.fi +.. +.TH "START\\_PES" "3" "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME + +\fIstart_pes\fP(3) +\- Allocates a block of memory from the symmetric heap. +.SH SYNOPSIS + +C or C++: +.Vb +void start_pes(int npes); +.Ve +Fortran: +.Vb +CALL START_PES(npes) +.Ve +.SH DESCRIPTION + +The start_pes routine should be the first statement in a SHMEM parallel program. +.PP +The start_pes routine accepts the following argument: +.TP +npes +Unused. Should be set to 0. +.PP +This routine initializes the SHMEM API, therefore it must be called before calling any +other SHMEM routine. +This routine is responsible inter alia for setting up the symmetric heap on the calling PE, and +the creation of the virtual PE numbers. Upon successful return from this routine, the calling PE +will be able to communicate with and transfer data to other PEs. +.PP +Multiple calls to this function are not allowed. +.PP +For an overview of programming with SHMEM communication routines, example SHMEM +programs, and instructions for compiling SHMEM programs, see the \fIintro_shmem\fP(3) +man page. +.SH EXAMPLES + +This is a simple program that calls \fIshmem_integer_put\fP(3): +.Vb +PROGRAM PUT + INCLUDE "mpp/shmem.fh" + + INTEGER TARG, SRC, RECEIVER, BAR + COMMON /T/ TARG + PARAMETER (RECEIVER=1) + + CALL START_PES(0) + IF (MY_PE() .EQ. 0) THEN + SRC = 33 + CALL SHMEM_INTEGER_PUT(TARG, SRC, 1, RECEIVER) + ENDIF + CALL SHMEM_BARRIER_ALL ! SYNCHRONIZES SENDER AND RECEIVER + IF (MY_PE() .EQ. RECEIVER) THEN + PRINT *,'PE ', MY_PE(),' TARG=',TARG,' (expect 33)' + ENDIF +END +.Ve +.SH NOTES + +If the start_pes call is not the first statement in a program, unexpected results may occur on +some architectures. +.SH SEE ALSO + +\fIintro_shmem\fP(3), +\fIshmem_barrier\fP(3), +\fIshmem_barrier_all\fP(3), +\fIshmem_put\fP(3), +\fImy_pe\fP(3I), +\fInum_pes\fP(3I) From e00717e57208e17b19f94d31a5acd0607be34be7 Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Tue, 25 Aug 2015 13:04:44 +0300 Subject: [PATCH 0191/1704] oshmem: Add man related files into gitignore Signed-off-by: Igor Ivanov --- .gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 381700afe5e..b3caf0d3ea0 100644 --- a/.gitignore +++ b/.gitignore @@ -508,6 +508,18 @@ oshmem/shmem/java/java/shmem oshmem/shmem/java/java/shmem_Addr.h oshmem/shmem/java/java/shmem_PSync.h +oshmem/shmem/man/man3/shmem_*.3 +oshmem/shmem/man/man3/OpenSHMEM.3 +oshmem/shmem/man/man3/intro_shmem.3 +oshmem/shmem/man/man3/_my_pe.3 +oshmem/shmem/man/man3/_num_pes.3 +oshmem/shmem/man/man3/shfree.3 +oshmem/shmem/man/man3/shmalloc.3 +oshmem/shmem/man/man3/shmemalign.3 +oshmem/shmem/man/man3/shrealloc.3 +oshmem/shmem/man/man3/start_pes.3 +oshmem/shmem/man/man3/.dir-stamp + oshmem/tools/oshmem_info/oshmem_info oshmem/tools/oshmem_info/oshmem_info.1 From b8a6359142b6ea6edb4552d859c752895680ff74 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 27 Aug 2015 17:05:58 -0700 Subject: [PATCH 0192/1704] ompi_mpi_abort.c: use _exit(), not exit() In an abort situation, just bail out immediately -- don't try to invoke any atexit()/on_exit()-registered functions. This is similar rationale to open-mpi/ompi@17846411c328f48a6f3416b760e9599d7f9dd51f. (cherry picked from commit 556c32e1d19d7a92818862f0b409fd42a28d98e2) --- ompi/runtime/ompi_mpi_abort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/runtime/ompi_mpi_abort.c b/ompi/runtime/ompi_mpi_abort.c index 3c8882436fa..8f9e89a5da9 100644 --- a/ompi/runtime/ompi_mpi_abort.c +++ b/ompi/runtime/ompi_mpi_abort.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -192,7 +192,7 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, fprintf(stderr, "[%s:%d] Local abort %s completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!\n", host, (int) pid, ompi_mpi_finalized ? "after MPI_FINALIZE started" : "before MPI_INIT completed"); - exit(errcode == 0 ? 1 : errcode); + _exit(errcode == 0 ? 1 : errcode); } /* If OMPI is initialized and we have a non-NULL communicator, From 2630199dd18e26078742dc00917be452ec8d4578 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 29 Aug 2015 04:57:02 -0700 Subject: [PATCH 0193/1704] unpack_ooo: fix empty initializer (cherry picked from commit open-mpi/ompi@447eb4238aab3bab054eecb529e66a45365f9072) --- test/datatype/unpack_ooo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/datatype/unpack_ooo.c b/test/datatype/unpack_ooo.c index 6c2919039c1..b5f6ad4780f 100644 --- a/test/datatype/unpack_ooo.c +++ b/test/datatype/unpack_ooo.c @@ -5,6 +5,7 @@ * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,12 +32,12 @@ uint32_t remote_arch = 0xffffffff; struct foo_t { int i[3]; double d[3]; -} foo = {}, *bar = NULL; +} foo = {0}, *bar = NULL; struct pfoo_t { int i[2]; double d[2]; -} pfoo = {}, *pbar = NULL; +} pfoo = {0}, *pbar = NULL; static void print_hex(void* ptr, int count, int space) { From 7ebc99810a59e439d51f5c73bcaf9068bebe8193 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 28 Aug 2015 11:12:41 +0900 Subject: [PATCH 0194/1704] mpi conformance: fix prototypes - MPI_Compare_and_swap - MPI_Fetch_and_op - MPI_Raccumulate - MPI_Win_detach Thanks to Michael Knobloch and Takahiro Kawashima for bringing this to our attention (back-ported from commit open-mpi/ompi@21b1e7f8c514e146f65bf241c86561d7b07e9229) --- ompi/include/mpi.h.in | 22 ++++++++++--------- ompi/mca/osc/base/osc_base_obj_convert.c | 4 ++-- ompi/mca/osc/base/osc_base_obj_convert.h | 4 +++- ompi/mca/osc/osc.h | 16 ++++++++------ ompi/mca/osc/portals4/osc_portals4.h | 16 ++++++++------ ompi/mca/osc/portals4/osc_portals4_comm.c | 14 +++++++----- .../mca/osc/portals4/osc_portals4_component.c | 4 +++- ompi/mca/osc/pt2pt/osc_pt2pt.h | 18 ++++++++------- ompi/mca/osc/pt2pt/osc_pt2pt_comm.c | 22 +++++++++---------- ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c | 6 ++--- ompi/mca/osc/pt2pt/osc_pt2pt_data_move.h | 4 +++- ompi/mca/osc/pt2pt/osc_pt2pt_module.c | 4 +++- ompi/mca/osc/pt2pt/osc_pt2pt_request.h | 4 +++- ompi/mca/osc/sm/osc_sm.h | 12 +++++----- ompi/mca/osc/sm/osc_sm_comm.c | 20 +++++++++-------- ompi/mca/osc/sm/osc_sm_component.c | 6 +++-- ompi/mpi/c/compare_and_swap.c | 6 +++-- ompi/mpi/c/fetch_and_op.c | 6 +++-- ompi/mpi/c/raccumulate.c | 4 +++- ompi/mpi/c/win_detach.c | 4 +++- 20 files changed, 114 insertions(+), 82 deletions(-) diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index f041dd4fb17..1977604e7f7 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -17,6 +17,8 @@ * reserved. * Copyright (c) 2011-2013 INRIA. All rights reserved. * Copyright (c) 2015 University of Houston. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -1328,7 +1330,7 @@ OMPI_DECLSPEC int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], OMPI_DECLSPEC int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); OMPI_DECLSPEC int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm); OMPI_DECLSPEC int MPI_Comm_test_inter(MPI_Comm comm, int *flag); -OMPI_DECLSPEC int MPI_Compare_and_swap(void *origin_addr, void *compare_addr, +OMPI_DECLSPEC int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win); OMPI_DECLSPEC int MPI_Dims_create(int nnodes, int ndims, int dims[]); @@ -1346,7 +1348,7 @@ OMPI_DECLSPEC int MPI_Error_class(int errorcode, int *errorclass); OMPI_DECLSPEC int MPI_Error_string(int errorcode, char *string, int *resultlen); OMPI_DECLSPEC int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); -OMPI_DECLSPEC int MPI_Fetch_and_op(void *origin_addr, void *result_addr, MPI_Datatype datatype, +OMPI_DECLSPEC int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win); OMPI_DECLSPEC int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request); @@ -1622,8 +1624,8 @@ OMPI_DECLSPEC int MPI_Put(const void *origin_addr, int origin_count, MPI_Dataty int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win); OMPI_DECLSPEC int MPI_Query_thread(int *provided); -OMPI_DECLSPEC int MPI_Raccumulate(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, - int target_rank, MPI_Aint target_disp, int target_count, +OMPI_DECLSPEC int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, + int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request); @@ -1846,7 +1848,7 @@ OMPI_DECLSPEC int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_at MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state); OMPI_DECLSPEC int MPI_Win_delete_attr(MPI_Win win, int win_keyval); -OMPI_DECLSPEC int MPI_Win_detach(MPI_Win win, void *base); +OMPI_DECLSPEC int MPI_Win_detach(MPI_Win win, const void *base); OMPI_DECLSPEC MPI_Win MPI_Win_f2c(MPI_Fint win); OMPI_DECLSPEC int MPI_Win_fence(int assert, MPI_Win win); OMPI_DECLSPEC int MPI_Win_flush(int rank, MPI_Win win); @@ -2028,7 +2030,7 @@ OMPI_DECLSPEC int PMPI_Comm_spawn_multiple(int count, char *array_of_commands[] OMPI_DECLSPEC int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); OMPI_DECLSPEC int PMPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm); OMPI_DECLSPEC int PMPI_Comm_test_inter(MPI_Comm comm, int *flag); -OMPI_DECLSPEC int PMPI_Compare_and_swap(void *origin_addr, void *compare_addr, +OMPI_DECLSPEC int PMPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win); OMPI_DECLSPEC int PMPI_Dims_create(int nnodes, int ndims, int dims[]); @@ -2046,7 +2048,7 @@ OMPI_DECLSPEC int PMPI_Error_class(int errorcode, int *errorclass); OMPI_DECLSPEC int PMPI_Error_string(int errorcode, char *string, int *resultlen); OMPI_DECLSPEC int PMPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); -OMPI_DECLSPEC int PMPI_Fetch_and_op(void *origin_addr, void *result_addr, MPI_Datatype datatype, +OMPI_DECLSPEC int PMPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win); OMPI_DECLSPEC int PMPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request); @@ -2324,8 +2326,8 @@ OMPI_DECLSPEC int PMPI_Put(const void *origin_addr, int origin_count, MPI_Datat int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win); OMPI_DECLSPEC int PMPI_Query_thread(int *provided); -OMPI_DECLSPEC int PMPI_Raccumulate(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, - int target_rank, MPI_Aint target_disp, int target_count, +OMPI_DECLSPEC int PMPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, + int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int PMPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request); @@ -2548,7 +2550,7 @@ OMPI_DECLSPEC int PMPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_a MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state); OMPI_DECLSPEC int PMPI_Win_delete_attr(MPI_Win win, int win_keyval); -OMPI_DECLSPEC int PMPI_Win_detach(MPI_Win win, void *base); +OMPI_DECLSPEC int PMPI_Win_detach(MPI_Win win, const void *base); OMPI_DECLSPEC MPI_Win PMPI_Win_f2c(MPI_Fint win); OMPI_DECLSPEC int PMPI_Win_fence(int assert, MPI_Win win); OMPI_DECLSPEC int PMPI_Win_flush(int rank, MPI_Win win); diff --git a/ompi/mca/osc/base/osc_base_obj_convert.c b/ompi/mca/osc/base/osc_base_obj_convert.c index a5c3a694ecb..0a2d5c70572 100644 --- a/ompi/mca/osc/base/osc_base_obj_convert.c +++ b/ompi/mca/osc/base/osc_base_obj_convert.c @@ -134,7 +134,7 @@ int ompi_osc_base_process_op (void *outbuf, void *inbuf, size_t inbuflen, return OMPI_SUCCESS; } -int ompi_osc_base_sndrcv_op (void *origin, int32_t origin_count, +int ompi_osc_base_sndrcv_op (const void *origin, int32_t origin_count, struct ompi_datatype_t *origin_dt, void *target, int32_t target_count, struct ompi_datatype_t *target_dt, @@ -152,7 +152,7 @@ int ompi_osc_base_sndrcv_op (void *origin, int32_t origin_count, bool done; if (ompi_datatype_is_predefined(origin_dt) && origin_dt == target_dt) { - ompi_op_reduce(op, origin, target, origin_count, origin_dt); + ompi_op_reduce(op, (void *)origin, target, origin_count, origin_dt); return OMPI_SUCCESS; } diff --git a/ompi/mca/osc/base/osc_base_obj_convert.h b/ompi/mca/osc/base/osc_base_obj_convert.h index 7d36c33b324..bc9db2bc57b 100644 --- a/ompi/mca/osc/base/osc_base_obj_convert.h +++ b/ompi/mca/osc/base/osc_base_obj_convert.h @@ -7,6 +7,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -117,7 +119,7 @@ OMPI_DECLSPEC int ompi_osc_base_process_op(void *outbuf, int count, ompi_op_t *op); -OMPI_DECLSPEC int ompi_osc_base_sndrcv_op(void *origin, +OMPI_DECLSPEC int ompi_osc_base_sndrcv_op(const void *origin, int32_t origin_count, struct ompi_datatype_t *origin_dt, void *target, diff --git a/ompi/mca/osc/osc.h b/ompi/mca/osc/osc.h index bac4b085a9f..4b3b0385478 100644 --- a/ompi/mca/osc/osc.h +++ b/ompi/mca/osc/osc.h @@ -11,6 +11,8 @@ * Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -181,7 +183,7 @@ typedef int (*ompi_osc_base_module_win_shared_query_fn_t)(struct ompi_win_t *win size_t *size, int *disp_unit, void *baseptr); typedef int (*ompi_osc_base_module_win_attach_fn_t)(struct ompi_win_t *win, void *base, size_t size); -typedef int (*ompi_osc_base_module_win_detach_fn_t)(struct ompi_win_t *win, void *base); +typedef int (*ompi_osc_base_module_win_detach_fn_t)(struct ompi_win_t *win, const void *base); /** * Free resources associated with win @@ -231,15 +233,15 @@ typedef int (*ompi_osc_base_module_accumulate_fn_t)(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -typedef int (*ompi_osc_base_module_compare_and_swap_fn_t)(void *origin_addr, - void *compare_addr, +typedef int (*ompi_osc_base_module_compare_and_swap_fn_t)(const void *origin_addr, + const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_win_t *win); -typedef int (*ompi_osc_base_module_fetch_and_op_fn_t)(void *origin_addr, +typedef int (*ompi_osc_base_module_fetch_and_op_fn_t)(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -247,8 +249,8 @@ typedef int (*ompi_osc_base_module_fetch_and_op_fn_t)(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -typedef int (*ompi_osc_base_module_get_accumulate_fn_t)(void *origin_addr, - int origin_count, +typedef int (*ompi_osc_base_module_get_accumulate_fn_t)(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, int result_count, @@ -281,7 +283,7 @@ typedef int (*ompi_osc_base_module_rget_fn_t)(void *origin_addr, struct ompi_request_t **request); -typedef int (*ompi_osc_base_module_raccumulate_fn_t)(void *origin_addr, +typedef int (*ompi_osc_base_module_raccumulate_fn_t)(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, diff --git a/ompi/mca/osc/portals4/osc_portals4.h b/ompi/mca/osc/portals4/osc_portals4.h index c0f93accb07..fb771faedf1 100644 --- a/ompi/mca/osc/portals4/osc_portals4.h +++ b/ompi/mca/osc/portals4/osc_portals4.h @@ -3,6 +3,8 @@ * Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -116,7 +118,7 @@ get_displacement(ompi_osc_portals4_module_t *module, int ompi_osc_portals4_attach(struct ompi_win_t *win, void *base, size_t len); -int ompi_osc_portals4_detach(struct ompi_win_t *win, void *base); +int ompi_osc_portals4_detach(struct ompi_win_t *win, const void *base); int ompi_osc_portals4_free(struct ompi_win_t *win); @@ -148,15 +150,15 @@ int ompi_osc_portals4_accumulate(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_portals4_compare_and_swap(void *origin_addr, - void *compare_addr, +int ompi_osc_portals4_compare_and_swap(const void *origin_addr, + const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_win_t *win); -int ompi_osc_portals4_fetch_and_op(void *origin_addr, +int ompi_osc_portals4_fetch_and_op(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -164,8 +166,8 @@ int ompi_osc_portals4_fetch_and_op(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_portals4_get_accumulate(void *origin_addr, - int origin_count, +int ompi_osc_portals4_get_accumulate(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, int result_count, @@ -197,7 +199,7 @@ int ompi_osc_portals4_rget(void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -int ompi_osc_portals4_raccumulate(void *origin_addr, +int ompi_osc_portals4_raccumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index a9c0ae05c98..ddd6d4b9e87 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -3,6 +3,8 @@ * Copyright (c) 2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -312,7 +314,7 @@ ompi_osc_portals4_rget(void *origin_addr, int -ompi_osc_portals4_raccumulate(void *origin_addr, +ompi_osc_portals4_raccumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -785,8 +787,8 @@ ompi_osc_portals4_accumulate(void *origin_addr, int -ompi_osc_portals4_get_accumulate(void *origin_addr, - int origin_count, +ompi_osc_portals4_get_accumulate(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_dt, void *result_addr, int result_count, @@ -937,8 +939,8 @@ ompi_osc_portals4_get_accumulate(void *origin_addr, int -ompi_osc_portals4_compare_and_swap(void *origin_addr, - void *compare_addr, +ompi_osc_portals4_compare_and_swap(const void *origin_addr, + const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -1000,7 +1002,7 @@ ompi_osc_portals4_compare_and_swap(void *origin_addr, int -ompi_osc_portals4_fetch_and_op(void *origin_addr, +ompi_osc_portals4_fetch_and_op(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, diff --git a/ompi/mca/osc/portals4/osc_portals4_component.c b/ompi/mca/osc/portals4/osc_portals4_component.c index 5f30d4e4b50..22ce27af748 100644 --- a/ompi/mca/osc/portals4/osc_portals4_component.c +++ b/ompi/mca/osc/portals4/osc_portals4_component.c @@ -3,6 +3,8 @@ * Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -583,7 +585,7 @@ ompi_osc_portals4_attach(struct ompi_win_t *win, void *base, size_t len) int -ompi_osc_portals4_detach(struct ompi_win_t *win, void *base) +ompi_osc_portals4_detach(struct ompi_win_t *win, const void *base) { return OMPI_SUCCESS; } diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt.h b/ompi/mca/osc/pt2pt/osc_pt2pt.h index b7a9520eea3..ae1d3448d23 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt.h +++ b/ompi/mca/osc/pt2pt/osc_pt2pt.h @@ -12,6 +12,8 @@ * reserved. * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -246,7 +248,7 @@ OBJ_CLASS_DECLARATION(ompi_osc_pt2pt_pending_t); extern bool ompi_osc_pt2pt_no_locks; int ompi_osc_pt2pt_attach(struct ompi_win_t *win, void *base, size_t len); -int ompi_osc_pt2pt_detach(struct ompi_win_t *win, void *base); +int ompi_osc_pt2pt_detach(struct ompi_win_t *win, const void *base); int ompi_osc_pt2pt_free(struct ompi_win_t *win); @@ -278,15 +280,15 @@ int ompi_osc_pt2pt_get(void *origin_addr, struct ompi_datatype_t *target_dt, struct ompi_win_t *win); -int ompi_osc_pt2pt_compare_and_swap(void *origin_addr, - void *compare_addr, +int ompi_osc_pt2pt_compare_and_swap(const void *origin_addr, + const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_win_t *win); -int ompi_osc_pt2pt_fetch_and_op(void *origin_addr, +int ompi_osc_pt2pt_fetch_and_op(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -294,7 +296,7 @@ int ompi_osc_pt2pt_fetch_and_op(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_pt2pt_get_accumulate(void *origin_addr, +int ompi_osc_pt2pt_get_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, @@ -327,7 +329,7 @@ int ompi_osc_pt2pt_rget(void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -int ompi_osc_pt2pt_raccumulate(void *origin_addr, +int ompi_osc_pt2pt_raccumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -405,7 +407,7 @@ int ompi_osc_pt2pt_component_irecv(ompi_osc_pt2pt_module_t *module, struct ompi_communicator_t *comm); int ompi_osc_pt2pt_component_isend(ompi_osc_pt2pt_module_t *module, - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int dest, @@ -565,7 +567,7 @@ static inline void osc_pt2pt_copy_on_recv (void *target, void *source, size_t so * buffer. The copy is done with a convertor generated from proc, * datatype, and count. */ -static inline void osc_pt2pt_copy_for_send (void *target, size_t target_len, void *source, ompi_proc_t *proc, +static inline void osc_pt2pt_copy_for_send (void *target, size_t target_len, const void *source, ompi_proc_t *proc, int count, ompi_datatype_t *datatype) { opal_convertor_t convertor; diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c b/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c index 1ba8e287a50..788899cd828 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c @@ -150,7 +150,7 @@ static inline int ompi_osc_pt2pt_get_self (void *target, int target_count, ompi_ return OMPI_SUCCESS; } -static inline int ompi_osc_pt2pt_cas_self (void *source, void *compare, void *result, ompi_datatype_t *datatype, +static inline int ompi_osc_pt2pt_cas_self (const void *source, const void *compare, void *result, ompi_datatype_t *datatype, OPAL_PTRDIFF_TYPE target_disp, ompi_osc_pt2pt_module_t *module) { void *target = (unsigned char*) module->baseptr + @@ -182,7 +182,7 @@ static inline int ompi_osc_pt2pt_cas_self (void *source, void *compare, void *re return OMPI_SUCCESS; } -static inline int ompi_osc_pt2pt_acc_self (void *source, int source_count, ompi_datatype_t *source_datatype, +static inline int ompi_osc_pt2pt_acc_self (const void *source, int source_count, ompi_datatype_t *source_datatype, OPAL_PTRDIFF_TYPE target_disp, int target_count, ompi_datatype_t *target_datatype, ompi_op_t *op, ompi_osc_pt2pt_module_t *module, ompi_osc_pt2pt_request_t *request) { @@ -208,7 +208,7 @@ static inline int ompi_osc_pt2pt_acc_self (void *source, int source_count, ompi_ if (&ompi_mpi_op_replace.op != op) { ret = ompi_osc_base_sndrcv_op (source, source_count, source_datatype, target, target_count, target_datatype, op); } else { - ret = ompi_datatype_sndrcv (source, source_count, source_datatype, target, target_count, target_datatype); + ret = ompi_datatype_sndrcv ((void *)source, source_count, source_datatype, target, target_count, target_datatype); } ompi_osc_pt2pt_accumulate_unlock (module); @@ -226,7 +226,7 @@ static inline int ompi_osc_pt2pt_acc_self (void *source, int source_count, ompi_ return OMPI_SUCCESS; } -static inline int ompi_osc_pt2pt_gacc_self (void *source, int source_count, ompi_datatype_t *source_datatype, +static inline int ompi_osc_pt2pt_gacc_self (const void *source, int source_count, ompi_datatype_t *source_datatype, void *result, int result_count, ompi_datatype_t *result_datatype, OPAL_PTRDIFF_TYPE target_disp, int target_count, ompi_datatype_t *target_datatype, ompi_op_t *op, ompi_osc_pt2pt_module_t *module, ompi_osc_pt2pt_request_t *request) @@ -264,7 +264,7 @@ static inline int ompi_osc_pt2pt_gacc_self (void *source, int source_count, ompi if (&ompi_mpi_op_replace.op != op) { ret = ompi_osc_base_sndrcv_op (source, source_count, source_datatype, target, target_count, target_datatype, op); } else { - ret = ompi_datatype_sndrcv (source, source_count, source_datatype, target, target_count, target_datatype); + ret = ompi_datatype_sndrcv ((void *)source, source_count, source_datatype, target, target_count, target_datatype); } } @@ -463,7 +463,7 @@ ompi_osc_pt2pt_put(void *origin_addr, int origin_count, static int -ompi_osc_pt2pt_accumulate_w_req (void *origin_addr, int origin_count, +ompi_osc_pt2pt_accumulate_w_req (const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, @@ -647,7 +647,7 @@ ompi_osc_pt2pt_accumulate(void *origin_addr, int origin_count, target_dt, op, win, NULL); } -int ompi_osc_pt2pt_compare_and_swap (void *origin_addr, void *compare_addr, +int ompi_osc_pt2pt_compare_and_swap (const void *origin_addr, const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_win_t *win) @@ -737,7 +737,7 @@ int ompi_osc_pt2pt_compare_and_swap (void *origin_addr, void *compare_addr, } -int ompi_osc_pt2pt_fetch_and_op(void *origin_addr, void *result_addr, +int ompi_osc_pt2pt_fetch_and_op(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_op_t *op, struct ompi_win_t *win) @@ -956,7 +956,7 @@ int ompi_osc_pt2pt_get (void *origin_addr, int origin_count, struct ompi_datatyp target_count, target_dt, win, true, &request); } -int ompi_osc_pt2pt_raccumulate(void *origin_addr, int origin_count, +int ompi_osc_pt2pt_raccumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, struct ompi_datatype_t *target_dt, struct ompi_op_t *op, @@ -1001,7 +1001,7 @@ int ompi_osc_pt2pt_raccumulate(void *origin_addr, int origin_count, static inline -int ompi_osc_pt2pt_rget_accumulate_internal (void *origin_addr, int origin_count, +int ompi_osc_pt2pt_rget_accumulate_internal (const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, int result_count, struct ompi_datatype_t *result_datatype, @@ -1188,7 +1188,7 @@ int ompi_osc_pt2pt_rget_accumulate_internal (void *origin_addr, int origin_count return ret; } -int ompi_osc_pt2pt_get_accumulate(void *origin_addr, int origin_count, +int ompi_osc_pt2pt_get_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, void *result_addr, int result_count, struct ompi_datatype_t *result_dt, diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c index 4f1de661ea8..c49f0f72ce5 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c @@ -1724,7 +1724,7 @@ isend_completion_cb(ompi_request_t *request) } -int ompi_osc_pt2pt_component_isend (ompi_osc_pt2pt_module_t *module, void *buf, +int ompi_osc_pt2pt_component_isend (ompi_osc_pt2pt_module_t *module, const void *buf, size_t count, struct ompi_datatype_t *datatype, int dest, int tag, struct ompi_communicator_t *comm) { @@ -1732,7 +1732,7 @@ int ompi_osc_pt2pt_component_isend (ompi_osc_pt2pt_module_t *module, void *buf, isend_completion_cb, module); } -int ompi_osc_pt2pt_isend_w_cb (void *ptr, int count, ompi_datatype_t *datatype, int target, int tag, +int ompi_osc_pt2pt_isend_w_cb (const void *ptr, int count, ompi_datatype_t *datatype, int target, int tag, ompi_communicator_t *comm, ompi_request_complete_fn_t cb, void *ctx) { ompi_request_t *request; @@ -1742,7 +1742,7 @@ int ompi_osc_pt2pt_isend_w_cb (void *ptr, int count, ompi_datatype_t *datatype, "osc pt2pt: ompi_osc_pt2pt_isend_w_cb sending %d bytes to %d with tag %d", count, target, tag)); - ret = MCA_PML_CALL(isend_init(ptr, count, datatype, target, tag, + ret = MCA_PML_CALL(isend_init((void *)ptr, count, datatype, target, tag, MCA_PML_BASE_SEND_STANDARD, comm, &request)); if (OMPI_SUCCESS != ret) { OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output, diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.h b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.h index cd79a39a86a..a8e80ce3db9 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.h +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.h @@ -11,6 +11,8 @@ * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -66,7 +68,7 @@ int ompi_osc_pt2pt_control_send_unbuffered (ompi_osc_pt2pt_module_t *module, * be called with the associated request. The context specified in ctx will be stored in * the req_completion_cb_data member of the ompi_request_t for use by the callback. */ -int ompi_osc_pt2pt_isend_w_cb (void *ptr, int count, ompi_datatype_t *datatype, int target, int tag, +int ompi_osc_pt2pt_isend_w_cb (const void *ptr, int count, ompi_datatype_t *datatype, int target, int tag, ompi_communicator_t *comm, ompi_request_complete_fn_t cb, void *ctx); /** diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_module.c b/ompi/mca/osc/pt2pt/osc_pt2pt_module.c index 51a4c2d79ad..e3bcc34a2d5 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_module.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_module.c @@ -11,6 +11,8 @@ * Copyright (c) 2007-2014 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +40,7 @@ ompi_osc_pt2pt_attach(struct ompi_win_t *win, void *base, size_t len) int -ompi_osc_pt2pt_detach(struct ompi_win_t *win, void *base) +ompi_osc_pt2pt_detach(struct ompi_win_t *win, const void *base) { return OMPI_SUCCESS; } diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_request.h b/ompi/mca/osc/pt2pt/osc_pt2pt_request.h index 1c0db9e1234..07b9d53093e 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_request.h +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_request.h @@ -3,6 +3,8 @@ * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -22,7 +24,7 @@ struct ompi_osc_pt2pt_request_t { ompi_request_t super; int type; - void *origin_addr; + const void *origin_addr; int origin_count; struct ompi_datatype_t *origin_dt; ompi_osc_pt2pt_module_t* module; diff --git a/ompi/mca/osc/sm/osc_sm.h b/ompi/mca/osc/sm/osc_sm.h index 2e5e254f4c3..103a7c9d970 100644 --- a/ompi/mca/osc/sm/osc_sm.h +++ b/ompi/mca/osc/sm/osc_sm.h @@ -87,7 +87,7 @@ typedef struct ompi_osc_sm_module_t ompi_osc_sm_module_t; int ompi_osc_sm_shared_query(struct ompi_win_t *win, int rank, size_t *size, int *disp_unit, void *baseptr); int ompi_osc_sm_attach(struct ompi_win_t *win, void *base, size_t len); -int ompi_osc_sm_detach(struct ompi_win_t *win, void *base); +int ompi_osc_sm_detach(struct ompi_win_t *win, const void *base); int ompi_osc_sm_free(struct ompi_win_t *win); @@ -119,15 +119,15 @@ int ompi_osc_sm_accumulate(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_sm_compare_and_swap(void *origin_addr, - void *compare_addr, +int ompi_osc_sm_compare_and_swap(const void *origin_addr, + const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, OPAL_PTRDIFF_TYPE target_disp, struct ompi_win_t *win); -int ompi_osc_sm_fetch_and_op(void *origin_addr, +int ompi_osc_sm_fetch_and_op(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -135,7 +135,7 @@ int ompi_osc_sm_fetch_and_op(void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_sm_get_accumulate(void *origin_addr, +int ompi_osc_sm_get_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, @@ -168,7 +168,7 @@ int ompi_osc_sm_rget(void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -int ompi_osc_sm_raccumulate(void *origin_addr, +int ompi_osc_sm_raccumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, diff --git a/ompi/mca/osc/sm/osc_sm_comm.c b/ompi/mca/osc/sm/osc_sm_comm.c index f0d3ee87cd3..3be16794453 100644 --- a/ompi/mca/osc/sm/osc_sm_comm.c +++ b/ompi/mca/osc/sm/osc_sm_comm.c @@ -3,6 +3,8 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -99,7 +101,7 @@ ompi_osc_sm_rget(void *origin_addr, int -ompi_osc_sm_raccumulate(void *origin_addr, +ompi_osc_sm_raccumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -127,7 +129,7 @@ ompi_osc_sm_raccumulate(void *origin_addr, opal_atomic_lock(&module->node_states[target].accumulate_lock); if (op == &ompi_mpi_op_replace.op) { - ret = ompi_datatype_sndrcv(origin_addr, origin_count, origin_dt, + ret = ompi_datatype_sndrcv((void *)origin_addr, origin_count, origin_dt, remote_address, target_count, target_dt); } else { ret = ompi_osc_base_sndrcv_op(origin_addr, origin_count, origin_dt, @@ -307,8 +309,8 @@ ompi_osc_sm_accumulate(void *origin_addr, int -ompi_osc_sm_get_accumulate(void *origin_addr, - int origin_count, +ompi_osc_sm_get_accumulate(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_dt, void *result_addr, int result_count, @@ -342,7 +344,7 @@ ompi_osc_sm_get_accumulate(void *origin_addr, if (OMPI_SUCCESS != ret || op == &ompi_mpi_op_no_op.op) goto done; if (op == &ompi_mpi_op_replace.op) { - ret = ompi_datatype_sndrcv(origin_addr, origin_count, origin_dt, + ret = ompi_datatype_sndrcv((void *)origin_addr, origin_count, origin_dt, remote_address, target_count, target_dt); } else { ret = ompi_osc_base_sndrcv_op(origin_addr, origin_count, origin_dt, @@ -358,8 +360,8 @@ ompi_osc_sm_get_accumulate(void *origin_addr, int -ompi_osc_sm_compare_and_swap(void *origin_addr, - void *compare_addr, +ompi_osc_sm_compare_and_swap(const void *origin_addr, + const void *compare_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -398,7 +400,7 @@ ompi_osc_sm_compare_and_swap(void *origin_addr, int -ompi_osc_sm_fetch_and_op(void *origin_addr, +ompi_osc_sm_fetch_and_op(const void *origin_addr, void *result_addr, struct ompi_datatype_t *dt, int target, @@ -429,7 +431,7 @@ ompi_osc_sm_fetch_and_op(void *origin_addr, if (op == &ompi_mpi_op_replace.op) { ompi_datatype_copy_content_same_ddt(dt, 1, (char*) remote_address, (char*) origin_addr); } else { - ompi_op_reduce(op, origin_addr, remote_address, 1, dt); + ompi_op_reduce(op, (void *)origin_addr, remote_address, 1, dt); } done: diff --git a/ompi/mca/osc/sm/osc_sm_component.c b/ompi/mca/osc/sm/osc_sm_component.c index 95688a47efe..024794bb843 100644 --- a/ompi/mca/osc/sm/osc_sm_component.c +++ b/ompi/mca/osc/sm/osc_sm_component.c @@ -4,7 +4,9 @@ * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -424,7 +426,7 @@ ompi_osc_sm_attach(struct ompi_win_t *win, void *base, size_t len) int -ompi_osc_sm_detach(struct ompi_win_t *win, void *base) +ompi_osc_sm_detach(struct ompi_win_t *win, const void *base) { ompi_osc_sm_module_t *module = (ompi_osc_sm_module_t*) win->w_osc_module; diff --git a/ompi/mpi/c/compare_and_swap.c b/ompi/mpi/c/compare_and_swap.c index 95531538e6f..ae8cc5dc34b 100644 --- a/ompi/mpi/c/compare_and_swap.c +++ b/ompi/mpi/c/compare_and_swap.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -39,8 +41,8 @@ static const char FUNC_NAME[] = "MPI_Compare_and_swap"; -int MPI_Compare_and_swap(void *origin_addr, void *compare_addr, void *result_addr, - MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win) +int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, + MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win) { int rc; diff --git a/ompi/mpi/c/fetch_and_op.c b/ompi/mpi/c/fetch_and_op.c index 128e750670b..0ff24afa4dd 100644 --- a/ompi/mpi/c/fetch_and_op.c +++ b/ompi/mpi/c/fetch_and_op.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -39,8 +41,8 @@ static const char FUNC_NAME[] = "MPI_Fetch_and_op"; -int MPI_Fetch_and_op(void *origin_addr, void *result_addr, MPI_Datatype datatype, - int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) +int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, + int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) { int rc; diff --git a/ompi/mpi/c/raccumulate.c b/ompi/mpi/c/raccumulate.c index 8e2bfbeabaf..76ca2da3d07 100644 --- a/ompi/mpi/c/raccumulate.c +++ b/ompi/mpi/c/raccumulate.c @@ -14,6 +14,8 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -43,7 +45,7 @@ static const char FUNC_NAME[] = "MPI_Raccumulate"; -int MPI_Raccumulate(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, +int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) { diff --git a/ompi/mpi/c/win_detach.c b/ompi/mpi/c/win_detach.c index 8d16b5750c8..11572e6e73f 100644 --- a/ompi/mpi/c/win_detach.c +++ b/ompi/mpi/c/win_detach.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Win_detach"; -int MPI_Win_detach(MPI_Win win, void *base) +int MPI_Win_detach(MPI_Win win, const void *base) { int ret = MPI_SUCCESS; From 07dbcc7278c0578287e51bf5137beb7978476c7c Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 28 Aug 2015 13:07:20 +0900 Subject: [PATCH 0195/1704] osc: do not cast way the const modifier when this is not necessary update the osc framework and mpi c bindings (back-ported from commit open-mpi/ompi@21642a24070e3c215b252700bc80dbf5d825e54c) --- ompi/mca/osc/osc.h | 10 +++++----- ompi/mca/osc/portals4/osc_portals4.h | 10 +++++----- ompi/mca/osc/portals4/osc_portals4_comm.c | 10 +++++----- ompi/mca/osc/pt2pt/osc_pt2pt.h | 8 ++++---- ompi/mca/osc/pt2pt/osc_pt2pt_comm.c | 14 +++++++------- ompi/mca/osc/sm/osc_sm.h | 8 ++++---- ompi/mca/osc/sm/osc_sm_comm.c | 18 +++++++++--------- ompi/mpi/c/accumulate.c | 5 +++-- ompi/mpi/c/get_accumulate.c | 5 +++-- ompi/mpi/c/put.c | 5 +++-- ompi/mpi/c/raccumulate.c | 3 +-- ompi/mpi/c/rget_accumulate.c | 5 +++-- ompi/mpi/c/rput.c | 7 ++++--- 13 files changed, 56 insertions(+), 52 deletions(-) diff --git a/ompi/mca/osc/osc.h b/ompi/mca/osc/osc.h index 4b3b0385478..b46fc3c4c1f 100644 --- a/ompi/mca/osc/osc.h +++ b/ompi/mca/osc/osc.h @@ -203,7 +203,7 @@ typedef int (*ompi_osc_base_module_win_detach_fn_t)(struct ompi_win_t *win, cons typedef int (*ompi_osc_base_module_free_fn_t)(struct ompi_win_t *win); -typedef int (*ompi_osc_base_module_put_fn_t)(void *origin_addr, +typedef int (*ompi_osc_base_module_put_fn_t)(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -223,7 +223,7 @@ typedef int (*ompi_osc_base_module_get_fn_t)(void *origin_addr, struct ompi_win_t *win); -typedef int (*ompi_osc_base_module_accumulate_fn_t)(void *origin_addr, +typedef int (*ompi_osc_base_module_accumulate_fn_t)(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -262,7 +262,7 @@ typedef int (*ompi_osc_base_module_get_accumulate_fn_t)(const void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -typedef int (*ompi_osc_base_module_rput_fn_t)(void *origin_addr, +typedef int (*ompi_osc_base_module_rput_fn_t)(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -294,8 +294,8 @@ typedef int (*ompi_osc_base_module_raccumulate_fn_t)(const void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -typedef int (*ompi_osc_base_module_rget_accumulate_fn_t)(void *origin_addr, - int origin_count, +typedef int (*ompi_osc_base_module_rget_accumulate_fn_t)(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, int result_count, diff --git a/ompi/mca/osc/portals4/osc_portals4.h b/ompi/mca/osc/portals4/osc_portals4.h index fb771faedf1..da940aab73e 100644 --- a/ompi/mca/osc/portals4/osc_portals4.h +++ b/ompi/mca/osc/portals4/osc_portals4.h @@ -122,7 +122,7 @@ int ompi_osc_portals4_detach(struct ompi_win_t *win, const void *base); int ompi_osc_portals4_free(struct ompi_win_t *win); -int ompi_osc_portals4_put(void *origin_addr, +int ompi_osc_portals4_put(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -140,7 +140,7 @@ int ompi_osc_portals4_get(void *origin_addr, struct ompi_datatype_t *target_dt, struct ompi_win_t *win); -int ompi_osc_portals4_accumulate(void *origin_addr, +int ompi_osc_portals4_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -179,7 +179,7 @@ int ompi_osc_portals4_get_accumulate(const void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_portals4_rput(void *origin_addr, +int ompi_osc_portals4_rput(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -210,8 +210,8 @@ int ompi_osc_portals4_raccumulate(const void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -int ompi_osc_portals4_rget_accumulate(void *origin_addr, - int origin_count, +int ompi_osc_portals4_rget_accumulate(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, int result_count, diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index ddd6d4b9e87..26e2c58a6ec 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -182,7 +182,7 @@ ompi_osc_portals4_get_dt(struct ompi_datatype_t *dt, ptl_datatype_t *ptl_dt) int -ompi_osc_portals4_rput(void *origin_addr, +ompi_osc_portals4_rput(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -417,8 +417,8 @@ ompi_osc_portals4_raccumulate(const void *origin_addr, int -ompi_osc_portals4_rget_accumulate(void *origin_addr, - int origin_count, +ompi_osc_portals4_rget_accumulate(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_dt, void *result_addr, int result_count, @@ -582,7 +582,7 @@ ompi_osc_portals4_rget_accumulate(void *origin_addr, int -ompi_osc_portals4_put(void *origin_addr, +ompi_osc_portals4_put(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -694,7 +694,7 @@ ompi_osc_portals4_get(void *origin_addr, int -ompi_osc_portals4_accumulate(void *origin_addr, +ompi_osc_portals4_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt.h b/ompi/mca/osc/pt2pt/osc_pt2pt.h index ae1d3448d23..04833efe53e 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt.h +++ b/ompi/mca/osc/pt2pt/osc_pt2pt.h @@ -252,7 +252,7 @@ int ompi_osc_pt2pt_detach(struct ompi_win_t *win, const void *base); int ompi_osc_pt2pt_free(struct ompi_win_t *win); -int ompi_osc_pt2pt_put(void *origin_addr, +int ompi_osc_pt2pt_put(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -261,7 +261,7 @@ int ompi_osc_pt2pt_put(void *origin_addr, struct ompi_datatype_t *target_dt, struct ompi_win_t *win); -int ompi_osc_pt2pt_accumulate(void *origin_addr, +int ompi_osc_pt2pt_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -309,7 +309,7 @@ int ompi_osc_pt2pt_get_accumulate(const void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_pt2pt_rput(void *origin_addr, +int ompi_osc_pt2pt_rput(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -340,7 +340,7 @@ int ompi_osc_pt2pt_raccumulate(const void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -int ompi_osc_pt2pt_rget_accumulate(void *origin_addr, +int ompi_osc_pt2pt_rget_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c b/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c index 788899cd828..46407d1366c 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_comm.c @@ -82,7 +82,7 @@ static int ompi_osc_pt2pt_dt_send_complete (ompi_request_t *request) } /* self communication optimizations */ -static inline int ompi_osc_pt2pt_put_self (void *source, int source_count, ompi_datatype_t *source_datatype, +static inline int ompi_osc_pt2pt_put_self (const void *source, int source_count, ompi_datatype_t *source_datatype, OPAL_PTRDIFF_TYPE target_disp, int target_count, ompi_datatype_t *target_datatype, ompi_osc_pt2pt_module_t *module, ompi_osc_pt2pt_request_t *request) { @@ -103,7 +103,7 @@ static inline int ompi_osc_pt2pt_put_self (void *source, int source_count, ompi_ return OMPI_ERR_RMA_SYNC; } - ret = ompi_datatype_sndrcv (source, source_count, source_datatype, + ret = ompi_datatype_sndrcv ((void *)source, source_count, source_datatype, target, target_count, target_datatype); if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { return ret; @@ -286,7 +286,7 @@ static inline int ompi_osc_pt2pt_gacc_self (const void *source, int source_count } /* end: self communication optimizations */ -static inline int ompi_osc_pt2pt_put_w_req (void *origin_addr, int origin_count, +static inline int ompi_osc_pt2pt_put_w_req (const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, struct ompi_datatype_t *target_dt, @@ -450,7 +450,7 @@ static inline int ompi_osc_pt2pt_put_w_req (void *origin_addr, int origin_count, } int -ompi_osc_pt2pt_put(void *origin_addr, int origin_count, +ompi_osc_pt2pt_put(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, @@ -635,7 +635,7 @@ ompi_osc_pt2pt_accumulate_w_req (const void *origin_addr, int origin_count, } int -ompi_osc_pt2pt_accumulate(void *origin_addr, int origin_count, +ompi_osc_pt2pt_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, @@ -746,7 +746,7 @@ int ompi_osc_pt2pt_fetch_and_op(const void *origin_addr, void *result_addr, target, target_disp, 1, dt, op, win); } -int ompi_osc_pt2pt_rput(void *origin_addr, int origin_count, +int ompi_osc_pt2pt_rput(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, OPAL_PTRDIFF_TYPE target_disp, int target_count, struct ompi_datatype_t *target_dt, @@ -1205,7 +1205,7 @@ int ompi_osc_pt2pt_get_accumulate(const void *origin_addr, int origin_count, } -int ompi_osc_pt2pt_rget_accumulate(void *origin_addr, int origin_count, +int ompi_osc_pt2pt_rget_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, void *result_addr, int result_count, struct ompi_datatype_t *result_dt, diff --git a/ompi/mca/osc/sm/osc_sm.h b/ompi/mca/osc/sm/osc_sm.h index 103a7c9d970..344c05661f0 100644 --- a/ompi/mca/osc/sm/osc_sm.h +++ b/ompi/mca/osc/sm/osc_sm.h @@ -91,7 +91,7 @@ int ompi_osc_sm_detach(struct ompi_win_t *win, const void *base); int ompi_osc_sm_free(struct ompi_win_t *win); -int ompi_osc_sm_put(void *origin_addr, +int ompi_osc_sm_put(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -109,7 +109,7 @@ int ompi_osc_sm_get(void *origin_addr, struct ompi_datatype_t *target_dt, struct ompi_win_t *win); -int ompi_osc_sm_accumulate(void *origin_addr, +int ompi_osc_sm_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -148,7 +148,7 @@ int ompi_osc_sm_get_accumulate(const void *origin_addr, struct ompi_op_t *op, struct ompi_win_t *win); -int ompi_osc_sm_rput(void *origin_addr, +int ompi_osc_sm_rput(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -179,7 +179,7 @@ int ompi_osc_sm_raccumulate(const void *origin_addr, struct ompi_win_t *win, struct ompi_request_t **request); -int ompi_osc_sm_rget_accumulate(void *origin_addr, +int ompi_osc_sm_rget_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, void *result_addr, diff --git a/ompi/mca/osc/sm/osc_sm_comm.c b/ompi/mca/osc/sm/osc_sm_comm.c index 3be16794453..61e6259ed42 100644 --- a/ompi/mca/osc/sm/osc_sm_comm.c +++ b/ompi/mca/osc/sm/osc_sm_comm.c @@ -21,7 +21,7 @@ #include "osc_sm.h" int -ompi_osc_sm_rput(void *origin_addr, +ompi_osc_sm_rput(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -45,7 +45,7 @@ ompi_osc_sm_rput(void *origin_addr, remote_address = ((char*) (module->bases[target])) + module->disp_units[target] * target_disp; - ret = ompi_datatype_sndrcv(origin_addr, origin_count, origin_dt, + ret = ompi_datatype_sndrcv((void *)origin_addr, origin_count, origin_dt, remote_address, target_count, target_dt); if (OMPI_SUCCESS != ret) { return ret; @@ -149,8 +149,8 @@ ompi_osc_sm_raccumulate(const void *origin_addr, int -ompi_osc_sm_rget_accumulate(void *origin_addr, - int origin_count, +ompi_osc_sm_rget_accumulate(const void *origin_addr, + int origin_count, struct ompi_datatype_t *origin_dt, void *result_addr, int result_count, @@ -185,7 +185,7 @@ ompi_osc_sm_rget_accumulate(void *origin_addr, if (OMPI_SUCCESS != ret || op == &ompi_mpi_op_no_op.op) goto done; if (op == &ompi_mpi_op_replace.op) { - ret = ompi_datatype_sndrcv(origin_addr, origin_count, origin_dt, + ret = ompi_datatype_sndrcv((void *)origin_addr, origin_count, origin_dt, remote_address, target_count, target_dt); } else { ret = ompi_osc_base_sndrcv_op(origin_addr, origin_count, origin_dt, @@ -206,7 +206,7 @@ ompi_osc_sm_rget_accumulate(void *origin_addr, int -ompi_osc_sm_put(void *origin_addr, +ompi_osc_sm_put(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -229,7 +229,7 @@ ompi_osc_sm_put(void *origin_addr, remote_address = ((char*) (module->bases[target])) + module->disp_units[target] * target_disp; - ret = ompi_datatype_sndrcv(origin_addr, origin_count, origin_dt, + ret = ompi_datatype_sndrcv((void *)origin_addr, origin_count, origin_dt, remote_address, target_count, target_dt); return ret; @@ -268,7 +268,7 @@ ompi_osc_sm_get(void *origin_addr, int -ompi_osc_sm_accumulate(void *origin_addr, +ompi_osc_sm_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, int target, @@ -295,7 +295,7 @@ ompi_osc_sm_accumulate(void *origin_addr, opal_atomic_lock(&module->node_states[target].accumulate_lock); if (op == &ompi_mpi_op_replace.op) { - ret = ompi_datatype_sndrcv(origin_addr, origin_count, origin_dt, + ret = ompi_datatype_sndrcv((void *)origin_addr, origin_count, origin_dt, remote_address, target_count, target_dt); } else { ret = ompi_osc_base_sndrcv_op(origin_addr, origin_count, origin_dt, diff --git a/ompi/mpi/c/accumulate.c b/ompi/mpi/c/accumulate.c index ced8c5fff6a..cd44c9d3847 100644 --- a/ompi/mpi/c/accumulate.c +++ b/ompi/mpi/c/accumulate.c @@ -13,6 +13,8 @@ * Copyright (c) 2009 Sun Microsystmes, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -126,8 +128,7 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origi OPAL_CR_ENTER_LIBRARY(); - /* XXX -- CONST -- do not cast away const -- update mca/osc */ - rc = ompi_win->w_osc_module->osc_accumulate((void *) origin_addr, + rc = ompi_win->w_osc_module->osc_accumulate(origin_addr, origin_count, origin_datatype, target_rank, diff --git a/ompi/mpi/c/get_accumulate.c b/ompi/mpi/c/get_accumulate.c index bc498b49f85..4edc6bccb58 100644 --- a/ompi/mpi/c/get_accumulate.c +++ b/ompi/mpi/c/get_accumulate.c @@ -14,6 +14,8 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -133,8 +135,7 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype o OPAL_CR_ENTER_LIBRARY(); - /* XXX -- TODO: do not cast away the const */ - rc = ompi_win->w_osc_module->osc_get_accumulate((void *) origin_addr, + rc = ompi_win->w_osc_module->osc_get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, diff --git a/ompi/mpi/c/put.c b/ompi/mpi/c/put.c index dc7dbb8f2bd..96ff0139e04 100644 --- a/ompi/mpi/c/put.c +++ b/ompi/mpi/c/put.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -77,8 +79,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datat OPAL_CR_ENTER_LIBRARY(); - /* XXX -- CONST -- do not cast away const -- update mca/osc */ - rc = win->w_osc_module->osc_put((void *) origin_addr, origin_count, origin_datatype, + rc = win->w_osc_module->osc_put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win); OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); diff --git a/ompi/mpi/c/raccumulate.c b/ompi/mpi/c/raccumulate.c index 76ca2da3d07..580773fdb7f 100644 --- a/ompi/mpi/c/raccumulate.c +++ b/ompi/mpi/c/raccumulate.c @@ -130,8 +130,7 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype orig OPAL_CR_ENTER_LIBRARY(); - /* TODO: don't cast away the const */ - rc = ompi_win->w_osc_module->osc_raccumulate((void*) origin_addr, + rc = ompi_win->w_osc_module->osc_raccumulate(origin_addr, origin_count, origin_datatype, target_rank, diff --git a/ompi/mpi/c/rget_accumulate.c b/ompi/mpi/c/rget_accumulate.c index 461d8599375..e9bccae2ae2 100644 --- a/ompi/mpi/c/rget_accumulate.c +++ b/ompi/mpi/c/rget_accumulate.c @@ -14,6 +14,8 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All right * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -135,8 +137,7 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype OPAL_CR_ENTER_LIBRARY(); - /* TODO: do not cast away the const */ - rc = ompi_win->w_osc_module->osc_rget_accumulate((void *) origin_addr, + rc = ompi_win->w_osc_module->osc_rget_accumulate(origin_addr, origin_count, origin_datatype, result_addr, diff --git a/ompi/mpi/c/rput.c b/ompi/mpi/c/rput.c index 16aae363f6f..4ad465f0da9 100644 --- a/ompi/mpi/c/rput.c +++ b/ompi/mpi/c/rput.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -80,9 +82,8 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_data OPAL_CR_ENTER_LIBRARY(); - /* TODO: do not cast away the const */ - rc = win->w_osc_module->osc_rput((void *) origin_addr, origin_count, origin_datatype, - target_rank, target_disp, target_count, + rc = win->w_osc_module->osc_rput(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win, request); OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); } From 27ec238dd308f90266b9ca2c17cb32f6c8847eee Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 31 Aug 2015 03:09:43 -0700 Subject: [PATCH 0196/1704] Fortran: update a comment Split the list of subroutines into cases #1 and #2, just for clarity. (cherry picked from commit 596557e61b4542f85226b0f4a0e1d99453f1c997) --- .../mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index 3dc3a83e196..6d2e0ea0494 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -124,6 +124,7 @@ ! Wasn't that simple? Here's the list of subroutines that are not ! prototyped in this file because they fall into case #1 or #2, above. ! +! Case #1: ! MPI_Cart_create ! MPI_Cart_get ! MPI_Cart_map @@ -137,15 +138,20 @@ ! MPI_File_set_atomicity ! MPI_Finalized ! MPI_Graph_create -! MPI_Improbe ! MPI_Info_get ! MPI_Info_get_valuelen ! MPI_Initialized ! MPI_Intercomm_merge -! MPI_Iprobe ! MPI_Is_thread_main ! MPI_Op_commutative ! MPI_Op_create +! MPI_Type_get_attr +! MPI_Win_get_attr +! MPI_Win_test +! +! Case #2: +! MPI_Iprobe +! MPI_Improbe ! MPI_Request_get_status ! MPI_Status_set_cancelled ! MPI_Test @@ -153,9 +159,6 @@ ! MPI_Testany ! MPI_Testsome ! MPI_Test_cancelled -! MPI_Type_get_attr -! MPI_Win_get_attr -! MPI_Win_test ! interface From 764eb9e7ffe387c919844b96ce2eebb712fd424c Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 31 Aug 2015 12:53:32 -0600 Subject: [PATCH 0197/1704] Purge trailing whitespace This commit is intended to simplify master -> 2.x cherry-picking. Trailing whitespace was first purged from master in commit open-mpi/ompi@869041f Signed-off-by: Nathan Hjelm --- LICENSE | 6 +- Makefile.am | 6 +- autogen.pl | 44 +- config/Makefile.options | 6 +- config/c_get_alignment.m4 | 10 +- config/ompi_check_libfca.m4 | 2 +- config/ompi_check_libhcoll.m4 | 2 +- config/ompi_check_lustre.m4 | 4 +- config/ompi_check_mxm.m4 | 2 +- config/ompi_check_plfs.m4 | 18 +- config/ompi_check_psm.m4 | 2 +- config/ompi_check_pvfs2.m4 | 18 +- config/ompi_check_udapl.m4 | 8 +- config/ompi_config_files.m4 | 10 +- config/ompi_config_threads.m4 | 8 +- config/ompi_configure_options.m4 | 2 +- config/ompi_contrib.m4 | 8 +- config/ompi_cxx_find_exception_flags.m4 | 8 +- config/ompi_cxx_find_template_parameters.m4 | 10 +- config/ompi_cxx_find_template_repository.m4 | 10 +- config/ompi_cxx_have_exceptions.m4 | 10 +- config/ompi_fortran_check.m4 | 20 +- config/ompi_fortran_check_abstract.m4 | 8 +- config/ompi_fortran_check_asynchronous.m4 | 8 +- config/ompi_fortran_check_bind_c.m4 | 6 +- config/ompi_fortran_check_f08_assumed_rank.m4 | 12 +- config/ompi_fortran_check_ignore_tkr.m4 | 20 +- config/ompi_fortran_check_logical_array.m4 | 14 +- config/ompi_fortran_check_private.m4 | 8 +- config/ompi_fortran_check_procedure.m4 | 8 +- config/ompi_fortran_check_protected.m4 | 8 +- config/ompi_fortran_check_real16_c_equiv.m4 | 10 +- config/ompi_fortran_check_type.m4 | 6 +- ...ompi_fortran_find_ext_symbol_convention.m4 | 6 +- .../ompi_fortran_find_module_include_flag.m4 | 12 +- config/ompi_fortran_get_alignment.m4 | 10 +- config/ompi_fortran_get_handle_max.m4 | 16 +- config/ompi_fortran_get_kind_value.m4 | 8 +- config/ompi_fortran_get_sizeof.m4 | 8 +- config/ompi_fortran_get_value_true.m4 | 10 +- config/ompi_interix.m4 | 4 +- config/ompi_microsoft.m4 | 4 +- config/ompi_setup_contrib.m4 | 8 +- config/ompi_setup_cxx.m4 | 26 +- config/ompi_setup_fc.m4 | 16 +- config/ompi_setup_java.m4 | 8 +- config/ompi_setup_mpi_ext.m4 | 10 +- config/ompi_setup_mpi_fortran.m4 | 70 +- config/ompi_setup_mpi_profiling.m4 | 12 +- config/opal_case_sensitive_fs_setup.m4 | 8 +- config/opal_check_attributes.m4 | 4 +- config/opal_check_broken_qsort.m4 | 8 +- config/opal_check_compiler_works.m4 | 10 +- config/opal_check_icc.m4 | 8 +- config/opal_check_offsetof.m4 | 4 +- config/opal_check_openfabrics.m4 | 32 +- config/opal_check_os_flavors.m4 | 4 +- config/opal_check_ps.m4 | 8 +- config/opal_check_pthread_pids.m4 | 12 +- config/opal_check_vendor.m4 | 44 +- config/opal_check_verbs.m4 | 4 +- config/opal_check_visibility.m4 | 10 +- config/opal_check_withdir.m4 | 6 +- config/opal_config_asm.m4 | 28 +- config/opal_config_files.m4 | 4 +- config/opal_config_pthreads.m4 | 58 +- config/opal_config_subdir.m4 | 12 +- config/opal_config_subdir_args.m4 | 10 +- config/opal_config_threads.m4 | 6 +- config/opal_configure_options.m4 | 34 +- config/opal_ensure_contains_optflags.m4 | 6 +- config/opal_find_type.m4 | 8 +- config/opal_get_version.m4sh | 6 +- config/opal_lang_link_with_c.m4 | 12 +- config/opal_mca_priority_sort.pl | 4 +- config/opal_setup_component_package.m4 | 12 +- config/opal_setup_cxx.m4 | 18 +- config/opal_setup_ft.m4 | 22 +- config/opal_setup_java.m4 | 16 +- config/opal_strip_optflags.m4 | 6 +- config/opal_try_assemble.m4 | 8 +- config/orte_check_loadleveler.m4 | 10 +- config/orte_check_lsf.m4 | 2 +- config/orte_check_sge.m4 | 8 +- config/orte_check_slurm.m4 | 12 +- config/orte_check_tm.m4 | 2 +- config/orte_config_files.m4 | 6 +- config/orte_configure_options.m4 | 4 +- config/orte_setup_debugger_flags.m4 | 2 +- config/orte_setup_java.m4 | 16 +- config/pkg.m4 | 6 +- contrib/Makefile.am | 6 +- contrib/amca-param-sets/ft-enable-cr | 4 +- contrib/amca-param-sets/ft-enable-cr-recovery | 4 +- .../Makefile.am | 6 +- .../autogen.sh | 4 +- .../btl_tcp2.addr.h | 10 +- .../btl_tcp2.c | 92 +- .../btl_tcp2.h | 44 +- .../btl_tcp2_addr.h | 10 +- .../btl_tcp2_component.c | 96 +- .../btl_tcp2_endpoint.c | 82 +- .../btl_tcp2_endpoint.h | 6 +- .../btl_tcp2_frag.c | 78 +- .../btl_tcp2_frag.h | 40 +- .../btl_tcp2_ft.c | 10 +- .../btl_tcp2_ft.h | 6 +- .../btl_tcp2_hdr.h | 14 +- .../btl_tcp2_proc.c | 76 +- .../btl_tcp2_proc.h | 22 +- .../configure.ac | 12 +- .../help-mpi-btl-tcp2.txt | 4 +- contrib/code_counter.pl | 8 +- contrib/dist/linux/README | 2 +- contrib/dist/linux/README.ompi-spec-generator | 6 +- contrib/dist/linux/buildrpm.sh | 4 +- contrib/dist/linux/ompi-spec-generator.py | 50 +- .../linux/openmpi-switcher-modulefile.spec | 8 +- .../linux/openmpi-switcher-modulefile.tcl | 4 +- contrib/dist/linux/openmpi.spec | 10 +- contrib/dist/macosx-pkg/ReadMe.rtf | 2 +- contrib/dist/macosx-pkg/buildpackage.sh | 12 +- contrib/dist/make-html-man-pages.pl | 4 +- contrib/find_occurence.pl | 14 +- contrib/find_offenders.pl | 14 +- contrib/fix_headers.pl | 12 +- contrib/fix_indent.pl | 6 +- contrib/gen_stats.pl | 52 +- contrib/generate_file_list.pl | 6 +- contrib/git/build-gitignore.pl | 12 +- contrib/git/update-git-svn.sh | 2 +- contrib/header_replacement.sh | 2 +- .../README-setup-github-diff-emails.txt | 4 +- .../crontab-mpiteam-at-lion.crest.iu.edu | 2 +- .../nightly/reports/check_devel_headers.pl | 12 +- .../nightly/reports/illegal_symbols_report.pl | 12 +- contrib/ompi_branch_check_revisions-v1.5.txt | 2 +- contrib/openmpi-valgrind.supp | 8 +- contrib/platform/embedded/build_embedded.sh | 2 +- contrib/platform/embedded/gen_embedded.sh | 2 +- contrib/platform/hadoop/cisco.conf | 6 +- contrib/platform/hadoop/linux.conf | 6 +- contrib/platform/hadoop/mac.conf | 8 +- contrib/platform/ibm/debug-power6-gcc | 4 +- contrib/platform/ibm/debug-power7-gcc | 4 +- contrib/platform/ibm/debug-ppc32-gcc | 4 +- contrib/platform/ibm/debug-ppc64-gcc | 4 +- contrib/platform/ibm/optimized-power6-gcc | 4 +- contrib/platform/ibm/optimized-power7-gcc | 4 +- contrib/platform/ibm/optimized-ppc32-gcc | 4 +- contrib/platform/ibm/optimized-ppc64-gcc | 2 +- .../platform/intel/bend/linux-optimized.conf | 14 +- contrib/platform/intel/bend/linux-orcm.conf | 16 +- contrib/platform/intel/bend/linux.conf | 16 +- .../platform/intel/bend/mac-optimized.conf | 16 +- contrib/platform/intel/bend/mac-orcm.conf | 16 +- contrib/platform/intel/bend/mac.conf | 16 +- contrib/platform/iu/odin/debug-nopmi.conf | 18 +- contrib/platform/iu/odin/debug.conf | 16 +- contrib/platform/iu/odin/optimized.conf | 28 +- contrib/platform/iu/odin/static.conf | 28 +- .../platform/lanl/cray_xe6/debug-lustre.conf | 10 +- contrib/platform/lanl/cray_xe6/intel-common | 2 +- .../lanl/cray_xe6/optimized-lustre.conf | 12 +- contrib/platform/lanl/mac.conf | 6 +- .../platform/lanl/macosx-dynamic-java.conf | 6 +- .../lanl/macosx-dynamic-optimized.conf | 6 +- contrib/platform/lanl/macosx-dynamic.conf | 6 +- .../platform/lanl/macosx-static-leopard.conf | 6 +- contrib/platform/mellanox/optimized.conf | 6 +- contrib/platform/ornl/ornl_configure.gnu | 8 +- contrib/scaling/Makefile.include | 4 +- contrib/scaling/orte_no_op.c | 2 +- contrib/search_compare.pl | 12 +- contrib/search_replace.pl | 12 +- contrib/spread/spread.conf | 58 +- contrib/submit_test.pl | 20 +- contrib/test_headers_in_ompi.pl | 24 +- contrib/update-my-copyright.pl | 4 +- contrib/whitespace-purge.sh | 23 + examples/Hello.java | 6 +- examples/Makefile | 6 +- examples/Makefile.include | 6 +- examples/Ring.java | 18 +- examples/connectivity_c.c | 2 +- examples/dtrace/Makefile | 4 +- examples/dtrace/README | 220 +- examples/dtrace/mpicommcheck.d | 6 +- examples/dtrace/mpicommleak.c | 4 +- examples/dtrace/mpicount.d | 8 +- examples/dtrace/mpitrace.d | 4 +- examples/dtrace/mpitruss.d | 4 +- examples/dtrace/myppriv.sh | 2 +- ompi/Makefile.am | 10 +- ompi/attribute/Makefile.am | 6 +- ompi/attribute/attribute.c | 130 +- ompi/attribute/attribute.h | 116 +- ompi/attribute/attribute_predefined.c | 2 +- ompi/class/Makefile.am | 6 +- ompi/class/ompi_seq_tracker.c | 134 +- ompi/class/ompi_seq_tracker.h | 22 +- ompi/communicator/Makefile.am | 6 +- ompi/communicator/comm.c | 270 +-- ompi/communicator/comm_helpers.c | 4 +- ompi/communicator/comm_helpers.h | 2 +- ompi/communicator/comm_init.c | 44 +- ompi/communicator/communicator.h | 2 +- ompi/contrib/libompitrace/Makefile.am | 6 +- ompi/contrib/libompitrace/abort.c | 14 +- ompi/contrib/libompitrace/accumulate.c | 18 +- ompi/contrib/libompitrace/add_error_class.c | 14 +- ompi/contrib/libompitrace/add_error_code.c | 14 +- ompi/contrib/libompitrace/add_error_string.c | 10 +- ompi/contrib/libompitrace/address.c | 12 +- ompi/contrib/libompitrace/allgather.c | 14 +- ompi/contrib/libompitrace/allgatherv.c | 14 +- ompi/contrib/libompitrace/alloc_mem.c | 12 +- ompi/contrib/libompitrace/allreduce.c | 16 +- ompi/contrib/libompitrace/barrier.c | 16 +- ompi/contrib/libompitrace/bcast.c | 14 +- ompi/contrib/libompitrace/configure.m4 | 8 +- ompi/contrib/libompitrace/finalize.c | 10 +- ompi/contrib/libompitrace/init.c | 8 +- ompi/contrib/libompitrace/isend.c | 14 +- ompi/contrib/libompitrace/recv.c | 16 +- ompi/contrib/libompitrace/reduce.c | 14 +- ompi/contrib/libompitrace/request_free.c | 10 +- ompi/contrib/libompitrace/send.c | 14 +- ompi/contrib/libompitrace/sendrecv.c | 12 +- ompi/datatype/Makefile.am | 6 +- ompi/datatype/ompi_datatype_args.c | 2 +- ompi/datatype/ompi_datatype_external32.c | 4 +- ompi/datatype/ompi_datatype_get_elements.c | 6 +- ompi/datatype/ompi_datatype_module.c | 2 +- ompi/debuggers/MPI_Handles_interface.txt | 2 +- ompi/debuggers/Makefile.am | 6 +- ompi/debuggers/debuggers.h | 6 +- ompi/debuggers/dlopen_test.c | 2 +- ompi/debuggers/mpihandles_interface.h | 54 +- ompi/debuggers/msgq_interface.h | 62 +- ompi/debuggers/ompi_common_dll.c | 58 +- ompi/debuggers/ompi_common_dll_defs.h | 24 +- ompi/debuggers/ompi_debugger_canary.c | 6 +- ompi/debuggers/ompi_debuggers.c | 26 +- ompi/debuggers/ompi_mpihandles_dll.c | 164 +- ompi/debuggers/ompi_mpihandles_dll_defs.h | 4 +- ompi/debuggers/ompi_msgq_dll.c | 164 +- ompi/debuggers/ompi_msgq_dll_defs.h | 8 +- ompi/debuggers/predefined_gap_test.c | 8 +- ompi/debuggers/predefined_pad_test.c | 10 +- ompi/debuggers/tv-debugger-attach.txt | 24 +- ompi/errhandler/Makefile.am | 6 +- ompi/errhandler/errcode-internal.c | 8 +- ompi/errhandler/errcode-internal.h | 14 +- ompi/errhandler/errcode.c | 18 +- ompi/errhandler/errcode.h | 52 +- ompi/errhandler/errhandler.c | 40 +- ompi/errhandler/errhandler.h | 22 +- ompi/errhandler/errhandler_invoke.c | 44 +- ompi/errhandler/errhandler_predefined.c | 38 +- ompi/errhandler/errhandler_predefined.h | 6 +- ompi/errhandler/help-mpi-errors.txt | 6 +- ompi/etc/Makefile.am | 8 +- ompi/etc/openmpi-totalview.tcl | 6 +- ompi/file/Makefile.am | 6 +- ompi/file/file.c | 28 +- ompi/file/file.h | 18 +- ompi/group/Makefile.am | 8 +- ompi/group/group.c | 132 +- ompi/group/group.h | 66 +- ompi/group/group_bitmap.c | 48 +- ompi/group/group_dbg.h | 6 +- ompi/group/group_init.c | 42 +- ompi/group/group_plist.c | 30 +- ompi/group/group_set_rank.c | 6 +- ompi/group/group_sporadic.c | 96 +- ompi/group/group_strided.c | 34 +- ompi/include/Makefile.am | 10 +- ompi/include/mpi.h.in | 12 +- ompi/include/mpif-values.pl | 14 +- ompi/include/ompi/Makefile.am | 6 +- ompi/include/ompi/totalview.h | 6 +- ompi/include/ompi/types.h | 10 +- ompi/include/ompi/version.h.in | 6 +- ompi/info/Makefile.am | 6 +- ompi/info/info.c | 84 +- ompi/info/info.h | 2 +- ompi/mca/Makefile.am | 6 +- ompi/mca/bml/Makefile.am | 6 +- ompi/mca/bml/base/Makefile.am | 6 +- ompi/mca/bml/base/base.h | 12 +- ompi/mca/bml/base/bml_base_btl.c | 26 +- ompi/mca/bml/base/bml_base_btl.h | 8 +- ompi/mca/bml/base/bml_base_endpoint.c | 10 +- ompi/mca/bml/base/bml_base_frame.c | 12 +- ompi/mca/bml/base/bml_base_ft.c | 8 +- ompi/mca/bml/base/bml_base_init.c | 66 +- ompi/mca/bml/bml.h | 98 +- ompi/mca/bml/r2/Makefile.am | 6 +- ompi/mca/bml/r2/bml_r2.c | 184 +- ompi/mca/bml/r2/bml_r2.h | 26 +- ompi/mca/bml/r2/bml_r2_component.c | 20 +- ompi/mca/bml/r2/bml_r2_ft.c | 14 +- ompi/mca/bml/r2/bml_r2_ft.h | 8 +- ompi/mca/bml/r2/configure.m4 | 6 +- ompi/mca/bml/r2/help-mca-bml-r2.txt | 6 +- ompi/mca/coll/Makefile.am | 6 +- ompi/mca/coll/base/Makefile.am | 6 +- ompi/mca/coll/base/base.h | 6 +- ompi/mca/coll/base/coll_base_comm_select.c | 8 +- ompi/mca/coll/base/coll_base_comm_unselect.c | 10 +- ompi/mca/coll/base/coll_base_find_available.c | 8 +- ompi/mca/coll/base/coll_base_util.c | 14 +- ompi/mca/coll/base/coll_tags.h | 6 +- ompi/mca/coll/base/help-mca-coll-base.txt | 10 +- ompi/mca/coll/basic/Makefile.am | 6 +- ompi/mca/coll/basic/coll_basic.h | 6 +- ompi/mca/coll/basic/coll_basic_allgather.c | 14 +- ompi/mca/coll/basic/coll_basic_allgatherv.c | 6 +- ompi/mca/coll/basic/coll_basic_allreduce.c | 12 +- ompi/mca/coll/basic/coll_basic_alltoall.c | 8 +- ompi/mca/coll/basic/coll_basic_alltoallv.c | 6 +- ompi/mca/coll/basic/coll_basic_alltoallw.c | 10 +- ompi/mca/coll/basic/coll_basic_barrier.c | 6 +- ompi/mca/coll/basic/coll_basic_bcast.c | 6 +- ompi/mca/coll/basic/coll_basic_component.c | 6 +- ompi/mca/coll/basic/coll_basic_exscan.c | 8 +- ompi/mca/coll/basic/coll_basic_gather.c | 6 +- ompi/mca/coll/basic/coll_basic_gatherv.c | 6 +- ompi/mca/coll/basic/coll_basic_module.c | 8 +- .../coll/basic/coll_basic_reduce_scatter.c | 34 +- .../basic/coll_basic_reduce_scatter_block.c | 14 +- ompi/mca/coll/basic/coll_basic_scan.c | 6 +- ompi/mca/coll/basic/coll_basic_scatter.c | 6 +- ompi/mca/coll/basic/coll_basic_scatterv.c | 6 +- ompi/mca/coll/coll.h | 2 +- ompi/mca/coll/cuda/Makefile.am | 4 +- ompi/mca/coll/cuda/coll_cuda.h | 4 +- ompi/mca/coll/cuda/coll_cuda_allreduce.c | 4 +- ompi/mca/coll/cuda/coll_cuda_component.c | 4 +- ompi/mca/coll/cuda/coll_cuda_module.c | 10 +- .../cuda/coll_cuda_reduce_scatter_block.c | 6 +- ompi/mca/coll/cuda/coll_cuda_scan.c | 4 +- ompi/mca/coll/cuda/help-mpi-coll-cuda.txt | 6 +- ompi/mca/coll/demo/Makefile.am | 6 +- ompi/mca/coll/demo/coll_demo.h | 216 +- ompi/mca/coll/demo/coll_demo_allgather.c | 20 +- ompi/mca/coll/demo/coll_demo_allgatherv.c | 22 +- ompi/mca/coll/demo/coll_demo_allreduce.c | 8 +- ompi/mca/coll/demo/coll_demo_alltoall.c | 22 +- ompi/mca/coll/demo/coll_demo_alltoallv.c | 10 +- ompi/mca/coll/demo/coll_demo_alltoallw.c | 10 +- ompi/mca/coll/demo/coll_demo_barrier.c | 6 +- ompi/mca/coll/demo/coll_demo_bcast.c | 6 +- ompi/mca/coll/demo/coll_demo_component.c | 38 +- ompi/mca/coll/demo/coll_demo_exscan.c | 10 +- ompi/mca/coll/demo/coll_demo_gather.c | 20 +- ompi/mca/coll/demo/coll_demo_gatherv.c | 8 +- ompi/mca/coll/demo/coll_demo_module.c | 40 +- ompi/mca/coll/demo/coll_demo_reduce.c | 12 +- ompi/mca/coll/demo/coll_demo_reduce_scatter.c | 6 +- ompi/mca/coll/demo/coll_demo_scan.c | 10 +- ompi/mca/coll/demo/coll_demo_scatter.c | 18 +- ompi/mca/coll/demo/coll_demo_scatterv.c | 10 +- ompi/mca/coll/demo/configure.stub | 6 +- ompi/mca/coll/fca/Makefile.am | 2 +- ompi/mca/coll/fca/coll_fca.h | 4 +- ompi/mca/coll/fca/coll_fca_component.c | 2040 ++++++++--------- ompi/mca/coll/fca/coll_fca_module.c | 24 +- ompi/mca/coll/hcoll/coll_hcoll_component.c | 4 +- ompi/mca/coll/hcoll/coll_hcoll_rte.c | 2 +- ompi/mca/coll/inter/Makefile.am | 6 +- ompi/mca/coll/inter/coll_inter.c | 32 +- ompi/mca/coll/inter/coll_inter.h | 66 +- ompi/mca/coll/inter/coll_inter_allgather.c | 16 +- ompi/mca/coll/inter/coll_inter_allgatherv.c | 20 +- ompi/mca/coll/inter/coll_inter_allreduce.c | 16 +- ompi/mca/coll/inter/coll_inter_bcast.c | 10 +- ompi/mca/coll/inter/coll_inter_component.c | 6 +- ompi/mca/coll/inter/coll_inter_gather.c | 18 +- ompi/mca/coll/inter/coll_inter_reduce.c | 8 +- ompi/mca/coll/inter/coll_inter_scatter.c | 16 +- ompi/mca/coll/inter/coll_inter_scatterv.c | 14 +- ompi/mca/coll/libnbc/Makefile.am | 6 +- ompi/mca/coll/libnbc/coll_libnbc.h | 82 +- ompi/mca/coll/libnbc/coll_libnbc_component.c | 14 +- .../coll_libnbc_ireduce_scatter_block.c | 24 +- ompi/mca/coll/libnbc/nbc.c | 66 +- ompi/mca/coll/libnbc/nbc_iallgather.c | 18 +- ompi/mca/coll/libnbc/nbc_iallgatherv.c | 24 +- ompi/mca/coll/libnbc/nbc_ialltoall.c | 42 +- ompi/mca/coll/libnbc/nbc_ialltoallv.c | 8 +- ompi/mca/coll/libnbc/nbc_ibcast.c | 34 +- ompi/mca/coll/libnbc/nbc_ibcast_inter.c | 10 +- ompi/mca/coll/libnbc/nbc_igatherv.c | 6 +- ompi/mca/coll/libnbc/nbc_internal.h | 44 +- ompi/mca/coll/libnbc/nbc_ireduce.c | 36 +- ompi/mca/coll/libnbc/nbc_ireduce_scatter.c | 20 +- ompi/mca/coll/libnbc/nbc_iscan.c | 16 +- ompi/mca/coll/portals4/Makefile.am | 4 +- .../coll/portals4/coll_portals4_component.c | 2 +- ompi/mca/coll/portals4/configure.m4 | 6 +- ompi/mca/coll/self/Makefile.am | 6 +- ompi/mca/coll/self/coll_self.h | 110 +- ompi/mca/coll/self/coll_self_allgather.c | 12 +- ompi/mca/coll/self/coll_self_allgatherv.c | 16 +- ompi/mca/coll/self/coll_self_allreduce.c | 8 +- ompi/mca/coll/self/coll_self_alltoall.c | 12 +- ompi/mca/coll/self/coll_self_alltoallv.c | 14 +- ompi/mca/coll/self/coll_self_alltoallw.c | 16 +- ompi/mca/coll/self/coll_self_barrier.c | 6 +- ompi/mca/coll/self/coll_self_bcast.c | 6 +- ompi/mca/coll/self/coll_self_component.c | 6 +- ompi/mca/coll/self/coll_self_exscan.c | 10 +- ompi/mca/coll/self/coll_self_gather.c | 16 +- ompi/mca/coll/self/coll_self_gatherv.c | 14 +- ompi/mca/coll/self/coll_self_module.c | 10 +- ompi/mca/coll/self/coll_self_reduce.c | 10 +- ompi/mca/coll/self/coll_self_reduce_scatter.c | 6 +- ompi/mca/coll/self/coll_self_scan.c | 10 +- ompi/mca/coll/self/coll_self_scatter.c | 12 +- ompi/mca/coll/self/coll_self_scatterv.c | 10 +- ompi/mca/coll/sm/Makefile.am | 6 +- ompi/mca/coll/sm/coll_sm.h | 144 +- ompi/mca/coll/sm/coll_sm_allgather.c | 6 +- ompi/mca/coll/sm/coll_sm_allgatherv.c | 14 +- ompi/mca/coll/sm/coll_sm_allreduce.c | 14 +- ompi/mca/coll/sm/coll_sm_alltoall.c | 8 +- ompi/mca/coll/sm/coll_sm_alltoallv.c | 8 +- ompi/mca/coll/sm/coll_sm_alltoallw.c | 10 +- ompi/mca/coll/sm/coll_sm_barrier.c | 10 +- ompi/mca/coll/sm/coll_sm_bcast.c | 58 +- ompi/mca/coll/sm/coll_sm_component.c | 18 +- ompi/mca/coll/sm/coll_sm_exscan.c | 10 +- ompi/mca/coll/sm/coll_sm_gather.c | 8 +- ompi/mca/coll/sm/coll_sm_gatherv.c | 8 +- ompi/mca/coll/sm/coll_sm_reduce.c | 132 +- ompi/mca/coll/sm/coll_sm_reduce_scatter.c | 6 +- ompi/mca/coll/sm/coll_sm_scan.c | 10 +- ompi/mca/coll/sm/coll_sm_scatter.c | 8 +- ompi/mca/coll/sm/coll_sm_scatterv.c | 6 +- ompi/mca/coll/sm/help-mpi-coll-sm.txt | 6 +- ompi/mca/coll/tuned/Makefile.am | 6 +- ompi/mca/coll/tuned/coll_tuned.h | 18 +- ompi/mca/coll/tuned/coll_tuned_component.c | 16 +- ompi/mca/coll/tuned/coll_tuned_dynamic_file.h | 6 +- .../mca/coll/tuned/coll_tuned_dynamic_rules.h | 12 +- ompi/mca/common/Makefile.am | 6 +- ompi/mca/crcp/Makefile.am | 6 +- ompi/mca/crcp/base/Makefile.am | 6 +- ompi/mca/crcp/base/base.h | 32 +- ompi/mca/crcp/base/crcp_base_fns.c | 12 +- ompi/mca/crcp/base/crcp_base_frame.c | 6 +- ompi/mca/crcp/base/crcp_base_select.c | 22 +- ompi/mca/crcp/bkmrk/Makefile.am | 6 +- ompi/mca/crcp/bkmrk/configure.m4 | 6 +- ompi/mca/crcp/bkmrk/crcp_bkmrk.h | 8 +- ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.c | 6 +- ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.h | 10 +- ompi/mca/crcp/bkmrk/crcp_bkmrk_component.c | 16 +- ompi/mca/crcp/bkmrk/crcp_bkmrk_module.c | 6 +- ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c | 124 +- ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.h | 96 +- ompi/mca/crcp/crcp.h | 26 +- ompi/mca/crcp/ompi_crcp.7in | 4 +- ompi/mca/dpm/Makefile.am | 6 +- ompi/mca/dpm/base/Makefile.am | 6 +- ompi/mca/dpm/base/base.h | 6 +- ompi/mca/dpm/base/dpm_base_common_fns.c | 4 +- ompi/mca/dpm/base/dpm_base_frame.c | 8 +- ompi/mca/dpm/base/dpm_base_null_fns.c | 2 +- ompi/mca/dpm/base/dpm_base_select.c | 8 +- ompi/mca/dpm/dpm.h | 8 +- ompi/mca/dpm/orte/Makefile.am | 6 +- ompi/mca/dpm/orte/configure.m4 | 4 +- ompi/mca/dpm/orte/dpm_orte.c | 136 +- ompi/mca/dpm/orte/dpm_orte.h | 8 +- ompi/mca/dpm/orte/dpm_orte_component.c | 8 +- ompi/mca/dpm/orte/help-ompi-dpm-orte.txt | 6 +- ompi/mca/fbtl/Makefile.am | 6 +- ompi/mca/fbtl/base/Makefile.am | 6 +- ompi/mca/fbtl/base/base.h | 8 +- ompi/mca/fbtl/base/fbtl_base_file_select.c | 58 +- ompi/mca/fbtl/base/fbtl_base_file_unselect.c | 6 +- ompi/mca/fbtl/base/fbtl_base_find_available.c | 28 +- ompi/mca/fbtl/base/fbtl_base_frame.c | 6 +- ompi/mca/fbtl/configure.m4 | 6 +- ompi/mca/fbtl/fbtl.h | 24 +- ompi/mca/fbtl/plfs/Makefile.am | 6 +- ompi/mca/fbtl/plfs/configure.m4 | 8 +- ompi/mca/fbtl/plfs/fbtl_plfs.c | 14 +- ompi/mca/fbtl/plfs/fbtl_plfs.h | 12 +- ompi/mca/fbtl/plfs/fbtl_plfs_component.c | 6 +- ompi/mca/fbtl/plfs/fbtl_plfs_ipreadv.c | 6 +- ompi/mca/fbtl/plfs/fbtl_plfs_ipwritev.c | 6 +- ompi/mca/fbtl/plfs/fbtl_plfs_preadv.c | 28 +- ompi/mca/fbtl/plfs/fbtl_plfs_pwritev.c | 32 +- ompi/mca/fbtl/posix/Makefile.am | 6 +- ompi/mca/fbtl/posix/configure.m4 | 8 +- ompi/mca/fbtl/posix/fbtl_posix.c | 28 +- ompi/mca/fbtl/posix/fbtl_posix.h | 14 +- ompi/mca/fbtl/posix/fbtl_posix_component.c | 6 +- ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c | 12 +- ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c | 14 +- ompi/mca/fbtl/posix/fbtl_posix_preadv.c | 26 +- ompi/mca/fbtl/posix/fbtl_posix_pwritev.c | 26 +- ompi/mca/fbtl/pvfs2/Makefile.am | 6 +- ompi/mca/fbtl/pvfs2/configure.m4 | 8 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c | 16 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h | 12 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_component.c | 6 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c | 6 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c | 6 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c | 44 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c | 48 +- ompi/mca/fcoll/Makefile.am | 6 +- ompi/mca/fcoll/base/Makefile.am | 6 +- ompi/mca/fcoll/base/base.h | 10 +- ompi/mca/fcoll/base/fcoll_base_file_select.c | 60 +- .../mca/fcoll/base/fcoll_base_file_unselect.c | 6 +- .../fcoll/base/fcoll_base_find_available.c | 28 +- ompi/mca/fcoll/base/fcoll_base_frame.c | 6 +- ompi/mca/fcoll/configure.m4 | 6 +- ompi/mca/fcoll/dynamic/Makefile.am | 8 +- ompi/mca/fcoll/dynamic/fcoll_dynamic.h | 18 +- .../fcoll/dynamic/fcoll_dynamic_component.c | 6 +- .../dynamic/fcoll_dynamic_file_read_all.c | 176 +- .../dynamic/fcoll_dynamic_file_write_all.c | 300 +-- ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c | 14 +- ompi/mca/fcoll/fcoll.h | 22 +- ompi/mca/fcoll/individual/Makefile.am | 6 +- ompi/mca/fcoll/individual/fcoll_individual.h | 18 +- .../individual/fcoll_individual_component.c | 6 +- .../fcoll_individual_file_read_all.c | 8 +- .../fcoll_individual_file_write_all.c | 8 +- .../individual/fcoll_individual_module.c | 16 +- ompi/mca/fcoll/static/Makefile.am | 8 +- ompi/mca/fcoll/static/fcoll_static.h | 18 +- .../mca/fcoll/static/fcoll_static_component.c | 6 +- .../fcoll/static/fcoll_static_file_read_all.c | 220 +- .../static/fcoll_static_file_write_all.c | 254 +- ompi/mca/fcoll/static/fcoll_static_module.c | 14 +- ompi/mca/fcoll/two_phase/Makefile.am | 8 +- ompi/mca/fcoll/two_phase/fcoll_two_phase.h | 22 +- .../two_phase/fcoll_two_phase_component.c | 6 +- .../two_phase/fcoll_two_phase_file_read_all.c | 442 ++-- .../fcoll_two_phase_file_write_all.c | 510 ++--- .../fcoll/two_phase/fcoll_two_phase_module.c | 14 +- .../two_phase/fcoll_two_phase_support_fns.c | 162 +- ompi/mca/fs/Makefile.am | 6 +- ompi/mca/fs/base/Makefile.am | 6 +- ompi/mca/fs/base/base.h | 8 +- ompi/mca/fs/base/fs_base_file_select.c | 52 +- ompi/mca/fs/base/fs_base_file_unselect.c | 6 +- ompi/mca/fs/base/fs_base_find_available.c | 28 +- ompi/mca/fs/base/fs_base_frame.c | 6 +- ompi/mca/fs/base/fs_base_get_parent_dir.c | 8 +- ompi/mca/fs/configure.m4 | 6 +- ompi/mca/fs/fs.h | 20 +- ompi/mca/fs/lustre/Makefile.am | 6 +- ompi/mca/fs/lustre/configure.m4 | 8 +- ompi/mca/fs/lustre/fs_lustre.c | 32 +- ompi/mca/fs/lustre/fs_lustre.h | 22 +- ompi/mca/fs/lustre/fs_lustre_component.c | 8 +- ompi/mca/fs/lustre/fs_lustre_file_close.c | 8 +- ompi/mca/fs/lustre/fs_lustre_file_delete.c | 6 +- ompi/mca/fs/lustre/fs_lustre_file_get_size.c | 6 +- ompi/mca/fs/lustre/fs_lustre_file_open.c | 12 +- ompi/mca/fs/lustre/fs_lustre_file_set_size.c | 6 +- ompi/mca/fs/lustre/fs_lustre_file_sync.c | 8 +- ompi/mca/fs/plfs/Makefile.am | 8 +- ompi/mca/fs/plfs/configure.m4 | 8 +- ompi/mca/fs/plfs/fs_plfs.c | 36 +- ompi/mca/fs/plfs/fs_plfs.h | 22 +- ompi/mca/fs/plfs/fs_plfs_component.c | 6 +- ompi/mca/fs/plfs/fs_plfs_file_close.c | 16 +- ompi/mca/fs/plfs/fs_plfs_file_delete.c | 6 +- ompi/mca/fs/plfs/fs_plfs_file_get_size.c | 10 +- ompi/mca/fs/plfs/fs_plfs_file_open.c | 18 +- ompi/mca/fs/plfs/fs_plfs_file_set_size.c | 6 +- ompi/mca/fs/plfs/fs_plfs_file_sync.c | 6 +- ompi/mca/fs/pvfs2/Makefile.am | 8 +- ompi/mca/fs/pvfs2/configure.m4 | 8 +- ompi/mca/fs/pvfs2/fs_pvfs2.c | 32 +- ompi/mca/fs/pvfs2/fs_pvfs2.h | 22 +- ompi/mca/fs/pvfs2/fs_pvfs2_component.c | 6 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c | 10 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c | 8 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c | 8 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c | 102 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c | 10 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c | 8 +- ompi/mca/fs/ufs/Makefile.am | 6 +- ompi/mca/fs/ufs/fs_ufs.c | 20 +- ompi/mca/fs/ufs/fs_ufs.h | 22 +- ompi/mca/fs/ufs/fs_ufs_component.c | 6 +- ompi/mca/fs/ufs/fs_ufs_file_close.c | 8 +- ompi/mca/fs/ufs/fs_ufs_file_delete.c | 6 +- ompi/mca/fs/ufs/fs_ufs_file_get_size.c | 8 +- ompi/mca/fs/ufs/fs_ufs_file_open.c | 10 +- ompi/mca/fs/ufs/fs_ufs_file_set_size.c | 6 +- ompi/mca/fs/ufs/fs_ufs_file_sync.c | 6 +- ompi/mca/io/Makefile.am | 6 +- ompi/mca/io/base/Makefile.am | 6 +- ompi/mca/io/base/base.h | 14 +- ompi/mca/io/base/io_base_delete.c | 46 +- ompi/mca/io/base/io_base_file_select.c | 80 +- ompi/mca/io/base/io_base_find_available.c | 36 +- ompi/mca/io/base/io_base_frame.c | 6 +- ompi/mca/io/base/io_base_register_datarep.c | 8 +- ompi/mca/io/base/io_base_request.c | 6 +- ompi/mca/io/base/io_base_request.h | 6 +- ompi/mca/io/configure.m4 | 10 +- ompi/mca/io/io.h | 78 +- ompi/mca/io/ompio/Makefile.am | 6 +- ompi/mca/io/ompio/io_ompio.c | 404 ++-- ompi/mca/io/ompio/io_ompio.h | 104 +- ompi/mca/io/ompio/io_ompio_coll_array.c | 118 +- ompi/mca/io/ompio/io_ompio_component.c | 22 +- ompi/mca/io/ompio/io_ompio_file_open.c | 100 +- ompi/mca/io/ompio/io_ompio_file_read.c | 120 +- ompi/mca/io/ompio/io_ompio_file_set_view.c | 58 +- ompi/mca/io/ompio/io_ompio_file_write.c | 176 +- ompi/mca/io/ompio/io_ompio_module.c | 6 +- ompi/mca/io/ompio/io_ompio_nbc.c | 74 +- ompi/mca/io/ompio/io_ompio_nbc.h | 26 +- ompi/mca/io/ompio/io_ompio_request.c | 12 +- ompi/mca/io/ompio/io_ompio_request.h | 8 +- ompi/mca/io/romio314/ompi.patch | 114 +- ompi/mca/io/romio314/romio/.codingcheck | 10 +- ompi/mca/io/romio314/romio/COPYRIGHT | 12 +- ompi/mca/io/romio314/romio/Makefile.am | 12 +- ompi/mca/io/romio314/romio/README | 174 +- .../io/romio314/romio/adio/ad_gpfs/ad_gpfs.c | 4 +- .../io/romio314/romio/adio/ad_gpfs/ad_gpfs.h | 4 +- .../romio/adio/ad_gpfs/ad_gpfs_aggrs.h | 164 +- .../romio/adio/ad_gpfs/ad_gpfs_close.c | 4 +- .../romio/adio/ad_gpfs/ad_gpfs_flush.c | 4 +- .../romio/adio/ad_gpfs/ad_gpfs_open.c | 8 +- .../romio/adio/ad_gpfs/ad_gpfs_rdcoll.c | 244 +- .../romio/adio/ad_gpfs/ad_gpfs_wrcoll.c | 320 +-- .../romio/adio/ad_gpfs/bg/Makefile.mk | 2 +- .../romio/adio/ad_gpfs/bg/ad_bg_aggrs.c | 68 +- .../romio/adio/ad_gpfs/bg/ad_bg_aggrs.h | 2 +- .../romio/adio/ad_gpfs/bg/ad_bg_pset.c | 68 +- .../romio/adio/ad_gridftp/ad_gridftp.c | 4 +- .../romio/adio/ad_gridftp/ad_gridftp.h | 32 +- .../romio/adio/ad_gridftp/ad_gridftp_close.c | 4 +- .../romio/adio/ad_gridftp/ad_gridftp_delete.c | 18 +- .../romio/adio/ad_gridftp/ad_gridftp_fcntl.c | 10 +- .../romio/adio/ad_gridftp/ad_gridftp_flush.c | 4 +- .../romio/adio/ad_gridftp/ad_gridftp_hints.c | 18 +- .../romio/adio/ad_gridftp/ad_gridftp_open.c | 40 +- .../romio/adio/ad_gridftp/ad_gridftp_read.c | 38 +- .../romio/adio/ad_gridftp/ad_gridftp_resize.c | 34 +- .../romio/adio/ad_gridftp/ad_gridftp_write.c | 16 +- .../romio/adio/ad_gridftp/globus_routines.c | 4 +- .../io/romio314/romio/adio/ad_hfs/ad_hfs.c | 4 +- .../io/romio314/romio/adio/ad_hfs/ad_hfs.h | 12 +- .../romio314/romio/adio/ad_hfs/ad_hfs_fcntl.c | 18 +- .../romio314/romio/adio/ad_hfs/ad_hfs_open.c | 8 +- .../romio314/romio/adio/ad_hfs/ad_hfs_read.c | 16 +- .../romio/adio/ad_hfs/ad_hfs_resize.c | 8 +- .../romio314/romio/adio/ad_hfs/ad_hfs_write.c | 10 +- .../io/romio314/romio/adio/ad_lustre/README | 22 +- .../adio/ad_lustre/ad_lustre_aggregate.c | 16 +- .../romio/adio/ad_lustre/ad_lustre_fcntl.c | 38 +- .../romio/adio/ad_lustre/ad_lustre_hints.c | 2 +- .../romio/adio/ad_lustre/ad_lustre_open.c | 2 +- .../romio/adio/ad_lustre/ad_lustre_rwcontig.c | 12 +- .../romio/adio/ad_lustre/ad_lustre_wrcoll.c | 6 +- .../io/romio314/romio/adio/ad_nfs/ad_nfs.c | 4 +- .../io/romio314/romio/adio/ad_nfs/ad_nfs.h | 24 +- .../romio314/romio/adio/ad_nfs/ad_nfs_done.c | 6 +- .../romio314/romio/adio/ad_nfs/ad_nfs_fcntl.c | 6 +- .../romio/adio/ad_nfs/ad_nfs_features.c | 2 +- .../romio314/romio/adio/ad_nfs/ad_nfs_getsh.c | 12 +- .../romio314/romio/adio/ad_nfs/ad_nfs_hints.c | 6 +- .../romio314/romio/adio/ad_nfs/ad_nfs_iread.c | 8 +- .../romio/adio/ad_nfs/ad_nfs_iwrite.c | 14 +- .../romio314/romio/adio/ad_nfs/ad_nfs_open.c | 6 +- .../romio314/romio/adio/ad_nfs/ad_nfs_read.c | 50 +- .../romio/adio/ad_nfs/ad_nfs_resize.c | 4 +- .../romio314/romio/adio/ad_nfs/ad_nfs_setsh.c | 16 +- .../romio314/romio/adio/ad_nfs/ad_nfs_wait.c | 4 +- .../romio314/romio/adio/ad_nfs/ad_nfs_write.c | 66 +- .../io/romio314/romio/adio/ad_ntfs/ad_ntfs.c | 4 +- .../io/romio314/romio/adio/ad_ntfs/ad_ntfs.h | 24 +- .../romio/adio/ad_ntfs/ad_ntfs_close.c | 4 +- .../romio/adio/ad_ntfs/ad_ntfs_done.c | 4 +- .../romio/adio/ad_ntfs/ad_ntfs_fcntl.c | 6 +- .../romio/adio/ad_ntfs/ad_ntfs_flush.c | 4 +- .../romio/adio/ad_ntfs/ad_ntfs_iread.c | 8 +- .../romio/adio/ad_ntfs/ad_ntfs_iwrite.c | 56 +- .../romio/adio/ad_ntfs/ad_ntfs_open.c | 14 +- .../romio/adio/ad_ntfs/ad_ntfs_read.c | 12 +- .../romio/adio/ad_ntfs/ad_ntfs_resize.c | 4 +- .../romio/adio/ad_ntfs/ad_ntfs_wait.c | 6 +- .../romio/adio/ad_ntfs/ad_ntfs_write.c | 10 +- .../romio314/romio/adio/ad_panfs/ad_panfs.c | 2 +- .../romio314/romio/adio/ad_panfs/ad_panfs.h | 4 +- .../romio/adio/ad_panfs/ad_panfs_hints.c | 12 +- .../romio/adio/ad_panfs/ad_panfs_open.c | 32 +- .../romio/adio/ad_panfs/ad_panfs_read.c | 8 +- .../romio/adio/ad_panfs/ad_panfs_resize.c | 4 +- .../romio/adio/ad_panfs/ad_panfs_write.c | 8 +- .../io/romio314/romio/adio/ad_pfs/ad_pfs.c | 4 +- .../io/romio314/romio/adio/ad_pfs/ad_pfs.h | 26 +- .../romio314/romio/adio/ad_pfs/ad_pfs_done.c | 12 +- .../romio314/romio/adio/ad_pfs/ad_pfs_fcntl.c | 14 +- .../romio314/romio/adio/ad_pfs/ad_pfs_flush.c | 4 +- .../romio314/romio/adio/ad_pfs/ad_pfs_hints.c | 42 +- .../romio314/romio/adio/ad_pfs/ad_pfs_iread.c | 8 +- .../romio/adio/ad_pfs/ad_pfs_iwrite.c | 10 +- .../romio314/romio/adio/ad_pfs/ad_pfs_open.c | 12 +- .../romio314/romio/adio/ad_pfs/ad_pfs_read.c | 12 +- .../romio314/romio/adio/ad_pfs/ad_pfs_wait.c | 8 +- .../romio314/romio/adio/ad_pfs/ad_pfs_write.c | 8 +- .../romio314/romio/adio/ad_piofs/ad_piofs.c | 6 +- .../romio314/romio/adio/ad_piofs/ad_piofs.h | 12 +- .../romio/adio/ad_piofs/ad_piofs_fcntl.c | 16 +- .../romio/adio/ad_piofs/ad_piofs_hints.c | 24 +- .../romio/adio/ad_piofs/ad_piofs_open.c | 6 +- .../romio/adio/ad_piofs/ad_piofs_read.c | 14 +- .../romio/adio/ad_piofs/ad_piofs_write.c | 42 +- .../io/romio314/romio/adio/ad_pvfs/ad_pvfs.c | 4 +- .../io/romio314/romio/adio/ad_pvfs/ad_pvfs.h | 12 +- .../romio/adio/ad_pvfs/ad_pvfs_close.c | 4 +- .../romio/adio/ad_pvfs/ad_pvfs_delete.c | 4 +- .../romio/adio/ad_pvfs/ad_pvfs_fcntl.c | 6 +- .../romio/adio/ad_pvfs/ad_pvfs_flush.c | 6 +- .../romio/adio/ad_pvfs/ad_pvfs_hints.c | 34 +- .../romio/adio/ad_pvfs/ad_pvfs_open.c | 10 +- .../romio/adio/ad_pvfs/ad_pvfs_read.c | 118 +- .../romio/adio/ad_pvfs/ad_pvfs_resize.c | 4 +- .../romio/adio/ad_pvfs/ad_pvfs_write.c | 138 +- .../romio314/romio/adio/ad_pvfs2/ad_pvfs2.c | 8 +- .../romio314/romio/adio/ad_pvfs2/ad_pvfs2.h | 14 +- .../romio/adio/ad_pvfs2/ad_pvfs2_aio.c | 38 +- .../romio/adio/ad_pvfs2/ad_pvfs2_close.c | 8 +- .../romio/adio/ad_pvfs2/ad_pvfs2_common.c | 18 +- .../romio/adio/ad_pvfs2/ad_pvfs2_common.h | 4 +- .../romio/adio/ad_pvfs2/ad_pvfs2_delete.c | 12 +- .../romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c | 10 +- .../romio/adio/ad_pvfs2/ad_pvfs2_flush.c | 18 +- .../romio/adio/ad_pvfs2/ad_pvfs2_hints.c | 12 +- .../romio/adio/ad_pvfs2/ad_pvfs2_io.h | 4 +- .../romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c | 148 +- .../romio/adio/ad_pvfs2/ad_pvfs2_io_list.c | 140 +- .../romio/adio/ad_pvfs2/ad_pvfs2_open.c | 44 +- .../romio/adio/ad_pvfs2/ad_pvfs2_read.c | 22 +- .../ad_pvfs2/ad_pvfs2_read_list_classic.c | 152 +- .../romio/adio/ad_pvfs2/ad_pvfs2_resize.c | 12 +- .../romio/adio/ad_pvfs2/ad_pvfs2_write.c | 10 +- .../ad_pvfs2/ad_pvfs2_write_list_classic.c | 150 +- .../io/romio314/romio/adio/ad_sfs/ad_sfs.c | 4 +- .../io/romio314/romio/adio/ad_sfs/ad_sfs.h | 6 +- .../romio314/romio/adio/ad_sfs/ad_sfs_fcntl.c | 16 +- .../romio314/romio/adio/ad_sfs/ad_sfs_flush.c | 8 +- .../romio314/romio/adio/ad_sfs/ad_sfs_open.c | 6 +- .../romio314/romio/adio/ad_testfs/ad_testfs.c | 4 +- .../romio314/romio/adio/ad_testfs/ad_testfs.h | 28 +- .../romio/adio/ad_testfs/ad_testfs_close.c | 6 +- .../romio/adio/ad_testfs/ad_testfs_delete.c | 6 +- .../romio/adio/ad_testfs/ad_testfs_done.c | 10 +- .../romio/adio/ad_testfs/ad_testfs_fcntl.c | 10 +- .../romio/adio/ad_testfs/ad_testfs_flush.c | 6 +- .../romio/adio/ad_testfs/ad_testfs_getsh.c | 10 +- .../romio/adio/ad_testfs/ad_testfs_hints.c | 8 +- .../romio/adio/ad_testfs/ad_testfs_iread.c | 20 +- .../romio/adio/ad_testfs/ad_testfs_iwrite.c | 16 +- .../romio/adio/ad_testfs/ad_testfs_open.c | 6 +- .../romio/adio/ad_testfs/ad_testfs_rdcoll.c | 12 +- .../romio/adio/ad_testfs/ad_testfs_read.c | 14 +- .../romio/adio/ad_testfs/ad_testfs_resize.c | 6 +- .../romio/adio/ad_testfs/ad_testfs_seek.c | 14 +- .../romio/adio/ad_testfs/ad_testfs_setsh.c | 8 +- .../romio/adio/ad_testfs/ad_testfs_wait.c | 8 +- .../romio/adio/ad_testfs/ad_testfs_wrcoll.c | 10 +- .../romio/adio/ad_testfs/ad_testfs_write.c | 16 +- .../io/romio314/romio/adio/ad_ufs/ad_ufs.c | 4 +- .../io/romio314/romio/adio/ad_ufs/ad_ufs.h | 20 +- .../romio314/romio/adio/ad_ufs/ad_ufs_open.c | 6 +- .../io/romio314/romio/adio/ad_xfs/ad_xfs.c | 4 +- .../io/romio314/romio/adio/ad_xfs/ad_xfs.h | 10 +- .../romio314/romio/adio/ad_xfs/ad_xfs_fcntl.c | 4 +- .../romio314/romio/adio/ad_xfs/ad_xfs_hints.c | 10 +- .../romio314/romio/adio/ad_xfs/ad_xfs_open.c | 6 +- .../romio314/romio/adio/ad_xfs/ad_xfs_read.c | 22 +- .../romio/adio/ad_xfs/ad_xfs_resize.c | 6 +- .../romio314/romio/adio/ad_xfs/ad_xfs_write.c | 18 +- .../romio314/romio/adio/ad_zoidfs/ad_zoidfs.c | 8 +- .../romio314/romio/adio/ad_zoidfs/ad_zoidfs.h | 12 +- .../romio/adio/ad_zoidfs/ad_zoidfs_close.c | 8 +- .../romio/adio/ad_zoidfs/ad_zoidfs_common.c | 16 +- .../romio/adio/ad_zoidfs/ad_zoidfs_common.h | 8 +- .../romio/adio/ad_zoidfs/ad_zoidfs_delete.c | 10 +- .../romio/adio/ad_zoidfs/ad_zoidfs_fcntl.c | 8 +- .../romio/adio/ad_zoidfs/ad_zoidfs_flush.c | 18 +- .../romio/adio/ad_zoidfs/ad_zoidfs_io.c | 18 +- .../romio/adio/ad_zoidfs/ad_zoidfs_open.c | 20 +- .../adio/ad_zoidfs/ad_zoidfs_read_list.c | 136 +- .../romio/adio/ad_zoidfs/ad_zoidfs_resize.c | 6 +- .../adio/ad_zoidfs/ad_zoidfs_write_list.c | 156 +- .../romio314/romio/adio/common/ad_aggregate.c | 126 +- .../romio/adio/common/ad_aggregate_new.c | 16 +- .../io/romio314/romio/adio/common/ad_close.c | 8 +- .../romio/adio/common/ad_coll_build_req_new.c | 408 ++-- .../romio/adio/common/ad_coll_exch_new.c | 62 +- .../io/romio314/romio/adio/common/ad_darray.c | 60 +- .../io/romio314/romio/adio/common/ad_delete.c | 4 +- .../io/romio314/romio/adio/common/ad_done.c | 8 +- .../romio314/romio/adio/common/ad_done_fake.c | 4 +- .../io/romio314/romio/adio/common/ad_end.c | 6 +- .../io/romio314/romio/adio/common/ad_fcntl.c | 4 +- .../io/romio314/romio/adio/common/ad_flush.c | 4 +- .../io/romio314/romio/adio/common/ad_fstype.c | 44 +- .../romio314/romio/adio/common/ad_get_sh_fp.c | 20 +- .../io/romio314/romio/adio/common/ad_hints.c | 30 +- .../io/romio314/romio/adio/common/ad_init.c | 12 +- .../romio314/romio/adio/common/ad_io_coll.c | 74 +- .../io/romio314/romio/adio/common/ad_iopen.c | 8 +- .../io/romio314/romio/adio/common/ad_iread.c | 18 +- .../romio/adio/common/ad_iread_fake.c | 18 +- .../io/romio314/romio/adio/common/ad_iwrite.c | 72 +- .../romio/adio/common/ad_iwrite_fake.c | 12 +- .../io/romio314/romio/adio/common/ad_open.c | 34 +- .../romio314/romio/adio/common/ad_opencoll.c | 36 +- .../romio/adio/common/ad_opencoll_failsafe.c | 20 +- .../romio/adio/common/ad_opencoll_scalable.c | 28 +- .../romio314/romio/adio/common/ad_prealloc.c | 36 +- .../io/romio314/romio/adio/common/ad_read.c | 8 +- .../romio314/romio/adio/common/ad_read_coll.c | 244 +- .../romio314/romio/adio/common/ad_read_str.c | 46 +- .../romio/adio/common/ad_read_str_naive.c | 74 +- .../io/romio314/romio/adio/common/ad_resize.c | 6 +- .../io/romio314/romio/adio/common/ad_seek.c | 14 +- .../romio314/romio/adio/common/ad_set_sh_fp.c | 16 +- .../romio314/romio/adio/common/ad_set_view.c | 14 +- .../romio314/romio/adio/common/ad_subarray.c | 26 +- .../io/romio314/romio/adio/common/ad_wait.c | 10 +- .../romio314/romio/adio/common/ad_wait_fake.c | 4 +- .../io/romio314/romio/adio/common/ad_write.c | 6 +- .../romio/adio/common/ad_write_coll.c | 244 +- .../romio/adio/common/ad_write_nolock.c | 52 +- .../romio314/romio/adio/common/ad_write_str.c | 54 +- .../romio/adio/common/ad_write_str_naive.c | 72 +- .../io/romio314/romio/adio/common/adi_close.c | 4 +- .../romio314/romio/adio/common/async_list.c | 14 +- .../romio314/romio/adio/common/byte_offset.c | 8 +- .../romio/adio/common/cb_config_list.c | 110 +- .../romio314/romio/adio/common/eof_offset.c | 24 +- .../mca/io/romio314/romio/adio/common/error.c | 6 +- .../io/romio314/romio/adio/common/flatten.c | 154 +- .../romio314/romio/adio/common/get_fp_posn.c | 12 +- .../io/romio314/romio/adio/common/greq_fns.c | 6 +- .../io/romio314/romio/adio/common/heap-sort.c | 8 +- .../io/romio314/romio/adio/common/hint_fns.c | 16 +- .../io/romio314/romio/adio/common/iscontig.c | 8 +- ompi/mca/io/romio314/romio/adio/common/lock.c | 44 +- .../io/romio314/romio/adio/common/malloc.c | 10 +- .../romio314/romio/adio/common/req_malloc.c | 12 +- .../romio314/romio/adio/common/shfp_fname.c | 16 +- .../romio314/romio/adio/common/status_setb.c | 8 +- .../io/romio314/romio/adio/common/strfns.c | 44 +- .../romio314/romio/adio/common/system_hints.c | 30 +- .../mca/io/romio314/romio/adio/include/adio.h | 66 +- .../romio/adio/include/adio_cb_config_list.h | 14 +- .../romio314/romio/adio/include/adio_extern.h | 4 +- .../io/romio314/romio/adio/include/adioi.h | 114 +- .../romio/adio/include/adioi_fs_proto.h | 4 +- .../romio314/romio/adio/include/mpio_error.h | 4 +- .../io/romio314/romio/adio/include/mpipr.h | 6 +- .../io/romio314/romio/confdb/aclocal_am.m4 | 2 +- .../romio314/romio/confdb/aclocal_atomic.m4 | 10 +- .../romio/confdb/aclocal_attr_alias.m4 | 12 +- .../romio314/romio/confdb/aclocal_bugfix.m4 | 18 +- .../io/romio314/romio/confdb/aclocal_cache.m4 | 56 +- .../io/romio314/romio/confdb/aclocal_cc.m4 | 88 +- .../romio314/romio/confdb/aclocal_coverage.m4 | 6 +- .../io/romio314/romio/confdb/aclocal_cxx.m4 | 8 +- .../io/romio314/romio/confdb/aclocal_f77.m4 | 98 +- .../romio314/romio/confdb/aclocal_f77old.m4 | 52 +- .../io/romio314/romio/confdb/aclocal_fc.m4 | 44 +- .../io/romio314/romio/confdb/aclocal_make.m4 | 20 +- .../io/romio314/romio/confdb/aclocal_mpi.m4 | 64 +- .../io/romio314/romio/confdb/aclocal_romio.m4 | 66 +- .../io/romio314/romio/confdb/aclocal_shl.m4 | 52 +- .../romio314/romio/confdb/aclocal_subcfg.m4 | 16 +- .../io/romio314/romio/confdb/aclocal_util.m4 | 6 +- ompi/mca/io/romio314/romio/configure.ac | 108 +- ompi/mca/io/romio314/romio/doc/README | 10 +- ompi/mca/io/romio314/romio/doc/pubs.bib | 22 +- ompi/mca/io/romio314/romio/doc/romio.bib | 10 +- .../io/romio314/romio/doc/source-guide.tex | 2 +- .../mca/io/romio314/romio/doc/users-guide.tex | 110 +- ompi/mca/io/romio314/romio/include/mpio.h.in | 40 +- ompi/mca/io/romio314/romio/include/mpiof.h.in | 8 +- ompi/mca/io/romio314/romio/mpi-io/close.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/delete.c | 12 +- ompi/mca/io/romio314/romio/mpi-io/file_c2f.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/file_f2c.c | 4 +- .../io/romio314/romio/mpi-io/fortran/closef.c | 4 +- .../romio314/romio/mpi-io/fortran/deletef.c | 4 +- .../io/romio314/romio/mpi-io/fortran/fsyncf.c | 6 +- .../romio/mpi-io/fortran/get_amodef.c | 6 +- .../romio314/romio/mpi-io/fortran/get_atomf.c | 6 +- .../romio/mpi-io/fortran/get_bytofff.c | 6 +- .../romio314/romio/mpi-io/fortran/get_errhf.c | 6 +- .../romio/mpi-io/fortran/get_extentf.c | 8 +- .../romio/mpi-io/fortran/get_groupf.c | 6 +- .../romio314/romio/mpi-io/fortran/get_infof.c | 6 +- .../romio/mpi-io/fortran/get_posn_shf.c | 8 +- .../romio314/romio/mpi-io/fortran/get_posnf.c | 6 +- .../romio314/romio/mpi-io/fortran/get_sizef.c | 6 +- .../romio314/romio/mpi-io/fortran/get_viewf.c | 8 +- .../romio314/romio/mpi-io/fortran/iotestf.c | 6 +- .../romio314/romio/mpi-io/fortran/iowaitf.c | 6 +- .../romio314/romio/mpi-io/fortran/iread_atf.c | 8 +- .../romio314/romio/mpi-io/fortran/iread_shf.c | 8 +- .../io/romio314/romio/mpi-io/fortran/ireadf.c | 8 +- .../romio/mpi-io/fortran/iwrite_atf.c | 8 +- .../romio/mpi-io/fortran/iwrite_shf.c | 10 +- .../romio314/romio/mpi-io/fortran/iwritef.c | 8 +- .../io/romio314/romio/mpi-io/fortran/openf.c | 4 +- .../romio314/romio/mpi-io/fortran/preallocf.c | 6 +- .../romio/mpi-io/fortran/rd_atallbf.c | 6 +- .../romio/mpi-io/fortran/rd_atallef.c | 6 +- .../romio/mpi-io/fortran/read_allbf.c | 8 +- .../romio/mpi-io/fortran/read_allef.c | 8 +- .../romio314/romio/mpi-io/fortran/read_allf.c | 8 +- .../romio/mpi-io/fortran/read_atallf.c | 6 +- .../romio314/romio/mpi-io/fortran/read_atf.c | 8 +- .../romio/mpi-io/fortran/read_ordbf.c | 8 +- .../romio/mpi-io/fortran/read_ordef.c | 8 +- .../romio314/romio/mpi-io/fortran/read_ordf.c | 8 +- .../romio314/romio/mpi-io/fortran/read_shf.c | 10 +- .../io/romio314/romio/mpi-io/fortran/readf.c | 8 +- .../romio314/romio/mpi-io/fortran/seek_shf.c | 8 +- .../io/romio314/romio/mpi-io/fortran/seekf.c | 6 +- .../romio314/romio/mpi-io/fortran/set_atomf.c | 6 +- .../romio314/romio/mpi-io/fortran/set_errhf.c | 6 +- .../romio314/romio/mpi-io/fortran/set_infof.c | 6 +- .../romio314/romio/mpi-io/fortran/set_sizef.c | 6 +- .../romio314/romio/mpi-io/fortran/set_viewf.c | 20 +- .../romio/mpi-io/fortran/wr_atallbf.c | 8 +- .../romio/mpi-io/fortran/wr_atallef.c | 8 +- .../romio/mpi-io/fortran/write_allbf.c | 8 +- .../romio/mpi-io/fortran/write_allef.c | 8 +- .../romio/mpi-io/fortran/write_allf.c | 8 +- .../romio/mpi-io/fortran/write_atallf.c | 8 +- .../romio314/romio/mpi-io/fortran/write_atf.c | 8 +- .../romio/mpi-io/fortran/write_ordbf.c | 8 +- .../romio/mpi-io/fortran/write_ordef.c | 8 +- .../romio/mpi-io/fortran/write_ordf.c | 8 +- .../romio314/romio/mpi-io/fortran/write_shf.c | 8 +- .../io/romio314/romio/mpi-io/fortran/writef.c | 8 +- ompi/mca/io/romio314/romio/mpi-io/fsync.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/get_amode.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/get_atom.c | 6 +- .../mca/io/romio314/romio/mpi-io/get_bytoff.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/get_errh.c | 4 +- .../mca/io/romio314/romio/mpi-io/get_extent.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/get_group.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/get_info.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/get_posn.c | 6 +- .../io/romio314/romio/mpi-io/get_posn_sh.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/get_size.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/get_view.c | 10 +- .../romio/mpi-io/glue/default/mpio_err.c | 4 +- .../romio/mpi-io/glue/default/mpio_file.c | 14 +- .../romio/mpi-io/glue/mpich/mpio_err.c | 24 +- .../romio/mpi-io/glue/mpich/mpio_file.c | 14 +- ompi/mca/io/romio314/romio/mpi-io/ioreq_c2f.c | 14 +- ompi/mca/io/romio314/romio/mpi-io/ioreq_f2c.c | 8 +- ompi/mca/io/romio314/romio/mpi-io/iotest.c | 8 +- ompi/mca/io/romio314/romio/mpi-io/iotestall.c | 12 +- ompi/mca/io/romio314/romio/mpi-io/iotestany.c | 8 +- .../mca/io/romio314/romio/mpi-io/iotestsome.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/iowait.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/iowaitall.c | 10 +- ompi/mca/io/romio314/romio/mpi-io/iowaitany.c | 8 +- .../mca/io/romio314/romio/mpi-io/iowaitsome.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/iread.c | 10 +- ompi/mca/io/romio314/romio/mpi-io/iread_at.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/iread_sh.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/iwrite.c | 10 +- ompi/mca/io/romio314/romio/mpi-io/iwrite_at.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/iwrite_sh.c | 10 +- .../io/romio314/romio/mpi-io/mpich_fileutil.c | 12 +- ompi/mca/io/romio314/romio/mpi-io/mpioimpl.h | 10 +- ompi/mca/io/romio314/romio/mpi-io/mpioprof.h | 10 +- .../io/romio314/romio/mpi-io/mpir-mpioinit.c | 10 +- .../romio314/romio/mpi-io/mpiu_external32.c | 8 +- ompi/mca/io/romio314/romio/mpi-io/mpiu_greq.c | 2 +- ompi/mca/io/romio314/romio/mpi-io/open.c | 28 +- ompi/mca/io/romio314/romio/mpi-io/prealloc.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/rd_atallb.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/rd_atalle.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/read.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/read_all.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/read_allb.c | 8 +- ompi/mca/io/romio314/romio/mpi-io/read_alle.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/read_at.c | 4 +- .../mca/io/romio314/romio/mpi-io/read_atall.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/read_ord.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/read_ordb.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/read_orde.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/read_sh.c | 8 +- .../romio314/romio/mpi-io/register_datarep.c | 10 +- ompi/mca/io/romio314/romio/mpi-io/seek.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/seek_sh.c | 8 +- ompi/mca/io/romio314/romio/mpi-io/set_atom.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/set_errh.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/set_info.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/set_size.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/set_view.c | 22 +- ompi/mca/io/romio314/romio/mpi-io/wr_atallb.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/wr_atalle.c | 4 +- ompi/mca/io/romio314/romio/mpi-io/write.c | 10 +- ompi/mca/io/romio314/romio/mpi-io/write_all.c | 6 +- .../mca/io/romio314/romio/mpi-io/write_allb.c | 8 +- .../mca/io/romio314/romio/mpi-io/write_alle.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/write_at.c | 4 +- .../io/romio314/romio/mpi-io/write_atall.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/write_ord.c | 8 +- .../mca/io/romio314/romio/mpi-io/write_ordb.c | 10 +- .../mca/io/romio314/romio/mpi-io/write_orde.c | 6 +- ompi/mca/io/romio314/romio/mpi-io/write_sh.c | 12 +- .../romio/mpi2-other/array/Makefile.in | 8 +- .../romio314/romio/mpi2-other/array/darray.c | 18 +- .../mpi2-other/array/fortran/Makefile.in | 8 +- .../romio/mpi2-other/array/fortran/darrayf.c | 4 +- .../mpi2-other/array/fortran/subarrayf.c | 4 +- .../romio/mpi2-other/array/subarray.c | 10 +- .../romio/mpi2-other/info/Makefile.in | 8 +- .../romio/mpi2-other/info/fortran/Makefile.in | 6 +- .../mpi2-other/info/fortran/info_createf.c | 4 +- .../mpi2-other/info/fortran/info_deletef.c | 6 +- .../romio/mpi2-other/info/fortran/info_dupf.c | 4 +- .../mpi2-other/info/fortran/info_freef.c | 4 +- .../romio/mpi2-other/info/fortran/info_getf.c | 12 +- .../mpi2-other/info/fortran/info_getnksf.c | 6 +- .../mpi2-other/info/fortran/info_getnthf.c | 4 +- .../mpi2-other/info/fortran/info_getvlnf.c | 6 +- .../romio/mpi2-other/info/fortran/info_setf.c | 12 +- .../romio314/romio/mpi2-other/info/info_c2f.c | 14 +- .../romio/mpi2-other/info/info_create.c | 6 +- .../romio/mpi2-other/info/info_delete.c | 8 +- .../romio314/romio/mpi2-other/info/info_dup.c | 6 +- .../romio314/romio/mpi2-other/info/info_f2c.c | 4 +- .../romio/mpi2-other/info/info_free.c | 4 +- .../romio314/romio/mpi2-other/info/info_get.c | 4 +- .../romio/mpi2-other/info/info_getnks.c | 4 +- .../romio/mpi2-other/info/info_getnth.c | 4 +- .../romio/mpi2-other/info/info_getvln.c | 4 +- .../romio314/romio/mpi2-other/info/info_set.c | 6 +- .../romio/test-internal/file_realms_test.c | 4 +- .../romio314/romio/test-internal/heap_test.c | 14 +- .../romio/test-internal/io_bounds_test.c | 12 +- ompi/mca/io/romio314/romio/test/.codingcheck | 8 +- ompi/mca/io/romio314/romio/test/Makefile.am | 2 +- ompi/mca/io/romio314/romio/test/Mfile.in | 10 +- ompi/mca/io/romio314/romio/test/README | 28 +- .../mca/io/romio314/romio/test/aggregation1.c | 36 +- .../mca/io/romio314/romio/test/aggregation2.c | 12 +- .../io/romio314/romio/test/async-multiple.c | 22 +- ompi/mca/io/romio314/romio/test/async.c | 16 +- ompi/mca/io/romio314/romio/test/atomicity.c | 42 +- ompi/mca/io/romio314/romio/test/big_extents.c | 52 +- ompi/mca/io/romio314/romio/test/coll_perf.c | 14 +- ompi/mca/io/romio314/romio/test/coll_test.c | 20 +- ompi/mca/io/romio314/romio/test/creat_excl.c | 8 +- ompi/mca/io/romio314/romio/test/darray_read.c | 10 +- ompi/mca/io/romio314/romio/test/error.c | 12 +- ompi/mca/io/romio314/romio/test/excl.c | 12 +- ompi/mca/io/romio314/romio/test/external32.c | 6 +- .../io/romio314/romio/test/fcoll_test.f.in | 24 +- ompi/mca/io/romio314/romio/test/file_info.c | 42 +- ompi/mca/io/romio314/romio/test/fmisc.f.in | 24 +- ompi/mca/io/romio314/romio/test/fperf.f.in | 36 +- ompi/mca/io/romio314/romio/test/hindexed.c | 90 +- ompi/mca/io/romio314/romio/test/i_noncontig.c | 28 +- ompi/mca/io/romio314/romio/test/large_array.c | 20 +- .../io/romio314/romio/test/large_file.c.in | 16 +- ompi/mca/io/romio314/romio/test/misc.c.in | 18 +- ompi/mca/io/romio314/romio/test/noncontig.c | 26 +- .../io/romio314/romio/test/noncontig_coll.c | 24 +- .../io/romio314/romio/test/noncontig_coll2.c | 70 +- ompi/mca/io/romio314/romio/test/ordered_fp.c | 22 +- ompi/mca/io/romio314/romio/test/perf.c | 42 +- .../io/romio314/romio/test/pfcoll_test.f.in | 24 +- ompi/mca/io/romio314/romio/test/psimple.c | 16 +- ompi/mca/io/romio314/romio/test/rtest.in | 4 +- ompi/mca/io/romio314/romio/test/runtests.in | 26 +- ompi/mca/io/romio314/romio/test/shared_fp.c | 16 +- ompi/mca/io/romio314/romio/test/simple.c | 20 +- ompi/mca/io/romio314/romio/test/split_coll.c | 14 +- ompi/mca/io/romio314/romio/test/status.c | 10 +- ompi/mca/io/romio314/romio/util/nfslock.c | 14 +- .../io/romio314/romio/util/romioinstall.in | 28 +- ompi/mca/io/romio314/romio/util/tarch | 12 +- ompi/mca/mca.h | 10 +- ompi/mca/mtl/Makefile.am | 6 +- ompi/mca/mtl/base/Makefile.am | 6 +- ompi/mca/mtl/base/base.h | 8 +- ompi/mca/mtl/base/mtl_base_datatype.h | 14 +- ompi/mca/mtl/base/mtl_base_frame.c | 12 +- ompi/mca/mtl/configure.m4 | 4 +- ompi/mca/mtl/mtl.h | 46 +- ompi/mca/mtl/mxm/help-mtl-mxm.txt | 6 +- ompi/mca/mtl/mxm/mtl_mxm_component.c | 4 +- ompi/mca/mtl/mxm/mtl_mxm_endpoint.c | 2 +- ompi/mca/mtl/mxm/mtl_mxm_send.c | 6 +- ompi/mca/mtl/ofi/configure.m4 | 2 +- ompi/mca/mtl/portals4/Makefile.am | 6 +- ompi/mca/mtl/portals4/configure.m4 | 8 +- ompi/mca/mtl/portals4/mtl_portals4.c | 18 +- ompi/mca/mtl/portals4/mtl_portals4.h | 4 +- ompi/mca/mtl/portals4/mtl_portals4_cancel.c | 4 +- .../mca/mtl/portals4/mtl_portals4_component.c | 26 +- ompi/mca/mtl/portals4/mtl_portals4_flowctl.c | 54 +- ompi/mca/mtl/portals4/mtl_portals4_probe.c | 2 +- ompi/mca/mtl/portals4/mtl_portals4_recv.c | 42 +- .../mtl/portals4/mtl_portals4_recv_short.c | 24 +- .../mtl/portals4/mtl_portals4_recv_short.h | 6 +- ompi/mca/mtl/portals4/mtl_portals4_send.c | 42 +- ompi/mca/mtl/psm/Makefile.am | 6 +- ompi/mca/mtl/psm/help-mtl-psm.txt | 2 +- ompi/mca/mtl/psm/mtl_psm.c | 80 +- ompi/mca/mtl/psm/mtl_psm.h | 24 +- ompi/mca/mtl/psm/mtl_psm_cancel.c | 28 +- ompi/mca/mtl/psm/mtl_psm_component.c | 38 +- ompi/mca/mtl/psm/mtl_psm_endpoint.c | 14 +- ompi/mca/mtl/psm/mtl_psm_endpoint.h | 10 +- ompi/mca/mtl/psm/mtl_psm_probe.c | 8 +- ompi/mca/mtl/psm/mtl_psm_recv.c | 12 +- ompi/mca/mtl/psm/mtl_psm_request.h | 10 +- ompi/mca/mtl/psm/mtl_psm_send.c | 22 +- ompi/mca/mtl/psm/mtl_psm_types.h | 18 +- ompi/mca/op/Makefile.am | 6 +- ompi/mca/op/base/Makefile.include | 6 +- ompi/mca/op/base/base.h | 8 +- ompi/mca/op/base/functions.h | 10 +- ompi/mca/op/base/help-mca-op-base.txt | 10 +- ompi/mca/op/base/op_base_find_available.c | 8 +- ompi/mca/op/base/op_base_frame.c | 10 +- ompi/mca/op/base/op_base_functions.c | 10 +- ompi/mca/op/base/op_base_op_select.c | 46 +- ompi/mca/op/example/Makefile.am | 8 +- ompi/mca/op/example/README.txt | 8 +- ompi/mca/op/example/configure.m4 | 14 +- ompi/mca/op/example/op_example.h | 8 +- ompi/mca/op/example/op_example_component.c | 8 +- ompi/mca/op/example/op_example_module_bxor.c | 20 +- ompi/mca/op/example/op_example_module_max.c | 36 +- ompi/mca/op/op.h | 16 +- ompi/mca/op/x86/Makefile.am | 8 +- ompi/mca/op/x86/configure.m4 | 10 +- ompi/mca/op/x86/op_x86.h | 8 +- ompi/mca/op/x86/op_x86_component.c | 8 +- ompi/mca/op/x86/op_x86_module_sum.c | 22 +- ompi/mca/osc/Makefile.am | 6 +- ompi/mca/osc/base/Makefile.am | 6 +- ompi/mca/osc/base/base.h | 6 +- ompi/mca/osc/base/osc_base_frame.c | 8 +- ompi/mca/osc/base/osc_base_init.c | 6 +- ompi/mca/osc/base/osc_base_obj_convert.c | 10 +- ompi/mca/osc/base/osc_base_obj_convert.h | 8 +- ompi/mca/osc/osc.h | 40 +- ompi/mca/osc/portals4/Makefile.am | 4 +- ompi/mca/osc/portals4/configure.m4 | 6 +- ompi/mca/osc/portals4/osc_portals4.h | 28 +- .../osc/portals4/osc_portals4_active_target.c | 4 +- ompi/mca/osc/portals4/osc_portals4_comm.c | 34 +- .../mca/osc/portals4/osc_portals4_component.c | 16 +- .../portals4/osc_portals4_passive_target.c | 16 +- ompi/mca/osc/portals4/osc_portals4_request.c | 6 +- ompi/mca/osc/portals4/osc_portals4_request.h | 4 +- ompi/mca/osc/pt2pt/osc_pt2pt_header.h | 2 +- ompi/mca/osc/sm/Makefile.am | 4 +- ompi/mca/osc/sm/osc_sm_active_target.c | 4 +- ompi/mca/osc/sm/osc_sm_comm.c | 30 +- ompi/mca/osc/sm/osc_sm_component.c | 10 +- ompi/mca/osc/sm/osc_sm_passive_target.c | 16 +- ompi/mca/pml/Makefile.am | 8 +- ompi/mca/pml/base/Makefile.am | 6 +- ompi/mca/pml/base/base.h | 8 +- ompi/mca/pml/base/pml_base_bsend.c | 68 +- ompi/mca/pml/base/pml_base_bsend.h | 8 +- ompi/mca/pml/base/pml_base_frame.c | 20 +- ompi/mca/pml/base/pml_base_ft.c | 8 +- ompi/mca/pml/base/pml_base_recvreq.c | 8 +- ompi/mca/pml/base/pml_base_recvreq.h | 8 +- ompi/mca/pml/base/pml_base_request.c | 6 +- ompi/mca/pml/base/pml_base_request.h | 10 +- ompi/mca/pml/base/pml_base_request_dbg.h | 6 +- ompi/mca/pml/base/pml_base_sendreq.c | 6 +- ompi/mca/pml/base/pml_base_sendreq.h | 8 +- ompi/mca/pml/cm/Makefile.am | 6 +- ompi/mca/pml/cm/pml_cm.h | 120 +- ompi/mca/pml/cm/pml_cm_component.c | 14 +- ompi/mca/pml/cm/pml_cm_component.h | 8 +- ompi/mca/pml/cm/pml_cm_recvreq.c | 14 +- ompi/mca/pml/cm/pml_cm_recvreq.h | 6 +- ompi/mca/pml/cm/pml_cm_request.c | 10 +- ompi/mca/pml/cm/pml_cm_request.h | 6 +- ompi/mca/pml/cm/pml_cm_sendreq.c | 22 +- ompi/mca/pml/cm/pml_cm_sendreq.h | 16 +- ompi/mca/pml/cm/pml_cm_start.c | 12 +- ompi/mca/pml/configure.m4 | 4 +- ompi/mca/pml/example/Makefile.am | 6 +- ompi/mca/pml/example/pml_example.c | 2 +- ompi/mca/pml/ob1/Makefile.am | 6 +- ompi/mca/pml/ob1/configure.m4 | 6 +- ompi/mca/pml/ob1/help-mpi-pml-ob1.txt | 10 +- ompi/mca/pml/ob1/pml_ob1.c | 50 +- ompi/mca/pml/ob1/pml_ob1.h | 22 +- ompi/mca/pml/ob1/pml_ob1_comm.c | 6 +- ompi/mca/pml/ob1/pml_ob1_comm.h | 10 +- ompi/mca/pml/ob1/pml_ob1_component.c | 28 +- ompi/mca/pml/ob1/pml_ob1_component.h | 8 +- ompi/mca/pml/ob1/pml_ob1_cuda.c | 22 +- ompi/mca/pml/ob1/pml_ob1_hdr.h | 26 +- ompi/mca/pml/ob1/pml_ob1_iprobe.c | 14 +- ompi/mca/pml/ob1/pml_ob1_progress.c | 10 +- ompi/mca/pml/ob1/pml_ob1_rdma.c | 12 +- ompi/mca/pml/ob1/pml_ob1_rdma.h | 2 +- ompi/mca/pml/ob1/pml_ob1_rdmafrag.h | 8 +- ompi/mca/pml/ob1/pml_ob1_recvfrag.c | 96 +- ompi/mca/pml/ob1/pml_ob1_recvfrag.h | 26 +- ompi/mca/pml/ob1/pml_ob1_recvreq.c | 72 +- ompi/mca/pml/ob1/pml_ob1_recvreq.h | 8 +- ompi/mca/pml/ob1/pml_ob1_sendreq.c | 66 +- ompi/mca/pml/ob1/pml_ob1_sendreq.h | 20 +- ompi/mca/pml/ob1/pml_ob1_start.c | 12 +- ompi/mca/pml/pml.h | 48 +- ompi/mca/pml/pml_constants.h | 10 +- ompi/mca/pml/v/Makefile.am | 4 +- ompi/mca/pml/v/pml_v_output.c | 10 +- ompi/mca/pml/v/pml_v_output.h | 4 +- ompi/mca/pubsub/Makefile.am | 6 +- ompi/mca/pubsub/base/Makefile.am | 8 +- ompi/mca/pubsub/base/base.h | 6 +- ompi/mca/pubsub/base/pubsub_base_frame.c | 6 +- ompi/mca/pubsub/base/pubsub_base_null_fns.c | 6 +- ompi/mca/pubsub/base/pubsub_base_select.c | 10 +- ompi/mca/pubsub/orte/Makefile.am | 6 +- ompi/mca/pubsub/orte/configure.m4 | 4 +- .../mca/pubsub/orte/help-ompi-pubsub-orte.txt | 6 +- ompi/mca/pubsub/orte/pubsub_orte.c | 68 +- ompi/mca/pubsub/orte/pubsub_orte.h | 8 +- ompi/mca/pubsub/orte/pubsub_orte_component.c | 12 +- ompi/mca/pubsub/pmi/Makefile.am | 4 +- ompi/mca/pubsub/pmi/configure.m4 | 8 +- ompi/mca/pubsub/pmi/pubsub_pmi.h | 4 +- ompi/mca/pubsub/pmi/pubsub_pmi_component.c | 8 +- ompi/mca/pubsub/pubsub.h | 6 +- ompi/mca/rte/Makefile.am | 6 +- ompi/mca/rte/base/Makefile.am | 4 +- ompi/mca/rte/base/base.h | 4 +- ompi/mca/rte/base/rte_base_frame.c | 4 +- ompi/mca/rte/configure.m4 | 4 +- ompi/mca/rte/orte/Makefile.am | 4 +- ompi/mca/rte/orte/configure.m4 | 6 +- ompi/mca/rte/orte/rte_orte.h | 6 +- ompi/mca/rte/orte/rte_orte_component.c | 6 +- ompi/mca/rte/orte/rte_orte_module.c | 10 +- ompi/mca/rte/rte.h | 28 +- ompi/mca/sharedfp/Makefile.am | 6 +- ompi/mca/sharedfp/base/Makefile.am | 8 +- ompi/mca/sharedfp/base/base.h | 10 +- .../sharedfp/base/sharedfp_base_file_select.c | 60 +- .../base/sharedfp_base_file_unselect.c | 6 +- .../base/sharedfp_base_find_available.c | 30 +- ompi/mca/sharedfp/base/sharedfp_base_frame.c | 8 +- ompi/mca/sharedfp/configure.m4 | 6 +- ompi/mca/sharedfp/individual/Makefile.am | 6 +- .../sharedfp/individual/sharedfp_individual.c | 6 +- .../sharedfp/individual/sharedfp_individual.h | 2 +- .../sharedfp_individual_collaborate_data.c | 32 +- .../sharedfp_individual_component.c | 6 +- .../sharedfp_individual_file_open.c | 20 +- .../individual/sharedfp_individual_gettime.c | 2 +- .../sharedfp_individual_insert_metadata.c | 8 +- .../individual/sharedfp_individual_iwrite.c | 4 +- .../individual/sharedfp_individual_read.c | 6 +- .../individual/sharedfp_individual_seek.c | 6 +- .../individual/sharedfp_individual_write.c | 30 +- ompi/mca/sharedfp/lockedfile/Makefile.am | 6 +- .../sharedfp/lockedfile/sharedfp_lockedfile.c | 12 +- .../sharedfp/lockedfile/sharedfp_lockedfile.h | 2 +- .../sharedfp_lockedfile_component.c | 6 +- .../sharedfp_lockedfile_file_open.c | 16 +- .../lockedfile/sharedfp_lockedfile_iread.c | 10 +- .../lockedfile/sharedfp_lockedfile_iwrite.c | 2 +- .../lockedfile/sharedfp_lockedfile_read.c | 2 +- .../lockedfile/sharedfp_lockedfile_seek.c | 2 +- .../lockedfile/sharedfp_lockedfile_write.c | 4 +- ompi/mca/sharedfp/sharedfp.h | 2 +- ompi/mca/sharedfp/sm/Makefile.am | 8 +- ompi/mca/sharedfp/sm/configure.m4 | 2 +- ompi/mca/sharedfp/sm/sharedfp_sm.c | 18 +- ompi/mca/sharedfp/sm/sharedfp_sm.h | 2 +- ompi/mca/sharedfp/sm/sharedfp_sm_component.c | 6 +- ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c | 24 +- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 12 +- ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c | 18 +- ompi/mca/sharedfp/sm/sharedfp_sm_write.c | 2 +- ompi/mca/topo/Makefile.am | 6 +- ompi/mca/topo/base/Makefile.am | 6 +- ompi/mca/topo/base/base.h | 66 +- ompi/mca/topo/base/topo_base_cart_coords.c | 14 +- ompi/mca/topo/base/topo_base_cart_create.c | 12 +- ompi/mca/topo/base/topo_base_cart_get.c | 6 +- ompi/mca/topo/base/topo_base_cart_map.c | 14 +- ompi/mca/topo/base/topo_base_cart_rank.c | 12 +- ompi/mca/topo/base/topo_base_cart_shift.c | 8 +- ompi/mca/topo/base/topo_base_cart_sub.c | 16 +- ompi/mca/topo/base/topo_base_cartdim_get.c | 6 +- ompi/mca/topo/base/topo_base_comm_select.c | 40 +- .../topo/base/topo_base_dist_graph_create.c | 16 +- .../topo_base_dist_graph_create_adjacent.c | 4 +- .../base/topo_base_dist_graph_neighbors.c | 2 +- .../topo_base_dist_graph_neighbors_count.c | 2 +- ompi/mca/topo/base/topo_base_find_available.c | 30 +- ompi/mca/topo/base/topo_base_frame.c | 12 +- ompi/mca/topo/base/topo_base_graph_create.c | 10 +- ompi/mca/topo/base/topo_base_graph_get.c | 14 +- ompi/mca/topo/base/topo_base_graph_map.c | 8 +- .../mca/topo/base/topo_base_graph_neighbors.c | 6 +- .../base/topo_base_graph_neighbors_count.c | 10 +- ompi/mca/topo/base/topo_base_graphdims_get.c | 12 +- ompi/mca/topo/base/topo_base_lazy_init.c | 8 +- ompi/mca/topo/basic/Makefile.am | 6 +- ompi/mca/topo/basic/topo_basic.h | 4 +- ompi/mca/topo/basic/topo_basic_component.c | 10 +- ompi/mca/topo/example/Makefile.am | 8 +- ompi/mca/topo/example/topo_example.h | 16 +- ompi/mca/topo/example/topo_example_cart_map.c | 16 +- .../mca/topo/example/topo_example_component.c | 14 +- .../mca/topo/example/topo_example_graph_map.c | 16 +- ompi/mca/topo/example/topo_example_module.c | 6 +- ompi/mca/topo/topo.h | 92 +- ompi/mca/vprotocol/Makefile.am | 6 +- ompi/mca/vprotocol/base/Makefile.am | 6 +- ompi/mca/vprotocol/base/base.h | 20 +- ompi/mca/vprotocol/base/vprotocol_base.c | 6 +- .../vprotocol/base/vprotocol_base_parasite.c | 26 +- .../vprotocol/base/vprotocol_base_request.c | 22 +- .../vprotocol/base/vprotocol_base_request.h | 20 +- .../vprotocol/base/vprotocol_base_select.c | 42 +- ompi/mca/vprotocol/example/Makefile.am | 12 +- .../mca/vprotocol/example/vprotocol_example.c | 10 +- .../mca/vprotocol/example/vprotocol_example.h | 8 +- .../example/vprotocol_example_comm.c | 2 +- .../example/vprotocol_example_component.c | 16 +- .../example/vprotocol_example_probe.c | 4 +- .../example/vprotocol_example_recv.c | 18 +- .../example/vprotocol_example_send.c | 14 +- .../example/vprotocol_example_start.c | 2 +- ompi/mca/vprotocol/pessimist/Makefile.am | 6 +- .../vprotocol/pessimist/vprotocol_pessimist.c | 8 +- .../vprotocol/pessimist/vprotocol_pessimist.h | 4 +- .../pessimist/vprotocol_pessimist_component.c | 14 +- .../pessimist/vprotocol_pessimist_event.h | 2 +- .../pessimist/vprotocol_pessimist_eventlog.c | 38 +- .../pessimist/vprotocol_pessimist_eventlog.h | 38 +- .../vprotocol_pessimist_eventlog_protocol.h | 2 +- .../pessimist/vprotocol_pessimist_probe.c | 10 +- .../pessimist/vprotocol_pessimist_proc.c | 2 +- .../pessimist/vprotocol_pessimist_progress.c | 2 +- .../pessimist/vprotocol_pessimist_request.c | 8 +- .../pessimist/vprotocol_pessimist_request.h | 4 +- .../pessimist/vprotocol_pessimist_send.c | 8 +- .../vprotocol_pessimist_sender_based.c | 42 +- .../vprotocol_pessimist_sender_based.h | 42 +- .../vprotocol_pessimist_sender_based_types.h | 16 +- .../pessimist/vprotocol_pessimist_start.c | 14 +- .../pessimist/vprotocol_pessimist_wait.c | 32 +- .../pessimist/vprotocol_pessimist_wait.h | 8 +- ompi/mca/vprotocol/vprotocol.h | 14 +- ompi/message/Makefile.am | 6 +- ompi/message/message.c | 8 +- ompi/message/message.h | 4 +- ompi/mpi/Makefile.am | 6 +- ompi/mpi/c/Makefile.am | 8 +- ompi/mpi/c/abort.c | 10 +- ompi/mpi/c/accumulate.c | 14 +- ompi/mpi/c/add_error_class.c | 20 +- ompi/mpi/c/add_error_code.c | 22 +- ompi/mpi/c/add_error_string.c | 8 +- ompi/mpi/c/address.c | 6 +- ompi/mpi/c/allgather.c | 12 +- ompi/mpi/c/allgatherv.c | 20 +- ompi/mpi/c/alloc_mem.c | 14 +- ompi/mpi/c/allreduce.c | 22 +- ompi/mpi/c/alltoall.c | 14 +- ompi/mpi/c/alltoallv.c | 12 +- ompi/mpi/c/alltoallw.c | 14 +- ompi/mpi/c/attr_delete.c | 12 +- ompi/mpi/c/attr_fn.c | 16 +- ompi/mpi/c/attr_get.c | 8 +- ompi/mpi/c/attr_put.c | 16 +- ompi/mpi/c/barrier.c | 14 +- ompi/mpi/c/bcast.c | 16 +- ompi/mpi/c/bindings.h | 12 +- ompi/mpi/c/bsend.c | 6 +- ompi/mpi/c/bsend_init.c | 8 +- ompi/mpi/c/buffer_attach.c | 8 +- ompi/mpi/c/buffer_detach.c | 8 +- ompi/mpi/c/cancel.c | 12 +- ompi/mpi/c/cart_coords.c | 10 +- ompi/mpi/c/cart_create.c | 18 +- ompi/mpi/c/cart_get.c | 10 +- ompi/mpi/c/cart_map.c | 12 +- ompi/mpi/c/cart_rank.c | 12 +- ompi/mpi/c/cart_shift.c | 10 +- ompi/mpi/c/cart_sub.c | 10 +- ompi/mpi/c/cartdim_get.c | 10 +- ompi/mpi/c/close_port.c | 10 +- ompi/mpi/c/comm_accept.c | 26 +- ompi/mpi/c/comm_c2f.c | 8 +- ompi/mpi/c/comm_call_errhandler.c | 8 +- ompi/mpi/c/comm_compare.c | 12 +- ompi/mpi/c/comm_connect.c | 28 +- ompi/mpi/c/comm_create.c | 22 +- ompi/mpi/c/comm_create_errhandler.c | 12 +- ompi/mpi/c/comm_create_keyval.c | 10 +- ompi/mpi/c/comm_delete_attr.c | 14 +- ompi/mpi/c/comm_disconnect.c | 12 +- ompi/mpi/c/comm_dup.c | 14 +- ompi/mpi/c/comm_f2c.c | 10 +- ompi/mpi/c/comm_free.c | 16 +- ompi/mpi/c/comm_free_keyval.c | 10 +- ompi/mpi/c/comm_get_attr.c | 12 +- ompi/mpi/c/comm_get_errhandler.c | 6 +- ompi/mpi/c/comm_get_info.c | 6 +- ompi/mpi/c/comm_get_name.c | 16 +- ompi/mpi/c/comm_get_parent.c | 14 +- ompi/mpi/c/comm_group.c | 12 +- ompi/mpi/c/comm_join.c | 36 +- ompi/mpi/c/comm_rank.c | 12 +- ompi/mpi/c/comm_remote_group.c | 16 +- ompi/mpi/c/comm_remote_size.c | 8 +- ompi/mpi/c/comm_set_attr.c | 14 +- ompi/mpi/c/comm_set_errhandler.c | 8 +- ompi/mpi/c/comm_set_info.c | 6 +- ompi/mpi/c/comm_size.c | 10 +- ompi/mpi/c/comm_spawn.c | 22 +- ompi/mpi/c/comm_spawn_multiple.c | 22 +- ompi/mpi/c/comm_split.c | 16 +- ompi/mpi/c/comm_split_type.c | 40 +- ompi/mpi/c/comm_test_inter.c | 12 +- ompi/mpi/c/compare_and_swap.c | 6 +- ompi/mpi/c/dims_create.c | 12 +- ompi/mpi/c/dist_graph_create.c | 6 +- ompi/mpi/c/dist_graph_create_adjacent.c | 4 +- ompi/mpi/c/dist_graph_neighbors.c | 6 +- ompi/mpi/c/dist_graph_neighbors_count.c | 4 +- ompi/mpi/c/errhandler_c2f.c | 6 +- ompi/mpi/c/errhandler_create.c | 6 +- ompi/mpi/c/errhandler_f2c.c | 12 +- ompi/mpi/c/errhandler_free.c | 10 +- ompi/mpi/c/errhandler_get.c | 8 +- ompi/mpi/c/errhandler_set.c | 6 +- ompi/mpi/c/error_class.c | 12 +- ompi/mpi/c/error_string.c | 12 +- ompi/mpi/c/exscan.c | 10 +- ompi/mpi/c/fetch_and_op.c | 6 +- ompi/mpi/c/file_c2f.c | 8 +- ompi/mpi/c/file_call_errhandler.c | 8 +- ompi/mpi/c/file_close.c | 8 +- ompi/mpi/c/file_create_errhandler.c | 10 +- ompi/mpi/c/file_delete.c | 8 +- ompi/mpi/c/file_f2c.c | 10 +- ompi/mpi/c/file_get_amode.c | 8 +- ompi/mpi/c/file_get_atomicity.c | 8 +- ompi/mpi/c/file_get_byte_offset.c | 8 +- ompi/mpi/c/file_get_errhandler.c | 8 +- ompi/mpi/c/file_get_group.c | 6 +- ompi/mpi/c/file_get_info.c | 8 +- ompi/mpi/c/file_get_position.c | 8 +- ompi/mpi/c/file_get_position_shared.c | 8 +- ompi/mpi/c/file_get_size.c | 8 +- ompi/mpi/c/file_get_type_extent.c | 8 +- ompi/mpi/c/file_get_view.c | 8 +- ompi/mpi/c/file_iread.c | 10 +- ompi/mpi/c/file_iread_at.c | 12 +- ompi/mpi/c/file_iread_shared.c | 10 +- ompi/mpi/c/file_iwrite.c | 6 +- ompi/mpi/c/file_iwrite_at.c | 10 +- ompi/mpi/c/file_iwrite_shared.c | 8 +- ompi/mpi/c/file_open.c | 8 +- ompi/mpi/c/file_preallocate.c | 8 +- ompi/mpi/c/file_read.c | 12 +- ompi/mpi/c/file_read_all.c | 8 +- ompi/mpi/c/file_read_all_begin.c | 12 +- ompi/mpi/c/file_read_all_end.c | 8 +- ompi/mpi/c/file_read_at.c | 10 +- ompi/mpi/c/file_read_at_all.c | 14 +- ompi/mpi/c/file_read_at_all_begin.c | 10 +- ompi/mpi/c/file_read_at_all_end.c | 8 +- ompi/mpi/c/file_read_ordered.c | 8 +- ompi/mpi/c/file_read_ordered_begin.c | 10 +- ompi/mpi/c/file_read_ordered_end.c | 8 +- ompi/mpi/c/file_read_shared.c | 10 +- ompi/mpi/c/file_seek.c | 10 +- ompi/mpi/c/file_seek_shared.c | 8 +- ompi/mpi/c/file_set_atomicity.c | 8 +- ompi/mpi/c/file_set_errhandler.c | 10 +- ompi/mpi/c/file_set_info.c | 8 +- ompi/mpi/c/file_set_size.c | 8 +- ompi/mpi/c/file_set_view.c | 10 +- ompi/mpi/c/file_sync.c | 8 +- ompi/mpi/c/file_write.c | 8 +- ompi/mpi/c/file_write_all.c | 8 +- ompi/mpi/c/file_write_all_begin.c | 8 +- ompi/mpi/c/file_write_all_end.c | 8 +- ompi/mpi/c/file_write_at.c | 8 +- ompi/mpi/c/file_write_at_all.c | 8 +- ompi/mpi/c/file_write_at_all_begin.c | 8 +- ompi/mpi/c/file_write_at_all_end.c | 8 +- ompi/mpi/c/file_write_ordered.c | 8 +- ompi/mpi/c/file_write_ordered_begin.c | 10 +- ompi/mpi/c/file_write_ordered_end.c | 8 +- ompi/mpi/c/file_write_shared.c | 8 +- ompi/mpi/c/finalize.c | 6 +- ompi/mpi/c/finalized.c | 8 +- ompi/mpi/c/free_mem.c | 10 +- ompi/mpi/c/gather.c | 26 +- ompi/mpi/c/gatherv.c | 18 +- ompi/mpi/c/get.c | 8 +- ompi/mpi/c/get_address.c | 6 +- ompi/mpi/c/get_count.c | 6 +- ompi/mpi/c/get_elements.c | 8 +- ompi/mpi/c/get_elements_x.c | 8 +- ompi/mpi/c/get_library_version.c | 12 +- ompi/mpi/c/get_processor_name.c | 12 +- ompi/mpi/c/get_version.c | 10 +- ompi/mpi/c/graph_create.c | 20 +- ompi/mpi/c/graph_get.c | 8 +- ompi/mpi/c/graph_map.c | 12 +- ompi/mpi/c/graph_neighbors.c | 8 +- ompi/mpi/c/graph_neighbors_count.c | 8 +- ompi/mpi/c/graphdims_get.c | 8 +- ompi/mpi/c/grequest_complete.c | 8 +- ompi/mpi/c/grequest_start.c | 8 +- ompi/mpi/c/group_c2f.c | 8 +- ompi/mpi/c/group_compare.c | 6 +- ompi/mpi/c/group_difference.c | 6 +- ompi/mpi/c/group_excl.c | 14 +- ompi/mpi/c/group_f2c.c | 6 +- ompi/mpi/c/group_free.c | 6 +- ompi/mpi/c/group_incl.c | 10 +- ompi/mpi/c/group_intersection.c | 10 +- ompi/mpi/c/group_range_excl.c | 18 +- ompi/mpi/c/group_range_incl.c | 10 +- ompi/mpi/c/group_rank.c | 8 +- ompi/mpi/c/group_size.c | 8 +- ompi/mpi/c/group_translate_ranks.c | 14 +- ompi/mpi/c/group_union.c | 10 +- ompi/mpi/c/iallgather.c | 10 +- ompi/mpi/c/iallgatherv.c | 14 +- ompi/mpi/c/iallreduce.c | 6 +- ompi/mpi/c/ibarrier.c | 8 +- ompi/mpi/c/ibcast.c | 12 +- ompi/mpi/c/improbe.c | 8 +- ompi/mpi/c/imrecv.c | 8 +- ompi/mpi/c/info_c2f.c | 8 +- ompi/mpi/c/info_create.c | 12 +- ompi/mpi/c/info_delete.c | 8 +- ompi/mpi/c/info_dup.c | 10 +- ompi/mpi/c/info_f2c.c | 14 +- ompi/mpi/c/info_free.c | 8 +- ompi/mpi/c/info_get.c | 8 +- ompi/mpi/c/info_get_nkeys.c | 10 +- ompi/mpi/c/info_get_nthkey.c | 12 +- ompi/mpi/c/info_get_valuelen.c | 12 +- ompi/mpi/c/info_set.c | 16 +- ompi/mpi/c/init.c | 6 +- ompi/mpi/c/init_thread.c | 10 +- ompi/mpi/c/initialized.c | 10 +- ompi/mpi/c/intercomm_create.c | 8 +- ompi/mpi/c/intercomm_merge.c | 16 +- ompi/mpi/c/iprobe.c | 8 +- ompi/mpi/c/irecv.c | 10 +- ompi/mpi/c/ireduce_scatter_block.c | 16 +- ompi/mpi/c/is_thread_main.c | 8 +- ompi/mpi/c/iscatter.c | 2 +- ompi/mpi/c/iscatterv.c | 2 +- ompi/mpi/c/keyval_create.c | 14 +- ompi/mpi/c/keyval_free.c | 8 +- ompi/mpi/c/lookup_name.c | 14 +- ompi/mpi/c/message_c2f.c | 10 +- ompi/mpi/c/message_f2c.c | 14 +- ompi/mpi/c/mprobe.c | 10 +- ompi/mpi/c/mrecv.c | 10 +- ompi/mpi/c/op_c2f.c | 8 +- ompi/mpi/c/op_commutative.c | 6 +- ompi/mpi/c/op_create.c | 6 +- ompi/mpi/c/op_f2c.c | 14 +- ompi/mpi/c/op_free.c | 8 +- ompi/mpi/c/open_port.c | 12 +- ompi/mpi/c/pack.c | 6 +- ompi/mpi/c/pack_external.c | 8 +- ompi/mpi/c/pack_external_size.c | 10 +- ompi/mpi/c/pack_size.c | 8 +- ompi/mpi/c/pcontrol.c | 8 +- ompi/mpi/c/probe.c | 10 +- ompi/mpi/c/profile/Makefile.am | 8 +- ompi/mpi/c/profile/defines.h | 90 +- ompi/mpi/c/publish_name.c | 14 +- ompi/mpi/c/put.c | 10 +- ompi/mpi/c/query_thread.c | 8 +- ompi/mpi/c/raccumulate.c | 14 +- ompi/mpi/c/recv.c | 14 +- ompi/mpi/c/recv_init.c | 14 +- ompi/mpi/c/reduce.c | 16 +- ompi/mpi/c/reduce_local.c | 6 +- ompi/mpi/c/reduce_scatter.c | 20 +- ompi/mpi/c/register_datarep.c | 8 +- ompi/mpi/c/request_c2f.c | 10 +- ompi/mpi/c/request_f2c.c | 14 +- ompi/mpi/c/request_free.c | 10 +- ompi/mpi/c/request_get_status.c | 12 +- ompi/mpi/c/rget.c | 2 +- ompi/mpi/c/rget_accumulate.c | 14 +- ompi/mpi/c/rput.c | 10 +- ompi/mpi/c/rsend_init.c | 8 +- ompi/mpi/c/scan.c | 10 +- ompi/mpi/c/scatter.c | 2 +- ompi/mpi/c/send.c | 2 +- ompi/mpi/c/send_init.c | 2 +- ompi/mpi/c/sendrecv_replace.c | 8 +- ompi/mpi/c/ssend.c | 6 +- ompi/mpi/c/start.c | 10 +- ompi/mpi/c/startall.c | 10 +- ompi/mpi/c/status_c2f.c | 2 +- ompi/mpi/c/status_f2c.c | 2 +- ompi/mpi/c/status_set_cancelled.c | 10 +- ompi/mpi/c/status_set_elements.c | 6 +- ompi/mpi/c/status_set_elements_x.c | 6 +- ompi/mpi/c/test.c | 8 +- ompi/mpi/c/testall.c | 12 +- ompi/mpi/c/testany.c | 12 +- ompi/mpi/c/testsome.c | 10 +- ompi/mpi/c/topo_test.c | 10 +- ompi/mpi/c/type_c2f.c | 6 +- ompi/mpi/c/type_commit.c | 8 +- ompi/mpi/c/type_create_f90_complex.c | 6 +- ompi/mpi/c/type_create_f90_real.c | 6 +- ompi/mpi/c/type_create_keyval.c | 8 +- ompi/mpi/c/type_create_resized.c | 6 +- ompi/mpi/c/type_delete_attr.c | 14 +- ompi/mpi/c/type_dup.c | 8 +- ompi/mpi/c/type_extent.c | 6 +- ompi/mpi/c/type_f2c.c | 10 +- ompi/mpi/c/type_free.c | 8 +- ompi/mpi/c/type_free_keyval.c | 8 +- ompi/mpi/c/type_get_attr.c | 16 +- ompi/mpi/c/type_get_contents.c | 6 +- ompi/mpi/c/type_get_envelope.c | 8 +- ompi/mpi/c/type_get_extent.c | 8 +- ompi/mpi/c/type_get_extent_x.c | 8 +- ompi/mpi/c/type_get_name.c | 6 +- ompi/mpi/c/type_get_true_extent.c | 8 +- ompi/mpi/c/type_get_true_extent_x.c | 8 +- ompi/mpi/c/type_hindexed.c | 6 +- ompi/mpi/c/type_hvector.c | 6 +- ompi/mpi/c/type_lb.c | 6 +- ompi/mpi/c/type_match_size.c | 6 +- ompi/mpi/c/type_set_attr.c | 12 +- ompi/mpi/c/type_size.c | 6 +- ompi/mpi/c/type_size_x.c | 6 +- ompi/mpi/c/type_struct.c | 6 +- ompi/mpi/c/type_ub.c | 6 +- ompi/mpi/c/unpack.c | 26 +- ompi/mpi/c/unpack_external.c | 8 +- ompi/mpi/c/unpublish_name.c | 18 +- ompi/mpi/c/wait.c | 8 +- ompi/mpi/c/waitall.c | 14 +- ompi/mpi/c/waitany.c | 12 +- ompi/mpi/c/waitsome.c | 12 +- ompi/mpi/c/win_allocate.c | 12 +- ompi/mpi/c/win_allocate_shared.c | 12 +- ompi/mpi/c/win_attach.c | 8 +- ompi/mpi/c/win_c2f.c | 8 +- ompi/mpi/c/win_call_errhandler.c | 8 +- ompi/mpi/c/win_complete.c | 8 +- ompi/mpi/c/win_create.c | 14 +- ompi/mpi/c/win_create_dynamic.c | 12 +- ompi/mpi/c/win_create_errhandler.c | 12 +- ompi/mpi/c/win_create_keyval.c | 10 +- ompi/mpi/c/win_delete_attr.c | 14 +- ompi/mpi/c/win_detach.c | 8 +- ompi/mpi/c/win_f2c.c | 10 +- ompi/mpi/c/win_fence.c | 10 +- ompi/mpi/c/win_flush.c | 8 +- ompi/mpi/c/win_flush_all.c | 8 +- ompi/mpi/c/win_flush_local.c | 8 +- ompi/mpi/c/win_flush_local_all.c | 8 +- ompi/mpi/c/win_free.c | 8 +- ompi/mpi/c/win_free_keyval.c | 10 +- ompi/mpi/c/win_get_attr.c | 12 +- ompi/mpi/c/win_get_errhandler.c | 8 +- ompi/mpi/c/win_get_group.c | 8 +- ompi/mpi/c/win_get_info.c | 4 +- ompi/mpi/c/win_get_name.c | 8 +- ompi/mpi/c/win_lock.c | 10 +- ompi/mpi/c/win_lock_all.c | 8 +- ompi/mpi/c/win_post.c | 10 +- ompi/mpi/c/win_set_attr.c | 12 +- ompi/mpi/c/win_set_errhandler.c | 10 +- ompi/mpi/c/win_set_info.c | 4 +- ompi/mpi/c/win_set_name.c | 6 +- ompi/mpi/c/win_shared_query.c | 4 +- ompi/mpi/c/win_start.c | 8 +- ompi/mpi/c/win_sync.c | 8 +- ompi/mpi/c/win_test.c | 8 +- ompi/mpi/c/win_unlock.c | 8 +- ompi/mpi/c/win_unlock_all.c | 8 +- ompi/mpi/c/win_wait.c | 8 +- ompi/mpi/c/wtick.c | 6 +- ompi/mpi/c/wtime.c | 6 +- ompi/mpi/cxx/Makefile.am | 8 +- ompi/mpi/cxx/comm.cc | 24 +- ompi/mpi/cxx/comm.h | 192 +- ompi/mpi/cxx/comm_inln.h | 232 +- ompi/mpi/cxx/constants.h | 20 +- ompi/mpi/cxx/datatype.cc | 18 +- ompi/mpi/cxx/datatype.h | 40 +- ompi/mpi/cxx/datatype_inln.h | 46 +- ompi/mpi/cxx/errhandler.h | 14 +- ompi/mpi/cxx/errhandler_inln.h | 8 +- ompi/mpi/cxx/exception.h | 16 +- ompi/mpi/cxx/file.cc | 84 +- ompi/mpi/cxx/file.h | 72 +- ompi/mpi/cxx/file_inln.h | 178 +- ompi/mpi/cxx/functions.h | 24 +- ompi/mpi/cxx/functions_inln.h | 34 +- ompi/mpi/cxx/group.h | 36 +- ompi/mpi/cxx/group_inln.h | 16 +- ompi/mpi/cxx/info.h | 8 +- ompi/mpi/cxx/info_inln.h | 14 +- ompi/mpi/cxx/intercepts.cc | 120 +- ompi/mpi/cxx/intercomm.h | 14 +- ompi/mpi/cxx/intercomm_inln.h | 10 +- ompi/mpi/cxx/intracomm.h | 30 +- ompi/mpi/cxx/intracomm_inln.h | 42 +- ompi/mpi/cxx/mpicxx.cc | 10 +- ompi/mpi/cxx/mpicxx.h | 50 +- ompi/mpi/cxx/op.h | 10 +- ompi/mpi/cxx/op_inln.h | 30 +- ompi/mpi/cxx/request.h | 26 +- ompi/mpi/cxx/request_inln.h | 38 +- ompi/mpi/cxx/status.h | 12 +- ompi/mpi/cxx/status_inln.h | 8 +- ompi/mpi/cxx/topology.h | 28 +- ompi/mpi/cxx/topology_inln.h | 34 +- ompi/mpi/cxx/win.cc | 26 +- ompi/mpi/cxx/win.h | 114 +- ompi/mpi/cxx/win_inln.h | 114 +- ompi/mpi/fortran/base/Makefile.am | 6 +- ompi/mpi/fortran/base/attr_fn_f.c | 62 +- ompi/mpi/fortran/base/constants.h | 8 +- ompi/mpi/fortran/base/conversion_fn_null_f.c | 14 +- ompi/mpi/fortran/base/datarep.h | 18 +- ompi/mpi/fortran/base/f90_accessors.c | 6 +- ompi/mpi/fortran/base/fint_2_int.h | 12 +- ompi/mpi/fortran/base/strings.c | 14 +- ompi/mpi/fortran/base/strings.h | 10 +- ompi/mpi/fortran/base/test_constants_f.c | 6 +- .../fortran/configure-fortran-output-bottom.h | 2 +- .../mpi/fortran/configure-fortran-output.h.in | 2 +- ompi/mpi/fortran/mpiext/Makefile.am | 4 +- ompi/mpi/fortran/mpif-h/Makefile.am | 8 +- ompi/mpi/fortran/mpif-h/abort_f.c | 8 +- ompi/mpi/fortran/mpif-h/accumulate_f.c | 10 +- ompi/mpi/fortran/mpif-h/add_error_class_f.c | 6 +- ompi/mpi/fortran/mpif-h/add_error_code_f.c | 6 +- ompi/mpi/fortran/mpif-h/add_error_string_f.c | 6 +- ompi/mpi/fortran/mpif-h/address_f.c | 6 +- ompi/mpi/fortran/mpif-h/allgather_f.c | 8 +- ompi/mpi/fortran/mpif-h/allgatherv_f.c | 6 +- ompi/mpi/fortran/mpif-h/allreduce_f.c | 6 +- ompi/mpi/fortran/mpif-h/alltoall_f.c | 10 +- ompi/mpi/fortran/mpif-h/alltoallv_f.c | 16 +- ompi/mpi/fortran/mpif-h/alltoallw_f.c | 14 +- ompi/mpi/fortran/mpif-h/attr_delete_f.c | 6 +- ompi/mpi/fortran/mpif-h/attr_get_f.c | 8 +- ompi/mpi/fortran/mpif-h/attr_put_f.c | 10 +- ompi/mpi/fortran/mpif-h/barrier_f.c | 6 +- ompi/mpi/fortran/mpif-h/bcast_f.c | 12 +- ompi/mpi/fortran/mpif-h/bindings.h | 14 +- ompi/mpi/fortran/mpif-h/bsend_f.c | 8 +- ompi/mpi/fortran/mpif-h/bsend_init_f.c | 2 +- ompi/mpi/fortran/mpif-h/buffer_attach_f.c | 6 +- ompi/mpi/fortran/mpif-h/buffer_detach_f.c | 6 +- ompi/mpi/fortran/mpif-h/cancel_f.c | 6 +- ompi/mpi/fortran/mpif-h/cart_coords_f.c | 6 +- ompi/mpi/fortran/mpif-h/cart_create_f.c | 6 +- ompi/mpi/fortran/mpif-h/cart_get_f.c | 8 +- ompi/mpi/fortran/mpif-h/cart_map_f.c | 8 +- ompi/mpi/fortran/mpif-h/cart_rank_f.c | 8 +- ompi/mpi/fortran/mpif-h/cart_shift_f.c | 8 +- ompi/mpi/fortran/mpif-h/cartdim_get_f.c | 8 +- ompi/mpi/fortran/mpif-h/close_port_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_accept_f.c | 14 +- .../fortran/mpif-h/comm_call_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_compare_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_connect_f.c | 10 +- .../fortran/mpif-h/comm_create_errhandler_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_create_f.c | 6 +- .../mpi/fortran/mpif-h/comm_create_keyval_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_delete_attr_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_disconnect_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_dup_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_free_keyval_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_get_attr_f.c | 6 +- .../fortran/mpif-h/comm_get_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_get_info_f.c | 4 +- ompi/mpi/fortran/mpif-h/comm_get_name_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_get_parent_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_group_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_join_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_rank_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_remote_group_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_remote_size_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_set_attr_f.c | 10 +- .../fortran/mpif-h/comm_set_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_set_info_f.c | 4 +- ompi/mpi/fortran/mpif-h/comm_set_name_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_size_f.c | 6 +- ompi/mpi/fortran/mpif-h/comm_spawn_f.c | 12 +- .../fortran/mpif-h/comm_spawn_multiple_f.c | 22 +- ompi/mpi/fortran/mpif-h/comm_split_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_split_type_f.c | 8 +- ompi/mpi/fortran/mpif-h/comm_test_inter_f.c | 6 +- ompi/mpi/fortran/mpif-h/dims_create_f.c | 8 +- .../mpif-h/dist_graph_create_adjacent_f.c | 6 +- ompi/mpi/fortran/mpif-h/dist_graph_create_f.c | 6 +- .../mpif-h/dist_graph_neighbors_count_f.c | 6 +- .../fortran/mpif-h/dist_graph_neighbors_f.c | 4 +- ompi/mpi/fortran/mpif-h/errhandler_create_f.c | 8 +- ompi/mpi/fortran/mpif-h/errhandler_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/errhandler_get_f.c | 6 +- ompi/mpi/fortran/mpif-h/errhandler_set_f.c | 6 +- ompi/mpi/fortran/mpif-h/error_class_f.c | 8 +- ompi/mpi/fortran/mpif-h/error_string_f.c | 6 +- ompi/mpi/fortran/mpif-h/exscan_f.c | 10 +- ompi/mpi/fortran/mpif-h/f_sync_reg_f.c | 6 +- .../fortran/mpif-h/file_call_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_close_f.c | 6 +- .../fortran/mpif-h/file_create_errhandler_f.c | 10 +- ompi/mpi/fortran/mpif-h/file_delete_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_get_amode_f.c | 8 +- .../mpi/fortran/mpif-h/file_get_atomicity_f.c | 6 +- .../fortran/mpif-h/file_get_byte_offset_f.c | 8 +- .../fortran/mpif-h/file_get_errhandler_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_get_group_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_get_info_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_get_position_f.c | 6 +- .../mpif-h/file_get_position_shared_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_get_size_f.c | 6 +- .../fortran/mpif-h/file_get_type_extent_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_get_view_f.c | 12 +- ompi/mpi/fortran/mpif-h/file_iread_at_f.c | 10 +- ompi/mpi/fortran/mpif-h/file_iread_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_iread_shared_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_iwrite_at_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_iwrite_f.c | 10 +- .../mpi/fortran/mpif-h/file_iwrite_shared_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_open_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_preallocate_f.c | 8 +- .../fortran/mpif-h/file_read_all_begin_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_read_all_end_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_read_all_f.c | 10 +- .../fortran/mpif-h/file_read_at_all_begin_f.c | 8 +- .../fortran/mpif-h/file_read_at_all_end_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_read_at_all_f.c | 10 +- ompi/mpi/fortran/mpif-h/file_read_at_f.c | 12 +- ompi/mpi/fortran/mpif-h/file_read_f.c | 8 +- .../mpif-h/file_read_ordered_begin_f.c | 10 +- .../fortran/mpif-h/file_read_ordered_end_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_read_ordered_f.c | 10 +- ompi/mpi/fortran/mpif-h/file_read_shared_f.c | 12 +- ompi/mpi/fortran/mpif-h/file_seek_f.c | 10 +- ompi/mpi/fortran/mpif-h/file_seek_shared_f.c | 10 +- .../mpi/fortran/mpif-h/file_set_atomicity_f.c | 6 +- .../fortran/mpif-h/file_set_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_set_info_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_set_size_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_set_view_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_sync_f.c | 6 +- .../fortran/mpif-h/file_write_all_begin_f.c | 10 +- .../mpi/fortran/mpif-h/file_write_all_end_f.c | 8 +- ompi/mpi/fortran/mpif-h/file_write_all_f.c | 8 +- .../mpif-h/file_write_at_all_begin_f.c | 12 +- .../fortran/mpif-h/file_write_at_all_end_f.c | 6 +- ompi/mpi/fortran/mpif-h/file_write_at_all_f.c | 12 +- ompi/mpi/fortran/mpif-h/file_write_at_f.c | 14 +- ompi/mpi/fortran/mpif-h/file_write_f.c | 10 +- .../mpif-h/file_write_ordered_begin_f.c | 12 +- .../fortran/mpif-h/file_write_ordered_end_f.c | 6 +- .../mpi/fortran/mpif-h/file_write_ordered_f.c | 12 +- ompi/mpi/fortran/mpif-h/file_write_shared_f.c | 12 +- ompi/mpi/fortran/mpif-h/finalize_f.c | 6 +- ompi/mpi/fortran/mpif-h/finalized_f.c | 6 +- ompi/mpi/fortran/mpif-h/free_mem_f.c | 6 +- ompi/mpi/fortran/mpif-h/gather_f.c | 10 +- ompi/mpi/fortran/mpif-h/gatherv_f.c | 10 +- ompi/mpi/fortran/mpif-h/get_address_f.c | 6 +- ompi/mpi/fortran/mpif-h/get_count_f.c | 8 +- ompi/mpi/fortran/mpif-h/get_elements_f.c | 8 +- ompi/mpi/fortran/mpif-h/get_elements_x_f.c | 6 +- ompi/mpi/fortran/mpif-h/get_f.c | 10 +- .../fortran/mpif-h/get_library_version_f.c | 8 +- .../mpi/fortran/mpif-h/get_processor_name_f.c | 8 +- ompi/mpi/fortran/mpif-h/get_version_f.c | 6 +- ompi/mpi/fortran/mpif-h/graph_create_f.c | 8 +- ompi/mpi/fortran/mpif-h/graph_get_f.c | 12 +- ompi/mpi/fortran/mpif-h/graph_map_f.c | 6 +- .../fortran/mpif-h/graph_neighbors_count_f.c | 8 +- ompi/mpi/fortran/mpif-h/graph_neighbors_f.c | 14 +- ompi/mpi/fortran/mpif-h/graphdims_get_f.c | 8 +- ompi/mpi/fortran/mpif-h/grequest_complete_f.c | 6 +- ompi/mpi/fortran/mpif-h/grequest_start_f.c | 8 +- ompi/mpi/fortran/mpif-h/group_compare_f.c | 8 +- ompi/mpi/fortran/mpif-h/group_difference_f.c | 10 +- ompi/mpi/fortran/mpif-h/group_excl_f.c | 10 +- ompi/mpi/fortran/mpif-h/group_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/group_incl_f.c | 10 +- .../mpi/fortran/mpif-h/group_intersection_f.c | 8 +- ompi/mpi/fortran/mpif-h/group_range_excl_f.c | 10 +- ompi/mpi/fortran/mpif-h/group_range_incl_f.c | 12 +- ompi/mpi/fortran/mpif-h/group_rank_f.c | 8 +- ompi/mpi/fortran/mpif-h/group_size_f.c | 8 +- .../fortran/mpif-h/group_translate_ranks_f.c | 14 +- ompi/mpi/fortran/mpif-h/group_union_f.c | 8 +- ompi/mpi/fortran/mpif-h/iallgather_f.c | 8 +- ompi/mpi/fortran/mpif-h/iallgatherv_f.c | 6 +- ompi/mpi/fortran/mpif-h/iallreduce_f.c | 6 +- ompi/mpi/fortran/mpif-h/ialltoall_f.c | 10 +- ompi/mpi/fortran/mpif-h/ialltoallv_f.c | 16 +- ompi/mpi/fortran/mpif-h/ialltoallw_f.c | 14 +- ompi/mpi/fortran/mpif-h/ibarrier_f.c | 6 +- ompi/mpi/fortran/mpif-h/ibcast_f.c | 12 +- ompi/mpi/fortran/mpif-h/ibsend_f.c | 8 +- ompi/mpi/fortran/mpif-h/iexscan_f.c | 10 +- ompi/mpi/fortran/mpif-h/igather_f.c | 12 +- ompi/mpi/fortran/mpif-h/igatherv_f.c | 10 +- ompi/mpi/fortran/mpif-h/improbe_f.c | 12 +- ompi/mpi/fortran/mpif-h/imrecv_f.c | 6 +- ompi/mpi/fortran/mpif-h/info_create_f.c | 6 +- ompi/mpi/fortran/mpif-h/info_delete_f.c | 8 +- ompi/mpi/fortran/mpif-h/info_dup_f.c | 6 +- ompi/mpi/fortran/mpif-h/info_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/info_get_f.c | 8 +- ompi/mpi/fortran/mpif-h/info_get_nkeys_f.c | 8 +- ompi/mpi/fortran/mpif-h/info_get_nthkey_f.c | 12 +- ompi/mpi/fortran/mpif-h/info_get_valuelen_f.c | 6 +- ompi/mpi/fortran/mpif-h/info_set_f.c | 8 +- ompi/mpi/fortran/mpif-h/init_f.c | 6 +- ompi/mpi/fortran/mpif-h/init_thread_f.c | 8 +- ompi/mpi/fortran/mpif-h/initialized_f.c | 6 +- ompi/mpi/fortran/mpif-h/intercomm_create_f.c | 12 +- ompi/mpi/fortran/mpif-h/intercomm_merge_f.c | 8 +- ompi/mpi/fortran/mpif-h/iprobe_f.c | 6 +- ompi/mpi/fortran/mpif-h/irecv_f.c | 6 +- ompi/mpi/fortran/mpif-h/ireduce_f.c | 12 +- .../fortran/mpif-h/ireduce_scatter_block_f.c | 14 +- ompi/mpi/fortran/mpif-h/ireduce_scatter_f.c | 12 +- ompi/mpi/fortran/mpif-h/irsend_f.c | 6 +- ompi/mpi/fortran/mpif-h/is_thread_main_f.c | 6 +- ompi/mpi/fortran/mpif-h/iscan_f.c | 10 +- ompi/mpi/fortran/mpif-h/iscatter_f.c | 18 +- ompi/mpi/fortran/mpif-h/iscatterv_f.c | 14 +- ompi/mpi/fortran/mpif-h/isend_f.c | 6 +- ompi/mpi/fortran/mpif-h/issend_f.c | 6 +- ompi/mpi/fortran/mpif-h/keyval_create_f.c | 8 +- ompi/mpi/fortran/mpif-h/keyval_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/lookup_name_f.c | 8 +- ompi/mpi/fortran/mpif-h/mprobe_f.c | 14 +- ompi/mpi/fortran/mpif-h/mrecv_f.c | 8 +- ompi/mpi/fortran/mpif-h/op_commutative_f.c | 6 +- ompi/mpi/fortran/mpif-h/op_create_f.c | 6 +- ompi/mpi/fortran/mpif-h/op_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/open_port_f.c | 6 +- ompi/mpi/fortran/mpif-h/pack_external_f.c | 16 +- .../mpi/fortran/mpif-h/pack_external_size_f.c | 10 +- ompi/mpi/fortran/mpif-h/pack_f.c | 14 +- ompi/mpi/fortran/mpif-h/pack_size_f.c | 12 +- ompi/mpi/fortran/mpif-h/pcontrol_f.c | 6 +- ompi/mpi/fortran/mpif-h/probe_f.c | 8 +- ompi/mpi/fortran/mpif-h/profile/Makefile.am | 8 +- ompi/mpi/fortran/mpif-h/profile/defines.h | 6 +- ompi/mpi/fortran/mpif-h/prototypes_mpi.h | 6 +- ompi/mpi/fortran/mpif-h/publish_name_f.c | 6 +- ompi/mpi/fortran/mpif-h/put_f.c | 8 +- ompi/mpi/fortran/mpif-h/query_thread_f.c | 6 +- ompi/mpi/fortran/mpif-h/recv_f.c | 12 +- ompi/mpi/fortran/mpif-h/recv_init_f.c | 8 +- ompi/mpi/fortran/mpif-h/reduce_f.c | 10 +- ompi/mpi/fortran/mpif-h/reduce_local_f.c | 6 +- .../fortran/mpif-h/reduce_scatter_block_f.c | 12 +- ompi/mpi/fortran/mpif-h/reduce_scatter_f.c | 10 +- ompi/mpi/fortran/mpif-h/register_datarep_f.c | 48 +- ompi/mpi/fortran/mpif-h/request_free_f.c | 8 +- .../mpi/fortran/mpif-h/request_get_status_f.c | 10 +- ompi/mpi/fortran/mpif-h/rsend_f.c | 6 +- ompi/mpi/fortran/mpif-h/rsend_init_f.c | 8 +- ompi/mpi/fortran/mpif-h/scan_f.c | 8 +- ompi/mpi/fortran/mpif-h/scatter_f.c | 14 +- ompi/mpi/fortran/mpif-h/scatterv_f.c | 12 +- ompi/mpi/fortran/mpif-h/send_f.c | 12 +- ompi/mpi/fortran/mpif-h/send_init_f.c | 10 +- ompi/mpi/fortran/mpif-h/sendrecv_f.c | 10 +- ompi/mpi/fortran/mpif-h/sendrecv_replace_f.c | 16 +- ompi/mpi/fortran/mpif-h/ssend_f.c | 8 +- ompi/mpi/fortran/mpif-h/ssend_init_f.c | 8 +- ompi/mpi/fortran/mpif-h/start_f.c | 8 +- ompi/mpi/fortran/mpif-h/startall_f.c | 8 +- .../fortran/mpif-h/status_set_cancelled_f.c | 6 +- .../fortran/mpif-h/status_set_elements_f.c | 10 +- .../fortran/mpif-h/status_set_elements_x_f.c | 8 +- ompi/mpi/fortran/mpif-h/test_cancelled_f.c | 6 +- ompi/mpi/fortran/mpif-h/test_f.c | 10 +- ompi/mpi/fortran/mpif-h/testall_f.c | 6 +- ompi/mpi/fortran/mpif-h/testany_f.c | 12 +- ompi/mpi/fortran/mpif-h/testsome_f.c | 14 +- ompi/mpi/fortran/mpif-h/topo_test_f.c | 8 +- ompi/mpi/fortran/mpif-h/type_commit_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_contiguous_f.c | 6 +- .../mpi/fortran/mpif-h/type_create_darray_f.c | 12 +- .../mpif-h/type_create_f90_complex_f.c | 10 +- .../mpif-h/type_create_f90_integer_f.c | 6 +- .../fortran/mpif-h/type_create_f90_real_f.c | 6 +- .../mpif-h/type_create_hindexed_block_f.c | 8 +- .../fortran/mpif-h/type_create_hindexed_f.c | 16 +- .../fortran/mpif-h/type_create_hvector_f.c | 6 +- .../mpif-h/type_create_indexed_block_f.c | 10 +- .../mpi/fortran/mpif-h/type_create_keyval_f.c | 6 +- .../fortran/mpif-h/type_create_resized_f.c | 8 +- .../mpi/fortran/mpif-h/type_create_struct_f.c | 10 +- .../fortran/mpif-h/type_create_subarray_f.c | 10 +- ompi/mpi/fortran/mpif-h/type_delete_attr_f.c | 8 +- ompi/mpi/fortran/mpif-h/type_dup_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_extent_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_free_f.c | 10 +- ompi/mpi/fortran/mpif-h/type_free_keyval_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_get_attr_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_get_contents_f.c | 16 +- ompi/mpi/fortran/mpif-h/type_get_envelope_f.c | 14 +- ompi/mpi/fortran/mpif-h/type_get_extent_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_get_name_f.c | 6 +- .../fortran/mpif-h/type_get_true_extent_f.c | 6 +- .../fortran/mpif-h/type_get_true_extent_x_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_hindexed_f.c | 12 +- ompi/mpi/fortran/mpif-h/type_hvector_f.c | 10 +- ompi/mpi/fortran/mpif-h/type_indexed_f.c | 8 +- ompi/mpi/fortran/mpif-h/type_lb_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_match_size_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_set_attr_f.c | 8 +- ompi/mpi/fortran/mpif-h/type_set_name_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_size_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_size_x_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_struct_f.c | 10 +- ompi/mpi/fortran/mpif-h/type_ub_f.c | 6 +- ompi/mpi/fortran/mpif-h/type_vector_f.c | 6 +- ompi/mpi/fortran/mpif-h/unpack_external_f.c | 14 +- ompi/mpi/fortran/mpif-h/unpack_f.c | 6 +- ompi/mpi/fortran/mpif-h/unpublish_name_f.c | 8 +- ompi/mpi/fortran/mpif-h/wait_f.c | 6 +- ompi/mpi/fortran/mpif-h/waitall_f.c | 8 +- ompi/mpi/fortran/mpif-h/waitany_f.c | 12 +- ompi/mpi/fortran/mpif-h/waitsome_f.c | 10 +- ompi/mpi/fortran/mpif-h/win_attach_f.c | 4 +- .../fortran/mpif-h/win_call_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_complete_f.c | 6 +- .../mpi/fortran/mpif-h/win_create_dynamic_f.c | 4 +- .../fortran/mpif-h/win_create_errhandler_f.c | 10 +- ompi/mpi/fortran/mpif-h/win_create_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_create_keyval_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_delete_attr_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_detach_f.c | 4 +- ompi/mpi/fortran/mpif-h/win_fence_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_free_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_free_keyval_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_get_attr_f.c | 6 +- .../mpi/fortran/mpif-h/win_get_errhandler_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_get_group_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_get_info_f.c | 4 +- ompi/mpi/fortran/mpif-h/win_get_name_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_lock_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_post_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_set_attr_f.c | 8 +- .../mpi/fortran/mpif-h/win_set_errhandler_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_set_info_f.c | 4 +- ompi/mpi/fortran/mpif-h/win_set_name_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_start_f.c | 8 +- ompi/mpi/fortran/mpif-h/win_test_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_unlock_f.c | 6 +- ompi/mpi/fortran/mpif-h/win_wait_f.c | 6 +- ompi/mpi/fortran/mpif-h/wtick_f.c | 6 +- ompi/mpi/fortran/mpif-h/wtime_f.c | 6 +- .../use-mpi-f08-desc/ISO_Fortran_binding.h | 10 +- ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am | 10 +- .../use-mpi-f08-desc/OMPI_Fortran_binding_c.c | 18 +- .../fortran/use-mpi-f08-desc/constants.h.fin | 4 +- ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08.f90 | 4 +- .../use-mpi-f08-desc/recv_f08_desc.f90 | 2 +- .../use-mpi-f08-desc/send_f08_desc.f90 | 6 +- ompi/mpi/fortran/use-mpi-f08/Makefile.am | 4 +- .../use-mpi-f08/get_library_version_f08.F90 | 2 +- .../fortran/use-mpi-f08/info_delete_f08.F90 | 2 +- ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 | 4 +- .../profile/pget_library_version_f08.F90 | 2 +- .../profile/pget_processor_name_f08.F90 | 2 +- .../use-mpi-f08/profile/pinfo_delete_f08.F90 | 2 +- ompi/mpi/fortran/use-mpi-f08/tests/contig.f90 | 2 +- .../fortran/use-mpi-ignore-tkr/Makefile.am | 4 +- .../use-mpi-ignore-tkr/mpi-ignore-tkr.F90 | 6 +- ompi/mpi/fortran/use-mpi-tkr/Makefile.am | 8 +- .../fortran/use-mpi-tkr/fortran_kinds.sh.in | 8 +- .../fortran/use-mpi-tkr/fortran_sizes.h.in | 6 +- ompi/mpi/fortran/use-mpi-tkr/mpi.F90 | 6 +- .../fortran/use-mpi-tkr/test/print_align.f90 | 6 +- .../fortran/use-mpi-tkr/test/print_ikinds.f90 | 6 +- .../use-mpi-tkr/test/print_prec_range.f90 | 6 +- .../fortran/use-mpi-tkr/test/print_rkinds.f90 | 6 +- ompi/mpi/fortran/use-mpi-tkr/test/send_t.c | 6 +- .../fortran/use-mpi-tkr/test/test_send.f90 | 6 +- ompi/mpi/help-mpi-api.txt | 8 +- ompi/mpi/java/Makefile.am | 4 +- ompi/mpi/java/README | 2 +- ompi/mpi/java/c/Makefile.am | 4 +- ompi/mpi/java/c/mpiJava.h | 6 +- ompi/mpi/java/c/mpi_CartComm.c | 8 +- ompi/mpi/java/c/mpi_Comm.c | 6 +- ompi/mpi/java/c/mpi_Constant.c | 6 +- ompi/mpi/java/c/mpi_Datatype.c | 6 +- ompi/mpi/java/c/mpi_Errhandler.c | 8 +- ompi/mpi/java/c/mpi_File.c | 6 +- ompi/mpi/java/c/mpi_GraphComm.c | 8 +- ompi/mpi/java/c/mpi_Group.c | 8 +- ompi/mpi/java/c/mpi_Info.c | 6 +- ompi/mpi/java/c/mpi_Intercomm.c | 8 +- ompi/mpi/java/c/mpi_Intracomm.c | 20 +- ompi/mpi/java/c/mpi_MPI.c | 10 +- ompi/mpi/java/c/mpi_Message.c | 6 +- ompi/mpi/java/c/mpi_Op.c | 8 +- ompi/mpi/java/c/mpi_Prequest.c | 6 +- ompi/mpi/java/c/mpi_Request.c | 8 +- ompi/mpi/java/c/mpi_Status.c | 6 +- ompi/mpi/java/c/mpi_Win.c | 38 +- ompi/mpi/java/java/CartComm.java | 8 +- ompi/mpi/java/java/CartParms.java | 8 +- ompi/mpi/java/java/Comm.java | 16 +- ompi/mpi/java/java/Constant.java | 6 +- ompi/mpi/java/java/Count.java | 2 +- ompi/mpi/java/java/Datatype.java | 8 +- ompi/mpi/java/java/DistGraphNeighbors.java | 6 +- ompi/mpi/java/java/DoubleComplex.java | 6 +- ompi/mpi/java/java/DoubleInt.java | 6 +- ompi/mpi/java/java/Errhandler.java | 6 +- ompi/mpi/java/java/File.java | 10 +- ompi/mpi/java/java/FileView.java | 6 +- ompi/mpi/java/java/FloatComplex.java | 6 +- ompi/mpi/java/java/FloatInt.java | 6 +- ompi/mpi/java/java/Freeable.java | 6 +- ompi/mpi/java/java/GraphComm.java | 8 +- ompi/mpi/java/java/GraphParms.java | 6 +- ompi/mpi/java/java/Group.java | 8 +- ompi/mpi/java/java/Info.java | 6 +- ompi/mpi/java/java/Int2.java | 6 +- ompi/mpi/java/java/Intercomm.java | 10 +- ompi/mpi/java/java/Intracomm.java | 18 +- ompi/mpi/java/java/LongInt.java | 6 +- ompi/mpi/java/java/MPI.java | 6 +- ompi/mpi/java/java/MPIException.java | 8 +- ompi/mpi/java/java/Makefile.am | 4 +- ompi/mpi/java/java/Message.java | 10 +- ompi/mpi/java/java/Op.java | 6 +- ompi/mpi/java/java/Prequest.java | 6 +- ompi/mpi/java/java/Request.java | 22 +- ompi/mpi/java/java/ShiftParms.java | 6 +- ompi/mpi/java/java/ShortInt.java | 6 +- ompi/mpi/java/java/Status.java | 18 +- ompi/mpi/java/java/Struct.java | 6 +- ompi/mpi/java/java/UserFunction.java | 6 +- ompi/mpi/java/java/Win.java | 28 +- ompi/mpi/man/man3/MPI.3in | 78 +- ompi/mpi/man/man3/MPI_Abort.3in | 12 +- ompi/mpi/man/man3/MPI_Accumulate.3in | 42 +- ompi/mpi/man/man3/MPI_Add_error_class.3in | 6 +- ompi/mpi/man/man3/MPI_Add_error_code.3in | 4 +- ompi/mpi/man/man3/MPI_Add_error_string.3in | 6 +- ompi/mpi/man/man3/MPI_Address.3in | 32 +- ompi/mpi/man/man3/MPI_Allgather.3in | 58 +- ompi/mpi/man/man3/MPI_Allgatherv.3in | 42 +- ompi/mpi/man/man3/MPI_Alloc_mem.3in | 32 +- ompi/mpi/man/man3/MPI_Allreduce.3in | 92 +- ompi/mpi/man/man3/MPI_Alltoall.3in | 10 +- ompi/mpi/man/man3/MPI_Alltoallv.3in | 8 +- ompi/mpi/man/man3/MPI_Alltoallw.3in | 6 +- ompi/mpi/man/man3/MPI_Attr_delete.3in | 10 +- ompi/mpi/man/man3/MPI_Attr_get.3in | 6 +- ompi/mpi/man/man3/MPI_Attr_put.3in | 4 +- ompi/mpi/man/man3/MPI_Barrier.3in | 6 +- ompi/mpi/man/man3/MPI_Bcast.3in | 22 +- ompi/mpi/man/man3/MPI_Bsend.3in | 10 +- ompi/mpi/man/man3/MPI_Bsend_init.3in | 14 +- ompi/mpi/man/man3/MPI_Buffer_attach.3in | 6 +- ompi/mpi/man/man3/MPI_Buffer_detach.3in | 24 +- ompi/mpi/man/man3/MPI_Cancel.3in | 16 +- ompi/mpi/man/man3/MPI_Cart_coords.3in | 6 +- ompi/mpi/man/man3/MPI_Cart_create.3in | 8 +- ompi/mpi/man/man3/MPI_Cart_get.3in | 10 +- ompi/mpi/man/man3/MPI_Cart_map.3in | 12 +- ompi/mpi/man/man3/MPI_Cart_rank.3in | 6 +- ompi/mpi/man/man3/MPI_Cart_shift.3in | 42 +- ompi/mpi/man/man3/MPI_Cart_sub.3in | 12 +- ompi/mpi/man/man3/MPI_Cartdim_get.3in | 6 +- ompi/mpi/man/man3/MPI_Close_port.3in | 8 +- ompi/mpi/man/man3/MPI_Comm_accept.3in | 12 +- .../mpi/man/man3/MPI_Comm_call_errhandler.3in | 12 +- ompi/mpi/man/man3/MPI_Comm_compare.3in | 6 +- ompi/mpi/man/man3/MPI_Comm_connect.3in | 20 +- ompi/mpi/man/man3/MPI_Comm_create.3in | 8 +- .../man/man3/MPI_Comm_create_errhandler.3in | 16 +- ompi/mpi/man/man3/MPI_Comm_create_keyval.3in | 58 +- ompi/mpi/man/man3/MPI_Comm_delete_attr.3in | 14 +- ompi/mpi/man/man3/MPI_Comm_disconnect.3in | 14 +- ompi/mpi/man/man3/MPI_Comm_dup.3in | 12 +- ompi/mpi/man/man3/MPI_Comm_f2c.3in | 2 +- ompi/mpi/man/man3/MPI_Comm_free.3in | 8 +- ompi/mpi/man/man3/MPI_Comm_free_keyval.3in | 8 +- ompi/mpi/man/man3/MPI_Comm_get_attr.3in | 12 +- ompi/mpi/man/man3/MPI_Comm_get_errhandler.3in | 12 +- ompi/mpi/man/man3/MPI_Comm_get_info.3in | 10 +- ompi/mpi/man/man3/MPI_Comm_get_name.3in | 14 +- ompi/mpi/man/man3/MPI_Comm_get_parent.3in | 12 +- ompi/mpi/man/man3/MPI_Comm_group.3in | 10 +- ompi/mpi/man/man3/MPI_Comm_join.3in | 4 +- ompi/mpi/man/man3/MPI_Comm_rank.3in | 10 +- ompi/mpi/man/man3/MPI_Comm_remote_group.3in | 6 +- ompi/mpi/man/man3/MPI_Comm_remote_size.3in | 6 +- ompi/mpi/man/man3/MPI_Comm_set_attr.3in | 8 +- ompi/mpi/man/man3/MPI_Comm_set_errhandler.3in | 10 +- ompi/mpi/man/man3/MPI_Comm_set_info.3in | 6 +- ompi/mpi/man/man3/MPI_Comm_set_name.3in | 8 +- ompi/mpi/man/man3/MPI_Comm_size.3in | 12 +- ompi/mpi/man/man3/MPI_Comm_spawn.3in | 44 +- ompi/mpi/man/man3/MPI_Comm_spawn_multiple.3in | 48 +- ompi/mpi/man/man3/MPI_Comm_split.3in | 16 +- ompi/mpi/man/man3/MPI_Comm_test_inter.3in | 10 +- ompi/mpi/man/man3/MPI_Dims_create.3in | 12 +- ompi/mpi/man/man3/MPI_Errhandler_create.3in | 16 +- ompi/mpi/man/man3/MPI_Errhandler_free.3in | 10 +- ompi/mpi/man/man3/MPI_Errhandler_get.3in | 12 +- ompi/mpi/man/man3/MPI_Errhandler_set.3in | 10 +- ompi/mpi/man/man3/MPI_Error_class.3in | 6 +- ompi/mpi/man/man3/MPI_Error_string.3in | 10 +- ompi/mpi/man/man3/MPI_Exscan.3in | 6 +- .../mpi/man/man3/MPI_File_call_errhandler.3in | 2 +- ompi/mpi/man/man3/MPI_File_close.3in | 10 +- .../man/man3/MPI_File_create_errhandler.3in | 16 +- ompi/mpi/man/man3/MPI_File_delete.3in | 10 +- ompi/mpi/man/man3/MPI_File_get_amode.3in | 10 +- ompi/mpi/man/man3/MPI_File_get_atomicity.3in | 16 +- .../mpi/man/man3/MPI_File_get_byte_offset.3in | 12 +- ompi/mpi/man/man3/MPI_File_get_errhandler.3in | 14 +- ompi/mpi/man/man3/MPI_File_get_group.3in | 16 +- ompi/mpi/man/man3/MPI_File_get_info.3in | 24 +- ompi/mpi/man/man3/MPI_File_get_position.3in | 14 +- .../man/man3/MPI_File_get_position_shared.3in | 16 +- ompi/mpi/man/man3/MPI_File_get_size.3in | 12 +- .../mpi/man/man3/MPI_File_get_type_extent.3in | 18 +- ompi/mpi/man/man3/MPI_File_get_view.3in | 16 +- ompi/mpi/man/man3/MPI_File_iread.3in | 22 +- ompi/mpi/man/man3/MPI_File_iread_at.3in | 32 +- ompi/mpi/man/man3/MPI_File_iread_shared.3in | 10 +- ompi/mpi/man/man3/MPI_File_iwrite.3in | 32 +- ompi/mpi/man/man3/MPI_File_iwrite_at.3in | 40 +- ompi/mpi/man/man3/MPI_File_iwrite_shared.3in | 8 +- ompi/mpi/man/man3/MPI_File_open.3in | 72 +- ompi/mpi/man/man3/MPI_File_preallocate.3in | 18 +- ompi/mpi/man/man3/MPI_File_read.3in | 30 +- ompi/mpi/man/man3/MPI_File_read_all.3in | 26 +- ompi/mpi/man/man3/MPI_File_read_all_begin.3in | 22 +- ompi/mpi/man/man3/MPI_File_read_all_end.3in | 24 +- ompi/mpi/man/man3/MPI_File_read_at.3in | 34 +- ompi/mpi/man/man3/MPI_File_read_at_all.3in | 34 +- .../man/man3/MPI_File_read_at_all_begin.3in | 28 +- .../mpi/man/man3/MPI_File_read_at_all_end.3in | 18 +- ompi/mpi/man/man3/MPI_File_read_ordered.3in | 40 +- .../man/man3/MPI_File_read_ordered_begin.3in | 34 +- .../man/man3/MPI_File_read_ordered_end.3in | 22 +- ompi/mpi/man/man3/MPI_File_read_shared.3in | 12 +- ompi/mpi/man/man3/MPI_File_seek.3in | 26 +- ompi/mpi/man/man3/MPI_File_seek_shared.3in | 38 +- ompi/mpi/man/man3/MPI_File_set_atomicity.3in | 22 +- ompi/mpi/man/man3/MPI_File_set_errhandler.3in | 12 +- ompi/mpi/man/man3/MPI_File_set_info.3in | 22 +- ompi/mpi/man/man3/MPI_File_set_size.3in | 16 +- ompi/mpi/man/man3/MPI_File_set_view.3in | 64 +- ompi/mpi/man/man3/MPI_File_sync.3in | 12 +- ompi/mpi/man/man3/MPI_File_write.3in | 34 +- ompi/mpi/man/man3/MPI_File_write_all.3in | 32 +- .../mpi/man/man3/MPI_File_write_all_begin.3in | 24 +- ompi/mpi/man/man3/MPI_File_write_all_end.3in | 22 +- ompi/mpi/man/man3/MPI_File_write_at.3in | 42 +- ompi/mpi/man/man3/MPI_File_write_at_all.3in | 40 +- .../man/man3/MPI_File_write_at_all_begin.3in | 36 +- .../man/man3/MPI_File_write_at_all_end.3in | 16 +- ompi/mpi/man/man3/MPI_File_write_ordered.3in | 30 +- .../man/man3/MPI_File_write_ordered_begin.3in | 28 +- .../man/man3/MPI_File_write_ordered_end.3in | 14 +- ompi/mpi/man/man3/MPI_File_write_shared.3in | 8 +- ompi/mpi/man/man3/MPI_Finalize.3in | 14 +- ompi/mpi/man/man3/MPI_Finalized.3in | 10 +- ompi/mpi/man/man3/MPI_Free_mem.3in | 14 +- ompi/mpi/man/man3/MPI_Gather.3in | 90 +- ompi/mpi/man/man3/MPI_Gatherv.3in | 356 +-- ompi/mpi/man/man3/MPI_Get.3in | 24 +- ompi/mpi/man/man3/MPI_Get_address.3in | 24 +- ompi/mpi/man/man3/MPI_Get_count.3in | 18 +- ompi/mpi/man/man3/MPI_Get_elements.3in | 40 +- ompi/mpi/man/man3/MPI_Get_library_version.3in | 4 +- ompi/mpi/man/man3/MPI_Get_processor_name.3in | 8 +- ompi/mpi/man/man3/MPI_Get_version.3in | 12 +- ompi/mpi/man/man3/MPI_Graph_create.3in | 14 +- ompi/mpi/man/man3/MPI_Graph_get.3in | 10 +- ompi/mpi/man/man3/MPI_Graph_map.3in | 12 +- ompi/mpi/man/man3/MPI_Graph_neighbors.3in | 34 +- .../man/man3/MPI_Graph_neighbors_count.3in | 8 +- ompi/mpi/man/man3/MPI_Graphdims_get.3in | 6 +- ompi/mpi/man/man3/MPI_Grequest_complete.3in | 12 +- ompi/mpi/man/man3/MPI_Grequest_start.3in | 22 +- ompi/mpi/man/man3/MPI_Group_compare.3in | 8 +- ompi/mpi/man/man3/MPI_Group_difference.3in | 8 +- ompi/mpi/man/man3/MPI_Group_excl.3in | 10 +- ompi/mpi/man/man3/MPI_Group_free.3in | 8 +- ompi/mpi/man/man3/MPI_Group_incl.3in | 6 +- ompi/mpi/man/man3/MPI_Group_intersection.3in | 10 +- ompi/mpi/man/man3/MPI_Group_range_excl.3in | 10 +- ompi/mpi/man/man3/MPI_Group_range_incl.3in | 10 +- ompi/mpi/man/man3/MPI_Group_rank.3in | 8 +- ompi/mpi/man/man3/MPI_Group_size.3in | 4 +- .../man/man3/MPI_Group_translate_ranks.3in | 12 +- ompi/mpi/man/man3/MPI_Group_union.3in | 10 +- ompi/mpi/man/man3/MPI_Ibsend.3in | 10 +- ompi/mpi/man/man3/MPI_Improbe.3in | 8 +- ompi/mpi/man/man3/MPI_Imrecv.3in | 10 +- ompi/mpi/man/man3/MPI_Info_create.3in | 8 +- ompi/mpi/man/man3/MPI_Info_delete.3in | 8 +- ompi/mpi/man/man3/MPI_Info_dup.3in | 10 +- ompi/mpi/man/man3/MPI_Info_env.3in | 4 +- ompi/mpi/man/man3/MPI_Info_free.3in | 10 +- ompi/mpi/man/man3/MPI_Info_get.3in | 16 +- ompi/mpi/man/man3/MPI_Info_get_nkeys.3in | 12 +- ompi/mpi/man/man3/MPI_Info_get_nthkey.3in | 10 +- ompi/mpi/man/man3/MPI_Info_get_valuelen.3in | 16 +- ompi/mpi/man/man3/MPI_Info_set.3in | 8 +- ompi/mpi/man/man3/MPI_Init.3in | 8 +- ompi/mpi/man/man3/MPI_Init_thread.3in | 26 +- ompi/mpi/man/man3/MPI_Initialized.3in | 8 +- ompi/mpi/man/man3/MPI_Intercomm_create.3in | 18 +- ompi/mpi/man/man3/MPI_Intercomm_merge.3in | 12 +- ompi/mpi/man/man3/MPI_Iprobe.3in | 16 +- ompi/mpi/man/man3/MPI_Irecv.3in | 12 +- ompi/mpi/man/man3/MPI_Irsend.3in | 10 +- ompi/mpi/man/man3/MPI_Is_thread_main.3in | 4 +- ompi/mpi/man/man3/MPI_Isend.3in | 10 +- ompi/mpi/man/man3/MPI_Issend.3in | 10 +- ompi/mpi/man/man3/MPI_Keyval_create.3in | 44 +- ompi/mpi/man/man3/MPI_Keyval_free.3in | 14 +- ompi/mpi/man/man3/MPI_Lookup_name.3in | 4 +- ompi/mpi/man/man3/MPI_Mprobe.3in | 8 +- ompi/mpi/man/man3/MPI_Mrecv.3in | 8 +- ompi/mpi/man/man3/MPI_Op_create.3in | 114 +- ompi/mpi/man/man3/MPI_Op_free.3in | 8 +- ompi/mpi/man/man3/MPI_Open_port.3in | 10 +- ompi/mpi/man/man3/MPI_Pack.3in | 46 +- ompi/mpi/man/man3/MPI_Pack_external.3in | 30 +- ompi/mpi/man/man3/MPI_Pack_external_size.3in | 10 +- ompi/mpi/man/man3/MPI_Pack_size.3in | 10 +- ompi/mpi/man/man3/MPI_Pcontrol.3in | 10 +- ompi/mpi/man/man3/MPI_Probe.3in | 84 +- ompi/mpi/man/man3/MPI_Publish_name.3in | 6 +- ompi/mpi/man/man3/MPI_Put.3in | 16 +- ompi/mpi/man/man3/MPI_Query_thread.3in | 6 +- ompi/mpi/man/man3/MPI_Recv.3in | 34 +- ompi/mpi/man/man3/MPI_Recv_init.3in | 14 +- ompi/mpi/man/man3/MPI_Reduce.3in | 372 +-- ompi/mpi/man/man3/MPI_Reduce_local.3in | 126 +- ompi/mpi/man/man3/MPI_Reduce_scatter.3in | 14 +- ompi/mpi/man/man3/MPI_Register_datarep.3in | 32 +- ompi/mpi/man/man3/MPI_Request_free.3in | 64 +- ompi/mpi/man/man3/MPI_Request_get_status.3in | 10 +- ompi/mpi/man/man3/MPI_Rsend.3in | 8 +- ompi/mpi/man/man3/MPI_Rsend_init.3in | 12 +- ompi/mpi/man/man3/MPI_Scan.3in | 44 +- ompi/mpi/man/man3/MPI_Scatter.3in | 46 +- ompi/mpi/man/man3/MPI_Scatterv.3in | 112 +- ompi/mpi/man/man3/MPI_Send.3in | 12 +- ompi/mpi/man/man3/MPI_Send_init.3in | 14 +- ompi/mpi/man/man3/MPI_Sendrecv.3in | 30 +- ompi/mpi/man/man3/MPI_Sendrecv_replace.3in | 20 +- ompi/mpi/man/man3/MPI_Sizeof.3in | 6 +- ompi/mpi/man/man3/MPI_Ssend.3in | 8 +- ompi/mpi/man/man3/MPI_Ssend_init.3in | 14 +- ompi/mpi/man/man3/MPI_Start.3in | 6 +- ompi/mpi/man/man3/MPI_Startall.3in | 16 +- ompi/mpi/man/man3/MPI_Status_f2c.3in | 6 +- .../mpi/man/man3/MPI_Status_set_cancelled.3in | 10 +- ompi/mpi/man/man3/MPI_Status_set_elements.3in | 12 +- ompi/mpi/man/man3/MPI_T_pvar_get_info.3in | 2 +- ompi/mpi/man/man3/MPI_T_pvar_start.3in | 2 +- ompi/mpi/man/man3/MPI_Test.3in | 10 +- ompi/mpi/man/man3/MPI_Test_cancelled.3in | 10 +- ompi/mpi/man/man3/MPI_Testall.3in | 8 +- ompi/mpi/man/man3/MPI_Testany.3in | 22 +- ompi/mpi/man/man3/MPI_Testsome.3in | 24 +- ompi/mpi/man/man3/MPI_Topo_test.3in | 4 +- ompi/mpi/man/man3/MPI_Type_commit.3in | 20 +- ompi/mpi/man/man3/MPI_Type_contiguous.3in | 28 +- ompi/mpi/man/man3/MPI_Type_create_darray.3in | 42 +- .../man/man3/MPI_Type_create_f90_complex.3in | 4 +- .../man/man3/MPI_Type_create_f90_integer.3in | 4 +- .../mpi/man/man3/MPI_Type_create_f90_real.3in | 4 +- ompi/mpi/man/man3/MPI_Type_create_hvector.3in | 18 +- .../man3/MPI_Type_create_indexed_block.3in | 6 +- ompi/mpi/man/man3/MPI_Type_create_keyval.3in | 58 +- ompi/mpi/man/man3/MPI_Type_create_resized.3in | 18 +- ompi/mpi/man/man3/MPI_Type_create_struct.3in | 16 +- .../mpi/man/man3/MPI_Type_create_subarray.3in | 40 +- ompi/mpi/man/man3/MPI_Type_delete_attr.3in | 10 +- ompi/mpi/man/man3/MPI_Type_dup.3in | 4 +- ompi/mpi/man/man3/MPI_Type_extent.3in | 22 +- ompi/mpi/man/man3/MPI_Type_free.3in | 10 +- ompi/mpi/man/man3/MPI_Type_free_keyval.3in | 6 +- ompi/mpi/man/man3/MPI_Type_get_attr.3in | 14 +- ompi/mpi/man/man3/MPI_Type_get_contents.3in | 18 +- ompi/mpi/man/man3/MPI_Type_get_envelope.3in | 18 +- ompi/mpi/man/man3/MPI_Type_get_extent.3in | 22 +- ompi/mpi/man/man3/MPI_Type_get_name.3in | 14 +- .../mpi/man/man3/MPI_Type_get_true_extent.3in | 20 +- ompi/mpi/man/man3/MPI_Type_hindexed.3in | 24 +- ompi/mpi/man/man3/MPI_Type_hvector.3in | 42 +- ompi/mpi/man/man3/MPI_Type_indexed.3in | 48 +- ompi/mpi/man/man3/MPI_Type_lb.3in | 20 +- ompi/mpi/man/man3/MPI_Type_match_size.3in | 6 +- ompi/mpi/man/man3/MPI_Type_set_attr.3in | 12 +- ompi/mpi/man/man3/MPI_Type_set_name.3in | 10 +- ompi/mpi/man/man3/MPI_Type_size.3in | 8 +- ompi/mpi/man/man3/MPI_Type_struct.3in | 30 +- ompi/mpi/man/man3/MPI_Type_ub.3in | 20 +- ompi/mpi/man/man3/MPI_Type_vector.3in | 38 +- ompi/mpi/man/man3/MPI_Unpack.3in | 38 +- ompi/mpi/man/man3/MPI_Unpack_external.3in | 14 +- ompi/mpi/man/man3/MPI_Unpublish_name.3in | 4 +- ompi/mpi/man/man3/MPI_Wait.3in | 40 +- ompi/mpi/man/man3/MPI_Waitall.3in | 18 +- ompi/mpi/man/man3/MPI_Waitany.3in | 58 +- ompi/mpi/man/man3/MPI_Waitsome.3in | 76 +- ompi/mpi/man/man3/MPI_Win_call_errhandler.3in | 8 +- ompi/mpi/man/man3/MPI_Win_complete.3in | 6 +- ompi/mpi/man/man3/MPI_Win_create.3in | 26 +- .../man/man3/MPI_Win_create_errhandler.3in | 22 +- ompi/mpi/man/man3/MPI_Win_create_keyval.3in | 76 +- ompi/mpi/man/man3/MPI_Win_delete_attr.3in | 12 +- ompi/mpi/man/man3/MPI_Win_fence.3in | 18 +- ompi/mpi/man/man3/MPI_Win_free.3in | 6 +- ompi/mpi/man/man3/MPI_Win_free_keyval.3in | 10 +- ompi/mpi/man/man3/MPI_Win_get_attr.3in | 24 +- ompi/mpi/man/man3/MPI_Win_get_errhandler.3in | 8 +- ompi/mpi/man/man3/MPI_Win_get_group.3in | 12 +- ompi/mpi/man/man3/MPI_Win_get_info.3in | 10 +- ompi/mpi/man/man3/MPI_Win_get_name.3in | 14 +- ompi/mpi/man/man3/MPI_Win_lock.3in | 26 +- ompi/mpi/man/man3/MPI_Win_post.3in | 4 +- ompi/mpi/man/man3/MPI_Win_set_attr.3in | 18 +- ompi/mpi/man/man3/MPI_Win_set_errhandler.3in | 14 +- ompi/mpi/man/man3/MPI_Win_set_info.3in | 6 +- ompi/mpi/man/man3/MPI_Win_set_name.3in | 14 +- ompi/mpi/man/man3/MPI_Win_start.3in | 8 +- ompi/mpi/man/man3/MPI_Win_test.3in | 8 +- ompi/mpi/man/man3/MPI_Win_unlock.3in | 18 +- ompi/mpi/man/man3/MPI_Win_wait.3in | 8 +- ompi/mpi/man/man3/MPI_Wtick.3in | 2 +- ompi/mpi/man/man3/MPI_Wtime.3in | 28 +- ompi/mpi/man/man3/Makefile.extra | 4 +- ompi/mpi/tool/Makefile.am | 6 +- ompi/mpi/tool/cvar_get_num.c | 2 +- ompi/mpi/tool/enum_get_item.c | 2 +- ompi/mpi/tool/profile/Makefile.am | 8 +- ompi/mpi/tool/profile/defines.h | 10 +- ompi/mpiext/Makefile.am | 4 +- ompi/mpiext/affinity/Makefile.am | 4 +- ompi/mpiext/affinity/c/Makefile.am | 4 +- ompi/mpiext/affinity/c/OMPI_Affinity_str.3in | 36 +- ompi/mpiext/affinity/c/example.c | 4 +- ompi/mpiext/affinity/c/mpiext_affinity_c.h | 4 +- ompi/mpiext/affinity/c/mpiext_affinity_str.c | 64 +- ompi/mpiext/affinity/configure.m4 | 4 +- ompi/mpiext/cr/Makefile.am | 4 +- ompi/mpiext/cr/c/Makefile.am | 4 +- ompi/mpiext/cr/c/checkpoint.c | 6 +- ompi/mpiext/cr/c/inc_register_callback.c | 6 +- ompi/mpiext/cr/c/migrate.c | 6 +- ompi/mpiext/cr/c/mpiext_cr_c.h | 4 +- ompi/mpiext/cr/c/quiesce_checkpoint.c | 6 +- ompi/mpiext/cr/c/quiesce_end.c | 6 +- ompi/mpiext/cr/c/quiesce_start.c | 6 +- ompi/mpiext/cr/c/restart.c | 6 +- ompi/mpiext/cr/c/self_register_checkpoint.c | 6 +- ompi/mpiext/cr/c/self_register_continue.c | 6 +- ompi/mpiext/cr/c/self_register_restart.c | 6 +- ompi/mpiext/cr/configure.m4 | 4 +- ompi/mpiext/cuda/README.txt | 2 +- ompi/mpiext/example/Makefile.am | 4 +- ompi/mpiext/example/README.txt | 8 +- ompi/mpiext/example/c/Makefile.am | 4 +- ompi/mpiext/example/c/mpiext_example_c.h | 4 +- ompi/mpiext/example/c/mpiext_example_module.c | 6 +- .../example/c/mpiext_example_progress.c | 6 +- ompi/mpiext/example/c/progress.c | 8 +- ompi/mpiext/example/configure.m4 | 4 +- ompi/mpiext/example/mpif-h/Makefile.am | 4 +- .../example/mpif-h/mpiext_example_mpifh.h | 4 +- .../mpif-h/mpiext_example_progress_f.c | 4 +- ompi/mpiext/example/tests/Makefile | 4 +- ompi/mpiext/example/tests/Makefile.include | 6 +- ompi/mpiext/example/tests/progress_mpifh.F90 | 10 +- ompi/mpiext/example/tests/progress_usempi.F90 | 10 +- .../example/tests/progress_usempif08.F90 | 10 +- ompi/mpiext/example/use-mpi-f08/Makefile.am | 4 +- .../mpiext_example_progress_f08.F90 | 10 +- .../use-mpi-f08/mpiext_example_usempif08.h | 4 +- ompi/mpiext/example/use-mpi/Makefile.am | 4 +- .../example/use-mpi/mpiext_example_usempi.h | 4 +- ompi/op/Makefile.am | 6 +- ompi/op/op.c | 46 +- ompi/op/op.h | 10 +- ompi/patterns/comm/Makefile.am | 4 +- ompi/patterns/comm/allgather.c | 18 +- ompi/patterns/comm/allreduce.c | 20 +- ompi/patterns/comm/bcast.c | 4 +- ompi/patterns/comm/coll_ops.h | 2 +- ompi/patterns/net/Makefile.am | 4 +- ompi/patterns/net/allreduce.c | 36 +- ompi/patterns/net/netpatterns.h | 6 +- ompi/patterns/net/netpatterns_base.c | 6 +- ompi/patterns/net/netpatterns_knomial_tree.c | 66 +- ompi/patterns/net/netpatterns_knomial_tree.h | 30 +- .../net/netpatterns_multinomial_tree.c | 6 +- ompi/patterns/net/netpatterns_nary_tree.c | 24 +- ompi/peruse/Makefile.am | 6 +- ompi/peruse/peruse-internal.h | 6 +- ompi/peruse/peruse.c | 6 +- ompi/peruse/peruse.h | 8 +- ompi/peruse/peruse_module.c | 6 +- ompi/proc/Makefile.am | 6 +- ompi/proc/proc.c | 22 +- ompi/proc/proc.h | 24 +- ompi/request/Makefile.am | 6 +- ompi/request/grequest.c | 14 +- ompi/request/grequest.h | 16 +- ompi/request/req_wait.c | 8 +- ompi/request/request.c | 6 +- ompi/request/request.h | 18 +- ompi/request/request_dbg.h | 6 +- ompi/request/request_default.h | 4 +- ompi/runtime/Makefile.am | 6 +- ompi/runtime/help-mpi-runtime.txt | 12 +- ompi/runtime/mpiruntime.h | 10 +- ompi/runtime/ompi_cr.c | 70 +- ompi/runtime/ompi_cr.h | 10 +- ompi/runtime/ompi_mpi_abort.c | 20 +- ompi/runtime/ompi_mpi_finalize.c | 20 +- ompi/runtime/ompi_mpi_init.c | 64 +- ompi/runtime/ompi_mpi_params.c | 40 +- ompi/runtime/ompi_mpi_preconnect.c | 10 +- ompi/runtime/params.h | 14 +- ompi/tools/Makefile.am | 6 +- ompi/tools/mpisync/Makefile.am | 8 +- ompi/tools/mpisync/hpctimer.c | 68 +- ompi/tools/mpisync/hpctimer.h | 4 +- ompi/tools/mpisync/mpigclock.c | 4 +- ompi/tools/mpisync/mpigclock.h | 4 +- ompi/tools/mpisync/mpisync.1in | 6 +- ompi/tools/mpisync/ompi_timing_post | 8 +- ompi/tools/mpisync/sync.c | 6 +- ompi/tools/ompi_info/Makefile.am | 6 +- ompi/tools/ompi_info/ompi_info.1in | 16 +- ompi/tools/ompi_info/ompi_info.c | 26 +- ompi/tools/ompi_info/ompi_info.h | 6 +- ompi/tools/ompi_info/param.c | 256 +-- ompi/tools/wrappers/Makefile.am | 6 +- .../wrappers/mpifort-wrapper-data.txt.in | 2 +- ompi/tools/wrappers/mpijavac.1 | 8 +- ompi/tools/wrappers/ompi_wrapper_script.in | 2 +- ompi/win/Makefile.am | 8 +- ompi/win/win.c | 22 +- ompi/win/win.h | 12 +- opal/Makefile.am | 6 +- opal/asm/Makefile.am | 6 +- opal/asm/asm-data.txt | 8 +- opal/asm/asm.c | 8 +- opal/asm/base/AMD64.asm | 4 +- opal/asm/base/IA32.asm | 10 +- opal/asm/base/MIPS.asm | 122 +- opal/asm/base/POWERPC32.asm | 56 +- opal/asm/base/POWERPC64.asm | 30 +- opal/asm/base/SPARCV9_32.asm | 26 +- opal/asm/base/SPARCV9_64.asm | 2 +- opal/asm/base/default.conf | 2 +- opal/asm/generate-asm.pl | 12 +- opal/class/Makefile.am | 6 +- opal/class/opal_bitmap.c | 66 +- opal/class/opal_bitmap.h | 16 +- opal/class/opal_free_list.c | 6 +- opal/class/opal_free_list.h | 30 +- opal/class/opal_graph.c | 60 +- opal/class/opal_graph.h | 70 +- opal/class/opal_hash_table.c | 90 +- opal/class/opal_hash_table.h | 52 +- opal/class/opal_hotel.c | 8 +- opal/class/opal_list.c | 22 +- opal/class/opal_list.h | 56 +- opal/class/opal_object.c | 14 +- opal/class/opal_pointer_array.c | 34 +- opal/class/opal_pointer_array.h | 16 +- opal/class/opal_rb_tree.c | 8 +- opal/class/opal_rb_tree.h | 6 +- opal/class/opal_ring_buffer.c | 12 +- opal/class/opal_ring_buffer.h | 6 +- opal/class/opal_tree.c | 78 +- opal/class/opal_tree.h | 68 +- opal/class/opal_value_array.c | 6 +- opal/class/opal_value_array.h | 46 +- opal/datatype/Makefile.am | 6 +- opal/datatype/opal_convertor.c | 4 +- opal/datatype/opal_convertor.h | 4 +- opal/datatype/opal_convertor_raw.c | 2 +- opal/datatype/opal_datatype_copy.c | 2 +- opal/datatype/opal_datatype_cuda.c | 6 +- opal/datatype/opal_datatype_fake_stack.c | 2 +- opal/datatype/opal_datatype_internal.h | 2 +- opal/datatype/opal_datatype_position.c | 4 +- opal/datatype/opal_datatype_unpack.c | 2 +- opal/dss/Makefile.am | 2 +- opal/dss/dss_compare.c | 2 +- opal/dss/dss_copy.c | 16 +- opal/dss/dss_internal.h | 14 +- opal/dss/dss_internal_functions.c | 32 +- opal/dss/dss_load_unload.c | 36 +- opal/dss/dss_open_close.c | 6 +- opal/dss/dss_pack.c | 14 +- opal/dss/dss_peek.c | 2 +- opal/dss/dss_print.c | 12 +- opal/dss/dss_register.c | 4 +- opal/dss/dss_types.h | 2 +- opal/dss/dss_unpack.c | 22 +- opal/etc/Makefile.am | 8 +- opal/etc/openmpi-mca-params.conf | 6 +- opal/include/Makefile.am | 8 +- opal/include/opal/Makefile.am | 6 +- opal/include/opal/align.h | 6 +- opal/include/opal/constants.h | 12 +- opal/include/opal/hash_string.h | 4 +- opal/include/opal/opal_socket_errno.h | 6 +- opal/include/opal/prefetch.h | 4 +- opal/include/opal/sys/Makefile.am | 6 +- opal/include/opal/sys/amd64/Makefile.am | 6 +- opal/include/opal/sys/amd64/atomic.h | 6 +- opal/include/opal/sys/amd64/timer.h | 6 +- opal/include/opal/sys/amd64/update.sh | 6 +- opal/include/opal/sys/architecture.h | 6 +- opal/include/opal/sys/arm/Makefile.am | 6 +- opal/include/opal/sys/arm/atomic.h | 6 +- opal/include/opal/sys/arm/timer.h | 4 +- opal/include/opal/sys/arm/update.sh | 6 +- opal/include/opal/sys/atomic.h | 68 +- opal/include/opal/sys/atomic_impl.h | 50 +- opal/include/opal/sys/cma.h | 12 +- opal/include/opal/sys/ia32/Makefile.am | 6 +- opal/include/opal/sys/ia32/atomic.h | 14 +- opal/include/opal/sys/ia32/timer.h | 6 +- opal/include/opal/sys/ia32/update.sh | 6 +- opal/include/opal/sys/ia64/Makefile.am | 6 +- opal/include/opal/sys/ia64/atomic.h | 6 +- opal/include/opal/sys/ia64/timer.h | 6 +- opal/include/opal/sys/ia64/update.sh | 6 +- opal/include/opal/sys/mips/Makefile.am | 6 +- opal/include/opal/sys/mips/atomic.h | 6 +- opal/include/opal/sys/mips/timer.h | 4 +- opal/include/opal/sys/mips/update.sh | 6 +- opal/include/opal/sys/osx/Makefile.am | 6 +- opal/include/opal/sys/osx/atomic.h | 6 +- opal/include/opal/sys/powerpc/Makefile.am | 6 +- opal/include/opal/sys/powerpc/atomic.h | 12 +- opal/include/opal/sys/powerpc/timer.h | 6 +- opal/include/opal/sys/powerpc/update.sh | 6 +- opal/include/opal/sys/sparcv9/Makefile.am | 6 +- opal/include/opal/sys/sparcv9/atomic.h | 10 +- opal/include/opal/sys/sparcv9/timer.h | 8 +- opal/include/opal/sys/sparcv9/update.sh | 6 +- .../include/opal/sys/sync_builtin/Makefile.am | 6 +- opal/include/opal/sys/sync_builtin/atomic.h | 10 +- opal/include/opal/sys/timer.h | 8 +- opal/include/opal/types.h | 10 +- opal/include/opal/version.h.in | 6 +- opal/include/opal_config_bottom.h | 10 +- opal/include/opal_config_top.h | 8 +- opal/include/opal_stdint.h | 6 +- opal/mca/Makefile.am | 6 +- opal/mca/allocator/Makefile.am | 6 +- opal/mca/allocator/allocator.h | 48 +- opal/mca/allocator/base/Makefile.am | 10 +- .../mca/allocator/base/allocator_base_frame.c | 6 +- opal/mca/allocator/base/base.h | 14 +- opal/mca/allocator/basic/Makefile.am | 8 +- opal/mca/allocator/basic/allocator_basic.c | 34 +- opal/mca/allocator/basic/allocator_basic.h | 26 +- opal/mca/allocator/bucket/Makefile.am | 8 +- opal/mca/allocator/bucket/allocator_bucket.c | 28 +- .../allocator/bucket/allocator_bucket_alloc.c | 58 +- .../allocator/bucket/allocator_bucket_alloc.h | 44 +- opal/mca/backtrace/Makefile.am | 6 +- opal/mca/backtrace/backtrace.h | 6 +- opal/mca/backtrace/base/Makefile.am | 6 +- opal/mca/backtrace/base/backtrace_component.c | 6 +- opal/mca/backtrace/base/base.h | 6 +- opal/mca/backtrace/configure.m4 | 6 +- opal/mca/backtrace/execinfo/Makefile.am | 6 +- .../backtrace/execinfo/backtrace_execinfo.c | 8 +- .../execinfo/backtrace_execinfo_component.c | 6 +- opal/mca/backtrace/execinfo/configure.m4 | 10 +- opal/mca/backtrace/none/Makefile.am | 6 +- opal/mca/backtrace/none/backtrace_none.c | 6 +- .../backtrace/none/backtrace_none_component.c | 6 +- opal/mca/backtrace/none/configure.m4 | 8 +- opal/mca/backtrace/printstack/Makefile.am | 6 +- .../printstack/backtrace_printstack.c | 6 +- .../backtrace_printstack_component.c | 6 +- opal/mca/backtrace/printstack/configure.m4 | 10 +- opal/mca/base/Makefile.am | 6 +- opal/mca/base/base.h | 14 +- opal/mca/base/help-mca-base.txt | 6 +- opal/mca/base/help-mca-var.txt | 6 +- opal/mca/base/mca_base_close.c | 6 +- opal/mca/base/mca_base_cmd_line.c | 16 +- opal/mca/base/mca_base_component_compare.c | 36 +- opal/mca/base/mca_base_component_find.c | 14 +- opal/mca/base/mca_base_component_repository.c | 6 +- opal/mca/base/mca_base_component_repository.h | 6 +- opal/mca/base/mca_base_components_close.c | 8 +- opal/mca/base/mca_base_components_open.c | 16 +- opal/mca/base/mca_base_components_register.c | 20 +- opal/mca/base/mca_base_components_select.c | 4 +- opal/mca/base/mca_base_framework.c | 2 +- opal/mca/base/mca_base_framework.h | 6 +- opal/mca/base/mca_base_list.c | 14 +- opal/mca/base/mca_base_open.c | 12 +- opal/mca/base/mca_base_parse_paramfile.c | 6 +- opal/mca/base/mca_base_pvar.c | 8 +- opal/mca/base/mca_base_pvar.h | 2 +- opal/mca/base/mca_base_var.h | 22 +- opal/mca/base/mca_base_var_enum.c | 6 +- opal/mca/base/mca_base_var_enum.h | 6 +- opal/mca/base/mca_base_var_group.c | 6 +- opal/mca/base/mca_base_var_group.h | 8 +- opal/mca/base/mca_base_vari.h | 14 +- opal/mca/btl/Makefile.am | 6 +- opal/mca/btl/base/Makefile.am | 6 +- opal/mca/btl/base/base.h | 26 +- opal/mca/btl/base/btl_base_error.c | 8 +- opal/mca/btl/base/btl_base_error.h | 12 +- opal/mca/btl/base/btl_base_frame.c | 10 +- opal/mca/btl/base/btl_base_mca.c | 10 +- opal/mca/btl/base/btl_base_select.c | 14 +- opal/mca/btl/base/help-mpi-btl-base.txt | 6 +- opal/mca/btl/base/owner.txt | 2 +- opal/mca/btl/openib/btl_openib.c | 2 +- opal/mca/btl/openib/btl_openib_component.c | 48 +- opal/mca/btl/openib/btl_openib_endpoint.h | 4 +- opal/mca/btl/openib/btl_openib_failover.c | 2 +- opal/mca/btl/openib/btl_openib_fd.c | 10 +- opal/mca/btl/openib/btl_openib_frag.h | 32 +- opal/mca/btl/openib/btl_openib_ini.c | 6 +- opal/mca/btl/openib/btl_openib_mca.c | 12 +- opal/mca/btl/openib/configure.m4 | 4 +- .../openib/connect/btl_openib_connect_base.c | 2 +- .../connect/btl_openib_connect_rdmacm.c | 2 +- .../openib/connect/btl_openib_connect_udcm.c | 28 +- .../openib/connect/btl_openib_connect_udcm.h | 4 +- .../connect/help-mpi-btl-openib-cpc-base.txt | 6 +- .../help-mpi-btl-openib-cpc-rdmacm.txt | 4 +- opal/mca/btl/portals4/Makefile.am | 6 +- opal/mca/btl/portals4/btl_portals4.c | 10 +- opal/mca/btl/portals4/btl_portals4.h | 18 +- .../mca/btl/portals4/btl_portals4_component.c | 6 +- opal/mca/btl/portals4/btl_portals4_frag.c | 66 +- opal/mca/btl/portals4/btl_portals4_frag.h | 32 +- opal/mca/btl/portals4/btl_portals4_rdma.c | 6 +- opal/mca/btl/portals4/btl_portals4_recv.c | 6 +- opal/mca/btl/portals4/btl_portals4_recv.h | 18 +- opal/mca/btl/portals4/btl_portals4_send.c | 14 +- opal/mca/btl/portals4/configure.m4 | 8 +- opal/mca/btl/scif/Makefile.am | 6 +- opal/mca/btl/scif/btl_scif.h | 4 +- opal/mca/btl/scif/btl_scif_endpoint.h | 2 +- opal/mca/btl/scif/btl_scif_get.c | 2 +- opal/mca/btl/scif/btl_scif_send.c | 2 +- opal/mca/btl/scif/owner.txt | 2 +- opal/mca/btl/self/Makefile.am | 8 +- opal/mca/btl/self/btl_self.c | 26 +- opal/mca/btl/self/btl_self.h | 24 +- opal/mca/btl/self/btl_self_component.c | 10 +- opal/mca/btl/self/btl_self_endpoint.h | 8 +- opal/mca/btl/self/btl_self_frag.h | 6 +- opal/mca/btl/sm/Makefile.am | 8 +- opal/mca/btl/sm/btl_sm.c | 18 +- opal/mca/btl/sm/btl_sm.h | 14 +- opal/mca/btl/sm/btl_sm_component.c | 32 +- opal/mca/btl/sm/help-mpi-btl-sm.txt | 4 +- opal/mca/btl/smcuda/Makefile.am | 8 +- opal/mca/btl/smcuda/README | 2 +- opal/mca/btl/smcuda/btl_smcuda.c | 20 +- opal/mca/btl/smcuda/btl_smcuda.h | 14 +- opal/mca/btl/smcuda/btl_smcuda_component.c | 22 +- opal/mca/btl/smcuda/btl_smcuda_frag.h | 4 +- opal/mca/btl/smcuda/help-mpi-btl-smcuda.txt | 4 +- opal/mca/btl/tcp/Makefile.am | 6 +- opal/mca/btl/tcp/btl_tcp.c | 78 +- opal/mca/btl/tcp/btl_tcp.h | 30 +- opal/mca/btl/tcp/btl_tcp_addr.h | 10 +- opal/mca/btl/tcp/btl_tcp_component.c | 98 +- opal/mca/btl/tcp/btl_tcp_endpoint.h | 6 +- opal/mca/btl/tcp/btl_tcp_ft.c | 10 +- opal/mca/btl/tcp/btl_tcp_ft.h | 6 +- opal/mca/btl/tcp/btl_tcp_hdr.h | 14 +- opal/mca/btl/tcp/btl_tcp_proc.c | 68 +- opal/mca/btl/tcp/btl_tcp_proc.h | 18 +- opal/mca/btl/tcp/configure.m4 | 10 +- opal/mca/btl/tcp/help-mpi-btl-tcp.txt | 4 +- opal/mca/btl/template/Makefile.am | 6 +- opal/mca/btl/template/btl_template.c | 98 +- opal/mca/btl/template/btl_template.h | 50 +- .../mca/btl/template/btl_template_component.c | 20 +- opal/mca/btl/template/btl_template_endpoint.c | 14 +- opal/mca/btl/template/btl_template_endpoint.h | 6 +- opal/mca/btl/template/btl_template_frag.c | 52 +- opal/mca/btl/template/btl_template_frag.h | 40 +- opal/mca/btl/template/btl_template_proc.c | 18 +- opal/mca/btl/template/btl_template_proc.h | 20 +- .../mca/btl/template/netpipe-btl-template.txt | 8 +- opal/mca/btl/ugni/Makefile.am | 4 +- opal/mca/btl/ugni/btl_ugni.h | 6 +- opal/mca/btl/ugni/btl_ugni_add_procs.c | 2 +- opal/mca/btl/ugni/btl_ugni_component.c | 4 +- opal/mca/btl/ugni/btl_ugni_endpoint.h | 2 +- opal/mca/btl/ugni/btl_ugni_progress_thread.c | 2 +- opal/mca/btl/vader/Makefile.am | 6 +- opal/mca/btl/vader/btl_vader_fifo.h | 4 +- opal/mca/btl/vader/btl_vader_xpmem.c | 2 +- opal/mca/btl/vader/btl_vader_xpmem.h | 2 +- opal/mca/common/Makefile.am | 6 +- opal/mca/common/cuda/Makefile.am | 6 +- opal/mca/common/cuda/common_cuda.c | 54 +- opal/mca/common/cuda/help-mpi-common-cuda.txt | 10 +- opal/mca/common/sm/Makefile.am | 6 +- opal/mca/common/ugni/Makefile.am | 4 +- opal/mca/common/ugni/common_ugni.h | 2 +- opal/mca/common/ugni/common_ugni_ep.h | 2 +- opal/mca/common/verbs/Makefile.am | 4 +- opal/mca/common/verbs/common_verbs.h | 12 +- opal/mca/common/verbs/common_verbs_basics.c | 4 +- .../verbs/common_verbs_find_max_inline.c | 8 +- .../common/verbs/common_verbs_find_ports.c | 18 +- opal/mca/common/verbs/common_verbs_qp_type.c | 6 +- opal/mca/common/verbs/configure.m4 | 2 +- .../common/verbs/help-opal-common-verbs.txt | 4 +- opal/mca/compress/Makefile.am | 6 +- opal/mca/compress/base/Makefile.am | 4 +- opal/mca/compress/base/base.h | 12 +- opal/mca/compress/base/compress_base_close.c | 4 +- opal/mca/compress/base/compress_base_fns.c | 4 +- opal/mca/compress/base/compress_base_select.c | 4 +- opal/mca/compress/bzip/Makefile.am | 4 +- opal/mca/compress/bzip/compress_bzip.h | 6 +- .../compress/bzip/compress_bzip_component.c | 18 +- opal/mca/compress/bzip/compress_bzip_module.c | 4 +- opal/mca/compress/compress.h | 8 +- opal/mca/compress/gzip/Makefile.am | 4 +- opal/mca/compress/gzip/compress_gzip.h | 6 +- .../compress/gzip/compress_gzip_component.c | 18 +- opal/mca/compress/gzip/compress_gzip_module.c | 4 +- opal/mca/crs/Makefile.am | 8 +- opal/mca/crs/base/Makefile.am | 6 +- opal/mca/crs/base/base.h | 14 +- opal/mca/crs/base/crs_base_close.c | 6 +- opal/mca/crs/base/crs_base_fns.c | 12 +- opal/mca/crs/base/crs_base_select.c | 6 +- opal/mca/crs/blcr/Makefile.am | 6 +- opal/mca/crs/blcr/configure.m4 | 6 +- opal/mca/crs/blcr/crs_blcr.h | 14 +- opal/mca/crs/blcr/crs_blcr_component.c | 22 +- opal/mca/crs/blcr/crs_blcr_module.c | 38 +- opal/mca/crs/crs.h | 30 +- opal/mca/crs/dmtcp/Makefile.am | 4 +- opal/mca/crs/dmtcp/configure.m4 | 4 +- opal/mca/crs/dmtcp/crs_dmtcp.h | 12 +- opal/mca/crs/dmtcp/crs_dmtcp_component.c | 18 +- opal/mca/crs/none/Makefile.am | 6 +- opal/mca/crs/none/crs_none.h | 6 +- opal/mca/crs/none/crs_none_component.c | 14 +- opal/mca/crs/none/crs_none_module.c | 8 +- opal/mca/crs/none/help-opal-crs-none.txt | 2 +- opal/mca/crs/opal_crs.7in | 8 +- opal/mca/crs/self/Makefile.am | 6 +- opal/mca/crs/self/configure.m4 | 6 +- opal/mca/crs/self/crs_self.h | 8 +- opal/mca/crs/self/crs_self_component.c | 28 +- opal/mca/crs/self/crs_self_module.c | 40 +- opal/mca/crs/self/help-opal-crs-self.txt | 2 +- opal/mca/dstore/Makefile.am | 6 +- opal/mca/dstore/base/Makefile.am | 8 +- opal/mca/dstore/base/base.h | 8 +- opal/mca/dstore/base/dstore_base_frame.c | 8 +- opal/mca/dstore/base/dstore_base_select.c | 12 +- opal/mca/dstore/base/dstore_base_stubs.c | 8 +- opal/mca/dstore/base/help-dstore-base.txt | 2 +- opal/mca/dstore/dstore.h | 10 +- opal/mca/dstore/dstore_types.h | 6 +- opal/mca/dstore/hash/Makefile.am | 6 +- opal/mca/dstore/hash/dstore_hash.c | 8 +- opal/mca/dstore/hash/dstore_hash.h | 6 +- opal/mca/dstore/hash/dstore_hash_component.c | 6 +- opal/mca/event/Makefile.am | 6 +- opal/mca/event/base/Makefile.am | 4 +- opal/mca/event/base/README.openmpi | 2 +- opal/mca/event/base/base.h | 4 +- opal/mca/event/base/event_base_frame.c | 8 +- opal/mca/event/base/owner.txt | 2 +- opal/mca/event/configure.m4 | 10 +- opal/mca/event/event.h | 2 +- opal/mca/event/external/Makefile.am | 6 +- opal/mca/event/external/configure.m4 | 18 +- .../event/external/event_external_component.c | 6 +- opal/mca/event/external/external.h | 8 +- opal/mca/event/libevent2022/Makefile.am | 4 +- opal/mca/event/libevent2022/configure.m4 | 14 +- .../mca/event/libevent2022/libevent/ChangeLog | 4 +- opal/mca/event/libevent2022/libevent/Doxyfile | 164 +- .../libevent2022/libevent/Makefile.nmake | 2 +- .../libevent/bufferevent_openssl.c | 2 +- .../event/libevent2022/libevent/configure.ac | 4 +- opal/mca/event/libevent2022/libevent/http.c | 2 +- .../event/libevent2022/libevent/opal_rename.h | 4 +- .../libevent2022/libevent/test/regress.gen.c | 2 +- opal/mca/event/libevent2022/libevent2022.h | 6 +- .../libevent2022/libevent2022_component.c | 14 +- opal/mca/hwloc/Makefile.am | 6 +- opal/mca/hwloc/README.txt | 2 +- opal/mca/hwloc/base/Makefile.am | 4 +- opal/mca/hwloc/base/base.h | 12 +- opal/mca/hwloc/base/help-opal-hwloc-base.txt | 4 +- opal/mca/hwloc/base/hwloc_base_dt.c | 8 +- opal/mca/hwloc/base/hwloc_base_frame.c | 18 +- opal/mca/hwloc/base/hwloc_base_maffinity.c | 20 +- .../hwloc/base/hwloc_base_proc_mempolicy.c | 12 +- opal/mca/hwloc/base/hwloc_base_util.c | 74 +- opal/mca/hwloc/configure.m4 | 4 +- opal/mca/hwloc/external/Makefile.am | 4 +- opal/mca/hwloc/external/external.h | 6 +- .../hwloc/external/hwloc_external_component.c | 6 +- opal/mca/hwloc/hwloc.h | 2 +- opal/mca/hwloc/hwloc1110/Makefile.am | 4 +- opal/mca/hwloc/hwloc1110/configure.m4 | 12 +- opal/mca/hwloc/hwloc1110/hwloc/README | 8 +- .../mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 | 2 +- .../hwloc/contrib/hwloc-valgrind.supp | 2 +- .../hwloc/include/hwloc/autogen/config.h.in | 10 +- opal/mca/hwloc/hwloc1110/hwloc1110.h | 6 +- .../mca/hwloc/hwloc1110/hwloc1110_component.c | 6 +- opal/mca/if/Makefile.am | 6 +- opal/mca/if/base/Makefile.am | 6 +- opal/mca/if/base/base.h | 4 +- opal/mca/if/base/if_base_components.c | 8 +- opal/mca/if/bsdx_ipv4/Makefile.am | 6 +- opal/mca/if/bsdx_ipv4/configure.m4 | 8 +- opal/mca/if/bsdx_ipv4/if_bsdx.c | 12 +- opal/mca/if/bsdx_ipv6/Makefile.am | 4 +- opal/mca/if/bsdx_ipv6/configure.m4 | 10 +- opal/mca/if/bsdx_ipv6/if_bsdx_ipv6.c | 22 +- opal/mca/if/if.h | 4 +- opal/mca/if/linux_ipv6/Makefile.am | 4 +- opal/mca/if/linux_ipv6/configure.m4 | 8 +- opal/mca/if/linux_ipv6/if_linux_ipv6.c | 6 +- opal/mca/if/posix_ipv4/Makefile.am | 4 +- opal/mca/if/posix_ipv4/configure.m4 | 8 +- opal/mca/if/posix_ipv4/if_posix.c | 50 +- opal/mca/if/solaris_ipv6/Makefile.am | 4 +- opal/mca/if/solaris_ipv6/configure.m4 | 8 +- opal/mca/if/solaris_ipv6/if_solaris_ipv6.c | 4 +- opal/mca/installdirs/Makefile.am | 6 +- opal/mca/installdirs/base/Makefile.am | 6 +- opal/mca/installdirs/base/base.h | 6 +- .../base/installdirs_base_components.c | 60 +- .../base/installdirs_base_expand.c | 10 +- opal/mca/installdirs/config/Makefile.am | 8 +- opal/mca/installdirs/config/configure.m4 | 8 +- opal/mca/installdirs/config/install_dirs.h.in | 10 +- .../config/opal_installdirs_config.c | 6 +- opal/mca/installdirs/configure.m4 | 4 +- opal/mca/installdirs/env/Makefile.am | 8 +- opal/mca/installdirs/env/configure.m4 | 8 +- .../installdirs/env/opal_installdirs_env.c | 6 +- opal/mca/installdirs/installdirs.h | 6 +- opal/mca/mca.h | 28 +- opal/mca/memchecker/Makefile.am | 6 +- opal/mca/memchecker/base/Makefile.am | 6 +- opal/mca/memchecker/base/base.h | 8 +- .../memchecker/base/memchecker_base_open.c | 6 +- .../memchecker/base/memchecker_base_select.c | 6 +- .../base/memchecker_base_wrappers.c | 6 +- opal/mca/memchecker/configure.m4 | 6 +- opal/mca/memchecker/memchecker.h | 10 +- opal/mca/memchecker/valgrind/Makefile.am | 6 +- opal/mca/memchecker/valgrind/configure.m4 | 8 +- .../memchecker/valgrind/memchecker_valgrind.h | 6 +- .../valgrind/memchecker_valgrind_component.c | 6 +- opal/mca/memcpy/Makefile.am | 6 +- opal/mca/memcpy/base/Makefile.am | 4 +- opal/mca/memcpy/base/base.h | 4 +- opal/mca/memcpy/base/memcpy_base_default.h | 4 +- opal/mca/memcpy/base/memcpy_base_open.c | 4 +- opal/mca/memcpy/configure.m4 | 4 +- opal/mca/memcpy/memcpy.h | 4 +- opal/mca/memory/Makefile.am | 6 +- opal/mca/memory/base/Makefile.am | 6 +- opal/mca/memory/base/base.h | 6 +- opal/mca/memory/base/empty.h | 8 +- opal/mca/memory/base/memory_base_empty.c | 10 +- opal/mca/memory/base/memory_base_open.c | 8 +- opal/mca/memory/configure.m4 | 6 +- opal/mca/memory/linux/ChangeLog-ptmalloc2.txt | 2 +- opal/mca/memory/linux/Makefile.am | 6 +- opal/mca/memory/linux/README-open-mpi.txt | 2 +- opal/mca/memory/linux/arena.c | 4 +- opal/mca/memory/linux/configure.m4 | 22 +- .../memory/linux/help-opal-memory-linux.txt | 4 +- opal/mca/memory/linux/hooks.c | 12 +- opal/mca/memory/linux/malloc.c | 10 +- opal/mca/memory/linux/memory_linux.h | 4 +- .../mca/memory/linux/memory_linux_component.c | 12 +- opal/mca/memory/linux/memory_linux_munmap.c | 10 +- .../mca/memory/linux/memory_linux_ptmalloc2.c | 10 +- .../memory/linux/memory_linux_ummunotify.c | 34 +- opal/mca/memory/linux/public.h | 4 +- opal/mca/memory/linux/rename.h | 4 +- opal/mca/memory/malloc_solaris/Makefile.am | 6 +- opal/mca/memory/malloc_solaris/configure.m4 | 18 +- .../memory_malloc_solaris_component.c | 8 +- opal/mca/memory/memory.h | 10 +- opal/mca/mpool/Makefile.am | 6 +- opal/mca/mpool/base/Makefile.am | 6 +- opal/mca/mpool/base/base.h | 26 +- opal/mca/mpool/base/help-mpool-base.txt | 4 +- opal/mca/mpool/base/mpool_base_alloc.c | 32 +- opal/mca/mpool/base/mpool_base_frame.c | 26 +- opal/mca/mpool/base/mpool_base_init.c | 8 +- opal/mca/mpool/base/mpool_base_lookup.c | 34 +- opal/mca/mpool/base/mpool_base_mem_cb.c | 18 +- opal/mca/mpool/base/mpool_base_mem_cb.h | 6 +- opal/mca/mpool/base/mpool_base_tree.c | 52 +- opal/mca/mpool/base/mpool_base_tree.h | 38 +- opal/mca/mpool/gpusm/mpool_gpusm.h | 8 +- opal/mca/mpool/gpusm/mpool_gpusm_module.c | 8 +- opal/mca/mpool/grdma/mpool_grdma_component.c | 2 +- opal/mca/mpool/grdma/mpool_grdma_module.c | 2 +- opal/mca/mpool/mpool.h | 60 +- opal/mca/mpool/rgpusm/mpool_rgpusm_module.c | 8 +- opal/mca/mpool/sm/Makefile.am | 6 +- opal/mca/mpool/sm/mpool_sm.h | 4 +- opal/mca/mpool/sm/mpool_sm_component.c | 8 +- opal/mca/mpool/sm/mpool_sm_module.c | 34 +- opal/mca/pmix/Makefile.am | 6 +- opal/mca/pmix/base/Makefile.am | 8 +- opal/mca/pmix/base/base.h | 4 +- opal/mca/pmix/base/help-pmix-base.txt | 2 +- opal/mca/pmix/base/pmix_base_fns.c | 10 +- opal/mca/pmix/base/pmix_base_fns.h | 4 +- opal/mca/pmix/base/pmix_base_frame.c | 4 +- opal/mca/pmix/base/pmix_base_select.c | 6 +- opal/mca/pmix/cray/Makefile.am | 4 +- opal/mca/pmix/cray/configure.m4 | 6 +- opal/mca/pmix/cray/pmix_cray.c | 4 +- opal/mca/pmix/cray/pmix_cray.h | 4 +- opal/mca/pmix/cray/pmix_cray_component.c | 10 +- opal/mca/pmix/cray/pmix_cray_pmap_parser.c | 16 +- opal/mca/pmix/cray/pmix_cray_pmap_parser.h | 2 +- opal/mca/pmix/native/Makefile.am | 4 +- opal/mca/pmix/native/configure.m4 | 10 +- opal/mca/pmix/native/pmix_native.c | 2 +- opal/mca/pmix/native/pmix_native.h | 4 +- opal/mca/pmix/native/pmix_native_component.c | 6 +- opal/mca/pmix/native/usock.c | 12 +- opal/mca/pmix/native/usock_sendrecv.c | 26 +- opal/mca/pmix/pmix.h | 6 +- opal/mca/pmix/s1/Makefile.am | 4 +- opal/mca/pmix/s1/configure.m4 | 8 +- opal/mca/pmix/s1/pmix_s1.c | 4 +- opal/mca/pmix/s1/pmix_s1.h | 4 +- opal/mca/pmix/s1/pmix_s1_component.c | 8 +- opal/mca/pmix/s2/Makefile.am | 4 +- opal/mca/pmix/s2/configure.m4 | 8 +- opal/mca/pmix/s2/pmi2_pmap_parser.c | 16 +- opal/mca/pmix/s2/pmi2_pmap_parser.h | 2 +- opal/mca/pmix/s2/pmix_s2.c | 2 +- opal/mca/pmix/s2/pmix_s2.h | 4 +- opal/mca/pmix/s2/pmix_s2_component.c | 8 +- opal/mca/pstat/Makefile.am | 6 +- opal/mca/pstat/base/Makefile.am | 6 +- opal/mca/pstat/base/base.h | 6 +- opal/mca/pstat/base/pstat_base_open.c | 6 +- opal/mca/pstat/base/pstat_base_select.c | 10 +- opal/mca/pstat/configure.m4 | 6 +- opal/mca/pstat/linux/Makefile.am | 6 +- opal/mca/pstat/linux/configure.m4 | 14 +- opal/mca/pstat/linux/pstat_linux.h | 6 +- opal/mca/pstat/linux/pstat_linux_component.c | 8 +- opal/mca/pstat/linux/pstat_linux_module.c | 60 +- opal/mca/pstat/pstat.h | 6 +- opal/mca/pstat/test/Makefile.am | 6 +- opal/mca/pstat/test/configure.m4 | 12 +- opal/mca/pstat/test/pstat_test.c | 8 +- opal/mca/pstat/test/pstat_test.h | 6 +- opal/mca/pstat/test/pstat_test_component.c | 10 +- opal/mca/rcache/Makefile.am | 6 +- opal/mca/rcache/base/Makefile.am | 8 +- opal/mca/rcache/base/base.h | 12 +- opal/mca/rcache/base/rcache_base_create.c | 8 +- opal/mca/rcache/base/rcache_base_frame.c | 8 +- opal/mca/rcache/rcache.h | 28 +- opal/mca/rcache/vma/Makefile.am | 6 +- opal/mca/rcache/vma/rcache_vma.c | 44 +- opal/mca/rcache/vma/rcache_vma.h | 18 +- opal/mca/rcache/vma/rcache_vma_component.c | 16 +- opal/mca/rcache/vma/rcache_vma_tree.c | 36 +- opal/mca/rcache/vma/rcache_vma_tree.h | 32 +- opal/mca/sec/Makefile.am | 4 +- opal/mca/sec/base/Makefile.am | 4 +- opal/mca/sec/base/base.h | 4 +- opal/mca/sec/base/sec_base_frame.c | 10 +- opal/mca/sec/base/sec_base_select.c | 8 +- opal/mca/sec/base/sec_base_stubs.c | 14 +- opal/mca/sec/basic/Makefile.am | 4 +- opal/mca/sec/basic/sec_basic.c | 4 +- opal/mca/sec/basic/sec_basic.h | 4 +- opal/mca/sec/basic/sec_basic_component.c | 4 +- opal/mca/sec/keystone/Makefile.am | 4 +- opal/mca/sec/keystone/configure.m4 | 4 +- opal/mca/sec/keystone/sec_keystone.c | 4 +- opal/mca/sec/keystone/sec_keystone.h | 4 +- .../mca/sec/keystone/sec_keystone_component.c | 4 +- opal/mca/sec/munge/Makefile.am | 4 +- opal/mca/sec/munge/configure.m4 | 6 +- opal/mca/sec/munge/sec_munge.c | 18 +- opal/mca/sec/munge/sec_munge.h | 4 +- opal/mca/sec/munge/sec_munge_component.c | 4 +- opal/mca/sec/sec.h | 4 +- opal/mca/shmem/base/shmem_base_open.c | 2 +- opal/mca/timer/Makefile.am | 8 +- opal/mca/timer/aix/Makefile.am | 6 +- opal/mca/timer/aix/configure.m4 | 14 +- opal/mca/timer/aix/timer_aix.h | 6 +- opal/mca/timer/aix/timer_aix_component.c | 6 +- opal/mca/timer/altix/Makefile.am | 6 +- opal/mca/timer/altix/configure.m4 | 12 +- opal/mca/timer/altix/timer_altix.h | 6 +- opal/mca/timer/altix/timer_altix_component.c | 6 +- opal/mca/timer/base/Makefile.am | 6 +- opal/mca/timer/base/base.h | 6 +- opal/mca/timer/base/timer_base_null.h | 8 +- opal/mca/timer/base/timer_base_open.c | 6 +- opal/mca/timer/configure.m4 | 6 +- opal/mca/timer/darwin/Makefile.am | 6 +- opal/mca/timer/darwin/configure.m4 | 14 +- opal/mca/timer/darwin/timer_darwin.h | 6 +- .../mca/timer/darwin/timer_darwin_component.c | 8 +- opal/mca/timer/linux/Makefile.am | 6 +- opal/mca/timer/linux/configure.m4 | 12 +- .../mca/timer/linux/help-opal-timer-linux.txt | 4 +- opal/mca/timer/linux/timer_linux.h | 6 +- opal/mca/timer/linux/timer_linux_component.c | 6 +- opal/mca/timer/solaris/Makefile.am | 6 +- opal/mca/timer/solaris/configure.m4 | 14 +- opal/mca/timer/solaris/timer_solaris.h | 6 +- .../timer/solaris/timer_solaris_component.c | 6 +- opal/mca/timer/timer.h | 8 +- opal/memoryhooks/Makefile.am | 6 +- opal/memoryhooks/memory.c | 8 +- opal/memoryhooks/memory.h | 20 +- opal/memoryhooks/memory_internal.h | 6 +- opal/runtime/Makefile.am | 6 +- opal/runtime/help-opal-runtime.txt | 8 +- opal/runtime/help-opal_info.txt | 6 +- opal/runtime/opal.h | 10 +- opal/runtime/opal_cr.c | 36 +- opal/runtime/opal_cr.h | 22 +- opal/runtime/opal_finalize.c | 4 +- opal/runtime/opal_info_support.h | 12 +- opal/runtime/opal_init.c | 12 +- opal/runtime/opal_params.c | 14 +- opal/runtime/opal_params.h | 8 +- opal/runtime/opal_progress.c | 24 +- opal/runtime/opal_progress.h | 16 +- opal/runtime/opal_progress_threads.c | 6 +- opal/runtime/opal_progress_threads.h | 6 +- opal/threads/Makefile.am | 6 +- opal/threads/condition.c | 6 +- opal/threads/condition.h | 14 +- opal/threads/mutex.c | 8 +- opal/threads/mutex.h | 10 +- opal/threads/mutex_unix.h | 8 +- opal/threads/thread.c | 6 +- opal/threads/threads.h | 6 +- opal/threads/tsd.h | 12 +- opal/tools/Makefile.am | 6 +- opal/tools/opal-checkpoint/Makefile.am | 6 +- .../opal-checkpoint/help-opal-checkpoint.txt | 8 +- .../tools/opal-checkpoint/opal-checkpoint.1in | 4 +- opal/tools/opal-checkpoint/opal-checkpoint.c | 92 +- opal/tools/opal-restart/Makefile.am | 6 +- opal/tools/opal-restart/help-opal-restart.txt | 10 +- opal/tools/opal-restart/opal-restart.1in | 4 +- opal/tools/opal-restart/opal-restart.c | 60 +- opal/tools/wrappers/Makefile.am | 6 +- opal/tools/wrappers/generic_wrapper.1in | 10 +- opal/tools/wrappers/help-opal-wrapper.txt | 6 +- opal/tools/wrappers/opal.pc.in | 2 +- opal/tools/wrappers/opal_wrapper.1in | 8 +- opal/tools/wrappers/opal_wrapper.c | 36 +- opal/util/alfg.c | 42 +- opal/util/alfg.h | 6 +- opal/util/argv.c | 68 +- opal/util/argv.h | 16 +- opal/util/basename.c | 6 +- opal/util/basename.h | 12 +- opal/util/bit_ops.h | 12 +- opal/util/cmd_line.c | 78 +- opal/util/cmd_line.h | 52 +- opal/util/crc.c | 14 +- opal/util/crc.h | 40 +- opal/util/daemon_init.c | 8 +- opal/util/daemon_init.h | 6 +- opal/util/error.c | 10 +- opal/util/error.h | 8 +- opal/util/fd.c | 4 +- opal/util/fd.h | 4 +- opal/util/few.c | 14 +- opal/util/few.h | 8 +- opal/util/if.c | 68 +- opal/util/if.h | 30 +- opal/util/keyval/keyval_lex.h | 6 +- opal/util/keyval/keyval_lex.l | 10 +- opal/util/keyval_parse.h | 8 +- opal/util/malloc.c | 22 +- opal/util/malloc.h | 6 +- opal/util/net.c | 26 +- opal/util/net.h | 8 +- opal/util/numtostr.c | 16 +- opal/util/numtostr.h | 8 +- opal/util/opal_environ.c | 8 +- opal/util/opal_environ.h | 8 +- opal/util/opal_getcwd.c | 6 +- opal/util/opal_getcwd.h | 4 +- opal/util/opal_pty.c | 8 +- opal/util/opal_pty.h | 10 +- opal/util/os_dirpath.c | 26 +- opal/util/os_dirpath.h | 20 +- opal/util/os_path.c | 8 +- opal/util/os_path.h | 10 +- opal/util/output.c | 42 +- opal/util/output.h | 46 +- opal/util/path.c | 50 +- opal/util/path.h | 10 +- opal/util/printf.c | 6 +- opal/util/printf.h | 8 +- opal/util/proc.c | 6 +- opal/util/proc.h | 4 +- opal/util/qsort.c | 4 +- opal/util/qsort.h | 6 +- opal/util/show_help.c | 36 +- opal/util/show_help.h | 22 +- opal/util/show_help_lex.h | 6 +- opal/util/show_help_lex.l | 8 +- opal/util/stacktrace.c | 48 +- opal/util/stacktrace.h | 8 +- opal/util/strncpy.c | 6 +- opal/util/strncpy.h | 6 +- opal/util/sys_limits.c | 6 +- opal/util/sys_limits.h | 8 +- opal/util/timings.c | 10 +- opal/util/timings.h | 4 +- opal/util/uri.c | 4 +- opal/util/uri.h | 4 +- opal/win32/opal_inet.h | 6 +- opal/win32/opal_misc.h | 6 +- opal/win32/opal_process.c | 6 +- opal/win32/opal_socket.h | 6 +- opal/win32/opal_time.c | 6 +- opal/win32/opal_time.h | 4 +- opal/win32/opal_uio.c | 4 +- opal/win32/opal_uio.h | 2 +- opal/win32/opal_utsname.c | 20 +- opal/win32/opal_utsname.h | 6 +- opal/win32/win_compat.h | 26 +- opal/win_makefile | 18 +- orte/Doxyfile | 2 +- orte/Makefile.am | 6 +- orte/etc/Makefile.am | 8 +- orte/etc/openmpi-default-hostfile | 10 +- orte/include/Makefile.am | 10 +- orte/include/orte/Makefile.am | 6 +- orte/include/orte/version.h.in | 6 +- orte/mca/Makefile.am | 6 +- orte/mca/common/Makefile.am | 6 +- orte/mca/common/alps/Makefile.am | 6 +- orte/mca/common/alps/common_alps.c | 8 +- orte/mca/common/alps/common_alps.h | 4 +- orte/mca/common/alps/configure.m4 | 2 +- orte/mca/dfs/Makefile.am | 4 +- orte/mca/dfs/app/Makefile.am | 4 +- orte/mca/dfs/app/dfs_app.c | 10 +- orte/mca/dfs/app/dfs_app.h | 6 +- orte/mca/dfs/app/dfs_app_component.c | 14 +- orte/mca/dfs/base/Makefile.am | 4 +- orte/mca/dfs/base/base.h | 6 +- orte/mca/dfs/base/dfs_base_frame.c | 6 +- orte/mca/dfs/base/dfs_base_select.c | 6 +- orte/mca/dfs/dfs.h | 2 +- orte/mca/dfs/orted/Makefile.am | 4 +- orte/mca/dfs/orted/dfs_orted.c | 10 +- orte/mca/dfs/orted/dfs_orted.h | 6 +- orte/mca/dfs/orted/dfs_orted_component.c | 14 +- orte/mca/dfs/test/Makefile.am | 4 +- orte/mca/dfs/test/dfs_test.c | 12 +- orte/mca/dfs/test/dfs_test.h | 6 +- orte/mca/dfs/test/dfs_test_component.c | 16 +- orte/mca/errmgr/Makefile.am | 6 +- orte/mca/errmgr/base/Makefile.am | 8 +- orte/mca/errmgr/base/base.h | 8 +- orte/mca/errmgr/base/errmgr_base_fns.c | 16 +- orte/mca/errmgr/base/errmgr_base_frame.c | 6 +- orte/mca/errmgr/base/errmgr_base_select.c | 10 +- orte/mca/errmgr/base/errmgr_base_tool.c | 12 +- orte/mca/errmgr/base/errmgr_private.h | 6 +- orte/mca/errmgr/base/help-errmgr-base.txt | 6 +- orte/mca/errmgr/default_app/Makefile.am | 6 +- .../errmgr/default_app/errmgr_default_app.c | 8 +- .../errmgr/default_app/errmgr_default_app.h | 6 +- .../errmgr_default_app_component.c | 14 +- orte/mca/errmgr/default_hnp/Makefile.am | 6 +- .../errmgr/default_hnp/errmgr_default_hnp.c | 16 +- .../errmgr/default_hnp/errmgr_default_hnp.h | 6 +- .../errmgr_default_hnp_component.c | 10 +- orte/mca/errmgr/default_orted/Makefile.am | 6 +- .../default_orted/errmgr_default_orted.c | 10 +- .../default_orted/errmgr_default_orted.h | 6 +- .../errmgr_default_orted_component.c | 14 +- orte/mca/errmgr/default_tool/Makefile.am | 6 +- .../errmgr/default_tool/errmgr_default_tool.c | 8 +- .../errmgr/default_tool/errmgr_default_tool.h | 6 +- .../errmgr_default_tool_component.c | 14 +- orte/mca/errmgr/errmgr.h | 2 +- orte/mca/ess/Makefile.am | 6 +- orte/mca/ess/alps/Makefile.am | 6 +- orte/mca/ess/alps/configure.m4 | 2 +- orte/mca/ess/alps/ess_alps.h | 6 +- orte/mca/ess/alps/ess_alps_utils.c | 4 +- orte/mca/ess/base/Makefile.am | 6 +- orte/mca/ess/base/base.h | 8 +- orte/mca/ess/base/ess_base_fns.c | 10 +- orte/mca/ess/base/ess_base_frame.c | 6 +- orte/mca/ess/base/ess_base_get.c | 6 +- orte/mca/ess/base/ess_base_select.c | 8 +- orte/mca/ess/base/ess_base_std_prolog.c | 14 +- orte/mca/ess/base/help-ess-base.txt | 6 +- orte/mca/ess/env/Makefile.am | 6 +- orte/mca/ess/env/ess_env.h | 6 +- orte/mca/ess/env/ess_env_component.c | 8 +- orte/mca/ess/env/ess_env_module.c | 16 +- orte/mca/ess/ess.h | 8 +- orte/mca/ess/hnp/Makefile.am | 6 +- orte/mca/ess/hnp/ess_hnp.h | 6 +- orte/mca/ess/hnp/ess_hnp_component.c | 8 +- orte/mca/ess/lsf/Makefile.am | 6 +- orte/mca/ess/lsf/configure.m4 | 10 +- orte/mca/ess/lsf/ess_lsf.h | 8 +- orte/mca/ess/lsf/ess_lsf_component.c | 10 +- orte/mca/ess/lsf/ess_lsf_module.c | 24 +- orte/mca/ess/pmi/Makefile.am | 4 +- orte/mca/ess/pmi/ess_pmi.h | 4 +- orte/mca/ess/pmi/ess_pmi_component.c | 6 +- orte/mca/ess/pmi/ess_pmi_module.c | 16 +- orte/mca/ess/singleton/Makefile.am | 6 +- orte/mca/ess/singleton/ess_singleton.h | 6 +- .../ess/singleton/ess_singleton_component.c | 12 +- orte/mca/ess/singleton/ess_singleton_module.c | 36 +- orte/mca/ess/slurm/Makefile.am | 6 +- orte/mca/ess/slurm/configure.m4 | 10 +- orte/mca/ess/slurm/ess_slurm.h | 6 +- orte/mca/ess/slurm/ess_slurm_component.c | 10 +- orte/mca/ess/slurm/ess_slurm_module.c | 36 +- orte/mca/ess/tm/Makefile.am | 6 +- orte/mca/ess/tm/configure.m4 | 10 +- orte/mca/ess/tm/ess_tm.h | 6 +- orte/mca/ess/tm/ess_tm_component.c | 10 +- orte/mca/ess/tm/ess_tm_module.c | 28 +- orte/mca/ess/tool/Makefile.am | 6 +- orte/mca/ess/tool/ess_tool.h | 6 +- orte/mca/ess/tool/ess_tool_component.c | 8 +- orte/mca/ess/tool/ess_tool_module.c | 30 +- orte/mca/filem/Makefile.am | 6 +- orte/mca/filem/base/Makefile.am | 6 +- orte/mca/filem/base/base.h | 6 +- orte/mca/filem/base/filem_base_fns.c | 6 +- orte/mca/filem/base/filem_base_frame.c | 6 +- orte/mca/filem/base/filem_base_receive.c | 16 +- orte/mca/filem/base/filem_base_select.c | 6 +- orte/mca/filem/filem.h | 34 +- orte/mca/filem/orte_filem.7in | 4 +- orte/mca/filem/raw/Makefile.am | 6 +- orte/mca/filem/raw/filem_raw.h | 4 +- orte/mca/filem/raw/filem_raw_component.c | 8 +- orte/mca/filem/raw/filem_raw_module.c | 18 +- orte/mca/grpcomm/Makefile.am | 6 +- orte/mca/grpcomm/base/grpcomm_base_select.c | 6 +- orte/mca/grpcomm/brks/Makefile.am | 6 +- orte/mca/grpcomm/brks/grpcomm_brks.h | 6 +- orte/mca/grpcomm/direct/Makefile.am | 6 +- orte/mca/grpcomm/direct/grpcomm_direct.c | 8 +- orte/mca/grpcomm/direct/grpcomm_direct.h | 6 +- orte/mca/grpcomm/rcd/Makefile.am | 6 +- orte/mca/grpcomm/rcd/grpcomm_rcd.h | 6 +- orte/mca/iof/Makefile.am | 6 +- orte/mca/iof/README.txt | 14 +- orte/mca/iof/base/Makefile.am | 6 +- orte/mca/iof/base/base.h | 10 +- orte/mca/iof/base/iof_base_frame.c | 14 +- orte/mca/iof/base/iof_base_output.c | 28 +- orte/mca/iof/base/iof_base_select.c | 12 +- orte/mca/iof/base/iof_base_setup.c | 12 +- orte/mca/iof/base/iof_base_setup.h | 6 +- orte/mca/iof/hnp/Makefile.am | 6 +- orte/mca/iof/hnp/iof_hnp.c | 78 +- orte/mca/iof/hnp/iof_hnp.h | 12 +- orte/mca/iof/hnp/iof_hnp_component.c | 12 +- orte/mca/iof/hnp/iof_hnp_read.c | 34 +- orte/mca/iof/hnp/iof_hnp_receive.c | 28 +- orte/mca/iof/hnp/iof_hnp_send.c | 14 +- orte/mca/iof/iof.h | 6 +- orte/mca/iof/iof_types.h | 6 +- orte/mca/iof/mr_hnp/Makefile.am | 4 +- orte/mca/iof/mr_hnp/iof_mrhnp.c | 52 +- orte/mca/iof/mr_hnp/iof_mrhnp.h | 10 +- orte/mca/iof/mr_hnp/iof_mrhnp_component.c | 8 +- orte/mca/iof/mr_hnp/iof_mrhnp_read.c | 24 +- orte/mca/iof/mr_hnp/iof_mrhnp_receive.c | 18 +- orte/mca/iof/mr_orted/Makefile.am | 4 +- orte/mca/iof/mr_orted/iof_mrorted.c | 38 +- orte/mca/iof/mr_orted/iof_mrorted.h | 8 +- orte/mca/iof/mr_orted/iof_mrorted_component.c | 6 +- orte/mca/iof/mr_orted/iof_mrorted_read.c | 30 +- orte/mca/iof/mr_orted/iof_mrorted_receive.c | 20 +- orte/mca/iof/orted/Makefile.am | 6 +- orte/mca/iof/orted/iof_orted.c | 48 +- orte/mca/iof/orted/iof_orted.h | 12 +- orte/mca/iof/orted/iof_orted_component.c | 8 +- orte/mca/iof/orted/iof_orted_read.c | 32 +- orte/mca/iof/orted/iof_orted_receive.c | 24 +- orte/mca/iof/tool/Makefile.am | 6 +- orte/mca/iof/tool/iof_tool.c | 46 +- orte/mca/iof/tool/iof_tool.h | 8 +- orte/mca/iof/tool/iof_tool_component.c | 10 +- orte/mca/iof/tool/iof_tool_receive.c | 24 +- orte/mca/mca.h | 10 +- orte/mca/notifier/Makefile.am | 8 +- orte/mca/notifier/base/Makefile.am | 2 +- orte/mca/notifier/base/notifier_base_fns.c | 28 +- orte/mca/notifier/base/notifier_base_frame.c | 10 +- orte/mca/notifier/base/notifier_base_select.c | 18 +- orte/mca/notifier/notifier.h | 2 +- orte/mca/notifier/smtp/Makefile.am | 6 +- orte/mca/notifier/smtp/configure.m4 | 6 +- .../notifier/smtp/help-orte-notifier-smtp.txt | 4 +- orte/mca/notifier/smtp/notifier_smtp.h | 10 +- .../notifier/smtp/notifier_smtp_component.c | 10 +- orte/mca/notifier/smtp/notifier_smtp_module.c | 20 +- orte/mca/notifier/syslog/Makefile.am | 6 +- orte/mca/notifier/syslog/notifier_syslog.h | 8 +- .../syslog/notifier_syslog_component.c | 6 +- .../notifier/syslog/notifier_syslog_module.c | 8 +- orte/mca/odls/Makefile.am | 6 +- orte/mca/odls/alps/Makefile.am | 10 +- orte/mca/odls/alps/configure.m4 | 10 +- orte/mca/odls/alps/help-orte-odls-alps.txt | 6 +- orte/mca/odls/alps/odls_alps_component.c | 6 +- orte/mca/odls/alps/odls_alps_module.c | 84 +- orte/mca/odls/alps/odls_alps_utils.c | 14 +- orte/mca/odls/base/Makefile.am | 6 +- orte/mca/odls/base/base.h | 6 +- orte/mca/odls/base/help-orte-odls-base.txt | 4 +- orte/mca/odls/base/odls_base_default_fns.c | 142 +- orte/mca/odls/base/odls_base_frame.c | 12 +- orte/mca/odls/base/odls_base_select.c | 6 +- orte/mca/odls/base/odls_private.h | 8 +- orte/mca/odls/default/Makefile.am | 6 +- orte/mca/odls/default/configure.m4 | 6 +- .../odls/default/help-orte-odls-default.txt | 6 +- .../mca/odls/default/odls_default_component.c | 8 +- orte/mca/odls/default/odls_default_module.c | 84 +- orte/mca/odls/odls.h | 2 +- orte/mca/odls/odls_types.h | 12 +- orte/mca/oob/Makefile.am | 6 +- orte/mca/oob/alps/Makefile.am | 6 +- orte/mca/oob/alps/configure.m4 | 10 +- orte/mca/oob/alps/oob_alps_component.c | 2 +- orte/mca/oob/base/Makefile.am | 6 +- orte/mca/oob/base/base.h | 34 +- orte/mca/oob/base/help-oob-base.txt | 6 +- orte/mca/oob/base/oob_base_frame.c | 6 +- orte/mca/oob/base/oob_base_select.c | 10 +- orte/mca/oob/base/oob_base_stubs.c | 34 +- orte/mca/oob/oob.h | 6 +- orte/mca/oob/tcp/Makefile.am | 6 +- orte/mca/oob/tcp/configure.m4 | 10 +- orte/mca/oob/tcp/help-oob-tcp.txt | 6 +- orte/mca/oob/tcp/oob_tcp.h | 8 +- orte/mca/oob/tcp/oob_tcp_common.c | 38 +- orte/mca/oob/tcp/oob_tcp_common.h | 8 +- orte/mca/oob/tcp/oob_tcp_component.c | 2 +- orte/mca/oob/tcp/oob_tcp_component.h | 8 +- orte/mca/oob/tcp/oob_tcp_connection.c | 56 +- orte/mca/oob/tcp/oob_tcp_connection.h | 8 +- orte/mca/oob/tcp/oob_tcp_listener.c | 56 +- orte/mca/oob/tcp/oob_tcp_listener.h | 8 +- orte/mca/oob/tcp/oob_tcp_peer.h | 10 +- orte/mca/oob/tcp/oob_tcp_ping.h | 8 +- orte/mca/oob/ud/Makefile.am | 6 +- orte/mca/oob/ud/configure.m4 | 6 +- orte/mca/oob/usock/Makefile.am | 6 +- orte/mca/oob/usock/configure.m4 | 10 +- orte/mca/oob/usock/help-oob-usock.txt | 6 +- orte/mca/oob/usock/oob_usock.c | 6 +- orte/mca/oob/usock/oob_usock.h | 10 +- orte/mca/oob/usock/oob_usock_component.h | 8 +- orte/mca/oob/usock/oob_usock_connection.h | 8 +- orte/mca/oob/usock/oob_usock_peer.h | 10 +- orte/mca/oob/usock/oob_usock_ping.h | 8 +- orte/mca/plm/Makefile.am | 6 +- orte/mca/plm/alps/Makefile.am | 6 +- orte/mca/plm/alps/configure.m4 | 6 +- orte/mca/plm/alps/help-plm-alps.txt | 6 +- orte/mca/plm/alps/plm_alps.h | 8 +- orte/mca/plm/alps/plm_alps_component.c | 10 +- orte/mca/plm/alps/plm_alps_module.c | 42 +- orte/mca/plm/base/Makefile.am | 6 +- orte/mca/plm/base/base.h | 6 +- orte/mca/plm/base/help-plm-base.txt | 6 +- orte/mca/plm/base/plm_base_frame.c | 10 +- orte/mca/plm/base/plm_base_jobid.c | 30 +- orte/mca/plm/base/plm_base_launch_support.c | 66 +- orte/mca/plm/base/plm_base_orted_cmds.c | 16 +- orte/mca/plm/base/plm_base_proxy.c | 60 +- orte/mca/plm/base/plm_base_receive.c | 40 +- orte/mca/plm/base/plm_base_select.c | 10 +- orte/mca/plm/base/plm_private.h | 10 +- orte/mca/plm/isolated/Makefile.am | 6 +- orte/mca/plm/isolated/configure.m4 | 6 +- orte/mca/plm/isolated/plm_isolated.c | 12 +- orte/mca/plm/isolated/plm_isolated.h | 2 +- .../mca/plm/isolated/plm_isolated_component.c | 10 +- orte/mca/plm/lsf/Makefile.am | 8 +- orte/mca/plm/lsf/configure.m4 | 10 +- orte/mca/plm/lsf/help-plm-lsf.txt | 6 +- orte/mca/plm/lsf/plm_lsf.h | 6 +- orte/mca/plm/lsf/plm_lsf_component.c | 10 +- orte/mca/plm/lsf/plm_lsf_module.c | 30 +- orte/mca/plm/plm.h | 2 +- orte/mca/plm/plm_types.h | 2 +- orte/mca/plm/rsh/Makefile.am | 6 +- orte/mca/plm/rsh/configure.m4 | 6 +- orte/mca/plm/rsh/help-plm-rsh.txt | 8 +- orte/mca/plm/rsh/plm_rsh.h | 2 +- orte/mca/plm/rsh/plm_rsh_component.c | 40 +- orte/mca/plm/rsh/plm_rsh_module.c | 250 +- orte/mca/plm/slurm/Makefile.am | 6 +- orte/mca/plm/slurm/configure.m4 | 10 +- orte/mca/plm/slurm/help-plm-slurm.txt | 6 +- orte/mca/plm/slurm/plm_slurm.h | 6 +- orte/mca/plm/slurm/plm_slurm_component.c | 10 +- orte/mca/plm/slurm/plm_slurm_module.c | 44 +- orte/mca/plm/tm/Makefile.am | 8 +- orte/mca/plm/tm/configure.m4 | 10 +- orte/mca/plm/tm/help-plm-tm.txt | 6 +- orte/mca/plm/tm/plm_tm.h | 6 +- orte/mca/plm/tm/plm_tm_component.c | 8 +- orte/mca/plm/tm/plm_tm_module.c | 68 +- orte/mca/qos/Makefile.am | 4 +- orte/mca/qos/ack/Makefile.am | 8 +- orte/mca/qos/ack/qos_ack_component.c | 4 +- orte/mca/qos/base/Makefile.am | 4 +- orte/mca/qos/base/help-qos-base.txt | 4 +- orte/mca/qos/noop/Makefile.am | 8 +- orte/mca/qos/noop/qos_noop_channel_handlers.c | 110 +- orte/mca/qos/noop/qos_noop_component.c | 2 +- orte/mca/ras/Makefile.am | 6 +- orte/mca/ras/alps/Makefile.am | 8 +- orte/mca/ras/alps/configure.m4 | 6 +- orte/mca/ras/alps/help-ras-alps.txt | 8 +- orte/mca/ras/alps/ras_alps_component.c | 2 +- orte/mca/ras/alps/ras_alps_module.c | 4 +- orte/mca/ras/base/Makefile.am | 6 +- orte/mca/ras/base/base.h | 8 +- orte/mca/ras/base/help-ras-base.txt | 6 +- orte/mca/ras/base/ras_base_allocate.c | 58 +- orte/mca/ras/base/ras_base_close.c | 10 +- orte/mca/ras/base/ras_base_frame.c | 10 +- orte/mca/ras/base/ras_base_node.c | 10 +- orte/mca/ras/base/ras_base_select.c | 8 +- orte/mca/ras/base/ras_private.h | 10 +- orte/mca/ras/gridengine/Makefile.am | 6 +- orte/mca/ras/gridengine/configure.m4 | 6 +- .../ras/gridengine/help-ras-gridengine.txt | 10 +- orte/mca/ras/gridengine/ras_gridengine.h | 8 +- .../ras/gridengine/ras_gridengine_component.c | 10 +- .../ras/gridengine/ras_gridengine_module.c | 22 +- orte/mca/ras/loadleveler/Makefile.am | 8 +- orte/mca/ras/loadleveler/configure.m4 | 8 +- orte/mca/ras/loadleveler/ras_loadleveler.h | 6 +- .../loadleveler/ras_loadleveler_component.c | 8 +- .../ras/loadleveler/ras_loadleveler_module.c | 12 +- orte/mca/ras/lsf/Makefile.am | 6 +- orte/mca/ras/lsf/configure.m4 | 8 +- orte/mca/ras/lsf/help-ras-lsf.txt | 6 +- orte/mca/ras/lsf/ras_lsf.h | 8 +- orte/mca/ras/lsf/ras_lsf_component.c | 8 +- orte/mca/ras/lsf/ras_lsf_module.c | 20 +- orte/mca/ras/ras.h | 14 +- orte/mca/ras/ras_types.h | 6 +- orte/mca/ras/simulator/Makefile.am | 6 +- orte/mca/ras/simulator/ras_sim.h | 4 +- orte/mca/ras/simulator/ras_sim_component.c | 8 +- orte/mca/ras/simulator/ras_sim_module.c | 20 +- orte/mca/ras/slurm/Makefile.am | 8 +- orte/mca/ras/slurm/configure.m4 | 10 +- orte/mca/ras/slurm/help-ras-slurm.txt | 10 +- orte/mca/ras/slurm/ras_slurm.h | 6 +- orte/mca/ras/slurm/ras_slurm_component.c | 10 +- orte/mca/ras/slurm/ras_slurm_module.c | 90 +- orte/mca/ras/tm/Makefile.am | 8 +- orte/mca/ras/tm/configure.m4 | 8 +- orte/mca/ras/tm/help-ras-tm.txt | 6 +- orte/mca/ras/tm/ras_tm.h | 8 +- orte/mca/ras/tm/ras_tm_component.c | 10 +- orte/mca/ras/tm/ras_tm_module.c | 26 +- orte/mca/rmaps/Makefile.am | 6 +- orte/mca/rmaps/base/Makefile.am | 8 +- orte/mca/rmaps/base/base.h | 14 +- orte/mca/rmaps/base/help-orte-rmaps-base.txt | 18 +- orte/mca/rmaps/base/rmaps_base_binding.c | 4 +- orte/mca/rmaps/base/rmaps_base_frame.c | 12 +- orte/mca/rmaps/base/rmaps_base_map_job.c | 18 +- orte/mca/rmaps/base/rmaps_base_print_fns.c | 10 +- orte/mca/rmaps/base/rmaps_base_ranking.c | 20 +- orte/mca/rmaps/base/rmaps_base_select.c | 6 +- orte/mca/rmaps/base/rmaps_base_support_fns.c | 24 +- orte/mca/rmaps/base/rmaps_private.h | 6 +- orte/mca/rmaps/mindist/Makefile.am | 6 +- orte/mca/rmaps/mindist/configure.m4 | 4 +- orte/mca/rmaps/mindist/help-orte-rmaps-md.txt | 12 +- orte/mca/rmaps/mindist/rmaps_mindist.h | 8 +- .../rmaps/mindist/rmaps_mindist_component.c | 10 +- orte/mca/rmaps/mindist/rmaps_mindist_module.c | 30 +- orte/mca/rmaps/ppr/Makefile.am | 4 +- orte/mca/rmaps/ppr/help-orte-rmaps-ppr.txt | 4 +- orte/mca/rmaps/ppr/rmaps_ppr.c | 8 +- orte/mca/rmaps/ppr/rmaps_ppr.h | 4 +- orte/mca/rmaps/ppr/rmaps_ppr_component.c | 6 +- orte/mca/rmaps/rank_file/Makefile.am | 8 +- orte/mca/rmaps/rank_file/configure.m4 | 4 +- orte/mca/rmaps/rank_file/rmaps_rank_file.c | 62 +- orte/mca/rmaps/rank_file/rmaps_rank_file.h | 8 +- .../rank_file/rmaps_rank_file_component.c | 10 +- .../mca/rmaps/rank_file/rmaps_rank_file_lex.h | 6 +- .../mca/rmaps/rank_file/rmaps_rank_file_lex.l | 34 +- orte/mca/rmaps/resilient/Makefile.am | 6 +- .../resilient/help-orte-rmaps-resilient.txt | 4 +- orte/mca/rmaps/resilient/rmaps_resilient.c | 24 +- orte/mca/rmaps/resilient/rmaps_resilient.h | 8 +- .../resilient/rmaps_resilient_component.c | 20 +- orte/mca/rmaps/rmaps.h | 14 +- orte/mca/rmaps/rmaps_types.h | 6 +- orte/mca/rmaps/round_robin/Makefile.am | 6 +- .../rmaps/round_robin/help-orte-rmaps-rr.txt | 8 +- orte/mca/rmaps/round_robin/rmaps_rr.c | 16 +- orte/mca/rmaps/round_robin/rmaps_rr.h | 8 +- .../rmaps/round_robin/rmaps_rr_component.c | 8 +- orte/mca/rmaps/round_robin/rmaps_rr_mappers.c | 2 +- orte/mca/rmaps/seq/Makefile.am | 6 +- orte/mca/rmaps/seq/help-orte-rmaps-seq.txt | 8 +- orte/mca/rmaps/seq/rmaps_seq.c | 26 +- orte/mca/rmaps/seq/rmaps_seq.h | 10 +- orte/mca/rmaps/seq/rmaps_seq_component.c | 6 +- orte/mca/rmaps/staged/Makefile.am | 4 +- orte/mca/rmaps/staged/rmaps_staged.c | 10 +- orte/mca/rmaps/staged/rmaps_staged.h | 4 +- .../mca/rmaps/staged/rmaps_staged_component.c | 6 +- orte/mca/rml/Makefile.am | 6 +- orte/mca/rml/base/rml_base_contact.c | 16 +- orte/mca/rml/base/rml_contact.h | 10 +- orte/mca/rml/ftrm/Makefile.am | 6 +- orte/mca/rml/ftrm/configure.m4 | 6 +- orte/mca/rml/ftrm/rml_ftrm.h | 10 +- orte/mca/rml/ftrm/rml_ftrm_module.c | 8 +- orte/mca/rml/oob/Makefile.am | 6 +- orte/mca/rml/oob/rml_oob_contact.c | 8 +- orte/mca/rml/oob/rml_oob_exception.c | 6 +- orte/mca/rml/oob/rml_oob_ping.c | 8 +- orte/mca/rml/oob/rml_oob_recv.c | 12 +- orte/mca/routed/Makefile.am | 6 +- orte/mca/routed/base/Makefile.am | 6 +- orte/mca/routed/base/base.h | 6 +- orte/mca/routed/base/routed_base_fns.c | 24 +- orte/mca/routed/base/routed_base_frame.c | 10 +- orte/mca/routed/binomial/Makefile.am | 8 +- orte/mca/routed/binomial/routed_binomial.c | 134 +- orte/mca/routed/binomial/routed_binomial.h | 6 +- .../binomial/routed_binomial_component.c | 4 +- orte/mca/routed/debruijn/Makefile.am | 8 +- orte/mca/routed/debruijn/routed_debruijn.c | 112 +- orte/mca/routed/debruijn/routed_debruijn.h | 6 +- .../debruijn/routed_debruijn_component.c | 6 +- orte/mca/routed/direct/Makefile.am | 6 +- orte/mca/routed/direct/routed_direct.c | 58 +- orte/mca/routed/direct/routed_direct.h | 6 +- .../routed/direct/routed_direct_component.c | 6 +- orte/mca/routed/radix/Makefile.am | 6 +- orte/mca/routed/radix/routed_radix.c | 136 +- orte/mca/routed/radix/routed_radix.h | 6 +- .../mca/routed/radix/routed_radix_component.c | 6 +- orte/mca/routed/routed.h | 4 +- orte/mca/routed/routed_types.h | 4 +- orte/mca/rtc/Makefile.am | 4 +- orte/mca/rtc/base/Makefile.am | 4 +- orte/mca/rtc/base/base.h | 6 +- orte/mca/rtc/base/help-orte-rtc-base.txt | 18 +- orte/mca/rtc/base/rtc_base_frame.c | 4 +- orte/mca/rtc/base/rtc_base_select.c | 6 +- orte/mca/rtc/base/rtc_base_stubs.c | 8 +- orte/mca/rtc/freq/Makefile.am | 4 +- orte/mca/rtc/freq/configure.m4 | 4 +- orte/mca/rtc/freq/rtc_freq.c | 10 +- orte/mca/rtc/freq/rtc_freq.h | 4 +- orte/mca/rtc/freq/rtc_freq_component.c | 6 +- orte/mca/rtc/hwloc/Makefile.am | 4 +- orte/mca/rtc/hwloc/configure.m4 | 4 +- orte/mca/rtc/hwloc/rtc_hwloc.c | 18 +- orte/mca/rtc/hwloc/rtc_hwloc.h | 4 +- orte/mca/rtc/hwloc/rtc_hwloc_component.c | 6 +- orte/mca/rtc/rtc.h | 6 +- orte/mca/schizo/Makefile.am | 4 +- orte/mca/schizo/base/Makefile.am | 4 +- orte/mca/schizo/base/base.h | 4 +- orte/mca/schizo/base/schizo_base_frame.c | 4 +- orte/mca/schizo/base/schizo_base_select.c | 4 +- orte/mca/schizo/base/schizo_base_stubs.c | 10 +- orte/mca/schizo/ompi/Makefile.am | 4 +- orte/mca/schizo/ompi/schizo_ompi.c | 38 +- orte/mca/schizo/ompi/schizo_ompi.h | 4 +- orte/mca/schizo/schizo.h | 8 +- orte/mca/snapc/Makefile.am | 6 +- orte/mca/snapc/base/Makefile.am | 6 +- orte/mca/snapc/base/base.h | 6 +- orte/mca/snapc/base/snapc_base_fns.c | 8 +- orte/mca/snapc/base/snapc_base_frame.c | 6 +- orte/mca/snapc/base/snapc_base_select.c | 8 +- orte/mca/snapc/full/Makefile.am | 6 +- orte/mca/snapc/full/configure.m4 | 6 +- orte/mca/snapc/full/snapc_full.h | 8 +- orte/mca/snapc/full/snapc_full_component.c | 22 +- orte/mca/snapc/full/snapc_full_module.c | 30 +- orte/mca/snapc/orte_snapc.7in | 4 +- orte/mca/snapc/snapc.h | 10 +- orte/mca/sstore/Makefile.am | 4 +- orte/mca/sstore/base/Makefile.am | 4 +- orte/mca/sstore/base/base.h | 4 +- orte/mca/sstore/base/sstore_base_fns.c | 28 +- orte/mca/sstore/base/sstore_base_frame.c | 4 +- orte/mca/sstore/base/sstore_base_select.c | 4 +- orte/mca/sstore/central/Makefile.am | 4 +- orte/mca/sstore/central/configure.m4 | 4 +- orte/mca/sstore/central/sstore_central.h | 6 +- orte/mca/sstore/central/sstore_central_app.c | 6 +- .../sstore/central/sstore_central_component.c | 16 +- .../sstore/central/sstore_central_global.c | 6 +- .../mca/sstore/central/sstore_central_local.c | 4 +- .../sstore/central/sstore_central_module.c | 4 +- orte/mca/sstore/orte_sstore.7in | 4 +- orte/mca/sstore/sstore.h | 24 +- orte/mca/sstore/stage/Makefile.am | 4 +- orte/mca/sstore/stage/configure.m4 | 4 +- orte/mca/sstore/stage/sstore_stage.h | 6 +- orte/mca/sstore/stage/sstore_stage_app.c | 4 +- .../mca/sstore/stage/sstore_stage_component.c | 30 +- orte/mca/sstore/stage/sstore_stage_global.c | 8 +- orte/mca/sstore/stage/sstore_stage_local.c | 6 +- orte/mca/sstore/stage/sstore_stage_module.c | 4 +- orte/mca/state/Makefile.am | 4 +- orte/mca/state/app/Makefile.am | 4 +- orte/mca/state/app/state_app.c | 4 +- orte/mca/state/app/state_app.h | 6 +- orte/mca/state/app/state_app_component.c | 14 +- orte/mca/state/base/Makefile.am | 4 +- orte/mca/state/base/base.h | 4 +- orte/mca/state/base/state_base_fns.c | 10 +- orte/mca/state/base/state_base_frame.c | 4 +- orte/mca/state/base/state_base_select.c | 4 +- orte/mca/state/base/state_private.h | 4 +- orte/mca/state/dvm/Makefile.am | 4 +- orte/mca/state/dvm/state_dvm.c | 14 +- orte/mca/state/dvm/state_dvm.h | 6 +- orte/mca/state/dvm/state_dvm_component.c | 14 +- orte/mca/state/hnp/Makefile.am | 4 +- orte/mca/state/hnp/state_hnp.c | 4 +- orte/mca/state/hnp/state_hnp.h | 6 +- orte/mca/state/hnp/state_hnp_component.c | 14 +- orte/mca/state/novm/Makefile.am | 4 +- orte/mca/state/novm/state_novm.c | 6 +- orte/mca/state/novm/state_novm.h | 6 +- orte/mca/state/novm/state_novm_component.c | 16 +- orte/mca/state/orted/Makefile.am | 4 +- orte/mca/state/orted/state_orted.c | 4 +- orte/mca/state/orted/state_orted.h | 6 +- orte/mca/state/orted/state_orted_component.c | 14 +- orte/mca/state/staged_hnp/Makefile.am | 4 +- .../staged_hnp/help-state-staged-hnp.txt | 4 +- orte/mca/state/staged_hnp/state_staged_hnp.c | 6 +- orte/mca/state/staged_hnp/state_staged_hnp.h | 6 +- .../staged_hnp/state_staged_hnp_component.c | 16 +- orte/mca/state/staged_orted/Makefile.am | 4 +- .../state/staged_orted/state_staged_orted.c | 6 +- .../state/staged_orted/state_staged_orted.h | 6 +- .../state_staged_orted_component.c | 14 +- orte/mca/state/state.h | 4 +- orte/mca/state/state_types.h | 4 +- orte/mca/state/tool/Makefile.am | 4 +- orte/mca/state/tool/state_tool.c | 4 +- orte/mca/state/tool/state_tool.h | 6 +- orte/mca/state/tool/state_tool_component.c | 16 +- orte/orted/Makefile.am | 6 +- orte/orted/help-orted.txt | 8 +- orte/orted/orted.h | 6 +- orte/orted/orted_comm.c | 90 +- orte/orted/orted_main.c | 64 +- orte/orted/pmix/Makefile.am | 4 +- orte/orted/pmix/pmix_server.c | 2 +- orte/orted/pmix/pmix_server.h | 10 +- orte/orted/pmix/pmix_server_connection.c | 22 +- orte/orted/pmix/pmix_server_internal.h | 10 +- orte/runtime/Makefile.am | 6 +- .../data_type_support/orte_dt_support.h | 18 +- orte/runtime/help-orte-runtime.txt | 6 +- orte/runtime/orte_cr.c | 32 +- orte/runtime/orte_cr.h | 10 +- orte/runtime/orte_data_server.c | 86 +- orte/runtime/orte_data_server.h | 6 +- orte/runtime/orte_finalize.c | 12 +- orte/runtime/orte_globals.c | 64 +- orte/runtime/orte_globals.h | 8 +- orte/runtime/orte_info_support.c | 14 +- orte/runtime/orte_info_support.h | 6 +- orte/runtime/orte_init.c | 18 +- orte/runtime/orte_locks.h | 6 +- orte/runtime/orte_mca_params.c | 52 +- orte/runtime/orte_quit.c | 24 +- orte/runtime/orte_quit.h | 10 +- orte/runtime/orte_wait.c | 10 +- orte/runtime/orte_wait.h | 8 +- orte/runtime/runtime.h | 8 +- orte/runtime/runtime_internals.h | 6 +- orte/test/mpi/Makefile.include | 6 +- orte/test/mpi/accept.c | 14 +- orte/test/mpi/bcast_loop.c | 2 +- orte/test/mpi/concurrent_spawn.c | 6 +- orte/test/mpi/connect.c | 12 +- orte/test/mpi/crisscross.c | 18 +- orte/test/mpi/debugger.c | 4 +- orte/test/mpi/delayed_abort.c | 4 +- orte/test/mpi/early_abort.c | 4 +- orte/test/mpi/hello_nodename.c | 2 +- orte/test/mpi/hello_output.c | 4 +- orte/test/mpi/hello_show_help.c | 8 +- orte/test/mpi/info_spawn.c | 4 +- orte/test/mpi/intercomm_create.c | 14 +- orte/test/mpi/loop_child.c | 8 +- orte/test/mpi/loop_spawn.c | 6 +- orte/test/mpi/makedata.pl | 2 +- orte/test/mpi/parallel_r64.c | 4 +- orte/test/mpi/parallel_r8.c | 4 +- orte/test/mpi/parallel_w64.c | 14 +- orte/test/mpi/parallel_w8.c | 90 +- orte/test/mpi/pmix.c | 8 +- orte/test/mpi/pubsub.c | 10 +- orte/test/mpi/read_write.c | 4 +- orte/test/mpi/reduce-hang.c | 4 +- orte/test/mpi/sendrecv_blaster.c | 28 +- orte/test/mpi/simple_spawn.c | 4 +- orte/test/mpi/slave.c | 2 +- orte/test/mpi/spawn-problem/Makefile | 8 +- orte/test/mpi/spawn-problem/ch_rec.c | 14 +- orte/test/mpi/spawn-problem/start.c | 8 +- orte/test/mpi/spawn_multiple.c | 4 +- orte/test/mpi/spawn_tree.c | 6 +- orte/test/mpi/ziaprobe.c | 28 +- orte/test/mpi/ziatest.c | 14 +- orte/test/system/Makefile.include | 6 +- orte/test/system/binom.c | 22 +- orte/test/system/get_limits.c | 12 +- orte/test/system/iof_delay.c | 12 +- orte/test/system/iof_stress.c | 14 +- orte/test/system/oob_stress.c | 6 +- orte/test/system/opal-evpri-test.c | 2 +- orte/test/system/opal_hotel.c | 14 +- orte/test/system/opal_hwloc.c | 4 +- orte/test/system/opal_interface.c | 6 +- orte/test/system/orte_abort.c | 2 +- orte/test/system/orte_dfs.c | 8 +- orte/test/system/orte_errors.c | 2 +- orte/test/system/orte_exit.c | 10 +- orte/test/system/orte_loop_child.c | 6 +- orte/test/system/orte_loop_spawn.c | 10 +- orte/test/system/orte_no_op.c | 2 +- orte/test/system/orte_nodename.c | 2 +- orte/test/system/orte_spawn.c | 6 +- orte/test/system/orte_tool.c | 20 +- orte/test/system/psm_keygen.c | 2 +- orte/test/system/radix.c | 26 +- orte/test/system/reducer.c | 2 +- orte/test/system/regex.c | 2 +- orte/test/system/segfault.c | 2 +- orte/test/system/sigusr_trap.c | 2 +- orte/test/system/spin.c | 4 +- orte/tools/Makefile.am | 8 +- orte/tools/orte-checkpoint/Makefile.am | 6 +- .../orte-checkpoint/help-orte-checkpoint.txt | 14 +- .../tools/orte-checkpoint/orte-checkpoint.1in | 2 +- orte/tools/orte-checkpoint/orte-checkpoint.c | 2 +- orte/tools/orte-clean/Makefile.am | 6 +- orte/tools/orte-clean/help-orte-clean.txt | 6 +- orte/tools/orte-clean/orte-clean.1in | 6 +- orte/tools/orte-clean/orte-clean.c | 46 +- orte/tools/orte-dvm/Makefile.am | 6 +- orte/tools/orte-dvm/orte-dvm.c | 30 +- orte/tools/orte-info/Makefile.am | 6 +- orte/tools/orte-info/components.c | 12 +- orte/tools/orte-info/help-orte-info.txt | 6 +- orte/tools/orte-info/orte-info.1in | 14 +- orte/tools/orte-info/orte-info.c | 90 +- orte/tools/orte-info/orte-info.h | 20 +- orte/tools/orte-info/output.c | 36 +- orte/tools/orte-info/param.c | 74 +- orte/tools/orte-info/version.c | 70 +- orte/tools/orte-migrate/Makefile.am | 4 +- orte/tools/orte-migrate/help-orte-migrate.txt | 8 +- orte/tools/orte-migrate/orte-migrate.1in | 2 +- orte/tools/orte-migrate/orte-migrate.c | 58 +- orte/tools/orte-ps/Makefile.am | 6 +- orte/tools/orte-ps/help-orte-ps.txt | 6 +- orte/tools/orte-ps/orte-ps.1in | 4 +- orte/tools/orte-ps/orte-ps.c | 106 +- orte/tools/orte-restart/Makefile.am | 6 +- orte/tools/orte-restart/help-orte-restart.txt | 10 +- orte/tools/orte-restart/orte-restart.1in | 2 +- orte/tools/orte-restart/orte-restart.c | 60 +- orte/tools/orte-server/Makefile.am | 8 +- orte/tools/orte-server/help-orte-server.txt | 6 +- orte/tools/orte-server/orte-server.1in | 2 +- orte/tools/orte-server/orte-server.c | 28 +- orte/tools/orte-submit/Makefile.am | 6 +- orte/tools/orte-submit/orte-submit.c | 86 +- orte/tools/orte-top/Makefile.am | 6 +- orte/tools/orte-top/help-orte-top.txt | 6 +- orte/tools/orte-top/orte-top.1in | 2 +- orte/tools/orte-top/orte-top.c | 146 +- orte/tools/orted/Makefile.am | 16 +- orte/tools/orted/orted.1in | 10 +- orte/tools/orted/orted.c | 2 +- orte/tools/orterun/Makefile.am | 6 +- orte/tools/orterun/help-orterun.txt | 10 +- orte/tools/orterun/main.c | 6 +- orte/tools/orterun/orterun.c | 168 +- orte/tools/orterun/orterun.h | 6 +- orte/tools/wrappers/Makefile.am | 6 +- orte/util/Makefile.am | 6 +- orte/util/attr.c | 10 +- orte/util/comm/comm.c | 152 +- orte/util/comm/comm.h | 6 +- orte/util/context_fns.c | 26 +- orte/util/context_fns.h | 6 +- orte/util/dash_host/dash_host.c | 52 +- orte/util/dash_host/dash_host.h | 8 +- orte/util/dash_host/help-dash-host.txt | 6 +- orte/util/error_strings.c | 2 +- orte/util/error_strings.h | 6 +- orte/util/help-regex.txt | 14 +- orte/util/hnp_contact.c | 34 +- orte/util/hnp_contact.h | 10 +- orte/util/hostfile/help-hostfile.txt | 6 +- orte/util/hostfile/hostfile.c | 88 +- orte/util/hostfile/hostfile.h | 8 +- orte/util/hostfile/hostfile_lex.h | 6 +- orte/util/hostfile/hostfile_lex.l | 56 +- orte/util/hostfile/orte_hosts.7in | 4 +- orte/util/listener.c | 20 +- orte/util/listener.h | 8 +- orte/util/name_fns.c | 136 +- orte/util/name_fns.h | 6 +- orte/util/nidmap.c | 22 +- orte/util/nidmap.h | 6 +- orte/util/parse_options.c | 18 +- orte/util/parse_options.h | 6 +- orte/util/pre_condition_transports.c | 28 +- orte/util/pre_condition_transports.h | 6 +- orte/util/proc_info.c | 40 +- orte/util/proc_info.h | 6 +- orte/util/regex.c | 78 +- orte/util/regex.h | 6 +- orte/util/session_dir.c | 112 +- orte/util/session_dir.h | 10 +- orte/util/show_help.c | 80 +- orte/util/show_help.h | 16 +- oshmem/Makefile.am | 4 +- oshmem/include/mpp/shmem.h | 2 +- oshmem/include/shmem.fh | 4 +- oshmem/mca/Makefile.am | 6 +- oshmem/mca/atomic/Makefile.am | 6 +- oshmem/mca/atomic/atomic.h | 6 +- oshmem/mca/atomic/base/Makefile.am | 4 +- .../mca/atomic/base/atomic_base_available.c | 6 +- oshmem/mca/atomic/base/atomic_base_frame.c | 4 +- oshmem/mca/atomic/base/atomic_base_select.c | 8 +- oshmem/mca/atomic/base/base.h | 4 +- oshmem/mca/atomic/basic/Makefile.am | 4 +- oshmem/mca/atomic/basic/atomic_basic.h | 6 +- .../mca/atomic/basic/atomic_basic_component.c | 4 +- oshmem/mca/atomic/basic/atomic_basic_cswap.c | 4 +- oshmem/mca/atomic/basic/atomic_basic_fadd.c | 4 +- oshmem/mca/atomic/basic/atomic_basic_module.c | 8 +- oshmem/mca/atomic/mxm/Makefile.am | 4 +- oshmem/mca/atomic/mxm/atomic_mxm.h | 6 +- oshmem/mca/atomic/mxm/atomic_mxm_component.c | 4 +- oshmem/mca/atomic/mxm/atomic_mxm_cswap.c | 4 +- oshmem/mca/atomic/mxm/atomic_mxm_fadd.c | 4 +- oshmem/mca/atomic/mxm/atomic_mxm_module.c | 4 +- oshmem/mca/mca.h | 10 +- oshmem/mca/memheap/Makefile.am | 6 +- oshmem/mca/memheap/README | 26 +- oshmem/mca/memheap/base/Makefile.am | 6 +- oshmem/mca/memheap/base/base.h | 8 +- .../mca/memheap/base/help-oshmem-memheap.txt | 4 +- oshmem/mca/memheap/base/memheap_base_frame.c | 4 +- oshmem/mca/memheap/base/memheap_base_mkey.c | 20 +- oshmem/mca/memheap/base/memheap_base_select.c | 6 +- oshmem/mca/memheap/base/memheap_base_static.c | 2 +- oshmem/mca/memheap/buddy/Makefile.am | 6 +- oshmem/mca/memheap/buddy/memheap_buddy.c | 16 +- oshmem/mca/memheap/buddy/memheap_buddy.h | 12 +- .../memheap/buddy/memheap_buddy_component.c | 8 +- .../memheap/buddy/memheap_buddy_component.h | 6 +- oshmem/mca/memheap/configure.m4 | 4 +- oshmem/mca/memheap/memheap.h | 14 +- oshmem/mca/memheap/ptmalloc/Makefile.am | 6 +- oshmem/mca/memheap/ptmalloc/malloc_defs.h | 2 +- .../mca/memheap/ptmalloc/memheap_ptmalloc.c | 14 +- .../mca/memheap/ptmalloc/memheap_ptmalloc.h | 20 +- .../ptmalloc/memheap_ptmalloc_component.c | 6 +- .../ptmalloc/memheap_ptmalloc_component.h | 6 +- oshmem/mca/scoll/Makefile.am | 6 +- oshmem/mca/scoll/base/Makefile.am | 4 +- oshmem/mca/scoll/base/base.h | 4 +- oshmem/mca/scoll/base/scoll_base_available.c | 6 +- oshmem/mca/scoll/base/scoll_base_frame.c | 4 +- oshmem/mca/scoll/base/scoll_base_select.c | 10 +- oshmem/mca/scoll/basic/Makefile.am | 4 +- oshmem/mca/scoll/basic/scoll_basic.h | 6 +- oshmem/mca/scoll/basic/scoll_basic_barrier.c | 10 +- .../mca/scoll/basic/scoll_basic_broadcast.c | 4 +- oshmem/mca/scoll/basic/scoll_basic_collect.c | 8 +- .../mca/scoll/basic/scoll_basic_component.c | 4 +- oshmem/mca/scoll/basic/scoll_basic_module.c | 4 +- oshmem/mca/scoll/basic/scoll_basic_reduce.c | 8 +- oshmem/mca/scoll/fca/Makefile.am | 10 +- oshmem/mca/scoll/fca/scoll_fca.h | 2 +- oshmem/mca/scoll/fca/scoll_fca_module.c | 6 +- oshmem/mca/scoll/mpi/Makefile.am | 8 +- oshmem/mca/scoll/mpi/scoll_mpi_ops.c | 38 +- oshmem/mca/scoll/scoll.h | 10 +- oshmem/mca/spml/Makefile.am | 6 +- oshmem/mca/spml/base/Makefile.am | 8 +- oshmem/mca/spml/base/base.h | 6 +- oshmem/mca/spml/base/spml_base.c | 2 +- oshmem/mca/spml/base/spml_base_atomicreq.c | 4 +- oshmem/mca/spml/base/spml_base_atomicreq.h | 6 +- oshmem/mca/spml/base/spml_base_frame.c | 6 +- oshmem/mca/spml/base/spml_base_getreq.c | 4 +- oshmem/mca/spml/base/spml_base_getreq.h | 10 +- oshmem/mca/spml/base/spml_base_putreq.c | 4 +- oshmem/mca/spml/base/spml_base_putreq.h | 10 +- oshmem/mca/spml/base/spml_base_request.c | 4 +- oshmem/mca/spml/base/spml_base_request.h | 10 +- oshmem/mca/spml/base/spml_base_request_dbg.h | 4 +- oshmem/mca/spml/base/spml_base_select.c | 4 +- oshmem/mca/spml/configure.m4 | 4 +- oshmem/mca/spml/ikrit/Makefile.am | 10 +- .../mca/spml/ikrit/help-oshmem-spml-ikrit.txt | 2 +- oshmem/mca/spml/ikrit/spml_ikrit.c | 6 +- oshmem/mca/spml/ikrit/spml_ikrit.h | 12 +- oshmem/mca/spml/ikrit/spml_ikrit_component.c | 12 +- oshmem/mca/spml/ikrit/spml_ikrit_component.h | 6 +- oshmem/mca/spml/spml.h | 26 +- oshmem/mca/spml/yoda/Makefile.am | 10 +- .../mca/spml/yoda/help-oshmem-spml-yoda.txt | 4 +- oshmem/mca/spml/yoda/spml_yoda_component.h | 6 +- oshmem/mca/spml/yoda/spml_yoda_getreq.h | 10 +- oshmem/mca/spml/yoda/spml_yoda_rdmafrag.h | 4 +- oshmem/mca/sshmem/Makefile.am | 6 +- oshmem/mca/sshmem/base/Makefile.am | 4 +- oshmem/mca/sshmem/mmap/Makefile.am | 4 +- oshmem/mca/sshmem/mmap/configure.m4 | 4 +- .../sshmem/mmap/help-oshmem-sshmem-mmap.txt | 6 +- oshmem/mca/sshmem/sshmem_types.h | 4 +- oshmem/mca/sshmem/sysv/Makefile.am | 4 +- oshmem/mca/sshmem/sysv/configure.m4 | 4 +- .../sshmem/sysv/help-oshmem-sshmem-sysv.txt | 4 +- oshmem/mca/sshmem/sysv/sshmem_sysv_module.c | 2 +- oshmem/mca/sshmem/verbs/Makefile.am | 4 +- oshmem/mca/sshmem/verbs/configure.m4 | 6 +- .../mca/sshmem/verbs/sshmem_verbs_component.c | 4 +- oshmem/op/op.h | 8 +- oshmem/proc/proc.c | 6 +- oshmem/proc/proc.h | 18 +- oshmem/request/Makefile.am | 4 +- oshmem/request/request.c | 4 +- oshmem/request/request.h | 14 +- oshmem/request/request_dbg.h | 6 +- oshmem/runtime/Makefile.am | 6 +- oshmem/runtime/help-shmem-runtime.txt | 4 +- oshmem/runtime/oshmem_shmem_abort.c | 4 +- oshmem/runtime/oshmem_shmem_finalize.c | 4 +- oshmem/runtime/oshmem_shmem_init.c | 4 +- oshmem/runtime/params.h | 10 +- oshmem/runtime/runtime.h | 6 +- oshmem/shmem/Makefile.am | 2 +- oshmem/shmem/c/Makefile.am | 6 +- oshmem/shmem/c/globalexit.c | 6 +- oshmem/shmem/c/profile/Makefile.am | 6 +- oshmem/shmem/c/profile/defines.h | 72 +- oshmem/shmem/c/shmem_add.c | 6 +- oshmem/shmem/c/shmem_addr_accessible.c | 4 +- oshmem/shmem/c/shmem_align.c | 4 +- oshmem/shmem/c/shmem_alloc.c | 4 +- oshmem/shmem/c/shmem_barrier.c | 4 +- oshmem/shmem/c/shmem_broadcast.c | 6 +- oshmem/shmem/c/shmem_clear_cache_inv.c | 4 +- oshmem/shmem/c/shmem_clear_cache_line_inv.c | 4 +- oshmem/shmem/c/shmem_clear_lock.c | 4 +- oshmem/shmem/c/shmem_collect.c | 4 +- oshmem/shmem/c/shmem_cswap.c | 6 +- oshmem/shmem/c/shmem_fadd.c | 6 +- oshmem/shmem/c/shmem_fence.c | 4 +- oshmem/shmem/c/shmem_finalize.c | 4 +- oshmem/shmem/c/shmem_finc.c | 6 +- oshmem/shmem/c/shmem_free.c | 4 +- oshmem/shmem/c/shmem_g.c | 6 +- oshmem/shmem/c/shmem_get.c | 6 +- oshmem/shmem/c/shmem_iget.c | 6 +- oshmem/shmem/c/shmem_inc.c | 6 +- oshmem/shmem/c/shmem_init.c | 6 +- oshmem/shmem/c/shmem_iput.c | 6 +- oshmem/shmem/c/shmem_lock.c | 4 +- oshmem/shmem/c/shmem_p.c | 6 +- oshmem/shmem/c/shmem_pe_accessible.c | 6 +- oshmem/shmem/c/shmem_ptr.c | 6 +- oshmem/shmem/c/shmem_put.c | 6 +- oshmem/shmem/c/shmem_query.c | 4 +- oshmem/shmem/c/shmem_quiet.c | 4 +- oshmem/shmem/c/shmem_realloc.c | 4 +- oshmem/shmem/c/shmem_reduce.c | 6 +- oshmem/shmem/c/shmem_set_cache_inv.c | 4 +- oshmem/shmem/c/shmem_set_cache_line_inv.c | 4 +- oshmem/shmem/c/shmem_set_lock.c | 4 +- oshmem/shmem/c/shmem_swap.c | 6 +- oshmem/shmem/c/shmem_test_lock.c | 6 +- oshmem/shmem/c/shmem_udcflush.c | 4 +- oshmem/shmem/c/shmem_udcflush_line.c | 4 +- oshmem/shmem/c/shmem_wait.c | 6 +- oshmem/shmem/fortran/Makefile.am | 4 +- oshmem/shmem/fortran/bindings.h | 8 +- oshmem/shmem/fortran/my_pe_f.c | 6 +- oshmem/shmem/fortran/num_pes_f.c | 6 +- oshmem/shmem/fortran/profile/Makefile.am | 4 +- oshmem/shmem/fortran/profile/pbindings.h | 4 +- .../shmem/fortran/shmem_addr_accessible_f.c | 6 +- oshmem/shmem/fortran/shmem_and_to_all_f.c | 10 +- oshmem/shmem/fortran/shmem_barrier_all_f.c | 6 +- oshmem/shmem/fortran/shmem_barrier_f.c | 14 +- oshmem/shmem/fortran/shmem_broadcast_f.c | 12 +- oshmem/shmem/fortran/shmem_cache_f.c | 16 +- oshmem/shmem/fortran/shmem_character_get_f.c | 12 +- oshmem/shmem/fortran/shmem_character_put_f.c | 12 +- oshmem/shmem/fortran/shmem_collect_f.c | 20 +- oshmem/shmem/fortran/shmem_complex_get_f.c | 12 +- oshmem/shmem/fortran/shmem_complex_iget_f.c | 18 +- oshmem/shmem/fortran/shmem_complex_iput_f.c | 18 +- oshmem/shmem/fortran/shmem_complex_put_f.c | 14 +- oshmem/shmem/fortran/shmem_double_get_f.c | 14 +- oshmem/shmem/fortran/shmem_double_iget_f.c | 18 +- oshmem/shmem/fortran/shmem_double_iput_f.c | 16 +- oshmem/shmem/fortran/shmem_double_put_f.c | 14 +- oshmem/shmem/fortran/shmem_fence_f.c | 6 +- oshmem/shmem/fortran/shmem_finalize_f.c | 6 +- oshmem/shmem/fortran/shmem_fortran_pointer.h | 4 +- oshmem/shmem/fortran/shmem_get128_f.c | 14 +- oshmem/shmem/fortran/shmem_get32_f.c | 14 +- oshmem/shmem/fortran/shmem_get4_f.c | 14 +- oshmem/shmem/fortran/shmem_get64_f.c | 14 +- oshmem/shmem/fortran/shmem_get8_f.c | 14 +- oshmem/shmem/fortran/shmem_getmem_f.c | 12 +- oshmem/shmem/fortran/shmem_iget128_f.c | 16 +- oshmem/shmem/fortran/shmem_iget32_f.c | 16 +- oshmem/shmem/fortran/shmem_iget4_f.c | 16 +- oshmem/shmem/fortran/shmem_iget64_f.c | 16 +- oshmem/shmem/fortran/shmem_iget8_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_add_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_cswap_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_fadd_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_finc_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_inc_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_swap_f.c | 16 +- oshmem/shmem/fortran/shmem_int4_wait_f.c | 6 +- .../shmem/fortran/shmem_int4_wait_until_f.c | 12 +- oshmem/shmem/fortran/shmem_int8_add_f.c | 16 +- oshmem/shmem/fortran/shmem_int8_cswap_f.c | 16 +- oshmem/shmem/fortran/shmem_int8_fadd_f.c | 16 +- oshmem/shmem/fortran/shmem_int8_finc_f.c | 16 +- oshmem/shmem/fortran/shmem_int8_inc_f.c | 16 +- oshmem/shmem/fortran/shmem_int8_swap_f.c | 16 +- oshmem/shmem/fortran/shmem_int8_wait_f.c | 6 +- .../shmem/fortran/shmem_int8_wait_until_f.c | 12 +- oshmem/shmem/fortran/shmem_integer_get_f.c | 14 +- oshmem/shmem/fortran/shmem_integer_iget_f.c | 18 +- oshmem/shmem/fortran/shmem_integer_iput_f.c | 18 +- oshmem/shmem/fortran/shmem_integer_put_f.c | 14 +- oshmem/shmem/fortran/shmem_iput128_f.c | 18 +- oshmem/shmem/fortran/shmem_iput32_f.c | 18 +- oshmem/shmem/fortran/shmem_iput4_f.c | 18 +- oshmem/shmem/fortran/shmem_iput64_f.c | 18 +- oshmem/shmem/fortran/shmem_iput8_f.c | 18 +- oshmem/shmem/fortran/shmem_lock_f.c | 10 +- oshmem/shmem/fortran/shmem_logical_get_f.c | 12 +- oshmem/shmem/fortran/shmem_logical_iget_f.c | 18 +- oshmem/shmem/fortran/shmem_logical_iput_f.c | 16 +- oshmem/shmem/fortran/shmem_logical_put_f.c | 14 +- oshmem/shmem/fortran/shmem_max_to_all_f.c | 16 +- oshmem/shmem/fortran/shmem_min_to_all_f.c | 16 +- oshmem/shmem/fortran/shmem_or_to_all_f.c | 10 +- oshmem/shmem/fortran/shmem_pe_accessible_f.c | 6 +- oshmem/shmem/fortran/shmem_prod_to_all_f.c | 20 +- oshmem/shmem/fortran/shmem_ptr_f.c | 6 +- oshmem/shmem/fortran/shmem_put128_f.c | 16 +- oshmem/shmem/fortran/shmem_put32_f.c | 16 +- oshmem/shmem/fortran/shmem_put4_f.c | 16 +- oshmem/shmem/fortran/shmem_put64_f.c | 16 +- oshmem/shmem/fortran/shmem_put8_f.c | 16 +- oshmem/shmem/fortran/shmem_put_f.c | 12 +- oshmem/shmem/fortran/shmem_putmem_f.c | 14 +- oshmem/shmem/fortran/shmem_quiet_f.c | 6 +- oshmem/shmem/fortran/shmem_real4_swap_f.c | 16 +- oshmem/shmem/fortran/shmem_real8_swap_f.c | 16 +- oshmem/shmem/fortran/shmem_real_get_f.c | 14 +- oshmem/shmem/fortran/shmem_real_iget_f.c | 16 +- oshmem/shmem/fortran/shmem_real_iput_f.c | 16 +- oshmem/shmem/fortran/shmem_real_put_f.c | 14 +- oshmem/shmem/fortran/shmem_sum_to_all_f.c | 20 +- oshmem/shmem/fortran/shmem_swap_f.c | 16 +- oshmem/shmem/fortran/shmem_wait_f.c | 6 +- oshmem/shmem/fortran/shmem_wait_until_f.c | 12 +- oshmem/shmem/fortran/shmem_xor_to_all_f.c | 14 +- oshmem/shmem/fortran/shpalloc_f.c | 8 +- oshmem/shmem/fortran/shpclmove_f.c | 10 +- oshmem/shmem/fortran/shpdeallc_f.c | 6 +- oshmem/shmem/fortran/start_pes_f.c | 6 +- oshmem/shmem/java/c/Makefile.am | 4 +- oshmem/shmem/man/man3/shmem_broadcast64.3in | 2 +- oshmem/shmem/man/man3/shmem_clear_lock.3in | 2 +- oshmem/shmem/man/man3/shmem_collect64.3in | 2 +- oshmem/shmem/man/man3/shmem_double_g.3in | 2 +- oshmem/shmem/man/man3/shmem_double_get.3in | 2 +- oshmem/shmem/man/man3/shmem_double_iget.3in | 2 +- oshmem/shmem/man/man3/shmem_double_iput.3in | 2 +- .../man/man3/shmem_double_max_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_double_p.3in | 2 +- oshmem/shmem/man/man3/shmem_double_put.3in | 2 +- oshmem/shmem/man/man3/shmem_double_swap.3in | 2 +- oshmem/shmem/man/man3/shmem_fcollect32.3in | 2 +- oshmem/shmem/man/man3/shmem_fcollect64.3in | 2 +- oshmem/shmem/man/man3/shmem_float_g.3in | 2 +- oshmem/shmem/man/man3/shmem_float_get.3in | 2 +- oshmem/shmem/man/man3/shmem_float_iget.3in | 2 +- oshmem/shmem/man/man3/shmem_float_iput.3in | 2 +- .../shmem/man/man3/shmem_float_max_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_float_p.3in | 2 +- oshmem/shmem/man/man3/shmem_float_put.3in | 2 +- oshmem/shmem/man/man3/shmem_float_swap.3in | 2 +- oshmem/shmem/man/man3/shmem_get128.3in | 2 +- oshmem/shmem/man/man3/shmem_get32.3in | 2 +- oshmem/shmem/man/man3/shmem_get64.3in | 2 +- oshmem/shmem/man/man3/shmem_getmem.3in | 2 +- oshmem/shmem/man/man3/shmem_iget128.3in | 2 +- oshmem/shmem/man/man3/shmem_iget32.3in | 2 +- oshmem/shmem/man/man3/shmem_iget64.3in | 2 +- .../shmem/man/man3/shmem_int_and_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_int_g.3in | 2 +- oshmem/shmem/man/man3/shmem_int_get.3in | 2 +- oshmem/shmem/man/man3/shmem_int_iget.3in | 2 +- oshmem/shmem/man/man3/shmem_int_iput.3in | 2 +- .../shmem/man/man3/shmem_int_max_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_int_or_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_int_p.3in | 2 +- oshmem/shmem/man/man3/shmem_int_put.3in | 2 +- oshmem/shmem/man/man3/shmem_int_swap.3in | 2 +- .../shmem/man/man3/shmem_int_xor_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_iput128.3in | 2 +- oshmem/shmem/man/man3/shmem_iput32.3in | 2 +- oshmem/shmem/man/man3/shmem_iput64.3in | 2 +- oshmem/shmem/man/man3/shmem_long_add.3in | 2 +- .../shmem/man/man3/shmem_long_and_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_long_cswap.3in | 2 +- oshmem/shmem/man/man3/shmem_long_fadd.3in | 2 +- oshmem/shmem/man/man3/shmem_long_finc.3in | 2 +- oshmem/shmem/man/man3/shmem_long_g.3in | 2 +- oshmem/shmem/man/man3/shmem_long_get.3in | 2 +- oshmem/shmem/man/man3/shmem_long_iget.3in | 2 +- oshmem/shmem/man/man3/shmem_long_inc.3in | 2 +- oshmem/shmem/man/man3/shmem_long_iput.3in | 2 +- .../shmem/man/man3/shmem_long_max_to_all.3in | 2 +- .../shmem/man/man3/shmem_long_or_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_long_p.3in | 2 +- oshmem/shmem/man/man3/shmem_long_put.3in | 2 +- oshmem/shmem/man/man3/shmem_long_swap.3in | 2 +- .../shmem/man/man3/shmem_long_xor_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_longdouble_g.3in | 2 +- .../shmem/man/man3/shmem_longdouble_get.3in | 2 +- .../shmem/man/man3/shmem_longdouble_iget.3in | 2 +- .../shmem/man/man3/shmem_longdouble_iput.3in | 2 +- .../man/man3/shmem_longdouble_max_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_longdouble_p.3in | 2 +- .../shmem/man/man3/shmem_longdouble_put.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_add.3in | 2 +- .../man/man3/shmem_longlong_and_to_all.3in | 2 +- .../shmem/man/man3/shmem_longlong_cswap.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_fadd.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_finc.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_g.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_get.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_iget.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_inc.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_iput.3in | 2 +- .../man/man3/shmem_longlong_max_to_all.3in | 2 +- .../man/man3/shmem_longlong_or_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_p.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_put.3in | 2 +- oshmem/shmem/man/man3/shmem_longlong_swap.3in | 2 +- .../man/man3/shmem_longlong_xor_to_all.3in | 2 +- oshmem/shmem/man/man3/shmem_put128.3in | 2 +- oshmem/shmem/man/man3/shmem_put32.3in | 2 +- oshmem/shmem/man/man3/shmem_put64.3in | 2 +- oshmem/shmem/man/man3/shmem_putmem.3in | 2 +- oshmem/shmem/man/man3/shmem_short_g.3in | 2 +- oshmem/shmem/man/man3/shmem_short_get.3in | 2 +- oshmem/shmem/man/man3/shmem_short_p.3in | 2 +- oshmem/shmem/man/man3/shmem_short_put.3in | 2 +- oshmem/shmem/man/man3/shmem_test_lock.3in | 2 +- oshmem/shmem/shmem_api_logger.h | 4 +- oshmem/shmem/shmem_lock.h | 4 +- oshmem/tools/Makefile.am | 4 +- oshmem/tools/oshmem_info/param.c | 6 +- .../wrappers/shmemcc-wrapper-data.txt.in | 6 +- .../wrappers/shmemfort-wrapper-data.txt.in | 6 +- oshmem/util/oshmem_util.h | 6 +- test/Makefile.am | 6 +- test/asm/Makefile.am | 6 +- test/asm/atomic_barrier.c | 6 +- test/asm/atomic_cmpset.c | 8 +- test/asm/atomic_math.c | 14 +- test/asm/atomic_spinlock.c | 6 +- test/carto/carto-file | 8 +- test/carto/carto_test.c | 14 +- test/class/ompi_rb_tree.c | 118 +- test/class/opal_bitmap.c | 52 +- test/class/opal_hash_table.c | 48 +- test/class/opal_list.c | 10 +- test/class/opal_pointer_array.c | 8 +- test/class/opal_proc_table.c | 42 +- test/class/opal_tree.c | 46 +- test/class/opal_value_array.c | 12 +- test/datatype/Makefile.am | 4 +- test/datatype/checksum.c | 6 +- test/datatype/ddt_lib.c | 20 +- test/datatype/ddt_lib.h | 6 +- test/datatype/ddt_pack.c | 8 +- test/datatype/ddt_raw.c | 32 +- test/datatype/ddt_test.c | 32 +- test/datatype/opal_datatype_test.c | 14 +- test/datatype/position.c | 4 +- test/datatype/to_self.c | 22 +- test/datatype/unpack_ooo.c | 8 +- test/dss/dss_buffer.c | 2 +- test/dss/dss_payload.c | 76 +- test/dss/dss_release.c | 2 +- test/event/Makefile.am | 6 +- test/event/event-test.c | 22 +- test/event/signal-test.c | 4 +- test/event/time-test.c | 4 +- test/memchecker/Makefile.am | 6 +- test/memchecker/irecv_init_check.c | 6 +- test/memchecker/irecv_uninit_check.c | 12 +- test/memchecker/non_blocking_recv_test.c | 22 +- test/memchecker/non_blocking_send_test.c | 18 +- test/mpi/Makefile.am | 6 +- test/mpi/environment/Makefile.am | 8 +- test/mpi/environment/chello.c | 6 +- test/mpi/environment/run_tests | 12 +- test/mpi/run_tests | 6 +- test/runtime/Makefile.am | 6 +- test/runtime/opal_init_finalize.c | 6 +- test/runtime/orte_init_finalize.c | 8 +- test/runtime/sigchld.c | 12 +- test/runtime/start_shut.c | 14 +- test/support/Makefile.am | 6 +- test/support/Makefile.options | 6 +- test/support/support.c | 8 +- test/support/support.h | 6 +- test/threads/Makefile.am | 6 +- test/threads/opal_condition.c | 12 +- test/threads/opal_thread.c | 2 +- test/util/Makefile.am | 28 +- test/util/ompi_numtostr.c | 6 +- test/util/opal_argv.c | 26 +- test/util/opal_basename.c | 6 +- test/util/opal_bit_ops.c | 6 +- test/util/opal_error.c | 14 +- test/util/opal_if.c | 6 +- test/util/opal_os_create_dirpath.c | 8 +- test/util/opal_os_path.c | 10 +- test/util/opal_path_nfs.c | 10 +- test/util/opal_timer.c | 6 +- test/util/orte_session_dir.c | 16 +- test/util/orte_universe_setup_file_io.c | 18 +- 4479 files changed, 35011 insertions(+), 34988 deletions(-) create mode 100755 contrib/whitespace-purge.sh diff --git a/LICENSE b/LICENSE index 469eedd6de4..e3e3240de15 100644 --- a/LICENSE +++ b/LICENSE @@ -11,12 +11,12 @@ Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana Copyright (c) 2004-2010 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. -Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, +Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. Copyright (c) 2004-2008 The Regents of the University of California. All rights reserved. Copyright (c) 2006-2010 Los Alamos National Security, LLC. All rights - reserved. + reserved. Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. Copyright (c) 2006-2010 Voltaire, Inc. All rights reserved. Copyright (c) 2006-2011 Sandia National Laboratories. All rights reserved. @@ -26,7 +26,7 @@ Copyright (c) 2006-2010 The University of Houston. All rights reserved. Copyright (c) 2006-2009 Myricom, Inc. All rights reserved. Copyright (c) 2007-2008 UT-Battelle, LLC. All rights reserved. Copyright (c) 2007-2010 IBM Corporation. All rights reserved. -Copyright (c) 1998-2005 Forschungszentrum Juelich, Juelich Supercomputing +Copyright (c) 1998-2005 Forschungszentrum Juelich, Juelich Supercomputing Centre, Federal Republic of Germany Copyright (c) 2005-2008 ZIH, TU Dresden, Federal Republic of Germany Copyright (c) 2007 Evergrid, Inc. All rights reserved. diff --git a/Makefile.am b/Makefile.am index 259330077e2..388188c6ab1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/autogen.pl b/autogen.pl index 6d308dc427f..979f19e42ce 100755 --- a/autogen.pl +++ b/autogen.pl @@ -8,9 +8,9 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -76,7 +76,7 @@ my $patch_prog = "patch"; # Solaris "patch" doesn't understand unified diffs, and will cause # autogen.pl to hang with a "File to patch:" prompt. Default to Linux -# "patch", but use "gpatch" on Solaris. +# "patch", but use "gpatch" on Solaris. if ($^O eq "solaris") { $patch_prog = "gpatch"; } @@ -251,7 +251,7 @@ sub mca_process_component { $found_component->{"name"} = $component; # Push the results onto the $mca_found hash array - push(@{$mca_found->{$pname}->{$framework}->{"components"}}, + push(@{$mca_found->{$pname}->{$framework}->{"components"}}, $found_component); # Is there an autogen.subdirs in here? @@ -278,7 +278,7 @@ sub ignored { $unignore .= $_ while (); close(UNIGNORE); - + $ignored = 0 if ($unignore =~ /^$username$/m || $unignore =~ /^$username\@$hostname$/m || @@ -311,13 +311,13 @@ sub mca_process_framework { # Look for component directories in this framework if (-d $dir) { $mca_found->{$pname}->{$framework}->{found} = 1; - opendir(DIR, $dir) || + opendir(DIR, $dir) || my_die "Can't open $dir directory"; foreach my $d (readdir(DIR)) { # Skip any non-directory, "base", or any dir that # begins with "." next - if (! -d "$dir/$d" || $d eq "base" || + if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq "."); # Skip any component that doesn't have a configure.m4 @@ -332,7 +332,7 @@ sub mca_process_framework { verbose "--- Found $pname / $framework / $d component\n"; - # Skip if specifically excluded + # Skip if specifically excluded if (exists($exclude_list->{$framework}) && $exclude_list->{$framework}[0] eq $d) { verbose " => Excluded\n"; @@ -419,7 +419,7 @@ sub mca_process_project { # Look for framework directories in this project my $dir = "$topdir/$pdir/mca"; if (-d $dir) { - opendir(DIR, $dir) || + opendir(DIR, $dir) || my_die "Can't open $dir directory"; my @my_dirs = readdir(DIR); @my_dirs = sort(@my_dirs); @@ -497,7 +497,7 @@ sub mca_run_global { # Does this project have a configure.m4 file? push(@includes, "$pdir/configure.m4") if (exists($mca_found->{$p}->{"configure.m4"})); - + # Print out project-level info my @mykeys = keys(%{$mca_found->{$pname}}); @mykeys = sort(@mykeys); @@ -557,7 +557,7 @@ sub mca_run_global { } $m4_config_component_list =~ s/^, //; $no_config_component_list =~ s/^, //; - + $m4 .= "dnl Components in the $pname / $f framework m4_define([mca_${pname}_${f}_m4_config_component_list], [$m4_config_component_list]) m4_define([mca_${pname}_${f}_no_config_component_list], [$no_config_component_list]) @@ -580,7 +580,7 @@ sub mca_run_global { sub mpiext_process_extension { my ($topdir, $ext_prefix, $extdir) = @_; - + my $edir = "$topdir/$ext_prefix/$extdir"; return if (! -d $edir); @@ -606,13 +606,13 @@ sub mpiext_run_global { my $topdir = Cwd::cwd(); my $dir = "$topdir/$ext_prefix"; - opendir(DIR, $dir) || + opendir(DIR, $dir) || my_die "Can't open $dir directory"; foreach my $d (readdir(DIR)) { # Skip any non-directory, "base", or any dir that begins with "." next if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq "."); - + # If this directory has a configure.m4, then it's an # extension. if (-f "$dir/$d/configure.m4") { @@ -667,7 +667,7 @@ sub mpiext_run_global { sub mpicontrib_process { my ($topdir, $contrib_prefix, $contribdir) = @_; - + my $cdir = "$topdir/$contrib_prefix/$contribdir"; return if (! -d $cdir); @@ -693,13 +693,13 @@ sub mpicontrib_run_global { my $topdir = Cwd::cwd(); my $dir = "$topdir/$contrib_prefix"; - opendir(DIR, $dir) || + opendir(DIR, $dir) || my_die "Can't open $dir directory"; foreach my $d (readdir(DIR)) { # Skip any non-directory, "base", or any dir that begins with "." next if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq "."); - + # If this directory has a configure.m4, then it's an # extension. if (-f "$dir/$d/configure.m4") { @@ -825,7 +825,7 @@ sub find_and_check { if ($pn > $mn) { verbose " ==> ACCEPTED\n"; return; - } + } # If the version is lower, we're done. elsif ($pn < $mn || ($pn == $mn && $pa lt $ma)) { @@ -941,13 +941,13 @@ sub patch_autotools_output { # Similar issue as above -- fix the case statements that handle the Sun # Fortran version strings. # - # Note: we have to use octal escapes to match '*Sun\ F*) and the + # Note: we have to use octal escapes to match '*Sun\ F*) and the # four succeeding lines in the bourne shell switch statement. # \ = 134 # ) = 051 # * = 052 # - # Below is essentially an upstream patch for Libtool which we want + # Below is essentially an upstream patch for Libtool which we want # made available to Open MPI users running older versions of Libtool foreach my $tag (("", "_FC")) { @@ -1090,7 +1090,7 @@ sub patch_autotools_output { $dnl_line dnl This file is automatically created by autogen.pl; it should not dnl be edited by hand!! -dnl +dnl dnl Generated by $username at " . localtime(time) . " dnl on $full_hostname. $dnl_line\n\n"; @@ -1293,7 +1293,7 @@ sub patch_autotools_output { # Remove the old m4 file and write the new one verbose "==> Writing m4 file with autogen.pl results\n"; unlink($m4_output_file); -open(M4, ">$m4_output_file") || +open(M4, ">$m4_output_file") || my_die "Can't open $m4_output_file"; print M4 $m4; close(M4); diff --git a/config/Makefile.options b/config/Makefile.options index 4de360600ea..7f42e967402 100644 --- a/config/Makefile.options +++ b/config/Makefile.options @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/config/c_get_alignment.m4 b/config/c_get_alignment.m4 index 89ee21f603f..fa41da89647 100644 --- a/config/c_get_alignment.m4 +++ b/config/c_get_alignment.m4 @@ -6,22 +6,22 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # OPAL_C_GET_ALIGN(type, config_var) # ---------------------------------- -# Determine datatype alignment. +# Determine datatype alignment. # First arg is type, 2nd arg is config var to define. AC_DEFUN([OPAL_C_GET_ALIGNMENT],[ AC_CACHE_CHECK([alignment of $1], @@ -39,7 +39,7 @@ AC_DEFUN([OPAL_C_GET_ALIGNMENT],[ [AC_MSG_WARN([*** Problem running configure test!]) AC_MSG_WARN([*** See config.log for details.]) AC_MSG_ERROR([*** Cannot continue.])], - [ # cross compile - do a non-executable test. Trick + [ # cross compile - do a non-executable test. Trick # taken from the Autoconf 2.59c. Switch to using # AC_CHECK_ALIGNOF when we can require Autoconf 2.60. _AC_COMPUTE_INT([(long int) offsetof (opal__type_alignof_, y)], diff --git a/config/ompi_check_libfca.m4 b/config/ompi_check_libfca.m4 index 9720599164f..5605739199c 100644 --- a/config/ompi_check_libfca.m4 +++ b/config/ompi_check_libfca.m4 @@ -13,7 +13,7 @@ dnl # OMPI_CHECK_FCA(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if fca support can be found. sets prefix_{CPPFLAGS, +# check if fca support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_FCA],[ diff --git a/config/ompi_check_libhcoll.m4 b/config/ompi_check_libhcoll.m4 index 8c8e842a754..337501170ff 100644 --- a/config/ompi_check_libhcoll.m4 +++ b/config/ompi_check_libhcoll.m4 @@ -13,7 +13,7 @@ dnl # OMPI_CHECK_HCOLL(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if hcoll support can be found. sets prefix_{CPPFLAGS, +# check if hcoll support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_HCOLL],[ diff --git a/config/ompi_check_lustre.m4 b/config/ompi_check_lustre.m4 index d089b9007ac..b22a5c4d0ac 100644 --- a/config/ompi_check_lustre.m4 +++ b/config/ompi_check_lustre.m4 @@ -23,7 +23,7 @@ dnl # OMPI_CHECK_LUSTRE(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if LUSTRE support can be found. sets prefix_{CPPFLAGS, +# check if LUSTRE support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_LUSTRE],[ @@ -32,7 +32,7 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[ check_lustre_LDFLAGS= check_lustre_LIBS= - check_lustre_save_LIBS="$LIBS" + check_lustre_save_LIBS="$LIBS" check_lustre_save_LDFLAGS="$LDFLAGS" check_lustre_save_CPPFLAGS="$CPPFLAGS" diff --git a/config/ompi_check_mxm.m4 b/config/ompi_check_mxm.m4 index 2bccd07514b..c510fbeb6e2 100644 --- a/config/ompi_check_mxm.m4 +++ b/config/ompi_check_mxm.m4 @@ -12,7 +12,7 @@ dnl # OMPI_CHECK_MXM(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if MXM support can be found. sets prefix_{CPPFLAGS, +# check if MXM support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_MXM],[ diff --git a/config/ompi_check_plfs.m4 b/config/ompi_check_plfs.m4 index aced3f4c363..71eff914ccd 100644 --- a/config/ompi_check_plfs.m4 +++ b/config/ompi_check_plfs.m4 @@ -23,7 +23,7 @@ dnl # OMPI_CHECK_PLFS(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if PLFS support can be found. sets prefix_{CPPFLAGS, +# check if PLFS support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_PLFS],[ @@ -32,7 +32,7 @@ AC_DEFUN([OMPI_CHECK_PLFS],[ check_plfs_LDFLAGS= check_plfs_LIBS= - check_plfs_save_LIBS="$LIBS" + check_plfs_save_LIBS="$LIBS" check_plfs_save_LDFLAGS="$LDFLAGS" check_plfs_save_CPPFLAGS="$CPPFLAGS" @@ -46,7 +46,7 @@ AC_DEFUN([OMPI_CHECK_PLFS],[ [Build Plfs support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) OPAL_CHECK_WITHDIR([plfs], [$with_plfs], [include/plfs.h]) - AC_ARG_WITH([plfs-libs], + AC_ARG_WITH([plfs-libs], [AC_HELP_STRING([--with-plfs-libs=LIBS], [Libraries to link with for plfs])]) @@ -57,29 +57,29 @@ AC_DEFUN([OMPI_CHECK_PLFS],[ temp_with_plfs_libs="$with_plfs_libs" AS_IF([test -z "$with_plfs_libs"], [with_plfs_libs="plfs pthread"]) - + # Add correct -I and -L flags AS_IF([test -d "$with_plfs/include"], [check_plfs_CPPFLAGS="-I$with_plfs/include" $1_CPPFLAGS="$check_plfs_CPPFLAGS" CPPFLAGS="$CPPFLAGS $check_plfs_CPPFLAGS"], [ompi_check_plfs_happy="no"]) - + AS_IF([test "$ompi_check_plfs_happy" = "yes"], [AS_IF([test -d "$with_plfs/lib"], [check_plfs_LDFLAGS="-L$with_plfs/lib" $1_LDFLAGS="$check_plfs_LDFLAGS" LDFLAGS="$LDFLAGS $check_plfs_LDFLAGS"], - [ompi_check_plfs_happy="no"]) + [ompi_check_plfs_happy="no"]) ],[]) - + # Try to find all the plfs libraries AS_IF([test "$ompi_check_plfs_happy" = "yes"], [ AS_IF([test -n "$with_plfs_libs"] [for lib in $with_plfs_libs ; do check_plfs_LIBS="$check_plfs_LIBS -l$lib" - done]) - + done]) + $1_LIBS="$check_plfs_LIBS" LIBS="$LIBS $check_plfs_LIBS" diff --git a/config/ompi_check_psm.m4 b/config/ompi_check_psm.m4 index 7259354b6c9..2c25b5f43f9 100644 --- a/config/ompi_check_psm.m4 +++ b/config/ompi_check_psm.m4 @@ -23,7 +23,7 @@ dnl # OMPI_CHECK_PSM(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if PSM support can be found. sets prefix_{CPPFLAGS, +# check if PSM support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_PSM],[ diff --git a/config/ompi_check_pvfs2.m4 b/config/ompi_check_pvfs2.m4 index 618e145ddef..ef87b40f3d4 100644 --- a/config/ompi_check_pvfs2.m4 +++ b/config/ompi_check_pvfs2.m4 @@ -23,7 +23,7 @@ dnl # OMPI_CHECK_PVFS2(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if PVFS2 support can be found. sets prefix_{CPPFLAGS, +# check if PVFS2 support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_PVFS2],[ @@ -32,7 +32,7 @@ AC_DEFUN([OMPI_CHECK_PVFS2],[ check_pvfs2_LDFLAGS= check_pvfs2_LIBS= - check_pvfs2_save_LIBS="$LIBS" + check_pvfs2_save_LIBS="$LIBS" check_pvfs2_save_LDFLAGS="$LDFLAGS" check_pvfs2_save_CPPFLAGS="$CPPFLAGS" @@ -46,7 +46,7 @@ AC_DEFUN([OMPI_CHECK_PVFS2],[ [Build Pvfs2 support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) OPAL_CHECK_WITHDIR([pvfs2], [$with_pvfs2], [include/pvfs2.h]) - AC_ARG_WITH([pvfs2-libs], + AC_ARG_WITH([pvfs2-libs], [AC_HELP_STRING([--with-pvfs2-libs=LIBS], [Libraries to link with for pvfs2])]) @@ -57,29 +57,29 @@ AC_DEFUN([OMPI_CHECK_PVFS2],[ temp_with_pvfs2_libs="$with_pvfs2_libs" AS_IF([test -z "$with_pvfs2_libs"], [with_pvfs2_libs="pvfs2 pthread"]) - + # Add correct -I and -L flags AS_IF([test -d "$with_pvfs2/include"], [check_pvfs2_CPPFLAGS="-I$with_pvfs2/include" $1_CPPFLAGS="$check_pvfs2_CPPFLAGS" CPPFLAGS="$CPPFLAGS $check_pvfs2_CPPFLAGS"], [ompi_check_pvfs2_happy="no"]) - + AS_IF([test "$ompi_check_pvfs2_happy" = "yes"], [AS_IF([test -d "$with_pvfs2/lib"], [check_pvfs2_LDFLAGS="-L$with_pvfs2/lib" $1_LDFLAGS="$check_pvfs2_LDFLAGS" LDFLAGS="$LDFLAGS $check_pvfs2_LDFLAGS"], - [ompi_check_pvfs2_happy="no"]) + [ompi_check_pvfs2_happy="no"]) ],[]) - + # Try to find all the pvfs2 libraries AS_IF([test "$ompi_check_pvfs2_happy" = "yes"], [ AS_IF([test -n "$with_pvfs2_libs"] [for lib in $with_pvfs2_libs ; do check_pvfs2_LIBS="$check_pvfs2_LIBS -l$lib" - done]) - + done]) + $1_LIBS="$check_pvfs2_LIBS" LIBS="$LIBS $check_pvfs2_LIBS" diff --git a/config/ompi_check_udapl.m4 b/config/ompi_check_udapl.m4 index 02dac4649d5..d45a709af67 100644 --- a/config/ompi_check_udapl.m4 +++ b/config/ompi_check_udapl.m4 @@ -22,7 +22,7 @@ dnl # OMPI_CHECK_UDAPL(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if uDAPL support can be found. sets prefix_{CPPFLAGS, +# check if uDAPL support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OMPI_CHECK_UDAPL],[ @@ -44,7 +44,7 @@ AC_DEFUN([OMPI_CHECK_UDAPL],[ # Linux/OFED, you'll get a bunch of warning messages about the # providers that don't work. However, on Linux/OFED, you don't # really want to use udapl anyway; you likely really want to use - # the openib BTL (i.e., native verbs, not udapl). + # the openib BTL (i.e., native verbs, not udapl). # So after exploring many different scenarios, the least evil # solution seemed to be to disable building the udapl BTL on @@ -53,7 +53,7 @@ AC_DEFUN([OMPI_CHECK_UDAPL],[ # --with-udapl(=DIR), the udapl BTL will not be built. AS_IF([test -z "$with_udapl"], [case $host in - *linux*) + *linux*) AC_MSG_WARN([On Linux and --with-udapl was not specified]) AC_MSG_WARN([Not building the udapl BTL]) with_udapl=no @@ -84,7 +84,7 @@ dnl out we need -ldapl to link (looks like udapl over GM). ompi_check_package_$1_orig_LIBS="$$1_LIBS" AS_IF([test "$ompi_check_udapl_happy" = "yes"], - [_OPAL_CHECK_PACKAGE_HEADER([$1], + [_OPAL_CHECK_PACKAGE_HEADER([$1], [dat/udat.h], [$ompi_check_udapl_dir], [ompi_check_udapl_happy="yes"], diff --git a/config/ompi_config_files.m4 b/config/ompi_config_files.m4 index c30b485a6a7..b20ca13400e 100644 --- a/config/ompi_config_files.m4 +++ b/config/ompi_config_files.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -15,10 +15,10 @@ AC_DEFUN([OMPI_CONFIG_FILES],[ ompi/include/Makefile ompi/include/mpif.h ompi/include/mpif-config.h - + ompi/datatype/Makefile ompi/debuggers/Makefile - + ompi/mpi/c/Makefile ompi/mpi/c/profile/Makefile ompi/mpi/cxx/Makefile @@ -36,7 +36,7 @@ AC_DEFUN([OMPI_CONFIG_FILES],[ ompi/mpi/fortran/mpiext/Makefile ompi/mpi/tool/Makefile ompi/mpi/tool/profile/Makefile - + ompi/tools/ompi_info/Makefile ompi/tools/wrappers/Makefile ompi/tools/wrappers/mpicc-wrapper-data.txt diff --git a/config/ompi_config_threads.m4 b/config/ompi_config_threads.m4 index 761fc858742..4431cad7d9e 100644 --- a/config/ompi_config_threads.m4 +++ b/config/ompi_config_threads.m4 @@ -5,15 +5,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -35,7 +35,7 @@ AC_DEFUN([OMPI_CONFIG_THREADS],[ # --enable-mpi-thread-multiple # #if OMPI_ENABLE_THREAD_MULTIPLE == 0 /* Not available */ # #if OMPI_ENABLE_THREAD_MULTIPLE == 1 /* Available */ -# +# AC_MSG_CHECKING([if want MPI_THREAD_MULTIPLE support]) AC_ARG_ENABLE([mpi_thread_multiple], [AC_HELP_STRING([--enable-mpi-thread-multiple], diff --git a/config/ompi_configure_options.m4 b/config/ompi_configure_options.m4 index 4c0cdd44b67..0759a4c6606 100644 --- a/config/ompi_configure_options.m4 +++ b/config/ompi_configure_options.m4 @@ -140,7 +140,7 @@ case "x$enable_mpi_fortran" in OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS ;; - + xno|xnone) AC_MSG_RESULT([no (none)]) OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS diff --git a/config/ompi_contrib.m4 b/config/ompi_contrib.m4 index e0d503a5257..d2b19753d8a 100644 --- a/config/ompi_contrib.m4 +++ b/config/ompi_contrib.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -15,9 +15,9 @@ dnl Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -69,7 +69,7 @@ AC_DEFUN([OMPI_CONTRIB],[ OMPI_MPI_CONTRIBS= # Cycle through each of the software packages and - # configure them if not disabled. + # configure them if not disabled. m4_foreach(software, [ompi_mpicontrib_list], [_OMPI_CONTRIB_CONFIGURE(software)]) diff --git a/config/ompi_cxx_find_exception_flags.m4 b/config/ompi_cxx_find_exception_flags.m4 index fd543a2fc6e..d6c45855357 100644 --- a/config/ompi_cxx_find_exception_flags.m4 +++ b/config/ompi_cxx_find_exception_flags.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -37,7 +37,7 @@ AC_DEFUN([OMPI_CXX_FIND_EXCEPTION_FLAGS],[ AC_ARG_WITH(exflags, AC_HELP_STRING([--with-exflags], - [Specify flags necessary to enable C++ exceptions]), + [Specify flags necessary to enable C++ exceptions]), ompi_force_exflags="$withval") ompi_CXXFLAGS_SAVE="$CXXFLAGS" diff --git a/config/ompi_cxx_find_template_parameters.m4 b/config/ompi_cxx_find_template_parameters.m4 index ed0d6adbf45..bfa4677a15e 100644 --- a/config/ompi_cxx_find_template_parameters.m4 +++ b/config/ompi_cxx_find_template_parameters.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -29,9 +29,9 @@ AC_DEFUN([OMPI_CXX_FIND_TEMPLATE_PARAMETERS],[ # Adds to CXXFLAGS AC_MSG_CHECKING([for C++ compiler template parameters]) -if test "$BASECXX" = "KCC"; then +if test "$BASECXX" = "KCC"; then new_flags="--one_instantiation_per_object" - CXXFLAGS="$CXXFLAGS $new_flags" + CXXFLAGS="$CXXFLAGS $new_flags" else new_flags="none needed" fi diff --git a/config/ompi_cxx_find_template_repository.m4 b/config/ompi_cxx_find_template_repository.m4 index cef8911e194..47d4cf2a26a 100644 --- a/config/ompi_cxx_find_template_repository.m4 +++ b/config/ompi_cxx_find_template_repository.m4 @@ -6,16 +6,16 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -133,11 +133,11 @@ else # Is it a directory? if test -d "$ompi_file"; then ompi_template_dir="$ompi_file $ompi_template_dir" - + # Or is it a file? else name="`echo $ompi_file | cut -d. -f1`" - + temp_mask= if test "$name" = "main" || test "$name" = "other"; then temp_mask="`echo $ompi_file | cut -d. -f2`" diff --git a/config/ompi_cxx_have_exceptions.m4 b/config/ompi_cxx_have_exceptions.m4 index 2049e926590..2bd886e675f 100644 --- a/config/ompi_cxx_have_exceptions.m4 +++ b/config/ompi_cxx_have_exceptions.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -24,7 +24,7 @@ AC_DEFUN([OMPI_CXX_HAVE_EXCEPTIONS],[ # # Depdencies: None # -# Check to see if the C++ compiler can handle exceptions +# Check to see if the C++ compiler can handle exceptions # # Sets OMPI_CXX_EXCEPTIONS to 1 if compiler has exceptions, 0 if not # @@ -32,7 +32,7 @@ AC_DEFUN([OMPI_CXX_HAVE_EXCEPTIONS],[ AC_MSG_CHECKING([for throw/catch]) AC_LANG_SAVE AC_LANG_CPLUSPLUS -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int i=1; throw(i);]])], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int i=1; throw(i);]])], OMPI_CXX_EXCEPTIONS=1, OMPI_CXX_EXCPTIONS=0) if test "$OMPI_CXX_EXCEPTIONS" = "1"; then AC_MSG_RESULT([yes]) diff --git a/config/ompi_fortran_check.m4 b/config/ompi_fortran_check.m4 index f96f1707bc3..46ecf24d0ee 100644 --- a/config/ompi_fortran_check.m4 +++ b/config/ompi_fortran_check.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -14,14 +14,14 @@ dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl -# OMPI_FORTRAN_CHECK(Fortran type, c type required, types to search, +# OMPI_FORTRAN_CHECK(Fortran type, c type required, types to search, # expected size, define ompi_fortran__t or not)) #---------------------------------------------------------- # Check Fortran type, including: @@ -55,7 +55,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [ fi if test "$ofc_have_type" = "1"; then - # What is the size of this type? + # What is the size of this type? # NOTE: Some Fortran compilers actually will return that a # type exists even if it doesn't support it -- the compiler @@ -166,20 +166,20 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [ # AC_DEFINE_UNQUOTED), autoheader won't put them in the # AC_CONFIG_HEADER (or AM_CONFIG_HEADER, in our case). AC_DEFINE_UNQUOTED([OMPI_HAVE_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]), - [$ofc_have_type], + [$ofc_have_type], [Whether we have Fortran $1 or not]) AC_DEFINE_UNQUOTED([OMPI_SIZEOF_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]), - [$ofc_type_size], + [$ofc_type_size], [Size of Fortran $1]) AC_DEFINE_UNQUOTED([OMPI_ALIGNMENT_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]), - [$ofc_type_alignment], + [$ofc_type_alignment], [Alignment of Fortran $1]) AC_DEFINE_UNQUOTED([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]), - [$ofc_type_kind], + [$ofc_type_kind], [Fortrn KIND number for $1]) if test "$3" != "" && test "$ofc_define_type" = "yes"; then AC_DEFINE_UNQUOTED([ompi_fortran_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [A-Z], [a-z])[_t], - [$ofc_c_type], + [$ofc_c_type], [C type corresponding to Fortran $1]) fi diff --git a/config/ompi_fortran_check_abstract.m4 b/config/ompi_fortran_check_abstract.m4 index 95fcb444e0c..422ce35b431 100644 --- a/config/ompi_fortran_check_abstract.m4 +++ b/config/ompi_fortran_check_abstract.m4 @@ -6,22 +6,22 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # Check whether or not the Fortran compiler supports the "abstract" # keyword in derived types or not. -# OMPI_FORTRAN_CHECK_ABSTRACT([action if found], +# OMPI_FORTRAN_CHECK_ABSTRACT([action if found], # [action if not found]) # ---------------------------------------------------- AC_DEFUN([OMPI_FORTRAN_CHECK_ABSTRACT],[ diff --git a/config/ompi_fortran_check_asynchronous.m4 b/config/ompi_fortran_check_asynchronous.m4 index 92247360140..0cc3c84bfe5 100644 --- a/config/ompi_fortran_check_asynchronous.m4 +++ b/config/ompi_fortran_check_asynchronous.m4 @@ -6,22 +6,22 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # Check whether or not the Fortran compiler supports the "asynchronous" # keyword in derived types or not. -# OMPI_FORTRAN_CHECK_ASYNCHRONOUS([action if found], +# OMPI_FORTRAN_CHECK_ASYNCHRONOUS([action if found], # [action if not found]) # ---------------------------------------------------- AC_DEFUN([OMPI_FORTRAN_CHECK_ASYNCHRONOUS],[ diff --git a/config/ompi_fortran_check_bind_c.m4 b/config/ompi_fortran_check_bind_c.m4 index 7551ae1a677..bcdf6e31872 100644 --- a/config/ompi_fortran_check_bind_c.m4 +++ b/config/ompi_fortran_check_bind_c.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/ompi_fortran_check_f08_assumed_rank.m4 b/config/ompi_fortran_check_f08_assumed_rank.m4 index 4bf942f9c6f..023569a22b2 100644 --- a/config/ompi_fortran_check_f08_assumed_rank.m4 +++ b/config/ompi_fortran_check_f08_assumed_rank.m4 @@ -6,27 +6,27 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ # Does this compiler support the Fortran 2008 assumed rank syntax? -# OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK([action if found], +# OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK([action if found], # [action if not found]) # ---------------------------------------------------------------- AC_DEFUN([OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK], [ - AS_VAR_PUSHDEF([fortran_f08_assumed_rank], + AS_VAR_PUSHDEF([fortran_f08_assumed_rank], [ompi_cv_fortran_f08_assumed_rank]) AC_CACHE_CHECK([Fortran compiler F08 assumed rank syntax], diff --git a/config/ompi_fortran_check_ignore_tkr.m4 b/config/ompi_fortran_check_ignore_tkr.m4 index 76493fa33a0..f3b1f9232d4 100644 --- a/config/ompi_fortran_check_ignore_tkr.m4 +++ b/config/ompi_fortran_check_ignore_tkr.m4 @@ -6,18 +6,18 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ # Does this compiler support (void*)-like functionality for MPI choice @@ -28,7 +28,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR], [ OMPI_FORTRAN_IGNORE_TKR_PREDECL= OMPI_FORTRAN_IGNORE_TKR_TYPE= - AS_VAR_PUSHDEF([fortran_ignore_tkr_data], + AS_VAR_PUSHDEF([fortran_ignore_tkr_data], [ompi_cv_fortran_ignore_tkr_data]) # Note that we can only cache 1 value at a time, but this test @@ -89,7 +89,7 @@ AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [ [!DEC\$ ATTRIBUTES NO_ARG_CHECK], [happy=1], [happy=0])]) # Solaris Studio compilers - # Note that due to a compiler bug, we have been advised by Oracle to + # Note that due to a compiler bug, we have been advised by Oracle to # use the "character(*)" type AS_IF([test $happy -eq 0], [OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB( @@ -109,7 +109,7 @@ AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [ [!IBM* IGNORE_TKR], [happy=1], [happy=0])]) - AS_VAR_SET(fortran_ignore_tkr_data, + AS_VAR_SET(fortran_ignore_tkr_data, [${happy}:${ompi_fortran_ignore_tkr_type}:${ompi_fortran_ignore_tkr_predecl}]) # Now put the orignal CACHE_CHECK MSG_CHECKING back so that it can @@ -156,7 +156,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [ complex :: buffer3(4,4) complex, pointer, dimension(:,:) :: ptr target :: buffer3 - ptr => buffer3 + ptr => buffer3 ! Set some known values (somewhat irrelevant for this test, but just be ! sure that the values are initialized) @@ -173,7 +173,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [ ! Force us through an assumed shape call force_assumed_shape(buffer3, count) ! Force a pointer call through an assumed shape (!) - ptr => buffer3 + ptr => buffer3 end program @@ -183,7 +183,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [ call foo(a, count) end subroutine force_assumed_shape -! Autoconf puts "end" after the last line +! Autoconf puts "end" after the last line subroutine bogus ]]), [msg=yes diff --git a/config/ompi_fortran_check_logical_array.m4 b/config/ompi_fortran_check_logical_array.m4 index a358cbbb794..7a6a6291548 100644 --- a/config/ompi_fortran_check_logical_array.m4 +++ b/config/ompi_fortran_check_logical_array.m4 @@ -4,7 +4,7 @@ dnl Copyright (c) 2004-2005 The Trustees of Indiana University. dnl All rights reserved. dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee. dnl All rights reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -12,14 +12,14 @@ dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl AC_DEFUN([OMPI_FORTRAN_CHECK_LOGICAL_ARRAY],[ - AS_VAR_PUSHDEF([logical_array_var], + AS_VAR_PUSHDEF([logical_array_var], [ompi_cv_fortran_logical_array_correct]) AC_CACHE_CHECK([for correct handling of Fortran logical arrays], @@ -41,7 +41,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_LOGICAL_ARRAY],[ EOF # C module - # We really need the confdefs.h Header file for + # We really need the confdefs.h Header file for # the ompi_fortran_logical_t definition if test \! -f confdefs.h ; then AC_MSG_WARN([*** Problem running configure test!]) @@ -97,7 +97,7 @@ EOF AC_MSG_ERROR([Error determining if arrays of logical values work properly.]) fi - AS_IF([test "$cross_compiling" = "yes"], + AS_IF([test "$cross_compiling" = "yes"], [ # assume we're ok value=yes], [OPAL_LOG_COMMAND([./conftest], @@ -105,7 +105,7 @@ EOF value=yes else value=no - fi], + fi], [value=no])]) fi AS_VAR_SET(logical_array_var, [$value]) diff --git a/config/ompi_fortran_check_private.m4 b/config/ompi_fortran_check_private.m4 index 2dd6b5fc46d..b9789b1db14 100644 --- a/config/ompi_fortran_check_private.m4 +++ b/config/ompi_fortran_check_private.m4 @@ -6,22 +6,22 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # Check whether or not the Fortran compiler supports the "private" # keyword in derived types or not. -# OMPI_FORTRAN_CHECK_PRIVATE([action if found], +# OMPI_FORTRAN_CHECK_PRIVATE([action if found], # [action if not found]) # ---------------------------------------------------- AC_DEFUN([OMPI_FORTRAN_CHECK_PRIVATE],[ diff --git a/config/ompi_fortran_check_procedure.m4 b/config/ompi_fortran_check_procedure.m4 index ef09dccc709..5ab68714492 100644 --- a/config/ompi_fortran_check_procedure.m4 +++ b/config/ompi_fortran_check_procedure.m4 @@ -6,22 +6,22 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # Check whether or not the Fortran compiler supports the "procedure" # keyword in derived types or not. -# OMPI_FORTRAN_CHECK_PROCEDURE([action if found], +# OMPI_FORTRAN_CHECK_PROCEDURE([action if found], # [action if not found]) # ---------------------------------------------------- AC_DEFUN([OMPI_FORTRAN_CHECK_PROCEDURE],[ diff --git a/config/ompi_fortran_check_protected.m4 b/config/ompi_fortran_check_protected.m4 index aacd54072f7..effdcd90579 100644 --- a/config/ompi_fortran_check_protected.m4 +++ b/config/ompi_fortran_check_protected.m4 @@ -6,22 +6,22 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # Check whether or not the Fortran compiler supports the "protected" # keyword in derived types or not. -# OMPI_FORTRAN_CHECK_PROTECTED([action if found], +# OMPI_FORTRAN_CHECK_PROTECTED([action if found], # [action if not found]) # ---------------------------------------------------- AC_DEFUN([OMPI_FORTRAN_CHECK_PROTECTED],[ diff --git a/config/ompi_fortran_check_real16_c_equiv.m4 b/config/ompi_fortran_check_real16_c_equiv.m4 index 2a40bcae04d..df32dbdabb4 100644 --- a/config/ompi_fortran_check_real16_c_equiv.m4 +++ b/config/ompi_fortran_check_real16_c_equiv.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -15,9 +15,9 @@ dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -29,7 +29,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[ AS_VAR_PUSHDEF([real16_matches_c_var], [ompi_cv_real16_c_equiv]) # We have to do this as a cache check for cross-compilation platforms - AC_CACHE_CHECK([for C type matching bit representation of REAL*16], + AC_CACHE_CHECK([for C type matching bit representation of REAL*16], real16_matches_c_var, [AS_IF([test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \ test "$OMPI_HAVE_FORTRAN_REAL16" = "1"], @@ -84,7 +84,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[ AS_VAR_POPDEF([real16_matches_c_var]) AS_IF([test "$ompi_real16_matches_c" = "yes"], - [define_value=1], + [define_value=1], [define_value=0 AC_MSG_WARN([MPI_REAL16 and MPI_COMPLEX32 support have been disabled])]) AC_DEFINE_UNQUOTED([OMPI_REAL16_MATCHES_C], [$define_value], diff --git a/config/ompi_fortran_check_type.m4 b/config/ompi_fortran_check_type.m4 index 6ce7e24391b..eac3eeabbc8 100644 --- a/config/ompi_fortran_check_type.m4 +++ b/config/ompi_fortran_check_type.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/ompi_fortran_find_ext_symbol_convention.m4 b/config/ompi_fortran_find_ext_symbol_convention.m4 index 80a8d1f907c..c073f8448f6 100644 --- a/config/ompi_fortran_find_ext_symbol_convention.m4 +++ b/config/ompi_fortran_find_ext_symbol_convention.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -15,9 +15,9 @@ dnl Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/ompi_fortran_find_module_include_flag.m4 b/config/ompi_fortran_find_module_include_flag.m4 index 132aeba1622..5b6e0debf0c 100644 --- a/config/ompi_fortran_find_module_include_flag.m4 +++ b/config/ompi_fortran_find_module_include_flag.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -24,9 +24,9 @@ dnl # OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG([action if found], [action if not found] AC_DEFUN([OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG],[ AS_VAR_PUSHDEF([fortran_inc_var], [ompi_cv_fortran_module_include_flag]) - + OMPI_FC_MODULE_FLAG= - AC_CACHE_CHECK([for Fortran compiler module include flag], + AC_CACHE_CHECK([for Fortran compiler module include flag], fortran_inc_var, [ofi_possible_flags="-I -p -M" mkdir conftest.$$ @@ -43,7 +43,7 @@ module OMPI_MOD_FLAG end module OMPI_MOD_FLAG EOF - OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 -c conftest-module.f90 $LDFLAGS $LIBS], , + OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 -c conftest-module.f90 $LDFLAGS $LIBS], , [cd .. rm -rf conftest.$$ AC_MSG_RESULT([Whoops!]) diff --git a/config/ompi_fortran_get_alignment.m4 b/config/ompi_fortran_get_alignment.m4 index 82a9e046ef3..141e062d5d7 100644 --- a/config/ompi_fortran_get_alignment.m4 +++ b/config/ompi_fortran_get_alignment.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -102,7 +102,7 @@ void $ompi_ac_align_fn(char *w, char *x, char *y, char *z) else if (! ((aw%8)||(ax%8)||(ay%8)||(az%8))) fprintf(f, "%d\n", 8); else if (! ((aw%4)||(ax%4)||(ay%4)||(az%4))) fprintf(f, "%d\n", 4); else if (! ((aw%2)||(ax%2)||(ay%2)||(az%2))) fprintf(f, "%d\n", 2); - else fprintf(f, "%d\n", 1); + else fprintf(f, "%d\n", 1); fclose(f); } #ifdef __cplusplus @@ -160,7 +160,7 @@ program falignment write (10,'(I5)') LOC(t2)-LOC(t1) endif CLOSE(10) - + end program]])], [AS_IF([test "$cross_compiling" = "yes"], [AC_MSG_ERROR([Can not determine alignment of $1 when cross-compiling])], diff --git a/config/ompi_fortran_get_handle_max.m4 b/config/ompi_fortran_get_handle_max.m4 index 8d4981ba007..819d40a3651 100644 --- a/config/ompi_fortran_get_handle_max.m4 +++ b/config/ompi_fortran_get_handle_max.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -24,13 +24,13 @@ dnl # min(INT_MAX, max fortran INTEGER). This represents the maximum # number of fortran MPI handle index. AC_DEFUN([OMPI_FORTRAN_GET_HANDLE_MAX],[ - AS_VAR_PUSHDEF([fortran_handle_max_var], + AS_VAR_PUSHDEF([fortran_handle_max_var], [ompi_cv_fortran_handle_max]) AC_CACHE_CHECK([for max Fortran MPI handle index], fortran_handle_max_var, [ # Find max fortran INTEGER value. Set to sentinel value if we don't - # have a Fortran compiler (e.g., if --disable-fortran was given). + # have a Fortran compiler (e.g., if --disable-fortran was given). if test $ompi_fortran_happy -eq 0; then ompi_fint_max=0 else @@ -46,8 +46,8 @@ AC_DEFUN([OMPI_FORTRAN_GET_HANDLE_MAX],[ ]],[[FILE *fp = fopen("conftest.out", "w"); long cint = INT_MAX; fprintf(fp, "%ld", cint); -fclose(fp);]])], - [ompi_cint_max=`cat conftest.out`], +fclose(fp);]])], + [ompi_cint_max=`cat conftest.out`], [ompi_cint_max=0], [ #cross compiling is fun. compute INT_MAX same as INTEGER max OPAL_COMPUTE_MAX_VALUE([$ac_cv_sizeof_int], [ompi_cint_max])]) @@ -71,7 +71,7 @@ fclose(fp);]])], fi fi AS_VAR_SET(fortran_handle_max_var, [$value]) - rm -f conftest.out > /dev/null 2>&1 + rm -f conftest.out > /dev/null 2>&1 unset value]) AS_VAR_COPY([ompi_fortran_handle_max], [fortran_handle_max_var]) diff --git a/config/ompi_fortran_get_kind_value.m4 b/config/ompi_fortran_get_kind_value.m4 index 54e22ac0211..fb476596ee9 100644 --- a/config/ompi_fortran_get_kind_value.m4 +++ b/config/ompi_fortran_get_kind_value.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -14,9 +14,9 @@ dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -28,7 +28,7 @@ AC_DEFUN([OMPI_FORTRAN_GET_KIND_VALUE],[ AS_VAR_PUSHDEF([kind_value_var], m4_translit([[ompi_cv_fortran_kind_value_$1]], [*], [p])) - rm -f conftest.out + rm -f conftest.out AC_CACHE_CHECK([KIND value of Fortran $1], kind_value_var, [if test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS || \ test $ompi_fortran_happy -eq 0; then diff --git a/config/ompi_fortran_get_sizeof.m4 b/config/ompi_fortran_get_sizeof.m4 index defd35e31fa..e25d982c58f 100644 --- a/config/ompi_fortran_get_sizeof.m4 +++ b/config/ompi_fortran_get_sizeof.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -25,7 +25,7 @@ AC_DEFUN([OMPI_FORTRAN_GET_SIZEOF],[ # http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html AS_VAR_PUSHDEF([type_var], m4_translit([[ompi_cv_fortran_sizeof_$2]], [*], [p])) - + AC_CACHE_CHECK([size of Fortran $2], type_var, [OMPI_FORTRAN_MAKE_C_FUNCTION([ompi_ac_size_fn], [size]) # Fortran module diff --git a/config/ompi_fortran_get_value_true.m4 b/config/ompi_fortran_get_value_true.m4 index f14b4b8b04c..180d62c820f 100644 --- a/config/ompi_fortran_get_value_true.m4 +++ b/config/ompi_fortran_get_value_true.m4 @@ -4,7 +4,7 @@ dnl Copyright (c) 2004-2005 The Trustees of Indiana University. dnl All rights reserved. dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee. dnl All rights reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -12,9 +12,9 @@ dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -28,7 +28,7 @@ AC_DEFUN([OMPI_FORTRAN_GET_VALUE_TRUE],[ unset ompi_cv_fortran_true_value fi - AS_VAR_PUSHDEF([fortran_true_var], + AS_VAR_PUSHDEF([fortran_true_var], [ompi_cv_fortran_true_value]) AC_CACHE_CHECK([Fortran value for .TRUE. logical type], @@ -124,7 +124,7 @@ EOF ]) AS_VAR_COPY([ompi_fortran_true_value], [fortran_true_var]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_VALUE_TRUE], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_VALUE_TRUE], [$ompi_fortran_true_value], [Fortran value for LOGICAL .TRUE. value]) AS_VAR_POPDEF([fortran_true_var]) diff --git a/config/ompi_interix.m4 b/config/ompi_interix.m4 index c745aad517e..7e4339a497b 100644 --- a/config/ompi_interix.m4 +++ b/config/ompi_interix.m4 @@ -4,9 +4,9 @@ dnl Copyright (c) 2008 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/ompi_microsoft.m4 b/config/ompi_microsoft.m4 index 52be48d2785..b50db392c89 100644 --- a/config/ompi_microsoft.m4 +++ b/config/ompi_microsoft.m4 @@ -4,9 +4,9 @@ dnl Copyright (c) 2004-2007 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/ompi_setup_contrib.m4 b/config/ompi_setup_contrib.m4 index eb143850657..58c470ef131 100644 --- a/config/ompi_setup_contrib.m4 +++ b/config/ompi_setup_contrib.m4 @@ -6,19 +6,19 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 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) 2006-2009 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/config/ompi_setup_cxx.m4 b/config/ompi_setup_cxx.m4 index eef5f1adaca..059a172aa85 100644 --- a/config/ompi_setup_cxx.m4 +++ b/config/ompi_setup_cxx.m4 @@ -11,21 +11,21 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # This macro is necessary to get the title to be displayed first. :-) AC_DEFUN([OMPI_SETUP_CXX_BANNER],[ - opal_show_subtitle "C++ compiler and preprocessor" + opal_show_subtitle "C++ compiler and preprocessor" ]) # This macro is necessary because PROG_CXX* is REQUIREd by multiple @@ -116,7 +116,7 @@ AC_DEFUN([_OMPI_SETUP_CXX_COMPILER],[ [AS_IF([test "$ompi_cv_cxx_compiler_vendor" = "microsoft" ], [ompi_cxx_compiler_works=yes], [OPAL_CHECK_COMPILER_WORKS([C++], [#include -], +], [std::string foo = "Hello, world"], [ompi_cxx_compiler_works=yes], [ompi_cxx_compiler_works=no])])]) @@ -131,7 +131,7 @@ AC_DEFUN([_OMPI_SETUP_CXX_COMPILER],[ AC_MSG_CHECKING([if able to build the MPI C++ bindings]) AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"], - [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AS_IF([test "$enable_mpi_cxx" = "yes"], [AC_MSG_WARN([MPI C++ binding support requested but not delivered]) @@ -178,10 +178,10 @@ AC_DEFUN([_OMPI_SETUP_CXX_COMPILER_BACKEND],[ CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype" AC_CACHE_CHECK([if $CXX supports -Wno-long-double], [ompi_cv_cxx_wno_long_double], - [AC_TRY_COMPILE([], [], + [AC_TRY_COMPILE([], [], [dnl Alright, the -Wno-long-double did not produce any errors... dnl Well well, try to extract a warning regarding unrecognized or ignored options - AC_TRY_COMPILE([], [long double test;], + AC_TRY_COMPILE([], [long double test;], [ ompi_cv_cxx_wno_long_double="yes" if test -s conftest.err ; then @@ -243,7 +243,7 @@ AC_DEFUN([_OMPI_SETUP_CXX_COMPILER_BACKEND],[ * files created by your C compiler. This generally indicates either * a conflict between the options specified in CFLAGS and CXXFLAGS * or a problem with the local compiler installation. More -* information (including exactly what command was given to the +* information (including exactly what command was given to the * compilers and what error resulted when the commands were executed) is * available in the config.log file in this directory. ********************************************************************** @@ -296,7 +296,7 @@ AC_DEFUN([_OMPI_CXX_CHECK_EXCEPTIONS],[ # Check for special things due to C++ exceptions ENABLE_CXX_EXCEPTIONS=no HAVE_CXX_EXCEPTIONS=0 - AC_ARG_ENABLE([cxx-exceptions], + AC_ARG_ENABLE([cxx-exceptions], [AC_HELP_STRING([--enable-cxx-exceptions], [enable support for C++ exceptions (default: disabled)])], [ENABLE_CXX_EXCEPTIONS="$enableval"]) @@ -366,10 +366,10 @@ AC_DEFUN([_OMPI_CXX_CHECK_BUILTIN],[ AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"], [_OMPI_CXX_CHECK_BUILTIN_BACKEND]) - AC_DEFINE_UNQUOTED([OMPI_CXX_HAVE_BUILTIN_EXPECT], + AC_DEFINE_UNQUOTED([OMPI_CXX_HAVE_BUILTIN_EXPECT], [$have_cxx_builtin_expect], [Whether C++ compiler supports __builtin_expect]) - AC_DEFINE_UNQUOTED([OMPI_CXX_HAVE_BUILTIN_PREFETCH], + AC_DEFINE_UNQUOTED([OMPI_CXX_HAVE_BUILTIN_PREFETCH], [$have_cxx_builtin_prefetch], [Whether C++ compiler supports __builtin_prefetch]) @@ -442,7 +442,7 @@ AC_DEFUN([_OMPI_CXX_CHECK_2D_CONST_CAST_BACKEND],[ [ompi_cv_cxx_supports_2d_const_cast], [AC_TRY_COMPILE([int non_const_func(int ranges[][3]); int cast_test(const int ranges[][3]) { - return non_const_func(const_cast(ranges)); + return non_const_func(const_cast(ranges)); }], [], [ompi_cv_cxx_supports_2d_const_cast="yes"], diff --git a/config/ompi_setup_fc.m4 b/config/ompi_setup_fc.m4 index 69d3b5d0802..0312ef54e34 100644 --- a/config/ompi_setup_fc.m4 +++ b/config/ompi_setup_fc.m4 @@ -6,20 +6,20 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl dnl OMPI_SETUP_FC @@ -27,7 +27,7 @@ dnl # This is REQUIREd, below. AC_DEFUN_ONCE([_OMPI_SETUP_FC_BANNER],[ - opal_show_subtitle "Fortran compiler" + opal_show_subtitle "Fortran compiler" ]) ############################################################################# @@ -78,7 +78,7 @@ AC_DEFUN([OMPI_SETUP_FC],[ AS_IF([test $ompi_fc_happy -eq 1], [OPAL_CHECK_COMPILER_WORKS([Fortran], [], [], [], [AC_MSG_ERROR([Could not run a simple Fortran program. Aborting.])])]) - + # OS X before 10.3 (deployment target) does not allow undefined common # symbols in shared libraries. Because we can't figure out how to # implement MPI_STATUSES_IGNORE and friends wihtout common symbols, on @@ -125,7 +125,7 @@ AC_DEFUN([OMPI_SETUP_FC],[ AC_MSG_RESULT([none]) ;; esac - + # If we're still good, then save the extra file types. Do this last # because it implies tests that should be invoked by the above tests # (e.g., running the fortran compiler). @@ -204,7 +204,7 @@ EOF [AC_MSG_RESULT([skipped (no C++ exceptions flags)])], [FCFLAGS="$FCFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS" AC_LANG_PUSH([Fortran]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ INTEGER I I = 3]])], [AC_MSG_RESULT([yes])], diff --git a/config/ompi_setup_java.m4 b/config/ompi_setup_java.m4 index 5fb6e5f8e7c..bf707a89b17 100644 --- a/config/ompi_setup_java.m4 +++ b/config/ompi_setup_java.m4 @@ -11,21 +11,21 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007-2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # This macro is necessary to get the title to be displayed first. :-) AC_DEFUN([OMPI_SETUP_JAVA_BINDINGS_BANNER],[ - opal_show_subtitle "Java MPI bindings" + opal_show_subtitle "Java MPI bindings" ]) # OMPI_SETUP_JAVA_BINDINGS() diff --git a/config/ompi_setup_mpi_ext.m4 b/config/ompi_setup_mpi_ext.m4 index 9abfd9f60e4..a22ef1aa766 100644 --- a/config/ompi_setup_mpi_ext.m4 +++ b/config/ompi_setup_mpi_ext.m4 @@ -6,24 +6,24 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 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) 2006-2009 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # AC_DEFUN([OMPI_SETUP_MPI_EXT],[ - opal_show_title "Extended MPI interfaces setup" + opal_show_title "Extended MPI interfaces setup" OMPI_EXT ]) diff --git a/config/ompi_setup_mpi_fortran.m4 b/config/ompi_setup_mpi_fortran.m4 index 6e6dce7bf15..eac502d003b 100644 --- a/config/ompi_setup_mpi_fortran.m4 +++ b/config/ompi_setup_mpi_fortran.m4 @@ -143,7 +143,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ # regardless of whether we have F77 support or not. OMPI_FORTRAN_CHECK([CHARACTER], [yes], [char, int32_t, int, int64_t, long long, long], [-1], [yes]) - + OMPI_FORTRAN_CHECK([LOGICAL], [yes], [char, int32_t, int, int64_t, long long, long], [-1], [yes]) OMPI_FORTRAN_CHECK([LOGICAL*1], [yes], @@ -154,7 +154,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [int32_t, int, int64_t, long long, long], [4], [yes]) OMPI_FORTRAN_CHECK([LOGICAL*8], [yes], [int, int64_t, long long, long], [8], [yes]) - + OMPI_FORTRAN_CHECK([INTEGER], [yes], [int32_t, int, int64_t, long long, long], [-1], [yes]) OMPI_FORTRAN_CHECK([INTEGER*1], [no], @@ -167,7 +167,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [int, int64_t, long long, long], [8], [yes]) OMPI_FORTRAN_CHECK([INTEGER*16], [no], [int, int64_t, long long, long], [16], [yes]) - + OMPI_FORTRAN_CHECK([REAL], [yes], [float, double, long double], [-1], [yes]) OMPI_FORTRAN_CHECK([REAL*2], [no], @@ -178,15 +178,15 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [float, double, long double], [8], [yes]) OMPI_FORTRAN_CHECK([REAL*16], [no], [float, double, long double], [16], [yes]) - + # In some compilers, the bit representation of REAL*16 is not the same # as the C counterpart that we found. If this is the case, then we # want to disable reduction support for MPI_REAL16 (per ticket #1603). OMPI_FORTRAN_CHECK_REAL16_C_EQUIV - + OMPI_FORTRAN_CHECK([DOUBLE PRECISION], [yes], [float, double, long double], [-1], [yes]) - + OMPI_FORTRAN_CHECK([COMPLEX], [yes], [float _Complex], [-1], [no]) # The complex*N tests are a bit different (note: the complex tests are @@ -199,39 +199,39 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ # a) we must support real*(N/2) (i.e., compiler supports it and we # have a back-end C type for it) # b) compiler supports complex*N - + OMPI_FORTRAN_CHECK([COMPLEX*4], [no], [float _Complex], [4], [no]) - OMPI_FORTRAN_CHECK([COMPLEX*8], [no], + OMPI_FORTRAN_CHECK([COMPLEX*8], [no], [float _Complex, double _Complex, long double _Complex], [8], [no]) - OMPI_FORTRAN_CHECK([COMPLEX*16], [no], - [float _Complex, double _Complex, long double _Complex], + OMPI_FORTRAN_CHECK([COMPLEX*16], [no], + [float _Complex, double _Complex, long double _Complex], [16], [no]) - OMPI_FORTRAN_CHECK([COMPLEX*32], [no], + OMPI_FORTRAN_CHECK([COMPLEX*32], [no], [float _Complex, double _Complex, long double _Complex], [32], [no]) # Double precision complex types are not standard, but many # compilers support it. Code should be wrapped with #ifdef # OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX OMPI_FORTRAN_CHECK([DOUBLE COMPLEX], [no], - [float _Complex, double _Complex, long double _Complex], + [float _Complex, double _Complex, long double _Complex], [-1], [no]) - + # Regardless of whether we have fortran bindings, or even a # fortran compiler, get the max value for a fortran MPI handle # (this macro handles the case where we don't have a fortran - # compiler). + # compiler). OMPI_FORTRAN_GET_HANDLE_MAX # Check for Fortran compilers value of TRUE and for the correct # assumption on LOGICAL for conversion into what C considers to be - # a true value. + # a true value. OMPI_FORTRAN_GET_VALUE_TRUE OMPI_FORTRAN_CHECK_LOGICAL_ARRAY # Find out how many array ranks this compiler supports. OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK - + # How big should MPI_STATUS_SIZE be? (i.e., the size of # MPI_STATUS, expressed in units of Fortran INTEGERs). The C # equivalent of MPI_Status contains 4 C ints and a size_t. @@ -324,7 +324,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ AS_IF([test $ompi_fortran_happy -eq 1 && \ test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS], [ # Look for the fortran module compiler flag - OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG([], + OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG([], [AC_MSG_WARN([*** Could not determine the fortran compiler flag to indicate where modules reside]) AC_MSG_ERROR([*** Cannot continue])]) @@ -357,7 +357,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [AC_MSG_RESULT([yes])], [OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS AC_MSG_RESULT([no])]) - + #--------------------------------- # Fortran use mpi_f08 MPI bindings #--------------------------------- @@ -496,8 +496,8 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [ # How big are derived types with a single INTEGER? OMPI_FORTRAN_GET_SIZEOF([type, BIND(C) :: test_mpi_handle integer :: MPI_VAL -end type test_mpi_handle], - [type(test_mpi_handle)], +end type test_mpi_handle], + [type(test_mpi_handle)], [OMPI_FORTRAN_F08_HANDLE_SIZE]) OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT( [type(test_mpi_handle)], @@ -525,7 +525,7 @@ end type test_mpi_handle], # ("good" compilers) # c) compiler that does not support the items listed # in b) ("bad" compilers) - + AC_MSG_CHECKING([which mpi_f08 implementation to build]) AS_IF([test $OMPI_BUILD_FORTRAN_F08_SUBARRAYS -eq 1], [ # Case a) partial/prototype implementation @@ -580,7 +580,7 @@ end type test_mpi_handle], # and this header file must be usable in .F90 files. :-( AC_CONFIG_FILES([ompi/mpi/fortran/configure-fortran-output.h]) - # Values for wrapper compilers + # Values for wrapper compilers OMPI_FC=$FC set dummy $OMPI_FC OMPI_FC_ARGV0=[$]2 @@ -640,7 +640,7 @@ end type test_mpi_handle], AM_CONDITIONAL(BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER, [test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS && \ test $WANT_MPI_PROFILING -eq 1]) - AM_CONDITIONAL(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS, + AM_CONDITIONAL(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS, [test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS]) # ------------------- @@ -671,15 +671,15 @@ end type test_mpi_handle], # the unused "use mpi" directory, but we might as well have the # ompi/mpi/fortran/use-mpi*/Makefile.ams be safe, too. # True if we're building either "use mpi" bindings - AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS, + AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS, [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS || \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1]) # True if we're building the old TKR-style bindings - AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS, + AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS, [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 0]) # True if we're building the new ignore-TKR-style bindings - AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS, + AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS, [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \ test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1]) @@ -716,7 +716,7 @@ end type test_mpi_handle], [$OMPI_FORTRAN_NEED_WRAPPER_ROUTINES], [Whether the mpi_f08 implementation is using wrapper routines ("bad" Fortran compiler) or weak symbols ("good" Fortran compiler) for the F08 interface definition implementations]) - AC_DEFINE_UNQUOTED(OMPI_FORTRAN_F08_HANDLE_SIZE, + AC_DEFINE_UNQUOTED(OMPI_FORTRAN_F08_HANDLE_SIZE, $OMPI_FORTRAN_F08_HANDLE_SIZE, [How many bytes the mpi_f08 TYPE(MPI_) handles will be]) @@ -744,47 +744,47 @@ end type test_mpi_handle], AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME, [$OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME], [For ompi_info: Whether the compiler supports TYPE, BIND(C, NAME="name") or not]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_OPTIONAL_ARGS], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_OPTIONAL_ARGS], [$OMPI_FORTRAN_HAVE_OPTIONAL_ARGS], [For ompi_info: whether the Fortran compiler supports optional arguments or not]) # For configure-fortran-output.h, mpi-f08-types.F90 (and ompi_info) AC_SUBST([OMPI_FORTRAN_HAVE_PRIVATE]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PRIVATE], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PRIVATE], [$OMPI_FORTRAN_HAVE_PRIVATE], [For mpi-f08-types.f90 and ompi_info: whether the compiler supports the "private" keyword or not (used in MPI_Status)]) # For configure-fortran-output.h, mpi-f08-types.F90 (and ompi_info) AC_SUBST([OMPI_FORTRAN_HAVE_PROTECTED]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROTECTED], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROTECTED], [$OMPI_FORTRAN_HAVE_PROTECTED], [For mpi-f08-types.f90 and .F90 and ompi_info: whether the compiler supports the "protected" keyword or not]) # For configure-fortran-output.h, mpi-f08-interfaces-callbacks.F90 # (and ompi_info) AC_SUBST([OMPI_FORTRAN_HAVE_ABSTRACT]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ABSTRACT], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ABSTRACT], [$OMPI_FORTRAN_HAVE_ABSTRACT], [For mpi-f08-interfaces-callbacks.f90 and ompi_info: whether the compiler supports the "abstract" keyword or not]) # For configure-fortran-output.h, various files in # ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info) AC_SUBST([OMPI_FORTRAN_HAVE_ASYNCHRONOUS]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ASYNCHRONOUS], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ASYNCHRONOUS], [$OMPI_FORTRAN_HAVE_ASYNCHRONOUS], [For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports the "asynchronous" keyword or not]) # For configure-fortran-output.h, various files in # ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info) AC_SUBST([OMPI_FORTRAN_HAVE_PROCEDURE]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROCEDURE], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROCEDURE], [$OMPI_FORTRAN_HAVE_PROCEDURE], [For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports the "procedure" keyword or not]) # For configure-fortran-output.h, various files in # ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info) AC_SUBST([OMPI_FORTRAN_HAVE_C_FUNLOC]) - AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_C_FUNLOC], + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_C_FUNLOC], [$OMPI_FORTRAN_HAVE_C_FUNLOC], [For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports c_funloc or not]) @@ -795,7 +795,7 @@ end type test_mpi_handle], # ompi/mpi/fortran/use-mpi-f08 if it's not to be built, but we # might as well have ompi/mpi/fortran/use-mpi-f08/Makefile.am be # safe, too. - AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS, + AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS, [test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS]) AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_BINDINGS, diff --git a/config/ompi_setup_mpi_profiling.m4 b/config/ompi_setup_mpi_profiling.m4 index 810bed73808..455517c11f0 100644 --- a/config/ompi_setup_mpi_profiling.m4 +++ b/config/ompi_setup_mpi_profiling.m4 @@ -6,19 +6,19 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 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) 2006-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -37,10 +37,10 @@ AC_DEFUN([OMPI_SETUP_MPI_PROFILING],[ # define 2 conditionals which tell us whether each of these layers # need to be built or NOT # - + AM_CONDITIONAL(BUILD_MPI_BINDINGS_LAYER, test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1) - + AM_CONDITIONAL(BUILD_PMPI_BINDINGS_LAYER, test "$WANT_MPI_PROFILING" = 1) AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY, diff --git a/config/opal_case_sensitive_fs_setup.m4 b/config/opal_case_sensitive_fs_setup.m4 index ff1ed65372a..d6592e10478 100644 --- a/config/opal_case_sensitive_fs_setup.m4 +++ b/config/opal_case_sensitive_fs_setup.m4 @@ -6,14 +6,14 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -59,7 +59,7 @@ rm -f conf_fs_test.$$ CONF_FS_TEST.$$ # Now see what the user wants to do... # AC_MSG_CHECKING([if configuring for case sensitive filesystem]) -AC_ARG_WITH(cs_fs, +AC_ARG_WITH(cs_fs, AC_HELP_STRING([--with-cs-fs], [Destination FS is case sensitive (default: set to value of the build FS's case sensitivity)])) diff --git a/config/opal_check_attributes.m4 b/config/opal_check_attributes.m4 index 88788f26777..064a59aea6d 100644 --- a/config/opal_check_attributes.m4 +++ b/config/opal_check_attributes.m4 @@ -53,7 +53,7 @@ AC_DEFUN([_OPAL_ATTRIBUTE_FAIL_SEARCH],[ # regarding unused function in main file) # static int usage (int * argument); # -# The last argument is for specific CFLAGS, that need to be set +# The last argument is for specific CFLAGS, that need to be set # for the compiler to generate a warning on the cross-check. # This may need adaption for future compilers / CFLAG-settings. # @@ -138,7 +138,7 @@ AC_DEFUN([_OPAL_CHECK_SPECIFIC_ATTRIBUTE], [ # attribute most often fail with a warning (when the warning # level is set). # The compilers output is parsed in _OPAL_ATTRIBUTE_FAIL_SEARCH -# +# # To add a new attributes __NAME__ add the # opal_cv___attribute__NAME # add a new check with _OPAL_CHECK_SPECIFIC_ATTRIBUTE (possibly with a cross-check) diff --git a/config/opal_check_broken_qsort.m4 b/config/opal_check_broken_qsort.m4 index ac12bf6c59e..7d70c6a0ae7 100644 --- a/config/opal_check_broken_qsort.m4 +++ b/config/opal_check_broken_qsort.m4 @@ -6,16 +6,16 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl dnl There was some mentioning of broken qsort happened for Solaris that could @@ -29,7 +29,7 @@ dnl 5.9_sparc #112874-20 or later dnl 5.9_x86 #114432-07 or later dnl dnl For users who could not patch their systems or are convinced that their -dnl native qsort is broken, they could specify this configure flag to use +dnl native qsort is broken, they could specify this configure flag to use dnl the opal_qsort instead. # check for broken qsort diff --git a/config/opal_check_compiler_works.m4 b/config/opal_check_compiler_works.m4 index 7c5fcbe3244..f632c0c81f6 100644 --- a/config/opal_check_compiler_works.m4 +++ b/config/opal_check_compiler_works.m4 @@ -4,13 +4,13 @@ dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana dnl University Research and Technology dnl Corporation. All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -39,14 +39,14 @@ AC_DEFUN([OPAL_CHECK_COMPILER_WORKS], [AS_VAR_SET(lang_var, ["links (cross compiling)"])], [AS_VAR_SET(lang_var, ["no"])])]) AC_LANG_POP($1)]) - AS_VAR_IF(lang_var, [no], + AS_VAR_IF(lang_var, [no], [cat <&2 ********************************************************************** * It appears that your $1 compiler is unable to produce working * executables. A simple test application failed to properly * execute. Note that this is likely not a problem with Open MPI, * but a problem with the local compiler installation. More -* information (including exactly what command was given to the +* information (including exactly what command was given to the * compiler and what error resulted when the command was executed) is * available in the config.log file in the Open MPI build directory. ********************************************************************** diff --git a/config/opal_check_icc.m4 b/config/opal_check_icc.m4 index 08502ea3d18..9c60fa29701 100644 --- a/config/opal_check_icc.m4 +++ b/config/opal_check_icc.m4 @@ -6,21 +6,21 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl AC_DEFUN([OPAL_CHECK_ICC_VARARGS],[ dnl -dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since +dnl On EM64T, icc-8.1 before version 8.1.027 segfaulted, since dnl va_start was miscompiled... dnl AC_MSG_CHECKING([whether icc-8.1 for EM64T works with variable arguments]) diff --git a/config/opal_check_offsetof.m4 b/config/opal_check_offsetof.m4 index cf644813f68..fc8c0caeabc 100644 --- a/config/opal_check_offsetof.m4 +++ b/config/opal_check_offsetof.m4 @@ -3,9 +3,9 @@ # Copyright (c) 2009 IBM Corporation. All rights reserved. # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/config/opal_check_openfabrics.m4 b/config/opal_check_openfabrics.m4 index 692a9500e8f..669d7e12b3f 100644 --- a/config/opal_check_openfabrics.m4 +++ b/config/opal_check_openfabrics.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -20,15 +20,15 @@ # Copyright (c) 2014-2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # OPAL_CHECK_OPENFABRICS(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- -# check if OPENIB support can be found. sets prefix_{CPPFLAGS, +# check if OPENIB support can be found. sets prefix_{CPPFLAGS, # LDFLAGS, LIBS} as needed and runs action-if-found if there is # support, otherwise executes action-if-not-found AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ @@ -54,7 +54,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ else # # Enable padding for SPARC platforms by default because the - # btl will segv otherwise. Keep padding disabled for other + # btl will segv otherwise. Keep padding disabled for other # platforms since there are some performance implications with # padding on for those plaforms. # @@ -80,14 +80,14 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ ompi_check_openib_$1_save_LDFLAGS="$LDFLAGS" ompi_check_openib_$1_save_LIBS="$LIBS" - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$ompi_check_openib_happy" = "yes"], [AC_CHECK_HEADERS( fcntl.h sys/poll.h, [], [AC_MSG_WARN([fcntl.h sys/poll.h not found. Can not build component.]) - ompi_check_openib_happy="no"])]) + ompi_check_openib_happy="no"])]) - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$ompi_check_openib_happy" = "yes"], [OPAL_CHECK_PACKAGE([$1], [infiniband/verbs.h], [ibverbs], @@ -236,7 +236,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ # will not print the big scary warning*. See # http://lists.gnu.org/archive/html/autoconf/2008-10/msg00143.html. AS_IF([test "$ompi_check_openib_happy" = "yes"], - [AC_CHECK_HEADERS([infiniband/driver.h], [], [], + [AC_CHECK_HEADERS([infiniband/driver.h], [], [], [AC_INCLUDES_DEFAULT])]) AC_MSG_CHECKING([if ConnectX XRC support is enabled]) @@ -300,7 +300,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS_CM_ARGS],[ # AC_ARG_ENABLE([openib-udcm], [AC_HELP_STRING([--enable-openib-udcm], - [Enable datagram connection support in openib BTL (default: enabled)])], + [Enable datagram connection support in openib BTL (default: enabled)])], [enable_openib_udcm="$enableval"], [enable_openib_udcm="yes"]) # Per discussion with Ralph and Nathan, disable UDCM for now. # It's borked and needs some surgery to get back on its feet. @@ -343,7 +343,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS_CM],[ $1_msg=no AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rdma/rdma_cma.h" ]], [[void *ret = (void*) rdma_get_peer_addr((struct rdma_cm_id*)0);]])], - [$1_have_rdmacm=1 + [$1_have_rdmacm=1 $1_msg=yes]) AC_MSG_RESULT([$$1_msg])])]) @@ -391,7 +391,7 @@ AC_DEFUN([OPAL_CHECK_MLNX_OPENFABRICS],[ $1_have_mverbs=0 $1_have_mqe=0 - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$ompi_check_openib_happy" = "yes"], [OPAL_CHECK_PACKAGE([$1], [infiniband/mverbs.h], [mverbs], @@ -402,7 +402,7 @@ AC_DEFUN([OPAL_CHECK_MLNX_OPENFABRICS],[ [$1_have_mverbs=1], [])]) - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$ompi_check_openib_happy" = "yes"], [OPAL_CHECK_PACKAGE([$1], [infiniband/mqe.h], [mqe], @@ -431,11 +431,11 @@ AC_DEFUN([OPAL_CHECK_MLNX_OPENFABRICS],[ fi AS_IF([test "1" = "$$1_have_mverbs"], - [AC_CHECK_DECLS([IBV_M_WR_CALC_RDMA_WRITE_WITH_IMM], + [AC_CHECK_DECLS([IBV_M_WR_CALC_RDMA_WRITE_WITH_IMM], [AC_DEFINE_UNQUOTED([OPAL_HAVE_IBOFFLOAD_CALC_RDMA], [1], - [Whether IBV_M_WR_CALC_SEND is defined or not])], + [Whether IBV_M_WR_CALC_SEND is defined or not])], [AC_DEFINE_UNQUOTED([OPAL_HAVE_IBOFFLOAD_CALC_RDMA], [0], - [Whether IBV_M_WR_CALC_SEND is defined or not])], + [Whether IBV_M_WR_CALC_SEND is defined or not])], [#include ])]) # restoring the CPPFLAGS diff --git a/config/opal_check_os_flavors.m4 b/config/opal_check_os_flavors.m4 index d1d124d7eb8..e8eaba112e9 100644 --- a/config/opal_check_os_flavors.m4 +++ b/config/opal_check_os_flavors.m4 @@ -59,9 +59,9 @@ AC_DEFUN([OPAL_CHECK_OS_FLAVORS], # check for sockaddr_in (a good sign we have TCP) AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h]) - AC_CHECK_TYPES([struct sockaddr_in], + AC_CHECK_TYPES([struct sockaddr_in], [opal_found_sockaddr=yes], - [opal_found_sockaddr=no], + [opal_found_sockaddr=no], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include diff --git a/config/opal_check_ps.m4 b/config/opal_check_ps.m4 index 014cdfec9d2..af7820f3d76 100644 --- a/config/opal_check_ps.m4 +++ b/config/opal_check_ps.m4 @@ -6,17 +6,17 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/opal_check_pthread_pids.m4 b/config/opal_check_pthread_pids.m4 index 513e2cd6a71..cb3b20a85e5 100644 --- a/config/opal_check_pthread_pids.m4 +++ b/config/opal_check_pthread_pids.m4 @@ -5,15 +5,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -65,8 +65,8 @@ void *checkpid(void *arg) { else ret = 1; pthread_exit((void *) &ret); -}])], -[MSG=no OPAL_THREADS_HAVE_DIFFERENT_PIDS=0], +}])], +[MSG=no OPAL_THREADS_HAVE_DIFFERENT_PIDS=0], [MSG=yes OPAL_THREADS_HAVE_DIFFERENT_PIDS=1], [ # If we're cross compiling, we can't do another AC_* function here beause @@ -99,7 +99,7 @@ AS_IF([test "$OPAL_THREADS_HAVE_DIFFERENT_PIDS" = "1"], [AC_MSG_WARN([This version of Open MPI only supports environments where]) AC_MSG_WARN([threads have the same PID. Please use an older version of]) AC_MSG_WARN([Open MPI if you need support on systems with different]) - AC_MSG_WARN([PIDs for threads in the same process. Open MPI 1.4.x]) + AC_MSG_WARN([PIDs for threads in the same process. Open MPI 1.4.x]) AC_MSG_WARN([supports such systems, as does at least some versions the]) AC_MSG_WARN([Open MPI 1.5.x series.]) AC_MSG_ERROR([Cannot continue]) diff --git a/config/opal_check_vendor.m4 b/config/opal_check_vendor.m4 index 95998e676a0..c227c2a347f 100644 --- a/config/opal_check_vendor.m4 +++ b/config/opal_check_vendor.m4 @@ -6,16 +6,16 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -63,7 +63,7 @@ AC_DEFUN([OPAL_CXX_COMPILER_VENDOR], [ m4_ifndef([AC_LANG_DEFINES_PROVIDED], [m4_define([AC_LANG_DEFINES_PROVIDED])]) -# OPAL_IFDEF_IFELSE(symbol, [action-if-defined], +# OPAL_IFDEF_IFELSE(symbol, [action-if-defined], # [action-if-not-defined]) # ---------------------------------------------- # Run compiler to determine if preprocessor symbol "symbol" is @@ -76,7 +76,7 @@ choke me #endif], [$2], [$3])]) -# OPAL_IF_IFELSE(symbol, [action-if-defined], +# OPAL_IF_IFELSE(symbol, [action-if-defined], # [action-if-not-defined]) # ---------------------------------------------- # Run compiler to determine if preprocessor symbol "symbol" is @@ -106,24 +106,24 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [ # Intel AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IF_IFELSE([defined(__INTEL_COMPILER) || defined(__ICC)], + [OPAL_IF_IFELSE([defined(__INTEL_COMPILER) || defined(__ICC)], [opal_check_compiler_vendor_result="intel"])]) # Fujitsu AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IF_IFELSE([defined(__FUJITSU)], + [OPAL_IF_IFELSE([defined(__FUJITSU)], [opal_check_compiler_vendor_result="fujitsu"])]) # GNU AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([__GNUC__], + [OPAL_IFDEF_IFELSE([__GNUC__], [opal_check_compiler_vendor_result="gnu" - # We do not support gccfss as a compiler so die if - # someone tries to use said compiler. gccfss (gcc - # for SPARC Systems) is a compiler that is no longer + # We do not support gccfss as a compiler so die if + # someone tries to use said compiler. gccfss (gcc + # for SPARC Systems) is a compiler that is no longer # supported by Oracle and it has some major flaws - # that prevents it from actually compiling OMPI code. + # that prevents it from actually compiling OMPI code. # So if we detect it we automatically bail. if ($CC --version | grep gccfss) >/dev/null 2>&1; then @@ -139,17 +139,17 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [ # Borland Turbo C AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([__TURBOC__], + [OPAL_IFDEF_IFELSE([__TURBOC__], [opal_check_compiler_vendor_result="borland"])]) # Borland C++ AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([__BORLANDC__], + [OPAL_IFDEF_IFELSE([__BORLANDC__], [opal_check_compiler_vendor_result="borland"])]) # Comeau C++ AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([__COMO__], + [OPAL_IFDEF_IFELSE([__COMO__], [opal_check_compiler_vendor_result="comeau"])]) # Compaq C/C++ @@ -163,12 +163,12 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [ # Cray C/C++ AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([_CRAYC], + [OPAL_IFDEF_IFELSE([_CRAYC], [opal_check_compiler_vendor_result="cray"])]) # Diab C/C++ AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([__DCC__], + [OPAL_IFDEF_IFELSE([__DCC__], [opal_check_compiler_vendor_result="diab"])]) # Digital Mars @@ -210,20 +210,20 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [ # MIPSpro (SGI) AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IF_IFELSE([defined(sgi) || defined(__sgi)], + [OPAL_IF_IFELSE([defined(sgi) || defined(__sgi)], [opal_check_compiler_vendor_result="sgi"])]) # MPW C++ AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IF_IFELSE([defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS)], + [OPAL_IF_IFELSE([defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS)], [opal_check_compiler_vendor_result="mpw"])]) # Microsoft AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [# Always use C compiler when checking for Microsoft, as + [# Always use C compiler when checking for Microsoft, as # Visual C++ doesn't recognize .cc as a C++ file. AC_LANG_PUSH(C) - OPAL_IF_IFELSE([defined(_MSC_VER) || defined(__MSC_VER)], + OPAL_IF_IFELSE([defined(_MSC_VER) || defined(__MSC_VER)], [opal_check_compiler_vendor_result="microsoft"]) AC_LANG_POP(C)]) @@ -239,7 +239,7 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [ # Portland Group AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], - [OPAL_IFDEF_IFELSE([__PGI], + [OPAL_IFDEF_IFELSE([__PGI], [opal_check_compiler_vendor_result="portland group"])]) # SAS/C diff --git a/config/opal_check_verbs.m4 b/config/opal_check_verbs.m4 index 9456ff29905..f5eea2c7718 100644 --- a/config/opal_check_verbs.m4 +++ b/config/opal_check_verbs.m4 @@ -69,9 +69,9 @@ AC_DEFUN([OPAL_CHECK_VERBS_DIR],[ [Search for verbs libraries in DIR])]) # Sanity check the --with values - OPAL_CHECK_WITHDIR([verbs], [$with_verbs], + OPAL_CHECK_WITHDIR([verbs], [$with_verbs], [include/infiniband/verbs.h]) - OPAL_CHECK_WITHDIR([verbs-libdir], [$with_verbs_libdir], + OPAL_CHECK_WITHDIR([verbs-libdir], [$with_verbs_libdir], [libibverbs.*]) # Set standardized shell variables for OFED lovin' components to diff --git a/config/opal_check_visibility.m4 b/config/opal_check_visibility.m4 index b8ec53c0618..bb9097633a9 100644 --- a/config/opal_check_visibility.m4 +++ b/config/opal_check_visibility.m4 @@ -6,16 +6,16 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 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) 2006-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,7 +26,7 @@ AC_DEFUN([OPAL_CHECK_VISIBILITY],[ # Check if the compiler has support for visibility, like some # versions of gcc, icc Sun Studio cc. - AC_ARG_ENABLE(visibility, + AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [enable visibility feature of certain compilers/linkers (default: enabled)])) @@ -35,7 +35,7 @@ AC_DEFUN([OPAL_CHECK_VISIBILITY],[ if test "$enable_visibility" = "no"; then AC_MSG_CHECKING([$opal_msg]) - AC_MSG_RESULT([no (disabled)]) + AC_MSG_RESULT([no (disabled)]) else CFLAGS_orig=$CFLAGS diff --git a/config/opal_check_withdir.m4 b/config/opal_check_withdir.m4 index 3116c9f9f6e..17212b063fa 100644 --- a/config/opal_check_withdir.m4 +++ b/config/opal_check_withdir.m4 @@ -4,12 +4,12 @@ dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana dnl University Research and Technology dnl Corporation. All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 index 66f4535869d..5188cb42cd8 100644 --- a/config/opal_config_asm.m4 +++ b/config/opal_config_asm.m4 @@ -5,7 +5,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -14,9 +14,9 @@ dnl Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -86,7 +86,7 @@ AC_DEFUN([OPAL_CHECK_SYNC_BUILTIN_CSWAP_INT128], [ AC_DEFUN([OPAL_CHECK_SYNC_BUILTINS], [ AC_MSG_CHECKING([for __sync builtin atomics]) - AC_TRY_COMPILE([], [__sync_synchronize()], + AC_TRY_COMPILE([], [__sync_synchronize()], [AC_MSG_RESULT([yes]) $1], [AC_MSG_RESULT([no]) @@ -181,7 +181,7 @@ AC_DEFUN([_OPAL_CHECK_ASM_LSYM],[ echo "configure: trying $sym" >&AC_FD_CC OPAL_TRY_ASSEMBLE([foobar$opal_cv_asm_label_suffix ${sym}mytestlabel$opal_cv_asm_label_suffix], - [# ok, we succeeded at assembling. see if we can nm, + [# ok, we succeeded at assembling. see if we can nm, # throwing the results in a file if $NM conftest.$OBJEXT > conftest.out 2>&AC_FD_CC ; then if test "`$GREP mytestlabel conftest.out`" = "" ; then @@ -326,7 +326,7 @@ $opal_cv_asm_endproc ${sym}gsym_test_func echo "configure: failed C program was: " >&AC_FD_CC cat conftest.c >&AC_FD_CC asm_result=0 - fi], + fi], [asm_result=0]) if test "$asm_result" = "1" ; then opal_cv_asm_gsym="$sym" @@ -367,7 +367,7 @@ dnl ################################################################# dnl dnl OPAL_CHECK_ASM_ALIGN_LOG dnl -dnl Sets OPAL_ASM_ALIGN_LOG to 1 if align is specified +dnl Sets OPAL_ASM_ALIGN_LOG to 1 if align is specified dnl logarithmically, 0 otherwise dnl dnl ################################################################# @@ -383,7 +383,7 @@ AC_DEFUN([OPAL_CHECK_ASM_ALIGN_LOG],[ .byte 1 .align 4 foo$opal_cv_asm_label_suffix - .byte 2], + .byte 2], [opal_asm_addr=[`$NM conftest.$OBJEXT | $GREP foo | sed -e 's/.*\([0-9a-fA-F][0-9a-fA-F]\).*foo.*/\1/'`]], [opal_asm_addr=""]) # test for both 16 and 10 (decimal and hex notations) @@ -412,7 +412,7 @@ dnl ################################################################# dnl dnl OPAL_CHECK_ASM_TYPE dnl -dnl Sets OPAL_ASM_TYPE to the prefix for the function type to +dnl Sets OPAL_ASM_TYPE to the prefix for the function type to dnl set a symbol's type as function (needed on ELF for shared dnl libaries). If no .type directive is needed, sets OPAL_ASM_TYPE dnl to an empty string @@ -715,8 +715,8 @@ dnl assembly. Some compilers emit a warning and ignore the inline dnl assembly (xlc on OS X) and compile without error. Therefore, dnl the test attempts to run the emited code to check that the dnl assembly is actually run. To run this test, one argument to -dnl the macro must be an assembly instruction in gcc format to move -dnl the value 0 into the register containing the variable ret. +dnl the macro must be an assembly instruction in gcc format to move +dnl the value 0 into the register containing the variable ret. dnl For PowerPC, this would be: dnl dnl "li %0,0" : "=&r"(ret) @@ -750,7 +750,7 @@ AC_INCLUDES_DEFAULT], int negone = -1; __asm__ __volatile__ ($assembly); return ret;]])], - [asm_result="yes"], [asm_result="no"], + [asm_result="yes"], [asm_result="no"], [asm_result="unknown"]) else assembly="test skipped - assuming no" @@ -880,7 +880,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ AC_CHECK_HEADER([libkern/OSAtomic.h],[opal_cv_asm_builtin="BUILTIN_OSX"], [AC_MSG_ERROR([OSX builtin atomics requested but not found.])]) else - opal_cv_asm_builtin="BUILTIN_NO" + opal_cv_asm_builtin="BUILTIN_NO" fi OPAL_CHECK_ASM_PROC @@ -976,7 +976,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ sparc*-*) # SPARC v9 (and above) are the only ones with 64bit support # if compiling 32 bit, see if we are v9 (aka v8plus) or - # earlier (casa is v8+/v9). + # earlier (casa is v8+/v9). if test "$ac_cv_sizeof_long" = "4" ; then have_v8plus=0 OPAL_CHECK_SPARCV8PLUS([have_v8plus=1]) diff --git a/config/opal_config_files.m4 b/config/opal_config_files.m4 index 46509ebacd4..14aec99bbab 100644 --- a/config/opal_config_files.m4 +++ b/config/opal_config_files.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/config/opal_config_pthreads.m4 b/config/opal_config_pthreads.m4 index db12c6ba56f..3cdee6d3809 100644 --- a/config/opal_config_pthreads.m4 +++ b/config/opal_config_pthreads.m4 @@ -57,13 +57,13 @@ int main(int argc, char* argv[]) { pthread_attr_t attr; - me = pthread_self(); + me = pthread_self(); pthread_atfork(NULL, NULL, NULL); - pthread_attr_init(&attr); + pthread_attr_init(&attr); pthread_cleanup_push(cleanup_routine, 0); - pthread_create(&newthread, &attr, thread_main, 0); + pthread_create(&newthread, &attr, thread_main, 0); pthread_join(newthread, 0); - pthread_cleanup_pop(0); + pthread_cleanup_pop(0); return 0; }]])], @@ -114,13 +114,13 @@ void pthreadtest_f(void) { pthread_attr_t attr; - me = pthread_self(); + me = pthread_self(); pthread_atfork(NULL, NULL, NULL); - pthread_attr_init(&attr); + pthread_attr_init(&attr); pthread_cleanup_push(cleanup_routine, 0); - pthread_create(&newthread, &attr, thread_main, 0); + pthread_create(&newthread, &attr, thread_main, 0); pthread_join(&newthread, 0); - pthread_cleanup_pop(0); + pthread_cleanup_pop(0); } void pthreadtest(void) @@ -202,7 +202,7 @@ if test "$opal_pthread_cxx_success" = "0"; then AC_MSG_CHECKING([if C++ compiler and POSIX threads work as is]) AC_LANG_PUSH(C++) - OPAL_INTL_PTHREAD_TRY_LINK(opal_pthread_cxx_success=1, + OPAL_INTL_PTHREAD_TRY_LINK(opal_pthread_cxx_success=1, opal_pthread_cxx_success=0) AC_LANG_POP(C++) if test "$opal_pthread_cxx_success" = "1"; then @@ -224,7 +224,7 @@ if test "$opal_pthread_fortran_success" = "0" && \ AC_MSG_CHECKING([if Fortran compiler and POSIX threads work as is]) AC_LANG_PUSH(C) - OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, + OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, opal_pthread_fortran_success=0) AC_LANG_POP(C) if test "$opal_pthread_fortran_success" = "1"; then @@ -251,11 +251,11 @@ AC_PROVIDE_IFELSE([AC_PROG_CC], [OPAL_INTL_POSIX_THREADS_PLAIN_C], [opal_pthread_c_success=1]) -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [OPAL_INTL_POSIX_THREADS_PLAIN_CXX], +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [OPAL_INTL_POSIX_THREADS_PLAIN_CXX], [opal_pthread_cxx_success=1]) -AC_PROVIDE_IFELSE([AC_PROG_FC], +AC_PROVIDE_IFELSE([AC_PROG_FC], [OPAL_INTL_POSIX_THREADS_PLAIN_FC], [opal_pthread_fortran_success=1]) @@ -331,7 +331,7 @@ if test "$opal_pthread_fortran_success" = "0" && \ AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $pf]) FCFLAGS="$orig_FCFLAGS $pf" AC_LANG_PUSH(C) - OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, + OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, opal_pthread_fortran_success=0) AC_LANG_POP(C) if test "$opal_pthread_fortran_success" = "1"; then @@ -351,7 +351,7 @@ fi AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS],[ # Begin: OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS # -# If above didn't work, try some super-special compiler flags +# If above didn't work, try some super-special compiler flags # that get evaluated to the "right" things. # # -Kthread: @@ -375,15 +375,15 @@ case "${host_cpu}-${host_os}" in esac # Only run C++ and Fortran if those compilers already configured -AC_PROVIDE_IFELSE([AC_PROG_CC], +AC_PROVIDE_IFELSE([AC_PROG_CC], [OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], [opal_pthread_c_success=1]) -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], [opal_pthread_cxx_success=1]) -AC_PROVIDE_IFELSE([AC_PROG_FC], +AC_PROVIDE_IFELSE([AC_PROG_FC], [OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], [opal_pthread_fortran_success=1]) @@ -459,7 +459,7 @@ if test "$opal_pthread_cxx_success" = "0"; then esac LIBS="$orig_LIBS $PTHREAD_LIBS" AC_LANG_PUSH(C++) - OPAL_INTL_PTHREAD_TRY_LINK(opal_pthread_cxx_success=1, + OPAL_INTL_PTHREAD_TRY_LINK(opal_pthread_cxx_success=1, opal_pthread_cxx_success=0) AC_LANG_POP(C++) if test "$opal_pthread_cxx_success" = "1"; then @@ -470,7 +470,7 @@ if test "$opal_pthread_cxx_success" = "0"; then AC_MSG_RESULT([no]) AC_MSG_ERROR([Can not find working threads configuration. aborting]) fi - else + else for pl in $plibs; do AC_MSG_CHECKING([if C++ compiler and POSIX threads work with $pl]) case "${host_cpu}-${host-_os}" in @@ -489,7 +489,7 @@ if test "$opal_pthread_cxx_success" = "0"; then esac LIBS="$orig_LIBS $pl" AC_LANG_PUSH(C++) - OPAL_INTL_PTHREAD_TRY_LINK(opal_pthread_cxx_success=1, + OPAL_INTL_PTHREAD_TRY_LINK(opal_pthread_cxx_success=1, opal_pthread_cxx_success=0) AC_LANG_POP(C++) if test "$opal_pthread_cxx_success" = "1"; then @@ -518,7 +518,7 @@ if test "$opal_pthread_fortran_success" = "0" && \ AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $PTHREAD_LIBS]) LIBS="$orig_LIBS $PTHREAD_LIBS" AC_LANG_PUSH(C) - OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, + OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, opal_pthread_fortran_success=0) AC_LANG_POP(C) if test "$opal_pthread_fortran_success" = "1"; then @@ -533,7 +533,7 @@ if test "$opal_pthread_fortran_success" = "0" && \ AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $pl]) LIBS="$orig_LIBS $pl" AC_LANG_PUSH(C) - OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, + OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN(opal_pthread_fortran_success=1, opal_pthread_fortran_success=0) AC_LANG_POP(C) if test "$opal_pthread_fortran_success" = "1"; then @@ -564,15 +564,15 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_LIBS],[ plibs="-lpthreads -llthread -lpthread" # Only run C++ and Fortran if those compilers already configured -AC_PROVIDE_IFELSE([AC_PROG_CC], - [OPAL_INTL_POSIX_THREADS_LIBS_C], +AC_PROVIDE_IFELSE([AC_PROG_CC], + [OPAL_INTL_POSIX_THREADS_LIBS_C], [opal_pthread_c_success=1]) -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [OPAL_INTL_POSIX_THREADS_LIBS_CXX], +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [OPAL_INTL_POSIX_THREADS_LIBS_CXX], [opal_pthread_cxx_success=1]) -AC_PROVIDE_IFELSE([AC_PROG_FC], +AC_PROVIDE_IFELSE([AC_PROG_FC], [OPAL_INTL_POSIX_THREADS_LIBS_FC], [opal_pthread_fortran_success=1]) diff --git a/config/opal_config_subdir.m4 b/config/opal_config_subdir.m4 index d2ad1fc2bb1..b6e20c802b3 100644 --- a/config/opal_config_subdir.m4 +++ b/config/opal_config_subdir.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -15,9 +15,9 @@ dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -51,9 +51,9 @@ if test "$subdir_dir" != ":" && test -d $srcdir/$subdir_dir; then # case $srcdir in - .) + .) ;; - *) + *) { case $subdir_dir in [[\\/]]* | ?:[[\\/]]* ) total_dir=;; *) total_dir=.;; @@ -113,7 +113,7 @@ if test "$subdir_dir" != ":" && test -d $srcdir/$subdir_dir; then # Construct the --cache-file argument # - # BWB - subdir caching is a pain since we change CFLAGS and all that. + # BWB - subdir caching is a pain since we change CFLAGS and all that. # Just disable it for now subdir_cache_file="/dev/null" diff --git a/config/opal_config_subdir_args.m4 b/config/opal_config_subdir_args.m4 index 21caaa1703e..1d9bed399a3 100644 --- a/config/opal_config_subdir_args.m4 +++ b/config/opal_config_subdir_args.m4 @@ -6,16 +6,16 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -56,11 +56,11 @@ do ;; -srcdir=* | --srcdir=*) ;; - *) + *) case $subdir_arg in *\'*) subdir_arg=`echo "$subdir_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - subdirs_args="$subdirs_args '$subdirs_arg'" + subdirs_args="$subdirs_args '$subdirs_arg'" ;; esac fi diff --git a/config/opal_config_threads.m4 b/config/opal_config_threads.m4 index c07257a265b..66aa874a200 100644 --- a/config/opal_config_threads.m4 +++ b/config/opal_config_threads.m4 @@ -5,7 +5,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -15,9 +15,9 @@ dnl Copyright (c) 2014 Intel, Inc. All rights reserved dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/opal_configure_options.m4 b/config/opal_configure_options.m4 index 4177ee99747..023fbdbba08 100644 --- a/config/opal_configure_options.m4 +++ b/config/opal_configure_options.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -22,9 +22,9 @@ dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -52,17 +52,17 @@ AC_ARG_ENABLE(coverage, AC_HELP_STRING([--enable-coverage], [enable code coverage files to be generated])) if test "$enable_coverage" = "yes"; then - if test "$enable_shared" = "yes"; then - AC_MSG_WARN([Code coverage can run only with static libraries. Please -run configure with --enable-static --disable-shared if -you want code coverage. Also ensure that you execute -make clean too ensure removal of all leftover shared + if test "$enable_shared" = "yes"; then + AC_MSG_WARN([Code coverage can run only with static libraries. Please +run configure with --enable-static --disable-shared if +you want code coverage. Also ensure that you execute +make clean too ensure removal of all leftover shared mpi libraries]) AC_MSG_ERROR([Cannot continue processing]) fi AC_MSG_RESULT([yes]) WANT_COVERAGE=1 -else +else AC_MSG_RESULT([no]) WANT_COVERAGE=0 fi @@ -79,7 +79,7 @@ AC_ARG_ENABLE(branch-probabilities, if test "$enable_branch_probabilities" = "yes"; then AC_MSG_RESULT([yes]) WANT_BRANCH_PROBABILITIES=1 -else +else AC_MSG_RESULT([no]) WANT_BRANCH_PROBABILITIES=0 fi @@ -90,7 +90,7 @@ fi # AC_MSG_CHECKING([if want to debug memory usage]) -AC_ARG_ENABLE(mem-debug, +AC_ARG_ENABLE(mem-debug, AC_HELP_STRING([--enable-mem-debug], [enable memory debugging (debugging only) (default: disabled)])) if test "$enable_mem_debug" = "yes"; then @@ -114,7 +114,7 @@ AC_DEFINE_UNQUOTED(OPAL_ENABLE_MEM_DEBUG, $WANT_MEM_DEBUG, # AC_MSG_CHECKING([if want to profile memory usage]) -AC_ARG_ENABLE(mem-profile, +AC_ARG_ENABLE(mem-profile, AC_HELP_STRING([--enable-mem-profile], [enable memory profiling (debugging only) (default: disabled)])) if test "$enable_mem_profile" = "yes"; then @@ -138,7 +138,7 @@ AC_DEFINE_UNQUOTED(OPAL_ENABLE_MEM_PROFILE, $WANT_MEM_PROFILE, # AC_MSG_CHECKING([if want developer-level compiler pickyness]) -AC_ARG_ENABLE(picky, +AC_ARG_ENABLE(picky, AC_HELP_STRING([--enable-picky], [enable developer-level compiler pickyness when building Open MPI (default: disabled)])) if test "$enable_picky" = "yes"; then @@ -160,7 +160,7 @@ fi # AC_MSG_CHECKING([if want developer-level debugging code]) -AC_ARG_ENABLE(debug, +AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable developer-level debugging code (not for general MPI users!) (default: disabled)])) if test "$enable_debug" = "yes"; then @@ -173,7 +173,7 @@ fi AC_MSG_CHECKING([if want to developer-level timing framework]) -AC_ARG_ENABLE(timing, +AC_ARG_ENABLE(timing, AC_HELP_STRING([--enable-timing], [enable developer-level timing code (not for general MPI users!) (default: disabled)])) if test "$enable_timing" = "yes"; then @@ -320,8 +320,8 @@ else AC_MSG_RESULT([no]) opal_want_heterogeneous=0 fi -AC_DEFINE_UNQUOTED([OPAL_ENABLE_HETEROGENEOUS_SUPPORT], - [$opal_want_heterogeneous], +AC_DEFINE_UNQUOTED([OPAL_ENABLE_HETEROGENEOUS_SUPPORT], + [$opal_want_heterogeneous], [Enable features required for heterogeneous support]) diff --git a/config/opal_ensure_contains_optflags.m4 b/config/opal_ensure_contains_optflags.m4 index 78a1e5d458d..b9d96de1299 100644 --- a/config/opal_ensure_contains_optflags.m4 +++ b/config/opal_ensure_contains_optflags.m4 @@ -6,16 +6,16 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/opal_find_type.m4 b/config/opal_find_type.m4 index 46bc138a55d..bc98dd681c5 100644 --- a/config/opal_find_type.m4 +++ b/config/opal_find_type.m4 @@ -6,16 +6,16 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -32,7 +32,7 @@ AC_DEFUN([OPAL_FIND_TYPE],[ [ # Loop over all the types handed to us oft_real_type= AS_IF([test "$oft_target_size" != ""], - [m4_foreach(oft_type, [$2], + [m4_foreach(oft_type, [$2], [if test -z "$oft_real_type"; then if test "[$ac_cv_sizeof_]m4_bpatsubst(oft_type, [[^a-zA-Z0-9_]], [_])" = "$oft_target_size" ; then oft_real_type="oft_type" diff --git a/config/opal_get_version.m4sh b/config/opal_get_version.m4sh index b1041f4c65e..d9d45d972a2 100644 --- a/config/opal_get_version.m4sh +++ b/config/opal_get_version.m4sh @@ -10,15 +10,15 @@ m4_divert_push([SCRIPT])dnl # 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, +# 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) 2008-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/config/opal_lang_link_with_c.m4 b/config/opal_lang_link_with_c.m4 index f5451a6a35e..496081f4b0a 100644 --- a/config/opal_lang_link_with_c.m4 +++ b/config/opal_lang_link_with_c.m4 @@ -1,12 +1,12 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -20,7 +20,7 @@ AC_DEFUN([OPAL_LANG_LINK_WITH_C], [ AC_CACHE_CHECK([if C and $1 are link compatible], lang_var, - [m4_if([$1], [Fortran], + [m4_if([$1], [Fortran], [m4_define([ompi_lang_link_with_c_fortran], 1) OMPI_FORTRAN_MAKE_C_FUNCTION([testfunc_name], [testfunc])], [testfunc_name="testfunc"]) @@ -38,7 +38,7 @@ EOF [AC_LANG_PUSH($1) ompi_lang_link_with_c_libs="$LIBS" LIBS="conftest_c.o $LIBS" - m4_if(ompi_lang_link_with_c_fortran, 1, + m4_if(ompi_lang_link_with_c_fortran, 1, [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ external testfunc call testfunc(1) @@ -50,7 +50,7 @@ extern "C" int testfunc(int); #else extern int testfunc(int); #endif -], +], [return testfunc(0);])], [AS_VAR_SET(lang_var, ["yes"])], [AS_VAR_SET(lang_var, ["no"])])]) LIBS="$ompi_lang_link_with_c_libs" diff --git a/config/opal_mca_priority_sort.pl b/config/opal_mca_priority_sort.pl index e54a0b70ce3..4026e990edc 100755 --- a/config/opal_mca_priority_sort.pl +++ b/config/opal_mca_priority_sort.pl @@ -3,9 +3,9 @@ # Copyright (c) 2010 Sandia National Laboratories. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/config/opal_setup_component_package.m4 b/config/opal_setup_component_package.m4 index 7a939e207be..e8956493440 100644 --- a/config/opal_setup_component_package.m4 +++ b/config/opal_setup_component_package.m4 @@ -21,16 +21,16 @@ dnl dnl $HEADER$ dnl -# OPAL_SETUP_COMPONENT_PACKAGE(1: framework_name, +# OPAL_SETUP_COMPONENT_PACKAGE(1: framework_name, # 2: component_name, # 3: option_name, # 4: withdir_dir_check_file, # 5: withdir_libdir_check_file, -# 6: header, -# 7: library, -# 8: function, -# 9: extra-libraries, -# 10: [action-if-found], +# 6: header, +# 7: library, +# 8: function, +# 9: extra-libraries, +# 10: [action-if-found], # 11: [action-if-not-found]) # ------------------------------------------------ # Many components need to just check for one package, and if it's all diff --git a/config/opal_setup_cxx.m4 b/config/opal_setup_cxx.m4 index acf1b0c97c9..daf2ffe8957 100644 --- a/config/opal_setup_cxx.m4 +++ b/config/opal_setup_cxx.m4 @@ -11,21 +11,21 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # This macro is necessary to get the title to be displayed first. :-) AC_DEFUN([OPAL_SETUP_CXX_BANNER],[ - opal_show_subtitle "C++ compiler and preprocessor" + opal_show_subtitle "C++ compiler and preprocessor" ]) # This macro is necessary because PROG_CXX* is REQUIREd by multiple @@ -81,7 +81,7 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER],[ # Back end of _OPAL_SETUP_CXX_COMPILER_BACKEND() AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[ # Do we want code coverage - if test "$WANT_COVERAGE" = "1"; then + if test "$WANT_COVERAGE" = "1"; then if test "$opal_cxx_vendor" = "gnu" ; then AC_MSG_WARN([$OPAL_COVERAGE_FLAGS has been added to CFLAGS (--enable-coverage)]) WANT_DEBUG=1 @@ -112,12 +112,12 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[ CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype" AC_CACHE_CHECK([if $CXX supports -Wno-long-double], [opal_cv_cxx_wno_long_double], - [AC_TRY_COMPILE([], [], + [AC_TRY_COMPILE([], [], [ dnl So -Wno-long-double did not produce any errors... - dnl We will try to extract a warning regarding + dnl We will try to extract a warning regarding dnl unrecognized or ignored options - AC_TRY_COMPILE([], [long double test;], + AC_TRY_COMPILE([], [long double test;], [ opal_cv_cxx_wno_long_double="yes" if test -s conftest.err ; then @@ -181,7 +181,7 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[ * files created by your C compiler. This generally indicates either * a conflict between the options specified in CFLAGS and CXXFLAGS * or a problem with the local compiler installation. More -* information (including exactly what command was given to the +* information (including exactly what command was given to the * compilers and what error resulted when the commands were executed) is * available in the config.log file in this directory. ********************************************************************** diff --git a/config/opal_setup_ft.m4 b/config/opal_setup_ft.m4 index b54eea0c13c..bf03747d607 100644 --- a/config/opal_setup_ft.m4 +++ b/config/opal_setup_ft.m4 @@ -24,7 +24,7 @@ dnl # This macro is necessary to get the title to be displayed first. :-) AC_DEFUN([OPAL_SETUP_FT_BANNER],[ - opal_show_subtitle "Fault tolerance" + opal_show_subtitle "Fault tolerance" ]) AC_DEFUN([OPAL_SETUP_FT_OPTIONS],[ @@ -43,14 +43,14 @@ AC_DEFUN([OPAL_SETUP_FT_OPTIONS],[ AC_ARG_ENABLE([crdebug], [AC_HELP_STRING([--enable-crdebug], [enable checkpoint/restart debugging functionality (default: disabled)])]) - + # # Fault Tolerance Thread # # --enable-ft-thread # #if OPAL_ENABLE_FT_THREAD == 0 /* Disabled */ # #if OPAL_ENABLE_FT_THREAD == 1 /* Enabled */ - # + # AC_ARG_ENABLE([ft_thread], [AC_HELP_STRING([--disable-ft-thread], [Disable fault tolerance thread running inside all processes. Requires OPAL thread support (default: enabled)])], @@ -60,7 +60,7 @@ AC_DEFUN([OPAL_SETUP_FT_OPTIONS],[ ]) AC_DEFUN([OPAL_SETUP_FT],[ - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_CHECKING([if want fault tolerance]) fi if test "x$with_ft" != "x" || test "$opal_want_ft" = "1"; then @@ -102,7 +102,7 @@ AC_DEFUN([OPAL_SETUP_FT],[ else opal_want_ft=0 opal_want_ft_cr=0 - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_RESULT([Disabled fault tolerance]) fi fi @@ -113,12 +113,12 @@ AC_DEFUN([OPAL_SETUP_FT],[ AM_CONDITIONAL(WANT_FT, test "$opal_want_ft" = "1") AM_CONDITIONAL(WANT_FT_CR, test "$opal_want_ft_cr" = "1") - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_CHECKING([if want checkpoint/restart enabled debugging option]) fi if test "$opal_want_ft" = "0"; then opal_want_prd=0 - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_RESULT([Disabled (fault tolerance disabled --without-ft)]) fi elif test "$enable_crdebug" = "yes"; then @@ -126,20 +126,20 @@ AC_DEFUN([OPAL_SETUP_FT],[ AC_MSG_RESULT([Enabled]) else opal_want_prd=0 - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_RESULT([Disabled]) fi fi AC_DEFINE_UNQUOTED([OPAL_ENABLE_CRDEBUG], [$opal_want_prd], [Whether we want checkpoint/restart enabled debugging functionality or not]) - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_CHECKING([if want fault tolerance thread]) fi # if they do not want FT support, then they do not want this thread either if test "$opal_want_ft" = "0"; then opal_want_ft_thread=0 - if test "$opal_setup_ft_options" = "yes"; then + if test "$opal_setup_ft_options" = "yes"; then AC_MSG_RESULT([Disabled (fault tolerance disabled --without-ft)]) fi # if --disable-ft-thread @@ -153,7 +153,7 @@ AC_DEFUN([OPAL_SETUP_FT],[ # if default, and MPI threads enabled for C/R only elif test "$opal_want_ft_cr" = 1; then # Default: Enable - # Make sure we have OPAL Threads enabled + # Make sure we have OPAL Threads enabled if test "$enable_opal_multi_threads" = "no"; then AC_MSG_RESULT([Must enable OPAL basic thread support to use this option]) AC_MSG_ERROR([Cannot continue]) diff --git a/config/opal_setup_java.m4 b/config/opal_setup_java.m4 index 9eec3b21349..7de58260e79 100644 --- a/config/opal_setup_java.m4 +++ b/config/opal_setup_java.m4 @@ -11,22 +11,22 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007-2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2013 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # This macro is necessary to get the title to be displayed first. :-) AC_DEFUN([OPAL_SETUP_JAVA_BANNER],[ - opal_show_subtitle "Java compiler" + opal_show_subtitle "Java compiler" ]) # OPAL_SETUP_JAVA() @@ -100,7 +100,7 @@ AC_DEFUN([OPAL_SETUP_JAVA],[ AS_IF([test -d $opal_java_dir], [AC_MSG_RESULT([found ($opal_java_dir)]) opal_java_found=1 - with_jdk_headers=$opal_java_dir + with_jdk_headers=$opal_java_dir with_jdk_bindir=/usr/bin], [AC_MSG_RESULT([not found])]) @@ -113,7 +113,7 @@ AC_DEFUN([OPAL_SETUP_JAVA],[ fi opal_java_jnih=`ls $opal_java_dir/jni.h 2>/dev/null | head -n 1` AC_MSG_CHECKING([Linux locations]) - AS_IF([test -r "$opal_java_jnih"], + AS_IF([test -r "$opal_java_jnih"], [with_jdk_headers=`dirname $opal_java_jnih` OPAL_WHICH([javac], [with_jdk_bindir]) AS_IF([test -n "$with_jdk_bindir"], @@ -123,7 +123,7 @@ AC_DEFUN([OPAL_SETUP_JAVA],[ [with_jdk_headers=])], [opal_java_dir='/usr/lib/jvm/default-java/include/' opal_java_jnih=`ls $opal_java_dir/jni.h 2>/dev/null | head -n 1` - AS_IF([test -r "$opal_java_jnih"], + AS_IF([test -r "$opal_java_jnih"], [with_jdk_headers=`dirname $opal_java_jnih` OPAL_WHICH([javac], [with_jdk_bindir]) AS_IF([test -n "$with_jdk_bindir"], @@ -188,7 +188,7 @@ AC_DEFUN([OPAL_SETUP_JAVA],[ [OPAL_JDK_CPPFLAGS="$OPAL_JDK_CPPFLAGS -I$with_jdk_headers/solaris"]) CPPFLAGS="$CPPFLAGS $OPAL_JDK_CPPFLAGS"]) - AC_CHECK_HEADER([jni.h], [], + AC_CHECK_HEADER([jni.h], [], [opal_java_happy=no]) CPPFLAGS=$opal_java_CPPFLAGS_save ]) diff --git a/config/opal_strip_optflags.m4 b/config/opal_strip_optflags.m4 index 8ae61423f95..eebc908664f 100644 --- a/config/opal_strip_optflags.m4 +++ b/config/opal_strip_optflags.m4 @@ -6,7 +6,7 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. @@ -14,9 +14,9 @@ dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/opal_try_assemble.m4 b/config/opal_try_assemble.m4 index 5ed15884a38..d1ae62e337d 100644 --- a/config/opal_try_assemble.m4 +++ b/config/opal_try_assemble.m4 @@ -5,15 +5,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -24,7 +24,7 @@ dnl Otherwise, run action-if-fail. Neither action-if-success nor dnl action-if-fail are required. dnl dnl No preprocessing is guaranteed to be done on asm-code. Some -dnl compilers do not run the preprocessor on assembly files. +dnl compilers do not run the preprocessor on assembly files. dnl dnl On failure, asm-test.s will be included in config.out AC_DEFUN([OPAL_TRY_ASSEMBLE], diff --git a/config/orte_check_loadleveler.m4 b/config/orte_check_loadleveler.m4 index 44e34a8f179..a8d609981b2 100644 --- a/config/orte_check_loadleveler.m4 +++ b/config/orte_check_loadleveler.m4 @@ -6,16 +6,16 @@ # 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, +# 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) 2006-2009 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011 IBM Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -47,7 +47,7 @@ AC_DEFUN([ORTE_CHECK_LOADLEVELER],[ orte_check_loadleveler_happy="yes" fi - AS_IF([test "$orte_check_loadleveler_happy" = "yes"], - [$2], + AS_IF([test "$orte_check_loadleveler_happy" = "yes"], + [$2], [$3]) ]) diff --git a/config/orte_check_lsf.m4 b/config/orte_check_lsf.m4 index ebb50f34de6..7ce3f610ad3 100644 --- a/config/orte_check_lsf.m4 +++ b/config/orte_check_lsf.m4 @@ -96,7 +96,7 @@ AC_DEFUN([ORTE_CHECK_LSF],[ [orte_check_lsf_happy="yes"]) # test function of liblsb LSF package - AS_IF([test "$orte_check_lsf_happy" = "yes"], + AS_IF([test "$orte_check_lsf_happy" = "yes"], [AC_MSG_CHECKING([for LSF dir]) AC_MSG_RESULT([$orte_check_lsf_dir_msg]) AC_MSG_CHECKING([for LSF library dir]) diff --git a/config/orte_check_sge.m4 b/config/orte_check_sge.m4 index f9668bdc3d9..f951a03bbae 100644 --- a/config/orte_check_sge.m4 +++ b/config/orte_check_sge.m4 @@ -6,15 +6,15 @@ # 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, +# 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) 2006-2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -48,6 +48,6 @@ AC_DEFUN([ORTE_CHECK_GRIDENGINE],[ [AC_MSG_RESULT([not found])])])])]) AS_IF([test "$orte_gridengine_build" = "yes"], - [$2], + [$2], [$3]) ]) diff --git a/config/orte_check_slurm.m4 b/config/orte_check_slurm.m4 index 755f1de2cf7..e86d9ea91f7 100644 --- a/config/orte_check_slurm.m4 +++ b/config/orte_check_slurm.m4 @@ -6,15 +6,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -46,7 +46,7 @@ AC_DEFUN([ORTE_CHECK_SLURM],[ AC_MSG_RESULT([$orte_check_slurm_happy]) ;; esac - else + else orte_check_slurm_happy="yes" fi @@ -65,7 +65,7 @@ AC_DEFUN([ORTE_CHECK_SLURM],[ [orte_check_slurm_happy="yes"], [orte_check_slurm_happy="no"])]) - AS_IF([test "$orte_check_slurm_happy" = "yes"], - [$2], + AS_IF([test "$orte_check_slurm_happy" = "yes"], + [$2], [$3]) ]) diff --git a/config/orte_check_tm.m4 b/config/orte_check_tm.m4 index d926982daa2..05a9e981d8c 100644 --- a/config/orte_check_tm.m4 +++ b/config/orte_check_tm.m4 @@ -114,7 +114,7 @@ AC_DEFUN([ORTE_CHECK_TM],[ AS_IF([test "$orte_check_tm_found" = "no"], [AS_IF([test "$orte_check_tm_happy" = "yes"], - [_OPAL_CHECK_PACKAGE_HEADER([$1], + [_OPAL_CHECK_PACKAGE_HEADER([$1], [tm.h], [$orte_check_tm_dir], [orte_check_tm_found="yes"], diff --git a/config/orte_config_files.m4 b/config/orte_config_files.m4 index dc87637d34b..54e90a06c57 100644 --- a/config/orte_config_files.m4 +++ b/config/orte_config_files.m4 @@ -8,9 +8,9 @@ # reserved. # Copyright (c) 2015 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -19,7 +19,7 @@ AC_DEFUN([ORTE_CONFIG_FILES],[ orte/Makefile orte/include/Makefile orte/etc/Makefile - + orte/tools/orted/Makefile orte/tools/orterun/Makefile orte/tools/wrappers/Makefile diff --git a/config/orte_configure_options.m4 b/config/orte_configure_options.m4 index b97a549380e..2c7db0ae62c 100644 --- a/config/orte_configure_options.m4 +++ b/config/orte_configure_options.m4 @@ -18,9 +18,9 @@ dnl reserved. dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. dnl dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/config/orte_setup_debugger_flags.m4 b/config/orte_setup_debugger_flags.m4 index 4ed96b9becc..39ac77defef 100644 --- a/config/orte_setup_debugger_flags.m4 +++ b/config/orte_setup_debugger_flags.m4 @@ -50,7 +50,7 @@ AC_DEFUN([ORTE_SETUP_DEBUGGER_FLAGS],[ AC_MSG_RESULT([$CFLAGS_WITHOUT_OPTFLAGS]) AC_MSG_CHECKING([for debugger extra CFLAGS]) AC_MSG_RESULT([$DEBUGGER_CFLAGS]) - + AC_SUBST(CFLAGS_WITHOUT_OPTFLAGS) AC_SUBST(DEBUGGER_CFLAGS) ]) diff --git a/config/orte_setup_java.m4 b/config/orte_setup_java.m4 index ab7d6b5fc62..e8c9789afdb 100644 --- a/config/orte_setup_java.m4 +++ b/config/orte_setup_java.m4 @@ -11,21 +11,21 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights -dnl reserved. +dnl reserved. dnl Copyright (c) 2007-2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl # This macro is necessary to get the title to be displayed first. :-) AC_DEFUN([ORTE_SETUP_JAVA_BANNER],[ - opal_show_subtitle "Java compiler" + opal_show_subtitle "Java compiler" ]) # ORTE_SETUP_JAVA() @@ -99,7 +99,7 @@ AC_DEFUN([ORTE_SETUP_JAVA],[ AS_IF([test -d $dir], [AC_MSG_RESULT([found]) found=1 - with_jdk_headers=$dir + with_jdk_headers=$dir with_jdk_bindir=/usr/bin], [AC_MSG_RESULT([not found])]) @@ -112,7 +112,7 @@ AC_DEFUN([ORTE_SETUP_JAVA],[ fi jnih=`ls $dir/jni.h 2>/dev/null | head -n 1` AC_MSG_CHECKING([Linux locations]) - AS_IF([test -r "$jnih"], + AS_IF([test -r "$jnih"], [with_jdk_headers=`dirname $jnih` OPAL_WHICH([javac], [with_jdk_bindir]) AS_IF([test -n "$with_jdk_bindir"], @@ -122,7 +122,7 @@ AC_DEFUN([ORTE_SETUP_JAVA],[ [with_jdk_headers=])], [dir='/usr/lib/jvm/default-java/include/' jnih=`ls $dir/jni.h 2>/dev/null | head -n 1` - AS_IF([test -r "$jnih"], + AS_IF([test -r "$jnih"], [with_jdk_headers=`dirname $jnih` OPAL_WHICH([javac], [with_jdk_bindir]) AS_IF([test -n "$with_jdk_bindir"], @@ -187,7 +187,7 @@ AC_DEFUN([ORTE_SETUP_JAVA],[ [ORTE_JDK_CPPFLAGS="$ORTE_JDK_CPPFLAGS -I$with_jdk_headers/solaris"]) CPPFLAGS="$CPPFLAGS $ORTE_JDK_CPPFLAGS"]) - AC_CHECK_HEADER([jni.h], [], + AC_CHECK_HEADER([jni.h], [], [orte_java_happy=no]) CPPFLAGS=$CPPFLAGS_save ]) diff --git a/config/pkg.m4 b/config/pkg.m4 index 5f67c354609..b0bab42dfa9 100644 --- a/config/pkg.m4 +++ b/config/pkg.m4 @@ -1,6 +1,6 @@ # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) -# +# # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify @@ -123,7 +123,7 @@ if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -266,7 +266,7 @@ if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 8a984ac2ed2..070f150a016 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -15,9 +15,9 @@ # Copyright (c) 2013 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2013 Intel Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/amca-param-sets/ft-enable-cr b/contrib/amca-param-sets/ft-enable-cr index ea125f66a42..1cec86dde48 100644 --- a/contrib/amca-param-sets/ft-enable-cr +++ b/contrib/amca-param-sets/ft-enable-cr @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # An Aggregate MCA Parameter Set to enable checkpoint/restart capabilities diff --git a/contrib/amca-param-sets/ft-enable-cr-recovery b/contrib/amca-param-sets/ft-enable-cr-recovery index 62100984f40..5b175ab018f 100644 --- a/contrib/amca-param-sets/ft-enable-cr-recovery +++ b/contrib/amca-param-sets/ft-enable-cr-recovery @@ -3,9 +3,9 @@ # University Research and Technology # Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # An Aggregate MCA Parameter Set to enable checkpoint/restart capabilities diff --git a/contrib/build-mca-comps-outside-of-tree/Makefile.am b/contrib/build-mca-comps-outside-of-tree/Makefile.am index d2474b67e88..33b598d1bd5 100644 --- a/contrib/build-mca-comps-outside-of-tree/Makefile.am +++ b/contrib/build-mca-comps-outside-of-tree/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/build-mca-comps-outside-of-tree/autogen.sh b/contrib/build-mca-comps-outside-of-tree/autogen.sh index 4720d5576b3..554b595f2d3 100755 --- a/contrib/build-mca-comps-outside-of-tree/autogen.sh +++ b/contrib/build-mca-comps-outside-of-tree/autogen.sh @@ -1,9 +1,9 @@ #!/bin/sh # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2.addr.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2.addr.h index c75bb3bc98e..cebfda0967a 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2.addr.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2.addr.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -54,13 +54,13 @@ struct mca_btl_tcp2_addr_t { uint32_t _pad[3]; } _addr__inet; } _union_inet; - } addr_inet; + } addr_inet; #endif in_port_t addr_port; /**< listen port */ uint16_t addr_ifkindex; /**< remote interface index assigned with this address */ unsigned short addr_inuse; /**< local meaning only */ - uint8_t addr_family; /**< AF_INET or AF_INET6 */ + uint8_t addr_family; /**< AF_INET or AF_INET6 */ }; typedef struct mca_btl_tcp2_addr_t mca_btl_tcp2_addr_t; diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2.c b/contrib/build-mca-comps-outside-of-tree/btl_tcp2.c index 86c2629d57d..bb25a08dee9 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2.c +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,12 +26,12 @@ #include "ompi/mca/btl/btl.h" #include "btl_tcp2.h" -#include "btl_tcp2_frag.h" +#include "btl_tcp2_frag.h" #include "btl_tcp2_proc.h" #include "btl_tcp2_endpoint.h" -#include "opal/datatype/opal_convertor.h" -#include "ompi/mca/mpool/base/base.h" -#include "ompi/mca/mpool/mpool.h" +#include "opal/datatype/opal_convertor.h" +#include "ompi/mca/mpool/base/base.h" +#include "ompi/mca/mpool/mpool.h" #include "ompi/proc/proc.h" mca_btl_tcp2_module_t mca_btl_tcp2_module = { @@ -49,16 +49,16 @@ mca_btl_tcp2_module_t mca_btl_tcp2_module = { 0, /* flags */ mca_btl_tcp2_add_procs, mca_btl_tcp2_del_procs, - NULL, + NULL, mca_btl_tcp2_finalize, - mca_btl_tcp2_alloc, - mca_btl_tcp2_free, + mca_btl_tcp2_alloc, + mca_btl_tcp2_free, mca_btl_tcp2_prepare_src, mca_btl_tcp2_prepare_dst, mca_btl_tcp2_send, NULL, /* send immediate */ mca_btl_tcp2_put, - NULL, /* get */ + NULL, /* get */ mca_btl_base_dump, NULL, /* mpool */ NULL, /* register error */ @@ -70,10 +70,10 @@ mca_btl_tcp2_module_t mca_btl_tcp2_module = { * */ -int mca_btl_tcp2_add_procs( struct mca_btl_base_module_t* btl, - size_t nprocs, - struct ompi_proc_t **ompi_procs, - struct mca_btl_base_endpoint_t** peers, +int mca_btl_tcp2_add_procs( struct mca_btl_base_module_t* btl, + size_t nprocs, + struct ompi_proc_t **ompi_procs, + struct mca_btl_base_endpoint_t** peers, opal_bitmap_t* reachable ) { mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*)btl; @@ -101,15 +101,15 @@ int mca_btl_tcp2_add_procs( struct mca_btl_base_module_t* btl, } /* - * Check to make sure that the peer has at least as many interface - * addresses exported as we are trying to use. If not, then + * Check to make sure that the peer has at least as many interface + * addresses exported as we are trying to use. If not, then * don't bind this BTL instance to the proc. */ OPAL_THREAD_LOCK(&tcp_proc->proc_lock); /* The btl_proc datastructure is shared by all TCP BTL - * instances that are trying to reach this destination. + * instances that are trying to reach this destination. * Cache the peer instance on the btl_proc. */ tcp_endpoint = OBJ_NEW(mca_btl_tcp2_endpoint_t); @@ -140,9 +140,9 @@ int mca_btl_tcp2_add_procs( struct mca_btl_base_module_t* btl, return OMPI_SUCCESS; } -int mca_btl_tcp2_del_procs(struct mca_btl_base_module_t* btl, - size_t nprocs, - struct ompi_proc_t **procs, +int mca_btl_tcp2_del_procs(struct mca_btl_base_module_t* btl, + size_t nprocs, + struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t ** endpoints) { mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*)btl; @@ -174,16 +174,16 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_alloc( uint32_t flags) { mca_btl_tcp2_frag_t* frag = NULL; - - if(size <= btl->btl_eager_limit) { - MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); - } else if (size <= btl->btl_max_send_size) { - MCA_BTL_TCP_FRAG_ALLOC_MAX(frag); + + if(size <= btl->btl_eager_limit) { + MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); + } else if (size <= btl->btl_max_send_size) { + MCA_BTL_TCP_FRAG_ALLOC_MAX(frag); } if( OPAL_UNLIKELY(NULL == frag) ) { return NULL; } - + frag->segments[0].seg_len = size; frag->segments[0].seg_addr.pval = frag+1; @@ -191,7 +191,7 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_alloc( frag->base.des_src_cnt = 1; frag->base.des_dst = NULL; frag->base.des_dst_cnt = 0; - frag->base.des_flags = flags; + frag->base.des_flags = flags; frag->base.order = MCA_BTL_NO_ORDER; frag->btl = (mca_btl_tcp2_module_t*)btl; return (mca_btl_base_descriptor_t*)frag; @@ -203,12 +203,12 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_alloc( */ int mca_btl_tcp2_free( - struct mca_btl_base_module_t* btl, - mca_btl_base_descriptor_t* des) + struct mca_btl_base_module_t* btl, + mca_btl_base_descriptor_t* des) { - mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)des; - MCA_BTL_TCP_FRAG_RETURN(frag); - return OMPI_SUCCESS; + mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)des; + MCA_BTL_TCP_FRAG_RETURN(frag); + return OMPI_SUCCESS; } /** @@ -244,7 +244,7 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_src( if (max_data+reserve <= btl->btl_eager_limit) { MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); } else { - /* + /* * otherwise pack as much data as we can into a fragment * that is the max send size. */ @@ -265,13 +265,13 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_src( } iov.iov_len = max_data; iov.iov_base = (IOVBASE_TYPE*)(((unsigned char*)(frag->segments[0].seg_addr.pval)) + reserve); - + rc = opal_convertor_pack(convertor, &iov, &iov_count, &max_data ); if( OPAL_UNLIKELY(rc < 0) ) { mca_btl_tcp2_free(btl, &frag->base); return NULL; } - + frag->segments[0].seg_len += max_data; } else { @@ -358,11 +358,11 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_dst( int mca_btl_tcp2_send( struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* endpoint, - struct mca_btl_base_descriptor_t* descriptor, + struct mca_btl_base_descriptor_t* descriptor, mca_btl_base_tag_t tag ) { - mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; - mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)descriptor; + mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; + mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)descriptor; int i; frag->btl = tcp_btl; @@ -400,8 +400,8 @@ int mca_btl_tcp2_put( mca_btl_base_module_t* btl, mca_btl_base_endpoint_t* endpoint, mca_btl_base_descriptor_t* descriptor ) { - mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; - mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)descriptor; + mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; + mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)descriptor; int i; frag->btl = tcp_btl; @@ -438,13 +438,13 @@ int mca_btl_tcp2_put( mca_btl_base_module_t* btl, * */ -int mca_btl_tcp2_get( +int mca_btl_tcp2_get( mca_btl_base_module_t* btl, mca_btl_base_endpoint_t* endpoint, mca_btl_base_descriptor_t* descriptor) { - mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; - mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)descriptor; + mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; + mca_btl_tcp2_frag_t* frag = (mca_btl_tcp2_frag_t*)descriptor; int rc; frag->btl = tcp_btl; @@ -472,7 +472,7 @@ int mca_btl_tcp2_get( int mca_btl_tcp2_finalize(struct mca_btl_base_module_t* btl) { - mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; + mca_btl_tcp2_module_t* tcp_btl = (mca_btl_tcp2_module_t*) btl; opal_list_item_t* item; for( item = opal_list_remove_first(&tcp_btl->tcp_endpoints); item != NULL; diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2.h index 9173ff9ff36..581f0871874 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2.h @@ -6,15 +6,15 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -39,7 +39,7 @@ #include "ompi/class/ompi_free_list.h" #include "ompi/mca/btl/btl.h" #include "ompi/mca/btl/base/base.h" -#include "ompi/mca/mpool/mpool.h" +#include "ompi/mca/mpool/mpool.h" #include "ompi/mca/btl/btl.h" #include "opal/class/opal_hash_table.h" @@ -52,7 +52,7 @@ BEGIN_C_DECLS */ struct mca_btl_tcp2_component_t { - mca_btl_base_component_2_0_0_t super; /**< base BTL component */ + mca_btl_base_component_2_0_0_t super; /**< base BTL component */ uint32_t tcp_addr_count; /**< total number of addresses */ uint32_t tcp_num_btls; /**< number of hcas available to the TCP component */ uint32_t tcp_num_links; /**< number of logical links per physical device */ @@ -93,7 +93,7 @@ struct mca_btl_tcp2_component_t { /* Do we want to use TCP_NODELAY? */ int tcp_use_nodelay; -}; +}; typedef struct mca_btl_tcp2_component_t mca_btl_tcp2_component_t; OMPI_MODULE_DECLSPEC extern mca_btl_tcp2_component_t mca_btl_tcp2_component; @@ -115,7 +115,7 @@ struct mca_btl_tcp2_module_t { size_t tcp_bytes_recv; size_t tcp_send_handler; #endif -}; +}; typedef struct mca_btl_tcp2_module_t mca_btl_tcp2_module_t; extern mca_btl_tcp2_module_t mca_btl_tcp2_module; @@ -133,13 +133,13 @@ extern int mca_btl_tcp2_component_close(void); /** * TCP component initialization. - * + * * @param num_btl_modules (OUT) Number of BTLs returned in BTL array. * @param allow_multi_user_threads (OUT) Flag indicating wether BTL supports user threads (TRUE) * @param have_hidden_threads (OUT) Flag indicating wether BTL uses threads (TRUE) */ extern mca_btl_base_module_t** mca_btl_tcp2_component_init( - int *num_btl_modules, + int *num_btl_modules, bool allow_multi_user_threads, bool have_hidden_threads ); @@ -148,8 +148,8 @@ extern mca_btl_base_module_t** mca_btl_tcp2_component_init( * TCP component control. */ int mca_btl_tcp2_component_control( - int param, - void* value, + int param, + void* value, size_t size ); @@ -163,7 +163,7 @@ extern int mca_btl_tcp2_component_progress(void); /** * Cleanup any resources held by the BTL. - * + * * @param btl BTL instance. * @return OMPI_SUCCESS or error status on failure. */ @@ -175,14 +175,14 @@ extern int mca_btl_tcp2_finalize( /** * PML->BTL notification of change in the process list. - * + * * @param btl (IN) * @param nprocs (IN) Number of processes * @param procs (IN) Set of processes * @param peers (OUT) Set of (optional) peer addressing info. * @param peers (IN/OUT) Set of processes that are reachable via this BTL. * @return OMPI_SUCCESS or error status on failure. - * + * */ extern int mca_btl_tcp2_add_procs( @@ -272,7 +272,7 @@ extern mca_btl_base_descriptor_t* mca_btl_tcp2_alloc( struct mca_btl_base_endpoint_t* endpoint, uint8_t order, size_t size, - uint32_t flags); + uint32_t flags); /** @@ -283,9 +283,9 @@ extern mca_btl_base_descriptor_t* mca_btl_tcp2_alloc( */ extern int mca_btl_tcp2_free( - struct mca_btl_base_module_t* btl, - mca_btl_base_descriptor_t* des); - + struct mca_btl_base_module_t* btl, + mca_btl_base_descriptor_t* des); + /** * Prepare a descriptor for send/rdma using the supplied @@ -298,7 +298,7 @@ extern int mca_btl_tcp2_free( * @param endpoint (IN) BTL peer addressing * @param convertor (IN) Data type convertor * @param reserve (IN) Additional bytes requested by upper layer to precede user data - * @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT) + * @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT) */ mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_src( @@ -312,15 +312,15 @@ mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_src( uint32_t flags ); -extern mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_dst( - struct mca_btl_base_module_t* btl, +extern mca_btl_base_descriptor_t* mca_btl_tcp2_prepare_dst( + struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* peer, struct mca_mpool_base_registration_t*, struct opal_convertor_t* convertor, uint8_t order, size_t reserve, size_t* size, - uint32_t flags); + uint32_t flags); /** diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_addr.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_addr.h index c75bb3bc98e..cebfda0967a 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_addr.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_addr.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -54,13 +54,13 @@ struct mca_btl_tcp2_addr_t { uint32_t _pad[3]; } _addr__inet; } _union_inet; - } addr_inet; + } addr_inet; #endif in_port_t addr_port; /**< listen port */ uint16_t addr_ifkindex; /**< remote interface index assigned with this address */ unsigned short addr_inuse; /**< local meaning only */ - uint8_t addr_family; /**< AF_INET or AF_INET6 */ + uint8_t addr_family; /**< AF_INET or AF_INET6 */ }; typedef struct mca_btl_tcp2_addr_t mca_btl_tcp2_addr_t; diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_component.c b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_component.c index 37879b2fc8f..d79aac4b32a 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_component.c +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_component.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Laboratory * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -62,14 +62,14 @@ #include "ompi/mca/btl/btl.h" #include "opal/mca/base/mca_base_param.h" #include "ompi/runtime/ompi_module_exchange.h" -#include "ompi/mca/mpool/base/base.h" +#include "ompi/mca/mpool/base/base.h" #include "ompi/mca/btl/base/btl_base_error.h" #include "btl_tcp2.h" #include "btl_tcp2_addr.h" #include "btl_tcp2_proc.h" #include "btl_tcp2_frag.h" -#include "btl_tcp2_endpoint.h" -#include "ompi/mca/btl/base/base.h" +#include "btl_tcp2_endpoint.h" +#include "ompi/mca/btl/base/base.h" mca_btl_tcp2_component_t mca_btl_tcp2_component = { @@ -92,7 +92,7 @@ mca_btl_tcp2_component_t mca_btl_tcp2_component = { MCA_BASE_METADATA_PARAM_CHECKPOINT }, - mca_btl_tcp2_component_init, + mca_btl_tcp2_component_init, NULL, } }; @@ -102,7 +102,7 @@ mca_btl_tcp2_component_t mca_btl_tcp2_component = { */ static inline char* mca_btl_tcp2_param_register_string( - const char* param_name, + const char* param_name, const char* help_string, const char* default_value) { @@ -114,13 +114,13 @@ static inline char* mca_btl_tcp2_param_register_string( } static inline int mca_btl_tcp2_param_register_int( - const char* param_name, + const char* param_name, const char* help_string, int default_value) { int value; mca_base_param_reg_int(&mca_btl_tcp2_component.super.btl_version, - param_name, help_string, false, false, + param_name, help_string, false, false, default_value, &value); return value; } @@ -181,8 +181,8 @@ int mca_btl_tcp2_component_open(void) mca_btl_tcp2_component.tcp_num_btls=0; mca_btl_tcp2_component.tcp_addr_count = 0; mca_btl_tcp2_component.tcp_btls=NULL; - - /* initialize objects */ + + /* initialize objects */ OBJ_CONSTRUCT(&mca_btl_tcp2_component.tcp_lock, opal_mutex_t); OBJ_CONSTRUCT(&mca_btl_tcp2_component.tcp_procs, opal_hash_table_t); OBJ_CONSTRUCT(&mca_btl_tcp2_component.tcp_events, opal_list_t); @@ -225,7 +225,7 @@ int mca_btl_tcp2_component_open(void) mca_btl_tcp2_component.tcp_port_min ); mca_btl_tcp2_component.tcp_port_min = 1024; } - asprintf( &message, + asprintf( &message, "The number of ports where the TCP BTL will try to bind (default %d)." " This parameter together with the port min, define a range of ports" " where Open MPI will open sockets.", @@ -244,7 +244,7 @@ int mca_btl_tcp2_component_open(void) mca_btl_tcp2_component.tcp6_port_min ); mca_btl_tcp2_component.tcp6_port_min = 1024; } - asprintf( &message, + asprintf( &message, "The number of ports where the TCP BTL will try to bind (default %d)." " This parameter together with the port min, define a range of ports" " where Open MPI will open sockets.", @@ -298,7 +298,7 @@ int mca_btl_tcp2_component_close(void) if (NULL != mca_btl_tcp2_component.tcp_btls) free(mca_btl_tcp2_component.tcp_btls); - + if (mca_btl_tcp2_component.tcp_listen_sd >= 0) { opal_event_del(&mca_btl_tcp2_component.tcp_recv_event); CLOSE_THE_SOCKET(mca_btl_tcp2_component.tcp_listen_sd); @@ -316,7 +316,7 @@ int mca_btl_tcp2_component_close(void) /* cleanup any pending events */ OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock); for(item = opal_list_get_first(&mca_btl_tcp2_component.tcp_events); - item != opal_list_get_end(&mca_btl_tcp2_component.tcp_events); + item != opal_list_get_end(&mca_btl_tcp2_component.tcp_events); item = next) { mca_btl_tcp2_event_t* event = (mca_btl_tcp2_event_t*)item; next = opal_list_get_next(item); @@ -425,7 +425,7 @@ static char **split_and_resolve(char **orig_str, char *name) str = strchr(argv[i], '/'); if (NULL == str) { orte_show_help("help-mpi-btl-tcp2.txt", "invalid if_inexclude", - true, name, orte_process_info.nodename, + true, name, orte_process_info.nodename, tmp, "Invalid specification (missing \"/\")"); free(argv[i]); free(tmp); @@ -436,7 +436,7 @@ static char **split_and_resolve(char **orig_str, char *name) /* Now convert the IPv4 address */ ((struct sockaddr*) &argv_inaddr)->sa_family = AF_INET; - ret = inet_pton(AF_INET, argv[i], + ret = inet_pton(AF_INET, argv[i], &((struct sockaddr_in*) &argv_inaddr)->sin_addr); free(argv[i]); @@ -447,16 +447,16 @@ static char **split_and_resolve(char **orig_str, char *name) free(tmp); continue; } - opal_output_verbose(20, mca_btl_base_output, + opal_output_verbose(20, mca_btl_base_output, "btl: tcp: Searching for %s address+prefix: %s / %u", name, opal_net_get_hostname((struct sockaddr*) &argv_inaddr), argv_prefix); - + /* Go through all interfaces and see if we can find a match */ - for (if_index = opal_ifbegin(); if_index >= 0; + for (if_index = opal_ifbegin(); if_index >= 0; if_index = opal_ifnext(if_index)) { - opal_ifindextoaddr(if_index, + opal_ifindextoaddr(if_index, (struct sockaddr*) &if_inaddr, sizeof(if_inaddr)); if (opal_net_samenetwork((struct sockaddr*) &argv_inaddr, @@ -465,7 +465,7 @@ static char **split_and_resolve(char **orig_str, char *name) break; } } - + /* If we didn't find a match, keep trying */ if (if_index < 0) { orte_show_help("help-mpi-btl-tcp2.txt", "invalid if_inexclude", @@ -478,7 +478,7 @@ static char **split_and_resolve(char **orig_str, char *name) /* We found a match; get the name and replace it in the argv */ opal_ifindextoname(if_index, if_name, sizeof(if_name)); - opal_output_verbose(20, mca_btl_base_output, + opal_output_verbose(20, mca_btl_base_output, "btl: tcp: Found match: %s (%s)", opal_net_get_hostname((struct sockaddr*) &if_inaddr), if_name); @@ -498,7 +498,7 @@ static char **split_and_resolve(char **orig_str, char *name) /* * Create a TCP BTL instance for either: * (1) all interfaces specified by the user - * (2) all available interfaces + * (2) all available interfaces * (3) all available interfaces except for those excluded by the user */ @@ -583,7 +583,7 @@ static int mca_btl_tcp2_component_create_instances(void) goto cleanup; } - /* if the interface list was not specified by the user, create + /* if the interface list was not specified by the user, create * a BTL for each interface that was not excluded. */ exclude = split_and_resolve(&mca_btl_tcp2_component.tcp_if_exclude, @@ -695,7 +695,7 @@ static int mca_btl_tcp2_component_create_listen(uint16_t af_family) { int index, range, port; - + range = mca_btl_tcp2_component.tcp_port_range; port = mca_btl_tcp2_component.tcp_port_min; #if OPAL_ENABLE_IPV6 @@ -759,7 +759,7 @@ static int mca_btl_tcp2_component_create_listen(uint16_t af_family) /* setup listen backlog to maximum allowed by kernel */ if(listen(sd, SOMAXCONN) < 0) { - BTL_ERROR(("listen() failed: %s (%d)", + BTL_ERROR(("listen() failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); CLOSE_THE_SOCKET(sd); return OMPI_ERROR; @@ -805,14 +805,14 @@ static int mca_btl_tcp2_component_create_listen(uint16_t af_family) /* * Register TCP module addressing information. The MCA framework - * will make this available to all peers. + * will make this available to all peers. */ static int mca_btl_tcp2_component_exchange(void) { int rc = 0, index; size_t i = 0; - size_t size = mca_btl_tcp2_component.tcp_addr_count * + size_t size = mca_btl_tcp2_component.tcp_addr_count * mca_btl_tcp2_component.tcp_num_links * sizeof(mca_btl_tcp2_addr_t); /* adi@2007-04-12: * @@ -842,10 +842,10 @@ static int mca_btl_tcp2_component_exchange(void) continue; } - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != opal_ifindextoaddr(index, (struct sockaddr*) &my_ss, sizeof (my_ss))) { - opal_output (0, + opal_output (0, "btl_tcp2_component: problems getting address for index %i (kernel index %i)\n", index, opal_ifindextokindex (index)); continue; @@ -853,10 +853,10 @@ static int mca_btl_tcp2_component_exchange(void) if ((AF_INET == my_ss.ss_family) && (4 != mca_btl_tcp2_component.tcp_disable_family)) { - memcpy(&addrs[current_addr].addr_inet, + memcpy(&addrs[current_addr].addr_inet, &((struct sockaddr_in*)&my_ss)->sin_addr, sizeof(addrs[0].addr_inet)); - addrs[current_addr].addr_port = + addrs[current_addr].addr_port = mca_btl_tcp2_component.tcp_listen_port; addrs[current_addr].addr_family = MCA_BTL_TCP_AF_INET; xfer_size += sizeof (mca_btl_tcp2_addr_t); @@ -871,7 +871,7 @@ static int mca_btl_tcp2_component_exchange(void) memcpy(&addrs[current_addr].addr_inet, &((struct sockaddr_in6*)&my_ss)->sin6_addr, sizeof(addrs[0].addr_inet)); - addrs[current_addr].addr_port = + addrs[current_addr].addr_port = mca_btl_tcp2_component.tcp6_listen_port; addrs[current_addr].addr_family = MCA_BTL_TCP_AF_INET6; xfer_size += sizeof (mca_btl_tcp2_addr_t); @@ -883,7 +883,7 @@ static int mca_btl_tcp2_component_exchange(void) #endif } /* end of for opal_ifbegin() */ } /* end of for tcp_num_btls */ - rc = ompi_modex_send(&mca_btl_tcp2_component.super.btl_version, + rc = ompi_modex_send(&mca_btl_tcp2_component.super.btl_version, addrs, xfer_size); free(addrs); } /* end if */ @@ -897,7 +897,7 @@ static int mca_btl_tcp2_component_exchange(void) * (2) setup TCP listen socket for incoming connection attempts * (3) register BTL parameters with the MCA */ -mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, +mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, bool enable_progress_threads, bool enable_mpi_threads) { @@ -907,7 +907,7 @@ mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, /* initialize free lists */ ompi_free_list_init_new( &mca_btl_tcp2_component.tcp_frag_eager, - sizeof (mca_btl_tcp2_frag_eager_t) + + sizeof (mca_btl_tcp2_frag_eager_t) + mca_btl_tcp2_module.super.btl_eager_limit, opal_cache_line_size, OBJ_CLASS (mca_btl_tcp2_frag_eager_t), @@ -916,9 +916,9 @@ mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, mca_btl_tcp2_component.tcp_free_list_max, mca_btl_tcp2_component.tcp_free_list_inc, NULL ); - + ompi_free_list_init_new( &mca_btl_tcp2_component.tcp_frag_max, - sizeof (mca_btl_tcp2_frag_max_t) + + sizeof (mca_btl_tcp2_frag_max_t) + mca_btl_tcp2_module.super.btl_max_send_size, opal_cache_line_size, OBJ_CLASS (mca_btl_tcp2_frag_max_t), @@ -927,7 +927,7 @@ mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, mca_btl_tcp2_component.tcp_free_list_max, mca_btl_tcp2_component.tcp_free_list_inc, NULL ); - + ompi_free_list_init_new( &mca_btl_tcp2_component.tcp_frag_user, sizeof (mca_btl_tcp2_frag_user_t), opal_cache_line_size, @@ -937,7 +937,7 @@ mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, mca_btl_tcp2_component.tcp_free_list_max, mca_btl_tcp2_component.tcp_free_list_inc, NULL ); - + /* create a BTL TCP module for selected interfaces */ if(OMPI_SUCCESS != (ret = mca_btl_tcp2_component_create_instances() )) { return 0; @@ -962,7 +962,7 @@ mca_btl_base_module_t** mca_btl_tcp2_component_init(int *num_btl_modules, return 0; } - btls = (mca_btl_base_module_t **)malloc(mca_btl_tcp2_component.tcp_num_btls * + btls = (mca_btl_base_module_t **)malloc(mca_btl_tcp2_component.tcp_num_btls * sizeof(mca_btl_base_module_t*)); if(NULL == btls) { return NULL; @@ -1006,14 +1006,14 @@ static void mca_btl_tcp2_component_accept_handler( int incoming_sd, if(opal_socket_errno == EINTR) continue; if(opal_socket_errno != EAGAIN && opal_socket_errno != EWOULDBLOCK) - BTL_ERROR(("accept() failed: %s (%d).", + BTL_ERROR(("accept() failed: %s (%d).", strerror(opal_socket_errno), opal_socket_errno)); return; } mca_btl_tcp2_set_socket_options(sd); /* wait for receipt of peers process identifier to complete this connection */ - + event = OBJ_NEW(mca_btl_tcp2_event_t); opal_event_set(opal_event_base, &event->event, sd, OPAL_EV_READ, mca_btl_tcp2_component_recv_handler, event); opal_event_add(&event->event, 0); @@ -1022,7 +1022,7 @@ static void mca_btl_tcp2_component_accept_handler( int incoming_sd, /** - * Event callback when there is data available on the registered + * Event callback when there is data available on the registered * socket to recv. This callback is triggered only once per lifetime * for any socket, in the beginning when we setup the handshake * protocol. @@ -1057,7 +1057,7 @@ static void mca_btl_tcp2_component_recv_handler(int sd, short flags, void* user) strerror(opal_socket_errno), opal_socket_errno)); } } - + /* lookup the corresponding process */ btl_proc = mca_btl_tcp2_proc_lookup(&guid); if(NULL == btl_proc) { @@ -1067,7 +1067,7 @@ static void mca_btl_tcp2_component_recv_handler(int sd, short flags, void* user) /* lookup peer address */ if(getpeername(sd, (struct sockaddr*)&addr, &addr_len) != 0) { - BTL_ERROR(("getpeername() failed: %s (%d)", + BTL_ERROR(("getpeername() failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); CLOSE_THE_SOCKET(sd); return; diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.c b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.c index 5299ef7b1ae..f198654c793 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.c +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -56,7 +56,7 @@ #include "opal/util/net.h" #include "btl_tcp2.h" -#include "btl_tcp2_endpoint.h" +#include "btl_tcp2_endpoint.h" #include "btl_tcp2_proc.h" #include "btl_tcp2_frag.h" #include "btl_tcp2_addr.h" @@ -101,9 +101,9 @@ static void mca_btl_tcp2_endpoint_destruct(mca_btl_tcp2_endpoint_t* endpoint) } OBJ_CLASS_INSTANCE( - mca_btl_tcp2_endpoint_t, - opal_list_item_t, - mca_btl_tcp2_endpoint_construct, + mca_btl_tcp2_endpoint_t, + opal_list_item_t, + mca_btl_tcp2_endpoint_construct, mca_btl_tcp2_endpoint_destruct); @@ -163,7 +163,7 @@ static void mca_btl_tcp2_endpoint_dump(mca_btl_base_endpoint_t* btl_endpoint, co #endif if((flags = fcntl(btl_endpoint->endpoint_sd, F_GETFL, 0)) < 0) { - BTL_ERROR(("fcntl(F_GETFL) failed: %s (%d)", + BTL_ERROR(("fcntl(F_GETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } @@ -179,7 +179,7 @@ static void mca_btl_tcp2_endpoint_dump(mca_btl_base_endpoint_t* btl_endpoint, co #if defined(SO_RCVBUF) obtlen = sizeof(rcvbuf); if(getsockopt(btl_endpoint->endpoint_sd, SOL_SOCKET, SO_RCVBUF, (char *)&rcvbuf, &obtlen) < 0) { - BTL_ERROR(("SO_RCVBUF option: %s (%d)", + BTL_ERROR(("SO_RCVBUF option: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } #else @@ -188,14 +188,14 @@ static void mca_btl_tcp2_endpoint_dump(mca_btl_base_endpoint_t* btl_endpoint, co #if defined(TCP_NODELAY) obtlen = sizeof(nodelay); if(getsockopt(btl_endpoint->endpoint_sd, IPPROTO_TCP, TCP_NODELAY, (char *)&nodelay, &obtlen) < 0) { - BTL_ERROR(("TCP_NODELAY option: %s (%d)", + BTL_ERROR(("TCP_NODELAY option: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } #else nodelay = 0; #endif - BTL_VERBOSE(("%s: %s - %s nodelay %d sndbuf %d rcvbuf %d flags %08x", + BTL_VERBOSE(("%s: %s - %s nodelay %d sndbuf %d rcvbuf %d flags %08x", msg, src, dst, nodelay, sndbuf, rcvbuf, flags)); } #endif @@ -211,20 +211,20 @@ static inline void mca_btl_tcp2_endpoint_event_init(mca_btl_base_endpoint_t* btl btl_endpoint->endpoint_cache_pos = btl_endpoint->endpoint_cache; #endif /* MCA_BTL_TCP_ENDPOINT_CACHE */ - opal_event_set(opal_event_base, &btl_endpoint->endpoint_recv_event, - btl_endpoint->endpoint_sd, - OPAL_EV_READ|OPAL_EV_PERSIST, + opal_event_set(opal_event_base, &btl_endpoint->endpoint_recv_event, + btl_endpoint->endpoint_sd, + OPAL_EV_READ|OPAL_EV_PERSIST, mca_btl_tcp2_endpoint_recv_handler, btl_endpoint ); /** * The send event should be non persistent until the endpoint is * completely connected. This means, when the event is created it - * will be fired only once, and when the endpoint is marked as + * will be fired only once, and when the endpoint is marked as * CONNECTED the event should be recreated with the correct flags. */ - opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event, - btl_endpoint->endpoint_sd, - OPAL_EV_WRITE, + opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event, + btl_endpoint->endpoint_sd, + OPAL_EV_WRITE, mca_btl_tcp2_endpoint_send_handler, btl_endpoint); } @@ -308,7 +308,7 @@ static int mca_btl_tcp2_endpoint_send_blocking(mca_btl_base_endpoint_t* btl_endp /* - * Send the globally unique identifier for this process to a endpoint on + * Send the globally unique identifier for this process to a endpoint on * a newly connected socket. */ @@ -319,7 +319,7 @@ static int mca_btl_tcp2_endpoint_send_connect_ack(mca_btl_base_endpoint_t* btl_e orte_process_name_t guid = btl_proc->proc_ompi->proc_name; ORTE_PROCESS_NAME_HTON(guid); - if(mca_btl_tcp2_endpoint_send_blocking(btl_endpoint, &guid, sizeof(guid)) != + if(mca_btl_tcp2_endpoint_send_blocking(btl_endpoint, &guid, sizeof(guid)) != sizeof(guid)) { return OMPI_ERR_UNREACH; } @@ -332,7 +332,7 @@ static int mca_btl_tcp2_endpoint_send_connect_ack(mca_btl_base_endpoint_t* btl_e * (1) if a connection has not been attempted, accept the connection * (2) if a connection has not been established, and the endpoints process identifier * is less than the local process, accept the connection - * otherwise, reject the connection and continue with the current connection + * otherwise, reject the connection and continue with the current connection */ bool mca_btl_tcp2_endpoint_accept(mca_btl_base_endpoint_t* btl_endpoint, @@ -351,7 +351,7 @@ bool mca_btl_tcp2_endpoint_accept(mca_btl_base_endpoint_t* btl_endpoint, return false; } - cmpval = orte_util_compare_name_fields(ORTE_NS_CMP_ALL, + cmpval = orte_util_compare_name_fields(ORTE_NS_CMP_ALL, &endpoint_proc->proc_ompi->proc_name, &this_proc->proc_ompi->proc_name); if((btl_endpoint->endpoint_sd < 0) || @@ -417,8 +417,8 @@ static void mca_btl_tcp2_endpoint_connected(mca_btl_base_endpoint_t* btl_endpoin btl_endpoint->endpoint_retries = 0; /* Create the send event in a persistent manner. */ - opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event, - btl_endpoint->endpoint_sd, + opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event, + btl_endpoint->endpoint_sd, OPAL_EV_WRITE | OPAL_EV_PERSIST, mca_btl_tcp2_endpoint_send_handler, btl_endpoint ); @@ -483,7 +483,7 @@ static int mca_btl_tcp2_endpoint_recv_connect_ack(mca_btl_base_endpoint_t* btl_e if (OPAL_EQUAL != orte_util_compare_name_fields(ORTE_NS_CMP_ALL, &btl_proc->proc_ompi->proc_name, &guid)) { - BTL_ERROR(("received unexpected process identifier %s", + BTL_ERROR(("received unexpected process identifier %s", ORTE_NAME_PRINT(&guid))); mca_btl_tcp2_endpoint_close(btl_endpoint); return OMPI_ERR_UNREACH; @@ -499,21 +499,21 @@ void mca_btl_tcp2_set_socket_options(int sd) #if defined(TCP_NODELAY) optval = mca_btl_tcp2_component.tcp_use_nodelay; if(setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char *)&optval, sizeof(optval)) < 0) { - BTL_ERROR(("setsockopt(TCP_NODELAY) failed: %s (%d)", + BTL_ERROR(("setsockopt(TCP_NODELAY) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } #endif #if defined(SO_SNDBUF) if(mca_btl_tcp2_component.tcp_sndbuf > 0 && setsockopt(sd, SOL_SOCKET, SO_SNDBUF, (char *)&mca_btl_tcp2_component.tcp_sndbuf, sizeof(int)) < 0) { - BTL_ERROR(("setsockopt(SO_SNDBUF) failed: %s (%d)", + BTL_ERROR(("setsockopt(SO_SNDBUF) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } #endif #if defined(SO_RCVBUF) if(mca_btl_tcp2_component.tcp_rcvbuf > 0 && setsockopt(sd, SOL_SOCKET, SO_RCVBUF, (char *)&mca_btl_tcp2_component.tcp_rcvbuf, sizeof(int)) < 0) { - BTL_ERROR(("setsockopt(SO_RCVBUF) failed: %s (%d)", + BTL_ERROR(("setsockopt(SO_RCVBUF) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } #endif @@ -535,14 +535,14 @@ static int mca_btl_tcp2_endpoint_start_connect(mca_btl_base_endpoint_t* btl_endp /* By default consider a IPv4 connection */ uint16_t af_family = AF_INET; opal_socklen_t addrlen = sizeof(struct sockaddr_in); - + #if OPAL_ENABLE_IPV6 if (AF_INET6 == btl_endpoint->endpoint_addr->addr_family) { af_family = AF_INET6; addrlen = sizeof (struct sockaddr_in6); } #endif - + btl_endpoint->endpoint_sd = socket(af_family, SOCK_STREAM, 0); if (btl_endpoint->endpoint_sd < 0) { btl_endpoint->endpoint_retries++; @@ -557,19 +557,19 @@ static int mca_btl_tcp2_endpoint_start_connect(mca_btl_base_endpoint_t* btl_endp /* setup the socket as non-blocking */ if((flags = fcntl(btl_endpoint->endpoint_sd, F_GETFL, 0)) < 0) { - BTL_ERROR(("fcntl(F_GETFL) failed: %s (%d)", + BTL_ERROR(("fcntl(F_GETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } else { flags |= O_NONBLOCK; if(fcntl(btl_endpoint->endpoint_sd, F_SETFL, flags) < 0) - BTL_ERROR(("fcntl(F_SETFL) failed: %s (%d)", + BTL_ERROR(("fcntl(F_SETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); } /* start the connect - will likely fail with EINPROGRESS */ mca_btl_tcp2_proc_tosocks(btl_endpoint->endpoint_addr, &endpoint_addr); - opal_output_verbose(20, mca_btl_base_output, + opal_output_verbose(20, mca_btl_base_output, "btl: tcp: attempting to connect() to address %s on port %d", opal_net_get_hostname((struct sockaddr*) &endpoint_addr), btl_endpoint->endpoint_addr->addr_port); @@ -607,7 +607,7 @@ static int mca_btl_tcp2_endpoint_start_connect(mca_btl_base_endpoint_t* btl_endp /* * Check the status of the connection. If the connection failed, will retry - * later. Otherwise, send this processes identifier to the endpoint on the + * later. Otherwise, send this processes identifier to the endpoint on the * newly connected socket. */ static void mca_btl_tcp2_endpoint_complete_connect(mca_btl_base_endpoint_t* btl_endpoint) @@ -623,7 +623,7 @@ static void mca_btl_tcp2_endpoint_complete_connect(mca_btl_base_endpoint_t* btl_ /* check connect completion status */ if(getsockopt(btl_endpoint->endpoint_sd, SOL_SOCKET, SO_ERROR, (char *)&so_error, &so_length) < 0) { - BTL_ERROR(("getsockopt() to %s failed: %s (%d)", + BTL_ERROR(("getsockopt() to %s failed: %s (%d)", opal_net_get_hostname((struct sockaddr*) &endpoint_addr), strerror(opal_socket_errno), opal_socket_errno)); mca_btl_tcp2_endpoint_close(btl_endpoint); @@ -634,7 +634,7 @@ static void mca_btl_tcp2_endpoint_complete_connect(mca_btl_base_endpoint_t* btl_ return; } if(so_error != 0) { - BTL_ERROR(("connect() to %s failed: %s (%d)", + BTL_ERROR(("connect() to %s failed: %s (%d)", opal_net_get_hostname((struct sockaddr*) &endpoint_addr), strerror(so_error), so_error)); mca_btl_tcp2_endpoint_close(btl_endpoint); @@ -651,7 +651,7 @@ static void mca_btl_tcp2_endpoint_complete_connect(mca_btl_base_endpoint_t* btl_ /* - * A file descriptor is available/ready for recv. Check the state + * A file descriptor is available/ready for recv. Check the state * of the socket and take the appropriate action. */ @@ -689,13 +689,13 @@ static void mca_btl_tcp2_endpoint_recv_handler(int sd, short flags, void* user) frag = btl_endpoint->endpoint_recv_frag; if(NULL == frag) { - if(mca_btl_tcp2_module.super.btl_max_send_size > - mca_btl_tcp2_module.super.btl_eager_limit) { + if(mca_btl_tcp2_module.super.btl_max_send_size > + mca_btl_tcp2_module.super.btl_eager_limit) { MCA_BTL_TCP_FRAG_ALLOC_MAX(frag); - } else { + } else { MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); } - + if(NULL == frag) { OPAL_THREAD_UNLOCK(&btl_endpoint->endpoint_recv_lock); return; diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.h index bfa01a14359..d9f66c5945b 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_endpoint.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.c b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.c index b65f22831d3..c46b0127c60 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.c +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.c @@ -5,22 +5,22 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * In windows, many of the socket functions return an EWOULDBLOCK * instead of \ things like EAGAIN, EINPROGRESS, etc. It has been * verified that this will \ not conflict with other error codes that - * are returned by these functions \ under UNIX/Linux environments + * are returned by these functions \ under UNIX/Linux environments */ #include "ompi_config.h" @@ -40,62 +40,62 @@ #include "opal/opal_socket_errno.h" #include "ompi/mca/btl/base/btl_base_error.h" -#include "btl_tcp2_frag.h" +#include "btl_tcp2_frag.h" #include "btl_tcp2_endpoint.h" -static void mca_btl_tcp2_frag_common_constructor(mca_btl_tcp2_frag_t* frag) -{ +static void mca_btl_tcp2_frag_common_constructor(mca_btl_tcp2_frag_t* frag) +{ frag->base.des_src = NULL; frag->base.des_src_cnt = 0; frag->base.des_dst = NULL; frag->base.des_dst_cnt = 0; } -static void mca_btl_tcp2_frag_eager_constructor(mca_btl_tcp2_frag_t* frag) -{ - frag->size = mca_btl_tcp2_module.super.btl_eager_limit; +static void mca_btl_tcp2_frag_eager_constructor(mca_btl_tcp2_frag_t* frag) +{ + frag->size = mca_btl_tcp2_module.super.btl_eager_limit; frag->my_list = &mca_btl_tcp2_component.tcp_frag_eager; - mca_btl_tcp2_frag_common_constructor(frag); + mca_btl_tcp2_frag_common_constructor(frag); } -static void mca_btl_tcp2_frag_max_constructor(mca_btl_tcp2_frag_t* frag) -{ - frag->size = mca_btl_tcp2_module.super.btl_max_send_size; +static void mca_btl_tcp2_frag_max_constructor(mca_btl_tcp2_frag_t* frag) +{ + frag->size = mca_btl_tcp2_module.super.btl_max_send_size; frag->my_list = &mca_btl_tcp2_component.tcp_frag_max; - mca_btl_tcp2_frag_common_constructor(frag); + mca_btl_tcp2_frag_common_constructor(frag); } -static void mca_btl_tcp2_frag_user_constructor(mca_btl_tcp2_frag_t* frag) -{ - frag->size = 0; +static void mca_btl_tcp2_frag_user_constructor(mca_btl_tcp2_frag_t* frag) +{ + frag->size = 0; frag->my_list = &mca_btl_tcp2_component.tcp_frag_user; - mca_btl_tcp2_frag_common_constructor(frag); + mca_btl_tcp2_frag_common_constructor(frag); } OBJ_CLASS_INSTANCE( - mca_btl_tcp2_frag_t, - mca_btl_base_descriptor_t, - NULL, - NULL); + mca_btl_tcp2_frag_t, + mca_btl_base_descriptor_t, + NULL, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_tcp2_frag_eager_t, - mca_btl_base_descriptor_t, - mca_btl_tcp2_frag_eager_constructor, - NULL); + mca_btl_tcp2_frag_eager_t, + mca_btl_base_descriptor_t, + mca_btl_tcp2_frag_eager_constructor, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_tcp2_frag_max_t, - mca_btl_base_descriptor_t, - mca_btl_tcp2_frag_max_constructor, - NULL); + mca_btl_tcp2_frag_max_t, + mca_btl_base_descriptor_t, + mca_btl_tcp2_frag_max_constructor, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_tcp2_frag_user_t, - mca_btl_base_descriptor_t, - mca_btl_tcp2_frag_user_constructor, - NULL); + mca_btl_tcp2_frag_user_t, + mca_btl_base_descriptor_t, + mca_btl_tcp2_frag_user_constructor, + NULL); bool mca_btl_tcp2_frag_send(mca_btl_tcp2_frag_t* frag, int sd) @@ -119,7 +119,7 @@ bool mca_btl_tcp2_frag_send(mca_btl_tcp2_frag_t* frag, int sd) mca_btl_tcp2_endpoint_close(frag->endpoint); return false; default: - BTL_ERROR(("mca_btl_tcp2_frag_send: writev failed: %s (%d)", + BTL_ERROR(("mca_btl_tcp2_frag_send: writev failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); mca_btl_tcp2_endpoint_close(frag->endpoint); @@ -185,7 +185,7 @@ bool mca_btl_tcp2_frag_recv(mca_btl_tcp2_frag_t* frag, int sd) * iovec for the caching in the fragment structure (the +1). */ frag->iov_ptr[num_vecs].iov_base = btl_endpoint->endpoint_cache_pos; - frag->iov_ptr[num_vecs].iov_len = + frag->iov_ptr[num_vecs].iov_len = mca_btl_tcp2_component.tcp_endpoint_cache - btl_endpoint->endpoint_cache_length; num_vecs++; #endif /* MCA_BTL_TCP_ENDPOINT_CACHE */ @@ -211,7 +211,7 @@ bool mca_btl_tcp2_frag_recv(mca_btl_tcp2_frag_t* frag, int sd) mca_btl_tcp2_endpoint_close(btl_endpoint); return false; default: - BTL_ERROR(("mca_btl_tcp2_frag_recv: readv failed: %s (%d)", + BTL_ERROR(("mca_btl_tcp2_frag_recv: readv failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); mca_btl_tcp2_endpoint_close(btl_endpoint); @@ -251,7 +251,7 @@ bool mca_btl_tcp2_frag_recv(mca_btl_tcp2_frag_t* frag, int sd) frag->iov[1].iov_len = frag->hdr.size; frag->iov_cnt++; #ifndef __sparc - /* The following cannot be done for sparc code + /* The following cannot be done for sparc code * because it causes alignment errors when accessing * structures later on in the btl and pml code. */ diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.h index 8d1d692b16c..2f8d78f9dd6 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_frag.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -34,7 +34,7 @@ #include #endif -#include "btl_tcp2.h" +#include "btl_tcp2.h" #include "btl_tcp2_hdr.h" BEGIN_C_DECLS @@ -45,33 +45,33 @@ BEGIN_C_DECLS * TCP fragment derived type. */ struct mca_btl_tcp2_frag_t { - mca_btl_base_descriptor_t base; - mca_btl_base_segment_t segments[2]; - struct mca_btl_base_endpoint_t *endpoint; + mca_btl_base_descriptor_t base; + mca_btl_base_segment_t segments[2]; + struct mca_btl_base_endpoint_t *endpoint; struct mca_btl_tcp2_module_t* btl; mca_btl_tcp2_hdr_t hdr; struct iovec iov[MCA_BTL_TCP_FRAG_IOVEC_NUMBER + 1]; struct iovec *iov_ptr; size_t iov_cnt; size_t iov_idx; - size_t size; + size_t size; int rc; ompi_free_list_t* my_list; -}; -typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_t; -OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_t); +}; +typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_t; +OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_t); -typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_eager_t; - -OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_eager_t); +typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_eager_t; -typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_max_t; - -OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_max_t); +OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_eager_t); -typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_user_t; - -OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_user_t); +typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_max_t; + +OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_max_t); + +typedef struct mca_btl_tcp2_frag_t mca_btl_tcp2_frag_user_t; + +OBJ_CLASS_DECLARATION(mca_btl_tcp2_frag_user_t); /* diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.c b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.c index 4fa38e3103a..9eba7e62057 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.c +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.c @@ -5,18 +5,18 @@ * 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, + * 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) 2006 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -25,7 +25,7 @@ #include "btl_tcp2.h" -#include "btl_tcp2_frag.h" +#include "btl_tcp2_frag.h" #include "btl_tcp2_proc.h" #include "btl_tcp2_endpoint.h" diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.h index 38bff62636b..1156e379fba 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_ft.h @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_hdr.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_hdr.h index 3036765055e..95110ecff77 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_hdr.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_hdr.h @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,7 +23,7 @@ #include "ompi_config.h" #include "ompi/mca/btl/base/base.h" -#include "btl_tcp2.h" +#include "btl_tcp2.h" BEGIN_C_DECLS @@ -39,9 +39,9 @@ struct mca_btl_tcp2_hdr_t { mca_btl_base_header_t base; uint8_t type; uint16_t count; - uint32_t size; -}; -typedef struct mca_btl_tcp2_hdr_t mca_btl_tcp2_hdr_t; + uint32_t size; +}; +typedef struct mca_btl_tcp2_hdr_t mca_btl_tcp2_hdr_t; #define MCA_BTL_TCP_HDR_HTON(hdr) \ do { \ diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.c b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.c index 61fc2b70219..15ae3a2c49c 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.c +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,9 +55,9 @@ static int max_assignment_cardinality; static enum mca_btl_tcp2_connection_quality **weights; static struct mca_btl_tcp2_addr_t ***best_addr; -OBJ_CLASS_INSTANCE( mca_btl_tcp2_proc_t, - opal_list_item_t, - mca_btl_tcp2_proc_construct, +OBJ_CLASS_INSTANCE( mca_btl_tcp2_proc_t, + opal_list_item_t, + mca_btl_tcp2_proc_construct, mca_btl_tcp2_proc_destruct ); void mca_btl_tcp2_proc_construct(mca_btl_tcp2_proc_t* tcp_proc) @@ -78,7 +78,7 @@ void mca_btl_tcp2_proc_destruct(mca_btl_tcp2_proc_t* tcp_proc) { /* remove from list of all proc instances */ OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock); - opal_proc_table_remove_value(&mca_btl_tcp2_component.tcp_procs, + opal_proc_table_remove_value(&mca_btl_tcp2_component.tcp_procs, tcp_proc->proc_ompi->proc_name); OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock); @@ -92,7 +92,7 @@ void mca_btl_tcp2_proc_destruct(mca_btl_tcp2_proc_t* tcp_proc) /* * Create a TCP process structure. There is a one-to-one correspondence * between a ompi_proc_t and a mca_btl_tcp2_proc_t instance. We cache - * additional data (specifically the list of mca_btl_tcp2_endpoint_t instances, + * additional data (specifically the list of mca_btl_tcp2_endpoint_t instances, * and published addresses) associated w/ a given destination on this * datastructure. */ @@ -104,7 +104,7 @@ mca_btl_tcp2_proc_t* mca_btl_tcp2_proc_create(ompi_proc_t* ompi_proc) mca_btl_tcp2_proc_t* btl_proc; OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock); - rc = opal_proc_table_get_value(&mca_btl_tcp2_component.tcp_procs, + rc = opal_proc_table_get_value(&mca_btl_tcp2_component.tcp_procs, ompi_proc->proc_name, (void**)&btl_proc); if(OMPI_SUCCESS == rc) { OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock); @@ -115,7 +115,7 @@ mca_btl_tcp2_proc_t* mca_btl_tcp2_proc_create(ompi_proc_t* ompi_proc) if(NULL == btl_proc) return NULL; btl_proc->proc_ompi = ompi_proc; - + /* add to hash table of all proc instance */ opal_proc_table_set_value(&mca_btl_tcp2_component.tcp_procs, ompi_proc->proc_name, btl_proc); @@ -333,12 +333,12 @@ static mca_btl_tcp2_interface_t** mca_btl_tcp2_retrieve_local_interfaces(void) continue; } - local_interfaces[local_kindex_to_index[kindex]]->ipv4_address = + local_interfaces[local_kindex_to_index[kindex]]->ipv4_address = (struct sockaddr_storage*) malloc(sizeof(local_addr)); - memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv4_address, + memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv4_address, &local_addr, sizeof(local_addr)); - opal_ifindextomask(idx, - &local_interfaces[local_kindex_to_index[kindex]]->ipv4_netmask, + opal_ifindextomask(idx, + &local_interfaces[local_kindex_to_index[kindex]]->ipv4_netmask, sizeof(int)); break; case AF_INET6: @@ -347,12 +347,12 @@ static mca_btl_tcp2_interface_t** mca_btl_tcp2_retrieve_local_interfaces(void) continue; } - local_interfaces[local_kindex_to_index[kindex]]->ipv6_address + local_interfaces[local_kindex_to_index[kindex]]->ipv6_address = (struct sockaddr_storage*) malloc(sizeof(local_addr)); - memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv6_address, + memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv6_address, &local_addr, sizeof(local_addr)); - opal_ifindextomask(idx, - &local_interfaces[local_kindex_to_index[kindex]]->ipv6_netmask, + opal_ifindextomask(idx, + &local_interfaces[local_kindex_to_index[kindex]]->ipv6_netmask, sizeof(int)); break; default: @@ -367,10 +367,10 @@ static mca_btl_tcp2_interface_t** mca_btl_tcp2_retrieve_local_interfaces(void) } /* * Note that this routine must be called with the lock on the process - * already held. Insert a btl instance into the proc array and assign + * already held. Insert a btl instance into the proc array and assign * it an address. */ -int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, +int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, mca_btl_base_endpoint_t* btl_endpoint ) { struct sockaddr_storage endpoint_addr_ss; @@ -436,10 +436,10 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, return OMPI_ERR_OUT_OF_RESOURCE; } peer_interfaces[index] = (mca_btl_tcp2_interface_t *) malloc(sizeof(mca_btl_tcp2_interface_t)); - mca_btl_tcp2_initialise_interface(peer_interfaces[index], + mca_btl_tcp2_initialise_interface(peer_interfaces[index], endpoint_addr->addr_ifkindex, index); - } - + } + /* * in case one of the peer addresses is already in use, * mark the complete peer interface as 'not available' @@ -452,13 +452,13 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, case AF_INET: peer_interfaces[index]->ipv4_address = (struct sockaddr_storage*) malloc(sizeof(endpoint_addr_ss)); peer_interfaces[index]->ipv4_endpoint_addr = endpoint_addr; - memcpy(peer_interfaces[index]->ipv4_address, + memcpy(peer_interfaces[index]->ipv4_address, &endpoint_addr_ss, sizeof(endpoint_addr_ss)); break; case AF_INET6: peer_interfaces[index]->ipv6_address = (struct sockaddr_storage*) malloc(sizeof(endpoint_addr_ss)); peer_interfaces[index]->ipv6_endpoint_addr = endpoint_addr; - memcpy(peer_interfaces[index]->ipv6_address, + memcpy(peer_interfaces[index]->ipv6_address, &endpoint_addr_ss, sizeof(endpoint_addr_ss)); break; default: @@ -472,7 +472,7 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, } /* - * assign weights to each possible pair of interfaces + * assign weights to each possible pair of interfaces */ perm_size = num_local_interfaces; @@ -482,7 +482,7 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, weights = (enum mca_btl_tcp2_connection_quality**) malloc(perm_size * sizeof(enum mca_btl_tcp2_connection_quality*)); - + best_addr = (mca_btl_tcp2_addr_t ***) malloc(perm_size * sizeof(mca_btl_tcp2_addr_t **)); for(i = 0; i < perm_size; ++i) { @@ -494,7 +494,7 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, sizeof(mca_btl_tcp2_addr_t *)); memset(best_addr[i], 0, perm_size * sizeof(mca_btl_tcp2_addr_t *)); } - + for(i=0; iproc_ompi->proc_hostname))) { /* No connection is possible on these interfaces */ - + /* check for RFC1918 */ } else if(opal_net_addr_isipv4public((struct sockaddr*) local_interfaces[i]->ipv4_address) - && opal_net_addr_isipv4public((struct sockaddr*) + && opal_net_addr_isipv4public((struct sockaddr*) peer_interfaces[j]->ipv4_address)) { if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv4_address, (struct sockaddr*) peer_interfaces[j]->ipv4_address, @@ -565,7 +565,7 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, weights[i][j] = CQ_PUBLIC_DIFFERENT_NETWORK; } best_addr[i][j] = peer_interfaces[j]->ipv6_endpoint_addr; - } + } } /* for each peer interface */ } /* for each local interface */ @@ -584,8 +584,8 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, /* Can only find the best set of connections when the number of * interfaces is not too big. When it gets larger, we fall back - * to a simpler and faster (and not as optimal) algorithm. - * See ticket https://svn.open-mpi.org/trac/ompi/ticket/2031 + * to a simpler and faster (and not as optimal) algorithm. + * See ticket https://svn.open-mpi.org/trac/ompi/ticket/2031 * for more details about this issue. */ if (perm_size <= MAX_PERMUTATION_INTERFACES) { memset(a, 0, perm_size * sizeof(int)); @@ -597,10 +597,10 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, for(i = 0; i < perm_size; ++i) { if(best_assignment[i] > num_peer_interfaces || weights[i][best_assignment[i]] == CQ_NO_CONNECTION - || peer_interfaces[best_assignment[i]]->inuse + || peer_interfaces[best_assignment[i]]->inuse || NULL == peer_interfaces[best_assignment[i]]) { continue; - } + } peer_interfaces[best_assignment[i]]->inuse++; btl_endpoint->endpoint_addr = best_addr[i][best_assignment[i]]; btl_endpoint->endpoint_addr->addr_inuse++; @@ -677,7 +677,7 @@ int mca_btl_tcp2_proc_insert( mca_btl_tcp2_proc_t* btl_proc, * Remove an endpoint from the proc array and indicate the address is * no longer in use. */ - + int mca_btl_tcp2_proc_remove(mca_btl_tcp2_proc_t* btl_proc, mca_btl_base_endpoint_t* btl_endpoint) { size_t i; @@ -712,7 +712,7 @@ mca_btl_tcp2_proc_t* mca_btl_tcp2_proc_lookup(const orte_process_name_t *name) { mca_btl_tcp2_proc_t* proc = NULL; OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock); - opal_proc_table_get_value(&mca_btl_tcp2_component.tcp_procs, + opal_proc_table_get_value(&mca_btl_tcp2_component.tcp_procs, name->proc_name, (void**)&proc); OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock); return proc; @@ -795,7 +795,7 @@ bool mca_btl_tcp2_proc_tosocks(mca_btl_tcp2_addr_t* proc_addr, opal_output( 0, "mca_btl_tcp2_proc: unknown af_family received: %d\n", proc_addr->addr_family ); return false; - } + } return true; } diff --git a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.h b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.h index 98f460841e8..be2f6b7a9c1 100644 --- a/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.h +++ b/contrib/build-mca-comps-outside-of-tree/btl_tcp2_proc.h @@ -5,16 +5,16 @@ * 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, + * 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 Oracle and/or its affiliates. All rights reserved * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,25 +37,25 @@ BEGIN_C_DECLS * BTL instance that attempts to open a connection to the process. */ struct mca_btl_tcp2_proc_t { - opal_list_item_t super; + opal_list_item_t super; /**< allow proc to be placed on a list */ - ompi_proc_t *proc_ompi; + ompi_proc_t *proc_ompi; /**< pointer to corresponding ompi_proc_t */ struct mca_btl_tcp2_addr_t* proc_addrs; /**< array of addresses exported by peer */ - size_t proc_addr_count; + size_t proc_addr_count; /**< number of addresses published by endpoint */ - struct mca_btl_base_endpoint_t **proc_endpoints; - /**< array of endpoints that have been created to access this proc */ + struct mca_btl_base_endpoint_t **proc_endpoints; + /**< array of endpoints that have been created to access this proc */ - size_t proc_endpoint_count; + size_t proc_endpoint_count; /**< number of endpoints */ - opal_mutex_t proc_lock; + opal_mutex_t proc_lock; /**< lock to protect against concurrent access to proc state */ }; typedef struct mca_btl_tcp2_proc_t mca_btl_tcp2_proc_t; @@ -97,7 +97,7 @@ typedef struct mca_btl_tcp2_interface_t mca_btl_tcp2_interface_t; * describes the quality of a possible connection between a local and * a remote network interface */ -enum mca_btl_tcp2_connection_quality { +enum mca_btl_tcp2_connection_quality { CQ_NO_CONNECTION, CQ_PRIVATE_DIFFERENT_NETWORK, CQ_PRIVATE_SAME_NETWORK, diff --git a/contrib/build-mca-comps-outside-of-tree/configure.ac b/contrib/build-mca-comps-outside-of-tree/configure.ac index 55f6005bee6..4eb35ba5114 100644 --- a/contrib/build-mca-comps-outside-of-tree/configure.ac +++ b/contrib/build-mca-comps-outside-of-tree/configure.ac @@ -6,21 +6,21 @@ # 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, +# 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-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # Normal Autotools setup stuff -AC_INIT([openmpi_btl_tcp2], [1.0.0], +AC_INIT([openmpi_btl_tcp2], [1.0.0], [http://example.com/help], [openmpi_btl_tcp2]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) @@ -178,9 +178,9 @@ AC_CHECK_FUNC([orte_show_help], [], # Check for types we need for this component AC_CHECK_HEADERS([netinet/in.h]) -AC_CHECK_TYPES([struct sockaddr_in], [], +AC_CHECK_TYPES([struct sockaddr_in], [], [AC_MSG_WARN([No struct sockaddr_in]) - AC_MSG_ERROR([Cannot continue])], + AC_MSG_ERROR([Cannot continue])], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include diff --git a/contrib/build-mca-comps-outside-of-tree/help-mpi-btl-tcp2.txt b/contrib/build-mca-comps-outside-of-tree/help-mpi-btl-tcp2.txt index a92b7fdf373..d7faf6a10e2 100644 --- a/contrib/build-mca-comps-outside-of-tree/help-mpi-btl-tcp2.txt +++ b/contrib/build-mca-comps-outside-of-tree/help-mpi-btl-tcp2.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's TCP support diff --git a/contrib/code_counter.pl b/contrib/code_counter.pl index 3ad124674ce..e0518d9cfa8 100755 --- a/contrib/code_counter.pl +++ b/contrib/code_counter.pl @@ -6,15 +6,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # Primitive script to give approximate code counts in the Open MPI tree @@ -97,7 +97,7 @@ sub wanted { # Do we want this dir? for (my $i = 0; $i <= $#skip_dirs; ++$i) { - if ($skip_dirs[$i] eq $dir || + if ($skip_dirs[$i] eq $dir || ($is_dir && $skip_dirs[$i] eq $file)) { print("Skipping dir: $File::Find::dir / $file\n") if ($verbose); diff --git a/contrib/dist/linux/README b/contrib/dist/linux/README index b3b79157f8b..5e08c84ead8 100644 --- a/contrib/dist/linux/README +++ b/contrib/dist/linux/README @@ -4,7 +4,7 @@ Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana Copyright (c) 2004-2006 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. -Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, +Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. Copyright (c) 2004-2006 The Regents of the University of California. All rights reserved. diff --git a/contrib/dist/linux/README.ompi-spec-generator b/contrib/dist/linux/README.ompi-spec-generator index d9d78e6ac8f..4ccdcd12576 100644 --- a/contrib/dist/linux/README.ompi-spec-generator +++ b/contrib/dist/linux/README.ompi-spec-generator @@ -30,7 +30,7 @@ following format: e.g. openmpi-btl-mvapi-1.2a1r10877Mmvapi_4.1.0-1.x86_64.rpm -Package Description File +Package Description File ======================== Package description files a simple INI files with the suffix @@ -57,7 +57,7 @@ This summary will be the summary of the RPM. -- description The description will become the description of the RPM. --- type +-- type Specified the type of the package -- license @@ -66,7 +66,7 @@ The license of the RPM. (default : BSD) -- group The group where this package belongs to. (default = Development/Libraries) --- version +-- version The version field specifies a command that is executed during the RPM build process to obtain the version number of the package. This command is executed after the source code has been configured, diff --git a/contrib/dist/linux/buildrpm.sh b/contrib/dist/linux/buildrpm.sh index c3ab6ac2abd..b84732fc1fb 100755 --- a/contrib/dist/linux/buildrpm.sh +++ b/contrib/dist/linux/buildrpm.sh @@ -4,7 +4,7 @@ # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. -# +# # # General config vars @@ -95,7 +95,7 @@ echo "--> Found specfile: $specfile" rpmtopdir=${rpmtopdir:-"`grep %_topdir $HOME/.rpmmacros | awk '{ print $2 }'`"} if test "$rpmtopdir" != ""; then - rpmbuild_options="$rpmbuild_options --define '_topdir $rpmtopdir'" + rpmbuild_options="$rpmbuild_options --define '_topdir $rpmtopdir'" if test ! -d "$rpmtopdir"; then mkdir -p "$rpmtopdir" mkdir -p "$rpmtopdir/BUILD" diff --git a/contrib/dist/linux/ompi-spec-generator.py b/contrib/dist/linux/ompi-spec-generator.py index 7c1ba781c0e..5e34cc2914e 100755 --- a/contrib/dist/linux/ompi-spec-generator.py +++ b/contrib/dist/linux/ompi-spec-generator.py @@ -6,14 +6,14 @@ import optparse import ConfigParser - + ###################################################################### # global stuff ###################################################################### configext = ".package" # the name of the configurations files configfiles = [] # list with all found config files params = 0 # contains the cmd line options -packages = {} # directory for packages +packages = {} # directory for packages options = ["name", "type", "license", "summary", "files", "version", "description", "group", "vendor", "requires"] shell_cmds = {} compilers = { "default" : {"compiler":"default", @@ -69,7 +69,7 @@ fi done done -if [ $BUILD_PACKAGE == 1 ] ; then +if [ $BUILD_PACKAGE == 1 ] ; then eval export OMPI_PACKAGE_VERSION=`%(version)s` rpmbuild %(mode)s --define \'_topdir %%_topdir\' --define \'build_%(name)s 1\' --define \'build_default 0\' --define \"ompi_package_version $OMPI_PACKAGE_VERSION\" %%{ompi_specfile} fi @@ -95,7 +95,7 @@ # -# fix configure +# fix configure # %%define _prefix %%{ompi_prefix} %%define _sysconfdir %%{_prefix}/etc @@ -154,10 +154,10 @@ %%clean -%%files +%%files %%defattr(-,root,root,-) -%%endif +%%endif """ @@ -169,7 +169,7 @@ # ###################################################################### %%if %%{build_install} -Summary: Install a already compiled tree +Summary: Install a already compiled tree Name: %%{ompi_name_prefix}%%{ompi_name} Version: %%{ompi_version} Release: %%{ompi_release} @@ -196,7 +196,7 @@ # # create a module file on request # -if [ %(modulefile_condition)s ] ; then +if [ %(modulefile_condition)s ] ; then %%{__mkdir_p} $RPM_BUILD_ROOT/%(modulefile_path)s/%%{ompi_name}/ cat <$RPM_BUILD_ROOT/%(modulefile_path)s/%%{ompi_name}/%%{ompi_version} #%%Module @@ -270,10 +270,10 @@ %%clean -%%files +%%files %%defattr(-,root,root,-) -%%endif +%%endif """ @@ -329,11 +329,11 @@ default_template = """ ###################################################################### # -# default +# default # ###################################################################### %%if %%{build_default} -Summary: Open MPI +Summary: Open MPI Name: %%{ompi_name_prefix}%%{ompi_name} Version: %%{ompi_version}%%{ompi_extra_version} Release: %%{ompi_release} @@ -454,13 +454,13 @@ def __init__(self, name): name_prefix = params.ompi_name_prefix self.options[option] = name_prefix + params.ompi_name + " >= " + params.ompi_version else: - self.options[option] = None + self.options[option] = None def getOption(self, option): if option in self.options.keys(): return self.options[option] else: - return None + return None def setOption(self, option, value): if ( option == "files" ): @@ -497,11 +497,11 @@ def get_package(name): if not (name in packages.keys()): packages[name] = Package(name) return packages[name] - + ###################################################################### # -# verbose output +# verbose output # ###################################################################### def verbose(msg): @@ -511,7 +511,7 @@ def verbose(msg): ###################################################################### # -# debug output +# debug output # ###################################################################### def debug(msg): @@ -521,7 +521,7 @@ def debug(msg): ###################################################################### # -# error output +# error output # ###################################################################### def error(msg): @@ -530,7 +530,7 @@ def error(msg): ###################################################################### # -# error output +# error output # ###################################################################### def get_compiler(name): @@ -667,7 +667,7 @@ def write_specfile(build_packages): specfile.write(package_template % package_params); # create build command build_cmds += build_command_template % {"files":package_params["installed_files"], "default":"0", "name":package_params["name"], "mode":"-bb", "version":package_params["version"]} - + verbose(" Create build section") specfile.write(build_template % {"ompi_prefix":params.ompi_prefix}) @@ -686,11 +686,11 @@ def write_specfile(build_packages): else: inst_params["profile_condition"] = "1 == 0" specfile.write(install_template % inst_params) - + verbose(" Create default section") default_params = { "build_cmds": build_cmds, "version":params.ompi_version} specfile.write(default_template % default_params) - + verbose(" Write changelog") specfile.write(changelog) @@ -777,11 +777,11 @@ def main(): if params.interactive: shell() return - + # filter packages print "--> Select packages" build_packages = [] - # filter packages + # filter packages if params.packages != None: verbose(" Apply user profided packages list : " + params.packages); user_packages = params.packages.split(',') @@ -807,7 +807,7 @@ def main(): # done print "--> Finished." - + if ("__main__" == __name__): main() diff --git a/contrib/dist/linux/openmpi-switcher-modulefile.spec b/contrib/dist/linux/openmpi-switcher-modulefile.spec index 04a4574effe..5e5a50a41db 100644 --- a/contrib/dist/linux/openmpi-switcher-modulefile.spec +++ b/contrib/dist/linux/openmpi-switcher-modulefile.spec @@ -1,12 +1,12 @@ -# +# # Copyright (c) 2006 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ ############################################################################# @@ -57,7 +57,7 @@ Requires: %__rm %__mkdir %__sed %__mv %__chmod %__chown Requires: modules-oscar Requires: env-switcher -%description +%description This RPM is used to install a Open MPI-installation-agnostic modulefile that is used to automatically select which Open MPI diff --git a/contrib/dist/linux/openmpi-switcher-modulefile.tcl b/contrib/dist/linux/openmpi-switcher-modulefile.tcl index df65db6c479..3a029ad9c18 100644 --- a/contrib/dist/linux/openmpi-switcher-modulefile.tcl +++ b/contrib/dist/linux/openmpi-switcher-modulefile.tcl @@ -5,9 +5,9 @@ # Corporation. All rights reserved. # Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # This modulefile is a dispatcher for other Open MPI modulefiles. It diff --git a/contrib/dist/linux/openmpi.spec b/contrib/dist/linux/openmpi.spec index cc6707c63ce..aacbbfc64a5 100644 --- a/contrib/dist/linux/openmpi.spec +++ b/contrib/dist/linux/openmpi.spec @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # ############################################################################ @@ -625,7 +625,7 @@ mv tmp.files docs.files cd /tmp # Remove installed driver after rpm build finished -rm -rf $RPM_BUILD_DIR/%{name}-%{version} +rm -rf $RPM_BUILD_DIR/%{name}-%{version} test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT @@ -662,7 +662,7 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %if %{build_all_in_one_rpm} # -# All in one RPM +# All in one RPM # # Easy; just list the prefix and then specifically call out the doc # files. diff --git a/contrib/dist/macosx-pkg/ReadMe.rtf b/contrib/dist/macosx-pkg/ReadMe.rtf index 91b8d0d2c61..82969cc7528 100644 --- a/contrib/dist/macosx-pkg/ReadMe.rtf +++ b/contrib/dist/macosx-pkg/ReadMe.rtf @@ -31,4 +31,4 @@ Please see the Open MPI web page for help with Open MPI, especially the frequent \cf0 http://www.open-mpi.org/faq/\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \cf0 \ -If this does not answer your question, further help is available via our mailing list at users@open-mpi.org} \ No newline at end of file +If this does not answer your question, further help is available via our mailing list at users@open-mpi.org} diff --git a/contrib/dist/macosx-pkg/buildpackage.sh b/contrib/dist/macosx-pkg/buildpackage.sh index 7dbd66c38c0..dc0f0b01bc7 100755 --- a/contrib/dist/macosx-pkg/buildpackage.sh +++ b/contrib/dist/macosx-pkg/buildpackage.sh @@ -1,10 +1,10 @@ #!/bin/bash -# Copyright (c) 2001-2006 The Trustees of Indiana University. +# Copyright (c) 2001-2006 The Trustees of Indiana University. # All rights reserved. # Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights -# reserved. -# +# reserved. +# # This file is part of the Open MPI software package. For license # information, see the LICENSE file in the top level directory of the # Open MPI source distribution. @@ -32,7 +32,7 @@ OMPI_PACKAGE="openmpi" OMPI_PREFIX="/usr/local/" OMPI_OPTIONS="--disable-mpi-f77 --without-cs-fs --enable-mca-no-build=ras-slurm,pls-slurm,gpr-null,sds-pipe,sds-slurm,pml-cm NM=\"nm -p\"" OMPI_OSX_README="ReadMe.rtf" -# note - if want XGrid support, make sure that a cocoa-supported +# note - if want XGrid support, make sure that a cocoa-supported # architecture appears first on the list. Otherwise, we won't # lipo that component and it will be dropped OPAL_ARCH_LIST="ppc ppc64 i386 x86_64" @@ -186,7 +186,7 @@ for arch in $OPAL_ARCH_LIST ; do # # Run configure - # + # cd $builddir config="$srcdir/configure CFLAGS=\"-arch $arch -isysroot $OMPI_SDK\" CXXFLAGS=\"-arch $arch -isysroot $OMPI_SDK\" OBJCFLAGS=\"-arch $arch -isysroot $OMPI_SDK\" --prefix=$OMPI_PREFIX $OMPI_OPTIONS --build=$build_arch --host=$host_arch" echo "--> Running configure: $config" @@ -274,7 +274,7 @@ print_arch_if() { exit 1 ;; esac -} +} # Set arch to the first arch in the list. Go through the for loop, # although we'll break out at the end of the first time through. Look diff --git a/contrib/dist/make-html-man-pages.pl b/contrib/dist/make-html-man-pages.pl index 27c6aaf3713..31de66ed6a6 100755 --- a/contrib/dist/make-html-man-pages.pl +++ b/contrib/dist/make-html-man-pages.pl @@ -204,7 +204,7 @@ sub doit { if (3 == $section && $name =~ /^MPI_/) { $meta_name = uc($name); } - + # Now we're left with what we want. Output the PHP page. # Write the output PHP file with our own header and footer, # suitable for www.open-mpi.org. @@ -269,7 +269,7 @@ sub doit { # Print the top-level engine file for this version (it will use the # data-.inc file). open(FILE, ">$outdir_base/index.php") || die "Can't open $outdir_base/index.php"; -print FILE ') { - + #open the file and delete the occurence - + $file_name = $_; - + open (FILE, "$file_name") || print "Could not open $file_name for reading\n"; - + while () { if (/$search_string/) { print $file_name; diff --git a/contrib/find_offenders.pl b/contrib/find_offenders.pl index 839e1a6361e..ec21ade0897 100755 --- a/contrib/find_offenders.pl +++ b/contrib/find_offenders.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # @@ -37,7 +37,7 @@ $file_name = $_; open(FILE, "find . -name $file_name |") || print "find failed\n"; while() { - #file is found + #file is found print DANGER_FILES "#include <$file_name>\n"; } close (FILE); @@ -61,14 +61,14 @@ open(C_FILE, "$c_file") || print "Could not open $_\n"; while () { if (/$header/) { - print OFFENSIVE $header ." --> ". $c_file ; + print OFFENSIVE $header ." --> ". $c_file ; } } close (C_FILE); } close (C_FILES); - + open(H_FILES, "find . -name *.h |") || print "Could not complete find command\n"; while () { @@ -76,7 +76,7 @@ open(H_FILE, "$h_file") || print "Could not open $_\n"; while () { if (/$header/) { - print OFFENSIVE $header ." --> ". $h_file ; + print OFFENSIVE $header ." --> ". $h_file ; } } close (H_FILE); diff --git a/contrib/fix_headers.pl b/contrib/fix_headers.pl index 33c4b8b14fc..c2527678f5d 100755 --- a/contrib/fix_headers.pl +++ b/contrib/fix_headers.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # @@ -48,7 +48,7 @@ $protection = "HAVE_" . $protection; print $protection; - + $string_to_replace = "#ifdef $protection$_#endif\n"; print $string_to_replace; @@ -70,7 +70,7 @@ } } close (C_FILE); - if ($protected == 0) { + if ($protected == 0) { #this file is not yet protected open(C_FILE, "$c_file") || print "Open failed on $c_file\n"; open(TEMP, "> $temp_file") || print "Open failed on temp.c \n"; @@ -113,7 +113,7 @@ } } close (H_FILE); - if ($protected == 0) { + if ($protected == 0) { #this file is not yet protected open(H_FILE, "$h_file") || print "Open failed on $h_file\n"; open(TEMP, "> $temp_file") || print "Open failed on temp.c \n"; diff --git a/contrib/fix_indent.pl b/contrib/fix_indent.pl index 895aa5e7569..d0c13586783 100755 --- a/contrib/fix_indent.pl +++ b/contrib/fix_indent.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # #To keep brian happy diff --git a/contrib/gen_stats.pl b/contrib/gen_stats.pl index 17485ecec8a..82252196633 100755 --- a/contrib/gen_stats.pl +++ b/contrib/gen_stats.pl @@ -3,16 +3,16 @@ # Currently, we implement only the directory option # The following features have been requested for # -# 1. Get the name of the directory and produce a +# 1. Get the name of the directory and produce a # statistic for all the files which have been touched -# in all the subdirectories starting from that +# in all the subdirectories starting from that # directory # # 2. Since gcov spits out a statistic for all the header -# files included by all the source files, we need to +# files included by all the source files, we need to # aggregate them somehow into a single file. This might # have to be done manually by going through all the lines -# which have been executed in that file since a header +# which have been executed in that file since a header # file may have multiple inclusions meaning that they # might have multiple .gcov files in different directories # @@ -54,25 +54,25 @@ # process the arguments while($num_args > 0) { switch ($ARGV[$index]) { - case "-d" { + case "-d" { print DIR_FILE $ARGV[$index+1]; $index += 2; - $num_args -= 2; + $num_args -= 2; $dir_list_given = 1; } - case "-f" { + case "-f" { my $filename = `find . -name $ARGV[$index+1]`; print REQ_FILE $filename; $index += 2; - $num_args -= 2; + $num_args -= 2; $req_list_given = 1; } - case "-p" { + case "-p" { $percentage = $ARGV[$index]; $index += 2; - $num_args -= 2; + $num_args -= 2; } - else { + else { print "ERROR: Incorrect command line option\n"; exit(3); } @@ -95,14 +95,14 @@ get_file_list("./dir_list.txt", "touched_files.txt", "untouched_files.txt"); - + generate_stats("touched_files.txt", # file_list "coverage_stats.txt",# generic coverage numbers "percent_stats.txt", # files below a certain % $percentage, # percentage below which we report 1); # 1 to report } - + if (1 == $req_list_given) { generate_stats("req_list.txt", # file_list "req_stats.txt",# generic coverage @@ -118,7 +118,7 @@ sub get_file_list { print "ERROR: could not open directory listing\n"; exit(3); } - + while() { chomp(); my $c_files = `find $_ -name \"*.c\"`; @@ -128,7 +128,7 @@ sub get_file_list { $c_files =~ s/\.c//g; $c_files = $c_files . $cc_files; my @C_FILES = split(/\n/, $c_files); - + my $da_files = `find $_ -name \"*.da\" -o -name \"*.gcda\"`; $da_files =~ s/\.gcda//g; $da_files =~ s/\.da//g; @@ -140,12 +140,12 @@ sub get_file_list { print TEMP2 $da_files; close(TEMP1); close(TEMP2); - - # Now do the manual diff + + # Now do the manual diff open(TEMP1, "< temp1"); open(UNTOUCHED_FILES, ">> $untouched"); open(TOUCHED_FILES, ">> $touched"); - + while() { my $c_file = $_; my $found = 0; @@ -183,7 +183,7 @@ sub get_file_list { system("sort $touched -o temp; uniq temp $touched"); system("sort $untouched -o temp; uniq temp $untouched"); } - + # This is the function which generates the statistics and dumps it out # to a file. Details are pretty straightforward at this point @@ -192,7 +192,7 @@ sub generate_stats { my $k = 0; my $l = 0; - open (INPUT, "< $input_file"); + open (INPUT, "< $input_file"); open (COVERAGE, "> $coverage_file"); if ($calculate == 1) { open (PERCENT, "> percent_coverage.txt"); @@ -200,7 +200,7 @@ sub generate_stats { print COVERAGE "#Index Directory Filename Usage(%)\n"; print COVERAGE "#======================================================================================================\n"; - + if ($calculate == 1) { print PERCENT "#Index Directory Filename Usage(%)\n"; print PERCENT "#======================================================================================================\n"; @@ -216,7 +216,7 @@ sub generate_stats { #1. Get the directory name and filename seperately #2. Invoke gcov on the file #3. Print the statistic onto a file - + chomp(); my $full_name = $_; my $dir_name; @@ -229,7 +229,7 @@ sub generate_stats { open(RESULT, "cd $dir_name; gcov $file_gcda -o .libs 2> /dev/null | "); while () { - if (/Creating/) { $found_file = 0; } + if (/Creating/) { $found_file = 0; } else { # print "check: ", $_; # Do not check including the file_extension; might be .c or .cc or .C @@ -242,12 +242,12 @@ sub generate_stats { if (/^Lines/ && $found_file == 1) { # print "Found Lines:\n", $_; s/([\s,0-9]*\.[0-9]+\%)\.*/$1/; - my $val = $1; + my $val = $1; $average += $val; $k++; my $print_string = sprintf("%4d %40s %40s %3.2f\n", $k, $dir_name, $file_name, $val); if ($calculate == 1) { - if ($val <= $percentage) { + if ($val <= $percentage) { $l++; my $zero_string = sprintf("%4d %40s %40s %3.2f\n", $l, $dir_name, $file_name, $val); print PERCENT $zero_string; @@ -258,7 +258,7 @@ sub generate_stats { # Need to detect the next round $found_file = 0; } - } + } } close(RESULT); } diff --git a/contrib/generate_file_list.pl b/contrib/generate_file_list.pl index be166f8c74e..4737f87205e 100755 --- a/contrib/generate_file_list.pl +++ b/contrib/generate_file_list.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/contrib/git/build-gitignore.pl b/contrib/git/build-gitignore.pl index 57371b37252..3f7a0f86e45 100755 --- a/contrib/git/build-gitignore.pl +++ b/contrib/git/build-gitignore.pl @@ -5,7 +5,7 @@ # $COPYRIGHT$ # # Dumb script to run through all the svn:ignore's in the tree and -# build build .gitignore files for Git. +# build build .gitignore files for Git. use strict; @@ -62,7 +62,7 @@ close(IN); } } - + foreach my $val (@git) { print OUT "$val\n"; } @@ -92,7 +92,7 @@ static-components.h *\\\#/; unshift(@globals, "# Automatically generated by build-gitignore.pl; edits may be lost!"); - + # add the globals */ foreach my $val (@globals) { @@ -142,7 +142,7 @@ sub process { chomp; push(@git, $_); } - + close(IN); } @@ -166,7 +166,7 @@ sub process { last; } } - next + next if ($skip); push(@git, "$line"); @@ -182,7 +182,7 @@ sub process { } } - + # Now find subdirectories in this directory my @entries; opendir(DIR, $dir) || die "Cannot open directory \"$dir\" for reading: $!"; diff --git a/contrib/git/update-git-svn.sh b/contrib/git/update-git-svn.sh index 845398f75ce..c8d84ca9693 100755 --- a/contrib/git/update-git-svn.sh +++ b/contrib/git/update-git-svn.sh @@ -96,7 +96,7 @@ doit $GIT18 push $force $github_url :trunk if [ -d $local_fs_git_mirror ]; then - for repo in ompi.git ompi-replication.git; do + for repo in ompi.git ompi-replication.git; do if [ -d $local_fs_git_mirror/$repo ]; then doit $GIT18 push $force $local_fs_git_mirror/$repo '*:*' doit $GIT18 push $force $local_fs_git_mirror/$repo :trunk diff --git a/contrib/header_replacement.sh b/contrib/header_replacement.sh index 7cebe5ae5bc..1bf873143fa 100755 --- a/contrib/header_replacement.sh +++ b/contrib/header_replacement.sh @@ -12,7 +12,7 @@ # All rights reserved. # Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. # -# orte_show_help_replacement.sh Script to detect occurences of +# orte_show_help_replacement.sh Script to detect occurences of # #include "orte/util/show_help.h", where actually either # 1. #include "opal/util/output.h" # 2. #include "orte/mca/rml/rml_types.h" diff --git a/contrib/infrastructure/README-setup-github-diff-emails.txt b/contrib/infrastructure/README-setup-github-diff-emails.txt index 738de6b1d48..c5ad447722f 100644 --- a/contrib/infrastructure/README-setup-github-diff-emails.txt +++ b/contrib/infrastructure/README-setup-github-diff-emails.txt @@ -31,13 +31,13 @@ Still in that same config file, add a line in the remote "email" section: Now exit the editor and remove the tracking branch of the origin: - git branch -d -r origin/HEAD + git branch -d -r origin/HEAD IF YOU SCREW UP AND "push" to the email remote before deleting the origin/HEAD tracking branch, then run the "git branch -d ..." and the following (both in the original repo, not the bare repo): - git push email :refs/heads/HEAD + git push email :refs/heads/HEAD Copy the hooks/post-receive script from any of the other bare repos to the hooks subdir in this bare repo (e.g., from diff --git a/contrib/infrastructure/crontab-mpiteam-at-lion.crest.iu.edu b/contrib/infrastructure/crontab-mpiteam-at-lion.crest.iu.edu index 8aef2f6692f..ce10cc1d2b0 100644 --- a/contrib/infrastructure/crontab-mpiteam-at-lion.crest.iu.edu +++ b/contrib/infrastructure/crontab-mpiteam-at-lion.crest.iu.edu @@ -1,7 +1,7 @@ ######################### # Update the OSL FT webpage # -# Everyday @ 1:00 am +# Everyday @ 1:00 am # 0 1 * * * (cd /l/osl/www/www.osl.iu.edu/research/ft && svn up ) 1> /dev/null 2> /dev/null ######################### diff --git a/contrib/nightly/reports/check_devel_headers.pl b/contrib/nightly/reports/check_devel_headers.pl index 0b14cef51cf..3e647de8d18 100755 --- a/contrib/nightly/reports/check_devel_headers.pl +++ b/contrib/nightly/reports/check_devel_headers.pl @@ -6,15 +6,15 @@ # 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, +# 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) 2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # Check headers in the core opal, orte, and ompi trees and ensure that @@ -52,10 +52,10 @@ } sub wanted { - # don't process directories or links, and dont' recurse down + # don't process directories or links, and dont' recurse down # "special" directories if ( -l $_ ) { return; } - if ( -d $_ ) { + if ( -d $_ ) { if ((/\.svn/) || (/\.deps/) || (/\.libs/)) { $File::Find::prune = 1; } @@ -82,7 +82,7 @@ sub wanted { } else { return; } - } + } # We don't want any of the tools headers elsif ($parts[1] eq "tools") { return; diff --git a/contrib/nightly/reports/illegal_symbols_report.pl b/contrib/nightly/reports/illegal_symbols_report.pl index 94166d9fa2b..e8c44930bdd 100755 --- a/contrib/nightly/reports/illegal_symbols_report.pl +++ b/contrib/nightly/reports/illegal_symbols_report.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # # Look for public symbols in Open MPI libraries and components that @@ -130,7 +130,7 @@ sub check_files { # Only look for symbols that are a) global [i.e., # uppercase scope], b) not U, V, or W - if ($scope =~ /[A-Z]/ && + if ($scope =~ /[A-Z]/ && $scope !~ /[UVW]/ && $symbol !~ /^_/) { @@ -206,7 +206,7 @@ sub mail_symbols { print $mail " --> $symbol->{symbol}\n"; } } - + } print $mail "\n"; } @@ -309,7 +309,7 @@ sub mail_symbols { if ($$bad_libsymbols) { mail_symbols($bad_libsymbols, *MAIL{IO}); } - + print MAIL "\nYour friendly server,\nCyrador\n"; close MAIL; } diff --git a/contrib/ompi_branch_check_revisions-v1.5.txt b/contrib/ompi_branch_check_revisions-v1.5.txt index ca475a328f7..2837e719e38 100644 --- a/contrib/ompi_branch_check_revisions-v1.5.txt +++ b/contrib/ompi_branch_check_revisions-v1.5.txt @@ -1,5 +1,5 @@ # -# Input file for script ompi_branch_check_revisions.sh +# Input file for script ompi_branch_check_revisions.sh # here for the v1.5 branch # # Contains optional notes for revisions, about: diff --git a/contrib/openmpi-valgrind.supp b/contrib/openmpi-valgrind.supp index 46e9bfc4e9b..0a3ba945658 100644 --- a/contrib/openmpi-valgrind.supp +++ b/contrib/openmpi-valgrind.supp @@ -6,14 +6,14 @@ # 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, +# 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$ # @@ -67,7 +67,7 @@ # ############################################################### -# inet_ntoa on linux mallocs a static buffer. We can't free +# inet_ntoa on linux mallocs a static buffer. We can't free # it, so we have to live with it { linux_inet_ntoa diff --git a/contrib/platform/embedded/build_embedded.sh b/contrib/platform/embedded/build_embedded.sh index c2e05249391..e07c79ff911 100755 --- a/contrib/platform/embedded/build_embedded.sh +++ b/contrib/platform/embedded/build_embedded.sh @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#! /usr/bin/env bash # if (( $# < 2 )) ; then diff --git a/contrib/platform/embedded/gen_embedded.sh b/contrib/platform/embedded/gen_embedded.sh index 45f5e913e1d..9f35cfb8d94 100755 --- a/contrib/platform/embedded/gen_embedded.sh +++ b/contrib/platform/embedded/gen_embedded.sh @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#! /usr/bin/env bash # if (( $# < 2 )) ; then diff --git a/contrib/platform/hadoop/cisco.conf b/contrib/platform/hadoop/cisco.conf index 3af96eeaddf..27a5caba7fd 100644 --- a/contrib/platform/hadoop/cisco.conf +++ b/contrib/platform/hadoop/cisco.conf @@ -1,9 +1,9 @@ # # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -49,7 +49,7 @@ # # Basic behavior to smooth startup -orte_abort_timeout = 10 +orte_abort_timeout = 10 opal_set_max_sys_limits = 1 ## Add the interface for out-of-band communication diff --git a/contrib/platform/hadoop/linux.conf b/contrib/platform/hadoop/linux.conf index 3af96eeaddf..27a5caba7fd 100644 --- a/contrib/platform/hadoop/linux.conf +++ b/contrib/platform/hadoop/linux.conf @@ -1,9 +1,9 @@ # # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -49,7 +49,7 @@ # # Basic behavior to smooth startup -orte_abort_timeout = 10 +orte_abort_timeout = 10 opal_set_max_sys_limits = 1 ## Add the interface for out-of-band communication diff --git a/contrib/platform/hadoop/mac.conf b/contrib/platform/hadoop/mac.conf index 1630024e29c..60d86a4ca7c 100644 --- a/contrib/platform/hadoop/mac.conf +++ b/contrib/platform/hadoop/mac.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,7 +60,7 @@ # Basic behavior to smooth startup mca_component_show_load_errors = 0 -orte_abort_timeout = 10 +orte_abort_timeout = 10 ## Add the interface for out-of-band communication ## and set it up diff --git a/contrib/platform/ibm/debug-power6-gcc b/contrib/platform/ibm/debug-power6-gcc index 8f5fbcdf35f..81c3651a053 100644 --- a/contrib/platform/ibm/debug-power6-gcc +++ b/contrib/platform/ibm/debug-power6-gcc @@ -4,8 +4,8 @@ enable_debug=yes enable_mem_profile=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr -CXXFLAGS="-m64 -mcpu=power6 -mtune=power6 -O0 -g3 -ggdb" +with_verbs=/usr +CXXFLAGS="-m64 -mcpu=power6 -mtune=power6 -O0 -g3 -ggdb" CCASFLAGS="-m64 -mcpu=power6 -mtune=power6 -O0 -g3 -ggdb" FCFLAGS="-m64 -mcpu=power6 -mtune=power6 -O0 -g3 -ggdb" CFLAGS="-m64 -mcpu=power6 -mtune=power6 -O0 -g3 -ggdb" diff --git a/contrib/platform/ibm/debug-power7-gcc b/contrib/platform/ibm/debug-power7-gcc index 20ac4c5353c..d4e0f828e12 100644 --- a/contrib/platform/ibm/debug-power7-gcc +++ b/contrib/platform/ibm/debug-power7-gcc @@ -4,8 +4,8 @@ enable_debug=yes enable_mem_profile=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr -CXXFLAGS="-m64 -mcpu=power7 -mtune=power7 -O0 -g3 -ggdb" +with_verbs=/usr +CXXFLAGS="-m64 -mcpu=power7 -mtune=power7 -O0 -g3 -ggdb" CCASFLAGS="-m64 -mcpu=power7 -mtune=power7 -O0 -g3 -ggdb" FCFLAGS="-m64 -mcpu=power7 -mtune=power7 -O0 -g3 -ggdb" CFLAGS="-m64 -mcpu=power7 -mtune=power7 -O0 -g3 -ggdb" diff --git a/contrib/platform/ibm/debug-ppc32-gcc b/contrib/platform/ibm/debug-ppc32-gcc index 8b082e28af9..dc5e70e0d92 100644 --- a/contrib/platform/ibm/debug-ppc32-gcc +++ b/contrib/platform/ibm/debug-ppc32-gcc @@ -4,8 +4,8 @@ enable_debug=yes enable_mem_profile=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr -CXXFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" +with_verbs=/usr +CXXFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" CCASFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" FCFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" CFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" diff --git a/contrib/platform/ibm/debug-ppc64-gcc b/contrib/platform/ibm/debug-ppc64-gcc index b93d9cc35a1..07ad2acecf0 100644 --- a/contrib/platform/ibm/debug-ppc64-gcc +++ b/contrib/platform/ibm/debug-ppc64-gcc @@ -4,8 +4,8 @@ enable_debug=yes enable_mem_profile=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr -CXXFLAGS="-m64 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" +with_verbs=/usr +CXXFLAGS="-m64 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" CCASFLAGS="-m64 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" FCFLAGS="-m64 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" CFLAGS="-m64 -mcpu=powerpc64 -mtune=powerpc64 -O0 -g3 -ggdb" diff --git a/contrib/platform/ibm/optimized-power6-gcc b/contrib/platform/ibm/optimized-power6-gcc index 38645a4b468..23c8643a16a 100644 --- a/contrib/platform/ibm/optimized-power6-gcc +++ b/contrib/platform/ibm/optimized-power6-gcc @@ -3,10 +3,10 @@ enable_mem_profile=no enable_debug=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr +with_verbs=/usr enable_shared=yes enable_static=no -CXXFLAGS="-m64 -mcpu=power6 -mtune=power6 -O3" +CXXFLAGS="-m64 -mcpu=power6 -mtune=power6 -O3" CCASFLAGS="-m64 -mcpu=power6 -mtune=power6 -O3" FCFLAGS="-m64 -mcpu=power6 -mtune=power6 -O3" CFLAGS="-m64 -mcpu=power6 -mtune=power6 -O3" diff --git a/contrib/platform/ibm/optimized-power7-gcc b/contrib/platform/ibm/optimized-power7-gcc index d554d86a30b..89615e96355 100644 --- a/contrib/platform/ibm/optimized-power7-gcc +++ b/contrib/platform/ibm/optimized-power7-gcc @@ -3,10 +3,10 @@ enable_mem_profile=no enable_debug=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr +with_verbs=/usr enable_shared=yes enable_static=no -CXXFLAGS="-m64 -mcpu=power7 -mtune=power7 -O3" +CXXFLAGS="-m64 -mcpu=power7 -mtune=power7 -O3" CCASFLAGS="-m64 -mcpu=power7 -mtune=power7 -O3" FCFLAGS="-m64 -mcpu=power7 -mtune=power7 -O3" CFLAGS="-m64 -mcpu=power7 -mtune=power7 -O3" diff --git a/contrib/platform/ibm/optimized-ppc32-gcc b/contrib/platform/ibm/optimized-ppc32-gcc index a41f6c74115..beabe18930a 100644 --- a/contrib/platform/ibm/optimized-ppc32-gcc +++ b/contrib/platform/ibm/optimized-ppc32-gcc @@ -3,10 +3,10 @@ enable_mem_profile=no enable_debug=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr +with_verbs=/usr enable_shared=yes enable_static=no -CXXFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O3" +CXXFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O3" CCASFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O3" FCFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O3" CFLAGS="-m32 -mcpu=powerpc64 -mtune=powerpc64 -O3" diff --git a/contrib/platform/ibm/optimized-ppc64-gcc b/contrib/platform/ibm/optimized-ppc64-gcc index 62e40fb773a..54aba5e0ab7 100644 --- a/contrib/platform/ibm/optimized-ppc64-gcc +++ b/contrib/platform/ibm/optimized-ppc64-gcc @@ -3,7 +3,7 @@ enable_mem_profile=no enable_debug=no enable_contrib_no_build=libnbc enable_ft_thread=no -with_verbs=/usr +with_verbs=/usr enable_shared=yes enable_static=no CXXFLAGS="-m64 -mcpu=powerpc64 -mtune=powerpc64 -O3" diff --git a/contrib/platform/intel/bend/linux-optimized.conf b/contrib/platform/intel/bend/linux-optimized.conf index 4264a402376..f3ec12ddcb8 100644 --- a/contrib/platform/intel/bend/linux-optimized.conf +++ b/contrib/platform/intel/bend/linux-optimized.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,18 +60,18 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 1 -orte_abort_timeout = 10 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/intel/bend/linux-orcm.conf b/contrib/platform/intel/bend/linux-orcm.conf index 1f5150c2be1..63889a7093f 100644 --- a/contrib/platform/intel/bend/linux-orcm.conf +++ b/contrib/platform/intel/bend/linux-orcm.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -65,19 +65,19 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 1 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/intel/bend/linux.conf b/contrib/platform/intel/bend/linux.conf index 1f5150c2be1..63889a7093f 100644 --- a/contrib/platform/intel/bend/linux.conf +++ b/contrib/platform/intel/bend/linux.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -65,19 +65,19 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 1 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/intel/bend/mac-optimized.conf b/contrib/platform/intel/bend/mac-optimized.conf index 851342ef538..d3ed4f556d2 100644 --- a/contrib/platform/intel/bend/mac-optimized.conf +++ b/contrib/platform/intel/bend/mac-optimized.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,19 +60,19 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 0 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/intel/bend/mac-orcm.conf b/contrib/platform/intel/bend/mac-orcm.conf index 3d25f512863..90ad4d5cb28 100644 --- a/contrib/platform/intel/bend/mac-orcm.conf +++ b/contrib/platform/intel/bend/mac-orcm.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,19 +60,19 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 1 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/intel/bend/mac.conf b/contrib/platform/intel/bend/mac.conf index 3d25f512863..90ad4d5cb28 100644 --- a/contrib/platform/intel/bend/mac.conf +++ b/contrib/platform/intel/bend/mac.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,19 +60,19 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 1 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/iu/odin/debug-nopmi.conf b/contrib/platform/iu/odin/debug-nopmi.conf index 2116035dff2..a509ae11214 100644 --- a/contrib/platform/iu/odin/debug-nopmi.conf +++ b/contrib/platform/iu/odin/debug-nopmi.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,20 +60,20 @@ # Basic behavior to smooth startup mca_component_show_load_errors = 0 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -oob_tcp_disable_family = IPv6 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +oob_tcp_disable_family = IPv6 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,tcp,self +btl = sm,tcp,self ## Setup shared memory btl_sm_free_list_max = 768 diff --git a/contrib/platform/iu/odin/debug.conf b/contrib/platform/iu/odin/debug.conf index 1d92d661018..43fbf4b825e 100644 --- a/contrib/platform/iu/odin/debug.conf +++ b/contrib/platform/iu/odin/debug.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,19 +60,19 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 1 -orte_abort_timeout = 10 +orte_abort_timeout = 10 hwloc_base_mem_bind_failure_action = silent ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -oob_tcp_disable_family = IPv6 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +oob_tcp_disable_family = IPv6 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,openib,self +btl = sm,openib,self btl_openib_cpc_include = udcm ## Setup shared memory diff --git a/contrib/platform/iu/odin/optimized.conf b/contrib/platform/iu/odin/optimized.conf index 81f63b2ba2a..4b40fb0e6a1 100644 --- a/contrib/platform/iu/odin/optimized.conf +++ b/contrib/platform/iu/odin/optimized.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,33 +60,33 @@ # Basic behavior to smooth startup mca_base_component_show_load_errors = 0 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -oob_tcp_disable_family = IPv6 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +oob_tcp_disable_family = IPv6 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,openib,self +btl = sm,openib,self #mpi_leave_pinned = 1 ## Setup shared memory btl_sm_free_list_max = 768 ## Setup OpenIB -btl_openib_want_fork_support = 0 -#btl_openib_receive_queues = P,128,256,64,32,32:S,2048,1024,128,32:S,12288,1024,128,32:S,65536,1024,128,32 +btl_openib_want_fork_support = 0 +#btl_openib_receive_queues = P,128,256,64,32,32:S,2048,1024,128,32:S,12288,1024,128,32:S,65536,1024,128,32 ## Setup TCP btl_tcp_if_include = ib0 ## Configure the PML pml_ob1_use_early_completion = 0 - -## Enable cpu affinity -opal_paffinity_alone = 1 + +## Enable cpu affinity +opal_paffinity_alone = 1 diff --git a/contrib/platform/iu/odin/static.conf b/contrib/platform/iu/odin/static.conf index 7a21290b253..757c5323009 100644 --- a/contrib/platform/iu/odin/static.conf +++ b/contrib/platform/iu/odin/static.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -60,33 +60,33 @@ # Basic behavior to smooth startup mca_component_show_load_errors = 0 -mpi_param_check = 0 -orte_abort_timeout = 10 +mpi_param_check = 0 +orte_abort_timeout = 10 ## Protect the shared file systems ## Add the interface for out-of-band communication ## and set it up -oob_tcp_peer_retries = 120 -oob_tcp_disable_family = IPv6 -#oob_tcp_connect_timeout=600 +oob_tcp_peer_retries = 120 +oob_tcp_disable_family = IPv6 +#oob_tcp_connect_timeout=600 ## Define the MPI interconnects -btl = sm,openib,self +btl = sm,openib,self #mpi_leave_pinned = 1 ## Setup shared memory btl_sm_free_list_max = 768 ## Setup OpenIB -btl_openib_want_fork_support = 0 -#btl_openib_receive_queues = P,128,256,64,32,32:S,2048,1024,128,32:S,12288,1024,128,32:S,65536,1024,128,32 +btl_openib_want_fork_support = 0 +#btl_openib_receive_queues = P,128,256,64,32,32:S,2048,1024,128,32:S,12288,1024,128,32:S,65536,1024,128,32 ## Setup TCP btl_tcp_if_include = ib0 ## Configure the PML pml_ob1_use_early_completion = 0 - -## Enable cpu affinity -opal_paffinity_alone = 1 + +## Enable cpu affinity +opal_paffinity_alone = 1 diff --git a/contrib/platform/lanl/cray_xe6/debug-lustre.conf b/contrib/platform/lanl/cray_xe6/debug-lustre.conf index 48435536b4f..2cdc8ebc552 100644 --- a/contrib/platform/lanl/cray_xe6/debug-lustre.conf +++ b/contrib/platform/lanl/cray_xe6/debug-lustre.conf @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2011 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -95,8 +95,8 @@ oob_tcp_rcvbuf = 32768 ## Define the MPI interconnects btl = self,vader,ugni -## Enable cpu affinity -hwloc_base_binding_policy = core +## Enable cpu affinity +hwloc_base_binding_policy = core ## Setup MPI options mpi_show_handle_leaks = 1 diff --git a/contrib/platform/lanl/cray_xe6/intel-common b/contrib/platform/lanl/cray_xe6/intel-common index 0ce2f3f17f1..caf7ca0136d 100644 --- a/contrib/platform/lanl/cray_xe6/intel-common +++ b/contrib/platform/lanl/cray_xe6/intel-common @@ -12,4 +12,4 @@ CFLAGS="$CFLAGS -msse3" CXXFLAGS="$CXXFLAGS -msse3" CC=icc CXX=icpc -FTN=ifort \ No newline at end of file +FTN=ifort diff --git a/contrib/platform/lanl/cray_xe6/optimized-lustre.conf b/contrib/platform/lanl/cray_xe6/optimized-lustre.conf index 460561d0375..18c11fc99a4 100644 --- a/contrib/platform/lanl/cray_xe6/optimized-lustre.conf +++ b/contrib/platform/lanl/cray_xe6/optimized-lustre.conf @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2011 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -95,11 +95,11 @@ oob_tcp_rcvbuf = 32768 ## Define the MPI interconnects btl = self,vader,ugni -## Setup Gemini +## Setup Gemini # TODO LANL -## Enable cpu affinity -hwloc_base_binding_policy = core +## Enable cpu affinity +hwloc_base_binding_policy = core ## Setup MPI options mpi_show_handle_leaks = 1 diff --git a/contrib/platform/lanl/mac.conf b/contrib/platform/lanl/mac.conf index 5f23b5e4db2..6f2c90116fc 100644 --- a/contrib/platform/lanl/mac.conf +++ b/contrib/platform/lanl/mac.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/platform/lanl/macosx-dynamic-java.conf b/contrib/platform/lanl/macosx-dynamic-java.conf index 280a6848c35..c888e678047 100644 --- a/contrib/platform/lanl/macosx-dynamic-java.conf +++ b/contrib/platform/lanl/macosx-dynamic-java.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/platform/lanl/macosx-dynamic-optimized.conf b/contrib/platform/lanl/macosx-dynamic-optimized.conf index a94ec8eb83d..8482886f157 100644 --- a/contrib/platform/lanl/macosx-dynamic-optimized.conf +++ b/contrib/platform/lanl/macosx-dynamic-optimized.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/platform/lanl/macosx-dynamic.conf b/contrib/platform/lanl/macosx-dynamic.conf index 18dd7f64438..60efd784870 100644 --- a/contrib/platform/lanl/macosx-dynamic.conf +++ b/contrib/platform/lanl/macosx-dynamic.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/platform/lanl/macosx-static-leopard.conf b/contrib/platform/lanl/macosx-static-leopard.conf index a94ec8eb83d..8482886f157 100644 --- a/contrib/platform/lanl/macosx-static-leopard.conf +++ b/contrib/platform/lanl/macosx-static-leopard.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/platform/mellanox/optimized.conf b/contrib/platform/mellanox/optimized.conf index aa1d58c92f1..d74b6ad98b4 100644 --- a/contrib/platform/mellanox/optimized.conf +++ b/contrib/platform/mellanox/optimized.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/platform/ornl/ornl_configure.gnu b/contrib/platform/ornl/ornl_configure.gnu index c78026dce5d..2ca4852b06e 100755 --- a/contrib/platform/ornl/ornl_configure.gnu +++ b/contrib/platform/ornl/ornl_configure.gnu @@ -1,5 +1,5 @@ -#!/bin/bash -# change the following for install path, note +#!/bin/bash +# change the following for install path, note # that VER is appended to the path. VER="trunk" SW_INSTALL_ROOT=/tmp/work/gshipman/ompi/install @@ -8,8 +8,8 @@ PLATFORM=ornl/cray_xt_cnl_romio ORTED_MAKEFILE=orte/tools/orted/Makefile -if test -z "`grep "orted_LDFLAGS =.*-all-static" ${ORTED_MAKEFILE}`"; then - echo "WARNING: patching ${ORTED_MAKEFILE} to build it static" +if test -z "`grep "orted_LDFLAGS =.*-all-static" ${ORTED_MAKEFILE}`"; then + echo "WARNING: patching ${ORTED_MAKEFILE} to build it static" sed -i 's/orted_LDFLAGS =/orted_LDFLAGS = -all-static/g' ${ORTED_MAKEFILE} fi diff --git a/contrib/scaling/Makefile.include b/contrib/scaling/Makefile.include index 1e2c738bb32..6dfe24515e4 100644 --- a/contrib/scaling/Makefile.include +++ b/contrib/scaling/Makefile.include @@ -2,9 +2,9 @@ # # Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/contrib/scaling/orte_no_op.c b/contrib/scaling/orte_no_op.c index a96c94b66ff..ea85f5a0f24 100644 --- a/contrib/scaling/orte_no_op.c +++ b/contrib/scaling/orte_no_op.c @@ -15,7 +15,7 @@ int main(int argc, char* argv[]) fprintf(stderr, "Failed orte_init\n"); exit(1); } - + if (ORTE_SUCCESS != orte_finalize()) { fprintf(stderr, "Failed orte_finalize\n"); exit(1); diff --git a/contrib/search_compare.pl b/contrib/search_compare.pl index f0d9bfa8701..c4f06e24489 100755 --- a/contrib/search_compare.pl +++ b/contrib/search_compare.pl @@ -6,15 +6,15 @@ # 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, +# 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) 2013 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -42,13 +42,13 @@ my $cmd; sub construct { - # don't process directories or links, and dont' recurse down + # don't process directories or links, and dont' recurse down # "special" directories if ( -l $_ ) { return; } - if ( -d $_ ) { + if ( -d $_ ) { if ((/\.deps/) || (/\.libs/) || (/\.git/) || (/\.dSYM/) || ($_ eq "autom4te.cache") || ($_ eq "libltdl")) { $File::Find::prune = true; - } + } return; } diff --git a/contrib/search_replace.pl b/contrib/search_replace.pl index 96f07ddce0f..3d23c63848c 100755 --- a/contrib/search_replace.pl +++ b/contrib/search_replace.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # @@ -31,10 +31,10 @@ print "replace: $replace_string\n"; sub replace { - # don't process directories or links, and dont' recurse down + # don't process directories or links, and dont' recurse down # "special" directories if ( -l $_ ) { return; } - if ( -d $_ ) { + if ( -d $_ ) { if ((/\.svn/) || (/\.deps/) || (/\.libs/) || (/\.hg/) || (/\.git/) || (/autom4te\.cache/)) { $File::Find::prune = true; } @@ -48,7 +48,7 @@ sub replace { print "--> $File::Find::name\n"; my $replace = 0; - open(INFILE, $process_file) || + open(INFILE, $process_file) || die "Could not open " . $File::Find::name . ": $!\n"; open(OUTFILE, "> " . $process_file . ".tmp") || die "Could not open " . $File::Find::name . ".tmp: $!\n"; diff --git a/contrib/spread/spread.conf b/contrib/spread/spread.conf index 79d7fd60929..25c1381a3d8 100644 --- a/contrib/spread/spread.conf +++ b/contrib/spread/spread.conf @@ -1,12 +1,12 @@ # Blank lines are permitted in this file. # spread.conf sample file -# +# # questions to spread@spread.org # #MINIMAL REQUIRED FILE # -# Spread should work fine on one machine with just the uncommented +# Spread should work fine on one machine with just the uncommented # lines below. The rest of the file documents all the options and # more complex network setups. # @@ -24,34 +24,34 @@ Spread_Segment 192.168.203.255:4803 { # Spread options #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- -#Set what internal Spread events are logged to the screen or file +#Set what internal Spread events are logged to the screen or file # (see EventLogFile). -# Default setting is to enable PRINT and EXIT events only. +# Default setting is to enable PRINT and EXIT events only. #The PRINT and EXIT types should always be enabled. The names of others are: -# EXIT PRINT DEBUG DATA_LINK NETWORK PROTOCOL SESSION -# CONFIGURATION MEMBERSHIP FLOW_CONTROL STATUS EVENTS -# GROUPS MEMORY SKIPLIST ALL NONE -# ALL and NONE are special and represent either enabling every type +# EXIT PRINT DEBUG DATA_LINK NETWORK PROTOCOL SESSION +# CONFIGURATION MEMBERSHIP FLOW_CONTROL STATUS EVENTS +# GROUPS MEMORY SKIPLIST ALL NONE +# ALL and NONE are special and represent either enabling every type # or enabling none of them. -# You can also use a "!" sign to negate a type, +# You can also use a "!" sign to negate a type, # so { ALL !DATA_LINK } means log all events except data_link ones. #DebugFlags = { PRINT EXIT } DebugFlags = { ALL } # Set priority level of events to output to log file or screen -# The possible levels are: +# The possible levels are: # pDEBUG INFO WARNING ERROR CRITICAL FATAL # Once selected all events tagged with that priority or higher will -# be output. FATAL events are always output and cause the daemon to +# be output. FATAL events are always output and cause the daemon to # shut down. Some Events are tagged with a priority of PRINT which -# causes them to print out no matter what priority level is set. +# causes them to print out no matter what priority level is set. # # The default level used if nothing is set is INFO. - + #EventPriority = INFO -#Set whether to log to a file as opposed to stdout/stderr and what +#Set whether to log to a file as opposed to stdout/stderr and what # file to log to. # Default is to log to stdout. # @@ -59,7 +59,7 @@ DebugFlags = { ALL } #If option is set then logging is to the filename specified. # The filename can include a %h or %H escape that will be replaced at runtime # by the hostname of the machine upon which the daemon is running. -# For example "EventLogFile = spreadlog_%h.log" with 2 machines +# For example "EventLogFile = spreadlog_%h.log" with 2 machines # running Spread (machine1.mydomain.com and machine2.mydomain.com) will # cause the daemons to log to "spreadlog_machine1.mydomain.com.log" and # "spreadlog_machine2.mydomain.com.log" respectively. @@ -81,16 +81,16 @@ EventLogFile = spread_%h.log EventTimeStamp = "[%a %d %b %Y %H:%M:%S]" #Set whether to add a precise (microsecond) resolution timestamp to all logged -# events or not. This option requires that EventTimeStamp is also enabled. +# events or not. This option requires that EventTimeStamp is also enabled. # If the option is commented out then the microsecond timestamp is not added # If the option is uncommented then a microsecond time will print in addition -# to the H:M:S resolution timestamp provided by EventTimeStamp. +# to the H:M:S resolution timestamp provided by EventTimeStamp. #EventPreciseTimeStamp # Set to initialize daemon sequence numbers to a 'large' number for testing # this is purely a debugging capability and should never be enabled on -# production systems (note one side effect of enabling this is that +# production systems (note one side effect of enabling this is that # your system will experience an extra daemon membership every few messages # so you REALLY do not want this turned on) # If you want to change the initial value the sequence number is set to @@ -99,12 +99,12 @@ EventTimeStamp = "[%a %d %b %Y %H:%M:%S]" #DebugInitialSequence -#Set whether to allow dangerous monitor commands +#Set whether to allow dangerous monitor commands # like "partition, flow_control, or kill" # Default setting is FALSE. -#If option is set to false then only "safe" monitor commands are allowed +#If option is set to false then only "safe" monitor commands are allowed # (such as requesting a status update). -#If option is set to true then all monitor commands are enabled. +#If option is set to true then all monitor commands are enabled. # THIS IS A SECURTIY RISK IF YOUR NETWORK IS NOT PROTECTED! #DangerousMonitor = false @@ -123,9 +123,9 @@ DangerousMonitor = true #SocketPortReuse = AUTO #Set what the maximum per-session queue should be for messages before disconnecting -# a session. Spread will buffer upto that number of messages that are destined to the -# session, but that can not be delivered currently because the session is not reading fast enough. -# The compiled in default is usually 1000 if you havn't changed it in the spread_params.h file. +# a session. Spread will buffer upto that number of messages that are destined to the +# session, but that can not be delivered currently because the session is not reading fast enough. +# The compiled in default is usually 1000 if you havn't changed it in the spread_params.h file. #MaxSessionMessages = 5000 MaxSessionMessages = 5000 @@ -178,7 +178,7 @@ MaxSessionMessages = 5000 #Spread_Segment 127.0.0.255:4803 { -# either a name or IP address. If both are given, than the name is taken +# either a name or IP address. If both are given, than the name is taken # as-is, and the IP address is used for that name. # localhost 127.0.0.1 @@ -208,10 +208,10 @@ MaxSessionMessages = 5000 # Multi-homed host setup # -# If you run Spread on hosts with multiple interfaces you may want to +# If you run Spread on hosts with multiple interfaces you may want to # control which interfaces Spread uses for client connections and for # the daemon-to-daemon (and monitor control) messages. This can be done -# by adding an extra stanza to each configured machine. +# by adding an extra stanza to each configured machine. # #Sample: # @@ -237,6 +237,6 @@ MaxSessionMessages = 5000 # explicitly configure ALL interfaces you want as Spread removes all defaults when # you use the explicit notation. # The third multihomed3 host uses a shorthand form of omitting the D or C option and -# just listening for all types of traffic and events on both the 192.168.0 and 1.2.3 -# networks. If no letter is listed before the interface address then ALL types of +# just listening for all types of traffic and events on both the 192.168.0 and 1.2.3 +# networks. If no letter is listed before the interface address then ALL types of # events are handled on that interface. diff --git a/contrib/submit_test.pl b/contrib/submit_test.pl index e0a39e86f4c..4ba7f4ea507 100755 --- a/contrib/submit_test.pl +++ b/contrib/submit_test.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # @@ -42,7 +42,7 @@ sub download { my $req = HTTP::Request->new(GET => $uri); my $res = $ua->request($req); if ($res->is_success()) { - open(FILE, ">$file") || + open(FILE, ">$file") || die("ERROR: Could not write to $file"); print FILE $res->content; close(FILE); @@ -50,7 +50,7 @@ sub download { print "Error retrieving URL: $uri\n"; die $res->message; } - + # Find the fields and prompts in the config files my @prompts; @@ -83,7 +83,7 @@ sub download { while () { my $line = $_; chomp($line); - if (length($line) > 0 && + if (length($line) > 0 && ! ($line =~ /^[ \t]+$/) && ! ($line =~ /^[ \t]*#/)) { my @vals = split(/:/, $line); @@ -142,7 +142,7 @@ sub do_menu { printf("%d. %s\n", $j + 1, $keys[$j]); } print "\n$$prompts[$i] (1-" . ($#keys + 1) . "): "; - + my $input = ; print "\n"; chomp($input); @@ -150,7 +150,7 @@ sub do_menu { print "Please enter a valid selection\n"; next; } - + push(@config, $keys[$input - 1]); $level = $level->{$keys[$input - 1]}; } @@ -189,7 +189,7 @@ sub do_question { sub do_yn { my ($q, $default) = @_; - my $input = do_question($q, $default, + my $input = do_question($q, $default, sub { my ($line) = @_; lc($line) eq "y" || lc($line) eq "n"; }); lc($input); } @@ -198,7 +198,7 @@ sub do_yn { sub do_int { my ($q, $default) = @_; - do_question($q, $default, + do_question($q, $default, sub { my ($line) = @_; $line >= 0; }); } diff --git a/contrib/test_headers_in_ompi.pl b/contrib/test_headers_in_ompi.pl index 860189c05b9..16595e1f01a 100755 --- a/contrib/test_headers_in_ompi.pl +++ b/contrib/test_headers_in_ompi.pl @@ -6,14 +6,14 @@ # 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, +# 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$ # @@ -42,9 +42,9 @@ # this file is used to extract which header files are included in a particular # source file. Kind of a neat implementation sub get_header_files { - + local($dump_file) = @_; - + open(C_FILES, "find $source_tree -name \*.c |") || print "could not find source files\n"; open(H_FILES, "find $source_tree -name \*.c |") || print "could not find header files\n"; @@ -86,7 +86,7 @@ sub get_header_files { } -#this simply constructs the header file list from dump and dump_pl and then checks whether all the +#this simply constructs the header file list from dump and dump_pl and then checks whether all the #header files are present sub parse_header_files { @@ -114,7 +114,7 @@ sub parse_header_files { s/^\s*//; #remove anything after <*.h> s/>{1,1}.*\n/>\n/; - #remove anything before #include + #remove anything before #include s/^.*#include/#include/; print TEMP $_; } @@ -141,7 +141,7 @@ sub test_for_headers { while(

) { print $_; - + #create the file for compilation chomp $_; $string = " @@ -151,15 +151,15 @@ sub test_for_headers { int main(int argc, char **argv) { return 0; } - + "; - + open(TEMP, "> $temp") || print "Could not open $temp for writing\n"; print TEMP $string; close(TEMP); - + $compiled = system("$CC $temp"); - + if ($compiled == 0) { print "$_ is present\n"; } else { diff --git a/contrib/update-my-copyright.pl b/contrib/update-my-copyright.pl index fb46bc9e951..e962184bd9d 100755 --- a/contrib/update-my-copyright.pl +++ b/contrib/update-my-copyright.pl @@ -4,7 +4,7 @@ # $COPYRIGHT$ # -# Short version: +# Short version: # # This script automates the tedious task of updating copyright notices # in the tops of OMPI/ORTE/OPAL source files before committing back to @@ -35,7 +35,7 @@ # # NOTE: this script currently doesn't handle multi-line copyright # statements, such as: -# +# # Copyright (c) 2010 University of Blabbityblah and the Trustees of # Schblitbittyboo. All rights reserved. # diff --git a/contrib/whitespace-purge.sh b/contrib/whitespace-purge.sh new file mode 100755 index 00000000000..729c27549ca --- /dev/null +++ b/contrib/whitespace-purge.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Copyright (c) 2015 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Los Alamos National Security, LLC. All rights +# reserved +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +for file in $(git ls-files) ; do + # check for the mime-type and do not follow symbolic links. this + # will cause file to print application/x-symlink for the mime-type + # allowing us to only have to check if the type is application to + # skip sym links, pdfs, etc. If any other file types should be + # skipped add the check here. + type=$(file -b --mime-type -h $file) + if test ${type::4} == "text" ; then + LC_ALL=C sed -i '' -E "s/[[:space:]]*$//" $file + fi +done diff --git a/examples/Hello.java b/examples/Hello.java index eba78c23815..4f2ac4cfb15 100644 --- a/examples/Hello.java +++ b/examples/Hello.java @@ -23,17 +23,17 @@ */ import mpi.*; - + class Hello { static public void main(String[] args) throws MPIException { - + MPI.Init(args); int myrank = MPI.COMM_WORLD.getRank(); int size = MPI.COMM_WORLD.getSize() ; System.out.println("Hello world from rank " + myrank + " of " + size); - + MPI.Finalize(); } } diff --git a/examples/Makefile b/examples/Makefile index 83b5d2fc53a..372ca32d19e 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -5,7 +5,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2013 Mellanox Technologies, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/examples/Makefile.include b/examples/Makefile.include index ad40e4f25e1..2ac1d873cba 100644 --- a/examples/Makefile.include +++ b/examples/Makefile.include @@ -6,7 +6,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2013 Mellanox Technologies, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/examples/Ring.java b/examples/Ring.java index 5309d3cb5cc..08cd864663e 100644 --- a/examples/Ring.java +++ b/examples/Ring.java @@ -5,16 +5,16 @@ */ import mpi.* ; - + class Ring { static public void main(String[] args) throws MPIException { - - + + MPI.Init(args) ; - + int source; // Rank of sender - int dest; // Rank of receiver - int tag=50; // Tag for messages + int dest; // Rank of receiver + int tag=50; // Tag for messages int next; int prev; int message[] = new int [1]; @@ -36,8 +36,8 @@ static public void main(String[] args) throws MPIException { if (0 == myrank) { message[0] = 10; - System.out.println("Process 0 sending " + message[0] + " to rank " + next + " (" + size + " processes in ring)"); - MPI.COMM_WORLD.send(message, 1, MPI.INT, next, tag); + System.out.println("Process 0 sending " + message[0] + " to rank " + next + " (" + size + " processes in ring)"); + MPI.COMM_WORLD.send(message, 1, MPI.INT, next, tag); } /* Pass the message around the ring. The exit mechanism works as @@ -69,7 +69,7 @@ static public void main(String[] args) throws MPIException { if (0 == myrank) { MPI.COMM_WORLD.recv(message, 1, MPI.INT, prev, tag); } - + MPI.Finalize(); } } diff --git a/examples/connectivity_c.c b/examples/connectivity_c.c index f52c8a301a2..14f3f546d53 100644 --- a/examples/connectivity_c.c +++ b/examples/connectivity_c.c @@ -37,7 +37,7 @@ main(int argc, char **argv) if (MPI_SUCCESS != MPI_Get_processor_name(name, &length)) { strcpy(name, "unknown"); } - + if (argc>1 && strcmp(argv[1], "-v")==0) verbose = 1; diff --git a/examples/dtrace/Makefile b/examples/dtrace/Makefile index 16156913510..bcd544f9a88 100644 --- a/examples/dtrace/Makefile +++ b/examples/dtrace/Makefile @@ -3,9 +3,9 @@ # Use is subject to license terms. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/examples/dtrace/README b/examples/dtrace/README index f023fb46ed0..8df35acca8a 100644 --- a/examples/dtrace/README +++ b/examples/dtrace/README @@ -2,17 +2,17 @@ Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. This document discusses how to use the Solaris Dynamic Tracing utility (DTrace) -with Open MPI. DTrace is a comprehensive dynamic tracing utility that you can -use to monitor the behavior of applications programs as well as the operating -system itself. You can use DTrace on live production systems to understand +with Open MPI. DTrace is a comprehensive dynamic tracing utility that you can +use to monitor the behavior of applications programs as well as the operating +system itself. You can use DTrace on live production systems to understand those systems' behavior and to track down any problems that might be occurring. -The D language is the programming language used to create the source code for +The D language is the programming language used to create the source code for DTrace programs. -The material in this chapter assumes knowledge of the D language and how to -use DTrace. For more information about the D language and DTrace, refer to -the Solaris Dynamic Tracing Guide (Part Number 817-6223). This guide is part +The material in this chapter assumes knowledge of the D language and how to +use DTrace. For more information about the D language and DTrace, refer to +the Solaris Dynamic Tracing Guide (Part Number 817-6223). This guide is part of the Solaris 10 OS Software Developer Collection. Solaris 10 OS documentation can be found on the web at the following location: @@ -21,7 +21,7 @@ http://www.sun.com/documentation Follow these links to the Solaris Dynamic Tracing Guide: -Solaris Operating Systems -> Solaris 10 -> Solaris 10 Software Developer +Solaris Operating Systems -> Solaris 10 -> Solaris 10 Software Developer Collection Note: The sample program mpicommleak and other sample scripts are located at: @@ -37,7 +37,7 @@ The following topics are covered in this chapter: 1. mpirun Privileges -Before you run a program under DTrace, you need to make sure that you have the +Before you run a program under DTrace, you need to make sure that you have the correct mpirun privileges. In order to run the script under mpirun, make sure that you have dtrace_proc and @@ -50,12 +50,12 @@ To determine whether you have the appropriate privileges on the entire cluster, perform the following steps: 1. Use your favorite text editor to create the following shell script. - + myppriv.sh: - #!/bin/sh - # myppriv.sh - run ppriv under a shell so you can get the privileges - # of the process that mprun creates + #!/bin/sh + # myppriv.sh - run ppriv under a shell so you can get the privileges + # of the process that mprun creates ppriv $$ 2. Type the following command but replace the hostnames in the example with the @@ -64,77 +64,77 @@ perform the following steps: % mpirun -np 2 --host burl-ct-v440-4,burl-ct-v440-5 myppriv.sh -If the output of ppriv shows that the E privilege set has the dtrace -privileges, then you will be able to run dtrace under mpirun (see the two +If the output of ppriv shows that the E privilege set has the dtrace +privileges, then you will be able to run dtrace under mpirun (see the two examples below). Otherwise, you will need to adjust your system to get dtrace access. This example shows the ppriv output when the privileges have not been set: -% ppriv $$ -4084: -csh -flags = - E: basic - I: basic - P: basic +% ppriv $$ +4084: -csh +flags = + E: basic + I: basic + P: basic L: all This example shows ppriv output when the privileges have been set: -% ppriv $$ -2075: tcsh -flags = - E:basic,dtrace_proc,dtrace_user - I:basic,dtrace_proc,dtrace_user - P:basic,dtrace_proc,dtrace_user +% ppriv $$ +2075: tcsh +flags = + E:basic,dtrace_proc,dtrace_user + I:basic,dtrace_proc,dtrace_user + P:basic,dtrace_proc,dtrace_user L: all -NOTE: To update your privileges, ask your system administrator to add the -dtrace_user and dtrace_proc privileges to your account in the /etc/user_attr +NOTE: To update your privileges, ask your system administrator to add the +dtrace_user and dtrace_proc privileges to your account in the /etc/user_attr file. -After the privileges have been changed, you can rerun the myppriv.sh script to +After the privileges have been changed, you can rerun the myppriv.sh script to view the changed privileges. 2. Running DTrace with MPI Programs There are two ways to use Dynamic Tracing with MPI programs: - - Run the MPI program directly under DTrace, or + - Run the MPI program directly under DTrace, or - Attach DTrace to a running MPI program 2.1 Running an MPI Program Under DTrace -For illustration purposes, assume you have a program named mpiapp. To trace +For illustration purposes, assume you have a program named mpiapp. To trace the program mpiapp using the mpitrace.d script, type the following command: % mpirun -np 4 dtrace -s mpitrace.d -c mpiapp -The advantage of tracing an MPI program in this way is that all the processes -in the job will be traced from the beginning. This method is probably most -useful in doing performance measurements, when you need to start at the -beginning of an application and you need all the processes in a job to +The advantage of tracing an MPI program in this way is that all the processes +in the job will be traced from the beginning. This method is probably most +useful in doing performance measurements, when you need to start at the +beginning of an application and you need all the processes in a job to participate in collecting data. This approach also has some disadvantages. One disadvantage of running a -program like the one in the above example is that all the tracing output for -all four processes is directed to standard output (stdout). +program like the one in the above example is that all the tracing output for +all four processes is directed to standard output (stdout). To trace a parallel program and get separate trace files, create a script similar to the following. -#!/bin/sh -# partrace.sh - a helper script to dtrace Open MPI jobs from the -# start of the job. +#!/bin/sh +# partrace.sh - a helper script to dtrace Open MPI jobs from the +# start of the job. dtrace -s $1 -c $2 -o $2.$OMPI_COMM_WORLD_RANK.trace Type the following command to run the partrace.sh shell script: % mpirun -np 4 partrace.sh mpitrace.d mpiapp -This will run mpiapp under dtrace using the mpitrace.d script. The script -saves the trace output for each process in a job under a separate file name, +This will run mpiapp under dtrace using the mpitrace.d script. The script +saves the trace output for each process in a job under a separate file name, based on the program name and rank of the process. Note that subsequent runs will append the data into the existing trace files. @@ -168,69 +168,69 @@ process. Perform the following procedure: DTrace enables you to easily trace programs. When used in conjunction with MPI and the more than 200 functions defined in the MPI standard, dtrace provides an easy way to determine which functions might be in error during the debugging -process, or those functions which might be of interest. After you determine +process, or those functions which might be of interest. After you determine the function showing the error, it is easy to locate the desired job, process, -and rank on which to run your scripts. As demonstrated above, DTrace allows +and rank on which to run your scripts. As demonstrated above, DTrace allows you to perform these determinations while the program is running. Although the MPI standard provides the MPI profiling interface, using DTrace -does provide a number of advantages. The advantages of using DTrace include +does provide a number of advantages. The advantages of using DTrace include the following: - 1. The PMPI interface requires you to restart a job every time you make + 1. The PMPI interface requires you to restart a job every time you make changes to the interposing library. - 2. DTrace allows you to define probes that let you capture tracing - information on MPI without having to code the specific details for each + 2. DTrace allows you to define probes that let you capture tracing + information on MPI without having to code the specific details for each function you want to capture. - 3. DTrace's scripting language D has several built-in functions that help + 3. DTrace's scripting language D has several built-in functions that help in debugging problematic programs. The following example shows a simple script that traces the entry and exit into all the MPI API calls. -mpitrace.d: -pid$target:libmpi:MPI_*:entry -{ +mpitrace.d: +pid$target:libmpi:MPI_*:entry +{ printf("Entered %s...", probefunc); } -pid$target:libmpi:MPI_*:return -{ -printf("exiting, return value = %d\n", arg1); +pid$target:libmpi:MPI_*:return +{ +printf("exiting, return value = %d\n", arg1); } When you use this example script to attach DTrace to a job that performs send and recv operations, the output looks similar to the following: -% dtrace -q -p 6391 -s mpitrace.d +% dtrace -q -p 6391 -s mpitrace.d Entered MPI_Send...exiting, return value = 0 -Entered MPI_Recv...exiting, return value = 0 -Entered MPI_Send...exiting, return value = 0 -Entered MPI_Recv...exiting, return value = 0 +Entered MPI_Recv...exiting, return value = 0 +Entered MPI_Send...exiting, return value = 0 +Entered MPI_Recv...exiting, return value = 0 Entered MPI_Send...exiting, return value = 0 ... You can easily modify the mpitrace.d script to include an argument list. The resulting output resembles truss output. For example: -mpitruss.d: +mpitruss.d: pid$target:libmpi:MPI_Send:entry, -pid$target:libmpi:MPI_*send:entry, +pid$target:libmpi:MPI_*send:entry, pid$target:libmpi:MPI_Recv:entry, -pid$target:libmpi:MPI_*recv:entry -{ -printf("%s(0x%x, %d, 0x%x, %d, %d, 0x%x)",probefunc, arg0, arg1, arg2, arg3, +pid$target:libmpi:MPI_*recv:entry +{ +printf("%s(0x%x, %d, 0x%x, %d, %d, 0x%x)",probefunc, arg0, arg1, arg2, arg3, arg4, arg5); } -pid$target:libmpi:MPI_Send:return, +pid$target:libmpi:MPI_Send:return, pid$target:libmpi:MPI_*send:return, -pid$target:libmpi:MPI_Recv:return, -pid$target:libmpi:MPI_*recv:return +pid$target:libmpi:MPI_Recv:return, +pid$target:libmpi:MPI_*recv:return { -printf("\t\t = %d\n", arg1); +printf("\t\t = %d\n", arg1); } The mpitruss.d script shows how you can specify wildcard names to match the @@ -238,37 +238,37 @@ functions. Both probes will match all send and receive type function calls in the MPI library. The first probe shows the usage of the built-in arg variables to print out the arglist of the function being traced. -Take care when wildcarding the entrypoint and the formatting argument output, -because you could end up printing either too many arguments, or not enough -arguments, for certain functions. For example, in the above case, the -MPI_Irecv and MPI_Isend functions will not have their Request handle +Take care when wildcarding the entrypoint and the formatting argument output, +because you could end up printing either too many arguments, or not enough +arguments, for certain functions. For example, in the above case, the +MPI_Irecv and MPI_Isend functions will not have their Request handle parameters printed out. The following example shows a sample output of the mpitruss.d script: -% dtrace -q -p 6391 -s mpitruss.d -MPI_Send(0x80470b0, 1, 0x8060f48, 0, 1,0x8060d48) = 0 +% dtrace -q -p 6391 -s mpitruss.d +MPI_Send(0x80470b0, 1, 0x8060f48, 0, 1,0x8060d48) = 0 MPI_Recv(0x80470a8, 1, 0x8060f48, 0, 0, 0x8060d48) = 0 -MPI_Send(0x80470b0, 1, 0x8060f48, 0, 1, 0x8060d48) = 0 +MPI_Send(0x80470b0, 1, 0x8060f48, 0, 1, 0x8060d48) = 0 MPI_Recv(0x80470a8, 1,0x8060f48, 0, 0, 0x8060d48) = 0 ... 4. Tracking Down Resource Leaks One of the biggest issues with programming is the unintentional leaking of -resources (such as memory). With MPI, tracking and repairing resource leaks +resources (such as memory). With MPI, tracking and repairing resource leaks can be somewhat more challenging because the objects being leaked are in the middleware, and thus are not easily detected by the use of memory checkers. -DTrace helps with debugging such problems using variables, the profile -provider, and a callstack function. The mpicommcheck.d script (shown in the +DTrace helps with debugging such problems using variables, the profile +provider, and a callstack function. The mpicommcheck.d script (shown in the example below) probes for all the the MPI communicator calls that allocate and -deallocate communicators, and keeps track of the stack each time the function +deallocate communicators, and keeps track of the stack each time the function is called. Every 10 seconds the script dumps out the current count of MPI communicator calls and the total calls for the allocation and deallocation of communicators. When the dtrace session ends (usually by typing Ctrl-C, if you -attached to a running MPI program), the script will print out the totals and -all the different stack traces, as well as the number of times those stack +attached to a running MPI program), the script will print out the totals and +all the different stack traces, as well as the number of times those stack traces were reached. In order to perform these tasks, the script uses DTrace features such as @@ -277,44 +277,44 @@ predefined variable probefunc. The following example shows the mpicommcheck.d script. -mpicommcheck.d: -BEGIN -{ - allocations = 0; - deallocations = 0; - prcnt = 0; +mpicommcheck.d: +BEGIN +{ + allocations = 0; + deallocations = 0; + prcnt = 0; } -pid$target:libmpi:MPI_Comm_create:entry, +pid$target:libmpi:MPI_Comm_create:entry, pid$target:libmpi:MPI_Comm_dup:entry, -pid$target:libmpi:MPI_Comm_split:entry -{ - ++allocations; - @counts[probefunc] = count(); - @stacks[ustack()] = count(); +pid$target:libmpi:MPI_Comm_split:entry +{ + ++allocations; + @counts[probefunc] = count(); + @stacks[ustack()] = count(); } -pid$target:libmpi:MPI_Comm_free:entry -{ - ++deallocations; - @counts[probefunc] = count(); - @stacks[ustack()] = count(); +pid$target:libmpi:MPI_Comm_free:entry +{ + ++deallocations; + @counts[probefunc] = count(); + @stacks[ustack()] = count(); } -profile:::tick-1sec -/++prcnt > 10/ +profile:::tick-1sec +/++prcnt > 10/ { printf("====================================================================="); - printa(@counts); + printa(@counts); printf("Communicator Allocations = %d \n", allocations); - printf("Communicator Deallocations = %d\n", deallocations); - prcnt = 0; + printf("Communicator Deallocations = %d\n", deallocations); + prcnt = 0; } -END -{ +END +{ printf("Communicator Allocations = %d, Communicator Deallocations = %d\n", - allocations, deallocations); + allocations, deallocations); } This script attaches dtrace to a suspect section of code in your program (that @@ -336,13 +336,13 @@ This program performs three MPI_Comm_dup operations and two MPI_Comm_free operations. The program thus "leaks" one communicator operation with each iteration of a loop. -When you attach dtrace to mpicommleak using the mpicommcheck.d script above, +When you attach dtrace to mpicommleak using the mpicommcheck.d script above, you will see a 10-second periodic output. This output shows that the count of the allocated communicators is growing faster than the count of deallocations. When you finally end the dtrace session by typing Ctrl-C, the session will have -output a total of five stack traces, showing the distinct three MPI_Comm_dup -and two MPI_Comm_free call stacks, as well as the number of times each call +output a total of five stack traces, showing the distinct three MPI_Comm_dup +and two MPI_Comm_free call stacks, as well as the number of times each call stack was encountered. For example: diff --git a/examples/dtrace/mpicommcheck.d b/examples/dtrace/mpicommcheck.d index 11cdc54e61a..937680c1389 100644 --- a/examples/dtrace/mpicommcheck.d +++ b/examples/dtrace/mpicommcheck.d @@ -2,9 +2,9 @@ * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,6 +45,6 @@ END { printf("Communicator Allocations = %d, Communicator Deallocations = %d\n", allocations, deallocations); -} +} diff --git a/examples/dtrace/mpicommleak.c b/examples/dtrace/mpicommleak.c index c2888c9be67..b2fcb8a25cf 100644 --- a/examples/dtrace/mpicommleak.c +++ b/examples/dtrace/mpicommleak.c @@ -2,9 +2,9 @@ * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/examples/dtrace/mpicount.d b/examples/dtrace/mpicount.d index df451da35ee..38924a92dcd 100644 --- a/examples/dtrace/mpicount.d +++ b/examples/dtrace/mpicount.d @@ -1,13 +1,13 @@ /* * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/* +/* * This script will count the number of times MPI APIs are called. It * will print out its results every 10 seconds and then a final count * at the end. This script can be used to see that an MPI application @@ -46,4 +46,4 @@ profile:::tick-1sec dtrace:::END { printa(@api); -} \ No newline at end of file +} diff --git a/examples/dtrace/mpitrace.d b/examples/dtrace/mpitrace.d index bc0b85ed228..9dfc0cd21e4 100644 --- a/examples/dtrace/mpitrace.d +++ b/examples/dtrace/mpitrace.d @@ -2,9 +2,9 @@ * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/examples/dtrace/mpitruss.d b/examples/dtrace/mpitruss.d index fc1b016f8aa..73dd4cafd3e 100644 --- a/examples/dtrace/mpitruss.d +++ b/examples/dtrace/mpitruss.d @@ -2,9 +2,9 @@ * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/examples/dtrace/myppriv.sh b/examples/dtrace/myppriv.sh index c15af1ecd66..798c24fce82 100755 --- a/examples/dtrace/myppriv.sh +++ b/examples/dtrace/myppriv.sh @@ -9,6 +9,6 @@ # $HEADER$ # -# run ppriv under a shell so you can get the privileges of the +# run ppriv under a shell so you can get the privileges of the # process that mprun creates ppriv $$ diff --git a/ompi/Makefile.am b/ompi/Makefile.am index 850aa6c57df..a86926d80af 100644 --- a/ompi/Makefile.am +++ b/ompi/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -15,9 +15,9 @@ # Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,12 +26,12 @@ if BUILD_MPI_BINDINGS_LAYER c_mpi_lib = mpi/c/libmpi_c_mpi.la mpi/tool/libmpi_mpit.la else -c_mpi_lib = +c_mpi_lib = endif if BUILD_PMPI_BINDINGS_LAYER c_pmpi_lib = mpi/c/profile/libmpi_c_pmpi.la mpi/tool/profile/libmpi_pmpit.la else -c_pmpi_lib = +c_pmpi_lib = endif # See if we have Fortran mpif.h MPI bindings diff --git a/ompi/attribute/Makefile.am b/ompi/attribute/Makefile.am index 2510601863a..59e46f9ca95 100644 --- a/ompi/attribute/Makefile.am +++ b/ompi/attribute/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/ompi/attribute/attribute.c b/ompi/attribute/attribute.c index 418ab80a57b..5ac0b53f069 100644 --- a/ompi/attribute/attribute.c +++ b/ompi/attribute/attribute.c @@ -5,17 +5,17 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ * will not be able to affect the value read by anyone else). * - The predefined attribute MPI_WIN_BASE seems to flaunt the rules * designated by the rest of the standard; it is handled - * specifically in the MPI_WIN_GET_ATTR binding functions (see the + * specifically in the MPI_WIN_GET_ATTR binding functions (see the * comments in there for an explanation). * - MPI-2 4.12.7:Example 4.13 (p58) is wrong. The C->Fortran example * should have the Fortran "val" variable equal to &I. @@ -72,19 +72,19 @@ * to an int -- but it could have been a pointer to anything, such as * a struct). These scenarios each have 2 examples: * - * Example A: int foo = 3; + * Example A: int foo = 3; * MPI_Attr_put(..., &foo); - * Example B: struct foo bar; + * Example B: struct foo bar; * MPI_Attr_put(..., &bar); - * + * * 1. C reads the attribute value. Clearly, this is a "unity" case, * and no translation occurs. A pointer is written, and that same * pointer is returned. * - * Example A: int *ret; - * MPI_Attr_get(..., &ret); + * Example A: int *ret; + * MPI_Attr_get(..., &ret); * --> *ret will equal 3 - * Example B: struct foo *ret; + * Example B: struct foo *ret; * MPI_Attr_get(..., &ret); * --> *ret will point to the instance bar that was written * @@ -106,7 +106,7 @@ * CALL MPI_COMM_GET_ATTR(..., ret, ierr) * --> ret will equal &foo * Example B: INTEGER(KIND=MPI_ADDRESS_KIND) ret - * CALL MPI_COMM_GET_ATTR(..., ret, ierr) + * CALL MPI_COMM_GET_ATTR(..., ret, ierr) * --> ret will equal &bar * * Cases where Fortran MPI-1 writes an attribute value: @@ -124,7 +124,7 @@ * this case and case 7. It is the programer's responsibility * to code accordingly. * - * Example: MPI_Fint *ret; + * Example: MPI_Fint *ret; * MPI_Attr_get(..., &ret); * -> *ret will equal 7. * @@ -163,10 +163,10 @@ * this case and case 4. It is the programer's responsibility * to code accordingly. * - * Example A: MPI_Aint *ret; + * Example A: MPI_Aint *ret; * MPI_Attr_get(..., &ret); * -> *ret will equal 12 - * Example B: MPI_Aint *ret; + * Example B: MPI_Aint *ret; * MPI_Attr_get(..., &ret); * -> *ret will equal 2^40 * @@ -226,7 +226,7 @@ /* Not checking for NULL_DELETE_FN here, since according to the MPI-standard it should be a valid function that returns - MPI_SUCCESS. + MPI_SUCCESS. This macro exists because we have to replicate the same code for MPI_Comm, MPI_Datatype, and MPI_Win. Ick. @@ -242,7 +242,7 @@ *not* set. 3. C-style: attribute arguments are of type (void*). This is used if OMPI_KEYVAL_F77 is not set. - + Ick. */ @@ -340,7 +340,7 @@ do { \ } while (0) -/* +/* * Cases for attribute values */ typedef enum ompi_attribute_translate_t { @@ -364,17 +364,17 @@ typedef struct attribute_value_t { } attribute_value_t; -/* +/* * Local functions */ static void attribute_value_construct(attribute_value_t *item); static void ompi_attribute_keyval_construct(ompi_attribute_keyval_t *keyval); static void ompi_attribute_keyval_destruct(ompi_attribute_keyval_t *keyval); -static int set_value(ompi_attribute_type_t type, void *object, - opal_hash_table_t **attr_hash, int key, +static int set_value(ompi_attribute_type_t type, void *object, + opal_hash_table_t **attr_hash, int key, attribute_value_t *new_attr, bool predefined); -static int get_value(opal_hash_table_t *attr_hash, int key, +static int get_value(opal_hash_table_t *attr_hash, int key, attribute_value_t **attribute, int *flag); static void *translate_to_c(attribute_value_t *val); static MPI_Fint translate_to_fortran_mpi1(attribute_value_t *val); @@ -394,14 +394,14 @@ static OBJ_CLASS_INSTANCE(attribute_value_t, /* * ompi_attribute_entry_t classes */ -static OBJ_CLASS_INSTANCE(ompi_attribute_keyval_t, +static OBJ_CLASS_INSTANCE(ompi_attribute_keyval_t, opal_object_t, ompi_attribute_keyval_construct, ompi_attribute_keyval_destruct); -/* - * Static variables +/* + * Static variables */ static opal_hash_table_t *keyval_hash; @@ -434,7 +434,7 @@ static void attribute_value_construct(attribute_value_t *item) * ompi_attribute_keyval_t constructor / destructor */ static void -ompi_attribute_keyval_construct(ompi_attribute_keyval_t *keyval) +ompi_attribute_keyval_construct(ompi_attribute_keyval_t *keyval) { keyval->attr_type = UNUSED_ATTR; keyval->attr_flag = 0; @@ -452,8 +452,8 @@ ompi_attribute_keyval_construct(ompi_attribute_keyval_t *keyval) } -static void -ompi_attribute_keyval_destruct(ompi_attribute_keyval_t *keyval) +static void +ompi_attribute_keyval_destruct(ompi_attribute_keyval_t *keyval) { if (-1 != keyval->key) { /* If the bindings_extra_state pointer is not NULL, free it */ @@ -467,7 +467,7 @@ ompi_attribute_keyval_destruct(ompi_attribute_keyval_t *keyval) } -/* +/* * This will initialize the main list to store key- attribute * items. This will be called one time, during MPI_INIT(). */ @@ -490,7 +490,7 @@ int ompi_attr_init(void) return OMPI_ERR_OUT_OF_RESOURCE; } - for (int_pos = 0; int_pos < (sizeof(void*) / sizeof(MPI_Fint)); + for (int_pos = 0; int_pos < (sizeof(void*) / sizeof(MPI_Fint)); ++int_pos) { if (p[int_pos] == 1) { break; @@ -506,12 +506,12 @@ int ompi_attr_init(void) if (OMPI_SUCCESS != (ret = ompi_attr_create_predefined())) { return ret; } - + return OMPI_SUCCESS; } -/* +/* * Cleanup everything during MPI_Finalize(). */ int ompi_attr_finalize(void) @@ -623,7 +623,7 @@ int ompi_attr_create_keyval_aint(ompi_attribute_type_t type, /*****************************************************************************/ -int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, +int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, bool predefined) { int ret; @@ -631,9 +631,9 @@ int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, /* Find the key-value pair */ OPAL_THREAD_LOCK(&attribute_lock); - ret = opal_hash_table_get_value_uint32(keyval_hash, *key, + ret = opal_hash_table_get_value_uint32(keyval_hash, *key, (void **) &keyval); - if ((OMPI_SUCCESS != ret) || (NULL == keyval) || + if ((OMPI_SUCCESS != ret) || (NULL == keyval) || (keyval->attr_type != type) || ((!predefined) && (keyval->attr_flag & OMPI_KEYVAL_PREDEFINED))) { OPAL_THREAD_UNLOCK(&attribute_lock); @@ -660,7 +660,7 @@ int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, * Front-end function called by the C MPI API functions to set an * attribute. */ -int ompi_attr_set_c(ompi_attribute_type_t type, void *object, +int ompi_attr_set_c(ompi_attribute_type_t type, void *object, opal_hash_table_t **attr_hash, int key, void *attribute, bool predefined) { @@ -690,9 +690,9 @@ int ompi_attr_set_c(ompi_attribute_type_t type, void *object, * Front-end function called by the Fortran MPI-1 API functions to set * an attribute. */ -int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *object, +int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *object, opal_hash_table_t **attr_hash, - int key, MPI_Fint attribute, + int key, MPI_Fint attribute, bool predefined) { int ret; @@ -722,9 +722,9 @@ int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *object, * Front-end function called by the Fortran MPI-2 API functions to set * an attribute. */ -int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *object, +int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *object, opal_hash_table_t **attr_hash, - int key, MPI_Aint attribute, + int key, MPI_Aint attribute, bool predefined) { int ret; @@ -754,7 +754,7 @@ int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *object, * Front-end function called by the C MPI API functions to get * attributes. */ -int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, +int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, void **attribute, int *flag) { attribute_value_t *val = NULL; @@ -777,7 +777,7 @@ int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, * Front-end function called by the Fortran MPI-1 API functions to get * attributes. */ -int ompi_attr_get_fortran_mpi1(opal_hash_table_t *attr_hash, int key, +int ompi_attr_get_fortran_mpi1(opal_hash_table_t *attr_hash, int key, MPI_Fint *attribute, int *flag) { attribute_value_t *val = NULL; @@ -800,7 +800,7 @@ int ompi_attr_get_fortran_mpi1(opal_hash_table_t *attr_hash, int key, * Front-end function called by the Fortran MPI-2 API functions to get * attributes. */ -int ompi_attr_get_fortran_mpi2(opal_hash_table_t *attr_hash, int key, +int ompi_attr_get_fortran_mpi2(opal_hash_table_t *attr_hash, int key, MPI_Aint *attribute, int *flag) { attribute_value_t *val = NULL; @@ -825,7 +825,7 @@ int ompi_attr_get_fortran_mpi2(opal_hash_table_t *attr_hash, int key, * when MPI objects are copied (e.g., back-end actions to * MPI_COMM_DUP). */ -int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, +int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, void *new_object, opal_hash_table_t *oldattr_hash, opal_hash_table_t *newattr_hash) { @@ -845,7 +845,7 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, OPAL_THREAD_LOCK(&attribute_lock); /* Get the first attribute in the object's hash */ - ret = opal_hash_table_get_first_key_uint32(oldattr_hash, &key, + ret = opal_hash_table_get_first_key_uint32(oldattr_hash, &key, (void **) &old_attr, &node); @@ -855,7 +855,7 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, /* Get the keyval in the main keyval hash - so that we know what the copy_attr_fn is */ - err = opal_hash_table_get_value_uint32(keyval_hash, key, + err = opal_hash_table_get_value_uint32(keyval_hash, key, (void **) &hash_value); if (OMPI_SUCCESS != err) { /* This should not happen! */ @@ -868,19 +868,19 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, switch (type) { case COMM_ATTR: /* Now call the copy_attr_fn */ - COPY_ATTR_CALLBACKS(communicator, old_object, hash_value, + COPY_ATTR_CALLBACKS(communicator, old_object, hash_value, old_attr, new_object, new_attr, err); break; - + case TYPE_ATTR: /* Now call the copy_attr_fn */ - COPY_ATTR_CALLBACKS(datatype, old_object, hash_value, + COPY_ATTR_CALLBACKS(datatype, old_object, hash_value, old_attr, new_object, new_attr, err); break; case WIN_ATTR: /* Now call the copy_attr_fn */ - COPY_ATTR_CALLBACKS(win, old_object, hash_value, + COPY_ATTR_CALLBACKS(win, old_object, hash_value, old_attr, new_object, new_attr, err); break; @@ -896,7 +896,7 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, } /* Hang this off the object's hash */ - + /* The COPY_ATTR_CALLBACKS macro will have converted the _flag_ callback output value from Fortran's .TRUE. value to 0/1 (if necessary). So we only need to check for 0/1 here @@ -911,7 +911,7 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, } else { new_attr->av_set_from = OMPI_ATTRIBUTE_C; } - ret = set_value(type, new_object, &newattr_hash, key, + ret = set_value(type, new_object, &newattr_hash, key, new_attr, true); if (MPI_SUCCESS != ret) { goto out; @@ -920,8 +920,8 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, OBJ_RELEASE(new_attr); } - ret = opal_hash_table_get_next_key_uint32(oldattr_hash, &key, - (void **) &old_attr, + ret = opal_hash_table_get_next_key_uint32(oldattr_hash, &key, + (void **) &old_attr, in_node, &node); } ret = MPI_SUCCESS; @@ -940,7 +940,7 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, * * Assumes that you DO already have the attribute_lock. */ -static int ompi_attr_delete_impl(ompi_attribute_type_t type, void *object, +static int ompi_attr_delete_impl(ompi_attribute_type_t type, void *object, opal_hash_table_t *attr_hash, int key, bool predefined) { @@ -949,7 +949,7 @@ static int ompi_attr_delete_impl(ompi_attribute_type_t type, void *object, attribute_value_t *attr; /* Check if the key is valid in the master keyval hash */ - ret = opal_hash_table_get_value_uint32(keyval_hash, key, + ret = opal_hash_table_get_value_uint32(keyval_hash, key, (void **) &keyval); if ((OMPI_SUCCESS != ret) || (NULL == keyval) || @@ -1014,7 +1014,7 @@ static int ompi_attr_delete_impl(ompi_attribute_type_t type, void *object, /* * Front end function to delete a single attribute. */ -int ompi_attr_delete(ompi_attribute_type_t type, void *object, +int ompi_attr_delete(ompi_attribute_type_t type, void *object, opal_hash_table_t *attr_hash, int key, bool predefined) { @@ -1030,7 +1030,7 @@ int ompi_attr_delete(ompi_attribute_type_t type, void *object, /* * Front-end function to delete all the attributes on an MPI object */ -int ompi_attr_delete_all(ompi_attribute_type_t type, void *object, +int ompi_attr_delete_all(ompi_attribute_type_t type, void *object, opal_hash_table_t *attr_hash) { int ret, i, num_attrs; @@ -1076,7 +1076,7 @@ int ompi_attr_delete_all(ompi_attribute_type_t type, void *object, Termination, but we do it for everything -- what the heck. :-) */ for (i = num_attrs - 1; i >= 0; i--) { - ret = ompi_attr_delete_impl(type, object, attr_hash, + ret = ompi_attr_delete_impl(type, object, attr_hash, attrs[i]->av_key, true); if (OMPI_SUCCESS != ret) { break; @@ -1097,8 +1097,8 @@ int ompi_attr_delete_all(ompi_attribute_type_t type, void *object, * Back-end function to set an attribute on an MPI object. Assumes * that you already hold the attribute_lock. */ -static int set_value(ompi_attribute_type_t type, void *object, - opal_hash_table_t **attr_hash, int key, +static int set_value(ompi_attribute_type_t type, void *object, + opal_hash_table_t **attr_hash, int key, attribute_value_t *new_attr, bool predefined) { @@ -1110,11 +1110,11 @@ static int set_value(ompi_attribute_type_t type, void *object, /* Note that this function can be invoked by ompi_attr_copy_all() to set attributes on the new object (in addition to the top-level MPI_* functions that set attributes). */ - ret = opal_hash_table_get_value_uint32(keyval_hash, key, + ret = opal_hash_table_get_value_uint32(keyval_hash, key, (void **) &keyval); /* If key not found */ - if ((OMPI_SUCCESS != ret ) || (NULL == keyval) || + if ((OMPI_SUCCESS != ret ) || (NULL == keyval) || (keyval->attr_type != type) || ((!predefined) && (keyval->attr_flag & OMPI_KEYVAL_PREDEFINED))) { return OMPI_ERR_BAD_PARAM; @@ -1186,7 +1186,7 @@ static int set_value(ompi_attribute_type_t type, void *object, * * Assumes that you do NOT already have the attribute lock. */ -static int get_value(opal_hash_table_t *attr_hash, int key, +static int get_value(opal_hash_table_t *attr_hash, int key, attribute_value_t **attribute, int *flag) { int ret; @@ -1199,7 +1199,7 @@ static int get_value(opal_hash_table_t *attr_hash, int key, with the key, then the call is valid and returns FALSE in the flag argument */ *flag = 0; - ret = opal_hash_table_get_value_uint32(keyval_hash, key, + ret = opal_hash_table_get_value_uint32(keyval_hash, key, (void**) &keyval); if (OMPI_ERR_NOT_FOUND == ret) { return MPI_KEYVAL_INVALID; diff --git a/ompi/attribute/attribute.h b/ompi/attribute/attribute.h index b0dc9ecab84..b762aa24f45 100644 --- a/ompi/attribute/attribute.h +++ b/ompi/attribute/attribute.h @@ -5,21 +5,21 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file * - * Implementation for taking care of the attribute that can hang off a comm, + * Implementation for taking care of the attribute that can hang off a comm, * win or datatype. */ @@ -36,8 +36,8 @@ #define ATTR_HASH_SIZE 10 -/* - * Flags for keyvals +/* + * Flags for keyvals */ #define OMPI_KEYVAL_PREDEFINED 0x0001 #define OMPI_KEYVAL_F77 0x0002 @@ -62,34 +62,34 @@ typedef enum ompi_attribute_type_t ompi_attribute_type_t; delete. These will only be used here and not in the front end functions. */ -typedef void (ompi_mpi1_fortran_copy_attr_function)(MPI_Fint *oldobj, +typedef void (ompi_mpi1_fortran_copy_attr_function)(MPI_Fint *oldobj, MPI_Fint *keyval, - MPI_Fint *extra_state, + MPI_Fint *extra_state, MPI_Fint *attr_in, MPI_Fint *attr_out, ompi_fortran_logical_t *flag, MPI_Fint *ierr); -typedef void (ompi_mpi1_fortran_delete_attr_function)(MPI_Fint *obj, +typedef void (ompi_mpi1_fortran_delete_attr_function)(MPI_Fint *obj, MPI_Fint *keyval, MPI_Fint *attr_in, - MPI_Fint *extra_state, + MPI_Fint *extra_state, MPI_Fint *ierr); /* New-style MPI-2 Fortran function pointer declarations for copy and delete. These will only be used here and not in the front end functions. */ -typedef void (ompi_mpi2_fortran_copy_attr_function)(MPI_Fint *oldobj, +typedef void (ompi_mpi2_fortran_copy_attr_function)(MPI_Fint *oldobj, MPI_Fint *keyval, - void *extra_state, - void *attr_in, + void *extra_state, + void *attr_in, void *attr_out, ompi_fortran_logical_t *flag, MPI_Fint *ierr); -typedef void (ompi_mpi2_fortran_delete_attr_function)(MPI_Fint *obj, +typedef void (ompi_mpi2_fortran_delete_attr_function)(MPI_Fint *obj, MPI_Fint *keyval, void *attr_in, - void *extra_state, + void *extra_state, MPI_Fint *ierr); /* * Internally the copy function for all kinds of MPI objects has one more @@ -98,13 +98,13 @@ typedef void (ompi_mpi2_fortran_delete_attr_function)(MPI_Fint *obj, * on the main communicator. */ typedef int (MPI_Comm_internal_copy_attr_function)(MPI_Comm, int, void *, - void *, void *, int *, + void *, void *, int *, MPI_Comm); typedef int (MPI_Type_internal_copy_attr_function)(MPI_Datatype, int, void *, - void *, void *, int *, + void *, void *, int *, MPI_Datatype); typedef int (MPI_Win_internal_copy_attr_function)(MPI_Win, int, void *, - void *, void *, int *, + void *, void *, int *, MPI_Win); typedef void (ompi_attribute_keyval_destructor_fn_t)(int); @@ -123,12 +123,12 @@ union ompi_attribute_fn_ptr_union_t { MPI_Win_internal_copy_attr_function *attr_win_copy_fn; /* For Fortran old MPI-1 callback functions */ - + ompi_mpi1_fortran_delete_attr_function *attr_mpi1_fortran_delete_fn; ompi_mpi1_fortran_copy_attr_function *attr_mpi1_fortran_copy_fn; /* For Fortran new MPI-2 callback functions */ - + ompi_mpi2_fortran_delete_attr_function *attr_mpi2_fortran_delete_fn; ompi_mpi2_fortran_copy_attr_function *attr_mpi2_fortran_copy_fn; }; @@ -159,7 +159,7 @@ struct ompi_attribute_keyval_t { properly and error checking */ int attr_flag; /**< flag field: contains "OMPI_KEYVAL_PREDEFINED", "OMPI_KEYVAL_F77" */ - ompi_attribute_fn_ptr_union_t copy_attr_fn; /**< Copy function for the + ompi_attribute_fn_ptr_union_t copy_attr_fn; /**< Copy function for the attribute */ ompi_attribute_fn_ptr_union_t delete_attr_fn; /**< Delete function for the attribute */ @@ -173,14 +173,14 @@ struct ompi_attribute_keyval_t { }; typedef struct ompi_attribute_keyval_t ompi_attribute_keyval_t; - + /* Functions */ -/** - * Convenient way to initialize the attribute hash table per MPI-Object +/** + * Convenient way to initialize the attribute hash table per MPI-Object */ static inline @@ -194,7 +194,7 @@ int ompi_attr_hash_init(opal_hash_table_t **hash) if (OMPI_SUCCESS != opal_hash_table_init(*hash, ATTR_HASH_SIZE)) { return OMPI_ERR_OUT_OF_RESOURCE; } - + return MPI_SUCCESS; } @@ -219,7 +219,7 @@ int ompi_attr_finalize(void); * @param type Type of attribute (COMM/WIN/DTYPE) (IN) * @param copy_attr_fn Union variable containing the function pointer * to be used in order to copy the attribute (IN) - * @param delete_attr_fn Function pointer to be used for deleting the + * @param delete_attr_fn Function pointer to be used for deleting the * attribute (IN) * @param key The newly created key is returned here (OUT) * @param extra_state Extra state to hang off/do some special things (IN) @@ -234,10 +234,10 @@ int ompi_attr_finalize(void); * all MPI* calls will have OMPI_KEYVAL_PREDEFINED set as 0. MPI * implementors who will need to play with the predefined keys and * attributes would call the ompi* functions here and not the MPI* - * functions, with OMPI_KEYVAL_PREDEFINED set to 1. + * functions, with OMPI_KEYVAL_PREDEFINED set to 1. * END OF NOTE * - * NOTE: For the function pointers, you need to create a variable of the + * NOTE: For the function pointers, you need to create a variable of the * union type "ompi_attribute_fn_ptr_union_t" and assign the proper field. * to be passed into this function * END OF NOTE @@ -247,8 +247,8 @@ int ompi_attr_finalize(void); * */ -OMPI_DECLSPEC int ompi_attr_create_keyval(ompi_attribute_type_t type, - ompi_attribute_fn_ptr_union_t copy_attr_fn, +OMPI_DECLSPEC int ompi_attr_create_keyval(ompi_attribute_type_t type, + ompi_attribute_fn_ptr_union_t copy_attr_fn, ompi_attribute_fn_ptr_union_t delete_attr_fn, int *key, void *extra_state, int flags, void *bindings_extra_state); @@ -257,8 +257,8 @@ OMPI_DECLSPEC int ompi_attr_create_keyval(ompi_attribute_type_t type, * Same as ompi_attr_create_keyval, but extra_state is a Fortran default integer. */ -OMPI_DECLSPEC int ompi_attr_create_keyval_fint(ompi_attribute_type_t type, - ompi_attribute_fn_ptr_union_t copy_attr_fn, +OMPI_DECLSPEC int ompi_attr_create_keyval_fint(ompi_attribute_type_t type, + ompi_attribute_fn_ptr_union_t copy_attr_fn, ompi_attribute_fn_ptr_union_t delete_attr_fn, int *key, MPI_Fint extra_state, int flags, void *bindings_extra_state); @@ -267,8 +267,8 @@ OMPI_DECLSPEC int ompi_attr_create_keyval_fint(ompi_attribute_type_t type, * Same as ompi_attr_create_keyval, but extra_state is a Fortran address integer. */ -OMPI_DECLSPEC int ompi_attr_create_keyval_aint(ompi_attribute_type_t type, - ompi_attribute_fn_ptr_union_t copy_attr_fn, +OMPI_DECLSPEC int ompi_attr_create_keyval_aint(ompi_attribute_type_t type, + ompi_attribute_fn_ptr_union_t copy_attr_fn, ompi_attribute_fn_ptr_union_t delete_attr_fn, int *key, MPI_Aint extra_state, int flags, void *bindings_extra_state); @@ -280,7 +280,7 @@ OMPI_DECLSPEC int ompi_attr_create_keyval_aint(ompi_attribute_type_t type, * @return OMPI error code */ -int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, +int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, bool predefined); /** @@ -303,12 +303,12 @@ int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key, * (void*) and an enum to indicate which way to translate the final * representation, but that just seemed to make an already complicated * situation more complicated through yet another layer of - * indirection. + * indirection. * * So yes, this is more code, but it's clearer and less error-prone * (read: better) this way. */ -int ompi_attr_set_c(ompi_attribute_type_t type, void *object, +int ompi_attr_set_c(ompi_attribute_type_t type, void *object, opal_hash_table_t **attr_hash, int key, void *attribute, bool predefined); @@ -333,14 +333,14 @@ int ompi_attr_set_c(ompi_attribute_type_t type, void *object, * (void*) and an enum to indicate which way to translate the final * representation, but that just seemed to make an already complicated * situation more complicated through yet another layer of - * indirection. + * indirection. * * So yes, this is more code, but it's clearer and less error-prone * (read: better) this way. */ -OMPI_DECLSPEC int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *object, +OMPI_DECLSPEC int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *object, opal_hash_table_t **attr_hash, - int key, MPI_Fint attribute, + int key, MPI_Fint attribute, bool predefined); /** @@ -364,14 +364,14 @@ OMPI_DECLSPEC int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *o * (void*) and an enum to indicate which way to translate the final * representation, but that just seemed to make an already complicated * situation more complicated through yet another layer of - * indirection. + * indirection. * * So yes, this is more code, but it's clearer and less error-prone * (read: better) this way. */ -OMPI_DECLSPEC int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *object, +OMPI_DECLSPEC int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *object, opal_hash_table_t **attr_hash, - int key, MPI_Aint attribute, + int key, MPI_Aint attribute, bool predefined); /** @@ -380,7 +380,7 @@ OMPI_DECLSPEC int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *o * @param attr_hash The attribute hash table hanging on the object(IN) * @param key Key val for the attribute (IN) * @param attribute The actual attribute pointer (OUT) - * @param flag Flag whether an attribute is associated + * @param flag Flag whether an attribute is associated * with the key (OUT) * @return OMPI error code * @@ -390,13 +390,13 @@ OMPI_DECLSPEC int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *o * (void*) and an enum to indicate which way to translate the final * representation, but that just seemed to make an already complicated * situation more complicated through yet another layer of - * indirection. + * indirection. * * So yes, this is more code, but it's clearer and less error-prone * (read: better) this way. */ -int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, +int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, void **attribute, int *flag); @@ -407,7 +407,7 @@ int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, * @param attr_hash The attribute hash table hanging on the object(IN) * @param key Key val for the attribute (IN) * @param attribute The actual attribute pointer (OUT) - * @param flag Flag whether an attribute is associated + * @param flag Flag whether an attribute is associated * with the key (OUT) * @return OMPI error code * @@ -417,13 +417,13 @@ int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, * (void*) and an enum to indicate which way to translate the final * representation, but that just seemed to make an already complicated * situation more complicated through yet another layer of - * indirection. + * indirection. * * So yes, this is more code, but it's clearer and less error-prone * (read: better) this way. */ - OMPI_DECLSPEC int ompi_attr_get_fortran_mpi1(opal_hash_table_t *attr_hash, int key, + OMPI_DECLSPEC int ompi_attr_get_fortran_mpi1(opal_hash_table_t *attr_hash, int key, MPI_Fint *attribute, int *flag); @@ -434,7 +434,7 @@ int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, * @param attr_hash The attribute hash table hanging on the object(IN) * @param key Key val for the attribute (IN) * @param attribute The actual attribute pointer (OUT) - * @param flag Flag whether an attribute is associated + * @param flag Flag whether an attribute is associated * with the key (OUT) * @return OMPI error code * @@ -444,13 +444,13 @@ int ompi_attr_get_c(opal_hash_table_t *attr_hash, int key, * (void*) and an enum to indicate which way to translate the final * representation, but that just seemed to make an already complicated * situation more complicated through yet another layer of - * indirection. + * indirection. * * So yes, this is more code, but it's clearer and less error-prone * (read: better) this way. */ -OMPI_DECLSPEC int ompi_attr_get_fortran_mpi2(opal_hash_table_t *attr_hash, int key, +OMPI_DECLSPEC int ompi_attr_get_fortran_mpi2(opal_hash_table_t *attr_hash, int key, MPI_Aint *attribute, int *flag); @@ -465,15 +465,15 @@ OMPI_DECLSPEC int ompi_attr_get_fortran_mpi2(opal_hash_table_t *attr_hash, int k * */ -int ompi_attr_delete(ompi_attribute_type_t type, void *object, +int ompi_attr_delete(ompi_attribute_type_t type, void *object, opal_hash_table_t *attr_hash , int key, bool predefined); -/** +/** * This to be used from functions like MPI_*_DUP in order to copy all * the attributes from the old Comm/Win/Dtype object to a new - * object. + * object. * @param type Type of attribute (COMM/WIN/DTYPE) (IN) * @param old_object The old COMM/WIN/DTYPE object (IN) * @param new_object The new COMM/WIN/DTYPE object (IN) @@ -483,12 +483,12 @@ int ompi_attr_delete(ompi_attribute_type_t type, void *object, * */ -int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, +int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, void *new_object, opal_hash_table_t *oldattr_hash, opal_hash_table_t *newattr_hash); -/** +/** * This to be used to delete all the attributes from the Comm/Win/Dtype * object in one shot * @param type Type of attribute (COMM/WIN/DTYPE) (IN) @@ -498,7 +498,7 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object, * */ -int ompi_attr_delete_all(ompi_attribute_type_t type, void *object, +int ompi_attr_delete_all(ompi_attribute_type_t type, void *object, opal_hash_table_t *attr_hash); diff --git a/ompi/attribute/attribute_predefined.c b/ompi/attribute/attribute_predefined.c index 731f4795035..e9cdc1273e7 100644 --- a/ompi/attribute/attribute_predefined.c +++ b/ompi/attribute/attribute_predefined.c @@ -52,7 +52,7 @@ * MPI_APPNUM is set as the result of a GPR subscription. * * MPI_LASTUSEDCODE is set to an initial value and is reset every time - * MPI_ADD_ERROR_CLASS or MPI_ADD_ERROR_CODE is invoked. + * MPI_ADD_ERROR_CLASS or MPI_ADD_ERROR_CODE is invoked. * Its copy function is set to * MPI_COMM_NULL_COPY_FN, meaning that *only* MPI_COMM_WORLD will have * this attribute value. As such, we only have to update diff --git a/ompi/class/Makefile.am b/ompi/class/Makefile.am index 2fe4523d931..5fae4957e7b 100644 --- a/ompi/class/Makefile.am +++ b/ompi/class/Makefile.am @@ -6,14 +6,14 @@ # Copyright (c) 2004-2007 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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$ # diff --git a/ompi/class/ompi_seq_tracker.c b/ompi/class/ompi_seq_tracker.c index 25ebf6d9e5e..b021ae18d8c 100644 --- a/ompi/class/ompi_seq_tracker.c +++ b/ompi/class/ompi_seq_tracker.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -23,20 +23,20 @@ -OBJ_CLASS_INSTANCE(ompi_seq_tracker_range_t, - opal_list_item_t, - NULL, +OBJ_CLASS_INSTANCE(ompi_seq_tracker_range_t, + opal_list_item_t, + NULL, NULL); -static void ompi_seq_tracker_construct(ompi_seq_tracker_t* seq_tracker) { +static void ompi_seq_tracker_construct(ompi_seq_tracker_t* seq_tracker) { OBJ_CONSTRUCT(&seq_tracker->seq_ids, opal_list_t); seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*)opal_list_get_end(&seq_tracker->seq_ids); } -static void ompi_seq_tracker_destruct(ompi_seq_tracker_t* seq_tracker) -{ +static void ompi_seq_tracker_destruct(ompi_seq_tracker_t* seq_tracker) +{ opal_list_item_t* item; while(NULL != (item = opal_list_remove_first(&seq_tracker->seq_ids))) OBJ_RELEASE(item); @@ -56,27 +56,27 @@ OBJ_CLASS_INSTANCE( */ bool ompi_seq_tracker_check_duplicate( - ompi_seq_tracker_t* seq_tracker, - uint32_t seq_id) -{ + ompi_seq_tracker_t* seq_tracker, + uint32_t seq_id) +{ ompi_seq_tracker_range_t* item; const ompi_seq_tracker_range_t* sentinel = (ompi_seq_tracker_range_t*)opal_list_get_end(&seq_tracker->seq_ids); int8_t direction = 0; /* 1 is next, -1 is previous */ item = seq_tracker->seq_ids_current; - while(true) { - if(sentinel == item) { + while(true) { + if(sentinel == item) { return false; - } else if(item->seq_id_high >= seq_id && item->seq_id_low <= seq_id) { + } else if(item->seq_id_high >= seq_id && item->seq_id_low <= seq_id) { seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) item; - return true; - } else if(seq_id > item->seq_id_high && direction != -1) { - direction = 1; - item = (ompi_seq_tracker_range_t*) opal_list_get_next(item); - } else if(seq_id < item->seq_id_low && direction != 1) { + return true; + } else if(seq_id > item->seq_id_high && direction != -1) { + direction = 1; + item = (ompi_seq_tracker_range_t*) opal_list_get_next(item); + } else if(seq_id < item->seq_id_low && direction != 1) { direction = -1; - item = (ompi_seq_tracker_range_t*) opal_list_get_prev(item); - } else { + item = (ompi_seq_tracker_range_t*) opal_list_get_prev(item); + } else { return false; } } @@ -86,19 +86,19 @@ bool ompi_seq_tracker_check_duplicate( /* * insert item into sequence tracking list, * compacts continuous regions into a single entry - * GMS::: Use a free list for the items (don't do OBJ_NEW)! + * GMS::: Use a free list for the items (don't do OBJ_NEW)! */ -void ompi_seq_tracker_insert(ompi_seq_tracker_t* seq_tracker, - uint32_t seq_id) -{ - opal_list_t* seq_ids = &seq_tracker->seq_ids; +void ompi_seq_tracker_insert(ompi_seq_tracker_t* seq_tracker, + uint32_t seq_id) +{ + opal_list_t* seq_ids = &seq_tracker->seq_ids; ompi_seq_tracker_range_t* item = seq_tracker->seq_ids_current; int8_t direction = 0; /* 1 is next, -1 is previous */ ompi_seq_tracker_range_t *new_item, *next_item, *prev_item; const ompi_seq_tracker_range_t* sentinel = (ompi_seq_tracker_range_t*)opal_list_get_end(seq_ids); - while( true ) { - if( item == sentinel ) { + while( true ) { + if( item == sentinel ) { new_item = OBJ_NEW(ompi_seq_tracker_range_t); new_item->seq_id_low = new_item->seq_id_high = seq_id; if( -1 == direction ) { @@ -109,71 +109,71 @@ void ompi_seq_tracker_insert(ompi_seq_tracker_t* seq_tracker, seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) new_item; return; - } else if(item->seq_id_high >= seq_id && item->seq_id_low <= seq_id ) { + } else if(item->seq_id_high >= seq_id && item->seq_id_low <= seq_id ) { seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) item; - return; + return; + + } else if((item->seq_id_high + 1) == seq_id) { - } else if((item->seq_id_high + 1) == seq_id) { - - next_item = (ompi_seq_tracker_range_t*) opal_list_get_next(item); - /* try to consolidate */ - if( (sentinel != next_item) && next_item->seq_id_low == (seq_id+1)) { + next_item = (ompi_seq_tracker_range_t*) opal_list_get_next(item); + /* try to consolidate */ + if( (sentinel != next_item) && next_item->seq_id_low == (seq_id+1)) { item->seq_id_high = next_item->seq_id_high; opal_list_remove_item(seq_ids, (opal_list_item_t*) next_item); OBJ_RELEASE(next_item); - } else { + } else { item->seq_id_high = seq_id; - } + } seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) item; - return; - - } else if((item->seq_id_low - 1) == seq_id) { - + return; + + } else if((item->seq_id_low - 1) == seq_id) { + prev_item = (ompi_seq_tracker_range_t*) opal_list_get_prev(item); /* try to consolidate */ - if( (sentinel != prev_item) && prev_item->seq_id_high == (seq_id-1)) { + if( (sentinel != prev_item) && prev_item->seq_id_high == (seq_id-1)) { item->seq_id_low = prev_item->seq_id_low; opal_list_remove_item(seq_ids, (opal_list_item_t*) prev_item); OBJ_RELEASE(prev_item); - } else { - item->seq_id_low = seq_id; + } else { + item->seq_id_low = seq_id; } seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) item; - return; - - } else if(seq_id > item->seq_id_high ) { - if(direction == -1) { - /* we have gone back in the list, and we went one item too far */ + return; + + } else if(seq_id > item->seq_id_high ) { + if(direction == -1) { + /* we have gone back in the list, and we went one item too far */ new_item = OBJ_NEW(ompi_seq_tracker_range_t); - new_item->seq_id_low = new_item->seq_id_high = seq_id; + new_item->seq_id_low = new_item->seq_id_high = seq_id; next_item = (ompi_seq_tracker_range_t*) opal_list_get_next(item); /* insert new_item directly before item */ - opal_list_insert_pos(seq_ids, - (opal_list_item_t*) next_item, - (opal_list_item_t*) new_item); + opal_list_insert_pos(seq_ids, + (opal_list_item_t*) next_item, + (opal_list_item_t*) new_item); seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) new_item; return; - } else { + } else { direction = 1; item = (ompi_seq_tracker_range_t*) opal_list_get_next(item); } - } else if(seq_id < item->seq_id_low) { - if(direction == 1) { - /* we have gone forward in the list, and we went one item too far */ - new_item = OBJ_NEW(ompi_seq_tracker_range_t); - new_item->seq_id_low = new_item->seq_id_high = seq_id; - opal_list_insert_pos(seq_ids, - (opal_list_item_t*) item, - (opal_list_item_t*) new_item); - + } else if(seq_id < item->seq_id_low) { + if(direction == 1) { + /* we have gone forward in the list, and we went one item too far */ + new_item = OBJ_NEW(ompi_seq_tracker_range_t); + new_item->seq_id_low = new_item->seq_id_high = seq_id; + opal_list_insert_pos(seq_ids, + (opal_list_item_t*) item, + (opal_list_item_t*) new_item); + seq_tracker->seq_ids_current = (ompi_seq_tracker_range_t*) new_item; return; - } else { + } else { direction = -1; - item = (ompi_seq_tracker_range_t*) opal_list_get_prev(item); + item = (ompi_seq_tracker_range_t*) opal_list_get_prev(item); } - } else { + } else { return; } } diff --git a/ompi/class/ompi_seq_tracker.h b/ompi/class/ompi_seq_tracker.h index bd638967b5a..46f999820a5 100644 --- a/ompi/class/ompi_seq_tracker.h +++ b/ompi/class/ompi_seq_tracker.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -25,21 +25,21 @@ BEGIN_C_DECLS -struct ompi_seq_tracker_range_t{ - opal_list_item_t super; +struct ompi_seq_tracker_range_t{ + opal_list_item_t super; uint32_t seq_id_high; uint32_t seq_id_low; -}; +}; typedef struct ompi_seq_tracker_range_t ompi_seq_tracker_range_t; OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_seq_tracker_range_t); -struct ompi_seq_tracker_t{ +struct ompi_seq_tracker_t{ opal_list_t seq_ids; /**< list of seqs id's that have been seen */ ompi_seq_tracker_range_t* seq_ids_current; /**< a pointer to the last place we were in the list */ -}; -typedef struct ompi_seq_tracker_t ompi_seq_tracker_t; +}; +typedef struct ompi_seq_tracker_t ompi_seq_tracker_t; OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_seq_tracker_t); @@ -50,7 +50,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_seq_tracker_t); */ OMPI_DECLSPEC bool ompi_seq_tracker_check_duplicate( - ompi_seq_tracker_t* seq_tracker, + ompi_seq_tracker_t* seq_tracker, uint32_t seq_id); @@ -66,5 +66,5 @@ OMPI_DECLSPEC void ompi_seq_tracker_insert(ompi_seq_tracker_t* seq_tracker, uint OMPI_DECLSPEC void ompi_seq_tracker_copy(ompi_seq_tracker_t* dst, ompi_seq_tracker_t* src); END_C_DECLS -#endif +#endif diff --git a/ompi/communicator/Makefile.am b/ompi/communicator/Makefile.am index 6ff60a4c264..0cc5175eca9 100644 --- a/ompi/communicator/Makefile.am +++ b/ompi/communicator/Makefile.am @@ -6,7 +6,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/communicator/comm.c b/ompi/communicator/comm.c index f1e78e078bd..5a1f8edaaba 100644 --- a/ompi/communicator/comm.c +++ b/ompi/communicator/comm.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -22,9 +22,9 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,13 +51,13 @@ #include "ompi/request/request.h" /* -** sort-function for MPI_Comm_split +** sort-function for MPI_Comm_split */ static int rankkeycompare(const void *, const void *); /** * to fill the rest of the stuff for the communicator - */ + */ static int ompi_comm_fill_rest (ompi_communicator_t *comm, int num_procs, ompi_proc_t **proc_pointers, @@ -75,12 +75,12 @@ typedef int ompi_comm_allgatherfct (void* inbuf, int incount, MPI_Datatype intyp mca_coll_base_module_t *data); static int ompi_comm_allgather_emulate_intra (void* inbuf, int incount, MPI_Datatype intype, - void* outbuf, int outcount, - MPI_Datatype outtype, + void* outbuf, int outcount, + MPI_Datatype outtype, ompi_communicator_t *comm, mca_coll_base_module_t *data); -static int ompi_comm_copy_topo (ompi_communicator_t *oldcomm, +static int ompi_comm_copy_topo (ompi_communicator_t *oldcomm, ompi_communicator_t *newcomm); /* idup with local group and info. the local group support is provided to support ompi_comm_set_nb */ @@ -91,21 +91,21 @@ static int ompi_comm_idup_internal (ompi_communicator_t *comm, ompi_group_t *gro /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ -/* +/* * This is the function setting all elements of a communicator. * All other routines are just used to determine these elements. - */ + */ -int ompi_comm_set ( ompi_communicator_t **ncomm, +int ompi_comm_set ( ompi_communicator_t **ncomm, ompi_communicator_t *oldcomm, - int local_size, + int local_size, int *local_ranks, int remote_size, int *remote_ranks, opal_hash_table_t *attr, ompi_errhandler_t *errh, - bool copy_topocomponent, - ompi_group_t *local_group, + bool copy_topocomponent, + ompi_group_t *local_group, ompi_group_t *remote_group ) { ompi_request_t *req; @@ -156,7 +156,7 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm, if (NULL == local_group) { /* determine how the list of local_rank can be stored most efficiently */ - ret = ompi_group_incl(oldcomm->c_local_group, local_size, + ret = ompi_group_incl(oldcomm->c_local_group, local_size, local_ranks, &newcomm->c_local_group); if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { return ret; @@ -167,11 +167,11 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm, ompi_group_increment_proc_count(newcomm->c_local_group); } newcomm->c_my_rank = newcomm->c_local_group->grp_my_rank; - + /* Set remote group and duplicate the local comm, if applicable */ if (0 < remote_size) { if (NULL == remote_group || &ompi_mpi_group_null.group == remote_group) { - ret = ompi_group_incl(oldcomm->c_remote_group, remote_size, + ret = ompi_group_incl(oldcomm->c_remote_group, remote_size, remote_ranks, &newcomm->c_remote_group); if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { return ret; @@ -193,11 +193,11 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm, ompi_comm_idup_internal (oldcomm->c_local_comm, local_group, NULL, &newcomm->c_local_comm, req); } - } else { + } else { newcomm->c_remote_group = newcomm->c_local_group; OBJ_RETAIN(newcomm->c_remote_group); } - + /* Check how many different jobids are represented in this communicator. Necessary for the disconnect of dynamic communicators. */ @@ -208,7 +208,7 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm, /* Set error handler */ newcomm->error_handler = errh; OBJ_RETAIN ( newcomm->error_handler ); - + /* Set Topology, if required and if available */ if ( copy_topocomponent && (NULL != oldcomm->c_topo) ) { /** @@ -220,20 +220,20 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm, return ret; } } - + /* Copy attributes and call according copy functions, if required */ if (NULL != oldcomm->c_keyhash) { if (NULL != attr) { ompi_attr_hash_init(&newcomm->c_keyhash); if (OMPI_SUCCESS != (ret = ompi_attr_copy_all (COMM_ATTR, oldcomm, - newcomm, attr, + newcomm, attr, newcomm->c_keyhash))) { ompi_comm_free(&newcomm); return ret; - } + } } } - + *ncomm = newcomm; return (OMPI_SUCCESS); } @@ -263,7 +263,7 @@ int ompi_comm_group ( ompi_communicator_t* comm, ompi_group_t **group ) /* ** Counterpart to MPI_Comm_create. To be used within OMPI. */ -int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, +int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, ompi_communicator_t **newcomm ) { ompi_communicator_t *newcomp = NULL; @@ -272,26 +272,26 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, int *allranks=NULL; int *rranks=NULL; int rc = OMPI_SUCCESS; - + /* silence clang warning. newcomm should never be NULL */ if (OPAL_UNLIKELY(NULL == newcomm)) { return OMPI_ERR_BAD_PARAM; } lsize = group->grp_proc_count; - + if ( OMPI_COMM_IS_INTER(comm) ) { int tsize; - + tsize = ompi_comm_remote_size(comm); allranks = (int *) malloc ( tsize * sizeof(int)); if ( NULL == allranks ) { rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - - rc = comm->c_coll.coll_allgather ( &(group->grp_my_rank), - 1, MPI_INT, allranks, + + rc = comm->c_coll.coll_allgather ( &(group->grp_my_rank), + 1, MPI_INT, allranks, 1, MPI_INT, comm, comm->c_coll.coll_allgather_module); if ( OMPI_SUCCESS != rc ) { @@ -325,7 +325,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, rranks[j] = i; j++; } - } + } mode = OMPI_COMM_CID_INTER; } else { @@ -333,7 +333,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, rranks = NULL; mode = OMPI_COMM_CID_INTRA; } - + rc = ompi_comm_set ( &newcomp, /* new comm */ comm, /* old comm */ lsize, /* local_size */ @@ -356,7 +356,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, } /* Determine context id. It is identical to f_2_c_handle */ - rc = ompi_comm_nextcid ( newcomp, /* new communicator */ + rc = ompi_comm_nextcid ( newcomp, /* new communicator */ comm, /* old comm */ NULL, /* bridge comm */ NULL, /* local leader */ @@ -368,17 +368,17 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, } /* Set name for debugging purposes */ - snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d CREATE FROM %d", + snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d CREATE FROM %d", newcomp->c_contextid, comm->c_contextid ); /* Activate the communicator and init coll-component */ - rc = ompi_comm_activate( &newcomp, /* new communicator */ - comm, - NULL, - NULL, + rc = ompi_comm_activate( &newcomp, /* new communicator */ + comm, + NULL, NULL, - mode, - -1 ); + NULL, + mode, + -1 ); if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -393,7 +393,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, if ( MPI_UNDEFINED == newcomp->c_local_group->grp_my_rank ) { ompi_comm_free ( &newcomp ); } - + exit: if ( NULL != allranks ) { free ( allranks ); @@ -413,7 +413,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group, /* ** Counterpart to MPI_Comm_split. To be used within OMPI (e.g. MPI_Cart_sub). */ -int ompi_comm_split( ompi_communicator_t* comm, int color, int key, +int ompi_comm_split( ompi_communicator_t* comm, int color, int key, ompi_communicator_t **newcomm, bool pass_on_topo ) { int myinfo[2]; @@ -423,13 +423,13 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, int rsize; int i, loc; int inter; - int *results=NULL, *sorted=NULL; - int *rresults=NULL, *rsorted=NULL; + int *results=NULL, *sorted=NULL; + int *rresults=NULL, *rsorted=NULL; int rc=OMPI_SUCCESS; ompi_communicator_t *newcomp = NULL; int *lranks=NULL, *rranks=NULL; ompi_group_t * local_group=NULL, * remote_group=NULL; - + ompi_comm_allgatherfct *allgatherfct=NULL; /* Step 1: determine all the information for the local group */ @@ -456,7 +456,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, if ( OMPI_SUCCESS != rc ) { goto exit; } - + /* how many have the same color like me */ for ( my_size = 0, i=0; i < size; i++) { if ( results[(2*i)+0] == color) { @@ -475,7 +475,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + /* ok we can now fill this info */ for( loc = 0, i = 0; i < size; i++ ) { if ( results[(2*i)+0] == color) { @@ -484,7 +484,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, loc++; } } - + /* the new array needs to be sorted so that it is in 'key' order */ /* if two keys are equal then it is sorted in original rank order! */ if(my_size>1){ @@ -500,7 +500,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, for (i = 0; i < my_size; i++) { lranks[i] = sorted[i*2]; } - + /* Step 2: determine all the information for the remote group */ /* --------------------------------------------------------- */ if ( inter ) { @@ -513,7 +513,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, } /* this is an allgather on an inter-communicator */ - rc = comm->c_coll.coll_allgather( myinfo, 2, MPI_INT, rresults, 2, + rc = comm->c_coll.coll_allgather( myinfo, 2, MPI_INT, rresults, 2, MPI_INT, comm, comm->c_coll.coll_allgather_module); if ( OMPI_SUCCESS != rc ) { @@ -555,7 +555,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for (i = 0; i < my_rsize; i++) { rranks[i] = rsorted[i*2]; } @@ -569,8 +569,8 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, rranks = NULL; mode = OMPI_COMM_CID_INTRA; } - - + + /* Step 3: set up the communicator */ /* --------------------------------------------------------- */ /* Create the communicator finally */ @@ -608,7 +608,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, } /* Determine context id. It is identical to f_2_c_handle */ - rc = ompi_comm_nextcid ( newcomp, /* new communicator */ + rc = ompi_comm_nextcid ( newcomp, /* new communicator */ comm, /* old comm */ NULL, /* bridge comm */ NULL, /* local leader */ @@ -620,7 +620,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, } /* Set name for debugging purposes */ - snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d SPLIT FROM %d", + snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d SPLIT FROM %d", newcomp->c_contextid, comm->c_contextid ); /* set the rank to MPI_UNDEFINED. This prevents in comm_activate @@ -633,13 +633,13 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, /* Activate the communicator and init coll-component */ - rc = ompi_comm_activate( &newcomp, /* new communicator */ - comm, + rc = ompi_comm_activate( &newcomp, /* new communicator */ + comm, + NULL, NULL, - NULL, - NULL, - mode, - -1 ); + NULL, + mode, + -1 ); if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -682,7 +682,7 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key, /**********************************************************************/ /**********************************************************************/ int -ompi_comm_split_type(ompi_communicator_t *comm, +ompi_comm_split_type(ompi_communicator_t *comm, int split_type, int key, ompi_info_t *info, ompi_communicator_t** newcomm) @@ -694,12 +694,12 @@ ompi_comm_split_type(ompi_communicator_t *comm, int rsize; int i, loc, found; int inter; - int *results=NULL, *sorted=NULL; - int *rresults=NULL, *rsorted=NULL; + int *results=NULL, *sorted=NULL; + int *rresults=NULL, *rsorted=NULL; int rc=OMPI_SUCCESS; ompi_communicator_t *newcomp = NULL; int *lranks=NULL, *rranks=NULL; - + ompi_comm_allgatherfct *allgatherfct=NULL; /* silence clang warning. newcomm should never be NULL */ @@ -783,7 +783,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, goto exit; } } - + /* how many are participating and on my node? */ for ( my_size = 0, i=0; i < size; i++) { if ( results[2*i] == 1 ) { @@ -848,7 +848,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + /* ok we can now fill this info */ for( loc = 0, i = 0; i < size; i++ ) { found = 0; @@ -909,7 +909,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, loc++; } } - + /* the new array needs to be sorted so that it is in 'key' order */ /* if two keys are equal then it is sorted in original rank order! */ if(my_size>1){ @@ -925,7 +925,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, for (i = 0; i < my_size; i++) { lranks[i] = sorted[i*2]; } - + /* Step 2: determine all the information for the remote group */ /* --------------------------------------------------------- */ if ( inter ) { @@ -937,7 +937,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, } /* this is an allgather on an inter-communicator */ - rc = comm->c_coll.coll_allgather( myinfo, 2, MPI_INT, rresults, 2, + rc = comm->c_coll.coll_allgather( myinfo, 2, MPI_INT, rresults, 2, MPI_INT, comm, comm->c_coll.coll_allgather_module); if ( OMPI_SUCCESS != rc ) { @@ -1003,7 +1003,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + /* ok we can now fill this info */ for( loc = 0, i = 0; i < rsize; i++ ) { found = 0; @@ -1063,7 +1063,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, loc++; } } - + /* the new array needs to be sorted so that it is in 'key' order */ /* if two keys are equal then it is sorted in original rank order! */ if(my_rsize > 1) { @@ -1076,7 +1076,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, rc = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for (i = 0; i < my_rsize; i++) { rranks[i] = rsorted[i*2]; } @@ -1088,8 +1088,8 @@ ompi_comm_split_type(ompi_communicator_t *comm, rranks = NULL; mode = OMPI_COMM_CID_INTRA; } - - + + /* Step 3: set up the communicator */ /* --------------------------------------------------------- */ /* Create the communicator finally */ @@ -1115,7 +1115,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, } /* Determine context id. It is identical to f_2_c_handle */ - rc = ompi_comm_nextcid ( newcomp, /* new communicator */ + rc = ompi_comm_nextcid ( newcomp, /* new communicator */ comm, /* old comm */ NULL, /* bridge comm */ NULL, /* local leader */ @@ -1127,7 +1127,7 @@ ompi_comm_split_type(ompi_communicator_t *comm, } /* Set name for debugging purposes */ - snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d SPLIT_TYPE FROM %d", + snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d SPLIT_TYPE FROM %d", newcomp->c_contextid, comm->c_contextid ); /* set the rank to MPI_UNDEFINED. This prevents in comm_activate @@ -1140,13 +1140,13 @@ ompi_comm_split_type(ompi_communicator_t *comm, /* Activate the communicator and init coll-component */ - rc = ompi_comm_activate( &newcomp, /* new communicator */ - comm, + rc = ompi_comm_activate( &newcomp, /* new communicator */ + comm, + NULL, + NULL, NULL, - NULL, - NULL, - mode, - -1 ); + mode, + -1 ); if ( OMPI_SUCCESS != rc ) { goto exit; } @@ -1203,7 +1203,7 @@ int ompi_comm_dup_with_info ( ompi_communicator_t * comm, ompi_info_t *info, omp rsize = comm->c_remote_group->grp_proc_count; mode = OMPI_COMM_CID_INTER; } - + *newcomm = MPI_COMM_NULL; rc = ompi_comm_set ( &newcomp, /* new comm */ @@ -1221,12 +1221,12 @@ int ompi_comm_dup_with_info ( ompi_communicator_t * comm, ompi_info_t *info, omp rc = MPI_ERR_INTERN; return rc; } - if ( MPI_SUCCESS != rc) { + if ( MPI_SUCCESS != rc) { return rc; } /* Determine context id. It is identical to f_2_c_handle */ - rc = ompi_comm_nextcid ( newcomp, /* new communicator */ + rc = ompi_comm_nextcid ( newcomp, /* new communicator */ comm, /* old comm */ NULL, /* bridge comm */ NULL, /* local leader */ @@ -1238,21 +1238,21 @@ int ompi_comm_dup_with_info ( ompi_communicator_t * comm, ompi_info_t *info, omp } /* Set name for debugging purposes */ - snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d DUP FROM %d", + snprintf(newcomp->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d DUP FROM %d", newcomp->c_contextid, comm->c_contextid ); /* activate communicator and init coll-module */ - rc = ompi_comm_activate( &newcomp, /* new communicator */ + rc = ompi_comm_activate( &newcomp, /* new communicator */ comm, - NULL, - NULL, - NULL, - mode, - -1 ); + NULL, + NULL, + NULL, + mode, + -1 ); if ( OMPI_SUCCESS != rc ) { return rc; } - + *newcomm = newcomp; return MPI_SUCCESS; } @@ -1488,7 +1488,7 @@ int ompi_comm_compare(ompi_communicator_t *comm1, ompi_communicator_t *comm2, in *result = MPI_UNEQUAL; return MPI_SUCCESS; } - + /* Compare local groups */ ompi_group_compare((ompi_group_t *)comp1->c_local_group, (ompi_group_t *)comp2->c_local_group, @@ -1505,7 +1505,7 @@ int ompi_comm_compare(ompi_communicator_t *comm1, ompi_communicator_t *comm2, in } - if ( rsize1 > 0 ) { + if ( rsize1 > 0 ) { /* Compare remote groups for inter-communicators */ ompi_group_compare((ompi_group_t *)comp1->c_remote_group, (ompi_group_t *)comp2->c_remote_group, @@ -1562,14 +1562,14 @@ int ompi_comm_set_name (ompi_communicator_t *comm, const char *name ) /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ -/* +/* * Implementation of MPI_Allgather for the local_group in an inter-comm. - * The algorithm consists of two steps: + * The algorithm consists of two steps: * 1. an inter-gather to rank 0 in remote group * 2. an inter-bcast from rank 0 in remote_group. */ -static int ompi_comm_allgather_emulate_intra( void *inbuf, int incount, +static int ompi_comm_allgather_emulate_intra( void *inbuf, int incount, MPI_Datatype intype, void* outbuf, int outcount, MPI_Datatype outtype, ompi_communicator_t *comm, @@ -1605,30 +1605,30 @@ static int ompi_comm_allgather_emulate_intra( void *inbuf, int incount, rc = MCA_PML_CALL(irecv( &tmpbuf[outcount*i], outcount, outtype, i, OMPI_COMM_ALLGATHER_TAG, comm, &req[i] )); if ( OMPI_SUCCESS != rc ) { - goto exit; + goto exit; } } - } + } rc = MCA_PML_CALL(isend( inbuf, incount, intype, 0, OMPI_COMM_ALLGATHER_TAG, MCA_PML_BASE_SEND_STANDARD, comm, &sendreq )); if ( OMPI_SUCCESS != rc ) { - goto exit; + goto exit; } - + if ( 0 == rank ) { rc = ompi_request_wait_all( rsize, req, MPI_STATUSES_IGNORE); if ( OMPI_SUCCESS != rc ) { - goto exit; + goto exit; } } rc = ompi_request_wait( &sendreq, MPI_STATUS_IGNORE); if ( OMPI_SUCCESS != rc ) { - goto exit; + goto exit; } /* Step 2: the inter-bcast step */ - rc = MCA_PML_CALL(irecv (outbuf, size*outcount, outtype, 0, + rc = MCA_PML_CALL(irecv (outbuf, size*outcount, outtype, 0, OMPI_COMM_ALLGATHER_TAG, comm, &sendreq)); if ( OMPI_SUCCESS != rc ) { goto exit; @@ -1636,11 +1636,11 @@ static int ompi_comm_allgather_emulate_intra( void *inbuf, int incount, if ( 0 == rank ) { for ( i=0; i < rsize; i++ ){ - rc = MCA_PML_CALL(send (tmpbuf, rsize*outcount, outtype, i, - OMPI_COMM_ALLGATHER_TAG, + rc = MCA_PML_CALL(send (tmpbuf, rsize*outcount, outtype, i, + OMPI_COMM_ALLGATHER_TAG, MCA_PML_BASE_SEND_STANDARD, comm)); if ( OMPI_SUCCESS != rc ) { - goto exit; + goto exit; } } } @@ -1663,7 +1663,7 @@ static int ompi_comm_allgather_emulate_intra( void *inbuf, int incount, /* ** Counterpart to MPI_Comm_free. To be used within OMPI. ** The freeing of all attached objects (groups, errhandlers -** etc. ) has moved to the destructor. +** etc. ) has moved to the destructor. */ int ompi_comm_free( ompi_communicator_t **comm ) { @@ -1747,8 +1747,8 @@ int ompi_comm_free( ompi_communicator_t **comm ) /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ -ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm, - ompi_communicator_t *bridge_comm, +ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm, + ompi_communicator_t *bridge_comm, int local_leader, int remote_leader, int tag, @@ -1972,7 +1972,7 @@ int ompi_comm_determine_first ( ompi_communicator_t *intercomm, int high ) if (OPAL_UNLIKELY(0 == rsize)) { return OMPI_ERR_BAD_PARAM; } - + rdisps = (int *) calloc ( rsize, sizeof(int)); if ( NULL == rdisps ){ return OMPI_ERR_OUT_OF_RESOURCE; @@ -1983,12 +1983,12 @@ int ompi_comm_determine_first ( ompi_communicator_t *intercomm, int high ) free (rdisps); return OMPI_ERR_OUT_OF_RESOURCE; } - + rcounts[0] = 1; if ( 0 == rank ) { scount = 1; } - + rc = intercomm->c_coll.coll_allgatherv(&high, scount, MPI_INT, &rhigh, rcounts, rdisps, MPI_INT, intercomm, @@ -2034,10 +2034,10 @@ int ompi_comm_determine_first ( ompi_communicator_t *intercomm, int high ) int ompi_comm_dump ( ompi_communicator_t *comm ) { opal_output(0, "Dumping information for comm_cid %d\n", comm->c_contextid); - opal_output(0," f2c index:%d cube_dim: %d\n", comm->c_f_to_c_index, + opal_output(0," f2c index:%d cube_dim: %d\n", comm->c_f_to_c_index, comm->c_cube_dim); - opal_output(0," Local group: size = %d my_rank = %d\n", - comm->c_local_group->grp_proc_count, + opal_output(0," Local group: size = %d my_rank = %d\n", + comm->c_local_group->grp_proc_count, comm->c_local_group->grp_my_rank ); opal_output(0," Communicator is:"); @@ -2061,19 +2061,19 @@ int ompi_comm_dump ( ompi_communicator_t *comm ) /********************************************************************************/ /********************************************************************************/ /* static functions */ -/* -** rankkeygidcompare() compares a tuple of (rank,key,gid) producing -** sorted lists that match the rules needed for a MPI_Comm_split +/* +** rankkeygidcompare() compares a tuple of (rank,key,gid) producing +** sorted lists that match the rules needed for a MPI_Comm_split */ static int rankkeycompare (const void *p, const void *q) { int *a, *b; - + /* ranks at [0] key at [1] */ /* i.e. we cast and just compare the keys and then the original ranks.. */ a = (int*)p; b = (int*)q; - + /* simple tests are those where the keys are different */ if (a[1] < b[1]) { return (-1); @@ -2081,7 +2081,7 @@ static int rankkeycompare (const void *p, const void *q) if (a[1] > b[1]) { return (1); } - + /* ok, if the keys are the same then we check the original ranks */ if (a[1] == b[1]) { if (a[0] < b[0]) { @@ -2177,10 +2177,10 @@ static int ompi_comm_fill_rest(ompi_communicator_t *comm, ompi_errhandler_t *errh) { /* properly decrement the ref counts on the groups. - We are doing this because this function is sort of a redo - of what is done in comm.c. No need to decrement the ref - count on the proc pointers - This is just a quick fix, and will be looking for a + We are doing this because this function is sort of a redo + of what is done in comm.c. No need to decrement the ref + count on the proc pointers + This is just a quick fix, and will be looking for a better solution */ OBJ_RELEASE( comm->c_local_group ); /* silence clang warning about a NULL pointer dereference */ @@ -2189,10 +2189,10 @@ static int ompi_comm_fill_rest(ompi_communicator_t *comm, /* allocate a group structure for the new communicator */ comm->c_local_group = ompi_group_allocate(num_procs); - + /* free the malloced proc pointers */ free(comm->c_local_group->grp_proc_pointers); - + /* set the group information */ comm->c_local_group->grp_proc_pointers = proc_pointers; @@ -2202,7 +2202,7 @@ static int ompi_comm_fill_rest(ompi_communicator_t *comm, /* retain these proc pointers */ ompi_group_increment_proc_count(comm->c_local_group); - + /* set the rank information */ comm->c_local_group->grp_my_rank = my_rank; comm->c_my_rank = my_rank; @@ -2220,7 +2220,7 @@ static int ompi_comm_fill_rest(ompi_communicator_t *comm, /* set name for debugging purposes */ /* there is no cid at this stage ... make this right and make edgars * code call this function and remove dupli cde - */ + */ snprintf (comm->c_name, MPI_MAX_OBJECT_NAME, "MPI_COMMUNICATOR %d", comm->c_contextid); @@ -2230,8 +2230,8 @@ static int ompi_comm_fill_rest(ompi_communicator_t *comm, return OMPI_SUCCESS; } -static int ompi_comm_copy_topo(ompi_communicator_t *oldcomm, - ompi_communicator_t *newcomm) +static int ompi_comm_copy_topo(ompi_communicator_t *oldcomm, + ompi_communicator_t *newcomm) { if( NULL == oldcomm->c_topo ) return OMPI_ERR_NOT_FOUND; diff --git a/ompi/communicator/comm_helpers.c b/ompi/communicator/comm_helpers.c index 247883fa091..584e80ee983 100644 --- a/ompi/communicator/comm_helpers.c +++ b/ompi/communicator/comm_helpers.c @@ -19,7 +19,7 @@ int ompi_comm_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted) { int res; - if (OMPI_COMM_IS_CART(comm)) { + if (OMPI_COMM_IS_CART(comm)) { int ndims; res = MPI_Cartdim_get(comm, &ndims) ; if (MPI_SUCCESS != res) { @@ -57,7 +57,7 @@ int ompi_comm_neighbors(MPI_Comm comm, int maxindegree, int sources[], int sourc } if(indeg > maxindegree && outdeg > maxoutdegree) return MPI_ERR_TRUNCATE; /* we want to return *all* neighbors */ - if (OMPI_COMM_IS_CART(comm)) { + if (OMPI_COMM_IS_CART(comm)) { int ndims, i, rpeer, speer; res = MPI_Cartdim_get(comm, &ndims); if (MPI_SUCCESS != res) { diff --git a/ompi/communicator/comm_helpers.h b/ompi/communicator/comm_helpers.h index 0e001bee632..f589d09de84 100644 --- a/ompi/communicator/comm_helpers.h +++ b/ompi/communicator/comm_helpers.h @@ -37,5 +37,5 @@ int ompi_comm_neighbors(MPI_Comm comm, int maxindegree, int sources[], int sourc #ifdef __cplusplus } #endif - + #endif diff --git a/ompi/communicator/comm_init.c b/ompi/communicator/comm_init.c index d7980cb3246..3cf3ebbc228 100644 --- a/ompi/communicator/comm_init.c +++ b/ompi/communicator/comm_init.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -21,9 +21,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,9 +46,9 @@ ** Table for Fortran <-> C communicator handle conversion ** Also used by P2P code to lookup communicator based ** on cid. -** +** */ -opal_pointer_array_t ompi_mpi_communicators = {{0}}; +opal_pointer_array_t ompi_mpi_communicators = {{0}}; opal_pointer_array_t ompi_comm_f_to_c_table = {{0}}; ompi_predefined_communicator_t ompi_mpi_comm_world = {{{0}}}; @@ -56,7 +56,7 @@ ompi_predefined_communicator_t ompi_mpi_comm_self = {{{0}}}; ompi_predefined_communicator_t ompi_mpi_comm_null = {{{0}}}; ompi_communicator_t *ompi_mpi_comm_parent = NULL; -ompi_predefined_communicator_t *ompi_mpi_comm_world_addr = +ompi_predefined_communicator_t *ompi_mpi_comm_world_addr = &ompi_mpi_comm_world; ompi_predefined_communicator_t *ompi_mpi_comm_self_addr = &ompi_mpi_comm_self; @@ -71,7 +71,7 @@ OBJ_CLASS_INSTANCE(ompi_communicator_t, opal_object_t, ompi_comm_destruct); /* This is the counter for the number of communicators, which contain - process with more than one jobid. This counter is a usefull + process with more than one jobid. This counter is a usefull shortcut for finalize and abort. */ int ompi_comm_num_dyncomm=0; @@ -84,7 +84,7 @@ int ompi_comm_init(void) size_t size; /* Setup communicator array */ - OBJ_CONSTRUCT(&ompi_mpi_communicators, opal_pointer_array_t); + OBJ_CONSTRUCT(&ompi_mpi_communicators, opal_pointer_array_t); if( OPAL_SUCCESS != opal_pointer_array_init(&ompi_mpi_communicators, 0, OMPI_FORTRAN_HANDLE_MAX, 64) ) { return OMPI_ERROR; @@ -170,7 +170,7 @@ int ompi_comm_init(void) assert(ompi_mpi_comm_null.comm.c_f_to_c_index == 2); ompi_mpi_comm_null.comm.c_local_group = &ompi_mpi_group_null.group; ompi_mpi_comm_null.comm.c_remote_group = &ompi_mpi_group_null.group; - OBJ_RETAIN(&ompi_mpi_group_null.group); + OBJ_RETAIN(&ompi_mpi_group_null.group); OBJ_RETAIN(&ompi_mpi_group_null.group); ompi_mpi_comm_null.comm.c_contextid = 2; @@ -213,9 +213,9 @@ ompi_communicator_t *ompi_comm_allocate ( int local_size, int remote_size ) new_comm->c_remote_group = ompi_group_allocate (remote_size); new_comm->c_flags |= OMPI_COMM_INTER; } else { - /* - * simplifies some operations (e.g. p2p), if - * we can always use the remote group + /* + * simplifies some operations (e.g. p2p), if + * we can always use the remote group */ new_comm->c_remote_group = new_comm->c_local_group; OBJ_RETAIN(new_comm->c_remote_group); @@ -227,7 +227,7 @@ ompi_communicator_t *ompi_comm_allocate ( int local_size, int remote_size ) return new_comm; } -int ompi_comm_finalize(void) +int ompi_comm_finalize(void) { int max, i; ompi_communicator_t *comm; @@ -261,22 +261,22 @@ int ompi_comm_finalize(void) OBJ_DESTRUCT (ompi_mpi_comm_parent); /* Please note, that the we did increase the reference count - for ompi_mpi_comm_null, ompi_mpi_group_null, and - ompi_mpi_errors_are_fatal in ompi_comm_init because of - ompi_mpi_comm_parent. In case a + for ompi_mpi_comm_null, ompi_mpi_group_null, and + ompi_mpi_errors_are_fatal in ompi_comm_init because of + ompi_mpi_comm_parent. In case a parent communicator is really created, the ref. counters - for these objects are decreased again by one. However, in a + for these objects are decreased again by one. However, in a static scenario, we should ideally decrease the ref. counter - for these objects by one here. The problem just is, that + for these objects by one here. The problem just is, that if the app had a parent_comm, and this has been freed/disconnected, - ompi_comm_parent points again to ompi_comm_null, the reference count + ompi_comm_parent points again to ompi_comm_null, the reference count for these objects has not been increased again. So the point is, if ompi_mpi_comm_parent == &ompi_mpi_comm_null we do not know whether we have to decrease the ref count for those three objects or not. Since this is a constant, non-increasing - amount of memory, we stick with the current solution for now, + amount of memory, we stick with the current solution for now, namely don't do anything. - */ + */ } /* Shut down MPI_COMM_NULL */ @@ -442,7 +442,7 @@ static void ompi_comm_destruct(ompi_communicator_t* comm) } /* reset the ompi_comm_f_to_c_table entry */ - if ( MPI_UNDEFINED != comm->c_f_to_c_index && + if ( MPI_UNDEFINED != comm->c_f_to_c_index && NULL != opal_pointer_array_get_item(&ompi_comm_f_to_c_table, comm->c_f_to_c_index)) { opal_pointer_array_set_item ( &ompi_comm_f_to_c_table, diff --git a/ompi/communicator/communicator.h b/ompi/communicator/communicator.h index fb1df57cb61..3409e9a082e 100644 --- a/ompi/communicator/communicator.h +++ b/ompi/communicator/communicator.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. diff --git a/ompi/contrib/libompitrace/Makefile.am b/ompi/contrib/libompitrace/Makefile.am index e050e2cddd9..81c4fd78b55 100644 --- a/ompi/contrib/libompitrace/Makefile.am +++ b/ompi/contrib/libompitrace/Makefile.am @@ -6,15 +6,15 @@ # 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, +# 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$ # diff --git a/ompi/contrib/libompitrace/abort.c b/ompi/contrib/libompitrace/abort.c index fcb519a9310..246e4bea335 100644 --- a/ompi/contrib/libompitrace/abort.c +++ b/ompi/contrib/libompitrace/abort.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,17 +23,17 @@ #include "ompi/mpi/c/bindings.h" -int MPI_Abort(MPI_Comm comm, int errorcode) +int MPI_Abort(MPI_Comm comm, int errorcode) { char commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_ABORT[%d]: comm %s errorcode %d\n", rank, commname, errorcode); fflush(stderr); - + return PMPI_Abort(comm, errorcode); } diff --git a/ompi/contrib/libompitrace/accumulate.c b/ompi/contrib/libompitrace/accumulate.c index 4275ced121b..1cee619c6fd 100644 --- a/ompi/contrib/libompitrace/accumulate.c +++ b/ompi/contrib/libompitrace/accumulate.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -30,25 +30,25 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) { - + char typename[MPI_MAX_OBJECT_NAME], target_dt[MPI_MAX_OBJECT_NAME]; char winname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(origin_datatype, typename, &len); PMPI_Type_get_name(target_datatype, target_dt, &len); PMPI_Win_get_name(win, winname, &len); - + fprintf(stderr, "MPI_ACCUMULATE[%d]: origin_addr %0" PRIxPTR " origin_count %d origin_datatype %s\n" "\ttarget_rank %d target_disp %" PRIdPTR " target_count %d target_datatype %s op %s win %s\n", rank, (uintptr_t)origin_addr, origin_count, typename, target_rank, (intptr_t) target_disp, target_count, target_dt, op->o_name, winname); fflush(stderr); - + return PMPI_Accumulate(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win); diff --git a/ompi/contrib/libompitrace/add_error_class.c b/ompi/contrib/libompitrace/add_error_class.c index 030591270c0..721aa3b1fd8 100644 --- a/ompi/contrib/libompitrace/add_error_class.c +++ b/ompi/contrib/libompitrace/add_error_class.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -24,15 +24,15 @@ #include "opal_stdint.h" #include "ompi/mpi/c/bindings.h" -int MPI_Add_error_class(int *errorclass) +int MPI_Add_error_class(int *errorclass) { int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); fprintf(stderr, "MPI_ADD_ERROR_CLASS[%d]: errorclass %0" PRIxPTR "\n", rank, (uintptr_t)errorclass); fflush(stderr); - + return PMPI_Add_error_class(errorclass); } diff --git a/ompi/contrib/libompitrace/add_error_code.c b/ompi/contrib/libompitrace/add_error_code.c index ce8af8b87c9..f1465ab3ba8 100644 --- a/ompi/contrib/libompitrace/add_error_code.c +++ b/ompi/contrib/libompitrace/add_error_code.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -27,11 +27,11 @@ int MPI_Add_error_code(int errorclass, int *errorcode) { int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); - + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + fprintf(stderr, "MPI_ADD_ERROR_CODE[%d]: errorclass %d errcode %0" PRIxPTR "\n", rank, errorclass, (uintptr_t)errorcode); fflush(stderr); - + return PMPI_Add_error_code(errorclass, errorcode); } diff --git a/ompi/contrib/libompitrace/add_error_string.c b/ompi/contrib/libompitrace/add_error_string.c index 11894235c89..499607dd9f9 100644 --- a/ompi/contrib/libompitrace/add_error_string.c +++ b/ompi/contrib/libompitrace/add_error_string.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -28,8 +28,8 @@ int MPI_Add_error_string(int errorcode, const char *string) { int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); fprintf(stderr, "MPI_ADD_ERROR_STRING[%d]: errorcode %d string %s\n", rank, errorcode, string); diff --git a/ompi/contrib/libompitrace/address.c b/ompi/contrib/libompitrace/address.c index 8ed9543bcec..259d9f30639 100644 --- a/ompi/contrib/libompitrace/address.c +++ b/ompi/contrib/libompitrace/address.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,12 +28,12 @@ int MPI_Address(void *location, MPI_Aint *address) { int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); fprintf(stderr, "MPI_ADDRESS[%d]: location %0" PRIxPTR " address %0" PRIxPTR "\n", rank, (uintptr_t)location, (uintptr_t)address); fflush(stderr); - + return PMPI_Address(location, address); } diff --git a/ompi/contrib/libompitrace/allgather.c b/ompi/contrib/libompitrace/allgather.c index 7fe1e3a5130..400464742b0 100644 --- a/ompi/contrib/libompitrace/allgather.c +++ b/ompi/contrib/libompitrace/allgather.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,16 +36,16 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, char commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(sendtype, sendtypename, &len); PMPI_Type_get_name(recvtype, recvtypename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_ALLGATHER[%d]: sendbuf %0" PRIxPTR " sendcount %d sendtype %s\n\trecvbuf %0" PRIxPTR " recvcount %d recvtype %s comm %s\n", rank, (uintptr_t) sendbuf, sendcount, sendtypename, (uintptr_t) recvbuf, recvcount, recvtypename, commname); fflush(stderr); - + return PMPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); } diff --git a/ompi/contrib/libompitrace/allgatherv.c b/ompi/contrib/libompitrace/allgatherv.c index f9f94c38618..4dbff470479 100644 --- a/ompi/contrib/libompitrace/allgatherv.c +++ b/ompi/contrib/libompitrace/allgatherv.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,16 +36,16 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, char commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(sendtype, sendtypename, &len); PMPI_Type_get_name(recvtype, recvtypename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_ALLGATHERV[%d]: sendbuf %0" PRIxPTR " sendcount %d sendtype %s\n\trecvbuf %0" PRIxPTR " recvtype %s comm %s\n", rank, (uintptr_t) sendbuf, sendcount, sendtypename, (uintptr_t) recvbuf, recvtypename, commname); fflush(stderr); - + return PMPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm); } diff --git a/ompi/contrib/libompitrace/alloc_mem.c b/ompi/contrib/libompitrace/alloc_mem.c index d9fa579ec3c..59c0de39a32 100644 --- a/ompi/contrib/libompitrace/alloc_mem.c +++ b/ompi/contrib/libompitrace/alloc_mem.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,12 +27,12 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) { int rank; - + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); - + fprintf(stderr, "MPI_Alloc_mem[%d]: size %0ld\n", rank, (long)size); fflush(stderr); - + return PMPI_Alloc_mem(size, info, baseptr); } diff --git a/ompi/contrib/libompitrace/allreduce.c b/ompi/contrib/libompitrace/allreduce.c index bf3e33ad30f..5382f312b3e 100644 --- a/ompi/contrib/libompitrace/allreduce.c +++ b/ompi/contrib/libompitrace/allreduce.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,19 +29,19 @@ #include "ompi/mpi/c/bindings.h" int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(datatype, typename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_ALLREDUCE[%d]: sendbuf %0" PRIxPTR " recvbuf %0" PRIxPTR " count %d datatype %s op %s comm %s\n", rank, (uintptr_t)sendbuf, (uintptr_t)recvbuf, count, typename, op->o_name, commname); fflush(stderr); - + return PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm); } diff --git a/ompi/contrib/libompitrace/barrier.c b/ompi/contrib/libompitrace/barrier.c index 53ae2d0fa3f..0a1c58ed179 100644 --- a/ompi/contrib/libompitrace/barrier.c +++ b/ompi/contrib/libompitrace/barrier.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,17 +23,17 @@ #include "ompi/mpi/c/bindings.h" -int MPI_Barrier(MPI_Comm comm) +int MPI_Barrier(MPI_Comm comm) { char commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_BARRIER[%d]: comm %s\n", rank, commname); fflush(stderr); - + return PMPI_Barrier(comm); } diff --git a/ompi/contrib/libompitrace/bcast.c b/ompi/contrib/libompitrace/bcast.c index 92351aa40c7..ef6bcdf63a5 100644 --- a/ompi/contrib/libompitrace/bcast.c +++ b/ompi/contrib/libompitrace/bcast.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -32,14 +32,14 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(datatype, typename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_BCAST[%d]: buffer %0" PRIxPTR " count %d datatype %s root %d comm %s\n", rank, (uintptr_t) buffer, count, typename, root, commname); fflush(stderr); - + return PMPI_Bcast(buffer, count, datatype, root, comm); } diff --git a/ompi/contrib/libompitrace/configure.m4 b/ompi/contrib/libompitrace/configure.m4 index 25488e6d0f5..a55b6590785 100644 --- a/ompi/contrib/libompitrace/configure.m4 +++ b/ompi/contrib/libompitrace/configure.m4 @@ -6,19 +6,19 @@ # 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, +# 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-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# OMPI_contrib_libompitrace_CONFIG([action-if-can-compile], +# OMPI_contrib_libompitrace_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([OMPI_contrib_libompitrace_CONFIG],[ diff --git a/ompi/contrib/libompitrace/finalize.c b/ompi/contrib/libompitrace/finalize.c index ee13ebaf0f6..30b4df110cd 100644 --- a/ompi/contrib/libompitrace/finalize.c +++ b/ompi/contrib/libompitrace/finalize.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,11 +26,11 @@ int MPI_Finalize(void) { int rank; - + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); fprintf(stderr, "MPI_FINALIZE[%d]\n", rank); fflush(stderr); - + return PMPI_Finalize(); } diff --git a/ompi/contrib/libompitrace/init.c b/ompi/contrib/libompitrace/init.c index 1dd6f334381..a92f384048c 100644 --- a/ompi/contrib/libompitrace/init.c +++ b/ompi/contrib/libompitrace/init.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2006 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-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,6 +28,6 @@ int MPI_Init(int *argc, char ***argv) { fprintf(stderr, "MPI_INIT: argc %d\n", (0 < *argc) ? *argc : 0); fflush(stderr); - + return PMPI_Init(argc, argv); } diff --git a/ompi/contrib/libompitrace/isend.c b/ompi/contrib/libompitrace/isend.c index bcb1cde88c1..0ef6e508294 100644 --- a/ompi/contrib/libompitrace/isend.c +++ b/ompi/contrib/libompitrace/isend.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -34,14 +34,14 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype type, int dest, char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(type, typename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_ISEND[%d]: buf %0" PRIxPTR " count %d datatype %s dest %d tag %d comm %s\n", rank, (uintptr_t) buf, count, typename, dest, tag, commname); fflush(stderr); - + return PMPI_Isend(buf, count, type, dest, tag, comm, request); } diff --git a/ompi/contrib/libompitrace/recv.c b/ompi/contrib/libompitrace/recv.c index 85e53cc4068..0fc5a9665c7 100644 --- a/ompi/contrib/libompitrace/recv.c +++ b/ompi/contrib/libompitrace/recv.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,19 +26,19 @@ #include "ompi/mpi/c/bindings.h" int MPI_Recv(void *buf, int count, MPI_Datatype type, int source, - int tag, MPI_Comm comm, MPI_Status *status) + int tag, MPI_Comm comm, MPI_Status *status) { char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(type, typename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_RECV[%d]: buf %0" PRIxPTR " count %d datatype %s source %d tag %d comm %s\n", rank, (uintptr_t) buf, count, typename, source, tag, commname); fflush(stderr); - + return PMPI_Recv(buf, count, type, source, tag, comm, status); } diff --git a/ompi/contrib/libompitrace/reduce.c b/ompi/contrib/libompitrace/reduce.c index 55fe60f52df..24fb60f7b85 100644 --- a/ompi/contrib/libompitrace/reduce.c +++ b/ompi/contrib/libompitrace/reduce.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,16 +30,16 @@ #include "ompi/mpi/c/bindings.h" int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) { char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(datatype, typename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr,"MPI_REDUCE[%d]: sendbuf %0" PRIxPTR " recvbuf %0" PRIxPTR " count %d datatype %s op %s root %d comm %s\n", rank, (uintptr_t) sendbuf, (uintptr_t) recvbuf, count, typename, op->o_name, root, commname); fflush(stderr); diff --git a/ompi/contrib/libompitrace/request_free.c b/ompi/contrib/libompitrace/request_free.c index 83944103ade..cc740582e8e 100644 --- a/ompi/contrib/libompitrace/request_free.c +++ b/ompi/contrib/libompitrace/request_free.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,10 +23,10 @@ #include "ompi/mpi/c/bindings.h" -int MPI_Request_free(MPI_Request *request) +int MPI_Request_free(MPI_Request *request) { int rank; - + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); fprintf(stderr, "MPI_REQUEST_FREE[%d]\n", rank); diff --git a/ompi/contrib/libompitrace/send.c b/ompi/contrib/libompitrace/send.c index 6e9b9e5d928..b9eddda57f4 100644 --- a/ompi/contrib/libompitrace/send.c +++ b/ompi/contrib/libompitrace/send.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,16 +29,16 @@ #include "ompi/mpi/c/bindings.h" int MPI_Send(const void *buf, int count, MPI_Datatype type, int dest, - int tag, MPI_Comm comm) + int tag, MPI_Comm comm) { char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME]; int len; int rank; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(type, typename, &len); PMPI_Comm_get_name(comm, commname, &len); - + fprintf(stderr, "MPI_SEND[%d]: : buf %0" PRIxPTR " count %d datatype %s dest %d tag %d comm %s\n", rank, (uintptr_t) buf, count, typename, dest, tag, commname); fflush(stderr); diff --git a/ompi/contrib/libompitrace/sendrecv.c b/ompi/contrib/libompitrace/sendrecv.c index 0b92aa5964c..5fd84cbc11b 100644 --- a/ompi/contrib/libompitrace/sendrecv.c +++ b/ompi/contrib/libompitrace/sendrecv.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,13 +39,13 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int len; int rank; int size; - - PMPI_Comm_rank(MPI_COMM_WORLD, &rank); + + PMPI_Comm_rank(MPI_COMM_WORLD, &rank); PMPI_Type_get_name(sendtype, sendtypename, &len); PMPI_Type_get_name(sendtype, recvtypename, &len); PMPI_Comm_get_name(comm, commname, &len); PMPI_Type_size(recvtype, &size); - + fprintf(stderr, "MPI_SENDRECV[%d]: sendbuf %0" PRIxPTR " sendcount %d sendtype %s dest %d sendtag %d\n\t" "recvbuf %0" PRIxPTR " recvcount %d recvtype %s source %d recvtag %d comm %s\n", rank, (uintptr_t) sendbuf, sendcount, sendtypename, dest, sendtag, diff --git a/ompi/datatype/Makefile.am b/ompi/datatype/Makefile.am index 2897c005cae..b14c05a5a71 100644 --- a/ompi/datatype/Makefile.am +++ b/ompi/datatype/Makefile.am @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/datatype/ompi_datatype_args.c b/ompi/datatype/ompi_datatype_args.c index 946cb1d3ebd..1d189287626 100644 --- a/ompi/datatype/ompi_datatype_args.c +++ b/ompi/datatype/ompi_datatype_args.c @@ -791,7 +791,7 @@ ompi_datatype_t* ompi_datatype_get_single_predefined_type_from_args( ompi_dataty ompi_datatype_t *predef = NULL, *current_type, *current_predef; ompi_datatype_args_t* args = (ompi_datatype_args_t*)type->args; int i; - + if( ompi_datatype_is_predefined(type) ) return type; diff --git a/ompi/datatype/ompi_datatype_external32.c b/ompi/datatype/ompi_datatype_external32.c index 501f8d5fe89..108e14258b7 100644 --- a/ompi/datatype/ompi_datatype_external32.c +++ b/ompi/datatype/ompi_datatype_external32.c @@ -63,7 +63,7 @@ * All floating point values are in big-endian IEEE format. Double extended use 16 bytes, with * 15 exponent bits (bias = 10383), 112 mantissa bits and the same encoding as double. All * integers are in two's complement big-endian format. - * + * * All data are byte aligned, regardless of type. That's exactly what we expect as we can * consider the data stored in external32 as being packed. */ @@ -77,7 +77,7 @@ opal_convertor_t* ompi_mpi_external32_convertor = NULL; opal_convertor_t* ompi_mpi_local_convertor = NULL; int32_t ompi_datatype_default_convertors_init( void ) -{ +{ /* create the extern32 convertor */ ompi_mpi_external32_convertor = opal_convertor_create( ompi_datatype_external32_arch_id, 0 ); diff --git a/ompi/datatype/ompi_datatype_get_elements.c b/ompi/datatype/ompi_datatype_get_elements.c index a350f95fb71..0c1f8a7b842 100644 --- a/ompi/datatype/ompi_datatype_get_elements.c +++ b/ompi/datatype/ompi_datatype_get_elements.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/datatype/ompi_datatype_module.c b/ompi/datatype/ompi_datatype_module.c index 85d092067dd..1f7091dcc01 100644 --- a/ompi/datatype/ompi_datatype_module.c +++ b/ompi/datatype/ompi_datatype_module.c @@ -520,7 +520,7 @@ int32_t ompi_datatype_init( void ) /* The order of the data registration should be the same as the * one in the mpif.h file. Any modification here should be * reflected there !!! Do the Fortran types first so that mpif.h - * can have consecutive, dense numbers. */ + * can have consecutive, dense numbers. */ /* This macro makes everything significantly easier to read below. All hail the moog! :-) */ diff --git a/ompi/debuggers/MPI_Handles_interface.txt b/ompi/debuggers/MPI_Handles_interface.txt index 2b3463a0a42..f81bef8528d 100644 --- a/ompi/debuggers/MPI_Handles_interface.txt +++ b/ompi/debuggers/MPI_Handles_interface.txt @@ -277,7 +277,7 @@ predefined datatypes, and applications can create their own datatypes. creally created with MPI_TYPE_STRUCT, even though they're effectively equivalent). - TYPE_HINDEXED, TYPE_INDEXED, TYPE_HVECTOR, TYPE_VECTOR, - TYPE_STRUCT, TYPE_CONTIGUOUS, + TYPE_STRUCT, TYPE_CONTIGUOUS, JMS: with the type map provided by MPI, a debugger can show "holes" in a datatype (potentially indicating missed optimizations by diff --git a/ompi/debuggers/Makefile.am b/ompi/debuggers/Makefile.am index 47d733ea526..ffc83353ec1 100644 --- a/ompi/debuggers/Makefile.am +++ b/ompi/debuggers/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/debuggers/debuggers.h b/ompi/debuggers/debuggers.h index 1cd8d329461..256bd3559ff 100644 --- a/ompi/debuggers/debuggers.h +++ b/ompi/debuggers/debuggers.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/debuggers/dlopen_test.c b/ompi/debuggers/dlopen_test.c index ba6117bfa13..266a1c24389 100644 --- a/ompi/debuggers/dlopen_test.c +++ b/ompi/debuggers/dlopen_test.c @@ -67,7 +67,7 @@ static int do_test(void) not, skip this test. */ fp = fopen(full_filename, "r"); if (NULL == fp) { - fprintf(stderr, + fprintf(stderr, "File %s.la doesn't seem to exist; skipping this test\n", full_filename); exit(77); diff --git a/ompi/debuggers/mpihandles_interface.h b/ompi/debuggers/mpihandles_interface.h index 20796660f7a..66412414e5f 100644 --- a/ompi/debuggers/mpihandles_interface.h +++ b/ompi/debuggers/mpihandles_interface.h @@ -1,16 +1,16 @@ /* - * Copyright (c) 2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2013 The University of Tennessee and The University of * Tennessee Research Foundation. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * Some text copied from and references made to mpi_interface.h. - * + * * Copyright (C) 2000-2004 by Etnus, LLC * Copyright (C) 1999 by Etnus, Inc. * Copyright (C) 1997-1998 Dolphin Interconnect Solutions Inc. @@ -564,7 +564,7 @@ int mpidbg_init_once(const mqs_basic_callbacks *callbacks); /*-----------------------------------------------------------------------*/ /* Query the DLL to find out what version of the interface it - supports. + supports. Parameters: @@ -581,21 +581,21 @@ int mpidbg_interface_version_compatibility(void); /* Returns a string describing this DLL. - Parameters: + Parameters: None This function will return: A null-terminated string describing this DLL. -*/ +*/ char *mpidbg_version_string(void); /*-----------------------------------------------------------------------*/ /* Returns the address width that this DLL was compiled with. - Parameters: + Parameters: None @@ -617,7 +617,7 @@ int mpidbg_dll_taddr_width(void); the image (e.g., all of the type offsets it needs could be kept here). The debugger will call mqs_destroy_image_info when it no longer wants to keep information about the given executable. - + This will be called once for each executable image in the parallel job. @@ -706,7 +706,7 @@ void mpidbg_finalize_per_image(mqs_image *image, mqs_image_info *image_info); mpidbg_finalize_per_process()). MPIDBG_ERR_*: if something went wrong. */ -int mpidbg_init_per_process(mqs_process *process, +int mpidbg_init_per_process(mqs_process *process, const mqs_process_callbacks *callbacks, struct mpidbg_handle_info_t *handle_types); @@ -751,7 +751,7 @@ void mpidbg_finalize_per_process(mqs_process *process, MPIDBG_ERR_NOT_FOUND: if the handle is not valid / found. MPIDBG_ERR_UNSUPPORTED: if this function is unsupported. */ -int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t c_comm, struct mpidbg_comm_info_t **info); @@ -777,7 +777,7 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, MPIDBG_ERR_NOT_FOUND: if the handle is not valid / found. MPIDBG_ERR_UNSUPPORTED: if this function is unsupported. */ -int mpidbg_comm_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_comm_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_comm, mqs_taddr_t *c_comm); @@ -809,9 +809,9 @@ int mpidbg_comm_f2c(mqs_image *image, mqs_image_info *image_info, MPIDBG_ERR_NOT_FOUND: if the handle is not valid / found. MPIDBG_ERR_UNSUPPORTED: if this function is unsupported. */ -int mpidbg_comm_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_comm_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_comm, + mqs_taddr_t cxx_comm, enum mpidbg_comm_info_bitmap_t comm_type, mqs_taddr_t *c_comm); @@ -825,17 +825,17 @@ int mpidbg_comm_cxx2c(mqs_image *image, mqs_image_info *image_info, "errhandler_type" argument to the cxx2c function because MPI::Errhandler has no derived classes. */ -int mpidbg_errhandler_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_errhandler_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t errhandler, struct mpidbg_errhandler_info_t **info); -int mpidbg_errhandler_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_errhandler_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t f77_errhandler, + mqs_taddr_t f77_errhandler, mqs_taddr_t *c_errhandler); -int mpidbg_errhandler_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_errhandler_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_errhandler, + mqs_taddr_t cxx_errhandler, mqs_taddr_t *c_errhandler); /*----------------------------------------------------------------------- @@ -846,16 +846,16 @@ int mpidbg_errhandler_cxx2c(mqs_image *image, mqs_image_info *image_info, /* These functions are analogous to the mpidbg_comm_* functions, but for MPI_Request. */ -int mpidbg_request_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_request_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t request, struct mpidbg_request_info_t **info); -int mpidbg_request_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_request_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_request, mqs_taddr_t *c_request); -int mpidbg_request_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_request_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_request, + mqs_taddr_t cxx_request, enum mpidbg_request_info_bitmap_t request_type, mqs_taddr_t *c_request); @@ -867,16 +867,16 @@ int mpidbg_request_cxx2c(mqs_image *image, mqs_image_info *image_info, /* These functions are analogous to the mpidbg_comm_* functions, but for MPI_Status. */ -int mpidbg_status_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_status_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t status, struct mpidbg_status_info_t **info); -int mpidbg_status_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_status_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_status, mqs_taddr_t *c_status); -int mpidbg_status_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_status_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_status, + mqs_taddr_t cxx_status, mqs_taddr_t *c_status); #endif /* __MPIDBG_INTERFACE_H__ */ diff --git a/ompi/debuggers/msgq_interface.h b/ompi/debuggers/msgq_interface.h index bb34072b837..097030f64c8 100644 --- a/ompi/debuggers/msgq_interface.h +++ b/ompi/debuggers/msgq_interface.h @@ -4,9 +4,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -58,7 +58,7 @@ * * Aug 5 2002 CLG: Tiny fix to 64 bit taddr_t definition on sun. * Oct 6 2000 JHC: Add all of the MPI-2 relevant types and functions. - * This does need a compatibility number change to + * This does need a compatibility number change to * ensure new libraries can't get loaded into old debuggers. * New debuggers can continue to use old libraries, though. * New functions under control of FOR_MPI2 @@ -72,7 +72,7 @@ * Mar 17 2000 JHC: Add FORCE_32BIT_MPI conditional compilation flag. * Mar 3 2000 JHC: Widen the tword_t and taddr_t on AIX, now that IBM * has 64 bit machines. Increment the version compatibility - * number on AIX (only) since this is an incompatible change in + * number on AIX (only) since this is an incompatible change in * the interface. * Oct 1 1998 JHC: Change MQS_INVALID_PROCESS to -1, TV would never generate * the old value anyway. @@ -92,9 +92,9 @@ * * The interface is specified at the C level, to avoid C++ compiler issues. * - * The interface allows code in the DLL to + * The interface allows code in the DLL to * 1) find named types from the debugger's type system and look up fields in them - * 2) find the address of named external variables + * 2) find the address of named external variables * 3) access objects at absolute addresses in the target process. * 4) convert objects from target format to host format. * @@ -110,7 +110,7 @@ * this provides type checking while maintaining information hiding. * * All named entities in here start with the prefix "mqs_" (for - * Message Queue Support), all the debugger callbacks are made via + * Message Queue Support), all the debugger callbacks are made via * callback tables, so the real (linkage) names of the functions are * not visible to the DLL. */ @@ -127,7 +127,7 @@ BEGIN_C_DECLS /*********************************************************************** - * Version of the interface this header represents + * Version of the interface this header represents */ enum { @@ -210,10 +210,10 @@ typedef struct int bool_size; /* sizeof(bool) */ int size_t_size; /* sizeof(size_t) */ } mqs_target_type_sizes; - -/* Result codes. - * mqs_ok is returned for success. - * Anything else implies a failure of some sort. + +/* Result codes. + * mqs_ok is returned for success. + * Anything else implies a failure of some sort. * * Most of the functions actually return one of these, however to avoid * any potential issues with different compilers implementing enums as @@ -254,8 +254,8 @@ typedef enum { /* Which queue are we interested in ? */ typedef enum { - mqs_pending_sends, - mqs_pending_receives, + mqs_pending_sends, + mqs_pending_receives, mqs_unexpected_messages } mqs_op_class; @@ -265,7 +265,7 @@ enum MQS_INVALID_PROCESS = -1 }; -enum mqs_status +enum mqs_status { mqs_st_pending, mqs_st_matched, mqs_st_complete }; @@ -335,7 +335,7 @@ enum { /* A structure to represent a communicator */ typedef struct { - mqs_taddr_t unique_id; /* A unique tag for the communicator */ + mqs_taddr_t unique_id; /* A unique tag for the communicator */ mqs_tword_t local_rank; /* The rank of this process Comm_rank */ mqs_tword_t size; /* Comm_size */ char name[64]; /* the name if it has one */ @@ -361,12 +361,12 @@ typedef struct /* Fields valid if status >= matched or it's a send */ mqs_tword_t actual_local_rank; /* Actual local rank */ mqs_tword_t actual_global_rank; /* As above but in COMM_WORLD */ - mqs_tword_t actual_tag; + mqs_tword_t actual_tag; mqs_tword_t actual_length; - + /* Additional strings which can be filled in if the DLL has more * info. (Uninterpreted by the debugger, simply displayed to the - * user). + * user). * * Can be used to give the name of the function causing this request, * for instance. @@ -427,10 +427,10 @@ typedef void * (*mqs_malloc_ft) (size_t); typedef void (*mqs_free_ft) (void *); /*********************************************************************** - * Type access functions + * Type access functions */ -/* Given an executable image look up a named type in it. +/* Given an executable image look up a named type in it. * Returns a type handle, or the null pointer if the type could not be * found. Since the debugger may load debug information lazily, the * MPI run time library should ensure that the type definitions @@ -441,7 +441,7 @@ typedef void (*mqs_free_ft) (void *); typedef mqs_type * (*mqs_find_type_ft)(mqs_image *, char *, mqs_lang_code); /* Given the handle for a type (assumed to be a structure) return the - * byte offset of the named field. If the field cannot be found + * byte offset of the named field. If the field cannot be found * the result will be -1. */ typedef int (*mqs_field_offset_ft) (mqs_type *, char *); @@ -459,7 +459,7 @@ typedef void (*mqs_get_type_sizes_ft) (mqs_process *, mqs_target_type_sizes *); */ /* Fetch data from the process into a buffer into a specified buffer. - * N.B. + * N.B. * The data is the same as that in the target process when accessed * as a byte array. You *must* use mqs_target_to_host to do any * necessary byte flipping if you want to look at it at larger @@ -484,7 +484,7 @@ typedef char * (*mqs_errorstring_ft) (int); typedef struct mqs_basic_callbacks { mqs_malloc_ft mqs_malloc_fp; - mqs_free_ft mqs_free_fp; + mqs_free_ft mqs_free_fp; mqs_dprints_ft mqs_dprints_fp; mqs_errorstring_ft mqs_errorstring_fp; mqs_put_image_info_ft mqs_put_image_info_fp; @@ -599,15 +599,15 @@ extern int mqs_destroy_job_info (mqs_job_info *); #endif /*********************************************************************** - * Calls related to a specific process. These will only be called if the - * image which this is an instance of passes the has_message_queues tests. + * Calls related to a specific process. These will only be called if the + * image which this is an instance of passes the has_message_queues tests. * * If you can't tell whether the process will have valid message queues - * just by looking at the image, then you should return mqs_ok from + * just by looking at the image, then you should return mqs_ok from * mqs_image_has_queues and let mqs_process_has_queues handle it. */ -/* Set up whatever process specific information we need. +/* Set up whatever process specific information we need. * For instance addresses of global variables should be handled here, * rather than in the image information if anything is a dynamic library * which could end up mapped differently in different processes. @@ -619,7 +619,7 @@ OMPI_DECLSPEC extern void mqs_destroy_process_info (mqs_process_info *); * if the image claims to have message queues. This lets you actually * delve inside the process to look at variables before deciding if * the process really can support message queue extraction. - */ + */ OMPI_DECLSPEC extern int mqs_process_has_queues (mqs_process *, char **); /*********************************************************************** @@ -627,7 +627,7 @@ OMPI_DECLSPEC extern int mqs_process_has_queues (mqs_process *, char **); * * The model here is that the debugger calls down to the library to initialise * an iteration over a specific class of things, and then keeps calling - * the "next" function until it returns mqs_false. + * the "next" function until it returns mqs_false. * * For communicators we separate stepping from extracting information, * because we want to use the state of the communicator iterator to qualify @@ -688,7 +688,7 @@ extern int mqs_next_new_process (mqs_process *, mqs_process_location *); /* Once the debugger has attached to a newly created process it will * set it up in the normal way, and then set its identity. */ -extern int mqs_set_process_identity (mqs_process *, int); +extern int mqs_set_process_identity (mqs_process *, int); #endif END_C_DECLS diff --git a/ompi/debuggers/ompi_common_dll.c b/ompi/debuggers/ompi_common_dll.c index 9188322b7dd..c5618689e65 100644 --- a/ompi/debuggers/ompi_common_dll.c +++ b/ompi/debuggers/ompi_common_dll.c @@ -12,9 +12,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -369,16 +369,16 @@ int ompi_fill_in_type_info(mqs_image *image, char **message) goto type_missing; } ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_cart.ndims, - cart_type, mca_topo_base_comm_cart_2_2_0_t, + cart_type, mca_topo_base_comm_cart_2_2_0_t, ndims); ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_cart.dims, - cart_type, mca_topo_base_comm_cart_2_2_0_t, + cart_type, mca_topo_base_comm_cart_2_2_0_t, dims); ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_cart.periods, - cart_type, mca_topo_base_comm_cart_2_2_0_t, + cart_type, mca_topo_base_comm_cart_2_2_0_t, periods); ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_cart.coords, - cart_type, mca_topo_base_comm_cart_2_2_0_t, + cart_type, mca_topo_base_comm_cart_2_2_0_t, coords); i_info->mca_topo_base_module_t.offset.mtc_cart.ndims += offset; i_info->mca_topo_base_module_t.offset.mtc_cart.dims += offset; @@ -392,13 +392,13 @@ int ompi_fill_in_type_info(mqs_image *image, char **message) goto type_missing; } ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_graph.nnodes, - graph_type, mca_topo_base_comm_graph_2_2_0_t, + graph_type, mca_topo_base_comm_graph_2_2_0_t, nnodes); ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_graph.index, - graph_type, mca_topo_base_comm_graph_2_2_0_t, + graph_type, mca_topo_base_comm_graph_2_2_0_t, index); ompi_field_offset(i_info->mca_topo_base_module_t.offset.mtc_graph.edges, - graph_type, mca_topo_base_comm_graph_2_2_0_t, + graph_type, mca_topo_base_comm_graph_2_2_0_t, edges); i_info->mca_topo_base_module_t.offset.mtc_graph.nnodes += offset; i_info->mca_topo_base_module_t.offset.mtc_graph.index += offset; @@ -482,7 +482,7 @@ int ompi_fill_in_type_info(mqs_image *image, char **message) /* get ompi_datatype_t super.size which requires the offset * of super and then the offset of size in opal_datatype_t. */ - { + { int super_offset = 0; ompi_field_offset(super_offset, @@ -519,7 +519,7 @@ int ompi_fill_in_type_info(mqs_image *image, char **message) * Functions to access the image memory. They are specialized based * * on the type we want to access and the debugged process architecture * ***********************************************************************/ -mqs_taddr_t ompi_fetch_pointer (mqs_process *proc, mqs_taddr_t addr, +mqs_taddr_t ompi_fetch_pointer (mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info) { int isize = p_info->sizes.pointer_size; @@ -527,15 +527,15 @@ mqs_taddr_t ompi_fetch_pointer (mqs_process *proc, mqs_taddr_t addr, mqs_taddr_t res = 0; if (mqs_ok == mqs_fetch_data (proc, addr, isize, buffer)) - mqs_target_to_host (proc, buffer, - ((char *)&res) + (host_is_big_endian ? sizeof(mqs_taddr_t)-isize : 0), + mqs_target_to_host (proc, buffer, + ((char *)&res) + (host_is_big_endian ? sizeof(mqs_taddr_t)-isize : 0), isize); return res; } /* fetch_pointer */ /***********************************************************************/ -mqs_tword_t ompi_fetch_int (mqs_process *proc, mqs_taddr_t addr, +mqs_tword_t ompi_fetch_int (mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info) { int isize = p_info->sizes.int_size; @@ -543,15 +543,15 @@ mqs_tword_t ompi_fetch_int (mqs_process *proc, mqs_taddr_t addr, mqs_tword_t res = 0; if (mqs_ok == mqs_fetch_data (proc, addr, isize, buffer)) { - mqs_target_to_host (proc, buffer, - ((char *)&res) + (host_is_big_endian ? sizeof(mqs_tword_t)-isize : 0), + mqs_target_to_host (proc, buffer, + ((char *)&res) + (host_is_big_endian ? sizeof(mqs_tword_t)-isize : 0), isize); } return res; } /* fetch_int */ /***********************************************************************/ -mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr, +mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info) { int isize = p_info->sizes.bool_size; @@ -562,7 +562,7 @@ mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr, } /* fetch_bool */ /***********************************************************************/ -mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr, +mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info) { int isize = p_info->sizes.size_t_size; @@ -570,30 +570,30 @@ mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr, mqs_taddr_t res = 0; if (mqs_ok == mqs_fetch_data (proc, addr, isize, buffer)) - mqs_target_to_host (proc, buffer, - ((char *)&res) + (host_is_big_endian ? sizeof(mqs_taddr_t)-isize : 0), + mqs_target_to_host (proc, buffer, + ((char *)&res) + (host_is_big_endian ? sizeof(mqs_taddr_t)-isize : 0), isize); - + return res; } /* fetch_size_t */ /***********************************************************************/ -int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr, +int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info, - int *size, int *lowest_free, + int *size, int *lowest_free, int *number_free) { mqs_image *image = mqs_get_image(proc); mpi_image_info *i_info = (mpi_image_info *) mqs_get_image_info(image); - *size = ompi_fetch_int(proc, + *size = ompi_fetch_int(proc, addr + i_info->opal_pointer_array_t.offset.size, p_info); - *lowest_free = ompi_fetch_int(proc, + *lowest_free = ompi_fetch_int(proc, addr + i_info->opal_pointer_array_t.offset.lowest_free, p_info); - *number_free = ompi_fetch_int(proc, + *number_free = ompi_fetch_int(proc, addr + i_info->opal_pointer_array_t.offset.number_free, p_info); return mqs_ok; @@ -601,7 +601,7 @@ int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr, /***********************************************************************/ -int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr, +int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info, int index, mqs_taddr_t *item) { @@ -614,13 +614,13 @@ int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr, return mqs_no_information; } - ompi_fetch_opal_pointer_array_info(proc, addr, p_info, &size, + ompi_fetch_opal_pointer_array_info(proc, addr, p_info, &size, &lowest_free, &number_free); if (index >= size) { return mqs_no_information; } - base = ompi_fetch_pointer(proc, + base = ompi_fetch_pointer(proc, addr + i_info->opal_pointer_array_t.offset.addr, p_info); *item = ompi_fetch_pointer(proc, diff --git a/ompi/debuggers/ompi_common_dll_defs.h b/ompi/debuggers/ompi_common_dll_defs.h index 527b7fee4c5..7db76e7e41b 100644 --- a/ompi/debuggers/ompi_common_dll_defs.h +++ b/ompi/debuggers/ompi_common_dll_defs.h @@ -8,9 +8,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ * Information associated with a specific executable image. Common * across all DLLs. */ -typedef struct +typedef struct { /* Functions needed here */ const struct mqs_image_callbacks * image_callbacks; @@ -258,12 +258,12 @@ typedef struct /* For the caller to hang their own stuff */ void *extra; -} mpi_image_info; +} mpi_image_info; /***********************************************************************/ /* Information for a single process. Common across all DLLs. */ -typedef struct +typedef struct { const struct mqs_process_callbacks * process_callbacks; /* Functions needed here */ @@ -307,27 +307,27 @@ extern const mqs_basic_callbacks *mqs_basic_entrypoints; int ompi_fill_in_type_info(mqs_image *image, char **message); /* Fetch a pointer from the process */ -mqs_taddr_t ompi_fetch_pointer(mqs_process *proc, mqs_taddr_t addr, +mqs_taddr_t ompi_fetch_pointer(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info); /* Fetch an int from the process */ -mqs_tword_t ompi_fetch_int(mqs_process *proc, mqs_taddr_t addr, +mqs_tword_t ompi_fetch_int(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info); /* Fetch a bool from the process */ -mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr, +mqs_tword_t ompi_fetch_bool(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info); /* Fetch a size_t from the process */ -mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr, +mqs_taddr_t ompi_fetch_size_t(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info); /* Helpers to fetch stuff from an opal_pointer_array_t */ -int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr, +int ompi_fetch_opal_pointer_array_info(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info, - int *size, int *lowest_free, + int *size, int *lowest_free, int *number_free); -int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr, +int ompi_fetch_opal_pointer_array_item(mqs_process *proc, mqs_taddr_t addr, mpi_process_info *p_info, int index, mqs_taddr_t *item); #endif diff --git a/ompi/debuggers/ompi_debugger_canary.c b/ompi/debuggers/ompi_debugger_canary.c index 5c2c4dd5857..3ad4cac0a8c 100644 --- a/ompi/debuggers/ompi_debugger_canary.c +++ b/ompi/debuggers/ompi_debugger_canary.c @@ -2,9 +2,9 @@ * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved * Copyright (c) 2008-2009 Sun Microystems, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -12,7 +12,7 @@ /* * Include all header files for the datatypes that we care about / use - * in the DLL code + * in the DLL code */ #include "ompi/mca/topo/topo.h" #include "ompi/mca/pml/base/pml_base_request.h" diff --git a/ompi/debuggers/ompi_debuggers.c b/ompi/debuggers/ompi_debuggers.c index 8d5177c179a..5f8592eb597 100644 --- a/ompi/debuggers/ompi_debuggers.c +++ b/ompi/debuggers/ompi_debuggers.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -92,7 +92,7 @@ OMPI_DECLSPEC int MPIR_debug_typedefs_sizeof[] = { sizeof(bool), sizeof(size_t) }; - + /* * Values defined by the standardized interface; do not change these * values @@ -131,16 +131,16 @@ OMPI_DECLSPEC char *MPIR_debug_abort_string = ""; static char *ompi_debugger_dll_path = NULL; /* Check for a file in few direct ways for portability */ -static void check(char *dir, char *file, char **locations) +static void check(char *dir, char *file, char **locations) { char *str; asprintf(&str, "%s/%s.so", dir, file); - + #if defined(HAVE_SYS_STAT_H) { struct stat buf; - + /* Use stat() */ if (0 == stat(str, &buf)) { opal_argv_append_nosize(&locations, file); @@ -149,7 +149,7 @@ static void check(char *dir, char *file, char **locations) #else { FILE *fp; - + /* Just try to open the file */ if (NULL != (fp = fopen(str, "r"))) { fclose(fp); @@ -175,7 +175,7 @@ ompi_debugger_setup_dlls(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_debugger_dll_path); - + /* Search the directory for MPI debugger DLLs */ if (NULL != ompi_debugger_dll_path) { dirs = opal_argv_split(ompi_debugger_dll_path, ':'); @@ -212,10 +212,10 @@ void ompi_debugger_notify_abort(char *reason) MPIR_Breakpoint(); } -/* - * Breakpoint function for parallel debuggers. This function is also - * defined in orterun for the starter. It should never conflict with - * this +/* + * Breakpoint function for parallel debuggers. This function is also + * defined in orterun for the starter. It should never conflict with + * this */ void* MPIR_Breakpoint(void) { diff --git a/ompi/debuggers/ompi_mpihandles_dll.c b/ompi/debuggers/ompi_mpihandles_dll.c index 035a6b5b7bf..e93a39564e3 100644 --- a/ompi/debuggers/ompi_mpihandles_dll.c +++ b/ompi/debuggers/ompi_mpihandles_dll.c @@ -6,9 +6,9 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -66,22 +66,22 @@ struct mpidbg_name_map_t *mpidbg_status_name_map = NULL; #if defined(__SUNPRO_C) /* * These symbols are defined here because of the different way compilers - * may handle extern definitions. The particular case that is causing - * problems is when there is an extern variable that is accessed in a - * static inline function. For example, here is the code we often see in + * may handle extern definitions. The particular case that is causing + * problems is when there is an extern variable that is accessed in a + * static inline function. For example, here is the code we often see in * a header file. - * + * * extern int request_complete; * static inline check_request(void) { * request_complete = 1; * } * - * If this code exists in a header file and gets included in a source - * file, then some compilers expect to have request_complete defined - * somewhere even if request_complete is never referenced and - * check_request is never called. Other compilers do not need them defined - * if they are never referenced in the source file. Therefore, to handle - * cases like the above with compilers that require the symbol (like + * If this code exists in a header file and gets included in a source + * file, then some compilers expect to have request_complete defined + * somewhere even if request_complete is never referenced and + * check_request is never called. Other compilers do not need them defined + * if they are never referenced in the source file. Therefore, to handle + * cases like the above with compilers that require the symbol (like * Sun Studio) we add in these definitions here. */ size_t ompi_request_completed; @@ -111,7 +111,7 @@ static struct mpidbg_name_map_t *alloc_map(mqs_image *image, int len) /* Small helper function: look up a symbol, and if we find it, put it in a map entry */ -static void fill_map(mqs_image *image, +static void fill_map(mqs_image *image, char *public_name, char *private_name, struct mpidbg_name_map_t *map) { @@ -131,14 +131,14 @@ static void fill_map(mqs_image *image, } } - printf("OMPI MPI handles DLL: fill_map: Unable to find symbol: %s\n", + printf("OMPI MPI handles DLL: fill_map: Unable to find symbol: %s\n", private_name); } /* Helper function to lookup MPI attributes and fill an mpidbg_attribute_pair_t array with their keys/values */ -static int fill_attributes(int *num_attrs, - struct mpidbg_attribute_pair_t **attrs, +static int fill_attributes(int *num_attrs, + struct mpidbg_attribute_pair_t **attrs, mqs_taddr_t table) { /* JMS fill me in */ @@ -188,7 +188,7 @@ int mpidbg_init_per_image(mqs_image *image, const mqs_image_callbacks *icb, struct mpidbg_handle_info_t *handle_types) { char **message; - mpi_image_info *i_info = + mpi_image_info *i_info = (mpi_image_info *) mqs_malloc(sizeof(mpi_image_info)); printf("mpidbg_init_per_image\n"); @@ -221,28 +221,28 @@ int mpidbg_init_per_image(mqs_image *image, const mqs_image_callbacks *icb, /* JMS: these ompi types are just the "foo" types; but OMPI MPI types are all "foo*"'s -- is this right? If this is wrong, I *suspect* that something like the following may be right: - + handle_types->hi_c_comm = mqs_find_type(image, "ompi_communicator_t*", mqs_lang_c); Need to confirm this with the DDT guys... */ handle_types->hi_c_comm = i_info->ompi_communicator_t.type; handle_types->hi_c_datatype = i_info->ompi_datatype_t.type; - handle_types->hi_c_errhandler = + handle_types->hi_c_errhandler = mqs_find_type(image, "ompi_errhandler_t", mqs_lang_c); - handle_types->hi_c_file = + handle_types->hi_c_file = mqs_find_type(image, "ompi_file_t", mqs_lang_c); handle_types->hi_c_group = i_info->ompi_group_t.type; - handle_types->hi_c_info = + handle_types->hi_c_info = mqs_find_type(image, "ompi_info_t", mqs_lang_c); /* JMS: "MPI_Offset" is a typedef (see comment about MPI_Aint above) */ handle_types->hi_c_offset = mqs_find_type(image, "MPI_Offset", mqs_lang_c); - handle_types->hi_c_op = + handle_types->hi_c_op = mqs_find_type(image, "ompi_op_t", mqs_lang_c); handle_types->hi_c_request = i_info->ompi_request_t.type; handle_types->hi_c_status = i_info->ompi_status_public_t.type; - handle_types->hi_c_win = + handle_types->hi_c_win = mqs_find_type(image, "ompi_win_t", mqs_lang_c); /* MPI::Aint is a typedef to MPI_Aint */ @@ -283,19 +283,19 @@ int mpidbg_init_per_image(mqs_image *image, const mqs_image_callbacks *icb, mqs_find_type(image, "MPI::Win", mqs_lang_cplus); /* Tell the debuger what capabilities we have */ - mpidbg_comm_capabilities = - MPIDBG_COMM_CAP_BASIC | - MPIDBG_COMM_CAP_STRING_NAMES | - MPIDBG_COMM_CAP_FREED_HANDLE | + mpidbg_comm_capabilities = + MPIDBG_COMM_CAP_BASIC | + MPIDBG_COMM_CAP_STRING_NAMES | + MPIDBG_COMM_CAP_FREED_HANDLE | MPIDBG_COMM_CAP_FREED_OBJECT; mpidbg_errhandler_capabilities = - MPIDBG_ERRH_CAP_BASIC | - MPIDBG_ERRH_CAP_STRING_NAMES | - MPIDBG_ERRH_CAP_FREED_HANDLE | + MPIDBG_ERRH_CAP_BASIC | + MPIDBG_ERRH_CAP_STRING_NAMES | + MPIDBG_ERRH_CAP_FREED_HANDLE | MPIDBG_ERRH_CAP_FREED_OBJECT; - mpidbg_request_capabilities = + mpidbg_request_capabilities = MPIDBG_REQUEST_CAP_BASIC; - mpidbg_status_capabilities = + mpidbg_status_capabilities = MPIDBG_STATUS_CAP_BASIC; /* All done */ @@ -323,16 +323,16 @@ void mpidbg_finalize_per_image(mqs_image *image, mqs_image_info *info) * is attached to it, then TV will believe that this process has no * message queue information. */ -int mpidbg_init_per_process(mqs_process *process, +int mpidbg_init_per_process(mqs_process *process, const mqs_process_callbacks *pcb, struct mpidbg_handle_info_t *handle_types) -{ +{ mqs_image *image; mpi_image_info *i_info; /* Extract the addresses of the global variables we need and save them away */ - mpi_process_info *p_info = + mpi_process_info *p_info = (mpi_process_info *) mqs_malloc(sizeof(mpi_process_info)); printf("mpidbg_init_per_process\n"); @@ -433,7 +433,7 @@ void mpidbg_finalize_per_process(mqs_process *process, mqs_process_info *info) /*---------------------------------------------------------------------*/ -int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t c_comm, struct mpidbg_comm_info_t **info) { @@ -458,12 +458,12 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, MPIDBG_MAX_OBJECT_NAME, (*info)->comm_name); /* Get this process' rank in the comm */ - (*info)->comm_rank = ompi_fetch_int(process, + (*info)->comm_rank = ompi_fetch_int(process, c_comm + i_info->ompi_communicator_t.offset.c_my_rank, p_info); /* Analyze the flags on the comm */ - flags = ompi_fetch_int(process, + flags = ompi_fetch_int(process, c_comm + i_info->ompi_communicator_t.offset.c_flags, p_info); (*info)->comm_bitflags = 0; @@ -491,15 +491,15 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, if (0 != (flags & OMPI_COMM_INVALID)) { (*info)->comm_bitflags |= MPIDBG_COMM_INFO_FREED_OBJECT; } - + /* Look up the local group */ - group = ompi_fetch_pointer(process, + group = ompi_fetch_pointer(process, c_comm + i_info->ompi_communicator_t.offset.c_local_group, p_info); - (*info)->comm_rank = ompi_fetch_int(process, + (*info)->comm_rank = ompi_fetch_int(process, group + i_info->ompi_group_t.offset.grp_my_rank, p_info); - (*info)->comm_num_local_procs = ompi_fetch_int(process, + (*info)->comm_num_local_procs = ompi_fetch_int(process, group + i_info->ompi_group_t.offset.grp_proc_count, p_info); @@ -513,10 +513,10 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, /* Look up the remote group (if relevant) */ if (0 != (flags & OMPI_COMM_INTER)) { - group = ompi_fetch_pointer(process, + group = ompi_fetch_pointer(process, c_comm + i_info->ompi_communicator_t.offset.c_remote_group, p_info); - (*info)->comm_num_remote_procs = ompi_fetch_int(process, + (*info)->comm_num_remote_procs = ompi_fetch_int(process, group + i_info->ompi_group_t.offset.grp_proc_count, p_info); (*info)->comm_size = (*info)->comm_num_remote_procs; @@ -533,17 +533,17 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, graph data is just slightly different from each other; it's [slightly] easier (and less confusing!) to have separate retrieval code blocks. */ - topo = ompi_fetch_pointer(process, + topo = ompi_fetch_pointer(process, c_comm + i_info->ompi_communicator_t.offset.c_topo, p_info); - if (0 != topo && + if (0 != topo && 0 != ((*info)->comm_bitflags & MPIDBG_COMM_INFO_CARTESIAN)) { int i, ndims, tmp; mqs_taddr_t dims, periods; /* Alloc space for copying arrays */ (*info)->comm_cart_num_dims = ndims = - ompi_fetch_int(process, + ompi_fetch_int(process, topo + i_info->mca_topo_base_module_t.offset.mtc.cart.ndims, p_info); (*info)->comm_cart_dims = mqs_malloc(ndims * sizeof(int)); @@ -564,13 +564,13 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, /* Retrieve the dimension and periodic description data from the two arrays on the image's communicator */ - dims = ompi_fetch_pointer(process, + dims = ompi_fetch_pointer(process, topo + i_info->mca_topo_base_module_t.offset.mtc.cart.dims, p_info); - periods = ompi_fetch_pointer(process, + periods = ompi_fetch_pointer(process, topo + i_info->mca_topo_base_module_t.offset.mtc.cart.periods, p_info); - coords = ompi_fetch_pointer(process, + coords = ompi_fetch_pointer(process, topo + i_info->mca_topo_base_module_t.offset.mtc.cart.coords, p_info); @@ -587,8 +587,8 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, mqs_taddr_t index, edges; /* Alloc space for copying the indexes */ - (*info)->comm_graph_num_nodes = nnodes = - ompi_fetch_int(process, + (*info)->comm_graph_num_nodes = nnodes = + ompi_fetch_int(process, topo + i_info->mca_topo_base_module_t.offset.mtc.graph.nnodes, p_info); (*info)->comm_graph_index = mqs_malloc(nnodes * sizeof(int)); @@ -597,11 +597,11 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, } /* Retrieve the index data */ - index = ompi_fetch_pointer(process, + index = ompi_fetch_pointer(process, topo + i_info->mca_topo_base_module_t.offset.mtc.graph.index, p_info); for (i = 0; i < nnodes; ++i) { - (*info)->comm_graph_index[i] = + (*info)->comm_graph_index[i] = ompi_fetch_int(process, index + (sizeof(int) * i), p_info); } @@ -614,13 +614,13 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, } /* Retrieve the edge data */ - edges = ompi_fetch_pointer(process, + edges = ompi_fetch_pointer(process, topo + i_info->mca_topo_base_module_t.offset.mtc.graph.edges, p_info); - for (i = 0; - i < (*info)->comm_graph_index[(*info)->comm_graph_num_nodes - 1]; + for (i = 0; + i < (*info)->comm_graph_index[(*info)->comm_graph_num_nodes - 1]; ++i) { - (*info)->comm_graph_edges[i] = + (*info)->comm_graph_edges[i] = ompi_fetch_int(process, edges + (sizeof(int) * i), p_info); } } else if (0 != topo && @@ -629,14 +629,14 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, } /* Fortran handle */ - (*info)->comm_fortran_handle = - ompi_fetch_int(process, + (*info)->comm_fortran_handle = + ompi_fetch_int(process, c_comm + i_info->ompi_communicator_t.offset.c_f_to_c_index, p_info); printf("mpdbg: comm fortran handle: %d\n", (*info)->comm_fortran_handle); /* Fill in attributes */ - keyhash = ompi_fetch_pointer(process, + keyhash = ompi_fetch_pointer(process, c_comm + i_info->ompi_communicator_t.offset.c_keyhash, p_info); fill_attributes(&((*info)->comm_num_attrs), &((*info)->comm_attrs), @@ -653,7 +653,7 @@ int mpidbg_comm_query(mqs_image *image, mqs_image_info *image_info, return MPIDBG_SUCCESS; } -int mpidbg_comm_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_comm_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_comm, mqs_taddr_t *c_comm) { @@ -662,22 +662,22 @@ int mpidbg_comm_f2c(mqs_image *image, mqs_image_info *image_info, mpi_process_info *p_info = (mpi_process_info*) process_info; mqs_find_symbol(image, "ompi_mpi_communicators", &comm_list); - if (mqs_ok != ompi_fetch_opal_pointer_array_item(process, comm_list, + if (mqs_ok != ompi_fetch_opal_pointer_array_item(process, comm_list, p_info, f77_comm, c_comm) || NULL == c_comm) { - printf("mpidbg_comm_f2c: %lu -> not found\n", + printf("mpidbg_comm_f2c: %lu -> not found\n", (long unsigned int) f77_comm); return MPIDBG_ERR_NOT_FOUND; } - printf("mpidbg_comm_f2c: %lu -> %lu\n", + printf("mpidbg_comm_f2c: %lu -> %lu\n", (long unsigned int) f77_comm, (long unsigned int) c_comm); return MPIDBG_SUCCESS; } -int mpidbg_comm_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_comm_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_comm, + mqs_taddr_t cxx_comm, enum mpidbg_comm_info_bitmap_t comm_type, mqs_taddr_t *c_comm) { @@ -690,9 +690,9 @@ int mpidbg_comm_cxx2c(mqs_image *image, mqs_image_info *image_info, /*---------------------------------------------------------------------*/ -int mpidbg_errhandler_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_errhandler_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t c_errhandler, + mqs_taddr_t c_errhandler, struct mpidbg_errhandler_info_t **info) { printf("mpidbg_errhandler_query: %p\n", (void*) c_errhandler); @@ -700,7 +700,7 @@ int mpidbg_errhandler_query(mqs_image *image, mqs_image_info *image_info, return MPIDBG_ERR_NOT_FOUND; } -int mpidbg_errhandler_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_errhandler_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_errhandler, mqs_taddr_t *c_errhandler) { @@ -709,9 +709,9 @@ int mpidbg_errhandler_f2c(mqs_image *image, mqs_image_info *image_info, return MPIDBG_ERR_NOT_FOUND; } -int mpidbg_errhandler_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_errhandler_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_errhandler, + mqs_taddr_t cxx_errhandler, mqs_taddr_t *c_errhandler) { printf("mpidbg_errhandler_cxx2c: %p\n", (void*) cxx_errhandler); @@ -721,9 +721,9 @@ int mpidbg_errhandler_cxx2c(mqs_image *image, mqs_image_info *image_info, /*---------------------------------------------------------------------*/ -int mpidbg_request_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_request_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t c_request, + mqs_taddr_t c_request, struct mpidbg_request_info_t **info) { printf("mpidbg_request_query: %p\n", (void*) c_request); @@ -731,7 +731,7 @@ int mpidbg_request_query(mqs_image *image, mqs_image_info *image_info, return MPIDBG_ERR_NOT_FOUND; } -int mpidbg_request_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_request_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_request, mqs_taddr_t *c_request) { @@ -740,9 +740,9 @@ int mpidbg_request_f2c(mqs_image *image, mqs_image_info *image_info, return MPIDBG_ERR_NOT_FOUND; } -int mpidbg_request_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_request_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_request, + mqs_taddr_t cxx_request, enum mpidbg_request_info_bitmap_t request_type, mqs_taddr_t *c_request) { @@ -753,9 +753,9 @@ int mpidbg_request_cxx2c(mqs_image *image, mqs_image_info *image_info, /*---------------------------------------------------------------------*/ -int mpidbg_status_query(mqs_image *image, mqs_image_info *image_info, +int mpidbg_status_query(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t c_status, + mqs_taddr_t c_status, struct mpidbg_status_info_t **info) { printf("mpidbg_status_query: %p\n", (void*) c_status); @@ -763,7 +763,7 @@ int mpidbg_status_query(mqs_image *image, mqs_image_info *image_info, return MPIDBG_ERR_NOT_FOUND; } -int mpidbg_status_f2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_status_f2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, mqs_taddr_t f77_status, mqs_taddr_t *c_status) { @@ -772,9 +772,9 @@ int mpidbg_status_f2c(mqs_image *image, mqs_image_info *image_info, return MPIDBG_ERR_NOT_FOUND; } -int mpidbg_status_cxx2c(mqs_image *image, mqs_image_info *image_info, +int mpidbg_status_cxx2c(mqs_image *image, mqs_image_info *image_info, mqs_process *process, mqs_process_info *process_info, - mqs_taddr_t cxx_status, + mqs_taddr_t cxx_status, mqs_taddr_t *c_status) { printf("mpidbg_status_cxx2c: %p\n", (void*) cxx_status); diff --git a/ompi/debuggers/ompi_mpihandles_dll_defs.h b/ompi/debuggers/ompi_mpihandles_dll_defs.h index ff0f2240ccc..077a3a9c927 100644 --- a/ompi/debuggers/ompi_mpihandles_dll_defs.h +++ b/ompi/debuggers/ompi_mpihandles_dll_defs.h @@ -4,9 +4,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/debuggers/ompi_msgq_dll.c b/ompi/debuggers/ompi_msgq_dll.c index f3295a10997..6e9a0d65595 100644 --- a/ompi/debuggers/ompi_msgq_dll.c +++ b/ompi/debuggers/ompi_msgq_dll.c @@ -8,9 +8,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -61,9 +61,9 @@ * Oct 27 1997 JHC: Created by exploding db_message_state_mpich.cxx */ -/* - The following was added by William Gropp to improve the portability - to systems with non-ANSI C compilers +/* + The following was added by William Gropp to improve the portability + to systems with non-ANSI C compilers */ #include "ompi_config.h" @@ -75,12 +75,12 @@ #include /* Notice to developers!!!! - * The following include files with _dbg.h suffixes contains definitions + * The following include files with _dbg.h suffixes contains definitions * that are shared between the debuggger plugins and the OMPI code base. * This is done instead of including the non-_dbg suffixed files because - * of the different way compilers may handle extern definitions. The - * particular case that is causing problems is when there is an extern - * variable or function that is accessed in a static inline function. + * of the different way compilers may handle extern definitions. The + * particular case that is causing problems is when there is an extern + * variable or function that is accessed in a static inline function. * For example, here is the code we often see in a header file. * * extern int request_complete; @@ -103,12 +103,12 @@ * * If this code exists it actually compiles fine however an undefined symbol * is kept for foo() and in the case of some tools that load in plugins with - * RTLD_NOW this undefined symbol causes the dlopen to fail since we do not + * RTLD_NOW this undefined symbol causes the dlopen to fail since we do not * have (nor really need) the supporting library containing foo(). * - * Therefore, to handle cases like the above with compilers that require the - * symbols (like Sun Studio) instead of pulling in all of OMPI into the - * plugins or defining dummy symbols here we separate the definitions used by + * Therefore, to handle cases like the above with compilers that require the + * symbols (like Sun Studio) instead of pulling in all of OMPI into the + * plugins or defining dummy symbols here we separate the definitions used by * both sets of code into the _dbg.h files. * * This means if one needs to add another definition that the plugins must see @@ -123,7 +123,7 @@ #include "msgq_interface.h" #include "ompi_msgq_dll_defs.h" -/* +/* End of inclusion */ @@ -205,12 +205,12 @@ int mqs_dll_taddr_width (void) */ /**********************************************************************/ /* Translate a process number */ -static int translate (group_t *this, int index) -{ +static int translate (group_t *this, int index) +{ if (index == MQS_INVALID_PROCESS || ((unsigned int)index) >= ((unsigned int) this->entries)) return MQS_INVALID_PROCESS; - return this->local_to_global[index]; + return this->local_to_global[index]; } /* translate */ /**********************************************************************/ @@ -238,7 +238,7 @@ static group_t * find_or_create_group( mqs_process *proc, DEBUG(VERBOSE_COMM, ("Get a size for the communicator = %d\n", np)); return NULL; /* Makes no sense ! */ } - is_dense = + is_dense = ompi_fetch_int( proc, group_base + i_info->ompi_group_t.offset.grp_flags, p_info ); @@ -255,7 +255,7 @@ static group_t * find_or_create_group( mqs_process *proc, } } - /* Hmm, couldn't find one, so fetch it */ + /* Hmm, couldn't find one, so fetch it */ group = (group_t *)mqs_malloc (sizeof (group_t)); tr = (int *)mqs_malloc (np*sizeof(int)); trbuffer = (char *)mqs_malloc (np*sizeof(mqs_taddr_t)); @@ -263,7 +263,7 @@ static group_t * find_or_create_group( mqs_process *proc, group->group_base = group_base; DEBUG(VERBOSE_GROUP, ("Create a new group 0x%p with %d members\n", (void*)group, np) ); - + tablep = ompi_fetch_pointer( proc, group_base + i_info->ompi_group_t.offset.grp_proc_pointers, p_info); @@ -353,7 +353,7 @@ int mqs_setup_image (mqs_image *image, const mqs_image_callbacks *icb) i_info->extra = NULL; mqs_put_image_info (image, (mqs_image_info *)i_info); - + return mqs_ok; } /* mqs_setup_image */ @@ -402,7 +402,7 @@ int mqs_image_has_queues (mqs_image *image, char **message) * has no message queue information. */ int mqs_setup_process (mqs_process *process, const mqs_process_callbacks *pcb) -{ +{ /* Extract the addresses of the global variables we need and save them away */ mpi_process_info *p_info = (mpi_process_info *)mqs_malloc (sizeof (mpi_process_info)); @@ -470,7 +470,7 @@ int mqs_setup_process (mqs_process *process, const mqs_process_callbacks *pcb) p_info->sizes.size_t_size = ompi_fetch_int( process, /* sizeof (size_t) */ typedefs_sizeof, p_info ); - DEBUG( VERBOSE_GENERAL, + DEBUG( VERBOSE_GENERAL, ("sizes short = %d int = %d long = %d long long = %d " "void* = %d bool = %d size_t = %d\n", p_info->sizes.short_size, p_info->sizes.int_size, @@ -480,7 +480,7 @@ int mqs_setup_process (mqs_process *process, const mqs_process_callbacks *pcb) } mqs_put_process_info (process, (mqs_process_info *)p_info); - + return mqs_ok; } return err_no_store; @@ -501,10 +501,10 @@ int mqs_process_has_queues (mqs_process *proc, char **msg) DEBUG(VERBOSE_GENERAL,("checking the status of the OMPI dll\n")); if (mqs_find_symbol (image, "ompi_mpi_communicators", &extra->commlist_base) != mqs_ok) return err_all_communicators; - + if (mqs_find_symbol (image, "mca_pml_base_send_requests", &extra->send_queue_base) != mqs_ok) return err_mpid_sends; - + if (mqs_find_symbol (image, "mca_pml_base_recv_requests", &extra->recv_queue_base) != mqs_ok) return err_mpid_recvs; DEBUG(VERBOSE_GENERAL,("process_has_queues returned success\n")); @@ -512,7 +512,7 @@ int mqs_process_has_queues (mqs_process *proc, char **msg) } /* mqs_process_has_queues */ /*********************************************************************** - * Check if the communicators have changed by looking at the + * Check if the communicators have changed by looking at the * pointer array values for lowest_free and number_free. */ static int communicators_changed (mqs_process *proc) @@ -576,7 +576,7 @@ static int compare_comms (const void *a, const void *b) } /* compare_comms */ /*********************************************************************** - * Rebuild our list of communicators because something has changed + * Rebuild our list of communicators because something has changed */ static int rebuild_communicator_list (mqs_process *proc) { @@ -633,7 +633,7 @@ static int rebuild_communicator_list (mqs_process *proc) (long long)comm_addr_base, (int)sizeof(mqs_taddr_t))); for( i = 0; (commcount < (comm_size - number_free)) && (i < comm_size); i++ ) { /* Get the communicator pointer */ - comm_ptr = + comm_ptr = ompi_fetch_pointer( proc, comm_addr_base + i * p_info->sizes.pointer_size, p_info ); @@ -966,7 +966,7 @@ static int opal_free_list_t_init_parser( mqs_process *proc, mpi_process_info *p_ (long long)active_allocation, (long long)position->upper_bound)); } position->current_item = active_allocation; - + /*opal_free_list_t_dump_position( position );*/ return mqs_ok; } @@ -1133,12 +1133,12 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info, res->desired_local_rank = ompi_fetch_int( proc, current_item + i_info->mca_pml_base_request_t.offset.req_peer, p_info ); res->desired_global_rank = translate( extra->current_communicator->group, res->desired_local_rank ); - + res->buffer = ompi_fetch_pointer( proc, current_item + i_info->mca_pml_base_request_t.offset.req_addr, p_info ); /* Set this to true if it's a buffered request */ res->system_buffer = FALSE; - + /* The pointer to the request datatype */ ompi_datatype = ompi_fetch_pointer( proc, @@ -1206,7 +1206,7 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info, /* If the length we're looking for is the count ... */ /*res->desired_length = ompi_fetch_int( proc, current_item + i_info->mca_pml_base_request_t.offset.req_count, p_info );*/ - + if( (mqs_st_pending < res->status) && (MCA_PML_REQUEST_SEND != req_type) ) { /* The real data from the status */ res->actual_length = ompi_fetch_size_t( proc, current_item + i_info->ompi_request_t.offset.req_status + @@ -1226,7 +1226,7 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info, } /*********************************************************************** - * Setup to iterate over pending operations + * Setup to iterate over pending operations */ int mqs_setup_operation_iterator (mqs_process *proc, int op) { @@ -1255,7 +1255,7 @@ int mqs_setup_operation_iterator (mqs_process *proc, int op) } /* mqs_setup_operation_iterator */ /*********************************************************************** - * Fetch the next valid operation. + * Fetch the next valid operation. * Since Open MPI only maintains a single queue of each type of operation, * we have to run over it and filter out the operations which * match the active communicator. @@ -1293,11 +1293,11 @@ void mqs_destroy_process_info (mqs_process_info *mp_info) comm = extra->communicator_list; while (comm) { communicator_t *next = comm->next; - + if( NULL != comm->group ) group_decref (comm->group); /* Group is no longer referenced from here */ mqs_free (comm); - + comm = next; } if (NULL != extra) { @@ -1323,95 +1323,95 @@ char * mqs_dll_error_string (int errcode) switch (errcode) { case err_silent_failure: return ""; - case err_no_current_communicator: + case err_no_current_communicator: return "No current communicator in the communicator iterator"; - case err_bad_request: + case err_bad_request: return "Attempting to setup to iterate over an unknown queue of operations"; - case err_no_store: + case err_no_store: return "Unable to allocate store"; - case err_failed_qhdr: + case err_failed_qhdr: return "Failed to find type MPID_QHDR"; - case err_unexpected: + case err_unexpected: return "Failed to find field 'unexpected' in MPID_QHDR"; - case err_posted: + case err_posted: return "Failed to find field 'posted' in MPID_QHDR"; - case err_failed_queue: + case err_failed_queue: return "Failed to find type MPID_QUEUE"; - case err_first: + case err_first: return "Failed to find field 'first' in MPID_QUEUE"; - case err_context_id: + case err_context_id: return "Failed to find field 'context_id' in MPID_QEL"; - case err_tag: + case err_tag: return "Failed to find field 'tag' in MPID_QEL"; - case err_tagmask: + case err_tagmask: return "Failed to find field 'tagmask' in MPID_QEL"; - case err_lsrc: + case err_lsrc: return "Failed to find field 'lsrc' in MPID_QEL"; - case err_srcmask: + case err_srcmask: return "Failed to find field 'srcmask' in MPID_QEL"; - case err_next: + case err_next: return "Failed to find field 'next' in MPID_QEL"; - case err_ptr: + case err_ptr: return "Failed to find field 'ptr' in MPID_QEL"; - case err_missing_type: + case err_missing_type: return "Failed to find some type"; - case err_missing_symbol: + case err_missing_symbol: return "Failed to find field the global symbol"; - case err_db_shandle: + case err_db_shandle: return "Failed to find field 'db_shandle' in MPIR_SQEL"; - case err_db_comm: + case err_db_comm: return "Failed to find field 'db_comm' in MPIR_SQEL"; - case err_db_target: + case err_db_target: return "Failed to find field 'db_target' in MPIR_SQEL"; - case err_db_tag: + case err_db_tag: return "Failed to find field 'db_tag' in MPIR_SQEL"; - case err_db_data: + case err_db_data: return "Failed to find field 'db_data' in MPIR_SQEL"; - case err_db_byte_length: + case err_db_byte_length: return "Failed to find field 'db_byte_length' in MPIR_SQEL"; - case err_db_next: + case err_db_next: return "Failed to find field 'db_next' in MPIR_SQEL"; - case err_failed_rhandle: + case err_failed_rhandle: return "Failed to find type MPIR_RHANDLE"; - case err_is_complete: + case err_is_complete: return "Failed to find field 'is_complete' in MPIR_RHANDLE"; - case err_buf: + case err_buf: return "Failed to find field 'buf' in MPIR_RHANDLE"; - case err_len: + case err_len: return "Failed to find field 'len' in MPIR_RHANDLE"; - case err_s: + case err_s: return "Failed to find field 's' in MPIR_RHANDLE"; - case err_failed_status: + case err_failed_status: return "Failed to find type MPI_Status"; - case err_count: + case err_count: return "Failed to find field 'count' in MPIR_Status"; - case err_MPI_SOURCE: + case err_MPI_SOURCE: return "Failed to find field 'MPI_SOURCE' in MPIR_Status"; - case err_MPI_TAG: + case err_MPI_TAG: return "Failed to find field 'MPI_TAG' in MPIR_Status"; - case err_failed_commlist: + case err_failed_commlist: return "Failed to find type MPIR_Comm_list"; - case err_sequence_number: + case err_sequence_number: return "Failed to find field 'sequence_number' in MPIR_Comm_list"; - case err_comm_first: + case err_comm_first: return "Failed to find field 'comm_first' in MPIR_Comm_list"; - case err_failed_communicator: + case err_failed_communicator: return "Failed to find type MPIR_Communicator"; - case err_lrank_to_grank: + case err_lrank_to_grank: return "Failed to find field 'lrank_to_grank' in MPIR_Communicator"; - case err_send_context: + case err_send_context: return "Failed to find field 'send_context' in MPIR_Communicator"; - case err_recv_context: + case err_recv_context: return "Failed to find field 'recv_context' in MPIR_Communicator"; - case err_comm_next: + case err_comm_next: return "Failed to find field 'comm_next' in MPIR_Communicator"; - case err_comm_name: + case err_comm_name: return "Failed to find field 'comm_name' in MPIR_Communicator"; - case err_all_communicators: + case err_all_communicators: return "Failed to find the global symbol MPIR_All_communicators"; - case err_mpid_sends: + case err_mpid_sends: return "Failed to access the global send requests list"; - case err_mpid_recvs: + case err_mpid_recvs: return "Failed to access the global receive requests list"; case err_group_corrupt: return "Could not read a communicator's group from the process (probably a store corruption)"; diff --git a/ompi/debuggers/ompi_msgq_dll_defs.h b/ompi/debuggers/ompi_msgq_dll_defs.h index d9513e81107..af2d93349c4 100644 --- a/ompi/debuggers/ompi_msgq_dll_defs.h +++ b/ompi/debuggers/ompi_msgq_dll_defs.h @@ -7,9 +7,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -95,7 +95,7 @@ typedef struct { /* Information for a single process, a list of communicators, some * useful addresses, and the state of the iterators. */ -typedef struct +typedef struct { struct communicator_t *communicator_list; /* List of communicators in the process */ @@ -114,7 +114,7 @@ typedef struct int world_proc_array_entries; mqs_taddr_t* world_proc_array; - + mqs_opal_free_list_t_pos next_msg; /* And state for the message iterator */ mqs_op_class what; /* What queue are we looking on */ } mpi_process_info_extra; diff --git a/ompi/debuggers/predefined_gap_test.c b/ompi/debuggers/predefined_gap_test.c index 7a46dce3803..69eb1c1791b 100644 --- a/ompi/debuggers/predefined_gap_test.c +++ b/ompi/debuggers/predefined_gap_test.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2009 Sun Microsystems, Inc All rights reserved. * Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 The University of Tennessee and The University @@ -6,9 +6,9 @@ * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -157,6 +157,6 @@ int main(int argc, char **argv) { GAP_CHECK("f_io_selected_component", test_file, f_io_selected_component, f_io_version, 1); GAP_CHECK("f_io_selected_module", test_file, f_io_selected_module, f_io_selected_component, 1); GAP_CHECK("f_io_selected_data", test_file, f_io_selected_data, f_io_selected_module, 1); - + return 0; } diff --git a/ompi/debuggers/predefined_pad_test.c b/ompi/debuggers/predefined_pad_test.c index b41e16ec17b..a3f724c1731 100644 --- a/ompi/debuggers/predefined_pad_test.c +++ b/ompi/debuggers/predefined_pad_test.c @@ -1,9 +1,9 @@ -/* +/* * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,7 +51,7 @@ static int errors = 0; } \ } while(0) -int main(int argc, char **argv) +int main(int argc, char **argv) { PAD_CHECK(communicator); PAD_CHECK(errhandler); @@ -71,6 +71,6 @@ int main(int argc, char **argv) fprintf(stderr, "NUMBER OF ERRORS: %d\n", errors); exit(1); } - + return 0; } diff --git a/ompi/debuggers/tv-debugger-attach.txt b/ompi/debuggers/tv-debugger-attach.txt index 5561019dcf9..ae5f0052410 100644 --- a/ompi/debuggers/tv-debugger-attach.txt +++ b/ompi/debuggers/tv-debugger-attach.txt @@ -76,7 +76,7 @@ typedef struct { extern MPIR_PROCDESC *MPIR_proctable; extern int MPIR_proctable_size; -/* Various global variables which a debugger can use for +/* Various global variables which a debugger can use for * 1) finding out what the state of the program is at * the time the magic breakpoint is hit. * 2) inform the process that it has been attached to and is @@ -88,9 +88,9 @@ extern char * MPIR_debug_abort_string; extern int MPIR_being_debugged; /* Cause extra info on internal state * to be maintained */ - + /* Values for the debug_state, this seems to be all we need at the moment - * but that may change... + * but that may change... */ #define MPIR_DEBUG_SPAWNED 1 #define MPIR_DEBUG_ABORTING 2 @@ -114,9 +114,9 @@ The named symbols looked for by TotalView are #define MPICH_dll_name "MPIR_dll_name" If the symbol MPIR_dll_name is present in the image, then it is -expected to be +expected to be -extern char [] MPIR_dll_name; +extern char [] MPIR_dll_name; and to contain a string which is the name of the message queue debugging library to use to debug this code. @@ -140,7 +140,7 @@ attached to a process to let it run. Totalview also needs the debug information for the MPIR_PROCDESC type, since it uses that to work out the size and fields in the procedesc -array. +array. If the symbol MPIR_i_am_starter appears in the program then TotalView treats it as a starter process which is not in the MPI world, @@ -170,16 +170,16 @@ in a specific communicator, or a specific rank process in COMM_WORLD). TotalView may choose to ignore this and acquire all processes, and its presence does not prevent TotalView from using the old protocol to acquire all of the processes. (Since setting the MPIR_debug_gate is -harmless). +harmless). All of the code that MPICH uses can be found in the MPICH source release, specifically in initutil.c and debugutil.c Here's a little more description of each of the variables TV -references or sets. +references or sets. MPIR_debug_state - Required. + Required. If we don't see this we won't know what the target process is trying to tell us by hitting the breakpoint, and we'll ignore it. Process acquisition will not work without this variable existing and @@ -193,7 +193,7 @@ MPIR_debug_gate attached to the process. MPIR_debug_abort_string - Not required. + Not required. Or rather, only required to get special handling of MPI_Abort. MPIR_i_am_starter @@ -210,13 +210,13 @@ MPIR_acquired_pre_main in the initially debugged process. MPIR_being_debugged - Not required. + Not required. We try to set this to (int)1 to let the target processes know that they're being debugged. If the symbol doesn't exist we won't write it and won't complain. MPIR_dll_name - Not required. + Not required. If it's not present we'll _only_ use the default name for the debug dll. (But if you don't have dlopen or message queue dumping, that certainly won't matter !) diff --git a/ompi/errhandler/Makefile.am b/ompi/errhandler/Makefile.am index 8d66dade4ca..f8e4be0671d 100644 --- a/ompi/errhandler/Makefile.am +++ b/ompi/errhandler/Makefile.am @@ -6,15 +6,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/errhandler/errcode-internal.c b/ompi/errhandler/errcode-internal.c index 7474e2b7509..37429f6ff81 100644 --- a/ompi/errhandler/errcode-internal.c +++ b/ompi/errhandler/errcode-internal.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reseved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -80,7 +80,7 @@ int ompi_errcode_intern_init (void) ompi_success_intern.mpi_code = MPI_SUCCESS; ompi_success_intern.index = pos++; strncpy(ompi_success_intern.errstring, "OMPI_SUCCESS", OMPI_MAX_ERROR_STRING); - opal_pointer_array_set_item(&ompi_errcodes_intern, ompi_success_intern.index, + opal_pointer_array_set_item(&ompi_errcodes_intern, ompi_success_intern.index, &ompi_success_intern); OBJ_CONSTRUCT(&ompi_error_intern, ompi_errcode_intern_t); diff --git a/ompi/errhandler/errcode-internal.h b/ompi/errhandler/errcode-internal.h index 183f2ec65e8..745098b5a0d 100644 --- a/ompi/errhandler/errcode-internal.h +++ b/ompi/errhandler/errcode-internal.h @@ -6,18 +6,18 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file **/ @@ -51,7 +51,7 @@ typedef struct ompi_errcode_intern_t ompi_errcode_intern_t; OMPI_DECLSPEC extern opal_pointer_array_t ompi_errcodes_intern; OMPI_DECLSPEC extern int ompi_errcode_intern_lastused; -/** +/** * Return the MPI errcode for a given internal error code. */ static inline int ompi_errcode_get_mpi_code(int errcode) { @@ -86,7 +86,7 @@ static inline int ompi_errcode_get_mpi_code(int errcode) * Invoked from ompi_mpi_init(); sets up all static MPI error codes, */ int ompi_errcode_intern_init(void); - + /** * Finalize the error codes. * @@ -95,7 +95,7 @@ int ompi_errcode_intern_init(void); * Invokes from ompi_mpi_finalize(); tears down the error code array. */ int ompi_errcode_intern_finalize(void); - + END_C_DECLS #endif /* OMPI_ERRCODE_INTERNAL_H */ diff --git a/ompi/errhandler/errcode.c b/ompi/errhandler/errcode.c index b344119c459..3a63fa45dff 100644 --- a/ompi/errhandler/errcode.c +++ b/ompi/errhandler/errcode.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -226,9 +226,9 @@ int ompi_mpi_errcode_finalize(void) { int i; ompi_mpi_errcode_t *errc; - + for (i=ompi_mpi_errcode_lastpredefined+1; i<=ompi_mpi_errcode_lastused; i++) { - /* + /* * there are some user defined error-codes, which * we have to free. */ @@ -323,7 +323,7 @@ int ompi_mpi_errcode_add(int errclass ) newerrcode->code = (ompi_mpi_errcode_lastused+1); newerrcode->cls = errclass; opal_pointer_array_set_item(&ompi_mpi_errcodes, newerrcode->code, newerrcode); - + ompi_mpi_errcode_lastused++; return newerrcode->code; } @@ -335,7 +335,7 @@ int ompi_mpi_errclass_add(void) newerrcode = OBJ_NEW(ompi_mpi_errcode_t); newerrcode->cls = ( ompi_mpi_errcode_lastused+1); opal_pointer_array_set_item(&ompi_mpi_errcodes, newerrcode->cls, newerrcode); - + ompi_mpi_errcode_lastused++; return newerrcode->cls; } @@ -345,14 +345,14 @@ int ompi_mpi_errnum_add_string(int errnum, const char *errstring, int len) ompi_mpi_errcode_t *errcodep; errcodep = (ompi_mpi_errcode_t *)opal_pointer_array_get_item(&ompi_mpi_errcodes, errnum); - if ( NULL == errcodep ) { + if ( NULL == errcodep ) { return OMPI_ERROR; } if ( MPI_MAX_ERROR_STRING > len ) { len = MPI_MAX_ERROR_STRING; } - + strncpy ( errcodep->errstring, errstring, len ); return OMPI_SUCCESS; } diff --git a/ompi/errhandler/errcode.h b/ompi/errhandler/errcode.h index 262f34ec9f4..656ddc5576d 100644 --- a/ompi/errhandler/errcode.h +++ b/ompi/errhandler/errcode.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file **/ @@ -34,9 +34,9 @@ BEGIN_C_DECLS /** - * Back-end type for MPI error codes. - * Please note: - * if code == MPI_UNDEFINED, than the according structure + * Back-end type for MPI error codes. + * Please note: + * if code == MPI_UNDEFINED, than the according structure * represents an error class. * For the predefined error codes and classes, code and * cls are both set to the according value. @@ -55,7 +55,7 @@ OMPI_DECLSPEC extern int ompi_mpi_errcode_lastpredefined; OMPI_DECLSPEC extern ompi_mpi_errcode_t ompi_err_unknown; -/** +/** * Check for a valid error code */ static inline bool ompi_mpi_errcode_is_invalid(int errcode) @@ -79,22 +79,22 @@ static inline int ompi_mpi_errcode_get_class (int errcode) } if (NULL != err) { - if ( err->code != MPI_UNDEFINED ) { + if ( err->code != MPI_UNDEFINED ) { return err->cls; } } return ompi_err_unknown.cls; } -static inline int ompi_mpi_errcode_is_predefined ( int errcode ) +static inline int ompi_mpi_errcode_is_predefined ( int errcode ) { - if ( errcode >= 0 && errcode <= ompi_mpi_errcode_lastpredefined ) + if ( errcode >= 0 && errcode <= ompi_mpi_errcode_lastpredefined ) return true; - + return false; } -static inline int ompi_mpi_errnum_is_class ( int errnum ) +static inline int ompi_mpi_errnum_is_class ( int errnum ) { ompi_mpi_errcode_t *err; @@ -103,15 +103,15 @@ static inline int ompi_mpi_errnum_is_class ( int errnum ) } if ( errnum <= ompi_mpi_errcode_lastpredefined ) { - /* Predefined error values represent an error code and + /* Predefined error values represent an error code and an error class at the same time */ return true; } err = (ompi_mpi_errcode_t *)opal_pointer_array_get_item(&ompi_mpi_errcodes, errnum); if (NULL != err) { - if ( MPI_UNDEFINED == err->code) { - /* Distinction between error class and error code is that for the + if ( MPI_UNDEFINED == err->code) { + /* Distinction between error class and error code is that for the first one the code section is set to MPI_UNDEFINED */ return true; } @@ -119,10 +119,10 @@ static inline int ompi_mpi_errnum_is_class ( int errnum ) return false; } - - -/** - * Return the error string + + +/** + * Return the error string */ static inline char* ompi_mpi_errnum_get_string (int errnum) { @@ -151,7 +151,7 @@ static inline char* ompi_mpi_errnum_get_string (int errnum) * Invoked from ompi_mpi_init(); sets up all static MPI error codes, */ int ompi_mpi_errcode_init(void); - + /** * Finalize the error codes. * @@ -160,26 +160,26 @@ int ompi_mpi_errcode_init(void); * Invokes from ompi_mpi_finalize(); tears down the error code array. */ int ompi_mpi_errcode_finalize(void); - -/** + +/** * Add an error code * * @param: error class to which this new error code belongs to * * @returns the new error code on SUCCESS (>0) * @returns OMPI_ERROR otherwise - * + * */ int ompi_mpi_errcode_add (int errclass); -/** +/** * Add an error class * * @param: none * * @returns the new error class on SUCCESS (>0) * @returns OMPI_ERROR otherwise - * + * */ int ompi_mpi_errclass_add (void); @@ -194,7 +194,7 @@ int ompi_mpi_errclass_add (void); * @returns OMPI_ERROR on error */ int ompi_mpi_errnum_add_string (int errnum, const char* string, int len); - + END_C_DECLS #endif /* OMPI_MPI_ERRCODE_H */ diff --git a/ompi/errhandler/errhandler.c b/ompi/errhandler/errhandler.c index 5bda0a28114..d7fee7be54f 100644 --- a/ompi/errhandler/errhandler.c +++ b/ompi/errhandler/errhandler.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,16 +56,16 @@ OBJ_CLASS_INSTANCE(ompi_errhandler_t, opal_object_t, ompi_errhandler_construct, * _addr flavors are for F03 bindings */ ompi_predefined_errhandler_t ompi_mpi_errhandler_null = {{{0}}}; -ompi_predefined_errhandler_t *ompi_mpi_errhandler_null_addr = +ompi_predefined_errhandler_t *ompi_mpi_errhandler_null_addr = &ompi_mpi_errhandler_null; ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal = {{{0}}}; -ompi_predefined_errhandler_t *ompi_mpi_errors_are_fatal_addr = +ompi_predefined_errhandler_t *ompi_mpi_errors_are_fatal_addr = &ompi_mpi_errors_are_fatal; ompi_predefined_errhandler_t ompi_mpi_errors_return = {{{0}}}; -ompi_predefined_errhandler_t *ompi_mpi_errors_return_addr = +ompi_predefined_errhandler_t *ompi_mpi_errors_return_addr = &ompi_mpi_errors_return; ompi_predefined_errhandler_t ompi_mpi_errors_throw_exceptions = {{{0}}}; -ompi_predefined_errhandler_t *ompi_mpi_errors_throw_exceptions_addr = +ompi_predefined_errhandler_t *ompi_mpi_errors_throw_exceptions_addr = &ompi_mpi_errors_throw_exceptions; @@ -92,7 +92,7 @@ int ompi_errhandler_init(void) ompi_mpi_errhandler_null.eh.eh_file_fn = NULL; ompi_mpi_errhandler_null.eh.eh_win_fn = NULL ; ompi_mpi_errhandler_null.eh.eh_fort_fn = NULL; - strncpy (ompi_mpi_errhandler_null.eh.eh_name, "MPI_ERRHANDLER_NULL", + strncpy (ompi_mpi_errhandler_null.eh.eh_name, "MPI_ERRHANDLER_NULL", strlen("MPI_ERRHANDLER_NULL")+1 ); @@ -105,9 +105,9 @@ int ompi_errhandler_init(void) ompi_mpi_errors_are_fatal.eh.eh_file_fn = ompi_mpi_errors_are_fatal_file_handler; ompi_mpi_errors_are_fatal.eh.eh_win_fn = ompi_mpi_errors_are_fatal_win_handler ; ompi_mpi_errors_are_fatal.eh.eh_fort_fn = NULL; - strncpy (ompi_mpi_errors_are_fatal.eh.eh_name, "MPI_ERRORS_ARE_FATAL", + strncpy (ompi_mpi_errors_are_fatal.eh.eh_name, "MPI_ERRORS_ARE_FATAL", strlen("MPI_ERRORS_ARE_FATAL")+1 ); - + OBJ_CONSTRUCT( &ompi_mpi_errors_return.eh, ompi_errhandler_t ); if( ompi_mpi_errors_return.eh.eh_f_to_c_index != OMPI_ERRORS_RETURN_FORTRAN ) return OMPI_ERROR; @@ -117,7 +117,7 @@ int ompi_errhandler_init(void) ompi_mpi_errors_return.eh.eh_file_fn = ompi_mpi_errors_return_file_handler; ompi_mpi_errors_return.eh.eh_win_fn = ompi_mpi_errors_return_win_handler; ompi_mpi_errors_return.eh.eh_fort_fn = NULL; - strncpy (ompi_mpi_errors_return.eh.eh_name, "MPI_ERRORS_RETURN", + strncpy (ompi_mpi_errors_return.eh.eh_name, "MPI_ERRORS_RETURN", strlen("MPI_ERRORS_RETURN")+1 ); /* If we're going to use C++, functions will be fixed up during @@ -126,17 +126,17 @@ int ompi_errhandler_init(void) conversion from C handles to C++ handles happens in that dispatch function -- not the errhandler_invoke.c stuff here in libmpi. */ OBJ_CONSTRUCT( &ompi_mpi_errors_throw_exceptions.eh, ompi_errhandler_t ); - ompi_mpi_errors_throw_exceptions.eh.eh_mpi_object_type = + ompi_mpi_errors_throw_exceptions.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED; ompi_mpi_errors_throw_exceptions.eh.eh_lang = OMPI_ERRHANDLER_LANG_C; - ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn = + ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn = ompi_mpi_errors_are_fatal_comm_handler; - ompi_mpi_errors_throw_exceptions.eh.eh_file_fn = + ompi_mpi_errors_throw_exceptions.eh.eh_file_fn = ompi_mpi_errors_are_fatal_file_handler; - ompi_mpi_errors_throw_exceptions.eh.eh_win_fn = + ompi_mpi_errors_throw_exceptions.eh.eh_win_fn = ompi_mpi_errors_are_fatal_win_handler ; ompi_mpi_errors_throw_exceptions.eh.eh_fort_fn = NULL; - strncpy (ompi_mpi_errors_throw_exceptions.eh.eh_name, "MPI_ERRORS_THROW_EXCEPTIONS", + strncpy (ompi_mpi_errors_throw_exceptions.eh.eh_name, "MPI_ERRORS_THROW_EXCEPTIONS", strlen("MPI_ERRORS_THROW_EXCEPTIONS")+1 ); /* All done */ @@ -187,7 +187,7 @@ ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, function pointer types in the union; it doesn't matter which. It only matters that we dereference/use the right member when invoking the callback. */ - + new_errhandler->eh_mpi_object_type = object_type; new_errhandler->eh_lang = lang; switch (object_type ) { @@ -220,11 +220,11 @@ int ompi_errhandler_runtime_callback(opal_pointer_array_t *errors) { ompi_rte_error_report_t *err; int errcode = 1; - if (NULL != errors && + if (NULL != errors && (NULL != (err = (ompi_rte_error_report_t*)opal_pointer_array_get_item(errors, 0)))) { errcode = err->errcode; } - + ompi_mpi_abort(MPI_COMM_WORLD, errcode); return OMPI_SUCCESS; } @@ -244,7 +244,7 @@ static void ompi_errhandler_construct(ompi_errhandler_t *new_errhandler) /* assign entry in fortran <-> c translation array */ - ret_val = opal_pointer_array_add(&ompi_errhandler_f_to_c_table, + ret_val = opal_pointer_array_add(&ompi_errhandler_f_to_c_table, new_errhandler); new_errhandler->eh_f_to_c_index = ret_val; diff --git a/ompi/errhandler/errhandler.h b/ompi/errhandler/errhandler.h index 8a5151fbc2b..647836cd67b 100644 --- a/ompi/errhandler/errhandler.h +++ b/ompi/errhandler/errhandler.h @@ -6,16 +6,16 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file **/ @@ -51,7 +51,7 @@ enum { /** * Typedef for all fortran errhandler functions */ -typedef void (ompi_errhandler_fortran_handler_fn_t)(MPI_Fint *, +typedef void (ompi_errhandler_fortran_handler_fn_t)(MPI_Fint *, MPI_Fint *, ...); /** @@ -102,7 +102,7 @@ struct ompi_errhandler_t { char eh_name[MPI_MAX_OBJECT_NAME]; /* Type of MPI object that this handler is for */ - + ompi_errhandler_type_t eh_mpi_object_type; /* What language was the error handler created in */ @@ -307,7 +307,7 @@ struct ompi_request_t; * comm, win, or win) * @param type The type of the MPI object. Necessary, since * you can not assign a single type to the predefined - * error handlers. This information is therefore + * error handlers. This information is therefore * stored on the MPI object itself. * @param err_code The error code * @param message Any additional message; typically the name of the @@ -323,7 +323,7 @@ struct ompi_request_t; * If this function returns, it returns the err_code. Note that it * may not return (e.g., for MPI_ERRORS_ARE_FATAL). */ - OMPI_DECLSPEC int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, + OMPI_DECLSPEC int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, int type, int err_code, const char *message); @@ -333,7 +333,7 @@ struct ompi_request_t; * is safe to invoke this function if none of the requests have an * outstanding error; MPI_SUCCESS will be returned. */ - int ompi_errhandler_request_invoke(int count, + int ompi_errhandler_request_invoke(int count, struct ompi_request_t **requests, const char *message); @@ -349,7 +349,7 @@ struct ompi_request_t; * This function is called as the back-end of all the * MPI_*_CREATE_ERRHANDLER functions. It creates a new * ompi_errhandler_t object, initializes it to the correct object - * type, and sets the callback function on it. + * type, and sets the callback function on it. * * The type of the function pointer is (arbitrarily) the fortran * function handler type. Since this function has to accept 4 @@ -362,7 +362,7 @@ struct ompi_request_t; OMPI_DECLSPEC ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, ompi_errhandler_generic_handler_fn_t *func, ompi_errhandler_lang_t language); - + /** * Callback function from runtime layer to alert the MPI layer of an error at * the runtime layer. @@ -401,7 +401,7 @@ OMPI_DECLSPEC int ompi_errhandler_runtime_callback(opal_pointer_array_t *errors) */ static inline bool ompi_errhandler_is_intrinsic(ompi_errhandler_t *errhandler) { - if ( OMPI_ERRHANDLER_TYPE_PREDEFINED == errhandler->eh_mpi_object_type ) + if ( OMPI_ERRHANDLER_TYPE_PREDEFINED == errhandler->eh_mpi_object_type ) return true; return false; diff --git a/ompi/errhandler/errhandler_invoke.c b/ompi/errhandler/errhandler_invoke.c index 9d3efca5713..2b09e7eec40 100644 --- a/ompi/errhandler/errhandler_invoke.c +++ b/ompi/errhandler/errhandler_invoke.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,23 +28,23 @@ #include "ompi/mpi/fortran/base/fint_2_int.h" -int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, +int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, int object_type, int err_code, const char *message) { MPI_Fint fortran_handle, fortran_err_code = OMPI_INT_2_FINT(err_code); ompi_communicator_t *comm; ompi_win_t *win; ompi_file_t *file; - + /* If we got no errorhandler, then just invoke errors_abort */ if (NULL == errhandler) { ompi_mpi_errors_are_fatal_comm_handler(NULL, NULL, message); return err_code; } - + /* Figure out what kind of errhandler it is, figure out if it's fortran or C, and then invoke it */ - + switch (object_type) { case OMPI_ERRHANDLER_TYPE_COMM: comm = (ompi_communicator_t *) mpi_object; @@ -52,12 +52,12 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, case OMPI_ERRHANDLER_LANG_C: errhandler->eh_comm_fn(&comm, &err_code, message, NULL); break; - + case OMPI_ERRHANDLER_LANG_CXX: - errhandler->eh_cxx_dispatch_fn(errhandler, &comm, + errhandler->eh_cxx_dispatch_fn(errhandler, &comm, &err_code, message); break; - + case OMPI_ERRHANDLER_LANG_FORTRAN: fortran_handle = OMPI_INT_2_FINT(comm->c_f_to_c_index); errhandler->eh_fort_fn(&fortran_handle, &fortran_err_code); @@ -65,19 +65,19 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, break; } break; - + case OMPI_ERRHANDLER_TYPE_WIN: win = (ompi_win_t *) mpi_object; switch (errhandler->eh_lang) { case OMPI_ERRHANDLER_LANG_C: errhandler->eh_win_fn(&win, &err_code, message, NULL); break; - + case OMPI_ERRHANDLER_LANG_CXX: - errhandler->eh_cxx_dispatch_fn(errhandler, &win, + errhandler->eh_cxx_dispatch_fn(errhandler, &win, &err_code, message); break; - + case OMPI_ERRHANDLER_LANG_FORTRAN: fortran_handle = OMPI_INT_2_FINT(win->w_f_to_c_index); errhandler->eh_fort_fn(&fortran_handle, &fortran_err_code); @@ -85,19 +85,19 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, break; } break; - + case OMPI_ERRHANDLER_TYPE_FILE: file = (ompi_file_t *) mpi_object; switch (errhandler->eh_lang) { case OMPI_ERRHANDLER_LANG_C: errhandler->eh_file_fn(&file, &err_code, message, NULL); break; - + case OMPI_ERRHANDLER_LANG_CXX: - errhandler->eh_cxx_dispatch_fn(errhandler, &file, + errhandler->eh_cxx_dispatch_fn(errhandler, &file, &err_code, message); break; - + case OMPI_ERRHANDLER_LANG_FORTRAN: fortran_handle = OMPI_INT_2_FINT(file->f_f_to_c_index); errhandler->eh_fort_fn(&fortran_handle, &fortran_err_code); @@ -106,13 +106,13 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object, } break; } - + /* All done */ return err_code; } -int ompi_errhandler_request_invoke(int count, +int ompi_errhandler_request_invoke(int count, struct ompi_request_t **requests, const char *message) { @@ -148,8 +148,8 @@ int ompi_errhandler_request_invoke(int count, MPI_SUCCESS != requests[i]->req_status.MPI_ERROR) { /* Ignore the error -- what are we going to do? We're already going to invoke an exception */ - ompi_request_free(&(requests[i])); - } + ompi_request_free(&(requests[i])); + } } /* Invoke the exception */ diff --git a/ompi/errhandler/errhandler_predefined.c b/ompi/errhandler/errhandler_predefined.c index 1d42afeffc7..dbc753b5dfc 100644 --- a/ompi/errhandler/errhandler_predefined.c +++ b/ompi/errhandler/errhandler_predefined.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ /* * Local functions */ -static void backend_fatal(char *type, struct ompi_communicator_t *comm, +static void backend_fatal(char *type, struct ompi_communicator_t *comm, char *name, int *error_code, va_list arglist); static void out(char *str, char *arg); @@ -115,7 +115,7 @@ void ompi_mpi_errors_return_comm_handler(struct ompi_communicator_t **comm, { /* Don't need anything more -- just need this function to exist */ /* Silence some compiler warnings */ - + va_list arglist; va_start(arglist, error_code); va_end(arglist); @@ -127,7 +127,7 @@ void ompi_mpi_errors_return_file_handler(struct ompi_file_t **file, { /* Don't need anything more -- just need this function to exist */ /* Silence some compiler warnings */ - + va_list arglist; va_start(arglist, error_code); va_end(arglist); @@ -139,7 +139,7 @@ void ompi_mpi_errors_return_win_handler(struct ompi_win_t **win, { /* Don't need anything more -- just need this function to exist */ /* Silence some compiler warnings */ - + va_list arglist; va_start(arglist, error_code); va_end(arglist); @@ -165,16 +165,16 @@ static void out(char *str, char *arg) /* * Use opal_show_help() to aggregate the error messages (i.e., show it - * once rather than N times). + * once rather than N times). * * Note that this function will only be invoked for errors during the * MPI application (i.e., after MPI_INIT and before MPI_FINALIZE). So * there's no need to handle the pre-MPI_INIT and post-MPI_FINALIZE * errors here. */ -static void backend_fatal_aggregate(char *type, +static void backend_fatal_aggregate(char *type, struct ompi_communicator_t *comm, - char *name, int *error_code, + char *name, int *error_code, va_list arglist) { char *arg, *prefix, *err_msg = "Unknown error"; @@ -198,14 +198,14 @@ static void backend_fatal_aggregate(char *type, } if (NULL != name) { - opal_show_help("help-mpi-errors.txt", + opal_show_help("help-mpi-errors.txt", "mpi_errors_are_fatal", false, prefix, (NULL == arg) ? "" : "in", (NULL == arg) ? "" : arg, prefix, OMPI_PROC_MY_NAME->jobid, OMPI_PROC_MY_NAME->vpid, prefix, type, name, prefix, err_msg, prefix, type, prefix); } else { - opal_show_help("help-mpi-errors.txt", + opal_show_help("help-mpi-errors.txt", "mpi_errors_are_fatal unknown handle", false, prefix, (NULL == arg) ? "" : "in", (NULL == arg) ? "" : arg, @@ -218,7 +218,7 @@ static void backend_fatal_aggregate(char *type, } } -/* +/* * Note that this function has to handle pre-MPI_INIT and * post-MPI_FINALIZE errors, which backend_fatal_aggregate() does not * have to handle. @@ -228,9 +228,9 @@ static void backend_fatal_aggregate(char *type, * we *might* be able to get a message out if we're not further * corrupting the stack by calling malloc()... */ -static void backend_fatal_no_aggregate(char *type, +static void backend_fatal_no_aggregate(char *type, struct ompi_communicator_t *comm, - char *name, int *error_code, + char *name, int *error_code, va_list arglist) { char *arg; @@ -271,7 +271,7 @@ static void backend_fatal_no_aggregate(char *type, else { int len; char str[MPI_MAX_PROCESSOR_NAME * 2]; - + /* THESE MESSAGES ARE COORDINATED WITH FIXED STRINGS IN help-mpi-errors.txt! Do not change these messages without also changing help-mpi-errors.txt! */ @@ -291,11 +291,11 @@ static void backend_fatal_no_aggregate(char *type, str[0] = '\0'; len = sizeof(str) - 1; strncat(str, type, len); - + len -= strlen(type); if (len > 0) { strncat(str, " ", len); - + --len; if (len > 0) { strncat(str, name, len); @@ -325,7 +325,7 @@ static void backend_fatal_no_aggregate(char *type, } static void backend_fatal(char *type, struct ompi_communicator_t *comm, - char *name, int *error_code, + char *name, int *error_code, va_list arglist) { /* We only want aggregation after MPI_INIT and before diff --git a/ompi/errhandler/errhandler_predefined.h b/ompi/errhandler/errhandler_predefined.h index 99aaf4ef6dd..60fe9f40758 100644 --- a/ompi/errhandler/errhandler_predefined.h +++ b/ompi/errhandler/errhandler_predefined.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/errhandler/help-mpi-errors.txt b/ompi/errhandler/help-mpi-errors.txt index 44f0cd329e3..a6dcf7172ea 100644 --- a/ompi/errhandler/help-mpi-errors.txt +++ b/ompi/errhandler/help-mpi-errors.txt @@ -6,16 +6,16 @@ # 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, +# 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) 2008-2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # *** THESE MESSAGES ARE COORDINATED WITH FIXED STRINGS IN diff --git a/ompi/etc/Makefile.am b/ompi/etc/Makefile.am index ef7533b9157..f5c210f9c9a 100644 --- a/ompi/etc/Makefile.am +++ b/ompi/etc/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -46,7 +46,7 @@ install-data-local: done # Only remove if exactly the same as what in our tree -# NOTE TO READER: Bourne shell if ... fi evaluates the body if +# NOTE TO READER: Bourne shell if ... fi evaluates the body if # the return of the evaluted command is 0 (as opposed to non-zero # as used by everyone else) uninstall-local: diff --git a/ompi/etc/openmpi-totalview.tcl b/ompi/etc/openmpi-totalview.tcl index d9b4ab9edfc..27edbc4f798 100644 --- a/ompi/etc/openmpi-totalview.tcl +++ b/ompi/etc/openmpi-totalview.tcl @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/ompi/file/Makefile.am b/ompi/file/Makefile.am index 1452b7c671c..6660c09e6dc 100644 --- a/ompi/file/Makefile.am +++ b/ompi/file/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/ompi/file/file.c b/ompi/file/file.c index 891d51a64e4..3b74803fe49 100644 --- a/ompi/file/file.c +++ b/ompi/file/file.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -66,7 +66,7 @@ int ompi_file_init(void) { /* Setup file array */ - OBJ_CONSTRUCT(&ompi_file_f_to_c_table, opal_pointer_array_t); + OBJ_CONSTRUCT(&ompi_file_f_to_c_table, opal_pointer_array_t); if( OPAL_SUCCESS != opal_pointer_array_init(&ompi_file_f_to_c_table, 0, OMPI_FORTRAN_HANDLE_MAX, 64) ) { return OMPI_ERROR; @@ -91,7 +91,7 @@ int ompi_file_init(void) /* * Back end to MPI_FILE_OPEN */ -int ompi_file_open(struct ompi_communicator_t *comm, char *filename, +int ompi_file_open(struct ompi_communicator_t *comm, char *filename, int amode, struct ompi_info_t *info, ompi_file_t **fh) { int ret; @@ -144,7 +144,7 @@ int ompi_file_open(struct ompi_communicator_t *comm, char *filename, /* * Back end to MPI_FILE_CLOSE. */ -int ompi_file_close(ompi_file_t **file) +int ompi_file_close(ompi_file_t **file) { (*file)->f_flags |= OMPI_FILE_ISCLOSED; OBJ_RELEASE(*file); @@ -176,18 +176,18 @@ int ompi_file_finalize(void) max = opal_pointer_array_get_size(&ompi_file_f_to_c_table); for (num_unnamed = i = 0; i < max; ++i) { file = (ompi_file_t *)opal_pointer_array_get_item(&ompi_file_f_to_c_table, i); - + /* If the file was closed but still exists because the user told us to never free handles, then do an OBJ_RELEASE it and all is well. Then get the value again and see if it's actually been freed. */ - if (NULL != file && ompi_debug_no_free_handles && + if (NULL != file && ompi_debug_no_free_handles && 0 == (file->f_flags & OMPI_FILE_ISCLOSED)) { OBJ_RELEASE(file); file = (ompi_file_t *)opal_pointer_array_get_item(&ompi_file_f_to_c_table, i); - } - + } + if (NULL != file) { /* If the user wanted warnings about MPI object leaks, @@ -207,7 +207,7 @@ int ompi_file_finalize(void) opal_output(0, "WARNING: %lu unnamed MPI_File handles still allocated at MPI_FINALIZE", (unsigned long)num_unnamed); } OBJ_DESTRUCT(&ompi_file_f_to_c_table); - + /* All done */ return OMPI_SUCCESS; @@ -232,7 +232,7 @@ static void file_constructor(ompi_file_t *file) /* Initialize the fortran <--> C translation index */ - file->f_f_to_c_index = opal_pointer_array_add(&ompi_file_f_to_c_table, + file->f_f_to_c_index = opal_pointer_array_add(&ompi_file_f_to_c_table, file); /* Initialize the error handler. Per MPI-2:9.7 (p265), the @@ -252,7 +252,7 @@ static void file_constructor(ompi_file_t *file) /* Initialize the module */ file->f_io_version = MCA_IO_BASE_V_NONE; - memset(&(file->f_io_selected_module), 0, + memset(&(file->f_io_selected_module), 0, sizeof(file->f_io_selected_module)); file->f_io_selected_data = NULL; @@ -280,7 +280,7 @@ static void file_destructor(ompi_file_t *file) /* Should never get here */ break; } - + /* Finalize the data members */ if (NULL != file->f_comm) { diff --git a/ompi/file/file.h b/ompi/file/file.h index 7dcc0f0126a..e3fd2d686c1 100644 --- a/ompi/file/file.h +++ b/ompi/file/file.h @@ -6,16 +6,16 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -71,7 +71,7 @@ struct ompi_file_t { /** Type of the error handler. This field does not have the "f_" prefix for the same reason as the field error_handler. */ ompi_errhandler_type_t errhandler_type; - + /** Indicate what version of the IO component we're using (this indicates what member to look at in the union, below) */ mca_io_base_version_t f_io_version; @@ -145,11 +145,11 @@ int ompi_file_init(void); * mainly calls OBJ_RELEASE() but also does some other error * handling as well. */ -int ompi_file_open(struct ompi_communicator_t *comm, char *filename, - int amode, struct ompi_info_t *info, +int ompi_file_open(struct ompi_communicator_t *comm, char *filename, + int amode, struct ompi_info_t *info, ompi_file_t **fh); - -/** + +/** * Atomicly set a name on a file handle. * * @param file MPI_File handle to set the name on @@ -188,7 +188,7 @@ int ompi_file_close(ompi_file_t **file); * Invoked during ompi_mpi_finalize(). */ int ompi_file_finalize(void); - + /** * Check to see if an MPI_File handle is valid. * diff --git a/ompi/group/Makefile.am b/ompi/group/Makefile.am index f9f1bfc236d..3d3c1308f1b 100644 --- a/ompi/group/Makefile.am +++ b/ompi/group/Makefile.am @@ -6,15 +6,15 @@ # 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, +# 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) 2006-2007 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -31,4 +31,4 @@ libmpi_la_SOURCES += \ group/group_plist.c \ group/group_sporadic.c \ group/group_strided.c \ - group/group_bitmap.c + group/group_bitmap.c diff --git a/ompi/group/group.c b/ompi/group/group.c index ccd62223519..d489028d586 100644 --- a/ompi/group/group.c +++ b/ompi/group/group.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -19,9 +19,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,10 +44,10 @@ int ompi_group_free ( ompi_group_t **group ) return OMPI_SUCCESS; } -int ompi_group_translate_ranks ( ompi_group_t *group1, +int ompi_group_translate_ranks ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, - int *ranks2) + ompi_group_t *group2, + int *ranks2) { int rank, proc, proc2; struct ompi_proc_t *proc1_pointer, *proc2_pointer; @@ -59,42 +59,42 @@ int ompi_group_translate_ranks ( ompi_group_t *group1, return MPI_SUCCESS; } - /* + /* * If we are translating from a parent to a child that uses the sparse format - * or vice versa, we use the translate ranks function corresponding to the - * format used. Generally, all these functions require less time than the - * original method that loops over the processes of both groups till we + * or vice versa, we use the translate ranks function corresponding to the + * format used. Generally, all these functions require less time than the + * original method that loops over the processes of both groups till we * find a match. */ - if( group1->grp_parent_group_ptr == group2 ) { /* from child to parent */ - if(OMPI_GROUP_IS_SPORADIC(group1)) { - return ompi_group_translate_ranks_sporadic_reverse - (group1,n_ranks,ranks1,group2,ranks2); + if( group1->grp_parent_group_ptr == group2 ) { /* from child to parent */ + if(OMPI_GROUP_IS_SPORADIC(group1)) { + return ompi_group_translate_ranks_sporadic_reverse + (group1,n_ranks,ranks1,group2,ranks2); } else if(OMPI_GROUP_IS_STRIDED(group1)) { - return ompi_group_translate_ranks_strided_reverse - (group1,n_ranks,ranks1,group2,ranks2); + return ompi_group_translate_ranks_strided_reverse + (group1,n_ranks,ranks1,group2,ranks2); } else if(OMPI_GROUP_IS_BITMAP(group1)) { - return ompi_group_translate_ranks_bmap_reverse - (group1,n_ranks,ranks1,group2,ranks2); + return ompi_group_translate_ranks_bmap_reverse + (group1,n_ranks,ranks1,group2,ranks2); } } else if( group2->grp_parent_group_ptr == group1 ) { /* from parent to child*/ - if(OMPI_GROUP_IS_SPORADIC(group2)) { - return ompi_group_translate_ranks_sporadic - (group1,n_ranks,ranks1,group2,ranks2); + if(OMPI_GROUP_IS_SPORADIC(group2)) { + return ompi_group_translate_ranks_sporadic + (group1,n_ranks,ranks1,group2,ranks2); } else if(OMPI_GROUP_IS_STRIDED(group2)) { - return ompi_group_translate_ranks_strided - (group1,n_ranks,ranks1,group2,ranks2); + return ompi_group_translate_ranks_strided + (group1,n_ranks,ranks1,group2,ranks2); } else if(OMPI_GROUP_IS_BITMAP(group2)) { - return ompi_group_translate_ranks_bmap - (group1,n_ranks,ranks1,group2,ranks2); + return ompi_group_translate_ranks_bmap + (group1,n_ranks,ranks1,group2,ranks2); } - + } else { /* loop over all ranks */ @@ -121,7 +121,7 @@ int ompi_group_translate_ranks ( ompi_group_t *group1, return MPI_SUCCESS; } -int ompi_group_dump (ompi_group_t* group) +int ompi_group_dump (ompi_group_t* group) { int i; int new_rank; @@ -168,12 +168,12 @@ int ompi_group_dump (ompi_group_t* group) return OMPI_SUCCESS; } -/* +/* * This is the function that iterates through the sparse groups to the dense group * to reach the process pointer */ -ompi_proc_t* ompi_group_get_proc_ptr (ompi_group_t* group , int rank) -{ +ompi_proc_t* ompi_group_get_proc_ptr (ompi_group_t* group , int rank) +{ int ranks1,ranks2; do { if(OMPI_GROUP_IS_DENSE(group)) { @@ -187,14 +187,14 @@ ompi_proc_t* ompi_group_get_proc_ptr (ompi_group_t* group , int rank) } while (1); } -int ompi_group_minloc ( int list[] , int length ) -{ +int ompi_group_minloc ( int list[] , int length ) +{ int i,index,min; min = list[0]; index = 0; - - for (i=0 ; i list[i] && list[i] != -1) { + + for (i=0 ; i list[i] && list[i] != -1) { min = list[i]; index = i; } @@ -215,12 +215,12 @@ int ompi_group_incl(ompi_group_t* group, int n, const int *ranks, ompi_group_t * len[1] = ompi_group_calc_strided ( n ,ranks ); len[2] = ompi_group_calc_sporadic ( n ,ranks ); len[3] = ompi_group_calc_bmap ( n , group->grp_proc_count ,ranks ); - + /* determin minimum length */ method = ompi_group_minloc ( len, 4 ); } #endif - + switch (method) { case 0: @@ -250,19 +250,19 @@ int ompi_group_excl(ompi_group_t* group, int n, const int *ranks, ompi_group_t * if (0 < (group->grp_proc_count - n)) { ranks_included = (int *)malloc( (group->grp_proc_count-n)*(sizeof(int))); - for (i=0 ; igrp_proc_count ; i++) { - for(j=0 ; jgrp_proc_count ; i++) { + for(j=0 ; j last_rank) { /* negative stride */ index = first_rank; @@ -318,7 +318,7 @@ int ompi_group_range_incl(ompi_group_t* group, int n_triplets, int ranges[][3], } /* determine the list of included processes for the range-incl-method */ k = 0; - for(j=0 ; j last_rank) { /* negative stride */ index = first_rank; @@ -358,9 +358,9 @@ int ompi_group_range_incl(ompi_group_t* group, int n_triplets, int ranges[][3], } int ompi_group_range_excl(ompi_group_t* group, int n_triplets, int ranges[][3], - ompi_group_t **new_group) + ompi_group_t **new_group) { - + int j,k,i; int *ranks_included=NULL, *ranks_excluded=NULL; int index,first_rank,last_rank,stride,count,result; @@ -369,7 +369,7 @@ int ompi_group_range_excl(ompi_group_t* group, int n_triplets, int ranges[][3], /* determine the number of excluded processes for the range-excl-method */ k = 0; - for(j=0 ; j last_rank) { /* negative stride */ index = first_rank; @@ -401,7 +401,7 @@ int ompi_group_range_excl(ompi_group_t* group, int n_triplets, int ranges[][3], /* determine the list of included processes for the range-excl-method */ k = 0; i = 0; - for(j=0 ; j last_rank) { /* negative stride */ index = first_rank; @@ -433,11 +433,11 @@ int ompi_group_range_excl(ompi_group_t* group, int n_triplets, int ranges[][3], if (0 != (group->grp_proc_count - count)) { ranks_included = (int *)malloc( (group->grp_proc_count - count)*(sizeof(int))); } - for (j=0 ; jgrp_proc_count ; j++) { - for(index=0 ; indexgrp_proc_count ; j++) { + for(index=0 ; indexgrp_proc_count; proc2++) { proc2_pointer = ompi_group_peer_lookup (group2_pointer ,proc2); @@ -491,7 +491,7 @@ int ompi_group_intersection(ompi_group_t* group1,ompi_group_t* group2, } /* end proc1 loop */ result = ompi_group_incl(group1, k, ranks_included, new_group); - + if (NULL != ranks_included) { free(ranks_included); } diff --git a/ompi/group/group.h b/ompi/group/group.h index 847f9624644..797f52933cf 100644 --- a/ompi/group/group.h +++ b/ompi/group/group.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,13 +17,13 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** +/** * @file: * * Infrastructure for MPI group support. @@ -41,15 +41,15 @@ BEGIN_C_DECLS #define BSIZE ((int)sizeof(unsigned char)*8) -struct ompi_group_sporadic_list_t -{ - int rank_first; - int length; -}; - +struct ompi_group_sporadic_list_t +{ + int rank_first; + int length; +}; + struct ompi_group_sporadic_data_t { - struct ompi_group_sporadic_list_t *grp_sporadic_list; + struct ompi_group_sporadic_list_t *grp_sporadic_list; /** list to hold the sporadic struct */ int grp_sporadic_list_len;/** length of the structure*/ }; @@ -67,7 +67,7 @@ struct ompi_group_bitmap_data_t /** * Group structure - * Currently we have four formats for storing the process pointers that are members + * Currently we have four formats for storing the process pointers that are members * of the group. * PList: a dense format that stores all the process pointers of the group. * Sporadic: a sparse format that stores the ranges of the ranks from the parent group, @@ -116,7 +116,7 @@ typedef struct ompi_predefined_group_t ompi_predefined_group_t; /* * The following include pulls in shared typedefs with debugger plugins. - * For more information on why we do this see the Notice to developers + * For more information on why we do this see the Notice to developers * comment at the top of the ompi_msgq_dll.c file. */ #include "group_dbg.h" @@ -232,7 +232,7 @@ void ompi_set_group_rank(ompi_group_t *group, struct ompi_proc_t *proc_pointer); /** * Abstracting MPI_Group_translate_ranks to an ompi function for internal use */ -OMPI_DECLSPEC int ompi_group_translate_ranks ( ompi_group_t *group1, +OMPI_DECLSPEC int ompi_group_translate_ranks ( ompi_group_t *group1, int n_ranks, const int *ranks1, ompi_group_t *group2, int *ranks2); @@ -244,7 +244,7 @@ OMPI_DECLSPEC int ompi_group_compare(ompi_group_t *group1, ompi_group_t *group2, int *result); -/** +/** * Abstracting MPI_Group_free, since it is required by some internal functions... */ int ompi_group_free (ompi_group_t **group); @@ -254,44 +254,44 @@ int ompi_group_free (ompi_group_t **group); */ OMPI_DECLSPEC ompi_proc_t* ompi_group_get_proc_ptr (ompi_group_t* group , int rank); -int ompi_group_translate_ranks_sporadic ( ompi_group_t *group1, +int ompi_group_translate_ranks_sporadic ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, + ompi_group_t *group2, int *ranks2); -int ompi_group_translate_ranks_sporadic_reverse ( ompi_group_t *group1, +int ompi_group_translate_ranks_sporadic_reverse ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, + ompi_group_t *group2, int *ranks2); -int ompi_group_translate_ranks_strided ( ompi_group_t *group1, +int ompi_group_translate_ranks_strided ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, + ompi_group_t *group2, int *ranks2); -int ompi_group_translate_ranks_strided_reverse ( ompi_group_t *group1, +int ompi_group_translate_ranks_strided_reverse ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, + ompi_group_t *group2, int *ranks2); -int ompi_group_translate_ranks_bmap ( ompi_group_t *group1, +int ompi_group_translate_ranks_bmap ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, + ompi_group_t *group2, int *ranks2); -int ompi_group_translate_ranks_bmap_reverse ( ompi_group_t *group1, +int ompi_group_translate_ranks_bmap_reverse ( ompi_group_t *group1, int n_ranks, const int *ranks1, - ompi_group_t *group2, + ompi_group_t *group2, int *ranks2); /** - * Prototypes for the group back-end functions. Argument lists + * Prototypes for the group back-end functions. Argument lists are similar to the according C MPI functions. */ int ompi_group_incl(ompi_group_t* group, int n, const int *ranks, ompi_group_t **new_group); int ompi_group_excl(ompi_group_t* group, int n, const int *ranks, ompi_group_t **new_group); -int ompi_group_range_incl(ompi_group_t* group, int n_triplets, +int ompi_group_range_incl(ompi_group_t* group, int n_triplets, int ranges[][3],ompi_group_t **new_group); -int ompi_group_range_excl(ompi_group_t* group, int n_triplets, +int ompi_group_range_excl(ompi_group_t* group, int n_triplets, int ranges[][3],ompi_group_t **new_group); -int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, +int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, ompi_group_t **new_group); int ompi_group_intersection(ompi_group_t* group1,ompi_group_t* group2, ompi_group_t **new_group); @@ -299,7 +299,7 @@ int ompi_group_difference(ompi_group_t* group1, ompi_group_t* group2, ompi_group_t **new_group); -/** +/** * Include Functions to handle Sparse storage formats */ int ompi_group_incl_plist(ompi_group_t* group, int n, const int *ranks, @@ -311,7 +311,7 @@ int ompi_group_incl_strided(ompi_group_t* group, int n, const int *ranks, int ompi_group_incl_bmap(ompi_group_t* group, int n, const int *ranks, ompi_group_t **new_group); -/** +/** * Functions to calculate storage spaces */ int ompi_group_calc_plist ( int n, const int *ranks ); diff --git a/ompi/group/group_bitmap.c b/ompi/group/group_bitmap.c index bdce1d4b008..c93184f162c 100644 --- a/ompi/group/group_bitmap.c +++ b/ompi/group/group_bitmap.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * 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, + * 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. @@ -30,7 +30,7 @@ static bool check_ranks (int, const int *); int ompi_group_calc_bmap ( int n, int orig_size , const int *ranks) { if (check_ranks(n,ranks)) { - return ompi_group_div_ceil(orig_size,BSIZE); + return ompi_group_div_ceil(orig_size,BSIZE); } else { return -1; @@ -38,10 +38,10 @@ int ompi_group_calc_bmap ( int n, int orig_size , const int *ranks) { } /* from parent group to child group*/ -int ompi_group_translate_ranks_bmap ( ompi_group_t *parent_group, +int ompi_group_translate_ranks_bmap ( ompi_group_t *parent_group, int n_ranks, const int *ranks1, - ompi_group_t *child_group, - int *ranks2) + ompi_group_t *child_group, + int *ranks2) { int i,count,j,k,m; unsigned char tmp, tmp1; @@ -55,17 +55,17 @@ int ompi_group_translate_ranks_bmap ( ompi_group_t *parent_group, count = 0; tmp = ( 1 << (m % BSIZE) ); /* check if the bit that correponds to the parent rank is set in the bitmap */ - if ( tmp == (child_group->sparse_data.grp_bitmap.grp_bitmap_array[(int)(m/BSIZE)] + if ( tmp == (child_group->sparse_data.grp_bitmap.grp_bitmap_array[(int)(m/BSIZE)] & (1 << (m % BSIZE)))) { - /* - * add up how many bits are set, till we get to the bit of parent + /* + * add up how many bits are set, till we get to the bit of parent * rank that we want. The rank in the child will be the sum of the bits - * that are set on the way till we get to the correponding bit + * that are set on the way till we get to the correponding bit */ for (i=0 ; i<=(int)(m/BSIZE) ; i++) { for (k=0 ; ksparse_data.grp_bitmap.grp_bitmap_array[i] + if ( tmp1 == ( child_group->sparse_data.grp_bitmap.grp_bitmap_array[i] & (1 << k) ) ) { count++; } @@ -82,10 +82,10 @@ int ompi_group_translate_ranks_bmap ( ompi_group_t *parent_group, return OMPI_SUCCESS; } /* from child group to parent group */ -int ompi_group_translate_ranks_bmap_reverse ( ompi_group_t *child_group, +int ompi_group_translate_ranks_bmap_reverse ( ompi_group_t *child_group, int n_ranks, const int *ranks1, - ompi_group_t *parent_group, - int *ranks2) + ompi_group_t *parent_group, + int *ranks2) { int i,j,count,m,k; unsigned char tmp; @@ -103,7 +103,7 @@ int ompi_group_translate_ranks_bmap_reverse ( ompi_group_t *child_group, for (i=0 ; isparse_data.grp_bitmap.grp_bitmap_array_len ; i++) { for (k=0 ; ksparse_data.grp_bitmap.grp_bitmap_array[i] + if ( tmp == ( child_group->sparse_data.grp_bitmap.grp_bitmap_array[i] & (1 << k) ) ) { count++; } @@ -119,7 +119,7 @@ int ompi_group_translate_ranks_bmap_reverse ( ompi_group_t *child_group, return OMPI_SUCCESS; } -int ompi_group_div_ceil (int num, int den) +int ompi_group_div_ceil (int num, int den) { if (0 == num%den) { return num/den; @@ -131,7 +131,7 @@ int ompi_group_div_ceil (int num, int den) /* * This functions is to check that all ranks in the included list of ranks * are monotonically increasing. If not, the bitmap format can not be used - * since we won't be able to translate the ranks corrently since the algorithms + * since we won't be able to translate the ranks corrently since the algorithms * assume that the ranks are in order in the bitmap list. */ static bool check_ranks (int n, const int *ranks) { @@ -152,7 +152,7 @@ int ompi_group_incl_bmap(ompi_group_t* group, int n, const int *ranks, ompi_group_t *group_pointer, *new_group_pointer; group_pointer = (ompi_group_t *)group; - + if ( 0 == n ) { *new_group = MPI_GROUP_EMPTY; OBJ_RETAIN(MPI_GROUP_EMPTY); @@ -170,23 +170,23 @@ int ompi_group_incl_bmap(ompi_group_t* group, int n, const int *ranks, } /* set the bits */ - for (i=0 ; i sparse_data.grp_bitmap.grp_bitmap_array[(int)(ranks[i]/BSIZE)] |= (1 << bit_set); } - + new_group_pointer -> grp_parent_group_ptr = group_pointer; - + OBJ_RETAIN(new_group_pointer -> grp_parent_group_ptr); ompi_group_increment_proc_count(new_group_pointer -> grp_parent_group_ptr); - + ompi_group_increment_proc_count(new_group_pointer); my_group_rank=group_pointer->grp_my_rank; - + ompi_group_translate_ranks (group_pointer,1,&my_group_rank, new_group_pointer,&new_group_pointer->grp_my_rank); - + *new_group = (MPI_Group)new_group_pointer; return OMPI_SUCCESS; diff --git a/ompi/group/group_dbg.h b/ompi/group/group_dbg.h index 8983b8ac92b..fe0c1feaedf 100644 --- a/ompi/group/group_dbg.h +++ b/ompi/group/group_dbg.h @@ -2,9 +2,9 @@ /* * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -13,7 +13,7 @@ /* * This file contains definitions used by both OMPI and debugger plugins. - * For more information on why we do this see the Notice to developers + * For more information on why we do this see the Notice to developers * comment at the top of the ompi_msgq_dll.c file. */ diff --git a/ompi/group/group_init.c b/ompi/group/group_init.c index 5ef2b1f3d72..67e5af61e44 100644 --- a/ompi/group/group_init.c +++ b/ompi/group/group_init.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -94,7 +94,7 @@ ompi_group_t *ompi_group_allocate(int group_size) /* initialize our rank to MPI_UNDEFINED */ new_group->grp_my_rank = MPI_UNDEFINED; OMPI_GROUP_SET_DENSE(new_group); - + error_exit: /* return */ return new_group; @@ -119,10 +119,10 @@ ompi_group_t *ompi_group_allocate_sporadic(int group_size) } /* allocate array of (grp_sporadic_list )'s */ if (0 < group_size) { - new_group->sparse_data.grp_sporadic.grp_sporadic_list = + new_group->sparse_data.grp_sporadic.grp_sporadic_list = (struct ompi_group_sporadic_list_t *)malloc (sizeof(struct ompi_group_sporadic_list_t ) * group_size); - + /* non-empty group */ if ( NULL == new_group->sparse_data.grp_sporadic.grp_sporadic_list) { /* sporadic list allocation failed */ @@ -131,16 +131,16 @@ ompi_group_t *ompi_group_allocate_sporadic(int group_size) goto error_exit; } } - + /* set the group size */ - new_group->grp_proc_count = group_size; /* actually it's the number of + new_group->grp_proc_count = group_size; /* actually it's the number of elements in the sporadic list*/ - + /* initialize our rank to MPI_UNDEFINED */ new_group->grp_my_rank = MPI_UNDEFINED; new_group->grp_proc_pointers = NULL; - OMPI_GROUP_SET_SPORADIC(new_group); - + OMPI_GROUP_SET_SPORADIC(new_group); + error_exit: return new_group; } @@ -187,19 +187,19 @@ ompi_group_t *ompi_group_allocate_bmap(int orig_group_size , int group_size) goto error_exit; } /* allocate the unsigned char list */ - new_group->sparse_data.grp_bitmap.grp_bitmap_array = (unsigned char *)malloc + new_group->sparse_data.grp_bitmap.grp_bitmap_array = (unsigned char *)malloc (sizeof(unsigned char) * ompi_group_div_ceil(orig_group_size,BSIZE)); - - new_group->sparse_data.grp_bitmap.grp_bitmap_array_len = + + new_group->sparse_data.grp_bitmap.grp_bitmap_array_len = ompi_group_div_ceil(orig_group_size,BSIZE); - + new_group->grp_proc_count = group_size; /* initialize our rank to MPI_UNDEFINED */ new_group->grp_my_rank = MPI_UNDEFINED; new_group->grp_proc_pointers = NULL; OMPI_GROUP_SET_BITMAP(new_group); - + error_exit: /* return */ return new_group; @@ -255,7 +255,7 @@ static void ompi_group_construct(ompi_group_t *new_group) /* default the sparse values for groups */ new_group->grp_parent_group_ptr = NULL; - + /* return */ return; } @@ -317,7 +317,7 @@ int ompi_group_init(void) OMPI_FORTRAN_HANDLE_MAX, 64) ) { return OMPI_ERROR; } - + /* add MPI_GROUP_NULL to table */ OBJ_CONSTRUCT(&ompi_mpi_group_null, ompi_group_t); ompi_mpi_group_null.group.grp_proc_count = 0; @@ -325,7 +325,7 @@ int ompi_group_init(void) ompi_mpi_group_null.group.grp_proc_pointers = NULL; ompi_mpi_group_null.group.grp_flags |= OMPI_GROUP_DENSE; ompi_mpi_group_null.group.grp_flags |= OMPI_GROUP_INTRINSIC; - + /* add MPI_GROUP_EMPTY to table */ OBJ_CONSTRUCT(&ompi_mpi_group_empty, ompi_group_t); ompi_mpi_group_empty.group.grp_proc_count = 0; @@ -333,7 +333,7 @@ int ompi_group_init(void) ompi_mpi_group_empty.group.grp_proc_pointers = NULL; ompi_mpi_group_empty.group.grp_flags |= OMPI_GROUP_DENSE; ompi_mpi_group_empty.group.grp_flags |= OMPI_GROUP_INTRINSIC; - + return OMPI_SUCCESS; } @@ -350,6 +350,6 @@ int ompi_group_finalize(void) OBJ_DESTRUCT(&ompi_mpi_group_empty); OBJ_DESTRUCT(&ompi_group_f_to_c_table); - + return OMPI_SUCCESS; } diff --git a/ompi/group/group_plist.c b/ompi/group/group_plist.c index e62527015df..ebf2f1a85ad 100644 --- a/ompi/group/group_plist.c +++ b/ompi/group/group_plist.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * 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, + * 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. @@ -40,7 +40,7 @@ int ompi_group_incl_plist(ompi_group_t* group, int n, const int *ranks, int proc,my_group_rank; ompi_group_t *group_pointer, *new_group_pointer; ompi_proc_t *my_proc_pointer; - + group_pointer = (ompi_group_t *)group; if ( 0 == n ) { @@ -57,8 +57,8 @@ int ompi_group_incl_plist(ompi_group_t* group, int n, const int *ranks, /* put group elements in the list */ for (proc = 0; proc < n; proc++) { - new_group_pointer->grp_proc_pointers[proc] = - ompi_group_peer_lookup(group_pointer,ranks[proc]); + new_group_pointer->grp_proc_pointers[proc] = + ompi_group_peer_lookup(group_pointer,ranks[proc]); } /* end proc loop */ /* increment proc reference counters */ @@ -79,12 +79,12 @@ int ompi_group_incl_plist(ompi_group_t* group, int n, const int *ranks, return OMPI_SUCCESS; } -/* - * Group Union has to use the dense format since we don't support +/* + * Group Union has to use the dense format since we don't support * two parent groups in the group structure and maintain functions */ -int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, - ompi_group_t **new_group) +int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, + ompi_group_t **new_group) { /* local variables */ int new_group_size, proc1, proc2, found_in_group; @@ -104,7 +104,7 @@ int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, /* check group2 elements to see if they need to be included in the list */ for (proc2 = 0; proc2 < group2_pointer->grp_proc_count; proc2++) { - proc2_pointer = ompi_group_peer_lookup(group2_pointer,proc2); + proc2_pointer = ompi_group_peer_lookup(group2_pointer,proc2); /* check to see if this proc2 is alread in the group */ found_in_group = 0; @@ -141,8 +141,8 @@ int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, /* put group1 elements in the list */ for (proc1 = 0; proc1 < group1_pointer->grp_proc_count; proc1++) { - new_group_pointer->grp_proc_pointers[proc1] = - ompi_group_peer_lookup(group1_pointer,proc1); + new_group_pointer->grp_proc_pointers[proc1] = + ompi_group_peer_lookup(group1_pointer,proc1); } cnt = group1_pointer->grp_proc_count; @@ -198,8 +198,8 @@ int ompi_group_union (ompi_group_t* group1, ompi_group_t* group2, return OMPI_SUCCESS; } -/* - * Group Difference has to use the dense format since we don't support +/* + * Group Difference has to use the dense format since we don't support * two parent groups in the group structure and maintain functions */ int ompi_group_difference(ompi_group_t* group1, ompi_group_t* group2, @@ -211,7 +211,7 @@ int ompi_group_difference(ompi_group_t* group1, ompi_group_t* group2, ompi_group_t *group1_pointer, *group2_pointer, *new_group_pointer; ompi_proc_t *proc1_pointer, *proc2_pointer, *my_proc_pointer = NULL; - + group1_pointer=(ompi_group_t *)group1; group2_pointer=(ompi_group_t *)group2; diff --git a/ompi/group/group_set_rank.c b/ompi/group/group_set_rank.c index 27bee6faf12..8529970ae78 100644 --- a/ompi/group/group_set_rank.c +++ b/ompi/group/group_set_rank.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2007 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/group/group_sporadic.c b/ompi/group/group_sporadic.c index 8053ceda976..46e0d6bc9f8 100644 --- a/ompi/group/group_sporadic.c +++ b/ompi/group/group_sporadic.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,8 +27,8 @@ #include "mpi.h" int ompi_group_calc_sporadic ( int n , const int *ranks) -{ - int i,l=0; +{ + int i,l=0; for (i=0 ; isparse_data.grp_sporadic.grp_sporadic_list_len ; i++) { - if( child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first - <= ranks1[j] && ranks1[j] <= - child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first + - child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].length -1 ) { - + for(i=0 ; i sparse_data.grp_sporadic.grp_sporadic_list_len ; i++) { + if( child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first + <= ranks1[j] && ranks1[j] <= + child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first + + child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].length -1 ) { + ranks2[j] = ranks1[j] - child_group-> - sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first + count; + sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first + count; break; } else { @@ -80,13 +80,13 @@ int ompi_group_translate_ranks_sporadic ( ompi_group_t *parent_group, return OMPI_SUCCESS; } /* from child group to parent group*/ -int ompi_group_translate_ranks_sporadic_reverse ( ompi_group_t *child_group, +int ompi_group_translate_ranks_sporadic_reverse ( ompi_group_t *child_group, int n_ranks, const int *ranks1, - ompi_group_t *parent_group, - int *ranks2) + ompi_group_t *parent_group, + int *ranks2) { int i,j,count; - + for (j=0 ; jsparse_data.grp_sporadic.grp_sporadic_list_len ; i++) { - if ( ranks1[j] > ( count + - child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].length + for (i=0 ; isparse_data.grp_sporadic.grp_sporadic_list_len ; i++) { + if ( ranks1[j] > ( count + + child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].length - 1) ) { count = count + child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].length; - } - else { - ranks2[j] = child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first - + (ranks1[j] - count); + } + else { + ranks2[j] = child_group->sparse_data.grp_sporadic.grp_sporadic_list[i].rank_first + + (ranks1[j] - count); break; } } @@ -120,19 +120,19 @@ int ompi_group_incl_spor(ompi_group_t* group, int n, const int *ranks, /* local variables */ int my_group_rank,l,i,j,proc_count; ompi_group_t *group_pointer, *new_group_pointer; - + group_pointer = (ompi_group_t *)group; - + if (0 == n) { *new_group = MPI_GROUP_EMPTY; OBJ_RETAIN(MPI_GROUP_EMPTY); return OMPI_SUCCESS; } - + l=0; j=0; proc_count = 0; - + for(i=0 ; i + + new_group_pointer -> sparse_data.grp_sporadic.grp_sporadic_list[j].rank_first = ranks[0]; - new_group_pointer -> + new_group_pointer -> sparse_data.grp_sporadic.grp_sporadic_list[j].length = 1; - + for(i=1 ; i sparse_data.grp_sporadic.grp_sporadic_list[j].length ++; } else { j++; - new_group_pointer -> + new_group_pointer -> sparse_data.grp_sporadic.grp_sporadic_list[j].rank_first = ranks[i]; - new_group_pointer -> + new_group_pointer -> sparse_data.grp_sporadic.grp_sporadic_list[j].length = 1; } } - + new_group_pointer->sparse_data.grp_sporadic.grp_sporadic_list_len = j+1; new_group_pointer -> grp_parent_group_ptr = group_pointer; - + OBJ_RETAIN(new_group_pointer -> grp_parent_group_ptr); ompi_group_increment_proc_count(new_group_pointer -> grp_parent_group_ptr); - - for(i=0 ; isparse_data.grp_sporadic.grp_sporadic_list_len ; i++) { - proc_count = proc_count + new_group_pointer -> + + for(i=0 ; isparse_data.grp_sporadic.grp_sporadic_list_len ; i++) { + proc_count = proc_count + new_group_pointer -> sparse_data.grp_sporadic.grp_sporadic_list[i].length; } new_group_pointer->grp_proc_count = proc_count; - + ompi_group_increment_proc_count(new_group_pointer); my_group_rank=group_pointer->grp_my_rank; ompi_group_translate_ranks (group_pointer,1,&my_group_rank, new_group_pointer,&new_group_pointer->grp_my_rank); - + *new_group = (MPI_Group)new_group_pointer; - + return OMPI_SUCCESS; } diff --git a/ompi/group/group_strided.c b/ompi/group/group_strided.c index b38a3015f4e..d5f7f2848a8 100644 --- a/ompi/group/group_strided.c +++ b/ompi/group/group_strided.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,15 +33,15 @@ int ompi_group_calc_strided ( int n , const int *ranks ) { return -1; } else { - return (sizeof(int)*3); + return (sizeof(int)*3); } } /* from parent group to child group*/ -int ompi_group_translate_ranks_strided (ompi_group_t *parent_group, +int ompi_group_translate_ranks_strided (ompi_group_t *parent_group, int n_ranks, const int *ranks1, - ompi_group_t *child_group, - int *ranks2) + ompi_group_t *child_group, + int *ranks2) { int s,o,l,i; s = child_group->sparse_data.grp_strided.grp_strided_stride; @@ -53,7 +53,7 @@ int ompi_group_translate_ranks_strided (ompi_group_t *parent_group, } else { ranks2[i] = MPI_UNDEFINED; - + if ( (ranks1[i]-o) >= 0 && (ranks1[i]-o)%s == 0 && ranks1[i] <= l) { ranks2[i] = (ranks1[i] - o)/s; } @@ -63,14 +63,14 @@ int ompi_group_translate_ranks_strided (ompi_group_t *parent_group, } /* from child group to parent group*/ -int ompi_group_translate_ranks_strided_reverse (ompi_group_t *child_group, +int ompi_group_translate_ranks_strided_reverse (ompi_group_t *child_group, int n_ranks, const int *ranks1, - ompi_group_t *parent_group, - int *ranks2) + ompi_group_t *parent_group, + int *ranks2) { int s,o,i; s = child_group->sparse_data.grp_strided.grp_strided_stride; - o = child_group->sparse_data.grp_strided.grp_strided_offset; + o = child_group->sparse_data.grp_strided.grp_strided_offset; for (i = 0; i < n_ranks; i++) { if ( MPI_PROC_NULL == ranks1[i]) { ranks2[i] = MPI_PROC_NULL; @@ -98,7 +98,7 @@ static int check_stride(const int incl[],int incllen) { return -1; } } - return s; + return s; } int ompi_group_incl_strided(ompi_group_t* group, int n, const int *ranks, @@ -107,9 +107,9 @@ int ompi_group_incl_strided(ompi_group_t* group, int n, const int *ranks, /* local variables */ int my_group_rank,stride; ompi_group_t *group_pointer, *new_group_pointer; - + group_pointer = (ompi_group_t *)group; - + if ( 0 == n ) { *new_group = MPI_GROUP_EMPTY; OBJ_RETAIN(MPI_GROUP_EMPTY); @@ -130,7 +130,7 @@ int ompi_group_incl_strided(ompi_group_t* group, int n, const int *ranks, new_group_pointer -> sparse_data.grp_strided.grp_strided_offset = ranks[0]; new_group_pointer -> sparse_data.grp_strided.grp_strided_last_element = ranks[n-1]; new_group_pointer -> grp_proc_count = n; - + ompi_group_increment_proc_count(new_group_pointer); my_group_rank = group_pointer->grp_my_rank; ompi_group_translate_ranks (new_group_pointer->grp_parent_group_ptr,1,&my_group_rank, diff --git a/ompi/include/Makefile.am b/ompi/include/Makefile.am index d80c5c75bc0..7a37223619d 100644 --- a/ompi/include/Makefile.am +++ b/ompi/include/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2014-2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -28,7 +28,7 @@ headers = ompi_config.h nodist_headers = # Install these in $(includedir) -include_HEADERS = +include_HEADERS = # Always install these in $(pkgincludedir) pkginclude_HEADERS = @@ -104,7 +104,7 @@ mpif-c-constants-decl.h: --single $(OMPI_FORTRAN_SINGLE_UNDERSCORE) \ --double $(OMPI_FORTRAN_DOUBLE_UNDERSCORE) -if WANT_INSTALL_HEADERS +if WANT_INSTALL_HEADERS ompidir = $(ompiincludedir) nobase_dist_ompi_HEADERS = $(headers) nobase_nodist_ompi_HEADERS = $(nodist_headers) diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index 1977604e7f7..41d304e4a35 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -1655,16 +1655,16 @@ OMPI_DECLSPEC MPI_Request MPI_Request_f2c(MPI_Fint request); OMPI_DECLSPEC int MPI_Request_free(MPI_Request *request); OMPI_DECLSPEC int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status); -OMPI_DECLSPEC int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, +OMPI_DECLSPEC int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, - int target_rank, MPI_Aint target_disp, int target_count, + int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, - int target_rank, MPI_Aint target_disp, int target_cout, + int target_rank, MPI_Aint target_disp, int target_cout, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int MPI_Rsend(const void *ibuf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); @@ -2357,16 +2357,16 @@ OMPI_DECLSPEC MPI_Request PMPI_Request_f2c(MPI_Fint request); OMPI_DECLSPEC int PMPI_Request_free(MPI_Request *request); OMPI_DECLSPEC int PMPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status); -OMPI_DECLSPEC int PMPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, +OMPI_DECLSPEC int PMPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int PMPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, - int target_rank, MPI_Aint target_disp, int target_count, + int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int PMPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, - int target_rank, MPI_Aint target_disp, int target_cout, + int target_rank, MPI_Aint target_disp, int target_cout, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request); OMPI_DECLSPEC int PMPI_Rsend(const void *ibuf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); diff --git a/ompi/include/mpif-values.pl b/ompi/include/mpif-values.pl index 3dcb40e70cf..4ae1814cf96 100755 --- a/ompi/include/mpif-values.pl +++ b/ompi/include/mpif-values.pl @@ -2,9 +2,9 @@ # # Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -51,7 +51,7 @@ sub write_file { $need_write = 1; } } - + if ($need_write) { open(FILE_OUT, ">$filename_out") || die "Couldn't open $filename_out"; print FILE_OUT $str; @@ -429,13 +429,13 @@ sub write_fortran_file { write_file($file, $header); } -write_fortran_file($header, $handles, +write_fortran_file($header, $handles, "$topdir/ompi/include/mpif-handles.h"); -write_fortran_file($header, $constants, +write_fortran_file($header, $constants, "$topdir/ompi/include/mpif-constants.h"); -write_fortran_file($header, $io_handles, +write_fortran_file($header, $io_handles, "$topdir/ompi/include/mpif-io-handles.h"); -write_fortran_file($header, $io_constants, +write_fortran_file($header, $io_constants, "$topdir/ompi/include/mpif-io-constants.h"); #---------------------------------------------------------------------------- diff --git a/ompi/include/ompi/Makefile.am b/ompi/include/ompi/Makefile.am index 4be821a8234..e49a4e98e60 100644 --- a/ompi/include/ompi/Makefile.am +++ b/ompi/include/ompi/Makefile.am @@ -6,15 +6,15 @@ # 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, +# 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) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/include/ompi/totalview.h b/ompi/include/ompi/totalview.h index 668b3b72c44..f7e50b24fb5 100644 --- a/ompi/include/ompi/totalview.h +++ b/ompi/include/ompi/totalview.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/include/ompi/types.h b/ompi/include/ompi/types.h index c87230fa23e..2c9e387a15e 100644 --- a/ompi/include/ompi/types.h +++ b/ompi/include/ompi/types.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -25,8 +25,8 @@ */ typedef char* ompi_job_handle_t; -/* - * Predefine some internal types so we dont need all the include +/* + * Predefine some internal types so we dont need all the include * dependencies. */ struct ompi_communicator_t; diff --git a/ompi/include/ompi/version.h.in b/ompi/include/ompi/version.h.in index 43cd53b9107..35701029524 100644 --- a/ompi/include/ompi/version.h.in +++ b/ompi/include/ompi/version.h.in @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file should be included by any file that needs full diff --git a/ompi/info/Makefile.am b/ompi/info/Makefile.am index ab5931de88c..644930a43b8 100644 --- a/ompi/info/Makefile.am +++ b/ompi/info/Makefile.am @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/ompi/info/info.c b/ompi/info/info.c index bccef678f31..85b5e9a772f 100644 --- a/ompi/info/info.c +++ b/ompi/info/info.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -92,8 +92,8 @@ opal_pointer_array_t ompi_info_f_to_c_table = {{0}}; * This function is called during ompi_init and initializes the * fortran to C translation table. It also fills in the values * for the MPI_INFO_GET_ENV object - */ -int ompi_info_init(void) + */ +int ompi_info_init(void) { char val[MPI_MAX_INFO_VAL]; char *cptr; @@ -212,7 +212,7 @@ int ompi_info_init(void) /* * Duplicate an info */ -int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo) +int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo) { int err; opal_list_item_t *item; @@ -237,7 +237,7 @@ int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo) /* * Set a value on the info */ -int ompi_info_set (ompi_info_t *info, const char *key, const char *value) +int ompi_info_set (ompi_info_t *info, const char *key, const char *value) { char *new_value; ompi_info_entry_t *new_info; @@ -275,7 +275,7 @@ int ompi_info_set (ompi_info_t *info, const char *key, const char *value) /* * Free an info handle and all of its keys and values. */ -int ompi_info_free (ompi_info_t **info) +int ompi_info_free (ompi_info_t **info) { (*info)->i_freed = true; OBJ_RELEASE(*info); @@ -288,7 +288,7 @@ int ompi_info_free (ompi_info_t **info) * Get a value from an info */ int ompi_info_get (ompi_info_t *info, const char *key, int valuelen, - char *value, int *flag) + char *value, int *flag) { ompi_info_entry_t *search; int value_length; @@ -373,14 +373,14 @@ int ompi_info_get_bool(ompi_info_t *info, char *key, bool *value, int *flag) --ptr; } ptr = str; - while (ptr < str + sizeof(str) - 1 && *ptr != '\0' && + while (ptr < str + sizeof(str) - 1 && *ptr != '\0' && isspace(*ptr)) { ++ptr; } if ('\0' != *ptr) { if (isdigit(*ptr)) { *value = (bool) atoi(ptr); - } else if (0 == strcasecmp(ptr, "yes") || + } else if (0 == strcasecmp(ptr, "yes") || 0 == strcasecmp(ptr, "true")) { *value = true; } else if (0 != strcasecmp(ptr, "no") && @@ -423,7 +423,7 @@ int ompi_info_delete (ompi_info_t *info, const char *key) * Return the length of a value */ int ompi_info_get_valuelen (ompi_info_t *info, const char *key, int *valuelen, - int *flag) + int *flag) { ompi_info_entry_t *search; @@ -459,7 +459,7 @@ int ompi_info_get_nthkey (ompi_info_t *info, int n, char *key) n > 0; --n) { iterator = (ompi_info_entry_t *)opal_list_get_next(iterator); - if (opal_list_get_end(&(info->super)) == + if (opal_list_get_end(&(info->super)) == (opal_list_item_t *) iterator) { OPAL_THREAD_UNLOCK(info->i_lock); return MPI_ERR_ARG; @@ -479,50 +479,50 @@ int ompi_info_get_nthkey (ompi_info_t *info, int n, char *key) /* * Shut down MPI_Info handling */ -int ompi_info_finalize(void) +int ompi_info_finalize(void) { size_t i, max; ompi_info_t *info; opal_list_item_t *item; ompi_info_entry_t *entry; bool found = false; - + /* Release MPI_INFO_NULL. Do this so that we don't get a bogus leak report on it. Plus, it's statically allocated, so we don't want to call OBJ_RELEASE on it. */ - + OBJ_DESTRUCT(&ompi_mpi_info_null.info); opal_pointer_array_set_item(&ompi_info_f_to_c_table, 0, NULL); - + /* ditto for MPI_INFO_GET_ENV */ OBJ_DESTRUCT(&ompi_mpi_info_env.info); opal_pointer_array_set_item(&ompi_info_f_to_c_table, 1, NULL); /* Go through the f2c table and see if anything is left. Free them all. */ - + max = opal_pointer_array_get_size(&ompi_info_f_to_c_table); for (i = 2; i < max; ++i) { info = (ompi_info_t *)opal_pointer_array_get_item(&ompi_info_f_to_c_table, i); - + /* If the info was freed but still exists because the user told us to never free handles, then do an OBJ_RELEASE it and all is well. Then get the value again and see if it's actually been freed. */ - + if (NULL != info && ompi_debug_no_free_handles && info->i_freed) { OBJ_RELEASE(info); info = (ompi_info_t *)opal_pointer_array_get_item(&ompi_info_f_to_c_table, i); - } - + } + /* If it still exists here and was never freed, then it's an orphan */ - + if (NULL != info) { - + /* If the user wanted warnings about MPI object leaks, print out a message */ - + if (!info->i_freed && ompi_debug_show_handle_leaks) { if (ompi_debug_show_handle_leaks) { opal_output(0, "WARNING: MPI_Info still allocated at MPI_FINALIZE"); @@ -530,7 +530,7 @@ int ompi_info_finalize(void) opal_list_get_end(&(info->super)) != item; item = opal_list_get_next(item)) { entry = (ompi_info_entry_t *) item; - opal_output(0, "WARNING: key=\"%s\", value=\"%s\"", + opal_output(0, "WARNING: key=\"%s\", value=\"%s\"", entry->ie_key, NULL != entry->ie_value ? entry->ie_value : "(null)"); found = true; @@ -538,7 +538,7 @@ int ompi_info_finalize(void) } OBJ_RELEASE(info); } - + /* Don't bother setting each element back down to NULL; it would just take a lot of thread locks / unlocks and since we're destroying everything, it isn't worth it */ @@ -548,7 +548,7 @@ int ompi_info_finalize(void) } } } - + /* All done -- destroy the table */ OBJ_DESTRUCT(&ompi_info_f_to_c_table); @@ -560,9 +560,9 @@ int ompi_info_finalize(void) * This function is invoked when OBJ_NEW() is called. Here, we add this * info pointer to the table and then store its index as the handle */ -static void info_constructor(ompi_info_t *info) +static void info_constructor(ompi_info_t *info) { - info->i_f_to_c_index = opal_pointer_array_add(&ompi_info_f_to_c_table, + info->i_f_to_c_index = opal_pointer_array_add(&ompi_info_f_to_c_table, info); info->i_lock = OBJ_NEW(opal_mutex_t); info->i_freed = false; @@ -577,17 +577,17 @@ static void info_constructor(ompi_info_t *info) /* - * This function is called during OBJ_DESTRUCT of "info". When this - * done, we need to remove the entry from the ompi fortran to C + * This function is called during OBJ_DESTRUCT of "info". When this + * done, we need to remove the entry from the ompi fortran to C * translation table - */ -static void info_destructor(ompi_info_t *info) + */ +static void info_destructor(ompi_info_t *info) { opal_list_item_t *item; ompi_info_entry_t *iterator; /* Remove every key in the list */ - + for (item = opal_list_remove_first(&(info->super)); NULL != item; item = opal_list_remove_first(&(info->super))) { @@ -597,11 +597,11 @@ static void info_destructor(ompi_info_t *info) /* reset the &ompi_info_f_to_c_table entry - make sure that the entry is in the table */ - + if (MPI_UNDEFINED != info->i_f_to_c_index && - NULL != opal_pointer_array_get_item(&ompi_info_f_to_c_table, + NULL != opal_pointer_array_get_item(&ompi_info_f_to_c_table, info->i_f_to_c_index)){ - opal_pointer_array_set_item(&ompi_info_f_to_c_table, + opal_pointer_array_set_item(&ompi_info_f_to_c_table, info->i_f_to_c_index, NULL); } @@ -614,14 +614,14 @@ static void info_destructor(ompi_info_t *info) /* * ompi_info_entry_t interface functions */ -static void info_entry_constructor(ompi_info_entry_t *entry) +static void info_entry_constructor(ompi_info_entry_t *entry) { memset(entry->ie_key, 0, sizeof(entry->ie_key)); entry->ie_key[MPI_MAX_INFO_KEY] = 0; } -static void info_entry_destructor(ompi_info_entry_t *entry) +static void info_entry_destructor(ompi_info_entry_t *entry) { if (NULL != entry->ie_value) { free(entry->ie_value); @@ -641,7 +641,7 @@ static ompi_info_entry_t *info_find_key (ompi_info_t *info, const char *key) /* No thread locking in here! */ - /* Iterate over all the entries. If the key is found, then + /* Iterate over all the entries. If the key is found, then * return immediately. Else, the loop will fall of the edge * and NULL is returned */ @@ -699,7 +699,7 @@ ompi_info_value_to_bool(char *value, bool *interp) *interp = false; } else { *interp = true; - } + } return OMPI_SUCCESS; } diff --git a/ompi/info/info.h b/ompi/info/info.h index 772d207349a..0afe46d2e8f 100644 --- a/ompi/info/info.h +++ b/ompi/info/info.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. diff --git a/ompi/mca/Makefile.am b/ompi/mca/Makefile.am index 8d3fca3fb4f..89dcb0f652b 100644 --- a/ompi/mca/Makefile.am +++ b/ompi/mca/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/ompi/mca/bml/Makefile.am b/ompi/mca/bml/Makefile.am index b8463a4d794..6604329605f 100644 --- a/ompi/mca/bml/Makefile.am +++ b/ompi/mca/bml/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/bml/base/Makefile.am b/ompi/mca/bml/base/Makefile.am index b8ba13a85bf..83cbd2712e7 100644 --- a/ompi/mca/bml/base/Makefile.am +++ b/ompi/mca/bml/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/bml/base/base.h b/ompi/mca/bml/base/base.h index b4f7280d529..27cd1e568c5 100644 --- a/ompi/mca/bml/base/base.h +++ b/ompi/mca/bml/base/base.h @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,13 +40,13 @@ struct mca_bml_base_selected_module_t { }; typedef struct mca_bml_base_selected_module_t mca_bml_base_selected_module_t; -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bml_base_selected_module_t); +OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bml_base_selected_module_t); /* * Global functions for MCA: overall BTL open and close */ -OMPI_DECLSPEC int mca_bml_base_init(bool enable_progress_threads, +OMPI_DECLSPEC int mca_bml_base_init(bool enable_progress_threads, bool enable_mpi_threads); OMPI_DECLSPEC bool mca_bml_base_inited(void); @@ -57,7 +57,7 @@ OMPI_DECLSPEC int mca_bml_base_ft_event(int state); * Globals */ OMPI_DECLSPEC extern mca_bml_base_component_t mca_bml_component; -OMPI_DECLSPEC extern mca_bml_base_module_t mca_bml; +OMPI_DECLSPEC extern mca_bml_base_module_t mca_bml; OMPI_DECLSPEC extern mca_base_framework_t ompi_bml_base_framework; diff --git a/ompi/mca/bml/base/bml_base_btl.c b/ompi/mca/bml/base/bml_base_btl.c index d5fd5d6b59f..c35bb57e7e3 100644 --- a/ompi/mca/bml/base/bml_base_btl.c +++ b/ompi/mca/bml/base/bml_base_btl.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -59,7 +59,7 @@ int mca_bml_base_btl_array_reserve(mca_bml_base_btl_array_t* array, size_t size) size_t new_len = sizeof(mca_bml_base_btl_t)*size; if(old_len >= new_len) return OMPI_SUCCESS; - + array->bml_btls = (mca_bml_base_btl_t*)realloc(array->bml_btls, new_len); if(NULL == array->bml_btls) return OMPI_ERR_OUT_OF_RESOURCE; @@ -99,15 +99,15 @@ static void mca_bml_base_completion( des->des_cbfunc(btl,ep,des,status); } -int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, - mca_btl_base_descriptor_t* des, - mca_btl_base_tag_t tag ) -{ - des->des_context = (void*)bml_btl; +int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, + mca_btl_base_descriptor_t* des, + mca_btl_base_tag_t tag ) +{ + des->des_context = (void*)bml_btl; if(mca_bml_base_error_count <= 0 && mca_bml_base_error_rate_ceiling > 0) { - mca_bml_base_error_count = (int) (((double) mca_bml_base_error_rate_ceiling * + mca_bml_base_error_count = (int) (((double) mca_bml_base_error_rate_ceiling * opal_rand(&mca_bml_base_rand_buff))/(UINT32_MAX+1.0)); - if(mca_bml_base_error_count < (double) mca_bml_base_error_rate_floor) { + if(mca_bml_base_error_count < (double) mca_bml_base_error_rate_floor) { mca_bml_base_error_count = (double) mca_bml_base_error_rate_floor; } if(mca_bml_base_error_count % 2) { @@ -117,7 +117,7 @@ int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, return OMPI_SUCCESS; } else { /* corrupt data */ - mca_bml_base_context_t* ctx = (mca_bml_base_context_t*) + mca_bml_base_context_t* ctx = (mca_bml_base_context_t*) malloc(sizeof(mca_bml_base_context_t)); if(NULL != ctx) { opal_output(0, "%s:%d: corrupting data\n", __FILE__, __LINE__); @@ -133,7 +133,7 @@ int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, } mca_bml_base_error_count--; return bml_btl->btl_send( bml_btl->btl, - bml_btl->btl_endpoint, + bml_btl->btl_endpoint, des, tag ); } diff --git a/ompi/mca/bml/base/bml_base_btl.h b/ompi/mca/bml/base/bml_base_btl.h index b2957620dc1..c439e6723e4 100644 --- a/ompi/mca/bml/base/bml_base_btl.h +++ b/ompi/mca/bml/base/bml_base_btl.h @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,7 +35,7 @@ struct mca_bml_base_btl_array_t; OMPI_DECLSPEC int mca_bml_base_btl_array_reserve(struct mca_bml_base_btl_array_t* array, size_t size); - + END_C_DECLS #endif /* MCA_BML_BASE_H */ diff --git a/ompi/mca/bml/base/bml_base_endpoint.c b/ompi/mca/bml/base/bml_base_endpoint.c index 1ba5aaa4588..393ba82b404 100644 --- a/ompi/mca/bml/base/bml_base_endpoint.c +++ b/ompi/mca/bml/base/bml_base_endpoint.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,7 +46,7 @@ static void mca_bml_base_endpoint_destruct(mca_bml_base_endpoint_t* ep) OBJ_CLASS_INSTANCE( mca_bml_base_endpoint_t, opal_object_t, - mca_bml_base_endpoint_construct, - mca_bml_base_endpoint_destruct + mca_bml_base_endpoint_construct, + mca_bml_base_endpoint_destruct ); diff --git a/ompi/mca/bml/base/bml_base_frame.c b/ompi/mca/bml/base/bml_base_frame.c index de48d7681e5..f57a92d7cf3 100644 --- a/ompi/mca/bml/base/bml_base_frame.c +++ b/ompi/mca/bml/base/bml_base_frame.c @@ -6,7 +6,7 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -89,7 +89,7 @@ static int mca_bml_base_register(mca_base_register_flag_t flags) return OMPI_SUCCESS; } -static int mca_bml_base_open(mca_base_open_flag_t flags) +static int mca_bml_base_open(mca_base_open_flag_t flags) { int ret; @@ -105,9 +105,9 @@ static int mca_bml_base_open(mca_base_open_flag_t flags) opal_srand(&mca_bml_base_rand_buff,(uint32_t)(getpid() * tv.tv_usec)); /* initialize count */ - if(mca_bml_base_error_rate_ceiling > 0 + if(mca_bml_base_error_rate_ceiling > 0 && mca_bml_base_error_rate_floor <= mca_bml_base_error_rate_ceiling) { - mca_bml_base_error_count = (int) (((double) mca_bml_base_error_rate_ceiling * + mca_bml_base_error_count = (int) (((double) mca_bml_base_error_rate_ceiling * opal_rand(&mca_bml_base_rand_buff))/(UINT32_MAX+1.0)); } #endif diff --git a/ompi/mca/bml/base/bml_base_ft.c b/ompi/mca/bml/base/bml_base_ft.c index 76bba51b2f4..007f0c70fd3 100644 --- a/ompi/mca/bml/base/bml_base_ft.c +++ b/ompi/mca/bml/base/bml_base_ft.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ int mca_bml_base_ft_event(int state) * Currently you can't do this from outside a component * So just return Unimplemented */ - + if(OPAL_CRS_CHECKPOINT == state) { ; } diff --git a/ompi/mca/bml/base/bml_base_init.c b/ompi/mca/bml/base/bml_base_init.c index 66eb0c55efa..d9edd639b3b 100644 --- a/ompi/mca/bml/base/bml_base_init.c +++ b/ompi/mca/bml/base/bml_base_init.c @@ -5,21 +5,21 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" -#include "ompi/mca/bml/base/base.h" +#include "ompi/mca/bml/base/base.h" #include "opal/mca/base/base.h" #include "ompi/mca/mca.h" @@ -27,13 +27,13 @@ mca_bml_base_module_t mca_bml = { NULL, /* bml_component */ - NULL, /* bml_add_procs */ + NULL, /* bml_add_procs */ NULL, /* bml_del_procs */ NULL, /* bml_add_btl */ NULL, /* bml_del_btl */ NULL, /* bml_del_proc_btl */ - NULL, /* bml_register */ - NULL, /* bml_register_error */ + NULL, /* bml_register */ + NULL, /* bml_register_error */ NULL, /* bml_finalize*/ NULL /* FT event */ }; @@ -47,47 +47,47 @@ mca_bml_base_inited(void) return init_called; } -int mca_bml_base_init( bool enable_progress_threads, +int mca_bml_base_init( bool enable_progress_threads, bool enable_mpi_threads) { opal_list_item_t *item = NULL; - mca_bml_base_component_t *component = NULL, *best_component = NULL; - mca_bml_base_module_t *module = NULL, *best_module = NULL; - int priority = 0, best_priority = -1; - mca_base_component_list_item_t *cli = NULL; + mca_bml_base_component_t *component = NULL, *best_component = NULL; + mca_bml_base_module_t *module = NULL, *best_module = NULL; + int priority = 0, best_priority = -1; + mca_base_component_list_item_t *cli = NULL; init_called = true; - for (item = opal_list_get_first(&ompi_bml_base_framework.framework_components); - opal_list_get_end(&ompi_bml_base_framework.framework_components) != item; - item = opal_list_get_next(item)) { - cli = (mca_base_component_list_item_t*) item; - component = (mca_bml_base_component_t*) cli->cli_component; + for (item = opal_list_get_first(&ompi_bml_base_framework.framework_components); + opal_list_get_end(&ompi_bml_base_framework.framework_components) != item; + item = opal_list_get_next(item)) { + cli = (mca_base_component_list_item_t*) item; + component = (mca_bml_base_component_t*) cli->cli_component; if(NULL == component->bml_init) { - opal_output_verbose( 10, ompi_bml_base_framework.framework_output, - "select: no init function; ignoring component %s", - component->bml_version.mca_component_name ); - continue; + opal_output_verbose( 10, ompi_bml_base_framework.framework_output, + "select: no init function; ignoring component %s", + component->bml_version.mca_component_name ); + continue; } - module = component->bml_init(&priority, - enable_progress_threads, - enable_mpi_threads); + module = component->bml_init(&priority, + enable_progress_threads, + enable_mpi_threads); - if(NULL == module) { - continue; - } - if(priority > best_priority) { + if(NULL == module) { + continue; + } + if(priority > best_priority) { best_priority = priority; best_component = component; best_module = module; } - + } - if(NULL == best_module) { - return OMPI_SUCCESS; + if(NULL == best_module) { + return OMPI_SUCCESS; } - mca_bml_component = *best_component; - mca_bml = *best_module; + mca_bml_component = *best_component; + mca_bml = *best_module; return mca_base_framework_components_close(&ompi_bml_base_framework, (mca_base_component_t*) best_component); } diff --git a/ompi/mca/bml/bml.h b/ompi/mca/bml/bml.h index 59a2fae645c..41e8496066b 100644 --- a/ompi/mca/bml/bml.h +++ b/ompi/mca/bml/bml.h @@ -6,17 +6,17 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -41,19 +41,19 @@ #include "ompi/constants.h" -#define OPAL_ENABLE_DEBUG_RELIABILITY 0 +#define OPAL_ENABLE_DEBUG_RELIABILITY 0 /* * BML types */ -struct ompi_proc_t; +struct ompi_proc_t; struct mca_bml_base_module_t; struct mca_bml_base_endpoint_t; struct mca_mpool_base_resources_t; /* - * Cached set of information for each btl + * Cached set of information for each btl */ struct mca_bml_base_btl_t { @@ -85,7 +85,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bml_base_btl_array_t); /** * If required, reallocate (grow) the array to the indicate size. - * + * * @param array (IN) * @param size (IN) */ @@ -96,7 +96,7 @@ static inline size_t mca_bml_base_btl_array_get_size(mca_bml_base_btl_array_t* a /** * Grow the array if required, and set the size. - * + * * @param array (IN) * @param size (IN) */ @@ -109,14 +109,14 @@ static inline void mca_bml_base_btl_array_set_size(mca_bml_base_btl_array_t* arr /** * Grow the array size by one and return the item at that index. - * + * * @param array (IN) */ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_insert(mca_bml_base_btl_array_t* array) { #if OPAL_ENABLE_DEBUG if(array->arr_size >= array->arr_reserve) { - opal_output(0, "mca_bml_base_btl_array_insert: invalid array index %lu >= %lu", + opal_output(0, "mca_bml_base_btl_array_insert: invalid array index %lu >= %lu", (unsigned long)array->arr_size, (unsigned long)array->arr_reserve); return 0; } @@ -124,22 +124,22 @@ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_insert(mca_bml_base_btl return &array->bml_btls[array->arr_size++]; } -/** - * Remove a btl from a bml_btl +/** + * Remove a btl from a bml_btl * * @param array (IN) * @param btl (IN) */ -static inline bool mca_bml_base_btl_array_remove( mca_bml_base_btl_array_t* array, +static inline bool mca_bml_base_btl_array_remove( mca_bml_base_btl_array_t* array, struct mca_btl_base_module_t* btl ) -{ +{ size_t i = 0; /* find the btl */ for( i = 0; i < array->arr_size; i++ ) { if( array->bml_btls[i].btl == btl ) { /* make sure not to go out of bounds */ for( ; i < array->arr_size-1; i++ ) { - /* move all btl's back by 1, so the found + /* move all btl's back by 1, so the found btl is "removed" */ array->bml_btls[i] = array->bml_btls[(i+1)]; } @@ -154,7 +154,7 @@ static inline bool mca_bml_base_btl_array_remove( mca_bml_base_btl_array_t* arra /** * Return an array item at the specified index. - * + * * @param array (IN) * @param item_index (IN) */ @@ -172,7 +172,7 @@ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_get_index(mca_bml_base_ /** * Return the next LRU index in the array. - * + * * @param array (IN) * * @param index (OUT) @@ -200,14 +200,14 @@ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_get_next(mca_bml_base_b /** * Locate an element in the array - * + * * @param array (IN) * @param index (IN) */ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_find( mca_bml_base_btl_array_t* array, struct mca_btl_base_module_t* btl) { - size_t i=0; + size_t i=0; for(i=0; iarr_size; i++) { if(array->bml_btls[i].btl == btl) { return &array->bml_btls[i]; @@ -233,8 +233,8 @@ struct mca_bml_base_endpoint_t { uint32_t btl_flags_or; /**< the bitwise OR of the btl flags */ }; typedef struct mca_bml_base_endpoint_t mca_bml_base_endpoint_t; - - + + OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bml_base_endpoint_t); static inline void mca_bml_base_alloc( mca_bml_base_btl_t* bml_btl, @@ -247,10 +247,10 @@ static inline void mca_bml_base_alloc( mca_bml_base_btl_t* bml_btl, static inline void mca_bml_base_free( mca_bml_base_btl_t* bml_btl, mca_btl_base_descriptor_t* des ) -{ +{ mca_btl_base_module_t* btl = bml_btl->btl; - btl->btl_free( btl, des ); + btl->btl_free( btl, des ); /* The previous function is supposed to release the des object * so we should not touch it anymore. */ @@ -258,8 +258,8 @@ static inline void mca_bml_base_free( mca_bml_base_btl_t* bml_btl, #if OPAL_ENABLE_DEBUG_RELIABILITY -int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, - mca_btl_base_descriptor_t* des, +int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, + mca_btl_base_descriptor_t* des, mca_btl_base_tag_t tag ); @@ -303,7 +303,7 @@ static inline int mca_bml_base_sendi( mca_bml_base_btl_t* bml_btl, mca_btl_base_descriptor_t** descriptor ) { mca_btl_base_module_t* btl = bml_btl->btl; - return btl->btl_sendi(btl, bml_btl->btl_endpoint, + return btl->btl_sendi(btl, bml_btl->btl_endpoint, convertor, header, header_size, payload_size, order, flags, tag, descriptor); } @@ -331,10 +331,10 @@ static inline int mca_bml_base_get( mca_bml_base_btl_t* bml_btl, void *local_add } -static inline void mca_bml_base_prepare_src(mca_bml_base_btl_t* bml_btl, - struct opal_convertor_t* conv, +static inline void mca_bml_base_prepare_src(mca_bml_base_btl_t* bml_btl, + struct opal_convertor_t* conv, uint8_t order, - size_t reserve, + size_t reserve, size_t *size, uint32_t flags, mca_btl_base_descriptor_t** des) @@ -383,14 +383,14 @@ static inline void mca_bml_base_deregister_mem (mca_bml_base_btl_t* bml_btl, mca * indicates whether multiple threads may invoke this component * simultaneously or not. * - * @return Array of pointers to BML modules, or NULL if the transport + * @return Array of pointers to BML modules, or NULL if the transport * is not available. * * During component initialization, the BML component should discover * the physical devices that are available for the given transport, - * and create a BML module to represent each device. Any addressing - * information required by peers to reach the device should be published - * during this function via the mca_base_modex_send() interface. + * and create a BML module to represent each device. Any addressing + * information required by peers to reach the device should be published + * during this function via the mca_base_modex_send() interface. * */ @@ -419,39 +419,39 @@ typedef struct mca_bml_base_component_2_0_0_t mca_bml_base_component_t; */ /** - * MCA->BML Clean up any resources held by BML module + * MCA->BML Clean up any resources held by BML module * before the module is unloaded. - * + * * @param bml (IN) BML module. * - * Prior to unloading a BML module, the MCA framework will call - * the BML finalize method of the module. Any resources held by + * Prior to unloading a BML module, the MCA framework will call + * the BML finalize method of the module. Any resources held by * the BML should be released and if required the memory corresponding * to the BML module freed. - * + * */ typedef int (*mca_bml_base_module_finalize_fn_t)( void ); - + /** - * PML->BML notification of change in the process list. + * PML->BML notification of change in the process list. * * @param nprocs (IN) Number of processes * @param procs (IN) Set of processes * @param reachable (OUT) Bitmask indicating set of peer processes that are reachable by this BML. * @return OMPI_SUCCESS or error status on failure. * - * The mca_bml_base_module_add_procs_fn_t() is called by the PML to + * The mca_bml_base_module_add_procs_fn_t() is called by the PML to * determine the set of BMLs that should be used to reach each process. * Any addressing information exported by the peer via the mca_base_modex_send() - * function should be available during this call via the corresponding - * mca_base_modex_recv() function. The BML may utilize this information to - * determine reachability of each peer process. + * function should be available during this call via the corresponding + * mca_base_modex_recv() function. The BML may utilize this information to + * determine reachability of each peer process. * - * For each process that is reachable by the BML, the bit corresponding to the index + * For each process that is reachable by the BML, the bit corresponding to the index * into the proc array (nprocs) should be set in the reachable bitmask. The PML * provides the BML the option to return a pointer to a data structure defined * by the BML that is returned to the BML on subsequent calls to the BML data - * transfer functions (e.g bml_send). This may be used by the BML to cache any addressing + * transfer functions (e.g bml_send). This may be used by the BML to cache any addressing * or connection information (e.g. TCP socket, IP queue pair). * * \note This function will return OMPI_ERR_UNREACH if one or more @@ -461,7 +461,7 @@ typedef int (*mca_bml_base_module_finalize_fn_t)( void ); */ typedef int (*mca_bml_base_module_add_procs_fn_t)( size_t nprocs, - struct ompi_proc_t** procs, + struct ompi_proc_t** procs, struct opal_bitmap_t* reachable ); @@ -512,7 +512,7 @@ typedef int (*mca_bml_base_module_del_btl_fn_t)( struct mca_btl_base_module_t* ) * On failure of a btl, remove it from the set of forwarding * entries used by the BML. */ -typedef int (*mca_bml_base_module_del_proc_btl_fn_t)( +typedef int (*mca_bml_base_module_del_proc_btl_fn_t)( struct ompi_proc_t*, struct mca_btl_base_module_t* ); diff --git a/ompi/mca/bml/r2/Makefile.am b/ompi/mca/bml/r2/Makefile.am index 1ed9b51909d..533a5bc86c1 100644 --- a/ompi/mca/bml/r2/Makefile.am +++ b/ompi/mca/bml/r2/Makefile.am @@ -3,15 +3,15 @@ # All rights reserved. # Copyright (c) 2004-2005 The Trustees of the University of Tennessee. # All rights reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/ompi/mca/bml/r2/bml_r2.c b/ompi/mca/bml/r2/bml_r2.c index a836decb1ca..fa17f70bed0 100644 --- a/ompi/mca/bml/r2/bml_r2.c +++ b/ompi/mca/bml/r2/bml_r2.c @@ -6,12 +6,12 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. @@ -20,9 +20,9 @@ * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,11 +39,11 @@ #include "ompi/mca/bml/base/base.h" #include "opal/mca/btl/btl.h" #include "opal/mca/btl/base/base.h" -#include "ompi/mca/bml/base/bml_base_btl.h" +#include "ompi/mca/bml/base/bml_base_btl.h" #include "bml_r2.h" #include "ompi/proc/proc.h" -extern mca_bml_base_component_t mca_bml_r2_component; +extern mca_bml_base_component_t mca_bml_r2_component; /* Names of all the BTL components that this BML is aware of */ static char *btl_names = NULL; @@ -64,13 +64,13 @@ static int btl_exclusivity_compare(const void* arg1, const void* arg2) static int mca_bml_r2_add_btls( void ) { int i; - opal_list_t *btls = NULL; + opal_list_t *btls = NULL; mca_btl_base_selected_module_t* selected_btl; - size_t num_btls = 0; + size_t num_btls = 0; char **btl_names_argv = NULL; - + if(true == mca_bml_r2.btls_added) { - return OMPI_SUCCESS; + return OMPI_SUCCESS; } /* build an array of r2s and r2 modules */ @@ -79,11 +79,11 @@ static int mca_bml_r2_add_btls( void ) mca_bml_r2.num_btl_modules = 0; mca_bml_r2.num_btl_progress = 0; - + mca_bml_r2.btl_modules = (mca_btl_base_module_t **)malloc(sizeof(mca_btl_base_module_t*) * num_btls); mca_bml_r2.btl_progress = (mca_btl_base_component_progress_fn_t*)malloc(sizeof(mca_btl_base_component_progress_fn_t) * num_btls); - - if (NULL == mca_bml_r2.btl_modules || + + if (NULL == mca_bml_r2.btl_modules || NULL == mca_bml_r2.btl_progress) { return OMPI_ERR_OUT_OF_RESOURCE; } @@ -92,14 +92,14 @@ static int mca_bml_r2_add_btls( void ) mca_btl_base_module_t *btl = selected_btl->btl_module; mca_bml_r2.btl_modules[mca_bml_r2.num_btl_modules++] = btl; for (i = 0; NULL != btl_names_argv && NULL != btl_names_argv[i]; ++i) { - if (0 == + if (0 == strcmp(btl_names_argv[i], btl->btl_component->btl_version.mca_component_name)) { break; } } if (NULL == btl_names_argv || NULL == btl_names_argv[i]) { - opal_argv_append_nosize(&btl_names_argv, + opal_argv_append_nosize(&btl_names_argv, btl->btl_component->btl_version.mca_component_name); } } @@ -111,11 +111,11 @@ static int mca_bml_r2_add_btls( void ) } /* sort r2 list by exclusivity */ - qsort(mca_bml_r2.btl_modules, - mca_bml_r2.num_btl_modules, - sizeof(struct mca_btl_base_module_t*), + qsort(mca_bml_r2.btl_modules, + mca_bml_r2.num_btl_modules, + sizeof(struct mca_btl_base_module_t*), btl_exclusivity_compare); - mca_bml_r2.btls_added = true; + mca_bml_r2.btls_added = true; return OMPI_SUCCESS; } @@ -150,30 +150,30 @@ static void mca_bml_r2_calculate_bandwidth_latency (mca_bml_base_btl_array_t *bt * */ -static int mca_bml_r2_add_procs( size_t nprocs, - struct ompi_proc_t** procs, +static int mca_bml_r2_add_procs( size_t nprocs, + struct ompi_proc_t** procs, struct opal_bitmap_t* reachable ) { size_t p, p_index, n_new_procs = 0; - struct mca_btl_base_endpoint_t ** btl_endpoints = NULL; - struct ompi_proc_t** new_procs = NULL; + struct mca_btl_base_endpoint_t ** btl_endpoints = NULL; + struct ompi_proc_t** new_procs = NULL; int rc, ret = OMPI_SUCCESS; if(0 == nprocs) { return OMPI_SUCCESS; } - + if(OMPI_SUCCESS != (rc = mca_bml_r2_add_btls()) ) { return rc; } - + /* Select only the procs that don't yet have the BML proc struct. This prevent * us from calling btl->add_procs several times on the same destination proc. */ - for(p_index = 0; p_index < nprocs; p_index++) { - struct ompi_proc_t* proc = procs[p_index]; + for(p_index = 0; p_index < nprocs; p_index++) { + struct ompi_proc_t* proc = procs[p_index]; - if(NULL != proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]) { + if(NULL != proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]) { continue; /* go to the next proc */ } /* Allocate the new_procs on demand */ @@ -184,7 +184,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, } } OBJ_RETAIN(proc); - new_procs[n_new_procs++] = proc; + new_procs[n_new_procs++] = proc; } if ( 0 == n_new_procs ) { @@ -192,12 +192,12 @@ static int mca_bml_r2_add_procs( size_t nprocs, } /* Starting from here we only work on the unregistered procs */ - procs = new_procs; - nprocs = n_new_procs; - + procs = new_procs; + nprocs = n_new_procs; + /* attempt to add all procs to each r2 */ - btl_endpoints = (struct mca_btl_base_endpoint_t **) - malloc(nprocs * sizeof(struct mca_btl_base_endpoint_t*)); + btl_endpoints = (struct mca_btl_base_endpoint_t **) + malloc(nprocs * sizeof(struct mca_btl_base_endpoint_t*)); if (NULL == btl_endpoints) { free(new_procs); return OMPI_ERR_OUT_OF_RESOURCE; @@ -214,7 +214,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, * that is passed back to the r2 on data transfer calls */ opal_bitmap_clear_all_bits(reachable); - memset(btl_endpoints, 0, nprocs *sizeof(struct mca_btl_base_endpoint_t*)); + memset(btl_endpoints, 0, nprocs *sizeof(struct mca_btl_base_endpoint_t*)); rc = btl->btl_add_procs(btl, n_new_procs, (opal_proc_t**)new_procs, btl_endpoints, reachable); if(OMPI_SUCCESS != rc) { @@ -228,12 +228,12 @@ static int mca_bml_r2_add_procs( size_t nprocs, for( p = 0; p < n_new_procs; p++ ) { if(opal_bitmap_is_set_bit(reachable, p)) { ompi_proc_t *proc = new_procs[p]; - mca_bml_base_endpoint_t * bml_endpoint = - (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; + mca_bml_base_endpoint_t * bml_endpoint = + (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; mca_bml_base_btl_t* bml_btl = NULL; size_t size; - - if(NULL == bml_endpoint) { + + if(NULL == bml_endpoint) { /* allocate bml specific proc data */ bml_endpoint = OBJ_NEW(mca_bml_base_endpoint_t); if (NULL == bml_endpoint) { @@ -242,15 +242,15 @@ static int mca_bml_r2_add_procs( size_t nprocs, free(new_procs); return OMPI_ERR_OUT_OF_RESOURCE; } - + /* preallocate space in array for max number of r2s */ mca_bml_base_btl_array_reserve(&bml_endpoint->btl_eager, mca_bml_r2.num_btl_modules); mca_bml_base_btl_array_reserve(&bml_endpoint->btl_send, mca_bml_r2.num_btl_modules); mca_bml_base_btl_array_reserve(&bml_endpoint->btl_rdma, mca_bml_r2.num_btl_modules); bml_endpoint->btl_max_send_size = -1; bml_endpoint->btl_proc = proc; - proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML] = bml_endpoint; - + proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML] = bml_endpoint; + bml_endpoint->btl_flags_or = 0; } @@ -350,7 +350,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, } } if(found == false) { - mca_bml_r2.btl_progress[mca_bml_r2.num_btl_progress] = + mca_bml_r2.btl_progress[mca_bml_r2.num_btl_progress] = btl->btl_component->btl_progress; mca_bml_r2.num_btl_progress++; opal_progress_register( btl->btl_component->btl_progress ); @@ -362,7 +362,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, /* iterate back through procs and compute metrics for registered r2s */ for(p=0; pproc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; double total_bandwidth = 0; uint32_t latency; @@ -396,7 +396,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, * list of btls used for first fragments */ for (size_t n_index = 0 ; n_index < n_send ; ++n_index) { - mca_bml_base_btl_t* bml_btl = + mca_bml_base_btl_t* bml_btl = mca_bml_base_btl_array_get_index(&bml_endpoint->btl_send, n_index); mca_btl_base_module_t *btl = bml_btl->btl; @@ -407,11 +407,11 @@ static int mca_bml_r2_add_procs( size_t nprocs, bml_btl->btl_weight = (float)(1.0 / n_send); } - /* check to see if this r2 is already in the array of r2s + /* check to see if this r2 is already in the array of r2s * used for first fragments - if not add it. */ if(btl->btl_latency == latency) { - mca_bml_base_btl_t* bml_btl_new = + mca_bml_base_btl_t* bml_btl_new = mca_bml_base_btl_array_insert(&bml_endpoint->btl_eager); *bml_btl_new = *bml_btl; } @@ -450,7 +450,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, if (mca_bml_r2.show_unreach_errors) { opal_show_help("help-mca-bml-r2.txt", "unreachable proc", - true, + true, OMPI_NAME_PRINT(&(ompi_proc_local_proc->super.proc_name)), (NULL != ompi_proc_local_proc->super.proc_hostname ? ompi_proc_local_proc->super.proc_hostname : "unknown!"), @@ -473,27 +473,27 @@ static int mca_bml_r2_add_procs( size_t nprocs, * with the proc that it is/has gone away */ -static int mca_bml_r2_del_procs(size_t nprocs, - struct ompi_proc_t** procs) +static int mca_bml_r2_del_procs(size_t nprocs, + struct ompi_proc_t** procs) { size_t p; int rc; - struct ompi_proc_t** del_procs = (struct ompi_proc_t**) - malloc(nprocs * sizeof(struct ompi_proc_t*)); - size_t n_del_procs = 0; + struct ompi_proc_t** del_procs = (struct ompi_proc_t**) + malloc(nprocs * sizeof(struct ompi_proc_t*)); + size_t n_del_procs = 0; if (NULL == del_procs) { return OMPI_ERR_OUT_OF_RESOURCE; } - for(p = 0; p < nprocs; p++) { - ompi_proc_t *proc = procs[p]; + for(p = 0; p < nprocs; p++) { + ompi_proc_t *proc = procs[p]; /* We much check that there are 2 references to the proc (not 1). The * first reference belongs to ompi/proc the second belongs to the bml * since we retained it. We will release that reference at the end of * the loop below. */ if(((opal_object_t*)proc)->obj_reference_count == 2) { - del_procs[n_del_procs++] = proc; + del_procs[n_del_procs++] = proc; } } @@ -542,7 +542,7 @@ static inline int bml_r2_remove_btl_progress(mca_btl_base_module_t* btl) if(btl->btl_component->btl_progress != mca_bml_r2.btl_progress[p]) continue; opal_progress_unregister( btl->btl_component->btl_progress ); - if( p < (mca_bml_r2.num_btl_progress-1) ) { + if( p < (mca_bml_r2.num_btl_progress-1) ) { mca_bml_r2.btl_progress[p] = mca_bml_r2.btl_progress[mca_bml_r2.num_btl_progress-1]; } mca_bml_r2.num_btl_progress--; @@ -564,11 +564,11 @@ static int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl /* remove btl from eager list */ mca_bml_base_btl_array_remove(&ep->btl_eager, btl); - - /* remove btl from send list */ - if(mca_bml_base_btl_array_remove(&ep->btl_send, btl)) { - - /* compute total_bandwidth and + + /* remove btl from send list */ + if(mca_bml_base_btl_array_remove(&ep->btl_send, btl)) { + + /* compute total_bandwidth and reset max_send_size to the min of all btl's */ total_bandwidth = 0; ep->btl_max_send_size = -1; @@ -581,7 +581,7 @@ static int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl ep->btl_max_send_size = ep_btl->btl_max_send_size; } } - + /* compute weighting factor for this btl */ for(b=0; b< mca_bml_base_btl_array_get_size(&ep->btl_send); b++) { bml_btl = mca_bml_base_btl_array_get_index(&ep->btl_send, b); @@ -596,8 +596,8 @@ static int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl } /* remove btl from RDMA list */ - if(mca_bml_base_btl_array_remove(&ep->btl_rdma, btl)) { - + if(mca_bml_base_btl_array_remove(&ep->btl_rdma, btl)) { + /* compute total bandwidth */ total_bandwidth = 0; ep->btl_pipeline_send_length = 0; @@ -615,7 +615,7 @@ static int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl ep->btl_send_limit = ep_btl->btl_min_rdma_pipeline_size; } } - + /* compute weighting factor for this btl */ for(b=0; b< mca_bml_base_btl_array_get_size(&ep->btl_rdma); b++) { bml_btl = mca_bml_base_btl_array_get_index(&ep->btl_rdma, b); @@ -628,12 +628,12 @@ static int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl } } } - + return OMPI_SUCCESS; } int mca_bml_r2_finalize( void ) -{ +{ ompi_proc_t** procs; size_t p, num_procs; opal_list_item_t* w_item; @@ -686,7 +686,7 @@ int mca_bml_r2_finalize( void ) care of that. */ return OMPI_SUCCESS; -} +} /* @@ -701,16 +701,16 @@ static int mca_bml_r2_del_btl(mca_btl_base_module_t* btl) opal_list_item_t* item; mca_btl_base_module_t** modules; bool found = false; - - if(opal_list_get_size(&mca_btl_base_modules_initialized) == 2) { + + if(opal_list_get_size(&mca_btl_base_modules_initialized) == 2) { opal_output(0, "only one BTL left, can't failover"); return OMPI_SUCCESS; } - + procs = ompi_proc_all(&num_procs); if(NULL == procs) return OMPI_SUCCESS; - + /* Get rid of the associated progress function */ bml_r2_remove_btl_progress(btl); @@ -767,8 +767,8 @@ static int mca_bml_r2_add_btl(mca_btl_base_module_t* btl) /* * Register callback w/ all active btls */ -static int mca_bml_r2_register( mca_btl_base_tag_t tag, - mca_btl_base_module_recv_cb_fn_t cbfunc, +static int mca_bml_r2_register( mca_btl_base_tag_t tag, + mca_btl_base_module_recv_cb_fn_t cbfunc, void* data ) { mca_btl_base_active_message_trigger[tag].cbfunc = cbfunc; @@ -780,18 +780,18 @@ static int mca_bml_r2_register( mca_btl_base_tag_t tag, int i, rc; mca_btl_base_module_t *btl; - for(i = 0; i < (int)mca_bml_r2.num_btl_modules; i++) { + for(i = 0; i < (int)mca_bml_r2.num_btl_modules; i++) { btl = mca_bml_r2.btl_modules[i]; if( NULL == btl->btl_register ) continue; - rc = btl->btl_register(btl, tag, cbfunc, data); + rc = btl->btl_register(btl, tag, cbfunc, data); if(OMPI_SUCCESS != rc) { return rc; } } } - return OMPI_SUCCESS; + return OMPI_SUCCESS; } @@ -802,28 +802,28 @@ static int mca_bml_r2_register( mca_btl_base_tag_t tag, static int mca_bml_r2_register_error( mca_btl_base_module_error_cb_fn_t cbfunc) { - uint32_t i; + uint32_t i; int rc; - mca_btl_base_module_t *btl; + mca_btl_base_module_t *btl; uint32_t ver; - - for(i = 0; i < mca_bml_r2.num_btl_modules; i++) { - btl = mca_bml_r2.btl_modules[i]; - /* this wont work for version numbers greater than 256... seems + + for(i = 0; i < mca_bml_r2.num_btl_modules; i++) { + btl = mca_bml_r2.btl_modules[i]; + /* this wont work for version numbers greater than 256... seems reasonable.. */ ver = btl->btl_component->btl_version.mca_type_major_version << 16 | btl->btl_component->btl_version.mca_type_minor_version << 8 | btl->btl_component->btl_version.mca_type_release_version; /* is version number greater than or equal to 1.0.1? */ - if(ver >= ((1 << 16) | (0 << 8) | 1) && - NULL != btl->btl_register_error) { - rc = btl->btl_register_error(btl, cbfunc); + if(ver >= ((1 << 16) | (0 << 8) | 1) && + NULL != btl->btl_register_error) { + rc = btl->btl_register_error(btl, cbfunc); if(OMPI_SUCCESS != rc) { return rc; } } } - return OMPI_SUCCESS; + return OMPI_SUCCESS; } @@ -835,17 +835,17 @@ int mca_bml_r2_component_fini(void) mca_bml_r2_module_t mca_bml_r2 = { { - &mca_bml_r2_component, + &mca_bml_r2_component, mca_bml_r2_add_procs, mca_bml_r2_del_procs, mca_bml_r2_add_btl, mca_bml_r2_del_btl, mca_bml_r2_del_proc_btl, - mca_bml_r2_register, + mca_bml_r2_register, mca_bml_r2_register_error, - mca_bml_r2_finalize, + mca_bml_r2_finalize, mca_bml_r2_ft_event } - + }; diff --git a/ompi/mca/bml/r2/bml_r2.h b/ompi/mca/bml/r2/bml_r2.h index 087d68eab51..70c6820a058 100644 --- a/ompi/mca/bml/r2/bml_r2.h +++ b/ompi/mca/bml/r2/bml_r2.h @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -38,11 +38,11 @@ BEGIN_C_DECLS * BML module interface functions and attributes. */ struct mca_bml_r2_module_t { - mca_bml_base_module_t super; + mca_bml_base_module_t super; size_t num_btl_modules; - mca_btl_base_module_t** btl_modules; - size_t num_btl_progress; - mca_btl_base_component_progress_fn_t * btl_progress; + mca_btl_base_module_t** btl_modules; + size_t num_btl_progress; + mca_btl_base_component_progress_fn_t * btl_progress; bool btls_added; bool show_unreach_errors; }; @@ -50,16 +50,16 @@ struct mca_bml_r2_module_t { typedef struct mca_bml_r2_module_t mca_bml_r2_module_t; OMPI_DECLSPEC extern mca_bml_base_component_2_0_0_t mca_bml_r2_component; -extern mca_bml_r2_module_t mca_bml_r2; +extern mca_bml_r2_module_t mca_bml_r2; -int mca_bml_r2_component_open(void); -int mca_bml_r2_component_close(void); +int mca_bml_r2_component_open(void); +int mca_bml_r2_component_close(void); mca_bml_base_module_t* mca_bml_r2_component_init( int* priority, - bool enable_progress_threads, - bool enable_mpi_threads ); + bool enable_progress_threads, + bool enable_mpi_threads ); -int mca_bml_r2_progress(void); +int mca_bml_r2_progress(void); int mca_bml_r2_component_fini(void); diff --git a/ompi/mca/bml/r2/bml_r2_component.c b/ompi/mca/bml/r2/bml_r2_component.c index e5cc4b7b06d..acb4189fb5e 100644 --- a/ompi/mca/bml/r2/bml_r2_component.c +++ b/ompi/mca/bml/r2/bml_r2_component.c @@ -6,7 +6,7 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,29 +67,29 @@ static int mca_bml_r2_component_register(void) int mca_bml_r2_component_open(void) { - return OMPI_SUCCESS; + return OMPI_SUCCESS; } int mca_bml_r2_component_close(void) { - + /* OBJ_DESTRUCT(&mca_bml_r2.lock); */ return OMPI_SUCCESS; } -mca_bml_base_module_t* mca_bml_r2_component_init( int* priority, +mca_bml_base_module_t* mca_bml_r2_component_init( int* priority, bool enable_progress_threads, bool enable_mpi_threads ) { /* initialize BTLs */ - + if(OMPI_SUCCESS != mca_btl_base_select(enable_progress_threads,enable_mpi_threads)) return NULL; - - *priority = 100; - mca_bml_r2.btls_added = false; + + *priority = 100; + mca_bml_r2.btls_added = false; return &mca_bml_r2.super; } diff --git a/ompi/mca/bml/r2/bml_r2_ft.c b/ompi/mca/bml/r2/bml_r2_ft.c index 47fdecbac23..b905db57d46 100644 --- a/ompi/mca/bml/r2/bml_r2_ft.c +++ b/ompi/mca/bml/r2/bml_r2_ft.c @@ -5,17 +5,17 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007-2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ #include "ompi/runtime/ompi_cr.h" #include "ompi/mca/bml/base/base.h" -#include "ompi/mca/bml/base/bml_base_btl.h" +#include "ompi/mca/bml/base/bml_base_btl.h" #include "ompi/mca/pml/base/base.h" #include "ompi/proc/proc.h" @@ -102,7 +102,7 @@ int mca_bml_r2_ft_event(int state) * - BTL modules * - MPool modules * - * These should be cleaning out stale state, and memory references in + * These should be cleaning out stale state, and memory references in * preparation for being shut down. */ for(btl_idx = 0; btl_idx < mca_bml_r2.num_btl_modules; btl_idx++) { @@ -133,7 +133,7 @@ int mca_bml_r2_ft_event(int state) } } /* OPAL_CRS_CONTINUE == state && !first_continue_pass */ } - + if(OPAL_CRS_CHECKPOINT == state) { ; } diff --git a/ompi/mca/bml/r2/bml_r2_ft.h b/ompi/mca/bml/r2/bml_r2_ft.h index 59b3445fcb0..38f8563c193 100644 --- a/ompi/mca/bml/r2/bml_r2_ft.h +++ b/ompi/mca/bml/r2/bml_r2_ft.h @@ -5,16 +5,16 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/bml/r2/configure.m4 b/ompi/mca/bml/r2/configure.m4 index 308c6827929..95cb2a94cc5 100644 --- a/ompi/mca/bml/r2/configure.m4 +++ b/ompi/mca/bml/r2/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2013 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -16,7 +16,7 @@ AC_DEFUN([MCA_ompi_bml_r2_POST_CONFIG], [ AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([BML])]) ])dnl -# MCA_ompi_bml_r2_CONFIG(action-if-can-compile, +# MCA_ompi_bml_r2_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ # We can always build, unless we were explicitly disabled. diff --git a/ompi/mca/bml/r2/help-mca-bml-r2.txt b/ompi/mca/bml/r2/help-mca-bml-r2.txt index f141c4e7ef8..69d7c24db64 100644 --- a/ompi/mca/bml/r2/help-mca-bml-r2.txt +++ b/ompi/mca/bml/r2/help-mca-bml-r2.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI. diff --git a/ompi/mca/coll/Makefile.am b/ompi/mca/coll/Makefile.am index 51630d2543c..b6b27ddb1ae 100644 --- a/ompi/mca/coll/Makefile.am +++ b/ompi/mca/coll/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/coll/base/Makefile.am b/ompi/mca/coll/base/Makefile.am index 7f917c76c13..21c144bf782 100644 --- a/ompi/mca/coll/base/Makefile.am +++ b/ompi/mca/coll/base/Makefile.am @@ -5,14 +5,14 @@ # Copyright (c) 2004-2015 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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$ # diff --git a/ompi/mca/coll/base/base.h b/ompi/mca/coll/base/base.h index 3d54de22bf2..391a364263f 100644 --- a/ompi/mca/coll/base/base.h +++ b/ompi/mca/coll/base/base.h @@ -5,14 +5,14 @@ * 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, + * 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$ * */ diff --git a/ompi/mca/coll/base/coll_base_comm_select.c b/ompi/mca/coll/base/coll_base_comm_select.c index bf6179e20af..8695f570328 100644 --- a/ompi/mca/coll/base/coll_base_comm_select.c +++ b/ompi/mca/coll/base/coll_base_comm_select.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -20,9 +20,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -298,7 +298,7 @@ static opal_list_t *check_components(opal_list_t * components, opal_list_append(selectable, &avail->super); } - } + } /* If we didn't find any available components, return an error */ if (0 == opal_list_get_size(selectable)) { diff --git a/ompi/mca/coll/base/coll_base_comm_unselect.c b/ompi/mca/coll/base/coll_base_comm_unselect.c index c2b97970972..f6f7a699908 100644 --- a/ompi/mca/coll/base/coll_base_comm_unselect.c +++ b/ompi/mca/coll/base/coll_base_comm_unselect.c @@ -5,19 +5,19 @@ * 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, + * 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) 2012 Oak Rigde National Laboratory. + * Copyright (c) 2012 Oak Rigde National Laboratory. * All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -91,7 +91,7 @@ int mca_coll_base_comm_unselect(ompi_communicator_t * comm) CLOSE(comm, neighbor_alltoall); CLOSE(comm, neighbor_alltoallv); CLOSE(comm, neighbor_alltoallw); - + CLOSE(comm, ineighbor_allgather); CLOSE(comm, ineighbor_allgatherv); CLOSE(comm, ineighbor_alltoall); diff --git a/ompi/mca/coll/base/coll_base_find_available.c b/ompi/mca/coll/base/coll_base_find_available.c index feba164777a..e1f69d4ba47 100644 --- a/ompi/mca/coll/base/coll_base_find_available.c +++ b/ompi/mca/coll/base/coll_base_find_available.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -159,7 +159,7 @@ static int init_query(const mca_base_component_t * component, * Query a specific component, coll v2.0.0 */ static int init_query_2_0_0(const mca_base_component_t * component, - bool enable_progress_threads, + bool enable_progress_threads, bool enable_mpi_threads) { mca_coll_base_component_2_0_0_t *coll = diff --git a/ompi/mca/coll/base/coll_base_util.c b/ompi/mca/coll/base/coll_base_util.c index 226457185bb..e0e6a29a5e9 100644 --- a/ompi/mca/coll/base/coll_base_util.c +++ b/ompi/mca/coll/base/coll_base_util.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,10 +29,10 @@ #include "ompi/mca/pml/pml.h" #include "coll_base_util.h" -int ompi_coll_base_sendrecv_nonzero_actual( void* sendbuf, size_t scount, +int ompi_coll_base_sendrecv_nonzero_actual( void* sendbuf, size_t scount, ompi_datatype_t* sdatatype, int dest, int stag, - void* recvbuf, size_t rcount, + void* recvbuf, size_t rcount, ompi_datatype_t* rdatatype, int source, int rtag, struct ompi_communicator_t* comm, @@ -47,7 +47,7 @@ int ompi_coll_base_sendrecv_nonzero_actual( void* sendbuf, size_t scount, /* post new irecv */ ompi_datatype_type_size(rdatatype, &typesize); if (0 != rcount && 0 != typesize) { - err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag, + err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag, comm, req++)); ++nreqs; if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; } @@ -56,7 +56,7 @@ int ompi_coll_base_sendrecv_nonzero_actual( void* sendbuf, size_t scount, /* send data to children */ ompi_datatype_type_size(sdatatype, &typesize); if (0 != scount && 0 != typesize) { - err = MCA_PML_CALL(isend( sendbuf, scount, sdatatype, dest, stag, + err = MCA_PML_CALL(isend( sendbuf, scount, sdatatype, dest, stag, MCA_PML_BASE_SEND_STANDARD, comm, req++)); ++nreqs; if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; } diff --git a/ompi/mca/coll/base/coll_tags.h b/ompi/mca/coll/base/coll_tags.h index ca229ef8af4..45c9724dba3 100644 --- a/ompi/mca/coll/base/coll_tags.h +++ b/ompi/mca/coll/base/coll_tags.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/base/help-mca-coll-base.txt b/ompi/mca/coll/base/help-mca-coll-base.txt index f7c0faf863a..cc877fd0e5f 100644 --- a/ompi/mca/coll/base/help-mca-coll-base.txt +++ b/ompi/mca/coll/base/help-mca-coll-base.txt @@ -6,18 +6,18 @@ # 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, +# 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$ # # This is the US/English help file for Open MPI MCA coll-specific -# error messages. +# error messages. # [comm-select:none-available] Although some coll components are available on your system, none of @@ -40,7 +40,7 @@ check that the "basic", "libnbc" and "self" coll components are available on your system -- check the output of the "ompi_info" command). #[comm-unselect:failed-finalize] A coll module failed to finalize properly when a communicator that was -using it was destroyed. +using it was destroyed. This is somewhat unusual: the module itself may be at fault, or this may be a symptom of another issue (e.g., a memory problem). diff --git a/ompi/mca/coll/basic/Makefile.am b/ompi/mca/coll/basic/Makefile.am index 403637882ce..e0abe4f3211 100644 --- a/ompi/mca/coll/basic/Makefile.am +++ b/ompi/mca/coll/basic/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -14,9 +14,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/coll/basic/coll_basic.h b/ompi/mca/coll/basic/coll_basic.h index e0254167af3..1d1f30c383e 100644 --- a/ompi/mca/coll/basic/coll_basic.h +++ b/ompi/mca/coll/basic/coll_basic.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/basic/coll_basic_allgather.c b/ompi/mca/coll/basic/coll_basic_allgather.c index 1ad3a700782..b44ab5de92e 100644 --- a/ompi/mca/coll/basic/coll_basic_allgather.c +++ b/ompi/mca/coll/basic/coll_basic_allgather.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -61,7 +61,7 @@ mca_coll_basic_allgather_inter(void *sbuf, int scount, /* Algorithm: * - a gather to the root in remote group (simultaniously executed, * thats why we cannot use coll_gather). - * - exchange the temp-results between two roots + * - exchange the temp-results between two roots * - inter-bcast (again simultanious). */ @@ -144,9 +144,9 @@ mca_coll_basic_allgather_inter(void *sbuf, int scount, } - /* Step 3: bcast the data to the remote group. This - * happens in both groups simultaniously, thus we can - * not use coll_bcast (this would deadlock). + /* Step 3: bcast the data to the remote group. This + * happens in both groups simultaniously, thus we can + * not use coll_bcast (this would deadlock). */ if (rank != root) { /* post the recv */ diff --git a/ompi/mca/coll/basic/coll_basic_allgatherv.c b/ompi/mca/coll/basic/coll_basic_allgatherv.c index 329eaf8ad8f..0f52799fae5 100644 --- a/ompi/mca/coll/basic/coll_basic_allgatherv.c +++ b/ompi/mca/coll/basic/coll_basic_allgatherv.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/basic/coll_basic_allreduce.c b/ompi/mca/coll/basic/coll_basic_allreduce.c index 9978297a0de..9c55ce9f60b 100644 --- a/ompi/mca/coll/basic/coll_basic_allreduce.c +++ b/ompi/mca/coll/basic/coll_basic_allreduce.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -161,7 +161,7 @@ mca_coll_basic_allreduce_inter(void *sbuf, void *rbuf, int count, /* now we have on one process the result of the remote group. To distribute * the data to all processes in the local group, we exchange the data between - * the two root processes. They then send it to every other process in the + * the two root processes. They then send it to every other process in the * remote group. */ /***************************************************************************/ if (rank == root) { @@ -187,8 +187,8 @@ mca_coll_basic_allreduce_inter(void *sbuf, void *rbuf, int count, /* distribute the data to other processes in remote group. * Note that we start from 1 (not from zero), since zero - * has already the correct data AND we avoid a potential - * deadlock here. + * has already the correct data AND we avoid a potential + * deadlock here. */ if (rsize > 1) { for (i = 1; i < rsize; i++) { diff --git a/ompi/mca/coll/basic/coll_basic_alltoall.c b/ompi/mca/coll/basic/coll_basic_alltoall.c index 6f46594b406..f1d1029b9f0 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoall.c +++ b/ompi/mca/coll/basic/coll_basic_alltoall.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,7 +35,7 @@ /* * alltoall_inter * - * Function: - MPI_Alltoall + * Function: - MPI_Alltoall * Accepts: - same as MPI_Alltoall() * Returns: - MPI_SUCCESS or an MPI error code */ diff --git a/ompi/mca/coll/basic/coll_basic_alltoallv.c b/ompi/mca/coll/basic/coll_basic_alltoallv.c index 77245cb4e44..39e15fbf4a7 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoallv.c +++ b/ompi/mca/coll/basic/coll_basic_alltoallv.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/basic/coll_basic_alltoallw.c b/ompi/mca/coll/basic/coll_basic_alltoallw.c index 9f85da09277..c9860176051 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoallw.c +++ b/ompi/mca/coll/basic/coll_basic_alltoallw.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -18,9 +18,9 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -199,7 +199,7 @@ mca_coll_basic_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, size_t msg_size; ompi_datatype_type_size(rdtypes[i], &msg_size); msg_size *= rcounts[i]; - + if (i == rank || 0 == msg_size) continue; @@ -298,7 +298,7 @@ mca_coll_basic_alltoallw_inter(void *sbuf, int *scounts, int *sdisps, size_t msg_size; ompi_datatype_type_size(rdtypes[i], &msg_size); msg_size *= rcounts[i]; - + if (0 == msg_size) continue; diff --git a/ompi/mca/coll/basic/coll_basic_barrier.c b/ompi/mca/coll/basic/coll_basic_barrier.c index 2c9568a2a67..2e6814613a2 100644 --- a/ompi/mca/coll/basic/coll_basic_barrier.c +++ b/ompi/mca/coll/basic/coll_basic_barrier.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/basic/coll_basic_bcast.c b/ompi/mca/coll/basic/coll_basic_bcast.c index f03bf1251d5..667430afff3 100644 --- a/ompi/mca/coll/basic/coll_basic_bcast.c +++ b/ompi/mca/coll/basic/coll_basic_bcast.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/basic/coll_basic_component.c b/ompi/mca/coll/basic/coll_basic_component.c index 0057b72434d..b74cfdaf027 100644 --- a/ompi/mca/coll/basic/coll_basic_component.c +++ b/ompi/mca/coll/basic/coll_basic_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/coll/basic/coll_basic_exscan.c b/ompi/mca/coll/basic/coll_basic_exscan.c index 890f305c773..02f11091e37 100644 --- a/ompi/mca/coll/basic/coll_basic_exscan.c +++ b/ompi/mca/coll/basic/coll_basic_exscan.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -89,7 +89,7 @@ mca_coll_basic_exscan_intra(void *sbuf, void *rbuf, int count, return OMPI_ERR_OUT_OF_RESOURCE; } reduce_buffer = free_buffer - true_lb; - err = ompi_datatype_copy_content_same_ddt(dtype, count, + err = ompi_datatype_copy_content_same_ddt(dtype, count, reduce_buffer, (char*)sbuf); /* Receive the reduced value from the prior rank */ diff --git a/ompi/mca/coll/basic/coll_basic_gather.c b/ompi/mca/coll/basic/coll_basic_gather.c index 74353fa3d58..86276c700ce 100644 --- a/ompi/mca/coll/basic/coll_basic_gather.c +++ b/ompi/mca/coll/basic/coll_basic_gather.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/ompi/mca/coll/basic/coll_basic_gatherv.c b/ompi/mca/coll/basic/coll_basic_gatherv.c index df1489e91cc..a2f9c81da51 100644 --- a/ompi/mca/coll/basic/coll_basic_gatherv.c +++ b/ompi/mca/coll/basic/coll_basic_gatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/basic/coll_basic_module.c b/ompi/mca/coll/basic/coll_basic_module.c index a857fb811d6..7acdf063aad 100644 --- a/ompi/mca/coll/basic/coll_basic_module.c +++ b/ompi/mca/coll/basic/coll_basic_module.c @@ -16,9 +16,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,7 +56,7 @@ mca_coll_basic_init_query(bool enable_progress_threads, * priority we want to return. */ mca_coll_base_module_t * -mca_coll_basic_comm_query(struct ompi_communicator_t *comm, +mca_coll_basic_comm_query(struct ompi_communicator_t *comm, int *priority) { int size; @@ -102,7 +102,7 @@ mca_coll_basic_comm_query(struct ompi_communicator_t *comm, } } basic_module->mccb_num_reqs = size; - basic_module->mccb_reqs = (ompi_request_t**) + basic_module->mccb_reqs = (ompi_request_t**) malloc(sizeof(ompi_request_t *) * basic_module->mccb_num_reqs); /* Choose whether to use [intra|inter], and [linear|log]-based diff --git a/ompi/mca/coll/basic/coll_basic_reduce_scatter.c b/ompi/mca/coll/basic/coll_basic_reduce_scatter.c index 2ddb3a849e7..e1731b82d11 100644 --- a/ompi/mca/coll/basic/coll_basic_reduce_scatter.c +++ b/ompi/mca/coll/basic/coll_basic_reduce_scatter.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -52,7 +52,7 @@ * Cummutative, reasonable sized messages * recursive halving algorithm * Others: - * reduce and scatterv (needs to be cleaned + * reduce and scatterv (needs to be cleaned * up at some point) * * NOTE: that the recursive halving algorithm should be faster than @@ -137,7 +137,7 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, two procs to do the rest of the algorithm */ if (rank < 2 * remain) { if ((rank & 1) == 0) { - err = MCA_PML_CALL(send(result_buf, count, dtype, rank + 1, + err = MCA_PML_CALL(send(result_buf, count, dtype, rank + 1, MCA_COLL_BASE_TAG_REDUCE_SCATTER, MCA_PML_BASE_SEND_STANDARD, comm)); @@ -243,11 +243,11 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, free(tmp_rcounts); free(tmp_disps); goto cleanup; - } + } } if (send_count > 0) { err = MCA_PML_CALL(send(result_buf + tmp_disps[send_index] * extent, - send_count, dtype, peer, + send_count, dtype, peer, MCA_COLL_BASE_TAG_REDUCE_SCATTER, MCA_PML_BASE_SEND_STANDARD, comm)); @@ -255,7 +255,7 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, free(tmp_rcounts); free(tmp_disps); goto cleanup; - } + } } /* if we received something on this step, push it into @@ -266,10 +266,10 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, free(tmp_rcounts); free(tmp_disps); goto cleanup; - } + } - ompi_op_reduce(op, - recv_buf + tmp_disps[recv_index] * extent, + ompi_op_reduce(op, + recv_buf + tmp_disps[recv_index] * extent, result_buf + tmp_disps[recv_index] * extent, recv_count, dtype); } @@ -283,13 +283,13 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, /* copy local results from results buffer into real receive buffer */ if (0 != rcounts[rank]) { err = ompi_datatype_sndrcv(result_buf + disps[rank] * extent, - rcounts[rank], dtype, + rcounts[rank], dtype, rbuf, rcounts[rank], dtype); if (OMPI_SUCCESS != err) { free(tmp_rcounts); free(tmp_disps); goto cleanup; - } + } } free(tmp_rcounts); @@ -315,7 +315,7 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, comm)); if (OMPI_SUCCESS != err) goto cleanup; } - } + } } } else { @@ -382,7 +382,7 @@ mca_coll_basic_reduce_scatter_inter(void *sbuf, void *rbuf, int *rcounts, totalcounts += rcounts[i]; } - /* + /* * The following code basically does an interreduce followed by a * intrascatterv. This is implemented by having the roots of each * group exchange their sbuf. Then, the roots receive the data @@ -444,8 +444,8 @@ mca_coll_basic_reduce_scatter_inter(void *sbuf, void *rbuf, int *rcounts, /* Loop receiving and calling reduction function (C or Fortran) - * The result of this reduction operations is then in - * tmpbuf2. + * The result of this reduction operations is then in + * tmpbuf2. */ for (i = 1; i < rsize; i++) { err = MCA_PML_CALL(recv(tmpbuf, totalcounts, dtype, i, diff --git a/ompi/mca/coll/basic/coll_basic_reduce_scatter_block.c b/ompi/mca/coll/basic/coll_basic_reduce_scatter_block.c index ddd0015394d..563423d59fa 100644 --- a/ompi/mca/coll/basic/coll_basic_reduce_scatter_block.c +++ b/ompi/mca/coll/basic/coll_basic_reduce_scatter_block.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ * Returns: - MPI_SUCCESS or error code * * Algorithm: - * reduce and scatter (needs to be cleaned + * reduce and scatter (needs to be cleaned * up at some point) */ int @@ -137,7 +137,7 @@ mca_coll_basic_reduce_scatter_block_inter(void *sbuf, void *rbuf, int rcount, totalcounts = lsize * rcount; - /* + /* * The following code basically does an interreduce followed by a * intrascatter. This is implemented by having the roots of each * group exchange their sbuf. Then, the roots receive the data @@ -185,8 +185,8 @@ mca_coll_basic_reduce_scatter_block_inter(void *sbuf, void *rbuf, int rcount, /* Loop receiving and calling reduction function (C or Fortran) - * The result of this reduction operations is then in - * tmpbuf2. + * The result of this reduction operations is then in + * tmpbuf2. */ for (i = 1; i < rsize; i++) { err = MCA_PML_CALL(recv(tmpbuf, totalcounts, dtype, i, diff --git a/ompi/mca/coll/basic/coll_basic_scan.c b/ompi/mca/coll/basic/coll_basic_scan.c index 0048e0a3bf0..b8d3b2cc951 100644 --- a/ompi/mca/coll/basic/coll_basic_scan.c +++ b/ompi/mca/coll/basic/coll_basic_scan.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/ompi/mca/coll/basic/coll_basic_scatter.c b/ompi/mca/coll/basic/coll_basic_scatter.c index 74aa9e8ed63..58dc4bc2529 100644 --- a/ompi/mca/coll/basic/coll_basic_scatter.c +++ b/ompi/mca/coll/basic/coll_basic_scatter.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/ompi/mca/coll/basic/coll_basic_scatterv.c b/ompi/mca/coll/basic/coll_basic_scatterv.c index 06dcd7c3d04..e46d958b81e 100644 --- a/ompi/mca/coll/basic/coll_basic_scatterv.c +++ b/ompi/mca/coll/basic/coll_basic_scatterv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/coll.h b/ompi/mca/coll/coll.h index acb3b5c563f..acbfea801df 100644 --- a/ompi/mca/coll/coll.h +++ b/ompi/mca/coll/coll.h @@ -466,7 +466,7 @@ struct mca_coll_base_module_2_1_0_t { /** Fault tolerance event trigger function */ mca_coll_base_module_ft_event_fn_t ft_event; - /** Disable function called when a collective module will not + /** Disable function called when a collective module will not be used for the given communicator */ mca_coll_base_module_disable_1_1_0_fn_t coll_module_disable; diff --git a/ompi/mca/coll/cuda/Makefile.am b/ompi/mca/coll/cuda/Makefile.am index 69a26d690ac..e81d7ec45e3 100644 --- a/ompi/mca/coll/cuda/Makefile.am +++ b/ompi/mca/coll/cuda/Makefile.am @@ -4,9 +4,9 @@ # reserved. # Copyright (c) 2014 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # dist_ompidata_DATA = help-mpi-coll-cuda.txt diff --git a/ompi/mca/coll/cuda/coll_cuda.h b/ompi/mca/coll/cuda/coll_cuda.h index 9350424525b..7ba41f6a3d3 100644 --- a/ompi/mca/coll/cuda/coll_cuda.h +++ b/ompi/mca/coll/cuda/coll_cuda.h @@ -4,9 +4,9 @@ * reserved. * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/cuda/coll_cuda_allreduce.c b/ompi/mca/coll/cuda/coll_cuda_allreduce.c index 7797700c388..d510001f4fc 100644 --- a/ompi/mca/coll/cuda/coll_cuda_allreduce.c +++ b/ompi/mca/coll/cuda/coll_cuda_allreduce.c @@ -4,9 +4,9 @@ * reserved. * Copyright (c) 2014-2015 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/cuda/coll_cuda_component.c b/ompi/mca/coll/cuda/coll_cuda_component.c index 76c9b578ddd..10b0acf081c 100644 --- a/ompi/mca/coll/cuda/coll_cuda_component.c +++ b/ompi/mca/coll/cuda/coll_cuda_component.c @@ -7,9 +7,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/cuda/coll_cuda_module.c b/ompi/mca/coll/cuda/coll_cuda_module.c index 49803ce3ce7..6535cf5f09a 100644 --- a/ompi/mca/coll/cuda/coll_cuda_module.c +++ b/ompi/mca/coll/cuda/coll_cuda_module.c @@ -4,9 +4,9 @@ * reserved. * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -50,7 +50,7 @@ static void mca_coll_cuda_module_destruct(mca_coll_cuda_module_t *module) } OBJ_CLASS_INSTANCE(mca_coll_cuda_module_t, mca_coll_base_module_t, - mca_coll_cuda_module_construct, + mca_coll_cuda_module_construct, mca_coll_cuda_module_destruct); @@ -74,7 +74,7 @@ int mca_coll_cuda_init_query(bool enable_progress_threads, * priority we want to return. */ mca_coll_base_module_t * -mca_coll_cuda_comm_query(struct ompi_communicator_t *comm, +mca_coll_cuda_comm_query(struct ompi_communicator_t *comm, int *priority) { mca_coll_cuda_module_t *cuda_module; @@ -147,7 +147,7 @@ int mca_coll_cuda_module_enable(mca_coll_base_module_t *module, return OMPI_SUCCESS; } else { orte_show_help("help-mpi-coll-cuda.txt", "missing collective", true, - orte_process_info.nodename, + orte_process_info.nodename, mca_coll_cuda_component.priority, msg); return OMPI_ERR_NOT_FOUND; } diff --git a/ompi/mca/coll/cuda/coll_cuda_reduce_scatter_block.c b/ompi/mca/coll/cuda/coll_cuda_reduce_scatter_block.c index fa3f8c0da91..c430609bd6b 100644 --- a/ompi/mca/coll/cuda/coll_cuda_reduce_scatter_block.c +++ b/ompi/mca/coll/cuda/coll_cuda_reduce_scatter_block.c @@ -4,9 +4,9 @@ * reserved. * Copyright (c) 2014-2015 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,7 +27,7 @@ * Returns: - MPI_SUCCESS or error code * * Algorithm: - * reduce and scatter (needs to be cleaned + * reduce and scatter (needs to be cleaned * up at some point) */ int diff --git a/ompi/mca/coll/cuda/coll_cuda_scan.c b/ompi/mca/coll/cuda/coll_cuda_scan.c index f5f9224774d..eeb651ef663 100644 --- a/ompi/mca/coll/cuda/coll_cuda_scan.c +++ b/ompi/mca/coll/cuda/coll_cuda_scan.c @@ -4,9 +4,9 @@ * reserved. * Copyright (c) 2014-2015 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/coll/cuda/help-mpi-coll-cuda.txt b/ompi/mca/coll/cuda/help-mpi-coll-cuda.txt index b73074ceac9..5537420ab4e 100644 --- a/ompi/mca/coll/cuda/help-mpi-coll-cuda.txt +++ b/ompi/mca/coll/cuda/help-mpi-coll-cuda.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2014 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI's CUDA diff --git a/ompi/mca/coll/demo/Makefile.am b/ompi/mca/coll/demo/Makefile.am index 8c2a9eaea8d..235ba68883a 100644 --- a/ompi/mca/coll/demo/Makefile.am +++ b/ompi/mca/coll/demo/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/coll/demo/coll_demo.h b/ompi/mca/coll/demo/coll_demo.h index 0cb4827abd6..1a194b36a5e 100644 --- a/ompi/mca/coll/demo/coll_demo.h +++ b/ompi/mca/coll/demo/coll_demo.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,85 +41,85 @@ OMPI_MODULE_DECLSPEC extern const mca_coll_base_component_2_0_0_t mca_coll_demo_ bool enable_mpi_threads); mca_coll_base_module_t * mca_coll_demo_comm_query(struct ompi_communicator_t *comm, int *priority); - + /* Module functions */ int mca_coll_demo_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm); - int mca_coll_demo_allgather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_allgather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_allgather_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_allgather_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_allgatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_allgatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_allgatherv_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_allgatherv_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_allreduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_allreduce_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_allreduce_inter(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_allreduce_inter(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_alltoall_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_alltoall_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_alltoall_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_alltoall_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t *sdtype, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t *sdtype, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_alltoallv_inter(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t *sdtype, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + int mca_coll_demo_alltoallv_inter(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t *sdtype, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, + int mca_coll_demo_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t **sdtypes, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_alltoallw_inter(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, + int mca_coll_demo_alltoallw_inter(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t **sdtypes, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); @@ -128,110 +128,110 @@ int mca_coll_demo_module_enable(mca_coll_base_module_t *module, int mca_coll_demo_barrier_inter(struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_bcast_intra(void *buff, int count, + int mca_coll_demo_bcast_intra(void *buff, int count, struct ompi_datatype_t *datatype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_bcast_inter(void *buff, int count, - struct ompi_datatype_t *datatype, - int root, + int mca_coll_demo_bcast_inter(void *buff, int count, + struct ompi_datatype_t *datatype, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_exscan_inter(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_exscan_inter(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_gather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, + int mca_coll_demo_gather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_gather_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, + int mca_coll_demo_gather_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_gatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, int root, + int mca_coll_demo_gatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_gatherv_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, int root, + int mca_coll_demo_gatherv_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_reduce_intra(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_reduce_intra(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_reduce_inter(void *sbuf, void* rbuf, int count, + int mca_coll_demo_reduce_inter(void *sbuf, void* rbuf, int count, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_reduce_scatter_intra(void *sbuf, void *rbuf, - int *rcounts, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_reduce_scatter_intra(void *sbuf, void *rbuf, + int *rcounts, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_reduce_scatter_inter(void *sbuf, void *rbuf, - int *rcounts, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_reduce_scatter_inter(void *sbuf, void *rbuf, + int *rcounts, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_scan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_scan_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_scan_inter(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_demo_scan_inter(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_scatter_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, + int mca_coll_demo_scatter_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_scatter_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, + int mca_coll_demo_scatter_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts, int *disps, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, int root, + int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts, int *disps, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_demo_scatterv_inter(void *sbuf, int *scounts, int *disps, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, int root, + int mca_coll_demo_scatterv_inter(void *sbuf, int *scounts, int *disps, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); diff --git a/ompi/mca/coll/demo/coll_demo_allgather.c b/ompi/mca/coll/demo/coll_demo_allgather.c index dddd757fe4f..f33042a71d5 100644 --- a/ompi/mca/coll/demo/coll_demo_allgather.c +++ b/ompi/mca/coll/demo/coll_demo_allgather.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -33,9 +33,9 @@ * Accepts: - same as MPI_Allgather() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_allgather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, +int mca_coll_demo_allgather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -54,10 +54,10 @@ int mca_coll_demo_allgather_intra(void *sbuf, int scount, * Accepts: - same as MPI_Allgather() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_allgather_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, +int mca_coll_demo_allgather_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_allgatherv.c b/ompi/mca/coll/demo/coll_demo_allgatherv.c index d0449868f05..b6503ec6865 100644 --- a/ompi/mca/coll/demo/coll_demo_allgatherv.c +++ b/ompi/mca/coll/demo/coll_demo_allgatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -33,10 +33,10 @@ * Accepts: - same as MPI_Allgatherv() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_allgatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, +int mca_coll_demo_allgatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -56,10 +56,10 @@ int mca_coll_demo_allgatherv_intra(void *sbuf, int scount, * Accepts: - same as MPI_Allgatherv() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_allgatherv_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, +int mca_coll_demo_allgatherv_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_allreduce.c b/ompi/mca/coll/demo/coll_demo_allreduce.c index 1d57ce7ec56..15975bacb1c 100644 --- a/ompi/mca/coll/demo/coll_demo_allreduce.c +++ b/ompi/mca/coll/demo/coll_demo_allreduce.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,7 +34,7 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_demo_allreduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, + struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) diff --git a/ompi/mca/coll/demo/coll_demo_alltoall.c b/ompi/mca/coll/demo/coll_demo_alltoall.c index 4de3d8c2d2b..d3559970121 100644 --- a/ompi/mca/coll/demo/coll_demo_alltoall.c +++ b/ompi/mca/coll/demo/coll_demo_alltoall.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -29,13 +29,13 @@ /* * alltoall_intra * - * Function: - MPI_Alltoall + * Function: - MPI_Alltoall * Accepts: - same as MPI_Alltoall() * Returns: - MPI_SUCCESS or an MPI error code */ int mca_coll_demo_alltoall_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) @@ -43,7 +43,7 @@ int mca_coll_demo_alltoall_intra(void *sbuf, int scount, mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module; opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo alltoall_intra\n"); return demo_module->underlying.coll_alltoall(sbuf, scount, sdtype, - rbuf, rcount, rdtype, + rbuf, rcount, rdtype, comm, demo_module->underlying.coll_alltoall_module); } @@ -52,13 +52,13 @@ int mca_coll_demo_alltoall_intra(void *sbuf, int scount, /* * alltoall_inter * - * Function: - MPI_Alltoall + * Function: - MPI_Alltoall * Accepts: - same as MPI_Alltoall() * Returns: - MPI_SUCCESS or an MPI error code */ int mca_coll_demo_alltoall_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) @@ -66,7 +66,7 @@ int mca_coll_demo_alltoall_inter(void *sbuf, int scount, mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module; opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo alltoall_inter\n"); return demo_module->underlying.coll_alltoall(sbuf, scount, sdtype, - rbuf, rcount, rdtype, + rbuf, rcount, rdtype, comm, demo_module->underlying.coll_alltoall_module); } diff --git a/ompi/mca/coll/demo/coll_demo_alltoallv.c b/ompi/mca/coll/demo/coll_demo_alltoallv.c index a1d4b06c17c..0e8cf13861b 100644 --- a/ompi/mca/coll/demo/coll_demo_alltoallv.c +++ b/ompi/mca/coll/demo/coll_demo_alltoallv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -37,7 +37,7 @@ int mca_coll_demo_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -61,7 +61,7 @@ int mca_coll_demo_alltoallv_inter(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_alltoallw.c b/ompi/mca/coll/demo/coll_demo_alltoallw.c index 80c279c8ee2..b9c29693178 100644 --- a/ompi/mca/coll/demo/coll_demo_alltoallw.c +++ b/ompi/mca/coll/demo/coll_demo_alltoallw.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,9 +34,9 @@ * Returns: - MPI_SUCCESS or an MPI error code */ int mca_coll_demo_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, + struct ompi_datatype_t **sdtypes, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_barrier.c b/ompi/mca/coll/demo/coll_demo_barrier.c index e0f2ba5a6ff..bcede2bf5b5 100644 --- a/ompi/mca/coll/demo/coll_demo_barrier.c +++ b/ompi/mca/coll/demo/coll_demo_barrier.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/demo/coll_demo_bcast.c b/ompi/mca/coll/demo/coll_demo_bcast.c index 4bdcee66733..645c9e0dd62 100644 --- a/ompi/mca/coll/demo/coll_demo_bcast.c +++ b/ompi/mca/coll/demo/coll_demo_bcast.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/demo/coll_demo_component.c b/ompi/mca/coll/demo/coll_demo_component.c index 471b5350de5..b957e2c5d87 100644 --- a/ompi/mca/coll/demo/coll_demo_component.c +++ b/ompi/mca/coll/demo/coll_demo_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -118,22 +118,22 @@ mca_coll_demo_module_construct(mca_coll_demo_module_t *module) static void mca_coll_demo_module_destruct(mca_coll_demo_module_t *module) { - RELEASE(module, allgather); - RELEASE(module, allgatherv); - RELEASE(module, allreduce); - RELEASE(module, alltoall); - RELEASE(module, alltoallv); - RELEASE(module, alltoallw); - RELEASE(module, barrier); - RELEASE(module, bcast); - RELEASE(module, exscan); - RELEASE(module, gather); - RELEASE(module, gatherv); - RELEASE(module, reduce); - RELEASE(module, reduce_scatter); - RELEASE(module, scan); - RELEASE(module, scatter); - RELEASE(module, scatterv); + RELEASE(module, allgather); + RELEASE(module, allgatherv); + RELEASE(module, allreduce); + RELEASE(module, alltoall); + RELEASE(module, alltoallv); + RELEASE(module, alltoallw); + RELEASE(module, barrier); + RELEASE(module, bcast); + RELEASE(module, exscan); + RELEASE(module, gather); + RELEASE(module, gatherv); + RELEASE(module, reduce); + RELEASE(module, reduce_scatter); + RELEASE(module, scan); + RELEASE(module, scatter); + RELEASE(module, scatterv); } diff --git a/ompi/mca/coll/demo/coll_demo_exscan.c b/ompi/mca/coll/demo/coll_demo_exscan.c index 616936ba260..c970369d0dd 100644 --- a/ompi/mca/coll/demo/coll_demo_exscan.c +++ b/ompi/mca/coll/demo/coll_demo_exscan.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,8 +34,8 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_demo_exscan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_gather.c b/ompi/mca/coll/demo/coll_demo_gather.c index 9f5ab09cd01..9f9840acf8f 100644 --- a/ompi/mca/coll/demo/coll_demo_gather.c +++ b/ompi/mca/coll/demo/coll_demo_gather.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -32,10 +32,10 @@ * Accepts: - same arguments as MPI_Gather() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_gather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, +int mca_coll_demo_gather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -56,9 +56,9 @@ int mca_coll_demo_gather_intra(void *sbuf, int scount, * Returns: - MPI_SUCCESS or error code */ int mca_coll_demo_gather_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_gatherv.c b/ompi/mca/coll/demo/coll_demo_gatherv.c index 70d704698bb..f23b37a0d88 100644 --- a/ompi/mca/coll/demo/coll_demo_gatherv.c +++ b/ompi/mca/coll/demo/coll_demo_gatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -33,7 +33,7 @@ * Accepts: - same arguments as MPI_Gatherv() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_gatherv_intra(void *sbuf, int scount, +int mca_coll_demo_gatherv_intra(void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype, int root, diff --git a/ompi/mca/coll/demo/coll_demo_module.c b/ompi/mca/coll/demo/coll_demo_module.c index eab6cbd9ed3..e4bbe90d8f7 100644 --- a/ompi/mca/coll/demo/coll_demo_module.c +++ b/ompi/mca/coll/demo/coll_demo_module.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -103,7 +103,7 @@ int mca_coll_demo_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; } @@ -184,22 +184,22 @@ mca_coll_demo_module_enable(mca_coll_base_module_t *module, } /* save the old pointers */ - COPY(comm, demo_module, allgather); - COPY(comm, demo_module, allgatherv); - COPY(comm, demo_module, allreduce); - COPY(comm, demo_module, alltoall); - COPY(comm, demo_module, alltoallv); - COPY(comm, demo_module, alltoallw); - COPY(comm, demo_module, barrier); - COPY(comm, demo_module, bcast); - COPY(comm, demo_module, exscan); - COPY(comm, demo_module, gather); - COPY(comm, demo_module, gatherv); - COPY(comm, demo_module, reduce); - COPY(comm, demo_module, reduce_scatter); - COPY(comm, demo_module, scan); - COPY(comm, demo_module, scatter); - COPY(comm, demo_module, scatterv); + COPY(comm, demo_module, allgather); + COPY(comm, demo_module, allgatherv); + COPY(comm, demo_module, allreduce); + COPY(comm, demo_module, alltoall); + COPY(comm, demo_module, alltoallv); + COPY(comm, demo_module, alltoallw); + COPY(comm, demo_module, barrier); + COPY(comm, demo_module, bcast); + COPY(comm, demo_module, exscan); + COPY(comm, demo_module, gather); + COPY(comm, demo_module, gatherv); + COPY(comm, demo_module, reduce); + COPY(comm, demo_module, reduce_scatter); + COPY(comm, demo_module, scan); + COPY(comm, demo_module, scatter); + COPY(comm, demo_module, scatterv); return OMPI_SUCCESS; } diff --git a/ompi/mca/coll/demo/coll_demo_reduce.c b/ompi/mca/coll/demo/coll_demo_reduce.c index 38579e347e0..6df413902b6 100644 --- a/ompi/mca/coll/demo/coll_demo_reduce.c +++ b/ompi/mca/coll/demo/coll_demo_reduce.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,7 +34,7 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_demo_reduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) @@ -50,12 +50,12 @@ int mca_coll_demo_reduce_intra(void *sbuf, void *rbuf, int count, /* * reduce_inter * - * Function: - reduction + * Function: - reduction * Accepts: - same as MPI_Reduce() * Returns: - MPI_SUCCESS or error code */ int mca_coll_demo_reduce_inter(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) diff --git a/ompi/mca/coll/demo/coll_demo_reduce_scatter.c b/ompi/mca/coll/demo/coll_demo_reduce_scatter.c index e4be2d19219..438f1008b3a 100644 --- a/ompi/mca/coll/demo/coll_demo_reduce_scatter.c +++ b/ompi/mca/coll/demo/coll_demo_reduce_scatter.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/demo/coll_demo_scan.c b/ompi/mca/coll/demo/coll_demo_scan.c index ece10931627..90d3cb343b1 100644 --- a/ompi/mca/coll/demo/coll_demo_scan.c +++ b/ompi/mca/coll/demo/coll_demo_scan.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,8 +34,8 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_demo_scan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_scatter.c b/ompi/mca/coll/demo/coll_demo_scatter.c index f6a6c48d396..ccc2e401df6 100644 --- a/ompi/mca/coll/demo/coll_demo_scatter.c +++ b/ompi/mca/coll/demo/coll_demo_scatter.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -33,11 +33,11 @@ * Accepts: - same arguments as MPI_Scatter() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_scatter_intra(void *sbuf, int scount, +int mca_coll_demo_scatter_intra(void *sbuf, int scount, struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, + void *rbuf, int rcount, struct ompi_datatype_t *rdtype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -57,11 +57,11 @@ int mca_coll_demo_scatter_intra(void *sbuf, int scount, * Accepts: - same arguments as MPI_Scatter() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_demo_scatter_inter(void *sbuf, int scount, +int mca_coll_demo_scatter_inter(void *sbuf, int scount, struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, + void *rbuf, int rcount, struct ompi_datatype_t *rdtype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/demo/coll_demo_scatterv.c b/ompi/mca/coll/demo/coll_demo_scatterv.c index 267cd209927..3084efc0de5 100644 --- a/ompi/mca/coll/demo/coll_demo_scatterv.c +++ b/ompi/mca/coll/demo/coll_demo_scatterv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -42,7 +42,7 @@ int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts, { mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module; opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo scatterv_intra"); - return demo_module->underlying.coll_scatterv(sbuf, scounts, disps, + return demo_module->underlying.coll_scatterv(sbuf, scounts, disps, sdtype, rbuf, rcount, rdtype, root, comm, demo_module->underlying.coll_scatterv_module); @@ -65,7 +65,7 @@ int mca_coll_demo_scatterv_inter(void *sbuf, int *scounts, { mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module; opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo scatterv_inter"); - return demo_module->underlying.coll_scatterv(sbuf, scounts, disps, + return demo_module->underlying.coll_scatterv(sbuf, scounts, disps, sdtype, rbuf, rcount, rdtype, root, comm, demo_module->underlying.coll_scatterv_module); diff --git a/ompi/mca/coll/demo/configure.stub b/ompi/mca/coll/demo/configure.stub index 420a70ec47f..da069fa6b61 100644 --- a/ompi/mca/coll/demo/configure.stub +++ b/ompi/mca/coll/demo/configure.stub @@ -5,14 +5,14 @@ # 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, +# 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$ # # Don't really need anything in here -- we just want a configure diff --git a/ompi/mca/coll/fca/Makefile.am b/ompi/mca/coll/fca/Makefile.am index 35e22e44e0a..9298b6f60ef 100644 --- a/ompi/mca/coll/fca/Makefile.am +++ b/ompi/mca/coll/fca/Makefile.am @@ -42,5 +42,5 @@ mca_coll_fca_la_LDFLAGS = -module -avoid-version $(coll_fca_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) libmca_coll_fca_la_SOURCES =$(coll_fca_sources) -libmca_coll_fca_la_LIBADD = $(coll_fca_LIBS) +libmca_coll_fca_la_LIBADD = $(coll_fca_LIBS) libmca_coll_fca_la_LDFLAGS = -module -avoid-version $(coll_fca_LDFLAGS) diff --git a/ompi/mca/coll/fca/coll_fca.h b/ompi/mca/coll/fca/coll_fca.h index 7785f6970c5..cc3b7cb4f86 100644 --- a/ompi/mca/coll/fca/coll_fca.h +++ b/ompi/mca/coll/fca/coll_fca.h @@ -118,7 +118,7 @@ struct mca_coll_fca_component_t { /** MCA parameter: FCA device */ char* fca_dev; - + /** MCA parameter: Enable FCA */ int fca_enable; @@ -199,7 +199,7 @@ struct mca_coll_fca_component_t { /** MCA parameter hash table size*/ int fca_hash_size; - + /** MCA parameter hash table size*/ int fca_number_of_primes; diff --git a/ompi/mca/coll/fca/coll_fca_component.c b/ompi/mca/coll/fca/coll_fca_component.c index 65a3b2fe180..7f3c4a49358 100644 --- a/ompi/mca/coll/fca/coll_fca_component.c +++ b/ompi/mca/coll/fca/coll_fca_component.c @@ -45,1005 +45,1005 @@ const char *mca_coll_fca_component_version_string = int mca_coll_fca_output = -1; int mca_coll_fca_primes[] = { -2, 3, 5, 7, 11, 13, 17, 19, 23, 29, -31, 37, 41, 43, 47, 53, 59, 61, 67, 71, -73, 79, 83, 89, 97, 101, 103, 107, 109, 113, -127, 131, 137, 139, 149, 151, 157, 163, 167, 173, -179, 181, 191, 193, 197, 199, 211, 223, 227, 229, -233, 239, 241, 251, 257, 263, 269, 271, 277, 281, -283, 293, 307, 311, 313, 317, 331, 337, 347, 349, -353, 359, 367, 373, 379, 383, 389, 397, 401, 409, -419, 421, 431, 433, 439, 443, 449, 457, 461, 463, -467, 479, 487, 491, 499, 503, 509, 521, 523, 541, -547, 557, 563, 569, 571, 577, 587, 593, 599, 601, -607, 613, 617, 619, 631, 641, 643, 647, 653, 659, -661, 673, 677, 683, 691, 701, 709, 719, 727, 733, -739, 743, 751, 757, 761, 769, 773, 787, 797, 809, -811, 821, 823, 827, 829, 839, 853, 857, 859, 863, -877, 881, 883, 887, 907, 911, 919, 929, 937, 941, -947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, -1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, -1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, -1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, -1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, -1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, -1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, -1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, -1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, -1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, -1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, -1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, -1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, -1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, -1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, -2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, -2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, -2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, -2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, -2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, -2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, -2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, -2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, -2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, -2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, -2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, -2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, -3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, -3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, -3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, -3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, -3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, -3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, -3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, -3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, -3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, -3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, -3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, -3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, -4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, -4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, -4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, -4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, -4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, -4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, -4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, -4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, -4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, -4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, -4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, -4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, -5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, -5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, -5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, -5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, -5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, -5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, -5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, -5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, -5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, -5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, -5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, -5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, -6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, -6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, -6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, -6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, -6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, -6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, -6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, -6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, -6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, -6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, -6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, -7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, -7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, -7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, -7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, -7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, -7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, -7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, -7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, -7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, -7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, -7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, -8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, -8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, -8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, -8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, -8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, -8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, -8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, -8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, -8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, -8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, -8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, -9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, -9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, -9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, -9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, -9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, -9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, -9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, -9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, -9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, -9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, -9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, -10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, -10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, -10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, -10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, -10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, -10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, -10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, -10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, -10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, -10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, -10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, -11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, -11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, -11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, -11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, -11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, -11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, -11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, -11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, -11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, -11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, -12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, -12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, -12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, -12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, -12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, -12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, -12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, -12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, -12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, -12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, -12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, -13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, -13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, -13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, -13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, -13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, -13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, -13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, -13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, -13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, -13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, -13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, -14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, -14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, -14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, -14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, -14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, -14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, -14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, -14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, -14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, -14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, -15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, -15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, -15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, -15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, -15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, -15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, -15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, -15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, -15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, -15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, -15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, -16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, -16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, -16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, -16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, -16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, -16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, -16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, -16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, -16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, -17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, -17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, -17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, -17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, -17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, -17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, -17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, -17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, -17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, -17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, -17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, -18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, -18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, -18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, -18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, -18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, -18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, -18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, -18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, -18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, -19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, -19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, -19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, -19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, -19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, -19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, -19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, -19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, -19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, -19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, -19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, -20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, -20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, -20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, -20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, -20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, -20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, -20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, -20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, -20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, -21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, -21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, -21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, -21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, -21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, -21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, -21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, -21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, -21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, -21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, -21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, -22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, -22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, -22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, -22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, -22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, -22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, -22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, -22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, -22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, -22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, -23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, -23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, -23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, -23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, -23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, -23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, -23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, -23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, -23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, -23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, -24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, -24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, -24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, -24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, -24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, -24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, -24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, -24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, -24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, -24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, -25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, -25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, -25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, -25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, -25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, -25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, -25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, -25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, -25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, -26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, -26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, -26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, -26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, -26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, -26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, -26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, -26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, -26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, -26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, -26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, -27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, -27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, -27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, -27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, -27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, -27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, -27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, -27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, -27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, -28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, -28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, -28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, -28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, -28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, -28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, -28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, -28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, -28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, -28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, -29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, -29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, -29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, -29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, -29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, -29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, -29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, -29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, -29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, -30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, -30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, -30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, -30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, -30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, -30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, -30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, -30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, -30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, -31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, -31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, -31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, -31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, -31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, -31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, -31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, -31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, -31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, -31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, -32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, -32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, -32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, -32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, -32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, -32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, -32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, -32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, -32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, -32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, -33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, -33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, -33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, -33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, -33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, -33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, -33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, -33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, -33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, -33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, -34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, -34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, -34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, -34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, -34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, -34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, -34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, -34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, -34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, -34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, -35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, -35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, -35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, -35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, -35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, -35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, -35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, -35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, -35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, -36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, -36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, -36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, -36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, -36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, -36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, -36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, -36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, -36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, -36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, -37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, -37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, -37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, -37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, -37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, -37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, -37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, -37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, -37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, -38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, -38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, -38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, -38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, -38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, -38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, -38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, -38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, -38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, -39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, -39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, -39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, -39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, -39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, -39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, -39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, -39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, -39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, -39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, -40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, -40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, -40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, -40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, -40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, -40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, -40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, -40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, -40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, -41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, -41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, -41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, -41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, -41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, -41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, -41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, -41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, -41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, -41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, -42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, -42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, -42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, -42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, -42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, -42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, -42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, -42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, -42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, -42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, -43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, -43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, -43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, -43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, -43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, -43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, -43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, -43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, -44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, -44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, -44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, -44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, -44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, -44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, -44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, -44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, -44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, -44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, -45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, -45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, -45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, -45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, -45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, -45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, -45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, -45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, -45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, -46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, -46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, -46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, -46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, -46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, -46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, -46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, -46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, -46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, -47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, -47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, -47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, -47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, -47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, -47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, -47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, -47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, -47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, -48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, -48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, -48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, -48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, -48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, -48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, -48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, -48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, -48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, -49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, -49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, -49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, -49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, -49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, -49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, -49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, -49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, -49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, -49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051, 50053, 50069, -50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131, 50147, -50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273, -50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, -50383, 50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, -50513, 50527, 50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, -50599, 50627, 50647, 50651, 50671, 50683, 50707, 50723, 50741, 50753, -50767, 50773, 50777, 50789, 50821, 50833, 50839, 50849, 50857, 50867, -50873, 50891, 50893, 50909, 50923, 50929, 50951, 50957, 50969, 50971, -50989, 50993, 51001, 51031, 51043, 51047, 51059, 51061, 51071, 51109, -51131, 51133, 51137, 51151, 51157, 51169, 51193, 51197, 51199, 51203, -51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287, 51307, 51329, -51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419, 51421, -51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487, -51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, -51599, 51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, -51691, 51713, 51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, -51817, 51827, 51829, 51839, 51853, 51859, 51869, 51871, 51893, 51899, -51907, 51913, 51929, 51941, 51949, 51971, 51973, 51977, 51991, 52009, -52021, 52027, 52051, 52057, 52067, 52069, 52081, 52103, 52121, 52127, -52147, 52153, 52163, 52177, 52181, 52183, 52189, 52201, 52223, 52237, -52249, 52253, 52259, 52267, 52289, 52291, 52301, 52313, 52321, 52361, -52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457, 52489, 52501, -52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571, 52579, -52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709, -52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, -52817, 52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, -52937, 52951, 52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, -53047, 53051, 53069, 53077, 53087, 53089, 53093, 53101, 53113, 53117, -53129, 53147, 53149, 53161, 53171, 53173, 53189, 53197, 53201, 53231, -53233, 53239, 53267, 53269, 53279, 53281, 53299, 53309, 53323, 53327, -53353, 53359, 53377, 53381, 53401, 53407, 53411, 53419, 53437, 53441, -53453, 53479, 53503, 53507, 53527, 53549, 53551, 53569, 53591, 53593, -53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639, 53653, 53657, -53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777, 53783, -53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891, -53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, -54001, 54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, -54133, 54139, 54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, -54277, 54287, 54293, 54311, 54319, 54323, 54331, 54347, 54361, 54367, -54371, 54377, 54401, 54403, 54409, 54413, 54419, 54421, 54437, 54443, -54449, 54469, 54493, 54497, 54499, 54503, 54517, 54521, 54539, 54541, -54547, 54559, 54563, 54577, 54581, 54583, 54601, 54617, 54623, 54629, -54631, 54647, 54667, 54673, 54679, 54709, 54713, 54721, 54727, 54751, -54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851, 54869, 54877, -54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979, 54983, -55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103, -55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, -55219, 55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, -55339, 55343, 55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, -55469, 55487, 55501, 55511, 55529, 55541, 55547, 55579, 55589, 55603, -55609, 55619, 55621, 55631, 55633, 55639, 55661, 55663, 55667, 55673, -55681, 55691, 55697, 55711, 55717, 55721, 55733, 55763, 55787, 55793, -55799, 55807, 55813, 55817, 55819, 55823, 55829, 55837, 55843, 55849, -55871, 55889, 55897, 55901, 55903, 55921, 55927, 55931, 55933, 55949, -55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053, 56081, 56087, -56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171, 56179, -56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299, -56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, -56437, 56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, -56509, 56519, 56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, -56611, 56629, 56633, 56659, 56663, 56671, 56681, 56687, 56701, 56711, -56713, 56731, 56737, 56747, 56767, 56773, 56779, 56783, 56807, 56809, -56813, 56821, 56827, 56843, 56857, 56873, 56891, 56893, 56897, 56909, -56911, 56921, 56923, 56929, 56941, 56951, 56957, 56963, 56983, 56989, -56993, 56999, 57037, 57041, 57047, 57059, 57073, 57077, 57089, 57097, -57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173, 57179, 57191, -57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271, 57283, -57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389, -57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, -57557, 57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, -57667, 57679, 57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, -57751, 57773, 57781, 57787, 57791, 57793, 57803, 57809, 57829, 57839, -57847, 57853, 57859, 57881, 57899, 57901, 57917, 57923, 57943, 57947, -57973, 57977, 57991, 58013, 58027, 58031, 58043, 58049, 58057, 58061, -58067, 58073, 58099, 58109, 58111, 58129, 58147, 58151, 58153, 58169, -58171, 58189, 58193, 58199, 58207, 58211, 58217, 58229, 58231, 58237, -58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367, 58369, 58379, -58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451, 58453, -58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601, -58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, -58727, 58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, -58897, 58901, 58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, -58979, 58991, 58997, 59009, 59011, 59021, 59023, 59029, 59051, 59053, -59063, 59069, 59077, 59083, 59093, 59107, 59113, 59119, 59123, 59141, -59149, 59159, 59167, 59183, 59197, 59207, 59209, 59219, 59221, 59233, -59239, 59243, 59263, 59273, 59281, 59333, 59341, 59351, 59357, 59359, -59369, 59377, 59387, 59393, 59399, 59407, 59417, 59419, 59441, 59443, -59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513, 59539, 59557, -59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651, 59659, -59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747, -59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, -59921, 59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, -60037, 60041, 60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, -60133, 60139, 60149, 60161, 60167, 60169, 60209, 60217, 60223, 60251, -60257, 60259, 60271, 60289, 60293, 60317, 60331, 60337, 60343, 60353, -60373, 60383, 60397, 60413, 60427, 60443, 60449, 60457, 60493, 60497, -60509, 60521, 60527, 60539, 60589, 60601, 60607, 60611, 60617, 60623, -60631, 60637, 60647, 60649, 60659, 60661, 60679, 60689, 60703, 60719, -60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779, 60793, 60811, -60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917, 60919, -60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043, -61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, -61211, 61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, -61339, 61343, 61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, -61463, 61469, 61471, 61483, 61487, 61493, 61507, 61511, 61519, 61543, -61547, 61553, 61559, 61561, 61583, 61603, 61609, 61613, 61627, 61631, -61637, 61643, 61651, 61657, 61667, 61673, 61681, 61687, 61703, 61717, -61723, 61729, 61751, 61757, 61781, 61813, 61819, 61837, 61843, 61861, -61871, 61879, 61909, 61927, 61933, 61949, 61961, 61967, 61979, 61981, -61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053, 62057, 62071, -62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171, 62189, -62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303, -62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, -62467, 62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, -62563, 62581, 62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, -62659, 62683, 62687, 62701, 62723, 62731, 62743, 62753, 62761, 62773, -62791, 62801, 62819, 62827, 62851, 62861, 62869, 62873, 62897, 62903, -62921, 62927, 62929, 62939, 62969, 62971, 62981, 62983, 62987, 62989, -63029, 63031, 63059, 63067, 63073, 63079, 63097, 63103, 63113, 63127, -63131, 63149, 63179, 63197, 63199, 63211, 63241, 63247, 63277, 63281, -63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353, 63361, 63367, -63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443, 63463, -63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559, -63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, -63649, 63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, -63727, 63737, 63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, -63823, 63839, 63841, 63853, 63857, 63863, 63901, 63907, 63913, 63929, -63949, 63977, 63997, 64007, 64013, 64019, 64033, 64037, 64063, 64067, -64081, 64091, 64109, 64123, 64151, 64153, 64157, 64171, 64187, 64189, -64217, 64223, 64231, 64237, 64271, 64279, 64283, 64301, 64303, 64319, -64327, 64333, 64373, 64381, 64399, 64403, 64433, 64439, 64451, 64453, -64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579, 64591, 64601, -64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679, 64693, -64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849, -64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, -64951, 64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, -65071, 65089, 65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, -65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, -65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, -65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, -65519, 65521, 65537, 65539, 65543, 65551, 65557, 65563, 65579, 65581, -65587, 65599, 65609, 65617, 65629, 65633, 65647, 65651, 65657, 65677, -65687, 65699, 65701, 65707, 65713, 65717, 65719, 65729, 65731, 65761, -65777, 65789, 65809, 65827, 65831, 65837, 65839, 65843, 65851, 65867, -65881, 65899, 65921, 65927, 65929, 65951, 65957, 65963, 65981, 65983, -65993, 66029, 66037, 66041, 66047, 66067, 66071, 66083, 66089, 66103, -66107, 66109, 66137, 66161, 66169, 66173, 66179, 66191, 66221, 66239, -66271, 66293, 66301, 66337, 66343, 66347, 66359, 66361, 66373, 66377, -66383, 66403, 66413, 66431, 66449, 66457, 66463, 66467, 66491, 66499, -66509, 66523, 66529, 66533, 66541, 66553, 66569, 66571, 66587, 66593, -66601, 66617, 66629, 66643, 66653, 66683, 66697, 66701, 66713, 66721, -66733, 66739, 66749, 66751, 66763, 66791, 66797, 66809, 66821, 66841, -66851, 66853, 66863, 66877, 66883, 66889, 66919, 66923, 66931, 66943, -66947, 66949, 66959, 66973, 66977, 67003, 67021, 67033, 67043, 67049, -67057, 67061, 67073, 67079, 67103, 67121, 67129, 67139, 67141, 67153, -67157, 67169, 67181, 67187, 67189, 67211, 67213, 67217, 67219, 67231, -67247, 67261, 67271, 67273, 67289, 67307, 67339, 67343, 67349, 67369, -67391, 67399, 67409, 67411, 67421, 67427, 67429, 67433, 67447, 67453, -67477, 67481, 67489, 67493, 67499, 67511, 67523, 67531, 67537, 67547, -67559, 67567, 67577, 67579, 67589, 67601, 67607, 67619, 67631, 67651, -67679, 67699, 67709, 67723, 67733, 67741, 67751, 67757, 67759, 67763, -67777, 67783, 67789, 67801, 67807, 67819, 67829, 67843, 67853, 67867, -67883, 67891, 67901, 67927, 67931, 67933, 67939, 67943, 67957, 67961, -67967, 67979, 67987, 67993, 68023, 68041, 68053, 68059, 68071, 68087, -68099, 68111, 68113, 68141, 68147, 68161, 68171, 68207, 68209, 68213, -68219, 68227, 68239, 68261, 68279, 68281, 68311, 68329, 68351, 68371, -68389, 68399, 68437, 68443, 68447, 68449, 68473, 68477, 68483, 68489, -68491, 68501, 68507, 68521, 68531, 68539, 68543, 68567, 68581, 68597, -68611, 68633, 68639, 68659, 68669, 68683, 68687, 68699, 68711, 68713, -68729, 68737, 68743, 68749, 68767, 68771, 68777, 68791, 68813, 68819, -68821, 68863, 68879, 68881, 68891, 68897, 68899, 68903, 68909, 68917, -68927, 68947, 68963, 68993, 69001, 69011, 69019, 69029, 69031, 69061, -69067, 69073, 69109, 69119, 69127, 69143, 69149, 69151, 69163, 69191, -69193, 69197, 69203, 69221, 69233, 69239, 69247, 69257, 69259, 69263, -69313, 69317, 69337, 69341, 69371, 69379, 69383, 69389, 69401, 69403, -69427, 69431, 69439, 69457, 69463, 69467, 69473, 69481, 69491, 69493, -69497, 69499, 69539, 69557, 69593, 69623, 69653, 69661, 69677, 69691, -69697, 69709, 69737, 69739, 69761, 69763, 69767, 69779, 69809, 69821, -69827, 69829, 69833, 69847, 69857, 69859, 69877, 69899, 69911, 69929, -69931, 69941, 69959, 69991, 69997, 70001, 70003, 70009, 70019, 70039, -70051, 70061, 70067, 70079, 70099, 70111, 70117, 70121, 70123, 70139, -70141, 70157, 70163, 70177, 70181, 70183, 70199, 70201, 70207, 70223, -70229, 70237, 70241, 70249, 70271, 70289, 70297, 70309, 70313, 70321, -70327, 70351, 70373, 70379, 70381, 70393, 70423, 70429, 70439, 70451, -70457, 70459, 70481, 70487, 70489, 70501, 70507, 70529, 70537, 70549, -70571, 70573, 70583, 70589, 70607, 70619, 70621, 70627, 70639, 70657, -70663, 70667, 70687, 70709, 70717, 70729, 70753, 70769, 70783, 70793, -70823, 70841, 70843, 70849, 70853, 70867, 70877, 70879, 70891, 70901, -70913, 70919, 70921, 70937, 70949, 70951, 70957, 70969, 70979, 70981, -70991, 70997, 70999, 71011, 71023, 71039, 71059, 71069, 71081, 71089, -71119, 71129, 71143, 71147, 71153, 71161, 71167, 71171, 71191, 71209, -71233, 71237, 71249, 71257, 71261, 71263, 71287, 71293, 71317, 71327, -71329, 71333, 71339, 71341, 71347, 71353, 71359, 71363, 71387, 71389, -71399, 71411, 71413, 71419, 71429, 71437, 71443, 71453, 71471, 71473, -71479, 71483, 71503, 71527, 71537, 71549, 71551, 71563, 71569, 71593, -71597, 71633, 71647, 71663, 71671, 71693, 71699, 71707, 71711, 71713, -71719, 71741, 71761, 71777, 71789, 71807, 71809, 71821, 71837, 71843, -71849, 71861, 71867, 71879, 71881, 71887, 71899, 71909, 71917, 71933, -71941, 71947, 71963, 71971, 71983, 71987, 71993, 71999, 72019, 72031, -72043, 72047, 72053, 72073, 72077, 72089, 72091, 72101, 72103, 72109, -72139, 72161, 72167, 72169, 72173, 72211, 72221, 72223, 72227, 72229, -72251, 72253, 72269, 72271, 72277, 72287, 72307, 72313, 72337, 72341, -72353, 72367, 72379, 72383, 72421, 72431, 72461, 72467, 72469, 72481, -72493, 72497, 72503, 72533, 72547, 72551, 72559, 72577, 72613, 72617, -72623, 72643, 72647, 72649, 72661, 72671, 72673, 72679, 72689, 72701, -72707, 72719, 72727, 72733, 72739, 72763, 72767, 72797, 72817, 72823, -72859, 72869, 72871, 72883, 72889, 72893, 72901, 72907, 72911, 72923, -72931, 72937, 72949, 72953, 72959, 72973, 72977, 72997, 73009, 73013, -73019, 73037, 73039, 73043, 73061, 73063, 73079, 73091, 73121, 73127, -73133, 73141, 73181, 73189, 73237, 73243, 73259, 73277, 73291, 73303, -73309, 73327, 73331, 73351, 73361, 73363, 73369, 73379, 73387, 73417, -73421, 73433, 73453, 73459, 73471, 73477, 73483, 73517, 73523, 73529, -73547, 73553, 73561, 73571, 73583, 73589, 73597, 73607, 73609, 73613, -73637, 73643, 73651, 73673, 73679, 73681, 73693, 73699, 73709, 73721, -73727, 73751, 73757, 73771, 73783, 73819, 73823, 73847, 73849, 73859, -73867, 73877, 73883, 73897, 73907, 73939, 73943, 73951, 73961, 73973, -73999, 74017, 74021, 74027, 74047, 74051, 74071, 74077, 74093, 74099, -74101, 74131, 74143, 74149, 74159, 74161, 74167, 74177, 74189, 74197, -74201, 74203, 74209, 74219, 74231, 74257, 74279, 74287, 74293, 74297, -74311, 74317, 74323, 74353, 74357, 74363, 74377, 74381, 74383, 74411, -74413, 74419, 74441, 74449, 74453, 74471, 74489, 74507, 74509, 74521, -74527, 74531, 74551, 74561, 74567, 74573, 74587, 74597, 74609, 74611, -74623, 74653, 74687, 74699, 74707, 74713, 74717, 74719, 74729, 74731, -74747, 74759, 74761, 74771, 74779, 74797, 74821, 74827, 74831, 74843, -74857, 74861, 74869, 74873, 74887, 74891, 74897, 74903, 74923, 74929, -74933, 74941, 74959, 75011, 75013, 75017, 75029, 75037, 75041, 75079, -75083, 75109, 75133, 75149, 75161, 75167, 75169, 75181, 75193, 75209, -75211, 75217, 75223, 75227, 75239, 75253, 75269, 75277, 75289, 75307, -75323, 75329, 75337, 75347, 75353, 75367, 75377, 75389, 75391, 75401, -75403, 75407, 75431, 75437, 75479, 75503, 75511, 75521, 75527, 75533, -75539, 75541, 75553, 75557, 75571, 75577, 75583, 75611, 75617, 75619, -75629, 75641, 75653, 75659, 75679, 75683, 75689, 75703, 75707, 75709, -75721, 75731, 75743, 75767, 75773, 75781, 75787, 75793, 75797, 75821, -75833, 75853, 75869, 75883, 75913, 75931, 75937, 75941, 75967, 75979, -75983, 75989, 75991, 75997, 76001, 76003, 76031, 76039, 76079, 76081, -76091, 76099, 76103, 76123, 76129, 76147, 76157, 76159, 76163, 76207, -76213, 76231, 76243, 76249, 76253, 76259, 76261, 76283, 76289, 76303, -76333, 76343, 76367, 76369, 76379, 76387, 76403, 76421, 76423, 76441, -76463, 76471, 76481, 76487, 76493, 76507, 76511, 76519, 76537, 76541, -76543, 76561, 76579, 76597, 76603, 76607, 76631, 76649, 76651, 76667, -76673, 76679, 76697, 76717, 76733, 76753, 76757, 76771, 76777, 76781, -76801, 76819, 76829, 76831, 76837, 76847, 76871, 76873, 76883, 76907, -76913, 76919, 76943, 76949, 76961, 76963, 76991, 77003, 77017, 77023, -77029, 77041, 77047, 77069, 77081, 77093, 77101, 77137, 77141, 77153, -77167, 77171, 77191, 77201, 77213, 77237, 77239, 77243, 77249, 77261, -77263, 77267, 77269, 77279, 77291, 77317, 77323, 77339, 77347, 77351, -77359, 77369, 77377, 77383, 77417, 77419, 77431, 77447, 77471, 77477, -77479, 77489, 77491, 77509, 77513, 77521, 77527, 77543, 77549, 77551, -77557, 77563, 77569, 77573, 77587, 77591, 77611, 77617, 77621, 77641, -77647, 77659, 77681, 77687, 77689, 77699, 77711, 77713, 77719, 77723, -77731, 77743, 77747, 77761, 77773, 77783, 77797, 77801, 77813, 77839, -77849, 77863, 77867, 77893, 77899, 77929, 77933, 77951, 77969, 77977, -77983, 77999, 78007, 78017, 78031, 78041, 78049, 78059, 78079, 78101, -78121, 78137, 78139, 78157, 78163, 78167, 78173, 78179, 78191, 78193, -78203, 78229, 78233, 78241, 78259, 78277, 78283, 78301, 78307, 78311, -78317, 78341, 78347, 78367, 78401, 78427, 78437, 78439, 78467, 78479, -78487, 78497, 78509, 78511, 78517, 78539, 78541, 78553, 78569, 78571, -78577, 78583, 78593, 78607, 78623, 78643, 78649, 78653, 78691, 78697, -78707, 78713, 78721, 78737, 78779, 78781, 78787, 78791, 78797, 78803, -78809, 78823, 78839, 78853, 78857, 78877, 78887, 78889, 78893, 78901, -78919, 78929, 78941, 78977, 78979, 78989, 79031, 79039, 79043, 79063, -79087, 79103, 79111, 79133, 79139, 79147, 79151, 79153, 79159, 79181, -79187, 79193, 79201, 79229, 79231, 79241, 79259, 79273, 79279, 79283, -79301, 79309, 79319, 79333, 79337, 79349, 79357, 79367, 79379, 79393, -79397, 79399, 79411, 79423, 79427, 79433, 79451, 79481, 79493, 79531, -79537, 79549, 79559, 79561, 79579, 79589, 79601, 79609, 79613, 79621, -79627, 79631, 79633, 79657, 79669, 79687, 79691, 79693, 79697, 79699, -79757, 79769, 79777, 79801, 79811, 79813, 79817, 79823, 79829, 79841, -79843, 79847, 79861, 79867, 79873, 79889, 79901, 79903, 79907, 79939, -79943, 79967, 79973, 79979, 79987, 79997, 79999, 80021, 80039, 80051, -80071, 80077, 80107, 80111, 80141, 80147, 80149, 80153, 80167, 80173, -80177, 80191, 80207, 80209, 80221, 80231, 80233, 80239, 80251, 80263, -80273, 80279, 80287, 80309, 80317, 80329, 80341, 80347, 80363, 80369, -80387, 80407, 80429, 80447, 80449, 80471, 80473, 80489, 80491, 80513, -80527, 80537, 80557, 80567, 80599, 80603, 80611, 80621, 80627, 80629, -80651, 80657, 80669, 80671, 80677, 80681, 80683, 80687, 80701, 80713, -80737, 80747, 80749, 80761, 80777, 80779, 80783, 80789, 80803, 80809, -80819, 80831, 80833, 80849, 80863, 80897, 80909, 80911, 80917, 80923, -80929, 80933, 80953, 80963, 80989, 81001, 81013, 81017, 81019, 81023, -81031, 81041, 81043, 81047, 81049, 81071, 81077, 81083, 81097, 81101, -81119, 81131, 81157, 81163, 81173, 81181, 81197, 81199, 81203, 81223, -81233, 81239, 81281, 81283, 81293, 81299, 81307, 81331, 81343, 81349, -81353, 81359, 81371, 81373, 81401, 81409, 81421, 81439, 81457, 81463, -81509, 81517, 81527, 81533, 81547, 81551, 81553, 81559, 81563, 81569, -81611, 81619, 81629, 81637, 81647, 81649, 81667, 81671, 81677, 81689, -81701, 81703, 81707, 81727, 81737, 81749, 81761, 81769, 81773, 81799, -81817, 81839, 81847, 81853, 81869, 81883, 81899, 81901, 81919, 81929, -81931, 81937, 81943, 81953, 81967, 81971, 81973, 82003, 82007, 82009, -82013, 82021, 82031, 82037, 82039, 82051, 82067, 82073, 82129, 82139, -82141, 82153, 82163, 82171, 82183, 82189, 82193, 82207, 82217, 82219, -82223, 82231, 82237, 82241, 82261, 82267, 82279, 82301, 82307, 82339, -82349, 82351, 82361, 82373, 82387, 82393, 82421, 82457, 82463, 82469, -82471, 82483, 82487, 82493, 82499, 82507, 82529, 82531, 82549, 82559, -82561, 82567, 82571, 82591, 82601, 82609, 82613, 82619, 82633, 82651, -82657, 82699, 82721, 82723, 82727, 82729, 82757, 82759, 82763, 82781, -82787, 82793, 82799, 82811, 82813, 82837, 82847, 82883, 82889, 82891, -82903, 82913, 82939, 82963, 82981, 82997, 83003, 83009, 83023, 83047, -83059, 83063, 83071, 83077, 83089, 83093, 83101, 83117, 83137, 83177, -83203, 83207, 83219, 83221, 83227, 83231, 83233, 83243, 83257, 83267, -83269, 83273, 83299, 83311, 83339, 83341, 83357, 83383, 83389, 83399, -83401, 83407, 83417, 83423, 83431, 83437, 83443, 83449, 83459, 83471, -83477, 83497, 83537, 83557, 83561, 83563, 83579, 83591, 83597, 83609, -83617, 83621, 83639, 83641, 83653, 83663, 83689, 83701, 83717, 83719, -83737, 83761, 83773, 83777, 83791, 83813, 83833, 83843, 83857, 83869, -83873, 83891, 83903, 83911, 83921, 83933, 83939, 83969, 83983, 83987, -84011, 84017, 84047, 84053, 84059, 84061, 84067, 84089, 84121, 84127, -84131, 84137, 84143, 84163, 84179, 84181, 84191, 84199, 84211, 84221, -84223, 84229, 84239, 84247, 84263, 84299, 84307, 84313, 84317, 84319, -84347, 84349, 84377, 84389, 84391, 84401, 84407, 84421, 84431, 84437, -84443, 84449, 84457, 84463, 84467, 84481, 84499, 84503, 84509, 84521, -84523, 84533, 84551, 84559, 84589, 84629, 84631, 84649, 84653, 84659, -84673, 84691, 84697, 84701, 84713, 84719, 84731, 84737, 84751, 84761, -84787, 84793, 84809, 84811, 84827, 84857, 84859, 84869, 84871, 84913, -84919, 84947, 84961, 84967, 84977, 84979, 84991, 85009, 85021, 85027, -85037, 85049, 85061, 85081, 85087, 85091, 85093, 85103, 85109, 85121, -85133, 85147, 85159, 85193, 85199, 85201, 85213, 85223, 85229, 85237, -85243, 85247, 85259, 85297, 85303, 85313, 85331, 85333, 85361, 85363, -85369, 85381, 85411, 85427, 85429, 85439, 85447, 85451, 85453, 85469, -85487, 85513, 85517, 85523, 85531, 85549, 85571, 85577, 85597, 85601, -85607, 85619, 85621, 85627, 85639, 85643, 85661, 85667, 85669, 85691, -85703, 85711, 85717, 85733, 85751, 85781, 85793, 85817, 85819, 85829, -85831, 85837, 85843, 85847, 85853, 85889, 85903, 85909, 85931, 85933, -85991, 85999, 86011, 86017, 86027, 86029, 86069, 86077, 86083, 86111, -86113, 86117, 86131, 86137, 86143, 86161, 86171, 86179, 86183, 86197, -86201, 86209, 86239, 86243, 86249, 86257, 86263, 86269, 86287, 86291, -86293, 86297, 86311, 86323, 86341, 86351, 86353, 86357, 86369, 86371, -86381, 86389, 86399, 86413, 86423, 86441, 86453, 86461, 86467, 86477, -86491, 86501, 86509, 86531, 86533, 86539, 86561, 86573, 86579, 86587, -86599, 86627, 86629, 86677, 86689, 86693, 86711, 86719, 86729, 86743, -86753, 86767, 86771, 86783, 86813, 86837, 86843, 86851, 86857, 86861, -86869, 86923, 86927, 86929, 86939, 86951, 86959, 86969, 86981, 86993, -87011, 87013, 87037, 87041, 87049, 87071, 87083, 87103, 87107, 87119, -87121, 87133, 87149, 87151, 87179, 87181, 87187, 87211, 87221, 87223, -87251, 87253, 87257, 87277, 87281, 87293, 87299, 87313, 87317, 87323, -87337, 87359, 87383, 87403, 87407, 87421, 87427, 87433, 87443, 87473, -87481, 87491, 87509, 87511, 87517, 87523, 87539, 87541, 87547, 87553, -87557, 87559, 87583, 87587, 87589, 87613, 87623, 87629, 87631, 87641, -87643, 87649, 87671, 87679, 87683, 87691, 87697, 87701, 87719, 87721, -87739, 87743, 87751, 87767, 87793, 87797, 87803, 87811, 87833, 87853, -87869, 87877, 87881, 87887, 87911, 87917, 87931, 87943, 87959, 87961, -87973, 87977, 87991, 88001, 88003, 88007, 88019, 88037, 88069, 88079, -88093, 88117, 88129, 88169, 88177, 88211, 88223, 88237, 88241, 88259, -88261, 88289, 88301, 88321, 88327, 88337, 88339, 88379, 88397, 88411, -88423, 88427, 88463, 88469, 88471, 88493, 88499, 88513, 88523, 88547, -88589, 88591, 88607, 88609, 88643, 88651, 88657, 88661, 88663, 88667, -88681, 88721, 88729, 88741, 88747, 88771, 88789, 88793, 88799, 88801, -88807, 88811, 88813, 88817, 88819, 88843, 88853, 88861, 88867, 88873, -88883, 88897, 88903, 88919, 88937, 88951, 88969, 88993, 88997, 89003, -89009, 89017, 89021, 89041, 89051, 89057, 89069, 89071, 89083, 89087, -89101, 89107, 89113, 89119, 89123, 89137, 89153, 89189, 89203, 89209, -89213, 89227, 89231, 89237, 89261, 89269, 89273, 89293, 89303, 89317, -89329, 89363, 89371, 89381, 89387, 89393, 89399, 89413, 89417, 89431, -89443, 89449, 89459, 89477, 89491, 89501, 89513, 89519, 89521, 89527, -89533, 89561, 89563, 89567, 89591, 89597, 89599, 89603, 89611, 89627, -89633, 89653, 89657, 89659, 89669, 89671, 89681, 89689, 89753, 89759, -89767, 89779, 89783, 89797, 89809, 89819, 89821, 89833, 89839, 89849, -89867, 89891, 89897, 89899, 89909, 89917, 89923, 89939, 89959, 89963, -89977, 89983, 89989, 90001, 90007, 90011, 90017, 90019, 90023, 90031, -90053, 90059, 90067, 90071, 90073, 90089, 90107, 90121, 90127, 90149, -90163, 90173, 90187, 90191, 90197, 90199, 90203, 90217, 90227, 90239, -90247, 90263, 90271, 90281, 90289, 90313, 90353, 90359, 90371, 90373, -90379, 90397, 90401, 90403, 90407, 90437, 90439, 90469, 90473, 90481, -90499, 90511, 90523, 90527, 90529, 90533, 90547, 90583, 90599, 90617, -90619, 90631, 90641, 90647, 90659, 90677, 90679, 90697, 90703, 90709, -90731, 90749, 90787, 90793, 90803, 90821, 90823, 90833, 90841, 90847, -90863, 90887, 90901, 90907, 90911, 90917, 90931, 90947, 90971, 90977, -90989, 90997, 91009, 91019, 91033, 91079, 91081, 91097, 91099, 91121, -91127, 91129, 91139, 91141, 91151, 91153, 91159, 91163, 91183, 91193, -91199, 91229, 91237, 91243, 91249, 91253, 91283, 91291, 91297, 91303, -91309, 91331, 91367, 91369, 91373, 91381, 91387, 91393, 91397, 91411, -91423, 91433, 91453, 91457, 91459, 91463, 91493, 91499, 91513, 91529, -91541, 91571, 91573, 91577, 91583, 91591, 91621, 91631, 91639, 91673, -91691, 91703, 91711, 91733, 91753, 91757, 91771, 91781, 91801, 91807, -91811, 91813, 91823, 91837, 91841, 91867, 91873, 91909, 91921, 91939, -91943, 91951, 91957, 91961, 91967, 91969, 91997, 92003, 92009, 92033, -92041, 92051, 92077, 92083, 92107, 92111, 92119, 92143, 92153, 92173, -92177, 92179, 92189, 92203, 92219, 92221, 92227, 92233, 92237, 92243, -92251, 92269, 92297, 92311, 92317, 92333, 92347, 92353, 92357, 92363, -92369, 92377, 92381, 92383, 92387, 92399, 92401, 92413, 92419, 92431, -92459, 92461, 92467, 92479, 92489, 92503, 92507, 92551, 92557, 92567, -92569, 92581, 92593, 92623, 92627, 92639, 92641, 92647, 92657, 92669, -92671, 92681, 92683, 92693, 92699, 92707, 92717, 92723, 92737, 92753, -92761, 92767, 92779, 92789, 92791, 92801, 92809, 92821, 92831, 92849, -92857, 92861, 92863, 92867, 92893, 92899, 92921, 92927, 92941, 92951, -92957, 92959, 92987, 92993, 93001, 93047, 93053, 93059, 93077, 93083, -93089, 93097, 93103, 93113, 93131, 93133, 93139, 93151, 93169, 93179, -93187, 93199, 93229, 93239, 93241, 93251, 93253, 93257, 93263, 93281, -93283, 93287, 93307, 93319, 93323, 93329, 93337, 93371, 93377, 93383, -93407, 93419, 93427, 93463, 93479, 93481, 93487, 93491, 93493, 93497, -93503, 93523, 93529, 93553, 93557, 93559, 93563, 93581, 93601, 93607, -93629, 93637, 93683, 93701, 93703, 93719, 93739, 93761, 93763, 93787, -93809, 93811, 93827, 93851, 93871, 93887, 93889, 93893, 93901, 93911, -93913, 93923, 93937, 93941, 93949, 93967, 93971, 93979, 93983, 93997, -94007, 94009, 94033, 94049, 94057, 94063, 94079, 94099, 94109, 94111, -94117, 94121, 94151, 94153, 94169, 94201, 94207, 94219, 94229, 94253, -94261, 94273, 94291, 94307, 94309, 94321, 94327, 94331, 94343, 94349, -94351, 94379, 94397, 94399, 94421, 94427, 94433, 94439, 94441, 94447, -94463, 94477, 94483, 94513, 94529, 94531, 94541, 94543, 94547, 94559, -94561, 94573, 94583, 94597, 94603, 94613, 94621, 94649, 94651, 94687, -94693, 94709, 94723, 94727, 94747, 94771, 94777, 94781, 94789, 94793, -94811, 94819, 94823, 94837, 94841, 94847, 94849, 94873, 94889, 94903, -94907, 94933, 94949, 94951, 94961, 94993, 94999, 95003, 95009, 95021, -95027, 95063, 95071, 95083, 95087, 95089, 95093, 95101, 95107, 95111, -95131, 95143, 95153, 95177, 95189, 95191, 95203, 95213, 95219, 95231, -95233, 95239, 95257, 95261, 95267, 95273, 95279, 95287, 95311, 95317, -95327, 95339, 95369, 95383, 95393, 95401, 95413, 95419, 95429, 95441, -95443, 95461, 95467, 95471, 95479, 95483, 95507, 95527, 95531, 95539, -95549, 95561, 95569, 95581, 95597, 95603, 95617, 95621, 95629, 95633, -95651, 95701, 95707, 95713, 95717, 95723, 95731, 95737, 95747, 95773, -95783, 95789, 95791, 95801, 95803, 95813, 95819, 95857, 95869, 95873, -95881, 95891, 95911, 95917, 95923, 95929, 95947, 95957, 95959, 95971, -95987, 95989, 96001, 96013, 96017, 96043, 96053, 96059, 96079, 96097, -96137, 96149, 96157, 96167, 96179, 96181, 96199, 96211, 96221, 96223, -96233, 96259, 96263, 96269, 96281, 96289, 96293, 96323, 96329, 96331, -96337, 96353, 96377, 96401, 96419, 96431, 96443, 96451, 96457, 96461, -96469, 96479, 96487, 96493, 96497, 96517, 96527, 96553, 96557, 96581, -96587, 96589, 96601, 96643, 96661, 96667, 96671, 96697, 96703, 96731, -96737, 96739, 96749, 96757, 96763, 96769, 96779, 96787, 96797, 96799, -96821, 96823, 96827, 96847, 96851, 96857, 96893, 96907, 96911, 96931, -96953, 96959, 96973, 96979, 96989, 96997, 97001, 97003, 97007, 97021, -97039, 97073, 97081, 97103, 97117, 97127, 97151, 97157, 97159, 97169, -97171, 97177, 97187, 97213, 97231, 97241, 97259, 97283, 97301, 97303, -97327, 97367, 97369, 97373, 97379, 97381, 97387, 97397, 97423, 97429, -97441, 97453, 97459, 97463, 97499, 97501, 97511, 97523, 97547, 97549, -97553, 97561, 97571, 97577, 97579, 97583, 97607, 97609, 97613, 97649, -97651, 97673, 97687, 97711, 97729, 97771, 97777, 97787, 97789, 97813, -97829, 97841, 97843, 97847, 97849, 97859, 97861, 97871, 97879, 97883, -97919, 97927, 97931, 97943, 97961, 97967, 97973, 97987, 98009, 98011, -98017, 98041, 98047, 98057, 98081, 98101, 98123, 98129, 98143, 98179, -98207, 98213, 98221, 98227, 98251, 98257, 98269, 98297, 98299, 98317, -98321, 98323, 98327, 98347, 98369, 98377, 98387, 98389, 98407, 98411, -98419, 98429, 98443, 98453, 98459, 98467, 98473, 98479, 98491, 98507, -98519, 98533, 98543, 98561, 98563, 98573, 98597, 98621, 98627, 98639, -98641, 98663, 98669, 98689, 98711, 98713, 98717, 98729, 98731, 98737, -98773, 98779, 98801, 98807, 98809, 98837, 98849, 98867, 98869, 98873, -98887, 98893, 98897, 98899, 98909, 98911, 98927, 98929, 98939, 98947, -98953, 98963, 98981, 98993, 98999, 99013, 99017, 99023, 99041, 99053, -99079, 99083, 99089, 99103, 99109, 99119, 99131, 99133, 99137, 99139, -99149, 99173, 99181, 99191, 99223, 99233, 99241, 99251, 99257, 99259, -99277, 99289, 99317, 99347, 99349, 99367, 99371, 99377, 99391, 99397, -99401, 99409, 99431, 99439, 99469, 99487, 99497, 99523, 99527, 99529, -99551, 99559, 99563, 99571, 99577, 99581, 99607, 99611, 99623, 99643, -99661, 99667, 99679, 99689, 99707, 99709, 99713, 99719, 99721, 99733, -99761, 99767, 99787, 99793, 99809, 99817, 99823, 99829, 99833, 99839, -99859, 99871, 99877, 99881, 99901, 99907, 99923, 99929, 99961, 99971, -99989, 99991, 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, -100129, 100151, 100153, 100169, 100183, 100189, 100193, 100207, 100213, 100237, -100267, 100271, 100279, 100291, 100297, 100313, 100333, 100343, 100357, 100361, -100363, 100379, 100391, 100393, 100403, 100411, 100417, 100447, 100459, 100469, -100483, 100493, 100501, 100511, 100517, 100519, 100523, 100537, 100547, 100549, -100559, 100591, 100609, 100613, 100621, 100649, 100669, 100673, 100693, 100699, -100703, 100733, 100741, 100747, 100769, 100787, 100799, 100801, 100811, 100823, -100829, 100847, 100853, 100907, 100913, 100927, 100931, 100937, 100943, 100957, -100981, 100987, 100999, 101009, 101021, 101027, 101051, 101063, 101081, 101089, -101107, 101111, 101113, 101117, 101119, 101141, 101149, 101159, 101161, 101173, -101183, 101197, 101203, 101207, 101209, 101221, 101267, 101273, 101279, 101281, -101287, 101293, 101323, 101333, 101341, 101347, 101359, 101363, 101377, 101383, -101399, 101411, 101419, 101429, 101449, 101467, 101477, 101483, 101489, 101501, -101503, 101513, 101527, 101531, 101533, 101537, 101561, 101573, 101581, 101599, -101603, 101611, 101627, 101641, 101653, 101663, 101681, 101693, 101701, 101719, -101723, 101737, 101741, 101747, 101749, 101771, 101789, 101797, 101807, 101833, -101837, 101839, 101863, 101869, 101873, 101879, 101891, 101917, 101921, 101929, -101939, 101957, 101963, 101977, 101987, 101999, 102001, 102013, 102019, 102023, -102031, 102043, 102059, 102061, 102071, 102077, 102079, 102101, 102103, 102107, -102121, 102139, 102149, 102161, 102181, 102191, 102197, 102199, 102203, 102217, -102229, 102233, 102241, 102251, 102253, 102259, 102293, 102299, 102301, 102317, -102329, 102337, 102359, 102367, 102397, 102407, 102409, 102433, 102437, 102451, -102461, 102481, 102497, 102499, 102503, 102523, 102533, 102539, 102547, 102551, -102559, 102563, 102587, 102593, 102607, 102611, 102643, 102647, 102653, 102667, -102673, 102677, 102679, 102701, 102761, 102763, 102769, 102793, 102797, 102811, -102829, 102841, 102859, 102871, 102877, 102881, 102911, 102913, 102929, 102931, -102953, 102967, 102983, 103001, 103007, 103043, 103049, 103067, 103069, 103079, -103087, 103091, 103093, 103099, 103123, 103141, 103171, 103177, 103183, 103217, -103231, 103237, 103289, 103291, 103307, 103319, 103333, 103349, 103357, 103387, -103391, 103393, 103399, 103409, 103421, 103423, 103451, 103457, 103471, 103483, -103511, 103529, 103549, 103553, 103561, 103567, 103573, 103577, 103583, 103591, -103613, 103619, 103643, 103651, 103657, 103669, 103681, 103687, 103699, 103703, -103723, 103769, 103787, 103801, 103811, 103813, 103837, 103841, 103843, 103867, -103889, 103903, 103913, 103919, 103951, 103963, 103967, 103969, 103979, 103981, -103991, 103993, 103997, 104003, 104009, 104021, 104033, 104047, 104053, 104059, -104087, 104089, 104107, 104113, 104119, 104123, 104147, 104149, 104161, 104173, -104179, 104183, 104207, 104231, 104233, 104239, 104243, 104281, 104287, 104297, -104309, 104311, 104323, 104327, 104347, 104369, 104381, 104383, 104393, 104399, -104417, 104459, 104471, 104473, 104479, 104491, 104513, 104527, 104537, 104543, -104549, 104551, 104561, 104579, 104593, 104597, 104623, 104639, 104651, 104659, +2, 3, 5, 7, 11, 13, 17, 19, 23, 29, +31, 37, 41, 43, 47, 53, 59, 61, 67, 71, +73, 79, 83, 89, 97, 101, 103, 107, 109, 113, +127, 131, 137, 139, 149, 151, 157, 163, 167, 173, +179, 181, 191, 193, 197, 199, 211, 223, 227, 229, +233, 239, 241, 251, 257, 263, 269, 271, 277, 281, +283, 293, 307, 311, 313, 317, 331, 337, 347, 349, +353, 359, 367, 373, 379, 383, 389, 397, 401, 409, +419, 421, 431, 433, 439, 443, 449, 457, 461, 463, +467, 479, 487, 491, 499, 503, 509, 521, 523, 541, +547, 557, 563, 569, 571, 577, 587, 593, 599, 601, +607, 613, 617, 619, 631, 641, 643, 647, 653, 659, +661, 673, 677, 683, 691, 701, 709, 719, 727, 733, +739, 743, 751, 757, 761, 769, 773, 787, 797, 809, +811, 821, 823, 827, 829, 839, 853, 857, 859, 863, +877, 881, 883, 887, 907, 911, 919, 929, 937, 941, +947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, +1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, +1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, +1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, +1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, +1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, +1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, +1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, +1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, +1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, +1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, +1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, +1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, +1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, +1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, +2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, +2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, +2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, +2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, +2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, +2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, +2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, +2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, +2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, +2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, +2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, +2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, +3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, +3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, +3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, +3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, +3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, +3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, +3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, +3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, +3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, +3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, +3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, +3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, +4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, +4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, +4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, +4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, +4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, +4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, +4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, +4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, +4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, +4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, +4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, +4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, +5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, +5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, +5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, +5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, +5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, +5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, +5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, +5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, +5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, +5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, +5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, +5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, +6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, +6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, +6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, +6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, +6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, +6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, +6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, +6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, +6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, +6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, +6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, +7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, +7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, +7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, +7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, +7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, +7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, +7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, +7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, +7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, +7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, +7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, +8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, +8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, +8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, +8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, +8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, +8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, +8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, +8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, +8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, +8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, +8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, +9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, +9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, +9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, +9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, +9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, +9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, +9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, +9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, +9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, +9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, +9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, +10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, +10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, +10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, +10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, +10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, +10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, +10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, +10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, +10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, +10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, +10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, +11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, +11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, +11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, +11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, +11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, +11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, +11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, +11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, +11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, +11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, +12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, +12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, +12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, +12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, +12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, +12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, +12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, +12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, +12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, +12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, +12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, +13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, +13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, +13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, +13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, +13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, +13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, +13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, +13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, +13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, +13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, +13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, +14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, +14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, +14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, +14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, +14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, +14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, +14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, +14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, +14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, +14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, +15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, +15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, +15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, +15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, +15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, +15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, +15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, +15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, +15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, +15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, +15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, +16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, +16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, +16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, +16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, +16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, +16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, +16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, +16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, +16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, +17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, +17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, +17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, +17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, +17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, +17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, +17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, +17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, +17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, +17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, +17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, +18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, +18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, +18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, +18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, +18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, +18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, +18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, +18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, +18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, +19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, +19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, +19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, +19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, +19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, +19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, +19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, +19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, +19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, +19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, +19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, +20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, +20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, +20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, +20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, +20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, +20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, +20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, +20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, +20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, +21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, +21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, +21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, +21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, +21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, +21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, +21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, +21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, +21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, +21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, +21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, +22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, +22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, +22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, +22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, +22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, +22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, +22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, +22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, +22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, +22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, +23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, +23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, +23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, +23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, +23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, +23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, +23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, +23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, +23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, +23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, +24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, +24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, +24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, +24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, +24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, +24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, +24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, +24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, +24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, +24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, +25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, +25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, +25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, +25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, +25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, +25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, +25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, +25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, +25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, +26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, +26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, +26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, +26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, +26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, +26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, +26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, +26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, +26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, +26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, +26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, +27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, +27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, +27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, +27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, +27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, +27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, +27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, +27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, +27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, +28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, +28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, +28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, +28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, +28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, +28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, +28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, +28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, +28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, +28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, +29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, +29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, +29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, +29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, +29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, +29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, +29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, +29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, +29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, +30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, +30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, +30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, +30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, +30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, +30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, +30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, +30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, +30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, +31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, +31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, +31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, +31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, +31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, +31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, +31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, +31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, +31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, +31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, +32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, +32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, +32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, +32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, +32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, +32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, +32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, +32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, +32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, +32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, +33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, +33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, +33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, +33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, +33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, +33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, +33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, +33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, +33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, +33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, +34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, +34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, +34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, +34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, +34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, +34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, +34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, +34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, +34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, +34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, +35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, +35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, +35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, +35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, +35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, +35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, +35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, +35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, +35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, +36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, +36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, +36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, +36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, +36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, +36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, +36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, +36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, +36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, +36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, +37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, +37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, +37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, +37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, +37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, +37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, +37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, +37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, +37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, +38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, +38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, +38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, +38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, +38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, +38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, +38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, +38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, +38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, +39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, +39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, +39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, +39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, +39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, +39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, +39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, +39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, +39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, +39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, +40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, +40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, +40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, +40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, +40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, +40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, +40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, +40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, +40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, +41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, +41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, +41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, +41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, +41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, +41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, +41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, +41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, +41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, +41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, +42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, +42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, +42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, +42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, +42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, +42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, +42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, +42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, +42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, +42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, +43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, +43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, +43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, +43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, +43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, +43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, +43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, +43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, +44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, +44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, +44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, +44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, +44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, +44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, +44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, +44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, +44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, +44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, +45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, +45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, +45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, +45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, +45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, +45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, +45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, +45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, +45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, +46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, +46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, +46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, +46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, +46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, +46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, +46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, +46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, +46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, +47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, +47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, +47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, +47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, +47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, +47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, +47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, +47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, +47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, +48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, +48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, +48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, +48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, +48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, +48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, +48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, +48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, +48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, +49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, +49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, +49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, +49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, +49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, +49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, +49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, +49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, +49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, +49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051, 50053, 50069, +50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131, 50147, +50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273, +50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, +50383, 50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, +50513, 50527, 50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, +50599, 50627, 50647, 50651, 50671, 50683, 50707, 50723, 50741, 50753, +50767, 50773, 50777, 50789, 50821, 50833, 50839, 50849, 50857, 50867, +50873, 50891, 50893, 50909, 50923, 50929, 50951, 50957, 50969, 50971, +50989, 50993, 51001, 51031, 51043, 51047, 51059, 51061, 51071, 51109, +51131, 51133, 51137, 51151, 51157, 51169, 51193, 51197, 51199, 51203, +51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287, 51307, 51329, +51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419, 51421, +51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487, +51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, +51599, 51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, +51691, 51713, 51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, +51817, 51827, 51829, 51839, 51853, 51859, 51869, 51871, 51893, 51899, +51907, 51913, 51929, 51941, 51949, 51971, 51973, 51977, 51991, 52009, +52021, 52027, 52051, 52057, 52067, 52069, 52081, 52103, 52121, 52127, +52147, 52153, 52163, 52177, 52181, 52183, 52189, 52201, 52223, 52237, +52249, 52253, 52259, 52267, 52289, 52291, 52301, 52313, 52321, 52361, +52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457, 52489, 52501, +52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571, 52579, +52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709, +52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, +52817, 52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, +52937, 52951, 52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, +53047, 53051, 53069, 53077, 53087, 53089, 53093, 53101, 53113, 53117, +53129, 53147, 53149, 53161, 53171, 53173, 53189, 53197, 53201, 53231, +53233, 53239, 53267, 53269, 53279, 53281, 53299, 53309, 53323, 53327, +53353, 53359, 53377, 53381, 53401, 53407, 53411, 53419, 53437, 53441, +53453, 53479, 53503, 53507, 53527, 53549, 53551, 53569, 53591, 53593, +53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639, 53653, 53657, +53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777, 53783, +53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891, +53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, +54001, 54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, +54133, 54139, 54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, +54277, 54287, 54293, 54311, 54319, 54323, 54331, 54347, 54361, 54367, +54371, 54377, 54401, 54403, 54409, 54413, 54419, 54421, 54437, 54443, +54449, 54469, 54493, 54497, 54499, 54503, 54517, 54521, 54539, 54541, +54547, 54559, 54563, 54577, 54581, 54583, 54601, 54617, 54623, 54629, +54631, 54647, 54667, 54673, 54679, 54709, 54713, 54721, 54727, 54751, +54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851, 54869, 54877, +54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979, 54983, +55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103, +55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, +55219, 55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, +55339, 55343, 55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, +55469, 55487, 55501, 55511, 55529, 55541, 55547, 55579, 55589, 55603, +55609, 55619, 55621, 55631, 55633, 55639, 55661, 55663, 55667, 55673, +55681, 55691, 55697, 55711, 55717, 55721, 55733, 55763, 55787, 55793, +55799, 55807, 55813, 55817, 55819, 55823, 55829, 55837, 55843, 55849, +55871, 55889, 55897, 55901, 55903, 55921, 55927, 55931, 55933, 55949, +55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053, 56081, 56087, +56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171, 56179, +56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299, +56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, +56437, 56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, +56509, 56519, 56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, +56611, 56629, 56633, 56659, 56663, 56671, 56681, 56687, 56701, 56711, +56713, 56731, 56737, 56747, 56767, 56773, 56779, 56783, 56807, 56809, +56813, 56821, 56827, 56843, 56857, 56873, 56891, 56893, 56897, 56909, +56911, 56921, 56923, 56929, 56941, 56951, 56957, 56963, 56983, 56989, +56993, 56999, 57037, 57041, 57047, 57059, 57073, 57077, 57089, 57097, +57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173, 57179, 57191, +57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271, 57283, +57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389, +57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, +57557, 57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, +57667, 57679, 57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, +57751, 57773, 57781, 57787, 57791, 57793, 57803, 57809, 57829, 57839, +57847, 57853, 57859, 57881, 57899, 57901, 57917, 57923, 57943, 57947, +57973, 57977, 57991, 58013, 58027, 58031, 58043, 58049, 58057, 58061, +58067, 58073, 58099, 58109, 58111, 58129, 58147, 58151, 58153, 58169, +58171, 58189, 58193, 58199, 58207, 58211, 58217, 58229, 58231, 58237, +58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367, 58369, 58379, +58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451, 58453, +58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601, +58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, +58727, 58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, +58897, 58901, 58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, +58979, 58991, 58997, 59009, 59011, 59021, 59023, 59029, 59051, 59053, +59063, 59069, 59077, 59083, 59093, 59107, 59113, 59119, 59123, 59141, +59149, 59159, 59167, 59183, 59197, 59207, 59209, 59219, 59221, 59233, +59239, 59243, 59263, 59273, 59281, 59333, 59341, 59351, 59357, 59359, +59369, 59377, 59387, 59393, 59399, 59407, 59417, 59419, 59441, 59443, +59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513, 59539, 59557, +59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651, 59659, +59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747, +59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, +59921, 59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, +60037, 60041, 60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, +60133, 60139, 60149, 60161, 60167, 60169, 60209, 60217, 60223, 60251, +60257, 60259, 60271, 60289, 60293, 60317, 60331, 60337, 60343, 60353, +60373, 60383, 60397, 60413, 60427, 60443, 60449, 60457, 60493, 60497, +60509, 60521, 60527, 60539, 60589, 60601, 60607, 60611, 60617, 60623, +60631, 60637, 60647, 60649, 60659, 60661, 60679, 60689, 60703, 60719, +60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779, 60793, 60811, +60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917, 60919, +60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043, +61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, +61211, 61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, +61339, 61343, 61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, +61463, 61469, 61471, 61483, 61487, 61493, 61507, 61511, 61519, 61543, +61547, 61553, 61559, 61561, 61583, 61603, 61609, 61613, 61627, 61631, +61637, 61643, 61651, 61657, 61667, 61673, 61681, 61687, 61703, 61717, +61723, 61729, 61751, 61757, 61781, 61813, 61819, 61837, 61843, 61861, +61871, 61879, 61909, 61927, 61933, 61949, 61961, 61967, 61979, 61981, +61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053, 62057, 62071, +62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171, 62189, +62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303, +62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, +62467, 62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, +62563, 62581, 62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, +62659, 62683, 62687, 62701, 62723, 62731, 62743, 62753, 62761, 62773, +62791, 62801, 62819, 62827, 62851, 62861, 62869, 62873, 62897, 62903, +62921, 62927, 62929, 62939, 62969, 62971, 62981, 62983, 62987, 62989, +63029, 63031, 63059, 63067, 63073, 63079, 63097, 63103, 63113, 63127, +63131, 63149, 63179, 63197, 63199, 63211, 63241, 63247, 63277, 63281, +63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353, 63361, 63367, +63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443, 63463, +63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559, +63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, +63649, 63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, +63727, 63737, 63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, +63823, 63839, 63841, 63853, 63857, 63863, 63901, 63907, 63913, 63929, +63949, 63977, 63997, 64007, 64013, 64019, 64033, 64037, 64063, 64067, +64081, 64091, 64109, 64123, 64151, 64153, 64157, 64171, 64187, 64189, +64217, 64223, 64231, 64237, 64271, 64279, 64283, 64301, 64303, 64319, +64327, 64333, 64373, 64381, 64399, 64403, 64433, 64439, 64451, 64453, +64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579, 64591, 64601, +64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679, 64693, +64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849, +64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, +64951, 64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, +65071, 65089, 65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, +65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, +65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, +65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, +65519, 65521, 65537, 65539, 65543, 65551, 65557, 65563, 65579, 65581, +65587, 65599, 65609, 65617, 65629, 65633, 65647, 65651, 65657, 65677, +65687, 65699, 65701, 65707, 65713, 65717, 65719, 65729, 65731, 65761, +65777, 65789, 65809, 65827, 65831, 65837, 65839, 65843, 65851, 65867, +65881, 65899, 65921, 65927, 65929, 65951, 65957, 65963, 65981, 65983, +65993, 66029, 66037, 66041, 66047, 66067, 66071, 66083, 66089, 66103, +66107, 66109, 66137, 66161, 66169, 66173, 66179, 66191, 66221, 66239, +66271, 66293, 66301, 66337, 66343, 66347, 66359, 66361, 66373, 66377, +66383, 66403, 66413, 66431, 66449, 66457, 66463, 66467, 66491, 66499, +66509, 66523, 66529, 66533, 66541, 66553, 66569, 66571, 66587, 66593, +66601, 66617, 66629, 66643, 66653, 66683, 66697, 66701, 66713, 66721, +66733, 66739, 66749, 66751, 66763, 66791, 66797, 66809, 66821, 66841, +66851, 66853, 66863, 66877, 66883, 66889, 66919, 66923, 66931, 66943, +66947, 66949, 66959, 66973, 66977, 67003, 67021, 67033, 67043, 67049, +67057, 67061, 67073, 67079, 67103, 67121, 67129, 67139, 67141, 67153, +67157, 67169, 67181, 67187, 67189, 67211, 67213, 67217, 67219, 67231, +67247, 67261, 67271, 67273, 67289, 67307, 67339, 67343, 67349, 67369, +67391, 67399, 67409, 67411, 67421, 67427, 67429, 67433, 67447, 67453, +67477, 67481, 67489, 67493, 67499, 67511, 67523, 67531, 67537, 67547, +67559, 67567, 67577, 67579, 67589, 67601, 67607, 67619, 67631, 67651, +67679, 67699, 67709, 67723, 67733, 67741, 67751, 67757, 67759, 67763, +67777, 67783, 67789, 67801, 67807, 67819, 67829, 67843, 67853, 67867, +67883, 67891, 67901, 67927, 67931, 67933, 67939, 67943, 67957, 67961, +67967, 67979, 67987, 67993, 68023, 68041, 68053, 68059, 68071, 68087, +68099, 68111, 68113, 68141, 68147, 68161, 68171, 68207, 68209, 68213, +68219, 68227, 68239, 68261, 68279, 68281, 68311, 68329, 68351, 68371, +68389, 68399, 68437, 68443, 68447, 68449, 68473, 68477, 68483, 68489, +68491, 68501, 68507, 68521, 68531, 68539, 68543, 68567, 68581, 68597, +68611, 68633, 68639, 68659, 68669, 68683, 68687, 68699, 68711, 68713, +68729, 68737, 68743, 68749, 68767, 68771, 68777, 68791, 68813, 68819, +68821, 68863, 68879, 68881, 68891, 68897, 68899, 68903, 68909, 68917, +68927, 68947, 68963, 68993, 69001, 69011, 69019, 69029, 69031, 69061, +69067, 69073, 69109, 69119, 69127, 69143, 69149, 69151, 69163, 69191, +69193, 69197, 69203, 69221, 69233, 69239, 69247, 69257, 69259, 69263, +69313, 69317, 69337, 69341, 69371, 69379, 69383, 69389, 69401, 69403, +69427, 69431, 69439, 69457, 69463, 69467, 69473, 69481, 69491, 69493, +69497, 69499, 69539, 69557, 69593, 69623, 69653, 69661, 69677, 69691, +69697, 69709, 69737, 69739, 69761, 69763, 69767, 69779, 69809, 69821, +69827, 69829, 69833, 69847, 69857, 69859, 69877, 69899, 69911, 69929, +69931, 69941, 69959, 69991, 69997, 70001, 70003, 70009, 70019, 70039, +70051, 70061, 70067, 70079, 70099, 70111, 70117, 70121, 70123, 70139, +70141, 70157, 70163, 70177, 70181, 70183, 70199, 70201, 70207, 70223, +70229, 70237, 70241, 70249, 70271, 70289, 70297, 70309, 70313, 70321, +70327, 70351, 70373, 70379, 70381, 70393, 70423, 70429, 70439, 70451, +70457, 70459, 70481, 70487, 70489, 70501, 70507, 70529, 70537, 70549, +70571, 70573, 70583, 70589, 70607, 70619, 70621, 70627, 70639, 70657, +70663, 70667, 70687, 70709, 70717, 70729, 70753, 70769, 70783, 70793, +70823, 70841, 70843, 70849, 70853, 70867, 70877, 70879, 70891, 70901, +70913, 70919, 70921, 70937, 70949, 70951, 70957, 70969, 70979, 70981, +70991, 70997, 70999, 71011, 71023, 71039, 71059, 71069, 71081, 71089, +71119, 71129, 71143, 71147, 71153, 71161, 71167, 71171, 71191, 71209, +71233, 71237, 71249, 71257, 71261, 71263, 71287, 71293, 71317, 71327, +71329, 71333, 71339, 71341, 71347, 71353, 71359, 71363, 71387, 71389, +71399, 71411, 71413, 71419, 71429, 71437, 71443, 71453, 71471, 71473, +71479, 71483, 71503, 71527, 71537, 71549, 71551, 71563, 71569, 71593, +71597, 71633, 71647, 71663, 71671, 71693, 71699, 71707, 71711, 71713, +71719, 71741, 71761, 71777, 71789, 71807, 71809, 71821, 71837, 71843, +71849, 71861, 71867, 71879, 71881, 71887, 71899, 71909, 71917, 71933, +71941, 71947, 71963, 71971, 71983, 71987, 71993, 71999, 72019, 72031, +72043, 72047, 72053, 72073, 72077, 72089, 72091, 72101, 72103, 72109, +72139, 72161, 72167, 72169, 72173, 72211, 72221, 72223, 72227, 72229, +72251, 72253, 72269, 72271, 72277, 72287, 72307, 72313, 72337, 72341, +72353, 72367, 72379, 72383, 72421, 72431, 72461, 72467, 72469, 72481, +72493, 72497, 72503, 72533, 72547, 72551, 72559, 72577, 72613, 72617, +72623, 72643, 72647, 72649, 72661, 72671, 72673, 72679, 72689, 72701, +72707, 72719, 72727, 72733, 72739, 72763, 72767, 72797, 72817, 72823, +72859, 72869, 72871, 72883, 72889, 72893, 72901, 72907, 72911, 72923, +72931, 72937, 72949, 72953, 72959, 72973, 72977, 72997, 73009, 73013, +73019, 73037, 73039, 73043, 73061, 73063, 73079, 73091, 73121, 73127, +73133, 73141, 73181, 73189, 73237, 73243, 73259, 73277, 73291, 73303, +73309, 73327, 73331, 73351, 73361, 73363, 73369, 73379, 73387, 73417, +73421, 73433, 73453, 73459, 73471, 73477, 73483, 73517, 73523, 73529, +73547, 73553, 73561, 73571, 73583, 73589, 73597, 73607, 73609, 73613, +73637, 73643, 73651, 73673, 73679, 73681, 73693, 73699, 73709, 73721, +73727, 73751, 73757, 73771, 73783, 73819, 73823, 73847, 73849, 73859, +73867, 73877, 73883, 73897, 73907, 73939, 73943, 73951, 73961, 73973, +73999, 74017, 74021, 74027, 74047, 74051, 74071, 74077, 74093, 74099, +74101, 74131, 74143, 74149, 74159, 74161, 74167, 74177, 74189, 74197, +74201, 74203, 74209, 74219, 74231, 74257, 74279, 74287, 74293, 74297, +74311, 74317, 74323, 74353, 74357, 74363, 74377, 74381, 74383, 74411, +74413, 74419, 74441, 74449, 74453, 74471, 74489, 74507, 74509, 74521, +74527, 74531, 74551, 74561, 74567, 74573, 74587, 74597, 74609, 74611, +74623, 74653, 74687, 74699, 74707, 74713, 74717, 74719, 74729, 74731, +74747, 74759, 74761, 74771, 74779, 74797, 74821, 74827, 74831, 74843, +74857, 74861, 74869, 74873, 74887, 74891, 74897, 74903, 74923, 74929, +74933, 74941, 74959, 75011, 75013, 75017, 75029, 75037, 75041, 75079, +75083, 75109, 75133, 75149, 75161, 75167, 75169, 75181, 75193, 75209, +75211, 75217, 75223, 75227, 75239, 75253, 75269, 75277, 75289, 75307, +75323, 75329, 75337, 75347, 75353, 75367, 75377, 75389, 75391, 75401, +75403, 75407, 75431, 75437, 75479, 75503, 75511, 75521, 75527, 75533, +75539, 75541, 75553, 75557, 75571, 75577, 75583, 75611, 75617, 75619, +75629, 75641, 75653, 75659, 75679, 75683, 75689, 75703, 75707, 75709, +75721, 75731, 75743, 75767, 75773, 75781, 75787, 75793, 75797, 75821, +75833, 75853, 75869, 75883, 75913, 75931, 75937, 75941, 75967, 75979, +75983, 75989, 75991, 75997, 76001, 76003, 76031, 76039, 76079, 76081, +76091, 76099, 76103, 76123, 76129, 76147, 76157, 76159, 76163, 76207, +76213, 76231, 76243, 76249, 76253, 76259, 76261, 76283, 76289, 76303, +76333, 76343, 76367, 76369, 76379, 76387, 76403, 76421, 76423, 76441, +76463, 76471, 76481, 76487, 76493, 76507, 76511, 76519, 76537, 76541, +76543, 76561, 76579, 76597, 76603, 76607, 76631, 76649, 76651, 76667, +76673, 76679, 76697, 76717, 76733, 76753, 76757, 76771, 76777, 76781, +76801, 76819, 76829, 76831, 76837, 76847, 76871, 76873, 76883, 76907, +76913, 76919, 76943, 76949, 76961, 76963, 76991, 77003, 77017, 77023, +77029, 77041, 77047, 77069, 77081, 77093, 77101, 77137, 77141, 77153, +77167, 77171, 77191, 77201, 77213, 77237, 77239, 77243, 77249, 77261, +77263, 77267, 77269, 77279, 77291, 77317, 77323, 77339, 77347, 77351, +77359, 77369, 77377, 77383, 77417, 77419, 77431, 77447, 77471, 77477, +77479, 77489, 77491, 77509, 77513, 77521, 77527, 77543, 77549, 77551, +77557, 77563, 77569, 77573, 77587, 77591, 77611, 77617, 77621, 77641, +77647, 77659, 77681, 77687, 77689, 77699, 77711, 77713, 77719, 77723, +77731, 77743, 77747, 77761, 77773, 77783, 77797, 77801, 77813, 77839, +77849, 77863, 77867, 77893, 77899, 77929, 77933, 77951, 77969, 77977, +77983, 77999, 78007, 78017, 78031, 78041, 78049, 78059, 78079, 78101, +78121, 78137, 78139, 78157, 78163, 78167, 78173, 78179, 78191, 78193, +78203, 78229, 78233, 78241, 78259, 78277, 78283, 78301, 78307, 78311, +78317, 78341, 78347, 78367, 78401, 78427, 78437, 78439, 78467, 78479, +78487, 78497, 78509, 78511, 78517, 78539, 78541, 78553, 78569, 78571, +78577, 78583, 78593, 78607, 78623, 78643, 78649, 78653, 78691, 78697, +78707, 78713, 78721, 78737, 78779, 78781, 78787, 78791, 78797, 78803, +78809, 78823, 78839, 78853, 78857, 78877, 78887, 78889, 78893, 78901, +78919, 78929, 78941, 78977, 78979, 78989, 79031, 79039, 79043, 79063, +79087, 79103, 79111, 79133, 79139, 79147, 79151, 79153, 79159, 79181, +79187, 79193, 79201, 79229, 79231, 79241, 79259, 79273, 79279, 79283, +79301, 79309, 79319, 79333, 79337, 79349, 79357, 79367, 79379, 79393, +79397, 79399, 79411, 79423, 79427, 79433, 79451, 79481, 79493, 79531, +79537, 79549, 79559, 79561, 79579, 79589, 79601, 79609, 79613, 79621, +79627, 79631, 79633, 79657, 79669, 79687, 79691, 79693, 79697, 79699, +79757, 79769, 79777, 79801, 79811, 79813, 79817, 79823, 79829, 79841, +79843, 79847, 79861, 79867, 79873, 79889, 79901, 79903, 79907, 79939, +79943, 79967, 79973, 79979, 79987, 79997, 79999, 80021, 80039, 80051, +80071, 80077, 80107, 80111, 80141, 80147, 80149, 80153, 80167, 80173, +80177, 80191, 80207, 80209, 80221, 80231, 80233, 80239, 80251, 80263, +80273, 80279, 80287, 80309, 80317, 80329, 80341, 80347, 80363, 80369, +80387, 80407, 80429, 80447, 80449, 80471, 80473, 80489, 80491, 80513, +80527, 80537, 80557, 80567, 80599, 80603, 80611, 80621, 80627, 80629, +80651, 80657, 80669, 80671, 80677, 80681, 80683, 80687, 80701, 80713, +80737, 80747, 80749, 80761, 80777, 80779, 80783, 80789, 80803, 80809, +80819, 80831, 80833, 80849, 80863, 80897, 80909, 80911, 80917, 80923, +80929, 80933, 80953, 80963, 80989, 81001, 81013, 81017, 81019, 81023, +81031, 81041, 81043, 81047, 81049, 81071, 81077, 81083, 81097, 81101, +81119, 81131, 81157, 81163, 81173, 81181, 81197, 81199, 81203, 81223, +81233, 81239, 81281, 81283, 81293, 81299, 81307, 81331, 81343, 81349, +81353, 81359, 81371, 81373, 81401, 81409, 81421, 81439, 81457, 81463, +81509, 81517, 81527, 81533, 81547, 81551, 81553, 81559, 81563, 81569, +81611, 81619, 81629, 81637, 81647, 81649, 81667, 81671, 81677, 81689, +81701, 81703, 81707, 81727, 81737, 81749, 81761, 81769, 81773, 81799, +81817, 81839, 81847, 81853, 81869, 81883, 81899, 81901, 81919, 81929, +81931, 81937, 81943, 81953, 81967, 81971, 81973, 82003, 82007, 82009, +82013, 82021, 82031, 82037, 82039, 82051, 82067, 82073, 82129, 82139, +82141, 82153, 82163, 82171, 82183, 82189, 82193, 82207, 82217, 82219, +82223, 82231, 82237, 82241, 82261, 82267, 82279, 82301, 82307, 82339, +82349, 82351, 82361, 82373, 82387, 82393, 82421, 82457, 82463, 82469, +82471, 82483, 82487, 82493, 82499, 82507, 82529, 82531, 82549, 82559, +82561, 82567, 82571, 82591, 82601, 82609, 82613, 82619, 82633, 82651, +82657, 82699, 82721, 82723, 82727, 82729, 82757, 82759, 82763, 82781, +82787, 82793, 82799, 82811, 82813, 82837, 82847, 82883, 82889, 82891, +82903, 82913, 82939, 82963, 82981, 82997, 83003, 83009, 83023, 83047, +83059, 83063, 83071, 83077, 83089, 83093, 83101, 83117, 83137, 83177, +83203, 83207, 83219, 83221, 83227, 83231, 83233, 83243, 83257, 83267, +83269, 83273, 83299, 83311, 83339, 83341, 83357, 83383, 83389, 83399, +83401, 83407, 83417, 83423, 83431, 83437, 83443, 83449, 83459, 83471, +83477, 83497, 83537, 83557, 83561, 83563, 83579, 83591, 83597, 83609, +83617, 83621, 83639, 83641, 83653, 83663, 83689, 83701, 83717, 83719, +83737, 83761, 83773, 83777, 83791, 83813, 83833, 83843, 83857, 83869, +83873, 83891, 83903, 83911, 83921, 83933, 83939, 83969, 83983, 83987, +84011, 84017, 84047, 84053, 84059, 84061, 84067, 84089, 84121, 84127, +84131, 84137, 84143, 84163, 84179, 84181, 84191, 84199, 84211, 84221, +84223, 84229, 84239, 84247, 84263, 84299, 84307, 84313, 84317, 84319, +84347, 84349, 84377, 84389, 84391, 84401, 84407, 84421, 84431, 84437, +84443, 84449, 84457, 84463, 84467, 84481, 84499, 84503, 84509, 84521, +84523, 84533, 84551, 84559, 84589, 84629, 84631, 84649, 84653, 84659, +84673, 84691, 84697, 84701, 84713, 84719, 84731, 84737, 84751, 84761, +84787, 84793, 84809, 84811, 84827, 84857, 84859, 84869, 84871, 84913, +84919, 84947, 84961, 84967, 84977, 84979, 84991, 85009, 85021, 85027, +85037, 85049, 85061, 85081, 85087, 85091, 85093, 85103, 85109, 85121, +85133, 85147, 85159, 85193, 85199, 85201, 85213, 85223, 85229, 85237, +85243, 85247, 85259, 85297, 85303, 85313, 85331, 85333, 85361, 85363, +85369, 85381, 85411, 85427, 85429, 85439, 85447, 85451, 85453, 85469, +85487, 85513, 85517, 85523, 85531, 85549, 85571, 85577, 85597, 85601, +85607, 85619, 85621, 85627, 85639, 85643, 85661, 85667, 85669, 85691, +85703, 85711, 85717, 85733, 85751, 85781, 85793, 85817, 85819, 85829, +85831, 85837, 85843, 85847, 85853, 85889, 85903, 85909, 85931, 85933, +85991, 85999, 86011, 86017, 86027, 86029, 86069, 86077, 86083, 86111, +86113, 86117, 86131, 86137, 86143, 86161, 86171, 86179, 86183, 86197, +86201, 86209, 86239, 86243, 86249, 86257, 86263, 86269, 86287, 86291, +86293, 86297, 86311, 86323, 86341, 86351, 86353, 86357, 86369, 86371, +86381, 86389, 86399, 86413, 86423, 86441, 86453, 86461, 86467, 86477, +86491, 86501, 86509, 86531, 86533, 86539, 86561, 86573, 86579, 86587, +86599, 86627, 86629, 86677, 86689, 86693, 86711, 86719, 86729, 86743, +86753, 86767, 86771, 86783, 86813, 86837, 86843, 86851, 86857, 86861, +86869, 86923, 86927, 86929, 86939, 86951, 86959, 86969, 86981, 86993, +87011, 87013, 87037, 87041, 87049, 87071, 87083, 87103, 87107, 87119, +87121, 87133, 87149, 87151, 87179, 87181, 87187, 87211, 87221, 87223, +87251, 87253, 87257, 87277, 87281, 87293, 87299, 87313, 87317, 87323, +87337, 87359, 87383, 87403, 87407, 87421, 87427, 87433, 87443, 87473, +87481, 87491, 87509, 87511, 87517, 87523, 87539, 87541, 87547, 87553, +87557, 87559, 87583, 87587, 87589, 87613, 87623, 87629, 87631, 87641, +87643, 87649, 87671, 87679, 87683, 87691, 87697, 87701, 87719, 87721, +87739, 87743, 87751, 87767, 87793, 87797, 87803, 87811, 87833, 87853, +87869, 87877, 87881, 87887, 87911, 87917, 87931, 87943, 87959, 87961, +87973, 87977, 87991, 88001, 88003, 88007, 88019, 88037, 88069, 88079, +88093, 88117, 88129, 88169, 88177, 88211, 88223, 88237, 88241, 88259, +88261, 88289, 88301, 88321, 88327, 88337, 88339, 88379, 88397, 88411, +88423, 88427, 88463, 88469, 88471, 88493, 88499, 88513, 88523, 88547, +88589, 88591, 88607, 88609, 88643, 88651, 88657, 88661, 88663, 88667, +88681, 88721, 88729, 88741, 88747, 88771, 88789, 88793, 88799, 88801, +88807, 88811, 88813, 88817, 88819, 88843, 88853, 88861, 88867, 88873, +88883, 88897, 88903, 88919, 88937, 88951, 88969, 88993, 88997, 89003, +89009, 89017, 89021, 89041, 89051, 89057, 89069, 89071, 89083, 89087, +89101, 89107, 89113, 89119, 89123, 89137, 89153, 89189, 89203, 89209, +89213, 89227, 89231, 89237, 89261, 89269, 89273, 89293, 89303, 89317, +89329, 89363, 89371, 89381, 89387, 89393, 89399, 89413, 89417, 89431, +89443, 89449, 89459, 89477, 89491, 89501, 89513, 89519, 89521, 89527, +89533, 89561, 89563, 89567, 89591, 89597, 89599, 89603, 89611, 89627, +89633, 89653, 89657, 89659, 89669, 89671, 89681, 89689, 89753, 89759, +89767, 89779, 89783, 89797, 89809, 89819, 89821, 89833, 89839, 89849, +89867, 89891, 89897, 89899, 89909, 89917, 89923, 89939, 89959, 89963, +89977, 89983, 89989, 90001, 90007, 90011, 90017, 90019, 90023, 90031, +90053, 90059, 90067, 90071, 90073, 90089, 90107, 90121, 90127, 90149, +90163, 90173, 90187, 90191, 90197, 90199, 90203, 90217, 90227, 90239, +90247, 90263, 90271, 90281, 90289, 90313, 90353, 90359, 90371, 90373, +90379, 90397, 90401, 90403, 90407, 90437, 90439, 90469, 90473, 90481, +90499, 90511, 90523, 90527, 90529, 90533, 90547, 90583, 90599, 90617, +90619, 90631, 90641, 90647, 90659, 90677, 90679, 90697, 90703, 90709, +90731, 90749, 90787, 90793, 90803, 90821, 90823, 90833, 90841, 90847, +90863, 90887, 90901, 90907, 90911, 90917, 90931, 90947, 90971, 90977, +90989, 90997, 91009, 91019, 91033, 91079, 91081, 91097, 91099, 91121, +91127, 91129, 91139, 91141, 91151, 91153, 91159, 91163, 91183, 91193, +91199, 91229, 91237, 91243, 91249, 91253, 91283, 91291, 91297, 91303, +91309, 91331, 91367, 91369, 91373, 91381, 91387, 91393, 91397, 91411, +91423, 91433, 91453, 91457, 91459, 91463, 91493, 91499, 91513, 91529, +91541, 91571, 91573, 91577, 91583, 91591, 91621, 91631, 91639, 91673, +91691, 91703, 91711, 91733, 91753, 91757, 91771, 91781, 91801, 91807, +91811, 91813, 91823, 91837, 91841, 91867, 91873, 91909, 91921, 91939, +91943, 91951, 91957, 91961, 91967, 91969, 91997, 92003, 92009, 92033, +92041, 92051, 92077, 92083, 92107, 92111, 92119, 92143, 92153, 92173, +92177, 92179, 92189, 92203, 92219, 92221, 92227, 92233, 92237, 92243, +92251, 92269, 92297, 92311, 92317, 92333, 92347, 92353, 92357, 92363, +92369, 92377, 92381, 92383, 92387, 92399, 92401, 92413, 92419, 92431, +92459, 92461, 92467, 92479, 92489, 92503, 92507, 92551, 92557, 92567, +92569, 92581, 92593, 92623, 92627, 92639, 92641, 92647, 92657, 92669, +92671, 92681, 92683, 92693, 92699, 92707, 92717, 92723, 92737, 92753, +92761, 92767, 92779, 92789, 92791, 92801, 92809, 92821, 92831, 92849, +92857, 92861, 92863, 92867, 92893, 92899, 92921, 92927, 92941, 92951, +92957, 92959, 92987, 92993, 93001, 93047, 93053, 93059, 93077, 93083, +93089, 93097, 93103, 93113, 93131, 93133, 93139, 93151, 93169, 93179, +93187, 93199, 93229, 93239, 93241, 93251, 93253, 93257, 93263, 93281, +93283, 93287, 93307, 93319, 93323, 93329, 93337, 93371, 93377, 93383, +93407, 93419, 93427, 93463, 93479, 93481, 93487, 93491, 93493, 93497, +93503, 93523, 93529, 93553, 93557, 93559, 93563, 93581, 93601, 93607, +93629, 93637, 93683, 93701, 93703, 93719, 93739, 93761, 93763, 93787, +93809, 93811, 93827, 93851, 93871, 93887, 93889, 93893, 93901, 93911, +93913, 93923, 93937, 93941, 93949, 93967, 93971, 93979, 93983, 93997, +94007, 94009, 94033, 94049, 94057, 94063, 94079, 94099, 94109, 94111, +94117, 94121, 94151, 94153, 94169, 94201, 94207, 94219, 94229, 94253, +94261, 94273, 94291, 94307, 94309, 94321, 94327, 94331, 94343, 94349, +94351, 94379, 94397, 94399, 94421, 94427, 94433, 94439, 94441, 94447, +94463, 94477, 94483, 94513, 94529, 94531, 94541, 94543, 94547, 94559, +94561, 94573, 94583, 94597, 94603, 94613, 94621, 94649, 94651, 94687, +94693, 94709, 94723, 94727, 94747, 94771, 94777, 94781, 94789, 94793, +94811, 94819, 94823, 94837, 94841, 94847, 94849, 94873, 94889, 94903, +94907, 94933, 94949, 94951, 94961, 94993, 94999, 95003, 95009, 95021, +95027, 95063, 95071, 95083, 95087, 95089, 95093, 95101, 95107, 95111, +95131, 95143, 95153, 95177, 95189, 95191, 95203, 95213, 95219, 95231, +95233, 95239, 95257, 95261, 95267, 95273, 95279, 95287, 95311, 95317, +95327, 95339, 95369, 95383, 95393, 95401, 95413, 95419, 95429, 95441, +95443, 95461, 95467, 95471, 95479, 95483, 95507, 95527, 95531, 95539, +95549, 95561, 95569, 95581, 95597, 95603, 95617, 95621, 95629, 95633, +95651, 95701, 95707, 95713, 95717, 95723, 95731, 95737, 95747, 95773, +95783, 95789, 95791, 95801, 95803, 95813, 95819, 95857, 95869, 95873, +95881, 95891, 95911, 95917, 95923, 95929, 95947, 95957, 95959, 95971, +95987, 95989, 96001, 96013, 96017, 96043, 96053, 96059, 96079, 96097, +96137, 96149, 96157, 96167, 96179, 96181, 96199, 96211, 96221, 96223, +96233, 96259, 96263, 96269, 96281, 96289, 96293, 96323, 96329, 96331, +96337, 96353, 96377, 96401, 96419, 96431, 96443, 96451, 96457, 96461, +96469, 96479, 96487, 96493, 96497, 96517, 96527, 96553, 96557, 96581, +96587, 96589, 96601, 96643, 96661, 96667, 96671, 96697, 96703, 96731, +96737, 96739, 96749, 96757, 96763, 96769, 96779, 96787, 96797, 96799, +96821, 96823, 96827, 96847, 96851, 96857, 96893, 96907, 96911, 96931, +96953, 96959, 96973, 96979, 96989, 96997, 97001, 97003, 97007, 97021, +97039, 97073, 97081, 97103, 97117, 97127, 97151, 97157, 97159, 97169, +97171, 97177, 97187, 97213, 97231, 97241, 97259, 97283, 97301, 97303, +97327, 97367, 97369, 97373, 97379, 97381, 97387, 97397, 97423, 97429, +97441, 97453, 97459, 97463, 97499, 97501, 97511, 97523, 97547, 97549, +97553, 97561, 97571, 97577, 97579, 97583, 97607, 97609, 97613, 97649, +97651, 97673, 97687, 97711, 97729, 97771, 97777, 97787, 97789, 97813, +97829, 97841, 97843, 97847, 97849, 97859, 97861, 97871, 97879, 97883, +97919, 97927, 97931, 97943, 97961, 97967, 97973, 97987, 98009, 98011, +98017, 98041, 98047, 98057, 98081, 98101, 98123, 98129, 98143, 98179, +98207, 98213, 98221, 98227, 98251, 98257, 98269, 98297, 98299, 98317, +98321, 98323, 98327, 98347, 98369, 98377, 98387, 98389, 98407, 98411, +98419, 98429, 98443, 98453, 98459, 98467, 98473, 98479, 98491, 98507, +98519, 98533, 98543, 98561, 98563, 98573, 98597, 98621, 98627, 98639, +98641, 98663, 98669, 98689, 98711, 98713, 98717, 98729, 98731, 98737, +98773, 98779, 98801, 98807, 98809, 98837, 98849, 98867, 98869, 98873, +98887, 98893, 98897, 98899, 98909, 98911, 98927, 98929, 98939, 98947, +98953, 98963, 98981, 98993, 98999, 99013, 99017, 99023, 99041, 99053, +99079, 99083, 99089, 99103, 99109, 99119, 99131, 99133, 99137, 99139, +99149, 99173, 99181, 99191, 99223, 99233, 99241, 99251, 99257, 99259, +99277, 99289, 99317, 99347, 99349, 99367, 99371, 99377, 99391, 99397, +99401, 99409, 99431, 99439, 99469, 99487, 99497, 99523, 99527, 99529, +99551, 99559, 99563, 99571, 99577, 99581, 99607, 99611, 99623, 99643, +99661, 99667, 99679, 99689, 99707, 99709, 99713, 99719, 99721, 99733, +99761, 99767, 99787, 99793, 99809, 99817, 99823, 99829, 99833, 99839, +99859, 99871, 99877, 99881, 99901, 99907, 99923, 99929, 99961, 99971, +99989, 99991, 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, +100129, 100151, 100153, 100169, 100183, 100189, 100193, 100207, 100213, 100237, +100267, 100271, 100279, 100291, 100297, 100313, 100333, 100343, 100357, 100361, +100363, 100379, 100391, 100393, 100403, 100411, 100417, 100447, 100459, 100469, +100483, 100493, 100501, 100511, 100517, 100519, 100523, 100537, 100547, 100549, +100559, 100591, 100609, 100613, 100621, 100649, 100669, 100673, 100693, 100699, +100703, 100733, 100741, 100747, 100769, 100787, 100799, 100801, 100811, 100823, +100829, 100847, 100853, 100907, 100913, 100927, 100931, 100937, 100943, 100957, +100981, 100987, 100999, 101009, 101021, 101027, 101051, 101063, 101081, 101089, +101107, 101111, 101113, 101117, 101119, 101141, 101149, 101159, 101161, 101173, +101183, 101197, 101203, 101207, 101209, 101221, 101267, 101273, 101279, 101281, +101287, 101293, 101323, 101333, 101341, 101347, 101359, 101363, 101377, 101383, +101399, 101411, 101419, 101429, 101449, 101467, 101477, 101483, 101489, 101501, +101503, 101513, 101527, 101531, 101533, 101537, 101561, 101573, 101581, 101599, +101603, 101611, 101627, 101641, 101653, 101663, 101681, 101693, 101701, 101719, +101723, 101737, 101741, 101747, 101749, 101771, 101789, 101797, 101807, 101833, +101837, 101839, 101863, 101869, 101873, 101879, 101891, 101917, 101921, 101929, +101939, 101957, 101963, 101977, 101987, 101999, 102001, 102013, 102019, 102023, +102031, 102043, 102059, 102061, 102071, 102077, 102079, 102101, 102103, 102107, +102121, 102139, 102149, 102161, 102181, 102191, 102197, 102199, 102203, 102217, +102229, 102233, 102241, 102251, 102253, 102259, 102293, 102299, 102301, 102317, +102329, 102337, 102359, 102367, 102397, 102407, 102409, 102433, 102437, 102451, +102461, 102481, 102497, 102499, 102503, 102523, 102533, 102539, 102547, 102551, +102559, 102563, 102587, 102593, 102607, 102611, 102643, 102647, 102653, 102667, +102673, 102677, 102679, 102701, 102761, 102763, 102769, 102793, 102797, 102811, +102829, 102841, 102859, 102871, 102877, 102881, 102911, 102913, 102929, 102931, +102953, 102967, 102983, 103001, 103007, 103043, 103049, 103067, 103069, 103079, +103087, 103091, 103093, 103099, 103123, 103141, 103171, 103177, 103183, 103217, +103231, 103237, 103289, 103291, 103307, 103319, 103333, 103349, 103357, 103387, +103391, 103393, 103399, 103409, 103421, 103423, 103451, 103457, 103471, 103483, +103511, 103529, 103549, 103553, 103561, 103567, 103573, 103577, 103583, 103591, +103613, 103619, 103643, 103651, 103657, 103669, 103681, 103687, 103699, 103703, +103723, 103769, 103787, 103801, 103811, 103813, 103837, 103841, 103843, 103867, +103889, 103903, 103913, 103919, 103951, 103963, 103967, 103969, 103979, 103981, +103991, 103993, 103997, 104003, 104009, 104021, 104033, 104047, 104053, 104059, +104087, 104089, 104107, 104113, 104119, 104123, 104147, 104149, 104161, 104173, +104179, 104183, 104207, 104231, 104233, 104239, 104243, 104281, 104287, 104297, +104309, 104311, 104323, 104327, 104347, 104369, 104381, 104383, 104393, 104399, +104417, 104459, 104471, 104473, 104479, 104491, 104513, 104527, 104537, 104543, +104549, 104551, 104561, 104579, 104593, 104597, 104623, 104639, 104651, 104659, 104677, 104681, 104683, 104693, 104701, 104707, 104711, 104717, 104723, 104729}; /* @@ -1376,8 +1376,8 @@ static int fca_register(void) MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_fca_component.fca_enable_cache); - + &mca_coll_fca_component.fca_enable_cache); + mca_coll_fca_component.fca_enable_hash = 0; (void) mca_base_component_var_register(c, "enable_hash", "[1|0|] Enable/Disable hash for fca comms cache", @@ -1393,23 +1393,23 @@ static int fca_register(void) MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_fca_component.fca_parallel_hash_calc); + &mca_coll_fca_component.fca_parallel_hash_calc); - mca_coll_fca_component.fca_hash_size = 5096; + mca_coll_fca_component.fca_hash_size = 5096; (void) mca_base_component_var_register(c, "hash_size", "[integer] Length of hash table", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_fca_component.fca_hash_size); - + &mca_coll_fca_component.fca_hash_size); + mca_coll_fca_component.fca_number_of_primes = 1024; (void) mca_base_component_var_register(c, "number_of_primes", "[integer] Number of primes to use", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_coll_fca_component.fca_number_of_primes); + &mca_coll_fca_component.fca_number_of_primes); mca_coll_fca_component.compiletime_version = FCA_VERNO_STRING; (void) mca_base_component_var_register(c, MCA_COMPILETIME_VER, @@ -1435,8 +1435,8 @@ static int fca_register(void) mca_coll_fca_component.fca_cache_hit = 0; mca_coll_fca_component.fca_cache_miss = 0; mca_coll_fca_component.fca_hash_hit = 0; - mca_coll_fca_component.fca_hash_miss = 0; - mca_coll_fca_component.fca_max_deep_in_cache = 0; + mca_coll_fca_component.fca_hash_miss = 0; + mca_coll_fca_component.fca_max_deep_in_cache = 0; mca_coll_fca_component.fca_primes = mca_coll_fca_primes; @@ -1464,7 +1464,7 @@ static int fca_open(void) for(i = 0; i< mca_coll_fca_component.fca_hash_size; i++) { mca_coll_fca_component.fca_hash[i] = NULL; } - } + } return OMPI_SUCCESS; } @@ -1472,7 +1472,7 @@ static int fca_open(void) static int fca_close(void) { if(mca_coll_fca_component.fca_enable_cache) { - + mca_coll_fca_c_cache_item_t *item; while(NULL != (item = (mca_coll_fca_c_cache_item_t *)opal_list_remove_first(&mca_coll_fca_component.c_cache))) { OBJ_RELEASE(item); @@ -1481,14 +1481,14 @@ static int fca_close(void) OBJ_DESTRUCT(&mca_coll_fca_component.c_cache); } - + if(mca_coll_fca_component.fca_enable_hash && mca_coll_fca_component.fca_enable_hash) { int i = 0; mca_coll_fca_c_cache_item_t *item; for(i = 0; i< mca_coll_fca_component.fca_hash_size; i++) { - + if(mca_coll_fca_component.fca_hash[i] != NULL) { - + while(NULL != (item = (mca_coll_fca_c_cache_item_t *)opal_list_remove_first(mca_coll_fca_component.fca_hash[i]))) { OBJ_RELEASE(item); } @@ -1498,7 +1498,7 @@ static int fca_close(void) } } free(mca_coll_fca_component.fca_hash); - } + } if(mca_coll_fca_component.fca_verbose == 10) { char file_name[30]; @@ -1516,17 +1516,17 @@ static int fca_close(void) fclose(fileHandle); } - + FCA_VERBOSE(10,"fca_total_work_time %f\n", mca_coll_fca_component.fca_total_work_time); - + FCA_VERBOSE(10,"fca_cache_hit %d\n", mca_coll_fca_component.fca_cache_hit); - + FCA_VERBOSE(10,"fca_cache_miss %d\n", mca_coll_fca_component.fca_cache_miss); - + FCA_VERBOSE(10,"fca_hash_hit %d\n", mca_coll_fca_component.fca_hash_hit); - + FCA_VERBOSE(10,"fca_hash_miss %d\n", mca_coll_fca_component.fca_hash_miss); - + FCA_VERBOSE(10,"fca_max_deep %d\n", mca_coll_fca_component.fca_max_deep_in_cache); FCA_VERBOSE(2, "==>"); diff --git a/ompi/mca/coll/fca/coll_fca_module.c b/ompi/mca/coll/fca/coll_fca_module.c index 36fbebf3165..2c3922cf343 100644 --- a/ompi/mca/coll/fca/coll_fca_module.c +++ b/ompi/mca/coll/fca/coll_fca_module.c @@ -281,7 +281,7 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module) opal_list_t *c_cache; struct timeval start, end, seq_start, seq_end, par_start, par_end; int act_deep; - + if(mca_coll_fca_component.fca_verbose == 10) { gettimeofday(&start, NULL); @@ -297,7 +297,7 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module) int hash_index, part_of_hash_index; if(mca_coll_fca_component.fca_parallel_hash_calc == 1) { - + if(mca_coll_fca_component.fca_verbose == 10){ gettimeofday(&par_start, NULL); } @@ -365,7 +365,7 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module) /* first check the size */ if( c_item && (comm_size == c_item->size)) { /* then we have a potential cache hit */ - ompi_comm_compare(comm, c_item->comm, &result); + ompi_comm_compare(comm, c_item->comm, &result); if( MPI_CONGRUENT == result) { /* cache hit! Return the context and be done with it */ /* first bump the score */ @@ -378,12 +378,12 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module) if(mca_coll_fca_component.fca_verbose == 10) { gettimeofday(&end, NULL); - + mca_coll_fca_component.fca_total_work_time =+ end.tv_sec - start.tv_sec + 1e-6 * (end.tv_usec - start.tv_usec); - + mca_coll_fca_component.fca_cache_hit += 1; - + if(act_deep>mca_coll_fca_component.fca_max_deep_in_cache) mca_coll_fca_component.fca_max_deep_in_cache = act_deep; } @@ -426,7 +426,7 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module) c_item_new = OBJ_NEW(mca_coll_fca_c_cache_item_t); c_item_new->fca_comm_wrap = OBJ_NEW(mca_coll_fca_comm_wrap_t); - OBJ_RETAIN(comm); + OBJ_RETAIN(comm); c_item_new->size = comm_size; c_item_new->comm = comm; @@ -438,9 +438,9 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module) } if(mca_coll_fca_component.fca_verbose == 10) { - + gettimeofday(&end, NULL); - + mca_coll_fca_component.fca_total_work_time =+ end.tv_sec - start.tv_sec + 1e-6 * (end.tv_usec - start.tv_usec); @@ -535,7 +535,7 @@ static int mca_coll_fca_module_enable(mca_coll_base_module_t *module, static int mca_coll_fca_ft_event(int state) -{ +{ return OMPI_SUCCESS; } @@ -572,7 +572,7 @@ static void mca_coll_fca_module_destruct(mca_coll_fca_module_t *fca_module) if (fca_module->fca_comm) { __destroy_fca_comm(fca_module); - } + } } OBJ_RELEASE(fca_module->previous_barrier_module); @@ -703,7 +703,7 @@ static void mca_coll_fca_c_cache_item_destruct(mca_coll_fca_c_cache_item_t *item OBJ_RELEASE(item->fca_comm_wrap); /* OBJ_RELEASE(item->comm); */ } -} +} OBJ_CLASS_INSTANCE(mca_coll_fca_c_cache_item_t, opal_list_item_t, diff --git a/ompi/mca/coll/hcoll/coll_hcoll_component.c b/ompi/mca/coll/hcoll/coll_hcoll_component.c index 1a9bf793079..9b457de8e3a 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_component.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_component.c @@ -198,13 +198,13 @@ static int hcoll_register(void) CHECK(reg_int("np",NULL, "Minimal number of processes in the communicator" " for the corresponding hcoll context to be created (default: 32)", - 2, + 2, &mca_coll_hcoll_component.hcoll_np, 0)); CHECK(reg_int("datatype_fallback",NULL, "[1|0|] Enable/Disable user defined dattypes fallback", - 1, + 1, &mca_coll_hcoll_component.hcoll_datatype_fallback, 0)); diff --git a/ompi/mca/coll/hcoll/coll_hcoll_rte.c b/ompi/mca/coll/hcoll/coll_hcoll_rte.c index 447074cdaa4..e9fc4a6b71f 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_rte.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_rte.c @@ -379,7 +379,7 @@ static int group_id(rte_grp_handle_t group){ return ((ompi_communicator_t *)group)->c_contextid; } -static int +static int request_free(struct ompi_request_t **ompi_req) { ompi_request_t *req = *ompi_req; diff --git a/ompi/mca/coll/inter/Makefile.am b/ompi/mca/coll/inter/Makefile.am index d61c5c67548..fb6585488e7 100644 --- a/ompi/mca/coll/inter/Makefile.am +++ b/ompi/mca/coll/inter/Makefile.am @@ -5,15 +5,15 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # Make the output library in this directory, and name it either diff --git a/ompi/mca/coll/inter/coll_inter.c b/ompi/mca/coll/inter/coll_inter.c index 666d1f90b64..2973acdd47b 100644 --- a/ompi/mca/coll/inter/coll_inter.c +++ b/ompi/mca/coll/inter/coll_inter.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,19 +49,19 @@ static const mca_coll_base_module_1_0_0_t inter = { and will use the functions provided in the basic module */ mca_coll_inter_allgather_inter, mca_coll_inter_allgatherv_inter, - mca_coll_inter_allreduce_inter, + mca_coll_inter_allreduce_inter, NULL, /* alltoall */ NULL, /* alltoallv */ NULL, /* alltoallw */ NULL, /* barrier */ mca_coll_inter_bcast_inter, NULL, /* exscan */ - mca_coll_inter_gather_inter, - mca_coll_inter_gatherv_inter, + mca_coll_inter_gather_inter, + mca_coll_inter_gatherv_inter, mca_coll_inter_reduce_inter, NULL, /* reduce_scatter */ NULL, /* scan */ - mca_coll_inter_scatter_inter, + mca_coll_inter_scatter_inter, mca_coll_inter_scatterv_inter }; #endif @@ -94,7 +94,7 @@ mca_coll_inter_comm_query(struct ompi_communicator_t *comm, int *priority) if (!OMPI_COMM_IS_INTER(comm)) { return NULL; } - + /* Get the priority level attached to this module. If priority is less * than or equal to 0, then the module is unavailable. */ *priority = mca_coll_inter_priority_param; @@ -104,7 +104,7 @@ mca_coll_inter_comm_query(struct ompi_communicator_t *comm, int *priority) size = ompi_comm_size(comm); rsize = ompi_comm_remote_size(comm); - + if ( size < mca_coll_inter_crossover && rsize < mca_coll_inter_crossover) { return NULL; } @@ -133,10 +133,10 @@ mca_coll_inter_comm_query(struct ompi_communicator_t *comm, int *priority) inter_module->super.coll_scan = NULL; inter_module->super.coll_scatter = mca_coll_inter_scatter_inter; inter_module->super.coll_scatterv = mca_coll_inter_scatterv_inter; - + return &(inter_module->super); } - + /* * Init module on the communicator @@ -146,15 +146,15 @@ mca_coll_inter_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm) { mca_coll_inter_module_t *inter_module = (mca_coll_inter_module_t*) module; - + inter_module->inter_comm = comm; - + #if 0 if ( mca_coll_inter_verbose_param ) { mca_coll_inter_dump_struct (data); } #endif - + return OMPI_SUCCESS; } @@ -166,10 +166,10 @@ static void mca_coll_inter_dump_struct ( struct mca_coll_base_comm_t *c) rank = ompi_comm_rank ( c->inter_comm ); - printf("%d: Dump of inter-struct for comm %s cid %u\n", + printf("%d: Dump of inter-struct for comm %s cid %u\n", rank, c->inter_comm->c_name, c->inter_comm->c_contextid); - + return; } #endif diff --git a/ompi/mca/coll/inter/coll_inter.h b/ompi/mca/coll/inter/coll_inter.h index a8fa29aa85d..2c836fdcf2a 100644 --- a/ompi/mca/coll/inter/coll_inter.h +++ b/ompi/mca/coll/inter/coll_inter.h @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,10 +51,10 @@ mca_coll_inter_comm_query(struct ompi_communicator_t *comm, int *priority); int mca_coll_inter_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm); -int mca_coll_inter_allgather_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, +int mca_coll_inter_allgather_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); int mca_coll_inter_allgatherv_inter(void *sbuf, int scount, @@ -63,45 +63,45 @@ int mca_coll_inter_allgatherv_inter(void *sbuf, int scount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_allreduce_inter(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_inter_allreduce_inter(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_bcast_inter(void *buff, int count, +int mca_coll_inter_bcast_inter(void *buff, int count, struct ompi_datatype_t *datatype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_gather_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, - int root, +int mca_coll_inter_gather_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_gatherv_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, - int root, +int mca_coll_inter_gatherv_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_reduce_inter(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_inter_reduce_inter(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_scatter_inter(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, +int mca_coll_inter_scatter_inter(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_inter_scatterv_inter(void *sbuf, int *scounts, int *disps, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, int root, +int mca_coll_inter_scatterv_inter(void *sbuf, int *scounts, int *disps, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); @@ -112,7 +112,7 @@ struct mca_coll_inter_module_t { /* Clarifying some terminology: * comm: the input communicator, consisting of several lower level communicators. */ - struct ompi_communicator_t *inter_comm; /* link back to the attached comm */ + struct ompi_communicator_t *inter_comm; /* link back to the attached comm */ }; typedef struct mca_coll_inter_module_t mca_coll_inter_module_t; OBJ_CLASS_DECLARATION(mca_coll_inter_module_t); diff --git a/ompi/mca/coll/inter/coll_inter_allgather.c b/ompi/mca/coll/inter/coll_inter_allgather.c index a8845d1ca1f..ae7ddd126c7 100644 --- a/ompi/mca/coll/inter/coll_inter_allgather.c +++ b/ompi/mca/coll/inter/coll_inter_allgather.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2010 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -60,16 +60,16 @@ mca_coll_inter_allgather_inter(void *sbuf, int scount, if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - + if ( scount > 0 ) { incr = sextent * scount; - ptmp = (char*)malloc(size * incr); + ptmp = (char*)malloc(size * incr); if (NULL == ptmp) { return OMPI_ERR_OUT_OF_RESOURCE; } - err = comm->c_local_comm->c_coll.coll_gather(sbuf, scount, sdtype, - ptmp, scount, sdtype, + err = comm->c_local_comm->c_coll.coll_gather(sbuf, scount, sdtype, + ptmp, scount, sdtype, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_gather_module); if (OMPI_SUCCESS != err) { @@ -101,7 +101,7 @@ mca_coll_inter_allgather_inter(void *sbuf, int scount, } /* bcast the message to all the local processes */ if ( rcount > 0 ) { - err = comm->c_local_comm->c_coll.coll_bcast(rbuf, rcount*rsize, rdtype, + err = comm->c_local_comm->c_coll.coll_bcast(rbuf, rcount*rsize, rdtype, root, comm->c_local_comm, comm->c_local_comm->c_coll.coll_bcast_module); if (OMPI_SUCCESS != err) { diff --git a/ompi/mca/coll/inter/coll_inter_allgatherv.c b/ompi/mca/coll/inter/coll_inter_allgatherv.c index aa4f6c1cd68..bbed290d695 100644 --- a/ompi/mca/coll/inter/coll_inter_allgatherv.c +++ b/ompi/mca/coll/inter/coll_inter_allgatherv.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2010 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,8 +67,8 @@ mca_coll_inter_allgatherv_inter(void *sbuf, int scount, } } /* Local gather to get the scount of each process */ - err = comm->c_local_comm->c_coll.coll_gather(&scount, 1, MPI_INT, - count, 1, MPI_INT, + err = comm->c_local_comm->c_coll.coll_gather(&scount, 1, MPI_INT, + count, 1, MPI_INT, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_gather_module); if (OMPI_SUCCESS != err) { @@ -97,8 +97,8 @@ mca_coll_inter_allgatherv_inter(void *sbuf, int scount, } } } - err = comm->c_local_comm->c_coll.coll_gatherv(sbuf, scount, sdtype, - ptmp, count, displace, + err = comm->c_local_comm->c_coll.coll_gatherv(sbuf, scount, sdtype, + ptmp, count, displace, sdtype,0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_gatherv_module); if (OMPI_SUCCESS != err) { @@ -108,7 +108,7 @@ mca_coll_inter_allgatherv_inter(void *sbuf, int scount, ompi_datatype_create_indexed(size,rcounts,disps,rdtype,&ndtype); ompi_datatype_commit(&ndtype); - if (0 == rank) { + if (0 == rank) { for (i = 0; i < size_local; i++) { total = total + count[i]; } @@ -133,9 +133,9 @@ mca_coll_inter_allgatherv_inter(void *sbuf, int scount, goto exit; } } - + /* bcast the message to all the local processes */ - err = comm->c_local_comm->c_coll.coll_bcast(rbuf, 1, ndtype, + err = comm->c_local_comm->c_coll.coll_bcast(rbuf, 1, ndtype, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_bcast_module); exit: diff --git a/ompi/mca/coll/inter/coll_inter_allreduce.c b/ompi/mca/coll/inter/coll_inter_allreduce.c index 7446030f670..212ea757e8a 100644 --- a/ompi/mca/coll/inter/coll_inter_allreduce.c +++ b/ompi/mca/coll/inter/coll_inter_allreduce.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,21 +51,21 @@ mca_coll_inter_allreduce_inter(void *sbuf, void *rbuf, int count, ompi_request_t *req[2]; rank = ompi_comm_rank(comm); - + /* Perform the reduction locally */ err = ompi_datatype_get_extent(dtype, &lb, &extent); if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - + tmpbuf = (char *) malloc(count * extent); if (NULL == tmpbuf) { return OMPI_ERR_OUT_OF_RESOURCE; } pml_buffer = tmpbuf - lb; - + err = comm->c_local_comm->c_coll.coll_reduce(sbuf, pml_buffer, count, - dtype, op, root, + dtype, op, root, comm->c_local_comm, comm->c_local_comm->c_coll.coll_reduce_module); if (OMPI_SUCCESS != err) { @@ -96,7 +96,7 @@ mca_coll_inter_allreduce_inter(void *sbuf, void *rbuf, int count, } /* bcast the message to all the local processes */ - err = comm->c_local_comm->c_coll.coll_bcast(rbuf, count, dtype, + err = comm->c_local_comm->c_coll.coll_bcast(rbuf, count, dtype, root, comm->c_local_comm, comm->c_local_comm->c_coll.coll_bcast_module); if (OMPI_SUCCESS != err) { diff --git a/ompi/mca/coll/inter/coll_inter_bcast.c b/ompi/mca/coll/inter/coll_inter_bcast.c index 391feb587cc..957978ee1e3 100644 --- a/ompi/mca/coll/inter/coll_inter_bcast.c +++ b/ompi/mca/coll/inter/coll_inter_bcast.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -60,14 +60,14 @@ mca_coll_inter_bcast_inter(void *buff, int count, return err; } } - err = comm->c_local_comm->c_coll.coll_bcast(buff, count, datatype, 0, + err = comm->c_local_comm->c_coll.coll_bcast(buff, count, datatype, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_bcast_module); } else { /* root section, send to the first process of the remote group */ err = MCA_PML_CALL(send(buff, count, datatype, 0, MCA_COLL_BASE_TAG_BCAST, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, comm)); if (OMPI_SUCCESS != err) { return err; diff --git a/ompi/mca/coll/inter/coll_inter_component.c b/ompi/mca/coll/inter/coll_inter_component.c index 18467ec545c..d201c82e1c7 100644 --- a/ompi/mca/coll/inter/coll_inter_component.c +++ b/ompi/mca/coll/inter/coll_inter_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/coll/inter/coll_inter_gather.c b/ompi/mca/coll/inter/coll_inter_gather.c index 958cf243517..ac613fec0f2 100644 --- a/ompi/mca/coll/inter/coll_inter_gather.c +++ b/ompi/mca/coll/inter/coll_inter_gather.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2007 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -63,19 +63,19 @@ mca_coll_inter_gather_inter(void *sbuf, int scount, if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - + incr = extent * scount; size_local = ompi_comm_size(comm->c_local_comm); - ptmp = (char*)malloc(size_local * incr); + ptmp = (char*)malloc(size_local * incr); if (NULL == ptmp) { return OMPI_ERR_OUT_OF_RESOURCE; } - - err = comm->c_local_comm->c_coll.coll_gather(sbuf, scount, sdtype, - ptmp, scount, sdtype, + + err = comm->c_local_comm->c_coll.coll_gather(sbuf, scount, sdtype, + ptmp, scount, sdtype, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_gather_module); - if (0 == rank) { + if (0 == rank) { /* First process sends data to the root */ err = MCA_PML_CALL(send(ptmp, scount*size_local, sdtype, root, MCA_COLL_BASE_TAG_GATHER, diff --git a/ompi/mca/coll/inter/coll_inter_reduce.c b/ompi/mca/coll/inter/coll_inter_reduce.c index 40afab9911b..92396e1f021 100644 --- a/ompi/mca/coll/inter/coll_inter_reduce.c +++ b/ompi/mca/coll/inter/coll_inter_reduce.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -78,7 +78,7 @@ mca_coll_inter_reduce_inter(void *sbuf, void *rbuf, int count, return err; } } - + if (NULL != free_buffer) { free(free_buffer); } diff --git a/ompi/mca/coll/inter/coll_inter_scatter.c b/ompi/mca/coll/inter/coll_inter_scatter.c index 1350a69ed9f..473a09faf88 100644 --- a/ompi/mca/coll/inter/coll_inter_scatter.c +++ b/ompi/mca/coll/inter/coll_inter_scatter.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2008 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,12 +56,12 @@ mca_coll_inter_scatter_inter(void *sbuf, int scount, err = OMPI_SUCCESS; } else if (MPI_ROOT != root) { /* First process receives the data from root */ - if(0 == rank) { + if(0 == rank) { err = ompi_datatype_get_extent(rdtype, &lb, &incr); if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - + incr *= rcount; size_local = ompi_comm_size(comm->c_local_comm); ptmp = (char*)malloc(size_local * incr); @@ -69,7 +69,7 @@ mca_coll_inter_scatter_inter(void *sbuf, int scount, return OMPI_ERR_OUT_OF_RESOURCE; } - err = MCA_PML_CALL(recv(ptmp, rcount*size_local, rdtype, + err = MCA_PML_CALL(recv(ptmp, rcount*size_local, rdtype, root, MCA_COLL_BASE_TAG_SCATTER, comm, MPI_STATUS_IGNORE)); if (OMPI_SUCCESS != err) { @@ -77,8 +77,8 @@ mca_coll_inter_scatter_inter(void *sbuf, int scount, } } /* Perform the scatter locally with the first process as root */ - err = comm->c_local_comm->c_coll.coll_scatter(ptmp, rcount, rdtype, - rbuf, rcount, rdtype, + err = comm->c_local_comm->c_coll.coll_scatter(ptmp, rcount, rdtype, + rbuf, rcount, rdtype, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_scatter_module); if (NULL != ptmp) { diff --git a/ompi/mca/coll/inter/coll_inter_scatterv.c b/ompi/mca/coll/inter/coll_inter_scatterv.c index 26ad961e6fb..f9f16aaaf30 100644 --- a/ompi/mca/coll/inter/coll_inter_scatterv.c +++ b/ompi/mca/coll/inter/coll_inter_scatterv.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2010 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -80,7 +80,7 @@ mca_coll_inter_scatterv_inter(void *sbuf, int *scounts, incr = incr + extent*counts[i]; } if ( incr > 0 ) { - ptmp = (char*)malloc(incr); + ptmp = (char*)malloc(incr); if (NULL == ptmp) { return OMPI_ERR_OUT_OF_RESOURCE; } @@ -103,8 +103,8 @@ mca_coll_inter_scatterv_inter(void *sbuf, int *scounts, } } /* perform the scatterv locally */ - err = comm->c_local_comm->c_coll.coll_scatterv(ptmp, counts, displace, - rdtype, rbuf, rcount, + err = comm->c_local_comm->c_coll.coll_scatterv(ptmp, counts, displace, + rdtype, rbuf, rcount, rdtype, 0, comm->c_local_comm, comm->c_local_comm->c_coll.coll_scatterv_module); if (OMPI_SUCCESS != err) { @@ -131,7 +131,7 @@ mca_coll_inter_scatterv_inter(void *sbuf, int *scounts, ompi_datatype_create_indexed(size,scounts,disps,sdtype,&ndtype); ompi_datatype_commit(&ndtype); - + err = MCA_PML_CALL(send(sbuf, 1, ndtype, 0, MCA_COLL_BASE_TAG_SCATTERV, MCA_PML_BASE_SEND_STANDARD, comm)); diff --git a/ompi/mca/coll/libnbc/Makefile.am b/ompi/mca/coll/libnbc/Makefile.am index d630413e007..85d7d4ba780 100644 --- a/ompi/mca/coll/libnbc/Makefile.am +++ b/ompi/mca/coll/libnbc/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/coll/libnbc/coll_libnbc.h b/ompi/mca/coll/libnbc/coll_libnbc.h index a66e8aed7cd..abeca504650 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc.h +++ b/ompi/mca/coll/libnbc/coll_libnbc.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,7 +40,7 @@ BEGIN_C_DECLS /* TODO: this whole schedule cache stuff does not work with the tmbuf * :-( - first, the tmpbuf must not be freed if a schedule using it is * still in the cache and second, the tmpbuf used by the schedule must - * be attached to the handle that uses this schedule !!!! + * be attached to the handle that uses this schedule !!!! * I.E., THIS IS EXPERIMENTAL AND MIGHT NOT WORK */ /* It also leaks memory because the schedule is never cleaned up when the communicator is destroyed, so don't use it for now */ @@ -99,7 +99,7 @@ OBJ_CLASS_DECLARATION(ompi_coll_libnbc_module_t); typedef ompi_coll_libnbc_module_t NBC_Comminfo; /* a schedule is basically a pointer to some memory location where the - * schedule array resides */ + * schedule array resides */ typedef void* NBC_Schedule; struct ompi_coll_libnbc_request_t { @@ -145,112 +145,112 @@ int NBC_Init_comm(MPI_Comm comm, ompi_coll_libnbc_module_t *module); int NBC_Progress(NBC_Handle *handle); -int ompi_coll_libnbc_iallgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_iallgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *displs, +int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iallreduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, +int ompi_coll_libnbc_iallreduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ialltoallv(void* sendbuf, int *sendcounts, int *sdispls, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *rdispls, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ialltoallw(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes, - void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes, - struct ompi_communicator_t *comm, ompi_request_t **request, +int ompi_coll_libnbc_ialltoallw(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes, + void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes, + struct ompi_communicator_t *comm, ompi_request_t **request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ibarrier(struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iexscan(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, +int ompi_coll_libnbc_iexscan(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t **request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_igather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_igather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_igatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, - void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, +int ompi_coll_libnbc_igatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, + void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ireduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, +int ompi_coll_libnbc_ireduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcounts, MPI_Datatype datatype, +int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ireduce_scatter_block(void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, + struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t **request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, +int ompi_coll_libnbc_iscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iscatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, - void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, +int ompi_coll_libnbc_iscatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, + void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iscatterv(void* sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, - void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, +int ompi_coll_libnbc_iscatterv(void* sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, + void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iallgather_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_iallgather_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iallgatherv_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *displs, +int ompi_coll_libnbc_iallgatherv_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iallreduce_inter(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, +int ompi_coll_libnbc_iallreduce_inter(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ialltoall_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_ialltoall_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ialltoallv_inter(void* sendbuf, int *sendcounts, int *sdispls, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *rdispls, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ialltoallw_inter(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes, - void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes, - struct ompi_communicator_t *comm, ompi_request_t **request, +int ompi_coll_libnbc_ialltoallw_inter(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t **sdtypes, + void *rbuf, int *rcounts, int *rdisps, struct ompi_datatype_t **rdtypes, + struct ompi_communicator_t *comm, ompi_request_t **request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ibarrier_inter(struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_igather_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_igather_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_igatherv_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, - void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, +int ompi_coll_libnbc_igatherv_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, + void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ireduce_inter(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, +int ompi_coll_libnbc_ireduce_inter(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_ireduce_scatter_inter(void* sendbuf, void* recvbuf, int *recvcounts, MPI_Datatype datatype, +int ompi_coll_libnbc_ireduce_scatter_inter(void* sendbuf, void* recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); int ompi_coll_libnbc_ireduce_scatter_block_inter(void *sbuf, void *rbuf, int rcount, struct ompi_datatype_t *dtype, - struct ompi_op_t *op, struct ompi_communicator_t *comm, + struct ompi_op_t *op, struct ompi_communicator_t *comm, ompi_request_t **request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iscatter_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, - void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, +int ompi_coll_libnbc_iscatter_inter(void* sendbuf, int sendcount, MPI_Datatype sendtype, + void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); -int ompi_coll_libnbc_iscatterv_inter(void* sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, - void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, +int ompi_coll_libnbc_iscatterv_inter(void* sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, + void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module); diff --git a/ompi/mca/coll/libnbc/coll_libnbc_component.c b/ompi/mca/coll/libnbc/coll_libnbc_component.c index 22d4f5f718a..e8b9facb57a 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc_component.c +++ b/ompi/mca/coll/libnbc/coll_libnbc_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -152,7 +152,7 @@ libnbc_init_query(bool enable_progress_threads, * priority we want to return. */ mca_coll_base_module_t * -libnbc_comm_query(struct ompi_communicator_t *comm, +libnbc_comm_query(struct ompi_communicator_t *comm, int *priority) { ompi_coll_libnbc_module_t *module; @@ -272,7 +272,7 @@ libnbc_module_destruct(ompi_coll_libnbc_module_t *module) /* if we ever were used for a collective op, do the progress cleanup. */ if (true == module->comm_registered) { - int32_t tmp = + int32_t tmp = OPAL_THREAD_ADD32(&mca_coll_libnbc_component.active_comms, -1); if (0 == tmp) { opal_progress_unregister(ompi_coll_libnbc_progress); @@ -297,7 +297,7 @@ request_cancel(struct ompi_request_t *request, int complete) static int request_free(struct ompi_request_t **ompi_req) { - ompi_coll_libnbc_request_t *request = + ompi_coll_libnbc_request_t *request = (ompi_coll_libnbc_request_t*) *ompi_req; if (true != request->super.req_complete) { @@ -322,7 +322,7 @@ request_construct(ompi_coll_libnbc_request_t *request) } -OBJ_CLASS_INSTANCE(ompi_coll_libnbc_request_t, +OBJ_CLASS_INSTANCE(ompi_coll_libnbc_request_t, ompi_request_t, request_construct, NULL); diff --git a/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c b/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c index e9770d8e851..c2546bf747f 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c +++ b/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c @@ -2,7 +2,7 @@ * Copyright (c) 2006 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2006 The Technical University of Chemnitz. All + * Copyright (c) 2006 The Technical University of Chemnitz. All * rights reserved. * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights @@ -23,16 +23,16 @@ * * Algorithm: * pairwise exchange - * round r: + * round r: * grp = rank % 2^r * if grp == 0: receive from rank + 2^(r-1) if it exists and reduce value * if grp == 1: send to rank - 2^(r-1) and exit function - * + * * do this for R=log_2(p) rounds - * + * */ -int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, +int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module) { int peer, rank, maxr, p, r, res, count, offset, firstred; @@ -42,7 +42,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec NBC_Handle *handle; ompi_coll_libnbc_request_t **coll_req = (ompi_coll_libnbc_request_t**) request; ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; - + NBC_IN_PLACE(sendbuf, recvbuf, inplace); res = NBC_Init_handle(comm, coll_req, libnbc_module); @@ -54,7 +54,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec if (MPI_SUCCESS != res || 0 == p) { printf("MPI Error in MPI_Comm_size() (%i:%i)\n", res, p); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; } res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res || 0 == ext) { printf("MPI Error in MPI_Type_extent() (%i:%i)\n", res, (int)ext); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; } - + schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); if (NULL == schedule) { printf("Error in malloc()\n"); return NBC_OOR; } @@ -76,7 +76,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec res = NBC_Copy(sendbuf, count, datatype, redbuf, count, datatype, comm); if (NBC_OK != res) { printf("Error in NBC_Copy() (%i)\n", res); return res; } } - + firstred = 1; for(r=1; r<=maxr; r++) { if((rank % (1<tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } @@ -141,13 +141,13 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec } /*NBC_PRINT_SCHED(*schedule);*/ - + res = NBC_Sched_commit(schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Start() (%i)\n", res); return res; } - + /* tmpbuf is freed with the handle */ return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc.c b/ompi/mca/coll/libnbc/nbc.c index 9c7f90773dc..eb825055404 100644 --- a/ompi/mca/coll/libnbc/nbc.c +++ b/ompi/mca/coll/libnbc/nbc.c @@ -5,7 +5,7 @@ * Copyright (c) 2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2006 The Technical University of Chemnitz. All + * Copyright (c) 2006 The Technical University of Chemnitz. All * rights reserved. * * Author(s): Torsten Hoefler @@ -55,13 +55,13 @@ int NBC_Sched_send(void* buf, char tmpbuf, int count, MPI_Datatype datatype, int char* ptr; NBC_Fn_type type = SEND; NBC_Args_send send_args; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule is %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(NBC_Fn_type)+sizeof(NBC_Args_send)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + /* store the passed arguments */ send_args.buf=buf; send_args.tmpbuf=tmpbuf; @@ -90,13 +90,13 @@ int NBC_Sched_recv(void* buf, char tmpbuf, int count, MPI_Datatype datatype, int char* ptr; NBC_Fn_type type = RECV; NBC_Args_recv recv_args; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule is %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(NBC_Fn_type)+sizeof(NBC_Args_recv)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + /* store the passed arguments */ recv_args.buf=buf; recv_args.tmpbuf=tmpbuf; @@ -125,13 +125,13 @@ int NBC_Sched_op(void *buf3, char tmpbuf3, void* buf1, char tmpbuf1, void* buf2, char* ptr; NBC_Fn_type type = OP; NBC_Args_op op_args; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule is %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(NBC_Fn_type)+sizeof(NBC_Args_op)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + /* store the passed arguments */ op_args.buf1=buf1; op_args.buf2=buf2; @@ -154,7 +154,7 @@ int NBC_Sched_op(void *buf3, char tmpbuf3, void* buf1, char tmpbuf1, void* buf2, /* increase size of schedule */ NBC_INC_SIZE(*schedule, sizeof(NBC_Fn_type)+sizeof(NBC_Args_op)); - + return NBC_OK; } @@ -164,13 +164,13 @@ int NBC_Sched_copy(void *src, char tmpsrc, int srccount, MPI_Datatype srctype, v char* ptr; NBC_Fn_type type = COPY; NBC_Args_copy copy_args; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule is %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(NBC_Fn_type)+sizeof(NBC_Args_copy)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + /* store the passed arguments */ copy_args.src=src; copy_args.tmpsrc=tmpsrc; @@ -202,13 +202,13 @@ int NBC_Sched_unpack(void *inbuf, char tmpinbuf, int count, MPI_Datatype datatyp char* ptr; NBC_Fn_type type = UNPACK; NBC_Args_unpack unpack_args; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule is %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(NBC_Fn_type)+sizeof(NBC_Args_unpack)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + /* store the passed arguments */ unpack_args.inbuf=inbuf; unpack_args.tmpinbuf=tmpinbuf; @@ -237,19 +237,19 @@ int NBC_Sched_barrier(NBC_Schedule *schedule) { int size, num = 0; char *ptr; char delimiter = 1; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("round terminated at %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(char)+sizeof(int)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + ptr = (char*)*schedule + size; NBC_PUT_BYTES(ptr,delimiter); /* round-schedule delimiter */ NBC_PUT_BYTES(ptr,num); /* initialize num=0 for next round-schedule */ - + NBC_DEBUG(10, "ending round at byte %i\n", (int)(size+sizeof(char)+sizeof(int))); - + /* increase size of schedule */ NBC_INC_SIZE(*schedule, sizeof(char)+sizeof(int)); @@ -259,20 +259,20 @@ int NBC_Sched_barrier(NBC_Schedule *schedule) { /* this function ends a schedule */ int NBC_Sched_commit(NBC_Schedule *schedule) { int size; - + /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule terminated at %i bytes\n", size);*/ *schedule = (NBC_Schedule)realloc(*schedule, size+sizeof(char)); if(*schedule == NULL) { printf("Error in realloc()\n"); return NBC_OOR; } - + /* add the barrier char (0) because this is the last round */ *(char*)((char*)*schedule+size)=0; NBC_DEBUG(10, "closing schedule %p at byte %i\n", *schedule, (int)(size+sizeof(char))); /* increase size of schedule */ NBC_INC_SIZE(*schedule, sizeof(char)); - + return NBC_OK; } @@ -350,7 +350,7 @@ int NBC_Progress(NBC_Handle *handle) { if(*delim == 0) { /* this was the last round - we're done */ NBC_DEBUG(5, "NBC_Progress last round finished - we're done\n"); - + res = NBC_Free(handle); if((NBC_OK != res)) { printf("Error in NBC_Free() (%i)\n", res); ret=res; goto error; } @@ -379,11 +379,11 @@ static inline int NBC_Start_round(NBC_Handle *handle) { int i, res, ret=NBC_OK; char* ptr; NBC_Fn_type type; - NBC_Args_send sendargs; - NBC_Args_recv recvargs; - NBC_Args_op opargs; - NBC_Args_copy copyargs; - NBC_Args_unpack unpackargs; + NBC_Args_send sendargs; + NBC_Args_recv recvargs; + NBC_Args_op opargs; + NBC_Args_copy copyargs; + NBC_Args_unpack unpackargs; NBC_Schedule myschedule; void *buf1, *buf2, *buf3; @@ -437,7 +437,7 @@ static inline int NBC_Start_round(NBC_Handle *handle) { #endif handle->req_array = (MPI_Request*)realloc((void*)handle->req_array, (handle->req_count)*sizeof(MPI_Request)); NBC_CHECK_NULL(handle->req_array); - res = MCA_PML_CALL(irecv(buf1, recvargs.count, recvargs.datatype, recvargs.source, handle->tag, handle->comm, handle->req_array+handle->req_count-1)); + res = MCA_PML_CALL(irecv(buf1, recvargs.count, recvargs.datatype, recvargs.source, handle->tag, handle->comm, handle->req_array+handle->req_count-1)); if(OMPI_SUCCESS != res) { printf("Error in MPI_Irecv(%lu, %i, %lu, %i, %i, %lu) (%i)\n", (unsigned long)buf1, recvargs.count, (unsigned long)recvargs.datatype, recvargs.source, handle->tag, (unsigned long)handle->comm, res); ret=res; goto error; } #ifdef NBC_TIMING Irecv_time += MPI_Wtime(); @@ -509,7 +509,7 @@ static inline int NBC_Start_round(NBC_Handle *handle) { } /* check if we can make progress - not in the first round, this allows us to leave the - * initialization faster and to reach more overlap + * initialization faster and to reach more overlap * * threaded case: calling progress in the first round can lead to a * deadlock if NBC_Free is called in this round :-( */ @@ -546,7 +546,7 @@ int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t tmp_tag = comminfo->tag--; if (tmp_tag == MCA_COLL_BASE_TAG_NONBLOCKING_END) { tmp_tag = comminfo->tag = MCA_COLL_BASE_TAG_NONBLOCKING_BASE; - NBC_DEBUG(2,"resetting tags ...\n"); + NBC_DEBUG(2,"resetting tags ...\n"); } if (true != comminfo->comm_registered) { @@ -559,7 +559,7 @@ int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t /* register progress */ if (need_register) { - int32_t tmp = + int32_t tmp = OPAL_THREAD_ADD32(&mca_coll_libnbc_component.active_comms, 1); if (tmp == 1) { opal_progress_register(ompi_coll_libnbc_progress); @@ -568,10 +568,10 @@ int NBC_Init_handle(struct ompi_communicator_t *comm, ompi_coll_libnbc_request_t handle->comm=comm; /*printf("got comminfo: %lu tag: %i\n", comminfo, comminfo->tag);*/ - + /******************** end of tag and shadow comm administration ... ***************/ handle->comminfo = comminfo; - + NBC_DEBUG(3, "got tag %i\n", handle->tag); return NBC_OK; @@ -645,13 +645,13 @@ int NBC_Start(NBC_Handle *handle, NBC_Schedule *schedule) { #ifdef NBC_CACHE_SCHEDULE void NBC_SchedCache_args_delete_key_dummy(void *k) { - /* do nothing because the key and the data element are identical :-) + /* do nothing because the key and the data element are identical :-) * both (the single one :) is freed in NBC__args_delete() */ } void NBC_SchedCache_args_delete(void *entry) { struct NBC_dummyarg *tmp; - + tmp = (struct NBC_dummyarg*)entry; /* free taglistentry */ free((void*)*(tmp->schedule)); diff --git a/ompi/mca/coll/libnbc/nbc_iallgather.c b/ompi/mca/coll/libnbc/nbc_iallgather.c index a6af0303065..36809516445 100644 --- a/ompi/mca/coll/libnbc/nbc_iallgather.c +++ b/ompi/mca/coll/libnbc/nbc_iallgather.c @@ -2,7 +2,7 @@ * Copyright (c) 2006 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2006 The Technical University of Chemnitz. All + * Copyright (c) 2006 The Technical University of Chemnitz. All * rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -16,15 +16,15 @@ /* tree comparison function for schedule cache */ int NBC_Allgather_args_compare(NBC_Allgather_args *a, NBC_Allgather_args *b, void *param) { - if( (a->sendbuf == b->sendbuf) && - (a->sendcount == b->sendcount) && + if( (a->sendbuf == b->sendbuf) && + (a->sendcount == b->sendcount) && (a->sendtype == b->sendtype) && (a->recvbuf == b->recvbuf) && (a->recvcount == b->recvcount) && (a->recvtype == b->recvtype) ) { return 0; } - if( a->sendbuf < b->sendbuf ) { + if( a->sendbuf < b->sendbuf ) { return -1; } return +1; @@ -35,7 +35,7 @@ int NBC_Allgather_args_compare(NBC_Allgather_args *a, NBC_Allgather_args *b, voi * the algorithm uses p-1 rounds * each node sends the packet it received last round (or has in round 0) to it's right neighbor (modulo p) * each node receives from it's left (modulo p) neighbor */ -int ompi_coll_libnbc_iallgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_iallgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module) { @@ -51,7 +51,7 @@ int ompi_coll_libnbc_iallgather(void* sendbuf, int sendcount, MPI_Datatype sendt ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; NBC_IN_PLACE(sendbuf, recvbuf, inplace); - + res = NBC_Init_handle(comm, coll_req, libnbc_module); if(res != NBC_OK) { printf("Error in NBC_Init_handle(%i)\n", res); return res; } handle = (*coll_req); @@ -90,7 +90,7 @@ int ompi_coll_libnbc_iallgather(void* sendbuf, int sendcount, MPI_Datatype sendt res = NBC_Sched_create(schedule); if(NBC_OK != res) { printf("Error in NBC_Sched_create, (%i)\n", res); return res; } - + sbuf = ((char *)recvbuf) + (rank*recvcount*rcvext); /* do p-1 rounds */ for(r=0;r @@ -23,12 +23,12 @@ /* simple linear MPI_Iallgatherv * the algorithm uses p-1 rounds * first round: - * each node sends to it's left node (rank+1)%p sendcount elements + * each node sends to it's left node (rank+1)%p sendcount elements * each node begins with it's right node (rank-11)%p and receives from it recvcounts[(rank+1)%p] elements - * second round: - * each node sends to node (rank+2)%p sendcount elements + * second round: + * each node sends to node (rank+2)%p sendcount elements * each node receives from node (rank-2)%p recvcounts[(rank+2)%p] elements */ -int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *displs, +int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module) { @@ -39,9 +39,9 @@ int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype send NBC_Handle *handle; ompi_coll_libnbc_request_t **coll_req = (ompi_coll_libnbc_request_t**) request; ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; - + NBC_IN_PLACE(sendbuf, recvbuf, inplace); - + res = NBC_Init_handle(comm, coll_req, libnbc_module); if(res != NBC_OK) { printf("Error in NBC_Init_handle(%i)\n", res); return res; } handle = (*coll_req); @@ -56,10 +56,10 @@ int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype send if (NULL == schedule) { printf("Error in malloc() (%i)\n", res); return res; } handle->tmpbuf=NULL; - + res = NBC_Sched_create(schedule); if(res != NBC_OK) { printf("Error in NBC_Sched_create, (%i)\n", res); return res; } - + if (inplace) { sendtype = recvtype; sendcount = recvcounts[rank]; @@ -76,7 +76,7 @@ int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype send speer = (rank+r)%p; rpeer = (rank-r+p)%p; rbuf = ((char *)recvbuf) + (displs[rpeer]*rcvext); - + res = NBC_Sched_recv(rbuf, false, recvcounts[rpeer], recvtype, rpeer, schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } res = NBC_Sched_send(sbuf, false, sendcount, sendtype, speer, schedule); @@ -85,10 +85,10 @@ int ompi_coll_libnbc_iallgatherv(void* sendbuf, int sendcount, MPI_Datatype send res = NBC_Sched_commit(schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { printf("Error in NBC_Start() (%i)\n", res); return res; } - + return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc_ialltoall.c b/ompi/mca/coll/libnbc/nbc_ialltoall.c index 3712dae40e7..ae9fc429292 100644 --- a/ompi/mca/coll/libnbc/nbc_ialltoall.c +++ b/ompi/mca/coll/libnbc/nbc_ialltoall.c @@ -23,15 +23,15 @@ static inline int a2a_sched_diss(int rank, int p, MPI_Aint sndext, MPI_Aint rcve /* tree comparison function for schedule cache */ int NBC_Alltoall_args_compare(NBC_Alltoall_args *a, NBC_Alltoall_args *b, void *param) { - if( (a->sendbuf == b->sendbuf) && - (a->sendcount == b->sendcount) && + if( (a->sendbuf == b->sendbuf) && + (a->sendcount == b->sendcount) && (a->sendtype == b->sendtype) && (a->recvbuf == b->recvbuf) && (a->recvcount == b->recvcount) && (a->recvtype == b->recvtype) ) { return 0; } - if( a->sendbuf < b->sendbuf ) { + if( a->sendbuf < b->sendbuf ) { return -1; } return +1; @@ -39,7 +39,7 @@ int NBC_Alltoall_args_compare(NBC_Alltoall_args *a, NBC_Alltoall_args *b, void * #endif /* simple linear MPI_Ialltoall the (simple) algorithm just sends to all nodes */ -int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, +int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_1_0_t *module) { @@ -56,7 +56,7 @@ int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendty ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; NBC_IN_PLACE(sendbuf, recvbuf, inplace); - + res = NBC_Init_handle(comm, coll_req, libnbc_module); if(res != NBC_OK) { printf("Error in NBC_Init_handle(%i)\n", res); return res; } handle = (*coll_req); @@ -152,9 +152,9 @@ int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendty res = NBC_Sched_create(schedule); if(res != NBC_OK) { printf("Error in NBC_Sched_create (%i)\n", res); return res; } - + switch(alg) { - case NBC_A2A_LINEAR: + case NBC_A2A_LINEAR: res = a2a_sched_linear(rank, p, sndext, rcvext, schedule, sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); break; case NBC_A2A_DISS: @@ -164,12 +164,12 @@ int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendty res = a2a_sched_pairwise(rank, p, sndext, rcvext, schedule, sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); break; } - + if (NBC_OK != res) { return res; } res = NBC_Sched_commit(schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } - + #ifdef NBC_CACHE_SCHEDULE /* save schedule to tree */ args = (NBC_Alltoall_args*)malloc(sizeof(NBC_Alltoall_args)); @@ -196,7 +196,7 @@ int ompi_coll_libnbc_ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendty res = NBC_Start(handle, schedule); if (NBC_OK != res) { printf("Error in NBC_Start() (%i)\n", res); return res; } - + return NBC_OK; } @@ -261,19 +261,19 @@ static inline int a2a_sched_pairwise(int rank, int p, MPI_Aint sndext, MPI_Aint res = NBC_OK; if(p < 2) return res; - + for(r=1;rtmpbuf+datasize*p; @@ -341,22 +341,22 @@ static inline int a2a_sched_diss(int rank, int p, MPI_Aint sndext, MPI_Aint rcve offset += datasize; } } - + speer = ( rank + r) % p; /* add p because modulo does not work with negative values */ rpeer = ((rank - r)+p) % p; - + /*printf("[%i] receiving %i bytes from host %i into rbuf %lu\n", rank, offset, rpeer, (unsigned long)rtmpbuf);*/ res = NBC_Sched_recv(rtmpbuf-(unsigned long)handle->tmpbuf, true, offset, MPI_BYTE, rpeer, schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } - + /*printf("[%i] sending %i bytes to host %i from sbuf %lu\n", rank, offset, speer, (unsigned long)stmpbuf);*/ res = NBC_Sched_send(stmpbuf-(unsigned long)handle->tmpbuf, true, offset, MPI_BYTE, speer, schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_send() (%i)\n", res); return res; } res = NBC_Sched_barrier(schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } - + /* unpack from buffer */ offset = 0; for(i=1; itmpbuf=NULL; - + res = NBC_Sched_create(schedule); if(res != NBC_OK) { printf("Error in NBC_Sched_create (%i)\n", res); return res; } @@ -83,7 +83,7 @@ int ompi_coll_libnbc_ialltoallv(void* sendbuf, int *sendcounts, int *sdispls, res = NBC_Start(handle, schedule); if (NBC_OK != res) { printf("Error in NBC_Start() (%i)\n", res); return res; } - + return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc_ibcast.c b/ompi/mca/coll/libnbc/nbc_ibcast.c index dc56090090a..0fbc4fc71a7 100644 --- a/ompi/mca/coll/libnbc/nbc_ibcast.c +++ b/ompi/mca/coll/libnbc/nbc_ibcast.c @@ -20,13 +20,13 @@ static inline int bcast_sched_chain(int rank, int p, int root, NBC_Schedule *sch /* tree comparison function for schedule cache */ int NBC_Bcast_args_compare(NBC_Bcast_args *a, NBC_Bcast_args *b, void *param) { - if( (a->buffer == b->buffer) && - (a->count == b->count) && + if( (a->buffer == b->buffer) && + (a->count == b->count) && (a->datatype == b->datatype) && (a->root == b->root) ) { return 0; } - if( a->buffer < b->buffer ) { + if( a->buffer < b->buffer ) { return -1; } return +1; @@ -56,7 +56,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } res = MPI_Type_size(datatype, &size); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_size() (%i)\n", res); return res; } - + segsize = 16384; /* algorithm selection */ if(p <= 4) { @@ -83,7 +83,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int if(found == NULL) { #endif schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); - + res = NBC_Sched_create(schedule); if(res != NBC_OK) { printf("Error in NBC_Sched_create, res = %i\n", res); return res; } @@ -99,7 +99,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int break; } if (NBC_OK != res) { printf("Error in Schedule creation() (%i)\n", res); return res; } - + res = NBC_Sched_commit(schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } #ifdef NBC_CACHE_SCHEDULE @@ -121,17 +121,17 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int schedule=found->schedule; } #endif - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { printf("Error in NBC_Start() (%i)\n", res); return res; } - + return NBC_OK; } -/* better binomial bcast +/* better binomial bcast * working principle: * - each node gets a virtual rank vrank - * - the 'root' node get vrank 0 + * - the 'root' node get vrank 0 * - node 0 gets the vrank of the 'root' * - all other ranks stay identical (they do not matter) * @@ -139,7 +139,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int * - each node with vrank > 2^r and vrank < 2^r+1 receives from node * vrank - 2^r (vrank=1 receives from 0, vrank 0 receives never) * - each node sends each round r to node vrank + 2^r - * - a node stops to send if 2^r > commsize + * - a node stops to send if 2^r > commsize */ #define RANK2VRANK(rank, vrank, root) \ { \ @@ -155,7 +155,7 @@ int ompi_coll_libnbc_ibcast(void *buffer, int count, MPI_Datatype datatype, int } static inline int bcast_sched_binomial(int rank, int p, int root, NBC_Schedule *schedule, void *buffer, int count, MPI_Datatype datatype) { int maxr, vrank, peer, r, res; - + maxr = (int)ceil((log((double)p)/LOG2)); RANK2VRANK(rank, vrank, root); @@ -187,7 +187,7 @@ static inline int bcast_sched_binomial(int rank, int p, int root, NBC_Schedule * /* simple linear MPI_Ibcast */ static inline int bcast_sched_linear(int rank, int p, int root, NBC_Schedule *schedule, void *buffer, int count, MPI_Datatype datatype) { - int peer, res; + int peer, res; /* send to all others */ if(rank == root) { @@ -203,7 +203,7 @@ static inline int bcast_sched_linear(int rank, int p, int root, NBC_Schedule *sc res = NBC_Sched_recv(buffer, false, count, datatype, root, schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } } - + return NBC_OK; } @@ -218,14 +218,14 @@ static inline int bcast_sched_chain(int rank, int p, int root, NBC_Schedule *sch VRANK2RANK(speer, vrank+1, root); res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } - + if(count == 0) return NBC_OK; numfrag = count*size/fragsize; if((count*size)%fragsize != 0) numfrag++; fragcount = count/numfrag; /*if(!rank) printf("numfrag: %i, count: %i, size: %i, fragcount: %i\n", numfrag, count, size, fragcount);*/ - + for(fragnum = 0; fragnum < numfrag; fragnum++) { buf = (char*)buffer+fragnum*fragcount*ext; thiscount = fragcount; @@ -249,6 +249,6 @@ static inline int bcast_sched_chain(int rank, int p, int root, NBC_Schedule *sch if(vrank == 0) res = NBC_Sched_barrier(schedule); } } - + return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc_ibcast_inter.c b/ompi/mca/coll/libnbc/nbc_ibcast_inter.c index 8590cd49351..2ae95bcb68e 100644 --- a/ompi/mca/coll/libnbc/nbc_ibcast_inter.c +++ b/ompi/mca/coll/libnbc/nbc_ibcast_inter.c @@ -30,11 +30,11 @@ int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } res = MPI_Type_size(datatype, &size); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_size() (%i)\n", res); return res; } - + handle->tmpbuf=NULL; schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); - + res = NBC_Sched_create(schedule); if(res != NBC_OK) { printf("Error in NBC_Sched_create, res = %i\n", res); return res; } @@ -57,12 +57,12 @@ int ompi_coll_libnbc_ibcast_inter(void *buffer, int count, MPI_Datatype datatype if (NBC_OK != res) { printf("Error in NBC_Sched_recv() (%i)\n", res); return res; } } } - + res = NBC_Sched_commit(schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { printf("Error in NBC_Start() (%i)\n", res); return res; } - + return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc_igatherv.c b/ompi/mca/coll/libnbc/nbc_igatherv.c index 3a8157a6585..e4674e1e536 100644 --- a/ompi/mca/coll/libnbc/nbc_igatherv.c +++ b/ompi/mca/coll/libnbc/nbc_igatherv.c @@ -73,13 +73,13 @@ int ompi_coll_libnbc_igatherv(void* sendbuf, int sendcount, MPI_Datatype sendtyp } } } - + res = NBC_Sched_commit(schedule); if (NBC_OK != res) { printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { printf("Error in NBC_Start() (%i)\n", res); return res; } - + return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc_internal.h b/ompi/mca/coll/libnbc/nbc_internal.h index 10728d6c866..494990c6027 100644 --- a/ompi/mca/coll/libnbc/nbc_internal.h +++ b/ompi/mca/coll/libnbc/nbc_internal.h @@ -2,7 +2,7 @@ * Copyright (c) 2006 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2006 The Technical University of Chemnitz. All + * Copyright (c) 2006 The Technical University of Chemnitz. All * rights reserved. * * Author(s): Torsten Hoefler @@ -66,7 +66,7 @@ extern "C" { #define NBC_SCATTER 14 #define NBC_SCATTERV 15 /* set the number of collectives in nbc.h !!!! */ - + /* several typedefs for NBC */ /* the function type enum */ @@ -111,7 +111,7 @@ typedef struct { /* the copy argument struct */ typedef struct { - void *src; + void *src; char tmpsrc; int srccount; MPI_Datatype srctype; @@ -123,11 +123,11 @@ typedef struct { /* unpack operation arguments */ typedef struct { - void *inbuf; + void *inbuf; char tmpinbuf; int count; MPI_Datatype datatype; - void *outbuf; + void *outbuf; char tmpoutbuf; } NBC_Args_unpack; @@ -239,7 +239,7 @@ int NBC_Scatter_args_compare(NBC_Scatter_args *a, NBC_Scatter_args *b, void *par /* Schedule cache structures/functions */ void NBC_SchedCache_args_delete(void *entry); void NBC_SchedCache_args_delete_key_dummy(void *k); - + #endif @@ -259,7 +259,7 @@ int NBC_Create_fortran_handle(int *fhandle, NBC_Handle **handle); * [type] ::= function type (NBC_Fn_type) * [type-args] ::= type specific arguments (NBC_Args_send, NBC_Args_recv or, NBC_Args_op) * [delimiter] ::= 1 (char) - indicates that a round follows - * [end] ::= 0 (char) - indicates that this is the last round + * [end] ::= 0 (char) - indicates that this is the last round */ /* @@ -438,29 +438,29 @@ int NBC_Create_fortran_handle(int *fhandle, NBC_Handle **handle); /* -#define NBC_DEBUG(level, ...) {} +#define NBC_DEBUG(level, ...) {} */ -static inline void NBC_DEBUG(int level, const char *fmt, ...) -{ +static inline void NBC_DEBUG(int level, const char *fmt, ...) +{ #if NBC_DLEVEL > 0 va_list ap; - int rank; - - if(NBC_DLEVEL >= level) { - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - - printf("[LibNBC - %i] ", rank); + int rank; + + if(NBC_DLEVEL >= level) { + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + printf("[LibNBC - %i] ", rank); va_start(ap, fmt); vprintf(fmt, ap); va_end (ap); - } + } #endif } /* returns true (1) or false (0) if type is intrinsic or not */ static inline int NBC_Type_intrinsic(MPI_Datatype type) { - + if( ( type == MPI_INT ) || ( type == MPI_LONG ) || ( type == MPI_SHORT ) || @@ -476,9 +476,9 @@ static inline int NBC_Type_intrinsic(MPI_Datatype type) { ( type == MPI_LONG_INT) || ( type == MPI_2INT) || ( type == MPI_SHORT_INT) || - ( type == MPI_LONG_DOUBLE_INT)) + ( type == MPI_LONG_DOUBLE_INT)) return 1; - else + else return 0; } @@ -546,7 +546,7 @@ static inline int NBC_Unpack(void *src, int srccount, MPI_Datatype srctype, void /* deletes elements from dict until low watermark is reached */ static inline void NBC_SchedCache_dictwipe(hb_tree *dict, int *size) { hb_itor *itor; - + itor = hb_itor_new(dict); for (; hb_itor_valid(itor) && (*size>NBC_SCHED_DICT_LOWER); hb_itor_next(itor)) { hb_tree_remove(dict, hb_itor_key(itor), 0); @@ -577,7 +577,7 @@ int NBC_Comm_neighbors(MPI_Comm comm, int maxindegree, int sources[], int source #ifdef __cplusplus } #endif - + #endif diff --git a/ompi/mca/coll/libnbc/nbc_ireduce.c b/ompi/mca/coll/libnbc/nbc_ireduce.c index 349f0230be8..a4dd0eb4233 100644 --- a/ompi/mca/coll/libnbc/nbc_ireduce.c +++ b/ompi/mca/coll/libnbc/nbc_ireduce.c @@ -24,7 +24,7 @@ static inline int red_sched_linear(int rank, int rsize, int root, void *sendbuf, int NBC_Reduce_args_compare(NBC_Reduce_args *a, NBC_Reduce_args *b, void *param) { if( (a->sendbuf == b->sendbuf) && (a->recvbuf == b->recvbuf) && - (a->count == b->count) && + (a->count == b->count) && (a->datatype == b->datatype) && (a->op == b->op) && (a->root == b->root) ) { @@ -52,9 +52,9 @@ int ompi_coll_libnbc_ireduce(void* sendbuf, void* recvbuf, int count, MPI_Dataty NBC_Handle *handle; ompi_coll_libnbc_request_t **coll_req = (ompi_coll_libnbc_request_t**) request; ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; - + NBC_IN_PLACE(sendbuf, recvbuf, inplace); - + res = NBC_Init_handle(comm, coll_req, libnbc_module); if(res != NBC_OK) { printf("Error in NBC_Init_handle(%i)\n", res); return res; } handle = (*coll_req); @@ -66,13 +66,13 @@ int ompi_coll_libnbc_ireduce(void* sendbuf, void* recvbuf, int count, MPI_Dataty if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } res = MPI_Type_size(datatype, &size); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_size() (%i)\n", res); return res; } - + /* only one node -> copy data */ if((p == 1) && !inplace) { res = NBC_Copy(sendbuf, count, datatype, recvbuf, count, datatype, comm); if (NBC_OK != res) { printf("Error in NBC_Copy() (%i)\n", res); return res; } } - + /* algorithm selection */ if(p > 4 || size*count < 65536) { alg = NBC_RED_BINOMIAL; @@ -117,7 +117,7 @@ int ompi_coll_libnbc_ireduce(void* sendbuf, void* recvbuf, int count, MPI_Dataty break; } if (NBC_OK != res) { printf("Error in Schedule creation() (%i)\n", res); return res; } - + res = NBC_Sched_commit(schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } #ifdef NBC_CACHE_SCHEDULE @@ -141,10 +141,10 @@ int ompi_coll_libnbc_ireduce(void* sendbuf, void* recvbuf, int count, MPI_Dataty schedule=found->schedule; } #endif - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Start() (%i)\n", res); return res; } - + /* tmpbuf is freed with the handle */ return NBC_OK; } @@ -196,19 +196,19 @@ int ompi_coll_libnbc_ireduce_inter(void* sendbuf, void* recvbuf, int count, MPI_ /* binomial reduce * working principle: * - each node gets a virtual rank vrank - * - the 'root' node get vrank 0 + * - the 'root' node get vrank 0 * - node 0 gets the vrank of the 'root' * - all other ranks stay identical (they do not matter) * * Algorithm: * pairwise exchange - * round r: + * round r: * grp = rank % 2^r * if grp == 0: receive from rank + 2^(r-1) if it exists and reduce value * if grp == 1: send to rank - 2^(r-1) and exit function - * + * * do this for R=log_2(p) rounds - * + * */ #define RANK2VRANK(rank, vrank, root) \ { \ @@ -243,11 +243,11 @@ static inline int red_sched_binomial(int rank, int p, int root, void *sendbuf, v /* perform the reduce in my local buffer */ if(firstred) { if(rank == root) { - /* root is the only one who reduces in the receivebuffer + /* root is the only one who reduces in the receivebuffer * take data from sendbuf in first round - save copy */ res = NBC_Sched_op(recvbuf, false, sendbuf, false, 0, true, count, datatype, op, schedule); } else { - /* all others may not have a receive buffer + /* all others may not have a receive buffer * take data from sendbuf in first round - save copy */ res = NBC_Sched_op((char *)redbuf-(unsigned long)handle->tmpbuf, true, sendbuf, false, 0, true, count, datatype, op, schedule); } @@ -286,17 +286,17 @@ static inline int red_sched_binomial(int rank, int p, int root, void *sendbuf, v return NBC_OK; } -/* chain send ... */ +/* chain send ... */ static inline int red_sched_chain(int rank, int p, int root, void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int ext, int size, NBC_Schedule *schedule, NBC_Handle *handle, int fragsize) { int res, vrank, rpeer, speer, numfrag, fragnum, fragcount, thiscount; long offset; - + RANK2VRANK(rank, vrank, root); VRANK2RANK(rpeer, vrank+1, root); VRANK2RANK(speer, vrank-1, root); - + if(count == 0) return NBC_OK; - + numfrag = count*size/fragsize; if((count*size)%fragsize != 0) numfrag++; fragcount = count/numfrag; diff --git a/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c b/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c index fe7f280d825..1fd89a8181f 100644 --- a/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c +++ b/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c @@ -25,13 +25,13 @@ * * Algorithm: * pairwise exchange - * round r: + * round r: * grp = rank % 2^r * if grp == 0: receive from rank + 2^(r-1) if it exists and reduce value * if grp == 1: send to rank - 2^(r-1) and exit function - * + * * do this for R=log_2(p) rounds - * + * */ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcounts, MPI_Datatype datatype, @@ -44,7 +44,7 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun NBC_Handle *handle; ompi_coll_libnbc_request_t **coll_req = (ompi_coll_libnbc_request_t**) request; ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; - + NBC_IN_PLACE(sendbuf, recvbuf, inplace); res = NBC_Init_handle(comm, coll_req, libnbc_module); @@ -72,7 +72,7 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } - + schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); if (NULL == schedule) { printf("Error in malloc()\n"); return NBC_OOR; } @@ -83,7 +83,7 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun count = 0; for(r=0;rtmpbuf = malloc(ext*count*2); if(handle->tmpbuf == NULL) { printf("Error in malloc()\n"); return NBC_OOR; } @@ -128,7 +128,7 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun break; } } - + res = NBC_Sched_barrier(schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_barrier() (%i)\n", res); return res; } @@ -152,13 +152,13 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun } /*NBC_PRINT_SCHED(*schedule);*/ - + res = NBC_Sched_commit(schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Sched_commit() (%i)\n", res); return res; } - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Start() (%i)\n", res); return res; } - + /* tmpbuf is freed with the handle */ return NBC_OK; } diff --git a/ompi/mca/coll/libnbc/nbc_iscan.c b/ompi/mca/coll/libnbc/nbc_iscan.c index c87013a562f..df79448a9df 100644 --- a/ompi/mca/coll/libnbc/nbc_iscan.c +++ b/ompi/mca/coll/libnbc/nbc_iscan.c @@ -16,14 +16,14 @@ /* tree comparison function for schedule cache */ int NBC_Scan_args_compare(NBC_Scan_args *a, NBC_Scan_args *b, void *param) { - if( (a->sendbuf == b->sendbuf) && + if( (a->sendbuf == b->sendbuf) && (a->recvbuf == b->recvbuf) && - (a->count == b->count) && + (a->count == b->count) && (a->datatype == b->datatype) && (a->op == b->op) ) { return 0; } - if( a->sendbuf < b->sendbuf ) { + if( a->sendbuf < b->sendbuf ) { return -1; } return +1; @@ -50,9 +50,9 @@ int ompi_coll_libnbc_iscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype NBC_Handle *handle; ompi_coll_libnbc_request_t **coll_req = (ompi_coll_libnbc_request_t**) request; ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module; - + NBC_IN_PLACE(sendbuf, recvbuf, inplace); - + res = NBC_Init_handle(comm, coll_req, libnbc_module); if(res != NBC_OK) { printf("Error in NBC_Init_handle(%i)\n", res); return res; } handle = (*coll_req); @@ -62,7 +62,7 @@ int ompi_coll_libnbc_iscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_size() (%i)\n", res); return res; } res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } - + handle->tmpbuf = malloc(ext*count); if(handle->tmpbuf == NULL) { printf("Error in malloc()\n"); return NBC_OOR; } @@ -129,10 +129,10 @@ int ompi_coll_libnbc_iscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype schedule=found->schedule; } #endif - + res = NBC_Start(handle, schedule); if (NBC_OK != res) { free(handle->tmpbuf); printf("Error in NBC_Start() (%i)\n", res); return res; } - + /* tmpbuf is freed with the handle */ return NBC_OK; } diff --git a/ompi/mca/coll/portals4/Makefile.am b/ompi/mca/coll/portals4/Makefile.am index 2434bfee741..444ebf237d4 100644 --- a/ompi/mca/coll/portals4/Makefile.am +++ b/ompi/mca/coll/portals4/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2013-2015 Sandia National Laboratories. All rights reserved. # Copyright (c) 2015 Bull SAS. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/coll/portals4/coll_portals4_component.c b/ompi/mca/coll/portals4/coll_portals4_component.c index cb29348ed3c..73eebef24a5 100644 --- a/ompi/mca/coll/portals4/coll_portals4_component.c +++ b/ompi/mca/coll/portals4/coll_portals4_component.c @@ -180,7 +180,7 @@ mca_coll_portals4_component_t mca_coll_portals4_component = { /* Initialization / querying functions */ .collm_init_query = portals4_init_query, .collm_comm_query = portals4_comm_query, - }, + }, }; int diff --git a/ompi/mca/coll/portals4/configure.m4 b/ompi/mca/coll/portals4/configure.m4 index 22b7f12b954..fd2e66cdc7c 100644 --- a/ompi/mca/coll/portals4/configure.m4 +++ b/ompi/mca/coll/portals4/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2013 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -15,7 +15,7 @@ AC_DEFUN([MCA_ompi_coll_portals4_POST_CONFIG], [ AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([PORTALS4])]) ])dnl -# MCA_coll_portals4_CONFIG(action-if-can-compile, +# MCA_coll_portals4_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_coll_portals4_CONFIG],[ diff --git a/ompi/mca/coll/self/Makefile.am b/ompi/mca/coll/self/Makefile.am index cbaddd00b86..a3735ece346 100644 --- a/ompi/mca/coll/self/Makefile.am +++ b/ompi/mca/coll/self/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/ompi/mca/coll/self/coll_self.h b/ompi/mca/coll/self/coll_self.h index 0b9386a1556..9ae2de3ab74 100644 --- a/ompi/mca/coll/self/coll_self.h +++ b/ompi/mca/coll/self/coll_self.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,90 +51,90 @@ mca_coll_self_comm_query(struct ompi_communicator_t *comm, int *priority); int mca_coll_self_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm); -int mca_coll_self_allgather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, +int mca_coll_self_allgather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_allgatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, +int mca_coll_self_allgatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_allreduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_self_allreduce_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_alltoall_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, +int mca_coll_self_alltoall_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t *sdtype, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, +int mca_coll_self_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t *sdtype, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, +int mca_coll_self_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t **sdtypes, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); int mca_coll_self_barrier_intra(struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_bcast_intra(void *buff, int count, +int mca_coll_self_bcast_intra(void *buff, int count, struct ompi_datatype_t *datatype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_exscan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_self_exscan_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_gather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, +int mca_coll_self_gather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_gatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, int root, +int mca_coll_self_gatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_reduce_intra(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_self_reduce_intra(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_reduce_scatter_intra(void *sbuf, void *rbuf, - int *rcounts, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_self_reduce_scatter_intra(void *sbuf, void *rbuf, + int *rcounts, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_scan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_self_scan_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_scatter_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, +int mca_coll_self_scatter_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); -int mca_coll_self_scatterv_intra(void *sbuf, int *scounts, int *disps, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, int root, +int mca_coll_self_scatterv_intra(void *sbuf, int *scounts, int *disps, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); diff --git a/ompi/mca/coll/self/coll_self_allgather.c b/ompi/mca/coll/self/coll_self_allgather.c index 714baee0c55..f967f0a0d8f 100644 --- a/ompi/mca/coll/self/coll_self_allgather.c +++ b/ompi/mca/coll/self/coll_self_allgather.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,9 +30,9 @@ * Accepts: - same as MPI_Allgather() * Returns: - MPI_SUCCESS, or error code */ -int mca_coll_self_allgather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, +int mca_coll_self_allgather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/self/coll_self_allgatherv.c b/ompi/mca/coll/self/coll_self_allgatherv.c index fb1368f1246..4e00e1568da 100644 --- a/ompi/mca/coll/self/coll_self_allgatherv.c +++ b/ompi/mca/coll/self/coll_self_allgatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,17 +30,17 @@ * Accepts: - same as MPI_Allgatherv() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_self_allgatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, +int mca_coll_self_allgatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { if (MPI_IN_PLACE == sbuf) { return MPI_SUCCESS; } else { - int err; + int err; ptrdiff_t lb, extent; err = ompi_datatype_get_extent(rdtype, &lb, &extent); if (OMPI_SUCCESS != err) { diff --git a/ompi/mca/coll/self/coll_self_allreduce.c b/ompi/mca/coll/self/coll_self_allreduce.c index f34d1b95c87..10f20f1cff6 100644 --- a/ompi/mca/coll/self/coll_self_allreduce.c +++ b/ompi/mca/coll/self/coll_self_allreduce.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -31,7 +31,7 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_self_allreduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, + struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) diff --git a/ompi/mca/coll/self/coll_self_alltoall.c b/ompi/mca/coll/self/coll_self_alltoall.c index 226b81ef471..9ee44bf9bdd 100644 --- a/ompi/mca/coll/self/coll_self_alltoall.c +++ b/ompi/mca/coll/self/coll_self_alltoall.c @@ -5,15 +5,15 @@ * 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, + * 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) 2013 FUJITSU LIMITED. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,13 +27,13 @@ /* * alltoall_intra * - * Function: - MPI_Alltoall + * Function: - MPI_Alltoall * Accepts: - same as MPI_Alltoall() * Returns: - MPI_SUCCESS or an MPI error code */ int mca_coll_self_alltoall_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) diff --git a/ompi/mca/coll/self/coll_self_alltoallv.c b/ompi/mca/coll/self/coll_self_alltoallv.c index a02254c225a..e118d699cfa 100644 --- a/ompi/mca/coll/self/coll_self_alltoallv.c +++ b/ompi/mca/coll/self/coll_self_alltoallv.c @@ -5,15 +5,15 @@ * 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, + * 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) 2013 FUJITSU LIMITED. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,11 +35,11 @@ int mca_coll_self_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { - int err; + int err; ptrdiff_t lb, rextent, sextent; if (MPI_IN_PLACE == sbuf) { @@ -54,8 +54,8 @@ mca_coll_self_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - return ompi_datatype_sndrcv(((char *) sbuf) + sdisps[0] * sextent, + return ompi_datatype_sndrcv(((char *) sbuf) + sdisps[0] * sextent, scounts[0], sdtype, - ((char *) rbuf) + rdisps[0] * rextent, + ((char *) rbuf) + rdisps[0] * rextent, rcounts[0], rdtype); } diff --git a/ompi/mca/coll/self/coll_self_alltoallw.c b/ompi/mca/coll/self/coll_self_alltoallw.c index 5053f5f4149..220835b6c73 100644 --- a/ompi/mca/coll/self/coll_self_alltoallw.c +++ b/ompi/mca/coll/self/coll_self_alltoallw.c @@ -5,15 +5,15 @@ * 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, + * 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) 2013 FUJITSU LIMITED. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -32,13 +32,13 @@ * Returns: - MPI_SUCCESS or an MPI error code */ int mca_coll_self_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, + struct ompi_datatype_t **sdtypes, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { - int err; + int err; ptrdiff_t lb, rextent, sextent; if (MPI_IN_PLACE == sbuf) { @@ -54,8 +54,8 @@ int mca_coll_self_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, return OMPI_ERROR; } - return ompi_datatype_sndrcv(((char *) sbuf) + sdisps[0] * sextent, + return ompi_datatype_sndrcv(((char *) sbuf) + sdisps[0] * sextent, scounts[0], sdtypes[0], - ((char *) rbuf) + rdisps[0] * rextent, + ((char *) rbuf) + rdisps[0] * rextent, rcounts[0], rdtypes[0]); } diff --git a/ompi/mca/coll/self/coll_self_barrier.c b/ompi/mca/coll/self/coll_self_barrier.c index d8371713e7a..b4ed5cbdbf3 100644 --- a/ompi/mca/coll/self/coll_self_barrier.c +++ b/ompi/mca/coll/self/coll_self_barrier.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/self/coll_self_bcast.c b/ompi/mca/coll/self/coll_self_bcast.c index 5121f749b23..d6813ee3fc5 100644 --- a/ompi/mca/coll/self/coll_self_bcast.c +++ b/ompi/mca/coll/self/coll_self_bcast.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/self/coll_self_component.c b/ompi/mca/coll/self/coll_self_component.c index 8a7a4b89b9e..2dc66932981 100644 --- a/ompi/mca/coll/self/coll_self_component.c +++ b/ompi/mca/coll/self/coll_self_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/coll/self/coll_self_exscan.c b/ompi/mca/coll/self/coll_self_exscan.c index 353d1490b44..5d3d07c26e3 100644 --- a/ompi/mca/coll/self/coll_self_exscan.c +++ b/ompi/mca/coll/self/coll_self_exscan.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,8 +30,8 @@ * Returns: - MPI_SUCCESS */ int mca_coll_self_exscan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/self/coll_self_gather.c b/ompi/mca/coll/self/coll_self_gather.c index 794ac8fa54d..9b42295481f 100644 --- a/ompi/mca/coll/self/coll_self_gather.c +++ b/ompi/mca/coll/self/coll_self_gather.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -26,14 +26,14 @@ /* * gather_intra * - * Function: - gather + * Function: - gather * Accepts: - same arguments as MPI_Gather() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_self_gather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, +int mca_coll_self_gather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/self/coll_self_gatherv.c b/ompi/mca/coll/self/coll_self_gatherv.c index 795c3ad3c62..95ab6acfded 100644 --- a/ompi/mca/coll/self/coll_self_gatherv.c +++ b/ompi/mca/coll/self/coll_self_gatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,7 +30,7 @@ * Accepts: - same arguments as MPI_Gatherv() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_self_gatherv_intra(void *sbuf, int scount, +int mca_coll_self_gatherv_intra(void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype, int root, @@ -39,15 +39,15 @@ int mca_coll_self_gatherv_intra(void *sbuf, int scount, { if (MPI_IN_PLACE == sbuf) { return MPI_SUCCESS; - } else { - int err; + } else { + int err; ptrdiff_t lb, extent; err = ompi_datatype_get_extent(rdtype, &lb, &extent); if (OMPI_SUCCESS != err) { return OMPI_ERROR; } return ompi_datatype_sndrcv(sbuf, scount, sdtype, - ((char *) rbuf) + disps[0]*extent, + ((char *) rbuf) + disps[0]*extent, rcounts[0], rdtype); } } diff --git a/ompi/mca/coll/self/coll_self_module.c b/ompi/mca/coll/self/coll_self_module.c index cfbead87727..bda707d180f 100644 --- a/ompi/mca/coll/self/coll_self_module.c +++ b/ompi/mca/coll/self/coll_self_module.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -36,7 +36,7 @@ int mca_coll_self_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; } @@ -47,7 +47,7 @@ int mca_coll_self_init_query(bool enable_progress_threads, * priority we want to return. */ mca_coll_base_module_t * -mca_coll_self_comm_query(struct ompi_communicator_t *comm, +mca_coll_self_comm_query(struct ompi_communicator_t *comm, int *priority) { mca_coll_self_module_t *module; diff --git a/ompi/mca/coll/self/coll_self_reduce.c b/ompi/mca/coll/self/coll_self_reduce.c index 5446835b039..96cd0c56ee0 100644 --- a/ompi/mca/coll/self/coll_self_reduce.c +++ b/ompi/mca/coll/self/coll_self_reduce.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -26,12 +26,12 @@ /* * reduce_lin_intra * - * Function: - reduction + * Function: - reduction * Accepts: - same as MPI_Reduce() * Returns: - MPI_SUCCESS or error code */ int mca_coll_self_reduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, + struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) diff --git a/ompi/mca/coll/self/coll_self_reduce_scatter.c b/ompi/mca/coll/self/coll_self_reduce_scatter.c index 2ca8afdf6e0..9787888dbba 100644 --- a/ompi/mca/coll/self/coll_self_reduce_scatter.c +++ b/ompi/mca/coll/self/coll_self_reduce_scatter.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/self/coll_self_scan.c b/ompi/mca/coll/self/coll_self_scan.c index 34a625cce25..a74039c3155 100644 --- a/ompi/mca/coll/self/coll_self_scan.c +++ b/ompi/mca/coll/self/coll_self_scan.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -31,8 +31,8 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_self_scan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/self/coll_self_scatter.c b/ompi/mca/coll/self/coll_self_scatter.c index 74e60220876..89b74848d88 100644 --- a/ompi/mca/coll/self/coll_self_scatter.c +++ b/ompi/mca/coll/self/coll_self_scatter.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,11 +30,11 @@ * Accepts: - same arguments as MPI_Scatter() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_self_scatter_intra(void *sbuf, int scount, +int mca_coll_self_scatter_intra(void *sbuf, int scount, struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, + void *rbuf, int rcount, struct ompi_datatype_t *rdtype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/self/coll_self_scatterv.c b/ompi/mca/coll/self/coll_self_scatterv.c index e817d2f41c2..57726b0ef1d 100644 --- a/ompi/mca/coll/self/coll_self_scatterv.c +++ b/ompi/mca/coll/self/coll_self_scatterv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -40,13 +40,13 @@ int mca_coll_self_scatterv_intra(void *sbuf, int *scounts, if (MPI_IN_PLACE == rbuf) { return MPI_SUCCESS; } else { - int err; + int err; ptrdiff_t lb, extent; err = ompi_datatype_get_extent(sdtype, &lb, &extent); if (OMPI_SUCCESS != err) { return OMPI_ERROR; } - return ompi_datatype_sndrcv(((char *) sbuf) + disps[0]*extent, scounts[0], + return ompi_datatype_sndrcv(((char *) sbuf) + disps[0]*extent, scounts[0], sdtype, rbuf, rcount, rdtype); } } diff --git a/ompi/mca/coll/sm/Makefile.am b/ompi/mca/coll/sm/Makefile.am index c7214f5d2e4..47a6582d16c 100644 --- a/ompi/mca/coll/sm/Makefile.am +++ b/ompi/mca/coll/sm/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/coll/sm/coll_sm.h b/ompi/mca/coll/sm/coll_sm.h index 520875d3eee..eef8159b515 100644 --- a/ompi/mca/coll/sm/coll_sm.h +++ b/ompi/mca/coll/sm/coll_sm.h @@ -1,19 +1,19 @@ -/* +/* * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ @@ -43,13 +43,13 @@ BEGIN_C_DECLS } \ opal_progress(); \ } while (1); \ - exit_label: + exit_label: - /** + /** * Structure to hold the sm coll component. First it holds the * base coll component, and then holds a bunch of * sm-coll-component-specific stuff (e.g., current MCA param - * values). + * values). */ typedef struct mca_coll_sm_component_t { /** Base coll component */ @@ -195,7 +195,7 @@ BEGIN_C_DECLS mca_coll_base_module_t *previous_reduce_module; } mca_coll_sm_module_t; OBJ_CLASS_DECLARATION(mca_coll_sm_module_t); - + /** * Global component instance */ @@ -209,113 +209,113 @@ BEGIN_C_DECLS mca_coll_base_module_t * mca_coll_sm_comm_query(struct ompi_communicator_t *comm, int *priority); - + /* Lazily enable a module (since it involves expensive/slow mmap allocation, etc.) */ int ompi_coll_sm_lazy_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm); - int mca_coll_sm_allgather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void *rbuf, int rcount, - struct ompi_datatype_t *rdtype, + int mca_coll_sm_allgather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void *rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_allgatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, + int mca_coll_sm_allgatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_allreduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_sm_allreduce_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_alltoall_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, + int mca_coll_sm_alltoall_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t *sdtype, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + int mca_coll_sm_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t *sdtype, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, - void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, + int mca_coll_sm_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, + struct ompi_datatype_t **sdtypes, + void *rbuf, int *rcounts, int *rdisps, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); int mca_coll_sm_barrier_intra(struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_bcast_intra(void *buff, int count, + int mca_coll_sm_bcast_intra(void *buff, int count, struct ompi_datatype_t *datatype, - int root, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_bcast_log_intra(void *buff, int count, - struct ompi_datatype_t *datatype, - int root, - struct ompi_communicator_t *comm, + int mca_coll_sm_bcast_log_intra(void *buff, int count, + struct ompi_datatype_t *datatype, + int root, + struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_exscan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, - struct ompi_communicator_t *comm, + int mca_coll_sm_exscan_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, + struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_gather_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, + int mca_coll_sm_gather_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_gatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, int root, + int mca_coll_sm_gatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_reduce_log_intra(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, - int root, + int mca_coll_sm_reduce_log_intra(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, + int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_reduce_scatter_intra(void *sbuf, void *rbuf, - int *rcounts, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_sm_reduce_scatter_intra(void *sbuf, void *rbuf, + int *rcounts, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_scan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + int mca_coll_sm_scan_intra(void *sbuf, void *rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_scatter_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, void *rbuf, - int rcount, struct ompi_datatype_t *rdtype, + int mca_coll_sm_scatter_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, void *rbuf, + int rcount, struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); - int mca_coll_sm_scatterv_intra(void *sbuf, int *scounts, int *disps, - struct ompi_datatype_t *sdtype, - void* rbuf, int rcount, - struct ompi_datatype_t *rdtype, int root, + int mca_coll_sm_scatterv_intra(void *sbuf, int *scounts, int *disps, + struct ompi_datatype_t *sdtype, + void* rbuf, int rcount, + struct ompi_datatype_t *rdtype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); int mca_coll_sm_ft_event(int state); - + /** * Global variables used in the macros (essentially constants, so * these are thread safe) @@ -392,7 +392,7 @@ extern uint32_t mca_coll_sm_one; mca_coll_sm_component.sm_fragment_size)), \ (len)) -/** +/** * Macro to tell children that a segment is ready (normalize * the child's ID based on the shift used to calculate the "me" node * in the tree). Used in fan out opertations. diff --git a/ompi/mca/coll/sm/coll_sm_allgather.c b/ompi/mca/coll/sm/coll_sm_allgather.c index ee29213bc72..e816e0e94e1 100644 --- a/ompi/mca/coll/sm/coll_sm_allgather.c +++ b/ompi/mca/coll/sm/coll_sm_allgather.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/sm/coll_sm_allgatherv.c b/ompi/mca/coll/sm/coll_sm_allgatherv.c index 34a6ef91a51..30e690f0003 100644 --- a/ompi/mca/coll/sm/coll_sm_allgatherv.c +++ b/ompi/mca/coll/sm/coll_sm_allgatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -29,10 +29,10 @@ * Accepts: - same as MPI_Allgatherv() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_sm_allgatherv_intra(void *sbuf, int scount, - struct ompi_datatype_t *sdtype, - void * rbuf, int *rcounts, int *disps, - struct ompi_datatype_t *rdtype, +int mca_coll_sm_allgatherv_intra(void *sbuf, int scount, + struct ompi_datatype_t *sdtype, + void * rbuf, int *rcounts, int *disps, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/sm/coll_sm_allreduce.c b/ompi/mca/coll/sm/coll_sm_allreduce.c index 8c253a411c3..0a49f1c99bc 100644 --- a/ompi/mca/coll/sm/coll_sm_allreduce.c +++ b/ompi/mca/coll/sm/coll_sm_allreduce.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ @@ -32,7 +32,7 @@ * broadcast. It is possible that we'll do something better someday. */ int mca_coll_sm_allreduce_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, + struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) @@ -45,14 +45,14 @@ int mca_coll_sm_allreduce_intra(void *sbuf, void *rbuf, int count, if (MPI_IN_PLACE == sbuf) { int rank = ompi_comm_rank(comm); if (0 == rank) { - ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0, + ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0, comm, module); } else { - ret = mca_coll_sm_reduce_intra(rbuf, NULL, count, dtype, op, 0, + ret = mca_coll_sm_reduce_intra(rbuf, NULL, count, dtype, op, 0, comm, module); } } else { - ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0, + ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0, comm, module); } return (ret == OMPI_SUCCESS) ? diff --git a/ompi/mca/coll/sm/coll_sm_alltoall.c b/ompi/mca/coll/sm/coll_sm_alltoall.c index 2a807cb1e4c..b3a23e0aaa6 100644 --- a/ompi/mca/coll/sm/coll_sm_alltoall.c +++ b/ompi/mca/coll/sm/coll_sm_alltoall.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -25,7 +25,7 @@ /* * alltoall_intra * - * Function: - MPI_Alltoall + * Function: - MPI_Alltoall * Accepts: - same as MPI_Alltoall() * Returns: - MPI_SUCCESS or an MPI error code */ diff --git a/ompi/mca/coll/sm/coll_sm_alltoallv.c b/ompi/mca/coll/sm/coll_sm_alltoallv.c index b28ca4a90f9..9a974f88358 100644 --- a/ompi/mca/coll/sm/coll_sm_alltoallv.c +++ b/ompi/mca/coll/sm/coll_sm_alltoallv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -32,7 +32,7 @@ int mca_coll_sm_alltoallv_intra(void *sbuf, int *scounts, int *sdisps, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t *rdtype, + struct ompi_datatype_t *rdtype, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/sm/coll_sm_alltoallw.c b/ompi/mca/coll/sm/coll_sm_alltoallw.c index 8f8bbdded6c..98d95adbb58 100644 --- a/ompi/mca/coll/sm/coll_sm_alltoallw.c +++ b/ompi/mca/coll/sm/coll_sm_alltoallw.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,9 +30,9 @@ * Returns: - MPI_SUCCESS or an MPI error code */ int mca_coll_sm_alltoallw_intra(void *sbuf, int *scounts, int *sdisps, - struct ompi_datatype_t **sdtypes, + struct ompi_datatype_t **sdtypes, void *rbuf, int *rcounts, int *rdisps, - struct ompi_datatype_t **rdtypes, + struct ompi_datatype_t **rdtypes, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/sm/coll_sm_barrier.c b/ompi/mca/coll/sm/coll_sm_barrier.c index 77aa6cd5c19..a3000b7d847 100644 --- a/ompi/mca/coll/sm/coll_sm_barrier.c +++ b/ompi/mca/coll/sm/coll_sm_barrier.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ @@ -69,7 +69,7 @@ int mca_coll_sm_barrier_intra(struct ompi_communicator_t *comm, } } - uint_control_size = + uint_control_size = mca_coll_sm_component.sm_control_size / sizeof(uint32_t); data = sm_module->sm_comm_data; rank = ompi_comm_rank(comm); @@ -83,7 +83,7 @@ int mca_coll_sm_barrier_intra(struct ompi_communicator_t *comm, if (0 != num_children) { /* Get children *out* buffer */ - children = data->mcb_barrier_control_children + buffer_set + + children = data->mcb_barrier_control_children + buffer_set + uint_control_size; SPIN_CONDITION(*me_in == num_children, exit_label1); *me_in = 0; diff --git a/ompi/mca/coll/sm/coll_sm_bcast.c b/ompi/mca/coll/sm/coll_sm_bcast.c index 1aaa8df6ddc..754581ea160 100644 --- a/ompi/mca/coll/sm/coll_sm_bcast.c +++ b/ompi/mca/coll/sm/coll_sm_bcast.c @@ -5,14 +5,14 @@ * 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, + * 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 */ @@ -53,8 +53,8 @@ * have children, they copy the data directly from the parent's shared * data segment into the user's output buffer. */ -int mca_coll_sm_bcast_intra(void *buff, int count, - struct ompi_datatype_t *datatype, int root, +int mca_coll_sm_bcast_intra(void *buff, int count, + struct ompi_datatype_t *datatype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -107,11 +107,11 @@ int mca_coll_sm_bcast_intra(void *buff, int count, /* The root needs a send convertor to pack from the user's buffer to shared memory */ - if (OMPI_SUCCESS != - (ret = + if (OMPI_SUCCESS != + (ret = opal_convertor_copy_and_prepare_for_send(ompi_mpi_local_convertor, &(datatype->super), - count, + count, buff, 0, &convertor))) { @@ -122,7 +122,7 @@ int mca_coll_sm_bcast_intra(void *buff, int count, /* Main loop over sending fragments */ do { - flag_num = (data->mcb_operation_count++ % + flag_num = (data->mcb_operation_count++ % mca_coll_sm_component.sm_comm_num_in_use_flags); FLAG_SETUP(flag_num, flag, data); @@ -130,10 +130,10 @@ int mca_coll_sm_bcast_intra(void *buff, int count, FLAG_RETAIN(flag, size - 1, data->mcb_operation_count - 1); /* Loop over all the segments in this set */ - - segment_num = + + segment_num = flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag; - max_segment_num = + max_segment_num = (flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag; do { index = &(data->mcb_data_index[segment_num]); @@ -143,10 +143,10 @@ int mca_coll_sm_bcast_intra(void *buff, int count, max_data = mca_coll_sm_component.sm_fragment_size; COPY_FRAGMENT_IN(convertor, index, rank, iov, max_data); bytes += max_data; - + /* Wait for the write to absolutely complete */ opal_atomic_wmb(); - + /* Tell my children that this fragment is ready */ PARENT_NOTIFY_CHILDREN(children, num_children, index, max_data); @@ -165,11 +165,11 @@ int mca_coll_sm_bcast_intra(void *buff, int count, /* Non-root processes need a receive convertor to unpack from shared mmory to the user's buffer */ - if (OMPI_SUCCESS != - (ret = + if (OMPI_SUCCESS != + (ret = opal_convertor_copy_and_prepare_for_recv(ompi_mpi_local_convertor, &(datatype->super), - count, + count, buff, 0, &convertor))) { @@ -179,9 +179,9 @@ int mca_coll_sm_bcast_intra(void *buff, int count, /* Loop over receiving (and possibly re-sending) the fragments */ - + do { - flag_num = (data->mcb_operation_count % + flag_num = (data->mcb_operation_count % mca_coll_sm_component.sm_comm_num_in_use_flags); /* Wait for the root to mark this set of segments as @@ -191,10 +191,10 @@ int mca_coll_sm_bcast_intra(void *buff, int count, ++data->mcb_operation_count; /* Loop over all the segments in this set */ - - segment_num = + + segment_num = flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag; - max_segment_num = + max_segment_num = (flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag; do { @@ -204,20 +204,20 @@ int mca_coll_sm_bcast_intra(void *buff, int count, /* Wait for my parent to tell me that the segment is ready */ CHILD_WAIT_FOR_NOTIFY(rank, index, max_data, bcast_nonroot_label2); - + /* If I have children, send the data to them */ if (num_children > 0) { /* Copy the fragment from the parent's portion in the segment to my portion in the segment. */ COPY_FRAGMENT_BETWEEN(parent_rank, rank, index, max_data); - + /* Wait for the write to absolutely complete */ opal_atomic_wmb(); - + /* Tell my children that this fragment is ready */ PARENT_NOTIFY_CHILDREN(children, num_children, index, max_data); - + /* Set the "copy from buffer" to be my local segment buffer so that we don't potentially incur a non-local memory copy from the parent's @@ -225,15 +225,15 @@ int mca_coll_sm_bcast_intra(void *buff, int count, the user's buffer */ src_rank = rank; } - + /* If I don't have any children, set the "copy from buffer" to be my parent's fan out segment to copy directly from my parent */ - + else { src_rank = parent_rank; } - + /* Copy to my output buffer */ COPY_FRAGMENT_OUT(convertor, src_rank, index, iov, max_data); diff --git a/ompi/mca/coll/sm/coll_sm_component.c b/ompi/mca/coll/sm/coll_sm_component.c index 2c068ed7b9a..d88f42470ce 100644 --- a/ompi/mca/coll/sm/coll_sm_component.c +++ b/ompi/mca/coll/sm/coll_sm_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -62,7 +62,7 @@ mca_coll_sm_component_t mca_coll_sm_component = { { /* First, the mca_component_t struct containing meta information about the component itself */ - + .collm_version = { MCA_COLL_BASE_VERSION_2_0_0, @@ -132,7 +132,7 @@ static int sm_verify_mca_variables(void) mca_coll_sm_component_t *cs = &mca_coll_sm_component; if (0 != (cs->sm_fragment_size % cs->sm_control_size)) { - cs->sm_fragment_size += cs->sm_control_size - + cs->sm_fragment_size += cs->sm_control_size - (cs->sm_fragment_size % cs->sm_control_size); } @@ -144,20 +144,20 @@ static int sm_verify_mca_variables(void) cs->sm_comm_num_segments = cs->sm_comm_num_in_use_flags; } if (0 != (cs->sm_comm_num_segments % cs->sm_comm_num_in_use_flags)) { - cs->sm_comm_num_segments += cs->sm_comm_num_in_use_flags - + cs->sm_comm_num_segments += cs->sm_comm_num_in_use_flags - (cs->sm_comm_num_segments % cs->sm_comm_num_in_use_flags); } - cs->sm_segs_per_inuse_flag = + cs->sm_segs_per_inuse_flag = cs->sm_comm_num_segments / cs->sm_comm_num_in_use_flags; if (cs->sm_tree_degree > cs->sm_control_size) { - opal_show_help("help-mpi-coll-sm.txt", + opal_show_help("help-mpi-coll-sm.txt", "tree-degree-larger-than-control", true, cs->sm_tree_degree, cs->sm_control_size); cs->sm_tree_degree = cs->sm_control_size; } if (cs->sm_tree_degree > 255) { - opal_show_help("help-mpi-coll-sm.txt", + opal_show_help("help-mpi-coll-sm.txt", "tree-degree-larger-than-255", true, cs->sm_tree_degree); cs->sm_tree_degree = 255; diff --git a/ompi/mca/coll/sm/coll_sm_exscan.c b/ompi/mca/coll/sm/coll_sm_exscan.c index c17e1f402d1..69741ba37ce 100644 --- a/ompi/mca/coll/sm/coll_sm_exscan.c +++ b/ompi/mca/coll/sm/coll_sm_exscan.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,8 +30,8 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_sm_exscan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/sm/coll_sm_gather.c b/ompi/mca/coll/sm/coll_sm_gather.c index 61218b50882..bcd20665774 100644 --- a/ompi/mca/coll/sm/coll_sm_gather.c +++ b/ompi/mca/coll/sm/coll_sm_gather.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -22,7 +22,7 @@ #include "coll_sm.h" -/* +/* * gather * * Function: - shared memory gather diff --git a/ompi/mca/coll/sm/coll_sm_gatherv.c b/ompi/mca/coll/sm/coll_sm_gatherv.c index fee7edcbbb8..825017d457a 100644 --- a/ompi/mca/coll/sm/coll_sm_gatherv.c +++ b/ompi/mca/coll/sm/coll_sm_gatherv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -29,7 +29,7 @@ * Accepts: - same arguments as MPI_Gatherb() * Returns: - MPI_SUCCESS or error code */ -int mca_coll_sm_gatherv_intra(void *sbuf, int scount, +int mca_coll_sm_gatherv_intra(void *sbuf, int scount, struct ompi_datatype_t *sdtype, void *rbuf, int *rcounts, int *disps, struct ompi_datatype_t *rdtype, int root, diff --git a/ompi/mca/coll/sm/coll_sm_reduce.c b/ompi/mca/coll/sm/coll_sm_reduce.c index 62ec2f95798..4d0f8668069 100644 --- a/ompi/mca/coll/sm/coll_sm_reduce.c +++ b/ompi/mca/coll/sm/coll_sm_reduce.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,16 +33,16 @@ /* * Local functions */ -static int reduce_inorder(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +static int reduce_inorder(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); #define WANT_REDUCE_NO_ORDER 0 #if WANT_REDUCE_NO_ORDER -static int reduce_no_order(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +static int reduce_no_order(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module); #endif @@ -62,9 +62,9 @@ static inline int min(int a, int b) * * Simply farms out to the associative or non-associative functions. */ -int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -88,25 +88,25 @@ int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, return sm_module->previous_reduce(sbuf, rbuf, count, dtype, op, root, comm, sm_module->previous_reduce_module); - } + } #if WANT_REDUCE_NO_ORDER else { /* Lazily enable the module the first time we invoke a collective on it */ if (!sm_module->enabled) { - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = ompi_coll_sm_lazy_enable(module, comm))) { return ret; } } - + if (!ompi_op_is_intrinsic(op) || (ompi_op_is_intrinsic(op) && !ompi_op_is_float_assoc(op) && 0 != (dtype->flags & OMPI_DATATYPE_FLAG_DATA_FLOAT))) { - return reduce_inorder(sbuf, rbuf, count, dtype, op, + return reduce_inorder(sbuf, rbuf, count, dtype, op, root, comm, module); } else { - return reduce_no_order(sbuf, rbuf, count, dtype, op, + return reduce_no_order(sbuf, rbuf, count, dtype, op, root, comm, module); } } @@ -117,7 +117,7 @@ int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, if (!sm_module->enabled) { int ret; - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = ompi_coll_sm_lazy_enable(module, comm))) { return ret; } @@ -137,7 +137,7 @@ int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, * (result operation 3), etc. * * Root's algorithm: - * + * * If our datatype is "friendly" (i.e., the representation of the * buffer is the same packed as it is unpacked), then the root doesn't * need a temporary buffer -- we can combine the operands directly @@ -152,7 +152,7 @@ int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, * called, we know that the datattype is smaller than the max size of * a fragment, so this is definitely possible) * - * 2. loop over all the processes -- 0 to (comm_size-1). + * 2. loop over all the processes -- 0 to (comm_size-1). * For process 0: * - if the root==0, copy the *entire* buffer (i.e., don't copy * fragment by fragment -- might as well copy the entire thing) the @@ -171,9 +171,9 @@ int mca_coll_sm_reduce_intra(void *sbuf, void* rbuf, int count, */ -static int reduce_inorder(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +static int reduce_inorder(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { @@ -221,7 +221,7 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, /********************************************************************* * Root *********************************************************************/ - + if (root == rank) { opal_convertor_t rtb_convertor, rbuf_convertor; char *reduce_temp_buffer, *free_buffer, *reduce_target; @@ -237,7 +237,7 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, representation is not the same, then we need to get a receive convertor and a temporary buffer to receive into. */ - + if (ompi_datatype_is_contiguous_memory_layout(dtype, count)) { reduce_temp_buffer = free_buffer = NULL; } else { @@ -263,23 +263,23 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, entire user buffer) -- we only need to be able to hold "segment_ddt_count" instances (i.e., the number of instances that can be held in a single fragment) */ - - free_buffer = (char*)malloc(true_extent + + + free_buffer = (char*)malloc(true_extent + (segment_ddt_count - 1) * extent); if (NULL == free_buffer) { return OMPI_ERR_OUT_OF_RESOURCE; } reduce_temp_buffer = free_buffer - true_lb; - + /* Trickery here: we use a potentially smaller count than the user count -- use the largest count that is <= user's count that will fit within a single segment. */ - - if (OMPI_SUCCESS != + + if (OMPI_SUCCESS != (ret = opal_convertor_copy_and_prepare_for_recv( ompi_mpi_local_convertor, &(dtype->super), - segment_ddt_count, + segment_ddt_count, reduce_temp_buffer, 0, &rtb_convertor))) { @@ -289,11 +289,11 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, /* See if we need the rbuf_convertor */ if (size - 1 != rank) { - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = opal_convertor_copy_and_prepare_for_recv( ompi_mpi_local_convertor, &(dtype->super), - count, + count, rbuf, 0, &rbuf_convertor))) { @@ -322,11 +322,11 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, } else { inplace_temp = NULL; } - + /* Main loop over receiving / reducing fragments */ do { - flag_num = (data->mcb_operation_count % + flag_num = (data->mcb_operation_count % mca_coll_sm_component.sm_comm_num_in_use_flags); FLAG_SETUP(flag_num, flag, data); FLAG_WAIT_FOR_IDLE(flag, reduce_root_flag_label); @@ -334,10 +334,10 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, ++data->mcb_operation_count; /* Loop over all the segments in this set */ - - segment_num = + + segment_num = flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag; - max_segment_num = + max_segment_num = (flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag; reduce_target = (((char*) rbuf) + (frag_num * extent * segment_ddt_count)); do { @@ -362,7 +362,7 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, reduce_target, (char*)sbuf); } } - } + } /* Process (size-1) is not the root */ else { @@ -370,19 +370,19 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, like any other non-root process */ index = &(data->mcb_data_index[segment_num]); PARENT_WAIT_FOR_NOTIFY_SPECIFIC(size - 1, rank, index, max_data, reduce_root_parent_label1); - + /* If the datatype is contiguous, just copy it straight to the reduce_target */ if (NULL == free_buffer) { memcpy(reduce_target, ((char*)index->mcbmi_data) + (size - 1) * mca_coll_sm_component.sm_fragment_size, max_data); - } + } /* If the datatype is noncontiguous, use the rbuf_convertor to unpack it straight to the rbuf */ else { max_data = segment_ddt_bytes; - COPY_FRAGMENT_OUT(rbuf_convertor, size - 1, index, + COPY_FRAGMENT_OUT(rbuf_convertor, size - 1, index, iov, max_data); } } @@ -400,7 +400,7 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, copy into shmem -- just reduce directly from my sbuf. */ if (rank == peer) { - ompi_op_reduce(op, + ompi_op_reduce(op, ((char *) sbuf) + frag_num * extent * segment_ddt_count, reduce_target, @@ -413,42 +413,42 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, the segment into shmem. */ else { index = &(data->mcb_data_index[segment_num]); - PARENT_WAIT_FOR_NOTIFY_SPECIFIC(peer, rank, + PARENT_WAIT_FOR_NOTIFY_SPECIFIC(peer, rank, index, max_data, reduce_root_parent_label2); - + /* If we don't need an extra buffer, then do the reduction operation on the fragment straight from the shmem. */ - + if (NULL == free_buffer) { ompi_op_reduce(op, - (index->mcbmi_data + + (index->mcbmi_data + (peer * mca_coll_sm_component.sm_fragment_size)), - reduce_target, + reduce_target, min(count_left, segment_ddt_count), dtype); } - + /* Otherwise, unpack the fragment to the temporary buffer and then do the reduction from there */ - + else { /* Unpack the fragment into my temporary buffer */ max_data = segment_ddt_bytes; - COPY_FRAGMENT_OUT(rtb_convertor, peer, index, + COPY_FRAGMENT_OUT(rtb_convertor, peer, index, iov, max_data); opal_convertor_set_position(&rtb_convertor, &zero); - + /* Do the reduction on this fragment */ ompi_op_reduce(op, reduce_temp_buffer, - reduce_target, + reduce_target, min(count_left, segment_ddt_count), dtype); } } /* whether this process was me or not */ } /* loop over all proceses */ - + /* We've iterated through all the processes -- now we move on to the next segment */ @@ -464,7 +464,7 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, } while (bytes < total_size); /* Kill the convertor, if we had one */ - + if (NULL != free_buffer) { OBJ_DESTRUCT(&rtb_convertor); OBJ_DESTRUCT(&rbuf_convertor); @@ -485,11 +485,11 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, opal_convertor_t sbuf_convertor; OBJ_CONSTRUCT(&sbuf_convertor, opal_convertor_t); - if (OMPI_SUCCESS != - (ret = + if (OMPI_SUCCESS != + (ret = opal_convertor_copy_and_prepare_for_send(ompi_mpi_local_convertor, &(dtype->super), - count, + count, sbuf, 0, &sbuf_convertor))) { @@ -497,9 +497,9 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, } /* Loop over sending fragments to the root */ - + do { - flag_num = (data->mcb_operation_count % + flag_num = (data->mcb_operation_count % mca_coll_sm_component.sm_comm_num_in_use_flags); /* Wait for the root to mark this set of segments as @@ -510,9 +510,9 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, /* Loop over all the segments in this set */ - segment_num = + segment_num = flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag; - max_segment_num = + max_segment_num = (flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag; do { index = &(data->mcb_data_index[segment_num]); @@ -525,7 +525,7 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, /* Wait for the write to absolutely complete */ opal_atomic_wmb(); - + /* Tell my parent (always the reduction root -- we're ignoring the mcb_tree parent/child relationships here) that this fragment is ready */ @@ -556,9 +556,9 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count, * This function performs the reduction in whatever order the operands * arrive. */ -static int reduce_no_order(void *sbuf, void* rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, +static int reduce_no_order(void *sbuf, void* rbuf, int count, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/sm/coll_sm_reduce_scatter.c b/ompi/mca/coll/sm/coll_sm_reduce_scatter.c index d05c8c9bab7..6d4d4de7727 100644 --- a/ompi/mca/coll/sm/coll_sm_reduce_scatter.c +++ b/ompi/mca/coll/sm/coll_sm_reduce_scatter.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/sm/coll_sm_scan.c b/ompi/mca/coll/sm/coll_sm_scan.c index 1e42ba419fd..4175d820d31 100644 --- a/ompi/mca/coll/sm/coll_sm_scan.c +++ b/ompi/mca/coll/sm/coll_sm_scan.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,8 +30,8 @@ * Returns: - MPI_SUCCESS or error code */ int mca_coll_sm_scan_intra(void *sbuf, void *rbuf, int count, - struct ompi_datatype_t *dtype, - struct ompi_op_t *op, + struct ompi_datatype_t *dtype, + struct ompi_op_t *op, struct ompi_communicator_t *comm, mca_coll_base_module_t *module) { diff --git a/ompi/mca/coll/sm/coll_sm_scatter.c b/ompi/mca/coll/sm/coll_sm_scatter.c index d14a9c60f60..d34f7359e5e 100644 --- a/ompi/mca/coll/sm/coll_sm_scatter.c +++ b/ompi/mca/coll/sm/coll_sm_scatter.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -22,7 +22,7 @@ #include "coll_sm.h" -/* +/* * scatter * * Function: - shared memory reduce diff --git a/ompi/mca/coll/sm/coll_sm_scatterv.c b/ompi/mca/coll/sm/coll_sm_scatterv.c index 8519d390cd1..32be95fb4ad 100644 --- a/ompi/mca/coll/sm/coll_sm_scatterv.c +++ b/ompi/mca/coll/sm/coll_sm_scatterv.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/sm/help-mpi-coll-sm.txt b/ompi/mca/coll/sm/help-mpi-coll-sm.txt index 67eb939f030..ce42bb65dfb 100644 --- a/ompi/mca/coll/sm/help-mpi-coll-sm.txt +++ b/ompi/mca/coll/sm/help-mpi-coll-sm.txt @@ -6,14 +6,14 @@ # 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, +# 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$ # # This is the US/English general help file for Open MPI's Shared memory diff --git a/ompi/mca/coll/tuned/Makefile.am b/ompi/mca/coll/tuned/Makefile.am index f183f37a878..cc426671c5d 100644 --- a/ompi/mca/coll/tuned/Makefile.am +++ b/ompi/mca/coll/tuned/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2015 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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$ # diff --git a/ompi/mca/coll/tuned/coll_tuned.h b/ompi/mca/coll/tuned/coll_tuned.h index 51edda0421d..25f17a3f7e9 100644 --- a/ompi/mca/coll/tuned/coll_tuned.h +++ b/ompi/mca/coll/tuned/coll_tuned.h @@ -4,9 +4,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,9 +81,9 @@ ompi_coll_tuned_comm_query(struct ompi_communicator_t *comm, int *priority); /* API functions of decision functions and any implementations */ /* - * Note this gets long as we have to have a prototype for each + * Note this gets long as we have to have a prototype for each * MPI collective 4 times.. 2 for the comm type and 2 for each decision - * type. + * type. * we might cut down the decision prototypes by conditional compiling */ @@ -221,16 +221,16 @@ int ompi_coll_tuned_scatterv_inter_dec_dynamic(SCATTERV_ARGS); int mca_coll_tuned_ft_event(int state); struct mca_coll_tuned_component_t { - /** Base coll component */ + /** Base coll component */ mca_coll_base_component_2_0_0_t super; - + /** MCA parameter: Priority of this component */ int tuned_priority; - + /** global stuff that I need the component to store */ - + /* MCA parameters first */ - + /* cached decision table stuff (moved from MCW module) */ ompi_coll_alg_rule_t *all_base_rules; }; diff --git a/ompi/mca/coll/tuned/coll_tuned_component.c b/ompi/mca/coll/tuned/coll_tuned_component.c index 409e65c0b97..9756359ed6c 100644 --- a/ompi/mca/coll/tuned/coll_tuned_component.c +++ b/ompi/mca/coll/tuned/coll_tuned_component.c @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -77,7 +77,7 @@ static int tuned_close(void); mca_coll_tuned_component_t mca_coll_tuned_component = { /* First, fill in the super */ - { + { /* First, the mca_component_t struct containing meta information about the component itself */ .collm_version = { @@ -108,13 +108,13 @@ mca_coll_tuned_component_t mca_coll_tuned_component = { 0, /* Tuned component specific information */ - NULL /* ompi_coll_alg_rule_t ptr */ + NULL /* ompi_coll_alg_rule_t ptr */ }; static int tuned_register(void) { - /* Use a low priority, but allow other components to be lower */ + /* Use a low priority, but allow other components to be lower */ ompi_coll_tuned_priority = 30; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "priority", "Priority of the tuned coll component", @@ -218,13 +218,13 @@ static int tuned_open(void) /* this is useful for benchmarking and user knows best tuning */ /* as this is the component we only lookup the indicies of the mca params */ /* the actual values are looked up during comm create via module init */ - + /* intra functions first */ /* if dynamic rules allowed then look up dynamic rules config filename, else we leave it an empty filename (NULL) */ /* by default DISABLE dynamic rules and instead use fixed [if based] rules */ if (ompi_coll_tuned_use_dynamic_rules) { if( ompi_coll_tuned_dynamic_rules_filename ) { - OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:component_open Reading collective rules file [%s]", + OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:component_open Reading collective rules file [%s]", ompi_coll_tuned_dynamic_rules_filename)); rc = ompi_coll_tuned_read_rules_config_file( ompi_coll_tuned_dynamic_rules_filename, &(mca_coll_tuned_component.all_base_rules), COLLCOUNT); @@ -265,7 +265,7 @@ static void mca_coll_tuned_module_construct(mca_coll_tuned_module_t *module) { mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module; - + for( int i = 0; i < COLLCOUNT; i++ ) { tuned_module->user_forced[i].algorithm = 0; tuned_module->com_rules[i] = NULL; diff --git a/ompi/mca/coll/tuned/coll_tuned_dynamic_file.h b/ompi/mca/coll/tuned/coll_tuned_dynamic_file.h index 597321c325b..595e436fa49 100644 --- a/ompi/mca/coll/tuned/coll_tuned_dynamic_file.h +++ b/ompi/mca/coll/tuned/coll_tuned_dynamic_file.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/coll/tuned/coll_tuned_dynamic_rules.h b/ompi/mca/coll/tuned/coll_tuned_dynamic_rules.h index d319e70adc0..7e8f672d21d 100644 --- a/ompi/mca/coll/tuned/coll_tuned_dynamic_rules.h +++ b/ompi/mca/coll/tuned/coll_tuned_dynamic_rules.h @@ -6,15 +6,15 @@ * 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, + * 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 FUJITSU LIMITED. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,7 +41,7 @@ typedef struct msg_rule_s { /* RESULT */ int result_alg; /* result algorithm to use */ int result_topo_faninout; /* result topology fan in/out to use (if applicable) */ - long result_segsize; /* result segment size to use */ + long result_segsize; /* result segment size to use */ int result_max_requests; /* maximum number of outstanding requests (if applicable) */ } ompi_coll_msg_rule_t; @@ -94,8 +94,8 @@ int ompi_coll_tuned_free_all_rules (ompi_coll_alg_rule_t* alg_p, int n_algs); ompi_coll_com_rule_t* ompi_coll_tuned_get_com_rule_ptr (ompi_coll_alg_rule_t* rules, int alg_id, int mpi_comsize); -int ompi_coll_tuned_get_target_method_params (ompi_coll_com_rule_t* base_com_rule, size_t mpi_msgsize, - int* result_topo_faninout, int* result_segsize, +int ompi_coll_tuned_get_target_method_params (ompi_coll_com_rule_t* base_com_rule, size_t mpi_msgsize, + int* result_topo_faninout, int* result_segsize, int* max_requests); diff --git a/ompi/mca/common/Makefile.am b/ompi/mca/common/Makefile.am index 33bbb5f2a33..4567c654307 100644 --- a/ompi/mca/common/Makefile.am +++ b/ompi/mca/common/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/crcp/Makefile.am b/ompi/mca/crcp/Makefile.am index a4d26e758d8..dbe280decef 100644 --- a/ompi/mca/crcp/Makefile.am +++ b/ompi/mca/crcp/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/crcp/base/Makefile.am b/ompi/mca/crcp/base/Makefile.am index 00f371c3019..b356e1da9ab 100644 --- a/ompi/mca/crcp/base/Makefile.am +++ b/ompi/mca/crcp/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/crcp/base/base.h b/ompi/mca/crcp/base/base.h index 3372c002193..e4f56b7aa45 100644 --- a/ompi/mca/crcp/base/base.h +++ b/ompi/mca/crcp/base/base.h @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPI_CRCP_BASE_H @@ -40,7 +40,7 @@ BEGIN_C_DECLS * */ OMPI_DECLSPEC int ompi_crcp_base_select(void); - + /** * Quiesce Interface (For MPI Ext.) */ @@ -73,33 +73,33 @@ BEGIN_C_DECLS ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_del_procs( struct ompi_proc_t **procs, size_t nprocs, ompi_crcp_base_pml_state_t* ); ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_progress(ompi_crcp_base_pml_state_t*); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_iprobe(int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status, ompi_crcp_base_pml_state_t* ); ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_probe( int dst, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status, ompi_crcp_base_pml_state_t* ); - - ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_isend_init( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, + + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_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, ompi_crcp_base_pml_state_t* ); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_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, ompi_crcp_base_pml_state_t* ); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_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, ompi_crcp_base_pml_state_t* ); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_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, ompi_crcp_base_pml_state_t*); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_irecv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request, ompi_crcp_base_pml_state_t* ); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_recv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status, ompi_crcp_base_pml_state_t*); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_dump( struct ompi_communicator_t* comm, int verbose, ompi_crcp_base_pml_state_t* ); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_start( size_t count, ompi_request_t** requests, ompi_crcp_base_pml_state_t* ); - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_ft_event(int state, ompi_crcp_base_pml_state_t*); /* Request Interface */ @@ -120,7 +120,7 @@ BEGIN_C_DECLS struct ompi_proc_t** procs, struct mca_btl_base_endpoint_t**, ompi_crcp_base_btl_state_t*); - + ompi_crcp_base_btl_state_t* ompi_crcp_base_none_btl_register( struct mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, diff --git a/ompi/mca/crcp/base/crcp_base_fns.c b/ompi/mca/crcp/base/crcp_base_fns.c index 46f963049f3..06c6b9f04d4 100644 --- a/ompi/mca/crcp/base/crcp_base_fns.c +++ b/ompi/mca/crcp/base/crcp_base_fns.c @@ -4,16 +4,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -153,7 +153,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_progress(ompi_crcp_base_pml_ pml_state->error_code = OMPI_SUCCESS; return pml_state; } - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_iprobe(int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status, @@ -174,7 +174,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_probe( int dst, int tag, ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_isend_init( void *buf, size_t count, ompi_datatype_t *datatype, - int dst, int tag, + int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request, @@ -247,7 +247,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_dump( struct ompi_communicat pml_state->error_code = OMPI_SUCCESS; return pml_state; } - + ompi_crcp_base_pml_state_t* ompi_crcp_base_none_pml_start( size_t count, ompi_request_t** requests, ompi_crcp_base_pml_state_t* pml_state ) diff --git a/ompi/mca/crcp/base/crcp_base_frame.c b/ompi/mca/crcp/base/crcp_base_frame.c index 87cc386424e..dabddbdef1c 100644 --- a/ompi/mca/crcp/base/crcp_base_frame.c +++ b/ompi/mca/crcp/base/crcp_base_frame.c @@ -3,16 +3,16 @@ * 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, + * 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) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/crcp/base/crcp_base_select.c b/ompi/mca/crcp/base/crcp_base_select.c index 0dc7d3b230c..e6b71a4562b 100644 --- a/ompi/mca/crcp/base/crcp_base_select.c +++ b/ompi/mca/crcp/base/crcp_base_select.c @@ -4,16 +4,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ static ompi_crcp_base_component_t none_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itself */ { @@ -39,7 +39,7 @@ static ompi_crcp_base_component_t none_component = { OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, OMPI_RELEASE_VERSION, - + /* Component open and close functions */ ompi_crcp_base_none_open, ompi_crcp_base_none_close, @@ -76,20 +76,20 @@ static ompi_crcp_base_module_t none_module = { ompi_crcp_base_none_pml_add_procs, ompi_crcp_base_none_pml_del_procs, - + ompi_crcp_base_none_pml_progress, ompi_crcp_base_none_pml_iprobe, ompi_crcp_base_none_pml_probe, - + ompi_crcp_base_none_pml_isend_init, ompi_crcp_base_none_pml_isend, ompi_crcp_base_none_pml_send, - + ompi_crcp_base_none_pml_irecv_init, ompi_crcp_base_none_pml_irecv, ompi_crcp_base_none_pml_recv, - + ompi_crcp_base_none_pml_dump, ompi_crcp_base_none_pml_start, ompi_crcp_base_none_pml_ft_event, @@ -115,7 +115,7 @@ static ompi_crcp_base_module_t none_module = { ompi_crcp_base_none_btl_get, ompi_crcp_base_none_btl_dump, - ompi_crcp_base_none_btl_ft_event + ompi_crcp_base_none_btl_ft_event }; int ompi_crcp_base_select(void) @@ -143,7 +143,7 @@ int ompi_crcp_base_select(void) include_list = selection_value[0]; } - if(0 == strncmp(include_list, "none", strlen("none")) ){ + if(0 == strncmp(include_list, "none", strlen("none")) ){ opal_output_verbose(10, ompi_crcp_base_framework.framework_output, "crcp:select: Using %s component", include_list); diff --git a/ompi/mca/crcp/bkmrk/Makefile.am b/ompi/mca/crcp/bkmrk/Makefile.am index 511b2cbd290..e1a72081a43 100644 --- a/ompi/mca/crcp/bkmrk/Makefile.am +++ b/ompi/mca/crcp/bkmrk/Makefile.am @@ -3,15 +3,15 @@ # 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, +# 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-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/crcp/bkmrk/configure.m4 b/ompi/mca/crcp/bkmrk/configure.m4 index b148ad2cc6b..264f052da01 100644 --- a/ompi/mca/crcp/bkmrk/configure.m4 +++ b/ompi/mca/crcp/bkmrk/configure.m4 @@ -4,15 +4,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk.h b/ompi/mca/crcp/bkmrk/crcp_bkmrk.h index 6c78c44d2c4..0967892f55e 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk.h +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk.h @@ -3,20 +3,20 @@ * 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, + * 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 - * + * * Hoke CRCP component * */ diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.c b/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.c index 2728ce84b39..0641657989f 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.c +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.c @@ -3,14 +3,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.h b/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.h index 792df28f338..80faa2e49c0 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.h +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.h @@ -3,20 +3,20 @@ * 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, + * 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 - * + * * Hoke CRCP component * */ @@ -50,7 +50,7 @@ BEGIN_C_DECLS struct ompi_proc_t** procs, struct mca_btl_base_endpoint_t**, ompi_crcp_base_btl_state_t*); - + ompi_crcp_base_btl_state_t* ompi_crcp_base_coord_btl_register ( struct mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_component.c b/ompi/mca/crcp/bkmrk/crcp_bkmrk_component.c index a3a619d8201..43eabc0448e 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_component.c +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_component.c @@ -4,16 +4,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ /* * Public string for version number */ -const char *ompi_crcp_bkmrk_component_version_string = +const char *ompi_crcp_bkmrk_component_version_string = "OMPI CRCP bkmrk MCA component version " OMPI_VERSION; bool timing_enabled; @@ -47,7 +47,7 @@ static int crcp_bkmrk_close(void); ompi_crcp_bkmrk_component_t mca_crcp_bkmrk_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component */ .base_version = { @@ -110,7 +110,7 @@ static int crcp_bkmrk_register(void) } static int crcp_bkmrk_open(void) -{ +{ /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ @@ -128,10 +128,10 @@ static int crcp_bkmrk_open(void) opal_output_verbose(10, mca_crcp_bkmrk_component.super.output_handle, "crcp:bkmrk: open()"); opal_output_verbose(20, mca_crcp_bkmrk_component.super.output_handle, - "crcp:bkmrk: open: priority = %d", + "crcp:bkmrk: open: priority = %d", mca_crcp_bkmrk_component.super.priority); opal_output_verbose(20, mca_crcp_bkmrk_component.super.output_handle, - "crcp:bkmrk: open: verbosity = %d", + "crcp:bkmrk: open: verbosity = %d", mca_crcp_bkmrk_component.super.verbose); return OMPI_SUCCESS; diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_module.c b/ompi/mca/crcp/bkmrk/crcp_bkmrk_module.c index bffcc618c82..2c56d3f5772 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_module.c +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_module.c @@ -3,14 +3,14 @@ * All rights reserved. * Copyright (c) 2004-2011 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c b/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c index fb2430c0873..5484076e0fa 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c @@ -9,9 +9,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -130,16 +130,16 @@ static int ompi_crcp_bkmrk_pml_start_isend_init(ompi_request_t **request); static int ompi_crcp_bkmrk_pml_start_irecv_init(ompi_request_t **request); static int ompi_crcp_bkmrk_pml_start_drain_irecv_init(ompi_request_t **request, bool *found_drain); -static int ompi_crcp_bkmrk_request_complete_isend_init(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_isend_init(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size); -static int ompi_crcp_bkmrk_request_complete_isend(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_isend(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size); -static int ompi_crcp_bkmrk_request_complete_irecv_init(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_irecv_init(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size); -static int ompi_crcp_bkmrk_request_complete_irecv(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_irecv(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size); @@ -287,7 +287,7 @@ static int drain_message_copy_remove(ompi_crcp_bkmrk_pml_drain_message_ref_t *ms ompi_crcp_bkmrk_pml_message_content_ref_t * content_ref, int *src, int *tag, struct ompi_request_t **request, - ompi_status_public_t **status, + ompi_status_public_t **status, ompi_datatype_t *datatype, int count, void **buf, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref); @@ -352,7 +352,7 @@ static void recv_bookmarks_cbfunc(int status, static int total_recv_bookmarks = 0; /* - * Now that we have all the bookmarks, check them to see if we need to + * Now that we have all the bookmarks, check them to see if we need to * drain any messages. */ static int ft_event_check_bookmarks(void); @@ -500,7 +500,7 @@ static int wait_quiesce_drain_ack(void); * 1 : Summary only * 2 : Per Peer messages + Barrier * 3 : Messages from all procs - * + * ************************************/ #define CRCP_TIMER_TOTAL_CKPT 0 #define CRCP_TIMER_CKPT_EX_B 1 @@ -723,7 +723,7 @@ void ompi_crcp_bkmrk_pml_peer_ref_destruct( ompi_crcp_bkmrk_pml_peer_ref_t *peer peer_ref->proc_name.jobid = ORTE_JOBID_INVALID; peer_ref->proc_name.vpid = ORTE_VPID_INVALID; - + while( NULL != (item = opal_list_remove_first(&peer_ref->send_list)) ) { HOKE_TRAFFIC_MSG_REF_RETURN(item); } @@ -1250,10 +1250,10 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_progress( /**************** Probe *****************/ /* JJH - Code reuse: Combine iprobe and probe logic */ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_iprobe( - int dst, int tag, - struct ompi_communicator_t* comm, + int dst, int tag, + struct ompi_communicator_t* comm, int *matched, - ompi_status_public_t* status, + ompi_status_public_t* status, ompi_crcp_base_pml_state_t* pml_state ) { ompi_crcp_bkmrk_pml_drain_message_ref_t *drain_msg_ref = NULL; @@ -1294,7 +1294,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_iprobe( /* Copy the status information */ if( MPI_STATUS_IGNORE != status ) { - memcpy(status, &content_ref->status, sizeof(ompi_status_public_t)); + memcpy(status, &content_ref->status, sizeof(ompi_status_public_t)); } /* Mark as complete */ @@ -1320,9 +1320,9 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_iprobe( } ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_probe( - int dst, int tag, - struct ompi_communicator_t* comm, - ompi_status_public_t* status, + int dst, int tag, + struct ompi_communicator_t* comm, + ompi_status_public_t* status, ompi_crcp_base_pml_state_t* pml_state ) { ompi_crcp_bkmrk_pml_drain_message_ref_t *drain_msg_ref = NULL; @@ -1362,7 +1362,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_probe( /* Copy the status information */ if( MPI_STATUS_IGNORE != status ) { - memcpy(status, &content_ref->status, sizeof(ompi_status_public_t)); + memcpy(status, &content_ref->status, sizeof(ompi_status_public_t)); } /* This will identify to the wrapper that this message is complete */ @@ -1380,7 +1380,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_probe( /**************** Dump *****************/ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_dump( struct ompi_communicator_t* comm, - int verbose, + int verbose, ompi_crcp_base_pml_state_t* pml_state ) { OPAL_OUTPUT_VERBOSE((30, mca_crcp_bkmrk_component.super.output_handle, @@ -1393,7 +1393,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_dump( /**************** Communicator *****************/ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_add_comm( - struct ompi_communicator_t* comm, + struct ompi_communicator_t* comm, ompi_crcp_base_pml_state_t* pml_state ) { /* Note: This function is not used. Set to NULL in crcp_bkmrk_module.c */ @@ -1406,7 +1406,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_add_comm( } ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_del_comm( - struct ompi_communicator_t* comm, + struct ompi_communicator_t* comm, ompi_crcp_base_pml_state_t* pml_state ) { /* Note: This function is not used. Set to NULL in crcp_bkmrk_module.c */ @@ -1421,7 +1421,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_del_comm( /**************** Processes *****************/ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_add_procs( struct ompi_proc_t **procs, - size_t nprocs, + size_t nprocs, ompi_crcp_base_pml_state_t* pml_state ) { ompi_crcp_bkmrk_pml_peer_ref_t *new_peer_ref; @@ -1459,7 +1459,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_add_procs( ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_del_procs( struct ompi_proc_t **procs, - size_t nprocs, + size_t nprocs, ompi_crcp_base_pml_state_t* pml_state ) { opal_list_item_t *item = NULL; @@ -1499,10 +1499,10 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_del_procs( ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_isend_init( void *buf, size_t count, ompi_datatype_t *datatype, - int dst, int tag, + int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, - struct ompi_request_t **request, + struct ompi_request_t **request, ompi_crcp_base_pml_state_t* pml_state ) { ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref = NULL; @@ -1639,7 +1639,7 @@ static int ompi_crcp_bkmrk_pml_start_isend_init(ompi_request_t **request) return exit_status; } -static int ompi_crcp_bkmrk_request_complete_isend_init(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_isend_init(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size) { @@ -1667,7 +1667,7 @@ static int ompi_crcp_bkmrk_request_complete_isend_init(struct ompi_request_t *re if( NULL == msg_ref ) { /* - * It is possible that we did not 'find' the message because + * It is possible that we did not 'find' the message because * we could have previously marked it as done. Due to the * logic in the Request Wait/Test routines we could * receive multiple request complete calls for the @@ -1715,7 +1715,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_isend( int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, - struct ompi_request_t **request, + struct ompi_request_t **request, ompi_crcp_base_pml_state_t* pml_state ) { ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref = NULL; @@ -1796,7 +1796,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_isend( return pml_state; } -static int ompi_crcp_bkmrk_request_complete_isend(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_isend(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size) { @@ -1824,7 +1824,7 @@ static int ompi_crcp_bkmrk_request_complete_isend(struct ompi_request_t *request if( NULL == msg_ref ) { /* - * It is possible that we did not 'find' the message because + * It is possible that we did not 'find' the message because * we could have previously marked it as done. Due to the * logic in the Request Wait/Test routines we could * receive multiple request complete calls for the @@ -1873,7 +1873,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_send( ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, - struct ompi_communicator_t* comm, + struct ompi_communicator_t* comm, ompi_crcp_base_pml_state_t* pml_state ) { ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref = NULL; @@ -1957,7 +1957,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_irecv_init( ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, - struct ompi_request_t **request, + struct ompi_request_t **request, ompi_crcp_base_pml_state_t* pml_state) { ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref = NULL; @@ -2082,7 +2082,7 @@ static int ompi_crcp_bkmrk_pml_start_drain_irecv_init(ompi_request_t **request, exit_status = ret; goto DONE; } - + if( OMPI_SUCCESS != (ret = traffic_message_find(&(peer_ref->recv_init_list), breq->req_count, breq->req_tag, @@ -2262,7 +2262,7 @@ static int ompi_crcp_bkmrk_pml_start_irecv_init(ompi_request_t **request) return exit_status; } -static int ompi_crcp_bkmrk_request_complete_irecv_init(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_irecv_init(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size) { @@ -2326,7 +2326,7 @@ static int ompi_crcp_bkmrk_request_complete_irecv_init(struct ompi_request_t *re */ if( NULL == msg_ref ) { /* - * It is possible that we did not 'find' the message because + * It is possible that we did not 'find' the message because * we could have previously marked it as done. Due to the * logic in the Request Wait/Test routines we could * receive multiple request complete calls for the @@ -2481,7 +2481,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_irecv( EXTRACT_COORD_STATE(pml_state, coord_state, rtn_state, peer_ref, msg_ref); - /* + /* * Do the update */ HOKE_CONTENT_REF_ALLOC(new_content); @@ -2507,7 +2507,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_irecv( return pml_state; } -static int ompi_crcp_bkmrk_request_complete_irecv(struct ompi_request_t *request, +static int ompi_crcp_bkmrk_request_complete_irecv(struct ompi_request_t *request, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, int src, int tag, int tmp_ddt_size) { @@ -2571,7 +2571,7 @@ static int ompi_crcp_bkmrk_request_complete_irecv(struct ompi_request_t *request */ if( NULL == msg_ref ) { /* - * It is possible that we did not 'find' the message because + * It is possible that we did not 'find' the message because * we could have previously marked it as done. Due to the * logic in the Request Wait/Test routines we could * receive multiple request complete calls for the @@ -2624,7 +2624,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_recv( ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, - ompi_status_public_t* status, + ompi_status_public_t* status, ompi_crcp_base_pml_state_t* pml_state) { ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref = NULL; @@ -2742,7 +2742,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_recv( new_msg_ref->done++; new_msg_ref->active--; } else { - /* + /* * Do the update */ msg_ref->done++; @@ -2842,7 +2842,7 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_start( if (breq->req_type == MCA_PML_REQUEST_RECV) { /* * If this was a drained message it will have it's type set to - * OMPI_REQUEST_NOOP so the PML does not try to start it again. + * OMPI_REQUEST_NOOP so the PML does not try to start it again. * So we need to replace it with the original type, but can * skip starting it. */ @@ -3000,7 +3000,7 @@ int ompi_crcp_bkmrk_pml_quiesce_end(ompi_crcp_bkmrk_pml_quiesce_tag_type_t tag ) } ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_ft_event( - int state, + int state, ompi_crcp_base_pml_state_t* pml_state) { static int step_to_return_to = 0; @@ -3735,7 +3735,7 @@ static int traffic_message_find(opal_list_t * search_list, } if(msg_ref->count == count && - (NULL != msg_ref->comm && msg_ref->comm->c_contextid == comm_id) && + (NULL != msg_ref->comm && msg_ref->comm->c_contextid == comm_id) && (msg_ref->tag == MPI_ANY_TAG || msg_ref->tag == tag) && (peer == INVALID_INT || msg_ref->rank == peer) && msg_ref->ddt_size == ddt_size) { @@ -3911,7 +3911,7 @@ static int drain_message_find_any(size_t count, int tag, int peer, if( comm->c_local_group->grp_proc_count <= peer ) { continue; } - + if( OPAL_EQUAL != ompi_rte_compare_name_fields(OMPI_RTE_CMP_ALL, &(cur_peer_ref->proc_name), OMPI_CAST_RTE_NAME(&comm->c_local_group->grp_proc_pointers[peer]->super.proc_name))) { @@ -3953,7 +3953,7 @@ static int drain_message_find(opal_list_t * search_list, if( 0 >= opal_list_get_size(search_list) ) { return OMPI_SUCCESS; } - + for(item = opal_list_get_first(search_list); item != opal_list_get_end(search_list); item = opal_list_get_next(item) ) { @@ -3979,7 +3979,7 @@ static int drain_message_find(opal_list_t * search_list, /* If a specific rank was requested, then make sure this messages matches */ if( INVALID_INT != peer ) { - if( MPI_ANY_SOURCE != peer && + if( MPI_ANY_SOURCE != peer && drain_msg->rank != peer) { continue; } @@ -3989,7 +3989,7 @@ static int drain_message_find(opal_list_t * search_list, if( ddt_size != PROBE_ANY_SIZE && count != PROBE_ANY_COUNT) { /* Check the datatype size and count to make sure it matches */ - if((drain_msg->count ) != count || + if((drain_msg->count ) != count || (drain_msg->ddt_size) != ddt_size) { continue; } @@ -4059,7 +4059,7 @@ static int drain_message_copy_remove_persistent(ompi_crcp_bkmrk_pml_drain_messag /* These two requests should be exactly the same, so this is redundant, but here for completeness */ content_ref->request = request; - memcpy(&(content_ref->status), &drain_content_ref->status, sizeof(ompi_status_public_t)); + memcpy(&(content_ref->status), &drain_content_ref->status, sizeof(ompi_status_public_t)); if( 0 != (ret = ompi_datatype_copy_content_same_ddt(drain_msg_ref->datatype, drain_msg_ref->count, @@ -4082,7 +4082,7 @@ static int drain_message_copy_remove(ompi_crcp_bkmrk_pml_drain_message_ref_t *dr ompi_crcp_bkmrk_pml_message_content_ref_t * drain_content_ref, int *src, int *tag, struct ompi_request_t **request, - ompi_status_public_t **status, + ompi_status_public_t **status, ompi_datatype_t *datatype, int count, void **buf, ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref) { @@ -4102,7 +4102,7 @@ static int drain_message_copy_remove(ompi_crcp_bkmrk_pml_drain_message_ref_t *dr } if( NULL != status && MPI_STATUS_IGNORE != *status ) { - memcpy(*status, &drain_content_ref->status, sizeof(ompi_status_public_t)); + memcpy(*status, &drain_content_ref->status, sizeof(ompi_status_public_t)); } /* The buffer could be NULL - More likely when doing a count=0 type of message (e.g., Barrier) */ @@ -4177,7 +4177,7 @@ static int ft_event_coordinate_peers(void) static int step_to_return_to = 0; int exit_status = OMPI_SUCCESS; int ret; - + if( step_to_return_to == 1 ) { goto STEP_1; } @@ -4196,7 +4196,7 @@ static int ft_event_coordinate_peers(void) END_TIMER(CRCP_TIMER_CKPT_EX_B); /* - * Check exchanged bookmarks + * Check exchanged bookmarks */ START_TIMER(CRCP_TIMER_CKPT_CHECK_B); if( OMPI_SUCCESS != (ret = ft_event_check_bookmarks() ) ) { @@ -4235,7 +4235,7 @@ static int ft_event_coordinate_peers(void) */ /* * If we know that we are in the middle of a blocking send then we - * need to stall the coordination algorithm while we wait for this to + * need to stall the coordination algorithm while we wait for this to * complete. */ if( 0 < current_msg_id && @@ -4416,12 +4416,12 @@ static int ft_event_exchange_bookmarks(void) int my_idx = OMPI_PROC_MY_NAME->vpid; int iter = 0; int num_peers = 0; - + num_peers = opal_list_get_size(&ompi_crcp_bkmrk_pml_peer_refs); for( peer_idx = (num_peers - my_idx - 1), iter = 0; iter < num_peers; - peer_idx = (peer_idx + 1) % num_peers, ++iter) + peer_idx = (peer_idx + 1) % num_peers, ++iter) { if(my_idx > peer_idx) { /* Send our bookmark status */ @@ -4760,7 +4760,7 @@ static void drain_message_ack_cbfunc(int status, item = opal_list_get_next(item) ) { ompi_crcp_bkmrk_pml_drain_message_ack_ref_t * drain_msg_ack; drain_msg_ack = (ompi_crcp_bkmrk_pml_drain_message_ack_ref_t*)item; - + /* If this ACK has not completed yet */ if(!drain_msg_ack->complete) { /* If it is the correct peer */ @@ -4939,7 +4939,7 @@ static int ft_event_post_drain_message(ompi_crcp_bkmrk_pml_drain_message_ref_t return OMPI_SUCCESS; } - /* Do not repost those that are already posted, and + /* Do not repost those that are already posted, and * we have requests for */ if( content_ref->already_posted ) { @@ -4962,9 +4962,9 @@ static int ft_event_post_drain_message(ompi_crcp_bkmrk_pml_drain_message_ref_t OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), OMPI_NAME_PRINT(&(drain_msg_ref->proc_name)), drain_msg_ref->rank)); - if( OMPI_SUCCESS != (ret = wrapped_pml_module->pml_irecv(content_ref->buffer, + if( OMPI_SUCCESS != (ret = wrapped_pml_module->pml_irecv(content_ref->buffer, (drain_msg_ref->count * drain_msg_ref->ddt_size), - drain_msg_ref->datatype, + drain_msg_ref->datatype, drain_msg_ref->rank, drain_msg_ref->tag, drain_msg_ref->comm, @@ -5039,7 +5039,7 @@ static int wait_quiesce_drained(void) goto cleanup; } opal_cr_stall_check = prev_stall; - + /* * Send ACKs to all peers * @@ -5229,7 +5229,7 @@ static int wait_quiesce_drain_ack(void) opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK); } - + /* Clear the ack queue if it isn't already clear (it should already be) */ while (NULL != (item = opal_list_remove_first(&drained_msg_ack_list) ) ) { HOKE_DRAIN_ACK_MSG_REF_RETURN(item); @@ -5478,7 +5478,7 @@ static int send_msg_details(ompi_crcp_bkmrk_pml_peer_ref_t *peer_ref, assert(need <= found); /* Prepare to post a Recv for the ACK All Clear signal from the peer - * which is sent when they have finished receiving all of the + * which is sent when they have finished receiving all of the * inflight messages into a local buffer */ HOKE_DRAIN_ACK_MSG_REF_ALLOC(d_msg_ack); diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.h b/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.h index 4d3304416b6..11784213599 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.h +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.h @@ -3,21 +3,21 @@ * 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, + * 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 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * Hoke CRCP component * */ @@ -42,78 +42,78 @@ BEGIN_C_DECLS ( bool enable, ompi_crcp_base_pml_state_t* pml_state ); ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_add_comm - ( struct ompi_communicator_t* comm, + ( struct ompi_communicator_t* comm, ompi_crcp_base_pml_state_t* pml_state ); ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_del_comm - ( struct ompi_communicator_t* comm, + ( struct ompi_communicator_t* comm, ompi_crcp_base_pml_state_t* pml_state ); ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_add_procs - ( struct ompi_proc_t **procs, size_t nprocs, + ( struct ompi_proc_t **procs, size_t nprocs, ompi_crcp_base_pml_state_t* pml_state ); ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_del_procs - ( struct ompi_proc_t **procs, size_t nprocs, + ( struct ompi_proc_t **procs, size_t nprocs, ompi_crcp_base_pml_state_t* pml_state ); ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_progress (ompi_crcp_base_pml_state_t* pml_state); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_iprobe - (int dst, int tag, struct ompi_communicator_t* comm, - int *matched, ompi_status_public_t* status, + (int dst, int tag, struct ompi_communicator_t* comm, + int *matched, ompi_status_public_t* status, ompi_crcp_base_pml_state_t* pml_state ); ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_probe - ( int dst, int tag, struct ompi_communicator_t* comm, - ompi_status_public_t* status, + ( int dst, int tag, struct ompi_communicator_t* comm, + ompi_status_public_t* status, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_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, + ( 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, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_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, + ( 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, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_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, + ( 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, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_irecv_init - ( void *buf, size_t count, ompi_datatype_t *datatype, + ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, - struct ompi_request_t **request, + struct ompi_request_t **request, ompi_crcp_base_pml_state_t* pml_state); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_irecv - ( void *buf, size_t count, ompi_datatype_t *datatype, - int src, int tag, struct ompi_communicator_t* comm, - struct ompi_request_t **request, + ( void *buf, size_t count, ompi_datatype_t *datatype, + int src, int tag, struct ompi_communicator_t* comm, + struct ompi_request_t **request, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_recv - ( void *buf, size_t count, ompi_datatype_t *datatype, - int src, int tag, struct ompi_communicator_t* comm, - ompi_status_public_t* status, + ( void *buf, size_t count, ompi_datatype_t *datatype, + int src, int tag, struct ompi_communicator_t* comm, + ompi_status_public_t* status, ompi_crcp_base_pml_state_t* pml_state); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_dump - ( struct ompi_communicator_t* comm, int verbose, + ( struct ompi_communicator_t* comm, int verbose, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_start - ( size_t count, ompi_request_t** requests, + ( size_t count, ompi_request_t** requests, ompi_crcp_base_pml_state_t* pml_state ); - + ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_ft_event (int state, ompi_crcp_base_pml_state_t* pml_state); @@ -255,7 +255,7 @@ BEGIN_C_DECLS }; typedef struct ompi_crcp_bkmrk_pml_drain_message_ref_t ompi_crcp_bkmrk_pml_drain_message_ref_t; - + OBJ_CLASS_DECLARATION(ompi_crcp_bkmrk_pml_drain_message_ref_t); void ompi_crcp_bkmrk_pml_drain_message_ref_construct(ompi_crcp_bkmrk_pml_drain_message_ref_t *msg_ref); void ompi_crcp_bkmrk_pml_drain_message_ref_destruct( ompi_crcp_bkmrk_pml_drain_message_ref_t *msg_ref); @@ -362,7 +362,7 @@ BEGIN_C_DECLS int active_drain; }; typedef struct ompi_crcp_bkmrk_pml_traffic_message_ref_t ompi_crcp_bkmrk_pml_traffic_message_ref_t; - + OBJ_CLASS_DECLARATION(ompi_crcp_bkmrk_pml_traffic_message_ref_t); void ompi_crcp_bkmrk_pml_traffic_message_ref_construct(ompi_crcp_bkmrk_pml_traffic_message_ref_t *msg_ref); void ompi_crcp_bkmrk_pml_traffic_message_ref_destruct( ompi_crcp_bkmrk_pml_traffic_message_ref_t *msg_ref); @@ -394,7 +394,7 @@ BEGIN_C_DECLS /** List of messages drained from this peer */ opal_list_t drained_list; - /* + /* * These are totals over all communicators provided for convenience. * * If we are P_n and this structure represent P_m then: @@ -414,7 +414,7 @@ BEGIN_C_DECLS /** Total Number of messages sent */ uint32_t total_msgs_sent; uint32_t matched_msgs_sent; - + /** Total Number of messages received */ uint32_t total_msgs_recvd; uint32_t matched_msgs_recvd; @@ -426,7 +426,7 @@ BEGIN_C_DECLS bool ack_required; }; typedef struct ompi_crcp_bkmrk_pml_peer_ref_t ompi_crcp_bkmrk_pml_peer_ref_t; - + OBJ_CLASS_DECLARATION(ompi_crcp_bkmrk_pml_peer_ref_t); void ompi_crcp_bkmrk_pml_peer_ref_construct(ompi_crcp_bkmrk_pml_peer_ref_t *bkm_proc); void ompi_crcp_bkmrk_pml_peer_ref_destruct( ompi_crcp_bkmrk_pml_peer_ref_t *bkm_proc); diff --git a/ompi/mca/crcp/crcp.h b/ompi/mca/crcp/crcp.h index 4e31c664d4b..261af794e59 100644 --- a/ompi/mca/crcp/crcp.h +++ b/ompi/mca/crcp/crcp.h @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -120,41 +120,41 @@ typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_progress_fn_t) (ompi_crcp_base_pml_state_t*); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_iprobe_fn_t) - (int dst, int tag, struct ompi_communicator_t* comm, int *matched, + (int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status, ompi_crcp_base_pml_state_t* ); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_probe_fn_t) - ( int dst, int tag, struct ompi_communicator_t* comm, + ( int dst, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status, ompi_crcp_base_pml_state_t* ); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_isend_init_fn_t) - ( 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, + ( 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, ompi_crcp_base_pml_state_t* ); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_isend_fn_t) ( 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, + mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request, ompi_crcp_base_pml_state_t* ); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_send_fn_t) ( 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, + mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, ompi_crcp_base_pml_state_t* ); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_irecv_init_fn_t) ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, struct ompi_request_t **request, + struct ompi_communicator_t* comm, struct ompi_request_t **request, ompi_crcp_base_pml_state_t*); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_irecv_fn_t) ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, struct ompi_request_t **request, + struct ompi_communicator_t* comm, struct ompi_request_t **request, ompi_crcp_base_pml_state_t* ); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_recv_fn_t) ( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, - struct ompi_communicator_t* comm, ompi_status_public_t* status, + struct ompi_communicator_t* comm, ompi_status_public_t* status, ompi_crcp_base_pml_state_t*); typedef ompi_crcp_base_pml_state_t* (*ompi_crcp_base_pml_dump_fn_t) @@ -352,7 +352,7 @@ struct ompi_crcp_base_module_1_0_0_t { mca_crcp_base_btl_module_get_fn_t btl_get; mca_crcp_base_btl_module_dump_fn_t btl_dump; - + mca_crcp_base_btl_module_ft_event_fn_t btl_ft_event; }; typedef struct ompi_crcp_base_module_1_0_0_t ompi_crcp_base_module_1_0_0_t; diff --git a/ompi/mca/crcp/ompi_crcp.7in b/ompi/mca/crcp/ompi_crcp.7in index 062f96018f2..3a2deca0bd2 100644 --- a/ompi/mca/crcp/ompi_crcp.7in +++ b/ompi/mca/crcp/ompi_crcp.7in @@ -1,6 +1,6 @@ .\" .\" Man page for OMPI's CRCP Functionality -.\" +.\" .\" .TH name section center-footer left-footer center-header .TH OMPI_CRCP 7 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .\" ************************** @@ -75,7 +75,7 @@ error. .SS none CRCP Component .PP The \fInone\fP component simply selects no CRCP component. All of the CRCP -function calls return immediately with OMPI_SUCCESS. +function calls return immediately with OMPI_SUCCESS. . .PP This component is the last component to be selected by default. This means that if diff --git a/ompi/mca/dpm/Makefile.am b/ompi/mca/dpm/Makefile.am index 229519504d3..7502d7187b5 100644 --- a/ompi/mca/dpm/Makefile.am +++ b/ompi/mca/dpm/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/dpm/base/Makefile.am b/ompi/mca/dpm/base/Makefile.am index 1fe6b6fa6e6..e3d8e3fa104 100644 --- a/ompi/mca/dpm/base/Makefile.am +++ b/ompi/mca/dpm/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/dpm/base/base.h b/ompi/mca/dpm/base/base.h index 3860710d9d6..3e34a0b8a1f 100644 --- a/ompi/mca/dpm/base/base.h +++ b/ompi/mca/dpm/base/base.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPI_MCA_DPM_BASE_H diff --git a/ompi/mca/dpm/base/dpm_base_common_fns.c b/ompi/mca/dpm/base/dpm_base_common_fns.c index cac245256ec..e710d9a4949 100644 --- a/ompi/mca/dpm/base/dpm_base_common_fns.c +++ b/ompi/mca/dpm/base/dpm_base_common_fns.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ @@ -55,7 +55,7 @@ char* ompi_dpm_base_dyn_init (void) } port_name = strdup(ptr); } - + return port_name; } diff --git a/ompi/mca/dpm/base/dpm_base_frame.c b/ompi/mca/dpm/base/dpm_base_frame.c index 041987dade7..ecac6fae072 100644 --- a/ompi/mca/dpm/base/dpm_base_frame.c +++ b/ompi/mca/dpm/base/dpm_base_frame.c @@ -4,7 +4,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,7 +43,7 @@ OMPI_DECLSPEC ompi_dpm_base_module_t ompi_dpm = { ompi_dpm_base_null_dyn_finalize, ompi_dpm_base_null_mark_dyncomm, ompi_dpm_base_null_open_port, - ompi_dpm_base_null_parse_port, + ompi_dpm_base_null_parse_port, ompi_dpm_base_null_route_to_port, ompi_dpm_base_null_close_port, NULL, diff --git a/ompi/mca/dpm/base/dpm_base_null_fns.c b/ompi/mca/dpm/base/dpm_base_null_fns.c index 55e86a633ae..454bc6869d6 100644 --- a/ompi/mca/dpm/base/dpm_base_null_fns.c +++ b/ompi/mca/dpm/base/dpm_base_null_fns.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2006-2007 University of Houston. All rights reserved. * Copyright (c) 2006-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved * diff --git a/ompi/mca/dpm/base/dpm_base_select.c b/ompi/mca/dpm/base/dpm_base_select.c index e65ad9dd555..81c646d5a30 100644 --- a/ompi/mca/dpm/base/dpm_base_select.c +++ b/ompi/mca/dpm/base/dpm_base_select.c @@ -3,16 +3,16 @@ * 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, + * 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) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/dpm/dpm.h b/ompi/mca/dpm/dpm.h index 195e9bd3c14..2fc1acc00d5 100644 --- a/ompi/mca/dpm/dpm.h +++ b/ompi/mca/dpm/dpm.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -153,7 +153,7 @@ typedef int (*ompi_dpm_base_module_parse_port_name_t)(const char *port_name, char **hnp_uri, char **rml_uri, ompi_rml_tag_t *tag); -/* +/* * Update the routed component to make sure that the RML can send messages to * the remote port */ diff --git a/ompi/mca/dpm/orte/Makefile.am b/ompi/mca/dpm/orte/Makefile.am index dd56727373b..ef960977577 100644 --- a/ompi/mca/dpm/orte/Makefile.am +++ b/ompi/mca/dpm/orte/Makefile.am @@ -1,13 +1,13 @@ # # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/dpm/orte/configure.m4 b/ompi/mca/dpm/orte/configure.m4 index 43a50d50ac2..8450f750cc8 100644 --- a/ompi/mca/dpm/orte/configure.m4 +++ b/ompi/mca/dpm/orte/configure.m4 @@ -5,9 +5,9 @@ # Copyright (c) 2014 Intel, Inc. All rights reserved # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/dpm/orte/dpm_orte.c b/ompi/mca/dpm/orte/dpm_orte.c index 165cd59e8b1..bc0aa2549aa 100644 --- a/ompi/mca/dpm/orte/dpm_orte.c +++ b/ompi/mca/dpm/orte/dpm_orte.c @@ -14,7 +14,7 @@ * Copyright (c) 2006-2009 University of Houston. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -114,7 +114,7 @@ ompi_dpm_base_module_t ompi_dpm_orte_module = { ompi_dpm_base_mark_dyncomm, open_port, parse_port_name, - route_to_port, + route_to_port, close_port, finalize, dpm_pconnect, @@ -145,7 +145,7 @@ static void connect_complete(int status, orte_process_name_t* sender, * Init the module */ static int init(void) -{ +{ OBJ_CONSTRUCT(&ompi_dpm_port_mutex, opal_mutex_t); next_tag = OMPI_RML_TAG_DYNAMIC; OBJ_CONSTRUCT(&orte_dpm_acceptors, opal_list_t); @@ -190,10 +190,10 @@ static int connect_accept(ompi_communicator_t *comm, int root, "%s dpm:orte:connect_accept with port %s %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), port_string, send_first ? "sending first" : "recv first")); - + /* set default error return */ *newcomm = MPI_COMM_NULL; - + size = ompi_comm_size ( comm ); rank = ompi_comm_rank ( comm ); @@ -222,7 +222,7 @@ static int connect_accept(ompi_communicator_t *comm, int root, } free(hnp_uri); free(rml_uri); } - + if ( rank == root ) { /* Generate the message buffer containing the number of processes and the list of participating processes */ @@ -230,16 +230,16 @@ static int connect_accept(ompi_communicator_t *comm, int root, if (NULL == nbuf) { return OMPI_ERROR; } - + if (OPAL_SUCCESS != (rc = opal_dss.pack(nbuf, &size, 1, OPAL_INT))) { ORTE_ERROR_LOG(rc); goto exit; } - + if (OMPI_GROUP_IS_DENSE(group)) { ompi_proc_pack(group->grp_proc_pointers, size, false, nbuf); } else { - proc_list = (ompi_proc_t **) calloc (group->grp_proc_count, + proc_list = (ompi_proc_t **) calloc (group->grp_proc_count, sizeof (ompi_proc_t *)); for (i=0 ; igrp_proc_count ; i++) { if (NULL == (proc_list[i] = ompi_group_peer_lookup(group,i))) { @@ -247,7 +247,7 @@ static int connect_accept(ompi_communicator_t *comm, int root, rc = ORTE_ERR_NOT_FOUND; goto exit; } - + OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_framework.framework_output, "%s dpm:orte:connect_accept adding %s to proc list", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -255,7 +255,7 @@ static int connect_accept(ompi_communicator_t *comm, int root, } ompi_proc_pack(proc_list, size, false, nbuf); } - + /* pack wireup info - this is required so that all involved parties can * discover how to talk to each other. For example, consider the case * where we connect_accept to one independent job (B), and then connect_accept @@ -291,7 +291,7 @@ static int connect_accept(ompi_communicator_t *comm, int root, "%s dpm:orte:connect_accept got data from %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&xfer.name))); - + } else { OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_framework.framework_output, "%s dpm:orte:connect_accept recving first", @@ -383,7 +383,7 @@ static int connect_accept(ompi_communicator_t *comm, int root, OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_framework.framework_output, "%s dpm:orte:connect_accept unpacked %d new procs", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), new_proc_len)); - + /* If we added new procs, we need to do the modex and then call PML add_procs */ if (new_proc_len > 0) { @@ -506,12 +506,12 @@ static int connect_accept(ompi_communicator_t *comm, int root, /* put group elements in the list */ for (j = 0; j < rsize; j++) { - new_group_pointer->grp_proc_pointers[j] = rprocs[j]; + new_group_pointer->grp_proc_pointers[j] = rprocs[j]; } /* end proc loop */ /* increment proc reference counters */ ompi_group_increment_proc_count(new_group_pointer); - + OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_framework.framework_output, "%s dpm:orte:connect_accept setting up communicator", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); @@ -785,7 +785,7 @@ static int spawn(int count, const char *array_of_commands[], /* setup the job object */ jdata = OBJ_NEW(orte_job_t); - + /* Convert the list of commands to an array of orte_app_context_t pointers */ for (i = 0; i < count; ++i) { @@ -800,7 +800,7 @@ static int spawn(int count, const char *array_of_commands[], opal_pointer_array_add(jdata->apps, app); app->idx = i; jdata->num_apps++; - + /* copy over the name of the executable */ app->app = strdup(array_of_commands[i]); if (NULL == app->app) { @@ -811,7 +811,7 @@ static int spawn(int count, const char *array_of_commands[], } /* record the number of procs to be generated */ app->num_procs = array_of_maxprocs[i]; - + /* copy over the argv array */ counter = 1; @@ -871,31 +871,31 @@ static int spawn(int count, const char *array_of_commands[], if ( flag ) { jdata->personality = strdup(host); } - + /* check for 'host' */ ompi_info_get (array_of_info[i], "host", sizeof(host) - 1, host, &flag); if ( flag ) { orte_set_attribute(&app->attributes, ORTE_APP_DASH_HOST, false, host, OPAL_STRING); } - + /* check for 'hostfile' */ ompi_info_get (array_of_info[i], "hostfile", sizeof(host) - 1, host, &flag); if ( flag ) { orte_set_attribute(&app->attributes, ORTE_APP_HOSTFILE, false, host, OPAL_STRING); } - + /* check for 'add-hostfile' */ ompi_info_get (array_of_info[i], "add-hostfile", sizeof(host) - 1, host, &flag); if ( flag ) { orte_set_attribute(&app->attributes, ORTE_APP_ADD_HOSTFILE, false, host, OPAL_STRING); } - + /* check for 'add-host' */ ompi_info_get (array_of_info[i], "add-host", sizeof(host) - 1, host, &flag); if ( flag ) { orte_set_attribute(&app->attributes, ORTE_APP_ADD_HOST, false, host, OPAL_STRING); } - + /* check for env */ ompi_info_get (array_of_info[i], "env", sizeof(host)-1, host, &flag); if ( flag ) { @@ -906,8 +906,8 @@ static int spawn(int count, const char *array_of_commands[], opal_argv_free(envars); } - /* 'path', 'arch', 'file', 'soft' -- to be implemented */ - + /* 'path', 'arch', 'file', 'soft' -- to be implemented */ + /* check for 'ompi_prefix' (OMPI-specific -- to effect the same * behavior as --prefix option to orterun) */ @@ -916,14 +916,14 @@ static int spawn(int count, const char *array_of_commands[], orte_set_attribute(&app->attributes, ORTE_APP_PREFIX_DIR, false, prefix, OPAL_STRING); } - /* check for 'wdir' */ + /* check for 'wdir' */ ompi_info_get (array_of_info[i], "wdir", sizeof(cwd) - 1, cwd, &flag); if ( flag ) { app->cwd = strdup(cwd); have_wdir = 1; } - - /* check for 'mapper' */ + + /* check for 'mapper' */ ompi_info_get(array_of_info[i], "mapper", sizeof(mapper) - 1, mapper, &flag); if ( flag ) { if (NULL == jdata->map) { @@ -936,7 +936,7 @@ static int spawn(int count, const char *array_of_commands[], jdata->map->req_mapper = strdup(mapper); } - /* check for 'display_map' */ + /* check for 'display_map' */ ompi_info_get_bool(array_of_info[i], "display_map", &local_spawn, &flag); if ( flag ) { if (NULL == jdata->map) { @@ -949,7 +949,7 @@ static int spawn(int count, const char *array_of_commands[], jdata->map->display_map = true; } - /* check for 'npernode' and 'ppr' */ + /* check for 'npernode' and 'ppr' */ ompi_info_get (array_of_info[i], "npernode", sizeof(slot_list) - 1, slot_list, &flag); if ( flag ) { if (ORTE_SUCCESS != ompi_info_value_to_int(slot_list, &npernode)) { @@ -1037,7 +1037,7 @@ static int spawn(int count, const char *array_of_commands[], /* not allowed to provide multiple ranking policies */ return OMPI_ERROR; } - if (ORTE_SUCCESS != (rc = orte_rmaps_base_set_ranking_policy(&jdata->map->ranking, + if (ORTE_SUCCESS != (rc = orte_rmaps_base_set_ranking_policy(&jdata->map->ranking, jdata->map->mapping, slot_list))) { return rc; } @@ -1069,13 +1069,13 @@ static int spawn(int count, const char *array_of_commands[], if ( flag ) { orte_set_attribute(&app->attributes, ORTE_APP_PRELOAD_BIN, false, NULL, OPAL_BOOL); } - - /* check for 'preload_files' */ + + /* check for 'preload_files' */ ompi_info_get (array_of_info[i], "ompi_preload_files", sizeof(cwd) - 1, cwd, &flag); if ( flag ) { orte_set_attribute(&app->attributes, ORTE_APP_PRELOAD_FILES, false, cwd, OPAL_STRING); } - + /* see if this is a non-mpi job - if so, then set the flag so ORTE * knows what to do */ @@ -1083,13 +1083,13 @@ static int spawn(int count, const char *array_of_commands[], if (flag && non_mpi) { orte_set_attribute(&jdata->attributes, ORTE_JOB_NON_ORTE_JOB, false, NULL, OPAL_BOOL); } - + /* see if this is an MCA param that the user wants applied to the child job */ ompi_info_get (array_of_info[i], "ompi_param", sizeof(params) - 1, params, &flag); if ( flag ) { opal_argv_append_unique_nosize(&app->env, params, true); } - + /* see if user specified what to do with stdin - defaults to * not forwarding stdin to child processes */ @@ -1117,7 +1117,7 @@ static int spawn(int count, const char *array_of_commands[], } app->cwd = strdup(cwd); } - + /* leave the map info alone - the launcher will * decide where to put things */ @@ -1127,7 +1127,7 @@ static int spawn(int count, const char *array_of_commands[], if (NULL == jdata->personality) { jdata->personality = strdup("ompi"); } - + /* spawn procs */ rc = orte_plm.spawn(jdata); OBJ_RELEASE(jdata); @@ -1168,7 +1168,7 @@ static int open_port(char *port_name, orte_rml_tag_t given_tag) char *rml_uri=NULL; int rc, len; char tag[12]; - + /* if we are a singleton and the supporting HNP hasn't * been spawned, then do so now */ @@ -1190,13 +1190,13 @@ static int open_port(char *port_name, orte_rml_tag_t given_tag) ORTE_ERROR_LOG(rc); goto cleanup; } - + if (NULL == (rml_uri = orte_rml.get_contact_info())) { rc = OMPI_ERROR; ORTE_ERROR_LOG(rc); goto cleanup; } - + if (ORTE_RML_TAG_INVALID == given_tag) { OPAL_THREAD_LOCK(&ompi_dpm_port_mutex); snprintf(tag, 12, "%d", next_tag); @@ -1205,16 +1205,16 @@ static int open_port(char *port_name, orte_rml_tag_t given_tag) } else { snprintf(tag, 12, "%d", given_tag); } - - + + len = strlen(orte_process_info.my_hnp_uri) + strlen(rml_uri) + strlen(tag); - + /* if the overall port name is too long, we abort */ if (len > (MPI_MAX_PORT_NAME-1)) { rc = OMPI_ERR_VALUE_OUT_OF_BOUNDS; goto cleanup; } - + /* assemble the port name */ snprintf(port_name, MPI_MAX_PORT_NAME, "%s+%s:%s", orte_process_info.my_hnp_uri, rml_uri, tag); rc = OMPI_SUCCESS; @@ -1223,16 +1223,16 @@ static int open_port(char *port_name, orte_rml_tag_t given_tag) if (NULL != rml_uri) { free(rml_uri); } - + return rc; } static int route_to_port(char *rml_uri, orte_process_name_t *rproc) -{ +{ opal_buffer_t route; int rc; - + /* We need to ask the routed module to init_routes so it can do the * right thing. In most cases, it will route any messages to the * proc through our HNP - however, this is NOT the case in all @@ -1241,48 +1241,48 @@ static int route_to_port(char *rml_uri, orte_process_name_t *rproc) */ /* pack a cmd so the buffer can be unpacked correctly */ OBJ_CONSTRUCT(&route, opal_buffer_t); - + /* pack the provided uri */ opal_dss.pack(&route, &rml_uri, 1, OPAL_STRING); - + /* init the route */ if (ORTE_SUCCESS != (rc = orte_routed.init_routes(rproc->jobid, &route))) { ORTE_ERROR_LOG(rc); } OBJ_DESTRUCT(&route); - + /* nothing more to do here */ return rc; } static int parse_port_name(const char *port_name, - char **hnp_uri, + char **hnp_uri, char **rml_uri, orte_rml_tag_t *ptag) { char *tmpstring=NULL, *ptr; int tag; int rc; - + /* don't mangle the port name */ tmpstring = strdup(port_name); if (NULL == tmpstring) { return OMPI_ERR_OUT_OF_RESOURCE; } - + /* find the ':' demarking the RML tag we added to the end */ if (NULL == (ptr = strrchr(tmpstring, ':'))) { rc = OMPI_ERR_NOT_FOUND; goto cleanup; } - + /* terminate the port_name at that location */ *ptr = '\0'; ptr++; - + /* convert the RML tag */ sscanf(ptr,"%d", &tag); - + /* now split out the second field - the uri of the remote proc */ if (NULL == (ptr = strchr(tmpstring, '+'))) { rc = OMPI_ERR_NOT_FOUND; @@ -1290,15 +1290,15 @@ static int parse_port_name(const char *port_name, } *ptr = '\0'; ptr++; - + /* save that info */ if(NULL != hnp_uri) *hnp_uri = tmpstring; else free(tmpstring); if(NULL != rml_uri) *rml_uri = strdup(ptr); if(NULL != ptag) *ptag = tag; - + return OMPI_SUCCESS; - + cleanup: /* release the tmp storage */ free(tmpstring); @@ -1317,25 +1317,25 @@ static int dyn_init(void) int root=0, rc; bool send_first = true; ompi_communicator_t *newcomm=NULL; - + /* if env-variable is set, we are a dynamically spawned * child - parse port and call comm_connect_accept */ if (NULL == (port_name = ompi_dpm_base_dyn_init())) { /* nothing to do */ return OMPI_SUCCESS; } - + OPAL_OUTPUT_VERBOSE((1, ompi_dpm_base_framework.framework_output, "%s dpm:orte:dyn_init with port %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), port_name)); - + rc = connect_accept (MPI_COMM_WORLD, root, port_name, send_first, &newcomm); free(port_name); if (OMPI_SUCCESS != rc) { return rc; } - + /* originally, we set comm_parent to comm_null (in comm_init), * now we have to decrease the reference counters to the according * objects @@ -1350,7 +1350,7 @@ static int dyn_init(void) /* Set name for debugging purposes */ snprintf(newcomm->c_name, MPI_MAX_OBJECT_NAME, "MPI_COMM_PARENT"); newcomm->c_flags |= OMPI_COMM_NAMEISSET; - + return OMPI_SUCCESS; } @@ -1436,7 +1436,7 @@ static void process_request(orte_process_name_t* sender, ORTE_ERROR_LOG(rc); goto cleanup; } - + OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_framework.framework_output, "%s dpm:orte:pconnect new procs added", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); @@ -1478,11 +1478,11 @@ static void process_request(orte_process_name_t* sender, } /* put group element in the list */ - new_group_pointer->grp_proc_pointers[0] = rprocs[0]; + new_group_pointer->grp_proc_pointers[0] = rprocs[0]; /* increment proc reference counter */ ompi_group_increment_proc_count(new_group_pointer); - + OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_framework.framework_output, "%s dpm:pconprocess setting up communicator", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); diff --git a/ompi/mca/dpm/orte/dpm_orte.h b/ompi/mca/dpm/orte/dpm_orte.h index 2badcdcb519..da6793068a1 100644 --- a/ompi/mca/dpm/orte/dpm_orte.h +++ b/ompi/mca/dpm/orte/dpm_orte.h @@ -3,16 +3,16 @@ * All rights reserved. * Copyright (c) 2004-2006 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/dpm/orte/dpm_orte_component.c b/ompi/mca/dpm/orte/dpm_orte_component.c index 184742c4a1b..14af5466227 100644 --- a/ompi/mca/dpm/orte/dpm_orte_component.c +++ b/ompi/mca/dpm/orte/dpm_orte_component.c @@ -6,16 +6,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -34,7 +34,7 @@ ompi_dpm_base_component_t mca_dpm_orte_component = { .base_version = { OMPI_DPM_BASE_VERSION_2_0_0, - + .mca_component_name = "orte", MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, OMPI_RELEASE_VERSION), diff --git a/ompi/mca/dpm/orte/help-ompi-dpm-orte.txt b/ompi/mca/dpm/orte/help-ompi-dpm-orte.txt index 68bd9103774..6780a31de7c 100644 --- a/ompi/mca/dpm/orte/help-ompi-dpm-orte.txt +++ b/ompi/mca/dpm/orte/help-ompi-dpm-orte.txt @@ -6,15 +6,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI. diff --git a/ompi/mca/fbtl/Makefile.am b/ompi/mca/fbtl/Makefile.am index 358c4cdab4b..6e023ec073e 100644 --- a/ompi/mca/fbtl/Makefile.am +++ b/ompi/mca/fbtl/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fbtl/base/Makefile.am b/ompi/mca/fbtl/base/Makefile.am index 0d539aec08a..7758c02f745 100644 --- a/ompi/mca/fbtl/base/Makefile.am +++ b/ompi/mca/fbtl/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fbtl/base/base.h b/ompi/mca/fbtl/base/base.h index 1fb4f3c3db2..bc79eeb6430 100644 --- a/ompi/mca/fbtl/base/base.h +++ b/ompi/mca/fbtl/base/base.h @@ -5,20 +5,20 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** +/** * @file * * MCA fbtl base framework public interface functions. diff --git a/ompi/mca/fbtl/base/fbtl_base_file_select.c b/ompi/mca/fbtl/base/fbtl_base_file_select.c index d7ea46eb7ed..36393fc6d91 100644 --- a/ompi/mca/fbtl/base/fbtl_base_file_select.c +++ b/ompi/mca/fbtl/base/fbtl_base_file_select.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,7 +30,7 @@ #include "ompi/mca/io/ompio/io_ompio.h" /* - * This structure is needed so that we can close the modules + * This structure is needed so that we can close the modules * which are not selected but were opened. mca_base_modules_close * which does this job for us requires a opal_list_t which contains * these modules @@ -58,20 +58,20 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * 4. Select the module with the highest priority * 5. Call the init function on the selected module so that it does the * right setup for the file - * 6. Call finalize on all the other modules which returned + * 6. Call finalize on all the other modules which returned * their module but were unfortunate to not get selected - */ + */ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, - mca_base_component_t *preferred) + mca_base_component_t *preferred) { - int priority; - int best_priority; - opal_list_item_t *item; + int priority; + int best_priority; + opal_list_item_t *item; mca_base_component_list_item_t *cli; - mca_fbtl_base_component_t *component; + mca_fbtl_base_component_t *component; mca_fbtl_base_component_t *best_component; - mca_fbtl_base_module_t *module; + mca_fbtl_base_module_t *module; opal_list_t queried; queried_module_t *om; char *str; @@ -81,22 +81,22 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, provided then it should be used (if possible) */ if (NULL != preferred) { - + /* We have a preferred component. Check if it is available and if so, whether it wants to run */ - + str = &(preferred->mca_component_name[0]); - + opal_output_verbose(10, ompi_fbtl_base_framework.framework_output, "fbtl:base:file_select: Checking preferred component: %s", str); - - /* query the component for its priority and get its module + + /* query the component for its priority and get its module structure. This is necessary to proceed */ - + component = (mca_fbtl_base_component_t *)preferred; module = component->fbtlm_file_query (file, &priority); - if (NULL != module && + if (NULL != module && NULL != module->fbtl_module_init) { /* this query seems to have returned something legitimate @@ -109,7 +109,7 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, file->f_fbtl_component = preferred; return module->fbtl_module_init(file); - } + } /* His preferred component is present, but is unable to * run. This is not a good sign. We should try selecting * some other component We let it fall through and select @@ -126,7 +126,7 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, * All we need to do is to go through the list of available * components and find the one which has the highest priority and * use that for this file - */ + */ best_component = NULL; best_priority = -1; @@ -148,21 +148,21 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, } else { /* * call the query function and see what it returns - */ + */ module = component->fbtlm_file_query (file, &priority); if (NULL == module || NULL == module->fbtl_module_init) { /* * query did not return any action which can be used - */ + */ opal_output_verbose(10, ompi_fbtl_base_framework.framework_output, "select: query returned failure"); } else { opal_output_verbose(10, ompi_fbtl_base_framework.framework_output, "select: query returned priority %d", priority); - /* + /* * is this the best component we have found till now? */ if (priority > best_priority) { @@ -179,8 +179,8 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, return OMPI_ERR_OUT_OF_RESOURCE; } om->om_component = component; - om->om_module = module; - opal_list_append(&queried, (opal_list_item_t *)om); + om->om_module = module; + opal_list_append(&queried, (opal_list_item_t *)om); } /* end else of if (NULL == module) */ } /* end else of if (NULL == component->fbtlm_init) */ } /* end for ... end of traversal */ @@ -207,7 +207,7 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, * returned their priorities from the query. We now have to * unquery() those components which have not been selected and * init() the component which was selected - */ + */ while (NULL != (item = opal_list_remove_first(&queried))) { om = (queried_module_t *) item; if (om->om_component == best_component) { @@ -219,7 +219,7 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, * defined. Whereever a function pointer is null in the * module structure we need to fill it in with the base * structure function pointers. This is yet to be done - */ + */ /* * We don return here coz we still need to go through and @@ -248,7 +248,7 @@ int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, } /* if not best component */ OBJ_RELEASE(om); } /* traversing through the entire list */ - + opal_output_verbose(10, ompi_fbtl_base_framework.framework_output, "select: component %s selected", best_component->fbtlm_version.mca_component_name); diff --git a/ompi/mca/fbtl/base/fbtl_base_file_unselect.c b/ompi/mca/fbtl/base/fbtl_base_file_unselect.c index cb47e69e9d6..280965f9347 100644 --- a/ompi/mca/fbtl/base/fbtl_base_file_unselect.c +++ b/ompi/mca/fbtl/base/fbtl_base_file_unselect.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fbtl/base/fbtl_base_find_available.c b/ompi/mca/fbtl/base/fbtl_base_find_available.c index 79fef6e22d6..21049443d0b 100644 --- a/ompi/mca/fbtl/base/fbtl_base_find_available.c +++ b/ompi/mca/fbtl/base/fbtl_base_find_available.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,18 +36,18 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, bool enable_mpi_threads); - + int mca_fbtl_base_find_available(bool enable_progress_threads, bool enable_mpi_threads) { mca_base_component_list_item_t *cli, *next; - /* The list of components which we should check is already present - in mca_fbtl_base_components_opened, which was established in + /* The list of components which we should check is already present + in mca_fbtl_base_components_opened, which was established in mca_fbtl_base_open */ OPAL_LIST_FOREACH_SAFE(cli, next, &ompi_fbtl_base_framework.framework_components, mca_base_component_list_item_t) { - /* Now for this entry, we have to determine the thread level. Call + /* Now for this entry, we have to determine the thread level. Call a subroutine to do the job for us */ if (OMPI_SUCCESS != init_query(cli->cli_component, @@ -69,14 +69,14 @@ int mca_fbtl_base_find_available(bool enable_progress_threads, /* All done */ return OMPI_SUCCESS; } - - + + static int init_query(const mca_base_component_t *m, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { int ret; - + opal_output_verbose(10, ompi_fbtl_base_framework.framework_output, "fbtl:find_available: querying fbtl component %s", m->mca_component_name); @@ -115,11 +115,11 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { - mca_fbtl_base_component_2_0_0_t *fbtl = + mca_fbtl_base_component_2_0_0_t *fbtl = (mca_fbtl_base_component_2_0_0_t *) component; - + return fbtl->fbtlm_init_query(enable_progress_threads, enable_mpi_threads); } diff --git a/ompi/mca/fbtl/base/fbtl_base_frame.c b/ompi/mca/fbtl/base/fbtl_base_frame.c index 69669225d72..028a98ba5ac 100644 --- a/ompi/mca/fbtl/base/fbtl_base_frame.c +++ b/ompi/mca/fbtl/base/fbtl_base_frame.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fbtl/configure.m4 b/ompi/mca/fbtl/configure.m4 index 54b39dc63a5..ae9f6f5b364 100644 --- a/ompi/mca/fbtl/configure.m4 +++ b/ompi/mca/fbtl/configure.m4 @@ -3,15 +3,15 @@ # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # MCA_ompi_fbtl_CONFIG(project_name, framework_name) # ------------------------------------------- -AC_DEFUN([MCA_ompi_fbtl_CONFIG], +AC_DEFUN([MCA_ompi_fbtl_CONFIG], [ # An AC-ARG-ENABLE for mpi-io was set in ompi/mca/io/configure.m4. # If it's no, we shouldn't bother building anything in fcoll. diff --git a/ompi/mca/fbtl/fbtl.h b/ompi/mca/fbtl/fbtl.h index 14ac44612bd..83ddb7c8f33 100644 --- a/ompi/mca/fbtl/fbtl.h +++ b/ompi/mca/fbtl/fbtl.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,15 +45,15 @@ struct mca_ompio_request_t; /* * The file byte transfer layer (fbtl) framework provides the abstraction - * for individual blocking and non-blocking read and write operations. - * The functionality provided by the interfaces in this module + * for individual blocking and non-blocking read and write operations. + * The functionality provided by the interfaces in this module * can be used to implement the corresponding operations in MPI I/O. - * Note however, that the interfaces are not a one-to-one mapping + * Note however, that the interfaces are not a one-to-one mapping * of the MPI individual read and write operations, since the fbtl framework * avoids using derived MPI datatypes. The step mapping/unrolling the MPI * derived data types into a vector of (offset into file, memory address, length) * is done in the OMPIO module of the IO framework. - * + * * These are the component function prototypes. These function pointers * go into the component structure. These functions (query() and finalize() * are called during fbtl_base_select(). Each component is query() ied @@ -76,11 +76,11 @@ struct mca_ompio_request_t; * **************** component struct ******************************* */ -typedef int (*mca_fbtl_base_component_init_query_1_0_0_fn_t) - (bool enable_progress_threads, +typedef int (*mca_fbtl_base_component_init_query_1_0_0_fn_t) + (bool enable_progress_threads, bool enable_mpi_threads); -typedef struct mca_fbtl_base_module_1_0_0_t * +typedef struct mca_fbtl_base_module_1_0_0_t * (*mca_fbtl_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file, int *priority); @@ -95,7 +95,7 @@ typedef int (*mca_fbtl_base_component_file_unquery_1_0_0_fn_t) struct mca_fbtl_base_component_2_0_0_t { mca_base_component_t fbtlm_version; mca_base_component_data_t fbtlm_data; - + mca_fbtl_base_component_init_query_1_0_0_fn_t fbtlm_init_query; mca_fbtl_base_component_file_query_1_0_0_fn_t fbtlm_file_query; mca_fbtl_base_component_file_unquery_1_0_0_fn_t fbtlm_file_unquery; @@ -146,7 +146,7 @@ struct mca_fbtl_base_module_1_0_0_t { */ mca_fbtl_base_module_init_1_0_0_fn_t fbtl_module_init; mca_fbtl_base_module_finalize_1_0_0_fn_t fbtl_module_finalize; - + /* FBTL function pointers */ mca_fbtl_base_module_preadv_fn_t fbtl_preadv; mca_fbtl_base_module_ipreadv_fn_t fbtl_ipreadv; diff --git a/ompi/mca/fbtl/plfs/Makefile.am b/ompi/mca/fbtl/plfs/Makefile.am index f5298871eb3..68fb67d034d 100644 --- a/ompi/mca/fbtl/plfs/Makefile.am +++ b/ompi/mca/fbtl/plfs/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fbtl/plfs/configure.m4 b/ompi/mca/fbtl/plfs/configure.m4 index 85627198da6..c7502b51107 100644 --- a/ompi/mca/fbtl/plfs/configure.m4 +++ b/ompi/mca/fbtl/plfs/configure.m4 @@ -6,21 +6,21 @@ # 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, +# 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) 2008-2014 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_fbtl_plfs_CONFIG(action-if-can-compile, +# MCA_fbtl_plfs_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fbtl_plfs_CONFIG],[ diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs.c b/ompi/mca/fbtl/plfs/fbtl_plfs.c index 5696cf02980..df4391a8f04 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs.c +++ b/ompi/mca/fbtl/plfs/fbtl_plfs.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -53,7 +53,7 @@ int mca_fbtl_plfs_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ return OMPI_SUCCESS; -} +} struct mca_fbtl_base_module_1_0_0_t * mca_fbtl_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) { @@ -67,9 +67,9 @@ mca_fbtl_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) { return &plfs; } -int mca_fbtl_plfs_component_file_unquery (mca_io_ompio_file_t *file) { +int mca_fbtl_plfs_component_file_unquery (mca_io_ompio_file_t *file) { /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -79,7 +79,7 @@ int mca_fbtl_plfs_module_init (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } - + int mca_fbtl_plfs_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs.h b/ompi/mca/fbtl/plfs/fbtl_plfs.h index b486a6753a7..40173b25245 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs.h +++ b/ompi/mca/fbtl/plfs/fbtl_plfs.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_plfs_compon * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *file ); ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *file ); @@ -57,8 +57,8 @@ ssize_t mca_fbtl_plfs_ipwritev (mca_io_ompio_file_t *file, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FBTL_PLFS_H */ diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs_component.c b/ompi/mca/fbtl/plfs/fbtl_plfs_component.c index 985b29db583..aa2b9f347a6 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs_component.c +++ b/ompi/mca/fbtl/plfs/fbtl_plfs_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs_ipreadv.c b/ompi/mca/fbtl/plfs/fbtl_plfs_ipreadv.c index f4fce7cd9f1..9cb16785034 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs_ipreadv.c +++ b/ompi/mca/fbtl/plfs/fbtl_plfs_ipreadv.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs_ipwritev.c b/ompi/mca/fbtl/plfs/fbtl_plfs_ipwritev.c index adf01c3252e..4365ac99238 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs_ipwritev.c +++ b/ompi/mca/fbtl/plfs/fbtl_plfs_ipwritev.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs_preadv.c b/ompi/mca/fbtl/plfs/fbtl_plfs_preadv.c index 2ea3b02921c..1eefad95bed 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs_preadv.c +++ b/ompi/mca/fbtl/plfs/fbtl_plfs_preadv.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,7 +42,7 @@ ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *fh ) return OMPI_ERROR; } - iov = (struct iovec *) malloc + iov = (struct iovec *) malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (struct iovec)); if (NULL == iov) { opal_output(1, "OUT OF MEMORY\n"); @@ -56,7 +56,7 @@ ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *fh ) iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset; iov_count ++; } - + if (OMPIO_IOVEC_INITIAL_SIZE*block <= iov_count) { block ++; iov = (struct iovec *)realloc @@ -67,32 +67,32 @@ ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *fh ) return OMPI_ERR_OUT_OF_RESOURCE; } } - + if (fh->f_num_of_io_entries != i+1) { - if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + - (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == - (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) { - iov[iov_count].iov_base = + if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + + (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == + (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) { + iov[iov_count].iov_base = fh->f_io_array[i+1].memory_address; iov[iov_count].iov_len = fh->f_io_array[i+1].length; iov_count ++; continue; } } - + // Find the total number of bytes to be read. size_t bytes = 0; for (int i = 0; i < iov_count; ++i) { bytes += iov[i].iov_len; } - + // Allocate a temporary buffer to hold the data char *buffer; buffer = (char *) malloc (bytes); if (buffer == NULL) { return OMPI_ERROR; } - + // Read the data ssize_t bytes_read; plfs_ret = plfs_read( pfd, buffer, bytes, iov_offset, &bytes_read ); @@ -100,7 +100,7 @@ ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *fh ) opal_output(0, "fbtl_plfs_preadv: Error in plfs_read:\n%s\n", strplfserr(plfs_ret)); return OMPI_ERROR; } - + if (bytes_read < 0) return OMPI_ERROR; total_bytes_read += bytes_read; diff --git a/ompi/mca/fbtl/plfs/fbtl_plfs_pwritev.c b/ompi/mca/fbtl/plfs/fbtl_plfs_pwritev.c index de2849960bc..5c79971478e 100644 --- a/ompi/mca/fbtl/plfs/fbtl_plfs_pwritev.c +++ b/ompi/mca/fbtl/plfs/fbtl_plfs_pwritev.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,7 +42,7 @@ ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *fh ) return OMPI_ERROR; } - iov = (struct iovec *) malloc + iov = (struct iovec *) malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (struct iovec)); if (NULL == iov) { opal_output(1, "OUT OF MEMORY\n"); @@ -56,7 +56,7 @@ ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *fh ) iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset; iov_count ++; } - + if (OMPIO_IOVEC_INITIAL_SIZE*block <= iov_count) { block ++; iov = (struct iovec *)realloc @@ -67,32 +67,32 @@ ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *fh ) return OMPI_ERR_OUT_OF_RESOURCE; } } - + if (fh->f_num_of_io_entries != i+1) { - if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + - (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == + if (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + + (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) { - iov[iov_count].iov_base = + iov[iov_count].iov_base = fh->f_io_array[i+1].memory_address; iov[iov_count].iov_len = fh->f_io_array[i+1].length; iov_count ++; continue; } } - + // Find the total number of bytes to be written. size_t bytes = 0; for (int i = 0; i < iov_count; ++i) { bytes += iov[i].iov_len; } - + // Allocate a temporary buffer to hold the data char *buffer=NULL; buffer = (char *) malloc (bytes); if (buffer == NULL) { return OMPI_ERROR; } - + // Copy the data into BUFFER. size_t to_copy = bytes; char *bp = buffer; @@ -104,10 +104,10 @@ ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *fh ) break; } } - + // Write the data ssize_t bytes_written; - + plfs_ret = plfs_write( pfd, buffer, bytes, iov_offset, 0, &bytes_written ); if (PLFS_SUCCESS != plfs_ret) { opal_output(0, "fbtl_plfs_pwritev: Error in plfs_write:\n%s\n", strplfserr(plfs_ret)); @@ -120,11 +120,11 @@ ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *fh ) buffer=NULL; } } - + if (NULL != iov) { free (iov); iov = NULL; } - + return total_bytes_written; } diff --git a/ompi/mca/fbtl/posix/Makefile.am b/ompi/mca/fbtl/posix/Makefile.am index 1a27c995c69..2c806f08e00 100644 --- a/ompi/mca/fbtl/posix/Makefile.am +++ b/ompi/mca/fbtl/posix/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fbtl/posix/configure.m4 b/ompi/mca/fbtl/posix/configure.m4 index 8e7c2e034ea..8a6d548ea58 100644 --- a/ompi/mca/fbtl/posix/configure.m4 +++ b/ompi/mca/fbtl/posix/configure.m4 @@ -6,20 +6,20 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2012 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_fbtl_posix_CONFIG(action-if-can-compile, +# MCA_fbtl_posix_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fbtl_posix_CONFIG],[ diff --git a/ompi/mca/fbtl/posix/fbtl_posix.c b/ompi/mca/fbtl/posix/fbtl_posix.c index b38280e650a..4c6d21ab011 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix.c +++ b/ompi/mca/fbtl/posix/fbtl_posix.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -71,9 +71,9 @@ static mca_fbtl_base_module_1_0_0_t posix = { int mca_fbtl_posix_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} struct mca_fbtl_base_module_1_0_0_t * mca_fbtl_posix_component_file_query (mca_io_ompio_file_t *fh, int *priority) { @@ -88,16 +88,16 @@ mca_fbtl_posix_component_file_query (mca_io_ompio_file_t *fh, int *priority) { return &posix; } -int mca_fbtl_posix_component_file_unquery (mca_io_ompio_file_t *file) { +int mca_fbtl_posix_component_file_unquery (mca_io_ompio_file_t *file) { /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; } int mca_fbtl_posix_module_init (mca_io_ompio_file_t *file) { - + #if defined (FBTL_POSIX_HAVE_AIO) long val = sysconf(_SC_AIO_MAX); if ( -1 != val ) { @@ -107,7 +107,7 @@ int mca_fbtl_posix_module_init (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } - + int mca_fbtl_posix_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } @@ -125,9 +125,9 @@ bool mca_fbtl_posix_progress ( mca_ompio_request_t *req) if ( 0 == data->aio_req_status[i]){ data->aio_open_reqs--; lcount++; - /* assuming right now that aio_return will return + /* assuming right now that aio_return will return ** the number of bytes written/read and not an error code, - ** since aio_error should have returned an error in that + ** since aio_error should have returned an error in that ** case and not 0 ( which means request is complete) */ data->aio_total_len += aio_return (&data->aio_reqs[i]); @@ -137,7 +137,7 @@ bool mca_fbtl_posix_progress ( mca_ompio_request_t *req) continue; } else { - /* an error occured. Mark the request done, but + /* an error occured. Mark the request done, but set an error code in the status */ req->req_ompi.req_status.MPI_ERROR = OMPI_ERROR; req->req_ompi.req_status._ucount = data->aio_total_len; @@ -161,7 +161,7 @@ bool mca_fbtl_posix_progress ( mca_ompio_request_t *req) } else { data->aio_last_active_req = data->aio_req_count; - } + } for ( i=data->aio_first_active_req; i< data->aio_last_active_req; i++ ) { if ( FBTL_POSIX_READ == data->aio_req_type ) { if (-1 == aio_read(&data->aio_reqs[i])) { @@ -180,7 +180,7 @@ bool mca_fbtl_posix_progress ( mca_ompio_request_t *req) printf("posting new batch: first=%d last=%d\n", data->aio_first_active_req, data->aio_last_active_req ); #endif } - + if ( 0 == data->aio_open_reqs ) { /* all pending operations are finished for this request */ req->req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; diff --git a/ompi/mca/fbtl/posix/fbtl_posix.h b/ompi/mca/fbtl/posix/fbtl_posix.h index cb8b16a3175..df6fd29e4fb 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix.h +++ b/ompi/mca/fbtl/posix/fbtl_posix.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,7 +46,7 @@ OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_posix_compo * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *file ); ssize_t mca_fbtl_posix_pwritev (mca_io_ompio_file_t *file ); @@ -57,7 +57,7 @@ ssize_t mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *file, bool mca_fbtl_posix_progress ( mca_ompio_request_t *req); void mca_fbtl_posix_request_free ( mca_ompio_request_t *req); - + struct mca_fbtl_posix_request_data_t { int aio_req_count; /* total number of aio reqs */ int aio_open_reqs; /* number of unfinished reqs */ @@ -82,8 +82,8 @@ typedef struct mca_fbtl_posix_request_data_t mca_fbtl_posix_request_data_t; * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FBTL_POSIX_H */ diff --git a/ompi/mca/fbtl/posix/fbtl_posix_component.c b/ompi/mca/fbtl/posix/fbtl_posix_component.c index 7dfb5d6eb3f..6ffceaea807 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_component.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c b/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c index ee4ac2b0345..00eaedeaf74 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,13 +46,13 @@ ssize_t mca_fbtl_posix_ipreadv (mca_io_ompio_file_t *fh, opal_output (1,"could not allocate memory\n"); return 0; } - + data->aio_req_count = fh->f_num_of_io_entries; data->aio_open_reqs = fh->f_num_of_io_entries; data->aio_req_type = FBTL_POSIX_READ; data->aio_req_chunks = fbtl_posix_max_aio_active_reqs; data->aio_total_len = 0; - data->aio_reqs = (struct aiocb *) malloc (sizeof(struct aiocb) * + data->aio_reqs = (struct aiocb *) malloc (sizeof(struct aiocb) * fh->f_num_of_io_entries); if (NULL == data->aio_reqs) { opal_output(1, "OUT OF MEMORY\n"); @@ -85,7 +85,7 @@ ssize_t mca_fbtl_posix_ipreadv (mca_io_ompio_file_t *fh, } else { data->aio_last_active_req = data->aio_req_count; - } + } for (i=0; i < data->aio_last_active_req; i++) { if (-1 == aio_read(&data->aio_reqs[i])) { opal_output(1, "aio_read() error: %s", strerror(errno)); diff --git a/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c b/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c index 058b5eb723d..1d869c2a756 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,13 +45,13 @@ ssize_t mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh, opal_output (1,"could not allocate memory\n"); return 0; } - + data->aio_req_count = fh->f_num_of_io_entries; data->aio_open_reqs = fh->f_num_of_io_entries; data->aio_req_type = FBTL_POSIX_WRITE; data->aio_req_chunks = fbtl_posix_max_aio_active_reqs; data->aio_total_len = 0; - data->aio_reqs = (struct aiocb *) malloc (sizeof(struct aiocb) * + data->aio_reqs = (struct aiocb *) malloc (sizeof(struct aiocb) * fh->f_num_of_io_entries); if (NULL == data->aio_reqs) { opal_output(1, "OUT OF MEMORY\n"); @@ -84,9 +84,9 @@ ssize_t mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh, } else { data->aio_last_active_req = data->aio_req_count; - } + } - for (i=0; i < data->aio_last_active_req; i++) { + for (i=0; i < data->aio_last_active_req; i++) { if (-1 == aio_write(&data->aio_reqs[i])) { opal_output(1, "aio_write() error: %s", strerror(errno)); free(data->aio_req_status); diff --git a/ompi/mca/fbtl/posix/fbtl_posix_preadv.c b/ompi/mca/fbtl/posix/fbtl_posix_preadv.c index 7fd8b0ab9df..ceb8b1d984c 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_preadv.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_preadv.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,12 +36,12 @@ ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh ) int iov_count = 0; OMPI_MPI_OFFSET_TYPE iov_offset = 0; ssize_t bytes_read=0, ret_code=0; - + if (NULL == fh->f_io_array) { return OMPI_ERROR; } - iov = (struct iovec *) malloc + iov = (struct iovec *) malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (struct iovec)); if (NULL == iov) { opal_output(1, "OUT OF MEMORY\n"); @@ -55,7 +55,7 @@ ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh ) iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset; iov_count ++; } - + if (OMPIO_IOVEC_INITIAL_SIZE*block <= iov_count) { block ++; iov = (struct iovec *)realloc @@ -66,20 +66,20 @@ ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh ) return OMPI_ERR_OUT_OF_RESOURCE; } } - + if (fh->f_num_of_io_entries != i+1) { - if (((((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + - (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == - (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset)) && - (iov_count < IOV_MAX ) ){ - iov[iov_count].iov_base = + if (((((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + + (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == + (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset)) && + (iov_count < IOV_MAX ) ){ + iov[iov_count].iov_base = fh->f_io_array[i+1].memory_address; iov[iov_count].iov_len = fh->f_io_array[i+1].length; iov_count ++; continue; } } - + if (-1 == lseek (fh->fd, iov_offset, SEEK_SET)) { opal_output(1, "lseek:%s", strerror(errno)); free(iov); diff --git a/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c b/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c index bcf616693b2..5208716d111 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,7 +43,7 @@ ssize_t mca_fbtl_posix_pwritev(mca_io_ompio_file_t *fh ) return OMPI_ERROR; } - iov = (struct iovec *) malloc + iov = (struct iovec *) malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (struct iovec)); if (NULL == iov) { opal_output(1, "OUT OF MEMORY\n"); @@ -57,7 +57,7 @@ ssize_t mca_fbtl_posix_pwritev(mca_io_ompio_file_t *fh ) iov_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset; iov_count ++; } - + if (OMPIO_IOVEC_INITIAL_SIZE*block <= iov_count) { block ++; iov = (struct iovec *)realloc @@ -68,13 +68,13 @@ ssize_t mca_fbtl_posix_pwritev(mca_io_ompio_file_t *fh ) return OMPI_ERR_OUT_OF_RESOURCE; } } - + if (fh->f_num_of_io_entries != i+1) { - if ( (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + - (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == - (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) && + if ( (((OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i].offset + + (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == + (OMPI_MPI_OFFSET_TYPE)(intptr_t)fh->f_io_array[i+1].offset) && (iov_count < IOV_MAX )) { - iov[iov_count].iov_base = + iov[iov_count].iov_base = fh->f_io_array[i+1].memory_address; iov[iov_count].iov_len = fh->f_io_array[i+1].length; iov_count ++; @@ -82,16 +82,16 @@ ssize_t mca_fbtl_posix_pwritev(mca_io_ompio_file_t *fh ) } } /* - printf ("RANK: %d Entries: %d count: %d\n", + printf ("RANK: %d Entries: %d count: %d\n", fh->f_rank, fh->f_num_of_io_entries, iov_count); for (j=0 ; jfd, iov_offset, SEEK_SET)) { opal_output(1, "lseek:%s", strerror(errno)); diff --git a/ompi/mca/fbtl/pvfs2/Makefile.am b/ompi/mca/fbtl/pvfs2/Makefile.am index 116dbcd0c59..fc877c819c1 100644 --- a/ompi/mca/fbtl/pvfs2/Makefile.am +++ b/ompi/mca/fbtl/pvfs2/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fbtl/pvfs2/configure.m4 b/ompi/mca/fbtl/pvfs2/configure.m4 index a5bef3b077b..6fea62d4d07 100644 --- a/ompi/mca/fbtl/pvfs2/configure.m4 +++ b/ompi/mca/fbtl/pvfs2/configure.m4 @@ -6,21 +6,21 @@ # 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, +# 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) 2008-2012 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_fbtl_pvfs2_CONFIG(action-if-can-compile, +# MCA_fbtl_pvfs2_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fbtl_pvfs2_CONFIG],[ diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c index cd017918e56..3289fcd62a4 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -52,9 +52,9 @@ static mca_fbtl_base_module_1_0_0_t pvfs2 = { int mca_fbtl_pvfs2_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} struct mca_fbtl_base_module_1_0_0_t * mca_fbtl_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) { @@ -69,9 +69,9 @@ mca_fbtl_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) { return &pvfs2; } -int mca_fbtl_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) { +int mca_fbtl_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) { /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -81,7 +81,7 @@ int mca_fbtl_pvfs2_module_init (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } - + int mca_fbtl_pvfs2_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h index 5bf2ac5ab56..eab4e2c1dde 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_pvfs2_compo * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *file); ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *file); @@ -68,8 +68,8 @@ ssize_t mca_fbtl_pvfs2_ipwritev (mca_io_ompio_file_t *file, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FBTL_PVFS2_H */ diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_component.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_component.c index 34ac9ce4ddc..45e0a58b73b 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_component.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c index 33794d4ad63..75a5edee547 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c index 525c62bc3d5..0915f3a0c73 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c index 59f225f9920..61e9e2460c7 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -53,8 +53,8 @@ ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *fh) for (i=0 ; if_num_of_io_entries ; i++) { if (fh->f_num_of_io_entries != i+1) { - if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + - (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == + if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + + (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i+1].offset) { if (!merge) { merge_offset = (OMPI_MPI_OFFSET_TYPE) @@ -68,27 +68,27 @@ ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *fh) } if (merge) { merge_buf = malloc (merge_length); - - ret = PVFS_Request_contiguous (merge_length, - PVFS_BYTE, + + ret = PVFS_Request_contiguous (merge_length, + PVFS_BYTE, &mem_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_Request_contiguous (merge_length, - PVFS_BYTE, + ret = PVFS_Request_contiguous (merge_length, + PVFS_BYTE, &file_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_sys_read (pvfs2_fs->object_ref, + ret = PVFS_sys_read (pvfs2_fs->object_ref, file_req, merge_offset, - merge_buf, + merge_buf, mem_req, - &(pvfs2_fs->credentials), + &(pvfs2_fs->credentials), &resp_io); if (ret != 0) { perror("PVFS_sys_write() error"); @@ -99,7 +99,7 @@ ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *fh) k = 0; while (merge >= 0) { memcpy (fh->f_io_array[i-merge].memory_address, - merge_buf + k, + merge_buf + k, fh->f_io_array[i-merge].length); k += fh->f_io_array[i-merge].length; merge --; @@ -113,27 +113,27 @@ ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *fh) } } else { - ret = PVFS_Request_contiguous (fh->f_io_array[i].length, - PVFS_BYTE, + ret = PVFS_Request_contiguous (fh->f_io_array[i].length, + PVFS_BYTE, &mem_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_Request_contiguous (fh->f_io_array[i].length, - PVFS_BYTE, + ret = PVFS_Request_contiguous (fh->f_io_array[i].length, + PVFS_BYTE, &file_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_sys_read (pvfs2_fs->object_ref, + ret = PVFS_sys_read (pvfs2_fs->object_ref, file_req, (OMPI_MPI_OFFSET_TYPE) fh ->f_io_array[i].offset, - fh->f_io_array[i].memory_address, + fh->f_io_array[i].memory_address, mem_req, - &(pvfs2_fs->credentials), + &(pvfs2_fs->credentials), &resp_io); if (ret != 0) { perror("PVFS_sys_write() error"); diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c index dbc4a978136..31c5b46c5df 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -54,8 +54,8 @@ ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *fh ) for (i=0 ; if_num_of_io_entries ; i++) { if (fh->f_num_of_io_entries != i+1) { - if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + - (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == + if (((OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i].offset + + (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].length) == (OMPI_MPI_OFFSET_TYPE)fh->f_io_array[i+1].offset) { if (!merge) { merge_offset = (OMPI_MPI_OFFSET_TYPE) @@ -79,40 +79,40 @@ ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *fh ) merge_buf = malloc (merge_length); k = 0; while (merge >= 0) { - memcpy (merge_buf + k, + memcpy (merge_buf + k, fh->f_io_array[i-merge].memory_address, fh->f_io_array[i-merge].length); k += fh->f_io_array[i-merge].length; merge --; } - - ret = PVFS_Request_contiguous (merge_length, - PVFS_BYTE, + + ret = PVFS_Request_contiguous (merge_length, + PVFS_BYTE, &mem_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_Request_contiguous (merge_length, - PVFS_BYTE, + ret = PVFS_Request_contiguous (merge_length, + PVFS_BYTE, &file_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_sys_write (pvfs2_fs->object_ref, + ret = PVFS_sys_write (pvfs2_fs->object_ref, file_req, merge_offset, - merge_buf, + merge_buf, mem_req, - &(pvfs2_fs->credentials), + &(pvfs2_fs->credentials), &resp_io); if (ret != 0) { perror("PVFS_sys_write() error"); return OMPI_ERROR; } total_bytes_written += (ssize_t)resp_io.total_completed; - + merge = 0; merge_offset = 0; merge_length = 0; @@ -122,27 +122,27 @@ ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *fh ) } } else { - ret = PVFS_Request_contiguous (fh->f_io_array[i].length, - PVFS_BYTE, + ret = PVFS_Request_contiguous (fh->f_io_array[i].length, + PVFS_BYTE, &mem_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_Request_contiguous (fh->f_io_array[i].length, - PVFS_BYTE, + ret = PVFS_Request_contiguous (fh->f_io_array[i].length, + PVFS_BYTE, &file_req); if (ret != 0) { perror("PVFS_Request_contiguous() error"); return OMPI_ERROR; } - ret = PVFS_sys_write (pvfs2_fs->object_ref, + ret = PVFS_sys_write (pvfs2_fs->object_ref, file_req, (OMPI_MPI_OFFSET_TYPE) fh ->f_io_array[i].offset, - fh->f_io_array[i].memory_address, + fh->f_io_array[i].memory_address, mem_req, - &(pvfs2_fs->credentials), + &(pvfs2_fs->credentials), &resp_io); if (ret != 0) { perror("PVFS_sys_write() error"); @@ -152,6 +152,6 @@ ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *fh ) } } - + return total_bytes_written; } diff --git a/ompi/mca/fcoll/Makefile.am b/ompi/mca/fcoll/Makefile.am index 0add37ec473..4523295104f 100644 --- a/ompi/mca/fcoll/Makefile.am +++ b/ompi/mca/fcoll/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fcoll/base/Makefile.am b/ompi/mca/fcoll/base/Makefile.am index b45878f6ee9..4a7f17d6e7f 100644 --- a/ompi/mca/fcoll/base/Makefile.am +++ b/ompi/mca/fcoll/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fcoll/base/base.h b/ompi/mca/fcoll/base/base.h index cbfc9e9a92f..9b10b8d2f97 100644 --- a/ompi/mca/fcoll/base/base.h +++ b/ompi/mca/fcoll/base/base.h @@ -5,20 +5,20 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** +/** * @file * * MCA fcoll base framework public interface functions. @@ -37,7 +37,7 @@ BEGIN_C_DECLS OMPI_DECLSPEC int mca_fcoll_base_file_select(struct mca_io_ompio_file_t *file, mca_base_component_t *preferred); -OMPI_DECLSPEC int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, +OMPI_DECLSPEC int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, char *name); OMPI_DECLSPEC int mca_fcoll_base_file_unselect(struct mca_io_ompio_file_t *file); diff --git a/ompi/mca/fcoll/base/fcoll_base_file_select.c b/ompi/mca/fcoll/base/fcoll_base_file_select.c index 9dba84ed432..0d8aa3ff009 100644 --- a/ompi/mca/fcoll/base/fcoll_base_file_select.c +++ b/ompi/mca/fcoll/base/fcoll_base_file_select.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,7 +30,7 @@ #include "ompi/mca/io/ompio/io_ompio.h" /* - * This structure is needed so that we can close the modules + * This structure is needed so that we can close the modules * which are not selected but were opened. mca_base_modules_close * which does this job for us requires a opal_list_t which contains * these modules @@ -58,20 +58,20 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * 4. Select the module with the highest priority * 5. Call the init function on the selected module so that it does the * right setup for the file - * 6. Call finalize on all the other modules which returned + * 6. Call finalize on all the other modules which returned * their module but were unfortunate to not get selected - */ + */ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, - mca_base_component_t *preferred) + mca_base_component_t *preferred) { - int priority; - int best_priority; - opal_list_item_t *item; + int priority; + int best_priority; + opal_list_item_t *item; mca_base_component_list_item_t *cli; - mca_fcoll_base_component_t *component; + mca_fcoll_base_component_t *component; mca_fcoll_base_component_t *best_component; - mca_fcoll_base_module_t *module; + mca_fcoll_base_module_t *module; opal_list_t queried; queried_module_t *om; int err = MPI_SUCCESS; @@ -79,19 +79,19 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, /* Check and see if a preferred component was provided. If it was provided then it should be used (if possible) */ if (NULL != preferred) { - + /* We have a preferred component. Check if it is available and if so, whether it wants to run */ opal_output_verbose(10, ompi_fcoll_base_framework.framework_output, "fcoll:base:file_select: Checking preferred component: %s", preferred->mca_component_name); - - /* query the component for its priority and get its module + + /* query the component for its priority and get its module structure. This is necessary to proceed */ - + component = (mca_fcoll_base_component_t *)preferred; module = component->fcollm_file_query (file, &priority); - if (NULL != module && + if (NULL != module && NULL != module->fcoll_module_init) { /* this query seems to have returned something legitimate @@ -104,7 +104,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, file->f_fcoll_component = preferred; return module->fcoll_module_init(file); - } + } /* His preferred component is present, but is unable to * run. This is not a good sign. We should try selecting * some other component We let it fall through and select @@ -121,7 +121,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, * All we need to do is to go through the list of available * components and find the one which has the highest priority and * use that for this file - */ + */ best_component = NULL; best_priority = -1; @@ -143,21 +143,21 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, } else { /* * call the query function and see what it returns - */ + */ module = component->fcollm_file_query (file, &priority); if (NULL == module || NULL == module->fcoll_module_init) { /* * query did not return any action which can be used - */ + */ opal_output_verbose(10, ompi_fcoll_base_framework.framework_output, "select: query returned failure"); } else { opal_output_verbose(10, ompi_fcoll_base_framework.framework_output, "select: query returned priority %d", priority); - /* + /* * is this the best component we have found till now? */ if (priority > best_priority) { @@ -174,8 +174,8 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, return OMPI_ERR_OUT_OF_RESOURCE; } om->om_component = component; - om->om_module = module; - opal_list_append(&queried, (opal_list_item_t *)om); + om->om_module = module; + opal_list_append(&queried, (opal_list_item_t *)om); } /* end else of if (NULL == module) */ } /* end else of if (NULL == component->fcollm_init) */ } /* end for ... end of traversal */ @@ -201,7 +201,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, * returned their priorities from the query. We now have to * unquery() those components which have not been selected and * init() the component which was selected - */ + */ while (NULL != (item = opal_list_remove_first(&queried))) { om = (queried_module_t *) item; if (om->om_component == best_component) { @@ -213,7 +213,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, * defined. Whereever a function pointer is null in the * module structure we need to fill it in with the base * structure function pointers. This is yet to be done - */ + */ /* * We don return here coz we still need to go through and @@ -245,7 +245,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, } /* if not best component */ OBJ_RELEASE(om); } /* traversing through the entire list */ - + opal_output_verbose(10, ompi_fcoll_base_framework.framework_output, "select: component %s selected", best_component->fcollm_version.mca_component_name); @@ -258,7 +258,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, char *name) { if (!strcmp (name, "individual")) { - if ((int)file->f_cc_size >= file->f_bytes_per_agg && + if ((int)file->f_cc_size >= file->f_bytes_per_agg && file->f_cc_size >= file->f_stripe_size) { return 1; } @@ -267,13 +267,13 @@ int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, char *name) } } if (!strcmp (name, "dynamic")) { - if ((int)file->f_cc_size < file->f_bytes_per_agg && + if ((int)file->f_cc_size < file->f_bytes_per_agg && file->f_cc_size >= file->f_stripe_size) { return 1; } } if (!strcmp (name, "two_phase")) { - if ((int)file->f_cc_size < file->f_bytes_per_agg && + if ((int)file->f_cc_size < file->f_bytes_per_agg && file->f_cc_size < file->f_stripe_size) { return 1; } diff --git a/ompi/mca/fcoll/base/fcoll_base_file_unselect.c b/ompi/mca/fcoll/base/fcoll_base_file_unselect.c index f461f770c47..b4b614ca8f8 100644 --- a/ompi/mca/fcoll/base/fcoll_base_file_unselect.c +++ b/ompi/mca/fcoll/base/fcoll_base_file_unselect.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fcoll/base/fcoll_base_find_available.c b/ompi/mca/fcoll/base/fcoll_base_find_available.c index 20736a354ee..47303eb5c12 100644 --- a/ompi/mca/fcoll/base/fcoll_base_find_available.c +++ b/ompi/mca/fcoll/base/fcoll_base_find_available.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -34,18 +34,18 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, bool enable_mpi_threads); - + int mca_fcoll_base_find_available(bool enable_progress_threads, bool enable_mpi_threads) { mca_base_component_list_item_t *cli, *next; - /* The list of components which we should check is already present - in mca_fcoll_base_components_opened, which was established in + /* The list of components which we should check is already present + in mca_fcoll_base_components_opened, which was established in mca_fcoll_base_open */ OPAL_LIST_FOREACH_SAFE(cli, next, &ompi_fcoll_base_framework.framework_components, mca_base_component_list_item_t) { - /* Now for this entry, we have to determine the thread level. Call + /* Now for this entry, we have to determine the thread level. Call a subroutine to do the job for us */ if (OMPI_SUCCESS != init_query(cli->cli_component, @@ -70,14 +70,14 @@ int mca_fcoll_base_find_available(bool enable_progress_threads, /* All done */ return OMPI_SUCCESS; } - - + + static int init_query(const mca_base_component_t *m, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { int ret; - + opal_output_verbose(10, ompi_fcoll_base_framework.framework_output, "fcoll:find_available: querying fcoll component %s", m->mca_component_name); @@ -116,11 +116,11 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { - mca_fcoll_base_component_2_0_0_t *fcoll = + mca_fcoll_base_component_2_0_0_t *fcoll = (mca_fcoll_base_component_2_0_0_t *) component; - + return fcoll->fcollm_init_query(enable_progress_threads, enable_mpi_threads); } diff --git a/ompi/mca/fcoll/base/fcoll_base_frame.c b/ompi/mca/fcoll/base/fcoll_base_frame.c index 77bba485db3..d4520cfd89a 100644 --- a/ompi/mca/fcoll/base/fcoll_base_frame.c +++ b/ompi/mca/fcoll/base/fcoll_base_frame.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fcoll/configure.m4 b/ompi/mca/fcoll/configure.m4 index 69dcb3ebcf8..ff87e2b7edd 100644 --- a/ompi/mca/fcoll/configure.m4 +++ b/ompi/mca/fcoll/configure.m4 @@ -3,15 +3,15 @@ # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # MCA_ompi_fcoll_CONFIG(project_name, framework_name) # ------------------------------------------- -AC_DEFUN([MCA_ompi_fcoll_CONFIG], +AC_DEFUN([MCA_ompi_fcoll_CONFIG], [ # An AC-ARG-ENABLE for mpi-io was set in ompi/mca/io/configure.m4. # If it's no, we shouldn't bother building anything in fcoll. diff --git a/ompi/mca/fcoll/dynamic/Makefile.am b/ompi/mca/fcoll/dynamic/Makefile.am index c983c24d840..e6d4cc02906 100644 --- a/ompi/mca/fcoll/dynamic/Makefile.am +++ b/ompi/mca/fcoll/dynamic/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -23,7 +23,7 @@ sources = \ fcoll_dynamic_module.c \ fcoll_dynamic_component.c \ fcoll_dynamic_file_read_all.c \ - fcoll_dynamic_file_write_all.c + fcoll_dynamic_file_write_all.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic.h b/ompi/mca/fcoll/dynamic/fcoll_dynamic.h index 62c70606bd8..66b14fa69b2 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic.h +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,17 +48,17 @@ int mca_fcoll_dynamic_component_file_unquery (mca_io_ompio_file_t *file); int mca_fcoll_dynamic_module_init (mca_io_ompio_file_t *file); int mca_fcoll_dynamic_module_finalize (mca_io_ompio_file_t *file); -int mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_component.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_component.c index 6fd25d175f5..e4aaa46a81a 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_component.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c index b9f4ad77e7b..dccd5fe12cd 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c @@ -34,7 +34,7 @@ /*Used for loading file-offsets per aggregator*/ typedef struct local_io_array{ OMPI_MPI_OFFSET_TYPE offset; - MPI_Aint length; + MPI_Aint length; int process_id; }local_io_array; @@ -46,10 +46,10 @@ int - mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, + mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, ompi_status_public_t *status) { MPI_Aint position = 0; @@ -89,7 +89,7 @@ int *sorted = NULL; int *displs = NULL; int dynamic_num_io_procs; - size_t max_data = 0; + size_t max_data = 0; int *bytes_per_process = NULL; MPI_Aint *total_bytes_per_process = NULL; ompi_datatype_t **sendtype = NULL; @@ -131,7 +131,7 @@ } fh->f_get_num_aggregators ( &dynamic_num_io_procs); - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, dynamic_num_io_procs, max_data); if (OMPI_SUCCESS != ret){ @@ -172,16 +172,16 @@ /********************************************************************* *** Generate the File offsets/lengths corresponding to this write *** ********************************************************************/ - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *) fh, max_data, &local_iov_array, &local_count); - + if (ret != OMPI_SUCCESS){ goto exit; } - + /* #########################################################*/ @@ -206,11 +206,11 @@ fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if (OMPI_SUCCESS != ret){ goto exit; } - + displs = (int*)malloc (fh->f_procs_per_group*sizeof(int)); if (NULL == displs) { opal_output (1, "OUT OF MEMORY\n"); @@ -239,7 +239,7 @@ /* allocate the global iovec */ if (0 != total_fview_count) { - global_iov_array = (struct iovec*)malloc (total_fview_count * + global_iov_array = (struct iovec*)malloc (total_fview_count * sizeof(struct iovec)); if (NULL == global_iov_array) { opal_output (1, "OUT OF MEMORY\n"); @@ -259,11 +259,11 @@ fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if (OMPI_SUCCESS != ret){ goto exit; } - + /* sort it */ if (0 != total_fview_count) { sorted = (int *)malloc (total_fview_count * sizeof(int)); @@ -280,7 +280,7 @@ local_iov_array = NULL; } - #if DEBUG_ON + #if DEBUG_ON if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { for (i=0 ; if_get_bytes_per_agg ( (int *) &bytes_per_cycle); cycles = ceil((double)total_bytes/bytes_per_cycle); - n = 0; - bytes_remaining = 0; + n = 0; + bytes_remaining = 0; current_index = 0; @@ -338,9 +338,9 @@ for (index = 0; index < cycles; index++) { /* Getting ready for next cycle Initializing and freeing buffers */ - if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { if (NULL == sendtype){ - sendtype = (ompi_datatype_t **) + sendtype = (ompi_datatype_t **) malloc (fh->f_procs_per_group * sizeof(ompi_datatype_t *)); if (NULL == sendtype) { opal_output (1, "OUT OF MEMORY\n"); @@ -348,9 +348,9 @@ goto exit; } } - + for(l=0;lf_procs_per_group;l++){ - sendtype[l] = MPI_DATATYPE_NULL; + sendtype[l] = MPI_DATATYPE_NULL; disp_index[l] = 1; if (NULL != blocklen_per_process[l]){ @@ -368,7 +368,7 @@ goto exit; } displs_per_process[l] = (MPI_Aint *) calloc (1, sizeof(MPI_Aint)); - if (NULL == displs_per_process[l]){ + if (NULL == displs_per_process[l]){ opal_output (1, "OUT OF MEMORY for displs\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; @@ -389,7 +389,7 @@ memory_displacements = NULL; } } - + if (cycles-1 == index) { bytes_to_read_in_cycle = total_bytes - bytes_per_cycle*index; @@ -397,17 +397,17 @@ else { bytes_to_read_in_cycle = bytes_per_cycle; } - + #if DEBUG_ON if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { printf ("****%d: CYCLE %d Bytes %d**********\n", fh->f_rank, - index, + index, bytes_to_write_in_cycle); } #endif - /* Calculate how much data will be contributed in this cycle + /* Calculate how much data will be contributed in this cycle by each process*/ bytes_received = 0; @@ -437,8 +437,8 @@ current_index ++; bytes_to_read_in_cycle -= bytes_remaining; bytes_remaining = 0; - if (fh->f_procs_in_group[fh->f_aggregator_index] == - fh->f_rank) { + if (fh->f_procs_in_group[fh->f_aggregator_index] == + fh->f_rank) { blocklen_per_process[n] = (int *) realloc ((void *)blocklen_per_process[n], (disp_index[n]+1)*sizeof(int)); displs_per_process[n] = (MPI_Aint *) realloc @@ -448,11 +448,11 @@ disp_index[n] += 1; } continue; - } + } else { if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = bytes_to_read_in_cycle; - displs_per_process[n][disp_index[n] - 1] = + displs_per_process[n][disp_index[n] - 1] = (OPAL_PTRDIFF_TYPE)global_iov_array[sorted[current_index]].iov_base + (global_iov_array[sorted[current_index]].iov_len - bytes_remaining); @@ -466,32 +466,32 @@ } } else { - if (bytes_to_read_in_cycle < + if (bytes_to_read_in_cycle < (MPI_Aint) global_iov_array[sorted[current_index]].iov_len) { - if (fh->f_procs_in_group[fh->f_aggregator_index] == + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = bytes_to_read_in_cycle; - displs_per_process[n][disp_index[n] - 1] = + displs_per_process[n][disp_index[n] - 1] = (OPAL_PTRDIFF_TYPE)global_iov_array[sorted[current_index]].iov_base ; } if (fh->f_procs_in_group[n] == fh->f_rank) { bytes_received += bytes_to_read_in_cycle; } - bytes_remaining = global_iov_array[sorted[current_index]].iov_len - + bytes_remaining = global_iov_array[sorted[current_index]].iov_len - bytes_to_read_in_cycle; bytes_to_read_in_cycle = 0; break; } else { - if (fh->f_procs_in_group[fh->f_aggregator_index] == + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = global_iov_array[sorted[current_index]].iov_len; displs_per_process[n][disp_index[n] - 1] = (OPAL_PTRDIFF_TYPE) global_iov_array[sorted[current_index]].iov_base; - blocklen_per_process[n] = + blocklen_per_process[n] = (int *) realloc ((void *)blocklen_per_process[n], (disp_index[n]+1)*sizeof(int)); displs_per_process[n] = (MPI_Aint *)realloc ((void *)displs_per_process[n], (disp_index[n]+1)*sizeof(MPI_Aint)); @@ -500,10 +500,10 @@ disp_index[n] += 1; } if (fh->f_procs_in_group[n] == fh->f_rank) { - bytes_received += + bytes_received += global_iov_array[sorted[current_index]].iov_len; } - bytes_to_read_in_cycle -= + bytes_to_read_in_cycle -= global_iov_array[sorted[current_index]].iov_len; current_index ++; continue; @@ -516,7 +516,7 @@ entries_per_aggregator=0; for (i=0;if_procs_per_group; i++){ for (j=0;j 0) + if (blocklen_per_process[i][j] > 0) entries_per_aggregator++ ; } } @@ -545,7 +545,7 @@ blocklen_per_process[i][j]; global_count += blocklen_per_process[i][j]; file_offsets_for_agg[temp_index].process_id = i; - file_offsets_for_agg[temp_index].offset = + file_offsets_for_agg[temp_index].offset = displs_per_process[i][j]; temp_index++; } @@ -558,14 +558,14 @@ read_heap_sort (file_offsets_for_agg, entries_per_aggregator, - sorted_file_offsets); + sorted_file_offsets); - memory_displacements = (MPI_Aint *) malloc + memory_displacements = (MPI_Aint *) malloc (entries_per_aggregator * sizeof(MPI_Aint)); memory_displacements[sorted_file_offsets[0]] = 0; for (i=1; if_io_array = (mca_io_ompio_io_array_t *) malloc + fh->f_io_array = (mca_io_ompio_io_array_t *) malloc (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); @@ -585,26 +585,26 @@ } fh->f_num_of_io_entries = 0; - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[0]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[0]]; fh->f_num_of_io_entries++; for (i=1;if_io_array[fh->f_num_of_io_entries - 1].length += - file_offsets_for_agg[sorted_file_offsets[i]].length; + file_offsets_for_agg[sorted_file_offsets[i]].length; } else{ - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[i]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[i]]; fh->f_num_of_io_entries++; } @@ -638,7 +638,7 @@ goto exit; } for (i=0; if_procs_in_group[i], 123, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &send_req[i])); if(OMPI_SUCCESS != ret){ @@ -718,7 +718,7 @@ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + ret = MCA_PML_CALL(irecv(receive_buf, bytes_received, MPI_BYTE, @@ -729,8 +729,8 @@ if (OMPI_SUCCESS != ret){ goto exit; } - - + + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank){ ret = ompi_request_wait_all (fh->f_procs_per_group, send_req, @@ -739,32 +739,32 @@ goto exit; } } - + ret = ompi_request_wait (recv_req, MPI_STATUS_IGNORE); if (OMPI_SUCCESS != ret){ goto exit; } position += bytes_received; - - /* If data is not contigous in memory, copy the data from the + + /* If data is not contigous in memory, copy the data from the receive buffer into the buffer passed in */ if (!(fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { OPAL_PTRDIFF_TYPE mem_address; size_t remaining = 0; size_t temp_position = 0; - + remaining = bytes_received; - + while (remaining) { mem_address = (OPAL_PTRDIFF_TYPE) (decoded_iov[iov_index].iov_base) + current_position; - - if (remaining >= + + if (remaining >= (decoded_iov[iov_index].iov_len - current_position)) { memcpy ((IOVBASE_TYPE *) mem_address, receive_buf+temp_position, decoded_iov[iov_index].iov_len - current_position); - remaining = remaining - + remaining = remaining - (decoded_iov[iov_index].iov_len - current_position); temp_position = temp_position + (decoded_iov[iov_index].iov_len - current_position); @@ -779,7 +779,7 @@ remaining = 0; } } - + if (NULL != receive_buf) { free (receive_buf); receive_buf = NULL; @@ -789,7 +789,7 @@ end_rcomm_time = MPI_Wtime(); rcomm_time += end_rcomm_time - start_rcomm_time; #endif - + if (NULL != recv_req){ free(recv_req); recv_req = NULL; @@ -805,7 +805,7 @@ global_buf = NULL; } for (i = 0; i < fh->f_procs_per_group; i++) { - if ( MPI_DATATYPE_NULL != sendtype[i] ){ + if ( MPI_DATATYPE_NULL != sendtype[i] ){ ompi_datatype_destroy(&sendtype[i]); } } @@ -850,7 +850,7 @@ if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){ fh->f_register_print_entry(READ_PRINT_QUEUE, nentry); - } + } #endif exit: @@ -863,7 +863,7 @@ if (NULL != global_buf) { free (global_buf); global_buf = NULL; - } + } if (NULL != sorted) { free (sorted); sorted = NULL; @@ -884,12 +884,12 @@ free(local_iov_array); local_iov_array=NULL; } - + if (NULL != displs) { free (displs); displs = NULL; } - if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { if (NULL != sorted_file_offsets){ free(sorted_file_offsets); @@ -917,7 +917,7 @@ free(disp_index); disp_index = NULL; } - + if ( NULL != blocklen_per_process){ for(l=0;lf_procs_per_group;l++){ if (NULL != blocklen_per_process[l]){ @@ -925,11 +925,11 @@ blocklen_per_process[l] = NULL; } } - + free(blocklen_per_process); blocklen_per_process = NULL; } - + if (NULL != displs_per_process){ for (l=0; if_procs_per_group; l++){ if (NULL != displs_per_process[l]){ @@ -940,7 +940,7 @@ free(displs_per_process); displs_per_process = NULL; } - + } return ret; } @@ -978,15 +978,15 @@ while (!done) { left = j*2+1; right = j*2+2; - if ((left <= heap_size) && + if ((left <= heap_size) && (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -1005,8 +1005,8 @@ for (i = num_entries-1; i >=1; --i) { temp = temp_arr[0]; temp_arr[0] = temp_arr[i]; - temp_arr[i] = temp; - heap_size--; + temp_arr[i] = temp; + heap_size--; done = 0; j = 0; largest = j; @@ -1015,16 +1015,16 @@ left = j*2+1; right = j*2+2; - if ((left <= heap_size) && - (io_array[temp_arr[left]].offset > + if ((left <= heap_size) && + (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c index 7117dd476de..475c5289750 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c @@ -35,7 +35,7 @@ /*Used for loading file-offsets per aggregator*/ typedef struct local_io_array{ OMPI_MPI_OFFSET_TYPE offset; - MPI_Aint length; + MPI_Aint length; int process_id; }local_io_array; @@ -83,20 +83,20 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, char *global_buf = NULL; MPI_Aint global_count = 0; - - + + /* array that contains the sorted indices of the global_iov */ int *sorted = NULL, *sorted_file_offsets=NULL; int *displs = NULL; int dynamic_num_io_procs; - size_t max_data = 0, datatype_size = 0; + size_t max_data = 0, datatype_size = 0; int **blocklen_per_process=NULL; MPI_Aint **displs_per_process=NULL, *memory_displacements=NULL; ompi_datatype_t **recvtype = NULL; MPI_Aint *total_bytes_per_process = NULL; MPI_Request *send_req=NULL, *recv_req=NULL; int recv_req_count=0; - + #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0; @@ -132,12 +132,12 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if ( MPI_STATUS_IGNORE != status ) { status->_ucount = max_data; } - + fh->f_get_num_aggregators ( &dynamic_num_io_procs ); - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, dynamic_num_io_procs, max_data); - + if (OMPI_SUCCESS != ret){ goto exit; } @@ -161,7 +161,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if( OMPI_SUCCESS != ret){ goto exit; } @@ -173,7 +173,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, free (total_bytes_per_process); total_bytes_per_process = NULL; } - + /********************************************************************* *** Generate the File offsets/lengths corresponding to this write *** ********************************************************************/ @@ -185,16 +185,16 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, goto exit; } -#if DEBUG_ON +#if DEBUG_ON for (i=0 ; if_rank, local_iov_array[i].iov_base, local_iov_array[i].iov_len); } -#endif +#endif /************************************************************* *** ALLGather the File View information at all processes *** @@ -217,7 +217,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if( OMPI_SUCCESS != ret){ goto exit; } @@ -235,7 +235,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, total_fview_count += fview_count[i]; displs[i] = displs[i-1] + fview_count[i-1]; } - + #if DEBUG_ON printf("total_fview_count : %d\n", total_fview_count); if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { @@ -248,7 +248,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } } #endif - + /* allocate the global iovec */ if (0 != total_fview_count) { @@ -261,7 +261,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } } - + ret = fh->f_allgatherv_array (local_iov_array, local_count, fh->f_iov_type, @@ -297,8 +297,8 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, free(displs); displs=NULL; } - - + + #if DEBUG_ON if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { uint32_t tv=0; @@ -310,7 +310,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } } #endif - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { disp_index = (int *)malloc (fh->f_procs_per_group * sizeof (int)); if (NULL == disp_index) { @@ -338,13 +338,13 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, displs_per_process[i] = NULL; } } - + fh->f_get_bytes_per_agg ( (int *)&bytes_per_cycle ); cycles = ceil((double)total_bytes/bytes_per_cycle); - n = 0; + n = 0; bytes_remaining = 0; current_index = 0; @@ -354,15 +354,15 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_exch = MPI_Wtime(); #endif - + for (index = 0; index < cycles; index++) { - /* Getting ready for next cycle + /* Getting ready for next cycle Initializing and freeing buffers*/ if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { - + if (NULL == recvtype){ - recvtype = (ompi_datatype_t **) + recvtype = (ompi_datatype_t **) malloc (fh->f_procs_per_group * sizeof(ompi_datatype_t *)); if (NULL == recvtype) { opal_output (1, "OUT OF MEMORY\n"); @@ -370,11 +370,11 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, goto exit; } } - + for(l=0;lf_procs_per_group;l++){ - recvtype[i] = MPI_DATATYPE_NULL; + recvtype[i] = MPI_DATATYPE_NULL; disp_index[l] = 1; - + if (NULL != blocklen_per_process[l]){ free(blocklen_per_process[l]); blocklen_per_process[l] = NULL; @@ -390,50 +390,50 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, goto exit; } displs_per_process[l] = (MPI_Aint *) calloc (1, sizeof(MPI_Aint)); - if (NULL == displs_per_process[l]){ + if (NULL == displs_per_process[l]){ opal_output (1, "OUT OF MEMORY for displs\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } } - + if (NULL != sorted_file_offsets){ free(sorted_file_offsets); sorted_file_offsets = NULL; } - + if(NULL != file_offsets_for_agg){ free(file_offsets_for_agg); file_offsets_for_agg = NULL; } - + if (NULL != memory_displacements){ free(memory_displacements); memory_displacements = NULL; } - + } - + if (cycles-1 == index) { bytes_to_write_in_cycle = total_bytes - bytes_per_cycle*index; } else { bytes_to_write_in_cycle = bytes_per_cycle; } - + #if DEBUG_ON if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { printf ("****%d: CYCLE %d Bytes %lld**********\n", fh->f_rank, - index, + index, bytes_to_write_in_cycle); } #endif /********************************************************** **Gather the Data from all the processes at the writers ** *********************************************************/ - - /* Calculate how much data will be contributed in this cycle + + /* Calculate how much data will be contributed in this cycle by each process*/ bytes_sent = 0; #if DEBUG_ON @@ -444,7 +444,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, while (bytes_to_write_in_cycle) { - + blocks = fview_count[0]; for (j=0 ; jf_procs_per_group ; j++) { if (sorted[current_index] < blocks) { @@ -455,18 +455,18 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, blocks += fview_count[j+1]; } } - + if (bytes_remaining) { if (bytes_remaining <= bytes_to_write_in_cycle) { - if (fh->f_procs_in_group[fh->f_aggregator_index] == + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = bytes_remaining; - displs_per_process[n][disp_index[n] - 1] = - (OPAL_PTRDIFF_TYPE)global_iov_array[sorted[current_index]].iov_base + + displs_per_process[n][disp_index[n] - 1] = + (OPAL_PTRDIFF_TYPE)global_iov_array[sorted[current_index]].iov_base + (global_iov_array[sorted[current_index]].iov_len - bytes_remaining); - + } if (fh->f_procs_in_group[n] == fh->f_rank) { bytes_sent += bytes_remaining; @@ -474,11 +474,11 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, current_index ++; bytes_to_write_in_cycle -= bytes_remaining; bytes_remaining = 0; - if (fh->f_procs_in_group[fh->f_aggregator_index] == - fh->f_rank) { + if (fh->f_procs_in_group[fh->f_aggregator_index] == + fh->f_rank) { /* In this cases the length is consumed so allocating for next displacement and blocklength*/ - + blocklen_per_process[n] = (int *) realloc ((void *)blocklen_per_process[n], (disp_index[n]+1)*sizeof(int)); displs_per_process[n] = (MPI_Aint *) realloc @@ -490,15 +490,15 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, continue; } else { - if (fh->f_procs_in_group[fh->f_aggregator_index] == + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = bytes_to_write_in_cycle; - displs_per_process[n][disp_index[n] - 1] = + displs_per_process[n][disp_index[n] - 1] = (OPAL_PTRDIFF_TYPE)global_iov_array[sorted[current_index]].iov_base + (global_iov_array[sorted[current_index]].iov_len - bytes_remaining); } - + if (fh->f_procs_in_group[n] == fh->f_rank) { bytes_sent += bytes_to_write_in_cycle; } @@ -508,56 +508,56 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } } else { - if (bytes_to_write_in_cycle < + if (bytes_to_write_in_cycle < (MPI_Aint) global_iov_array[sorted[current_index]].iov_len) { - if (fh->f_procs_in_group[fh->f_aggregator_index] == + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = bytes_to_write_in_cycle; - displs_per_process[n][disp_index[n] - 1] = + displs_per_process[n][disp_index[n] - 1] = (OPAL_PTRDIFF_TYPE)global_iov_array[sorted[current_index]].iov_base ; } if (fh->f_procs_in_group[n] == fh->f_rank) { bytes_sent += bytes_to_write_in_cycle; - + } - bytes_remaining = global_iov_array[sorted[current_index]].iov_len - + bytes_remaining = global_iov_array[sorted[current_index]].iov_len - bytes_to_write_in_cycle; bytes_to_write_in_cycle = 0; break; } else { - if (fh->f_procs_in_group[fh->f_aggregator_index] == + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { blocklen_per_process[n][disp_index[n] - 1] = global_iov_array[sorted[current_index]].iov_len; displs_per_process[n][disp_index[n] - 1] = (OPAL_PTRDIFF_TYPE) global_iov_array[sorted[current_index]].iov_base; - - blocklen_per_process[n] = + + blocklen_per_process[n] = (int *) realloc ((void *)blocklen_per_process[n], (disp_index[n]+1)*sizeof(int)); displs_per_process[n] = (MPI_Aint *)realloc ((void *)displs_per_process[n], (disp_index[n]+1)*sizeof(MPI_Aint)); blocklen_per_process[n][disp_index[n]] = 0; displs_per_process[n][disp_index[n]] = 0; disp_index[n] += 1; - /*realloc for next blocklength + /*realloc for next blocklength and assign this displacement and check for next displs as the total length of this entry has been consumed!*/ } if (fh->f_procs_in_group[n] == fh->f_rank) { bytes_sent += global_iov_array[sorted[current_index]].iov_len; } - bytes_to_write_in_cycle -= + bytes_to_write_in_cycle -= global_iov_array[sorted[current_index]].iov_len; current_index ++; continue; } } } - + /* Calculate the displacement on where to put the data and allocate the recieve buffer (global_buf) */ @@ -565,7 +565,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, entries_per_aggregator=0; for (i=0;if_procs_per_group; i++){ for (j=0;j 0) + if (blocklen_per_process[i][j] > 0) entries_per_aggregator++ ; } } @@ -575,7 +575,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, bytes_sent); printf("%d : Entries per aggregator : %d\n",fh->f_rank,entries_per_aggregator); #endif - + if (entries_per_aggregator > 0){ file_offsets_for_agg = (local_io_array *) malloc(entries_per_aggregator*sizeof(local_io_array)); @@ -584,7 +584,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + sorted_file_offsets = (int *) malloc (entries_per_aggregator*sizeof(int)); if (NULL == sorted_file_offsets){ @@ -592,24 +592,24 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + /*Moving file offsets to an IO array!*/ temp_index = 0; - + for (i=0;if_procs_per_group; i++){ for(j=0;j 0){ file_offsets_for_agg[temp_index].length = blocklen_per_process[i][j]; file_offsets_for_agg[temp_index].process_id = i; - file_offsets_for_agg[temp_index].offset = + file_offsets_for_agg[temp_index].offset = displs_per_process[i][j]; temp_index++; - + #if DEBUG_ON - printf("************Cycle: %d, Aggregator: %d ***************\n", + printf("************Cycle: %d, Aggregator: %d ***************\n", index+1,fh->f_rank); - + printf("%d sends blocklen[%d]: %d, disp[%d]: %ld to %d\n", fh->f_procs_in_group[i],j, blocklen_per_process[i][j],j, @@ -626,28 +626,28 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, /* Sort the displacements for each aggregator*/ local_heap_sort (file_offsets_for_agg, entries_per_aggregator, - sorted_file_offsets); - - /*create contiguous memory displacements + sorted_file_offsets); + + /*create contiguous memory displacements based on blocklens on the same displs array - and map it to this aggregator's actual + and map it to this aggregator's actual file-displacements (this is in the io-array created above)*/ - memory_displacements = (MPI_Aint *) malloc + memory_displacements = (MPI_Aint *) malloc (entries_per_aggregator * sizeof(MPI_Aint)); - + memory_displacements[sorted_file_offsets[0]] = 0; for (i=1; if_procs_per_group * sizeof (int)); if (NULL == temp_disp_index) { opal_output (1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + /*Now update the displacements array with memory offsets*/ global_count = 0; for (i=0;if_rank); for (i=0;if_procs_per_group; i++){ for(j=0;jf_rank); - + } } } - printf("************Cycle: %d, Aggregator: %d ***************\n", + printf("************Cycle: %d, Aggregator: %d ***************\n", index+1,fh->f_rank); for (i=0; if_procs_per_group; i++){ - + ompi_datatype_create_hindexed(disp_index[i], blocklen_per_process[i], displs_per_process[i], MPI_BYTE, &recvtype[i]); - ompi_datatype_commit(&recvtype[i]); - - opal_datatype_type_size(&recvtype[i]->super, + ompi_datatype_commit(&recvtype[i]); + + opal_datatype_type_size(&recvtype[i]->super, &datatype_size); - + if (datatype_size){ - - recv_req = (MPI_Request *)realloc + + recv_req = (MPI_Request *)realloc ((void *)recv_req, (recv_req_count + 1)*sizeof(MPI_Request)); - + ret = MCA_PML_CALL(irecv(global_buf, 1, recvtype[i], @@ -737,16 +737,16 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, fh->f_comm, &recv_req[recv_req_count])); recv_req_count++; - + if (OMPI_SUCCESS != ret){ goto exit; } } } - + } - - + + if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) { send_buf = &((char*)buf)[total_bytes_written]; @@ -758,25 +758,25 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, OPAL_PTRDIFF_TYPE mem_address; size_t remaining = 0; size_t temp_position = 0; - + send_buf = malloc (bytes_sent); if (NULL == send_buf) { opal_output (1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + remaining = bytes_sent; - + while (remaining) { mem_address = (OPAL_PTRDIFF_TYPE) (decoded_iov[iov_index].iov_base) + current_position; - - if (remaining >= + + if (remaining >= (decoded_iov[iov_index].iov_len - current_position)) { memcpy (send_buf+temp_position, (IOVBASE_TYPE *)mem_address, decoded_iov[iov_index].iov_len - current_position); - remaining = remaining - + remaining = remaining - (decoded_iov[iov_index].iov_len - current_position); temp_position = temp_position + (decoded_iov[iov_index].iov_len - current_position); @@ -794,9 +794,9 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, } total_bytes_written += bytes_sent; - /* Gather the sendbuf from each process in appropritate locations in + /* Gather the sendbuf from each process in appropritate locations in aggregators*/ - + send_req = (MPI_Request *) malloc (sizeof(MPI_Request)); if (NULL == send_req){ opal_output (1, "OUT OF MEMORY\n"); @@ -804,7 +804,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, goto exit; } - + if (bytes_sent){ ret = MCA_PML_CALL(isend(send_buf, @@ -812,11 +812,11 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, MPI_BYTE, fh->f_procs_in_group[fh->f_aggregator_index], 123, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, - send_req)); + send_req)); + - if ( OMPI_SUCCESS != ret ){ goto exit; } @@ -825,19 +825,19 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if (OMPI_SUCCESS != ret){ goto exit; } - } - if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + } + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { ret = ompi_request_wait_all (recv_req_count, recv_req, MPI_STATUS_IGNORE); - + if (OMPI_SUCCESS != ret){ goto exit; } } #if DEBUG_ON if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank){ - printf("************Cycle: %d, Aggregator: %d ***************\n", + printf("************Cycle: %d, Aggregator: %d ***************\n", index+1,fh->f_rank); for (i=0 ; if_flags & OMPIO_CONTIGUOUS_MEMORY)) { if (NULL != send_buf) { free (send_buf); @@ -864,7 +864,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, /********************************************************** **************** DONE GATHERING OF DATA ****************** *********************************************************/ - + /********************************************************** ******* Create the io array, and pass it to fbtl ********* *********************************************************/ @@ -874,46 +874,46 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_write_time = MPI_Wtime(); #endif - - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc + + fh->f_io_array = (mca_io_ompio_io_array_t *) malloc (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + fh->f_num_of_io_entries = 0; /*First entry for every aggregator*/ - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[0]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[0]]; fh->f_num_of_io_entries++; for (i=1;if_io_array[fh->f_num_of_io_entries - 1].length += - file_offsets_for_agg[sorted_file_offsets[i]].length; + file_offsets_for_agg[sorted_file_offsets[i]].length; } else { - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[i]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[i]]; fh->f_num_of_io_entries++; } - + } - + #if DEBUG_ON printf("*************************** %d\n", fh->f_num_of_io_entries); for (i=0 ; if_num_of_io_entries ; i++) { @@ -922,7 +922,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, (OPAL_PTRDIFF_TYPE)fh->f_io_array[i].offset, fh->f_io_array[i].length); } - + #endif @@ -936,17 +936,17 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN end_write_time = MPI_Wtime(); write_time += end_write_time - start_write_time; -#endif +#endif } - - + + if (NULL != send_req){ free(send_req); send_req = NULL; } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { fh->f_num_of_io_entries = 0; if (NULL != fh->f_io_array) { @@ -965,15 +965,15 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if (NULL != recv_req){ free(recv_req); recv_req = NULL; - + } if (NULL != global_buf) { free (global_buf); global_buf = NULL; } - + } - + } #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN @@ -990,7 +990,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){ fh->f_register_print_entry(WRITE_PRINT_QUEUE, nentry); - } + } #endif @@ -1085,7 +1085,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, free (decoded_iov); decoded_iov = NULL; } - + if (NULL != send_req){ free(send_req); send_req = NULL; @@ -1127,15 +1127,15 @@ static int local_heap_sort (local_io_array *io_array, while (!done) { left = j*2+1; right = j*2+2; - if ((left <= heap_size) && + if ((left <= heap_size) && (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -1154,8 +1154,8 @@ static int local_heap_sort (local_io_array *io_array, for (i = num_entries-1; i >=1; --i) { temp = temp_arr[0]; temp_arr[0] = temp_arr[i]; - temp_arr[i] = temp; - heap_size--; + temp_arr[i] = temp; + heap_size--; done = 0; j = 0; largest = j; @@ -1163,17 +1163,17 @@ static int local_heap_sort (local_io_array *io_array, while (!done) { left = j*2+1; right = j*2+2; - - if ((left <= heap_size) && - (io_array[temp_arr[left]].offset > + + if ((left <= heap_size) && + (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c index 85b2b7afd12..4d3466b3ec8 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -70,9 +70,9 @@ mca_fcoll_dynamic_component_file_query (mca_io_ompio_file_t *fh, int *priority) } int mca_fcoll_dynamic_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -83,8 +83,8 @@ int mca_fcoll_dynamic_module_init (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } - -int mca_fcoll_dynamic_module_finalize (mca_io_ompio_file_t *file) + +int mca_fcoll_dynamic_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fcoll/fcoll.h b/ompi/mca/fcoll/fcoll.h index ec0a6fc23ee..295bece24f2 100644 --- a/ompi/mca/fcoll/fcoll.h +++ b/ompi/mca/fcoll/fcoll.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,9 +44,9 @@ struct mca_fcoll_request_t; * This framework provides the abstraction for the collective file * read and write operations of MPI I/O. The interfaces include * blocking collective operations using the individual file pointer, - * blocking collective operations using explicit offsets and + * blocking collective operations using explicit offsets and * the split collective operations defined in MPI/O for the same. - * + * * These are the component function prototypes. These function pointers * go into the component structure. These functions (query() and finalize() * are called during fcoll_base_select(). Each component is query() ied @@ -69,11 +69,11 @@ struct mca_fcoll_request_t; * **************** component struct ******************************* */ -typedef int (*mca_fcoll_base_component_init_query_1_0_0_fn_t) - (bool enable_progress_threads, +typedef int (*mca_fcoll_base_component_init_query_1_0_0_fn_t) + (bool enable_progress_threads, bool enable_mpi_threads); -typedef struct mca_fcoll_base_module_1_0_0_t * +typedef struct mca_fcoll_base_module_1_0_0_t * (*mca_fcoll_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file, int *priority); @@ -88,7 +88,7 @@ typedef int (*mca_fcoll_base_component_file_unquery_1_0_0_fn_t) struct mca_fcoll_base_component_2_0_0_t { mca_base_component_t fcollm_version; mca_base_component_data_t fcollm_data; - + mca_fcoll_base_component_init_query_1_0_0_fn_t fcollm_init_query; mca_fcoll_base_component_file_query_1_0_0_fn_t fcollm_file_query; mca_fcoll_base_component_file_unquery_1_0_0_fn_t fcollm_file_unquery; @@ -157,7 +157,7 @@ struct mca_fcoll_base_module_1_0_0_t { */ mca_fcoll_base_module_init_1_0_0_fn_t fcoll_module_init; mca_fcoll_base_module_finalize_1_0_0_fn_t fcoll_module_finalize; - + /* FCOLL function pointers */ mca_fcoll_base_module_file_read_all_fn_t fcoll_file_read_all; mca_fcoll_base_module_file_iread_all_fn_t fcoll_file_iread_all; @@ -165,7 +165,7 @@ struct mca_fcoll_base_module_1_0_0_t { mca_fcoll_base_module_file_iwrite_all_fn_t fcoll_file_iwrite_all; mca_fcoll_base_module_progress_fn_t fcoll_progress; mca_fcoll_base_module_request_free_fn_t fcoll_request_free; - + }; typedef struct mca_fcoll_base_module_1_0_0_t mca_fcoll_base_module_1_0_0_t; typedef mca_fcoll_base_module_1_0_0_t mca_fcoll_base_module_t; diff --git a/ompi/mca/fcoll/individual/Makefile.am b/ompi/mca/fcoll/individual/Makefile.am index 727e3f52f37..7fc9af1b623 100644 --- a/ompi/mca/fcoll/individual/Makefile.am +++ b/ompi/mca/fcoll/individual/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fcoll/individual/fcoll_individual.h b/ompi/mca/fcoll/individual/fcoll_individual.h index 9ae1f967854..8fad365ee63 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual.h +++ b/ompi/mca/fcoll/individual/fcoll_individual.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,17 +48,17 @@ int mca_fcoll_individual_component_file_unquery (mca_io_ompio_file_t *file); int mca_fcoll_individual_module_init (mca_io_ompio_file_t *file); int mca_fcoll_individual_module_finalize (mca_io_ompio_file_t *file); -int mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); diff --git a/ompi/mca/fcoll/individual/fcoll_individual_component.c b/ompi/mca/fcoll/individual/fcoll_individual_component.c index 829fa10a59a..722b80c42f4 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_component.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c b/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c index 2cfdbbe3671..225ad781553 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c @@ -32,10 +32,10 @@ /* this component just directly calls the individual I/O operations */ int -mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, +mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, ompi_status_public_t *status) { return fh->f_fh->f_io_selected_module.v2_0_0. diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c b/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c index 2697f9aebf0..43147cf03d0 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c @@ -29,10 +29,10 @@ #include -int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, +int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, ompi_status_public_t *status) { return fh->f_fh->f_io_selected_module.v2_0_0. diff --git a/ompi/mca/fcoll/individual/fcoll_individual_module.c b/ompi/mca/fcoll/individual/fcoll_individual_module.c index eb30d6c41c9..3f29a10a4ee 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_module.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_module.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,14 +68,14 @@ mca_fcoll_individual_component_file_query (mca_io_ompio_file_t *fh, int *priorit *priority = 100; } } - + return &individual; } int mca_fcoll_individual_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -86,8 +86,8 @@ int mca_fcoll_individual_module_init (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } - -int mca_fcoll_individual_module_finalize (mca_io_ompio_file_t *file) + +int mca_fcoll_individual_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fcoll/static/Makefile.am b/ompi/mca/fcoll/static/Makefile.am index ee01ac7ec26..c9ff1893d2f 100644 --- a/ompi/mca/fcoll/static/Makefile.am +++ b/ompi/mca/fcoll/static/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -23,7 +23,7 @@ sources = \ fcoll_static_module.c \ fcoll_static_component.c \ fcoll_static_file_read_all.c \ - fcoll_static_file_write_all.c + fcoll_static_file_write_all.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/static/fcoll_static.h b/ompi/mca/fcoll/static/fcoll_static.h index be03c032ea6..b0c100ef9a9 100644 --- a/ompi/mca/fcoll/static/fcoll_static.h +++ b/ompi/mca/fcoll/static/fcoll_static.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,17 +47,17 @@ int mca_fcoll_static_component_file_unquery (mca_io_ompio_file_t *file); int mca_fcoll_static_module_init (mca_io_ompio_file_t *file); int mca_fcoll_static_module_finalize (mca_io_ompio_file_t *file); -int mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); diff --git a/ompi/mca/fcoll/static/fcoll_static_component.c b/ompi/mca/fcoll/static/fcoll_static_component.c index 32e600d2b71..d71e7ec67fd 100644 --- a/ompi/mca/fcoll/static/fcoll_static_component.c +++ b/ompi/mca/fcoll/static/fcoll_static_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fcoll/static/fcoll_static_file_read_all.c b/ompi/mca/fcoll/static/fcoll_static_file_read_all.c index a00617d7ea9..cf8fc6b1ab5 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_read_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_read_all.c @@ -49,7 +49,7 @@ int read_local_heap_sort (local_io_array *io_array, int read_find_next_index( int proc_index, int c_index, - mca_io_ompio_file_t *fh, + mca_io_ompio_file_t *fh, local_io_array *global_iov_array, int global_iov_count, int *sorted); @@ -60,10 +60,10 @@ int read_get_process_id (int rank, int -mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype, +mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, ompi_status_public_t *status) { @@ -74,7 +74,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, int *displs=NULL, *sorted=NULL ,entries_per_aggregator=0; int *sorted_file_offsets=NULL, temp_index=0, position=0, *temp_disp_index=NULL; - + MPI_Aint **displs_per_process=NULL, global_iov_count=0, global_count=0; MPI_Aint *memory_displacements=NULL; int bytes_to_read_in_cycle=0; @@ -85,7 +85,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, local_io_array *file_offsets_for_agg=NULL; char *global_buf=NULL, *receive_buf=NULL; - + int blocklen[3] = {1, 1, 1}; int static_num_io_procs=1; OPAL_PTRDIFF_TYPE d[3], base; @@ -101,7 +101,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0; mca_io_ompio_print_entry nentry; #endif -#if DEBUG_ON +#if DEBUG_ON MPI_Aint gc_in; #endif @@ -109,7 +109,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, // fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY; // } - + /* In case the data is not contigous in memory, decode it into an iovec */ if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { fh->f_decode_datatype ( (struct mca_io_ompio_file_t *)fh, @@ -127,13 +127,13 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, if ( MPI_STATUS_IGNORE != status ) { status->_ucount = max_data; } - + fh->f_get_num_aggregators ( &static_num_io_procs ); - fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, static_num_io_procs, max_data); - + /* printf("max_data %ld\n", max_data); */ ret = fh->f_generate_current_file_view((struct mca_io_ompio_file_t *)fh, max_data, @@ -149,14 +149,14 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for (j=0; j < iov_size; j++){ local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t) iov[j].iov_base; local_iov_array[j].length = (size_t)iov[j].iov_len; local_iov_array[j].process_id = fh->f_rank; - + } } else { @@ -167,7 +167,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + local_iov_array[0].offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t) 0; local_iov_array[0].length = (size_t) 0; @@ -186,7 +186,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, types[0] = &ompi_mpi_long.dt; types[1] = &ompi_mpi_long.dt; types[2] = &ompi_mpi_int.dt; - + ompi_datatype_create_struct (3, blocklen, d, @@ -194,11 +194,11 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, &io_array_type); ompi_datatype_commit (&io_array_type); /* #########################################################*/ - - - fh->f_get_bytes_per_agg ( (int*) &bytes_per_cycle); + + + fh->f_get_bytes_per_agg ( (int*) &bytes_per_cycle); local_cycles = ceil((double)max_data/bytes_per_cycle); - ret = fh->f_comm->c_coll.coll_allreduce (&local_cycles, + ret = fh->f_comm->c_coll.coll_allreduce (&local_cycles, &cycles, 1, MPI_INT, @@ -238,7 +238,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + blocklen_per_process = (int **)malloc (fh->f_procs_per_group * sizeof (int*)); if (NULL == blocklen_per_process) { opal_output (1, "OUT OF MEMORY\n"); @@ -287,11 +287,11 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if( OMPI_SUCCESS != ret){ goto exit; } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { displs[0] = 0; global_iov_count = iovec_count_per_process[0]; @@ -301,8 +301,8 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } } - - if ( (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) && + + if ( (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) && (global_iov_count > 0 )) { global_iov_array = (local_io_array *) malloc (global_iov_count * sizeof(local_io_array)); @@ -312,7 +312,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } } - + ret = fh->f_gatherv_array (local_iov_array, iov_size, io_array_type, @@ -324,19 +324,19 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if (OMPI_SUCCESS != ret){ fprintf(stderr,"global_iov_array gather error!\n"); goto exit; } - + if (NULL != local_iov_array){ free(local_iov_array); local_iov_array = NULL; } - - if ( ( fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) && + + if ( ( fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) && ( global_iov_count > 0 )) { sorted = (int *)malloc (global_iov_count * sizeof(int)); if (NULL == sorted) { @@ -346,7 +346,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } read_local_heap_sort (global_iov_array, global_iov_count, sorted); } - + #if DEBUG_ON if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { @@ -368,7 +368,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { if (NULL == sendtype){ - sendtype = (ompi_datatype_t **) + sendtype = (ompi_datatype_t **) malloc (fh->f_procs_per_group * sizeof(ompi_datatype_t *)); if (NULL == sendtype) { opal_output (1, "OUT OF MEMORY\n"); @@ -376,7 +376,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } } - + if (NULL == bytes_per_process){ bytes_per_process = (int *) malloc (fh->f_procs_per_group * sizeof(int)); if (NULL == bytes_per_process){ @@ -385,7 +385,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } } - + for(l=0;lf_procs_per_group;l++){ disp_index[l] = 1; if (NULL != blocklen_per_process[l]){ @@ -403,7 +403,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } displs_per_process[l] = (MPI_Aint *) calloc (1, sizeof(MPI_Aint)); - if (NULL == displs_per_process[l]){ + if (NULL == displs_per_process[l]){ opal_output (1, "OUT OF MEMORY for displs\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; @@ -434,7 +434,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) { receive_buf = &((char*)buf)[position]; } @@ -445,8 +445,8 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - } - + } + recv_req = (MPI_Request *) malloc (sizeof (MPI_Request)); if (NULL == recv_req){ opal_output (1, "OUT OF MEMORY\n"); @@ -457,7 +457,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - + ret = MCA_PML_CALL(irecv(receive_buf, bytes_to_read_in_cycle, MPI_BYTE, @@ -473,8 +473,8 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, end_rcomm_time = MPI_Wtime(); rcomm_time += end_rcomm_time - start_rcomm_time; #endif - - + + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { for (i=0;if_procs_per_group; i++){ while (bytes_per_process[i] > 0){ @@ -482,13 +482,13 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, index, i, bytes_per_process[i], i, bytes_remaining[i]);*/ if (read_get_process_id(global_iov_array[sorted[current_index[i]]].process_id, fh) == i){ /* current id owns this entry!*/ - if (bytes_remaining[i]){ /*Remaining bytes in the current entry of + if (bytes_remaining[i]){ /*Remaining bytes in the current entry of the global offset array*/ if (bytes_remaining[i] <= bytes_per_process[i]){ blocklen_per_process[i][disp_index[i] - 1] = bytes_remaining[i]; - displs_per_process[i][disp_index[i] - 1] = - global_iov_array[sorted[current_index[i]]].offset + + displs_per_process[i][disp_index[i] - 1] = + global_iov_array[sorted[current_index[i]]].offset + (global_iov_array[sorted[current_index[i]]].length - bytes_remaining[i]); blocklen_per_process[i] = (int *) realloc @@ -500,7 +500,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, displs_per_process[i][disp_index[i]] = 0; disp_index[i] += 1; bytes_remaining[i] = 0; - /* This entry has been used up, we need to move to the + /* This entry has been used up, we need to move to the next entry of this process and make current_index point there*/ current_index[i] = read_find_next_index(i, current_index[i], @@ -515,7 +515,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } else{ blocklen_per_process[i][disp_index[i] - 1] = bytes_per_process[i]; - displs_per_process[i][disp_index[i] - 1] = + displs_per_process[i][disp_index[i] - 1] = global_iov_array[sorted[current_index[i]]].offset + (global_iov_array[sorted[current_index[i]]].length - bytes_remaining[i]); @@ -525,14 +525,14 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } } else{ - if (bytes_per_process[i] < + if (bytes_per_process[i] < global_iov_array[sorted[current_index[i]]].length){ blocklen_per_process[i][disp_index[i] - 1] = bytes_per_process[i]; displs_per_process[i][disp_index[i] - 1] = global_iov_array[sorted[current_index[i]]].offset; - bytes_remaining[i] = - global_iov_array[sorted[current_index[i]]].length - + bytes_remaining[i] = + global_iov_array[sorted[current_index[i]]].length - bytes_per_process[i]; bytes_per_process[i] = 0; break; @@ -542,14 +542,14 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, global_iov_array[sorted[current_index[i]]].length; displs_per_process[i][disp_index[i] - 1] = global_iov_array[sorted[current_index[i]]].offset; - blocklen_per_process[i] = + blocklen_per_process[i] = (int *) realloc ((void *)blocklen_per_process[i], (disp_index[i]+1)*sizeof(int)); displs_per_process[i] = (MPI_Aint *)realloc ((void *)displs_per_process[i], (disp_index[i]+1)*sizeof(MPI_Aint)); blocklen_per_process[i][disp_index[i]] = 0; displs_per_process[i][disp_index[i]] = 0; disp_index[i] += 1; - bytes_per_process[i] -= + bytes_per_process[i] -= global_iov_array[sorted[current_index[i]]].length; current_index[i] = read_find_next_index(i, current_index[i], @@ -563,7 +563,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } } } - else{ + else{ current_index[i] = read_find_next_index(i, current_index[i], fh, @@ -571,14 +571,14 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, global_iov_count, sorted); if (current_index[i] == -1){ - bytes_per_process = 0; /* no more entries left + bytes_per_process = 0; /* no more entries left to service this request*/ continue; } } } } - + entries_per_aggregator=0; for (i=0;if_procs_per_group;i++){ for (j=0;jf_rank); - + #endif } } - } - + } + if (entries_per_aggregator > 0){ file_offsets_for_agg = (local_io_array *) malloc(entries_per_aggregator*sizeof(local_io_array)); @@ -604,7 +604,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - sorted_file_offsets = (int *) + sorted_file_offsets = (int *) malloc (entries_per_aggregator * sizeof(int)); if (NULL == sorted_file_offsets){ opal_output (1, "OUT OF MEMORY\n"); @@ -620,7 +620,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, blocklen_per_process[i][j]; global_count += blocklen_per_process[i][j]; file_offsets_for_agg[temp_index].process_id = i; - file_offsets_for_agg[temp_index].offset = + file_offsets_for_agg[temp_index].offset = displs_per_process[i][j]; temp_index++; } @@ -632,13 +632,13 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } read_local_heap_sort (file_offsets_for_agg, entries_per_aggregator, - sorted_file_offsets); - memory_displacements = (MPI_Aint *) malloc + sorted_file_offsets); + memory_displacements = (MPI_Aint *) malloc (entries_per_aggregator * sizeof(MPI_Aint)); memory_displacements[sorted_file_offsets[0]] = 0; for (i=1; if_rank); for (i=0; if_io_array = (mca_io_ompio_io_array_t *) malloc + + fh->f_io_array = (mca_io_ompio_io_array_t *) malloc (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + fh->f_num_of_io_entries = 0; - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[0]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[0]]; fh->f_num_of_io_entries++; for (i=1;if_io_array[fh->f_num_of_io_entries - 1].length += - file_offsets_for_agg[sorted_file_offsets[i]].length; + file_offsets_for_agg[sorted_file_offsets[i]].length; } else{ - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[i]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[i]]; fh->f_num_of_io_entries++; } } - + #if DEBUG_ON printf("*************************** %d\n", fh->f_num_of_io_entries); for (i=0 ; if_num_of_io_entries ; i++) { @@ -725,14 +725,14 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, #if DEBUG_ON - printf("************Cycle: %d, Aggregator: %d ***************\n", + printf("************Cycle: %d, Aggregator: %d ***************\n", index+1,fh->f_rank); if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank){ for (i=0 ; if_procs_per_group * sizeof (int)); if (NULL == temp_disp_index) { opal_output (1, "OUT OF MEMORY\n"); @@ -741,7 +741,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } for (i=0; if_procs_per_group * sizeof(MPI_Request)); if (NULL == send_req){ @@ -776,20 +776,20 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, displs_per_process[i], MPI_BYTE, &sendtype[i]); - ompi_datatype_commit(&sendtype[i]); + ompi_datatype_commit(&sendtype[i]); ret = MCA_PML_CALL (isend(global_buf, 1, sendtype[i], fh->f_procs_in_group[i], 123, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &send_req[i])); if(OMPI_SUCCESS != ret){ goto exit; } } - + ret = ompi_request_wait_all (fh->f_procs_per_group, send_req, MPI_STATUS_IGNORE); @@ -797,7 +797,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, goto exit; } } - + ret = ompi_request_wait (recv_req, MPI_STATUS_IGNORE); if (OMPI_SUCCESS != ret){ goto exit; @@ -809,24 +809,24 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, #endif position += bytes_to_read_in_cycle; - + if (!(fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { OPAL_PTRDIFF_TYPE mem_address; size_t remaining = 0; size_t temp_position = 0; - + remaining = bytes_to_read_in_cycle; - + while (remaining && (iov_count > iov_index)){ mem_address = (OPAL_PTRDIFF_TYPE) (decoded_iov[iov_index].iov_base) + current_position; - - if (remaining >= + + if (remaining >= (decoded_iov[iov_index].iov_len - current_position)) { memcpy ((IOVBASE_TYPE *) mem_address, receive_buf+temp_position, decoded_iov[iov_index].iov_len - current_position); - remaining = remaining - + remaining = remaining - (decoded_iov[iov_index].iov_len - current_position); temp_position = temp_position + (decoded_iov[iov_index].iov_len - current_position); @@ -872,7 +872,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, free (global_buf); global_buf = NULL; } - + if (NULL != sorted_file_offsets){ free(sorted_file_offsets); @@ -906,15 +906,15 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){ fh->f_register_print_entry(READ_PRINT_QUEUE, nentry); - } + } #endif - + exit: if (NULL != decoded_iov){ free(decoded_iov); decoded_iov = NULL; } - + if (NULL != displs){ free(displs); displs = NULL; @@ -935,8 +935,8 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, global_iov_array=NULL; } - if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + for(l=0;lf_procs_per_group;l++){ if (NULL != blocklen_per_process[l]){ free(blocklen_per_process[l]); @@ -1020,7 +1020,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, } return ret; - + } @@ -1037,7 +1037,7 @@ int read_local_heap_sort (local_io_array *io_array, int temp = 0; unsigned char done = 0; int* temp_arr = NULL; - + if ( 0 == num_entries ) { return OMPI_SUCCESS; } @@ -1060,15 +1060,15 @@ int read_local_heap_sort (local_io_array *io_array, while (!done) { left = j*2+1; right = j*2+2; - if ((left <= heap_size) && + if ((left <= heap_size) && (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -1087,8 +1087,8 @@ int read_local_heap_sort (local_io_array *io_array, for (i = num_entries-1; i >=1; --i) { temp = temp_arr[0]; temp_arr[0] = temp_arr[i]; - temp_arr[i] = temp; - heap_size--; + temp_arr[i] = temp; + heap_size--; done = 0; j = 0; largest = j; @@ -1096,17 +1096,17 @@ int read_local_heap_sort (local_io_array *io_array, while (!done) { left = j*2+1; right = j*2+2; - - if ((left <= heap_size) && - (io_array[temp_arr[left]].offset > + + if ((left <= heap_size) && + (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -1134,12 +1134,12 @@ int read_local_heap_sort (local_io_array *io_array, int read_find_next_index( int proc_index, int c_index, - mca_io_ompio_file_t *fh, + mca_io_ompio_file_t *fh, local_io_array *global_iov_array, int global_iov_count, int *sorted){ int i; - + for(i=c_index+1; isuper,1)) { // fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY; // } - + /* In case the data is not contigous in memory, decode it into an iovec */ if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, @@ -121,22 +121,22 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, else { max_data = count * datatype->super.size; } - + if ( MPI_STATUS_IGNORE != status ) { status->_ucount = max_data; } fh->f_get_num_aggregators ( & static_num_io_procs ); - fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, + fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, static_num_io_procs, max_data); - - + + /* io_array datatype for using in communication*/ types[0] = &ompi_mpi_long.dt; types[1] = &ompi_mpi_long.dt; types[2] = &ompi_mpi_int.dt; - + d[0] = (OPAL_PTRDIFF_TYPE)&local_iov_array[0]; d[1] = (OPAL_PTRDIFF_TYPE)&local_iov_array[0].length; d[2] = (OPAL_PTRDIFF_TYPE)&local_iov_array[0].process_id; @@ -151,9 +151,9 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, &io_array_type); ompi_datatype_commit (&io_array_type); /* #########################################################*/ - - - + + + ret = fh->f_generate_current_file_view((struct mca_io_ompio_file_t *)fh, max_data, &iov, @@ -166,7 +166,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, if (0 == iov_size){ iov_size = 1; } - + local_iov_array = (local_io_array *)malloc (iov_size * sizeof(local_io_array)); if ( NULL == local_iov_array){ fprintf(stderr,"local_iov_array allocation error\n"); @@ -174,7 +174,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, goto exit; } - + for (j=0; j < iov_size; j++){ local_iov_array[j].offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t) iov[j].iov_base; @@ -182,12 +182,12 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, local_iov_array[j].process_id = fh->f_rank; } - + fh->f_get_bytes_per_agg ( (int *) &bytes_per_cycle); - + local_cycles = ceil((double)max_data/bytes_per_cycle); - ret = fh->f_comm->c_coll.coll_allreduce (&local_cycles, + ret = fh->f_comm->c_coll.coll_allreduce (&local_cycles, &cycles, 1, MPI_INT, @@ -201,7 +201,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { - + disp_index = (int *)malloc (fh->f_procs_per_group * sizeof (int)); if (NULL == disp_index) { opal_output (1, "OUT OF MEMORY\n"); @@ -215,14 +215,14 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + bytes_remaining = (int *) malloc (fh->f_procs_per_group * sizeof(int)); if (NULL == bytes_remaining){ opal_output (1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + current_index = (int *) malloc (fh->f_procs_per_group * sizeof(int)); if (NULL == current_index){ opal_output (1, "OUT OF MEMORY\n"); @@ -237,7 +237,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, goto exit; } - displs_per_process = (MPI_Aint **) + displs_per_process = (MPI_Aint **) malloc (fh->f_procs_per_group * sizeof (MPI_Aint*)); if (NULL == displs_per_process) { @@ -245,7 +245,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for(i=0;if_procs_per_group;i++){ current_index[i] = 0; bytes_remaining[i] =0; @@ -260,14 +260,14 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + displs = (int *) malloc (fh->f_procs_per_group * sizeof(int)); if (NULL == displs){ opal_output (1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + ret = fh->f_allgather_array (&iov_size, 1, MPI_INT, @@ -278,13 +278,13 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - + if( OMPI_SUCCESS != ret){ fprintf(stderr,"iov size allgatherv array!\n"); goto exit; } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { displs[0] = 0; global_iov_count = iovec_count_per_process[0]; @@ -293,7 +293,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, displs[i] = displs[i-1] + iovec_count_per_process[i-1]; } } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { global_iov_array = (local_io_array *) malloc (global_iov_count * @@ -304,7 +304,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, goto exit; } } - + ret = fh->f_gatherv_array (local_iov_array, iov_size, io_array_type, @@ -320,7 +320,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, fprintf(stderr,"global_iov_array gather error!\n"); goto exit; } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { if ( 0 == global_iov_count){ @@ -337,7 +337,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } #if DEBUG_ON - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { for (gc_in=0; gc_inf_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { if (NULL == recvtype){ - recvtype = (ompi_datatype_t **) + recvtype = (ompi_datatype_t **) malloc (fh->f_procs_per_group * sizeof(ompi_datatype_t *)); if (NULL == recvtype) { opal_output (1, "OUT OF MEMORY\n"); @@ -381,7 +381,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, goto exit; } displs_per_process[l] = (MPI_Aint *) calloc (1, sizeof(MPI_Aint)); - if (NULL == displs_per_process[l]){ + if (NULL == displs_per_process[l]){ opal_output (1, "OUT OF MEMORY for displs\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; @@ -391,17 +391,17 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, free(sorted_file_offsets); sorted_file_offsets = NULL; } - + if(NULL != file_offsets_for_agg){ free(file_offsets_for_agg); file_offsets_for_agg = NULL; } - + if (NULL != memory_displacements){ free(memory_displacements); memory_displacements = NULL; } - + } if (local_cycles > index) { if ((index == local_cycles-1) && (max_data % bytes_per_cycle)) { @@ -421,14 +421,14 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, /* if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) {*/ printf ("***%d: CYCLE %d Bytes %ld**********\n", fh->f_rank, - index, + index, bytes_to_write_in_cycle); /* }*/ #endif /********************************************************** **Gather the Data from all the processes at the writers ** *********************************************************/ - + /* gather from each process how many bytes each will be sending */ fh->f_gather_array (&bytes_to_write_in_cycle, 1, @@ -440,12 +440,12 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group, fh->f_procs_per_group, fh->f_comm); - - /* - For each aggregator + + /* + For each aggregator it needs to get bytes_to_write_in_cycle from each process in group which adds up to bytes_per_cycle - + */ if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { for (i=0;if_procs_per_group; i++){ @@ -457,19 +457,19 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, fh->f_procs_in_group[i], bytes_per_process[i]); #endif - + while (bytes_per_process[i] > 0){ if (get_process_id(global_iov_array[sorted[current_index[i]]].process_id, fh) == i){ /* current id owns this entry!*/ - + /*Add and subtract length and create blocklength and displs array*/ - if (bytes_remaining[i]){ /*Remaining bytes in the current entry of + if (bytes_remaining[i]){ /*Remaining bytes in the current entry of the global offset array*/ if (bytes_remaining[i] <= bytes_per_process[i]){ blocklen_per_process[i][disp_index[i] - 1] = bytes_remaining[i]; - displs_per_process[i][disp_index[i] - 1] = - global_iov_array[sorted[current_index[i]]].offset + + displs_per_process[i][disp_index[i] - 1] = + global_iov_array[sorted[current_index[i]]].offset + (global_iov_array[sorted[current_index[i]]].length - bytes_remaining[i]); @@ -482,7 +482,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, displs_per_process[i][disp_index[i]] = 0; bytes_remaining[i] = 0; disp_index[i] += 1; - /* This entry has been used up, we need to move to the + /* This entry has been used up, we need to move to the next entry of this process and make current_index point there*/ current_index[i] = find_next_index(i, current_index[i], @@ -498,7 +498,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } else{ blocklen_per_process[i][disp_index[i] - 1] = bytes_per_process[i]; - displs_per_process[i][disp_index[i] - 1] = + displs_per_process[i][disp_index[i] - 1] = global_iov_array[sorted[current_index[i]]].offset + (global_iov_array[sorted[current_index[i]]].length - bytes_remaining[i]); @@ -508,15 +508,15 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } } else{ - if (bytes_per_process[i] < + if (bytes_per_process[i] < global_iov_array[sorted[current_index[i]]].length){ blocklen_per_process[i][disp_index[i] - 1] = bytes_per_process[i]; displs_per_process[i][disp_index[i] - 1] = global_iov_array[sorted[current_index[i]]].offset; - - bytes_remaining[i] = - global_iov_array[sorted[current_index[i]]].length - + + bytes_remaining[i] = + global_iov_array[sorted[current_index[i]]].length - bytes_per_process[i]; bytes_per_process[i] = 0; break; @@ -526,14 +526,14 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, global_iov_array[sorted[current_index[i]]].length; displs_per_process[i][disp_index[i] - 1] = global_iov_array[sorted[current_index[i]]].offset; - blocklen_per_process[i] = + blocklen_per_process[i] = (int *) realloc ((void *)blocklen_per_process[i], (disp_index[i]+1)*sizeof(int)); displs_per_process[i] = (MPI_Aint *)realloc ((void *)displs_per_process[i], (disp_index[i]+1)*sizeof(MPI_Aint)); blocklen_per_process[i][disp_index[i]] = 0; displs_per_process[i][disp_index[i]] = 0; disp_index[i] += 1; - bytes_per_process[i] -= + bytes_per_process[i] -= global_iov_array[sorted[current_index[i]]].length; current_index[i] = find_next_index(i, current_index[i], @@ -547,7 +547,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } } } - else{ + else{ current_index[i] = find_next_index(i, current_index[i], fh, @@ -555,7 +555,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, global_iov_count, sorted); if (current_index[i] == -1){ - bytes_per_process[i] = 0; /* no more entries left + bytes_per_process[i] = 0; /* no more entries left to service this request*/ continue; } @@ -573,13 +573,13 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, blocklen_per_process[i][j],j, displs_per_process[i][j], fh->f_rank); - + #endif } - + } } - + if (entries_per_aggregator > 0){ file_offsets_for_agg = (local_io_array *) malloc(entries_per_aggregator*sizeof(local_io_array)); @@ -602,7 +602,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, file_offsets_for_agg[temp_index].length = blocklen_per_process[i][j]; file_offsets_for_agg[temp_index].process_id = i; - file_offsets_for_agg[temp_index].offset = + file_offsets_for_agg[temp_index].offset = displs_per_process[i][j]; temp_index++; } @@ -614,17 +614,17 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } local_heap_sort (file_offsets_for_agg, entries_per_aggregator, - sorted_file_offsets); - - memory_displacements = (MPI_Aint *) malloc + sorted_file_offsets); + + memory_displacements = (MPI_Aint *) malloc (entries_per_aggregator * sizeof(MPI_Aint)); memory_displacements[sorted_file_offsets[0]] = 0; for (i=1; if_procs_per_group * sizeof (int)); if (NULL == temp_disp_index) { opal_output (1, "OUT OF MEMORY\n"); @@ -644,16 +644,16 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, temp_pindex, temp_disp_index[temp_pindex], temp_pindex, disp_index[temp_pindex]); } - global_count += + global_count += file_offsets_for_agg[sorted_file_offsets[i]].length; } if (NULL != temp_disp_index){ free(temp_disp_index); temp_disp_index = NULL; } - + #if DEBUG_ON - printf("************Cycle: %d, Aggregator: %d ***************\n", + printf("************Cycle: %d, Aggregator: %d ***************\n", index+1,fh->f_rank); for (i=0; if_rank, global_count, @@ -681,8 +681,8 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - - recv_req = (MPI_Request *) + + recv_req = (MPI_Request *) malloc (fh->f_procs_per_group * sizeof(MPI_Request)); if (NULL == recv_req){ opal_output (1, "OUT OF MEMORY\n"); @@ -695,7 +695,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, displs_per_process[i], MPI_BYTE, &recvtype[i]); - ompi_datatype_commit(&recvtype[i]); + ompi_datatype_commit(&recvtype[i]); ret = MCA_PML_CALL(irecv(global_buf, 1, recvtype[i], @@ -709,7 +709,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } } } - + if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) { send_buf = &((char*)buf)[total_bytes_written]; } @@ -720,7 +720,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, OPAL_PTRDIFF_TYPE mem_address; size_t remaining = 0; size_t temp_position = 0; - + send_buf = malloc (bytes_to_write_in_cycle); if (NULL == send_buf) { opal_output (1, "OUT OF MEMORY\n"); @@ -728,17 +728,17 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, goto exit; } remaining = bytes_to_write_in_cycle; - + while (remaining) { mem_address = (OPAL_PTRDIFF_TYPE) (decoded_iov[iov_index].iov_base) + current_position; - - if (remaining >= + + if (remaining >= (decoded_iov[iov_index].iov_len - current_position)) { memcpy (send_buf+temp_position, (IOVBASE_TYPE *)mem_address, decoded_iov[iov_index].iov_len - current_position); - remaining = remaining - + remaining = remaining - (decoded_iov[iov_index].iov_len - current_position); temp_position = temp_position + (decoded_iov[iov_index].iov_len - current_position); @@ -755,43 +755,43 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } } total_bytes_written += bytes_to_write_in_cycle; - + send_req = (MPI_Request *) malloc (sizeof(MPI_Request)); if (NULL == send_req){ opal_output (1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + ret = MCA_PML_CALL(isend(send_buf, bytes_to_write_in_cycle, MPI_BYTE, fh->f_procs_in_group[fh->f_aggregator_index], 123, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, - send_req)); - + send_req)); + if ( OMPI_SUCCESS != ret ){ fprintf(stderr,"isend error!\n"); goto exit; } - + ret = ompi_request_wait (send_req, MPI_STATUS_IGNORE); if (OMPI_SUCCESS != ret){ goto exit; } - - if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { + + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { ret = ompi_request_wait_all (fh->f_procs_per_group, recv_req, MPI_STATUS_IGNORE); if (OMPI_SUCCESS != ret){ goto exit; } - + #if DEBUG_ON - printf("************Cycle: %d, Aggregator: %d ***************\n", + printf("************Cycle: %d, Aggregator: %d ***************\n", index+1,fh->f_rank); if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank){ for (i=0 ; if_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc + fh->f_io_array = (mca_io_ompio_io_array_t *) malloc (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); @@ -816,26 +816,26 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } fh->f_num_of_io_entries = 0; /*First entry for every aggregator*/ - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[0]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[0]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[0]]; fh->f_num_of_io_entries++; for (i=1;if_io_array[fh->f_num_of_io_entries - 1].length += - file_offsets_for_agg[sorted_file_offsets[i]].length; + file_offsets_for_agg[sorted_file_offsets[i]].length; } else { - fh->f_io_array[fh->f_num_of_io_entries].offset = + fh->f_io_array[fh->f_num_of_io_entries].offset = (IOVBASE_TYPE *)(intptr_t)file_offsets_for_agg[sorted_file_offsets[i]].offset; - fh->f_io_array[fh->f_num_of_io_entries].length = + fh->f_io_array[fh->f_num_of_io_entries].length = file_offsets_for_agg[sorted_file_offsets[i]].length; - fh->f_io_array[fh->f_num_of_io_entries].memory_address = + fh->f_io_array[fh->f_num_of_io_entries].memory_address = global_buf+memory_displacements[sorted_file_offsets[i]]; fh->f_num_of_io_entries++; } @@ -866,13 +866,13 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, end_write_time = MPI_Wtime(); write_time += end_write_time - start_write_time; #endif - + } if (NULL != send_req){ free(send_req); send_req = NULL; } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { fh->f_num_of_io_entries = 0; if (NULL != fh->f_io_array) { @@ -910,19 +910,19 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, if (!fh->f_full_print_queue(WRITE_PRINT_QUEUE)){ fh->f_register_print_entry(WRITE_PRINT_QUEUE, nentry); - } + } #endif - - + + exit: if (NULL != decoded_iov){ free(decoded_iov); decoded_iov = NULL; } - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { - + if (NULL != local_iov_array){ free(local_iov_array); local_iov_array = NULL; @@ -1000,7 +1000,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, } return ret; -} +} @@ -1041,15 +1041,15 @@ static int local_heap_sort (local_io_array *io_array, while (!done) { left = j*2+1; right = j*2+2; - if ((left <= heap_size) && + if ((left <= heap_size) && (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -1068,8 +1068,8 @@ static int local_heap_sort (local_io_array *io_array, for (i = num_entries-1; i >=1; --i) { temp = temp_arr[0]; temp_arr[0] = temp_arr[i]; - temp_arr[i] = temp; - heap_size--; + temp_arr[i] = temp; + heap_size--; done = 0; j = 0; largest = j; @@ -1077,17 +1077,17 @@ static int local_heap_sort (local_io_array *io_array, while (!done) { left = j*2+1; right = j*2+2; - - if ((left <= heap_size) && - (io_array[temp_arr[left]].offset > + + if ((left <= heap_size) && + (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -1114,12 +1114,12 @@ static int local_heap_sort (local_io_array *io_array, int find_next_index( int proc_index, int c_index, - mca_io_ompio_file_t *fh, + mca_io_ompio_file_t *fh, local_io_array *global_iov_array, int global_iov_count, int *sorted){ int i; - + for(i=c_index+1; i_.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase.h b/ompi/mca/fcoll/two_phase/fcoll_two_phase.h index 61c88f86581..f65183a3ff7 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase.h +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,29 +48,29 @@ int mca_fcoll_two_phase_component_file_unquery (mca_io_ompio_file_t *file); int mca_fcoll_two_phase_module_init (mca_io_ompio_file_t *file); int mca_fcoll_two_phase_module_finalize (mca_io_ompio_file_t *file); -int mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, - void *buf, +int mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, + void *buf, int count, - struct ompi_datatype_t *datatype, + struct ompi_datatype_t *datatype, ompi_status_public_t * status); int mca_fcoll_two_phase_calc_aggregator (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE off, + OMPI_MPI_OFFSET_TYPE off, OMPI_MPI_OFFSET_TYPE min_off, OMPI_MPI_OFFSET_TYPE *len, OMPI_MPI_OFFSET_TYPE fd_size, OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, int striping_unit, - int num_aggregators, + int num_aggregators, int *aggregator_list); int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_component.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_component.c index 3a2a2aa1277..507192ef4ba 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_component.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c index db903caab3b..4ee4bc24606 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c @@ -32,19 +32,19 @@ #define DEBUG 0 -/* Two Phase implementation from ROMIO ported to OMPIO infrastructure +/* Two Phase implementation from ROMIO ported to OMPIO infrastructure * This is pretty much the same as ROMIO's two_phase and based on ROMIO's code * base */ /* Datastructure to support specifying the flat-list. */ -typedef struct flat_list_node { +typedef struct flat_list_node { MPI_Datatype type; - int count; + int count; OMPI_MPI_OFFSET_TYPE *blocklens; - OMPI_MPI_OFFSET_TYPE *indices; - struct flat_list_node *next; + OMPI_MPI_OFFSET_TYPE *indices; + struct flat_list_node *next; }Flatlist_node; /* local function declarations */ @@ -83,20 +83,20 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, - void *buf, + void *buf, Flatlist_node *flat_buf, char **recv_buf, - struct iovec *offset_length, - unsigned *recv_size, - MPI_Request *requests, + struct iovec *offset_length, + unsigned *recv_size, + MPI_Request *requests, int *recd_from_proc, - int contig_access_count, - OMPI_MPI_OFFSET_TYPE min_st_offset, - OMPI_MPI_OFFSET_TYPE fd_size, - OMPI_MPI_OFFSET_TYPE *fd_start, + int contig_access_count, + OMPI_MPI_OFFSET_TYPE min_st_offset, + OMPI_MPI_OFFSET_TYPE fd_size, + OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, MPI_Aint buftype_extent, - int striping_unit, + int striping_unit, int num_io_procs, int *aggregator_list); #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN static int isread_aggregator(int rank, @@ -142,7 +142,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, if (opal_datatype_is_predefined(&datatype->super)) { fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY; } - + if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, datatype, @@ -154,13 +154,13 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, if (OMPI_SUCCESS != ret ){ goto exit; } - + recv_buf_addr = (size_t)(buf); - decoded_iov = (struct iovec *) calloc + decoded_iov = (struct iovec *) calloc (iov_count, sizeof(struct iovec)); - + for (ti = 0; ti < iov_count; ti++){ - + decoded_iov[ti].iov_base = (IOVBASE_TYPE *) ((OPAL_PTRDIFF_TYPE)temp_iov[ti].iov_base - recv_buf_addr); decoded_iov[ti].iov_len = temp_iov[ti].iov_len; @@ -170,52 +170,52 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, ti, decoded_iov[ti].iov_len); #endif } - + } else{ max_data = count * datatype->super.size; } - + if ( MPI_STATUS_IGNORE != status ) { status->_ucount = max_data; } - + fh->f_get_num_aggregators (&two_phase_num_io_procs); if (-1 == two_phase_num_io_procs ){ - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, + ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, two_phase_num_io_procs, max_data); if (OMPI_SUCCESS != ret){ return ret; } - + two_phase_num_io_procs = fh->f_final_num_aggrs; - + } - + if (two_phase_num_io_procs > fh->f_size){ two_phase_num_io_procs = fh->f_size; } - + aggregator_list = (int *) calloc (two_phase_num_io_procs, sizeof(int)); if (NULL == aggregator_list){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for (i=0; i< two_phase_num_io_procs; i++){ aggregator_list[i] = i * fh->f_size / two_phase_num_io_procs; } - - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *)fh, - max_data, - &iov, + + ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *)fh, + max_data, + &iov, &local_count); - + if (OMPI_SUCCESS != ret){ goto exit; } - + long_max_data = (long) max_data; ret = fh->f_comm->c_coll.coll_allreduce (&long_max_data, &long_total_bytes, @@ -224,69 +224,69 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, MPI_SUM, fh->f_comm, fh->f_comm->c_coll.coll_allreduce_module); - + if ( OMPI_SUCCESS != ret ) { goto exit; } - + if (!(fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - + /* This datastructre translates between OMPIO->ROMIO its a little hacky!*/ /* But helps to re-use romio's code for handling non-contiguous file-type*/ /*Flattened datatype for ompio is in decoded_iov it translated into flatbuf*/ - + flat_buf = (Flatlist_node *)calloc(1, sizeof(Flatlist_node)); if ( NULL == flat_buf ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + flat_buf->type = datatype; flat_buf->next = NULL; flat_buf->count = 0; flat_buf->indices = NULL; flat_buf->blocklens = NULL; - + if ( 0 < count ) { local_size = OMPIO_MAX(1,iov_count/count); } else { local_size = 0; } - + if ( 0 < local_size ) { - flat_buf->indices = - (OMPI_MPI_OFFSET_TYPE *)calloc(local_size, + flat_buf->indices = + (OMPI_MPI_OFFSET_TYPE *)calloc(local_size, sizeof(OMPI_MPI_OFFSET_TYPE)); if (NULL == flat_buf->indices){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - - flat_buf->blocklens = - (OMPI_MPI_OFFSET_TYPE *)calloc(local_size, + + flat_buf->blocklens = + (OMPI_MPI_OFFSET_TYPE *)calloc(local_size, sizeof(OMPI_MPI_OFFSET_TYPE)); if ( NULL == flat_buf->blocklens ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } } - flat_buf->count = local_size; + flat_buf->count = local_size; i=0;j=0; while(j < local_size){ flat_buf->indices[j] = (OMPI_MPI_OFFSET_TYPE)(intptr_t)decoded_iov[i].iov_base; flat_buf->blocklens[j] = decoded_iov[i].iov_len; - + if(i < (int)iov_count) i+=1; - + j+=1; } - + #if DEBUG - printf("flat_buf count: %d\n", + printf("flat_buf count: %d\n", flat_buf->count); for(i=0;icount;i++){ printf("%d: blocklen[%d] : %lld, indices[%d]: %lld\n", @@ -294,7 +294,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, } #endif } - + #if DEBUG printf("%d: total_bytes:%ld, local_count: %d\n", fh->f_rank, long_total_bytes, local_count); @@ -305,11 +305,11 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, (size_t)iov[i].iov_len); } #endif - + start_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[0].iov_base; if ( 0 < local_count ) { end_offset = (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[local_count-1].iov_base + - (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[local_count-1].iov_len - 1; + (OMPI_MPI_OFFSET_TYPE)(intptr_t)iov[local_count-1].iov_len - 1; } else { end_offset = 0; @@ -320,23 +320,23 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, (size_t)start_offset, (size_t)end_offset); #endif - + start_offsets = (OMPI_MPI_OFFSET_TYPE *)calloc (fh->f_size, sizeof(OMPI_MPI_OFFSET_TYPE)); - + if ( NULL == start_offsets ){ ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit; + goto exit; } - + end_offsets = (OMPI_MPI_OFFSET_TYPE *)calloc (fh->f_size, sizeof(OMPI_MPI_OFFSET_TYPE)); - + if (NULL == end_offsets){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + ret = fh->f_comm->c_coll.coll_allgather(&start_offset, 1, OMPI_OFFSET_DATATYPE, @@ -345,11 +345,11 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, OMPI_OFFSET_DATATYPE, fh->f_comm, fh->f_comm->c_coll.coll_allgather_module); - + if ( OMPI_SUCCESS != ret ){ goto exit; } - + ret = fh->f_comm->c_coll.coll_allgather(&end_offset, 1, OMPI_OFFSET_DATATYPE, @@ -358,12 +358,12 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, OMPI_OFFSET_DATATYPE, fh->f_comm, fh->f_comm->c_coll.coll_allgather_module); - - + + if ( OMPI_SUCCESS != ret ){ goto exit; } - + #if DEBUG for (i=0;if_size;i++){ printf("%d: start[%d]:%ld,end[%d]:%ld\n", @@ -372,40 +372,40 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, (size_t)end_offsets[i]); } #endif - + for (i=1; if_size; i++){ - if ((start_offsets[i] < end_offsets[i-1]) && + if ((start_offsets[i] < end_offsets[i-1]) && (start_offsets[i] <= end_offsets[i])){ interleave_count++; } } - + #if DEBUG printf("%d: interleave_count:%d\n", fh->f_rank,interleave_count); -#endif - +#endif + ret = mca_fcoll_two_phase_domain_partition(fh, start_offsets, end_offsets, &min_st_offset, &fd_start, &fd_end, - domain_size, + domain_size, &fd_size, striping_unit, two_phase_num_io_procs); if (OMPI_SUCCESS != ret){ goto exit; } - + #if DEBUG for (i=0;if_rank, count_other_req_procs); #endif @@ -443,8 +443,8 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif - - + + ret = two_phase_read_and_exch(fh, buf, datatype, @@ -458,10 +458,10 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, flat_buf, buf_indices, striping_unit, - two_phase_num_io_procs, + two_phase_num_io_procs, aggregator_list); - - + + if (OMPI_SUCCESS != ret){ goto exit; } @@ -480,15 +480,15 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, nentry.aggregator = 0; } nentry.nprocs_for_coll = two_phase_num_io_procs; - - + + if (!fh->f_full_print_queue(READ_PRINT_QUEUE)){ fh->f_register_print_entry(READ_PRINT_QUEUE, nentry); } #endif - - + + exit: if (flat_buf != NULL){ if (flat_buf->blocklens != NULL){ @@ -512,7 +512,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, free(aggregator_list); aggregator_list = NULL; } - + return ret; } @@ -531,10 +531,10 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_end, Flatlist_node *flat_buf, size_t *buf_idx, int striping_unit, - int two_phase_num_io_procs, + int two_phase_num_io_procs, int *aggregator_list){ - - + + int ret=OMPI_SUCCESS, i = 0, j = 0, ntimes = 0, max_ntimes = 0; int m = 0; int *curr_offlen_ptr=NULL, *count=NULL, *send_size=NULL, *recv_size=NULL; @@ -548,10 +548,10 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, char *read_buf=NULL, *tmp_buf=NULL; MPI_Datatype byte = MPI_BYTE; int two_phase_cycle_buffer_size=0; - - opal_datatype_type_size(&byte->super, + + opal_datatype_type_size(&byte->super, &byte_size); - + for (i = 0; i < fh->f_size; i++){ if (others_req[i].count) { st_loc = others_req[i].offsets[0]; @@ -559,25 +559,25 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, break; } } - + for (i=0;if_size;i++){ for(j=0;j< others_req[i].count; j++){ - st_loc = + st_loc = OMPIO_MIN(st_loc, others_req[i].offsets[j]); - end_loc = + end_loc = OMPIO_MAX(end_loc, (others_req[i].offsets[j] + others_req[i].lens[j] - 1)); } } - + fh->f_get_bytes_per_agg ( &two_phase_cycle_buffer_size); ntimes = (int)((end_loc - st_loc + two_phase_cycle_buffer_size)/ two_phase_cycle_buffer_size); - + if ((st_loc == -1) && (end_loc == -1)){ ntimes = 0; } - + fh->f_comm->c_coll.coll_allreduce (&ntimes, &max_ntimes, 1, @@ -585,7 +585,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, MPI_MAX, fh->f_comm, fh->f_comm->c_coll.coll_allreduce_module); - + if (ntimes){ read_buf = (char *) calloc (two_phase_cycle_buffer_size, sizeof(char)); if ( NULL == read_buf ){ @@ -593,66 +593,66 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, goto exit; } } - - curr_offlen_ptr = (int *)calloc (fh->f_size, + + curr_offlen_ptr = (int *)calloc (fh->f_size, sizeof(int)); if (NULL == curr_offlen_ptr){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - - count = (int *)calloc (fh->f_size, + + count = (int *)calloc (fh->f_size, sizeof(int)); if (NULL == count){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + partial_send = (int *)calloc(fh->f_size, sizeof(int)); if ( NULL == partial_send ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + send_size = (int *)malloc(fh->f_size * sizeof(int)); if (NULL == send_size){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + recv_size = (int *)malloc(fh->f_size * sizeof(int)); if (NULL == recv_size){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + recd_from_proc = (int *)calloc(fh->f_size,sizeof(int)); if (NULL == recd_from_proc){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + start_pos = (int *) calloc(fh->f_size, sizeof(int)); if ( NULL == start_pos ){ ret = OMPI_ERR_OUT_OF_RESOURCE; return ret; } - + done = 0; off = st_loc; for_curr_iter = for_next_iter = 0; - + ompi_datatype_type_extent(datatype, &buftype_extent); - + for (m=0; mf_size; i++) count[i] = send_size[i] = 0; for_next_iter = 0; - + for (i=0; if_size; i++) { if (others_req[i].count) { start_pos[i] = curr_offlen_ptr[i]; @@ -662,7 +662,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, /* this request may have been partially satisfied in the previous iteration. */ req_off = others_req[i].offsets[j] + - partial_send[i]; + partial_send[i]; req_len = others_req[i].lens[j] - partial_send[i]; partial_send[i] = 0; @@ -676,22 +676,22 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, } if (req_off < real_off + real_size) { count[i]++; - MPI_Address(read_buf+req_off-real_off, + MPI_Address(read_buf+req_off-real_off, &(others_req[i].mem_ptrs[j])); - - send_size[i] += (int)(OMPIO_MIN(real_off + real_size - req_off, - (OMPI_MPI_OFFSET_TYPE)req_len)); - + + send_size[i] += (int)(OMPIO_MIN(real_off + real_size - req_off, + (OMPI_MPI_OFFSET_TYPE)req_len)); + if (real_off+real_size-req_off < (OMPI_MPI_OFFSET_TYPE)req_len) { partial_send[i] = (int) (real_off + real_size - req_off); - if ((j+1 < others_req[i].count) && - (others_req[i].offsets[j+1] < - real_off+real_size)) { + if ((j+1 < others_req[i].count) && + (others_req[i].offsets[j+1] < + real_off+real_size)) { /* this is the case illustrated in the figure above. */ for_next_iter = OMPIO_MAX(for_next_iter, - real_off + real_size - others_req[i].offsets[j+1]); - /* max because it must cover requests + real_off + real_size - others_req[i].offsets[j+1]); + /* max because it must cover requests from different processes */ } break; @@ -703,17 +703,17 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, } } flag = 0; - for (i=0; if_size; i++) + for (i=0; if_size; i++) if (count[i]) flag = 1; - + if (flag) { #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_read_time = MPI_Wtime(); #endif - + len = size * byte_size; - fh->f_io_array = (mca_io_ompio_io_array_t *)calloc + fh->f_io_array = (mca_io_ompio_io_array_t *)calloc (1,sizeof(mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); @@ -721,24 +721,24 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, } fh->f_io_array[0].offset = (IOVBASE_TYPE *)(intptr_t)off; fh->f_io_array[0].length = len; - fh->f_io_array[0].memory_address = + fh->f_io_array[0].memory_address = read_buf+for_curr_iter; fh->f_num_of_io_entries = 1; - + if (fh->f_num_of_io_entries){ if ( 0 > fh->f_fbtl->fbtl_preadv (fh)) { opal_output(1, "READ FAILED\n"); return OMPI_ERROR; } } - + #if 0 int ii; printf("%d: len/4 : %lld\n", fh->f_rank, len/4); for (ii = 0; ii < len/4 ;ii++){ - printf("%d: read_buf[%d]: %ld\n", + printf("%d: read_buf[%d]: %ld\n", fh->f_rank, ii, (int *)read_buf[ii]); @@ -754,50 +754,50 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, end_read_time = MPI_Wtime(); read_time += (end_read_time - start_read_time); #endif - - + + } - + for_curr_iter = for_next_iter; - + for (i=0; i< fh->f_size; i++){ recv_size[i] = 0; } two_phase_exchange_data(fh, buf, offset_len, - send_size, start_pos, recv_size, count, - partial_send, recd_from_proc, + send_size, start_pos, recv_size, count, + partial_send, recd_from_proc, contig_access_count, min_st_offset, fd_size, fd_start, fd_end, flat_buf, others_req, m, buf_idx, - buftype_extent, striping_unit, two_phase_num_io_procs, - aggregator_list); - + buftype_extent, striping_unit, two_phase_num_io_procs, + aggregator_list); + if (for_next_iter){ tmp_buf = (char *) calloc (for_next_iter, sizeof(char)); - memcpy(tmp_buf, - read_buf+real_size-for_next_iter, + memcpy(tmp_buf, + read_buf+real_size-for_next_iter, for_next_iter); free(read_buf); read_buf = (char *)malloc(for_next_iter+two_phase_cycle_buffer_size); memcpy(read_buf, tmp_buf, for_next_iter); free(tmp_buf); } - + off += size; done += size; } - + for (i=0; if_size; i++) count[i] = send_size[i] = 0; for (m=ntimes; mf_comm->c_coll.coll_alltoall (send_size, 1, MPI_INT, @@ -871,12 +871,12 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, MPI_INT, fh->f_comm, fh->f_comm->c_coll.coll_alltoall_module); - + if ( OMPI_SUCCESS != ret ){ goto exit; } - - + + #if DEBUG for (i=0; if_size; i++){ printf("%d: RS[%d]: %d\n", fh->f_rank, @@ -884,19 +884,19 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, recv_size[i]); } #endif - - + + nprocs_recv = 0; - for (i=0; i < fh->f_size; i++) + for (i=0; i < fh->f_size; i++) if (recv_size[i]) nprocs_recv++; - + nprocs_send = 0; - for (i=0; i< fh->f_size; i++) + for (i=0; i< fh->f_size; i++) if (send_size[i]) nprocs_send++; - + requests = (MPI_Request *) malloc((nprocs_send+nprocs_recv+1) * sizeof(MPI_Request)); - + if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) { j = 0; for (i=0; i < fh->f_size; i++){ @@ -908,7 +908,7 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, fh->f_rank+i+100*iter, fh->f_comm, requests+j)); - + if ( OMPI_SUCCESS != ret ){ return ret; } @@ -918,15 +918,15 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, } } else{ - + recv_buf = (char **)malloc(fh->f_size * sizeof(char *)); if (NULL == recv_buf){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for (i=0; i < fh->f_size; i++) - if(recv_size[i]) recv_buf[i] = + if(recv_size[i]) recv_buf[i] = (char *) malloc (recv_size[i] * sizeof(char)); j = 0; for(i=0; if_size; i++) @@ -939,12 +939,12 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, fh->f_comm, requests+j)); j++; - + } } - - - + + + j = 0; for (i = 0; i< fh->f_size; i++){ if (send_size[i]){ @@ -953,15 +953,15 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, tmp = others_req[i].lens[k]; others_req[i].lens[k] = partial_send[i]; } - + ompi_datatype_create_hindexed(count[i], &(others_req[i].lens[start_pos[i]]), &(others_req[i].mem_ptrs[start_pos[i]]), MPI_BYTE, &send_type); - + ompi_datatype_commit(&send_type); - + ret = MCA_PML_CALL(isend(MPI_BOTTOM, 1, send_type, @@ -971,41 +971,41 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, fh->f_comm, requests+nprocs_recv+j)); ompi_datatype_destroy(&send_type); - + if (partial_send[i]) others_req[i].lens[k] = tmp; j++; } } - - + + if (nprocs_recv) { - + ret = ompi_request_wait_all(nprocs_recv, - requests, + requests, MPI_STATUS_IGNORE); - - + + if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - + two_phase_fill_user_buffer(fh, buf, flat_buf, recv_buf, offset_len, (unsigned *)recv_size, requests, recd_from_proc, contig_access_count, min_st_offset, fd_size, fd_start, fd_end, - buftype_extent, striping_unit, two_phase_num_io_procs, + buftype_extent, striping_unit, two_phase_num_io_procs, aggregator_list); } } - + ret = ompi_request_wait_all(nprocs_send, - requests+nprocs_recv, + requests+nprocs_recv, MPI_STATUS_IGNORE); - + if (NULL != requests){ free(requests); requests = NULL; } - + if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)){ for (i=0; i< fh->f_size; i++){ if (recv_size[i]){ @@ -1019,10 +1019,10 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, end_rcomm_time = MPI_Wtime(); rcomm_time += (end_rcomm_time - start_rcomm_time); #endif - + exit: return ret; - + } @@ -1075,54 +1075,54 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, - void *buf, + void *buf, Flatlist_node *flat_buf, char **recv_buf, - struct iovec *offset_length, - unsigned *recv_size, - MPI_Request *requests, + struct iovec *offset_length, + unsigned *recv_size, + MPI_Request *requests, int *recd_from_proc, - int contig_access_count, - OMPI_MPI_OFFSET_TYPE min_st_offset, - OMPI_MPI_OFFSET_TYPE fd_size, - OMPI_MPI_OFFSET_TYPE *fd_start, + int contig_access_count, + OMPI_MPI_OFFSET_TYPE min_st_offset, + OMPI_MPI_OFFSET_TYPE fd_size, + OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, MPI_Aint buftype_extent, int striping_unit, int two_phase_num_io_procs, int *aggregator_list){ - + int i = 0, p = 0, flat_buf_idx = 0; OMPI_MPI_OFFSET_TYPE flat_buf_sz = 0, size_in_buf = 0, buf_incr = 0, size = 0; int n_buftypes = 0; OMPI_MPI_OFFSET_TYPE off=0, len=0, rem_len=0, user_buf_idx=0; unsigned *curr_from_proc=NULL, *done_from_proc=NULL, *recv_buf_idx=NULL; - + curr_from_proc = (unsigned *) malloc (fh->f_size * sizeof(unsigned)); done_from_proc = (unsigned *) malloc (fh->f_size * sizeof(unsigned)); recv_buf_idx = (unsigned *) malloc (fh->f_size * sizeof(unsigned)); - + for (i=0; i < fh->f_size; i++) { recv_buf_idx[i] = curr_from_proc[i] = 0; done_from_proc[i] = recd_from_proc[i]; } - + flat_buf_idx = 0; n_buftypes = 0; - + if ( flat_buf->count > 0 ) { user_buf_idx = flat_buf->indices[0]; flat_buf_sz = flat_buf->blocklens[0]; } - + /* flat_buf_idx = current index into flattened buftype - flat_buf_sz = size of current contiguous component in + flat_buf_sz = size of current contiguous component in flattened buf */ - - for (i=0; i done_from_proc[p]) { if (done_from_proc[p] > curr_from_proc[p]) { - size = OMPIO_MIN(curr_from_proc[p] + len - + size = OMPIO_MIN(curr_from_proc[p] + len - done_from_proc[p], recv_size[p]-recv_buf_idx[p]); buf_incr = done_from_proc[p] - curr_from_proc[p]; TWO_PHASE_BUF_INCR @@ -1173,20 +1173,20 @@ static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, rem_len -= len; } } - for (i=0; i < fh->f_size; i++) + for (i=0; i < fh->f_size; i++) if (recv_size[i]) recd_from_proc[i] = curr_from_proc[i]; - + free(curr_from_proc); free(done_from_proc); free(recv_buf_idx); - + } #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN int isread_aggregator(int rank, int nprocs_for_coll, int *aggregator_list){ - + int i=0; for (i=0; isuper)) { // fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY; // } - - + + if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - + ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, datatype, count, @@ -186,17 +186,17 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, if (OMPI_SUCCESS != ret ){ goto exit; } - + send_buf_addr = (OPAL_PTRDIFF_TYPE)buf; if ( 0 < iov_count ) { - decoded_iov = (struct iovec *)malloc + decoded_iov = (struct iovec *)malloc (iov_count * sizeof(struct iovec)); } for (ti = 0; ti < iov_count; ti ++){ decoded_iov[ti].iov_base = (IOVBASE_TYPE *)( - (OPAL_PTRDIFF_TYPE)temp_iov[ti].iov_base - + (OPAL_PTRDIFF_TYPE)temp_iov[ti].iov_base - send_buf_addr); - decoded_iov[ti].iov_len = + decoded_iov[ti].iov_len = temp_iov[ti].iov_len ; #if DEBUG_ON printf("d_offset[%d]: %ld, d_len[%d]: %ld\n", @@ -204,57 +204,57 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, ti, decoded_iov[ti].iov_len); #endif } - + } else{ max_data = count * datatype->super.size; } - + if ( MPI_STATUS_IGNORE != status ) { status->_ucount = max_data; } - + fh->f_get_num_aggregators ( &two_phase_num_io_procs ); if(-1 == two_phase_num_io_procs){ - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, + ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, two_phase_num_io_procs, max_data); if ( OMPI_SUCCESS != ret){ return ret; } - - two_phase_num_io_procs = fh->f_final_num_aggrs; - + + two_phase_num_io_procs = fh->f_final_num_aggrs; + } - + if (two_phase_num_io_procs > fh->f_size){ two_phase_num_io_procs = fh->f_size; } - + #if DEBUG_ON printf("Number of aggregators : %ld\n", two_phase_num_io_procs); #endif - + aggregator_list = (int *) malloc (two_phase_num_io_procs *sizeof(int)); if ( NULL == aggregator_list ) { return OMPI_ERR_OUT_OF_RESOURCE; } - + for (i =0; i< two_phase_num_io_procs; i++){ aggregator_list[i] = i * fh->f_size / two_phase_num_io_procs; } - - - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t*)fh, - max_data, - &iov, + + + ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t*)fh, + max_data, + &iov, &local_count); - - + + if ( OMPI_SUCCESS != ret ){ goto exit; } - + long_max_data = (long) max_data; ret = fh->f_comm->c_coll.coll_allreduce (&long_max_data, &long_total_bytes, @@ -263,19 +263,19 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, MPI_SUM, fh->f_comm, fh->f_comm->c_coll.coll_allreduce_module); - + if ( OMPI_SUCCESS != ret ) { goto exit; } total_bytes = (size_t) long_total_bytes; - + if ( 0 == total_bytes ) { free(aggregator_list); return OMPI_SUCCESS; } - + if (!(fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - + /* This datastructre translates between OMPIO->ROMIO its a little hacky!*/ /* But helps to re-use romio's code for handling non-contiguous file-type*/ flat_buf = (Flatlist_node *)malloc(sizeof(Flatlist_node)); @@ -283,32 +283,32 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + flat_buf->type = datatype; flat_buf->next = NULL; flat_buf->count = 0; flat_buf->indices = NULL; flat_buf->blocklens = NULL; - + if ( 0 < count ) { local_size = OMPIO_MAX(1,iov_count/count); } else { local_size = 0; } - + if ( 0 < local_size ) { - flat_buf->indices = - (OMPI_MPI_OFFSET_TYPE *)malloc(local_size * + flat_buf->indices = + (OMPI_MPI_OFFSET_TYPE *)malloc(local_size * sizeof(OMPI_MPI_OFFSET_TYPE)); if ( NULL == flat_buf->indices ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; - + } - - flat_buf->blocklens = - (OMPI_MPI_OFFSET_TYPE *)malloc(local_size * + + flat_buf->blocklens = + (OMPI_MPI_OFFSET_TYPE *)malloc(local_size * sizeof(OMPI_MPI_OFFSET_TYPE)); if ( NULL == flat_buf->blocklens ){ ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -330,17 +330,17 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, i+=1; j+=1; } - + #if DEBUG_ON printf("flat_buf_count : %d\n", flat_buf->count); for(i=0;icount;i++){ printf("%d: blocklen[%d] : %lld, indices[%d]: %lld \n", fh->f_rank, i, flat_buf->blocklens[i], i ,flat_buf->indices[i]); - + } #endif } - + #if DEBUG_ON printf("%d: fcoll:two_phase:write_all->total_bytes:%ld, local_count: %d\n", fh->f_rank,total_bytes, local_count); @@ -350,14 +350,14 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, (size_t)iov[i].iov_base, (size_t)iov[i].iov_len); } - - + + #endif - + start_offset = (OMPI_MPI_OFFSET_TYPE)(uintptr_t)iov[0].iov_base; if ( 0 < local_count ) { end_offset = (OMPI_MPI_OFFSET_TYPE)(uintptr_t)iov[local_count-1].iov_base + - (OMPI_MPI_OFFSET_TYPE)iov[local_count-1].iov_len - 1; + (OMPI_MPI_OFFSET_TYPE)iov[local_count-1].iov_len - 1; } else { end_offset = 0; @@ -368,26 +368,26 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, fh->f_rank, (size_t)start_offset, (size_t)end_offset); - + #endif - + start_offsets = (OMPI_MPI_OFFSET_TYPE *)malloc (fh->f_size*sizeof(OMPI_MPI_OFFSET_TYPE)); - + if ( NULL == start_offsets ){ ret = OMPI_ERR_OUT_OF_RESOURCE; - goto exit; + goto exit; } - + end_offsets = (OMPI_MPI_OFFSET_TYPE *)malloc (fh->f_size*sizeof(OMPI_MPI_OFFSET_TYPE)); - + if ( NULL == end_offsets ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - - + + ret = fh->f_comm->c_coll.coll_allgather(&start_offset, 1, OMPI_OFFSET_DATATYPE, @@ -396,12 +396,12 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, OMPI_OFFSET_DATATYPE, fh->f_comm, fh->f_comm->c_coll.coll_allgather_module); - + if ( OMPI_SUCCESS != ret ){ goto exit; } - - + + ret = fh->f_comm->c_coll.coll_allgather(&end_offset, 1, OMPI_OFFSET_DATATYPE, @@ -410,12 +410,12 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, OMPI_OFFSET_DATATYPE, fh->f_comm, fh->f_comm->c_coll.coll_allgather_module); - - + + if ( OMPI_SUCCESS != ret ){ goto exit; } - + #if DEBUG_ON for (i=0;if_size;i++){ printf("%d: fcoll:two_phase:write_all:start[%d]:%ld,end[%d]:%ld\n", @@ -424,45 +424,45 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, (size_t)end_offsets[i]); } #endif - - - + + + for (i=1; if_size; i++){ - if ((start_offsets[i] < end_offsets[i-1]) && + if ((start_offsets[i] < end_offsets[i-1]) && (start_offsets[i] <= end_offsets[i])){ interleave_count++; } } - + #if DEBUG_ON printf("%d: fcoll:two_phase:write_all:interleave_count:%d\n", fh->f_rank,interleave_count); -#endif - - +#endif + + ret = mca_fcoll_two_phase_domain_partition(fh, start_offsets, end_offsets, &min_st_offset, &fd_start, &fd_end, - domain_size, + domain_size, &fd_size, striping_unit, two_phase_num_io_procs); if ( OMPI_SUCCESS != ret ){ goto exit; } - - + + #if DEBUG_ON for (i=0;iblocklens != NULL) { free (flat_buf->blocklens); } - + if (flat_buf->indices != NULL) { free (flat_buf->indices); } free (flat_buf); - + } - - - + + + if (start_offsets != NULL) { free(start_offsets); } - + if (end_offsets != NULL){ free(end_offsets); } if (aggregator_list != NULL){ free(aggregator_list); } - + return ret; } @@ -588,12 +588,12 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_end, Flatlist_node *flat_buf, size_t *buf_idx, int striping_unit, - int two_phase_num_io_procs, + int two_phase_num_io_procs, int *aggregator_list) - + { - - + + int i, j, ntimes, max_ntimes, m; int *curr_offlen_ptr=NULL, *count=NULL, *send_size=NULL, *recv_size=NULL; int *partial_recv=NULL, *start_pos=NULL, req_len, flag; @@ -609,13 +609,13 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, #if DEBUG_ON int ii,jj; #endif - + char *write_buf=NULL; - - + + opal_datatype_type_size(&byte->super, &byte_size); - + for (i = 0; i < fh->f_size; i++){ if (others_req[i].count) { st_loc = others_req[i].offsets[0]; @@ -623,22 +623,22 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, break; } } - + for (i=0;if_size;i++){ for(j=0;j< others_req[i].count; j++){ st_loc = OMPIO_MIN(st_loc, others_req[i].offsets[j]); end_loc = OMPIO_MAX(end_loc, (others_req[i].offsets[j] + others_req[i].lens[j] - 1)); - + } } - + fh->f_get_bytes_per_agg ( &two_phase_cycle_buffer_size ); - ntimes = (int) ((end_loc - st_loc + two_phase_cycle_buffer_size)/two_phase_cycle_buffer_size); - + ntimes = (int) ((end_loc - st_loc + two_phase_cycle_buffer_size)/two_phase_cycle_buffer_size); + if ((st_loc == -1) && (end_loc == -1)) { ntimes = 0; } - + fh->f_comm->c_coll.coll_allreduce (&ntimes, &max_ntimes, 1, @@ -646,82 +646,82 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, MPI_MAX, fh->f_comm, fh->f_comm->c_coll.coll_allreduce_module); - + if (ntimes){ write_buf = (char *) malloc (two_phase_cycle_buffer_size); if ( NULL == write_buf ){ return OMPI_ERR_OUT_OF_RESOURCE; } } - - curr_offlen_ptr = (int *) calloc(fh->f_size, sizeof(int)); - + + curr_offlen_ptr = (int *) calloc(fh->f_size, sizeof(int)); + if ( NULL == curr_offlen_ptr ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + count = (int *) malloc(fh->f_size*sizeof(int)); - + if ( NULL == count ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + partial_recv = (int *)calloc(fh->f_size, sizeof(int)); - + if ( NULL == partial_recv ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + send_size = (int *) calloc(fh->f_size,sizeof(int)); - + if ( NULL == send_size ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + recv_size = (int *) calloc(fh->f_size,sizeof(int)); - + if ( NULL == recv_size ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + send_buf_idx = (int *) malloc(fh->f_size*sizeof(int)); - + if ( NULL == send_buf_idx ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + sent_to_proc = (int *) calloc(fh->f_size, sizeof(int)); - + if ( NULL == sent_to_proc){ return OMPI_ERR_OUT_OF_RESOURCE; } - + curr_to_proc = (int *) malloc(fh->f_size*sizeof(int)); - + if ( NULL == curr_to_proc ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + done_to_proc = (int *) malloc(fh->f_size*sizeof(int)); - + if ( NULL == done_to_proc ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + start_pos = (int *) malloc(fh->f_size*sizeof(int)); - + if ( NULL == start_pos ){ return OMPI_ERR_OUT_OF_RESOURCE; } - - + + done = 0; off = st_loc; - + ompi_datatype_type_extent(datatype, &buftype_extent); for (m=0;m f_size; i++) count[i] = recv_size[i] = 0; - + size = OMPIO_MIN((unsigned)two_phase_cycle_buffer_size, end_loc-st_loc+1-done); for (i=0;if_size;i++){ @@ -732,7 +732,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, /* this request may have been partially satisfied in the previous iteration. */ req_off = others_req[i].offsets[j] + - partial_recv[i]; + partial_recv[i]; req_len = others_req[i].lens[j] - partial_recv[i]; partial_recv[i] = 0; @@ -761,9 +761,9 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, #endif recv_size[i] += (int) (OMPIO_MIN(off + size - req_off, (unsigned)req_len)); - + if (off+size-req_off < (unsigned)req_len){ - + partial_recv[i] = (int)(off + size - req_off); break; } @@ -772,8 +772,8 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, } curr_offlen_ptr[i] = j; } - } - + } + ret = two_phase_exchage_data(fh, buf, write_buf, offset_len,send_size, start_pos,recv_size,off,size, @@ -783,29 +783,29 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, fd_size, fd_start, fd_end, flat_buf, others_req, send_buf_idx, curr_to_proc, - done_to_proc, m, buf_idx, + done_to_proc, m, buf_idx, buftype_extent, striping_unit, two_phase_num_io_procs, aggregator_list, &hole); - + if ( OMPI_SUCCESS != ret ){ goto exit; } - - - + + + flag = 0; for (i=0; if_size; i++) if (count[i]) flag = 1; - - - + + + if (flag){ #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_write_time = MPI_Wtime(); #endif - + #if DEBUG_ON printf("rank : %d enters writing\n", fh->f_rank); printf("size : %ld, off : %ld\n",size, off); @@ -814,18 +814,18 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, } #endif len = size * byte_size; - fh->f_io_array = (mca_io_ompio_io_array_t *)malloc + fh->f_io_array = (mca_io_ompio_io_array_t *)malloc (sizeof(mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + fh->f_io_array[0].offset =(IOVBASE_TYPE *)(intptr_t) off; fh->f_io_array[0].length = len; fh->f_io_array[0].memory_address = write_buf; fh->f_num_of_io_entries = 1; - + #if DEBUG_ON for (i=0 ; if_num_of_io_entries ; i++) { printf("%d: ADDRESS: %p OFFSET: %ld LENGTH: %d\n", @@ -835,7 +835,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, fh->f_io_array[i].length); } #endif - + if (fh->f_num_of_io_entries){ if ( 0 > fh->f_fbtl->fbtl_pwritev (fh)) { opal_output(1, "WRITE FAILED\n"); @@ -846,8 +846,8 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, end_write_time = MPI_Wtime(); write_time += (end_write_time - start_write_time); #endif - - + + } /***************** DONE WRITING *****************************************/ /****RESET **********************/ @@ -856,10 +856,10 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, free (fh->f_io_array); fh->f_io_array = NULL; } - + off += size; done += size; - + } for (i=0; if_size; i++) count[i] = recv_size[i] = 0; for (m=ntimes; mf_comm, fh->f_comm->c_coll.coll_alltoall_module); - + if ( OMPI_SUCCESS != ret ){ return ret; } @@ -973,22 +973,22 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, nprocs_recv++; } } - - + + recv_types = (ompi_datatype_t **) malloc (( nprocs_recv + 1 ) * sizeof(ompi_datatype_t *)); - + if ( NULL == recv_types ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + tmp_len = (int *) malloc(fh->f_size*sizeof(int)); - + if ( NULL == tmp_len ) { return OMPI_ERR_OUT_OF_RESOURCE; } - + j = 0; for (i=0;if_size;i++){ if (recv_size[i]) { @@ -997,47 +997,47 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, tmp_len[i] = others_req[i].lens[k]; others_req[i].lens[k] = partial_recv[i]; } - ompi_datatype_create_hindexed(count[i], + ompi_datatype_create_hindexed(count[i], &(others_req[i].lens[start_pos[i]]), - &(others_req[i].mem_ptrs[start_pos[i]]), + &(others_req[i].mem_ptrs[start_pos[i]]), MPI_BYTE, recv_types+j); ompi_datatype_commit(recv_types+j); j++; } } - + sum = 0; for (i=0;if_size;i++) sum += count[i]; - srt_off = (OMPI_MPI_OFFSET_TYPE *) + srt_off = (OMPI_MPI_OFFSET_TYPE *) malloc((sum+1)*sizeof(OMPI_MPI_OFFSET_TYPE)); - + if ( NULL == srt_off ){ ret = OMPI_ERR_OUT_OF_RESOURCE; free(tmp_len); goto exit; } - + srt_len = (int *) malloc((sum+1)*sizeof(int)); - + if ( NULL == srt_len ) { ret = OMPI_ERR_OUT_OF_RESOURCE; free(tmp_len); free(srt_off); goto exit; } - - + + two_phase_heap_merge(others_req, count, srt_off, srt_len, start_pos, fh->f_size,fh->f_rank, nprocs_recv, sum); - - - for (i=0; if_size; i++) + + + for (i=0; if_size; i++) if (partial_recv[i]) { k = start_pos[i] + count[i] - 1; others_req[i].lens[k] = tmp_len[i]; } - - free(tmp_len); - + + free(tmp_len); + *hole = 0; if (off != srt_off[0]){ *hole = 1; @@ -1046,7 +1046,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, for (i=1;i srt_len[0]) + if(new_len > srt_len[0]) srt_len[0] = new_len; } else @@ -1055,15 +1055,15 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, if (i < sum || size != srt_len[0]) *hole = 1; } - - + + free(srt_off); free(srt_len); - + if (nprocs_recv){ if (*hole){ if (off > 0){ - fh->f_io_array = (mca_io_ompio_io_array_t *)malloc + fh->f_io_array = (mca_io_ompio_io_array_t *)malloc (sizeof(mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); @@ -1079,7 +1079,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, return OMPI_ERROR; } } - + } fh->f_num_of_io_entries = 0; if (NULL != fh->f_io_array) { @@ -1088,21 +1088,21 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, } } } - + nprocs_send = 0; for (i=0; i f_size; i++) if (send_size[i]) nprocs_send++; - + #if DEBUG_ON printf("%d : nprocs_send : %d\n", fh->f_rank,nprocs_send); #endif - - requests = (MPI_Request *) - malloc((nprocs_send+nprocs_recv+1)*sizeof(MPI_Request)); - + + requests = (MPI_Request *) + malloc((nprocs_send+nprocs_recv+1)*sizeof(MPI_Request)); + if ( NULL == requests ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + j = 0; for (i=0; if_size; i++) { if (recv_size[i]) { @@ -1113,7 +1113,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, fh->f_rank+i+100*iter, fh->f_comm, requests+j)); - + if ( OMPI_SUCCESS != ret ){ goto exit; } @@ -1121,25 +1121,25 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, } } send_req = requests + nprocs_recv; - - + + if (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY) { j = 0; - for (i=0; i f_size; i++) + for (i=0; i f_size; i++) if (send_size[i]) { ret = MCA_PML_CALL(isend(((char *) buf) + buf_idx[i], send_size[i], MPI_BYTE, i, fh->f_rank+i+100*iter, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, - send_req+j)); - + send_req+j)); + if ( OMPI_SUCCESS != ret ){ goto exit; } - + j++; buf_idx[i] += send_size[i]; } @@ -1153,41 +1153,41 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, for (i=0; i < fh->f_size; i++){ if (send_size[i]) { send_buf[i] = (char *) malloc(send_size[i]); - + if ( NULL == send_buf[i] ){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } } } - + ret = two_phase_fill_send_buffer(fh, buf,flat_buf, send_buf, offset_length, send_size, send_req,sent_to_proc, - contig_access_count, + contig_access_count, min_st_offset, fd_size, fd_start, fd_end, send_buf_idx, curr_to_proc, done_to_proc, iter, buftype_extent, striping_unit, two_phase_num_io_procs, aggregator_list); - + if ( OMPI_SUCCESS != ret ){ goto exit; } } - - + + for (i=0; icount > 0 ) { @@ -1291,11 +1291,11 @@ static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, flat_buf_sz = flat_buf->blocklens[0]; } - for (i=0; i done_to_proc[p]) { if (done_to_proc[p] > curr_to_proc[p]) { - size = OMPIO_MIN(curr_to_proc[p] + len - + size = OMPIO_MIN(curr_to_proc[p] + len - done_to_proc[p], send_size[p]-send_buf_idx[p]); buf_incr = done_to_proc[p] - curr_to_proc[p]; TWO_PHASE_BUF_INCR @@ -1334,10 +1334,10 @@ static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, MPI_BYTE, p, fh->f_rank+p+100*iter, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, - requests+jj)); - + requests+jj)); + if ( OMPI_SUCCESS != ret ){ return ret; } @@ -1366,14 +1366,14 @@ static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, return ret; } - - + + void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, - int *count, + int *count, OMPI_MPI_OFFSET_TYPE *srt_off, int *srt_len, int *start_pos, @@ -1412,12 +1412,12 @@ void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, for(;;) { l = 2*(k+1) - 1; r = 2*(k+1); - if ((l < heapsize) && + if ((l < heapsize) && (*(a[l].off_list) < *(a[k].off_list))) smallest = l; else smallest = k; - if ((r < heapsize) && + if ((r < heapsize) && (*(a[r].off_list) < *(a[smallest].off_list))) smallest = r; @@ -1429,11 +1429,11 @@ void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, a[k].off_list = a[smallest].off_list; a[k].len_list = a[smallest].len_list; a[k].nelem = a[smallest].nelem; - + a[smallest].off_list = tmp.off_list; a[smallest].len_list = tmp.len_list; a[smallest].nelem = tmp.nelem; - + k = smallest; } else break; @@ -1464,12 +1464,12 @@ void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, l = 2*(k+1) - 1; r = 2*(k+1); - if ((l < heapsize) && + if ((l < heapsize) && (*(a[l].off_list) < *(a[k].off_list))) smallest = l; else smallest = k; - if ((r < heapsize) && + if ((r < heapsize) && (*(a[r].off_list) < *(a[smallest].off_list))) smallest = r; @@ -1481,11 +1481,11 @@ void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, a[k].off_list = a[smallest].off_list; a[k].len_list = a[smallest].len_list; a[k].nelem = a[smallest].nelem; - + a[smallest].off_list = tmp.off_list; a[smallest].len_list = tmp.len_list; a[smallest].nelem = tmp.nelem; - + k = smallest; } else break; @@ -1497,7 +1497,7 @@ void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, int is_aggregator(int rank, int nprocs_for_coll, int *aggregator_list){ - + int i=0; for (i=0; i -/*Based on ROMIO's domain partitioning implementaion +/*Based on ROMIO's domain partitioning implementaion Series of functions implementations for two-phase implementation Functions to support Domain partitioning and aggregator selection for two_phase . @@ -48,7 +48,7 @@ int mca_fcoll_two_phase_domain_partition (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_size_ptr, int striping_unit, int nprocs_for_coll){ - + OMPI_MPI_OFFSET_TYPE min_st_offset, max_end_offset, *fd_start=NULL, *fd_end=NULL, fd_size; int i; @@ -58,57 +58,57 @@ int mca_fcoll_two_phase_domain_partition (mca_io_ompio_file_t *fh, for (i=0; i< fh->f_size; i++){ min_st_offset = OMPIO_MIN(min_st_offset, start_offsets[i]); max_end_offset = OMPIO_MAX(max_end_offset, end_offsets[i]); - + } - fd_size = ((max_end_offset - min_st_offset + 1) + nprocs_for_coll - 1)/nprocs_for_coll; - + fd_size = ((max_end_offset - min_st_offset + 1) + nprocs_for_coll - 1)/nprocs_for_coll; + if (fd_size < min_fd_size) fd_size = min_fd_size; - + *fd_st_ptr = (OMPI_MPI_OFFSET_TYPE *) - malloc(nprocs_for_coll*sizeof(OMPI_MPI_OFFSET_TYPE)); + malloc(nprocs_for_coll*sizeof(OMPI_MPI_OFFSET_TYPE)); if ( NULL == *fd_st_ptr ) { return OMPI_ERR_OUT_OF_RESOURCE; } *fd_end_ptr = (OMPI_MPI_OFFSET_TYPE *) - malloc(nprocs_for_coll*sizeof(OMPI_MPI_OFFSET_TYPE)); + malloc(nprocs_for_coll*sizeof(OMPI_MPI_OFFSET_TYPE)); if ( NULL == *fd_end_ptr ) { return OMPI_ERR_OUT_OF_RESOURCE; } - + fd_start = *fd_st_ptr; fd_end = *fd_end_ptr; - - + + if (striping_unit > 0){ /* Lock Boundary based domain partitioning */ int rem_front, rem_back; OMPI_MPI_OFFSET_TYPE end_off; - + fd_start[0] = min_st_offset; end_off = fd_start[0] + fd_size; rem_front = end_off % striping_unit; rem_back = striping_unit - rem_front; - if (rem_front < rem_back) + if (rem_front < rem_back) end_off -= rem_front; - else + else end_off += rem_back; fd_end[0] = end_off - 1; - + /* align fd_end[i] to the nearest file lock boundary */ for (i=1; i max_end_offset) fd_start[i] = fd_end[i] = -1; if (fd_end[i] > max_end_offset) fd_end[i] = max_end_offset; } - + *fd_size_ptr = fd_size; *min_st_offset_ptr = min_st_offset; - + return OMPI_SUCCESS; } int mca_fcoll_two_phase_calc_aggregator(mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE off, + OMPI_MPI_OFFSET_TYPE off, OMPI_MPI_OFFSET_TYPE min_off, OMPI_MPI_OFFSET_TYPE *len, OMPI_MPI_OFFSET_TYPE fd_size, OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, int striping_unit, - int num_aggregators, + int num_aggregators, int *aggregator_list) { int rank_index, rank; OMPI_MPI_OFFSET_TYPE avail_bytes; - + rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1); - + if (striping_unit > 0){ rank_index = 0; while (off > fd_end[rank_index]) rank_index++; } - + if (rank_index >= num_aggregators || rank_index < 0) { fprintf(stderr, @@ -180,11 +180,11 @@ int mca_fcoll_two_phase_calc_aggregator(mca_io_ompio_file_t *fh, } rank = aggregator_list[rank_index]; - + #if 0 printf("rank : %d, rank_index : %d\n",rank, rank_index); #endif - + return rank; } @@ -195,44 +195,44 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, int *count_others_req_procs_ptr, mca_io_ompio_access_array_t **others_req_ptr) { - + int *count_others_req_per_proc=NULL, count_others_req_procs; int i,j, ret=OMPI_SUCCESS; MPI_Request *requests=NULL; mca_io_ompio_access_array_t *others_req=NULL; - + count_others_req_per_proc = (int *)malloc(fh->f_size*sizeof(int)); if ( NULL == count_others_req_per_proc ) { return OMPI_ERR_OUT_OF_RESOURCE; } - + /* Change it to the ompio specific alltoall in coll module : VVN*/ ret = fh->f_comm->c_coll.coll_alltoall (count_my_req_per_proc, 1, MPI_INT, - count_others_req_per_proc, + count_others_req_per_proc, 1, MPI_INT, - fh->f_comm, + fh->f_comm, fh->f_comm->c_coll.coll_alltoall_module); if ( OMPI_SUCCESS != ret ) { return ret; } - + #if 0 for( i = 0; i< fh->f_size; i++){ printf("my: %d, others: %d\n",count_my_req_per_proc[i], count_others_req_per_proc[i]); - + } #endif - *others_req_ptr = (mca_io_ompio_access_array_t *) malloc - (fh->f_size*sizeof(mca_io_ompio_access_array_t)); + *others_req_ptr = (mca_io_ompio_access_array_t *) malloc + (fh->f_size*sizeof(mca_io_ompio_access_array_t)); others_req = *others_req_ptr; - + count_others_req_procs = 0; for (i=0; if_size; i++) { if (count_others_req_per_proc[i]) { @@ -242,23 +242,23 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, others_req[i].lens = (int *) malloc(count_others_req_per_proc[i]*sizeof(int)); others_req[i].mem_ptrs = (MPI_Aint *) - malloc(count_others_req_per_proc[i]*sizeof(MPI_Aint)); + malloc(count_others_req_per_proc[i]*sizeof(MPI_Aint)); count_others_req_procs++; } else others_req[i].count = 0; } - - + + requests = (MPI_Request *) malloc(1+2*(count_my_req_procs+count_others_req_procs)* - sizeof(MPI_Request)); + sizeof(MPI_Request)); if ( NULL == requests ) { ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + j = 0; for (i=0; if_size; i++){ if (others_req[i].count){ @@ -272,7 +272,7 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, if ( OMPI_SUCCESS != ret ) { goto exit; } - + j++; ret = MCA_PML_CALL(irecv(others_req[i].lens, @@ -285,7 +285,7 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, if ( OMPI_SUCCESS != ret ) { goto exit; } - + j++; } } @@ -298,9 +298,9 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, OMPI_OFFSET_DATATYPE, i, i+fh->f_rank, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, - &requests[j])); + &requests[j])); if ( OMPI_SUCCESS != ret ) { goto exit; } @@ -311,17 +311,17 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, MPI_INT, i, i+fh->f_rank+1, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, - &requests[j])); + &requests[j])); if ( OMPI_SUCCESS != ret ) { goto exit; } - + j++; } } - + if (j) { ret = ompi_request_wait_all ( j, requests, MPI_STATUSES_IGNORE ); if ( OMPI_SUCCESS != ret ) { @@ -365,43 +365,43 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, int i, l, proc; OMPI_MPI_OFFSET_TYPE fd_len, rem_len, curr_idx, off; mca_io_ompio_access_array_t *my_req = NULL; - - - *count_my_req_per_proc_ptr = (int*)malloc(fh->f_size*sizeof(int)); - + + + *count_my_req_per_proc_ptr = (int*)malloc(fh->f_size*sizeof(int)); + if ( NULL == count_my_req_per_proc_ptr ){ return OMPI_ERR_OUT_OF_RESOURCE; } count_my_req_per_proc = *count_my_req_per_proc_ptr; - + for (i=0;if_size;i++){ count_my_req_per_proc[i] = 0; } - + buf_idx = (size_t *) malloc (fh->f_size * sizeof(size_t)); - - if ( NULL == buf_idx ){ + + if ( NULL == buf_idx ){ return OMPI_ERR_OUT_OF_RESOURCE; } - + for (i=0; i < fh->f_size; i++) buf_idx[i] = -1; - + for (i=0;if_size : %d\n", fh->f_rank,fh->f_size);*/ *my_req_ptr = (mca_io_ompio_access_array_t *) malloc (fh->f_size * sizeof(mca_io_ompio_access_array_t)); @@ -419,13 +419,13 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, goto err_exit; } my_req = *my_req_ptr; - + count_my_req_procs = 0; for (i = 0; i < fh->f_size; i++){ if(count_my_req_per_proc[i]) { my_req[i].offsets = (OMPI_MPI_OFFSET_TYPE *) malloc(count_my_req_per_proc[i] * sizeof(OMPI_MPI_OFFSET_TYPE)); - + if ( NULL == my_req[i].offsets ) { ret = OMPI_ERR_OUT_OF_RESOURCE; goto err_exit; @@ -440,10 +440,10 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, } count_my_req_procs++; } - my_req[i].count = 0; + my_req[i].count = 0; } curr_idx = 0; - for (i=0; if_size; i++) { if (count_my_req_per_proc[i] > 0) { - fprintf(stdout, "data needed from %d (count = %d):\n", i, + fprintf(stdout, "data needed from %d (count = %d):\n", i, my_req[i].count); for (l=0; l < my_req[i].count; l++) { fprintf(stdout, " %d: off[%d] = %lld, len[%d] = %d\n", fh->f_rank, l, @@ -500,11 +500,11 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, } } #endif - - + + *count_my_req_procs_ptr = count_my_req_procs; *buf_indices = buf_idx; - + return ret; err_exit: if (NULL != my_req) { diff --git a/ompi/mca/fs/Makefile.am b/ompi/mca/fs/Makefile.am index 862877e5d7e..0eb05d672f3 100644 --- a/ompi/mca/fs/Makefile.am +++ b/ompi/mca/fs/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fs/base/Makefile.am b/ompi/mca/fs/base/Makefile.am index bcb8422ea0f..e578dd73085 100644 --- a/ompi/mca/fs/base/Makefile.am +++ b/ompi/mca/fs/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fs/base/base.h b/ompi/mca/fs/base/base.h index 7c3f7b1991e..21f2b75d423 100644 --- a/ompi/mca/fs/base/base.h +++ b/ompi/mca/fs/base/base.h @@ -5,20 +5,20 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** +/** * @file * * MCA fs base framework public interface functions. diff --git a/ompi/mca/fs/base/fs_base_file_select.c b/ompi/mca/fs/base/fs_base_file_select.c index 41ea29275a3..6d91087b7da 100644 --- a/ompi/mca/fs/base/fs_base_file_select.c +++ b/ompi/mca/fs/base/fs_base_file_select.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,7 +30,7 @@ #include "ompi/mca/io/ompio/io_ompio.h" /* - * This structure is needed so that we can close the modules + * This structure is needed so that we can close the modules * which are not selected but were opened. mca_base_modules_close * which does this job for us requires a opal_list_t which contains * these modules @@ -58,20 +58,20 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * 4. Select the module with the highest priority * 5. Call the init function on the selected module so that it does the * right setup for the file - * 6. Call finalize on all the other modules which returned + * 6. Call finalize on all the other modules which returned * their module but were unfortunate to not get selected - */ + */ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, - mca_base_component_t *preferred) + mca_base_component_t *preferred) { - int priority; - int best_priority; + int priority; + int best_priority; opal_list_item_t *item; mca_base_component_list_item_t *cli; - mca_fs_base_component_t *component; + mca_fs_base_component_t *component; mca_fs_base_component_t *best_component; - mca_fs_base_module_t *module; + mca_fs_base_module_t *module; opal_list_t queried; queried_module_t *om; int err = MPI_SUCCESS; @@ -80,19 +80,19 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, provided then it should be used (if possible) */ if (NULL != preferred) { - + /* We have a preferred component. Check if it is available and if so, whether it wants to run */ opal_output_verbose(10, ompi_fs_base_framework.framework_output, "fs:base:file_select: Checking preferred component: %s", preferred->mca_component_name); - - /* query the component for its priority and get its module + + /* query the component for its priority and get its module structure. This is necessary to proceed */ - + component = (mca_fs_base_component_t *)preferred; module = component->fsm_file_query (file, &priority); - if (NULL != module && + if (NULL != module && NULL != module->fs_module_init) { /* this query seems to have returned something legitimate @@ -105,7 +105,7 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, file->f_fs_component = preferred; return module->fs_module_init(file); - } + } /* His preferred component is present, but is unable to * run. This is not a good sign. We should try selecting * some other component We let it fall through and select @@ -122,7 +122,7 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, * All we need to do is to go through the list of available * components and find the one which has the highest priority and * use that for this file - */ + */ best_component = NULL; best_priority = -1; @@ -144,21 +144,21 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, } else { /* * call the query function and see what it returns - */ + */ module = component->fsm_file_query (file, &priority); if (NULL == module || NULL == module->fs_module_init) { /* * query did not return any action which can be used - */ + */ opal_output_verbose(10, ompi_fs_base_framework.framework_output, "select: query returned failure"); } else { opal_output_verbose(10, ompi_fs_base_framework.framework_output, "select: query returned priority %d", priority); - /* + /* * is this the best component we have found till now? */ if (priority > best_priority) { @@ -175,8 +175,8 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, return OMPI_ERR_OUT_OF_RESOURCE; } om->om_component = component; - om->om_module = module; - opal_list_append(&queried, (opal_list_item_t *)om); + om->om_module = module; + opal_list_append(&queried, (opal_list_item_t *)om); } /* end else of if (NULL == module) */ } /* end else of if (NULL == component->fsm_init) */ } /* end for ... end of traversal */ @@ -202,7 +202,7 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, * returned their priorities from the query. We now have to * unquery() those components which have not been selected and * init() the component which was selected - */ + */ while (NULL != (item = opal_list_remove_first(&queried))) { om = (queried_module_t *) item; if (om->om_component == best_component) { @@ -214,7 +214,7 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, * defined. Whereever a function pointer is null in the * module structure we need to fill it in with the base * structure function pointers. This is yet to be done - */ + */ /* * We don return here coz we still need to go through and @@ -243,7 +243,7 @@ int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, } /* if not best component */ OBJ_RELEASE(om); } /* traversing through the entire list */ - + opal_output_verbose(10, ompi_fs_base_framework.framework_output, "select: component %s selected", best_component->fsm_version.mca_component_name); diff --git a/ompi/mca/fs/base/fs_base_file_unselect.c b/ompi/mca/fs/base/fs_base_file_unselect.c index 73859b698c7..1252bc24976 100644 --- a/ompi/mca/fs/base/fs_base_file_unselect.c +++ b/ompi/mca/fs/base/fs_base_file_unselect.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/base/fs_base_find_available.c b/ompi/mca/fs/base/fs_base_find_available.c index 9fe2fc6182e..edc32e174e0 100644 --- a/ompi/mca/fs/base/fs_base_find_available.c +++ b/ompi/mca/fs/base/fs_base_find_available.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,18 +36,18 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, bool enable_mpi_threads); - + int mca_fs_base_find_available(bool enable_progress_threads, bool enable_mpi_threads) { mca_base_component_list_item_t *cli, *next; - /* The list of components which we should check is already present - in mca_fs_base_components_opened, which was established in + /* The list of components which we should check is already present + in mca_fs_base_components_opened, which was established in mca_fs_base_open */ OPAL_LIST_FOREACH_SAFE(cli, next, &ompi_fs_base_framework.framework_components, mca_base_component_list_item_t) { - /* Now for this entry, we have to determine the thread level. Call + /* Now for this entry, we have to determine the thread level. Call a subroutine to do the job for us */ if (OMPI_SUCCESS != init_query(cli->cli_component, @@ -72,14 +72,14 @@ int mca_fs_base_find_available(bool enable_progress_threads, /* All done */ return OMPI_SUCCESS; } - - + + static int init_query(const mca_base_component_t *m, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { int ret; - + opal_output_verbose(10, ompi_fs_base_framework.framework_output, "fs:find_available: querying fs component %s", m->mca_component_name); @@ -118,11 +118,11 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { - mca_fs_base_component_2_0_0_t *fs = + mca_fs_base_component_2_0_0_t *fs = (mca_fs_base_component_2_0_0_t *) component; - + return fs->fsm_init_query(enable_progress_threads, enable_mpi_threads); } diff --git a/ompi/mca/fs/base/fs_base_frame.c b/ompi/mca/fs/base/fs_base_frame.c index 7f0fae12b28..1a992dd24d7 100644 --- a/ompi/mca/fs/base/fs_base_frame.c +++ b/ompi/mca/fs/base/fs_base_frame.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/base/fs_base_get_parent_dir.c b/ompi/mca/fs/base/fs_base_get_parent_dir.c index 5e622458931..fcfa7d3e0a7 100644 --- a/ompi/mca/fs/base/fs_base_get_parent_dir.c +++ b/ompi/mca/fs/base/fs_base_get_parent_dir.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,7 +30,7 @@ #include "ompi/mca/fs/base/base.h" #ifdef HAVE_SYS_STATFS_H -#include /* or */ +#include /* or */ #endif #ifdef HAVE_SYS_PARAM_H #include diff --git a/ompi/mca/fs/configure.m4 b/ompi/mca/fs/configure.m4 index 71013429cbc..f394b14cb11 100644 --- a/ompi/mca/fs/configure.m4 +++ b/ompi/mca/fs/configure.m4 @@ -3,15 +3,15 @@ # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # MCA_ompi_fs_CONFIG(project_name, framework_name) # ------------------------------------------- -AC_DEFUN([MCA_ompi_fs_CONFIG], +AC_DEFUN([MCA_ompi_fs_CONFIG], [ # An AC-ARG-ENABLE for mpi-io was set in ompi/mca/io/configure.m4. # If it's no, we shouldn't bother building anything in fcoll. diff --git a/ompi/mca/fs/fs.h b/ompi/mca/fs/fs.h index a8cd47a98d4..2b3a1ab79e9 100644 --- a/ompi/mca/fs/fs.h +++ b/ompi/mca/fs/fs.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,8 +41,8 @@ struct mca_io_ompio_file_t; /* * This framework provides the abstraction for file management operations * of the MPI I/O chapter in MPI-2. The operations defined by this - * framework are mostly collective in nature. - * + * framework are mostly collective in nature. + * * These are the component function prototypes. These function pointers * go into the component structure. These functions (query() and finalize() * are called during fs_base_select(). Each component is query() ied @@ -65,11 +65,11 @@ struct mca_io_ompio_file_t; * **************** component struct ******************************* */ -typedef int (*mca_fs_base_component_init_query_1_0_0_fn_t) - (bool enable_progress_threads, +typedef int (*mca_fs_base_component_init_query_1_0_0_fn_t) + (bool enable_progress_threads, bool enable_mpi_threads); -typedef struct mca_fs_base_module_1_0_0_t * +typedef struct mca_fs_base_module_1_0_0_t * (*mca_fs_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file, int *priority); @@ -84,7 +84,7 @@ typedef int (*mca_fs_base_component_file_unquery_1_0_0_fn_t) struct mca_fs_base_component_2_0_0_t { mca_base_component_t fsm_version; mca_base_component_data_t fsm_data; - + mca_fs_base_component_init_query_1_0_0_fn_t fsm_init_query; mca_fs_base_component_file_query_1_0_0_fn_t fsm_file_query; mca_fs_base_component_file_unquery_1_0_0_fn_t fsm_file_unquery; @@ -132,7 +132,7 @@ struct mca_fs_base_module_1_0_0_t { */ mca_fs_base_module_init_1_0_0_fn_t fs_module_init; mca_fs_base_module_finalize_1_0_0_fn_t fs_module_finalize; - + /* FS function pointers */ mca_fs_base_module_file_open_fn_t fs_file_open; mca_fs_base_module_file_close_fn_t fs_file_close; diff --git a/ompi/mca/fs/lustre/Makefile.am b/ompi/mca/fs/lustre/Makefile.am index 1640aec4ecc..4fe256888ef 100644 --- a/ompi/mca/fs/lustre/Makefile.am +++ b/ompi/mca/fs/lustre/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fs/lustre/configure.m4 b/ompi/mca/fs/lustre/configure.m4 index bab25ec6fbf..ab660ed0b26 100644 --- a/ompi/mca/fs/lustre/configure.m4 +++ b/ompi/mca/fs/lustre/configure.m4 @@ -6,21 +6,21 @@ # 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, +# 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) 2008-2012 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_fs_lustre_CONFIG(action-if-can-compile, +# MCA_fs_lustre_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fs_lustre_CONFIG],[ diff --git a/ompi/mca/fs/lustre/fs_lustre.c b/ompi/mca/fs/lustre/fs_lustre.c index 4be9ecdcd0a..6bd661b9c74 100644 --- a/ompi/mca/fs/lustre/fs_lustre.c +++ b/ompi/mca/fs/lustre/fs_lustre.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -30,7 +30,7 @@ #include "ompi/mca/fs/lustre/fs_lustre.h" #ifdef HAVE_SYS_STATFS_H -#include /* or */ +#include /* or */ #endif #ifdef HAVE_SYS_PARAM_H #include @@ -71,9 +71,9 @@ int mca_fs_lustre_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} struct mca_fs_base_module_1_0_0_t * mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority) @@ -84,19 +84,19 @@ mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority) char *tmp; /* The code in this function is based on the ADIO FS selection in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ *priority = mca_fs_lustre_priority; - + tmp = strchr (fh->f_filename, ':'); if (!tmp) { if (OMPIO_ROOT == fh->f_rank) { do { err = statfs (fh->f_filename, &fsbuf); } while (err && (errno == ESTALE)); - + if (err && (errno == ENOENT)) { mca_fs_base_get_parent_dir (fh->f_filename, &dir); err = statfs (dir, &fsbuf); @@ -117,12 +117,12 @@ mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority) fh->f_comm->c_coll.coll_bcast_module); } else { - if (!strncmp(fh->f_filename, "lustre:", 7) || + if (!strncmp(fh->f_filename, "lustre:", 7) || !strncmp(fh->f_filename, "LUSTRE:", 7)) { fh->f_fstype = LUSTRE; } } - + if (LUSTRE == fh->f_fstype) { if (*priority < 50) { *priority = 50; @@ -134,9 +134,9 @@ mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority) } int mca_fs_lustre_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -144,14 +144,14 @@ int mca_fs_lustre_component_file_unquery (mca_io_ompio_file_t *file) int mca_fs_lustre_module_init (mca_io_ompio_file_t *file) { - /* Make sure the file type is not overwritten by the last queried + /* Make sure the file type is not overwritten by the last queried * component */ file->f_fstype = LUSTRE; return OMPI_SUCCESS; } - -int mca_fs_lustre_module_finalize (mca_io_ompio_file_t *file) + +int mca_fs_lustre_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/lustre/fs_lustre.h b/ompi/mca/fs/lustre/fs_lustre.h index ec8a45e2f7e..07239657140 100644 --- a/ompi/mca/fs/lustre/fs_lustre.h +++ b/ompi/mca/fs/lustre/fs_lustre.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -53,23 +53,23 @@ OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_lustre_componen * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ -int mca_fs_lustre_file_open (struct ompi_communicator_t *comm, - char *filename, +int mca_fs_lustre_file_open (struct ompi_communicator_t *comm, + char *filename, int amode, - struct ompi_info_t *info, + struct ompi_info_t *info, mca_io_ompio_file_t *fh); int mca_fs_lustre_file_close (mca_io_ompio_file_t *fh); - + int mca_fs_lustre_file_delete (char *filename, struct ompi_info_t *info); int mca_fs_lustre_file_set_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_lustre_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_lustre_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); int mca_fs_lustre_file_sync (mca_io_ompio_file_t *fh); @@ -81,8 +81,8 @@ int mca_fs_lustre_file_seek (mca_io_ompio_file_t *fh, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FS_LUSTRE_H */ diff --git a/ompi/mca/fs/lustre/fs_lustre_component.c b/ompi/mca/fs/lustre/fs_lustre_component.c index c6dc1fadfa1..d8392af482d 100644 --- a/ompi/mca/fs/lustre/fs_lustre_component.c +++ b/ompi/mca/fs/lustre/fs_lustre_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -41,7 +41,7 @@ static int lustre_register(void); int mca_fs_lustre_priority = 20; /*setting default stripe size to 64KB. MCA parameter - Can be changed at + Can be changed at runtime also*/ int mca_fs_lustre_stripe_size = 0; int mca_fs_lustre_stripe_width = 0; diff --git a/ompi/mca/fs/lustre/fs_lustre_file_close.c b/ompi/mca/fs/lustre/fs_lustre_file_close.c index 0ee1e15b27f..a62e371d040 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_close.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_close.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ int mca_fs_lustre_file_close (mca_io_ompio_file_t *fh) { - fh->f_comm->c_coll.coll_barrier (fh->f_comm, + fh->f_comm->c_coll.coll_barrier (fh->f_comm, fh->f_comm->c_coll.coll_barrier_module); close (fh->fd); return OMPI_SUCCESS; diff --git a/ompi/mca/fs/lustre/fs_lustre_file_delete.c b/ompi/mca/fs/lustre/fs_lustre_file_delete.c index ba45ae168d1..1fc6da84080 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_delete.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_delete.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/lustre/fs_lustre_file_get_size.c b/ompi/mca/fs/lustre/fs_lustre_file_get_size.c index d38fea450e3..e6e2a514225 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_get_size.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_get_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/lustre/fs_lustre_file_open.c b/ompi/mca/fs/lustre/fs_lustre_file_open.c index e6f2fa48eda..8b1c4c7c102 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_open.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_open.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -54,7 +54,7 @@ static void *alloc_lum() */ int -mca_fs_lustre_file_open (struct ompi_communicator_t *comm, +mca_fs_lustre_file_open (struct ompi_communicator_t *comm, char* filename, int access_mode, struct ompi_info_t *info, @@ -121,13 +121,13 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, fh->fd = open(filename, O_CREAT | O_RDWR | O_LOV_DELAY_CREATE, perm); if (fh->fd < 0) { - fprintf(stderr, "Can't open %s file: %d (%s)\n", + fprintf(stderr, "Can't open %s file: %d (%s)\n", filename, errno, strerror(errno)); return OMPI_ERROR; } close (fh->fd); } - fh->f_comm->c_coll.coll_barrier (fh->f_comm, + fh->f_comm->c_coll.coll_barrier (fh->f_comm, fh->f_comm->c_coll.coll_barrier_module); } diff --git a/ompi/mca/fs/lustre/fs_lustre_file_set_size.c b/ompi/mca/fs/lustre/fs_lustre_file_set_size.c index 96b9a30e4a6..5c2d6b1eb56 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_set_size.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_set_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/lustre/fs_lustre_file_sync.c b/ompi/mca/fs/lustre/fs_lustre_file_sync.c index 2c97f8e90d2..091960de234 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_sync.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_sync.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,7 +39,7 @@ mca_fs_lustre_file_sync (mca_io_ompio_file_t *fh) int err; err = fsync(fh->fd); - + if (-1 == err) { return OMPI_ERROR; } diff --git a/ompi/mca/fs/plfs/Makefile.am b/ompi/mca/fs/plfs/Makefile.am index 2576c5acd01..be6409d131a 100644 --- a/ompi/mca/fs/plfs/Makefile.am +++ b/ompi/mca/fs/plfs/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2014 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -40,7 +40,7 @@ fs_plfs_sources = \ fs_plfs_file_delete.c \ fs_plfs_file_sync.c \ fs_plfs_file_set_size.c \ - fs_plfs_file_get_size.c + fs_plfs_file_get_size.c AM_CPPFLAGS = $(fs_plfs_CPPFLAGS) diff --git a/ompi/mca/fs/plfs/configure.m4 b/ompi/mca/fs/plfs/configure.m4 index 7a63540f5c8..012422ea760 100644 --- a/ompi/mca/fs/plfs/configure.m4 +++ b/ompi/mca/fs/plfs/configure.m4 @@ -6,21 +6,21 @@ # 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, +# 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) 2008-2014 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_fs_plfs_CONFIG(action-if-can-compile, +# MCA_fs_plfs_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fs_plfs_CONFIG],[ diff --git a/ompi/mca/fs/plfs/fs_plfs.c b/ompi/mca/fs/plfs/fs_plfs.c index 7c024ca5ca5..0085150043a 100644 --- a/ompi/mca/fs/plfs/fs_plfs.c +++ b/ompi/mca/fs/plfs/fs_plfs.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -30,7 +30,7 @@ #include "ompi/mca/fs/plfs/fs_plfs.h" #ifdef HAVE_SYS_STATFS_H -#include /* or */ +#include /* or */ #endif #ifdef HAVE_SYS_PARAM_H #include @@ -71,7 +71,7 @@ int mca_fs_plfs_component_init_query(bool enable_progress_threads, { /* Nothing to do */ return OMPI_SUCCESS; -} +} struct mca_fs_base_module_1_0_0_t * mca_fs_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) @@ -83,27 +83,27 @@ mca_fs_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) char wpath[1024]; /* The code in this function is based on the ADIO FS selection in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ *priority = mca_fs_plfs_priority; - + tmp = strchr (fh->f_filename, ':'); if (!tmp) { if (OMPIO_ROOT == fh->f_rank) { do { err = statfs (fh->f_filename, &fsbuf); } while (err && (errno == ESTALE)); - + if (err && (ENOENT == errno)) { mca_fs_base_get_parent_dir (fh->f_filename, &dir); err = statfs (dir, &fsbuf); free (dir); } - - getcwd( wpath, sizeof(wpath) ); - if(is_plfs_path(wpath) == 1) { + + getcwd( wpath, sizeof(wpath) ); + if(is_plfs_path(wpath) == 1) { fh->f_fstype = PLFS; } } @@ -115,12 +115,12 @@ mca_fs_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) fh->f_comm->c_coll.coll_bcast_module); } else { - if (!strncmp(fh->f_filename, "plfs:", 7) || + if (!strncmp(fh->f_filename, "plfs:", 7) || !strncmp(fh->f_filename, "PLFS:", 7)) { fh->f_fstype = PLFS; } } - + if (PLFS == fh->f_fstype) { if (*priority < 50) { *priority = 50; @@ -131,9 +131,9 @@ mca_fs_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) } int mca_fs_plfs_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -141,14 +141,14 @@ int mca_fs_plfs_component_file_unquery (mca_io_ompio_file_t *file) int mca_fs_plfs_module_init (mca_io_ompio_file_t *file) { - /* Make sure the file type is not overwritten by the last queried + /* Make sure the file type is not overwritten by the last queried * component */ file->f_fstype = PLFS; return OMPI_SUCCESS; } - -int mca_fs_plfs_module_finalize (mca_io_ompio_file_t *file) + +int mca_fs_plfs_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/plfs/fs_plfs.h b/ompi/mca/fs/plfs/fs_plfs.h index 323a4b42163..47e9cc4a476 100644 --- a/ompi/mca/fs/plfs/fs_plfs.h +++ b/ompi/mca/fs/plfs/fs_plfs.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,23 +46,23 @@ OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_plfs_component; * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ -int mca_fs_plfs_file_open (struct ompi_communicator_t *comm, - char *filename, +int mca_fs_plfs_file_open (struct ompi_communicator_t *comm, + char *filename, int amode, - struct ompi_info_t *info, + struct ompi_info_t *info, mca_io_ompio_file_t *fh); int mca_fs_plfs_file_close (mca_io_ompio_file_t *fh); - + int mca_fs_plfs_file_delete (char *filename, struct ompi_info_t *info); int mca_fs_plfs_file_set_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_plfs_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_plfs_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); int mca_fs_plfs_file_sync (mca_io_ompio_file_t *fh); @@ -74,8 +74,8 @@ int mca_fs_plfs_file_seek (mca_io_ompio_file_t *fh, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FS_PLFS_H */ diff --git a/ompi/mca/fs/plfs/fs_plfs_component.c b/ompi/mca/fs/plfs/fs_plfs_component.c index 37c50745329..c3ac966c80b 100644 --- a/ompi/mca/fs/plfs/fs_plfs_component.c +++ b/ompi/mca/fs/plfs/fs_plfs_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fs/plfs/fs_plfs_file_close.c b/ompi/mca/fs/plfs/fs_plfs_file_close.c index 83109f1e620..9a14b3752c9 100644 --- a/ompi/mca/fs/plfs/fs_plfs_file_close.c +++ b/ompi/mca/fs/plfs/fs_plfs_file_close.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,12 +43,12 @@ mca_fs_plfs_file_close (mca_io_ompio_file_t *fh) int amode; char wpath[1024]; - fh->f_comm->c_coll.coll_barrier (fh->f_comm, + fh->f_comm->c_coll.coll_barrier (fh->f_comm, fh->f_comm->c_coll.coll_barrier_module); getcwd( wpath, sizeof(wpath) ); sprintf( wpath,"%s/%s",wpath,fh->f_filename ); - + if(-1 == access(fh->f_filename, F_OK)) { return OMPI_ERROR; // file doesn't exist } @@ -65,9 +65,9 @@ mca_fs_plfs_file_close (mca_io_ompio_file_t *fh) if (fh->f_amode & MPI_MODE_EXCL) { return OMPI_ERROR; } - - plfs_ret = plfs_close(fh->f_fs_ptr, 0, 0, amode ,NULL, &flags); - if (PLFS_SUCCESS != plfs_ret) { + + plfs_ret = plfs_close(fh->f_fs_ptr, 0, 0, amode ,NULL, &flags); + if (PLFS_SUCCESS != plfs_ret) { opal_output(0, "fs_plfs_file_close: Error in plfs_close:\n%s\n", strplfserr(plfs_ret)); return OMPI_ERROR; } diff --git a/ompi/mca/fs/plfs/fs_plfs_file_delete.c b/ompi/mca/fs/plfs/fs_plfs_file_delete.c index aad9ec4456d..d20a8e88c59 100644 --- a/ompi/mca/fs/plfs/fs_plfs_file_delete.c +++ b/ompi/mca/fs/plfs/fs_plfs_file_delete.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/plfs/fs_plfs_file_get_size.c b/ompi/mca/fs/plfs/fs_plfs_file_get_size.c index e27284d569b..c59bd8c53ae 100644 --- a/ompi/mca/fs/plfs/fs_plfs_file_get_size.c +++ b/ompi/mca/fs/plfs/fs_plfs_file_get_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,8 +42,8 @@ mca_fs_plfs_file_get_size (mca_io_ompio_file_t *fh, char wpath[1024]; int size_only = 1; - getcwd(wpath, sizeof(wpath)); - sprintf(wpath,"%s/%s",wpath,fh->f_filename); + getcwd(wpath, sizeof(wpath)); + sprintf(wpath,"%s/%s",wpath,fh->f_filename); plfs_ret = plfs_getattr(pfd, wpath, &st, size_only); if (PLFS_SUCCESS != plfs_ret) { diff --git a/ompi/mca/fs/plfs/fs_plfs_file_open.c b/ompi/mca/fs/plfs/fs_plfs_file_open.c index a333a477bcd..3ed8cb9cf73 100644 --- a/ompi/mca/fs/plfs/fs_plfs_file_open.c +++ b/ompi/mca/fs/plfs/fs_plfs_file_open.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,7 +39,7 @@ * Returns: - Success if new file handle */ int -mca_fs_plfs_file_open (struct ompi_communicator_t *comm, +mca_fs_plfs_file_open (struct ompi_communicator_t *comm, char* filename, int access_mode, struct ompi_info_t *info, @@ -58,7 +58,7 @@ mca_fs_plfs_file_open (struct ompi_communicator_t *comm, getcwd( wpath, sizeof(wpath) ); sprintf( wpath,"%s/%s",wpath,filename ); - + if (OMPIO_PERM_NULL == fh->f_perm) { old_mask = umask(022); umask(old_mask); @@ -76,7 +76,7 @@ mca_fs_plfs_file_open (struct ompi_communicator_t *comm, amode = amode | O_WRONLY; if (access_mode & MPI_MODE_RDWR) amode = amode | O_RDWR; - if (access_mode & MPI_MODE_EXCL) { + if (access_mode & MPI_MODE_EXCL) { if( is_plfs_path(wpath) == 1 ) { //the file already exists return OMPI_ERROR; } @@ -90,7 +90,7 @@ mca_fs_plfs_file_open (struct ompi_communicator_t *comm, plfs_ret = plfs_open( &pfd, wpath, amode, 0, perm, NULL ); fh->f_fs_ptr = pfd; } - + comm->c_coll.coll_bcast ( &plfs_ret, 1, MPI_INT, 0, comm, comm->c_coll.coll_bcast_module); if ( PLFS_SUCCESS != plfs_ret ) { return OMPI_ERROR; @@ -100,12 +100,12 @@ mca_fs_plfs_file_open (struct ompi_communicator_t *comm, plfs_ret = plfs_open( &pfd, wpath, amode, 0, perm, NULL ); if (PLFS_SUCCESS != plfs_ret) { opal_output(0, "fs_plfs_file_open: Error in plfs_open:\n%s\n", strplfserr(plfs_ret)); - return OMPI_ERROR; + return OMPI_ERROR; } else { fh->f_fs_ptr = pfd; } - } + } if (mca_fs_plfs_num_hostdir > 0) { plfs_ret = plfs_setxattr( pfd, &mca_fs_plfs_num_hostdir, key, len ); diff --git a/ompi/mca/fs/plfs/fs_plfs_file_set_size.c b/ompi/mca/fs/plfs/fs_plfs_file_set_size.c index 8ab6aeb45c9..6c24fb44c53 100644 --- a/ompi/mca/fs/plfs/fs_plfs_file_set_size.c +++ b/ompi/mca/fs/plfs/fs_plfs_file_set_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/plfs/fs_plfs_file_sync.c b/ompi/mca/fs/plfs/fs_plfs_file_sync.c index c08cba1a25f..6bbf056b0f9 100644 --- a/ompi/mca/fs/plfs/fs_plfs_file_sync.c +++ b/ompi/mca/fs/plfs/fs_plfs_file_sync.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/pvfs2/Makefile.am b/ompi/mca/fs/pvfs2/Makefile.am index 3232b53147a..4b8f6bfc578 100644 --- a/ompi/mca/fs/pvfs2/Makefile.am +++ b/ompi/mca/fs/pvfs2/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -40,7 +40,7 @@ fs_pvfs2_sources = \ fs_pvfs2_file_delete.c \ fs_pvfs2_file_sync.c \ fs_pvfs2_file_set_size.c \ - fs_pvfs2_file_get_size.c + fs_pvfs2_file_get_size.c AM_CPPFLAGS = $(fs_pvfs2_CPPFLAGS) diff --git a/ompi/mca/fs/pvfs2/configure.m4 b/ompi/mca/fs/pvfs2/configure.m4 index 1c5195155da..17539ba070f 100644 --- a/ompi/mca/fs/pvfs2/configure.m4 +++ b/ompi/mca/fs/pvfs2/configure.m4 @@ -6,21 +6,21 @@ # 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, +# 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) 2008-2012 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_fs_pvfs2_CONFIG(action-if-can-compile, +# MCA_fs_pvfs2_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fs_pvfs2_CONFIG],[ diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2.c b/ompi/mca/fs/pvfs2/fs_pvfs2.c index c2410f416c7..c28ce4fae3a 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -31,7 +31,7 @@ #include "ompi/mca/fs/pvfs2/fs_pvfs2.h" #ifdef HAVE_SYS_STATFS_H -#include /* or */ +#include /* or */ #endif #ifdef HAVE_SYS_PARAM_H #include @@ -68,16 +68,16 @@ int mca_fs_pvfs2_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} struct mca_fs_base_module_1_0_0_t * mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) { /* The code in this function is based on the ADIO FS selection in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -87,7 +87,7 @@ mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) char *tmp; /* The code in this function is based on the ADIO FS selection in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) do { err = statfs (fh->f_filename, &fsbuf); } while (err && (errno == ESTALE)); - + if (err && (errno == ENOENT)) { mca_fs_base_get_parent_dir (fh->f_filename, &dir); err = statfs (dir, &fsbuf); @@ -117,12 +117,12 @@ mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) fh->f_comm->c_coll.coll_bcast_module); } else { - if (!strncmp(fh->f_filename, "pvfs2:", 6) || + if (!strncmp(fh->f_filename, "pvfs2:", 6) || !strncmp(fh->f_filename, "PVFS2:", 6)) { fh->f_fstype = PVFS2; } } - + if (PVFS2 == fh->f_fstype) { if (*priority < 50) { *priority = 50; @@ -134,9 +134,9 @@ mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) } int mca_fs_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -144,14 +144,14 @@ int mca_fs_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) int mca_fs_pvfs2_module_init (mca_io_ompio_file_t *file) { - /* Make sure the file type is not overwritten by the last queried + /* Make sure the file type is not overwritten by the last queried * component */ file->f_fstype = PVFS2; return OMPI_SUCCESS; } - -int mca_fs_pvfs2_module_finalize (mca_io_ompio_file_t *file) + +int mca_fs_pvfs2_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2.h b/ompi/mca/fs/pvfs2/fs_pvfs2.h index 89109159abe..7cc6d358eed 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2.h +++ b/ompi/mca/fs/pvfs2/fs_pvfs2.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -63,23 +63,23 @@ OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_pvfs2_component * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ -int mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, - char *filename, +int mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, + char *filename, int amode, - struct ompi_info_t *info, + struct ompi_info_t *info, mca_io_ompio_file_t *fh); int mca_fs_pvfs2_file_close (mca_io_ompio_file_t *fh); - + int mca_fs_pvfs2_file_delete (char *filename, struct ompi_info_t *info); int mca_fs_pvfs2_file_set_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_pvfs2_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_pvfs2_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); int mca_fs_pvfs2_file_sync (mca_io_ompio_file_t *fh); @@ -91,8 +91,8 @@ int mca_fs_pvfs2_file_seek (mca_io_ompio_file_t *fh, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FS_PVFS2_H */ diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_component.c b/ompi/mca/fs/pvfs2/fs_pvfs2_component.c index 9f14312b189..319ca605df8 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_component.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c index 675cd1766ac..cc3ea3e1c3f 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -46,7 +46,7 @@ mca_fs_pvfs2_file_close (mca_io_ompio_file_t *fh) fh->f_fs_ptr = NULL; } /* - fh->f_comm->c_coll.coll_barrier (fh->f_comm, + fh->f_comm->c_coll.coll_barrier (fh->f_comm, fh->f_comm->c_coll.coll_barrier_module); close (fh->fd); */ diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c index 355770439ee..d69007fe6a1 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c index 6eef1c521eb..f6b5059529d 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c index 5ae30413c30..6414ff6894b 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -40,12 +40,12 @@ struct open_status_s { }; typedef struct open_status_s open_status; -static void fake_an_open(PVFS_fs_id id, - char *pvfs2_name, +static void fake_an_open(PVFS_fs_id id, + char *pvfs2_name, int access_mode, - int stripe_width, + int stripe_width, PVFS_size stripe_size, - mca_fs_pvfs2 *pvfs2_fs, + mca_fs_pvfs2 *pvfs2_fs, open_status *o_status); /* * file_open_pvfs2: This is the same strategy as ROMIO's pvfs2 open @@ -55,7 +55,7 @@ static void fake_an_open(PVFS_fs_id id, * Returns: - Success if new file handle */ int -mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, +mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, char* filename, int access_mode, struct ompi_info_t *info, @@ -132,12 +132,12 @@ mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, o_status.error = -1; } else { - fake_an_open (pvfs2_id, + fake_an_open (pvfs2_id, pvfs2_path, - access_mode, + access_mode, fs_pvfs2_stripe_width, (PVFS_size)fs_pvfs2_stripe_size, - pvfs2_fs, + pvfs2_fs, &o_status); } pvfs2_fs->object_ref = o_status.object_ref; @@ -171,24 +171,24 @@ mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, fh->f_fs_ptr = pvfs2_fs; /* update the internal ompio structure to store stripe - size and stripe depth correctly. + size and stripe depth correctly. Hadi(to be done): For this read the stripe size and stripe depth from the file itself */ - + if (fs_pvfs2_stripe_size > 0 && fs_pvfs2_stripe_width > 0) { fh->f_stripe_size = fs_pvfs2_stripe_size; } - + return OMPI_SUCCESS; } -static void fake_an_open(PVFS_fs_id id, - char *pvfs2_name, +static void fake_an_open(PVFS_fs_id id, + char *pvfs2_name, int access_mode, - int stripe_width, + int stripe_width, PVFS_size stripe_size, - mca_fs_pvfs2 *pvfs2_fs, + mca_fs_pvfs2 *pvfs2_fs, open_status *o_status) { int ret; @@ -199,7 +199,7 @@ static void fake_an_open(PVFS_fs_id id, PVFS_sys_dist *dist; memset(&attribs, 0, sizeof(PVFS_sys_attr)); - + attribs.owner = geteuid(); attribs.group = getegid(); attribs.perms = 0644; @@ -219,24 +219,24 @@ static void fake_an_open(PVFS_fs_id id, memset(&resp_getparent, 0, sizeof(resp_getparent)); memset(&resp_create, 0, sizeof(resp_create)); - ret = PVFS_sys_lookup(id, + ret = PVFS_sys_lookup(id, pvfs2_name, - &(pvfs2_fs->credentials), - &resp_lookup, + &(pvfs2_fs->credentials), + &resp_lookup, PVFS2_LOOKUP_LINK_FOLLOW); if ( ret == (-PVFS_ENOENT)) { if (access_mode & MPI_MODE_CREATE) { - ret = PVFS_sys_getparent(id, + ret = PVFS_sys_getparent(id, pvfs2_name, - &(pvfs2_fs->credentials), - &resp_getparent); + &(pvfs2_fs->credentials), + &resp_getparent); if (ret < 0) { opal_output (1, "pvfs_sys_getparent returns with %d\n", ret); o_status->error = ret; return; } - + /* Set the distribution stripe size if specified */ if (0 < stripe_size) { /* Note that the distribution is hardcoded here */ @@ -245,34 +245,34 @@ static void fake_an_open(PVFS_fs_id id, "strip_size", &stripe_size); if (ret < 0) { - opal_output (1, + opal_output (1, "pvfs_sys_dist_setparam returns with %d\n", ret); o_status->error = ret; } } /* Perform file creation */ - ret = PVFS_sys_create(resp_getparent.basename, - resp_getparent.parent_ref, + ret = PVFS_sys_create(resp_getparent.basename, + resp_getparent.parent_ref, attribs, - &(pvfs2_fs->credentials), - dist, - &resp_create); + &(pvfs2_fs->credentials), + dist, + &resp_create); /* #ifdef HAVE_PVFS2_CREATE_WITHOUT_LAYOUT - ret = PVFS_sys_create(resp_getparent.basename, - resp_getparent.parent_ref, - attribs, - &(pvfs2_fs->credentials), - dist, - &resp_create); - #else - ret = PVFS_sys_create(resp_getparent.basename, - resp_getparent.parent_ref, - attribs, - &(pvfs2_fs->credentials), - dist, - NULL, + ret = PVFS_sys_create(resp_getparent.basename, + resp_getparent.parent_ref, + attribs, + &(pvfs2_fs->credentials), + dist, + &resp_create); + #else + ret = PVFS_sys_create(resp_getparent.basename, + resp_getparent.parent_ref, + attribs, + &(pvfs2_fs->credentials), + dist, + NULL, &resp_create); #endif */ @@ -283,10 +283,10 @@ static void fake_an_open(PVFS_fs_id id, * less work for us and we can just open it up and return the * handle */ if (ret == (-PVFS_EEXIST)) { - ret = PVFS_sys_lookup(id, + ret = PVFS_sys_lookup(id, pvfs2_name, - &(pvfs2_fs->credentials), - &resp_lookup, + &(pvfs2_fs->credentials), + &resp_lookup, PVFS2_LOOKUP_LINK_FOLLOW); if ( ret < 0 ) { o_status->error = ret; @@ -303,12 +303,12 @@ static void fake_an_open(PVFS_fs_id id, o_status->error = ret; return; } - } + } else if (access_mode & MPI_MODE_EXCL) { /* lookup should not succeed if opened with EXCL */ o_status->error = -PVFS_EEXIST; return; - } + } else { o_status->object_ref = resp_lookup.ref; } diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c index 541e986c3ff..551f5a03ee8 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -54,7 +54,7 @@ mca_fs_pvfs2_file_set_size (mca_io_ompio_file_t *fh, OMPIO_ROOT, fh->f_comm, fh->f_comm->c_coll.coll_bcast_module); - } + } else { fh->f_comm->c_coll.coll_bcast (&ret, 1, diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c index e302a7fc91b..e4a7758ab24 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c @@ -5,20 +5,20 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* This code is based on the PVFS2 ADIO module in ROMIO - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/fs/ufs/Makefile.am b/ompi/mca/fs/ufs/Makefile.am index fcd03d5638c..a66f1d8993f 100644 --- a/ompi/mca/fs/ufs/Makefile.am +++ b/ompi/mca/fs/ufs/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/fs/ufs/fs_ufs.c b/ompi/mca/fs/ufs/fs_ufs.c index 91b17e6ccd8..b16ec9c8191 100644 --- a/ompi/mca/fs/ufs/fs_ufs.c +++ b/ompi/mca/fs/ufs/fs_ufs.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -54,9 +54,9 @@ int mca_fs_ufs_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} struct mca_fs_base_module_1_0_0_t * mca_fs_ufs_component_file_query (mca_io_ompio_file_t *fh, int *priority) @@ -72,9 +72,9 @@ mca_fs_ufs_component_file_query (mca_io_ompio_file_t *fh, int *priority) } int mca_fs_ufs_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -82,14 +82,14 @@ int mca_fs_ufs_component_file_unquery (mca_io_ompio_file_t *file) int mca_fs_ufs_module_init (mca_io_ompio_file_t *file) { - /* Make sure the file type is not overwritten by the last queried + /* Make sure the file type is not overwritten by the last queried * component */ file->f_fstype = UFS; return OMPI_SUCCESS; } - -int mca_fs_ufs_module_finalize (mca_io_ompio_file_t *file) + +int mca_fs_ufs_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/ufs/fs_ufs.h b/ompi/mca/fs/ufs/fs_ufs.h index c884d625b20..10f1106bed5 100644 --- a/ompi/mca/fs/ufs/fs_ufs.h +++ b/ompi/mca/fs/ufs/fs_ufs.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,23 +43,23 @@ OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_ufs_component; * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ -int mca_fs_ufs_file_open (struct ompi_communicator_t *comm, - char *filename, +int mca_fs_ufs_file_open (struct ompi_communicator_t *comm, + char *filename, int amode, - struct ompi_info_t *info, + struct ompi_info_t *info, mca_io_ompio_file_t *fh); int mca_fs_ufs_file_close (mca_io_ompio_file_t *fh); - + int mca_fs_ufs_file_delete (char *filename, struct ompi_info_t *info); int mca_fs_ufs_file_set_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_ufs_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_ufs_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); int mca_fs_ufs_file_sync (mca_io_ompio_file_t *fh); @@ -71,8 +71,8 @@ int mca_fs_ufs_file_seek (mca_io_ompio_file_t *fh, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_FS_UFS_H */ diff --git a/ompi/mca/fs/ufs/fs_ufs_component.c b/ompi/mca/fs/ufs/fs_ufs_component.c index 37a9cd93108..d5f3c157daf 100644 --- a/ompi/mca/fs/ufs/fs_ufs_component.c +++ b/ompi/mca/fs/ufs/fs_ufs_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/fs/ufs/fs_ufs_file_close.c b/ompi/mca/fs/ufs/fs_ufs_file_close.c index 4ebedbd4c7d..4eb9938c953 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_close.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_close.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ int mca_fs_ufs_file_close (mca_io_ompio_file_t *fh) { - fh->f_comm->c_coll.coll_barrier (fh->f_comm, + fh->f_comm->c_coll.coll_barrier (fh->f_comm, fh->f_comm->c_coll.coll_barrier_module); /* close (*(int *)fh->fd);*/ close (fh->fd); diff --git a/ompi/mca/fs/ufs/fs_ufs_file_delete.c b/ompi/mca/fs/ufs/fs_ufs_file_delete.c index 3d33285092a..c585ee18da0 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_delete.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_delete.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/ufs/fs_ufs_file_get_size.c b/ompi/mca/fs/ufs/fs_ufs_file_get_size.c index d103f504040..fcbdb3861dc 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_get_size.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_get_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ int mca_fs_ufs_file_get_size (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size) { - *size = lseek(fh->fd, 0, SEEK_END); + *size = lseek(fh->fd, 0, SEEK_END); if (-1 == *size) { perror ("lseek"); return OMPI_ERROR; diff --git a/ompi/mca/fs/ufs/fs_ufs_file_open.c b/ompi/mca/fs/ufs/fs_ufs_file_open.c index 051defa050c..3ffa07623fc 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_open.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_open.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ * Returns: - Success if new file handle */ int -mca_fs_ufs_file_open (struct ompi_communicator_t *comm, +mca_fs_ufs_file_open (struct ompi_communicator_t *comm, char* filename, int access_mode, struct ompi_info_t *info, @@ -66,7 +66,7 @@ mca_fs_ufs_file_open (struct ompi_communicator_t *comm, amode = amode | O_WRONLY; if (access_mode & MPI_MODE_RDWR) amode = amode | O_RDWR; - + if ( 0 == rank ) { /* MODE_CREATE and MODE_EXCL can only be set by one process */ if ( access_mode & MPI_MODE_CREATE ) diff --git a/ompi/mca/fs/ufs/fs_ufs_file_set_size.c b/ompi/mca/fs/ufs/fs_ufs_file_set_size.c index ae9f2cd8ad7..5cb64474a30 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_set_size.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_set_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/fs/ufs/fs_ufs_file_sync.c b/ompi/mca/fs/ufs/fs_ufs_file_sync.c index 2a6e26fe2b0..3added6009e 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_sync.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_sync.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/io/Makefile.am b/ompi/mca/io/Makefile.am index 24f7710da09..cc9e0a8bca4 100644 --- a/ompi/mca/io/Makefile.am +++ b/ompi/mca/io/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/io/base/Makefile.am b/ompi/mca/io/base/Makefile.am index 260ce4f0ac7..42e6427d8da 100644 --- a/ompi/mca/io/base/Makefile.am +++ b/ompi/mca/io/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/ompi/mca/io/base/base.h b/ompi/mca/io/base/base.h index 33ae5374f8b..5fb78d3aa41 100644 --- a/ompi/mca/io/base/base.h +++ b/ompi/mca/io/base/base.h @@ -5,19 +5,19 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** +/** * @file * * MCA io base framework public interface functions. @@ -66,7 +66,7 @@ BEGIN_C_DECLS */ OMPI_DECLSPEC int mca_io_base_find_available(bool enable_progress_threads, bool enable_mpi_threads); - + /** * Select an available component for a new file handle. * @@ -94,7 +94,7 @@ BEGIN_C_DECLS * * - If the \em preferred argument is NULL, the selection set is * defined to be all the components found during - * mca_io_base_find_available(). + * mca_io_base_find_available(). * - If \em preferred is not NULL, then the selection set is just * that component. (However, in this mode, we may make 2 passes * through the selection process -- more on this below). @@ -154,7 +154,7 @@ BEGIN_C_DECLS * the available components (rather than some pre-selected * module). See io.h for details. */ - OMPI_DECLSPEC int mca_io_base_delete(char *filename, + OMPI_DECLSPEC int mca_io_base_delete(char *filename, struct ompi_info_t *info); OMPI_DECLSPEC int mca_io_base_register_datarep(char *, diff --git a/ompi/mca/io/base/io_base_delete.c b/ompi/mca/io/base/io_base_delete.c index 4b326f5cfbb..068d3bcd913 100644 --- a/ompi/mca/io/base/io_base_delete.c +++ b/ompi/mca/io/base/io_base_delete.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,7 +49,7 @@ typedef struct avail_io_t avail_io_t; /* * Local functions */ -static opal_list_t *check_components(opal_list_t *components, +static opal_list_t *check_components(opal_list_t *components, char *filename, struct ompi_info_t *info, char **names, int num_names); static avail_io_t *check_one_component(const mca_base_component_t *component, @@ -57,7 +57,7 @@ static avail_io_t *check_one_component(const mca_base_component_t *component, static avail_io_t *query(const mca_base_component_t *component, char *filename, struct ompi_info_t *info); -static avail_io_t *query_2_0_0(const mca_io_base_component_2_0_0_t *io_component, +static avail_io_t *query_2_0_0(const mca_io_base_component_2_0_0_t *io_component, char *filename, struct ompi_info_t *info); static void unquery(avail_io_t *avail, char *filename, struct ompi_info_t *info); @@ -83,9 +83,9 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) /* Announce */ opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:base:delete: deleting file: %s", + "io:base:delete: deleting file: %s", filename); - + /* See if a set of component was requested by the MCA parameter. Don't check for error. */ @@ -98,7 +98,7 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) and check them all */ err = OMPI_ERROR; - opal_output_verbose(10, ompi_io_base_framework.framework_output, + opal_output_verbose(10, ompi_io_base_framework.framework_output, "io:base:delete: Checking all available modules"); selectable = check_components(&ompi_io_base_framework.framework_components, filename, info, NULL, 0); @@ -145,11 +145,11 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) } /* Announce the winner */ - + opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:base:delete: Selected io component %s", + "io:base:delete: Selected io component %s", selected.ai_component.v2_0_0.io_version.mca_component_name); - + return OMPI_SUCCESS; } @@ -177,7 +177,7 @@ static int avail_io_compare (opal_list_item_t **itema, * be only those who returned that they want to run, and put them in * priority order. */ -static opal_list_t *check_components(opal_list_t *components, +static opal_list_t *check_components(opal_list_t *components, char *filename, struct ompi_info_t *info, char **names, int num_names) { @@ -227,9 +227,9 @@ static opal_list_t *check_components(opal_list_t *components, } } } - + /* If we didn't find any available components, return an error */ - + if (0 == opal_list_get_size(selectable)) { OBJ_RELEASE(selectable); return NULL; @@ -253,20 +253,20 @@ static avail_io_t *check_one_component(const mca_base_component_t *component, avail = query(component, filename, info); if (NULL != avail) { - avail->ai_priority = (avail->ai_priority < 100) ? + avail->ai_priority = (avail->ai_priority < 100) ? avail->ai_priority : 100; avail->ai_priority = (avail->ai_priority < 0) ? 0 : avail->ai_priority; - opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:base:delete: component available: %s, priority: %d", - component->mca_component_name, + opal_output_verbose(10, ompi_io_base_framework.framework_output, + "io:base:delete: component available: %s, priority: %d", + component->mca_component_name, avail->ai_priority); } else { - opal_output_verbose(10, ompi_io_base_framework.framework_output, + opal_output_verbose(10, ompi_io_base_framework.framework_output, "io:base:delete: component not available: %s", component->mca_component_name); } - + return avail; } @@ -279,7 +279,7 @@ static avail_io_t *check_one_component(const mca_base_component_t *component, * Take any version of a io module, query it, and return the right * module struct */ -static avail_io_t *query(const mca_base_component_t *component, +static avail_io_t *query(const mca_base_component_t *component, char *filename, struct ompi_info_t *info) { const mca_io_base_component_2_0_0_t *ioc_200; @@ -290,7 +290,7 @@ static avail_io_t *query(const mca_base_component_t *component, MCA_BASE_VERSION_MINOR == component->mca_minor_version && MCA_BASE_VERSION_RELEASE == component->mca_release_version) { ioc_200 = (mca_io_base_component_2_0_0_t *) component; - + return query_2_0_0(ioc_200, filename, info); } @@ -313,7 +313,7 @@ static avail_io_t *query_2_0_0(const mca_io_base_component_2_0_0_t *component, avail = NULL; private_data = NULL; usable = false; - ret = component->io_delete_query(filename, info, &private_data, &usable, + ret = component->io_delete_query(filename, info, &private_data, &usable, &priority); if (OMPI_SUCCESS == ret && usable) { avail = OBJ_NEW(avail_io_t); diff --git a/ompi/mca/io/base/io_base_file_select.c b/ompi/mca/io/base/io_base_file_select.c index 94804f9272e..5c822a5307c 100644 --- a/ompi/mca/io/base/io_base_file_select.c +++ b/ompi/mca/io/base/io_base_file_select.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,15 +64,15 @@ typedef struct avail_io_t avail_io_t; /* * Local functions */ -static opal_list_t *check_components(opal_list_t *components, - ompi_file_t *file, +static opal_list_t *check_components(opal_list_t *components, + ompi_file_t *file, char **names, int num_names); -static avail_io_t *check_one_component(ompi_file_t *file, +static avail_io_t *check_one_component(ompi_file_t *file, const mca_base_component_t *component); -static avail_io_t *query(const mca_base_component_t *component, +static avail_io_t *query(const mca_base_component_t *component, ompi_file_t *file); -static avail_io_t *query_2_0_0(const mca_io_base_component_2_0_0_t *io_component, +static avail_io_t *query_2_0_0(const mca_io_base_component_2_0_0_t *io_component, ompi_file_t *file); static void unquery(avail_io_t *avail, ompi_file_t *file); @@ -91,7 +91,7 @@ static OBJ_CLASS_INSTANCE(avail_io_t, opal_list_item_t, NULL, NULL); * file. It is used to select which io component will be * active for a given file. */ -int mca_io_base_file_select(ompi_file_t *file, +int mca_io_base_file_select(ompi_file_t *file, mca_base_component_t *preferred) { int err; @@ -103,9 +103,9 @@ int mca_io_base_file_select(ompi_file_t *file, /* Announce */ opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:base:file_select: new file: %s", + "io:base:file_select: new file: %s", file->f_filename); - + /* Initialize all the relevant pointers, since they're used as sentinel values */ @@ -125,16 +125,16 @@ int mca_io_base_file_select(ompi_file_t *file, if (NULL != preferred) { str = &(preferred->mca_component_name[0]); - opal_output_verbose(10, ompi_io_base_framework.framework_output, + opal_output_verbose(10, ompi_io_base_framework.framework_output, "io:base:file_select: Checking preferred module: %s", str); - selectable = check_components(&ompi_io_base_framework.framework_components, + selectable = check_components(&ompi_io_base_framework.framework_components, file, &str, 1); - + /* If we didn't get a preferred module, then call again without a preferred module. This makes the logic below dramatically simpler. */ - + if (NULL == selectable) { return mca_io_base_file_select(file, NULL); } @@ -145,11 +145,11 @@ int mca_io_base_file_select(ompi_file_t *file, /* Nope -- a specific [set of] component[s] was not requested. Go check them all. */ - + else { - opal_output_verbose(10, ompi_io_base_framework.framework_output, + opal_output_verbose(10, ompi_io_base_framework.framework_output, "io:base:file_select: Checking all available modules"); - selectable = check_components(&ompi_io_base_framework.framework_components, + selectable = check_components(&ompi_io_base_framework.framework_components, file, NULL, 0); } @@ -214,39 +214,39 @@ int mca_io_base_file_select(ompi_file_t *file, return err; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_fs_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, OMPI_ENABLE_THREAD_MULTIPLE))) { return err; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_fcoll_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, OMPI_ENABLE_THREAD_MULTIPLE))) { return err; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_fbtl_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, OMPI_ENABLE_THREAD_MULTIPLE))) { return err; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_sharedfp_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, OMPI_ENABLE_THREAD_MULTIPLE))) { return err; } } /* Finally -- intialize the selected module. */ - + if (OMPI_SUCCESS != (err = module_init(file))) { return err; } /* Announce the winner */ - + opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:base:file_select: Selected io module %s", + "io:base:file_select: Selected io module %s", selected.ai_component.v2_0_0.io_version.mca_component_name); - + return OMPI_SUCCESS; } @@ -273,8 +273,8 @@ static int avail_io_compare (opal_list_item_t **itema, * (component, module) tuples (of type avail_io_t) to be only those * who returned that they want to run, and put them in priority order. */ -static opal_list_t *check_components(opal_list_t *components, - ompi_file_t *file, +static opal_list_t *check_components(opal_list_t *components, + ompi_file_t *file, char **names, int num_names) { int i; @@ -291,7 +291,7 @@ static opal_list_t *check_components(opal_list_t *components, /* Scan through the list of components. This nested loop is O(N^2), but we should never have too many components and/or names, so this *hopefully* shouldn't matter... */ - + OPAL_LIST_FOREACH(cli, components, mca_base_component_list_item_t) { component = cli->cli_component; @@ -322,9 +322,9 @@ static opal_list_t *check_components(opal_list_t *components, } } } - + /* If we didn't find any available components, return an error */ - + if (0 == opal_list_get_size(selectable)) { OBJ_RELEASE(selectable); return NULL; @@ -340,27 +340,27 @@ static opal_list_t *check_components(opal_list_t *components, /* * Check a single component */ -static avail_io_t *check_one_component(ompi_file_t *file, +static avail_io_t *check_one_component(ompi_file_t *file, const mca_base_component_t *component) { avail_io_t *avail; avail = query(component, file); if (NULL != avail) { - avail->ai_priority = (avail->ai_priority < 100) ? + avail->ai_priority = (avail->ai_priority < 100) ? avail->ai_priority : 100; avail->ai_priority = (avail->ai_priority < 0) ? 0 : avail->ai_priority; - opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:base:file_select: component available: %s, priority: %d", - component->mca_component_name, + opal_output_verbose(10, ompi_io_base_framework.framework_output, + "io:base:file_select: component available: %s, priority: %d", + component->mca_component_name, avail->ai_priority); } else { - opal_output_verbose(10, ompi_io_base_framework.framework_output, + opal_output_verbose(10, ompi_io_base_framework.framework_output, "io:base:file_select: component not available: %s", component->mca_component_name); } - + return avail; } @@ -373,7 +373,7 @@ static avail_io_t *check_one_component(ompi_file_t *file, * Take any version of a io module, query it, and return the right * module struct */ -static avail_io_t *query(const mca_base_component_t *component, +static avail_io_t *query(const mca_base_component_t *component, ompi_file_t *file) { const mca_io_base_component_2_0_0_t *ioc_200; @@ -384,7 +384,7 @@ static avail_io_t *query(const mca_base_component_t *component, MCA_BASE_VERSION_MINOR == component->mca_minor_version && MCA_BASE_VERSION_RELEASE == component->mca_release_version) { ioc_200 = (mca_io_base_component_2_0_0_t *) component; - + return query_2_0_0(ioc_200, file); } diff --git a/ompi/mca/io/base/io_base_find_available.c b/ompi/mca/io/base/io_base_find_available.c index 297277502ce..4b194e239ae 100644 --- a/ompi/mca/io/base/io_base_find_available.c +++ b/ompi/mca/io/base/io_base_find_available.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,10 +36,10 @@ /* * Private functions */ -static int init_query(const mca_base_component_t *ls, +static int init_query(const mca_base_component_t *ls, bool enable_progress_threads, bool enable_mpi_threads); -static int init_query_2_0_0(const mca_base_component_t *ls, +static int init_query_2_0_0(const mca_base_component_t *ls, bool enable_progress_threads, bool enable_mpi_threads); @@ -63,17 +63,17 @@ int mca_io_base_find_available(bool enable_progress_threads, /* The list of components that we should check has already been established in mca_io_base_open. */ - + OPAL_LIST_FOREACH_SAFE(cli, next, &ompi_io_base_framework.framework_components, mca_base_component_list_item_t) { const mca_base_component_t *component = cli->cli_component; /* Call a subroutine to do the work, because the component may represent different versions of the io MCA. */ - + if (OMPI_SUCCESS != init_query(component, enable_progress_threads, enable_mpi_threads)) { - + /* If the component doesn't want to run, then close it. It's already had its close() method invoked; now close it out of the DSO repository (if it's there). */ @@ -93,14 +93,14 @@ int mca_io_base_find_available(bool enable_progress_threads, * Query a component, see if it wants to run at all. If it does, save * some information. If it doesn't, close it. */ -static int init_query(const mca_base_component_t *m, +static int init_query(const mca_base_component_t *m, bool enable_progress_threads, bool enable_mpi_threads) { int ret; opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:find_available: querying io component %s", + "io:find_available: querying io component %s", m->mca_component_name); /* This component has already been successfully opened. So now @@ -109,13 +109,13 @@ static int init_query(const mca_base_component_t *m, if (2 == m->mca_type_major_version && 0 == m->mca_type_minor_version && 0 == m->mca_type_release_version) { - ret = init_query_2_0_0(m, enable_progress_threads, + ret = init_query_2_0_0(m, enable_progress_threads, enable_mpi_threads); } else { /* Unrecognized io API version */ opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:find_available: unrecognized io API version (%d.%d.%d)", + "io:find_available: unrecognized io API version (%d.%d.%d)", m->mca_type_major_version, m->mca_type_minor_version, m->mca_type_release_version); @@ -126,12 +126,12 @@ static int init_query(const mca_base_component_t *m, /* Query done -- look at the return value to see what happened */ if (OMPI_SUCCESS != ret) { - opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:find_available: io component %s is not available", + opal_output_verbose(10, ompi_io_base_framework.framework_output, + "io:find_available: io component %s is not available", m->mca_component_name); } else { - opal_output_verbose(10, ompi_io_base_framework.framework_output, - "io:find_available: io component %s is available", + opal_output_verbose(10, ompi_io_base_framework.framework_output, + "io:find_available: io component %s is available", m->mca_component_name); } @@ -144,11 +144,11 @@ static int init_query(const mca_base_component_t *m, /* * Query a specific component, io v2.0.0 */ -static int init_query_2_0_0(const mca_base_component_t *component, +static int init_query_2_0_0(const mca_base_component_t *component, bool enable_progress_threads, bool enable_mpi_threads) { - mca_io_base_component_2_0_0_t *io = + mca_io_base_component_2_0_0_t *io = (mca_io_base_component_2_0_0_t *) component; return io->io_init_query(enable_progress_threads, diff --git a/ompi/mca/io/base/io_base_frame.c b/ompi/mca/io/base/io_base_frame.c index 9c2fa0053d9..27a32fc47fd 100644 --- a/ompi/mca/io/base/io_base_frame.c +++ b/ompi/mca/io/base/io_base_frame.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/io/base/io_base_register_datarep.c b/ompi/mca/io/base/io_base_register_datarep.c index 7a4df09fbc9..b6bc9e55645 100644 --- a/ompi/mca/io/base/io_base_register_datarep.c +++ b/ompi/mca/io/base/io_base_register_datarep.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,7 +51,7 @@ mca_io_base_register_datarep(char *datarep, v200 = (mca_io_base_component_2_0_0_t *) component; /* return first non-good error-code */ - tmp = v200->io_register_datarep(datarep, read_fn, write_fn, + tmp = v200->io_register_datarep(datarep, read_fn, write_fn, extent_fn, state); ret = (ret == OMPI_SUCCESS) ? tmp : ret; } diff --git a/ompi/mca/io/base/io_base_request.c b/ompi/mca/io/base/io_base_request.c index e0bfee04808..6af310709c1 100644 --- a/ompi/mca/io/base/io_base_request.c +++ b/ompi/mca/io/base/io_base_request.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/io/base/io_base_request.h b/ompi/mca/io/base/io_base_request.h index 502ccaa4463..2edafc0121d 100644 --- a/ompi/mca/io/base/io_base_request.h +++ b/ompi/mca/io/base/io_base_request.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** diff --git a/ompi/mca/io/configure.m4 b/ompi/mca/io/configure.m4 index a57d77fee6e..6b3fe4ec3c9 100644 --- a/ompi/mca/io/configure.m4 +++ b/ompi/mca/io/configure.m4 @@ -1,18 +1,18 @@ # -*- shell-script -*- # -# Copyright (c) 2006-2007 Los Alamos National Security, LLC. -# All rights reserved. +# Copyright (c) 2006-2007 Los Alamos National Security, LLC. +# All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # MCA_ompi_io_CONFIG(project_name, framework_name) # ------------------------------------------- -AC_DEFUN([MCA_ompi_io_CONFIG], +AC_DEFUN([MCA_ompi_io_CONFIG], [ AC_ARG_ENABLE([mpi-io], [AC_HELP_STRING([--disable-mpi-io], diff --git a/ompi/mca/io/io.h b/ompi/mca/io/io.h index 8f87f19ed13..2ab40d44602 100644 --- a/ompi/mca/io/io.h +++ b/ompi/mca/io/io.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * reserved. * Copyright (c) 2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ union mca_io_base_modules_t; /** - * Version of IO component interface that we're using. + * Version of IO component interface that we're using. * * The IO component is being designed to ensure that it can * simultaneously support multiple component versions in a single @@ -81,17 +81,17 @@ typedef int (*mca_io_base_component_init_query_fn_t) (bool enable_progress_threads, bool enable_mpi_threads); typedef const struct mca_io_base_module_2_0_0_t * (*mca_io_base_component_file_query_2_0_0_fn_t) - (struct ompi_file_t *file, struct mca_io_base_file_t **private_data, + (struct ompi_file_t *file, struct mca_io_base_file_t **private_data, int *priority); typedef int (*mca_io_base_component_file_unquery_fn_t) (struct ompi_file_t *file, struct mca_io_base_file_t *private_data); typedef int (*mca_io_base_component_file_delete_query_fn_t) - (char *filename, struct ompi_info_t *info, + (char *filename, struct ompi_info_t *info, struct mca_io_base_delete_t **private_data, bool *usable, int *priority); typedef int (*mca_io_base_component_file_delete_select_fn_t) - (char *filename, struct ompi_info_t *info, + (char *filename, struct ompi_info_t *info, struct mca_io_base_delete_t *private_data); typedef int (*mca_io_base_component_file_delete_unselect_fn_t) (char *filename, struct ompi_info_t *info, @@ -156,37 +156,37 @@ typedef int (*mca_io_base_module_file_get_info_fn_t) typedef int (*mca_io_base_module_file_set_view_fn_t) (struct ompi_file_t *fh, MPI_Offset disp, struct ompi_datatype_t *etype, - struct ompi_datatype_t *filetype, char *datarep, + struct ompi_datatype_t *filetype, char *datarep, struct ompi_info_t *info); typedef int (*mca_io_base_module_file_get_view_fn_t) - (struct ompi_file_t *fh, MPI_Offset *disp, + (struct ompi_file_t *fh, MPI_Offset *disp, struct ompi_datatype_t **etype, struct ompi_datatype_t **filetype, char *datarep); typedef int (*mca_io_base_module_file_read_at_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, void *buf, - int count, struct ompi_datatype_t *datatype, + int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_read_at_all_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, void *buf, - int count, struct ompi_datatype_t *datatype, + int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_at_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, void *buf, - int count, struct ompi_datatype_t *datatype, + int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_at_all_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, void *buf, - int count, struct ompi_datatype_t *datatype, + int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_iread_at_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, void *buf, - int count, struct ompi_datatype_t *datatype, + int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); typedef int (*mca_io_base_module_file_iwrite_at_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, void *buf, - int count, struct ompi_datatype_t *datatype, + int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); typedef int (*mca_io_base_module_file_iread_at_all_fn_t) @@ -200,10 +200,10 @@ typedef int (*mca_io_base_module_file_iwrite_at_all_fn_t) typedef int (*mca_io_base_module_file_read_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t * - datatype, struct ompi_status_public_t *status); + datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_read_all_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t * - datatype, struct ompi_status_public_t *status); + datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t * datatype, struct ompi_status_public_t *status); @@ -212,10 +212,10 @@ typedef int (*mca_io_base_module_file_write_all_fn_t) datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_iread_fn_t) - (struct ompi_file_t *fh, void *buf, int count, - struct ompi_datatype_t *datatype, struct ompi_request_t **request); + (struct ompi_file_t *fh, void *buf, int count, + struct ompi_datatype_t *datatype, struct ompi_request_t **request); typedef int (*mca_io_base_module_file_iwrite_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); typedef int (*mca_io_base_module_file_iread_all_fn_t) @@ -233,22 +233,22 @@ typedef int (*mca_io_base_module_file_get_byte_offset_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, MPI_Offset *disp); typedef int (*mca_io_base_module_file_read_shared_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_shared_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_iread_shared_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); typedef int (*mca_io_base_module_file_iwrite_shared_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); typedef int (*mca_io_base_module_file_read_ordered_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_ordered_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_seek_shared_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, int whence); @@ -266,28 +266,28 @@ typedef int (*mca_io_base_module_file_write_at_all_begin_fn_t) typedef int (*mca_io_base_module_file_write_at_all_end_fn_t) (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_read_all_begin_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); typedef int (*mca_io_base_module_file_read_all_end_fn_t) (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_all_begin_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); typedef int (*mca_io_base_module_file_write_all_end_fn_t) (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_read_ordered_begin_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); typedef int (*mca_io_base_module_file_read_ordered_end_fn_t) (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_write_ordered_begin_fn_t) - (struct ompi_file_t *fh, void *buf, int count, + (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); typedef int (*mca_io_base_module_file_write_ordered_end_fn_t) (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status); typedef int (*mca_io_base_module_file_get_type_extent_fn_t) - (struct ompi_file_t *fh, struct ompi_datatype_t *datatype, + (struct ompi_file_t *fh, struct ompi_datatype_t *datatype, MPI_Aint *extent); typedef int (*mca_io_base_module_file_set_atomicity_fn_t) @@ -302,14 +302,14 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_open_fn_t io_module_file_open; mca_io_base_module_file_close_fn_t io_module_file_close; - + mca_io_base_module_file_set_size_fn_t io_module_file_set_size; mca_io_base_module_file_preallocate_fn_t io_module_file_preallocate; mca_io_base_module_file_get_size_fn_t io_module_file_get_size; - mca_io_base_module_file_get_amode_fn_t io_module_file_get_amode; + mca_io_base_module_file_get_amode_fn_t io_module_file_get_amode; mca_io_base_module_file_set_info_fn_t io_module_file_set_info; mca_io_base_module_file_get_info_fn_t io_module_file_get_info; - + mca_io_base_module_file_set_view_fn_t io_module_file_set_view; mca_io_base_module_file_get_view_fn_t io_module_file_get_view; @@ -327,7 +327,7 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_read_all_fn_t io_module_file_read_all; mca_io_base_module_file_write_fn_t io_module_file_write; mca_io_base_module_file_write_all_fn_t io_module_file_write_all; - + mca_io_base_module_file_iread_fn_t io_module_file_iread; mca_io_base_module_file_iwrite_fn_t io_module_file_iwrite; mca_io_base_module_file_iread_all_fn_t io_module_file_iread_all; @@ -336,7 +336,7 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_seek_fn_t io_module_file_seek; mca_io_base_module_file_get_position_fn_t io_module_file_get_position; mca_io_base_module_file_get_byte_offset_fn_t io_module_file_get_byte_offset; - + mca_io_base_module_file_read_shared_fn_t io_module_file_read_shared; mca_io_base_module_file_write_shared_fn_t io_module_file_write_shared; mca_io_base_module_file_iread_shared_fn_t io_module_file_iread_shared; @@ -345,7 +345,7 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_write_ordered_fn_t io_module_file_write_ordered; mca_io_base_module_file_seek_shared_fn_t io_module_file_seek_shared; mca_io_base_module_file_get_position_shared_fn_t io_module_file_get_position_shared; - + mca_io_base_module_file_read_at_all_begin_fn_t io_module_file_read_at_all_begin; mca_io_base_module_file_read_at_all_end_fn_t io_module_file_read_at_all_end; mca_io_base_module_file_write_at_all_begin_fn_t io_module_file_write_at_all_begin; @@ -358,9 +358,9 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_read_ordered_end_fn_t io_module_file_read_ordered_end; mca_io_base_module_file_write_ordered_begin_fn_t io_module_file_write_ordered_begin; mca_io_base_module_file_write_ordered_end_fn_t io_module_file_write_ordered_end; - + mca_io_base_module_file_get_type_extent_fn_t io_module_file_get_type_extent; - + mca_io_base_module_file_set_atomicity_fn_t io_module_file_set_atomicity; mca_io_base_module_file_get_atomicity_fn_t io_module_file_get_atomicity; mca_io_base_module_file_sync_fn_t io_module_file_sync; diff --git a/ompi/mca/io/ompio/Makefile.am b/ompi/mca/io/ompio/Makefile.am index 8724ee10eff..05ec6f7022a 100644 --- a/ompi/mca/io/ompio/Makefile.am +++ b/ompi/mca/io/ompio/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2012 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 4c0846bc927..b6bfa121830 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ #include #ifdef HAVE_SYS_STATFS_H -#include /* or */ +#include /* or */ #endif #ifdef HAVE_SYS_PARAM_H #include @@ -61,12 +61,12 @@ static int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, static int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE **start_offsets_lens, - OMPI_MPI_OFFSET_TYPE **end_offsets, + OMPI_MPI_OFFSET_TYPE **end_offsets, OMPI_MPI_OFFSET_TYPE **aggr_bytes_per_group, OMPI_MPI_OFFSET_TYPE *bytes_per_group, int **decision_list, size_t bytes_per_proc, - int *is_aggregator, + int *is_aggregator, int *ompio_grouping_flag); static int mca_io_ompio_retain_initial_groups(mca_io_ompio_file_t *fh); @@ -122,10 +122,10 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh) fh->f_position_in_file_view = 0; fh->f_index_in_file_view = 0; fh->f_total_bytes = 0; - + fh->f_init_procs_per_group = -1; fh->f_init_procs_in_group = NULL; - + fh->f_procs_per_group = -1; fh->f_procs_in_group = NULL; @@ -149,14 +149,14 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh) &ompi_mpi_byte.dt, "native", fh->f_info); - + /*Create a derived datatype for the created iovec */ types[0] = &ompi_mpi_long.dt; types[1] = &ompi_mpi_long.dt; - d[0] = (OPAL_PTRDIFF_TYPE) fh->f_decoded_iov; - d[1] = (OPAL_PTRDIFF_TYPE) &fh->f_decoded_iov[0].iov_len; + d[0] = (OPAL_PTRDIFF_TYPE) fh->f_decoded_iov; + d[1] = (OPAL_PTRDIFF_TYPE) &fh->f_decoded_iov[0].iov_len; base = d[0]; for (i=0 ; i<2 ; i++) { @@ -190,7 +190,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, int block = 1; /* allocate an initial iovec, will grow if needed */ - iov = (struct iovec *) malloc + iov = (struct iovec *) malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (struct iovec)); if (NULL == iov) { opal_output(1, "OUT OF MEMORY\n"); @@ -201,7 +201,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, j = fh->f_index_in_file_view; bytes_to_write = max_data; k = 0; - + while (bytes_to_write) { OPAL_PTRDIFF_TYPE disp; /* reallocate if needed */ @@ -215,7 +215,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, } } - if (fh->f_decoded_iov[j].iov_len - + if (fh->f_decoded_iov[j].iov_len - (fh->f_total_bytes - sum_previous_counts) <= 0) { sum_previous_counts += fh->f_decoded_iov[j].iov_len; j = j + 1; @@ -228,18 +228,18 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, fh->f_total_bytes = 0; } } - - disp = (OPAL_PTRDIFF_TYPE)(fh->f_decoded_iov[j].iov_base) + + + disp = (OPAL_PTRDIFF_TYPE)(fh->f_decoded_iov[j].iov_base) + (fh->f_total_bytes - sum_previous_counts); iov[k].iov_base = (IOVBASE_TYPE *)(intptr_t)(disp + fh->f_offset); - if ((fh->f_decoded_iov[j].iov_len - - (fh->f_total_bytes - sum_previous_counts)) + if ((fh->f_decoded_iov[j].iov_len - + (fh->f_total_bytes - sum_previous_counts)) >= bytes_to_write) { iov[k].iov_len = bytes_to_write; } else { - iov[k].iov_len = fh->f_decoded_iov[j].iov_len - + iov[k].iov_len = fh->f_decoded_iov[j].iov_len - (fh->f_total_bytes - sum_previous_counts); } @@ -253,7 +253,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, *f_iov = iov; if (mca_io_ompio_record_offset_info){ - + int tot_entries=0, *recvcounts=NULL, *displs=NULL; mca_io_ompio_offlen_array_t *per_process=NULL; mca_io_ompio_offlen_array_t *all_process=NULL; @@ -303,7 +303,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, (MPI_Aint)iov[i].iov_len; per_process[i].process_id = fh->f_rank; } - + types[0] = &ompi_mpi_long.dt; types[1] = &ompi_mpi_long.dt; types[2] = &ompi_mpi_int.dt; @@ -396,20 +396,20 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, fh->f_comm->c_coll.coll_gatherv_module); ompi_datatype_destroy(&io_array_type); - + if (OMPIO_ROOT == fh->f_rank){ - + ompi_io_ompio_sort_offlen(all_process, tot_entries, sorted); - + for (i=0;if_size; i++){ @@ -464,7 +464,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, free(displs); return OMPI_ERR_OUT_OF_RESOURCE; } - + row_index = (int *) malloc ((fh->f_size + 1) * sizeof(int)); if (NULL == row_index){ @@ -496,7 +496,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, column_index++; r_index++; } - + } row_index[i+1]= r_index; } @@ -558,20 +558,20 @@ int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, if ( fh->f_view_size > 0 ) { /* starting offset of the current copy of the filew view */ - fh->f_offset = (fh->f_view_extent * + fh->f_offset = (fh->f_view_extent * ((offset*fh->f_etype_size) / fh->f_view_size)) + fh->f_disp; - - + + /* number of bytes used within the current copy of the file view */ fh->f_total_bytes = (offset*fh->f_etype_size) % fh->f_view_size; i = fh->f_total_bytes; - - - /* Initialize the block id and the starting offset of the current block + + + /* Initialize the block id and the starting offset of the current block within the current copy of the file view to zero */ fh->f_index_in_file_view = 0; fh->f_position_in_file_view = 0; - + /* determine block id that the offset is located in and the starting offset of that block */ k = fh->f_decoded_iov[fh->f_index_in_file_view].iov_len; @@ -585,28 +585,28 @@ int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, +int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, ompi_datatype_t *datatype, int count, void *buf, size_t *max_data, struct iovec **iov, uint32_t *iovec_count) -{ +{ + - opal_convertor_t convertor; size_t remaining_length = 0; uint32_t i; uint32_t temp_count; struct iovec *temp_iov=NULL; size_t temp_data; - + opal_convertor_clone (fh->f_convertor, &convertor, 0); - if (OMPI_SUCCESS != opal_convertor_prepare_for_send (&convertor, + if (OMPI_SUCCESS != opal_convertor_prepare_for_send (&convertor, &(datatype->super), count, buf)) { @@ -630,11 +630,11 @@ int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, return OMPI_ERR_OUT_OF_RESOURCE; } - while (0 == opal_convertor_raw(&convertor, + while (0 == opal_convertor_raw(&convertor, temp_iov, - &temp_count, + &temp_count, &temp_data)) { -#if 0 +#if 0 printf ("%d: New raw extraction (iovec_count = %d, max_data = %lu)\n", fh->f_rank,temp_count, (unsigned long)temp_data); for (i = 0; i < temp_count; i++) { @@ -688,8 +688,8 @@ int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, if (0 == fh->f_rank) { printf ("%d Entries: \n",*iovec_count); for (i=0 ; i<*iovec_count ; i++) { - printf ("\t{%p, %d}\n", - (*iov)[i].iov_base, + printf ("\t{%p, %d}\n", + (*iov)[i].iov_base, (*iov)[i].iov_len); } } @@ -736,15 +736,15 @@ int ompi_io_ompio_sort (mca_io_ompio_io_array_t *io_array, while (!done) { left = j*2+1; right = j*2+2; - if ((left <= heap_size) && + if ((left <= heap_size) && (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -763,8 +763,8 @@ int ompi_io_ompio_sort (mca_io_ompio_io_array_t *io_array, for (i = num_entries-1; i >=1; --i) { temp = temp_arr[0]; temp_arr[0] = temp_arr[i]; - temp_arr[i] = temp; - heap_size--; + temp_arr[i] = temp; + heap_size--; done = 0; j = 0; largest = j; @@ -772,17 +772,17 @@ int ompi_io_ompio_sort (mca_io_ompio_io_array_t *io_array, while (!done) { left = j*2+1; right = j*2+2; - - if ((left <= heap_size) && - (io_array[temp_arr[left]].offset > + + if ((left <= heap_size) && + (io_array[temp_arr[left]].offset > io_array[temp_arr[j]].offset)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (io_array[temp_arr[right]].offset > + if ((right <= heap_size) && + (io_array[temp_arr[right]].offset > io_array[temp_arr[largest]].offset)) { largest = right; } @@ -843,15 +843,15 @@ int ompi_io_ompio_sort_iovec (struct iovec *iov, while (!done) { left = j*2+1; right = j*2+2; - if ((left <= heap_size) && + if ((left <= heap_size) && (iov[temp_arr[left]].iov_base > iov[temp_arr[j]].iov_base)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (iov[temp_arr[right]].iov_base > + if ((right <= heap_size) && + (iov[temp_arr[right]].iov_base > iov[temp_arr[largest]].iov_base)) { largest = right; } @@ -870,8 +870,8 @@ int ompi_io_ompio_sort_iovec (struct iovec *iov, for (i = num_entries-1; i >=1; --i) { temp = temp_arr[0]; temp_arr[0] = temp_arr[i]; - temp_arr[i] = temp; - heap_size--; + temp_arr[i] = temp; + heap_size--; done = 0; j = 0; largest = j; @@ -879,17 +879,17 @@ int ompi_io_ompio_sort_iovec (struct iovec *iov, while (!done) { left = j*2+1; right = j*2+2; - - if ((left <= heap_size) && - (iov[temp_arr[left]].iov_base > + + if ((left <= heap_size) && + (iov[temp_arr[left]].iov_base > iov[temp_arr[j]].iov_base)) { largest = left; } else { largest = j; } - if ((right <= heap_size) && - (iov[temp_arr[right]].iov_base > + if ((right <= heap_size) && + (iov[temp_arr[right]].iov_base > iov[temp_arr[largest]].iov_base)) { largest = right; } @@ -1022,7 +1022,7 @@ int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, size_t bytes_per_proc) { int j,procs_per_group = 0; - + /*If only one process used, no need to do aggregator selection!*/ if (fh->f_size == 1){ num_aggregators = 1; @@ -1031,13 +1031,13 @@ int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, fh->f_flags |= OMPIO_AGGREGATOR_IS_SET; if (-1 == num_aggregators) { - mca_io_ompio_create_groups(fh,bytes_per_proc); + mca_io_ompio_create_groups(fh,bytes_per_proc); return OMPI_SUCCESS; } - //Forced number of aggregators + //Forced number of aggregators else - { + { /* calculate the offset at which each group of processes will start */ procs_per_group = ceil ((float)fh->f_size/num_aggregators); @@ -1091,7 +1091,7 @@ int ompi_io_ompio_break_file_view (mca_io_ompio_file_t *fh, /* allocate an initial iovec, will grow if needed */ - temp_iov = (struct iovec *) malloc + temp_iov = (struct iovec *) malloc (count * sizeof (struct iovec)); if (NULL == temp_iov) { opal_output(1, "OUT OF MEMORY\n"); @@ -1119,7 +1119,7 @@ int ompi_io_ompio_break_file_view (mca_io_ompio_file_t *fh, else { temp_iov[k].iov_base = iov[i].iov_base; temp_iov[k].iov_len = stripe_size-temp; - current_offset = (OPAL_PTRDIFF_TYPE)(temp_iov[k].iov_base) + + current_offset = (OPAL_PTRDIFF_TYPE)(temp_iov[k].iov_base) + temp_iov[k].iov_len; remaining = iov[i].iov_len - temp_iov[k].iov_len; k++; @@ -1192,7 +1192,7 @@ int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh, /* calculate how many entries in the broken iovec belong to each aggregator */ for (i=0 ; if_rank%fh->f_aggregator_index) { for (i=0; if_size ; i++) { @@ -1248,7 +1248,7 @@ int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh, MPI_INT, i*fh->f_aggregator_index, OMPIO_TAG_GATHER, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &sendreq[i])); if (OMPI_SUCCESS != rc) { @@ -1349,7 +1349,7 @@ int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh, } for (i=0 ; if_iov_type, i*fh->f_aggregator_index, OMPIO_TAG_GATHERV, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &sendreq[i])); if (OMPI_SUCCESS != rc) { @@ -1474,9 +1474,9 @@ int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh, } *fview_count = fview_cnt; - *iov = global_fview; + *iov = global_fview; *count = global_fview_count; - + return rc; } @@ -1537,7 +1537,7 @@ int ompi_io_ompio_gather_data (mca_io_ompio_file_t *fh, bytes_remaining = total_bytes_sent; while (bytes_remaining) { - temp = (int)((OPAL_PTRDIFF_TYPE)broken_iovec[current].iov_base/stripe_size) + temp = (int)((OPAL_PTRDIFF_TYPE)broken_iovec[current].iov_base/stripe_size) % num_aggregators; if (part) { @@ -1550,7 +1550,7 @@ int ompi_io_ompio_gather_data (mca_io_ompio_file_t *fh, bytes_remaining -= part; temp_position[temp] += part; part = 0; - current ++; + current ++; } else { memcpy ((IOVBASE_TYPE *)((OPAL_PTRDIFF_TYPE)sbuf[temp]+ @@ -1621,7 +1621,7 @@ int ompi_io_ompio_gather_data (mca_io_ompio_file_t *fh, MPI_BYTE, i*fh->f_aggregator_index, OMPIO_TAG_GATHERV, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &sendreq[i])); if (OMPI_SUCCESS != rc) { @@ -1826,7 +1826,7 @@ int ompi_io_ompio_scatter_data (mca_io_ompio_file_t *fh, bytes_remaining = total_bytes_recv; while (bytes_remaining) { - temp = (int)((OPAL_PTRDIFF_TYPE)broken_iovec[current].iov_base/stripe_size) + temp = (int)((OPAL_PTRDIFF_TYPE)broken_iovec[current].iov_base/stripe_size) % num_aggregators; if (part) { @@ -1839,7 +1839,7 @@ int ompi_io_ompio_scatter_data (mca_io_ompio_file_t *fh, bytes_remaining -= part; temp_position[temp] += part; part = 0; - current ++; + current ++; } else { memcpy ((IOVBASE_TYPE *)((OPAL_PTRDIFF_TYPE)receive_buf + @@ -1915,22 +1915,22 @@ int ompi_io_ompio_set_print_queue (mca_io_ompio_print_queue **q, int ret = OMPI_SUCCESS; - switch(queue_type) { + switch(queue_type) { - case WRITE_PRINT_QUEUE: - *q = coll_write_time; - break; - case READ_PRINT_QUEUE: - *q = coll_read_time; - break; - } + case WRITE_PRINT_QUEUE: + *q = coll_write_time; + break; + case READ_PRINT_QUEUE: + *q = coll_read_time; + break; + } - if (NULL == q){ - ret = OMPI_ERROR; - } + if (NULL == q){ + ret = OMPI_ERROR; + } return ret; -} +} int ompi_io_ompio_initialize_print_queue(mca_io_ompio_print_queue *q){ @@ -1985,36 +1985,36 @@ int ompi_io_ompio_empty_print_queue(int queue_type){ int ret = OMPI_SUCCESS; mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); - - assert (ret != OMPI_ERROR); + + assert (ret != OMPI_ERROR); if (q->count == 0) return 1; else return 0; - + } int ompi_io_ompio_full_print_queue(int queue_type){ - + int ret = OMPI_SUCCESS; mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); - - assert ( ret != OMPI_ERROR); + + assert ( ret != OMPI_ERROR); if (q->count < QUEUESIZE) return 0; else return 1; - + } int ompi_io_ompio_print_time_info(int queue_type, char *name, mca_io_ompio_file_t *fh){ - + int i = 0, j=0, nprocs_for_coll = 0, ret = OMPI_SUCCESS, count = 0; double *time_details = NULL, *final_sum = NULL; double *final_max = NULL, *final_min = NULL; @@ -2022,18 +2022,18 @@ int ompi_io_ompio_print_time_info(int queue_type, mca_io_ompio_print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); - - assert (ret != OMPI_ERROR); + + assert (ret != OMPI_ERROR); nprocs_for_coll = q->entry[0].nprocs_for_coll; time_details = (double *) malloc (4*sizeof(double)); if ( NULL == time_details){ ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; - + } - + if (!fh->f_rank){ - + final_min = (double *) malloc (3*sizeof(double)); if ( NULL == final_min){ ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -2052,8 +2052,8 @@ int ompi_io_ompio_print_time_info(int queue_type, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - - final_time_details = + + final_time_details = (double *)malloc (fh->f_size * 4 * sizeof(double)); if (NULL == final_time_details){ @@ -2066,12 +2066,12 @@ int ompi_io_ompio_print_time_info(int queue_type, final_time_details[i] = 0.0; } - + } - + for (i = 0; i < 4; i++){ time_details[i] = 0.0; - } + } if (q->count > 0){ for (i=0; i < q->count; i++){ @@ -2096,7 +2096,7 @@ int ompi_io_ompio_print_time_info(int queue_type, 0, fh->f_comm, fh->f_comm->c_coll.coll_gather_module); - + if (!fh->f_rank){ @@ -2125,7 +2125,7 @@ int ompi_io_ompio_print_time_info(int queue_type, } } - + printf ("\n# MAX-%s AVG-%s MIN-%s MAX-COMM AVG-COMM MIN-COMM", name, name, name); printf (" MAX-EXCH AVG-EXCH MIN-EXCH\n"); @@ -2133,9 +2133,9 @@ int ompi_io_ompio_print_time_info(int queue_type, final_max[0], final_sum[0]/nprocs_for_coll, final_min[0], final_max[1], final_sum[1]/nprocs_for_coll, final_min[1], final_max[2], final_sum[2]/nprocs_for_coll, final_min[2]); - + } - + exit: if ( NULL != final_max){ free(final_max); @@ -2156,26 +2156,26 @@ int ompi_io_ompio_print_time_info(int queue_type, return ret; } - + int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, size_t bytes_per_proc) { - + int is_aggregator = 0; int final_aggr = 0; int final_num_aggrs = 0; int ompio_grouping_flag = 0; - + int *decision_list = NULL; - + OMPI_MPI_OFFSET_TYPE *start_offsets_lens = NULL; OMPI_MPI_OFFSET_TYPE *end_offsets = NULL; OMPI_MPI_OFFSET_TYPE bytes_per_group = 0; OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group = NULL; - + mca_io_ompio_prepare_to_group(fh, &start_offsets_lens, - &end_offsets, + &end_offsets, &aggr_bytes_per_group, &bytes_per_group, &decision_list, @@ -2183,9 +2183,9 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, &is_aggregator, &ompio_grouping_flag); - switch(ompio_grouping_flag){ - - case OMPIO_SPLIT: + switch(ompio_grouping_flag){ + + case OMPIO_SPLIT: mca_io_ompio_split_initial_groups(fh, start_offsets_lens, end_offsets, @@ -2198,16 +2198,16 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, decision_list, is_aggregator); break; - - case OMPIO_RETAIN: - + + case OMPIO_RETAIN: + mca_io_ompio_retain_initial_groups(fh); - - break; + + break; - } - + } + //Set aggregator index fh->f_aggregator_index = 0; @@ -2222,7 +2222,7 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, MPI_SUM, fh->f_comm, fh->f_comm->c_coll.coll_allreduce_module); - + //Set final number of aggregators in file handle fh->f_final_num_aggrs = final_num_aggrs; @@ -2231,8 +2231,8 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, /*if(fh->f_rank == 0){ printf("Rank %d : has final_num_aggrs = %d\n",fh->f_rank,final_num_aggrs); }*/ - - //Print final grouping + + //Print final grouping /*if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { for (j=0 ; jf_procs_per_group; j++) { printf ("%d: Proc %d: %d\n", fh->f_rank, j, fh->f_procs_in_group[j]); @@ -2240,7 +2240,7 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, printf("\n\n"); } - + */ if (NULL != start_offsets_lens) { free (start_offsets_lens); @@ -2267,9 +2267,9 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group, int *decision_list, int is_aggregator){ - + OMPI_MPI_OFFSET_TYPE sum_bytes = 0; - + MPI_Request *sendreq = NULL; int start = 0; @@ -2278,20 +2278,20 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, int j = 0; int r = 0; - int merge_pair_flag = 4; + int merge_pair_flag = 4; int first_merge_flag = 4; int *merge_aggrs = NULL; int is_new_aggregator= 0; - + if(is_aggregator){ i = 0; sum_bytes = 0; //go through the decision list //Find the aggregators that could merge - + while(i < fh->f_init_num_aggrs){ while(1){ if( i >= fh->f_init_num_aggrs){ @@ -2356,9 +2356,9 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, } if(fh->f_rank == merge_aggrs[0]) is_new_aggregator = 1; - + for( j = 0 ; j < end-start+1 ;j++){ - if(fh->f_rank == merge_aggrs[j]){ + if(fh->f_rank == merge_aggrs[j]){ mca_io_ompio_merge_groups(fh, merge_aggrs, end-start+1); @@ -2372,7 +2372,7 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, } i++; } - + }//end old aggregators //New aggregators communicate new grouping info to the groups @@ -2404,7 +2404,7 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &sendreq[r++])); - + } } else { @@ -2417,13 +2417,13 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, OMPIO_PROCS_PER_GROUP_TAG, fh->f_comm, MPI_STATUS_IGNORE)); - + fh->f_procs_in_group = (int*)malloc (fh->f_procs_per_group * sizeof(int)); if (NULL == fh->f_procs_in_group) { opal_output (1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + MCA_PML_CALL(recv(fh->f_procs_in_group, fh->f_procs_per_group, MPI_INT, @@ -2432,13 +2432,13 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, fh->f_comm, MPI_STATUS_IGNORE)); } - + if(is_new_aggregator) { ompi_request_wait_all (r, sendreq, MPI_STATUSES_IGNORE); free (sendreq); } - - return OMPI_SUCCESS; + + return OMPI_SUCCESS; } int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, @@ -2446,19 +2446,19 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *end_offsets, OMPI_MPI_OFFSET_TYPE bytes_per_group){ - + int size_new_group = 0; int size_old_group = 0; int size_last_group = 0; int size_smallest_group = 0; int num_groups = 0; - + OMPI_MPI_OFFSET_TYPE max_cci = 0; OMPI_MPI_OFFSET_TYPE min_cci = 0; size_new_group = ceil ((float)mca_io_ompio_bytes_per_agg * fh->f_init_procs_per_group/ bytes_per_group); size_old_group = fh->f_init_procs_per_group; - + mca_io_ompio_split_a_group(fh, start_offsets_lens, end_offsets, @@ -2473,7 +2473,7 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, //Just use size as returned by split group size_last_group = size_smallest_group; break; - + case UNIFORM_DISTRIBUTION: if(size_smallest_group <= OMPIO_UNIFORM_DIST_THRESHOLD * size_new_group){ //uneven split need to call split again @@ -2492,13 +2492,13 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, size_last_group = size_smallest_group; } break; - + case CONTIGUITY: - + while(1){ if((max_cci < OMPIO_CONTG_THRESHOLD) && (size_new_group < size_old_group)){ - + size_new_group = floor( (float) (size_new_group + size_old_group ) / 2 ); mca_io_ompio_split_a_group(fh, start_offsets_lens, @@ -2515,14 +2515,14 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, } size_last_group = size_smallest_group; break; - + case OPTIMIZE_GROUPING: //This case is a combination of Data volume, contiguity and uniform distribution while(1){ if((max_cci < OMPIO_CONTG_THRESHOLD) && (size_new_group < size_old_group)){ //can be a better condition //monitor the previous iteration - //break if it has not changed. + //break if it has not changed. size_new_group = ceil( (float) (size_new_group + size_old_group ) / 2 ); mca_io_ompio_split_a_group(fh, start_offsets_lens, @@ -2537,7 +2537,7 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, break; } } - + if(size_smallest_group <= OMPIO_UNIFORM_DIST_THRESHOLD * size_new_group){ //uneven split need to call split again if( size_old_group % num_groups == 0 ){ @@ -2554,7 +2554,7 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, //Considered uniform size_last_group = size_smallest_group; } - + break; } @@ -2566,9 +2566,9 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } - + int mca_io_ompio_retain_initial_groups(mca_io_ompio_file_t *fh){ - + int i = 0; fh->f_procs_per_group = fh->f_init_procs_per_group; @@ -2594,8 +2594,8 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, int *displs; - - + + sizes_old_group = (int*)malloc(num_merge_aggrs * sizeof(int)); if (NULL == sizes_old_group) { opal_output (1, "OUT OF MEMORY\n"); @@ -2611,7 +2611,7 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, } - //merge_aggrs[0] is considered the new aggregator + //merge_aggrs[0] is considered the new aggregator //New aggregator collects group sizes of the groups to be merged ompi_io_ompio_allgather_array (&fh->f_init_procs_per_group, 1, @@ -2623,10 +2623,10 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, merge_aggrs, num_merge_aggrs, fh->f_comm); - + fh->f_procs_per_group = 0; - + for( i = 0; i < num_merge_aggrs; i++){ fh->f_procs_per_group = fh->f_procs_per_group + sizes_old_group[i]; } @@ -2641,9 +2641,9 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, opal_output (1, "OUT OF MEMORY\n"); free(sizes_old_group); free(displs); - return OMPI_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } - + //New aggregator also collects the grouping distribution //This is the actual merge //use allgatherv array @@ -2658,13 +2658,13 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, merge_aggrs, num_merge_aggrs, fh->f_comm); - - + + free(displs); free (sizes_old_group); return OMPI_SUCCESS; - + } @@ -2678,7 +2678,7 @@ int mca_io_ompio_split_a_group(mca_io_ompio_file_t *fh, int *num_groups, int *size_smallest_group) { - + OMPI_MPI_OFFSET_TYPE *cci = NULL; *num_groups = fh->f_init_procs_per_group / size_new_group; *size_smallest_group = size_new_group; @@ -2692,28 +2692,28 @@ int mca_io_ompio_split_a_group(mca_io_ompio_file_t *fh, *size_smallest_group = fh->f_init_procs_per_group % size_new_group; flag = 1; } - + cci = (OMPI_MPI_OFFSET_TYPE*)malloc(*num_groups * sizeof( OMPI_MPI_OFFSET_TYPE )); if (NULL == cci) { opal_output(1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + //check contiguity within new groups size = size_new_group; - for( i = 0; i < *num_groups; i++){ + for( i = 0; i < *num_groups; i++){ cci[i] = start_offsets_lens[3*size_new_group*i + 1]; //if it is the last group check if it is the smallest group if( (i == *num_groups-1) && flag == 1){ size = *size_smallest_group; } for( k = 0; k < size-1; k++){ - if( end_offsets[size_new_group* i + k] == start_offsets_lens[3*size_new_group*i + 3*(k+1)] ){ + if( end_offsets[size_new_group* i + k] == start_offsets_lens[3*size_new_group*i + 3*(k+1)] ){ cci[i] += start_offsets_lens[3*size_new_group*i + 3*(k + 1) + 1]; - } - } + } + } } - + //get min and max cci *min_cci = cci[0]; *max_cci = cci[0]; @@ -2722,7 +2722,7 @@ int mca_io_ompio_split_a_group(mca_io_ompio_file_t *fh, *max_cci = cci[i]; } else if(cci[i] < *min_cci){ - *min_cci = cci[i]; + *min_cci = cci[i]; } } //if cci is not needed anymore @@ -2738,7 +2738,7 @@ int mca_io_ompio_finalize_split(mca_io_ompio_file_t *fh, int size_last_group) { //based on new group and last group finalize f_procs_per_group and f_procs_in_group - + int i = 0; int j = 0; int k = 0; @@ -2752,16 +2752,16 @@ int mca_io_ompio_finalize_split(mca_io_ompio_file_t *fh, else{ fh->f_procs_per_group = size_new_group; } - } + } } - - + + fh->f_procs_in_group = (int*)malloc (fh->f_procs_per_group * sizeof(int)); if (NULL == fh->f_procs_in_group) { opal_output (1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + for( i = 0; i < fh->f_init_procs_per_group ; i++){ if( fh->f_rank == fh->f_init_procs_in_group[i]){ if( i >= fh->f_init_procs_per_group - size_last_group ){ @@ -2773,14 +2773,14 @@ int mca_io_ompio_finalize_split(mca_io_ompio_file_t *fh, else{ //distribute all other groups for( j = 0 ; j < fh->f_init_procs_per_group; j = j + size_new_group){ - if(i >= j && i < j+size_new_group ){ + if(i >= j && i < j+size_new_group ){ for( k = 0; k < fh->f_procs_per_group ; k++){ fh->f_procs_in_group[k] = fh->f_init_procs_in_group[j+k]; } } } } - + } } @@ -2797,7 +2797,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, int *is_aggregator, int *ompio_grouping_flag) { - + OMPI_MPI_OFFSET_TYPE start_offset_len[3] = {0}; OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group_tmp = NULL; OMPI_MPI_OFFSET_TYPE *start_offsets_lens_tmp = NULL; @@ -2810,7 +2810,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, int merge_count = 0; int split_count = 0; //not req? int retain_as_is_count = 0; //not req? - + //Store start offset and length in an array //also add bytes per process if(NULL == fh->f_decoded_iov){ @@ -2888,7 +2888,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, fh->f_init_aggr_list, fh->f_init_num_aggrs, fh->f_comm); - + for( i = 0; i < fh->f_init_num_aggrs; i++){ if((size_t)(aggr_bytes_per_group_tmp[i])> (size_t)mca_io_ompio_bytes_per_agg){ @@ -2905,7 +2905,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, retain_as_is_count++; } } - + *aggr_bytes_per_group = &aggr_bytes_per_group_tmp[0]; //Go through the decision list to see if non consecutive //processes intend to merge, if yes retain original grouping @@ -2917,32 +2917,32 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, } else if( (i == fh->f_init_num_aggrs-1) && (decision_list_tmp[i-1] != OMPIO_MERGE)){ - + decision_list_tmp[i] = OMPIO_RETAIN; } else if(!((decision_list_tmp[i-1] == OMPIO_MERGE) || (decision_list_tmp[i+1] == OMPIO_MERGE))){ - + decision_list_tmp[i] = OMPIO_RETAIN; } } } - + //Set the flag as per the decision list for( i = 0 ; i < fh->f_init_num_aggrs; i++){ if((decision_list_tmp[i] == OMPIO_MERGE)&& (fh->f_rank == fh->f_init_aggr_list[i])) - *ompio_grouping_flag = OMPIO_MERGE; - + *ompio_grouping_flag = OMPIO_MERGE; + if((decision_list_tmp[i] == OMPIO_SPLIT)&& (fh->f_rank == fh->f_init_aggr_list[i])) *ompio_grouping_flag = OMPIO_SPLIT; - + if((decision_list_tmp[i] == OMPIO_RETAIN)&& (fh->f_rank == fh->f_init_aggr_list[i])) - *ompio_grouping_flag = OMPIO_RETAIN; + *ompio_grouping_flag = OMPIO_RETAIN; } - + //print decision list of aggregators /*printf("RANK%d : Printing decsion list : \n",fh->f_rank); for( i = 0; i < fh->f_init_num_aggrs; i++){ @@ -2955,7 +2955,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, } printf("\n\n"); */ - *decision_list = &decision_list_tmp[0]; + *decision_list = &decision_list_tmp[0]; } //Communicate flag to all group members ompi_io_ompio_bcast_array (ompio_grouping_flag, diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index 8ff20b4ea8c..d6afe99fc70 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -124,7 +124,7 @@ enum ompio_fs_type OMPI_DECLSPEC extern mca_io_base_component_2_0_0_t mca_io_ompio_component; /* - * global variables, instantiated in module.c + * global variables, instantiated in module.c */ extern opal_mutex_t mca_io_ompio_mutex; extern mca_io_base_module_2_0_0_t mca_io_ompio_module; @@ -191,7 +191,7 @@ typedef struct{ /* forward declaration to keep the compiler happy. */ struct mca_io_ompio_file_t; -typedef int (*mca_io_ompio_decode_datatype_fn_t) (struct mca_io_ompio_file_t *fh, +typedef int (*mca_io_ompio_decode_datatype_fn_t) (struct mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, int count, void *buf, @@ -204,34 +204,34 @@ typedef int (*mca_io_ompio_generate_current_file_view_fn_t) (struct mca_io_ompio int *iov_count); /* - * Function that sorts an io_array according to the offset by filling + * Function that sorts an io_array according to the offset by filling * up an array of the indices into the array (HEAP SORT) */ typedef int (*mca_io_ompio_sort_fn_t) (mca_io_ompio_io_array_t *io_array, int num_entries, int *sorted); -typedef int (*mca_io_ompio_sort_iovec_fn_t) (struct iovec *iov, - int num_entries, +typedef int (*mca_io_ompio_sort_iovec_fn_t) (struct iovec *iov, + int num_entries, int *sorted); /* collective operations based on list of participating ranks instead of communicators*/ -typedef int (*mca_io_ompio_allgather_array_fn_t) (void *sbuf, +typedef int (*mca_io_ompio_allgather_array_fn_t) (void *sbuf, int scount, - ompi_datatype_t *sdtype, + ompi_datatype_t *sdtype, void *rbuf, - int rcount, + int rcount, ompi_datatype_t *rdtype, int root_index, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -typedef int (*mca_io_ompio_allgatherv_array_fn_t) (void *sbuf, +typedef int (*mca_io_ompio_allgatherv_array_fn_t) (void *sbuf, int scount, - ompi_datatype_t *sdtype, + ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, + int *rcounts, int *disps, ompi_datatype_t *rdtype, int root_index, @@ -239,10 +239,10 @@ typedef int (*mca_io_ompio_allgatherv_array_fn_t) (void *sbuf, int procs_per_group, ompi_communicator_t *comm); -typedef int (*mca_io_ompio_gather_array_fn_t) (void *sbuf, +typedef int (*mca_io_ompio_gather_array_fn_t) (void *sbuf, int scount, ompi_datatype_t *sdtype, - void *rbuf, + void *rbuf, int rcount, ompi_datatype_t *rdtype, int root_index, @@ -261,7 +261,7 @@ typedef int (*mca_io_ompio_gatherv_array_fn_t) (void *sbuf, int procs_per_group, ompi_communicator_t *comm); -/* functions to retrieve the number of aggregators and the size of the +/* functions to retrieve the number of aggregators and the size of the temporary buffer on aggregators from the fcoll modules */ typedef void (*mca_io_ompio_get_num_aggregators_fn_t) ( int *num_aggregators); typedef void (*mca_io_ompio_get_bytes_per_agg_fn_t) ( int *bytes_per_agg); @@ -355,7 +355,7 @@ struct mca_io_ompio_file_t { int *f_init_procs_in_group; int f_final_num_aggrs; - + /* internal ompio functions required by fbtl and fcoll */ mca_io_ompio_decode_datatype_fn_t f_decode_datatype; mca_io_ompio_generate_current_file_view_fn_t f_generate_current_file_view; @@ -373,7 +373,7 @@ struct mca_io_ompio_file_t { mca_io_ompio_set_aggregator_props_fn_t f_set_aggregator_props; mca_io_ompio_full_print_queue_fn_t f_full_print_queue; - mca_io_ompio_register_print_entry_fn_t f_register_print_entry; + mca_io_ompio_register_print_entry_fn_t f_register_print_entry; }; typedef struct mca_io_ompio_file_t mca_io_ompio_file_t; @@ -385,16 +385,16 @@ typedef struct mca_io_ompio_data_t mca_io_ompio_data_t; OMPI_DECLSPEC extern mca_io_ompio_print_queue *coll_write_time; OMPI_DECLSPEC extern mca_io_ompio_print_queue *coll_read_time; -/* functions to retrieve the number of aggregators and the size of the +/* functions to retrieve the number of aggregators and the size of the temporary buffer on aggregators from the fcoll modules */ OMPI_DECLSPEC void mca_io_ompio_get_num_aggregators ( int *num_aggregators); OMPI_DECLSPEC void mca_io_ompio_get_bytes_per_agg ( int *bytes_per_agg); -OMPI_DECLSPEC int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles, - size_t bpc, int max_data, uint32_t iov_count, - struct iovec *decoded_iov, int *ii, int *jj, - size_t *tbw ); +OMPI_DECLSPEC int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles, + size_t bpc, int max_data, uint32_t iov_count, + struct iovec *decoded_iov, int *ii, int *jj, + size_t *tbw ); OMPI_DECLSPEC int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh); @@ -490,7 +490,7 @@ OMPI_DECLSPEC int ompio_io_ompio_file_get_position (mca_io_ompio_file_t *fh, * Function that takes in a datatype and buffer, and decodes that datatype * into an iovec using the convertor_raw function */ -OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, +OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, int count, void *buf, @@ -499,15 +499,15 @@ OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, uint32_t *iov_count); /* - * Function that sorts an io_array according to the offset by filling + * Function that sorts an io_array according to the offset by filling * up an array of the indices into the array (HEAP SORT) */ OMPI_DECLSPEC int ompi_io_ompio_sort (mca_io_ompio_io_array_t *io_array, int num_entries, int *sorted); -OMPI_DECLSPEC int ompi_io_ompio_sort_iovec (struct iovec *iov, - int num_entries, +OMPI_DECLSPEC int ompi_io_ompio_sort_iovec (struct iovec *iov, + int num_entries, int *sorted); OMPI_DECLSPEC int ompi_io_ompio_sort_offlen (mca_io_ompio_offlen_array_t *io_array, @@ -516,7 +516,7 @@ OMPI_DECLSPEC int ompi_io_ompio_sort_offlen (mca_io_ompio_offlen_array_t *io_arr -OMPI_DECLSPEC int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, +OMPI_DECLSPEC int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset); OMPI_DECLSPEC int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, @@ -617,41 +617,41 @@ OMPI_DECLSPEC int ompi_io_ompio_scatterv_array (void *sbuf, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int ompi_io_ompio_allgather_array (void *sbuf, +OMPI_DECLSPEC int ompi_io_ompio_allgather_array (void *sbuf, int scount, - ompi_datatype_t *sdtype, + ompi_datatype_t *sdtype, void *rbuf, - int rcount, + int rcount, ompi_datatype_t *rdtype, int root_index, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); - -OMPI_DECLSPEC int ompi_io_ompio_allgatherv_array (void *sbuf, + +OMPI_DECLSPEC int ompi_io_ompio_allgatherv_array (void *sbuf, int scount, - ompi_datatype_t *sdtype, + ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, + int *rcounts, int *disps, ompi_datatype_t *rdtype, int root_index, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int ompi_io_ompio_gather_array (void *sbuf, +OMPI_DECLSPEC int ompi_io_ompio_gather_array (void *sbuf, int scount, ompi_datatype_t *sdtype, - void *rbuf, + void *rbuf, int rcount, ompi_datatype_t *rdtype, int root_index, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int ompi_io_ompio_bcast_array (void *buff, +OMPI_DECLSPEC int ompi_io_ompio_bcast_array (void *buff, int count, - ompi_datatype_t *datatype, + ompi_datatype_t *datatype, int root_index, int *procs_in_group, int procs_per_group, @@ -673,31 +673,31 @@ OMPI_DECLSPEC int ompi_io_ompio_print_time_info(int queue_type, mca_io_ompio_file_t *fh); int ompi_io_ompio_set_print_queue (mca_io_ompio_print_queue **q, int queue_type); - + /* * ****************************************************************** * ********* functions which are implemented in this module ********* * ****************************************************************** - */ + */ -int mca_io_ompio_file_set_view (struct ompi_file_t *fh, - OMPI_MPI_OFFSET_TYPE disp, +int mca_io_ompio_file_set_view (struct ompi_file_t *fh, + OMPI_MPI_OFFSET_TYPE disp, struct ompi_datatype_t *etype, - struct ompi_datatype_t *filetype, + struct ompi_datatype_t *filetype, char *datarep, struct ompi_info_t *info); -int mca_io_ompio_set_view_internal (struct mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE disp, +int mca_io_ompio_set_view_internal (struct mca_io_ompio_file_t *fh, + OMPI_MPI_OFFSET_TYPE disp, struct ompi_datatype_t *etype, - struct ompi_datatype_t *filetype, + struct ompi_datatype_t *filetype, char *datarep, struct ompi_info_t *info); -int mca_io_ompio_file_get_view (struct ompi_file_t *fh, +int mca_io_ompio_file_get_view (struct ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE *disp, - struct ompi_datatype_t **etype, + struct ompi_datatype_t **etype, struct ompi_datatype_t **filetype, char *datarep); int mca_io_ompio_file_open (struct ompi_communicator_t *comm, @@ -837,7 +837,7 @@ int mca_io_ompio_file_get_position (struct ompi_file_t *fh, int mca_io_ompio_file_get_byte_offset (struct ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, OMPI_MPI_OFFSET_TYPE *disp); - + /* Section 9.4.4 */ int mca_io_ompio_file_read_shared (struct ompi_file_t *fh, void *buf, @@ -936,7 +936,7 @@ int mca_io_ompio_file_sync (struct ompi_file_t *fh); * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ + */ END_C_DECLS diff --git a/ompi/mca/io/ompio/io_ompio_coll_array.c b/ompi/mca/io/ompio/io_ompio_coll_array.c index c961fc4c9bb..d8332d84f18 100644 --- a/ompi/mca/io/ompio/io_ompio_coll_array.c +++ b/ompi/mca/io/ompio/io_ompio_coll_array.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,11 +31,11 @@ #include "io_ompio.h" -int ompi_io_ompio_allgatherv_array (void *sbuf, +int ompi_io_ompio_allgatherv_array (void *sbuf, int scount, - ompi_datatype_t *sdtype, + ompi_datatype_t *sdtype, void *rbuf, - int *rcounts, + int *rcounts, int *disps, ompi_datatype_t *rdtype, int root_index, @@ -74,11 +74,11 @@ int ompi_io_ompio_allgatherv_array (void *sbuf, } err = ompi_io_ompio_gatherv_array (send_buf, - rcounts[j], + rcounts[j], send_type, rbuf, - rcounts, - disps, + rcounts, + disps, rdtype, root_index, procs_in_group, @@ -101,26 +101,26 @@ int ompi_io_ompio_allgatherv_array (void *sbuf, return err; } - ompi_io_ompio_bcast_array (rbuf, + ompi_io_ompio_bcast_array (rbuf, 1, newtype, root_index, procs_in_group, procs_per_group, comm); - + ompi_datatype_destroy (&newtype); return OMPI_SUCCESS; } -int ompi_io_ompio_gatherv_array (void *sbuf, +int ompi_io_ompio_gatherv_array (void *sbuf, int scount, ompi_datatype_t *sdtype, - void *rbuf, - int *rcounts, + void *rbuf, + int *rcounts, int *disps, - ompi_datatype_t *rdtype, + ompi_datatype_t *rdtype, int root_index, int *procs_in_group, int procs_per_group, @@ -136,18 +136,18 @@ int ompi_io_ompio_gatherv_array (void *sbuf, if (procs_in_group[root_index] != rank) { if (scount > 0) { - return MCA_PML_CALL(send(sbuf, - scount, - sdtype, + return MCA_PML_CALL(send(sbuf, + scount, + sdtype, procs_in_group[root_index], OMPIO_TAG_GATHERV, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, comm)); } return err; } - /* writer processes, loop receiving data from proceses + /* writer processes, loop receiving data from proceses belonging to each corresponding root */ err = opal_datatype_get_extent (&rdtype->super, &lb, &extent); @@ -162,8 +162,8 @@ int ompi_io_ompio_gatherv_array (void *sbuf, ptmp = ((char *) rbuf) + (extent * disps[i]); if (procs_in_group[i] == rank) { - if (MPI_IN_PLACE != sbuf && - (0 < scount) && + if (MPI_IN_PLACE != sbuf && + (0 < scount) && (0 < rcounts[i])) { err = ompi_datatype_sndrcv (sbuf, scount, @@ -203,13 +203,13 @@ int ompi_io_ompio_gatherv_array (void *sbuf, return err; } -int ompi_io_ompio_scatterv_array (void *sbuf, +int ompi_io_ompio_scatterv_array (void *sbuf, int *scounts, int *disps, ompi_datatype_t *sdtype, - void *rbuf, - int rcount, - ompi_datatype_t *rdtype, + void *rbuf, + int rcount, + ompi_datatype_t *rdtype, int root_index, int *procs_in_group, int procs_per_group, @@ -225,9 +225,9 @@ int ompi_io_ompio_scatterv_array (void *sbuf, if (procs_in_group[root_index] != rank) { if (rcount > 0) { - err = MCA_PML_CALL(recv(rbuf, - rcount, - rdtype, + err = MCA_PML_CALL(recv(rbuf, + rcount, + rdtype, procs_in_group[root_index], OMPIO_TAG_SCATTERV, comm, @@ -236,7 +236,7 @@ int ompi_io_ompio_scatterv_array (void *sbuf, return err; } - /* writer processes, loop sending data to proceses + /* writer processes, loop sending data to proceses belonging to each corresponding root */ err = opal_datatype_get_extent (&sdtype->super, &lb, &extent); @@ -252,8 +252,8 @@ int ompi_io_ompio_scatterv_array (void *sbuf, ptmp = ((char *) sbuf) + (extent * disps[i]); if (procs_in_group[i] == rank) { - if (MPI_IN_PLACE != sbuf && - (0 < scounts[i]) && + if (MPI_IN_PLACE != sbuf && + (0 < scounts[i]) && (0 < rcount)) { err = ompi_datatype_sndrcv (ptmp, scounts[i], @@ -280,8 +280,8 @@ int ompi_io_ompio_scatterv_array (void *sbuf, reqs[i] = MPI_REQUEST_NULL; } } - if (OMPI_SUCCESS != err) { - free ( reqs ); + if (OMPI_SUCCESS != err) { + free ( reqs ); return err; } } @@ -293,11 +293,11 @@ int ompi_io_ompio_scatterv_array (void *sbuf, return err; } -int ompi_io_ompio_allgather_array (void *sbuf, +int ompi_io_ompio_allgather_array (void *sbuf, int scount, - ompi_datatype_t *sdtype, + ompi_datatype_t *sdtype, void *rbuf, - int rcount, + int rcount, ompi_datatype_t *rdtype, int root_index, int *procs_in_group, @@ -321,20 +321,20 @@ int ompi_io_ompio_allgather_array (void *sbuf, } /* Gather and broadcast. */ - err = ompi_io_ompio_gather_array (sbuf, - scount, - sdtype, - rbuf, + err = ompi_io_ompio_gather_array (sbuf, + scount, + sdtype, + rbuf, rcount, - rdtype, + rdtype, root_index, procs_in_group, procs_per_group, comm); if (OMPI_SUCCESS == err) { - err = ompi_io_ompio_bcast_array (rbuf, - rcount * procs_per_group, + err = ompi_io_ompio_bcast_array (rbuf, + rcount * procs_per_group, rdtype, root_index, procs_in_group, @@ -346,10 +346,10 @@ int ompi_io_ompio_allgather_array (void *sbuf, return err; } -int ompi_io_ompio_gather_array (void *sbuf, +int ompi_io_ompio_gather_array (void *sbuf, int scount, ompi_datatype_t *sdtype, - void *rbuf, + void *rbuf, int rcount, ompi_datatype_t *rdtype, int root_index, @@ -364,17 +364,17 @@ int ompi_io_ompio_gather_array (void *sbuf, OPAL_PTRDIFF_TYPE extent, lb; int err = OMPI_SUCCESS; ompi_request_t ** reqs=NULL; - + rank = ompi_comm_rank (comm); - + /* Everyone but the writers sends data and returns. */ if (procs_in_group[root_index] != rank) { - err = MCA_PML_CALL(send(sbuf, - scount, - sdtype, + err = MCA_PML_CALL(send(sbuf, + scount, + sdtype, procs_in_group[root_index], OMPIO_TAG_GATHER, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, comm)); return err; } @@ -393,11 +393,11 @@ int ompi_io_ompio_gather_array (void *sbuf, ++i, ptmp += incr) { if (procs_in_group[i] == rank) { if (MPI_IN_PLACE != sbuf) { - err = ompi_datatype_sndrcv (sbuf, - scount, + err = ompi_datatype_sndrcv (sbuf, + scount, sdtype , - ptmp, - rcount, + ptmp, + rcount, rdtype); } else { @@ -415,7 +415,7 @@ int ompi_io_ompio_gather_array (void *sbuf, &reqs[i])); /* for (k=0 ; k<4 ; k++) - printf ("RECV %p %d \n", + printf ("RECV %p %d \n", ((struct iovec *)ptmp)[k].iov_base, ((struct iovec *)ptmp)[k].iov_len); */ @@ -436,7 +436,7 @@ int ompi_io_ompio_gather_array (void *sbuf, return err; } -int ompi_io_ompio_bcast_array (void *buff, +int ompi_io_ompio_bcast_array (void *buff, int count, ompi_datatype_t *datatype, int root_index, @@ -449,7 +449,7 @@ int ompi_io_ompio_bcast_array (void *buff, ompi_request_t ** reqs=NULL; rank = ompi_comm_rank (comm); - + /* Non-writers receive the data. */ if (procs_in_group[root_index] != rank) { err = MCA_PML_CALL(recv(buff, diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index 239ec425ae6..2f8b32f60d9 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,14 +48,14 @@ static int open_component(void); static int close_component(void); static int init_query(bool enable_progress_threads, bool enable_mpi_threads); -static const struct mca_io_base_module_2_0_0_t * -file_query (struct ompi_file_t *file, +static const struct mca_io_base_module_2_0_0_t * +file_query (struct ompi_file_t *file, struct mca_io_base_file_t **private_data, int *priority); -static int file_unquery(struct ompi_file_t *file, +static int file_unquery(struct ompi_file_t *file, struct mca_io_base_file_t *private_data); -static int delete_query(char *filename, struct ompi_info_t *info, +static int delete_query(char *filename, struct ompi_info_t *info, struct mca_io_base_delete_t **private_data, bool *usable, int *priorty); @@ -207,7 +207,7 @@ static int register_component(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &mca_io_ompio_grouping_option); - + return OMPI_SUCCESS; } @@ -246,7 +246,7 @@ static int init_query(bool enable_progress_threads, static const struct mca_io_base_module_2_0_0_t * -file_query(struct ompi_file_t *file, +file_query(struct ompi_file_t *file, struct mca_io_base_file_t **private_data, int *priority) { @@ -270,7 +270,7 @@ file_query(struct ompi_file_t *file, } -static int file_unquery(struct ompi_file_t *file, +static int file_unquery(struct ompi_file_t *file, struct mca_io_base_file_t *private_data) { /* Free the ompio module-specific data that was allocated in @@ -284,7 +284,7 @@ static int file_unquery(struct ompi_file_t *file, } -static int delete_query(char *filename, struct ompi_info_t *info, +static int delete_query(char *filename, struct ompi_info_t *info, struct mca_io_base_delete_t **private_data, bool *usable, int *priority) { diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index b706789cdc4..846ea2df7d4 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -77,7 +77,7 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, { int ret = OMPI_SUCCESS; int remote_arch; - + ompio_fh->f_iov_type = MPI_DATATYPE_NULL; ompio_fh->f_comm = MPI_COMM_NULL; @@ -87,7 +87,7 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, return MPI_ERR_AMODE; } - if ((amode & MPI_MODE_RDONLY) && + if ((amode & MPI_MODE_RDONLY) && ((amode & MPI_MODE_CREATE) || (amode & MPI_MODE_EXCL))) { return MPI_ERR_AMODE; } @@ -150,9 +150,9 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, ompio_fh->f_set_aggregator_props=ompi_io_ompio_set_aggregator_props; ompio_fh->f_full_print_queue=ompi_io_ompio_full_print_queue; - ompio_fh->f_register_print_entry=ompi_io_ompio_register_print_entry; + ompio_fh->f_register_print_entry=ompi_io_ompio_register_print_entry; - /* This fix is needed for data seiving to work with + /* This fix is needed for data seiving to work with two-phase collective I/O */ if ((amode & MPI_MODE_WRONLY)){ amode -= MPI_MODE_WRONLY; @@ -184,7 +184,7 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, if ( true == use_sharedfp ) { if (OMPI_SUCCESS != (ret = mca_sharedfp_base_file_select (ompio_fh, NULL))) { - opal_output ( ompi_io_base_framework.framework_output, + opal_output ( ompi_io_base_framework.framework_output, "mca_sharedfp_base_file_select() failed\n"); ompio_fh->f_sharedfp = NULL; /*module*/ /* Its ok to not have a shared file pointer module as long as the shared file @@ -192,20 +192,20 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, ** function will return an error code. */ } - + /* open the file once more for the shared file pointer if required. - ** Per default, the shared file pointer specific actions are however + ** Per default, the shared file pointer specific actions are however ** only performed on first access of the shared file pointer, except - ** for the addproc sharedfp component. - ** + ** for the addproc sharedfp component. + ** ** Lazy open does not work for the addproc sharedfp ** component since it starts by spawning a process using MPI_Comm_spawn. - ** For this, the first operation has to be collective which we can + ** For this, the first operation has to be collective which we can ** not guarantuee outside of the MPI_File_open operation. */ - if ( NULL != ompio_fh->f_sharedfp && - true == use_sharedfp && - (!mca_io_ompio_sharedfp_lazy_open || + if ( NULL != ompio_fh->f_sharedfp && + true == use_sharedfp && + (!mca_io_ompio_sharedfp_lazy_open || !strcmp (ompio_fh->f_sharedfp_component->mca_component_name, "addproc") )) { ret = ompio_fh->f_sharedfp->sharedfp_file_open(comm, @@ -213,13 +213,13 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, amode, info, ompio_fh); - + if ( OMPI_SUCCESS != ret ) { goto fn_fail; } } } - + /*Determine topology information if set*/ if (ompio_fh->f_comm->c_flags & OMPI_COMM_CART){ ret = mca_io_ompio_cart_based_grouping(ompio_fh); @@ -227,16 +227,16 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, ret = MPI_ERR_FILE; } } - + ret = ompio_fh->f_fs->fs_file_open (comm, filename, amode, info, ompio_fh); - - - + + + if ( OMPI_SUCCESS != ret ) { ret = MPI_ERR_FILE; goto fn_fail; @@ -252,14 +252,14 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, ¤t_size); ompi_io_ompio_set_explicit_offset (ompio_fh, current_size); } - + return OMPI_SUCCESS; fn_fail: /* no need to free resources here, since the destructor - * is calling mca_io_ompio_file_close, which actually gets + * is calling mca_io_ompio_file_close, which actually gets *rid of all allocated memory items */ return ret; @@ -321,9 +321,9 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh) ret = ompio_fh->f_sharedfp->sharedfp_file_close(ompio_fh); } if ( NULL != ompio_fh->f_fs ) { - /* The pointer might not be set if file_close() is + /* The pointer might not be set if file_close() is ** called from the file destructor in case of an error - ** during file_open() + ** during file_open() */ ret = ompio_fh->f_fs->fs_file_close (ompio_fh); } @@ -374,7 +374,7 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh) ompio_fh->f_datarep = NULL; } - + if (MPI_DATATYPE_NULL != ompio_fh->f_iov_type) { ompi_datatype_destroy (&ompio_fh->f_iov_type); } @@ -394,12 +394,12 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh) if (MPI_COMM_NULL != ompio_fh->f_comm && (ompio_fh->f_flags & OMPIO_SHAREDFP_IS_SET) ) { ompi_comm_free (&ompio_fh->f_comm); } - + return ret; } int mca_io_ompio_file_delete (char *filename, - struct ompi_info_t *info) + struct ompi_info_t *info) { int ret = OMPI_SUCCESS; @@ -439,14 +439,14 @@ mca_io_ompio_file_preallocate (ompi_file_t *fh, } /* ROMIO explanation - On file systems with no preallocation function, we have to - explicitly write to allocate space. Since there could be holes in the file, - we need to read up to the current file size, write it back, - and then write beyond that depending on how much + On file systems with no preallocation function, we have to + explicitly write to allocate space. Since there could be holes in the file, + we need to read up to the current file size, write it back, + and then write beyond that depending on how much preallocation is needed. */ if (OMPIO_ROOT == data->ompio_fh.f_rank) { - ret = data->ompio_fh.f_fs->fs_file_get_size (&data->ompio_fh, + ret = data->ompio_fh.f_fs->fs_file_get_size (&data->ompio_fh, ¤t_size); size = diskspace; @@ -577,7 +577,7 @@ int mca_io_ompio_file_set_info (ompi_file_t *fh, ompi_info_t *info) { int ret = OMPI_SUCCESS; - + if ( MPI_INFO_NULL == fh->f_info ) { /* OBJ_RELEASE(MPI_INFO_NULL); */ } @@ -596,7 +596,7 @@ int mca_io_ompio_file_get_info (ompi_file_t *fh, { int ret = OMPI_SUCCESS; ompi_info_t *info=NULL; - + if ( MPI_INFO_NULL == fh->f_info ) { *info_used = MPI_INFO_NULL; } @@ -704,7 +704,7 @@ mca_io_ompio_file_seek (ompi_file_t *fh, } break; case MPI_SEEK_END: - ret = data->ompio_fh.f_fs->fs_file_get_size (&data->ompio_fh, + ret = data->ompio_fh.f_fs->fs_file_get_size (&data->ompio_fh, &temp_offset); offset += temp_offset; if (offset < 0 || OMPI_SUCCESS != ret) { @@ -715,7 +715,7 @@ mca_io_ompio_file_seek (ompi_file_t *fh, return OMPI_ERROR; } - ret = ompi_io_ompio_set_explicit_offset (&data->ompio_fh, + ret = ompi_io_ompio_set_explicit_offset (&data->ompio_fh, offset/data->ompio_fh.f_etype_size); return ret; } @@ -727,12 +727,12 @@ mca_io_ompio_file_get_position (ompi_file_t *fd, int ret=OMPI_SUCCESS; mca_io_ompio_data_t *data=NULL; mca_io_ompio_file_t *fh=NULL; - + data = (mca_io_ompio_data_t *) fd->f_io_selected_data; fh = &data->ompio_fh; - + ret = ompio_io_ompio_file_get_position (fh, offset); - + return ret; } @@ -741,7 +741,7 @@ ompio_io_ompio_file_get_position (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *offset) { OMPI_MPI_OFFSET_TYPE off; - + /* No. of copies of the entire file view */ off = (fh->f_offset - fh->f_disp)/fh->f_view_extent; @@ -769,7 +769,7 @@ mca_io_ompio_file_get_byte_offset (ompi_file_t *fh, data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - temp_offset = data->ompio_fh.f_view_extent * + temp_offset = data->ompio_fh.f_view_extent * (offset*data->ompio_fh.f_etype_size / data->ompio_fh.f_view_size); position = 0; @@ -855,7 +855,7 @@ mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh) int coords_tmp[2] = { 0 }; cart_topo_components cart_topo; - + ompio_fh->f_comm->c_topo->topo.cart.cartdim_get(ompio_fh->f_comm, &cart_topo.ndims); cart_topo.dims = (int*)malloc (cart_topo.ndims * sizeof(int)); @@ -879,7 +879,7 @@ mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh) cart_topo.dims, cart_topo.periods, cart_topo.coords); - + ompio_fh->f_init_procs_per_group = cart_topo.dims[1]; //number of elements per row ompio_fh->f_init_num_aggrs = cart_topo.dims[0]; //number of rows @@ -889,7 +889,7 @@ mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh) opal_output (1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + for(k = 0; k < cart_topo.dims[0]; k++){ coords_tmp[0] = k; coords_tmp[1] = k * cart_topo.dims[1]; @@ -897,7 +897,7 @@ mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh) ompio_fh->f_init_aggr_list[k] = tmp_rank; //change this to use get rank } - //Initial Grouping + //Initial Grouping ompio_fh->f_init_procs_in_group = (int*)malloc (ompio_fh->f_init_procs_per_group * sizeof(int)); if (NULL == ompio_fh->f_init_procs_in_group) { opal_output (1, "OUT OF MEMORY\n"); @@ -906,9 +906,9 @@ mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh) for (j=0 ; j< ompio_fh->f_size ; j++) { ompio_fh->f_comm->c_topo->topo.cart.cart_coords (ompio_fh->f_comm, j, cart_topo.ndims, coords_tmp); if (coords_tmp[0] == cart_topo.coords[0]) { - if ((coords_tmp[1]/ompio_fh->f_init_procs_per_group) == + if ((coords_tmp[1]/ompio_fh->f_init_procs_per_group) == (cart_topo.coords[1]/ompio_fh->f_init_procs_per_group)) { - + ompio_fh->f_init_procs_in_group[n] = j; n++; } @@ -934,6 +934,6 @@ mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh) free (cart_topo.coords); cart_topo.coords = NULL; } - + return OMPI_SUCCESS; } diff --git a/ompi/mca/io/ompio/io_ompio_file_read.c b/ompi/mca/io/ompio/io_ompio_file_read.c index ab82e476304..e50aae14127 100644 --- a/ompi/mca/io/ompio/io_ompio_file_read.c +++ b/ompi/mca/io/ompio/io_ompio_file_read.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -34,13 +34,13 @@ #include "math.h" #include -/* Read and write routines are split into two interfaces. -** The -** mca_io_ompio_file_read/write[_at] -** +/* Read and write routines are split into two interfaces. +** The +** mca_io_ompio_file_read/write[_at] +** ** routines are the ones registered with the ompio modules. ** The -** +** ** ompio_io_ompio_file_read/write[_at] ** ** routesin are used e.g. from the shared file pointer modules. @@ -98,12 +98,12 @@ int ompio_io_ompio_file_read (mca_io_ompio_file_t *fh, return ret; } - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, + ompi_io_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, &iov_count); if ( -1 == mca_io_ompio_cycle_buffer_size ) { @@ -122,17 +122,17 @@ int ompio_io_ompio_file_read (mca_io_ompio_file_t *fh, for (index = 0; index < cycles; index++) { - mca_io_ompio_build_io_array ( fh, - index, - cycles, - bytes_per_cycle, - max_data, - iov_count, - decoded_iov, - &i, - &j, + mca_io_ompio_build_io_array ( fh, + index, + cycles, + bytes_per_cycle, + max_data, + iov_count, + decoded_iov, + &i, + &j, &total_bytes_read); - + if (fh->f_num_of_io_entries) { ret_code = fh->f_fbtl->fbtl_preadv (fh); if ( 0<= ret_code ) { @@ -184,7 +184,7 @@ int ompio_io_ompio_file_read_at (mca_io_ompio_file_t *fh, { int ret = OMPI_SUCCESS; OMPI_MPI_OFFSET_TYPE prev_offset; - + ompio_io_ompio_file_get_position (fh, &prev_offset ); ompi_io_ompio_set_explicit_offset (fh, offset); @@ -245,33 +245,33 @@ int ompio_io_ompio_file_iread (mca_io_ompio_file_t *fh, size_t total_bytes_read = 0; /* total bytes that have been read*/ uint32_t iov_count = 0; struct iovec *decoded_iov = NULL; - - size_t max_data = 0; + + size_t max_data = 0; int i = 0; /* index into the decoded iovec of the buffer */ int j = 0; /* index into the file vie iovec */ - - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, + + ompi_io_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, &iov_count); - + // Non-blocking operations have to occur in a single cycle j = fh->f_index_in_file_view; - - mca_io_ompio_build_io_array ( fh, - 0, // index - 1, // no. of cyces - max_data, // setting bytes per cycle to match data - max_data, - iov_count, - decoded_iov, - &i, - &j, + + mca_io_ompio_build_io_array ( fh, + 0, // index + 1, // no. of cyces + max_data, // setting bytes per cycle to match data + max_data, + iov_count, + decoded_iov, + &i, + &j, &total_bytes_read); - + if (fh->f_num_of_io_entries) { fh->f_fbtl->fbtl_ipreadv (fh, (ompi_request_t *) ompio_req); } @@ -345,9 +345,9 @@ int ompio_io_ompio_file_iread_at (mca_io_ompio_file_t *fh, /* An explicit offset file operation is not suppsed to modify ** the internal file pointer. So reset the pointer ** to the previous value - ** It is OK to reset the position already here, althgouth + ** It is OK to reset the position already here, althgouth ** the operation might still be pending/ongoing, since - ** the entire array of have + ** the entire array of have ** already been constructed in the file_iread operation */ ompi_io_ompio_set_explicit_offset (fh, prev_offset); @@ -370,9 +370,9 @@ int mca_io_ompio_file_read_all (ompi_file_t *fh, data = (mca_io_ompio_data_t *) fh->f_io_selected_data; ret = data->ompio_fh. - f_fcoll->fcoll_file_read_all (&data->ompio_fh, - buf, - count, + f_fcoll->fcoll_file_read_all (&data->ompio_fh, + buf, + count, datatype, status); if ( MPI_STATUS_IGNORE != status ) { @@ -399,15 +399,15 @@ int mca_io_ompio_file_iread_all (ompi_file_t *fh, fp = &data->ompio_fh; if ( NULL != fp->f_fcoll->fcoll_file_iread_all ) { - ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh, - buf, - count, + ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh, + buf, + count, datatype, request); } else { - /* this fcoll component does not support non-blocking - collective I/O operations. WE fake it with + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with individual non-blocking I/O operations. */ ret = ompio_io_ompio_file_iread ( fp, buf, count, datatype, request ); } @@ -468,7 +468,7 @@ int mca_io_ompio_file_iread_at_all (ompi_file_t *fh, ret = ompio_io_ompio_file_iread_at_all ( &data->ompio_fh, offset, buf, count, datatype, request ); return ret; } - + int ompio_io_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, void *buf, @@ -490,8 +490,8 @@ int ompio_io_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, request); } else { - /* this fcoll component does not support non-blocking - collective I/O operations. WE fake it with + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with individual non-blocking I/O operations. */ ret = ompio_io_ompio_file_iread ( fp, buf, count, datatype, request ); } @@ -501,7 +501,7 @@ int ompio_io_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, return ret; } -/* Infrastructure for shared file pointer operations +/* Infrastructure for shared file pointer operations ** (individual and ordered)*/ /******************************************************/ int mca_io_ompio_file_read_shared (ompi_file_t *fp, diff --git a/ompi/mca/io/ompio/io_ompio_file_set_view.c b/ompi/mca/io/ompio/io_ompio_file_set_view.c index e4ac2bbce20..42b28715acb 100644 --- a/ompi/mca/io/ompio/io_ompio_file_set_view.c +++ b/ompi/mca/io/ompio/io_ompio_file_set_view.c @@ -48,7 +48,7 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, char *datarep, ompi_info_t *info) { - + size_t max_data = 0; int i; int num_groups = 0; @@ -83,22 +83,22 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, fh->f_flags |= OMPIO_FILE_VIEW_IS_SET; fh->f_datarep = strdup (datarep); ompi_datatype_duplicate (filetype, &fh->f_orig_filetype ); - + opal_datatype_get_extent(&filetype->super, &lb, &ftype_extent); opal_datatype_type_size (&filetype->super, &ftype_size); - if ( etype == filetype && + if ( etype == filetype && ompi_datatype_is_predefined (filetype ) && ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){ ompi_datatype_create_contiguous(MCA_IO_DEFAULT_FILE_VIEW_SIZE, &ompi_mpi_byte.dt, &newfiletype); ompi_datatype_commit (&newfiletype); - } + } else { newfiletype = filetype; } - + fh->f_iov_count = 0; fh->f_disp = disp; @@ -110,7 +110,7 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, 1, NULL, &max_data, - &fh->f_decoded_iov, + &fh->f_decoded_iov, &fh->f_iov_count); opal_datatype_get_extent(&newfiletype->super, &lb, &fh->f_view_extent); @@ -123,7 +123,7 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, fh->f_cc_size = get_contiguous_chunk_size (fh); if (opal_datatype_is_contiguous_memory_layout(&etype->super,1)) { - if (opal_datatype_is_contiguous_memory_layout(&filetype->super,1) && + if (opal_datatype_is_contiguous_memory_layout(&filetype->super,1) && fh->f_view_extent == (OPAL_PTRDIFF_TYPE)fh->f_view_size ) { fh->f_flags |= OMPIO_CONTIGUOUS_FVIEW; } @@ -165,11 +165,11 @@ int mca_io_ompio_set_view_internal(mca_io_ompio_file_t *fh, } free(contg_groups); - if ( etype == filetype && + if ( etype == filetype && ompi_datatype_is_predefined (filetype ) && ftype_extent == (OPAL_PTRDIFF_TYPE)ftype_size ){ ompi_datatype_destroy ( &newfiletype ); - } + } if (OMPI_SUCCESS != mca_fcoll_base_file_select (fh, NULL)) { @@ -200,7 +200,7 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, fh = &data->ompio_fh; ret = mca_io_ompio_set_view_internal(fh, disp, etype, filetype, datarep, info); - if ( NULL != fh->f_sharedfp_data) { + if ( NULL != fh->f_sharedfp_data) { sh = ((struct mca_sharedfp_base_data_t *)fh->f_sharedfp_data)->sharedfh; ret = mca_io_ompio_set_view_internal(sh, disp, etype, filetype, datarep, info); } @@ -208,9 +208,9 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, return ret; } -int mca_io_ompio_file_get_view (struct ompi_file_t *fp, +int mca_io_ompio_file_get_view (struct ompi_file_t *fp, OMPI_MPI_OFFSET_TYPE *disp, - struct ompi_datatype_t **etype, + struct ompi_datatype_t **etype, struct ompi_datatype_t **filetype, char *datarep) { @@ -235,9 +235,9 @@ OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (mca_io_ompio_file_t *fh) OMPI_MPI_OFFSET_TYPE global_avg[3] = {0,0,0}; int i = 0; - /* This function does two things: first, it determines the average data chunk - ** size in the file view for each process and across all processes. - ** Second, it establishes whether the view across all processes is uniform. + /* This function does two things: first, it determines the average data chunk + ** size in the file view for each process and across all processes. + ** Second, it establishes whether the view across all processes is uniform. ** By definition, uniform means: ** 1. the file view of each process has the same number of contiguous sections ** 2. each section in the file view has exactly the same size @@ -267,7 +267,7 @@ OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (mca_io_ompio_file_t *fh) global_avg[0] = global_avg[0]/fh->f_size; global_avg[1] = global_avg[1]/fh->f_size; - if ( global_avg[0] == avg[0] && + if ( global_avg[0] == avg[0] && global_avg[1] == avg[1] && 0 == avg[2] && 0 == global_avg[2] ) { @@ -278,7 +278,7 @@ OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (mca_io_ompio_file_t *fh) } /* second confirmation round to see whether all processes agree - ** on having a uniform file view or not + ** on having a uniform file view or not */ fh->f_comm->c_coll.coll_allreduce (&uniform, &global_uniform, @@ -300,7 +300,7 @@ int mca_io_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, int *num_groups, contg *contg_groups) { - + int k = 0; int p = 0; int g = 0; @@ -318,7 +318,7 @@ int mca_io_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, start_offset_len[1] = fh->f_decoded_iov[0].iov_len; } start_offset_len[2] = fh->f_rank; - + if( OMPIO_ROOT == fh->f_rank){ start_offsets_lens = (OMPI_MPI_OFFSET_TYPE* )malloc (3 * fh->f_size * sizeof(OMPI_MPI_OFFSET_TYPE)); if (NULL == start_offsets_lens) { @@ -336,14 +336,14 @@ int mca_io_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, //Gather start offsets across processes in a group on aggregator fh->f_comm->c_coll.coll_gather (start_offset_len, 3, - OMPI_OFFSET_DATATYPE, + OMPI_OFFSET_DATATYPE, start_offsets_lens, 3, OMPI_OFFSET_DATATYPE, OMPIO_ROOT, fh->f_comm, fh->f_comm->c_coll.coll_gather_module); - + //Calculate contg chunk size and contg subgroups if(OMPIO_ROOT == fh->f_rank){ for( k = 0 ; k < fh->f_size; k++){ @@ -377,7 +377,7 @@ int mca_io_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, } } - *num_groups = p+1; + *num_groups = p+1; if (NULL != start_offsets_lens) { free (start_offsets_lens); start_offsets_lens = NULL; @@ -408,9 +408,9 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, int z = 0; int y = 0; int r = 0; - + MPI_Request *sendreq = NULL , *req = NULL; - + req = (MPI_Request *)malloc (2* sizeof(MPI_Request)); if (NULL == req) { @@ -452,10 +452,10 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, MCA_PML_BASE_SEND_STANDARD, fh->f_comm, &sendreq[r++])); - } + } } } - + //All processes receive initial procs per group from OMPIO_ROOT MCA_PML_CALL(irecv(&fh->f_init_procs_per_group, 1, @@ -483,14 +483,14 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, OMPIO_PROCS_IN_GROUP_TAG, fh->f_comm, &req[1])); - + ompi_request_wait (&req[1], MPI_STATUS_IGNORE); free (req); if(OMPIO_ROOT == fh->f_rank){ ompi_request_wait_all (r, sendreq, MPI_STATUSES_IGNORE); free (sendreq); } - + /*set initial aggregator list */ //OMPIO_ROOT broadcasts aggr list @@ -506,7 +506,7 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, OMPIO_ROOT, fh->f_comm, fh->f_comm->c_coll.coll_bcast_module); - + return OMPI_SUCCESS; } diff --git a/ompi/mca/io/ompio/io_ompio_file_write.c b/ompi/mca/io/ompio/io_ompio_file_write.c index 8a615209a97..f5fdad7f8fe 100644 --- a/ompi/mca/io/ompio/io_ompio_file_write.c +++ b/ompi/mca/io/ompio/io_ompio_file_write.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,13 +36,13 @@ #include "math.h" #include -/* Read and write routines are split into two interfaces. -** The -** mca_io_ompio_file_read/write[_at] -** +/* Read and write routines are split into two interfaces. +** The +** mca_io_ompio_file_read/write[_at] +** ** routines are the ones registered with the ompio modules. ** The -** +** ** ompio_io_ompio_file_read/write[_at] ** ** routesin are used e.g. from the shared file pointer modules. @@ -83,7 +83,7 @@ int ompio_io_ompio_file_write (mca_io_ompio_file_t *fh, struct iovec *decoded_iov = NULL; size_t bytes_per_cycle=0; size_t total_bytes_written = 0; - size_t max_data=0, real_bytes_written=0; + size_t max_data=0, real_bytes_written=0; ssize_t ret_code=0; int i = 0; /* index into the decoded iovec of the buffer */ int j = 0; /* index into the file view iovec */ @@ -95,12 +95,12 @@ int ompio_io_ompio_file_write (mca_io_ompio_file_t *fh, return ret; } - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, + ompi_io_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, &iov_count); if ( -1 == mca_io_ompio_cycle_buffer_size ) { @@ -117,15 +117,15 @@ int ompio_io_ompio_file_write (mca_io_ompio_file_t *fh, j = fh->f_index_in_file_view; for (index = 0; index < cycles; index++) { - mca_io_ompio_build_io_array ( fh, - index, - cycles, - bytes_per_cycle, - max_data, - iov_count, - decoded_iov, - &i, - &j, + mca_io_ompio_build_io_array ( fh, + index, + cycles, + bytes_per_cycle, + max_data, + iov_count, + decoded_iov, + &i, + &j, &total_bytes_written); if (fh->f_num_of_io_entries) { @@ -234,43 +234,43 @@ int ompio_io_ompio_file_iwrite (mca_io_ompio_file_t *fh, uint32_t iov_count = 0; struct iovec *decoded_iov = NULL; - size_t max_data = 0; + size_t max_data = 0; size_t total_bytes_written =0; int i = 0; /* index into the decoded iovec of the buffer */ int j = 0; /* index into the file vie iovec */ - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, + ompi_io_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, &iov_count); j = fh->f_index_in_file_view; /* Non blocking operations have to occur in a single cycle */ - mca_io_ompio_build_io_array ( fh, + mca_io_ompio_build_io_array ( fh, 0, // index of current cycle iteration 1, // number of cycles - max_data, // setting bytes_per_cycle to max_data - max_data, - iov_count, - decoded_iov, - &i, - &j, + max_data, // setting bytes_per_cycle to max_data + max_data, + iov_count, + decoded_iov, + &i, + &j, &total_bytes_written); - + if (fh->f_num_of_io_entries) { fh->f_fbtl->fbtl_ipwritev (fh, (ompi_request_t *) ompio_req); } - + if ( false == mca_io_ompio_progress_is_registered ) { // Lazy initialization of progress function to minimize impact // on other ompi functionality in case its not used. opal_progress_register (mca_io_ompio_component_progress); mca_io_ompio_progress_is_registered=true; } - + fh->f_num_of_io_entries = 0; if (NULL != fh->f_io_array) { free (fh->f_io_array); @@ -285,7 +285,7 @@ int ompio_io_ompio_file_iwrite (mca_io_ompio_file_t *fh, // This fbtl does not support non-blocking write operations ompi_status_public_t status; ret = ompio_io_ompio_file_write(fh,buf,count,datatype, &status); - + ompi_request_complete (&ompio_req->req_ompi, 0); ompio_req->req_ompi.req_status.MPI_ERROR = ret; ompio_req->req_ompi.req_status._ucount = status._ucount; @@ -304,7 +304,7 @@ int mca_io_ompio_file_iwrite_at (ompi_file_t *fh, { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; - + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; ret = ompio_io_ompio_file_iwrite_at(&data->ompio_fh,offset,buf,count,datatype,request); @@ -332,9 +332,9 @@ int ompio_io_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, /* An explicit offset file operation is not suppsed to modify ** the internal file pointer. So reset the pointer ** to the previous value - ** It is OK to reset the position already here, althgouth + ** It is OK to reset the position already here, althgouth ** the operation might still be pending/ongoing, since - ** the entire array of have + ** the entire array of have ** already been constructed in the file_iwrite operation */ ompi_io_ompio_set_explicit_offset (fh, prev_offset); @@ -345,9 +345,9 @@ int ompio_io_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, /* Helper function used by both read and write operations */ /**************************************************************/ -int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles, - size_t bytes_per_cycle, int max_data, uint32_t iov_count, - struct iovec *decoded_iov, int *ii, int *jj, size_t *tbw ) +int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles, + size_t bytes_per_cycle, int max_data, uint32_t iov_count, + struct iovec *decoded_iov, int *ii, int *jj, size_t *tbw ) { OPAL_PTRDIFF_TYPE disp; int block = 1; @@ -358,7 +358,7 @@ int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles int k = 0; /* index into the io_array */ int i = *ii; int j = *jj; - + sum_previous_length = fh->f_position_in_file_view; if ((index == cycles-1) && (max_data % bytes_per_cycle)) { @@ -367,49 +367,49 @@ int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles else { bytes_to_write_in_cycle = bytes_per_cycle; } - - fh->f_io_array = (mca_io_ompio_io_array_t *)malloc + + fh->f_io_array = (mca_io_ompio_io_array_t *)malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + while (bytes_to_write_in_cycle) { /* reallocate if needed */ if (OMPIO_IOVEC_INITIAL_SIZE*block <= k) { block ++; - fh->f_io_array = (mca_io_ompio_io_array_t *)realloc - (fh->f_io_array, OMPIO_IOVEC_INITIAL_SIZE * + fh->f_io_array = (mca_io_ompio_io_array_t *)realloc + (fh->f_io_array, OMPIO_IOVEC_INITIAL_SIZE * block * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; } } - - if (decoded_iov[i].iov_len - + + if (decoded_iov[i].iov_len - (total_bytes_written - sum_previous_counts) <= 0) { sum_previous_counts += decoded_iov[i].iov_len; i = i + 1; } - - disp = (OPAL_PTRDIFF_TYPE)decoded_iov[i].iov_base + + + disp = (OPAL_PTRDIFF_TYPE)decoded_iov[i].iov_base + (total_bytes_written - sum_previous_counts); fh->f_io_array[k].memory_address = (IOVBASE_TYPE *)disp; - - if (decoded_iov[i].iov_len - - (total_bytes_written - sum_previous_counts) >= + + if (decoded_iov[i].iov_len - + (total_bytes_written - sum_previous_counts) >= bytes_to_write_in_cycle) { fh->f_io_array[k].length = bytes_to_write_in_cycle; } else { - fh->f_io_array[k].length = decoded_iov[i].iov_len - + fh->f_io_array[k].length = decoded_iov[i].iov_len - (total_bytes_written - sum_previous_counts); } - - if (! (fh->f_flags & OMPIO_CONTIGUOUS_FVIEW)) { - if (fh->f_decoded_iov[j].iov_len - + + if (! (fh->f_flags & OMPIO_CONTIGUOUS_FVIEW)) { + if (fh->f_decoded_iov[j].iov_len - (fh->f_total_bytes - sum_previous_length) <= 0) { sum_previous_length += fh->f_decoded_iov[j].iov_len; j = j + 1; @@ -422,21 +422,21 @@ int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles fh->f_total_bytes = 0; } } - } - - disp = (OPAL_PTRDIFF_TYPE)fh->f_decoded_iov[j].iov_base + + } + + disp = (OPAL_PTRDIFF_TYPE)fh->f_decoded_iov[j].iov_base + (fh->f_total_bytes - sum_previous_length); fh->f_io_array[k].offset = (IOVBASE_TYPE *)(intptr_t)(disp + fh->f_offset); - - if (! (fh->f_flags & OMPIO_CONTIGUOUS_FVIEW)) { - if (fh->f_decoded_iov[j].iov_len - - (fh->f_total_bytes - sum_previous_length) + + if (! (fh->f_flags & OMPIO_CONTIGUOUS_FVIEW)) { + if (fh->f_decoded_iov[j].iov_len - + (fh->f_total_bytes - sum_previous_length) < fh->f_io_array[k].length) { - fh->f_io_array[k].length = fh->f_decoded_iov[j].iov_len - + fh->f_io_array[k].length = fh->f_decoded_iov[j].iov_len - (fh->f_total_bytes - sum_previous_length); } } - + total_bytes_written += fh->f_io_array[k].length; fh->f_total_bytes += fh->f_io_array[k].length; bytes_to_write_in_cycle -= fh->f_io_array[k].length; @@ -445,12 +445,12 @@ int mca_io_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles fh->f_position_in_file_view = sum_previous_length; fh->f_index_in_file_view = j; fh->f_num_of_io_entries = k; - + #if 0 if (fh->f_rank == 0) { int d; printf("*************************** %d\n", fh->f_num_of_io_entries); - + for (d=0 ; df_num_of_io_entries ; d++) { printf(" ADDRESS: %p OFFSET: %p LENGTH: %d\n", fh->f_io_array[d].memory_address, @@ -481,12 +481,12 @@ int mca_io_ompio_file_write_all (ompi_file_t *fh, data = (mca_io_ompio_data_t *) fh->f_io_selected_data; ret = data->ompio_fh. - f_fcoll->fcoll_file_write_all (&data->ompio_fh, - buf, - count, + f_fcoll->fcoll_file_write_all (&data->ompio_fh, + buf, + count, datatype, status); - + if ( MPI_STATUS_IGNORE != status ) { size_t size; @@ -527,15 +527,15 @@ int mca_io_ompio_file_iwrite_all (ompi_file_t *fh, fp = &data->ompio_fh; if ( NULL != fp->f_fcoll->fcoll_file_iwrite_all ) { - ret = fp->f_fcoll->fcoll_file_iwrite_all (&data->ompio_fh, - buf, - count, + ret = fp->f_fcoll->fcoll_file_iwrite_all (&data->ompio_fh, + buf, + count, datatype, request); } else { - /* this fcoll component does not support non-blocking - collective I/O operations. WE fake it with + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with individual non-blocking I/O operations. */ ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); } @@ -603,8 +603,8 @@ int ompio_io_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, request); } else { - /* this fcoll component does not support non-blocking - collective I/O operations. WE fake it with + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with individual non-blocking I/O operations. */ ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); } @@ -816,7 +816,7 @@ int mca_io_ompio_file_write_at_all_end (ompi_file_t *fh, int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; mca_io_ompio_file_t *fp=NULL; - + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; ret = ompi_request_wait ( &fp->f_split_coll_req, status ); diff --git a/ompi/mca/io/ompio/io_ompio_module.c b/ompi/mca/io/ompio/io_ompio_module.c index 300e90d787c..cbdaf2e0dd8 100644 --- a/ompi/mca/io/ompio/io_ompio_module.c +++ b/ompi/mca/io/ompio/io_ompio_module.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mca/io/ompio/io_ompio_nbc.c b/ompi/mca/io/ompio/io_ompio_nbc.c index 32e8aa1aeeb..ad79378ce86 100644 --- a/ompi/mca/io/ompio/io_ompio_nbc.c +++ b/ompi/mca/io/ompio/io_ompio_nbc.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,13 +49,13 @@ int mca_io_ompio_get_f_aggregator_index (ompi_file_t *fh) int mca_io_ompio_get_f_num_of_io_entries(ompi_file_t *fh) { - + mca_io_ompio_data_t *data; mca_io_ompio_file_t *file; - + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; file = &data->ompio_fh; - + return file->f_num_of_io_entries; } @@ -79,7 +79,7 @@ int mca_io_ompio_get_fcoll_dynamic_num_io_procs (int *num_procs) int mca_io_ompio_get_fcoll_dynamic_constant_cbs (int *constant_cbs) { int param; - + param = mca_base_var_find("ompi", "fcoll", "dynamic", "constant_cbs"); if (param >= 0){ const int *value = NULL; @@ -97,7 +97,7 @@ int mca_io_ompio_get_fcoll_dynamic_constant_cbs (int *constant_cbs) int mca_io_ompio_get_fcoll_dynamic_cycle_buffer_size (int *cycle_buffer_size) { - + int param; param = mca_base_var_find("ompi", "fcoll", "dynamic", "cycle_buffer_size"); @@ -116,7 +116,7 @@ int mca_io_ompio_get_fcoll_dynamic_cycle_buffer_size (int *cycle_buffer_size) int mca_io_ompio_get_f_io_array(ompi_file_t *fh, mca_io_ompio_io_array_t **f_io_array) { - + mca_io_ompio_data_t *data; mca_io_ompio_file_t *file; @@ -202,7 +202,7 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, int *bytes_per_process, char *global_buf, int *tblocks, - int *sorted, + int *sorted, int *nvalue, int *bytes_left_ptr, int *sorted_index) @@ -212,11 +212,11 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, int k, j, x=sorted_index[0]; int blocks = *tblocks; int bytes_left = bytes_left_ptr[0]; - - + + data = (mca_io_ompio_data_t *) file->f_io_selected_data; fh = &data->ompio_fh; - + if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) { int global_count = *tglobal_count; @@ -235,8 +235,8 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, free (fh->f_io_array); fh->f_io_array = NULL; } - - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc + + fh->f_io_array = (mca_io_ompio_io_array_t *) malloc (OMPIO_IOVEC_INITIAL_SIZE * sizeof (mca_io_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); @@ -288,11 +288,11 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, continue; } else { - fh->f_io_array[k].offset = (IOVBASE_TYPE *) + fh->f_io_array[k].offset = (IOVBASE_TYPE *) ((OPAL_PTRDIFF_TYPE)global_fview[sorted[x]].iov_base + (global_fview[sorted[x]].iov_len - bytes_left)); - + fh->f_io_array[k].length = bytes_to_write; - fh->f_io_array[k].memory_address = + fh->f_io_array[k].memory_address = &global_buf[start+temp[nvalue[0]]]; /* printf("global_buf[%d] : %d\n", (start+temp[nvalue[0]]),(int)global_buf[start+temp[nvalue[0]]]);*/ @@ -313,7 +313,7 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, /* printf("global_buf[%d] : %d\n", (start+temp[nvalue[0]]),(int)global_buf[start+temp[nvalue[0]]]);*/ - bytes_left = + bytes_left = global_fview[sorted[x]].iov_len - bytes_to_write; bytes_to_write = 0; k ++; @@ -327,7 +327,7 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, temp[nvalue[0]] += (int)fh->f_io_array[k].length; /* printf("global_buf[%d] : %d\n", (start+temp[nvalue[0]]),(int)global_buf[start+temp[nvalue[0]]]);*/ - + bytes_to_write -= global_fview[sorted[x]].iov_len; k ++; x ++; @@ -341,7 +341,7 @@ int mca_io_ompio_generate_io_array(ompi_file_t *file, fh->f_io_array[i].offset, fh->f_io_array[i].length); }*/ - + bytes_left_ptr[0] = bytes_left; sorted_index[0] = x; @@ -366,17 +366,17 @@ int mca_io_ompio_non_contiguous_create_receive_buf(int *bytes_received, int current_position = 0, iov_index = 0; remaining = *bytes_received; - + while (remaining) { mem_address = (OPAL_PTRDIFF_TYPE) (decoded_iov[iov_index].iov_base) + current_position; - - if (remaining >= + + if (remaining >= (decoded_iov[iov_index].iov_len - current_position)) { memcpy ((IOVBASE_TYPE *) mem_address, receive_buf+temp_position, decoded_iov[iov_index].iov_len - current_position); - remaining = remaining - + remaining = remaining - (decoded_iov[iov_index].iov_len - current_position); temp_position = temp_position + (decoded_iov[iov_index].iov_len - current_position); @@ -408,17 +408,17 @@ int mca_io_ompio_non_contiguous_create_send_buf(int *bytes_sent, size_t remaining = 0; size_t temp_position = 0; int current_position = 0, iov_index = 0; - + remaining = *bytes_sent; while (remaining) { mem_address = (OPAL_PTRDIFF_TYPE) (decoded_iov[iov_index].iov_base) + current_position; - if (remaining >= + if (remaining >= (decoded_iov[iov_index].iov_len - current_position)) { memcpy (send_buf+temp_position, (IOVBASE_TYPE *)mem_address, decoded_iov[iov_index].iov_len - current_position); - remaining = remaining - + remaining = remaining - (decoded_iov[iov_index].iov_len - current_position); temp_position = temp_position + (decoded_iov[iov_index].iov_len - current_position); @@ -436,20 +436,20 @@ int mca_io_ompio_non_contiguous_create_send_buf(int *bytes_sent, } - + int mca_io_ompio_get_datatype_size (ompi_datatype_t * datatype) { return datatype->super.size; } -int mca_io_ompio_decode_datatype_external (ompi_file_t *fp, +int mca_io_ompio_decode_datatype_external (ompi_file_t *fp, ompi_datatype_t *datatype, int count, void *buf, size_t *max_data, struct iovec **iov, uint32_t *iovec_count) -{ +{ int res; mca_io_ompio_data_t *data; @@ -464,7 +464,7 @@ int mca_io_ompio_decode_datatype_external (ompi_file_t *fp, max_data, iov, iovec_count); - if(res != OMPI_SUCCESS){ + if(res != OMPI_SUCCESS){ printf("Error in ompio decode datatype\n"); return res; } @@ -477,7 +477,7 @@ int mca_io_ompio_datatype_is_contiguous(ompi_datatype_t *datatype, { mca_io_ompio_data_t *data; mca_io_ompio_file_t *fh; - + data = (mca_io_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; @@ -504,7 +504,7 @@ int mca_io_ompio_set_aggregator_props (ompi_file_t *fp, num_aggregators, bytes_per_proc); if(res != OMPI_SUCCESS){ - printf("Error in aggregator props external\n"); + printf("Error in aggregator props external\n"); return res; } @@ -538,14 +538,14 @@ int mca_io_ompio_free_f_io_array (ompi_file_t *fp){ mca_io_ompio_data_t *data; mca_io_ompio_file_t *fh; - + data = (mca_io_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; - + if (NULL != fh->f_io_array) { free (fh->f_io_array); fh->f_io_array = NULL; } - + return OMPI_SUCCESS; } diff --git a/ompi/mca/io/ompio/io_ompio_nbc.h b/ompi/mca/io/ompio/io_ompio_nbc.h index 09a8c61b092..96f2a9622d4 100644 --- a/ompi/mca/io/ompio/io_ompio_nbc.h +++ b/ompi/mca/io/ompio/io_ompio_nbc.h @@ -3,28 +3,28 @@ #include "io_ompio.h" -/* Function declaration for get and utility method to use with libNBC +/* Function declaration for get and utility method to use with libNBC implementation in io_ompio_nbc.c */ OMPI_DECLSPEC int mca_io_ompio_get_fcoll_dynamic_num_io_procs (int *num_procs); OMPI_DECLSPEC int mca_io_ompio_get_fcoll_dynamic_cycle_buffer_size (int *cycle_buffer_size); OMPI_DECLSPEC int mca_io_ompio_get_fcoll_dynamic_constant_cbs (int *constant_cbs); OMPI_DECLSPEC int mca_io_ompio_get_f_aggregator_index (ompi_file_t *fh); -OMPI_DECLSPEC int mca_io_ompio_get_f_procs_in_group (ompi_file_t *fh, +OMPI_DECLSPEC int mca_io_ompio_get_f_procs_in_group (ompi_file_t *fh, int **value); OMPI_DECLSPEC int mca_io_ompio_get_f_procs_per_group (ompi_file_t *fh); -OMPI_DECLSPEC int mca_io_ompio_get_f_comm (ompi_file_t *fh, +OMPI_DECLSPEC int mca_io_ompio_get_f_comm (ompi_file_t *fh, ompi_communicator_t **value); -OMPI_DECLSPEC int mca_io_ompio_get_iov_type (ompi_file_t *fh, +OMPI_DECLSPEC int mca_io_ompio_get_iov_type (ompi_file_t *fh, ompi_datatype_t **value); OMPI_DECLSPEC signed int mca_io_ompio_get_f_flags (ompi_file_t *fh); OMPI_DECLSPEC int mca_io_ompio_get_fd (ompi_file_t *fh); OMPI_DECLSPEC int mca_io_ompio_get_f_num_of_io_entries (ompi_file_t *fh); -OMPI_DECLSPEC int mca_io_ompio_get_f_io_array (ompi_file_t *fh, +OMPI_DECLSPEC int mca_io_ompio_get_f_io_array (ompi_file_t *fh, mca_io_ompio_io_array_t **f_io_array); OMPI_DECLSPEC int mca_io_ompio_free_f_io_array (ompi_file_t *fh); OMPI_DECLSPEC int mca_io_ompio_get_datatype_size (ompi_datatype_t *datatype); -OMPI_DECLSPEC int mca_io_ompio_decode_datatype_external(ompi_file_t *fh, +OMPI_DECLSPEC int mca_io_ompio_decode_datatype_external(ompi_file_t *fh, struct ompi_datatype_t *datatype, int count, void *buf, @@ -34,25 +34,25 @@ OMPI_DECLSPEC int mca_io_ompio_decode_datatype_external(ompi_file_t *fh, OMPI_DECLSPEC int mca_io_ompio_generate_current_file_view (ompi_file_t *fp, size_t max_data, struct iovec **f_iov, - int *iov_count); + int *iov_count); OMPI_DECLSPEC int mca_io_ompio_set_aggregator_props (ompi_file_t *fh, int num_aggregators, size_t bytes_per_proc); OMPI_DECLSPEC int mca_io_ompio_generate_io_array (ompi_file_t *file, struct iovec *global_view, - int *tglobal_count, + int *tglobal_count, int *fview_count, - int *bytes_per_process, + int *bytes_per_process, char *global_buf, int *tblocks, - int *sorted, + int *sorted, int *nvalue, int *bytes_left, int *sorted_index); -OMPI_DECLSPEC int mca_io_ompio_datatype_is_contiguous (ompi_datatype_t *datatype, +OMPI_DECLSPEC int mca_io_ompio_datatype_is_contiguous (ompi_datatype_t *datatype, ompi_file_t *fp); -OMPI_DECLSPEC int mca_io_ompio_non_contiguous_create_send_buf (int *bytes_sent, - struct iovec *decoded_iov, +OMPI_DECLSPEC int mca_io_ompio_non_contiguous_create_send_buf (int *bytes_sent, + struct iovec *decoded_iov, char *send_buf); OMPI_DECLSPEC int mca_io_ompio_non_contiguous_create_receive_buf(int *bytes_received, struct iovec *decoded_iov, diff --git a/ompi/mca/io/ompio/io_ompio_request.c b/ompi/mca/io/ompio/io_ompio_request.c index 01e42277e46..0b5fe923010 100644 --- a/ompi/mca/io/ompio/io_ompio_request.c +++ b/ompi/mca/io/ompio/io_ompio_request.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -86,12 +86,12 @@ int mca_io_ompio_component_progress ( void ) if ( req->req_progress_fn(req) ) { completed++; ompi_request_complete (&req->req_ompi, 1); - /* The fbtl progress function is expected to set the - ** status elements + /* The fbtl progress function is expected to set the + ** status elements */ } } - + } return completed; diff --git a/ompi/mca/io/ompio/io_ompio_request.h b/ompi/mca/io/ompio/io_ompio_request.h index 7d990231861..620565ca48d 100644 --- a/ompi/mca/io/ompio/io_ompio_request.h +++ b/ompi/mca/io/ompio/io_ompio_request.h @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2014 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -57,7 +57,7 @@ typedef struct mca_ompio_request_t mca_ompio_request_t; OBJ_CLASS_DECLARATION(mca_ompio_request_t); #define GET_OMPIO_REQ_FROM_ITEM(ITEM) ((mca_ompio_request_t *)((char *)ITEM - offsetof(struct mca_ompio_request_t,req_item))) - + OMPI_DECLSPEC int mca_io_ompio_component_progress ( void); diff --git a/ompi/mca/io/romio314/ompi.patch b/ompi/mca/io/romio314/ompi.patch index 140ba249ddd..e10089fa8dc 100644 --- a/ompi/mca/io/romio314/ompi.patch +++ b/ompi/mca/io/romio314/ompi.patch @@ -52,7 +52,7 @@ index b9d4e25..69d7014 100644 # (C) 2011 by Argonne National Laboratory. # See COPYRIGHT in top-level directory. # - + +# OMPI: include a top level makefile with some options +include $(top_srcdir)/Makefile.options + @@ -60,12 +60,12 @@ index b9d4e25..69d7014 100644 ## 1) that ROMIO is being embedded within the MPI library, as in MPICH or Open ## MPI @@ -17,7 +36,6 @@ ACLOCAL_AMFLAGS = -I confdb - include_HEADERS = + include_HEADERS = nodist_include_HEADERS = - noinst_HEADERS = + noinst_HEADERS = -AM_CPPFLAGS = EXTRA_DIST = - SUFFIXES = + SUFFIXES = doc1_src_txt = @@ -46,7 +64,9 @@ AM_CPPFLAGS += $(MPI_H_INCLUDE) # handle the "include" directory here @@ -75,9 +75,9 @@ index b9d4e25..69d7014 100644 +# Open MPI: do not install mpio.h +noinst_HEADERS += include/mpio.h +noinst_HEADERS += include/io_romio_conv.h - + # ------------------------------------------------------------------------ - + @@ -63,8 +83,8 @@ EXTRA_DIST += autogen.sh if BUILD_ROMIO_EMBEDDED # Build a libtool convenience library that the enclosing MPI implementation can @@ -86,7 +86,7 @@ index b9d4e25..69d7014 100644 -libromio_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources) +noinst_LTLIBRARIES = libromio_dist.la +libromio_dist_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources) - + ## NOTE: ROMIO's old build system builds a bunch of _foo.o objects that contain ## PMPI_ implementations as well as calls to only other PMPI routines. In diff --git a/ompi/mca/io/romio32b1/romio/Makefile.options b/ompi/mca/io/romio32b1/romio/Makefile.options @@ -159,13 +159,13 @@ index 505d518..ffc05cb 100644 + adio/include/romioconf-undefs.h \ adio/include/mpiu_external32.h \ adio/include/hint_fns.h - + diff --git a/ompi/mca/io/romio32b1/romio/adio/common/ad_end.c b/ompi/mca/io/romio32b1/romio/adio/common/ad_end.c index ea4dfeb..066c65c 100644 --- a/ompi/mca/io/romio32b1/romio/adio/common/ad_end.c +++ b/ompi/mca/io/romio32b1/romio/adio/common/ad_end.c @@ -16,7 +16,12 @@ void ADIO_End(int *error_code) - + /* if a default errhandler was set on MPI_FILE_NULL then we need to ensure * that our reference to that errhandler is released */ +/* Open MPI: The call to PMPI_File_set_errhandler has to be done in romio/src/io_romio_file_open.c @@ -174,7 +174,7 @@ index ea4dfeb..066c65c 100644 +#if 0 PMPI_File_set_errhandler(MPI_FILE_NULL, MPI_ERRORS_RETURN); +#endif - + /* delete the flattened datatype list */ curr = ADIOI_Flatlist; diff --git a/ompi/mca/io/romio32b1/romio/adio/common/ad_iread_coll.c b/ompi/mca/io/romio32b1/romio/adio/common/ad_iread_coll.c @@ -184,7 +184,7 @@ index b1311e6..6ae4359 100644 @@ -16,6 +16,8 @@ #include "mpe.h" #endif - + +#ifdef HAVE_MPI_GREQUEST_EXTENSIONS + /* ADIOI_GEN_IreadStridedColl */ @@ -193,7 +193,7 @@ index b1311e6..6ae4359 100644 @@ -1315,3 +1317,4 @@ static int ADIOI_GEN_irc_wait_fn(int count, void **array_of_states, return errcode; } - + +#endif /* HAVE_MPI_GREQUEST_EXTENSIONS */ diff --git a/ompi/mca/io/romio32b1/romio/adio/common/ad_iwrite_coll.c b/ompi/mca/io/romio32b1/romio/adio/common/ad_iwrite_coll.c index b456ec4..9178a8d 100644 @@ -202,7 +202,7 @@ index b456ec4..9178a8d 100644 @@ -13,6 +13,8 @@ #include "mpe.h" #endif - + +#ifdef HAVE_MPI_GREQUEST_EXTENSIONS + /* ADIOI_GEN_IwriteStridedColl */ @@ -211,7 +211,7 @@ index b456ec4..9178a8d 100644 @@ -1539,3 +1541,4 @@ static int ADIOI_GEN_iwc_wait_fn(int count, void **array_of_states, return errcode; } - + +#endif /* HAVE_MPI_GREQUEST_EXTENSIONS */ diff --git a/ompi/mca/io/romio32b1/romio/adio/include/adioi.h b/ompi/mca/io/romio32b1/romio/adio/include/adioi.h index b20ca82..73dad0d 100644 @@ -242,7 +242,7 @@ index b20ca82..73dad0d 100644 +#define ADIOI_GEN_IwriteStridedColl NULL +#endif void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype - datatype, int file_ptr_type, ADIO_Offset + datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Offset **offset_list_ptr, ADIO_Offset diff --git a/ompi/mca/io/romio32b1/romio/adio/include/romioconf-undefs.h b/ompi/mca/io/romio32b1/romio/adio/include/romioconf-undefs.h new file mode 100644 @@ -307,7 +307,7 @@ index f975e1c..4d51a3e 100644 +# harmless and are left here solely for the sake of ease of future +# patching/importing. AC_PREREQ([2.63]) - + -m4_include([version.m4]) -dnl 2nd arg is intentionally underquoted +# Open MPI: Modifications to this file were done on an "let's do the @@ -327,15 +327,15 @@ index f975e1c..4d51a3e 100644 @@ -22,7 +31,7 @@ dnl scripts. AC_CONFIG_AUX_DIR([confdb]) AC_CONFIG_MACRO_DIR([confdb]) - + -AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability-recursive foreign 1.12.3 silent-rules subdir-objects]) +AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability-recursive foreign 1.12 silent-rules subdir-objects]) AM_MAINTAINER_MODE([enable]) - + dnl must come before LT_INIT, which AC_REQUIREs AC_PROG_CC @@ -43,12 +52,15 @@ if test -n "$CONFIGURE_ARGS" ; then fi - + AC_CONFIG_HEADER(adio/include/romioconf.h) +# Open MPI: modified AH_TOP AH_TOP([/* @@ -352,7 +352,7 @@ index f975e1c..4d51a3e 100644 @@ -58,9 +70,37 @@ AH_BOTTOM([ #endif /* !defined(ROMIOCONF_H_INCLUDED) */ ]) - + +# Open MPI: this configure script doesn't seem to define these +# anywhere, so just do them manually here because "we know better" +# (i.e., Open MPI can be hard-wired to these values). @@ -392,7 +392,7 @@ index f975e1c..4d51a3e 100644 @@ -95,6 +135,10 @@ AC_ARG_VAR([FROM_OMPI],[set to "yes" if building ROMIO inside of Open MPI]) FROM_OMPI=${FROM_OMPI:-no} if test "$FROM_OMPI" = 1 ; then FROM_OMPI=yes ; fi - + +AC_ARG_VAR([FROM_OMPI],[set to "yes" if building ROMIO inside of Open MPI]) +FROM_OMPI=${FROM_OMPI:-no} +if test "$FROM_OMPI" = 1 ; then FROM_OMPI=yes ; fi @@ -448,13 +448,13 @@ index f975e1c..4d51a3e 100644 +#if test -n "$with_mpi"; then +# CC=$MPI/bin/mpicc +#fi - + # start with the set of file systems that the user asked for # FILE_SYSTEM=$with_file_system @@ -259,6 +316,7 @@ top_build_dir=`pwd` # used in romioinstall AC_SUBST(top_build_dir) - + +# Open MPI: these shouldn't be needed with AM # # Create the "autoconf" style directory names... @@ -463,7 +463,7 @@ index f975e1c..4d51a3e 100644 fi if test $DEBUG = "yes" ; then CFLAGS="$CFLAGS $C_DEBUG_FLAG" --else +-else - CFLAGS="$CFLAGS $C_OPT_FLAG" +# Open MPI: don't add optflags - they'll come from the top-level configure +#else @@ -478,18 +478,18 @@ index f975e1c..4d51a3e 100644 -AC_C_INLINE +# Open MPI: We already do this test top-level +dnl AC_C_INLINE - + AC_TYPE_SIZE_T AC_TYPE_SSIZE_T @@ -651,7 +711,9 @@ AM_CONDITIONAL([BUILD_MPIO_ERRHAN],[false]) - + # if we don't have weak symbol support, we must build a separate convenience # library in order to provide the "PMPI_" symbols -AM_CONDITIONAL([BUILD_PROFILING_LIB],[test "x$HAVE_WEAK_SYMBOLS" = "x0"]) +# Open MPI: Disable the profile library +#AM_CONDITIONAL([BUILD_PROFILING_LIB],[test "x$HAVE_WEAK_SYMBOLS" = "x0"]) +AM_CONDITIONAL([BUILD_PROFILING_LIB],[false]) - + # weird: we have conflated "buid ROMIO's versions of the fortran bindings" and # "build ROMIO"s fortran I/O tests". Of course the common situaiton is that we @@ -1565,8 +1627,10 @@ if test $FROM_OMPI = yes ; then @@ -516,7 +516,7 @@ index f975e1c..4d51a3e 100644 @@ -1751,9 +1815,22 @@ AC_CHECK_HEADERS(unistd.h, echo "setting SYSDEP_INC to $SYSDEP_INC" AC_SUBST(SYSDEP_INC) - + +# Open MPI: use the exact same restrict test that we use in the +# upper-level Open MPI configure script so that we always get the same +# #define for "restrict" (there are a small number of files that will @@ -524,7 +524,7 @@ index f975e1c..4d51a3e 100644 +# need to #defines to agree). AC_C_RESTRICT PAC_C_GNU_ATTRIBUTE - + +# Open MPI: we need libtool +AM_PROG_LIBTOOL + @@ -535,11 +535,11 @@ index f975e1c..4d51a3e 100644 + # support gcov test coverage information PAC_ENABLE_COVERAGE - + @@ -1765,23 +1842,29 @@ echo "setting CFLAGS to $CFLAGS" echo "setting USER_CFLAGS to $USER_CFLAGS" echo "setting USER_FFLAGS to $USER_FFLAGS" - + +# Open MPI: Add on CFLAGS that we figured out up top. They have +# makefile macros in them, so we couldn't substitute them until now. +CFLAGS="$CFLAGS $OMPI_CFLAGS "'-I$(top_builddir)/include' @@ -611,8 +611,8 @@ index f975e1c..4d51a3e 100644 +#if test ! -d mpi2-other ; then mkdir mpi2-other ; fi +#if test ! -d mpi-io ; then mkdir mpi-io ; fi +#if test ! -d mpi-io/glue ; then mkdir mpi-io/glue ; fi - - # Create makefiles for all of the adio devices. Only the ones that + + # Create makefiles for all of the adio devices. Only the ones that # are active will be called by the top level ROMIO make @@ -1850,8 +1934,6 @@ AC_OUTPUT_COMMANDS([chmod 755 util/romioinstall test/runtests]) AC_CONFIG_FILES([ @@ -642,27 +642,27 @@ index f975e1c..4d51a3e 100644 +# mpi2-other/array/fortran/Makefile +# include/mpiof.h AC_OUTPUT - + dnl PAC_SUBDIR_CACHE_CLEANUP diff --git a/ompi/mca/io/romio32b1/romio/doc/users-guide.tex b/ompi/mca/io/romio32b1/romio/doc/users-guide.tex index b33d483..3715431 100644 --- a/ompi/mca/io/romio32b1/romio/doc/users-guide.tex +++ b/ompi/mca/io/romio32b1/romio/doc/users-guide.tex @@ -807,13 +807,19 @@ to include the file {\tt mpio.h} for C or {\tt mpiof.h} for Fortran in - your MPI-IO program. - + your MPI-IO program. + Note that on HP machines running HPUX and on NEC SX-4, you need to -compile Fortran programs with {\tt mpifort}. +compile Fortran programs with {\tt mpifort}, because {\tt mpif77} does +not support 8-byte integers. - + With MPICH, HP MPI, or NEC MPI, you can compile MPI-IO programs as \\ \hspace*{.4in} {\tt mpicc foo.c}\\ or \\ +\hspace*{.4in} {\tt mpif77 foo.f }\\ +or\\ \hspace*{.4in} {\tt mpifort foo.f}\\ - + +As mentioned above, mpifort is preferred over mpif77 on HPUX and NEC +because the f77 compilers on those machines do not support 8-byte integers. + @@ -671,12 +671,12 @@ index b33d483..3715431 100644 or \\ @@ -863,7 +869,8 @@ file systems because they don't support {\tt fcntl} file locks, and ROMIO uses that feature to implement shared file pointers. - + \item On HP machines running HPUX and on NEC SX-4, you need to compile -Fortran programs with {\tt mpifort}. +Fortran programs with {\tt mpifort} instead of {\tt mpif77}, because +the {\tt f77} compilers on these machines don't support 8-byte integers. - + \item The file-open mode {\tt MPI\_MODE\_EXCL} does not work on Intel PFS file system, due to a bug in PFS. diff --git a/ompi/mca/io/romio32b1/romio/include/io_romio_conv.h b/ompi/mca/io/romio32b1/romio/include/io_romio_conv.h @@ -815,7 +815,7 @@ index 2238f4b..8d1314c 100644 +++ b/ompi/mca/io/romio32b1/romio/include/mpio.h.in @@ -11,6 +11,16 @@ #define MPIO_INCLUDE - + #include "mpi.h" +/* Open MPI: We need to rename almost all of these functions, as well + a the types to be names that conform to the prefix rule */ @@ -827,7 +827,7 @@ index 2238f4b..8d1314c 100644 +#define MPIIMPL_HAVE_MPI_TYPE_CREATE_DARRAY 1 +#define MPIIMPL_HAVE_MPI_COMBINER_DUP 1 +#define MPICH_ATTR_POINTER_WITH_TYPE_TAG(x,y) - + #if defined(__cplusplus) extern "C" { @@ -279,9 +289,12 @@ int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsi @@ -841,7 +841,7 @@ index 2238f4b..8d1314c 100644 MPI_Fint MPI_File_c2f(MPI_File file); - +#endif - + #ifndef HAVE_MPI_GREQUEST /* The following functions are required if generalized requests are not @@ -329,15 +342,21 @@ int MPI_Info_free(MPI_Info *info); @@ -854,22 +854,22 @@ index 2238f4b..8d1314c 100644 MPI_Info MPI_Info_f2c(MPI_Fint info); #endif +#endif - + #endif /* HAVE_PRAGMA_HP_SEC_DEF */ - - + + /**************** BINDINGS FOR THE PROFILING INTERFACE ***************/ - + +/* Open MPI: We don't want any of the profiling layer */ +#if 0 + - + /* Section 9.2 */ int PMPI_File_open(MPI_Comm, const char *, int, MPI_Info, MPI_File *); @@ -528,6 +547,8 @@ MPI_Fint PMPI_Info_c2f(MPI_Info); MPI_Info PMPI_Info_f2c(MPI_Fint); #endif - + +#endif /* Open MPI: We don't want any of the profiling layer */ + #if defined(__cplusplus) @@ -916,7 +916,7 @@ index 520f206..160b661 100644 error_code = PMPI_File_set_errhandler(*fh, MPI_ERRORS_RETURN); if (error_code != MPI_SUCCESS) goto fn_fail; +#endif - + ADIO_Close(adio_fh, &error_code); MPIO_File_free(fh); diff --git a/ompi/mca/io/romio32b1/romio/mpi-io/glue/Makefile.mk b/ompi/mca/io/romio32b1/romio/mpi-io/glue/Makefile.mk @@ -924,11 +924,11 @@ index 05954a1..66f7f9e 100644 --- a/ompi/mca/io/romio32b1/romio/mpi-io/glue/Makefile.mk +++ b/ompi/mca/io/romio32b1/romio/mpi-io/glue/Makefile.mk @@ -7,6 +7,7 @@ - + include $(top_srcdir)/mpi-io/glue/default/Makefile.mk include $(top_srcdir)/mpi-io/glue/mpich/Makefile.mk +include $(top_srcdir)/mpi-io/glue/openmpi/Makefile.mk - + if !BUILD_ROMIO_EMBEDDED romio_other_sources += \ diff --git a/ompi/mca/io/romio32b1/romio/mpi-io/iread_all.c b/ompi/mca/io/romio32b1/romio/mpi-io/iread_all.c @@ -938,12 +938,12 @@ index ba36161..32a48b8 100644 @@ -26,7 +26,7 @@ int MPIX_File_iread_all(MPI_File fh, void *buf, int count, MPI_Datatype datatype #include "mpioprof.h" #endif - + -#ifdef HAVE_MPI_GREQUEST +#if HAVE_MPI_GREQUEST #include "mpiu_greq.h" #endif - + diff --git a/ompi/mca/io/romio32b1/romio/mpi-io/mpioprof.h b/ompi/mca/io/romio32b1/romio/mpi-io/mpioprof.h index 15654ac..63dffd8 100644 --- a/ompi/mca/io/romio32b1/romio/mpi-io/mpioprof.h @@ -951,7 +951,7 @@ index 15654ac..63dffd8 100644 @@ -10,6 +10,15 @@ building the profiling interface */ - + +/* + * Open MPI: Unfortunately, ROMIO doesn't seem to be able to build + * without a profiling interface, but we don't want a profiling @@ -962,10 +962,10 @@ index 15654ac..63dffd8 100644 + */ +#if 0 #ifdef MPIO_BUILD_PROFILING - + #undef MPI_File_open @@ -212,3 +221,4 @@ #define MPIX_Grequest_class_create PMPIX_Grequest_class_create - + #endif +#endif diff --git a/ompi/mca/io/romio314/romio/.codingcheck b/ompi/mca/io/romio314/romio/.codingcheck index 9b52b35ce42..c8d93615a22 100644 --- a/ompi/mca/io/romio314/romio/.codingcheck +++ b/ompi/mca/io/romio314/romio/.codingcheck @@ -1,9 +1,9 @@ # Here are names that at least at one point were used within ROMIO. -# We should look at these and decide which we wish to allow and which +# We should look at these and decide which we wish to allow and which # should be replaced with something more ROMIO-specific. -%romioDefines = ( 'ROMIO_[A-Za-z0-9_]+' => romio, - 'PROFILE' => romio, - 'PRINT_ERR_MSG' => romio, +%romioDefines = ( 'ROMIO_[A-Za-z0-9_]+' => romio, + 'PROFILE' => romio, + 'PRINT_ERR_MSG' => romio, 'HPUX' => romio, 'SPPUX'=> romio, 'SX4'=> romio, @@ -51,5 +51,5 @@ if (defined(&PushDefinesNames)) { &PushDefinesNames( "romioDefines", "tree", "add" ); } - + 1; diff --git a/ompi/mca/io/romio314/romio/COPYRIGHT b/ompi/mca/io/romio314/romio/COPYRIGHT index 609bcfa4e84..a058206a474 100644 --- a/ompi/mca/io/romio314/romio/COPYRIGHT +++ b/ompi/mca/io/romio314/romio/COPYRIGHT @@ -7,11 +7,11 @@ all source listings of the code. Copyright (C) 1997 University of Chicago Permission is hereby granted to use, reproduce, prepare derivative -works, and to redistribute to others. +works, and to redistribute to others. -The University of Chicago makes no representations as to the suitability, -operability, accuracy, or correctness of this software for any purpose. -It is provided "as is" without express or implied warranty. +The University of Chicago makes no representations as to the suitability, +operability, accuracy, or correctness of this software for any purpose. +It is provided "as is" without express or implied warranty. This software was authored by: Rajeev Thakur: (630) 252-1682; thakur@mcs.anl.gov @@ -26,7 +26,7 @@ Government Contract and are subject to the following license: the Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this computer software to reproduce, prepare derivative works, and perform publicly -and display publicly. +and display publicly. DISCLAIMER @@ -37,5 +37,5 @@ of their employees, makes any warranty express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately -owned rights. +owned rights. diff --git a/ompi/mca/io/romio314/romio/Makefile.am b/ompi/mca/io/romio314/romio/Makefile.am index 69d70142df8..c0c226f6ff5 100644 --- a/ompi/mca/io/romio314/romio/Makefile.am +++ b/ompi/mca/io/romio314/romio/Makefile.am @@ -33,11 +33,11 @@ include $(top_srcdir)/Makefile.options ACLOCAL_AMFLAGS = -I confdb # empty variable initializations so that later code can append (+=) -include_HEADERS = +include_HEADERS = nodist_include_HEADERS = -noinst_HEADERS = +noinst_HEADERS = EXTRA_DIST = -SUFFIXES = +SUFFIXES = doc1_src_txt = # ------------------------------------------------------------------------ @@ -47,14 +47,14 @@ doc1_src_txt = # In MPICH these will have an MPI_ and a PMPI_ version. Other implementations # (like OMPI) only want these to be MPI_ routines, possibly with some # name-shifting prefix. -romio_mpi_sources = +romio_mpi_sources = # regular old source files that implement ROMIO, such as ADIO code romio_other_sources = # code that may need to be "up" called from the MPI library and/or is # MPI-implementation-specific in some way -glue_sources = +glue_sources = # ------------------------------------------------------------------------ # when building under MPICH we must be able to find mpi.h @@ -102,7 +102,7 @@ if BUILD_PROFILING_LIB # won't work very well the other way around. noinst_LTLIBRARIES += libpromio.la libpromio_la_SOURCES = $(romio_mpi_sources) -libpromio_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPIO_BUILD_PROFILING +libpromio_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPIO_BUILD_PROFILING endif BUILD_PROFILING_LIB else !BUILD_ROMIO_EMBEDDED diff --git a/ompi/mca/io/romio314/romio/README b/ompi/mca/io/romio314/romio/README index a6fb25a09a5..bee37ec6c88 100644 --- a/ompi/mca/io/romio314/romio/README +++ b/ompi/mca/io/romio314/romio/README @@ -23,11 +23,11 @@ Major Changes in this version: PanFS allows users to specify the layout of a file at file-creation time. Layout information includes the number of StorageBlades (SB) - across which the data is stored, the number of SBs across which a - parity stripe is written, and the number of consecutive stripes that - are placed on the same set of SBs. The panfs_layout_* hints are only + across which the data is stored, the number of SBs across which a + parity stripe is written, and the number of consecutive stripes that + are placed on the same set of SBs. The panfs_layout_* hints are only used if supplied at file-creation time. - + panfs_layout_type - Specifies the layout of a file: 2 = RAID0 3 = RAID5 Parity Stripes @@ -35,37 +35,37 @@ Major Changes in this version: panfs_layout_total_num_comps - The total number of StorageBlades a file is striped across. panfs_layout_parity_stripe_width - If the layout type is RAID5 Parity - Stripes, this hint specifies the + Stripes, this hint specifies the number of StorageBlades in a parity stripe. panfs_layout_parity_stripe_depth - If the layout type is RAID5 Parity Stripes, this hint specifies the - number of contiguous parity stripes written + number of contiguous parity stripes written across the same set of SBs. - panfs_layout_visit_policy - If the layout type is RAID5 Parity Stripes, - the policy used to determine the parity + panfs_layout_visit_policy - If the layout type is RAID5 Parity Stripes, + the policy used to determine the parity stripe a given file offset is written to: 1 = Round Robin - PanFS supports the "concurrent write" (CW) mode, where groups of cooperating - clients can disable the PanFS consistency mechanisms and use their own - consistency protocol. Clients participating in concurrent write mode use - application specific information to improve performance while maintaining - file consistency. All clients accessing the file(s) must enable concurrent - write mode. If any client does not enable concurrent write mode, then the - PanFS consistency protocol will be invoked. Once a file is opened in CW mode - on a machine, attempts to open a file in non-CW mode will fail with - EACCES. If a file is already opened in non-CW mode, attempts to open - the file in CW mode will fail with EACCES. The following hint is + PanFS supports the "concurrent write" (CW) mode, where groups of cooperating + clients can disable the PanFS consistency mechanisms and use their own + consistency protocol. Clients participating in concurrent write mode use + application specific information to improve performance while maintaining + file consistency. All clients accessing the file(s) must enable concurrent + write mode. If any client does not enable concurrent write mode, then the + PanFS consistency protocol will be invoked. Once a file is opened in CW mode + on a machine, attempts to open a file in non-CW mode will fail with + EACCES. If a file is already opened in non-CW mode, attempts to open + the file in CW mode will fail with EACCES. The following hint is used to enable concurrent write mode. - panfs_concurrent_write - If set to 1 at file open time, the file - is opened using the PanFS concurrent write + panfs_concurrent_write - If set to 1 at file open time, the file + is opened using the PanFS concurrent write mode flag. Concurrent write mode is not a persistent attribute of the file. Below is an example PanFS layout using the following parameters: - + - panfs_layout_type = 3 - panfs_layout_total_num_comps = 100 - panfs_layout_parity_stripe_width = 10 @@ -89,7 +89,7 @@ Major Changes in this version: ... * Initial support for the Globus GridFTP filesystem. Work contributed by Troy - Baer (troy@osc.edu). + Baer (troy@osc.edu). Major Changes in Version 1.2.5: ------------------------------ @@ -108,7 +108,7 @@ Major Changes in Version 1.2.5: Major Changes in Version 1.2.4: ------------------------------ -* Added section describing ROMIO MPI_FILE_SYNC and MPI_FILE_CLOSE behavior to +* Added section describing ROMIO MPI_FILE_SYNC and MPI_FILE_CLOSE behavior to User's Guide * Bug removed from PVFS ADIO implementation regarding resize operations @@ -136,7 +136,7 @@ Major Changes in Version 1.2.3: Major Changes in Version 1.0.3: ------------------------------- -* When used with MPICH 1.2.1, the MPI-IO functions return proper error codes +* When used with MPICH 1.2.1, the MPI-IO functions return proper error codes and classes, and the status object is filled in. * On SGI's XFS file system, ROMIO can use direct I/O even if the @@ -144,12 +144,12 @@ Major Changes in Version 1.0.3: direct I/O. ROMIO does this by doing part of the request with buffered I/O (until all the restrictions are met) and doing the rest with direct I/O. (This feature hasn't been tested rigorously. Please - check for errors.) + check for errors.) By default, ROMIO will use only buffered I/O. Direct I/O can be enabled either by setting the environment variables MPIO_DIRECT_READ and/or MPIO_DIRECT_WRITE to TRUE, or on a per-file basis by using - the info keys "direct_read" and "direct_write". + the info keys "direct_read" and "direct_write". Direct I/O will result in higher performance only if you are accessing a high-bandwidth disk system. Otherwise, buffered I/O is @@ -166,51 +166,51 @@ Major Changes Version 1.0.2: components of the MPI I/O chapter not yet implemented are file interoperability and error handling. -* Added support for using "direct I/O" on SGI's XFS file system. +* Added support for using "direct I/O" on SGI's XFS file system. Direct I/O is an optional feature of XFS in which data is moved - directly between the user's buffer and the storage devices, bypassing - the file-system cache. This can improve performance significantly on + directly between the user's buffer and the storage devices, bypassing + the file-system cache. This can improve performance significantly on systems with high disk bandwidth. Without high disk bandwidth, regular I/O (that uses the file-system cache) perfoms better. ROMIO, therefore, does not use direct I/O by default. The user can turn on direct I/O (separately for reading and writing) either by - using environment variables or by using MPI's hints mechanism (info). + using environment variables or by using MPI's hints mechanism (info). To use the environment-variables method, do setenv MPIO_DIRECT_READ TRUE setenv MPIO_DIRECT_WRITE TRUE - To use the hints method, the two keys are "direct_read" and "direct_write". - By default their values are "false". To turn on direct I/O, set the values + To use the hints method, the two keys are "direct_read" and "direct_write". + By default their values are "false". To turn on direct I/O, set the values to "true". The environment variables have priority over the info keys. In other words, if the environment variables are set to TRUE, direct I/O - will be used even if the info keys say "false", and vice versa. - Note that direct I/O must be turned on separately for reading + will be used even if the info keys say "false", and vice versa. + Note that direct I/O must be turned on separately for reading and writing. The environment-variables method assumes that the environment variables can be read by each process in the MPI job. This is not guaranteed by the MPI Standard, but it works with SGI's MPI and the ch_shmem device of MPICH. -* Added support (new ADIO device, ad_pvfs) for the PVFS parallel +* Added support (new ADIO device, ad_pvfs) for the PVFS parallel file system for Linux clusters, developed at Clemson University (see http://www.parl.clemson.edu/pvfs ). To use it, you must first install - PVFS and then when configuring ROMIO, specify "-file_system=pvfs" in + PVFS and then when configuring ROMIO, specify "-file_system=pvfs" in addition to any other options to "configure". (As usual, you can configure - for multiple file systems by using "+"; for example, - "-file_system=pvfs+ufs+nfs".) You will need to specify the path - to the PVFS include files via the "-cflags" option to configure, + for multiple file systems by using "+"; for example, + "-file_system=pvfs+ufs+nfs".) You will need to specify the path + to the PVFS include files via the "-cflags" option to configure, for example, "configure -cflags=-I/usr/pvfs/include". You will also need to specify the full path name of the PVFS library. - The best way to do this is via the "-lib" option to MPICH's - configure script (assuming you are using ROMIO from within MPICH). + The best way to do this is via the "-lib" option to MPICH's + configure script (assuming you are using ROMIO from within MPICH). * Uses weak symbols (where available) for building the profiling version, i.e., the PMPI routines. As a result, the size of the library is reduced - considerably. + considerably. * The Makefiles use "virtual paths" if supported by the make utility. GNU make supports it, for example. This feature allows you to untar the distribution in some directory, say a slow NFS directory, - and compile the library (the .o files) in another + and compile the library (the .o files) in another directory, say on a faster local disk. For example, if the tar file has been untarred in an NFS directory called /home/thakur/romio, one can compile it in a different directory, say /tmp/thakur, as follows: @@ -228,8 +228,8 @@ Major Changes Version 1.0.2: * This version is included in MPICH 1.2.0. If you are using MPICH, you need not download ROMIO separately; it gets built as part of MPICH. - The previous version of ROMIO is included in LAM, HP MPI, SGI MPI, and - NEC MPI. NEC has also implemented the MPI-IO functions missing + The previous version of ROMIO is included in LAM, HP MPI, SGI MPI, and + NEC MPI. NEC has also implemented the MPI-IO functions missing in ROMIO, and therefore NEC MPI has a complete implementation of MPI-IO. @@ -242,10 +242,10 @@ Major Changes in Version 1.0.1: * Added support for NEC SX-4 and created a new device ad_sfs for NEC SFS file system. -* New devices ad_hfs for HP/Convex HFS file system and ad_xfs for +* New devices ad_hfs for HP/Convex HFS file system and ad_xfs for SGI XFS file system. -* Users no longer need to prefix the filename with the type of +* Users no longer need to prefix the filename with the type of file system; ROMIO determines the file-system type on its own. * Added support for 64-bit file sizes on IBM PIOFS, SGI XFS, @@ -254,27 +254,27 @@ Major Changes in Version 1.0.1: * MPI_Offset is an 8-byte integer on machines that support 8-byte integers. It is of type "long long" in C and "integer*8" in Fortran. With a Fortran 90 compiler, you can use either integer*8 or - integer(kind=MPI_OFFSET_KIND). - If you printf an MPI_Offset in C, remember to use %lld - or %ld as required by your compiler. (See what is used in the test + integer(kind=MPI_OFFSET_KIND). + If you printf an MPI_Offset in C, remember to use %lld + or %ld as required by your compiler. (See what is used in the test program romio/test/misc.c.) -* On some machines, ROMIO detects at configure time that "long long" is +* On some machines, ROMIO detects at configure time that "long long" is either not supported by the C compiler or it doesn't work properly. In such cases, configure sets MPI_Offset to long in C and integer in Fortran. This happens on Intel Paragon, Sun4, and FreeBSD. -* Added support for passing hints to the implementation via the MPI_Info +* Added support for passing hints to the implementation via the MPI_Info parameter. ROMIO understands the following hints (keys in MPI_Info object): - /* on all file systems */ + /* on all file systems */ cb_buffer_size - buffer size for collective I/O cb_nodes - no. of processes that actually perform I/O in collective I/O ind_rd_buffer_size - buffer size for data sieving in independent reads /* on all file systems except IBM PIOFS */ ind_wr_buffer_size - buffer size for data sieving in independent writes - /* ind_wr_buffer_size is ignored on PIOFS because data sieving + /* ind_wr_buffer_size is ignored on PIOFS because data sieving cannot be done for writes since PIOFS doesn't support file locking */ /* on Intel PFS and IBM PIOFS only. These hints are understood only if @@ -285,16 +285,16 @@ Major Changes in Version 1.0.1: striping (between 0 and (striping_factor-1)) /* on Intel PFS only. */ - pfs_svr_buf - turn on or off PFS server buffering by setting the value + pfs_svr_buf - turn on or off PFS server buffering by setting the value to "true" or "false", case-sensitive. - + If ROMIO doesn't understand a hint, or if the value is invalid, the hint - will be ignored. The values of hints being used by ROMIO at any time + will be ignored. The values of hints being used by ROMIO at any time can be obtained via MPI_File_get_info. -General Information +General Information ------------------- ROMIO is a high-performance, portable implementation of MPI-IO (the @@ -311,7 +311,7 @@ accessing arrays stored in files. The functions MPI_File_f2c and MPI_File_c2f (Sec. 4.12.4) are also implemented. C, Fortran, and profiling interfaces are provided for all functions -that have been implemented. +that have been implemented. Please read the limitations of this version of ROMIO that are listed below (e.g., MPIO_Request object, restriction to homogeneous @@ -326,7 +326,7 @@ SFS, PVFS, NFS, and any Unix file system (UFS). This version of ROMIO is included in MPICH 1.2.3; an earlier version is included in at least the following MPI implementations: LAM, HP -MPI, SGI MPI, and NEC MPI. +MPI, SGI MPI, and NEC MPI. Note that proper I/O error codes and classes are returned and the status variable is filled only when used with MPICH 1.2.1 or later. @@ -358,16 +358,16 @@ performance, but it is necessary for correct behavior. The following are some instructions we received from Ian Wells of HP for setting the noac option on NFS. We have not tried them -ourselves. We are including them here because you may find +ourselves. We are including them here because you may find them useful. Note that some of the steps may be specific to HP systems, and you may need root permission to execute some of the -commands. - +commands. + >1. first confirm you are running nfs version 3 > >rpcnfo -p `hostname` | grep nfs > - >ie + >ie > goedel >rpcinfo -p goedel | grep nfs > 100003 2 udp 2049 nfs > 100003 3 udp 2049 nfs @@ -379,11 +379,11 @@ commands. > Here is an example of a correct fstab entry for /epm1: > > ie grep epm1 /etc/fstab - > + > > ROOOOT 11>grep epm1 /etc/fstab > gershwin:/epm1 /rmt/gershwin/epm1 nfs bg,intr,noac 0 0 > - > if the noac option is not present, add it + > if the noac option is not present, add it > and then remount this directory > on each of the machines that will be used to share MPIO files > @@ -394,7 +394,7 @@ commands. > >3. Confirm that the directory is mounted noac: > - >ROOOOT >grep gershwin /etc/mnttab + >ROOOOT >grep gershwin /etc/mnttab >gershwin:/epm1 /rmt/gershwin/epm1 nfs >noac,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0 0 0 899911504 @@ -424,8 +424,8 @@ THEN make Some example programs and a Makefile are provided in the romio/test directory. -Run the examples the way you would run any MPI program. Each program takes -the filename as a command-line argument "-fname filename". +Run the examples the way you would run any MPI program. Each program takes +the filename as a command-line argument "-fname filename". The configure script by default configures ROMIO for the file systems most likely to be used on the given machine. If you wish, you can @@ -440,7 +440,7 @@ For the entire list of options to configure do ./configure -h | more After building a specific version as above, you can install it in a -particular directory with +particular directory with make install PREFIX=/usr/local/romio (or whatever directory you like) @@ -448,14 +448,14 @@ or just make install (if you used -prefix at configure time) -If you intend to leave ROMIO where you built it, you should NOT install it -(install is used only to move the necessary parts of a built ROMIO to +If you intend to leave ROMIO where you built it, you should NOT install it +(install is used only to move the necessary parts of a built ROMIO to another location). The installed copy will have the include files, libraries, man pages, and a few other odds and ends, but not the whole source tree. It will have a test directory for testing the installation and a location-independent Makefile built during installation, which users can copy and modify to compile and link -against the installed copy. +against the installed copy. To rebuild ROMIO with a different set of configure options, do @@ -471,7 +471,7 @@ Testing ROMIO To test if the installation works, do - make testing + make testing in the romio/test directory. This calls a script that runs the test programs and compares the results with what they should be. By @@ -489,15 +489,15 @@ Compiling and Running MPI-IO Programs If ROMIO is not already included in the MPI implementation, you need to include the file mpio.h for C or mpiof.h for Fortran in your MPI-IO -program. +program. Note that on HP machines running HPUX and on NEC SX-4, you need to compile Fortran programs with mpifort, because the f77 compilers on -these machines don't support 8-byte integers. +these machines don't support 8-byte integers. -With MPICH, HP MPI, or NEC MPI, you can compile MPI-IO programs as +With MPICH, HP MPI, or NEC MPI, you can compile MPI-IO programs as mpicc foo.c -or +or mpif77 foo.f or mpifort foo.f @@ -505,14 +505,14 @@ or As mentioned above, mpifort is preferred over mpif77 on HPUX and NEC because the f77 compilers on those machines do not support 8-byte integers. -With SGI MPI, you can compile MPI-IO programs as +With SGI MPI, you can compile MPI-IO programs as cc foo.c -lmpi or f77 foo.f -lmpi or f90 foo.f -lmpi -With LAM, you can compile MPI-IO programs as +With LAM, you can compile MPI-IO programs as hcc foo.c -lmpi or hf77 foo.f -lmpi @@ -530,7 +530,7 @@ an SGI machine, make sure that you use MPICH's mpirun and not SGI's mpirun. The Makefile in the romio/test directory illustrates how to compile -and link MPI-IO programs. +and link MPI-IO programs. @@ -552,7 +552,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status); int MPIO_Wait(MPIO_Request *request, MPI_Status *status); The usual functions MPI_Test, MPI_Wait, MPI_Testany, etc., will not -work for nonblocking I/O. +work for nonblocking I/O. * This version works only on a homogeneous cluster of machines, and only the "native" file data representation is supported. @@ -582,11 +582,11 @@ message from SGI MPI: ``MPI has run out of internal datatype entries. Please set the environment variable MPI_TYPE_MAX for additional space.'' If you get this error message, add this line to your .cshrc file: - setenv MPI_TYPE_MAX 65536 + setenv MPI_TYPE_MAX 65536 Use a larger number if you still get the error message. * If a Fortran program uses a file handle created using ROMIO's C -interface, or vice-versa, you must use the functions MPI_File_c2f +interface, or vice-versa, you must use the functions MPI_File_c2f or MPI_File_f2c. Such a situation occurs, for example, if a Fortran program uses an I/O library written in C with MPI-IO calls. Similar functions MPIO_Request_f2c and @@ -595,12 +595,12 @@ MPIO_Request_c2f are also provided. * For Fortran programs on the Intel Paragon, you may need to provide the complete path to mpif.h in the include statement, e.g., include '/usr/local/mpich/include/mpif.h' -instead of +instead of include 'mpif.h' This is because the -I option to the Paragon Fortran compiler if77 -doesn't work correctly. It always looks in the default directories first +doesn't work correctly. It always looks in the default directories first and, therefore, picks up Intel's mpif.h, which is actually the -mpif.h of an older version of MPICH. +mpif.h of an older version of MPICH. diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.c index 4be147f49a5..ce80672dc08 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.c @@ -7,8 +7,8 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (C) 2001 University of Chicago. +/* + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_gpfs.h" diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.h b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.h index 81fb076c339..1bff707491d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs.h @@ -7,8 +7,8 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_aggrs.h b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_aggrs.h index 1b6215e576f..cd8dce90614 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_aggrs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_aggrs.h @@ -1,86 +1,86 @@ -/* ---------------------------------------------------------------- */ -/* (C)Copyright IBM Corp. 2007, 2008 */ -/* ---------------------------------------------------------------- */ -/** - * \file ad_gpfs_aggrs.h - * \brief ??? - */ - -/* - * File: ad_gpfs_aggrs.h - * - * Declares functions optimized specifically for GPFS parallel I/O solution. - * - */ - -#ifndef AD_GPFS_AGGRS_H_ -#define AD_GPFS_AGGRS_H_ - -#include "adio.h" -#include +/* ---------------------------------------------------------------- */ +/* (C)Copyright IBM Corp. 2007, 2008 */ +/* ---------------------------------------------------------------- */ +/** + * \file ad_gpfs_aggrs.h + * \brief ??? + */ + +/* + * File: ad_gpfs_aggrs.h + * + * Declares functions optimized specifically for GPFS parallel I/O solution. + * + */ + +#ifndef AD_GPFS_AGGRS_H_ +#define AD_GPFS_AGGRS_H_ + +#include "adio.h" +#include #ifdef HAVE_GPFS_H #include #endif - - - /* overriding ADIOI_Calc_file_domains() to apply 'aligned file domain partitioning'. */ - void ADIOI_GPFS_Calc_file_domains(ADIO_File fd, - ADIO_Offset *st_offsets, - ADIO_Offset *end_offsets, - int nprocs, - int nprocs_for_coll, - ADIO_Offset *min_st_offset_ptr, - ADIO_Offset **fd_start_ptr, - ADIO_Offset **fd_end_ptr, - ADIO_Offset *fd_size_ptr, - void *fs_ptr); - - /* overriding ADIOI_Calc_aggregator() for the default implementation is specific for - static file domain partitioning */ - int ADIOI_GPFS_Calc_aggregator(ADIO_File fd, - ADIO_Offset off, - ADIO_Offset min_off, - ADIO_Offset *len, - ADIO_Offset fd_size, - ADIO_Offset *fd_start, - ADIO_Offset *fd_end); - - /* overriding ADIOI_Calc_my_req for the default implementation is specific for - static file domain partitioning */ - void ADIOI_GPFS_Calc_my_req ( ADIO_File fd, ADIO_Offset *offset_list, ADIO_Offset *len_list, - int contig_access_count, ADIO_Offset - min_st_offset, ADIO_Offset *fd_start, - ADIO_Offset *fd_end, ADIO_Offset fd_size, - int nprocs, - int *count_my_req_procs_ptr, - int **count_my_req_per_proc_ptr, - ADIOI_Access **my_req_ptr, - int **buf_idx_ptr); - - /* - * ADIOI_Calc_others_req - * - * param[in] count_my_req_procs Number of processes whose file domain my - * request touches. - * param[in] count_my_req_per_proc count_my_req_per_proc[i] gives the no. of - * contig. requests of this process in - * process i's file domain. - * param[in] my_req A structure defining my request - * param[in] nprocs Number of nodes in the block - * param[in] myrank Rank of this node - * param[out] count_others_req_proc_ptr Number of processes whose requests lie in - * my process's file domain (including my - * process itself) - * param[out] others_req_ptr Array of other process' requests that lie - * in my process's file domain - */ - void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, - int *count_my_req_per_proc, - ADIOI_Access *my_req, - int nprocs, int myrank, - int *count_others_req_procs_ptr, - ADIOI_Access **others_req_ptr); - - -#endif /* AD_GPFS_AGGRS_H_ */ + + + /* overriding ADIOI_Calc_file_domains() to apply 'aligned file domain partitioning'. */ + void ADIOI_GPFS_Calc_file_domains(ADIO_File fd, + ADIO_Offset *st_offsets, + ADIO_Offset *end_offsets, + int nprocs, + int nprocs_for_coll, + ADIO_Offset *min_st_offset_ptr, + ADIO_Offset **fd_start_ptr, + ADIO_Offset **fd_end_ptr, + ADIO_Offset *fd_size_ptr, + void *fs_ptr); + + /* overriding ADIOI_Calc_aggregator() for the default implementation is specific for + static file domain partitioning */ + int ADIOI_GPFS_Calc_aggregator(ADIO_File fd, + ADIO_Offset off, + ADIO_Offset min_off, + ADIO_Offset *len, + ADIO_Offset fd_size, + ADIO_Offset *fd_start, + ADIO_Offset *fd_end); + + /* overriding ADIOI_Calc_my_req for the default implementation is specific for + static file domain partitioning */ + void ADIOI_GPFS_Calc_my_req ( ADIO_File fd, ADIO_Offset *offset_list, ADIO_Offset *len_list, + int contig_access_count, ADIO_Offset + min_st_offset, ADIO_Offset *fd_start, + ADIO_Offset *fd_end, ADIO_Offset fd_size, + int nprocs, + int *count_my_req_procs_ptr, + int **count_my_req_per_proc_ptr, + ADIOI_Access **my_req_ptr, + int **buf_idx_ptr); + + /* + * ADIOI_Calc_others_req + * + * param[in] count_my_req_procs Number of processes whose file domain my + * request touches. + * param[in] count_my_req_per_proc count_my_req_per_proc[i] gives the no. of + * contig. requests of this process in + * process i's file domain. + * param[in] my_req A structure defining my request + * param[in] nprocs Number of nodes in the block + * param[in] myrank Rank of this node + * param[out] count_others_req_proc_ptr Number of processes whose requests lie in + * my process's file domain (including my + * process itself) + * param[out] others_req_ptr Array of other process' requests that lie + * in my process's file domain + */ + void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, + int *count_my_req_per_proc, + ADIOI_Access *my_req, + int nprocs, int myrank, + int *count_others_req_procs_ptr, + ADIOI_Access **others_req_ptr); + + +#endif /* AD_GPFS_AGGRS_H_ */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_close.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_close.c index f8a41671a21..c053700ccdd 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_close.c @@ -7,8 +7,8 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_flush.c index 555002f639d..6ff28e348c5 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_flush.c @@ -7,9 +7,9 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_open.c index f4fef37c85c..31dc675ce9e 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_open.c @@ -7,8 +7,8 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -151,6 +151,6 @@ void ADIOI_GPFS_Open(ADIO_File fd, int *error_code) } else *error_code = MPI_SUCCESS; } -/* - *vim: ts=8 sts=4 sw=4 noexpandtab +/* + *vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c index c2cad8bf8be..83fe227f074 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c @@ -7,9 +7,9 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -34,7 +34,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype datatype, int nprocs, int myrank, ADIOI_Access *others_req, ADIO_Offset *offset_list, - ADIO_Offset *len_list, int contig_access_count, + ADIO_Offset *len_list, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end, @@ -42,16 +42,16 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node *flat_buf, ADIO_Offset *offset_list, ADIO_Offset *len_list, int *send_size, int *recv_size, - int *count, int *start_pos, - int *partial_send, - int *recd_from_proc, int nprocs, + int *count, int *start_pos, + int *partial_send, + int *recd_from_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, - ADIO_Offset min_st_offset, + ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - ADIOI_Access *others_req, - int iter, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + ADIOI_Access *others_req, + int iter, MPI_Aint buftype_extent, int *buf_idx); static void ADIOI_R_Exchange_data_alltoallv(ADIO_File fd, void *buf, ADIOI_Flatlist_node *flat_buf, ADIO_Offset *offset_list, ADIO_Offset @@ -68,14 +68,14 @@ static void ADIOI_R_Exchange_data_alltoallv(ADIO_File fd, void *buf, ADIOI_Flatl int iter, MPI_Aint buftype_extent, int *buf_idx); static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node - *flat_buf, char **recv_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, - unsigned *recv_size, + *flat_buf, char **recv_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, + unsigned *recv_size, MPI_Request *requests, MPI_Status *statuses, int *recd_from_proc, int nprocs, - int contig_access_count, - ADIO_Offset min_st_offset, - ADIO_Offset fd_size, ADIO_Offset *fd_start, + int contig_access_count, + ADIO_Offset min_st_offset, + ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end, MPI_Aint buftype_extent); @@ -94,15 +94,15 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, *error_code) { /* Uses a generalized version of the extended two-phase method described - in "An Extended Two-Phase Method for Accessing Sections of + in "An Extended Two-Phase Method for Accessing Sections of Out-of-Core Arrays", Rajeev Thakur and Alok Choudhary, - Scientific Programming, (5)4:301--317, Winter 1996. + Scientific Programming, (5)4:301--317, Winter 1996. http://www.mcs.anl.gov/home/thakur/ext2ph.ps */ - ADIOI_Access *my_req; + ADIOI_Access *my_req; /* array of nprocs structures, one for each other process in whose file domain this process's request lies */ - + ADIOI_Access *others_req; /* array of nprocs structures, one for each other process whose request lies in this process's file domain. */ @@ -127,7 +127,7 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, #if 0 /* From common code - not implemented for bg. */ if (fd->hints->cb_pfr != ADIOI_HINT_DISABLE) { - ADIOI_IOStridedColl (fd, buf, count, ADIOI_READ, datatype, + ADIOI_IOStridedColl (fd, buf, count, ADIOI_READ, datatype, file_ptr_type, offset, status, error_code); return; } */ @@ -162,15 +162,15 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, #ifdef RDCOLL_DEBUG for (i=0; ihints->cb_read == ADIOI_HINT_DISABLE - || (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO))) + || (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO))) { /* don't do aggregation */ if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { @@ -267,7 +267,7 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs, nprocs_for_coll, &min_st_offset, &fd_start, &fd_end, - fd->hints->min_fdomain_size, &fd_size, + fd->hints->min_fdomain_size, &fd_size, fd->hints->striping_unit); GPFSMPIO_T_CIO_SET_GET( r, 1, 1, GPFSMPIO_CIO_T_MYREQ, GPFSMPIO_CIO_T_FD_PART ); @@ -304,7 +304,7 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, } } - /* calculate where the portions of the access requests of this process + /* calculate where the portions of the access requests of this process * are located in terms of the file domains. this could be on the same * process or on other processes. this function fills in: * count_my_req_procs - number of processes (including this one) for which @@ -319,13 +319,13 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, if (gpfsmpio_tuneblocking) ADIOI_GPFS_Calc_my_req(fd, offset_list, len_list, contig_access_count, min_st_offset, fd_start, fd_end, fd_size, - nprocs, &count_my_req_procs, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, &buf_idx); else ADIOI_Calc_my_req(fd, offset_list, len_list, contig_access_count, min_st_offset, fd_start, fd_end, fd_size, - nprocs, &count_my_req_procs, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, &buf_idx); @@ -345,15 +345,15 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, &others_req); else - ADIOI_Calc_others_req(fd, count_my_req_procs, - count_my_req_per_proc, my_req, - nprocs, myrank, &count_others_req_procs, - &others_req); + ADIOI_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, + nprocs, myrank, &count_others_req_procs, + &others_req); GPFSMPIO_T_CIO_SET_GET( r, 1, 1, GPFSMPIO_CIO_T_DEXCH, GPFSMPIO_CIO_T_OTHREQ ) - /* my_req[] and count_my_req_per_proc aren't needed at this point, so - * let's free the memory + /* my_req[] and count_my_req_per_proc aren't needed at this point, so + * let's free the memory */ ADIOI_Free(count_my_req_per_proc); for (i=0; icomm); + MPI_Allreduce(&ntimes, &max_ntimes, 1, MPI_INT, MPI_MAX, fd->comm); read_buf = fd->io_buf; - curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); + curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); /* its use is explained below. calloc initializes to 0. */ count = (int *) ADIOI_Malloc(nprocs * sizeof(int)); @@ -498,7 +498,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype in an iteration. */ partial_send = (int *) ADIOI_Calloc(nprocs, sizeof(int)); - /* if only a portion of the last off-len pair is sent to a process + /* if only a portion of the last off-len pair is sent to a process in a particular iteration, the length sent is stored here. calloc initializes to 0. */ @@ -514,7 +514,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype ADIOI_Fill_user_buffer. initialized to 0 here. */ start_pos = (int *) ADIOI_Malloc(nprocs*sizeof(int)); - /* used to store the starting value of curr_offlen_ptr[i] in + /* used to store the starting value of curr_offlen_ptr[i] in this iteration */ ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); @@ -540,9 +540,9 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype /* go through all others_req and check if any are satisfied by the current read */ - /* since MPI guarantees that displacements in filetypes are in + /* since MPI guarantees that displacements in filetypes are in monotonically nondecreasing order, I can maintain a pointer - (curr_offlen_ptr) to + (curr_offlen_ptr) to current off-len pair for each process in others_req and scan further only from there. There is still a problem of filetypes such as: (1, 2, 3 are not process nos. They are just numbers for @@ -552,7 +552,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype 2 -----!---- 3 --!----- - where ! indicates where the current read_size limitation cuts + where ! indicates where the current read_size limitation cuts through the filetype. I resolve this by reading up to !, but filling the communication buffer only for 1. I copy the portion left over for 2 into a tmp_buf for use in the next @@ -561,22 +561,22 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype other end, as only one off-len pair with incomplete data will be sent. I also don't need to send the individual offsets and lens along with the data, as the data is being - sent in a particular order. */ + sent in a particular order. */ - /* off = start offset in the file for the data actually read in - this iteration + /* off = start offset in the file for the data actually read in + this iteration size = size of data read corresponding to off real_off = off minus whatever data was retained in memory from previous iteration for cases like 2, 3 illustrated above real_size = size plus the extra corresponding to real_off - req_off = off in file for a particular contiguous request + req_off = off in file for a particular contiguous request minus what was satisfied in previous iteration req_size = size corresponding to req_off */ #ifdef PROFILE MPE_Log_event(13, 0, "start computation"); #endif - size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); + size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); real_off = off - for_curr_iter; real_size = size + for_curr_iter; @@ -585,7 +585,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype for (i=0; icomm, requests+j); j++; buf_idx[i] += recv_size[i]; @@ -802,19 +802,19 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node else { /* allocate memory for recv_buf and post receives */ recv_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char*)); - for (i=0; i < nprocs; i++) - if (recv_size[i]) recv_buf[i] = + for (i=0; i < nprocs; i++) + if (recv_size[i]) recv_buf[i] = (char *) ADIOI_Malloc(recv_size[i]); j = 0; - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (recv_size[i]) { - MPI_Irecv(recv_buf[i], recv_size[i], MPI_BYTE, i, + MPI_Irecv(recv_buf[i], recv_size[i], MPI_BYTE, i, myrank+i+100*iter, fd->comm, requests+j); j++; #ifdef RDCOLL_DEBUG - DBG_FPRINTF(stderr, "node %d, recv_size %d, tag %d \n", - myrank, recv_size[i], myrank+i+100*iter); + DBG_FPRINTF(stderr, "node %d, recv_size %d, tag %d \n", + myrank, recv_size[i], myrank+i+100*iter); #endif } } @@ -832,7 +832,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node } ADIOI_Type_create_hindexed_x(count[i], &(others_req[i].lens[start_pos[i]]), - &(others_req[i].mem_ptrs[start_pos[i]]), + &(others_req[i].mem_ptrs[start_pos[i]]), MPI_BYTE, &send_type); /* absolute displacement; use MPI_BOTTOM in send */ MPI_Type_commit(&send_type); @@ -845,7 +845,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node } statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send+nprocs_recv+1) * \ - sizeof(MPI_Status)); + sizeof(MPI_Status)); /* +1 to avoid a 0-size malloc */ /* wait on the receives */ @@ -858,10 +858,10 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node #endif /* if noncontiguous, to the copies from the recv buffers */ - if (!buftype_is_contig) + if (!buftype_is_contig) ADIOI_Fill_user_buffer(fd, buf, flat_buf, recv_buf, - offset_list, len_list, (unsigned*)recv_size, - requests, statuses, recd_from_proc, + offset_list, len_list, (unsigned*)recv_size, + requests, statuses, recd_from_proc, nprocs, contig_access_count, min_st_offset, fd_size, fd_start, fd_end, buftype_extent); @@ -874,7 +874,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node ADIOI_Free(requests); if (!buftype_is_contig) { - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (recv_size[i]) ADIOI_Free(recv_buf[i]); ADIOI_Free(recv_buf); } @@ -932,14 +932,14 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node } static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node - *flat_buf, char **recv_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, - unsigned *recv_size, + *flat_buf, char **recv_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, + unsigned *recv_size, MPI_Request *requests, MPI_Status *statuses, int *recd_from_proc, int nprocs, - int contig_access_count, - ADIO_Offset min_st_offset, - ADIO_Offset fd_size, ADIO_Offset *fd_start, + int contig_access_count, + ADIO_Offset min_st_offset, + ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end, MPI_Aint buftype_extent) { @@ -958,9 +958,9 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node /* curr_from_proc[p] = amount of data recd from proc. p that has already been accounted for so far - done_from_proc[p] = amount of data already recd from proc. p and + done_from_proc[p] = amount of data already recd from proc. p and filled into user buffer in previous iterations - user_buf_idx = current location in user buffer + user_buf_idx = current location in user buffer recv_buf_idx[p] = current location in recv_buf of proc. p */ curr_from_proc = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); done_from_proc = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); @@ -977,10 +977,10 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node flat_buf_sz = flat_buf->blocklens[0]; /* flat_buf_idx = current index into flattened buftype - flat_buf_sz = size of current contiguous component in + flat_buf_sz = size of current contiguous component in flattened buf */ - for (i=0; i done_from_proc[p]) { if (done_from_proc[p] > curr_from_proc[p]) { - size = ADIOI_MIN(curr_from_proc[p] + len - + size = ADIOI_MIN(curr_from_proc[p] + len - done_from_proc[p], recv_size[p]-recv_buf_idx[p]); buf_incr = done_from_proc[p] - curr_from_proc[p]; ADIOI_BUF_INCR @@ -1034,7 +1034,7 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node rem_len -= len; } } - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (recv_size[i]) recd_from_proc[i] = curr_from_proc[i]; ADIOI_Free(curr_from_proc); @@ -1045,16 +1045,16 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node static void ADIOI_R_Exchange_data_alltoallv( ADIO_File fd, void *buf, ADIOI_Flatlist_node *flat_buf, ADIO_Offset *offset_list, ADIO_Offset - *len_list, int *send_size, int *recv_size, + *len_list, int *send_size, int *recv_size, int *count, int *start_pos, int *partial_send, int *recd_from_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, ADIOI_Access *others_req, int iter, MPI_Aint buftype_extent, int *buf_idx) -{ +{ int i, j, k=0, tmp=0, nprocs_recv, nprocs_send; char **recv_buf = NULL; MPI_Request *requests=NULL; @@ -1068,13 +1068,13 @@ static void ADIOI_R_Exchange_data_alltoallv( /* exchange send_size info so that each process knows how much to receive from whom and how much memory to allocate. */ MPI_Alltoall(send_size, 1, MPI_INT, recv_size, 1, MPI_INT, fd->comm); - + nprocs_recv = 0; for (i=0; icomm ); + fd->comm ); #if 0 DBG_FPRINTF(stderr, "\tall_recv_buf = " ); for (i=131072; i<131073; i++) { DBG_FPRINTF(stderr, "%2d,", all_recv_buf [i] ); } DBG_FPRINTF(stderr, "\n" ); #endif - + /* unpack at the receiver side */ - if (nprocs_recv) { + if (nprocs_recv) { if (!buftype_is_contig) ADIOI_Fill_user_buffer(fd, buf, flat_buf, recv_buf, offset_list, len_list, (unsigned*)recv_size, @@ -1161,11 +1161,11 @@ static void ADIOI_R_Exchange_data_alltoallv( } } } - + ADIOI_Free( all_send_buf ); ADIOI_Free( all_recv_buf ); ADIOI_Free( recv_buf ); ADIOI_Free( sdispls ); ADIOI_Free( rdispls ); - return; -} + return; +} diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c index 968e6e6591b..e83b643bb8a 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c @@ -7,8 +7,8 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -47,32 +47,32 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype ADIO_Offset *fd_start, ADIO_Offset *fd_end, int *buf_idx, int *error_code); static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf, - ADIOI_Flatlist_node *flat_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, + ADIOI_Flatlist_node *flat_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, - int *count, int *start_pos, int *partial_recv, - int *sent_to_proc, int nprocs, + int *count, int *start_pos, int *partial_recv, + int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - ADIOI_Access *others_req, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + ADIOI_Access *others_req, int *send_buf_idx, int *curr_to_proc, - int *done_to_proc, int *hole, int iter, + int *done_to_proc, int *hole, int iter, MPI_Aint buftype_extent, int *buf_idx, int *error_code); static void ADIOI_W_Exchange_data_alltoallv( - ADIO_File fd, const void *buf, + ADIO_File fd, const void *buf, char *write_buf, /* 1 */ - ADIOI_Flatlist_node *flat_buf, - ADIO_Offset *offset_list, - ADIO_Offset *len_list, int *send_size, int *recv_size, + ADIOI_Flatlist_node *flat_buf, + ADIO_Offset *offset_list, + ADIO_Offset *len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, /* 2 */ int *count, int *start_pos, int *partial_recv, - int *sent_to_proc, int nprocs, int myrank, + int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, ADIOI_Access *others_req, int *send_buf_idx, int *curr_to_proc, /* 3 */ @@ -80,28 +80,28 @@ static void ADIOI_W_Exchange_data_alltoallv( int iter, MPI_Aint buftype_extent, int *buf_idx, int *error_code); static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist_node - *flat_buf, char **send_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, - MPI_Request *requests, int *sent_to_proc, - int nprocs, int myrank, + *flat_buf, char **send_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, + MPI_Request *requests, int *sent_to_proc, + int nprocs, int myrank, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - int *send_buf_idx, int *curr_to_proc, - int *done_to_proc, int iter, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + int *send_buf_idx, int *curr_to_proc, + int *done_to_proc, int iter, MPI_Aint buftype_extent); static void ADIOI_Fill_send_buffer_nosend(ADIO_File fd, const void *buf, ADIOI_Flatlist_node - *flat_buf, char **send_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, - MPI_Request *requests, int *sent_to_proc, - int nprocs, int myrank, + *flat_buf, char **send_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, + MPI_Request *requests, int *sent_to_proc, + int nprocs, int myrank, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - int *send_buf_idx, int *curr_to_proc, - int *done_to_proc, int iter, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + int *send_buf_idx, int *curr_to_proc, + int *done_to_proc, int iter, MPI_Aint buftype_extent); -static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, +static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, ADIO_Offset *srt_off, int *srt_len, int *start_pos, int nprocs, int nprocs_recv, int total_elements); @@ -112,15 +112,15 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, *error_code) { /* Uses a generalized version of the extended two-phase method described - in "An Extended Two-Phase Method for Accessing Sections of + in "An Extended Two-Phase Method for Accessing Sections of Out-of-Core Arrays", Rajeev Thakur and Alok Choudhary, - Scientific Programming, (5)4:301--317, Winter 1996. + Scientific Programming, (5)4:301--317, Winter 1996. http://www.mcs.anl.gov/home/thakur/ext2ph.ps */ - ADIOI_Access *my_req; + ADIOI_Access *my_req; /* array of nprocs access structures, one for each other process in whose file domain this process's request lies */ - + ADIOI_Access *others_req; /* array of nprocs access structures, one for each other process whose request lies in this process's file domain. */ @@ -164,14 +164,14 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, &offset_list, &len_list, &start_offset, - &end_offset, &contig_access_count); + &end_offset, &contig_access_count); GPFSMPIO_T_CIO_SET_GET( w, 1, 1, GPFSMPIO_CIO_T_GATHER, GPFSMPIO_CIO_T_LCOMP ) - /* each process communicates its start and end offsets to other + /* each process communicates its start and end offsets to other processes. The result is an array each of start and end offsets stored - in order of process rank. */ - + in order of process rank. */ + st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs*sizeof(ADIO_Offset)); end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs*sizeof(ADIO_Offset)); @@ -253,13 +253,13 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, if (gpfsmpio_tuneblocking) ADIOI_GPFS_Calc_file_domains(fd, st_offsets, end_offsets, nprocs, nprocs_for_coll, &min_st_offset, - &fd_start, &fd_end, &fd_size, fd->fs_ptr); + &fd_start, &fd_end, &fd_size, fd->fs_ptr); else ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs, nprocs_for_coll, &min_st_offset, &fd_start, &fd_end, fd->hints->min_fdomain_size, &fd_size, - fd->hints->striping_unit); + fd->hints->striping_unit); GPFSMPIO_T_CIO_SET_GET( w, 1, 1, GPFSMPIO_CIO_T_MYREQ, GPFSMPIO_CIO_T_FD_PART ); @@ -298,13 +298,13 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, if (gpfsmpio_tuneblocking) ADIOI_GPFS_Calc_my_req(fd, offset_list, len_list, contig_access_count, min_st_offset, fd_start, fd_end, fd_size, - nprocs, &count_my_req_procs, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, - &buf_idx); + &buf_idx); else ADIOI_Calc_my_req(fd, offset_list, len_list, contig_access_count, min_st_offset, fd_start, fd_end, fd_size, - nprocs, &count_my_req_procs, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, &buf_idx); @@ -313,7 +313,7 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, /* based on everyone's my_req, calculate what requests of other processes lie in this process's file domain. count_others_req_procs = number of processes whose requests lie in - this process's file domain (including this process itself) + this process's file domain (including this process itself) count_others_req_per_proc[i] indicates how many separate contiguous requests of proc. i lie in this process's file domain. */ @@ -323,8 +323,8 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, nprocs, myrank, &count_others_req_procs, &others_req); else - ADIOI_Calc_others_req(fd, count_my_req_procs, - count_my_req_per_proc, my_req, + ADIOI_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, nprocs, myrank, &count_others_req_procs, &others_req); @@ -379,7 +379,7 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, bufsize = size * count; MPIR_Status_set_bytes(status, datatype, bufsize); } -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written during collective I/O. */ #endif @@ -489,7 +489,7 @@ static int gpfs_find_access_for_ion(ADIO_File fd, * code is created and returned in error_code. */ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype - datatype, int nprocs, + datatype, int nprocs, int myrank, ADIOI_Access *others_req, ADIO_Offset *offset_list, @@ -499,7 +499,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype int *buf_idx, int *error_code) { /* Send data to appropriate processes and write in sizes of no more - than coll_bufsize. + than coll_bufsize. The idea is to reduce the amount of extra memory required for collective I/O. If all data were written all at once, which is much easier, it would require temp space more than the size of user_buf, @@ -533,7 +533,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype That gives the no. of communication phases as well. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "cb_buffer_size", MPI_MAX_INFO_VAL, value, + ADIOI_Info_get(fd->info, "cb_buffer_size", MPI_MAX_INFO_VAL, value, &info_flag); coll_bufsize = atoi(value); ADIOI_Free(value); @@ -589,14 +589,14 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype #endif MPI_Allreduce(&ntimes, &max_ntimes, 1, MPI_INT, MPI_MAX, - fd->comm); + fd->comm); write_buf = fd->io_buf; if (gpfsmpio_pthreadio == 1) { write_buf2 = fd->io_buf + coll_bufsize; } - curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); + curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); /* its use is explained below. calloc initializes to 0. */ count = (int *) ADIOI_Malloc(nprocs*sizeof(int)); @@ -625,7 +625,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype /* Above three are used in ADIOI_Fill_send_buffer*/ start_pos = (int *) ADIOI_Malloc(nprocs*sizeof(int)); - /* used to store the starting value of curr_offlen_ptr[i] in + /* used to store the starting value of curr_offlen_ptr[i] in this iteration */ ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); @@ -662,15 +662,15 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype /* go through all others_req and check which will be satisfied by the current write */ - /* Note that MPI guarantees that displacements in filetypes are in + /* Note that MPI guarantees that displacements in filetypes are in monotonically nondecreasing order and that, for writes, the filetypes cannot specify overlapping regions in the file. This simplifies implementation a bit compared to reads. */ - /* off = start offset in the file for the data to be written in - this iteration + /* off = start offset in the file for the data to be written in + this iteration size = size of data written (bytes) corresponding to off - req_off = off in file for a particular contiguous request + req_off = off in file for a particular contiguous request minus what was satisfied in previous iteration req_size = size corresponding to req_off */ @@ -681,7 +681,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype #endif for (i=0; i < nprocs; i++) count[i] = recv_size[i] = 0; - size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); + size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); for (i=0; i < nprocs; i++) { if (others_req[i].count) { @@ -691,7 +691,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype /* this request may have been partially satisfied in the previous iteration. */ req_off = others_req[i].offsets[j] + - partial_recv[i]; + partial_recv[i]; req_len = others_req[i].lens[j] - partial_recv[i]; partial_recv[i] = 0; @@ -706,10 +706,10 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype if (req_off < off + size) { count[i]++; ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIR_Upint)(write_buf+req_off-off)); - MPI_Address(write_buf+req_off-off, + MPI_Address(write_buf+req_off-off, &(others_req[i].mem_ptrs[j])); ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off)); - recv_size[i] += (int)(ADIOI_MIN(off + size - req_off, + recv_size[i] += (int)(ADIOI_MIN(off + size - req_off, (unsigned)req_len)); if (off+size-req_off < (unsigned)req_len) @@ -717,9 +717,9 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype partial_recv[i] = (int) (off + size - req_off); /* --BEGIN ERROR HANDLING-- */ - if ((j+1 < others_req[i].count) && + if ((j+1 < others_req[i].count) && (others_req[i].offsets[j+1] < off+size)) - { + { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, @@ -739,7 +739,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype curr_offlen_ptr[i] = j; } } - + #ifdef PROFILE MPE_Log_event(14, 0, "end computation"); MPE_Log_event(7, 0, "start communication"); @@ -753,7 +753,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype min_st_offset, fd_size, fd_start, fd_end, others_req, send_buf_idx, curr_to_proc, done_to_proc, &hole, m, buftype_extent, buf_idx, - error_code); + error_code); else if (gpfsmpio_comm == 0) ADIOI_W_Exchange_data_alltoallv(fd, buf, write_buf, flat_buf, offset_list, @@ -764,7 +764,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype min_st_offset, fd_size, fd_start, fd_end, others_req, send_buf_idx, curr_to_proc, done_to_proc, &hole, m, buftype_extent, buf_idx, - error_code); + error_code); if (*error_code != MPI_SUCCESS) return; #ifdef PROFILE MPE_Log_event(8, 0, "end communication"); @@ -826,7 +826,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype #ifdef PROFILE MPE_Log_event(7, 0, "start communication"); #endif - for (m=ntimes; matomicity) { /* bug fix from Wei-keng Liao and Kenin Coloma */ requests = (MPI_Request *) - ADIOI_Malloc((nprocs_send+1)*sizeof(MPI_Request)); + ADIOI_Malloc((nprocs_send+1)*sizeof(MPI_Request)); send_req = requests; } else { - requests = (MPI_Request *) - ADIOI_Malloc((nprocs_send+nprocs_recv+1)*sizeof(MPI_Request)); + requests = (MPI_Request *) + ADIOI_Malloc((nprocs_send+nprocs_recv+1)*sizeof(MPI_Request)); /* +1 to avoid a 0-size malloc */ /* post receives */ @@ -1041,10 +1041,10 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf #endif if (buftype_is_contig) { j = 0; - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) { - MPI_Isend(((char *) buf) + buf_idx[i], send_size[i], - MPI_BYTE, i, myrank+i+100*iter, fd->comm, + MPI_Isend(((char *) buf) + buf_idx[i], send_size[i], + MPI_BYTE, i, myrank+i+100*iter, fd->comm, send_req+j); j++; buf_idx[i] += send_size[i]; @@ -1053,16 +1053,16 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf else if (nprocs_send) { /* buftype is not contig */ send_buf = (char **) ADIOI_Malloc(nprocs*sizeof(char*)); - for (i=0; i < nprocs; i++) - if (send_size[i]) + for (i=0; i < nprocs; i++) + if (send_size[i]) send_buf[i] = (char *) ADIOI_Malloc(send_size[i]); ADIOI_Fill_send_buffer(fd, buf, flat_buf, send_buf, - offset_list, len_list, send_size, + offset_list, len_list, send_size, send_req, - sent_to_proc, nprocs, myrank, + sent_to_proc, nprocs, myrank, contig_access_count, - min_st_offset, fd_size, fd_start, fd_end, + min_st_offset, fd_size, fd_start, fd_end, send_buf_idx, curr_to_proc, done_to_proc, iter, buftype_extent); /* the send is done in ADIOI_Fill_send_buffer */ @@ -1083,16 +1083,16 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf for (i=0; iatomicity) { /* bug fix from Wei-keng Liao and Kenin Coloma */ statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send+1) * \ - sizeof(MPI_Status)); + sizeof(MPI_Status)); /* +1 to avoid a 0-size malloc */ } else { statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send+nprocs_recv+1) * \ - sizeof(MPI_Status)); + sizeof(MPI_Status)); /* +1 to avoid a 0-size malloc */ } @@ -1119,7 +1119,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf ADIOI_Free(statuses); ADIOI_Free(requests); if (!buftype_is_contig && nprocs_send) { - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) ADIOI_Free(send_buf[i]); ADIOI_Free(send_buf); } @@ -1175,14 +1175,14 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf } static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist_node - *flat_buf, char **send_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, - MPI_Request *requests, int *sent_to_proc, - int nprocs, int myrank, - int contig_access_count, + *flat_buf, char **send_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, + MPI_Request *requests, int *sent_to_proc, + int nprocs, int myrank, + int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - int *send_buf_idx, int *curr_to_proc, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + int *send_buf_idx, int *curr_to_proc, int *done_to_proc, int iter, MPI_Aint buftype_extent) { @@ -1195,9 +1195,9 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist /* curr_to_proc[p] = amount of data sent to proc. p that has already been accounted for so far - done_to_proc[p] = amount of data already sent to proc. p in + done_to_proc[p] = amount of data already sent to proc. p in previous iterations - user_buf_idx = current location in user buffer + user_buf_idx = current location in user buffer send_buf_idx[p] = current location in send_buf of proc. p */ for (i=0; i < nprocs; i++) { @@ -1212,10 +1212,10 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist flat_buf_sz = flat_buf->blocklens[0]; /* flat_buf_idx = current index into flattened buftype - flat_buf_sz = size of current contiguous component in + flat_buf_sz = size of current contiguous component in flattened buf */ - for (i=0; i done_to_proc[p]) { if (done_to_proc[p] > curr_to_proc[p]) { - size = ADIOI_MIN(curr_to_proc[p] + len - + size = ADIOI_MIN(curr_to_proc[p] + len - done_to_proc[p], send_size[p]-send_buf_idx[p]); buf_incr = done_to_proc[p] - curr_to_proc[p]; ADIOI_BUF_INCR @@ -1255,7 +1255,7 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist ADIOI_BUF_COPY } if (send_buf_idx[p] == send_size[p]) { - MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, + MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, myrank+p+100*iter, fd->comm, requests+jj); jj++; } @@ -1275,13 +1275,13 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist rem_len -= len; } } - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) sent_to_proc[i] = curr_to_proc[i]; } -static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, +static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, ADIO_Offset *srt_off, int *srt_len, int *start_pos, int nprocs, int nprocs_recv, int total_elements) { @@ -1311,7 +1311,7 @@ static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, heapsize = nprocs_recv; for (i=heapsize/2 - 1; i>=0; i--) { /* Heapify(a, i, heapsize); Algorithm from Cormen et al. pg. 143 - modified for a heap with smallest element at root. I have + modified for a heap with smallest element at root. I have removed the recursion so that there are no function calls. Function calls are too expensive. */ k = i; @@ -1319,12 +1319,12 @@ static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, l = 2*(k+1) - 1; r = 2*(k+1); - if ((l < heapsize) && + if ((l < heapsize) && (*(a[l].off_list) < *(a[k].off_list))) smallest = l; else smallest = k; - if ((r < heapsize) && + if ((r < heapsize) && (*(a[r].off_list) < *(a[smallest].off_list))) smallest = r; @@ -1336,11 +1336,11 @@ static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, a[k].off_list = a[smallest].off_list; a[k].len_list = a[smallest].len_list; a[k].nelem = a[smallest].nelem; - + a[smallest].off_list = tmp.off_list; a[smallest].len_list = tmp.len_list; a[smallest].nelem = tmp.nelem; - + k = smallest; } else break; @@ -1370,12 +1370,12 @@ static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, l = 2*(k+1) - 1; r = 2*(k+1); - if ((l < heapsize) && + if ((l < heapsize) && (*(a[l].off_list) < *(a[k].off_list))) smallest = l; else smallest = k; - if ((r < heapsize) && + if ((r < heapsize) && (*(a[r].off_list) < *(a[smallest].off_list))) smallest = r; @@ -1387,11 +1387,11 @@ static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, a[k].off_list = a[smallest].off_list; a[k].len_list = a[smallest].len_list; a[k].nelem = a[smallest].nelem; - + a[smallest].off_list = tmp.off_list; a[smallest].len_list = tmp.len_list; a[smallest].nelem = tmp.nelem; - + k = smallest; } else break; @@ -1403,25 +1403,25 @@ static void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, static void ADIOI_W_Exchange_data_alltoallv( - ADIO_File fd, const void *buf, + ADIO_File fd, const void *buf, char *write_buf, /* 1 */ - ADIOI_Flatlist_node *flat_buf, - ADIO_Offset *offset_list, - ADIO_Offset *len_list, int *send_size, int *recv_size, + ADIOI_Flatlist_node *flat_buf, + ADIO_Offset *offset_list, + ADIO_Offset *len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, /* 2 */ int *count, int *start_pos, int *partial_recv, - int *sent_to_proc, int nprocs, int myrank, + int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, ADIOI_Access *others_req, int *send_buf_idx, int *curr_to_proc, /* 3 */ int *done_to_proc, int *hole, /* 4 */ int iter, MPI_Aint buftype_extent, int *buf_idx, int *error_code) -{ +{ int i, j, k=0, nprocs_recv, nprocs_send, *tmp_len, err; char **send_buf = NULL; MPI_Request *send_req=NULL; @@ -1443,12 +1443,12 @@ static void ADIOI_W_Exchange_data_alltoallv( gpfsmpio_prof_cw[GPFSMPIO_CIO_T_DEXCH_RECV_EXCH] += MPI_Wtime() - io_time; io_time = MPI_Wtime(); - + nprocs_recv = 0; for (i=0; icomm ); + fd->comm ); ADIOI_Free( all_send_buf ); ADIOI_Free(sdispls); @@ -1503,7 +1503,7 @@ static void ADIOI_W_Exchange_data_alltoallv( gpfsmpio_prof_cw[GPFSMPIO_CIO_T_DEXCH_NET] += MPI_Wtime() - io_time; io_time = MPI_Wtime(); /* data sieving pre-read */ - /* To avoid a read-modify-write, check if there are holes in the + /* To avoid a read-modify-write, check if there are holes in the data to be written. For this, merge the (sorted) offset lists others_req using a heap-merge. */ @@ -1518,7 +1518,7 @@ static void ADIOI_W_Exchange_data_alltoallv( /* check if there are any holes */ *hole = 0; /* See if there are holes before the first request or after the last request*/ - if((srt_off[0] > off) || + if((srt_off[0] > off) || ((srt_off[sum-1] + srt_len[sum-1]) < (off + size))) { *hole = 1; @@ -1577,25 +1577,25 @@ static void ADIOI_W_Exchange_data_alltoallv( k = start_pos[i] + count[i] - 1; others_req[i].lens[k] = tmp_len[i]; } - + } } - + ADIOI_Free( tmp_len ); ADIOI_Free( all_recv_buf ); ADIOI_Free(rdispls); - return; -} + return; +} static void ADIOI_Fill_send_buffer_nosend(ADIO_File fd, const void *buf, ADIOI_Flatlist_node - *flat_buf, char **send_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, - MPI_Request *requests, int *sent_to_proc, - int nprocs, int myrank, - int contig_access_count, + *flat_buf, char **send_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, + MPI_Request *requests, int *sent_to_proc, + int nprocs, int myrank, + int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - int *send_buf_idx, int *curr_to_proc, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + int *send_buf_idx, int *curr_to_proc, int *done_to_proc, int iter, MPI_Aint buftype_extent) { @@ -1608,9 +1608,9 @@ static void ADIOI_Fill_send_buffer_nosend(ADIO_File fd, const void *buf, ADIOI_F /* curr_to_proc[p] = amount of data sent to proc. p that has already been accounted for so far - done_to_proc[p] = amount of data already sent to proc. p in + done_to_proc[p] = amount of data already sent to proc. p in previous iterations - user_buf_idx = current location in user buffer + user_buf_idx = current location in user buffer send_buf_idx[p] = current location in send_buf of proc. p */ for (i=0; i < nprocs; i++) { @@ -1625,10 +1625,10 @@ static void ADIOI_Fill_send_buffer_nosend(ADIO_File fd, const void *buf, ADIOI_F flat_buf_sz = flat_buf->blocklens[0]; /* flat_buf_idx = current index into flattened buftype - flat_buf_sz = size of current contiguous component in + flat_buf_sz = size of current contiguous component in flattened buf */ - for (i=0; i done_to_proc[p]) { if (done_to_proc[p] > curr_to_proc[p]) { - size = ADIOI_MIN(curr_to_proc[p] + len - + size = ADIOI_MIN(curr_to_proc[p] + len - done_to_proc[p], send_size[p]-send_buf_idx[p]); buf_incr = done_to_proc[p] - curr_to_proc[p]; ADIOI_BUF_INCR @@ -1670,7 +1670,7 @@ static void ADIOI_Fill_send_buffer_nosend(ADIO_File fd, const void *buf, ADIOI_F /* moved to alltoallv */ /* if (send_buf_idx[p] == send_size[p]) { - MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, + MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, myrank+p+100*iter, fd->comm, requests+jj); jj++; } @@ -1691,6 +1691,6 @@ static void ADIOI_Fill_send_buffer_nosend(ADIO_File fd, const void *buf, ADIOI_F rem_len -= len; } } - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) sent_to_proc[i] = curr_to_proc[i]; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/Makefile.mk b/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/Makefile.mk index 1d957ef8f6f..baec508e549 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/Makefile.mk +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/Makefile.mk @@ -13,6 +13,6 @@ noinst_HEADERS += \ romio_other_sources += \ adio/ad_gpfs/bg/ad_bg_aggrs.c \ - adio/ad_gpfs/bg/ad_bg_pset.c + adio/ad_gpfs/bg/ad_bg_pset.c endif BUILD_AD_BG diff --git a/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/ad_bg_aggrs.c b/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/ad_bg_aggrs.c index 240c0138df2..90c97a20a9a 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/ad_bg_aggrs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gpfs/bg/ad_bg_aggrs.c @@ -7,8 +7,8 @@ */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (C) 1997-2001 University of Chicago. +/* + * Copyright (C) 1997-2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -46,14 +46,14 @@ * * The last three of these were originally in ad_read_coll.c, but they are * also shared with ad_write_coll.c. I felt that they were better kept with - * the rest of the shared aggregation code. + * the rest of the shared aggregation code. */ /* Discussion of values available from above: * * ADIO_Offset st_offsets[0..nprocs-1] * ADIO_Offset end_offsets[0..nprocs-1] - * These contain a list of start and end offsets for each process in + * These contain a list of start and end offsets for each process in * the communicator. For example, an access at loc 10, size 10 would * have a start offset of 10 and end offset of 19. * int nprocs @@ -63,26 +63,26 @@ * starting location of "file domain"; region that a given process will * perform aggregation for (i.e. actually do I/O) * ADIO_Offset fd_end[0..nprocs_for_coll-1] - * start + size - 1 roughly, but it can be less, or 0, in the case of + * start + size - 1 roughly, but it can be less, or 0, in the case of * uneven distributions */ /* forward declaration */ -static void -ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd, - const ADIOI_BG_ConfInfo_t *confInfo, +static void +ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd, + const ADIOI_BG_ConfInfo_t *confInfo, ADIOI_BG_ProcInfo_t *all_procInfo); /* * Compute the aggregator-related parameters that are required in 2-phase collective IO of ADIO. - * The parameters are + * The parameters are * . the number of aggregators (proxies) : fd->hints->cb_nodes * . the ranks of the aggregators : fd->hints->ranklist - * By compute these two parameters in a BG-PSET-aware way, the default 2-phase collective IO of + * By compute these two parameters in a BG-PSET-aware way, the default 2-phase collective IO of * ADIO can work more efficiently. */ -int -ADIOI_BG_gen_agg_ranklist(ADIO_File fd, int n_aggrs_per_pset) +int +ADIOI_BG_gen_agg_ranklist(ADIO_File fd, int n_aggrs_per_pset) { int r, s; ADIOI_BG_ProcInfo_t *procInfo, *all_procInfo; @@ -101,13 +101,13 @@ ADIOI_BG_gen_agg_ranklist(ADIO_File fd, int n_aggrs_per_pset) /* if (r == 0) */ all_procInfo = ADIOI_BG_ProcInfo_new_n (s); - MPI_Gather( (void *)procInfo, sizeof(ADIOI_BG_ProcInfo_t), MPI_BYTE, - (void *)all_procInfo, sizeof(ADIOI_BG_ProcInfo_t), MPI_BYTE, - 0, + MPI_Gather( (void *)procInfo, sizeof(ADIOI_BG_ProcInfo_t), MPI_BYTE, + (void *)all_procInfo, sizeof(ADIOI_BG_ProcInfo_t), MPI_BYTE, + 0, fd->comm ); /* Compute a list of the ranks of chosen IO proxy CN on process 0 */ - if (r == 0) { + if (r == 0) { ADIOI_BG_compute_agg_ranklist_serial (fd, confInfo, all_procInfo); /* ADIOI_BG_ProcInfo_free (all_procInfo);*/ } @@ -156,7 +156,7 @@ ADIOI_BG_gen_agg_ranklist(ADIO_File fd, int n_aggrs_per_pset) /* Maybe find which bridge node is closer (manhattan distance) and try to * distribute evenly. */ -/* +/* * Pick IO aggregators based on the under PSET organization and stores the ranks of the proxy CNs in tmp_ranklist. * The first order of tmp_ranklist is : PSET number * The secondary order of the list is determined in ADIOI_BG_select_agg_in_pset() and thus adjustable. @@ -181,9 +181,9 @@ static int intsort(const void *p1, const void *p2) return(i1->bridge - i2->bridge); } -static int -ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, - ADIOI_BG_ProcInfo_t *all_procInfo, +static int +ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, + ADIOI_BG_ProcInfo_t *all_procInfo, int *tmp_ranklist) { TRACE_ERR("Entering ADIOI_BG_compute_agg_ranklist_serial_do\n"); @@ -313,7 +313,7 @@ ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, bridgelist[i].rank = i; TRACE_ERR("bridgelist[%d].bridge: %d .rank: %d\n", i, bridgelist[i].bridge, i); } - + /* This list contains rank->bridge info. Now, we need to sort this list. */ qsort(bridgelist, confInfo->nProcs, sizeof(sortstruct), intsort); @@ -324,7 +324,7 @@ ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, if(numAggs == 1) aggTotal = 1; else - /* the number of aggregators is (numAggs per bridgenode) plus each + /* the number of aggregators is (numAggs per bridgenode) plus each * bridge node is an aggregator */ aggTotal = confInfo->numBridgeRanks * (numAggs+1); @@ -350,7 +350,7 @@ ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, if(lastBridge == bridgelist[procIndex].bridge) { psetSize++; - if(procIndex) continue; + if(procIndex) continue; else procIndex--;/* procIndex == 0 */ } /* Sets up a list of nodes which will act as aggregators. numAggs @@ -377,7 +377,7 @@ ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, aggList[nextAggr] = bridgelist[procIndex+j*distance+1].rank; TRACE_ERR("agglist[%d] -> bridgelist[%d] = %d\n", nextAggr, procIndex+j*distance+1,aggList[nextAggr]); if(aggList[nextAggr]==lastBridge) /* can't have bridge in the list twice */ - { + { aggList[nextAggr] = bridgelist[procIndex+psetSize].rank; /* take the last one in the pset */ TRACE_ERR("replacement agglist[%d] -> bridgelist[%d] = %d\n", nextAggr, procIndex+psetSize,aggList[nextAggr]); } @@ -409,17 +409,17 @@ ADIOI_BG_compute_agg_ranklist_serial_do (const ADIOI_BG_ConfInfo_t *confInfo, } -/* +/* * compute aggregators ranklist and put it into fd->hints struct - */ -static void -ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd, - const ADIOI_BG_ConfInfo_t *confInfo, + */ +static void +ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd, + const ADIOI_BG_ConfInfo_t *confInfo, ADIOI_BG_ProcInfo_t *all_procInfo) { TRACE_ERR("Entering ADIOI_BG_compute_agg_ranklist_serial\n"); - int i; - int naggs; + int i; + int naggs; int size; int *tmp_ranklist; @@ -432,12 +432,12 @@ ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd, } # endif - naggs= + naggs= ADIOI_BG_compute_agg_ranklist_serial_do (confInfo, all_procInfo, tmp_ranklist); # define VERIFY 1 # if VERIFY - DBG_FPRINTF(stderr, "\tconfInfo = min: %3d, max: %3d, naggrs: %3d, bridge: %3d, nprocs: %3d, vpset: %3d, tsize: %3d, ratio: %.4f; naggs = %d\n", + DBG_FPRINTF(stderr, "\tconfInfo = min: %3d, max: %3d, naggrs: %3d, bridge: %3d, nprocs: %3d, vpset: %3d, tsize: %3d, ratio: %.4f; naggs = %d\n", confInfo->ioMinSize , confInfo->ioMaxSize , confInfo->nAggrs , @@ -462,7 +462,7 @@ ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd, tmp_ranklist[i] = 0; } } - + # if AGG_DEBUG for (i=0; i= 0)); /* A dim is < 6 bits or sorting won't work */ - if((hw.Coords[0] == pers.Network_Config.cnBridge_A) && - (hw.Coords[1] == pers.Network_Config.cnBridge_B) && - (hw.Coords[2] == pers.Network_Config.cnBridge_C) && - (hw.Coords[3] == pers.Network_Config.cnBridge_D) && + if((hw.Coords[0] == pers.Network_Config.cnBridge_A) && + (hw.Coords[1] == pers.Network_Config.cnBridge_B) && + (hw.Coords[2] == pers.Network_Config.cnBridge_C) && + (hw.Coords[3] == pers.Network_Config.cnBridge_D) && (hw.Coords[4] == pers.Network_Config.cnBridge_E)) { iambridge = 1; /* I am bridge */ if (gpfsmpio_bridgeringagg > 0) { @@ -238,16 +238,16 @@ ADIOI_BG_persInfo_init(ADIOI_BG_ConfInfo_t *conf, bridges = (sortstruct *) ADIOI_Malloc(sizeof(sortstruct) * size); /* We're going to sort this structure by bridgeCoord: - + typedef struct { int rank; int bridgeCoord; - } sortstruct; - - and I want the rank that IS the bridge to sort first, so - OR in '1' on non-bridge ranks that use a bridge coord. - */ + } sortstruct; + + and I want the rank that IS the bridge to sort first, so + OR in '1' on non-bridge ranks that use a bridge coord. + */ /* My input to the collective */ bridges[rank].rank = rank; @@ -268,18 +268,18 @@ ADIOI_BG_persInfo_init(ADIOI_BG_ConfInfo_t *conf, tempRank = bridges[0].rank; countPset=1; - bridgeIndex = 0; + bridgeIndex = 0; mincompute = size+1; maxcompute = 1; for(i=1; imyIOSize = countPset; proc->ioNodeIndex = bridgeIndex; } - - - if(rank == 0) + + + if(rank == 0) { /* Only rank 0 has a conf structure, fill in stuff as appropriate */ conf->ioMinSize = mincompute; @@ -344,15 +344,15 @@ ADIOI_BG_persInfo_init(ADIOI_BG_ConfInfo_t *conf, conf->nProcs = size; conf->cpuIDsize = hw.ppn; /*conf->virtualPsetSize = maxcompute * conf->cpuIDsize;*/ - + conf->nAggrs = n_aggrs; /* First pass gets nAggrs = -1 */ if(conf->nAggrs <=0) conf->nAggrs = gpfsmpio_bg_nagg_pset; if(conf->ioMinSize <= conf->nAggrs) conf->nAggrs = ADIOI_MAX(1,conf->ioMinSize-1); /* not including bridge itself */ -/* if(conf->nAggrs > conf->numBridgeRanks) - conf->nAggrs = conf->numBridgeRanks; +/* if(conf->nAggrs > conf->numBridgeRanks) + conf->nAggrs = conf->numBridgeRanks; */ conf->aggRatio = 1. * conf->nAggrs / conf->ioMinSize /*virtualPsetSize*/; /* if(conf->aggRatio > 1) conf->aggRatio = 1.; */ @@ -369,7 +369,7 @@ ADIOI_BG_persInfo_init(ADIOI_BG_ConfInfo_t *conf, } -void +void ADIOI_BG_persInfo_free( ADIOI_BG_ConfInfo_t *conf, ADIOI_BG_ProcInfo_t *proc ) { ADIOI_BG_ConfInfo_free( conf ); diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.c index f08f112a3c0..8c1ed2d99f6 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.h b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.h index 0b94c780eaa..427af0a8ebd 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.h +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. +/* + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -26,32 +26,32 @@ extern globus_ftp_client_operationattr_t oattr[ADIO_GRIDFTP_HANDLES_MAX]; /* TODO: weed out the now-unused prototypes */ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code); void ADIOI_GRIDFTP_Close(ADIO_File fd, int *error_code); -void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); -void ADIOI_GRIDFTP_IwriteContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_GRIDFTP_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); -void ADIOI_GRIDFTP_IreadContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_GRIDFTP_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); + *error_code); int ADIOI_GRIDFTP_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_GRIDFTP_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code); void ADIOI_GRIDFTP_ReadComplete(ADIO_Request *request, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_GRIDFTP_WriteComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code); -void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, - int *error_code); + int *error_code); +void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, + int *error_code); void ADIOI_GRIDFTP_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, @@ -79,10 +79,10 @@ void ADIOI_GRIDFTP_IwriteStrided(ADIO_File fd, void *buf, int count, void ADIOI_GRIDFTP_Flush(ADIO_File fd, int *error_code); void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); -void ADIOI_GRIDFTP_Get_shared_fp(ADIO_File fd, int size, - ADIO_Offset *shared_fp, +void ADIOI_GRIDFTP_Get_shared_fp(ADIO_File fd, int size, + ADIO_Offset *shared_fp, int *error_code); -void ADIOI_GRIDFTP_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, +void ADIOI_GRIDFTP_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code); void ADIOI_GRIDFTP_Delete(char *filename, int *error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_close.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_close.c index c1693d65ce0..c80dec31752 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_delete.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_delete.c index 54eb7144295..2217e12e8f2 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_delete.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -13,7 +13,7 @@ static globus_cond_t cond; static globus_bool_t delete_done, delete_success; static void delete_cb(void *myarg, globus_ftp_client_handle_t *handle, globus_object_t *error) { - + if (error) { FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); @@ -39,7 +39,7 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) globus_module_activate(GLOBUS_FTP_CLIENT_MODULE); result=globus_ftp_client_handle_init(&handle,GLOBUS_NULL); - + if (result != GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_handle_init",myname,result); @@ -47,11 +47,11 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); - return; + return; } - + delete_done=GLOBUS_FALSE; delete_success=GLOBUS_FALSE; result=globus_ftp_client_delete(&handle,filename,GLOBUS_NULL,delete_cb,GLOBUS_NULL); @@ -78,7 +78,7 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -89,7 +89,7 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); } } diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_fcntl.c index dd9cb5ee098..b5150cbdfb4 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -26,7 +26,7 @@ void fcntl_size_cb(void *myargs, globus_ftp_client_handle_t *handle, globus_mutex_unlock(&fcntl_size_lock); } -void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, +void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code) { MPI_Datatype copy_etype, copy_filetype; @@ -46,7 +46,7 @@ void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, { globus_result_t result; globus_off_t fsize=0; - + globus_mutex_init(&fcntl_size_lock,GLOBUS_NULL); globus_cond_init(&fcntl_size_cond,GLOBUS_NULL); fcntl_size_done=GLOBUS_FALSE; @@ -61,7 +61,7 @@ void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_flush.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_flush.c index 795341e8889..2f61e7f76d0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_hints.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_hints.c index c0b0a40ebb2..f008cdc247f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_hints.c @@ -1,11 +1,11 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ -/* +/* Valid hints for ftp:// and gsiftp:// URLs (aside from the std. ones): @@ -19,7 +19,7 @@ Valid hints for ftp:// and gsiftp:// URLs (aside from the std. ones): tcp_buffer integer size of tcp stream buffers in bytes - transfer_type ascii or binary (default binary) + transfer_type ascii or binary (default binary) These *must* be specified at open time currently. */ @@ -29,12 +29,12 @@ These *must* be specified at open time currently. void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) { - + if (!(fd->info)) { if ( users_info==MPI_INFO_NULL ) { - /* This must be part of the open call. */ + /* This must be part of the open call. */ MPI_Info_create(&(fd->info)); } else @@ -46,7 +46,7 @@ void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) { int i,nkeys,valuelen,flag; char key[MPI_MAX_INFO_KEY], value[MPI_MAX_INFO_VAL]; - + if ( users_info!=MPI_INFO_NULL ) { MPI_Info_get_nkeys(users_info,&nkeys); @@ -62,7 +62,7 @@ void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } } } - + /* let the generic ROMIO and MPI-I/O stuff happen... */ - ADIOI_GEN_SetInfo(fd, users_info, error_code); + ADIOI_GEN_SetInfo(fd, users_info, error_code); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_open.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_open.c index 45aab921051..e30e3811d44 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_open.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -12,7 +12,7 @@ static globus_cond_t cond; static globus_bool_t file_exists,exists_done; static void exists_cb(void *myargs, globus_ftp_client_handle_t *handle, globus_object_t *error) -{ +{ if (error) { FPRINTF(stderr, "%s\n", globus_object_printable_to_string(error)); @@ -77,7 +77,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) result=globus_ftp_client_handleattr_init(&hattr); if ( result != GLOBUS_SUCCESS ) { - + globus_err_handler("globus_ftp_client_handleattr_init", myname,result); @@ -114,41 +114,41 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) /* Since we're (almost by definition) doing things that FTP S (stream) control mode can't handle, default to E (extended block) control mode - for gsiftp:// URLs. ftp:// URLs use standard stream control mode + for gsiftp:// URLs. ftp:// URLs use standard stream control mode by default. This behavior can be overridden by the ftp_control_mode hint. */ /* - if ( !strncmp(fd->filename,"gsiftp:",7) && + if ( !strncmp(fd->filename,"gsiftp:",7) && (result=globus_ftp_client_operationattr_set_mode(&(oattr[fd->fd_sys]),GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_operationattr_set_mode",myname,result); - else if ( !strncmp(fd->filename,"ftp:",4) && + else if ( !strncmp(fd->filename,"ftp:",4) && (result=globus_ftp_client_operationattr_set_mode(&(oattr[fd->fd_sys]),GLOBUS_FTP_CONTROL_MODE_STREAM))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_operationattr_set_mode",myname,result); */ /* Set append mode if necessary */ - if ( (fd->access_mode&ADIO_APPEND) && + if ( (fd->access_mode&ADIO_APPEND) && ((result=globus_ftp_client_operationattr_set_append(&(oattr[fd->fd_sys]),GLOBUS_TRUE))!=GLOBUS_SUCCESS) ) globus_err_handler("globus_ftp_client_operationattr_set_append",myname,result); - /* Other hint and amode processing that would affect hattr and/or + /* Other hint and amode processing that would affect hattr and/or oattr[] (eg. parallelism, striping, etc.) goes here */ if ( fd->info!=MPI_INFO_NULL ) { ADIOI_Info_get(fd->info,"ftp_control_mode",MPI_MAX_INFO_VAL,hintval,&keyfound); if ( keyfound ) { - if ( ( !strcmp(hintval,"extended") || !strcmp(hintval,"extended_block") ) && + if ( ( !strcmp(hintval,"extended") || !strcmp(hintval,"extended_block") ) && (result=globus_ftp_client_operationattr_set_mode(&(oattr[fd->fd_sys]),GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_operationattr_set_mode",myname,result); - else if ( !strcmp(hintval,"block") && + else if ( !strcmp(hintval,"block") && (result=globus_ftp_client_operationattr_set_mode(&(oattr[fd->fd_sys]),GLOBUS_FTP_CONTROL_MODE_BLOCK))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_operationattr_set_mode",myname,result); - else if ( !strcmp(hintval,"compressed") && + else if ( !strcmp(hintval,"compressed") && (result=globus_ftp_client_operationattr_set_mode(&(oattr[fd->fd_sys]),GLOBUS_FTP_CONTROL_MODE_COMPRESSED))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_operationattr_set_mode",myname,result); - else if ( !strcmp(hintval,"stream") && + else if ( !strcmp(hintval,"stream") && (result=globus_ftp_client_operationattr_set_mode(&(oattr[fd->fd_sys]),GLOBUS_FTP_CONTROL_MODE_STREAM))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_operationattr_set_mode",myname,result); } @@ -157,7 +157,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) if ( keyfound ) { int nftpthreads; - + if ( sscanf(hintval,"%d",&nftpthreads)==1 ) { globus_ftp_control_parallelism_t parallelism; @@ -261,10 +261,10 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_exists",myname,result); - fd->fd_sys = -1; + fd->fd_sys = -1; *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -295,10 +295,10 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) { globus_err_handler("globus_ftp_client_put",myname,result); fd->fd_sys = -1; - *error_code = MPIO_Err_create_code(MPI_SUCCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -310,10 +310,10 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) if ( result != GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_register_write",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, - "**io", "**io %s", + "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -328,7 +328,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) { fd->fd_sys = -1; *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**io", 0); return; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_read.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_read.c index 6a0fc9c7c46..dee878e6b3f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_read.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -100,7 +100,7 @@ static void readdiscontig_data_cb(void *myargs, globus_ftp_client_handle_t *hand return; } -void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -156,12 +156,12 @@ void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, if ( result != GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_register_read",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; - } + } /* The ctl callback won't start till the data callbacks complete, so it's @@ -227,14 +227,14 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, MPI_Type_size_x(datatype,&btype_size); MPI_Type_extent(datatype,&btype_extent); ADIOI_Datatype_iscontig(datatype,&buf_contig); - + if ( ( btype_extent!=btype_size ) || ( ! buf_contig ) ) { FPRINTF(stderr,"[%d/%d] %s called with discontigous memory buffer\n", myrank,nprocs,myname); fflush(stderr); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", 0 ); return; } @@ -279,8 +279,8 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, FPRINTF(stderr,"[%d/%d] %s error in computing extent -- extent %d is smaller than total bytes requested %d!\n", myrank,nprocs,myname,extent,count*btype_size); fflush(stderr); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", 0); return; } @@ -301,9 +301,9 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_get",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -391,15 +391,15 @@ void ADIOI_GRIDFTP_ReadStrided(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); #ifdef PRINT_ERR_MSG - FPRINTF(stdout, "[%d/%d] ADIOI_GRIDFTP_ReadStrided called on %s\n", myrank, + FPRINTF(stdout, "[%d/%d] ADIOI_GRIDFTP_ReadStrided called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_ReadStrided\n", myrank, + FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_ReadStrided\n", myrank, nprocs); #endif ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); - + */ char myname[]="ADIOI_GRIDFTP_ReadStrided"; @@ -457,7 +457,7 @@ void ADIOI_GRIDFTP_ReadStrided(ADIO_File fd, void *buf, int count, ADIOI_Free(intermediate); } - else + else { /* Why did you bother calling ReadStrided?!?!?! */ ADIOI_GRIDFTP_ReadContig(fd, buf, count, datatype, diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_resize.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_resize.c index 96c0460c42f..f55c56951f5 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -113,9 +113,9 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_put",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -129,9 +129,9 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_register_write",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -161,9 +161,9 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_move",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -189,9 +189,9 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_third_party_transfer",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -213,9 +213,9 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_delete",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_IO, "**io", "**io %s", + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, + MPI_ERR_IO, "**io", "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_write.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_write.c index 0400dae30b7..3c6f36fea35 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/ad_gridftp_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ @@ -101,12 +101,12 @@ static void writediscontig_data_cb(void *myargs, globus_ftp_client_handle_t *han eof, writediscontig_data_cb, (void *)(bytes_written)); - FPRINTF(stderr,"wrote %Ld bytes...",(long long)length); + FPRINTF(stderr,"wrote %Ld bytes...",(long long)length); return; } -void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -227,7 +227,7 @@ void ADIOI_GRIDFTP_WriteDiscontig(ADIO_File fd, void *buf, int count, MPI_Type_size_x(datatype,&btype_size); MPI_Type_extent(datatype,&btype_extent); ADIOI_Datatype_iscontig(datatype,&buf_contig); - + if ( ( btype_extent!=btype_size ) || ( ! buf_contig ) ) { FPRINTF(stderr,"[%d/%d] %s called with discontigous memory buffer\n", @@ -348,7 +348,7 @@ void ADIOI_GRIDFTP_WriteDiscontig(ADIO_File fd, void *buf, int count, nblks++; } - + /* The ctl callback won't start till the data callbacks complete, so it's safe to wait on just the ctl callback */ globus_mutex_lock(&writediscontig_ctl_lock); @@ -392,7 +392,7 @@ void ADIOI_GRIDFTP_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type, offset, + ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); return; #else @@ -460,7 +460,7 @@ void ADIOI_GRIDFTP_WriteStrided(ADIO_File fd, void *buf, int count, ADIOI_Free(intermediate); } - else + else { /* Why did you bother calling WriteStrided?!?!?! */ FPRINTF(stderr,"[%d/%d] Why the heck did you call %s with contiguous buffer *and* file types?\n", diff --git a/ompi/mca/io/romio314/romio/adio/ad_gridftp/globus_routines.c b/ompi/mca/io/romio314/romio/adio/ad_gridftp/globus_routines.c index 1cca367a3f7..bb4a48dad18 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_gridftp/globus_routines.c +++ b/ompi/mca/io/romio314/romio/adio/ad_gridftp/globus_routines.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. + * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.c b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.c index ad99ff7b815..860c42bdc3d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.h b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.h index 2950aa50fcf..27bd5dfa9c1 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -19,16 +19,16 @@ #endif void ADIOI_HFS_Open(ADIO_File fd, int *error_code); -void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_HFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_HFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_HFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_HFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_fcntl.c index 460c73666fe..0bc48c763e3 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -25,20 +25,20 @@ void ADIOI_HFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *er case ADIO_FCNTL_GET_FSIZE: fcntl_struct->fsize = lseek64(fd->fd_sys, 0, SEEK_END); #ifdef HPUX - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) lseek64(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); /* not required in SPPUX since there we use pread/pwrite */ #endif if (fcntl_struct->fsize == -1) { #ifdef MPICH - *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", + *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); #elif defined(PRINT_ERR_MSG) *error_code = MPI_ERR_UNKNOWN; #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; @@ -52,7 +52,7 @@ void ADIOI_HFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *er /* prealloc64 works only if file is of zero length */ if (err && (errno != ENOTEMPTY)) { #ifdef MPICH - *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", + *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); #elif defined(PRINT_ERR_MSG) *error_code = MPI_ERR_UNKNOWN; @@ -84,16 +84,16 @@ void ADIOI_HFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *er #endif return; } - } + } - if ((fcntl_struct->diskspace > 2147483647) || + if ((fcntl_struct->diskspace > 2147483647) || (err && (errno == ENOTEMPTY))) { #endif ADIOI_GEN_Prealloc(fd,fcntl_struct->diskspace, error_code); } ADIOI_Free(buf); #ifdef HPUX - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) lseek64(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); /* not required in SPPUX since there we use pread/pwrite */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_open.c index 46ee2848e56..7df8868d7e6 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -53,14 +53,14 @@ void ADIOI_HFS_Open(ADIO_File fd, int *error_code) if (fd->fd_sys == -1 ) { #ifdef MPICH - *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", + *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); #elif defined(PRINT_ERR_MSG) *error_code = MPI_ERR_UNKNOWN; #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); + ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_read.c index eac03ab6f80..145bae19323 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_read.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ #define lseek64 lseek #endif -void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -26,7 +26,7 @@ void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, #ifdef SPPUX fd->fp_sys_posn = -1; /* set it to null, since we are using pread */ - if (file_ptr_type == ADIO_EXPLICIT_OFFSET) + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) err = pread64(fd->fd_sys, buf, len, offset); else { /* read from curr. location of ind. file pointer */ err = pread64(fd->fd_sys, buf, len, fd->fp_ind); @@ -40,15 +40,15 @@ void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, lseek64(fd->fd_sys, offset, SEEK_SET); err = read(fd->fd_sys, buf, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* read from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) lseek64(fd->fd_sys, fd->fp_ind, SEEK_SET); err = read(fd->fd_sys, buf, len); - fd->fp_ind += err; + fd->fp_ind += err; fd->fp_sys_posn = fd->fp_ind; - } + } #endif #ifdef HAVE_STATUS_SET_BYTES @@ -64,7 +64,7 @@ void ADIOI_HFS_ReadContig(ADIO_File fd, void *buf, int count, #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_resize.c index de24ad672ae..3496849939c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -13,7 +13,7 @@ void ADIOI_HFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) #ifndef PRINT_ERR_MSG static char myname[] = "ADIOI_HFS_RESIZE"; #endif - + err = ftruncate64(fd->fd_sys, size); if (err == -1) { #ifdef MPICH @@ -24,7 +24,7 @@ void ADIOI_HFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_write.c index 4bffa82a2f9..3bde18d2bbc 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_hfs/ad_hfs_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ #define lseek64 lseek #endif -void ADIOI_HFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_HFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -25,7 +25,7 @@ void ADIOI_HFS_WriteContig(ADIO_File fd, void *buf, int count, #ifdef SPPUX fd->fp_sys_posn = -1; /* set it to null, since we are using pwrite */ - if (file_ptr_type == ADIO_EXPLICIT_OFFSET) + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) err = pwrite64(fd->fd_sys, buf, len, offset); else { /* write from curr. location of ind. file pointer */ err = pwrite64(fd->fd_sys, buf, len, fd->fp_ind); @@ -39,7 +39,7 @@ void ADIOI_HFS_WriteContig(ADIO_File fd, void *buf, int count, lseek64(fd->fd_sys, offset, SEEK_SET); err = write(fd->fd_sys, buf, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* write from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/README b/ompi/mca/io/romio314/romio/adio/ad_lustre/README index a217c0f8fe5..d27110f42f0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/README +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/README @@ -1,11 +1,11 @@ -Upcoming soon: +Upcoming soon: o Hierarchical striping as described in the paper from CCGrid2007 http://ft.ornl.gov/projects/io/pubs/CCGrid-2007-file-joining.pdf Further out: o To post the code for ParColl (Partitioned collective IO) - + ----------------------------------------------------- -V05: +V05: ----------------------------------------------------- Improved data redistribution o Improve I/O pattern identification. Besides checking interleaving, @@ -20,12 +20,12 @@ Improved data redistribution more constant clients. ----------------------------------------------------- -V04: +V04: ----------------------------------------------------- o Direct IO and Lockless IO support ----------------------------------------------------- -V03: +V03: ----------------------------------------------------- o Correct detection of fs_type when lustre: prefix is not given o Further fix on stripe alignment @@ -34,21 +34,21 @@ V03: ----------------------------------------------------- V02: ----------------------------------------------------- -The Lustre ADIO driver has been cleaned up quite a lot. Compared +The Lustre ADIO driver has been cleaned up quite a lot. Compared to the intital posting, here are the changes: o Removal of dead/redundant code o Removal of asynchronous IO piece as it appears outdated o Bug fixes for setting Lustre Hints - o Bug fixes for data sieving - o Improved Setsize operation with one process calling ftruncate - o Improved collective IO with domain partitioning on + o Bug fixes for data sieving + o Improved Setsize operation with one process calling ftruncate + o Improved collective IO with domain partitioning on Lustre stripe boundary Contributing: - o You may contribute via many different ways, such as + o You may contribute via many different ways, such as testing results, bug reports, and new feature patches. o We appreciate any courtesy reference of this work. - o Disclaimer: you are welcome to try the code, but at your own risk. + o Disclaimer: you are welcome to try the code, but at your own risk. Contact info: For more info, visit http://ft.ornl.gov/projects/io/ diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_aggregate.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_aggregate.c index cd552829ed3..ce893a30e3f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_aggregate.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_aggregate.c @@ -49,23 +49,23 @@ void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr, /* Calculate how many IO clients we need */ /* Algorithm courtesy Pascal Deveze (pascal.deveze@bull.net) */ /* To avoid extent lock conflicts, - * avail_cb_nodes should either + * avail_cb_nodes should either * - be a multiple of stripe_count, * - or divide stripe_count exactly * so that each OST is accessed by a maximum of CO constant clients. */ if (nprocs_for_coll >= stripe_count) /* avail_cb_nodes should be a multiple of stripe_count and the number * of procs per OST should be limited to the minimum between - * nprocs_for_coll/stripe_count and CO - * - * e.g. if stripe_count=20, nprocs_for_coll=42 and CO=3 then + * nprocs_for_coll/stripe_count and CO + * + * e.g. if stripe_count=20, nprocs_for_coll=42 and CO=3 then * avail_cb_nodes should be equal to 40 */ - avail_cb_nodes = + avail_cb_nodes = stripe_count * ADIOI_MIN(nprocs_for_coll/stripe_count, CO); else { /* nprocs_for_coll is less than stripe_count */ /* avail_cb_nodes should divide stripe_count */ - /* e.g. if stripe_count=60 and nprocs_for_coll=8 then + /* e.g. if stripe_count=60 and nprocs_for_coll=8 then * avail_cb_nodes should be egal to 6 */ /* This could be done with : while (stripe_count % avail_cb_nodes != 0) avail_cb_nodes--; @@ -83,7 +83,7 @@ void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr, } /* if divisor is less than nprocs_for_coll, divisor is a * solution, but it is not sure that it is the best one */ - else if (divisor <= nprocs_for_coll) + else if (divisor <= nprocs_for_coll) avail_cb_nodes = divisor; } divisor++; @@ -202,7 +202,7 @@ void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list, for (i = 0; i < nprocs; i++) { /* add one to count_my_req_per_proc[i] to avoid zero size malloc */ buf_idx[i] = (int *) ADIOI_Malloc((count_my_req_per_proc[i] + 1) - * sizeof(int)); + * sizeof(int)); } /* now allocate space for my_req, offset, and len */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_fcntl.c index a4bd6fc6d17..61d4b66205f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_fcntl.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. * * Copyright (C) 2007 Oak Ridge National Laboratory @@ -22,11 +22,11 @@ void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int switch(flag) { case ADIO_FCNTL_GET_FSIZE: fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END); - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); if (fcntl_struct->fsize == -1) { - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); } else *error_code = MPI_SUCCESS; @@ -34,11 +34,11 @@ void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int case ADIO_FCNTL_SET_DISKSPACE: /* will be called by one process only */ - /* On file systems with no preallocation function, I have to - explicitly write - to allocate space. Since there could be holes in the file, - I need to read up to the current file size, write it back, - and then write beyond that depending on how much + /* On file systems with no preallocation function, I have to + explicitly write + to allocate space. Since there could be holes in the file, + I need to read up to the current file size, write it back, + and then write beyond that depending on how much preallocation is needed. read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */ @@ -46,7 +46,7 @@ void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int alloc_size = fcntl_struct->diskspace; size = ADIOI_MIN(curr_fsize, alloc_size); - + ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ); done = 0; @@ -56,31 +56,31 @@ void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done, &status, error_code); if (*error_code != MPI_SUCCESS) { - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); - return; + return; } - ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, + ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done, &status, error_code); if (*error_code != MPI_SUCCESS) return; done += len; } if (alloc_size > curr_fsize) { - memset(buf, 0, ADIOI_PREALLOC_BUFSZ); + memset(buf, 0, ADIOI_PREALLOC_BUFSZ); size = alloc_size - curr_fsize; ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; for (i=0; ifp_sys_posn != -1) + if (fd->fp_sys_posn != -1) lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); *error_code = MPI_SUCCESS; break; diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c index e30d433dac6..00aebd1a57d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_hints.c @@ -108,7 +108,7 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) if (users_info != MPI_INFO_NULL) { /* CO: IO Clients/OST, * to keep the load balancing between clients and OSTs */ - ADIOI_Info_check_and_install_int(fd, users_info, "romio_lustre_co_ratio", + ADIOI_Info_check_and_install_int(fd, users_info, "romio_lustre_co_ratio", &(fd->hints->fs_hints.lustre.co_ratio), myname, error_code ); /* coll_threshold: diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c index 079e4dbb307..c7add090637 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_open.c @@ -165,7 +165,7 @@ void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code) ADIOI_Free(value); /* --BEGIN ERROR HANDLING-- */ - if (fd->fd_sys == -1 || ((fd->fd_direct == -1) && + if (fd->fd_sys == -1 || ((fd->fd_direct == -1) && (fd->direct_write || fd->direct_read))) { *error_code = ADIOI_Err_create_code(myname, fd->filename, errno); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_rwcontig.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_rwcontig.c index cb187a39e9c..c7372676354 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_rwcontig.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_rwcontig.c @@ -94,7 +94,7 @@ static int ADIOI_LUSTRE_Directio(ADIO_File fd, const void *buf, int len, else nbytes += pwrite(fd->fd_sys, buf, size, offset); } err = nbytes; - } else { + } else { if (!(((long) buf) % fd->d_mem)) { ADIOI_LUSTRE_Aligned_Mem_File_Read(fd, buf, size, offset, &err); nbytes += err; @@ -115,11 +115,11 @@ static int ADIOI_LUSTRE_Directio(ADIO_File fd, const void *buf, int len, static void ADIOI_LUSTRE_IOContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int io_mode, int *error_code); static void ADIOI_LUSTRE_IOContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int io_mode, int *error_code) { int err=-1; @@ -138,7 +138,7 @@ static void ADIOI_LUSTRE_IOContig(ADIO_File fd, const void *buf, int count, err = lseek(fd->fd_sys, offset, SEEK_SET); if (err == -1) goto ioerr; } - + if (io_mode) { #ifdef ADIOI_MPE_LOGGING MPE_Log_event(ADIOI_MPE_write_a, 0, NULL); @@ -164,7 +164,7 @@ static void ADIOI_LUSTRE_IOContig(ADIO_File fd, const void *buf, int count, fd->fp_sys_posn = offset + err; if (file_ptr_type == ADIO_INDIVIDUAL) { - fd->fp_ind += err; + fd->fp_ind += err; } #ifdef HAVE_STATUS_SET_BYTES @@ -194,7 +194,7 @@ void ADIOI_LUSTRE_WriteContig(ADIO_File fd, const void *buf, int count, offset, status, 1, error_code); } -void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { diff --git a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_wrcoll.c b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_wrcoll.c index 3299ad5af3d..51476dc27f4 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_wrcoll.c +++ b/ompi/mca/io/romio314/romio/adio/ad_lustre/ad_lustre_wrcoll.c @@ -42,7 +42,7 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, ADIO_Offset *len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, int *count, - int *start_pos, + int *start_pos, int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, @@ -288,7 +288,7 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf, int myrank, ADIOI_Access *others_req, ADIOI_Access *my_req, ADIO_Offset *offset_list, - ADIO_Offset *len_list, + ADIO_Offset *len_list, int contig_access_count, int *striping_info, int **buf_idx, int *error_code) @@ -620,7 +620,7 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, ADIO_Offset *len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, int *count, - int *start_pos, + int *start_pos, int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.c index 725c4d1ead6..e69d8390460 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.h b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.h index 83d394af619..a06f9da26db 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -25,7 +25,7 @@ #include #endif -/* Workaround for incomplete set of definitions if __REDIRECT is not +/* Workaround for incomplete set of definitions if __REDIRECT is not defined and large file support is used in aio.h */ #if !defined(__REDIRECT) && defined(__USE_FILE_OFFSET64) #define aiocb aiocb64 @@ -39,32 +39,32 @@ int ADIOI_NFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, #endif void ADIOI_NFS_Open(ADIO_File fd, int *error_code); -void ADIOI_NFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_NFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); void ADIOI_NFS_WriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); -void ADIOI_NFS_IwriteContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_NFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); -void ADIOI_NFS_IreadContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_NFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); + *error_code); int ADIOI_NFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_NFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code); void ADIOI_NFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_NFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code); + int *error_code); void ADIOI_NFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_done.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_done.c index ff688546cab..8ebe5835706 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_done.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_done.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,4 +16,4 @@ int ADIOI_NFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code) { return ADIOI_NFS_ReadDone(request, status, error_code); -} +} diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_fcntl.c index c73006e6cd9..ea06e114c73 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -57,7 +57,7 @@ void ADIOI_NFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *er /* --BEGIN ERROR HANDLING-- */ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_ARG, + MPI_ERR_ARG, "**flag", "**flag %d", flag); return; /* --END ERROR HANDLING-- */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_features.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_features.c index 05b061acf47..a4153e95171 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_features.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_features.c @@ -8,7 +8,7 @@ #include "ad_nfs.h" int ADIOI_NFS_Feature(ADIO_File fd, int flag) -{ +{ switch(flag) { case ADIO_SHARED_FP: case ADIO_LOCKS: diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_getsh.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_getsh.c index 974d547cc13..a1f62906381 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_getsh.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_getsh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,11 +23,11 @@ void ADIOI_NFS_Get_shared_fp(ADIO_File fd, ADIO_Offset incr, ADIO_Offset *shared if (fd->shared_fp_fd == ADIO_FILE_NULL) { MPI_Comm_dup(MPI_COMM_SELF, &dupcommself); fd->shared_fp_fd = ADIO_Open(MPI_COMM_SELF, dupcommself, - fd->shared_fp_fname, + fd->shared_fp_fname, fd->file_system, fd->fns, - ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, - 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, + ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, + 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, ADIO_PERM_NULL, error_code); if (*error_code != MPI_SUCCESS) return; *shared_fp = 0; @@ -40,7 +40,7 @@ void ADIOI_NFS_Get_shared_fp(ADIO_File fd, ADIO_Offset incr, ADIO_Offset *shared MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); #endif /* if the file is empty, the above read may return error - (reading beyond end of file). In that case, shared_fp = 0, + (reading beyond end of file). In that case, shared_fp = 0, set above, is the correct value. */ } else { diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_hints.c index 0e5386d22bb..46480d51d1c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -9,5 +9,5 @@ void ADIOI_NFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) { - ADIOI_GEN_SetInfo(fd, users_info, error_code); + ADIOI_GEN_SetInfo(fd, users_info, error_code); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iread.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iread.c index 28d20281059..2b4e19907c8 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iread.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iread.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -8,10 +8,10 @@ #ifdef ROMIO_HAVE_WORKING_AIO /* nearly identical to ADIOI_GEN_IreadContig, except we lock around I/O */ -void ADIOI_NFS_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_NFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, - int *error_code) + int *error_code) { MPI_Count len, typesize; int aio_errno = 0; diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iwrite.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iwrite.c index f27b099fa54..c0fff5c4cb9 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iwrite.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_iwrite.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,9 +16,9 @@ static MPIX_Grequest_class ADIOI_GEN_greq_class = 0; /* this routine is nearly identical to ADIOI_GEN_IwriteContig, except we lock * around I/O */ -void ADIOI_NFS_IwriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_NFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Request *request, int *error_code) + ADIO_Offset offset, ADIO_Request *request, int *error_code) { MPI_Count len, typesize; int aio_errno = 0; @@ -118,9 +118,9 @@ int ADIOI_NFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, } aio_req->aiocbp = aiocbp; if (ADIOI_GEN_greq_class == 0) { - MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, - ADIOI_GEN_aio_free_fn, MPIU_Greq_cancel_fn, - ADIOI_GEN_aio_poll_fn, ADIOI_GEN_aio_wait_fn, + MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, + ADIOI_GEN_aio_free_fn, MPIU_Greq_cancel_fn, + ADIOI_GEN_aio_poll_fn, ADIOI_GEN_aio_wait_fn, &ADIOI_GEN_greq_class); } MPIX_Grequest_class_allocate(ADIOI_GEN_greq_class, aio_req, request); diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_open.c index d8763292b91..d2ae6b22f1c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -19,7 +19,7 @@ void ADIOI_NFS_Open(ADIO_File fd, int *error_code) perm = old_mask ^ 0666; } else perm = fd->perm; - + amode = 0; if (fd->access_mode & ADIO_CREATE) amode = amode | O_CREAT; diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_read.c index 18dfde712c0..0a74dafe989 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_read.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_nfs.h" #include "adio_extern.h" -void ADIOI_NFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_NFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -41,7 +41,7 @@ void ADIOI_NFS_ReadContig(ADIO_File fd, void *buf, int count, #endif ADIOI_UNLOCK(fd, offset, SEEK_SET, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* read from curr. location of ind. file pointer */ offset = fd->fp_ind; @@ -174,7 +174,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, ADIO_Offset abs_off_in_filetype=0; int req_len, partial_read; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off; ADIO_Offset off, req_off, disp, end_offset=0, readbuf_off, start_off; @@ -192,7 +192,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -206,7 +206,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, /* get max_bufsize from the info object. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL, value, + ADIOI_Info_get(fd->info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL, value, &info_flag); max_bufsize = atoi(value); ADIOI_Free(value); @@ -219,7 +219,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + etype_size * offset; start_off = off; @@ -250,7 +250,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, if (!(fd->atomicity)) ADIOI_UNLOCK(fd, readbuf_off, SEEK_SET, readbuf_len); if (err == -1) err_flag = 1; - for (j=0; jcount; i++) { userbuf_off = j*buftype_extent + flat_buf->indices[i]; req_off = off; @@ -288,7 +288,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = (offset - flat_file->indices[0]) / filetype_extent; offset -= (ADIO_Offset)n_filetypes * filetype_extent; /* now offset is local to this extent */ - + /* find the block where offset is located, skip blocklens[i]==0 */ for (i=0; icount; i++) { ADIO_Offset dist; @@ -301,7 +301,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, frd_size = flat_file->blocklens[i]; break; } - if (dist > 0 ) { + if (dist > 0 ) { frd_size = dist; break; } @@ -314,7 +314,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -328,7 +328,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, } /* abs. offset in bytes in the file */ - offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + + offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype; } @@ -342,7 +342,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, offset, status, error_code); if (file_ptr_type == ADIO_INDIVIDUAL) { - /* update MPI-IO file pointer to point to the first byte that + /* update MPI-IO file pointer to point to the first byte that * can be accessed in the fileview. */ fd->fp_ind = offset + bufsize; if (bufsize == frd_size) { @@ -357,10 +357,10 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, + n_filetypes*filetype_extent; } } - fd->fp_sys_posn = -1; /* set it to null. */ + fd->fp_sys_posn = -1; /* set it to null. */ #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -#endif +#endif return; } @@ -426,9 +426,9 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = st_n_filetypes; frd_size = ADIOI_MIN(st_frd_size, bufsize); while (i < bufsize) { - if (frd_size) { - /* TYPE_UB and TYPE_LB can result in - frd_size = 0. save system call in such cases */ + if (frd_size) { + /* TYPE_UB and TYPE_LB can result in + frd_size = 0. save system call in such cases */ /* lseek(fd->fd_sys, off, SEEK_SET); err = read(fd->fd_sys, ((char *) buf) + i, frd_size);*/ @@ -451,7 +451,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; frd_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i); } @@ -495,7 +495,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; new_frd_size = flat_file->blocklens[j]; @@ -511,7 +511,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, k = (k + 1)%flat_buf->count; buf_count++; i = (int) (buftype_extent*(buf_count/flat_buf->count) + - flat_buf->indices[k]); + flat_buf->indices[k]); new_brd_size = flat_buf->blocklens[k]; if (size != frd_size) { off += size; @@ -523,7 +523,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, brd_size = new_brd_size; } } - + if (fd->atomicity) ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); @@ -544,8 +544,8 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to - keep track of how much data was actually read and placed in buf +/* This is a temporary way of filling in status. The right way is to + keep track of how much data was actually read and placed in buf by ADIOI_BUFFERED_READ. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_resize.c index d86dfcc77ed..957b5bd809a 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_setsh.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_setsh.c index 42e558cb476..f0f79379d04 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_setsh.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_setsh.c @@ -1,17 +1,17 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_nfs.h" -/* set the shared file pointer to "offset" etypes relative to the current +/* set the shared file pointer to "offset" etypes relative to the current view */ /* -This looks very similar to ADIOI_GEN_Set_shared_fp, except this +This looks very similar to ADIOI_GEN_Set_shared_fp, except this function avoids locking the file twice. The generic version does Write lock @@ -24,7 +24,7 @@ caching. To avoid the lock being called twice, this version for NFS does Write lock Lseek Write -Unlock +Unlock */ @@ -37,10 +37,10 @@ void ADIOI_NFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code) if (fd->shared_fp_fd == ADIO_FILE_NULL) { MPI_Comm_dup(MPI_COMM_SELF, &dupcommself); fd->shared_fp_fd = ADIO_Open(MPI_COMM_SELF, dupcommself, - fd->shared_fp_fname, + fd->shared_fp_fname, fd->file_system, fd->fns, - ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, - 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, + ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, + 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, ADIO_PERM_NULL, error_code); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_wait.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_wait.c index e1037fc5513..218ac5d14b1 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_wait.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_wait.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_write.c index 660e8682d97..b41488036e5 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_nfs/ad_nfs_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -39,7 +39,7 @@ void ADIOI_NFS_WriteContig(ADIO_File fd, const void *buf, int count, #endif ADIOI_UNLOCK(fd, offset, SEEK_SET, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* write from curr. location of ind. file pointer */ offset = fd->fp_ind; @@ -278,7 +278,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, ADIO_Offset abs_off_in_filetype=0; int req_len; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off; ADIO_Offset off, req_off, disp, end_offset=0, writebuf_off, start_off; @@ -295,7 +295,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -309,7 +309,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, /* get max_bufsize from the info object. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL, value, + ADIOI_Info_get(fd->info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL, value, &info_flag); max_bufsize = atoi(value); ADIOI_Free(value); @@ -322,7 +322,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + etype_size * offset; start_off = off; @@ -332,10 +332,10 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1)); /* if atomicity is true, lock the region to be accessed */ - if (fd->atomicity) + if (fd->atomicity) ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); - for (j=0; jcount; i++) { userbuf_off = j*buftype_extent + flat_buf->indices[i]; req_off = off; @@ -348,7 +348,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); #endif - lseek(fd->fd_sys, writebuf_off, SEEK_SET); + lseek(fd->fd_sys, writebuf_off, SEEK_SET); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL ); #endif @@ -356,14 +356,14 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - err = write(fd->fd_sys, writebuf, writebuf_len); + err = write(fd->fd_sys, writebuf, writebuf_len); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); #endif if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); - if (err == -1) err_flag = 1; + if (err == -1) err_flag = 1; - if (fd->atomicity) + if (fd->atomicity) ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off; @@ -415,7 +415,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -429,7 +429,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, } /* abs. offset in bytes in the file */ - offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + + offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype; } @@ -442,7 +442,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, offset, status, error_code); if (file_ptr_type == ADIO_INDIVIDUAL) { - /* update MPI-IO file pointer to point to the first byte + /* update MPI-IO file pointer to point to the first byte * that can be accessed in the fileview. */ fd->fp_ind = offset + bufsize; if (bufsize == fwr_size) { @@ -457,10 +457,10 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, + (ADIO_Offset)n_filetypes*filetype_extent; } } - fd->fp_sys_posn = -1; /* set it to null. */ + fd->fp_sys_posn = -1; /* set it to null. */ #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -#endif +#endif return; } @@ -483,13 +483,13 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i); } /* if atomicity is true, lock the region to be accessed */ - if (fd->atomicity) + if (fd->atomicity) ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); /* initial read for the read-modify-write */ @@ -500,14 +500,14 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); #endif - lseek(fd->fd_sys, writebuf_off, SEEK_SET); + lseek(fd->fd_sys, writebuf_off, SEEK_SET); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL ); #endif #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif - err = read(fd->fd_sys, writebuf, writebuf_len); + err = read(fd->fd_sys, writebuf, writebuf_len); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); #endif @@ -531,9 +531,9 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes = st_n_filetypes; fwr_size = ADIOI_MIN(st_fwr_size, bufsize); while (i < bufsize) { - if (fwr_size) { - /* TYPE_UB and TYPE_LB can result in - fwr_size = 0. save system call in such cases */ + if (fwr_size) { + /* TYPE_UB and TYPE_LB can result in + fwr_size = 0. save system call in such cases */ /* lseek(fd->fd_sys, off, SEEK_SET); err = write(fd->fd_sys, ((char *) buf) + i, fwr_size);*/ @@ -556,7 +556,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i); } @@ -601,7 +601,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; new_fwr_size = flat_file->blocklens[j]; @@ -617,7 +617,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, k = (k + 1)%flat_buf->count; buf_count++; i = (int) (buftype_extent*(buf_count/flat_buf->count) + - flat_buf->indices[k]); + flat_buf->indices[k]); new_bwr_size = flat_buf->blocklens[k]; if (size != fwr_size) { off += size; @@ -630,11 +630,11 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, } } - /* write the buffer out finally */ + /* write the buffer out finally */ #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); #endif - lseek(fd->fd_sys, writebuf_off, SEEK_SET); + lseek(fd->fd_sys, writebuf_off, SEEK_SET); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL ); #endif @@ -642,7 +642,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - err = write(fd->fd_sys, writebuf, writebuf_len); + err = write(fd->fd_sys, writebuf, writebuf_len); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); #endif @@ -651,7 +651,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); else ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); - if (err == -1) err_flag = 1; + if (err == -1) err_flag = 1; if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off; if (err_flag) { @@ -667,7 +667,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.c index 8789fc378cf..823596e95ee 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.h b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.h index aed6168bd8b..2f9945971bb 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs.h @@ -1,8 +1,8 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -28,32 +28,32 @@ int ADIOI_NTFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, void ADIOI_NTFS_Open(ADIO_File fd, int *error_code); void ADIOI_NTFS_Close(ADIO_File fd, int *error_code); -void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); -void ADIOI_NTFS_IwriteContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_NTFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); -void ADIOI_NTFS_IreadContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_NTFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); + *error_code); int ADIOI_NTFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_NTFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code); void ADIOI_NTFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_NTFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code); + int *error_code); void ADIOI_NTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_NTFS_IwriteStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_close.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_close.c index 95022dca77b..8a0d4d3a90e 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_done.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_done.c index 9f4967b48ba..c5edb683953 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_done.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_done.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_fcntl.c index 4c7d66cd074..721709a505c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_fcntl.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,7 +17,7 @@ void ADIOI_NTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *e { case ADIO_FCNTL_GET_FSIZE: fcntl_struct->fsize = SetFilePointer(fd->fd_sys, 0, 0, FILE_END); - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) { dwTemp = DWORDHIGH(fd->fp_sys_posn); if (SetFilePointer(fd->fd_sys, DWORDLOW(fd->fp_sys_posn), &dwTemp, FILE_BEGIN) == INVALID_SET_FILE_POINTER) diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_flush.c index 7656d60fb66..8dcfa20866d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iread.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iread.c index 845401ad44a..ff8f7c1b585 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iread.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iread.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_ntfs.h" -void ADIOI_NTFS_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_NTFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Request *request, int *error_code) + ADIO_Offset offset, ADIO_Request *request, int *error_code) { MPI_Count len, typesize; int err; diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iwrite.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iwrite.c index 40a567e564b..73216ddf8c0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iwrite.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_iwrite.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -12,7 +12,7 @@ static MPIX_Grequest_class ADIOI_NTFS_greq_class = 0; -/* Fills the input buffer, errMsg, with the error message +/* Fills the input buffer, errMsg, with the error message corresponding to error code, error */ void ADIOI_NTFS_Strerror(int error, char *errMsg, int errMsgLen) { @@ -44,20 +44,20 @@ int ADIOI_NTFS_aio_poll_fn(void *extra_state, MPI_Status *status) ADIOI_AIO_Request *aio_req; int mpi_errno = MPI_SUCCESS; - /* FIXME: Validate the args -- has it already been done by the + /* FIXME: Validate the args -- has it already been done by the caller ? */ aio_req = (ADIOI_AIO_Request *)extra_state; - + /* XXX: test for AIO completion here */ - if(!GetOverlappedResult( aio_req->fd, aio_req->lpOvl, + if(!GetOverlappedResult( aio_req->fd, aio_req->lpOvl, &(aio_req->nbytes), FALSE)){ if(GetLastError() == ERROR_IO_INCOMPLETE){ /* IO in progress */ /* TODO: need to diddle with status somehow */ }else{ /* Error occured */ - /* TODO: unsure how to handle this */ + /* TODO: unsure how to handle this */ } }else{ mpi_errno = MPI_Grequest_complete(aio_req->req); @@ -82,7 +82,7 @@ int ADIOI_NTFS_aio_wait_fn(int count, void **array_of_states, LPHANDLE lpHandles; DWORD retObject=0; - /* FIXME: Validate the args -- has it already been done by the + /* FIXME: Validate the args -- has it already been done by the caller ? */ aio_reqlist = (ADIOI_AIO_Request **)array_of_states; lpHandles = (LPHANDLE) ADIOI_Calloc(count, sizeof(HANDLE)); @@ -101,12 +101,12 @@ int ADIOI_NTFS_aio_wait_fn(int count, void **array_of_states, /* XXX: wait for one request to complete */ /* FIXME: Is the timeout in seconds ? */ timeout = (timeout <= 0) ? INFINITE : (timeout * 1000); - + if((retObject = WaitForMultipleObjects(count, lpHandles, FALSE, timeout)) != WAIT_FAILED){ retObject = retObject - WAIT_OBJECT_0; - if(GetOverlappedResult( aio_reqlist[retObject]->fd, - aio_reqlist[retObject]->lpOvl, &(aio_reqlist[retObject]->nbytes), + if(GetOverlappedResult( aio_reqlist[retObject]->fd, + aio_reqlist[retObject]->lpOvl, &(aio_reqlist[retObject]->nbytes), FALSE)){ /* XXX: mark completed requests as 'done'*/ mpi_errno = MPI_Grequest_complete(aio_reqlist[retObject]->req); @@ -123,7 +123,7 @@ int ADIOI_NTFS_aio_wait_fn(int count, void **array_of_states, /* TODO: need to diddle with status somehow */ }else{ /* Error occured */ - /* TODO: not sure how to handle this */ + /* TODO: not sure how to handle this */ } } }else{ @@ -133,43 +133,43 @@ int ADIOI_NTFS_aio_wait_fn(int count, void **array_of_states, return mpi_errno; } -int ADIOI_NTFS_aio_query_fn(void *extra_state, MPI_Status *status) +int ADIOI_NTFS_aio_query_fn(void *extra_state, MPI_Status *status) { ADIOI_AIO_Request *aio_req; aio_req = (ADIOI_AIO_Request *)extra_state; - MPI_Status_set_elements(status, MPI_BYTE, aio_req->nbytes); + MPI_Status_set_elements(status, MPI_BYTE, aio_req->nbytes); - /* can never cancel so always true */ - MPI_Status_set_cancelled(status, 0); + /* can never cancel so always true */ + MPI_Status_set_cancelled(status, 0); - /* choose not to return a value for this */ - status->MPI_SOURCE = MPI_UNDEFINED; - /* tag has no meaning for this generalized request */ - status->MPI_TAG = MPI_UNDEFINED; - /* this generalized request never fails */ - return MPI_SUCCESS; + /* choose not to return a value for this */ + status->MPI_SOURCE = MPI_UNDEFINED; + /* tag has no meaning for this generalized request */ + status->MPI_TAG = MPI_UNDEFINED; + /* this generalized request never fails */ + return MPI_SUCCESS; } int ADIOI_NTFS_aio_free_fn(void *extra_state) { ADIOI_AIO_Request *aio_req; - /* FIXME: Validate the args -- has it already been done by the + /* FIXME: Validate the args -- has it already been done by the caller ? */ aio_req = (ADIOI_AIO_Request*)extra_state; CloseHandle(aio_req->lpOvl->hEvent); ADIOI_Free(aio_req->lpOvl); ADIOI_Free(aio_req); - return MPI_SUCCESS; + return MPI_SUCCESS; } -void ADIOI_NTFS_IwriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_NTFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, - int *error_code) + int *error_code) { MPI_Count len, typesize; int err; @@ -255,7 +255,7 @@ int ADIOI_NTFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, aio_req->lpOvl->Offset = DWORDLOW(offset); aio_req->lpOvl->OffsetHigh = DWORDHIGH(offset); aio_req->fd = fd_sys; - + /* XXX: initiate async I/O */ if (wr) { @@ -267,7 +267,7 @@ int ADIOI_NTFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, } /* --BEGIN ERROR HANDLING-- */ - if (ret_val == FALSE) + if (ret_val == FALSE) { mpi_errno = GetLastError(); if (mpi_errno != ERROR_IO_PENDING) diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_open.c index 3a49418dbaa..2b41ad2ff69 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_open.c @@ -1,8 +1,8 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -57,12 +57,12 @@ void ADIOI_NTFS_Open(ADIO_File fd, int *error_code) attrib = attrib | FILE_FLAG_RANDOM_ACCESS; } - fd->fd_sys = CreateFile(fd->filename, + fd->fd_sys = CreateFile(fd->filename, amode, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - cmode, - attrib, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + cmode, + attrib, NULL); fd->fd_direct = -1; diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_read.c index 7c55c1bc376..3ffd58cbe40 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_read.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_ntfs.h" -void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -140,7 +140,7 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, ADIOI_Free(pOvl); fd->fp_sys_posn = offset + (ADIO_Offset)dwNumRead; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { @@ -231,9 +231,9 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, } ADIOI_Free(pOvl); - fd->fp_ind = fd->fp_ind + (ADIO_Offset)dwNumRead; + fd->fp_ind = fd->fp_ind + (ADIO_Offset)dwNumRead; fd->fp_sys_posn = fd->fp_ind; - } + } #ifdef HAVE_STATUS_SET_BYTES if (err != FALSE) diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_resize.c index 0fbeaaf9728..3f2ff58495c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_wait.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_wait.c index 80dfa4d3349..dd40a1bf686 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_wait.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_wait.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_ntfs.h" void ADIOI_NTFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code) + int *error_code) { return; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_write.c index 389e8669362..291de17b46d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ntfs/ad_ntfs_write.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_ntfs.h" -void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -16,7 +16,7 @@ void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, DWORD dwNumWritten = 0; MPI_Count err=-1, datatype_size, len; OVERLAPPED *pOvl; - + /* If file pointer type in ADIO_INDIVIDUAL then offset should be ignored and the current location of file pointer should be used */ if(file_ptr_type == ADIO_INDIVIDUAL){ @@ -121,7 +121,7 @@ void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, ADIOI_Free(pOvl); fd->fp_sys_posn = offset + dwNumWritten; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.c b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.c index fd9cd93ff86..6b2b13a3262 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * ad_panfs.c * * Copyright (C) 2001 University of Chicago. diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.h b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.h index 5f13f64fc39..4ccc73cb778 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs.h @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * ad_panfs.h * * Copyright (C) 2001 University of Chicago. @@ -27,7 +27,7 @@ typedef struct adiocb adiocb_t; void ADIOI_PANFS_Open(ADIO_File fd, int *error_code); void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); -void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_hints.c index 94178ab0cfe..93ec2303472 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_hints.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * ad_panfs_hints.c * * Copyright (C) 2001 University of Chicago. @@ -20,15 +20,15 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) *error_code = MPI_SUCCESS; if (fd->info == MPI_INFO_NULL) { - /* This must be part of the open call. can set striping parameters - * if necessary. - */ + /* This must be part of the open call. can set striping parameters + * if necessary. + */ MPI_Info_create(&(fd->info)); /* anticipate concurrent writes in an MPI-IO application */ ADIOI_Info_set (fd->info, "panfs_concurrent_write", "1"); - /* has user specified striping parameters + /* has user specified striping parameters and do they have the same value on all processes? */ if (users_info != MPI_INFO_NULL) { @@ -61,7 +61,7 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } } - ADIOI_GEN_SetInfo(fd, users_info, &gen_error_code); + ADIOI_GEN_SetInfo(fd, users_info, &gen_error_code); /* If this function is successful, use the error code returned from ADIOI_GEN_SetInfo * otherwise use the error_code generated by this function */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_open.c index d5374ebf448..d2e3d8dd404 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_open.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * ad_panfs_open.c * * Copyright (C) 2001 University of Chicago. @@ -30,7 +30,7 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) pan_fs_client_layout_agg_type_t layout_type = PAN_FS_CLIENT_LAYOUT_TYPE__DEFAULT; unsigned long int layout_stripe_unit = 0; unsigned long int layout_parity_stripe_width = 0; - unsigned long int layout_parity_stripe_depth = 0; + unsigned long int layout_parity_stripe_depth = 0; unsigned long int layout_total_num_comps = 0; pan_fs_client_layout_visit_t layout_visit_policy = PAN_FS_CLIENT_LAYOUT_VISIT__ROUND_ROBIN; int myrank; @@ -39,32 +39,32 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) *error_code = MPI_SUCCESS; value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "panfs_layout_type", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_layout_type", MPI_MAX_INFO_VAL, value, &flag); if (flag) { layout_type = strtoul(value,NULL,10); } - ADIOI_Info_get(fd->info, "panfs_layout_stripe_unit", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_layout_stripe_unit", MPI_MAX_INFO_VAL, value, &flag); if (flag) { layout_stripe_unit = strtoul(value,NULL,10); } - ADIOI_Info_get(fd->info, "panfs_layout_total_num_comps", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_layout_total_num_comps", MPI_MAX_INFO_VAL, value, &flag); if (flag) { layout_total_num_comps = strtoul(value,NULL,10); } - ADIOI_Info_get(fd->info, "panfs_layout_parity_stripe_width", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_layout_parity_stripe_width", MPI_MAX_INFO_VAL, value, &flag); if (flag) { layout_parity_stripe_width = strtoul(value,NULL,10); } - ADIOI_Info_get(fd->info, "panfs_layout_parity_stripe_depth", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_layout_parity_stripe_depth", MPI_MAX_INFO_VAL, value, &flag); if (flag) { layout_parity_stripe_depth = strtoul(value,NULL,10); } - ADIOI_Info_get(fd->info, "panfs_layout_visit_policy", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_layout_visit_policy", MPI_MAX_INFO_VAL, value, &flag); if (flag) { layout_visit_policy = strtoul(value,NULL,10); @@ -145,13 +145,13 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) MPI_Abort(MPI_COMM_WORLD, 1); } } - /* Create the file via ioctl() or open(). ADIOI_PANFS_Open's caller + /* Create the file via ioctl() or open(). ADIOI_PANFS_Open's caller * already optimizes performance by only calling this function with - * ADIO_CREATE on rank 0. Therefore, we don't need to worry about + * ADIO_CREATE on rank 0. Therefore, we don't need to worry about * implementing that optimization here. */ - if((layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID0) || (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) + if((layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID0) || (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) || (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID10)) { - pan_fs_client_layout_create_args_t file_create_args; + pan_fs_client_layout_create_args_t file_create_args; int fd_dir; char* slash; struct stat stat_buf; @@ -185,7 +185,7 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) if (!slash) ADIOI_Strncpy(path, ".", 2); else { - if (slash == path) + if (slash == path) *(path + 1) = '\0'; else *slash = '\0'; } @@ -210,7 +210,7 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) file_create_args.mode = perm; file_create_args.version = PAN_FS_CLIENT_LAYOUT_VERSION; file_create_args.flags = PAN_FS_CLIENT_LAYOUT_CREATE_F__NONE; - ADIOI_Strncpy(file_create_args.filename, file_name_ptr, strlen(fd->filename)+1); + ADIOI_Strncpy(file_create_args.filename, file_name_ptr, strlen(fd->filename)+1); file_create_args.layout.agg_type = layout_type; file_create_args.layout.layout_is_valid = 1; if(layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE) @@ -266,7 +266,7 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) amode = amode | O_EXCL; value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "panfs_concurrent_write", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "panfs_concurrent_write", MPI_MAX_INFO_VAL, value, &flag); if (flag) { unsigned long int concurrent_write = strtoul(value,NULL,10); @@ -293,7 +293,7 @@ void ADIOI_PANFS_Open(ADIO_File fd, int *error_code) /* Error - set layout type to unknown */ ADIOI_Info_set(fd->info, "panfs_layout_type", "PAN_FS_CLIENT_LAYOUT_TYPE__INVALID"); } - else + else { ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.agg_type); ADIOI_Info_set(fd->info, "panfs_layout_type", temp_buffer); diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_read.c index 237e4929de3..44e28279df0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_read.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ #include #endif -void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -57,7 +57,7 @@ void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count, fd->fp_sys_posn = offset + err; if (file_ptr_type == ADIO_INDIVIDUAL) { - fd->fp_ind += err; + fd->fp_ind += err; } #ifdef HAVE_STATUS_SET_BYTES diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_resize.c index 5c41126c4de..3c59cf8fad2 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_write.c index 920d2f473e7..d0ec79ffe65 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_panfs/ad_panfs_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -40,7 +40,7 @@ void ADIOI_PANFS_WriteContig(ADIO_File fd, const void *buf, int count, } /* --END ERROR HANDLING-- */ } - + AD_PANFS_RETRY(write(fd->fd_sys, buf, len),err) /* --BEGIN ERROR HANDLING-- */ if (err == -1) { @@ -57,7 +57,7 @@ void ADIOI_PANFS_WriteContig(ADIO_File fd, const void *buf, int count, fd->fp_sys_posn = offset + err; if (file_ptr_type == ADIO_INDIVIDUAL) { - fd->fp_ind += err; + fd->fp_ind += err; } #ifdef HAVE_STATUS_SET_BYTES diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.c index 62a4305205b..2e68bda6259 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.h b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.h index fbe055ccf75..b0c9739670d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -24,38 +24,38 @@ #endif /* PFS file-pointer modes (removed most of them because they are unused) */ -#ifndef M_ASYNC +#ifndef M_ASYNC #define M_UNIX 0 #define M_ASYNC 5 #endif void ADIOI_PFS_Open(ADIO_File fd, int *error_code); -void ADIOI_PFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_PFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); -void ADIOI_PFS_IwriteContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_PFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); -void ADIOI_PFS_IreadContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_PFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); + *error_code); int ADIOI_PFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_PFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code); void ADIOI_PFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_PFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code); + int *error_code); void ADIOI_PFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_PFS_Flush(ADIO_File fd, int *error_code); void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_done.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_done.c index 60e2d7da298..0550aa9d483 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_done.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_done.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_pfs.h" int ADIOI_PFS_ReadDone(ADIO_Request *request, ADIO_Status *status, - int *error_code) + int *error_code) { int done=0; static char myname[] = "ADIOI_PFS_READDONE"; @@ -20,7 +20,7 @@ int ADIOI_PFS_ReadDone(ADIO_Request *request, ADIO_Status *status, if ((*request)->queued) done = _iodone(*((long *) (*request)->handle)); - else done = 1; /* ADIOI_Complete_Async completed this request, + else done = 1; /* ADIOI_Complete_Async completed this request, but request object was not freed. */ #ifdef HAVE_STATUS_SET_BYTES @@ -38,7 +38,7 @@ int ADIOI_PFS_ReadDone(ADIO_Request *request, ADIO_Status *status, ADIOI_Free_request((ADIOI_Req_node *) (*request)); *request = ADIO_REQUEST_NULL; } - + if (done == -1 && errno != 0) { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, @@ -54,4 +54,4 @@ int ADIOI_PFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code) { return ADIOI_PFS_ReadDone(request, status, error_code); -} +} diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_fcntl.c index 4a2c0fd3827..619abe09322 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -18,10 +18,10 @@ void ADIOI_PFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, switch(flag) { case ADIO_FCNTL_GET_FSIZE: if (!(fd->atomicity)) { - /* in M_ASYNC mode, all processes are not aware of changes - in file size (although the manual says otherwise). Therefore, - temporarily change to M_UNIX and then change - back to M_ASYNC.*/ + /* in M_ASYNC mode, all processes are not aware of changes + in file size (although the manual says otherwise). Therefore, + temporarily change to M_UNIX and then change + back to M_ASYNC.*/ MPI_Comm_size(MPI_COMM_WORLD, &np_total); MPI_Comm_size(fd->comm, &np_comm); if (np_total == np_comm) { @@ -31,7 +31,7 @@ void ADIOI_PFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, /* else it is M_UNIX anyway, so no problem */ } fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END); - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); *error_code = MPI_SUCCESS; break; diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_flush.c index 98dedc099c3..9867a46628d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_hints.c index 407a0eb7758..54676e1be39 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -15,16 +15,16 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) int err, myrank, fd_sys, perm, amode, old_mask; if ( (fd->info) == MPI_INFO_NULL) { - /* This must be part of the open call. can set striping parameters - if necessary. */ + /* This must be part of the open call. can set striping parameters + if necessary. */ MPI_Info_create(&(fd->info)); - - /* has user specified striping or server buffering parameters + + /* has user specified striping or server buffering parameters and do they have the same value on all processes? */ if (users_info != MPI_INFO_NULL) { value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, value, &flag); if (flag) { str_factor=atoi(value); @@ -40,7 +40,7 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* --END ERROR HANDLING-- */ } - ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, value, &flag); if (flag) { str_unit=atoi(value); @@ -56,7 +56,7 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* --END ERROR HANDLING-- */ } - ADIOI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, value, &flag); if (flag) { start_iodev=atoi(value); @@ -100,7 +100,7 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) if (!err) { if (str_unit > 0) attr.s_sunitsize = str_unit; - if ((start_iodev >= 0) && + if ((start_iodev >= 0) && (start_iodev < attr.s_sfactor)) attr.s_start_sdir = start_iodev; if ((str_factor > 0) && (str_factor < attr.s_sfactor)) @@ -116,10 +116,10 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } /* Has user asked for pfs server buffering to be turned on? - If so, mark it as true in fd->info and turn it on in + If so, mark it as true in fd->info and turn it on in ADIOI_PFS_Open after the file is opened */ - ADIOI_Info_get(users_info, "pfs_svr_buf", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "pfs_svr_buf", MPI_MAX_INFO_VAL, value, &flag); if (flag && (!strcmp(value, "true"))) ADIOI_Info_set(fd->info, "pfs_svr_buf", "true"); @@ -128,15 +128,15 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) ADIOI_Free(value); } else ADIOI_Info_set(fd->info, "pfs_svr_buf", "false"); - + /* set the values for collective I/O and data sieving parameters */ ADIOI_GEN_SetInfo(fd, users_info, error_code); } - + else { /* The file has been opened previously and fd->fd_sys is a valid file descriptor. cannot set striping parameters now. */ - + /* set the values for collective I/O and data sieving parameters */ ADIOI_GEN_SetInfo(fd, users_info, error_code); @@ -144,22 +144,22 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) if (users_info != MPI_INFO_NULL) { value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(users_info, "pfs_svr_buf", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "pfs_svr_buf", MPI_MAX_INFO_VAL, value, &flag); if (flag && (!strcmp(value, "true") || !strcmp(value, "false"))) { - value_in_fd = (char *) + value_in_fd = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "pfs_svr_buf", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "pfs_svr_buf", MPI_MAX_INFO_VAL, value_in_fd, &flag); if (strcmp(value, value_in_fd)) { if (!strcmp(value, "true")) { err = fcntl(fd->fd_sys, F_PFS_SVR_BUF, TRUE); - if (!err) + if (!err) ADIOI_Info_set(fd->info, "pfs_svr_buf", "true"); } else { err = fcntl(fd->fd_sys, F_PFS_SVR_BUF, FALSE); - if (!err) + if (!err) ADIOI_Info_set(fd->info, "pfs_svr_buf", "false"); } } @@ -169,6 +169,6 @@ void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } } - + *error_code = MPI_SUCCESS; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iread.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iread.c index 78b3c592fb7..8e278120471 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iread.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iread.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_pfs.h" -void ADIOI_PFS_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code) @@ -62,7 +62,7 @@ void ADIOI_PFS_IreadContig(ADIO_File fd, void *buf, int count, return; } - if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; (*request)->queued = 1; (*request)->nbytes = len; diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iwrite.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iwrite.c index 5dda2fbdeb6..cf54cc4d715 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iwrite.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_iwrite.c @@ -1,15 +1,15 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_pfs.h" -void ADIOI_PFS_IwriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Request *request, int *error_code) + ADIO_Offset offset, ADIO_Request *request, int *error_code) { long *id_sys; ADIO_Offset off; @@ -61,7 +61,7 @@ void ADIOI_PFS_IwriteContig(ADIO_File fd, void *buf, int count, return; } - if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len; (*request)->queued = 1; (*request)->nbytes = len; diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_open.c index f814b7c0a14..86c14593106 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -36,7 +36,7 @@ void ADIOI_PFS_Open(ADIO_File fd, int *error_code) MPI_Comm_size(MPI_COMM_WORLD, &np_total); MPI_Comm_size(fd->comm, &np_comm); - if (np_total == np_comm) + if (np_total == np_comm) fd->fd_sys = _gopen(fd->filename, amode, M_ASYNC, perm); else fd->fd_sys = open(fd->filename, amode, perm); fd->fd_direct = -1; @@ -46,10 +46,10 @@ void ADIOI_PFS_Open(ADIO_File fd, int *error_code) /* if user has asked for pfs server buffering to be turned on, it will be set to true in fd->info in the earlier call - to ADIOI_PFS_SetInfo. Turn it on now, since we now have a + to ADIOI_PFS_SetInfo. Turn it on now, since we now have a valid file descriptor. */ - ADIOI_Info_get(fd->info, "pfs_svr_buf", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "pfs_svr_buf", MPI_MAX_INFO_VAL, value, &flag); if (flag && (!strcmp(value, "true"))) { err = fcntl(fd->fd_sys, F_PFS_SVR_BUF, TRUE); @@ -71,7 +71,7 @@ void ADIOI_PFS_Open(ADIO_File fd, int *error_code) } ADIOI_Free(value); - if (fd->access_mode & ADIO_APPEND) + if (fd->access_mode & ADIO_APPEND) fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_read.c index bd3b7e70e47..d85b09d8792 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_read.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_pfs.h" -void ADIOI_PFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -23,16 +23,16 @@ void ADIOI_PFS_ReadContig(ADIO_File fd, void *buf, int count, } err = _cread(fd->fd_sys, buf, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* read from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { lseek(fd->fd_sys, fd->fp_ind, SEEK_SET); } err = _cread(fd->fd_sys, buf, len); - fd->fp_ind += err; + fd->fp_ind += err; fd->fp_sys_posn = fd->fp_ind; - } + } #ifdef HAVE_STATUS_SET_BYTES if (err != -1) MPIR_Status_set_bytes(status, datatype, err); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_wait.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_wait.c index e14159521a5..d8200aa5409 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_wait.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_wait.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -41,7 +41,7 @@ void ADIOI_PFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, freed. This is used in ADIOI_Complete_async, because the user will call MPI_Wait later, which would require status to be filled. Ugly but works. queued = -1 should be used only - in ADIOI_Complete_async. + in ADIOI_Complete_async. This should not affect the user in any way. */ /* if request is still queued in the system, it is also there @@ -56,7 +56,7 @@ void ADIOI_PFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, } -void ADIOI_PFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) +void ADIOI_PFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code) { ADIOI_PFS_ReadComplete(request, status, error_code); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_write.c index c64e976a2b4..fe836a971a6 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pfs/ad_pfs_write.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_pfs.h" -void ADIOI_PFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -24,7 +24,7 @@ void ADIOI_PFS_WriteContig(ADIO_File fd, void *buf, int count, } err = _cwrite(fd->fd_sys, buf, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* write from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.c b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.c index 29d8c3010d6..fbe59d10b46 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -33,5 +33,5 @@ struct ADIOI_Fns_struct ADIO_PIOFS_operations = { ADIOI_GEN_Flush, /* Flush */ ADIOI_GEN_Resize, /* Resize */ ADIOI_GEN_Delete, /* Delete */ - ADIOI_PIOFS_Feature, + ADIOI_PIOFS_Feature, }; diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.h b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.h index e9b74c9e872..01d2567d8a0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -19,16 +19,16 @@ #include "adio.h" void ADIOI_PIOFS_Open(ADIO_File fd, int *error_code); -void ADIOI_PIOFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PIOFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_PIOFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PIOFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_PIOFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_fcntl.c index 7d4a37cbfd5..80009aa44af 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,7 +23,7 @@ void ADIOI_PIOFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int * switch(flag) { case ADIO_FCNTL_GET_FSIZE: fcntl_struct->fsize = llseek(fd->fd_sys, 0, SEEK_END); - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) llseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); if (fcntl_struct->fsize == -1) { #ifdef MPICH @@ -34,7 +34,7 @@ void ADIOI_PIOFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int * #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; @@ -45,12 +45,12 @@ void ADIOI_PIOFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int * break; case ADIO_FCNTL_SET_ATOMICITY: - piofs_change_view = (piofs_change_view_t *) + piofs_change_view = (piofs_change_view_t *) ADIOI_Malloc(sizeof(piofs_change_view_t)); - piofs_change_view->Vbs = piofs_change_view->Vn = + piofs_change_view->Vbs = piofs_change_view->Vn = piofs_change_view->Hbs = piofs_change_view->Hn = 1; piofs_change_view->subfile = 0; - piofs_change_view->flags = (fcntl_struct->atomicity == 0) + piofs_change_view->flags = (fcntl_struct->atomicity == 0) ? (ACTIVE | NORMAL) : (ACTIVE | CAUTIOUS); err = piofsioctl(fd->fd_sys, PIOFS_CHANGE_VIEW, piofs_change_view); ADIOI_Free(piofs_change_view); @@ -64,7 +64,7 @@ void ADIOI_PIOFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int * #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_hints.c index 242ebb3f07d..391e9de0074 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,16 +16,16 @@ void ADIOI_PIOFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) int err, myrank, perm, old_mask, nioservers; if ((fd->info) == MPI_INFO_NULL) { - /* This must be part of the open call. can set striping parameters - if necessary. */ + /* This must be part of the open call. can set striping parameters + if necessary. */ MPI_Info_create(&(fd->info)); - - /* has user specified striping parameters + + /* has user specified striping parameters and do they have the same value on all processes? */ if (users_info != MPI_INFO_NULL) { value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, value, &flag); if (flag) { str_factor=atoi(value); @@ -37,7 +37,7 @@ void ADIOI_PIOFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } } - ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, value, &flag); if (flag) { str_unit=atoi(value); @@ -49,7 +49,7 @@ void ADIOI_PIOFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) } } - ADIOI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, value, &flag); if (flag) { start_iodev=atoi(value); @@ -100,7 +100,7 @@ void ADIOI_PIOFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) piofs_create.bsu = (str_unit > 0) ? str_unit : -1; piofs_create.cells = (str_factor > 0) ? str_factor : -1; piofs_create.permissions = perm; - piofs_create.base_node = (start_iodev >= 0) ? + piofs_create.base_node = (start_iodev >= 0) ? start_iodev : -1; piofs_create.flags = 0; @@ -109,8 +109,8 @@ void ADIOI_PIOFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) MPI_Barrier(fd->comm); } } - } - + } + /* set the values for collective I/O and data sieving parameters */ ADIOI_GEN_SetInfo(fd, users_info, error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_open.c b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_open.c index e02e90cf325..67c771ecfad 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -72,7 +72,7 @@ void ADIOI_PIOFS_Open(ADIO_File fd, int *error_code) #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); + ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_read.c b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_read.c index 278548656e3..79a91218100 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_read.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_piofs.h" -void ADIOI_PIOFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PIOFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -25,16 +25,16 @@ void ADIOI_PIOFS_ReadContig(ADIO_File fd, void *buf, int count, } err = read(fd->fd_sys, buf, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* read from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { llseek(fd->fd_sys, fd->fp_ind, SEEK_SET); } err = read(fd->fd_sys, buf, len); - fd->fp_ind += err; + fd->fp_ind += err; fd->fp_sys_posn = fd->fp_ind; - } + } #ifdef HAVE_STATUS_SET_BYTES if (err != -1) MPIR_Status_set_bytes(status, datatype, err); @@ -49,7 +49,7 @@ void ADIOI_PIOFS_ReadContig(ADIO_File fd, void *buf, int count, #else *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_write.c b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_write.c index 4e1c7f11590..4d0b4b99230 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_piofs/ad_piofs_write.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_piofs.h" #include "adio_extern.h" -void ADIOI_PIOFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PIOFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -26,7 +26,7 @@ void ADIOI_PIOFS_WriteContig(ADIO_File fd, void *buf, int count, } err = write(fd->fd_sys, buf, len); fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* write from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { @@ -97,7 +97,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -105,7 +105,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Type_size_x(datatype, &buftype_size); MPI_Type_extent(datatype, &buftype_extent); etype_size = fd->etype_size; - + bufsize = buftype_size * count; if (!buftype_is_contig && filetype_is_contig) { @@ -127,10 +127,10 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, else off = llseek(fd->fd_sys, fd->fp_ind, SEEK_SET); k = 0; - for (j=0; jcount; i++) { iov[k].iov_base = ((char *) buf) + j*buftype_extent + - flat_buf->indices[i]; + flat_buf->indices[i]; iov[k].iov_len = flat_buf->blocklens[i]; /*FPRINTF(stderr, "%d %d\n", iov[k].iov_base, iov[k].iov_len);*/ @@ -155,7 +155,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef MPICH *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); -#elif defined(PRINT_ERR_MSG) +#elif defined(PRINT_ERR_MSG) *error_code = MPI_ERR_UNKNOWN; #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, @@ -184,11 +184,11 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + - (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] + if (disp + flat_file->indices[i] + + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - fwr_size = disp + flat_file->indices[i] + + fwr_size = disp + flat_file->indices[i] + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -202,7 +202,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -229,9 +229,9 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, off = offset; fwr_size = ADIOI_MIN(fwr_size, bufsize); while (i < bufsize) { - if (fwr_size) { - /* TYPE_UB and TYPE_LB can result in - fwr_size = 0. save system call in such cases */ + if (fwr_size) { + /* TYPE_UB and TYPE_LB can result in + fwr_size = 0. save system call in such cases */ llseek(fd->fd_sys, off, SEEK_SET); err = write(fd->fd_sys, ((char *) buf) + i, fwr_size); if (err == -1) err_flag = 1; @@ -249,7 +249,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, j = 0; n_filetypes++; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i); } @@ -287,7 +287,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; new_fwr_size = flat_file->blocklens[j]; @@ -303,7 +303,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, k = (k + 1)%flat_buf->count; buf_count++; indx = buftype_extent*(buf_count/flat_buf->count) + - flat_buf->indices[k]; + flat_buf->indices[k]; new_bwr_size = flat_buf->blocklens[k]; if (size != fwr_size) { off += size; @@ -330,13 +330,13 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count, #endif } else *error_code = MPI_SUCCESS; - } + } fd->fp_sys_posn = -1; /* set it to null. */ #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.c index 92b6df63e9f..1d83cca6e6b 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.h b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.h index 88e1a9f2253..276f1076dc1 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -27,16 +27,16 @@ typedef long long int int64_t; void ADIOI_PVFS_Open(ADIO_File fd, int *error_code); void ADIOI_PVFS_Close(ADIO_File fd, int *error_code); -void ADIOI_PVFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_PVFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_PVFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_close.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_close.c index c2da2e360ef..4766b9b2e72 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_delete.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_delete.c index 0e322ad32ae..bb6592aaff3 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_delete.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_fcntl.c index eeff2507189..d13760b74fc 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -66,7 +66,7 @@ void ADIOI_PVFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, myname, __LINE__, MPI_ERR_ARG, "**flag", "**flag %d", flag); - return; + return; /* --END ERROR HANDLING-- */ } } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_flush.c index 340f0cb3395..9b2ac4ecd78 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -19,7 +19,7 @@ void ADIOI_PVFS_Flush(ADIO_File fd, int *error_code) */ MPI_Comm_rank(fd->comm, &rank); - MPI_Reduce(&dummy_in, &dummy, 1, MPI_INT, MPI_SUM, + MPI_Reduce(&dummy_in, &dummy, 1, MPI_INT, MPI_SUM, fd->hints->ranklist[0], fd->comm); if (rank == fd->hints->ranklist[0]) { err = pvfs_fsync(fd->fd_sys); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_hints.c index fdc06ed8465..f64edd13d0f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -10,24 +10,24 @@ void ADIOI_PVFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) { char *value; - int flag, tmp_val, str_factor=-1, str_unit=-1, start_iodev=-1; + int flag, tmp_val, str_factor=-1, str_unit=-1, start_iodev=-1; static char myname[] = "ADIOI_PVFS_SETINFO"; if ((fd->info) == MPI_INFO_NULL) { - /* This must be part of the open call. can set striping parameters - if necessary. */ + /* This must be part of the open call. can set striping parameters + if necessary. */ MPI_Info_create(&(fd->info)); ADIOI_Info_set(fd->info, "romio_pvfs_listio_read", "disable"); ADIOI_Info_set(fd->info, "romio_pvfs_listio_write", "disable"); fd->hints->fs_hints.pvfs.listio_read = ADIOI_HINT_DISABLE; fd->hints->fs_hints.pvfs.listio_write = ADIOI_HINT_DISABLE; - + /* has user specified any pvfs-specific hints (striping params, listio) and do they have the same value on all processes? */ if (users_info != MPI_INFO_NULL) { value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, value, &flag); if (flag) { str_factor=atoi(value); @@ -44,7 +44,7 @@ void ADIOI_PVFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) else ADIOI_Info_set(fd->info, "striping_factor", value); } - ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, value, &flag); if (flag) { str_unit=atoi(value); @@ -61,7 +61,7 @@ void ADIOI_PVFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) else ADIOI_Info_set(fd->info, "striping_unit", value); } - ADIOI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, value, &flag); if (flag) { start_iodev=atoi(value); @@ -82,16 +82,16 @@ void ADIOI_PVFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) MPI_MAX_INFO_VAL, value, &flag); if (flag) { - if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE")) + if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE")) { ADIOI_Info_set(fd->info, "romio_pvfs_listio_read", value); fd->hints->fs_hints.pvfs.listio_read = ADIOI_HINT_ENABLE; - } else if ( !strcmp(value, "disable") || !strcmp(value, "DISABLE")) + } else if ( !strcmp(value, "disable") || !strcmp(value, "DISABLE")) { ADIOI_Info_set(fd->info , "romio_pvfs_listio_read", value); fd->hints->fs_hints.pvfs.listio_read = ADIOI_HINT_DISABLE; } - else if ( !strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC")) + else if ( !strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC")) { ADIOI_Info_set(fd->info, "romio_pvfs_listio_read", value); fd->hints->fs_hints.pvfs.listio_read = ADIOI_HINT_AUTO; @@ -110,16 +110,16 @@ void ADIOI_PVFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) ADIOI_Info_get(users_info, "romio_pvfs_listio_write", MPI_MAX_INFO_VAL, value, &flag); if (flag) { - if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE")) + if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE")) { ADIOI_Info_set(fd->info, "romio_pvfs_listio_write", value); fd->hints->fs_hints.pvfs.listio_write = ADIOI_HINT_ENABLE; - } else if ( !strcmp(value, "disable") || !strcmp(value, "DISABLE")) + } else if ( !strcmp(value, "disable") || !strcmp(value, "DISABLE")) { ADIOI_Info_set(fd->info, "romio_pvfs_listio_write", value); fd->hints->fs_hints.pvfs.listio_write = ADIOI_HINT_DISABLE; } - else if ( !strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC")) + else if ( !strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC")) { ADIOI_Info_set(fd->info, "romio_pvfs_listio_write", value); fd->hints->fs_hints.pvfs.listio_write = ADIOI_HINT_AUTO; @@ -134,10 +134,10 @@ void ADIOI_PVFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) return; /* --END ERROR HANDLING-- */ } - } + } ADIOI_Free(value); } - } + } /* set the values for collective I/O and data sieving parameters */ ADIOI_GEN_SetInfo(fd, users_info, error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_open.c index c4fa28805da..cef52445536 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -37,15 +37,15 @@ void ADIOI_PVFS_Open(ADIO_File fd, int *error_code) value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "striping_factor", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "striping_factor", MPI_MAX_INFO_VAL, value, &flag); if (flag && (atoi(value) > 0)) pstat.pcount = atoi(value); - ADIOI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, value, &flag); if (flag && (atoi(value) > 0)) pstat.ssize = atoi(value); - ADIOI_Info_get(fd->info, "start_iodevice", MPI_MAX_INFO_VAL, + ADIOI_Info_get(fd->info, "start_iodevice", MPI_MAX_INFO_VAL, value, &flag); if (flag && (atoi(value) >= 0)) pstat.base = atoi(value); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_read.c index 71b558a5d1f..4b06984c24e 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_read.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,7 +16,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, *error_code); #endif -void ADIOI_PVFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -45,7 +45,7 @@ void ADIOI_PVFS_ReadContig(ADIO_File fd, void *buf, int count, #endif if (err>0) fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* read from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { @@ -65,9 +65,9 @@ void ADIOI_PVFS_ReadContig(ADIO_File fd, void *buf, int count, MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); #endif if (err > 0) - fd->fp_ind += err; + fd->fp_ind += err; fd->fp_sys_posn = fd->fp_ind; - } + } #ifdef HAVE_STATUS_SET_BYTES if (err != -1) MPIR_Status_set_bytes(status, datatype, err); @@ -115,7 +115,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, int n_filetypes, etype_in_filetype; ADIO_Offset abs_off_in_filetype=0; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off; ADIO_Offset off, disp, start_off; @@ -154,7 +154,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -175,7 +175,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + etype_size * offset; file_list_count = 1; @@ -195,9 +195,9 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, /* step through each block in memory, filling memory arrays */ while (b_blks_read < total_blks_to_read) { for (i=0; icount; i++) { - mem_offsets[b_blks_read % MAX_ARRAY_SIZE] = + mem_offsets[b_blks_read % MAX_ARRAY_SIZE] = (char*)((char *)buf + j*buftype_extent + flat_buf->indices[i]); - mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = + mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; file_lengths += flat_buf->blocklens[i]; b_blks_read++; @@ -215,13 +215,13 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, pvfs_read_list(fd->fd_sys ,mem_list_count, mem_offsets, mem_lengths, file_list_count, &file_offsets, &file_lengths); - + /* in the case of the last read list call, leave here */ if (b_blks_read == total_blks_to_read) break; file_offsets += file_lengths; file_lengths = 0; - } + } } /* for (i=0; icount; i++) */ j++; } /* while (b_blks_read < total_blks_to_read) */ @@ -264,11 +264,11 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - frd_size = (int) (disp + flat_file->indices[i] + + frd_size = (int) (disp + flat_file->indices[i] + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] - offset); flag = 1; @@ -282,7 +282,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -294,16 +294,16 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, break; } } - + /* abs. offset in bytes in the file */ - offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + + offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype; } /* else [file_ptr_type != ADIO_INDIVIDUAL] */ start_off = offset; st_frd_size = frd_size; st_n_filetypes = n_filetypes; - + if (buftype_is_contig && !filetype_is_contig) { /* contiguous in memory, noncontiguous in file. should be the most @@ -311,13 +311,13 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, int mem_lengths; char *mem_offsets; - + i = 0; j = st_index; n_filetypes = st_n_filetypes; - + mem_list_count = 1; - + /* determine how many blocks in file to read */ f_data_read = ADIOI_MIN(st_frd_size, bufsize); total_blks_to_read = 1; @@ -326,17 +326,17 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, f_data_read += flat_file->blocklens[j]; total_blks_to_read++; if (j<(flat_file->count-1)) j++; - else j = 0; + else j = 0; } - + j = st_index; n_filetypes = st_n_filetypes; n_read_lists = total_blks_to_read/MAX_ARRAY_SIZE; extra_blks = total_blks_to_read%MAX_ARRAY_SIZE; - + mem_offsets = buf; mem_lengths = 0; - + /* if at least one full readlist, allocate file arrays at max array size and don't free until very end */ if (n_read_lists) { @@ -353,7 +353,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, file_lengths = (int32_t*)ADIOI_Malloc(extra_blks* sizeof(int32_t)); } - + /* for file arrays that are of MAX_ARRAY_SIZE, build arrays */ for (i=0; itype != datatype) flat_buf = flat_buf->next; @@ -430,7 +430,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, max_mem_list = 0; max_file_list = 0; - /* run through and file max_file_list and max_mem_list so that you + /* run through and file max_file_list and max_mem_list so that you can allocate the file and memory arrays less than MAX_ARRAY_SIZE if possible */ @@ -438,7 +438,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, k = start_k; new_buffer_read = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -446,9 +446,9 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_read + flat_buf->blocklens[k] + + if((new_buffer_read + flat_buf->blocklens[k] + size_read) > bufsize) { - end_brd_size = new_buffer_read + + end_brd_size = new_buffer_read + flat_buf->blocklens[k] - (bufsize - size_read); new_buffer_read = bufsize - size_read; } @@ -466,15 +466,15 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ j = start_j; new_file_read = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_read < new_buffer_read)) { if(file_list_count) { - if((new_file_read + flat_file->blocklens[j]) > + if((new_file_read + flat_file->blocklens[j]) > new_buffer_read) { end_frd_size = new_buffer_read - new_file_read; new_file_read = new_buffer_read; @@ -495,9 +495,9 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_read < new_buffer_read) && + if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_read = 0; mem_list_count = 0; @@ -526,13 +526,13 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, } /* while (new_buffer_read < new_file_read) */ } /* if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ /* fakes filling the readlist arrays of lengths found above */ k = start_k; j = start_j; - for (i=0; iblocklens[k] == end_brd_size) @@ -553,7 +553,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, if (i == (file_list_count - 1)) { if (flat_file->blocklens[j] == end_frd_size) frd_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { frd_size = flat_file->blocklens[j] - end_frd_size; j--; @@ -579,7 +579,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, mem_lengths = (int *)ADIOI_Malloc(max_mem_list*sizeof(int)); file_offsets = (int64_t *)ADIOI_Malloc(max_file_list*sizeof(int64_t)); file_lengths = (int32_t *)ADIOI_Malloc(max_file_list*sizeof(int32_t)); - + size_read = 0; n_filetypes = st_n_filetypes; frd_size = st_frd_size; @@ -592,12 +592,12 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, /* this section calculates mem_list_count and file_list_count and also finds the possibly odd sized last array elements in new_frd_size and new_brd_size */ - + while (size_read < bufsize) { k = start_k; new_buffer_read = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -605,9 +605,9 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_read + flat_buf->blocklens[k] + + if((new_buffer_read + flat_buf->blocklens[k] + size_read) > bufsize) { - end_brd_size = new_buffer_read + + end_brd_size = new_buffer_read + flat_buf->blocklens[k] - (bufsize - size_read); new_buffer_read = bufsize - size_read; } @@ -625,15 +625,15 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ j = start_j; new_file_read = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_read < new_buffer_read)) { if(file_list_count) { - if((new_file_read + flat_file->blocklens[j]) > + if((new_file_read + flat_file->blocklens[j]) > new_buffer_read) { end_frd_size = new_buffer_read - new_file_read; new_file_read = new_buffer_read; @@ -654,9 +654,9 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_read < new_buffer_read) && + if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_read = 0; mem_list_count = 0; @@ -685,13 +685,13 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, } /* while (new_buffer_read < new_file_read) */ } /* if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ /* fills the allocated readlist arrays */ k = start_k; j = start_j; - for (i=0; icount) + (int)flat_buf->indices[k]); @@ -730,7 +730,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, file_lengths[i] = end_frd_size; if (flat_file->blocklens[j] == end_frd_size) frd_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { frd_size = flat_file->blocklens[j] - end_frd_size; j--; @@ -745,7 +745,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, } } /* for (i=0; ifp_ind = off; fd->fp_sys_posn = -1; /* set it to null. */ - + #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); - /* This is a temporary way of filling in status. The right way is to - keep track of how much data was actually read and placed in buf + /* This is a temporary way of filling in status. The right way is to + keep track of how much data was actually read and placed in buf by ADIOI_BUFFERED_READ. */ #endif - + if (!buftype_is_contig) ADIOI_Delete_flattened(datatype); } #endif /* HAVE_PVFS_LISTIO */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_resize.c index b4b9553633f..e3d3b2b127f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_write.c index 4e874d99ac0..6b0b3b70c1c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs/ad_pvfs_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -15,7 +15,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, *error_code); #endif -void ADIOI_PVFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -45,7 +45,7 @@ void ADIOI_PVFS_WriteContig(ADIO_File fd, void *buf, int count, #endif if (err > 0) fd->fp_sys_posn = offset + err; - /* individual file pointer not updated */ + /* individual file pointer not updated */ } else { /* write from curr. location of ind. file pointer */ if (fd->fp_sys_posn != fd->fp_ind) { @@ -109,7 +109,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_PVFS_LISTIO if ( fd->hints->fs_hints.pvfs.listio_write == ADIOI_HINT_ENABLE ) { - ADIOI_PVFS_WriteStridedListIO(fd, buf, count, datatype, + ADIOI_PVFS_WriteStridedListIO(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); return; } @@ -134,7 +134,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -142,7 +142,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Type_size_x(datatype, &buftype_size); MPI_Type_extent(datatype, &buftype_extent); etype_size = fd->etype_size; - + bufsize = buftype_size * count; if (!buftype_is_contig && filetype_is_contig) { @@ -280,11 +280,11 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + - (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] + if (disp + flat_file->indices[i] + + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - fwr_size = disp + flat_file->indices[i] + + fwr_size = disp + flat_file->indices[i] + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -298,7 +298,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -325,9 +325,9 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, off = offset; fwr_size = ADIOI_MIN(fwr_size, bufsize); while (i < bufsize) { - if (fwr_size) { - /* TYPE_UB and TYPE_LB can result in - fwr_size = 0. save system call in such cases */ + if (fwr_size) { + /* TYPE_UB and TYPE_LB can result in + fwr_size = 0. save system call in such cases */ #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); #endif @@ -357,7 +357,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, j = 0; n_filetypes++; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i); } @@ -407,7 +407,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + (ADIO_Offset) n_filetypes*filetype_extent; new_fwr_size = flat_file->blocklens[j]; @@ -423,7 +423,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, k = (k + 1)%flat_buf->count; buf_count++; indx = buftype_extent*(buf_count/flat_buf->count) + - flat_buf->indices[k]; + flat_buf->indices[k]; new_bwr_size = flat_buf->blocklens[k]; if (size != fwr_size) { off += size; @@ -450,7 +450,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif @@ -461,7 +461,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count, void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code) + *error_code) { /* Since PVFS does not support file locking, can't do buffered writes as on Unix */ @@ -522,7 +522,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -530,7 +530,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, MPI_Type_size_x(datatype, &buftype_size); MPI_Type_extent(datatype, &buftype_extent); etype_size = fd->etype_size; - + bufsize = buftype_size * count; if (!buftype_is_contig && filetype_is_contig) { @@ -542,7 +542,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { off = fd->disp + etype_size * offset; #ifdef ADIOI_MPE_LOGGING @@ -580,9 +580,9 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, /* step through each block in memory, filling memory arrays */ while (b_blks_wrote < total_blks_to_write) { for (i=0; icount; i++) { - mem_offsets[b_blks_wrote % MAX_ARRAY_SIZE] = + mem_offsets[b_blks_wrote % MAX_ARRAY_SIZE] = ((char*)buf + j*buftype_extent + flat_buf->indices[i]); - mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = + mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; file_lengths += flat_buf->blocklens[i]; b_blks_wrote++; @@ -600,13 +600,13 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, pvfs_write_list(fd->fd_sys ,mem_list_count, mem_offsets, mem_lengths, file_list_count, &file_offsets, &file_lengths); - + /* in the case of the last read list call, leave here */ if (b_blks_wrote == total_blks_to_write) break; file_offsets += file_lengths; file_lengths = 0; - } + } } /* for (i=0; icount; i++) */ j++; } /* while (b_blks_wrote < total_blks_to_write) */ @@ -627,7 +627,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif @@ -645,7 +645,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, disp = fd->disp; /* for each case - ADIO_Individual pointer or explicit, find offset - (file offset in bytes), n_filetypes (how many filetypes into file + (file offset in bytes), n_filetypes (how many filetypes into file to start), fwr_size (remaining amount of data in present file block), and st_index (start point in terms of blocks in starting filetype) */ @@ -656,11 +656,11 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - fwr_size = disp + flat_file->indices[i] + + fwr_size = disp + flat_file->indices[i] + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -674,7 +674,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -695,7 +695,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, start_off = offset; st_fwr_size = fwr_size; st_n_filetypes = n_filetypes; - + if (buftype_is_contig && !filetype_is_contig) { /* contiguous in memory, noncontiguous in file. should be the most @@ -703,14 +703,14 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, int mem_lengths; char *mem_offsets; - + i = 0; j = st_index; off = offset; n_filetypes = st_n_filetypes; - + mem_list_count = 1; - + /* determine how many blocks in file to read */ f_data_wrote = ADIOI_MIN(st_fwr_size, bufsize); total_blks_to_write = 1; @@ -719,17 +719,17 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, f_data_wrote += flat_file->blocklens[j]; total_blks_to_write++; if (j<(flat_file->count-1)) j++; - else j = 0; + else j = 0; } - + j = st_index; n_filetypes = st_n_filetypes; n_write_lists = total_blks_to_write/MAX_ARRAY_SIZE; extra_blks = total_blks_to_write%MAX_ARRAY_SIZE; - + mem_offsets = buf; mem_lengths = 0; - + /* if at least one full readlist, allocate file arrays at max array size and don't free until very end */ if (n_write_lists) { @@ -746,7 +746,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, file_lengths = (int32_t*)ADIOI_Malloc(extra_blks* sizeof(int32_t)); } - + /* for file arrays that are of MAX_ARRAY_SIZE, build arrays */ for (i=0; iblocklens[k] + + if((new_buffer_write + flat_buf->blocklens[k] + size_wrote) > bufsize) { - end_bwr_size = new_buffer_write + + end_bwr_size = new_buffer_write + flat_buf->blocklens[k] - (bufsize - size_wrote); new_buffer_write = bufsize - size_wrote; } @@ -859,15 +859,15 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ j = start_j; new_file_write = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_write < new_buffer_write)) { if(file_list_count) { - if((new_file_write + flat_file->blocklens[j]) > + if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { end_fwr_size = new_buffer_write - new_file_write; new_file_write = new_buffer_write; @@ -888,9 +888,9 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_write < new_buffer_write) && + if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_write = 0; mem_list_count = 0; @@ -898,7 +898,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, if(mem_list_count) { if((new_buffer_write + flat_buf->blocklens[k]) > new_file_write) { - end_bwr_size = new_file_write - + end_bwr_size = new_file_write - new_buffer_write; new_buffer_write = new_file_write; k--; @@ -920,13 +920,13 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, } /* while (new_buffer_write < new_file_write) */ } /* if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ /* fakes filling the writelist arrays of lengths found above */ k = start_k; j = start_j; - for (i=0; iblocklens[k] == end_bwr_size) @@ -947,7 +947,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, if (i == (file_list_count - 1)) { if (flat_file->blocklens[j] == end_fwr_size) fwr_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { fwr_size = flat_file->blocklens[j] - end_fwr_size; j--; @@ -973,7 +973,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, mem_lengths = (int *)ADIOI_Malloc(max_mem_list*sizeof(int)); file_offsets = (int64_t *)ADIOI_Malloc(max_file_list*sizeof(int64_t)); file_lengths = (int32_t *)ADIOI_Malloc(max_file_list*sizeof(int32_t)); - + size_wrote = 0; n_filetypes = st_n_filetypes; fwr_size = st_fwr_size; @@ -986,12 +986,12 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, /* this section calculates mem_list_count and file_list_count and also finds the possibly odd sized last array elements in new_fwr_size and new_bwr_size */ - + while (size_wrote < bufsize) { k = start_k; new_buffer_write = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -999,9 +999,9 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_write + flat_buf->blocklens[k] + + if((new_buffer_write + flat_buf->blocklens[k] + size_wrote) > bufsize) { - end_bwr_size = new_buffer_write + + end_bwr_size = new_buffer_write + flat_buf->blocklens[k] - (bufsize - size_wrote); new_buffer_write = bufsize - size_wrote; } @@ -1019,15 +1019,15 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ j = start_j; new_file_write = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_write < new_buffer_write)) { if(file_list_count) { - if((new_file_write + flat_file->blocklens[j]) > + if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { end_fwr_size = new_buffer_write - new_file_write; new_file_write = new_buffer_write; @@ -1048,9 +1048,9 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_write < new_buffer_write) && + if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_write = 0; mem_list_count = 0; @@ -1080,17 +1080,17 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, } /* while (new_buffer_write < new_file_write) */ } /* if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ /* fills the allocated readlist arrays */ k = start_k; j = start_j; - for (i=0; icount) + (int)flat_buf->indices[k]); - + if(!i) { mem_lengths[0] = bwr_size; mem_offsets[0] += flat_buf->blocklens[k] - bwr_size; @@ -1126,7 +1126,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, file_lengths[i] = end_fwr_size; if (flat_file->blocklens[j] == end_fwr_size) fwr_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { fwr_size = flat_file->blocklens[j] - end_fwr_size; j--; @@ -1166,7 +1166,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.c index a55c3c89254..2ddbd66b148 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago. + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -42,6 +42,6 @@ struct ADIOI_Fns_struct ADIO_PVFS2_operations = { "PVFS2: the PVFS v2 or OrangeFS file systems" }; -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.h b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.h index 95c5912376b..76fe56045a3 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.h +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -19,16 +19,16 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code); void ADIOI_PVFS2_Close(ADIO_File fd, int *error_code); -void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); void ADIOI_PVFS2_WriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_PVFS2_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_PVFS2_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int @@ -43,7 +43,7 @@ void ADIOI_PVFS2_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); int ADIOI_PVFS2_Feature(ADIO_File fd, int flag); -void ADIOI_PVFS2_IReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_IReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int *error_code); @@ -51,7 +51,7 @@ void ADIOI_PVFS2_IWriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int *error_code); -void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int flag, int *error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_aio.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_aio.c index f4d78497e3e..b90fdedabb8 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_aio.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_aio.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * vim: ts=8 sts=4 sw=4 noexpandtab - * - * Copyright (C) 1997 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -20,10 +20,10 @@ static int ADIOI_PVFS2_greq_class = 0; int ADIOI_PVFS2_aio_free_fn(void *extra_state); int ADIOI_PVFS2_aio_poll_fn(void *extra_state, MPI_Status *status); -int ADIOI_PVFS2_aio_wait_fn(int count, void ** array_of_states, +int ADIOI_PVFS2_aio_wait_fn(int count, void ** array_of_states, double timeout, MPI_Status *status); -void ADIOI_PVFS2_IReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_IReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int *error_code) @@ -41,7 +41,7 @@ void ADIOI_PVFS2_IWriteContig(ADIO_File fd, const void *buf, int count, offset, request, WRITE, error_code); } -void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int flag, int *error_code) @@ -87,13 +87,13 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, if (file_ptr_type == ADIO_INDIVIDUAL) { /* copy individual file pointer into offset variable, continue */ offset = fd->fp_ind; - } + } if (flag == READ) { #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_iread_a, 0, NULL ); #endif - ret = PVFS_isys_read(pvfs_fs->object_ref, aio_req->file_req, offset, - buf, aio_req->mem_req, &(pvfs_fs->credentials), + ret = PVFS_isys_read(pvfs_fs->object_ref, aio_req->file_req, offset, + buf, aio_req->mem_req, &(pvfs_fs->credentials), &(aio_req->resp_io), &(aio_req->op_id), NULL); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_iread_b, 0, NULL ); @@ -102,13 +102,13 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_iwrite_a, 0, NULL ); #endif - ret = PVFS_isys_write(pvfs_fs->object_ref, aio_req->file_req, offset, - buf, aio_req->mem_req, &(pvfs_fs->credentials), + ret = PVFS_isys_write(pvfs_fs->object_ref, aio_req->file_req, offset, + buf, aio_req->mem_req, &(pvfs_fs->credentials), &(aio_req->resp_io), &(aio_req->op_id), NULL); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_iwrite_b, 0, NULL ); -#endif - } +#endif + } /* --BEGIN ERROR HANDLING-- */ if (ret < 0 ) { @@ -123,9 +123,9 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, #ifdef HAVE_MPI_GREQUEST_EXTENSIONS /* posted. defered completion */ - if (ret == 0) { + if (ret == 0) { if (ADIOI_PVFS2_greq_class == 0) { - MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, + MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, ADIOI_PVFS2_aio_free_fn, MPIU_Greq_cancel_fn, ADIOI_PVFS2_aio_poll_fn, ADIOI_PVFS2_aio_wait_fn, &ADIOI_PVFS2_greq_class); @@ -188,7 +188,7 @@ int ADIOI_PVFS2_aio_poll_fn(void *extra_state, MPI_Status *status) } /* wait for multiple requests to complete */ -int ADIOI_PVFS2_aio_wait_fn(int count, void ** array_of_states, +int ADIOI_PVFS2_aio_wait_fn(int count, void ** array_of_states, double timeout, MPI_Status *status) { @@ -214,7 +214,7 @@ int ADIOI_PVFS2_aio_wait_fn(int count, void ** array_of_states, for (i=0; i< count; i++) { for (j=0; jop_id) { - aio_reqlist[j]->nbytes = + aio_reqlist[j]->nbytes = aio_reqlist[j]->resp_io.total_completed; MPI_Grequest_complete(aio_reqlist[j]->req); } @@ -226,5 +226,5 @@ int ADIOI_PVFS2_aio_wait_fn(int count, void ** array_of_states, /* - * vim: ts=8 sts=4 sw=4 noexpandtab + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_close.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_close.c index 847dd8341cd..907b0b031d9 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,6 +23,6 @@ void ADIOI_PVFS2_Close(ADIO_File fd, int *error_code) *error_code = MPI_SUCCESS; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.c index ccd3c1916c6..b85e9b590a5 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2003 University of Chicago. +/* + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -37,7 +37,7 @@ void ADIOI_PVFS2_End(int *error_code) *error_code = MPI_SUCCESS; } -int ADIOI_PVFS2_End_call(MPI_Comm comm, int keyval, +int ADIOI_PVFS2_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state) { int error_code; @@ -77,10 +77,10 @@ void ADIOI_PVFS2_Init(int *error_code ) return; } - + MPI_Keyval_create(MPI_NULL_COPY_FN, ADIOI_PVFS2_End_call, - &ADIOI_PVFS2_Initialized, (void *)0); - /* just like romio does, we make a dummy attribute so we + &ADIOI_PVFS2_Initialized, (void *)0); + /* just like romio does, we make a dummy attribute so we * get cleaned up */ MPI_Attr_put(MPI_COMM_SELF, ADIOI_PVFS2_Initialized, (void *)0); } @@ -88,7 +88,7 @@ void ADIOI_PVFS2_Init(int *error_code ) void ADIOI_PVFS2_makeattribs(PVFS_sys_attr * attribs) { memset(attribs, 0, sizeof(PVFS_sys_attr)); - + attribs->owner = geteuid(); attribs->group = getegid(); attribs->perms = 0644; @@ -145,6 +145,6 @@ int ADIOI_PVFS2_error_convert(int pvfs_error) } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.h b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.h index f63f84a27bd..a34f84ee3ef 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.h +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_common.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -28,7 +28,7 @@ void ADIOI_PVFS2_Init(int *error_code ); void ADIOI_PVFS2_makeattribs(PVFS_sys_attr * attribs); void ADIOI_PVFS2_makecredentials(PVFS_credentials * credentials); void ADIOI_PVFS2_End(int *error_code); -int ADIOI_PVFS2_End_call(MPI_Comm comm, int keyval, +int ADIOI_PVFS2_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state); int ADIOI_PVFS2_error_convert(int pvfs_error); diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_delete.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_delete.c index f5770bb393c..b360288a643 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_delete.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago. + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -21,7 +21,7 @@ void ADIOI_PVFS2_Delete(const char *filename, int *error_code) ADIOI_PVFS2_Init(error_code); /* --BEGIN ERROR HANDLING-- */ - if (*error_code != MPI_SUCCESS) + if (*error_code != MPI_SUCCESS) { /* ADIOI_PVFS2_INIT handles creating error codes itself */ return; @@ -47,7 +47,7 @@ void ADIOI_PVFS2_Delete(const char *filename, int *error_code) ret = PVFS_sys_getparent(cur_fs, pvfs_path, &credentials, &resp_getparent); - ret = PVFS_sys_remove(resp_getparent.basename, + ret = PVFS_sys_remove(resp_getparent.basename, resp_getparent.parent_ref, &credentials); /* --BEGIN ERROR HANDLING-- */ if (ret != 0) { @@ -64,6 +64,6 @@ void ADIOI_PVFS2_Delete(const char *filename, int *error_code) return; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c index e07291f7575..f28f4f49272 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -21,7 +21,7 @@ void ADIOI_PVFS2_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, switch(flag) { case ADIO_FCNTL_GET_FSIZE: - ret = PVFS_sys_getattr(pvfs_fs->object_ref, PVFS_ATTR_SYS_SIZE, + ret = PVFS_sys_getattr(pvfs_fs->object_ref, PVFS_ATTR_SYS_SIZE, &(pvfs_fs->credentials), &resp_getattr); if (ret != 0 ) { /* --BEGIN ERROR HANDLING-- */ @@ -54,6 +54,6 @@ void ADIOI_PVFS2_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, } } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_flush.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_flush.c index 18061084a85..a82cc54e600 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -12,12 +12,12 @@ * flush request, it will stress the PVFS2 servers with redundant * PVFS_sys_flush requests. Instead, one process should wait for * everyone to catch up, do the sync, then broadcast the result. We can - * get away with this thanks to PVFS2's stateless design + * get away with this thanks to PVFS2's stateless design */ -void ADIOI_PVFS2_Flush(ADIO_File fd, int *error_code) -{ - int ret, rank, dummy=0, dummy_in=0; +void ADIOI_PVFS2_Flush(ADIO_File fd, int *error_code) +{ + int ret, rank, dummy=0, dummy_in=0; ADIOI_PVFS2_fs *pvfs_fs; static char myname[] = "ADIOI_PVFS2_FLUSH"; @@ -30,7 +30,7 @@ void ADIOI_PVFS2_Flush(ADIO_File fd, int *error_code) /* unlike ADIOI_PVFS2_Resize, MPI_File_sync() does not perform any * syncronization */ - MPI_Reduce(&dummy_in, &dummy, 1, MPI_INT, MPI_SUM, + MPI_Reduce(&dummy_in, &dummy, 1, MPI_INT, MPI_SUM, fd->hints->ranklist[0], fd->comm); /* io_worker computed in ADIO_Open */ @@ -50,6 +50,6 @@ void ADIOI_PVFS2_Flush(ADIO_File fd, int *error_code) /* --END ERROR HANDLING-- */ } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_hints.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_hints.c index 47522064e30..5961726e2be 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -44,15 +44,15 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) fd->hints->fs_hints.pvfs2.listio_read = ADIOI_HINT_DISABLE; fd->hints->fs_hints.pvfs2.listio_write = ADIOI_HINT_DISABLE; - + /* any user-provided hints? */ if (users_info != MPI_INFO_NULL) { value = (char *) ADIOI_Malloc( (MPI_MAX_INFO_VAL+1)*sizeof(char)); /* pvfs2 debugging */ - ADIOI_Info_get(users_info, "romio_pvfs2_debugmask", + ADIOI_Info_get(users_info, "romio_pvfs2_debugmask", MPI_MAX_INFO_VAL, value, &flag); if (flag) { - tmp_value = fd->hints->fs_hints.pvfs2.debugmask = + tmp_value = fd->hints->fs_hints.pvfs2.debugmask = PVFS_debug_eventlog_to_mask(value); MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm); @@ -64,7 +64,7 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) return; } /* --END ERROR HANDLING-- */ - + ADIOI_Info_set(fd->info, "romio_pvfs2_debugmask", value); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io.h b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io.h index aefe0653ecb..c9a394f2042 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io.h +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 2006 University of Chicago. + * Copyright (C) 2006 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -60,7 +60,7 @@ void print_buf_file_ol_pairs(int64_t buf_off_arr[], /* Datatype I/O helper prototypes */ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int *error_code, int rw_type); int convert_named(MPI_Datatype *mpi_dtype, diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c index 09012523b8a..c8046b36897 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 2006 University of Chicago. + * Copyright (C) 2006 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -45,9 +45,9 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); /* changed below if error */ - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; - /* datatype is the memory type + /* datatype is the memory type * fd->filetype is the file type */ MPI_Type_size_x(fd->filetype, &filetype_size); if (filetype_size == 0) { @@ -70,34 +70,34 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, * case is handled by using fd->disp and byte-converted off. */ pvfs_disp = fd->disp; - if (file_ptr_type == ADIO_INDIVIDUAL) + if (file_ptr_type == ADIO_INDIVIDUAL) { - if (filetype_is_contig) + if (filetype_is_contig) { off = fd->fp_ind - fd->disp; } - else + else { int flag = 0; /* Should have already been flattened in ADIO_Open*/ - while (flat_file_p->type != fd->filetype) + while (flat_file_p->type != fd->filetype) { flat_file_p = flat_file_p->next; } num_filetypes = -1; - while (!flag) + while (!flag) { num_filetypes++; - for (i = 0; i < flat_file_p->count; i++) + for (i = 0; i < flat_file_p->count; i++) { /* Start on a non zero-length region */ - if (flat_file_p->blocklens[i]) + if (flat_file_p->blocklens[i]) { if (fd->disp + flat_file_p->indices[i] + (num_filetypes * filetype_extent) + flat_file_p->blocklens[i] > fd->fp_ind && - fd->disp + flat_file_p->indices[i] <= - fd->fp_ind) + fd->disp + flat_file_p->indices[i] <= + fd->fp_ind) { cur_flat_file_reg_off = fd->fp_ind - (fd->disp + flat_file_p->indices[i] + @@ -116,7 +116,7 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, } } else /* ADIO_EXPLICIT */ - { + { off = etype_size * offset; } @@ -144,7 +144,7 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, if (ret != 0) /* TODO: convert this to MPIO error handling */ fprintf(stderr, "ADIOI_PVFS2_stridedDtypeIO: error in final" " CONTIG memory type\n"); - PVFS_Request_free(&tmp_mem_req); + PVFS_Request_free(&tmp_mem_req); /* pvfs_disp is used to offset the filetype */ ret = PVFS_Request_hindexed(1, &pvfs_blk, &pvfs_disp, @@ -163,7 +163,7 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, if (ret != 0) { fprintf(stderr, "ADIOI_PVFS2_StridedDtypeIO: Warning - PVFS_sys_" - "read/write returned %d and completed %Ld bytes.\n", + "read/write returned %d and completed %Ld bytes.\n", ret, (long long)resp_io.total_completed); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, @@ -177,40 +177,40 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, { fd->fp_ind = off += resp_io.total_completed; } - + error_state: fd->fp_sys_posn = -1; /* set it to null. */ PVFS_Request_free(&mem_req); - PVFS_Request_free(&file_req); + PVFS_Request_free(&file_req); #ifdef DEBUG_DTYPE fprintf(stderr, "ADIOI_PVFS2_StridedDtypeIO: " - "resp_io.total_completed=%Ld,ret=%d\n", + "resp_io.total_completed=%Ld,ret=%d\n", resp_io.total_completed, ret); #endif #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, resp_io.total_completed); /* This is a temporary way of filling in status. The right way is to - * keep track of how much data was actually acccessed by + * keep track of how much data was actually acccessed by * ADIOI_BUFFERED operations */ #endif return ret; } /* convert_mpi_pvfs2_dtype - Convert a MPI datatype into - * a PVFS2 datatype so that we can natively use the PVFS2 - * datatypes in the PVFS2 I/O calls instead of converting - * all datatypes to the hindexed method + * a PVFS2 datatype so that we can natively use the PVFS2 + * datatypes in the PVFS2 I/O calls instead of converting + * all datatypes to the hindexed method * return 1 - a leaf node - * return 0 - normal return + * return 0 - normal return * return -1 - problems */ -int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, +int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, PVFS_Request *pvfs_dtype) { - int num_int = -1, num_addr = -1, num_dtype = -1, + int num_int = -1, num_addr = -1, num_dtype = -1, combiner = -1, i = -1, ret = -1, leaf = -1; int *arr_int = NULL; MPI_Aint *arr_addr = NULL; @@ -227,16 +227,16 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, &num_dtype, &combiner); - /* Depending on type of datatype do the following + /* Depending on type of datatype do the following * operations */ - + if (combiner == MPI_COMBINER_NAMED) { convert_named(mpi_dtype, pvfs_dtype, combiner); return 1; } - /* Allocate space for the arrays necessary for + /* Allocate space for the arrays necessary for * MPI_Type_get_contents */ if ((arr_int = ADIOI_Malloc(sizeof(int)*num_int)) == NULL) @@ -266,7 +266,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, arr_addr, arr_dtype); - /* If it's not a predefined datatype, it is either a + /* If it's not a predefined datatype, it is either a * derived datatype or a structured datatype */ if (combiner != MPI_COMBINER_STRUCT) @@ -278,28 +278,28 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, { case MPI_COMBINER_CONTIGUOUS: leaf = convert_mpi_pvfs2_dtype(&arr_dtype[0], old_pvfs_dtype); - ret = PVFS_Request_contiguous(arr_int[0], + ret = PVFS_Request_contiguous(arr_int[0], *old_pvfs_dtype, pvfs_dtype); break; case MPI_COMBINER_VECTOR: leaf = convert_mpi_pvfs2_dtype(&arr_dtype[0], old_pvfs_dtype); ret = PVFS_Request_vector(arr_int[0], arr_int[1], - arr_int[2], *old_pvfs_dtype, + arr_int[2], *old_pvfs_dtype, pvfs_dtype); break; case MPI_COMBINER_HVECTOR: leaf = convert_mpi_pvfs2_dtype(&arr_dtype[0], old_pvfs_dtype); ret = PVFS_Request_hvector(arr_int[0], arr_int[1], - arr_addr[0], *old_pvfs_dtype, + arr_addr[0], *old_pvfs_dtype, pvfs_dtype); break; - /* Both INDEXED and HINDEXED types require PVFS_size - * address arrays. Therefore, we need to copy and - * convert the data from MPI_get_contents() into + /* Both INDEXED and HINDEXED types require PVFS_size + * address arrays. Therefore, we need to copy and + * convert the data from MPI_get_contents() into * a PVFS_size buffer */ case MPI_COMBINER_INDEXED: leaf = convert_mpi_pvfs2_dtype(&arr_dtype[0], old_pvfs_dtype); - if ((pvfs_arr_disp = + if ((pvfs_arr_disp = ADIOI_Malloc(arr_int[0]*sizeof(PVFS_size))) == 0) { fprintf(stderr, "convert_mpi_pvfs2_dtype: " @@ -307,17 +307,17 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, } for (i = 0; i < arr_int[0]; i++) { - pvfs_arr_disp[i] = + pvfs_arr_disp[i] = (PVFS_size) arr_int[arr_int[0]+1+i]; } - ret = PVFS_Request_indexed(arr_int[0], &arr_int[1], + ret = PVFS_Request_indexed(arr_int[0], &arr_int[1], pvfs_arr_disp, *old_pvfs_dtype, pvfs_dtype); ADIOI_Free(pvfs_arr_disp); break; case MPI_COMBINER_HINDEXED: leaf = convert_mpi_pvfs2_dtype(&arr_dtype[0], old_pvfs_dtype); - if ((pvfs_arr_disp = + if ((pvfs_arr_disp = ADIOI_Malloc(arr_int[0]*sizeof(PVFS_size))) == 0) { fprintf(stderr, "convert_mpi_pvfs2_dtype: " @@ -325,17 +325,17 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, } for (i = 0; i < arr_int[0]; i++) { - pvfs_arr_disp[i] = + pvfs_arr_disp[i] = (PVFS_size) arr_addr[i]; } - ret = PVFS_Request_hindexed(arr_int[0], &arr_int[1], + ret = PVFS_Request_hindexed(arr_int[0], &arr_int[1], (int64_t *)&arr_addr[0], *old_pvfs_dtype, pvfs_dtype); - ADIOI_Free(pvfs_arr_disp); + ADIOI_Free(pvfs_arr_disp); break; case MPI_COMBINER_DUP: leaf = convert_mpi_pvfs2_dtype(&arr_dtype[0], old_pvfs_dtype); - ret = PVFS_Request_contiguous(1, + ret = PVFS_Request_contiguous(1, *old_pvfs_dtype, pvfs_dtype); break; @@ -343,7 +343,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, /* No native PVFS2 support for this operation currently */ ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "INDEXED_BLOCK is unsupported\n"); + "INDEXED_BLOCK is unsupported\n"); break; case MPI_COMBINER_HINDEXED_BLOCK: /* No native PVFS2 support for this operation currently */ @@ -354,42 +354,42 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, case MPI_COMBINER_HINDEXED_INTEGER: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "HINDEXED_INTEGER is unsupported\n"); + "HINDEXED_INTEGER is unsupported\n"); break; case MPI_COMBINER_STRUCT_INTEGER: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "STRUCT_INTEGER is unsupported\n"); + "STRUCT_INTEGER is unsupported\n"); break; case MPI_COMBINER_SUBARRAY: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "SUBARRAY is unsupported\n"); + "SUBARRAY is unsupported\n"); break; case MPI_COMBINER_DARRAY: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "DARRAY is unsupported\n"); + "DARRAY is unsupported\n"); break; case MPI_COMBINER_F90_REAL: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "F90_REAL is unsupported\n"); + "F90_REAL is unsupported\n"); break; case MPI_COMBINER_F90_COMPLEX: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "F90_COMPLEX is unsupported\n"); + "F90_COMPLEX is unsupported\n"); break; case MPI_COMBINER_F90_INTEGER: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "F90_INTEGER is unsupported\n"); + "F90_INTEGER is unsupported\n"); break; case MPI_COMBINER_RESIZED: ADIOI_Free(old_pvfs_dtype); fprintf(stderr, "convert_mpi_pvfs2_dtype: " - "RESIZED is unsupported\n"); + "RESIZED is unsupported\n"); break; default: break; @@ -400,7 +400,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, "for a derived datatype\n"); #ifdef DEBUG_DTYPE - print_dtype_info(combiner, + print_dtype_info(combiner, num_int, num_addr, num_dtype, @@ -418,7 +418,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, PVFS_Request_free(old_pvfs_dtype); ADIOI_Free(old_pvfs_dtype); - + return ret; } else /* MPI_COMBINER_STRUCT */ @@ -430,9 +430,9 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, /* When converting into a PVFS_Request_struct, we no longer * can use MPI_LB and MPI_UB. Therfore, we have to do the - * following. - * We simply ignore all the MPI_LB and MPI_UB types and - * get the lb and extent and pass it on through a + * following. + * We simply ignore all the MPI_LB and MPI_UB types and + * get the lb and extent and pass it on through a * PVFS resized_req */ arr_count = 0; @@ -450,7 +450,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, MPI_Type_get_extent(*mpi_dtype, &mpi_lb, &mpi_extent); pvfs_lb = mpi_lb; pvfs_extent = mpi_extent; - if ((pvfs_arr_len = ADIOI_Malloc(arr_count*sizeof(int))) + if ((pvfs_arr_len = ADIOI_Malloc(arr_count*sizeof(int))) == NULL) { fprintf(stderr, "convert_mpi_pvfs2_dtype: " @@ -464,7 +464,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, fprintf(stderr, "convert_mpi_pvfs2_dtype: " "Failed to allocate PVFS_Requests\n"); - if ((pvfs_arr_disp = ADIOI_Malloc(arr_count*sizeof(PVFS_size))) + if ((pvfs_arr_disp = ADIOI_Malloc(arr_count*sizeof(PVFS_size))) == NULL) { fprintf(stderr, "convert_mpi_pvfs2_dtype: " @@ -480,12 +480,12 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, leaf = convert_mpi_pvfs2_dtype( &arr_dtype[i], &old_pvfs_dtype_arr[arr_count]); if (leaf != 1) - MPI_Type_free(&arr_dtype[i]); - pvfs_arr_disp[arr_count] = + MPI_Type_free(&arr_dtype[i]); + pvfs_arr_disp[arr_count] = (PVFS_size) arr_addr[i]; if (has_lb_ub) { - pvfs_arr_len[arr_count] = + pvfs_arr_len[arr_count] = arr_int[i+1]; } arr_count++; @@ -500,8 +500,8 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, if ((tmp_pvfs_dtype = ADIOI_Malloc(sizeof(PVFS_Request))) == NULL) fprintf(stderr, "convert_mpi_pvfs2_dtype: " "Failed to allocate PVFS_Request\n"); - - ret = PVFS_Request_struct(arr_count, pvfs_arr_len, + + ret = PVFS_Request_struct(arr_count, pvfs_arr_len, pvfs_arr_disp, old_pvfs_dtype_arr, tmp_pvfs_dtype); if (ret != 0) @@ -517,7 +517,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, arr_count++; } } - + #ifdef DEBUG_DTYPE fprintf(stderr, "STRUCT(WITHOUT %d LB or UB)(%d,[", arr_int[0] - arr_count, arr_count); @@ -528,8 +528,8 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, fprintf(stderr, "]\n"); fprintf(stderr, "RESIZED(LB = %Ld, EXTENT = %Ld)\n", pvfs_lb, pvfs_extent); -#endif - ret = PVFS_Request_resized(*tmp_pvfs_dtype, +#endif + ret = PVFS_Request_resized(*tmp_pvfs_dtype, pvfs_lb, pvfs_extent, pvfs_dtype); if (ret != 0) fprintf(stderr, "Error in PVFS_Request_resize\n"); @@ -539,7 +539,7 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, } else /* No MPI_LB or MPI_UB datatypes */ { - ret = PVFS_Request_struct(arr_int[0], &arr_int[1], + ret = PVFS_Request_struct(arr_int[0], &arr_int[1], pvfs_arr_disp, old_pvfs_dtype_arr, pvfs_dtype); if (ret != 0) @@ -553,14 +553,14 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, } #ifdef DEBUG_DTYPE - print_dtype_info(combiner, + print_dtype_info(combiner, num_int, num_addr, num_dtype, arr_int, arr_addr, arr_dtype); -#endif +#endif } ADIOI_Free(arr_int); @@ -579,9 +579,9 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, return -1; } -int convert_named(MPI_Datatype *mpi_dtype, +int convert_named(MPI_Datatype *mpi_dtype, PVFS_Request *pvfs_dtype, int combiner) -{ +{ int ret = -1; #ifdef DEBUG_DTYPE fprintf(stderr, "NAMED"); @@ -681,7 +681,7 @@ int convert_named(MPI_Datatype *mpi_dtype, return ret; } -void print_dtype_info(int combiner, +void print_dtype_info(int combiner, int num_int, int num_addr, int num_dtype, @@ -696,7 +696,7 @@ void print_dtype_info(int combiner, fprintf(stderr, "CONTIG(%d)\n", arr_int[0]); break; case MPI_COMBINER_VECTOR: - fprintf(stderr, "VECTOR(%d,%d,%d)\n", + fprintf(stderr, "VECTOR(%d,%d,%d)\n", arr_int[0], arr_int[1], arr_int[2]); break; case MPI_COMBINER_HVECTOR: diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c index c5d03d151c9..014ec658a8f 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * * Copyright (C) 2006 Unknown (TODO: fix this) @@ -27,7 +27,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, int etypes_in_filetype = -1, size_in_filetype = -1; int bytes_into_filetype = 0; MPI_Offset total_bytes_accessed = 0; - + /* parameters for offset-length pairs arrays */ int64_t buf_off_arr[MAX_OL_COUNT]; int32_t buf_len_arr[MAX_OL_COUNT]; @@ -35,7 +35,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, int32_t file_len_arr[MAX_OL_COUNT]; int32_t buf_ol_count = 0; int32_t file_ol_count = 0; - + /* parameters for flattened memory and file datatypes*/ int flat_buf_index = 0; int flat_file_index = 0; @@ -45,7 +45,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, MPI_Count buftype_size = -1, filetype_size = -1; MPI_Aint filetype_extent = -1, buftype_extent = -1;; int buftype_is_contig = -1, filetype_is_contig = -1; - + /* PVFS2 specific parameters */ PVFS_Request mem_req, file_req; ADIOI_PVFS2_fs * pvfs_fs; @@ -73,7 +73,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, io_size = buftype_size*count; pvfs_fs = (ADIOI_PVFS2_fs*)fd->fs_ptr; - + /* Flatten the memory datatype * (file datatype has already been flattened in ADIO open * unless it is contibuous, then we need to flatten it manually) @@ -84,18 +84,18 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, { ADIOI_Flatten_datatype(datatype); flat_buf_p = ADIOI_Flatlist; - while (flat_buf_p->type != datatype) + while (flat_buf_p->type != datatype) flat_buf_p = flat_buf_p->next; } - else + else { /* flatten and add to the list */ flat_buf_p = (ADIOI_Flatlist_node *) ADIOI_Malloc (sizeof(ADIOI_Flatlist_node)); flat_buf_p->blocklens = (ADIO_Offset*)ADIOI_Malloc(sizeof(ADIO_Offset)); - flat_buf_p->indices = + flat_buf_p->indices = (ADIO_Offset *) ADIOI_Malloc(sizeof(ADIO_Offset)); - /* For the buffer, we can optimize the buftype, this is not + /* For the buffer, we can optimize the buftype, this is not * possible with the filetype since it is tiled */ buftype_size = buftype_size*count; buftype_extent = buftype_size*count; @@ -110,7 +110,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, * flattened */ ADIOI_Flatten_datatype(fd->filetype); flat_file_p = ADIOI_Flatlist; - while (flat_file_p->type != fd->filetype) + while (flat_file_p->type != fd->filetype) flat_file_p = flat_file_p->next; } else @@ -119,18 +119,18 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, flat_file_p = (ADIOI_Flatlist_node *) ADIOI_Malloc (sizeof(ADIOI_Flatlist_node)); flat_file_p->blocklens =(ADIO_Offset*)ADIOI_Malloc(sizeof(ADIO_Offset)); - flat_file_p->indices = + flat_file_p->indices = (ADIO_Offset *) ADIOI_Malloc(sizeof(ADIO_Offset)); flat_file_p->blocklens[0] = filetype_size; flat_file_p->indices[0] = 0; flat_file_p->count = 1; } - - /* Find out where we are in the flattened filetype (the block index, + + /* Find out where we are in the flattened filetype (the block index, * how far into the block, and how many bytes_into_filetype) - * If the file_ptr_type == ADIO_INDIVIDUAL we will use disp, fp_ind - * to figure this out (offset should always be zero) - * If file_ptr_type == ADIO_EXPLICIT, we will use disp and offset + * If the file_ptr_type == ADIO_INDIVIDUAL we will use disp, fp_ind + * to figure this out (offset should always be zero) + * If file_ptr_type == ADIO_EXPLICIT, we will use disp and offset * to figure this out. */ etype_size = fd->etype_size; @@ -170,7 +170,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, assert(i != flat_file_p->count); } else - { + { num_filetypes = (int) (offset / num_etypes_in_filetype); etypes_in_filetype = (int) (offset % num_etypes_in_filetype); size_in_filetype = etypes_in_filetype * etype_size; @@ -178,10 +178,10 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, tmp_filetype_size = 0; for (i=0; icount; i++) { tmp_filetype_size += flat_file_p->blocklens[i]; - if (tmp_filetype_size > size_in_filetype) + if (tmp_filetype_size > size_in_filetype) { flat_file_index = i; - cur_flat_file_reg_off = flat_file_p->blocklens[i] - + cur_flat_file_reg_off = flat_file_p->blocklens[i] - (tmp_filetype_size - size_in_filetype); bytes_into_filetype = offset * filetype_size - flat_file_p->blocklens[i]; @@ -193,7 +193,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, fprintf(stderr, "ADIOI_PVFS2_StridedListIO: (fd->fp_ind=%Ld,fd->disp=%Ld," " offset=%Ld)\n(flat_file_index=%d,cur_flat_file_reg_off=%Ld," "bytes_into_filetype=%d)\n", - fd->fp_ind, fd->disp, offset, flat_file_index, + fd->fp_ind, fd->disp, offset, flat_file_index, cur_flat_file_reg_off, bytes_into_filetype); #endif #ifdef DEBUG_LIST2 @@ -207,13 +207,13 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, fprintf(stderr, "(offset, length) = (%Ld, %d)\n", flat_file_p->indices[i], flat_file_p->blocklens[i]); -#endif +#endif /* total data written */ cur_io_size = 0; while (cur_io_size != io_size) { - /* Initialize the temporarily unrolling lists and + /* Initialize the temporarily unrolling lists and * and associated variables */ buf_ol_count = 0; file_ol_count = 0; @@ -275,7 +275,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, } } while (0); #endif - + /* Run list I/O operation */ ret = PVFS_Request_hindexed(buf_ol_count, buf_len_arr, buf_off_arr, PVFS_BYTE, &mem_req); @@ -285,16 +285,16 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, if (rw_type == READ) { ret = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, - buf, mem_req, + buf, mem_req, &(pvfs_fs->credentials), &resp_io); } - else + else { ret = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, - buf, mem_req, + buf, mem_req, &(pvfs_fs->credentials), &resp_io); } - if (ret != 0) + if (ret != 0) { fprintf(stderr, "ADIOI_PVFS2_StridedListIO: Warning - PVFS_sys_" "read/write returned %d and completed %lld bytes.\n", @@ -313,14 +313,14 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, PVFS_Request_free(&mem_req); PVFS_Request_free(&file_req); } - + #ifdef DEBUG_LIST fprintf(stderr, "ADIOI_PVFS2_StridedListIO: " - "total_bytes_accessed=%Ld,ret=%d\n", + "total_bytes_accessed=%Ld,ret=%d\n", total_bytes_accessed, ret); #endif - if (file_ptr_type == ADIO_INDIVIDUAL) + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += total_bytes_accessed; *error_code = MPI_SUCCESS; @@ -380,11 +380,11 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, int32_t *file_ol_count_p) { int region_size = -1; - + /* parameters for flattened memory and file datatypes*/ int64_t cur_flat_buf_reg_left = 0; int64_t cur_flat_file_reg_left = 0; - + #ifdef DEBUG_LIST2 fprintf(stderr, "gen_list_arr:\n"); #endif @@ -394,31 +394,31 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, fprintf(stderr, "buf_ol_count != 0 || file_ol_count != 0\n"); return -1; } - - /* Start on a non-zero memory and file region - * Note this does not affect the bytes_completed - * since no data is in these regions. Initialize the + + /* Start on a non-zero memory and file region + * Note this does not affect the bytes_completed + * since no data is in these regions. Initialize the * first memory and file offsets. */ while (flat_buf_p->blocklens[(*flat_buf_index_p)] == 0) { - (*flat_buf_index_p) = ((*flat_buf_index_p) + 1) % + (*flat_buf_index_p) = ((*flat_buf_index_p) + 1) % flat_buf_p->count; } buf_off_arr[*buf_ol_count_p] = - (*bytes_completed / flat_buf_size) * - flat_buf_extent + + (*bytes_completed / flat_buf_size) * + flat_buf_extent + flat_buf_p->indices[*flat_buf_index_p] + *cur_flat_buf_reg_off_p; buf_len_arr[*buf_ol_count_p] = 0; while (flat_file_p->blocklens[(*flat_file_index_p)] == 0) { - (*flat_file_index_p) = ((*flat_file_index_p) + 1) % + (*flat_file_index_p) = ((*flat_file_index_p) + 1) % flat_file_p->count; } - file_off_arr[*file_ol_count_p] = disp + - (((bytes_into_filetype + *bytes_completed) / flat_file_size) * - flat_file_extent) + + file_off_arr[*file_ol_count_p] = disp + + (((bytes_into_filetype + *bytes_completed) / flat_file_size) * + flat_file_extent) + flat_file_p->indices[*flat_file_index_p] + *cur_flat_file_reg_off_p; file_len_arr[*file_ol_count_p] = 0; @@ -442,21 +442,21 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, - *cur_flat_file_reg_off_p; #ifdef DEBUG_LIST2 - fprintf(stderr, + fprintf(stderr, "flat_buf_index=%d flat_buf->blocklens[%d]=%d\n" "cur_flat_buf_reg_left=%Ld " - "*cur_flat_buf_reg_off_p=%Ld\n" + "*cur_flat_buf_reg_off_p=%Ld\n" "flat_file_index=%d flat_file->blocklens[%d]=%d\n" "cur_flat_file_reg_left=%Ld " - "*cur_flat_file_reg_off_p=%Ld\n" + "*cur_flat_file_reg_off_p=%Ld\n" "bytes_completed=%Ld\n" "buf_ol_count=%d file_ol_count=%d\n" "buf_len_arr[%d]=%d file_len_arr[%d]=%d\n\n", - *flat_buf_index_p, *flat_buf_index_p, + *flat_buf_index_p, *flat_buf_index_p, flat_buf_p->blocklens[*flat_buf_index_p], cur_flat_buf_reg_left, *cur_flat_buf_reg_off_p, - *flat_file_index_p, *flat_file_index_p, + *flat_file_index_p, *flat_file_index_p, flat_file_p->blocklens[*flat_file_index_p], cur_flat_file_reg_left, *cur_flat_file_reg_off_p, @@ -475,26 +475,26 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, region_size = cur_flat_file_reg_left; else region_size = cur_flat_buf_reg_left; - + if (region_size > total_io_size - *bytes_completed) region_size = total_io_size - *bytes_completed; - + /* Add this piece to both the mem and file arrays - * coalescing offset-length pairs if possible and advance + * coalescing offset-length pairs if possible and advance * the pointers through the flatten mem and file datatypes - * as well Note: no more than a single piece can be done + * as well Note: no more than a single piece can be done * since we take the smallest one possible */ - + if (cur_flat_buf_reg_left == region_size) { #ifdef DEBUG_LIST2 fprintf(stderr, "reached end of memory block...\n"); #endif - (*flat_buf_index_p) = ((*flat_buf_index_p) + 1) % + (*flat_buf_index_p) = ((*flat_buf_index_p) + 1) % flat_buf_p->count; while (flat_buf_p->blocklens[(*flat_buf_index_p)] == 0) { - (*flat_buf_index_p) = ((*flat_buf_index_p) + 1) % + (*flat_buf_index_p) = ((*flat_buf_index_p) + 1) % flat_buf_p->count; } *cur_flat_buf_reg_off_p = 0; @@ -524,13 +524,13 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, } #endif - /* Don't prepare for the next piece if we have reached + /* Don't prepare for the next piece if we have reached * the limit or else it will segment fault. */ if ((*buf_ol_count_p) != max_ol_count) { - buf_off_arr[*buf_ol_count_p] = - ((*bytes_completed + region_size) / flat_buf_size) * - flat_buf_extent + + buf_off_arr[*buf_ol_count_p] = + ((*bytes_completed + region_size) / flat_buf_size) * + flat_buf_extent + flat_buf_p->indices[*flat_buf_index_p] + (*cur_flat_buf_reg_off_p); buf_len_arr[*buf_ol_count_p] = 0; @@ -549,8 +549,8 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, { fprintf(stderr, "gen_listio_arr: Error\n"); } - - /* To calculate the absolute file offset we need to + + /* To calculate the absolute file offset we need to * add the disp, how many filetypes we have gone through, * the relative block offset in the filetype and how far * into the block we have gone. */ @@ -559,11 +559,11 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, #ifdef DEBUG_LIST2 fprintf(stderr, "reached end of file block...\n"); #endif - (*flat_file_index_p) = ((*flat_file_index_p) + 1) % + (*flat_file_index_p) = ((*flat_file_index_p) + 1) % flat_file_p->count; while (flat_file_p->blocklens[(*flat_file_index_p)] == 0) { - (*flat_file_index_p) = ((*flat_file_index_p) + 1) % + (*flat_file_index_p) = ((*flat_file_index_p) + 1) % flat_file_p->count; } (*cur_flat_file_reg_off_p) = 0; @@ -597,10 +597,10 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, * the limit or else it will segment fault. */ if ((*file_ol_count_p) != max_ol_count) { - file_off_arr[*file_ol_count_p] = disp + - (((bytes_into_filetype + *bytes_completed + region_size) - / flat_file_size) * - flat_file_extent) + + file_off_arr[*file_ol_count_p] = disp + + (((bytes_into_filetype + *bytes_completed + region_size) + / flat_file_size) * + flat_file_extent) + flat_file_p->indices[*flat_file_index_p] + (*cur_flat_file_reg_off_p); file_len_arr[*file_ol_count_p] = 0; @@ -620,12 +620,12 @@ int gen_listio_arr(ADIOI_Flatlist_node *flat_buf_p, fprintf(stderr, "gen_listio_arr: Error\n"); } #ifdef DEBUG_LIST2 - fprintf(stderr, + fprintf(stderr, "------------------------------\n\n"); #endif *bytes_completed += region_size; } - /* Increment the count if we stopped in the middle of a + /* Increment the count if we stopped in the middle of a * memory or file region */ if (*cur_flat_buf_reg_off_p != 0) (*buf_ol_count_p)++; @@ -645,7 +645,7 @@ void print_buf_file_ol_pairs(int64_t buf_off_arr[], int rw_type) { int i = -1; - + fprintf(stderr, "buf_ol_pairs(offset,length) count = %d\n", buf_ol_count); for (i = 0; i < buf_ol_count; i++) diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_open.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_open.c index c5d933f42b5..e14c40c9ac3 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -14,13 +14,13 @@ struct open_status_s { PVFS_object_ref object_ref; }; typedef struct open_status_s open_status; - + /* steps for getting a handle: (it gets a little convoluted, but at least - * it's deterministic) - * . lookup the file. + * it's deterministic) + * . lookup the file. * . if lookup succeeds, but we were passed MPI_MODE_EXCL, that's an error - * . if lookup fails, the file might not exist. - * in that case, create the file if we were passed MPI_MODE_CREATE + * . if lookup fails, the file might not exist. + * in that case, create the file if we were passed MPI_MODE_CREATE * . if the create fails, that means someone else created the file between * our call to lookup and our call to create (like if N processors all * open the same file with MPI_COMM_SELF). Then we can just look up the @@ -31,7 +31,7 @@ typedef struct open_status_s open_status; */ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, int nr_datafiles, PVFS_size strip_size, - ADIOI_PVFS2_fs *pvfs2_fs, + ADIOI_PVFS2_fs *pvfs2_fs, open_status *o_status) { int ret; @@ -48,7 +48,7 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, } dist = NULL; - + memset(&resp_lookup, 0, sizeof(resp_lookup)); memset(&resp_getparent, 0, sizeof(resp_getparent)); memset(&resp_create, 0, sizeof(resp_create)); @@ -59,13 +59,13 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, if ( ret == (-PVFS_ENOENT)) { if (access_mode & ADIO_CREATE) { ret = PVFS_sys_getparent(fs_id, pvfs_name, - &(pvfs2_fs->credentials), &resp_getparent); + &(pvfs2_fs->credentials), &resp_getparent); if (ret < 0) { FPRINTF(stderr, "pvfs_sys_getparent returns with %d\n", ret); o_status->error = ret; return; } - + /* Set the distribution strip size if specified */ if (0 < strip_size) { /* Note that the distribution is hardcoded here */ @@ -83,13 +83,13 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, /* Perform file creation */ #ifdef HAVE_PVFS2_CREATE_WITHOUT_LAYOUT - ret = PVFS_sys_create(resp_getparent.basename, - resp_getparent.parent_ref, attribs, - &(pvfs2_fs->credentials), dist, &resp_create); -#else - ret = PVFS_sys_create(resp_getparent.basename, - resp_getparent.parent_ref, attribs, - &(pvfs2_fs->credentials), dist, NULL, &resp_create); + ret = PVFS_sys_create(resp_getparent.basename, + resp_getparent.parent_ref, attribs, + &(pvfs2_fs->credentials), dist, &resp_create); +#else + ret = PVFS_sys_create(resp_getparent.basename, + resp_getparent.parent_ref, attribs, + &(pvfs2_fs->credentials), dist, NULL, &resp_create); #endif /* if many creates are happening in this directory, the earlier @@ -99,7 +99,7 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, * handle */ if (ret == (-PVFS_EEXIST)) { ret = PVFS_sys_lookup(fs_id, pvfs_name, - &(pvfs2_fs->credentials), &resp_lookup, + &(pvfs2_fs->credentials), &resp_lookup, PVFS2_LOOKUP_LINK_FOLLOW); if ( ret < 0 ) { o_status->error = ret; @@ -130,7 +130,7 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, /* ADIOI_PVFS2_Open: * one process opens (or creates) the file, then broadcasts the result to the - * remaining processors. + * remaining processors. * * ADIO_Open used to perform an optimization when MPI_MODE_CREATE (and before * that, MPI_MODE_EXCL) was set. Because PVFS2 handles file lookup and @@ -154,7 +154,7 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) MPI_Datatype types[2] = {MPI_INT, MPI_BYTE}; int lens[2] = {1, sizeof(PVFS_object_ref)}; MPI_Aint offsets[2]; - + pvfs2_fs = (ADIOI_PVFS2_fs *) ADIOI_Malloc(sizeof(ADIOI_PVFS2_fs)); /* --BEGIN ERROR HANDLING-- */ @@ -186,7 +186,7 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) #endif if (rank == fd->hints->ranklist[0] && fd->fs_ptr == NULL) { /* given the filename, figure out which pvfs filesystem it is on */ - ret = PVFS_util_resolve(fd->filename, &cur_fs, + ret = PVFS_util_resolve(fd->filename, &cur_fs, pvfs_path, PVFS_NAME_MAX); if (ret < 0 ) { PVFS_perror("PVFS_util_resolve", ret); @@ -225,7 +225,7 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) /* --BEGIN ERROR HANDLING-- */ if (o_status.error != 0) - { + { ADIOI_Free(pvfs2_fs); fd->fs_ptr = NULL; *error_code = MPIO_Err_create_code(MPI_SUCCESS, diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read.c index 007b4dc3933..667ac6cd505 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * vim: ts=8 sts=4 sw=4 noexpandtab - * - * Copyright (C) 1997 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ #include "ad_pvfs2_io.h" #include "ad_pvfs2_common.h" -void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -60,7 +60,7 @@ void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif - ret = PVFS_sys_read(pvfs_fs->object_ref, file_req, offset, buf, + ret = PVFS_sys_read(pvfs_fs->object_ref, file_req, offset, buf, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); @@ -106,7 +106,7 @@ static int ADIOI_PVFS2_ReadStridedListIO(ADIO_File fd, void *buf, int count, static int ADIOI_PVFS2_ReadStridedDtypeIO(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int *error_code) { return ADIOI_PVFS2_StridedDtypeIO(fd, buf, count, @@ -126,12 +126,12 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, * - new List I/O (from avery) * - classic List I/O (the one that's always been in ROMIO) * I imagine we'll keep Datatype as an optional optimization, and afer a - * release or two promote it to the default + * release or two promote it to the default */ int ret = -1; if (fd->hints->fs_hints.pvfs2.posix_read == ADIOI_HINT_ENABLE) { - ADIOI_GEN_ReadStrided(fd, buf, count, datatype, + ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); return; } @@ -158,12 +158,12 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, } /* Use classic list I/O if no hints given base case */ - ADIOI_PVFS2_OldReadStrided(fd, buf, count, datatype, + ADIOI_PVFS2_OldReadStrided(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); return; } /* - * vim: ts=8 sts=4 sw=4 noexpandtab + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c index 2aee893332b..757624883b0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * vim: ts=8 sts=4 sw=4 noexpandtab - * - * Copyright (C) 2008 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -24,7 +24,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, int n_filetypes, etype_in_filetype; ADIO_Offset abs_off_in_filetype=0; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset off, disp, start_off, initial_off; int flag, st_frd_size, st_n_filetypes; @@ -74,7 +74,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -84,7 +84,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, etype_size = fd->etype_size; bufsize = buftype_size * count; - + pvfs_fs = (ADIOI_PVFS2_fs*)fd->fs_ptr; if (!buftype_is_contig && filetype_is_contig) { @@ -97,7 +97,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + etype_size * offset; file_list_count = 1; @@ -119,10 +119,10 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, /* step through each block in memory, filling memory arrays */ while (b_blks_read < total_blks_to_read) { for (i=0; icount; i++) { - mem_offsets[b_blks_read % MAX_ARRAY_SIZE] = + mem_offsets[b_blks_read % MAX_ARRAY_SIZE] = /* TODO: fix this compiler warning */ ((PVFS_size)buf + j*buftype_extent + flat_buf->indices[i]); - mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = + mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; file_length += flat_buf->blocklens[i]; b_blks_read++; @@ -136,7 +136,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, /* in case last read list call fills max arrays */ if (!mem_list_count) mem_list_count = MAX_ARRAY_SIZE; } - err_flag = PVFS_Request_hindexed(mem_list_count, + err_flag = PVFS_Request_hindexed(mem_list_count, mem_lengths, mem_offsets, PVFS_BYTE, &mem_req); if (err_flag < 0) break; err_flag = PVFS_Request_contiguous(file_length, @@ -145,7 +145,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif - err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, + err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, file_offset, PVFS_BOTTOM, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING @@ -164,21 +164,21 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, PVFS_Request_free(&file_req); total_bytes_read += resp_io.total_completed; /* --END ERROR HANDLING-- */ - - /* in the case of error or the last read list call, + + /* in the case of error or the last read list call, * leave here */ if (err_flag || b_blks_read == total_blks_to_read) break; file_offset += file_length; file_length = 0; - } + } } /* for (i=0; icount; i++) */ j++; } /* while (b_blks_read < total_blks_to_read) */ ADIOI_Free(mem_offsets); ADIOI_Free(mem_lengths); - if (file_ptr_type == ADIO_INDIVIDUAL) + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += total_bytes_read; fd->fp_sys_posn = -1; /* set it to null. */ @@ -217,11 +217,11 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - frd_size = (int) (disp + flat_file->indices[i] + + frd_size = (int) (disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] - offset); flag = 1; @@ -235,7 +235,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -247,16 +247,16 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, break; } } - + /* abs. offset in bytes in the file */ - offset = disp + ((ADIO_Offset) n_filetypes)*filetype_extent + + offset = disp + ((ADIO_Offset) n_filetypes)*filetype_extent + abs_off_in_filetype; } /* else [file_ptr_type != ADIO_INDIVIDUAL] */ start_off = offset; st_frd_size = frd_size; st_n_filetypes = n_filetypes; - + if (buftype_is_contig && !filetype_is_contig) { /* contiguous in memory, noncontiguous in file. should be the most @@ -264,13 +264,13 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, int mem_length=0; intptr_t mem_offset; - + i = 0; j = st_index; n_filetypes = st_n_filetypes; - + mem_list_count = 1; - + /* determine how many blocks in file to read */ f_data_read = ADIOI_MIN(st_frd_size, bufsize); total_blks_to_read = 1; @@ -283,17 +283,17 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, f_data_read += flat_file->blocklens[j]; total_blks_to_read++; if (j<(flat_file->count-1)) j++; - else j = 0; + else j = 0; } - + j = st_index; n_filetypes = st_n_filetypes; n_read_lists = total_blks_to_read/MAX_ARRAY_SIZE; extra_blks = total_blks_to_read%MAX_ARRAY_SIZE; - + mem_offset = (intptr_t)buf; mem_lengths = 0; - + /* if at least one full readlist, allocate file arrays at max array size and don't free until very end */ if (n_read_lists) { @@ -310,7 +310,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, file_lengths = (int32_t*)ADIOI_Malloc(extra_blks* sizeof(int32_t)); } - + /* for file arrays that are of MAX_ARRAY_SIZE, build arrays */ for (i=0; iindices[j]; file_lengths[k] = flat_file->blocklens[j]; @@ -346,7 +346,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } /* --END ERROR HANDLING-- */ - err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, + err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, file_offsets, PVFS_BYTE, &file_req); /* --BEGIN ERROR HANDLING-- */ @@ -366,7 +366,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif - err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, + err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING @@ -400,7 +400,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } for (k=0; kindices[j]; if (k == (extra_blks - 1)) { @@ -429,7 +429,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } /* --END ERROR HANDLING-- */ - err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, + err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, file_offsets, PVFS_BYTE, &file_req); /* --BEGIN ERROR HANDLING-- */ if (err_flag != 0) { @@ -446,7 +446,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif - err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, + err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); @@ -457,7 +457,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, MPIR_ERR_RECOVERABLE, myname, __LINE__, ADIOI_PVFS2_error_convert(err_flag), - "Error in PVFS_sys_read", 0); + "Error in PVFS_sys_read", 0); goto error_state; } /* --END ERROR HANDLING-- */ @@ -468,7 +468,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } else { /* noncontiguous in memory as well as in file */ - + ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; @@ -484,7 +484,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, max_mem_list = 0; max_file_list = 0; - /* run through and file max_file_list and max_mem_list so that you + /* run through and file max_file_list and max_mem_list so that you can allocate the file and memory arrays less than MAX_ARRAY_SIZE if possible */ @@ -492,7 +492,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, k = start_k; new_buffer_read = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -500,9 +500,9 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_read + flat_buf->blocklens[k] + + if((new_buffer_read + flat_buf->blocklens[k] + size_read) > bufsize) { - end_brd_size = new_buffer_read + + end_brd_size = new_buffer_read + flat_buf->blocklens[k] - (bufsize - size_read); new_buffer_read = bufsize - size_read; } @@ -520,15 +520,15 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ j = start_j; new_file_read = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_read < new_buffer_read)) { if(file_list_count) { - if((new_file_read + flat_file->blocklens[j]) > + if((new_file_read + flat_file->blocklens[j]) > new_buffer_read) { end_frd_size = new_buffer_read - new_file_read; new_file_read = new_buffer_read; @@ -549,9 +549,9 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_read < new_buffer_read) && + if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_read = 0; mem_list_count = 0; @@ -580,13 +580,13 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } /* while (new_buffer_read < new_file_read) */ } /* if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ /* fakes filling the readlist arrays of lengths found above */ k = start_k; j = start_j; - for (i=0; iblocklens[k] == end_brd_size) @@ -607,7 +607,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, if (i == (file_list_count - 1)) { if (flat_file->blocklens[j] == end_frd_size) frd_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { frd_size = flat_file->blocklens[j] - end_frd_size; j--; @@ -640,11 +640,11 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, * region and many (700) very small memory regions. both cases caused * problems for this code */ - if ( ( (file_list_count == 1) && + if ( ( (file_list_count == 1) && (new_file_read < flat_file->blocklens[0] ) ) || - ((mem_list_count == 1) && + ((mem_list_count == 1) && (new_buffer_read < flat_buf->blocklens[0]) ) || - ((file_list_count == MAX_ARRAY_SIZE) && + ((file_list_count == MAX_ARRAY_SIZE) && (new_file_read < flat_buf->blocklens[0]) ) || ( (mem_list_count == MAX_ARRAY_SIZE) && (new_buffer_read < flat_file->blocklens[0])) ) @@ -660,7 +660,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, mem_lengths = (int *)ADIOI_Malloc(max_mem_list*sizeof(int)); file_offsets = (int64_t *)ADIOI_Malloc(max_file_list*sizeof(int64_t)); file_lengths = (int32_t *)ADIOI_Malloc(max_file_list*sizeof(int32_t)); - + size_read = 0; n_filetypes = st_n_filetypes; frd_size = st_frd_size; @@ -673,12 +673,12 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, /* this section calculates mem_list_count and file_list_count and also finds the possibly odd sized last array elements in new_frd_size and new_brd_size */ - + while (size_read < bufsize) { k = start_k; new_buffer_read = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -686,9 +686,9 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_read + flat_buf->blocklens[k] + + if((new_buffer_read + flat_buf->blocklens[k] + size_read) > bufsize) { - end_brd_size = new_buffer_read + + end_brd_size = new_buffer_read + flat_buf->blocklens[k] - (bufsize - size_read); new_buffer_read = bufsize - size_read; } @@ -706,15 +706,15 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ j = start_j; new_file_read = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_read < new_buffer_read)) { if(file_list_count) { - if((new_file_read + flat_file->blocklens[j]) > + if((new_file_read + flat_file->blocklens[j]) > new_buffer_read) { end_frd_size = new_buffer_read - new_file_read; new_file_read = new_buffer_read; @@ -735,9 +735,9 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_read < new_buffer_read) && + if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_read = 0; mem_list_count = 0; @@ -766,13 +766,13 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, } /* while (new_buffer_read < new_file_read) */ } /* if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ /* fills the allocated readlist arrays */ k = start_k; j = start_j; - for (i=0; icount) + (int)flat_buf->indices[k]); @@ -800,7 +800,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, k = (k + 1)%flat_buf->count; } /* for (i=0; iindices[j] + + file_offsets[i] = disp + flat_file->indices[j] + ((ADIO_Offset)n_filetypes) * filetype_extent; if (!i) { file_lengths[0] = frd_size; @@ -811,7 +811,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, file_lengths[i] = end_frd_size; if (flat_file->blocklens[j] == end_frd_size) frd_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { frd_size = flat_file->blocklens[j] - end_frd_size; j--; @@ -825,7 +825,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, n_filetypes++; } } /* for (i=0; iobject_ref, file_req, 0, + err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, PVFS_BOTTOM, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); @@ -882,7 +882,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, /* when incrementing fp_ind, need to also take into account the file type: * consider an N-element 1-d subarray with a lb and ub: ( |---xxxxx-----| * if we wrote N elements, offset needs to point at beginning of type, not - * at empty region at offset N+1) + * at empty region at offset N+1) * * As we discussed on mpich-discuss in may/june 2009, the code below might * look wierd, but by putting fp_ind at the last byte written, the next @@ -892,10 +892,10 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, fd->fp_ind = file_offsets[file_list_count-1]+ file_lengths[file_list_count-1]; } - + ADIOI_Free(file_offsets); ADIOI_Free(file_lengths); - + if (err_flag == 0) *error_code = MPI_SUCCESS; error_state: @@ -903,11 +903,11 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); - /* This is a temporary way of filling in status. The right way is to - keep track of how much data was actually read and placed in buf + /* This is a temporary way of filling in status. The right way is to + keep track of how much data was actually read and placed in buf by ADIOI_BUFFERED_READ. */ #endif - + if (!buftype_is_contig) ADIOI_Delete_flattened(datatype); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_resize.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_resize.c index db219db0fde..c68e1ec3725 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,8 +23,8 @@ void ADIOI_PVFS2_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) MPI_Comm_rank(fd->comm, &rank); - /* We desginate one node in the communicator to be an 'io_worker' in - * ADIO_Open. This node can perform operations on files and then + /* We desginate one node in the communicator to be an 'io_worker' in + * ADIO_Open. This node can perform operations on files and then * inform the other nodes of the result */ /* MPI-IO semantics treat conflicting MPI_File_set_size requests the @@ -33,7 +33,7 @@ void ADIOI_PVFS2_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) * syncronization point is reached */ if (rank == fd->hints->ranklist[0]) { - ret = PVFS_sys_truncate(pvfs_fs->object_ref, + ret = PVFS_sys_truncate(pvfs_fs->object_ref, size, &(pvfs_fs->credentials)); MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); } else { @@ -52,5 +52,5 @@ void ADIOI_PVFS2_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) } /* - * vim: ts=8 sts=4 sw=4 noexpandtab + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write.c index 93e142bb687..27f08738e74 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -118,7 +118,7 @@ int ADIOI_PVFS2_WriteStridedListIO(ADIO_File fd, const void *buf, int count, int ADIOI_PVFS2_WriteStridedDtypeIO(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int *error_code) { return ADIOI_PVFS2_StridedDtypeIO(fd, (void *)buf, count, @@ -139,7 +139,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, const void *buf, int count, * - new List I/O (from avery) * - classic List I/O (the one that's always been in ROMIO) * I imagine we'll keep Datatype as an optional optimization, and afer a - * release or two promote it to the default + * release or two promote it to the default */ /* a lot of near-duplication from ADIOI_PVFS2_ReadStrided: for @@ -170,7 +170,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, const void *buf, int count, } /* Use list I/O in the base case */ if (fd->hints->fs_hints.pvfs2.listio_write == ADIOI_HINT_ENABLE) { - ret = ADIOI_PVFS2_WriteStridedListIO(fd, buf, count, datatype, + ret = ADIOI_PVFS2_WriteStridedListIO(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); return; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c index f51bf7932d5..f99ddc8ebf0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c +++ b/ompi/mca/io/romio314/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * vim: ts=8 sts=4 sw=4 noexpandtab - * - * Copyright (C) 2008 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -57,7 +57,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPI_Offset total_bytes_written=0; static char myname[] = "ADIOI_PVFS2_WRITESTRIDED"; - /* note: don't increase this: several parts of PVFS2 now + /* note: don't increase this: several parts of PVFS2 now * assume this limit*/ #define MAX_ARRAY_SIZE 64 @@ -90,7 +90,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -98,7 +98,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPI_Type_size_x(datatype, &buftype_size); MPI_Type_extent(datatype, &buftype_extent); etype_size = fd->etype_size; - + bufsize = buftype_size * count; pvfs_fs = (ADIOI_PVFS2_fs*)fd->fs_ptr; @@ -112,7 +112,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { off = fd->disp + etype_size * offset; } @@ -135,12 +135,12 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* step through each block in memory, filling memory arrays */ while (b_blks_wrote < total_blks_to_write) { for (i=0; icount; i++) { - mem_offsets[b_blks_wrote % MAX_ARRAY_SIZE] = + mem_offsets[b_blks_wrote % MAX_ARRAY_SIZE] = /* TODO: fix this warning by casting to an integer that's * the same size as a char * and /then/ casting to * PVFS_size */ ((PVFS_size)buf + j*buftype_extent + flat_buf->indices[i]); - mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = + mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; file_length += flat_buf->blocklens[i]; b_blks_wrote++; @@ -154,7 +154,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* in case last write list call fills max arrays */ if (!mem_list_count) mem_list_count = MAX_ARRAY_SIZE; } - err_flag = PVFS_Request_hindexed(mem_list_count, + err_flag = PVFS_Request_hindexed(mem_list_count, mem_lengths, mem_offsets, PVFS_BYTE, &mem_req); /* --BEGIN ERROR HANDLING-- */ @@ -184,17 +184,17 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, + err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, file_offset, PVFS_BOTTOM, - mem_req, + mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); #endif total_bytes_written += resp_io.total_completed; - - /* in the case of error or the last write list call, + + /* in the case of error or the last write list call, * leave here */ /* --BEGIN ERROR HANDLING-- */ if (err_flag) { @@ -212,14 +212,14 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, file_length = 0; PVFS_Request_free(&mem_req); PVFS_Request_free(&file_req); - } + } } /* for (i=0; icount; i++) */ j++; } /* while (b_blks_wrote < total_blks_to_write) */ ADIOI_Free(mem_offsets); ADIOI_Free(mem_lengths); - if (file_ptr_type == ADIO_INDIVIDUAL) + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += total_bytes_written; if (!err_flag) *error_code = MPI_SUCCESS; @@ -228,7 +228,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif @@ -247,7 +247,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, initial_off = offset; /* for each case - ADIO_Individual pointer or explicit, find offset - (file offset in bytes), n_filetypes (how many filetypes into file + (file offset in bytes), n_filetypes (how many filetypes into file to start), fwr_size (remaining amount of data in present file block), and st_index (start point in terms of blocks in starting filetype) */ @@ -258,11 +258,11 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - fwr_size = disp + flat_file->indices[i] + + fwr_size = disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -276,7 +276,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -297,7 +297,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, start_off = offset; st_fwr_size = fwr_size; st_n_filetypes = n_filetypes; - + if (buftype_is_contig && !filetype_is_contig) { /* contiguous in memory, noncontiguous in file. should be the most @@ -305,14 +305,14 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, int mem_length; intptr_t mem_offset; - + i = 0; j = st_index; off = offset; n_filetypes = st_n_filetypes; - + mem_list_count = 1; - + /* determine how many blocks in file to write */ f_data_wrote = ADIOI_MIN(st_fwr_size, bufsize); total_blks_to_write = 1; @@ -325,17 +325,17 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, f_data_wrote += flat_file->blocklens[j]; total_blks_to_write++; if (j<(flat_file->count-1)) j++; - else j = 0; + else j = 0; } - + j = st_index; n_filetypes = st_n_filetypes; n_write_lists = total_blks_to_write/MAX_ARRAY_SIZE; extra_blks = total_blks_to_write%MAX_ARRAY_SIZE; - + mem_offset = (intptr_t) buf; mem_length = 0; - + /* if at least one full writelist, allocate file arrays at max array size and don't free until very end */ if (n_write_lists) { @@ -352,7 +352,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, file_lengths = (int32_t*)ADIOI_Malloc(extra_blks* sizeof(int32_t)); } - + /* for file arrays that are of MAX_ARRAY_SIZE, build arrays */ for (i=0; iindices[j]; file_lengths[k] = flat_file->blocklens[j]; @@ -389,7 +389,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } /* --END ERROR HANDLING-- */ - err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, + err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, file_offsets, PVFS_BYTE, &file_req); /* --BEGIN ERROR HANDLING-- */ @@ -409,7 +409,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, + err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING @@ -443,7 +443,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } for (k=0; kindices[j]; if (k == (extra_blks - 1)) { @@ -473,7 +473,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } /* --END ERROR HANDLING-- */ - err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, + err_flag = PVFS_Request_hindexed(file_list_count, file_lengths, file_offsets, PVFS_BYTE, &file_req); /* --BEGIN ERROR HANDLING-- */ @@ -491,7 +491,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, + err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING @@ -511,7 +511,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, PVFS_Request_free(&mem_req); PVFS_Request_free(&file_req); } - } + } else { /* noncontiguous in memory as well as in file */ @@ -530,7 +530,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, max_mem_list = 0; max_file_list = 0; - /* run through and file max_file_list and max_mem_list so that you + /* run through and file max_file_list and max_mem_list so that you can allocate the file and memory arrays less than MAX_ARRAY_SIZE if possible */ @@ -538,7 +538,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, k = start_k; new_buffer_write = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -546,9 +546,9 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, written in the next immediate write list is less than bufsize */ if(mem_list_count) { - if((new_buffer_write + flat_buf->blocklens[k] + + if((new_buffer_write + flat_buf->blocklens[k] + size_wrote) > bufsize) { - end_bwr_size = new_buffer_write + + end_bwr_size = new_buffer_write + flat_buf->blocklens[k] - (bufsize - size_wrote); new_buffer_write = bufsize - size_wrote; } @@ -566,15 +566,15 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ j = start_j; new_file_write = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && - (new_file_write < new_buffer_write)) { + while ((file_list_count < MAX_ARRAY_SIZE) && + (new_file_write < new_buffer_write)) { if(file_list_count) { - if((new_file_write + flat_file->blocklens[j]) > + if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { end_fwr_size = new_buffer_write - new_file_write; new_file_write = new_buffer_write; @@ -595,9 +595,9 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_write < new_buffer_write) && + if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_write = 0; mem_list_count = 0; @@ -605,7 +605,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, if(mem_list_count) { if((new_buffer_write + flat_buf->blocklens[k]) > new_file_write) { - end_bwr_size = new_file_write - + end_bwr_size = new_file_write - new_buffer_write; new_buffer_write = new_file_write; k--; @@ -627,13 +627,13 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } /* while (new_buffer_write < new_file_write) */ } /* if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ /* fakes filling the writelist arrays of lengths found above */ k = start_k; j = start_j; - for (i=0; iblocklens[k] == end_bwr_size) @@ -654,7 +654,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, if (i == (file_list_count - 1)) { if (flat_file->blocklens[j] == end_fwr_size) fwr_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { fwr_size = flat_file->blocklens[j] - end_fwr_size; j--; @@ -687,11 +687,11 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, * region and many (700) very small memory regions. both cases caused * problems for this code */ - if ( ( (file_list_count == 1) && + if ( ( (file_list_count == 1) && (new_file_write < flat_file->blocklens[0] ) ) || - ((mem_list_count == 1) && + ((mem_list_count == 1) && (new_buffer_write < flat_buf->blocklens[0]) ) || - ((file_list_count == MAX_ARRAY_SIZE) && + ((file_list_count == MAX_ARRAY_SIZE) && (new_file_write < flat_buf->blocklens[0]) ) || ( (mem_list_count == MAX_ARRAY_SIZE) && (new_buffer_write < flat_file->blocklens[0])) ) @@ -707,7 +707,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, mem_lengths = (int *)ADIOI_Malloc(max_mem_list*sizeof(int)); file_offsets = (int64_t *)ADIOI_Malloc(max_file_list*sizeof(int64_t)); file_lengths = (int32_t *)ADIOI_Malloc(max_file_list*sizeof(int32_t)); - + size_wrote = 0; n_filetypes = st_n_filetypes; fwr_size = st_fwr_size; @@ -720,12 +720,12 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* this section calculates mem_list_count and file_list_count and also finds the possibly odd sized last array elements in new_fwr_size and new_bwr_size */ - + while (size_wrote < bufsize) { k = start_k; new_buffer_write = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -733,9 +733,9 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, written in the next immediate write list is less than bufsize */ if(mem_list_count) { - if((new_buffer_write + flat_buf->blocklens[k] + + if((new_buffer_write + flat_buf->blocklens[k] + size_wrote) > bufsize) { - end_bwr_size = new_buffer_write + + end_bwr_size = new_buffer_write + flat_buf->blocklens[k] - (bufsize - size_wrote); new_buffer_write = bufsize - size_wrote; } @@ -753,15 +753,15 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ j = start_j; new_file_write = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_write < new_buffer_write)) { if(file_list_count) { - if((new_file_write + flat_file->blocklens[j]) > + if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { end_fwr_size = new_buffer_write - new_file_write; new_file_write = new_buffer_write; @@ -782,9 +782,9 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_write < new_buffer_write) && + if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_write = 0; mem_list_count = 0; @@ -814,19 +814,19 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } /* while (new_buffer_write < new_file_write) */ } /* if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ /* fills the allocated writelist arrays */ k = start_k; j = start_j; - for (i=0; icount) + (int)flat_buf->indices[k]); - + if(!i) { mem_lengths[0] = bwr_size; mem_offsets[0] += flat_buf->blocklens[k] - bwr_size; @@ -851,7 +851,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, k = (k + 1)%flat_buf->count; } /* for (i=0; iindices[j] + + file_offsets[i] = disp + flat_file->indices[j] + ((ADIO_Offset)n_filetypes) * filetype_extent; if (!i) { file_lengths[0] = fwr_size; @@ -862,7 +862,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, file_lengths[i] = end_fwr_size; if (flat_file->blocklens[j] == end_fwr_size) fwr_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { fwr_size = flat_file->blocklens[j] - end_fwr_size; j--; @@ -877,7 +877,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } } /* for (i=0; iobject_ref, file_req, 0, + err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, PVFS_BOTTOM, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING @@ -939,7 +939,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* when incrementing fp_ind, need to also take into account the file type: * consider an N-element 1-d subarray with a lb and ub: ( |---xxxxx-----| * if we wrote N elements, offset needs to point at beginning of type, not - * at empty region at offset N+1). + * at empty region at offset N+1). * * As we discussed on mpich-discuss in may/june 2009, the code below might * look wierd, but by putting fp_ind at the last byte written, the next @@ -959,7 +959,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.c b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.c index 929dfd97f75..d022016c57c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.h b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.h index 9f029f05580..67d7fe7d235 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -15,7 +15,7 @@ void ADIOI_SFS_Open(ADIO_File fd, int *error_code); void ADIOI_SFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_SFS_Flush(ADIO_File fd, int *error_code); #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_fcntl.c index 533e26a77b6..8bef5755863 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -21,17 +21,17 @@ void ADIOI_SFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *er switch(flag) { case ADIO_FCNTL_GET_FSIZE: /* On SFS, I find that a write from one process, which changes - the file size, does not automatically make the new file size - visible to other processes. Therefore, a sync-barrier-sync is - needed. (Other processes are able to read the data written + the file size, does not automatically make the new file size + visible to other processes. Therefore, a sync-barrier-sync is + needed. (Other processes are able to read the data written though; only file size is returned incorrectly.) */ fsync(fd->fd_sys); MPI_Barrier(fd->comm); fsync(fd->fd_sys); - + fcntl_struct->fsize = llseek(fd->fd_sys, 0, SEEK_END); - if (fd->fp_sys_posn != -1) + if (fd->fp_sys_posn != -1) llseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET); if (fcntl_struct->fsize == -1) { #ifdef MPICH @@ -42,7 +42,7 @@ void ADIOI_SFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *er #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_flush.c index 8fc7e358cf6..5a36dcd4fba 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -18,10 +18,10 @@ void ADIOI_SFS_Flush(ADIO_File fd, int *error_code) *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", strerror(errno)); #elif defined(PRINT_ERR_MSG) - *error_code = MPI_ERR_UNKNOWN; + *error_code = MPI_ERR_UNKNOWN; #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_UNSUPPORTED_OPERATION, 1, myname, (char *) 0, (char *) 0); - ADIOI_Error(fd, *error_code, myname); + ADIOI_Error(fd, *error_code, myname); #endif } diff --git a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_open.c index ebeefdcbcba..dd614940b93 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_sfs/ad_sfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -50,7 +50,7 @@ void ADIOI_SFS_Open(ADIO_File fd, int *error_code) #else /* MPICH-1 */ *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR, myname, "I/O Error", "%s", strerror(errno)); - ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); + ADIOI_Error(ADIO_FILE_NULL, *error_code, myname); #endif } else *error_code = MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.c index 6823468c700..00542b71640 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.h b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.h index 1871bde5b50..829620fc5f3 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,25 +23,25 @@ void ADIOI_TESTFS_ReadContig(ADIO_File fd, void *buf, int count, void ADIOI_TESTFS_WriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_TESTFS_IwriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); -void ADIOI_TESTFS_IreadContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_TESTFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); + *error_code); int ADIOI_TESTFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_TESTFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code); void ADIOI_TESTFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_TESTFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code); -void ADIOI_TESTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, - int *error_code); + int *error_code); +void ADIOI_TESTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, + int *error_code); void ADIOI_TESTFS_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, @@ -68,13 +68,13 @@ void ADIOI_TESTFS_IwriteStrided(ADIO_File fd, const void *buf, int count, *error_code); void ADIOI_TESTFS_Flush(ADIO_File fd, int *error_code); void ADIOI_TESTFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); -ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, +ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, int whence, int *error_code); void ADIOI_TESTFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); -void ADIOI_TESTFS_Get_shared_fp(ADIO_File fd, int size, - ADIO_Offset *shared_fp, +void ADIOI_TESTFS_Get_shared_fp(ADIO_File fd, int size, + ADIO_Offset *shared_fp, int *error_code); -void ADIOI_TESTFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, +void ADIOI_TESTFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code); void ADIOI_TESTFS_Delete(const char *filename, int *error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_close.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_close.c index a1b85e600d0..7c6a9553dfe 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,6 +17,6 @@ void ADIOI_TESTFS_Close(ADIO_File fd, int *error_code) MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Close called on %s\n", myrank, + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Close called on %s\n", myrank, nprocs, fd->filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_delete.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_delete.c index 9a1b6f37e12..5563c3ddd36 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_delete.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,6 +16,6 @@ void ADIOI_TESTFS_Delete(const char *filename, int *error_code) MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Delete called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Delete called on %s\n", myrank, nprocs, filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_done.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_done.c index 2ee3111587e..1cbfa2af14a 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_done.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_done.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,7 +17,7 @@ int ADIOI_TESTFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int MPI_Comm_size( MPI_COMM_WORLD, &nprocs ); MPI_Comm_rank( MPI_COMM_WORLD, &myrank ); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadDone called on ADIO_REQUEST_NULL\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadDone called on ADIO_REQUEST_NULL\n", myrank, nprocs); return 1; } @@ -32,8 +32,8 @@ int ADIOI_TESTFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int MPI_Comm_size( MPI_COMM_WORLD, &nprocs ); MPI_Comm_rank( MPI_COMM_WORLD, &myrank ); - FPRINTF(stdout, - "[%d/%d] ADIOI_TESTFS_WriteDone called on ADIO_REQUEST_NULL\n", + FPRINTF(stdout, + "[%d/%d] ADIOI_TESTFS_WriteDone called on ADIO_REQUEST_NULL\n", myrank, nprocs); return 1; } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_fcntl.c index 8b1e516d9a2..e0ee8fa0546 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -9,7 +9,7 @@ #include "adioi.h" #include "adio_extern.h" -void ADIOI_TESTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, +void ADIOI_TESTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code) { int myrank, nprocs; @@ -19,7 +19,7 @@ void ADIOI_TESTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Fcntl called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Fcntl called on %s\n", myrank, nprocs, fd->filename); switch(flag) { @@ -40,7 +40,7 @@ void ADIOI_TESTFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, default: /* --BEGIN ERROR HANDLING-- */ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, + myname, __LINE__, MPI_ERR_ARG, "**flag", "**flag %d", flag); return; diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_flush.c index 23d559787d3..304a6663828 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,6 +16,6 @@ void ADIOI_TESTFS_Flush(ADIO_File fd, int *error_code) MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Flush called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Flush called on %s\n", myrank, nprocs, fd->filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_getsh.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_getsh.c index 2bdb3dceb80..abdf38776b5 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_getsh.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_getsh.c @@ -1,15 +1,15 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_testfs.h" #include "adioi.h" -void ADIOI_TESTFS_Get_shared_fp(ADIO_File fd, int size, - ADIO_Offset *shared_fp, +void ADIOI_TESTFS_Get_shared_fp(ADIO_File fd, int size, + ADIO_Offset *shared_fp, int *error_code) { int myrank, nprocs; @@ -18,6 +18,6 @@ void ADIOI_TESTFS_Get_shared_fp(ADIO_File fd, int size, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Get_shared_fp called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Get_shared_fp called on %s\n", myrank, nprocs, fd->filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_hints.c index a6c1be9e9fa..ffff0c94939 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -18,9 +18,9 @@ void ADIOI_TESTFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_SetInfo called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_SetInfo called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_SetInfo\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_SetInfo\n", myrank, nprocs); ADIOI_GEN_SetInfo(fd, users_info, error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iread.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iread.c index 77e862438c6..b402791a186 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iread.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iread.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -12,7 +12,7 @@ * * Implemented by immediately calling ReadContig() */ -void ADIOI_TESTFS_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_TESTFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code) @@ -26,13 +26,13 @@ void ADIOI_TESTFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); MPI_Type_size_x(datatype, &typesize); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IreadContig called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IreadContig called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_ReadContig\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_ReadContig\n", myrank, nprocs); len = count * typesize; - ADIOI_TESTFS_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type, + ADIOI_TESTFS_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, &status, error_code); MPIO_Completed_request_create(&fd, len, error_code, request); @@ -50,13 +50,13 @@ void ADIOI_TESTFS_IreadStrided(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); MPI_Type_size_x(datatype, &typesize); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IreadStrided called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IreadStrided called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_ReadStrided\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_ReadStrided\n", myrank, nprocs); - ADIOI_TESTFS_ReadStrided(fd, buf, count, datatype, file_ptr_type, - offset, &status, error_code); + ADIOI_TESTFS_ReadStrided(fd, buf, count, datatype, file_ptr_type, + offset, &status, error_code); MPIO_Completed_request_create(&fd, count*typesize, error_code, request); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iwrite.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iwrite.c index e29c9f6ee03..bfa2b634ab0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iwrite.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_iwrite.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -29,13 +29,13 @@ void ADIOI_TESTFS_IwriteContig(ADIO_File fd, const void *buf, int count, MPI_Type_size_x(datatype, &typesize); MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IwriteContig called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IwriteContig called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_WriteContig\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_WriteContig\n", myrank, nprocs); len = count * typesize; - ADIOI_TESTFS_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type, + ADIOI_TESTFS_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, &status, error_code); MPIO_Completed_request_create(&fd, len, error_code, request); @@ -56,12 +56,12 @@ void ADIOI_TESTFS_IwriteStrided(ADIO_File fd, const void *buf, int count, MPI_Comm_rank(fd->comm, &myrank); MPI_Type_size_x(datatype, &typesize); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IwriteStrided called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IwriteStrided called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_WriteStrided\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_WriteStrided\n", myrank, nprocs); - ADIOI_TESTFS_WriteStrided(fd, buf, count, datatype, file_ptr_type, + ADIOI_TESTFS_WriteStrided(fd, buf, count, datatype, file_ptr_type, offset, &status, error_code); MPIO_Completed_request_create(&fd, count*typesize, error_code, request); diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_open.c index 6b1595b99ca..90751a2d313 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -18,6 +18,6 @@ void ADIOI_TESTFS_Open(ADIO_File fd, int *error_code) MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Open called on %s\n", myrank, + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Open called on %s\n", myrank, nprocs, fd->filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_rdcoll.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_rdcoll.c index 5df94458fdd..16d97591929 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_rdcoll.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_rdcoll.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -10,7 +10,7 @@ void ADIOI_TESTFS_ReadStridedColl(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int *error_code) { int myrank, nprocs; @@ -19,9 +19,9 @@ void ADIOI_TESTFS_ReadStridedColl(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadStridedColl called on %s\n", - myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_ReadStridedColl\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadStridedColl called on %s\n", + myrank, nprocs, fd->filename); + FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_ReadStridedColl\n", myrank, nprocs); ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type, diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_read.c index f60a9920f76..aa2f72f3ab4 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_read.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2001 University of Chicago. +/* + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_testfs.h" #include "adioi.h" -void ADIOI_TESTFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_TESTFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -20,7 +20,7 @@ void ADIOI_TESTFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); MPI_Type_size_x(datatype, &datatype_size); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadContig called on %s\n", myrank, + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadContig called on %s\n", myrank, nprocs, fd->filename); if (file_ptr_type != ADIO_EXPLICIT_OFFSET) { @@ -33,7 +33,7 @@ void ADIOI_TESTFS_ReadContig(ADIO_File fd, void *buf, int count, } FPRINTF(stdout, "[%d/%d] reading (buf = %p, loc = %lld, sz = %lld)\n", - myrank, nprocs, buf, (long long) offset, + myrank, nprocs, buf, (long long) offset, (long long) datatype_size * count); #ifdef HAVE_STATUS_SET_BYTES @@ -52,9 +52,9 @@ void ADIOI_TESTFS_ReadStrided(ADIO_File fd, void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadStrided called on %s\n", myrank, + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadStrided called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_ReadStrided\n", myrank, + FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_ReadStrided\n", myrank, nprocs); ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type, offset, diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_resize.c index a4a37eb94bb..30fa9e0853d 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,6 +16,6 @@ void ADIOI_TESTFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Resize called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Resize called on %s\n", myrank, nprocs, fd->filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_seek.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_seek.c index df6d30a5160..a6bca984c02 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_seek.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_seek.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,9 +16,9 @@ * * Returns an absolute offset in bytes. The offset passed into the call is in * terms of the etype relative to the filetype, so some calculations are - * necessary. + * necessary. */ -ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, +ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, int whence, int *error_code) { int myrank, nprocs; @@ -36,7 +36,7 @@ ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_SeekIndividual called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_SeekIndividual called on %s\n", myrank, nprocs, fd->filename); ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); @@ -50,7 +50,7 @@ ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, MPI_Type_extent(fd->filetype, &filetype_extent); MPI_Type_size_x(fd->filetype, &filetype_size); if ( ! filetype_size ) { - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return 0; } @@ -59,7 +59,7 @@ ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_setsh.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_setsh.c index 6fc8a04be9f..2b7e7560a46 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_setsh.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_setsh.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "ad_testfs.h" #include "adioi.h" -void ADIOI_TESTFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, +void ADIOI_TESTFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code) { int myrank, nprocs; @@ -17,6 +17,6 @@ void ADIOI_TESTFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Set_shared_fp called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_Set_shared_fp called on %s\n", myrank, nprocs, fd->filename); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wait.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wait.c index 6eef9ef7060..ffa4c51cdc3 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wait.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wait.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,7 +17,7 @@ void ADIOI_TESTFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadComplete called \n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadComplete called \n", myrank, nprocs); /* do something with status set bytes? */ @@ -32,7 +32,7 @@ void ADIOI_TESTFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, int MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteComplete called\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteComplete called\n", myrank, nprocs); /* do something with status_set_bytes? */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wrcoll.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wrcoll.c index ac11f5847f3..be87957df33 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wrcoll.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_wrcoll.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -10,7 +10,7 @@ void ADIOI_TESTFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, + ADIO_Offset offset, ADIO_Status *status, int *error_code) { int myrank, nprocs; @@ -19,9 +19,9 @@ void ADIOI_TESTFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteStridedColl called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteStridedColl called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_WriteStridedColl\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_WriteStridedColl\n", myrank, nprocs); ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type, diff --git a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_write.c index e1a59ff0101..70c9012b7af 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_testfs/ad_testfs_write.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2001 University of Chicago. +/* + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -20,17 +20,17 @@ void ADIOI_TESTFS_WriteContig(ADIO_File fd, const void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); MPI_Type_size_x(datatype, &datatype_size); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteContig called on %s\n", myrank, + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteContig called on %s\n", myrank, nprocs, fd->filename); FPRINTF(stdout, "[%d/%d] writing (buf = %p, loc = %lld, sz = %lld)\n", - myrank, nprocs, buf, (long long) offset, + myrank, nprocs, buf, (long long) offset, (long long)datatype_size * (long long)count); if (file_ptr_type != ADIO_EXPLICIT_OFFSET) { fd->fp_ind += datatype_size * count; fd->fp_sys_posn = fd->fp_ind; - FPRINTF(stdout, "[%d/%d] new file position is %lld\n", myrank, + FPRINTF(stdout, "[%d/%d] new file position is %lld\n", myrank, nprocs, (long long) fd->fp_ind); } else { @@ -53,11 +53,11 @@ void ADIOI_TESTFS_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Comm_size(fd->comm, &nprocs); MPI_Comm_rank(fd->comm, &myrank); - FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteStrided called on %s\n", + FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_WriteStrided called on %s\n", myrank, nprocs, fd->filename); - FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_WriteStrided\n", + FPRINTF(stdout, "[%d/%d] calling ADIOI_GEN_WriteStrided\n", myrank, nprocs); - ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type, offset, + ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type, offset, status, error_code); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.c b/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.c index 66b183ec56f..4fc330258d4 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.h b/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.h index 5ad27439b3e..e8995eb1e69 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -25,7 +25,7 @@ #include #endif -/* Workaround for incomplete set of definitions if __REDIRECT is not +/* Workaround for incomplete set of definitions if __REDIRECT is not defined and large file support is used in aio.h */ #if !defined(__REDIRECT) && defined(__USE_FILE_OFFSET64) #define aiocb aiocb64 @@ -35,23 +35,23 @@ int ADIOI_UFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int wr, void *handle); void ADIOI_UFS_Open(ADIO_File fd, int *error_code); -void ADIOI_UFS_IwriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_UFS_IwriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); -void ADIOI_UFS_IreadContig(ADIO_File fd, void *buf, int count, + *error_code); +void ADIOI_UFS_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int - *error_code); + *error_code); int ADIOI_UFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_UFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code); void ADIOI_UFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_UFS_WriteComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code); + int *error_code); void ADIOI_UFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs_open.c b/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs_open.c index 9d5a2a11741..d4c64db4a2b 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_ufs/ad_ufs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -31,7 +31,7 @@ void ADIOI_UFS_Open(ADIO_File fd, int *error_code) if (fd->access_mode & ADIO_EXCL) amode = amode | O_EXCL; - + #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_open_a, 0, NULL ); #endif diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.c index b748a8a637a..529792488c1 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.h b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.h index d14858d4aa5..506f441ad73 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,14 +23,14 @@ typedef struct aiocb64 aiocb64_t; void ADIOI_XFS_Open(ADIO_File fd, int *error_code); void ADIOI_XFS_Close(ADIO_File fd, int *error_code); -void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_XFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_XFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_XFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code); void ADIOI_XFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_fcntl.c index 1f19081afca..cf45a6cd908 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_hints.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_hints.c index 0fe0e832f4c..93b4f5061a6 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_hints.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -67,14 +67,14 @@ void ADIOI_XFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) if (users_info != MPI_INFO_NULL) { value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(users_info, "direct_read", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "direct_read", MPI_MAX_INFO_VAL, value, &flag); if (flag && !strcmp(value, "true")) { ADIOI_Info_set(fd->info, "direct_read", "true"); fd->direct_read = 1; } - ADIOI_Info_get(users_info, "direct_write", MPI_MAX_INFO_VAL, + ADIOI_Info_get(users_info, "direct_write", MPI_MAX_INFO_VAL, value, &flag); if (flag && !strcmp(value, "true")) { ADIOI_Info_set(fd->info, "direct_write", "true"); @@ -83,7 +83,7 @@ void ADIOI_XFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) ADIOI_Free(value); } - + /* set the values for collective I/O and data sieving parameters */ ADIOI_GEN_SetInfo(fd, users_info, error_code); diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c index c5bd405f58d..e0ccafe7f1b 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -78,7 +78,7 @@ void ADIOI_XFS_Open(ADIO_File fd, int *error_code) fd->hints->fs_hints.xfs.write_chunk_sz = st.d_maxiosz; } else { /* - * MPIO_DIRECT_WRITE_CHUNK_SIZE was set. + * MPIO_DIRECT_WRITE_CHUNK_SIZE was set. * Make write_chunk_sz a multiple of d_miniosz. */ factor = write_chunk_sz / fd->d_miniosz; diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_read.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_read.c index c3c237cc15d..b8267313ca0 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_read.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_read.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -12,10 +12,10 @@ /* style: allow:free:2 sig:0 */ -static void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, +static void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int *err); -void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -35,11 +35,11 @@ void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, int count, err = pread(fd->fd_sys, buf, len, offset); else { /* direct I/O enabled */ - /* (1) if mem_aligned && file_aligned + /* (1) if mem_aligned && file_aligned use direct I/O to read up to correct io_size use buffered I/O for remaining */ - if (!(((long) buf) % fd->d_mem) && !(offset % fd->d_miniosz)) + if (!(((long) buf) % fd->d_mem) && !(offset % fd->d_miniosz)) ADIOI_XFS_Aligned_Mem_File_Read(fd, buf, len, offset, &err); /* (2) if !file_aligned @@ -99,7 +99,7 @@ void ADIOI_XFS_ReadContig(ADIO_File fd, void *buf, int count, } -void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, +void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int *err) { int ntimes, rem, newrem, i, size, nbytes; @@ -110,7 +110,7 @@ void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, use direct I/O to read up to correct io_size, use buffered I/O for remaining. */ - if (!(len % fd->d_miniosz) && + if (!(len % fd->d_miniosz) && (len >= fd->d_miniosz) && (len <= read_chunk_sz)) *err = pread(fd->fd_direct, buf, len, offset); else if (len < fd->d_miniosz) @@ -126,17 +126,17 @@ void ADIOI_XFS_Aligned_Mem_File_Read(ADIO_File fd, void *buf, int len, } if (rem) { if (!(rem % fd->d_miniosz)) - nbytes += pread(fd->fd_direct, + nbytes += pread(fd->fd_direct, ((char *)buf) + ntimes * read_chunk_sz, rem, offset); else { newrem = rem % fd->d_miniosz; size = rem - newrem; if (size) { - nbytes += pread(fd->fd_direct, + nbytes += pread(fd->fd_direct, ((char *)buf) + ntimes * read_chunk_sz, size, offset); offset += size; } - nbytes += pread(fd->fd_sys, + nbytes += pread(fd->fd_sys, ((char *)buf) + ntimes * read_chunk_sz + size, newrem, offset); } } diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_resize.c index 8caf8b48bd7..79084eb411b 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ void ADIOI_XFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) { int err; static char myname[] = "ADIOI_XFS_RESIZE"; - + err = ftruncate64(fd->fd_sys, size); if (err == -1) { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, diff --git a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_write.c b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_write.c index 9ab82768f76..a56102e31fa 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_write.c +++ b/ompi/mca/io/romio314/romio/adio/ad_xfs/ad_xfs_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -16,7 +16,7 @@ static int ADIOI_XFS_Aligned_Mem_File_Write(ADIO_File fd, void *buf, ADIO_Offset len, ADIO_Offset offset); -void ADIOI_XFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_XFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { @@ -38,7 +38,7 @@ void ADIOI_XFS_WriteContig(ADIO_File fd, void *buf, int count, if (err < 0) {goto leaving;} } else { /* direct I/O enabled */ - /* (1) if mem_aligned && file_aligned + /* (1) if mem_aligned && file_aligned use direct I/O to write up to correct io_size use buffered I/O for remaining */ @@ -109,7 +109,7 @@ void ADIOI_XFS_WriteContig(ADIO_File fd, void *buf, int count, static int -ADIOI_XFS_Aligned_Mem_File_Write(ADIO_File fd, void *buf, ADIO_Offset len, +ADIOI_XFS_Aligned_Mem_File_Write(ADIO_File fd, void *buf, ADIO_Offset len, ADIO_Offset offset) { unsigned write_chunk_sz = fd->hints->fs_hints.xfs.write_chunk_sz; @@ -121,7 +121,7 @@ ADIOI_XFS_Aligned_Mem_File_Write(ADIO_File fd, void *buf, ADIO_Offset len, use direct I/O to write up to correct io_size, use buffered I/O for remaining. */ - if (!(len % fd->d_miniosz) && + if (!(len % fd->d_miniosz) && (len >= fd->d_miniosz) && (len <= write_chunk_sz)) { nbytes = pwrite(fd->fd_direct, buf, len, offset); if (nbytes < 0) {return -1;} @@ -140,19 +140,19 @@ ADIOI_XFS_Aligned_Mem_File_Write(ADIO_File fd, void *buf, ADIO_Offset len, } if (rem) { if (!(rem % fd->d_miniosz)) { - nbytes = pwrite(fd->fd_direct, + nbytes = pwrite(fd->fd_direct, ((char *)buf) + ntimes * write_chunk_sz, rem, offset); if (nbytes < 0) {return -1;} } else { newrem = rem % fd->d_miniosz; size = rem - newrem; if (size) { - nbytes = pwrite(fd->fd_direct, + nbytes = pwrite(fd->fd_direct, ((char *)buf) + ntimes * write_chunk_sz, size, offset); offset += size; if (nbytes < 0) {return -1;} } - nbytes = pwrite(fd->fd_sys, + nbytes = pwrite(fd->fd_sys, ((char *)buf) + ntimes * write_chunk_sz + size, newrem, offset); if (nbytes < 0) {return -1;} } diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.c index a0eadfba699..be8b8a94b1c 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago. + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -37,6 +37,6 @@ struct ADIOI_Fns_struct ADIO_ZOIDFS_operations = { ADIOI_ZOIDFS_Feature, }; -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.h b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.h index d4999b66228..412970fac63 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.h +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -18,16 +18,16 @@ typedef zoidfs_handle_t ADIOI_ZOIDFS_object; void ADIOI_ZOIDFS_Open(ADIO_File fd, int *error_code); void ADIOI_ZOIDFS_Close(ADIO_File fd, int *error_code); -void ADIOI_ZOIDFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_ZOIDFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_ZOIDFS_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_ZOIDFS_WriteContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int - *error_code); + *error_code); void ADIOI_ZOIDFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int - *error_code); + *error_code); void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_close.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_close.c index 0126783aa37..db7aa622273 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_close.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -20,6 +20,6 @@ void ADIOI_ZOIDFS_Close(ADIO_File fd, int *error_code) *error_code = MPI_SUCCESS; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.c index 018d439aaa2..d2781c41402 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2003 University of Chicago. +/* + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -34,7 +34,7 @@ void ADIOI_ZOIDFS_End(int *error_code) *error_code = MPI_SUCCESS; } -int ADIOI_ZOIDFS_End_call(MPI_Comm comm, int keyval, +int ADIOI_ZOIDFS_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state) { int error_code; @@ -64,10 +64,10 @@ void ADIOI_ZOIDFS_Init(int rank, int *error_code ) 0); return; } - + MPI_Keyval_create(MPI_NULL_COPY_FN, ADIOI_ZOIDFS_End_call, - &ADIOI_ZOIDFS_Initialized, (void *)0); - /* just like romio does, we make a dummy attribute so we + &ADIOI_ZOIDFS_Initialized, (void *)0); + /* just like romio does, we make a dummy attribute so we * get cleaned up */ MPI_Attr_put(MPI_COMM_SELF, ADIOI_ZOIDFS_Initialized, (void *)0); } @@ -121,6 +121,6 @@ int ADIOI_ZOIDFS_error_convert(int error) } } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.h b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.h index ba985b49226..487b499e0d4 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.h +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_common.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -9,10 +9,10 @@ #define _AD_ZOIDFS_COMMON_H #include "ad_zoidfs.h" -/* The ESTALE problem: +/* The ESTALE problem: * The IO forwarding protocol can respond to any call with ESTALE, which means * the handle upon which that call operates has expired from the metadata - * cache. We thus wrap any zoidfs routine (expr) in this macro. + * cache. We thus wrap any zoidfs routine (expr) in this macro. * * ROMIO stores the filename in the ADIOI_File structrue (fd), so we can always * re-lookup in response to ESTALE */ @@ -36,7 +36,7 @@ void ADIOI_ZOIDFS_Init(int rank, int *error_code ); void ADIOI_ZOIDFS_makeattribs(zoidfs_sattr_t * attribs); void ADIOI_ZOIDFS_End(int *error_code); -int ADIOI_ZOIDFS_End_call(MPI_Comm comm, int keyval, +int ADIOI_ZOIDFS_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state); int ADIOI_ZOIDFS_error_convert(int error); diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_delete.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_delete.c index 87193147a56..cca80210613 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_delete.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago. + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,7 +17,7 @@ void ADIOI_ZOIDFS_Delete(char *filename, int *error_code) ADIOI_ZOIDFS_Init(0, error_code); /* --BEGIN ERROR HANDLING-- */ - if (*error_code != MPI_SUCCESS) + if (*error_code != MPI_SUCCESS) { /* ADIOI_ZOIDFS_INIT handles creating error codes itself */ return; @@ -40,6 +40,6 @@ void ADIOI_ZOIDFS_Delete(char *filename, int *error_code) return; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_fcntl.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_fcntl.c index 22c26714d80..810100574d2 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -55,6 +55,6 @@ void ADIOI_ZOIDFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, } } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_flush.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_flush.c index 8ec0b8d5518..06cd30631aa 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_flush.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,12 +11,12 @@ /* we want to be a bit clever here: at scale, if every client sends a * flush request, it will stress the file system with redundant * commit requests. Instead, one process should wait for - * everyone to catch up, do the sync, then broadcast the result. + * everyone to catch up, do the sync, then broadcast the result. */ -void ADIOI_ZOIDFS_Flush(ADIO_File fd, int *error_code) -{ - int ret, rank, dummy=0, dummy_in=0; +void ADIOI_ZOIDFS_Flush(ADIO_File fd, int *error_code) +{ + int ret, rank, dummy=0, dummy_in=0; ADIOI_ZOIDFS_object *zoidfs_obj_ptr; static char myname[] = "ADIOI_ZOIDFS_FLUSH"; @@ -28,7 +28,7 @@ void ADIOI_ZOIDFS_Flush(ADIO_File fd, int *error_code) /* collective call to ensure no outstanding write requests. reduce is * slightly less expensvie than barrier */ - MPI_Reduce(&dummy_in, &dummy, 1, MPI_INT, MPI_SUM, + MPI_Reduce(&dummy_in, &dummy, 1, MPI_INT, MPI_SUM, fd->hints->ranklist[0], fd->comm); if (rank == fd->hints->ranklist[0]) { @@ -47,6 +47,6 @@ void ADIOI_ZOIDFS_Flush(ADIO_File fd, int *error_code) /* --END ERROR HANDLING-- */ } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_io.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_io.c index 337c92f4101..35dd552ce78 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_io.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_io.c @@ -1,6 +1,6 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * - * Copyright (C) 1997 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -37,12 +37,12 @@ static void ZOIDFS_IOContig(ADIO_File fd, void * buf, int count, if (flag == ZOIDFS_READ) { NO_STALE(ret, fd, zoidfs_obj_ptr, - zoidfs_read(zoidfs_obj_ptr, + zoidfs_read(zoidfs_obj_ptr, 1, &buf, &mem_len, 1, &file_offset, &file_len, ZOIDFS_NO_OP_HINT)); } else { NO_STALE(ret, fd, zoidfs_obj_ptr, - zoidfs_write(zoidfs_obj_ptr, + zoidfs_write(zoidfs_obj_ptr, 1, (const void **)&buf, &mem_len, 1, &file_offset, &file_len, ZOIDFS_NO_OP_HINT)); } @@ -72,12 +72,12 @@ static void ZOIDFS_IOContig(ADIO_File fd, void * buf, int count, return; } -void ADIOI_ZOIDFS_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_ZOIDFS_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { - ZOIDFS_IOContig(fd, buf, count, datatype, file_ptr_type, + ZOIDFS_IOContig(fd, buf, count, datatype, file_ptr_type, offset, status, ZOIDFS_READ, error_code); } @@ -90,7 +90,7 @@ void ADIOI_ZOIDFS_WriteContig(ADIO_File fd, void *buf, int count, offset, status, ZOIDFS_WRITE, error_code); } - + /* - * vim: ts=8 sts=4 sw=4 noexpandtab + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_open.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_open.c index 55fb950a3e8..2d4abff0e92 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_open.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 2007 University of Chicago. + * Copyright (C) 2007 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -14,10 +14,10 @@ struct open_status_s { zoidfs_handle_t handle; }; typedef struct open_status_s open_status; - + static void fake_an_open(char *fname, int access_mode, int nr_datafiles, MPI_Offset strip_size, - ADIOI_ZOIDFS_object *zoidfs_ptr, + ADIOI_ZOIDFS_object *zoidfs_ptr, open_status *o_status) { int ret, created; @@ -31,7 +31,7 @@ static void fake_an_open(char *fname, int access_mode, * be careful with ADIO_EXCL. */ if (access_mode & ADIO_CREATE) { - ret = zoidfs_create(NULL, NULL, + ret = zoidfs_create(NULL, NULL, fname, &attribs, &handle, &created, ZOIDFS_NO_OP_HINT); if ((ret == ZFS_OK) && !created && (access_mode & ADIO_EXCL)) { /* lookup should not succeed if opened with EXCL */ @@ -51,7 +51,7 @@ static void fake_an_open(char *fname, int access_mode, /* ADIOI_ZOIDFS_Open: * one process opens (or creates) the file, then broadcasts the result to the - * remaining processors. + * remaining processors. * * ADIO_Open used to perform an optimization when MPI_MODE_CREATE (and before * that, MPI_MODE_EXCL) was set. Because ZoidFS handles file lookup and @@ -72,9 +72,9 @@ void ADIOI_ZOIDFS_Open(ADIO_File fd, int *error_code) MPI_Datatype types[2] = {MPI_INT, MPI_BYTE}; int lens[2] = {1, sizeof(ADIOI_ZOIDFS_object)}; MPI_Aint offsets[2]; - + memset(&o_status, 0, sizeof(o_status)); - zoidfs_obj_ptr = (ADIOI_ZOIDFS_object *) + zoidfs_obj_ptr = (ADIOI_ZOIDFS_object *) ADIOI_Malloc(sizeof(ADIOI_ZOIDFS_object)); /* --BEGIN ERROR HANDLING-- */ if (zoidfs_obj_ptr == NULL) { @@ -102,10 +102,10 @@ void ADIOI_ZOIDFS_Open(ADIO_File fd, int *error_code) MPE_Log_event( ADIOI_MPE_open_a, 0, NULL ); #endif if (rank == fd->hints->ranklist[0] && fd->fs_ptr == NULL) { - fake_an_open(fd->filename, fd->access_mode, + fake_an_open(fd->filename, fd->access_mode, fd->hints->striping_factor, fd->hints->striping_unit, - zoidfs_obj_ptr, &o_status); + zoidfs_obj_ptr, &o_status); /* store credentials and object reference in fd */ *zoidfs_obj_ptr = o_status.handle; fd->fs_ptr = zoidfs_obj_ptr; @@ -132,7 +132,7 @@ void ADIOI_ZOIDFS_Open(ADIO_File fd, int *error_code) /* --BEGIN ERROR HANDLING-- */ if (o_status.error != ZFS_OK) - { + { ADIOI_Free(zoidfs_obj_ptr); fd->fs_ptr = NULL; *error_code = MPIO_Err_create_code(MPI_SUCCESS, diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c index d48a06c1bde..b537fffc3d1 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * vim: ts=8 sts=4 sw=4 noexpandtab - * - * Copyright (C) 2008 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -26,7 +26,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, int n_filetypes, etype_in_filetype; ADIO_Offset abs_off_in_filetype=0; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset off, disp, start_off, initial_off; int flag, st_frd_size, st_n_filetypes; @@ -76,7 +76,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -86,7 +86,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, etype_size = fd->etype_size; bufsize = buftype_size * count; - + zoidfs_obj_ptr = (ADIOI_ZOIDFS_object *)fd->fs_ptr; if (!buftype_is_contig && filetype_is_contig) { @@ -99,7 +99,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + etype_size * offset; file_list_count = 1; @@ -121,9 +121,9 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, /* step through each block in memory, filling memory arrays */ while (b_blks_read < total_blks_to_read) { for (i=0; icount; i++) { - mem_offsets[b_blks_read % MAX_ARRAY_SIZE] = + mem_offsets[b_blks_read % MAX_ARRAY_SIZE] = buf + j*buftype_extent + flat_buf->indices[i]; - mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = + mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; file_lengths += flat_buf->blocklens[i]; b_blks_read++; @@ -159,21 +159,21 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } total_bytes_read += file_lengths; /* --END ERROR HANDLING-- */ - - /* in the case of error or the last read list call, + + /* in the case of error or the last read list call, * leave here */ if (err_flag || b_blks_read == total_blks_to_read) break; file_offsets += file_lengths; file_lengths = 0; - } + } } /* for (i=0; icount; i++) */ j++; } /* while (b_blks_read < total_blks_to_read) */ ADIOI_Free(mem_offsets); ADIOI_Free(mem_lengths); - if (file_ptr_type == ADIO_INDIVIDUAL) + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += total_bytes_read; fd->fp_sys_posn = -1; /* set it to null. */ @@ -212,11 +212,11 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - frd_size = disp + flat_file->indices[i] + + frd_size = disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -230,7 +230,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -242,16 +242,16 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, break; } } - + /* abs. offset in bytes in the file */ - offset = disp + ((ADIO_Offset) n_filetypes)*filetype_extent + + offset = disp + ((ADIO_Offset) n_filetypes)*filetype_extent + abs_off_in_filetype; } /* else [file_ptr_type != ADIO_INDIVIDUAL] */ start_off = offset; st_frd_size = frd_size; st_n_filetypes = n_filetypes; - + if (buftype_is_contig && !filetype_is_contig) { /* contiguous in memory, noncontiguous in file. should be the most @@ -260,13 +260,13 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, /* only one memory off-len pair, so no array here */ size_t mem_lengths; size_t mem_offsets; - + i = 0; j = st_index; n_filetypes = st_n_filetypes; - + mem_list_count = 1; - + /* determine how many blocks in file to read */ f_data_read = ADIOI_MIN(st_frd_size, bufsize); total_blks_to_read = 1; @@ -279,17 +279,17 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, f_data_read += flat_file->blocklens[j]; total_blks_to_read++; if (j<(flat_file->count-1)) j++; - else j = 0; + else j = 0; } - + j = st_index; n_filetypes = st_n_filetypes; n_read_lists = total_blks_to_read/MAX_ARRAY_SIZE; extra_blks = total_blks_to_read%MAX_ARRAY_SIZE; - + mem_offsets = (size_t)buf; mem_lengths = 0; - + /* if at least one full readlist, allocate file arrays at max array size and don't free until very end */ if (n_read_lists) { @@ -306,7 +306,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, file_lengths = (uint64_t*)ADIOI_Malloc(extra_blks* sizeof(uint64_t)); } - + /* for file arrays that are of MAX_ARRAY_SIZE, build arrays */ for (i=0; iindices[j]; file_lengths[k] = flat_file->blocklens[j]; @@ -366,7 +366,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } for (k=0; kindices[j]; if (k == (extra_blks - 1)) { @@ -400,7 +400,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, MPIR_ERR_RECOVERABLE, myname, __LINE__, ADIOI_ZOIDFS_error_convert(err_flag), - "Error in zoidfs_read", 0); + "Error in zoidfs_read", 0); goto error_state; } /* --END ERROR HANDLING-- */ @@ -409,7 +409,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } else { /* noncontiguous in memory as well as in file */ - + ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; @@ -425,7 +425,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, max_mem_list = 0; max_file_list = 0; - /* run through and file max_file_list and max_mem_list so that you + /* run through and file max_file_list and max_mem_list so that you can allocate the file and memory arrays less than MAX_ARRAY_SIZE if possible */ @@ -433,7 +433,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, k = start_k; new_buffer_read = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -441,9 +441,9 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_read + flat_buf->blocklens[k] + + if((new_buffer_read + flat_buf->blocklens[k] + size_read) > bufsize) { - end_brd_size = new_buffer_read + + end_brd_size = new_buffer_read + flat_buf->blocklens[k] - (bufsize - size_read); new_buffer_read = bufsize - size_read; } @@ -461,15 +461,15 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ j = start_j; new_file_read = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_read < new_buffer_read)) { if(file_list_count) { - if((new_file_read + flat_file->blocklens[j]) > + if((new_file_read + flat_file->blocklens[j]) > new_buffer_read) { end_frd_size = new_buffer_read - new_file_read; new_file_read = new_buffer_read; @@ -490,9 +490,9 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_read < new_buffer_read) && + if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_read = 0; mem_list_count = 0; @@ -521,13 +521,13 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } /* while (new_buffer_read < new_file_read) */ } /* if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ /* fakes filling the readlist arrays of lengths found above */ k = start_k; j = start_j; - for (i=0; iblocklens[k] == end_brd_size) @@ -548,7 +548,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, if (i == (file_list_count - 1)) { if (flat_file->blocklens[j] == end_frd_size) frd_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { frd_size = flat_file->blocklens[j] - end_frd_size; j--; @@ -581,11 +581,11 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, * region and many (700) very small memory regions. both cases caused * problems for this code */ - if ( ( (file_list_count == 1) && + if ( ( (file_list_count == 1) && (new_file_read < flat_file->blocklens[0] ) ) || - ((mem_list_count == 1) && + ((mem_list_count == 1) && (new_buffer_read < flat_buf->blocklens[0]) ) || - ((file_list_count == MAX_ARRAY_SIZE) && + ((file_list_count == MAX_ARRAY_SIZE) && (new_file_read < flat_buf->blocklens[0]) ) || ( (mem_list_count == MAX_ARRAY_SIZE) && (new_buffer_read < flat_file->blocklens[0])) ) @@ -601,7 +601,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, mem_lengths = (size_t*)ADIOI_Malloc(max_mem_list*sizeof(size_t)); file_offsets = (uint64_t *)ADIOI_Malloc(max_file_list*sizeof(uint64_t)); file_lengths = (uint64_t *)ADIOI_Malloc(max_file_list*sizeof(uint64_t)); - + size_read = 0; n_filetypes = st_n_filetypes; frd_size = st_frd_size; @@ -614,12 +614,12 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, /* this section calculates mem_list_count and file_list_count and also finds the possibly odd sized last array elements in new_frd_size and new_brd_size */ - + while (size_read < bufsize) { k = start_k; new_buffer_read = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -627,9 +627,9 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, read in the next immediate read list is less than bufsize */ if(mem_list_count) { - if((new_buffer_read + flat_buf->blocklens[k] + + if((new_buffer_read + flat_buf->blocklens[k] + size_read) > bufsize) { - end_brd_size = new_buffer_read + + end_brd_size = new_buffer_read + flat_buf->blocklens[k] - (bufsize - size_read); new_buffer_read = bufsize - size_read; } @@ -647,15 +647,15 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ j = start_j; new_file_read = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_read < new_buffer_read)) { if(file_list_count) { - if((new_file_read + flat_file->blocklens[j]) > + if((new_file_read + flat_file->blocklens[j]) > new_buffer_read) { end_frd_size = new_buffer_read - new_file_read; new_file_read = new_buffer_read; @@ -676,9 +676,9 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_read < new_buffer_read) && + if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_read = 0; mem_list_count = 0; @@ -707,14 +707,14 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, } /* while (new_buffer_read < new_file_read) */ } /* if ((new_file_read < new_buffer_read) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_read < bufsize-size_read)) */ /* fills the allocated readlist arrays */ k = start_k; j = start_j; - for (i=0; icount) + flat_buf->indices[k]; if(!i) { @@ -741,7 +741,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, k = (k + 1)%flat_buf->count; } /* for (i=0; iindices[j] + + file_offsets[i] = disp + flat_file->indices[j] + ((ADIO_Offset)n_filetypes) * filetype_extent; if (!i) { file_lengths[0] = frd_size; @@ -752,7 +752,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, file_lengths[i] = end_frd_size; if (flat_file->blocklens[j] == end_frd_size) frd_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { frd_size = flat_file->blocklens[j] - end_frd_size; j--; @@ -799,7 +799,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, /* when incrementing fp_ind, need to also take into account the file type: * consider an N-element 1-d subarray with a lb and ub: ( |---xxxxx-----| * if we wrote N elements, offset needs to point at beginning of type, not - * at empty region at offset N+1) + * at empty region at offset N+1) * * As we discussed on mpich-discuss in may/june 2009, the code below might * look wierd, but by putting fp_ind at the last byte written, the next @@ -809,10 +809,10 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, fd->fp_ind = file_offsets[file_list_count-1]+ file_lengths[file_list_count-1]; } - + ADIOI_Free(file_offsets); ADIOI_Free(file_lengths); - + if (err_flag == 0) *error_code = MPI_SUCCESS; error_state: @@ -820,11 +820,11 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); - /* This is a temporary way of filling in status. The right way is to - keep track of how much data was actually read and placed in buf + /* This is a temporary way of filling in status. The right way is to + keep track of how much data was actually read and placed in buf by ADIOI_BUFFERED_READ. */ #endif - + if (!buftype_is_contig) ADIOI_Delete_flattened(datatype); } diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_resize.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_resize.c index 60d2fcaba20..90734ed59d5 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_resize.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -49,5 +49,5 @@ void ADIOI_ZOIDFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) } /* - * vim: ts=8 sts=4 sw=4 noexpandtab + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c index 8ca0594fe56..ced3c109553 100644 --- a/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c +++ b/ompi/mca/io/romio314/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- - * vim: ts=8 sts=4 sw=4 noexpandtab - * - * Copyright (C) 2008 University of Chicago. +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,7 +90,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -98,7 +98,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Type_size_x(datatype, &buftype_size); MPI_Type_extent(datatype, &buftype_extent); etype_size = fd->etype_size; - + bufsize = buftype_size * count; zoidfs_obj_ptr = (ADIOI_ZOIDFS_object*)fd->fs_ptr; @@ -112,7 +112,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { off = fd->disp + etype_size * offset; } @@ -135,11 +135,11 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, /* step through each block in memory, filling memory arrays */ while (b_blks_wrote < total_blks_to_write) { for (i=0; icount; i++) { - mem_offsets[b_blks_wrote % MAX_ARRAY_SIZE] = - buf + - j*buftype_extent + + mem_offsets[b_blks_wrote % MAX_ARRAY_SIZE] = + buf + + j*buftype_extent + flat_buf->indices[i]; - mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = + mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; file_lengths += flat_buf->blocklens[i]; b_blks_wrote++; @@ -157,9 +157,9 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif NO_STALE(err_flag, fd, zoidfs_obj_ptr, - zoidfs_write(zoidfs_obj_ptr, + zoidfs_write(zoidfs_obj_ptr, mem_list_count, - mem_offsets, mem_lengths, + mem_offsets, mem_lengths, 1, &file_offsets, &file_lengths, ZOIDFS_NO_OP_HINT)); /* --BEGIN ERROR HANDLING-- */ @@ -175,8 +175,8 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); #endif total_bytes_written += file_lengths; - - /* in the case of error or the last write list call, + + /* in the case of error or the last write list call, * leave here */ /* --BEGIN ERROR HANDLING-- */ if (err_flag) { @@ -192,14 +192,14 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, file_offsets += file_lengths; file_lengths = 0; - } + } } /* for (i=0; icount; i++) */ j++; } /* while (b_blks_wrote < total_blks_to_write) */ ADIOI_Free(mem_offsets); ADIOI_Free(mem_lengths); - if (file_ptr_type == ADIO_INDIVIDUAL) + if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += total_bytes_written; if (!err_flag) *error_code = MPI_SUCCESS; @@ -208,7 +208,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif @@ -227,7 +227,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, initial_off = offset; /* for each case - ADIO_Individual pointer or explicit, find offset - (file offset in bytes), n_filetypes (how many filetypes into file + (file offset in bytes), n_filetypes (how many filetypes into file to start), fwr_size (remaining amount of data in present file block), and st_index (start point in terms of blocks in starting filetype) */ @@ -238,11 +238,11 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - fwr_size = disp + flat_file->indices[i] + + fwr_size = disp + flat_file->indices[i] + ((ADIO_Offset) n_filetypes)*filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -256,7 +256,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, n_filetypes = (int) (offset / n_etypes_in_filetype); etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -277,7 +277,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, start_off = offset; st_fwr_size = fwr_size; st_n_filetypes = n_filetypes; - + if (buftype_is_contig && !filetype_is_contig) { /* contiguous in memory, noncontiguous in file. should be the most @@ -286,14 +286,14 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, /* only one memory off-len pair, so no array */ size_t mem_lengths; size_t mem_offsets; - + i = 0; j = st_index; off = offset; n_filetypes = st_n_filetypes; - + mem_list_count = 1; - + /* determine how many blocks in file to write */ f_data_wrote = ADIOI_MIN(st_fwr_size, bufsize); total_blks_to_write = 1; @@ -306,17 +306,17 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, f_data_wrote += flat_file->blocklens[j]; total_blks_to_write++; if (j<(flat_file->count-1)) j++; - else j = 0; + else j = 0; } - + j = st_index; n_filetypes = st_n_filetypes; n_write_lists = total_blks_to_write/MAX_ARRAY_SIZE; extra_blks = total_blks_to_write%MAX_ARRAY_SIZE; - + mem_offsets = (size_t)buf; mem_lengths = 0; - + /* if at least one full writelist, allocate file arrays at max array size and don't free until very end */ if (n_write_lists) { @@ -333,7 +333,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, file_lengths = (uint64_t*)ADIOI_Malloc(extra_blks* sizeof(uint64_t)); } - + /* for file arrays that are of MAX_ARRAY_SIZE, build arrays */ for (i=0; iindices[j]; file_lengths[k] = flat_file->blocklens[j]; @@ -362,7 +362,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, NO_STALE(err_flag, fd, zoidfs_obj_ptr, zoidfs_write(zoidfs_obj_ptr, 1, buf, &mem_lengths, - file_list_count, + file_list_count, file_offsets, file_lengths, ZOIDFS_NO_OP_HINT)); #ifdef ADIOI_MPE_LOGGING @@ -394,12 +394,12 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, } for (k=0; kindices[j]; /* XXX: double-check these casts */ if (k == (extra_blks - 1)) { - file_lengths[k] = bufsize + file_lengths[k] = bufsize - mem_lengths - mem_offsets + (size_t)buf; } else file_lengths[k] = flat_file->blocklens[j]; @@ -415,11 +415,11 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - NO_STALE(err_flag, fd, zoidfs_obj_ptr, - zoidfs_write(zoidfs_obj_ptr, 1, - (const void **)&mem_offsets, + NO_STALE(err_flag, fd, zoidfs_obj_ptr, + zoidfs_write(zoidfs_obj_ptr, 1, + (const void **)&mem_offsets, &mem_lengths, - file_list_count, + file_list_count, file_offsets, file_lengths, ZOIDFS_NO_OP_HINT)); #ifdef ADIOI_MPE_LOGGING @@ -437,7 +437,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, /* --END ERROR HANDLING-- */ total_bytes_written += mem_lengths; } - } + } else { /* noncontiguous in memory as well as in file */ @@ -456,7 +456,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, max_mem_list = 0; max_file_list = 0; - /* run through and file max_file_list and max_mem_list so that you + /* run through and file max_file_list and max_mem_list so that you can allocate the file and memory arrays less than MAX_ARRAY_SIZE if possible */ @@ -464,7 +464,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, k = start_k; new_buffer_write = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -472,9 +472,9 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, written in the next immediate write list is less than bufsize */ if(mem_list_count) { - if((new_buffer_write + flat_buf->blocklens[k] + + if((new_buffer_write + flat_buf->blocklens[k] + size_wrote) > bufsize) { - end_bwr_size = new_buffer_write + + end_bwr_size = new_buffer_write + flat_buf->blocklens[k] - (bufsize - size_wrote); new_buffer_write = bufsize - size_wrote; } @@ -492,15 +492,15 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ j = start_j; new_file_write = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && - (new_file_write < new_buffer_write)) { + while ((file_list_count < MAX_ARRAY_SIZE) && + (new_file_write < new_buffer_write)) { if(file_list_count) { - if((new_file_write + flat_file->blocklens[j]) > + if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { end_fwr_size = new_buffer_write - new_file_write; new_file_write = new_buffer_write; @@ -521,9 +521,9 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_write < new_buffer_write) && + if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_write = 0; mem_list_count = 0; @@ -531,7 +531,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, if(mem_list_count) { if((new_buffer_write + flat_buf->blocklens[k]) > new_file_write) { - end_bwr_size = new_file_write - + end_bwr_size = new_file_write - new_buffer_write; new_buffer_write = new_file_write; k--; @@ -553,13 +553,13 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, } /* while (new_buffer_write < new_file_write) */ } /* if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ /* fakes filling the writelist arrays of lengths found above */ k = start_k; j = start_j; - for (i=0; iblocklens[k] == end_bwr_size) @@ -580,7 +580,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, if (i == (file_list_count - 1)) { if (flat_file->blocklens[j] == end_fwr_size) fwr_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { fwr_size = flat_file->blocklens[j] - end_fwr_size; j--; @@ -613,11 +613,11 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, * region and many (700) very small memory regions. both cases caused * problems for this code */ - if ( ( (file_list_count == 1) && + if ( ( (file_list_count == 1) && (new_file_write < flat_file->blocklens[0] ) ) || - ((mem_list_count == 1) && + ((mem_list_count == 1) && (new_buffer_write < flat_buf->blocklens[0]) ) || - ((file_list_count == MAX_ARRAY_SIZE) && + ((file_list_count == MAX_ARRAY_SIZE) && (new_file_write < flat_buf->blocklens[0]) ) || ( (mem_list_count == MAX_ARRAY_SIZE) && (new_buffer_write < flat_file->blocklens[0])) ) @@ -633,7 +633,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, mem_lengths = (size_t*)ADIOI_Malloc(max_mem_list*sizeof(size_t)); file_offsets = (uint64_t *)ADIOI_Malloc(max_file_list*sizeof(uint64_t)); file_lengths = (uint64_t*)ADIOI_Malloc(max_file_list*sizeof(uint64_t)); - + size_wrote = 0; n_filetypes = st_n_filetypes; fwr_size = st_fwr_size; @@ -646,12 +646,12 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, /* this section calculates mem_list_count and file_list_count and also finds the possibly odd sized last array elements in new_fwr_size and new_bwr_size */ - + while (size_wrote < bufsize) { k = start_k; new_buffer_write = 0; mem_list_count = 0; - while ((mem_list_count < MAX_ARRAY_SIZE) && + while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are @@ -659,9 +659,9 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, written in the next immediate write list is less than bufsize */ if(mem_list_count) { - if((new_buffer_write + flat_buf->blocklens[k] + + if((new_buffer_write + flat_buf->blocklens[k] + size_wrote) > bufsize) { - end_bwr_size = new_buffer_write + + end_bwr_size = new_buffer_write + flat_buf->blocklens[k] - (bufsize - size_wrote); new_buffer_write = bufsize - size_wrote; } @@ -679,15 +679,15 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, } mem_list_count++; k = (k + 1)%flat_buf->count; - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ j = start_j; new_file_write = 0; file_list_count = 0; - while ((file_list_count < MAX_ARRAY_SIZE) && + while ((file_list_count < MAX_ARRAY_SIZE) && (new_file_write < new_buffer_write)) { if(file_list_count) { - if((new_file_write + flat_file->blocklens[j]) > + if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { end_fwr_size = new_buffer_write - new_file_write; new_file_write = new_buffer_write; @@ -708,9 +708,9 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, file_list_count++; if (j < (flat_file->count - 1)) j++; else j = 0; - + k = start_k; - if ((new_file_write < new_buffer_write) && + if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) { new_buffer_write = 0; mem_list_count = 0; @@ -740,17 +740,17 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, } /* while (new_buffer_write < new_file_write) */ } /* if ((new_file_write < new_buffer_write) && (file_list_count == MAX_ARRAY_SIZE)) */ - } /* while ((mem_list_count < MAX_ARRAY_SIZE) && + } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ /* fills the allocated writelist arrays */ k = start_k; j = start_j; - for (i=0; icount) + flat_buf->indices[k]; - + if(!i) { mem_lengths[0] = bwr_size; mem_offsets[0] += flat_buf->blocklens[k] - bwr_size; @@ -775,7 +775,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, k = (k + 1)%flat_buf->count; } /* for (i=0; iindices[j] + + file_offsets[i] = disp + flat_file->indices[j] + ((ADIO_Offset)n_filetypes) * filetype_extent; if (!i) { file_lengths[0] = fwr_size; @@ -786,7 +786,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, file_lengths[i] = end_fwr_size; if (flat_file->blocklens[j] == end_fwr_size) fwr_size = flat_file->blocklens[(j+1)% - flat_file->count]; + flat_file->count]; else { fwr_size = flat_file->blocklens[j] - end_fwr_size; j--; @@ -805,9 +805,9 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif NO_STALE(err_flag, fd, zoidfs_obj_ptr, - zoidfs_write(zoidfs_obj_ptr, - mem_list_count, mem_offsets, mem_lengths, - file_list_count, + zoidfs_write(zoidfs_obj_ptr, + mem_list_count, mem_offsets, mem_lengths, + file_list_count, file_offsets, file_lengths, ZOIDFS_NO_OP_HINT)); /* --BEGIN ERROR HANDLING-- */ if (err_flag != ZFS_OK) { @@ -833,7 +833,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, /* when incrementing fp_ind, need to also take into account the file type: * consider an N-element 1-d subarray with a lb and ub: ( |---xxxxx-----| * if we wrote N elements, offset needs to point at beginning of type, not - * at empty region at offset N+1). + * at empty region at offset N+1). * * As we discussed on mpich-discuss in may/june 2009, the code below might * look wierd, but by putting fp_ind at the last byte written, the next @@ -853,7 +853,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_aggregate.c b/ompi/mca/io/romio314/romio/adio/common/ad_aggregate.c index 55b55440df5..fe225394c51 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_aggregate.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_aggregate.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997-2001 University of Chicago. +/* + * Copyright (C) 1997-2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -22,14 +22,14 @@ * * The last three of these were originally in ad_read_coll.c, but they are * also shared with ad_write_coll.c. I felt that they were better kept with - * the rest of the shared aggregation code. + * the rest of the shared aggregation code. */ /* Discussion of values available from above: * * ADIO_Offset st_offsets[0..nprocs-1] * ADIO_Offset end_offsets[0..nprocs-1] - * These contain a list of start and end offsets for each process in + * These contain a list of start and end offsets for each process in * the communicator. For example, an access at loc 10, size 10 would * have a start offset of 10 and end offset of 19. * int nprocs @@ -39,15 +39,15 @@ * starting location of "file domain"; region that a given process will * perform aggregation for (i.e. actually do I/O) * ADIO_Offset fd_end[0..nprocs_for_coll-1] - * start + size - 1 roughly, but it can be less, or 0, in the case of + * start + size - 1 roughly, but it can be less, or 0, in the case of * uneven distributions */ /* ADIOI_Calc_aggregator() * - * The intention here is to implement a function which provides basically - * the same functionality as in Rajeev's original version of - * ADIOI_Calc_my_req(). He used a ceiling division approach to assign the + * The intention here is to implement a function which provides basically + * the same functionality as in Rajeev's original version of + * ADIOI_Calc_my_req(). He used a ceiling division approach to assign the * file domains, and we use the same approach here when calculating the * location of an offset/len in a specific file domain. Further we assume * this same distribution when calculating the rank_index, which is later @@ -56,7 +56,7 @@ * A better (i.e. more general) approach would be to use the list of file * domains only. This would be slower in the case where the * original ceiling division was used, but it would allow for arbitrary - * distributions of regions to aggregators. We'd need to know the + * distributions of regions to aggregators. We'd need to know the * nprocs_for_coll in that case though, which we don't have now. * * Note a significant difference between this function and Rajeev's old code: @@ -71,9 +71,9 @@ * actually available in this file domain. */ int ADIOI_Calc_aggregator(ADIO_File fd, - ADIO_Offset off, - ADIO_Offset min_off, - ADIO_Offset *len, + ADIO_Offset off, + ADIO_Offset min_off, + ADIO_Offset *len, ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end) @@ -107,7 +107,7 @@ int ADIOI_Calc_aggregator(ADIO_File fd, /* remember here that even in Rajeev's original code it was the case that * different aggregators could end up with different amounts of data to * aggregate. here we use fd_end[] to make sure that we know how much - * data this aggregator is working with. + * data this aggregator is working with. * * the +1 is to take into account the end vs. length issue. */ @@ -127,8 +127,8 @@ int ADIOI_Calc_aggregator(ADIO_File fd, void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset *end_offsets, int nprocs, int nprocs_for_coll, ADIO_Offset *min_st_offset_ptr, - ADIO_Offset **fd_start_ptr, ADIO_Offset - **fd_end_ptr, int min_fd_size, + ADIO_Offset **fd_start_ptr, ADIO_Offset + **fd_end_ptr, int min_fd_size, ADIO_Offset *fd_size_ptr, int striping_unit) { @@ -144,7 +144,7 @@ void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset #endif #ifdef AGG_DEBUG - FPRINTF(stderr, "ADIOI_Calc_file_domains: %d aggregator(s)\n", + FPRINTF(stderr, "ADIOI_Calc_file_domains: %d aggregator(s)\n", nprocs_for_coll); #endif @@ -162,9 +162,9 @@ void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset the file that will be "owned" by each process */ /* partition the total file access range equally among nprocs_for_coll - processes */ + processes */ fd_size = ((max_end_offset - min_st_offset + 1) + nprocs_for_coll - - 1)/nprocs_for_coll; + 1)/nprocs_for_coll; /* ceiling division as in HPF block distribution */ /* Tweak the file domains so that no fd is smaller than a threshold. We @@ -176,9 +176,9 @@ void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset fd_size = min_fd_size; *fd_start_ptr = (ADIO_Offset *) - ADIOI_Malloc(nprocs_for_coll*sizeof(ADIO_Offset)); + ADIOI_Malloc(nprocs_for_coll*sizeof(ADIO_Offset)); *fd_end_ptr = (ADIO_Offset *) - ADIOI_Malloc(nprocs_for_coll*sizeof(ADIO_Offset)); + ADIOI_Malloc(nprocs_for_coll*sizeof(ADIO_Offset)); fd_start = *fd_start_ptr; fd_end = *fd_end_ptr; @@ -195,21 +195,21 @@ void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset end_off = fd_start[0] + fd_size; rem_front = end_off % striping_unit; rem_back = striping_unit - rem_front; - if (rem_front < rem_back) + if (rem_front < rem_back) end_off -= rem_front; - else + else end_off += rem_back; fd_end[0] = end_off - 1; - + /* align fd_end[i] to the nearest file lock boundary */ for (i=1; i 0) { - FPRINTF(stdout, "data needed from %d (count = %d):\n", i, + FPRINTF(stdout, "data needed from %d (count = %d):\n", i, my_req[i].count); for (l=0; l < my_req[i].count; l++) { FPRINTF(stdout, " off[%d] = %lld, len[%d] = %d\n", l, @@ -421,18 +421,18 @@ void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list, ADIO_Offset *len_ -void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, +void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, int *count_my_req_per_proc, - ADIOI_Access *my_req, + ADIOI_Access *my_req, int nprocs, int myrank, int *count_others_req_procs_ptr, - ADIOI_Access **others_req_ptr) + ADIOI_Access **others_req_ptr) { /* determine what requests of other processes lie in this process's file domain */ /* count_others_req_procs = number of processes whose requests lie in - this process's file domain (including this process itself) + this process's file domain (including this process itself) count_others_req_per_proc[i] indicates how many separate contiguous requests of proc. i lie in this process's file domain. */ @@ -452,7 +452,7 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, count_others_req_per_proc, 1, MPI_INT, fd->comm); *others_req_ptr = (ADIOI_Access *) - ADIOI_Malloc(nprocs*sizeof(ADIOI_Access)); + ADIOI_Malloc(nprocs*sizeof(ADIOI_Access)); others_req = *others_req_ptr; count_others_req_procs = 0; @@ -464,25 +464,25 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, others_req[i].lens = ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(ADIO_Offset)); others_req[i].mem_ptrs = (MPI_Aint *) - ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(MPI_Aint)); + ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(MPI_Aint)); count_others_req_procs++; } else others_req[i].count = 0; } - + /* now send the calculated offsets and lengths to respective processes */ requests = (MPI_Request *) - ADIOI_Malloc(1+2*(count_my_req_procs+count_others_req_procs)*sizeof(MPI_Request)); + ADIOI_Malloc(1+2*(count_my_req_procs+count_others_req_procs)*sizeof(MPI_Request)); /* +1 to avoid a 0-size malloc */ j = 0; for (i=0; icomm, &requests[j]); j++; - MPI_Irecv(others_req[i].lens, others_req[i].count, + MPI_Irecv(others_req[i].lens, others_req[i].count, ADIO_OFFSET, i, i+myrank+1, fd->comm, &requests[j]); j++; } @@ -490,10 +490,10 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, for (i=0; i < nprocs; i++) { if (my_req[i].count) { - MPI_Isend(my_req[i].offsets, my_req[i].count, + MPI_Isend(my_req[i].offsets, my_req[i].count, ADIO_OFFSET, i, i+myrank, fd->comm, &requests[j]); j++; - MPI_Isend(my_req[i].lens, my_req[i].count, + MPI_Isend(my_req[i].lens, my_req[i].count, ADIO_OFFSET, i, i+myrank+1, fd->comm, &requests[j]); j++; } diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_aggregate_new.c b/ompi/mca/io/romio314/romio/adio/common/ad_aggregate_new.c index ba5af6b0c3a..a01a41c5034 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_aggregate_new.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_aggregate_new.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2008 University of Chicago. +/* + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -39,7 +39,7 @@ void ADIOI_Calc_file_realms (ADIO_File fd, ADIO_Offset min_st_offset, { int nprocs_for_coll; int file_realm_calc_type; - + MPI_Datatype *file_realm_types = NULL; ADIO_Offset *file_realm_st_offs = NULL; @@ -49,8 +49,8 @@ void ADIOI_Calc_file_realms (ADIO_File fd, ADIO_Offset min_st_offset, #ifdef DEBUG printf ("ADIOI_Calc_file_realms\n"); #endif - - nprocs_for_coll = fd->hints->cb_nodes; + + nprocs_for_coll = fd->hints->cb_nodes; file_realm_calc_type = fd->hints->cb_fr_type; /* If PFRs are disabled we know these pointers are not allocated */ @@ -85,7 +85,7 @@ void ADIOI_Calc_file_realms (ADIO_File fd, ADIO_Offset min_st_offset, ADIOI_Malloc (nprocs_for_coll * sizeof(ADIO_Offset)); file_realm_types = (MPI_Datatype *) ADIOI_Malloc (nprocs_for_coll * sizeof(MPI_Datatype)); - + if (file_realm_calc_type == ADIOI_FR_AAR) { ADIOI_Calc_file_realms_aar (fd, nprocs_for_coll, fd->hints->cb_pfr, @@ -218,7 +218,7 @@ void ADIOI_Calc_file_realms_fsize (ADIO_File fd, int nprocs_for_coll, MPI_Datatype simpletype; ADIO_Fcntl (fd, ADIO_FCNTL_GET_FSIZE, &fcntl_struct, &error_code); - + /* use impending file size since a write call may lengthen the file */ fsize = ADIOI_MAX (fcntl_struct.fsize, max_end_offset+1); fr_size = (fsize + nprocs_for_coll - 1) / nprocs_for_coll; @@ -274,7 +274,7 @@ int ADIOI_Agg_idx (int rank, ADIO_File fd) { static void align_fr (int fr_size, ADIO_Offset fr_off, int alignment, int *aligned_fr_size, ADIO_Offset *aligned_fr_off) { *aligned_fr_off = fr_off - (fr_off % alignment); - *aligned_fr_size = ((fr_off + fr_size) / alignment) * alignment - + *aligned_fr_size = ((fr_off + fr_size) / alignment) * alignment - *aligned_fr_off; if ((fr_off + fr_size) % alignment) *aligned_fr_size += alignment; diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_close.c b/ompi/mca/io/romio314/romio/adio/common/ad_close.c index 7aa5ce07a6c..13b9f7c6019 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_close.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -43,7 +43,7 @@ void ADIO_Close(ADIO_File fd, int *error_code) } else { *error_code = MPI_SUCCESS; } - + } if (fd->access_mode & ADIO_DELETE_ON_CLOSE) { @@ -101,7 +101,7 @@ void ADIO_Close(ADIO_File fd, int *error_code) MPI_Comm_free(&(fd->comm)); - ADIOI_Free(fd->filename); + ADIOI_Free(fd->filename); MPI_Type_get_envelope(fd->etype, &i, &j, &k, &combiner); if (combiner != MPI_COMBINER_NAMED) MPI_Type_free(&(fd->etype)); diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_coll_build_req_new.c b/ompi/mca/io/romio314/romio/adio/common/ad_coll_build_req_new.c index 2ea97545f99..52dfcba0860 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_coll_build_req_new.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_coll_build_req_new.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -33,7 +33,7 @@ static inline ADIO_Offset view_state_get_cur_sz(view_state *tmp_view_state_p, { flatten_state *tmp_state_p = NULL; switch(op_type) - { + { case TEMP_OFF: tmp_state_p = &(tmp_view_state_p->tmp_state); break; @@ -62,7 +62,7 @@ static inline ADIO_Offset view_state_get_next_len(view_state *tmp_view_state_p, default: fprintf(stderr, "op_type invalid\n"); } - return (ADIO_Offset) + return (ADIO_Offset) tmp_view_state_p->flat_type_p->blocklens[tmp_state_p->idx] - tmp_state_p->cur_reg_off; } @@ -73,7 +73,7 @@ static inline ADIO_Offset view_state_get_next_len(view_state *tmp_view_state_p, * possible later on. */ static inline int view_state_add_region( ADIO_Offset max_sz, - view_state *tmp_view_state_p, + view_state *tmp_view_state_p, ADIO_Offset *st_reg_p, ADIO_Offset *tmp_reg_sz_p, int op_type) @@ -104,23 +104,23 @@ static inline int view_state_add_region( /* Should be looking at some data (or it's a zero len blocklens * (i.e. placeholder). */ - assert(tmp_state_p->cur_reg_off != + assert(tmp_state_p->cur_reg_off != tmp_flat_type_p->blocklens[tmp_state_p->idx]); /* Shouldn't have been called if the view_state is done. */ assert(tmp_state_p->cur_sz != tmp_view_state_p->sz); /* Make sure we are not in a non-zero region in the flat_type */ assert(tmp_flat_type_p->blocklens[tmp_state_p->idx] != 0); - + #ifdef DEBUG3 fprintf(stderr, "view_state:(blocklens[%Ld]=%d,cur_reg_off=%Ld," - "max_sz=%Ld)\n", tmp_state_p->idx, - tmp_flat_type_p->blocklens[tmp_state_p->idx], + "max_sz=%Ld)\n", tmp_state_p->idx, + tmp_flat_type_p->blocklens[tmp_state_p->idx], tmp_state_p->cur_reg_off, max_sz); #endif /* Can it add the whole piece? */ - if (tmp_flat_type_p->blocklens[tmp_state_p->idx] - + if (tmp_flat_type_p->blocklens[tmp_state_p->idx] - tmp_state_p->cur_reg_off <= max_sz) { data_sz = tmp_flat_type_p->blocklens[tmp_state_p->idx] - @@ -133,15 +133,15 @@ static inline int view_state_add_region( { assert(tmp_flat_type_p->blocklens[tmp_state_p->idx] != 0); tmp_state_p->abs_off += data_sz; -#ifdef DEBUG3 +#ifdef DEBUG3 fprintf(stderr, "view_state_add_region: %s contig type " - "(old abs_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld)\n", - off_type_name[op_type], tmp_state_p->abs_off - data_sz, + "(old abs_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld)\n", + off_type_name[op_type], tmp_state_p->abs_off - data_sz, tmp_state_p->abs_off, tmp_state_p->cur_sz, data_sz); #endif } else - { + { /* Is this the last region in the datatype? */ if (tmp_state_p->idx == (tmp_flat_type_p->count - 1)) { @@ -151,30 +151,30 @@ static inline int view_state_add_region( tmp_view_state_p->ext; #ifdef DEBUG3 fprintf(stderr, "view_state_add_region: %s last region for type " - "(old abs_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld)\n", - off_type_name[op_type], tmp_state_p->abs_off - data_sz, + "(old abs_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld)\n", + off_type_name[op_type], tmp_state_p->abs_off - data_sz, tmp_state_p->abs_off, tmp_state_p->cur_sz, data_sz); #endif } else { - tmp_state_p->abs_off += + tmp_state_p->abs_off += tmp_flat_type_p->indices[tmp_state_p->idx + 1] - (tmp_flat_type_p->indices[tmp_state_p->idx] + tmp_state_p->cur_reg_off); #ifdef DEBUG3 fprintf(stderr, "view_state_add_region: %s inner region type " - "(old abs_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld)\n", - off_type_name[op_type], tmp_state_p->abs_off - + "(old abs_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld)\n", + off_type_name[op_type], tmp_state_p->abs_off - (tmp_flat_type_p->indices[tmp_state_p->idx + 1] - (tmp_flat_type_p->indices[tmp_state_p->idx] + - tmp_state_p->cur_reg_off)), tmp_state_p->abs_off, + tmp_state_p->cur_reg_off)), tmp_state_p->abs_off, tmp_state_p->cur_sz, data_sz); #endif } /* Increment idx to next non-zero region in the flat_type */ do { - tmp_state_p->idx = + tmp_state_p->idx = (tmp_state_p->idx + 1) % tmp_flat_type_p->count; } while (tmp_flat_type_p->blocklens[tmp_state_p->idx] == 0); } @@ -186,10 +186,10 @@ static inline int view_state_add_region( tmp_state_p->cur_reg_off += data_sz; tmp_state_p->abs_off += data_sz; tmp_state_p->cur_sz += data_sz; -#ifdef DEBUG3 +#ifdef DEBUG3 fprintf(stderr, "view_state_add_region: %s partial region type " - "(cur_reg_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld\n", - off_type_name[op_type], tmp_state_p->cur_reg_off, + "(cur_reg_off=%Ld,abs_off=%Ld,cur_sz=%Ld,reg size=%Ld\n", + off_type_name[op_type], tmp_state_p->cur_reg_off, tmp_state_p->abs_off, tmp_state_p->cur_sz, data_sz); #endif } @@ -204,7 +204,7 @@ static inline int view_state_add_region( /* Set up the abs_off, idx, and cur_reg_off of a view_state for the * tmp_state or the cur_state. */ int ADIOI_init_view_state(int file_ptr_type, - int nprocs, + int nprocs, view_state *view_state_arr, int op_type) { @@ -227,7 +227,7 @@ int ADIOI_init_view_state(int file_ptr_type, default: fprintf(stderr, "op_type invalid\n"); } - + tmp_view_p = &(view_state_arr[i]); tmp_flat_type_p = tmp_view_p->flat_type_p; @@ -235,7 +235,7 @@ int ADIOI_init_view_state(int file_ptr_type, tmp_state_p->abs_off = tmp_view_p->fp_ind; else tmp_state_p->abs_off = tmp_view_p->disp; - + tmp_off_used = 0; /* initialize tmp_state idx */ @@ -244,7 +244,7 @@ int ADIOI_init_view_state(int file_ptr_type, if (file_ptr_type == ADIO_EXPLICIT_OFFSET) tmp_state_p->abs_off += tmp_flat_type_p->indices[tmp_state_p->idx]; - /* Initialize the abs_off by moving into the datatype + /* Initialize the abs_off by moving into the datatype * byte_off bytes. Since we only do this in the beginning, we * make the assumption that pieces are added whole until the last * piece which MAY be partial. */ @@ -252,19 +252,19 @@ int ADIOI_init_view_state(int file_ptr_type, { view_state_add_region( tmp_view_p->byte_off - tmp_off_used, - &(view_state_arr[i]), &st_reg, &tmp_reg_sz, + &(view_state_arr[i]), &st_reg, &tmp_reg_sz, op_type); } - + /* Re-initialize the cur_size so that the abs_off was set to * the proper position while the actual size = 0.*/ tmp_state_p->cur_sz = 0; #ifdef DEBUG1 fprintf(stderr, "init_view_state: %s (idx=%d,byte_off=%Ld," - "abs_off=%Ld,reg_off=%Ld,sz=%Ld)\n", off_type_name[op_type], + "abs_off=%Ld,reg_off=%Ld,sz=%Ld)\n", off_type_name[op_type], i, tmp_view_p->byte_off, tmp_state_p->abs_off, tmp_state_p->cur_reg_off, tmp_view_p->sz); -#endif +#endif } return 0; @@ -277,7 +277,7 @@ static inline int get_next_fr_off(ADIO_File fd, ADIO_Offset fr_st_off, MPI_Datatype *fr_type_p, ADIO_Offset *fr_next_off_p, - ADIO_Offset *fr_max_len_p) + ADIO_Offset *fr_max_len_p) { MPI_Aint fr_extent = -1; ADIO_Offset tmp_off, off_rem; @@ -297,7 +297,7 @@ static inline int get_next_fr_off(ADIO_File fd, return 0; } - /* Calculate how many times to loop through the fr_type + /* Calculate how many times to loop through the fr_type * and where the next fr_off is. */ MPI_Type_extent(*fr_type_p, &fr_extent); tmp_off = off - fr_st_off; @@ -315,12 +315,12 @@ static inline int get_next_fr_off(ADIO_File fd, else if (off_rem < fr_node_p->indices[i] + fr_node_p->blocklens[i]) { *fr_next_off_p = off; - *fr_max_len_p = fr_node_p->blocklens[i] - + *fr_max_len_p = fr_node_p->blocklens[i] - (off_rem - fr_node_p->indices[i]); return off; } } - + /* Shouldn't get here. */ fprintf(stderr, "get_next_fr_off: Couldn't find the correct " "location of the next offset for this file realm.\n"); @@ -340,7 +340,7 @@ static inline int find_next_off(ADIO_File fd, ADIO_Offset *cur_reg_max_len_p) { ADIOI_Flatlist_node *tmp_flat_type_p = NULL; - ADIO_Offset tmp_off = -1, fr_next_off = -1, fr_max_len = -1, + ADIO_Offset tmp_off = -1, fr_next_off = -1, fr_max_len = -1, tmp_fr_max_len = -1; int ret = 0; flatten_state *tmp_state_p = NULL; @@ -364,7 +364,7 @@ static inline int find_next_off(ADIO_File fd, default: fprintf(stderr, "op_type invalid\n"); } - + tmp_flat_type_p = view_state_p->flat_type_p; /* Can we use this proc? */ @@ -372,26 +372,26 @@ static inline int find_next_off(ADIO_File fd, tmp_st_off = 0; tmp_reg_sz = 0; /* If the current region is not within the file realm, advance - * the state until it is and calculate the end of the next file + * the state until it is and calculate the end of the next file * realm in fr_max_len. */ ret = get_next_fr_off(fd, - tmp_state_p->abs_off, + tmp_state_p->abs_off, fr_st_off, fr_type_p, &fr_next_off, &fr_max_len); - + while ((tmp_state_p->abs_off < fr_next_off) && (tmp_state_p->cur_sz != view_state_p->sz)) { - + /* While this might appear to be erroneous at first, * view_state_add_region can only add a single piece at a * time. Therefore, it will never overshoot the beginning * of the next file realm. When it finally does enter the * next file realm it will not be able to go beyond its * first piece. */ - + #ifdef DTYPE_SKIP if (tmp_flat_type_p->count > 1) { /* let's see if we can skip whole datatypes */ @@ -418,7 +418,7 @@ static inline int find_next_off(ADIO_File fd, op_type); ret = get_next_fr_off(fd, - tmp_state_p->abs_off, + tmp_state_p->abs_off, fr_st_off, fr_type_p, &fr_next_off, @@ -446,7 +446,7 @@ static inline int find_next_off(ADIO_File fd, * should return a list of MPI_Datatypes that correspond to client * communication into a collective buffer, a list of corresponding * sizes, and an aggregate MPI_Datatype which will be used as a - * filetype in MPI_File_write/read on the aggregator. */ + * filetype in MPI_File_write/read on the aggregator. */ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, view_state *client_file_view_state_arr, MPI_Datatype *client_comm_dtype_arr, @@ -480,21 +480,21 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, memset(client_comm_sz_arr, 0, nprocs*sizeof(ADIO_Offset)); - if ((client_comm_next_off_arr = (ADIO_Offset *) + if ((client_comm_next_off_arr = (ADIO_Offset *) ADIOI_Malloc(nprocs*sizeof(ADIO_Offset))) == NULL) { fprintf(stderr, "ADIOI_Build_agg_reqs: malloc client_next_off_arr " "failed\n"); return -1; } - + if ((client_ol_ct_arr = (int *) ADIOI_Calloc(nprocs, sizeof(int))) == NULL) { fprintf(stderr, "ADIOI_Build_agg_reqs: " "malloc client_ol_ct_arr failed\n"); return -1; } - if ((client_ol_cur_ct_arr = + if ((client_ol_cur_ct_arr = (int *) ADIOI_Calloc(nprocs, sizeof(int))) == NULL) { fprintf(stderr, "ADIOI_Build_agg_reqs: " @@ -517,9 +517,9 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, /* initialize heap */ ADIOI_Heap_create(&offset_heap, nprocs); offset_heap.size = 0; - + for (j=0; jhints->cb_buffer_size); #endif - + /* We process only contiguous file realm regions if we are * using data sieving. Note that we only do this for * writes since reads can be data sieved across each other @@ -595,23 +595,23 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, #ifdef DEBUG1 fprintf(stderr, "ADIOI_Build_agg_reqs: " "Data sieving file realm end changed from " - "%Ld to %Ld\n", ds_fr_end, + "%Ld to %Ld\n", ds_fr_end, cur_off + cur_reg_max_len); #endif break; } } } - + /* Add up to the end of the file realm or the collective * buffer. */ - if (cur_reg_max_len > (fd->hints->cb_buffer_size - + if (cur_reg_max_len > (fd->hints->cb_buffer_size - tmp_coll_buf_sz)) cur_reg_max_len = fd->hints->cb_buffer_size - tmp_coll_buf_sz; view_state_add_region( cur_reg_max_len, - &(client_file_view_state_arr[cur_off_proc]), + &(client_file_view_state_arr[cur_off_proc]), &st_reg, &act_reg_sz, i); switch(i) @@ -621,14 +621,14 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, * the used part of the collective buffer if the * next region is not adjacent to the previous * region. */ - if (client_comm_next_off_arr[cur_off_proc] != + if (client_comm_next_off_arr[cur_off_proc] != tmp_coll_buf_sz) { (client_ol_ct_arr[cur_off_proc])++; } - client_comm_next_off_arr[cur_off_proc] = + client_comm_next_off_arr[cur_off_proc] = tmp_coll_buf_sz + act_reg_sz; - + if (agg_next_off != st_reg) agg_ol_ct++; agg_next_off = st_reg + act_reg_sz; @@ -638,24 +638,24 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, * the next region is not adjacent to the previous * region. */ next_off_idx = client_ol_cur_ct_arr[cur_off_proc]; - if (client_comm_next_off_arr[cur_off_proc] != + if (client_comm_next_off_arr[cur_off_proc] != tmp_coll_buf_sz) { client_disp_arr[cur_off_proc][next_off_idx] = tmp_coll_buf_sz; - client_blk_arr[cur_off_proc][next_off_idx] = + client_blk_arr[cur_off_proc][next_off_idx] = act_reg_sz; (client_ol_cur_ct_arr[cur_off_proc])++; } else { - client_blk_arr[cur_off_proc][next_off_idx - 1] + client_blk_arr[cur_off_proc][next_off_idx - 1] += act_reg_sz; } client_comm_sz_arr[cur_off_proc] += act_reg_sz; client_comm_next_off_arr[cur_off_proc] = tmp_coll_buf_sz + act_reg_sz; - + /* Add to the aggregator filetype if the next * region is not adjacent to the previous * region. */ @@ -667,7 +667,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, *agg_dtype_offset_p = st_reg; agg_disp_arr[agg_ol_cur_ct] = st_reg - (MPI_Aint) *agg_dtype_offset_p; - agg_blk_arr[agg_ol_cur_ct] = act_reg_sz; + agg_blk_arr[agg_ol_cur_ct] = act_reg_sz; agg_ol_cur_ct++; } else @@ -675,7 +675,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, agg_blk_arr[agg_ol_cur_ct - 1] += act_reg_sz; } agg_next_off = st_reg + act_reg_sz; - + break; default: fprintf(stderr, "ADIOI_Build_agg_reqs: Impossible type\n"); @@ -699,12 +699,12 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, #endif } } - + if (i == TEMP_OFF) { /* Allocate offset-length pairs for creating hindexed * MPI_Datatypes for both the client and the aggregator. */ - if ((client_disp_arr = (MPI_Aint **) + if ((client_disp_arr = (MPI_Aint **) ADIOI_Malloc(nprocs*sizeof(MPI_Aint *))) == NULL) { fprintf(stderr, "ADIOI_Build_agg_reqs: malloc " @@ -718,7 +718,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, fprintf(stderr, "ADIOI_Build_agg_reqs: malloc " "client_blk_arr failed\n"); return -1; - } + } for (j = 0; j < nprocs; j++) { if ((client_disp_arr[j] = (MPI_Aint *) ADIOI_Malloc( @@ -728,7 +728,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, "client_disp_arr[%d] failed\n", j); return -1; } - if ((client_blk_arr[j] = (int *) + if ((client_blk_arr[j] = (int *) ADIOI_Malloc(client_ol_ct_arr[j]*sizeof(int))) == NULL) { ADIOI_Free(client_disp_arr[j]); @@ -737,21 +737,21 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, return -1; } } - - if (agg_ol_ct > 0) + + if (agg_ol_ct > 0) { if ((agg_disp_arr = (MPI_Aint *) ADIOI_Malloc( agg_ol_ct*sizeof(MPI_Aint))) == NULL) { - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_agg_reqs: malloc disp_arr failed\n"); return -1; } - if ((agg_blk_arr = (int *) + if ((agg_blk_arr = (int *) ADIOI_Malloc(agg_ol_ct*sizeof(int))) == NULL) { ADIOI_Free(agg_disp_arr); - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_agg_reqs: malloc blk_arr failed\n"); return -1; } @@ -759,7 +759,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, } ADIOI_Heap_free(&offset_heap); } - + /* Let the clients know if this aggregator is totally finished * with all possible client requests. */ all_done = 1; @@ -788,7 +788,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, if (client_ol_cur_ct_arr[i] != client_ol_ct_arr[i]) { fprintf(stderr, "ADIOI_Build_agg_reqs: ERROR Process %d " - "processed only %d out of %d ol pairs\n", i, + "processed only %d out of %d ol pairs\n", i, client_ol_cur_ct_arr[i], client_ol_ct_arr[i]); return -1; @@ -817,13 +817,13 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, fprintf(stderr, "ADIOI_Build_agg_reqs: p %d (off,len) = ", i); for (j = 0; j < client_ol_ct_arr[i]; j++) { - fprintf(stderr, "[%d](%d,%d) ", j, + fprintf(stderr, "[%d](%d,%d) ", j, client_disp_arr[i][j], client_blk_arr[i][j]); } fprintf(stderr, "\n"); } - } + } if (agg_ol_ct) { fprintf(stderr, "ADIOI_Build_agg_reqs:agg_type(off,len)="); for (i = 0; i < agg_ol_ct; i++) @@ -845,7 +845,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, if (client_comm_sz_arr[i] > 0) { MPI_Type_hindexed(client_ol_ct_arr[i], client_blk_arr[i], - client_disp_arr[i], MPI_BYTE, + client_disp_arr[i], MPI_BYTE, &(client_comm_dtype_arr[i])); MPI_Type_commit(&(client_comm_dtype_arr[i])); } @@ -864,7 +864,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, MPI_Type_contiguous (agg_blk_arr[0], MPI_BYTE, agg_dtype_p); else if (agg_ol_ct > 1) MPI_Type_hindexed(agg_ol_ct, agg_blk_arr, agg_disp_arr, MPI_BYTE, - agg_dtype_p); + agg_dtype_p); MPI_Type_commit(agg_dtype_p); @@ -884,7 +884,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, * then call this function, which will generate the comm datatypes for * each aggregator (agg_comm_dtype_arr) in the upcoming * MPI_Alltoallw() */ -int ADIOI_Build_client_reqs(ADIO_File fd, +int ADIOI_Build_client_reqs(ADIO_File fd, int nprocs, view_state *my_mem_view_state_arr, view_state *agg_file_view_state_arr, @@ -928,7 +928,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, fprintf(stderr, "\n"); } #endif - + if ((agg_mem_next_off_arr = (ADIO_Offset *) ADIOI_Malloc( nprocs*sizeof(ADIO_Offset))) == NULL) { @@ -937,7 +937,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, return -1; } - if ((agg_comm_cur_sz_arr = (ADIO_Offset *) + if ((agg_comm_cur_sz_arr = (ADIO_Offset *) ADIOI_Malloc(nprocs*sizeof(ADIO_Offset))) == NULL) { fprintf(stderr, "ADIOI_Build_client_reqs: malloc agg_comm_cur_sz_arr" @@ -964,7 +964,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, if (agg_comm_sz_arr[i] > 0) total_agg_comm_sz += agg_comm_sz_arr[i]; } - + /* On the first pass see how many offset-length pairs are * necessary for each aggregator. Then allocate the correct * amount of offset-length pairs for handling each aggregator's @@ -984,11 +984,11 @@ int ADIOI_Build_client_reqs(ADIO_File fd, { tmp_agg_fr_idx = ADIOI_Agg_idx(j, fd); assert(tmp_agg_fr_idx < fd->hints->cb_nodes); - + /* If this process is not an aggregator or we have * finished all the bytes for this aggregator, move * along. */ - if (tmp_agg_fr_idx < 0 || + if (tmp_agg_fr_idx < 0 || agg_comm_cur_sz_arr[j] == agg_comm_sz_arr[j]) { continue; @@ -1002,9 +1002,9 @@ int ADIOI_Build_client_reqs(ADIO_File fd, &tmp_cur_off, &tmp_cur_reg_max_len); if (tmp_cur_off == -1) - continue; + continue; - if ((cur_off == -1) || + if ((cur_off == -1) || (cur_off > tmp_cur_off)) { cur_off_proc = j; @@ -1014,23 +1014,23 @@ int ADIOI_Build_client_reqs(ADIO_File fd, } assert(cur_off_proc != -1); - + /* Add up to the end of the file realm or as many bytes * are left for this particular aggregator in the client's * filetype */ - if (cur_reg_max_len > agg_comm_sz_arr[cur_off_proc] - + if (cur_reg_max_len > agg_comm_sz_arr[cur_off_proc] - agg_comm_cur_sz_arr[cur_off_proc]) { - cur_reg_max_len = agg_comm_sz_arr[cur_off_proc] - + cur_reg_max_len = agg_comm_sz_arr[cur_off_proc] - agg_comm_cur_sz_arr[cur_off_proc]; } assert(cur_reg_max_len > 0); - + view_state_add_region( cur_reg_max_len, &(agg_file_view_state_arr[cur_off_proc]), &st_reg, &act_reg_sz, i); - + #ifdef DEBUG2 fprintf(stderr, "ADIOI_Build_client_reqs: %s File region" " (proc=%d,off=%Ld,sz=%Ld)\n", @@ -1046,7 +1046,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, tmp_mem_state_p = &(my_mem_view_state_arr[cur_off_proc]); assert(view_state_get_cur_sz(tmp_file_state_p, i) - act_reg_sz >= view_state_get_cur_sz(tmp_mem_state_p, i)); - while (view_state_get_cur_sz(tmp_file_state_p, i) - act_reg_sz != + while (view_state_get_cur_sz(tmp_file_state_p, i) - act_reg_sz != view_state_get_cur_sz(tmp_mem_state_p, i)) { ADIO_Offset fill_st_reg = -1, fill_reg_sz = -1; @@ -1057,7 +1057,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, &fill_st_reg, &fill_reg_sz, i); } - + /* Based on how large the act_reg_sz 1. Figure out how * many memory offset-length pairs are necessary. 2. Set * the offset-length pairs. */ @@ -1067,7 +1067,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, view_state_add_region( act_reg_sz - tmp_reg_sz, tmp_mem_state_p, - &agg_mem_st_reg, &agg_mem_act_reg_sz, + &agg_mem_st_reg, &agg_mem_act_reg_sz, i); tmp_reg_sz += agg_mem_act_reg_sz; @@ -1078,19 +1078,19 @@ int ADIOI_Build_client_reqs(ADIO_File fd, agg_mem_st_reg, agg_mem_act_reg_sz); #endif agg_comm_cur_sz_arr[cur_off_proc] += agg_mem_act_reg_sz; - cur_total_agg_comm_sz += agg_mem_act_reg_sz; + cur_total_agg_comm_sz += agg_mem_act_reg_sz; switch(i) { case TEMP_OFF: /* Increment the ol list count a particular * aggregator if next region is not adjacent * to the previous region. */ - if (agg_mem_next_off_arr[cur_off_proc] != + if (agg_mem_next_off_arr[cur_off_proc] != agg_mem_st_reg) { agg_ol_ct_arr[cur_off_proc]++; } - agg_mem_next_off_arr[cur_off_proc] = + agg_mem_next_off_arr[cur_off_proc] = agg_mem_st_reg + agg_mem_act_reg_sz; break; case REAL_OFF: @@ -1098,12 +1098,12 @@ int ADIOI_Build_client_reqs(ADIO_File fd, * map to each aggregator, coaslescing if * possible. */ agg_next_off_idx = agg_ol_cur_ct_arr[cur_off_proc]; - if (agg_mem_next_off_arr[cur_off_proc] != + if (agg_mem_next_off_arr[cur_off_proc] != agg_mem_st_reg) { - agg_disp_arr[cur_off_proc][agg_next_off_idx] = + agg_disp_arr[cur_off_proc][agg_next_off_idx] = agg_mem_st_reg; - agg_blk_arr[cur_off_proc][agg_next_off_idx] = + agg_blk_arr[cur_off_proc][agg_next_off_idx] = agg_mem_act_reg_sz; (agg_ol_cur_ct_arr[cur_off_proc])++; } @@ -1112,7 +1112,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, agg_blk_arr[cur_off_proc][agg_next_off_idx - 1] += agg_mem_act_reg_sz; } - agg_mem_next_off_arr[cur_off_proc] = + agg_mem_next_off_arr[cur_off_proc] = agg_mem_st_reg + agg_mem_act_reg_sz; break; default: @@ -1121,38 +1121,38 @@ int ADIOI_Build_client_reqs(ADIO_File fd, } } } - + /* On the first pass, allocate the memory structures for * creating the MPI_hindexed type. */ if (i == TEMP_OFF) - { + { /* Allocate offset-length pairs for creating hindexed * MPI_Datatypes for each aggregator */ - if ((agg_disp_arr = (MPI_Aint **) + if ((agg_disp_arr = (MPI_Aint **) ADIOI_Malloc(nprocs*sizeof(MPI_Aint *))) == NULL) { - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_reqs: malloc agg_disp_arr failed\n"); return -1; } - if ((agg_blk_arr = (int **) ADIOI_Malloc(nprocs*sizeof(int *))) + if ((agg_blk_arr = (int **) ADIOI_Malloc(nprocs*sizeof(int *))) == NULL) { ADIOI_Free(agg_disp_arr); - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_reqs: malloc agg_blk_arr failed\n"); return -1; - } + } for (j = 0; j < nprocs; j++) { - if ((agg_disp_arr[j] = (MPI_Aint *) + if ((agg_disp_arr[j] = (MPI_Aint *) ADIOI_Malloc(agg_ol_ct_arr[j]*sizeof(MPI_Aint))) == NULL) { fprintf(stderr, "ADIOI_Build_client_reqs: malloc " "agg_disp_arr[%d] failed\n", j); return -1; } - if ((agg_blk_arr[j] = (int *) + if ((agg_blk_arr[j] = (int *) ADIOI_Malloc(agg_ol_ct_arr[j]*sizeof(int))) == NULL) { ADIOI_Free(agg_disp_arr[j]); @@ -1224,7 +1224,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd, ADIOI_Free(agg_ol_cur_ct_arr); #ifdef AGGREGATION_PROFILE MPE_Log_event (5019, 0, NULL); -#endif +#endif return 0; } /* ADIOI_Build_client_pre_req allows a client to calculate the memtype @@ -1265,12 +1265,12 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, return -1; } - if (agg_file_view_state_p->cur_state.cur_sz == + if (agg_file_view_state_p->cur_state.cur_sz == agg_file_view_state_p->sz || max_pre_req_sz <= 0 || max_ol_ct <= 0) { #ifdef DEBUG1 - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_pre_req: Nothing to preprocess\n"); #endif return 0; @@ -1282,13 +1282,13 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, (my_mem_view_state_p->pre_ol_ct >= max_ol_ct)) { #ifdef DEBUG1 - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_pre_req: Old values surpass new " "pre_req values\n"); #endif return 0; } - + /* General idea is to first advance the filetype to the file realm * and then the memtype to the filetype. The memtype is advanced * further by peeking at the filetype and then the filetype is @@ -1326,18 +1326,18 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, { cur_sz = my_mem_view_state_p->pre_sz; agg_ol_cur_ct = my_mem_view_state_p->pre_ol_ct; - + /* Copy the old data to the new data, freeing the old * arrays */ - memcpy(my_mem_view_state_p->pre_disp_arr, tmp_disp_arr, + memcpy(my_mem_view_state_p->pre_disp_arr, tmp_disp_arr, my_mem_view_state_p->pre_ol_ct * sizeof(MPI_Aint)); - memcpy(my_mem_view_state_p->pre_blk_arr, tmp_blk_arr, + memcpy(my_mem_view_state_p->pre_blk_arr, tmp_blk_arr, my_mem_view_state_p->pre_ol_ct * sizeof(int)); ADIOI_Free(tmp_disp_arr); ADIOI_Free(tmp_blk_arr); - agg_mem_next_off = + agg_mem_next_off = my_mem_view_state_p->pre_disp_arr[agg_ol_cur_ct - 1] + my_mem_view_state_p->pre_blk_arr[agg_ol_cur_ct - 1]; } @@ -1345,10 +1345,10 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, { cur_sz = 0; } - + /* Max_pre_req_sz may be larger than the amount of data left * to preprocess */ - if (max_pre_req_sz - cur_sz > + if (max_pre_req_sz - cur_sz > agg_file_view_state_p->sz - tmp_file_state_p->cur_sz) { max_sz = cur_sz + @@ -1356,12 +1356,12 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, } else max_sz = max_pre_req_sz; - + assert(cur_sz != max_sz); #ifdef DEBUG1 - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_pre_req: (cur_sz=%Ld,agg_ol_ct=%d," - "agg_mem_next_off=%Ld,max_sz=%Ld,max_ol_ct=%d)\n", + "agg_mem_next_off=%Ld,max_sz=%Ld,max_ol_ct=%d)\n", cur_sz, agg_ol_ct, agg_mem_next_off, max_sz, max_ol_ct); #endif while (cur_sz < max_sz) @@ -1372,7 +1372,7 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, i, &cur_off, &cur_reg_max_len); - + /* find_next_off may show that the file_view_state is done * even if cur_sz != max_sz since find_next_off may * advance the file_view_state to the end here and realize @@ -1381,7 +1381,7 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, break; assert(cur_off != -1); - + /* Before translating the file regions to memory regions, * we first must advance to the proper point in the * mem_view_state for this aggregator to match the @@ -1417,10 +1417,10 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, * overstepped the min(end of the current piece in the * file view, end of the file realm, data left in * max_sz) */ - - if (cur_reg_max_len > + + if (cur_reg_max_len > view_state_get_next_len(agg_file_view_state_p, i)) - cur_reg_max_len = + cur_reg_max_len = view_state_get_next_len(agg_file_view_state_p, i); if (cur_reg_max_len > max_sz - cur_sz) @@ -1433,20 +1433,20 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, * allowed */ act_reg_sz = 0; exit_loop = 0; - while ((act_reg_sz < cur_reg_max_len) && + while ((act_reg_sz < cur_reg_max_len) && (exit_loop == 0)) { view_state_add_region( cur_reg_max_len - act_reg_sz, my_mem_view_state_p, - &agg_mem_st_reg, &agg_mem_act_reg_sz, + &agg_mem_st_reg, &agg_mem_act_reg_sz, i); act_reg_sz += agg_mem_act_reg_sz; - + #ifdef DEBUG2 fprintf(stderr, "ADIOI_Build_client_pre_req: %s Mem region" "(proc=%d,off=%Ld,sz=%Ld)\n", - off_type_name[i], agg_rank, agg_mem_st_reg, + off_type_name[i], agg_rank, agg_mem_st_reg, agg_mem_act_reg_sz); #endif switch(i) @@ -1461,7 +1461,7 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, if (agg_ol_ct == max_ol_ct) exit_loop = 1; } - agg_mem_next_off = + agg_mem_next_off = agg_mem_st_reg + agg_mem_act_reg_sz; break; case REAL_OFF: @@ -1472,10 +1472,10 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, if (agg_mem_next_off != agg_mem_st_reg) { my_mem_view_state_p-> - pre_disp_arr[agg_next_off_idx] = + pre_disp_arr[agg_next_off_idx] = agg_mem_st_reg; my_mem_view_state_p-> - pre_blk_arr[agg_next_off_idx] = + pre_blk_arr[agg_next_off_idx] = agg_mem_act_reg_sz; agg_ol_cur_ct++; if (agg_ol_cur_ct == agg_ol_ct) @@ -1487,7 +1487,7 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, pre_blk_arr[agg_next_off_idx - 1] += agg_mem_act_reg_sz; } - agg_mem_next_off = + agg_mem_next_off = agg_mem_st_reg + agg_mem_act_reg_sz; break; default: @@ -1515,10 +1515,10 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, "view_state_add_region failed to match the memtype\n"); return -1; } - + cur_sz += act_reg_sz; } - + /* On the first pass, allocate the memory structures for * storing the preprocessed information */ if (i == TEMP_OFF) @@ -1531,7 +1531,7 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, (long int)agg_ol_ct * sizeof(MPI_Aint)); return -1; } - if ((my_mem_view_state_p->pre_blk_arr = (int *) + if ((my_mem_view_state_p->pre_blk_arr = (int *) ADIOI_Malloc(agg_ol_ct * sizeof(int))) == NULL) { ADIOI_Free(my_mem_view_state_p->pre_disp_arr); @@ -1559,8 +1559,8 @@ int ADIOI_Build_client_pre_req(ADIO_File fd, "(off,len) = \n", agg_rank, my_mem_view_state_p->pre_sz); for (i = 0; i < my_mem_view_state_p->pre_ol_ct; i++) { - fprintf(stderr, "[%d](%d,%d) ", i, - my_mem_view_state_p->pre_disp_arr[i], + fprintf(stderr, "[%d](%d,%d) ", i, + my_mem_view_state_p->pre_disp_arr[i], my_mem_view_state_p->pre_blk_arr[i]); if (i % 5 == 0 && i != 0) fprintf(stderr, "\n"); @@ -1605,7 +1605,7 @@ static int process_pre_req(ADIO_File fd, { for (i = 0; i < my_mem_view_state_p->pre_ol_ct; i++) { - if ((my_mem_view_state_p->pre_blk_arr[i] + + if ((my_mem_view_state_p->pre_blk_arr[i] + *agg_comm_pre_sz_p) > *agg_comm_sz_p) { has_partial = 1; @@ -1617,39 +1617,39 @@ static int process_pre_req(ADIO_File fd, else if ((my_mem_view_state_p->pre_blk_arr[i] + *agg_comm_pre_sz_p) == *agg_comm_sz_p) { - *agg_comm_pre_sz_p += + *agg_comm_pre_sz_p += my_mem_view_state_p->pre_blk_arr[i]; i++; break; } else - *agg_comm_pre_sz_p += + *agg_comm_pre_sz_p += my_mem_view_state_p->pre_blk_arr[i]; } - + if (has_partial == 1) { - *agg_mem_next_off_p = - my_mem_view_state_p->pre_disp_arr[i - 1] + + *agg_mem_next_off_p = + my_mem_view_state_p->pre_disp_arr[i - 1] + partial_len; } else { - *agg_mem_next_off_p = - my_mem_view_state_p->pre_disp_arr[i - 1] + + *agg_mem_next_off_p = + my_mem_view_state_p->pre_disp_arr[i - 1] + my_mem_view_state_p->pre_blk_arr[i - 1]; } - + *agg_comm_cur_sz_p = *agg_comm_pre_sz_p; *agg_ol_ct_p = i; - + } else /* Use all the precalculated data */ { *agg_comm_pre_sz_p = my_mem_view_state_p->pre_sz; *agg_comm_cur_sz_p = *agg_comm_pre_sz_p; *agg_ol_ct_p = my_mem_view_state_p->pre_ol_ct; - *agg_mem_next_off_p = + *agg_mem_next_off_p = my_mem_view_state_p->pre_disp_arr[ my_mem_view_state_p->pre_ol_ct - 1] + my_mem_view_state_p->pre_blk_arr[ @@ -1669,8 +1669,8 @@ static int process_pre_req(ADIO_File fd, { agg_disp_arr[i] = my_mem_view_state_p->pre_disp_arr[i]; agg_blk_arr[i] = my_mem_view_state_p->pre_blk_arr[i]; - - if ((my_mem_view_state_p->pre_blk_arr[i] + + + if ((my_mem_view_state_p->pre_blk_arr[i] + tmp_agg_comm_pre_sz) > *agg_comm_pre_sz_p) { has_partial = 1; @@ -1678,7 +1678,7 @@ static int process_pre_req(ADIO_File fd, tmp_agg_comm_pre_sz = *agg_comm_pre_sz_p; partial_disp = my_mem_view_state_p->pre_disp_arr[i] + agg_blk_arr[i]; - partial_len = my_mem_view_state_p->pre_blk_arr[i] - + partial_len = my_mem_view_state_p->pre_blk_arr[i] - agg_blk_arr[i]; i++; break; @@ -1686,7 +1686,7 @@ static int process_pre_req(ADIO_File fd, else if ((my_mem_view_state_p->pre_blk_arr[i] + tmp_agg_comm_pre_sz) == *agg_comm_pre_sz_p) { - tmp_agg_comm_pre_sz += + tmp_agg_comm_pre_sz += my_mem_view_state_p->pre_blk_arr[i]; i++; break; @@ -1698,15 +1698,15 @@ static int process_pre_req(ADIO_File fd, *agg_mem_next_off_p = agg_disp_arr[i - 1] + agg_blk_arr[i - 1]; *agg_ol_cur_ct_p = i; *agg_comm_cur_sz_p = *agg_comm_pre_sz_p; - - /* Clean up the ol pairs we used */ + + /* Clean up the ol pairs we used */ if ((i < my_mem_view_state_p->pre_ol_ct) || (has_partial == 1)) { - int remain_ol_ct = + int remain_ol_ct = my_mem_view_state_p->pre_ol_ct - i + has_partial; MPI_Aint *new_pre_disp_arr = NULL; int *new_pre_blk_arr = NULL; - + if ((new_pre_disp_arr = (MPI_Aint *) ADIOI_Malloc(remain_ol_ct * sizeof(MPI_Aint))) == NULL) { @@ -1721,14 +1721,14 @@ static int process_pre_req(ADIO_File fd, "new_pre_blk_arr failed\n"); return -1; } - - memcpy(new_pre_disp_arr, + + memcpy(new_pre_disp_arr, &(my_mem_view_state_p->pre_disp_arr[i - has_partial]), remain_ol_ct * sizeof(MPI_Aint)); - memcpy(new_pre_blk_arr, + memcpy(new_pre_blk_arr, &(my_mem_view_state_p->pre_blk_arr[i - has_partial]), remain_ol_ct * sizeof(int)); - + /* Set the partial len of the first piece */ if (has_partial == 1) { @@ -1737,10 +1737,10 @@ static int process_pre_req(ADIO_File fd, new_pre_disp_arr[0] = partial_disp; new_pre_blk_arr[0] = partial_len; } - + ADIOI_Free(my_mem_view_state_p->pre_disp_arr); ADIOI_Free(my_mem_view_state_p->pre_blk_arr); - + my_mem_view_state_p->pre_disp_arr = new_pre_disp_arr; my_mem_view_state_p->pre_blk_arr = new_pre_blk_arr; my_mem_view_state_p->pre_ol_ct = remain_ol_ct; @@ -1750,7 +1750,7 @@ static int process_pre_req(ADIO_File fd, { ADIOI_Free(my_mem_view_state_p->pre_disp_arr); ADIOI_Free(my_mem_view_state_p->pre_blk_arr); - + my_mem_view_state_p->pre_disp_arr = NULL; my_mem_view_state_p->pre_blk_arr = NULL; my_mem_view_state_p->pre_ol_ct = 0; @@ -1760,7 +1760,7 @@ static int process_pre_req(ADIO_File fd, fprintf(stderr, "process_pre_req: REAL_OFF " "agg_comm_pre_sz=%Ld,agg_comm_cur_sz=%Ld,agg_ol_ct=%d," "agg_ol_cur_ct=%d\n", - *agg_comm_pre_sz_p, *agg_comm_cur_sz_p, *agg_ol_ct_p, + *agg_comm_pre_sz_p, *agg_comm_cur_sz_p, *agg_ol_ct_p, *agg_ol_cur_ct_p); #endif break; @@ -1814,7 +1814,7 @@ int ADIOI_Build_client_req(ADIO_File fd, fprintf(stderr, "ADIOI_Build_client_req:(agg=%d,size_req=%Ld)\n", agg_idx, agg_comm_sz); #endif - + /* On the first pass see how many offset-length pairs are * necessary for each aggregator. Then allocate the correct * amount of offset-length pairs for handling each aggregator's @@ -1859,18 +1859,18 @@ int ADIOI_Build_client_req(ADIO_File fd, &agg_ol_ct, &agg_mem_next_off); } - + while (agg_comm_cur_sz < agg_comm_sz) - { + { find_next_off(fd, agg_file_view_state_p, fr_st_off_arr[agg_idx], &(fr_type_arr[agg_idx]), i, &cur_off, &cur_reg_max_len); - + assert(cur_off != -1); - + /* Add up to the end of the file realm or as many bytes * are left for this particular aggregator in the client's * filetype */ @@ -1879,27 +1879,27 @@ int ADIOI_Build_client_req(ADIO_File fd, cur_reg_max_len = agg_comm_sz - agg_comm_cur_sz; } assert(cur_reg_max_len > 0); - + view_state_add_region( cur_reg_max_len, agg_file_view_state_p, &st_reg, &act_reg_sz, i); - + #ifdef DEBUG2 fprintf(stderr, "ADIOI_Build_client_req: %s File region" " (proc=%d,off=%Ld,sz=%Ld)\n", off_type_name[i], agg_rank, cur_off, act_reg_sz); #endif - + /* Before translating the file regions to memory regions, * we first must advance to the proper point in the * mem_view_state for this aggregator to match the * file_view_state. */ - - assert(tmp_file_state_p->cur_sz - act_reg_sz >= + + assert(tmp_file_state_p->cur_sz - act_reg_sz >= tmp_mem_state_p->cur_sz); - - while (tmp_file_state_p->cur_sz - act_reg_sz != + + while (tmp_file_state_p->cur_sz - act_reg_sz != tmp_mem_state_p->cur_sz) { ADIO_Offset fill_st_reg = -1, fill_reg_sz = -1; @@ -1922,13 +1922,13 @@ int ADIOI_Build_client_req(ADIO_File fd, } #endif view_state_add_region( - tmp_file_state_p->cur_sz - + tmp_file_state_p->cur_sz - act_reg_sz - tmp_mem_state_p->cur_sz, my_mem_view_state_p, &fill_st_reg, &fill_reg_sz, i); } - + /* Based on how large the act_reg_sz is, first figure * out how many memory offset-length pairs are * necessary and then set the offset-length pairs. */ @@ -1938,14 +1938,14 @@ int ADIOI_Build_client_req(ADIO_File fd, view_state_add_region( act_reg_sz - tmp_reg_sz, my_mem_view_state_p, - &agg_mem_st_reg, &agg_mem_act_reg_sz, + &agg_mem_st_reg, &agg_mem_act_reg_sz, i); tmp_reg_sz += agg_mem_act_reg_sz; - + #ifdef DEBUG2 fprintf(stderr, "ADIOI_Build_client_req: %s Mem region" "(off=%Ld,sz=%Ld)\n", - off_type_name[i], agg_mem_st_reg, + off_type_name[i], agg_mem_st_reg, agg_mem_act_reg_sz); #endif agg_comm_cur_sz += agg_mem_act_reg_sz; @@ -1959,7 +1959,7 @@ int ADIOI_Build_client_req(ADIO_File fd, { agg_ol_ct++; } - agg_mem_next_off = + agg_mem_next_off = agg_mem_st_reg + agg_mem_act_reg_sz; break; case REAL_OFF: @@ -1969,9 +1969,9 @@ int ADIOI_Build_client_req(ADIO_File fd, agg_next_off_idx = agg_ol_cur_ct; if (agg_mem_next_off != agg_mem_st_reg) { - agg_disp_arr[agg_next_off_idx] = + agg_disp_arr[agg_next_off_idx] = agg_mem_st_reg; - agg_blk_arr[agg_next_off_idx] = + agg_blk_arr[agg_next_off_idx] = agg_mem_act_reg_sz; agg_ol_cur_ct++; } @@ -1980,7 +1980,7 @@ int ADIOI_Build_client_req(ADIO_File fd, agg_blk_arr[agg_next_off_idx - 1] += agg_mem_act_reg_sz; } - agg_mem_next_off = + agg_mem_next_off = agg_mem_st_reg + agg_mem_act_reg_sz; break; default: @@ -1989,14 +1989,14 @@ int ADIOI_Build_client_req(ADIO_File fd, } } } - + /* On the first pass, allocate the memory structures for * creating the MPI_hindexed type. */ if (i == TEMP_OFF) - { + { /* Allocate offset-length pairs for creating hindexed * MPI_Datatypes for each aggregator */ - if ((agg_disp_arr = (MPI_Aint *) + if ((agg_disp_arr = (MPI_Aint *) ADIOI_Malloc(agg_ol_ct * sizeof(MPI_Aint))) == NULL) { fprintf(stderr, "ADIOI_Build_client_req: malloc " @@ -2004,7 +2004,7 @@ int ADIOI_Build_client_req(ADIO_File fd, (long int)agg_ol_ct * sizeof(MPI_Aint)); return -1; } - if ((agg_blk_arr = (int *) + if ((agg_blk_arr = (int *) ADIOI_Malloc(agg_ol_ct * sizeof(int))) == NULL) { ADIOI_Free(agg_disp_arr); @@ -2018,7 +2018,7 @@ int ADIOI_Build_client_req(ADIO_File fd, assert(agg_ol_ct == agg_ol_cur_ct); #ifdef DEBUG1 - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_req:(agg=%d,cur_ol_count=%d=ol_count=%d)\n", agg_rank, agg_ol_cur_ct, agg_ol_ct); #endif @@ -2029,7 +2029,7 @@ int ADIOI_Build_client_req(ADIO_File fd, fprintf(stderr, "ADIOI_Build_client_req: p %d (off,len) = ", agg_rank); for (i = 0; i < agg_ol_ct; i++) { - fprintf(stderr, "[%d](%d,%d) ", i, + fprintf(stderr, "[%d](%d,%d) ", i, agg_disp_arr[i], agg_blk_arr[i]); if (i % 5 == 0 && i != 0) fprintf(stderr, "\n"); @@ -2038,7 +2038,7 @@ int ADIOI_Build_client_req(ADIO_File fd, } #endif #ifdef DEBUG1 - fprintf(stderr, + fprintf(stderr, "ADIOI_Build_client_req:(agg=%d,pre_ol_count=%d)\n", agg_idx, my_mem_view_state_p->pre_ol_ct); #endif @@ -2046,12 +2046,12 @@ int ADIOI_Build_client_req(ADIO_File fd, #ifdef DEBUG2 if (my_mem_view_state_p->pre_sz > 0) { - fprintf(stderr, "ADIOI_Build_client_req: p %d pre(off,len) = ", + fprintf(stderr, "ADIOI_Build_client_req: p %d pre(off,len) = ", agg_idx); for (i = 0; i < my_mem_view_state_p->pre_ol_ct; i++) { - fprintf(stderr, "[%d](%d,%d) ", i, - my_mem_view_state_p->pre_disp_arr[i], + fprintf(stderr, "[%d](%d,%d) ", i, + my_mem_view_state_p->pre_disp_arr[i], my_mem_view_state_p->pre_blk_arr[i]); if (i % 5 == 0 && i != 0) fprintf(stderr, "\n"); @@ -2077,7 +2077,7 @@ int ADIOI_Build_client_req(ADIO_File fd, #ifdef AGGREGATION_PROFILE MPE_Log_event (5019, 0, NULL); -#endif +#endif return 0; } diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_coll_exch_new.c b/ompi/mca/io/romio314/romio/adio/common/ad_coll_exch_new.c index d121589d69e..abe7d74465c 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_coll_exch_new.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_coll_exch_new.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -42,7 +42,7 @@ void ADIOI_Print_flatlist_node(ADIOI_Flatlist_node *flatlist_node_p) fprintf(stderr, "print flatlist node of NULL ptr\n"); return; } - fprintf(stderr, "print flatlist node count = %d (idx,blocklen)\n", + fprintf(stderr, "print flatlist node count = %d (idx,blocklen)\n", (int)flatlist_node_p->count); for (i = 0; i < flatlist_node_p->count; i++) { @@ -64,7 +64,7 @@ ADIOI_Flatlist_node * ADIOI_Add_contig_flattened(MPI_Datatype contig_type) { MPI_Count contig_type_sz = -1; ADIOI_Flatlist_node *flat_node_p = ADIOI_Flatlist; - + /* Add contig type to the end of the list if it doesn't already * exist. */ while (flat_node_p->next) @@ -88,7 +88,7 @@ ADIOI_Flatlist_node * ADIOI_Add_contig_flattened(MPI_Datatype contig_type) { fprintf(stderr, "ADIOI_Flatlist_node: malloc blocklens failed\n"); } - if ((flat_node_p->indices = (ADIO_Offset *) + if ((flat_node_p->indices = (ADIO_Offset *) ADIOI_Malloc(sizeof(ADIO_Offset))) == NULL) { fprintf(stderr, "ADIOI_Flatlist_node: malloc indices failed\n"); @@ -167,7 +167,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, else { flat_file_p = ADIOI_Flatlist; while (flat_file_p->type != fd->filetype) - flat_file_p = flat_file_p->next; + flat_file_p = flat_file_p->next; } disp_off_sz_ext_typesz[0] = fd->fp_ind; @@ -186,14 +186,14 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, /* only aggregators receive data */ if (fd->is_agg) { - recv_count_arr = ADIOI_Calloc(nprocs, + recv_count_arr = ADIOI_Calloc(nprocs, sizeof(amount_and_extra_data_t)); recv_req_arr = ADIOI_Malloc (nprocs * sizeof(MPI_Request)); for (i=0; i < nprocs; i++) MPI_Irecv (&recv_count_arr[i], sizeof(amount_and_extra_data_t), MPI_BYTE, i, COUNT_EXCH, fd->comm, &recv_req_arr[i]); } - + /* only send data to aggregators */ send_req_arr = ADIOI_Calloc (fd->hints->cb_nodes, sizeof(MPI_Request)); for (i=0; i < fd->hints->cb_nodes; i++) { @@ -210,7 +210,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, } } - + /* Every client has to build mem and file view_states for each aggregator. * We initialize their values here. and we also initialize * send_count_arr */ @@ -241,7 +241,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, 1, &(my_mem_view_state_arr[tmp_agg_idx]), REAL_OFF); - + memset(&(agg_file_view_state_arr[tmp_agg_idx]), 0, sizeof(view_state)); agg_file_view_state_arr[tmp_agg_idx].fp_ind = disp_off_sz_ext_typesz[0]; @@ -283,10 +283,10 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, fprintf(stderr, "my own flattened filetype: "); ADIOI_Print_flatlist_node(flat_file_p); #endif - + if (fd->hints->cb_alltoall != ADIOI_HINT_DISABLE) { ret = MPI_Alltoall(send_count_arr, sizeof(amount_and_extra_data_t), - MPI_BYTE, + MPI_BYTE, recv_count_arr, sizeof(amount_and_extra_data_t), MPI_BYTE, fd->comm); if (ret != MPI_SUCCESS) @@ -353,22 +353,22 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, if (fd->is_agg) { if (recv_count_arr[i].count > 0) { - if ((client_file_view_state_arr[i].flat_type_p = + if ((client_file_view_state_arr[i].flat_type_p = (ADIOI_Flatlist_node *) ADIOI_Malloc( sizeof(ADIOI_Flatlist_node))) == NULL) { fprintf(stderr, "ADIOI_Exchange_file_views: malloc " "flat_type_p failed\n"); } - client_file_view_state_arr[i].flat_type_p->count = + client_file_view_state_arr[i].flat_type_p->count = recv_count_arr[i].count; - client_file_view_state_arr[i].flat_type_p->indices = - (ADIO_Offset *) ADIOI_Calloc(recv_count_arr[i].count, + client_file_view_state_arr[i].flat_type_p->indices = + (ADIO_Offset *) ADIOI_Calloc(recv_count_arr[i].count, sizeof(ADIO_Offset)); client_file_view_state_arr[i].flat_type_p->blocklens = - (ADIO_Offset *) ADIOI_Calloc(recv_count_arr[i].count, + (ADIO_Offset *) ADIOI_Calloc(recv_count_arr[i].count, sizeof(ADIO_Offset)); - + /* Copy the extra data out of the stuff we Alltoall'd */ memcpy (&client_file_view_state_arr[i].fp_ind, &recv_count_arr[i].fp_ind, @@ -379,11 +379,11 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, } } - /* Since ADIOI_Calloc may do other things we add the +1 + /* Since ADIOI_Calloc may do other things we add the +1 * to avoid a 0-size malloc */ send_req_arr = (MPI_Request *) ADIOI_Calloc(2*(send_req_arr_sz)+1, sizeof(MPI_Request)); - + j = 0; if (recv_req_arr_sz > 0) { assert (fd->is_agg); @@ -392,7 +392,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, for (i = 0; i < nprocs; i++) { if (recv_count_arr[i].count > 0) { MPI_Irecv(client_file_view_state_arr[i].flat_type_p->indices, - recv_count_arr[i].count, ADIO_OFFSET, i, + recv_count_arr[i].count, ADIO_OFFSET, i, INDICES, fd->comm, &recv_req_arr[j]); j++; MPI_Irecv(client_file_view_state_arr[i].flat_type_p->blocklens, @@ -411,7 +411,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, send_count_arr[i].count, ADIO_OFFSET, i, INDICES, fd->comm, &send_req_arr[j]); j++; - MPI_Isend(flat_file_p->blocklens, + MPI_Isend(flat_file_p->blocklens, send_count_arr[i].count, ADIO_OFFSET, i, BLOCK_LENS, fd->comm, &send_req_arr[j]); j++; @@ -426,7 +426,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, fd->hints->ranklist[i], INDICES, fd->comm, &send_req_arr[j]); j++; - MPI_Isend(flat_file_p->blocklens, + MPI_Isend(flat_file_p->blocklens, send_count_arr[i].count, ADIO_OFFSET, fd->hints->ranklist[i], BLOCK_LENS, fd->comm, &send_req_arr[j]); @@ -435,9 +435,9 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, } } - /* Since ADIOI_Malloc may do other things we add the +1 - * to avoid a 0-size malloc */ - statuses = (MPI_Status *) + /* Since ADIOI_Malloc may do other things we add the +1 + * to avoid a 0-size malloc */ + statuses = (MPI_Status *) ADIOI_Malloc(1 + 2 * ADIOI_MAX(send_req_arr_sz,recv_req_arr_sz) * sizeof(MPI_Status)); @@ -479,19 +479,19 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, client_file_view_state_arr[i].sz, client_file_view_state_arr[i].ext); } - - while (fr_node_p->type != + + while (fr_node_p->type != fd->file_realm_types[fd->my_cb_nodes_index]) fr_node_p = fr_node_p->next; assert(fr_node_p != NULL); - - fprintf(stderr, "my file realm (idx=%d,st_off=%Ld) ", + + fprintf(stderr, "my file realm (idx=%d,st_off=%Ld) ", fd->my_cb_nodes_index, fd->file_realm_st_offs[fd->my_cb_nodes_index]); ADIOI_Print_flatlist_node(fr_node_p); } #endif - + #ifdef DEBUG2 if (fd->is_agg == 1) { diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_darray.c b/ompi/mca/io/romio314/romio/adio/common/ad_darray.c index 23715c412f3..0437db828ef 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_darray.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_darray.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -18,11 +18,11 @@ static int MPIOI_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nproc MPI_Aint *st_offset); -int ADIO_Type_create_darray(int size, int rank, int ndims, - int *array_of_gsizes, int *array_of_distribs, - int *array_of_dargs, int *array_of_psizes, - int order, MPI_Datatype oldtype, - MPI_Datatype *newtype) +int ADIO_Type_create_darray(int size, int rank, int ndims, + int *array_of_gsizes, int *array_of_distribs, + int *array_of_dargs, int *array_of_psizes, + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype) { MPI_Datatype type_old, type_new=MPI_DATATYPE_NULL, types[3]; int procs, tmp_rank, i, tmp_size, blklens[3], *coords; @@ -52,12 +52,12 @@ int ADIO_Type_create_darray(int size, int rank, int ndims, MPIOI_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], coords[i], array_of_dargs[i], - order, orig_extent, + order, orig_extent, type_old, &type_new, - st_offsets+i); + st_offsets+i); break; case MPI_DISTRIBUTE_CYCLIC: - MPIOI_Type_cyclic(array_of_gsizes, i, ndims, + MPIOI_Type_cyclic(array_of_gsizes, i, ndims, array_of_psizes[i], coords[i], array_of_dargs[i], order, orig_extent, type_old, @@ -65,11 +65,11 @@ int ADIO_Type_create_darray(int size, int rank, int ndims, break; case MPI_DISTRIBUTE_NONE: /* treat it as a block distribution on 1 process */ - MPIOI_Type_block(array_of_gsizes, i, ndims, 1, 0, + MPIOI_Type_block(array_of_gsizes, i, ndims, 1, 0, MPI_DISTRIBUTE_DFLT_DARG, order, - orig_extent, + orig_extent, type_old, &type_new, - st_offsets+i); + st_offsets+i); break; } if (i) MPI_Type_free(&type_old); @@ -94,20 +94,20 @@ int ADIO_Type_create_darray(int size, int rank, int ndims, MPIOI_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], coords[i], array_of_dargs[i], order, orig_extent, type_old, &type_new, - st_offsets+i); + st_offsets+i); break; case MPI_DISTRIBUTE_CYCLIC: - MPIOI_Type_cyclic(array_of_gsizes, i, ndims, + MPIOI_Type_cyclic(array_of_gsizes, i, ndims, array_of_psizes[i], coords[i], - array_of_dargs[i], order, + array_of_dargs[i], order, orig_extent, type_old, &type_new, st_offsets+i); break; case MPI_DISTRIBUTE_NONE: /* treat it as a block distribution on 1 process */ MPIOI_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], - coords[i], MPI_DISTRIBUTE_DFLT_DARG, order, orig_extent, - type_old, &type_new, st_offsets+i); + coords[i], MPI_DISTRIBUTE_DFLT_DARG, order, orig_extent, + type_old, &type_new, st_offsets+i); break; } if (i != ndims-1) MPI_Type_free(&type_old); @@ -127,13 +127,13 @@ int ADIO_Type_create_darray(int size, int rank, int ndims, disps[2] = orig_extent; for (i=0; idim; i--) stride *= (MPI_Aint)array_of_gsizes[i]; @@ -211,7 +211,7 @@ static int MPIOI_Type_block(int *array_of_gsizes, int dim, int ndims, int nprocs static int MPIOI_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nprocs, int rank, int darg, int order, MPI_Aint orig_extent, MPI_Datatype type_old, MPI_Datatype *type_new, - MPI_Aint *st_offset) + MPI_Aint *st_offset) { /* nprocs = no. of processes in dimension dim of grid rank = coordinate of this process in dimension dim */ @@ -227,7 +227,7 @@ static int MPIOI_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nproc return MPI_ERR_ARG; } /* --END ERROR HANDLING-- */ - + st_index = rank*blksize; end_index = array_of_gsizes[dim] - 1; @@ -240,7 +240,7 @@ static int MPIOI_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nproc count = local_size/blksize; rem = local_size % blksize; - + stride = (MPI_Aint)nprocs*(MPI_Aint)blksize*orig_extent; if (order == MPI_ORDER_FORTRAN) for (i=0; i #endif -/* Workaround for incomplete set of definitions if __REDIRECT is not +/* Workaround for incomplete set of definitions if __REDIRECT is not defined and large file support is used in aio.h */ #if !defined(__REDIRECT) && defined(__USE_FILE_OFFSET64) #define aiocb aiocb64 @@ -40,7 +40,7 @@ * to complete. */ int ADIOI_GEN_IODone(ADIO_Request *request, ADIO_Status *status, - int *error_code) + int *error_code) { return 0; diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_done_fake.c b/ompi/mca/io/romio314/romio/adio/common/ad_done_fake.c index 59da5755e0b..3fffa4555b9 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_done_fake.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_done_fake.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_end.c b/ompi/mca/io/romio314/romio/adio/common/ad_end.c index 066c65c27ed..00725f5f008 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_end.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_end.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ void ADIO_End(int *error_code) { ADIOI_Flatlist_node *curr, *next; ADIOI_Datarep *datarep, *datarep_next; - + /* FPRINTF(stderr, "reached end\n"); */ /* if a default errhandler was set on MPI_FILE_NULL then we need to ensure diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_fcntl.c b/ompi/mca/io/romio314/romio/adio/common/ad_fcntl.c index 62067573dd1..8a4d07352cf 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_fcntl.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_fcntl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2005 University of Chicago. + * Copyright (C) 2005 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_flush.c b/ompi/mca/io/romio314/romio/adio/common/ad_flush.c index 3ace6778bf4..76f5da7abcc 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_flush.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_flush.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_fstype.c b/ompi/mca/io/romio314/romio/adio/common/ad_fstype.c index c89b560e541..feca9a7ca1e 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_fstype.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_fstype.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -111,12 +111,12 @@ from the compiler */ #if defined(ROMIO_HAVE_STRUCT_STATVFS_WITH_F_BASETYPE) || \ defined(HAVE_STRUCT_STATFS) || \ - defined(ROMIO_HAVE_STRUCT_STAT_WITH_ST_FSTYPE) + defined(ROMIO_HAVE_STRUCT_STAT_WITH_ST_FSTYPE) #ifndef ROMIO_NTFS #define ROMIO_NEEDS_ADIOPARENTDIR static void ADIO_FileSysType_parentdir(const char *filename, char **dirnamep); #endif -#endif +#endif static void ADIO_FileSysType_prefix(const char *filename, int *fstype, int *error_code); static void ADIO_FileSysType_fncall(const char *filename, int *fstype, @@ -141,13 +141,13 @@ Output Parameters: here. We assume that S_ISLNK is *always* defined as a macro. If that is not universally true, then add a test to the romio configure that trys to link a program that references S_ISLNK */ -#if !defined(S_ISLNK) +#if !defined(S_ISLNK) # if defined(S_IFLNK) /* Check for the link bit */ # define S_ISLNK(mode) ((mode) & S_IFLNK) # else /* no way to check if it is a link, so say false */ -# define S_ISLNK(mode) 0 +# define S_ISLNK(mode) 0 # endif #endif /* !(S_ISLNK) */ @@ -161,7 +161,7 @@ static void ADIO_FileSysType_parentdir(const char *filename, char **dirnamep) int err; char *dir = NULL, *slash; struct stat statbuf; - + err = lstat(filename, &statbuf); if (err || (!S_ISLNK(statbuf.st_mode))) { @@ -221,8 +221,8 @@ Output Parameters: MPI_SUCCESS is stored in the location pointed to by error_code on success. - This function is used by MPI_File_open() and MPI_File_delete() to determine - file system type. Most other functions use the type which is stored when the + This function is used by MPI_File_open() and MPI_File_delete() to determine + file system type. Most other functions use the type which is stored when the file is opened. */ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *error_code) @@ -444,7 +444,7 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro if(*error_code != MPI_SUCCESS) return; } } - + if (err) { /* --BEGIN ERROR HANDLING-- */ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, @@ -499,7 +499,7 @@ static void ADIO_FileSysType_fncall_scalable(MPI_Comm comm, const char *filename /* - ADIO_FileSysType_prefix - determines file system type for a file using + ADIO_FileSysType_prefix - determines file system type for a file using a prefix on the file name. upper layer should have already determined that a prefix is present. @@ -552,18 +552,18 @@ static void ADIO_FileSysType_prefix(const char *filename, int *fstype, int *erro else if (!strncmp(filename, "zoidfs:", 7)|| !strncmp(filename, "ZOIDFS:", 7)) { *fstype = ADIO_ZOIDFS; - } - else if (!strncmp(filename, "testfs:", 7) + } + else if (!strncmp(filename, "testfs:", 7) || !strncmp(filename, "TESTFS:", 7)) { *fstype = ADIO_TESTFS; } - else if (!strncmp(filename, "ftp:", 4) + else if (!strncmp(filename, "ftp:", 4) || !strncmp(filename, "gsiftp:", 7)) { *fstype = ADIO_GRIDFTP; } - else if (!strncmp(filename, "lustre:", 7) + else if (!strncmp(filename, "lustre:", 7) || !strncmp(filename, "LUSTRE:", 7)) { *fstype = ADIO_LUSTRE; @@ -599,7 +599,7 @@ Output Parameters: . error_code - (pointer to) int holding error code Notes: -This code used to be in MPI_File_open(), but it has been moved into here in +This code used to be in MPI_File_open(), but it has been moved into here in order to clean things up. The goal is to separate all this "did we compile for this fs type" code from the MPI layer and also to introduce the ADIOI_Fns tables in a reasonable way. -- Rob, 06/06/2001 @@ -625,13 +625,13 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, /* Optimization: we can reduce the 'storm of stats' that result from * thousands of mpi processes determinig file type this way. Let us * have just one process stat the file and broadcast the result to - * everyone else. + * everyone else. * - Note that we will not catch cases like * http://www.mcs.anl.gov/web-mail-archive/lists/mpich-discuss/2007/08/msg00042.html * (edit: now http://lists.mcs.anl.gov/pipermail/mpich-discuss/2007-August/002648.html) * * where file systems are not mounted or available on other processes, - * but we'll catch those a few functions later in ADIO_Open + * but we'll catch those a few functions later in ADIO_Open * - Note that if we have NFS enabled, we might have a situation where, * for example, /home/user/data.out is UFS on one process but NFS on * others, so we won't perform this optimization if NFS is enabled. @@ -674,7 +674,7 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, } } else { - /* prefix specified; just match via prefix and assume everyone got + /* prefix specified; just match via prefix and assume everyone got * the same thing. * * perhaps we should have this code go through the allreduce as well? @@ -846,7 +846,7 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, #endif } if (file_system == ADIO_LUSTRE) { -#ifndef ROMIO_LUSTRE +#ifndef ROMIO_LUSTRE *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0); return; #else @@ -867,6 +867,6 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, *fstype = file_system; return; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_get_sh_fp.c b/ompi/mca/io/romio314/romio/adio/common/ad_get_sh_fp.c index 12133277903..3c933f9e876 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_get_sh_fp.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_get_sh_fp.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -37,25 +37,25 @@ void ADIO_Get_shared_fp(ADIO_File fd, ADIO_Offset incr, ADIO_Offset *shared_fp, if (fd->shared_fp_fd == ADIO_FILE_NULL) { MPI_Comm_dup(MPI_COMM_SELF, &dupcommself); - fd->shared_fp_fd = ADIO_Open(MPI_COMM_SELF, dupcommself, - fd->shared_fp_fname, + fd->shared_fp_fd = ADIO_Open(MPI_COMM_SELF, dupcommself, + fd->shared_fp_fname, fd->file_system, fd->fns, - ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, + ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, 0, MPI_BYTE, MPI_BYTE, - MPI_INFO_NULL, + MPI_INFO_NULL, ADIO_PERM_NULL, error_code); if (*error_code != MPI_SUCCESS) return; ADIOI_WRITE_LOCK(fd->shared_fp_fd, 0, SEEK_SET, sizeof(ADIO_Offset)); - ADIO_ReadContig(fd->shared_fp_fd, shared_fp, sizeof(ADIO_Offset), + ADIO_ReadContig(fd->shared_fp_fd, shared_fp, sizeof(ADIO_Offset), MPI_BYTE, ADIO_EXPLICIT_OFFSET, 0, &status, error_code); /* if the file is empty, the above function may return error - (reading beyond end of file). In that case, shared_fp = 0, + (reading beyond end of file). In that case, shared_fp = 0, set above, is the correct value. */ } else { ADIOI_WRITE_LOCK(fd->shared_fp_fd, 0, SEEK_SET, sizeof(ADIO_Offset)); - ADIO_ReadContig(fd->shared_fp_fd, shared_fp, sizeof(ADIO_Offset), + ADIO_ReadContig(fd->shared_fp_fd, shared_fp, sizeof(ADIO_Offset), MPI_BYTE, ADIO_EXPLICIT_OFFSET, 0, &status, error_code); if (*error_code != MPI_SUCCESS) { ADIOI_UNLOCK(fd->shared_fp_fd, 0, SEEK_SET, sizeof(ADIO_Offset)); @@ -67,7 +67,7 @@ void ADIO_Get_shared_fp(ADIO_File fd, ADIO_Offset incr, ADIO_Offset *shared_fp, new_fp = *shared_fp + incr; - ADIO_WriteContig(fd->shared_fp_fd, &new_fp, sizeof(ADIO_Offset), + ADIO_WriteContig(fd->shared_fp_fd, &new_fp, sizeof(ADIO_Offset), MPI_BYTE, ADIO_EXPLICIT_OFFSET, 0, &status, error_code); done: ADIOI_UNLOCK(fd->shared_fp_fd, 0, SEEK_SET, sizeof(ADIO_Offset)); diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_hints.c b/ompi/mca/io/romio314/romio/adio/common/ad_hints.c index 1bc74f1a555..1d226e6c7df 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_hints.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_hints.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,7 +11,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) { -/* if fd->info is null, create a new info object. +/* if fd->info is null, create a new info object. Initialize fd->info to default values. Initialize fd->hints to default values. Examine the info object passed by the user. If it contains values that @@ -58,15 +58,15 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) if (!fd->hints->initialized) { /* buffer size for collective I/O */ - ADIOI_Info_set(info, "cb_buffer_size", ADIOI_CB_BUFFER_SIZE_DFLT); + ADIOI_Info_set(info, "cb_buffer_size", ADIOI_CB_BUFFER_SIZE_DFLT); fd->hints->cb_buffer_size = atoi(ADIOI_CB_BUFFER_SIZE_DFLT); /* default is to let romio automatically decide when to use * collective buffering */ - ADIOI_Info_set(info, "romio_cb_read", "automatic"); + ADIOI_Info_set(info, "romio_cb_read", "automatic"); fd->hints->cb_read = ADIOI_HINT_AUTO; - ADIOI_Info_set(info, "romio_cb_write", "automatic"); + ADIOI_Info_set(info, "romio_cb_write", "automatic"); fd->hints->cb_write = ADIOI_HINT_AUTO; fd->hints->cb_config_list = NULL; @@ -83,7 +83,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* hint instructing the use of persistent file realms */ ADIOI_Info_set(info, "romio_cb_pfr", "disable"); fd->hints->cb_pfr = ADIOI_HINT_DISABLE; - + /* hint guiding the assignment of persistent file realms */ ADIOI_Info_set(info, "romio_cb_fr_types", "aar"); fd->hints->cb_fr_type = ADIOI_FR_AAR; @@ -115,9 +115,9 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* default is to let romio automatically decide when to use data * sieving */ - ADIOI_Info_set(info, "romio_ds_read", "automatic"); + ADIOI_Info_set(info, "romio_ds_read", "automatic"); fd->hints->ds_read = ADIOI_HINT_AUTO; - ADIOI_Info_set(info, "romio_ds_write", "automatic"); + ADIOI_Info_set(info, "romio_ds_write", "automatic"); fd->hints->ds_write = ADIOI_HINT_AUTO; /* still to do: tune this a bit for a variety of file systems. there's @@ -137,18 +137,18 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* add in user's info if supplied */ if (users_info != MPI_INFO_NULL) { - ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size", + ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size", &(fd->hints->cb_buffer_size), myname, error_code); /* aligning file realms to certain sizes (e.g. stripe sizes) * may benefit I/O performance */ - ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_alignment", + ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_alignment", &(fd->hints->cb_fr_alignment), myname, error_code); /* for collective I/O, try to be smarter about when to do data sieving * using a specific threshold for the datatype size/extent * (percentage 0-100%) */ - ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_ds_threshold", + ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_ds_threshold", &(fd->hints->cb_ds_threshold), myname, error_code); ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_alltoall", @@ -178,7 +178,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_pfr", &(fd->hints->cb_pfr), myname, error_code); - + /* file realm assignment types ADIOI_FR_AAR(0), ADIOI_FR_FSZ(-1), ADIOI_FR_USR_REALMS(-2), all others specify a regular fr size in bytes. probably not the best way... */ @@ -196,7 +196,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) ADIOI_Info_set(info, "romio_cb_read", "enable"); fd->hints->cb_read = 1; fd->hints->cb_write = 1; - } + } /* new hints for enabling/disabling data sieving on * reads/writes */ @@ -244,7 +244,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) /* Now we use striping unit in common code so we should process hints for it. */ - ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit", + ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit", &(fd->hints->striping_unit), myname, error_code); } diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_init.c b/ompi/mca/io/romio314/romio/adio/common/ad_init.c index 88e75a5251f..b650ad78758 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_init.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_init.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -55,7 +55,7 @@ void ADIO_Init(int *argc, char ***argv, int *error_code) ADIOI_UNREFERENCED_ARG(argc); ADIOI_UNREFERENCED_ARG(argv); - + #ifdef ROMIO_INSIDE_MPICH MPIR_Ext_init(); #endif @@ -69,11 +69,11 @@ void ADIO_Init(int *argc, char ***argv, int *error_code) #if defined(ROMIO_XFS) || defined(ROMIO_LUSTRE) c = getenv("MPIO_DIRECT_READ"); - if (c && (!strcmp(c, "true") || !strcmp(c, "TRUE"))) + if (c && (!strcmp(c, "true") || !strcmp(c, "TRUE"))) ADIOI_Direct_read = 1; else ADIOI_Direct_read = 0; c = getenv("MPIO_DIRECT_WRITE"); - if (c && (!strcmp(c, "true") || !strcmp(c, "TRUE"))) + if (c && (!strcmp(c, "true") || !strcmp(c, "TRUE"))) ADIOI_Direct_write = 1; else ADIOI_Direct_write = 0; #endif @@ -93,7 +93,7 @@ void ADIO_Init(int *argc, char ***argv, int *error_code) MPE_Log_get_state_eventIDs( &ADIOI_MPE_unlock_a, &ADIOI_MPE_unlock_b ); MPE_Log_get_state_eventIDs( &ADIOI_MPE_postwrite_a, &ADIOI_MPE_postwrite_b ); - MPE_Log_get_state_eventIDs( &ADIOI_MPE_openinternal_a, + MPE_Log_get_state_eventIDs( &ADIOI_MPE_openinternal_a, &ADIOI_MPE_openinternal_b); MPE_Log_get_state_eventIDs( &ADIOI_MPE_stat_a, &ADIOI_MPE_stat_b); MPE_Log_get_state_eventIDs( &ADIOI_MPE_iread_a, &ADIOI_MPE_iread_b); diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_io_coll.c b/ompi/mca/io/romio314/romio/adio/common/ad_io_coll.c index 7e980e1e1d6..22b2da473de 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_io_coll.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_io_coll.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2008 University of Chicago. +/* + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -31,7 +31,7 @@ static void post_aggregator_comm (MPI_Comm comm, int rw_type, int nproc, MPI_Request **requests, int *aggregators_client_count_p); -static void post_client_comm (ADIO_File fd, int rw_type, +static void post_client_comm (ADIO_File fd, int rw_type, int agg_rank, void *buf, MPI_Datatype agg_comm_dtype, int agg_alltoallw_count, @@ -141,7 +141,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, interleave_count++; /* This is a rudimentary check for interleaving, but should * suffice for the moment. */ - + min_st_offset = ADIOI_MIN(all_st_end_offsets[i*2], min_st_offset); max_end_offset = ADIOI_MAX(all_st_end_offsets[i*2+1], @@ -249,11 +249,11 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, } } #ifdef USE_PRE_REQ - else + else { /* Example use of ADIOI_Build_client_pre_req. to an * appropriate section */ - + for (i = 0; i < fd->hints->cb_nodes; i++) { agg_rank = fd->hints->ranklist[(i+myrank)%fd->hints->cb_nodes]; @@ -264,7 +264,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, fd, agg_rank, (i+myrank)%fd->hints->cb_nodes, &(my_mem_view_state_arr[agg_rank]), &(agg_file_view_state_arr[agg_rank]), - 2*1024*1024, + 2*1024*1024, 64*1024); #ifdef AGGREGATION_PROFILE MPE_Log_event (5041, 0, NULL); @@ -327,7 +327,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, (i+myrank)%fd->hints->cb_nodes, &(my_mem_view_state_arr[agg_rank]), &(agg_file_view_state_arr[agg_rank]), - agg_comm_sz_arr[agg_rank], + agg_comm_sz_arr[agg_rank], &(agg_comm_dtype_arr[agg_rank])); #ifdef AGGREGATION_PROFILE @@ -359,7 +359,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, fprintf (stderr, "expecting from [agg](disp,size,cnt)="); for (i=0; i < nprocs; i++) { MPI_Type_size_x (agg_comm_dtype_arr[i], &size); - fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], + fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], size, agg_alltoallw_counts[i]); if (i != nprocs - 1) fprintf(stderr, ","); @@ -372,8 +372,8 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, MPI_Type_size_x (client_comm_dtype_arr[i], &size); else size = -1; - - fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], + + fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], size, client_alltoallw_counts[i]); if (i != nprocs - 1) fprintf(stderr, ","); @@ -434,7 +434,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, fprintf (stderr, "sending to [agg](disp,size,cnt)="); for (i=0; i < nprocs; i++) { MPI_Type_size_x (agg_comm_dtype_arr[i], &size); - fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], + fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], size, agg_alltoallw_counts[i]); if (i != nprocs - 1) fprintf(stderr, ","); @@ -446,8 +446,8 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, MPI_Type_size_x (client_comm_dtype_arr[i], &size); else size = -1; - - fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], + + fprintf (stderr, "[%d](%d,%d,%d)", i, alltoallw_disps[i], size, client_alltoallw_counts[i]); if (i != nprocs - 1) fprintf(stderr, ","); @@ -458,7 +458,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, #ifdef DEBUG fprintf (stderr, "buffered_io_size = %lld\n", buffered_io_size); #endif - + if (clients_agg_count) { client_comm_statuses = ADIOI_Malloc(clients_agg_count * sizeof(MPI_Status)); @@ -484,7 +484,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, /* make sure we actually have the data to write out */ agg_comm_statuses = (MPI_Status *) ADIOI_Malloc (aggs_client_count*sizeof(MPI_Status)); - + MPI_Waitall (aggs_client_count, agg_comm_requests, agg_comm_statuses); #ifdef AGGREGATION_PROFILE @@ -598,7 +598,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, fd, agg_rank, (i+myrank)%fd->hints->cb_nodes, &(my_mem_view_state_arr[agg_rank]), &(agg_file_view_state_arr[agg_rank]), - 2*1024*1024, + 2*1024*1024, 64*1024); #ifdef AGGREGATION_PROFILE MPE_Log_event (5041, 0, NULL); @@ -606,7 +606,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, } } #endif - + /* aggregators pre-post all Irecv's for incoming data from * clients. if nothing is needed, agg_comm_requests is not * allocated */ @@ -627,7 +627,7 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, } /* Clean up */ - + if (fd->hints->cb_pfr != ADIOI_HINT_ENABLE) { /* AAR, FSIZE, and User provided uniform File realms */ if (1) { @@ -663,11 +663,11 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr, } ADIOI_Free (client_file_view_state_arr); ADIOI_Free (cb_buf); - } + } for (i = 0; i 0) MPI_Type_free (&agg_comm_dtype_arr[i]); - + ADIOI_Free (client_comm_sz_arr); ADIOI_Free (client_comm_dtype_arr); ADIOI_Free (my_mem_view_state_arr); @@ -707,9 +707,9 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, int filetype_is_contig; ADIO_Offset i, remainder; ADIOI_Flatlist_node *flat_file; - + ADIO_Offset st_byte_off, end_byte_off; - + #ifdef AGGREGATION_PROFILE MPE_Log_event (5000, 0, NULL); #endif @@ -724,12 +724,12 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, } ADIOI_Datatype_iscontig (fd->filetype, &filetype_is_contig); - + MPI_Type_size_x (fd->filetype, &filetype_size); MPI_Type_extent (fd->filetype, &filetype_extent); MPI_Type_size_x (fd->etype, &etype_size); MPI_Type_size_x (buftype, &buftype_size); - + total_io = buftype_size * count; if (filetype_is_contig) { @@ -748,7 +748,7 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, points at an accessible byte in file. the first accessible byte in the file is not necessarily the first byte, nor is it necessarily the first off/len pair in the filetype. */ - if (file_ptr_type == ADIO_INDIVIDUAL) { + if (file_ptr_type == ADIO_INDIVIDUAL) { st_byte_off = fd->fp_ind; /* find end byte of I/O (may be in middle of an etype) */ @@ -791,7 +791,7 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, for (i=0; icount; i++) { sum += flat_file->blocklens[i]; if (sum >= remainder) { - end_byte_off += flat_file->indices[i] + + end_byte_off += flat_file->indices[i] + flat_file->blocklens[i] - sum + remainder - 1; break; } @@ -801,12 +801,12 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, } else { /* find starting byte of I/O (must be aligned with an etype) */ - /* byte starting point of starting filetype */ + /* byte starting point of starting filetype */ st_byte_off = fd->disp + ((offset * etype_size) / filetype_size) * filetype_extent; /* number of file viewable bytes into starting filetype */ remainder = (etype_size * offset) % filetype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -819,14 +819,14 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, break; } } - + /* find end byte of I/O (may be in middle of an etype) */ /* byte starting point of last filetype */ end_byte_off = fd->disp + (offset * etype_size + total_io) / filetype_size * filetype_extent; /* number of bytes into last filetype */ remainder = (offset * etype_size + total_io) % filetype_size; - + if (!remainder) { /* the last non-zero off/len pair */ for (i=flat_file->count-1; i>=0; i--) { @@ -847,7 +847,7 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, for (i=0; icount; i++) { sum += flat_file->blocklens[i]; if (sum >= remainder) { - end_byte_off += flat_file->indices[i] + + end_byte_off += flat_file->indices[i] + flat_file->blocklens[i] - sum + remainder - 1; break; } @@ -855,7 +855,7 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, } } } - + *st_offset = st_byte_off; *end_offset = end_byte_off; #ifdef DEBUG @@ -874,7 +874,7 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype, * assume that this uses MPI_BYTE for the etype, and disp is 0 */ void ADIOI_IOFiletype(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, MPI_Datatype custom_ftype, + ADIO_Offset offset, MPI_Datatype custom_ftype, int rdwr, ADIO_Status *status, int *error_code) { MPI_Datatype user_filetype; @@ -1031,7 +1031,7 @@ static void Exch_data_amounts (ADIO_File fd, int nprocs, send_requests = NULL; if (fd->is_agg) { /* only aggregators send data */ - send_requests = ADIOI_Malloc (nprocs * sizeof(MPI_Request)); + send_requests = ADIOI_Malloc (nprocs * sizeof(MPI_Request)); /* post all sends */ for (i = 0; i < nprocs; i++) { @@ -1067,7 +1067,7 @@ static void Exch_data_amounts (ADIO_File fd, int nprocs, } } -static void post_aggregator_comm (MPI_Comm comm, int rw_type, +static void post_aggregator_comm (MPI_Comm comm, int rw_type, int nproc, void *cb_buf, MPI_Datatype *client_comm_dtype_arr, ADIO_Offset *client_comm_sz_arr, @@ -1115,7 +1115,7 @@ static void post_aggregator_comm (MPI_Comm comm, int rw_type, } } -static void post_client_comm (ADIO_File fd, int rw_type, +static void post_client_comm (ADIO_File fd, int rw_type, int agg_rank, void *buf, MPI_Datatype agg_comm_dtype, int agg_alltoallw_count, diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_iopen.c b/ompi/mca/io/romio314/romio/adio/common/ad_iopen.c index 5deeaa2cdeb..37e98e3f92f 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_iopen.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_iopen.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2002 University of Chicago. + * Copyright (C) 2002 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "adio.h" void ADIO_ImmediateOpen(ADIO_File fd, int *error_code) -{ +{ MPI_Comm tmp_comm; tmp_comm = fd->comm; /* some file systems might try to be clever inside their open routine. @@ -18,4 +18,4 @@ void ADIO_ImmediateOpen(ADIO_File fd, int *error_code) fd->is_open = 1; fd->comm = tmp_comm; -} +} diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_iread.c b/ompi/mca/io/romio314/romio/adio/common/ad_iread.c index 74c342ab939..2bc3ad6f16f 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_iread.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_iread.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -30,15 +30,15 @@ * * This code handles two distinct cases. If ROMIO_HAVE_WORKING_AIO is not * defined, then I/O is performed in a blocking manner. Otherwise we post - * an asynchronous I/O operation using the appropriate aio routines. + * an asynchronous I/O operation using the appropriate aio routines. * * In the aio case we rely on ADIOI_GEN_aio(), which is implemented in * common/ad_iwrite.c. */ -void ADIOI_GEN_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_GEN_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, - int *error_code) + int *error_code) { MPI_Count len, typesize; int aio_errno = 0; @@ -60,7 +60,7 @@ void ADIOI_GEN_IreadContig(ADIO_File fd, void *buf, int count, return; } /* --END ERROR HANDLING-- */ - + *error_code = MPI_SUCCESS; } #endif @@ -68,7 +68,7 @@ void ADIOI_GEN_IreadContig(ADIO_File fd, void *buf, int count, /* Generic implementation of IreadStrided calls the blocking ReadStrided * immediately. */ -void ADIOI_GEN_IreadStrided(ADIO_File fd, void *buf, int count, +void ADIOI_GEN_IreadStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code) @@ -80,8 +80,8 @@ void ADIOI_GEN_IreadStrided(ADIO_File fd, void *buf, int count, /* Call the blocking function. It will create an error code * if necessary. */ - ADIO_ReadStrided(fd, buf, count, datatype, file_ptr_type, - offset, &status, error_code); + ADIO_ReadStrided(fd, buf, count, datatype, file_ptr_type, + offset, &status, error_code); if (*error_code == MPI_SUCCESS) { MPI_Type_size_x(datatype, &typesize); diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_iread_fake.c b/ompi/mca/io/romio314/romio/adio/common/ad_iread_fake.c index b5cbd1da271..6a7f0bfde72 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_iread_fake.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_iread_fake.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,10 +11,10 @@ /* Generic implementation of IreadContig calls the blocking ReadContig * immediately. */ -void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, - int *error_code) + int *error_code) { ADIO_Status status; MPI_Count typesize; @@ -27,8 +27,8 @@ void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, * if necessary. */ ADIOI_Assert(len == (int) len); /* the count is an int parm */ - ADIO_ReadContig(fd, buf, (int)len, MPI_BYTE, file_ptr_type, offset, - &status, error_code); + ADIO_ReadContig(fd, buf, (int)len, MPI_BYTE, file_ptr_type, offset, + &status, error_code); if (*error_code != MPI_SUCCESS) { len=0; } @@ -39,7 +39,7 @@ void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, /* Generic implementation of IreadStrided calls the blocking ReadStrided * immediately. */ -void ADIOI_FAKE_IreadStrided(ADIO_File fd, void *buf, int count, +void ADIOI_FAKE_IreadStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code) @@ -51,8 +51,8 @@ void ADIOI_FAKE_IreadStrided(ADIO_File fd, void *buf, int count, /* Call the blocking function. It will create an error code * if necessary. */ - ADIO_ReadStrided(fd, buf, count, datatype, file_ptr_type, - offset, &status, error_code); + ADIO_ReadStrided(fd, buf, count, datatype, file_ptr_type, + offset, &status, error_code); if (*error_code == MPI_SUCCESS) { MPI_Type_size_x(datatype, &typesize); nbytes = (MPI_Offset)count*(MPI_Offset)typesize; diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_iwrite.c b/ompi/mca/io/romio314/romio/adio/common/ad_iwrite.c index 8177718ff80..feecae6a24a 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_iwrite.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_iwrite.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -27,7 +27,7 @@ #include "../../mpi-io/mpioimpl.h" #include "../../mpi-io/mpioprof.h" #include "mpiu_greq.h" -/* Workaround for incomplete set of definitions if __REDIRECT is not +/* Workaround for incomplete set of definitions if __REDIRECT is not defined and large file support is used in aio.h */ #if !defined(__REDIRECT) && defined(__USE_FILE_OFFSET64) #define aiocb aiocb64 @@ -39,7 +39,7 @@ static MPIX_Grequest_class ADIOI_GEN_greq_class = 0; /* ADIOI_GEN_IwriteContig * - * This code handles only the case where ROMIO_HAVE_WORKING_AIO is + * This code handles only the case where ROMIO_HAVE_WORKING_AIO is * defined. We post an asynchronous I/O operations using the appropriate aio * routines. Otherwise, the ADIOI_Fns_struct will point to the FAKE * version. @@ -100,8 +100,8 @@ int ADIOI_GEN_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, /* Use Direct I/O if desired and properly aligned */ if (fd->fns == &ADIO_XFS_operations && ((wr && fd->direct_write) || (!wr && fd->direct_read)) && - !(((long) buf) % fd->d_mem) && !(offset % fd->d_miniosz) && - !(len % fd->d_miniosz) && (len >= fd->d_miniosz) && + !(((long) buf) % fd->d_mem) && !(offset % fd->d_miniosz) && + !(len % fd->d_miniosz) && (len >= fd->d_miniosz) && (len <= maxiosz)) { fd_sys = fd->fd_direct; } @@ -146,17 +146,17 @@ int ADIOI_GEN_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, #endif if (err == -1) { - if (errno == EAGAIN || errno == ENOSYS) { + if (errno == EAGAIN || errno == ENOSYS) { /* exceeded the max. no. of outstanding requests. - or, aio routines are not actually implemented + or, aio routines are not actually implemented treat this as a blocking request and return. */ - if (wr) - ADIO_WriteContig(fd, buf, len, MPI_BYTE, - ADIO_EXPLICIT_OFFSET, offset, &status, &error_code); + if (wr) + ADIO_WriteContig(fd, buf, len, MPI_BYTE, + ADIO_EXPLICIT_OFFSET, offset, &status, &error_code); else ADIO_ReadContig(fd, buf, len, MPI_BYTE, - ADIO_EXPLICIT_OFFSET, offset, &status, &error_code); - + ADIO_EXPLICIT_OFFSET, offset, &status, &error_code); + MPIO_Completed_request_create(&fd, len, &error_code, request); if (aiocbp != NULL) ADIOI_Free(aiocbp); if (aio_req != NULL) ADIOI_Free(aio_req); @@ -167,9 +167,9 @@ int ADIOI_GEN_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, } aio_req->aiocbp = aiocbp; if (ADIOI_GEN_greq_class == 0) { - MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, - ADIOI_GEN_aio_free_fn, MPIU_Greq_cancel_fn, - ADIOI_GEN_aio_poll_fn, ADIOI_GEN_aio_wait_fn, + MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, + ADIOI_GEN_aio_free_fn, MPIU_Greq_cancel_fn, + ADIOI_GEN_aio_poll_fn, ADIOI_GEN_aio_wait_fn, &ADIOI_GEN_greq_class); } MPIX_Grequest_class_allocate(ADIOI_GEN_greq_class, aio_req, request); @@ -191,11 +191,11 @@ void ADIOI_GEN_IwriteStrided(ADIO_File fd, const void *buf, int count, MPI_Count typesize; MPI_Offset nbytes=0; - /* Call the blocking function. It will create an error code + /* Call the blocking function. It will create an error code * if necessary. */ - ADIO_WriteStrided(fd, buf, count, datatype, file_ptr_type, - offset, &status, error_code); + ADIO_WriteStrided(fd, buf, count, datatype, file_ptr_type, + offset, &status, error_code); if (*error_code == MPI_SUCCESS) { MPI_Type_size_x(datatype, &typesize); @@ -238,7 +238,7 @@ int ADIOI_GEN_aio_poll_fn(void *extra_state, MPI_Status *status) } /* wait for multiple requests to complete */ -int ADIOI_GEN_aio_wait_fn(int count, void ** array_of_states, +int ADIOI_GEN_aio_wait_fn(int count, void ** array_of_states, double timeout, MPI_Status *status) { const struct aiocb **cblist; @@ -270,13 +270,13 @@ int ADIOI_GEN_aio_wait_fn(int count, void ** array_of_states, do { err = aio_suspend(cblist, count, aio_timer_p); } while (err < 0 && errno == EINTR); - if (err == 0) + if (err == 0) { /* run through the list of requests, and mark all the completed ones as done */ for (i=0; i< count; i++) { /* aio_error returns an ERRNO value */ - if (aio_reqlist[i]->aiocbp == NULL) + if (aio_reqlist[i]->aiocbp == NULL) continue; errno = aio_error(aio_reqlist[i]->aiocbp); if (errno == 0) { @@ -286,15 +286,15 @@ int ADIOI_GEN_aio_wait_fn(int count, void ** array_of_states, if (errcode != MPI_SUCCESS) { errcode = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - "ADIOI_GEN_aio_wait_fn", - __LINE__, MPI_ERR_IO, + "ADIOI_GEN_aio_wait_fn", + __LINE__, MPI_ERR_IO, "**mpi_grequest_complete", 0); } ADIOI_Free(aio_reqlist[i]->aiocbp); aio_reqlist[i]->aiocbp = NULL; cblist[i] = NULL; nr_complete++; - } + } /* TODO: need to handle error conditions somehow*/ } } /* TODO: also need to handle errors here */ @@ -319,7 +319,7 @@ int ADIOI_GEN_aio_free_fn(void *extra_state) } #endif /* working AIO */ -int ADIOI_GEN_aio_query_fn(void *extra_state, MPI_Status *status) +int ADIOI_GEN_aio_query_fn(void *extra_state, MPI_Status *status) { ADIOI_AIO_Request *aio_req; @@ -327,16 +327,16 @@ int ADIOI_GEN_aio_query_fn(void *extra_state, MPI_Status *status) MPI_Status_set_elements_x(status, MPI_BYTE, aio_req->nbytes); - /* can never cancel so always true */ - MPI_Status_set_cancelled(status, 0); + /* can never cancel so always true */ + MPI_Status_set_cancelled(status, 0); - /* choose not to return a value for this */ - status->MPI_SOURCE = MPI_UNDEFINED; - /* tag has no meaning for this generalized request */ - status->MPI_TAG = MPI_UNDEFINED; - /* this generalized request never fails */ - return MPI_SUCCESS; + /* choose not to return a value for this */ + status->MPI_SOURCE = MPI_UNDEFINED; + /* tag has no meaning for this generalized request */ + status->MPI_TAG = MPI_UNDEFINED; + /* this generalized request never fails */ + return MPI_SUCCESS; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_iwrite_fake.c b/ompi/mca/io/romio314/romio/adio/common/ad_iwrite_fake.c index 6210942e663..e92e13a5b7c 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_iwrite_fake.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_iwrite_fake.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -30,7 +30,7 @@ void ADIOI_FAKE_IwriteContig(ADIO_File fd, const void *buf, int count, */ ADIOI_Assert(len == (int) len); /* the count is an int parm */ ADIO_WriteContig(fd, buf, (int)len, MPI_BYTE, file_ptr_type, offset, - &status, error_code); + &status, error_code); if (*error_code == MPI_SUCCESS) { MPI_Type_size_x(datatype, &typesize); nbytes = (MPI_Offset)count*(MPI_Offset)typesize; @@ -52,11 +52,11 @@ void ADIOI_FAKE_IwriteStrided(ADIO_File fd, const void *buf, int count, MPI_Count typesize; MPI_Offset nbytes=0; - /* Call the blocking function. It will create an error code + /* Call the blocking function. It will create an error code * if necessary. */ - ADIO_WriteStrided(fd, buf, count, datatype, file_ptr_type, - offset, &status, error_code); + ADIO_WriteStrided(fd, buf, count, datatype, file_ptr_type, + offset, &status, error_code); if (*error_code == MPI_SUCCESS) { MPI_Type_size_x(datatype, &typesize); nbytes = (MPI_Offset)count * (MPI_Offset)typesize; diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_open.c b/ompi/mca/io/romio314/romio/adio/common/ad_open.c index 7d69280057d..46da0b2d404 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_open.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -14,14 +14,14 @@ static int is_aggregator(int rank, ADIO_File fd); static int uses_generic_read(ADIO_File fd); static int uses_generic_write(ADIO_File fd); -static int build_cb_config_list(ADIO_File fd, - MPI_Comm orig_comm, MPI_Comm comm, +static int build_cb_config_list(ADIO_File fd, + MPI_Comm orig_comm, MPI_Comm comm, int rank, int procs, int *error_code); MPI_File ADIO_Open(MPI_Comm orig_comm, MPI_Comm comm, const char *filename, int file_system, ADIOI_Fns *ops, - int access_mode, ADIO_Offset disp, MPI_Datatype etype, + int access_mode, ADIO_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, MPI_Info info, int perm, int *error_code) { @@ -126,13 +126,13 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, * (e.g. Blue Gene) more efficent */ fd->io_buf = ADIOI_Malloc(fd->hints->cb_buffer_size); - /* deferred open: + /* deferred open: * we can only do this optimization if 'fd->hints->deferred_open' is set * (which means the user hinted 'no_indep_rw' and collective buffering). * Furthermore, we only do this if our collective read/write routines use * our generic function, and not an fs-specific routine (we can defer opens * only if we use our aggreagation code). */ - if (fd->hints->deferred_open && + if (fd->hints->deferred_open && !(uses_generic_read(fd) \ && uses_generic_write(fd))) { fd->hints->deferred_open = 0; @@ -147,7 +147,7 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, * one else does that right now */ if (fd->hints->ranklist == NULL) { build_cb_config_list(fd, orig_comm, comm, rank, procs, error_code); - if (*error_code != MPI_SUCCESS) + if (*error_code != MPI_SUCCESS) goto fn_exit; } /* for debugging, it can be helpful to see the hints selected */ @@ -177,7 +177,7 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, /* If the file was successfully opened, close it */ if (*error_code == MPI_SUCCESS) { - + /* in the deferred open case, only those who have actually opened the file should close it */ if (fd->hints->deferred_open) { @@ -210,16 +210,16 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, } /* a simple linear search. possible enancement: add a my_cb_nodes_index member - * ( index into cb_nodes, else -1 if not aggregator ) for faster lookups + * ( index into cb_nodes, else -1 if not aggregator ) for faster lookups * * fd->hints->cb_nodes is the number of aggregators * fd->hints->ranklist[] is an array of the ranks of aggregators * - * might want to move this to adio/common/cb_config_list.c + * might want to move this to adio/common/cb_config_list.c */ int is_aggregator(int rank, ADIO_File fd ) { int i; - + if (fd->my_cb_nodes_index == -2) { for (i=0; i< fd->hints->cb_nodes; i++ ) { if ( rank == fd->hints->ranklist[i] ) { @@ -253,8 +253,8 @@ static int uses_generic_write(ADIO_File fd) return 0; } -static int build_cb_config_list(ADIO_File fd, - MPI_Comm orig_comm, MPI_Comm comm, +static int build_cb_config_list(ADIO_File fd, + MPI_Comm orig_comm, MPI_Comm comm, int rank, int procs, int *error_code) { ADIO_cb_name_array array; @@ -282,7 +282,7 @@ static int build_cb_config_list(ADIO_File fd, return 0; } - rank_ct = ADIOI_cb_config_list_parse(fd->hints->cb_config_list, + rank_ct = ADIOI_cb_config_list_parse(fd->hints->cb_config_list, array, tmp_ranklist, fd->hints->cb_nodes); @@ -310,6 +310,6 @@ static int build_cb_config_list(ADIO_File fd, return 0; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_opencoll.c b/ompi/mca/io/romio314/romio/adio/common/ad_opencoll.c index 467a322a340..b1fd33153c4 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_opencoll.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_opencoll.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * * Copyright (C) 2007 UChicago/Argonne LLC * See COPYRIGHT notice in top-level directory. @@ -12,16 +12,16 @@ * * optimization: by having just one process create a file, close it, * then have all N processes open it, we can possibly avoid contention - * for write locks on a directory for some file systems. + * for write locks on a directory for some file systems. * * Happy side-effect: exclusive create (error if file already exists) - * just falls out + * just falls out * * Note: this is not a "scalable open" (c.f. "The impact of file systems - * on MPI-IO scalability"). + * on MPI-IO scalability"). */ - -void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, + +void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code) { int orig_amode_excl, orig_amode_wronly; @@ -34,9 +34,9 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, /* remove delete_on_close flag if set */ if (access_mode & ADIO_DELETE_ON_CLOSE) fd->access_mode = access_mode ^ ADIO_DELETE_ON_CLOSE; - else + else fd->access_mode = access_mode; - + tmp_comm = fd->comm; fd->comm = MPI_COMM_SELF; (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); @@ -44,7 +44,7 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, MPI_Bcast(error_code, 1, MPI_INT, \ fd->hints->ranklist[0], fd->comm); /* if no error, close the file and reopen normally below */ - if (*error_code == MPI_SUCCESS) + if (*error_code == MPI_SUCCESS) (*(fd->fns->ADIOI_xxx_Close))(fd, error_code); fd->access_mode = access_mode; /* back to original */ @@ -53,10 +53,10 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, if (*error_code != MPI_SUCCESS) { return; - } + } else { /* turn off CREAT (and EXCL if set) for real multi-processor open */ - access_mode ^= ADIO_CREATE; + access_mode ^= ADIO_CREATE; if (access_mode & ADIO_EXCL) access_mode ^= ADIO_EXCL; } @@ -85,7 +85,7 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, } } -/* For writing with data sieving, a read-modify-write is needed. If +/* For writing with data sieving, a read-modify-write is needed. If the file is opened for write_only, the read will fail. Therefore, if write_only, open the file as read_write, but record it as write_only in fd, so that get_amode returns the right answer. */ @@ -103,10 +103,10 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); - /* if error, may be it was due to the change in amode above. - therefore, reopen with access mode provided by the user.*/ - fd->access_mode = orig_amode_wronly; - if (*error_code != MPI_SUCCESS) + /* if error, may be it was due to the change in amode above. + therefore, reopen with access mode provided by the user.*/ + fd->access_mode = orig_amode_wronly; + if (*error_code != MPI_SUCCESS) (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); /* if we turned off EXCL earlier, then we should turn it back on */ @@ -124,6 +124,6 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_failsafe.c b/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_failsafe.c index e7ac8719e82..65c27467eaa 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_failsafe.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_failsafe.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * * Copyright (C) 2007 UChicago/Argonne LLC * See COPYRIGHT notice in top-level directory. @@ -12,7 +12,7 @@ * as NFS where a create from one client might not be immediately * visible on another */ -void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, +void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code) { int orig_amode_excl, orig_amode_wronly; @@ -22,7 +22,7 @@ void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, /* the open should fail if the file exists. Only *1* process * should check this. Otherwise, if all processes try to check * and the file does not exist, one process will create the file - * and others who reach later will return error. */ + * and others who reach later will return error. */ if(rank == fd->hints->ranklist[0]) { fd->access_mode = access_mode; (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); @@ -52,7 +52,7 @@ void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, return; } -/* For writing with data sieving, a read-modify-write is needed. If +/* For writing with data sieving, a read-modify-write is needed. If the file is opened for write_only, the read will fail. Therefore, if write_only, open the file as read_write, but record it as write_only in fd, so that get_amode returns the right answer. */ @@ -66,10 +66,10 @@ void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); - /* if error, may be it was due to the change in amode above. - therefore, reopen with access mode provided by the user.*/ - fd->access_mode = orig_amode_wronly; - if (*error_code != MPI_SUCCESS) + /* if error, may be it was due to the change in amode above. + therefore, reopen with access mode provided by the user.*/ + fd->access_mode = orig_amode_wronly; + if (*error_code != MPI_SUCCESS) (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); if(*error_code != MPI_SUCCESS) return; @@ -83,6 +83,6 @@ void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_scalable.c b/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_scalable.c index 1c472017f53..97e0fb655a9 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_scalable.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_opencoll_scalable.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * * Copyright (C) 2007 UChicago/Argonne LLC * See COPYRIGHT notice in top-level directory. @@ -7,24 +7,24 @@ #include "adio.h" -/* +/* * Scalable open: for file systems capable of having one process - * create/open a file and broadcast the result to everyone else. + * create/open a file and broadcast the result to everyone else. * - Does not need one process to create the file * - Does not need special handling for CREATE|EXCL */ -void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank, +void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code) -{ +{ int orig_amode_wronly; /* if we are doing deferred open, non-aggregators should return now */ if (fd->hints->deferred_open && !(fd->is_agg)) { *error_code = MPI_SUCCESS; return; - } - - /* For writing with data sieving, a read-modify-write is needed. If + } + + /* For writing with data sieving, a read-modify-write is needed. If the file is opened for write_only, the read will fail. Therefore, if write_only, open the file as read_write, but record it as write_only in fd, so that get_amode returns the right answer. */ @@ -38,10 +38,10 @@ void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank, (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); - /* if error, may be it was due to the change in amode above. - therefore, reopen with access mode provided by the user.*/ - fd->access_mode = orig_amode_wronly; - if (*error_code != MPI_SUCCESS) + /* if error, may be it was due to the change in amode above. + therefore, reopen with access mode provided by the user.*/ + fd->access_mode = orig_amode_wronly; + if (*error_code != MPI_SUCCESS) (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); /* for deferred open: this process has opened the file (because if we are @@ -50,6 +50,6 @@ void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank, } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_prealloc.c b/ompi/mca/io/romio314/romio/adio/common/ad_prealloc.c index 9462f775aa6..557cff4434d 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_prealloc.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_prealloc.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -13,7 +13,7 @@ * This naive approach will get the job done, but not in a terribly efficient * manner. */ -void ADIOI_GEN_Prealloc(ADIO_File fd, ADIO_Offset diskspace, int *error_code) +void ADIOI_GEN_Prealloc(ADIO_File fd, ADIO_Offset diskspace, int *error_code) { ADIO_Offset curr_fsize, alloc_size, size, len, done, ntimes; ADIO_Status status; @@ -23,11 +23,11 @@ void ADIOI_GEN_Prealloc(ADIO_File fd, ADIO_Offset diskspace, int *error_code) static char myname[] = "ADIOI_GEN_PREALLOC"; /* will be called by one process only */ - /* On file systems with no preallocation function, we have to - explicitly write - to allocate space. Since there could be holes in the file, - we need to read up to the current file size, write it back, - and then write beyond that depending on how much + /* On file systems with no preallocation function, we have to + explicitly write + to allocate space. Since there could be holes in the file, + we need to read up to the current file size, write it back, + and then write beyond that depending on how much preallocation is needed. read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */ @@ -40,14 +40,14 @@ void ADIOI_GEN_Prealloc(ADIO_File fd, ADIO_Offset diskspace, int *error_code) alloc_size = diskspace; size = ADIOI_MIN(curr_fsize, alloc_size); - + ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ); done = 0; for (i=0; i curr_fsize) { - memset(buf, 0, ADIOI_PREALLOC_BUFSZ); + memset(buf, 0, ADIOI_PREALLOC_BUFSZ); size = alloc_size - curr_fsize; ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ; for (i=0; i #endif -void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -96,7 +96,7 @@ void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count, fd->fp_sys_posn = offset + bytes_xfered; if (file_ptr_type == ADIO_INDIVIDUAL) { - fd->fp_ind += bytes_xfered; + fd->fp_ind += bytes_xfered; } #ifdef HAVE_STATUS_SET_BYTES diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_read_coll.c b/ompi/mca/io/romio314/romio/adio/common/ad_read_coll.c index c5202a3e723..db2a6a6b222 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_read_coll.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_read_coll.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -20,7 +20,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype datatype, int nprocs, int myrank, ADIOI_Access *others_req, ADIO_Offset *offset_list, - ADIO_Offset *len_list, int contig_access_count, + ADIO_Offset *len_list, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end, @@ -28,26 +28,26 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node *flat_buf, ADIO_Offset *offset_list, ADIO_Offset *len_list, int *send_size, int *recv_size, - int *count, int *start_pos, - int *partial_send, - int *recd_from_proc, int nprocs, + int *count, int *start_pos, + int *partial_send, + int *recd_from_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, - ADIO_Offset min_st_offset, + ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - ADIOI_Access *others_req, - int iter, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + ADIOI_Access *others_req, + int iter, MPI_Aint buftype_extent, int *buf_idx); static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node - *flat_buf, char **recv_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, - unsigned *recv_size, + *flat_buf, char **recv_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, + unsigned *recv_size, MPI_Request *requests, MPI_Status *statuses, int *recd_from_proc, int nprocs, - int contig_access_count, - ADIO_Offset min_st_offset, - ADIO_Offset fd_size, ADIO_Offset *fd_start, + int contig_access_count, + ADIO_Offset min_st_offset, + ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end, MPI_Aint buftype_extent); @@ -58,15 +58,15 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, *error_code) { /* Uses a generalized version of the extended two-phase method described - in "An Extended Two-Phase Method for Accessing Sections of + in "An Extended Two-Phase Method for Accessing Sections of Out-of-Core Arrays", Rajeev Thakur and Alok Choudhary, - Scientific Programming, (5)4:301--317, Winter 1996. + Scientific Programming, (5)4:301--317, Winter 1996. http://www.mcs.anl.gov/home/thakur/ext2ph.ps */ - ADIOI_Access *my_req; + ADIOI_Access *my_req; /* array of nprocs structures, one for each other process in whose file domain this process's request lies */ - + ADIOI_Access *others_req; /* array of nprocs structures, one for each other process whose request lies in this process's file domain. */ @@ -85,7 +85,7 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, #endif if (fd->hints->cb_pfr != ADIOI_HINT_DISABLE) { - ADIOI_IOStridedColl (fd, buf, count, ADIOI_READ, datatype, + ADIOI_IOStridedColl (fd, buf, count, ADIOI_READ, datatype, file_ptr_type, offset, status, error_code); return; } @@ -108,19 +108,19 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, &offset_list, &len_list, &start_offset, - &end_offset, &contig_access_count); - + &end_offset, &contig_access_count); + #ifdef RDCOLL_DEBUG for (i=0; ihints->cb_read == ADIOI_HINT_DISABLE - || (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO))) + || (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO))) { /* don't do aggregation */ if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { @@ -187,11 +187,11 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, */ ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs, nprocs_for_coll, &min_st_offset, - &fd_start, &fd_end, + &fd_start, &fd_end, fd->hints->min_fdomain_size, &fd_size, fd->hints->striping_unit); - /* calculate where the portions of the access requests of this process + /* calculate where the portions of the access requests of this process * are located in terms of the file domains. this could be on the same * process or on other processes. this function fills in: * count_my_req_procs - number of processes (including this one) for which @@ -205,7 +205,7 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, */ ADIOI_Calc_my_req(fd, offset_list, len_list, contig_access_count, min_st_offset, fd_start, fd_end, fd_size, - nprocs, &count_my_req_procs, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, &buf_idx); @@ -216,13 +216,13 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, * count_others_req_per_proc[] - number of separate contiguous * requests from proc i lie in this process's file domain. */ - ADIOI_Calc_others_req(fd, count_my_req_procs, - count_my_req_per_proc, my_req, - nprocs, myrank, &count_others_req_procs, - &others_req); + ADIOI_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, + nprocs, myrank, &count_others_req_procs, + &others_req); - /* my_req[] and count_my_req_per_proc aren't needed at this point, so - * let's free the memory + /* my_req[] and count_my_req_per_proc aren't needed at this point, so + * let's free the memory */ ADIOI_Free(count_my_req_per_proc); for (i=0; ifp_ind : + offset_list[0] = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + (ADIO_Offset)etype_size * offset; len_list[0] = 0; *start_offset_ptr = offset_list[0]; *end_offset_ptr = offset_list[0] + len_list[0] - 1; - + return; } if (filetype_is_contig) { - *contig_access_count_ptr = 1; + *contig_access_count_ptr = 1; *offset_list_ptr = (ADIO_Offset *) ADIOI_Malloc(2*sizeof(ADIO_Offset)); *len_list_ptr = (ADIO_Offset *) ADIOI_Malloc(2*sizeof(ADIO_Offset)); /* 2 is for consistency. everywhere I malloc one more than needed */ offset_list = *offset_list_ptr; len_list = *len_list_ptr; - offset_list[0] = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + offset_list[0] = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + (ADIO_Offset)etype_size * offset; len_list[0] = (ADIO_Offset)bufcount * (ADIO_Offset)buftype_size; *start_offset_ptr = offset_list[0]; @@ -350,13 +350,13 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype else { /* First calculate what size of offset_list and len_list to allocate */ - + /* filetype already flattened in ADIO_Open or ADIO_Fcntl */ flat_file = ADIOI_Flatlist; while (flat_file->type != fd->filetype) flat_file = flat_file->next; disp = fd->disp; -#ifdef RDCOLL_DEBUG +#ifdef RDCOLL_DEBUG { int ii; DBG_FPRINTF(stderr, "flattened %3lld : ", flat_file->count ); @@ -372,7 +372,7 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype n_filetypes = (offset - flat_file->indices[0]) / filetype_extent; offset -= (ADIO_Offset)n_filetypes * filetype_extent; /* now offset is local to this extent */ - + /* find the block where offset is located, skip blocklens[i]==0 */ for (i=0; icount; i++) { ADIO_Offset dist; @@ -398,7 +398,7 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -412,7 +412,7 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype } /* abs. offset in bytes in the file */ - offset = disp + n_filetypes* (ADIO_Offset)filetype_extent + + offset = disp + n_filetypes* (ADIO_Offset)filetype_extent + abs_off_in_filetype; } @@ -433,7 +433,7 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype /* allocate space for offset_list and len_list */ *offset_list_ptr = (ADIO_Offset *) - ADIOI_Malloc((contig_access_count+1)*sizeof(ADIO_Offset)); + ADIOI_Malloc((contig_access_count+1)*sizeof(ADIO_Offset)); *len_list_ptr = (ADIO_Offset *) ADIOI_Malloc((contig_access_count+1)*sizeof(ADIO_Offset)); /* +1 to avoid a 0-size malloc */ @@ -461,12 +461,12 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype e.g., if start_offset=0 and 100 bytes to be read, end_offset=99*/ if (off + frd_size < disp + flat_file->indices[j] + - flat_file->blocklens[j] + + flat_file->blocklens[j] + n_filetypes* (ADIO_Offset)filetype_extent) { off += frd_size; /* did not reach end of contiguous block in filetype. - * no more I/O needed. off is incremented by frd_size. + * no more I/O needed. off is incremented by frd_size. */ } else { @@ -475,10 +475,10 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype while (flat_file->blocklens[j]==0) { j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; - /* hit end of flattened filetype; start at beginning + /* hit end of flattened filetype; start at beginning * again */ } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes* (ADIO_Offset)filetype_extent; frd_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i_offset); } @@ -505,7 +505,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype int *buf_idx, int *error_code) { /* Read in sizes of no more than coll_bufsize, an info parameter. - Send data to appropriate processes. + Send data to appropriate processes. Place recd. data in user buf. The idea is to reduce the amount of extra memory required for collective I/O. If all data were read all at once, which is much @@ -529,7 +529,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype *error_code = MPI_SUCCESS; /* changed below if error */ /* only I/O errors are currently reported */ - + /* calculate the number of reads of size coll_bufsize to be done by each process and the max among all processes. That gives the no. of communication phases as well. @@ -568,11 +568,11 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype ntimes = (int) ((end_loc - st_loc + coll_bufsize)/coll_bufsize); } - MPI_Allreduce(&ntimes, &max_ntimes, 1, MPI_INT, MPI_MAX, fd->comm); + MPI_Allreduce(&ntimes, &max_ntimes, 1, MPI_INT, MPI_MAX, fd->comm); read_buf = fd->io_buf; /* Allocated at open time */ - curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); + curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); /* its use is explained below. calloc initializes to 0. */ count = (int *) ADIOI_Malloc(nprocs * sizeof(int)); @@ -580,7 +580,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype in an iteration. */ partial_send = (int *) ADIOI_Calloc(nprocs, sizeof(int)); - /* if only a portion of the last off-len pair is sent to a process + /* if only a portion of the last off-len pair is sent to a process in a particular iteration, the length sent is stored here. calloc initializes to 0. */ @@ -596,7 +596,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype ADIOI_Fill_user_buffer. initialized to 0 here. */ start_pos = (int *) ADIOI_Malloc(nprocs*sizeof(int)); - /* used to store the starting value of curr_offlen_ptr[i] in + /* used to store the starting value of curr_offlen_ptr[i] in this iteration */ ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); @@ -618,9 +618,9 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype /* go through all others_req and check if any are satisfied by the current read */ - /* since MPI guarantees that displacements in filetypes are in + /* since MPI guarantees that displacements in filetypes are in monotonically nondecreasing order, I can maintain a pointer - (curr_offlen_ptr) to + (curr_offlen_ptr) to current off-len pair for each process in others_req and scan further only from there. There is still a problem of filetypes such as: (1, 2, 3 are not process nos. They are just numbers for @@ -630,7 +630,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype 2 -----!---- 3 --!----- - where ! indicates where the current read_size limitation cuts + where ! indicates where the current read_size limitation cuts through the filetype. I resolve this by reading up to !, but filling the communication buffer only for 1. I copy the portion left over for 2 into a tmp_buf for use in the next @@ -639,19 +639,19 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype other end, as only one off-len pair with incomplete data will be sent. I also don't need to send the individual offsets and lens along with the data, as the data is being - sent in a particular order. */ + sent in a particular order. */ - /* off = start offset in the file for the data actually read in - this iteration + /* off = start offset in the file for the data actually read in + this iteration size = size of data read corresponding to off real_off = off minus whatever data was retained in memory from previous iteration for cases like 2, 3 illustrated above real_size = size plus the extra corresponding to real_off - req_off = off in file for a particular contiguous request + req_off = off in file for a particular contiguous request minus what was satisfied in previous iteration req_size = size corresponding to req_off */ - size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); + size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); real_off = off - for_curr_iter; real_size = size + for_curr_iter; @@ -660,7 +660,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype for (i=0; icomm, requests+j); j++; buf_idx[i] += recv_size[i]; @@ -825,19 +825,19 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node else { /* allocate memory for recv_buf and post receives */ recv_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char*)); - for (i=0; i < nprocs; i++) - if (recv_size[i]) recv_buf[i] = + for (i=0; i < nprocs; i++) + if (recv_size[i]) recv_buf[i] = (char *) ADIOI_Malloc(recv_size[i]); j = 0; - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (recv_size[i]) { - MPI_Irecv(recv_buf[i], recv_size[i], MPI_BYTE, i, + MPI_Irecv(recv_buf[i], recv_size[i], MPI_BYTE, i, myrank+i+100*iter, fd->comm, requests+j); j++; #ifdef RDCOLL_DEBUG - DBG_FPRINTF(stderr, "node %d, recv_size %d, tag %d \n", - myrank, recv_size[i], myrank+i+100*iter); + DBG_FPRINTF(stderr, "node %d, recv_size %d, tag %d \n", + myrank, recv_size[i], myrank+i+100*iter); #endif } } @@ -855,7 +855,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node } ADIOI_Type_create_hindexed_x(count[i], &(others_req[i].lens[start_pos[i]]), - &(others_req[i].mem_ptrs[start_pos[i]]), + &(others_req[i].mem_ptrs[start_pos[i]]), MPI_BYTE, &send_type); /* absolute displacement; use MPI_BOTTOM in send */ MPI_Type_commit(&send_type); @@ -868,7 +868,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node } statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send+nprocs_recv+1) * \ - sizeof(MPI_Status)); + sizeof(MPI_Status)); /* +1 to avoid a 0-size malloc */ /* wait on the receives */ @@ -881,10 +881,10 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node #endif /* if noncontiguous, to the copies from the recv buffers */ - if (!buftype_is_contig) + if (!buftype_is_contig) ADIOI_Fill_user_buffer(fd, buf, flat_buf, recv_buf, - offset_list, len_list, (unsigned*)recv_size, - requests, statuses, recd_from_proc, + offset_list, len_list, (unsigned*)recv_size, + requests, statuses, recd_from_proc, nprocs, contig_access_count, min_st_offset, fd_size, fd_start, fd_end, buftype_extent); @@ -897,7 +897,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node ADIOI_Free(requests); if (!buftype_is_contig) { - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (recv_size[i]) ADIOI_Free(recv_buf[i]); ADIOI_Free(recv_buf); } @@ -955,14 +955,14 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node } static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node - *flat_buf, char **recv_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, - unsigned *recv_size, + *flat_buf, char **recv_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, + unsigned *recv_size, MPI_Request *requests, MPI_Status *statuses, int *recd_from_proc, int nprocs, - int contig_access_count, - ADIO_Offset min_st_offset, - ADIO_Offset fd_size, ADIO_Offset *fd_start, + int contig_access_count, + ADIO_Offset min_st_offset, + ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end, MPI_Aint buftype_extent) { @@ -981,9 +981,9 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node /* curr_from_proc[p] = amount of data recd from proc. p that has already been accounted for so far - done_from_proc[p] = amount of data already recd from proc. p and + done_from_proc[p] = amount of data already recd from proc. p and filled into user buffer in previous iterations - user_buf_idx = current location in user buffer + user_buf_idx = current location in user buffer recv_buf_idx[p] = current location in recv_buf of proc. p */ curr_from_proc = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); done_from_proc = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); @@ -1000,10 +1000,10 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node flat_buf_sz = flat_buf->blocklens[0]; /* flat_buf_idx = current index into flattened buftype - flat_buf_sz = size of current contiguous component in + flat_buf_sz = size of current contiguous component in flattened buf */ - for (i=0; i done_from_proc[p]) { if (done_from_proc[p] > curr_from_proc[p]) { - size = ADIOI_MIN(curr_from_proc[p] + len - + size = ADIOI_MIN(curr_from_proc[p] + len - done_from_proc[p], recv_size[p]-recv_buf_idx[p]); buf_incr = done_from_proc[p] - curr_from_proc[p]; ADIOI_BUF_INCR @@ -1057,7 +1057,7 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node rem_len -= len; } } - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (recv_size[i]) recd_from_proc[i] = curr_from_proc[i]; ADIOI_Free(curr_from_proc); diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_read_str.c b/ompi/mca/io/romio314/romio/adio/common/ad_read_str.c index bec361b9d83..dc2ea719adb 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_read_str.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_read_str.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -56,7 +56,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, ADIO_Offset n_filetypes, etype_in_filetype, st_n_filetypes, size_in_filetype; ADIO_Offset abs_off_in_filetype=0, new_frd_size, frd_size=0, st_frd_size; MPI_Count filetype_size, etype_size, buftype_size, partial_read; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off, req_len, sum; ADIO_Offset off, req_off, disp, end_offset=0, readbuf_off, start_off; @@ -69,7 +69,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, /* if user has disabled data sieving on reads, use naive * approach instead. */ - ADIOI_GEN_ReadStrided_naive(fd, + ADIOI_GEN_ReadStrided_naive(fd, buf, count, datatype, @@ -90,7 +90,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -105,7 +105,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, /* get max_bufsize from the info object. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL, value, + ADIOI_Info_get(fd->info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL, value, &info_flag); max_bufsize = atoi(value); ADIOI_Free(value); @@ -119,7 +119,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + (ADIO_Offset)etype_size * offset; start_off = off; @@ -132,11 +132,11 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS)) ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); - ADIO_ReadContig(fd, readbuf, readbuf_len, MPI_BYTE, + ADIO_ReadContig(fd, readbuf, readbuf_len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, readbuf_off, &status1, error_code); if (*error_code != MPI_SUCCESS) return; - for (j=0; jcount; i++) { userbuf_off = (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]; @@ -152,7 +152,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off; - ADIOI_Free(readbuf); + ADIOI_Free(readbuf); } else { /* noncontiguous in file */ @@ -194,7 +194,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -208,7 +208,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, } /* abs. offset in bytes in the file */ - offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + + offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype; } @@ -223,7 +223,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, offset, status, error_code); if (file_ptr_type == ADIO_INDIVIDUAL) { - /* update MPI-IO file pointer to point to the first byte that + /* update MPI-IO file pointer to point to the first byte that * can be accessed in the fileview. */ fd->fp_ind = offset + bufsize; if (bufsize == frd_size) { @@ -238,10 +238,10 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, + n_filetypes*filetype_extent; } } - fd->fp_sys_posn = -1; /* set it to null. */ + fd->fp_sys_posn = -1; /* set it to null. */ #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -#endif +#endif return; } @@ -287,9 +287,9 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, n_filetypes = st_n_filetypes; frd_size = ADIOI_MIN(st_frd_size, bufsize); while (i_offset < bufsize) { - if (frd_size) { - /* TYPE_UB and TYPE_LB can result in - frd_size = 0. save system call in such cases */ + if (frd_size) { + /* TYPE_UB and TYPE_LB can result in + frd_size = 0. save system call in such cases */ /* lseek(fd->fd_sys, off, SEEK_SET); err = read(fd->fd_sys, ((char *) buf) + i, frd_size);*/ @@ -312,7 +312,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; frd_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i_offset); } @@ -356,7 +356,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; new_frd_size = flat_file->blocklens[j]; @@ -385,7 +385,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, brd_size = new_brd_size; } } - + if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS)) ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); @@ -398,8 +398,8 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to - keep track of how much data was actually read and placed in buf +/* This is a temporary way of filling in status. The right way is to + keep track of how much data was actually read and placed in buf by ADIOI_BUFFERED_READ. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_read_str_naive.c b/ompi/mca/io/romio314/romio/adio/common/ad_read_str_naive.c index d616bd883a1..6ecebda4305 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_read_str_naive.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_read_str_naive.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,7 +23,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, ADIO_Offset abs_off_in_filetype=0; MPI_Count bufsize, filetype_size, buftype_size, size_in_filetype; ADIO_Offset etype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off; ADIO_Offset off, req_off, disp, end_offset=0, start_off; @@ -39,7 +39,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, buftype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -61,7 +61,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != buftype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + etype_size * offset; start_off = off; @@ -78,17 +78,17 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, */ for (b_count=0; b_count < count; b_count++) { for (b_index=0; b_index < flat_buf->count; b_index++) { - userbuf_off = (ADIO_Offset)b_count*(ADIO_Offset)buftype_extent + + userbuf_off = (ADIO_Offset)b_count*(ADIO_Offset)buftype_extent + flat_buf->indices[b_index]; req_off = off; req_len = flat_buf->blocklens[b_index]; ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off)); ADIOI_Assert(req_len == (int) req_len); - ADIO_ReadContig(fd, + ADIO_ReadContig(fd, (char *) buf + userbuf_off, - req_len, - MPI_BYTE, + req_len, + MPI_BYTE, ADIO_EXPLICIT_OFFSET, req_off, &status1, @@ -110,7 +110,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, } else { /* noncontiguous in file */ - int f_index, st_index = 0; + int f_index, st_index = 0; ADIO_Offset st_n_filetypes; ADIO_Offset st_frd_size; int flag; @@ -141,15 +141,15 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, while (!flag) { n_filetypes++; for (f_index=0; f_index < flat_file->count; f_index++) { - if (disp + flat_file->indices[f_index] + - n_filetypes*(ADIO_Offset)filetype_extent + - flat_file->blocklens[f_index] >= start_off) + if (disp + flat_file->indices[f_index] + + n_filetypes*(ADIO_Offset)filetype_extent + + flat_file->blocklens[f_index] >= start_off) { /* this block contains our starting position */ st_index = f_index; - frd_size = disp + flat_file->indices[f_index] + - n_filetypes*(ADIO_Offset)filetype_extent + + frd_size = disp + flat_file->indices[f_index] + + n_filetypes*(ADIO_Offset)filetype_extent + flat_file->blocklens[f_index] - start_off; flag = 1; break; @@ -162,7 +162,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = (int) (offset % n_etypes_in_filetype); size_in_filetype = (unsigned)etype_in_filetype * (unsigned)etype_size; - + sum = 0; for (f_index=0; f_index < flat_file->count; f_index++) { sum += flat_file->blocklens[f_index]; @@ -170,21 +170,21 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, st_index = f_index; frd_size = sum - size_in_filetype; abs_off_in_filetype = flat_file->indices[f_index] + - size_in_filetype - + size_in_filetype - (sum - flat_file->blocklens[f_index]); break; } } /* abs. offset in bytes in the file */ - start_off = disp + n_filetypes*(ADIO_Offset)filetype_extent + + start_off = disp + n_filetypes*(ADIO_Offset)filetype_extent + abs_off_in_filetype; } st_frd_size = frd_size; st_n_filetypes = n_filetypes; - /* start_off, st_n_filetypes, st_index, and st_frd_size are + /* start_off, st_n_filetypes, st_index, and st_frd_size are * all calculated at this point */ @@ -205,9 +205,9 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[f_index] + + off = disp + flat_file->indices[f_index] + n_filetypes*(ADIO_Offset)filetype_extent; - frd_size = ADIOI_MIN(flat_file->blocklens[f_index], + frd_size = ADIOI_MIN(flat_file->blocklens[f_index], bufsize-(unsigned)userbuf_off); } @@ -239,18 +239,18 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, /* while there is still space in the buffer, read more data */ while (userbuf_off < bufsize) { - if (frd_size) { - /* TYPE_UB and TYPE_LB can result in - frd_size = 0. save system call in such cases */ + if (frd_size) { + /* TYPE_UB and TYPE_LB can result in + frd_size = 0. save system call in such cases */ req_off = off; req_len = frd_size; ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off)); ADIOI_Assert(req_len == (int) req_len); - ADIO_ReadContig(fd, + ADIO_ReadContig(fd, (char *) buf + userbuf_off, - req_len, - MPI_BYTE, + req_len, + MPI_BYTE, ADIO_EXPLICIT_OFFSET, req_off, &status1, @@ -260,7 +260,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, userbuf_off += frd_size; if (off + frd_size < disp + flat_file->indices[f_index] + - flat_file->blocklens[f_index] + + flat_file->blocklens[f_index] + n_filetypes*(ADIO_Offset)filetype_extent) { /* important that this value be correct, as it is @@ -278,9 +278,9 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, f_index = 0; n_filetypes++; } - off = disp + flat_file->indices[f_index] + + off = disp + flat_file->indices[f_index] + n_filetypes*(ADIO_Offset)filetype_extent; - frd_size = ADIOI_MIN(flat_file->blocklens[f_index], + frd_size = ADIOI_MIN(flat_file->blocklens[f_index], bufsize-(unsigned)userbuf_off); } } @@ -313,10 +313,10 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off)); ADIOI_Assert(req_len == (int) req_len); - ADIO_ReadContig(fd, + ADIO_ReadContig(fd, (char *) buf + userbuf_off, - req_len, - MPI_BYTE, + req_len, + MPI_BYTE, ADIO_EXPLICIT_OFFSET, req_off, &status1, @@ -332,7 +332,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[f_index] + + off = disp + flat_file->indices[f_index] + n_filetypes*(ADIO_Offset)filetype_extent; new_frd_size = flat_file->blocklens[f_index]; @@ -362,7 +362,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, } /* unlock the file region if we locked it */ - if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && + if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); @@ -375,8 +375,8 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, buftype, bufsize); - /* This is a temporary way of filling in status. The right way is to - * keep track of how much data was actually read and placed in buf + /* This is a temporary way of filling in status. The right way is to + * keep track of how much data was actually read and placed in buf */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_resize.c b/ompi/mca/io/romio314/romio/adio/common/ad_resize.c index a6be2c17608..0f166cbc2f4 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_resize.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_resize.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -20,7 +20,7 @@ void ADIOI_GEN_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) /* first aggregator performs ftruncate() */ if (rank == fd->hints->ranklist[0]) { - ADIOI_Assert(size == (off_t) size); + ADIOI_Assert(size == (off_t) size); err = ftruncate(fd->fd_sys, (off_t)size); } diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_seek.c b/ompi/mca/io/romio314/romio/adio/common/ad_seek.c index ceaf6f2d62d..b987fe6d023 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_seek.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_seek.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -11,11 +11,11 @@ #include #endif -ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, +ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, int whence, int *error_code) { /* implemented for whence=SEEK_SET only. SEEK_CUR and SEEK_END must - be converted to the equivalent with SEEK_SET before calling this + be converted to the equivalent with SEEK_SET before calling this routine. */ /* offset is in units of etype relative to the filetype */ @@ -46,7 +46,7 @@ ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, /* Since offset relative to the filetype size, we can't do compute the offset when that result is zero. Return zero for the offset for now */ - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return 0; } @@ -54,7 +54,7 @@ ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -73,7 +73,7 @@ ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, /* * we used to call lseek here and update both fp_ind and fp_sys_posn, but now * we don't seek and only update fp_ind (ROMIO's idea of where we are in the - * file). We leave the system file descriptor and fp_sys_posn alone. + * file). We leave the system file descriptor and fp_sys_posn alone. * The fs-specifc ReadContig and WriteContig will seek to the correct place in * the file before reading/writing if the 'offset' parameter doesn't match * fp_sys_posn diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_set_sh_fp.c b/ompi/mca/io/romio314/romio/adio/common/ad_set_sh_fp.c index c55f2efe5a9..b936d205513 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_set_sh_fp.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_set_sh_fp.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "adio.h" -/* set the shared file pointer to "offset" etypes relative to the current +/* set the shared file pointer to "offset" etypes relative to the current view */ void ADIOI_NFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code); @@ -25,20 +25,20 @@ void ADIO_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code) if (fd->shared_fp_fd == ADIO_FILE_NULL) { MPI_Comm_dup(MPI_COMM_SELF, &dupcommself); - fd->shared_fp_fd = ADIO_Open(MPI_COMM_SELF, dupcommself, - fd->shared_fp_fname, + fd->shared_fp_fd = ADIO_Open(MPI_COMM_SELF, dupcommself, + fd->shared_fp_fname, fd->file_system, fd->fns, - ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, + ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, 0, MPI_BYTE, MPI_BYTE, - MPI_INFO_NULL, + MPI_INFO_NULL, ADIO_PERM_NULL, error_code); } if (*error_code != MPI_SUCCESS) return; ADIOI_WRITE_LOCK(fd->shared_fp_fd, 0, SEEK_SET, sizeof(ADIO_Offset)); - ADIO_WriteContig(fd->shared_fp_fd, &offset, sizeof(ADIO_Offset), + ADIO_WriteContig(fd->shared_fp_fd, &offset, sizeof(ADIO_Offset), MPI_BYTE, ADIO_EXPLICIT_OFFSET, 0, &status, error_code); ADIOI_UNLOCK(fd->shared_fp_fd, 0, SEEK_SET, sizeof(ADIO_Offset)); } diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_set_view.c b/ompi/mca/io/romio314/romio/adio/common/ad_set_view.c index 31aa6c6dd50..2b8ef46b2d1 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_set_view.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_set_view.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -12,13 +12,13 @@ * deferred open easier if we know ADIO_Fcntl will always need a file to really * be open. set_view doesn't modify anything related to the open files. */ -void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype, - MPI_Datatype filetype, MPI_Info info, int *error_code) +void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype, + MPI_Datatype filetype, MPI_Info info, int *error_code) { int combiner, i, j, k, err, filetype_is_contig; MPI_Datatype copy_etype, copy_filetype; ADIOI_Flatlist_node *flat_file; - /* free copies of old etypes and filetypes and delete flattened + /* free copies of old etypes and filetypes and delete flattened version of filetype if necessary */ MPI_Type_get_envelope(fd->etype, &i, &j, &k, &combiner); @@ -43,7 +43,7 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype, fd->etype = copy_etype; } MPI_Type_get_envelope(filetype, &i, &j, &k, &combiner); - if (combiner == MPI_COMBINER_NAMED) + if (combiner == MPI_COMBINER_NAMED) fd->filetype = filetype; else { MPI_Type_contiguous(1, filetype, ©_filetype); @@ -64,7 +64,7 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype, if (filetype_is_contig) fd->fp_ind = disp; else { flat_file = ADIOI_Flatlist; - while (flat_file->type != fd->filetype) + while (flat_file->type != fd->filetype) flat_file = flat_file->next; for (i=0; icount; i++) { if (flat_file->blocklens[i]) { diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_subarray.c b/ompi/mca/io/romio314/romio/adio/common/ad_subarray.c index c4597646ad6..e7984ac3814 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_subarray.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_subarray.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -9,11 +9,11 @@ #include "adio_extern.h" int ADIO_Type_create_subarray(int ndims, - int *array_of_sizes, + int *array_of_sizes, int *array_of_subsizes, int *array_of_starts, int order, - MPI_Datatype oldtype, + MPI_Datatype oldtype, MPI_Datatype *newtype) { MPI_Aint extent, disps[3], size; @@ -31,7 +31,7 @@ int ADIO_Type_create_subarray(int ndims, MPI_Type_vector(array_of_subsizes[1], array_of_subsizes[0], array_of_sizes[0], oldtype, &tmp1); - + size = (MPI_Aint)array_of_sizes[0]*extent; for (i=2; i=0; i--) { size *= (MPI_Aint)array_of_sizes[i+1]; @@ -69,7 +69,7 @@ int ADIO_Type_create_subarray(int ndims, tmp1 = tmp2; } } - + /* add displacement and UB */ disps[1] = array_of_starts[ndims-1]; size = 1; @@ -78,18 +78,18 @@ int ADIO_Type_create_subarray(int ndims, disps[1] += size*(MPI_Aint)array_of_starts[i]; } } - + disps[1] *= extent; - + disps[2] = extent; for (i=0; i #endif -/* Workaround for incomplete set of definitions if __REDIRECT is not +/* Workaround for incomplete set of definitions if __REDIRECT is not defined and large file support is used in aio.h */ #if !defined(__REDIRECT) && defined(__USE_FILE_OFFSET64) #define aiocb aiocb64 @@ -40,8 +40,8 @@ * to complete. */ void ADIOI_GEN_IOComplete(ADIO_Request *request, ADIO_Status *status, - int *error_code) + int *error_code) { return; - + } diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_wait_fake.c b/ompi/mca/io/romio314/romio/adio/common/ad_wait_fake.c index 16947baa1fb..72905080c90 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_wait_fake.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_wait_fake.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_write.c b/ompi/mca/io/romio314/romio/adio/common/ad_write.c index 34a31d963f7..2e8692d64b4 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_write.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_write.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ void ADIOI_GEN_WriteContig(ADIO_File fd, const void *buf, int count, fd->fp_sys_posn = offset + bytes_xfered; if (file_ptr_type == ADIO_INDIVIDUAL) { - fd->fp_ind += bytes_xfered; + fd->fp_ind += bytes_xfered; } #ifdef ROMIO_GPFS diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_write_coll.c b/ompi/mca/io/romio314/romio/adio/common/ad_write_coll.c index d585f9e09fa..266f97d6246 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_write_coll.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_write_coll.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -22,31 +22,31 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype ADIO_Offset *fd_start, ADIO_Offset *fd_end, int *buf_idx, int *error_code); static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, - ADIOI_Flatlist_node *flat_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, + ADIOI_Flatlist_node *flat_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, - int *count, int *start_pos, int *partial_recv, - int *sent_to_proc, int nprocs, + int *count, int *start_pos, int *partial_recv, + int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - ADIOI_Access *others_req, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + ADIOI_Access *others_req, int *send_buf_idx, int *curr_to_proc, - int *done_to_proc, int *hole, int iter, + int *done_to_proc, int *hole, int iter, MPI_Aint buftype_extent, int *buf_idx, int *error_code); static void ADIOI_Fill_send_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node - *flat_buf, char **send_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, - MPI_Request *requests, int *sent_to_proc, - int nprocs, int myrank, + *flat_buf, char **send_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, + MPI_Request *requests, int *sent_to_proc, + int nprocs, int myrank, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - int *send_buf_idx, int *curr_to_proc, - int *done_to_proc, int iter, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + int *send_buf_idx, int *curr_to_proc, + int *done_to_proc, int iter, MPI_Aint buftype_extent); -void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, +void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, ADIO_Offset *srt_off, int *srt_len, int *start_pos, int nprocs, int nprocs_recv, int total_elements); @@ -57,15 +57,15 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, *error_code) { /* Uses a generalized version of the extended two-phase method described - in "An Extended Two-Phase Method for Accessing Sections of + in "An Extended Two-Phase Method for Accessing Sections of Out-of-Core Arrays", Rajeev Thakur and Alok Choudhary, - Scientific Programming, (5)4:301--317, Winter 1996. + Scientific Programming, (5)4:301--317, Winter 1996. http://www.mcs.anl.gov/home/thakur/ext2ph.ps */ - ADIOI_Access *my_req; + ADIOI_Access *my_req; /* array of nprocs access structures, one for each other process in whose file domain this process's request lies */ - + ADIOI_Access *others_req; /* array of nprocs access structures, one for each other process whose request lies in this process's file domain. */ @@ -80,7 +80,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, ADIO_Offset *len_list = NULL; int old_error, tmp_error; - if (fd->hints->cb_pfr != ADIOI_HINT_DISABLE) { + if (fd->hints->cb_pfr != ADIOI_HINT_DISABLE) { /* Cast away const'ness as the below function is used for read * and write */ ADIOI_IOStridedColl (fd, (char *) buf, count, ADIOI_WRITE, datatype, @@ -107,12 +107,12 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, &offset_list, &len_list, &start_offset, - &end_offset, &contig_access_count); + &end_offset, &contig_access_count); - /* each process communicates its start and end offsets to other + /* each process communicates its start and end offsets to other processes. The result is an array each of start and end offsets stored - in order of process rank. */ - + in order of process rank. */ + st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs*sizeof(ADIO_Offset)); end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs*sizeof(ADIO_Offset)); @@ -123,7 +123,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, /* are the accesses of different processes interleaved? */ for (i=1; ihints->min_fdomain_size, &fd_size, - fd->hints->striping_unit); + fd->hints->striping_unit); /* calculate what portions of the access requests of this process are @@ -178,22 +178,22 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, ADIOI_Calc_my_req(fd, offset_list, len_list, contig_access_count, min_st_offset, fd_start, fd_end, fd_size, - nprocs, &count_my_req_procs, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, - &buf_idx); + &buf_idx); /* based on everyone's my_req, calculate what requests of other processes lie in this process's file domain. count_others_req_procs = number of processes whose requests lie in - this process's file domain (including this process itself) + this process's file domain (including this process itself) count_others_req_per_proc[i] indicates how many separate contiguous requests of proc. i lie in this process's file domain. */ - ADIOI_Calc_others_req(fd, count_my_req_procs, - count_my_req_per_proc, my_req, + ADIOI_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, nprocs, myrank, - &count_others_req_procs, &others_req); - + &count_others_req_procs, &others_req); + ADIOI_Free(count_my_req_per_proc); for (i=0; i < nprocs; i++) { if (my_req[i].count) { @@ -214,7 +214,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, * it's possible to have those subsequent writes on other processes * race ahead and sneak in before the read-modify-write completes. * We carry out a collective communication at the end here so no one - * can start independent i/o before collective I/O completes. + * can start independent i/o before collective I/O completes. * * need to do some gymnastics with the error codes so that if something * went wrong, all processes report error, but if a process has a more @@ -229,12 +229,12 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_postwrite_a, 0, NULL ); #endif - if (fd->hints->cb_nodes == 1) - MPI_Bcast(error_code, 1, MPI_INT, + if (fd->hints->cb_nodes == 1) + MPI_Bcast(error_code, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); else { tmp_error = *error_code; - MPI_Allreduce(&tmp_error, error_code, 1, MPI_INT, + MPI_Allreduce(&tmp_error, error_code, 1, MPI_INT, MPI_MAX, fd->comm); } #ifdef ADIOI_MPE_LOGGING @@ -277,7 +277,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, bufsize = size * count; MPIR_Status_set_bytes(status, datatype, bufsize); } -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written during collective I/O. */ #endif @@ -293,7 +293,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, * code is created and returned in error_code. */ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype - datatype, int nprocs, + datatype, int nprocs, int myrank, ADIOI_Access *others_req, ADIO_Offset *offset_list, @@ -303,7 +303,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype int *buf_idx, int *error_code) { /* Send data to appropriate processes and write in sizes of no more - than coll_bufsize. + than coll_bufsize. The idea is to reduce the amount of extra memory required for collective I/O. If all data were written all at once, which is much easier, it would require temp space more than the size of user_buf, @@ -334,7 +334,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype That gives the no. of communication phases as well. */ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); - ADIOI_Info_get(fd->info, "cb_buffer_size", MPI_MAX_INFO_VAL, value, + ADIOI_Info_get(fd->info, "cb_buffer_size", MPI_MAX_INFO_VAL, value, &info_flag); coll_bufsize = atoi(value); ADIOI_Free(value); @@ -364,11 +364,11 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype } MPI_Allreduce(&ntimes, &max_ntimes, 1, MPI_INT, MPI_MAX, - fd->comm); + fd->comm); write_buf = fd->io_buf; - curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); + curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); /* its use is explained below. calloc initializes to 0. */ count = (int *) ADIOI_Malloc(nprocs*sizeof(int)); @@ -397,7 +397,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype /* Above three are used in ADIOI_Fill_send_buffer*/ start_pos = (int *) ADIOI_Malloc(nprocs*sizeof(int)); - /* used to store the starting value of curr_offlen_ptr[i] in + /* used to store the starting value of curr_offlen_ptr[i] in this iteration */ ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); @@ -427,15 +427,15 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype /* go through all others_req and check which will be satisfied by the current write */ - /* Note that MPI guarantees that displacements in filetypes are in + /* Note that MPI guarantees that displacements in filetypes are in monotonically nondecreasing order and that, for writes, the filetypes cannot specify overlapping regions in the file. This simplifies implementation a bit compared to reads. */ - /* off = start offset in the file for the data to be written in - this iteration + /* off = start offset in the file for the data to be written in + this iteration size = size of data written (bytes) corresponding to off - req_off = off in file for a particular contiguous request + req_off = off in file for a particular contiguous request minus what was satisfied in previous iteration req_size = size corresponding to req_off */ @@ -443,7 +443,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype for (i=0; i < nprocs; i++) count[i] = recv_size[i] = 0; - size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); + size = ADIOI_MIN((unsigned)coll_bufsize, end_loc-st_loc+1-done); for (i=0; i < nprocs; i++) { if (others_req[i].count) { @@ -453,7 +453,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype /* this request may have been partially satisfied in the previous iteration. */ req_off = others_req[i].offsets[j] + - partial_recv[i]; + partial_recv[i]; req_len = others_req[i].lens[j] - partial_recv[i]; partial_recv[i] = 0; @@ -468,10 +468,10 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype if (req_off < off + size) { count[i]++; ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIR_Upint)(write_buf+req_off-off)); - MPI_Address(write_buf+req_off-off, + MPI_Address(write_buf+req_off-off, &(others_req[i].mem_ptrs[j])); ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off)); - recv_size[i] += (int)(ADIOI_MIN(off + size - req_off, + recv_size[i] += (int)(ADIOI_MIN(off + size - req_off, (unsigned)req_len)); if (off+size-req_off < (unsigned)req_len) @@ -479,9 +479,9 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype partial_recv[i] = (int) (off + size - req_off); /* --BEGIN ERROR HANDLING-- */ - if ((j+1 < others_req[i].count) && + if ((j+1 < others_req[i].count) && (others_req[i].offsets[j+1] < off+size)) - { + { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, @@ -501,16 +501,16 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype curr_offlen_ptr[i] = j; } } - - ADIOI_W_Exchange_data(fd, buf, write_buf, flat_buf, offset_list, - len_list, send_size, recv_size, off, size, count, - start_pos, partial_recv, - sent_to_proc, nprocs, myrank, + + ADIOI_W_Exchange_data(fd, buf, write_buf, flat_buf, offset_list, + len_list, send_size, recv_size, off, size, count, + start_pos, partial_recv, + sent_to_proc, nprocs, myrank, buftype_is_contig, contig_access_count, min_st_offset, fd_size, fd_start, fd_end, others_req, send_buf_idx, curr_to_proc, done_to_proc, &hole, m, buftype_extent, buf_idx, - error_code); + error_code); if (*error_code != MPI_SUCCESS) return; flag = 0; @@ -519,7 +519,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype if (flag) { ADIOI_Assert(size == (int)size); - ADIO_WriteContig(fd, write_buf, (int)size, MPI_BYTE, ADIO_EXPLICIT_OFFSET, + ADIO_WriteContig(fd, write_buf, (int)size, MPI_BYTE, ADIO_EXPLICIT_OFFSET, off, &status, error_code); if (*error_code != MPI_SUCCESS) return; } @@ -532,15 +532,15 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype for (m=ntimes; matomicity) { /* bug fix from Wei-keng Liao and Kenin Coloma */ requests = (MPI_Request *) - ADIOI_Malloc((nprocs_send+1)*sizeof(MPI_Request)); + ADIOI_Malloc((nprocs_send+1)*sizeof(MPI_Request)); send_req = requests; } else { - requests = (MPI_Request *) - ADIOI_Malloc((nprocs_send+nprocs_recv+1)*sizeof(MPI_Request)); + requests = (MPI_Request *) + ADIOI_Malloc((nprocs_send+nprocs_recv+1)*sizeof(MPI_Request)); /* +1 to avoid a 0-size malloc */ /* post receives */ @@ -724,10 +724,10 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, #endif if (buftype_is_contig) { j = 0; - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) { - MPI_Isend(((char *) buf) + buf_idx[i], send_size[i], - MPI_BYTE, i, myrank+i+100*iter, fd->comm, + MPI_Isend(((char *) buf) + buf_idx[i], send_size[i], + MPI_BYTE, i, myrank+i+100*iter, fd->comm, send_req+j); j++; buf_idx[i] += send_size[i]; @@ -736,16 +736,16 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, else if (nprocs_send) { /* buftype is not contig */ send_buf = (char **) ADIOI_Malloc(nprocs*sizeof(char*)); - for (i=0; i < nprocs; i++) - if (send_size[i]) + for (i=0; i < nprocs; i++) + if (send_size[i]) send_buf[i] = (char *) ADIOI_Malloc(send_size[i]); ADIOI_Fill_send_buffer(fd, buf, flat_buf, send_buf, - offset_list, len_list, send_size, + offset_list, len_list, send_size, send_req, - sent_to_proc, nprocs, myrank, + sent_to_proc, nprocs, myrank, contig_access_count, - min_st_offset, fd_size, fd_start, fd_end, + min_st_offset, fd_size, fd_start, fd_end, send_buf_idx, curr_to_proc, done_to_proc, iter, buftype_extent); /* the send is done in ADIOI_Fill_send_buffer */ @@ -766,16 +766,16 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, for (i=0; iatomicity) { /* bug fix from Wei-keng Liao and Kenin Coloma */ statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send+1) * \ - sizeof(MPI_Status)); + sizeof(MPI_Status)); /* +1 to avoid a 0-size malloc */ } else { statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send+nprocs_recv+1) * \ - sizeof(MPI_Status)); + sizeof(MPI_Status)); /* +1 to avoid a 0-size malloc */ } @@ -802,7 +802,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, ADIOI_Free(statuses); ADIOI_Free(requests); if (!buftype_is_contig && nprocs_send) { - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) ADIOI_Free(send_buf[i]); ADIOI_Free(send_buf); } @@ -861,14 +861,14 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, static void ADIOI_Fill_send_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node - *flat_buf, char **send_buf, ADIO_Offset - *offset_list, ADIO_Offset *len_list, int *send_size, - MPI_Request *requests, int *sent_to_proc, - int nprocs, int myrank, - int contig_access_count, + *flat_buf, char **send_buf, ADIO_Offset + *offset_list, ADIO_Offset *len_list, int *send_size, + MPI_Request *requests, int *sent_to_proc, + int nprocs, int myrank, + int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, - ADIO_Offset *fd_start, ADIO_Offset *fd_end, - int *send_buf_idx, int *curr_to_proc, + ADIO_Offset *fd_start, ADIO_Offset *fd_end, + int *send_buf_idx, int *curr_to_proc, int *done_to_proc, int iter, MPI_Aint buftype_extent) { @@ -881,9 +881,9 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node /* curr_to_proc[p] = amount of data sent to proc. p that has already been accounted for so far - done_to_proc[p] = amount of data already sent to proc. p in + done_to_proc[p] = amount of data already sent to proc. p in previous iterations - user_buf_idx = current location in user buffer + user_buf_idx = current location in user buffer send_buf_idx[p] = current location in send_buf of proc. p */ for (i=0; i < nprocs; i++) { @@ -898,10 +898,10 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node flat_buf_sz = flat_buf->blocklens[0]; /* flat_buf_idx = current index into flattened buftype - flat_buf_sz = size of current contiguous component in + flat_buf_sz = size of current contiguous component in flattened buf */ - for (i=0; i done_to_proc[p]) { if (done_to_proc[p] > curr_to_proc[p]) { - size = ADIOI_MIN(curr_to_proc[p] + len - + size = ADIOI_MIN(curr_to_proc[p] + len - done_to_proc[p], send_size[p]-send_buf_idx[p]); buf_incr = done_to_proc[p] - curr_to_proc[p]; ADIOI_BUF_INCR @@ -942,7 +942,7 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node ADIOI_BUF_COPY } if (send_buf_idx[p] == send_size[p]) { - MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, + MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, myrank+p+100*iter, fd->comm, requests+jj); jj++; } @@ -962,13 +962,13 @@ static void ADIOI_Fill_send_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node rem_len -= len; } } - for (i=0; i < nprocs; i++) + for (i=0; i < nprocs; i++) if (send_size[i]) sent_to_proc[i] = curr_to_proc[i]; } -void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, +void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, ADIO_Offset *srt_off, int *srt_len, int *start_pos, int nprocs, int nprocs_recv, int total_elements) { @@ -998,7 +998,7 @@ void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, heapsize = nprocs_recv; for (i=heapsize/2 - 1; i>=0; i--) { /* Heapify(a, i, heapsize); Algorithm from Cormen et al. pg. 143 - modified for a heap with smallest element at root. I have + modified for a heap with smallest element at root. I have removed the recursion so that there are no function calls. Function calls are too expensive. */ k = i; @@ -1006,12 +1006,12 @@ void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, l = 2*(k+1) - 1; r = 2*(k+1); - if ((l < heapsize) && + if ((l < heapsize) && (*(a[l].off_list) < *(a[k].off_list))) smallest = l; else smallest = k; - if ((r < heapsize) && + if ((r < heapsize) && (*(a[r].off_list) < *(a[smallest].off_list))) smallest = r; @@ -1023,11 +1023,11 @@ void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, a[k].off_list = a[smallest].off_list; a[k].len_list = a[smallest].len_list; a[k].nelem = a[smallest].nelem; - + a[smallest].off_list = tmp.off_list; a[smallest].len_list = tmp.len_list; a[smallest].nelem = tmp.nelem; - + k = smallest; } else break; @@ -1057,12 +1057,12 @@ void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, l = 2*(k+1) - 1; r = 2*(k+1); - if ((l < heapsize) && + if ((l < heapsize) && (*(a[l].off_list) < *(a[k].off_list))) smallest = l; else smallest = k; - if ((r < heapsize) && + if ((r < heapsize) && (*(a[r].off_list) < *(a[smallest].off_list))) smallest = r; @@ -1074,11 +1074,11 @@ void ADIOI_Heap_merge(ADIOI_Access *others_req, int *count, a[k].off_list = a[smallest].off_list; a[k].len_list = a[smallest].len_list; a[k].nelem = a[smallest].nelem; - + a[smallest].off_list = tmp.off_list; a[smallest].len_list = tmp.len_list; a[smallest].nelem = tmp.nelem; - + k = smallest; } else break; diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_write_nolock.c b/ompi/mca/io/romio314/romio/adio/common/ad_write_nolock.c index 704819843ed..42b5ff2d3ab 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_write_nolock.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_write_nolock.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -21,7 +21,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, * cannot or do not support client-side buffering * Does not do data sieving optimization * Does contain write-combining optimization for noncontig in memory, contig in - * file + * file */ /* offset is in units of etype relative to the filetype. */ @@ -62,7 +62,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -75,7 +75,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Type_size_x(datatype, &buftype_size); MPI_Type_extent(datatype, &buftype_extent); etype_size = fd->etype_size; - + ADIOI_Assert((buftype_size * count) == ((ADIO_Offset)(unsigned)buftype_size * (ADIO_Offset)count)); bufsize = buftype_size * count; @@ -112,8 +112,8 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, if (flat_buf->blocklens[i] > combine_buf_remain && combine_buf != combine_buf_ptr) { /* there is data in the buffer; write out the buffer so far */ #ifdef IO_DEBUG - printf("[%d/%d] nc mem c file (0) writing loc = %Ld sz = %Ld\n", - rank, nprocs, off, + printf("[%d/%d] nc mem c file (0) writing loc = %Ld sz = %Ld\n", + rank, nprocs, off, fd->hints->ind_wr_buffer_size-combine_buf_remain); #endif #ifdef ADIOI_MPE_LOGGING @@ -138,8 +138,8 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, * write directly */ #ifdef IO_DEBUG - printf("[%d/%d] nc mem c file (1) writing loc = %Ld sz = %d\n", - rank, nprocs, off, + printf("[%d/%d] nc mem c file (1) writing loc = %Ld sz = %d\n", + rank, nprocs, off, flat_buf->blocklens[i]); #endif ADIOI_Assert(flat_buf->blocklens[i] == (unsigned)flat_buf->blocklens[i]); @@ -171,8 +171,8 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, if (combine_buf_ptr != combine_buf) { /* data left in buffer to write */ #ifdef IO_DEBUG - printf("[%d/%d] nc mem c file (2) writing loc = %Ld sz = %Ld\n", - rank, nprocs, off, + printf("[%d/%d] nc mem c file (2) writing loc = %Ld sz = %Ld\n", + rank, nprocs, off, fd->hints->ind_wr_buffer_size-combine_buf_remain); #endif #ifdef ADIOI_MPE_LOGGING @@ -219,11 +219,11 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, int i; n_filetypes++; for (i=0; icount; i++) { - if (disp + flat_file->indices[i] + - n_filetypes*(ADIO_Offset)filetype_extent + flat_file->blocklens[i] + if (disp + flat_file->indices[i] + + n_filetypes*(ADIO_Offset)filetype_extent + flat_file->blocklens[i] >= offset) { st_index = i; - fwr_size = disp + flat_file->indices[i] + + fwr_size = disp + flat_file->indices[i] + n_filetypes*(ADIO_Offset)filetype_extent + flat_file->blocklens[i] - offset; flag = 1; @@ -238,7 +238,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -265,14 +265,14 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, off = offset; fwr_size = ADIOI_MIN(fwr_size, bufsize); while (i_offset < bufsize) { - if (fwr_size) { - /* TYPE_UB and TYPE_LB can result in - fwr_size = 0. save system call in such cases */ + if (fwr_size) { + /* TYPE_UB and TYPE_LB can result in + fwr_size = 0. save system call in such cases */ #ifdef ADIOI_MPE_LOGGING MPE_Log_event(ADIOI_MPE_lseek_a, 0, NULL); #endif #ifdef IO_DEBUG - printf("[%d/%d] c mem nc file writing loc = %Ld sz = %d\n", + printf("[%d/%d] c mem nc file writing loc = %Ld sz = %d\n", rank, nprocs, off, fwr_size); #endif err_lseek = lseek(fd->fd_sys, off, SEEK_SET); @@ -302,7 +302,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, j = 0; n_filetypes++; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i_offset); } @@ -325,18 +325,18 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, size = ADIOI_MIN(fwr_size, bwr_size); if (size) { #ifdef IO_DEBUG - printf("[%d/%d] nc mem nc file writing loc = %Ld sz = %d\n", + printf("[%d/%d] nc mem nc file writing loc = %Ld sz = %d\n", rank, nprocs, off, size); #endif #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); #endif lseek(fd->fd_sys, off, SEEK_SET); -#ifdef ADIOI_MPE_LOGGING +#ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL ); #endif if (err == -1) err_flag = 1; -#ifdef ADIOI_MPE_LOGGING +#ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif ADIOI_Assert(size == (size_t) size); @@ -359,7 +359,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; new_fwr_size = flat_file->blocklens[j]; @@ -375,7 +375,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, k = (k + 1)%flat_buf->count; buf_count++; indx = buftype_extent*(buf_count/flat_buf->count) + - flat_buf->indices[k]; + flat_buf->indices[k]; new_bwr_size = flat_buf->blocklens[k]; if (size != fwr_size) { off += size; @@ -402,7 +402,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_write_str.c b/ompi/mca/io/romio314/romio/adio/common/ad_write_str.c index f3b6c8960b3..624aeb12285 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_write_str.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_write_str.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -122,7 +122,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, ADIO_Offset num, size, n_filetypes, etype_in_filetype, st_n_filetypes; ADIO_Offset n_etypes_in_filetype, abs_off_in_filetype=0; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off; ADIO_Offset off, req_off, disp, end_offset=0, writebuf_off, start_off; @@ -138,7 +138,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, * approach instead. */ - ADIOI_GEN_WriteStrided_naive(fd, + ADIOI_GEN_WriteStrided_naive(fd, buf, count, datatype, @@ -160,7 +160,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -184,7 +184,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != datatype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + (ADIO_Offset)etype_size * offset; start_off = off; @@ -194,10 +194,10 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, writebuf_len = (unsigned) (ADIOI_MIN(max_bufsize, end_offset-writebuf_off+1)); /* if atomicity is true, lock the region to be accessed */ - if (fd->atomicity) + if (fd->atomicity) ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); - for (j=0; jcount; i++) { userbuf_off = (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]; @@ -212,7 +212,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); - if (fd->atomicity) + if (fd->atomicity) ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); if (*error_code != MPI_SUCCESS) goto fn_exit; @@ -259,7 +259,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; @@ -273,7 +273,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, } /* abs. offset in bytes in the file */ - offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + + offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype; } @@ -293,7 +293,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, offset, status, error_code); if (file_ptr_type == ADIO_INDIVIDUAL) { - /* update MPI-IO file pointer to point to the first byte + /* update MPI-IO file pointer to point to the first byte * that can be accessed in the fileview. */ fd->fp_ind = offset + bufsize; if (bufsize == fwr_size) { @@ -308,10 +308,10 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, + (ADIO_Offset)n_filetypes*filetype_extent; } } - fd->fp_sys_posn = -1; /* set it to null. */ + fd->fp_sys_posn = -1; /* set it to null. */ #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, datatype, bufsize); -#endif +#endif goto fn_exit; } @@ -335,13 +335,13 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i_offset); } /* if atomicity is true, lock the region to be accessed */ - if (fd->atomicity) + if (fd->atomicity) ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); writebuf_off = 0; @@ -360,9 +360,9 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes = st_n_filetypes; fwr_size = ADIOI_MIN(st_fwr_size, bufsize); while (i_offset < bufsize) { - if (fwr_size) { - /* TYPE_UB and TYPE_LB can result in - fwr_size = 0. save system call in such cases */ + if (fwr_size) { + /* TYPE_UB and TYPE_LB can result in + fwr_size = 0. save system call in such cases */ /* lseek(fd->fd_sys, off, SEEK_SET); err = write(fd->fd_sys, ((char *) buf) + i_offset, fwr_size);*/ @@ -385,9 +385,9 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, j = (j+1) % flat_file->count; n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; - fwr_size = ADIOI_MIN(flat_file->blocklens[j], + fwr_size = ADIOI_MIN(flat_file->blocklens[j], bufsize-i_offset); } } @@ -431,7 +431,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, n_filetypes += (j == 0) ? 1 : 0; } - off = disp + flat_file->indices[j] + + off = disp + flat_file->indices[j] + n_filetypes*(ADIO_Offset)filetype_extent; new_fwr_size = flat_file->blocklens[j]; @@ -447,7 +447,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, k = (k + 1)%flat_buf->count; buf_count++; i_offset = (ADIO_Offset)buftype_extent*(ADIO_Offset)(buf_count/flat_buf->count) + - flat_buf->indices[k]; + flat_buf->indices[k]; new_bwr_size = flat_buf->blocklens[k]; if (size != fwr_size) { off += size; @@ -460,15 +460,15 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, } } - /* write the buffer out finally */ + /* write the buffer out finally */ if (writebuf_len) { ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); - if (!(fd->atomicity)) + if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); if (*error_code != MPI_SUCCESS) goto fn_exit; } - if (fd->atomicity) + if (fd->atomicity) ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off; @@ -479,7 +479,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES /* datatypes returning negagive values, probably related to tt 1893 */ MPIR_Status_set_bytes(status, datatype, bufsize); -/* This is a temporary way of filling in status. The right way is to +/* This is a temporary way of filling in status. The right way is to keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/ad_write_str_naive.c b/ompi/mca/io/romio314/romio/adio/common/ad_write_str_naive.c index f59c02d4278..591c66f6a96 100644 --- a/ompi/mca/io/romio314/romio/adio/common/ad_write_str_naive.c +++ b/ompi/mca/io/romio314/romio/adio/common/ad_write_str_naive.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,14 +17,14 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, ADIOI_Flatlist_node *flat_buf, *flat_file; /* bwr == buffer write; fwr == file write */ - ADIO_Offset bwr_size, fwr_size=0, sum, size_in_filetype; + ADIO_Offset bwr_size, fwr_size=0, sum, size_in_filetype; int b_index; MPI_Count bufsize; ADIO_Offset n_etypes_in_filetype; ADIO_Offset size, n_filetypes, etype_in_filetype; ADIO_Offset abs_off_in_filetype=0, req_len; MPI_Count filetype_size, etype_size, buftype_size; - MPI_Aint filetype_extent, buftype_extent; + MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; ADIO_Offset userbuf_off; ADIO_Offset off, req_off, disp, end_offset=0, start_off; @@ -40,7 +40,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, buftype, 0); #endif - *error_code = MPI_SUCCESS; + *error_code = MPI_SUCCESS; return; } @@ -62,7 +62,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, flat_buf = ADIOI_Flatlist; while (flat_buf->type != buftype) flat_buf = flat_buf->next; - off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : + off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind : fd->disp + (ADIO_Offset)etype_size * offset; start_off = off; @@ -79,17 +79,17 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, */ for (b_count=0; b_count < count; b_count++) { for (b_index=0; b_index < flat_buf->count; b_index++) { - userbuf_off = (ADIO_Offset)b_count*(ADIO_Offset)buftype_extent + + userbuf_off = (ADIO_Offset)b_count*(ADIO_Offset)buftype_extent + flat_buf->indices[b_index]; req_off = off; req_len = flat_buf->blocklens[b_index]; ADIOI_Assert(req_len == (int) req_len); ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off)); - ADIO_WriteContig(fd, + ADIO_WriteContig(fd, (char *) buf + userbuf_off, - (int)req_len, - MPI_BYTE, + (int)req_len, + MPI_BYTE, ADIO_EXPLICIT_OFFSET, req_off, &status1, @@ -141,15 +141,15 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, while (!flag) { n_filetypes++; for (f_index=0; f_index < flat_file->count; f_index++) { - if (disp + flat_file->indices[f_index] + - n_filetypes*(ADIO_Offset)filetype_extent + - flat_file->blocklens[f_index] >= start_off) + if (disp + flat_file->indices[f_index] + + n_filetypes*(ADIO_Offset)filetype_extent + + flat_file->blocklens[f_index] >= start_off) { /* this block contains our starting position */ st_index = f_index; - fwr_size = disp + flat_file->indices[f_index] + - n_filetypes*(ADIO_Offset)filetype_extent + + fwr_size = disp + flat_file->indices[f_index] + + n_filetypes*(ADIO_Offset)filetype_extent + flat_file->blocklens[f_index] - start_off; flag = 1; break; @@ -162,7 +162,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (f_index=0; f_index < flat_file->count; f_index++) { sum += flat_file->blocklens[f_index]; @@ -170,21 +170,21 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, st_index = f_index; fwr_size = sum - size_in_filetype; abs_off_in_filetype = flat_file->indices[f_index] + - size_in_filetype - + size_in_filetype - (sum - flat_file->blocklens[f_index]); break; } } /* abs. offset in bytes in the file */ - start_off = disp + n_filetypes*(ADIO_Offset)filetype_extent + + start_off = disp + n_filetypes*(ADIO_Offset)filetype_extent + abs_off_in_filetype; } st_fwr_size = fwr_size; st_n_filetypes = n_filetypes; - /* start_off, st_n_filetypes, st_index, and st_fwr_size are + /* start_off, st_n_filetypes, st_index, and st_fwr_size are * all calculated at this point */ @@ -205,9 +205,9 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[f_index] + + off = disp + flat_file->indices[f_index] + n_filetypes*(ADIO_Offset)filetype_extent; - fwr_size = ADIOI_MIN(flat_file->blocklens[f_index], + fwr_size = ADIOI_MIN(flat_file->blocklens[f_index], bufsize-(unsigned)userbuf_off); } @@ -239,18 +239,18 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, /* while there is still space in the buffer, write more data */ while (userbuf_off < bufsize) { - if (fwr_size) { - /* TYPE_UB and TYPE_LB can result in - fwr_size = 0. save system call in such cases */ + if (fwr_size) { + /* TYPE_UB and TYPE_LB can result in + fwr_size = 0. save system call in such cases */ req_off = off; req_len = fwr_size; ADIOI_Assert(req_len == (int) req_len); ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off)); - ADIO_WriteContig(fd, + ADIO_WriteContig(fd, (char *) buf + userbuf_off, - (int)req_len, - MPI_BYTE, + (int)req_len, + MPI_BYTE, ADIO_EXPLICIT_OFFSET, req_off, &status1, @@ -260,7 +260,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, userbuf_off += fwr_size; if (off + fwr_size < disp + flat_file->indices[f_index] + - flat_file->blocklens[f_index] + + flat_file->blocklens[f_index] + n_filetypes*(ADIO_Offset)filetype_extent) { /* important that this value be correct, as it is @@ -278,9 +278,9 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, f_index = 0; n_filetypes++; } - off = disp + flat_file->indices[f_index] + + off = disp + flat_file->indices[f_index] + n_filetypes*(ADIO_Offset)filetype_extent; - fwr_size = ADIOI_MIN(flat_file->blocklens[f_index], + fwr_size = ADIOI_MIN(flat_file->blocklens[f_index], bufsize-(unsigned)userbuf_off); } } @@ -313,10 +313,10 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, ADIOI_Assert(req_len == (int) req_len); ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off)); - ADIO_WriteContig(fd, + ADIO_WriteContig(fd, (char *) buf + userbuf_off, - (int)req_len, - MPI_BYTE, + (int)req_len, + MPI_BYTE, ADIO_EXPLICIT_OFFSET, req_off, &status1, @@ -332,7 +332,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, n_filetypes++; } - off = disp + flat_file->indices[f_index] + + off = disp + flat_file->indices[f_index] + n_filetypes*(ADIO_Offset)filetype_extent; new_fwr_size = flat_file->blocklens[f_index]; @@ -374,8 +374,8 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count, #ifdef HAVE_STATUS_SET_BYTES MPIR_Status_set_bytes(status, buftype, bufsize); - /* This is a temporary way of filling in status. The right way is to - * keep track of how much data was actually written and placed in buf + /* This is a temporary way of filling in status. The right way is to + * keep track of how much data was actually written and placed in buf */ #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/adi_close.c b/ompi/mca/io/romio314/romio/adio/common/adi_close.c index cdc18737850..e11984259a7 100644 --- a/ompi/mca/io/romio314/romio/adio/common/adi_close.c +++ b/ompi/mca/io/romio314/romio/adio/common/adi_close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/async_list.c b/ompi/mca/io/romio314/romio/adio/common/async_list.c index 239dbe587ba..6e7c7345763 100644 --- a/ompi/mca/io/romio314/romio/adio/common/async_list.c +++ b/ompi/mca/io/romio314/romio/adio/common/async_list.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -23,7 +23,7 @@ ADIOI_Async_node *ADIOI_Malloc_async_node(void) if (!ADIOI_Async_avail_head) { ADIOI_Async_avail_head = (ADIOI_Async_node *) - ADIOI_Malloc(NUM*sizeof(ADIOI_Async_node)); + ADIOI_Malloc(NUM*sizeof(ADIOI_Async_node)); curr = ADIOI_Async_avail_head; for (i=1; inext = ADIOI_Async_avail_head+i; @@ -35,7 +35,7 @@ ADIOI_Async_node *ADIOI_Malloc_async_node(void) /* keep track of malloced area that needs to be freed later */ if (!ADIOI_Malloc_async_tail) { ADIOI_Malloc_async_tail = (ADIOI_Malloc_async *) - ADIOI_Malloc(sizeof(ADIOI_Malloc_async)); + ADIOI_Malloc(sizeof(ADIOI_Malloc_async)); ADIOI_Malloc_async_head = ADIOI_Malloc_async_tail; ADIOI_Malloc_async_head->ptr = ADIOI_Async_avail_head; ADIOI_Malloc_async_head->next = NULL; @@ -94,7 +94,7 @@ void ADIOI_Add_req_to_list(ADIO_Request *request) (*request)->ptr_in_async_list = ADIOI_Async_list_tail; } } - + /* Sets error_code to MPI_SUCCESS on success, creates an error code on * failure. */ @@ -113,7 +113,7 @@ void ADIOI_Complete_async(int *error_code) while (ADIOI_Async_list_head) { request = ADIOI_Async_list_head->request; (*request)->queued = -1; /* ugly internal hack that prevents - ADIOI_xxxComplete from freeing the request object. + ADIOI_xxxComplete from freeing the request object. This is required, because the user will call MPI_Wait later, which would require status to be filled. */ switch ((*request)->optype) { @@ -152,7 +152,7 @@ void ADIOI_Del_req_from_list(ADIO_Request *request) { /* Delete a request that has already been completed from the async list and move it to the list of available nodes. Typically called - from within an ADIO_Test/ADIO_Wait. */ + from within an ADIO_Test/ADIO_Wait. */ ADIOI_Async_node *curr, *prev, *next; diff --git a/ompi/mca/io/romio314/romio/adio/common/byte_offset.c b/ompi/mca/io/romio314/romio/adio/common/byte_offset.c index df0a240849a..b7350f1faa8 100644 --- a/ompi/mca/io/romio314/romio/adio/common/byte_offset.c +++ b/ompi/mca/io/romio314/romio/adio/common/byte_offset.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "adio.h" #include "adio_extern.h" -/* Returns the absolute byte position in the file corresponding to +/* Returns the absolute byte position in the file corresponding to "offset" etypes relative to the current view. */ void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, ADIO_Offset *disp) @@ -34,7 +34,7 @@ void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, ADIO_Offset *disp) n_filetypes = offset / n_etypes_in_filetype; etype_in_filetype = offset % n_etypes_in_filetype; size_in_filetype = etype_in_filetype * etype_size; - + sum = 0; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; diff --git a/ompi/mca/io/romio314/romio/adio/common/cb_config_list.c b/ompi/mca/io/romio314/romio/adio/common/cb_config_list.c index 626709f8444..468105c5ae0 100644 --- a/ompi/mca/io/romio314/romio/adio/common/cb_config_list.c +++ b/ompi/mca/io/romio314/romio/adio/common/cb_config_list.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2001 University of Chicago. + * Copyright (C) 2001 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -41,15 +41,15 @@ static char *token_ptr; /* internal stuff */ static int get_max_procs(int cb_nodes); -static int match_procs(char *name, int max_per_proc, char *procnames[], +static int match_procs(char *name, int max_per_proc, char *procnames[], char used_procnames[], - int nr_procnames, int ranks[], int nr_ranks, + int nr_procnames, int ranks[], int nr_ranks, int *nr_ranks_allocated); static int match_this_proc(char *name, int cur_proc, int max_matches, char *procnames[], char used_procnames[], - int nr_procnames, int ranks[], + int nr_procnames, int ranks[], int nr_ranks, int nr_ranks_allocated); -static int find_name(char *name, char *procnames[], char used_procnames[], +static int find_name(char *name, char *procnames[], char used_procnames[], int nr_procnames, int start_ind); static int cb_config_list_lex(void); @@ -86,7 +86,7 @@ int ADIOI_cb_bcast_rank_map(ADIO_File fd) return error_code; } } - MPI_Bcast(fd->hints->ranklist, fd->hints->cb_nodes, MPI_INT, 0, + MPI_Bcast(fd->hints->ranklist, fd->hints->cb_nodes, MPI_INT, 0, fd->comm); } /* TEMPORARY -- REMOVE WHEN NO LONGER UPDATING INFO FOR @@ -121,7 +121,7 @@ int ADIOI_cb_bcast_rank_map(ADIO_File fd) * * Returns 0 on success, -1 on failure. * - * NOTE: Needs some work to cleanly handle out of memory cases! + * NOTE: Needs some work to cleanly handle out of memory cases! */ int ADIOI_cb_gather_name_array(MPI_Comm comm, MPI_Comm dupcomm, @@ -135,7 +135,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, if (ADIOI_cb_config_list_keyval == MPI_KEYVAL_INVALID) { /* cleaned up by ADIOI_End_call */ - MPI_Keyval_create((MPI_Copy_function *) ADIOI_cb_copy_name_array, + MPI_Keyval_create((MPI_Copy_function *) ADIOI_cb_copy_name_array, (MPI_Delete_function *) ADIOI_cb_delete_name_array, &ADIOI_cb_config_list_keyval, NULL); } @@ -171,7 +171,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, procname = array->names; /* simpler to read */ procname_len = (int *) ADIOI_Malloc(commsize * sizeof(int)); - if (procname_len == NULL) { + if (procname_len == NULL) { return -1; } } @@ -181,7 +181,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, array->names = NULL; } /* gather lengths first */ - MPI_Gather(&my_procname_len, 1, MPI_INT, + MPI_Gather(&my_procname_len, 1, MPI_INT, procname_len, 1, MPI_INT, 0, dupcomm); if (commrank == 0) { @@ -195,11 +195,11 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, for (i=0; i < commsize; i++) { /* add one to the lengths because we need to count the * terminator, and we are going to use this list of lengths - * again in the gatherv. + * again in the gatherv. */ alloc_size += ++procname_len[i]; } - + procname[0] = ADIOI_Malloc(alloc_size); if (procname[0] == NULL) { return -1; @@ -208,7 +208,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, for (i=1; i < commsize; i++) { procname[i] = procname[i-1] + procname_len[i-1]; } - + /* create our list of displacements for the gatherv. we're going * to do everything relative to the start of the region allocated * for procname[0] @@ -223,7 +223,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, /* now gather strings */ if (commrank == 0) { - MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, + MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, procname[0], procname_len, disp, MPI_CHAR, 0, dupcomm); } @@ -231,7 +231,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, /* if we didn't do this, we would need to allocate procname[] * on all processes...which seems a little silly. */ - MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, + MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, NULL, NULL, NULL, MPI_CHAR, 0, dupcomm); } @@ -248,7 +248,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, } /* store the attribute; we want to store SOMETHING on all processes - * so that they can all tell if we have gone through this procedure + * so that they can all tell if we have gone through this procedure * or not for the given communicator. * * specifically we put it on both the original comm, so we can find @@ -262,7 +262,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, } -/* ADIOI_cb_config_list_parse() - parse the cb_config_list and build the +/* ADIOI_cb_config_list_parse() - parse the cb_config_list and build the * ranklist * * Parameters: @@ -270,9 +270,9 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, * * Returns number of ranks allocated in parsing, -1 on error. */ -int ADIOI_cb_config_list_parse(char *config_list, +int ADIOI_cb_config_list_parse(char *config_list, ADIO_cb_name_array array, - int ranklist[], + int ranklist[], int cb_nodes) { int token, max_procs, cur_rank = 0, nr_procnames; @@ -349,7 +349,7 @@ int ADIOI_cb_config_list_parse(char *config_list, ADIOI_Free(used_procnames); return cur_rank; } - + if (token == AGG_WILDCARD) { cur_procname_p = NULL; } @@ -385,17 +385,17 @@ int ADIOI_cb_config_list_parse(char *config_list, /* ADIOI_cb_copy_name_array() - attribute copy routine */ -int ADIOI_cb_copy_name_array(MPI_Comm comm, - int keyval, - void *extra, +int ADIOI_cb_copy_name_array(MPI_Comm comm, + int keyval, + void *extra, void *attr_in, - void **attr_out, + void **attr_out, int *flag) { ADIO_cb_name_array array; ADIOI_UNREFERENCED_ARG(comm); - ADIOI_UNREFERENCED_ARG(keyval); + ADIOI_UNREFERENCED_ARG(keyval); ADIOI_UNREFERENCED_ARG(extra); array = (ADIO_cb_name_array) attr_in; @@ -403,15 +403,15 @@ int ADIOI_cb_copy_name_array(MPI_Comm comm, *attr_out = attr_in; *flag = 1; /* make a copy in the new communicator */ - + return MPI_SUCCESS; } /* ADIOI_cb_delete_name_array() - attribute destructor */ -int ADIOI_cb_delete_name_array(MPI_Comm comm, - int keyval, - void *attr_val, +int ADIOI_cb_delete_name_array(MPI_Comm comm, + int keyval, + void *attr_val, void *extra) { ADIO_cb_name_array array; @@ -427,7 +427,7 @@ int ADIOI_cb_delete_name_array(MPI_Comm comm, /* time to free the structures (names, array of ptrs to names, struct) */ if (array->namect) { - /* Note that array->names[i], where i > 0, + /* Note that array->names[i], where i > 0, * are just pointers into the allocated region array->names[0] */ ADIOI_Free(array->names[0]); @@ -439,7 +439,7 @@ int ADIOI_cb_delete_name_array(MPI_Comm comm, } /* match_procs() - given a name (or NULL for wildcard) and a max. number - * of aggregator processes (per processor name), this + * of aggregator processes (per processor name), this * matches in the procnames[] array and puts appropriate * ranks in the ranks array. * @@ -456,8 +456,8 @@ int ADIOI_cb_delete_name_array(MPI_Comm comm, * * Returns number of matches. */ -static int match_procs(char *name, - int max_per_proc, +static int match_procs(char *name, + int max_per_proc, char *procnames[], char used_procnames[], int nr_procnames, @@ -466,7 +466,7 @@ static int match_procs(char *name, int *nr_ranks_allocated) { int wildcard_proc, cur_proc, old_nr_allocated, ret; - + /* save this so we can report on progress */ old_nr_allocated = *nr_ranks_allocated; @@ -493,8 +493,8 @@ static int match_procs(char *name, while (nr_ranks - *nr_ranks_allocated > 0) { /* find a name */ - while ((wildcard_proc < nr_procnames) && - (used_procnames[wildcard_proc] != 0)) + while ((wildcard_proc < nr_procnames) && + (used_procnames[wildcard_proc] != 0)) { wildcard_proc++; } @@ -505,7 +505,7 @@ static int match_procs(char *name, } #ifdef CB_CONFIG_LIST_DEBUG - FPRINTF(stderr, "performing wildcard match (*:%d) starting with %s (%d)\n", + FPRINTF(stderr, "performing wildcard match (*:%d) starting with %s (%d)\n", max_per_proc, procnames[wildcard_proc], wildcard_proc); #endif @@ -521,7 +521,7 @@ static int match_procs(char *name, * our while loop. */ ranks[*nr_ranks_allocated] = cur_proc; - *nr_ranks_allocated = *nr_ranks_allocated + 1; + *nr_ranks_allocated = *nr_ranks_allocated + 1; cur_proc++; /* so, to accomplish this we use the match_this_proc() to @@ -534,7 +534,7 @@ static int match_procs(char *name, nr_procnames, ranks, nr_ranks, *nr_ranks_allocated); if (ret > 0) *nr_ranks_allocated = *nr_ranks_allocated + ret; - + /* clean up and point wildcard_proc to the next entry, since * we know that this one is NULL now. */ @@ -556,7 +556,7 @@ static int match_procs(char *name, return *nr_ranks_allocated - old_nr_allocated; } -/* match_this_proc() - find each instance of processor name "name" in +/* match_this_proc() - find each instance of processor name "name" in * the "procnames" array, starting with index "cur_proc" * and add the first "max_matches" into the "ranks" * array. remove all instances of "name" from @@ -581,8 +581,8 @@ static int match_this_proc(char *name, int max_matches, char *procnames[], char used_procnames[], - int nr_procnames, - int ranks[], + int nr_procnames, + int ranks[], int nr_ranks, int nr_ranks_allocated) { @@ -592,11 +592,11 @@ static int match_this_proc(char *name, /* calculate how many ranks we want to allocate */ ranks_remaining = nr_ranks - nr_ranks_allocated; - nr_to_alloc = (max_matches < ranks_remaining) ? + nr_to_alloc = (max_matches < ranks_remaining) ? max_matches : ranks_remaining; while (nr_to_alloc > 0) { - cur_proc = find_name(name, procnames, used_procnames, nr_procnames, + cur_proc = find_name(name, procnames, used_procnames, nr_procnames, cur_proc); if (cur_proc < 0) { /* didn't find it */ @@ -612,14 +612,14 @@ static int match_this_proc(char *name, ranks[nr_ranks_allocated] = cur_proc; nr_ranks_allocated++; used_procnames[cur_proc] = 1; - + cur_proc++; nr_to_alloc--; } - + /* take all other instances of this host out of the list */ while (cur_proc >= 0) { - cur_proc = find_name(name, procnames, used_procnames, nr_procnames, + cur_proc = find_name(name, procnames, used_procnames, nr_procnames, cur_proc); if (cur_proc >= 0) { #ifdef CB_CONFIG_LIST_DEBUG @@ -632,17 +632,17 @@ static int match_this_proc(char *name, } return nr_ranks_allocated - old_nr_allocated; } - + /* find_name() - finds the first entry in procnames[] which matches name, * starting at index start_ind * * Returns an index [0..nr_procnames-1] on success, -1 if not found. */ -static int find_name(char *name, - char *procnames[], +static int find_name(char *name, + char *procnames[], char used_procnames[], - int nr_procnames, + int nr_procnames, int start_ind) { int i; @@ -689,7 +689,7 @@ static int get_max_procs(int cb_nodes) /* strip off next comma (if there is one) */ token = cb_config_list_lex(); if (token != AGG_COMMA && token != AGG_EOS) return -1; - + /* return max_procs */ if (max_procs < 0) return -1; else return max_procs; @@ -708,7 +708,7 @@ static int get_max_procs(int cb_nodes) #define COLON ':' #define COMMA ';' #define DELIMS ":;" -#else +#else /* these tokens work for every other platform */ #define COLON ':' #define COMMA ',' @@ -745,7 +745,7 @@ static int cb_config_list_lex(void) /* it would be a good idea to look at the string and make sure that * it doesn't have any illegal characters in it. in particular we - * should ensure that no one tries to use wildcards with strings + * should ensure that no one tries to use wildcards with strings * (e.g. "ccn*"). */ ADIOI_Strncpy(yylval, token_ptr, slen); diff --git a/ompi/mca/io/romio314/romio/adio/common/eof_offset.c b/ompi/mca/io/romio314/romio/adio/common/eof_offset.c index 0fb3539fc1a..724746317fd 100644 --- a/ompi/mca/io/romio314/romio/adio/common/eof_offset.c +++ b/ompi/mca/io/romio314/romio/adio/common/eof_offset.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "adio.h" #include "adio_extern.h" -/* return the current end of file in etype units relative to the +/* return the current end of file in etype units relative to the current view */ void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset) @@ -26,24 +26,24 @@ void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset) ADIO_Fcntl(fd, ADIO_FCNTL_GET_FSIZE, fcntl_struct, &error_code); fsize = fcntl_struct->fsize; ADIOI_Free(fcntl_struct); - + /* Find the offset in etype units corresponding to eof. - The eof could lie in a hole in the current view, or in the + The eof could lie in a hole in the current view, or in the middle of an etype. In that case the offset will be the offset corresponding to the start of the next etype in the current view.*/ ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); etype_size = fd->etype_size; - if (filetype_is_contig) + if (filetype_is_contig) *eof_offset = (fsize - fd->disp + etype_size - 1)/etype_size; /* ceiling division in case fsize is not a multiple of etype_size;*/ else { /* filetype already flattened in ADIO_Open */ flat_file = ADIOI_Flatlist; - while (flat_file->type != fd->filetype) + while (flat_file->type != fd->filetype) flat_file = flat_file->next; - + MPI_Type_size_x(fd->filetype, &filetype_size); MPI_Type_extent(fd->filetype, &filetype_extent); @@ -55,14 +55,14 @@ void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset) n_filetypes++; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; - if (disp + flat_file->indices[i] + - n_filetypes* ADIOI_AINT_CAST_TO_OFFSET filetype_extent + + if (disp + flat_file->indices[i] + + n_filetypes* ADIOI_AINT_CAST_TO_OFFSET filetype_extent + flat_file->blocklens[i] >= fsize) { - if (disp + flat_file->indices[i] + + if (disp + flat_file->indices[i] + n_filetypes * ADIOI_AINT_CAST_TO_OFFSET filetype_extent >= fsize) sum -= flat_file->blocklens[i]; else { - rem = (disp + flat_file->indices[i] + + rem = (disp + flat_file->indices[i] + n_filetypes* ADIOI_AINT_CAST_TO_OFFSET filetype_extent + flat_file->blocklens[i] - fsize); sum -= rem; diff --git a/ompi/mca/io/romio314/romio/adio/common/error.c b/ompi/mca/io/romio314/romio/adio/common/error.c index e990a5e1819..6417b943cb2 100644 --- a/ompi/mca/io/romio314/romio/adio/common/error.c +++ b/ompi/mca/io/romio314/romio/adio/common/error.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -14,7 +14,7 @@ int ADIOI_Error(ADIO_File fd, int error_code, char *string) { char buf[MPI_MAX_ERROR_STRING]; - int myrank, result_len; + int myrank, result_len; MPI_Errhandler err_handler; if (fd == ADIO_FILE_NULL) err_handler = ADIOI_DFLT_ERR_HANDLER; diff --git a/ompi/mca/io/romio314/romio/adio/common/flatten.c b/ompi/mca/io/romio314/romio/adio/common/flatten.c index 86c2875e55e..88590d9719c 100644 --- a/ompi/mca/io/romio314/romio/adio/common/flatten.c +++ b/ompi/mca/io/romio314/romio/adio/common/flatten.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -26,10 +26,10 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype) ADIOI_Flatlist_node *flat, *prev=0; /* check if necessary to flatten. */ - + /* is it entirely contiguous? */ ADIOI_Datatype_iscontig(datatype, &is_contig); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: is_contig %#X\n",is_contig); #endif if (is_contig) return; @@ -38,7 +38,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype) flat = ADIOI_Flatlist; while (flat) { if (flat->type == datatype) { - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: found datatype %#X\n", datatype); #endif return; @@ -60,7 +60,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype) flat->indices = NULL; flat->count = ADIOI_Count_contiguous_blocks(datatype, &curr_index); -#ifdef FLATTEN_DEBUG +#ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: count %llX, cur_idx = %#llX\n",flat->count,curr_index); #endif /* DBG_FPRINTF(stderr, "%d\n", flat->count);*/ @@ -69,17 +69,17 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype) flat->blocklens = (ADIO_Offset *) ADIOI_Malloc(flat->count * sizeof(ADIO_Offset)); flat->indices = (ADIO_Offset *) ADIOI_Malloc(flat->count * sizeof(ADIO_Offset)); } - + curr_index = 0; #ifdef HAVE_MPIR_TYPE_FLATTEN flatten_idx = (MPI_Aint) flat->count; MPIR_Type_flatten(datatype, flat->indices, flat->blocklens, &flatten_idx); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: MPIR_Type_flatten\n"); #endif #else ADIOI_Flatten(datatype, flat, 0, &curr_index); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: ADIOI_Flatten\n"); #endif @@ -89,7 +89,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype) #ifdef FLATTEN_DEBUG { int i; - for (i=0; icount; i++) + for (i=0; icount; i++) DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: i %#X, blocklens %#llX, indices %#llX\n", i, flat->blocklens[i], @@ -104,13 +104,13 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype) * * Assumption: input datatype is not a basic!!!! */ -void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, +void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, ADIO_Offset st_offset, MPI_Count *curr_index) { int i, k, m, n, basic_num, nonzeroth, is_hindexed_block=0; int combiner, old_combiner, old_is_contig; int nints, nadds, ntypes, old_nints, old_nadds, old_ntypes; - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset top_count; MPI_Count j, old_size, prev_index, num; @@ -124,7 +124,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, types = (MPI_Datatype *) ADIOI_Malloc((ntypes+1)*sizeof(MPI_Datatype)); MPI_Type_get_contents(datatype, nints, nadds, ntypes, ints, adds, types); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: st_offset %#llX, curr_index %#llX\n",st_offset,*curr_index); DBG_FPRINTF(stderr,"ADIOI_Flatten:: nints %#X, nadds %#X, ntypes %#X\n",nints, nadds, ntypes); for(i=0; i< nints; ++i) @@ -150,11 +150,11 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, switch (combiner) { #ifdef MPIIMPL_HAVE_MPI_COMBINER_DUP case MPI_COMBINER_DUP: - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_DUP\n"); #endif MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) ADIOI_Flatten(types[0], flat, st_offset, curr_index); @@ -165,7 +165,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, { int dims = ints[0]; MPI_Datatype stype; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_SUBARRAY\n"); #endif @@ -186,7 +186,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, { int dims = ints[2]; MPI_Datatype dtype; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_DARRAY\n"); #endif @@ -200,12 +200,12 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, ints[4*dims+3], /* order */ types[0], &dtype); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_DARRAY indices[%#X] %#llX, flat->blocklens[%#X] %#llX, st_offset %#llX, curr_index %#llX);\n", 0, flat->indices[0], 0, flat->blocklens[0], st_offset, *curr_index); #endif ADIOI_Flatten(dtype, flat, st_offset, curr_index); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_DARRAY >ADIOI_Flatten(dtype, flat->indices[%#X] %#llX, flat->blocklens[%#X] %#llX, st_offset %#llX, curr_index %#llX);\n", 0, flat->indices[0], 0, flat->blocklens[0], st_offset, *curr_index); #endif @@ -214,12 +214,12 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, break; #endif case MPI_COMBINER_CONTIGUOUS: - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_CONTIGUOUS\n"); #endif top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -232,7 +232,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, flat->indices[j] = st_offset; MPI_Type_size_x(types[0], &old_size); flat->blocklens[j] = top_count * old_size; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",j, flat->indices[j], j, flat->blocklens[j]); #endif (*curr_index)++; @@ -248,7 +248,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, for (i=0; iindices[j] = flat->indices[j-num] + ADIOI_AINT_CAST_TO_OFFSET old_extent; flat->blocklens[j] = flat->blocklens[j-num]; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: derived flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",j, flat->indices[j], j, flat->blocklens[j]); #endif j++; @@ -258,13 +258,13 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } break; - case MPI_COMBINER_VECTOR: - #ifdef FLATTEN_DEBUG + case MPI_COMBINER_VECTOR: + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_VECTOR\n"); #endif top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -273,7 +273,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, if (prev_index == *curr_index) { /* simplest case, vector of basic or contiguous types */ - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset blocklength = ints[1], stride = ints[2]; j = *curr_index; @@ -288,7 +288,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } else { /* vector of noncontiguous derived types */ - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset blocklength = ints[1], stride = ints[2]; @@ -320,14 +320,14 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } break; - case MPI_COMBINER_HVECTOR: - case MPI_COMBINER_HVECTOR_INTEGER: - #ifdef FLATTEN_DEBUG + case MPI_COMBINER_HVECTOR: + case MPI_COMBINER_HVECTOR_INTEGER: + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_HVECTOR_INTEGER\n"); #endif top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -336,7 +336,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, if (prev_index == *curr_index) { /* simplest case, vector of basic or contiguous types */ - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset blocklength = ints[1]; j = *curr_index; @@ -351,7 +351,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } else { /* vector of noncontiguous derived types */ - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset blocklength = ints[1]; @@ -383,20 +383,20 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } break; - case MPI_COMBINER_INDEXED: - #ifdef FLATTEN_DEBUG + case MPI_COMBINER_INDEXED: + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_INDEXED\n"); #endif top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); MPI_Type_extent(types[0], &old_extent); prev_index = *curr_index; if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) { - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset stride = ints[top_count+1]; ADIOI_Flatten(types[0], flat, @@ -407,7 +407,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, /* simplest case, indexed type made up of basic or contiguous types */ j = *curr_index; for (i=j, nonzeroth=i; i2G integer arithmetic problems */ ADIO_Offset blocklength = ints[1+i-j], stride = ints[top_count+1+i-j]; if (blocklength > 0) { @@ -452,7 +452,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, num = *curr_index - prev_index; prev_index = *curr_index; for (m=0, nonzeroth=j; m2G integer arithmetic problems */ ADIO_Offset stride = ints[top_count+1+i]-ints[top_count+i]; if (flat->blocklens[j-num] > 0 ) { @@ -490,19 +490,19 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, /* deliberate fall-through */ #endif case MPI_COMBINER_INDEXED_BLOCK: - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_INDEXED_BLOCK\n"); #endif top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); MPI_Type_extent(types[0], &old_extent); prev_index = *curr_index; if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) { - /* By using ADIO_Offset we preserve +/- sign and + /* By using ADIO_Offset we preserve +/- sign and avoid >2G integer arithmetic problems */ ADIO_Offset stride = ints[1+1]; if (is_hindexed_block) { @@ -518,7 +518,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, /* simplest case, indexed type made up of basic or contiguous types */ j = *curr_index; for (i=j; i2G integer arithmetic problems */ ADIO_Offset blocklength = ints[1]; if (is_hindexed_block) { @@ -577,20 +577,20 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } break; - case MPI_COMBINER_HINDEXED: + case MPI_COMBINER_HINDEXED: case MPI_COMBINER_HINDEXED_INTEGER: - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_HINDEXED_INTEGER\n"); #endif top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) { - ADIOI_Flatten(types[0], flat, st_offset+adds[0], curr_index); + ADIOI_Flatten(types[0], flat, st_offset+adds[0], curr_index); } if (prev_index == *curr_index) { @@ -668,15 +668,15 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } break; - case MPI_COMBINER_STRUCT: - case MPI_COMBINER_STRUCT_INTEGER: - #ifdef FLATTEN_DEBUG + case MPI_COMBINER_STRUCT: + case MPI_COMBINER_STRUCT_INTEGER: + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_STRUCT_INTEGER\n"); #endif top_count = ints[0]; for (n=0; n2G integer arithmetic problems */ if (ints[1+n] > 0 || types[n] == MPI_LB || types[n] == MPI_UB) { ADIO_Offset blocklength = ints[1+n]; @@ -723,8 +723,8 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, } break; - case MPI_COMBINER_RESIZED: - #ifdef FLATTEN_DEBUG + case MPI_COMBINER_RESIZED: + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: MPI_COMBINER_RESIZED\n"); #endif @@ -738,7 +738,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, * marker */ flat->blocklens[j] = 0; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",0,adds[0],j, flat->indices[j], j, flat->blocklens[j]); #endif @@ -747,7 +747,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, /* handle the datatype */ MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) { @@ -760,7 +760,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, MPI_Type_size_x(types[0], &old_size); flat->blocklens[j] = old_size; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",0,adds[0],j, flat->indices[j], j, flat->blocklens[j]); #endif @@ -774,7 +774,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, * constructor of this resized type */ flat->blocklens[j] = 0; - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",1,adds[1],j, flat->indices[j], j, flat->blocklens[j]); #endif @@ -802,7 +802,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, ADIOI_Free(adds); ADIOI_Free(types); - #ifdef FLATTEN_DEBUG + #ifdef FLATTEN_DEBUG DBG_FPRINTF(stderr,"ADIOI_Flatten:: return st_offset %#llX, curr_index %#llX\n",st_offset,*curr_index); #endif @@ -837,7 +837,7 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i #ifdef MPIIMPL_HAVE_MPI_COMBINER_DUP case MPI_COMBINER_DUP: MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); if ((old_combiner != MPI_COMBINER_NAMED) && (!old_is_contig)) count = ADIOI_Count_contiguous_blocks(types[0], curr_index); @@ -896,7 +896,7 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i case MPI_COMBINER_CONTIGUOUS: top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -904,7 +904,7 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i count = ADIOI_Count_contiguous_blocks(types[0], curr_index); else count = 1; - if (prev_index == *curr_index) + if (prev_index == *curr_index) /* simplest case, made up of basic or contiguous types */ (*curr_index)++; else { @@ -917,10 +917,10 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i case MPI_COMBINER_VECTOR: case MPI_COMBINER_HVECTOR: - case MPI_COMBINER_HVECTOR_INTEGER: + case MPI_COMBINER_HVECTOR_INTEGER: top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -950,12 +950,12 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i } break; - case MPI_COMBINER_INDEXED: + case MPI_COMBINER_INDEXED: case MPI_COMBINER_HINDEXED: case MPI_COMBINER_HINDEXED_INTEGER: top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -991,7 +991,7 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i case MPI_COMBINER_INDEXED_BLOCK: top_count = ints[0]; MPI_Type_get_envelope(types[0], &old_nints, &old_nadds, - &old_ntypes, &old_combiner); + &old_ntypes, &old_combiner); ADIOI_Datatype_iscontig(types[0], &old_is_contig); prev_index = *curr_index; @@ -1019,13 +1019,13 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i } break; - case MPI_COMBINER_STRUCT: - case MPI_COMBINER_STRUCT_INTEGER: + case MPI_COMBINER_STRUCT: + case MPI_COMBINER_STRUCT_INTEGER: top_count = ints[0]; count = 0; for (n=0; ncount - 1); i++) { if ((flat_type->indices[i] + flat_type->blocklens[i] != @@ -1140,7 +1140,7 @@ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type) j++; opt_indices[j] = flat_type->indices[i + 1]; opt_blocklens[j] = flat_type->blocklens[i + 1]; - } + } } flat_type->count = opt_blocks; ADIOI_Free(flat_type->blocklens); diff --git a/ompi/mca/io/romio314/romio/adio/common/get_fp_posn.c b/ompi/mca/io/romio314/romio/adio/common/get_fp_posn.c index 671dde3eb32..eb176b81ab7 100644 --- a/ompi/mca/io/romio314/romio/adio/common/get_fp_posn.c +++ b/ompi/mca/io/romio314/romio/adio/common/get_fp_posn.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -20,7 +20,7 @@ void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset) int filetype_is_contig; MPI_Aint filetype_extent; ADIO_Offset disp, byte_offset, sum=0, size_in_file, n_filetypes, frd_size; - + ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); etype_size = fd->etype_size; @@ -42,10 +42,10 @@ void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset) n_filetypes++; for (i=0; icount; i++) { sum += flat_file->blocklens[i]; - if (disp + flat_file->indices[i] + - n_filetypes* ADIOI_AINT_CAST_TO_OFFSET filetype_extent + flat_file->blocklens[i] + if (disp + flat_file->indices[i] + + n_filetypes* ADIOI_AINT_CAST_TO_OFFSET filetype_extent + flat_file->blocklens[i] >= byte_offset) { - frd_size = disp + flat_file->indices[i] + + frd_size = disp + flat_file->indices[i] + n_filetypes * ADIOI_AINT_CAST_TO_OFFSET filetype_extent + flat_file->blocklens[i] - byte_offset; sum -= frd_size; diff --git a/ompi/mca/io/romio314/romio/adio/common/greq_fns.c b/ompi/mca/io/romio314/romio/adio/common/greq_fns.c index aff8ff77e5d..5be6f4d167e 100644 --- a/ompi/mca/io/romio314/romio/adio/common/greq_fns.c +++ b/ompi/mca/io/romio314/romio/adio/common/greq_fns.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -25,7 +25,7 @@ void MPIO_Completed_request_create(MPI_File *fh, MPI_Offset bytes, if (*error_code != MPI_SUCCESS) *error_code = MPIO_Err_return_file(*fh, *error_code); /* --END ERROR HANDLING-- */ - MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, + MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, MPIU_Greq_cancel_fn, status, request); MPI_Grequest_complete(*request); } diff --git a/ompi/mca/io/romio314/romio/adio/common/heap-sort.c b/ompi/mca/io/romio314/romio/adio/common/heap-sort.c index 025a1a74c4c..e9b19f5efab 100644 --- a/ompi/mca/io/romio314/romio/adio/common/heap-sort.c +++ b/ompi/mca/io/romio314/romio/adio/common/heap-sort.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2008 University of Chicago. + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -97,7 +97,7 @@ void ADIOI_Heap_extract_min(heap_t *heap, ADIO_Offset* offset, int *proc, ADIO_Offset *reg_max_len) { heap_node_t *nodes; nodes = heap->nodes; - + assert (heap->size > 0); *offset = nodes[0].offset; *proc = nodes[0].proc; @@ -121,7 +121,7 @@ static void print_heap(heap_t *heap) printf ("offsets:\n"); for (i=0; i < heap->size; i++) { printf ("%lld ", heap->nodes[i].offset); - + if ((i+1) == next_level_idx) { printf ("\n"); next_level_idx += (int) exp2(level+1); diff --git a/ompi/mca/io/romio314/romio/adio/common/hint_fns.c b/ompi/mca/io/romio314/romio/adio/common/hint_fns.c index 34c898bdfe5..ef447db6e08 100644 --- a/ompi/mca/io/romio314/romio/adio/common/hint_fns.c +++ b/ompi/mca/io/romio314/romio/adio/common/hint_fns.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * * Copyright (C) 2013 UChicago/Argonne, LLC * See COPYRIGHT notice in top-level directory. @@ -9,10 +9,10 @@ #include "hint_fns.h" -int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *key, +int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *key, int *local_cache, char *funcname, int *error_code) { - int intval, tmp_val, flag; + int intval, tmp_val, flag; char *value; value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char)); @@ -35,7 +35,7 @@ int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *ke /* --BEGIN ERROR HANDLING-- */ if (tmp_val != intval) { MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname, - key, + key, error_code); return -1; } @@ -49,7 +49,7 @@ int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *ke return 0; } -int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char *key, +int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char *key, int *local_cache, char *funcname, int *error_code) { int tmp_val, flag; @@ -97,7 +97,7 @@ int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char ADIOI_Free(value); return 0; } -int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *key, +int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *key, int *local_cache, char *funcname, int *error_code) { int flag, tmp_val; @@ -140,7 +140,7 @@ int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *k ADIOI_Free(value); return 0; } -int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *key, +int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *key, char **local_cache, char *funcname, int *error_code) { int flag; @@ -175,7 +175,7 @@ int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *ke } ADIOI_Strncpy(*local_cache, value, len); } - /* if it has been set already, we ignore it the second time. + /* if it has been set already, we ignore it the second time. * otherwise we would get an error if someone used the same * info value with a cb_config_list value in it in a couple * of calls, which would be irritating. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/iscontig.c b/ompi/mca/io/romio314/romio/adio/common/iscontig.c index 3c8aa712f4e..58eead89da9 100644 --- a/ompi/mca/io/romio314/romio/adio/common/iscontig.c +++ b/ompi/mca/io/romio314/romio/adio/common/iscontig.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -80,7 +80,7 @@ void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag) adds = (MPI_Aint *) ADIOI_Malloc((nadds+1)*sizeof(MPI_Aint)); types = (MPI_Datatype *) ADIOI_Malloc((ntypes+1)*sizeof(MPI_Datatype)); MPI_Type_get_contents(datatype, nints, nadds, ntypes, ints, - adds, types); + adds, types); ADIOI_Datatype_iscontig(types[0], flag); #ifndef MPISGI @@ -99,7 +99,7 @@ void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag) break; } - /* This function needs more work. It should check for contiguity + /* This function needs more work. It should check for contiguity in other cases as well.*/ } #endif diff --git a/ompi/mca/io/romio314/romio/adio/common/lock.c b/ompi/mca/io/romio314/romio/adio/common/lock.c index 2590d77433a..6fcff9e6900 100644 --- a/ompi/mca/io/romio314/romio/adio/common/lock.c +++ b/ompi/mca/io/romio314/romio/adio/common/lock.c @@ -1,18 +1,18 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "adio.h" #ifdef ROMIO_NTFS -/* This assumes that lock will always remain in the common directory and +/* This assumes that lock will always remain in the common directory and * that the ntfs directory will always be called ad_ntfs. */ #include "..\ad_ntfs\ad_ntfs.h" int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, - ADIO_Offset len) + ADIO_Offset len) { static char myname[] = "ADIOI_Set_lock"; int ret_val, error_code = MPI_SUCCESS; @@ -33,17 +33,17 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, if (cmd == ADIOI_LOCK_CMD) { /*printf("locking %d\n", (int)fd);fflush(stdout);*/ - ret_val = LockFileEx(fd, dwFlags, 0, - ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), - ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), + ret_val = LockFileEx(fd, dwFlags, 0, + ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), + ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), &Overlapped); } else { /*printf("unlocking %d\n", (int)fd);fflush(stdout);*/ - ret_val = UnlockFileEx(fd, 0, - ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), - ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), + ret_val = UnlockFileEx(fd, 0, + ( (DWORD) ( len & (__int64) 0xFFFFFFFF ) ), + ( (DWORD) ( (len >> 32) & (__int64) 0xFFFFFFFF ) ), &Overlapped); } #else @@ -91,7 +91,7 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, } #else int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, - ADIO_Offset len) + ADIO_Offset len) { int err, error_code, err_count = 0, sav_errno; struct flock lock; @@ -99,13 +99,13 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, if (len == 0) return MPI_SUCCESS; - /* Depending on the compiler flags and options, struct flock + /* Depending on the compiler flags and options, struct flock may not be defined with types that are the same size as ADIO_Offsets. */ /* FIXME: This is a temporary hack until we use flock64 where available. It also doesn't fix the broken Solaris header sys/types.h header file, which declars off_t as a UNION ! Configure tests to - see if the off64_t is a union if large file support is requested; + see if the off64_t is a union if large file support is requested; if so, it does not select large file support. */ #ifdef NEEDS_INT_CAST_WITH_FLOCK @@ -131,16 +131,16 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, { if((err_count < 5) || (err_count > 9995)) { - fprintf(stderr, "File locking failed in ADIOI_Set_lock(fd %#X,cmd %s/%#X,type %s/%#X,whence %#X) with return value %#X and errno %#X. Retry (%d).\n", + fprintf(stderr, "File locking failed in ADIOI_Set_lock(fd %#X,cmd %s/%#X,type %s/%#X,whence %#X) with return value %#X and errno %#X. Retry (%d).\n", fd, ((cmd == F_GETLK )? "F_GETLK" : ((cmd == F_SETLK )? "F_SETLK" : ((cmd == F_SETLKW )? "F_SETLKW" : "UNEXPECTED"))), - cmd, + cmd, ((type == F_RDLCK )? "F_RDLCK" : ((type == F_WRLCK )? "F_WRLCK" : ((type == F_UNLCK )? "F_UNLOCK" : "UNEXPECTED"))), - type, + type, whence, err, errno, err_count); perror("ADIOI_Set_lock:"); fprintf(stderr,"ADIOI_Set_lock:offset %#llx, length %#llx\n",(unsigned long long)offset, (unsigned long long)len); @@ -151,7 +151,7 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, } while (err && ((errno == EINTR) || ((errno == EINPROGRESS) && (++err_count < 10000)))); if (err && (errno != EBADF)) { - /* FIXME: This should use the error message system, + /* FIXME: This should use the error message system, especially for MPICH */ FPRINTF(stderr, "This requires fcntl(2) to be implemented. As of 8/25/2011 it is not. Generic MPICH Message: File locking failed in ADIOI_Set_lock(fd %X,cmd %s/%X,type %s/%X,whence %X) with return value %X and errno %X.\n" "- If the file system is NFS, you need to use NFS version 3, ensure that the lockd daemon is running on all the machines, and mount the directory with the 'noac' option (no attribute caching).\n" @@ -160,11 +160,11 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, ((cmd == F_GETLK )? "F_GETLK" : ((cmd == F_SETLK )? "F_SETLK" : ((cmd == F_SETLKW )? "F_SETLKW" : "UNEXPECTED"))), - cmd, + cmd, ((type == F_RDLCK )? "F_RDLCK" : ((type == F_WRLCK )? "F_WRLCK" : ((type == F_UNLCK )? "F_UNLOCK" : "UNEXPECTED"))), - type, + type, whence, err, errno); perror("ADIOI_Set_lock:"); FPRINTF(stderr,"ADIOI_Set_lock:offset %llu, length %llu\n",(unsigned long long)offset, (unsigned long long)len); @@ -182,7 +182,7 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, #if (defined(ROMIO_HFS) || defined(ROMIO_XFS)) int ADIOI_Set_lock64(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence, - ADIO_Offset len) + ADIO_Offset len) { int err, error_code; struct flock64 lock; @@ -208,11 +208,11 @@ int ADIOI_Set_lock64(FDTYPE fd, int cmd, int type, ADIO_Offset offset, ((cmd == F_GETLK64 )? "F_GETLK64" : ((cmd == F_SETLK64 )? "F_SETLK64" : ((cmd == F_SETLKW64)? "F_SETLKW64" : "UNEXPECTED")))))), - cmd, + cmd, ((type == F_RDLCK )? "F_RDLCK" : ((type == F_WRLCK )? "F_WRLCK" : ((type == F_UNLCK )? "F_UNLOCK" : "UNEXPECTED"))), - type, + type, whence, err, errno); perror("ADIOI_Set_lock64:"); FPRINTF(stderr,"ADIOI_Set_lock:offset %llu, length %llu\n",(unsigned long long)offset, (unsigned long long)len); diff --git a/ompi/mca/io/romio314/romio/adio/common/malloc.c b/ompi/mca/io/romio314/romio/adio/common/malloc.c index 73c5a707050..03e90e38df3 100644 --- a/ompi/mca/io/romio314/romio/adio/common/malloc.c +++ b/ompi/mca/io/romio314/romio/adio/common/malloc.c @@ -1,17 +1,17 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ /* These are routines for allocating and deallocating memory. They should be called as ADIOI_Malloc(size) and - ADIOI_Free(ptr). In adio.h, they are macro-replaced to - ADIOI_Malloc(size,__LINE__,__FILE__) and + ADIOI_Free(ptr). In adio.h, they are macro-replaced to + ADIOI_Malloc(size,__LINE__,__FILE__) and ADIOI_Free(ptr,__LINE__,__FILE__). - Later on, add some tracing and error checking, similar to + Later on, add some tracing and error checking, similar to MPID_trmalloc. */ #include "adio.h" diff --git a/ompi/mca/io/romio314/romio/adio/common/req_malloc.c b/ompi/mca/io/romio314/romio/adio/common/req_malloc.c index 61018e1a684..833507cfdff 100644 --- a/ompi/mca/io/romio314/romio/adio/common/req_malloc.c +++ b/ompi/mca/io/romio314/romio/adio/common/req_malloc.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -22,7 +22,7 @@ struct ADIOI_RequestD *ADIOI_Malloc_request(void) int i; if (!ADIOI_Req_avail_head) { - ADIOI_Req_avail_head = (ADIOI_Req_node *) + ADIOI_Req_avail_head = (ADIOI_Req_node *) ADIOI_Malloc(NUM*sizeof(ADIOI_Req_node)); if (ADIOI_Req_avail_head == NULL) { @@ -40,7 +40,7 @@ struct ADIOI_RequestD *ADIOI_Malloc_request(void) /* keep track of malloced area that needs to be freed later */ if (!ADIOI_Malloc_req_tail) { ADIOI_Malloc_req_tail = (ADIOI_Malloc_req *) - ADIOI_Malloc(sizeof(ADIOI_Malloc_req)); + ADIOI_Malloc(sizeof(ADIOI_Malloc_req)); ADIOI_Malloc_req_head = ADIOI_Malloc_req_tail; ADIOI_Malloc_req_head->ptr = ADIOI_Req_avail_head; ADIOI_Malloc_req_head->next = NULL; @@ -57,7 +57,7 @@ struct ADIOI_RequestD *ADIOI_Malloc_request(void) ptr = ADIOI_Req_avail_head; ADIOI_Req_avail_head = ADIOI_Req_avail_head->next; if (!ADIOI_Req_avail_head) ADIOI_Req_avail_tail = NULL; - + (ptr->reqd).cookie = ADIOI_REQ_COOKIE; return &(ptr->reqd); } @@ -65,7 +65,7 @@ struct ADIOI_RequestD *ADIOI_Malloc_request(void) void ADIOI_Free_request(ADIOI_Req_node *node) { -/* This function could be called as ADIOI_Free_request(ADIO_Request request), +/* This function could be called as ADIOI_Free_request(ADIO_Request request), because request would be a pointer to the first element of ADIOI_Req_node.*/ /* moves this node to available pool. does not actually free it. */ diff --git a/ompi/mca/io/romio314/romio/adio/common/shfp_fname.c b/ompi/mca/io/romio314/romio/adio/common/shfp_fname.c index dfa5bafc2cf..2b940300ec1 100644 --- a/ompi/mca/io/romio314/romio/adio/common/shfp_fname.c +++ b/ompi/mca/io/romio314/romio/adio/common/shfp_fname.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -17,8 +17,8 @@ #ifdef HAVE_TIME_H #include #endif -/* The following function selects the name of the file to be used to - store the shared file pointer. The shared-file-pointer file is a +/* The following function selects the name of the file to be used to + store the shared file pointer. The shared-file-pointer file is a hidden file in the same directory as the real file being accessed. If the real file is /tmp/thakur/testfile, the shared-file-pointer file will be /tmp/thakur/.testfile.shfp.yyy.xxxx, where yyy @@ -42,13 +42,13 @@ void ADIOI_Shfp_fname(ADIO_File fd, int rank, int *error_code) srand(time(NULL)); i = rand(); pid = (int)getpid(); - + if (ADIOI_Strncpy(fd->shared_fp_fname, fd->filename, PATH_MAX)) { *error_code = ADIOI_Err_create_code("ADIOI_Shfp_fname", fd->filename, ENAMETOOLONG); return; } - + #ifdef ROMIO_NTFS slash = strrchr(fd->filename, '\\'); #else @@ -86,11 +86,11 @@ void ADIOI_Shfp_fname(ADIO_File fd, int rank, int *error_code) return; } } - + ADIOI_Snprintf(tmp, 128, ".shfp.%d.%d", pid, i); /* ADIOI_Strnapp will return non-zero if truncated. That's ok */ ADIOI_Strnapp(fd->shared_fp_fname, tmp, PATH_MAX); - + len = (int)strlen(fd->shared_fp_fname); MPI_Bcast(&len, 1, MPI_INT, 0, fd->comm); MPI_Bcast(fd->shared_fp_fname, len+1, MPI_CHAR, 0, fd->comm); diff --git a/ompi/mca/io/romio314/romio/adio/common/status_setb.c b/ompi/mca/io/romio314/romio/adio/common/status_setb.c index ec1e4ff7f69..756e94e38a9 100644 --- a/ompi/mca/io/romio314/romio/adio/common/status_setb.c +++ b/ompi/mca/io/romio314/romio/adio/common/status_setb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -13,11 +13,11 @@ /* TODO: still needs to handle partial datatypes and situations where the mpi * implementation fills status with something other than bytes (globus2 might * do this) */ -int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, +int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, MPI_Count nbytes) { ADIOI_UNREFERENCED_ARG(datatype); - /* it's ok that ROMIO stores number-of-bytes in status, not + /* it's ok that ROMIO stores number-of-bytes in status, not * count-of-copies, as long as MPI_GET_COUNT knows what to do */ if (status != MPI_STATUS_IGNORE) MPI_Status_set_elements_x(status, MPI_BYTE, nbytes); diff --git a/ompi/mca/io/romio314/romio/adio/common/strfns.c b/ompi/mca/io/romio314/romio/adio/common/strfns.c index 65e5ac24e74..4b8c1ec2568 100644 --- a/ompi/mca/io/romio314/romio/adio/common/strfns.c +++ b/ompi/mca/io/romio314/romio/adio/common/strfns.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -9,7 +9,7 @@ /* style: allow:sprintf:3 sig:0 */ -/* +/* * Below are the "safe" versions of the various string and printf * operations. They are directly taken from MPICH, with MPIU replaced by ADIOI. */ @@ -18,7 +18,7 @@ * ADIOI_Strncpy - Copy at most n character. Stop once a null is reached. * * This is different from strncpy, which null pads so that exactly - * n characters are copied. The strncpy behavior is correct for many + * n characters are copied. The strncpy behavior is correct for many * applications because it guarantees that the string has no uninitialized * data. * @@ -27,7 +27,7 @@ * */ /*@ ADIOI_Strncpy - Copy a string with a maximum length - + Input Parameters: + instr - String to copy - maxlen - Maximum total length of 'outstr' @@ -36,11 +36,11 @@ Output Parameters: . outstr - String to copy into Notes: - This routine is the routine that you wish 'strncpy' was. In copying - 'instr' to 'outstr', it stops when either the end of 'outstr' (the + This routine is the routine that you wish 'strncpy' was. In copying + 'instr' to 'outstr', it stops when either the end of 'outstr' (the null character) is seen or the maximum length 'maxlen' is reached. - Unlike 'strncpy', it does not add enough nulls to 'outstr' after - copying 'instr' in order to move precisely 'maxlen' characters. + Unlike 'strncpy', it does not add enough nulls to 'outstr' after + copying 'instr' in order to move precisely 'maxlen' characters. Thus, this routine may be used anywhere 'strcpy' is used, without any performance cost related to large values of 'maxlen'. @@ -57,8 +57,8 @@ int ADIOI_Strncpy( char *dest, const char *src, size_t n ) while (*s_ptr && i-- > 0) { *d_ptr++ = *s_ptr++; } - - if (i > 0) { + + if (i > 0) { *d_ptr = 0; return 0; } @@ -81,7 +81,7 @@ Output Parameters: Notes: This routine is similar to 'strncat' except that the 'maxlen' argument - is the maximum total length of 'outstr', rather than the maximum + is the maximum total length of 'outstr', rather than the maximum number of characters to move from 'instr'. Thus, this routine is easier to use when the declared size of 'instr' is known. @@ -106,21 +106,21 @@ int ADIOI_Strnapp( char *dest, const char *src, size_t n ) /* We allow i >= (not just >) here because the first while decrements i by one more than there are characters, leaving room for the null */ - if (i >= 0) { + if (i >= 0) { *d_ptr = 0; return 0; } else { /* Force the null at the end */ *--d_ptr = 0; - + /* We may want to force an error message here, at least in the debugging version */ return 1; } } -/*@ +/*@ ADIOI_Strdup - Duplicate a string Synopsis: @@ -136,7 +136,7 @@ Input Parameters: null pointer is returned on error, such as out-of-memory. Notes: - Like 'ADIOI_Malloc' and 'ADIOI_Free', this will often be implemented as a + Like 'ADIOI_Malloc' and 'ADIOI_Free', this will often be implemented as a macro but may use 'ADIOI_trstrdup' to provide a tracing version. Module: @@ -159,14 +159,14 @@ char *ADIOI_Strdup( const char *str ) } -/* +/* * We need an snprintf replacement for systems without one */ #ifndef HAVE_SNPRINTF #include /* FIXME: Really need a check for varargs.h vs stdarg.h */ #include -/* +/* * This is an approximate form which is suitable for most uses within * the MPICH code */ @@ -209,7 +209,7 @@ int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) while (*p && isdigit(*p)) { width = 10 * width + (*p++ - '0'); } - /* When there is no longer a digit, get the format + /* When there is no longer a digit, get the format character */ nc = *p++; } @@ -236,7 +236,7 @@ int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) int tmplen = strlen(tmp); /* If a width was specified, pad with spaces on the left (on the right if %-3d given; not implemented yet */ - while (size-- > 0 && width-- > tmplen) + while (size-- > 0 && width-- > tmplen) *out_str++ = ' '; } while (size-- > 0 && *t) { @@ -257,7 +257,7 @@ int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) int tmplen = strlen(tmp); /* If a width was specified, pad with spaces on the left (on the right if %-3d given; not implemented yet */ - while (size-- > 0 && width-- > tmplen) + while (size-- > 0 && width-- > tmplen) *out_str++ = ' '; } while (size-- > 0 && *t) { @@ -277,7 +277,7 @@ int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) int tmplen = strlen(tmp); /* If a width was specified, pad with spaces on the left (on the right if %-3d given; not implemented yet */ - while (size-- > 0 && width-- > tmplen) + while (size-- > 0 && width-- > tmplen) *out_str++ = ' '; } while (size-- > 0 && *t) { diff --git a/ompi/mca/io/romio314/romio/adio/common/system_hints.c b/ompi/mca/io/romio314/romio/adio/common/system_hints.c index 35161026c13..56e9db21446 100644 --- a/ompi/mca/io/romio314/romio/adio/common/system_hints.c +++ b/ompi/mca/io/romio314/romio/adio/common/system_hints.c @@ -1,7 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab * - * Copyright (C) 2007 UChicago/Argonne LLC. + * Copyright (C) 2007 UChicago/Argonne LLC. * See COPYRIGHT notice in top-level directory. */ @@ -58,7 +58,7 @@ static int find_file(void) { int fd=-1; char * hintfile; - + hintfile = getenv(ROMIO_HINT_ENV_VAR); if(hintfile) fd = open(hintfile, O_RDONLY); @@ -70,11 +70,11 @@ static int find_file(void) /* parse the file-of-hints. Format is zero or more lines of " \n". * A # in collumn zero is a comment and the line will be ignored. Do our best - * to ignore badly formed lines too. + * to ignore badly formed lines too. * * The caller provides an 'info' object. Each key-value pair found by the * parser will get added to the info object. any keys already set will be left - * alone on the assumption that the caller knows best. + * alone on the assumption that the caller knows best. * * because MPI-IO hints are optional, we can get away with limited error * reporting. @@ -106,19 +106,19 @@ static int file_to_info_all(int fd, MPI_Info info, int rank, MPI_Comm comm) if (token == NULL) goto fn_exit; do { - if ( (key = strtok_r(token, " \t", &pos2)) == NULL) + if ( (key = strtok_r(token, " \t", &pos2)) == NULL) /* malformed line: found no items */ continue; - if (token[0] == '#') + if (token[0] == '#') /* ignore '#'-delimited comments */ continue; - if ( (val = strtok_r(NULL, " \t", &pos2)) == NULL) + if ( (val = strtok_r(NULL, " \t", &pos2)) == NULL) /* malformed line: found key without value */ continue; - if ( (garbage = strtok_r(NULL, " \t", &pos2)) != NULL) + if ( (garbage = strtok_r(NULL, " \t", &pos2)) != NULL) /* malformed line: more than two items */ continue; - + #ifdef SYSHINT_DEBUG printf("found: key=%s val=%s\n", key, val); #endif @@ -151,9 +151,9 @@ void ADIOI_process_system_hints(ADIO_File fd, MPI_Info info) /* given 'info', incorporate any hints in 'sysinfo' that are not already set * into 'new_info'. Caller must free 'new_info' later. */ -void ADIOI_incorporate_system_hints(MPI_Info info, - MPI_Info sysinfo, - MPI_Info *new_info) +void ADIOI_incorporate_system_hints(MPI_Info info, + MPI_Info sysinfo, + MPI_Info *new_info) { int i, nkeys_sysinfo, flag=0; /* must initialize flag to 0 */ @@ -170,7 +170,7 @@ void ADIOI_incorporate_system_hints(MPI_Info info, return; } - if (info == MPI_INFO_NULL) + if (info == MPI_INFO_NULL) MPI_Info_create(new_info); else MPI_Info_dup(info, new_info); @@ -178,7 +178,7 @@ void ADIOI_incorporate_system_hints(MPI_Info info, for (i=0; i 2GB files in some cases... */ struct ADIOI_Hints_struct { @@ -94,7 +94,7 @@ typedef struct ADIOI_Datarep { struct ADIOI_Datarep *next; /* pointer to next datarep */ } ADIOI_Datarep; -/* Values for use with cb_read, cb_write, ds_read, and ds_write +/* Values for use with cb_read, cb_write, ds_read, and ds_write * and some fs-specific hints (IBM xlc, Compaq Tru64 compilers object to a comma after the last item) (that's just wrong) @@ -107,9 +107,9 @@ enum { /* flattened datatypes. Each datatype is stored as a node of a globally accessible linked list. Once attribute caching on a - datatype is available (in MPI-2), that should be used instead. */ + datatype is available (in MPI-2), that should be used instead. */ -typedef struct ADIOI_Fl_node { +typedef struct ADIOI_Fl_node { MPI_Datatype type; MPI_Count count; /* no. of contiguous blocks */ ADIO_Offset *blocklens; /* array of contiguous block lengths (bytes)*/ @@ -145,25 +145,25 @@ typedef struct ADIOI_AIO_req_str { struct ADIOI_Fns_struct { void (*ADIOI_xxx_Open) (ADIO_File fd, int *error_code); - void (*ADIOI_xxx_OpenColl) (ADIO_File fd, int rank, + void (*ADIOI_xxx_OpenColl) (ADIO_File fd, int rank, int access_mode, int *error_code); void (*ADIOI_xxx_ReadContig) (ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); void (*ADIOI_xxx_WriteContig) (ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, - ADIO_Offset offset, ADIO_Status *status, int *error_code); + ADIO_Offset offset, ADIO_Status *status, int *error_code); void (*ADIOI_xxx_ReadStridedColl) (ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); void (*ADIOI_xxx_WriteStridedColl) (ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); - ADIO_Offset (*ADIOI_xxx_SeekIndividual) (ADIO_File fd, ADIO_Offset offset, + ADIO_Offset (*ADIOI_xxx_SeekIndividual) (ADIO_File fd, ADIO_Offset offset, int whence, int *error_code); - void (*ADIOI_xxx_Fcntl) (ADIO_File fd, int flag, - ADIO_Fcntl_t *fcntl_struct, int *error_code); - void (*ADIOI_xxx_SetInfo) (ADIO_File fd, MPI_Info users_info, + void (*ADIOI_xxx_Fcntl) (ADIO_File fd, int flag, + ADIO_Fcntl_t *fcntl_struct, int *error_code); + void (*ADIOI_xxx_SetInfo) (ADIO_File fd, MPI_Info users_info, int *error_code); void (*ADIOI_xxx_ReadStrided) (ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, @@ -172,27 +172,27 @@ struct ADIOI_Fns_struct { MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); void (*ADIOI_xxx_Close) (ADIO_File fd, int *error_code); - void (*ADIOI_xxx_IreadContig) (ADIO_File fd, void *buf, int count, - MPI_Datatype datatype, int file_ptr_type, + void (*ADIOI_xxx_IreadContig) (ADIO_File fd, void *buf, int count, + MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); void (*ADIOI_xxx_IwriteContig) (ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); - int (*ADIOI_xxx_ReadDone) (ADIO_Request *request, ADIO_Status *status, - int *error_code); - int (*ADIOI_xxx_WriteDone) (ADIO_Request *request, ADIO_Status *status, + int (*ADIOI_xxx_ReadDone) (ADIO_Request *request, ADIO_Status *status, + int *error_code); + int (*ADIOI_xxx_WriteDone) (ADIO_Request *request, ADIO_Status *status, + int *error_code); + void (*ADIOI_xxx_ReadComplete) (ADIO_Request *request, ADIO_Status *status, int *error_code); - void (*ADIOI_xxx_ReadComplete) (ADIO_Request *request, ADIO_Status *status, - int *error_code); void (*ADIOI_xxx_WriteComplete) (ADIO_Request *request, ADIO_Status *status, - int *error_code); + int *error_code); void (*ADIOI_xxx_IreadStrided) (ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); void (*ADIOI_xxx_IwriteStrided) (ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); - void (*ADIOI_xxx_Flush) (ADIO_File fd, int *error_code); + void (*ADIOI_xxx_Flush) (ADIO_File fd, int *error_code); void (*ADIOI_xxx_Resize) (ADIO_File fd, ADIO_Offset size, int *error_code); void (*ADIOI_xxx_Delete) (const char *filename, int *error_code); int (*ADIOI_xxx_Feature) (ADIO_File fd, int flag); @@ -209,7 +209,7 @@ struct ADIOI_Fns_struct { * http://stackoverflow.com/questions/3982348/implement-generic-swap-macro-in-c */ #define ADIOI_SWAP(x, y, T) do { T temp##x##y = x; x = y; y = temp##x##y; } while (0); -#define ADIOI_PREALLOC_BUFSZ 16777216 /* buffer size used to +#define ADIOI_PREALLOC_BUFSZ 16777216 /* buffer size used to preallocate disk space */ @@ -220,7 +220,7 @@ struct ADIOI_Fns_struct { #define ADIOI_IND_RD_BUFFER_SIZE_DFLT "4194304" /* buffer size for data sieving in independent writes = 512KB. default is smaller than for reads, because write requires read-modify-write - with file locking. If buffer size is large there is more contention + with file locking. If buffer size is large there is more contention for locks. */ #define ADIOI_IND_WR_BUFFER_SIZE_DFLT "524288" /* use one process per processor name by default */ @@ -302,8 +302,8 @@ struct ADIOI_Fns_struct { (*(fd->fns->ADIOI_xxx_Feature))(fd, flag) -/* structure for storing access info of this process's request - from the file domain of other processes, and vice-versa. used +/* structure for storing access info of this process's request + from the file domain of other processes, and vice-versa. used as array of structures indexed by process number. */ typedef struct { ADIO_Offset *offsets; /* array of offsets */ @@ -341,7 +341,7 @@ void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset); void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, ADIO_Offset *disp); void ADIOI_process_system_hints(ADIO_File fd, MPI_Info info); -void ADIOI_incorporate_system_hints(MPI_Info info, MPI_Info sysinfo, +void ADIOI_incorporate_system_hints(MPI_Info info, MPI_Info sysinfo, MPI_Info *new_info); void ADIOI_Info_print_keyvals(MPI_Info info); @@ -349,20 +349,20 @@ void ADIOI_Info_print_keyvals(MPI_Info info); void ADIOI_GEN_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code); void ADIOI_GEN_Flush(ADIO_File fd, int *error_code); -void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, +void ADIOI_GEN_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code); -void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank, +void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code); -void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, +void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code); void ADIOI_GEN_Delete(const char *filename, int *error_code); -void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count, +void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); int ADIOI_GEN_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, int wr, MPI_Request *request); -void ADIOI_GEN_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_GEN_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); @@ -391,7 +391,7 @@ int ADIOI_GEN_IODone(ADIO_Request *request, ADIO_Status *status, void ADIOI_GEN_IOComplete(ADIO_Request *request, ADIO_Status *status, int *error_code); int ADIOI_GEN_aio_poll_fn(void *extra_state, ADIO_Status *status); -int ADIOI_GEN_aio_wait_fn(int count, void **array_of_states, double timeout, +int ADIOI_GEN_aio_wait_fn(int count, void **array_of_states, double timeout, ADIO_Status *status); int ADIOI_GEN_aio_query_fn(void *extra_state, ADIO_Status *status); int ADIOI_GEN_aio_free_fn(void *extra_state); @@ -422,7 +422,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, ADIO_Offset offset, ADIO_Status *status, int *error_code); void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype - datatype, int file_ptr_type, ADIO_Offset + datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Offset **offset_list_ptr, ADIO_Offset **len_list_ptr, ADIO_Offset *start_offset_ptr, ADIO_Offset *end_offset_ptr, int @@ -430,8 +430,8 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset *end_offsets, int nprocs, int nprocs_for_coll, ADIO_Offset *min_st_offset_ptr, - ADIO_Offset **fd_start_ptr, ADIO_Offset - **fd_end_ptr, int min_fd_size, + ADIO_Offset **fd_start_ptr, ADIO_Offset + **fd_end_ptr, int min_fd_size, ADIO_Offset *fd_size_ptr, int striping_unit); int ADIOI_Calc_aggregator(ADIO_File fd, @@ -441,9 +441,9 @@ int ADIOI_Calc_aggregator(ADIO_File fd, ADIO_Offset fd_size, ADIO_Offset *fd_start, ADIO_Offset *fd_end); -void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list, +void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list, ADIO_Offset *len_list, int - contig_access_count, ADIO_Offset + contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset *fd_start, ADIO_Offset *fd_end, ADIO_Offset fd_size, int nprocs, @@ -451,12 +451,12 @@ void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list, int **count_my_req_per_proc_ptr, ADIOI_Access **my_req_ptr, int **buf_idx_ptr); -void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, +void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, int *count_my_req_per_proc, - ADIOI_Access *my_req, + ADIOI_Access *my_req, int nprocs, int myrank, int *count_others_req_procs_ptr, - ADIOI_Access **others_req_ptr); + ADIOI_Access **others_req_ptr); /* KC && AC - New Collective I/O internals*/ @@ -500,7 +500,7 @@ typedef struct view_state int pre_ol_ct; MPI_Aint *pre_disp_arr; int *pre_blk_arr; - + ADIOI_Flatlist_node *flat_type_p; } view_state; @@ -528,7 +528,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, view_state *agg_file_view_state_arr, view_state *client_file_view_state_arr); int ADIOI_init_view_state(int file_ptr_type, - int nprocs, + int nprocs, view_state *view_state_arr, int op_type); int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, @@ -537,7 +537,7 @@ int ADIOI_Build_agg_reqs(ADIO_File fd, int rw_type, int nprocs, ADIO_Offset *client_comm_sz_arr, ADIO_Offset *agg_dtype_offset_p, MPI_Datatype *agg_dtype_p); -int ADIOI_Build_client_reqs(ADIO_File fd, +int ADIOI_Build_client_reqs(ADIO_File fd, int nprocs, view_state *my_mem_view_state_arr, view_state *agg_file_view_state_arr, @@ -574,7 +574,7 @@ void ADIOI_P2PContigReadAggregation(ADIO_File fd, ADIO_Offset *fd_start, ADIO_Offset *fd_end); -ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, +ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, int whence, int *error_code); void ADIOI_GEN_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); @@ -597,11 +597,11 @@ int ADIOI_Type_create_hindexed_x(int count, int ADIOI_FAKE_IODone(ADIO_Request *request, ADIO_Status *status, int *error_code); -void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, +void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); -void ADIOI_FAKE_IreadStrided(ADIO_File fd, void *buf, int count, +void ADIOI_FAKE_IreadStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Request *request, int *error_code); @@ -698,7 +698,7 @@ int MPIOI_File_iread(MPI_File fh, # define ADIOI_WRITE_LOCK(fd, offset, whence, len) \ do {if (((fd)->file_system == ADIO_XFS) || ((fd)->file_system == ADIO_HFS)) \ ADIOI_Set_lock64((fd)->fd_sys, F_SETLKW64, F_WRLCK, offset, whence, len);\ - else ADIOI_Set_lock((fd)->fd_sys, F_SETLKW, F_WRLCK, offset, whence, len); } while (0) + else ADIOI_Set_lock((fd)->fd_sys, F_SETLKW, F_WRLCK, offset, whence, len); } while (0) # define ADIOI_READ_LOCK(fd, offset, whence, len) \ do {if (((fd)->file_system == ADIO_XFS) || ((fd)->file_system == ADIO_HFS)) \ @@ -796,7 +796,7 @@ char *ADIOI_Strdup( const char * ); extern int snprintf( char *, size_t, const char *, ... ) ATTRIBUTE((format(printf,3,4))); #endif #else -int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) +int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) ATTRIBUTE((format(printf,3,4))); #endif /* HAVE_SNPRINTF */ @@ -806,7 +806,7 @@ int ADIOI_Snprintf( char *str, size_t size, const char *format, ... ) # ifdef HAVE_SYSERRLIST extern char *sys_errlist[]; # define strerror(n) sys_errlist[n] -# else +# else # define PRINT_ERR_MSG # endif #endif @@ -848,11 +848,11 @@ int ADIOI_MPE_iwrite_b; #ifdef ROMIO_INSIDE_MPICH /* Assert that this MPI_Aint value can be cast to a ptr value without problem.*/ -/* Basic idea is the value should be unchanged after casting - (no loss of (meaningful) high order bytes in 8 byte MPI_Aint +/* Basic idea is the value should be unchanged after casting + (no loss of (meaningful) high order bytes in 8 byte MPI_Aint to (possible) 4 byte ptr cast) */ /* Should work even on 64bit or old 32bit configs */ - /* Use MPID_Ensure_Aint_fits_in_pointer from mpiutil.h and + /* Use MPID_Ensure_Aint_fits_in_pointer from mpiutil.h and MPI_AINT_CAST_TO_VOID_PTR from configure (mpi.h) */ #include "glue_romio.h" @@ -869,7 +869,7 @@ int ADIOI_MPE_iwrite_b; #define ADIOI_AINT_CAST_TO_VOID_PTR (void*) #define ADIOI_AINT_CAST_TO_LONG_LONG (long long) #define ADIOI_AINT_CAST_TO_OFFSET ADIOI_AINT_CAST_TO_LONG_LONG - #define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value) + #define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value) #define ADIOI_Assert assert #define MPIR_Upint unsigned long #define MPIU_THREADPRIV_DECL diff --git a/ompi/mca/io/romio314/romio/adio/include/adioi_fs_proto.h b/ompi/mca/io/romio314/romio/adio/include/adioi_fs_proto.h index e3af9170821..5c3f748096a 100644 --- a/ompi/mca/io/romio314/romio/adio/include/adioi_fs_proto.h +++ b/ompi/mca/io/romio314/romio/adio/include/adioi_fs_proto.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/adio/include/mpio_error.h b/ompi/mca/io/romio314/romio/adio/include/mpio_error.h index f9d22b17219..88fdb09273a 100644 --- a/ompi/mca/io/romio314/romio/adio/include/mpio_error.h +++ b/ompi/mca/io/romio314/romio/adio/include/mpio_error.h @@ -59,7 +59,7 @@ #define MPIR_ERR_ASYNC_OUTSTANDING 27 #define MPIR_READ_PERM 29 #define MPIR_PREALLOC_PERM 31 -#define MPIR_ERR_FILETYPE 33 +#define MPIR_ERR_FILETYPE 33 #define MPIR_ERR_NO_NTFS 35 #define MPIR_ERR_NO_TESTFS 36 #define MPIR_ERR_NO_LUSTRE 37 @@ -68,7 +68,7 @@ /* MPI_ERR_COMM */ #ifndef MPIR_ERR_COMM_NULL #define MPIR_ERR_COMM_NULL 3 -#define MPIR_ERR_COMM_INTER 5 +#define MPIR_ERR_COMM_INTER 5 #endif /* MPI_ERR_UNSUPPORTED_DATAREP */ diff --git a/ompi/mca/io/romio314/romio/adio/include/mpipr.h b/ompi/mca/io/romio314/romio/adio/include/mpipr.h index b1dcd9fb449..21f208ed01f 100644 --- a/ompi/mca/io/romio314/romio/adio/include/mpipr.h +++ b/ompi/mca/io/romio314/romio/adio/include/mpipr.h @@ -4,8 +4,8 @@ * See COPYRIGHT in top-level directory. */ /* This file replaces all MPI function names with their PMPI equivalents. - PMPI versions are used by default so that the user can profile - application code without interference from MPI functions used by + PMPI versions are used by default so that the user can profile + application code without interference from MPI functions used by MPI-IO. */ #ifndef USE_MPI_VERSIONS @@ -295,7 +295,7 @@ #undef MPI_Wtime #define MPI_Wtime PMPI_Wtime -/* commented out because these could be macros themselves, as in MPICH +/* commented out because these could be macros themselves, as in MPICH #undef MPI_Type_c2f #define MPI_Type_c2f PMPI_Type_c2f #undef MPI_Type_f2c diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_am.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_am.m4 index 4d3b0de2257..8e425df1902 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_am.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_am.m4 @@ -1,6 +1,6 @@ dnl AM_IGNORE is an extension that tells (a patched) automake not to dnl include the specified AC_SUBST variable in the Makefile.in that -dnl automake generates. We don't use AC_DEFUN, since aclocal will +dnl automake generates. We don't use AC_DEFUN, since aclocal will dnl then complain that AM_IGNORE is a duplicate (if you are using the dnl patched automake/aclocal). m4_ifdef([AM_IGNORE],[],[m4_define([AM_IGNORE],[])]) diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_atomic.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_atomic.m4 index 4e96cfbf366..0bda659a98a 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_atomic.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_atomic.m4 @@ -16,11 +16,11 @@ dnl . HAVE__INTERLOCKEDEXCHANGE - _InterlockedExchange intrinsic is available dnl (IA64) dnl . HAVE_GCC_ASM_SPARC_MEMBAR - gcc __asm__ will issue SPARC architecture dnl memory barrier instruction -dnl . HAVE_SOLARIS_ASM_SPARC_MEMBAR - Solaris asm() will issue SPARC +dnl . HAVE_SOLARIS_ASM_SPARC_MEMBAR - Solaris asm() will issue SPARC dnl architecture memory barrier instruction dnl . HAVE_GCC_ASM_SPARC_STBAR - gcc __asm__ will issue stbar dnl - HAVE_SOLARIS_ASM_SPARC_STBAR - Solaris __asm() will issue stbar -dnl +dnl dnl D*/ AC_DEFUN([PAC_C_MEMATOMIC],[ AC_CACHE_CHECK([for x86 mfence instruction using __asm__], @@ -114,9 +114,9 @@ if test "$lac_cv_have___asm_and_x86_lfence" = "yes" ; then AC_DEFINE(HAVE___ASM_AND_X86_LFENCE, 1, [Define if using __asm on a x86 system with the lfence instruction]) fi -dnl +dnl dnl Some compilers, such as pgcc, may require additional arguments. -dnl pgcc may need -Masmkeyword flag. We may want to try this with and +dnl pgcc may need -Masmkeyword flag. We may want to try this with and dnl without adding -Masmkeyword to CFLAGS AC_CACHE_CHECK([for x86 mfence instruction using asm()], @@ -224,4 +224,4 @@ int main(int argc, char **argv){ if test "$pac_cv_solaris_sparc_stbar" = yes ; then AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_STBAR,1,[Define if solaris asm stbar supported]) fi -]) \ No newline at end of file +]) diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_attr_alias.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_attr_alias.m4 index 32f016546dc..128a08844a4 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_attr_alias.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_attr_alias.m4 @@ -17,7 +17,7 @@ AC_PATH_PROGS_FEATURE_CHECK(NM_G, nm, [ # Tru64's nm complains that /dev/null is an invalid object file # # AIX's sed does not accept \+, 1) instead of doing 's|a\+||', do 's|aa*||' - # or 2) instead of 's|A \+B|AB|g', do 's|A *B|AB|g' + # or 2) instead of 's|A \+B|AB|g', do 's|A *B|AB|g' # Check if nm accepts -g case `${ac_path_NM_G} -g /dev/null 2>&1 | sed '1q'` in @@ -108,7 +108,7 @@ mpif_cmblk_t MPIFCMB; /* Do the test in this file instead in the file - where __attribute__((alias)) is used. + where __attribute__((alias)) is used. This is needed for pgcc since pgcc seems to define aliased symbols if they are in the same file. */ @@ -171,7 +171,7 @@ if test "$pac_c_attr_alias_other" = "yes" ; then #if defined(HAVE_STDIO_H) || defined(STDC_HEADERS) #include #endif - + struct mpif_cmblk_t_ { int imember; }; typedef struct mpif_cmblk_t_ mpif_cmblk_t; @@ -239,7 +239,7 @@ if test "$pac_c_attr_alias_main" = "yes" ; then cmp_addr=${addr} fi done - + if test "$diff_addrs" != "yes" ; then dnl echo "Same addresses. Multiple aliases support" AC_MSG_RESULT([${NM_G} says yes]) @@ -348,7 +348,7 @@ dnl the following weird behavour dnl pgf77 -o ftest ftest.f => when $?=0 with zero stderr output dnl pgf77 -o ftest ftest.f dummy.o => when $?=0 with non-zero stderr output. dnl stderr has "ftest.f:". -dnl +dnl # First create a fortran CONFTEST which will be used repeatedly. AC_LANG_PUSH([Fortran]) dnl AC_LANG_PUSH([Fortran 77]) AC_LANG_CONFTEST([ @@ -385,7 +385,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[ pac_f2c_alignedn_diffbase=no ]) # Be sure NOT to remove the conftest.f which is still needed for later use. - # rm -f conftest.$ac_ext + # rm -f conftest.$ac_ext # Restore everything in autoconf that has been overwritten PAC_POP_FLAG([ac_link]) # restore previously pushed LIBS diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_bugfix.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_bugfix.m4 index f580d3919ad..1f8704ed15e 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_bugfix.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_bugfix.m4 @@ -17,26 +17,26 @@ dnl Synopsis: dnl PAC_PROG_CHECK_INSTALL_WORKS dnl dnl Output Effect: -dnl Sets the variable 'INSTALL' to the value of 'ac_sh_install' if +dnl Sets the variable 'INSTALL' to the value of 'ac_sh_install' if dnl a file cannot be installed into a local directory with the 'INSTALL' dnl program dnl dnl Notes: -dnl The 'AC_PROG_INSTALL' scripts tries to avoid broken versions of -dnl install by avoiding directories such as '/usr/sbin' where some -dnl systems are known to have bad versions of 'install'. Unfortunately, +dnl The 'AC_PROG_INSTALL' scripts tries to avoid broken versions of +dnl install by avoiding directories such as '/usr/sbin' where some +dnl systems are known to have bad versions of 'install'. Unfortunately, dnl this is exactly the sort of test-on-name instead of test-on-capability dnl that 'autoconf' is meant to eliminate. The test in this script -dnl is very simple but has been adequate for working around problems -dnl on Solaris, where the '/usr/sbin/install' program (known by -dnl autoconf to be bad because it is in /usr/sbin) is also reached by a +dnl is very simple but has been adequate for working around problems +dnl on Solaris, where the '/usr/sbin/install' program (known by +dnl autoconf to be bad because it is in /usr/sbin) is also reached by a dnl soft link through /bin, which autoconf believes is good. dnl -dnl No variables are cached to ensure that we do not make a mistake in +dnl No variables are cached to ensure that we do not make a mistake in dnl our choice of install program. dnl dnl The Solaris configure requires the directory name to immediately -dnl follow the '-c' argument, rather than the more common +dnl follow the '-c' argument, rather than the more common dnl.vb dnl args sourcefiles destination-dir dnl.ve diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_cache.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_cache.m4 index 9d02c416387..d0a79822470 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_cache.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_cache.m4 @@ -1,20 +1,20 @@ dnl dnl/*D -dnl AC_CACHE_LOAD - Replacement for autoconf cache load +dnl AC_CACHE_LOAD - Replacement for autoconf cache load dnl dnl Notes: -dnl Caching in autoconf is broken (at least through version 2.13). +dnl Caching in autoconf is broken (at least through version 2.13). dnl The problem is that the cache is read dnl without any check for whether it makes any sense to read it. -dnl A common problem is a build on a shared file system; connecting to +dnl A common problem is a build on a shared file system; connecting to dnl a different computer and then building within the same directory will dnl lead to at best error messages from configure and at worse a build that dnl is wrong but fails only at run time (e.g., wrong datatype sizes used). dnl Later versions of autoconf do include some checks for changes in the dnl environment that impact the choices, but still misses problems with dnl multiple different systems. -dnl -dnl This fixes that by requiring the user to explicitly enable caching +dnl +dnl This fixes that by requiring the user to explicitly enable caching dnl before the cache file will be loaded. dnl dnl To use this version of 'AC_CACHE_LOAD', you need to include @@ -26,7 +26,7 @@ dnl command causes configure to keep track of the system being configured dnl in a config.system file; if the current system matches the value stored dnl in that file (or there is neither a config.cache nor config.system file), dnl configure will enable caching. In order to ensure that the configure -dnl tests make sense, the values of CC, F77, F90, and CXX are also included +dnl tests make sense, the values of CC, F77, F90, and CXX are also included dnl in the config.system file. In addition, the value of PATH is included dnl to ensure that changes in the PATH that might select a different version dnl of a program with the same name (such as a native make versus gnumake) @@ -34,7 +34,7 @@ dnl are detected. dnl dnl Bugs: dnl This does not work with the Cygnus configure because the enable arguments -dnl are processed *after* AC_CACHE_LOAD (!). To address this, we avoid +dnl are processed *after* AC_CACHE_LOAD (!). To address this, we avoid dnl changing the value of enable_cache, and use real_enable_cache, duplicating dnl the "notgiven" value. dnl @@ -46,14 +46,14 @@ dnl See Also: dnl PAC_ARG_CACHING dnl D*/ define([AC_CACHE_LOAD], -[if test "$CONFIGURE_DEBUG_CACHE" = yes ; then +[if test "$CONFIGURE_DEBUG_CACHE" = yes ; then oldopts="$-" clearMinusX=no - set -x - if test "$oldopts" != "$-" ; then + set -x + if test "$oldopts" != "$-" ; then clearMinusX=yes fi -fi +fi if test "X$cache_system" = "X" ; then # A default file name, just in case cache_system="config.system" @@ -66,13 +66,13 @@ if test "X$cache_system" = "X" ; then test "x$cache_system" = "x$cache_file" && cache_system="config.system" # else # We must *not* set enable_cache to no because we need to know if -# enable_cache was not set. +# enable_cache was not set. # enable_cache=no fi fi dnl dnl The "action-if-not-given" part of AC_ARG_ENABLE is not executed until -dnl after the AC_CACHE_LOAD is executed (!). Thus, the value of +dnl after the AC_CACHE_LOAD is executed (!). Thus, the value of dnl enable_cache if neither --enable-cache or --disable-cache is selected dnl is null. Just in case autoconf ever fixes this, we test both cases. dnl @@ -81,12 +81,12 @@ dnl change which versions of programs are found (such as vendor make dnl or GNU make). dnl # -# Get a test value and flag whether we should remove/replace the +# Get a test value and flag whether we should remove/replace the # cache_system file (do so unless cache_system_ok is yes) # FC and F77 should be synonyms. Save both in case # We include the xxxFLAGS in case the user is using the flags to change -# the language (either input or output) of the compiler. E.g., -# using -xarch=v9 on Solaris to select 64 bit output or using -D_BSD_SOURCE +# the language (either input or output) of the compiler. E.g., +# using -xarch=v9 on Solaris to select 64 bit output or using -D_BSD_SOURCE # with gcc to get different header files on input. cleanargs=`echo "$CC $F77 $FC $CXX $F90 $CFLAGS $FFLAGS $CXXFLAGS $F90FLAGS $PATH" | tr '"' ' '` if uname -srm >/dev/null 2>&1 ; then @@ -112,7 +112,7 @@ if test "X$real_enable_cache" = "Xnotgiven" ; then elif test ! -f "$cache_system" -a -n "$cache_system_text" ; then # remove the cache file because it may not correspond to our # system - if test "$cache_file" != "/dev/null" ; then + if test "$cache_file" != "/dev/null" ; then rm -f $cache_file fi real_enable_cache="yes" @@ -157,7 +157,7 @@ if test "$clearMinusX" = yes ; then fi ]) dnl -dnl/*D +dnl/*D dnl PAC_ARG_CACHING - Enable caching of results from a configure execution dnl dnl Synopsis: @@ -165,7 +165,7 @@ dnl PAC_ARG_CACHING dnl dnl Output Effects: dnl Adds '--enable-cache' and '--disable-cache' to the command line arguments -dnl accepted by 'configure'. +dnl accepted by 'configure'. dnl dnl See Also: dnl AC_CACHE_LOAD @@ -194,7 +194,7 @@ AC_DEFUN([PAC_CACHE_CLEAN],[ else echo "not updating unwritable cache $cache_file" fi - fi + fi rm -f confcache if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then echo "Results of cleaned cache file:" @@ -207,20 +207,20 @@ AC_DEFUN([PAC_CACHE_CLEAN],[ dnl/*D dnl PAC_SUBDIR_CACHE - Create a cache file before ac_output for subdirectory dnl configures. -dnl +dnl dnl Synopsis: dnl PAC_SUBDIR_CACHE(when) dnl dnl Input Parameter: dnl . when - Indicates when the cache should be created (optional) dnl If 'always', create a new cache file. This option -dnl should be used if any of the cache parameters (such as +dnl should be used if any of the cache parameters (such as dnl CFLAGS or LDFLAGS) may have changed. dnl dnl Output Effects: -dnl +dnl dnl Create a cache file before ac_output so that subdir configures don't -dnl make mistakes. +dnl make mistakes. dnl We can't use OUTPUT_COMMANDS to remove the cache file, because those dnl commands are executed *before* the subdir configures. dnl @@ -232,9 +232,9 @@ if test "x$1" = "xalways" -o \( "$cache_file" = "/dev/null" -a "X$real_enable_ca # lost cache_file=`pwd`/$$conf.cache touch $cache_file - dnl + dnl dnl For Autoconf 2.52+, we should ensure that the environment is set - dnl for the cache. Make sure that we get the values and set the + dnl for the cache. Make sure that we get the values and set the dnl xxx_set variables properly ac_cv_env_CC_set=set ac_cv_env_CC_value=$CC @@ -320,7 +320,7 @@ fi ]) dnl dnl The following three macros support the sharing of configure results -dnl by configure scripts, including ones that are not run with +dnl by configure scripts, including ones that are not run with dnl AC_CONFIG_SUBDIRS (the cachefiles managed by --enable-cache can dnl only be used with AC_CONFIG_SUBDIRS; creating a autoconf-style dnl cachefile before the the end of the autoconf process will often @@ -335,7 +335,7 @@ AC_ARG_ENABLE(base-cache, if test "$enable_base_cache" = "default" ; then if test "$CONF_USE_CACHEFILE" = yes ; then enable_base_cache=yes - else + else enable_base_cache=no fi fi diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_cc.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_cc.m4 index 92e7ee109bc..fc801f1709f 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_cc.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_cc.m4 @@ -27,13 +27,13 @@ dnl dnl If no actions are specified, a working value is added to 'COPTIONS' dnl dnl Notes: -dnl This is now careful to check that the output is different, since +dnl This is now careful to check that the output is different, since dnl some compilers are noisy. -dnl +dnl dnl We are extra careful to prototype the functions in case compiler options dnl that complain about poor code are in effect. dnl -dnl Because this is a long script, we have ensured that you can pass a +dnl Because this is a long script, we have ensured that you can pass a dnl variable containing the option name as the first argument. dnl dnl D*/ @@ -68,11 +68,11 @@ AC_MSG_RESULT([$pac_result]) dnl Delete the conftest created by AC_LANG_CONFTEST. rm -f conftest.$ac_ext -# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option -# even though it doesn't support it. However, when another warning is -# triggered, it gives an error that the option is not recognized. So we +# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option +# even though it doesn't support it. However, when another warning is +# triggered, it gives an error that the option is not recognized. So we # need to test with a conftest file that will generate warnings. -# +# # add an extra switch, pac_c_check_compiler_option_prototest, to # disable this test just in case some new compiler does not like it. # @@ -155,13 +155,13 @@ dnl PAC_C_OPTIMIZATION([action if found]) dnl dnl Output Effect: dnl Adds options to 'COPTIONS' if no other action is specified -dnl +dnl dnl Notes: dnl This is a temporary standin for compiler optimization. dnl It should try to match known systems to known compilers (checking, of dnl course), and then falling back to some common defaults. dnl Note that many compilers will complain about -g and aggressive -dnl optimization. +dnl optimization. dnl D*/ AC_DEFUN([PAC_C_OPTIMIZATION],[ for copt in "-O4 -Ofast" "-Ofast" "-fast" "-O3" "-xO3" "-O" ; do @@ -221,18 +221,18 @@ return 0; } ],pac_cv_prog_c_unaligned_doubles="yes",pac_cv_prog_c_unaligned_doubles="no", pac_cv_prog_c_unaligned_doubles="unknown")]) -ifelse($1,,,if test "X$pac_cv_prog_c_unaligned_doubles" = "yes" ; then +ifelse($1,,,if test "X$pac_cv_prog_c_unaligned_doubles" = "yes" ; then $1 fi) -ifelse($2,,,if test "X$pac_cv_prog_c_unaligned_doubles" = "no" ; then +ifelse($2,,,if test "X$pac_cv_prog_c_unaligned_doubles" = "no" ; then $2 fi) -ifelse($3,,,if test "X$pac_cv_prog_c_unaligned_doubles" = "unknown" ; then +ifelse($3,,,if test "X$pac_cv_prog_c_unaligned_doubles" = "unknown" ; then $3 fi) ]) -dnl/*D +dnl/*D dnl PAC_PROG_C_WEAK_SYMBOLS - Test whether C supports weak alias symbols. dnl dnl Synopsis @@ -254,7 +254,7 @@ dnl sets the shell variable pac_cv_attr_weak to yes. dnl Also checks for __attribute__((weak_import)) which is supported by dnl Apple in Mac OSX (at least in Darwin). Note that this provides only dnl weak symbols, not weak aliases -dnl +dnl dnl D*/ AC_DEFUN([PAC_PROG_C_WEAK_SYMBOLS],[ pragma_extra_message="" @@ -273,7 +273,7 @@ int Foo(int a) { return a; } # only within a single object file! This tests that case. # Note that there is an extern int PFoo declaration before the # pragma. Some compilers require this in order to make the weak symbol -# externally visible. +# externally visible. if test "$has_pragma_weak" = yes ; then PAC_COMPLINK_IFELSE([ AC_LANG_SOURCE([ @@ -315,7 +315,7 @@ return Foo(0);} ]) fi dnl -if test -z "$pac_cv_prog_c_weak_symbols" ; then +if test -z "$pac_cv_prog_c_weak_symbols" ; then AC_TRY_LINK([ extern int PFoo(int); #pragma _HP_SECONDARY_DEF Foo PFoo @@ -404,14 +404,14 @@ correctly set error code when a fatal error occurs]) fi ]) -dnl/*D +dnl/*D dnl PAC_PROG_C_MULTIPLE_WEAK_SYMBOLS - Test whether C and the dnl linker allow multiple weak symbols. dnl dnl Synopsis dnl PAC_PROG_C_MULTIPLE_WEAK_SYMBOLS(action-if-true,action-if-false) dnl -dnl +dnl dnl D*/ AC_DEFUN([PAC_PROG_C_MULTIPLE_WEAK_SYMBOLS],[ AC_CACHE_CHECK([for multiple weak symbol support], @@ -451,10 +451,10 @@ dnl pac_cc_strict_flags contains the strict flags. dnl dnl -std=c89 is used to select the C89 version of the ANSI/ISO C standard. dnl As of this writing, many C compilers still accepted only this version, -dnl not the later C99 version. When all compilers accept C99, this +dnl not the later C99 version. When all compilers accept C99, this dnl should be changed to the appropriate standard level. Note that we've -dnl had trouble with gcc 2.95.3 accepting -std=c89 but then trying to -dnl compile program with a invalid set of options +dnl had trouble with gcc 2.95.3 accepting -std=c89 but then trying to +dnl compile program with a invalid set of options dnl (-D __STRICT_ANSI__-trigraphs) AC_DEFUN([PAC_CC_STRICT],[ export enable_strict_done @@ -469,14 +469,14 @@ if test "$enable_strict_done" != "yes" ; then # warning at 256k. # # These were added to reduce warnings: - # -Wno-missing-field-initializers -- We want to allow a struct to be - # initialized to zero using "struct x y = {0};" and not require + # -Wno-missing-field-initializers -- We want to allow a struct to be + # initialized to zero using "struct x y = {0};" and not require # each field to be initialized individually. # -Wno-unused-parameter -- For portability, some parameters go unused - # when we have different implementations of functions for + # when we have different implementations of functions for # different platforms - # -Wno-unused-label -- We add fn_exit: and fn_fail: on all functions, - # but fn_fail may not be used if the function doesn't return an + # -Wno-unused-label -- We add fn_exit: and fn_fail: on all functions, + # but fn_fail may not be used if the function doesn't return an # error. # -Wno-sign-compare -- read() and write() return bytes read/written # as a signed value, but we often compare this to size_t (or @@ -484,10 +484,10 @@ if test "$enable_strict_done" != "yes" ; then # -Wno-format-zero-length -- this warning is irritating and useless, since # a zero-length format string is very well defined # These were removed to reduce warnings: - # -Wcast-qual -- Sometimes we need to cast "volatile char*" to + # -Wcast-qual -- Sometimes we need to cast "volatile char*" to # "char*", e.g., for memcpy. # -Wpadded -- We catch struct padding with asserts when we need to - # -Wredundant-decls -- Having redundant declarations is benign and the + # -Wredundant-decls -- Having redundant declarations is benign and the # code already has some. # -Waggregate-return -- This seems to be a performance-related warning # aggregate return values are legal in ANSI C, but they may be returned @@ -498,7 +498,7 @@ if test "$enable_strict_done" != "yes" ; then # -Wdeclaration-after-statement -- This is a C89 # requirement. When compiling with C99, this should be # disabled. - # -Wfloat-equal -- There are places in hwloc that set a float var to 0, then + # -Wfloat-equal -- There are places in hwloc that set a float var to 0, then # compare it to 0 later to see if it was updated. Also when using strtod() # one needs to compare the return value with 0 to see whether a conversion # was performed. @@ -519,11 +519,11 @@ if test "$enable_strict_done" != "yes" ; then # However, since Intel compiler currently does not include -Wtype-limits # in -Wextra, -Wtype-limits was added to handle warnings with the Intel # compiler. - # -Wno-type-limits -- There are places where we compare an unsigned to - # a constant that happens to be zero e.g., if x is unsigned and + # -Wno-type-limits -- There are places where we compare an unsigned to + # a constant that happens to be zero e.g., if x is unsigned and # MIN_VAL is zero, we'd like to do "MPIU_Assert(x >= MIN_VAL);". - # Note this option is not supported by gcc 4.2. This needs to be added - # after most other warning flags, so that we catch a gcc bug on 32-bit + # Note this option is not supported by gcc 4.2. This needs to be added + # after most other warning flags, so that we catch a gcc bug on 32-bit # that doesn't give a warning that this is unsupported, unless another # warning is triggered, and then if gives an error. # the embedded newlines in this string are safe because we evaluate each @@ -660,11 +660,11 @@ fi ]) dnl/*D -dnl PAC_ARG_STRICT - Add --enable-strict to configure. +dnl PAC_ARG_STRICT - Add --enable-strict to configure. dnl dnl Synopsis: dnl PAC_ARG_STRICT -dnl +dnl dnl Output effects: dnl Adds '--enable-strict' to the command line. dnl @@ -685,7 +685,7 @@ dnl four dnl eight dnl dnl In addition, a "Could not determine alignment" and a "error!" -dnl return is possible. +dnl return is possible. AC_DEFUN([PAC_C_MAX_INTEGER_ALIGN],[ AC_CACHE_CHECK([for max C struct integer alignment], pac_cv_c_max_integer_align,[ @@ -816,7 +816,7 @@ dnl eight dnl sixteen dnl dnl In addition, a "Could not determine alignment" and a "error!" -dnl return is possible. +dnl return is possible. AC_DEFUN([PAC_C_MAX_FP_ALIGN],[ AC_CACHE_CHECK([for max C struct floating point alignment], pac_cv_c_max_fp_align,[ @@ -930,7 +930,7 @@ dnl four dnl eight dnl dnl In addition, a "Could not determine alignment" and a "error!" -dnl return is possible. +dnl return is possible. AC_DEFUN([PAC_C_MAX_DOUBLE_FP_ALIGN],[ AC_CACHE_CHECK([for max C struct alignment of structs with doubles], pac_cv_c_max_double_fp_align,[ @@ -1232,7 +1232,7 @@ dnl Synopsis: dnl PAC_FUNC_NEEDS_DECL(headerfiles,funcname) dnl dnl Output Effect: -dnl Sets 'NEEDS__DECL' if 'funcname' is not declared by the +dnl Sets 'NEEDS__DECL' if 'funcname' is not declared by the dnl headerfiles. dnl dnl Approach: @@ -1269,8 +1269,8 @@ dnl #endif dnl If *not*, define __attribute__(a) as null dnl dnl We start by requiring Gcc. Some other compilers accept __attribute__ -dnl but generate warning messages, or have different interpretations -dnl (which seems to make __attribute__ just as bad as #pragma) +dnl but generate warning messages, or have different interpretations +dnl (which seems to make __attribute__ just as bad as #pragma) dnl For example, the Intel icc compiler accepts __attribute__ and dnl __attribute__((pure)) but generates warnings for __attribute__((format...)) dnl @@ -1308,7 +1308,7 @@ AC_COMPILE_IFELSE([ ],[ if ${AR-ar} ${AR_FLAGS-cr} libconftest.a conftest.$OBJEXT >/dev/null 2>&1 ; then if ${RANLIB-:} libconftest.a >/dev/null 2>&1 ; then - # Anything less than sleep 10, and Mac OS/X (Darwin) + # Anything less than sleep 10, and Mac OS/X (Darwin) # will claim that install works because ranlib won't complain sleep 10 libinstall="$INSTALL_DATA" @@ -1325,7 +1325,7 @@ int main(int argc, char **argv){ return foo(0); } # Success! Install works ac_cv_prog_install_breaks_libs=no ],[ - # Failure! Does install -p work? + # Failure! Does install -p work? rm -f libconftest1.a if ${libinstall} -p libconftest.a libconftest1.a >/dev/null 2>&1 ; then AC_LINK_IFELSE([],[ @@ -1366,7 +1366,7 @@ AC_SUBST(RANLIB_AFTER_INSTALL) # These tests check not only that the compiler defines some symbol, such # as __FUNCTION__, but that the symbol correctly names the function. # -# Defines +# Defines # HAVE__FUNC__ (if __func__ defined) # HAVE_CAP__FUNC__ (if __FUNC__ defined) # HAVE__FUNCTION__ (if __FUNCTION__ defined) diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_coverage.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_coverage.m4 index ce949d40a65..4b7cf0881ad 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_coverage.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_coverage.m4 @@ -44,7 +44,7 @@ if test "$enable_coverage" = "yes" ; then fi fi # Add similar options for g77 so that the Fortran tests will also - # + # if test "$enable_f77" = yes ; then if test "$ac_cv_f77_compiler_gnu" = "yes" ; then FFLAGS="$FFLAGS -fprofile-arcs -ftest-coverage" @@ -67,14 +67,14 @@ if test "$enable_coverage" = "yes" ; then AC_MSG_WARN([--enable-coverage only supported for GFORTRAN]) fi fi - # On some platforms (e.g., Mac Darwin), we must also *link* + # On some platforms (e.g., Mac Darwin), we must also *link* # with the -fprofile-args -ftest-coverage option. AC_MSG_CHECKING([whether compilation with coverage analysis enabled works]) AC_LINK_IFELSE([AC_LANG_SOURCE([int main(int argc, char **argv){return 1;}])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([Unable to link programs when coverage analysis enabled])]) - + # Test for the routines that we need to use to ensure that the # data files are (usually) written out # FIXME: Some versions of Linux provide usleep, but it rounds times diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_cxx.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_cxx.m4 index 72febd8ab9d..2edf6235389 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_cxx.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_cxx.m4 @@ -78,7 +78,7 @@ AC_DEFUN([AX_CXX_NAMESPACE_STD], AC_CACHE_CHECK(whether the compiler implements the namespace std, ac_cv_cxx_namespace_std, [ac_cv_cxx_namespace_std=no -if test "$ac_cv_cxx_namespaces" = yes ; then +if test "$ac_cv_cxx_namespaces" = yes ; then AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ @@ -106,13 +106,13 @@ dnl dnl If no actions are specified, a working value is added to 'CXXOPTIONS' dnl dnl Notes: -dnl This is now careful to check that the output is different, since +dnl This is now careful to check that the output is different, since dnl some compilers are noisy. -dnl +dnl dnl We are extra careful to prototype the functions in case compiler options dnl that complain about poor code are in effect. dnl -dnl Because this is a long script, we have ensured that you can pass a +dnl Because this is a long script, we have ensured that you can pass a dnl variable containing the option name as the first argument. dnl D*/ AC_DEFUN([PAC_CXX_CHECK_COMPILER_OPTION],[ diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_f77.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_f77.m4 index 92d310b0f21..e7a8feff72e 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_f77.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_f77.m4 @@ -13,7 +13,7 @@ PAC_POP_FLAG([FFLAGS]) dnl dnl/*D dnl PAC_PROG_F77_NAME_MANGLE - Determine how the Fortran compiler mangles -dnl names +dnl names dnl dnl Synopsis: dnl PAC_PROG_F77_NAME_MANGLE([action]) @@ -31,20 +31,20 @@ dnl mixed -> mixed_ F77_NAME_MIXED_USCORE dnl mixed -> UPPER@STACK_SIZE F77_NAME_UPPER_STDCALL dnl.ve dnl If an action is specified, it is executed instead. -dnl +dnl dnl Notes: dnl We assume that if lower -> lower (any underscore), upper -> upper with the -dnl same underscore behavior. Previous versions did this by -dnl compiling a Fortran program and running strings -a over it. Depending on -dnl strings is a bad idea, so instead we try compiling and linking with a +dnl same underscore behavior. Previous versions did this by +dnl compiling a Fortran program and running strings -a over it. Depending on +dnl strings is a bad idea, so instead we try compiling and linking with a dnl C program, since that is why we are doing this anyway. A similar approach -dnl is used by FFTW, though without some of the cases we check (specifically, +dnl is used by FFTW, though without some of the cases we check (specifically, dnl mixed name mangling). STD_CALL not only specifies a particular name dnl mangling convention (adding the size of the calling stack into the function dnl name, but also the stack management convention (callee cleans the stack, dnl and arguments are pushed onto the stack from right to left) dnl -dnl One additional problem is that some Fortran implementations include +dnl One additional problem is that some Fortran implementations include dnl references to the runtime (like pgf90_compiled for the pgf90 compiler dnl used as the "Fortran 77" compiler). This is not yet solved. dnl @@ -104,7 +104,7 @@ if test "$pac_found" != "yes" ; then AC_LANG_PROGRAM([],[ call my_name(0)]) ],[ pac_found=yes - ]) + ]) AC_LANG_POP([Fortran 77]) LIBS="$saved_LIBS" rm -f cconftest.$OBJEXT @@ -163,7 +163,7 @@ name_scheme="`echo $pac_cv_prog_f77_name_mangle | sed 's% %_%g'`" # Turn lowercase into uppercase. name_scheme="`echo $name_scheme | sed -e 'y%abcdefghijklmnopqrstuvwxyz%ABCDEFGHIJKLMNOPQRSTUVWXYZ%'`" F77_NAME_MANGLE="F77_NAME_${name_scheme}" -AC_DEFINE_UNQUOTED([$F77_NAME_MANGLE]) +AC_DEFINE_UNQUOTED([$F77_NAME_MANGLE]) AC_SUBST(F77_NAME_MANGLE) if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then AC_MSG_WARN([Unknown Fortran naming scheme]) @@ -208,11 +208,11 @@ dnl Sets SIZEOF_F77_uctype to the size if bytes of type. dnl If type is unknown, the size is set to 0. dnl If cross-compiling, the value cross-size is used (it may be a variable) dnl For example 'PAC_PROG_F77_CHECK_SIZEOF(real)' defines -dnl 'SIZEOF_F77_REAL' to 4 on most systems. The variable +dnl 'SIZEOF_F77_REAL' to 4 on most systems. The variable dnl 'pac_cv_sizeof_f77_' (e.g., 'pac_cv_sizeof_f77_real') is also set to -dnl the size of the type. +dnl the size of the type. dnl If the corresponding variable is already set, that value is used. -dnl If the name has an '*' in it (e.g., 'integer*4'), the defined name +dnl If the name has an '*' in it (e.g., 'integer*4'), the defined name dnl replaces that with an underscore (e.g., 'SIZEOF_F77_INTEGER_4'). dnl dnl Notes: @@ -263,7 +263,7 @@ static int isize_val=0; void cisize_(char *,char*); void isize_(void); void cisize_(char *i1p, char *i2p) -{ +{ isize_val = (int)(i2p - i1p); } ],[ @@ -398,7 +398,7 @@ dnl Notes: dnl Check whether '!' may be used to begin comments in Fortran. dnl dnl This macro requires a version of autoconf `after` 2.13; the 'acgeneral.m4' -dnl file contains an error in the handling of Fortran programs in +dnl file contains an error in the handling of Fortran programs in dnl 'AC_TRY_COMPILE' (fixed in our local version). dnl dnl D*/ @@ -434,13 +434,13 @@ dnl dnl If no actions are specified, a working value is added to 'FOPTIONS' dnl dnl Notes: -dnl This is now careful to check that the output is different, since +dnl This is now careful to check that the output is different, since dnl some compilers are noisy. -dnl +dnl dnl We are extra careful to prototype the functions in case compiler options dnl that complain about poor code are in effect. dnl -dnl Because this is a long script, we have ensured that you can pass a +dnl Because this is a long script, we have ensured that you can pass a dnl variable containing the option name as the first argument. dnl D*/ AC_DEFUN([PAC_F77_CHECK_COMPILER_OPTION],[ @@ -519,10 +519,10 @@ dnl PAC_PROG_F77_LIBRARY_DIR_FLAG - Determine the flag used to indicate dnl the directories to find libraries in dnl dnl Notes: -dnl Many compilers accept '-Ldir' just like most C compilers. -dnl Unfortunately, some (such as some HPUX Fortran compilers) do not, +dnl Many compilers accept '-Ldir' just like most C compilers. +dnl Unfortunately, some (such as some HPUX Fortran compilers) do not, dnl and require instead either '-Wl,-L,dir' or something else. This -dnl command attempts to determine what is accepted. The flag is +dnl command attempts to determine what is accepted. The flag is dnl placed into 'F77_LIBDIR_LEADER'. dnl dnl D*/ @@ -574,19 +574,19 @@ if test "X$pac_cv_prog_f77_library_dir_flag" != "Xnone" ; then fi ]) dnl -dnl/*D +dnl/*D dnl PAC_PROG_F77_HAS_INCDIR - Check whether Fortran accepts -Idir flag dnl dnl Syntax: dnl PAC_PROG_F77_HAS_INCDIR(directory,action-if-true,action-if-false) dnl dnl Output Effect: -dnl Sets 'F77_INCDIR' to the flag used to choose the directory. +dnl Sets 'F77_INCDIR' to the flag used to choose the directory. dnl dnl Notes: dnl This refers to the handling of the common Fortran include extension, dnl not to the use of '#include' with the C preprocessor. -dnl If directory does not exist, it will be created. In that case, the +dnl If directory does not exist, it will be created. In that case, the dnl directory should be a direct descendant of the current directory. dnl dnl D*/ @@ -628,7 +628,7 @@ fi dnl dnl/*D dnl PAC_PROG_F77_ALLOWS_UNUSED_EXTERNALS - Check whether the Fortran compiler -dnl allows unused and undefined functions to be listed in an external +dnl allows unused and undefined functions to be listed in an external dnl statement dnl dnl Syntax: @@ -659,12 +659,12 @@ else ifelse([$2],[],[:],[$2]) fi ]) -dnl PAC_PROG_F77_RUN_PROC_FROM_C( c main program, fortran routine, -dnl [action-if-works], [action-if-fails], +dnl PAC_PROG_F77_RUN_PROC_FROM_C( c main program, fortran routine, +dnl [action-if-works], [action-if-fails], dnl [cross-action] ) dnl Fortran routine MUST be named ftest unless you include code dnl to select the appropriate Fortran name. -dnl +dnl AC_DEFUN([PAC_PROG_F77_RUN_PROC_FROM_C],[ AC_REQUIRE([AC_HEADER_STDC]) AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) @@ -706,18 +706,18 @@ AC_LANG_POP([Fortran 77]) ]) dnl PAC_PROG_F77_IN_C_LIBS dnl -dnl Find the essential libraries that are needed to use the C linker to -dnl create a program that includes a trival Fortran code. +dnl Find the essential libraries that are needed to use the C linker to +dnl create a program that includes a trival Fortran code. dnl dnl For example, all pgf90 compiled objects include a reference to the dnl symbol pgf90_compiled, found in libpgf90 . dnl -dnl There is an additional problem. To *run* programs, we may need +dnl There is an additional problem. To *run* programs, we may need dnl additional arguments; e.g., if shared libraries are used. Even dnl with autoconf 2.52, the autoconf macro to find the library arguments dnl doesn't handle this, either by detecting the use of -rpath or dnl by trying to *run* a trivial program. It only checks for *linking*. -dnl +dnl dnl AC_DEFUN([PAC_PROG_F77_IN_C_LIBS],[ AC_REQUIRE([AC_HEADER_STDC]) @@ -788,7 +788,7 @@ fi ]) dnl dnl Test to see if we should use C or Fortran to link programs whose -dnl main program is in Fortran. We may find that neither work because +dnl main program is in Fortran. We may find that neither work because dnl we need special libraries in each case. dnl AC_DEFUN([PAC_PROG_F77_LINKER_WITH_C],[ @@ -905,7 +905,7 @@ AC_LINK_IFELSE([],[ pac_libs="" pac_other="" for name in $FLIBS ; do - case $name in + case $name in -l*) pac_libs="$pac_libs $name" ;; -L*) pac_ldirs="$pac_ldirs $name" ;; *) pac_other="$pac_other $name" ;; @@ -927,7 +927,7 @@ AC_LANG_PUSH([C]) ]) dnl dnl Test for extra libraries needed when linking C routines that use -dnl stdio with Fortran. This test was created for OSX, which +dnl stdio with Fortran. This test was created for OSX, which dnl sometimes requires -lSystemStubs. If another library is needed, dnl add it to F77_OTHER_LIBS dnl @@ -991,7 +991,7 @@ dnl Endof ac_cache_check if test "$pac_cv_prog_f77_and_c_stdio_libs" != "none" \ -a "$pac_cv_prog_f77_and_c_stdio_libs" != "unknown" ; then F77_OTHER_LIBS="$F77_OTHER_LIBS $pac_cv_prog_f77_and_c_stdio_libs" -fi +fi ]) dnl dnl Check that the FLIBS determined by AC_F77_LIBRARY_LDFLAGS is valid. @@ -1205,7 +1205,7 @@ AC_LANG_POP([Fortran 77]) AC_MSG_RESULT([$pac_cv_f77_accepts_F]) ]) dnl -dnl /*D +dnl /*D dnl PAC_PROG_F77_CRAY_POINTER - Check if Fortran 77 supports Cray-style pointer. dnl If so, set pac_cv_prog_f77_has_pointer to yes dnl and find out if any extra compiler flag is @@ -1325,16 +1325,16 @@ dnl PAC_F77_LOGICALS_IN_C(MPI_FINT) dnl dnl where MPI_FINT is the C type for Fortran integer. dnl -dnl Use a Fortran main program. This simplifies some steps, -dnl since getting all of the Fortran libraries (including shared -dnl libraries that are not in the default library search path) can -dnl be tricky. Specifically, The PROG_F77_RUN_PROC_FROM_C failed with +dnl Use a Fortran main program. This simplifies some steps, +dnl since getting all of the Fortran libraries (including shared +dnl libraries that are not in the default library search path) can +dnl be tricky. Specifically, The PROG_F77_RUN_PROC_FROM_C failed with dnl some installations of the Portland group compiler. dnl dnl We'd also like to check other values for .TRUE. and .FALSE. to see dnl if the compiler allows (or uses) more than one value (some DEC compilers, -dnl for example, used the high (sign) bit to indicate true and false; the -dnl rest of the bits were ignored. For now, we'll assume that there are +dnl for example, used the high (sign) bit to indicate true and false; the +dnl rest of the bits were ignored. For now, we'll assume that there are dnl unique true and false values. dnl AC_DEFUN([PAC_F77_LOGICALS_IN_C],[ @@ -1416,14 +1416,14 @@ if test -n "$true_val" -a -n "$false_val" ; then fi ]) dnl/*D -dnl PAC_PROG_F77_MISMATCHED_ARGS([option],[AllOnly]) - Determine whether the -dnl Fortran compiler allows routines to be called with different -dnl argument types. If not, attempts to determine a command-line argument -dnl that permits such use +dnl PAC_PROG_F77_MISMATCHED_ARGS([option],[AllOnly]) - Determine whether the +dnl Fortran compiler allows routines to be called with different +dnl argument types. If not, attempts to determine a command-line argument +dnl that permits such use dnl (The Fortran standard prohibits this usage) dnl dnl option is set to the compiler option to use. -dnl if AllOnly is yes (literal, not variable with value), then only consider +dnl if AllOnly is yes (literal, not variable with value), then only consider dnl options that turn off checking dnl for all routines dnl @@ -1470,7 +1470,7 @@ if test "X$pac_cv_prog_f77_mismatched_args" = X ; then FFLAGS="$save_FFLAGS" if test "$testok" = yes ; then break ; fi done - if test "$testok" = yes ; then + if test "$testok" = yes ; then pac_cv_prog_f77_mismatched_args_parm="$flags" pac_cv_prog_f77_mismatched_args="yes, with $pac_cv_prog_f77_mismatched_args_parm" fi @@ -1479,7 +1479,7 @@ if test "X$pac_cv_prog_f77_mismatched_args" = X ; then fi AC_MSG_RESULT($pac_cv_prog_f77_mismatched_args) if test "$pac_cv_prog_f77_mismatched_args" = no ; then - AC_MSG_ERROR([The Fortran compiler $F77 will not compile files that call + AC_MSG_ERROR([The Fortran compiler $F77 will not compile files that call the same routine with arguments of different types.]) fi diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_f77old.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_f77old.m4 index 5d6e2d9e70a..71d1ae4023e 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_f77old.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_f77old.m4 @@ -15,7 +15,7 @@ dnl.ve dnl If 'F77_GETARG' has a value, then that value and the values for these dnl other symbols will be used instead. If no approach is found, all of these dnl variables will have empty values. -dnl If no other approach works and a file 'f77argdef' is in the directory, +dnl If no other approach works and a file 'f77argdef' is in the directory, dnl that file will be sourced for the values of the above four variables. dnl dnl In most cases, you should add F77_GETARG_FFLAGS to the FFLAGS variable @@ -24,13 +24,13 @@ dnl performed on the compiler version that will be used. dnl dnl 'AC_SUBST' is called for all six variables. dnl -dnl One complication is that on systems with multiple Fortran compilers, +dnl One complication is that on systems with multiple Fortran compilers, dnl some libraries used by one Fortran compiler may have been (mis)placed dnl in a common location. We have had trouble with libg2c in particular. dnl To work around this, we test whether iargc etc. work first. This dnl will catch most systems and will speed up the tests. dnl -dnl Next, the libraries are only added if they are needed to complete a +dnl Next, the libraries are only added if they are needed to complete a dnl link; they aren''t added just because they exist. dnl dnl f77argdef @@ -55,11 +55,11 @@ AC_CACHE_VAL(pac_cv_prog_f77_cmdarg, f77_getargdecl="${F77_GETARGDECL:-external getarg}" f77_getarg="${F77_GETARG:-call GETARG(i,s)}" f77_iargc="${F77_IARGC:-IARGC()}" - # + # # Grumble. The Absoft Fortran compiler computes i - i as 0 and then # 1.0 / 0 at compile time, even though the code may never be executed. # What we need is a way to generate an error, so the second usage of i - # was replaced with f77_iargc. + # was replaced with f77_iargc. cat > conftest.f <, but this caused other + # (we experimented with using a , but this caused other # problems because we need in the IFS) trial_LIBS="0 -lU77 -lPEPCF90" if test "$NOG2C" != "1" ; then @@ -149,7 +149,7 @@ $libs" # The -N109 was used for getarg before we realized that GETARG # was necessary with the (non standard conforming) Absoft compiler # (Fortran is monocase; Absoft uses mixedcase by default) - # The -f is used by Absoft and is the compiler switch that folds + # The -f is used by Absoft and is the compiler switch that folds # symbolic names to lower case. Without this option, the compiler # considers upper- and lower-case letters to be unique. # The -YEXT_NAMES=LCS will cause external names to be output as lower @@ -157,14 +157,14 @@ $libs" # The first line is ", the space is important # To make the Absoft f77 and f90 work together, we need to prefer the # upper case versions of the arguments. They also require libU77. - # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) + # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) # Fortran compilers # # Problem: The Intel efc compiler hangs when presented with -N109 . # The only real fix for this is to detect this compiler and exclude # the test. We may want to reorganize these tests so that if we # can compile code without special options, we never look for them. - # + # using_intel_efc="no" pac_test_msg=`$F77 -V 2>&1 | grep 'Intel(R) Fortran Itanium'` if test "$pac_test_msg" != "" ; then @@ -194,10 +194,10 @@ $libs" PAC_F77_CHECK_COMPILER_OPTION($flag,opt_ok=yes,opt_ok=no) fi if test "$opt_ok" = "yes" ; then - if test "$flag" = " " -o "$flag" = "000" ; then - fflag="" - else - fflag="$flag" + if test "$flag" = " " -o "$flag" = "000" ; then + fflag="" + else + fflag="$flag" fi # discard options that don't allow mixed-case name matching cat > conftest.f </dev/null 2>&1 ; then found_answer="yes" fi - else + else found_answer="yes" fi fi @@ -358,9 +358,9 @@ EOF fi done done - IFS="$save_IFS" + IFS="$save_IFS" rm -f conftest.* - trial=`expr $trial + 1` + trial=`expr $trial + 1` done fi pac_cv_F77_GETARGDECL="$F77_GETARGDECL" @@ -368,7 +368,7 @@ pac_cv_F77_IARGC="$F77_IARGC" pac_cv_F77_GETARG="$F77_GETARG" pac_cv_FXX_MODULE="$FXX_MODULE" ]) -if test "$found_cached" = "yes" ; then +if test "$found_cached" = "yes" ; then AC_MSG_RESULT([$pac_cv_prog_f77_cmdarg]) elif test -z "$pac_cv_F77_IARGC" ; then AC_MSG_WARN([Could not find a way to access the command line from Fortran 77]) diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_fc.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_fc.m4 index 870a5bea101..609ccb33266 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_fc.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_fc.m4 @@ -33,7 +33,7 @@ dnl ifc - An older Intel compiler dnl fc - A compiler on some unknown system. This has been removed because dnl it may also be the name of a command for something other than dnl the Fortran compiler (e.g., fc=file system check!) -dnl gfortran - The GNU Fortran compiler (not the same as g95) +dnl gfortran - The GNU Fortran compiler (not the same as g95) dnl gfc - An alias for gfortran recommended in cygwin installations dnl NOTE: this macro suffers from a basically intractable "expanded before it dnl was required" problem when libtool is also used @@ -58,7 +58,7 @@ AC_COMPILE_IFELSE([ ],[ AC_MSG_RESULT([f90]) ],[ - ac_fc_srcext="f" + ac_fc_srcext="f" AC_COMPILE_IFELSE([ AC_LANG_PROGRAM() ],[ @@ -101,12 +101,12 @@ AC_LINK_IFELSE([ rm -f work.pc work.pcl AC_LANG_POP(Fortran) dnl cross_compiling no longer maintained by autoconf as part of the -dnl AC_LANG changes. If we set it here, a later AC_LANG may not +dnl AC_LANG changes. If we set it here, a later AC_LANG may not dnl restore it (in the case where one compiler claims to be a cross compiler dnl and another does not) dnl cross_compiling=$pac_cv_prog_f90_cross ]) -dnl/*D +dnl/*D dnl PAC_PROG_FC_INT_KIND - Determine kind parameter for an integer with dnl the specified number of bytes. dnl @@ -124,7 +124,7 @@ else AC_LANG_PUSH(Fortran) AC_MSG_CHECKING([for Fortran 90 integer kind for $2-byte integers]) # Convert bytes to digits - case $2 in + case $2 in 1) sellen=2 ;; 2) sellen=4 ;; 4) sellen=8 ;; @@ -134,7 +134,7 @@ else esac # Check for cached value eval testval=\$"pac_cv_prog_fc_int_kind_$sellen" - if test -n "$testval" ; then + if test -n "$testval" ; then AC_MSG_RESULT([$testval (cached)]) $1=$testval else @@ -170,7 +170,7 @@ dnl ------------------------------------------------------------------------ dnl Special characteristics that have no autoconf counterpart but that dnl we need as part of the Fortran 90 support. To distinquish these, they dnl have a [PAC] prefix. -dnl +dnl dnl At least one version of the Cray compiler needs the option -em to dnl generate a separate module file, rather than including the module dnl information in the object (.o) file. @@ -226,7 +226,7 @@ AC_COMPILE_IFELSE([ pac_MOD="" fi fi - if test -z "$pac_MOD" ; then + if test -z "$pac_MOD" ; then pac_cv_fc_module_ext="unknown" else pac_cv_fc_module_ext=$pac_MOD @@ -304,7 +304,7 @@ AC_COMPILE_IFELSE([],[ mv $pac_module conftestdir # Remove any temporary files, and hide the work.pc file # (if the compiler generates them) - if test -f work.pc ; then + if test -f work.pc ; then mv -f work.pc conftest.pc fi rm -f work.pcl @@ -343,7 +343,7 @@ if test "X$pac_cv_fc_module_incflag" = "X" ; then AC_MSG_RESULT([-cl,filename where filename contains a list of files and directories]) FC_WORK_FILES_ARG="-cl,mpimod.pcl" FCMODINCSPEC="-cl,/mod.pcl" - else + else # The version of the Intel compiler that I have refuses to let # you put the "work catalog" list anywhere but the current directory. pac_cv_fc_module_incflag="Unavailable!" @@ -351,12 +351,12 @@ if test "X$pac_cv_fc_module_incflag" = "X" ; then else # Early versions of the Intel ifc compiler required a *file* # containing the names of files that contained the names of the - # + # # -cl,filename.pcl # filename.pcl contains # fullpathname.pc - # The "fullpathname.pc" is generated, I believe, when a module is - # compiled. + # The "fullpathname.pc" is generated, I believe, when a module is + # compiled. # Intel compilers use a wierd system: -cl,filename.pcl . If no file is # specified, work.pcl and work.pc are created. However, if you specify # a file, it must contain the name of a file ending in .pc . Ugh! @@ -415,7 +415,7 @@ AC_COMPILE_IFELSE([],[ rm -f "$pac_module" # Remove any temporary files, and hide the work.pc file # (if the compiler generates them) - if test -f work.pc ; then + if test -f work.pc ; then mv -f work.pc conftest.pc fi rm -f work.pcl @@ -478,7 +478,7 @@ AC_SUBST([FCMODOUTFLAG],[$pac_cv_fc_module_outflag]) dnl dnl PAC_FC_AND_F77_COMPATIBLE([action-if-true],[action-if-false]) dnl -dnl Determine whether object files compiled with Fortran 77 can be +dnl Determine whether object files compiled with Fortran 77 can be dnl linked to Fortran 90 main programs. dnl dnl The test uses a name that includes an underscore unless the 3rd @@ -543,7 +543,7 @@ dnl ]) dnl dnl -dnl /*D +dnl /*D dnl PAC_PROG_FC_CRAY_POINTER - Check if Fortran supports Cray-style pointer. dnl If so, set pac_cv_prog_fc_has_pointer to yes dnl and find out if any extra compiler flag is @@ -650,7 +650,7 @@ AC_LANG_POP(C) dnl if test "$pac_cv_prog_fc_and_c_stdio_libs" != none -a \ "$pac_cv_prog_fc_and_c_stdio_libs" != unknown ; then - FC_OTHER_LIBS="$FC_OTHER_LIBS $pac_cv_prog_fc_and_c_stdio_libs" + FC_OTHER_LIBS="$FC_OTHER_LIBS $pac_cv_prog_fc_and_c_stdio_libs" fi ]) dnl @@ -668,13 +668,13 @@ dnl dnl If no actions are specified, a working value is added to 'FCOPTIONS' dnl dnl Notes: -dnl This is now careful to check that the output is different, since +dnl This is now careful to check that the output is different, since dnl some compilers are noisy. -dnl +dnl dnl We are extra careful to prototype the functions in case compiler options dnl that complain about poor code are in effect. dnl -dnl Because this is a long script, we have ensured that you can pass a +dnl Because this is a long script, we have ensured that you can pass a dnl variable containing the option name as the first argument. dnl D*/ AC_DEFUN([PAC_FC_CHECK_COMPILER_OPTION],[ @@ -817,14 +817,14 @@ for arg in --version -V -v ; do rm -f conftest.txt PAC_RUNLOG([$FC $arg conftest.txt 2>&1]) # Ignore the return code, because some compilers set the - # return code to zero on invalid arguments and some to + # return code to zero on invalid arguments and some to # non-zero on success (with no files to compile) if test -f conftest.txt ; then if grep 'Portland Group' conftest.txt >/dev/null 2>&1 ; then pac_cv_fc_vendor=pgi elif grep 'Sun Workshop' conftest.txt >/dev/null 2>&1 ; then pac_cv_fc_vendor=sun - elif grep 'Sun Fortran 9' conftest.txt >/dev/null 2>&1 ; then + elif grep 'Sun Fortran 9' conftest.txt >/dev/null 2>&1 ; then pac_cv_fc_vendor=sun elif grep 'Absoft' conftest.txt >/dev/null 2>&1 ; then pac_cv_fc_vendor=absoft diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_make.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_make.m4 index 147e92e9c2e..2c900e810b6 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_make.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_make.m4 @@ -72,7 +72,7 @@ fi ])dnl dnl/*D -dnl PAC_PROG_MAKE_ALLOWS_COMMENTS - Check whether comments are allowed in +dnl PAC_PROG_MAKE_ALLOWS_COMMENTS - Check whether comments are allowed in dnl shell commands in a makefile dnl dnl Synopsis: @@ -105,7 +105,7 @@ ALL: pac_str=`$MAKE -f conftest 2>&1` # This is needed for Mac OSX 10.5 rm -rf conftest.dSYM -rm -f conftest +rm -f conftest if test "$pac_str" != "success" ; then pac_cv_prog_make_allows_comments="no" else @@ -135,7 +135,7 @@ dnl or dnl.vb dnl .PATH: . ${srcdir} dnl.ve -dnl +dnl dnl Notes: dnl The test checks that the path works with implicit targets (some makes dnl support only explicit targets with 'VPATH' or 'PATH'). @@ -166,7 +166,7 @@ VPATH=.:conftestdir @echo \$< EOF ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` -if test -n "$ac_out" ; then +if test -n "$ac_out" ; then pac_cv_prog_make_vpath="VPATH" else rm -f conftest @@ -177,7 +177,7 @@ all: a.o @echo \$< EOF ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` - if test -n "$ac_out" ; then + if test -n "$ac_out" ; then pac_cv_prog_make_vpath=".PATH" else pac_cv_prog_make_vpath="neither VPATH nor .PATH works" @@ -226,7 +226,7 @@ EOF pac_str=`$MAKE -f conftest 2>&1` # This is needed for Mac OSX 10.5 rm -rf conftest.dSYM -rm -f conftest +rm -f conftest if test "$pac_str" = "XX" ; then pac_cv_prog_make_set_cflags="no" else @@ -241,7 +241,7 @@ fi ])dnl dnl/*D -dnl PAC_PROG_MAKE_CLOCK_SKEW - Check whether there is a problem with +dnl PAC_PROG_MAKE_CLOCK_SKEW - Check whether there is a problem with dnl clock skew in suing make. dnl dnl Effect: @@ -277,7 +277,7 @@ fi ]) dnl/*D -dnl PAC_PROG_MAKE - Checks for the varieties of MAKE, including support for +dnl PAC_PROG_MAKE - Checks for the varieties of MAKE, including support for dnl VPATH dnl dnl Synopsis: @@ -292,10 +292,10 @@ dnl This macro uses 'PAC_PROG_MAKE_INCLUDE', dnl 'PAC_PROG_MAKE_ALLOWS_COMMENTS', 'PAC_PROG_MAKE_VPATH', and dnl 'PAC_PROG_MAKE_SET_CFLAGS'. See those commands for details about their dnl actions. -dnl +dnl dnl It may call 'AC_PROG_MAKE_SET', which sets 'SET_MAKE' to 'MAKE = @MAKE@' dnl if the make program does not set the value of make, otherwise 'SET_MAKE' -dnl is set to empty; if the make program echos the directory name, then +dnl is set to empty; if the make program echos the directory name, then dnl 'SET_MAKE' is set to 'MAKE = $MAKE'. dnl D*/ AC_DEFUN([PAC_PROG_MAKE],[ diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_mpi.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_mpi.m4 index f0013a9bd18..c90fb49065c 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_mpi.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_mpi.m4 @@ -1,5 +1,5 @@ dnl -dnl/*D +dnl/*D dnl PAC_LIB_MPI - Check for MPI library dnl dnl Synopsis: @@ -9,7 +9,7 @@ dnl Output Effect: dnl dnl Notes: dnl Currently, only checks for lib mpi and mpi.h. Later, we will add -dnl MPI_Pcontrol prototype (const int or not?). +dnl MPI_Pcontrol prototype (const int or not?). dnl dnl Prerequisites: dnl autoconf version 2.13 (for AC_SEARCH_LIBS) @@ -21,7 +21,7 @@ dnl MPI-2 Spawn? dnl MPI-2 RMA? dnl PAC_LIB_MPI([found text],[not found text]) AC_DEFUN([PAC_LIB_MPI],[ -dnl Set the prereq to 2.50 to avoid having +dnl Set the prereq to 2.50 to avoid having AC_PREREQ(2.50) if test "X$pac_lib_mpi_is_building" != "Xyes" ; then # Use CC if TESTCC is defined @@ -55,7 +55,7 @@ ifelse($1,,,[$1]) dnl This should also set MPIRUN. dnl dnl/*D -dnl PAC_ARG_MPI_TYPES - Add command-line switches for different MPI +dnl PAC_ARG_MPI_TYPES - Add command-line switches for different MPI dnl environments dnl dnl Synopsis: @@ -73,11 +73,11 @@ dnl is given, that type is used as if '--with-' was given. dnl dnl Sets 'CC', 'F77', 'TESTCC', 'TESTF77', and 'MPILIBNAME'. Does `not` dnl perform an AC_SUBST for these values. -dnl Also sets 'MPIBOOT' and 'MPIUNBOOT'. These are used to specify +dnl Also sets 'MPIBOOT' and 'MPIUNBOOT'. These are used to specify dnl programs that may need to be run before and after running MPI programs. dnl For example, 'MPIBOOT' may start demons necessary to run MPI programs and dnl 'MPIUNBOOT' will stop those demons. -dnl +dnl dnl The two forms of the compilers are to allow for tests of the compiler dnl when the MPI version of the compiler creates executables that cannot dnl be run on the local system (for example, the IBM SP, where executables @@ -87,21 +87,21 @@ dnl the size of data types). dnl dnl Historical note: dnl Some common autoconf tests, such as AC_CHECK_SIZEOF, used to require -dnl running a program. But some MPI compilers (often really compilation +dnl running a program. But some MPI compilers (often really compilation dnl scripts) produced programs that could only be run with special commands, dnl such as a batch submission system. To allow these test programs to be -dnl run, a separate set of compiler variables, TESTCC, TESTF77, etc., +dnl run, a separate set of compiler variables, TESTCC, TESTF77, etc., dnl were defined. However, in later versions of autoconf, it both became -dnl unnecessary to run programs for tests such as AC_CHECK_SIZEOF and +dnl unnecessary to run programs for tests such as AC_CHECK_SIZEOF and dnl it became necessary to define CC etc. before invoking AC_PROG_CC (and dnl the othe language compilers), because those commands now do much, much dnl more than just determining the compiler. dnl dnl To address the change, we still define the TESTCC etc. compilers where dnl possible to allow the use of AC_TRY_RUN when required, but we define -dnl the CC etc variables and do not define ac_cv_prog_CC etc., as these -dnl cause autoconf to skip all of the other initialization code that -dnl AC_PROG_CC etc. runs. Note also that this command must occur before +dnl the CC etc variables and do not define ac_cv_prog_CC etc., as these +dnl cause autoconf to skip all of the other initialization code that +dnl AC_PROG_CC etc. runs. Note also that this command must occur before dnl AC_PROG_CC (or anything that might cause AC_PROG_CC to be invoked). dnl dnl See also: @@ -160,7 +160,7 @@ dnl dnl Because autoconf insists on moving code to the beginning of dnl certain definitions, it is *not possible* to define a single command dnl that selects compilation scripts and also check for other options. -dnl Thus, this needs to be divided into +dnl Thus, this needs to be divided into dnl MPI_FIND_COMPILER_SCRIPTS dnl which can fail (i.e., not find a script), and dnl MPI_FIND_COMPILERS @@ -183,7 +183,7 @@ AC_ARG_VAR([MPIF77],[Name and absolute path of program used to compile MPI progr AC_ARG_VAR([MPICXX],[Name and absolute path of program used to compile MPI programs in C++]) AC_ARG_VAR([MPIF90],[Name and absolute path of program used to compile MPI programs in F90]) # -# Check for things that will cause trouble. For example, +# Check for things that will cause trouble. For example, # if MPICC is defined but does not contain a / or \, then PATH_PROG will # ignore the value if test -n "$MPICC" ; then @@ -192,7 +192,7 @@ changequote(<<,>>) [\\/]* | ?:[\\/]*) changequote([,]) # Ok, PATH_PROG will figure it out - ;; + ;; *) AC_MSG_ERROR([MPICC must be set to an absolute path if it is set]) esac @@ -203,7 +203,7 @@ changequote(<<,>>) [\\/]* | ?:[\\/]*) changequote([,]) # Ok, PATH_PROG will figure it out - ;; + ;; *) AC_MSG_ERROR([MPICXX must be set to an absolute path if it is set]) esac @@ -214,7 +214,7 @@ changequote(<<,>>) [\\/]* | ?:[\\/]*) changequote([,]) # Ok, PATH_PROG will figure it out - ;; + ;; *) AC_MSG_ERROR([MPIF77 must be set to an absolute path if it is set]) esac @@ -225,7 +225,7 @@ changequote(<<,>>) [\\/]* | ?:[\\/]*) changequote([,]) # Ok, PATH_PROG will figure it out - ;; + ;; *) AC_MSG_ERROR([MPIF90 must be set to an absolute path if it is set]) esac @@ -233,12 +233,12 @@ fi case $ac_mpi_type in mpich) - dnl + dnl dnl This isn't correct. It should try to get the underlying compiler dnl from the mpicc and mpif77 scripts or mpireconfig if test "X$pac_lib_mpi_is_building" != "Xyes" ; then PAC_PUSH_FLAG([PATH]) - if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then + if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then # Look for commands; if not found, try adding bin to the # path if test ! -x $with_mpich/mpicc -a -x $with_mpich/bin/mpicc ; then @@ -249,21 +249,21 @@ case $ac_mpi_type in AC_PATH_PROG(MPICC,mpicc) if test -z "$TESTCC" ; then TESTCC=${CC-cc} ; fi CC="$MPICC" - # Note that autoconf may unconditionally change the value of + # Note that autoconf may unconditionally change the value of # CC (!) in some other command. Thus, we define CCMASTER CCMASTER=$CC # Force autoconf to respect this choice ac_ct_CC=$CC # to permit configure codes to recover the correct CC. This - # is an ugly not-quite-correct workaround for the fact that + # is an ugly not-quite-correct workaround for the fact that # does not want you to change the C compiler once you have set it - # (But since it does so unconditionally, it silently creates + # (But since it does so unconditionally, it silently creates # bogus output files.) AC_PATH_PROG(MPIF77,mpif77) if test -z "$TESTF77" ; then TESTF77=${F77-f77} ; fi F77="$MPIF77" AC_PATH_PROG(MPIFC,mpif90) - if test -z "$TESTFC" ; then TESTFC=${FC-f90} ; fi + if test -z "$TESTFC" ; then TESTFC=${FC-f90} ; fi FC="$MPIFC" AC_PATH_PROG(MPICXX,mpiCC) if test -z "$TESTCXX" ; then TESTCXX=${CXX-CC} ; fi @@ -275,7 +275,7 @@ case $ac_mpi_type in AC_PATH_PROG(MPIUNBOOT,mpichstop) PAC_POP_FLAG([PATH]) MPILIBNAME="mpich" - else + else # All of the above should have been passed in the environment! : fi @@ -289,7 +289,7 @@ case $ac_mpi_type in dnl This isn't correct. It should try to get the underlying compiler dnl from the mpicc and mpif77 scripts or mpireconfig PAC_PUSH_FLAG([PATH]) - if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then + if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then # Look for commands; if not found, try adding bin to the path if test ! -x $with_lammpi/mpicc -a -x $with_lammpi/bin/mpicc ; then with_lammpi="$with_lammpi/bin" @@ -330,7 +330,7 @@ case $ac_mpi_type in if test "$enable_f90" != no ; then AC_CHECK_PROGS(MPIXLF90,mpxlf90 mpfort) if test -z "$TESTFC" ; then TESTFC=${FC-xlf90}; fi - if test "X$MPIXLF90" != "X" ; then + if test "X$MPIXLF90" != "X" ; then FC="$MPIXLF90" else FC="$MPXLF -qlanglvl=90ext -qfree=f90" @@ -405,7 +405,7 @@ esac ]) AC_DEFUN([PAC_MPI_FIND_COMPILERS],[ -# Tell autoconf to determine properties of the compilers (these are the +# Tell autoconf to determine properties of the compilers (these are the # compilers for MPI programs) PAC_PROG_CC if test "$enable_f77" != no -a "$enable_fortran" != no ; then @@ -468,14 +468,14 @@ case $ac_mpi_type in AC_CHECK_LIB(mpi,MPI_Init) if test "$ac_cv_lib_mpi_MPI_Init" = "yes" ; then MPILIBNAME="mpi" - fi + fi ;; generic) AC_SEARCH_LIBS(MPI_Init,mpi mpich mpich) if test "$ac_cv_lib_mpi_MPI_Init" = "yes" ; then MPILIBNAME="mpi" - fi + fi ;; *) @@ -502,8 +502,8 @@ AC_TRY_LINK([#include "mpi.h"], [MPI_Request request;MPI_Fint a;a = MPI_Request_c2f(request);], pac_cv_mpi_f2c="yes",pac_cv_mpi_f2c="no") ]) -if test "$pac_cv_mpi_f2c" = "yes" ; then - AC_DEFINE(HAVE_MPI_F2C,1,[Define if MPI has F2C]) +if test "$pac_cv_mpi_f2c" = "yes" ; then + AC_DEFINE(HAVE_MPI_F2C,1,[Define if MPI has F2C]) fi ]) dnl diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_romio.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_romio.m4 index 39dd76dab20..db731d54dea 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_romio.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_romio.m4 @@ -1,5 +1,5 @@ dnl -dnl This files contains additional macros for using autoconf to +dnl This files contains additional macros for using autoconf to dnl build configure scripts. dnl dnl Almost all of this file is taken from the aclocal.m4 of MPICH @@ -19,21 +19,21 @@ AC_DEFUN([PAC_GET_FORTNAMES],[ EOF $F77 $FFLAGS -c confftest.f > /dev/null 2>&1 if test ! -s confftest.$OBJEXT ; then - AC_MSG_WARN([Unable to test Fortran compiler. Compiling a test + AC_MSG_WARN([Unable to test Fortran compiler. Compiling a test program failed to produce an object file]) NOF77=1 elif test -z "$FORTRANNAMES" ; then # MAC OS X (and probably FreeBSD need strings - (not strings -a) # Cray doesn't accept -a ... allstrings="-a" - if test $arch_CRAY ; then - allstrings="" + if test $arch_CRAY ; then + allstrings="" elif strings - confftest.$OBJEXT < /dev/null >/dev/null 2>&1 ; then allstrings="-" elif strings -a confftest.$OBJEXT < /dev/null >/dev/null 2>&1 ; then allstrings="-a" fi - + nameform1=`strings $allstrings confftest.$OBJEXT | grep mpir_init_fop_ | head -1` nameform2=`strings $allstrings confftest.$OBJEXT | grep MPIR_INIT_FOP | head -1` nameform3=`strings $allstrings confftest.$OBJEXT | grep mpir_init_fop | head -1` @@ -47,8 +47,8 @@ program failed to produce an object file]) echo "Fortran externals have a trailing underscore and are lowercase" FORTRANNAMES="FORTRANUNDERSCORE" elif test -n "$nameform2" ; then - echo "Fortran externals are uppercase" - FORTRANNAMES="FORTRANCAPS" + echo "Fortran externals are uppercase" + FORTRANNAMES="FORTRANCAPS" elif test -n "$nameform3" ; then echo "Fortran externals are lower case" FORTRANNAMES="FORTRANNOUNDERSCORE" @@ -76,7 +76,7 @@ if test -n "$arch_IRIX"; then dnl For example dnl IRIX_5_4400 (IRIX 5.x, using MIPS 4400) osversion=`uname -r | sed 's/\..*//'` - dnl Note that we need to allow brackets here, so we briefly turn off + dnl Note that we need to allow brackets here, so we briefly turn off dnl the macro quotes changequote(,)dnl dnl Get the second field (looking for 6.1) @@ -111,7 +111,7 @@ if test -n "$arch_IRIX"; then fi AC_MSG_RESULT($cputype) dnl echo "checking for osversion and cputype" - dnl cputype may contain R4400, R2000A/R3000, or something else. + dnl cputype may contain R4400, R2000A/R3000, or something else. dnl We may eventually need to look at it. if test -z "$osversion" ; then AC_MSG_RESULT([Could not determine OS version. Please send]) @@ -123,9 +123,9 @@ if test -n "$arch_IRIX"; then true elif test $osversion = 6 ; then true - else + else AC_MSG_RESULT([Could not recognize the version of IRIX (got $osversion). -ROMIO knows about versions 4, 5 and 6; the version being returned from +ROMIO knows about versions 4, 5 and 6; the version being returned from uname -r is $osversion. Please send]) uname -a 2>&1 hinv 2>&1 @@ -138,7 +138,7 @@ uname -r is $osversion. Please send]) changequote(,)dnl cputype=`echo $cputype | sed -e 's%.*/%%' -e 's/R//' | tr -d "[A-Z]"` changequote([,])dnl - case $cputype in + case $cputype in 3000) ;; 4000) ;; 4400) ;; @@ -150,7 +150,7 @@ uname -r is $osversion. Please send]) *) AC_MSG_WARN([Unexpected IRIX/MIPS chipset $cputype. Please send the output]) uname -a 2>&1 - hinv 2>&1 + hinv 2>&1 AC_MSG_WARN([to romio-maint@mcs.anl.gov ROMIO will continue and assume that the cputype is compatible with a MIPS 4400 processor.]) @@ -172,7 +172,7 @@ define(PAC_TEST_MPI,[ main(int argc, char **argv) { MPI_Init(&argc,&argv); - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT @@ -225,10 +225,10 @@ define(PAC_MPI_LONG_LONG_INT,[ #include "mpi.h" main(int argc, char **argv) { - long long i; + long long i; MPI_Init(&argc,&argv); MPI_Send(&i, 1, MPI_LONG_LONG_INT, 0, 0, MPI_COMM_WORLD); - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT @@ -247,7 +247,7 @@ dnl define(PAC_LONG_LONG_64,[ if test -n "$longlongsize" ; then if test "$longlongsize" = 8 ; then - echo "defining MPI_Offset as long long in C and integer*8 in Fortran" + echo "defining MPI_Offset as long long in C and integer*8 in Fortran" AC_DEFINE(HAVE_LONG_LONG_64,,[Define if long long is 64 bits]) DEFINE_MPI_OFFSET="typedef long long MPI_Offset;" FORTRAN_MPI_OFFSET="integer*8" @@ -260,8 +260,8 @@ if test -n "$longlongsize" ; then LL="\%d" MPI_OFFSET_KIND1="!" MPI_OFFSET_KIND2="!" - else - echo "defining MPI_Offset as long in C and integer in Fortran" + else + echo "defining MPI_Offset as long in C and integer in Fortran" DEFINE_MPI_OFFSET="typedef long MPI_Offset;" FORTRAN_MPI_OFFSET="integer" LL="\%ld" @@ -274,14 +274,14 @@ else if test "$longlongsize" = 8 ; then PAC_TEST_LONG_LONG() else - echo "defining MPI_Offset as long in C and integer in Fortran" + echo "defining MPI_Offset as long in C and integer in Fortran" DEFINE_MPI_OFFSET="typedef long MPI_Offset;" FORTRAN_MPI_OFFSET="integer" LL="\%ld" MPI_OFFSET_KIND1="!" MPI_OFFSET_KIND2="!" fi - else + else dnl check if longlong is not supported or only its size cannot be determined dnl because the program cannot be run. rm -f ltest.c @@ -297,14 +297,14 @@ EOF if test -x conftest$EXEEXT ; then echo "assuming size of long long is 8bytes; use '-longlongsize' to indicate otherwise" rm -f conftest$EXEEXT ltest.c - echo "defining MPI_Offset as long long in C and integer*8 in Fortran" + echo "defining MPI_Offset as long long in C and integer*8 in Fortran" AC_DEFINE(HAVE_LONG_LONG_64,,[Define if long long is 64 bits]) DEFINE_MPI_OFFSET="typedef long long MPI_Offset;" FORTRAN_MPI_OFFSET="integer*8" LL="\%lld" - else + else echo "assuming long long is not available; use '-longlongsize' to indicate otherwise" - echo "defining MPI_Offset as long in C and integer in Fortran" + echo "defining MPI_Offset as long in C and integer in Fortran" DEFINE_MPI_OFFSET="typedef long MPI_Offset;" FORTRAN_MPI_OFFSET="integer" LL="\%ld" @@ -326,7 +326,7 @@ define(PAC_MPI_INFO,[ MPI_Info info; MPI_Init(&argc,&argv); MPI_Info_create(&info); - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT @@ -363,7 +363,7 @@ define(PAC_MPI_DARRAY_SUBARRAY,[ MPI_Init(&argc,&argv); MPI_Type_create_darray(i, i, i, &i, &i, &i, &i, i, MPI_INT, &t); MPI_Type_create_subarray(i, &i, &i, &i, i, MPI_INT, &t); - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT @@ -480,7 +480,7 @@ define(PAC_TEST_MPI_SGI_type_is_contig,[ MPI_Init(&argc,&argv); i = MPI_SGI_type_is_contig(type); - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT @@ -507,7 +507,7 @@ define(PAC_TEST_MPI_COMBINERS,[ MPI_Init(&argc,&argv); i = MPI_COMBINER_STRUCT; - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT @@ -581,7 +581,7 @@ fi KINDVAL="" if $FC -o conftest$EXEEXT conftest.$ac_f90ext >/dev/null 2>&1 ; then ./conftest$EXEEXT >/dev/null 2>&1 - if test -s conftest.out ; then + if test -s conftest.out ; then KINDVAL=`cat conftest.out` fi fi @@ -624,7 +624,7 @@ EOF dnl dnl dnl PAC_GET_XFS_MEMALIGN -dnl +dnl dnl define(PAC_GET_XFS_MEMALIGN, [AC_MSG_CHECKING([for memory alignment needed for direct I/O]) @@ -634,7 +634,7 @@ AC_TEST_PROGRAM([#include #include #include #include -main() { +main() { struct dioattr st; int fd = open("/tmp/romio_tmp.bin", O_RDWR | O_CREAT, 0644); FILE *f=fopen("memalignval","w"); @@ -704,7 +704,7 @@ fi KINDVAL="" if $FC -o kind$EXEEXT kind.f >/dev/null 2>&1 ; then ./kind >/dev/null 2>&1 - if test -s k.out ; then + if test -s k.out ; then KINDVAL=`cat k.out` fi fi @@ -773,7 +773,7 @@ define(PAC_TEST_MPIR_STATUS_SET_BYTES,[ MPI_Init(&argc,&argv); MPIR_Status_set_bytes(status,type,err); - MPI_Finalize(); + MPI_Finalize(); } EOF rm -f conftest$EXEEXT diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_shl.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_shl.m4 index f974bfa2261..f13222944e0 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_shl.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_shl.m4 @@ -1,7 +1,7 @@ dnl dnl Definitions for creating shared libraries dnl -dnl The purpose of these definitions is to provide common support for +dnl The purpose of these definitions is to provide common support for dnl shared libraries, with *or without* the use of the GNU Libtool package. dnl For many of our important platforms, the Libtool approach is overkill, dnl and can be particularly painful for developers. @@ -9,30 +9,30 @@ dnl dnl To use libtool, you need macros that are defined by libtool for libtool dnl Don't even think about the consequences of this for updating and for dnl using user-versions of libtool :( -dnl +dnl dnl !!!!!!!!!!!!!!!!!!!!! dnl libtool requires ac 2.50 !!!!!!!!!!!!!!!!! -dnl +dnl dnl builtin(include,libtool.m4) dnl dnl/*D dnl PAC_ARG_SHAREDLIBS - Add --enable-sharedlibs=kind to configure. -dnl +dnl dnl Synopsis: dnl PAC_ARG_SHAREDLIBS dnl dnl Output effects: dnl Adds '--enable-sharedlibs=kind' to the command line. If this is enabled, -dnl then based on the value of 'kind', programs are selected for the +dnl then based on the value of 'kind', programs are selected for the dnl names 'CC_SHL' and 'CC_LINK_SHL' that configure will substitute for in dnl 'Makefile.in's. These symbols are generated by 'simplemake' when dnl shared library support is selected. -dnl The variable 'C_LINKPATH_SHL' is set to the option to specify the +dnl The variable 'C_LINKPATH_SHL' is set to the option to specify the dnl path to search at runtime for libraries (-rpath in gcc/GNU ld). dnl This can be turned off with --disable-rpath , which is appropriate dnl for libraries and for executables that may be installed in different dnl locations. -dnl The variable 'SHLIB_EXT' is set to the extension used by shared +dnl The variable 'SHLIB_EXT' is set to the extension used by shared dnl libraries; under most forms of Unix, this is 'so'; under Mac OS/X, this dnl is 'dylib', and under Windows (including cygwin), this is 'dll'. dnl @@ -40,7 +40,7 @@ dnl Supported values of 'kind' include \: dnl+ gcc - Use gcc to create both shared objects and libraries dnl. osx-gcc - Use gcc on Mac OS/X to create both shared objects and dnl libraries -dnl. solaris-cc - Use native Solaris cc to create shared objects and +dnl. solaris-cc - Use native Solaris cc to create shared objects and dnl libraries dnl. cygwin-gcc - Use gcc on Cygwin to create shared objects and libraries dnl- none - The same as '--disable-sharedlibs' @@ -105,7 +105,7 @@ C_LINKPATH_SHL="" SHLIB_EXT=unknown SHLIB_FROM_LO=no SHLIB_INSTALL='$(INSTALL_PROGRAM)' -case "$enable_sharedlibs" in +case "$enable_sharedlibs" in no|none) ;; gcc-osx|osx-gcc) @@ -114,7 +114,7 @@ case "$enable_sharedlibs" in CC_SHL='${CC} -fPIC' # No way in osx to specify the location of the shared libraries at link # time (see the code in createshlib in mpich/src/util) - # As of 10.5, -Wl,-rpath,dirname should work . The dirname + # As of 10.5, -Wl,-rpath,dirname should work . The dirname # must be a single directory, not a colon-separated list (use multiple # -Wl,-rpath,path for each of the paths in the list). However, os x # apparently records the library full path, so rpath isn't as useful @@ -148,13 +148,13 @@ case "$enable_sharedlibs" in C_LINKPATH_SHL="-Wl,-rpath," fi SHLIB_EXT=so - # We need to test that this isn't osx. The following is a + # We need to test that this isn't osx. The following is a # simple hack osname=`uname -s` - case $osname in + case $osname in *Darwin*|*darwin*) AC_MSG_ERROR([You must specify --enable-sharedlibs=osx-gcc for Mac OS/X]) - ;; + ;; *CYGWIN*|*cygwin*) AC_MSG_ERROR([You must specify --enable-sharedlibs=cygwin-gcc for Cygwin]) ;; @@ -172,7 +172,7 @@ case "$enable_sharedlibs" in C_LINKPATH_SHL="" SHLIB_EXT="dll" enable_sharedlibs="cygwin-gcc" - ;; + ;; libtool) # set TRY_LIBTOOL to yes to experiment with libtool. You are on your @@ -180,7 +180,7 @@ case "$enable_sharedlibs" in if test "$TRY_LIBTOOL" != yes ; then AC_MSG_ERROR([Creating shared libraries using libtool not yet supported]) else - # Using libtool requires a heavy-weight process to test for + # Using libtool requires a heavy-weight process to test for # various stuff that libtool needs. Without this, you'll get a # bizarre error message about libtool being unable to find # configure.in or configure.ac (!) @@ -205,7 +205,7 @@ case "$enable_sharedlibs" in # we are building under cygwin sysname=`uname -s | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` isCygwin=no - case "$sysname" in + case "$sysname" in *CYGWIN*) isCygwin=yes ;; esac if test "$isCygwin" = yes ; then @@ -269,7 +269,7 @@ dnl Other, such as solaris-cc *) AC_MSG_ERROR([Unknown value $enable_sharedlibs for enable-sharedlibs. Values should be gcc or osx-gcc]) enable_sharedlibs=no - ;; + ;; esac # Check for the shared-library extension PAC_CC_SHLIB_EXT @@ -286,7 +286,7 @@ dnl /*D dnl PAC_xx_SHAREDLIBS - Get compiler and linker for shared libraries dnl These routines may be used to determine the compiler and the dnl linker to be used in creating shared libraries -dnl Rather than set predefined variable names, they set an argument +dnl Rather than set predefined variable names, they set an argument dnl (if provided) dnl dnl Synopsis @@ -300,11 +300,11 @@ ifelse($1,,[ AC_CHECK_PROG(pac_prog,gcc,yes,no) # If we are gcc but OS X, set the special type # We need a similar setting for cygwin - if test "$pac_prog" = yes ; then + if test "$pac_prog" = yes ; then osname=`uname -s` - case $osname in + case $osname in *Darwin*|*darwin*) pac_kinds=gcc-osx - ;; + ;; *) pac_kinds=gcc ;; esac @@ -314,7 +314,7 @@ ifelse($1,,[ if test "$pac_prog" = yes ; then pac_kinds="$pac_kinds libtool" ; fi ]) for pac_arg in $pac_kinds ; do - case $pac_arg in + case $pac_arg in gcc) # For example, include the libname as ${LIBNAME_SHL} #C_LINK_SHL='${CC} -shared -Wl,-h,' @@ -363,10 +363,10 @@ ifelse($3,,C_LINK_SHL=$pac_clink_sharedlibs,$3=$pac_clink_sharedlibs) ifelse($4,,SHAREDLIB_TYPE=$pac_type_sharedlibs,$4=$pac_type_sharedlibs) ]) -dnl This macro ensures that all of the necessary substitutions are +dnl This macro ensures that all of the necessary substitutions are dnl made by any subdirectory configure (which may simply SUBST the dnl necessary values rather than trying to determine them from scratch) -dnl This is a more robust (and, in the case of libtool, only +dnl This is a more robust (and, in the case of libtool, only dnl managable) method. AC_DEFUN([PAC_CC_SUBDIR_SHLIBS],[ AC_SUBST(CC_SHL) @@ -395,9 +395,9 @@ AC_DEFUN([PAC_CC_SHLIB_EXT],[ # clean steps that look for libfoo.$SHLIB_EXT . if test "$SHLIB_EXT" = "unknown" ; then osname=`uname -s` - case $osname in + case $osname in *Darwin*|*darwin*) SHLIB_EXT=dylib - ;; + ;; *CYGWIN*|*cygwin*) SHLIB_EXT=dll ;; *Linux*|*LINUX*|*SunOS*) SHLIB_EXT=so diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_subcfg.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_subcfg.m4 index 53fb78e3d9e..970ae223052 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_subcfg.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_subcfg.m4 @@ -30,7 +30,7 @@ dnl to subconfigure as "precious" appropriately. The precious variable dnl can be created in the following ways: dnl 1) implicit declaration through use of autoconf macros, like dnl AC_PROG_CC (declares CC/CFLAGS/CPPFLAGS/LIBS/LDFLAGS), or -dnl AC_PROG_F77 (declares F77/FFLAGS/FLIBS) ... +dnl AC_PROG_F77 (declares F77/FFLAGS/FLIBS) ... dnl which are in turns invoked by other subconfigure. dnl When in doubt, check "ac_precious_var" in the calling configure. dnl 2) explicit "precious" declaration through AC_ARG_VAR. @@ -54,7 +54,7 @@ AC_DEFUN([PAC_CONFIG_SUBDIR_ARGS],[ # Adapted for MPICH from the autoconf-2.67 implementation of # AC_CONFIG_SUBDIRS. Search for "MPICH note:" for relevant commentary and # local modifications. - + # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. Otherwise relative paths (like --srcdir=.. from # make distcheck) will be incorrect. @@ -115,7 +115,7 @@ AC_DEFUN([PAC_CONFIG_SUBDIR_ARGS],[ AS_VAR_APPEND([pac_sub_configure_args], [" '$pac_arg'"]) ;; esac done - + # Always prepend --prefix to ensure using the same prefix # in subdir configurations. # MPICH note: see tt#983 for an example of why this is necessary @@ -124,22 +124,22 @@ AC_DEFUN([PAC_CONFIG_SUBDIR_ARGS],[ *\'*) pac_arg=`AS_ECHO(["$pac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac pac_sub_configure_args="'$pac_arg' $pac_sub_configure_args" - + # Pass --silent if test "$silent" = yes; then pac_sub_configure_args="--silent $pac_sub_configure_args" fi - + # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. pac_sub_configure_args="--disable-option-checking $pac_sub_configure_args" - + pac_popdir=`pwd` - + # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$pac_dir" || continue - + # MPICH note: modified to remove the internal "_AS_*" macro usage, also # msg is already printed at top dnl _AS_ECHO_LOG([$pac_msg]) diff --git a/ompi/mca/io/romio314/romio/confdb/aclocal_util.m4 b/ompi/mca/io/romio314/romio/confdb/aclocal_util.m4 index 575a1444630..6faec25ab1c 100644 --- a/ompi/mca/io/romio314/romio/confdb/aclocal_util.m4 +++ b/ompi/mca/io/romio314/romio/confdb/aclocal_util.m4 @@ -131,7 +131,7 @@ AC_SUBST(MKDIR_P) ]) dnl Test for a clean VPATH directory. Provide this command with the names -dnl of all of the generated files that might cause problems +dnl of all of the generated files that might cause problems dnl (Makefiles won't cause problems because there's no VPATH usage for them) dnl dnl Synopsis @@ -151,12 +151,12 @@ if test ! -s $srcdir/conftest$$ ; then pac_header="" ifdef([AC_LIST_HEADER],[pac_header=AC_LIST_HEADER]) for file in config.status $pac_header $1 ; do - if test -f $srcdir/$file ; then + if test -f $srcdir/$file ; then pac_dirtyfiles="$pac_dirtyfiles $file" fi done ifelse($2,,,[ - for dir in $2 ; do + for dir in $2 ; do if test -d $srcdir/$dir ; then pac_dirtydirs="$pac_dirtydirs $dir" fi diff --git a/ompi/mca/io/romio314/romio/configure.ac b/ompi/mca/io/romio314/romio/configure.ac index 4d51a3ef79a..4fc60552c67 100644 --- a/ompi/mca/io/romio314/romio/configure.ac +++ b/ompi/mca/io/romio314/romio/configure.ac @@ -213,14 +213,14 @@ known_filesystems="m4_join([ ],known_filesystems_m4)" # Defaults AC_ARG_ENABLE(aio,[ --enable-aio - Request use of asynchronous I/O routines (default)], -[ +[ if test "x$enableval" = "xno" ; then disable_aio=yes else disable_aio=no fi ], disable_aio=no) -AC_ARG_ENABLE(echo, +AC_ARG_ENABLE(echo, [--enable-echo - Turn on strong echoing. The default is enable=no.] ,set -x) AC_ARG_ENABLE(f77, [--enable-f77 - Turn on support for Fortran 77 (default)],,enable_f77=yes) @@ -274,9 +274,9 @@ if test -z "$ARCH" -a -x $srcdir/util/tarch ; then ARCH=`$srcdir/util/tarch | sed s/-/_/g` if test -z "$ARCH" ; then AC_MSG_RESULT([Unknown!]) - AC_MSG_ERROR([Error: Could not guess target architecture, you must -set an architecture type with the environment variable ARCH]) - fi + AC_MSG_ERROR([Error: Could not guess target architecture, you must +set an architecture type with the environment variable ARCH]) + fi eval "arch_$ARCH=1" AC_MSG_RESULT($ARCH) fi @@ -291,7 +291,7 @@ fi # # # Find the home directory if not specified -if test "X$srcdir" != "X." -a -s $srcdir/mpi-io/Makefile.in ; then +if test "X$srcdir" != "X." -a -s $srcdir/mpi-io/Makefile.in ; then ROMIO_HOME_TRIAL=$srcdir else # Take advantage of autoconf2 features @@ -327,7 +327,7 @@ AC_SUBST(mandir) if test -z "$docdir" ; then docdir='${prefix}/doc' ; fi AC_SUBST(docdir) if test -z "$htmldir" ; then htmldir='${prefix}/www' ; fi -AC_SUBST(htmldir) +AC_SUBST(htmldir) # If we are building within a known MPI implementation, we must avoid the @@ -375,7 +375,7 @@ if test $WITHIN_KNOWN_MPI_IMPL = no ; then # compile command. Some compilers complain if it's only -I MPI_INCLUDE_DIR=. fi -else +else MPI_INCLUDE_DIR=. fi # @@ -397,22 +397,22 @@ else USER_FFLAGS="$FFLAGS -O" fi # -# Here begin the architecture-specific tests. +# Here begin the architecture-specific tests. # -------------------------------------------------------------------------- -# We must first select the C and Fortran compilers. Because of the +# We must first select the C and Fortran compilers. Because of the # way that the PROG_CC autoconf macro works (and all of the macros that # require it, including CHECK_HEADERS), that macro must occur exactly -# once in the configure.ac file, at least as of autoconf 2.57 . +# once in the configure.ac file, at least as of autoconf 2.57 . # Unfortunately, this requirement is not enforced. To handle this, # we first case on the architecture; then use PROG_CC, then case on the # architecture again for any arch-specific features. We also set the # C_DEBUG_FLAG and F77_DEBUG_FLAG in case debugging is selected. -# +# # For the MPICH and MPICH configures, the compilers will already be # selected, so most of the compiler-selection code will be bypassed. # -------------------------------------------------------------------------- # For historical reasons -if test -z "$FC" ; then +if test -z "$FC" ; then FC=$F77 fi # @@ -467,7 +467,7 @@ PAC_GET_SPECIAL_SYSTEM_INFO AC_HAVE_FUNCS(memalign) # -# Question: Should ROMIO under MPICH ignore the Fortran tests, since +# Question: Should ROMIO under MPICH ignore the Fortran tests, since # MPICH provides all of the Fortran interface routines? # if test $NOF77 = 0 ; then @@ -483,7 +483,7 @@ if test $NOF77 = 0 ; then if test ! -d test ; then mkdir test ; fi ln -s $MPI_INCLUDE_DIR/mpif.h test fi -else +else F77=":" fi # @@ -557,7 +557,7 @@ if test "$ac_cv_sizeof_long_long" != 0 ; then MPI_OFFSET_KIND1="!" MPI_OFFSET_KIND2="!" else - echo "defining MPI_Offset as long in C and integer in Fortran" + echo "defining MPI_Offset as long in C and integer in Fortran" MPI_OFFSET_TYPE="long" DEFINE_MPI_OFFSET="typedef long MPI_Offset;" FORTRAN_MPI_OFFSET="integer" @@ -566,7 +566,7 @@ if test "$ac_cv_sizeof_long_long" != 0 ; then MPI_OFFSET_KIND2="!" fi else - echo "defining MPI_Offset as long in C and integer in Fortran" + echo "defining MPI_Offset as long in C and integer in Fortran" MPI_OFFSET_TYPE="long" DEFINE_MPI_OFFSET="typedef long MPI_Offset;" FORTRAN_MPI_OFFSET="integer" @@ -585,7 +585,7 @@ if test -n "$ac_cv_sizeof_long_long"; then fi fi # -if test -n "$OFFSET_KIND" -a "A$MPI_OFFSET_KIND1" = "A!" ; then +if test -n "$OFFSET_KIND" -a "A$MPI_OFFSET_KIND1" = "A!" ; then MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND" MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=$OFFSET_KIND)" MPI_OFFSET_KIND_VAL=$OFFSET_KIND @@ -650,7 +650,7 @@ else MPI_FINFO2="!" MPI_FINFO3="!" MPI_FINFO4="!" -fi +fi # if test -n "$mpi_sgi"; then dnl if test -z "$HAVE_MPI_INFO" ; then @@ -661,8 +661,8 @@ dnl fi PAC_TEST_MPI_HAVE_OFFSET_KIND fi # -# check if darray and subarray constructors are defined in the MPI -# implementation +# check if darray and subarray constructors are defined in the MPI +# implementation if test $WITHIN_KNOWN_MPI_IMPL = no ; then PAC_MPI_DARRAY_SUBARRAY fi @@ -680,7 +680,7 @@ if test $FROM_MPICH = yes ; then MPI_FARRAY5="!" MPI_FARRAY6="!" MPI_FARRAY7="!" -fi +fi # Check to see if weak symbols work correctly if test "$enable_weak_symbols" = "yes" ; then @@ -729,7 +729,7 @@ AC_MSG_CHECKING([whether struct flock compatible with MPI_Offset]) AC_TRY_COMPILE([#include ], [struct flock l; $MPI_OFFSET_TYPE a=1; - l.l_start = a; + l.l_start = a; l.l_len = a; ],pac_cv_struct_flock_and_mpi_offset=yes,pac_cv_struct_flock_and_mpi_offset=no) AC_MSG_RESULT($pac_cv_struct_flock_and_mpi_offset) @@ -740,7 +740,7 @@ if test "$pac_cv_struct_flock_and_mpi_offset" = no ; then AC_TRY_COMPILE([#include ], [struct flock l; int a=1; - l.l_start = a; + l.l_start = a; l.l_len = a; ],pac_cv_struct_flock_and_int=yes,pac_cv_struct_flock_and_int=no) AC_MSG_RESULT($pac_cv_struct_flock_and_int) @@ -766,15 +766,15 @@ if test -n "$FILE_SYSTEM" ; then # if multiple filesystems are passed in, they are '+'-delimited # we could set the IFS to tokenize FILE_SYSTEM, but the FILE_SYSTEM env var # is used in multiple places in the build system: get rid of the '+'s so we - # can use the 'for x in $FILE_SYSTEM ...' idiom + # can use the 'for x in $FILE_SYSTEM ...' idiom FILE_SYSTEM=`echo $FILE_SYSTEM|sed -e 's/\+/ /g'` for x in $FILE_SYSTEM do found=no # We could also do test -d "ad_$y" to test for known file systems - # based on having access to the adio code. Then adding a file + # based on having access to the adio code. Then adding a file # system would not require changing configure to change known_filesystems - for y in $known_filesystems ; do + for y in $known_filesystems ; do if test $x = $y ; then found=yes eval "file_system_`echo $x`=1" @@ -905,7 +905,7 @@ fi if test -n "$file_system_lustre"; then AC_CHECK_HEADERS(lustre/lustre_user.h, AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE]), - AC_MSG_ERROR([LUSTRE support requested but cannot find lustre/lustre_user.h header file]) + AC_MSG_ERROR([LUSTRE support requested but cannot find lustre/lustre_user.h header file]) ) fi @@ -922,7 +922,7 @@ if test -n "$file_system_xfs"; then #include #include #include -int main(int argc, char **argv) { +int main(int argc, char **argv) { struct dioattr st; int fd = open("/tmp/romio_tmp.bin", O_RDWR | O_CREAT, 0644); FILE *f=fopen("confmemalignval","w"); @@ -1006,7 +1006,7 @@ if test -n "$file_system_pvfs2"; then AC_CHECK_HEADERS(pvfs2.h, AC_DEFINE(ROMIO_PVFS2,1,[Define for ROMIO with PVFS2]) AC_DEFINE(HAVE_PVFS2_SUPER_MAGIC, 1, [Define if PVFS2_SUPER_MAGIC defined.]), - AC_MSG_ERROR([PVFS2 support requested but cannot find pvfs2.h header file]) + AC_MSG_ERROR([PVFS2 support requested but cannot find pvfs2.h header file]) ) fi @@ -1016,13 +1016,13 @@ if test -n "$file_system_pvfs2"; then AC_LANG_SOURCE([ #include #include "pvfs2.h" - int main(int argc, char **argv) { + int main(int argc, char **argv) { PVFS_object_ref ref; PVFS_sys_attr attr; - PVFS_sys_create(NULL, ref, attr, NULL, NULL, NULL, NULL); + PVFS_sys_create(NULL, ref, attr, NULL, NULL, NULL, NULL); return 0; } ])], - , AC_DEFINE(HAVE_PVFS2_CREATE_WITHOUT_LAYOUT, 1, + , AC_DEFINE(HAVE_PVFS2_CREATE_WITHOUT_LAYOUT, 1, [Define if PVFS_sys_create does not have layout parameter]) ) fi @@ -1094,14 +1094,14 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" -o "x$disable_aio" = # Check that aio is available (many systems appear to have aio # either installed improperly or turned off). - # The test is the following: if not cross compiling, try to run a + # The test is the following: if not cross compiling, try to run a # program that includes a *reference* to aio_write but does not call it # If the libraries are not set up correctly, then this will fail. AC_MSG_CHECKING([whether aio routines can be used]) - # Include aio.h and the aiocb struct (since we'll need these to - # actually use the aio_write interface). Note that this will - # fail for some pre-POSIX implementations of the aio interface + # Include aio.h and the aiocb struct (since we'll need these to + # actually use the aio_write interface). Note that this will + # fail for some pre-POSIX implementations of the aio interface # (an old IBM interface needs an fd argument as well) AC_TRY_RUN([ #include @@ -1131,7 +1131,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" -o "x$disable_aio" = if test "$aio_runs" != "no" ; then AC_DEFINE(ROMIO_HAVE_WORKING_AIO, 1, Define if AIO calls seem to work) fi - + # now about that old IBM interface... # modern AIO interfaces have the file descriptor in the aiocb structure, # and will set ROMIO_HAVE_STRUCT_AIOCB_WITH_AIO_FILDES. Old IBM @@ -1164,7 +1164,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" -o "x$disable_aio" = ], aio_two_arg_write=yes AC_MSG_RESULT(yes), - aio_two_arg_write=no + aio_two_arg_write=no AC_MSG_RESULT(no), aio_two_arg_write=no AC_MSG_RESULT(no: cannot test when cross-compiling) @@ -1196,7 +1196,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" -o "x$disable_aio" = ], aio_two_arg_suspend=yes AC_MSG_RESULT(yes), - aio_two_arg_suspend=no + aio_two_arg_suspend=no AC_MSG_RESULT(no), aio_two_arg_suspend=no AC_MSG_RESULT(no: cannot test when cross compiling) @@ -1298,7 +1298,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" -o "x$disable_aio" = AC_MSG_RESULT(yes) AC_DEFINE(ROMIO_HAVE_STRUCT_AIOCB_WITH_AIO_REQPRIO, 1, [Define if aiocb has aio_reqprio member]), AC_MSG_RESULT(no) - ) + ) AC_MSG_CHECKING(for aio_sigevent member of aiocb structure) AC_TRY_COMPILE([ #ifdef HAVE_SIGNAL_H @@ -1322,7 +1322,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" -o "x$disable_aio" = AC_DEFINE(ROMIO_HAVE_STRUCT_AIOCB_WITH_AIO_SIGEVENT, 1, [Define if aiocb has aio_sigevent member]), AC_MSG_RESULT(no) ) - + fi # End of aio-related tests @@ -1352,14 +1352,14 @@ AC_TRY_COMPILE([ pac_cv_have_statfs=yes,pac_cv_have_statfs=no ) AC_MSG_RESULT($pac_cv_have_statfs) -# At this point, we could check for whether defining +# At this point, we could check for whether defining # __SWORD_TYPE as sizet_t or int/long (size of pointer) # would help. FIXME if test "$pac_cv_have_statfs" = yes ; then AC_DEFINE(HAVE_STRUCT_STATFS,1,[Define if struct statfs can be compiled]) fi - + AC_MSG_CHECKING([for f_fstypename member of statfs structure]) AC_TRY_COMPILE([ #include @@ -1446,7 +1446,7 @@ AC_CHECK_TYPE([blksize_t],[],[AC_DEFINE_UNQUOTED([blksize_t],[__blksize_t],[Prov #endif]] ) # -# Check for large file support. Make sure that we can use the off64_t +# Check for large file support. Make sure that we can use the off64_t # type (in some cases, it is an array, and the ROMIO code isn't prepared for # that). # @@ -1524,7 +1524,7 @@ AC_ARG_VAR([master_top_srcdir],[set by the MPICH configure to indicate the MPICH AC_ARG_VAR([master_top_builddir],[set by the MPICH configure to indicate the MPICH build root]) # The master_top_srcdir is the location of the source for the building -# package. This is used only as part of the MPICH build, including +# package. This is used only as part of the MPICH build, including # the documentation targets mandoc, htmldoc, and latexdoc if test -z "$master_top_srcdir" ; then if test "$FROM_MPICH" = yes ; then @@ -1557,7 +1557,7 @@ if test "$FROM_MPICH" = no ; then LIBNAME="$top_build_dir/lib/libmpio.a" fi # - if test ! -d $top_build_dir/lib ; then + if test ! -d $top_build_dir/lib ; then mkdir $top_build_dir/lib fi else @@ -1589,7 +1589,7 @@ AC_SUBST(DOCTEXT) if test $NOF77 = 1 ; then F77=":" else - FORTRAN_TEST="fperf fcoll_test fmisc pfcoll_test" + FORTRAN_TEST="fperf fcoll_test fmisc pfcoll_test" fi # if test $WITHIN_KNOWN_MPI_IMPL = no ; then @@ -1601,7 +1601,7 @@ fi # if test "$MPI_INCLUDE_DIR" = "." ; then ROMIO_INCLUDE="-I../include" -else +else ROMIO_INCLUDE="-I../include -I$MPI_INCLUDE_DIR" fi # @@ -1634,11 +1634,11 @@ if test $FROM_OMPI = yes ; then elif test $FROM_LAM = yes ; then # LAM does have the status set bytes functionality AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if have MPIR_Status_set_bytes]) - + # Used in the tests/ subdirectory for after ROMIO is built TEST_CC=mpicc TEST_F77=mpifort - MPIRUN=mpirun + MPIRUN=mpirun MPI_LIB= ROMIO_INCLUDE= USER_CFLAGS= @@ -1656,7 +1656,7 @@ elif test $FROM_MPICH = yes ; then # CC="$CC -I${use_top_srcdir}/src/include -I${top_build_dir}/src/include" # TEST_CC="$CC" # MPI_LIB="$LIBNAME" - # To allow ROMIO to work with the LIBTOOL scripts, we want to + # To allow ROMIO to work with the LIBTOOL scripts, we want to # work directly with the CC, not the mpicc, compiler. # Note that in the "FROM_MPICH" case, the CPPFLAGS and INCLUDES are already # properly set @@ -1794,7 +1794,7 @@ CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H" if test -n "$MPIOF_H_INCLUDED"; then F77MPIOINC="" -else +else F77MPIOINC="include 'mpiof.h'" fi @@ -1928,7 +1928,7 @@ AC_SUBST(FORTRAN_TEST) #if test ! -d mpi-io ; then mkdir mpi-io ; fi #if test ! -d mpi-io/glue ; then mkdir mpi-io/glue ; fi -# Create makefiles for all of the adio devices. Only the ones that +# Create makefiles for all of the adio devices. Only the ones that # are active will be called by the top level ROMIO make AC_OUTPUT_COMMANDS([chmod 755 util/romioinstall test/runtests]) AC_CONFIG_FILES([ diff --git a/ompi/mca/io/romio314/romio/doc/README b/ompi/mca/io/romio314/romio/doc/README index b61e73ee204..9f72cc10a14 100644 --- a/ompi/mca/io/romio314/romio/doc/README +++ b/ompi/mca/io/romio314/romio/doc/README @@ -1,7 +1,7 @@ The ROMIO Users Guide is in the file users-guide.ps.gz. The book ``Using MPI-2: Advanced Features of the Message-Passing -Interface,'' by William Gropp, Ewing Lusk, and Rajeev Thakur, +Interface,'' by William Gropp, Ewing Lusk, and Rajeev Thakur, MIT Press, 1999, provides a tutorial introduction to all aspects of MPI-2, including I/O. It has lots of example programs. @@ -9,18 +9,18 @@ The following papers related to ROMIO are available online: * Rajeev Thakur, William Gropp, and Ewing Lusk, ``Optimizing Noncontiguous Accesses in MPI-IO,'' Parallel Computing, (28)1:83--105, -January 2002. +January 2002. http://www.mcs.anl.gov/~thakur/papers/mpi-io-noncontig.ps * R. Thakur, W. Gropp, and E. Lusk, ``On Implementing MPI-IO Portably and with High Performance,'' in Proc. of the Sixth Workshop on I/O in -Parallel and Distributed Systems, May 1999. +Parallel and Distributed Systems, May 1999. http://www.mcs.anl.gov/~thakur/papers/mpio-impl.ps * R. Thakur, W. Gropp, and E. Lusk, ``Data Sieving and Collective I/O in ROMIO,'' in Proc. of the 7th Symposium on the Frontiers of Massively Parallel Computation, February 1999, pp. 182--189. -http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps +http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps * R. Thakur, W. Gropp, and E. Lusk, ``A Case for Using MPI's Derived Datatypes to Improve I/O Performance,'' in Proc. of SC98: High @@ -29,7 +29,7 @@ http://www.mcs.anl.gov/~thakur/dtype * R. Thakur, W. Gropp, and E. Lusk, ``An Abstract-Device Interface for Implementing Portable Parallel-I/O Interfaces,'' in Proc. of the 6th -Symposium on the Frontiers of Massively Parallel Computation, +Symposium on the Frontiers of Massively Parallel Computation, October 1996, pp. 180-187. http://www.mcs.anl.gov/~thakur/papers/adio.ps diff --git a/ompi/mca/io/romio314/romio/doc/pubs.bib b/ompi/mca/io/romio314/romio/doc/pubs.bib index 5799bc305cf..946f6f2b541 100644 --- a/ompi/mca/io/romio314/romio/doc/pubs.bib +++ b/ompi/mca/io/romio314/romio/doc/pubs.bib @@ -145,10 +145,10 @@ @InProceedings{lee:rfs } @InProceedings{yu:bgl-io, - author = {Hao Yu and R. K. Sahoo and C. Howson and George. Almasi and - J. G. Castanos and M. Gupta and Jose. E. Moreira and J. J. Parker and - T. E. Engelsiepen and Robert Ross and Rajeev Thakur and Robert Latham - and W. D. Gropp}, + author = {Hao Yu and R. K. Sahoo and C. Howson and George. Almasi and + J. G. Castanos and M. Gupta and Jose. E. Moreira and J. J. Parker and + T. E. Engelsiepen and Robert Ross and Rajeev Thakur and Robert Latham + and W. D. Gropp}, title = {High Performance File {I/O} for the {BlueGene/L} Supercomputer}, booktitle = {Proceedings of the 12th International Symposium on High-Performance Computer Architecture (HPCA-12)}, month = {February}, @@ -260,7 +260,7 @@ @InProceedings{yu:lustre-joining title = {Exploiting {Lustre} File Joining for Effective Collective {IO}}, booktitle = {Seventh IEEE International Symposium on Cluster Computing and the Grid (CCGrid 2007)}, month = {May}, - year = {2007}, + year = {2007}, } @InProceedings{yu:opal, @@ -333,7 +333,7 @@ @article{liao:cooperative_caching_mpi_journal title = {Cooperative Client-side File Caching for {MPI} Applications}, journal = {International Journal of High Performance Computing Applications}, volume = {21}, - number = {2}, + number = {2}, pages = {144-154}, month = {May}, year = {2007} @@ -341,10 +341,10 @@ @article{liao:cooperative_caching_mpi_journal @InProceedings{liao:client_cache_eval, author = {Wei-keng Liao and Avery Ching and Kenin Coloma and Alok Choudhary and Lee Ward}, - title = {An Implementation and Evaluation of Client-side File Caching for {MPI-IO}}, - booktitle = {Proceedings of the 21st International Parallel and Distributed + title = {An Implementation and Evaluation of Client-side File Caching for {MPI-IO}}, + booktitle = {Proceedings of the 21st International Parallel and Distributed Processing Symposium (IPDPS), Long Beach, California}, - month = {March}, + month = {March}, year = {2007} } @@ -384,7 +384,7 @@ @Inbook{liao:atomicity_overlap title = {{MPI} Atomicity and Concurrent Overlapping {I/O}}, booktitle = {High Performance Computing: Paradigm and Infrastructure}, pages = {203-218}, - chapter = {10}, + chapter = {10}, month = {November}, year = {2005}, publisher = {John Wiley & Sons Inc}, @@ -396,7 +396,7 @@ @InProceedings{liao:cooperative_write-behind title = {{Cooperative Write-Behind Data Buffering for MPI I/O}}, booktitle = {Proceedings of the 12th European Parallel Virtual Machine and Message Passing Interface Conference (EURO PVM/MPI), Sorrento (Naples), Italy}, month = {September}, - year = {2005} + year = {2005} } @InProceedings{liao:app_aware_caching, diff --git a/ompi/mca/io/romio314/romio/doc/romio.bib b/ompi/mca/io/romio314/romio/doc/romio.bib index bb94a2d2ea1..8cbb37f128a 100644 --- a/ompi/mca/io/romio314/romio/doc/romio.bib +++ b/ompi/mca/io/romio314/romio/doc/romio.bib @@ -8,17 +8,17 @@ @Book{grop99a @Misc{mpi97a, author = "{Message Passing Interface Forum}", - title = "{{MPI-2}: Extensions to the Message-Passing Interface}", + title = "{{MPI-2}: Extensions to the Message-Passing Interface}", note = "{\tt http://www.mpi-forum.org/docs/docs.html}", year = {July 1997} } @InProceedings{thak96e, author = {Rajeev Thakur and William Gropp and Ewing Lusk}, - title = {An Abstract-Device Interface for Implementing Portable + title = {An Abstract-Device Interface for Implementing Portable Parallel-{I/O} Interfaces}, booktitle = {Proceedings of the 6th Symposium on the Frontiers of - Massively Parallel Computation}, + Massively Parallel Computation}, publisher = {IEEE Computer Society Press}, pages = {180--187}, month = {October}, @@ -28,8 +28,8 @@ @InProceedings{thak96e @InProceedings{thak99b, author = {Rajeev Thakur and William Gropp and Ewing Lusk}, title = {On Implementing {MPI-IO} Portably and with High Performance}, - booktitle = {Proceedings of the 6th Workshop on I/O in Parallel and - Distributed Systems}, + booktitle = {Proceedings of the 6th Workshop on I/O in Parallel and + Distributed Systems}, pages = {23--32}, year = {1999}, month = {May}, diff --git a/ompi/mca/io/romio314/romio/doc/source-guide.tex b/ompi/mca/io/romio314/romio/doc/source-guide.tex index 96fa7ca58d9..ec151bfeeab 100644 --- a/ompi/mca/io/romio314/romio/doc/source-guide.tex +++ b/ompi/mca/io/romio314/romio/doc/source-guide.tex @@ -61,7 +61,7 @@ %% \newcommand{\ls}[1] - {\dimen0=\fontdimen6\the\font + {\dimen0=\fontdimen6\the\font \lineskip=#1\dimen0 \advance\lineskip.5\fontdimen5\the\font \advance\lineskip-\dimen0 diff --git a/ompi/mca/io/romio314/romio/doc/users-guide.tex b/ompi/mca/io/romio314/romio/doc/users-guide.tex index 3715431b718..3eebdbd21e6 100644 --- a/ompi/mca/io/romio314/romio/doc/users-guide.tex +++ b/ompi/mca/io/romio314/romio/doc/users-guide.tex @@ -21,7 +21,7 @@ \rule{1.75in}{.01in} \\ -\vskip 1.3in +\vskip 1.3in {\Large\bf Users Guide for ROMIO: A High-Performance, \\ [1ex] Portable MPI-IO Implementation} \\ [4ex] by \\ [2ex] @@ -60,7 +60,7 @@ %% \newcommand{\ls}[1] - {\dimen0=\fontdimen6\the\font + {\dimen0=\fontdimen6\the\font \lineskip=#1\dimen0 \advance\lineskip.5\fontdimen5\the\font \advance\lineskip-\dimen0 @@ -98,10 +98,10 @@ ROMIO version~1.2.4 on various machines. \end{abstract} -\section{Introduction} +\section{Introduction} ROMIO\footnote{\tt http://www.mcs.anl.gov/romio} is a -high-performance, portable implementation of MPI-IO (the I/O chapter in +high-performance, portable implementation of MPI-IO (the I/O chapter in MPI~\cite{mpi97a}). This document describes how to install and use ROMIO version~1.2.4 on various machines. @@ -143,7 +143,7 @@ \section{General Information} This version of ROMIO is included in MPICH 1.2.4; an earlier version is included in at least the following MPI implementations: LAM, HP -MPI, SGI MPI, and NEC MPI. +MPI, SGI MPI, and NEC MPI. Note that proper I/O error codes and classes are returned and the status variable is filled only when used with MPICH revision 1.2.1 or later. @@ -163,7 +163,7 @@ \section{General Information} Please read the limitations of this version of ROMIO that are listed in Section~\ref{sec:limit} of this document (e.g., restriction to homogeneous -environments). +environments). \subsection{ROMIO Optimizations} \label{sec:opt} @@ -179,8 +179,8 @@ \subsection{ROMIO Optimizations} of data. The added network cost of performing an I/O operation across the network, as in parallel I/O systems, is often high because of latency. Thus, this naive approach typically performs very poorly because of -the overhead of multiple operations. -% +the overhead of multiple operations. +% In the data sieving technique, a number of noncontiguous regions are accessed by reading a block of data containing all of the regions, including the unwanted data between them (called ``holes''). The regions @@ -229,7 +229,7 @@ \subsection{Hints} \item \texttt{ind\_wr\_buffer\_size} -- Controls the size (in bytes) of the intermediate buffer used by ROMIO when performing data sieving during write operations. Default is \texttt{524288} (512~Kbytes). -\item \texttt{romio\_ds\_read} -- +\item \texttt{romio\_ds\_read} -- Determines when ROMIO will choose to perform data sieving. Valid values are \texttt{enable}, \texttt{disable}, or \texttt{automatic}. Default value is \texttt{automatic}. In \texttt{automatic} mode ROMIO @@ -256,8 +256,8 @@ \subsection{Hints} \texttt{automatic}, ROMIO will use heuristics to determine when to enable the optimization. \item \texttt{romio\_cb\_write} -- Controls when collective buffering is -applied to collective write operations. Valid values are -\texttt{enable}, \texttt{disable}, and \texttt{automatic}. Default is +applied to collective write operations. Valid values are +\texttt{enable}, \texttt{disable}, and \texttt{automatic}. Default is \texttt{automatic}. See the description of \texttt{romio\_cb\_read} for an explanation of the values. \item \texttt{romio\_no\_indep\_rw} -- This hint controls when ``deferred @@ -265,7 +265,7 @@ \subsection{Hints} performing any file operation on non-aggregator nodes. The application is expected to use only collective operations. This is discussed in further detail below. -\item \texttt{cb\_config\_list} -- Provides explicit control over +\item \texttt{cb\_config\_list} -- Provides explicit control over aggregators. This is discussed in further detail below. \end{itemize} @@ -286,7 +286,7 @@ \subsection{Hints} cb_config_list => hostspec [ ',' cb_config_list ] hostspec => hostname [ ':' maxprocesses ] hostname => - | '*' + | '*' maxprocesses => | '*' \end{verbatim} @@ -353,13 +353,13 @@ \subsection{Hints} that they are listed in \texttt{cb\_config\_list}. The following hint controls the deferred open feature of romio and are also -applicable to all file system types: +applicable to all file system types: \begin{itemize} -\item \texttt{romio\_no\_indep\_rw} -- If the application plans on performing only +\item \texttt{romio\_no\_indep\_rw} -- If the application plans on performing only collecitve operations and this hint is set to ``true'', then ROMIO can have just the aggregators open a file. The \texttt{cb\_config\_list} and \texttt{cb\_nodes} hints can be given to further control which nodes are - aggregators. + aggregators. \end{itemize} For PVFS, PIOFS, and PFS: @@ -414,7 +414,7 @@ \subsubsection{Hints for PVFS (v1)} \subsubsection{Hints for PVFS (v2)} \label{sec:hints_pvfs} -The PVFS v2 file system has many tuning parameters. +The PVFS v2 file system has many tuning parameters. \begin{itemize} \item dtype i/o \end{itemize} @@ -450,7 +450,7 @@ \subsubsection{Hints for Lustre} collective write performance for some kinds of workloads. So, to avoid this, we define the \texttt{romio\_lustre\_ds\_in\_coll} hint to disable the read-modify-write step in collective I/O. This optimization is distinct from the one in -independent I/O (controlled by \texttt{romio\_ds\_read} and +independent I/O (controlled by \texttt{romio\_ds\_read} and \texttt{romio\_ds\_write}). \end{itemize} @@ -466,7 +466,7 @@ \subsubsection{Hints for PANFS (Panasas)} \begin{itemize} \item \texttt{panfs\_layout\_type} Specifies the layout of a file: 2 = RAID0 -3 = RAID5 Parity Stripes +3 = RAID5 Parity Stripes \item \texttt{panfs\_layout\_stripe\_unit} The size of the stripe unit in bytes @@ -484,7 +484,7 @@ \subsubsection{Hints for PANFS (Panasas)} \item \texttt{panfs\_layout\_visit\_policy} If the layout type is RAID5 Parity Stripes, the policy used to determine the parity stripe a given file offset is -written to: 1 = Round Robin +written to: 1 = Round Robin \end{itemize} PanFS supports the ``concurrent write'' (CW) mode, where groups of @@ -508,7 +508,7 @@ \subsubsection{Hints for PANFS (Panasas)} Below is an example PanFS layout using the following parameters: \begin{verbatim} - + - panfs_layout_type = 3 - panfs_layout_total_num_comps = 100 - panfs_layout_parity_stripe_width = 10 @@ -557,7 +557,7 @@ \subsubsection{Systemwide Hints} ROMIO will look for these hints in the file \texttt{/etc/romio-hints}. A user can set the environment variable \texttt{ROMIO\_HINTS} to the name of a file -which ROMIO will use instead. +which ROMIO will use instead. \subsection{Using ROMIO on NFS} @@ -578,17 +578,17 @@ \subsection{Using ROMIO on NFS} The following are some instructions we received from Ian Wells of HP for setting the {\tt noac} option on NFS. We have not tried them -ourselves. We are including them here because you may find +ourselves. We are including them here because you may find them useful. Note that some of the steps may be specific to HP systems, and you may need root permission to execute some of the -commands. +commands. -\begin{verbatim} +\begin{verbatim} >1. first confirm you are running nfs version 3 > >rpcnfo -p `hostname` | grep nfs > - >ie + >ie > goedel >rpcinfo -p goedel | grep nfs > 100003 2 udp 2049 nfs > 100003 3 udp 2049 nfs @@ -600,11 +600,11 @@ \subsection{Using ROMIO on NFS} > Here is an example of a correct fstab entry for /epm1: > > ie grep epm1 /etc/fstab - > + > > ROOOOT 11>grep epm1 /etc/fstab > gershwin:/epm1 /rmt/gershwin/epm1 nfs bg,intr,noac 0 0 > - > if the noac option is not present, add it + > if the noac option is not present, add it > and then remount this directory > on each of the machines that will be used to share MPIO files > @@ -615,7 +615,7 @@ \subsection{Using ROMIO on NFS} > >3. Confirm that the directory is mounted noac: > - >ROOOOT >grep gershwin /etc/mnttab + >ROOOOT >grep gershwin /etc/mnttab >gershwin:/epm1 /rmt/gershwin/epm1 nfs >noac,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0 0 0 899911504 \end{verbatim} @@ -626,7 +626,7 @@ \subsubsection{ROMIO, NFS, and Synchronization} the disk before replying that an operation is complete. This means that the actual I/O cost on the server side cannot be hidden with caching, etc. when this option is selected. - + In the ``async'' mode the server can get the data into a buffer (and perhaps put it in the write queue; this depends on the implementation) and reply right away. Obviously if the server were to go down after the @@ -706,7 +706,7 @@ \section{Installation Instructions} Since ROMIO is included in MPICH, LAM, HP MPI, SGI MPI, and NEC MPI, you don't need to install it separately if you are using any of these MPI implementations. If you are using some other MPI, you -can configure and build ROMIO as follows: +can configure and build ROMIO as follows: Untar the tar file as \begin{verbatim} @@ -731,12 +731,12 @@ \section{Installation Instructions} filename}''. The {\tt configure} script by default configures ROMIO for the file -systems most likely +systems most likely to be used on the given machine. If you wish, you can explicitly specify the file systems by using the ``{\tt -file\_system}'' option to configure. Multiple file systems can be specified by using `+' as a separator, e.g., \\ \hspace*{.4in} {\tt ./configure -file\_system=xfs+nfs} \\ -For the entire list of options to configure, do\\ +For the entire list of options to configure, do\\ \hspace*{.4in} {\tt ./configure -h | more} \\ After building a specific version, you can install it in a particular directory with \\ @@ -773,7 +773,7 @@ \subsection{Configuring for Linux and Large Files } compiled with a different size of {\tt off\_t}). The latter exposes the gnu libc functions open64(), write64(), read64(), etc. ROMIO does not make use of the 64 bit system calls directly at this time, but we -add this flag for good measure. +add this flag for good measure. If your linux system is relatively new, there is an excellent chance it is running kernel 2.4.0 or newer and glibc-2.2.0 or newer. Add the @@ -804,7 +804,7 @@ \section{Testing ROMIO} \section{Compiling and Running MPI-IO Programs} If ROMIO is not already included in the MPI implementation, you need to include the file {\tt mpio.h} for C or {\tt mpiof.h} for Fortran in -your MPI-IO program. +your MPI-IO program. Note that on HP machines running HPUX and on NEC SX-4, you need to compile Fortran programs with {\tt mpifort}, because {\tt mpif77} does @@ -891,10 +891,10 @@ \section{Usage Tips} \hspace*{.4in} {\tt setenv MPI\_TYPE\_MAX 65536}\\ Use a larger number if you still get the error message. \item If a Fortran program uses a file handle created using ROMIO's C -interface, or vice versa, you must use the functions {\tt MPI\_File\_c2f} +interface, or vice versa, you must use the functions {\tt MPI\_File\_c2f} or {\tt MPI\_File\_f2c} (see \S~4.12.4 in~\cite{mpi97a}). Such a situation occurs, for example, if a Fortran program uses an I/O -library written in C +library written in C with MPI-IO calls. Similar functions {\tt MPIO\_Request\_f2c} and {\tt MPIO\_Request\_c2f} are also provided. \item For Fortran programs on the Intel Paragon, you may need @@ -902,7 +902,7 @@ \section{Usage Tips} statement, e.g., \\ \hspace*{.4in} {\tt include '/usr/local/mpich/include/mpif.h'}\\ instead of \\ -\hspace*{.4in} {\tt include 'mpif.h'}\\ +\hspace*{.4in} {\tt include 'mpif.h'}\\ This is because the {\tt -I} option to the Paragon Fortran compiler {\tt if77} doesn't work correctly. It always looks in the default directories first and, @@ -1007,15 +1007,15 @@ \subsection{Major Changes in Version 1.0.2} components of the MPI I/O chapter not yet implemented are file interoperability and error handling. -\item Added support for using ``direct I/O'' on SGI's XFS file system. +\item Added support for using ``direct I/O'' on SGI's XFS file system. Direct I/O is an optional feature of XFS in which data is moved - directly between the user's buffer and the storage devices, bypassing - the file-system cache. This can improve performance significantly on + directly between the user's buffer and the storage devices, bypassing + the file-system cache. This can improve performance significantly on systems with high disk bandwidth. Without high disk bandwidth, regular I/O (that uses the file-system cache) perfoms better. ROMIO, therefore, does not use direct I/O by default. The user can turn on direct I/O (separately for reading and writing) either by - using environment variables or by using MPI's hints mechanism (info). + using environment variables or by using MPI's hints mechanism (info). To use the environment-variables method, do \begin{verbatim} setenv MPIO_DIRECT_READ TRUE @@ -1032,7 +1032,7 @@ \subsection{Major Changes in Version 1.0.2} process in the MPI job. This is not guaranteed by the MPI Standard, but it works with SGI's MPI and the {\tt ch\_shmem} device of MPICH. -\item Added support (new ADIO device, {\tt ad\_pvfs}) for the PVFS parallel +\item Added support (new ADIO device, {\tt ad\_pvfs}) for the PVFS parallel file system for Linux clusters, developed at Clemson University (see {\tt http://www.parl.clemson.edu/pvfs}). To use it, you must first install PVFS and then when configuring ROMIO, specify @@ -1048,13 +1048,13 @@ \subsection{Major Changes in Version 1.0.2} \item Uses weak symbols (where available) for building the profiling version, i.e., the PMPI routines. As a result, the size of the library is reduced - considerably. + considerably. \item The Makefiles use {\em virtual paths} if supported by the make utility. GNU {\tt make} supports it, for example. This feature allows you to untar the distribution in some directory, say a slow NFS directory, - and compile the library (create the .o files) in another + and compile the library (create the .o files) in another directory, say on a faster local disk. For example, if the tar file has been untarred in an NFS directory called {\tt /home/thakur/romio}, one can compile it in a different directory, say {\tt /tmp/thakur}, as @@ -1067,7 +1067,7 @@ \subsection{Major Changes in Version 1.0.2} The .o files will be created in {\tt /tmp/thakur}; the library will be created in\newline {\tt /home/thakur/romio/lib/\$ARCH/libmpio.a}. This method works only if the {\tt make} utility supports {\em - virtual paths}. + virtual paths}. If the default {\tt make} utility does not, you can install GNU {\tt make} which does, and specify it to {\tt configure} as \begin{verbatim} @@ -1078,8 +1078,8 @@ \subsection{Major Changes in Version 1.0.2} \item This version is included in MPICH 1.2.0. If you are using MPICH, you need not download ROMIO separately; it gets built as part of MPICH. - The previous version of ROMIO is included in LAM, HP MPI, SGI MPI, and - NEC MPI. NEC has also implemented the MPI-IO functions missing + The previous version of ROMIO is included in LAM, HP MPI, SGI MPI, and + NEC MPI. NEC has also implemented the MPI-IO functions missing in ROMIO, and therefore NEC MPI has a complete implementation of MPI-IO. \end{itemize} @@ -1095,7 +1095,7 @@ \subsection{Major Changes in Version 1.0.1} \item New devices {\tt ad\_hfs} for HP HFS file system and {\tt ad\_xfs} for SGI XFS file system. -\item Users no longer need to prefix the filename with the type of +\item Users no longer need to prefix the filename with the type of file system; ROMIO determines the file-system type on its own. \item Added support for 64-bit file sizes on IBM PIOFS, SGI XFS, @@ -1104,11 +1104,11 @@ \subsection{Major Changes in Version 1.0.1} \item {\tt MPI\_Offset} is an 8-byte integer on machines that support 8-byte integers. It is of type {\tt long long} in C and {\tt integer*8} in Fortran. With a Fortran 90 compiler, you can use either -{\tt integer*8} or {\tt integer(kind=MPI\_OFFSET\_KIND)}. -If you {\tt printf} an {\tt MPI\_Offset} in C, remember to use {\tt \%lld} -or {\tt \%ld} as required by your compiler. (See what is used in the test +{\tt integer*8} or {\tt integer(kind=MPI\_OFFSET\_KIND)}. +If you {\tt printf} an {\tt MPI\_Offset} in C, remember to use {\tt \%lld} +or {\tt \%ld} as required by your compiler. (See what is used in the test program {\tt romio/test/misc.c}). -On some machines, ROMIO detects at configure time that {\tt long long} is +On some machines, ROMIO detects at configure time that {\tt long long} is either not supported by the C compiler or it doesn't work properly. In such cases, configure sets {\tt MPI\_Offset} to {\tt long} in C and {\tt integer} in Fortran. This happens on Intel Paragon, Sun4, and FreeBSD. @@ -1124,7 +1124,7 @@ \subsection{Major Changes in Version 1.0.1} \texttt{striping\_unit} (on PFS and PIOFS), \texttt{start\_iodevice} (on PFS and PIOFS), and \texttt{pfs\_svr\_buf} (on PFS only). - + \end{itemize} \newpage @@ -1134,7 +1134,7 @@ \subsection{Major Changes in Version 1.0.1} %\bibliography{/homes/thakur/tex/bib/papers,/homes/robl/projects/papers/pario} % this is the pared-down one containing only those references used in % users-guide.tex -% to regenerate, uncomment the full databases above, then run +% to regenerate, uncomment the full databases above, then run % ~gropp/bin/citetags users-guide.tex | sort | uniq | \ % ~gropp/bin/citefind - /homes/thakur/tex/bib/papers.bib \ % /homes/robl/projects/papers/pario diff --git a/ompi/mca/io/romio314/romio/include/mpio.h.in b/ompi/mca/io/romio314/romio/include/mpio.h.in index e6c066e678f..0e3de89b9f4 100644 --- a/ompi/mca/io/romio314/romio/include/mpio.h.in +++ b/ompi/mca/io/romio314/romio/include/mpio.h.in @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -36,7 +36,7 @@ typedef struct ADIOI_FileD *MPI_File; @DEFINE_HAVE_MPI_GREQUEST@ #ifndef HAVE_MPI_GREQUEST -typedef struct ADIOI_RequestD *MPIO_Request; +typedef struct ADIOI_RequestD *MPIO_Request; #else #define MPIO_Request MPI_Request #define MPIO_USES_MPI_REQUEST @@ -54,7 +54,7 @@ typedef struct ADIOI_RequestD *MPIO_Request; this definition. */ #ifndef HAVE_MPI_DATAREP_FUNCTIONS #define HAVE_MPI_DATAREP_FUNCTIONS -typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, +typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, void *, MPI_Offset, void *); typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *, void *); @@ -65,7 +65,7 @@ typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *, @NEEDS_MPI_FINT@ #endif #ifdef NEEDS_MPI_FINT -typedef int MPI_Fint; +typedef int MPI_Fint; #endif #ifndef HAVE_MPI_INFO @@ -81,7 +81,7 @@ typedef int MPI_Fint; #define MPI_MODE_RDONLY 2 /* ADIO_RDONLY */ #define MPI_MODE_RDWR 8 /* ADIO_RDWR */ #define MPI_MODE_WRONLY 4 /* ADIO_WRONLY */ -#define MPI_MODE_CREATE 1 /* ADIO_CREATE */ +#define MPI_MODE_CREATE 1 /* ADIO_CREATE */ #define MPI_MODE_EXCL 64 /* ADIO_EXCL */ #define MPI_MODE_DELETE_ON_CLOSE 16 /* ADIO_DELETE_ON_CLOSE */ #define MPI_MODE_UNIQUE_OPEN 32 /* ADIO_UNIQUE_OPEN */ @@ -123,7 +123,7 @@ typedef int MPI_Fint; /* MPI-IO function prototypes */ -/* The compiler must support ANSI C style prototypes, otherwise +/* The compiler must support ANSI C style prototypes, otherwise long long constants (e.g. 0) may get passed as ints. */ #ifndef HAVE_PRAGMA_HP_SEC_DEF @@ -161,8 +161,8 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int c MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); /* nonblocking calls currently use MPIO_Request, because generalized - requests not yet implemented. For the same reason, MPIO_Test and - MPIO_Wait are used to test and wait on nonblocking I/O requests */ + requests not yet implemented. For the same reason, MPIO_Test and + MPIO_Wait are used to test and wait on nonblocking I/O requests */ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, @@ -180,8 +180,8 @@ int MPI_File_write_all(MPI_File fh, const void *buf, int count, MPI_Datatype dat MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* nonblocking calls currently use MPIO_Request, because generalized - requests not yet implemented. For the same reason, MPIO_Test and - MPIO_Wait are used to test and wait on nonblocking I/O requests */ + requests not yet implemented. For the same reason, MPIO_Test and + MPIO_Wait are used to test and wait on nonblocking I/O requests */ int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); @@ -357,9 +357,9 @@ int PMPI_File_set_info(MPI_File, MPI_Info); int PMPI_File_get_info(MPI_File, MPI_Info *); /* Section 9.3 */ -int PMPI_File_set_view(MPI_File, MPI_Offset, +int PMPI_File_set_view(MPI_File, MPI_Offset, MPI_Datatype, MPI_Datatype, const char *, MPI_Info); -int PMPI_File_get_view(MPI_File, MPI_Offset *, +int PMPI_File_get_view(MPI_File, MPI_Offset *, MPI_Datatype *, MPI_Datatype *, char *); /* Section 9.4.2 */ @@ -377,8 +377,8 @@ int PMPI_File_write_at_all(MPI_File, MPI_Offset, const void *, MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); /* nonblocking calls currently use MPIO_Request, because generalized - requests not yet implemented. For the same reason, MPIO_Test and - MPIO_Wait are used to test and wait on nonblocking I/O requests */ + requests not yet implemented. For the same reason, MPIO_Test and + MPIO_Wait are used to test and wait on nonblocking I/O requests */ int PMPI_File_iread_at(MPI_File, MPI_Offset, void *, int, MPI_Datatype, MPIO_Request *) @@ -398,8 +398,8 @@ int PMPI_File_write_all(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* nonblocking calls currently use MPIO_Request, because generalized - requests not yet implemented. For the same reason, MPIO_Test and - MPIO_Wait are used to test and wait on nonblocking I/O requests */ + requests not yet implemented. For the same reason, MPIO_Test and + MPIO_Wait are used to test and wait on nonblocking I/O requests */ int PMPI_File_iread(MPI_File, void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); @@ -415,7 +415,7 @@ int PMPI_File_read_shared(MPI_File, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write_shared(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); -int PMPI_File_iread_shared(MPI_File, void *, int, +int PMPI_File_iread_shared(MPI_File, void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_iwrite_shared(MPI_File, const void *, int, @@ -474,11 +474,11 @@ int PMPI_File_get_errhandler( MPI_File, MPI_Errhandler * ); #ifndef HAVE_MPI_DARRAY_SUBARRAY /* Section 4.14.4 */ -int PMPI_Type_create_subarray(int, int *, int *, int *, int, +int PMPI_Type_create_subarray(int, int *, int *, int *, int, MPI_Datatype, MPI_Datatype *); /* Section 4.14.5 */ -int PMPI_Type_create_darray(int, int, int, int *, int *, +int PMPI_Type_create_darray(int, int, int, int *, int *, int *, int *, int, MPI_Datatype, MPI_Datatype *); #endif diff --git a/ompi/mca/io/romio314/romio/include/mpiof.h.in b/ompi/mca/io/romio314/romio/include/mpiof.h.in index fa945807bdc..cfb26c5d355 100644 --- a/ompi/mca/io/romio314/romio/include/mpiof.h.in +++ b/ompi/mca/io/romio314/romio/include/mpiof.h.in @@ -1,9 +1,9 @@ -! -! Copyright (C) 1997 University of Chicago. +! +! Copyright (C) 1997 University of Chicago. ! See COPYRIGHT notice in top-level directory. ! -! -! user include file for Fortran MPI-IO programs +! +! user include file for Fortran MPI-IO programs ! INTEGER MPI_MODE_RDONLY, MPI_MODE_RDWR, MPI_MODE_WRONLY INTEGER MPI_MODE_DELETE_ON_CLOSE, MPI_MODE_UNIQUE_OPEN diff --git a/ompi/mca/io/romio314/romio/mpi-io/close.c b/ompi/mca/io/romio314/romio/mpi-io/close.c index 160b6615d6e..cfad507369a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/close.c +++ b/ompi/mca/io/romio314/romio/mpi-io/close.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/delete.c b/ompi/mca/io/romio314/romio/mpi-io/delete.c index 7335136d835..caec75bd835 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/delete.c +++ b/ompi/mca/io/romio314/romio/mpi-io/delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -41,7 +41,7 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info) ADIOI_Fns *fsops; #ifdef MPI_hpux int fl_xmpi; - + HPMP_IO_START(fl_xmpi, BLKMPIFILEDELETE, TRDTBLOCK, MPI_FILE_NULL, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ @@ -54,14 +54,14 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info) if (error_code != MPI_SUCCESS) goto fn_exit; /* resolve file system type from file name; this is a collective call */ - ADIO_ResolveFileType(MPI_COMM_SELF, filename, &file_system, &fsops, + ADIO_ResolveFileType(MPI_COMM_SELF, filename, &file_system, &fsops, &error_code); /* --BEGIN ERROR HANDLING-- */ if (error_code != MPI_SUCCESS) { /* ADIO_ResolveFileType() will print as informative a message as it - * possibly can or call MPIR_Err_setmsg. We just need to propagate + * possibly can or call MPIR_Err_setmsg. We just need to propagate * the error up. In the PRINT_ERR_MSG case MPI_Abort has already * been called as well, so we probably didn't even make it this far. */ @@ -84,7 +84,7 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info) if (error_code != MPI_SUCCESS) error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code); /* --END ERROR HANDLING-- */ - + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, MPI_FILE_NULL, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/file_c2f.c b/ompi/mca/io/romio314/romio/mpi-io/file_c2f.c index 4eaae9fafa0..4d2032bc8f5 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/file_c2f.c +++ b/ompi/mca/io/romio314/romio/mpi-io/file_c2f.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/file_f2c.c b/ompi/mca/io/romio314/romio/mpi-io/file_f2c.c index b6b4896b389..fded33df357 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/file_f2c.c +++ b/ompi/mca/io/romio314/romio/mpi-io/file_f2c.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/closef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/closef.c index aebdf56a611..514d64c1285 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/closef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/closef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/deletef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/deletef.c index 660129f7605..d44092d4db1 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/deletef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/deletef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/fsyncf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/fsyncf.c index b52245256b8..52e905aec99 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/fsyncf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/fsyncf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_sync_(MPI_Fint *fh, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_sync_(MPI_Fint *fh, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_sync(fh_c); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_amodef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_amodef.c index 2427f068310..81e77d534a1 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_amodef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_amodef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_amode_(MPI_Fint *fh, MPI_Fint *amode, MP FORTRAN_API void FORT_CALL mpi_file_get_amode_(MPI_Fint *fh, MPI_Fint *amode, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_amode(fh_c, amode); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_atomf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_atomf.c index 98bf557e34b..3aa79475fc0 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_atomf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_atomf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_atomicity_(MPI_Fint *fh, MPI_Fint *flag, FORTRAN_API void FORT_CALL mpi_file_get_atomicity_(MPI_Fint *fh, MPI_Fint *flag, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_atomicity(fh_c, flag); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_bytofff.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_bytofff.c index fb38b7be4ca..3e28c26fc48 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_bytofff.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_bytofff.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_byte_offset_(MPI_Fint *fh, MPI_Offset *o FORTRAN_API void FORT_CALL mpi_file_get_byte_offset_(MPI_Fint *fh,MPI_Offset *offset, MPI_Offset *disp, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_byte_offset(fh_c,*offset,disp); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_errhf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_errhf.c index 96901ad7766..4ec1936c2e9 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_errhf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_errhf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -96,7 +96,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_errhandler_(MPI_Fint *fh, MPI_Fint *err_ { MPI_File fh_c; MPI_Errhandler err_handler_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_errhandler(fh_c, &err_handler_c); *err_handler = MPI_Errhandler_c2f(err_handler_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_extentf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_extentf.c index 9a11d3c946f..363118b773d 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_extentf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_extentf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -100,7 +100,7 @@ void mpi_file_get_type_extent_(MPI_Fint *fh,MPI_Fint *datatype, MPI_File fh_c; MPI_Datatype datatype_c; MPI_Aint extent_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -118,7 +118,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_type_extent_(MPI_Fint *fh,MPI_Datatype * { MPI_File fh_c; MPI_Aint extent_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_type_extent(fh_c,*datatype, &extent_c); *(MPI_Aint*)extent = extent_c; /* Have to assume it's really an MPI_Aint?*/ diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_groupf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_groupf.c index bb8c9a9cba7..abb27073847 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_groupf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_groupf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -109,7 +109,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_group_(MPI_Fint *fh,MPI_Group *group, MP FORTRAN_API void FORT_CALL mpi_file_get_group_(MPI_Fint *fh,MPI_Group *group, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_group(fh_c, group); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_infof.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_infof.c index eb2ba551a45..3771727e697 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_infof.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_infof.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -96,7 +96,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_info_(MPI_Fint *fh, MPI_Fint *info_used, { MPI_File fh_c; MPI_Info info_used_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_info(fh_c, &info_used_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posn_shf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posn_shf.c index 8f5bff5c06e..a6a1bbc3e0f 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posn_shf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posn_shf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,13 +90,13 @@ extern FORTRAN_API void FORT_CALL mpi_file_get_position_shared_( MPI_Fint *, MPI #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_get_position_shared_(MPI_Fint *fh, MPI_Offset *offset, +FORTRAN_API void FORT_CALL mpi_file_get_position_shared_(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_get_position_shared_(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_position_shared(fh_c, offset); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posnf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posnf.c index e21f37674a7..b97190cfcbd 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posnf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_posnf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_position_(MPI_Fint *fh, MPI_Offset *offs FORTRAN_API void FORT_CALL mpi_file_get_position_(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_position(fh_c, offset); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_sizef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_sizef.c index 71ff17bb562..343704bb577 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_sizef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_sizef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_size_(MPI_Fint *fh, MPI_Offset *size, MP FORTRAN_API void FORT_CALL mpi_file_get_size_(MPI_Fint *fh, MPI_Offset *size, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_get_size(fh_c, size); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_viewf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_viewf.c index 8a4bc3d7fb8..6022379bb10 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/get_viewf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/get_viewf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -127,7 +127,7 @@ void mpi_file_get_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, /* this should be flagged as an error. */ *ierr = MPI_ERR_UNKNOWN; } - + *etype = MPI_Type_c2f(etype_c); *filetype = MPI_Type_c2f(filetype_c); ADIOI_Free(tmprep); @@ -159,7 +159,7 @@ FORTRAN_API void FORT_CALL mpi_file_get_view_( MPI_Fint *fh, MPI_Offset *disp, M FPRINTF(stderr, "MPI_File_get_view: datarep is an invalid address\n"); MPI_Abort(MPI_COMM_WORLD, 1); } - + tmprep = (char *) ADIOI_Malloc((MPI_MAX_DATAREP_STRING+1) * sizeof(char)); fh_c = MPI_File_f2c(*fh); etype_c = MPI_Type_f2c(*etype); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iotestf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iotestf.c index 2a2c96c886b..346fdead50b 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iotestf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iotestf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -94,7 +94,7 @@ FORTRAN_API void FORT_CALL mpio_test_(MPI_Fint *request,MPI_Fint *flag,MPI_Statu FORTRAN_API void FORT_CALL mpio_test_(MPI_Fint *request,MPI_Fint *flag,MPI_Status *status, MPI_Fint *ierr ) { MPIO_Request req_c; - + req_c = MPIO_Request_f2c(*request); *ierr = MPIO_Test(&req_c,flag,status); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iowaitf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iowaitf.c index a87ca6a6d91..c4c551914fb 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iowaitf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iowaitf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -94,7 +94,7 @@ FORTRAN_API void FORT_CALL mpio_wait_(MPI_Fint *request,MPI_Status *status, MPI_ FORTRAN_API void FORT_CALL mpio_wait_(MPI_Fint *request,MPI_Status *status, MPI_Fint *ierr ) { MPIO_Request req_c; - + req_c = MPIO_Request_f2c(*request); *ierr = MPIO_Wait(&req_c, status); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_atf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_atf.c index c6a687dcee0..5d983c98a0a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_atf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_atf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -102,7 +102,7 @@ void mpi_file_iread_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, MPI_File fh_c; MPIO_Request req_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -122,7 +122,7 @@ FORTRAN_API void FORT_CALL mpi_file_iread_at_(MPI_Fint *fh,MPI_Offset *offset,vo { MPI_File fh_c; MPIO_Request req_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iread_at(fh_c,*offset,buf,*count,*datatype,&req_c); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_shf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_shf.c index 84dc3753c4a..9262240effe 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_shf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iread_shf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -100,7 +100,7 @@ void mpi_file_iread_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_File fh_c; MPIO_Request req_c; MPI_Datatype datatype_c; - + datatype_c = MPI_Type_f2c(*datatype); fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iread_shared(fh_c,buf,*count,datatype_c,&req_c); @@ -116,7 +116,7 @@ FORTRAN_API void FORT_CALL mpi_file_iread_shared_(MPI_Fint *fh,void *buf,MPI_Fin { MPI_File fh_c; MPIO_Request req_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iread_shared(fh_c,buf,*count,*datatype,&req_c); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/ireadf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/ireadf.c index ae9fbaf3bfd..15e05546589 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/ireadf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/ireadf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -100,7 +100,7 @@ void mpi_file_iread_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_File fh_c; MPIO_Request req_c; MPI_Datatype datatype_c; - + datatype_c = MPI_Type_f2c(*datatype); fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iread(fh_c,buf,*count,datatype_c,&req_c); @@ -116,7 +116,7 @@ FORTRAN_API void FORT_CALL mpi_file_iread_(MPI_Fint *fh,void *buf,MPI_Fint *coun { MPI_File fh_c; MPIO_Request req_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iread(fh_c,buf,*count,*datatype,&req_c); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_atf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_atf.c index b326fc3d1a7..752e95938c8 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_atf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_atf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -102,7 +102,7 @@ void mpi_file_iwrite_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, MPI_File fh_c; MPIO_Request req_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -121,7 +121,7 @@ FORTRAN_API void FORT_CALL mpi_file_iwrite_at_(MPI_Fint *fh,MPI_Offset *offset,v { MPI_File fh_c; MPIO_Request req_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite_at(fh_c,*offset,buf,*count,*datatype,&req_c); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_shf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_shf.c index 90ea68777b6..d5233b41ca6 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_shf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iwrite_shf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_File fh_c; MPIO_Request req_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -109,14 +109,14 @@ void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, #else /* Prototype to keep compiler happy */ FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, - MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ); + MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; MPIO_Request req_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite_shared(fh_c,buf,*count,*datatype,&req_c); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/iwritef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/iwritef.c index 4410c011a14..4ea2d686b6e 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/iwritef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/iwritef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -100,7 +100,7 @@ void mpi_file_iwrite_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_File fh_c; MPIO_Request req_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -117,7 +117,7 @@ FORTRAN_API void FORT_CALL mpi_file_iwrite_(MPI_Fint *fh,void *buf,MPI_Fint *cou { MPI_File fh_c; MPIO_Request req_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite(fh_c,buf,*count,*datatype,&req_c); *request = MPIO_Request_c2f(req_c); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/openf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/openf.c index ea1a5d1c47e..1f5bb50f73a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/openf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/openf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/preallocf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/preallocf.c index 515aa4a9125..6130bf086e0 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/preallocf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/preallocf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_preallocate_(MPI_Fint *fh,MPI_Offset *size, FORTRAN_API void FORT_CALL mpi_file_preallocate_(MPI_Fint *fh,MPI_Offset *size, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_preallocate(fh_c,*size); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallbf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallbf.c index 5fff4e9e7ec..379e9b8273b 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallbf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallbf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -114,7 +114,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_at_all_begin_(MPI_Fint *fh,MPI_Offset * MPI_Fint *count,MPI_Fint *datatype, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_at_all_begin(fh_c,*offset,buf,*count,(MPI_Datatype) *datatype); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallef.c index 8a3441126dd..702e8f81a20 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/rd_atallef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_at_all_end_(MPI_Fint *fh,void *buf,MPI_ FORTRAN_API void FORT_CALL mpi_file_read_at_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_at_all_end(fh_c,buf,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allbf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allbf.c index 5708a03c8dc..4370cbb6f90 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allbf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allbf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_read_all_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -113,7 +113,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_all_begin_(MPI_Fint *fh,void *buf,MPI_F FORTRAN_API void FORT_CALL mpi_file_read_all_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_all_begin(fh_c,buf,*count,(MPI_Datatype) *datatype); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allef.c index 776b182d640..3fbc321f8b6 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,13 +90,13 @@ extern FORTRAN_API void FORT_CALL mpi_file_read_all_end_( MPI_Fint *, void*, MPI #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_read_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, +FORTRAN_API void FORT_CALL mpi_file_read_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_read_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_all_end(fh_c,buf,status); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allf.c index 99e1229b7f1..ae0d8563dd4 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_allf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_read_all_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -113,7 +113,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_all_(MPI_Fint *fh,void *buf,MPI_Fint *c FORTRAN_API void FORT_CALL mpi_file_read_all_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_all(fh_c,buf,*count,(MPI_Datatype)*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atallf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atallf.c index b9f30a00562..cf059a33eb3 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atallf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atallf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -118,7 +118,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_at_all_(MPI_Fint *fh,MPI_Offset *offset MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_at_all(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atf.c index 2602e399bf6..c6e00bb274f 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_atf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_read_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -114,7 +114,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_at_(MPI_Fint *fh,MPI_Offset *offset,voi MPI_Fint *count,MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_at(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordbf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordbf.c index 74389174f4c..ca1d03e298e 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordbf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordbf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_read_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -113,7 +113,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_ordered_begin_(MPI_Fint *fh,void *buf,M FORTRAN_API void FORT_CALL mpi_file_read_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_ordered_begin(fh_c,buf,*count,(MPI_Datatype)*datatype); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordef.c index 63425c8ad33..83b7c9476c5 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,13 +90,13 @@ extern FORTRAN_API void FORT_CALL mpi_file_read_ordered_end_( MPI_Fint *, void*, #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_read_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, +FORTRAN_API void FORT_CALL mpi_file_read_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_read_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_ordered_end(fh_c,buf,status); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordf.c index a45ae1282ff..9b8633224c2 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_ordf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_read_ordered_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -113,7 +113,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_ordered_(MPI_Fint *fh,void *buf,MPI_Fin FORTRAN_API void FORT_CALL mpi_file_read_ordered_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_ordered(fh_c,buf,*count,(MPI_Datatype)*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_shf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_shf.c index 937e54fb95e..098bf242fdf 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/read_shf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/read_shf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -98,7 +98,7 @@ void mpi_file_read_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -107,12 +107,12 @@ void mpi_file_read_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, #else /* Prototype to keep compiler happy */ FORTRAN_API void FORT_CALL mpi_file_read_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, - MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ); + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_read_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read_shared(fh_c,buf,*count,(MPI_Datatype)*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/readf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/readf.c index c802739139e..4600e591bc3 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/readf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/readf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_read_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -114,7 +114,7 @@ FORTRAN_API void FORT_CALL mpi_file_read_(MPI_Fint *fh,void *buf,MPI_Fint *count MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_read(fh_c,buf,*count,(MPI_Datatype)*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/seek_shf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/seek_shf.c index 158e626c0e7..74a65df92c8 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/seek_shf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/seek_shf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,13 +90,13 @@ extern FORTRAN_API void FORT_CALL mpi_file_seek_shared_( MPI_Fint *, MPI_Offset #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_seek_shared_(MPI_Fint *fh,MPI_Offset *offset,MPI_Fint *whence, +FORTRAN_API void FORT_CALL mpi_file_seek_shared_(MPI_Fint *fh,MPI_Offset *offset,MPI_Fint *whence, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_seek_shared_(MPI_Fint *fh,MPI_Offset *offset,MPI_Fint *whence, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_seek_shared(fh_c,*offset,*whence); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/seekf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/seekf.c index 8e125d1849c..d05bd7789e3 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/seekf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/seekf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_seek_(MPI_Fint *fh,MPI_Offset *offset,MPI_Fi FORTRAN_API void FORT_CALL mpi_file_seek_(MPI_Fint *fh,MPI_Offset *offset,MPI_Fint *whence, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_seek(fh_c,*offset,*whence); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_atomf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_atomf.c index c4388950da5..2c8aa6ce6df 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_atomf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_atomf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_set_atomicity_(MPI_Fint *fh,MPI_Fint *flag, FORTRAN_API void FORT_CALL mpi_file_set_atomicity_(MPI_Fint *fh,MPI_Fint *flag, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_set_atomicity(fh_c,*flag); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_errhf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_errhf.c index c622660898c..7f440192087 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_errhf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_errhf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -96,7 +96,7 @@ FORTRAN_API void FORT_CALL mpi_file_set_errhandler_(MPI_Fint *fh, MPI_Fint *err_ { MPI_File fh_c; MPI_Errhandler err_handler_c; - + fh_c = MPI_File_f2c(*fh); err_handler_c = MPI_Errhandler_f2c(*err_handler); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_infof.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_infof.c index 85c05e8f1da..12731b273d8 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_infof.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_infof.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -96,7 +96,7 @@ FORTRAN_API void FORT_CALL mpi_file_set_info_(MPI_Fint *fh, MPI_Fint *info, MPI_ { MPI_File fh_c; MPI_Info info_c; - + fh_c = MPI_File_f2c(*fh); info_c = MPI_Info_f2c(*info); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_sizef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_sizef.c index c595f2b8550..cda35300572 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_sizef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_sizef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ FORTRAN_API void FORT_CALL mpi_file_set_size_(MPI_Fint *fh,MPI_Offset *size, MPI FORTRAN_API void FORT_CALL mpi_file_set_size_(MPI_Fint *fh,MPI_Offset *size, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_set_size(fh_c,*size); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_viewf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_viewf.c index 97151d978fb..6bc7d931646 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/set_viewf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/set_viewf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -104,10 +104,10 @@ void mpi_file_set_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, { char *newstr; MPI_File fh_c; - int i, real_len; + int i, real_len; MPI_Datatype etype_c, filetype_c; MPI_Info info_c; - + etype_c = MPI_Type_f2c(*etype); filetype_c = MPI_Type_f2c(*filetype); info_c = MPI_Info_f2c(*info); @@ -127,9 +127,9 @@ void mpi_file_set_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, newstr = (char *) ADIOI_Malloc((real_len+1)*sizeof(char)); ADIOI_Strncpy(newstr, datarep, real_len); newstr[real_len] = '\0'; - + fh_c = MPI_File_f2c(*fh); - + *ierr = MPI_File_set_view(fh_c,*disp,etype_c,filetype_c,newstr,info_c); ADIOI_Free(newstr); @@ -152,9 +152,9 @@ FORTRAN_API void FORT_CALL mpi_file_set_view_( MPI_Fint *fh, MPI_Offset *disp, M #endif char *newstr; MPI_File fh_c; - int i, real_len; + int i, real_len; MPI_Info info_c; - + info_c = MPI_Info_f2c(*info); /* strip trailing blanks in datarep */ @@ -172,9 +172,9 @@ FORTRAN_API void FORT_CALL mpi_file_set_view_( MPI_Fint *fh, MPI_Offset *disp, M newstr = (char *) ADIOI_Malloc((real_len+1)*sizeof(char)); ADIOI_Strncpy(newstr, datarep, real_len); newstr[real_len] = '\0'; - + fh_c = MPI_File_f2c(*fh); - + *ierr = MPI_File_set_view(fh_c,*disp,*etype,*filetype,newstr,info_c); ADIOI_Free(newstr); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallbf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallbf.c index 836dd378aee..36e32f0d449 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallbf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallbf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -100,7 +100,7 @@ void mpi_file_write_at_all_begin_(MPI_Fint *fh,MPI_Offset *offset,void *buf, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -115,7 +115,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_at_all_begin_(MPI_Fint *fh,MPI_Offset MPI_Fint *count,MPI_Fint *datatype, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_at_all_begin(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallef.c index 7426c48bf2f..f190a3538b1 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/wr_atallef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,13 +90,13 @@ extern FORTRAN_API void FORT_CALL mpi_file_write_at_all_end_( MPI_Fint *, void*, #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_write_at_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, +FORTRAN_API void FORT_CALL mpi_file_write_at_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_write_at_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_at_all_end(fh_c,buf,status); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allbf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allbf.c index e47d3cd2008..680d0925f14 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allbf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allbf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -97,7 +97,7 @@ void mpi_file_write_all_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -110,7 +110,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_all_begin_(MPI_Fint *fh,void *buf,MPI_ FORTRAN_API void FORT_CALL mpi_file_write_all_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_all_begin(fh_c,buf,*count,(MPI_Datatype)*datatype); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allef.c index 9ccc1eb8db9..3ae1018f399 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,11 +90,11 @@ extern FORTRAN_API void FORT_CALL mpi_file_write_all_end_( MPI_Fint *, void*, MP #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_write_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ); +FORTRAN_API void FORT_CALL mpi_file_write_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_write_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_all_end(fh_c,buf,status); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allf.c index bddcac15092..f4e57f3b22c 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_allf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -98,7 +98,7 @@ void mpi_file_write_all_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -112,7 +112,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_all_(MPI_Fint *fh,void *buf,MPI_Fint * FORTRAN_API void FORT_CALL mpi_file_write_all_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_all(fh_c,buf,*count,*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atallf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atallf.c index 030e7ae359d..1e377a7905f 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atallf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atallf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -101,7 +101,7 @@ void mpi_file_write_at_all_(MPI_Fint *fh,MPI_Offset *offset,void *buf, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -118,7 +118,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_at_all_(MPI_Fint *fh,MPI_Offset *offse MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_at_all(fh_c,*offset,buf,*count,*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atf.c index 8ba429dcc6b..e7b66404252 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_atf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -101,7 +101,7 @@ void mpi_file_write_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -118,7 +118,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_at_(MPI_Fint *fh,MPI_Offset *offset,vo MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_at(fh_c,*offset,buf,*count,*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordbf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordbf.c index 41b9accfbef..d3f1226f55d 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordbf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordbf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -98,7 +98,7 @@ void mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -112,7 +112,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf, FORTRAN_API void FORT_CALL mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_ordered_begin(fh_c,buf,*count,*datatype); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordef.c index a979f70eee9..8eaea853446 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -90,12 +90,12 @@ extern FORTRAN_API void FORT_CALL mpi_file_write_ordered_end_( MPI_Fint *, void* #endif /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_write_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, +FORTRAN_API void FORT_CALL mpi_file_write_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_write_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_ordered_end(fh_c,buf,status); diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordf.c index fe96406d9bb..4c779bfffe0 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_ordf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -98,7 +98,7 @@ void mpi_file_write_ordered_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -112,7 +112,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_ordered_(MPI_Fint *fh,void *buf,MPI_Fi FORTRAN_API void FORT_CALL mpi_file_write_ordered_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ){ MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_ordered(fh_c,buf,*count,*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_shf.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_shf.c index 30d80e0ee6d..4aa0138c90a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/write_shf.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/write_shf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_write_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -114,7 +114,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_shared_(MPI_Fint *fh,void *buf,MPI_Fin MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write_shared(fh_c, buf,*count,*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fortran/writef.c b/ompi/mca/io/romio314/romio/mpi-io/fortran/writef.c index 9b07ba095fa..7bab1687815 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fortran/writef.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fortran/writef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -99,7 +99,7 @@ void mpi_file_write_(MPI_Fint *fh,void *buf,MPI_Fint *count, { MPI_File fh_c; MPI_Datatype datatype_c; - + fh_c = MPI_File_f2c(*fh); datatype_c = MPI_Type_f2c(*datatype); @@ -114,7 +114,7 @@ FORTRAN_API void FORT_CALL mpi_file_write_(MPI_Fint *fh,void *buf,MPI_Fint *coun MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; - + fh_c = MPI_File_f2c(*fh); *ierr = MPI_File_write(fh_c, buf,*count,*datatype,status); } diff --git a/ompi/mca/io/romio314/romio/mpi-io/fsync.c b/ompi/mca/io/romio314/romio/mpi-io/fsync.c index 0e4f1b964ad..3f457f7a57e 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/fsync.c +++ b/ompi/mca/io/romio314/romio/mpi-io/fsync.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -69,7 +69,7 @@ int MPI_File_sync(MPI_File fh) #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, adio_fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ - + fn_exit: MPIU_THREAD_CS_EXIT(ALLFUNC,); return error_code; diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_amode.c b/ompi/mca/io/romio314/romio/mpi-io/get_amode.c index 4770c839598..3ff5077ae22 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_amode.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_amode.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -41,7 +41,7 @@ int MPI_File_get_amode(MPI_File fh, int *amode) int error_code=MPI_SUCCESS; static char myname[] = "MPI_FILE_GET_AMODE"; ADIO_File adio_fh; - + adio_fh = MPIO_File_resolve(fh); /* --BEGIN ERROR HANDLING-- */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_atom.c b/ompi/mca/io/romio314/romio/mpi-io/get_atom.c index 1a9eae1389e..306c31ce89b 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_atom.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_atom.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -41,7 +41,7 @@ int MPI_File_get_atomicity(MPI_File fh, int *flag) int error_code; ADIO_File adio_fh; static char myname[] = "MPI_FILE_GET_ATOMICITY"; - + adio_fh = MPIO_File_resolve(fh); /* --BEGIN ERROR HANDLING-- */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_bytoff.c b/ompi/mca/io/romio314/romio/mpi-io/get_bytoff.c index f5cb452e5a8..7376e7af5f6 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_bytoff.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_bytoff.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -27,7 +27,7 @@ int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp) _ #endif /*@ - MPI_File_get_byte_offset - Returns the absolute byte position in + MPI_File_get_byte_offset - Returns the absolute byte position in the file corresponding to "offset" etypes relative to the current view diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_errh.c b/ompi/mca/io/romio314/romio/mpi-io/get_errh.c index 5a4d9ee4845..6915218fde3 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_errh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_errh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_extent.c b/ompi/mca/io/romio314/romio/mpi-io/get_extent.c index 31a841c0706..103f8815c62 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_extent.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_extent.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_group.c b/ompi/mca/io/romio314/romio/mpi-io/get_group.c index 4d82ed8cb1f..34293c98b10 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_group.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_group.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -26,7 +26,7 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group) __attribute__((weak,alias( #endif /*@ - MPI_File_get_group - Returns the group of processes that + MPI_File_get_group - Returns the group of processes that opened the file Input Parameters: diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_info.c b/ompi/mca/io/romio314/romio/mpi-io/get_info.c index 1d0b397411b..7685c9f04ad 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_info.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_info.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_posn.c b/ompi/mca/io/romio314/romio/mpi-io/get_posn.c index 49d8e4919bd..1d5c59f600f 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_posn.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_posn.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -27,7 +27,7 @@ int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) __attribute__((weak,a #endif /*@ - MPI_File_get_position - Returns the current position of the + MPI_File_get_position - Returns the current position of the individual file pointer in etype units relative to the current view diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_posn_sh.c b/ompi/mca/io/romio314/romio/mpi-io/get_posn_sh.c index c6172c9d734..d0bfa44a4d8 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_posn_sh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_posn_sh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -26,7 +26,7 @@ int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset) __attribute__( #endif /*@ - MPI_File_get_position_shared - Returns the current position of the + MPI_File_get_position_shared - Returns the current position of the shared file pointer in etype units relative to the current view Input Parameters: diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_size.c b/ompi/mca/io/romio314/romio/mpi-io/get_size.c index d7836c2791e..ad4b8223a79 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_size.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_size.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/get_view.c b/ompi/mca/io/romio314/romio/mpi-io/get_view.c index f2d288952c2..e4a7e947bca 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/get_view.c +++ b/ompi/mca/io/romio314/romio/mpi-io/get_view.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -62,7 +62,7 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, if (datarep <= (char *) 0) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, + myname, __LINE__, MPI_ERR_ARG, "**iodatarepnomem", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -70,14 +70,14 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, /* --END ERROR HANDLING-- */ *disp = adio_fh->disp; - ADIOI_Strncpy(datarep, + ADIOI_Strncpy(datarep, (adio_fh->is_external32 ? "external32": "native"), MPI_MAX_DATAREP_STRING); MPI_Type_get_envelope(adio_fh->etype, &i, &j, &k, &combiner); if (combiner == MPI_COMBINER_NAMED) *etype = adio_fh->etype; else { /* FIXME: It is wrong to use MPI_Type_contiguous; the user could choose to - re-implement MPI_Type_contiguous in an unexpected way. Either use + re-implement MPI_Type_contiguous in an unexpected way. Either use MPIR_Barrier_impl as in MPICH or PMPI_Type_contiguous */ MPI_Type_contiguous(1, adio_fh->etype, ©_etype); diff --git a/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_err.c b/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_err.c index fbfc8a2c971..11c50bf5aae 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_err.c +++ b/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_err.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2004 University of Chicago. +/* + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_file.c b/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_file.c index 7a43b01b946..51df8784b13 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_file.c +++ b/ompi/mca/io/romio314/romio/mpi-io/glue/default/mpio_file.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2004 University of Chicago. + * Copyright (C) 2004 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -43,7 +43,7 @@ extern int ADIOI_Ftable_max; MPI_File MPIO_File_f2c(MPI_Fint fh) { #ifndef INT_LT_POINTER - return (MPI_File) ((void *) fh); + return (MPI_File) ((void *) fh); /* the extra cast is to get rid of a compiler warning on Exemplar. The warning is because MPI_File points to a structure containing longlongs, which may be 8-byte aligned. But MPI_Fint itself @@ -71,15 +71,15 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) if (!ADIOI_Ftable) { ADIOI_Ftable_max = 1024; ADIOI_Ftable = (MPI_File *) - ADIOI_Malloc(ADIOI_Ftable_max*sizeof(MPI_File)); - ADIOI_Ftable_ptr = 0; /* 0 can't be used though, because + ADIOI_Malloc(ADIOI_Ftable_max*sizeof(MPI_File)); + ADIOI_Ftable_ptr = 0; /* 0 can't be used though, because MPI_FILE_NULL=0 */ for (i=0; icookie != ADIOI_REQ_COOKIE)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, diff --git a/ompi/mca/io/romio314/romio/mpi-io/iotestall.c b/ompi/mca/io/romio314/romio/mpi-io/iotestall.c index d88aeb77667..c6db21802f3 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/iotestall.c +++ b/ompi/mca/io/romio314/romio/mpi-io/iotestall.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 2003 University of Chicago. + * Copyright (C) 2003 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -31,7 +31,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag, MPI_Status statuses[]) { - int done, i, err; + int done, i, err; MPIU_THREADPRIV_DECL; MPIU_THREAD_CS_ENTER(ALLFUNC,); @@ -40,10 +40,10 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag, goto fn_exit; } - /* This is actually very difficult to do. We can't use MPIO_Test, + /* This is actually very difficult to do. We can't use MPIO_Test, since we must change the requests only if *ALL* requests are complete */ - /* FIXME: THIS IS NOT CORRECT (see above). But most applications won't + /* FIXME: THIS IS NOT CORRECT (see above). But most applications won't care */ done = 1; for (i=0; iatomicity)) ADIO_IreadContig(adio_fh, buf, count, datatype, file_ptr_type, - off, request, &error_code); + off, request, &error_code); else { /* to maintain strict atomicity semantics with other concurrent operations, lock (exclusive) and call blocking routine */ @@ -151,7 +151,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu } } else ADIO_IreadStrided(adio_fh, buf, count, datatype, file_ptr_type, - offset, request, &error_code); + offset, request, &error_code); fn_exit: MPIU_THREAD_CS_EXIT(ALLFUNC,); diff --git a/ompi/mca/io/romio314/romio/mpi-io/iread_at.c b/ompi/mca/io/romio314/romio/mpi-io/iread_at.c index 29bda8462f1..29fd7cf31c2 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/iread_at.c +++ b/ompi/mca/io/romio314/romio/mpi-io/iread_at.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -45,7 +45,7 @@ Output Parameters: .N fortran @*/ -int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, +int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { int error_code; diff --git a/ompi/mca/io/romio314/romio/mpi-io/iread_sh.c b/ompi/mca/io/romio314/romio/mpi-io/iread_sh.c index b6713463fb1..ca1bc17a7cd 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/iread_sh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/iread_sh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -110,7 +110,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count, } ADIO_ReadContig(adio_fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, - off, &status, &error_code); + off, &status, &error_code); if (adio_fh->file_system != ADIO_NFS) { diff --git a/ompi/mca/io/romio314/romio/mpi-io/iwrite.c b/ompi/mca/io/romio314/romio/mpi-io/iwrite.c index cd4f69fbc50..fc8dd44544e 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/iwrite.c +++ b/ompi/mca/io/romio314/romio/mpi-io/iwrite.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -118,7 +118,7 @@ int MPIOI_File_iwrite(MPI_File fh, ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); ADIOI_Datatype_iscontig(adio_fh->filetype, &filetype_is_contig); - + ADIOI_TEST_DEFERRED(adio_fh, myname, &error_code); if (buftype_is_contig && filetype_is_contig) { @@ -144,7 +144,7 @@ int MPIOI_File_iwrite(MPI_File fh, } ADIO_WriteContig(adio_fh, buf, count, datatype, file_ptr_type, off, - &status, &error_code); + &status, &error_code); if (ADIO_Feature(adio_fh, ADIO_LOCKS) ) { @@ -153,7 +153,7 @@ int MPIOI_File_iwrite(MPI_File fh, if (error_code == MPI_SUCCESS) { nbytes = count * datatype_size; } - + MPIO_Completed_request_create(&adio_fh, nbytes, &error_code, request); } } diff --git a/ompi/mca/io/romio314/romio/mpi-io/iwrite_at.c b/ompi/mca/io/romio314/romio/mpi-io/iwrite_at.c index 10862bd0334..ee536754239 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/iwrite_at.c +++ b/ompi/mca/io/romio314/romio/mpi-io/iwrite_at.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -47,7 +47,7 @@ Output Parameters: #endif int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, ROMIO_CONST void *buf, - int count, MPI_Datatype datatype, + int count, MPI_Datatype datatype, MPIO_Request *request) { int error_code; diff --git a/ompi/mca/io/romio314/romio/mpi-io/iwrite_sh.c b/ompi/mca/io/romio314/romio/mpi-io/iwrite_sh.c index c436221c14f..458202d5ac2 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/iwrite_sh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/iwrite_sh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -92,7 +92,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count, off = adio_fh->disp + adio_fh->etype_size * shared_fp; if (!(adio_fh->atomicity)) ADIO_IwriteContig(adio_fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, - off, request, &error_code); + off, request, &error_code); else { /* to maintain strict atomicity semantics with other concurrent operations, lock (exclusive) and call blocking routine */ @@ -101,7 +101,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count, ADIOI_WRITE_LOCK(adio_fh, off, SEEK_SET, bufsize); ADIO_WriteContig(adio_fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, - off, &status, &error_code); + off, &status, &error_code); if (adio_fh->file_system != ADIO_NFS) ADIOI_UNLOCK(adio_fh, off, SEEK_SET, bufsize); @@ -111,7 +111,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count, } else ADIO_IwriteStrided(adio_fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, - shared_fp, request, &error_code); + shared_fp, request, &error_code); fn_exit: MPIU_THREAD_CS_EXIT(ALLFUNC,); diff --git a/ompi/mca/io/romio314/romio/mpi-io/mpich_fileutil.c b/ompi/mca/io/romio314/romio/mpi-io/mpich_fileutil.c index b853b588fa7..7f35430c704 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/mpich_fileutil.c +++ b/ompi/mca/io/romio314/romio/mpi-io/mpich_fileutil.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -14,13 +14,13 @@ */ int MPIR_ROMIO_Get_file_errhand( MPI_File, MPI_Errhandler * ); int MPIR_ROMIO_Set_file_errhand( MPI_File, MPI_Errhandler ); -void MPIR_Get_file_error_routine( MPI_Errhandler, - void (**)(MPI_File *, int *, ...), +void MPIR_Get_file_error_routine( MPI_Errhandler, + void (**)(MPI_File *, int *, ...), int * ); /* These next two routines are used to allow MPICH to access/set the error handers in the MPI_File structure until MPICH knows about the - file structure, and to handle the errhandler structure, which + file structure, and to handle the errhandler structure, which includes a reference count. Not currently used. */ int MPIR_ROMIO_Set_file_errhand( MPI_File file_ptr, MPI_Errhandler e ) { @@ -30,7 +30,7 @@ int MPIR_ROMIO_Set_file_errhand( MPI_File file_ptr, MPI_Errhandler e ) return MPI_ERR_FILE; } /* --END ERROR HANDLING-- */ - else + else file_ptr->err_handler = e; return 0; } @@ -49,7 +49,7 @@ int MPIR_ROMIO_Get_file_errhand( MPI_File file_ptr, MPI_Errhandler *e ) } /* --END ERROR HANDLING-- */ else { - if (file_ptr->err_handler == MPI_ERRORS_RETURN) + if (file_ptr->err_handler == MPI_ERRORS_RETURN) *e = 0; else *e = file_ptr->err_handler; diff --git a/ompi/mca/io/romio314/romio/mpi-io/mpioimpl.h b/ompi/mca/io/romio314/romio/mpi-io/mpioimpl.h index 8f67bcea70c..a73561acb2b 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/mpioimpl.h +++ b/ompi/mca/io/romio314/romio/mpi-io/mpioimpl.h @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ /* header file for MPI-IO implementation. not intended to be - user-visible */ + user-visible */ #ifndef MPIOIMPL_INCLUDE #define MPIOIMPL_INCLUDE @@ -31,8 +31,8 @@ #else /* not ROMIO_INSIDE_MPICH */ /* Any MPI implementation that wishes to follow the thread-safety and - error reporting features provided by MPICH must implement these - four functions. Defining these as empty should not change the behavior + error reporting features provided by MPICH must implement these + four functions. Defining these as empty should not change the behavior of correct programs */ #define MPIU_THREAD_CS_ENTER(x,y) #define MPIU_THREAD_CS_EXIT(x,y) diff --git a/ompi/mca/io/romio314/romio/mpi-io/mpioprof.h b/ompi/mca/io/romio314/romio/mpi-io/mpioprof.h index 108fd6441ed..672642028b5 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/mpioprof.h +++ b/ompi/mca/io/romio314/romio/mpi-io/mpioprof.h @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ -/* - This header file converts all MPI_ names into PMPI_ names, for +/* + This header file converts all MPI_ names into PMPI_ names, for building the profiling interface */ @@ -63,7 +63,7 @@ #undef MPI_File_read #define MPI_File_read PMPI_File_read #undef MPI_File_read_all -#define MPI_File_read_all PMPI_File_read_all +#define MPI_File_read_all PMPI_File_read_all #undef MPI_File_write #define MPI_File_write PMPI_File_write #undef MPI_File_write_all diff --git a/ompi/mca/io/romio314/romio/mpi-io/mpir-mpioinit.c b/ompi/mca/io/romio314/romio/mpi-io/mpir-mpioinit.c index be78b45e989..914b8d53890 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/mpir-mpioinit.c +++ b/ompi/mca/io/romio314/romio/mpi-io/mpir-mpioinit.c @@ -28,8 +28,8 @@ void MPIR_MPIOInit(int * error_code) { /* --BEGIN ERROR HANDLING-- */ if (!flag) { - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, __LINE__, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_OTHER, "**initialized", 0); *error_code = MPIO_Err_return_file(MPI_FILE_NULL, *error_code); return; @@ -37,7 +37,7 @@ void MPIR_MPIOInit(int * error_code) { /* --END ERROR HANDLING-- */ MPI_Keyval_create(MPI_NULL_COPY_FN, ADIOI_End_call, &ADIO_Init_keyval, - (void *) 0); + (void *) 0); /* put a dummy attribute on MPI_COMM_SELF, because we want the delete function to be called when MPI_COMM_SELF is freed. Clarified @@ -51,6 +51,6 @@ void MPIR_MPIOInit(int * error_code) { } *error_code = MPI_SUCCESS; } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/mpiu_external32.c b/ompi/mca/io/romio314/romio/mpi-io/mpiu_external32.c index ce2253bb4bd..39b4949f582 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/mpiu_external32.c +++ b/ompi/mca/io/romio314/romio/mpi-io/mpiu_external32.c @@ -41,7 +41,7 @@ int MPIU_write_external32_conversion_fn (const void *userbuf, MPI_Datatype datat else { void *tmp_buf = NULL; - tmp_buf = ADIOI_Malloc(bytes); + tmp_buf = ADIOI_Malloc(bytes); if (!tmp_buf) { mpi_errno = MPI_ERR_NO_MEM; @@ -99,7 +99,7 @@ int MPIU_read_external32_conversion_fn(void *userbuf, MPI_Datatype datatype, else { void *tmp_buf = NULL; - tmp_buf = ADIOI_Malloc(bytes); + tmp_buf = ADIOI_Malloc(bytes); if (!tmp_buf) { mpi_errno = MPI_ERR_NO_MEM; @@ -167,6 +167,6 @@ int MPIU_external32_buffer_setup(const void * buf, int count, MPI_Datatype type, } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/mpiu_greq.c b/ompi/mca/io/romio314/romio/mpi-io/mpiu_greq.c index cb6e9d2ed49..77589e0ea48 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/mpiu_greq.c +++ b/ompi/mca/io/romio314/romio/mpi-io/mpiu_greq.c @@ -36,7 +36,7 @@ int MPIU_Greq_free_fn(void *extra_state) { /* frees the memory allocated in MPIO_Completed_request_create */ ADIOI_Free(extra_state); - + return MPI_SUCCESS; } int MPIU_Greq_cancel_fn(void *extra_state, int complete) diff --git a/ompi/mca/io/romio314/romio/mpi-io/open.c b/ompi/mca/io/romio314/romio/mpi-io/open.c index a2a68c95f22..4174dad10ec 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/open.c +++ b/ompi/mca/io/romio314/romio/mpi-io/open.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -71,7 +71,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, if (error_code || flag) { error_code = MPIO_Err_create_code(error_code, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_COMM, + myname, __LINE__, MPI_ERR_COMM, "**commnotintra", 0); goto fn_fail; } @@ -80,16 +80,16 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, ((amode&MPI_MODE_WRONLY)?1:0) != 1 ) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_AMODE, + myname, __LINE__, MPI_ERR_AMODE, "**fileamodeone", 0); goto fn_fail; } - if ((amode & MPI_MODE_RDONLY) && + if ((amode & MPI_MODE_RDONLY) && ((amode & MPI_MODE_CREATE) || (amode & MPI_MODE_EXCL))) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_AMODE, + myname, __LINE__, MPI_ERR_AMODE, "**fileamoderead", 0); goto fn_fail; } @@ -97,7 +97,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, if ((amode & MPI_MODE_RDWR) && (amode & MPI_MODE_SEQUENTIAL)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_AMODE, + myname, __LINE__, MPI_ERR_AMODE, "**fileamodeseq", 0); goto fn_fail; } @@ -132,7 +132,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, if (error_code != MPI_SUCCESS) { /* ADIO_ResolveFileType() will print as informative a message as it - * possibly can or call MPIO_Err_setmsg. We just need to propagate + * possibly can or call MPIO_Err_setmsg. We just need to propagate * the error up. */ goto fn_fail; @@ -149,7 +149,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, filename = tmp + 1; } -/* use default values for disp, etype, filetype */ +/* use default values for disp, etype, filetype */ *fh = ADIO_Open(comm, dupcomm, filename, file_system, fsops, amode, 0, MPI_BYTE, MPI_BYTE, info, ADIO_PERM_NULL, &error_code); @@ -163,10 +163,10 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, /* if MPI_MODE_SEQUENTIAL requested, file systems cannot do explicit offset * or independent file pointer accesses, leaving not much else aside from * shared file pointer accesses. */ - if ( !ADIO_Feature((*fh), ADIO_SHARED_FP) && (amode & MPI_MODE_SEQUENTIAL)) + if ( !ADIO_Feature((*fh), ADIO_SHARED_FP) && (amode & MPI_MODE_SEQUENTIAL)) { - error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, + error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_UNSUPPORTED_OPERATION, "**iosequnsupported", 0); ADIO_Close(*fh, &error_code); @@ -176,7 +176,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, /* determine name of file that will hold the shared file pointer */ /* can't support shared file pointers on a file system that doesn't support file locking. */ - if ((error_code == MPI_SUCCESS) && + if ((error_code == MPI_SUCCESS) && ADIO_Feature((*fh), ADIO_SHARED_FP)) { MPI_Comm_rank(dupcomm, &rank); ADIOI_Shfp_fname(*fh, rank, &error_code); @@ -184,7 +184,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode, goto fn_fail; /* if MPI_MODE_APPEND, set the shared file pointer to end of file. - indiv. file pointer already set to end of file in ADIO_Open. + indiv. file pointer already set to end of file in ADIO_Open. Here file view is just bytes. */ if ((*fh)->access_mode & MPI_MODE_APPEND) { if (rank == (*fh)->hints->ranklist[0]) /* only one person need set the sharedfp */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/prealloc.c b/ompi/mca/io/romio314/romio/mpi-io/prealloc.c index 3853f8da662..e1cf7f91fd4 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/prealloc.c +++ b/ompi/mca/io/romio314/romio/mpi-io/prealloc.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -92,7 +92,7 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size) /* --END ERROR HANDLING-- */ } MPI_Barrier(adio_fh->comm); - + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, adio_fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/rd_atallb.c b/ompi/mca/io/romio314/romio/mpi-io/rd_atallb.c index a7120b3da21..c6cc5e5cd5e 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/rd_atallb.c +++ b/ompi/mca/io/romio314/romio/mpi-io/rd_atallb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/rd_atalle.c b/ompi/mca/io/romio314/romio/mpi-io/rd_atalle.c index 207d5ba3698..69eafa21b73 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/rd_atalle.c +++ b/ompi/mca/io/romio314/romio/mpi-io/rd_atalle.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/read.c b/ompi/mca/io/romio314/romio/mpi-io/read.c index ff109bd4f68..cff5a323179 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -155,7 +155,7 @@ int MPIOI_File_read(MPI_File fh, } ADIO_ReadContig(adio_fh, xbuf, count, datatype, file_ptr_type, - off, status, &error_code); + off, status, &error_code); if ((adio_fh->atomicity) && ADIO_Feature(adio_fh, ADIO_LOCKS)) { ADIOI_UNLOCK(adio_fh, off, SEEK_SET, bufsize); diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_all.c b/ompi/mca/io/romio314/romio/mpi-io/read_all.c index 72ea518e199..0761e454f83 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_all.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_all.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_allb.c b/ompi/mca/io/romio314/romio/mpi-io/read_allb.c index 3f0fd90728d..3bc0304f06f 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_allb.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_allb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -85,7 +85,7 @@ int MPIOI_File_read_all_begin(MPI_File fh, goto fn_exit; } /* --END ERROR HANDLING-- */ - + MPI_Type_size_x(datatype, &datatype_size); /* --BEGIN ERROR HANDLING-- */ @@ -95,7 +95,7 @@ int MPIOI_File_read_all_begin(MPI_File fh, if (adio_fh->split_coll_count) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcoll", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_alle.c b/ompi/mca/io/romio314/romio/mpi-io/read_alle.c index a86c465b123..823f815da52 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_alle.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_alle.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -69,7 +69,7 @@ int MPIOI_File_read_all_end(MPI_File fh, if (!(adio_fh->split_coll_count)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcollnone", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_at.c b/ompi/mca/io/romio314/romio/mpi-io/read_at.c index 53dc8c42e3a..732741ba536 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_at.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_at.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_atall.c b/ompi/mca/io/romio314/romio/mpi-io/read_atall.c index 2bed66be4d6..17efe4f2ae5 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_atall.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_atall.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -45,7 +45,7 @@ Output Parameters: .N fortran @*/ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, - int count, MPI_Datatype datatype, + int count, MPI_Datatype datatype, MPI_Status *status) { int error_code; diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_ord.c b/ompi/mca/io/romio314/romio/mpi-io/read_ord.c index 5bfe77ce390..9bcc5981104 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_ord.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_ord.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -77,7 +77,7 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count, MPI_Comm_rank(adio_fh->comm, &myrank); incr = (count*datatype_size)/adio_fh->etype_size; - + /* Use a message as a 'token' to order the operations */ source = myrank - 1; dest = myrank + 1; diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_ordb.c b/ompi/mca/io/romio314/romio/mpi-io/read_ordb.c index 32971f12133..f3019ed766f 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_ordb.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_ordb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -62,7 +62,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, if (adio_fh->split_coll_count) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcoll", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_orde.c b/ompi/mca/io/romio314/romio/mpi-io/read_orde.c index 5bf853ed7ca..88a5a88e64e 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_orde.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_orde.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -55,7 +55,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status) if (!(adio_fh->split_coll_count)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcollnone", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/read_sh.c b/ompi/mca/io/romio314/romio/mpi-io/read_sh.c index 8f2ed6d114f..288593261d9 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/read_sh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/read_sh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -119,14 +119,14 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count, off = adio_fh->disp + adio_fh->etype_size * shared_fp; /* if atomic mode requested, lock (exclusive) the region, because there - could be a concurrent noncontiguous request. On NFS, locking + could be a concurrent noncontiguous request. On NFS, locking is done in the ADIO_ReadContig.*/ if ((adio_fh->atomicity) && (adio_fh->file_system != ADIO_NFS)) ADIOI_WRITE_LOCK(adio_fh, off, SEEK_SET, bufsize); ADIO_ReadContig(adio_fh, xbuf, count, datatype, ADIO_EXPLICIT_OFFSET, - off, status, &error_code); + off, status, &error_code); if ((adio_fh->atomicity) && (adio_fh->file_system != ADIO_NFS)) ADIOI_UNLOCK(adio_fh, off, SEEK_SET, bufsize); diff --git a/ompi/mca/io/romio314/romio/mpi-io/register_datarep.c b/ompi/mca/io/romio314/romio/mpi-io/register_datarep.c index b6f1d68e9da..a0a4df14f68 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/register_datarep.c +++ b/ompi/mca/io/romio314/romio/mpi-io/register_datarep.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -28,7 +28,7 @@ int MPI_Register_datarep(const char *datarep, MPI_Datarep_conversion_function *r #endif /*@ - MPI_Register_datarep - Register functions for user-defined data + MPI_Register_datarep - Register functions for user-defined data representations Input Parameters: @@ -45,12 +45,12 @@ Input Parameters: Notes: This function allows the user to provide routines to convert data from an external representation, used within a file, and the native representation, - used within the CPU. There is one predefined data representation, + used within the CPU. There is one predefined data representation, 'external32'. Please consult the MPI-2 standard for details on this function. .N fortran - + @*/ int MPI_Register_datarep(ROMIO_CONST char *datarep, MPI_Datarep_conversion_function *read_conversion_fn, diff --git a/ompi/mca/io/romio314/romio/mpi-io/seek.c b/ompi/mca/io/romio314/romio/mpi-io/seek.c index c4ed20f2232..a9e92569ced 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/seek.c +++ b/ompi/mca/io/romio314/romio/mpi-io/seek.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/seek_sh.c b/ompi/mca/io/romio314/romio/mpi-io/seek_sh.c index 772852c9d07..17320da8664 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/seek_sh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/seek_sh.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -108,7 +108,7 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence) error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, myname, __LINE__, - MPI_ERR_INTERN, + MPI_ERR_INTERN, "**iosharedfailed", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -163,7 +163,7 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence) error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, myname, __LINE__, - MPI_ERR_INTERN, + MPI_ERR_INTERN, "**iosharedfailed", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/set_atom.c b/ompi/mca/io/romio314/romio/mpi-io/set_atom.c index 20121167041..246b5d7feda 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/set_atom.c +++ b/ompi/mca/io/romio314/romio/mpi-io/set_atom.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -60,7 +60,7 @@ int MPI_File_set_atomicity(MPI_File fh, int flag) /* --BEGIN ERROR HANDLING-- */ if (tmp_flag != flag) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, + myname, __LINE__, MPI_ERR_ARG, "**notsame", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/set_errh.c b/ompi/mca/io/romio314/romio/mpi-io/set_errh.c index 793f4804868..a591dde64b1 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/set_errh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/set_errh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/set_info.c b/ompi/mca/io/romio314/romio/mpi-io/set_info.c index 1d95f2cc306..a57a88f3e2a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/set_info.c +++ b/ompi/mca/io/romio314/romio/mpi-io/set_info.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/set_size.c b/ompi/mca/io/romio314/romio/mpi-io/set_size.c index 74c3f6cd18c..b76b903062c 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/set_size.c +++ b/ompi/mca/io/romio314/romio/mpi-io/set_size.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -88,7 +88,7 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size) ADIO_Resize(adio_fh, size, &error_code); /* TODO: what to do with error code? */ - + /* --BEGIN ERROR HANDLING-- */ if (error_code != MPI_SUCCESS) error_code = MPIO_Err_return_file(adio_fh, error_code); diff --git a/ompi/mca/io/romio314/romio/mpi-io/set_view.c b/ompi/mca/io/romio314/romio/mpi-io/set_view.c index 4a820a88e37..ce1dc9b0c34 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/set_view.c +++ b/ompi/mca/io/romio314/romio/mpi-io/set_view.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -58,7 +58,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, if ((disp < 0) && (disp != MPI_DISPLACEMENT_CURRENT)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, + myname, __LINE__, MPI_ERR_ARG, "**iobaddisp", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -95,7 +95,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, (disp != MPI_DISPLACEMENT_CURRENT)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, + myname, __LINE__, MPI_ERR_ARG, "**iodispifseq", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -105,7 +105,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, !(adio_fh->access_mode & MPI_MODE_SEQUENTIAL)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_ARG, + myname, __LINE__, MPI_ERR_ARG, "**iodispifseq", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -135,7 +135,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, - MPI_ERR_UNSUPPORTED_DATAREP, + MPI_ERR_UNSUPPORTED_DATAREP, "**unsupporteddatarep",0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -167,11 +167,11 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, if (ADIO_Feature(adio_fh, ADIO_SHARED_FP) && (adio_fh->shared_fp_fd != ADIO_FILE_NULL)) { - /* only one process needs to set it to zero, but I don't want to - create the shared-file-pointer file if shared file pointers have - not been used so far. Therefore, every process that has already - opened the shared-file-pointer file sets the shared file pointer - to zero. If the file was not opened, the value is automatically + /* only one process needs to set it to zero, but I don't want to + create the shared-file-pointer file if shared file pointers have + not been used so far. Therefore, every process that has already + opened the shared-file-pointer file sets the shared file pointer + to zero. If the file was not opened, the value is automatically zero. Note that shared file pointer is stored as no. of etypes relative to the current view, whereas indiv. file pointer is stored in bytes. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/wr_atallb.c b/ompi/mca/io/romio314/romio/mpi-io/wr_atallb.c index 83eb28bc886..18023d73b31 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/wr_atallb.c +++ b/ompi/mca/io/romio314/romio/mpi-io/wr_atallb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/wr_atalle.c b/ompi/mca/io/romio314/romio/mpi-io/wr_atalle.c index fa2ab514231..cac4931488a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/wr_atalle.c +++ b/ompi/mca/io/romio314/romio/mpi-io/wr_atalle.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/write.c b/ompi/mca/io/romio314/romio/mpi-io/write.c index 899991d4897..c9f3197aca5 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -72,7 +72,7 @@ int MPIOI_File_write(MPI_File fh, MPI_Datatype datatype, char *myname, MPI_Status *status) -{ +{ int error_code, buftype_is_contig, filetype_is_contig; MPI_Count datatype_size; ADIO_Offset off, bufsize; @@ -128,7 +128,7 @@ int MPIOI_File_write(MPI_File fh, xbuf = buf; if (adio_fh->is_external32) { error_code = MPIU_external32_buffer_setup(buf, count, datatype, &e32buf); - if (error_code != MPI_SUCCESS) + if (error_code != MPI_SUCCESS) goto fn_exit; xbuf = e32buf; @@ -157,7 +157,7 @@ int MPIOI_File_write(MPI_File fh, } ADIO_WriteContig(adio_fh, xbuf, count, datatype, file_ptr_type, - off, status, &error_code); + off, status, &error_code); if ((adio_fh->atomicity) && ADIO_Feature(adio_fh, ADIO_LOCKS)) { diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_all.c b/ompi/mca/io/romio314/romio/mpi-io/write_all.c index ab77a95b61f..d0cd8ed7ecc 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_all.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_all.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -112,7 +112,7 @@ int MPIOI_File_write_all(MPI_File fh, xbuf = buf; if (adio_fh->is_external32) { error_code = MPIU_external32_buffer_setup(buf, count, datatype, &e32buf); - if (error_code != MPI_SUCCESS) + if (error_code != MPI_SUCCESS) goto fn_exit; xbuf = e32buf; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_allb.c b/ompi/mca/io/romio314/romio/mpi-io/write_allb.c index 4678477c3bd..be5977cb45b 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_allb.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_allb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -89,7 +89,7 @@ int MPIOI_File_write_all_begin(MPI_File fh, if (adio_fh->split_coll_count) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcoll", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -108,7 +108,7 @@ int MPIOI_File_write_all_begin(MPI_File fh, xbuf = buf; if (adio_fh->is_external32) { error_code = MPIU_external32_buffer_setup(buf, count, datatype, &e32buf); - if (error_code != MPI_SUCCESS) + if (error_code != MPI_SUCCESS) goto fn_exit; xbuf = e32buf; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_alle.c b/ompi/mca/io/romio314/romio/mpi-io/write_alle.c index 8b999a1eb53..79be7975600 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_alle.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_alle.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -69,7 +69,7 @@ int MPIOI_File_write_all_end(MPI_File fh, if (!(adio_fh->split_coll_count)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcollnone", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_at.c b/ompi/mca/io/romio314/romio/mpi-io/write_at.c index 4362322b67b..cc4a2af16e1 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_at.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_at.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_atall.c b/ompi/mca/io/romio314/romio/mpi-io/write_atall.c index 6f815cdd4cb..300fadffee0 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_atall.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_atall.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -45,7 +45,7 @@ Output Parameters: .N fortran @*/ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, ROMIO_CONST void *buf, - int count, MPI_Datatype datatype, + int count, MPI_Datatype datatype, MPI_Status *status) { int error_code; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_ord.c b/ompi/mca/io/romio314/romio/mpi-io/write_ord.c index 60c14f3e803..72d8b085bbd 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_ord.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_ord.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. * */ @@ -92,7 +92,7 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count, /* --BEGIN ERROR HANDLING-- */ if (error_code != MPI_SUCCESS) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, - myname, __LINE__, MPI_ERR_INTERN, + myname, __LINE__, MPI_ERR_INTERN, "**iosharedfailed", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -104,7 +104,7 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count, xbuf = buf; if (adio_fh->is_external32) { error_code = MPIU_external32_buffer_setup(buf, count, datatype, &e32buf); - if (error_code != MPI_SUCCESS) + if (error_code != MPI_SUCCESS) goto fn_exit; xbuf = e32buf; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_ordb.c b/ompi/mca/io/romio314/romio/mpi-io/write_ordb.c index 77bbab030ee..aaacc9ec1a6 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_ordb.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_ordb.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -64,7 +64,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count, if (adio_fh->split_coll_count) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcoll", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -98,7 +98,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count, if (error_code != MPI_SUCCESS) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, - myname, __LINE__, MPI_ERR_INTERN, + myname, __LINE__, MPI_ERR_INTERN, "**iosharedfailed", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -110,7 +110,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count, xbuf = buf; if (adio_fh->is_external32) { error_code = MPIU_external32_buffer_setup(buf, count, datatype, &e32buf); - if (error_code != MPI_SUCCESS) + if (error_code != MPI_SUCCESS) goto fn_exit; xbuf = e32buf; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_orde.c b/ompi/mca/io/romio314/romio/mpi-io/write_orde.c index a0a6eea461c..34617a96df2 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_orde.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_orde.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -55,7 +55,7 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s if (!(adio_fh->split_coll_count)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, - myname, __LINE__, MPI_ERR_IO, + myname, __LINE__, MPI_ERR_IO, "**iosplitcollnone", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; diff --git a/ompi/mca/io/romio314/romio/mpi-io/write_sh.c b/ompi/mca/io/romio314/romio/mpi-io/write_sh.c index fc2b7b23de1..00c90449f5a 100644 --- a/ompi/mca/io/romio314/romio/mpi-io/write_sh.c +++ b/ompi/mca/io/romio314/romio/mpi-io/write_sh.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -95,7 +95,7 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count, if (error_code != MPI_SUCCESS) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, - myname, __LINE__, MPI_ERR_INTERN, + myname, __LINE__, MPI_ERR_INTERN, "**iosharedfailed", 0); error_code = MPIO_Err_return_file(adio_fh, error_code); goto fn_exit; @@ -105,7 +105,7 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count, xbuf = buf; if (adio_fh->is_external32) { error_code = MPIU_external32_buffer_setup(buf, count, datatype, &e32buf); - if (error_code != MPI_SUCCESS) + if (error_code != MPI_SUCCESS) goto fn_exit; xbuf = e32buf; @@ -118,14 +118,14 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count, off = adio_fh->disp + adio_fh->etype_size * shared_fp; /* if atomic mode requested, lock (exclusive) the region, because there - could be a concurrent noncontiguous request. On NFS, locking is + could be a concurrent noncontiguous request. On NFS, locking is done in the ADIO_WriteContig.*/ if ((adio_fh->atomicity) && (adio_fh->file_system != ADIO_NFS)) ADIOI_WRITE_LOCK(adio_fh, off, SEEK_SET, bufsize); ADIO_WriteContig(adio_fh, xbuf, count, datatype, ADIO_EXPLICIT_OFFSET, - off, status, &error_code); + off, status, &error_code); if ((adio_fh->atomicity) && (adio_fh->file_system != ADIO_NFS)) ADIOI_UNLOCK(adio_fh, off, SEEK_SET, bufsize); diff --git a/ompi/mca/io/romio314/romio/mpi2-other/array/Makefile.in b/ompi/mca/io/romio314/romio/mpi2-other/array/Makefile.in index 41a366e398b..89cc636189c 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/array/Makefile.in +++ b/ompi/mca/io/romio314/romio/mpi2-other/array/Makefile.in @@ -44,7 +44,7 @@ all: $(LIBNAME) profile: $(MPIO_REAL_POBJECTS) $(AR) $(LIBNAME) $(MPIO_REAL_POBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ $(MAKE) P$(SHLIBNAME).la ;\ fi @@ -52,10 +52,10 @@ profile: $(MPIO_REAL_POBJECTS) $(LIBNAME): $(MPIO_OBJECTS) $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) -$(SHLIBNAME).la: $(MPIO_LOOBJECTS) +$(SHLIBNAME).la: $(MPIO_LOOBJECTS) $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) # -------------------------------------------------------------------------- @@ -69,7 +69,7 @@ P$(SHLIBNAME).la: $(MPIO_TMP_LOPOBJECTS) clean: @rm -f *.o *.lo *.gcno *.gcda *.bb *.bbg - @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda + @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda @rm -f ${srcdir}/*.bb ${srcdir}/*.bbg # Rules for the profiling objects diff --git a/ompi/mca/io/romio314/romio/mpi2-other/array/darray.c b/ompi/mca/io/romio314/romio/mpi2-other/array/darray.c index 6918c5ec708..0e157a521f7 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/array/darray.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/array/darray.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -42,11 +42,11 @@ Output Parameters: .N fortran @*/ -int MPI_Type_create_darray(int size, int rank, int ndims, - int *array_of_gsizes, int *array_of_distribs, - int *array_of_dargs, int *array_of_psizes, - int order, MPI_Datatype oldtype, - MPI_Datatype *newtype) +int MPI_Type_create_darray(int size, int rank, int ndims, + int *array_of_gsizes, int *array_of_distribs, + int *array_of_dargs, int *array_of_psizes, + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype) { int err, error_code; int i; @@ -108,7 +108,7 @@ int MPI_Type_create_darray(int size, int rank, int ndims, /* array_of_distribs checked below */ - if ((array_of_dargs[i] != MPI_DISTRIBUTE_DFLT_DARG) && + if ((array_of_dargs[i] != MPI_DISTRIBUTE_DFLT_DARG) && (array_of_dargs[i] <= 0)) { error_code = MPIO_Err_create_code(MPI_SUCCESS, @@ -161,7 +161,7 @@ int MPI_Type_create_darray(int size, int rank, int ndims, MPI_Type_extent(oldtype, &orig_extent); -/* check if MPI_Aint is large enough for size of global array. +/* check if MPI_Aint is large enough for size of global array. if not, complain. */ size_with_aint = orig_extent; diff --git a/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/Makefile.in b/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/Makefile.in index 63c8fe5e02a..00a8de8184f 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/Makefile.in +++ b/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/Makefile.in @@ -29,16 +29,16 @@ all: $(LIBNAME) profile: $(MPIO_REAL_PFOBJECTS) $(AR) $(LIBNAME) $(MPIO_REAL_PFOBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) @rm -f _*.o $(LIBNAME): $(MPIO_FOBJECTS) $(AR) $(LIBNAME) $(MPIO_FOBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) -clean: +clean: @rm -f *.o *.lo *.gcno *.gcda *.bb *.bbg - @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda + @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda @rm -f ${srcdir}/*.bb ${srcdir}/*.bbg # Rules for the profiling objects diff --git a/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/darrayf.c b/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/darrayf.c index 7a16bbb3cc8..5048250068e 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/darrayf.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/darrayf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c b/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c index 7a2e54a530b..176c06f9e5b 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/array/subarray.c b/ompi/mca/io/romio314/romio/mpi2-other/array/subarray.c index 69974c75056..11ac7f07387 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/array/subarray.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/array/subarray.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 1997 University of Chicago. +/* + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -38,9 +38,9 @@ Output Parameters: .N fortran @*/ -int MPI_Type_create_subarray(int ndims, int *array_of_sizes, +int MPI_Type_create_subarray(int ndims, int *array_of_sizes, int *array_of_subsizes, int *array_of_starts, - int order, MPI_Datatype oldtype, + int order, MPI_Datatype oldtype, MPI_Datatype *newtype) { MPI_Aint extent, size_with_aint; @@ -130,7 +130,7 @@ int MPI_Type_create_subarray(int ndims, int *array_of_sizes, MPI_Type_extent(oldtype, &extent); -/* check if MPI_Aint is large enough for size of global array. +/* check if MPI_Aint is large enough for size of global array. if not, complain. */ size_with_aint = extent; diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/Makefile.in b/ompi/mca/io/romio314/romio/mpi2-other/info/Makefile.in index b77f08e2b3a..52087ca8196 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/Makefile.in +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/Makefile.in @@ -51,7 +51,7 @@ all: $(LIBNAME) profile: $(MPIO_REAL_POBJECTS) $(AR) $(LIBNAME) $(MPIO_REAL_POBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) @if [ "@ENABLE_SHLIB@" != "none" ] ; then \ $(MAKE) P$(SHLIBNAME).la ;\ fi @@ -59,10 +59,10 @@ profile: $(MPIO_REAL_POBJECTS) $(LIBNAME): $(MPIO_OBJECTS) $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) MPIO_LOOBJECTS = $(MPIO_OBJECTS:.o=.lo) -$(SHLIBNAME).la: $(MPIO_LOOBJECTS) +$(SHLIBNAME).la: $(MPIO_LOOBJECTS) $(AR) $(SHLIBNAME).la $(MPIO_LOOBJECTS) # -------------------------------------------------------------------------- @@ -76,7 +76,7 @@ P$(SHLIBNAME).la: $(MPIO_TMP_LOPOBJECTS) clean: @rm -f *.o *.lo *.gcno *.gcda *.bb *.bbg - @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda + @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda @rm -f ${srcdir}/*.bb ${srcdir}/*.bbg diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/Makefile.in b/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/Makefile.in index c84769c5467..3b9a2df643e 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/Makefile.in +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/Makefile.in @@ -32,16 +32,16 @@ all: $(LIBNAME) profile: $(MPIO_REAL_POBJECTS) $(AR) $(LIBNAME) $(MPIO_REAL_POBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) @rm -f _*.o $(LIBNAME): $(MPIO_OBJECTS) $(AR) $(LIBNAME) $(MPIO_OBJECTS) - $(RANLIB) $(LIBNAME) + $(RANLIB) $(LIBNAME) clean: @rm -f *.o *.lo *.gcno *.gcda *.bb *.bbg - @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda + @rm -f ${srcdir}/*.gcno ${srcdir}/*.gcda @rm -f ${srcdir}/*.bb ${srcdir}/*.bbg # Rules for the profiling objects diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_createf.c b/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_createf.c index 5d01ce93d02..1568ba51e50 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_createf.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_createf.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_deletef.c b/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_deletef.c index f7a7bb4d58e..92a2496caf3 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_deletef.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/fortran/info_deletef.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -97,7 +97,7 @@ void mpi_info_delete_(MPI_Fint *info, char *key, int *ierr, int keylen) /* strip leading and trailing blanks in key */ lead_blanks = 0; - for (i=0; icookie != MPIR_INFO_COOKIE)) + if ((info <= (MPI_Info) 0) || (info->cookie != MPIR_INFO_COOKIE)) return (MPI_Fint) 0; if (!MPIR_Infotable) { MPIR_Infotable_max = 1024; MPIR_Infotable = (MPI_Info *) - ADIOI_Malloc(MPIR_Infotable_max*sizeof(MPI_Info)); - MPIR_Infotable_ptr = 0; /* 0 can't be used though, because + ADIOI_Malloc(MPIR_Infotable_max*sizeof(MPI_Info)); + MPIR_Infotable_ptr = 0; /* 0 can't be used though, because MPI_INFO_NULL=0 */ for (i=0; ikey = 0; (*info)->value = 0; (*info)->next = 0; - /* this is the first structure in this linked list. it is + /* this is the first structure in this linked list. it is always kept empty. new (key,value) pairs are added after it. */ fn_exit: diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_delete.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_delete.c index 06ec27ee8dd..7ee0941591d 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_delete.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_delete.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -63,7 +63,7 @@ int MPI_Info_delete(MPI_Info info, char *key) while (curr) { if (!strcmp(curr->key, key)) { - ADIOI_Free(curr->key); + ADIOI_Free(curr->key); ADIOI_Free(curr->value); prev->next = curr->next; ADIOI_Free(curr); @@ -76,7 +76,7 @@ int MPI_Info_delete(MPI_Info info, char *key) if (!done) { FPRINTF(stderr, "MPI_Info_delete: key not defined in info\n"); - MPI_Abort(MPI_COMM_WORLD, 1); + MPI_Abort(MPI_COMM_WORLD, 1); } return MPI_SUCCESS; diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_dup.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_dup.c index a1c1a9969fc..08b593d8335 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_dup.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_dup.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -58,7 +58,7 @@ int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo) curr_new->key = ADIOI_Strdup(curr_old->key); curr_new->value = ADIOI_Strdup(curr_old->value); curr_new->next = 0; - + curr_old = curr_old->next; } diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_f2c.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_f2c.c index 49d8ae5eec2..ec9e2b67920 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_f2c.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_f2c.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_free.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_free.c index e682ce0cd58..b9238c7e081 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_free.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_free.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_get.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_get.c index ca4274672b5..05125c585fa 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_get.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_get.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnks.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnks.c index fd20826950f..da728d7cb6c 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnks.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnks.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnth.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnth.c index fa325c41cc0..bcb608248f2 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnth.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_getnth.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_getvln.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_getvln.c index b484929b720..363e4dfbc9c 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_getvln.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_getvln.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/mpi2-other/info/info_set.c b/ompi/mca/io/romio314/romio/mpi2-other/info/info_set.c index e60d89d79e5..b52ebc8bfed 100644 --- a/ompi/mca/io/romio314/romio/mpi2-other/info/info_set.c +++ b/ompi/mca/io/romio314/romio/mpi2-other/info/info_set.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * - * Copyright (C) 1997 University of Chicago. + * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -77,7 +77,7 @@ int MPI_Info_set(MPI_Info info, char *key, char *value) while (curr) { if (!strcmp(curr->key, key)) { - ADIOI_Free(curr->value); + ADIOI_Free(curr->value); curr->value = ADIOI_Strdup(value); break; } diff --git a/ompi/mca/io/romio314/romio/test-internal/file_realms_test.c b/ompi/mca/io/romio314/romio/test-internal/file_realms_test.c index b848259e0ef..72cef99d255 100644 --- a/ompi/mca/io/romio314/romio/test-internal/file_realms_test.c +++ b/ompi/mca/io/romio314/romio/test-internal/file_realms_test.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2008 University of Chicago. +/* + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ diff --git a/ompi/mca/io/romio314/romio/test-internal/heap_test.c b/ompi/mca/io/romio314/romio/test-internal/heap_test.c index 2f0041df368..083e1429dd1 100644 --- a/ompi/mca/io/romio314/romio/test-internal/heap_test.c +++ b/ompi/mca/io/romio314/romio/test-internal/heap_test.c @@ -49,7 +49,7 @@ int main(int argc, char **argv) { int test_type = RANDOM; test_params_t predefined_tests[PREDEF_TESTS]; test_params_t test; - + /* parse args */ adding_elements = 0; curr_add_idx = 0; @@ -260,10 +260,10 @@ int run_test(test_params_t *test) { int i, j, k, err_flag = 0; int curr_insert_idx = 0; int curr_extract_idx = 0; - + create_heap(&myheap, test->heap_size); myheap.size = 0; - + extracted = (ADIO_Offset *) malloc(test->heap_size * sizeof(ADIO_Offset)); for (i=0; i < test->action_arr_sz; i++) { for (j=0; jaction_count_arr[i]; j++) { @@ -275,7 +275,7 @@ int run_test(test_params_t *test) { myheap.nodes[k].offset = test->offsets[k]; myheap.nodes[k].proc = k; } - build_heap(&myheap); + build_heap(&myheap); break; case INSERT: ADIOI_Heap_insert(&myheap, test->offsets[curr_insert_idx], @@ -341,7 +341,7 @@ void init_predefined_test(test_params_t *params, int index) { strcpy(params->name, "TEST 1"); params->heap_size = 15; params->action_arr_sz = 3; - + /* allocate space */ params->action_arr = (int *) malloc (params->action_arr_sz*sizeof(int)); @@ -399,7 +399,7 @@ void init_predefined_test(test_params_t *params, int index) { strcpy(params->name, "TEST 1"); params->heap_size = 15; params->action_arr_sz = 3; - + /* allocate space */ params->action_arr = (int *) malloc (params->action_arr_sz*sizeof(int)); @@ -409,7 +409,7 @@ void init_predefined_test(test_params_t *params, int index) { if (params->verify) params->correct_order = (ADIO_Offset *) malloc(params->heap_size*sizeof(ADIO_Offset)); - + /* Set values */ params->offsets[0] = 65; params->offsets[1] = 53; diff --git a/ompi/mca/io/romio314/romio/test-internal/io_bounds_test.c b/ompi/mca/io/romio314/romio/test-internal/io_bounds_test.c index f7514764e42..a4d70a4cfb5 100644 --- a/ompi/mca/io/romio314/romio/test-internal/io_bounds_test.c +++ b/ompi/mca/io/romio314/romio/test-internal/io_bounds_test.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* - * Copyright (C) 2008 University of Chicago. +/* + * Copyright (C) 2008 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -40,7 +40,7 @@ int main (int argc, char **argv) { MPI_Init (&argc, &argv); MPI_Comm_rank (MPI_COMM_WORLD, &rank); - + if (argc != 1) { if (!rank) { printf ("Use only one process\n"); @@ -116,7 +116,7 @@ int run_test (test_param_t *test) { MPI_File_seek (fh, test->offset, MPI_SEEK_SET); ADIOI_Calc_bounds ((ADIO_File) fh, test->count, MPI_BYTE, ADIO_INDIVIDUAL, - test->offset, &st_offset, &end_offset); + test->offset, &st_offset, &end_offset); ind_err = 0; if (st_offset != test->correct_st_offset) { @@ -173,7 +173,7 @@ int print_usage () " io_bounds_test -A -T \n"); } -int print_test_params (test_param_t *test) +int print_test_params (test_param_t *test) { int i; printf ( @@ -181,7 +181,7 @@ int print_test_params (test_param_t *test) "bytes: %d\n" "Filetype [n](disp, lens, type):\n", test->offset, test->count); - + for (i=0; itype_count; i++) { printf ( " [%d](%lld, %d, ", diff --git a/ompi/mca/io/romio314/romio/test/.codingcheck b/ompi/mca/io/romio314/romio/test/.codingcheck index 0d0a655fa81..823ebd28ea7 100644 --- a/ompi/mca/io/romio314/romio/test/.codingcheck +++ b/ompi/mca/io/romio314/romio/test/.codingcheck @@ -1,10 +1,10 @@ # -# We allow these routines for the romio test programs -%romioTestRoutines = ( +# We allow these routines for the romio test programs +%romioTestRoutines = ( 'printf' => sys, 'fprintf' => sys , 'sprintf' => sys, 'vprintf' => sys, - 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, + 'strcpy' => sys, 'strncpy' => sys, 'strcat' => sys, 'malloc' => sys, 'free' => sys, 'calloc' => sys, 'strdup' => sys, - 'assert' => sys, 'snprintf' => sys, + 'assert' => sys, 'snprintf' => sys, ); if (defined(&PushAllowFuncNames)) { &PushAllowFuncNames( "romioTestRoutines", "tree", "add" ); diff --git a/ompi/mca/io/romio314/romio/test/Makefile.am b/ompi/mca/io/romio314/romio/test/Makefile.am index caa5be91e7a..74940cd8a90 100644 --- a/ompi/mca/io/romio314/romio/test/Makefile.am +++ b/ompi/mca/io/romio314/romio/test/Makefile.am @@ -26,7 +26,7 @@ CTESTS = simple perf async coll_test coll_perf misc file_info excl large_array \ atomicity noncontig i_noncontig noncontig_coll split_coll shared_fp \ large_file psimple error status noncontig_coll2 aggregation1 aggregation2 \ async-multiple ordered_fp hindexed external32 types_with_zeros darray_read -FTESTS = fcoll_test fperf fmisc pfcoll_test +FTESTS = fcoll_test fperf fmisc pfcoll_test noinst_PROGRAMS = $(CTESTS) diff --git a/ompi/mca/io/romio314/romio/test/Mfile.in b/ompi/mca/io/romio314/romio/test/Mfile.in index c2e1c298259..6b432ac10df 100644 --- a/ompi/mca/io/romio314/romio/test/Mfile.in +++ b/ompi/mca/io/romio314/romio/test/Mfile.in @@ -24,7 +24,7 @@ srcdir = @srcdir@ @VPATH@ PROFLIB = -CFLAGS = @CFLAGS@ @DEFS@ $(OPTFLAGS) +CFLAGS = @CFLAGS@ @DEFS@ $(OPTFLAGS) CCFLAGS = $(CFLAGS) FFLAGS = $(OPTFLAGS) @FFLAGS@ # Use LIBS to add any special libraries for C programs @@ -32,18 +32,18 @@ LIBS = @LIB_PATH@ @LIB_LIST@ # Use FLIBS to add any special libraries for Fortran programs FLIBS = @FLIB_PATH@ @LIB_LIST@ @F77EXTRALIBS@ EXECS = $(CTESTS) $(FTESTS) -OTHEREXECS = +OTHEREXECS = CTESTS = simple perf async coll_test coll_perf misc file_info excl \ large_array \ atomicity noncontig i_noncontig noncontig_coll split_coll shared_fp \ large_file psimple error status noncontig_coll2 -FTESTS = fcoll_test fperf fmisc pfcoll_test +FTESTS = fcoll_test fperf fmisc pfcoll_test default: $(EXECS) # # Note that runtests builds the executables as required -testing: +testing: -./runtests $(TESTARGS) all: testing @@ -62,7 +62,7 @@ fcoll_test: fcoll_test.f fmisc: fmisc.f $(F77) $(USER_FFLAGS) -o fmisc fmisc.f $(FLIBS) -pfcoll_test: pfcoll_test.f +pfcoll_test: pfcoll_test.f $(F77) $(USER_FFLAGS) -o pfcoll_test pfcoll_test.f $(FLIBS) # diff --git a/ompi/mca/io/romio314/romio/test/README b/ompi/mca/io/romio314/romio/test/README index dbab8e393d4..15a24804b42 100644 --- a/ompi/mca/io/romio314/romio/test/README +++ b/ompi/mca/io/romio314/romio/test/README @@ -1,9 +1,9 @@ -This directory contains a few example programs. +This directory contains a few example programs. Each program takes the filename as a command-line argument -"-fname filename". +"-fname filename". -If you are using "mpirun" to run an MPI program, you can run the +If you are using "mpirun" to run an MPI program, you can run the program "simple" with two processes as follows: mpirun -np 2 simple -fname test @@ -22,9 +22,9 @@ perf.c: A simple read and write performance test. Each process writes reads it back. For a different access size, change the value of SIZE in the code. The bandwidth is reported for two cases: (1) without including MPI_File_sync and (2) including - MPI_File_sync. - -async.c: This program is the same as simple.c, except that it uses + MPI_File_sync. + +async.c: This program is the same as simple.c, except that it uses asynchronous I/O. coll_test.c: This program tests the use of collective I/O. It writes @@ -42,8 +42,8 @@ coll_perf.c: Measures the I/O bandwidth for writing/reading a 3D misc.c: Tests various miscellaneous MPI-IO functions -atomicity.c: Tests whether atomicity semantics are satisfied for - overlapping accesses in atomic mode. The probability of detecting +atomicity.c: Tests whether atomicity semantics are satisfied for + overlapping accesses in atomic mode. The probability of detecting errors is higher if you run it on 8 or more processes. large_file.c: Tests access to large files. Writes a 4-Gbyte file and @@ -53,20 +53,20 @@ large_file.c: Tests access to large files. Writes a 4-Gbyte file and large_array.c: Tests writing and reading a 4-Gbyte distributed array using the distributed array datatype constructor. Works only on file systems that support 64-bit file sizes and MPI implementations - that support 64-bit MPI_Aint. + that support 64-bit MPI_Aint. -file_info.c: Tests the setting and retrieval of hints via +file_info.c: Tests the setting and retrieval of hints via MPI_File_set_info and MPI_File_get_info excl.c: Tests MPI_File_open with MPI_MODE_EXCL -noncontig.c: Tests noncontiguous accesses in memory and file using +noncontig.c: Tests noncontiguous accesses in memory and file using independent I/O. Run it on two processes only. noncontig_coll.c: Same as noncontig.c, but uses collective I/O -noncontig_coll2.c: Same as noncontig_coll.c, but exercises the - cb_config_list hint and aggregation handling more. +noncontig_coll2.c: Same as noncontig_coll.c, but exercises the + cb_config_list hint and aggregation handling more. i_noncontig.c: Same as noncontig.c, but uses nonblocking I/O @@ -78,7 +78,7 @@ fperf.f: Fortran version of perf.c fcoll_test.f: Fortran version of coll_test.c -pfcoll_test.f: Same as fcoll_test.f but uses the PMPI versions of +pfcoll_test.f: Same as fcoll_test.f but uses the PMPI versions of all MPI routines fmisc.f: Fortran version of misc.c diff --git a/ompi/mca/io/romio314/romio/test/aggregation1.c b/ompi/mca/io/romio314/romio/test/aggregation1.c index dee42d60a5c..9b4a76acd16 100644 --- a/ompi/mca/io/romio314/romio/test/aggregation1.c +++ b/ompi/mca/io/romio314/romio/test/aggregation1.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2007 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -15,7 +15,7 @@ #include #define NUM_OBJS 4 -#define OBJ_SIZE 1048576 +#define OBJ_SIZE 1048576 extern char *optarg; extern int optind, opterr, optopt; @@ -29,7 +29,7 @@ Usage( int line ) { int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); if ( rank == 0 ) { - fprintf( stderr, + fprintf( stderr, "Usage (line %d): %s [-d] [-h] -f filename\n" "\t-d for debugging\n" "\t-h to turn on the hints to force collective aggregation\n", @@ -61,7 +61,7 @@ print_hints( int rank, MPI_File *mfh ) { for( i = 0; i < nkeys; i++ ) { MPI_Info_get_nthkey( info, i, key ); printf( "%35s -> ", key ); - MPI_Info_get( info, key, 1024, value, &dummy_int ); + MPI_Info_get( info, key, 1024, value, &dummy_int ); printf( "%s\n", value ); } MPI_Info_free(&info); @@ -93,10 +93,10 @@ write_file( char *target, int rank, MPI_Info *info ) { buffer = malloc(OBJ_SIZE); if ( debug ) printf( "%d writing file %s\n", rank, target ); - - if( (mpi_ret = MPI_File_open(MPI_COMM_WORLD, target, + + if( (mpi_ret = MPI_File_open(MPI_COMM_WORLD, target, MPI_MODE_WRONLY | MPI_MODE_CREATE, *info, &wfh ) ) - != MPI_SUCCESS ) + != MPI_SUCCESS ) { fatal_error( mpi_ret, NULL, "open for write" ); } @@ -106,7 +106,7 @@ write_file( char *target, int rank, MPI_Info *info ) { fill_buffer( buffer, OBJ_SIZE, rank, offset ); if ( debug ) printf( "%s", buffer ); if ( (mpi_ret = MPI_File_write_at_all( wfh, offset, buffer, OBJ_SIZE, - MPI_CHAR, &mpi_stat ) ) != MPI_SUCCESS ) + MPI_CHAR, &mpi_stat ) ) != MPI_SUCCESS ) { fatal_error( mpi_ret, &mpi_stat, "write" ); } @@ -125,7 +125,7 @@ static int reduce_corruptions( int corrupt_blocks ) { int mpi_ret; int sum; - if ( ( mpi_ret = MPI_Reduce( &corrupt_blocks, &sum, 1, + if ( ( mpi_ret = MPI_Reduce( &corrupt_blocks, &sum, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD ) ) != MPI_SUCCESS ) { fatal_error( mpi_ret, NULL, "MPI_Reduce" ); @@ -145,9 +145,9 @@ read_file( char *target, int rank, MPI_Info *info, int *corrupt_blocks ) { verify_buf = (char *)malloc(OBJ_SIZE); if ( debug ) printf( "%d reading file %s\n", rank, target ); - - if( (mpi_ret = MPI_File_open(MPI_COMM_WORLD, target, - MPI_MODE_RDONLY, *info, &rfh ) ) != MPI_SUCCESS ) + + if( (mpi_ret = MPI_File_open(MPI_COMM_WORLD, target, + MPI_MODE_RDONLY, *info, &rfh ) ) != MPI_SUCCESS ) { fatal_error( mpi_ret, NULL, "open for read" ); } @@ -157,7 +157,7 @@ read_file( char *target, int rank, MPI_Info *info, int *corrupt_blocks ) { fill_buffer( verify_buf, OBJ_SIZE, rank, offset ); if ( debug ) printf( "Expecting %s", buffer ); if ( (mpi_ret = MPI_File_read_at_all( rfh, offset, buffer, OBJ_SIZE, - MPI_CHAR, &mpi_stat ) ) != MPI_SUCCESS ) + MPI_CHAR, &mpi_stat ) ) != MPI_SUCCESS ) { fatal_error( mpi_ret, &mpi_stat, "read" ); } @@ -182,9 +182,9 @@ read_file( char *target, int rank, MPI_Info *info, int *corrupt_blocks ) { static void set_hints( MPI_Info *info ) { - MPI_Info_set( *info, "romio_cb_write", "enable" ); - MPI_Info_set( *info, "romio_no_indep_rw", "1" ); - MPI_Info_set( *info, "cb_nodes", "1" ); + MPI_Info_set( *info, "romio_cb_write", "enable" ); + MPI_Info_set( *info, "romio_no_indep_rw", "1" ); + MPI_Info_set( *info, "cb_nodes", "1" ); MPI_Info_set( *info, "cb_buffer_size", "4194304" ); } @@ -199,7 +199,7 @@ set_hints( MPI_Info *info, char *hints ) { val = strtok( NULL, delimiter ); if ( debug ) printf( "HINT: %s = %s\n", key, val ); if ( ! val ) { - Usage( __LINE__ ); + Usage( __LINE__ ); } MPI_Info_set( *info, key, val ); key = strtok( NULL, delimiter ); @@ -208,7 +208,7 @@ set_hints( MPI_Info *info, char *hints ) { } */ -int +int main( int argc, char *argv[] ) { int nproc = 1, rank = 0; char *target = NULL; diff --git a/ompi/mca/io/romio314/romio/test/aggregation2.c b/ompi/mca/io/romio314/romio/test/aggregation2.c index a35ebe0caf5..8108b466e42 100644 --- a/ompi/mca/io/romio314/romio/test/aggregation2.c +++ b/ompi/mca/io/romio314/romio/test/aggregation2.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2007 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -29,7 +29,7 @@ static void handle_error(int errcode, const char *str) MPI_Abort(MPI_COMM_WORLD, 1); } -int main(int argc, char ** argv) +int main(int argc, char ** argv) { MPI_Info info = MPI_INFO_NULL; MPI_File fh; @@ -51,19 +51,19 @@ int main(int argc, char ** argv) } off = rank*sizeof(buffer); - errcode = MPI_File_open(MPI_COMM_WORLD, argv[1], + errcode = MPI_File_open(MPI_COMM_WORLD, argv[1], MPI_MODE_WRONLY|MPI_MODE_CREATE, info, &fh); if (errcode != MPI_SUCCESS) handle_error(errcode, "MPI_File_open"); - errcode = MPI_File_write_at_all(fh, off, buffer, BUFSIZE, + errcode = MPI_File_write_at_all(fh, off, buffer, BUFSIZE, MPI_INT, &status); if (errcode != MPI_SUCCESS) handle_error(errcode, "MPI_File_write_at_all"); errcode = MPI_File_close(&fh); if (errcode != MPI_SUCCESS) handle_error(errcode, "MPI_File_close"); - errcode = MPI_File_open(MPI_COMM_WORLD, argv[1], + errcode = MPI_File_open(MPI_COMM_WORLD, argv[1], MPI_MODE_RDONLY, info, &fh); if (errcode != MPI_SUCCESS) handle_error(errcode, "MPI_File_open"); - errcode = MPI_File_read_at_all(fh, off, buf2, BUFSIZE, + errcode = MPI_File_read_at_all(fh, off, buf2, BUFSIZE, MPI_INT, &status); if (errcode != MPI_SUCCESS) handle_error(errcode, "MPI_File_read_at_all"); errcode = MPI_File_close(&fh); diff --git a/ompi/mca/io/romio314/romio/test/async-multiple.c b/ompi/mca/io/romio314/romio/test/async-multiple.c index ec9726ce55d..f52c95a4daf 100644 --- a/ompi/mca/io/romio314/romio/test/async-multiple.c +++ b/ompi/mca/io/romio314/romio/test/async-multiple.c @@ -1,6 +1,6 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- * vim: ts=8 sts=4 sw=4 noexpandtab - * + * * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -14,11 +14,11 @@ /* Uses asynchronous I/O. Each process writes to separate files and reads them back. The file name is taken as a command-line argument, - and the process rank is appended to it.*/ + and the process rank is appended to it.*/ void handle_error(int errcode, const char *str); -void handle_error(int errcode, const char *str) +void handle_error(int errcode, const char *str) { char msg[MPI_MAX_ERROR_STRING]; int resultlen; @@ -39,7 +39,7 @@ int main(int argc, char **argv) MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!rank) { i = 1; @@ -74,14 +74,14 @@ int main(int argc, char **argv) strcpy(tmp, filename); sprintf(filename, "%s.%d", tmp, rank); - errcode = MPI_File_open(MPI_COMM_SELF, filename, + errcode = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); if (errcode != MPI_SUCCESS) { handle_error(errcode, "MPI_File_open"); } MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); - for (i=0; i /* tests whether atomicity semantics are satisfied for overlapping accesses - in atomic mode. The probability of detecting errors is higher if you run + in atomic mode. The probability of detecting errors is higher if you run it on 8 or more processes. */ /* The file name is taken as a command-line argument. */ @@ -30,7 +30,7 @@ int main(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &mynod); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -63,7 +63,7 @@ int main(int argc, char **argv) /* initialize file to all zeros */ if (!mynod) { MPI_File_delete(filename, MPI_INFO_NULL); - MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | + MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); for (i=0; i - */ + * yet :> + */ #include @@ -16,10 +16,10 @@ #include #include -#define CHECK(fn) {int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, NULL); } +#define CHECK(fn) {int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, NULL); } -static void handle_error(int errcode, char *str) +static void handle_error(int errcode, char *str) { char msg[MPI_MAX_ERROR_STRING]; int resultlen; @@ -28,7 +28,7 @@ static void handle_error(int errcode, char *str) MPI_Abort(MPI_COMM_WORLD, 1); } -static void typestats(MPI_Datatype type) +static void typestats(MPI_Datatype type) { MPI_Aint lb, extent; MPI_Count size; @@ -41,7 +41,7 @@ static void typestats(MPI_Datatype type) } -static int verify_type(char *filename, MPI_Datatype type, +static int verify_type(char *filename, MPI_Datatype type, int64_t expected_extent, int do_coll) { int rank, canary; @@ -53,10 +53,10 @@ static int verify_type(char *filename, MPI_Datatype type, MPI_Comm_rank(MPI_COMM_WORLD, &rank); - CHECK( MPI_File_open(MPI_COMM_WORLD, filename, + CHECK( MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE|MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); - CHECK( MPI_File_set_view(fh, rank*sizeof(int), - MPI_BYTE, type, "native", MPI_INFO_NULL)); + CHECK( MPI_File_set_view(fh, rank*sizeof(int), + MPI_BYTE, type, "native", MPI_INFO_NULL)); MPI_Type_size_x(type, &tsize); @@ -69,14 +69,14 @@ static int verify_type(char *filename, MPI_Datatype type, CHECK( MPI_File_write_at(fh, tsize, &canary, 1, MPI_INT, &status)); } - CHECK( MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", - MPI_INFO_NULL)); + CHECK( MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", + MPI_INFO_NULL)); if (do_coll) { - CHECK( MPI_File_read_at_all(fh, expected_extent/sizeof(int)+rank, + CHECK( MPI_File_read_at_all(fh, expected_extent/sizeof(int)+rank, &compare, 1, MPI_INT, &status)); } else { - CHECK( MPI_File_read_at(fh, expected_extent/sizeof(int)+rank, + CHECK( MPI_File_read_at(fh, expected_extent/sizeof(int)+rank, &compare, 1, MPI_INT, &status)); } @@ -92,7 +92,7 @@ static int verify_type(char *filename, MPI_Datatype type, } else { if (rank == 0) MPI_File_delete(filename, MPI_INFO_NULL); } - + return (toterrs); } @@ -105,14 +105,14 @@ static int testtype(char *filename, MPI_Datatype type, int64_t expected_extent) MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (!rank) typestats(type); - ret = verify_type(filename, type, expected_extent, nocollective); + ret = verify_type(filename, type, expected_extent, nocollective); if (ret) { errs++; fprintf(stderr, "type %d failed indep\n", type); - } else + } else if (!rank) printf("indep: OK "); - ret = verify_type(filename, type, expected_extent, collective); + ret = verify_type(filename, type, expected_extent, collective); if (ret) { errs++; fprintf(stderr, "type %d failed collective\n", type); @@ -133,7 +133,7 @@ int main(int argc, char **argv) int subs[2]; int starts[2]; - MPI_Datatype baseindex, indexed1G, indexed3G, indexed6G; + MPI_Datatype baseindex, indexed1G, indexed3G, indexed6G; MPI_Datatype subarray1G, subarray3G, subarray6G; int ret, rank; @@ -166,7 +166,7 @@ int main(int argc, char **argv) MPI_Type_contiguous(6144, baseindex, &indexed6G); MPI_Type_commit(&indexed6G); - /* TODO: + /* TODO: * - add a darray test * - add a test with crazy extents */ sizes[0] = 1024*16; @@ -174,17 +174,17 @@ int main(int argc, char **argv) subs[0] = subs[1] = 256; starts[0] = starts[1] = 0; - MPI_Type_create_subarray(ndims, sizes, subs, starts, + MPI_Type_create_subarray(ndims, sizes, subs, starts, MPI_ORDER_C, MPI_INT, &subarray1G); MPI_Type_commit(&subarray1G); sizes[1] = 1024*16*3; - MPI_Type_create_subarray(ndims, sizes, subs, starts, + MPI_Type_create_subarray(ndims, sizes, subs, starts, MPI_ORDER_C, MPI_INT, &subarray3G); MPI_Type_commit(&subarray3G); sizes[1] = 1024*16*6; - MPI_Type_create_subarray(ndims, sizes, subs, starts, + MPI_Type_create_subarray(ndims, sizes, subs, starts, MPI_ORDER_C, MPI_INT, &subarray6G); MPI_Type_commit(&subarray6G); @@ -202,11 +202,11 @@ int main(int argc, char **argv) ret = testtype(argv[1], subarray6G, (int64_t)1024*1024*1024*6); if(!ret && !rank) fprintf(stderr, " No Errors\n"); - + MPI_Finalize(); return (-ret); } -/* - * vim: ts=8 sts=4 sw=4 noexpandtab +/* + * vim: ts=8 sts=4 sw=4 noexpandtab */ diff --git a/ompi/mca/io/romio314/romio/test/coll_perf.c b/ompi/mca/io/romio314/romio/test/coll_perf.c index 0f9042d5ff5..f576e85d5a9 100644 --- a/ompi/mca/io/romio314/romio/test/coll_perf.c +++ b/ompi/mca/io/romio314/romio/test/coll_perf.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -14,7 +14,7 @@ block-distributed array to a file corresponding to the global array in row-major (C) order. Note that the file access pattern is noncontiguous. - + Array size 128^3. For other array sizes, change array_of_gsizes below.*/ @@ -35,7 +35,7 @@ int main(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &mynod); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -91,7 +91,7 @@ int main(int argc, char **argv) /* to eliminate paging effects, do the operations once but don't time them */ - MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, + MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); MPI_File_write_all(fh, buf, bufcount, MPI_INT, &status); @@ -102,7 +102,7 @@ int main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); /* now time write_all */ - MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, + MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); @@ -124,8 +124,8 @@ int main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); /* now time read_all */ - MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, - MPI_INFO_NULL, &fh); + MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, + MPI_INFO_NULL, &fh); MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); MPI_Barrier(MPI_COMM_WORLD); diff --git a/ompi/mca/io/romio314/romio/test/coll_test.c b/ompi/mca/io/romio314/romio/test/coll_test.c index 4efc4d25b02..b7aeda221bc 100644 --- a/ompi/mca/io/romio314/romio/test/coll_test.c +++ b/ompi/mca/io/romio314/romio/test/coll_test.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -17,7 +17,7 @@ /* The file name is taken as a command-line argument. */ /* Note that the file access pattern is noncontiguous. */ - + void handle_error(int errcode, const char *str); void handle_error(int errcode, const char *str) @@ -49,7 +49,7 @@ int main(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &mynod); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -94,7 +94,7 @@ int main(int argc, char **argv) for (i=0; i #include #include -/* +/* * the new defered open code made some changes to the way we manage CREAT|EXCL, * so test out that code path */ @@ -19,7 +19,7 @@ struct options { typedef struct options options; -void handle_error(int errcode, char *str) +void handle_error(int errcode, char *str) { char msg[MPI_MAX_ERROR_STRING]; int resultlen; @@ -28,7 +28,7 @@ void handle_error(int errcode, char *str) MPI_Abort(MPI_COMM_WORLD, 1); } -void parse_args(int argc, char ** argv, int rank, options *opts) +void parse_args(int argc, char ** argv, int rank, options *opts) { int i, len=0; if (rank == 0) { diff --git a/ompi/mca/io/romio314/romio/test/darray_read.c b/ompi/mca/io/romio314/romio/test/darray_read.c index e4eb709e8e1..418ae4c9ea0 100644 --- a/ompi/mca/io/romio314/romio/test/darray_read.c +++ b/ompi/mca/io/romio314/romio/test/darray_read.c @@ -19,9 +19,9 @@ static void handle_error(int errcode, const char *str) } -int main(int argc, char *argv[]) -{ - int i, j, nerrors=0, total_errors=0; +int main(int argc, char *argv[]) +{ + int i, j, nerrors=0, total_errors=0; int rank, size; int bpos; @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) int tsize, nelem; MPI_File dfile; - + MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); @@ -121,4 +121,4 @@ int main(int argc, char *argv[]) exit(total_errors); -} +} diff --git a/ompi/mca/io/romio314/romio/test/error.c b/ompi/mca/io/romio314/romio/test/error.c index ee24e964596..c7aaca61da8 100644 --- a/ompi/mca/io/romio314/romio/test/error.c +++ b/ompi/mca/io/romio314/romio/test/error.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -29,7 +29,7 @@ int main(int argc, char **argv) } #endif -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!rank) { i = 1; @@ -53,7 +53,7 @@ int main(int argc, char **argv) filename = (char *) malloc(len+10); MPI_Bcast(filename, len+10, MPI_CHAR, 0, MPI_COMM_WORLD); } - + /* each process opens a separate file called filename.'myrank' */ tmp = (char *) malloc(len+10); strcpy(tmp, filename); @@ -61,11 +61,11 @@ int main(int argc, char **argv) err = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, &fh); - err = MPI_File_set_view(fh, -1, MPI_BYTE, MPI_BYTE, "native", + err = MPI_File_set_view(fh, -1, MPI_BYTE, MPI_BYTE, "native", MPI_INFO_NULL); /* disp is deliberately passed as -1 */ - /* This test is designed for ROMIO specifically and tests for a + /* This test is designed for ROMIO specifically and tests for a specific error message */ if (err != MPI_SUCCESS) { MPI_Error_string(err, string, &len); @@ -102,5 +102,5 @@ int main(int argc, char **argv) } MPI_Finalize(); - return 0; + return 0; } diff --git a/ompi/mca/io/romio314/romio/test/excl.c b/ompi/mca/io/romio314/romio/test/excl.c index e48bb3deee5..5deef15779a 100644 --- a/ompi/mca/io/romio314/romio/test/excl.c +++ b/ompi/mca/io/romio314/romio/test/excl.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -20,7 +20,7 @@ int main(int argc, char **argv) MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!rank) { i = 1; @@ -44,13 +44,13 @@ int main(int argc, char **argv) filename = (char *) malloc(len+10); MPI_Bcast(filename, len+10, MPI_CHAR, 0, MPI_COMM_WORLD); } - + if (!rank) MPI_File_delete(filename, MPI_INFO_NULL); MPI_Barrier(MPI_COMM_WORLD); /* this open should succeed */ - err = MPI_File_open(MPI_COMM_WORLD, filename, + err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_EXCL | MPI_MODE_RDWR, MPI_INFO_NULL , &fh); if (err != MPI_SUCCESS) { errs++; @@ -61,7 +61,7 @@ int main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); /* this open should fail */ - err = MPI_File_open(MPI_COMM_WORLD, filename, + err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_EXCL | MPI_MODE_RDWR, MPI_INFO_NULL , &fh); if (err == MPI_SUCCESS) { errs++; @@ -80,5 +80,5 @@ int main(int argc, char **argv) free(filename); MPI_Finalize(); - return 0; + return 0; } diff --git a/ompi/mca/io/romio314/romio/test/external32.c b/ompi/mca/io/romio314/romio/test/external32.c index bca3555ae86..17a886cf0da 100644 --- a/ompi/mca/io/romio314/romio/test/external32.c +++ b/ompi/mca/io/romio314/romio/test/external32.c @@ -1,6 +1,6 @@ /* * This code was written by Intel Corporation. Copyright (C) 2011-2012 Intel Corporation. - * Intel provides this material to Argonne National Laboratory subject to + * Intel provides this material to Argonne National Laboratory subject to * Software Grant and Corporate Contributor License Agreement dated February 8, 2012. * * See COPYRIGHT in top-level directory. @@ -60,14 +60,14 @@ int main( int argc, char* argv[] ) { for( i = 0; i < 3; i++ ) { /* Open file */ - CHECK(MPI_File_open( MPI_COMM_WORLD, TEST_FILENAME, + CHECK(MPI_File_open( MPI_COMM_WORLD, TEST_FILENAME, MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fileh ) ); /* Set view */ CHECK(MPI_File_set_view( fileh, 0, MPI_INT, MPI_INT, datarep[i], MPI_INFO_NULL )); /* Write into file */ - CHECK(MPI_File_write_at( fileh, (MPI_Offset)rank, (void*)&sample_i, 1, + CHECK(MPI_File_write_at( fileh, (MPI_Offset)rank, (void*)&sample_i, 1, MPI_INT, MPI_STATUS_IGNORE )); /* Close file */ diff --git a/ompi/mca/io/romio314/romio/test/fcoll_test.f.in b/ompi/mca/io/romio314/romio/test/fcoll_test.f.in index 9c2b172218d..57551d5a6a3 100644 --- a/ompi/mca/io/romio314/romio/test/fcoll_test.f.in +++ b/ompi/mca/io/romio314/romio/test/fcoll_test.f.in @@ -1,5 +1,5 @@ -! -*- Mode: Fortran; -*- -! +! -*- Mode: Fortran; -*- +! ! (C) 2001 by Argonne National Laboratory. ! See COPYRIGHT in top-level directory. ! @@ -11,7 +11,7 @@ ! Fortran equivalent of coll_test.c - integer FILESIZE + integer FILESIZE parameter (FILESIZE=32*32*32*4) ! A 32^3 array. For other array sizes, change FILESIZE above and @@ -22,7 +22,7 @@ ! back, and checks that the data read is correct. ! Note that the file access pattern is noncontiguous. - + integer newtype, i, ndims, array_of_gsizes(3) integer order, intsize, nprocs, j, array_of_distribs(3) integer array_of_dargs(3), array_of_psizes(3) @@ -39,7 +39,7 @@ call MPI_COMM_SIZE(MPI_COMM_WORLD, nprocs, ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, mynod, ierr) -! process 0 takes the file name as a command-line argument and +! process 0 takes the file name as a command-line argument and ! broadcasts it to other processes if (mynod .eq. 0) then @@ -61,14 +61,14 @@ @F77GETARG@ call MPI_BCAST(str, 1024, MPI_CHARACTER, 0, & & MPI_COMM_WORLD, ierr) - else + else call MPI_BCAST(str, 1024, MPI_CHARACTER, 0, & & MPI_COMM_WORLD, ierr) end if ! create the distributed array filetype - + ndims = 3 order = MPI_ORDER_FORTRAN @@ -96,12 +96,12 @@ call MPI_TYPE_COMMIT(newtype, ierr) -! initialize writebuf +! initialize writebuf call MPI_TYPE_SIZE(newtype, bufcount, ierr) call MPI_TYPE_SIZE(MPI_INTEGER, intsize, ierr) bufcount = bufcount/intsize - do i=1, bufcount + do i=1, bufcount writebuf(i) = 1 end do @@ -132,7 +132,7 @@ call MPI_FILE_OPEN(MPI_COMM_WORLD, str, & & MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr) - disp = 0 + disp = 0 call MPI_FILE_SET_VIEW(fh, disp, MPI_INTEGER, newtype, "native", & & MPI_INFO_NULL, ierr) call MPI_FILE_WRITE_ALL(fh, writebuf, bufcount, MPI_INTEGER, & @@ -143,7 +143,7 @@ call MPI_FILE_OPEN(MPI_COMM_WORLD, str, & & MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr) - + call MPI_FILE_SET_VIEW(fh, disp, MPI_INTEGER, newtype, "native", & & MPI_INFO_NULL, ierr) call MPI_FILE_READ_ALL(fh, readbuf, bufcount, MPI_INTEGER, & @@ -161,7 +161,7 @@ call MPI_TYPE_FREE(newtype, ierr) call MPI_Allreduce( errs, toterrs, 1, MPI_INTEGER, MPI_SUM, & - $ MPI_COMM_WORLD, ierr ) + $ MPI_COMM_WORLD, ierr ) if (mynod .eq. 0) then if( toterrs .gt. 0 ) then print *, 'Found ', toterrs, ' errors' diff --git a/ompi/mca/io/romio314/romio/test/file_info.c b/ompi/mca/io/romio314/romio/test/file_info.c index fba618974fc..066915f88d2 100644 --- a/ompi/mca/io/romio314/romio/test/file_info.c +++ b/ompi/mca/io/romio314/romio/test/file_info.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -44,10 +44,10 @@ hint_defaults UFS_DEFAULTS = { }; hint_defaults BLUEGENE_DEFAULTS = { - .cb_buffer_size = 16777216, - .ind_rd_buffer_size = 4194304, - .ind_wr_buffer_size = 4194304, - .romio_cb_read = "enable", + .cb_buffer_size = 16777216, + .ind_rd_buffer_size = 4194304, + .ind_wr_buffer_size = 4194304, + .romio_cb_read = "enable", .romio_cb_write = "enable", .cb_config_list = NULL}; @@ -76,7 +76,7 @@ int main(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &mynod); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -119,7 +119,7 @@ int main(int argc, char **argv) /* open the file with MPI_INFO_NULL */ - ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, + ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); if (ret != MPI_SUCCESS) handle_error(ret, "MPI_File_open"); @@ -132,8 +132,8 @@ int main(int argc, char **argv) MPI_Info_get_nthkey(info_used, i, key); MPI_Info_get(info_used, key, MPI_MAX_INFO_VAL-1, value, &flag); #ifdef INFO_DEBUG - if (!mynod) - fprintf(stderr, "Process %d, Default: key = %s, value = %s\n", mynod, + if (!mynod) + fprintf(stderr, "Process %d, Default: key = %s, value = %s\n", mynod, key, value); #endif if (!strcmp("striping_factor", key)) { @@ -249,13 +249,13 @@ int main(int argc, char **argv) MPI_Info_set(info, "ind_wr_buffer_size", "1048576"); -/* The following three hints related to file striping are accepted only - on Intel PFS and IBM PIOFS file systems and are ignored elsewhere. - They can be specified only at file-creation time; if specified later +/* The following three hints related to file striping are accepted only + on Intel PFS and IBM PIOFS file systems and are ignored elsewhere. + They can be specified only at file-creation time; if specified later they will be ignored. */ /* number of I/O devices across which the file will be striped. - accepted only if 0 < value < default_striping_factor; + accepted only if 0 < value < default_striping_factor; ignored otherwise */ if (default_striping_factor - 1 > 0) { sprintf(value, "%d", default_striping_factor-1); @@ -275,18 +275,18 @@ int main(int argc, char **argv) #endif /* the I/O device number from which to start striping the file. - accepted only if 0 <= value < default_striping_factor; + accepted only if 0 <= value < default_striping_factor; ignored otherwise */ sprintf(value, "%d", default_striping_factor-2); MPI_Info_set(info, "start_iodevice", value); -/* The following hint about PFS server buffering is accepted only on - Intel PFS. It can be specified anytime. */ +/* The following hint about PFS server buffering is accepted only on + Intel PFS. It can be specified anytime. */ MPI_Info_set(info, "pfs_svr_buf", "true"); /* open the file and set new info */ - ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, + ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); if (ret != MPI_SUCCESS) handle_error(ret, "MPI_File_open"); @@ -298,8 +298,8 @@ int main(int argc, char **argv) for (i=0; i #include -/* Writes a 4-Gbyte distributed array, reads it back, and then deletes the +/* Writes a 4-Gbyte distributed array, reads it back, and then deletes the file. Uses collective I/O. */ /* The file name is taken as a command-line argument. */ /* Run it only on a machine with sufficient memory and a file system on which ROMIO supports large files, i.e., PIOFS, XFS, SFS, and HFS */ -/* This program will work only if the MPI implementation defines MPI_Aint +/* This program will work only if the MPI implementation defines MPI_Aint as a 64-bit integer. */ - + int main(int argc, char **argv) { MPI_Datatype newtype; @@ -35,7 +35,7 @@ int main(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &mynod); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -78,7 +78,7 @@ int main(int argc, char **argv) for (i=0; i #include -/* writes a file of size 4 Gbytes and reads it back. +/* writes a file of size 4 Gbytes and reads it back. should be run on one process only*/ /* The file name is taken as a command-line argument. */ -/* Can be used only on file systems on which ROMIO supports large files, +/* Can be used only on file systems on which ROMIO supports large files, i.e., PIOFS, XFS, SFS, and HFS. */ - + #define SIZE 1048576*4 /* no. of long longs in each write/read */ #define NTIMES 128 /* no. of writes/reads */ @@ -63,7 +63,7 @@ int main(int argc, char **argv) for (i=0; irefct = 1; + array->refct = 1; if (commrank == 0) { /* process 0 keeps the real list */ @@ -102,7 +102,7 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp) procname = array->names; /* simpler to read */ procname_len = (int *) ADIOI_Malloc(commsize * sizeof(int)); - if (procname_len == NULL) { + if (procname_len == NULL) { return -1; } } @@ -112,7 +112,7 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp) array->names = NULL; } /* gather lengths first */ - MPI_Gather(&my_procname_len, 1, MPI_INT, + MPI_Gather(&my_procname_len, 1, MPI_INT, procname_len, 1, MPI_INT, 0, comm); if (commrank == 0) { @@ -125,7 +125,7 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp) for (i=0; i < commsize; i++) { /* add one to the lengths because we need to count the * terminator, and we are going to use this list of lengths - * again in the gatherv. + * again in the gatherv. */ procname_len[i]++; procname[i] = malloc(procname_len[i]); @@ -133,12 +133,12 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp) return -1; } } - + /* create our list of displacements for the gatherv. we're going * to do everything relative to the start of the region allocated * for procname[0] * - * I suppose it is theoretically possible that the distance between + * I suppose it is theoretically possible that the distance between * malloc'd regions could be more than will fit in an int. We don't * cover that case. */ @@ -152,7 +152,7 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp) /* now gather strings */ if (commrank == 0) { - MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, + MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, procname[0], procname_len, disp, MPI_CHAR, 0, comm); } @@ -160,7 +160,7 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp) /* if we didn't do this, we would need to allocate procname[] * on all processes...which seems a little silly. */ - MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, + MPI_Gatherv(my_procname, my_procname_len + 1, MPI_CHAR, NULL, NULL, NULL, MPI_CHAR, 0, comm); } @@ -195,7 +195,7 @@ void default_str(int mynod, int len, ADIO_cb_name_array array, char *dest) } MPI_Bcast(dest, len, MPI_CHAR, 0, MPI_COMM_WORLD); } -void reverse_str(int mynod, int len, ADIO_cb_name_array array, char *dest) +void reverse_str(int mynod, int len, ADIO_cb_name_array array, char *dest) { char *ptr; int i, p; @@ -261,10 +261,10 @@ int main(int argc, char **argv) MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); - MPI_Comm_rank(MPI_COMM_WORLD, &mynod); + MPI_Comm_rank(MPI_COMM_WORLD, &mynod); + - - /* process 0 takes the file name as a command-line argument and + /* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -323,7 +323,7 @@ int main(int argc, char **argv) errs += test_file(filename, mynod, nprocs, cb_config_string, "collective w/ hinting: default order", verbose); /* reverse order */ - reverse_str(mynod, cb_config_len, array, cb_config_string); + reverse_str(mynod, cb_config_len, array, cb_config_string); errs += test_file(filename, mynod, nprocs, cb_config_string, "collective w/ hinting: reverse order", verbose); /* reverse, every other */ @@ -335,7 +335,7 @@ int main(int argc, char **argv) errs += test_file(filename, mynod, nprocs, cb_config_string, "collective w/ hinting: permutation2", verbose); MPI_Allreduce(&errs, &sum_errs, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); - + if (!mynod) { if (sum_errs) fprintf(stderr, "Found %d error cases\n", sum_errs); else printf(" No Errors\n"); @@ -348,7 +348,7 @@ int main(int argc, char **argv) #define SEEDER(x,y,z) ((x)*1000000 + (y) + (x)*(z)) -int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, const char *msg, int verbose) +int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, const char *msg, int verbose) { MPI_Datatype typevec, newtype, t[3]; int *buf, i, b[3], errcode, errors=0; @@ -394,7 +394,7 @@ int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, const char } MPI_Barrier(MPI_COMM_WORLD); - errcode = MPI_File_open(MPI_COMM_WORLD, filename, + errcode = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); if (errcode != MPI_SUCCESS) { handle_error(errcode, "MPI_File_open"); @@ -418,7 +418,7 @@ int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, const char } /* the verification for N compute nodes is tricky. Say we have 3 - * processors. + * processors. * process 0 sees: 0 -1 -1 3 -1 -1 ... * process 1 sees: -1 34 -1 -1 37 -1 ... * process 2 sees: -1 -1 68 -1 -1 71 ... */ @@ -436,7 +436,7 @@ int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, const char for(/* 'i' set in above loop */; i #include -/* A simple performance test. The file name is taken as a +/* A simple performance test. The file name is taken as a command-line argument. */ #define SIZE (1048576*4) /* read/write size per node in bytes */ @@ -26,7 +26,7 @@ int main(int argc, char **argv) MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Comm_rank(MPI_COMM_WORLD, &mynod); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!mynod) { i = 1; @@ -56,7 +56,7 @@ int main(int argc, char **argv) buf = (int *) malloc(SIZE); for (j=0; j ${bfile}.tout if diff -b $bfile.tout $stdfile > /dev/null ; then true - elif [ -s $stdfile2 ] ; then + elif [ -s $stdfile2 ] ; then # check for alternate in case configuration has fewer datatypes if diff -b $bfile.tout $stdfile2 > /dev/null ; then true @@ -150,7 +150,7 @@ RunTest() { rm -rf $FILENAME* echo "**** Testing ${1}.c ****" mpirun -np 4 ./${1} -fname $FILENAME "$@" >>${1}.out 2>1 - CheckOutput ${1} + CheckOutput ${1} CleanExe ${1} } @@ -194,13 +194,13 @@ $mpirun -np 4 ./async-multiple -fname $FILENAME CleanExe async-multiple # OutTime -if [ $subset_only -eq 0 ] ; then +if [ $subset_only -eq 0 ] ; then testfiles="$testfiles atomicity.out" \rm -f atomicity.out MakeExe atomicity \rm -f $FILENAME* echo '**** Testing atomicity.c ****' - # Atomicity test recommends at least 8 processes (separate processors + # Atomicity test recommends at least 8 processes (separate processors # even better) $mpirun -np 4 ./atomicity -fname $FILENAME # CheckOutput atomicity @@ -300,7 +300,7 @@ CleanExe hindexed # -offm 4 -hints romio_cb_write enable -fname $FILENAME #CleanExe write_all_test OutTime -if [ $subset_only -eq 0 ] ; then +if [ $subset_only -eq 0 ] ; then testfiles="$testfiles misc.out" \rm -f misc.out MakeExe misc @@ -387,7 +387,7 @@ echo '**** Testing darray_read ****' $mpirun -np 4 ./darray_read $FILENAME CleanExe darray_read # -if [ @NOF77@ = 0 ] ; then +if [ @NOF77@ = 0 ] ; then echo "" echo "FORTRAN TESTS" OutTime @@ -439,7 +439,7 @@ fi # nodiff=1 # for file in $testfiles ; do # stdfile="${srcdir}/std/`basename $file .out`.std" -# # if basename is sendrecv or isndrcv, then we may want to test +# # if basename is sendrecv or isndrcv, then we may want to test # # with .std2 as well. We should really separate out the long double # # tests ... # if [ -s $stdfile ] ; then @@ -450,7 +450,7 @@ fi # grep -v 'FORTRAN STOP' ${file} > ${bfile} # if diff -b $bfile $stdfile > /dev/null ; then # true -# elif [ -s $stdfile2 ] ; then +# elif [ -s $stdfile2 ] ; then # # check for alternate in case configuration has fewer datatypes # if diff -b $bfile $stdfile2 > /dev/null ; then # true @@ -476,4 +476,4 @@ fi # echo "-- No differences found; test successful" # fi exit 0 - + diff --git a/ompi/mca/io/romio314/romio/test/shared_fp.c b/ompi/mca/io/romio314/romio/test/shared_fp.c index df41bdd818d..26f3770c8bc 100644 --- a/ompi/mca/io/romio314/romio/test/shared_fp.c +++ b/ompi/mca/io/romio314/romio/test/shared_fp.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ -/* +/* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ @@ -12,7 +12,7 @@ void handle_error(int errcode, const char *str); -void handle_error(int errcode, const char *str) +void handle_error(int errcode, const char *str) { char msg[MPI_MAX_ERROR_STRING]; int resultlen; @@ -34,7 +34,7 @@ int main(int argc, char **argv) MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); -/* process 0 takes the file name as a command-line argument and +/* process 0 takes the file name as a command-line argument and broadcasts it to other processes */ if (!rank) { i = 1; @@ -58,7 +58,7 @@ int main(int argc, char **argv) filename = (char *) malloc(len+10); MPI_Bcast(filename, len+10, MPI_CHAR, 0, MPI_COMM_WORLD); } - + buf = (int *) malloc(COUNT * sizeof(int)); MPI_Comm_rank(MPI_COMM_WORLD, &rank); @@ -66,7 +66,7 @@ int main(int argc, char **argv) for (i=0; i /* - * This program tests to see if fcntl returns success when asked to + * This program tests to see if fcntl returns success when asked to * establish a file lock. This test is intended for use on file systems * such as NFS that may not implement file locks. ROMIO makes use * of file locks to implement certain operations, and may not work - * properly if file locks are not available. + * properly if file locks are not available. * * This is a simple test and has at least two limitations: - * - * 1. Some implementations of NFS are known to return success for + * + * 1. Some implementations of NFS are known to return success for * setting a file lock when in fact no lock has been set. This * test will not detect such erroneous implementations of NFS * * 2. Some implementations will hang (enter and wait indefinitately) * within the fcntl call. This program will also hang in that case. - * Under normal conditions, this program should only take a few seconds to + * Under normal conditions, this program should only take a few seconds to * run. * * The program prints a message showing the success or failure of @@ -48,7 +48,7 @@ int main( int argc, char *argv[] ) filename = "conftest.dat"; } - + lock.l_type = F_WRLCK; lock.l_start = 0; lock.l_whence = SEEK_SET; diff --git a/ompi/mca/io/romio314/romio/util/romioinstall.in b/ompi/mca/io/romio314/romio/util/romioinstall.in index 95a63092315..e80027a2a57 100644 --- a/ompi/mca/io/romio314/romio/util/romioinstall.in +++ b/ompi/mca/io/romio314/romio/util/romioinstall.in @@ -2,7 +2,7 @@ # # This script needs to be built by configure. # -# This is a script to install ROMIO. It can be invoked with +# This is a script to install ROMIO. It can be invoked with # make install # # (if you used -prefix at configure time) or, @@ -47,8 +47,8 @@ failmode=soft # Shell procedures to copy files and create directories # -# We could use install, but install is too different and too hard to -# test. So here are the routines to copy file, make directories, and +# We could use install, but install is too different and too hard to +# test. So here are the routines to copy file, make directories, and # replace #...# and @...@ in files CP=cp # @@ -72,14 +72,14 @@ elif [ -d $1 ] ; then echo ">>> $1 is a directory; not copied <<<" errs=`expr $errs + 1` if [ $failmode = "hard" ] ; then exit 1 ; fi -elif [ ! -f $1 ] ; then +elif [ ! -f $1 ] ; then echo "**File $1 does not exist (or is not a regular file)!" errs=`expr $errs + 1` if [ $failmode = "hard" ] ; then exit 1 ; fi else if [ $verbose = 1 ] ; then echo "Copying $1 to $dest" ; fi # We don't delete the file in the event that we are copying the - # file over itself (we SHOULD check for that separately, by checking + # file over itself (we SHOULD check for that separately, by checking # that directories are distinct) #if [ -f $dest ] ; then $Show rm -f $dest ; fi $Show $CP $1 $dest @@ -111,7 +111,7 @@ CopyFileP() { # for arg in "$@" ; do - case "$arg" in + case "$arg" in -prefix=*) PREFIX=`echo $arg | sed -e 's/-prefix=//'` prefix=$PREFIX @@ -132,7 +132,7 @@ if test -z "$prefix" ; then fi # Uninstall filename -if [ -z "$UNINSTALLFILE" ] ; then +if [ -z "$UNINSTALLFILE" ] ; then UNINSTALLFILE="$sbindir/romiouninstall" MkDir `dirname $UNINSTALLFILE` fi @@ -162,13 +162,13 @@ if test "$WANT_INSTALL" = "1"; then #cp -r $ROMIO_HOME/lib $PREFIX #chmod 755 $PREFIX/lib for file in $TOP_BUILD_DIR/lib/* ; do - if [ -f $file ] ; then - CopyFileP $file $libdir + if [ -f $file ] ; then + CopyFileP $file $libdir fi done - # Romio also copies directories in the lib directory. + # Romio also copies directories in the lib directory. - if [ -z "$mandir" ] ; then + if [ -z "$mandir" ] ; then mandir=$PREFIX/man fi echo "copying directory $ROMIO_HOME/man to $mandir" @@ -182,7 +182,7 @@ if test "$WANT_INSTALL" = "1"; then echo "copying directory $ROMIO_HOME/test to $exampledir" MkDir $exampledir MkDir $exampledir/std - for file in $ROMIO_HOME/test/std/* ; do + for file in $ROMIO_HOME/test/std/* ; do CopyFile $file $exampledir/std done CopyFile test/Makefile $exampledir @@ -201,9 +201,9 @@ if test "$WANT_INSTALL" = "1"; then NEWLIB=`echo $TMPNEWLIB | sed 's/\//\\\\\//g'` sed -e 5s/INCLUDE_DIR[\ ]*=\ [/a-z0-9.A-Z_-]*/INCLUDE_DIR\ =\ $NEWINC/ \ -e 6s/LIBS[\ ]*=\ [/a-z0-9.A-Z_-]*/LIBS\ =\ $NEWLIB/ $exampledir/Makefile\ - > $exampledir/.romiotmp + > $exampledir/.romiotmp mv $exampledir/.romiotmp $exampledir/Makefile - + # MkDir $sbindir echo "rm -f $UNINSTALLFILE" >> $UNINSTALLFILE diff --git a/ompi/mca/io/romio314/romio/util/tarch b/ompi/mca/io/romio314/romio/util/tarch index ccccf4d514a..bc077f31a7c 100755 --- a/ompi/mca/io/romio314/romio/util/tarch +++ b/ompi/mca/io/romio314/romio/util/tarch @@ -55,7 +55,7 @@ for LARCH in $ARCHLIST ; do case $LARCH in SUPER-UX) FARCH=SX4; break ;; AIX|RIOS) FARCH=rs6000; break ;; - HP-UX) + HP-UX) if [ -a /dev/kmem ] ; then FARCH=hpux ; else @@ -68,9 +68,9 @@ for LARCH in $ARCHLIST ; do GARCH=$LARCH ;; sun4*) Version=`$UNAME -r` - # In "improving" SunOS, the useful feature of "substr" was withdrawn - # from expr. Can't let the users have life too easy, can we? This - # means that we can't just use + # In "improving" SunOS, the useful feature of "substr" was withdrawn + # from expr. Can't let the users have life too easy, can we? This + # means that we can't just use # set MajorVersion = `expr substr $Version 1 1` # because it won't work on Solaris systems. The following should work # on both: @@ -93,8 +93,8 @@ for LARCH in $ARCHLIST ; do break ;; mips|dec-5000) FARCH=dec5000 ; break ;; - next) FARCH=NeXT ; break ;; - KSR1|KSR2) FARCH=ksr ; break ;; + next) FARCH=NeXT ; break ;; + KSR1|KSR2) FARCH=ksr ; break ;; FreeBSD) FARCH=freebsd ; break ;; OpenBSD) FARCH=openbsd ; break ;; NetBSD) FARCH=netbsd ; break ;; diff --git a/ompi/mca/mca.h b/ompi/mca/mca.h index d297c453eac..f9e4ea341a4 100644 --- a/ompi/mca/mca.h +++ b/ompi/mca/mca.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,13 +14,13 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** - * @file +/** + * @file * * Top-level interface for \em all orte MCA components. */ diff --git a/ompi/mca/mtl/Makefile.am b/ompi/mca/mtl/Makefile.am index 5a9ac3fe577..310261b8f5f 100644 --- a/ompi/mca/mtl/Makefile.am +++ b/ompi/mca/mtl/Makefile.am @@ -5,15 +5,15 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/mtl/base/Makefile.am b/ompi/mca/mtl/base/Makefile.am index 73bfda0c6c7..fb63092ea20 100644 --- a/ompi/mca/mtl/base/Makefile.am +++ b/ompi/mca/mtl/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/mtl/base/base.h b/ompi/mca/mtl/base/base.h index 4f553711104..47c72519406 100644 --- a/ompi/mca/mtl/base/base.h +++ b/ompi/mca/mtl/base/base.h @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -32,7 +32,7 @@ BEGIN_C_DECLS OMPI_DECLSPEC extern mca_mtl_base_component_t* ompi_mtl_base_selected_component; - + OMPI_DECLSPEC int ompi_mtl_base_select(bool enable_progress_threads, bool enable_mpi_threads); diff --git a/ompi/mca/mtl/base/mtl_base_datatype.h b/ompi/mca/mtl/base/mtl_base_datatype.h index 0d515e2b8ad..41559245745 100644 --- a/ompi/mca/mtl/base/mtl_base_datatype.h +++ b/ompi/mca/mtl/base/mtl_base_datatype.h @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,7 +39,7 @@ ompi_mtl_datatype_pack(struct opal_convertor_t *convertor, uint32_t iov_count = 1; #if !(OPAL_ENABLE_HETEROGENEOUS_SUPPORT) - if (convertor->pDesc && + if (convertor->pDesc && !(convertor->flags & CONVERTOR_COMPLETED) && opal_datatype_is_contiguous_memory_layout(convertor->pDesc, convertor->count)) { @@ -63,9 +63,9 @@ ompi_mtl_datatype_pack(struct opal_convertor_t *convertor, if (NULL == iov.iov_base) return OMPI_ERR_OUT_OF_RESOURCE; *freeAfter = true; } - + opal_convertor_pack( convertor, &iov, &iov_count, buffer_len ); - + *buffer = iov.iov_base; return OMPI_SUCCESS; @@ -89,7 +89,7 @@ ompi_mtl_datatype_recv_buf(struct opal_convertor_t *convertor, *buffer = malloc(*buffer_len); *free_on_error = true; } else { - *buffer = convertor->pBaseBuf + + *buffer = convertor->pBaseBuf + convertor->use_desc->desc[convertor->use_desc->used].end_loop.first_elem_disp; } return OMPI_SUCCESS; diff --git a/ompi/mca/mtl/base/mtl_base_frame.c b/ompi/mca/mtl/base/mtl_base_frame.c index d49a8e5c508..6f85ae1d7ae 100644 --- a/ompi/mca/mtl/base/mtl_base_frame.c +++ b/ompi/mca/mtl/base/mtl_base_frame.c @@ -5,16 +5,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -66,7 +66,7 @@ ompi_mtl_base_select(bool enable_progress_threads, return ret; } - opal_output_verbose( 10, ompi_mtl_base_framework.framework_output, + opal_output_verbose( 10, ompi_mtl_base_framework.framework_output, "select: initializing %s component %s", best_component->mtl_version.mca_type_name, best_component->mtl_version.mca_component_name ); @@ -86,10 +86,10 @@ ompi_mtl_base_select(bool enable_progress_threads, /* All done */ if (NULL == ompi_mtl) { - opal_output_verbose( 10, ompi_mtl_base_framework.framework_output, + opal_output_verbose( 10, ompi_mtl_base_framework.framework_output, "select: no component selected"); } else { - opal_output_verbose( 10, ompi_mtl_base_framework.framework_output, + opal_output_verbose( 10, ompi_mtl_base_framework.framework_output, "select: component %s selected", ompi_mtl_base_selected_component-> mtl_version.mca_component_name ); diff --git a/ompi/mca/mtl/configure.m4 b/ompi/mca/mtl/configure.m4 index b3ae21dcde1..3ba838b4ae2 100644 --- a/ompi/mca/mtl/configure.m4 +++ b/ompi/mca/mtl/configure.m4 @@ -3,9 +3,9 @@ # Copyright (c) 2013 Sandia National Laboratories. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/mtl/mtl.h b/ompi/mca/mtl/mtl.h index 5a0c0cb33eb..47acaa96b1b 100644 --- a/ompi/mca/mtl/mtl.h +++ b/ompi/mca/mtl/mtl.h @@ -6,9 +6,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,7 +48,7 @@ struct ompi_request_t; struct opal_convertor_t; struct mca_mtl_base_module_t; - + struct mca_mtl_request_t { /** pointer to associated ompi_request_t */ struct ompi_request_t *ompi_req; @@ -75,18 +75,18 @@ typedef struct mca_mtl_request_t mca_mtl_request_t; * user and the component must be capable of coping * with threads. If the component can cope with * MPI_THREAD_MULTIPLE, enable_mpi_thread_multiple - * should be set to true. Otherwise, it is assumed + * should be set to true. Otherwise, it is assumed * that only THREAD_FUNNELLED and THREAD_SERIALIZED * can be used. * @param enable_mpi_thread_multiple (OUT) Component does / does not * support MPI_THREAD_MULTIPLE. This variable only - * needs to be set if enable_mpi_threads is true. + * needs to be set if enable_mpi_threads is true. * Otherwise, the return value will be ignored. * * @retval NULL component can not operate on the current machine * @retval non-NULL component interface function */ -typedef struct mca_mtl_base_module_t* +typedef struct mca_mtl_base_module_t* (*mca_mtl_base_component_init_fn_t)(bool enable_progress_threads, bool enable_mpi_threads); @@ -101,25 +101,25 @@ typedef struct mca_mtl_base_component_2_0_0_t mca_mtl_base_component_t; /** - * MCA->MTL Clean up any resources held by MTL module - * + * MCA->MTL Clean up any resources held by MTL module + * * Opposite of module_init. Called when communication will no longer * be necessary. ussually this is during MPI_FINALIZE, but it can be * earlier if the component was not selected to run. Assuming * module_init was called, finalize will always be called before the * component_close function is called. - * + * * @param mtl (IN) MTL module returned from call to initialize * * @retval OMPI_SUCCESS cleanup finished successfully * @retval other failure during cleanup - * + * */ typedef int (*mca_mtl_base_module_finalize_fn_t)(struct mca_mtl_base_module_t* mtl); /** - * PML->MTL notification of change in the process list. + * PML->MTL notification of change in the process list. * * The mca_mtl_base_module_add_procs_fn_t() is used by the PML to * notify the MTL that new processes are connected to the current @@ -144,7 +144,7 @@ typedef int (*mca_mtl_base_module_finalize_fn_t)(struct mca_mtl_base_module_t* m * @retval other failure during setup */ typedef int (*mca_mtl_base_module_add_procs_fn_t)( - struct mca_mtl_base_module_t* mtl, + struct mca_mtl_base_module_t* mtl, size_t nprocs, struct ompi_proc_t** procs); @@ -166,7 +166,7 @@ typedef int (*mca_mtl_base_module_add_procs_fn_t)( * @return Status indicating if cleanup was successful */ typedef int (*mca_mtl_base_module_del_procs_fn_t)( - struct mca_mtl_base_module_t* mtl, + struct mca_mtl_base_module_t* mtl, size_t nprocs, struct ompi_proc_t** procs); @@ -185,7 +185,7 @@ typedef int (*mca_mtl_base_module_del_procs_fn_t)( * @param comm (IN) Communicator used for operation * @param dest (IN) Destination rank for send (relative to comm) * @param tag (IN) MPI tag used for sending. See note below. - * @param convertor (IN) Datatype convertor describing send datatype. + * @param convertor (IN) Datatype convertor describing send datatype. * Already prepared for send. * @param mode (IN) Mode for send operation * @@ -202,7 +202,7 @@ typedef int (*mca_mtl_base_module_del_procs_fn_t)( * if a negative tag is used. */ typedef int (*mca_mtl_base_module_send_fn_t)( - struct mca_mtl_base_module_t* mtl, + struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t *comm, int dest, int tag, @@ -229,11 +229,11 @@ typedef int (*mca_mtl_base_module_send_fn_t)( * @param comm (IN) Communicator used for operation * @param dest (IN) Destination rank for send (relative to comm) * @param tag (IN) MPI tag used for sending. See note below. - * @param convertor (IN) Datatype convertor describing send datatype. + * @param convertor (IN) Datatype convertor describing send datatype. * Already prepared for send. * @param mode (IN) Mode for send operation (see pml.h) - * @param blocking (IN) True if the call originated from a blocking - * call, but the PML decided to use a + * @param blocking (IN) True if the call originated from a blocking + * call, but the PML decided to use a * non-blocking operation, likely for * internal performance decisions This is an * optimization flag and is not needed for @@ -250,7 +250,7 @@ typedef int (*mca_mtl_base_module_send_fn_t)( * if a negative tag is used. */ typedef int (*mca_mtl_base_module_isend_fn_t)( - struct mca_mtl_base_module_t* mtl, + struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t *comm, int dest, int tag, @@ -277,7 +277,7 @@ typedef int (*mca_mtl_base_module_isend_fn_t)( * @param comm (IN) Communicator used for operation * @param src (IN) Source rank for send (relative to comm) * @param tag (IN) MPI tag used for sending. See note below. - * @param convertor (IN) Datatype convertor describing receive datatype. + * @param convertor (IN) Datatype convertor describing receive datatype. * Already prepared for receive. * @param mtl_request (IN) Pointer to mtl_request. The ompi_req field * will be populated with an initialized @@ -310,7 +310,7 @@ typedef int (*mca_mtl_base_module_irecv_fn_t)( * @param src (IN) Source rank for send (relative to comm) * @param tag (IN) MPI tag used for sending. See note below. * @param flag (OUT) true if message available, false otherwise - * @param status (OUT) Status structure for information on + * @param status (OUT) Status structure for information on * available message * * \note While MPI does not allow users to specify negative tags, they @@ -320,7 +320,7 @@ typedef int (*mca_mtl_base_module_irecv_fn_t)( * against negative tags. */ typedef int (*mca_mtl_base_module_iprobe_fn_t)( - struct mca_mtl_base_module_t* mtl, + struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t *comm, int src, int tag, @@ -357,7 +357,7 @@ typedef int (*mca_mtl_base_module_improbe_fn_t)(struct mca_mtl_base_module_t *mt * */ typedef int (*mca_mtl_base_module_cancel_fn_t)( - struct mca_mtl_base_module_t* mtl, + struct mca_mtl_base_module_t* mtl, mca_mtl_request_t *mtl_request, int flag); diff --git a/ompi/mca/mtl/mxm/help-mtl-mxm.txt b/ompi/mca/mtl/mxm/help-mtl-mxm.txt index 99e086c6817..32a06782c62 100644 --- a/ompi/mca/mtl/mxm/help-mtl-mxm.txt +++ b/ompi/mca/mtl/mxm/help-mtl-mxm.txt @@ -16,18 +16,18 @@ the environment). [unable to create endpoint] MXM was unable to create an endpoint. Please make sure that the network link is -active on the node and the hardware is functioning. +active on the node and the hardware is functioning. Error: %s [unable to extract endpoint ptl address] -MXM was unable to read settings for endpoint +MXM was unable to read settings for endpoint PTL ID: %d Error: %s [unable to extract endpoint address] -MXM was unable to read settings for endpoint +MXM was unable to read settings for endpoint Error: %s diff --git a/ompi/mca/mtl/mxm/mtl_mxm_component.c b/ompi/mca/mtl/mxm/mtl_mxm_component.c index 9b5e9b66179..6347e81cd22 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm_component.c +++ b/ompi/mca/mtl/mxm/mtl_mxm_component.c @@ -191,9 +191,9 @@ static int ompi_mtl_mxm_component_open(void) cur_ver = mxm_get_version(); if (cur_ver != MXM_API) { MXM_VERBOSE(1, - "WARNING: OMPI was compiled with MXM version %d.%d but version %ld.%ld detected.", + "WARNING: OMPI was compiled with MXM version %d.%d but version %ld.%ld detected.", MXM_VERNO_MAJOR, - MXM_VERNO_MINOR, + MXM_VERNO_MINOR, (cur_ver >> MXM_MAJOR_BIT) & 0xff, (cur_ver >> MXM_MINOR_BIT) & 0xff); } diff --git a/ompi/mca/mtl/mxm/mtl_mxm_endpoint.c b/ompi/mca/mtl/mxm/mtl_mxm_endpoint.c index cb8df9d0221..6fe543a0002 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm_endpoint.c +++ b/ompi/mca/mtl/mxm/mtl_mxm_endpoint.c @@ -14,7 +14,7 @@ #include "mtl_mxm.h" #include "mtl_mxm_types.h" -#include "mtl_mxm_endpoint.h" +#include "mtl_mxm_endpoint.h" /* * Initialize state of the endpoint instance. diff --git a/ompi/mca/mtl/mxm/mtl_mxm_send.c b/ompi/mca/mtl/mxm/mtl_mxm_send.c index 9d72621c219..0f5c0c9b42f 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm_send.c +++ b/ompi/mca/mtl/mxm/mtl_mxm_send.c @@ -16,7 +16,7 @@ #include "mtl_mxm_request.h" #include "ompi/mca/mtl/base/mtl_base_datatype.h" -static inline __opal_attribute_always_inline__ +static inline __opal_attribute_always_inline__ size_t ompi_mtl_mxm_stream_pack(opal_convertor_t *convertor, void *buffer, size_t length, size_t offset) { @@ -58,7 +58,7 @@ static inline __opal_attribute_always_inline__ int size_t *buffer_len = &mxm_send_req->base.data.buffer.length; #if !(OPAL_ENABLE_HETEROGENEOUS_SUPPORT) - if (convertor->pDesc && + if (convertor->pDesc && opal_datatype_is_contiguous_memory_layout(convertor->pDesc, convertor->count)) { mxm_send_req->base.data.buffer.ptr = convertor->pBaseBuf; @@ -211,7 +211,7 @@ int ompi_mtl_mxm_isend(struct mca_mtl_base_module_t* mtl, mxm_send_req->opcode = MXM_REQ_OP_SEND; if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS) { mxm_send_req->base.flags |= MXM_REQ_FLAG_SEND_SYNC; - } + } #else #if defined(MXM_REQ_SEND_FLAG_REENTRANT) mxm_send_req->flags = MXM_REQ_SEND_FLAG_REENTRANT; diff --git a/ompi/mca/mtl/ofi/configure.m4 b/ompi/mca/mtl/ofi/configure.m4 index 436083ea66d..627298dcda6 100644 --- a/ompi/mca/mtl/ofi/configure.m4 +++ b/ompi/mca/mtl/ofi/configure.m4 @@ -25,7 +25,7 @@ AC_DEFUN([MCA_ompi_mtl_ofi_CONFIG],[ # ensure we already ran the common libfabric config AC_REQUIRE([MCA_opal_common_libfabric_CONFIG]) - + AS_IF([test "$opal_common_libfabric_happy" = "yes"], [$1], [$2]) diff --git a/ompi/mca/mtl/portals4/Makefile.am b/ompi/mca/mtl/portals4/Makefile.am index 7294515f752..1693ff435d7 100644 --- a/ompi/mca/mtl/portals4/Makefile.am +++ b/ompi/mca/mtl/portals4/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2010-2012 Sandia National Laboratories. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/mtl/portals4/configure.m4 b/ompi/mca/mtl/portals4/configure.m4 index 260051d7984..23ecbebd504 100644 --- a/ompi/mca/mtl/portals4/configure.m4 +++ b/ompi/mca/mtl/portals4/configure.m4 @@ -6,16 +6,16 @@ # 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, +# 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) 2013 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,7 +26,7 @@ AC_DEFUN([MCA_ompi_mtl_portals4_POST_CONFIG], [ AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([PORTALS4])]) ])dnl -# MCA_mtl_portals4_CONFIG(action-if-can-compile, +# MCA_mtl_portals4_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_mtl_portals4_CONFIG],[ diff --git a/ompi/mca/mtl/portals4/mtl_portals4.c b/ompi/mca/mtl/portals4/mtl_portals4.c index f7e14b6d1b8..70673a2accc 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4.c +++ b/ompi/mca/mtl/portals4/mtl_portals4.c @@ -85,8 +85,8 @@ portals4_init_interface(void) /* Create send and long message (read) portal table entries */ ret = PtlPTAlloc(ompi_mtl_portals4.ni_h, - PTL_PT_ONLY_USE_ONCE | - PTL_PT_ONLY_TRUNCATE | + PTL_PT_ONLY_USE_ONCE | + PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, ompi_mtl_portals4.recv_eq_h, REQ_RECV_TABLE_ID, @@ -132,7 +132,7 @@ portals4_init_interface(void) ret = PtlMDBind(ompi_mtl_portals4.ni_h, &md, - &ompi_mtl_portals4.zero_md_h); + &ompi_mtl_portals4.zero_md_h); if (PTL_OK != ret) { opal_output_verbose(1, ompi_mtl_base_framework.framework_output, "%s:%d: PtlMDBind failed: %d\n", @@ -163,9 +163,9 @@ portals4_init_interface(void) me.ct_handle = PTL_CT_NONE; me.min_free = 0; me.uid = ompi_mtl_portals4.uid; - me.options = PTL_ME_OP_PUT | + me.options = PTL_ME_OP_PUT | PTL_ME_EVENT_LINK_DISABLE | - PTL_ME_EVENT_COMM_DISABLE | + PTL_ME_EVENT_COMM_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE; if (ompi_mtl_portals4.use_logical) { me.match_id.rank = PTL_RANK_ANY; @@ -174,8 +174,8 @@ portals4_init_interface(void) me.match_id.phys.pid = PTL_PID_ANY; } me.match_bits = MTL_PORTALS4_LONG_MSG; - me.ignore_bits = MTL_PORTALS4_CONTEXT_MASK | - MTL_PORTALS4_SOURCE_MASK | + me.ignore_bits = MTL_PORTALS4_CONTEXT_MASK | + MTL_PORTALS4_SOURCE_MASK | MTL_PORTALS4_TAG_MASK; ret = PtlMEAppend(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.recv_idx, @@ -275,7 +275,7 @@ ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t *mtl, "Portals 4 MTL does not support heterogeneous operations."); opal_output_verbose(1, ompi_mtl_base_framework.framework_output, "Proc %s architecture %x, mine %x.", - OMPI_NAME_PRINT(&procs[i]->super.proc_name), + OMPI_NAME_PRINT(&procs[i]->super.proc_name), procs[i]->super.proc_arch, ompi_proc_local()->super.proc_arch); return OMPI_ERR_NOT_SUPPORTED; } @@ -382,7 +382,7 @@ ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t *mtl, int ompi_mtl_portals4_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, - struct ompi_proc_t** procs) + struct ompi_proc_t** procs) { size_t i; diff --git a/ompi/mca/mtl/portals4/mtl_portals4.h b/ompi/mca/mtl/portals4/mtl_portals4.h index 77b9b4de6d4..6d7fd596d56 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4.h +++ b/ompi/mca/mtl/portals4/mtl_portals4.h @@ -212,11 +212,11 @@ extern mca_mtl_portals4_module_t ompi_mtl_portals4; /* MTL interface functions */ extern int ompi_mtl_portals4_finalize(struct mca_mtl_base_module_t *mtl); -extern int ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t* mtl, +extern int ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t* mtl, size_t nprocs, struct ompi_proc_t** procs); -extern int ompi_mtl_portals4_del_procs(struct mca_mtl_base_module_t* mtl, +extern int ompi_mtl_portals4_del_procs(struct mca_mtl_base_module_t* mtl, size_t nprocs, struct ompi_proc_t** procs); diff --git a/ompi/mca/mtl/portals4/mtl_portals4_cancel.c b/ompi/mca/mtl/portals4/mtl_portals4_cancel.c index 70a5110793d..1e2e5a43ddf 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_cancel.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_cancel.c @@ -20,7 +20,7 @@ ompi_mtl_portals4_cancel(struct mca_mtl_base_module_t* mtl, mca_mtl_request_t *mtl_request, int flag) { - ompi_mtl_portals4_base_request_t *base_request = + ompi_mtl_portals4_base_request_t *base_request = (ompi_mtl_portals4_base_request_t*) mtl_request; int ret; @@ -31,7 +31,7 @@ ompi_mtl_portals4_cancel(struct mca_mtl_base_module_t* mtl, case portals4_req_recv: { - ompi_mtl_portals4_recv_request_t *recvreq = + ompi_mtl_portals4_recv_request_t *recvreq = (ompi_mtl_portals4_recv_request_t*) base_request; /* Cancel receive requests if not yet matched (otherwise, diff --git a/ompi/mca/mtl/portals4/mtl_portals4_component.c b/ompi/mca/mtl/portals4/mtl_portals4_component.c index 1c797d19dba..f9ba68cc062 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_component.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_component.c @@ -39,8 +39,8 @@ static int ompi_mtl_portals4_component_register(void); static int ompi_mtl_portals4_component_open(void); static int ompi_mtl_portals4_component_close(void); static int ompi_mtl_portals4_component_query(mca_base_module_t **module, int *priority); -static mca_mtl_base_module_t* -ompi_mtl_portals4_component_init(bool enable_progress_threads, +static mca_mtl_base_module_t* +ompi_mtl_portals4_component_init(bool enable_progress_threads, bool enable_mpi_threads); OMPI_MODULE_DECLSPEC extern mca_mtl_base_component_2_0_0_t mca_mtl_portals4_component; @@ -184,7 +184,7 @@ ompi_mtl_portals4_component_register(void) static int ompi_mtl_portals4_component_open(void) { - ompi_mtl_portals4.base.mtl_request_size = + ompi_mtl_portals4.base.mtl_request_size = sizeof(ompi_mtl_portals4_request_t) - sizeof(struct mca_mtl_request_t); @@ -197,24 +197,24 @@ ompi_mtl_portals4_component_open(void) #endif ); opal_output_verbose(1, ompi_mtl_base_framework.framework_output, - "Eager limit: %d", (int) + "Eager limit: %d", (int) ompi_mtl_portals4.eager_limit); - opal_output_verbose(1, ompi_mtl_base_framework.framework_output, - "Short receive blocks: %d", + opal_output_verbose(1, ompi_mtl_base_framework.framework_output, + "Short receive blocks: %d", ompi_mtl_portals4.recv_short_num); - opal_output_verbose(1, ompi_mtl_base_framework.framework_output, + opal_output_verbose(1, ompi_mtl_base_framework.framework_output, "Send queue size: %d", ompi_mtl_portals4.send_queue_size); - opal_output_verbose(1, ompi_mtl_base_framework.framework_output, + opal_output_verbose(1, ompi_mtl_base_framework.framework_output, "Recv queue size: %d", ompi_mtl_portals4.recv_queue_size); - opal_output_verbose(1, ompi_mtl_base_framework.framework_output, - "Long protocol: %s", + opal_output_verbose(1, ompi_mtl_base_framework.framework_output, + "Long protocol: %s", (ompi_mtl_portals4.protocol == eager) ? "Eager" : (ompi_mtl_portals4.protocol == rndv) ? "Rendezvous" : "Other"); OBJ_CONSTRUCT(&ompi_mtl_portals4.fl_message, opal_free_list_t); opal_free_list_init(&ompi_mtl_portals4.fl_message, - sizeof(ompi_mtl_portals4_message_t) + + sizeof(ompi_mtl_portals4_message_t) + ompi_mtl_portals4.eager_limit, opal_cache_line_size, OBJ_CLASS(ompi_mtl_portals4_message_t), @@ -238,7 +238,7 @@ ompi_mtl_portals4_component_query(mca_base_module_t **module, int *priority) /* * assume if portals4 MTL was compiled, the user wants it */ - + *priority = param_priority; *module = (mca_base_module_t *)&ompi_mtl_portals4.base; return OMPI_SUCCESS; @@ -471,7 +471,7 @@ ompi_mtl_portals4_progress(void) } #if OMPI_MTL_PORTALS4_FLOW_CONTROL - if (OPAL_UNLIKELY(0 == count && + if (OPAL_UNLIKELY(0 == count && 0 != opal_list_get_size(&ompi_mtl_portals4.flowctl.pending_sends))) { ompi_mtl_portals4_pending_list_progress(); } diff --git a/ompi/mca/mtl/portals4/mtl_portals4_flowctl.c b/ompi/mca/mtl/portals4/mtl_portals4_flowctl.c index b66524e81a6..d6ba01918d6 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_flowctl.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_flowctl.c @@ -93,8 +93,8 @@ ompi_mtl_portals4_flowctl_init(void) } me.ignore_bits = 0; - me.options = PTL_ME_OP_PUT | - PTL_ME_ACK_DISABLE | + me.options = PTL_ME_OP_PUT | + PTL_ME_ACK_DISABLE | PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE | PTL_ME_EVENT_COMM_DISABLE | @@ -125,8 +125,8 @@ ompi_mtl_portals4_flowctl_init(void) __FILE__, __LINE__, ret); goto error; } - me.options = PTL_ME_OP_PUT | - PTL_ME_ACK_DISABLE | + me.options = PTL_ME_OP_PUT | + PTL_ME_ACK_DISABLE | PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE | PTL_ME_EVENT_CT_COMM; @@ -154,8 +154,8 @@ ompi_mtl_portals4_flowctl_init(void) __FILE__, __LINE__, ret); goto error; } - me.options = PTL_ME_OP_PUT | - PTL_ME_ACK_DISABLE | + me.options = PTL_ME_OP_PUT | + PTL_ME_ACK_DISABLE | PTL_ME_EVENT_COMM_DISABLE | PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE | @@ -184,8 +184,8 @@ ompi_mtl_portals4_flowctl_init(void) __FILE__, __LINE__, ret); goto error; } - me.options = PTL_ME_OP_PUT | - PTL_ME_ACK_DISABLE | + me.options = PTL_ME_OP_PUT | + PTL_ME_ACK_DISABLE | PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE | PTL_ME_EVENT_CT_COMM; @@ -219,15 +219,15 @@ ompi_mtl_portals4_flowctl_init(void) int ompi_mtl_portals4_flowctl_fini(void) { - PtlPTFree(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.flowctl_idx); - PtlCTFree(ompi_mtl_portals4.flowctl.trigger_ct_h); - PtlMEUnlink(ompi_mtl_portals4.flowctl.trigger_me_h); - PtlCTFree(ompi_mtl_portals4.flowctl.alert_ct_h); - PtlMEUnlink(ompi_mtl_portals4.flowctl.alert_me_h); - PtlCTFree(ompi_mtl_portals4.flowctl.fanin_ct_h); - PtlMEUnlink(ompi_mtl_portals4.flowctl.fanin_me_h); - PtlCTFree(ompi_mtl_portals4.flowctl.fanout_ct_h); - PtlMEUnlink(ompi_mtl_portals4.flowctl.fanout_me_h); + PtlPTFree(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.flowctl_idx); + PtlCTFree(ompi_mtl_portals4.flowctl.trigger_ct_h); + PtlMEUnlink(ompi_mtl_portals4.flowctl.trigger_me_h); + PtlCTFree(ompi_mtl_portals4.flowctl.alert_ct_h); + PtlMEUnlink(ompi_mtl_portals4.flowctl.alert_me_h); + PtlCTFree(ompi_mtl_portals4.flowctl.fanin_ct_h); + PtlMEUnlink(ompi_mtl_portals4.flowctl.fanin_me_h); + PtlCTFree(ompi_mtl_portals4.flowctl.fanout_ct_h); + PtlMEUnlink(ompi_mtl_portals4.flowctl.fanout_me_h); return OMPI_SUCCESS; } @@ -263,7 +263,7 @@ ompi_mtl_portals4_flowctl_add_procs(size_t me, ompi_mtl_portals4.flowctl.root = *((ptl_process_t*) procs[0]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4]); if (false == ompi_mtl_portals4.flowctl.i_am_root) { - ompi_mtl_portals4.flowctl.parent = + ompi_mtl_portals4.flowctl.parent = *((ptl_process_t*) procs[(me - 1) / 2]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4]); } ompi_mtl_portals4.flowctl.me = @@ -276,7 +276,7 @@ ompi_mtl_portals4_flowctl_add_procs(size_t me, ompi_mtl_portals4.flowctl.num_children++; if (ompi_mtl_portals4.use_logical) ompi_mtl_portals4.flowctl.children[i].rank = tmp; - else ompi_mtl_portals4.flowctl.children[i] = + else ompi_mtl_portals4.flowctl.children[i] = *((ptl_process_t*) procs[tmp]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4]); } } @@ -319,9 +319,9 @@ ompi_mtl_portals4_flowctl_trigger(void) static int seqnum_compare(opal_list_item_t **ap, opal_list_item_t **bp) { - ompi_mtl_portals4_pending_request_t *a = + ompi_mtl_portals4_pending_request_t *a = (ompi_mtl_portals4_pending_request_t*) *ap; - ompi_mtl_portals4_pending_request_t *b = + ompi_mtl_portals4_pending_request_t *b = (ompi_mtl_portals4_pending_request_t*) *bp; if (a->ptl_request->opcount > b->ptl_request->opcount) { @@ -365,7 +365,7 @@ start_recover(void) } /* drain all pending sends */ - while (ompi_mtl_portals4.flowctl.send_slots != + while (ompi_mtl_portals4.flowctl.send_slots != ompi_mtl_portals4.flowctl.max_send_slots) { opal_progress(); } @@ -473,7 +473,7 @@ setup_alarm(uint32_t epoch) goto cleanup; } } - + cleanup: return ret; } @@ -490,7 +490,7 @@ setup_barrier(uint32_t epoch) ct.success = ompi_mtl_portals4.flowctl.epoch_counter * ompi_mtl_portals4.flowctl.num_procs; ct.failure = 0; - ret = PtlTriggeredCTSet(ompi_mtl_portals4.flowctl.trigger_ct_h, + ret = PtlTriggeredCTSet(ompi_mtl_portals4.flowctl.trigger_ct_h, ct, ompi_mtl_portals4.flowctl.fanin_ct_h, epoch * (ompi_mtl_portals4.flowctl.num_children + 1)); @@ -591,15 +591,15 @@ flowctl_fanout_callback(ptl_event_t *ev, } gettimeofday(&tv, NULL); - if (((tv.tv_sec * 1000000 + tv.tv_usec) - - (ompi_mtl_portals4.flowctl.tv.tv_sec * 1000000 + ompi_mtl_portals4.flowctl.tv.tv_usec)) + if (((tv.tv_sec * 1000000 + tv.tv_usec) - + (ompi_mtl_portals4.flowctl.tv.tv_sec * 1000000 + ompi_mtl_portals4.flowctl.tv.tv_usec)) < 1000000 * ompi_mtl_portals4.flowctl.backoff_count) { usleep(++ompi_mtl_portals4.flowctl.backoff_count); } else { ompi_mtl_portals4.flowctl.backoff_count = 0; } ompi_mtl_portals4.flowctl.tv = tv; - + ompi_mtl_portals4_pending_list_progress(); OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, diff --git a/ompi/mca/mtl/portals4/mtl_portals4_probe.c b/ompi/mca/mtl/portals4/mtl_portals4_probe.c index ee761237c2a..c58813edf3d 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_probe.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_probe.c @@ -28,7 +28,7 @@ static int completion_fn(ptl_event_t *ev, ompi_mtl_portals4_base_request_t *ptl_base_request) { - ompi_mtl_portals4_probe_request_t *ptl_request = + ompi_mtl_portals4_probe_request_t *ptl_request = (ompi_mtl_portals4_probe_request_t*) ptl_base_request; opal_output_verbose(1, ompi_mtl_base_framework.framework_output, diff --git a/ompi/mca/mtl/portals4/mtl_portals4_recv.c b/ompi/mca/mtl/portals4/mtl_portals4_recv.c index b3096974be0..190fbf7581f 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_recv.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_recv.c @@ -91,7 +91,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, ompi_mtl_portals4_base_request_t* ptl_base_request) { int ret; - ompi_mtl_portals4_recv_request_t* ptl_request = + ompi_mtl_portals4_recv_request_t* ptl_request = (ompi_mtl_portals4_recv_request_t*) ptl_base_request; size_t msg_length = 0; @@ -117,11 +117,11 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, msg_length = MTL_PORTALS4_GET_LENGTH(ev->hdr_data); ptl_request->super.super.ompi_req->req_status.MPI_SOURCE = MTL_PORTALS4_GET_SOURCE(ev->match_bits); - ptl_request->super.super.ompi_req->req_status.MPI_TAG = + ptl_request->super.super.ompi_req->req_status.MPI_TAG = MTL_PORTALS4_GET_TAG(ev->match_bits); if (OPAL_UNLIKELY(msg_length > ptl_request->delivery_len)) { opal_output_verbose(1, ompi_mtl_base_framework.framework_output, - "truncate expected: %ld %ld", + "truncate expected: %ld %ld", msg_length, ptl_request->delivery_len); ptl_request->super.super.ompi_req->req_status.MPI_ERROR = MPI_ERR_TRUNCATE; } @@ -198,8 +198,8 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, three protocols. mlength is only correct for eager, and delivery_len is the length of the buffer, not the length of the send. */ - ret = ompi_mtl_datatype_unpack(ptl_request->convertor, - ptl_request->delivery_ptr, + ret = ompi_mtl_datatype_unpack(ptl_request->convertor, + ptl_request->delivery_ptr, ptl_request->super.super.ompi_req->req_status._ucount); if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { opal_output_verbose(1, ompi_mtl_base_framework.framework_output, @@ -209,14 +209,14 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, } PtlMDRelease(ptl_request->md_h); - OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, + OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, "Recv %lu (0x%lx) completed, reply", ptl_request->opcount, ptl_request->hdr_data)); ptl_request->super.super.completion_callback(&ptl_request->super.super); break; case PTL_EVENT_PUT_OVERFLOW: - OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, + OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, "Recv %lu (0x%lx) got put_overflow event", ptl_request->opcount, ev->hdr_data)); @@ -232,11 +232,11 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, msg_length = MTL_PORTALS4_GET_LENGTH(ev->hdr_data); ptl_request->super.super.ompi_req->req_status.MPI_SOURCE = MTL_PORTALS4_GET_SOURCE(ev->match_bits); - ptl_request->super.super.ompi_req->req_status.MPI_TAG = + ptl_request->super.super.ompi_req->req_status.MPI_TAG = MTL_PORTALS4_GET_TAG(ev->match_bits); if (OPAL_UNLIKELY(msg_length > ptl_request->delivery_len)) { opal_output_verbose(1, ompi_mtl_base_framework.framework_output, - "truncate unexpected: %ld %ld %d", + "truncate unexpected: %ld %ld %d", msg_length, ptl_request->delivery_len, MTL_PORTALS4_IS_SHORT_MSG(ev->match_bits)); ptl_request->super.super.ompi_req->req_status.MPI_ERROR = MPI_ERR_TRUNCATE; @@ -258,7 +258,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, iov.iov_len = ev->mlength; max_data = iov.iov_len; - ret = opal_convertor_unpack(ptl_request->convertor, + ret = opal_convertor_unpack(ptl_request->convertor, &iov, &iov_count, &max_data ); if (NULL != ptl_request->buffer_ptr) free(ptl_request->buffer_ptr); @@ -271,7 +271,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, } /* if it's a sync, send the ack */ if (MTL_PORTALS4_IS_SYNC_MSG(ev->hdr_data)) { - OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, + OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, "Recv %lu (0x%lx) sending sync ack", ptl_request->opcount, ptl_request->hdr_data)); ret = PtlPut(ompi_mtl_portals4.zero_md_h, @@ -292,7 +292,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, } } - OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, + OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, "Recv %lu (0x%lx) completed, unexpected short (0x%lx)", ptl_request->opcount, ptl_request->hdr_data, (long) ev->start)); ptl_request->super.super.completion_callback(&ptl_request->super.super); @@ -331,7 +331,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev, return OMPI_SUCCESS; callback_error: - ptl_request->super.super.ompi_req->req_status.MPI_ERROR = + ptl_request->super.super.ompi_req->req_status.MPI_ERROR = ompi_mtl_portals4_get_error(ret); ptl_request->super.super.completion_callback(&ptl_request->super.super); return OMPI_SUCCESS; @@ -349,7 +349,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl, ptl_match_bits_t match_bits, ignore_bits; int ret = OMPI_SUCCESS; ptl_process_t remote_proc; - ompi_mtl_portals4_recv_request_t *ptl_request = + ompi_mtl_portals4_recv_request_t *ptl_request = (ompi_mtl_portals4_recv_request_t*) mtl_request; void *start; size_t length; @@ -394,7 +394,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl, OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output, "Recv %lu from %x,%x of length %ld (0x%lx, 0x%lx, 0x%lx)\n", ptl_request->opcount, - remote_proc.phys.nid, remote_proc.phys.pid, + remote_proc.phys.nid, remote_proc.phys.pid, (int64_t)length, match_bits, ignore_bits, (unsigned long) ptl_request)); me.start = start; @@ -402,9 +402,9 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl, me.ct_handle = PTL_CT_NONE; me.min_free = 0; me.uid = ompi_mtl_portals4.uid; - me.options = - PTL_ME_OP_PUT | - PTL_ME_USE_ONCE | + me.options = + PTL_ME_OP_PUT | + PTL_ME_USE_ONCE | PTL_ME_EVENT_UNLINK_DISABLE; if (length <= ompi_mtl_portals4.eager_limit) { me.options |= PTL_ME_EVENT_LINK_DISABLE; @@ -436,7 +436,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl, } } - return OMPI_SUCCESS; + return OMPI_SUCCESS; } @@ -446,13 +446,13 @@ ompi_mtl_portals4_imrecv(struct mca_mtl_base_module_t* mtl, struct ompi_message_t **message, struct mca_mtl_request_t *mtl_request) { - ompi_mtl_portals4_recv_request_t *ptl_request = + ompi_mtl_portals4_recv_request_t *ptl_request = (ompi_mtl_portals4_recv_request_t*) mtl_request; void *start; size_t length; bool free_after; int ret; - ompi_mtl_portals4_message_t *ptl_message = + ompi_mtl_portals4_message_t *ptl_message = (ompi_mtl_portals4_message_t*) (*message)->req_ptr; ret = ompi_mtl_datatype_recv_buf(convertor, &start, &length, &free_after); diff --git a/ompi/mca/mtl/portals4/mtl_portals4_recv_short.c b/ompi/mca/mtl/portals4/mtl_portals4_recv_short.c index b6b28691586..e35d709c569 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_recv_short.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_recv_short.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -37,7 +37,7 @@ static int ompi_mtl_portals4_recv_block_progress(ptl_event_t *ev, ompi_mtl_portals4_base_request_t* ptl_base_request) { - ompi_mtl_portals4_recv_short_request_t *ptl_request = + ompi_mtl_portals4_recv_short_request_t *ptl_request = (ompi_mtl_portals4_recv_short_request_t*) ptl_base_request; ompi_mtl_portals4_recv_short_block_t *block = ptl_request->block; @@ -154,7 +154,7 @@ ompi_mtl_portals4_recv_block_progress(ptl_event_t *ev, } -static ompi_mtl_portals4_recv_short_block_t* +static ompi_mtl_portals4_recv_short_block_t* ompi_mtl_portals4_recv_short_block_alloc(bool release_on_free) { ompi_mtl_portals4_recv_short_block_t *block; @@ -208,9 +208,9 @@ ompi_mtl_portals4_activate_block(ompi_mtl_portals4_recv_short_block_t *block) me.ct_handle = PTL_CT_NONE; me.min_free = ompi_mtl_portals4.eager_limit; me.uid = ompi_mtl_portals4.uid; - me.options = - PTL_ME_OP_PUT | - PTL_ME_MANAGE_LOCAL | + me.options = + PTL_ME_OP_PUT | + PTL_ME_MANAGE_LOCAL | PTL_ME_MAY_ALIGN; if (ompi_mtl_portals4.use_logical) { me.match_id.rank = PTL_RANK_ANY; @@ -251,7 +251,7 @@ ompi_mtl_portals4_recv_short_init(void) /* create the recv blocks */ for (i = 0 ; i < ompi_mtl_portals4.recv_short_num ; ++i) { - ompi_mtl_portals4_recv_short_block_t *block = + ompi_mtl_portals4_recv_short_block_t *block = ompi_mtl_portals4_recv_short_block_alloc(false); if (OPAL_UNLIKELY(NULL == block)) { return OMPI_ERR_OUT_OF_RESOURCE; @@ -272,7 +272,7 @@ ompi_mtl_portals4_recv_short_fini(void) OPAL_THREAD_LOCK(&ompi_mtl_portals4.short_block_mutex); while (NULL != (item = opal_list_remove_first(&ompi_mtl_portals4.recv_short_blocks))) { - ompi_mtl_portals4_recv_short_block_t *block = + ompi_mtl_portals4_recv_short_block_t *block = (ompi_mtl_portals4_recv_short_block_t*) item; ompi_mtl_portals4_recv_short_block_free(block); } @@ -290,7 +290,7 @@ ompi_mtl_portals4_recv_short_link(int count) if (active < count) { for (i = 0 ; i < (count - active) ; ++i) { - ompi_mtl_portals4_recv_short_block_t *block = + ompi_mtl_portals4_recv_short_block_t *block = ompi_mtl_portals4_recv_short_block_alloc(false); if (NULL == block) { return OMPI_ERR_OUT_OF_RESOURCE; @@ -298,6 +298,6 @@ ompi_mtl_portals4_recv_short_link(int count) ompi_mtl_portals4_activate_block(block); } } - + return OMPI_SUCCESS; } diff --git a/ompi/mca/mtl/portals4/mtl_portals4_recv_short.h b/ompi/mca/mtl/portals4/mtl_portals4_recv_short.h index 0c5c08e5eba..5aab083bedb 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_recv_short.h +++ b/ompi/mca/mtl/portals4/mtl_portals4_recv_short.h @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mca/mtl/portals4/mtl_portals4_send.c b/ompi/mca/mtl/portals4/mtl_portals4_send.c index 7d6ac1f2388..636584e86c4 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_send.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_send.c @@ -35,17 +35,17 @@ static inline int -ompi_mtl_portals4_callback(ptl_event_t *ev, +ompi_mtl_portals4_callback(ptl_event_t *ev, ompi_mtl_portals4_base_request_t* ptl_base_request, bool *complete) { int retval = OMPI_SUCCESS, ret, val, add = 1; - ompi_mtl_portals4_isend_request_t* ptl_request = + ompi_mtl_portals4_isend_request_t* ptl_request = (ompi_mtl_portals4_isend_request_t*) ptl_base_request; #if OMPI_MTL_PORTALS4_FLOW_CONTROL if (OPAL_UNLIKELY(ev->ni_fail_type == PTL_NI_PT_DISABLED)) { - ompi_mtl_portals4_pending_request_t *pending = + ompi_mtl_portals4_pending_request_t *pending = ptl_request->pending; OPAL_OUTPUT_VERBOSE((10, ompi_mtl_base_framework.framework_output, @@ -67,7 +67,7 @@ ompi_mtl_portals4_callback(ptl_event_t *ev, } } - opal_list_append(&ompi_mtl_portals4.flowctl.pending_sends, + opal_list_append(&ompi_mtl_portals4.flowctl.pending_sends, &pending->super.super); OPAL_THREAD_ADD32(&ompi_mtl_portals4.flowctl.send_slots, 1); ompi_mtl_portals4_flowctl_trigger(); @@ -129,7 +129,7 @@ ompi_mtl_portals4_callback(ptl_event_t *ev, } #endif } - + return retval; } @@ -140,7 +140,7 @@ ompi_mtl_portals4_send_callback(ptl_event_t *ev, { bool complete = false; int ret; - ompi_mtl_portals4_send_request_t* ptl_request = + ompi_mtl_portals4_send_request_t* ptl_request = (ompi_mtl_portals4_send_request_t*) ptl_base_request; ret = ompi_mtl_portals4_callback(ev, ptl_base_request, &complete); @@ -160,7 +160,7 @@ ompi_mtl_portals4_isend_callback(ptl_event_t *ev, { bool complete = false; int ret; - ompi_mtl_portals4_isend_request_t* ptl_request = + ompi_mtl_portals4_isend_request_t* ptl_request = (ompi_mtl_portals4_isend_request_t*) ptl_base_request; ret = ompi_mtl_portals4_callback(ev, ptl_base_request, &complete); @@ -174,7 +174,7 @@ ompi_mtl_portals4_isend_callback(ptl_event_t *ev, static inline int -ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, +ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, void *start, int length, int contextid, int tag, int localrank, ptl_process_t ptl_proc, @@ -185,10 +185,10 @@ ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, ptl_me_t me; ptl_hdr_data_t hdr_data; - MTL_PORTALS4_SET_SEND_BITS(match_bits, contextid, localrank, tag, + MTL_PORTALS4_SET_SEND_BITS(match_bits, contextid, localrank, tag, MTL_PORTALS4_SHORT_MSG); - MTL_PORTALS4_SET_HDR_DATA(hdr_data, ptl_request->opcount, length, + MTL_PORTALS4_SET_HDR_DATA(hdr_data, ptl_request->opcount, length, (MCA_PML_BASE_SEND_SYNCHRONOUS == mode) ? 1 : 0); if (MCA_PML_BASE_SEND_SYNCHRONOUS == mode) { @@ -197,9 +197,9 @@ ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, me.ct_handle = PTL_CT_NONE; me.min_free = 0; me.uid = ompi_mtl_portals4.uid; - me.options = - PTL_ME_OP_PUT | - PTL_ME_USE_ONCE | + me.options = + PTL_ME_OP_PUT | + PTL_ME_USE_ONCE | PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE; me.match_id = ptl_proc; @@ -254,13 +254,13 @@ ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, } return ompi_mtl_portals4_get_error(ret); } - + return OMPI_SUCCESS; } static inline int ompi_mtl_portals4_long_isend(void *start, size_t length, int contextid, int tag, - int localrank, + int localrank, ptl_process_t ptl_proc, ompi_mtl_portals4_isend_request_t *ptl_request) { @@ -270,7 +270,7 @@ ompi_mtl_portals4_long_isend(void *start, size_t length, int contextid, int tag, ptl_hdr_data_t hdr_data; ptl_size_t put_length; - MTL_PORTALS4_SET_SEND_BITS(match_bits, contextid, localrank, tag, + MTL_PORTALS4_SET_SEND_BITS(match_bits, contextid, localrank, tag, MTL_PORTALS4_LONG_MSG); MTL_PORTALS4_SET_HDR_DATA(hdr_data, ptl_request->opcount, length, 0); @@ -280,9 +280,9 @@ ompi_mtl_portals4_long_isend(void *start, size_t length, int contextid, int tag, me.ct_handle = PTL_CT_NONE; me.min_free = 0; me.uid = ompi_mtl_portals4.uid; - me.options = - PTL_ME_OP_GET | - PTL_ME_USE_ONCE | + me.options = + PTL_ME_OP_GET | + PTL_ME_USE_ONCE | PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE; me.match_id = ptl_proc; @@ -306,7 +306,7 @@ ompi_mtl_portals4_long_isend(void *start, size_t length, int contextid, int tag, "Send %lu long send with hdr_data 0x%lx (0x%lx)", ptl_request->opcount, hdr_data, match_bits)); - put_length = (rndv == ompi_mtl_portals4.protocol) ? + put_length = (rndv == ompi_mtl_portals4.protocol) ? (ptl_size_t) ompi_mtl_portals4.eager_limit : (ptl_size_t) length; ret = PtlPut(ompi_mtl_portals4.send_md_h, @@ -478,7 +478,7 @@ ompi_mtl_portals4_send_start(struct mca_mtl_base_module_t* mtl, ptl_proc, ptl_request); } - + return ret; } diff --git a/ompi/mca/mtl/psm/Makefile.am b/ompi/mca/mtl/psm/Makefile.am index 8f7690c04be..816309f753b 100644 --- a/ompi/mca/mtl/psm/Makefile.am +++ b/ompi/mca/mtl/psm/Makefile.am @@ -5,15 +5,15 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/mtl/psm/help-mtl-psm.txt b/ompi/mca/mtl/psm/help-mtl-psm.txt index 7ca60a5396f..9572b48ca47 100644 --- a/ompi/mca/mtl/psm/help-mtl-psm.txt +++ b/ompi/mca/mtl/psm/help-mtl-psm.txt @@ -19,7 +19,7 @@ Unable to set PSM debug level. # [unable to open endpoint] PSM was unable to open an endpoint. Please make sure that the network link is -active on the node and the hardware is functioning. +active on the node and the hardware is functioning. Error: %s # diff --git a/ompi/mca/mtl/psm/mtl_psm.c b/ompi/mca/mtl/psm/mtl_psm.c index 004cbe1ea32..6adcfabed9e 100644 --- a/ompi/mca/mtl/psm/mtl_psm.c +++ b/ompi/mca/mtl/psm/mtl_psm.c @@ -39,14 +39,14 @@ mca_mtl_psm_module_t ompi_mtl_psm = { /* NTH: PSM supports 16 bit context ids */ .mtl_max_contextid = (1UL << 16) - 1, .mtl_max_tag = (1UL << 30), /* must allow negatives */ - + .mtl_add_procs = ompi_mtl_psm_add_procs, .mtl_del_procs = ompi_mtl_psm_del_procs, .mtl_finalize = ompi_mtl_psm_finalize, - + .mtl_send = ompi_mtl_psm_send, .mtl_isend = ompi_mtl_psm_isend, - + .mtl_irecv = ompi_mtl_psm_irecv, .mtl_iprobe = ompi_mtl_psm_iprobe, .mtl_imrecv = ompi_mtl_psm_imrecv, @@ -55,12 +55,12 @@ mca_mtl_psm_module_t ompi_mtl_psm = { .mtl_cancel = ompi_mtl_psm_cancel, .mtl_add_comm = ompi_mtl_psm_add_comm, .mtl_del_comm = ompi_mtl_psm_del_comm - } + } }; static psm_error_t -ompi_mtl_psm_errhandler(psm_ep_t ep, const psm_error_t error, +ompi_mtl_psm_errhandler(psm_ep_t ep, const psm_error_t error, const char *error_string, psm_error_token_t token) { switch (error) { @@ -87,7 +87,7 @@ ompi_mtl_psm_errhandler(psm_ep_t ep, const psm_error_t error, int ompi_mtl_psm_progress( void ); -int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { +int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { psm_error_t err; psm_ep_t ep; /* endpoint handle */ psm_mq_t mq; @@ -101,7 +101,7 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { generated_key = getenv("OMPI_MCA_orte_precondition_transports"); memset(uu, 0, sizeof(psm_uuid_t)); - + if (!generated_key || (strlen(generated_key) != 33) || sscanf(generated_key, "%016llx-%016llx", &uu[0], &uu[1]) != 2) { @@ -110,7 +110,7 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { generated_key ? "could not be parsed from" : "not present in", ompi_process_info.nodename); return OMPI_ERROR; - + } /* Handle our own errors for opening endpoints */ @@ -123,7 +123,7 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { setenv("MPI_LOCALRANKID", env_string, 0); snprintf(env_string, sizeof(env_string), "%d", num_local_procs); setenv("MPI_LOCALNRANKS", env_string, 0); - + /* Setup the endpoint options. */ bzero((void*) &ep_opt, sizeof(ep_opt)); ep_opt.timeout = ompi_mtl_psm.connect_timeout * 1e9; @@ -132,10 +132,10 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { ep_opt.shm_mbytes = -1; /* Choose PSM defaults */ ep_opt.sendbufs_num = -1; /* Choose PSM defaults */ -#if PSM_VERNO >= 0x0101 +#if PSM_VERNO >= 0x0101 ep_opt.network_pkey = ompi_mtl_psm.ib_pkey; #endif - + #if PSM_VERNO >= 0x0107 ep_opt.port = ompi_mtl_psm.ib_port; ep_opt.outsl = ompi_mtl_psm.ib_service_level; @@ -157,9 +157,9 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { /* Future errors are handled by the default error handler */ psm_error_register_handler(ompi_mtl_psm.ep, PSM_ERRHANDLER_DEFAULT); - - err = psm_mq_init(ep, - 0xffff000000000000ULL, + + err = psm_mq_init(ep, + 0xffff000000000000ULL, NULL, 0, &mq); @@ -175,23 +175,23 @@ int ompi_mtl_psm_module_init(int local_rank, int num_local_procs) { ompi_mtl_psm.mq = mq; OPAL_MODEX_SEND(rc, PMIX_SYNC_REQD, PMIX_GLOBAL, - &mca_mtl_psm_component.super.mtl_version, - &ompi_mtl_psm.epid, + &mca_mtl_psm_component.super.mtl_version, + &ompi_mtl_psm.epid, sizeof(psm_epid_t)); if (OMPI_SUCCESS != rc) { - opal_output(0, "Open MPI couldn't send PSM epid to head node process"); + opal_output(0, "Open MPI couldn't send PSM epid to head node process"); return OMPI_ERROR; } /* register the psm progress function */ opal_progress_register(ompi_mtl_psm_progress); - + return OMPI_SUCCESS; } int -ompi_mtl_psm_finalize(struct mca_mtl_base_module_t* mtl) { +ompi_mtl_psm_finalize(struct mca_mtl_base_module_t* mtl) { psm_error_t err; opal_progress_unregister(ompi_mtl_psm_progress); @@ -199,21 +199,21 @@ ompi_mtl_psm_finalize(struct mca_mtl_base_module_t* mtl) { /* free resources */ err = psm_mq_finalize(ompi_mtl_psm.mq); if (err) { - opal_output(0, "Error in psm_mq_finalize (error %s)\n", + opal_output(0, "Error in psm_mq_finalize (error %s)\n", psm_error_get_string(err)); return OMPI_ERROR; } err = psm_ep_close(ompi_mtl_psm.ep, PSM_EP_CLOSE_GRACEFUL, 1*1e9); if (err) { - opal_output(0, "Error in psm_ep_close (error %s)\n", + opal_output(0, "Error in psm_ep_close (error %s)\n", psm_error_get_string(err)); return OMPI_ERROR; } err = psm_finalize(); if (err) { - opal_output(0, "Error in psm_finalize (error %s)\n", + opal_output(0, "Error in psm_finalize (error %s)\n", psm_error_get_string(err)); return OMPI_ERROR; } @@ -255,7 +255,7 @@ ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t** procs) { - int i,j; + int i,j; int rc; psm_epid_t *epids_in = NULL; int *mask_in = NULL; @@ -265,7 +265,7 @@ ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t *mtl, size_t size; int proc_errors[PSM_ERROR_LAST] = { 0 }; int timeout_in_secs; - + assert(mtl == &ompi_mtl_psm.super); rc = OMPI_ERR_OUT_OF_RESOURCE; @@ -295,7 +295,7 @@ ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t *mtl, continue; } - OPAL_MODEX_RECV(rc, &mca_mtl_psm_component.super.mtl_version, + OPAL_MODEX_RECV(rc, &mca_mtl_psm_component.super.mtl_version, &procs[i]->super, (void**)&epid, &size); if (rc != OMPI_SUCCESS || size != sizeof(psm_epid_t)) { rc = OMPI_ERROR; @@ -331,7 +331,7 @@ ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t *mtl, errstr = (char *) ompi_mtl_psm_connect_error_msg(thiserr); if (proc_errors[thiserr] == 0) { proc_errors[thiserr] = 1; - opal_output(0, "PSM EP connect error (%s):", + opal_output(0, "PSM EP connect error (%s):", errstr ? errstr : "unknown connect error"); for (j = 0; j < (int) nprocs; j++) { if (errs_out[j] == thiserr) { @@ -350,14 +350,14 @@ ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t *mtl, * user. PSM prints the error and the offending endpoint's hostname * and exits with -1 */ psm_error_register_handler(ompi_mtl_psm.ep, PSM_ERRHANDLER_DEFAULT); - + /* Fill in endpoint data */ - for (i = 0; i < (int) nprocs; i++) { + for (i = 0; i < (int) nprocs; i++) { if (0 == mask_in[i]) { continue; } - mca_mtl_psm_endpoint_t *endpoint = + mca_mtl_psm_endpoint_t *endpoint = (mca_mtl_psm_endpoint_t *) OBJ_NEW(mca_mtl_psm_endpoint_t); endpoint->peer_epid = epids_in[i]; endpoint->peer_addr = epaddrs_out[i]; @@ -366,7 +366,7 @@ ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t *mtl, rc = OMPI_SUCCESS; } - + bail: if (epids_in != NULL) { free(epids_in); @@ -409,7 +409,7 @@ ompi_mtl_psm_del_comm(struct mca_mtl_base_module_t *mtl, } -int ompi_mtl_psm_progress( void ) { +int ompi_mtl_psm_progress( void ) { psm_error_t err; mca_mtl_psm_request_t* mtl_psm_request; psm_mq_status_t psm_status; @@ -423,7 +423,7 @@ int ompi_mtl_psm_progress( void ) { } else if (err != PSM_OK) { goto error; } - + completed++; err = psm_mq_test(&req, &psm_status); @@ -434,7 +434,7 @@ int ompi_mtl_psm_progress( void ) { mtl_psm_request = (mca_mtl_psm_request_t*) psm_status.context; if (mtl_psm_request->type == OMPI_MTL_PSM_IRECV) { - ompi_mtl_datatype_unpack(mtl_psm_request->convertor, + ompi_mtl_datatype_unpack(mtl_psm_request->convertor, mtl_psm_request->buf, psm_status.msg_length); @@ -442,11 +442,11 @@ int ompi_mtl_psm_progress( void ) { PSM_GET_MQRANK(psm_status.msg_tag); mtl_psm_request->super.ompi_req->req_status.MPI_TAG = PSM_GET_MQUTAG(psm_status.msg_tag); - mtl_psm_request->super.ompi_req->req_status._ucount = + mtl_psm_request->super.ompi_req->req_status._ucount = psm_status.nbytes; } - - if(mtl_psm_request->type == OMPI_MTL_PSM_ISEND) { + + if(mtl_psm_request->type == OMPI_MTL_PSM_ISEND) { if (mtl_psm_request->free_after) { free(mtl_psm_request->buf); } @@ -454,15 +454,15 @@ int ompi_mtl_psm_progress( void ) { switch (psm_status.error_code) { case PSM_OK: - mtl_psm_request->super.ompi_req->req_status.MPI_ERROR = + mtl_psm_request->super.ompi_req->req_status.MPI_ERROR = OMPI_SUCCESS; break; case PSM_MQ_TRUNCATION: - mtl_psm_request->super.ompi_req->req_status.MPI_ERROR = + mtl_psm_request->super.ompi_req->req_status.MPI_ERROR = MPI_ERR_TRUNCATE; break; default: - mtl_psm_request->super.ompi_req->req_status.MPI_ERROR = + mtl_psm_request->super.ompi_req->req_status.MPI_ERROR = MPI_ERR_INTERN; } @@ -471,7 +471,7 @@ int ompi_mtl_psm_progress( void ) { } while (1); - error: + error: opal_show_help("help-mtl-psm.txt", "error polling network", true, psm_error_get_string(err)); diff --git a/ompi/mca/mtl/psm/mtl_psm.h b/ompi/mca/mtl/psm/mtl_psm.h index edc34d41ba4..36aedbfcc5d 100644 --- a/ompi/mca/mtl/psm/mtl_psm.h +++ b/ompi/mca/mtl/psm/mtl_psm.h @@ -31,23 +31,23 @@ BEGIN_C_DECLS /* MTL interface functions */ -extern int ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t* mtl, +extern int ompi_mtl_psm_add_procs(struct mca_mtl_base_module_t* mtl, size_t nprocs, struct ompi_proc_t** procs); - -extern int ompi_mtl_psm_del_procs(struct mca_mtl_base_module_t* mtl, + +extern int ompi_mtl_psm_del_procs(struct mca_mtl_base_module_t* mtl, size_t nprocs, struct ompi_proc_t** procs); int -ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl, +ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t* comm, int dest, int tag, struct opal_convertor_t *convertor, mca_pml_base_send_mode_t mode); -extern int ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, +extern int ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t* comm, int dest, int tag, @@ -62,9 +62,9 @@ extern int ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl, int tag, struct opal_convertor_t *convertor, struct mca_mtl_request_t *mtl_request); - - -extern int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, + + +extern int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t *comm, int src, int tag, @@ -85,7 +85,7 @@ extern int ompi_mtl_psm_improbe(struct mca_mtl_base_module_t *mtl, struct ompi_status_public_t *status); extern int ompi_mtl_psm_cancel(struct mca_mtl_base_module_t* mtl, - struct mca_mtl_request_t *mtl_request, + struct mca_mtl_request_t *mtl_request, int flag); extern int ompi_mtl_psm_add_comm(struct mca_mtl_base_module_t *mtl, @@ -93,13 +93,13 @@ extern int ompi_mtl_psm_add_comm(struct mca_mtl_base_module_t *mtl, extern int ompi_mtl_psm_del_comm(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm); - + extern int ompi_mtl_psm_finalize(struct mca_mtl_base_module_t* mtl); int ompi_mtl_psm_module_init(int local_rank, int num_local_procs); - - + + END_C_DECLS #endif /* MTL_PSM_H_HAS_BEEN_INCLUDED */ diff --git a/ompi/mca/mtl/psm/mtl_psm_cancel.c b/ompi/mca/mtl/psm/mtl_psm_cancel.c index 8c22673d6ce..c797598c04d 100644 --- a/ompi/mca/mtl/psm/mtl_psm_cancel.c +++ b/ompi/mca/mtl/psm/mtl_psm_cancel.c @@ -21,34 +21,34 @@ #include "mtl_psm.h" #include "mtl_psm_request.h" -int ompi_mtl_psm_cancel(struct mca_mtl_base_module_t* mtl, - struct mca_mtl_request_t *mtl_request, +int ompi_mtl_psm_cancel(struct mca_mtl_base_module_t* mtl, + struct mca_mtl_request_t *mtl_request, int flag) { psm_error_t err; psm_mq_status_t status; - - mca_mtl_psm_request_t *mtl_psm_request = - (mca_mtl_psm_request_t*) mtl_request; - + + mca_mtl_psm_request_t *mtl_psm_request = + (mca_mtl_psm_request_t*) mtl_request; + /* PSM does not support canceling sends */ if(OMPI_MTL_PSM_ISEND == mtl_psm_request->type) { return OMPI_SUCCESS; } - err = psm_mq_cancel(&mtl_psm_request->psm_request); - if(PSM_OK == err) { + err = psm_mq_cancel(&mtl_psm_request->psm_request); + if(PSM_OK == err) { err = psm_mq_test(&mtl_psm_request->psm_request, &status); - if(PSM_OK == err) { + if(PSM_OK == err) { mtl_request->ompi_req->req_status._cancelled = true; mtl_psm_request->super.completion_callback(&mtl_psm_request->super); return OMPI_SUCCESS; - } else { + } else { return OMPI_ERROR; } - } else if(PSM_MQ_INCOMPLETE == err) { - return OMPI_SUCCESS; - } - + } else if(PSM_MQ_INCOMPLETE == err) { + return OMPI_SUCCESS; + } + return OMPI_ERROR; } diff --git a/ompi/mca/mtl/psm/mtl_psm_component.c b/ompi/mca/mtl/psm/mtl_psm_component.c index b55d56626b9..b018d7f587f 100644 --- a/ompi/mca/mtl/psm/mtl_psm_component.c +++ b/ompi/mca/mtl/psm/mtl_psm_component.c @@ -45,7 +45,7 @@ static int ompi_mtl_psm_component_close(void); static int ompi_mtl_psm_component_query(mca_base_module_t **module, int *priority); static int ompi_mtl_psm_component_register(void); -static mca_mtl_base_module_t* ompi_mtl_psm_component_init( bool enable_progress_threads, +static mca_mtl_base_module_t* ompi_mtl_psm_component_init( bool enable_progress_threads, bool enable_mpi_threads ); mca_mtl_psm_component_t mca_mtl_psm_component = { @@ -53,7 +53,7 @@ mca_mtl_psm_component_t mca_mtl_psm_component = { { /* First, the mca_base_component_t struct containing meta * information about the component itself */ - + .mtl_version = { MCA_MTL_BASE_VERSION_2_0_0, @@ -81,14 +81,14 @@ static mca_base_var_enum_value_t path_query_values[] = { {0, NULL} }; #endif - + static int ompi_mtl_psm_component_register(void) { #if PSM_VERNO >= 0x010d mca_base_var_enum_t *new_enum; #endif - + param_priority = 100; (void) mca_base_component_var_register (&mca_mtl_psm_component.super.mtl_version, @@ -138,7 +138,7 @@ ompi_mtl_psm_component_register(void) NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_service_level); - + ompi_mtl_psm.ib_pkey = 0x7fffUL; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "ib_pkey", "Infiniband partition key", @@ -146,7 +146,7 @@ ompi_mtl_psm_component_register(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_pkey); - + #if PSM_VERNO >= 0x010d ompi_mtl_psm.ib_service_id = 0x1000117500000000ull; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, @@ -176,7 +176,7 @@ static int ompi_mtl_psm_component_open(void) { struct stat st; - + if (ompi_mtl_psm.ib_service_level < 0) { ompi_mtl_psm.ib_service_level = 0; } else if (ompi_mtl_psm.ib_service_level > 15) { @@ -253,7 +253,7 @@ ompi_mtl_psm_component_init(bool enable_progress_threads, int num_total_procs = 0; /* Compute the total number of processes on this host and our local rank - * on that node. We need to provide PSM with these values so it can + * on that node. We need to provide PSM with these values so it can * allocate hardware contexts appropriately across processes. */ if (OMPI_SUCCESS != get_num_local_procs(&num_local_procs)) { @@ -271,11 +271,11 @@ ompi_mtl_psm_component_init(bool enable_progress_threads, return NULL; } - + #if PSM_VERNO >= 0x010c /* Set infinipath debug level */ - err = psm_setopt(PSM_COMPONENT_CORE, 0, PSM_CORE_OPT_DEBUG, - (const void*) &ompi_mtl_psm.debug_level, + err = psm_setopt(PSM_COMPONENT_CORE, 0, PSM_CORE_OPT_DEBUG, + (const void*) &ompi_mtl_psm.debug_level, sizeof(unsigned)); if (err) { /* Non fatal error. Can continue */ @@ -284,9 +284,9 @@ ompi_mtl_psm_component_init(bool enable_progress_threads, psm_error_get_string(err)); } #endif - + if (getenv("PSM_DEVICES") == NULL) { - /* Only allow for shm and ipath devices in 2.0 and earlier releases + /* Only allow for shm and ipath devices in 2.0 and earlier releases * (unless the user overrides the setting). */ if (PSM_VERNO >= 0x0104) { @@ -304,7 +304,7 @@ ompi_mtl_psm_component_init(bool enable_progress_threads, } } } - + err = psm_init(&verno_major, &verno_minor); if (err) { opal_show_help("help-mtl-psm.txt", @@ -312,23 +312,23 @@ ompi_mtl_psm_component_init(bool enable_progress_threads, psm_error_get_string(err)); return NULL; } - + /* Complete PSM initialization */ ompi_mtl_psm_module_init(local_rank, num_local_procs); - ompi_mtl_psm.super.mtl_request_size = - sizeof(mca_mtl_psm_request_t) - + ompi_mtl_psm.super.mtl_request_size = + sizeof(mca_mtl_psm_request_t) - sizeof(struct mca_mtl_request_t); /* don't register the err handler until we know we will be active */ err = psm_error_register_handler(NULL /* no ep */, PSM_ERRHANDLER_NOP); if (err) { - opal_output(0, "Error in psm_error_register_handler (error %s)\n", + opal_output(0, "Error in psm_error_register_handler (error %s)\n", psm_error_get_string(err)); return NULL; } - + return &ompi_mtl_psm.super; } diff --git a/ompi/mca/mtl/psm/mtl_psm_endpoint.c b/ompi/mca/mtl/psm/mtl_psm_endpoint.c index a58c90d68d3..992777a7252 100644 --- a/ompi/mca/mtl/psm/mtl_psm_endpoint.c +++ b/ompi/mca/mtl/psm/mtl_psm_endpoint.c @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 QLogic Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -24,7 +24,7 @@ #include "ompi/types.h" #include "mtl_psm.h" #include "mtl_psm_types.h" -#include "mtl_psm_endpoint.h" +#include "mtl_psm_endpoint.h" /* * Initialize state of the endpoint instance. @@ -47,8 +47,8 @@ static void mca_mtl_psm_endpoint_destruct(mca_mtl_psm_endpoint_t* endpoint) OBJ_CLASS_INSTANCE( - mca_mtl_psm_endpoint_t, - opal_list_item_t, - mca_mtl_psm_endpoint_construct, + mca_mtl_psm_endpoint_t, + opal_list_item_t, + mca_mtl_psm_endpoint_construct, mca_mtl_psm_endpoint_destruct); diff --git a/ompi/mca/mtl/psm/mtl_psm_endpoint.h b/ompi/mca/mtl/psm/mtl_psm_endpoint.h index 0270493b89e..83a1ecfa8f9 100644 --- a/ompi/mca/mtl/psm/mtl_psm_endpoint.h +++ b/ompi/mca/mtl/psm/mtl_psm_endpoint.h @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 QLogic Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,10 +40,10 @@ OBJ_CLASS_DECLARATION(mca_mtl_psm_endpoint_t); struct mca_mtl_psm_endpoint_t { opal_list_item_t super; - + struct mca_mtl_psm_module_t* mtl_psm_module; /**< MTL instance that created this connection */ - + psm_epid_t peer_epid; /**< The unique epid for the opened port */ diff --git a/ompi/mca/mtl/psm/mtl_psm_probe.c b/ompi/mca/mtl/psm/mtl_psm_probe.c index eaaf7d000be..c0728c207c5 100644 --- a/ompi/mca/mtl/psm/mtl_psm_probe.c +++ b/ompi/mca/mtl/psm/mtl_psm_probe.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2006 QLogic Corporation. All rights reserved. * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,7 +26,7 @@ #include "ompi/communicator/communicator.h" -int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, +int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t *comm, int src, int tag, @@ -42,7 +42,7 @@ int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, err = psm_mq_iprobe(ompi_mtl_psm.mq, mqtag, tagsel, &mqstat); if (err == PSM_OK) { *flag = 1; - if(MPI_STATUS_IGNORE != status) { + if(MPI_STATUS_IGNORE != status) { status->MPI_SOURCE = PSM_GET_MQRANK(mqstat.msg_tag); status->MPI_TAG = PSM_GET_MQUTAG(mqstat.msg_tag); status->_ucount = mqstat.nbytes; @@ -58,7 +58,7 @@ int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, status->MPI_ERROR = MPI_ERR_INTERN; } } - + return OMPI_SUCCESS; } else if (err == PSM_MQ_INCOMPLETE) { diff --git a/ompi/mca/mtl/psm/mtl_psm_recv.c b/ompi/mca/mtl/psm/mtl_psm_recv.c index 3a4c830b46a..b345ae19aa9 100644 --- a/ompi/mca/mtl/psm/mtl_psm_recv.c +++ b/ompi/mca/mtl/psm/mtl_psm_recv.c @@ -36,18 +36,18 @@ ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl, struct opal_convertor_t *convertor, struct mca_mtl_request_t *mtl_request) { - int ret; + int ret; psm_error_t err; mca_mtl_psm_request_t * mtl_psm_request = (mca_mtl_psm_request_t*) mtl_request; uint64_t mqtag; uint64_t tagsel; size_t length; - + ret = ompi_mtl_datatype_recv_buf(convertor, &mtl_psm_request->buf, - &length, + &length, &mtl_psm_request->free_after); - + if (OMPI_SUCCESS != ret) return ret; mtl_psm_request->length = length; @@ -59,7 +59,7 @@ ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl, #if 0 printf("recv bits: 0x%016llx 0x%016llx\n", mqtag, tagsel); #endif - err = psm_mq_irecv(ompi_mtl_psm.mq, + err = psm_mq_irecv(ompi_mtl_psm.mq, mqtag, tagsel, 0, @@ -67,7 +67,7 @@ ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl, length, mtl_psm_request, &mtl_psm_request->psm_request); - + if (err) { opal_show_help("help-mtl-psm.txt", "error posting receive", true, diff --git a/ompi/mca/mtl/psm/mtl_psm_request.h b/ompi/mca/mtl/psm/mtl_psm_request.h index 98662e64631..2188c9096f9 100644 --- a/ompi/mca/mtl/psm/mtl_psm_request.h +++ b/ompi/mca/mtl/psm/mtl_psm_request.h @@ -5,15 +5,15 @@ * 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, + * 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) 2006 QLogic Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ typedef enum { OMPI_MTL_PSM_IRECV } mca_mtl_psm_request_type_t; -struct mca_mtl_psm_request_t { +struct mca_mtl_psm_request_t { struct mca_mtl_request_t super; mca_mtl_psm_request_type_t type; psm_mq_req_t psm_request; @@ -37,7 +37,7 @@ struct mca_mtl_psm_request_t { size_t length; struct opal_convertor_t *convertor; bool free_after; -}; +}; typedef struct mca_mtl_psm_request_t mca_mtl_psm_request_t; #endif diff --git a/ompi/mca/mtl/psm/mtl_psm_send.c b/ompi/mca/mtl/psm/mtl_psm_send.c index 4f53da54938..ddedd652654 100644 --- a/ompi/mca/mtl/psm/mtl_psm_send.c +++ b/ompi/mca/mtl/psm/mtl_psm_send.c @@ -28,7 +28,7 @@ #include "ompi/mca/mtl/base/mtl_base_datatype.h" int -ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl, +ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t* comm, int dest, int tag, @@ -47,13 +47,13 @@ ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl, assert(mtl == &ompi_mtl_psm.super); mqtag = PSM_MAKE_MQTAG(comm->c_contextid, comm->c_my_rank, tag); - - ret = ompi_mtl_datatype_pack(convertor, + + ret = ompi_mtl_datatype_pack(convertor, &mtl_psm_request.buf, - &length, + &length, &mtl_psm_request.free_after); - + mtl_psm_request.length = length; mtl_psm_request.convertor = convertor; mtl_psm_request.type = OMPI_MTL_PSM_ISEND; @@ -78,7 +78,7 @@ ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl, } int -ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, +ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, struct ompi_communicator_t* comm, int dest, int tag, @@ -100,10 +100,10 @@ ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, mqtag = PSM_MAKE_MQTAG(comm->c_contextid, comm->c_my_rank, tag); - - ret = ompi_mtl_datatype_pack(convertor, + + ret = ompi_mtl_datatype_pack(convertor, &mtl_psm_request->buf, - &length, + &length, &mtl_psm_request->free_after); mtl_psm_request->length= length; @@ -114,7 +114,7 @@ ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS) flags |= PSM_MQ_FLAG_SENDSYNC; - + psm_error = psm_mq_isend(ompi_mtl_psm.mq, psm_endpoint->peer_addr, flags, @@ -123,6 +123,6 @@ ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl, length, mtl_psm_request, &mtl_psm_request->psm_request); - + return psm_error == PSM_OK ? OMPI_SUCCESS : OMPI_ERROR; } diff --git a/ompi/mca/mtl/psm/mtl_psm_types.h b/ompi/mca/mtl/psm/mtl_psm_types.h index 8516b688e97..9c31f8bd041 100644 --- a/ompi/mca/mtl/psm/mtl_psm_types.h +++ b/ompi/mca/mtl/psm/mtl_psm_types.h @@ -27,27 +27,27 @@ #include "ompi/mca/mtl/mtl.h" #include "ompi/mca/mtl/base/base.h" -#include "mtl_psm_endpoint.h" +#include "mtl_psm_endpoint.h" #include "psm.h" BEGIN_C_DECLS -/** +/** * MTL Module Interface */ -struct mca_mtl_psm_module_t { +struct mca_mtl_psm_module_t { mca_mtl_base_module_t super; /**< base MTL interface */ int32_t connect_timeout; - + int32_t debug_level; int32_t ib_unit; int32_t ib_port; int32_t ib_service_level; uint64_t ib_pkey; - + #if PSM_VERNO >= 0x010d unsigned long long ib_service_id; /* use int instead of psm_path_res_t so we can register this with @@ -59,19 +59,19 @@ struct mca_mtl_psm_module_t { psm_mq_t mq; psm_epid_t epid; psm_epaddr_t epaddr; -}; +}; typedef struct mca_mtl_psm_module_t mca_mtl_psm_module_t; extern mca_mtl_psm_module_t ompi_mtl_psm; -struct mca_mtl_psm_component_t { - mca_mtl_base_component_2_0_0_t super; /**< base MTL component */ +struct mca_mtl_psm_component_t { + mca_mtl_base_component_2_0_0_t super; /**< base MTL component */ }; typedef struct mca_mtl_psm_component_t mca_mtl_psm_component_t; OMPI_DECLSPEC extern mca_mtl_psm_component_t mca_mtl_psm_component; - + #define PSM_MAKE_MQTAG(ctxt,rank,utag) \ ( (((ctxt)&0xffffULL)<<48)| (((rank)&0xffffULL)<<32)| \ (((utag)&0xffffffffULL)) ) diff --git a/ompi/mca/op/Makefile.am b/ompi/mca/op/Makefile.am index c90f533e0b8..8c392f1dbec 100644 --- a/ompi/mca/op/Makefile.am +++ b/ompi/mca/op/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/op/base/Makefile.include b/ompi/mca/op/base/Makefile.include index 65cf72f54bd..8d778090f36 100644 --- a/ompi/mca/op/base/Makefile.include +++ b/ompi/mca/op/base/Makefile.include @@ -6,15 +6,15 @@ # 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, +# 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) 2008-2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/op/base/base.h b/ompi/mca/op/base/base.h index 2aed7fc50a2..f26992c23a5 100644 --- a/ompi/mca/op/base/base.h +++ b/ompi/mca/op/base/base.h @@ -5,16 +5,16 @@ * 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, + * 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) 2006 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -37,7 +37,7 @@ #include "opal/mca/base/base.h" #include "ompi/mca/op/op.h" -BEGIN_C_DECLS +BEGIN_C_DECLS typedef struct ompi_op_base_selected_module_t { opal_list_item_t super; diff --git a/ompi/mca/op/base/functions.h b/ompi/mca/op/base/functions.h index 9df49a75372..b5d37d70a4b 100644 --- a/ompi/mca/op/base/functions.h +++ b/ompi/mca/op/base/functions.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,9 +33,9 @@ BEGIN_C_DECLS * Globals holding all the "base" function pointers, indexed by op and * datatype. */ -OMPI_DECLSPEC extern ompi_op_base_handler_fn_t +OMPI_DECLSPEC extern ompi_op_base_handler_fn_t ompi_op_base_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX]; -OMPI_DECLSPEC extern ompi_op_base_3buff_handler_fn_t +OMPI_DECLSPEC extern ompi_op_base_3buff_handler_fn_t ompi_op_base_3buff_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX]; END_C_DECLS diff --git a/ompi/mca/op/base/help-mca-op-base.txt b/ompi/mca/op/base/help-mca-op-base.txt index 1ab8bbf71f5..d67c4fc03d9 100644 --- a/ompi/mca/op/base/help-mca-op-base.txt +++ b/ompi/mca/op/base/help-mca-op-base.txt @@ -6,19 +6,19 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI MCA op-specific -# error messages. +# error messages. # [op-select:none-available] Although some op components are available on your system, none of @@ -30,7 +30,7 @@ else is wrong with either your Open MPI installation or your system. # [op-unselect:failed-finalize] A op module failed to finalize properly when a MPI_Op that was -using it was destroyed. +using it was destroyed. This is somewhat unusual: the module itself may be at fault, or this may be a symptom of another issue (e.g., a memory problem). diff --git a/ompi/mca/op/base/op_base_find_available.c b/ompi/mca/op/base/op_base_find_available.c index 50ef4e2b506..3fdaf86f18c 100644 --- a/ompi/mca/op/base/op_base_find_available.c +++ b/ompi/mca/op/base/op_base_find_available.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -142,7 +142,7 @@ static int init_query(const mca_base_component_t * c, * Query a specific component, op v2.0.0 */ static int init_query_1_0_0(const mca_base_component_t * component, - bool enable_progress_threads, + bool enable_progress_threads, bool enable_mpi_threads) { ompi_op_base_component_1_0_0_t *op = diff --git a/ompi/mca/op/base/op_base_frame.c b/ompi/mca/op/base/op_base_frame.c index ffe0dde776c..90167300851 100644 --- a/ompi/mca/op/base/op_base_frame.c +++ b/ompi/mca/op/base/op_base_frame.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -54,9 +54,9 @@ static void module_constructor_1_0_0(ompi_op_base_module_1_0_0_t *m) memset(&(m->opm_3buff_fns), 0, sizeof(m->opm_3buff_fns)); } -OBJ_CLASS_INSTANCE(ompi_op_base_module_t, opal_object_t, +OBJ_CLASS_INSTANCE(ompi_op_base_module_t, opal_object_t, module_constructor, NULL); -OBJ_CLASS_INSTANCE(ompi_op_base_module_1_0_0_t, opal_object_t, +OBJ_CLASS_INSTANCE(ompi_op_base_module_1_0_0_t, opal_object_t, module_constructor_1_0_0, NULL); MCA_BASE_FRAMEWORK_DECLARE(ompi, op, NULL, NULL, NULL, NULL, diff --git a/ompi/mca/op/base/op_base_functions.c b/ompi/mca/op/base/op_base_functions.c index ee79a3bb26b..99a248f85c7 100644 --- a/ompi/mca/op/base/op_base_functions.c +++ b/ompi/mca/op/base/op_base_functions.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -1370,7 +1370,7 @@ LOC_FUNC_3BUF(minloc, long_double_int, <) (OMPI_OP_FLAGS_INTRINSIC | OMPI_OP_FLAGS_ASSOC | \ OMPI_OP_FLAGS_FLOAT_ASSOC | OMPI_OP_FLAGS_COMMUTE) -ompi_op_base_handler_fn_t ompi_op_base_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX] = +ompi_op_base_handler_fn_t ompi_op_base_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX] = { /* Corresponds to MPI_OP_NULL */ [OMPI_OP_BASE_FORTRAN_NULL] = { @@ -1457,7 +1457,7 @@ ompi_op_base_handler_fn_t ompi_op_base_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OM }; -ompi_op_base_3buff_handler_fn_t ompi_op_base_3buff_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX] = +ompi_op_base_3buff_handler_fn_t ompi_op_base_3buff_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX] = { /* Corresponds to MPI_OP_NULL */ [OMPI_OP_BASE_FORTRAN_NULL] = { diff --git a/ompi/mca/op/base/op_base_op_select.c b/ompi/mca/op/base/op_base_op_select.c index 5586882fb78..8312414703d 100644 --- a/ompi/mca/op/base/op_base_op_select.c +++ b/ompi/mca/op/base/op_base_op_select.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -57,17 +57,17 @@ typedef struct avail_op_t { /* * Local functions */ -static opal_list_t *check_components(opal_list_t *components, +static opal_list_t *check_components(opal_list_t *components, ompi_op_t *op); -static int check_one_component(ompi_op_t *op, +static int check_one_component(ompi_op_t *op, const mca_base_component_t *component, ompi_op_base_module_1_0_0_t **module); -static int query(const mca_base_component_t *component, +static int query(const mca_base_component_t *component, ompi_op_t *op, int *priority, ompi_op_base_module_1_0_0_t **module); -static int query_1_0_0(const ompi_op_base_component_1_0_0_t *op_component, +static int query_1_0_0(const ompi_op_base_component_1_0_0_t *op_component, ompi_op_t *op, int *priority, ompi_op_base_module_1_0_0_t **module); @@ -94,7 +94,7 @@ int ompi_op_base_op_select(ompi_op_t *op) /* Announce */ opal_output_verbose(10, ompi_op_base_framework.framework_output, - "op:base:op_select: new op: %s", + "op:base:op_select: new op: %s", op->o_name); /* Make a module for all the base functions so that other modules @@ -110,7 +110,7 @@ int ompi_op_base_op_select(ompi_op_t *op) memset(&op->o_func, 0, sizeof(op->o_func)); memset(&op->o_3buff_intrinsic, 0, sizeof(op->o_3buff_intrinsic)); for (i = 0; i < OMPI_OP_BASE_TYPE_MAX; ++i) { - op->o_func.intrinsic.fns[i] = + op->o_func.intrinsic.fns[i] = ompi_op_base_functions[op->o_f_to_c_index][i]; op->o_func.intrinsic.modules[i] = module; OBJ_RETAIN(module); @@ -126,14 +126,14 @@ int ompi_op_base_op_select(ompi_op_t *op) /* Check for any components that want to run. It's not an error if there are none; we'll just use all the base functions in this case. */ - opal_output_verbose(10, ompi_op_base_framework.framework_output, + opal_output_verbose(10, ompi_op_base_framework.framework_output, "op:base:op_select: Checking all available components"); selectable = check_components(&ompi_op_base_framework.framework_components, op); /* Do the selection loop. The selectable list is in priority order; lowest priority first. */ for (item = opal_list_remove_first(selectable); - NULL != item; + NULL != item; item = opal_list_remove_first(selectable)) { avail_op_t *avail = (avail_op_t*) item; @@ -162,7 +162,7 @@ int ompi_op_base_op_select(ompi_op_t *op) /* 3-buffer variants */ if (NULL != avail->ao_module->opm_3buff_fns[i]) { OBJ_RELEASE(op->o_func.intrinsic.modules[i]); - op->o_3buff_intrinsic.fns[i] = + op->o_3buff_intrinsic.fns[i] = avail->ao_module->opm_3buff_fns[i]; op->o_3buff_intrinsic.modules[i] = avail->ao_module; OBJ_RETAIN(avail->ao_module); @@ -224,7 +224,7 @@ static int avail_op_compare(opal_list_item_t **itema, * only those who returned that they want to run, and put them in * priority order (lowest to highest). */ -static opal_list_t *check_components(opal_list_t *components, +static opal_list_t *check_components(opal_list_t *components, ompi_op_t *op) { int priority; @@ -233,7 +233,7 @@ static opal_list_t *check_components(opal_list_t *components, ompi_op_base_module_1_0_0_t *module; opal_list_t *selectable; avail_op_t *avail; - + /* Make a list of the components that query successfully */ selectable = OBJ_NEW(opal_list_t); @@ -251,7 +251,7 @@ static opal_list_t *check_components(opal_list_t *components, avail = OBJ_NEW(avail_op_t); avail->ao_priority = priority; avail->ao_module = module; - + opal_list_append(selectable, (opal_list_item_t*)avail); } } @@ -266,7 +266,7 @@ static opal_list_t *check_components(opal_list_t *components, /* * Check a single component */ -static int check_one_component(ompi_op_t *op, +static int check_one_component(ompi_op_t *op, const mca_base_component_t *component, ompi_op_base_module_1_0_0_t **module) { @@ -277,13 +277,13 @@ static int check_one_component(ompi_op_t *op, if (OMPI_SUCCESS == err) { priority = (priority < 100) ? priority : 100; - opal_output_verbose(10, ompi_op_base_framework.framework_output, - "op:base:op_select: component available: %s, priority: %d", + opal_output_verbose(10, ompi_op_base_framework.framework_output, + "op:base:op_select: component available: %s, priority: %d", component->mca_component_name, priority); } else { priority = -1; - opal_output_verbose(10, ompi_op_base_framework.framework_output, + opal_output_verbose(10, ompi_op_base_framework.framework_output, "op:base:op_select: component not available: %s", component->mca_component_name); } @@ -300,19 +300,19 @@ static int check_one_component(ompi_op_t *op, * Take any version of a op module, query it, and return the right * module struct */ -static int query(const mca_base_component_t *component, - ompi_op_t *op, +static int query(const mca_base_component_t *component, + ompi_op_t *op, int *priority, ompi_op_base_module_1_0_0_t **module) { *module = NULL; if (1 == component->mca_type_major_version && 0 == component->mca_type_minor_version && 0 == component->mca_type_release_version) { - const ompi_op_base_component_1_0_0_t *op100 = + const ompi_op_base_component_1_0_0_t *op100 = (ompi_op_base_component_1_0_0_t *) component; return query_1_0_0(op100, op, priority, module); - } + } /* Unknown op API version -- return error */ diff --git a/ompi/mca/op/example/Makefile.am b/ompi/mca/op/example/Makefile.am index 3499b39a4ae..62626c10976 100644 --- a/ompi/mca/op/example/Makefile.am +++ b/ompi/mca/op/example/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -71,7 +71,7 @@ mcacomponent_LTLIBRARIES = $(component) mca_op_example_la_SOURCES = $(component_sources) mca_op_example_la_LDFLAGS = -module -avoid-version -# Specific information for static builds. +# Specific information for static builds. # # Note that we *must* "noinst"; the upper-layer Makefile.am's will # slurp in the resulting .la library into libmpi. diff --git a/ompi/mca/op/example/README.txt b/ompi/mca/op/example/README.txt index 3a4706eb5c3..af4d75d58a2 100644 --- a/ompi/mca/op/example/README.txt +++ b/ompi/mca/op/example/README.txt @@ -39,7 +39,7 @@ may not be worthwhile to use the hardware unless the amount of data to be processed is "big enough" (meaning that the cost of the registration and/or copy-in/copy-out is ameliorated) or the memory to be processed is already registered or is otherwise local to the the -accelerator hardware. +accelerator hardware. Hence, at run-time, the module may choose to use the accelerator hardware or fail over to a "basic" version of the operation. This @@ -96,7 +96,7 @@ Now your component should be fully functional (although entirely renamed as "foo" instead of "example"). You can go to the top-level OMPI directory and run "autogen.pl" (which will find your component and att it to the configure/build process) and then "configure ..." -and "make ..." as normal. +and "make ..." as normal. shell$ cd (top_ompi_dir) shell$ ./autogen.pl @@ -109,7 +109,7 @@ shell$ make install # ...lots of output... After you have installed Open MPI, running "ompi_info" should show -your "foo" component in the output. +your "foo" component in the output. shell$ ompi_info | grep op: MCA op: example (MCA v2.0, API v1.0, Component v1.4) @@ -121,5 +121,5 @@ the output of autogen.pl, configure, and make to ensure that "foo" was found, configured, and built successfully. Once ompi_info sees your component, start editing the "foo" component -files in a meaningful way. +files in a meaningful way. diff --git a/ompi/mca/op/example/configure.m4 b/ompi/mca/op/example/configure.m4 index 12c8c124ac3..a15970ccdc2 100644 --- a/ompi/mca/op/example/configure.m4 +++ b/ompi/mca/op/example/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -23,7 +23,7 @@ # This script must define (via AC_DEFUN) an m4 macro named # MCA___CONFIG that executes either $1 if the # component wants to build itself, or $2 if the component does not -# want to build itself. +# want to build itself. # Do *NOT* invoke AC_MSG_ERROR, or any other macro that will abort # configure, except upon catastrophic error. For example, it *is* a @@ -40,7 +40,7 @@ AC_DEFUN([MCA_ompi_op_example_CONFIG],[ AC_CONFIG_FILES([ompi/mca/op/example/Makefile]) # Add checks here for any necessary header files and/or libraries - # that must be present to compile your component. + # that must be present to compile your component. # This example performs a fairly simple test (checking for the # "struct sockaddr_in" C type), just for the sake of showing you @@ -48,9 +48,9 @@ AC_DEFUN([MCA_ompi_op_example_CONFIG],[ # of the test. # check for sockaddr_in (a good sign we have TCP) - AC_CHECK_TYPES([struct sockaddr_in], + AC_CHECK_TYPES([struct sockaddr_in], [$1], - [$2], + [$2], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include diff --git a/ompi/mca/op/example/op_example.h b/ompi/mca/op/example/op_example.h index c70d0b50a59..eaaba98534d 100644 --- a/ompi/mca/op/example/op_example.h +++ b/ompi/mca/op/example/op_example.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -85,7 +85,7 @@ OBJ_CLASS_DECLARATION(ompi_op_example_module_bxor_t); * itself can cache additional information after that that can be used * by both the component and modules. */ -OMPI_DECLSPEC extern ompi_op_example_component_t +OMPI_DECLSPEC extern ompi_op_example_component_t mca_op_example_component; /** diff --git a/ompi/mca/op/example/op_example_component.c b/ompi/mca/op/example/op_example_component.c index 750227838a5..43a1e6d71f2 100644 --- a/ompi/mca/op/example/op_example_component.c +++ b/ompi/mca/op/example/op_example_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -132,7 +132,7 @@ static int example_component_register(void) containing the major.minor.release version number from the libfoo support library (see configure.m4 for how we got these C macros). */ - asprintf(&str, "%s.%s.%s", + asprintf(&str, "%s.%s.%s", OP_EXAMPLE_LIBFOO_VERSION_MAJOR, OP_EXAMPLE_LIBFOO_VERSION_MINOR, OP_EXAMPLE_LIBFOO_VERSION_RELEASE); diff --git a/ompi/mca/op/example/op_example_module_bxor.c b/ompi/mca/op/example/op_example_module_bxor.c index aa83f8e1360..23a90ede488 100644 --- a/ompi/mca/op/example/op_example_module_bxor.c +++ b/ompi/mca/op/example/op_example_module_bxor.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -109,7 +109,7 @@ static OBJ_CLASS_INSTANCE(module_bxor_t, /** * Bxor function for C int */ -static void bxor_int(void *in, void *out, int *count, +static void bxor_int(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_bxor_t *m = (module_bxor_t*) module; @@ -143,7 +143,7 @@ static void bxor_int(void *in, void *out, int *count, /** * Bxor function for C long */ -static void bxor_long(void *in, void *out, int *count, +static void bxor_long(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_bxor_t *m = (module_bxor_t*) module; @@ -157,7 +157,7 @@ static void bxor_long(void *in, void *out, int *count, /** * Bxor function for Fortran INTEGER */ -static void bxor_integer(void *in, void *out, int *count, +static void bxor_integer(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_bxor_t *m = (module_bxor_t*) module; @@ -193,7 +193,7 @@ ompi_op_base_module_t *ompi_op_example_setup_bxor(ompi_op_t *op) /* C int */ module->super.opm_fns[OMPI_OP_BASE_TYPE_INT] = bxor_int; module->fallback_int = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT]; - module->fallback_int_module = + module->fallback_int_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT]; /* If you cache a fallback function, you *must* RETAIN (i.e., increase the refcount) its module so that the module knows that @@ -203,15 +203,15 @@ ompi_op_base_module_t *ompi_op_example_setup_bxor(ompi_op_t *op) /* C long */ module->super.opm_fns[OMPI_OP_BASE_TYPE_LONG] = bxor_long; module->fallback_long = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_LONG]; - module->fallback_long_module = + module->fallback_long_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_LONG]; OBJ_RETAIN(module->fallback_long_module); /* Fortran INTEGER */ module->super.opm_fns[OMPI_OP_BASE_TYPE_INTEGER] = bxor_integer; - module->fallback_integer = + module->fallback_integer = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INTEGER]; - module->fallback_integer_module = + module->fallback_integer_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INTEGER]; OBJ_RETAIN(module->fallback_integer_module); diff --git a/ompi/mca/op/example/op_example_module_max.c b/ompi/mca/op/example/op_example_module_max.c index 9eb11add42d..4c43ecf22a4 100644 --- a/ompi/mca/op/example/op_example_module_max.c +++ b/ompi/mca/op/example/op_example_module_max.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -118,7 +118,7 @@ static OBJ_CLASS_INSTANCE(module_max_t, /** * Max function for C float */ -static void max_float(void *in, void *out, int *count, +static void max_float(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_max_t *m = (module_max_t*) module; @@ -152,7 +152,7 @@ static void max_float(void *in, void *out, int *count, /** * Max function for C double */ -static void max_double(void *in, void *out, int *count, +static void max_double(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_max_t *m = (module_max_t*) module; @@ -166,7 +166,7 @@ static void max_double(void *in, void *out, int *count, /** * Max function for Fortran REAL */ -static void max_real(void *in, void *out, int *count, +static void max_real(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_max_t *m = (module_max_t*) module; @@ -180,8 +180,8 @@ static void max_real(void *in, void *out, int *count, /** * Max function for Fortran DOUBLE PRECISION */ -static void max_double_precision(void *in, void *out, int *count, - ompi_datatype_t **type, +static void max_double_precision(void *in, void *out, int *count, + ompi_datatype_t **type, ompi_op_base_module_t *module) { module_max_t *m = (module_max_t*) module; @@ -189,7 +189,7 @@ static void max_double_precision(void *in, void *out, int *count, /* Just another example function -- similar to max_int() */ - m->fallback_double_precision(in, out, count, type, + m->fallback_double_precision(in, out, count, type, m->fallback_double_precision_module); } @@ -215,7 +215,7 @@ ompi_op_base_module_t *ompi_op_example_setup_max(ompi_op_t *op) /* C float */ module->super.opm_fns[OMPI_OP_BASE_TYPE_FLOAT] = max_float; module->fallback_float = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_FLOAT]; - module->fallback_float_module = + module->fallback_float_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_FLOAT]; /* If you cache a fallback function, you *must* RETAIN (i.e., increase the refcount) its module so that the module knows that @@ -224,9 +224,9 @@ ompi_op_base_module_t *ompi_op_example_setup_max(ompi_op_t *op) /* Fortran REAL */ module->super.opm_fns[OMPI_OP_BASE_TYPE_REAL] = max_real; - module->fallback_real = + module->fallback_real = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_REAL]; - module->fallback_real_module = + module->fallback_real_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_REAL]; OBJ_RETAIN(module->fallback_real_module); @@ -235,18 +235,18 @@ ompi_op_base_module_t *ompi_op_example_setup_max(ompi_op_t *op) if (mca_op_example_component.double_supported) { /* C double */ module->super.opm_fns[OMPI_OP_BASE_TYPE_DOUBLE] = max_double; - module->fallback_double = + module->fallback_double = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_DOUBLE]; - module->fallback_double_module = + module->fallback_double_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_DOUBLE]; OBJ_RETAIN(module->fallback_double_module); - + /* Fortran DOUBLE PRECISION */ - module->super.opm_fns[OMPI_OP_BASE_TYPE_DOUBLE_PRECISION] = + module->super.opm_fns[OMPI_OP_BASE_TYPE_DOUBLE_PRECISION] = max_double_precision; - module->fallback_double_precision = + module->fallback_double_precision = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_DOUBLE_PRECISION]; - module->fallback_double_precision_module = + module->fallback_double_precision_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_DOUBLE_PRECISION]; OBJ_RETAIN(module->fallback_double_precision_module); } diff --git a/ompi/mca/op/op.h b/ompi/mca/op/op.h index e27950fb45d..a4006b20c61 100644 --- a/ompi/mca/op/op.h +++ b/ompi/mca/op/op.h @@ -6,20 +6,20 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007-2008 UT-Battelle, LLC * Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -243,7 +243,7 @@ struct ompi_op_base_module_1_0_0_t; typedef struct ompi_op_base_module_1_0_0_t ompi_op_base_module_t; /** - * Typedef for 2-buffer op functions. + * Typedef for 2-buffer op functions. * * We don't use MPI_User_function because this would create a * confusing dependency loop between this file and mpi.h. So this is @@ -305,7 +305,7 @@ typedef int (*ompi_op_base_component_init_query_fn_t) * not wish to run or return an error during module_enable(). * * @param[in] op The MPI_Op being created - * @param[out] priority Priority setting for component on + * @param[out] priority Priority setting for component on * this op * * @returns An initialized module structure if the component can @@ -385,7 +385,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_op_base_module_1_0_0_t); /** * Struct that is used in op.h to hold all the function pointers and * pointers to the corresopnding modules (so that we can properly - * RETAIN/RELEASE them) + * RETAIN/RELEASE them) */ typedef struct ompi_op_base_op_fns_1_0_0_t { ompi_op_base_handler_fn_1_0_0_t fns[OMPI_OP_BASE_TYPE_MAX]; @@ -397,7 +397,7 @@ typedef ompi_op_base_op_fns_1_0_0_t ompi_op_base_op_fns_t; /** * Struct that is used in op.h to hold all the function pointers and * pointers to the corresopnding modules (so that we can properly - * RETAIN/RELEASE them) + * RETAIN/RELEASE them) */ typedef struct ompi_op_base_op_3buff_fns_1_0_0_t { ompi_op_base_3buff_handler_fn_1_0_0_t fns[OMPI_OP_BASE_TYPE_MAX]; diff --git a/ompi/mca/op/x86/Makefile.am b/ompi/mca/op/x86/Makefile.am index 947f09f13b5..71d092fd42b 100644 --- a/ompi/mca/op/x86/Makefile.am +++ b/ompi/mca/op/x86/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -44,7 +44,7 @@ mcacomponent_LTLIBRARIES = $(component) mca_op_x86_la_SOURCES = $(component_sources) mca_op_x86_la_LDFLAGS = -module -avoid-version -# Specific information for static builds. +# Specific information for static builds. # # Note that we *must* "noinst"; the upper-layer Makefile.am's will # slurp in the resulting .la library into libmpi. diff --git a/ompi/mca/op/x86/configure.m4 b/ompi/mca/op/x86/configure.m4 index 4f5665be0e8..237e2b5bd0f 100644 --- a/ompi/mca/op/x86/configure.m4 +++ b/ompi/mca/op/x86/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -24,9 +24,9 @@ AC_DEFUN([MCA_ompi_op_x86_CONFIG],[ AC_CONFIG_FILES([ompi/mca/op/x86/Makefile]) # check for sockaddr_in (a good sign we have TCP) - AC_CHECK_TYPES([struct sockaddr_in], + AC_CHECK_TYPES([struct sockaddr_in], [$1], - [$2], + [$2], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include diff --git a/ompi/mca/op/x86/op_x86.h b/ompi/mca/op/x86/op_x86.h index 7a8a51ccc83..c20e8da8604 100644 --- a/ompi/mca/op/x86/op_x86.h +++ b/ompi/mca/op/x86/op_x86.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ typedef struct { /** * Derive a struct from the base op module struct, allowing us to - * cache some module-specific information for SUM. + * cache some module-specific information for SUM. */ typedef struct { ompi_op_base_module_1_0_0_t super; diff --git a/ompi/mca/op/x86/op_x86_component.c b/ompi/mca/op/x86/op_x86_component.c index 67cabee6141..a9c10cf712b 100644 --- a/ompi/mca/op/x86/op_x86_component.c +++ b/ompi/mca/op/x86/op_x86_component.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -183,7 +183,7 @@ static int x86_component_register(void) MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &x86_sse3_available); + &x86_sse3_available); return OMPI_SUCCESS; } diff --git a/ompi/mca/op/x86/op_x86_module_sum.c b/ompi/mca/op/x86/op_x86_module_sum.c index 0dfedc92076..40a5631b68d 100644 --- a/ompi/mca/op/x86/op_x86_module_sum.c +++ b/ompi/mca/op/x86/op_x86_module_sum.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -101,7 +101,7 @@ static OBJ_CLASS_INSTANCE(module_sum_t, /** * Sum function for C float */ -static void sum_float(void *in, void *out, int *count, +static void sum_float(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_sum_t *m = (module_sum_t*) module; @@ -114,7 +114,7 @@ static void sum_float(void *in, void *out, int *count, /** * Sum function for C int16_t */ -static void sum_int16_t(void *in, void *out, int *count, +static void sum_int16_t(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_sum_t *m = (module_sum_t*) module; @@ -124,7 +124,7 @@ static void sum_int16_t(void *in, void *out, int *count, /** * Sum function for C int32_t */ -static void sum_int32_t(void *in, void *out, int *count, +static void sum_int32_t(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_sum_t *m = (module_sum_t*) module; @@ -134,7 +134,7 @@ static void sum_int32_t(void *in, void *out, int *count, /** * Sum function for C int64_t */ -static void sum_int64_t(void *in, void *out, int *count, +static void sum_int64_t(void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module) { module_sum_t *m = (module_sum_t*) module; @@ -165,7 +165,7 @@ ompi_op_base_module_t *ompi_op_x86_setup_sum(ompi_op_t *op) /* C float */ module->super.opm_fns[OMPI_OP_BASE_TYPE_FLOAT] = sum_float; module->fallback_float = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_FLOAT]; - module->fallback_float_module = + module->fallback_float_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_FLOAT]; /* If you cache a fallback function, you *must* RETAIN (i.e., increase the refcount) its module so that the module knows that @@ -175,7 +175,7 @@ ompi_op_base_module_t *ompi_op_x86_setup_sum(ompi_op_t *op) /* C int16_t */ module->super.opm_fns[OMPI_OP_BASE_TYPE_INT16_T] = sum_int16_t; module->fallback_int16_t = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT16_T]; - module->fallback_int16_t_module = + module->fallback_int16_t_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT16_T]; /* If you cache a fallback function, you *must* RETAIN (i.e., increase the refcount) its module so that the module knows that @@ -185,7 +185,7 @@ ompi_op_base_module_t *ompi_op_x86_setup_sum(ompi_op_t *op) /* C int32_t */ module->super.opm_fns[OMPI_OP_BASE_TYPE_INT32_T] = sum_int32_t; module->fallback_int32_t = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT32_T]; - module->fallback_int32_t_module = + module->fallback_int32_t_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT32_T]; /* If you cache a fallback function, you *must* RETAIN (i.e., increase the refcount) its module so that the module knows that @@ -195,7 +195,7 @@ ompi_op_base_module_t *ompi_op_x86_setup_sum(ompi_op_t *op) /* C int64_t */ module->super.opm_fns[OMPI_OP_BASE_TYPE_INT64_T] = sum_int64_t; module->fallback_int64_t = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT64_T]; - module->fallback_int64_t_module = + module->fallback_int64_t_module = op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT64_T]; /* If you cache a fallback function, you *must* RETAIN (i.e., increase the refcount) its module so that the module knows that diff --git a/ompi/mca/osc/Makefile.am b/ompi/mca/osc/Makefile.am index 5f0add5bd75..464d64bff4c 100644 --- a/ompi/mca/osc/Makefile.am +++ b/ompi/mca/osc/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/osc/base/Makefile.am b/ompi/mca/osc/base/Makefile.am index a79b091af3b..1e065f72c95 100644 --- a/ompi/mca/osc/base/Makefile.am +++ b/ompi/mca/osc/base/Makefile.am @@ -3,14 +3,14 @@ # 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, +# 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$ # diff --git a/ompi/mca/osc/base/base.h b/ompi/mca/osc/base/base.h index 680942e6015..bb368be82b9 100644 --- a/ompi/mca/osc/base/base.h +++ b/ompi/mca/osc/base/base.h @@ -3,14 +3,14 @@ * All rights reserved. * Copyright (c) 2004-2006 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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: diff --git a/ompi/mca/osc/base/osc_base_frame.c b/ompi/mca/osc/base/osc_base_frame.c index fe4751f6206..24a6a9dc126 100644 --- a/ompi/mca/osc/base/osc_base_frame.c +++ b/ompi/mca/osc/base/osc_base_frame.c @@ -3,16 +3,16 @@ * 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, + * 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) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,7 +65,7 @@ ompi_osc_base_finalize(void) opal_list_item_t* item; /* Finalize all available modules */ - while (NULL != + while (NULL != (item = opal_list_remove_first(&ompi_osc_base_framework.framework_components))) { ompi_osc_base_component_t *component = (ompi_osc_base_component_t*) ((mca_base_component_list_item_t*) item)->cli_component; diff --git a/ompi/mca/osc/base/osc_base_init.c b/ompi/mca/osc/base/osc_base_init.c index 57d42081349..1e0cba6629a 100644 --- a/ompi/mca/osc/base/osc_base_init.c +++ b/ompi/mca/osc/base/osc_base_init.c @@ -4,16 +4,16 @@ * 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, + * 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) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/osc/base/osc_base_obj_convert.c b/ompi/mca/osc/base/osc_base_obj_convert.c index 0a2d5c70572..b90873f6edb 100644 --- a/ompi/mca/osc/base/osc_base_obj_convert.c +++ b/ompi/mca/osc/base/osc_base_obj_convert.c @@ -4,21 +4,21 @@ * All rights reserved. * Copyright (c) 2004-2006 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,7 +43,7 @@ int ompi_osc_base_get_primitive_type_info(ompi_datatype_t *datatype, - ompi_datatype_t **prim_datatype, + ompi_datatype_t **prim_datatype, uint32_t *prim_count) { ompi_datatype_t *primitive_datatype = NULL; diff --git a/ompi/mca/osc/base/osc_base_obj_convert.h b/ompi/mca/osc/base/osc_base_obj_convert.h index bc9db2bc57b..4163670a085 100644 --- a/ompi/mca/osc/base/osc_base_obj_convert.h +++ b/ompi/mca/osc/base/osc_base_obj_convert.h @@ -3,16 +3,16 @@ * 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, + * 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) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -98,7 +98,7 @@ ompi_osc_base_op_create(int op_id) * @retval OMPI_SUCCESS Success */ OMPI_DECLSPEC int ompi_osc_base_get_primitive_type_info(ompi_datatype_t *datatype, - ompi_datatype_t **prim_datatype, + ompi_datatype_t **prim_datatype, uint32_t *prim_count); diff --git a/ompi/mca/osc/osc.h b/ompi/mca/osc/osc.h index b46fc3c4c1f..61ae2880036 100644 --- a/ompi/mca/osc/osc.h +++ b/ompi/mca/osc/osc.h @@ -4,24 +4,24 @@ * All rights reserved. * Copyright (c) 2004-2011 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * One-sided Communication interface * * Interface for implementing the one-sided communication chapter of @@ -127,13 +127,13 @@ typedef int (*ompi_osc_base_component_query_fn_t)(struct ompi_win_t *win, * memory can be associated with this window. The module should be * ready for use immediately upon return of this function, and the * module is responsible for providing any required collective - * synchronization before the end of the call. + * synchronization before the end of the call. * * @note The comm is the communicator specified from the user, so * normal internal usage rules apply. In other words, if you need * communication for the life of the window, you should call * comm_dup() during this function. - * + * * @param[in/out] win The window handle, already filled in by MPI_WIN_CREATE() * @param[in] info An info structure with hints from the user * regarding the usage of the component @@ -252,14 +252,14 @@ typedef int (*ompi_osc_base_module_fetch_and_op_fn_t)(const void *origin_addr, typedef int (*ompi_osc_base_module_get_accumulate_fn_t)(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_datatype, - int target_rank, - OPAL_PTRDIFF_TYPE target_disp, + int target_rank, + OPAL_PTRDIFF_TYPE target_disp, int target_count, - struct ompi_datatype_t *target_datatype, - struct ompi_op_t *op, + struct ompi_datatype_t *target_datatype, + struct ompi_op_t *op, struct ompi_win_t *win); typedef int (*ompi_osc_base_module_rput_fn_t)(const void *origin_addr, @@ -297,14 +297,14 @@ typedef int (*ompi_osc_base_module_raccumulate_fn_t)(const void *origin_addr, typedef int (*ompi_osc_base_module_rget_accumulate_fn_t)(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_datatype, - int target_rank, - OPAL_PTRDIFF_TYPE target_disp, + int target_rank, + OPAL_PTRDIFF_TYPE target_disp, int target_count, - struct ompi_datatype_t *target_datatype, - struct ompi_op_t *op, + struct ompi_datatype_t *target_datatype, + struct ompi_op_t *op, struct ompi_win_t *win, struct ompi_request_t **request); @@ -374,7 +374,7 @@ struct ompi_osc_base_module_3_0_0_t { ompi_osc_base_module_win_attach_fn_t osc_win_attach; ompi_osc_base_module_win_detach_fn_t osc_win_detach; - ompi_osc_base_module_free_fn_t osc_free; + ompi_osc_base_module_free_fn_t osc_free; ompi_osc_base_module_put_fn_t osc_put; ompi_osc_base_module_get_fn_t osc_get; diff --git a/ompi/mca/osc/portals4/Makefile.am b/ompi/mca/osc/portals4/Makefile.am index 5d01899a095..73b7ed9d5ff 100644 --- a/ompi/mca/osc/portals4/Makefile.am +++ b/ompi/mca/osc/portals4/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2011 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/osc/portals4/configure.m4 b/ompi/mca/osc/portals4/configure.m4 index e48cefee99f..1b33b6607d7 100644 --- a/ompi/mca/osc/portals4/configure.m4 +++ b/ompi/mca/osc/portals4/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2011 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -15,7 +15,7 @@ AC_DEFUN([MCA_ompi_osc_portals4_POST_CONFIG], [ AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([PORTALS4])]) ])dnl -# MCA_osc_portals4_CONFIG(action-if-can-compile, +# MCA_osc_portals4_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_osc_portals4_CONFIG],[ diff --git a/ompi/mca/osc/portals4/osc_portals4.h b/ompi/mca/osc/portals4/osc_portals4.h index da940aab73e..c4036836279 100644 --- a/ompi/mca/osc/portals4/osc_portals4.h +++ b/ompi/mca/osc/portals4/osc_portals4.h @@ -6,9 +6,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -169,14 +169,14 @@ int ompi_osc_portals4_fetch_and_op(const void *origin_addr, int ompi_osc_portals4_get_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_datatype, - int target_rank, - MPI_Aint target_disp, + int target_rank, + MPI_Aint target_disp, int target_count, - struct ompi_datatype_t *target_datatype, - struct ompi_op_t *op, + struct ompi_datatype_t *target_datatype, + struct ompi_op_t *op, struct ompi_win_t *win); int ompi_osc_portals4_rput(const void *origin_addr, @@ -213,14 +213,14 @@ int ompi_osc_portals4_raccumulate(const void *origin_addr, int ompi_osc_portals4_rget_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_datatype, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_datatype, - int target_rank, - MPI_Aint target_disp, + int target_rank, + MPI_Aint target_disp, int target_count, - struct ompi_datatype_t *target_datatype, - struct ompi_op_t *op, + struct ompi_datatype_t *target_datatype, + struct ompi_op_t *op, struct ompi_win_t *win, struct ompi_request_t **request); diff --git a/ompi/mca/osc/portals4/osc_portals4_active_target.c b/ompi/mca/osc/portals4/osc_portals4_active_target.c index 656aa990b0a..8d4b5057900 100644 --- a/ompi/mca/osc/portals4/osc_portals4_active_target.c +++ b/ompi/mca/osc/portals4/osc_portals4_active_target.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index 26e2c58a6ec..1c9f6016d1a 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -6,9 +6,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -420,14 +420,14 @@ int ompi_osc_portals4_rget_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_dt, - int target, - MPI_Aint target_disp, + int target, + MPI_Aint target_disp, int target_count, - struct ompi_datatype_t *target_dt, - struct ompi_op_t *op, + struct ompi_datatype_t *target_dt, + struct ompi_op_t *op, struct ompi_win_t *win, struct ompi_request_t **ompi_req) { @@ -790,14 +790,14 @@ int ompi_osc_portals4_get_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_dt, - int target, - MPI_Aint target_disp, + int target, + MPI_Aint target_disp, int target_count, struct ompi_datatype_t *target_dt, - struct ompi_op_t *op, + struct ompi_op_t *op, struct ompi_win_t *win) { int ret; @@ -890,7 +890,7 @@ ompi_osc_portals4_get_accumulate(const void *origin_addr, sent += msg_length; } while (sent < length); } else { - ptl_size_t result_md_offset, origin_md_offset; + ptl_size_t result_md_offset, origin_md_offset; ret = ompi_datatype_type_size(origin_dt, &length); if (OMPI_SUCCESS != ret) { @@ -958,7 +958,7 @@ ompi_osc_portals4_compare_and_swap(const void *origin_addr, OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output, "compare_and_swap: 0x%lx, 0x%lx, 0x%lx, %s, %d, %d, 0x%lx", - (unsigned long) origin_addr, + (unsigned long) origin_addr, (unsigned long) compare_addr, (unsigned long) result_addr, dt->name, target, (int) target_disp, @@ -1021,7 +1021,7 @@ ompi_osc_portals4_fetch_and_op(const void *origin_addr, OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output, "fetch_and_op: 0x%lx, 0x%lx, %s, %d, %d, %s, 0x%lx", - (unsigned long) origin_addr, + (unsigned long) origin_addr, (unsigned long) result_addr, dt->name, target, (int) target_disp, op->o_name, @@ -1073,7 +1073,7 @@ ompi_osc_portals4_fetch_and_op(const void *origin_addr, offset, NULL); } else { - ptl_size_t result_md_offset, origin_md_offset; + ptl_size_t result_md_offset, origin_md_offset; ret = ompi_osc_portals4_get_op(op, &ptl_op); if (OMPI_SUCCESS != ret) return ret; diff --git a/ompi/mca/osc/portals4/osc_portals4_component.c b/ompi/mca/osc/portals4/osc_portals4_component.c index 22ce27af748..4bd5654f722 100644 --- a/ompi/mca/osc/portals4/osc_portals4_component.c +++ b/ompi/mca/osc/portals4/osc_portals4_component.c @@ -6,9 +6,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -291,7 +291,7 @@ component_init(bool enable_progress_threads, bool enable_mpi_threads) mca_osc_portals4_component.matching_atomic_max = actual.max_atomic_size; mca_osc_portals4_component.matching_fetch_atomic_max = actual.max_fetch_atomic_size; - mca_osc_portals4_component.matching_atomic_ordered_size = + mca_osc_portals4_component.matching_atomic_ordered_size = MAX(actual.max_waw_ordered_size, actual.max_war_ordered_size); ret = PtlEQAlloc(mca_osc_portals4_component.matching_ni_h, @@ -341,7 +341,7 @@ component_init(bool enable_progress_threads, bool enable_mpi_threads) } -static int +static int component_finalize(void) { PtlNIFini(mca_osc_portals4_component.matching_ni_h); @@ -381,7 +381,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit if (NULL == module) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; /* fill in the function pointer part */ - memcpy(module, &ompi_osc_portals4_module_template, + memcpy(module, &ompi_osc_portals4_module_template, sizeof(ompi_osc_base_module_t)); /* fill in our part */ @@ -406,8 +406,8 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit /* share everyone's displacement units. Only do an allgather if strictly necessary, since it requires O(p) state. */ tmp = disp_unit; - ret = module->comm->c_coll.coll_bcast(&tmp, 1, MPI_INT, 0, - module->comm, + ret = module->comm->c_coll.coll_bcast(&tmp, 1, MPI_INT, 0, + module->comm, module->comm->c_coll.coll_bcast_module); if (OMPI_SUCCESS != ret) { opal_output_verbose(1, ompi_osc_base_framework.framework_output, @@ -442,7 +442,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit __FILE__, __LINE__, ret); goto error; } - + md.start = 0; md.length = PTL_SIZE_MAX; md.options = PTL_MD_EVENT_SUCCESS_DISABLE | PTL_MD_EVENT_CT_REPLY | PTL_MD_EVENT_CT_ACK; diff --git a/ompi/mca/osc/portals4/osc_portals4_passive_target.c b/ompi/mca/osc/portals4/osc_portals4_passive_target.c index 2a3a55110e0..e0cfc2e15e1 100644 --- a/ompi/mca/osc/portals4/osc_portals4_passive_target.c +++ b/ompi/mca/osc/portals4/osc_portals4_passive_target.c @@ -4,9 +4,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -133,7 +133,7 @@ lk_add64(ompi_osc_portals4_module_t *module, static inline int -start_exclusive(ompi_osc_portals4_module_t *module, +start_exclusive(ompi_osc_portals4_module_t *module, int target) { int64_t result; @@ -151,7 +151,7 @@ start_exclusive(ompi_osc_portals4_module_t *module, static inline int -end_exclusive(ompi_osc_portals4_module_t *module, +end_exclusive(ompi_osc_portals4_module_t *module, int target) { int ret; @@ -162,7 +162,7 @@ end_exclusive(ompi_osc_portals4_module_t *module, static inline int -start_shared(ompi_osc_portals4_module_t *module, +start_shared(ompi_osc_portals4_module_t *module, int target) { int64_t result; @@ -186,7 +186,7 @@ start_shared(ompi_osc_portals4_module_t *module, static inline int -end_shared(ompi_osc_portals4_module_t *module, +end_shared(ompi_osc_portals4_module_t *module, int target) { int64_t result; @@ -205,7 +205,7 @@ ompi_osc_portals4_lock(int lock_type, { ompi_osc_portals4_module_t *module = (ompi_osc_portals4_module_t*) win->w_osc_module; - ompi_osc_portals4_outstanding_lock_t* lock; + ompi_osc_portals4_outstanding_lock_t* lock; int ret; module->passive_target_access_epoch = true; @@ -283,7 +283,7 @@ ompi_osc_portals4_lock_all(int assert, { ompi_osc_portals4_module_t *module = (ompi_osc_portals4_module_t*) win->w_osc_module; - ompi_osc_portals4_outstanding_lock_t* lock; + ompi_osc_portals4_outstanding_lock_t* lock; int ret = OMPI_SUCCESS; module->passive_target_access_epoch = true; diff --git a/ompi/mca/osc/portals4/osc_portals4_request.c b/ompi/mca/osc/portals4/osc_portals4_request.c index a6ba1aeb153..19461ec0580 100644 --- a/ompi/mca/osc/portals4/osc_portals4_request.c +++ b/ompi/mca/osc/portals4/osc_portals4_request.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,7 +26,7 @@ request_cancel(struct ompi_request_t *request, int complete) static int request_free(struct ompi_request_t **ompi_req) { - ompi_osc_portals4_request_t *request = + ompi_osc_portals4_request_t *request = (ompi_osc_portals4_request_t*) *ompi_req; if (true != request->super.req_complete) { diff --git a/ompi/mca/osc/portals4/osc_portals4_request.h b/ompi/mca/osc/portals4/osc_portals4_request.h index 0b7a9945fef..ef7e7b425f3 100644 --- a/ompi/mca/osc/portals4/osc_portals4_request.h +++ b/ompi/mca/osc/portals4/osc_portals4_request.h @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_header.h b/ompi/mca/osc/pt2pt/osc_pt2pt_header.h index 6b5f00d2cec..8d38f71d1e0 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_header.h +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_header.h @@ -217,7 +217,7 @@ typedef union ompi_osc_pt2pt_header_t ompi_osc_pt2pt_header_t; (h).source = htonl((h).source); \ (h).num_ops = htonl((h).num_ops); \ (h).pad = htonl((h).pad); - + #define MCA_OSC_PT2PT_PUT_HDR_NTOH(h) \ (h).tag = ntohs((h).tag); \ (h).count = ntohl((h).count); \ diff --git a/ompi/mca/osc/sm/Makefile.am b/ompi/mca/osc/sm/Makefile.am index 5b648e5d9a0..8a5a8284d2c 100644 --- a/ompi/mca/osc/sm/Makefile.am +++ b/ompi/mca/osc/sm/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2011 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/osc/sm/osc_sm_active_target.c b/ompi/mca/osc/sm/osc_sm_active_target.c index 95df572d616..5cbe4b08554 100644 --- a/ompi/mca/osc/sm/osc_sm_active_target.c +++ b/ompi/mca/osc/sm/osc_sm_active_target.c @@ -7,9 +7,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/osc/sm/osc_sm_comm.c b/ompi/mca/osc/sm/osc_sm_comm.c index 61e6259ed42..e6f3da44e68 100644 --- a/ompi/mca/osc/sm/osc_sm_comm.c +++ b/ompi/mca/osc/sm/osc_sm_comm.c @@ -6,9 +6,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -152,14 +152,14 @@ int ompi_osc_sm_rget_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_dt, - int target, - MPI_Aint target_disp, + int target, + MPI_Aint target_disp, int target_count, - struct ompi_datatype_t *target_dt, - struct ompi_op_t *op, + struct ompi_datatype_t *target_dt, + struct ompi_op_t *op, struct ompi_win_t *win, struct ompi_request_t **ompi_req) { @@ -312,14 +312,14 @@ int ompi_osc_sm_get_accumulate(const void *origin_addr, int origin_count, struct ompi_datatype_t *origin_dt, - void *result_addr, - int result_count, + void *result_addr, + int result_count, struct ompi_datatype_t *result_dt, - int target, - MPI_Aint target_disp, + int target, + MPI_Aint target_disp, int target_count, struct ompi_datatype_t *target_dt, - struct ompi_op_t *op, + struct ompi_op_t *op, struct ompi_win_t *win) { int ret; @@ -375,7 +375,7 @@ ompi_osc_sm_compare_and_swap(const void *origin_addr, OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output, "compare_and_swap: 0x%lx, %s, %d, %d, 0x%lx", - (unsigned long) origin_addr, + (unsigned long) origin_addr, dt->name, target, (int) target_disp, (unsigned long) win)); @@ -414,7 +414,7 @@ ompi_osc_sm_fetch_and_op(const void *origin_addr, OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output, "fetch_and_op: 0x%lx, %s, %d, %d, %s, 0x%lx", - (unsigned long) origin_addr, + (unsigned long) origin_addr, dt->name, target, (int) target_disp, op->o_name, (unsigned long) win)); diff --git a/ompi/mca/osc/sm/osc_sm_component.c b/ompi/mca/osc/sm/osc_sm_component.c index 024794bb843..b51e7d1c924 100644 --- a/ompi/mca/osc/sm/osc_sm_component.c +++ b/ompi/mca/osc/sm/osc_sm_component.c @@ -8,9 +8,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -115,7 +115,7 @@ component_init(bool enable_progress_threads, bool enable_mpi_threads) } -static int +static int component_finalize(void) { /* clean up requests free list */ @@ -179,7 +179,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit if (NULL == module) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; /* fill in the function pointer part */ - memcpy(module, &ompi_osc_sm_module_template, + memcpy(module, &ompi_osc_sm_module_template, sizeof(ompi_osc_base_module_t)); /* need our communicator for collectives in next phase */ @@ -493,7 +493,7 @@ ompi_osc_sm_get_info(struct ompi_win_t *win, struct ompi_info_t **info_used) if (NULL == info) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; if (module->flavor == MPI_WIN_FLAVOR_SHARED) { - ompi_info_set(info, "blocking_fence", + ompi_info_set(info, "blocking_fence", (1 == module->global_state->use_barrier_for_fence) ? "true" : "false"); ompi_info_set(info, "alloc_shared_noncontig", (module->noncontig) ? "true" : "false"); diff --git a/ompi/mca/osc/sm/osc_sm_passive_target.c b/ompi/mca/osc/sm/osc_sm_passive_target.c index ffe93fdb5d7..889ac829dd1 100644 --- a/ompi/mca/osc/sm/osc_sm_passive_target.c +++ b/ompi/mca/osc/sm/osc_sm_passive_target.c @@ -5,9 +5,9 @@ * reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,10 +55,10 @@ lk_fetch32(ompi_osc_sm_module_t *module, static inline int -start_exclusive(ompi_osc_sm_module_t *module, +start_exclusive(ompi_osc_sm_module_t *module, int target) { - uint32_t me = lk_fetch_add32(module, target, + uint32_t me = lk_fetch_add32(module, target, offsetof(ompi_osc_sm_lock_t, counter), 1); while (me != lk_fetch32(module, target, @@ -71,7 +71,7 @@ start_exclusive(ompi_osc_sm_module_t *module, static inline int -end_exclusive(ompi_osc_sm_module_t *module, +end_exclusive(ompi_osc_sm_module_t *module, int target) { lk_add32(module, target, offsetof(ompi_osc_sm_lock_t, write), 1); @@ -82,10 +82,10 @@ end_exclusive(ompi_osc_sm_module_t *module, static inline int -start_shared(ompi_osc_sm_module_t *module, +start_shared(ompi_osc_sm_module_t *module, int target) { - uint32_t me = lk_fetch_add32(module, target, + uint32_t me = lk_fetch_add32(module, target, offsetof(ompi_osc_sm_lock_t, counter), 1); while (me != lk_fetch32(module, target, @@ -100,7 +100,7 @@ start_shared(ompi_osc_sm_module_t *module, static inline int -end_shared(ompi_osc_sm_module_t *module, +end_shared(ompi_osc_sm_module_t *module, int target) { lk_add32(module, target, offsetof(ompi_osc_sm_lock_t, write), 1); diff --git a/ompi/mca/pml/Makefile.am b/ompi/mca/pml/Makefile.am index 231762066ec..2c05ec3d562 100644 --- a/ompi/mca/pml/Makefile.am +++ b/ompi/mca/pml/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -35,4 +35,4 @@ endif include base/Makefile.am distclean-local: - rm -f base/static-components.h + rm -f base/static-components.h diff --git a/ompi/mca/pml/base/Makefile.am b/ompi/mca/pml/base/Makefile.am index a5b8245a1cf..c737f2eeeeb 100644 --- a/ompi/mca/pml/base/Makefile.am +++ b/ompi/mca/pml/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2013 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pml/base/base.h b/ompi/mca/pml/base/base.h index 0ccd5859227..39bae190153 100644 --- a/ompi/mca/pml/base/base.h +++ b/ompi/mca/pml/base/base.h @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2013 Los Alamos National Security, LLC. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ BEGIN_C_DECLS /* * This is the base priority for a PML wrapper component - * If there exists more than one then it is undefined + * If there exists more than one then it is undefined * which one is picked. */ #define PML_SELECT_WRAPPER_PRIORITY -128 diff --git a/ompi/mca/pml/base/pml_base_bsend.c b/ompi/mca/pml/base/pml_base_bsend.c index 66dbeab7c81..3c74cff07c4 100644 --- a/ompi/mca/pml/base/pml_base_bsend.c +++ b/ompi/mca/pml/base/pml_base_bsend.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -27,7 +27,7 @@ #include "ompi/mca/pml/base/pml_base_request.h" #include "ompi/mca/pml/base/pml_base_sendreq.h" #include "ompi/mca/pml/base/pml_base_bsend.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" #ifdef HAVE_UNISTD_H #include @@ -35,7 +35,7 @@ static opal_mutex_t mca_pml_bsend_mutex; /* lock for thread safety */ static opal_condition_t mca_pml_bsend_condition; /* condition variable to block on detach */ -static mca_allocator_base_component_t* mca_pml_bsend_allocator_component; +static mca_allocator_base_component_t* mca_pml_bsend_allocator_component; static mca_allocator_base_module_t* mca_pml_bsend_allocator; /* sub-allocator to manage users buffer */ static size_t mca_pml_bsend_usersize; /* user provided buffer size */ static unsigned char *mca_pml_bsend_userbase; /* user provided buffer base */ @@ -45,17 +45,17 @@ static size_t mca_pml_bsend_size; /* adjusted size of user buffe static size_t mca_pml_bsend_count; /* number of outstanding requests */ static size_t mca_pml_bsend_pagesz; /* mmap page size */ static int mca_pml_bsend_pagebits; /* number of bits in pagesz */ -static int32_t mca_pml_bsend_init = 0; +static int32_t mca_pml_bsend_init = 0; /* defined in pml_base_open.c */ extern char *ompi_pml_base_bsend_allocator_name; /* - * Routine to return pages to sub-allocator as needed + * Routine to return pages to sub-allocator as needed */ static void* mca_pml_bsend_alloc_segment( - struct mca_mpool_base_module_t* module, - size_t* size_inout, + struct mca_mpool_base_module_t* module, + size_t* size_inout, mca_mpool_base_registration_t** registration) { void *addr; @@ -64,7 +64,7 @@ static void* mca_pml_bsend_alloc_segment( return NULL; } /* allocate all that is left */ - size = mca_pml_bsend_size - (mca_pml_bsend_addr - mca_pml_bsend_base); + size = mca_pml_bsend_size - (mca_pml_bsend_addr - mca_pml_bsend_base); addr = mca_pml_bsend_addr; mca_pml_bsend_addr += size; *size_inout = size; @@ -107,7 +107,7 @@ int mca_pml_base_bsend_init(bool thread_safe) */ int mca_pml_base_bsend_fini(void) { - if(OPAL_THREAD_ADD32(&mca_pml_bsend_init,-1) > 0) + if(OPAL_THREAD_ADD32(&mca_pml_bsend_init,-1) > 0) return OMPI_SUCCESS; if(NULL != mca_pml_bsend_allocator) @@ -152,7 +152,7 @@ int mca_pml_base_bsend_attach(void* addr, int size) */ mca_pml_bsend_userbase = (unsigned char*)addr; mca_pml_bsend_usersize = size; - /* + /* * Align to pointer boundaries. The bsend overhead is large enough * to account for this. Compute any alignment that needs to be done. */ @@ -168,7 +168,7 @@ int mca_pml_base_bsend_attach(void* addr, int size) } /* - * User-level call to detach buffer + * User-level call to detach buffer */ int mca_pml_base_bsend_detach(void* addr, int* size) { @@ -183,7 +183,7 @@ int mca_pml_base_bsend_detach(void* addr, int* size) /* wait on any pending requests */ while(mca_pml_bsend_count != 0) opal_condition_wait(&mca_pml_bsend_condition, &mca_pml_bsend_mutex); - + /* free resources associated with the allocator */ mca_pml_bsend_allocator->alc_finalize(mca_pml_bsend_allocator); mca_pml_bsend_allocator = NULL; @@ -203,10 +203,10 @@ int mca_pml_base_bsend_detach(void* addr, int* size) mca_pml_bsend_count = 0; OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); return OMPI_SUCCESS; -} +} + - -/* +/* * pack send buffer into buffer */ @@ -237,7 +237,7 @@ int mca_pml_base_bsend_request_start(ompi_request_t* request) OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); return OMPI_ERR_BUFFER; } - + OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); /* The convertor is already initialized in the begining so we just have to @@ -247,25 +247,25 @@ int mca_pml_base_bsend_request_start(ompi_request_t* request) iov.iov_len = sendreq->req_bytes_packed; iov_count = 1; max_data = iov.iov_len; - if((rc = opal_convertor_pack( &sendreq->req_base.req_convertor, - &iov, - &iov_count, + if((rc = opal_convertor_pack( &sendreq->req_base.req_convertor, + &iov, + &iov_count, &max_data )) < 0) { return OMPI_ERROR; } - + /* setup convertor to point to packed buffer (at position zero) */ opal_convertor_prepare_for_send( &sendreq->req_base.req_convertor, &(ompi_mpi_packed.dt.super), max_data, sendreq->req_addr ); /* increment count of pending requests */ mca_pml_bsend_count++; } - + return OMPI_SUCCESS; } -/* +/* * allocate buffer */ @@ -299,11 +299,11 @@ int mca_pml_base_bsend_request_alloc(ompi_request_t* request) /* increment count of pending requests */ mca_pml_bsend_count++; OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); - + return OMPI_SUCCESS; } -/* +/* * allocate buffer */ @@ -332,13 +332,13 @@ void* mca_pml_base_bsend_request_alloc_buf( size_t length ) /* increment count of pending requests */ mca_pml_bsend_count++; OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); - + return buf; } /* - * Request completed - free buffer and decrement pending count + * Request completed - free buffer and decrement pending count */ int mca_pml_base_bsend_request_free(void* addr) { @@ -347,7 +347,7 @@ int mca_pml_base_bsend_request_free(void* addr) /* free buffer */ mca_pml_bsend_allocator->alc_free(mca_pml_bsend_allocator, addr); - + /* decrement count of buffered requests */ if(--mca_pml_bsend_count == 0) opal_condition_signal(&mca_pml_bsend_condition); @@ -355,17 +355,17 @@ int mca_pml_base_bsend_request_free(void* addr) OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); return OMPI_SUCCESS; } - + /* - * Request completed - free buffer and decrement pending count + * Request completed - free buffer and decrement pending count */ int mca_pml_base_bsend_request_fini(ompi_request_t* request) { mca_pml_base_send_request_t* sendreq = (mca_pml_base_send_request_t*)request; - if(sendreq->req_bytes_packed == 0 || - sendreq->req_addr == NULL || + if(sendreq->req_bytes_packed == 0 || + sendreq->req_addr == NULL || sendreq->req_addr == sendreq->req_base.req_addr) return OMPI_SUCCESS; @@ -383,5 +383,5 @@ int mca_pml_base_bsend_request_fini(ompi_request_t* request) OPAL_THREAD_UNLOCK(&mca_pml_bsend_mutex); return OMPI_SUCCESS; } - + diff --git a/ompi/mca/pml/base/pml_base_bsend.h b/ompi/mca/pml/base/pml_base_bsend.h index 2ceabbb6ed1..cbeea6e2dde 100644 --- a/ompi/mca/pml/base/pml_base_bsend.h +++ b/ompi/mca/pml/base/pml_base_bsend.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -35,7 +35,7 @@ OMPI_DECLSPEC int mca_pml_base_bsend_request_alloc(ompi_request_t*); OMPI_DECLSPEC int mca_pml_base_bsend_request_start(ompi_request_t*); OMPI_DECLSPEC int mca_pml_base_bsend_request_fini(ompi_request_t*); OMPI_DECLSPEC void* mca_pml_base_bsend_request_alloc_buf( size_t length ); -OMPI_DECLSPEC int mca_pml_base_bsend_request_free(void* addr); +OMPI_DECLSPEC int mca_pml_base_bsend_request_free(void* addr); END_C_DECLS diff --git a/ompi/mca/pml/base/pml_base_frame.c b/ompi/mca/pml/base/pml_base_frame.c index 1f947ea5462..64f82224a25 100644 --- a/ompi/mca/pml/base/pml_base_frame.c +++ b/ompi/mca/pml/base/pml_base_frame.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,7 +48,7 @@ #include "ompi/mca/pml/base/static-components.h" -int mca_pml_base_progress(void) +int mca_pml_base_progress(void) { return OMPI_SUCCESS; } @@ -123,7 +123,7 @@ int mca_pml_base_finalize(void) { return OMPI_SUCCESS; } - + static int mca_pml_base_close(void) { int i, j; @@ -146,7 +146,7 @@ static int mca_pml_base_close(void) OBJ_DESTRUCT(&mca_pml_base_recv_requests); mca_pml.pml_progress = mca_pml_base_progress; - + /* Free all the strings in the array */ j = opal_pointer_array_get_size(&mca_pml_base_pml); for (i = 0; i < j; ++i) { @@ -180,7 +180,7 @@ static int mca_pml_base_open(mca_base_open_flag_t flags) /* Open up all available components */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != mca_base_framework_components_open(&ompi_pml_base_framework, flags)) { return OMPI_ERROR; } @@ -194,7 +194,7 @@ static int mca_pml_base_open(mca_base_open_flag_t flags) * Right now our selection of BTLs is completely broken. If we have * multiple PMLs that use BTLs than we will open all BTLs several times, leading to * undefined behaviors. The simplest solution, at least until we - * figure out the correct way to do it, is to force a default PML that + * figure out the correct way to do it, is to force a default PML that * uses BTLs and any other PMLs that do not in the mca_pml_base_pml array. */ @@ -211,7 +211,7 @@ static int mca_pml_base_open(mca_base_open_flag_t flags) if( (NULL == default_pml || NULL == default_pml[0] || 0 == strlen(default_pml[0])) || (default_pml[0][0] == '^') ) { - opal_pointer_array_add(&mca_pml_base_pml, strdup("ob1")); + opal_pointer_array_add(&mca_pml_base_pml, strdup("ob1")); opal_pointer_array_add(&mca_pml_base_pml, strdup("yalla")); opal_pointer_array_add(&mca_pml_base_pml, strdup("cm")); } else { @@ -219,7 +219,7 @@ static int mca_pml_base_open(mca_base_open_flag_t flags) } } #if OPAL_ENABLE_FT_CR == 1 - /* + /* * Which PML Wrapper component to use, if any * - NULL or "" = No wrapper * - ow. select that specific wrapper component diff --git a/ompi/mca/pml/base/pml_base_ft.c b/ompi/mca/pml/base/pml_base_ft.c index a08400e3ad4..21f009622d5 100644 --- a/ompi/mca/pml/base/pml_base_ft.c +++ b/ompi/mca/pml/base/pml_base_ft.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -58,7 +58,7 @@ int mca_pml_base_ft_event(int state) opal_output(0, "pml:base: ft_event: BML ft_event function failed: %d\n", ret); } - + if(OPAL_CRS_CHECKPOINT == state) { ; } diff --git a/ompi/mca/pml/base/pml_base_recvreq.c b/ompi/mca/pml/base/pml_base_recvreq.c index 6ad6fa3dc23..54d53c63bda 100644 --- a/ompi/mca/pml/base/pml_base_recvreq.c +++ b/ompi/mca/pml/base/pml_base_recvreq.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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$ */ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -33,7 +33,7 @@ OBJ_CLASS_INSTANCE( mca_pml_base_recv_request_construct, mca_pml_base_recv_request_destruct ); - + static void mca_pml_base_recv_request_construct(mca_pml_base_recv_request_t* request) { diff --git a/ompi/mca/pml/base/pml_base_recvreq.h b/ompi/mca/pml/base/pml_base_recvreq.h index b7866ead440..516aef66dfb 100644 --- a/ompi/mca/pml/base/pml_base_recvreq.h +++ b/ompi/mca/pml/base/pml_base_recvreq.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -103,7 +103,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_base_recv_request_t); (request)->req_ompi.req_state = OMPI_REQUEST_ACTIVE; \ } while (0) -/** +/** * Return a receive request. Handle the release of the communicator and the * attached datatype. * diff --git a/ompi/mca/pml/base/pml_base_request.c b/ompi/mca/pml/base/pml_base_request.c index c1794c3b483..c073957bf5d 100644 --- a/ompi/mca/pml/base/pml_base_request.c +++ b/ompi/mca/pml/base/pml_base_request.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/pml/base/pml_base_request.h b/ompi/mca/pml/base/pml_base_request.h index 1530723957c..07043e71e9a 100644 --- a/ompi/mca/pml/base/pml_base_request.h +++ b/ompi/mca/pml/base/pml_base_request.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -47,14 +47,14 @@ OMPI_DECLSPEC extern opal_free_list_t mca_pml_base_recv_requests; */ /* * The following include pulls in shared typedefs with debugger plugins. - * For more information on why we do this see the Notice to developers + * For more information on why we do this see the Notice to developers * comment at the top of the ompi_msgq_dll.c file. */ #include "pml_base_request_dbg.h" /** - * Base type for PML P2P requests + * Base type for PML P2P requests */ struct mca_pml_base_request_t { diff --git a/ompi/mca/pml/base/pml_base_request_dbg.h b/ompi/mca/pml/base/pml_base_request_dbg.h index 312d8e08274..4644a89c6c4 100644 --- a/ompi/mca/pml/base/pml_base_request_dbg.h +++ b/ompi/mca/pml/base/pml_base_request_dbg.h @@ -3,9 +3,9 @@ * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef MCA_PML_BASE_REQUEST_DBG_H @@ -13,7 +13,7 @@ /* * This file contains definitions used by both OMPI and debugger plugins. - * For more information on why we do this see the Notice to developers + * For more information on why we do this see the Notice to developers * comment at the top of the ompi_msgq_dll.c file. */ diff --git a/ompi/mca/pml/base/pml_base_sendreq.c b/ompi/mca/pml/base/pml_base_sendreq.c index d7a4ffcf11e..fabd711129b 100644 --- a/ompi/mca/pml/base/pml_base_sendreq.c +++ b/ompi/mca/pml/base/pml_base_sendreq.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mca/pml/base/pml_base_sendreq.h b/ompi/mca/pml/base/pml_base_sendreq.h index 349269fefd9..54ba6311043 100644 --- a/ompi/mca/pml/base/pml_base_sendreq.h +++ b/ompi/mca/pml/base/pml_base_sendreq.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -31,7 +31,7 @@ BEGIN_C_DECLS /** - * Base type for send requests + * Base type for send requests */ struct mca_pml_base_send_request_t { mca_pml_base_request_t req_base; /**< base request type - common data structure for use by wait/test */ diff --git a/ompi/mca/pml/cm/Makefile.am b/ompi/mca/pml/cm/Makefile.am index 80acfd31e1f..28ad04fb5dc 100644 --- a/ompi/mca/pml/cm/Makefile.am +++ b/ompi/mca/pml/cm/Makefile.am @@ -1,13 +1,13 @@ # # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pml/cm/pml_cm.h b/ompi/mca/pml/cm/pml_cm.h index 96e8ecc3bde..20e4bcb4eb6 100644 --- a/ompi/mca/pml/cm/pml_cm.h +++ b/ompi/mca/pml/cm/pml_cm.h @@ -36,11 +36,11 @@ BEGIN_C_DECLS struct mca_mtl_request_t; -/* Array of send completion callback - one per send type - * These are called internally by the library when the send - * is completed from its perspective. +/* Array of send completion callback - one per send type + * These are called internally by the library when the send + * is completed from its perspective. */ -extern void (*send_completion_callbacks[]) +extern void (*send_completion_callbacks[]) (struct mca_mtl_request_t *mtl_request); struct ompi_pml_cm_t { @@ -77,13 +77,13 @@ mca_pml_cm_irecv_init(void *addr, #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT ompi_proc_t* ompi_proc; #endif - + MCA_PML_CM_HVY_RECV_REQUEST_ALLOC(recvreq); if( OPAL_UNLIKELY(NULL == recvreq) ) return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_CM_HVY_RECV_REQUEST_INIT(recvreq, ompi_proc, comm, tag, src, - datatype, addr, count, true); - + + MCA_PML_CM_HVY_RECV_REQUEST_INIT(recvreq, ompi_proc, comm, tag, src, + datatype, addr, count, true); + *request = (ompi_request_t*) recvreq; return OMPI_SUCCESS; @@ -106,7 +106,7 @@ mca_pml_cm_irecv(void *addr, MCA_PML_CM_THIN_RECV_REQUEST_ALLOC(recvreq); if( OPAL_UNLIKELY(NULL == recvreq) ) return OMPI_ERR_OUT_OF_RESOURCE; - + MCA_PML_CM_THIN_RECV_REQUEST_INIT(recvreq, ompi_proc, comm, @@ -114,7 +114,7 @@ mca_pml_cm_irecv(void *addr, datatype, addr, count); - + MCA_PML_CM_THIN_RECV_REQUEST_START(recvreq, comm, tag, src, ret); if( OPAL_LIKELY(OMPI_SUCCESS == ret) ) *request = (ompi_request_t*) recvreq; @@ -122,7 +122,7 @@ mca_pml_cm_irecv(void *addr, return ret; } -__opal_attribute_always_inline__ static inline void +__opal_attribute_always_inline__ static inline void mca_pml_cm_recv_fast_completion(struct mca_mtl_request_t *mtl_request) { // Do nothing! @@ -220,13 +220,13 @@ mca_pml_cm_isend_init(void* buf, #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT ompi_proc_t* ompi_proc; #endif - + MCA_PML_CM_HVY_SEND_REQUEST_ALLOC(sendreq, comm, dst, ompi_proc); if (OPAL_UNLIKELY(NULL == sendreq)) return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_CM_HVY_SEND_REQUEST_INIT(sendreq, ompi_proc, comm, tag, dst, + + MCA_PML_CM_HVY_SEND_REQUEST_INIT(sendreq, ompi_proc, comm, tag, dst, datatype, sendmode, true, false, buf, count); - + *request = (ompi_request_t*) sendreq; return OMPI_SUCCESS; @@ -243,63 +243,63 @@ mca_pml_cm_isend(void* buf, ompi_request_t** request) { int ret; - - if(sendmode == MCA_PML_BASE_SEND_BUFFERED ) { + + if(sendmode == MCA_PML_BASE_SEND_BUFFERED ) { mca_pml_cm_hvy_send_request_t* sendreq; #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT ompi_proc_t* ompi_proc = NULL; #endif - + MCA_PML_CM_HVY_SEND_REQUEST_ALLOC(sendreq, comm, dst, ompi_proc); if (OPAL_UNLIKELY(NULL == sendreq)) return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_CM_HVY_SEND_REQUEST_INIT(sendreq, - ompi_proc, - comm, - tag, - dst, + + MCA_PML_CM_HVY_SEND_REQUEST_INIT(sendreq, + ompi_proc, + comm, + tag, + dst, datatype, sendmode, false, false, - buf, + buf, count); - + MCA_PML_CM_HVY_SEND_REQUEST_START( sendreq, ret); - + if (OPAL_LIKELY(OMPI_SUCCESS == ret)) *request = (ompi_request_t*) sendreq; - } else { + } else { mca_pml_cm_thin_send_request_t* sendreq; #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT ompi_proc_t* ompi_proc = NULL; #endif MCA_PML_CM_THIN_SEND_REQUEST_ALLOC(sendreq, comm, dst, ompi_proc); if (OPAL_UNLIKELY(NULL == sendreq)) return OMPI_ERR_OUT_OF_RESOURCE; - - MCA_PML_CM_THIN_SEND_REQUEST_INIT(sendreq, - ompi_proc, - comm, - tag, - dst, + + MCA_PML_CM_THIN_SEND_REQUEST_INIT(sendreq, + ompi_proc, + comm, + tag, + dst, datatype, sendmode, - buf, + buf, count); - + MCA_PML_CM_THIN_SEND_REQUEST_START( - sendreq, + sendreq, comm, tag, dst, sendmode, - false, + false, ret); - + if (OPAL_LIKELY(OMPI_SUCCESS == ret)) *request = (ompi_request_t*) sendreq; - + } - + return ret; } @@ -315,17 +315,17 @@ mca_pml_cm_send(void *buf, int ret = OMPI_ERROR; ompi_proc_t * ompi_proc; - if(sendmode == MCA_PML_BASE_SEND_BUFFERED) { + if(sendmode == MCA_PML_BASE_SEND_BUFFERED) { mca_pml_cm_hvy_send_request_t *sendreq; MCA_PML_CM_HVY_SEND_REQUEST_ALLOC(sendreq, comm, dst, ompi_proc); if (OPAL_UNLIKELY(NULL == sendreq)) return OMPI_ERR_OUT_OF_RESOURCE; - + MCA_PML_CM_HVY_SEND_REQUEST_INIT(sendreq, ompi_proc, comm, tag, - dst, + dst, datatype, sendmode, false, @@ -337,18 +337,18 @@ mca_pml_cm_send(void *buf, MCA_PML_CM_HVY_SEND_REQUEST_RETURN(sendreq); return ret; } - + ompi_request_free( (ompi_request_t**)&sendreq ); - } else { + } else { opal_convertor_t convertor; OBJ_CONSTRUCT(&convertor, opal_convertor_t); #if !(OPAL_ENABLE_HETEROGENEOUS_SUPPORT) if (opal_datatype_is_contiguous_memory_layout(&datatype->super, count)) { - + convertor.remoteArch = ompi_mpi_local_convertor->remoteArch; convertor.flags = ompi_mpi_local_convertor->flags; convertor.master = ompi_mpi_local_convertor->master; - + convertor.local_size = count * datatype->super.size; convertor.pBaseBuf = (unsigned char*)buf + datatype->super.true_lb; convertor.count = count; @@ -362,16 +362,16 @@ mca_pml_cm_send(void *buf, &datatype->super, count, buf, 0, &convertor); } - - ret = OMPI_MTL_CALL(send(ompi_mtl, - comm, - dst, - tag, + + ret = OMPI_MTL_CALL(send(ompi_mtl, + comm, + dst, + tag, &convertor, sendmode)); OBJ_DESTRUCT(&convertor); } - + return ret; } @@ -456,7 +456,7 @@ mca_pml_cm_imrecv(void *buf, MCA_PML_CM_THIN_RECV_REQUEST_ALLOC(recvreq); if( OPAL_UNLIKELY(NULL == recvreq) ) return OMPI_ERR_OUT_OF_RESOURCE; - + MCA_PML_CM_THIN_RECV_REQUEST_INIT(recvreq, ompi_proc, comm, @@ -464,7 +464,7 @@ mca_pml_cm_imrecv(void *buf, datatype, buf, count); - + MCA_PML_CM_THIN_RECV_REQUEST_MATCHED_START(recvreq, message, ret); if( OPAL_LIKELY(OMPI_SUCCESS == ret) ) *request = (ompi_request_t*) recvreq; @@ -491,13 +491,13 @@ mca_pml_cm_mrecv(void *buf, MCA_PML_CM_THIN_RECV_REQUEST_INIT(recvreq, ompi_proc, - comm, + comm, (*message)->peer, datatype, buf, count); - - MCA_PML_CM_THIN_RECV_REQUEST_MATCHED_START(recvreq, + + MCA_PML_CM_THIN_RECV_REQUEST_MATCHED_START(recvreq, message, ret); if( OPAL_UNLIKELY(OMPI_SUCCESS != ret) ) { MCA_PML_CM_THIN_RECV_REQUEST_RETURN(recvreq); diff --git a/ompi/mca/pml/cm/pml_cm_component.c b/ompi/mca/pml/cm/pml_cm_component.c index c26574dfc1b..d815f000cb0 100644 --- a/ompi/mca/pml/cm/pml_cm_component.c +++ b/ompi/mca/pml/cm/pml_cm_component.c @@ -61,7 +61,7 @@ mca_pml_base_component_2_0_0_t mca_pml_cm_component = { .pmlm_finalize = mca_pml_cm_component_fini, }; -/* Array of send completion callback - one per send type +/* Array of send completion callback - one per send type * These are called internally by the library when the send * is completed from its perspective. */ @@ -124,7 +124,7 @@ mca_pml_cm_component_open(void) ret = OPAL_ERR_NOT_AVAILABLE; } } - + return ret; } @@ -143,16 +143,16 @@ mca_pml_cm_component_init(int* priority, { int ret; - if((*priority) > ompi_pml_cm.default_priority) { + if((*priority) > ompi_pml_cm.default_priority) { *priority = ompi_pml_cm.default_priority; return NULL; } *priority = ompi_pml_cm.default_priority; - opal_output_verbose( 10, 0, + opal_output_verbose( 10, 0, "in cm pml priority is %d\n", *priority); /* find a useable MTL */ ret = ompi_mtl_base_select(enable_progress_threads, enable_mpi_threads); - if (OMPI_SUCCESS != ret) { + if (OMPI_SUCCESS != ret) { *priority = -1; return NULL; } else if((strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm") == 0) || @@ -168,12 +168,12 @@ mca_pml_cm_component_init(int* priority, *priority = 30; } - + /* update our tag / context id max values based on MTL information */ ompi_pml_cm.super.pml_max_contextid = ompi_mtl->mtl_max_contextid; ompi_pml_cm.super.pml_max_tag = ompi_mtl->mtl_max_tag; - + return &ompi_pml_cm.super; } diff --git a/ompi/mca/pml/cm/pml_cm_component.h b/ompi/mca/pml/cm/pml_cm_component.h index 559707042de..fc5cf233b72 100644 --- a/ompi/mca/pml/cm/pml_cm_component.h +++ b/ompi/mca/pml/cm/pml_cm_component.h @@ -5,16 +5,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** - * @file + * @file */ #ifndef MCA_PML_CM_COMPONENT_H diff --git a/ompi/mca/pml/cm/pml_cm_recvreq.c b/ompi/mca/pml/cm/pml_cm_recvreq.c index a2eeac13d62..92b7ba63793 100644 --- a/ompi/mca/pml/cm/pml_cm_recvreq.c +++ b/ompi/mca/pml/cm/pml_cm_recvreq.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -24,10 +24,10 @@ static int mca_pml_cm_recv_request_free(struct ompi_request_t** request) { - mca_pml_cm_request_t* recvreq = *(mca_pml_cm_request_t**)request; - + mca_pml_cm_request_t* recvreq = *(mca_pml_cm_request_t**)request; + assert( false == recvreq->req_free_called ); - + OPAL_THREAD_LOCK(&ompi_request_lock); recvreq->req_free_called = true; if( true == recvreq->req_pml_complete ) { @@ -35,14 +35,14 @@ mca_pml_cm_recv_request_free(struct ompi_request_t** request) MCA_PML_CM_THIN_RECV_REQUEST_RETURN((mca_pml_cm_hvy_recv_request_t*)recvreq ); } else { MCA_PML_CM_HVY_RECV_REQUEST_RETURN((mca_pml_cm_hvy_recv_request_t*)recvreq ); - } + } } OPAL_THREAD_UNLOCK(&ompi_request_lock); *request = MPI_REQUEST_NULL; return OMPI_SUCCESS; -} +} void mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request) @@ -56,7 +56,7 @@ void mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request) } } -static void +static void mca_pml_cm_recv_request_construct(mca_pml_cm_thin_recv_request_t* recvreq) { recvreq->req_base.req_ompi.req_free = mca_pml_cm_recv_request_free; diff --git a/ompi/mca/pml/cm/pml_cm_recvreq.h b/ompi/mca/pml/cm/pml_cm_recvreq.h index 1a9501eaafd..ea8446e5c7c 100644 --- a/ompi/mca/pml/cm/pml_cm_recvreq.h +++ b/ompi/mca/pml/cm/pml_cm_recvreq.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -44,7 +44,7 @@ struct mca_pml_cm_hvy_recv_request_t { size_t req_bytes_packed; /**< packed size of a message given the datatype and count */ bool req_blocking; mca_mtl_request_t req_mtl; /**< the mtl specific memory. This field should be the last in the struct */ -}; +}; typedef struct mca_pml_cm_hvy_recv_request_t mca_pml_cm_hvy_recv_request_t; OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_recv_request_t); @@ -297,7 +297,7 @@ do { \ do { \ ompi_request_complete( &(recvreq->req_base.req_ompi), true ); \ } while (0) - + /** * Return a recv request to the modules free list. diff --git a/ompi/mca/pml/cm/pml_cm_request.c b/ompi/mca/pml/cm/pml_cm_request.c index feab34e23fc..df029595970 100644 --- a/ompi/mca/pml/cm/pml_cm_request.c +++ b/ompi/mca/pml/cm/pml_cm_request.c @@ -5,7 +5,7 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -22,16 +22,16 @@ #include "pml_cm_request.h" -static void mca_pml_cm_request_construct( mca_pml_cm_request_t* req) { +static void mca_pml_cm_request_construct( mca_pml_cm_request_t* req) { OBJ_CONSTRUCT(&req->req_convertor, opal_convertor_t); req->req_ompi.req_type = OMPI_REQUEST_PML; } -static void mca_pml_cm_request_destruct( mca_pml_cm_request_t* req) { +static void mca_pml_cm_request_destruct( mca_pml_cm_request_t* req) { OBJ_DESTRUCT(&req->req_convertor); } -OBJ_CLASS_INSTANCE(mca_pml_cm_request_t, - ompi_request_t, +OBJ_CLASS_INSTANCE(mca_pml_cm_request_t, + ompi_request_t, mca_pml_cm_request_construct, mca_pml_cm_request_destruct); diff --git a/ompi/mca/pml/cm/pml_cm_request.h b/ompi/mca/pml/cm/pml_cm_request.h index 3451da375bc..6941a56d8b3 100644 --- a/ompi/mca/pml/cm/pml_cm_request.h +++ b/ompi/mca/pml/cm/pml_cm_request.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -36,9 +36,9 @@ typedef enum { } mca_pml_cm_request_type_t; /** - * Base type for PML CM P2P requests + * Base type for PML CM P2P requests */ -struct mca_pml_cm_request_t { +struct mca_pml_cm_request_t { /* START: These fields have to match the definition of the mca_pml_base_request_t */ ompi_request_t req_ompi; /**< base request */ diff --git a/ompi/mca/pml/cm/pml_cm_sendreq.c b/ompi/mca/pml/cm/pml_cm_sendreq.c index abb4f33fc84..e7944cbdb61 100644 --- a/ompi/mca/pml/cm/pml_cm_sendreq.c +++ b/ompi/mca/pml/cm/pml_cm_sendreq.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -34,7 +34,7 @@ mca_pml_cm_send_request_free(struct ompi_request_t** request) { mca_pml_cm_send_request_t* sendreq = *(mca_pml_cm_send_request_t**)request; assert( false == sendreq->req_base.req_free_called ); - + OPAL_THREAD_LOCK(&ompi_request_lock); sendreq->req_base.req_free_called = true; if( true == sendreq->req_base.req_pml_complete ) { @@ -44,9 +44,9 @@ mca_pml_cm_send_request_free(struct ompi_request_t** request) MCA_PML_CM_HVY_SEND_REQUEST_RETURN( ((mca_pml_cm_hvy_send_request_t*) sendreq) ); } } - + OPAL_THREAD_UNLOCK(&ompi_request_lock); - + *request = MPI_REQUEST_NULL; return OMPI_SUCCESS; } @@ -54,7 +54,7 @@ mca_pml_cm_send_request_free(struct ompi_request_t** request) void mca_pml_cm_send_request_completion(struct mca_mtl_request_t *mtl_request) { - mca_pml_cm_send_request_t *base_request = + mca_pml_cm_send_request_t *base_request = (mca_pml_cm_send_request_t*) mtl_request->ompi_req; if( MCA_PML_CM_REQUEST_SEND_THIN == base_request->req_base.req_pml_type ) { MCA_PML_CM_THIN_SEND_REQUEST_PML_COMPLETE(((mca_pml_cm_thin_send_request_t*) base_request)); @@ -70,17 +70,17 @@ static void mca_pml_cm_send_request_construct(mca_pml_cm_hvy_send_request_t* sen sendreq->req_send.req_base.req_ompi.req_cancel = mca_pml_cm_cancel; } -OBJ_CLASS_INSTANCE(mca_pml_cm_send_request_t, - mca_pml_cm_request_t, +OBJ_CLASS_INSTANCE(mca_pml_cm_send_request_t, + mca_pml_cm_request_t, NULL, NULL); -OBJ_CLASS_INSTANCE(mca_pml_cm_thin_send_request_t, - mca_pml_cm_send_request_t, - mca_pml_cm_send_request_construct, +OBJ_CLASS_INSTANCE(mca_pml_cm_thin_send_request_t, + mca_pml_cm_send_request_t, + mca_pml_cm_send_request_construct, NULL); -OBJ_CLASS_INSTANCE(mca_pml_cm_hvy_send_request_t, +OBJ_CLASS_INSTANCE(mca_pml_cm_hvy_send_request_t, mca_pml_cm_send_request_t, mca_pml_cm_send_request_construct, NULL); diff --git a/ompi/mca/pml/cm/pml_cm_sendreq.h b/ompi/mca/pml/cm/pml_cm_sendreq.h index d699c2a25ba..306d390adbc 100644 --- a/ompi/mca/pml/cm/pml_cm_sendreq.h +++ b/ompi/mca/pml/cm/pml_cm_sendreq.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -29,7 +29,7 @@ #include "ompi/mca/mtl/mtl.h" #include "opal/prefetch.h" -struct mca_pml_cm_send_request_t { +struct mca_pml_cm_send_request_t { mca_pml_cm_request_t req_base; mca_pml_base_send_mode_t req_send_mode; }; @@ -37,7 +37,7 @@ typedef struct mca_pml_cm_send_request_t mca_pml_cm_send_request_t; OBJ_CLASS_DECLARATION(mca_pml_cm_send_request_t); -struct mca_pml_cm_thin_send_request_t { +struct mca_pml_cm_thin_send_request_t { mca_pml_cm_send_request_t req_send; mca_mtl_request_t req_mtl; /**< the mtl specific memory. This field should be the last in the struct */ }; @@ -365,7 +365,7 @@ do { \ } \ } \ } while(0); - + #define MCA_PML_CM_HVY_SEND_REQUEST_START(sendreq, ret) \ do { \ @@ -394,7 +394,7 @@ do { /* * The PML has completed a send request. Note that this request * may have been orphaned by the user or have already completed - * at the MPI level. + * at the MPI level. * This macro will never be called directly from the upper level, as it should * only be an internal call to the PML. */ @@ -445,7 +445,7 @@ do { /* * The PML has completed a send request. Note that this request * may have been orphaned by the user or have already completed - * at the MPI level. + * at the MPI level. * This macro will never be called directly from the upper level, as it should * only be an internal call to the PML. */ @@ -465,8 +465,8 @@ do { \ } \ OPAL_THREAD_UNLOCK(&ompi_request_lock); \ } while (0) - - + + /* * Release resources associated with a request */ diff --git a/ompi/mca/pml/cm/pml_cm_start.c b/ompi/mca/pml/cm/pml_cm_start.c index b86891043df..f07c7cf059f 100644 --- a/ompi/mca/pml/cm/pml_cm_start.c +++ b/ompi/mca/pml/cm/pml_cm_start.c @@ -5,7 +5,7 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -39,7 +39,7 @@ mca_pml_cm_start(size_t count, ompi_request_t** requests) if (OMPI_REQUEST_PML != requests[i]->req_type) { continue; } - if (NULL == pml_request) { + if (NULL == pml_request) { continue; } /* If the persistent request is currebtly active - obtain the @@ -52,11 +52,11 @@ mca_pml_cm_start(size_t count, ompi_request_t** requests) case OMPI_REQUEST_INACTIVE: if (pml_request->req_pml_complete == true) break; - + case OMPI_REQUEST_ACTIVE: { /* otherwise fall through */ ompi_request_t *request; - + OPAL_THREAD_LOCK(&ompi_request_lock); if (pml_request->req_pml_complete == false) { /* free request after it completes */ @@ -66,7 +66,7 @@ mca_pml_cm_start(size_t count, ompi_request_t** requests) OPAL_THREAD_UNLOCK(&ompi_request_lock); break; } - + /* allocate a new request */ switch (pml_request->req_pml_type) { case MCA_PML_CM_REQUEST_SEND_HEAVY: { @@ -106,7 +106,7 @@ mca_pml_cm_start(size_t count, ompi_request_t** requests) default: return OMPI_ERR_REQUEST; } - + /* start the request */ switch (pml_request->req_pml_type) { case MCA_PML_CM_REQUEST_SEND_HEAVY: diff --git a/ompi/mca/pml/configure.m4 b/ompi/mca/pml/configure.m4 index 49efbc6b933..b8d5b8f9c99 100644 --- a/ompi/mca/pml/configure.m4 +++ b/ompi/mca/pml/configure.m4 @@ -3,9 +3,9 @@ # Copyright (c) 2013 Sandia National Laboratories. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pml/example/Makefile.am b/ompi/mca/pml/example/Makefile.am index ee7868ae2af..b1cb203e84b 100644 --- a/ompi/mca/pml/example/Makefile.am +++ b/ompi/mca/pml/example/Makefile.am @@ -5,13 +5,13 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pml/example/pml_example.c b/ompi/mca/pml/example/pml_example.c index 799cf234cfc..799e3abe459 100644 --- a/ompi/mca/pml/example/pml_example.c +++ b/ompi/mca/pml/example/pml_example.c @@ -93,6 +93,6 @@ int mca_pml_example_ft_event(int state) { else { ; } - + return OMPI_SUCCESS; } diff --git a/ompi/mca/pml/ob1/Makefile.am b/ompi/mca/pml/ob1/Makefile.am index 4a6d3459df7..4609a29484e 100644 --- a/ompi/mca/pml/ob1/Makefile.am +++ b/ompi/mca/pml/ob1/Makefile.am @@ -13,9 +13,9 @@ # Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -46,7 +46,7 @@ ob1_sources = \ pml_ob1_recvreq.h \ pml_ob1_sendreq.c \ pml_ob1_sendreq.h \ - pml_ob1_start.c + pml_ob1_start.c # If we have CUDA support requested, build the CUDA file also if OPAL_cuda_support diff --git a/ompi/mca/pml/ob1/configure.m4 b/ompi/mca/pml/ob1/configure.m4 index 8020463da87..a8a8ad1e040 100644 --- a/ompi/mca/pml/ob1/configure.m4 +++ b/ompi/mca/pml/ob1/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2013 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -17,7 +17,7 @@ AC_DEFUN([MCA_ompi_pml_ob1_POST_CONFIG], [ AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([BML])]) ])dnl -# MCA_ompi_pml_ob1_CONFIG(action-if-can-compile, +# MCA_ompi_pml_ob1_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ # We can always build, unless we were explicitly disabled. diff --git a/ompi/mca/pml/ob1/help-mpi-pml-ob1.txt b/ompi/mca/pml/ob1/help-mpi-pml-ob1.txt index 46bbf95af26..b03cedd5fd8 100644 --- a/ompi/mca/pml/ob1/help-mpi-pml-ob1.txt +++ b/ompi/mca/pml/ob1/help-mpi-pml-ob1.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # [eager_limit_too_small] @@ -17,7 +17,7 @@ name and its corresponding minimum value is shown below. BTL name: %s BTL eager limit value: %d (set via btl_%s_eager_limit) BTL eager limit minimum: %d - MCA parameter name: btl_%s_eager_limit + MCA parameter name: btl_%s_eager_limit # [cuda_eager_limit_too_small] The "CUDA eager limit" MCA parameter in the %s BTL was set to a value which @@ -29,7 +29,7 @@ name and its corresponding minimum value is shown below. BTL name: %s BTL CUDA eager limit value: %d (set via btl_%s_cuda_eager_limit) BTL CUDA eager limit minimum: %d - MCA parameter name: btl_%s_cuda_eager_limit + MCA parameter name: btl_%s_cuda_eager_limit # [cuda_rdma_limit_too_small] The "CUDA rdma limit" MCA parameter in the %s BTL was set to a value which @@ -41,4 +41,4 @@ name and its corresponding minimum value is shown below. BTL name: %s BTL CUDA rndv limit value: %d (set via btl_%s_cuda_rdma_limit) BTL CUDA rndv limit minimum: %d - MCA parameter name: btl_%s_cuda_rdma_limit + MCA parameter name: btl_%s_cuda_rdma_limit diff --git a/ompi/mca/pml/ob1/pml_ob1.c b/ompi/mca/pml/ob1/pml_ob1.c index e0c19459e24..cee5cd37560 100644 --- a/ompi/mca/pml/ob1/pml_ob1.c +++ b/ompi/mca/pml/ob1/pml_ob1.c @@ -109,7 +109,7 @@ int mca_pml_ob1_enable(bool enable) mca_pml_ob1.free_list_max, mca_pml_ob1.free_list_inc, NULL, 0, NULL, NULL, NULL); - + OBJ_CONSTRUCT(&mca_pml_ob1.recv_frags, opal_free_list_t); opal_free_list_init ( &mca_pml_ob1.recv_frags, @@ -121,7 +121,7 @@ int mca_pml_ob1_enable(bool enable) mca_pml_ob1.free_list_max, mca_pml_ob1.free_list_inc, NULL, 0, NULL, NULL, NULL); - + OBJ_CONSTRUCT(&mca_pml_ob1.pending_pckts, opal_free_list_t); opal_free_list_init ( &mca_pml_ob1.pending_pckts, sizeof(mca_pml_ob1_pckt_pending_t), @@ -229,7 +229,7 @@ int mca_pml_ob1_add_comm(ompi_communicator_t* comm) /* As we now know we work on a fragment for this communicator * we should remove it from the * non_existing_communicator_pending list. */ - opal_list_remove_item( &mca_pml_ob1.non_existing_communicator_pending, + opal_list_remove_item( &mca_pml_ob1.non_existing_communicator_pending, item ); add_fragment_to_unexpected: @@ -317,7 +317,7 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) /* * JJH: Disable this in FT enabled builds since - * we use a wrapper PML. It will cause this check to + * we use a wrapper PML. It will cause this check to * return failure as all processes will return the wrapper PML * component in use instead of the wrapped PML component underneath. */ @@ -350,11 +350,11 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) for (item = opal_list_get_first(&mca_btl_base_modules_initialized) ; item != opal_list_get_end(&mca_btl_base_modules_initialized) ; item = opal_list_get_next(item)) { - mca_btl_base_selected_module_t *sm = + mca_btl_base_selected_module_t *sm = (mca_btl_base_selected_module_t*) item; if (sm->btl_module->btl_eager_limit < sizeof(mca_pml_ob1_hdr_t)) { opal_show_help("help-mpi-pml-ob1.txt", "eager_limit_too_small", - true, + true, sm->btl_component->btl_version.mca_component_name, ompi_process_info.nodename, sm->btl_component->btl_version.mca_component_name, @@ -376,7 +376,7 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) if (0 != sm->btl_module->btl_cuda_eager_limit) { if (sm->btl_module->btl_cuda_eager_limit < sizeof(mca_pml_ob1_hdr_t)) { opal_show_help("help-mpi-pml-ob1.txt", "cuda_eager_limit_too_small", - true, + true, sm->btl_component->btl_version.mca_component_name, ompi_process_info.nodename, sm->btl_component->btl_version.mca_component_name, @@ -394,7 +394,7 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) } else { if (sm->btl_module->btl_cuda_rdma_limit < sm->btl_module->btl_cuda_eager_limit) { opal_show_help("help-mpi-pml-ob1.txt", "cuda_rdma_limit_too_small", - true, + true, sm->btl_component->btl_version.mca_component_name, ompi_process_info.nodename, sm->btl_component->btl_version.mca_component_name, @@ -416,7 +416,7 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) NULL ); if(OMPI_SUCCESS != rc) goto cleanup_and_return; - + rc = mca_bml.bml_register( MCA_PML_OB1_HDR_TYPE_RNDV, mca_pml_ob1_recv_frag_callback_rndv, NULL ); @@ -428,19 +428,19 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) NULL ); if(OMPI_SUCCESS != rc) goto cleanup_and_return; - + rc = mca_bml.bml_register( MCA_PML_OB1_HDR_TYPE_ACK, mca_pml_ob1_recv_frag_callback_ack, NULL ); if(OMPI_SUCCESS != rc) goto cleanup_and_return; - + rc = mca_bml.bml_register( MCA_PML_OB1_HDR_TYPE_FRAG, mca_pml_ob1_recv_frag_callback_frag, NULL ); if(OMPI_SUCCESS != rc) goto cleanup_and_return; - + rc = mca_bml.bml_register( MCA_PML_OB1_HDR_TYPE_PUT, mca_pml_ob1_recv_frag_callback_put, NULL ); @@ -452,12 +452,12 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) NULL ); if(OMPI_SUCCESS != rc) goto cleanup_and_return; - + /* register error handlers */ rc = mca_bml.bml_register_error(mca_pml_ob1_error_handler); if(OMPI_SUCCESS != rc) goto cleanup_and_return; - + cleanup_and_return: OBJ_DESTRUCT(&reachable); @@ -558,7 +558,7 @@ static void mca_pml_ob1_dump_frag_list(opal_list_t* queue, bool is_req) else snprintf(ctag, 64, "%d", req->req_tag); opal_output(0, "req %p peer %s tag %s addr %p count %lu datatype %s [%p] [%s %s] req_seq %" PRIu64, - (void*) req, cpeer, ctag, + (void*) req, cpeer, ctag, (void*) req->req_addr, req->req_count, (0 != req->req_count ? req->req_datatype->name : "N/A"), (void*) req->req_datatype, @@ -594,7 +594,7 @@ int mca_pml_ob1_dump(struct ompi_communicator_t* comm, int verbose) size_t n; opal_output(0, "[Rank %d] expected_seq %d ompi_proc %p send_seq %d\n", - i, proc->expected_sequence, (void*) proc->ompi_proc, + i, proc->expected_sequence, (void*) proc->ompi_proc, proc->send_sequence); /* dump all receive queues */ if( opal_list_get_size(&proc->specific_receives) ) { @@ -623,8 +623,8 @@ static void mca_pml_ob1_fin_completion( mca_btl_base_module_t* btl, struct mca_btl_base_descriptor_t* des, int status ) { - - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; + + mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; /* check for pending requests */ MCA_PML_OB1_PROGRESS_PENDING(bml_btl); @@ -688,11 +688,11 @@ void mca_pml_ob1_process_pending_packets(mca_bml_base_btl_t* bml_btl) OPAL_THREAD_UNLOCK(&mca_pml_ob1.lock); if(NULL == pckt) break; - if(pckt->bml_btl != NULL && + if(pckt->bml_btl != NULL && pckt->bml_btl->btl == bml_btl->btl) { send_dst = pckt->bml_btl; } else { - mca_bml_base_endpoint_t* endpoint = + mca_bml_base_endpoint_t* endpoint = (mca_bml_base_endpoint_t*) pckt->proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; send_dst = mca_bml_base_btl_array_find( &endpoint->btl_eager, bml_btl->btl); @@ -770,7 +770,7 @@ void mca_pml_ob1_process_pending_rdma(void) void mca_pml_ob1_error_handler( struct mca_btl_base_module_t* btl, int32_t flags, - opal_proc_t* errproc, char* btlinfo ) { + opal_proc_t* errproc, char* btlinfo ) { #if OPAL_CUDA_SUPPORT if (flags & MCA_BTL_ERROR_FLAGS_ADD_CUDA_IPC) { mca_pml_ob1_cuda_add_ipc_support(btl, flags, (struct ompi_proc_t*)errproc, btlinfo); @@ -803,7 +803,7 @@ int mca_pml_ob1_ft_event( int state ) else if(OPAL_CRS_CONTINUE == state) { first_continue_pass = !first_continue_pass; - if( !first_continue_pass ) { + if( !first_continue_pass ) { if( opal_cr_timing_barrier_enabled ) { OPAL_CR_SET_TIMER(OPAL_CR_TIMER_COREBR0); opal_pmix.fence(NULL, 0); @@ -824,7 +824,7 @@ int mca_pml_ob1_ft_event( int state ) * Refresh the proc structure, and publish our proc info in the modex. * NOTE: Do *not* call ompi_proc_finalize as there are many places in * the code that point to indv. procs in this strucutre. For our - * needs here we only need to fix up the modex, bml and pml + * needs here we only need to fix up the modex, bml and pml * references. */ if (OMPI_SUCCESS != (ret = ompi_proc_refresh())) { @@ -863,7 +863,7 @@ int mca_pml_ob1_ft_event( int state ) * Refresh the proc structure, and publish our proc info in the modex. * NOTE: Do *not* call ompi_proc_finalize as there are many places in * the code that point to indv. procs in this strucutre. For our - * needs here we only need to fix up the modex, bml and pml + * needs here we only need to fix up the modex, bml and pml * references. */ if (OMPI_SUCCESS != (ret = ompi_proc_refresh())) { @@ -893,7 +893,7 @@ int mca_pml_ob1_ft_event( int state ) opal_output(0, "pml:base: ft_event: BML ft_event function failed: %d\n", ret); } - + if(OPAL_CRS_CHECKPOINT == state) { OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P1); diff --git a/ompi/mca/pml/ob1/pml_ob1.h b/ompi/mca/pml/ob1/pml_ob1.h index a564e90d264..37b920a6410 100644 --- a/ompi/mca/pml/ob1/pml_ob1.h +++ b/ompi/mca/pml/ob1/pml_ob1.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,13 +15,13 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** - * @file + * @file */ #ifndef MCA_PML_OB1_H @@ -47,7 +47,7 @@ BEGIN_C_DECLS */ struct mca_pml_ob1_t { - mca_pml_base_module_t super; + mca_pml_base_module_t super; int priority; int free_list_num; /* initial size of free list */ @@ -58,9 +58,9 @@ struct mca_pml_ob1_t { size_t rdma_retries_limit; int max_rdma_per_request; int max_send_per_range; - bool leave_pinned; + bool leave_pinned; int leave_pinned_pipeline; - + /* lock queue access */ opal_mutex_t lock; @@ -78,12 +78,12 @@ struct mca_pml_ob1_t { opal_list_t rdma_pending; /* List of pending fragments without a matching communicator */ opal_list_t non_existing_communicator_pending; - bool enabled; + bool enabled; char* allocator_name; - mca_allocator_base_module_t* allocator; + mca_allocator_base_module_t* allocator; unsigned int unexpected_limit; }; -typedef struct mca_pml_ob1_t mca_pml_ob1_t; +typedef struct mca_pml_ob1_t mca_pml_ob1_t; extern mca_pml_ob1_t mca_pml_ob1; extern int mca_pml_ob1_output; @@ -260,7 +260,7 @@ do { \ } while(0) -int mca_pml_ob1_send_fin(ompi_proc_t* proc, mca_bml_base_btl_t* bml_btl, +int mca_pml_ob1_send_fin(ompi_proc_t* proc, mca_bml_base_btl_t* bml_btl, opal_ptr_t hdr_frag, uint64_t size, uint8_t order, int status); /* This function tries to resend FIN/ACK packets from pckt_pending queue. diff --git a/ompi/mca/pml/ob1/pml_ob1_comm.c b/ompi/mca/pml/ob1/pml_ob1_comm.c index 8c157220268..d66bebef5db 100644 --- a/ompi/mca/pml/ob1/pml_ob1_comm.c +++ b/ompi/mca/pml/ob1/pml_ob1_comm.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mca/pml/ob1/pml_ob1_comm.h b/ompi/mca/pml/ob1/pml_ob1_comm.h index 84aa3231d1a..411310575d7 100644 --- a/ompi/mca/pml/ob1/pml_ob1_comm.h +++ b/ompi/mca/pml/ob1/pml_ob1_comm.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** @@ -45,7 +45,7 @@ typedef struct mca_pml_ob1_comm_proc_t mca_pml_ob1_comm_proc_t; /** * Cached on ompi_communicator_t to hold queues/state - * used by the PML<->PTL interface for matching logic. + * used by the PML<->PTL interface for matching logic. */ struct mca_pml_comm_t { opal_object_t super; @@ -69,7 +69,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_comm_t); * Initialize an instance of mca_pml_ob1_comm_t based on the communicator size. * * @param comm Instance of mca_pml_ob1_comm_t - * @param size Size of communicator + * @param size Size of communicator * @return OMPI_SUCCESS or error status on failure. */ diff --git a/ompi/mca/pml/ob1/pml_ob1_component.c b/ompi/mca/pml/ob1/pml_ob1_component.c index 2f37468ee20..3cc6d0a45b2 100644 --- a/ompi/mca/pml/ob1/pml_ob1_component.c +++ b/ompi/mca/pml/ob1/pml_ob1_component.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,7 +33,7 @@ #include "pml_ob1_recvreq.h" #include "pml_ob1_rdmafrag.h" #include "pml_ob1_recvfrag.h" -#include "ompi/mca/bml/base/base.h" +#include "ompi/mca/bml/base/base.h" #include "pml_ob1_component.h" #include "opal/mca/allocator/base/base.h" #include "opal/mca/base/mca_base_pvar.h" @@ -60,7 +60,7 @@ mca_pml_base_component_2_0_0_t mca_pml_ob1_component = { .pmlm_version = { MCA_PML_BASE_VERSION_2_0_0, - + .mca_component_name = "ob1", .mca_component_major_version = OMPI_MAJOR_VERSION, .mca_component_minor_version = OMPI_MINOR_VERSION, @@ -81,7 +81,7 @@ mca_pml_base_component_2_0_0_t mca_pml_ob1_component = { void *mca_pml_ob1_seg_alloc( struct mca_mpool_base_module_t* mpool, size_t* size, mca_mpool_base_registration_t** registration); - + void mca_pml_ob1_seg_free( struct mca_mpool_base_module_t* mpool, void* segment ); @@ -191,7 +191,7 @@ static int mca_pml_ob1_component_register(void) mca_pml_ob1_param_register_int("max_send_per_range", 4, &mca_pml_ob1.max_send_per_range); mca_pml_ob1_param_register_uint("unexpected_limit", 128, &mca_pml_ob1.unexpected_limit); - + mca_pml_ob1.allocator_name = "bucket"; (void) mca_base_component_var_register(&mca_pml_ob1_component.pmlm_version, "allocator", "Name of allocator component for unexpected messages", @@ -218,7 +218,7 @@ static int mca_pml_ob1_component_open(void) mca_pml_ob1_output = opal_output_open(NULL); opal_output_set_verbosity(mca_pml_ob1_output, mca_pml_ob1_verbose); - mca_pml_ob1.enabled = false; + mca_pml_ob1.enabled = false; return mca_base_framework_open(&ompi_bml_base_framework, 0); } @@ -237,7 +237,7 @@ static int mca_pml_ob1_component_close(void) static mca_pml_base_module_t* -mca_pml_ob1_component_init( int* priority, +mca_pml_ob1_component_init( int* priority, bool enable_progress_threads, bool enable_mpi_threads ) { @@ -246,7 +246,7 @@ mca_pml_ob1_component_init( int* priority, opal_output_verbose( 10, mca_pml_ob1_output, "in ob1, my priority is %d\n", mca_pml_ob1.priority); - if((*priority) > mca_pml_ob1.priority) { + if((*priority) > mca_pml_ob1.priority) { *priority = mca_pml_ob1.priority; return NULL; } @@ -266,7 +266,7 @@ mca_pml_ob1_component_init( int* priority, return NULL; } - if(OMPI_SUCCESS != mca_bml_base_init( enable_progress_threads, + if(OMPI_SUCCESS != mca_bml_base_init( enable_progress_threads, enable_mpi_threads)) { return NULL; } @@ -289,7 +289,7 @@ int mca_pml_ob1_component_fini(void) return rc; if(!mca_pml_ob1.enabled) - return OMPI_SUCCESS; /* never selected.. return success.. */ + return OMPI_SUCCESS; /* never selected.. return success.. */ mca_pml_ob1.enabled = false; /* not anymore */ OBJ_DESTRUCT(&mca_pml_ob1.rdma_pending); @@ -338,11 +338,11 @@ int mca_pml_ob1_component_fini(void) void *mca_pml_ob1_seg_alloc( struct mca_mpool_base_module_t* mpool, size_t* size, - mca_mpool_base_registration_t** registration) { + mca_mpool_base_registration_t** registration) { return malloc(*size); } void mca_pml_ob1_seg_free( struct mca_mpool_base_module_t* mpool, - void* segment ) { + void* segment ) { free(segment); } diff --git a/ompi/mca/pml/ob1/pml_ob1_component.h b/ompi/mca/pml/ob1/pml_ob1_component.h index 5021da20beb..c72ccc79538 100644 --- a/ompi/mca/pml/ob1/pml_ob1_component.h +++ b/ompi/mca/pml/ob1/pml_ob1_component.h @@ -5,16 +5,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** - * @file + * @file */ #ifndef MCA_PML_OB1_COMPONENT_H diff --git a/ompi/mca/pml/ob1/pml_ob1_cuda.c b/ompi/mca/pml/ob1/pml_ob1_cuda.c index 2be7afa8d6d..a44a8b377c8 100644 --- a/ompi/mca/pml/ob1/pml_ob1_cuda.c +++ b/ompi/mca/pml/ob1/pml_ob1_cuda.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,7 +26,7 @@ #include "ompi_config.h" #include "opal/prefetch.h" #include "opal/mca/btl/btl.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" #include "ompi/constants.h" #include "ompi/mca/pml/pml.h" #include "pml_ob1.h" @@ -59,11 +59,11 @@ int mca_pml_ob1_send_request_start_cuda(mca_pml_ob1_send_request_t* sendreq, #if OPAL_CUDA_SUPPORT_41 #if OPAL_CUDA_GDR_SUPPORT /* With some BTLs, switch to RNDV from RGET at large messages */ - if ((sendreq->req_send.req_base.req_convertor.flags & CONVERTOR_CUDA) && + if ((sendreq->req_send.req_base.req_convertor.flags & CONVERTOR_CUDA) && (sendreq->req_send.req_bytes_packed > (bml_btl->btl->btl_cuda_rdma_limit - sizeof(mca_pml_ob1_hdr_t)))) { return mca_pml_ob1_send_request_start_rndv(sendreq, bml_btl, 0, 0); } -#endif /* OPAL_CUDA_GDR_SUPPORT */ +#endif /* OPAL_CUDA_GDR_SUPPORT */ sendreq->req_send.req_base.req_convertor.flags &= ~CONVERTOR_CUDA; if (opal_convertor_need_buffers(&sendreq->req_send.req_base.req_convertor) == false) { @@ -102,7 +102,7 @@ int mca_pml_ob1_send_request_start_cuda(mca_pml_ob1_send_request_t* sendreq, return rc; } - + size_t mca_pml_ob1_rdma_cuda_btls( mca_bml_base_endpoint_t* bml_endpoint, @@ -119,7 +119,7 @@ size_t mca_pml_ob1_rdma_cuda_btls( return 0; } - /* check to see if memory is registered */ + /* check to see if memory is registered */ for(n = 0; n < num_btls && num_btls_used < mca_pml_ob1.max_rdma_per_request; n++) { mca_bml_base_btl_t* bml_btl = @@ -158,10 +158,10 @@ size_t mca_pml_ob1_rdma_cuda_btls( } int mca_pml_ob1_cuda_need_buffers(void * rreq, - mca_btl_base_module_t* btl) + mca_btl_base_module_t* btl) { mca_pml_ob1_recv_request_t* recvreq = (mca_pml_ob1_recv_request_t*)rreq; - mca_bml_base_endpoint_t* bml_endpoint = + mca_bml_base_endpoint_t* bml_endpoint = (mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; mca_bml_base_btl_t *bml_btl = mca_bml_base_btl_array_find(&bml_endpoint->btl_send, btl); @@ -193,7 +193,7 @@ int mca_pml_ob1_cuda_need_buffers(void * rreq, * future. */ void mca_pml_ob1_cuda_add_ipc_support(struct mca_btl_base_module_t* btl, int32_t flags, ompi_proc_t* errproc, char* btlinfo) -{ +{ mca_bml_base_endpoint_t* ep; int btl_verbose_stream = 0; int i; diff --git a/ompi/mca/pml/ob1/pml_ob1_hdr.h b/ompi/mca/pml/ob1/pml_ob1_hdr.h index 7bfa86a53ca..8f8f2ecf4fd 100644 --- a/ompi/mca/pml/ob1/pml_ob1_hdr.h +++ b/ompi/mca/pml/ob1/pml_ob1_hdr.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -56,7 +56,7 @@ #define MCA_PML_OB1_HDR_FLAGS_SIGNAL 32 /* message can be optionally signalling */ /** - * Common hdr attributes - must be first element in each hdr type + * Common hdr attributes - must be first element in each hdr type */ struct mca_pml_ob1_common_hdr_t { uint8_t hdr_type; /**< type of envelope */ @@ -71,11 +71,11 @@ static inline void mca_pml_ob1_common_hdr_prepare (mca_pml_ob1_common_hdr_t *hdr hdr->hdr_flags = hdr_flags; } -#define MCA_PML_OB1_COMMON_HDR_NTOH(h) -#define MCA_PML_OB1_COMMON_HDR_HTON(h) +#define MCA_PML_OB1_COMMON_HDR_NTOH(h) +#define MCA_PML_OB1_COMMON_HDR_HTON(h) /** - * Header definition for the first fragment, contains the + * Header definition for the first fragment, contains the * attributes required to match the corresponding posted receive. */ struct mca_pml_ob1_match_hdr_t { @@ -92,7 +92,7 @@ struct mca_pml_ob1_match_hdr_t { #define OMPI_PML_OB1_MATCH_HDR_LEN 16 #else #define OMPI_PML_OB1_MATCH_HDR_LEN 14 -#endif +#endif typedef struct mca_pml_ob1_match_hdr_t mca_pml_ob1_match_hdr_t; @@ -126,7 +126,7 @@ do { \ (h).hdr_src = htonl((h).hdr_src); \ (h).hdr_tag = htonl((h).hdr_tag); \ (h).hdr_seq = htons((h).hdr_seq); \ -} while (0) +} while (0) /** * Header definition for the first fragment when an acknowledgment @@ -162,7 +162,7 @@ static inline void mca_pml_ob1_rendezvous_hdr_prepare (mca_pml_ob1_rendezvous_hd do { \ MCA_PML_OB1_MATCH_HDR_HTON((h).hdr_match); \ (h).hdr_msg_length = hton64((h).hdr_msg_length); \ - } while (0) + } while (0) /** * Header definition for a combined rdma rendezvous/get @@ -208,7 +208,7 @@ static inline void mca_pml_ob1_rget_hdr_prepare (mca_pml_ob1_rget_hdr_t *hdr, ui do { \ MCA_PML_OB1_RNDV_HDR_HTON((h).hdr_rndv); \ (h).hdr_src_ptr = hton64((h).hdr_src_ptr); \ - } while (0) + } while (0) /** * Header for subsequent fragments. @@ -305,7 +305,7 @@ static inline void mca_pml_ob1_ack_hdr_prepare (mca_pml_ob1_ack_hdr_t *hdr, uint MCA_PML_OB1_COMMON_HDR_HTON((h).hdr_common); \ (h).hdr_send_offset = hton64((h).hdr_send_offset); \ (h).hdr_send_size = hton64((h).hdr_send_size); \ - } while (0) + } while (0) /** * Header used to initiate an RDMA operation. @@ -363,7 +363,7 @@ static inline void mca_pml_ob1_rdma_hdr_prepare (mca_pml_ob1_rdma_hdr_t *hdr, ui (h).hdr_rdma_offset = hton64((h).hdr_rdma_offset); \ (h).hdr_dst_ptr = hton64((h).hdr_dst_ptr); \ (h).hdr_dst_size = hton64((h).hdr_dst_size); \ - } while (0) + } while (0) /** * Header used to complete an RDMA operation. diff --git a/ompi/mca/pml/ob1/pml_ob1_iprobe.c b/ompi/mca/pml/ob1/pml_ob1_iprobe.c index f57ce2389df..54c7cc794bd 100644 --- a/ompi/mca/pml/ob1/pml_ob1_iprobe.c +++ b/ompi/mca/pml/ob1/pml_ob1_iprobe.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011-2012 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -84,7 +84,7 @@ int mca_pml_ob1_improbe(int src, int tag, struct ompi_communicator_t *comm, - int *matched, + int *matched, struct ompi_message_t **message, ompi_status_public_t * status) { @@ -102,7 +102,7 @@ mca_pml_ob1_improbe(int src, recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_IMPROBE; /* initialize the request enough to probe and get the status */ - MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt, + MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, false); MCA_PML_OB1_RECV_REQUEST_START(recvreq); @@ -127,7 +127,7 @@ mca_pml_ob1_improbe(int src, MCA_PML_OB1_RECV_REQUEST_RETURN( recvreq ); ompi_message_return(*message); *message = MPI_MESSAGE_NULL; - + opal_progress(); } @@ -156,7 +156,7 @@ mca_pml_ob1_mprobe(int src, recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_MPROBE; /* initialize the request enough to probe and get the status */ - MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt, + MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt, src, tag, comm, false); MCA_PML_OB1_RECV_REQUEST_START(recvreq); diff --git a/ompi/mca/pml/ob1/pml_ob1_progress.c b/ompi/mca/pml/ob1/pml_ob1_progress.c index 8c61ac51835..ea283293e3b 100644 --- a/ompi/mca/pml/ob1/pml_ob1_progress.c +++ b/ompi/mca/pml/ob1/pml_ob1_progress.c @@ -6,14 +6,14 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -21,7 +21,7 @@ #include "pml_ob1.h" #include "pml_ob1_sendreq.h" -#include "ompi/mca/bml/base/base.h" +#include "ompi/mca/bml/base/base.h" #if OPAL_CUDA_SUPPORT #include "opal/mca/common/cuda/common_cuda.h" #include "pml_ob1_recvreq.h" @@ -69,7 +69,7 @@ int mca_pml_ob1_progress(void) for(j = 0; j < (int)mca_bml_base_btl_array_get_size(&endpoint->btl_eager); j++) { mca_bml_base_btl_t* bml_btl; int rc; - + /* select a btl */ bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); rc = mca_pml_ob1_send_request_start_btl(sendreq, bml_btl); diff --git a/ompi/mca/pml/ob1/pml_ob1_rdma.c b/ompi/mca/pml/ob1/pml_ob1_rdma.c index c2c9bbbe89d..888e12690f0 100644 --- a/ompi/mca/pml/ob1/pml_ob1_rdma.c +++ b/ompi/mca/pml/ob1/pml_ob1_rdma.c @@ -6,16 +6,16 @@ * 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, + * 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) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,12 +26,12 @@ #include "ompi/constants.h" #include "ompi/mca/pml/pml.h" #include "ompi/mca/bml/bml.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" #include "pml_ob1.h" #include "pml_ob1_rdma.h" /* - * Check to see if memory is registered or can be registered. Build a + * Check to see if memory is registered or can be registered. Build a * set of registrations on the request. */ @@ -50,7 +50,7 @@ size_t mca_pml_ob1_rdma_btls( return 0; } - /* check to see if memory is registered */ + /* check to see if memory is registered */ for (int n = 0; n < num_btls && num_btls_used < mca_pml_ob1.max_rdma_per_request; n++) { mca_bml_base_btl_t* bml_btl = mca_bml_base_btl_array_get_index(&bml_endpoint->btl_rdma, diff --git a/ompi/mca/pml/ob1/pml_ob1_rdma.h b/ompi/mca/pml/ob1/pml_ob1_rdma.h index 3ed0655795f..80e4fb2735e 100644 --- a/ompi/mca/pml/ob1/pml_ob1_rdma.h +++ b/ompi/mca/pml/ob1/pml_ob1_rdma.h @@ -18,7 +18,7 @@ /** * @file */ - + #ifndef MCA_PML_OB1_RDMA_H #define MCA_PML_OB1_RDMA_H diff --git a/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h b/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h index ea15b67300b..70a390d8073 100644 --- a/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h +++ b/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h @@ -6,22 +6,22 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file */ - + #ifndef MCA_PML_OB1_RDMAFRAG_H #define MCA_PML_OB1_RDMAFRAG_H diff --git a/ompi/mca/pml/ob1/pml_ob1_recvfrag.c b/ompi/mca/pml/ob1/pml_ob1_recvfrag.c index dd43e1483c8..16a7636e55d 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvfrag.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvfrag.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -18,9 +18,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -83,29 +83,29 @@ append_frag_to_list(opal_list_t *queue, mca_btl_base_module_t *btl, } /** - * Match incoming recv_frags against posted receives. + * Match incoming recv_frags against posted receives. * Supports out of order delivery. - * + * * @param frag_header (IN) Header of received recv_frag. * @param frag_desc (IN) Received recv_frag descriptor. * @param match_made (OUT) Flag indicating wether a match was made. - * @param additional_matches (OUT) List of additional matches + * @param additional_matches (OUT) List of additional matches * @return OMPI_SUCCESS or error status on failure. */ -static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, +static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, mca_pml_ob1_match_hdr_t *hdr, mca_btl_base_segment_t* segments, size_t num_segments, int type); - + static mca_pml_ob1_recv_request_t* match_one(mca_btl_base_module_t *btl, mca_pml_ob1_match_hdr_t *hdr, mca_btl_base_segment_t* segments, size_t num_segments, ompi_communicator_t *comm_ptr, mca_pml_ob1_comm_proc_t *proc, mca_pml_ob1_recv_frag_t* frag); - -void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, + +void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) @@ -120,12 +120,12 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, size_t bytes_received = 0; assert(num_segments <= MCA_BTL_DES_MAX_SEGMENTS); - + if( OPAL_UNLIKELY(segments->seg_len < OMPI_PML_OB1_MATCH_HDR_LEN) ) { return; } ob1_hdr_ntoh(((mca_pml_ob1_hdr_t*) hdr), MCA_PML_OB1_HDR_TYPE_MATCH); - + /* communicator pointer */ comm_ptr = ompi_comm_lookup(hdr->hdr_ctx); if(OPAL_UNLIKELY(NULL == comm_ptr)) { @@ -141,10 +141,10 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, return; } comm = (mca_pml_ob1_comm_t *)comm_ptr->c_pml_comm; - + /* source sequence number */ proc = &comm->procs[hdr->hdr_src]; - + /* We generate the MSG_ARRIVED event as soon as the PML is aware * of a matching fragment arrival. Independing if it is received * on the correct order or not. This will allow the tools to @@ -153,7 +153,7 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, */ PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_ARRIVED, comm_ptr, hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - + /* get next expected message sequence number - if threaded * run, lock to make sure that if another thread is processing * a frag from the same message a match is made only once. @@ -162,17 +162,17 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, * the fragment. */ OPAL_THREAD_LOCK(&comm->matching_lock); - + /* get sequence number of next message that can be processed */ if(OPAL_UNLIKELY((((uint16_t) hdr->hdr_seq) != ((uint16_t) proc->expected_sequence)) || (opal_list_get_size(&proc->frags_cant_match) > 0 ))) { goto slow_path; } - + /* This is the sequence number we were expecting, so we can try * matching it to already posted receives. */ - + /* We're now expecting the next sequence number. */ proc->expected_sequence++; @@ -182,9 +182,9 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, */ PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_BEGIN, comm_ptr, hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - + match = match_one(btl, hdr, segments, num_segments, comm_ptr, proc, NULL); - + /* The match is over. We generate the SEARCH_POSTED_Q_END here, * before going into the mca_pml_ob1_check_cantmatch_for_match so * we can make a difference for the searching time for all @@ -192,19 +192,19 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, */ PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_END, comm_ptr, hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); - + /* release matching lock before processing fragment */ OPAL_THREAD_UNLOCK(&comm->matching_lock); if(OPAL_LIKELY(match)) { bytes_received = segments->seg_len - OMPI_PML_OB1_MATCH_HDR_LEN; match->req_recv.req_bytes_packed = bytes_received; - + MCA_PML_OB1_RECV_REQUEST_MATCHED(match, hdr); - if(match->req_bytes_expected > 0) { + if(match->req_bytes_expected > 0) { struct iovec iov[MCA_BTL_DES_MAX_SEGMENTS]; uint32_t iov_count = 1; - + /* * Make user buffer accessable(defined) before unpacking. */ @@ -214,7 +214,7 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, match->req_recv.req_base.req_count, match->req_recv.req_base.req_datatype); ); - + iov[0].iov_len = bytes_received; iov[0].iov_base = (IOVBASE_TYPE*)((unsigned char*)segments->seg_addr.pval + OMPI_PML_OB1_MATCH_HDR_LEN); @@ -239,13 +239,13 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, match->req_recv.req_base.req_datatype); ); } - + /* no need to check if complete we know we are.. */ /* don't need a rmb as that is for checking */ recv_request_pml_complete(match); } return; - + slow_path: OPAL_THREAD_UNLOCK(&comm->matching_lock); mca_pml_ob1_recv_frag_match(btl, hdr, segments, @@ -253,14 +253,14 @@ void mca_pml_ob1_recv_frag_callback_match(mca_btl_base_module_t* btl, } -void mca_pml_ob1_recv_frag_callback_rndv(mca_btl_base_module_t* btl, +void mca_pml_ob1_recv_frag_callback_rndv(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) { mca_btl_base_segment_t* segments = des->des_segments; mca_pml_ob1_hdr_t* hdr = (mca_pml_ob1_hdr_t*)segments->seg_addr.pval; - + if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_ob1_common_hdr_t)) ) { return; } @@ -270,14 +270,14 @@ void mca_pml_ob1_recv_frag_callback_rndv(mca_btl_base_module_t* btl, return; } -void mca_pml_ob1_recv_frag_callback_rget(mca_btl_base_module_t* btl, +void mca_pml_ob1_recv_frag_callback_rget(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) { mca_btl_base_segment_t* segments = des->des_segments; mca_pml_ob1_hdr_t* hdr = (mca_pml_ob1_hdr_t*)segments->seg_addr.pval; - + if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_ob1_common_hdr_t)) ) { return; } @@ -287,9 +287,9 @@ void mca_pml_ob1_recv_frag_callback_rget(mca_btl_base_module_t* btl, return; } - -void mca_pml_ob1_recv_frag_callback_ack(mca_btl_base_module_t* btl, + +void mca_pml_ob1_recv_frag_callback_ack(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) @@ -298,7 +298,7 @@ void mca_pml_ob1_recv_frag_callback_ack(mca_btl_base_module_t* btl, mca_pml_ob1_hdr_t* hdr = (mca_pml_ob1_hdr_t*)segments->seg_addr.pval; mca_pml_ob1_send_request_t* sendreq; size_t size; - + if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_ob1_common_hdr_t)) ) { return; } @@ -360,7 +360,7 @@ void mca_pml_ob1_recv_frag_callback_ack(mca_btl_base_module_t* btl, return; } -void mca_pml_ob1_recv_frag_callback_frag(mca_btl_base_module_t* btl, +void mca_pml_ob1_recv_frag_callback_frag(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) { @@ -383,7 +383,7 @@ void mca_pml_ob1_recv_frag_callback_frag(mca_btl_base_module_t* btl, /* This will trigger the opal_convertor_pack to start asynchronous copy. */ mca_pml_ob1_recv_request_frag_copy_start(recvreq,btl,segments,des->des_segment_count,des); - + /* Let BTL know that it CANNOT free the frag */ des->des_flags |= MCA_BTL_DES_FLAGS_CUDA_COPY_ASYNC; @@ -397,34 +397,34 @@ void mca_pml_ob1_recv_frag_callback_frag(mca_btl_base_module_t* btl, } -void mca_pml_ob1_recv_frag_callback_put(mca_btl_base_module_t* btl, +void mca_pml_ob1_recv_frag_callback_put(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) { mca_btl_base_segment_t* segments = des->des_segments; mca_pml_ob1_hdr_t* hdr = (mca_pml_ob1_hdr_t*)segments->seg_addr.pval; mca_pml_ob1_send_request_t* sendreq; - + if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_ob1_common_hdr_t)) ) { return; } - + ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_PUT); sendreq = (mca_pml_ob1_send_request_t*)hdr->hdr_rdma.hdr_req.pval; mca_pml_ob1_send_request_put(sendreq,btl,&hdr->hdr_rdma); - + return; } -void mca_pml_ob1_recv_frag_callback_fin(mca_btl_base_module_t* btl, +void mca_pml_ob1_recv_frag_callback_fin(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) { mca_btl_base_segment_t* segments = des->des_segments; mca_pml_ob1_fin_hdr_t* hdr = (mca_pml_ob1_fin_hdr_t *) segments->seg_addr.pval; mca_pml_ob1_rdma_frag_t *frag; - + if( OPAL_UNLIKELY(segments->seg_len < sizeof(mca_pml_ob1_fin_hdr_t)) ) { return; } @@ -618,10 +618,10 @@ static mca_pml_ob1_recv_frag_t* check_cantmatch_for_match(mca_pml_ob1_comm_proc_ * - fragments may be corrupt * - this routine may be called simultaneously by more than one thread */ -static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, +static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, mca_pml_ob1_match_hdr_t *hdr, mca_btl_base_segment_t* segments, - size_t num_segments, + size_t num_segments, int type) { /* local variables */ @@ -662,7 +662,7 @@ static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV); /* get next expected message sequence number - if threaded - * run, lock to make sure that if another thread is processing + * run, lock to make sure that if another thread is processing * a frag from the same message a match is made only once. * Also, this prevents other posted receives (for a pair of * end points) from being processed, and potentially "loosing" @@ -718,12 +718,12 @@ static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, mca_pml_ob1_recv_request_progress_rget(match, btl, segments, num_segments); break; } - + if(OPAL_UNLIKELY(frag)) MCA_PML_OB1_RECV_FRAG_RETURN(frag); } - - /* + + /* * Now that new message has arrived, check to see if * any fragments on the c_c_frags_cant_match list * may now be used to form new matchs diff --git a/ompi/mca/pml/ob1/pml_ob1_recvfrag.h b/ompi/mca/pml/ob1/pml_ob1_recvfrag.h index 82f90b29f0f..306f269182e 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvfrag.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvfrag.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -58,7 +58,7 @@ do { \ opal_free_list_wait (&mca_pml_ob1.recv_frags); \ } while(0) - + #define MCA_PML_OB1_RECV_FRAG_INIT(frag, hdr, segs, cnt, btl ) \ do { \ size_t i, _size; \ @@ -112,16 +112,16 @@ do { \ * Callback from BTL on receipt of a recv_frag (match). */ -extern void mca_pml_ob1_recv_frag_callback_match( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_match( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); - + /** * Callback from BTL on receipt of a recv_frag (rndv). */ -extern void mca_pml_ob1_recv_frag_callback_rndv( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_rndv( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); @@ -129,7 +129,7 @@ extern void mca_pml_ob1_recv_frag_callback_rndv( mca_btl_base_module_t *btl, * Callback from BTL on receipt of a recv_frag (rget). */ -extern void mca_pml_ob1_recv_frag_callback_rget( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_rget( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); @@ -138,7 +138,7 @@ extern void mca_pml_ob1_recv_frag_callback_rget( mca_btl_base_module_t *btl, * Callback from BTL on receipt of a recv_frag (ack). */ -extern void mca_pml_ob1_recv_frag_callback_ack( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_ack( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); @@ -146,7 +146,7 @@ extern void mca_pml_ob1_recv_frag_callback_ack( mca_btl_base_module_t *btl, * Callback from BTL on receipt of a recv_frag (frag). */ -extern void mca_pml_ob1_recv_frag_callback_frag( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_frag( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); @@ -154,7 +154,7 @@ extern void mca_pml_ob1_recv_frag_callback_frag( mca_btl_base_module_t *btl, * Callback from BTL on receipt of a recv_frag (put). */ -extern void mca_pml_ob1_recv_frag_callback_put( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_put( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); @@ -162,12 +162,12 @@ extern void mca_pml_ob1_recv_frag_callback_put( mca_btl_base_module_t *btl, * Callback from BTL on receipt of a recv_frag (fin). */ -extern void mca_pml_ob1_recv_frag_callback_fin( mca_btl_base_module_t *btl, +extern void mca_pml_ob1_recv_frag_callback_fin( mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* descriptor, void* cbdata ); - + END_C_DECLS #endif diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index 30b5df4a6aa..792ae45a9c1 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -19,24 +19,24 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" #include "opal/util/arch.h" #include "ompi/mca/pml/pml.h" -#include "ompi/mca/bml/bml.h" +#include "ompi/mca/bml/bml.h" #include "pml_ob1_comm.h" #include "pml_ob1_recvreq.h" #include "pml_ob1_recvfrag.h" #include "pml_ob1_sendreq.h" #include "pml_ob1_rdmafrag.h" -#include "ompi/mca/bml/base/base.h" +#include "ompi/mca/bml/base/base.h" #include "ompi/memchecker.h" #if OPAL_CUDA_SUPPORT #include "opal/datatype/opal_datatype_cuda.h" @@ -69,7 +69,7 @@ void mca_pml_ob1_recv_request_process_pending(void) static int mca_pml_ob1_recv_request_free(struct ompi_request_t** request) { - mca_pml_ob1_recv_request_t* recvreq = *(mca_pml_ob1_recv_request_t**)request; + mca_pml_ob1_recv_request_t* recvreq = *(mca_pml_ob1_recv_request_t**)request; assert( false == recvreq->req_recv.req_base.req_free_called ); @@ -95,7 +95,7 @@ static int mca_pml_ob1_recv_request_free(struct ompi_request_t** request) OPAL_THREAD_UNLOCK(&ompi_request_lock); *request = MPI_REQUEST_NULL; return OMPI_SUCCESS; -} +} static int mca_pml_ob1_recv_request_cancel(struct ompi_request_t* ompi_request, int complete) { @@ -123,7 +123,7 @@ static int mca_pml_ob1_recv_request_cancel(struct ompi_request_t* ompi_request, */ request->req_recv.req_base.req_pml_complete = true; OPAL_THREAD_UNLOCK(&comm->matching_lock); - + OPAL_THREAD_LOCK(&ompi_request_lock); ompi_request->req_status._cancelled = true; /* This macro will set the req_complete to true so the MPI Test/Wait* functions @@ -228,10 +228,10 @@ int mca_pml_ob1_recv_request_ack_send_btl( /* allocate descriptor */ mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, sizeof(mca_pml_ob1_ack_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK | MCA_BTL_DES_FLAGS_SIGNAL); if( OPAL_UNLIKELY(NULL == des) ) { - return OMPI_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } /* fill out header */ @@ -249,18 +249,18 @@ int mca_pml_ob1_recv_request_ack_send_btl( return OMPI_SUCCESS; } mca_bml_base_free(bml_btl, des); - return OMPI_ERR_OUT_OF_RESOURCE; + return OMPI_ERR_OUT_OF_RESOURCE; } static int mca_pml_ob1_recv_request_ack( mca_pml_ob1_recv_request_t* recvreq, - mca_pml_ob1_rendezvous_hdr_t* hdr, + mca_pml_ob1_rendezvous_hdr_t* hdr, size_t bytes_received) { ompi_proc_t* proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc; mca_bml_base_endpoint_t* bml_endpoint = NULL; - bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; + bml_endpoint = (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; /* by default copy everything */ recvreq->req_send_offset = bytes_received; @@ -268,7 +268,7 @@ static int mca_pml_ob1_recv_request_ack( size_t rdma_num = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_rdma); /* * lookup request buffer to determine if memory is already - * registered. + * registered. */ if(opal_convertor_need_buffers(&recvreq->req_recv.req_base.req_convertor) == 0 && @@ -276,7 +276,7 @@ static int mca_pml_ob1_recv_request_ack( rdma_num != 0) { unsigned char *base; opal_convertor_get_current_pointer( &recvreq->req_recv.req_base.req_convertor, (void**)&(base) ); - + if(hdr->hdr_match.hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_PIN) recvreq->req_rdma_cnt = mca_pml_ob1_rdma_btls(bml_endpoint, base, recvreq->req_recv.req_bytes_packed, @@ -290,7 +290,7 @@ static int mca_pml_ob1_recv_request_ack( /* are rdma devices available for long rdma protocol */ } else if(bml_endpoint->btl_send_limit < hdr->hdr_msg_length) { /* use convertor to figure out the rdma offset for this request */ - recvreq->req_send_offset = hdr->hdr_msg_length - + recvreq->req_send_offset = hdr->hdr_msg_length - bml_endpoint->btl_pipeline_send_length; if(recvreq->req_send_offset < bytes_received) @@ -413,7 +413,7 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag) return OMPI_ERR_OUT_OF_RESOURCE; } ctl->des_cbfunc = mca_pml_ob1_recv_ctl_completion; - + /* fill in rdma header */ hdr = (mca_pml_ob1_rdma_hdr_t *) ctl->des_segments->seg_addr.pval; mca_pml_ob1_rdma_hdr_prepare (hdr, (!recvreq->req_ack_sent) ? MCA_PML_OB1_HDR_TYPE_ACK : 0, @@ -485,7 +485,7 @@ int mca_pml_ob1_recv_request_get_frag (mca_pml_ob1_rdma_frag_t *frag) /* * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. + * received and actually delivered to the application. */ void mca_pml_ob1_recv_request_progress_frag( mca_pml_ob1_recv_request_t* recvreq, @@ -526,7 +526,7 @@ void mca_pml_ob1_recv_request_progress_frag( mca_pml_ob1_recv_request_t* recvreq recvreq->req_recv.req_base.req_count, recvreq->req_recv.req_base.req_datatype); ); - + OPAL_THREAD_ADD_SIZE_T(&recvreq->req_bytes_received, bytes_received); /* check completion status */ if(recv_request_pml_complete_check(recvreq) == false && @@ -542,7 +542,7 @@ void mca_pml_ob1_recv_request_progress_frag( mca_pml_ob1_recv_request_t* recvreq * mca_pml_ob1_recv_request_progress_frag function. This fires off * the asynchronous copy and returns. Unused fields in the descriptor * are used to pass extra information for when the asynchronous copy - * completes. No memchecker support in this function as copies are + * completes. No memchecker support in this function as copies are * happening asynchronously. */ void mca_pml_ob1_recv_request_frag_copy_start( mca_pml_ob1_recv_request_t* recvreq, @@ -600,7 +600,7 @@ void mca_pml_ob1_recv_request_frag_copy_finished( mca_btl_base_module_t* btl, size_t bytes_received = (size_t) (intptr_t) des->des_cbdata; OPAL_OUTPUT((-1, "frag_copy_finished (delivered=%d), frag=%p", (int)bytes_received, (void *)des)); - /* Call into the BTL so it can free the descriptor. At this point, it is + /* Call into the BTL so it can free the descriptor. At this point, it is * known that the data has been copied out of the descriptor. */ des->des_cbfunc(NULL, NULL, des, 0); @@ -617,7 +617,7 @@ void mca_pml_ob1_recv_request_frag_copy_finished( mca_btl_base_module_t* btl, /* * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. + * received and actually delivered to the application. */ void mca_pml_ob1_recv_request_progress_rget( mca_pml_ob1_recv_request_t* recvreq, @@ -638,7 +638,7 @@ void mca_pml_ob1_recv_request_progress_rget( mca_pml_ob1_recv_request_t* recvreq recvreq->req_send_offset = 0; MCA_PML_OB1_RECV_REQUEST_MATCHED(recvreq, &hdr->hdr_rndv.hdr_match); - + /* if receive buffer is not contiguous we can't just RDMA read into it, so * fall back to copy in/out protocol. It is a pity because buffer on the * sender side is already registered. We need to be smarter here, perhaps @@ -652,7 +652,7 @@ void mca_pml_ob1_recv_request_progress_rget( mca_pml_ob1_recv_request_t* recvreq return; } } - + /* lookup bml datastructures */ bml_endpoint = (mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; rdma_bml = mca_bml_base_btl_array_find(&bml_endpoint->btl_rdma, btl); @@ -770,7 +770,7 @@ void mca_pml_ob1_recv_request_progress_rget( mca_pml_ob1_recv_request_t* recvreq /* * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. + * received and actually delivered to the application. */ void mca_pml_ob1_recv_request_progress_rndv( mca_pml_ob1_recv_request_t* recvreq, @@ -834,12 +834,12 @@ void mca_pml_ob1_recv_request_progress_rndv( mca_pml_ob1_recv_request_t* recvreq opal_cuda_set_copy_function_async(&recvreq->req_recv.req_base.req_convertor, strm); } #endif - + } /* * Update the recv request status to reflect the number of bytes - * received and actually delivered to the application. + * received and actually delivered to the application. */ void mca_pml_ob1_recv_request_progress_match( mca_pml_ob1_recv_request_t* recvreq, mca_btl_base_module_t* btl, @@ -854,7 +854,7 @@ void mca_pml_ob1_recv_request_progress_match( mca_pml_ob1_recv_request_t* recvre OMPI_PML_OB1_MATCH_HDR_LEN); recvreq->req_recv.req_bytes_packed = bytes_received; - + MCA_PML_OB1_RECV_REQUEST_MATCHED(recvreq, &hdr->hdr_match); /* * Make user buffer accessable(defined) before unpacking. @@ -881,7 +881,7 @@ void mca_pml_ob1_recv_request_progress_match( mca_pml_ob1_recv_request_t* recvre recvreq->req_recv.req_base.req_count, recvreq->req_recv.req_base.req_datatype); ); - + /* * No need for atomic here, as we know there is only one fragment * for this request. @@ -933,7 +933,7 @@ void mca_pml_ob1_recv_request_matched_probe( mca_pml_ob1_recv_request_t* recvreq int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq, mca_bml_base_btl_t *start_bml_btl ) { - mca_bml_base_btl_t* bml_btl; + mca_bml_base_btl_t* bml_btl; int num_tries = recvreq->req_rdma_cnt, num_fail = 0; size_t i, prev_bytes_remaining = 0; size_t bytes_remaining = recvreq->req_send_offset - @@ -1092,7 +1092,7 @@ recv_req_match_specific_proc( const mca_pml_ob1_recv_request_t *req, i != opal_list_get_end(unexpected_frags); i = opal_list_get_next(i)) { frag = (mca_pml_ob1_recv_frag_t*)i; - + if( frag->hdr.hdr_match.hdr_tag >= 0 ) return frag; } @@ -1101,7 +1101,7 @@ recv_req_match_specific_proc( const mca_pml_ob1_recv_request_t *req, i != opal_list_get_end(unexpected_frags); i = opal_list_get_next(i)) { frag = (mca_pml_ob1_recv_frag_t*)i; - + if( frag->hdr.hdr_match.hdr_tag == tag ) return frag; } @@ -1210,7 +1210,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req) req->req_recv.req_base.req_proc = proc->ompi_proc; frag = recv_req_match_specific_proc(req, proc); queue = &proc->specific_receives; - /* wild cardrecv will be prepared on match */ + /* wild cardrecv will be prepared on match */ prepare_recv_req_converter(req); } @@ -1240,7 +1240,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req) opal_list_remove_item(&proc->unexpected_frags, (opal_list_item_t*)frag); OPAL_THREAD_UNLOCK(&comm->matching_lock); - + switch(hdr->hdr_common.hdr_type) { case MCA_PML_OB1_HDR_TYPE_MATCH: mca_pml_ob1_recv_request_progress_match(req, frag->btl, frag->segments, @@ -1257,7 +1257,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req) default: assert(0); } - + MCA_PML_OB1_RECV_FRAG_RETURN(frag); } else if (OPAL_UNLIKELY(IS_MPROB_REQ(req))) { diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index c9b75ecf2cf..3e495aa283c 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -17,9 +17,9 @@ * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -330,7 +330,7 @@ void mca_pml_ob1_recv_request_frag_copy_start( size_t num_segments, mca_btl_base_descriptor_t* des); -void mca_pml_ob1_recv_request_frag_copy_finished(struct mca_btl_base_module_t* btl, +void mca_pml_ob1_recv_request_frag_copy_finished(struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* ep, struct mca_btl_base_descriptor_t* des, int status ); diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c index 116338d6a82..f1f2744b2e3 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -17,16 +17,16 @@ * reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" #include "opal/prefetch.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" #include "ompi/constants.h" #include "ompi/mca/pml/pml.h" #include "pml_ob1.h" @@ -97,7 +97,7 @@ void mca_pml_ob1_send_request_process_pending(mca_bml_base_btl_t *bml_btl) static int mca_pml_ob1_send_request_free(struct ompi_request_t** request) { mca_pml_ob1_send_request_t* sendreq = *(mca_pml_ob1_send_request_t**)request; - + assert( false == sendreq->req_send.req_base.req_free_called ); OPAL_THREAD_LOCK(&ompi_request_lock); @@ -163,7 +163,7 @@ OBJ_CLASS_INSTANCE( mca_pml_ob1_send_request_t, */ static inline void -mca_pml_ob1_match_completion_free_request( mca_bml_base_btl_t* bml_btl, +mca_pml_ob1_match_completion_free_request( mca_bml_base_btl_t* bml_btl, mca_pml_ob1_send_request_t* sendreq ) { if( sendreq->req_send.req_bytes_packed > 0 ) { @@ -179,13 +179,13 @@ mca_pml_ob1_match_completion_free_request( mca_bml_base_btl_t* bml_btl, } static void -mca_pml_ob1_match_completion_free( struct mca_btl_base_module_t* btl, +mca_pml_ob1_match_completion_free( struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* ep, struct mca_btl_base_descriptor_t* des, int status ) { mca_pml_ob1_send_request_t* sendreq = (mca_pml_ob1_send_request_t*)des->des_cbdata; - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; + mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; /* check completion status */ if( OPAL_UNLIKELY(OMPI_SUCCESS != status) ) { @@ -218,7 +218,7 @@ mca_pml_ob1_rndv_completion_request( mca_bml_base_btl_t* bml_btl, } /* - * Completion of the first fragment of a long message that + * Completion of the first fragment of a long message that * requires an acknowledgement */ static void @@ -281,7 +281,7 @@ mca_pml_ob1_send_ctl_completion( mca_btl_base_module_t* btl, struct mca_btl_base_descriptor_t* des, int status ) { - mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; + mca_bml_base_btl_t* bml_btl = (mca_bml_base_btl_t*) des->des_context; /* check for pending requests */ MCA_PML_OB1_PROGRESS_PENDING(bml_btl); @@ -376,18 +376,18 @@ int mca_pml_ob1_send_request_start_buffered( int rc; /* allocate descriptor */ - mca_bml_base_alloc(bml_btl, &des, + mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER, sizeof(mca_pml_ob1_rendezvous_hdr_t) + size, MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_FLAGS_SIGNAL); if( OPAL_UNLIKELY(NULL == des) ) { return OMPI_ERR_OUT_OF_RESOURCE; - } + } segment = des->des_segments; /* pack the data into the BTL supplied buffer */ - iov.iov_base = (IOVBASE_TYPE*)((unsigned char*)segment->seg_addr.pval + + iov.iov_base = (IOVBASE_TYPE*)((unsigned char*)segment->seg_addr.pval + sizeof(mca_pml_ob1_rendezvous_hdr_t)); iov.iov_len = size; iov_count = 1; @@ -441,7 +441,7 @@ int mca_pml_ob1_send_request_start_buffered( &(ompi_mpi_byte.dt.super), sendreq->req_send.req_bytes_packed, sendreq->req_send.req_addr ); - + /* wait for ack and completion */ sendreq->req_state = 2; @@ -511,7 +511,7 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq, if (size > 0 && NULL != des) { MCA_PML_OB1_SEND_REQUEST_RESET(sendreq); } - } else { + } else { /* allocate descriptor */ mca_bml_base_alloc( bml_btl, &des, MCA_BTL_NO_ORDER, @@ -531,7 +531,7 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq, iov.iov_len = size; iov_count = 1; /* - * Before copy the user buffer, make the target part + * Before copy the user buffer, make the target part * accessible. */ MEMCHECKER( @@ -553,7 +553,7 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq, ); } - + /* build match header */ hdr = (mca_pml_ob1_hdr_t*)segment->seg_addr.pval; mca_pml_ob1_match_hdr_prepare (&hdr->hdr_match, MCA_PML_OB1_HDR_TYPE_MATCH, 0, @@ -632,7 +632,7 @@ int mca_pml_ob1_send_request_start_prepare( mca_pml_ob1_send_request_t* sendreq, des->des_cbdata = sendreq; /* send */ - rc = mca_bml_base_send(bml_btl, des, MCA_PML_OB1_HDR_TYPE_MATCH); + rc = mca_bml_base_send(bml_btl, des, MCA_PML_OB1_HDR_TYPE_MATCH); if( OPAL_LIKELY( rc >= 0 ) ) { if( OPAL_LIKELY( 1 == rc ) ) { mca_pml_ob1_match_completion_free_request( bml_btl, sendreq ); @@ -762,11 +762,11 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq, /* prepare descriptor */ if(size == 0) { - mca_bml_base_alloc( bml_btl, - &des, + mca_bml_base_alloc( bml_btl, + &des, MCA_BTL_NO_ORDER, sizeof(mca_pml_ob1_rendezvous_hdr_t), - MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP ); + MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP ); } else { MEMCHECKER( memchecker_call(&opal_memchecker_base_mem_defined, @@ -774,7 +774,7 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq, sendreq->req_send.req_base.req_count, sendreq->req_send.req_base.req_datatype); ); - mca_bml_base_prepare_src( bml_btl, + mca_bml_base_prepare_src( bml_btl, &sendreq->req_send.req_base.req_convertor, MCA_BTL_NO_ORDER, sizeof(mca_pml_ob1_rendezvous_hdr_t), @@ -792,7 +792,7 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq, if( OPAL_UNLIKELY(NULL == des) ) { return OMPI_ERR_OUT_OF_RESOURCE; - } + } segment = des->des_segments; /* build hdr */ @@ -911,7 +911,7 @@ get_next_send_range(mca_pml_ob1_send_request_t* sendreq, int mca_pml_ob1_send_request_schedule_once(mca_pml_ob1_send_request_t* sendreq) -{ +{ size_t prev_bytes_remaining = 0; mca_pml_ob1_send_range_t *range; int num_fail = 0; @@ -980,10 +980,10 @@ mca_pml_ob1_send_request_schedule_once(mca_pml_ob1_send_request_t* sendreq) size = max_send_size; } } - + /* pack into a descriptor */ offset = (size_t)range->range_send_offset; - opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, + opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, &offset); range->range_send_offset = (uint64_t)offset; @@ -1012,7 +1012,7 @@ mca_pml_ob1_send_request_schedule_once(mca_pml_ob1_send_request_t* sendreq) mca_bml_base_free(bml_btl, des); range->range_btls[btl_idx].length -= data_remaining; goto cannot_pack; - } + } continue; } @@ -1070,13 +1070,13 @@ mca_pml_ob1_send_request_schedule_once(mca_pml_ob1_send_request_t* sendreq) range = get_next_send_range(sendreq, range); prev_bytes_remaining = 0; } - } else { + } else { mca_bml_base_free(bml_btl,des); } } return OMPI_SUCCESS; -} +} /** @@ -1145,7 +1145,7 @@ static void mca_pml_ob1_put_completion (mca_btl_base_module_t* btl, struct mca_b } int mca_pml_ob1_send_request_put_frag( mca_pml_ob1_rdma_frag_t *frag ) -{ +{ mca_pml_ob1_send_request_t *sendreq = (mca_pml_ob1_send_request_t *) frag->rdma_req; mca_btl_base_registration_handle_t *local_handle = NULL; mca_bml_base_btl_t *bml_btl = frag->rdma_bml; @@ -1194,7 +1194,7 @@ int mca_pml_ob1_send_request_put_frag( mca_pml_ob1_rdma_frag_t *frag ) * Receiver has scheduled an RDMA operation: * (1) Allocate an RDMA fragment to maintain the state of the operation * (2) Call BTL prepare_src to pin/prepare source buffers - * (3) Queue the RDMA put + * (3) Queue the RDMA put */ void mca_pml_ob1_send_request_put( mca_pml_ob1_send_request_t* sendreq, @@ -1204,7 +1204,7 @@ void mca_pml_ob1_send_request_put( mca_pml_ob1_send_request_t* sendreq, mca_bml_base_endpoint_t *bml_endpoint = sendreq->req_endpoint; mca_pml_ob1_rdma_frag_t* frag; - if(hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_TYPE_ACK) { + if(hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_TYPE_ACK) { OPAL_THREAD_ADD32(&sendreq->req_state, -1); } @@ -1230,7 +1230,7 @@ void mca_pml_ob1_send_request_put( mca_pml_ob1_send_request_t* sendreq, frag->rdma_bml = mca_bml_base_btl_array_find(&bml_endpoint->btl_rdma, btl); frag->rdma_hdr.hdr_rdma = *hdr; - frag->rdma_req = sendreq; + frag->rdma_req = sendreq; frag->rdma_length = hdr->hdr_dst_size; frag->rdma_state = MCA_PML_OB1_RDMA_PUT; frag->remote_address = hdr->hdr_dst_ptr; diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index e606b8c99e2..2f444d6a0f8 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ #include "pml_ob1_hdr.h" #include "pml_ob1_rdma.h" #include "pml_ob1_rdmafrag.h" -#include "ompi/mca/bml/bml.h" +#include "ompi/mca/bml/bml.h" BEGIN_C_DECLS @@ -50,9 +50,9 @@ struct mca_pml_ob1_send_request_t { bool req_throttle_sends; size_t req_pipeline_depth; size_t req_bytes_delivered; - uint32_t req_rdma_cnt; + uint32_t req_rdma_cnt; mca_pml_ob1_send_pending_t req_pending; - opal_mutex_t req_send_range_lock; + opal_mutex_t req_send_range_lock; opal_list_t req_send_ranges; mca_pml_ob1_rdma_frag_t *rdma_frag; /** The size of this array is set from mca_pml_ob1.max_rdma_per_request */ @@ -182,7 +182,7 @@ static inline void mca_pml_ob1_free_rdma_resources (mca_pml_ob1_send_request_t* /** - * Start a send request. + * Start a send request. */ #define MCA_PML_OB1_SEND_REQUEST_START(sendreq, rc) \ @@ -298,12 +298,12 @@ send_request_pml_complete_check(mca_pml_ob1_send_request_t *sendreq) } /** - * Schedule additional fragments + * Schedule additional fragments */ int mca_pml_ob1_send_request_schedule_once(mca_pml_ob1_send_request_t*); -static inline int +static inline int mca_pml_ob1_send_request_schedule_exclusive(mca_pml_ob1_send_request_t* sendreq) { int rc; @@ -337,7 +337,7 @@ mca_pml_ob1_send_request_schedule(mca_pml_ob1_send_request_t* sendreq) #if OPAL_CUDA_SUPPORT int mca_pml_ob1_send_request_start_cuda( - mca_pml_ob1_send_request_t* sendreq, + mca_pml_ob1_send_request_t* sendreq, mca_bml_base_btl_t* bml_btl, size_t size); #endif /* OPAL_CUDA_SUPPORT */ diff --git a/ompi/mca/pml/ob1/pml_ob1_start.c b/ompi/mca/pml/ob1/pml_ob1_start.c index 2203a6b545f..bdf7edae89c 100644 --- a/ompi/mca/pml/ob1/pml_ob1_start.c +++ b/ompi/mca/pml/ob1/pml_ob1_start.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests) break; /* otherwise fall through */ case OMPI_REQUEST_ACTIVE: { - + ompi_request_t *request; OPAL_THREAD_LOCK(&ompi_request_lock); if (pml_request->req_pml_complete == false) { @@ -71,7 +71,7 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests) /* allocate a new request */ switch(pml_request->req_type) { case MCA_PML_REQUEST_SEND: { - mca_pml_base_send_mode_t sendmode = + mca_pml_base_send_mode_t sendmode = ((mca_pml_base_send_request_t*)pml_request)->req_send_mode; rc = mca_pml_ob1_isend_init( pml_request->req_addr, @@ -111,7 +111,7 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests) /* start the request */ switch(pml_request->req_type) { - case MCA_PML_REQUEST_SEND: + case MCA_PML_REQUEST_SEND: { mca_pml_ob1_send_request_t* sendreq = (mca_pml_ob1_send_request_t*)pml_request; MEMCHECKER( diff --git a/ompi/mca/pml/pml.h b/ompi/mca/pml/pml.h index a62f4c35c20..f71a9632703 100644 --- a/ompi/mca/pml/pml.h +++ b/ompi/mca/pml/pml.h @@ -6,22 +6,22 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * P2P Management Layer (PML) * * An MCA component type that provides the P2P interface functionality @@ -49,7 +49,7 @@ * make downcalls into the PML to provide the initial list of * processes (ompi_proc_t instances), and notification of changes * (add/delete). - * + * * The PML module must select the set of BTL components that are to be * used to reach a given destination. These should be cached on a PML * specific data structure that is hung off the ompi_proc_t. @@ -59,7 +59,7 @@ * over the available BTLs. * */ - + #ifndef MCA_PML_H #define MCA_PML_H @@ -79,7 +79,7 @@ struct ompi_proc_t; /** * MCA->PML Called by MCA framework to initialize the component. - * + * * @param priority (OUT) Relative priority or ranking used by MCA to * selected a component. * @@ -92,7 +92,7 @@ struct ompi_proc_t; * simultaneously or not. */ typedef struct mca_pml_base_module_1_0_0_t * (*mca_pml_base_component_init_fn_t)( - int *priority, + int *priority, bool enable_progress_threads, bool enable_mpi_threads); @@ -138,7 +138,7 @@ typedef int (*mca_pml_base_module_add_procs_fn_t)(struct ompi_proc_t **procs, si * @param nprocs Size of process array * @return OMPI_SUCCESS or failure status. * - * Provides a notification to the PML that processes have + * Provides a notification to the PML that processes have * gone away, and provides the PML the opportunity to cleanup * any data cached on the ompi_proc_t data structure. */ @@ -159,8 +159,8 @@ typedef int (*mca_pml_base_module_enable_fn_t)( * For non-threaded case, provides MCA the opportunity to * progress outstanding requests on all btls. * - * * @return Count of "completions", a metric of - * how many items where completed in the call + * * @return Count of "completions", a metric of + * how many items where completed in the call * to progress. */ typedef int (*mca_pml_base_module_progress_fn_t)(void); @@ -194,7 +194,7 @@ typedef int (*mca_pml_base_module_add_comm_fn_t)(struct ompi_communicator_t* com typedef int (*mca_pml_base_module_del_comm_fn_t)(struct ompi_communicator_t* comm); /** - * Initialize a persistent receive request. + * Initialize a persistent receive request. * * @param buf (IN) User buffer. * @param count (IN) Number of elements of the specified datatype. @@ -206,17 +206,17 @@ typedef int (*mca_pml_base_module_del_comm_fn_t)(struct ompi_communicator_t* com * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_irecv_init_fn_t)( - void *buf, - size_t count, - struct ompi_datatype_t *datatype, + void *buf, + size_t count, + struct ompi_datatype_t *datatype, int src, - int tag, + int tag, struct ompi_communicator_t* comm, - struct ompi_request_t **request + struct ompi_request_t **request ); /** - * Post a receive request. + * Post a receive request. * * @param buf (IN) User buffer. * @param count (IN) Number of elements of the specified datatype. @@ -245,7 +245,7 @@ typedef int (*mca_pml_base_module_imrecv_fn_t)( ); /** - * Post a receive and wait for completion. + * Post a receive and wait for completion. * * @param buf (IN) User buffer * @param count (IN) Number of elements of the specified datatype @@ -274,7 +274,7 @@ typedef int (*mca_pml_base_module_mrecv_fn_t)( ); /** - * Initialize a persistent send request. + * Initialize a persistent send request. * * @param buf (IN) User buffer. * @param count (IN) Number of elements of the specified datatype. @@ -299,7 +299,7 @@ typedef int (*mca_pml_base_module_isend_init_fn_t)( /** - * Post a send request. + * Post a send request. * * @param buf (IN) User buffer. * @param count (IN) Number of elements of the specified datatype. @@ -412,7 +412,7 @@ typedef int (*mca_pml_base_module_mprobe_fn_t)( /** * Cancel pending operation. - * + * * @param request (IN) Request * @return OMPI_SUCCESS or failure status. * @@ -424,7 +424,7 @@ typedef int (*mca_pml_base_module_cancel_fn_t)( /** * Has a request been cancelled? - * + * * @param request (IN) Request * @return OMPI_SUCCESS or failure status. * diff --git a/ompi/mca/pml/pml_constants.h b/ompi/mca/pml/pml_constants.h index f074378550e..5992b97f81a 100644 --- a/ompi/mca/pml/pml_constants.h +++ b/ompi/mca/pml/pml_constants.h @@ -6,20 +6,20 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ - + #ifndef MCA_PML_CONSTANTS_H #define MCA_PML_CONSTANTS_H diff --git a/ompi/mca/pml/v/Makefile.am b/ompi/mca/pml/v/Makefile.am index 3eac8182dc3..c7c51db30c3 100644 --- a/ompi/mca/pml/v/Makefile.am +++ b/ompi/mca/pml/v/Makefile.am @@ -3,9 +3,9 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pml/v/pml_v_output.c b/ompi/mca/pml/v/pml_v_output.c index c16ee7f4b9b..e33ac9bdb99 100644 --- a/ompi/mca/pml/v/pml_v_output.c +++ b/ompi/mca/pml/v/pml_v_output.c @@ -22,19 +22,19 @@ int pml_v_output_open(char *output, int verbosity) { opal_output_stream_t lds; char hostname[32] = "NA"; - + OBJ_CONSTRUCT(&lds, opal_output_stream_t); if(!output) { - mca_pml_v.output = 0; - } + mca_pml_v.output = 0; + } else { if(!strcmp(output, "stdout")) { lds.lds_want_stdout = true; - } + } else if(!strcmp(output, "stderr")) { lds.lds_want_stderr = true; } - else + else { lds.lds_want_file = true; lds.lds_file_suffix = output; diff --git a/ompi/mca/pml/v/pml_v_output.h b/ompi/mca/pml/v/pml_v_output.h index a2d2967ea1c..13c9c1e4821 100644 --- a/ompi/mca/pml/v/pml_v_output.h +++ b/ompi/mca/pml/v/pml_v_output.h @@ -32,7 +32,7 @@ static inline void V_OUTPUT_ERR(const char *fmt, ... ) assert(-1 != ret); opal_output(0, "%s", str); free(str); - va_end(list); + va_end(list); } /* Tricky stuff to define V_OUTPUT and V_OUTPUT_VERBOSE with variadic arguments @@ -48,7 +48,7 @@ static inline void V_OUTPUT_ERR(const char *fmt, ... ) OPAL_OUTPUT((pml_v_output, ARGS)) # define V_OUTPUT_VERBOSE(V, ARGS...) \ OPAL_OUTPUT_VERBOSE((V, mca_pml_v.output, ARGS)) - + #elif OPAL_ENABLE_DEBUG /* No variadic macros available... So sad */ static inline void V_OUTPUT(const char* fmt, ... ) __opal_attribute_format__(__printf__, 1, 2); diff --git a/ompi/mca/pubsub/Makefile.am b/ompi/mca/pubsub/Makefile.am index 0ad7b4a83d7..a595cf971ce 100644 --- a/ompi/mca/pubsub/Makefile.am +++ b/ompi/mca/pubsub/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/pubsub/base/Makefile.am b/ompi/mca/pubsub/base/Makefile.am index 93e159113f0..83b17431c4e 100644 --- a/ompi/mca/pubsub/base/Makefile.am +++ b/ompi/mca/pubsub/base/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2013 Los Alamos National Security, LLC. -# All rights reserved. +# All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pubsub/base/base.h b/ompi/mca/pubsub/base/base.h index 7bfd648e586..0644197f36f 100644 --- a/ompi/mca/pubsub/base/base.h +++ b/ompi/mca/pubsub/base/base.h @@ -6,16 +6,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPI_MCA_PUBSUB_BASE_H diff --git a/ompi/mca/pubsub/base/pubsub_base_frame.c b/ompi/mca/pubsub/base/pubsub_base_frame.c index 5270666ee47..d1c98dab276 100644 --- a/ompi/mca/pubsub/base/pubsub_base_frame.c +++ b/ompi/mca/pubsub/base/pubsub_base_frame.c @@ -3,16 +3,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/pubsub/base/pubsub_base_null_fns.c b/ompi/mca/pubsub/base/pubsub_base_null_fns.c index 158b9c32cb0..38df9cab62f 100644 --- a/ompi/mca/pubsub/base/pubsub_base_null_fns.c +++ b/ompi/mca/pubsub/base/pubsub_base_null_fns.c @@ -4,16 +4,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/pubsub/base/pubsub_base_select.c b/ompi/mca/pubsub/base/pubsub_base_select.c index e6d01f35ea4..c16a262313c 100644 --- a/ompi/mca/pubsub/base/pubsub_base_select.c +++ b/ompi/mca/pubsub/base/pubsub_base_select.c @@ -3,16 +3,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,7 +49,7 @@ int ompi_pubsub_base_select(void) /* Save the winner */ ompi_pubsub = *best_module; - + /* init the selected module */ if (NULL != ompi_pubsub.init) { ret = ompi_pubsub.init(); diff --git a/ompi/mca/pubsub/orte/Makefile.am b/ompi/mca/pubsub/orte/Makefile.am index 3b976a7ec5a..9336c20e58e 100644 --- a/ompi/mca/pubsub/orte/Makefile.am +++ b/ompi/mca/pubsub/orte/Makefile.am @@ -1,13 +1,13 @@ # # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pubsub/orte/configure.m4 b/ompi/mca/pubsub/orte/configure.m4 index 11103a85d61..5f29d00a0c9 100644 --- a/ompi/mca/pubsub/orte/configure.m4 +++ b/ompi/mca/pubsub/orte/configure.m4 @@ -4,9 +4,9 @@ # All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pubsub/orte/help-ompi-pubsub-orte.txt b/ompi/mca/pubsub/orte/help-ompi-pubsub-orte.txt index b00908c65fb..6f99893c4a2 100644 --- a/ompi/mca/pubsub/orte/help-ompi-pubsub-orte.txt +++ b/ompi/mca/pubsub/orte/help-ompi-pubsub-orte.txt @@ -6,15 +6,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI. diff --git a/ompi/mca/pubsub/orte/pubsub_orte.c b/ompi/mca/pubsub/orte/pubsub_orte.c index 72f877b20ac..67bbf001c3c 100644 --- a/ompi/mca/pubsub/orte/pubsub_orte.c +++ b/ompi/mca/pubsub/orte/pubsub_orte.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -66,12 +66,12 @@ static void setup_server(void) { opal_buffer_t buf; int rc; - + OPAL_OUTPUT_VERBOSE((1, ompi_pubsub_base_framework.framework_output, "%s pubsub:orte: setting up server at URI %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (NULL == mca_pubsub_orte_component.server_uri) ? "NULL" : mca_pubsub_orte_component.server_uri)); - + /* flag setup as completed so we only pass through here once */ server_setup = true; @@ -82,7 +82,7 @@ static void setup_server(void) mca_pubsub_orte_component.server_found = false; return; } - + /* init the route to the server - init_routes wants a buffer * passed to it, so we have to package the server's contact * info into a buffer @@ -119,7 +119,7 @@ static void setup_server(void) * Init the module */ static int init(void) -{ +{ return OMPI_SUCCESS; } @@ -172,7 +172,7 @@ static int publish ( const char *service_name, ompi_info_t *info, const char *po } info_host = &mca_pubsub_orte_component.server; } - + OPAL_OUTPUT_VERBOSE((1, ompi_pubsub_base_framework.framework_output, "%s pubsub:orte: publishing service %s scope %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -186,21 +186,21 @@ static int publish ( const char *service_name, ompi_info_t *info, const char *po /* construct the buffer */ buf = OBJ_NEW(opal_buffer_t); - + /* pack the publish command */ if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &cmd, 1, ORTE_DATA_SERVER_CMD))) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(buf); goto CLEANUP; } - + /* pack the service name */ if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &service_name, 1, OPAL_STRING))) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(buf); goto CLEANUP; } - + /* pack the port name */ if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &port_name, 1, OPAL_STRING))) { ORTE_ERROR_LOG(rc); @@ -214,7 +214,7 @@ static int publish ( const char *service_name, ompi_info_t *info, const char *po OBJ_RELEASE(buf); goto CLEANUP; } - + /* send the data */ if (0 > (rc = orte_rml.send_buffer_nb(info_host, buf, ORTE_RML_TAG_DATA_SERVER, @@ -240,8 +240,8 @@ static int publish ( const char *service_name, ompi_info_t *info, const char *po } rc = ret; OBJ_DESTRUCT(&xfer); - -CLEANUP: + +CLEANUP: return rc; } @@ -316,7 +316,7 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) opal_argv_free(tokens); } } - + if (NONE == lookup[0]) { /* if the user provided an info key, then we at least must * be given one place to look @@ -326,7 +326,7 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) true, (long)ORTE_PROC_MY_NAME->vpid); return NULL; } - + } else { /* if no info key was provided, then we default to the global * server IF it is active @@ -342,12 +342,12 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) lookup[0] = LOCAL; } } - + OPAL_OUTPUT_VERBOSE((1, ompi_pubsub_base_framework.framework_output, "%s pubsub:orte: lookup service %s scope %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), service_name, lookup[0])); - + /* go find the value */ for (i=0; i < 2; i++) { if (LOCAL == lookup[i]) { @@ -378,25 +378,25 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) true, (long)ORTE_PROC_MY_NAME->vpid); return NULL; } - + /* go look it up */ /* construct the buffer */ buf = OBJ_NEW(opal_buffer_t); - + /* pack the lookup command */ if (OPAL_SUCCESS != (ret = opal_dss.pack(buf, &cmd, 1, ORTE_DATA_SERVER_CMD))) { ORTE_ERROR_LOG(ret); OBJ_RELEASE(buf); goto CLEANUP; } - + /* pack the service name */ if (OPAL_SUCCESS != (ret = opal_dss.pack(buf, &service_name, 1, OPAL_STRING))) { ORTE_ERROR_LOG(ret); OBJ_RELEASE(buf); goto CLEANUP; } - + /* send the cmd */ if (0 > (ret = orte_rml.send_buffer_nb(info_host, buf, ORTE_RML_TAG_DATA_SERVER, @@ -405,11 +405,11 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) OBJ_RELEASE(buf); goto CLEANUP; } - + /* get the answer */ OBJ_CONSTRUCT(&xfer, orte_rml_recv_cb_t); xfer.active = true; - orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, + orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DATA_CLIENT, ORTE_RML_NON_PERSISTENT, orte_rml_recv_callback, &xfer); @@ -434,7 +434,7 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) OBJ_DESTRUCT(&xfer); goto CLEANUP; } - + OPAL_OUTPUT_VERBOSE((1, ompi_pubsub_base_framework.framework_output, "%s pubsub:orte: lookup returned port %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -446,11 +446,11 @@ static char* lookup ( const char *service_name, ompi_info_t *info ) return port_name; } } - + /* if we didn't get a port_name, then continue */ OBJ_DESTRUCT(&xfer); } - + /* only get here if we tried both options and failed - since the * buffer will already have been cleaned up, just return */ @@ -506,29 +506,29 @@ static int unpublish ( const char *service_name, ompi_info_t *info ) } info_host = &mca_pubsub_orte_component.server; } - + OPAL_OUTPUT_VERBOSE((1, ompi_pubsub_base_framework.framework_output, "%s pubsub:orte: unpublish service %s scope %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), service_name, global_scope ? "Global" : "Local")); - + /* construct the buffer */ buf = OBJ_NEW(opal_buffer_t); - + /* pack the unpublish command */ if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &cmd, 1, ORTE_DATA_SERVER_CMD))) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(buf); goto CLEANUP; } - + /* pack the service name */ if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &service_name, 1, OPAL_STRING))) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(buf); goto CLEANUP; } - + /* send the command */ if (0 > (rc = orte_rml.send_buffer_nb(info_host, buf, ORTE_RML_TAG_DATA_SERVER, orte_rml_send_callback, NULL))) { @@ -536,7 +536,7 @@ static int unpublish ( const char *service_name, ompi_info_t *info ) OBJ_RELEASE(buf); goto CLEANUP; } - + /* get the answer */ OBJ_CONSTRUCT(&xfer, orte_rml_recv_cb_t); xfer.active = true; @@ -544,7 +544,7 @@ static int unpublish ( const char *service_name, ompi_info_t *info ) ORTE_RML_NON_PERSISTENT, orte_rml_recv_callback, &xfer); OMPI_WAIT_FOR_COMPLETION(xfer.active); - + /* unpack the result */ cnt = 1; if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer.data, &ret, &cnt, OPAL_INT))) { @@ -554,8 +554,8 @@ static int unpublish ( const char *service_name, ompi_info_t *info ) } OBJ_DESTRUCT(&xfer); rc = ret; - -CLEANUP: + +CLEANUP: return rc; } diff --git a/ompi/mca/pubsub/orte/pubsub_orte.h b/ompi/mca/pubsub/orte/pubsub_orte.h index 8f4acdff0df..0d7e116df15 100644 --- a/ompi/mca/pubsub/orte/pubsub_orte.h +++ b/ompi/mca/pubsub/orte/pubsub_orte.h @@ -3,16 +3,16 @@ * All rights reserved. * Copyright (c) 2004-2006 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/pubsub/orte/pubsub_orte_component.c b/ompi/mca/pubsub/orte/pubsub_orte_component.c index 7638fcbb35a..4aaaf126eab 100644 --- a/ompi/mca/pubsub/orte/pubsub_orte_component.c +++ b/ompi/mca/pubsub/orte/pubsub_orte_component.c @@ -6,16 +6,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ ompi_pubsub_orte_component_t mca_pubsub_orte_component = { .base_version = { OMPI_PUBSUB_BASE_VERSION_2_0_0, - + .mca_component_name = "orte", MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, OMPI_RELEASE_VERSION), @@ -70,7 +70,7 @@ static int pubsub_orte_component_register(void) MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &mca_pubsub_orte_component.server_uri); + &mca_pubsub_orte_component.server_uri); return OMPI_SUCCESS; } @@ -88,7 +88,7 @@ static int pubsub_orte_component_close(void) static int pubsub_orte_component_query(mca_base_module_t **module, int *priority) { mca_pubsub_orte_component.server_found = false; - + *priority = my_priority; *module = (mca_base_module_t *) &ompi_pubsub_orte_module; return OMPI_SUCCESS; diff --git a/ompi/mca/pubsub/pmi/Makefile.am b/ompi/mca/pubsub/pmi/Makefile.am index 60d264d7f24..d839e64a944 100644 --- a/ompi/mca/pubsub/pmi/Makefile.am +++ b/ompi/mca/pubsub/pmi/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/pubsub/pmi/configure.m4 b/ompi/mca/pubsub/pmi/configure.m4 index 8e69b82cd55..3ec0f338210 100644 --- a/ompi/mca/pubsub/pmi/configure.m4 +++ b/ompi/mca/pubsub/pmi/configure.m4 @@ -2,18 +2,18 @@ # # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # MCA_ompi_pubsub_pmi_CONFIG([action-if-found], [action-if-not-found]) # ----------------------------------------------------------- AC_DEFUN([MCA_ompi_pubsub_pmi_CONFIG], [ AC_CONFIG_FILES([ompi/mca/pubsub/pmi/Makefile]) - + OPAL_CHECK_PMI([pubsub_pmi], [pubsub_pmi_good=1], [pubsub_pmi_good=0]) - + # Evaluate succeed / fail AS_IF([test "$pubsub_pmi_good" = 1], [$1], diff --git a/ompi/mca/pubsub/pmi/pubsub_pmi.h b/ompi/mca/pubsub/pmi/pubsub_pmi.h index b3a6c608a0e..a2556c7c65b 100644 --- a/ompi/mca/pubsub/pmi/pubsub_pmi.h +++ b/ompi/mca/pubsub/pmi/pubsub_pmi.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/pubsub/pmi/pubsub_pmi_component.c b/ompi/mca/pubsub/pmi/pubsub_pmi_component.c index bb03bc7b6c0..69899afe487 100644 --- a/ompi/mca/pubsub/pmi/pubsub_pmi_component.c +++ b/ompi/mca/pubsub/pmi/pubsub_pmi_component.c @@ -5,9 +5,9 @@ * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ static int my_priority = 100; /* must be above "orte" component */ ompi_pubsub_base_component_t mca_pubsub_pmi_component = { .base_version = { OMPI_PUBSUB_BASE_VERSION_2_0_0, - + .mca_component_name = "pmi", MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, OMPI_RELEASE_VERSION), @@ -75,7 +75,7 @@ static int pubsub_pmi_component_close(void) static int pubsub_pmi_component_query(mca_base_module_t **module, int *priority) { if (NULL != opal_pmix.init) { - + if (OPAL_SUCCESS == opal_pmix.init()) { *priority = my_priority; *module = (mca_base_module_t *)&ompi_pubsub_pmi_module; diff --git a/ompi/mca/pubsub/pubsub.h b/ompi/mca/pubsub/pubsub.h index 72972ddf13c..434d66c80f9 100644 --- a/ompi/mca/pubsub/pubsub.h +++ b/ompi/mca/pubsub/pubsub.h @@ -6,16 +6,16 @@ * 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, + * 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) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** diff --git a/ompi/mca/rte/Makefile.am b/ompi/mca/rte/Makefile.am index 7d455934266..a6c7658178b 100644 --- a/ompi/mca/rte/Makefile.am +++ b/ompi/mca/rte/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. +# Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/rte/base/Makefile.am b/ompi/mca/rte/base/Makefile.am index 9561f768dd0..aa7534be2e4 100644 --- a/ompi/mca/rte/base/Makefile.am +++ b/ompi/mca/rte/base/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/rte/base/base.h b/ompi/mca/rte/base/base.h index db3f4ee7062..a4f3b5b5afe 100644 --- a/ompi/mca/rte/base/base.h +++ b/ompi/mca/rte/base/base.h @@ -4,9 +4,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/rte/base/rte_base_frame.c b/ompi/mca/rte/base/rte_base_frame.c index bd6d436d6c3..c08d911b070 100644 --- a/ompi/mca/rte/base/rte_base_frame.c +++ b/ompi/mca/rte/base/rte_base_frame.c @@ -3,9 +3,9 @@ * All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/rte/configure.m4 b/ompi/mca/rte/configure.m4 index ed5b9697480..3ccf2aefa5f 100644 --- a/ompi/mca/rte/configure.m4 +++ b/ompi/mca/rte/configure.m4 @@ -4,9 +4,9 @@ dnl Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/ompi/mca/rte/orte/Makefile.am b/ompi/mca/rte/orte/Makefile.am index f5c1f210a5c..5458e412931 100644 --- a/ompi/mca/rte/orte/Makefile.am +++ b/ompi/mca/rte/orte/Makefile.am @@ -3,9 +3,9 @@ # All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/rte/orte/configure.m4 b/ompi/mca/rte/orte/configure.m4 index fd3b95dad50..ab8a15df302 100644 --- a/ompi/mca/rte/orte/configure.m4 +++ b/ompi/mca/rte/orte/configure.m4 @@ -4,9 +4,9 @@ # Copyright (c) 2013 Sandia National Laboratories. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -28,7 +28,7 @@ AC_DEFUN([MCA_ompi_rte_orte_POST_CONFIG],[ AM_CONDITIONAL([OMPI_RTE_ORTE], [test $1 = 1]) ])dnl -# MCA_rte_orte_CONFIG([action-if-can-compile], +# MCA_rte_orte_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_rte_orte_CONFIG],[ diff --git a/ompi/mca/rte/orte/rte_orte.h b/ompi/mca/rte/orte/rte_orte.h index b99638ddfa8..4a674b8d893 100644 --- a/ompi/mca/rte/orte/rte_orte.h +++ b/ompi/mca/rte/orte/rte_orte.h @@ -6,9 +6,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * When this component is used, this file is included in the rest of @@ -78,7 +78,7 @@ typedef orte_local_rank_t ompi_local_rank_t; #define ompi_rte_proc_is_bound orte_proc_is_bound /* Error handling objects and operations */ -OMPI_DECLSPEC void __opal_attribute_noreturn__ +OMPI_DECLSPEC void __opal_attribute_noreturn__ ompi_rte_abort(int error_code, char *fmt, ...); #define ompi_rte_abort_peers(a, b, c) orte_errmgr.abort_peers(a, b, c) #define OMPI_RTE_ERRHANDLER_FIRST ORTE_ERRMGR_CALLBACK_FIRST diff --git a/ompi/mca/rte/orte/rte_orte_component.c b/ompi/mca/rte/orte/rte_orte_component.c index dd8f9daee17..6ef19e2c52f 100644 --- a/ompi/mca/rte/orte/rte_orte_component.c +++ b/ompi/mca/rte/orte/rte_orte_component.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/rte/orte/rte_orte_module.c b/ompi/mca/rte/orte/rte_orte_module.c index 56fe8660a45..61c45cf5fdf 100644 --- a/ompi/mca/rte/orte/rte_orte_module.c +++ b/ompi/mca/rte/orte/rte_orte_module.c @@ -56,7 +56,7 @@ extern ompi_rte_orte_component_t mca_rte_orte_component; void ompi_rte_abort(int error_code, char *fmt, ...) { va_list arglist; - + /* If there was a message, output it */ va_start(arglist, fmt); if( NULL != fmt ) { @@ -66,7 +66,7 @@ void ompi_rte_abort(int error_code, char *fmt, ...) free( buffer ); } va_end(arglist); - + /* if I am a daemon or the HNP... */ if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) { /* whack my local procs */ @@ -113,7 +113,7 @@ void ompi_rte_wait_for_debugger(void) if (1 == MPIR_being_debugged) { debugger = 1; } - + if (!debugger) { /* if not, just return */ return; @@ -142,7 +142,7 @@ void ompi_rte_wait_for_debugger(void) if (0 != ORTE_PROC_MY_NAME->vpid) { return; } - + /* VPID 0 waits for a message from the HNP */ OBJ_CONSTRUCT(&xfer, orte_rml_recv_cb_t); xfer.active = true; @@ -153,4 +153,4 @@ void ompi_rte_wait_for_debugger(void) /* let the MPI progress engine run while we wait */ OMPI_WAIT_FOR_COMPLETION(xfer.active); } -} +} diff --git a/ompi/mca/rte/rte.h b/ompi/mca/rte/rte.h index 60e2e259eb8..ded5a27ea3f 100644 --- a/ompi/mca/rte/rte.h +++ b/ompi/mca/rte/rte.h @@ -6,7 +6,7 @@ * Copyright (c) 2014 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow */ @@ -34,7 +34,7 @@ * is desired. * 3. OMPI_NAME_PRINT - a macro that prints a process name when given * a pointer to ompi_process_name_t. The output format is to be - * a single string representing the name. This function should + * a single string representing the name. This function should * be thread-safe for multiple threads to call simultaneously. * 4. OMPI_PROC_MY_NAME - a pointer to a global variable containing * the ompi_process_name_t for this process. Typically, this is @@ -55,7 +55,7 @@ * d. OMPI_RTE_CMP_ALL * 7. uint64_t ompi_rte_hash_name(name) - return a string hash uniquely * representing the ompi_process_name passed in. - * 8. OMPI_NAME - an Opal DSS constant for a handler already registered + * 8. OMPI_NAME - an Opal DSS constant for a handler already registered * to serialize/deserialize an ompi_process_name_t structure. * * (b) Collective objects and operations @@ -64,7 +64,7 @@ * following fields: * a. id (ORTE type: int32_t) * b. bool active - * flag that user can poll on to know when collective + * flag that user can poll on to know when collective * has completed - set to false just prior to * calling user callback function, if provided * 2. ompi_rte_modex - a function that performs an exchange of endpoint information @@ -86,7 +86,7 @@ * a. app_num - * b. pid - this process's pid. Should be same as getpid(). * c. num_procs - Number of processes in this job (ie, MCW) - * d. my_node_rank - relative rank on local node to other peers this run-time + * d. my_node_rank - relative rank on local node to other peers this run-time * instance knows about. If doing dynamics, this may be something * different than my_local_rank, but will be my_local_rank in a * static job. @@ -96,19 +96,19 @@ * g. peer_modex - a collective id for the modex operation * h. peer_init_barrier - a collective id for the barrier during MPI_Init * i. peer_fini_barrier - a collective id for the barrier during MPI_Finalize - * j. job_session_dir - + * j. job_session_dir - * k. proc_session_dir - * l. nodename - a string representation for the name of the node this * process is on * m. cpuset - * 2. ompi_process_info - a global instance of the ompi_process_t structure. - * 3. ompi_rte_proc_is_bound - global boolean that will be true if the runtime bound + * 3. ompi_rte_proc_is_bound - global boolean that will be true if the runtime bound * the process to a particular core or set of cores and is false otherwise. * * (d) Error handling objects and operations - * 1. void ompi_rte_abort(int err_code, char *fmt, ...) - Abort the current + * 1. void ompi_rte_abort(int err_code, char *fmt, ...) - Abort the current * process with the specified error code and message. - * 2. int ompi_rte_abort_peers(ompi_process_name_t *procs, size_t nprocs) - + * 2. int ompi_rte_abort_peers(ompi_process_name_t *procs, size_t nprocs) - * Abort the specified list of peers * 3. OMPI_ERROR_LOG(rc) - print error message regarding the given return code * 4. ompi_rte_register_errhandler - register a callback function for the RTE @@ -136,17 +136,17 @@ * The implementation of this function must store a COPY of the data * provided - the data is NOT guaranteed to be valid after return * from the call. - * 3. ompi_rte_db_fetch - - * NOTE: Fetch accepts an 'ompi_proc_t'. + * 3. ompi_rte_db_fetch - + * NOTE: Fetch accepts an 'ompi_proc_t'. * int ompi_rte_db_fetch(const struct ompi_proc_t *proc, * const char *key, - * void **data, + * void **data, * opal_data_type_t type); * 4. ompi_rte_db_fetch_pointer - - * NOTE: Fetch accepts an 'ompi_proc_t'. + * NOTE: Fetch accepts an 'ompi_proc_t'. * int ompi_rte_db_fetch_pointer(const struct ompi_proc_t *proc, * const char *key, - * void **data, + * void **data, * opal_data_type_t type); * 5. Pre-defined db keys (with associated values after rte_init) * a. OMPI_DB_HOSTNAME diff --git a/ompi/mca/sharedfp/Makefile.am b/ompi/mca/sharedfp/Makefile.am index 00ff8d39c4f..afe551c1329 100644 --- a/ompi/mca/sharedfp/Makefile.am +++ b/ompi/mca/sharedfp/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/sharedfp/base/Makefile.am b/ompi/mca/sharedfp/base/Makefile.am index 84101ed3858..419d0de87e1 100644 --- a/ompi/mca/sharedfp/base/Makefile.am +++ b/ompi/mca/sharedfp/base/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008-2011 University of Houston. All rights reserved. -# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. +# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/sharedfp/base/base.h b/ompi/mca/sharedfp/base/base.h index a7492401a67..216b85d8b50 100644 --- a/ompi/mca/sharedfp/base/base.h +++ b/ompi/mca/sharedfp/base/base.h @@ -5,21 +5,21 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** +/** * @file * * MCA sharedfp base framework public interface functions. diff --git a/ompi/mca/sharedfp/base/sharedfp_base_file_select.c b/ompi/mca/sharedfp/base/sharedfp_base_file_select.c index 6a8ba6fc34b..9bc9c275c43 100644 --- a/ompi/mca/sharedfp/base/sharedfp_base_file_select.c +++ b/ompi/mca/sharedfp/base/sharedfp_base_file_select.c @@ -5,16 +5,16 @@ * 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, + * 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) 2008-2013 University of Houston. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ #include "ompi/mca/io/ompio/io_ompio.h" /* - * This structure is needed so that we can close the modules + * This structure is needed so that we can close the modules * which are not selected but were opened. mca_base_modules_close * which does this job for us requires a opal_list_t which contains * these modules @@ -59,20 +59,20 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * 4. Select the module with the highest priority * 5. Call the init function on the selected module so that it does the * right setup for the file - * 6. Call finalize on all the other modules which returned + * 6. Call finalize on all the other modules which returned * their module but were unfortunate to not get selected - */ + */ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, - mca_base_component_t *preferred) + mca_base_component_t *preferred) { - int priority; - int best_priority; - opal_list_item_t *item; + int priority; + int best_priority; + opal_list_item_t *item; mca_base_component_list_item_t *cli; - mca_sharedfp_base_component_t *component; + mca_sharedfp_base_component_t *component; mca_sharedfp_base_component_t *best_component; - mca_sharedfp_base_module_t *module; + mca_sharedfp_base_module_t *module; opal_list_t queried; queried_module_t *om; char *str; @@ -82,22 +82,22 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, provided then it should be used (if possible) */ if (NULL != preferred) { - + /* We have a preferred component. Check if it is available and if so, whether it wants to run */ - + str = &(preferred->mca_component_name[0]); - + opal_output_verbose(10, ompi_sharedfp_base_framework.framework_output, "sharedfp:base:file_select: Checking preferred component: %s", str); - - /* query the component for its priority and get its module + + /* query the component for its priority and get its module structure. This is necessary to proceed */ - + component = (mca_sharedfp_base_component_t *)preferred; module = component->sharedfpm_file_query (file, &priority); - if (NULL != module && + if (NULL != module && NULL != module->sharedfp_module_init) { /* this query seems to have returned something legitimate @@ -110,7 +110,7 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, file->f_sharedfp_component = preferred; return module->sharedfp_module_init(file); - } + } /* His preferred component is present, but is unable to * run. This is not a good sign. We should try selecting * some other component We let it fall through and select @@ -127,7 +127,7 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, * All we need to do is to go through the list of available * components and find the one which has the highest priority and * use that for this file - */ + */ best_component = NULL; best_priority = -1; @@ -149,21 +149,21 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, } else { /* * call the query function and see what it returns - */ + */ module = component->sharedfpm_file_query (file, &priority); if (NULL == module || NULL == module->sharedfp_module_init) { /* * query did not return any action which can be used - */ + */ opal_output_verbose(10, ompi_sharedfp_base_framework.framework_output, "select: query returned failure"); } else { opal_output_verbose(10, ompi_sharedfp_base_framework.framework_output, "select: query returned priority %d", priority); - /* + /* * is this the best component we have found till now? */ if (priority > best_priority) { @@ -180,8 +180,8 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, return OMPI_ERR_OUT_OF_RESOURCE; } om->om_component = component; - om->om_module = module; - opal_list_append(&queried, (opal_list_item_t *)om); + om->om_module = module; + opal_list_append(&queried, (opal_list_item_t *)om); } /* end else of if (NULL == module) */ } /* end else of if (NULL == component->sharedfpm_init) */ } /* end for ... end of traversal */ @@ -207,7 +207,7 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, * returned their priorities from the query. We now have to * unquery() those components which have not been selected and * init() the component which was selected - */ + */ for (item = opal_list_remove_first(&queried); NULL != item; item = opal_list_remove_first(&queried)) { @@ -221,7 +221,7 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, * defined. Whereever a function pointer is null in the * module structure we need to fill it in with the base * structure function pointers. This is yet to be done - */ + */ /* * We don return here coz we still need to go through and @@ -251,7 +251,7 @@ int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, } /* if not best component */ OBJ_RELEASE(om); } /* traversing through the entire list */ - + opal_output_verbose(10, ompi_sharedfp_base_framework.framework_output, "select: component %s selected", best_component->sharedfpm_version.mca_component_name); diff --git a/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c b/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c index 8464e2e402b..8d799ccefa4 100644 --- a/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c +++ b/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/sharedfp/base/sharedfp_base_find_available.c b/ompi/mca/sharedfp/base/sharedfp_base_find_available.c index 6529632ebdf..54d5f2fe2da 100644 --- a/ompi/mca/sharedfp/base/sharedfp_base_find_available.c +++ b/ompi/mca/sharedfp/base/sharedfp_base_find_available.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,15 +40,15 @@ static int init_query_2_0_0(const mca_base_component_t *component, mca_base_component_list_item_t *entry, bool enable_progress_threads, bool enable_mpi_threads); - + int mca_sharedfp_base_find_available(bool enable_progress_threads, bool enable_mpi_threads) { opal_list_item_t *item, *next; mca_base_component_list_item_t *cli; - /* The list of components which we should check is already present - in ompi_sharedfp_base_framework.framework_components, which was established in + /* The list of components which we should check is already present + in ompi_sharedfp_base_framework.framework_components, which was established in mca_sharedfp_base_open */ item = opal_list_get_first(&ompi_sharedfp_base_framework.framework_components); @@ -56,7 +56,7 @@ int mca_sharedfp_base_find_available(bool enable_progress_threads, next = opal_list_get_next(item); cli = (mca_base_component_list_item_t*)item; - /* Now for this entry, we have to determine the thread level. Call + /* Now for this entry, we have to determine the thread level. Call a subroutine to do the job for us */ if (OMPI_SUCCESS != init_query(cli->cli_component, cli, @@ -81,15 +81,15 @@ int mca_sharedfp_base_find_available(bool enable_progress_threads, /* All done */ return OMPI_SUCCESS; } - - + + static int init_query(const mca_base_component_t *m, mca_base_component_list_item_t *entry, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { int ret; - + opal_output_verbose(10, ompi_sharedfp_base_framework.framework_output, "sharedfp:find_available: querying sharedfp component %s", m->mca_component_name); @@ -117,7 +117,7 @@ static int init_query(const mca_base_component_t *m, m->mca_component_name); if (NULL != m->mca_close_component) { m->mca_close_component(); - } + } } else { opal_output_verbose(10, ompi_sharedfp_base_framework.framework_output, "sharedfp:find_avalable: sharedfp component %s is available", @@ -132,11 +132,11 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_0_0(const mca_base_component_t *component, mca_base_component_list_item_t *entry, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { - mca_sharedfp_base_component_2_0_0_t *sharedfp = + mca_sharedfp_base_component_2_0_0_t *sharedfp = (mca_sharedfp_base_component_2_0_0_t *) component; - + return sharedfp->sharedfpm_init_query(enable_progress_threads, enable_mpi_threads); } diff --git a/ompi/mca/sharedfp/base/sharedfp_base_frame.c b/ompi/mca/sharedfp/base/sharedfp_base_frame.c index b3d73f3499f..366e063005a 100644 --- a/ompi/mca/sharedfp/base/sharedfp_base_frame.c +++ b/ompi/mca/sharedfp/base/sharedfp_base_frame.c @@ -5,18 +5,18 @@ * 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, + * 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) 2008-2011 University of Houston. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/sharedfp/configure.m4 b/ompi/mca/sharedfp/configure.m4 index 7ffd5384ed7..9c46f76e916 100644 --- a/ompi/mca/sharedfp/configure.m4 +++ b/ompi/mca/sharedfp/configure.m4 @@ -3,15 +3,15 @@ # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # MCA_ompi_sharedfp_CONFIG(project_name, framework_name) # ------------------------------------------- -AC_DEFUN([MCA_ompi_sharedfp_CONFIG], +AC_DEFUN([MCA_ompi_sharedfp_CONFIG], [ # An AC-ARG-ENABLE for mpi-io was set in ompi/mca/io/configure.m4. # If it's no, we shouldn't bother building anything in fcoll. diff --git a/ompi/mca/sharedfp/individual/Makefile.am b/ompi/mca/sharedfp/individual/Makefile.am index dbe77ef9141..36c090604c0 100644 --- a/ompi/mca/sharedfp/individual/Makefile.am +++ b/ompi/mca/sharedfp/individual/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual.c b/ompi/mca/sharedfp/individual/sharedfp_individual.c index 9bcc2595294..262e3aeefa3 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual.c @@ -121,10 +121,10 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file "Set this key in order to increase this component's priority value.\n"); } } - } + } else { if ( mca_sharedfp_individual_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_individual_component_file_query: " "OMPIO_SHAREDFP_RELAXED_ORDERING MPI_Info key not set, " "got MPI_INFO_NULL. Set this key in order to increase " @@ -139,7 +139,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file */ if ( wronly_flag && relaxed_order_flag){ *priority=mca_sharedfp_individual_priority; - } + } else { *priority=1; } diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual.h b/ompi/mca/sharedfp/individual/sharedfp_individual.h index 7339d3ccc2c..6b6bd1e838a 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual.h +++ b/ompi/mca/sharedfp/individual/sharedfp_individual.h @@ -50,7 +50,7 @@ OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_ind int mca_sharedfp_individual_get_position(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); -int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, char* filename, diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c b/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c index 70a85441934..2edd65649db 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c @@ -34,7 +34,7 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh { int ret = OMPI_SUCCESS; mca_sharedfp_individual_header_record *headnode = NULL; - char *buff=NULL; + char *buff=NULL; MPI_Comm comm; int rank, size; int nodesoneachprocess = 0; @@ -89,8 +89,8 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh goto exit; } - comm->c_coll.coll_allgather ( &nodesoneachprocess, 1, MPI_INT, - countbuff, 1, MPI_INT, comm, + comm->c_coll.coll_allgather ( &nodesoneachprocess, 1, MPI_INT, + countbuff, 1, MPI_INT, comm, comm->c_coll.coll_allgather_module ); if ( mca_sharedfp_individual_verbose) { @@ -114,7 +114,7 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh totalnodes = totalnodes + countbuff[i]; } - if (totalnodes <= 0 ) { + if (totalnodes <= 0 ) { goto exit; } @@ -129,35 +129,35 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh if ( OMPI_SUCCESS != ret ) { goto exit; } - + ret = comm->c_coll.coll_allgatherv ( ind_recordlength, countbuff[rank], OMPI_OFFSET_DATATYPE, offsetbuff, countbuff, displ, OMPI_OFFSET_DATATYPE, comm, comm->c_coll.coll_allgatherv_module ); if ( OMPI_SUCCESS != ret ) { goto exit; } - + ret = mca_sharedfp_individual_sort_timestamps(×tampbuff, &offsetbuff,totalnodes); if ( OMPI_SUCCESS != ret ) { goto exit; } - + sh->global_offset = mca_sharedfp_individual_assign_globaloffset ( &offsetbuff, totalnodes, sh); - + buff = (char * ) malloc( ind_recordlength[0] * 1.2 ); if ( NULL == buff ) { ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - + for (i = 0; i < nodesoneachprocess ; i++) { /*Read from the local data file*/ ompio_io_ompio_file_read_at ( headnode->datafilehandle, local_off[i], buff, ind_recordlength[i], MPI_BYTE, &status); - + idx = mca_sharedfp_individual_getoffset(ind_ts[i],timestampbuff,totalnodes); - + if ( mca_sharedfp_individual_verbose ) { opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_individual_collaborate_data: Process %d writing %ld bytes to main file \n", @@ -167,8 +167,8 @@ int mca_sharedfp_individual_collaborate_data(struct mca_sharedfp_base_data_t *sh /*Write into main data file*/ ompio_io_ompio_file_write_at( sh->sharedfh, offsetbuff[idx], buff, ind_recordlength[i], MPI_BYTE, &status); - - } + + } exit: if ( NULL != countbuff ) { @@ -299,7 +299,7 @@ int mca_sharedfp_individual_get_timestamps_and_reclengths ( double **buff, long headnode->numofrecords = 0; exit: - + return ret; } @@ -365,7 +365,7 @@ MPI_Offset mca_sharedfp_individual_assign_globaloffset(MPI_Offset **offsetbuff, for (i = 0; i < totalnodes; i++) { temp = *(*offsetbuff + i); - + if (i == 0) { *(*offsetbuff + i ) = sh->global_offset; } @@ -388,7 +388,7 @@ int mca_sharedfp_individual_getoffset(double timestamp, double *ts, int totalno while (notfound) { if (ts[i] == timestamp) break; - + i++; if (i == totalnodes) { diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_component.c b/ompi/mca/sharedfp/individual/sharedfp_individual_component.c index 3e9adcc9be3..93fda2ff485 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_component.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c index 17a54028c79..2b01cb3e070 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c @@ -5,15 +5,15 @@ * 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, + * 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) 2013-2015 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -53,7 +53,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, opal_output(0, "mca_sharedfp_individual_file_open: unable to allocate memory\n"); return OMPI_ERR_OUT_OF_RESOURCE; } - + err = ompio_io_ompio_file_open ( comm, filename, amode, info, shfileHandle, false); if ( OMPI_SUCCESS != err ) { opal_output(0, "mca_sharedfp_individual_file_open: Error during file open\n"); @@ -67,9 +67,9 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, free ( shfileHandle ); return OMPI_ERR_OUT_OF_RESOURCE; } - + rank = ompi_comm_rank ( comm ); - + /*Populate the sh file structure based on the implementation*/ sh->sharedfh = shfileHandle; /* Shared file pointer*/ sh->global_offset = 0; /* Global Offset*/ @@ -244,16 +244,16 @@ mca_sharedfp_individual_header_record* mca_sharedfp_individual_insert_headnode ( if (!headnode) return NULL; } - + headnode->numofrecords = 0; /* No records in the linked list */ headnode->numofrecordsonfile = 0; /* No records in the metadatafile for this file */ - + headnode->datafile_offset = 0; headnode->metadatafile_offset = 0; - + headnode->metafile_start_offset = 0; headnode->datafile_start_offset = 0; - + headnode->metadatafilehandle = 0; headnode->datafilehandle = 0; headnode->next = NULL; diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_gettime.c b/ompi/mca/sharedfp/individual/sharedfp_individual_gettime.c index 93735783125..3176e66acc7 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_gettime.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_gettime.c @@ -23,6 +23,6 @@ double mca_sharedfp_individual_gettime(void) gettimeofday(×tamp,NULL); seconds = (double)timestamp.tv_sec; microsec = ((double)timestamp.tv_usec)/((double)1000000.0); - + return (seconds+microsec); } diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c b/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c index 72566efe78f..191c4e1bf3f 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_insert_metadata.c @@ -53,7 +53,7 @@ int mca_sharedfp_individual_insert_metadata(int functype,long recordlength,struc if (headnode->numofrecords == MAX_METADATA_RECORDS) { /* Entire linked list is now deleted and a new file*/ ret = mca_sharedfp_individual_write_metadata_file(sh); - headnode->next = NULL; + headnode->next = NULL; } /* Allocate a new Node */ @@ -72,13 +72,13 @@ int mca_sharedfp_individual_insert_metadata(int functype,long recordlength,struc newnode->localposition = headnode->datafile_offset; /* Datafile offset*/ newnode->recordlength = recordlength; newnode->next = NULL; - - if ( headnode->next == NULL) { + + if ( headnode->next == NULL) { /*headnode allocated but no further metadata node is allocated*/ headnode->next = newnode; } - else { + else { /*We need to append the new node*/ tempnode = headnode->next; diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c index 5286fd572c0..313b19a69f2 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c @@ -71,11 +71,11 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh, /*Insert metadata record into a queue*/ ret = mca_sharedfp_individual_insert_metadata(OMPI_FILE_WRITE_SHARED,totalbytes,sh); - + /*Write the data into individual file*/ ret = ompio_io_ompio_file_iwrite_at ( headnode->datafilehandle, headnode->datafile_offset, - buf, count, datatype, request); + buf, count, datatype, request); if ( OMPI_SUCCESS != ret ) { opal_output(0,"sharedfp_individual_iwrite: Error while iwriting the datafile \n"); return ret; diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_read.c b/ompi/mca/sharedfp/individual/sharedfp_individual_read.c index 42203a9fc11..a14ae8323d7 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_read.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_read.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c b/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c index fcbf0d993e7..7a6071e3c5d 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c @@ -5,15 +5,15 @@ * 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, + * 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) 2013 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c index 5666fb28e4f..36cd1668bf1 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c @@ -5,15 +5,15 @@ * 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, + * 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) 2013 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -105,7 +105,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_individual_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_individual_write_ordered - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -135,7 +135,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, opal_output (0, "sharedfp_individual_write_ordered: headnode is NULL but file is open\n"); return OMPI_ERROR; } - + /* Data from all the metadata is combined and written to the main file */ ret = mca_sharedfp_individual_collaborate_data ( sh ); if ( OMPI_SUCCESS != ret) { @@ -148,25 +148,25 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, return OMPI_ERR_OUT_OF_RESOURCE; } } - + /*collect the total bytes to be written*/ - sh->comm->c_coll.coll_gather ( &totalbytes, 1, OMPI_OFFSET_DATATYPE, + sh->comm->c_coll.coll_gather ( &totalbytes, 1, OMPI_OFFSET_DATATYPE, offbuff, 1, OMPI_OFFSET_DATATYPE, 0, sh->comm, sh->comm->c_coll.coll_gather_module ); - + if ( 0 == rank ) { prev_offset = offbuff[0]; offbuff[0] = sh->global_offset; - + for (i = 1; i < size ; i++){ temp = offbuff[i]; offbuff[i] = offbuff[i - 1] + prev_offset; prev_offset = temp; } - + for (i = 0; i < size; i++){ global_offset = offbuff[size - 1] + prev_offset; - } + } } @@ -178,8 +178,8 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, opal_output(0,"sharedfp_individual_write_ordered: Error in scattering offsets \n"); goto exit; } - - ret = sh->comm->c_coll.coll_bcast ( &global_offset, 1, OMPI_OFFSET_DATATYPE, + + ret = sh->comm->c_coll.coll_bcast ( &global_offset, 1, OMPI_OFFSET_DATATYPE, 0, sh->comm, sh->comm->c_coll.coll_bcast_module ); if ( OMPI_SUCCESS != ret ) { opal_output(0,"sharedfp_individual_write_ordered: Error while bcasting global offset \n"); @@ -187,7 +187,7 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, } sh->global_offset = global_offset; - + /*use file_write_at_all to ensure the order*/ ret = ompio_io_ompio_file_write_at_all(sh->sharedfh,offset, buf,count,datatype,status); if ( OMPI_SUCCESS != ret ) { @@ -198,6 +198,6 @@ int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, if ( NULL != offbuff ) { free ( offbuff); } - + return ret; } diff --git a/ompi/mca/sharedfp/lockedfile/Makefile.am b/ompi/mca/sharedfp/lockedfile/Makefile.am index 5b7d6ac2192..c0ea5abdd51 100644 --- a/ompi/mca/sharedfp/lockedfile/Makefile.am +++ b/ompi/mca/sharedfp/lockedfile/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c index 3c8f1fdc2d0..06c433cffcb 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c @@ -70,7 +70,7 @@ int mca_sharedfp_lockedfile_component_init_query(bool enable_progress_threads, /* Nothing to do */ return OMPI_SUCCESS; -} +} struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file_query(mca_io_ompio_file_t *fh, int *priority) { struct flock lock; @@ -132,11 +132,11 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file err = fcntl(fd, F_SETLKW, &lock); opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_lockedfile_component_file_query: returned err=%d, for fd=%d\n",err,fd); - + if (err) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_lockedfile_component_file_query: Failed to set a file lock on %s %s\n", filename, strerror(errno) ); - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "err=%d, errno=%d, EOPNOTSUPP=%d, EINVAL=%d, ENOSYS=%d, EACCES=%d, EAGAIN=%d, EBADF=%d\n", err, errno, EOPNOTSUPP, EINVAL, ENOSYS, EACCES, EAGAIN, EBADF); @@ -147,7 +147,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file } else { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_lockedfile_component_file_query: fcntl claims success in setting a file lock on %s\n", filename ); has_file_lock_support=true; @@ -170,7 +170,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file } int mca_sharedfp_lockedfile_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h index 3e90e6639a5..fa16d9f4653 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h @@ -48,7 +48,7 @@ OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_loc */ /*IMPORANT: Update here when implementing functions from sharedfp API*/ -int mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); int mca_sharedfp_lockedfile_get_position (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_component.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_component.c index 18e0696fe90..3d142c4e25f 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_component.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c index 0721fc8341b..3a6b4eb6430 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,7 +29,7 @@ #include "ompi/mca/sharedfp/base/base.h" #ifdef HAVE_SYS_STAT_H -#include +#include #endif #include @@ -60,9 +60,9 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data; ompio_fh = &data->ompio_fh; - err = mca_io_ompio_set_view_internal (shfileHandle, - ompio_fh->f_disp, - ompio_fh->f_etype, + err = mca_io_ompio_set_view_internal (shfileHandle, + ompio_fh->f_disp, + ompio_fh->f_etype, ompio_fh->f_orig_filetype, ompio_fh->f_datarep, MPI_INFO_NULL); @@ -132,7 +132,7 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, sh->selected_module_data = module_data; /*remember the shared file handle*/ fh->f_sharedfp_data = sh; - + comm->c_coll.coll_barrier ( comm, comm->c_coll.coll_barrier_module ); return err; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c index 96e7ec86334..70df7914f60 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c @@ -42,7 +42,7 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data ) { if ( mca_sharedfp_lockedfile_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_lockedfile_iread: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -77,7 +77,7 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, if ( -1 != ret ) { if ( mca_sharedfp_lockedfile_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_lockedfile_iread - Offset received is %lld\n",offset); } @@ -108,7 +108,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, if(fh->f_sharedfp_data==NULL){ if ( mca_sharedfp_lockedfile_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_lockedfile_read_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -126,7 +126,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, if ( true == fh->f_split_coll_in_use ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "Only one split collective I/O operation allowed per file handle at any given point in time!\n"); return MPI_ERR_REQUEST; } @@ -163,7 +163,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, for ( i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_lockedfile_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_lockedfile_read_ordered_begin: Bytes requested are %ld\n",bytesRequested); } } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c index e5795f84d59..15a72d9e418 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c @@ -198,7 +198,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_lockedfile_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_lockedfile_write_ordered_begin: Offset returned is %lld\n",offset); } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c index e499afd0a9e..cd7df48e575 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c @@ -137,7 +137,7 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, return OMPI_ERR_OUT_OF_RESOURCE; } - ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, buff, recvcnt, OMPI_OFFSET_DATATYPE, 0, sh->comm, sh->comm->c_coll.coll_gather_module ); if ( OMPI_SUCCESS != ret ) { diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c index 8e7ebb1331f..83279be719f 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c @@ -92,7 +92,7 @@ mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh, offset = end_position + offset; opal_output(ompi_sharedfp_base_framework.framework_output, "MPI_SEEK_END: file_get_size=%lld\n",end_position); - + if ( offset < 0){ opal_output(0,"sharedfp_lockedfile_seek - MPI_SEEK_CUR, offset must be > 0, got offset=%lld.\n",offset); ret = -1; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c index 13e5daf81f8..4365e27ace0 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c @@ -140,8 +140,8 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, } } - ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, buff, recvcnt, - OMPI_OFFSET_DATATYPE, 0, sh->comm, + ret = sh->comm->c_coll.coll_gather ( &sendBuff, sendcnt, OMPI_OFFSET_DATATYPE, buff, recvcnt, + OMPI_OFFSET_DATATYPE, 0, sh->comm, sh->comm->c_coll.coll_gather_module ); if ( OMPI_SUCCESS != ret ) { goto exit; diff --git a/ompi/mca/sharedfp/sharedfp.h b/ompi/mca/sharedfp/sharedfp.h index 824c674a3fe..255eb4bf553 100644 --- a/ompi/mca/sharedfp/sharedfp.h +++ b/ompi/mca/sharedfp/sharedfp.h @@ -70,7 +70,7 @@ struct ompi_file_t; * **************** component struct ******************************* */ -typedef int (*mca_sharedfp_base_component_init_query_1_0_0_fn_t) +typedef int (*mca_sharedfp_base_component_init_query_1_0_0_fn_t) (bool enable_progress_threads, bool enable_mpi_threads); diff --git a/ompi/mca/sharedfp/sm/Makefile.am b/ompi/mca/sharedfp/sm/Makefile.am index 8c5d21a9b52..2783a9ad679 100644 --- a/ompi/mca/sharedfp/sm/Makefile.am +++ b/ompi/mca/sharedfp/sm/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 University of Houston. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -52,4 +52,4 @@ sources = \ sharedfp_sm_iwrite.c \ sharedfp_sm_read.c \ sharedfp_sm_iread.c \ - sharedfp_sm_file_open.c + sharedfp_sm_file_open.c diff --git a/ompi/mca/sharedfp/sm/configure.m4 b/ompi/mca/sharedfp/sm/configure.m4 index 2ec2cd54995..7224f15a93a 100644 --- a/ompi/mca/sharedfp/sm/configure.m4 +++ b/ompi/mca/sharedfp/sm/configure.m4 @@ -31,7 +31,7 @@ AC_DEFUN([MCA_ompi_sharedfp_sm_CONFIG],[ AC_CHECK_HEADER([semaphore.h], [AC_CHECK_FUNCS([sem_init],[sharedfp_sm_happy=yes],[])]) - + AS_IF([test "$sharedfp_sm_happy" = "yes"], [$1], [$2]) diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm.c b/ompi/mca/sharedfp/sm/sharedfp_sm.c index 6aa8f1c4553..bc28839e6a7 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2013 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -63,9 +63,9 @@ int mca_sharedfp_sm_component_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(mca_io_ompio_file_t *fh, int *priority) { @@ -81,7 +81,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(m ** original test copied from mca/coll/sm/coll_sm_module.c: */ ompi_group_t *group = comm->c_local_group; - + for (i = 0; i < size; ++i) { proc = ompi_group_peer_lookup(group,i); if (!OPAL_PROC_ON_LOCAL_NODE(proc->super.proc_flags)){ @@ -98,9 +98,9 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(m } int mca_sharedfp_sm_component_file_unquery (mca_io_ompio_file_t *file) -{ +{ /* This function might be needed for some purposes later. for now it - * does not have anything to do since there are no steps which need + * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ return OMPI_SUCCESS; @@ -111,7 +111,7 @@ int mca_sharedfp_sm_module_init (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } - + int mca_sharedfp_sm_module_finalize (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm.h b/ompi/mca/sharedfp/sm/sharedfp_sm.h index c71942411be..0e20c584313 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm.h +++ b/ompi/mca/sharedfp/sm/sharedfp_sm.h @@ -48,7 +48,7 @@ OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_sm_ * ****************************************************************** */ /*IMPORANT: Update here when implementing functions from sharedfp API*/ -int mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); int mca_sharedfp_sm_get_position (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_component.c b/ompi/mca/sharedfp/sm/sharedfp_sm_component.c index 69a0e06a0c3..9abb8e387f2 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_component.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c index a9ba2c1fa1b..8199df45e7e 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c @@ -68,7 +68,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, if ( NULL == shfileHandle ) { opal_output(0, "mca_sharedfp_sm_file_open: Error during memory allocation\n"); return OMPI_ERR_OUT_OF_RESOURCE; - } + } err = ompio_io_ompio_file_open(comm,filename,amode,info,shfileHandle,false); if ( OMPI_SUCCESS != err) { opal_output(0, "mca_sharedfp_sm_file_open: Error during file open\n"); @@ -79,16 +79,16 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data; ompio_fh = &data->ompio_fh; - err = mca_io_ompio_set_view_internal (shfileHandle, - ompio_fh->f_disp, - ompio_fh->f_etype, + err = mca_io_ompio_set_view_internal (shfileHandle, + ompio_fh->f_disp, + ompio_fh->f_etype, ompio_fh->f_orig_filetype, ompio_fh->f_datarep, MPI_INFO_NULL); /*Memory is allocated here for the sh structure*/ if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_file_open: malloc f_sharedfp_ptr struct\n"); } @@ -109,11 +109,11 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /*Open a shared memory segment which will hold the shared file pointer*/ if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_file_open: allocatge shared memory segment.\n"); } - + sm_data = (struct mca_sharedfp_sm_data*) malloc ( sizeof(struct mca_sharedfp_sm_data)); if ( NULL == sm_data ){ opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to malloc sm_data struct\n"); @@ -151,24 +151,24 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, free(sm_data); free(sh); free(shfileHandle); - return OMPI_ERROR; + return OMPI_ERROR; } sm_data->sm_filename = sm_filename; - + /*TODO: is it necessary to write to the file first?*/ if( 0 == rank ){ memset ( &sm_offset, 0, sizeof (struct mca_sharedfp_sm_offset )); write ( sm_fd, &sm_offset, sizeof(struct mca_sharedfp_sm_offset)); } comm->c_coll.coll_barrier (comm, comm->c_coll.coll_barrier_module ); - + /*the file has been written to, now we can map*/ sm_offset_ptr = mmap(NULL, sizeof(struct mca_sharedfp_sm_offset), PROT_READ | PROT_WRITE, MAP_SHARED, sm_fd, 0); close(sm_fd); - + if ( sm_offset_ptr==MAP_FAILED){ err = OMPI_ERROR; opal_output(0, "mca_sharedfp_sm_file_open: Error, unable to mmap file: %s\n",sm_filename); @@ -177,7 +177,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, free(sm_data); free(sh); free(shfileHandle); - return OMPI_ERROR; + return OMPI_ERROR; } /* Initialize semaphore so that is shared between processes. */ diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index 439b409c1d7..17652cfa87b 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -41,7 +41,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_iread: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -74,7 +74,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_iread: Offset received is %lld\n",offset); } /* Read the file */ @@ -104,7 +104,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_read_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -157,7 +157,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_read_ordered_begin: Bytes requested are %ld\n", bytesRequested); } @@ -174,7 +174,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_read_ordered_begin: Offset received is %lld\n",offsetReceived); } @@ -197,7 +197,7 @@ int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, offset /= sh->sharedfh->f_etype_size; if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_read_ordered_begin: Offset returned is %lld\n",offset); } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c index fbf9a40ce03..6bee802a19b 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c @@ -41,7 +41,7 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, if( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_iwrite - opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -65,16 +65,16 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, sh = fh->f_sharedfp_data; if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_iwrite: Bytes Requested is %ld\n",bytesRequested); } /* Request the offset to write bytesRequested bytes */ ret = mca_sharedfp_sm_request_position(sh,bytesRequested,&offset); offset /= sh->sharedfh->f_etype_size; - + if ( -1 != ret ) { if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_iwrite: Offset received is %lld\n",offset); } /* Write to the file */ @@ -105,7 +105,7 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, if ( NULL == fh->f_sharedfp_data){ if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "sharedfp_sm_write_ordered_begin: opening the shared file pointer\n"); } shared_fp_base_module = fh->f_sharedfp; @@ -158,7 +158,7 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, for (i = 0; i < size ; i ++) { bytesRequested += buff[i]; if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_write_ordered_begin: Bytes requested are %ld\n", bytesRequested); } @@ -175,7 +175,7 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, goto exit; } if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_write_ordered_begin: Offset received is %lld\n",offsetReceived); } @@ -196,9 +196,9 @@ int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, /*Each process now has its own individual offset in recvBUFF*/ offset = offsetBuff - sendBuff; offset /= sh->sharedfh->f_etype_size; - + if ( mca_sharedfp_sm_verbose ) { - opal_output(ompi_sharedfp_base_framework.framework_output, + opal_output(ompi_sharedfp_base_framework.framework_output, "mca_sharedfp_sm_write_ordered_begin: Offset returned is %lld\n",offset); } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c index 430f6ad9b36..d547138f9a5 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c @@ -206,6 +206,6 @@ int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, if ( NULL != buff ) { free ( buff ); } - + return ret; } diff --git a/ompi/mca/topo/Makefile.am b/ompi/mca/topo/Makefile.am index 351495346ca..8f395d955a3 100644 --- a/ompi/mca/topo/Makefile.am +++ b/ompi/mca/topo/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/ompi/mca/topo/base/Makefile.am b/ompi/mca/topo/base/Makefile.am index 4ef077dc621..812de6db316 100644 --- a/ompi/mca/topo/base/Makefile.am +++ b/ompi/mca/topo/base/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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) 2012-2013 Inria. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/topo/base/base.h b/ompi/mca/topo/base/base.h index 26fd0013cd5..a755b365123 100644 --- a/ompi/mca/topo/base/base.h +++ b/ompi/mca/topo/base/base.h @@ -5,20 +5,20 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ mca_topo_base_find_available(bool enable_progress_threads, * cart_map() for their topology components. But they can implement * these glue functions if they want. * - * These glue functions + * These glue functions */ OMPI_DECLSPEC int mca_topo_base_cart_create(mca_topo_base_module_t *topo_module, @@ -79,20 +79,20 @@ mca_topo_base_cart_create(mca_topo_base_module_t *topo_module, ompi_communicator_t** comm_topo); OMPI_DECLSPEC int -mca_topo_base_cart_coords(ompi_communicator_t *comm, - int rank, +mca_topo_base_cart_coords(ompi_communicator_t *comm, + int rank, int maxdims, int *coords); OMPI_DECLSPEC int -mca_topo_base_cartdim_get(ompi_communicator_t *comm, +mca_topo_base_cartdim_get(ompi_communicator_t *comm, int *ndims); OMPI_DECLSPEC int -mca_topo_base_cart_get(ompi_communicator_t *comm, - int maxdims, +mca_topo_base_cart_get(ompi_communicator_t *comm, + int maxdims, int *dims, - int *periods, + int *periods, int *coords); OMPI_DECLSPEC int @@ -101,27 +101,27 @@ mca_topo_base_cart_map(ompi_communicator_t * comm, int *dims, int *periods, int *newrank); OMPI_DECLSPEC int -mca_topo_base_cart_rank(ompi_communicator_t *comm, - int *coords, +mca_topo_base_cart_rank(ompi_communicator_t *comm, + int *coords, int *rank); OMPI_DECLSPEC int -mca_topo_base_cart_shift(ompi_communicator_t *comm, - int direction, +mca_topo_base_cart_shift(ompi_communicator_t *comm, + int direction, int disp, - int *rank_source, + int *rank_source, int *rank_dest); - + OMPI_DECLSPEC int -mca_topo_base_cart_sub(ompi_communicator_t *comm, +mca_topo_base_cart_sub(ompi_communicator_t *comm, int *remain_dims, ompi_communicator_t **new_comm); - + OMPI_DECLSPEC int -mca_topo_base_graphdims_get(ompi_communicator_t *comm, +mca_topo_base_graphdims_get(ompi_communicator_t *comm, int *nodes, int *nedges); - + OMPI_DECLSPEC int mca_topo_base_graph_create(mca_topo_base_module_t *topo_module, ompi_communicator_t* old_comm, @@ -132,10 +132,10 @@ mca_topo_base_graph_create(mca_topo_base_module_t *topo_module, ompi_communicator_t** new_comm); OMPI_DECLSPEC int -mca_topo_base_graph_get(ompi_communicator_t *comm, - int maxindex, - int maxedges, - int *index, +mca_topo_base_graph_get(ompi_communicator_t *comm, + int maxindex, + int maxedges, + int *index, int *edges); OMPI_DECLSPEC int @@ -144,13 +144,13 @@ mca_topo_base_graph_map(ompi_communicator_t * comm, int *index, int *edges, int *newrank); OMPI_DECLSPEC int -mca_topo_base_graph_neighbors(ompi_communicator_t *comm, +mca_topo_base_graph_neighbors(ompi_communicator_t *comm, int rank, - int maxneighbors, + int maxneighbors, int *neighbors); OMPI_DECLSPEC int -mca_topo_base_graph_neighbors_count(ompi_communicator_t *comm, +mca_topo_base_graph_neighbors_count(ompi_communicator_t *comm, int rank, int *nneighbors); @@ -160,18 +160,18 @@ mca_topo_base_graph_neighbors_count(ompi_communicator_t *comm, */ OMPI_DECLSPEC int mca_topo_base_dist_graph_distribute(mca_topo_base_module_t* module, - ompi_communicator_t *comm, + ompi_communicator_t *comm, int n, int nodes[], - int degrees[], int targets[], + int degrees[], int targets[], int weights[], mca_topo_base_comm_dist_graph_2_2_0_t** ptopo); OMPI_DECLSPEC int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module, - ompi_communicator_t *old_comm, + ompi_communicator_t *old_comm, int n, int nodes[], int degrees[], int targets[], int weights[], - ompi_info_t *info, int reorder, + ompi_info_t *info, int reorder, ompi_communicator_t **new_comm); OMPI_DECLSPEC int @@ -189,7 +189,7 @@ mca_topo_base_dist_graph_neighbors(ompi_communicator_t *comm, int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); - + OMPI_DECLSPEC int mca_topo_base_dist_graph_neighbors_count(ompi_communicator_t *comm, int *inneighbors, int *outneighbors, int *weighted); diff --git a/ompi/mca/topo/base/topo_base_cart_coords.c b/ompi/mca/topo/base/topo_base_cart_coords.c index 63df2a302cb..888e9206e27 100644 --- a/ompi/mca/topo/base/topo_base_cart_coords.c +++ b/ompi/mca/topo/base/topo_base_cart_coords.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,7 +33,7 @@ * coordinates of specified process (integer) * * @retval MPI_SUCCESS - */ + */ int mca_topo_base_cart_coords(ompi_communicator_t* comm, int rank, @@ -44,12 +44,12 @@ int mca_topo_base_cart_coords(ompi_communicator_t* comm, /* * loop computing the co-ordinates - */ + */ d = comm->c_topo->mtc.cart->dims; remprocs = ompi_comm_size(comm); - for (i = 0; - (i < comm->c_topo->mtc.cart->ndims) && (i < maxdims); + for (i = 0; + (i < comm->c_topo->mtc.cart->ndims) && (i < maxdims); ++i, ++d) { dim = *d; remprocs /= dim; diff --git a/ompi/mca/topo/base/topo_base_cart_create.c b/ompi/mca/topo/base/topo_base_cart_create.c index 6d1c732579b..3b9689c9db3 100644 --- a/ompi/mca/topo/base/topo_base_cart_create.c +++ b/ompi/mca/topo/base/topo_base_cart_create.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ * Open MPI currently ignores the 'reorder' flag. * * @retval OMPI_SUCCESS - */ + */ int mca_topo_base_cart_create(mca_topo_base_module_t *topo, ompi_communicator_t* old_comm, @@ -82,7 +82,7 @@ int mca_topo_base_cart_create(mca_topo_base_module_t *topo, if (nprocs < num_procs) { num_procs = nprocs; } - + if (new_rank > (nprocs-1)) { ndims = 0; new_rank = MPI_UNDEFINED; @@ -112,7 +112,7 @@ int mca_topo_base_cart_create(mca_topo_base_module_t *topo, return OMPI_ERR_OUT_OF_RESOURCE; } memcpy(cart->periods, periods, ndims * sizeof(int)); - + cart->coords = (int*)malloc(sizeof(int) * ndims); if (NULL == cart->coords) { OBJ_RELEASE(cart); diff --git a/ompi/mca/topo/base/topo_base_cart_get.c b/ompi/mca/topo/base/topo_base_cart_get.c index efd63663309..f0c143c8ed3 100644 --- a/ompi/mca/topo/base/topo_base_cart_get.c +++ b/ompi/mca/topo/base/topo_base_cart_get.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/topo/base/topo_base_cart_map.c b/ompi/mca/topo/base/topo_base_cart_map.c index c6da20a0068..f75ebd2aea8 100644 --- a/ompi/mca/topo/base/topo_base_cart_map.c +++ b/ompi/mca/topo/base/topo_base_cart_map.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -27,13 +27,13 @@ * @param ndims number of dimensions of cartesian structure (integer) * @param dims integer array of size 'ndims' specifying the number of * processes in each coordinate direction - * @param periods logical array of size 'ndims' specifying the + * @param periods logical array of size 'ndims' specifying the * periodicity specification in each coordinate direction - * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' + * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' * if calling process does not belong to grid (integer) * - * @retval MPI_SUCCESS - * @retval MPI_ERR_DIMS + * @retval MPI_SUCCESS + * @retval MPI_ERR_DIMS */ int mca_topo_base_cart_map(ompi_communicator_t* comm, diff --git a/ompi/mca/topo/base/topo_base_cart_rank.c b/ompi/mca/topo/base/topo_base_cart_rank.c index eb0b00150ba..70992325205 100644 --- a/ompi/mca/topo/base/topo_base_cart_rank.c +++ b/ompi/mca/topo/base/topo_base_cart_rank.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,10 +35,10 @@ * @retval MPI_ERR_COMM * @retval MPI_ERR_TOPOLOGY * @retval MPI_ERR_ARG - */ + */ -int mca_topo_base_cart_rank(ompi_communicator_t* comm, - int *coords, +int mca_topo_base_cart_rank(ompi_communicator_t* comm, + int *coords, int *rank) { int prank; diff --git a/ompi/mca/topo/base/topo_base_cart_shift.c b/ompi/mca/topo/base/topo_base_cart_shift.c index 63c67138cc6..f3e68de6228 100644 --- a/ompi/mca/topo/base/topo_base_cart_shift.c +++ b/ompi/mca/topo/base/topo_base_cart_shift.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ * Cartesian mesh. * * @retval MPI_SUCCESS - */ + */ int mca_topo_base_cart_shift(ompi_communicator_t* comm, int direction, int disp, diff --git a/ompi/mca/topo/base/topo_base_cart_sub.c b/ompi/mca/topo/base/topo_base_cart_sub.c index 71f1b7bb45a..0511ef2e049 100644 --- a/ompi/mca/topo/base/topo_base_cart_sub.c +++ b/ompi/mca/topo/base/topo_base_cart_sub.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,10 +30,10 @@ /* * function - partitions a communicator into subgroups which * form lower-dimensional cartesian subgrids - * + * * @param comm communicator with cartesian structure (handle) - * @param remain_dims the 'i'th entry of 'remain_dims' specifies whether - * the 'i'th dimension is kept in the subgrid (true) + * @param remain_dims the 'i'th entry of 'remain_dims' specifies whether + * the 'i'th dimension is kept in the subgrid (true) * or is dropped (false) (logical vector) * @param new_comm communicator containing the subgrid that includes the * calling process (handle) @@ -41,7 +41,7 @@ * @retval MPI_SUCCESS * @retval MPI_ERR_TOPOLOGY * @retval MPI_ERR_COMM - */ + */ int mca_topo_base_cart_sub (ompi_communicator_t* comm, int *remain_dims, ompi_communicator_t** new_comm) @@ -94,7 +94,7 @@ int mca_topo_base_cart_sub (ompi_communicator_t* comm, /* Fill the communicator with topology information. */ if (temp_comm != MPI_COMM_NULL) { - + assert( NULL == temp_comm->c_topo ); if (OMPI_SUCCESS != (errcode = mca_topo_base_comm_select(temp_comm, comm->c_topo, diff --git a/ompi/mca/topo/base/topo_base_cartdim_get.c b/ompi/mca/topo/base/topo_base_cartdim_get.c index e566c218dbf..a8094555f4b 100644 --- a/ompi/mca/topo/base/topo_base_cartdim_get.c +++ b/ompi/mca/topo/base/topo_base_cartdim_get.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/topo/base/topo_base_comm_select.c b/ompi/mca/topo/base/topo_base_comm_select.c index 63d0ac418d3..400961c8e93 100644 --- a/ompi/mca/topo/base/topo_base_comm_select.c +++ b/ompi/mca/topo/base/topo_base_comm_select.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -66,7 +66,7 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * 3. The query function returns a module and its priority. * 4. Select the module with the highest priority. * 5. OBJ_RELEASE all the "losing" modules. - */ + */ int mca_topo_base_comm_select(const ompi_communicator_t* comm, mca_topo_base_module_t* preferred_module, mca_topo_base_module_t** selected_module, @@ -74,11 +74,11 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, { int priority; int best_priority; - opal_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; - mca_topo_base_component_t *component; + mca_topo_base_component_t *component; mca_topo_base_component_t *best_component; - mca_topo_base_module_t *module; + mca_topo_base_module_t *module; opal_list_t queried; queried_module_t *om; int err = MPI_SUCCESS; @@ -97,12 +97,12 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, /* We have a preferred module. Check if it is available and if so, whether it wants to run */ - + opal_output_verbose(10, ompi_topo_base_framework.framework_output, "topo:base:comm_select: Checking preferred component: %s", preferred_module->topo_component->topoc_version.mca_component_name); - /* query the component for its priority and get its module + /* query the component for its priority and get its module structure. This is necessary to proceed */ component = (mca_topo_base_component_t *)preferred_module->topo_component; module = component->topoc_comm_query(comm, &priority, type); @@ -116,7 +116,7 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, *selected_module = module; module->topo_component = component; return OMPI_SUCCESS; - } + } /* If we get here, the preferred component is present, but is unable to run. This is not a good sign. We should try selecting some other component. We let it fall through @@ -132,7 +132,7 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, * All we need to do is to go through the list of available * components and find the one which has the highest priority and * use that for this communicator - */ + */ best_component = NULL; best_priority = -1; @@ -154,20 +154,20 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, } else { /* * call the query function and see what it returns - */ + */ module = component->topoc_comm_query(comm, &priority, type); if (NULL == module) { /* * query did not return any action which can be used - */ + */ opal_output_verbose(10, ompi_topo_base_framework.framework_output, "select: query returned failure"); } else { opal_output_verbose(10, ompi_topo_base_framework.framework_output, "select: query returned priority %d", priority); - /* + /* * is this the best component we have found till now? */ if (priority > best_priority) { @@ -184,8 +184,8 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, return OMPI_ERR_OUT_OF_RESOURCE; } om->om_component = component; - om->om_module = module; - opal_list_append(&queried, (opal_list_item_t *)om); + om->om_module = module; + opal_list_append(&queried, (opal_list_item_t *)om); } /* end else of if (NULL == module) */ } /* end else of if (NULL == component->init) */ } /* end for ... end of traversal */ @@ -206,7 +206,7 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, * returned their priorities from the query. We now have to * unquery() those components which have not been selected and * init() the component which was selected - */ + */ for (item = opal_list_remove_first(&queried); NULL != item; item = opal_list_remove_first(&queried)) { @@ -220,7 +220,7 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, * defined. Whereever a function pointer is null in the * module structure we need to fill it in with the base * structure function pointers. This is yet to be done - */ + */ fill_null_pointers(type, om->om_module); om->om_module->topo_component = best_component; *selected_module = om->om_module; @@ -233,7 +233,7 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, } OBJ_RELEASE(om); } /* traversing through the entire list */ - + opal_output_verbose(10, ompi_topo_base_framework.framework_output, "select: component %s selected", best_component->topoc_version.mca_component_name); @@ -248,7 +248,7 @@ int mca_topo_base_comm_select(const ompi_communicator_t* comm, * a check for the common minimum funtions being implemented by the * module. */ -static void fill_null_pointers(int type, mca_topo_base_module_t *module) +static void fill_null_pointers(int type, mca_topo_base_module_t *module) { if( OMPI_COMM_CART == type ) { if (NULL == module->topo.cart.cart_coords) { diff --git a/ompi/mca/topo/base/topo_base_dist_graph_create.c b/ompi/mca/topo/base/topo_base_dist_graph_create.c index dc676e3b016..8b61680a33b 100644 --- a/ompi/mca/topo/base/topo_base_dist_graph_create.c +++ b/ompi/mca/topo/base/topo_base_dist_graph_create.c @@ -32,9 +32,9 @@ typedef struct _dist_graph_elem { } mca_topo_base_dist_graph_elem_t; int mca_topo_base_dist_graph_distribute(mca_topo_base_module_t* module, - ompi_communicator_t *comm, + ompi_communicator_t *comm, int n, int nodes[], - int degrees[], int targets[], + int degrees[], int targets[], int weights[], mca_topo_base_comm_dist_graph_2_2_0_t** ptopo) { @@ -279,11 +279,11 @@ int mca_topo_base_dist_graph_distribute(mca_topo_base_module_t* module, } int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module, - ompi_communicator_t *comm_old, + ompi_communicator_t *comm_old, int n, int nodes[], - int degrees[], int targets[], + int degrees[], int targets[], int weights[], - ompi_info_t *info, int reorder, + ompi_info_t *info, int reorder, ompi_communicator_t **newcomm) { int err; @@ -303,9 +303,9 @@ int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module, return OMPI_ERR_OUT_OF_RESOURCE; } err = mca_topo_base_dist_graph_distribute(module, - comm_old, + comm_old, n, nodes, - degrees, targets, + degrees, targets, weights, &topo); if( OMPI_SUCCESS != err ) { @@ -318,7 +318,7 @@ int mca_topo_base_dist_graph_create(mca_topo_base_module_t* module, must be set before invoking ompi_comm_enable */ rank = ompi_comm_rank(comm_old); if(OMPI_GROUP_IS_DENSE(comm_old->c_local_group)) { - memcpy(topo_procs, + memcpy(topo_procs, comm_old->c_local_group->grp_proc_pointers, num_procs * sizeof(ompi_proc_t *)); } else { diff --git a/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c b/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c index 67026af1cfc..4179f07d86d 100644 --- a/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c +++ b/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c @@ -22,9 +22,9 @@ int mca_topo_base_dist_graph_create_adjacent(mca_topo_base_module_t* module, ompi_communicator_t *comm_old, int indegree, int sources[], - int sourceweights[], + int sourceweights[], int outdegree, - int destinations[], + int destinations[], int destweights[], ompi_info_t *info, int reorder, ompi_communicator_t **newcomm) diff --git a/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c b/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c index dfe4aa89135..47648a528fb 100644 --- a/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c +++ b/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c @@ -19,7 +19,7 @@ #include "ompi/mca/topo/base/base.h" -int mca_topo_base_dist_graph_neighbors(ompi_communicator_t *comm, +int mca_topo_base_dist_graph_neighbors(ompi_communicator_t *comm, int maxindegree, int sources[], int sourceweights[], int maxoutdegree, int destinations[], diff --git a/ompi/mca/topo/base/topo_base_dist_graph_neighbors_count.c b/ompi/mca/topo/base/topo_base_dist_graph_neighbors_count.c index 0b206e70ad3..36f758c0b94 100644 --- a/ompi/mca/topo/base/topo_base_dist_graph_neighbors_count.c +++ b/ompi/mca/topo/base/topo_base_dist_graph_neighbors_count.c @@ -14,7 +14,7 @@ #include "ompi/mca/topo/base/base.h" -int mca_topo_base_dist_graph_neighbors_count(ompi_communicator_t *comm, +int mca_topo_base_dist_graph_neighbors_count(ompi_communicator_t *comm, int *inneighbors, int *outneighbors, int *weighted) { diff --git a/ompi/mca/topo/base/topo_base_find_available.c b/ompi/mca/topo/base/topo_base_find_available.c index b1ff5e3a9ad..64a831c4cef 100644 --- a/ompi/mca/topo/base/topo_base_find_available.c +++ b/ompi/mca/topo/base/topo_base_find_available.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,15 +41,15 @@ static int init_query_2_2_0(const mca_base_component_t *component, mca_base_component_list_item_t *entry, bool enable_progress_threads, bool enable_mpi_threads); - + int mca_topo_base_find_available(bool enable_progress_threads, bool enable_mpi_threads) { opal_list_item_t *item, *next; mca_base_component_list_item_t *cli; - /* The list of components which we should check is already present - in ompi_topo_base_framework.framework_components, which was established in + /* The list of components which we should check is already present + in ompi_topo_base_framework.framework_components, which was established in mca_topo_base_open */ item = opal_list_get_first(&ompi_topo_base_framework.framework_components); @@ -57,7 +57,7 @@ int mca_topo_base_find_available(bool enable_progress_threads, next = opal_list_get_next(item); cli = (mca_base_component_list_item_t*)item; - /* Now for this entry, we have to determine the thread level. Call + /* Now for this entry, we have to determine the thread level. Call a subroutine to do the job for us */ if (OMPI_SUCCESS != init_query(cli->cli_component, cli, @@ -83,15 +83,15 @@ int mca_topo_base_find_available(bool enable_progress_threads, /* All done */ return OMPI_SUCCESS; } - - + + static int init_query(const mca_base_component_t *m, mca_base_component_list_item_t *entry, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { int ret; - + opal_output_verbose(10, ompi_topo_base_framework.framework_output, "topo:find_available: querying topo component %s", m->mca_component_name); @@ -122,7 +122,7 @@ static int init_query(const mca_base_component_t *m, m->mca_component_name); if (NULL != m->mca_close_component) { m->mca_close_component(); - } + } } else { opal_output_verbose(10, ompi_topo_base_framework.framework_output, "topo:find_avalable: topo component %s is available", @@ -138,11 +138,11 @@ static int init_query(const mca_base_component_t *m, static int init_query_2_2_0(const mca_base_component_t *component, mca_base_component_list_item_t *entry, bool enable_progress_threads, - bool enable_mpi_threads) + bool enable_mpi_threads) { - mca_topo_base_component_2_2_0_t *topo = + mca_topo_base_component_2_2_0_t *topo = (mca_topo_base_component_2_2_0_t *) component; - + return topo->topoc_init_query(enable_progress_threads, enable_mpi_threads); } diff --git a/ompi/mca/topo/base/topo_base_frame.c b/ompi/mca/topo/base/topo_base_frame.c index 78ffbd4eb92..062786f9308 100644 --- a/ompi/mca/topo/base/topo_base_frame.c +++ b/ompi/mca/topo/base/topo_base_frame.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -57,7 +57,7 @@ OBJ_CLASS_INSTANCE(mca_topo_base_module_t, opal_object_t, mca_topo_base_module_construct, mca_topo_base_module_destruct); -static int mca_topo_base_close(void) +static int mca_topo_base_close(void) { return mca_base_framework_components_close(&ompi_topo_base_framework, NULL); } @@ -66,7 +66,7 @@ static int mca_topo_base_close(void) * Function for finding and opening either all the MCA topo components, or * the one that specifically requested via a MCA parameter. */ -static int mca_topo_base_open(mca_base_open_flag_t flags) +static int mca_topo_base_open(mca_base_open_flag_t flags) { return mca_base_framework_components_open(&ompi_topo_base_framework, flags); } diff --git a/ompi/mca/topo/base/topo_base_graph_create.c b/ompi/mca/topo/base/topo_base_graph_create.c index 77a1be61d7a..53e4dab01a8 100644 --- a/ompi/mca/topo/base/topo_base_graph_create.c +++ b/ompi/mca/topo/base/topo_base_graph_create.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -105,7 +105,7 @@ int mca_topo_base_graph_create(mca_topo_base_module_t *topo, return OMPI_ERR_OUT_OF_RESOURCE; } if(OMPI_GROUP_IS_DENSE(old_comm->c_local_group)) { - memcpy(topo_procs, + memcpy(topo_procs, old_comm->c_local_group->grp_proc_pointers, num_procs * sizeof(ompi_proc_t *)); } else { @@ -140,7 +140,7 @@ int mca_topo_base_graph_create(mca_topo_base_module_t *topo, } return ret; } - + *comm_topo = new_comm; if( MPI_UNDEFINED == new_rank ) { diff --git a/ompi/mca/topo/base/topo_base_graph_get.c b/ompi/mca/topo/base/topo_base_graph_get.c index bc905f42fe1..f6c1a7dd083 100644 --- a/ompi/mca/topo/base/topo_base_graph_get.c +++ b/ompi/mca/topo/base/topo_base_graph_get.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -32,7 +32,7 @@ * @param edges array of integers containing the graph structure * * @retval MPI_SUCCESS - */ + */ int mca_topo_base_graph_get(ompi_communicator_t* comm, int maxindex, @@ -53,10 +53,10 @@ int mca_topo_base_graph_get(ompi_communicator_t* comm, p = comm->c_topo->mtc.graph->edges; - for (i = 0; - (i < comm->c_topo->mtc.graph->index[nprocs-1]) && (i < maxedges); + for (i = 0; + (i < comm->c_topo->mtc.graph->index[nprocs-1]) && (i < maxedges); ++i, ++p) { - + *edges++ = *p; } diff --git a/ompi/mca/topo/base/topo_base_graph_map.c b/ompi/mca/topo/base/topo_base_graph_map.c index 70cc91f4f40..80b8c02bdc0 100644 --- a/ompi/mca/topo/base/topo_base_graph_map.c +++ b/ompi/mca/topo/base/topo_base_graph_map.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,7 +29,7 @@ * @param index integer array specifying the graph structure * @param edges integer array specifying the graph structure * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' - * if the calling process does not belong to + * if the calling process does not belong to * graph (integer) * * @retval MPI_SUCCESS diff --git a/ompi/mca/topo/base/topo_base_graph_neighbors.c b/ompi/mca/topo/base/topo_base_graph_neighbors.c index ee2a6fe2023..40a4b3723dd 100644 --- a/ompi/mca/topo/base/topo_base_graph_neighbors.c +++ b/ompi/mca/topo/base/topo_base_graph_neighbors.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/topo/base/topo_base_graph_neighbors_count.c b/ompi/mca/topo/base/topo_base_graph_neighbors_count.c index 27c115299e4..02331d12503 100644 --- a/ompi/mca/topo/base/topo_base_graph_neighbors_count.c +++ b/ompi/mca/topo/base/topo_base_graph_neighbors_count.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,9 +30,9 @@ * @param comm communicator with graph topology (handle) * @param rank rank of process in group of 'comm' (integer) * @param nneighbors number of neighbors of specified process (integer) - * + * * @retval MPI_SUCCESS - */ + */ int mca_topo_base_graph_neighbors_count (ompi_communicator_t* comm, int rank, diff --git a/ompi/mca/topo/base/topo_base_graphdims_get.c b/ompi/mca/topo/base/topo_base_graphdims_get.c index 7c84da94b1b..e34cb2b68ad 100644 --- a/ompi/mca/topo/base/topo_base_graphdims_get.c +++ b/ompi/mca/topo/base/topo_base_graphdims_get.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -26,11 +26,11 @@ /* * function - Retrieves graph topology information associated with a * communicator - * + * * @param comm - communicator for group with graph structure (handle) * @param nodes - number of nodes in graph (integer) * @param nedges - number of edges in graph (integer) - * + * * @retval MPI_SUCCESS * @retval MPI_ERR_TOPOLOGY * @retval MPI_ERR_COMM @@ -42,7 +42,7 @@ int mca_topo_base_graphdims_get (ompi_communicator_t* comm, { mca_topo_base_comm_graph_2_2_0_t* graph = comm->c_topo->mtc.graph; *nodes = ompi_comm_size(comm); - *nedges = graph->index[*nodes -1]; + *nedges = graph->index[*nodes -1]; return MPI_SUCCESS; } diff --git a/ompi/mca/topo/base/topo_base_lazy_init.c b/ompi/mca/topo/base/topo_base_lazy_init.c index 3e9e57ae7d8..c66462a851c 100644 --- a/ompi/mca/topo/base/topo_base_lazy_init.c +++ b/ompi/mca/topo/base/topo_base_lazy_init.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -34,7 +34,7 @@ it's safe to invoke this function multiple times). We do this because most MPI apps don't use MPI topology functions, so we might as well not load them unless we have to. */ -int mca_topo_base_lazy_init(void) +int mca_topo_base_lazy_init(void) { int err; diff --git a/ompi/mca/topo/basic/Makefile.am b/ompi/mca/topo/basic/Makefile.am index 9c261f7029d..4e6da4f4fe7 100644 --- a/ompi/mca/topo/basic/Makefile.am +++ b/ompi/mca/topo/basic/Makefile.am @@ -6,9 +6,9 @@ # Copyright (c) 2011-2013 Université Bordeaux 1 # Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -22,7 +22,7 @@ sources = \ if MCA_BUILD_ompi_topo_basic_DSO lib = -lib_sources = +lib_sources = component = mca_topo_basic.la component_sources = $(sources) else diff --git a/ompi/mca/topo/basic/topo_basic.h b/ompi/mca/topo/basic/topo_basic.h index 460a111ba47..006005bffcd 100644 --- a/ompi/mca/topo/basic/topo_basic.h +++ b/ompi/mca/topo/basic/topo_basic.h @@ -7,9 +7,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/topo/basic/topo_basic_component.c b/ompi/mca/topo/basic/topo_basic_component.c index b0bcc6ffd61..83f26519273 100644 --- a/ompi/mca/topo/basic/topo_basic_component.c +++ b/ompi/mca/topo/basic/topo_basic_component.c @@ -10,9 +10,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ /* * Public string showing the topo basic module version number */ -const char *mca_topo_basic_component_version_string = +const char *mca_topo_basic_component_version_string = "Open MPI basic topology MCA component version" OMPI_VERSION; /* @@ -35,7 +35,7 @@ comm_query(const ompi_communicator_t *comm, int *priority, uint32_t type); /* * Public component structure */ -mca_topo_basic_component_t mca_topo_basic_component = +mca_topo_basic_component_t mca_topo_basic_component = { .topoc_version = { MCA_TOPO_BASE_VERSION_2_2_0, @@ -60,7 +60,7 @@ static int init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ return OMPI_SUCCESS; -} +} static struct mca_topo_base_module_t * diff --git a/ompi/mca/topo/example/Makefile.am b/ompi/mca/topo/example/Makefile.am index a5c80c0b01b..190bdf0dc8a 100644 --- a/ompi/mca/topo/example/Makefile.am +++ b/ompi/mca/topo/example/Makefile.am @@ -5,16 +5,16 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012-2013 Inria. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -31,7 +31,7 @@ sources = \ if MCA_BUILD_ompi_topo_example_DSO lib = -lib_sources = +lib_sources = component = mca_topo_example.la component_sources = $(sources) else diff --git a/ompi/mca/topo/example/topo_example.h b/ompi/mca/topo/example/topo_example.h index ca7b24315fd..9d14e89d1d9 100644 --- a/ompi/mca/topo/example/topo_example.h +++ b/ompi/mca/topo/example/topo_example.h @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,10 +42,10 @@ BEGIN_C_DECLS /* * Public component instance */ -OMPI_MODULE_DECLSPEC extern mca_topo_base_component_2_2_0_t +OMPI_MODULE_DECLSPEC extern mca_topo_base_component_2_2_0_t mca_topo_example_component; -/* +/* * A unique module class for the module so that we can both cache * module-specific information on the module and have a * module-specific constructor and destructor. @@ -62,7 +62,7 @@ OBJ_CLASS_DECLARATION(mca_topo_example_module_t); /* * Module functions - */ + */ int mca_topo_example_cart_map(struct ompi_communicator_t *comm, int ndims, @@ -79,8 +79,8 @@ int mca_topo_example_graph_map(struct ompi_communicator_t *comm, * ****************************************************************** * ************ functions implemented in this module end ************ * ****************************************************************** - */ - + */ + END_C_DECLS #endif /* MCA_TOPO_EXAMPLE_H */ diff --git a/ompi/mca/topo/example/topo_example_cart_map.c b/ompi/mca/topo/example/topo_example_cart_map.c index eb693142a67..4c78a75348b 100644 --- a/ompi/mca/topo/example/topo_example_cart_map.c +++ b/ompi/mca/topo/example/topo_example_cart_map.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ - */ + */ #include "ompi_config.h" #include "ompi/mca/topo/example/topo_example.h" @@ -30,13 +30,13 @@ * @param ndims number of dimensions of cartesian structure (integer) * @param dims integer array of size 'ndims' specifying the number of * processes in each coordinate direction - * @param periods logical array of size 'ndims' specifying the + * @param periods logical array of size 'ndims' specifying the * periodicity specification in each coordinate direction - * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' + * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' * if calling process does not belong to grid (integer) * - * @retval MPI_SUCCESS - * @retval MPI_ERR_DIMS + * @retval MPI_SUCCESS + * @retval MPI_ERR_DIMS */ int mca_topo_example_cart_map (ompi_communicator_t* comm, diff --git a/ompi/mca/topo/example/topo_example_component.c b/ompi/mca/topo/example/topo_example_component.c index 2e09f3e3a33..3874a89b7bc 100644 --- a/ompi/mca/topo/example/topo_example_component.c +++ b/ompi/mca/topo/example/topo_example_component.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,7 +27,7 @@ /* * Public string showing the topo example module version number */ -const char *mca_topo_example_component_version_string = +const char *mca_topo_example_component_version_string = "Open MPI example topology MCA component version" OMPI_VERSION; /* @@ -40,7 +40,7 @@ comm_query(const ompi_communicator_t *comm, int *priority, uint32_t type); /* * Public component structure */ -mca_topo_base_component_2_2_0_t mca_topo_example_component = +mca_topo_base_component_2_2_0_t mca_topo_example_component = { .topoc_version = { MCA_TOPO_BASE_VERSION_2_2_0, @@ -64,9 +64,9 @@ mca_topo_base_component_2_2_0_t mca_topo_example_component = static int init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ - + return OMPI_SUCCESS; -} +} static struct mca_topo_base_module_t * diff --git a/ompi/mca/topo/example/topo_example_graph_map.c b/ompi/mca/topo/example/topo_example_graph_map.c index dd7b2d0b551..e2fa095babd 100644 --- a/ompi/mca/topo/example/topo_example_graph_map.c +++ b/ompi/mca/topo/example/topo_example_graph_map.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ - */ + */ #include "ompi_config.h" #include "ompi/mca/topo/example/topo_example.h" @@ -31,12 +31,12 @@ * @param index integer array specifying the graph structure * @param edges integer array specifying the graph structure * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' - * if the calling process does not belong to + * if the calling process does not belong to * graph (integer) * * @retval MPI_SUCCESS * @retval MPI_UNDEFINED - */ + */ int mca_topo_example_graph_map (ompi_communicator_t* comm, int nnodes, @@ -51,8 +51,8 @@ int mca_topo_example_graph_map (ompi_communicator_t* comm, * component, start with a rank that is size-my_initial_rank. */ myrank = ompi_comm_size(comm) - 1 - ompi_comm_rank(comm); - *newrank = + *newrank = ((0 > myrank) || (myrank >= nnodes)) ? MPI_UNDEFINED : myrank; - + return OMPI_SUCCESS; } diff --git a/ompi/mca/topo/example/topo_example_module.c b/ompi/mca/topo/example/topo_example_module.c index 3f347273297..965c2aaf945 100644 --- a/ompi/mca/topo/example/topo_example_module.c +++ b/ompi/mca/topo/example/topo_example_module.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mca/topo/topo.h b/ompi/mca/topo/topo.h index e33cb66d250..173af72c8a4 100644 --- a/ompi/mca/topo/topo.h +++ b/ompi/mca/topo/topo.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -32,11 +32,11 @@ #include "opal/mca/base/base.h" #include "ompi/communicator/communicator.h" -/* Forward reference to ompi_proc_t */ +/* Forward reference to ompi_proc_t */ struct ompi_proc_t; typedef struct mca_topo_base_module_t mca_topo_base_module_t; -/* +/* * Initial component query, called during mca_topo_base_open. */ typedef int (*mca_topo_base_component_init_query_2_2_0_fn_t) @@ -48,19 +48,19 @@ typedef int (*mca_topo_base_component_init_query_2_2_0_fn_t) * creation. */ typedef struct mca_topo_base_module_t* -(*mca_topo_base_component_comm_query_2_2_0_fn_t) +(*mca_topo_base_component_comm_query_2_2_0_fn_t) (const ompi_communicator_t *comm, int *priority, uint32_t type); /* * Structure for topo v2.1.0 components.This is chained to MCA v2.0.0 - */ + */ typedef struct mca_topo_base_component_2_2_0_t { mca_base_component_t topoc_version; mca_base_component_data_t topoc_data; mca_topo_base_component_init_query_2_2_0_fn_t topoc_init_query; mca_topo_base_component_comm_query_2_2_0_fn_t topoc_comm_query; -} mca_topo_base_component_2_2_0_t; +} mca_topo_base_component_2_2_0_t; typedef mca_topo_base_component_2_2_0_t mca_topo_base_component_t; /* @@ -135,7 +135,7 @@ typedef mca_topo_base_comm_cgd_union_2_2_0_t mca_topo_base_comm_cgd_union_t; * topology function was called upon is provided as well, in order to have * a valid medium for messaging. In return from the *_create functions, * a new group of processes is expected one containing all processes in - * the local_group of the new communicator. Once this information + * the local_group of the new communicator. Once this information * returned the new communicator will be fully initialized and activated. */ @@ -144,10 +144,10 @@ typedef mca_topo_base_comm_cgd_union_2_2_0_t mca_topo_base_comm_cgd_union_t; */ /* Back end for MPI_CART_COORDS */ -typedef int (*mca_topo_base_module_cart_coords_fn_t) - (struct ompi_communicator_t *comm, - int rank, - int maxdims, +typedef int (*mca_topo_base_module_cart_coords_fn_t) + (struct ompi_communicator_t *comm, + int rank, + int maxdims, int *coords); /* Back end for MPI_CART_CREATE */ @@ -162,10 +162,10 @@ typedef int (*mca_topo_base_module_cart_create_fn_t) /* Back end for MPI_CART_GET */ typedef int (*mca_topo_base_module_cart_get_fn_t) - (struct ompi_communicator_t *comm, - int maxdims, + (struct ompi_communicator_t *comm, + int maxdims, int *dims, - int *periods, + int *periods, int *coords); /* Back end for MPI_CARTDIM_GET */ @@ -175,30 +175,30 @@ typedef int (*mca_topo_base_module_cartdim_get_fn_t) /* Back end for MPI_CART_MAP */ typedef int (*mca_topo_base_module_cart_map_fn_t) - (struct ompi_communicator_t *comm, - int ndims, + (struct ompi_communicator_t *comm, + int ndims, int *dims, - int *periods, + int *periods, int *newrank); /* Back end for MPI_CART_RANK */ typedef int (*mca_topo_base_module_cart_rank_fn_t) - (struct ompi_communicator_t *comm, - int *coords, + (struct ompi_communicator_t *comm, + int *coords, int *rank); /* Back end for MPI_CART_SHIFT */ typedef int (*mca_topo_base_module_cart_shift_fn_t) - (struct ompi_communicator_t *comm, - int direction, + (struct ompi_communicator_t *comm, + int direction, int disp, - int *rank_source, + int *rank_source, int *rank_dest); /* Back end for MPI_CART_SUB */ typedef int (*mca_topo_base_module_cart_sub_fn_t) - (struct ompi_communicator_t *comm, - int *remain_dims, + (struct ompi_communicator_t *comm, + int *remain_dims, struct ompi_communicator_t ** new_comm); /* Back end for MPI_GRAPH_CREATE */ @@ -213,46 +213,46 @@ typedef int (*mca_topo_base_module_graph_create_fn_t) /* Back end for MPI_GRAPH_GET */ typedef int (*mca_topo_base_module_graph_get_fn_t) - (struct ompi_communicator_t *comm, - int maxindex, - int maxedges, - int *index, + (struct ompi_communicator_t *comm, + int maxindex, + int maxedges, + int *index, int *edges); /* Back end for MPI_GRAPH_MAP */ typedef int (*mca_topo_base_module_graph_map_fn_t) - (struct ompi_communicator_t *comm, - int nnodes, - int *index, - int *edges, + (struct ompi_communicator_t *comm, + int nnodes, + int *index, + int *edges, int *newrank); /* Back end for MPI_GRAPHDIMS_GET */ typedef int (*mca_topo_base_module_graphdims_get_fn_t) - (struct ompi_communicator_t *comm, - int *nnodes, + (struct ompi_communicator_t *comm, + int *nnodes, int *nnedges); /* Back end for MPI_GRAPH_NEIGHBORS */ typedef int (*mca_topo_base_module_graph_neighbors_fn_t) - (struct ompi_communicator_t *comm, - int rank, - int maxneighbors, + (struct ompi_communicator_t *comm, + int rank, + int maxneighbors, int *neighbors); /* Back end for MPI_GRAPH_NEIGHBORS_COUNT */ typedef int (*mca_topo_base_module_graph_neighbors_count_fn_t) - (struct ompi_communicator_t *comm, - int rank, + (struct ompi_communicator_t *comm, + int rank, int *nneighbors); /* Back end for MPI_DIST_GRAPH_CREATE */ typedef int (*mca_topo_base_module_dist_graph_create_fn_t) (struct mca_topo_base_module_t* module, - struct ompi_communicator_t *old_comm, + struct ompi_communicator_t *old_comm, int n, int nodes[], int degrees[], int targets[], int weights[], - struct ompi_info_t *info, int reorder, + struct ompi_info_t *info, int reorder, struct ompi_communicator_t **new_comm); /* Back end for MPI_DIST_GRAPH_CREATE_ADJACENT */ @@ -260,9 +260,9 @@ typedef int (*mca_topo_base_module_dist_graph_create_adjacent_fn_t) (struct mca_topo_base_module_t* module, ompi_communicator_t *comm_old, int indegree, int sources[], - int sourceweights[], + int sourceweights[], int outdegree, - int destinations[], + int destinations[], int destweights[], struct ompi_info_t *info, int reorder, ompi_communicator_t **comm_dist_graph); @@ -274,7 +274,7 @@ typedef int (*mca_topo_base_module_dist_graph_neighbors_fn_t) int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); - + /* Back end for MPI_DIST_GRAPH_NEIGHBORS_COUNT */ typedef int (*mca_topo_base_module_dist_graph_neighbors_count_fn_t) (struct ompi_communicator_t *comm, diff --git a/ompi/mca/vprotocol/Makefile.am b/ompi/mca/vprotocol/Makefile.am index fe3e2c32352..da01c34eb11 100644 --- a/ompi/mca/vprotocol/Makefile.am +++ b/ompi/mca/vprotocol/Makefile.am @@ -4,9 +4,9 @@ # reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -28,4 +28,4 @@ endif include base/Makefile.am distclean-local: - rm -f base/static-components.h + rm -f base/static-components.h diff --git a/ompi/mca/vprotocol/base/Makefile.am b/ompi/mca/vprotocol/base/Makefile.am index 1690782ec67..f21ef94e8ca 100644 --- a/ompi/mca/vprotocol/base/Makefile.am +++ b/ompi/mca/vprotocol/base/Makefile.am @@ -3,9 +3,9 @@ # of Tennessee Research Foundation. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -17,4 +17,4 @@ libmca_vprotocol_la_SOURCES += \ base/vprotocol_base.c \ base/vprotocol_base_select.c \ base/vprotocol_base_parasite.c \ - base/vprotocol_base_request.c + base/vprotocol_base_request.c diff --git a/ompi/mca/vprotocol/base/base.h b/ompi/mca/vprotocol/base/base.h index 76235899130..c0e40c647b8 100644 --- a/ompi/mca/vprotocol/base/base.h +++ b/ompi/mca/vprotocol/base/base.h @@ -3,7 +3,7 @@ * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,37 +38,37 @@ OMPI_DECLSPEC extern mca_pml_v_t mca_pml_v; */ OMPI_DECLSPEC extern mca_base_framework_t ompi_vprotocol_base_framework; -/* this needs to be called before vprotocol is opened. this replaces the +/* this needs to be called before vprotocol is opened. this replaces the need for a unique open function */ void mca_vprotocol_base_set_include_list(char *vprotocol_include_list); /* select a component */ -OMPI_DECLSPEC int mca_vprotocol_base_select(bool enable_progress_threads, +OMPI_DECLSPEC int mca_vprotocol_base_select(bool enable_progress_threads, bool enable_mpi_threads); OMPI_DECLSPEC int mca_vprotocol_base_parasite(void); - + OMPI_DECLSPEC extern char *mca_vprotocol_base_include_list; OMPI_DECLSPEC extern mca_vprotocol_base_component_t mca_vprotocol_component; OMPI_DECLSPEC extern mca_vprotocol_base_module_t mca_vprotocol; - + /* Macro for use in components that are of type vprotocol */ #define MCA_VPROTOCOL_BASE_VERSION_2_0_0 \ OMPI_MCA_BASE_VERSION_2_1_0("vprotocol", 2, 0, 0) - -/* Macro to mark an invalid component version (0.0.0). Any component showing - * that version number will be ignored. + +/* Macro to mark an invalid component version (0.0.0). Any component showing + * that version number will be ignored. */ #define MCA_VPROTOCOL_BASE_VERSION_0_0_0 \ /* vprotocol v0.0 is chained to MCA v2.0 */ \ OMPI_MCA_BASE_VERSION_2_1_0("vprotocol", 0, 0, 0) - + #define mca_vprotocol_base_selected() ( \ 0 != mca_vprotocol_component.pmlm_version.mca_type_major_version \ ) - + END_C_DECLS #endif /* __INCLUDE_VPROTOCOL_BASE_H_ */ diff --git a/ompi/mca/vprotocol/base/vprotocol_base.c b/ompi/mca/vprotocol/base/vprotocol_base.c index f8f8e77d219..262255d5cd2 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base.c +++ b/ompi/mca/vprotocol/base/vprotocol_base.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -21,9 +21,9 @@ char *mca_vprotocol_base_include_list = NULL; mca_pml_v_t mca_pml_v = {-1, 0, 0}; -/* Load any vprotocol MCA component and call open function of all those +/* Load any vprotocol MCA component and call open function of all those * components. - * + * * Also fill the mca_vprotocol_base_include_list with components that exists */ diff --git a/ompi/mca/vprotocol/base/vprotocol_base_parasite.c b/ompi/mca/vprotocol/base/vprotocol_base_parasite.c index 034b319882e..699972f4136 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base_parasite.c +++ b/ompi/mca/vprotocol/base/vprotocol_base_parasite.c @@ -13,35 +13,35 @@ #include "vprotocol_base_request.h" int mca_vprotocol_base_parasite(void) { - if(mca_vprotocol.add_procs) + if(mca_vprotocol.add_procs) mca_pml.pml_add_procs = mca_vprotocol.add_procs; - if(mca_vprotocol.del_procs) + if(mca_vprotocol.del_procs) mca_pml.pml_del_procs = mca_vprotocol.del_procs; if(mca_vprotocol.progress) mca_pml.pml_progress = mca_vprotocol.progress; - if(mca_vprotocol.add_comm) + if(mca_vprotocol.add_comm) mca_pml.pml_add_comm = mca_vprotocol.add_comm; - if(mca_vprotocol.del_comm) + if(mca_vprotocol.del_comm) mca_pml.pml_del_comm = mca_vprotocol.del_comm; if(mca_vprotocol.irecv_init) mca_pml.pml_irecv_init = mca_vprotocol.irecv_init; - if(mca_vprotocol.irecv) + if(mca_vprotocol.irecv) mca_pml.pml_irecv = mca_vprotocol.irecv; - if(mca_vprotocol.recv) + if(mca_vprotocol.recv) mca_pml.pml_recv = mca_vprotocol.recv; - if(mca_vprotocol.isend_init) + if(mca_vprotocol.isend_init) mca_pml.pml_isend_init = mca_vprotocol.isend_init; - if(mca_vprotocol.isend) + if(mca_vprotocol.isend) mca_pml.pml_isend = mca_vprotocol.isend; - if(mca_vprotocol.send) + if(mca_vprotocol.send) mca_pml.pml_send = mca_vprotocol.send; - if(mca_vprotocol.iprobe) + if(mca_vprotocol.iprobe) mca_pml.pml_iprobe = mca_vprotocol.iprobe; - if(mca_vprotocol.probe) + if(mca_vprotocol.probe) mca_pml.pml_probe = mca_vprotocol.probe; - if(mca_vprotocol.start) + if(mca_vprotocol.start) mca_pml.pml_start = mca_vprotocol.start; - if(mca_vprotocol.dump) + if(mca_vprotocol.dump) mca_pml.pml_dump = mca_vprotocol.dump; if(mca_vprotocol.wait) ompi_request_functions.req_wait = mca_vprotocol.wait; diff --git a/ompi/mca/vprotocol/base/vprotocol_base_request.c b/ompi/mca/vprotocol/base/vprotocol_base_request.c index 5a672d5240a..77adf51c231 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base_request.c +++ b/ompi/mca/vprotocol/base/vprotocol_base_request.c @@ -15,19 +15,19 @@ #include "vprotocol_base_request.h" #include "ompi/mca/pml/v/pml_v_output.h" -int mca_vprotocol_base_request_parasite(void) +int mca_vprotocol_base_request_parasite(void) { int ret; - + if(mca_vprotocol.req_recv_class) { opal_free_list_t pml_fl_save = mca_pml_base_recv_requests; - mca_pml_v.host_pml_req_recv_size = + mca_pml_v.host_pml_req_recv_size = pml_fl_save.fl_frag_class->cls_sizeof; V_OUTPUT_VERBOSE(300, "req_rebuild: recv\tsize %lu+%lu\talignment=%lu", (unsigned long) mca_pml_v.host_pml_req_recv_size, (unsigned long) mca_vprotocol.req_recv_class->cls_sizeof, (unsigned long) pml_fl_save.fl_frag_alignment); - mca_vprotocol.req_recv_class->cls_parent = - pml_fl_save.fl_frag_class; - mca_vprotocol.req_recv_class->cls_sizeof += + mca_vprotocol.req_recv_class->cls_parent = + pml_fl_save.fl_frag_class; + mca_vprotocol.req_recv_class->cls_sizeof += pml_fl_save.fl_frag_class->cls_sizeof; /* rebuild the requests free list with the right size */ OBJ_DESTRUCT(&mca_pml_base_recv_requests); @@ -51,12 +51,12 @@ int mca_vprotocol_base_request_parasite(void) if(mca_vprotocol.req_send_class) { opal_free_list_t pml_fl_save = mca_pml_base_send_requests; - mca_pml_v.host_pml_req_send_size = + mca_pml_v.host_pml_req_send_size = pml_fl_save.fl_frag_class->cls_sizeof; V_OUTPUT_VERBOSE(300, "req_rebuild: send\tsize %lu+%lu\talignment=%lu", (unsigned long) mca_pml_v.host_pml_req_send_size, (unsigned long) mca_vprotocol.req_send_class->cls_sizeof, (unsigned long) pml_fl_save.fl_frag_alignment); - mca_vprotocol.req_send_class->cls_parent = - pml_fl_save.fl_frag_class; - mca_vprotocol.req_send_class->cls_sizeof += + mca_vprotocol.req_send_class->cls_parent = + pml_fl_save.fl_frag_class; + mca_vprotocol.req_send_class->cls_sizeof += pml_fl_save.fl_frag_class->cls_sizeof; /* rebuild the requests free list with the right size */ OBJ_DESTRUCT(&mca_pml_base_send_requests); @@ -78,5 +78,5 @@ int mca_vprotocol_base_request_parasite(void) if(OMPI_SUCCESS != ret) return ret; } return OMPI_SUCCESS; - + } diff --git a/ompi/mca/vprotocol/base/vprotocol_base_request.h b/ompi/mca/vprotocol/base/vprotocol_base_request.h index 0262de95c29..231dc44d491 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base_request.h +++ b/ompi/mca/vprotocol/base/vprotocol_base_request.h @@ -19,23 +19,23 @@ BEGIN_C_DECLS /** Rebuild the PML requests pools to make room for extra space at end of each - * request. - * The extra data is allocated in each requests so that it can hold instances - * of the req_recv_class and req_send_class fields of the + * request. + * The extra data is allocated in each requests so that it can hold instances + * of the req_recv_class and req_send_class fields of the * mca_vprotocol_base_module_t. If those fields are NULL the requests are not * recreated. * @return OMPI_SUCCESS or failure status */ -OMPI_DECLSPEC int mca_vprotocol_base_request_parasite(void); +OMPI_DECLSPEC int mca_vprotocol_base_request_parasite(void); + - /** Gives the actual address of the protocol specific part of a recv request. * @param req (IN) the address of an ompi_request. * @return address of the custom vprotocol data associated with the request. */ #define VPROTOCOL_RECV_FTREQ(req) \ (((uintptr_t) req) + mca_pml_v.host_pml_req_recv_size) - + /** Gives the address of the real request associated with a protocol specific * send request. * @param ftreq (IN) the address of a protocol specific request. @@ -44,7 +44,7 @@ OMPI_DECLSPEC int mca_vprotocol_base_request_parasite(void); #define VPROTOCOL_RECV_REQ(ftreq) \ ((mca_pml_base_recv_request_t *) \ (((uintptr_t) ftreq) - mca_pml_v.host_pml_req_send_size)) - + /** Gives the actual address of the protocol specific part of a send request. * @param req (IN) the address of an ompi_request. * @return address of the custom vprotocol data associated with the request. @@ -60,8 +60,8 @@ OMPI_DECLSPEC int mca_vprotocol_base_request_parasite(void); #define VPROTOCOL_SEND_REQ(ftreq) \ ((mca_pml_base_send_request_t *) \ (((uintptr_t) ftreq) - mca_pml_v.host_pml_req_send_size)) - -/** Unified macro to get the actual address of the protocol specific part of + +/** Unified macro to get the actual address of the protocol specific part of * an send - or - recv request. * @param request (IN) the address of an ompi_request. * @return address of the custom vprotocol data associated with the request. @@ -76,7 +76,7 @@ OMPI_DECLSPEC int mca_vprotocol_base_request_parasite(void); : VPROTOCOL_RECV_FTREQ(req) \ ) \ ) - + END_C_DECLS #endif /* __INCLUDE_VPROTOCOL_REQUEST_H_ */ diff --git a/ompi/mca/vprotocol/base/vprotocol_base_select.c b/ompi/mca/vprotocol/base/vprotocol_base_select.c index 4938705d2e8..47e8ea6190d 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base_select.c +++ b/ompi/mca/vprotocol/base/vprotocol_base_select.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -22,7 +22,7 @@ mca_vprotocol_base_module_t mca_vprotocol = {0}; mca_vprotocol_base_component_t mca_vprotocol_component = { - {MCA_VPROTOCOL_BASE_VERSION_0_0_0} /* Initialized with invalid version */ + {MCA_VPROTOCOL_BASE_VERSION_0_0_0} /* Initialized with invalid version */ }; typedef struct opened_component_t { @@ -41,7 +41,7 @@ typedef struct opened_component_t { * will have all of its function pointers saved and returned to the * caller. */ -int mca_vprotocol_base_select(bool enable_progress_threads, +int mca_vprotocol_base_select(bool enable_progress_threads, bool enable_mpi_threads) { int priority = 0, best_priority = -1; @@ -51,20 +51,20 @@ int mca_vprotocol_base_select(bool enable_progress_threads, mca_vprotocol_base_module_t *module = NULL, *best_module = NULL; opal_list_t opened; opened_component_t *om = NULL; - + /* Traverse the list of available components; call their init functions. */ OBJ_CONSTRUCT(&opened, opal_list_t); - OPAL_LIST_FOREACH(cli, &ompi_vprotocol_base_framework.framework_components, mca_base_component_list_item_t) + OPAL_LIST_FOREACH(cli, &ompi_vprotocol_base_framework.framework_components, mca_base_component_list_item_t) { component = (mca_vprotocol_base_component_t *) cli->cli_component; if (NULL == mca_vprotocol_base_include_list) { continue; - } + } V_OUTPUT_VERBOSE(500, "vprotocol select: initializing %s component %s", component->pmlm_version.mca_type_name, component->pmlm_version.mca_component_name); - if(strcmp(component->pmlm_version.mca_component_name, + if(strcmp(component->pmlm_version.mca_component_name, mca_vprotocol_base_include_list)) { V_OUTPUT_VERBOSE(500, "This component is not in the include list: skipping %s", component->pmlm_version.mca_component_name); continue; @@ -77,37 +77,37 @@ int mca_vprotocol_base_select(bool enable_progress_threads, if (NULL == module) { V_OUTPUT_VERBOSE(2, "vprotocol select: init returned failure for component %s", component->pmlm_version.mca_component_name); continue; - } + } V_OUTPUT_VERBOSE(500, "vprotocol select: component %s init returned priority %d", component->pmlm_version.mca_component_name, priority); - if (priority > best_priority) + if (priority > best_priority) { best_priority = priority; best_component = component; best_module = module; } - + om = (opened_component_t *) malloc(sizeof(opened_component_t)); if (NULL == om) return OMPI_ERR_OUT_OF_RESOURCE; OBJ_CONSTRUCT(om, opal_list_item_t); om->om_component = component; opal_list_append(&opened, (opal_list_item_t*) om); } - + /* Finished querying all components. Check for the bozo case. */ if (NULL == best_component) { V_OUTPUT_VERBOSE(2, "vprotocol select: no protocol has returned a positive priority, fault tolerance is OFF"); - } - else + } + else { /* Save the winner */ mca_vprotocol_component = *best_component; mca_vprotocol = *best_module; } - + /* Finalize all non-selected components */ for (item = opal_list_remove_first(&opened); NULL != item; - item = opal_list_remove_first(&opened)) + item = opal_list_remove_first(&opened)) { om = (opened_component_t *) item; if (om->om_component != best_component) { @@ -123,17 +123,17 @@ int mca_vprotocol_base_select(bool enable_progress_threads, OBJ_DESTRUCT(om); free(om); } - - mca_base_components_close(mca_pml_v.output, - &ompi_vprotocol_base_framework.framework_components, + + mca_base_components_close(mca_pml_v.output, + &ompi_vprotocol_base_framework.framework_components, (mca_base_component_t *) best_component); - + /* All done */ - if(best_component != NULL) + if(best_component != NULL) { V_OUTPUT_VERBOSE(500, "vprotocol select: component %s selected", mca_vprotocol_component.pmlm_version.mca_component_name); return OMPI_SUCCESS; } - else + else return OMPI_ERR_NOT_FOUND; } diff --git a/ompi/mca/vprotocol/example/Makefile.am b/ompi/mca/vprotocol/example/Makefile.am index 792904559eb..fff5e295ef3 100644 --- a/ompi/mca/vprotocol/example/Makefile.am +++ b/ompi/mca/vprotocol/example/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2004-2007 The Trustees of the University of Tennessee. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -13,7 +13,7 @@ # (for static builds). if MCA_BUILD_ompi_vprotocol_example_DSO -component_noinst = +component_noinst = component_install = mca_vprotocol_example.la else component_noinst = libmca_vprotocol_example.la @@ -32,16 +32,16 @@ local_sources = \ vprotocol_example_send.c \ vprotocol_example_probe.c \ vprotocol_example_wait.h \ - vprotocol_example_wait.c + vprotocol_example_wait.c mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_vprotocol_example_la_SOURCES = $(local_sources) -mca_vprotocol_example_la_LIBADD = +mca_vprotocol_example_la_LIBADD = mca_vprotocol_example_la_CFLAGS = mca_vprotocol_example_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(component_noinst) libmca_vprotocol_example_la_SOURCES = $(local_sources) -libmca_vprotocol_example_la_LIBADD = +libmca_vprotocol_example_la_LIBADD = libmca_vprotocol_example_la_CFLAGS = libmca_vprotocol_example_la_LDFLAGS = -module -avoid-version diff --git a/ompi/mca/vprotocol/example/vprotocol_example.c b/ompi/mca/vprotocol/example/vprotocol_example.c index f672ef1e95a..54bc78a3508 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example.c +++ b/ompi/mca/vprotocol/example/vprotocol_example.c @@ -11,15 +11,15 @@ #include "ompi_config.h" #include "vprotocol_example.h" -mca_vprotocol_example_module_t mca_vprotocol_example = +mca_vprotocol_example_module_t mca_vprotocol_example = { - { + { /* mca_pml_base_module_add_procs_fn_t */ mca_vprotocol_example_add_procs, /* mca_pml_base_module_del_procs_fn_t */ mca_vprotocol_example_del_procs, /* mca_pml_base_module_enable_fn_t */ mca_vprotocol_example_enable, /* mca_pml_base_module_progress_fn_t */ mca_vprotocol_example_progress, - /* mca_pml_base_module_add_comm_fn_t */ mca_vprotocol_example_add_comm, + /* mca_pml_base_module_add_comm_fn_t */ mca_vprotocol_example_add_comm, /* mca_pml_base_module_del_comm_fn_t */ mca_vprotocol_example_del_comm, /* mca_pml_base_module_irecv_init_fn_t */ mca_vprotocol_example_irecv_init, /* mca_pml_base_module_irecv_fn_t */ mca_vprotocol_example_irecv, @@ -29,10 +29,10 @@ mca_vprotocol_example_module_t mca_vprotocol_example = /* mca_pml_base_module_send_fn_t */ mca_vprotocol_example_send, /* mca_pml_base_module_iprobe_fn_t */ mca_vprotocol_example_iprobe, /* mca_pml_base_module_probe_fn_t */ mca_vprotocol_example_probe, - /* mca_pml_base_module_start_fn_t */ mca_vprotocol_example_start, + /* mca_pml_base_module_start_fn_t */ mca_vprotocol_example_start, /* mca_pml_base_module_dump_fn_t */ mca_vprotocol_example_dump, - + /* opal_class_t * */ NULL, }, /** diff --git a/ompi/mca/vprotocol/example/vprotocol_example.h b/ompi/mca/vprotocol/example/vprotocol_example.h index 7b44a7212e6..98b119851a1 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example.h +++ b/ompi/mca/vprotocol/example/vprotocol_example.h @@ -34,11 +34,11 @@ OMPI_DECLSPEC int mca_vprotocol_example_progress(void); OMPI_DECLSPEC int mca_vprotocol_example_add_comm(struct ompi_communicator_t* comm); OMPI_DECLSPEC int mca_vprotocol_example_del_comm(struct ompi_communicator_t* comm); -OMPI_DECLSPEC int mca_vprotocol_example_irecv_init(void *buf, - size_t count, - struct ompi_datatype_t *datatype, +OMPI_DECLSPEC int mca_vprotocol_example_irecv_init(void *buf, + size_t count, + struct ompi_datatype_t *datatype, int src, - int tag, + int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request ); OMPI_DECLSPEC int mca_vprotocol_example_irecv(void *addr, diff --git a/ompi/mca/vprotocol/example/vprotocol_example_comm.c b/ompi/mca/vprotocol/example/vprotocol_example_comm.c index 647728913d7..bd14319e580 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example_comm.c +++ b/ompi/mca/vprotocol/example/vprotocol_example_comm.c @@ -7,7 +7,7 @@ * * $HEADER$ */ - + #include "../pml_v.h" #include "vprotocol_example.h" diff --git a/ompi/mca/vprotocol/example/vprotocol_example_component.c b/ompi/mca/vprotocol/example/vprotocol_example_component.c index 96caacea9ab..610171bb647 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example_component.c +++ b/ompi/mca/vprotocol/example/vprotocol_example_component.c @@ -29,7 +29,7 @@ static int mca_vprotocol_example_component_finalize(void); static int _priority; -mca_pml_v_protocol_base_component_2_0_0_t mca_vprotocol_example_component = +mca_pml_v_protocol_base_component_2_0_0_t mca_vprotocol_example_component = { /* First, the mca_base_component_t struct containing meta * information about the component itself */ @@ -53,7 +53,7 @@ mca_pml_v_protocol_base_component_2_0_0_t mca_vprotocol_example_component = /** MCA level functions */ - + int mca_vprotocol_example_component_open(void) { _priority = mca_param_register_int( "priority", -1); @@ -69,7 +69,7 @@ int mca_vprotocol_example_component_close(void) /** VPROTOCOL level functions (same as PML one) */ - + mca_pml_v_protocol_base_module_t *mca_vprotocol_example_component_init( int* priority, bool enable_progress_threads, bool enable_mpi_threads) @@ -78,28 +78,28 @@ mca_pml_v_protocol_base_module_t *mca_vprotocol_example_component_init( int* pri *priority = _priority; /** - * Some protocols requires sanity check about thread support (those making piecewise deterministic assumption) + * Some protocols requires sanity check about thread support (those making piecewise deterministic assumption) if(enable_mpi_threads) { OPAL_OUTPUT_VERBOSE( mca_pml_v_verbose, mca_pml_v_output, "vprotocol_example.init: threads are enabled, and not supported by vprotocol example fault tolerant layer, will not load")); return NULL; } */ - + /** * Insert your own protocol initialization here */ return &mca_vprotocol_example.super; } - + int mca_vprotocol_example_component_finalize(void) { V_OUTPUT_VERBOSE(10, "vprotocol_example_finalize"); - + /** * Insert your own garbage collecting here */ - + return OMPI_SUCCESS; } diff --git a/ompi/mca/vprotocol/example/vprotocol_example_probe.c b/ompi/mca/vprotocol/example/vprotocol_example_probe.c index 69ede2cfd5c..87b6de4caee 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example_probe.c +++ b/ompi/mca/vprotocol/example/vprotocol_example_probe.c @@ -19,11 +19,11 @@ int mca_vprotocol_example_probe( int src, int tag, V_OUTPUT_VERBOSE(50, "mca_vprotocol_example_probe(%d, %d, %d)", src, tag, comm->c_contextid); return mca_pml_v.host_pml.pml_probe(src, tag, comm, status); } - + int mca_vprotocol_example_iprobe( int src, int tag, struct ompi_communicator_t *comm, int *matched, ompi_status_public_t * status ) -{ +{ V_OUTPUT_VERBOSE(60, "mca_vprotocol_example_iprobe(%d, %d, %d)", src, tag, comm->c_contextid); return mca_pml_v.host_pml.pml_iprobe(src, tag, comm, matched, status); } diff --git a/ompi/mca/vprotocol/example/vprotocol_example_recv.c b/ompi/mca/vprotocol/example/vprotocol_example_recv.c index 0506ad5af0f..349e340270a 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example_recv.c +++ b/ompi/mca/vprotocol/example/vprotocol_example_recv.c @@ -15,22 +15,22 @@ #include "../pml_v.h" #include "vprotocol_example.h" -int mca_vprotocol_example_irecv_init(void *addr, - size_t count, - struct ompi_datatype_t *datatype, +int mca_vprotocol_example_irecv_init(void *addr, + size_t count, + struct ompi_datatype_t *datatype, int src, - int tag, + int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request ) { int ret; - + ret = mca_pml_v.host_pml.pml_irecv_init(addr, count, datatype, src, tag, comm, request); V_OUTPUT_VERBOSE(50, "posted\tirecv_init %ld\tcomm %d\tfrom %d\ttag %d\tsize %ld", ((mca_pml_base_request_t *)*request)->req_sequence, comm->c_contextid, src, tag, (long) count); return ret; } -int mca_vprotocol_example_irecv(void *addr, +int mca_vprotocol_example_irecv(void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -39,7 +39,7 @@ int mca_vprotocol_example_irecv(void *addr, struct ompi_request_t **request) { int ret; - + ret = mca_pml_v.host_pml.pml_irecv(addr, count, datatype, src, tag, comm, request); V_OUTPUT_VERBOSE(50, "posted\tirecv %ld\tcomm %d\tfrom %d\ttag %d\tsize %ld", ((mca_pml_base_request_t *)*request)->req_sequence, comm->c_contextid, src, tag, (long) count); return ret; @@ -54,12 +54,12 @@ int mca_vprotocol_example_recv(void *addr, ompi_status_public_t * status ) { int ret; - V_OUTPUT_VERBOSE(50, "posted\trecv \tcomm %d\tfrom %d\ttag %d\tsize %ld", comm->c_contextid, src, tag, (long) count); + V_OUTPUT_VERBOSE(50, "posted\trecv \tcomm %d\tfrom %d\ttag %d\tsize %ld", comm->c_contextid, src, tag, (long) count); ret = mca_pml_v.host_pml.pml_recv(addr, count, datatype, src, tag, comm, status); # ifdef OPAL_ENABLE_DEBUG if(status) V_OUTPUT_VERBOSE(75, "deliver\trecv \tcomm %d\tfrom %d(%d)\ttag %d(%d)\tsize %ld(%ld)\tstatus %d", comm->c_contextid, src, status->MPI_SOURCE, tag, status->MPI_TAG, (long) count, (long) status->_ucount, status->MPI_ERROR); - else + else V_OUTPUT_VERBOSE(75, "deliver\trecv \tcomm %d\tfrom %d\ttag %d\tsize %ld", comm->c_contextid, src, tag, (long) count); # endif return ret; diff --git a/ompi/mca/vprotocol/example/vprotocol_example_send.c b/ompi/mca/vprotocol/example/vprotocol_example_send.c index 22c769ddc78..28540e8bc58 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example_send.c +++ b/ompi/mca/vprotocol/example/vprotocol_example_send.c @@ -12,12 +12,12 @@ #include "../pml_v.h" #include "vprotocol_example.h" -int mca_vprotocol_example_isend_init(void *addr, - size_t count, - struct ompi_datatype_t *datatype, +int mca_vprotocol_example_isend_init(void *addr, + size_t count, + struct ompi_datatype_t *datatype, int dst, - int tag, - mca_pml_base_send_mode_t sendmode, + int tag, + mca_pml_base_send_mode_t sendmode, struct ompi_communicator_t* comm, struct ompi_request_t **request ) { @@ -25,12 +25,12 @@ int mca_vprotocol_example_isend_init(void *addr, return mca_pml_v.host_pml.pml_isend_init(addr, count, datatype, dst, tag, sendmode, comm, request); } -int mca_vprotocol_example_isend(void *addr, +int mca_vprotocol_example_isend(void *addr, size_t count, ompi_datatype_t * datatype, int dst, int tag, - mca_pml_base_send_mode_t sendmode, + mca_pml_base_send_mode_t sendmode, struct ompi_communicator_t *comm, struct ompi_request_t **request) { diff --git a/ompi/mca/vprotocol/example/vprotocol_example_start.c b/ompi/mca/vprotocol/example/vprotocol_example_start.c index 77c5c14229e..e9a6d25d2d5 100644 --- a/ompi/mca/vprotocol/example/vprotocol_example_start.c +++ b/ompi/mca/vprotocol/example/vprotocol_example_start.c @@ -13,7 +13,7 @@ #include "vprotocol_example_start.h" OMPI_DECLSPEC int mca_vprotocol_example_start(size_t count, ompi_request_t **requests) -{ +{ V_OUTPUT_VERBOSE(50, "starting %ld requests", (long) count); return mca_pml_v.host_pml.pml_start(count, requests); } diff --git a/ompi/mca/vprotocol/pessimist/Makefile.am b/ompi/mca/vprotocol/pessimist/Makefile.am index ec6e8d6e569..9a1305b1f06 100644 --- a/ompi/mca/vprotocol/pessimist/Makefile.am +++ b/ompi/mca/vprotocol/pessimist/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2004-2007 The Trustees of the University of Tennessee. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -38,7 +38,7 @@ local_sources = \ vprotocol_pessimist_sender_based.c if MCA_BUILD_ompi_vprotocol_pessimist_DSO -component_noinst = +component_noinst = component_install = mca_vprotocol_pessimist.la else component_noinst = libmca_vprotocol_pessimist.la diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.c index 55040f4e023..b3ba707c746 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.c @@ -10,9 +10,9 @@ #include "ompi_config.h" #include "vprotocol_pessimist.h" -mca_vprotocol_pessimist_module_t mca_vprotocol_pessimist = +mca_vprotocol_pessimist_module_t mca_vprotocol_pessimist = { - { + { /* mca_pml_base_module_add_procs_fn_t */ NULL, /* mca_pml_base_module_del_procs_fn_t */ NULL, /* mca_pml_base_module_enable_fn_f */ mca_vprotocol_pessimist_enable, @@ -31,7 +31,7 @@ mca_vprotocol_pessimist_module_t mca_vprotocol_pessimist = /* mca_pml_base_module_send_fn_t */ mca_vprotocol_pessimist_send, /* mca_pml_base_module_iprobe_fn_t */ mca_vprotocol_pessimist_iprobe, /* mca_pml_base_module_probe_fn_t */ mca_vprotocol_pessimist_probe, - /* mca_pml_base_module_start_fn_t */ mca_vprotocol_pessimist_start, + /* mca_pml_base_module_start_fn_t */ mca_vprotocol_pessimist_start, /* mca_pml_base_module_dump_fn_t */ mca_vprotocol_pessimist_dump, /* ompi_request_test_fn_t */ mca_vprotocol_pessimist_test, @@ -42,7 +42,7 @@ mca_vprotocol_pessimist_module_t mca_vprotocol_pessimist = /* ompi_request_waitany_fn_t */ mca_vprotocol_pessimist_wait_any, /* ompi_request_waitall_fn_t */ NULL, /* ompi_request_waitsome_fn_t */ mca_vprotocol_pessimist_wait_some, - + /* opal_class_t * */ OBJ_CLASS(mca_vprotocol_pessimist_recv_request_t), /* opal_class_t * */ OBJ_CLASS(mca_vprotocol_pessimist_send_request_t), }, diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h index 1d5e72bfd8c..d970fc5a72d 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h @@ -41,10 +41,10 @@ typedef struct mca_vprotocol_pessimist_module_t { /* space for allocating events */ opal_free_list_t events_pool; - + /* Sender Based repository */ vprotocol_pessimist_sender_based_t sender_based; - + /* replay mode variables */ bool replay; opal_list_t replay_events; diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_component.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_component.c index 8a226855c84..6b944574cb8 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_component.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_component.c @@ -31,7 +31,7 @@ static int _sender_based_size; static int _event_buffer_size; static char *_mmap_file_name; -mca_vprotocol_base_component_2_0_0_t mca_vprotocol_pessimist_component = +mca_vprotocol_base_component_2_0_0_t mca_vprotocol_pessimist_component = { /* First, the mca_base_component_t struct containing meta * information about the component itself */ @@ -114,7 +114,7 @@ static int mca_vprotocol_pessimist_component_close(void) static mca_vprotocol_base_module_t *mca_vprotocol_pessimist_component_init( int* priority, bool enable_progress_threads, bool enable_mpi_threads) -{ +{ V_OUTPUT_VERBOSE(500, "vprotocol_pessimist: component_init"); *priority = _priority; @@ -139,16 +139,16 @@ static mca_vprotocol_base_module_t *mca_vprotocol_pessimist_component_init( int* _free_list_max, _free_list_inc, NULL, 0, NULL, NULL, NULL); - mca_vprotocol_pessimist.event_buffer_max_length = + mca_vprotocol_pessimist.event_buffer_max_length = _event_buffer_size / sizeof(vprotocol_pessimist_mem_event_t); mca_vprotocol_pessimist.event_buffer_length = 0; - mca_vprotocol_pessimist.event_buffer = + mca_vprotocol_pessimist.event_buffer = (vprotocol_pessimist_mem_event_t *) malloc(_event_buffer_size); mca_vprotocol_pessimist.el_comm = MPI_COMM_NULL; - + return &mca_vprotocol_pessimist.super; } - + static int mca_vprotocol_pessimist_component_finalize(void) { V_OUTPUT_VERBOSE(500, "vprotocol_pessimist_finalize"); @@ -162,7 +162,7 @@ static int mca_vprotocol_pessimist_component_finalize(void) int mca_vprotocol_pessimist_enable(bool enable) { if(enable) { int ret; - if((ret = vprotocol_pessimist_sender_based_init(_mmap_file_name, + if((ret = vprotocol_pessimist_sender_based_init(_mmap_file_name, _sender_based_size)) != OMPI_SUCCESS) return ret; } diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_event.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_event.h index 830838e9637..748acf89e92 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_event.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_event.h @@ -20,7 +20,7 @@ BEGIN_C_DECLS -/* Make sure -Wformat is happy... */ +/* Make sure -Wformat is happy... */ typedef uint64_t vprotocol_pessimist_clock_t; #define PRIpclock PRIx64 diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c index 7ed2b5801b1..154312db329 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2011 The Trustees of the University of Tennessee. * All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,7 +27,7 @@ int vprotocol_pessimist_event_logger_connect(int el_rank, ompi_communicator_t ** char name[MPI_MAX_PORT_NAME]; int rank; vprotocol_pessimist_clock_t connect_info[2]; - + snprintf(name, MPI_MAX_PORT_NAME, VPROTOCOL_EVENT_LOGGER_NAME_FMT, el_rank); port = ompi_pubsub.lookup(name, MPI_INFO_NULL); if(NULL == port) @@ -35,7 +35,7 @@ int vprotocol_pessimist_event_logger_connect(int el_rank, ompi_communicator_t ** return OMPI_ERR_NOT_FOUND; } V_OUTPUT_VERBOSE(45, "Found port < %s >", port); - + /* separate the string into the HNP and RML URI and tag */ if (OMPI_SUCCESS != (rc = ompi_dpm.parse_port(port, &hnp_uri, &rml_uri, &el_tag))) { OMPI_ERROR_LOG(rc); @@ -54,8 +54,8 @@ int vprotocol_pessimist_event_logger_connect(int el_rank, ompi_communicator_t ** return rc; } free(rml_uri); free(hnp_uri); - - /* Send an rml message to tell the remote end to wake up and jump into + + /* Send an rml message to tell the remote end to wake up and jump into * connect/accept */ buffer = OBJ_NEW(opal_buffer_t); ompi_rte_send_buffer_nb(&el_proc, buffer, el_tag+1, NULL, NULL); @@ -64,23 +64,23 @@ int vprotocol_pessimist_event_logger_connect(int el_rank, ompi_communicator_t ** if(OMPI_SUCCESS != rc) { OMPI_ERROR_LOG(rc); } - + /* Send Rank, receive max buffer size and max_clock back */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); - rc = mca_pml_v.host_pml.pml_send(&rank, 1, MPI_INTEGER, 0, + rc = mca_pml_v.host_pml.pml_send(&rank, 1, MPI_INTEGER, 0, VPROTOCOL_PESSIMIST_EVENTLOG_NEW_CLIENT_CMD, - MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_STANDARD, mca_vprotocol_pessimist.el_comm); if(OPAL_UNLIKELY(MPI_SUCCESS != rc)) OMPI_ERRHANDLER_INVOKE(mca_vprotocol_pessimist.el_comm, rc, __FILE__ ": failed sending event logger handshake"); - rc = mca_pml_v.host_pml.pml_recv(&connect_info, 2, MPI_UNSIGNED_LONG_LONG, + rc = mca_pml_v.host_pml.pml_recv(&connect_info, 2, MPI_UNSIGNED_LONG_LONG, 0, VPROTOCOL_PESSIMIST_EVENTLOG_NEW_CLIENT_CMD, mca_vprotocol_pessimist.el_comm, MPI_STATUS_IGNORE); if(OPAL_UNLIKELY(MPI_SUCCESS != rc)) \ OMPI_ERRHANDLER_INVOKE(mca_vprotocol_pessimist.el_comm, rc, \ - __FILE__ ": failed receiving event logger handshake"); - + __FILE__ ": failed receiving event logger handshake"); + return rc; } @@ -102,21 +102,21 @@ void vprotocol_pessimist_matching_replay(int *src) { event = (mca_vprotocol_pessimist_event_t *) opal_list_get_next(event)) { vprotocol_pessimist_matching_event_t *mevent; - - if(VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING != event->type) continue; + + if(VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING != event->type) continue; mevent = &(event->u_event.e_matching); if(mevent->reqid == mca_vprotocol_pessimist.clock) { /* this is the event to replay */ V_OUTPUT_VERBOSE(70, "pessimist: replay\tmatch\t%"PRIpclock"\trecv is forced from %d", mevent->reqid, mevent->src); (*src) = mevent->src; - opal_list_remove_item(&mca_vprotocol_pessimist.replay_events, + opal_list_remove_item(&mca_vprotocol_pessimist.replay_events, (opal_list_item_t *) event); VPESSIMIST_EVENT_RETURN(event); - } + } #if OPAL_ENABLE_DEBUG - else if(mevent->reqid > max) - max = mevent->reqid; + else if(mevent->reqid > max) + max = mevent->reqid; } /* not forcing a ANY SOURCE event whose recieve clock is lower than max * is a bug indicating we have missed an event during logging ! */ @@ -127,7 +127,7 @@ void vprotocol_pessimist_matching_replay(int *src) { } void vprotocol_pessimist_delivery_replay(size_t n, ompi_request_t **reqs, - int *outcount, int *index, + int *outcount, int *index, ompi_status_public_t *status) { mca_vprotocol_pessimist_event_t *event; @@ -135,7 +135,7 @@ void vprotocol_pessimist_delivery_replay(size_t n, ompi_request_t **reqs, event != (mca_vprotocol_pessimist_event_t *) opal_list_get_end(&mca_vprotocol_pessimist.replay_events); event = (mca_vprotocol_pessimist_event_t *) opal_list_get_next(event)) { - vprotocol_pessimist_delivery_event_t *devent; + vprotocol_pessimist_delivery_event_t *devent; if(VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY != event->type) continue; devent = &(event->u_event.e_delivery); diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.h index eb5c2e1787d..af0631812b3 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.h @@ -32,7 +32,7 @@ int vprotocol_pessimist_event_logger_disconnect(ompi_communicator_t *el_comm); */ /** Adds a matching event for this request in the event list for any ANY_SOURCE - * recv. This event have to be updated later by + * recv. This event have to be updated later by * VPROTOCOL_PESSIMIST_MATCHING_LOG_FINALIZE * req (IN/OUT): posted RECV request (mca_pml_base_request_t *) * VPESSIMIST_REQ(req) is updated to keep track of the associated event @@ -111,17 +111,17 @@ static inline void vprotocol_pessimist_matching_log_finish(ompi_request_t *req) } while(0) -/* This function sends any pending event to the Event Logger. All available +/* This function sends any pending event to the Event Logger. All available * events are merged into a single message (if small enough). */ -static inline void vprotocol_pessimist_event_flush(void) +static inline void vprotocol_pessimist_event_flush(void) { if(OPAL_UNLIKELY(!opal_list_is_empty(&mca_vprotocol_pessimist.pending_events))) { mca_vprotocol_pessimist_event_t *event; mca_vprotocol_pessimist_event_t *prv_event; - - for(event = + + for(event = (mca_vprotocol_pessimist_event_t *) opal_list_get_first(&mca_vprotocol_pessimist.pending_events); event != @@ -152,7 +152,7 @@ static inline void vprotocol_pessimist_event_flush(void) mca_vprotocol_pessimist.event_buffer_max_length) __VPROTOCOL_PESSIMIST_SEND_BUFFER(); assert(mca_vprotocol_pessimist.event_buffer_length < mca_vprotocol_pessimist.event_buffer_max_length); - prv_event = (mca_vprotocol_pessimist_event_t *) + prv_event = (mca_vprotocol_pessimist_event_t *) opal_list_remove_item(&mca_vprotocol_pessimist.pending_events, (opal_list_item_t *) event); VPESSIMIST_EVENT_RETURN(event); @@ -163,44 +163,44 @@ static inline void vprotocol_pessimist_event_flush(void) } /** Replay matching order according to event list during recovery - * src (IN/OUT): the requested source. If it is ANY_SOURCE it is changed to - * the matched source at first run. - * comm (IN): the communicator's context id is used to know the next unique + * src (IN/OUT): the requested source. If it is ANY_SOURCE it is changed to + * the matched source at first run. + * comm (IN): the communicator's context id is used to know the next unique * request id that will be allocated by PML */ #define VPROTOCOL_PESSIMIST_MATCHING_REPLAY(src) do { \ if(mca_vprotocol_pessimist.replay && ((src) == MPI_ANY_SOURCE)) \ vprotocol_pessimist_matching_replay(&(src)); \ -} while(0) +} while(0) void vprotocol_pessimist_matching_replay(int *src); /******************************************************************************* - * WAIT/TEST-SOME/ANY & PROBES + * WAIT/TEST-SOME/ANY & PROBES */ /** Store the delivered request after a non deterministic delivery * req (IN): the delivered request (pml_base_request_t *) - */ + */ static inline void vprotocol_pessimist_delivery_log(ompi_request_t *req) { mca_vprotocol_pessimist_event_t *event; vprotocol_pessimist_delivery_event_t *devent; - + if(req == NULL) - { + { /* No request delivered to this probe, we need to count howmany times */ V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tdeliver\t%"PRIpclock"\tnone", mca_vprotocol_pessimist.clock); event = (mca_vprotocol_pessimist_event_t*) opal_list_get_last(&mca_vprotocol_pessimist.pending_events); if(event->type == VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY && event->u_event.e_delivery.reqid == 0) - { + { /* consecutive probes not delivering anything are merged */ event->u_event.e_delivery.probeid = mca_vprotocol_pessimist.clock++; } else - { - /* Previous event is not a failed probe, lets create a new + { + /* Previous event is not a failed probe, lets create a new "failed probe" event (reqid=0) then */ VPESSIMIST_DELIVERY_EVENT_NEW(event); devent = &(event->u_event.e_delivery); @@ -211,7 +211,7 @@ static inline void vprotocol_pessimist_delivery_log(ompi_request_t *req) } } else - { + { /* A request have been delivered, log which one it is */ V_OUTPUT_VERBOSE(70, "pessimist:\tlog\tdeliver\t%"PRIpclock"\treq %"PRIpclock, mca_vprotocol_pessimist.clock, VPESSIMIST_FTREQ(req)->reqid); VPESSIMIST_DELIVERY_EVENT_NEW(event); @@ -228,7 +228,7 @@ static inline void vprotocol_pessimist_delivery_log(ompi_request_t *req) * n (IN): the number of input requests * reqs (IN): the set of considered requests (pml_base_request_t *) * outcount (OUT): number of delivered requests - * i (OUT): index(es) of the delivered request + * i (OUT): index(es) of the delivered request * status (OUT): status of the delivered request */ #define VPROTOCOL_PESSIMIST_DELIVERY_REPLAY(n, reqs, outcount, i, status) do {\ diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog_protocol.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog_protocol.h index 96999901129..34ff5efd372 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog_protocol.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog_protocol.h @@ -22,7 +22,7 @@ typedef enum { VPROTOCOL_PESSIMIST_EVENTLOG_CLOSE_SERVER_CMD, VPROTOCOL_PESSIMIST_EVENTLOG_SAVE_SERVER_CMD, VPROTOCOL_PESSIMIST_EVENTLOG_LOAD_SERVER_CMD, - + VPROTOCOL_PESSIMIST_EVENTLOG_NEW_CLIENT_CMD, VPROTOCOL_PESSIMIST_EVENTLOG_QUIT_CLIENT_CMD, diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_probe.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_probe.c index 40c19b6b359..f9bd38b6d8f 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_probe.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_probe.c @@ -23,16 +23,16 @@ static inline int replay_probe(int src, int tag, static inline void log_probe(int ret, int src, int tag, struct ompi_communicator_t *comm, ompi_status_public_t * status); - + /******************************************************************************* * MPI level functions */ int mca_vprotocol_pessimist_iprobe( int src, int tag, struct ompi_communicator_t *comm, int *matched, ompi_status_public_t * status ) -{ +{ int ret; - + if(mca_vprotocol_pessimist.replay) { ret = replay_iprobe(src, tag, comm, matched, status); @@ -50,7 +50,7 @@ int mca_vprotocol_pessimist_probe( int src, int tag, ompi_status_public_t * status ) { int ret; - + if(mca_vprotocol_pessimist.replay) { ret = replay_probe(src, tag, comm, status); @@ -72,7 +72,7 @@ static inline int replay_iprobe(int src, int tag, { return OMPI_ERROR; } - + static inline void log_iprobe(int ret, int src, int tag, struct ompi_communicator_t *comm, int *matched, ompi_status_public_t * status) diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_proc.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_proc.c index e8344133cb9..1b7b9d90499 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_proc.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_proc.c @@ -13,7 +13,7 @@ int mca_vprotocol_pessimist_add_procs(struct ompi_proc_t **procs, size_t nprocs) { - /* TODO: for each proc, retrieve post send of sender based request, post recieve of list + /* TODO: for each proc, retrieve post send of sender based request, post recieve of list block any other communications until we are up. To be determined how i manage to send (or resend) data to failed nodes */ return mca_pml_v.host_pml.pml_add_procs(procs, nprocs); diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_progress.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_progress.c index 256edd20126..3b993ce61dc 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_progress.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_progress.c @@ -17,7 +17,7 @@ int mca_vprotocol_pessimist_progress(void) { int ret; - + printf("PROGRESS\n"); /* First let the real progress take place */ ret = mca_pml_v.host_pml.pml_progress(); diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.c index 5c4b90104fc..7408157e63d 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.c @@ -15,16 +15,16 @@ static void vprotocol_pessimist_request_construct(mca_pml_base_request_t *req); -OBJ_CLASS_INSTANCE(mca_vprotocol_pessimist_recv_request_t, mca_pml_base_request_t, +OBJ_CLASS_INSTANCE(mca_vprotocol_pessimist_recv_request_t, mca_pml_base_request_t, vprotocol_pessimist_request_construct, NULL); -OBJ_CLASS_INSTANCE(mca_vprotocol_pessimist_send_request_t, mca_pml_base_request_t, +OBJ_CLASS_INSTANCE(mca_vprotocol_pessimist_send_request_t, mca_pml_base_request_t, vprotocol_pessimist_request_construct, NULL); static void vprotocol_pessimist_request_construct(mca_pml_base_request_t *req) { mca_vprotocol_pessimist_request_t *ftreq; - + ftreq = VPESSIMIST_FTREQ(req); V_OUTPUT_VERBOSE(250, "pessimist:\treq\tnew\treq=%p\tPreq=%p (aligned to %p)", (void *) req, (void *) ftreq, (void *) &ftreq->pml_req_free); req->req_ompi.req_status.MPI_SOURCE = -1; /* no matching made flag */ @@ -38,7 +38,7 @@ static void vprotocol_pessimist_request_construct(mca_pml_base_request_t *req) int mca_vprotocol_pessimist_request_free(ompi_request_t **req) { - mca_pml_base_request_t *pmlreq = (mca_pml_base_request_t *) *req; + mca_pml_base_request_t *pmlreq = (mca_pml_base_request_t *) *req; V_OUTPUT_VERBOSE(50, "pessimist:\treq\tfree\t%"PRIpclock"\tpeer %d\ttag %d\tsize %lu", VPESSIMIST_FTREQ(pmlreq)->reqid, pmlreq->req_peer, pmlreq->req_tag, (unsigned long) pmlreq->req_count); vprotocol_pessimist_matching_log_finish(*req); pmlreq->req_ompi.req_status.MPI_SOURCE = -1; /* no matching made flag */ diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.h index 27f6781bdc9..23f5e7ab903 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_request.h @@ -38,10 +38,10 @@ OBJ_CLASS_DECLARATION(mca_vprotocol_pessimist_send_request_t); #define VPESSIMIST_RECV_FTREQ(req) \ ((mca_vprotocol_pessimist_recv_request_t *) VPROTOCOL_RECV_FTREQ(req)) - + #define VPESSIMIST_SEND_FTREQ(req) \ ((mca_vprotocol_pessimist_send_request_t *) VPROTOCOL_SEND_FTREQ(req)) - + #define VPESSIMIST_FTREQ_INIT(req) do { \ VPESSIMIST_FTREQ(req)->reqid = mca_vprotocol_pessimist.clock++; \ } while(0) diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c index ddcc1503ca7..424e6e4d3fa 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c @@ -22,12 +22,12 @@ int mca_vprotocol_pessimist_isend(void *buf, ompi_request_t** request ) { int ret; - + V_OUTPUT_VERBOSE(50, "pessimist:\tisend\tposted\t%"PRIpclock"\tto %d\ttag %d\tsize %lu", mca_vprotocol_pessimist.clock, dst, tag, (unsigned long) count); vprotocol_pessimist_event_flush(); - ret = mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode, + ret = mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode, comm, request); VPESSIMIST_FTREQ_INIT(*request); vprotocol_pessimist_sender_based_copy_start(*request); @@ -45,11 +45,11 @@ int mca_vprotocol_pessimist_send(void *buf, ompi_request_t *request = MPI_REQUEST_NULL; int rc; - V_OUTPUT_VERBOSE(50, "pessimist:\tsend\tposted\t%"PRIpclock"\tto %d\ttag %d\tsize %lu", + V_OUTPUT_VERBOSE(50, "pessimist:\tsend\tposted\t%"PRIpclock"\tto %d\ttag %d\tsize %lu", mca_vprotocol_pessimist.clock, dst, tag, (unsigned long) count); vprotocol_pessimist_event_flush(); - mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode, + mca_pml_v.host_pml.pml_isend(buf, count, datatype, dst, tag, sendmode, comm, &request); VPESSIMIST_FTREQ_INIT(request); vprotocol_pessimist_sender_based_copy_start(request); diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c index 747e70927fb..f9d5772c8f0 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.c @@ -29,7 +29,7 @@ static int sb_mmap_file_open(const char *path) sb.sb_fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600); if(-1 == sb.sb_fd) { - V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_init: open (%s): %s", + V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_init: open (%s): %s", path, strerror(errno)); return OPAL_ERR_FILE_OPEN_FAILURE; } @@ -40,10 +40,10 @@ static void sb_mmap_file_close(void) { int ret = close(sb.sb_fd); if(-1 == ret) - V_OUTPUT_ERR("pml_v: protocol_pessimist: sender_based_finalize: close (%d): %s", + V_OUTPUT_ERR("pml_v: protocol_pessimist: sender_based_finalize: close (%d): %s", sb.sb_fd, strerror(errno)); } - + static void sb_mmap_alloc(void) { #ifndef MAP_NOCACHE @@ -51,18 +51,18 @@ static void sb_mmap_alloc(void) #endif if(-1 == ftruncate(sb.sb_fd, sb.sb_offset + sb.sb_length)) { - V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: ftruncate: %s", + V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: ftruncate: %s", strerror(errno)); close(sb.sb_fd); ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE); } - sb.sb_addr = (uintptr_t) mmap((void *) sb.sb_addr, sb.sb_length, - PROT_WRITE | PROT_READ, - MAP_PRIVATE | MAP_NOCACHE, sb.sb_fd, + sb.sb_addr = (uintptr_t) mmap((void *) sb.sb_addr, sb.sb_length, + PROT_WRITE | PROT_READ, + MAP_PRIVATE | MAP_NOCACHE, sb.sb_fd, sb.sb_offset); if(((uintptr_t) -1) == sb.sb_addr) { - V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: mmap: %s", + V_OUTPUT_ERR("pml_v: vprotocol_pessimist: sender_based_alloc: mmap: %s", strerror(errno)); close(sb.sb_fd); ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE); @@ -73,17 +73,17 @@ static void sb_mmap_free(void) { int ret = munmap((void *) sb.sb_addr, sb.sb_length); if(-1 == ret) - V_OUTPUT_ERR("pml_v: protocol_pessimsit: sender_based_finalize: munmap (%p): %s", + V_OUTPUT_ERR("pml_v: protocol_pessimsit: sender_based_finalize: munmap (%p): %s", (void *) sb.sb_addr, strerror(errno)); } -int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size) +int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size) { char *path; #ifdef SB_USE_CONVERTOR_METHOD mca_pml_base_send_request_t pml_req; - sb.sb_conv_to_pessimist_offset = (uintptr_t) VPROTOCOL_SEND_REQ(NULL) - - ((uintptr_t) &pml_req.req_base.req_convertor - + sb.sb_conv_to_pessimist_offset = (uintptr_t) VPROTOCOL_SEND_REQ(NULL) - + ((uintptr_t) &pml_req.req_base.req_convertor - (uintptr_t) &pml_req); V_OUTPUT_VERBOSE(500, "pessimist: conv_to_pessimist_offset: %p", (void *) sb.sb_conv_to_pessimist_offset); #endif @@ -95,11 +95,11 @@ int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size) #ifdef SB_USE_PROGRESS_METHOD OBJ_CONSTRUCT(&sb.sb_sendreq, opal_list_t); #endif - - asprintf(&path, "%s"OPAL_PATH_SEP"%s", ompi_process_info.proc_session_dir, + + asprintf(&path, "%s"OPAL_PATH_SEP"%s", ompi_process_info.proc_session_dir, mmapfile); if(OPAL_SUCCESS != sb_mmap_file_open(path)) - return OPAL_ERR_FILE_OPEN_FAILURE; + return OPAL_ERR_FILE_OPEN_FAILURE; free(path); return OMPI_SUCCESS; } @@ -112,7 +112,7 @@ void vprotocol_pessimist_sender_based_finalize(void) } -/** Manage mmap floating window, allocating enough memory for the message to be +/** Manage mmap floating window, allocating enough memory for the message to be * asynchronously copied to disk. */ void vprotocol_pessimist_sender_based_alloc(size_t len) @@ -123,11 +123,11 @@ void vprotocol_pessimist_sender_based_alloc(size_t len) else ompi_comm_dup(MPI_COMM_SELF, &sb.sb_comm, 1); #endif - + /* Take care of alignement of sb_offset */ sb.sb_offset += sb.sb_cursor - sb.sb_addr; sb.sb_cursor = sb.sb_offset % sb.sb_pagesize; - sb.sb_offset -= sb.sb_cursor; + sb.sb_offset -= sb.sb_cursor; /* Adjusting sb_length for the largest application message to fit */ len += sb.sb_cursor + sizeof(vprotocol_pessimist_sender_based_header_t); @@ -137,10 +137,10 @@ void vprotocol_pessimist_sender_based_alloc(size_t len) sb.sb_available = sb.sb_length - sb.sb_cursor; sb_mmap_alloc(); - + sb.sb_cursor += sb.sb_addr; /* set absolute addr of sender_based buffer */ V_OUTPUT_VERBOSE(30, "pessimist:\tsb\tgrow\toffset %llu\tlength %llu\tbase %p\tcursor %p", (unsigned long long) sb.sb_offset, (unsigned long long) sb.sb_length, (void *) sb.sb_addr, (void *) sb.sb_cursor); -} +} #undef sb @@ -153,7 +153,7 @@ int32_t vprotocol_pessimist_sender_based_convertor_advance(opal_convertor_t* pCo unsigned int i; size_t pending_length; mca_vprotocol_pessimist_send_request_t *ftreq; - + ftreq = VPESSIMIST_CONV_REQ(pConvertor); pConvertor->flags = ftreq->sb.conv_flags; pConvertor->fAdvance = ftreq->sb.conv_advance; diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.h index c1a21c9ca7d..b639b47b394 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based.h @@ -20,7 +20,7 @@ BEGIN_C_DECLS -/** Prepare for using the sender based storage +/** Prepare for using the sender based storage */ int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size); @@ -28,7 +28,7 @@ int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size); */ void vprotocol_pessimist_sender_based_finalize(void); -/** Manage mmap floating window, allocating enough memory for the message to be +/** Manage mmap floating window, allocating enough memory for the message to be * asynchronously copied to disk. */ void vprotocol_pessimist_sender_based_alloc(size_t len); @@ -92,7 +92,7 @@ int32_t vprotocol_pessimist_sender_based_convertor_advance(opal_convertor_t*, * progress method */ #elif defined(SB_USE_PROGRESS_METHOD) -static inline void __SENDER_BASED_METHOD_COPY(mca_pml_base_send_request_t *req) +static inline void __SENDER_BASED_METHOD_COPY(mca_pml_base_send_request_t *req) { if(req->req_bytes_packed) { @@ -103,12 +103,12 @@ static inline void __SENDER_BASED_METHOD_COPY(mca_pml_base_send_request_t *req) } } -static inline int vprotocol_pessimist_sb_progress_req(mca_pml_base_send_request_t *req) +static inline int vprotocol_pessimist_sb_progress_req(mca_pml_base_send_request_t *req) { mca_vprotocol_pessimist_request_t *ftreq = VPESSIMIST_SEND_FTREQ(req); size_t max_data = 0; - - if(ftreq->sb.bytes_progressed < req->req_bytes_packed) + + if(ftreq->sb.bytes_progressed < req->req_bytes_packed) { opal_convertor_t conv; unsigned int iov_count = 1; @@ -117,11 +117,11 @@ static inline int vprotocol_pessimist_sb_progress_req(mca_pml_base_send_request_ max_data = req->req_bytes_packed - ftreq->sb.bytes_progressed; iov.iov_len = max_data; iov.iov_base = (IOVBASE_TYPE *) (ftreq->sb.cursor + position); - + V_OUTPUT_VERBOSE(80, "pessimist:\tsb\tprgress\t%"PRIpclock"\tsize %lu from position %lu", ftreq->reqid, max_data, position); opal_convertor_clone_with_position(&req->req_base.req_convertor, &conv, 0, &position ); - opal_convertor_pack(&conv, &iov, &iov_count, &max_data); + opal_convertor_pack(&conv, &iov, &iov_count, &max_data); ftreq->sb.bytes_progressed += max_data; } return max_data; @@ -130,15 +130,15 @@ static inline int vprotocol_pessimist_sb_progress_req(mca_pml_base_send_request_ static inline int vprotocol_pessimist_sb_progress_all_reqs(void) { int ret = 0; - + /* progress any waiting Sender Based copy */ if(!opal_list_is_empty(&mca_vprotocol_pessimist.sender_based.sb_sendreq)) { - mca_vprotocol_pessimist_request_t *ftreq = (mca_vprotocol_pessimist_request_t *) + mca_vprotocol_pessimist_request_t *ftreq = (mca_vprotocol_pessimist_request_t *) opal_list_remove_first(&mca_vprotocol_pessimist.sender_based.sb_sendreq); if(vprotocol_pessimist_sb_progress_req(VPROTOCOL_SEND_REQ(ftreq))) ret = 1; - opal_list_append(&mca_vprotocol_pessimist.sender_based.sb_sendreq, + opal_list_append(&mca_vprotocol_pessimist.sender_based.sb_sendreq, &ftreq->list_item); } return ret; @@ -163,7 +163,7 @@ static inline void __SENDER_BASED_METHOD_FLUSH(ompi_request_t *req) #endif /* SB_USE_*_METHOD */ -/** Copy data associated to a pml_base_send_request_t to the sender based +/** Copy data associated to a pml_base_send_request_t to the sender based * message payload buffer */ static inline void vprotocol_pessimist_sender_based_copy_start(ompi_request_t *req) @@ -171,24 +171,24 @@ static inline void vprotocol_pessimist_sender_based_copy_start(ompi_request_t *r vprotocol_pessimist_sender_based_header_t *sbhdr; mca_vprotocol_pessimist_request_t *ftreq = VPESSIMIST_SEND_FTREQ(req); mca_pml_base_send_request_t *pmlreq = (mca_pml_base_send_request_t *) req; - + /* Allocate enough sender-based space to hold the message */ - if(mca_vprotocol_pessimist.sender_based.sb_available < - pmlreq->req_bytes_packed + + if(mca_vprotocol_pessimist.sender_based.sb_available < + pmlreq->req_bytes_packed + sizeof(vprotocol_pessimist_sender_based_header_t)) { vprotocol_pessimist_sender_based_alloc(pmlreq->req_bytes_packed); } - + /* Copy message header to the sender-based space */ /* /!\ This is NOT thread safe */ ftreq->sb.cursor = mca_vprotocol_pessimist.sender_based.sb_cursor; #if 1 mca_vprotocol_pessimist.sender_based.sb_cursor += - sizeof(vprotocol_pessimist_sender_based_header_t) + + sizeof(vprotocol_pessimist_sender_based_header_t) + pmlreq->req_bytes_packed; - mca_vprotocol_pessimist.sender_based.sb_available -= - sizeof(vprotocol_pessimist_sender_based_header_t) + + mca_vprotocol_pessimist.sender_based.sb_available -= + sizeof(vprotocol_pessimist_sender_based_header_t) + pmlreq->req_bytes_packed; #endif sbhdr = (vprotocol_pessimist_sender_based_header_t *) ftreq->sb.cursor; @@ -199,13 +199,13 @@ static inline void vprotocol_pessimist_sender_based_copy_start(ompi_request_t *r sbhdr->sequence = pmlreq->req_base.req_sequence; ftreq->sb.cursor += sizeof(vprotocol_pessimist_sender_based_header_t); V_OUTPUT_VERBOSE(70, "pessimist:\tsb\tsend\t%"PRIpclock"\tsize %lu (+%lu header)", VPESSIMIST_FTREQ(req)->reqid, (long unsigned)pmlreq->req_bytes_packed, (long unsigned)sizeof(vprotocol_pessimist_sender_based_header_t)); - + /* Use one of the previous data copy method */ __SENDER_BASED_METHOD_COPY(pmlreq); } /** Ensure sender based is finished before allowing user to touch send buffer - */ + */ #define vprotocol_pessimist_sender_based_flush(REQ) __SENDER_BASED_METHOD_FLUSH(REQ) END_C_DECLS diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based_types.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based_types.h index 465c3ddd8b5..c00dfff70e3 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based_types.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_sender_based_types.h @@ -16,26 +16,26 @@ BEGIN_C_DECLS -/* There is several different ways of packing the data to the sender-based - * buffer. Just pick one. +/* There is several different ways of packing the data to the sender-based + * buffer. Just pick one. */ -#define SB_USE_PACK_METHOD +#define SB_USE_PACK_METHOD #undef SB_USE_PROGRESS_METHOD #undef SB_USE_CONVERTOR_METHOD -typedef struct vprotocol_pessimist_sender_based_t +typedef struct vprotocol_pessimist_sender_based_t { int sb_pagesize; /* size of memory pages on this architecture */ #ifdef SB_USE_CONVERTOR_METHOD uintptr_t sb_conv_to_pessimist_offset; /* end of request from req_conv */ #endif - int sb_fd; /* file descriptor of mapped file */ + int sb_fd; /* file descriptor of mapped file */ off_t sb_offset; /* offset in mmaped file */ uintptr_t sb_addr; /* base address of mmaped segment */ size_t sb_length; /* length of mmaped segment */ uintptr_t sb_cursor; /* current pointer to writeable memory */ size_t sb_available; /* available space before end of segment */ - + #ifdef SB_USE_PROGRESS_METHOD opal_list_t sb_sendreq; /* requests that needs to be progressed */ #endif @@ -44,13 +44,13 @@ typedef struct vprotocol_pessimist_sender_based_t typedef struct vprotocol_pessimist_sender_based_header_t { size_t size; - int dst; + int dst; int tag; uint32_t contextid; vprotocol_pessimist_clock_t sequence; } vprotocol_pessimist_sender_based_header_t; -typedef struct vprotocol_pessimist_sender_based_request_t +typedef struct vprotocol_pessimist_sender_based_request_t { uintptr_t cursor; size_t bytes_progressed; diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_start.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_start.c index aede724c2cc..504c2eab3c7 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_start.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_start.c @@ -12,7 +12,7 @@ #include "vprotocol_pessimist.h" OMPI_DECLSPEC int mca_vprotocol_pessimist_start(size_t count, ompi_request_t **requests) -{ +{ int ret; size_t i; @@ -20,7 +20,7 @@ OMPI_DECLSPEC int mca_vprotocol_pessimist_start(size_t count, ompi_request_t **r { mca_pml_base_request_t *pml_request = (mca_pml_base_request_t *) requests[i]; if(NULL == pml_request) continue; - + switch(pml_request->req_type) { case MCA_PML_REQUEST_RECV : @@ -28,20 +28,20 @@ OMPI_DECLSPEC int mca_vprotocol_pessimist_start(size_t count, ompi_request_t **r /* It's a persistent recv request, first, see if we have to enforce matching order */ VPROTOCOL_PESSIMIST_MATCHING_REPLAY(pml_request->req_peer); break; - + case MCA_PML_REQUEST_SEND : V_OUTPUT_VERBOSE(50, "pessimist:\tstart\tsend\t%"PRIpclock"\tto %d\ttag %d\tsize %lu", mca_vprotocol_pessimist.clock, pml_request->req_peer, pml_request->req_tag, (long) pml_request->req_count); - /* It's a persistent send request, first, check if we are waiting ack - * for some older events */ + /* It's a persistent send request, first, check if we are waiting ack + * for some older events */ break; - + default: V_OUTPUT_VERBOSE(50, "pessimist:\tstart\twrong %d\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu", pml_request->req_type, mca_vprotocol_pessimist.clock, pml_request->req_peer, pml_request->req_tag, (long) pml_request->req_count); return OMPI_ERR_REQUEST; } } ret = mca_pml_v.host_pml.pml_start(count, requests); - + /* restore requests status */ return ret; } diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.c index f446af4699d..7dce3f92375 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.c @@ -29,13 +29,13 @@ static int vprotocol_pessimist_request_no_free(ompi_request_t **req) { int mca_vprotocol_pessimist_test(ompi_request_t ** rptr, int *completed, - ompi_status_public_t * status) + ompi_status_public_t * status) { int ret; int index; - + VPROTOCOL_PESSIMIST_DELIVERY_REPLAY(1, rptr, completed, &index, status); - + ret = mca_pml_v.host_request_fns.req_test(rptr, completed, status); if(completed) vprotocol_pessimist_delivery_log(*rptr); @@ -45,7 +45,7 @@ int mca_vprotocol_pessimist_test(ompi_request_t ** rptr, int *completed, } int mca_vprotocol_pessimist_test_all(size_t count, ompi_request_t ** requests, - int *completed, + int *completed, ompi_status_public_t * statuses) { int ret; @@ -53,8 +53,8 @@ int mca_vprotocol_pessimist_test_all(size_t count, ompi_request_t ** requests, /* /!\ this is not correct until I upgrade DELIVERY_REPLAY to manage several requests at once */ VPROTOCOL_PESSIMIST_DELIVERY_REPLAY(1, requests, completed, &index, statuses); - - ret = mca_pml_v.host_request_fns.req_test_all(count, requests, completed, + + ret = mca_pml_v.host_request_fns.req_test_all(count, requests, completed, statuses); #if 0 /* This is not correct :/ */ @@ -75,11 +75,11 @@ int mca_vprotocol_pessimist_test_any(size_t count, ompi_request_t ** requests, { int ret; size_t i; - + VPROTOCOL_PESSIMIST_DELIVERY_REPLAY(count, requests, completed, index, status); - + PREPARE_REQUESTS_WITH_NO_FREE(count, requests); - + /* Call the real one to do the job */ ret = mca_pml_v.host_request_fns.req_test_any(count, requests, index, completed, status); @@ -118,20 +118,20 @@ int mca_vprotocol_pessimist_wait_any(size_t count, ompi_request_t ** requests, int ret; size_t i; int dummy; - + VPROTOCOL_PESSIMIST_DELIVERY_REPLAY(count, requests, &dummy, index, status); - + PREPARE_REQUESTS_WITH_NO_FREE(count, requests); - + /* Call the real one to do the job */ ret = mca_pml_v.host_request_fns.req_wait_any(count, requests, index, status); - + /* Parse the result */ for(i = 0; i < count; i++) { ompi_request_t *req = requests[i]; if(req == MPI_REQUEST_NULL) continue; - + /* Restore requests and store they've been delivered */ req->req_free = mca_vprotocol_pessimist_request_free; if(i == (size_t) *index) @@ -161,10 +161,10 @@ int mca_vprotocol_pessimist_test_some(size_t count, ompi_request_t ** requests, } int mca_vprotocol_pessimist_wait_some(size_t count, ompi_request_t ** requests, - int *outcount, int *indexes, + int *outcount, int *indexes, ompi_status_public_t * statuses) { - int ret; + int ret; ret = mca_vprotocol_pessimist_wait_any(count, requests, indexes, statuses); if(MPI_UNDEFINED == *indexes) *outcount = 0; else *outcount = 1; diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.h index 28a00203df6..c6ba2fd89c4 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_wait.h @@ -23,7 +23,7 @@ int mca_vprotocol_pessimist_test(ompi_request_t ** rptr, int *completed, ompi_status_public_t * status); int mca_vprotocol_pessimist_test_all(size_t count, ompi_request_t ** requests, - int *completed, + int *completed, ompi_status_public_t * statuses); int mca_vprotocol_pessimist_test_any(size_t count, ompi_request_t ** requests, @@ -34,11 +34,11 @@ int mca_vprotocol_pessimist_test_some(size_t count, ompi_request_t ** requests, int * outcount, int * indices, ompi_status_public_t * statuses); -int mca_vprotocol_pessimist_wait_any(size_t count, ompi_request_t ** requests, +int mca_vprotocol_pessimist_wait_any(size_t count, ompi_request_t ** requests, int *index, ompi_status_public_t * status); -int mca_vprotocol_pessimist_wait_some(size_t count, ompi_request_t ** requests, - int *outcount, int *indexes, +int mca_vprotocol_pessimist_wait_some(size_t count, ompi_request_t ** requests, + int *outcount, int *indexes, ompi_status_public_t * statuses); END_C_DECLS diff --git a/ompi/mca/vprotocol/vprotocol.h b/ompi/mca/vprotocol/vprotocol.h index f4a33b5ff1e..ff87be2a81f 100644 --- a/ompi/mca/vprotocol/vprotocol.h +++ b/ompi/mca/vprotocol/vprotocol.h @@ -13,14 +13,14 @@ #define __INCLUDE_VPROTOCOL_H_ #include "ompi_config.h" -#include "ompi/mca/mca.h" +#include "ompi/mca/mca.h" #include "ompi/mca/pml/pml.h" #include "ompi/request/request.h" BEGIN_C_DECLS - + /* PML_V->PROTOCOL Called by MCA_PML_V framework to initialize the component. - * + * * @param priority (OUT) Relative priority or ranking used by MCA to * select a component. * @@ -32,8 +32,8 @@ BEGIN_C_DECLS * indicates whether multiple threads may invoke this component * simultaneously or not. */ -typedef struct mca_vprotocol_base_module_2_0_0_t * - (*mca_vprotocol_base_component_init_fn_t)(int *priority, +typedef struct mca_vprotocol_base_module_2_0_0_t * + (*mca_vprotocol_base_component_init_fn_t)(int *priority, bool enable_progress_threads, bool enable_mpi_threads); @@ -56,7 +56,7 @@ typedef mca_vprotocol_base_component_2_0_0_t mca_vprotocol_base_component_t; */ typedef struct mca_vprotocol_base_module_2_0_0_t { - /* PML module stuff */ + /* PML module stuff */ mca_pml_base_module_add_procs_fn_t add_procs; mca_pml_base_module_del_procs_fn_t del_procs; mca_pml_base_module_enable_fn_t enable; @@ -82,7 +82,7 @@ typedef struct mca_vprotocol_base_module_2_0_0_t ompi_request_wait_any_fn_t wait_any; ompi_request_wait_all_fn_t wait_all; ompi_request_wait_some_fn_t wait_some; - + /* Custom requests classes to add extra data at end of pml requests */ opal_class_t * req_recv_class; opal_class_t * req_send_class; diff --git a/ompi/message/Makefile.am b/ompi/message/Makefile.am index 4eaa7b5b53d..f1d12959ff9 100644 --- a/ompi/message/Makefile.am +++ b/ompi/message/Makefile.am @@ -6,15 +6,15 @@ # 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, +# 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 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/message/message.c b/ompi/message/message.c index 86b76a46889..deb0a4697f9 100644 --- a/ompi/message/message.c +++ b/ompi/message/message.c @@ -7,9 +7,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,12 +56,12 @@ ompi_message_init(void) ompi_message_null.message.req_ptr = NULL; ompi_message_null.message.count = 0; - ompi_message_null.message.m_f_to_c_index = + ompi_message_null.message.m_f_to_c_index = opal_pointer_array_add(&ompi_message_f_to_c_table, &ompi_message_null); OBJ_CONSTRUCT(&ompi_message_no_proc, ompi_message_t); ompi_message_no_proc.message.m_f_to_c_index = - opal_pointer_array_add(&ompi_message_f_to_c_table, + opal_pointer_array_add(&ompi_message_f_to_c_table, &ompi_message_no_proc); if (1 != ompi_message_no_proc.message.m_f_to_c_index) { return OMPI_ERR_NOT_FOUND; diff --git a/ompi/message/message.h b/ompi/message/message.h index f4de252fab9..60778ebed1a 100644 --- a/ompi/message/message.h +++ b/ompi/message/message.h @@ -5,9 +5,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/Makefile.am b/ompi/mpi/Makefile.am index 87e9af8e993..60940b6e7f2 100644 --- a/ompi/mpi/Makefile.am +++ b/ompi/mpi/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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) 2006-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/c/Makefile.am b/ompi/mpi/c/Makefile.am index 335096f6ed7..8d533a678f1 100644 --- a/ompi/mpi/c/Makefile.am +++ b/ompi/mpi/c/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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. @@ -16,9 +16,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,7 +26,7 @@ SUBDIRS = profile # # OMPI_PRPOFILING_DEFINES flag s enabled when we want our MPI_* symbols -# to be replaced by PMPI_*. In other words, this flag decides +# to be replaced by PMPI_*. In other words, this flag decides # whether "profile/defines.h" is included or not. "profile/defines.h" # replaces all MPI_* symbols with PMPI_* symbols. In this directory, # we need it to be 0 diff --git a/ompi/mpi/c/abort.c b/ompi/mpi/c/abort.c index 13746d942c1..8430ea635d2 100644 --- a/ompi/mpi/c/abort.c +++ b/ompi/mpi/c/abort.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Abort"; -int MPI_Abort(MPI_Comm comm, int errorcode) +int MPI_Abort(MPI_Comm comm, int errorcode) { MEMCHECKER( memchecker_comm(comm); @@ -53,7 +53,7 @@ int MPI_Abort(MPI_Comm comm, int errorcode) } opal_show_help("help-mpi-api.txt", "mpi-abort", true, - ompi_comm_rank(comm), + ompi_comm_rank(comm), ('\0' != comm->c_name[0]) ? comm->c_name : "", errorcode); return ompi_mpi_abort(comm, errorcode); diff --git a/ompi/mpi/c/accumulate.c b/ompi/mpi/c/accumulate.c index cd44c9d3847..a26b09b4897 100644 --- a/ompi/mpi/c/accumulate.c +++ b/ompi/mpi/c/accumulate.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -46,7 +46,7 @@ static const char FUNC_NAME[] = "MPI_Accumulate"; int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) { int rc; ompi_win_t *ompi_win = (ompi_win_t*) win; @@ -131,10 +131,10 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origi rc = ompi_win->w_osc_module->osc_accumulate(origin_addr, origin_count, origin_datatype, - target_rank, - target_disp, + target_rank, + target_disp, target_count, - target_datatype, + target_datatype, op, win); OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/add_error_class.c b/ompi/mpi/c/add_error_class.c index 79803bc9ed7..b44c527ad06 100644 --- a/ompi/mpi/c/add_error_class.c +++ b/ompi/mpi/c/add_error_class.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Add_error_class"; -int MPI_Add_error_class(int *errorclass) +int MPI_Add_error_class(int *errorclass) { int err_class; int rc; @@ -52,23 +52,23 @@ int MPI_Add_error_class(int *errorclass) MPI_ERR_ARG, FUNC_NAME); } } - + err_class = ompi_mpi_errclass_add(); if ( 0 > err_class ) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN, FUNC_NAME); } - - /* + + /* ** Update the attribute value. See the comments ** in attribute/attribute.c and attribute/attribute_predefined.c - ** why we have to call the fortran attr_set function + ** why we have to call the fortran attr_set function */ - rc = ompi_attr_set_fortran_mpi1 (COMM_ATTR, + rc = ompi_attr_set_fortran_mpi1 (COMM_ATTR, MPI_COMM_WORLD, &MPI_COMM_WORLD->c_keyhash, - MPI_LASTUSEDCODE, + MPI_LASTUSEDCODE, ompi_mpi_errcode_lastused, true); if ( MPI_SUCCESS != rc ) { diff --git a/ompi/mpi/c/add_error_code.c b/ompi/mpi/c/add_error_code.c index fce5e38a436..0f9c21f0e9f 100644 --- a/ompi/mpi/c/add_error_code.c +++ b/ompi/mpi/c/add_error_code.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -50,8 +50,8 @@ int MPI_Add_error_code(int errorclass, int *errorcode) if ( ompi_mpi_errcode_is_invalid(errorclass) ) return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); - - if ( !ompi_mpi_errnum_is_class ( errorclass) ) + + if ( !ompi_mpi_errnum_is_class ( errorclass) ) return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); @@ -60,28 +60,28 @@ int MPI_Add_error_code(int errorclass, int *errorcode) MPI_ERR_ARG, FUNC_NAME); } } - + code = ompi_mpi_errcode_add ( errorclass); if ( 0 > code ) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN, FUNC_NAME); } - /* + /* ** Update the attribute value. See the comments ** in attribute/attribute.c and attribute/attribute_predefined.c - ** why we have to call the fortran attr_set function + ** why we have to call the fortran attr_set function */ - rc = ompi_attr_set_fortran_mpi1 (COMM_ATTR, + rc = ompi_attr_set_fortran_mpi1 (COMM_ATTR, MPI_COMM_WORLD, &MPI_COMM_WORLD->c_keyhash, - MPI_LASTUSEDCODE, + MPI_LASTUSEDCODE, ompi_mpi_errcode_lastused, true); if ( MPI_SUCCESS != rc ) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, rc, FUNC_NAME); } - + *errorcode = code; return MPI_SUCCESS; } diff --git a/ompi/mpi/c/add_error_string.c b/ompi/mpi/c/add_error_string.c index fe982446e8e..00d4f87b71d 100644 --- a/ompi/mpi/c/add_error_string.c +++ b/ompi/mpi/c/add_error_string.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -54,7 +54,7 @@ int MPI_Add_error_string(int errorcode, const char *string) return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); - if ( MPI_MAX_ERROR_STRING < (strlen(string)+1) ) + if ( MPI_MAX_ERROR_STRING < (strlen(string)+1) ) return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/address.c b/ompi/mpi/c/address.c index 37e18a71f9b..64bbc102a12 100644 --- a/ompi/mpi/c/address.c +++ b/ompi/mpi/c/address.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/c/allgather.c b/ompi/mpi/c/allgather.c index 4be47551125..b6d0ae45e53 100644 --- a/ompi/mpi/c/allgather.c +++ b/ompi/mpi/c/allgather.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -59,8 +59,8 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, memchecker_comm(comm); /* check whether the actual send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { - memchecker_call(&opal_memchecker_base_isdefined, - (char *)(recvbuf)+rank*ext, + memchecker_call(&opal_memchecker_base_isdefined, + (char *)(recvbuf)+rank*ext, recvcount, recvtype); } else { memchecker_datatype(sendtype); @@ -94,7 +94,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, /* Do we need to do anything? Everyone had to give the same send signature, which means that everyone must have given a sendcount > 0 if there's anything to send for the intra-communicator - case. If we're doing IN_PLACE, however, check recvcount, + case. If we're doing IN_PLACE, however, check recvcount, not sendcount. */ if ( OMPI_COMM_IS_INTRA(comm) ) { if ((MPI_IN_PLACE != sendbuf && 0 == sendcount) || diff --git a/ompi/mpi/c/allgatherv.c b/ompi/mpi/c/allgatherv.c index 44a912b9180..2388365a010 100644 --- a/ompi/mpi/c/allgatherv.c +++ b/ompi/mpi/c/allgatherv.c @@ -6,18 +6,18 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 University of Houston. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,7 +64,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, (char *)(recvbuf)+displs[i]*ext, recvcounts[i], recvtype); } - + /* check whether the actual send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, @@ -84,7 +84,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (MPI_IN_PLACE == recvbuf) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); @@ -108,13 +108,13 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT, FUNC_NAME); } } - + if (NULL == displs) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_BUFFER, FUNC_NAME); } } - /* Do we need to do anything? Everyone had to give the same + /* Do we need to do anything? Everyone had to give the same signature, which means that everyone must have given a sum(recvounts) > 0 if there's anything to do. */ @@ -129,9 +129,9 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, } } /* There is no rule that can be applied for inter-communicators, since - recvcount(s)=0 only indicates that the processes in the other group + recvcount(s)=0 only indicates that the processes in the other group do not send anything, sendcount=0 only indicates that I do not send - anything. However, other processes in my group might very well send + anything. However, other processes in my group might very well send something */ diff --git a/ompi/mpi/c/alloc_mem.c b/ompi/mpi/c/alloc_mem.c index dbcef2acada..4e08a0bd1b5 100644 --- a/ompi/mpi/c/alloc_mem.c +++ b/ompi/mpi/c/alloc_mem.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -53,11 +53,11 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) FUNC_NAME); } } - + /* Per these threads: - http://www.open-mpi.org/community/lists/devel/2007/07/1977.php - http://www.open-mpi.org/community/lists/devel/2007/07/1979.php + http://www.open-mpi.org/community/lists/devel/2007/07/1977.php + http://www.open-mpi.org/community/lists/devel/2007/07/1979.php If you call MPI_ALLOC_MEM with a size of 0, you get NULL back .*/ @@ -71,7 +71,7 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) *((void **) baseptr) = mca_mpool_base_alloc((size_t) size, (struct opal_info_t*)info); OPAL_CR_EXIT_LIBRARY(); if (NULL == *((void **) baseptr)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, FUNC_NAME); } diff --git a/ompi/mpi/c/allreduce.c b/ompi/mpi/c/allreduce.c index 3b32264b02e..98ea5c48741 100644 --- a/ompi/mpi/c/allreduce.c +++ b/ompi/mpi/c/allreduce.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,17 +42,17 @@ static const char FUNC_NAME[] = "MPI_Allreduce"; int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int err; MEMCHECKER( memchecker_datatype(datatype); memchecker_comm(comm); - + /* check whether receive buffer is defined. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, count, datatype); - + /* check whether the actual send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, recvbuf, count, datatype); @@ -70,7 +70,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (MPI_OP_NULL == op) { err = MPI_ERR_OP; @@ -79,12 +79,12 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, free(msg); return ret; } else if( MPI_IN_PLACE == recvbuf ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_BUFFER, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_BUFFER, FUNC_NAME); - } else if( (sendbuf == recvbuf) && + } else if( (sendbuf == recvbuf) && (MPI_BOTTOM != sendbuf) && (count > 1) ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_BUFFER, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_BUFFER, FUNC_NAME); } else { OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count); @@ -95,7 +95,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, /* MPI-1, p114, says that each process must supply at least one element. But at least the Pallas benchmarks call MPI_REDUCE with a count of 0. So be sure to handle it. */ - + if (0 == count) { return MPI_SUCCESS; } diff --git a/ompi/mpi/c/alltoall.c b/ompi/mpi/c/alltoall.c index be39433ba12..67df9fbde43 100644 --- a/ompi/mpi/c/alltoall.c +++ b/ompi/mpi/c/alltoall.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,8 +44,8 @@ static const char FUNC_NAME[] = "MPI_Alltoall"; int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, - void *recvbuf, int recvcount, MPI_Datatype recvtype, - MPI_Comm comm) + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { size_t sendtype_size, recvtype_size; int err; @@ -73,10 +73,10 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (MPI_IN_PLACE == recvbuf) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } else { OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount); diff --git a/ompi/mpi/c/alltoallv.c b/ompi/mpi/c/alltoallv.c index 90451cb2e7a..2521e1c7bfa 100644 --- a/ompi/mpi/c/alltoallv.c +++ b/ompi/mpi/c/alltoallv.c @@ -6,19 +6,19 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,7 +46,7 @@ static const char FUNC_NAME[] = "MPI_Alltoallv"; int MPI_Alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], - MPI_Datatype recvtype, MPI_Comm comm) + MPI_Datatype recvtype, MPI_Comm comm) { int i, size, err; @@ -85,7 +85,7 @@ int MPI_Alltoallv(const void *sendbuf, const int sendcounts[], err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/alltoallw.c b/ompi/mpi/c/alltoallw.c index 8d7c26b6458..b64dd26af17 100644 --- a/ompi/mpi/c/alltoallw.c +++ b/ompi/mpi/c/alltoallw.c @@ -6,19 +6,19 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,8 +48,8 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm) { - int i, size, err; - + int i, size, err; + MEMCHECKER( ptrdiff_t recv_ext; ptrdiff_t send_ext; @@ -80,7 +80,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/attr_delete.c b/ompi/mpi/c/attr_delete.c index 3059d01706e..ed9f9f7f701 100644 --- a/ompi/mpi/c/attr_delete.c +++ b/ompi/mpi/c/attr_delete.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,16 +49,16 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_delete(COMM_ATTR, comm, comm->c_keyhash, keyval, + ret = ompi_attr_delete(COMM_ATTR, comm, comm->c_keyhash, keyval, false); - OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/attr_fn.c b/ompi/mpi/c/attr_fn.c index 95da43f2117..667085e50de 100644 --- a/ompi/mpi/c/attr_fn.c +++ b/ompi/mpi/c/attr_fn.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -61,9 +61,9 @@ int OMPI_C_MPI_TYPE_NULL_DELETE_FN( MPI_Datatype datatype, int type_keyval, return MPI_SUCCESS; } -int OMPI_C_MPI_TYPE_NULL_COPY_FN( MPI_Datatype datatype, int type_keyval, +int OMPI_C_MPI_TYPE_NULL_COPY_FN( MPI_Datatype datatype, int type_keyval, void* extra_state, - void* attribute_val_in, + void* attribute_val_in, void* attribute_val_out, int* flag ) { @@ -71,7 +71,7 @@ int OMPI_C_MPI_TYPE_NULL_COPY_FN( MPI_Datatype datatype, int type_keyval, return MPI_SUCCESS; } -int OMPI_C_MPI_TYPE_DUP_FN( MPI_Datatype datatype, int type_keyval, +int OMPI_C_MPI_TYPE_DUP_FN( MPI_Datatype datatype, int type_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, int* flag ) @@ -88,7 +88,7 @@ int OMPI_C_MPI_WIN_NULL_DELETE_FN( MPI_Win window, int win_keyval, return MPI_SUCCESS; } -int OMPI_C_MPI_WIN_NULL_COPY_FN( MPI_Win window, int win_keyval, +int OMPI_C_MPI_WIN_NULL_COPY_FN( MPI_Win window, int win_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, int* flag ) @@ -113,7 +113,7 @@ int OMPI_C_MPI_COMM_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval, return MPI_SUCCESS; } -int OMPI_C_MPI_COMM_NULL_COPY_FN( MPI_Comm comm, int comm_keyval, +int OMPI_C_MPI_COMM_NULL_COPY_FN( MPI_Comm comm, int comm_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, int* flag ) diff --git a/ompi/mpi/c/attr_get.c b/ompi/mpi/c/attr_get.c index e782623b97d..e5f5608184e 100644 --- a/ompi/mpi/c/attr_get.c +++ b/ompi/mpi/c/attr_get.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -47,7 +47,7 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ((NULL == attribute_val) || (NULL == flag)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/attr_put.c b/ompi/mpi/c/attr_put.c index b14fbad6ec3..13f2f5a269d 100644 --- a/ompi/mpi/c/attr_put.c +++ b/ompi/mpi/c/attr_put.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Attr_put"; -int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) +int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) { int ret; @@ -48,16 +48,16 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_set_c(COMM_ATTR, comm, &comm->c_keyhash, + ret = ompi_attr_set_c(COMM_ATTR, comm, &comm->c_keyhash, keyval, attribute_val, false); - - OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); + + OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/barrier.c b/ompi/mpi/c/barrier.c index 8f5cccd7368..758aabe46ab 100644 --- a/ompi/mpi/c/barrier.c +++ b/ompi/mpi/c/barrier.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,14 +35,14 @@ static const char FUNC_NAME[] = "MPI_Barrier"; -int MPI_Barrier(MPI_Comm comm) +int MPI_Barrier(MPI_Comm comm) { int err = MPI_SUCCESS; - + MEMCHECKER( memchecker_comm(comm); ); - + /* Error checking */ if (MPI_PARAM_CHECK) { @@ -61,7 +61,7 @@ int MPI_Barrier(MPI_Comm comm) if (ompi_comm_size(comm) > 1) { err = comm->c_coll.coll_barrier(comm, comm->c_coll.coll_barrier_module); } - } + } /* Intercommunicators -- always invoke, because, by definition, there's always at least 2 processes in an intercommunicator. */ diff --git a/ompi/mpi/c/bcast.c b/ompi/mpi/c/bcast.c index 8044862d66b..38c9592f6d2 100644 --- a/ompi/mpi/c/bcast.c +++ b/ompi/mpi/c/bcast.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -50,7 +50,7 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, memchecker_call(&opal_memchecker_base_isdefined, buffer, count, datatype); } /* check whether receive buffer is addressable. */ - memchecker_call(&opal_memchecker_base_isaddressable, buffer, count, datatype); + memchecker_call(&opal_memchecker_base_isaddressable, buffer, count, datatype); } else { if (MPI_ROOT == root) { /* check whether root's send buffer is defined. */ @@ -66,7 +66,7 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } @@ -84,7 +84,7 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, if ((root >= ompi_comm_size(comm)) || (root < 0)) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ROOT, FUNC_NAME); } - } + } /* Errors for intercommunicators */ @@ -93,7 +93,7 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, MPI_ROOT == root || MPI_PROC_NULL == root)) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ROOT, FUNC_NAME); } - } + } } /* If there's only one node, or if the count is 0, we're done */ @@ -101,7 +101,7 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, if ((OMPI_COMM_IS_INTRA(comm) && ompi_comm_size(comm) <= 1) || 0 == count) { return MPI_SUCCESS; - } + } OPAL_CR_ENTER_LIBRARY(); diff --git a/ompi/mpi/c/bindings.h b/ompi/mpi/c/bindings.h index 903382cce4f..12e29cbfbd2 100644 --- a/ompi/mpi/c/bindings.h +++ b/ompi/mpi/c/bindings.h @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -60,7 +60,7 @@ BEGIN_C_DECLS /* XXX Fix flags else if( ompi_datatype_is_overlapped((DDT)) ) (RC) = MPI_ERR_TYPE; */ \ else if( !opal_datatype_is_valid(&((DDT)->super)) ) (RC) = MPI_ERR_TYPE; \ } while (0) - + #define OMPI_CHECK_DATATYPE_FOR_ONE_SIDED( RC, DDT, COUNT ) \ do { \ /*(RC) = MPI_SUCCESS; */ \ @@ -72,7 +72,7 @@ BEGIN_C_DECLS } while(0) -/* This macro has to be used to check the correctness of the user buffer depending on the datatype. +/* This macro has to be used to check the correctness of the user buffer depending on the datatype. * This macro expects that the DDT parameter is a valid pointer to an ompi datatype object. */ #define OMPI_CHECK_USER_BUFFER(RC, BUFFER, DDT, COUNT) \ @@ -92,7 +92,7 @@ BEGIN_C_DECLS } \ } \ } while (0) - + END_C_DECLS #endif /* OMPI_C_BINDINGS_H */ diff --git a/ompi/mpi/c/bsend.c b/ompi/mpi/c/bsend.c index 10ef6c0399b..ca681f71d89 100644 --- a/ompi/mpi/c/bsend.c +++ b/ompi/mpi/c/bsend.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/bsend_init.c b/ompi/mpi/c/bsend_init.c index c5e57bbdf5d..3fb476afa22 100644 --- a/ompi/mpi/c/bsend_init.c +++ b/ompi/mpi/c/bsend_init.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -63,7 +63,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype type, rc = MPI_ERR_TYPE; } else if (tag < 0 || tag > mca_pml.pml_max_tag) { rc = MPI_ERR_TAG; - } else if (ompi_comm_peer_invalid(comm, dest) && + } else if (ompi_comm_peer_invalid(comm, dest) && (MPI_PROC_NULL != dest)) { rc = MPI_ERR_RANK; } else if (request == NULL) { diff --git a/ompi/mpi/c/buffer_attach.c b/ompi/mpi/c/buffer_attach.c index 6400ca2b733..87c1aa19cfe 100644 --- a/ompi/mpi/c/buffer_attach.c +++ b/ompi/mpi/c/buffer_attach.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Buffer_attach"; -int MPI_Buffer_attach(void *buffer, int size) +int MPI_Buffer_attach(void *buffer, int size) { int ret = OMPI_SUCCESS; diff --git a/ompi/mpi/c/buffer_detach.c b/ompi/mpi/c/buffer_detach.c index 68f171f3b4e..8fa79ab6d39 100644 --- a/ompi/mpi/c/buffer_detach.c +++ b/ompi/mpi/c/buffer_detach.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Buffer_detach"; -int MPI_Buffer_detach(void *buffer, int *size) +int MPI_Buffer_detach(void *buffer, int *size) { int ret = OMPI_SUCCESS; diff --git a/ompi/mpi/c/cancel.c b/ompi/mpi/c/cancel.c index b2e8c6cd6b9..51e1f3542af 100644 --- a/ompi/mpi/c/cancel.c +++ b/ompi/mpi/c/cancel.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Cancel"; -int MPI_Cancel(MPI_Request *request) +int MPI_Cancel(MPI_Request *request) { int rc; @@ -49,9 +49,9 @@ int MPI_Cancel(MPI_Request *request) if ( MPI_PARAM_CHECK ) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == request || NULL == *request || + if (NULL == request || NULL == *request || MPI_REQUEST_NULL == *request) { - OMPI_ERRHANDLER_RETURN(MPI_ERR_REQUEST, MPI_COMM_WORLD, + OMPI_ERRHANDLER_RETURN(MPI_ERR_REQUEST, MPI_COMM_WORLD, MPI_ERR_REQUEST, FUNC_NAME); } } diff --git a/ompi/mpi/c/cart_coords.c b/ompi/mpi/c/cart_coords.c index 8fb587125ae..8a810250d3b 100644 --- a/ompi/mpi/c/cart_coords.c +++ b/ompi/mpi/c/cart_coords.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2012 Los Alamos Nat Security, LLC. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Cart_coords"; -int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]) +int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]) { int err; @@ -54,7 +54,7 @@ int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]) return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if (OMPI_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/cart_create.c b/ompi/mpi/c/cart_create.c index da4ea608c7d..eeedf011a0e 100644 --- a/ompi/mpi/c/cart_create.c +++ b/ompi/mpi/c/cart_create.c @@ -6,18 +6,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -58,7 +58,7 @@ int MPI_Cart_create(MPI_Comm old_comm, int ndims, const int dims[], return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (OMPI_COMM_IS_INTER(old_comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if (ndims < 0) { @@ -87,9 +87,9 @@ int MPI_Cart_create(MPI_Comm old_comm, int ndims, const int dims[], } } - /* - * everything seems to be alright with the communicator, we can go - * ahead and select a topology module for this purpose and create + /* + * everything seems to be alright with the communicator, we can go + * ahead and select a topology module for this purpose and create * the new graph communicator */ if (OMPI_SUCCESS != (err = mca_topo_base_comm_select(old_comm, @@ -99,7 +99,7 @@ int MPI_Cart_create(MPI_Comm old_comm, int ndims, const int dims[], return err; } - /* Now let that topology module rearrange procs/ranks if it wants to */ + /* Now let that topology module rearrange procs/ranks if it wants to */ /* XXX -- CONST -- do not cast away const -- update mca/topo */ err = topo->topo.cart.cart_create(topo, old_comm, ndims, (int *) dims, (int *) periods, diff --git a/ompi/mpi/c/cart_get.c b/ompi/mpi/c/cart_get.c index e3dd1ebfd50..f935be8ba82 100644 --- a/ompi/mpi/c/cart_get.c +++ b/ompi/mpi/c/cart_get.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2012 Los Alamos Nat Security, LLC. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Cart_get"; int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], - int periods[], int coords[]) + int periods[], int coords[]) { int err; @@ -54,7 +54,7 @@ int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if ((0 > maxdims) || (0 < maxdims && + if ((0 > maxdims) || (0 < maxdims && ((NULL == dims) || (NULL == periods) || (NULL == coords)))) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_ARG, diff --git a/ompi/mpi/c/cart_map.c b/ompi/mpi/c/cart_map.c index dbb4b7708c3..b839843e441 100644 --- a/ompi/mpi/c/cart_map.c +++ b/ompi/mpi/c/cart_map.c @@ -6,18 +6,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -57,7 +57,7 @@ int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if (OMPI_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } @@ -70,7 +70,7 @@ int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], OPAL_CR_ENTER_LIBRARY(); if(!OMPI_COMM_IS_CART(comm)) { - /* In case the communicator has no topo-module attached to + /* In case the communicator has no topo-module attached to it, we just return the "default" value suggested by MPI: newrank = rank */ *newrank = ompi_comm_rank(comm); diff --git a/ompi/mpi/c/cart_rank.c b/ompi/mpi/c/cart_rank.c index 51bfb49c5f1..590a63f78a2 100644 --- a/ompi/mpi/c/cart_rank.c +++ b/ompi/mpi/c/cart_rank.c @@ -6,20 +6,20 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -58,7 +58,7 @@ int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if (OMPI_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } @@ -85,7 +85,7 @@ int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) dimension i is not periodic */ for (i = 0; i < cart->ndims; ++i) { if (!cart->periods[i] && - (coords[i] < 0 || + (coords[i] < 0 || coords[i] >= cart->dims[i])) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/cart_shift.c b/ompi/mpi/c/cart_shift.c index c568de15aea..26648551f1f 100644 --- a/ompi/mpi/c/cart_shift.c +++ b/ompi/mpi/c/cart_shift.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Cart_shift"; int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, - int *rank_source, int *rank_dest) + int *rank_source, int *rank_dest) { int err; @@ -54,7 +54,7 @@ int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if (OMPI_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/cart_sub.c b/ompi/mpi/c/cart_sub.c index 8c24ece100e..961cfe371d5 100644 --- a/ompi/mpi/c/cart_sub.c +++ b/ompi/mpi/c/cart_sub.c @@ -6,20 +6,20 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -58,7 +58,7 @@ int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *new_comm) return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if (OMPI_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/cartdim_get.c b/ompi/mpi/c/cartdim_get.c index b99ed0257a1..86aa20ef632 100644 --- a/ompi/mpi/c/cartdim_get.c +++ b/ompi/mpi/c/cartdim_get.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Cartdim_get"; -int MPI_Cartdim_get(MPI_Comm comm, int *ndims) +int MPI_Cartdim_get(MPI_Comm comm, int *ndims) { int err; @@ -53,7 +53,7 @@ int MPI_Cartdim_get(MPI_Comm comm, int *ndims) return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - if (OMPI_COMM_IS_INTER(comm)) { + if (OMPI_COMM_IS_INTER(comm)) { return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/close_port.c b/ompi/mpi/c/close_port.c index 873ce157ae6..8aab0c5d634 100644 --- a/ompi/mpi/c/close_port.c +++ b/ompi/mpi/c/close_port.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -49,11 +49,11 @@ int MPI_Close_port(const char *port_name) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == port_name ) - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } ret = ompi_dpm.close_port(port_name); - + OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, ret, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_accept.c b/ompi/mpi/c/comm_accept.c index 36686369500..41c773f91f7 100644 --- a/ompi/mpi/c/comm_accept.c +++ b/ompi/mpi/c/comm_accept.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Comm_accept"; int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, - MPI_Comm comm, MPI_Comm *newcomm) + MPI_Comm comm, MPI_Comm *newcomm) { int rank, rc; bool send_first=false; /* we receive first */ @@ -57,7 +57,7 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( OMPI_COMM_IS_INTER(comm)) { @@ -65,11 +65,11 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, FUNC_NAME); } if ( (0 > root) || (ompi_comm_size(comm) <= root) ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == newcomm ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } if (NULL == info || ompi_info_is_freed(info)) { @@ -77,17 +77,17 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, FUNC_NAME); } } - + rank = ompi_comm_rank ( comm ); if ( MPI_PARAM_CHECK ) { if ( rank == root ) { - if ( NULL == port_name ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + if ( NULL == port_name ) + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } - /* parse info object. no prefedined values for this function in MPI-2 + /* parse info object. no prefedined values for this function in MPI-2 * so lets ignore it for the moment. * if ( rank == root && MPI_INFO_NULL != info ) { * } @@ -95,11 +95,11 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, OPAL_CR_ENTER_LIBRARY(); if ( rank == root ) { - rc = ompi_dpm.connect_accept (comm, root, port_name, send_first, + rc = ompi_dpm.connect_accept (comm, root, port_name, send_first, &newcomp); } else { - rc = ompi_dpm.connect_accept (comm, root, NULL, send_first, + rc = ompi_dpm.connect_accept (comm, root, NULL, send_first, &newcomp); } diff --git a/ompi/mpi/c/comm_c2f.c b/ompi/mpi/c/comm_c2f.c index d8f19cdb5a7..47920595c98 100644 --- a/ompi/mpi/c/comm_c2f.c +++ b/ompi/mpi/c/comm_c2f.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Comm_c2f"; -MPI_Fint MPI_Comm_c2f(MPI_Comm comm) +MPI_Fint MPI_Comm_c2f(MPI_Comm comm) { MEMCHECKER( memchecker_comm(comm); diff --git a/ompi/mpi/c/comm_call_errhandler.c b/ompi/mpi/c/comm_call_errhandler.c index dfc7bdbfb64..1be25c50aca 100644 --- a/ompi/mpi/c/comm_call_errhandler.c +++ b/ompi/mpi/c/comm_call_errhandler.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -31,7 +31,7 @@ #if OMPI_PROFILING_DEFINES #include "ompi/mpi/c/profile/defines.h" #endif - + static const char FUNC_NAME[] = "MPI_Comm_call_errhandler"; diff --git a/ompi/mpi/c/comm_compare.c b/ompi/mpi/c/comm_compare.c index 20f9961460a..c6e006c7b6e 100644 --- a/ompi/mpi/c/comm_compare.c +++ b/ompi/mpi/c/comm_compare.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -49,19 +49,19 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm1) || ompi_comm_invalid(comm2)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( NULL == result ) { - return OMPI_ERRHANDLER_INVOKE(comm1, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm1, MPI_ERR_ARG, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - rc = ompi_comm_compare ( (ompi_communicator_t*)comm1, + rc = ompi_comm_compare ( (ompi_communicator_t*)comm1, (ompi_communicator_t*)comm2, result); OMPI_ERRHANDLER_RETURN ( rc, comm1, rc, FUNC_NAME); diff --git a/ompi/mpi/c/comm_connect.c b/ompi/mpi/c/comm_connect.c index 1dcce1d7a08..b3beec6bf38 100644 --- a/ompi/mpi/c/comm_connect.c +++ b/ompi/mpi/c/comm_connect.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Comm_connect"; int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, - MPI_Comm comm, MPI_Comm *newcomm) + MPI_Comm comm, MPI_Comm *newcomm) { int rank, rc; bool send_first=true; /* yes, we are the active part in this game */ @@ -57,7 +57,7 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( OMPI_COMM_IS_INTER(comm)) { @@ -65,11 +65,11 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, FUNC_NAME); } if ( (0 > root) || (ompi_comm_size(comm) <= root) ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == newcomm ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } if (NULL == info || ompi_info_is_freed(info)) { @@ -77,12 +77,12 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, FUNC_NAME); } } - + rank = ompi_comm_rank ( comm ); if ( MPI_PARAM_CHECK ) { if ( rank == root ) { - if ( NULL == port_name ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + if ( NULL == port_name ) + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } @@ -97,14 +97,14 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, OPAL_CR_ENTER_LIBRARY(); if ( rank == root ) { - rc = ompi_dpm.connect_accept (comm, root, port_name, send_first, + rc = ompi_dpm.connect_accept (comm, root, port_name, send_first, &newcomp); } else { - rc = ompi_dpm.connect_accept (comm, root, NULL, send_first, + rc = ompi_dpm.connect_accept (comm, root, NULL, send_first, &newcomp); - } - + } + *newcomm = newcomp; OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_create.c b/ompi/mpi/c/comm_create.c index f18a7384e8a..978895467af 100644 --- a/ompi/mpi/c/comm_create.c +++ b/ompi/mpi/c/comm_create.c @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2008 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Comm_create"; int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) { - + int rc; MEMCHECKER( @@ -46,23 +46,23 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) { if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - + if (ompi_comm_invalid (comm)) - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); - + if ( MPI_GROUP_NULL == group || NULL == group ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_GROUP, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_GROUP, FUNC_NAME); - + if ( NULL == newcomm ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } OPAL_CR_ENTER_LIBRARY(); - rc = ompi_comm_create ( (ompi_communicator_t*)comm, (ompi_group_t*)group, + rc = ompi_comm_create ( (ompi_communicator_t*)comm, (ompi_group_t*)group, (ompi_communicator_t**)newcomm ); OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_create_errhandler.c b/ompi/mpi/c/comm_create_errhandler.c index 448ea6e03eb..5673941ea12 100644 --- a/ompi/mpi/c/comm_create_errhandler.c +++ b/ompi/mpi/c/comm_create_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Comm_create_errhandler"; int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *function, - MPI_Errhandler *errhandler) + MPI_Errhandler *errhandler) { int err = MPI_SUCCESS; @@ -46,7 +46,7 @@ int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *function, if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == function || + if (NULL == function || NULL == errhandler) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); @@ -57,7 +57,7 @@ int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *function, /* Create and cache the errhandler. Sets a refcount of 1. */ - *errhandler = + *errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_COMM, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_C); diff --git a/ompi/mpi/c/comm_create_keyval.c b/ompi/mpi/c/comm_create_keyval.c index 06292d6e915..0c2220889ff 100644 --- a/ompi/mpi/c/comm_create_keyval.c +++ b/ompi/mpi/c/comm_create_keyval.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -48,7 +48,7 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ((NULL == comm_copy_attr_fn) || (NULL == comm_delete_attr_fn) || (NULL == comm_keyval)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } @@ -58,7 +58,7 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, copy_fn.attr_communicator_copy_fn = (MPI_Comm_internal_copy_attr_function*)comm_copy_attr_fn; del_fn.attr_communicator_delete_fn = comm_delete_attr_fn; - ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, + ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn, comm_keyval, extra_state, 0, NULL); OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); diff --git a/ompi/mpi/c/comm_delete_attr.c b/ompi/mpi/c/comm_delete_attr.c index 6b11f959260..475ca24850b 100644 --- a/ompi/mpi/c/comm_delete_attr.c +++ b/ompi/mpi/c/comm_delete_attr.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Comm_delete_attr"; -int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) +int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) { int ret; @@ -48,15 +48,15 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_delete(COMM_ATTR, comm, comm->c_keyhash, comm_keyval, + ret = ompi_attr_delete(COMM_ATTR, comm, comm->c_keyhash, comm_keyval, false); - OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_disconnect.c b/ompi/mpi/c/comm_disconnect.c index a39e9aa6106..d623d8f6899 100644 --- a/ompi/mpi/c/comm_disconnect.c +++ b/ompi/mpi/c/comm_disconnect.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Comm_disconnect"; -int MPI_Comm_disconnect(MPI_Comm *comm) +int MPI_Comm_disconnect(MPI_Comm *comm) { int ret = MPI_SUCCESS; @@ -51,10 +51,10 @@ int MPI_Comm_disconnect(MPI_Comm *comm) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid (*comm)) - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - + if (MPI_COMM_WORLD == *comm || MPI_COMM_SELF == *comm ) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_dup.c b/ompi/mpi/c/comm_dup.c index ecffd8e33ff..8e90df5cf0b 100644 --- a/ompi/mpi/c/comm_dup.c +++ b/ompi/mpi/c/comm_dup.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2008 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Comm_dup"; -int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) +int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) { int rc=MPI_SUCCESS; @@ -49,11 +49,11 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); - + if ( NULL == newcomm ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_f2c.c b/ompi/mpi/c/comm_f2c.c index 8bedc9a49e9..3adae06cff2 100644 --- a/ompi/mpi/c/comm_f2c.c +++ b/ompi/mpi/c/comm_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Comm_f2c"; -MPI_Comm MPI_Comm_f2c(MPI_Fint comm) +MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { int o_index= OMPI_FINT_2_INT(comm); @@ -55,6 +55,6 @@ MPI_Comm MPI_Comm_f2c(MPI_Fint comm) o_index >= opal_pointer_array_get_size(&ompi_comm_f_to_c_table)) { return NULL; } - + return (MPI_Comm)opal_pointer_array_get_item(&ompi_comm_f_to_c_table, o_index); } diff --git a/ompi/mpi/c/comm_free.c b/ompi/mpi/c/comm_free.c index 1f3bdfc089d..46622a05bdb 100644 --- a/ompi/mpi/c/comm_free.c +++ b/ompi/mpi/c/comm_free.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Comm_free"; -int MPI_Comm_free(MPI_Comm *comm) +int MPI_Comm_free(MPI_Comm *comm) { int ret; @@ -45,20 +45,20 @@ int MPI_Comm_free(MPI_Comm *comm) if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - + if ( NULL == *comm || MPI_COMM_WORLD == *comm || ompi_comm_invalid (*comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (MPI_COMM_SELF == *comm) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_SELF, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_SELF, MPI_ERR_COMM, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - ret = ompi_comm_free ( comm ); + ret = ompi_comm_free ( comm ); OMPI_ERRHANDLER_CHECK(ret, *comm, ret, FUNC_NAME); OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpi/c/comm_free_keyval.c b/ompi/mpi/c/comm_free_keyval.c index 37b9604b6e8..5eaf864ea5a 100644 --- a/ompi/mpi/c/comm_free_keyval.c +++ b/ompi/mpi/c/comm_free_keyval.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Comm_free_keyval"; -int MPI_Comm_free_keyval(int *comm_keyval) +int MPI_Comm_free_keyval(int *comm_keyval) { int ret; @@ -44,7 +44,7 @@ int MPI_Comm_free_keyval(int *comm_keyval) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == comm_keyval) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/comm_get_attr.c b/ompi/mpi/c/comm_get_attr.c index fd8dec9ee1c..354567aab6f 100644 --- a/ompi/mpi/c/comm_get_attr.c +++ b/ompi/mpi/c/comm_get_attr.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -51,7 +51,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, if ((NULL == attribute_val) || (NULL == flag)) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } else if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (MPI_KEYVAL_INVALID == comm_keyval) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_KEYVAL, FUNC_NAME); @@ -64,7 +64,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, src/attribute/attribute.c for a lengthy comment explaining Open MPI attribute behavior. */ - ret = ompi_attr_get_c(comm->c_keyhash, comm_keyval, + ret = ompi_attr_get_c(comm->c_keyhash, comm_keyval, (void**)attribute_val, flag); - OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_get_errhandler.c b/ompi/mpi/c/comm_get_errhandler.c index 5249b24d3d9..e7b2a4da619 100644 --- a/ompi/mpi/c/comm_get_errhandler.c +++ b/ompi/mpi/c/comm_get_errhandler.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/comm_get_info.c b/ompi/mpi/c/comm_get_info.c index 7ce4ef2c50b..8df957536b0 100644 --- a/ompi/mpi/c/comm_get_info.c +++ b/ompi/mpi/c/comm_get_info.c @@ -2,9 +2,9 @@ /* * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,7 +40,7 @@ int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info_used) FUNC_NAME); } if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } } diff --git a/ompi/mpi/c/comm_get_name.c b/ompi/mpi/c/comm_get_name.c index 98173569657..3e26eecda02 100644 --- a/ompi/mpi/c/comm_get_name.c +++ b/ompi/mpi/c/comm_get_name.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Comm_get_name"; -int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length) +int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length) { MEMCHECKER( memchecker_comm(comm); @@ -52,11 +52,11 @@ int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid ( comm ) ) - return OMPI_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); - if ( NULL == name || NULL == length ) - return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG, + if ( NULL == name || NULL == length ) + return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG, FUNC_NAME); } #ifdef USE_MUTEX_FOR_COMMS @@ -67,7 +67,7 @@ int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length) - name[*resultlen] == '\0' - and therefore (*resultlen) cannot be > (MPI_MAX_OBJECT_NAME-1) - The Fortran API version will pad to the right if necessary. + The Fortran API version will pad to the right if necessary. Note that comm->c_name is guaranteed to be \0-terminated and able to completely fit into MPI_MAX_OBJECT_NAME bytes (i.e., diff --git a/ompi/mpi/c/comm_get_parent.c b/ompi/mpi/c/comm_get_parent.c index cbc73651a80..2c7585336a1 100644 --- a/ompi/mpi/c/comm_get_parent.c +++ b/ompi/mpi/c/comm_get_parent.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -34,7 +34,7 @@ static const char FUNC_NAME[] = "MPI_Comm_get_parent"; -int MPI_Comm_get_parent(MPI_Comm *parent) +int MPI_Comm_get_parent(MPI_Comm *parent) { OPAL_CR_NOOP_PROGRESS(); @@ -43,14 +43,14 @@ int MPI_Comm_get_parent(MPI_Comm *parent) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == parent ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } /* - * ompi_mpi_comm_parent is MPI_COMM_NULL, in case this - * world has not been spawned by another MPI job. + * ompi_mpi_comm_parent is MPI_COMM_NULL, in case this + * world has not been spawned by another MPI job. * This is also the return value required by MPI-2. */ diff --git a/ompi/mpi/c/comm_group.c b/ompi/mpi/c/comm_group.c index d36a330e6b3..fa7f407ca31 100644 --- a/ompi/mpi/c/comm_group.c +++ b/ompi/mpi/c/comm_group.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -49,11 +49,11 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid (comm) ) - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); - if ( NULL == group ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + if ( NULL == group ) + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } /* end if ( MPI_PARAM_CHECK) */ diff --git a/ompi/mpi/c/comm_join.c b/ompi/mpi/c/comm_join.c index 0733ee7b4d8..b3fe0cf5885 100644 --- a/ompi/mpi/c/comm_join.c +++ b/ompi/mpi/c/comm_join.c @@ -5,16 +5,16 @@ * 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, + * 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) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -54,7 +54,7 @@ static const char FUNC_NAME[] = "MPI_Comm_join"; static int ompi_socket_send (int fd, char *buf, int len ); static int ompi_socket_recv (int fd, char *buf, int len ); -int MPI_Comm_join(int fd, MPI_Comm *intercomm) +int MPI_Comm_join(int fd, MPI_Comm *intercomm) { int rc; uint32_t len, rlen, llen, lrlen; @@ -69,7 +69,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == intercomm ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } @@ -81,7 +81,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm) OPAL_CR_EXIT_LIBRARY(); return rc; } - + /* send my process name */ tmp_name = *OMPI_PROC_MY_NAME; OMPI_PROCESS_NAME_HTON(tmp_name); @@ -112,7 +112,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm) here. */ llen = (uint32_t)(strlen(port_name)+1); len = htonl(llen); - + ompi_socket_send( fd, (char *) &len, sizeof(uint32_t)); ompi_socket_recv (fd, (char *) &rlen, sizeof(uint32_t)); @@ -124,16 +124,16 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm) return MPI_ERR_INTERN; } - /* Assumption: socket_send should not block, even if the socket + /* Assumption: socket_send should not block, even if the socket is not configured to be non-blocking, because the message length are so short. */ ompi_socket_send (fd, port_name, llen); ompi_socket_recv (fd, rport, lrlen); - + /* use the port we received to connect/accept */ rc = ompi_dpm.connect_accept (MPI_COMM_SELF, 0, rport, send_first, &newcomp); - - + + free ( rport ); *intercomm = newcomp; @@ -148,13 +148,13 @@ static int ompi_socket_send (int fd, char *buf, int len ) ssize_t a; char *c_ptr; int ret = OMPI_SUCCESS; - + num = len; c_ptr = buf; do { s_num = (size_t) num; - a = write ( fd, c_ptr, s_num ); + a = write ( fd, c_ptr, s_num ); if ( a == -1 ) { if ( errno == EINTR ) { /* Catch EINTR on, mainly on IBM RS6000 */ @@ -172,7 +172,7 @@ static int ompi_socket_send (int fd, char *buf, int len ) #endif else { /* Another error occured */ - fprintf (stderr,"ompi_socket_send: error while writing to socket" + fprintf (stderr,"ompi_socket_send: error while writing to socket" " error:%s", strerror (errno) ); return MPI_ERR_OTHER; } @@ -180,7 +180,7 @@ static int ompi_socket_send (int fd, char *buf, int len ) num -= a; c_ptr += a; } while ( num > 0 ); - + if ( num < 0 ) { fprintf (stderr, "ompi_socket_send: more data written then available"); @@ -197,13 +197,13 @@ static int ompi_socket_recv (int fd, char *buf, int len ) ssize_t a; char *c_ptr; int ret = MPI_SUCCESS; - + num = len; c_ptr = buf; do { s_num = (size_t ) num; - a = read ( fd, c_ptr, s_num ); + a = read ( fd, c_ptr, s_num ); if ( a == -1 ) { if ( errno == EINTR ) { /* Catch EINTR on, mainly on IBM RS6000 */ @@ -221,7 +221,7 @@ static int ompi_socket_recv (int fd, char *buf, int len ) #endif else { /* Another error occured */ - fprintf (stderr,"ompi_socket_recv: error while reading from socket" + fprintf (stderr,"ompi_socket_recv: error while reading from socket" " error:%s", strerror (errno) ); return MPI_ERR_OTHER; } diff --git a/ompi/mpi/c/comm_rank.c b/ompi/mpi/c/comm_rank.c index bf8b991d18c..46109e978cc 100644 --- a/ompi/mpi/c/comm_rank.c +++ b/ompi/mpi/c/comm_rank.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Comm_rank"; -int MPI_Comm_rank(MPI_Comm comm, int *rank) +int MPI_Comm_rank(MPI_Comm comm, int *rank) { MEMCHECKER( memchecker_comm(comm); @@ -48,11 +48,11 @@ int MPI_Comm_rank(MPI_Comm comm, int *rank) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); if ( NULL == rank ) - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_remote_group.c b/ompi/mpi/c/comm_remote_group.c index d2f8f4e641d..77a320ac992 100644 --- a/ompi/mpi/c/comm_remote_group.c +++ b/ompi/mpi/c/comm_remote_group.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Comm_remote_group"; -int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group) +int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group) { MEMCHECKER( memchecker_comm(comm); @@ -49,21 +49,21 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group) if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( NULL == group ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } - if ( OMPI_COMM_IS_INTER(comm) ) { + if ( OMPI_COMM_IS_INTER(comm) ) { OBJ_RETAIN(comm->c_remote_group); } else { - return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_remote_size.c b/ompi/mpi/c/comm_remote_size.c index 12d3d90ced0..95c214ad7a7 100644 --- a/ompi/mpi/c/comm_remote_size.c +++ b/ompi/mpi/c/comm_remote_size.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -48,7 +48,7 @@ int MPI_Comm_remote_size(MPI_Comm comm, int *size) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_set_attr.c b/ompi/mpi/c/comm_set_attr.c index f26c4147f06..efdda952d7c 100644 --- a/ompi/mpi/c/comm_set_attr.c +++ b/ompi/mpi/c/comm_set_attr.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Comm_set_attr"; -int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val) +int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val) { int ret; @@ -48,14 +48,14 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_set_c(COMM_ATTR, comm, &comm->c_keyhash, + ret = ompi_attr_set_c(COMM_ATTR, comm, &comm->c_keyhash, comm_keyval, attribute_val, false); - OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_set_errhandler.c b/ompi/mpi/c/comm_set_errhandler.c index 8213702042e..acb4b521b67 100644 --- a/ompi/mpi/c/comm_set_errhandler.c +++ b/ompi/mpi/c/comm_set_errhandler.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Comm_set_errhandler"; -int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) +int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) { MPI_Errhandler tmp; diff --git a/ompi/mpi/c/comm_set_info.c b/ompi/mpi/c/comm_set_info.c index cf02e66ec26..9ec65e245df 100644 --- a/ompi/mpi/c/comm_set_info.c +++ b/ompi/mpi/c/comm_set_info.c @@ -2,9 +2,9 @@ /* * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,7 +41,7 @@ int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info) FUNC_NAME); } if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } } diff --git a/ompi/mpi/c/comm_size.c b/ompi/mpi/c/comm_size.c index d995753ea52..327ad68ec79 100644 --- a/ompi/mpi/c/comm_size.c +++ b/ompi/mpi/c/comm_size.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Comm_size"; -int MPI_Comm_size(MPI_Comm comm, int *size) +int MPI_Comm_size(MPI_Comm comm, int *size) { MEMCHECKER( memchecker_comm(comm); @@ -50,7 +50,7 @@ int MPI_Comm_size(MPI_Comm comm, int *size) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_spawn.c b/ompi/mpi/c/comm_spawn.c index 71ec9a42fe3..6cb0fb2de48 100644 --- a/ompi/mpi/c/comm_spawn.c +++ b/ompi/mpi/c/comm_spawn.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -51,16 +51,16 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf ompi_communicator_t *newcomp=NULL; char port_name[MPI_MAX_PORT_NAME]; bool non_mpi = false; - + MEMCHECKER( memchecker_comm(comm); ); - + if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( OMPI_COMM_IS_INTER(comm)) { @@ -68,7 +68,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf FUNC_NAME); } if ( (0 > root) || (ompi_comm_size(comm) <= root) ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == intercomm ) { @@ -76,7 +76,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf FUNC_NAME); } } - + rank = ompi_comm_rank ( comm ); if ( MPI_PARAM_CHECK ) { if ( rank == root ) { @@ -97,7 +97,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf /* initialize the port name to avoid problems */ memset(port_name, 0, MPI_MAX_PORT_NAME); - + /* See if the info key "ompi_non_mpi" was set to true */ if (rank == root) { ompi_info_get_bool(info, "ompi_non_mpi", &non_mpi, &flag); @@ -117,7 +117,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf rc = OMPI_ERR_NOT_SUPPORTED; goto error; } - if (OMPI_SUCCESS != (rc = ompi_dpm.spawn (1, &command, &argv, &maxprocs, + if (OMPI_SUCCESS != (rc = ompi_dpm.spawn (1, &command, &argv, &maxprocs, &info, port_name))) { goto error; } @@ -136,7 +136,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf if (rank == root && !non_mpi) { ompi_dpm.close_port(port_name); } - + /* set error codes */ if (MPI_ERRCODES_IGNORE != array_of_errcodes) { for ( i=0; i < maxprocs; i++ ) { diff --git a/ompi/mpi/c/comm_spawn_multiple.c b/ompi/mpi/c/comm_spawn_multiple.c index f9b91d3748a..e46055d6417 100644 --- a/ompi/mpi/c/comm_spawn_multiple.c +++ b/ompi/mpi/c/comm_spawn_multiple.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -56,12 +56,12 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o MEMCHECKER( memchecker_comm(comm); ); - + if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( OMPI_COMM_IS_INTER(comm)) { @@ -74,7 +74,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } - + rank = ompi_comm_rank ( comm ); if ( MPI_PARAM_CHECK ) { if ( rank == root ) { @@ -91,7 +91,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_INFO, FUNC_NAME); } for (i = 0; i < count; ++i) { - if (NULL == array_of_info[i] || + if (NULL == array_of_info[i] || ompi_info_is_freed(array_of_info[i])) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INFO, FUNC_NAME); @@ -124,7 +124,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o if ( 0 > array_of_maxprocs[i] ) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } - } + } } } @@ -142,7 +142,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o /* initialize the port name to avoid problems */ memset(port_name, 0, MPI_MAX_PORT_NAME); - + OPAL_CR_ENTER_LIBRARY(); if ( rank == root ) { @@ -172,12 +172,12 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o error: OPAL_CR_EXIT_LIBRARY(); - + /* close the port */ if (rank == root && !non_mpi) { ompi_dpm.close_port(port_name); } - + /* set array of errorcodes */ if (MPI_ERRCODES_IGNORE != array_of_errcodes) { if (NULL != newcomp) { diff --git a/ompi/mpi/c/comm_split.c b/ompi/mpi/c/comm_split.c index 42aaea668b3..2ea34390c47 100644 --- a/ompi/mpi/c/comm_split.c +++ b/ompi/mpi/c/comm_split.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -48,24 +48,24 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid ( comm )) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if ( color < 0 && MPI_UNDEFINED != color ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } - + if ( NULL == newcomm ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - rc = ompi_comm_split ( (ompi_communicator_t*)comm, color, key, + rc = ompi_comm_split ( (ompi_communicator_t*)comm, color, key, (ompi_communicator_t**)newcomm, false); OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_split_type.c b/ompi/mpi/c/comm_split_type.c index 1fdece79a0f..5c407666dbe 100644 --- a/ompi/mpi/c/comm_split_type.c +++ b/ompi/mpi/c/comm_split_type.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Comm_split_type"; -int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, +int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm) { int rc; @@ -52,7 +52,7 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( ompi_comm_invalid ( comm )) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } @@ -62,25 +62,25 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, } if ( MPI_COMM_TYPE_SHARED != split_type && // Same as OMPI_COMM_TYPE_NODE - OMPI_COMM_TYPE_CLUSTER != split_type && - OMPI_COMM_TYPE_CU != split_type && - OMPI_COMM_TYPE_HOST != split_type && - OMPI_COMM_TYPE_BOARD != split_type && + OMPI_COMM_TYPE_CLUSTER != split_type && + OMPI_COMM_TYPE_CU != split_type && + OMPI_COMM_TYPE_HOST != split_type && + OMPI_COMM_TYPE_BOARD != split_type && OMPI_COMM_TYPE_NODE != split_type && // Same as MPI_COMM_TYPE_SHARED - OMPI_COMM_TYPE_NUMA != split_type && - OMPI_COMM_TYPE_SOCKET != split_type && - OMPI_COMM_TYPE_L3CACHE != split_type && - OMPI_COMM_TYPE_L2CACHE != split_type && - OMPI_COMM_TYPE_L1CACHE != split_type && - OMPI_COMM_TYPE_CORE != split_type && - OMPI_COMM_TYPE_HWTHREAD != split_type && + OMPI_COMM_TYPE_NUMA != split_type && + OMPI_COMM_TYPE_SOCKET != split_type && + OMPI_COMM_TYPE_L3CACHE != split_type && + OMPI_COMM_TYPE_L2CACHE != split_type && + OMPI_COMM_TYPE_L1CACHE != split_type && + OMPI_COMM_TYPE_CORE != split_type && + OMPI_COMM_TYPE_HWTHREAD != split_type && MPI_UNDEFINED != split_type ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } - + if ( NULL == newcomm ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } @@ -91,7 +91,7 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, *newcomm = MPI_COMM_NULL; rc = MPI_SUCCESS; } else { - rc = ompi_comm_split_type( (ompi_communicator_t*)comm, split_type, key, info, + rc = ompi_comm_split_type( (ompi_communicator_t*)comm, split_type, key, info, (ompi_communicator_t**)newcomm); } OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME); diff --git a/ompi/mpi/c/comm_test_inter.c b/ompi/mpi/c/comm_test_inter.c index 29c31132557..e15eee77b9a 100644 --- a/ompi/mpi/c/comm_test_inter.c +++ b/ompi/mpi/c/comm_test_inter.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -46,14 +46,14 @@ int MPI_Comm_test_inter(MPI_Comm comm, int *flag) { if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - + if ( ompi_comm_invalid ( comm ) ) { return OMPI_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - + if ( NULL == flag ) { - return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/compare_and_swap.c b/ompi/mpi/c/compare_and_swap.c index ae8cc5dc34b..f998fdb0b15 100644 --- a/ompi/mpi/c/compare_and_swap.c +++ b/ompi/mpi/c/compare_and_swap.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/dims_create.c b/ompi/mpi/c/dims_create.c index e91c3611be5..0b65e3685d2 100644 --- a/ompi/mpi/c/dims_create.c +++ b/ompi/mpi/c/dims_create.c @@ -5,12 +5,12 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2014 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2014 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) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ @@ -70,7 +70,7 @@ int MPI_Dims_create(int nnodes, int ndims, int dims[]) } if (1 > ndims) { - return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, + return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_DIMS, FUNC_NAME); } @@ -162,7 +162,7 @@ assignnodes(int ndim, int nfactor, int *pfacts, int **pdims) int f; int *p; int *pmin; - + if (0 >= ndim) { return MPI_ERR_DIMS; } @@ -177,7 +177,7 @@ assignnodes(int ndim, int nfactor, int *pfacts, int **pdims) for (i = 0, p = bins; i < ndim; ++i, ++p) { *p = 1; } - + /* Loop assigning factors from the highest to the lowest */ for (j = nfactor - 1; j >= 0; --j) { f = pfacts[j]; @@ -190,7 +190,7 @@ assignnodes(int ndim, int nfactor, int *pfacts, int **pdims) } *pmin *= f; } - + /* Sort dimensions in decreasing order (O(n^2) for now) */ for (i = 0, pmin = bins; i < ndim - 1; ++i, ++pmin) { for (j = i + 1, p = pmin + 1; j < ndim; ++j, ++p) { diff --git a/ompi/mpi/c/dist_graph_create.c b/ompi/mpi/c/dist_graph_create.c index b2bc6c2a804..8be9d6d05e4 100644 --- a/ompi/mpi/c/dist_graph_create.c +++ b/ompi/mpi/c/dist_graph_create.c @@ -43,10 +43,10 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm_old)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (OMPI_COMM_IS_INTER(comm_old)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (n < 0 || NULL == newcomm) { return OMPI_ERRHANDLER_INVOKE(comm_old, MPI_ERR_ARG, FUNC_NAME); @@ -80,7 +80,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], /* Ensure there is a topo attached to this communicator */ if(OMPI_SUCCESS != (err = mca_topo_base_comm_select(comm_old, NULL, &topo, OMPI_COMM_DIST_GRAPH))) { - return OMPI_ERRHANDLER_INVOKE(comm_old, err, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm_old, err, FUNC_NAME); } /* XXX -- CONST -- do not cast away const -- update mca/topo */ diff --git a/ompi/mpi/c/dist_graph_create_adjacent.c b/ompi/mpi/c/dist_graph_create_adjacent.c index f74d1595344..b791c73fa1c 100644 --- a/ompi/mpi/c/dist_graph_create_adjacent.c +++ b/ompi/mpi/c/dist_graph_create_adjacent.c @@ -11,7 +11,7 @@ * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * - * Author(s): Torsten Hoefler + * Author(s): Torsten Hoefler * */ @@ -91,7 +91,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, /* Ensure there is a topo attached to this communicator */ if(OMPI_SUCCESS != (err = mca_topo_base_comm_select(comm_old, NULL, &topo, OMPI_COMM_DIST_GRAPH))) { - return OMPI_ERRHANDLER_INVOKE(comm_old, err, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm_old, err, FUNC_NAME); } /* XXX -- CONST -- do not cast away const -- update mca/topo */ diff --git a/ompi/mpi/c/dist_graph_neighbors.c b/ompi/mpi/c/dist_graph_neighbors.c index a33db656e9b..f0e486ea618 100644 --- a/ompi/mpi/c/dist_graph_neighbors.c +++ b/ompi/mpi/c/dist_graph_neighbors.c @@ -45,11 +45,11 @@ int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (maxindegree < 0 || maxoutdegree < 0 || - (maxindegree > 0 && - (NULL == sources || NULL == sourceweights)) || + (maxindegree > 0 && + (NULL == sources || NULL == sourceweights)) || (maxoutdegree > 0 && (NULL == destinations || NULL == destweights))) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); diff --git a/ompi/mpi/c/dist_graph_neighbors_count.c b/ompi/mpi/c/dist_graph_neighbors_count.c index daa216339ab..b00b43c164b 100644 --- a/ompi/mpi/c/dist_graph_neighbors_count.c +++ b/ompi/mpi/c/dist_graph_neighbors_count.c @@ -45,9 +45,9 @@ int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *inneighbors, if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); - } else if (NULL == inneighbors || NULL == outneighbors || + } else if (NULL == inneighbors || NULL == outneighbors || NULL == weighted) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/errhandler_c2f.c b/ompi/mpi/c/errhandler_c2f.c index 399527f0533..7c58340d4ab 100644 --- a/ompi/mpi/c/errhandler_c2f.c +++ b/ompi/mpi/c/errhandler_c2f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/errhandler_create.c b/ompi/mpi/c/errhandler_create.c index d9d56f68fe4..5878c6977f6 100644 --- a/ompi/mpi/c/errhandler_create.c +++ b/ompi/mpi/c/errhandler_create.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/c/errhandler_f2c.c b/ompi/mpi/c/errhandler_f2c.c index 2c6bc5031cf..c49709c8af8 100644 --- a/ompi/mpi/c/errhandler_f2c.c +++ b/ompi/mpi/c/errhandler_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,13 +47,13 @@ MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler_f) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); } - + /* Per MPI-2:4.12.4, do not invoke an error handler if we get an invalid fortran handle. If we get an invalid fortran handle, return an invalid C handle. */ - if (eh_index < 0 || - eh_index >= + if (eh_index < 0 || + eh_index >= opal_pointer_array_get_size(&ompi_errhandler_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/errhandler_free.c b/ompi/mpi/c/errhandler_free.c index 2a6ab8b1cf6..c76b3565bd3 100644 --- a/ompi/mpi/c/errhandler_free.c +++ b/ompi/mpi/c/errhandler_free.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -48,7 +48,7 @@ int MPI_Errhandler_free(MPI_Errhandler *errhandler) actually free the underlying intrinsic object). This is ugly but necessary -- see below. */ if (NULL == errhandler || - (ompi_errhandler_is_intrinsic(*errhandler) && + (ompi_errhandler_is_intrinsic(*errhandler) && 1 == (*errhandler)->super.obj_reference_count)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, "MPI_Errhandler_free"); @@ -68,7 +68,7 @@ int MPI_Errhandler_free(MPI_Errhandler *errhandler) MPI_Finalize(); return 0; } - + So decrease the refcount here. */ OBJ_RELEASE(*errhandler); diff --git a/ompi/mpi/c/errhandler_get.c b/ompi/mpi/c/errhandler_get.c index e91c1be380a..a4b455d9c1c 100644 --- a/ompi/mpi/c/errhandler_get.c +++ b/ompi/mpi/c/errhandler_get.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Errhandler_get"; -int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler) +int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler) { MEMCHECKER( memchecker_comm(comm); diff --git a/ompi/mpi/c/errhandler_set.c b/ompi/mpi/c/errhandler_set.c index 244927b6a58..d16810a53cd 100644 --- a/ompi/mpi/c/errhandler_set.c +++ b/ompi/mpi/c/errhandler_set.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/error_class.c b/ompi/mpi/c/error_class.c index b9472573cd5..a909ebd2a4c 100644 --- a/ompi/mpi/c/error_class.c +++ b/ompi/mpi/c/error_class.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Error_class"; -int MPI_Error_class(int errorcode, int *errorclass) +int MPI_Error_class(int errorcode, int *errorclass) { OPAL_CR_NOOP_PROGRESS(); @@ -48,8 +48,8 @@ int MPI_Error_class(int errorcode, int *errorclass) FUNC_NAME); } } - - + + *errorclass = ompi_mpi_errcode_get_class(errorcode); return MPI_SUCCESS; } diff --git a/ompi/mpi/c/error_string.c b/ompi/mpi/c/error_string.c index 3b4c7dab57c..daef6340b07 100644 --- a/ompi/mpi/c/error_string.c +++ b/ompi/mpi/c/error_string.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Error_string"; -int MPI_Error_string(int errorcode, char *string, int *resultlen) +int MPI_Error_string(int errorcode, char *string, int *resultlen) { char *tmpstring; @@ -50,10 +50,10 @@ int MPI_Error_string(int errorcode, char *string, int *resultlen) FUNC_NAME); } } - + tmpstring = ompi_mpi_errnum_get_string (errorcode); strncpy(string, tmpstring, MPI_MAX_ERROR_STRING); *resultlen = (int)strlen(string); - + return MPI_SUCCESS; } diff --git a/ompi/mpi/c/exscan.c b/ompi/mpi/c/exscan.c index e145b443bc9..1f79b8e72f4 100644 --- a/ompi/mpi/c/exscan.c +++ b/ompi/mpi/c/exscan.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Exscan"; int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int err; @@ -56,7 +56,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/fetch_and_op.c b/ompi/mpi/c/fetch_and_op.c index 0ff24afa4dd..69b37a8b4ab 100644 --- a/ompi/mpi/c/fetch_and_op.c +++ b/ompi/mpi/c/fetch_and_op.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/file_c2f.c b/ompi/mpi/c/file_c2f.c index c563e547b25..f27c8a8395c 100644 --- a/ompi/mpi/c/file_c2f.c +++ b/ompi/mpi/c/file_c2f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,6 +56,6 @@ MPI_Fint MPI_File_c2f(MPI_File file) return OMPI_INT_2_FINT(-1); } } - + return OMPI_INT_2_FINT(file->f_f_to_c_index); } diff --git a/ompi/mpi/c/file_call_errhandler.c b/ompi/mpi/c/file_call_errhandler.c index 6ca285e4bca..215c44f8dd2 100644 --- a/ompi/mpi/c/file_call_errhandler.c +++ b/ompi/mpi/c/file_call_errhandler.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_File_call_errhandler"; -int MPI_File_call_errhandler(MPI_File fh, int errorcode) +int MPI_File_call_errhandler(MPI_File fh, int errorcode) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/file_close.c b/ompi/mpi/c/file_close.c index 76cc57c8cc6..1dbf3d57bc5 100644 --- a/ompi/mpi/c/file_close.c +++ b/ompi/mpi/c/file_close.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,7 +34,7 @@ static const char FUNC_NAME[] = "MPI_File_close"; -int MPI_File_close(MPI_File *fh) +int MPI_File_close(MPI_File *fh) { int rc; diff --git a/ompi/mpi/c/file_create_errhandler.c b/ompi/mpi/c/file_create_errhandler.c index d7fb3de578a..cb4d35ecda9 100644 --- a/ompi/mpi/c/file_create_errhandler.c +++ b/ompi/mpi/c/file_create_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *function, if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == function || + if (NULL == function || NULL == errhandler) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, "MPI_File_create_errhandler"); @@ -55,7 +55,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *function, /* Create and cache the errhandler. Sets a refcount of 1. */ - *errhandler = + *errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_FILE, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_C); diff --git a/ompi/mpi/c/file_delete.c b/ompi/mpi/c/file_delete.c index 6915e3f0456..e890943ad74 100644 --- a/ompi/mpi/c/file_delete.c +++ b/ompi/mpi/c/file_delete.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,7 +65,7 @@ int MPI_File_delete(const char *filename, MPI_Info info) /* The io framework is only initialized lazily. If it hasn't already been initialized, do so now (note that MPI_FILE_OPEN and MPI_FILE_DELETE are the only two places that it will be - initialized). We might want to add a check to see if the + initialized). We might want to add a check to see if the framework is open instead of just incrementing the open count. */ if (OMPI_SUCCESS != (rc = mca_base_framework_open(&ompi_io_base_framework, 0))) { diff --git a/ompi/mpi/c/file_f2c.c b/ompi/mpi/c/file_f2c.c index 3dc3c742d8e..96c5cedee5d 100644 --- a/ompi/mpi/c/file_f2c.c +++ b/ompi/mpi/c/file_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_File_f2c"; -MPI_File MPI_File_f2c(MPI_Fint file_f) +MPI_File MPI_File_f2c(MPI_Fint file_f) { int file_index = OMPI_FINT_2_INT(file_f); @@ -52,7 +52,7 @@ MPI_File MPI_File_f2c(MPI_Fint file_f) return an invalid C handle. */ if (file_index < 0 || - file_index >= + file_index >= opal_pointer_array_get_size(&ompi_file_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/file_get_amode.c b/ompi/mpi/c/file_get_amode.c index 6dd37b96dfa..2f93382f1fa 100644 --- a/ompi/mpi/c/file_get_amode.c +++ b/ompi/mpi/c/file_get_amode.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,6 +67,6 @@ int MPI_File_get_amode(MPI_File fh, int *amode) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_atomicity.c b/ompi/mpi/c/file_get_atomicity.c index 78c448c1cc5..7c1fad26210 100644 --- a/ompi/mpi/c/file_get_atomicity.c +++ b/ompi/mpi/c/file_get_atomicity.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,6 +67,6 @@ int MPI_File_get_atomicity(MPI_File fh, int *flag) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_byte_offset.c b/ompi/mpi/c/file_get_byte_offset.c index 5c09db19f62..bb54de9d638 100644 --- a/ompi/mpi/c/file_get_byte_offset.c +++ b/ompi/mpi/c/file_get_byte_offset.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,6 +68,6 @@ int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_errhandler.c b/ompi/mpi/c/file_get_errhandler.c index 49eb8c7e60e..21f49c89047 100644 --- a/ompi/mpi/c/file_get_errhandler.c +++ b/ompi/mpi/c/file_get_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_File_get_errhandler"; -int MPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler) +int MPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler) { MPI_Errhandler tmp; diff --git a/ompi/mpi/c/file_get_group.c b/ompi/mpi/c/file_get_group.c index 3a802b3e158..5ef6c88c61f 100644 --- a/ompi/mpi/c/file_get_group.c +++ b/ompi/mpi/c/file_get_group.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/c/file_get_info.c b/ompi/mpi/c/file_get_info.c index b2b2447cc1d..c0f6c4f81eb 100644 --- a/ompi/mpi/c/file_get_info.c +++ b/ompi/mpi/c/file_get_info.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,6 +67,6 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_position.c b/ompi/mpi/c/file_get_position.c index e161b1f4c0c..66814f2973b 100644 --- a/ompi/mpi/c/file_get_position.c +++ b/ompi/mpi/c/file_get_position.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,6 +67,6 @@ int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_position_shared.c b/ompi/mpi/c/file_get_position_shared.c index e8bdd26337e..1403a494d3e 100644 --- a/ompi/mpi/c/file_get_position_shared.c +++ b/ompi/mpi/c/file_get_position_shared.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,6 +67,6 @@ int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_size.c b/ompi/mpi/c/file_get_size.c index fa103179cc5..51590e12fce 100644 --- a/ompi/mpi/c/file_get_size.c +++ b/ompi/mpi/c/file_get_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,6 +67,6 @@ int MPI_File_get_size(MPI_File fh, MPI_Offset *size) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_type_extent.c b/ompi/mpi/c/file_get_type_extent.c index 1e5beccd9c9..59f4cb5026b 100644 --- a/ompi/mpi/c/file_get_type_extent.c +++ b/ompi/mpi/c/file_get_type_extent.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -73,6 +73,6 @@ int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_get_view.c b/ompi/mpi/c/file_get_view.c index 2780762ea85..7ed4c19745d 100644 --- a/ompi/mpi/c/file_get_view.c +++ b/ompi/mpi/c/file_get_view.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -71,6 +71,6 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_iread.c b/ompi/mpi/c/file_iread.c index e8b54937be3..407c3e01e57 100644 --- a/ompi/mpi/c/file_iread.c +++ b/ompi/mpi/c/file_iread.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_File_iread"; -int MPI_File_iread(MPI_File fh, void *buf, int count, +int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) { int rc; @@ -47,7 +47,7 @@ int MPI_File_iread(MPI_File fh, void *buf, int count, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/file_iread_at.c b/ompi/mpi/c/file_iread_at.c index 9fac64e4d8a..904b537bf09 100644 --- a/ompi/mpi/c/file_iread_at.c +++ b/ompi/mpi/c/file_iread_at.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -70,7 +70,7 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, switch (fh->f_io_version) { case MCA_IO_BASE_V_2_0_0: rc = fh->f_io_selected_module.v2_0_0. - io_module_file_iread_at(fh, offset, buf, count, datatype, + io_module_file_iread_at(fh, offset, buf, count, datatype, request); break; @@ -80,6 +80,6 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_iread_shared.c b/ompi/mpi/c/file_iread_shared.c index d30c7b3206c..b43d22eeb88 100644 --- a/ompi/mpi/c/file_iread_shared.c +++ b/ompi/mpi/c/file_iread_shared.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -79,6 +79,6 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_iwrite.c b/ompi/mpi/c/file_iwrite.c index 58205181949..2e3c0084cc8 100644 --- a/ompi/mpi/c/file_iwrite.c +++ b/ompi/mpi/c/file_iwrite.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/file_iwrite_at.c b/ompi/mpi/c/file_iwrite_at.c index 5185d77571e..f35cc7003d3 100644 --- a/ompi/mpi/c/file_iwrite_at.c +++ b/ompi/mpi/c/file_iwrite_at.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_File_iwrite_at"; int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, - int count, MPI_Datatype datatype, + int count, MPI_Datatype datatype, MPI_Request *request) { int rc; @@ -86,6 +86,6 @@ int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_iwrite_shared.c b/ompi/mpi/c/file_iwrite_shared.c index 102e06f822e..6bc2bd375c5 100644 --- a/ompi/mpi/c/file_iwrite_shared.c +++ b/ompi/mpi/c/file_iwrite_shared.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -83,6 +83,6 @@ int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_open.c b/ompi/mpi/c/file_open.c index 3cdf3cccc6b..248747a1aac 100644 --- a/ompi/mpi/c/file_open.c +++ b/ompi/mpi/c/file_open.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,7 +65,7 @@ int MPI_File_open(MPI_Comm comm, const char *filename, int amode, return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } - + } /* Note that MPI-2:9.7 (p265 in the ps; p261 in the pdf) says that diff --git a/ompi/mpi/c/file_preallocate.c b/ompi/mpi/c/file_preallocate.c index 23f764f35e1..fd5bb48309f 100644 --- a/ompi/mpi/c/file_preallocate.c +++ b/ompi/mpi/c/file_preallocate.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read.c b/ompi/mpi/c/file_read.c index df8eeed62cd..df89953b009 100644 --- a/ompi/mpi/c/file_read.c +++ b/ompi/mpi/c/file_read.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_File_read"; -int MPI_File_read(MPI_File fh, void *buf, int count, +int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { int rc; @@ -45,7 +45,7 @@ int MPI_File_read(MPI_File fh, void *buf, int count, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -76,6 +76,6 @@ int MPI_File_read(MPI_File fh, void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_all.c b/ompi/mpi/c/file_read_all.c index b6fbe84f5a7..ec2e1bc5d7a 100644 --- a/ompi/mpi/c/file_read_all.c +++ b/ompi/mpi/c/file_read_all.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,6 +76,6 @@ int MPI_File_read_all(MPI_File fh, void *buf, int count, MPI_Datatype } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_all_begin.c b/ompi/mpi/c/file_read_all_begin.c index 9ba2781b47f..b56a3491f98 100644 --- a/ompi/mpi/c/file_read_all_begin.c +++ b/ompi/mpi/c/file_read_all_begin.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,14 +38,14 @@ static const char FUNC_NAME[] = "MPI_File_read_all_begin"; int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, - MPI_Datatype datatype) + MPI_Datatype datatype) { int rc; MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -76,6 +76,6 @@ int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_all_end.c b/ompi/mpi/c/file_read_all_end.c index 06d4058f50a..4ef066d5340 100644 --- a/ompi/mpi/c/file_read_all_end.c +++ b/ompi/mpi/c/file_read_all_end.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_read_all_end(MPI_File fh, void *buf, MPI_Status *status) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_at.c b/ompi/mpi/c/file_read_at.c index 8ada29e79f5..c8264c946e0 100644 --- a/ompi/mpi/c/file_read_at.c +++ b/ompi/mpi/c/file_read_at.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -76,6 +76,6 @@ int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_at_all.c b/ompi/mpi/c/file_read_at_all.c index 6f13146d176..386dfa4026e 100644 --- a/ompi/mpi/c/file_read_at_all.c +++ b/ompi/mpi/c/file_read_at_all.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_File_read_at_all"; int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, - int count, MPI_Datatype datatype, + int count, MPI_Datatype datatype, MPI_Status *status) { int rc; @@ -46,7 +46,7 @@ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -68,7 +68,7 @@ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, switch (fh->f_io_version) { case MCA_IO_BASE_V_2_0_0: rc = fh->f_io_selected_module.v2_0_0. - io_module_file_read_at_all(fh, offset, buf, count, datatype, + io_module_file_read_at_all(fh, offset, buf, count, datatype, status); break; @@ -78,6 +78,6 @@ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_at_all_begin.c b/ompi/mpi/c/file_read_at_all_begin.c index 9a1c1f1e2ea..b9a7053bfe5 100644 --- a/ompi/mpi/c/file_read_at_all_begin.c +++ b/ompi/mpi/c/file_read_at_all_begin.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -76,6 +76,6 @@ int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_at_all_end.c b/ompi/mpi/c/file_read_at_all_end.c index 4a8b71f0ae7..f718de9bca2 100644 --- a/ompi/mpi/c/file_read_at_all_end.c +++ b/ompi/mpi/c/file_read_at_all_end.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_read_at_all_end(MPI_File fh, void *buf, MPI_Status *status) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_ordered.c b/ompi/mpi/c/file_read_ordered.c index 5cd29e66aec..4434ecb104f 100644 --- a/ompi/mpi/c/file_read_ordered.c +++ b/ompi/mpi/c/file_read_ordered.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -71,6 +71,6 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_ordered_begin.c b/ompi/mpi/c/file_read_ordered_begin.c index eb925672bab..145edee4a54 100644 --- a/ompi/mpi/c/file_read_ordered_begin.c +++ b/ompi/mpi/c/file_read_ordered_begin.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -76,6 +76,6 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_ordered_end.c b/ompi/mpi/c/file_read_ordered_end.c index 22a2d07daf5..8ec7869d37c 100644 --- a/ompi/mpi/c/file_read_ordered_end.c +++ b/ompi/mpi/c/file_read_ordered_end.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_read_shared.c b/ompi/mpi/c/file_read_shared.c index 76ccc732bc4..93d6327fd98 100644 --- a/ompi/mpi/c/file_read_shared.c +++ b/ompi/mpi/c/file_read_shared.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -76,6 +76,6 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_seek.c b/ompi/mpi/c/file_seek.c index 867ebb74ad8..136c2b19438 100644 --- a/ompi/mpi/c/file_seek.c +++ b/ompi/mpi/c/file_seek.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_File_seek"; -int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) +int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) { int rc; @@ -68,6 +68,6 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_seek_shared.c b/ompi/mpi/c/file_seek_shared.c index 360cf9444b0..8ab65e132da 100644 --- a/ompi/mpi/c/file_seek_shared.c +++ b/ompi/mpi/c/file_seek_shared.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,6 +68,6 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_set_atomicity.c b/ompi/mpi/c/file_set_atomicity.c index 3973ec417e1..7a7065be346 100644 --- a/ompi/mpi/c/file_set_atomicity.c +++ b/ompi/mpi/c/file_set_atomicity.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_set_atomicity(MPI_File fh, int flag) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_set_errhandler.c b/ompi/mpi/c/file_set_errhandler.c index ac1c24d9e12..ad147831079 100644 --- a/ompi/mpi/c/file_set_errhandler.c +++ b/ompi/mpi/c/file_set_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_File_set_errhandler"; -int MPI_File_set_errhandler( MPI_File file, MPI_Errhandler errhandler) +int MPI_File_set_errhandler( MPI_File file, MPI_Errhandler errhandler) { MPI_Errhandler tmp; @@ -55,7 +55,7 @@ int MPI_File_set_errhandler( MPI_File file, MPI_Errhandler errhandler) FUNC_NAME); } else if (NULL == errhandler || MPI_ERRHANDLER_NULL == errhandler || - (OMPI_ERRHANDLER_TYPE_FILE != errhandler->eh_mpi_object_type && + (OMPI_ERRHANDLER_TYPE_FILE != errhandler->eh_mpi_object_type && OMPI_ERRHANDLER_TYPE_PREDEFINED != errhandler->eh_mpi_object_type) ) { return OMPI_ERRHANDLER_INVOKE(file, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/file_set_info.c b/ompi/mpi/c/file_set_info.c index 9e07d868a7e..4f206640cff 100644 --- a/ompi/mpi/c/file_set_info.c +++ b/ompi/mpi/c/file_set_info.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -66,6 +66,6 @@ int MPI_File_set_info(MPI_File fh, MPI_Info info) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_set_size.c b/ompi/mpi/c/file_set_size.c index 522f181f114..6ea67554d29 100644 --- a/ompi/mpi/c/file_set_size.c +++ b/ompi/mpi/c/file_set_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_set_view.c b/ompi/mpi/c/file_set_view.c index f6372466ccd..9ab19eafafd 100644 --- a/ompi/mpi/c/file_set_view.c +++ b/ompi/mpi/c/file_set_view.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,7 +49,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MEMCHECKER( memchecker_datatype(etype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -82,6 +82,6 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_sync.c b/ompi/mpi/c/file_sync.c index 2d63dc4d774..e7a0fe521d4 100644 --- a/ompi/mpi/c/file_sync.c +++ b/ompi/mpi/c/file_sync.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,6 +65,6 @@ int MPI_File_sync(MPI_File fh) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write.c b/ompi/mpi/c/file_write.c index 36daaefe9e4..765eef7b7a0 100644 --- a/ompi/mpi/c/file_write.c +++ b/ompi/mpi/c/file_write.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,6 +81,6 @@ int MPI_File_write(MPI_File fh, const void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_all.c b/ompi/mpi/c/file_write_all.c index 25ee4dd594f..49eb9fa577b 100644 --- a/ompi/mpi/c/file_write_all.c +++ b/ompi/mpi/c/file_write_all.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,6 +81,6 @@ int MPI_File_write_all(MPI_File fh, const void *buf, int count, MPI_Datatype } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_all_begin.c b/ompi/mpi/c/file_write_all_begin.c index aa71776ad0a..9db13251df0 100644 --- a/ompi/mpi/c/file_write_all_begin.c +++ b/ompi/mpi/c/file_write_all_begin.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,6 +81,6 @@ int MPI_File_write_all_begin(MPI_File fh, const void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_all_end.c b/ompi/mpi/c/file_write_all_end.c index 3f554db1868..9d890ed274f 100644 --- a/ompi/mpi/c/file_write_all_end.c +++ b/ompi/mpi/c/file_write_all_end.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,6 +69,6 @@ int MPI_File_write_all_end(MPI_File fh, const void *buf, MPI_Status *status) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_at.c b/ompi/mpi/c/file_write_at.c index 8841b7d591a..8e8ecb354f8 100644 --- a/ompi/mpi/c/file_write_at.c +++ b/ompi/mpi/c/file_write_at.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -82,6 +82,6 @@ int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_at_all.c b/ompi/mpi/c/file_write_at_all.c index eaa59b2d88a..2b7d9c06c32 100644 --- a/ompi/mpi/c/file_write_at_all.c +++ b/ompi/mpi/c/file_write_at_all.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -83,6 +83,6 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_at_all_begin.c b/ompi/mpi/c/file_write_at_all_begin.c index 8635e4bde8d..eedacea400d 100644 --- a/ompi/mpi/c/file_write_at_all_begin.c +++ b/ompi/mpi/c/file_write_at_all_begin.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -82,6 +82,6 @@ int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, const void *buf, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_at_all_end.c b/ompi/mpi/c/file_write_at_all_end.c index 6b0e534ed94..d42e63190bb 100644 --- a/ompi/mpi/c/file_write_at_all_end.c +++ b/ompi/mpi/c/file_write_at_all_end.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,6 +69,6 @@ int MPI_File_write_at_all_end(MPI_File fh, const void *buf, MPI_Status *status) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_ordered.c b/ompi/mpi/c/file_write_ordered.c index a638847fcd4..96a6420af85 100644 --- a/ompi/mpi/c/file_write_ordered.c +++ b/ompi/mpi/c/file_write_ordered.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,6 +81,6 @@ int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_ordered_begin.c b/ompi/mpi/c/file_write_ordered_begin.c index d0a605de38b..9bff982437d 100644 --- a/ompi/mpi/c/file_write_ordered_begin.c +++ b/ompi/mpi/c/file_write_ordered_begin.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -49,7 +49,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, int count, memchecker_datatype(datatype); memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); ); - + if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -81,6 +81,6 @@ int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_ordered_end.c b/ompi/mpi/c/file_write_ordered_end.c index 8cd41716398..46ab8bd2c98 100644 --- a/ompi/mpi/c/file_write_ordered_end.c +++ b/ompi/mpi/c/file_write_ordered_end.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,6 +69,6 @@ int MPI_File_write_ordered_end(MPI_File fh, const void *buf, MPI_Status *status) } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/file_write_shared.c b/ompi/mpi/c/file_write_shared.c index 286c10fa805..6d0db9ddd34 100644 --- a/ompi/mpi/c/file_write_shared.c +++ b/ompi/mpi/c/file_write_shared.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,6 +81,6 @@ int MPI_File_write_shared(MPI_File fh, const void *buf, int count, } /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/finalize.c b/ompi/mpi/c/finalize.c index 7c69eb481d3..2892e078710 100644 --- a/ompi/mpi/c/finalize.c +++ b/ompi/mpi/c/finalize.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/c/finalized.c b/ompi/mpi/c/finalized.c index ed0a244ef8b..e26d6f697bd 100644 --- a/ompi/mpi/c/finalized.c +++ b/ompi/mpi/c/finalized.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,7 +34,7 @@ static const char FUNC_NAME[] = "MPI_Finalized"; -int MPI_Finalized(int *flag) +int MPI_Finalized(int *flag) { MPI_Comm null = NULL; diff --git a/ompi/mpi/c/free_mem.c b/ompi/mpi/c/free_mem.c index e842ce1c635..bc77c2d8065 100644 --- a/ompi/mpi/c/free_mem.c +++ b/ompi/mpi/c/free_mem.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,8 +44,8 @@ int MPI_Free_mem(void *baseptr) /* Per these threads: - http://www.open-mpi.org/community/lists/devel/2007/07/1977.php - http://www.open-mpi.org/community/lists/devel/2007/07/1979.php + http://www.open-mpi.org/community/lists/devel/2007/07/1977.php + http://www.open-mpi.org/community/lists/devel/2007/07/1979.php If you call MPI_ALLOC_MEM with a size of 0, you get NULL back. So don't consider a NULL==baseptr an error. */ diff --git a/ompi/mpi/c/gather.c b/ompi/mpi/c/gather.c index ed788a077a8..3f5f6b22eb1 100644 --- a/ompi/mpi/c/gather.c +++ b/ompi/mpi/c/gather.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -18,7 +18,7 @@ * $COPYRIGHT$ * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -44,7 +44,7 @@ static const char FUNC_NAME[] = "MPI_Gather"; int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, - int root, MPI_Comm comm) + int root, MPI_Comm comm) { int err; @@ -60,14 +60,14 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, if(ompi_comm_rank(comm) == root) { /* check whether root's send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { - memchecker_call(&opal_memchecker_base_isdefined, - (char *)(recvbuf)+rank*ext, + memchecker_call(&opal_memchecker_base_isdefined, + (char *)(recvbuf)+rank*ext, recvcount, recvtype); } else { memchecker_datatype(sendtype); memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } - + memchecker_datatype(recvtype); /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); @@ -88,12 +88,12 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, } } ); - + if (MPI_PARAM_CHECK) { err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == sendbuf) || (ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf)) { @@ -123,7 +123,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, if (ompi_comm_rank(comm) == root) { if (MPI_DATATYPE_NULL == recvtype || NULL == recvtype) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME); } if (recvcount < 0) { @@ -157,7 +157,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, } if (MPI_DATATYPE_NULL == recvtype || NULL == recvtype) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME); } } } @@ -165,11 +165,11 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, /* Do we need to do anything? */ - if ((0 == sendcount && MPI_ROOT != root && + if ((0 == sendcount && MPI_ROOT != root && (ompi_comm_rank(comm) != root || (ompi_comm_rank(comm) == root && MPI_IN_PLACE != sendbuf))) || - (ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf && - 0 == recvcount) || + (ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf && + 0 == recvcount) || (0 == recvcount && (MPI_ROOT == root || MPI_PROC_NULL == root))) { return MPI_SUCCESS; } diff --git a/ompi/mpi/c/gatherv.c b/ompi/mpi/c/gatherv.c index b3b384ac44d..5db19c85dcf 100644 --- a/ompi/mpi/c/gatherv.c +++ b/ompi/mpi/c/gatherv.c @@ -6,17 +6,17 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Gatherv"; int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], - MPI_Datatype recvtype, int root, MPI_Comm comm) + MPI_Datatype recvtype, int root, MPI_Comm comm) { int i, size, err; @@ -68,7 +68,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, memchecker_datatype(sendtype); memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } - + memchecker_datatype(recvtype); /* check whether root's receive buffer is addressable. */ for (i = 0; i < size; i++) { @@ -91,7 +91,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, recvcounts[i], recvtype); } } else if (MPI_PROC_NULL != root) { - memchecker_datatype(sendtype); + memchecker_datatype(sendtype); /* check whether send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } @@ -102,7 +102,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == sendbuf) || (ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf)) { @@ -181,7 +181,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, if (recvcounts[i] < 0) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT, FUNC_NAME); } else if (MPI_DATATYPE_NULL == recvtype || NULL == recvtype) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME); } } } diff --git a/ompi/mpi/c/get.c b/ompi/mpi/c/get.c index 8f1937334ea..22edcdd3ae5 100644 --- a/ompi/mpi/c/get.c +++ b/ompi/mpi/c/get.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Get"; int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Win win) + MPI_Datatype target_datatype, MPI_Win win) { int rc; diff --git a/ompi/mpi/c/get_address.c b/ompi/mpi/c/get_address.c index e37f9497a1b..6dc2c0d7826 100644 --- a/ompi/mpi/c/get_address.c +++ b/ompi/mpi/c/get_address.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/get_count.c b/ompi/mpi/c/get_count.c index 2994f32f7c6..9363ea00bda 100644 --- a/ompi/mpi/c/get_count.c +++ b/ompi/mpi/c/get_count.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/get_elements.c b/ompi/mpi/c/get_elements.c index 76fd3c3b6e6..99ece8097a2 100644 --- a/ompi/mpi/c/get_elements.c +++ b/ompi/mpi/c/get_elements.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -62,7 +62,7 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count if (MPI_PARAM_CHECK) { int err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == status || MPI_STATUSES_IGNORE == status || + if (NULL == status || MPI_STATUSES_IGNORE == status || MPI_STATUS_IGNORE == status || NULL == count) { err = MPI_ERR_ARG; } else if (NULL == datatype || MPI_DATATYPE_NULL == datatype) { diff --git a/ompi/mpi/c/get_elements_x.c b/ompi/mpi/c/get_elements_x.c index 6cd2fc19be6..3d7a72a94cb 100644 --- a/ompi/mpi/c/get_elements_x.c +++ b/ompi/mpi/c/get_elements_x.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -62,7 +62,7 @@ int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Coun if (MPI_PARAM_CHECK) { int err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == status || MPI_STATUSES_IGNORE == status || + if (NULL == status || MPI_STATUSES_IGNORE == status || MPI_STATUS_IGNORE == status || NULL == count) { err = MPI_ERR_ARG; } else if (NULL == datatype || MPI_DATATYPE_NULL == datatype) { diff --git a/ompi/mpi/c/get_library_version.c b/ompi/mpi/c/get_library_version.c index ec276c86845..f8d4a32165c 100644 --- a/ompi/mpi/c/get_library_version.c +++ b/ompi/mpi/c/get_library_version.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Get_library_version"; -int MPI_Get_library_version(char *version, int *resultlen) +int MPI_Get_library_version(char *version, int *resultlen) { int len_left; MPI_Comm null = MPI_COMM_NULL; @@ -47,7 +47,7 @@ int MPI_Get_library_version(char *version, int *resultlen) /* Per MPI-3, this function can be invoked before MPI_INIT, so we don't invoke the normal MPI_ERR_INIT_FINALIZE() macro here */ - + if (NULL == version || NULL == resultlen) { /* Note that we have to check and see if we have previously called MPI_INIT or not. If so, use the @@ -111,7 +111,7 @@ int MPI_Get_library_version(char *version, int *resultlen) snprintf(ptr, len_left, ", %s", OMPI_RELEASE_DATE); ptr = tmp + strlen(tmp); len_left = MPI_MAX_LIBRARY_VERSION_STRING - strlen(tmp); - } + } memcpy(version, tmp, strlen(tmp) + 1); *resultlen = strlen(tmp) + 1; diff --git a/ompi/mpi/c/get_processor_name.c b/ompi/mpi/c/get_processor_name.c index 1a4a5682e07..30d95d5e63f 100644 --- a/ompi/mpi/c/get_processor_name.c +++ b/ompi/mpi/c/get_processor_name.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,18 +39,18 @@ static const char FUNC_NAME[] = "MPI_Get_processor_name"; -int MPI_Get_processor_name(char *name, int *resultlen) +int MPI_Get_processor_name(char *name, int *resultlen) { OPAL_CR_NOOP_PROGRESS(); if ( MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == name ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == resultlen ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/get_version.c b/ompi/mpi/c/get_version.c index b5957e12908..beb5db27933 100644 --- a/ompi/mpi/c/get_version.c +++ b/ompi/mpi/c/get_version.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -34,7 +34,7 @@ static const char FUNC_NAME[] = "MPI_Get_version"; -int MPI_Get_version(int *version, int *subversion) +int MPI_Get_version(int *version, int *subversion) { MPI_Comm null = NULL; @@ -44,7 +44,7 @@ int MPI_Get_version(int *version, int *subversion) /* Per MPI-2:3.1, this function can be invoked before MPI_INIT, so we don't invoke the normal MPI_ERR_INIT_FINALIZE() macro here */ - + if (NULL == version || NULL == subversion) { /* Note that we have to check and see if we have previously called MPI_INIT or not. If so, use the diff --git a/ompi/mpi/c/graph_create.c b/ompi/mpi/c/graph_create.c index 1221368cb09..de4d0b094e2 100644 --- a/ompi/mpi/c/graph_create.c +++ b/ompi/mpi/c/graph_create.c @@ -6,18 +6,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -58,7 +58,7 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, const int indx[], return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (OMPI_COMM_IS_INTER(old_comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } if (nnodes < 0) { @@ -87,9 +87,9 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, const int indx[], } OPAL_CR_ENTER_LIBRARY(); - /* - * everything seems to be alright with the communicator, we can go - * ahead and select a topology module for this purpose and create + /* + * everything seems to be alright with the communicator, we can go + * ahead and select a topology module for this purpose and create * the new graph communicator */ if (OMPI_SUCCESS != (err = mca_topo_base_comm_select(old_comm, @@ -99,7 +99,7 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, const int indx[], return err; } - /* Now let that topology module rearrange procs/ranks if it wants to */ + /* Now let that topology module rearrange procs/ranks if it wants to */ /* XXX -- CONST -- do not cast away const -- update mca/topo */ err = topo->topo.graph.graph_create(topo, old_comm, nnodes, (int *) indx, (int *) edges, @@ -110,7 +110,7 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, const int indx[], OBJ_RELEASE(topo); return OMPI_ERRHANDLER_INVOKE(old_comm, err, FUNC_NAME); } - + /* All done */ return MPI_SUCCESS; } diff --git a/ompi/mpi/c/graph_get.c b/ompi/mpi/c/graph_get.c index 1768932baf8..271ebcdf1f2 100644 --- a/ompi/mpi/c/graph_get.c +++ b/ompi/mpi/c/graph_get.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2012 Los Alamos Nat Security, LLC. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Graph_get"; int MPI_Graph_get(MPI_Comm comm, int maxindx, int maxedges, - int indx[], int edges[]) + int indx[], int edges[]) { int err; diff --git a/ompi/mpi/c/graph_map.c b/ompi/mpi/c/graph_map.c index 769c4a404d8..6e554f0ba3a 100644 --- a/ompi/mpi/c/graph_map.c +++ b/ompi/mpi/c/graph_map.c @@ -6,18 +6,18 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Graph_map"; int MPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[], - int *newrank) + int *newrank) { int err = MPI_SUCCESS; @@ -70,7 +70,7 @@ int MPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[] OPAL_CR_ENTER_LIBRARY(); if(!OMPI_COMM_IS_GRAPH(comm)) { - /* In case the communicator has no topo-module attached to + /* In case the communicator has no topo-module attached to it, we just return the "default" value suggested by MPI: newrank = rank */ *newrank = ompi_comm_rank(comm); diff --git a/ompi/mpi/c/graph_neighbors.c b/ompi/mpi/c/graph_neighbors.c index 1e47cc233e4..c2371ffbfc2 100644 --- a/ompi/mpi/c/graph_neighbors.c +++ b/ompi/mpi/c/graph_neighbors.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2012 Los Alamos Nat Security, LLC. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Graph_neighbors"; int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, - int neighbors[]) + int neighbors[]) { int err; diff --git a/ompi/mpi/c/graph_neighbors_count.c b/ompi/mpi/c/graph_neighbors_count.c index ba8970b8c07..b578a2fba12 100644 --- a/ompi/mpi/c/graph_neighbors_count.c +++ b/ompi/mpi/c/graph_neighbors_count.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Graph_neighbors_count"; -int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors) +int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors) { int err; diff --git a/ompi/mpi/c/graphdims_get.c b/ompi/mpi/c/graphdims_get.c index 66dcbe8a2f7..bf53d77c63e 100644 --- a/ompi/mpi/c/graphdims_get.c +++ b/ompi/mpi/c/graphdims_get.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Graphdims_get"; -int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges) +int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges) { int err; diff --git a/ompi/mpi/c/grequest_complete.c b/ompi/mpi/c/grequest_complete.c index 25f3d3e2aac..f2a748dd906 100644 --- a/ompi/mpi/c/grequest_complete.c +++ b/ompi/mpi/c/grequest_complete.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Grequest_complete"; -int MPI_Grequest_complete(MPI_Request request) +int MPI_Grequest_complete(MPI_Request request) { int rc = MPI_SUCCESS; diff --git a/ompi/mpi/c/grequest_start.c b/ompi/mpi/c/grequest_start.c index 9b867e4d313..3a40ff44a50 100644 --- a/ompi/mpi/c/grequest_start.c +++ b/ompi/mpi/c/grequest_start.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Grequest_start"; int MPI_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, - void *extra_state, MPI_Request *request) + void *extra_state, MPI_Request *request) { int rc; diff --git a/ompi/mpi/c/group_c2f.c b/ompi/mpi/c/group_c2f.c index b50cc6b74eb..41a39c6da43 100644 --- a/ompi/mpi/c/group_c2f.c +++ b/ompi/mpi/c/group_c2f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Group_c2f"; -MPI_Fint MPI_Group_c2f(MPI_Group group) +MPI_Fint MPI_Group_c2f(MPI_Group group) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/group_compare.c b/ompi/mpi/c/group_compare.c index 164b4d5a0b4..36495b75bcb 100644 --- a/ompi/mpi/c/group_compare.c +++ b/ompi/mpi/c/group_compare.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2009 University of Houston. All rights reserved. * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/group_difference.c b/ompi/mpi/c/group_difference.c index b9a8df11c6a..be9a8307aaa 100644 --- a/ompi/mpi/c/group_difference.c +++ b/ompi/mpi/c/group_difference.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/group_excl.c b/ompi/mpi/c/group_excl.c index 0afb2ccfa91..6caa4ffcedd 100644 --- a/ompi/mpi/c/group_excl.c +++ b/ompi/mpi/c/group_excl.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos Nat Security, LLC. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Group_excl"; int MPI_Group_excl(MPI_Group group, int n, const int ranks[], - MPI_Group *new_group) + MPI_Group *new_group) { ompi_group_t *group_pointer = (ompi_group_t *)group; int i, err, group_size; @@ -50,7 +50,7 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], OMPI_ERR_INIT_FINALIZE(FUNC_NAME); /* verify that group is valid group */ - if ( (MPI_GROUP_NULL == group) || (NULL == group) || + if ( (MPI_GROUP_NULL == group) || (NULL == group) || (NULL == new_group) ) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, FUNC_NAME); @@ -74,7 +74,7 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], } } /* end if( MPI_CHECK_ARGS) */ - + if ( n == group_size ) { *new_group = MPI_GROUP_EMPTY; OBJ_RETAIN(MPI_GROUP_EMPTY); @@ -84,5 +84,5 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], OPAL_CR_ENTER_LIBRARY(); err = ompi_group_excl ( group, n, ranks, new_group ); - OMPI_ERRHANDLER_RETURN(err, MPI_COMM_WORLD, err, FUNC_NAME ); + OMPI_ERRHANDLER_RETURN(err, MPI_COMM_WORLD, err, FUNC_NAME ); } diff --git a/ompi/mpi/c/group_f2c.c b/ompi/mpi/c/group_f2c.c index 0c3202652a0..b567ea9f9ec 100644 --- a/ompi/mpi/c/group_f2c.c +++ b/ompi/mpi/c/group_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/group_free.c b/ompi/mpi/c/group_free.c index 374aac9156f..985789682ca 100644 --- a/ompi/mpi/c/group_free.c +++ b/ompi/mpi/c/group_free.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/group_incl.c b/ompi/mpi/c/group_incl.c index baab6c5a4f7..fc7bd80fc44 100644 --- a/ompi/mpi/c/group_incl.c +++ b/ompi/mpi/c/group_incl.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -69,12 +69,12 @@ int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *new_gro for (i = 0; i < n; i++) { if ((ranks[i] < 0) || (ranks[i] >= group_size)){ - return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_RANK, + return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_RANK, FUNC_NAME); } } } /* end if( MPI_CHECK_ARGS) */ - + if ( 0 == n ) { *new_group = MPI_GROUP_EMPTY; OBJ_RETAIN(MPI_GROUP_EMPTY); diff --git a/ompi/mpi/c/group_intersection.c b/ompi/mpi/c/group_intersection.c index 71828287684..e2325b39c71 100644 --- a/ompi/mpi/c/group_intersection.c +++ b/ompi/mpi/c/group_intersection.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,13 +38,13 @@ static const char FUNC_NAME[] = "MPI_Group_intersection"; int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, - MPI_Group *new_group) + MPI_Group *new_group) { int err; if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - + /* verify that groups are valid */ if ( (MPI_GROUP_NULL == group1) || (MPI_GROUP_NULL == group2) || ( NULL == group1) || (NULL == group2) || diff --git a/ompi/mpi/c/group_range_excl.c b/ompi/mpi/c/group_range_excl.c index adc674fefae..9e2992ce787 100644 --- a/ompi/mpi/c/group_range_excl.c +++ b/ompi/mpi/c/group_range_excl.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,24 +38,24 @@ static const char FUNC_NAME[] = "MPI_Group_range_excl"; int MPI_Group_range_excl(MPI_Group group, int n_triplets, int ranges[][3], - MPI_Group *new_group) + MPI_Group *new_group) { int err, i, group_size, indx; int * elements_int_list; - + /* can't act on NULL group */ if( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( (MPI_GROUP_NULL == group) || (NULL == group) || (NULL == new_group) ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, FUNC_NAME); } group_size = ompi_group_size ( group ); elements_int_list = (int *) malloc(sizeof(int) * (group_size+1)); if (NULL == elements_int_list) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } for (i = 0; i < group_size; i++) { @@ -85,7 +85,7 @@ int MPI_Group_range_excl(MPI_Group group, int n_triplets, int ranges[][3], } elements_int_list[indx] = i; } - } else if (ranges[i][0] > ranges[i][1]) { + } else if (ranges[i][0] > ranges[i][1]) { if (ranges[i][2] > 0) { goto error_rank; } @@ -106,7 +106,7 @@ int MPI_Group_range_excl(MPI_Group group, int n_triplets, int ranges[][3], elements_int_list[indx] = i; } } - + free (elements_int_list); } diff --git a/ompi/mpi/c/group_range_incl.c b/ompi/mpi/c/group_range_incl.c index 1d7d9ab6b5d..ea8a2e7ac62 100644 --- a/ompi/mpi/c/group_range_incl.c +++ b/ompi/mpi/c/group_range_incl.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Group_range_incl"; int MPI_Group_range_incl(MPI_Group group, int n_triplets, int ranges[][3], - MPI_Group *new_group) + MPI_Group *new_group) { int err, i,indx; int group_size; @@ -47,7 +47,7 @@ int MPI_Group_range_incl(MPI_Group group, int n_triplets, int ranges[][3], /* can't act on NULL group */ if( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - + if ( (MPI_GROUP_NULL == group) || (NULL == group) || (NULL == new_group) ) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, diff --git a/ompi/mpi/c/group_rank.c b/ompi/mpi/c/group_rank.c index 44408af6cda..3718fdc61fe 100644 --- a/ompi/mpi/c/group_rank.c +++ b/ompi/mpi/c/group_rank.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Group_rank"; -int MPI_Group_rank(MPI_Group group, int *rank) +int MPI_Group_rank(MPI_Group group, int *rank) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/group_size.c b/ompi/mpi/c/group_size.c index d0e59d96bb0..6cae9376424 100644 --- a/ompi/mpi/c/group_size.c +++ b/ompi/mpi/c/group_size.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Group_size"; -int MPI_Group_size(MPI_Group group, int *size) +int MPI_Group_size(MPI_Group group, int *size) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/group_translate_ranks.c b/ompi/mpi/c/group_translate_ranks.c index 00ed1e06406..49b75c1d90f 100644 --- a/ompi/mpi/c/group_translate_ranks.c +++ b/ompi/mpi/c/group_translate_ranks.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Group_translate_ranks"; int MPI_Group_translate_ranks(MPI_Group group1, int n_ranks, const int ranks1[], - MPI_Group group2, int ranks2[]) + MPI_Group group2, int ranks2[]) { int err; @@ -50,15 +50,15 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n_ranks, const int ranks1[], if ((MPI_GROUP_NULL == group1) || (MPI_GROUP_NULL == group2) || (NULL == group1) || (NULL == group2)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, FUNC_NAME); } if (n_ranks < 0) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, FUNC_NAME); } if (n_ranks > 0 && ((NULL == ranks1) || (NULL == ranks2 ))) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, FUNC_NAME); } } diff --git a/ompi/mpi/c/group_union.c b/ompi/mpi/c/group_union.c index 7adaaf6d628..40cf7612afd 100644 --- a/ompi/mpi/c/group_union.c +++ b/ompi/mpi/c/group_union.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 University of Houston. All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Group_union"; -int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *new_group) +int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *new_group) { int err; @@ -48,7 +48,7 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *new_group) if ((MPI_GROUP_NULL == group1) || (MPI_GROUP_NULL == group2) || (NULL == group1) || (NULL == group2) || (NULL == new_group)) { - return + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_GROUP, FUNC_NAME); } diff --git a/ompi/mpi/c/iallgather.c b/ompi/mpi/c/iallgather.c index f9bec0ee422..7f144be7c52 100644 --- a/ompi/mpi/c/iallgather.c +++ b/ompi/mpi/c/iallgather.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -16,9 +16,9 @@ * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -60,8 +60,8 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, memchecker_comm(comm); /* check whether the actual send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { - memchecker_call(&opal_memchecker_base_isdefined, - (char *)(recvbuf)+rank*ext, + memchecker_call(&opal_memchecker_base_isdefined, + (char *)(recvbuf)+rank*ext, recvcount, recvtype); } else { memchecker_datatype(sendtype); diff --git a/ompi/mpi/c/iallgatherv.c b/ompi/mpi/c/iallgatherv.c index e8f4efba061..8df7e62d555 100644 --- a/ompi/mpi/c/iallgatherv.c +++ b/ompi/mpi/c/iallgatherv.c @@ -6,18 +6,18 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 University of Houston. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,7 +64,7 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, (char *)(recvbuf)+displs[i]*ext, recvcounts[i], recvtype); } - + /* check whether the actual send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, @@ -84,7 +84,7 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (MPI_IN_PLACE == recvbuf) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); @@ -108,7 +108,7 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT, FUNC_NAME); } } - + if (NULL == displs) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_BUFFER, FUNC_NAME); } diff --git a/ompi/mpi/c/iallreduce.c b/ompi/mpi/c/iallreduce.c index 218eed3dcf1..e51cfa6a9b7 100644 --- a/ompi/mpi/c/iallreduce.c +++ b/ompi/mpi/c/iallreduce.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/ibarrier.c b/ompi/mpi/c/ibarrier.c index ff30cdd2b03..40297f980a7 100644 --- a/ompi/mpi/c/ibarrier.c +++ b/ompi/mpi/c/ibarrier.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2012 Oak Rigde National Laboratory. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Ibarrier"; -int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request) +int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request) { int err = MPI_SUCCESS; diff --git a/ompi/mpi/c/ibcast.c b/ompi/mpi/c/ibcast.c index 4308d465063..7e313993b99 100644 --- a/ompi/mpi/c/ibcast.c +++ b/ompi/mpi/c/ibcast.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2012 Oak Rigde National Laboratory. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -34,7 +34,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, MEMCHECKER( memchecker_datatype(datatype); - memchecker_call(&opal_memchecker_base_isdefined, buffer, count, datatype); + memchecker_call(&opal_memchecker_base_isdefined, buffer, count, datatype); memchecker_comm(comm); ); @@ -42,7 +42,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } @@ -60,7 +60,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, if ((root >= ompi_comm_size(comm)) || (root < 0)) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ROOT, FUNC_NAME); } - } + } /* Errors for intercommunicators */ @@ -69,7 +69,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, MPI_ROOT == root || MPI_PROC_NULL == root)) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ROOT, FUNC_NAME); } - } + } } OPAL_CR_ENTER_LIBRARY(); diff --git a/ompi/mpi/c/improbe.c b/ompi/mpi/c/improbe.c index 269c965111e..34cc946de42 100644 --- a/ompi/mpi/c/improbe.c +++ b/ompi/mpi/c/improbe.c @@ -3,9 +3,9 @@ * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,7 +29,7 @@ static const char FUNC_NAME[] = "MPI_Improbe"; -int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, +int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status) { int rc; @@ -45,7 +45,7 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; - } else if ((source != MPI_ANY_SOURCE) && + } else if ((source != MPI_ANY_SOURCE) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/imrecv.c b/ompi/mpi/c/imrecv.c index 8811ca34963..35fed70022d 100644 --- a/ompi/mpi/c/imrecv.c +++ b/ompi/mpi/c/imrecv.c @@ -2,9 +2,9 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ static const char FUNC_NAME[] = "MPI_Imrecv"; -int MPI_Imrecv(void *buf, int count, MPI_Datatype type, +int MPI_Imrecv(void *buf, int count, MPI_Datatype type, MPI_Message *message, MPI_Request *request) { int rc = MPI_SUCCESS; @@ -45,7 +45,7 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype type, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count); OMPI_CHECK_USER_BUFFER(rc, buf, type, count); - + if (NULL == message || MPI_MESSAGE_NULL == *message) { rc = MPI_ERR_REQUEST; comm = MPI_COMM_NULL; diff --git a/ompi/mpi/c/info_c2f.c b/ompi/mpi/c/info_c2f.c index 8a00cdc1f96..ec8c7b88c95 100644 --- a/ompi/mpi/c/info_c2f.c +++ b/ompi/mpi/c/info_c2f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Info_c2f"; -MPI_Fint MPI_Info_c2f(MPI_Info info) +MPI_Fint MPI_Info_c2f(MPI_Info info) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/info_create.c b/ompi/mpi/c/info_create.c index 933a5655324..574844efcbc 100644 --- a/ompi/mpi/c/info_create.c +++ b/ompi/mpi/c/info_create.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Info_create"; /** - * Create a new info object + * Create a new info object * * @param info Pointer to the MPI_Info handle * @@ -46,7 +46,7 @@ static const char FUNC_NAME[] = "MPI_Info_create"; * When an MPI_Info object is not being used, it should be freed using * MPI_Info_free */ -int MPI_Info_create(MPI_Info *info) +int MPI_Info_create(MPI_Info *info) { OPAL_CR_NOOP_PROGRESS(); @@ -62,7 +62,7 @@ int MPI_Info_create(MPI_Info *info) /* * Call the object create function. This function not only * allocates the space for MPI_Info, but also calls all the - * relevant init functions. Should I check if the fortran + * relevant init functions. Should I check if the fortran * handle is valid */ (*info) = OBJ_NEW(ompi_info_t); diff --git a/ompi/mpi/c/info_delete.c b/ompi/mpi/c/info_delete.c index 6f962b1b3a0..d323034a3e6 100644 --- a/ompi/mpi/c/info_delete.c +++ b/ompi/mpi/c/info_delete.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ static const char FUNC_NAME[] = "MPI_Info_delete"; * Delete a (key,value) pair from "info" * * @param info MPI_Info handle on which we need to operate - * @param key The key portion of the (key,value) pair that + * @param key The key portion of the (key,value) pair that * needs to be deleted * * @retval MPI_SUCCESS If the (key,val) pair was deleted diff --git a/ompi/mpi/c/info_dup.c b/ompi/mpi/c/info_dup.c index f65e79b5a4d..14e1dcafa79 100644 --- a/ompi/mpi/c/info_dup.c +++ b/ompi/mpi/c/info_dup.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -56,10 +56,10 @@ int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo) { /** * Here we need to do 2 things * 1. Create a newinfo object using MPI_Info_create - * 2. Fetch all the values from info and copy them to + * 2. Fetch all the values from info and copy them to * newinfo using MPI_Info_set * The new implementation facilitates traversal in many ways. - * I have chosen to get the number of elements on the list + * I have chosen to get the number of elements on the list * and copy them to newinfo one by one */ diff --git a/ompi/mpi/c/info_f2c.c b/ompi/mpi/c/info_f2c.c index d337e222038..6c56df0e430 100644 --- a/ompi/mpi/c/info_f2c.c +++ b/ompi/mpi/c/info_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Info_f2c"; * @param info Integer handle to an MPI_INFO object * @retval C handle corresponding to MPI_INFO object */ -MPI_Info MPI_Info_f2c(MPI_Fint info) +MPI_Info MPI_Info_f2c(MPI_Fint info) { int info_index = OMPI_FINT_2_INT(info); @@ -58,9 +58,9 @@ MPI_Info MPI_Info_f2c(MPI_Fint info) /* Per MPI-2:4.12.4, do not invoke an error handler if we get an invalid fortran handle. If we get an invalid fortran handle, return an invalid C handle. */ - - if (info_index < 0 || - info_index >= + + if (info_index < 0 || + info_index >= opal_pointer_array_get_size(&ompi_info_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/info_free.c b/ompi/mpi/c/info_free.c index 60284378dec..49fe9010a85 100644 --- a/ompi/mpi/c/info_free.c +++ b/ompi/mpi/c/info_free.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -45,7 +45,7 @@ static const char FUNC_NAME[] = "MPI_Info_free"; * * Upon successful completion, 'info' will be set to 'MPI_INFO_NULL'. */ -int MPI_Info_free(MPI_Info *info) +int MPI_Info_free(MPI_Info *info) { int err; diff --git a/ompi/mpi/c/info_get.c b/ompi/mpi/c/info_get.c index b380d0fda24..78daa3a9972 100644 --- a/ompi/mpi/c/info_get.c +++ b/ompi/mpi/c/info_get.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -59,7 +59,7 @@ static const char FUNC_NAME[] = "MPI_Info_get"; * to allow for for the null terminator. */ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, - char *value, int *flag) + char *value, int *flag) { int err; int key_length; diff --git a/ompi/mpi/c/info_get_nkeys.c b/ompi/mpi/c/info_get_nkeys.c index e9bc8384f6a..1e79717fde4 100644 --- a/ompi/mpi/c/info_get_nkeys.c +++ b/ompi/mpi/c/info_get_nkeys.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -46,10 +46,10 @@ static const char FUNC_NAME[] = "MPI_Info_get_nkeys"; * @retval MPI_ERR_ARG * @retval MPI_ERR_INFO * - * This function returns the number of elements in the list + * This function returns the number of elements in the list * containing the key-value pairs */ -int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) +int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) { int err; diff --git a/ompi/mpi/c/info_get_nthkey.c b/ompi/mpi/c/info_get_nthkey.c index 1b0cebad3a0..fbf0c57d7de 100644 --- a/ompi/mpi/c/info_get_nthkey.c +++ b/ompi/mpi/c/info_get_nthkey.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -42,13 +42,13 @@ static const char FUNC_NAME[] = "MPI_Info_get_nthkey"; * @param info info object (handle) * @param n index of key to retrieve (integer) * @param key character string of at least 'MPI_MAX_INFO_KEY' characters - * + * * @retval MPI_SUCCESS * @retval MPI_ERR_ARG * @retval MPI_ERR_INFO * @retval MPI_ERR_INFO_KEY */ -int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) +int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) { int nkeys; int err; @@ -88,7 +88,7 @@ int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_INFO_KEY, FUNC_NAME); } - + /* Everything seems alright. Call the back end key copy */ err = ompi_info_get_nthkey (info, n, key); diff --git a/ompi/mpi/c/info_get_valuelen.c b/ompi/mpi/c/info_get_valuelen.c index 65cbf1e5bd4..82e99124272 100644 --- a/ompi/mpi/c/info_get_valuelen.c +++ b/ompi/mpi/c/info_get_valuelen.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,11 +55,11 @@ static const char FUNC_NAME[] = "MPI_Info_get_valuelen"; * @retval MPI_ERR_INFO_KEY * * The length returned in C and C++ does not include the end-of-string - * character. If the 'key' is not found on 'info', 'valuelen' is left + * character. If the 'key' is not found on 'info', 'valuelen' is left * alone. */ int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, - int *flag) + int *flag) { int key_length; int err; @@ -76,7 +76,7 @@ int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, FUNC_NAME); } key_length = (key) ? (int)strlen (key) : 0; - if ((NULL == key) || (0 == key_length) || + if ((NULL == key) || (0 == key_length) || (MPI_MAX_INFO_KEY <= key_length)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INFO_KEY, FUNC_NAME); diff --git a/ompi/mpi/c/info_set.c b/ompi/mpi/c/info_set.c index bfbd55bff03..b3f82a433fe 100644 --- a/ompi/mpi/c/info_set.c +++ b/ompi/mpi/c/info_set.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -54,12 +54,12 @@ static const char FUNC_NAME[] = "MPI_Info_set"; * * MPI_Info_set adds the (key,value) pair to info, and overrides * the value if for the same key a previsou value was set. key and - * value must be NULL terminated strings in C. In Fortan, leading - * and trailing spaces in key and value are stripped. If either + * value must be NULL terminated strings in C. In Fortan, leading + * and trailing spaces in key and value are stripped. If either * key or value is greater than the allowed maxima, MPI_ERR_INFO_KEY * and MPI_ERR_INFO_VALUE are raised */ -int MPI_Info_set(MPI_Info info, const char *key, const char *value) +int MPI_Info_set(MPI_Info info, const char *key, const char *value) { int err; int key_length; @@ -89,7 +89,7 @@ int MPI_Info_set(MPI_Info info, const char *key, const char *value) } value_length = (value) ? (int)strlen (value) : 0; - if ((NULL == value) || (0 == value_length) || + if ((NULL == value) || (0 == value_length) || (MPI_MAX_INFO_VAL <= value_length)) { return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD, MPI_ERR_INFO_VALUE, FUNC_NAME); @@ -102,7 +102,7 @@ int MPI_Info_set(MPI_Info info, const char *key, const char *value) * If all is right with the arguments, then call the back-end * allocator. */ - + err = ompi_info_set (info, key, value); OMPI_ERRHANDLER_RETURN(err, MPI_COMM_WORLD, err, FUNC_NAME); } diff --git a/ompi/mpi/c/init.c b/ompi/mpi/c/init.c index b9f5e496c2e..bdf6492dde0 100644 --- a/ompi/mpi/c/init.c +++ b/ompi/mpi/c/init.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2006 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/init_thread.c b/ompi/mpi/c/init_thread.c index 7dd0b0fad1e..03c3d2acf04 100644 --- a/ompi/mpi/c/init_thread.c +++ b/ompi/mpi/c/init_thread.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2006 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 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Init_thread"; int MPI_Init_thread(int *argc, char ***argv, int required, - int *provided) + int *provided) { int err; @@ -66,7 +66,7 @@ int MPI_Init_thread(int *argc, char ***argv, int required, opal_show_help("help-mpi-api.txt", "mpi-function-after-finalize", true, FUNC_NAME); } - return ompi_errhandler_invoke(NULL, NULL, OMPI_ERRHANDLER_TYPE_COMM, + return ompi_errhandler_invoke(NULL, NULL, OMPI_ERRHANDLER_TYPE_COMM, MPI_ERR_OTHER, FUNC_NAME); } else if (ompi_mpi_initialized) { if (0 == ompi_comm_rank(MPI_COMM_WORLD)) { diff --git a/ompi/mpi/c/initialized.c b/ompi/mpi/c/initialized.c index 296f89c41e1..e271011514f 100644 --- a/ompi/mpi/c/initialized.c +++ b/ompi/mpi/c/initialized.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -34,7 +34,7 @@ static const char FUNC_NAME[] = "MPI_Initialized"; -int MPI_Initialized(int *flag) +int MPI_Initialized(int *flag) { MPI_Comm null = NULL; @@ -56,7 +56,7 @@ int MPI_Initialized(int *flag) } } } - + /* Pretty simple */ *flag = ompi_mpi_initialized; diff --git a/ompi/mpi/c/intercomm_create.c b/ompi/mpi/c/intercomm_create.c index f486c4a4087..74fa8169e55 100644 --- a/ompi/mpi/c/intercomm_create.c +++ b/ompi/mpi/c/intercomm_create.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -202,7 +202,7 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, new_group_pointer = MPI_GROUP_NULL; /* Determine context id. It is identical to f_2_c_handle */ - rc = ompi_comm_nextcid ( newcomp, /* new comm */ + rc = ompi_comm_nextcid ( newcomp, /* new comm */ local_comm, /* old comm */ bridge_comm, /* bridge comm */ &lleader, /* local leader */ diff --git a/ompi/mpi/c/intercomm_merge.c b/ompi/mpi/c/intercomm_merge.c index 1b837448418..3483a4952dd 100644 --- a/ompi/mpi/c/intercomm_merge.c +++ b/ompi/mpi/c/intercomm_merge.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2006-2009 University of Houston. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -57,15 +57,15 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, ); if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid ( intercomm ) || - !( intercomm->c_flags & OMPI_COMM_INTER ) ) + !( intercomm->c_flags & OMPI_COMM_INTER ) ) return OMPI_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); if ( NULL == newcomm ) - return OMPI_ERRHANDLER_INVOKE ( intercomm, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE ( intercomm, MPI_ERR_ARG, FUNC_NAME); } @@ -118,7 +118,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, new_group_pointer = MPI_GROUP_NULL; /* Determine context id. It is identical to f_2_c_handle */ - rc = ompi_comm_nextcid ( newcomp, /* new comm */ + rc = ompi_comm_nextcid ( newcomp, /* new comm */ intercomm, /* old comm */ NULL, /* bridge comm */ NULL, /* local leader */ @@ -130,7 +130,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, } /* activate communicator and init coll-module */ - rc = ompi_comm_activate( &newcomp, /* new comm */ + rc = ompi_comm_activate( &newcomp, /* new comm */ intercomm, /* old comm */ NULL, /* bridge comm */ NULL, /* local leader */ diff --git a/ompi/mpi/c/iprobe.c b/ompi/mpi/c/iprobe.c index c6f9385f25e..f2ab558085f 100644 --- a/ompi/mpi/c/iprobe.c +++ b/ompi/mpi/c/iprobe.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -52,7 +52,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; - } else if ((source != MPI_ANY_SOURCE) && + } else if ((source != MPI_ANY_SOURCE) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/irecv.c b/ompi/mpi/c/irecv.c index a290b60d4b6..1aa30a80c7e 100644 --- a/ompi/mpi/c/irecv.c +++ b/ompi/mpi/c/irecv.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -51,12 +51,12 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype type, int source, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count); OMPI_CHECK_USER_BUFFER(rc, buf, type, count); - + if (ompi_comm_invalid(comm)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > mca_pml.pml_max_tag)) { rc = MPI_ERR_TAG; - } else if ((MPI_ANY_SOURCE != source) && + } else if ((MPI_ANY_SOURCE != source) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/ireduce_scatter_block.c b/ompi/mpi/c/ireduce_scatter_block.c index 5cb1d8164bb..131ca1b8734 100644 --- a/ompi/mpi/c/ireduce_scatter_block.c +++ b/ompi/mpi/c/ireduce_scatter_block.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Ireduce_scatter_block"; int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, - MPI_Datatype datatype, MPI_Op op, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) { int err; @@ -51,17 +51,17 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MEMCHECKER( memchecker_comm(comm); memchecker_datatype(datatype); - + /* check receive buffer of current proccess, whether it's addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, datatype); - + /* check whether the actual send buffer is defined. */ if(MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, recvbuf, recvcount, datatype); } else { memchecker_call(&opal_memchecker_base_isdefined, sendbuf, recvcount, datatype); - + } ); @@ -70,7 +70,7 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/is_thread_main.c b/ompi/mpi/c/is_thread_main.c index 01cba8b4bf7..c43fc2a3938 100644 --- a/ompi/mpi/c/is_thread_main.c +++ b/ompi/mpi/c/is_thread_main.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Is_thread_main"; -int MPI_Is_thread_main(int *flag) +int MPI_Is_thread_main(int *flag) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/iscatter.c b/ompi/mpi/c/iscatter.c index 389b278c095..04b54cad826 100644 --- a/ompi/mpi/c/iscatter.c +++ b/ompi/mpi/c/iscatter.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/iscatterv.c b/ompi/mpi/c/iscatterv.c index 5ed3465d142..79ebfd10a4b 100644 --- a/ompi/mpi/c/iscatterv.c +++ b/ompi/mpi/c/iscatterv.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/keyval_create.c b/ompi/mpi/c/keyval_create.c index c43679cf8c2..a35f80e2f83 100644 --- a/ompi/mpi/c/keyval_create.c +++ b/ompi/mpi/c/keyval_create.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Keyval_create"; int MPI_Keyval_create(MPI_Copy_function *copy_attr_fn, MPI_Delete_function *delete_attr_fn, - int *keyval, void *extra_state) + int *keyval, void *extra_state) { int ret; ompi_attribute_fn_ptr_union_t copy_fn; @@ -47,10 +47,10 @@ int MPI_Keyval_create(MPI_Copy_function *copy_attr_fn, if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == keyval) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_KEYVAL, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_KEYVAL, FUNC_NAME); } else if ((NULL == copy_attr_fn) || (NULL == delete_attr_fn)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } @@ -60,7 +60,7 @@ int MPI_Keyval_create(MPI_Copy_function *copy_attr_fn, copy_fn.attr_communicator_copy_fn = (MPI_Comm_internal_copy_attr_function*)copy_attr_fn; del_fn.attr_communicator_delete_fn = delete_attr_fn; - ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, + ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn, keyval, extra_state, 0, NULL); OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/keyval_free.c b/ompi/mpi/c/keyval_free.c index bd5525fd554..ae66c8809f4 100644 --- a/ompi/mpi/c/keyval_free.c +++ b/ompi/mpi/c/keyval_free.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Keyval_free"; -int MPI_Keyval_free(int *keyval) +int MPI_Keyval_free(int *keyval) { int ret; diff --git a/ompi/mpi/c/lookup_name.c b/ompi/mpi/c/lookup_name.c index b8e3d864def..773af19e07d 100644 --- a/ompi/mpi/c/lookup_name.c +++ b/ompi/mpi/c/lookup_name.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,14 +44,14 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name) char *tmp; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == port_name ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == service_name ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if (NULL == info || ompi_info_is_freed(info)) { @@ -62,7 +62,7 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name) OPAL_CR_ENTER_LIBRARY(); - /* + /* * No predefined info-objects for this function in MPI-2, * therefore, we do not parse the info-object at the moment. */ diff --git a/ompi/mpi/c/message_c2f.c b/ompi/mpi/c/message_c2f.c index f6d2fcc2aa4..cea0323e9ee 100644 --- a/ompi/mpi/c/message_c2f.c +++ b/ompi/mpi/c/message_c2f.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Message_c2f"; -MPI_Fint MPI_Message_c2f(MPI_Message message) +MPI_Fint MPI_Message_c2f(MPI_Message message) { MEMCHECKER( memchecker_message(&message); @@ -68,7 +68,7 @@ MPI_Fint MPI_Message_c2f(MPI_Message message) */ if (MPI_UNDEFINED == message->m_f_to_c_index) { - message->m_f_to_c_index = + message->m_f_to_c_index = opal_pointer_array_add(&ompi_message_f_to_c_table, message); } diff --git a/ompi/mpi/c/message_f2c.c b/ompi/mpi/c/message_f2c.c index ee2e78499d6..473116eb01d 100644 --- a/ompi/mpi/c/message_f2c.c +++ b/ompi/mpi/c/message_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Message_f2c"; -MPI_Message MPI_Message_f2c(MPI_Fint message) +MPI_Message MPI_Message_f2c(MPI_Fint message) { int message_index = OMPI_FINT_2_INT(message); @@ -49,9 +49,9 @@ MPI_Message MPI_Message_f2c(MPI_Fint message) /* Per MPI-2:4.12.4, do not invoke an error handler if we get an invalid fortran handle. If we get an invalid fortran handle, return an invalid C handle. */ - - if (message_index < 0 || - message_index >= + + if (message_index < 0 || + message_index >= opal_pointer_array_get_size(&ompi_message_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/mprobe.c b/ompi/mpi/c/mprobe.c index 23e99964cd6..f30d3bfc6b6 100644 --- a/ompi/mpi/c/mprobe.c +++ b/ompi/mpi/c/mprobe.c @@ -3,9 +3,9 @@ * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,8 +29,8 @@ static const char FUNC_NAME[] = "MPI_Mprobe"; -int MPI_Mprobe(int source, int tag, MPI_Comm comm, - MPI_Message *message, MPI_Status *status) +int MPI_Mprobe(int source, int tag, MPI_Comm comm, + MPI_Message *message, MPI_Status *status) { int rc; @@ -45,7 +45,7 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; - } else if ((source != MPI_ANY_SOURCE) && + } else if ((source != MPI_ANY_SOURCE) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/mrecv.c b/ompi/mpi/c/mrecv.c index b5263e3b067..f9d2377e220 100644 --- a/ompi/mpi/c/mrecv.c +++ b/ompi/mpi/c/mrecv.c @@ -2,9 +2,9 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,8 +28,8 @@ static const char FUNC_NAME[] = "MPI_Mrecv"; -int MPI_Mrecv(void *buf, int count, MPI_Datatype type, - MPI_Message *message, MPI_Status *status) +int MPI_Mrecv(void *buf, int count, MPI_Datatype type, + MPI_Message *message, MPI_Status *status) { int rc = MPI_SUCCESS; ompi_communicator_t *comm; @@ -45,7 +45,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype type, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count); OMPI_CHECK_USER_BUFFER(rc, buf, type, count); - + if (NULL == message || MPI_MESSAGE_NULL == *message) { rc = MPI_ERR_REQUEST; comm = MPI_COMM_NULL; diff --git a/ompi/mpi/c/op_c2f.c b/ompi/mpi/c/op_c2f.c index 389b4417e29..37cf646f955 100644 --- a/ompi/mpi/c/op_c2f.c +++ b/ompi/mpi/c/op_c2f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Op_c2f"; -MPI_Fint MPI_Op_c2f(MPI_Op op) +MPI_Fint MPI_Op_c2f(MPI_Op op) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/op_commutative.c b/ompi/mpi/c/op_commutative.c index aed90812612..5102306fba1 100644 --- a/ompi/mpi/c/op_commutative.c +++ b/ompi/mpi/c/op_commutative.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/op_create.c b/ompi/mpi/c/op_create.c index 377a941c18c..07c0aaa2dca 100644 --- a/ompi/mpi/c/op_create.c +++ b/ompi/mpi/c/op_create.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/op_f2c.c b/ompi/mpi/c/op_f2c.c index 21660d902db..fbe59e88a00 100644 --- a/ompi/mpi/c/op_f2c.c +++ b/ompi/mpi/c/op_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -47,13 +47,13 @@ MPI_Op MPI_Op_f2c(MPI_Fint op_f) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); } - + /* Per MPI-2:4.12.4, do not invoke an error handler if we get an invalid fortran handle. If we get an invalid fortran handle, return an invalid C handle. */ - - if (op_index < 0 || - op_index >= + + if (op_index < 0 || + op_index >= opal_pointer_array_get_size(ompi_op_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/op_free.c b/ompi/mpi/c/op_free.c index 7712497c3d2..68157a5c412 100644 --- a/ompi/mpi/c/op_free.c +++ b/ompi/mpi/c/op_free.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Op_free"; -int MPI_Op_free(MPI_Op *op) +int MPI_Op_free(MPI_Op *op) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/open_port.c b/ompi/mpi/c/open_port.c index 62dca423f66..0cf2f18b889 100644 --- a/ompi/mpi/c/open_port.c +++ b/ompi/mpi/c/open_port.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,15 +36,15 @@ static const char FUNC_NAME[] = "MPI_Open_port"; -int MPI_Open_port(MPI_Info info, char *port_name) +int MPI_Open_port(MPI_Info info, char *port_name) { int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == port_name ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if (NULL == info || ompi_info_is_freed(info)) { diff --git a/ompi/mpi/c/pack.c b/ompi/mpi/c/pack.c index 1f64319adf4..cf5ca6f092d 100644 --- a/ompi/mpi/c/pack.c +++ b/ompi/mpi/c/pack.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/pack_external.c b/ompi/mpi/c/pack_external.c index 6770fd1b9a7..8c3b874bb89 100644 --- a/ompi/mpi/c/pack_external.c +++ b/ompi/mpi/c/pack_external.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Pack_external"; int MPI_Pack_external(const char datarep[], const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, - MPI_Aint outsize, MPI_Aint *position) + MPI_Aint outsize, MPI_Aint *position) { int rc; opal_convertor_t local_convertor; diff --git a/ompi/mpi/c/pack_external_size.c b/ompi/mpi/c/pack_external_size.c index 307338f65c2..2dce9e46750 100644 --- a/ompi/mpi/c/pack_external_size.c +++ b/ompi/mpi/c/pack_external_size.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Pack_external_size"; int MPI_Pack_external_size(const char datarep[], int incount, - MPI_Datatype datatype, MPI_Aint *size) + MPI_Datatype datatype, MPI_Aint *size) { opal_convertor_t local_convertor; size_t length; @@ -50,7 +50,7 @@ int MPI_Pack_external_size(const char datarep[], int incount, MEMCHECKER( memchecker_datatype(datatype); ); - + if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == size) { diff --git a/ompi/mpi/c/pack_size.c b/ompi/mpi/c/pack_size.c index ed533567651..6ba2f198e1d 100644 --- a/ompi/mpi/c/pack_size.c +++ b/ompi/mpi/c/pack_size.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Pack_size"; int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, - int *size) + int *size) { opal_convertor_t local_convertor; size_t length; diff --git a/ompi/mpi/c/pcontrol.c b/ompi/mpi/c/pcontrol.c index 05ef586009e..f910ed641d9 100644 --- a/ompi/mpi/c/pcontrol.c +++ b/ompi/mpi/c/pcontrol.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -33,7 +33,7 @@ static const char FUNC_NAME[] = "MPI_Pcontrol"; -int MPI_Pcontrol(const int level, ...) +int MPI_Pcontrol(const int level, ...) { va_list arglist; diff --git a/ompi/mpi/c/probe.c b/ompi/mpi/c/probe.c index 7cfa5235469..d4f4e613afe 100644 --- a/ompi/mpi/c/probe.c +++ b/ompi/mpi/c/probe.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Probe"; -int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) +int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) { int rc; @@ -52,7 +52,7 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; - } else if ((source != MPI_ANY_SOURCE) && + } else if ((source != MPI_ANY_SOURCE) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/profile/Makefile.am b/ompi/mpi/c/profile/Makefile.am index d51cca9606b..7275d17f354 100644 --- a/ompi/mpi/c/profile/Makefile.am +++ b/ompi/mpi/c/profile/Makefile.am @@ -6,7 +6,7 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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. @@ -17,9 +17,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,7 +27,7 @@ include $(top_srcdir)/Makefile.ompi-rules # # OMPI_PROFILING_DEFINES flag s enabled when we want our MPI_* symbols -# to be replaced by PMPI_*. In other words, this flag decides +# to be replaced by PMPI_*. In other words, this flag decides # whether "profile/defines.h" is included or not. "profile/defines.h" # replaces all MPI_* symbols with PMPI_* symbols. In this directory # we definately need it to be 1. diff --git a/ompi/mpi/c/profile/defines.h b/ompi/mpi/c/profile/defines.h index 782d31d8885..4837c880dad 100644 --- a/ompi/mpi/c/profile/defines.h +++ b/ompi/mpi/c/profile/defines.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,18 +16,18 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPI_C_PROFILE_DEFINES_H #define OMPI_C_PROFILE_DEFINES_H /* - * This file is included in the top directory only if + * This file is included in the top directory only if * profiling is required. Once profiling is required, - * this file will replace all MPI_* symbols with + * this file will replace all MPI_* symbols with * PMPI_* symbols */ #define MPI_Abort PMPI_Abort @@ -115,7 +115,7 @@ #define MPI_Dims_create PMPI_Dims_create #define MPI_Errhandler_c2f PMPI_Errhandler_c2f #define MPI_Errhandler_f2c PMPI_Errhandler_f2c -#define MPI_Errhandler_create PMPI_Errhandler_create +#define MPI_Errhandler_create PMPI_Errhandler_create #define MPI_Errhandler_free PMPI_Errhandler_free #define MPI_Errhandler_get PMPI_Errhandler_get #define MPI_Errhandler_set PMPI_Errhandler_set @@ -204,10 +204,10 @@ #define MPI_Graph_create PMPI_Graph_create #define MPI_Graph_get PMPI_Graph_get #define MPI_Graph_map PMPI_Graph_map -#define MPI_Graph_neighbors_count PMPI_Graph_neighbors_count -#define MPI_Graph_neighbors PMPI_Graph_neighbors +#define MPI_Graph_neighbors_count PMPI_Graph_neighbors_count +#define MPI_Graph_neighbors PMPI_Graph_neighbors #define MPI_Graphdims_get PMPI_Graphdims_get -#define MPI_Grequest_complete PMPI_Grequest_complete +#define MPI_Grequest_complete PMPI_Grequest_complete #define MPI_Grequest_start PMPI_Grequest_start #define MPI_Group_c2f PMPI_Group_c2f #define MPI_Group_compare PMPI_Group_compare @@ -220,9 +220,9 @@ #define MPI_Group_range_excl PMPI_Group_range_excl #define MPI_Group_range_incl PMPI_Group_range_incl #define MPI_Group_rank PMPI_Group_rank -#define MPI_Group_size PMPI_Group_size +#define MPI_Group_size PMPI_Group_size #define MPI_Group_translate_ranks PMPI_Group_translate_ranks -#define MPI_Group_union PMPI_Group_union +#define MPI_Group_union PMPI_Group_union #define MPI_Free_mem PMPI_Free_mem #define MPI_Ibsend PMPI_Ibsend #define MPI_Message_c2f PMPI_Message_c2f @@ -251,8 +251,8 @@ #define MPI_Is_thread_main PMPI_Is_thread_main #define MPI_Isend PMPI_Isend #define MPI_Issend PMPI_Issend -#define MPI_Keyval_create PMPI_Keyval_create -#define MPI_Keyval_free PMPI_Keyval_free +#define MPI_Keyval_create PMPI_Keyval_create +#define MPI_Keyval_free PMPI_Keyval_free #define MPI_Lookup_name PMPI_Lookup_name #define MPI_Mprobe PMPI_Mprobe #define MPI_Mrecv PMPI_Mrecv @@ -267,24 +267,24 @@ #define MPI_Ineighbor_alltoallv PMPI_Ineighbor_alltoallv #define MPI_Neighbor_alltoallw PMPI_Neighbor_alltoallw #define MPI_Ineighbor_alltoallw PMPI_Ineighbor_alltoallw -#define MPI_Op_c2f PMPI_Op_c2f -#define MPI_Op_commutative PMPI_Op_commutative -#define MPI_Op_create PMPI_Op_create -#define MPI_Op_f2c PMPI_Op_f2c +#define MPI_Op_c2f PMPI_Op_c2f +#define MPI_Op_commutative PMPI_Op_commutative +#define MPI_Op_create PMPI_Op_create +#define MPI_Op_f2c PMPI_Op_f2c #define MPI_Op_free PMPI_Op_free #define MPI_Open_port PMPI_Open_port -#define MPI_Pack_external PMPI_Pack_external -#define MPI_Pack_external_size PMPI_Pack_external_size -#define MPI_Pack PMPI_Pack -#define MPI_Pack_size PMPI_Pack_size -#define MPI_Pcontrol PMPI_Pcontrol +#define MPI_Pack_external PMPI_Pack_external +#define MPI_Pack_external_size PMPI_Pack_external_size +#define MPI_Pack PMPI_Pack +#define MPI_Pack_size PMPI_Pack_size +#define MPI_Pcontrol PMPI_Pcontrol #define MPI_Probe PMPI_Probe -#define MPI_Publish_name PMPI_Publish_name +#define MPI_Publish_name PMPI_Publish_name #define MPI_Put PMPI_Put #define MPI_Query_thread PMPI_Query_thread #define MPI_Raccumulate PMPI_Raccumulate -#define MPI_Recv_init PMPI_Recv_init -#define MPI_Recv PMPI_Recv +#define MPI_Recv_init PMPI_Recv_init +#define MPI_Recv PMPI_Recv #define MPI_Reduce PMPI_Reduce #define MPI_Ireduce PMPI_Ireduce #define MPI_Reduce_local PMPI_Reduce_local @@ -296,21 +296,21 @@ #define MPI_Request_c2f PMPI_Request_c2f #define MPI_Request_f2c PMPI_Request_f2c #define MPI_Request_free PMPI_Request_free -#define MPI_Request_get_status PMPI_Request_get_status +#define MPI_Request_get_status PMPI_Request_get_status #define MPI_Rget PMPI_Rget #define MPI_Rget_accumulate PMPI_Rget_accumulate #define MPI_Rput PMPI_Rput -#define MPI_Rsend_init PMPI_Rsend_init -#define MPI_Rsend PMPI_Rsend +#define MPI_Rsend_init PMPI_Rsend_init +#define MPI_Rsend PMPI_Rsend #define MPI_Scan PMPI_Scan #define MPI_Iscan PMPI_Iscan #define MPI_Scatter PMPI_Scatter #define MPI_Iscatter PMPI_Iscatter #define MPI_Scatterv PMPI_Scatterv #define MPI_Iscatterv PMPI_Iscatterv -#define MPI_Send_init PMPI_Send_init -#define MPI_Send PMPI_Send -#define MPI_Sendrecv PMPI_Sendrecv +#define MPI_Send_init PMPI_Send_init +#define MPI_Send PMPI_Send +#define MPI_Sendrecv PMPI_Sendrecv #define MPI_Sendrecv_replace PMPI_Sendrecv_replace #define MPI_Ssend_init PMPI_Ssend_init #define MPI_Ssend PMPI_Ssend @@ -318,7 +318,7 @@ #define MPI_Startall PMPI_Startall #define MPI_Status_c2f PMPI_Status_c2f #define MPI_Status_f2c PMPI_Status_f2c -#define MPI_Status_set_cancelled PMPI_Status_set_cancelled +#define MPI_Status_set_cancelled PMPI_Status_set_cancelled #define MPI_Status_set_elements PMPI_Status_set_elements #define MPI_Status_set_elements_x PMPI_Status_set_elements_x #define MPI_Test_cancelled PMPI_Test_cancelled @@ -370,7 +370,7 @@ #define MPI_Type_vector PMPI_Type_vector #define MPI_Unpack_external PMPI_Unpack_external #define MPI_Unpack PMPI_Unpack -#define MPI_Unpublish_name PMPI_Unpublish_name +#define MPI_Unpublish_name PMPI_Unpublish_name #define MPI_Wait PMPI_Wait #define MPI_Waitall PMPI_Waitall #define MPI_Waitany PMPI_Waitany @@ -378,14 +378,14 @@ #define MPI_Win_allocate PMPI_Win_allocate #define MPI_Win_allocate_shared PMPI_Win_allocate_shared #define MPI_Win_attach PMPI_Win_attach -#define MPI_Win_c2f PMPI_Win_c2f -#define MPI_Win_call_errhandler PMPI_Win_call_errhandler +#define MPI_Win_c2f PMPI_Win_c2f +#define MPI_Win_call_errhandler PMPI_Win_call_errhandler #define MPI_Win_complete PMPI_Win_complete -#define MPI_Win_create_errhandler PMPI_Win_create_errhandler +#define MPI_Win_create_errhandler PMPI_Win_create_errhandler #define MPI_Win_create_keyval PMPI_Win_create_keyval #define MPI_Win_create PMPI_Win_create #define MPI_Win_create_dynamic PMPI_Win_create_dynamic -#define MPI_Win_delete_attr PMPI_Win_delete_attr +#define MPI_Win_delete_attr PMPI_Win_delete_attr #define MPI_Win_detach PMPI_Win_detach #define MPI_Win_f2c PMPI_Win_f2c #define MPI_Win_fence PMPI_Win_fence @@ -393,20 +393,20 @@ #define MPI_Win_flush_all PMPI_Win_flush_all #define MPI_Win_flush_local PMPI_Win_flush_local #define MPI_Win_flush_local_all PMPI_Win_flush_local_all -#define MPI_Win_free_keyval PMPI_Win_free_keyval -#define MPI_Win_free PMPI_Win_free -#define MPI_Win_get_attr PMPI_Win_get_attr +#define MPI_Win_free_keyval PMPI_Win_free_keyval +#define MPI_Win_free PMPI_Win_free +#define MPI_Win_get_attr PMPI_Win_get_attr #define MPI_Win_get_errhandler PMPI_Win_get_errhandler #define MPI_Win_get_group PMPI_Win_get_group #define MPI_Win_get_info PMPI_Win_get_info #define MPI_Win_get_name PMPI_Win_get_name #define MPI_Win_lock PMPI_Win_lock #define MPI_Win_lock_all PMPI_Win_lock_all -#define MPI_Win_post PMPI_Win_post +#define MPI_Win_post PMPI_Win_post #define MPI_Win_set_attr PMPI_Win_set_attr -#define MPI_Win_set_errhandler PMPI_Win_set_errhandler -#define MPI_Win_set_info PMPI_Win_set_info -#define MPI_Win_set_name PMPI_Win_set_name +#define MPI_Win_set_errhandler PMPI_Win_set_errhandler +#define MPI_Win_set_info PMPI_Win_set_info +#define MPI_Win_set_name PMPI_Win_set_name #define MPI_Win_shared_query PMPI_Win_shared_query #define MPI_Win_start PMPI_Win_start #define MPI_Win_sync PMPI_Win_sync @@ -414,6 +414,6 @@ #define MPI_Win_unlock PMPI_Win_unlock #define MPI_Win_unlock_all PMPI_Win_unlock_all #define MPI_Win_wait PMPI_Win_wait -#define MPI_Wtick PMPI_Wtick +#define MPI_Wtick PMPI_Wtick #define MPI_Wtime PMPI_Wtime #endif /* OMPI_C_PROFILE_DEFINES_H */ diff --git a/ompi/mpi/c/publish_name.c b/ompi/mpi/c/publish_name.c index 2ba69408d6c..9f08b969745 100644 --- a/ompi/mpi/c/publish_name.c +++ b/ompi/mpi/c/publish_name.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -45,14 +45,14 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == port_name || 0 == strlen(port_name) ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == service_name || 0 == strlen(service_name) ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if (NULL == info || ompi_info_is_freed(info)) { @@ -63,7 +63,7 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, OPAL_CR_ENTER_LIBRARY(); - /* + /* * No predefined info-objects for this function in MPI-2, * therefore, we do not parse the info-object at the moment. */ diff --git a/ompi/mpi/c/put.c b/ompi/mpi/c/put.c index 96ff0139e04..3d16581b36f 100644 --- a/ompi/mpi/c/put.c +++ b/ompi/mpi/c/put.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -45,7 +45,7 @@ static const char FUNC_NAME[] = "MPI_Put"; int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Win win) + MPI_Datatype target_datatype, MPI_Win win) { int rc; @@ -61,7 +61,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datat } else if (ompi_win_peer_invalid(win, target_rank) && (MPI_PROC_NULL != target_rank)) { rc = MPI_ERR_RANK; - } else if (NULL == target_datatype || + } else if (NULL == target_datatype || MPI_DATATYPE_NULL == target_datatype) { rc = MPI_ERR_TYPE; } else if ( target_disp < 0 ) { diff --git a/ompi/mpi/c/query_thread.c b/ompi/mpi/c/query_thread.c index 3ecc85509d2..3470680e013 100644 --- a/ompi/mpi/c/query_thread.c +++ b/ompi/mpi/c/query_thread.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -34,7 +34,7 @@ static const char FUNC_NAME[] = "MPI_Query_thread"; -int MPI_Query_thread(int *provided) +int MPI_Query_thread(int *provided) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/raccumulate.c b/ompi/mpi/c/raccumulate.c index 580773fdb7f..48887b9dac1 100644 --- a/ompi/mpi/c/raccumulate.c +++ b/ompi/mpi/c/raccumulate.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -47,7 +47,7 @@ static const char FUNC_NAME[] = "MPI_Raccumulate"; int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) { int rc; ompi_win_t *ompi_win = (ompi_win_t*) win; @@ -133,10 +133,10 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype orig rc = ompi_win->w_osc_module->osc_raccumulate(origin_addr, origin_count, origin_datatype, - target_rank, - target_disp, + target_rank, + target_disp, target_count, - target_datatype, + target_datatype, op, win, request); OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/recv.c b/ompi/mpi/c/recv.c index 6215bb49002..0a5ecf7c71d 100644 --- a/ompi/mpi/c/recv.c +++ b/ompi/mpi/c/recv.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Recv"; int MPI_Recv(void *buf, int count, MPI_Datatype type, int source, - int tag, MPI_Comm comm, MPI_Status *status) + int tag, MPI_Comm comm, MPI_Status *status) { int rc = MPI_SUCCESS; @@ -52,17 +52,17 @@ int MPI_Recv(void *buf, int count, MPI_Datatype type, int source, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count); OMPI_CHECK_USER_BUFFER(rc, buf, type, count); - + if (ompi_comm_invalid(comm)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > mca_pml.pml_max_tag)) { rc = MPI_ERR_TAG; - } else if ((source != MPI_ANY_SOURCE) && + } else if ((source != MPI_ANY_SOURCE) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; } - + OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/recv_init.c b/ompi/mpi/c/recv_init.c index 43c7e0040f5..b2276198e60 100644 --- a/ompi/mpi/c/recv_init.c +++ b/ompi/mpi/c/recv_init.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -52,23 +52,23 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype type, int source, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count); OMPI_CHECK_USER_BUFFER(rc, buf, type, count); - + if (ompi_comm_invalid(comm)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > mca_pml.pml_max_tag)) { rc = MPI_ERR_TAG; - } else if ((source != MPI_ANY_SOURCE) && + } else if ((source != MPI_ANY_SOURCE) && (MPI_PROC_NULL != source) && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; } else if (NULL == request) { rc = MPI_ERR_REQUEST; } - + OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME); } - if (MPI_PROC_NULL == source) { + if (MPI_PROC_NULL == source) { *request = OBJ_NEW(ompi_request_t); /* Other fields were initialized by the constructor for ompi_request_t */ diff --git a/ompi/mpi/c/reduce.c b/ompi/mpi/c/reduce.c index dbd29641f19..fc9d7089f2c 100644 --- a/ompi/mpi/c/reduce.c +++ b/ompi/mpi/c/reduce.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Reduce"; int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) { int err; @@ -58,7 +58,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, } else { memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); } - + /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, count, datatype); } else { @@ -69,7 +69,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, if (MPI_ROOT == root) { /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, count, datatype); - } else if (MPI_PROC_NULL != root) { + } else if (MPI_PROC_NULL != root) { /* check whether send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); } @@ -81,12 +81,12 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } /* Checks for all ranks */ - + else if (MPI_OP_NULL == op || NULL == op) { err = MPI_ERR_OP; } else if (!ompi_op_is_valid(op, datatype, &msg, FUNC_NAME)) { diff --git a/ompi/mpi/c/reduce_local.c b/ompi/mpi/c/reduce_local.c index f5e95630822..1c876c4c638 100644 --- a/ompi/mpi/c/reduce_local.c +++ b/ompi/mpi/c/reduce_local.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/reduce_scatter.c b/ompi/mpi/c/reduce_scatter.c index 387773799fa..28566f666b4 100644 --- a/ompi/mpi/c/reduce_scatter.c +++ b/ompi/mpi/c/reduce_scatter.c @@ -6,17 +6,17 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,13 +42,13 @@ static const char FUNC_NAME[] = "MPI_Reduce_scatter"; int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int i, err, size, count; MEMCHECKER( int rank; - + size = ompi_comm_size(comm); rank = ompi_comm_rank(comm); for (count = i = 0; i < size; ++i) { @@ -59,17 +59,17 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[ memchecker_comm(comm); memchecker_datatype(datatype); - + /* check receive buffer of current proccess, whether it's addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcounts[rank], datatype); - + /* check whether the actual send buffer is defined. */ if(MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, recvbuf, count, datatype); } else { memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); - + } ); @@ -78,7 +78,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[ err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/register_datarep.c b/ompi/mpi/c/register_datarep.c index 09a87d70299..0c3c89bcfa7 100644 --- a/ompi/mpi/c/register_datarep.c +++ b/ompi/mpi/c/register_datarep.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,6 +76,6 @@ int MPI_Register_datarep(const char *datarep, /* All done */ - + OMPI_ERRHANDLER_RETURN(rc, MPI_FILE_NULL, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/request_c2f.c b/ompi/mpi/c/request_c2f.c index 01f3f6c583b..926dc71e448 100644 --- a/ompi/mpi/c/request_c2f.c +++ b/ompi/mpi/c/request_c2f.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Request_c2f"; -MPI_Fint MPI_Request_c2f(MPI_Request request) +MPI_Fint MPI_Request_c2f(MPI_Request request) { MEMCHECKER( memchecker_request(&request); @@ -68,7 +68,7 @@ MPI_Fint MPI_Request_c2f(MPI_Request request) */ if (MPI_UNDEFINED == request->req_f_to_c_index) { - request->req_f_to_c_index = + request->req_f_to_c_index = opal_pointer_array_add(&ompi_request_f_to_c_table, request); } diff --git a/ompi/mpi/c/request_f2c.c b/ompi/mpi/c/request_f2c.c index 4e43e4af3cb..0e205b5109f 100644 --- a/ompi/mpi/c/request_f2c.c +++ b/ompi/mpi/c/request_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Request_f2c"; -MPI_Request MPI_Request_f2c(MPI_Fint request) +MPI_Request MPI_Request_f2c(MPI_Fint request) { int request_index = OMPI_FINT_2_INT(request); @@ -49,9 +49,9 @@ MPI_Request MPI_Request_f2c(MPI_Fint request) /* Per MPI-2:4.12.4, do not invoke an error handler if we get an invalid fortran handle. If we get an invalid fortran handle, return an invalid C handle. */ - - if (request_index < 0 || - request_index >= + + if (request_index < 0 || + request_index >= opal_pointer_array_get_size(&ompi_request_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/request_free.c b/ompi/mpi/c/request_free.c index aa2a4a1fc43..1c6ad3607c7 100644 --- a/ompi/mpi/c/request_free.c +++ b/ompi/mpi/c/request_free.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Request_free"; -int MPI_Request_free(MPI_Request *request) +int MPI_Request_free(MPI_Request *request) { int rc; @@ -48,7 +48,7 @@ int MPI_Request_free(MPI_Request *request) if (MPI_PARAM_CHECK) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == request || NULL == *request || + if (NULL == request || NULL == *request || MPI_REQUEST_NULL == *request) { rc = MPI_ERR_REQUEST; } diff --git a/ompi/mpi/c/request_get_status.c b/ompi/mpi/c/request_get_status.c index 14d975e49c5..59536a1bcaa 100644 --- a/ompi/mpi/c/request_get_status.c +++ b/ompi/mpi/c/request_get_status.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Request_get_status"; * or free should be executed on the request. */ int MPI_Request_get_status(MPI_Request request, int *flag, - MPI_Status *status) + MPI_Status *status) { #if OPAL_ENABLE_PROGRESS_THREADS == 0 int do_it_once = 0; @@ -75,8 +75,8 @@ int MPI_Request_get_status(MPI_Request request, int *flag, } return MPI_SUCCESS; } - if( request->req_complete ) { - *flag = true; + if( request->req_complete ) { + *flag = true; /* If this is a generalized request, we *always* have to call the query function to get the status (MPI-2:8.2), even if the user passed STATUS_IGNORE. */ diff --git a/ompi/mpi/c/rget.c b/ompi/mpi/c/rget.c index 85c396abe8f..ab63e793d45 100644 --- a/ompi/mpi/c/rget.c +++ b/ompi/mpi/c/rget.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/rget_accumulate.c b/ompi/mpi/c/rget_accumulate.c index e9bccae2ae2..92a3c34af1a 100644 --- a/ompi/mpi/c/rget_accumulate.c +++ b/ompi/mpi/c/rget_accumulate.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -49,7 +49,7 @@ static const char FUNC_NAME[] = "MPI_Rget_accumulate"; int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) { int rc; ompi_win_t *ompi_win = (ompi_win_t*) win; @@ -143,10 +143,10 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype result_addr, result_count, result_datatype, - target_rank, - target_disp, + target_rank, + target_disp, target_count, - target_datatype, + target_datatype, op, win, request); OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/rput.c b/ompi/mpi/c/rput.c index 4ad465f0da9..01e592d6aff 100644 --- a/ompi/mpi/c/rput.c +++ b/ompi/mpi/c/rput.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -45,7 +45,7 @@ static const char FUNC_NAME[] = "MPI_Rput"; int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) + MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) { int rc; @@ -61,7 +61,7 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_data } else if (ompi_win_peer_invalid(win, target_rank) && (MPI_PROC_NULL != target_rank)) { rc = MPI_ERR_RANK; - } else if (NULL == target_datatype || + } else if (NULL == target_datatype || MPI_DATATYPE_NULL == target_datatype) { rc = MPI_ERR_TYPE; } else if ( target_disp < 0 ) { diff --git a/ompi/mpi/c/rsend_init.c b/ompi/mpi/c/rsend_init.c index 9a87bd3a12e..016c48c5fdd 100644 --- a/ompi/mpi/c/rsend_init.c +++ b/ompi/mpi/c/rsend_init.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Rsend_init"; int MPI_Rsend_init(const void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Comm comm, - MPI_Request *request) + MPI_Request *request) { int rc; diff --git a/ompi/mpi/c/scan.c b/ompi/mpi/c/scan.c index 5d44ea78420..d4c1bd1e871 100644 --- a/ompi/mpi/c/scan.c +++ b/ompi/mpi/c/scan.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Scan"; int MPI_Scan(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int err; @@ -61,7 +61,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, err = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid(comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } diff --git a/ompi/mpi/c/scatter.c b/ompi/mpi/c/scatter.c index 56acc7d94f0..ba4932f947c 100644 --- a/ompi/mpi/c/scatter.c +++ b/ompi/mpi/c/scatter.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/send.c b/ompi/mpi/c/send.c index 73df108e90c..a0cc6d3855b 100644 --- a/ompi/mpi/c/send.c +++ b/ompi/mpi/c/send.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/send_init.c b/ompi/mpi/c/send_init.c index e732d500ef2..e5c2a68b126 100644 --- a/ompi/mpi/c/send_init.c +++ b/ompi/mpi/c/send_init.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/sendrecv_replace.c b/ompi/mpi/c/sendrecv_replace.c index e1ae56484c7..7e4084d9b4c 100644 --- a/ompi/mpi/c/sendrecv_replace.c +++ b/ompi/mpi/c/sendrecv_replace.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -112,7 +112,7 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype, } /* recv into temporary buffer */ - rc = MPI_Sendrecv( buf, count, datatype, dest, sendtag, iov.iov_base, packed_size, + rc = MPI_Sendrecv( buf, count, datatype, dest, sendtag, iov.iov_base, packed_size, MPI_BYTE, source, recvtag, comm, &recv_status ); if (rc != MPI_SUCCESS) { if(packed_size > sizeof(recv_data)) diff --git a/ompi/mpi/c/ssend.c b/ompi/mpi/c/ssend.c index 700c3ea5ea6..0c1fb3d4e02 100644 --- a/ompi/mpi/c/ssend.c +++ b/ompi/mpi/c/ssend.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/start.c b/ompi/mpi/c/start.c index 34040d12ae0..a47d880ee30 100644 --- a/ompi/mpi/c/start.c +++ b/ompi/mpi/c/start.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Start"; -int MPI_Start(MPI_Request *request) +int MPI_Start(MPI_Request *request) { int ret = OMPI_SUCCESS; @@ -59,7 +59,7 @@ int MPI_Start(MPI_Request *request) * MPI standard 3.1 page 78 line 19: we must have the following * sequence CREATE (START COMPLETE)* FREE. The upper level is * responsible for handling any concurency. The PML must handle - * this case, as it is the only one knowing if the request can + * this case, as it is the only one knowing if the request can * be reused or not (it is PML completed or not?). */ diff --git a/ompi/mpi/c/startall.c b/ompi/mpi/c/startall.c index 7193ae07854..735bdcab065 100644 --- a/ompi/mpi/c/startall.c +++ b/ompi/mpi/c/startall.c @@ -5,19 +5,19 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Startall"; -int MPI_Startall(int count, MPI_Request requests[]) +int MPI_Startall(int count, MPI_Request requests[]) { int i; int ret = OMPI_SUCCESS; diff --git a/ompi/mpi/c/status_c2f.c b/ompi/mpi/c/status_c2f.c index ad4799e8965..da0207746c6 100644 --- a/ompi/mpi/c/status_c2f.c +++ b/ompi/mpi/c/status_c2f.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. diff --git a/ompi/mpi/c/status_f2c.c b/ompi/mpi/c/status_f2c.c index 8e2a3503f76..83e193b408d 100644 --- a/ompi/mpi/c/status_f2c.c +++ b/ompi/mpi/c/status_f2c.c @@ -6,7 +6,7 @@ * 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, + * 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. diff --git a/ompi/mpi/c/status_set_cancelled.c b/ompi/mpi/c/status_set_cancelled.c index 0f32342c269..20bb47c3858 100644 --- a/ompi/mpi/c/status_set_cancelled.c +++ b/ompi/mpi/c/status_set_cancelled.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Status_set_cancelled"; -int MPI_Status_set_cancelled(MPI_Status *status, int flag) +int MPI_Status_set_cancelled(MPI_Status *status, int flag) { MEMCHECKER( if(status != MPI_STATUSES_IGNORE) { @@ -54,7 +54,7 @@ int MPI_Status_set_cancelled(MPI_Status *status, int flag) int rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == status || - MPI_STATUS_IGNORE == status || + MPI_STATUS_IGNORE == status || MPI_STATUSES_IGNORE == status) { rc = MPI_ERR_ARG; } diff --git a/ompi/mpi/c/status_set_elements.c b/ompi/mpi/c/status_set_elements.c index 5bf5399bbe6..839c65023cd 100644 --- a/ompi/mpi/c/status_set_elements.c +++ b/ompi/mpi/c/status_set_elements.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/status_set_elements_x.c b/ompi/mpi/c/status_set_elements_x.c index 561f5fef8f4..f9994007574 100644 --- a/ompi/mpi/c/status_set_elements_x.c +++ b/ompi/mpi/c/status_set_elements_x.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/test.c b/ompi/mpi/c/test.c index 4a0c4fd4f81..091a23a05d9 100644 --- a/ompi/mpi/c/test.c +++ b/ompi/mpi/c/test.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Test"; -int MPI_Test(MPI_Request *request, int *completed, MPI_Status *status) +int MPI_Test(MPI_Request *request, int *completed, MPI_Status *status) { int rc; diff --git a/ompi/mpi/c/testall.c b/ompi/mpi/c/testall.c index a57fe12fc44..feed9b527b0 100644 --- a/ompi/mpi/c/testall.c +++ b/ompi/mpi/c/testall.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Testall"; int MPI_Testall(int count, MPI_Request requests[], int *flag, - MPI_Status statuses[]) + MPI_Status statuses[]) { MEMCHECKER( int j; @@ -76,7 +76,7 @@ int MPI_Testall(int count, MPI_Request requests[], int *flag, OPAL_CR_ENTER_LIBRARY(); - if (OMPI_SUCCESS == ompi_request_test_all(count, requests, flag, + if (OMPI_SUCCESS == ompi_request_test_all(count, requests, flag, statuses)) { OPAL_CR_EXIT_LIBRARY(); return MPI_SUCCESS; diff --git a/ompi/mpi/c/testany.c b/ompi/mpi/c/testany.c index 3c4f6f7e629..5688a2133c9 100644 --- a/ompi/mpi/c/testany.c +++ b/ompi/mpi/c/testany.c @@ -5,20 +5,20 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Testany"; -int MPI_Testany(int count, MPI_Request requests[], int *indx, int *completed, MPI_Status *status) +int MPI_Testany(int count, MPI_Request requests[], int *indx, int *completed, MPI_Status *status) { MEMCHECKER( int j; @@ -82,7 +82,7 @@ int MPI_Testany(int count, MPI_Request requests[], int *indx, int *completed, MP OPAL_CR_ENTER_LIBRARY(); - if (OMPI_SUCCESS == ompi_request_test_any(count, requests, + if (OMPI_SUCCESS == ompi_request_test_any(count, requests, indx, completed, status)) { OPAL_CR_EXIT_LIBRARY(); return MPI_SUCCESS; diff --git a/ompi/mpi/c/testsome.c b/ompi/mpi/c/testsome.c index 807d13ebb3f..9e5b495b6bd 100644 --- a/ompi/mpi/c/testsome.c +++ b/ompi/mpi/c/testsome.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -78,7 +78,7 @@ int MPI_Testsome(int incount, MPI_Request requests[], OPAL_CR_ENTER_LIBRARY(); - if (OMPI_SUCCESS == ompi_request_test_some(incount, requests, outcount, + if (OMPI_SUCCESS == ompi_request_test_some(incount, requests, outcount, indices, statuses)) { OPAL_CR_EXIT_LIBRARY(); return MPI_SUCCESS; diff --git a/ompi/mpi/c/topo_test.c b/ompi/mpi/c/topo_test.c index 48ef3e22810..0382ef8603c 100644 --- a/ompi/mpi/c/topo_test.c +++ b/ompi/mpi/c/topo_test.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Topo_test"; -int MPI_Topo_test(MPI_Comm comm, int *status) +int MPI_Topo_test(MPI_Comm comm, int *status) { MEMCHECKER( memchecker_comm(comm); @@ -47,7 +47,7 @@ int MPI_Topo_test(MPI_Comm comm, int *status) if ( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if ( NULL == status ) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); diff --git a/ompi/mpi/c/type_c2f.c b/ompi/mpi/c/type_c2f.c index 2c43b372676..664ede94ef8 100644 --- a/ompi/mpi/c/type_c2f.c +++ b/ompi/mpi/c/type_c2f.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/type_commit.c b/ompi/mpi/c/type_commit.c index 7c1d9402406..0617bf690a3 100644 --- a/ompi/mpi/c/type_commit.c +++ b/ompi/mpi/c/type_commit.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ int MPI_Type_commit(MPI_Datatype *type) MEMCHECKER( memchecker_datatype(*type); ); - + if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type || NULL == *type || MPI_DATATYPE_NULL == *type) { diff --git a/ompi/mpi/c/type_create_f90_complex.c b/ompi/mpi/c/type_create_f90_complex.c index bd97f7699a3..cf2d971c1fa 100644 --- a/ompi/mpi/c/type_create_f90_complex.c +++ b/ompi/mpi/c/type_create_f90_complex.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/type_create_f90_real.c b/ompi/mpi/c/type_create_f90_real.c index 03744dc05e8..d75a2a158e4 100644 --- a/ompi/mpi/c/type_create_f90_real.c +++ b/ompi/mpi/c/type_create_f90_real.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/type_create_keyval.c b/ompi/mpi/c/type_create_keyval.c index 3d37042885c..f504f23e15f 100644 --- a/ompi/mpi/c/type_create_keyval.c +++ b/ompi/mpi/c/type_create_keyval.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -50,7 +50,7 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, if ((NULL == type_copy_attr_fn) || (NULL == type_delete_attr_fn) || (NULL == type_keyval)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, - MPI_ERR_ARG, + MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/type_create_resized.c b/ompi/mpi/c/type_create_resized.c index 50eb8d72d04..859d2fabdf3 100644 --- a/ompi/mpi/c/type_create_resized.c +++ b/ompi/mpi/c/type_create_resized.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/type_delete_attr.c b/ompi/mpi/c/type_delete_attr.c index 6013e60c15c..2719919afe7 100644 --- a/ompi/mpi/c/type_delete_attr.c +++ b/ompi/mpi/c/type_delete_attr.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -48,16 +48,16 @@ int MPI_Type_delete_attr (MPI_Datatype type, int type_keyval) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type || MPI_DATATYPE_NULL == type) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, - MPI_ERR_TYPE, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, + MPI_ERR_TYPE, FUNC_NAME); } } OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_delete(TYPE_ATTR, type, type->d_keyhash, type_keyval, + ret = ompi_attr_delete(TYPE_ATTR, type, type->d_keyhash, type_keyval, false); OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, - MPI_ERR_OTHER, FUNC_NAME); + MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/type_dup.c b/ompi/mpi/c/type_dup.c index 70b8a8babee..17e93001a0d 100644 --- a/ompi/mpi/c/type_dup.c +++ b/ompi/mpi/c/type_dup.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -77,7 +77,7 @@ int MPI_Type_dup (MPI_Datatype type, ompi_datatype_destroy(newtype); OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD, MPI_ERR_INTERN, FUNC_NAME ); - } + } } OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpi/c/type_extent.c b/ompi/mpi/c/type_extent.c index ea90b6104d5..cceb685ef6d 100644 --- a/ompi/mpi/c/type_extent.c +++ b/ompi/mpi/c/type_extent.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/type_f2c.c b/ompi/mpi/c/type_f2c.c index e4c6723d2b8..970aec3e3ec 100644 --- a/ompi/mpi/c/type_f2c.c +++ b/ompi/mpi/c/type_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -55,8 +55,8 @@ MPI_Datatype MPI_Type_f2c(MPI_Fint datatype) /* Per MPI-2:4.12.4, do not invoke an error handler if we get an invalid fortran handle. If we get an invalid fortran handle, return an invalid C handle. */ - if (datatype_index < 0 || - datatype_index >= + if (datatype_index < 0 || + datatype_index >= opal_pointer_array_get_size(&ompi_datatype_f_to_c_table)) { return NULL; } diff --git a/ompi/mpi/c/type_free.c b/ompi/mpi/c/type_free.c index 2ca780a4fc9..75c3fcce0fa 100644 --- a/ompi/mpi/c/type_free.c +++ b/ompi/mpi/c/type_free.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ int MPI_Type_free(MPI_Datatype *type) MEMCHECKER( memchecker_datatype(*type); ); - + if( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type || NULL == *type || MPI_DATATYPE_NULL == *type || diff --git a/ompi/mpi/c/type_free_keyval.c b/ompi/mpi/c/type_free_keyval.c index b4714efe375..a1d3838ddc9 100644 --- a/ompi/mpi/c/type_free_keyval.c +++ b/ompi/mpi/c/type_free_keyval.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -45,7 +45,7 @@ int MPI_Type_free_keyval(int *type_keyval) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type_keyval) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, - MPI_ERR_ARG, + MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/type_get_attr.c b/ompi/mpi/c/type_get_attr.c index 0705ae8c632..208a82dc5bb 100644 --- a/ompi/mpi/c/type_get_attr.c +++ b/ompi/mpi/c/type_get_attr.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -54,11 +54,11 @@ int MPI_Type_get_attr (MPI_Datatype type, return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_TYPE, FUNC_NAME ); } else if ((NULL == attribute_val) || (NULL == flag)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, - MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, + MPI_ERR_ARG, FUNC_NAME); } else if (MPI_KEYVAL_INVALID == type_keyval) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_KEYVAL, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_KEYVAL, FUNC_NAME); } } @@ -69,8 +69,8 @@ int MPI_Type_get_attr (MPI_Datatype type, src/attribute/attribute.c for a lengthy comment explaining Open MPI attribute behavior. */ - ret = ompi_attr_get_c(type->d_keyhash, type_keyval, + ret = ompi_attr_get_c(type->d_keyhash, type_keyval, (void**)attribute_val, flag); OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, - MPI_ERR_OTHER, FUNC_NAME); + MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/type_get_contents.c b/ompi/mpi/c/type_get_contents.c index 966e0ab1ae2..fc544e5bc49 100644 --- a/ompi/mpi/c/type_get_contents.c +++ b/ompi/mpi/c/type_get_contents.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/type_get_envelope.c b/ompi/mpi/c/type_get_envelope.c index d32a08adc7b..87f1464981a 100644 --- a/ompi/mpi/c/type_get_envelope.c +++ b/ompi/mpi/c/type_get_envelope.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -62,7 +62,7 @@ int MPI_Type_get_envelope(MPI_Datatype type, OPAL_CR_ENTER_LIBRARY(); - rc = ompi_datatype_get_args( type, 0, num_integers, NULL, num_addresses, NULL, + rc = ompi_datatype_get_args( type, 0, num_integers, NULL, num_addresses, NULL, num_datatypes, NULL, combiner ); OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD, rc, FUNC_NAME ); } diff --git a/ompi/mpi/c/type_get_extent.c b/ompi/mpi/c/type_get_extent.c index c1dd096bfb6..4d5e617205d 100644 --- a/ompi/mpi/c/type_get_extent.c +++ b/ompi/mpi/c/type_get_extent.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ int MPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb, MPI_Aint *extent) MEMCHECKER( memchecker_datatype(type); ); - + if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type || MPI_DATATYPE_NULL == type) { diff --git a/ompi/mpi/c/type_get_extent_x.c b/ompi/mpi/c/type_get_extent_x.c index 233eaad0d2b..a5db6d76dde 100644 --- a/ompi/mpi/c/type_get_extent_x.c +++ b/ompi/mpi/c/type_get_extent_x.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ int MPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb, MPI_Count *extent) MEMCHECKER( memchecker_datatype(type); ); - + if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type || MPI_DATATYPE_NULL == type) { diff --git a/ompi/mpi/c/type_get_name.c b/ompi/mpi/c/type_get_name.c index 037931c2586..421f2647a12 100644 --- a/ompi/mpi/c/type_get_name.c +++ b/ompi/mpi/c/type_get_name.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/type_get_true_extent.c b/ompi/mpi/c/type_get_true_extent.c index f0877ba451a..f938439acbd 100644 --- a/ompi/mpi/c/type_get_true_extent.c +++ b/ompi/mpi/c/type_get_true_extent.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,7 +46,7 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MEMCHECKER( memchecker_datatype(datatype); ); - + if( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == datatype || MPI_DATATYPE_NULL == datatype) { diff --git a/ompi/mpi/c/type_get_true_extent_x.c b/ompi/mpi/c/type_get_true_extent_x.c index 58e81c62047..6bcfd4e7f80 100644 --- a/ompi/mpi/c/type_get_true_extent_x.c +++ b/ompi/mpi/c/type_get_true_extent_x.c @@ -5,16 +5,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MEMCHECKER( memchecker_datatype(datatype); ); - + if( MPI_PARAM_CHECK ) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == datatype || MPI_DATATYPE_NULL == datatype) { diff --git a/ompi/mpi/c/type_hindexed.c b/ompi/mpi/c/type_hindexed.c index 22402bf4d9c..e6c8dd2448f 100644 --- a/ompi/mpi/c/type_hindexed.c +++ b/ompi/mpi/c/type_hindexed.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/type_hvector.c b/ompi/mpi/c/type_hvector.c index 7447dbe6c7f..b5fef198b1d 100644 --- a/ompi/mpi/c/type_hvector.c +++ b/ompi/mpi/c/type_hvector.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/type_lb.c b/ompi/mpi/c/type_lb.c index 90e55ddf6c4..beb83757ed9 100644 --- a/ompi/mpi/c/type_lb.c +++ b/ompi/mpi/c/type_lb.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/type_match_size.c b/ompi/mpi/c/type_match_size.c index e9bcbee6279..8b485bbeaf1 100644 --- a/ompi/mpi/c/type_match_size.c +++ b/ompi/mpi/c/type_match_size.c @@ -5,15 +5,15 @@ * 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, + * 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 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/type_set_attr.c b/ompi/mpi/c/type_set_attr.c index b24893fcb92..f0adc05c063 100644 --- a/ompi/mpi/c/type_set_attr.c +++ b/ompi/mpi/c/type_set_attr.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ @@ -46,7 +46,7 @@ int MPI_Type_set_attr (MPI_Datatype type, MEMCHECKER( memchecker_datatype(type); ); - + if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == type || MPI_DATATYPE_NULL == type) { @@ -58,10 +58,10 @@ int MPI_Type_set_attr (MPI_Datatype type, OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_set_c(TYPE_ATTR, type, &type->d_keyhash, + ret = ompi_attr_set_c(TYPE_ATTR, type, &type->d_keyhash, type_keyval, attribute_val, false); OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, - MPI_ERR_OTHER, FUNC_NAME); + MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/type_size.c b/ompi/mpi/c/type_size.c index 8a9b19eee13..4708e94e6eb 100644 --- a/ompi/mpi/c/type_size.c +++ b/ompi/mpi/c/type_size.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/type_size_x.c b/ompi/mpi/c/type_size_x.c index 5275d53a038..42111cfcd02 100644 --- a/ompi/mpi/c/type_size_x.c +++ b/ompi/mpi/c/type_size_x.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/type_struct.c b/ompi/mpi/c/type_struct.c index d9e196f36e1..e6573ef7333 100644 --- a/ompi/mpi/c/type_struct.c +++ b/ompi/mpi/c/type_struct.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/c/type_ub.c b/ompi/mpi/c/type_ub.c index a9d2cc823c0..679c94e1604 100644 --- a/ompi/mpi/c/type_ub.c +++ b/ompi/mpi/c/type_ub.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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$ */ diff --git a/ompi/mpi/c/unpack.c b/ompi/mpi/c/unpack.c index 9798236edeb..f97d56bf8c8 100644 --- a/ompi/mpi/c/unpack.c +++ b/ompi/mpi/c/unpack.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Unpack"; int MPI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype datatype, - MPI_Comm comm) + MPI_Comm comm) { int rc = 1; opal_convertor_t local_convertor; @@ -60,11 +60,11 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } - + if ((NULL == inbuf) || (NULL == position)) { /* outbuf can be MPI_BOTTOM */ return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } - + if (outcount < 0) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT, FUNC_NAME); } @@ -76,12 +76,12 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, OPAL_CR_ENTER_LIBRARY(); - if( insize > 0 ) { + if( insize > 0 ) { OBJ_CONSTRUCT( &local_convertor, opal_convertor_t ); /* the resulting convertor will be set the the position ZERO */ opal_convertor_copy_and_prepare_for_recv( ompi_mpi_local_convertor, &(datatype->super), outcount, outbuf, 0, &local_convertor ); - + /* Check for truncation */ opal_convertor_get_packed_size( &local_convertor, &size ); if( (*position + size) > (unsigned int)insize ) { @@ -89,23 +89,23 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TRUNCATE, FUNC_NAME); } - + /* Prepare the iovec with all informations */ outvec.iov_base = (char*) inbuf + (*position); outvec.iov_len = size; - + /* Do the actual unpacking */ iov_count = 1; rc = opal_convertor_unpack( &local_convertor, &outvec, &iov_count, &size ); *position += size; OBJ_DESTRUCT( &local_convertor ); - + /* All done. Note that the convertor returns 1 upon success, not OMPI_SUCCESS. */ - + } OMPI_ERRHANDLER_RETURN((rc == 1) ? OMPI_SUCCESS : OMPI_ERROR, comm, MPI_ERR_UNKNOWN, FUNC_NAME); - + } diff --git a/ompi/mpi/c/unpack_external.c b/ompi/mpi/c/unpack_external.c index 7220d826f24..e2eec5f7987 100644 --- a/ompi/mpi/c/unpack_external.c +++ b/ompi/mpi/c/unpack_external.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Unpack_external"; int MPI_Unpack_external (const char datarep[], const void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, - MPI_Datatype datatype) + MPI_Datatype datatype) { int rc; opal_convertor_t local_convertor; diff --git a/ompi/mpi/c/unpublish_name.c b/ompi/mpi/c/unpublish_name.c index 69888807a5a..eee0c581409 100644 --- a/ompi/mpi/c/unpublish_name.c +++ b/ompi/mpi/c/unpublish_name.c @@ -6,16 +6,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -45,14 +45,14 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ( NULL == port_name ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if ( NULL == service_name ) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } if (NULL == info || ompi_info_is_freed(info)) { @@ -63,7 +63,7 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, OPAL_CR_ENTER_LIBRARY(); - /* + /* * No predefined info-objects for this function in MPI-2, * therefore, we do not parse the info-object at the moment. */ @@ -81,7 +81,7 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ACCESS, FUNC_NAME); } - + /* none of the MPI-specific errors occurred - must be some * kind of internal error */ diff --git a/ompi/mpi/c/wait.c b/ompi/mpi/c/wait.c index cdf6fd74795..7b52e4fc5e2 100644 --- a/ompi/mpi/c/wait.c +++ b/ompi/mpi/c/wait.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -79,7 +79,7 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status) } MEMCHECKER( - opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int)); + opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int)); ); OPAL_CR_EXIT_LIBRARY(); return ompi_errhandler_request_invoke(1, request, FUNC_NAME); diff --git a/ompi/mpi/c/waitall.c b/ompi/mpi/c/waitall.c index a0fbba80bdc..ab66f254b2b 100644 --- a/ompi/mpi/c/waitall.c +++ b/ompi/mpi/c/waitall.c @@ -5,17 +5,17 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Waitall"; -int MPI_Waitall(int count, MPI_Request requests[], MPI_Status statuses[]) +int MPI_Waitall(int count, MPI_Request requests[], MPI_Status statuses[]) { MEMCHECKER( int j; @@ -47,7 +47,7 @@ int MPI_Waitall(int count, MPI_Request requests[], MPI_Status statuses[]) memchecker_request(&requests[j]); } ); - + if ( MPI_PARAM_CHECK ) { int i, rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -78,7 +78,7 @@ int MPI_Waitall(int count, MPI_Request requests[], MPI_Status statuses[]) return MPI_SUCCESS; } - if (MPI_SUCCESS != + if (MPI_SUCCESS != ompi_errhandler_request_invoke(count, requests, FUNC_NAME)) { OPAL_CR_EXIT_LIBRARY(); return MPI_ERR_IN_STATUS; diff --git a/ompi/mpi/c/waitany.c b/ompi/mpi/c/waitany.c index 58b94a0e41a..846a00cbe07 100644 --- a/ompi/mpi/c/waitany.c +++ b/ompi/mpi/c/waitany.c @@ -5,20 +5,20 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Waitany"; -int MPI_Waitany(int count, MPI_Request requests[], int *indx, MPI_Status *status) +int MPI_Waitany(int count, MPI_Request requests[], int *indx, MPI_Status *status) { MEMCHECKER( int j; @@ -50,7 +50,7 @@ int MPI_Waitany(int count, MPI_Request requests[], int *indx, MPI_Status *status memchecker_request(&requests[j]); } ); - + if ( MPI_PARAM_CHECK ) { int i, rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/waitsome.c b/ompi/mpi/c/waitsome.c index 47c9b3ac853..35edd9c941b 100644 --- a/ompi/mpi/c/waitsome.c +++ b/ompi/mpi/c/waitsome.c @@ -5,18 +5,18 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -42,7 +42,7 @@ static const char FUNC_NAME[] = "MPI_Waitsome"; int MPI_Waitsome(int incount, MPI_Request requests[], int *outcount, int indices[], - MPI_Status statuses[]) + MPI_Status statuses[]) { MEMCHECKER( int j; @@ -78,7 +78,7 @@ int MPI_Waitsome(int incount, MPI_Request requests[], OPAL_CR_ENTER_LIBRARY(); - if (OMPI_SUCCESS == ompi_request_wait_some( incount, requests, + if (OMPI_SUCCESS == ompi_request_wait_some( incount, requests, outcount, indices, statuses )) { OPAL_CR_EXIT_LIBRARY(); return MPI_SUCCESS; diff --git a/ompi/mpi/c/win_allocate.c b/ompi/mpi/c/win_allocate.c index 9d3c81ed581..2057878a904 100644 --- a/ompi/mpi/c/win_allocate.c +++ b/ompi/mpi/c/win_allocate.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win) { int ret = MPI_SUCCESS; - + MEMCHECKER( memchecker_comm(comm); ); @@ -52,7 +52,7 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (NULL == info || ompi_info_is_freed(info)) { @@ -62,7 +62,7 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, } else if (NULL == win) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_WIN, FUNC_NAME); } else if ( size < 0 ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME); } else if ( disp_unit <= 0 ) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_DISP, FUNC_NAME); } diff --git a/ompi/mpi/c/win_allocate_shared.c b/ompi/mpi/c/win_allocate_shared.c index 2efe2fe3005..e5f85b4e490 100644 --- a/ompi/mpi/c/win_allocate_shared.c +++ b/ompi/mpi/c/win_allocate_shared.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -46,7 +46,7 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win) { int ret = MPI_SUCCESS; - + MEMCHECKER( memchecker_comm(comm); ); @@ -55,7 +55,7 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (NULL == info || ompi_info_is_freed(info)) { @@ -65,7 +65,7 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, } else if (NULL == win) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_WIN, FUNC_NAME); } else if ( size < 0 ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME); } } diff --git a/ompi/mpi/c/win_attach.c b/ompi/mpi/c/win_attach.c index 9bd52c016d9..1cc9bdc5430 100644 --- a/ompi/mpi/c/win_attach.c +++ b/ompi/mpi/c/win_attach.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Win_attach"; int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_c2f.c b/ompi/mpi/c/win_c2f.c index 6bd80fac329..02fe32de2e8 100644 --- a/ompi/mpi/c/win_c2f.c +++ b/ompi/mpi/c/win_c2f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,7 +37,7 @@ static const char FUNC_NAME[] = "MPI_Win_c2f"; -MPI_Fint MPI_Win_c2f(MPI_Win win) +MPI_Fint MPI_Win_c2f(MPI_Win win) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/win_call_errhandler.c b/ompi/mpi/c/win_call_errhandler.c index f1cb02a0e14..1f74bcfa6f9 100644 --- a/ompi/mpi/c/win_call_errhandler.c +++ b/ompi/mpi/c/win_call_errhandler.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Win_call_errhandler"; -int MPI_Win_call_errhandler(MPI_Win win, int errorcode) +int MPI_Win_call_errhandler(MPI_Win win, int errorcode) { OPAL_CR_NOOP_PROGRESS(); diff --git a/ompi/mpi/c/win_complete.c b/ompi/mpi/c/win_complete.c index fa45c387971..cc982fa0178 100644 --- a/ompi/mpi/c/win_complete.c +++ b/ompi/mpi/c/win_complete.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_complete"; -int MPI_Win_complete(MPI_Win win) +int MPI_Win_complete(MPI_Win win) { int rc; diff --git a/ompi/mpi/c/win_create.c b/ompi/mpi/c/win_create.c index d87116ad69d..e2bef643c99 100644 --- a/ompi/mpi/c/win_create.c +++ b/ompi/mpi/c/win_create.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,10 +40,10 @@ static const char FUNC_NAME[] = "MPI_Win_create"; int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, - MPI_Info info, MPI_Comm comm, MPI_Win *win) + MPI_Info info, MPI_Comm comm, MPI_Win *win) { int ret = MPI_SUCCESS; - + MEMCHECKER( memchecker_comm(comm); ); @@ -52,7 +52,7 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (NULL == info || ompi_info_is_freed(info)) { @@ -62,7 +62,7 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, } else if (NULL == win) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_WIN, FUNC_NAME); } else if ( size < 0 ) { - return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME); + return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SIZE, FUNC_NAME); } else if ( disp_unit <= 0 ) { return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_DISP, FUNC_NAME); } diff --git a/ompi/mpi/c/win_create_dynamic.c b/ompi/mpi/c/win_create_dynamic.c index 20772b3caa6..5c71a6ba96d 100644 --- a/ompi/mpi/c/win_create_dynamic.c +++ b/ompi/mpi/c/win_create_dynamic.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,10 +40,10 @@ static const char FUNC_NAME[] = "MPI_Win_create_dynamic"; -int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win) +int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win) { int ret = MPI_SUCCESS; - + MEMCHECKER( memchecker_comm(comm); ); @@ -52,7 +52,7 @@ int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win) OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (ompi_comm_invalid (comm)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (NULL == info || ompi_info_is_freed(info)) { diff --git a/ompi/mpi/c/win_create_errhandler.c b/ompi/mpi/c/win_create_errhandler.c index ebd62757a5b..f34367e66ce 100644 --- a/ompi/mpi/c/win_create_errhandler.c +++ b/ompi/mpi/c/win_create_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -37,13 +37,13 @@ static const char FUNC_NAME[] = "MPI_Win_create_errhandler"; int MPI_Win_create_errhandler(MPI_Win_errhandler_function *function, - MPI_Errhandler *errhandler) + MPI_Errhandler *errhandler) { int err = MPI_SUCCESS; if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == function || + if (NULL == function || NULL == errhandler) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); @@ -53,7 +53,7 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function *function, OPAL_CR_ENTER_LIBRARY(); /* Create and cache the errhandler. Sets a refcount of 1. */ - *errhandler = + *errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_WIN, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_C); diff --git a/ompi/mpi/c/win_create_keyval.c b/ompi/mpi/c/win_create_keyval.c index 989fc5419bd..c3a319453ef 100644 --- a/ompi/mpi/c/win_create_keyval.c +++ b/ompi/mpi/c/win_create_keyval.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -38,7 +38,7 @@ static const char FUNC_NAME[] = "MPI_Win_create_keyval"; int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, MPI_Win_delete_attr_function *win_delete_attr_fn, - int *win_keyval, void *extra_state) + int *win_keyval, void *extra_state) { int ret; ompi_attribute_fn_ptr_union_t copy_fn; @@ -48,7 +48,7 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if ((NULL == win_copy_attr_fn) || (NULL == win_delete_attr_fn) || (NULL == win_keyval)) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/win_delete_attr.c b/ompi/mpi/c/win_delete_attr.c index f3c8179b752..db83c6d0a71 100644 --- a/ompi/mpi/c/win_delete_attr.c +++ b/ompi/mpi/c/win_delete_attr.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,9 +36,9 @@ static const char FUNC_NAME[] = "MPI_Win_delete_attr"; -int MPI_Win_delete_attr(MPI_Win win, int win_keyval) +int MPI_Win_delete_attr(MPI_Win win, int win_keyval) { - int ret; + int ret; if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); @@ -50,7 +50,7 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval) OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_delete(WIN_ATTR, win, win->w_keyhash, win_keyval, + ret = ompi_attr_delete(WIN_ATTR, win, win->w_keyhash, win_keyval, false); - OMPI_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/win_detach.c b/ompi/mpi/c/win_detach.c index 11572e6e73f..bdfe0bfd8fc 100644 --- a/ompi/mpi/c/win_detach.c +++ b/ompi/mpi/c/win_detach.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -43,7 +43,7 @@ static const char FUNC_NAME[] = "MPI_Win_detach"; int MPI_Win_detach(MPI_Win win, const void *base) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_f2c.c b/ompi/mpi/c/win_f2c.c index 74378bae1c0..885d72c9fd7 100644 --- a/ompi/mpi/c/win_f2c.c +++ b/ompi/mpi/c/win_f2c.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_f2c"; -MPI_Win MPI_Win_f2c(MPI_Fint win) +MPI_Win MPI_Win_f2c(MPI_Fint win) { int o_index= OMPI_FINT_2_INT(win); @@ -54,6 +54,6 @@ MPI_Win MPI_Win_f2c(MPI_Fint win) o_index >= opal_pointer_array_get_size(&ompi_mpi_windows)) { return NULL; } - + return (MPI_Win)opal_pointer_array_get_item(&ompi_mpi_windows, o_index); } diff --git a/ompi/mpi/c/win_fence.c b/ompi/mpi/c/win_fence.c index 03adb6874f2..9ae8e99cd03 100644 --- a/ompi/mpi/c/win_fence.c +++ b/ompi/mpi/c/win_fence.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Win_fence"; -int MPI_Win_fence(int assert, MPI_Win win) +int MPI_Win_fence(int assert, MPI_Win win) { int rc; @@ -48,7 +48,7 @@ int MPI_Win_fence(int assert, MPI_Win win) if (ompi_win_invalid(win)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME); - } else if (0 != (assert & ~(MPI_MODE_NOSTORE | MPI_MODE_NOPUT | + } else if (0 != (assert & ~(MPI_MODE_NOSTORE | MPI_MODE_NOPUT | MPI_MODE_NOPRECEDE | MPI_MODE_NOSUCCEED))) { return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME); } diff --git a/ompi/mpi/c/win_flush.c b/ompi/mpi/c/win_flush.c index 083baa148b2..e7ace5e39e7 100644 --- a/ompi/mpi/c/win_flush.c +++ b/ompi/mpi/c/win_flush.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Win_flush"; int MPI_Win_flush(int rank, MPI_Win win) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_flush_all.c b/ompi/mpi/c/win_flush_all.c index a0a4039de58..36c055a1b34 100644 --- a/ompi/mpi/c/win_flush_all.c +++ b/ompi/mpi/c/win_flush_all.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Win_flush_all"; int MPI_Win_flush_all(MPI_Win win) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_flush_local.c b/ompi/mpi/c/win_flush_local.c index 215e9be8ae0..2a1704bf7ce 100644 --- a/ompi/mpi/c/win_flush_local.c +++ b/ompi/mpi/c/win_flush_local.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Win_flush_local"; int MPI_Win_flush_local(int rank, MPI_Win win) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_flush_local_all.c b/ompi/mpi/c/win_flush_local_all.c index 90e61dea7b6..c02e37591cf 100644 --- a/ompi/mpi/c/win_flush_local_all.c +++ b/ompi/mpi/c/win_flush_local_all.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Win_flush_local_all"; int MPI_Win_flush_local_all(MPI_Win win) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_free.c b/ompi/mpi/c/win_free.c index 527d6c0a0fe..e955f7daeeb 100644 --- a/ompi/mpi/c/win_free.c +++ b/ompi/mpi/c/win_free.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Win_free"; -int MPI_Win_free(MPI_Win *win) +int MPI_Win_free(MPI_Win *win) { int ret; diff --git a/ompi/mpi/c/win_free_keyval.c b/ompi/mpi/c/win_free_keyval.c index 56202156da5..45c81bd2eb8 100644 --- a/ompi/mpi/c/win_free_keyval.c +++ b/ompi/mpi/c/win_free_keyval.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Win_free_keyval"; -int MPI_Win_free_keyval(int *win_keyval) +int MPI_Win_free_keyval(int *win_keyval) { int ret; @@ -44,7 +44,7 @@ int MPI_Win_free_keyval(int *win_keyval) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); if (NULL == win_keyval) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } } diff --git a/ompi/mpi/c/win_get_attr.c b/ompi/mpi/c/win_get_attr.c index 1651ab7b56f..81d2eb82093 100644 --- a/ompi/mpi/c/win_get_attr.c +++ b/ompi/mpi/c/win_get_attr.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Win_get_attr"; int MPI_Win_get_attr(MPI_Win win, int win_keyval, - void *attribute_val, int *flag) + void *attribute_val, int *flag) { int ret; @@ -62,8 +62,8 @@ int MPI_Win_get_attr(MPI_Win win, int win_keyval, src/attribute/attribute.c for a lengthy comment explaining Open MPI attribute behavior. */ - ret = ompi_attr_get_c(win->w_keyhash, win_keyval, + ret = ompi_attr_get_c(win->w_keyhash, win_keyval, (void**)attribute_val, flag); - OMPI_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/win_get_errhandler.c b/ompi/mpi/c/win_get_errhandler.c index 5ce1aa862d1..0fa721f992e 100644 --- a/ompi/mpi/c/win_get_errhandler.c +++ b/ompi/mpi/c/win_get_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_get_errhandler"; -int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler) +int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler) { MPI_Errhandler tmp; diff --git a/ompi/mpi/c/win_get_group.c b/ompi/mpi/c/win_get_group.c index 9edefb30327..67a0a814f4b 100644 --- a/ompi/mpi/c/win_get_group.c +++ b/ompi/mpi/c/win_get_group.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -35,7 +35,7 @@ static const char FUNC_NAME[] = "MPI_Win_get_group"; -int MPI_Win_get_group(MPI_Win win, MPI_Group *group) +int MPI_Win_get_group(MPI_Win win, MPI_Group *group) { int ret; diff --git a/ompi/mpi/c/win_get_info.c b/ompi/mpi/c/win_get_info.c index 83ac8b1459b..0f081a0153a 100644 --- a/ompi/mpi/c/win_get_info.c +++ b/ompi/mpi/c/win_get_info.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/win_get_name.c b/ompi/mpi/c/win_get_name.c index b25fcc5b358..04d03f5c903 100644 --- a/ompi/mpi/c/win_get_name.c +++ b/ompi/mpi/c/win_get_name.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_get_name"; -int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen) +int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen) { int ret; diff --git a/ompi/mpi/c/win_lock.c b/ompi/mpi/c/win_lock.c index ae10000e317..5ecfcbd0a47 100644 --- a/ompi/mpi/c/win_lock.c +++ b/ompi/mpi/c/win_lock.c @@ -6,16 +6,16 @@ * 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, + * 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) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Win_lock"; -int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) +int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) { int rc; @@ -48,7 +48,7 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) if (ompi_win_invalid(win)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME); - } else if (lock_type != MPI_LOCK_EXCLUSIVE && + } else if (lock_type != MPI_LOCK_EXCLUSIVE && lock_type != MPI_LOCK_SHARED) { return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_LOCKTYPE, FUNC_NAME); } else if (ompi_win_peer_invalid(win, rank)) { diff --git a/ompi/mpi/c/win_lock_all.c b/ompi/mpi/c/win_lock_all.c index 828316d5d13..5bf39cba852 100644 --- a/ompi/mpi/c/win_lock_all.c +++ b/ompi/mpi/c/win_lock_all.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_lock_all"; -int MPI_Win_lock_all(int assert, MPI_Win win) +int MPI_Win_lock_all(int assert, MPI_Win win) { int rc; diff --git a/ompi/mpi/c/win_post.c b/ompi/mpi/c/win_post.c index a1de2ec18c9..a41e08094ee 100644 --- a/ompi/mpi/c/win_post.c +++ b/ompi/mpi/c/win_post.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_post"; -int MPI_Win_post(MPI_Group group, int assert, MPI_Win win) +int MPI_Win_post(MPI_Group group, int assert, MPI_Win win) { int rc; @@ -45,7 +45,7 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win) if (ompi_win_invalid(win)) { return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME); - } else if (0 != (assert & ~(MPI_MODE_NOCHECK | MPI_MODE_NOSTORE | + } else if (0 != (assert & ~(MPI_MODE_NOCHECK | MPI_MODE_NOSTORE | MPI_MODE_NOPUT))) { return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ASSERT, FUNC_NAME); } diff --git a/ompi/mpi/c/win_set_attr.c b/ompi/mpi/c/win_set_attr.c index f206ae7e105..361cb9d3a76 100644 --- a/ompi/mpi/c/win_set_attr.c +++ b/ompi/mpi/c/win_set_attr.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_set_attr"; -int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) +int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) { int ret; @@ -50,7 +50,7 @@ int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) OPAL_CR_ENTER_LIBRARY(); - ret = ompi_attr_set_c(WIN_ATTR, win, &win->w_keyhash, + ret = ompi_attr_set_c(WIN_ATTR, win, &win->w_keyhash, win_keyval, attribute_val, false); - OMPI_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); + OMPI_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpi/c/win_set_errhandler.c b/ompi/mpi/c/win_set_errhandler.c index 8adbb8c433f..b54d7bba87e 100644 --- a/ompi/mpi/c/win_set_errhandler.c +++ b/ompi/mpi/c/win_set_errhandler.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_set_errhandler"; -int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) +int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) { MPI_Errhandler tmp; @@ -50,7 +50,7 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) FUNC_NAME); } else if (NULL == errhandler || MPI_ERRHANDLER_NULL == errhandler || - (OMPI_ERRHANDLER_TYPE_WIN != errhandler->eh_mpi_object_type && + (OMPI_ERRHANDLER_TYPE_WIN != errhandler->eh_mpi_object_type && OMPI_ERRHANDLER_TYPE_PREDEFINED != errhandler->eh_mpi_object_type) ) { return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ARG, FUNC_NAME); } diff --git a/ompi/mpi/c/win_set_info.c b/ompi/mpi/c/win_set_info.c index f96b370c5c2..415a9b526a1 100644 --- a/ompi/mpi/c/win_set_info.c +++ b/ompi/mpi/c/win_set_info.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2013 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/win_set_name.c b/ompi/mpi/c/win_set_name.c index 35b61de2246..e1ee8a0396e 100644 --- a/ompi/mpi/c/win_set_name.c +++ b/ompi/mpi/c/win_set_name.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/win_shared_query.c b/ompi/mpi/c/win_shared_query.c index 565e09bc969..67f0992c815 100644 --- a/ompi/mpi/c/win_shared_query.c +++ b/ompi/mpi/c/win_shared_query.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/c/win_start.c b/ompi/mpi/c/win_start.c index f0e7a9f44b5..94fe893f0cf 100644 --- a/ompi/mpi/c/win_start.c +++ b/ompi/mpi/c/win_start.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_start"; -int MPI_Win_start(MPI_Group group, int assert, MPI_Win win) +int MPI_Win_start(MPI_Group group, int assert, MPI_Win win) { int rc; diff --git a/ompi/mpi/c/win_sync.c b/ompi/mpi/c/win_sync.c index 90e3fba93d5..9e43a3ca084 100644 --- a/ompi/mpi/c/win_sync.c +++ b/ompi/mpi/c/win_sync.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -41,7 +41,7 @@ static const char FUNC_NAME[] = "MPI_Win_sync"; int MPI_Win_sync(MPI_Win win) { int ret = MPI_SUCCESS; - + /* argument checking */ if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); diff --git a/ompi/mpi/c/win_test.c b/ompi/mpi/c/win_test.c index 1a168ad4996..36c1e5a72d7 100644 --- a/ompi/mpi/c/win_test.c +++ b/ompi/mpi/c/win_test.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_test"; -int MPI_Win_test(MPI_Win win, int *flag) +int MPI_Win_test(MPI_Win win, int *flag) { int rc; diff --git a/ompi/mpi/c/win_unlock.c b/ompi/mpi/c/win_unlock.c index ea1bd2bac5a..46008517aa1 100644 --- a/ompi/mpi/c/win_unlock.c +++ b/ompi/mpi/c/win_unlock.c @@ -6,16 +6,16 @@ * 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, + * 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) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -39,7 +39,7 @@ static const char FUNC_NAME[] = "MPI_Win_unlock"; -int MPI_Win_unlock(int rank, MPI_Win win) +int MPI_Win_unlock(int rank, MPI_Win win) { int rc; diff --git a/ompi/mpi/c/win_unlock_all.c b/ompi/mpi/c/win_unlock_all.c index a5c85a64bd6..78c9b336b74 100644 --- a/ompi/mpi/c/win_unlock_all.c +++ b/ompi/mpi/c/win_unlock_all.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_unlock_all"; -int MPI_Win_unlock_all(MPI_Win win) +int MPI_Win_unlock_all(MPI_Win win) { int rc; diff --git a/ompi/mpi/c/win_wait.c b/ompi/mpi/c/win_wait.c index 3ee9f5bb368..dec449e11ff 100644 --- a/ompi/mpi/c/win_wait.c +++ b/ompi/mpi/c/win_wait.c @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -36,7 +36,7 @@ static const char FUNC_NAME[] = "MPI_Win_wait"; -int MPI_Win_wait(MPI_Win win) +int MPI_Win_wait(MPI_Win win) { int rc; diff --git a/ompi/mpi/c/wtick.c b/ompi/mpi/c/wtick.c index 8088888e5ff..1911a902a7a 100644 --- a/ompi/mpi/c/wtick.c +++ b/ompi/mpi/c/wtick.c @@ -5,15 +5,15 @@ * 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, + * 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-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/c/wtime.c b/ompi/mpi/c/wtime.c index c7309ddb0ab..2c533ec4639 100644 --- a/ompi/mpi/c/wtime.c +++ b/ompi/mpi/c/wtime.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mpi/cxx/Makefile.am b/ompi/mpi/cxx/Makefile.am index fec0d2aafb6..5a0efaac9f1 100644 --- a/ompi/mpi/cxx/Makefile.am +++ b/ompi/mpi/cxx/Makefile.am @@ -6,15 +6,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -29,7 +29,7 @@ if BUILD_MPI_CXX_BINDINGS mpi_lib = libmpi_cxx.la -lib_LTLIBRARIES = libmpi_cxx.la +lib_LTLIBRARIES = libmpi_cxx.la libmpi_cxx_la_SOURCES = \ mpicxx.cc \ intercepts.cc \ diff --git a/ompi/mpi/cxx/comm.cc b/ompi/mpi/cxx/comm.cc index b8f52218eb9..f524289531e 100644 --- a/ompi/mpi/cxx/comm.cc +++ b/ompi/mpi/cxx/comm.cc @@ -1,20 +1,20 @@ // -*- c++ -*- -// +// // 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, +// 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-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -48,7 +48,7 @@ MPI::Comm::Comm() } // copy -MPI::Comm::Comm(const Comm_Null& data) : Comm_Null(data) +MPI::Comm::Comm(const Comm_Null& data) : Comm_Null(data) { } @@ -56,11 +56,11 @@ MPI::Comm::Comm(const Comm_Null& data) : Comm_Null(data) MPI::Errhandler MPI::Comm::Create_errhandler(MPI::Comm::_MPI2CPP_ERRHANDLERFN_* function) { - MPI_Errhandler c_errhandler = + MPI_Errhandler c_errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_COMM, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_CXX); - c_errhandler->eh_cxx_dispatch_fn = + c_errhandler->eh_cxx_dispatch_fn = (ompi_errhandler_cxx_dispatch_fn_t*) ompi_mpi_cxx_comm_errhandler_invoke; return c_errhandler; @@ -84,7 +84,7 @@ MPI::Comm::do_create_keyval(MPI_Comm_copy_attr_function* c_copy_fn, // If both the callbacks are C, then do the simple thing -- no // need for all the C++ machinery. if (NULL != c_copy_fn && NULL != c_delete_fn) { - copy_fn.attr_communicator_copy_fn = + copy_fn.attr_communicator_copy_fn = (MPI_Comm_internal_copy_attr_function*) c_copy_fn; delete_fn.attr_communicator_delete_fn = c_delete_fn; ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, delete_fn, @@ -104,10 +104,10 @@ MPI::Comm::do_create_keyval(MPI_Comm_copy_attr_function* c_copy_fn, // extra_state into the user's original extra_state). Ensure to // malloc() the struct here (vs new) so that it can be free()'ed // by the C attribute base. - cxx_extra_state = (keyval_intercept_data_t*) + cxx_extra_state = (keyval_intercept_data_t*) malloc(sizeof(keyval_intercept_data_t)); if (NULL == cxx_extra_state) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, "MPI::Comm::Create_keyval"); } cxx_extra_state->c_copy_fn = c_copy_fn; @@ -131,7 +131,7 @@ MPI::Comm::do_create_keyval(MPI_Comm_copy_attr_function* c_copy_fn, } if (2 != count) { free(cxx_extra_state); - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, "MPI::Comm::Create_keyval"); } @@ -141,7 +141,7 @@ MPI::Comm::do_create_keyval(MPI_Comm_copy_attr_function* c_copy_fn, // to 0), the cxx_extra_state is free()'ed. copy_fn.attr_communicator_copy_fn = - (MPI_Comm_internal_copy_attr_function*) + (MPI_Comm_internal_copy_attr_function*) ompi_mpi_cxx_comm_copy_attr_intercept; delete_fn.attr_communicator_delete_fn = ompi_mpi_cxx_comm_delete_attr_intercept; diff --git a/ompi/mpi/cxx/comm.h b/ompi/mpi/cxx/comm.h index 9e9305a5f4d..bd50a6b1e03 100644 --- a/ompi/mpi/cxx/comm.h +++ b/ompi/mpi/cxx/comm.h @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006-2009 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -31,7 +31,7 @@ class Comm_Null { inline Comm_Null() { } // copy inline Comm_Null(const Comm_Null& data) : pmpi_comm(data.pmpi_comm) { } - // inter-language operability + // inter-language operability inline Comm_Null(MPI_Comm data) : pmpi_comm(data) { } inline Comm_Null(const PMPI::Comm_Null& data) : pmpi_comm(data) { } @@ -40,7 +40,7 @@ class Comm_Null { virtual inline ~Comm_Null() { } inline Comm_Null& operator=(const Comm_Null& data) { - pmpi_comm = data.pmpi_comm; + pmpi_comm = data.pmpi_comm; return *this; } @@ -62,7 +62,7 @@ class Comm_Null { inline Comm_Null() : mpi_comm(MPI_COMM_NULL) { } // copy inline Comm_Null(const Comm_Null& data) : mpi_comm(data.mpi_comm) { } - // inter-language operability + // inter-language operability inline Comm_Null(MPI_Comm data) : mpi_comm(data) { } // destruction @@ -81,7 +81,7 @@ class Comm_Null { #endif - + protected: #if 0 /* OMPI_ENABLE_MPI_PROFILING */ @@ -89,7 +89,7 @@ class Comm_Null { #else MPI_Comm mpi_comm; #endif - + }; @@ -102,9 +102,9 @@ class Comm : public Comm_Null { __mpi_interface_deprecated__("MPI::Comm::Errhandler_fn was deprecated in MPI-2.2; use MPI::Comm::Errhandler_function instead"); typedef int Copy_attr_function(const Comm& oldcomm, int comm_keyval, void* extra_state, void* attribute_val_in, - void* attribute_val_out, + void* attribute_val_out, bool& flag); - typedef int Delete_attr_function(Comm& comm, int comm_keyval, + typedef int Delete_attr_function(Comm& comm, int comm_keyval, void* attribute_val, void* extra_state); #if !0 /* OMPI_ENABLE_MPI_PROFILING */ @@ -120,7 +120,7 @@ class Comm : public Comm_Null { Comm(const Comm_Null& data); #if 0 /* OMPI_ENABLE_MPI_PROFILING */ - Comm(const Comm& data) : + Comm(const Comm& data) : Comm_Null(data), pmpi_comm((const PMPI::Comm&) data) { } @@ -136,13 +136,13 @@ class Comm : public Comm_Null { // assignment Comm& operator=(const Comm& data) { this->Comm_Null::operator=(data); - pmpi_comm = data.pmpi_comm; + pmpi_comm = data.pmpi_comm; return *this; } Comm& operator=(const Comm_Null& data) { this->Comm_Null::operator=(data); MPI_Comm tmp = data; - pmpi_comm = tmp; + pmpi_comm = tmp; return *this; } // inter-language operability @@ -163,7 +163,7 @@ class Comm : public Comm_Null { // Point-to-Point // - virtual void Send(const void *buf, int count, + virtual void Send(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; virtual void Recv(void *buf, int count, const Datatype & datatype, @@ -172,25 +172,25 @@ class Comm : public Comm_Null { virtual void Recv(void *buf, int count, const Datatype & datatype, int source, int tag) const; - + virtual void Bsend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; - - virtual void Ssend(const void *buf, int count, + + virtual void Ssend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const ; virtual void Rsend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; - + virtual Request Isend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; - + virtual Request Ibsend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; - + virtual Request Issend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; - + virtual Request Irsend(const void *buf, int count, const Datatype & datatype, int dest, int tag) const; @@ -202,67 +202,67 @@ class Comm : public Comm_Null { virtual bool Iprobe(int source, int tag) const; virtual void Probe(int source, int tag, Status & status) const; - + virtual void Probe(int source, int tag) const; - + virtual Prequest Send_init(const void *buf, int count, - const Datatype & datatype, int dest, + const Datatype & datatype, int dest, int tag) const; - + virtual Prequest Bsend_init(const void *buf, int count, - const Datatype & datatype, int dest, + const Datatype & datatype, int dest, int tag) const; - + virtual Prequest Ssend_init(const void *buf, int count, - const Datatype & datatype, int dest, + const Datatype & datatype, int dest, int tag) const; - + virtual Prequest Rsend_init(const void *buf, int count, - const Datatype & datatype, int dest, + const Datatype & datatype, int dest, int tag) const; - + virtual Prequest Recv_init(void *buf, int count, - const Datatype & datatype, int source, + const Datatype & datatype, int source, int tag) const; - + virtual void Sendrecv(const void *sendbuf, int sendcount, - const Datatype & sendtype, int dest, int sendtag, - void *recvbuf, int recvcount, + const Datatype & sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, const Datatype & recvtype, int source, int recvtag, Status & status) const; - + virtual void Sendrecv(const void *sendbuf, int sendcount, - const Datatype & sendtype, int dest, int sendtag, - void *recvbuf, int recvcount, + const Datatype & sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, const Datatype & recvtype, int source, int recvtag) const; virtual void Sendrecv_replace(void *buf, int count, - const Datatype & datatype, int dest, + const Datatype & datatype, int dest, int sendtag, int source, int recvtag, Status & status) const; virtual void Sendrecv_replace(void *buf, int count, - const Datatype & datatype, int dest, + const Datatype & datatype, int dest, int sendtag, int source, int recvtag) const; - + // // Groups, Contexts, and Communicators // virtual Group Get_group() const; - + virtual int Get_size() const; virtual int Get_rank() const; - + static int Compare(const Comm & comm1, const Comm & comm2); - + virtual Comm& Clone() const = 0; virtual void Free(void); - + virtual bool Is_inter() const; @@ -278,105 +278,105 @@ class Comm : public Comm_Null { Barrier() const; virtual void - Bcast(void *buffer, int count, + Bcast(void *buffer, int count, const Datatype& datatype, int root) const; - + virtual void - Gather(const void *sendbuf, int sendcount, - const Datatype & sendtype, - void *recvbuf, int recvcount, + Gather(const void *sendbuf, int sendcount, + const Datatype & sendtype, + void *recvbuf, int recvcount, const Datatype & recvtype, int root) const; - + virtual void - Gatherv(const void *sendbuf, int sendcount, - const Datatype & sendtype, void *recvbuf, - const int recvcounts[], const int displs[], + Gatherv(const void *sendbuf, int sendcount, + const Datatype & sendtype, void *recvbuf, + const int recvcounts[], const int displs[], const Datatype & recvtype, int root) const; - + virtual void - Scatter(const void *sendbuf, int sendcount, - const Datatype & sendtype, - void *recvbuf, int recvcount, + Scatter(const void *sendbuf, int sendcount, + const Datatype & sendtype, + void *recvbuf, int recvcount, const Datatype & recvtype, int root) const; - + virtual void - Scatterv(const void *sendbuf, const int sendcounts[], + Scatterv(const void *sendbuf, const int sendcounts[], const int displs[], const Datatype & sendtype, - void *recvbuf, int recvcount, + void *recvbuf, int recvcount, const Datatype & recvtype, int root) const; - + virtual void - Allgather(const void *sendbuf, int sendcount, - const Datatype & sendtype, void *recvbuf, + Allgather(const void *sendbuf, int sendcount, + const Datatype & sendtype, void *recvbuf, int recvcount, const Datatype & recvtype) const; - + virtual void - Allgatherv(const void *sendbuf, int sendcount, - const Datatype & sendtype, void *recvbuf, + Allgatherv(const void *sendbuf, int sendcount, + const Datatype & sendtype, void *recvbuf, const int recvcounts[], const int displs[], const Datatype & recvtype) const; - + virtual void - Alltoall(const void *sendbuf, int sendcount, - const Datatype & sendtype, void *recvbuf, + Alltoall(const void *sendbuf, int sendcount, + const Datatype & sendtype, void *recvbuf, int recvcount, const Datatype & recvtype) const; - + virtual void - Alltoallv(const void *sendbuf, const int sendcounts[], - const int sdispls[], const Datatype & sendtype, - void *recvbuf, const int recvcounts[], + Alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], const Datatype & sendtype, + void *recvbuf, const int recvcounts[], const int rdispls[], const Datatype & recvtype) const; - + virtual void Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const Datatype recvtypes[]) const; - + virtual void - Reduce(const void *sendbuf, void *recvbuf, int count, - const Datatype & datatype, const Op & op, + Reduce(const void *sendbuf, void *recvbuf, int count, + const Datatype & datatype, const Op & op, int root) const; - - + + virtual void Allreduce(const void *sendbuf, void *recvbuf, int count, const Datatype & datatype, const Op & op) const; - + virtual void - Reduce_scatter(const void *sendbuf, void *recvbuf, - int recvcounts[], - const Datatype & datatype, + Reduce_scatter(const void *sendbuf, void *recvbuf, + int recvcounts[], + const Datatype & datatype, const Op & op) const; - // + // // Process Creation // virtual void Disconnect(); static Intercomm Get_parent(); - + static Intercomm Join(const int fd); // // External Interfaces // - + virtual void Get_name(char * comm_name, int& resultlen) const; virtual void Set_name(const char* comm_name); - + // // Process Topologies // - + virtual int Get_topology() const; - + // // Environmental Inquiry // - + virtual void Abort(int errorcode); // @@ -411,7 +411,7 @@ class Comm : public Comm_Null { Delete_attr_function* comm_delete_attr_fn, void* extra_state); -protected: +protected: static int do_create_keyval(MPI_Comm_copy_attr_function* c_copy_fn, MPI_Comm_delete_attr_function* c_delete_fn, Copy_attr_function* cxx_copy_fn, @@ -425,17 +425,17 @@ class Comm : public Comm_Null { virtual void Set_attr(int comm_keyval, const void* attribute_val) const; virtual bool Get_attr(int comm_keyval, void* attribute_val) const; - + virtual void Delete_attr(int comm_keyval); static int NULL_COPY_FN(const Comm& oldcomm, int comm_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, bool& flag); - + static int DUP_FN(const Comm& oldcomm, int comm_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, bool& flag); - + static int NULL_DELETE_FN(Comm& comm, int comm_keyval, void* attribute_val, void* extra_state); diff --git a/ompi/mpi/cxx/comm_inln.h b/ompi/mpi/cxx/comm_inln.h index 95116a0170f..53f95f83329 100644 --- a/ompi/mpi/cxx/comm_inln.h +++ b/ompi/mpi/cxx/comm_inln.h @@ -1,30 +1,30 @@ // -*- c++ -*- -// +// // 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, +// 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-2012 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // - + // // Point-to-Point // inline void -MPI::Comm::Send(const void *buf, int count, +MPI::Comm::Send(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { (void)MPI_Send(const_cast(buf), count, datatype, dest, tag, mpi_comm); @@ -41,7 +41,7 @@ inline void MPI::Comm::Recv(void *buf, int count, const MPI::Datatype & datatype, int source, int tag) const { - (void)MPI_Recv(buf, count, datatype, source, + (void)MPI_Recv(buf, count, datatype, source, tag, mpi_comm, MPI_STATUS_IGNORE); } @@ -49,15 +49,15 @@ inline void MPI::Comm::Bsend(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - (void)MPI_Bsend(const_cast(buf), count, datatype, + (void)MPI_Bsend(const_cast(buf), count, datatype, dest, tag, mpi_comm); } inline void -MPI::Comm::Ssend(const void *buf, int count, - const MPI::Datatype & datatype, int dest, int tag) const +MPI::Comm::Ssend(const void *buf, int count, + const MPI::Datatype & datatype, int dest, int tag) const { - (void)MPI_Ssend(const_cast(buf), count, datatype, dest, + (void)MPI_Ssend(const_cast(buf), count, datatype, dest, tag, mpi_comm); } @@ -65,7 +65,7 @@ inline void MPI::Comm::Rsend(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - (void)MPI_Rsend(const_cast(buf), count, datatype, + (void)MPI_Rsend(const_cast(buf), count, datatype, dest, tag, mpi_comm); } @@ -74,7 +74,7 @@ MPI::Comm::Isend(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { MPI_Request request; - (void)MPI_Isend(const_cast(buf), count, datatype, + (void)MPI_Isend(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; } @@ -83,8 +83,8 @@ inline MPI::Request MPI::Comm::Ibsend(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - MPI_Request request; - (void)MPI_Ibsend(const_cast(buf), count, datatype, + MPI_Request request; + (void)MPI_Ibsend(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; } @@ -93,7 +93,7 @@ inline MPI::Request MPI::Comm::Issend(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - MPI_Request request; + MPI_Request request; (void)MPI_Issend(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; @@ -104,7 +104,7 @@ MPI::Comm::Irsend(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { MPI_Request request; - (void)MPI_Irsend(const_cast(buf), count, datatype, + (void)MPI_Irsend(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; } @@ -114,7 +114,7 @@ MPI::Comm::Irecv(void *buf, int count, const MPI::Datatype & datatype, int source, int tag) const { MPI_Request request; - (void)MPI_Irecv(buf, count, datatype, source, + (void)MPI_Irecv(buf, count, datatype, source, tag, mpi_comm, &request); return request; } @@ -127,7 +127,7 @@ MPI::Comm::Iprobe(int source, int tag, MPI::Status & status) const (void)MPI_Iprobe(source, tag, mpi_comm, &t, &status.mpi_status); return OPAL_INT_TO_BOOL(t); } - + inline bool MPI::Comm::Iprobe(int source, int tag) const { @@ -151,9 +151,9 @@ MPI::Comm::Probe(int source, int tag) const inline MPI::Prequest MPI::Comm::Send_init(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const -{ +{ MPI_Request request; - (void)MPI_Send_init(const_cast(buf), count, datatype, + (void)MPI_Send_init(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; } @@ -162,8 +162,8 @@ inline MPI::Prequest MPI::Comm::Bsend_init(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - MPI_Request request; - (void)MPI_Bsend_init(const_cast(buf), count, datatype, + MPI_Request request; + (void)MPI_Bsend_init(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; } @@ -172,7 +172,7 @@ inline MPI::Prequest MPI::Comm::Ssend_init(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - MPI_Request request; + MPI_Request request; (void)MPI_Ssend_init(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; @@ -182,7 +182,7 @@ inline MPI::Prequest MPI::Comm::Rsend_init(const void *buf, int count, const MPI::Datatype & datatype, int dest, int tag) const { - MPI_Request request; + MPI_Request request; (void)MPI_Rsend_init(const_cast(buf), count, datatype, dest, tag, mpi_comm, &request); return request; @@ -192,45 +192,45 @@ inline MPI::Prequest MPI::Comm::Recv_init(void *buf, int count, const MPI::Datatype & datatype, int source, int tag) const { - MPI_Request request; - (void)MPI_Recv_init(buf, count, datatype, source, + MPI_Request request; + (void)MPI_Recv_init(buf, count, datatype, source, tag, mpi_comm, &request); return request; } inline void MPI::Comm::Sendrecv(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, int dest, int sendtag, - void *recvbuf, int recvcount, + const MPI::Datatype & sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, const MPI::Datatype & recvtype, int source, int recvtag, MPI::Status & status) const { - (void)MPI_Sendrecv(const_cast(sendbuf), sendcount, + (void)MPI_Sendrecv(const_cast(sendbuf), sendcount, sendtype, - dest, sendtag, recvbuf, recvcount, - recvtype, + dest, sendtag, recvbuf, recvcount, + recvtype, source, recvtag, mpi_comm, &status.mpi_status); } inline void MPI::Comm::Sendrecv(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, int dest, int sendtag, - void *recvbuf, int recvcount, + const MPI::Datatype & sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, const MPI::Datatype & recvtype, int source, int recvtag) const { - (void)MPI_Sendrecv(const_cast(sendbuf), sendcount, + (void)MPI_Sendrecv(const_cast(sendbuf), sendcount, sendtype, - dest, sendtag, recvbuf, recvcount, - recvtype, + dest, sendtag, recvbuf, recvcount, + recvtype, source, recvtag, mpi_comm, MPI_STATUS_IGNORE); } inline void MPI::Comm::Sendrecv_replace(void *buf, int count, - const MPI::Datatype & datatype, int dest, + const MPI::Datatype & datatype, int dest, int sendtag, int source, - int recvtag, MPI::Status & status) const + int recvtag, MPI::Status & status) const { (void)MPI_Sendrecv_replace(buf, count, datatype, dest, sendtag, source, recvtag, mpi_comm, @@ -239,9 +239,9 @@ MPI::Comm::Sendrecv_replace(void *buf, int count, inline void MPI::Comm::Sendrecv_replace(void *buf, int count, - const MPI::Datatype & datatype, int dest, + const MPI::Datatype & datatype, int dest, int sendtag, int source, - int recvtag) const + int recvtag) const { (void)MPI_Sendrecv_replace(buf, count, datatype, dest, sendtag, source, recvtag, mpi_comm, @@ -253,29 +253,29 @@ MPI::Comm::Sendrecv_replace(void *buf, int count, // inline MPI::Group -MPI::Comm::Get_group() const +MPI::Comm::Get_group() const { MPI_Group group; (void)MPI_Comm_group(mpi_comm, &group); return group; } - + inline int -MPI::Comm::Get_size() const +MPI::Comm::Get_size() const { int size; (void)MPI_Comm_size (mpi_comm, &size); return size; } - + inline int -MPI::Comm::Get_rank() const +MPI::Comm::Get_rank() const { int rank; (void)MPI_Comm_rank (mpi_comm, &rank); return rank; } - + inline int MPI::Comm::Compare(const MPI::Comm & comm1, const MPI::Comm & comm2) @@ -286,7 +286,7 @@ MPI::Comm::Compare(const MPI::Comm & comm1, } inline void -MPI::Comm::Free(void) +MPI::Comm::Free(void) { (void)MPI_Comm_free(&mpi_comm); } @@ -311,16 +311,16 @@ MPI::Comm::Barrier() const } inline void -MPI::Comm::Bcast(void *buffer, int count, +MPI::Comm::Bcast(void *buffer, int count, const MPI::Datatype& datatype, int root) const -{ +{ (void)MPI_Bcast(buffer, count, datatype, root, mpi_comm); } inline void -MPI::Comm::Gather(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, - void *recvbuf, int recvcount, +MPI::Comm::Gather(const void *sendbuf, int sendcount, + const MPI::Datatype & sendtype, + void *recvbuf, int recvcount, const MPI::Datatype & recvtype, int root) const { (void)MPI_Gather(const_cast(sendbuf), sendcount, sendtype, @@ -328,66 +328,66 @@ MPI::Comm::Gather(const void *sendbuf, int sendcount, } inline void -MPI::Comm::Gatherv(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, void *recvbuf, - const int recvcounts[], const int displs[], +MPI::Comm::Gatherv(const void *sendbuf, int sendcount, + const MPI::Datatype & sendtype, void *recvbuf, + const int recvcounts[], const int displs[], const MPI::Datatype & recvtype, int root) const { (void)MPI_Gatherv(const_cast(sendbuf), sendcount, sendtype, recvbuf, const_cast(recvcounts), - const_cast(displs), + const_cast(displs), recvtype, root, mpi_comm); } inline void -MPI::Comm::Scatter(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, - void *recvbuf, int recvcount, +MPI::Comm::Scatter(const void *sendbuf, int sendcount, + const MPI::Datatype & sendtype, + void *recvbuf, int recvcount, const MPI::Datatype & recvtype, int root) const -{ +{ (void)MPI_Scatter(const_cast(sendbuf), sendcount, sendtype, recvbuf, recvcount, recvtype, root, mpi_comm); } inline void -MPI::Comm::Scatterv(const void *sendbuf, const int sendcounts[], +MPI::Comm::Scatterv(const void *sendbuf, const int sendcounts[], const int displs[], const MPI::Datatype & sendtype, - void *recvbuf, int recvcount, + void *recvbuf, int recvcount, const MPI::Datatype & recvtype, int root) const { (void)MPI_Scatterv(const_cast(sendbuf), - const_cast(sendcounts), - const_cast(displs), sendtype, - recvbuf, recvcount, recvtype, + const_cast(sendcounts), + const_cast(displs), sendtype, + recvbuf, recvcount, recvtype, root, mpi_comm); } inline void -MPI::Comm::Allgather(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, void *recvbuf, - int recvcount, const MPI::Datatype & recvtype) const +MPI::Comm::Allgather(const void *sendbuf, int sendcount, + const MPI::Datatype & sendtype, void *recvbuf, + int recvcount, const MPI::Datatype & recvtype) const { - (void)MPI_Allgather(const_cast(sendbuf), sendcount, + (void)MPI_Allgather(const_cast(sendbuf), sendcount, sendtype, recvbuf, recvcount, recvtype, mpi_comm); } inline void -MPI::Comm::Allgatherv(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, void *recvbuf, +MPI::Comm::Allgatherv(const void *sendbuf, int sendcount, + const MPI::Datatype & sendtype, void *recvbuf, const int recvcounts[], const int displs[], const MPI::Datatype & recvtype) const { - (void)MPI_Allgatherv(const_cast(sendbuf), sendcount, - sendtype, recvbuf, + (void)MPI_Allgatherv(const_cast(sendbuf), sendcount, + sendtype, recvbuf, const_cast(recvcounts), - const_cast(displs), + const_cast(displs), recvtype, mpi_comm); } inline void -MPI::Comm::Alltoall(const void *sendbuf, int sendcount, - const MPI::Datatype & sendtype, void *recvbuf, +MPI::Comm::Alltoall(const void *sendbuf, int sendcount, + const MPI::Datatype & sendtype, void *recvbuf, int recvcount, const MPI::Datatype & recvtype) const { (void)MPI_Alltoall(const_cast(sendbuf), sendcount, @@ -396,17 +396,17 @@ MPI::Comm::Alltoall(const void *sendbuf, int sendcount, } inline void -MPI::Comm::Alltoallv(const void *sendbuf, const int sendcounts[], - const int sdispls[], const MPI::Datatype & sendtype, - void *recvbuf, const int recvcounts[], - const int rdispls[], - const MPI::Datatype & recvtype) const +MPI::Comm::Alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI::Datatype & sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], + const MPI::Datatype & recvtype) const { - (void)MPI_Alltoallv(const_cast(sendbuf), - const_cast(sendcounts), - const_cast(sdispls), sendtype, recvbuf, - const_cast(recvcounts), - const_cast(rdispls), + (void)MPI_Alltoallv(const_cast(sendbuf), + const_cast(sendcounts), + const_cast(sdispls), sendtype, recvbuf, + const_cast(recvcounts), + const_cast(rdispls), recvtype,mpi_comm); } @@ -414,33 +414,33 @@ inline void MPI::Comm::Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI::Datatype sendtypes[], void *recvbuf, const int recvcounts[], - const int rdispls[], + const int rdispls[], const MPI::Datatype recvtypes[]) const { const int comm_size = Get_size(); MPI_Datatype *const data_type_tbl = new MPI_Datatype [2*comm_size]; - + // This must be done because MPI::Datatype arrays cannot be - // converted directly into MPI_Datatype arrays. + // converted directly into MPI_Datatype arrays. for (int i_rank=0; i_rank < comm_size; i_rank++) { data_type_tbl[i_rank] = sendtypes[i_rank]; data_type_tbl[i_rank + comm_size] = recvtypes[i_rank]; } - - (void)MPI_Alltoallw(const_cast(sendbuf), + + (void)MPI_Alltoallw(const_cast(sendbuf), const_cast(sendcounts), const_cast(sdispls), data_type_tbl, recvbuf, - const_cast(recvcounts), + const_cast(recvcounts), const_cast(rdispls), &data_type_tbl[comm_size], mpi_comm); - + delete[] data_type_tbl; } inline void -MPI::Comm::Reduce(const void *sendbuf, void *recvbuf, int count, - const MPI::Datatype & datatype, const MPI::Op& op, +MPI::Comm::Reduce(const void *sendbuf, void *recvbuf, int count, + const MPI::Datatype & datatype, const MPI::Op& op, int root) const { (void)MPI_Reduce(const_cast(sendbuf), recvbuf, count, datatype, op, root, mpi_comm); @@ -454,9 +454,9 @@ MPI::Comm::Allreduce(const void *sendbuf, void *recvbuf, int count, } inline void -MPI::Comm::Reduce_scatter(const void *sendbuf, void *recvbuf, - int recvcounts[], - const MPI::Datatype & datatype, +MPI::Comm::Reduce_scatter(const void *sendbuf, void *recvbuf, + int recvcounts[], + const MPI::Datatype & datatype, const MPI::Op& op) const { (void)MPI_Reduce_scatter(const_cast(sendbuf), recvbuf, recvcounts, @@ -484,7 +484,7 @@ MPI::Comm::Get_parent() inline MPI::Intercomm -MPI::Comm::Join(const int fd) +MPI::Comm::Join(const int fd) { MPI_Comm newcomm; (void) MPI_Comm_join((int) fd, &newcomm); @@ -502,29 +502,29 @@ MPI::Comm::Get_name(char* comm_name, int& resultlen) const } inline void -MPI::Comm::Set_name(const char* comm_name) +MPI::Comm::Set_name(const char* comm_name) { (void) MPI_Comm_set_name(mpi_comm, const_cast(comm_name)); } - + // //Process Topologies // inline int -MPI::Comm::Get_topology() const +MPI::Comm::Get_topology() const { int status; (void)MPI_Topo_test(mpi_comm, &status); return status; } - + // // Environmental Inquiry // inline void -MPI::Comm::Abort(int errorcode) +MPI::Comm::Abort(int errorcode) { (void)MPI_Abort(mpi_comm, errorcode); } @@ -549,7 +549,7 @@ MPI::Comm::Set_errhandler(const MPI::Errhandler& errhandler) (void)MPI_Comm_set_errhandler(mpi_comm, errhandler); } -inline void +inline void MPI::Comm::Call_errhandler(int errorcode) const { (void) MPI_Comm_call_errhandler(mpi_comm, errorcode); @@ -559,12 +559,12 @@ MPI::Comm::Call_errhandler(int errorcode) const // functions inline int MPI::Comm::Create_keyval(MPI::Comm::Copy_attr_function* comm_copy_attr_fn, - MPI::Comm::Delete_attr_function* comm_delete_attr_fn, + MPI::Comm::Delete_attr_function* comm_delete_attr_fn, void* extra_state) { // Back-end function does the heavy lifting int ret, keyval; - ret = do_create_keyval(NULL, NULL, + ret = do_create_keyval(NULL, NULL, comm_copy_attr_fn, comm_delete_attr_fn, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; @@ -574,7 +574,7 @@ MPI::Comm::Create_keyval(MPI::Comm::Copy_attr_function* comm_copy_attr_fn, // functions inline int MPI::Comm::Create_keyval(MPI_Comm_copy_attr_function* comm_copy_attr_fn, - MPI_Comm_delete_attr_function* comm_delete_attr_fn, + MPI_Comm_delete_attr_function* comm_delete_attr_fn, void* extra_state) { // Back-end function does the heavy lifting @@ -645,11 +645,11 @@ MPI::Comm::Delete_attr(int comm_keyval) // about them. Use comments instead of just deleting the param names // outright so that we know/remember what they are. inline int -MPI::Comm::NULL_COPY_FN(const MPI::Comm& /* oldcomm */, +MPI::Comm::NULL_COPY_FN(const MPI::Comm& /* oldcomm */, int /* comm_keyval */, - void* /* extra_state */, + void* /* extra_state */, void* /* attribute_val_in */, - void* /* attribute_val_out */, + void* /* attribute_val_out */, bool& flag) { flag = false; @@ -664,12 +664,12 @@ MPI::Comm::DUP_FN(const MPI::Comm& oldcomm, int comm_keyval, if (sizeof(bool) != sizeof(int)) { int f = (int)flag; int ret; - ret = MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, + ret = MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, &f); flag = OPAL_INT_TO_BOOL(f); return ret; } else { - return MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, + return MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, (int*)&flag); } @@ -679,8 +679,8 @@ MPI::Comm::DUP_FN(const MPI::Comm& oldcomm, int comm_keyval, // about them. Use comments instead of just deleting the param names // outright so that we know/remember what they are. inline int -MPI::Comm::NULL_DELETE_FN(MPI::Comm& /* comm */, - int /* comm_keyval */, +MPI::Comm::NULL_DELETE_FN(MPI::Comm& /* comm */, + int /* comm_keyval */, void* /* attribute_val */, void* /* extra_state */) { diff --git a/ompi/mpi/cxx/constants.h b/ompi/mpi/cxx/constants.h index 173b7fe3abe..eb4a991626b 100644 --- a/ompi/mpi/cxx/constants.h +++ b/ompi/mpi/cxx/constants.h @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2008-2009 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -113,14 +113,14 @@ static const int MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME; // elementary datatypes (C / C++) OMPI_DECLSPEC extern const Datatype CHAR; -OMPI_DECLSPEC extern const Datatype SHORT; -OMPI_DECLSPEC extern const Datatype INT; +OMPI_DECLSPEC extern const Datatype SHORT; +OMPI_DECLSPEC extern const Datatype INT; OMPI_DECLSPEC extern const Datatype LONG; OMPI_DECLSPEC extern const Datatype SIGNED_CHAR; OMPI_DECLSPEC extern const Datatype UNSIGNED_CHAR; -OMPI_DECLSPEC extern const Datatype UNSIGNED_SHORT; -OMPI_DECLSPEC extern const Datatype UNSIGNED; -OMPI_DECLSPEC extern const Datatype UNSIGNED_LONG; +OMPI_DECLSPEC extern const Datatype UNSIGNED_SHORT; +OMPI_DECLSPEC extern const Datatype UNSIGNED; +OMPI_DECLSPEC extern const Datatype UNSIGNED_LONG; OMPI_DECLSPEC extern const Datatype FLOAT; OMPI_DECLSPEC extern const Datatype DOUBLE; OMPI_DECLSPEC extern const Datatype LONG_DOUBLE; @@ -245,7 +245,7 @@ OMPI_DECLSPEC extern Comm_Null COMM_NULL; OMPI_DECLSPEC extern const Datatype DATATYPE_NULL; OMPI_DECLSPEC extern Request REQUEST_NULL; OMPI_DECLSPEC extern const Op OP_NULL; -OMPI_DECLSPEC extern const Errhandler ERRHANDLER_NULL; +OMPI_DECLSPEC extern const Errhandler ERRHANDLER_NULL; #if OMPI_PROVIDE_MPI_FILE_INTERFACE OMPI_DECLSPEC extern const File FILE_NULL; #endif diff --git a/ompi/mpi/cxx/datatype.cc b/ompi/mpi/cxx/datatype.cc index 269e94af6c7..4334e709e26 100644 --- a/ompi/mpi/cxx/datatype.cc +++ b/ompi/mpi/cxx/datatype.cc @@ -1,13 +1,13 @@ // -*- c++ -*- -// +// // Copyright (c) 2006 Los Alamos National Security, LLC. All rights -// reserved. +// reserved. // Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. // Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -42,7 +42,7 @@ MPI::Datatype::do_create_keyval(MPI_Type_copy_attr_function* c_copy_fn, // If both the callbacks are C, then do the simple thing -- no // need for all the C++ machinery. if (NULL != c_copy_fn && NULL != c_delete_fn) { - copy_fn.attr_datatype_copy_fn = + copy_fn.attr_datatype_copy_fn = (MPI_Type_internal_copy_attr_function*) c_copy_fn; delete_fn.attr_datatype_delete_fn = c_delete_fn; ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, delete_fn, @@ -60,10 +60,10 @@ MPI::Datatype::do_create_keyval(MPI_Type_copy_attr_function* c_copy_fn, // extra_state for the delete callback), we have to use the C++ // callbacks for both (and therefore translate the C++-special // extra_state into the user's original extra_state). - cxx_extra_state = (keyval_intercept_data_t*) + cxx_extra_state = (keyval_intercept_data_t*) malloc(sizeof(keyval_intercept_data_t)); if (NULL == cxx_extra_state) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, "MPI::Datatype::Create_keyval"); } cxx_extra_state->c_copy_fn = c_copy_fn; @@ -87,7 +87,7 @@ MPI::Datatype::do_create_keyval(MPI_Type_copy_attr_function* c_copy_fn, } if (2 != count) { free(cxx_extra_state); - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, "MPI::Datatype::Create_keyval"); } @@ -102,7 +102,7 @@ MPI::Datatype::do_create_keyval(MPI_Type_copy_attr_function* c_copy_fn, // created). copy_fn.attr_datatype_copy_fn = - (MPI_Type_internal_copy_attr_function*) + (MPI_Type_internal_copy_attr_function*) ompi_mpi_cxx_type_copy_attr_intercept; delete_fn.attr_datatype_delete_fn = ompi_mpi_cxx_type_delete_attr_intercept; diff --git a/ompi/mpi/cxx/datatype.h b/ompi/mpi/cxx/datatype.h index 061173bca80..b013a1d110e 100644 --- a/ompi/mpi/cxx/datatype.h +++ b/ompi/mpi/cxx/datatype.h @@ -6,7 +6,7 @@ // 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, +// 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. @@ -14,9 +14,9 @@ // Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -39,7 +39,7 @@ class Datatype { inline Datatype(const Datatype& dt) : pmpi_datatype(dt.pmpi_datatype) { } inline Datatype(const PMPI::Datatype& dt) : pmpi_datatype(dt) { } - + inline virtual ~Datatype() {} inline Datatype& operator=(const Datatype& dt) { @@ -53,7 +53,7 @@ class Datatype { { return (bool) !(*this == a); } // inter-language operability - inline Datatype& operator= (const MPI_Datatype &i) + inline Datatype& operator= (const MPI_Datatype &i) { pmpi_datatype = i; return *this; } inline operator MPI_Datatype() const { return (MPI_Datatype)pmpi_datatype; } @@ -84,7 +84,7 @@ class Datatype { { return (bool) !(*this == a); } // inter-language operability - inline Datatype& operator= (const MPI_Datatype &i) + inline Datatype& operator= (const MPI_Datatype &i) { mpi_datatype = i; return *this; } inline operator MPI_Datatype () const { return mpi_datatype; } @@ -92,7 +92,7 @@ class Datatype { #endif - // + // // User Defined Functions // typedef int Copy_attr_function(const Datatype& oldtype, @@ -101,27 +101,27 @@ class Datatype { const void* attribute_val_in, void* attribute_val_out, bool& flag); - - typedef int Delete_attr_function(Datatype& type, int type_keyval, + + typedef int Delete_attr_function(Datatype& type, int type_keyval, void* attribute_val, void* extra_state); - + // // Point-to-Point Communication // - + virtual Datatype Create_contiguous(int count) const; - + virtual Datatype Create_vector(int count, int blocklength, int stride) const; - + virtual Datatype Create_indexed(int count, - const int array_of_blocklengths[], + const int array_of_blocklengths[], const int array_of_displacements[]) const; static Datatype Create_struct(int count, const int array_of_blocklengths[], const Aint array_of_displacements[], const Datatype array_if_types[]); - + virtual Datatype Create_hindexed(int count, const int array_of_blocklengths[], const Aint array_of_displacements[]) const; @@ -138,10 +138,10 @@ class Datatype { virtual void Get_true_extent(Aint&, Aint&) const; virtual void Commit(); - + virtual void Free(); - virtual void Pack(const void* inbuf, int incount, void *outbuf, + virtual void Pack(const void* inbuf, int incount, void *outbuf, int outsize, int& position, const Comm &comm) const; virtual void Unpack(const void* inbuf, int insize, void *outbuf, int outcount, @@ -161,9 +161,9 @@ class Datatype { // Miscellany // virtual Datatype Create_subarray(int ndims, const int array_of_sizes[], - const int array_of_subsizes[], - const int array_of_starts[], int order) - const; + const int array_of_subsizes[], + const int array_of_starts[], int order) + const; virtual Datatype Create_darray(int size, int rank, int ndims, const int array_of_gsizes[], const int array_of_distribs[], diff --git a/ompi/mpi/cxx/datatype_inln.h b/ompi/mpi/cxx/datatype_inln.h index 610838daaf3..af02e56d1b5 100644 --- a/ompi/mpi/cxx/datatype_inln.h +++ b/ompi/mpi/cxx/datatype_inln.h @@ -1,12 +1,12 @@ // -*- c++ -*- -// +// // 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, +// 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. @@ -14,9 +14,9 @@ // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -44,11 +44,11 @@ MPI::Datatype::Create_vector(int count, int blocklength, inline MPI::Datatype MPI::Datatype::Create_indexed(int count, - const int array_of_blocklengths[], + const int array_of_blocklengths[], const int array_of_displacements[]) const { MPI_Datatype newtype; - (void)MPI_Type_indexed(count, const_cast(array_of_blocklengths), + (void)MPI_Type_indexed(count, const_cast(array_of_blocklengths), const_cast(array_of_displacements), mpi_datatype, &newtype); return newtype; } @@ -65,7 +65,7 @@ MPI::Datatype::Create_struct(int count, const int array_of_blocklengths[], type_array[i] = array_of_types[i]; (void)MPI_Type_create_struct(count, const_cast(array_of_blocklengths), - const_cast(array_of_displacements), + const_cast(array_of_displacements), type_array, &newtype); delete[] type_array; return newtype; @@ -98,7 +98,7 @@ MPI::Datatype::Create_indexed_block(int count, int blocklength, const int array_of_displacements[]) const { MPI_Datatype newtype; - (void)MPI_Type_create_indexed_block(count, blocklength, const_cast(array_of_displacements), + (void)MPI_Type_create_indexed_block(count, blocklength, const_cast(array_of_displacements), mpi_datatype, &newtype); return newtype; } @@ -113,7 +113,7 @@ MPI::Datatype::Create_resized(const MPI::Aint lb, const MPI::Aint extent) const } inline int -MPI::Datatype::Get_size() const +MPI::Datatype::Get_size() const { int size; (void)MPI_Type_size(mpi_datatype, &size); @@ -123,7 +123,7 @@ MPI::Datatype::Get_size() const inline void MPI::Datatype::Get_extent(MPI::Aint& lb, MPI::Aint& extent) const { - (void)MPI_Type_get_extent(mpi_datatype, &lb, &extent); + (void)MPI_Type_get_extent(mpi_datatype, &lb, &extent); } inline void @@ -133,7 +133,7 @@ MPI::Datatype::Get_true_extent(MPI::Aint& lb, MPI::Aint& extent) const } inline void -MPI::Datatype::Commit() +MPI::Datatype::Commit() { (void)MPI_Type_commit(&mpi_datatype); } @@ -150,14 +150,14 @@ MPI::Datatype::Pack(const void* inbuf, int incount, inline void MPI::Datatype::Unpack(const void* inbuf, int insize, void *outbuf, int outcount, int& position, - const MPI::Comm& comm) const + const MPI::Comm& comm) const { (void)MPI_Unpack(const_cast(inbuf), insize, &position, outbuf, outcount, mpi_datatype, comm); } inline int -MPI::Datatype::Pack_size(int incount, const MPI::Comm& comm) const +MPI::Datatype::Pack_size(int incount, const MPI::Comm& comm) const { int size; (void)MPI_Pack_size(incount, mpi_datatype, comm, &size); @@ -199,7 +199,7 @@ MPI::Datatype::Create_subarray(int ndims, const int array_of_sizes[], const { MPI_Datatype type; - (void) MPI_Type_create_subarray(ndims, const_cast(array_of_sizes), + (void) MPI_Type_create_subarray(ndims, const_cast(array_of_sizes), const_cast(array_of_subsizes), const_cast(array_of_starts), order, mpi_datatype, &type); @@ -272,12 +272,12 @@ MPI::Datatype::Dup() const // functions inline int MPI::Datatype::Create_keyval(MPI::Datatype::Copy_attr_function* type_copy_attr_fn, - MPI::Datatype::Delete_attr_function* type_delete_attr_fn, + MPI::Datatype::Delete_attr_function* type_delete_attr_fn, void* extra_state) { // Back-end function does the heavy lifting int ret, keyval; - ret = do_create_keyval(NULL, NULL, + ret = do_create_keyval(NULL, NULL, type_copy_attr_fn, type_delete_attr_fn, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; @@ -287,13 +287,13 @@ MPI::Datatype::Create_keyval(MPI::Datatype::Copy_attr_function* type_copy_attr_f // functions inline int MPI::Datatype::Create_keyval(MPI_Type_copy_attr_function* type_copy_attr_fn, - MPI_Type_delete_attr_function* type_delete_attr_fn, + MPI_Type_delete_attr_function* type_delete_attr_fn, void* extra_state) { // Back-end function does the heavy lifting int ret, keyval; ret = do_create_keyval(type_copy_attr_fn, type_delete_attr_fn, - NULL, NULL, + NULL, NULL, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; } @@ -308,7 +308,7 @@ MPI::Datatype::Create_keyval(MPI::Datatype::Copy_attr_function* type_copy_attr_f // Back-end function does the heavy lifting int ret, keyval; ret = do_create_keyval(NULL, type_delete_attr_fn, - type_copy_attr_fn, NULL, + type_copy_attr_fn, NULL, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; } @@ -358,11 +358,11 @@ MPI::Datatype::Get_contents(int max_integers, int max_addresses, { int i; MPI_Datatype *c_datatypes = new MPI_Datatype[max_datatypes]; - + (void) MPI_Type_get_contents(mpi_datatype, max_integers, max_addresses, - max_datatypes, - const_cast(array_of_integers), - const_cast(array_of_addresses), + max_datatypes, + const_cast(array_of_integers), + const_cast(array_of_addresses), c_datatypes); // Convert the C MPI_Datatypes to the user's OUT MPI::Datatype // array parameter diff --git a/ompi/mpi/cxx/errhandler.h b/ompi/mpi/cxx/errhandler.h index 7d9d8738e23..2253087c0e3 100644 --- a/ompi/mpi/cxx/errhandler.h +++ b/ompi/mpi/cxx/errhandler.h @@ -6,15 +6,15 @@ // 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, +// 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) 2006-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -40,22 +40,22 @@ class Errhandler { // comparison inline bool operator==(const Errhandler &a) { return (bool)(mpi_errhandler == a.mpi_errhandler); } - + inline bool operator!=(const Errhandler &a) { return (bool)!(*this == a); } // inter-language operability inline Errhandler& operator= (const MPI_Errhandler &i) { mpi_errhandler = i; return *this; } - + inline operator MPI_Errhandler() const { return mpi_errhandler; } - + // inline operator MPI_Errhandler*() { return &mpi_errhandler; } // // Errhandler access functions // - + virtual void Free(); private: diff --git a/ompi/mpi/cxx/errhandler_inln.h b/ompi/mpi/cxx/errhandler_inln.h index ebbe0074323..46d2430fb36 100644 --- a/ompi/mpi/cxx/errhandler_inln.h +++ b/ompi/mpi/cxx/errhandler_inln.h @@ -1,19 +1,19 @@ // -*- c++ -*- -// +// // 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, +// 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$ // diff --git a/ompi/mpi/cxx/exception.h b/ompi/mpi/cxx/exception.h index 835c298e00e..df15a52c97d 100644 --- a/ompi/mpi/cxx/exception.h +++ b/ompi/mpi/cxx/exception.h @@ -6,14 +6,14 @@ // 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, +// 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$ // @@ -25,11 +25,11 @@ class Exception { inline Exception(int ec) : pmpi_exception(ec) { } int Get_error_code() const; - + int Get_error_class() const; - + const char* Get_error_string() const; - + #else inline Exception(int ec) : error_code(ec), error_string(0), error_class(-1) { @@ -58,11 +58,11 @@ class Exception { inline int Get_error_code() const { return error_code; } inline int Get_error_class() const { return error_class; } - + inline const char* Get_error_string() const { return error_string; } #endif - + protected: #if 0 /* OMPI_ENABLE_MPI_PROFILING */ PMPI::Exception pmpi_exception; diff --git a/ompi/mpi/cxx/file.cc b/ompi/mpi/cxx/file.cc index e04aa45ebc5..e568783e4e7 100644 --- a/ompi/mpi/cxx/file.cc +++ b/ompi/mpi/cxx/file.cc @@ -1,12 +1,12 @@ // -*- c++ -*- -// +// // Copyright (c) 2006 Los Alamos National Security, LLC. All rights -// reserved. +// reserved. // Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -21,21 +21,21 @@ #include "ompi/errhandler/errhandler.h" #include "ompi/runtime/mpiruntime.h" -void -MPI::File::Close() +void +MPI::File::Close() { (void) MPI_File_close(&mpi_file); } - -MPI::Errhandler + +MPI::Errhandler MPI::File::Create_errhandler(MPI::File::Errhandler_function* function) { - MPI_Errhandler c_errhandler = + MPI_Errhandler c_errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_FILE, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_CXX); - c_errhandler->eh_cxx_dispatch_fn = + c_errhandler->eh_cxx_dispatch_fn = (ompi_errhandler_cxx_dispatch_fn_t*) ompi_mpi_cxx_file_errhandler_invoke; return c_errhandler; @@ -77,12 +77,12 @@ OBJ_CLASS_INSTANCE(intercept_extra_state_t, // Intercept function for read conversions static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, - void *filebuf, MPI_Offset position_c, + void *filebuf, MPI_Offset position_c, void *extra_state) { MPI::Datatype type_cxx(type_c); MPI::Offset position_cxx(position_c); - intercept_extra_state_t *intercept_data = + intercept_extra_state_t *intercept_data = (intercept_extra_state_t*) extra_state; intercept_data->read_fn_cxx(userbuf, type_cxx, count_c, filebuf, @@ -92,12 +92,12 @@ static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, // Intercept function for write conversions static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, - void *filebuf, MPI_Offset position_c, + void *filebuf, MPI_Offset position_c, void *extra_state) { MPI::Datatype type_cxx(type_c); MPI::Offset position_cxx(position_c); - intercept_extra_state_t *intercept_data = + intercept_extra_state_t *intercept_data = (intercept_extra_state_t*) extra_state; intercept_data->write_fn_cxx(userbuf, type_cxx, count_c, filebuf, @@ -106,33 +106,33 @@ static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, } // Intercept function for extent calculations -static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent_c, +static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent_c, void *extra_state) { MPI::Datatype type_cxx(type_c); MPI::Aint file_extent_cxx(*file_extent_c); - intercept_extra_state_t *intercept_data = + intercept_extra_state_t *intercept_data = (intercept_extra_state_t*) extra_state; - intercept_data->extent_fn_cxx(type_cxx, file_extent_cxx, + intercept_data->extent_fn_cxx(type_cxx, file_extent_cxx, intercept_data->extra_state_cxx); *file_extent_c = file_extent_cxx; return MPI_SUCCESS; } // C++ bindings for MPI::Register_datarep -void -MPI::Register_datarep(const char* datarep, - Datarep_conversion_function* read_fn_cxx, - Datarep_conversion_function* write_fn_cxx, - Datarep_extent_function* extent_fn_cxx, +void +MPI::Register_datarep(const char* datarep, + Datarep_conversion_function* read_fn_cxx, + Datarep_conversion_function* write_fn_cxx, + Datarep_extent_function* extent_fn_cxx, void* extra_state_cxx) { intercept_extra_state_t *intercept; intercept = OBJ_NEW(intercept_extra_state_t); if (NULL == intercept) { - OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, + OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, "MPI::Register_datarep"); return; } @@ -142,24 +142,24 @@ MPI::Register_datarep(const char* datarep, intercept->extent_fn_cxx = extent_fn_cxx; intercept->extra_state_cxx = extra_state_cxx; - (void)MPI_Register_datarep(const_cast(datarep), read_intercept_fn, + (void)MPI_Register_datarep(const_cast(datarep), read_intercept_fn, write_intercept_fn, extent_intercept_fn, intercept); } -void -MPI::Register_datarep(const char* datarep, +void +MPI::Register_datarep(const char* datarep, MPI_Datarep_conversion_function* read_fn_c, - Datarep_conversion_function* write_fn_cxx, - Datarep_extent_function* extent_fn_cxx, + Datarep_conversion_function* write_fn_cxx, + Datarep_extent_function* extent_fn_cxx, void* extra_state_cxx) { intercept_extra_state_t *intercept; intercept = OBJ_NEW(intercept_extra_state_t); if (NULL == intercept) { - OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, + OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, "MPI::Register_datarep"); return; } @@ -168,24 +168,24 @@ MPI::Register_datarep(const char* datarep, intercept->extent_fn_cxx = extent_fn_cxx; intercept->extra_state_cxx = extra_state_cxx; - (void)MPI_Register_datarep(const_cast(datarep), read_fn_c, + (void)MPI_Register_datarep(const_cast(datarep), read_fn_c, write_intercept_fn, extent_intercept_fn, intercept); } -void -MPI::Register_datarep(const char* datarep, - Datarep_conversion_function* read_fn_cxx, - MPI_Datarep_conversion_function* write_fn_c, - Datarep_extent_function* extent_fn_cxx, +void +MPI::Register_datarep(const char* datarep, + Datarep_conversion_function* read_fn_cxx, + MPI_Datarep_conversion_function* write_fn_c, + Datarep_extent_function* extent_fn_cxx, void* extra_state_cxx) { intercept_extra_state_t *intercept; intercept = OBJ_NEW(intercept_extra_state_t); if (NULL == intercept) { - OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, + OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, "MPI::Register_datarep"); return; } @@ -200,18 +200,18 @@ MPI::Register_datarep(const char* datarep, } -void -MPI::Register_datarep(const char* datarep, +void +MPI::Register_datarep(const char* datarep, MPI_Datarep_conversion_function* read_fn_c, - MPI_Datarep_conversion_function* write_fn_c, - Datarep_extent_function* extent_fn_cxx, + MPI_Datarep_conversion_function* write_fn_c, + Datarep_extent_function* extent_fn_cxx, void* extra_state_cxx) { intercept_extra_state_t *intercept; intercept = OBJ_NEW(intercept_extra_state_t); if (NULL == intercept) { - OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, + OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, "MPI::Register_datarep"); return; } @@ -219,7 +219,7 @@ MPI::Register_datarep(const char* datarep, intercept->extent_fn_cxx = extent_fn_cxx; intercept->extra_state_cxx = extra_state_cxx; - (void)MPI_Register_datarep(const_cast(datarep), read_fn_c, + (void)MPI_Register_datarep(const_cast(datarep), read_fn_c, write_fn_c, extent_intercept_fn, intercept); } diff --git a/ompi/mpi/cxx/file.h b/ompi/mpi/cxx/file.h index c135cf81235..1cef5aff8f2 100644 --- a/ompi/mpi/cxx/file.h +++ b/ompi/mpi/cxx/file.h @@ -6,51 +6,51 @@ // 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, +// 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) 2006-2009 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // // Typedefs for C++ callbacks registered via MPI::Register_datarep -typedef void Datarep_extent_function(const Datatype& datatype, +typedef void Datarep_extent_function(const Datatype& datatype, Aint& file_extent, void* extra_state); -typedef void Datarep_conversion_function(void* userbuf, Datatype& datatype, - int count, void* filebuf, +typedef void Datarep_conversion_function(void* userbuf, Datatype& datatype, + int count, void* filebuf, Offset position, void* extra_state); // Both callback functions in C++ -void Register_datarep(const char* datarep, - Datarep_conversion_function* read_conversion_fn, - Datarep_conversion_function* write_conversion_fn, - Datarep_extent_function* dtype_file_extent_fn, +void Register_datarep(const char* datarep, + Datarep_conversion_function* read_conversion_fn, + Datarep_conversion_function* write_conversion_fn, + Datarep_extent_function* dtype_file_extent_fn, void* extra_state); // Overload for C read callback function (MPI_CONVERSION_FN_NULL) -void Register_datarep(const char* datarep, - MPI_Datarep_conversion_function* read_conversion_fn, - Datarep_conversion_function* write_conversion_fn, - Datarep_extent_function* dtype_file_extent_fn, +void Register_datarep(const char* datarep, + MPI_Datarep_conversion_function* read_conversion_fn, + Datarep_conversion_function* write_conversion_fn, + Datarep_extent_function* dtype_file_extent_fn, void* extra_state); // Overload for C write callback function (MPI_CONVERSION_FN_NULL) -void Register_datarep(const char* datarep, - Datarep_conversion_function* read_conversion_fn, - MPI_Datarep_conversion_function* write_conversion_fn, - Datarep_extent_function* dtype_file_extent_fn, +void Register_datarep(const char* datarep, + Datarep_conversion_function* read_conversion_fn, + MPI_Datarep_conversion_function* write_conversion_fn, + Datarep_extent_function* dtype_file_extent_fn, void* extra_state); // Overload for C read and write callback functions (MPI_CONVERSION_FN_NULL) -void Register_datarep(const char* datarep, - MPI_Datarep_conversion_function* read_conversion_fn, - MPI_Datarep_conversion_function* write_conversion_fn, - Datarep_extent_function* dtype_file_extent_fn, +void Register_datarep(const char* datarep, + MPI_Datarep_conversion_function* read_conversion_fn, + MPI_Datarep_conversion_function* write_conversion_fn, + Datarep_extent_function* dtype_file_extent_fn, void* extra_state); class File { @@ -93,7 +93,7 @@ class File { File(const File& data) : mpi_file(data.mpi_file) { } File(MPI_File i) : mpi_file(i) { } - + virtual ~File() { } File& operator=(const File& data) { @@ -109,7 +109,7 @@ class File { #endif - // from the I/o chapter of MPI - 2 + // from the I/o chapter of MPI - 2 void Close(); @@ -133,22 +133,22 @@ class File { MPI::Aint Get_type_extent(const MPI::Datatype& datatype) const; - void Get_view(MPI::Offset& disp, MPI::Datatype& etype, + void Get_view(MPI::Offset& disp, MPI::Datatype& etype, MPI::Datatype& filetype, char* datarep) const; - MPI::Request Iread(void* buf, int count, + MPI::Request Iread(void* buf, int count, const MPI::Datatype& datatype); - - MPI::Request Iread_at(MPI::Offset offset, void* buf, int count, + + MPI::Request Iread_at(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype); - + MPI::Request Iread_shared(void* buf, int count, const MPI::Datatype& datatype); MPI::Request Iwrite(const void* buf, int count, const MPI::Datatype& datatype); - MPI::Request Iwrite_at(MPI::Offset offset, const void* buf, + MPI::Request Iwrite_at(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype); MPI::Request Iwrite_shared(const void* buf, int count, @@ -177,21 +177,21 @@ class File { void Read_all_end(void* buf, MPI::Status& status); - void Read_at(MPI::Offset offset, + void Read_at(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype); void Read_at(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status); - void Read_at_all(MPI::Offset offset, void* buf, int count, + void Read_at_all(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype); - + void Read_at_all(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status); void Read_at_all_begin(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype); - + void Read_at_all_end(void* buf); void Read_at_all_end(void* buf, MPI::Status& status); @@ -277,7 +277,7 @@ class File { void Write_ordered(const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status); - void Write_ordered_begin(const void* buf, int count, + void Write_ordered_begin(const void* buf, int count, const MPI::Datatype& datatype); void Write_ordered_end(const void* buf); @@ -297,7 +297,7 @@ class File { typedef Errhandler_function Errhandler_fn __mpi_interface_deprecated__("MPI::File::Errhandler_fn was deprecated in MPI-2.2; use MPI::File::Errhandler_function instead"); - static MPI::Errhandler Create_errhandler(Errhandler_function* function); + static MPI::Errhandler Create_errhandler(Errhandler_function* function); MPI::Errhandler Get_errhandler() const; diff --git a/ompi/mpi/cxx/file_inln.h b/ompi/mpi/cxx/file_inln.h index c9b7db8b510..9930f69056e 100644 --- a/ompi/mpi/cxx/file_inln.h +++ b/ompi/mpi/cxx/file_inln.h @@ -6,28 +6,28 @@ // 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, +// 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) 2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // -inline void -MPI::File::Delete(const char* filename, const MPI::Info& info) +inline void +MPI::File::Delete(const char* filename, const MPI::Info& info) { (void) MPI_File_delete(const_cast(filename), info); } -inline int -MPI::File::Get_amode() const +inline int +MPI::File::Get_amode() const { int amode; (void) MPI_File_get_amode(mpi_file, &amode); @@ -35,8 +35,8 @@ MPI::File::Get_amode() const } -inline bool -MPI::File::Get_atomicity() const +inline bool +MPI::File::Get_atomicity() const { int flag; (void) MPI_File_get_atomicity(mpi_file, &flag); @@ -44,7 +44,7 @@ MPI::File::Get_atomicity() const } inline MPI::Offset -MPI::File::Get_byte_offset(const MPI::Offset disp) const +MPI::File::Get_byte_offset(const MPI::Offset disp) const { MPI_Offset offset, ldisp; ldisp = disp; @@ -52,7 +52,7 @@ MPI::File::Get_byte_offset(const MPI::Offset disp) const return offset; } -inline MPI::Group +inline MPI::Group MPI::File::Get_group() const { MPI_Group group; @@ -61,7 +61,7 @@ MPI::File::Get_group() const } -inline MPI::Info +inline MPI::Info MPI::File::Get_info() const { MPI_Info info_used; @@ -70,7 +70,7 @@ MPI::File::Get_info() const } -inline MPI::Offset +inline MPI::Offset MPI::File::Get_position() const { MPI_Offset offset; @@ -79,7 +79,7 @@ MPI::File::Get_position() const } -inline MPI::Offset +inline MPI::Offset MPI::File::Get_position_shared() const { MPI_Offset offset; @@ -88,7 +88,7 @@ MPI::File::Get_position_shared() const } -inline MPI::Offset +inline MPI::Offset MPI::File::Get_size() const { MPI_Offset offset; @@ -98,7 +98,7 @@ MPI::File::Get_size() const } -inline MPI::Aint +inline MPI::Aint MPI::File::Get_type_extent(const MPI::Datatype& datatype) const { MPI_Aint extent; @@ -107,9 +107,9 @@ MPI::File::Get_type_extent(const MPI::Datatype& datatype) const } -inline void +inline void MPI::File::Get_view(MPI::Offset& disp, - MPI::Datatype& etype, + MPI::Datatype& etype, MPI::Datatype& filetype, char* datarep) const { @@ -123,8 +123,8 @@ MPI::File::Get_view(MPI::Offset& disp, } -inline MPI::Request -MPI::File::Iread(void* buf, int count, +inline MPI::Request +MPI::File::Iread(void* buf, int count, const MPI::Datatype& datatype) { MPI_Request req; @@ -133,8 +133,8 @@ MPI::File::Iread(void* buf, int count, } -inline MPI::Request -MPI::File::Iread_at(MPI::Offset offset, void* buf, int count, +inline MPI::Request +MPI::File::Iread_at(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype) { MPI_Request req; @@ -143,7 +143,7 @@ MPI::File::Iread_at(MPI::Offset offset, void* buf, int count, } -inline MPI::Request +inline MPI::Request MPI::File::Iread_shared(void* buf, int count, const MPI::Datatype& datatype) { @@ -153,7 +153,7 @@ MPI::File::Iread_shared(void* buf, int count, } -inline MPI::Request +inline MPI::Request MPI::File::Iwrite(const void* buf, int count, const MPI::Datatype& datatype) { @@ -163,8 +163,8 @@ MPI::File::Iwrite(const void* buf, int count, } -inline MPI::Request -MPI::File::Iwrite_at(MPI::Offset offset, const void* buf, +inline MPI::Request +MPI::File::Iwrite_at(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype) { MPI_Request req; @@ -174,7 +174,7 @@ MPI::File::Iwrite_at(MPI::Offset offset, const void* buf, } -inline MPI::Request +inline MPI::Request MPI::File::Iwrite_shared(const void* buf, int count, const MPI::Datatype& datatype) { @@ -184,7 +184,7 @@ MPI::File::Iwrite_shared(const void* buf, int count, } -inline MPI::File +inline MPI::File MPI::File::Open(const MPI::Intracomm& comm, const char* filename, int amode, const MPI::Info& info) @@ -195,14 +195,14 @@ MPI::File::Open(const MPI::Intracomm& comm, } -inline void +inline void MPI::File::Preallocate(MPI::Offset size) { (void) MPI_File_preallocate(mpi_file, size); } -inline void +inline void MPI::File::Read(void* buf, int count, const MPI::Datatype& datatype) { @@ -211,7 +211,7 @@ MPI::File::Read(void* buf, int count, } -inline void +inline void MPI::File::Read(void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) @@ -220,7 +220,7 @@ MPI::File::Read(void* buf, int count, } -inline void +inline void MPI::File::Read_all(void* buf, int count, const MPI::Datatype& datatype) { @@ -229,7 +229,7 @@ MPI::File::Read_all(void* buf, int count, } -inline void +inline void MPI::File::Read_all(void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) @@ -238,7 +238,7 @@ MPI::File::Read_all(void* buf, int count, } -inline void +inline void MPI::File::Read_all_begin(void* buf, int count, const MPI::Datatype& datatype) { @@ -246,7 +246,7 @@ MPI::File::Read_all_begin(void* buf, int count, } -inline void +inline void MPI::File::Read_all_end(void* buf) { MPI_Status status; @@ -254,15 +254,15 @@ MPI::File::Read_all_end(void* buf) } -inline void +inline void MPI::File::Read_all_end(void* buf, MPI::Status& status) { (void) MPI_File_read_all_end(mpi_file, buf, &status.mpi_status); } -inline void -MPI::File::Read_at(MPI::Offset offset, +inline void +MPI::File::Read_at(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype) { @@ -272,18 +272,18 @@ MPI::File::Read_at(MPI::Offset offset, } -inline void +inline void MPI::File::Read_at(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_read_at(mpi_file, offset, buf, count, datatype, + (void) MPI_File_read_at(mpi_file, offset, buf, count, datatype, &status.mpi_status); } -inline void -MPI::File::Read_at_all(MPI::Offset offset, void* buf, int count, +inline void +MPI::File::Read_at_all(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype) { MPI_Status status; @@ -291,17 +291,17 @@ MPI::File::Read_at_all(MPI::Offset offset, void* buf, int count, } -inline void +inline void MPI::File::Read_at_all(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_read_at_all(mpi_file, offset, buf, count, datatype, + (void) MPI_File_read_at_all(mpi_file, offset, buf, count, datatype, &status.mpi_status); } -inline void +inline void MPI::File::Read_at_all_begin(MPI::Offset offset, void* buf, int count, const MPI::Datatype& datatype) @@ -310,7 +310,7 @@ MPI::File::Read_at_all_begin(MPI::Offset offset, } -inline void +inline void MPI::File::Read_at_all_end(void* buf) { MPI_Status status; @@ -318,14 +318,14 @@ MPI::File::Read_at_all_end(void* buf) } -inline void +inline void MPI::File::Read_at_all_end(void* buf, MPI::Status& status) { (void) MPI_File_read_at_all_end(mpi_file, buf, &status.mpi_status); } -inline void +inline void MPI::File::Read_ordered(void* buf, int count, const MPI::Datatype& datatype) { @@ -334,17 +334,17 @@ MPI::File::Read_ordered(void* buf, int count, } -inline void +inline void MPI::File::Read_ordered(void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_read_ordered(mpi_file, buf, count, datatype, + (void) MPI_File_read_ordered(mpi_file, buf, count, datatype, &status.mpi_status); } -inline void +inline void MPI::File::Read_ordered_begin(void* buf, int count, const MPI::Datatype& datatype) { @@ -352,7 +352,7 @@ MPI::File::Read_ordered_begin(void* buf, int count, } -inline void +inline void MPI::File::Read_ordered_end(void* buf) { MPI_Status status; @@ -360,14 +360,14 @@ MPI::File::Read_ordered_end(void* buf) } -inline void +inline void MPI::File::Read_ordered_end(void* buf, MPI::Status& status) { (void) MPI_File_read_ordered_end(mpi_file, buf, &status.mpi_status); } -inline void +inline void MPI::File::Read_shared(void* buf, int count, const MPI::Datatype& datatype) { @@ -376,51 +376,51 @@ MPI::File::Read_shared(void* buf, int count, } -inline void +inline void MPI::File::Read_shared(void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_read_shared(mpi_file, buf, count, datatype, + (void) MPI_File_read_shared(mpi_file, buf, count, datatype, &status.mpi_status); } -inline void +inline void MPI::File::Seek(MPI::Offset offset, int whence) { (void) MPI_File_seek(mpi_file, offset, whence); } -inline void +inline void MPI::File::Seek_shared(MPI::Offset offset, int whence) { (void) MPI_File_seek_shared(mpi_file, offset, whence); } -inline void +inline void MPI::File::Set_atomicity(bool flag) { (void) MPI_File_set_atomicity(mpi_file, flag); } -inline void +inline void MPI::File::Set_info(const MPI::Info& info) { (void) MPI_File_set_info(mpi_file, info); } -inline void +inline void MPI::File::Set_size(MPI::Offset size) { (void) MPI_File_set_size(mpi_file, size); } -inline void +inline void MPI::File::Set_view(MPI::Offset disp, const MPI::Datatype& etype, const MPI::Datatype& filetype, @@ -432,14 +432,14 @@ MPI::File::Set_view(MPI::Offset disp, } -inline void +inline void MPI::File::Sync() { (void) MPI_File_sync(mpi_file); } -inline void +inline void MPI::File::Write(const void* buf, int count, const MPI::Datatype& datatype) { @@ -448,17 +448,17 @@ MPI::File::Write(const void* buf, int count, } -inline void +inline void MPI::File::Write(const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_write(mpi_file, const_cast(buf), count, datatype, + (void) MPI_File_write(mpi_file, const_cast(buf), count, datatype, &status.mpi_status); } -inline void +inline void MPI::File::Write_all(const void* buf, int count, const MPI::Datatype& datatype) { @@ -468,17 +468,17 @@ MPI::File::Write_all(const void* buf, int count, -inline void +inline void MPI::File::Write_all(const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_write_all(mpi_file, const_cast(buf), count, datatype, + (void) MPI_File_write_all(mpi_file, const_cast(buf), count, datatype, &status.mpi_status); } -inline void +inline void MPI::File::Write_all_begin(const void* buf, int count, const MPI::Datatype& datatype) { @@ -486,7 +486,7 @@ MPI::File::Write_all_begin(const void* buf, int count, } -inline void +inline void MPI::File::Write_all_end(const void* buf) { MPI_Status status; @@ -494,14 +494,14 @@ MPI::File::Write_all_end(const void* buf) } -inline void +inline void MPI::File::Write_all_end(const void* buf, MPI::Status& status) { (void) MPI_File_write_all_end(mpi_file, const_cast(buf), &status.mpi_status); } -inline void +inline void MPI::File::Write_at(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype) @@ -512,7 +512,7 @@ MPI::File::Write_at(MPI::Offset offset, } -inline void +inline void MPI::File::Write_at(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype, @@ -523,7 +523,7 @@ MPI::File::Write_at(MPI::Offset offset, } -inline void +inline void MPI::File::Write_at_all(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype) @@ -534,18 +534,18 @@ MPI::File::Write_at_all(MPI::Offset offset, } -inline void +inline void MPI::File::Write_at_all(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { - (void) MPI_File_write_at_all(mpi_file, offset, const_cast(buf), count, + (void) MPI_File_write_at_all(mpi_file, offset, const_cast(buf), count, datatype, &status.mpi_status); } -inline void +inline void MPI::File::Write_at_all_begin(MPI::Offset offset, const void* buf, int count, const MPI::Datatype& datatype) @@ -555,7 +555,7 @@ MPI::File::Write_at_all_begin(MPI::Offset offset, } -inline void +inline void MPI::File::Write_at_all_end(const void* buf) { MPI_Status status; @@ -563,14 +563,14 @@ MPI::File::Write_at_all_end(const void* buf) } -inline void +inline void MPI::File::Write_at_all_end(const void* buf, MPI::Status& status) { (void) MPI_File_write_at_all_end(mpi_file, const_cast(buf), &status.mpi_status); } -inline void +inline void MPI::File::Write_ordered(const void* buf, int count, const MPI::Datatype& datatype) { @@ -580,7 +580,7 @@ MPI::File::Write_ordered(const void* buf, int count, } -inline void +inline void MPI::File::Write_ordered(const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) @@ -590,15 +590,15 @@ MPI::File::Write_ordered(const void* buf, int count, } -inline void -MPI::File::Write_ordered_begin(const void* buf, int count, +inline void +MPI::File::Write_ordered_begin(const void* buf, int count, const MPI::Datatype& datatype) { (void) MPI_File_write_ordered_begin(mpi_file, const_cast(buf), count, datatype); } -inline void +inline void MPI::File::Write_ordered_end(const void* buf) { MPI_Status status; @@ -606,7 +606,7 @@ MPI::File::Write_ordered_end(const void* buf) } -inline void +inline void MPI::File::Write_ordered_end(const void* buf, MPI::Status& status) { @@ -614,7 +614,7 @@ MPI::File::Write_ordered_end(const void* buf, } -inline void +inline void MPI::File::Write_shared(const void* buf, int count, const MPI::Datatype& datatype) { @@ -624,7 +624,7 @@ MPI::File::Write_shared(const void* buf, int count, } -inline void +inline void MPI::File::Write_shared(const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status) { @@ -648,7 +648,7 @@ MPI::File::Get_errhandler() const return errhandler; } -inline void +inline void MPI::File::Call_errhandler(int errorcode) const { (void) MPI_File_call_errhandler(mpi_file, errorcode); diff --git a/ompi/mpi/cxx/functions.h b/ompi/mpi/cxx/functions.h index a1324960836..b86ccef2d58 100644 --- a/ompi/mpi/cxx/functions.h +++ b/ompi/mpi/cxx/functions.h @@ -6,16 +6,16 @@ // 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, +// 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) 2008 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -23,10 +23,10 @@ // Point-to-Point Communication // -void +void Attach_buffer(void* buffer, int size); -int +int Detach_buffer(void*& buffer); // @@ -49,19 +49,19 @@ Add_error_code(int errorclass); void Add_error_string(int errorcode, const char* string); -void +void Get_processor_name(char* name, int& resultlen); void Get_error_string(int errorcode, char* string, int& resultlen); -int +int Get_error_class(int errorcode); -double +double Wtime(); -double +double Wtick(); void @@ -131,11 +131,11 @@ Open_port(const Info& info, char* port_name); void -Publish_name(const char* service_name, const Info& info, +Publish_name(const char* service_name, const Info& info, const char* port_name); -void -Unpublish_name(const char* service_name, const Info& info, +void +Unpublish_name(const char* service_name, const Info& info, const char* port_name); // diff --git a/ompi/mpi/cxx/functions_inln.h b/ompi/mpi/cxx/functions_inln.h index 0fd30c5fe49..8ea793677d1 100644 --- a/ompi/mpi/cxx/functions_inln.h +++ b/ompi/mpi/cxx/functions_inln.h @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2008 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -25,13 +25,13 @@ // Point-to-Point Communication // -inline void +inline void MPI::Attach_buffer(void* buffer, int size) { (void)MPI_Buffer_attach(buffer, size); } -inline int +inline int MPI::Detach_buffer(void*& buffer) { int size; @@ -76,7 +76,7 @@ MPI::Add_error_string(int errorcode, const char* string) (void)MPI_Add_error_string(errorcode, const_cast(string)); } -inline void +inline void MPI::Get_processor_name(char* name, int& resultlen) { (void)MPI_Get_processor_name(name, &resultlen); @@ -88,21 +88,21 @@ MPI::Get_error_string(int errorcode, char* string, int& resultlen) (void)MPI_Error_string(errorcode, string, &resultlen); } -inline int -MPI::Get_error_class(int errorcode) +inline int +MPI::Get_error_class(int errorcode) { int errorclass; (void)MPI_Error_class(errorcode, &errorclass); return errorclass; } -inline double +inline double MPI::Wtime() { return (MPI_Wtime()); } -inline double +inline double MPI::Wtick() { return (MPI_Wtick()); @@ -200,7 +200,7 @@ MPI::Query_thread() inline void* -MPI::Alloc_mem(MPI::Aint size, const MPI::Info& info) +MPI::Alloc_mem(MPI::Aint size, const MPI::Info& info) { void* baseptr; (void) MPI_Alloc_mem(size, info, &baseptr); @@ -221,14 +221,14 @@ MPI::Free_mem(void* base) inline void -MPI::Close_port(const char* port_name) +MPI::Close_port(const char* port_name) { (void) MPI_Close_port(const_cast(port_name)); } inline void -MPI::Lookup_name(const char * service_name, +MPI::Lookup_name(const char * service_name, const MPI::Info& info, char* port_name) { @@ -244,7 +244,7 @@ MPI::Open_port(const MPI::Info& info, char* port_name) inline void -MPI::Publish_name(const char* service_name, +MPI::Publish_name(const char* service_name, const MPI::Info& info, const char* port_name) { @@ -254,7 +254,7 @@ MPI::Publish_name(const char* service_name, inline void -MPI::Unpublish_name(const char* service_name, +MPI::Unpublish_name(const char* service_name, const MPI::Info& info, const char* port_name) { @@ -273,7 +273,7 @@ MPI::Pcontrol(const int level, ...) { va_list ap; va_start(ap, level); - + (void)MPI_Pcontrol(level, ap); va_end(ap); } diff --git a/ompi/mpi/cxx/group.h b/ompi/mpi/cxx/group.h index 68b8a3f23eb..e8423ea88a2 100644 --- a/ompi/mpi/cxx/group.h +++ b/ompi/mpi/cxx/group.h @@ -6,15 +6,15 @@ // 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, +// 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) 2006 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -44,10 +44,10 @@ class Group { inline bool operator== (const Group &a) { return (bool)(pmpi_group == a.pmpi_group); } - inline bool operator!= (const Group &a) { + inline bool operator!= (const Group &a) { return (bool)!(*this == a); } - + // inter-language operability Group& operator= (const MPI_Group &i) { pmpi_group = i; return *this; } inline operator MPI_Group () const { return pmpi_group.mpi(); } @@ -71,7 +71,7 @@ class Group { // comparison inline bool operator== (const Group &a) { return (bool)(mpi_group == a.mpi_group); } inline bool operator!= (const Group &a) { return (bool)!(*this == a); } - + // inter-language operability inline Group& operator= (const MPI_Group &i) { mpi_group = i; return *this; } inline operator MPI_Group () const { return mpi_group; } @@ -86,28 +86,28 @@ class Group { // virtual int Get_size() const; - + virtual int Get_rank() const; - - static void Translate_ranks (const Group& group1, int n, const int ranks1[], + + static void Translate_ranks (const Group& group1, int n, const int ranks1[], const Group& group2, int ranks2[]); - + static int Compare(const Group& group1, const Group& group2); - + static Group Union(const Group &group1, const Group &group2); - + static Group Intersect(const Group &group1, const Group &group2); - + static Group Difference(const Group &group1, const Group &group2); - + virtual Group Incl(int n, const int ranks[]) const; - + virtual Group Excl(int n, const int ranks[]) const; - + virtual Group Range_incl(int n, const int ranges[][3]) const; - + virtual Group Range_excl(int n, const int ranges[][3]) const; - + virtual void Free(); protected: diff --git a/ompi/mpi/cxx/group_inln.h b/ompi/mpi/cxx/group_inln.h index c363fb10672..b0d9cae1888 100644 --- a/ompi/mpi/cxx/group_inln.h +++ b/ompi/mpi/cxx/group_inln.h @@ -1,19 +1,19 @@ // -*- c++ -*- -// +// // 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, +// 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$ // @@ -30,7 +30,7 @@ MPI::Group::Get_size() const } inline int -MPI::Group::Get_rank() const +MPI::Group::Get_rank() const { int rank; (void)MPI_Group_rank(mpi_group, &rank); @@ -39,7 +39,7 @@ MPI::Group::Get_rank() const inline void MPI::Group::Translate_ranks (const MPI::Group& group1, int n, - const int ranks1[], + const int ranks1[], const MPI::Group& group2, int ranks2[]) { (void)MPI_Group_translate_ranks(group1, n, const_cast(ranks1), group2, const_cast(ranks2)); @@ -72,7 +72,7 @@ MPI::Group::Intersect(const MPI::Group &group1, const MPI::Group &group2) inline MPI::Group MPI::Group::Difference(const MPI::Group &group1, const MPI::Group &group2) { - MPI_Group newgroup; + MPI_Group newgroup; (void)MPI_Group_difference(group1, group2, &newgroup); return newgroup; } @@ -99,7 +99,7 @@ MPI::Group::Range_incl(int n, const int ranges[][3]) const MPI_Group newgroup; (void)MPI_Group_range_incl(mpi_group, n, #if OMPI_CXX_SUPPORTS_2D_CONST_CAST - const_cast(ranges), + const_cast(ranges), #else (int(*)[3]) ranges, #endif diff --git a/ompi/mpi/cxx/info.h b/ompi/mpi/cxx/info.h index f2d0c77d4f5..d3bc73489ca 100644 --- a/ompi/mpi/cxx/info.h +++ b/ompi/mpi/cxx/info.h @@ -6,15 +6,15 @@ // 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, +// 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) 2006-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -79,7 +79,7 @@ class Info { virtual void Delete(const char* key); - virtual Info Dup() const; + virtual Info Dup() const; virtual void Free(); diff --git a/ompi/mpi/cxx/info_inln.h b/ompi/mpi/cxx/info_inln.h index d0af94d94e1..b68fa8039df 100644 --- a/ompi/mpi/cxx/info_inln.h +++ b/ompi/mpi/cxx/info_inln.h @@ -1,24 +1,24 @@ // -*- c++ -*- -// +// // 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, +// 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$ // -inline MPI::Info +inline MPI::Info MPI::Info::Create() { MPI_Info newinfo; @@ -32,7 +32,7 @@ MPI::Info::Delete(const char* key) (void)MPI_Info_delete(mpi_info, const_cast(key)); } -inline MPI::Info +inline MPI::Info MPI::Info::Dup() const { MPI_Info newinfo; @@ -68,7 +68,7 @@ MPI::Info::Get_nthkey(int n, char* key) const (void) MPI_Info_get_nthkey(mpi_info, n, key); } -inline bool +inline bool MPI::Info::Get_valuelen(const char* key, int& valuelen) const { int flag; diff --git a/ompi/mpi/cxx/intercepts.cc b/ompi/mpi/cxx/intercepts.cc index aa14460b501..88f3bcda71d 100644 --- a/ompi/mpi/cxx/intercepts.cc +++ b/ompi/mpi/cxx/intercepts.cc @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006-2009 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -38,12 +38,12 @@ void ompi_mpi_cxx_throw_exception(int *errcode) // and -lmpi++ (which can legally happen in the LAM MPI implementation, // and probably in MPICH and others who include -lmpi++ by default in their // wrapper compilers) - fprintf(stderr, "MPI 2 C++ exception throwing is disabled, MPI::mpi_errno has the error code\n"); + fprintf(stderr, "MPI 2 C++ exception throwing is disabled, MPI::mpi_errno has the error code\n"); MPI::mpi_errno = *errcode; -#endif +#endif } -extern "C" +extern "C" void ompi_mpi_cxx_comm_throw_excptn_fctn(MPI_Comm *, int *errcode, ...) { /* Portland compiler raises a warning if va_start is not used in a @@ -55,7 +55,7 @@ void ompi_mpi_cxx_comm_throw_excptn_fctn(MPI_Comm *, int *errcode, ...) } #if OMPI_PROVIDE_MPI_FILE_INTERFACE -extern "C" +extern "C" void ompi_mpi_cxx_file_throw_excptn_fctn(MPI_File *, int *errcode, ...) { va_list ap; @@ -65,7 +65,7 @@ void ompi_mpi_cxx_file_throw_excptn_fctn(MPI_File *, int *errcode, ...) } #endif -extern "C" +extern "C" void ompi_mpi_cxx_win_throw_excptn_fctn(MPI_Win *, int *errcode, ...) { va_list ap; @@ -78,13 +78,13 @@ void ompi_mpi_cxx_win_throw_excptn_fctn(MPI_Win *, int *errcode, ...) void MPI::InitializeIntercepts() { - ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn = + ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn = ompi_mpi_cxx_comm_throw_excptn_fctn; #if OMPI_PROVIDE_MPI_FILE_INTERFACE - ompi_mpi_errors_throw_exceptions.eh.eh_file_fn = + ompi_mpi_errors_throw_exceptions.eh.eh_file_fn = ompi_mpi_cxx_file_throw_excptn_fctn; #endif - ompi_mpi_errors_throw_exceptions.eh.eh_win_fn = + ompi_mpi_errors_throw_exceptions.eh.eh_win_fn = ompi_mpi_cxx_win_throw_excptn_fctn; } @@ -94,14 +94,14 @@ MPI::InitializeIntercepts() // function (so that types can be converted, etc.). extern "C" void ompi_mpi_cxx_comm_errhandler_invoke(ompi_errhandler_t *c_errhandler, - MPI_Comm *c_comm, int *err, + MPI_Comm *c_comm, int *err, const char *message) { // MPI::Comm is an abstract base class; can't instantiate one of // those. So fake it by instantiating an MPI::Intracomm and then // casting it down to an (MPI::Comm&) when invoking the callback. MPI::Intracomm cxx_comm(*c_comm); - MPI::Comm::Errhandler_function *cxx_fn = + MPI::Comm::Errhandler_function *cxx_fn = (MPI::Comm::Errhandler_function*) c_errhandler->eh_comm_fn; cxx_fn((MPI::Comm&) cxx_comm, err, message); @@ -113,11 +113,11 @@ void ompi_mpi_cxx_comm_errhandler_invoke(ompi_errhandler_t *c_errhandler, // function (so that types can be converted, etc.). extern "C" void ompi_mpi_cxx_file_errhandler_invoke(ompi_errhandler_t *c_errhandler, - MPI_File *c_file, int *err, + MPI_File *c_file, int *err, const char *message) { MPI::File cxx_file(*c_file); - MPI::File::Errhandler_function *cxx_fn = + MPI::File::Errhandler_function *cxx_fn = (MPI::File::Errhandler_function*) c_errhandler->eh_file_fn; cxx_fn(cxx_file, err, message); @@ -129,11 +129,11 @@ void ompi_mpi_cxx_file_errhandler_invoke(ompi_errhandler_t *c_errhandler, // function (so that types can be converted, etc.). extern "C" void ompi_mpi_cxx_win_errhandler_invoke(ompi_errhandler_t *c_errhandler, - MPI_Win *c_win, int *err, + MPI_Win *c_win, int *err, const char *message) { MPI::Win cxx_win(*c_win); - MPI::Win::Errhandler_function *cxx_fn = + MPI::Win::Errhandler_function *cxx_fn = (MPI::Win::Errhandler_function*) c_errhandler->eh_win_fn; cxx_fn(cxx_win, err, message); @@ -209,10 +209,10 @@ void ompi_mpi_cxx_win_errhandler_invoke(ompi_errhandler_t *c_errhandler, // bindings, in fact), and pass it the ompi_mpi_cxx_op_intercept() // function (casting it to (MPI_User_function*) -- it's a function // pointer, so its size is guaranteed to be the same, even if the -// signature of the real function is different). +// signature of the real function is different). // // 3. The function pointer to ompi_mpi_cxx_op_intercept() will be -// cached in the MPI_Op in op->o_func[0].cxx_intercept_fn. +// cached in the MPI_Op in op->o_func[0].cxx_intercept_fn. // // Recall that MPI_Op is implemented to have an array of function // pointers so that optimized versions of reduction operations can be @@ -228,7 +228,7 @@ void ompi_mpi_cxx_win_errhandler_invoke(ompi_errhandler_t *c_errhandler, // multiple different function pointer types -- it doesn't matter // which type the user's callback function pointer is stored in; since // all the types in the union are function pointers, it's guaranteed -// to be large enough to hold what we need. +// to be large enough to hold what we need. // // Note that we don't have a member of the union for the C++ callback // function because its signature includes a (MPI::Datatype&), which @@ -250,7 +250,7 @@ void ompi_mpi_cxx_win_errhandler_invoke(ompi_errhandler_t *c_errhandler, // Wasn't that simple? // extern "C" void -ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len, +ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len, MPI_Datatype *datatype, MPI_User_function *c_fn) { MPI::Datatype cxx_datatype = *datatype; @@ -262,14 +262,14 @@ ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len, // Attribute copy functions -- comm, type, and win // extern "C" int -ompi_mpi_cxx_comm_copy_attr_intercept(MPI_Comm comm, int keyval, - void *extra_state, - void *attribute_val_in, +ompi_mpi_cxx_comm_copy_attr_intercept(MPI_Comm comm, int keyval, + void *extra_state, + void *attribute_val_in, void *attribute_val_out, int *flag, MPI_Comm newcomm) { int ret = 0; - MPI::Comm::keyval_intercept_data_t *kid = + MPI::Comm::keyval_intercept_data_t *kid = (MPI::Comm::keyval_intercept_data_t*) extra_state; // The callback may be in C or C++. If it's in C, it's easy - just @@ -286,29 +286,29 @@ ompi_mpi_cxx_comm_copy_attr_intercept(MPI_Comm comm, int keyval, MPI::Intercomm intercomm; MPI::Graphcomm graphcomm; MPI::Cartcomm cartcomm; - - bool bflag = OPAL_INT_TO_BOOL(*flag); + + bool bflag = OPAL_INT_TO_BOOL(*flag); if (NULL != kid->cxx_copy_fn) { if (OMPI_COMM_IS_GRAPH(comm)) { graphcomm = MPI::Graphcomm(comm); ret = kid->cxx_copy_fn(graphcomm, keyval, kid->extra_state, - attribute_val_in, attribute_val_out, + attribute_val_in, attribute_val_out, bflag); } else if (OMPI_COMM_IS_CART(comm)) { cartcomm = MPI::Cartcomm(comm); ret = kid->cxx_copy_fn(cartcomm, keyval, kid->extra_state, - attribute_val_in, attribute_val_out, + attribute_val_in, attribute_val_out, bflag); } else if (OMPI_COMM_IS_INTRA(comm)) { intracomm = MPI::Intracomm(comm); ret = kid->cxx_copy_fn(intracomm, keyval, kid->extra_state, - attribute_val_in, attribute_val_out, + attribute_val_in, attribute_val_out, bflag); } else if (OMPI_COMM_IS_INTER(comm)) { intercomm = MPI::Intercomm(comm); ret = kid->cxx_copy_fn(intercomm, keyval, kid->extra_state, - attribute_val_in, attribute_val_out, + attribute_val_in, attribute_val_out, bflag); } else { ret = MPI::ERR_COMM; @@ -322,11 +322,11 @@ ompi_mpi_cxx_comm_copy_attr_intercept(MPI_Comm comm, int keyval, } extern "C" int -ompi_mpi_cxx_comm_delete_attr_intercept(MPI_Comm comm, int keyval, +ompi_mpi_cxx_comm_delete_attr_intercept(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state) { int ret = 0; - MPI::Comm::keyval_intercept_data_t *kid = + MPI::Comm::keyval_intercept_data_t *kid = (MPI::Comm::keyval_intercept_data_t*) extra_state; // The callback may be in C or C++. If it's in C, it's easy - just @@ -342,23 +342,23 @@ ompi_mpi_cxx_comm_delete_attr_intercept(MPI_Comm comm, int keyval, MPI::Intercomm intercomm; MPI::Graphcomm graphcomm; MPI::Cartcomm cartcomm; - + if (NULL != kid->cxx_delete_fn) { if (OMPI_COMM_IS_GRAPH(comm)) { graphcomm = MPI::Graphcomm(comm); - ret = kid->cxx_delete_fn(graphcomm, keyval, attribute_val, + ret = kid->cxx_delete_fn(graphcomm, keyval, attribute_val, kid->extra_state); } else if (OMPI_COMM_IS_CART(comm)) { cartcomm = MPI::Cartcomm(comm); - ret = kid->cxx_delete_fn(cartcomm, keyval, attribute_val, + ret = kid->cxx_delete_fn(cartcomm, keyval, attribute_val, kid->extra_state); } else if (OMPI_COMM_IS_INTRA(comm)) { intracomm = MPI::Intracomm(comm); - ret = kid->cxx_delete_fn(intracomm, keyval, attribute_val, + ret = kid->cxx_delete_fn(intracomm, keyval, attribute_val, kid->extra_state); } else if (OMPI_COMM_IS_INTER(comm)) { intercomm = MPI::Intercomm(comm); - ret = kid->cxx_delete_fn(intercomm, keyval, attribute_val, + ret = kid->cxx_delete_fn(intercomm, keyval, attribute_val, kid->extra_state); } else { ret = MPI::ERR_COMM; @@ -367,29 +367,29 @@ ompi_mpi_cxx_comm_delete_attr_intercept(MPI_Comm comm, int keyval, ret = MPI::ERR_OTHER; } - return ret; + return ret; } extern "C" int -ompi_mpi_cxx_type_copy_attr_intercept(MPI_Datatype oldtype, int keyval, - void *extra_state, void *attribute_val_in, +ompi_mpi_cxx_type_copy_attr_intercept(MPI_Datatype oldtype, int keyval, + void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag) { int ret = 0; - MPI::Datatype::keyval_intercept_data_t *kid = + MPI::Datatype::keyval_intercept_data_t *kid = (MPI::Datatype::keyval_intercept_data_t*) extra_state; if (NULL != kid->c_copy_fn) { // The callback may be in C or C++. If it's in C, it's easy - just // call it with no extra C++ machinery. - ret = kid->c_copy_fn(oldtype, keyval, kid->extra_state, attribute_val_in, + ret = kid->c_copy_fn(oldtype, keyval, kid->extra_state, attribute_val_in, attribute_val_out, flag); } else if (NULL != kid->cxx_copy_fn) { // If the callback was C++, we have to do a little more work - bool bflag = OPAL_INT_TO_BOOL(*flag); + bool bflag = OPAL_INT_TO_BOOL(*flag); MPI::Datatype cxx_datatype(oldtype); - ret = kid->cxx_copy_fn(cxx_datatype, keyval, kid->extra_state, + ret = kid->cxx_copy_fn(cxx_datatype, keyval, kid->extra_state, attribute_val_in, attribute_val_out, bflag); *flag = (int)bflag; } else { @@ -400,18 +400,18 @@ ompi_mpi_cxx_type_copy_attr_intercept(MPI_Datatype oldtype, int keyval, } extern "C" int -ompi_mpi_cxx_type_delete_attr_intercept(MPI_Datatype type, int keyval, +ompi_mpi_cxx_type_delete_attr_intercept(MPI_Datatype type, int keyval, void *attribute_val, void *extra_state) { int ret = 0; - MPI::Datatype::keyval_intercept_data_t *kid = + MPI::Datatype::keyval_intercept_data_t *kid = (MPI::Datatype::keyval_intercept_data_t*) extra_state; if (NULL != kid->c_delete_fn) { return kid->c_delete_fn(type, keyval, attribute_val, kid->extra_state); } else if (NULL != kid->cxx_delete_fn) { MPI::Datatype cxx_datatype(type); - return kid->cxx_delete_fn(cxx_datatype, keyval, attribute_val, + return kid->cxx_delete_fn(cxx_datatype, keyval, attribute_val, kid->extra_state); } else { ret = MPI::ERR_TYPE; @@ -421,7 +421,7 @@ ompi_mpi_cxx_type_delete_attr_intercept(MPI_Datatype type, int keyval, } extern "C" int -ompi_mpi_cxx_win_copy_attr_intercept(MPI_Win oldwin, int keyval, +ompi_mpi_cxx_win_copy_attr_intercept(MPI_Win oldwin, int keyval, void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag) { @@ -432,13 +432,13 @@ ompi_mpi_cxx_win_copy_attr_intercept(MPI_Win oldwin, int keyval, if (NULL != kid->c_copy_fn) { // The callback may be in C or C++. If it's in C, it's easy - just // call it with no extra C++ machinery. - ret = kid->c_copy_fn(oldwin, keyval, kid->extra_state, attribute_val_in, + ret = kid->c_copy_fn(oldwin, keyval, kid->extra_state, attribute_val_in, attribute_val_out, flag); } else if (NULL != kid->cxx_copy_fn) { // If the callback was C++, we have to do a little more work - bool bflag = OPAL_INT_TO_BOOL(*flag); + bool bflag = OPAL_INT_TO_BOOL(*flag); MPI::Win cxx_win(oldwin); - ret = kid->cxx_copy_fn(cxx_win, keyval, kid->extra_state, + ret = kid->cxx_copy_fn(cxx_win, keyval, kid->extra_state, attribute_val_in, attribute_val_out, bflag); *flag = (int)bflag; } else { @@ -449,18 +449,18 @@ ompi_mpi_cxx_win_copy_attr_intercept(MPI_Win oldwin, int keyval, } extern "C" int -ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, +ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, void *attribute_val, void *extra_state) { int ret = 0; - MPI::Win::keyval_intercept_data_t *kid = + MPI::Win::keyval_intercept_data_t *kid = (MPI::Win::keyval_intercept_data_t*) extra_state; if (NULL != kid->c_delete_fn) { return kid->c_delete_fn(win, keyval, attribute_val, kid->extra_state); } else if (NULL != kid->cxx_delete_fn) { MPI::Win cxx_win(win); - return kid->cxx_delete_fn(cxx_win, keyval, attribute_val, + return kid->cxx_delete_fn(cxx_win, keyval, attribute_val, kid->extra_state); } else { ret = MPI::ERR_WIN; @@ -476,7 +476,7 @@ ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, extern "C" int ompi_mpi_cxx_grequest_query_fn_intercept(void *state, MPI_Status *status) { - MPI::Grequest::Intercept_data_t *data = + MPI::Grequest::Intercept_data_t *data = (MPI::Grequest::Intercept_data_t *) state; MPI::Status s(*status); @@ -488,7 +488,7 @@ ompi_mpi_cxx_grequest_query_fn_intercept(void *state, MPI_Status *status) extern "C" int ompi_mpi_cxx_grequest_free_fn_intercept(void *state) { - MPI::Grequest::Intercept_data_t *data = + MPI::Grequest::Intercept_data_t *data = (MPI::Grequest::Intercept_data_t *) state; int ret = data->id_cxx_free_fn(data->id_extra); // Delete the struct that was "new"ed in MPI::Grequest::Start() @@ -499,8 +499,8 @@ ompi_mpi_cxx_grequest_free_fn_intercept(void *state) extern "C" int ompi_mpi_cxx_grequest_cancel_fn_intercept(void *state, int cancelled) { - MPI::Grequest::Intercept_data_t *data = + MPI::Grequest::Intercept_data_t *data = (MPI::Grequest::Intercept_data_t *) state; - return data->id_cxx_cancel_fn(data->id_extra, + return data->id_cxx_cancel_fn(data->id_extra, (0 != cancelled ? true : false)); } diff --git a/ompi/mpi/cxx/intercomm.h b/ompi/mpi/cxx/intercomm.h index 7dbc855c726..12d63de9955 100644 --- a/ompi/mpi/cxx/intercomm.h +++ b/ompi/mpi/cxx/intercomm.h @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -36,7 +36,7 @@ class Intercomm : public Comm { #if 0 /* OMPI_ENABLE_MPI_PROFILING */ // copy Intercomm(const Intercomm& data) : Comm(data), pmpi_comm(data.pmpi_comm) { } - Intercomm(const PMPI::Intercomm& d) : + Intercomm(const PMPI::Intercomm& d) : Comm((const PMPI::Comm&)d), pmpi_comm(d) { } // assignment @@ -61,10 +61,10 @@ class Intercomm : public Comm { mpi_comm = data; return *this; } // inter-language operability Intercomm& operator=(const MPI_Comm& data) { - mpi_comm = data; return *this; } + mpi_comm = data; return *this; } #endif - + // // Groups, Contexts, and Communicators diff --git a/ompi/mpi/cxx/intercomm_inln.h b/ompi/mpi/cxx/intercomm_inln.h index 658f75f53a7..964abe89b37 100644 --- a/ompi/mpi/cxx/intercomm_inln.h +++ b/ompi/mpi/cxx/intercomm_inln.h @@ -6,15 +6,15 @@ // 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, +// 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 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -36,7 +36,7 @@ MPI::Intercomm::Clone() const } inline int -MPI::Intercomm::Get_remote_size() const +MPI::Intercomm::Get_remote_size() const { int size; (void)MPI_Comm_remote_size(mpi_comm, &size); @@ -44,7 +44,7 @@ MPI::Intercomm::Get_remote_size() const } inline MPI::Group -MPI::Intercomm::Get_remote_group() const +MPI::Intercomm::Get_remote_group() const { MPI_Group group; (void)MPI_Comm_remote_group(mpi_comm, &group); diff --git a/ompi/mpi/cxx/intracomm.h b/ompi/mpi/cxx/intracomm.h index 9f60d662470..984cb3a4b46 100644 --- a/ompi/mpi/cxx/intracomm.h +++ b/ompi/mpi/cxx/intracomm.h @@ -6,15 +6,15 @@ // 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, +// 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) 2006 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -37,14 +37,14 @@ class Intracomm : public Comm { Intracomm(const Intracomm& data) : Comm(data), pmpi_comm(data) { } Intracomm(MPI_Comm data) : Comm(data), pmpi_comm(data) { } - - Intracomm(const PMPI::Intracomm& data) + + Intracomm(const PMPI::Intracomm& data) : Comm((const PMPI::Comm&)data), pmpi_comm(data) { } // assignment Intracomm& operator=(const Intracomm& data) { Comm::operator=(data); - pmpi_comm = data.pmpi_comm; + pmpi_comm = data.pmpi_comm; return *this; } Intracomm& operator=(const Comm_Null& data) { @@ -74,10 +74,10 @@ class Intracomm : public Comm { // inter-language operability Intracomm& operator=(const MPI_Comm& data) { - mpi_comm = data; return *this; } + mpi_comm = data; return *this; } #endif - + // // Collective Communication // @@ -85,7 +85,7 @@ class Intracomm : public Comm { // in intercomm's, so they're down here in Intracomm. // virtual void - Scan(const void *sendbuf, void *recvbuf, int count, + Scan(const void *sendbuf, void *recvbuf, int count, const Datatype & datatype, const Op & op) const; virtual void @@ -97,23 +97,23 @@ class Intracomm : public Comm { // Intracomm Dup() const; - + virtual Intracomm& Clone() const; virtual Intracomm Create(const Group& group) const; - + virtual Intracomm Split(int color, int key) const; virtual Intercomm Create_intercomm(int local_leader, const Comm& peer_comm, int remote_leader, int tag) const; - + virtual Cartcomm Create_cart(int ndims, const int dims[], const bool periods[], bool reorder) const; - + virtual Graphcomm Create_graph(int nnodes, const int index[], const int edges[], bool reorder) const; @@ -122,7 +122,7 @@ class Intracomm : public Comm { // // Process Creation and Management // - + virtual Intercomm Accept(const char* port_name, const Info& info, int root) const; @@ -161,6 +161,6 @@ class Intracomm : public Comm { // Convert an array of p_nbr Info object into an array of MPI_Info. // A pointer to the allocated array is returned and must be // eventually deleted. - static inline MPI_Info *convert_info_to_mpi_info(int p_nbr, + static inline MPI_Info *convert_info_to_mpi_info(int p_nbr, const Info p_info_tbl[]); }; diff --git a/ompi/mpi/cxx/intracomm_inln.h b/ompi/mpi/cxx/intracomm_inln.h index e6079391cce..a4580281bcf 100644 --- a/ompi/mpi/cxx/intracomm_inln.h +++ b/ompi/mpi/cxx/intracomm_inln.h @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -36,7 +36,7 @@ MPI::Intracomm::Intracomm(MPI_Comm data) { } inline void -MPI::Intracomm::Scan(const void *sendbuf, void *recvbuf, int count, +MPI::Intracomm::Scan(const void *sendbuf, void *recvbuf, int count, const MPI::Datatype & datatype, const MPI::Op& op) const { (void)MPI_Scan(const_cast(sendbuf), recvbuf, count, datatype, op, mpi_comm); @@ -44,7 +44,7 @@ MPI::Intracomm::Scan(const void *sendbuf, void *recvbuf, int count, inline void MPI::Intracomm::Exscan(const void *sendbuf, void *recvbuf, int count, - const MPI::Datatype & datatype, + const MPI::Datatype & datatype, const MPI::Op& op) const { (void)MPI_Exscan(const_cast(sendbuf), recvbuf, count, datatype, op, mpi_comm); @@ -92,7 +92,7 @@ MPI::Intracomm::Create_intercomm(int local_leader, { MPI_Comm newintercomm; (void)MPI_Intercomm_create(mpi_comm, local_leader, peer_comm, - remote_leader, tag, &newintercomm); + remote_leader, tag, &newintercomm); return newintercomm; } @@ -103,9 +103,9 @@ MPI::Intracomm::Create_cart(int ndims, const int dims[], int *int_periods = new int [ndims]; for (int i=0; i(dims), + (void)MPI_Cart_create(mpi_comm, ndims, const_cast(dims), int_periods, (int)reorder, &newcomm); delete [] int_periods; return newcomm; @@ -116,7 +116,7 @@ MPI::Intracomm::Create_graph(int nnodes, const int index[], const int edges[], bool reorder) const { MPI_Comm newcomm; - (void)MPI_Graph_create(mpi_comm, nnodes, const_cast(index), + (void)MPI_Graph_create(mpi_comm, nnodes, const_cast(index), const_cast(edges), (int)reorder, &newcomm); return newcomm; } @@ -127,7 +127,7 @@ MPI::Intracomm::Create_graph(int nnodes, const int index[], // inline MPI::Intercomm -MPI::Intracomm::Accept(const char* port_name, +MPI::Intracomm::Accept(const char* port_name, const MPI::Info& info, int root) const { @@ -152,12 +152,12 @@ MPI::Intracomm::Connect(const char* port_name, inline MPI::Intercomm MPI::Intracomm::Spawn(const char* command, const char* argv[], - int maxprocs, const MPI::Info& info, + int maxprocs, const MPI::Info& info, int root) const { MPI_Comm newcomm; (void) MPI_Comm_spawn(const_cast(command), const_cast(argv), maxprocs, - info, root, mpi_comm, &newcomm, + info, root, mpi_comm, &newcomm, (int *)MPI_ERRCODES_IGNORE); return newcomm; } @@ -170,25 +170,25 @@ MPI::Intracomm::Spawn(const char* command, const char* argv[], { MPI_Comm newcomm; (void) MPI_Comm_spawn(const_cast(command), const_cast(argv), maxprocs, - info, root, mpi_comm, &newcomm, + info, root, mpi_comm, &newcomm, array_of_errcodes); return newcomm; } inline MPI::Intercomm -MPI::Intracomm::Spawn_multiple(int count, +MPI::Intracomm::Spawn_multiple(int count, const char* array_of_commands[], const char** array_of_argv[], const int array_of_maxprocs[], const Info array_of_info[], int root) { MPI_Comm newcomm; - MPI_Info *const array_of_mpi_info = + MPI_Info *const array_of_mpi_info = convert_info_to_mpi_info(count, array_of_info); - MPI_Comm_spawn_multiple(count, const_cast(array_of_commands), - const_cast(array_of_argv), + MPI_Comm_spawn_multiple(count, const_cast(array_of_commands), + const_cast(array_of_argv), const_cast(array_of_maxprocs), array_of_mpi_info, root, mpi_comm, &newcomm, (int *)MPI_ERRCODES_IGNORE); @@ -217,11 +217,11 @@ MPI::Intracomm::Spawn_multiple(int count, int array_of_errcodes[]) { MPI_Comm newcomm; - MPI_Info *const array_of_mpi_info = + MPI_Info *const array_of_mpi_info = convert_info_to_mpi_info(count, array_of_info); - MPI_Comm_spawn_multiple(count, const_cast(array_of_commands), - const_cast(array_of_argv), + MPI_Comm_spawn_multiple(count, const_cast(array_of_commands), + const_cast(array_of_argv), const_cast(array_of_maxprocs), array_of_mpi_info, root, mpi_comm, &newcomm, array_of_errcodes); diff --git a/ompi/mpi/cxx/mpicxx.cc b/ompi/mpi/cxx/mpicxx.cc index 44b9fd49064..3ed2f3f386d 100644 --- a/ompi/mpi/cxx/mpicxx.cc +++ b/ompi/mpi/cxx/mpicxx.cc @@ -1,12 +1,12 @@ // -*- c++ -*- -// +// // 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, +// 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. @@ -14,9 +14,9 @@ // Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ #include "mpicxx.h" @@ -151,7 +151,7 @@ Comm_Null COMM_NULL; const Datatype DATATYPE_NULL = MPI_DATATYPE_NULL; Request REQUEST_NULL = MPI_REQUEST_NULL; const Op OP_NULL = MPI_OP_NULL; -const Errhandler ERRHANDLER_NULL; +const Errhandler ERRHANDLER_NULL; #if OMPI_PROVIDE_MPI_FILE_INTERFACE const File FILE_NULL = MPI_FILE_NULL; #endif diff --git a/ompi/mpi/cxx/mpicxx.h b/ompi/mpi/cxx/mpicxx.h index 5aa22e97122..d3fc00b697c 100644 --- a/ompi/mpi/cxx/mpicxx.h +++ b/ompi/mpi/cxx/mpicxx.h @@ -1,12 +1,12 @@ // -*- c++ -*- -// +// // 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, +// 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. @@ -14,22 +14,22 @@ // Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. // Copyright (c) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // #ifndef MPIPP_H #define MPIPP_H -// +// // Let's ensure that we're really in C++, and some errant programmer // hasn't included just "for completeness" // // We do not include the opal_config.h and may not replace extern "C" { -#if defined(c_plusplus) || defined(__cplusplus) +#if defined(c_plusplus) || defined(__cplusplus) // do not include ompi_config.h. it will smash free() as a symbol #include "mpi.h" @@ -70,8 +70,8 @@ static const int SEEK_END = ompi_stdio_seek_end; #endif #ifdef OPAL_HAVE_SYS_SYNCH_H -// Solaris threads.h pulls in sys/synch.h which in certain versions -// defines LOCK_SHARED. +// Solaris threads.h pulls in sys/synch.h which in certain versions +// defines LOCK_SHARED. // include so that we can smash LOCK_SHARED #include @@ -94,12 +94,12 @@ struct opal_mutex_t; // See lengthy explanation in intercepts.cc about this function. extern "C" void -ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len, +ompi_mpi_cxx_op_intercept(void *invec, void *outvec, int *len, MPI_Datatype *datatype, MPI_User_function *fn); extern "C" void ompi_mpi_cxx_comm_errhandler_invoke(ompi_errhandler_t *c_errhandler, - MPI_Comm *mpi_comm, int *err, + MPI_Comm *mpi_comm, int *err, const char *message); extern "C" void ompi_mpi_cxx_win_errhandler_invoke(ompi_errhandler_t *c_errhandler, @@ -116,28 +116,28 @@ ompi_mpi_cxx_file_errhandler_invoke(ompi_errhandler_t *c_errhandler, enum CommType { eIntracomm, eIntercomm, eCartcomm, eGraphcomm}; extern "C" int -ompi_mpi_cxx_comm_copy_attr_intercept(MPI_Comm oldcomm, int keyval, - void *extra_state, void *attribute_val_in, +ompi_mpi_cxx_comm_copy_attr_intercept(MPI_Comm oldcomm, int keyval, + void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag, MPI_Comm newcomm); extern "C" int -ompi_mpi_cxx_comm_delete_attr_intercept(MPI_Comm comm, int keyval, +ompi_mpi_cxx_comm_delete_attr_intercept(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state); extern "C" int -ompi_mpi_cxx_type_copy_attr_intercept(MPI_Datatype oldtype, int keyval, - void *extra_state, void *attribute_val_in, +ompi_mpi_cxx_type_copy_attr_intercept(MPI_Datatype oldtype, int keyval, + void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag); extern "C" int -ompi_mpi_cxx_type_delete_attr_intercept(MPI_Datatype type, int keyval, +ompi_mpi_cxx_type_delete_attr_intercept(MPI_Datatype type, int keyval, void *attribute_val, void *extra_state); extern "C" int -ompi_mpi_cxx_win_copy_attr_intercept(MPI_Win oldwin, int keyval, - void *extra_state, void *attribute_val_in, +ompi_mpi_cxx_win_copy_attr_intercept(MPI_Win oldwin, int keyval, + void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag); extern "C" int -ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, +ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, void *attribute_val, void *extra_state); @@ -146,11 +146,11 @@ ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, // MPI generalized request intercepts // -extern "C" int +extern "C" int ompi_mpi_cxx_grequest_query_fn_intercept(void *state, MPI_Status *status); -extern "C" int +extern "C" int ompi_mpi_cxx_grequest_free_fn_intercept(void *state); -extern "C" int +extern "C" int ompi_mpi_cxx_grequest_cancel_fn_intercept(void *state, int canceled); /** @@ -217,7 +217,7 @@ namespace MPI { #include "ompi/mpi/cxx/op.h" #include "ompi/mpi/cxx/status.h" #include "ompi/mpi/cxx/request.h" //includes class Prequest -#include "ompi/mpi/cxx/group.h" +#include "ompi/mpi/cxx/group.h" #include "ompi/mpi/cxx/comm.h" #include "ompi/mpi/cxx/win.h" #if OMPI_PROVIDE_MPI_FILE_INTERFACE @@ -233,7 +233,7 @@ namespace MPI { #include "openmpi/ompi/mpi/cxx/op.h" #include "openmpi/ompi/mpi/cxx/status.h" #include "openmpi/ompi/mpi/cxx/request.h" //includes class Prequest -#include "openmpi/ompi/mpi/cxx/group.h" +#include "openmpi/ompi/mpi/cxx/group.h" #include "openmpi/ompi/mpi/cxx/comm.h" #include "openmpi/ompi/mpi/cxx/win.h" #if OMPI_PROVIDE_MPI_FILE_INTERFACE @@ -303,5 +303,5 @@ namespace MPI { #endif #endif -#endif // #if defined(c_plusplus) || defined(__cplusplus) +#endif // #if defined(c_plusplus) || defined(__cplusplus) #endif // #ifndef MPIPP_H_ diff --git a/ompi/mpi/cxx/op.h b/ompi/mpi/cxx/op.h index a0490d9e9c5..00a9ec64d48 100644 --- a/ompi/mpi/cxx/op.h +++ b/ompi/mpi/cxx/op.h @@ -6,15 +6,15 @@ // 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, +// 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) 2006-2009 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -46,8 +46,8 @@ class Op { //JGS took const out virtual void Init(User_function *func, bool commute); virtual void Free(); - - virtual void Reduce_local(const void *inbuf, void *inoutbuf, int count, + + virtual void Reduce_local(const void *inbuf, void *inoutbuf, int count, const MPI::Datatype& datatype) const; virtual bool Is_commutative(void) const; diff --git a/ompi/mpi/cxx/op_inln.h b/ompi/mpi/cxx/op_inln.h index bdd5a5fcfc8..1453ac86f61 100644 --- a/ompi/mpi/cxx/op_inln.h +++ b/ompi/mpi/cxx/op_inln.h @@ -1,20 +1,20 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006-2009 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -22,10 +22,10 @@ inline MPI::Op::Op() { } - + inline MPI::Op::Op(const MPI::Op& o) : pmpi_op(o.pmpi_op) { } - + inline MPI::Op::Op(MPI_Op o) : pmpi_op(o) { } @@ -72,14 +72,14 @@ inline MPI::Op::Op(const MPI::Op& op) : mpi_op(op.mpi_op) { } -inline -MPI::Op::~Op() -{ +inline +MPI::Op::~Op() +{ #if 0 mpi_op = MPI_OP_NULL; op_user_function = 0; #endif -} +} inline MPI::Op& MPI::Op::operator=(const MPI::Op& op) { @@ -118,7 +118,7 @@ extern "C" void ompi_op_set_cxx_callback(MPI_Op op, MPI_User_function*); inline void MPI::Op::Init(MPI::User_function *func, bool commute) { - (void)MPI_Op_create((MPI_User_function*) ompi_mpi_cxx_op_intercept, + (void)MPI_Op_create((MPI_User_function*) ompi_mpi_cxx_op_intercept, (int) commute, &mpi_op); ompi_op_set_cxx_callback(mpi_op, (MPI_User_function*) func); } @@ -131,16 +131,16 @@ MPI::Op::Free() } -inline void -MPI::Op::Reduce_local(const void *inbuf, void *inoutbuf, int count, +inline void +MPI::Op::Reduce_local(const void *inbuf, void *inoutbuf, int count, const MPI::Datatype& datatype) const { - (void)MPI_Reduce_local(const_cast(inbuf), inoutbuf, count, + (void)MPI_Reduce_local(const_cast(inbuf), inoutbuf, count, datatype, mpi_op); } -inline bool +inline bool MPI::Op::Is_commutative(void) const { int commute; diff --git a/ompi/mpi/cxx/request.h b/ompi/mpi/cxx/request.h index f90e8e5836b..f8e3153d602 100644 --- a/ompi/mpi/cxx/request.h +++ b/ompi/mpi/cxx/request.h @@ -6,15 +6,15 @@ // 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, +// 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) 2006-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -41,9 +41,9 @@ class Request { pmpi_request = r.pmpi_request; return *this; } // comparison - bool operator== (const Request &a) + bool operator== (const Request &a) { return (bool)(pmpi_request == a.pmpi_request); } - bool operator!= (const Request &a) + bool operator!= (const Request &a) { return (bool)!(*this == a); } // inter-language operability @@ -68,9 +68,9 @@ class Request { mpi_request = r.mpi_request; return *this; } // comparison - bool operator== (const Request &a) + bool operator== (const Request &a) { return (bool)(mpi_request == a.mpi_request); } - bool operator!= (const Request &a) + bool operator!= (const Request &a) { return (bool)!(*this == a); } // inter-language operability @@ -104,11 +104,11 @@ class Request { static bool Testany(int count, Request array[], int& index); static void Waitall(int count, Request req_array[], Status stat_array[]); - + static void Waitall(int count, Request req_array[]); static bool Testall(int count, Request req_array[], Status stat_array[]); - + static bool Testall(int count, Request req_array[]); static int Waitsome(int incount, Request req_array[], @@ -138,7 +138,7 @@ class Request { #if 0 /* OMPI_ENABLE_MPI_PROFILING */ PMPI::Request pmpi_request; -#endif +#endif }; @@ -154,12 +154,12 @@ class Prequest : public Request { #if 0 /* OMPI_ENABLE_MPI_PROFILING */ Prequest(const Request& p) : Request(p), pmpi_request(p) { } - Prequest(const PMPI::Prequest& r) : + Prequest(const PMPI::Prequest& r) : Request((const PMPI::Request&)r), pmpi_request(r) { } Prequest(const MPI_Request &i) : Request(i), pmpi_request(i) { } - + virtual ~Prequest() { } Prequest& operator=(const Request& r) { @@ -190,7 +190,7 @@ class Prequest : public Request { #if 0 /* OMPI_ENABLE_MPI_PROFILING */ private: PMPI::Prequest pmpi_request; -#endif +#endif }; diff --git a/ompi/mpi/cxx/request_inln.h b/ompi/mpi/cxx/request_inln.h index 68417b26a19..d042b4d9a9f 100644 --- a/ompi/mpi/cxx/request_inln.h +++ b/ompi/mpi/cxx/request_inln.h @@ -1,21 +1,21 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006-2008 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -24,25 +24,25 @@ // inline void -MPI::Request::Wait(MPI::Status &status) +MPI::Request::Wait(MPI::Status &status) { (void)MPI_Wait(&mpi_request, &status.mpi_status); } inline void -MPI::Request::Wait() +MPI::Request::Wait() { (void)MPI_Wait(&mpi_request, MPI_STATUS_IGNORE); } inline void -MPI::Request::Free() +MPI::Request::Free() { (void)MPI_Request_free(&mpi_request); } inline bool -MPI::Request::Test(MPI::Status &status) +MPI::Request::Test(MPI::Status &status) { int t; (void)MPI_Test(&mpi_request, &t, &status.mpi_status); @@ -50,7 +50,7 @@ MPI::Request::Test(MPI::Status &status) } inline bool -MPI::Request::Test() +MPI::Request::Test() { int t; (void)MPI_Test(&mpi_request, &t, MPI_STATUS_IGNORE); @@ -115,7 +115,7 @@ MPI::Request::Testany(int count, MPI::Request array[], int& index) for (i=0; i < count; i++) { array_of_requests[i] = array[i]; } - (void)MPI_Testany(count, array_of_requests, &index, &flag, + (void)MPI_Testany(count, array_of_requests, &index, &flag, MPI_STATUS_IGNORE); for (i=0; i < count; i++) { array[i] = array_of_requests[i]; @@ -159,7 +159,7 @@ MPI::Request::Waitall(int count, MPI::Request req_array[]) } delete [] array_of_requests; -} +} inline bool MPI::Request::Testall(int count, MPI::Request req_array[], @@ -198,11 +198,11 @@ MPI::Request::Testall(int count, MPI::Request req_array[]) delete [] array_of_requests; return OPAL_INT_TO_BOOL(flag); -} +} inline int MPI::Request::Waitsome(int incount, MPI::Request req_array[], - int array_of_indices[], MPI::Status stat_array[]) + int array_of_indices[], MPI::Status stat_array[]) { int i, outcount; MPI_Request* array_of_requests = new MPI_Request[incount]; @@ -223,7 +223,7 @@ MPI::Request::Waitsome(int incount, MPI::Request req_array[], inline int MPI::Request::Waitsome(int incount, MPI::Request req_array[], - int array_of_indices[]) + int array_of_indices[]) { int i, outcount; MPI_Request* array_of_requests = new MPI_Request[incount]; @@ -244,7 +244,7 @@ MPI::Request::Waitsome(int incount, MPI::Request req_array[], inline int MPI::Request::Testsome(int incount, MPI::Request req_array[], - int array_of_indices[], MPI::Status stat_array[]) + int array_of_indices[], MPI::Status stat_array[]) { int i, outcount; MPI_Request* array_of_requests = new MPI_Request[incount]; @@ -265,7 +265,7 @@ MPI::Request::Testsome(int incount, MPI::Request req_array[], inline int MPI::Request::Testsome(int incount, MPI::Request req_array[], - int array_of_indices[]) + int array_of_indices[]) { int i, outcount; MPI_Request* array_of_requests = new MPI_Request[incount]; @@ -305,12 +305,12 @@ MPI::Prequest::Startall(int count, MPI:: Prequest array_of_requests[]) for (i=0; i < count; i++) { mpi_requests[i] = array_of_requests[i]; } - (void)MPI_Startall(count, mpi_requests); + (void)MPI_Startall(count, mpi_requests); for (i=0; i < count; i++) { array_of_requests[i].mpi_request = mpi_requests[i] ; } delete [] mpi_requests; -} +} inline bool MPI::Request::Get_status(MPI::Status& status) const { @@ -343,7 +343,7 @@ MPI::Grequest::Start(Query_function *query_fn, Free_function *free_fn, Cancel_function *cancel_fn, void *extra) { MPI_Request grequest = 0; - Intercept_data_t *new_extra = + Intercept_data_t *new_extra = new MPI::Grequest::Intercept_data_t; new_extra->id_extra = extra; diff --git a/ompi/mpi/cxx/status.h b/ompi/mpi/cxx/status.h index 9a716ab47c7..872707890ff 100644 --- a/ompi/mpi/cxx/status.h +++ b/ompi/mpi/cxx/status.h @@ -1,20 +1,20 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -94,9 +94,9 @@ class Status { virtual void Set_source(int source); virtual int Get_tag() const; - + virtual void Set_tag(int tag); - + virtual int Get_error() const; virtual void Set_error(int error); diff --git a/ompi/mpi/cxx/status_inln.h b/ompi/mpi/cxx/status_inln.h index f85caac7dd0..2110c671f8a 100644 --- a/ompi/mpi/cxx/status_inln.h +++ b/ompi/mpi/cxx/status_inln.h @@ -1,20 +1,20 @@ // -*- c++ -*- -// +// // 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, +// 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) 2006 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // diff --git a/ompi/mpi/cxx/topology.h b/ompi/mpi/cxx/topology.h index dee26322963..167c8b65393 100644 --- a/ompi/mpi/cxx/topology.h +++ b/ompi/mpi/cxx/topology.h @@ -6,15 +6,15 @@ // 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, +// 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 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -30,10 +30,10 @@ class Cartcomm : public Intracomm { inline Cartcomm(const MPI_Comm& data); #if 0 /* OMPI_ENABLE_MPI_PROFILING */ Cartcomm(const Cartcomm& data) : Intracomm(data), pmpi_comm(data) { } - Cartcomm(const PMPI::Cartcomm& d) : + Cartcomm(const PMPI::Cartcomm& d) : Intracomm((const PMPI::Intracomm&)d), pmpi_comm(d) { } - + // assignment Cartcomm& operator=(const Cartcomm& data) { Intracomm::operator=(data); @@ -54,7 +54,7 @@ class Cartcomm : public Intracomm { mpi_comm = data; return *this; } // inter-language operability Cartcomm& operator=(const MPI_Comm& data) { - mpi_comm = data; return *this; } + mpi_comm = data; return *this; } #endif // // Groups, Contexts, and Communicators @@ -80,7 +80,7 @@ class Cartcomm : public Intracomm { virtual void Shift(int direction, int disp, int &rank_source, int &rank_dest) const; - + virtual Cartcomm Sub(const bool remain_dims[]) const; virtual int Map(int ndims, const int dims[], const bool periods[]) const; @@ -107,9 +107,9 @@ class Graphcomm : public Intracomm { inline Graphcomm(const MPI_Comm& data); #if 0 /* OMPI_ENABLE_MPI_PROFILING */ Graphcomm(const Graphcomm& data) : Intracomm(data), pmpi_comm(data) { } - Graphcomm(const PMPI::Graphcomm& d) : + Graphcomm(const PMPI::Graphcomm& d) : Intracomm((const PMPI::Intracomm&)d), pmpi_comm(d) { } - + // assignment Graphcomm& operator=(const Graphcomm& data) { Intracomm::operator=(data); @@ -131,13 +131,13 @@ class Graphcomm : public Intracomm { mpi_comm = data; return *this; } // inter-language operability Graphcomm& operator=(const MPI_Comm& data) { - mpi_comm = data; return *this; } + mpi_comm = data; return *this; } #endif // // Groups, Contexts, and Communicators // - + Graphcomm Dup() const; virtual Graphcomm& Clone() const; @@ -148,15 +148,15 @@ class Graphcomm : public Intracomm { virtual void Get_dims(int nnodes[], int nedges[]) const; - virtual void Get_topo(int maxindex, int maxedges, int index[], + virtual void Get_topo(int maxindex, int maxedges, int index[], int edges[]) const; virtual int Get_neighbors_count(int rank) const; - virtual void Get_neighbors(int rank, int maxneighbors, + virtual void Get_neighbors(int rank, int maxneighbors, int neighbors[]) const; - virtual int Map(int nnodes, const int index[], + virtual int Map(int nnodes, const int index[], const int edges[]) const; #if 0 /* OMPI_ENABLE_MPI_PROFILING */ diff --git a/ompi/mpi/cxx/topology_inln.h b/ompi/mpi/cxx/topology_inln.h index 3bdbab2ddc0..41b90c7fd20 100644 --- a/ompi/mpi/cxx/topology_inln.h +++ b/ompi/mpi/cxx/topology_inln.h @@ -6,16 +6,16 @@ // 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, +// 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) 2011 FUJITSU LIMITED. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -55,7 +55,7 @@ MPI::Cartcomm::Dup() const // inline int -MPI::Cartcomm::Get_dim() const +MPI::Cartcomm::Get_dim() const { int ndims; (void)MPI_Cartdim_get(mpi_comm, &ndims); @@ -79,22 +79,22 @@ MPI::Cartcomm::Get_topo(int maxdims, int dims[], bool periods[], } inline int -MPI::Cartcomm::Get_cart_rank(const int coords[]) const +MPI::Cartcomm::Get_cart_rank(const int coords[]) const { int rank; (void)MPI_Cart_rank(mpi_comm, const_cast(coords), &rank); return rank; } - + inline void -MPI::Cartcomm::Get_coords(int rank, int maxdims, int coords[]) const +MPI::Cartcomm::Get_coords(int rank, int maxdims, int coords[]) const { (void)MPI_Cart_coords(mpi_comm, rank, maxdims, coords); -} +} inline void MPI::Cartcomm::Shift(int direction, int disp, - int &rank_source, int &rank_dest) const + int &rank_source, int &rank_dest) const { (void)MPI_Cart_shift(mpi_comm, direction, disp, &rank_source, &rank_dest); } @@ -115,7 +115,7 @@ MPI::Cartcomm::Sub(const bool remain_dims[]) const } inline int -MPI::Cartcomm::Map(int ndims, const int dims[], const bool periods[]) const +MPI::Cartcomm::Map(int ndims, const int dims[], const bool periods[]) const { int *int_periods = new int [ndims]; for (int i=0; i(index), const_cast(edges), &newrank); diff --git a/ompi/mpi/cxx/win.cc b/ompi/mpi/cxx/win.cc index 1f106073290..de4629ac00e 100644 --- a/ompi/mpi/cxx/win.cc +++ b/ompi/mpi/cxx/win.cc @@ -1,13 +1,13 @@ // -*- c++ -*- -// +// // Copyright (c) 2006 Los Alamos National Security, LLC. All rights -// reserved. +// reserved. // Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. // Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -20,22 +20,22 @@ #include "ompi/attribute/attribute.h" #include "ompi/errhandler/errhandler.h" -void +void MPI::Win::Free() { (void) MPI_Win_free(&mpi_win); } - + // This function needs some internal OMPI types, so it's not inlined MPI::Errhandler MPI::Win::Create_errhandler(MPI::Win::Errhandler_function* function) { - MPI_Errhandler c_errhandler = + MPI_Errhandler c_errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_WIN, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_CXX); - c_errhandler->eh_cxx_dispatch_fn = + c_errhandler->eh_cxx_dispatch_fn = (ompi_errhandler_cxx_dispatch_fn_t*) ompi_mpi_cxx_win_errhandler_invoke; return c_errhandler; @@ -57,7 +57,7 @@ MPI::Win::do_create_keyval(MPI_Win_copy_attr_function* c_copy_fn, // If both the callbacks are C, then do the simple thing -- no // need for all the C++ machinery. if (NULL != c_copy_fn && NULL != c_delete_fn) { - copy_fn.attr_win_copy_fn = + copy_fn.attr_win_copy_fn = (MPI_Win_internal_copy_attr_function*) c_copy_fn; delete_fn.attr_win_delete_fn = c_delete_fn; ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, delete_fn, @@ -75,10 +75,10 @@ MPI::Win::do_create_keyval(MPI_Win_copy_attr_function* c_copy_fn, // extra_state for the delete callback), we have to use the C++ // callbacks for both (and therefore translate the C++-special // extra_state into the user's original extra_state). - cxx_extra_state = (keyval_intercept_data_t*) + cxx_extra_state = (keyval_intercept_data_t*) malloc(sizeof(keyval_intercept_data_t)); if (NULL == cxx_extra_state) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, "MPI::Win::Create_keyval"); } cxx_extra_state->c_copy_fn = c_copy_fn; @@ -102,7 +102,7 @@ MPI::Win::do_create_keyval(MPI_Win_copy_attr_function* c_copy_fn, } if (2 != count) { free(cxx_extra_state); - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, "MPI::Win::Create_keyval"); } @@ -117,7 +117,7 @@ MPI::Win::do_create_keyval(MPI_Win_copy_attr_function* c_copy_fn, // created). copy_fn.attr_win_copy_fn = - (MPI_Win_internal_copy_attr_function*) + (MPI_Win_internal_copy_attr_function*) ompi_mpi_cxx_win_copy_attr_intercept; delete_fn.attr_win_delete_fn = ompi_mpi_cxx_win_delete_attr_intercept; diff --git a/ompi/mpi/cxx/win.h b/ompi/mpi/cxx/win.h index a1dee15c16a..8c3b0bb1be1 100644 --- a/ompi/mpi/cxx/win.h +++ b/ompi/mpi/cxx/win.h @@ -6,16 +6,16 @@ // 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, +// 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) 2006-2009 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -59,7 +59,7 @@ class Win { Win(const Win& data) : mpi_win(data.mpi_win) { } Win(MPI_Win i) : mpi_win(i) { } - + virtual ~Win() { } Win& operator=(const Win& data) { @@ -78,17 +78,17 @@ class Win { // // User defined functions // - typedef int Copy_attr_function(const Win& oldwin, int win_keyval, - void* extra_state, void* attribute_val_in, - void* attribute_val_out, bool& flag); - - typedef int Delete_attr_function(Win& win, int win_keyval, - void* attribute_val, void* extra_state); - + typedef int Copy_attr_function(const Win& oldwin, int win_keyval, + void* extra_state, void* attribute_val_in, + void* attribute_val_out, bool& flag); + + typedef int Delete_attr_function(Win& win, int win_keyval, + void* attribute_val, void* extra_state); + typedef void Errhandler_function(Win &, int *, ... ); typedef Errhandler_function Errhandler_fn __mpi_interface_deprecated__("MPI::Win::Errhandler_fn was deprecated in MPI-2.2; use MPI::Win::Errhandler_function instead"); - + // // Errhandler // @@ -96,73 +96,73 @@ class Win { virtual void Set_errhandler(const MPI::Errhandler& errhandler) const; - virtual MPI::Errhandler Get_errhandler() const; + virtual MPI::Errhandler Get_errhandler() const; // // One sided communication // - virtual void Accumulate(const void* origin_addr, int origin_count, - const MPI::Datatype& origin_datatype, - int target_rank, MPI::Aint target_disp, - int target_count, - const MPI::Datatype& target_datatype, + virtual void Accumulate(const void* origin_addr, int origin_count, + const MPI::Datatype& origin_datatype, + int target_rank, MPI::Aint target_disp, + int target_count, + const MPI::Datatype& target_datatype, const MPI::Op& op) const; - + virtual void Complete() const; - - static Win Create(const void* base, MPI::Aint size, int disp_unit, + + static Win Create(const void* base, MPI::Aint size, int disp_unit, const MPI::Info& info, const MPI::Intracomm& comm); - + virtual void Fence(int assert) const; - - virtual void Free(); - - virtual void Get(const void *origin_addr, int origin_count, - const MPI::Datatype& origin_datatype, int target_rank, - MPI::Aint target_disp, int target_count, + + virtual void Free(); + + virtual void Get(const void *origin_addr, int origin_count, + const MPI::Datatype& origin_datatype, int target_rank, + MPI::Aint target_disp, int target_count, const MPI::Datatype& target_datatype) const; - - virtual MPI::Group Get_group() const; + + virtual MPI::Group Get_group() const; virtual void Lock(int lock_type, int rank, int assert) const; - + virtual void Post(const MPI::Group& group, int assert) const; - - virtual void Put(const void* origin_addr, int origin_count, - const MPI::Datatype& origin_datatype, int target_rank, - MPI::Aint target_disp, int target_count, + + virtual void Put(const void* origin_addr, int origin_count, + const MPI::Datatype& origin_datatype, int target_rank, + MPI::Aint target_disp, int target_count, const MPI::Datatype& target_datatype) const; - - virtual void Start(const MPI::Group& group, int assert) const; - + + virtual void Start(const MPI::Group& group, int assert) const; + virtual bool Test() const; virtual void Unlock(int rank) const; - + virtual void Wait() const; - + // // External Interfaces // virtual void Call_errhandler(int errorcode) const; - + // Need 4 overloaded versions of this function because per the // MPI-2 spec, you can mix-n-match the C predefined functions with // C++ functions. - static int Create_keyval(Copy_attr_function* win_copy_attr_fn, - Delete_attr_function* win_delete_attr_fn, + static int Create_keyval(Copy_attr_function* win_copy_attr_fn, + Delete_attr_function* win_delete_attr_fn, void* extra_state); - static int Create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, - MPI_Win_delete_attr_function* win_delete_attr_fn, + static int Create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, + MPI_Win_delete_attr_function* win_delete_attr_fn, void* extra_state); - static int Create_keyval(Copy_attr_function* win_copy_attr_fn, - MPI_Win_delete_attr_function* win_delete_attr_fn, + static int Create_keyval(Copy_attr_function* win_copy_attr_fn, + MPI_Win_delete_attr_function* win_delete_attr_fn, void* extra_state); - static int Create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, - Delete_attr_function* win_delete_attr_fn, + static int Create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, + Delete_attr_function* win_delete_attr_fn, void* extra_state); - + protected: // Back-end function to do the heavy lifting for creating the // keyval @@ -174,20 +174,20 @@ class Win { public: virtual void Delete_attr(int win_keyval); - - static void Free_keyval(int& win_keyval); - + + static void Free_keyval(int& win_keyval); + // version 1: pre-errata Get_attr (not correct, but probably nice to support bool Get_attr(const Win& win, int win_keyval, void* attribute_val) const; // version 2: post-errata Get_attr (correct, but no one seems to know about it) bool Get_attr(int win_keyval, void* attribute_val) const; - + virtual void Get_name(char* win_name, int& resultlen) const; - + virtual void Set_attr(int win_keyval, const void* attribute_val); - + virtual void Set_name(const char* win_name); // Data that is passed through keyval create when C++ callback @@ -202,7 +202,7 @@ class Win { // Protect the global list from multiple thread access static opal_mutex_t cxx_extra_states_lock; - + protected: #if 0 /* OMPI_ENABLE_MPI_PROFILING */ PMPI::Win pmpi_win; diff --git a/ompi/mpi/cxx/win_inln.h b/ompi/mpi/cxx/win_inln.h index 1a6d94b5d0b..d8901967233 100644 --- a/ompi/mpi/cxx/win_inln.h +++ b/ompi/mpi/cxx/win_inln.h @@ -6,16 +6,16 @@ // 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, +// 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) 2007-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ -// +// // Additional copyrights may follow -// +// // $HEADER$ // @@ -26,8 +26,8 @@ // -inline MPI::Errhandler -MPI::Win:: Get_errhandler() const +inline MPI::Errhandler +MPI::Win:: Get_errhandler() const { MPI_Errhandler errhandler; MPI_Win_get_errhandler(mpi_win, &errhandler); @@ -35,7 +35,7 @@ MPI::Win:: Get_errhandler() const } -inline void +inline void MPI::Win::Set_errhandler(const MPI::Errhandler& errhandler) const { (void)MPI_Win_set_errhandler(mpi_win, errhandler); @@ -47,31 +47,31 @@ MPI::Win::Set_errhandler(const MPI::Errhandler& errhandler) const // -inline void +inline void MPI::Win::Accumulate(const void* origin_addr, int origin_count, const MPI::Datatype& origin_datatype, int target_rank, MPI::Aint target_disp, int target_count, const MPI::Datatype& target_datatype, - const MPI::Op& op) const + const MPI::Op& op) const { (void) MPI_Accumulate(const_cast(origin_addr), origin_count, origin_datatype, - target_rank, target_disp, target_count, + target_rank, target_disp, target_count, target_datatype, op, mpi_win); - + } inline void -MPI::Win::Complete() const +MPI::Win::Complete() const { (void) MPI_Win_complete(mpi_win); } -inline MPI::Win -MPI::Win::Create(const void* base, MPI::Aint size, - int disp_unit, const MPI::Info& info, - const MPI::Intracomm& comm) +inline MPI::Win +MPI::Win::Create(const void* base, MPI::Aint size, + int disp_unit, const MPI::Info& info, + const MPI::Intracomm& comm) { MPI_Win newwin; (void) MPI_Win_create(const_cast(base), size, disp_unit, info, comm, &newwin); @@ -79,28 +79,28 @@ MPI::Win::Create(const void* base, MPI::Aint size, } -inline void -MPI::Win::Fence(int assert) const +inline void +MPI::Win::Fence(int assert) const { (void) MPI_Win_fence(assert, mpi_win); } -inline void -MPI::Win::Get(const void *origin_addr, int origin_count, - const MPI::Datatype& origin_datatype, - int target_rank, MPI::Aint target_disp, - int target_count, - const MPI::Datatype& target_datatype) const +inline void +MPI::Win::Get(const void *origin_addr, int origin_count, + const MPI::Datatype& origin_datatype, + int target_rank, MPI::Aint target_disp, + int target_count, + const MPI::Datatype& target_datatype) const { (void) MPI_Get(const_cast(origin_addr), origin_count, origin_datatype, - target_rank, target_disp, + target_rank, target_disp, target_count, target_datatype, mpi_win); } -inline MPI::Group +inline MPI::Group MPI::Win::Get_group() const { MPI_Group mpi_group; @@ -109,59 +109,59 @@ MPI::Win::Get_group() const } -inline void -MPI::Win::Lock(int lock_type, int rank, int assert) const +inline void +MPI::Win::Lock(int lock_type, int rank, int assert) const { (void) MPI_Win_lock(lock_type, rank, assert, mpi_win); } -inline void -MPI::Win::Post(const MPI::Group& group, int assert) const +inline void +MPI::Win::Post(const MPI::Group& group, int assert) const { (void) MPI_Win_post(group, assert, mpi_win); } -inline void -MPI::Win::Put(const void* origin_addr, int origin_count, - const MPI::Datatype& origin_datatype, - int target_rank, MPI::Aint target_disp, - int target_count, - const MPI::Datatype& target_datatype) const +inline void +MPI::Win::Put(const void* origin_addr, int origin_count, + const MPI::Datatype& origin_datatype, + int target_rank, MPI::Aint target_disp, + int target_count, + const MPI::Datatype& target_datatype) const { - (void) MPI_Put(const_cast(origin_addr), origin_count, origin_datatype, + (void) MPI_Put(const_cast(origin_addr), origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, mpi_win); - + } -inline void +inline void MPI::Win::Start(const MPI::Group& group, int assert) const { (void) MPI_Win_start(group, assert, mpi_win); } -inline bool +inline bool MPI::Win::Test() const { int flag; MPI_Win_test(mpi_win, &flag); return OPAL_INT_TO_BOOL(flag); - + } -inline void +inline void MPI::Win::Unlock(int rank) const { (void) MPI_Win_unlock(rank, mpi_win); } -inline void +inline void MPI::Win::Wait() const { (void) MPI_Win_wait(mpi_win); @@ -172,7 +172,7 @@ MPI::Win::Wait() const // External Interfaces // -inline void +inline void MPI::Win::Call_errhandler(int errorcode) const { (void) MPI_Win_call_errhandler(mpi_win, errorcode); @@ -182,12 +182,12 @@ MPI::Win::Call_errhandler(int errorcode) const // functions inline int MPI::Win::Create_keyval(MPI::Win::Copy_attr_function* win_copy_attr_fn, - MPI::Win::Delete_attr_function* win_delete_attr_fn, + MPI::Win::Delete_attr_function* win_delete_attr_fn, void* extra_state) { // Back-end function does the heavy lifting int ret, keyval; - ret = do_create_keyval(NULL, NULL, + ret = do_create_keyval(NULL, NULL, win_copy_attr_fn, win_delete_attr_fn, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; @@ -197,13 +197,13 @@ MPI::Win::Create_keyval(MPI::Win::Copy_attr_function* win_copy_attr_fn, // functions inline int MPI::Win::Create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, - MPI_Win_delete_attr_function* win_delete_attr_fn, + MPI_Win_delete_attr_function* win_delete_attr_fn, void* extra_state) { // Back-end function does the heavy lifting int ret, keyval; ret = do_create_keyval(win_copy_attr_fn, win_delete_attr_fn, - NULL, NULL, + NULL, NULL, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; } @@ -218,7 +218,7 @@ MPI::Win::Create_keyval(MPI::Win::Copy_attr_function* win_copy_attr_fn, // Back-end function does the heavy lifting int ret, keyval; ret = do_create_keyval(NULL, win_delete_attr_fn, - win_copy_attr_fn, NULL, + win_copy_attr_fn, NULL, extra_state, keyval); return (MPI_SUCCESS == ret) ? keyval : ret; } @@ -238,14 +238,14 @@ MPI::Win::Create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, return (MPI_SUCCESS == ret) ? keyval : ret; } -inline void -MPI::Win::Delete_attr(int win_keyval) +inline void +MPI::Win::Delete_attr(int win_keyval) { (void) MPI_Win_delete_attr(mpi_win, win_keyval); } -inline void +inline void MPI::Win::Free_keyval(int& win_keyval) { (void) MPI_Win_free_keyval(&win_keyval); @@ -264,7 +264,7 @@ MPI::Win::Get_attr(const Win& win, int win_keyval, // version 2: post-errata Get_attr (correct, but no one seems to know about it) -inline bool +inline bool MPI::Win::Get_attr(int win_keyval, void* attribute_val) const { int ret; @@ -273,22 +273,22 @@ MPI::Win::Get_attr(int win_keyval, void* attribute_val) const } -inline void +inline void MPI::Win::Get_name(char* win_name, int& resultlen) const { (void) MPI_Win_get_name(mpi_win, win_name, &resultlen); } -inline void -MPI::Win::Set_attr(int win_keyval, const void* attribute_val) +inline void +MPI::Win::Set_attr(int win_keyval, const void* attribute_val) { (void) MPI_Win_set_attr(mpi_win, win_keyval, const_cast(attribute_val)); } -inline void -MPI::Win::Set_name(const char* win_name) +inline void +MPI::Win::Set_name(const char* win_name) { (void) MPI_Win_set_name(mpi_win, const_cast(win_name)); } diff --git a/ompi/mpi/fortran/base/Makefile.am b/ompi/mpi/fortran/base/Makefile.am index 6eb1987bd04..35738b27a40 100644 --- a/ompi/mpi/fortran/base/Makefile.am +++ b/ompi/mpi/fortran/base/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/fortran/base/attr_fn_f.c b/ompi/mpi/fortran/base/attr_fn_f.c index 2b4aa3d964c..efdb8238aca 100644 --- a/ompi/mpi/fortran/base/attr_fn_f.c +++ b/ompi/mpi/fortran/base/attr_fn_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -175,7 +175,7 @@ OMPI_GENERATE_F77_BINDINGS( MPI_WIN_DUP_FN, * Note that in this file, we invoke OMPI_C_ rather than * , where is MPI_DUP_FN (and all the rest). * Specifically: - * + * * MPI_NULL_DELETE_FN -> OMPI_C_MPI_NULL_DELETE_FN * MPI_NULL_COPY_FN -> OMPI_C_MPI_NULL_COPY_FN * MPI_DUP_FN -> OMPI_C_MPI_DUP_FN @@ -195,15 +195,15 @@ OMPI_GENERATE_F77_BINDINGS( MPI_WIN_DUP_FN, * The reason why is discussed in a lengthy comment in mpi.h. */ void ompi_type_null_delete_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_out, MPI_Aint* extra_state, MPI_Fint* ierr) { *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_type_null_copy_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, +void ompi_type_null_copy_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, MPI_Aint* extra_state, - MPI_Aint* attribute_val_in, + MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { @@ -211,10 +211,10 @@ void ompi_type_null_copy_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_type_dup_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, +void ompi_type_dup_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, MPI_Aint* extra_state, - MPI_Aint* attribute_val_in, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_in, + MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr ) { *flag = (ompi_fortran_logical_t) 1; @@ -223,26 +223,26 @@ void ompi_type_dup_fn_f(MPI_Fint* type, MPI_Fint* type_keyval, } void ompi_comm_null_delete_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_out, MPI_Aint* extra_state, MPI_Fint* ierr) { *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_comm_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, +void ompi_comm_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, - MPI_Aint* attribute_val_in, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_in, + MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { *flag = (ompi_fortran_logical_t) 0; *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_comm_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, +void ompi_comm_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, - MPI_Aint* attribute_val_in, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_in, + MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { *flag = (ompi_fortran_logical_t) 1; @@ -251,16 +251,16 @@ void ompi_comm_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, } void ompi_null_delete_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, - MPI_Fint* attribute_val_out, + MPI_Fint* attribute_val_out, MPI_Fint* extra_state, MPI_Fint* ierr) { *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, +void ompi_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Fint* extra_state, - MPI_Fint* attribute_val_in, - MPI_Fint* attribute_val_out, + MPI_Fint* attribute_val_in, + MPI_Fint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { *flag = (ompi_fortran_logical_t) 0; @@ -268,10 +268,10 @@ void ompi_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, } -void ompi_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, +void ompi_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Fint* extra_state, - MPI_Fint* attribute_val_in, - MPI_Fint* attribute_val_out, + MPI_Fint* attribute_val_in, + MPI_Fint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { *flag = (ompi_fortran_logical_t) 1; @@ -280,26 +280,26 @@ void ompi_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval, } void ompi_win_null_delete_fn_f(MPI_Fint* window, MPI_Fint* win_keyval, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_out, MPI_Aint* extra_state, MPI_Fint* ierr) { *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_win_null_copy_fn_f(MPI_Fint* window, MPI_Fint* win_keyval, +void ompi_win_null_copy_fn_f(MPI_Fint* window, MPI_Fint* win_keyval, MPI_Aint* extra_state, - MPI_Aint* attribute_val_in, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_in, + MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { *flag = (ompi_fortran_logical_t) 0; *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); } -void ompi_win_dup_fn_f(MPI_Fint* window, MPI_Fint* win_keyval, +void ompi_win_dup_fn_f(MPI_Fint* window, MPI_Fint* win_keyval, MPI_Aint* extra_state, - MPI_Aint* attribute_val_in, - MPI_Aint* attribute_val_out, + MPI_Aint* attribute_val_in, + MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr) { *flag = (ompi_fortran_logical_t) 1; diff --git a/ompi/mpi/fortran/base/constants.h b/ompi/mpi/fortran/base/constants.h index 984ebcadebc..6e5f54918fd 100644 --- a/ompi/mpi/fortran/base/constants.h +++ b/ompi/mpi/fortran/base/constants.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -30,7 +30,7 @@ /* * Several variables are used to link against MPI F77 constants which * correspond to addresses, e.g. MPI_BOTTOM, and are implemented via - * common blocks. + * common blocks. * * We use common blocks so that in the C wrapper functions, we can * compare the address that comes in against known addresses (e.g., if diff --git a/ompi/mpi/fortran/base/conversion_fn_null_f.c b/ompi/mpi/fortran/base/conversion_fn_null_f.c index 67e718bcab6..9e83f03e699 100644 --- a/ompi/mpi/fortran/base/conversion_fn_null_f.c +++ b/ompi/mpi/fortran/base/conversion_fn_null_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -58,10 +58,10 @@ OMPI_GENERATE_F77_BINDINGS(MPI_CONVERSION_FN_NULL, #endif -void mpi_conversion_fn_null_f(char *userbuf, MPI_Fint *datatype, - MPI_Fint *count, char *filebuf, - MPI_Offset *position, - MPI_Aint *extra_state, +void mpi_conversion_fn_null_f(char *userbuf, MPI_Fint *datatype, + MPI_Fint *count, char *filebuf, + MPI_Offset *position, + MPI_Aint *extra_state, MPI_Fint *ierr) { /* Per MPI-2:9.5.3, this function will never be called; it's only diff --git a/ompi/mpi/fortran/base/datarep.h b/ompi/mpi/fortran/base/datarep.h index 0a0efaa1c0e..7e57468c53b 100644 --- a/ompi/mpi/fortran/base/datarep.h +++ b/ompi/mpi/fortran/base/datarep.h @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -41,21 +41,21 @@ BEGIN_C_DECLS -/** +/** * Function typedef for the conversion function pointer in * MPI_REGISTER_DATAREP */ typedef void (ompi_mpi2_fortran_datarep_conversion_fn_t) - (char *userbuf, MPI_Fint *datatype, MPI_Fint *count, char *filebuf, + (char *userbuf, MPI_Fint *datatype, MPI_Fint *count, char *filebuf, MPI_Offset *position, MPI_Aint *extra_state, MPI_Fint *ierr); -/** +/** * Function typedef for the extent function pointer in * MPI_REGISTER_DATAREP */ typedef void (ompi_mpi2_fortran_datarep_extent_fn_t) - (MPI_Fint *datatype, MPI_Aint *extent, MPI_Aint *extra_state, + (MPI_Fint *datatype, MPI_Aint *extent, MPI_Aint *extra_state, MPI_Fint *ierr); -/** +/** * Macro for declaring each of the 5 back-end Fortran functions for * MPI_CONVERSION_FN_NULL. We need the 4 fortran compiler convetions * and 1 for the "real" back-end function (even though these functions @@ -79,7 +79,7 @@ OMPI_DATAREP_FORTRAN_DECLARE(mpi_conversion_fn_null, MPI_CONVERSION_FN_NULL, (ch space */ #undef OMPI_DATAREP_FORTRAN_DECLARE -/** +/** * Declare the test macro in all of its forms. This macro provides a * convenient way to check whether an argument is the sentinel value * MPI_CONVERSION_FN_NULL. diff --git a/ompi/mpi/fortran/base/f90_accessors.c b/ompi/mpi/fortran/base/f90_accessors.c index 3e82b46afa3..23ca01c9934 100644 --- a/ompi/mpi/fortran/base/f90_accessors.c +++ b/ompi/mpi/fortran/base/f90_accessors.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/base/fint_2_int.h b/ompi/mpi/fortran/base/fint_2_int.h index d44cf2cdc3d..5971694eb9b 100644 --- a/ompi/mpi/fortran/base/fint_2_int.h +++ b/ompi/mpi/fortran/base/fint_2_int.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,7 +27,7 @@ #include -/* +/* * Define MACROS to take account of different size of MPI_Fint from int */ @@ -40,9 +40,9 @@ #define OMPI_INT_2_FINT(a) a #define OMPI_FINT_2_INT(a) a #define OMPI_PFINT_2_PINT(a) a - #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) + #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) #define OMPI_ARRAY_FINT_2_INT(in, n) - #define OMPI_2_DIM_ARRAY_FINT_2_INT(in, n, dim2) + #define OMPI_2_DIM_ARRAY_FINT_2_INT(in, n, dim2) #define OMPI_ARRAY_FINT_2_INT_CLEANUP(in) #define OMPI_SINGLE_FINT_2_INT(in) #define OMPI_SINGLE_INT_2_FINT(in) diff --git a/ompi/mpi/fortran/base/strings.c b/ompi/mpi/fortran/base/strings.c index a63fa0dc390..1db122711b5 100644 --- a/ompi/mpi/fortran/base/strings.c +++ b/ompi/mpi/fortran/base/strings.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -102,7 +102,7 @@ int ompi_fortran_string_c2f(char *cstr, char *fstr, int len) * creates a C argument vector from an F77 array of strings * (terminated by a blank string) */ -int ompi_fortran_argv_f2c(char *array, int string_len, int advance, +int ompi_fortran_argv_f2c(char *array, int string_len, int advance, char ***argv) { int err, argc = 0; @@ -113,7 +113,7 @@ int ompi_fortran_argv_f2c(char *array, int string_len, int advance, *argv = NULL; while (1) { - if (OMPI_SUCCESS != (err = ompi_fortran_string_f2c(array, string_len, + if (OMPI_SUCCESS != (err = ompi_fortran_string_f2c(array, string_len, &cstr))) { opal_argv_free(*argv); return err; @@ -142,7 +142,7 @@ int ompi_fortran_argv_f2c(char *array, int string_len, int advance, * Creates a set of C argv arrays from an F77 array of argv's. The * returned arrays need to be freed by the caller. */ -int ompi_fortran_multiple_argvs_f2c(int num_argv_arrays, char *array, +int ompi_fortran_multiple_argvs_f2c(int num_argv_arrays, char *array, int string_len, char ****argv) { char ***argv_array; @@ -153,7 +153,7 @@ int ompi_fortran_multiple_argvs_f2c(int num_argv_arrays, char *array, argv_array = (char ***) malloc (num_argv_arrays * sizeof(char **)); for (i = 0; i < num_argv_arrays; ++i) { - ret = ompi_fortran_argv_f2c(current_array, string_len, + ret = ompi_fortran_argv_f2c(current_array, string_len, string_len * num_argv_arrays, &argv_array[i]); if (OMPI_SUCCESS != ret) { diff --git a/ompi/mpi/fortran/base/strings.h b/ompi/mpi/fortran/base/strings.h index d15a11bea57..98c3c868847 100644 --- a/ompi/mpi/fortran/base/strings.h +++ b/ompi/mpi/fortran/base/strings.h @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ BEGIN_C_DECLS * * @param fstr Fortran string * @param len Fortran string length - * @param cstr Pointer to C string that will be created and returned + * @param cstr Pointer to C string that will be created and returned * * @retval OMPI_SUCCESS upon success * @retval OMPI_ERROR upon error @@ -86,7 +86,7 @@ BEGIN_C_DECLS * number_of_argv_arrays). Hence, the advance parameter is used * to specify this displacement. */ - OMPI_DECLSPEC int ompi_fortran_argv_f2c(char *farray, int string_len, + OMPI_DECLSPEC int ompi_fortran_argv_f2c(char *farray, int string_len, int advancex, char ***cargv); /** diff --git a/ompi/mpi/fortran/base/test_constants_f.c b/ompi/mpi/fortran/base/test_constants_f.c index 8c2ba2491fd..59a5630fabb 100644 --- a/ompi/mpi/fortran/base/test_constants_f.c +++ b/ompi/mpi/fortran/base/test_constants_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/configure-fortran-output-bottom.h b/ompi/mpi/fortran/configure-fortran-output-bottom.h index d79151b5b5c..895f0496d7f 100644 --- a/ompi/mpi/fortran/configure-fortran-output-bottom.h +++ b/ompi/mpi/fortran/configure-fortran-output-bottom.h @@ -7,7 +7,7 @@ ! $COPYRIGHT$ ! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/configure-fortran-output.h.in b/ompi/mpi/fortran/configure-fortran-output.h.in index 5ef9848cbc9..9f40f5344f3 100644 --- a/ompi/mpi/fortran/configure-fortran-output.h.in +++ b/ompi/mpi/fortran/configure-fortran-output.h.in @@ -7,7 +7,7 @@ ! $COPYRIGHT$ ! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/mpiext/Makefile.am b/ompi/mpi/fortran/mpiext/Makefile.am index 879e7f018ab..542e7d47e19 100644 --- a/ompi/mpi/fortran/mpiext/Makefile.am +++ b/ompi/mpi/fortran/mpiext/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index cfcee816fb5..9f0db660463 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -17,9 +17,9 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -29,7 +29,7 @@ SUBDIRS = profile # # OMPI_PRPOFILING_DEFINES flag is enabled when we want our MPI_* symbols -# to be replaced by PMPI_*. In other words, this flag decides +# to be replaced by PMPI_*. In other words, this flag decides # whether "profile/defines.h" is included or not. "profile/defines.h" # replaces all MPI_* symbols with PMPI_* symbols. In this directory, # we need it to be 0 diff --git a/ompi/mpi/fortran/mpif-h/abort_f.c b/ompi/mpi/fortran/mpif-h/abort_f.c index c28ff5c284b..1b0917b1057 100644 --- a/ompi/mpi/fortran/mpif-h/abort_f.c +++ b/ompi/mpi/fortran/mpif-h/abort_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ void ompi_abort_f(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ierr) { int ierr_c; MPI_Comm c_comm = MPI_Comm_f2c(*comm); - + ierr_c = MPI_Abort(c_comm, OMPI_FINT_2_INT(*errorcode)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c); } diff --git a/ompi/mpi/fortran/mpif-h/accumulate_f.c b/ompi/mpi/fortran/mpif-h/accumulate_f.c index 643167f1dce..28311886b27 100644 --- a/ompi/mpi/fortran/mpif-h/accumulate_f.c +++ b/ompi/mpi/fortran/mpif-h/accumulate_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -79,9 +79,9 @@ void ompi_accumulate_f(char *origin_addr, MPI_Fint *origin_count, MPI_Win c_win = MPI_Win_f2c(*win); MPI_Op c_op = MPI_Op_f2c(*op); - ierr_c = MPI_Accumulate(OMPI_F2C_BOTTOM(origin_addr), + ierr_c = MPI_Accumulate(OMPI_F2C_BOTTOM(origin_addr), OMPI_FINT_2_INT(*origin_count), - c_origin_datatype, + c_origin_datatype, OMPI_FINT_2_INT(*target_rank), *target_disp, OMPI_FINT_2_INT(*target_count), diff --git a/ompi/mpi/fortran/mpif-h/add_error_class_f.c b/ompi/mpi/fortran/mpif-h/add_error_class_f.c index 6c791d270ce..703e08dc7b2 100644 --- a/ompi/mpi/fortran/mpif-h/add_error_class_f.c +++ b/ompi/mpi/fortran/mpif-h/add_error_class_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/add_error_code_f.c b/ompi/mpi/fortran/mpif-h/add_error_code_f.c index e0d66e14432..a16229a1b2d 100644 --- a/ompi/mpi/fortran/mpif-h/add_error_code_f.c +++ b/ompi/mpi/fortran/mpif-h/add_error_code_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/add_error_string_f.c b/ompi/mpi/fortran/mpif-h/add_error_string_f.c index 3c3f112ceb3..65b50e9fc0d 100644 --- a/ompi/mpi/fortran/mpif-h/add_error_string_f.c +++ b/ompi/mpi/fortran/mpif-h/add_error_string_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/address_f.c b/ompi/mpi/fortran/mpif-h/address_f.c index e0128f265ab..2677bbbf67f 100644 --- a/ompi/mpi/fortran/mpif-h/address_f.c +++ b/ompi/mpi/fortran/mpif-h/address_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/allgather_f.c b/ompi/mpi/fortran/mpif-h/allgather_f.c index c426d422cd8..de585b46557 100644 --- a/ompi/mpi/fortran/mpif-h/allgather_f.c +++ b/ompi/mpi/fortran/mpif-h/allgather_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -83,7 +83,7 @@ void ompi_allgather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, ierr_c = MPI_Allgather(sendbuf, OMPI_FINT_2_INT(*sendcount), - c_sendtype, + c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, c_comm); diff --git a/ompi/mpi/fortran/mpif-h/allgatherv_f.c b/ompi/mpi/fortran/mpif-h/allgatherv_f.c index d31ef314036..37ff4f41b65 100644 --- a/ompi/mpi/fortran/mpif-h/allgatherv_f.c +++ b/ompi/mpi/fortran/mpif-h/allgatherv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/allreduce_f.c b/ompi/mpi/fortran/mpif-h/allreduce_f.c index 81cae296d65..c119c0af36a 100644 --- a/ompi/mpi/fortran/mpif-h/allreduce_f.c +++ b/ompi/mpi/fortran/mpif-h/allreduce_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/alltoall_f.c b/ompi/mpi/fortran/mpif-h/alltoall_f.c index 2a37ab4c29c..88393d8e2a0 100644 --- a/ompi/mpi/fortran/mpif-h/alltoall_f.c +++ b/ompi/mpi/fortran/mpif-h/alltoall_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -83,8 +83,8 @@ void ompi_alltoall_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, c_ierr = MPI_Alltoall(sendbuf, OMPI_FINT_2_INT(*sendcount), - c_sendtype, - recvbuf, + c_sendtype, + recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/alltoallv_f.c b/ompi/mpi/fortran/mpif-h/alltoallv_f.c index 23900c7ae3d..ebed7efde9e 100644 --- a/ompi/mpi/fortran/mpif-h/alltoallv_f.c +++ b/ompi/mpi/fortran/mpif-h/alltoallv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ALLTOALLV, void ompi_alltoallv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, - MPI_Fint *rdispls, MPI_Fint *recvtype, + MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *ierr) { MPI_Comm c_comm; @@ -92,11 +92,11 @@ void ompi_alltoallv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = MPI_Alltoallv(sendbuf, + c_ierr = MPI_Alltoallv(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), - OMPI_ARRAY_NAME_CONVERT(sdispls), - c_sendtype, - recvbuf, + OMPI_ARRAY_NAME_CONVERT(sdispls), + c_sendtype, + recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(rdispls), c_recvtype, c_comm); diff --git a/ompi/mpi/fortran/mpif-h/alltoallw_f.c b/ompi/mpi/fortran/mpif-h/alltoallw_f.c index fe48f295fbe..7900c96e382 100644 --- a/ompi/mpi/fortran/mpif-h/alltoallw_f.c +++ b/ompi/mpi/fortran/mpif-h/alltoallw_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ALLTOALLW, #endif void ompi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts, - MPI_Fint *sdispls, MPI_Fint *sendtypes, + MPI_Fint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *ierr) @@ -100,11 +100,11 @@ void ompi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts, sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = MPI_Alltoallw(sendbuf, + c_ierr = MPI_Alltoallw(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), OMPI_ARRAY_NAME_CONVERT(sdispls), - c_sendtypes, - recvbuf, + c_sendtypes, + recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(rdispls), c_recvtypes, c_comm); diff --git a/ompi/mpi/fortran/mpif-h/attr_delete_f.c b/ompi/mpi/fortran/mpif-h/attr_delete_f.c index 6c0aefb5a4f..ddf5ed16c16 100644 --- a/ompi/mpi/fortran/mpif-h/attr_delete_f.c +++ b/ompi/mpi/fortran/mpif-h/attr_delete_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/attr_get_f.c b/ompi/mpi/fortran/mpif-h/attr_get_f.c index 4001fa9d764..934609bc3a6 100644 --- a/ompi/mpi/fortran/mpif-h/attr_get_f.c +++ b/ompi/mpi/fortran/mpif-h/attr_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -76,7 +76,7 @@ void ompi_attr_get_f(MPI_Fint *comm, MPI_Fint *keyval, /* This stuff is very confusing. Be sure to see the comment at the top of src/attributes/attributes.c. */ - c_ierr = ompi_attr_get_fortran_mpi1(c_comm->c_keyhash, + c_ierr = ompi_attr_get_fortran_mpi1(c_comm->c_keyhash, OMPI_FINT_2_INT(*keyval), attribute_val, OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag)); diff --git a/ompi/mpi/fortran/mpif-h/attr_put_f.c b/ompi/mpi/fortran/mpif-h/attr_put_f.c index 31838c6b9d7..e0efe50cbce 100644 --- a/ompi/mpi/fortran/mpif-h/attr_put_f.c +++ b/ompi/mpi/fortran/mpif-h/attr_put_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ATTR_PUT, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_attr_put_f(MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, +void ompi_attr_put_f(MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, MPI_Fint *ierr) { int c_err; @@ -78,7 +78,7 @@ void ompi_attr_put_f(MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, c_err = ompi_attr_set_fortran_mpi1(COMM_ATTR, c_comm, &c_comm->c_keyhash, - OMPI_FINT_2_INT(*keyval), + OMPI_FINT_2_INT(*keyval), *attribute_val, false); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_err); diff --git a/ompi/mpi/fortran/mpif-h/barrier_f.c b/ompi/mpi/fortran/mpif-h/barrier_f.c index 870e4a1af18..581cdfedeee 100644 --- a/ompi/mpi/fortran/mpif-h/barrier_f.c +++ b/ompi/mpi/fortran/mpif-h/barrier_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/bcast_f.c b/ompi/mpi/fortran/mpif-h/bcast_f.c index c6d930aa5d2..cbf05981242 100644 --- a/ompi/mpi/fortran/mpif-h/bcast_f.c +++ b/ompi/mpi/fortran/mpif-h/bcast_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_BCAST, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_bcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, +void ompi_bcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr) { int c_ierr; @@ -75,8 +75,8 @@ void ompi_bcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, c_comm = MPI_Comm_f2c(*comm); c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_Bcast(OMPI_F2C_BOTTOM(buffer), - OMPI_FINT_2_INT(*count), + c_ierr = MPI_Bcast(OMPI_F2C_BOTTOM(buffer), + OMPI_FINT_2_INT(*count), c_type, OMPI_FINT_2_INT(*root), c_comm); diff --git a/ompi/mpi/fortran/mpif-h/bindings.h b/ompi/mpi/fortran/mpif-h/bindings.h index 1c7d871793c..fcbc22c1518 100644 --- a/ompi/mpi/fortran/mpif-h/bindings.h +++ b/ompi/mpi/fortran/mpif-h/bindings.h @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -26,9 +26,9 @@ #include "ompi/request/grequest.h" /* - * We now build all four fortran bindings and dont care too much about - * which convention (lowercase, underscore, double underscore or - * all uppercase) is supported by the compiler. The policy now is to + * We now build all four fortran bindings and dont care too much about + * which convention (lowercase, underscore, double underscore or + * all uppercase) is supported by the compiler. The policy now is to * have the ompi_*_f functions be the default symbols and then wrap * the four signature types around it. The macro below achieves this. */ @@ -42,7 +42,7 @@ void upper_case signature { wrapper_function params; } \ void lower_case signature { wrapper_function params; } \ void single_underscore signature { wrapper_function params; } \ - void double_underscore signature { wrapper_function params; } + void double_underscore signature { wrapper_function params; } /* * We maintain 2 separate sets of defines and prototypes. This ensures * that we can build MPI_* bindings or PMPI_* bindings as needed. The diff --git a/ompi/mpi/fortran/mpif-h/bsend_f.c b/ompi/mpi/fortran/mpif-h/bsend_f.c index 692f3ad412d..5493bdd4fdc 100644 --- a/ompi/mpi/fortran/mpif-h/bsend_f.c +++ b/ompi/mpi/fortran/mpif-h/bsend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -72,7 +72,7 @@ void ompi_bsend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest MPI_Datatype c_type = MPI_Type_f2c(*datatype); c_comm = MPI_Comm_f2c (*comm); - + c_ierr = MPI_Bsend(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, OMPI_FINT_2_INT(*dest), OMPI_FINT_2_INT(*tag), c_comm); diff --git a/ompi/mpi/fortran/mpif-h/bsend_init_f.c b/ompi/mpi/fortran/mpif-h/bsend_init_f.c index c0a2cc42213..0af7f66f601 100644 --- a/ompi/mpi/fortran/mpif-h/bsend_init_f.c +++ b/ompi/mpi/fortran/mpif-h/bsend_init_f.c @@ -77,7 +77,7 @@ void ompi_bsend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint c_ierr = MPI_Bsend_init(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, OMPI_FINT_2_INT(*dest), - OMPI_FINT_2_INT(*tag), + OMPI_FINT_2_INT(*tag), c_comm, &c_req); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/buffer_attach_f.c b/ompi/mpi/fortran/mpif-h/buffer_attach_f.c index a946f55e1cd..7ea30ff90e3 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_attach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_attach_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c index 6eaa7f8e64b..cfcbf320e20 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2011-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/cancel_f.c b/ompi/mpi/fortran/mpif-h/cancel_f.c index 33d3baaf2cf..ac267c761e4 100644 --- a/ompi/mpi/fortran/mpif-h/cancel_f.c +++ b/ompi/mpi/fortran/mpif-h/cancel_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/cart_coords_f.c b/ompi/mpi/fortran/mpif-h/cart_coords_f.c index eeb2a6bd171..0706c0d4341 100644 --- a/ompi/mpi/fortran/mpif-h/cart_coords_f.c +++ b/ompi/mpi/fortran/mpif-h/cart_coords_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/cart_create_f.c b/ompi/mpi/fortran/mpif-h/cart_create_f.c index 6a85f86e3ca..ab358e1a441 100644 --- a/ompi/mpi/fortran/mpif-h/cart_create_f.c +++ b/ompi/mpi/fortran/mpif-h/cart_create_f.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/cart_get_f.c b/ompi/mpi/fortran/mpif-h/cart_get_f.c index 3759b0361ca..e779783b643 100644 --- a/ompi/mpi/fortran/mpif-h/cart_get_f.c +++ b/ompi/mpi/fortran/mpif-h/cart_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -81,7 +81,7 @@ void ompi_cart_get_f(MPI_Fint *comm, MPI_Fint *maxdims, MPI_Fint *dims, OMPI_ARRAY_LOGICAL_2_INT_ALLOC(periods, size); c_ierr = MPI_Cart_get(c_comm, - size, + size, OMPI_ARRAY_NAME_CONVERT(dims), OMPI_LOGICAL_ARRAY_NAME_CONVERT(periods), OMPI_ARRAY_NAME_CONVERT(coords)); diff --git a/ompi/mpi/fortran/mpif-h/cart_map_f.c b/ompi/mpi/fortran/mpif-h/cart_map_f.c index 1777c8c6213..7597a782a6b 100644 --- a/ompi/mpi/fortran/mpif-h/cart_map_f.c +++ b/ompi/mpi/fortran/mpif-h/cart_map_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -79,7 +79,7 @@ void ompi_cart_map_f(MPI_Fint *comm, MPI_Fint *ndims, MPI_Fint *dims, OMPI_ARRAY_FINT_2_INT(dims, size); OMPI_ARRAY_LOGICAL_2_INT(periods, size); - c_ierr = MPI_Cart_map(c_comm, + c_ierr = MPI_Cart_map(c_comm, size, OMPI_ARRAY_NAME_CONVERT(dims), OMPI_LOGICAL_ARRAY_NAME_CONVERT(periods), diff --git a/ompi/mpi/fortran/mpif-h/cart_rank_f.c b/ompi/mpi/fortran/mpif-h/cart_rank_f.c index c66865a5c13..f257a08ed19 100644 --- a/ompi/mpi/fortran/mpif-h/cart_rank_f.c +++ b/ompi/mpi/fortran/mpif-h/cart_rank_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,7 +81,7 @@ void ompi_cart_rank_f(MPI_Fint *comm, MPI_Fint *coords, MPI_Fint *rank, } OMPI_ARRAY_FINT_2_INT(coords, ndims); - c_ierr = MPI_Cart_rank(c_comm, + c_ierr = MPI_Cart_rank(c_comm, OMPI_ARRAY_NAME_CONVERT(coords), OMPI_SINGLE_NAME_CONVERT(rank)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/cart_shift_f.c b/ompi/mpi/fortran/mpif-h/cart_shift_f.c index 31252e1aa02..e26fcb362dd 100644 --- a/ompi/mpi/fortran/mpif-h/cart_shift_f.c +++ b/ompi/mpi/fortran/mpif-h/cart_shift_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -75,7 +75,7 @@ void ompi_cart_shift_f(MPI_Fint *comm, MPI_Fint *direction, MPI_Fint *disp, c_comm = MPI_Comm_f2c(*comm); - c_ierr = MPI_Cart_shift(c_comm, + c_ierr = MPI_Cart_shift(c_comm, OMPI_FINT_2_INT(*direction), OMPI_FINT_2_INT(*disp), OMPI_SINGLE_NAME_CONVERT(rank_source), diff --git a/ompi/mpi/fortran/mpif-h/cartdim_get_f.c b/ompi/mpi/fortran/mpif-h/cartdim_get_f.c index 28c706ddde1..d31ba8e2999 100644 --- a/ompi/mpi/fortran/mpif-h/cartdim_get_f.c +++ b/ompi/mpi/fortran/mpif-h/cartdim_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ void ompi_cartdim_get_f(MPI_Fint *comm, MPI_Fint *ndims, MPI_Fint *ierr) int c_ierr; MPI_Comm c_comm; OMPI_SINGLE_NAME_DECL(ndims); - + c_comm = MPI_Comm_f2c(*comm); c_ierr = MPI_Cartdim_get(c_comm, OMPI_SINGLE_NAME_CONVERT(ndims)); diff --git a/ompi/mpi/fortran/mpif-h/close_port_f.c b/ompi/mpi/fortran/mpif-h/close_port_f.c index e2098f56f97..24dad4d1cbc 100644 --- a/ompi/mpi/fortran/mpif-h/close_port_f.c +++ b/ompi/mpi/fortran/mpif-h/close_port_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_accept_f.c b/ompi/mpi/fortran/mpif-h/comm_accept_f.c index f9161f4f27a..028a3c0b544 100644 --- a/ompi/mpi/fortran/mpif-h/comm_accept_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_accept_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,8 +65,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_ACCEPT, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_comm_accept_f(char *port_name, MPI_Fint *info, MPI_Fint *root, - MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, +void ompi_comm_accept_f(char *port_name, MPI_Fint *info, MPI_Fint *root, + MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len) { int c_ierr; @@ -79,8 +79,8 @@ void ompi_comm_accept_f(char *port_name, MPI_Fint *info, MPI_Fint *root, ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name); - c_ierr = MPI_Comm_accept(c_port_name, c_info, - OMPI_FINT_2_INT(*root), + c_ierr = MPI_Comm_accept(c_port_name, c_info, + OMPI_FINT_2_INT(*root), c_comm, &c_new_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_call_errhandler_f.c b/ompi/mpi/fortran/mpif-h/comm_call_errhandler_f.c index 32afd5e760b..efbd1986268 100644 --- a/ompi/mpi/fortran/mpif-h/comm_call_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_call_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_compare_f.c b/ompi/mpi/fortran/mpif-h/comm_compare_f.c index 7efa46b8892..d471d1af206 100644 --- a/ompi/mpi/fortran/mpif-h/comm_compare_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_compare_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_comm_compare_f(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI MPI_Comm c_comm2 = MPI_Comm_f2c(*comm2); OMPI_SINGLE_NAME_DECL(result); - c_ierr = MPI_Comm_compare(c_comm1, c_comm2, + c_ierr = MPI_Comm_compare(c_comm1, c_comm2, OMPI_SINGLE_NAME_CONVERT(result)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_connect_f.c b/ompi/mpi/fortran/mpif-h/comm_connect_f.c index c532bcb82e9..c880c6e413f 100644 --- a/ompi/mpi/fortran/mpif-h/comm_connect_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_connect_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CONNECT, void ompi_comm_connect_f(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, - MPI_Fint *newcomm, MPI_Fint *ierr, + MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len) { int c_ierr; @@ -79,7 +79,7 @@ void ompi_comm_connect_f(char *port_name, MPI_Fint *info, c_info = MPI_Info_f2c(*info); ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name); - c_ierr = MPI_Comm_connect(c_port_name, c_info, + c_ierr = MPI_Comm_connect(c_port_name, c_info, OMPI_FINT_2_INT(*root), c_comm, &c_new_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_create_errhandler_f.c b/ompi/mpi/fortran/mpif-h/comm_create_errhandler_f.c index a327070172f..6e585779a83 100644 --- a/ompi/mpi/fortran/mpif-h/comm_create_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_create_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -73,7 +73,7 @@ void ompi_comm_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t *functio MPI_Fint *errhandler, MPI_Fint *ierr) { int c_ierr; - MPI_Errhandler c_errhandler = + MPI_Errhandler c_errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_COMM, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_FORTRAN); diff --git a/ompi/mpi/fortran/mpif-h/comm_create_f.c b/ompi/mpi/fortran/mpif-h/comm_create_f.c index b1c2be8554c..44af3ea9c6d 100644 --- a/ompi/mpi/fortran/mpif-h/comm_create_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_create_keyval_f.c b/ompi/mpi/fortran/mpif-h/comm_create_keyval_f.c index d0923ee5c0a..4a681593a92 100644 --- a/ompi/mpi/fortran/mpif-h/comm_create_keyval_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_create_keyval_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_delete_attr_f.c b/ompi/mpi/fortran/mpif-h/comm_delete_attr_f.c index 77ef2139335..12b7d291b63 100644 --- a/ompi/mpi/fortran/mpif-h/comm_delete_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_delete_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ void ompi_comm_delete_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, { int c_ierr; MPI_Comm c_comm; - + c_comm = MPI_Comm_f2c(*comm); c_ierr = MPI_Comm_delete_attr(c_comm, OMPI_FINT_2_INT(*comm_keyval)); diff --git a/ompi/mpi/fortran/mpif-h/comm_disconnect_f.c b/ompi/mpi/fortran/mpif-h/comm_disconnect_f.c index 0b6a238dff8..b5b36b7dcb7 100644 --- a/ompi/mpi/fortran/mpif-h/comm_disconnect_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_disconnect_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -70,7 +70,7 @@ void ompi_comm_disconnect_f(MPI_Fint *comm, MPI_Fint *ierr) MPI_Comm c_comm; c_comm = MPI_Comm_f2c(*comm); - + c_ierr = MPI_Comm_disconnect(&c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_dup_f.c b/ompi/mpi/fortran/mpif-h/comm_dup_f.c index 0bf1ff8b917..a6149e2661b 100644 --- a/ompi/mpi/fortran/mpif-h/comm_dup_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_dup_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ void ompi_comm_dup_f(MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr) int c_ierr; MPI_Comm c_newcomm; MPI_Comm c_comm = MPI_Comm_f2c(*comm); - + c_ierr = MPI_Comm_dup(c_comm, &c_newcomm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_free_f.c b/ompi/mpi/fortran/mpif-h/comm_free_f.c index 54b9d069e59..69d72ac3238 100644 --- a/ompi/mpi/fortran/mpif-h/comm_free_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_free_keyval_f.c b/ompi/mpi/fortran/mpif-h/comm_free_keyval_f.c index 1d9634925b6..c7a64c5a2a6 100644 --- a/ompi/mpi/fortran/mpif-h/comm_free_keyval_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_free_keyval_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_get_attr_f.c b/ompi/mpi/fortran/mpif-h/comm_get_attr_f.c index 3465c589012..d74495c7109 100644 --- a/ompi/mpi/fortran/mpif-h/comm_get_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_get_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_get_errhandler_f.c b/ompi/mpi/fortran/mpif-h/comm_get_errhandler_f.c index 0cc8a17bad1..e60bbefd67d 100644 --- a/ompi/mpi/fortran/mpif-h/comm_get_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_get_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_get_info_f.c b/ompi/mpi/fortran/mpif-h/comm_get_info_f.c index 1cfd8bde3ae..95d34db40ba 100644 --- a/ompi/mpi/fortran/mpif-h/comm_get_info_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_get_info_f.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_get_name_f.c b/ompi/mpi/fortran/mpif-h/comm_get_name_f.c index 836a110cb87..e179e155f2f 100644 --- a/ompi/mpi/fortran/mpif-h/comm_get_name_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_get_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_get_parent_f.c b/ompi/mpi/fortran/mpif-h/comm_get_parent_f.c index 925865b6f1a..03de43cdca9 100644 --- a/ompi/mpi/fortran/mpif-h/comm_get_parent_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_get_parent_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_group_f.c b/ompi/mpi/fortran/mpif-h/comm_group_f.c index 84527eec154..777552e80bb 100644 --- a/ompi/mpi/fortran/mpif-h/comm_group_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_group_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ void ompi_comm_group_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr) int c_ierr; MPI_Group c_group; MPI_Comm c_comm = MPI_Comm_f2c( *comm ); - + c_ierr = MPI_Comm_group( c_comm, &c_group); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_join_f.c b/ompi/mpi/fortran/mpif-h/comm_join_f.c index d913ac519c7..6e43696ab0b 100644 --- a/ompi/mpi/fortran/mpif-h/comm_join_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_join_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_rank_f.c b/ompi/mpi/fortran/mpif-h/comm_rank_f.c index 576d5083639..227be10a483 100644 --- a/ompi/mpi/fortran/mpif-h/comm_rank_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_rank_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_remote_group_f.c b/ompi/mpi/fortran/mpif-h/comm_remote_group_f.c index 9f87441ef13..a420de4558b 100644 --- a/ompi/mpi/fortran/mpif-h/comm_remote_group_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_remote_group_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_remote_size_f.c b/ompi/mpi/fortran/mpif-h/comm_remote_size_f.c index e64095a34ef..9b2e8a82a89 100644 --- a/ompi/mpi/fortran/mpif-h/comm_remote_size_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_remote_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_set_attr_f.c b/ompi/mpi/fortran/mpif-h/comm_set_attr_f.c index b1887cbe30a..b2e9f142eb6 100644 --- a/ompi/mpi/fortran/mpif-h/comm_set_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_set_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,14 +71,14 @@ void ompi_comm_set_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, { int c_ierr; MPI_Comm c_comm = MPI_Comm_f2c(*comm); - + /* This stuff is very confusing. Be sure to see the comment at the top of src/attributes/attributes.c. */ c_ierr = ompi_attr_set_fortran_mpi2(COMM_ATTR, c_comm, &c_comm->c_keyhash, - OMPI_FINT_2_INT(*comm_keyval), + OMPI_FINT_2_INT(*comm_keyval), *attribute_val, false); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/comm_set_errhandler_f.c b/ompi/mpi/fortran/mpif-h/comm_set_errhandler_f.c index b69313adaee..d1743367606 100644 --- a/ompi/mpi/fortran/mpif-h/comm_set_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_set_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_set_info_f.c b/ompi/mpi/fortran/mpif-h/comm_set_info_f.c index 550f17c5649..f8c1ac54032 100644 --- a/ompi/mpi/fortran/mpif-h/comm_set_info_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_set_info_f.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_set_name_f.c b/ompi/mpi/fortran/mpif-h/comm_set_name_f.c index 947ee124a6f..ebec57e8d7b 100644 --- a/ompi/mpi/fortran/mpif-h/comm_set_name_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_set_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_size_f.c b/ompi/mpi/fortran/mpif-h/comm_size_f.c index 1b165f0f6b2..7f0edb9c27c 100644 --- a/ompi/mpi/fortran/mpif-h/comm_size_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/comm_spawn_f.c b/ompi/mpi/fortran/mpif-h/comm_spawn_f.c index 2b3a50c9f25..e050b715c6d 100644 --- a/ompi/mpi/fortran/mpif-h/comm_spawn_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_spawn_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,7 +68,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_SPAWN, #endif void ompi_comm_spawn_f(char *command, char *argv, MPI_Fint *maxprocs, - MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, + MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *intercomm, MPI_Fint *array_of_errcodes, MPI_Fint *ierr, int cmd_len, int string_len) { @@ -79,7 +79,7 @@ void ompi_comm_spawn_f(char *command, char *argv, MPI_Fint *maxprocs, char **c_argv; char *c_command; OMPI_ARRAY_NAME_DECL(array_of_errcodes); - + c_comm = MPI_Comm_f2c(*comm); c_info = MPI_Info_f2c(*info); MPI_Comm_size(c_comm, &size); @@ -102,7 +102,7 @@ void ompi_comm_spawn_f(char *command, char *argv, MPI_Fint *maxprocs, ompi_fortran_argv_f2c(argv, string_len, string_len, &c_argv); } - c_ierr = MPI_Comm_spawn(c_command, c_argv, + c_ierr = MPI_Comm_spawn(c_command, c_argv, OMPI_FINT_2_INT(*maxprocs), c_info, OMPI_FINT_2_INT(*root), diff --git a/ompi/mpi/fortran/mpif-h/comm_spawn_multiple_f.c b/ompi/mpi/fortran/mpif-h/comm_spawn_multiple_f.c index 30306ba0546..8af48ed1aa3 100644 --- a/ompi/mpi/fortran/mpif-h/comm_spawn_multiple_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_spawn_multiple_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -84,9 +84,9 @@ void ompi_comm_spawn_multiple_f(MPI_Fint *count, char *array_commands, char ***c_array_argv; OMPI_ARRAY_NAME_DECL(array_maxprocs); OMPI_ARRAY_NAME_DECL(array_errcds); - + c_comm = MPI_Comm_f2c(*comm); - + MPI_Comm_size(c_comm, &size); array_size = OMPI_FINT_2_INT(*count); @@ -105,15 +105,15 @@ void ompi_comm_spawn_multiple_f(MPI_Fint *count, char *array_commands, if (OMPI_IS_FORTRAN_ARGVS_NULL(array_argv)) { c_array_argv = MPI_ARGVS_NULL; } else { - ompi_fortran_multiple_argvs_f2c(OMPI_FINT_2_INT(*count), array_argv, + ompi_fortran_multiple_argvs_f2c(OMPI_FINT_2_INT(*count), array_argv, argv_string_len, &c_array_argv); } OMPI_ARRAY_FINT_2_INT(array_maxprocs, array_size); - - ompi_fortran_argv_f2c(array_commands, cmd_string_len, + + ompi_fortran_argv_f2c(array_commands, cmd_string_len, cmd_string_len, &c_array_commands); - + c_info = (MPI_Info *) malloc (array_size * sizeof(MPI_Info)); for (i = 0; i < array_size; ++i) { c_info[i] = MPI_Info_f2c(array_info[i]); @@ -121,7 +121,7 @@ void ompi_comm_spawn_multiple_f(MPI_Fint *count, char *array_commands, c_ierr = MPI_Comm_spawn_multiple(OMPI_FINT_2_INT(*count), c_array_commands, - c_array_argv, + c_array_argv, OMPI_ARRAY_NAME_CONVERT(array_maxprocs), c_info, OMPI_FINT_2_INT(*root), @@ -143,7 +143,7 @@ void ompi_comm_spawn_multiple_f(MPI_Fint *count, char *array_commands, opal_argv_free(c_array_commands); if (MPI_ARGVS_NULL != c_array_argv && NULL != c_array_argv) { - for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) { + for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) { opal_argv_free(c_array_argv[i]); } } diff --git a/ompi/mpi/fortran/mpif-h/comm_split_f.c b/ompi/mpi/fortran/mpif-h/comm_split_f.c index b7f9a262aca..32ad06d7ca5 100644 --- a/ompi/mpi/fortran/mpif-h/comm_split_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_split_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_comm_split_f(MPI_Fint *comm, MPI_Fint *color, MPI_Fint *key, MPI_Comm c_newcomm; MPI_Comm c_comm = MPI_Comm_f2c ( *comm ); - c_ierr = MPI_Comm_split(c_comm, + c_ierr = MPI_Comm_split(c_comm, OMPI_FINT_2_INT(*color), OMPI_FINT_2_INT(*key), &c_newcomm ); diff --git a/ompi/mpi/fortran/mpif-h/comm_split_type_f.c b/ompi/mpi/fortran/mpif-h/comm_split_type_f.c index 79e53e2f998..9238123abf3 100644 --- a/ompi/mpi/fortran/mpif-h/comm_split_type_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_split_type_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ void ompi_comm_split_type_f(MPI_Fint *comm, MPI_Fint *split_type, MPI_Fint *key, c_info = MPI_Info_f2c(*info); - c_ierr = OMPI_INT_2_FINT(MPI_Comm_split_type(c_comm, + c_ierr = OMPI_INT_2_FINT(MPI_Comm_split_type(c_comm, OMPI_FINT_2_INT(*split_type), OMPI_FINT_2_INT(*key), c_info, diff --git a/ompi/mpi/fortran/mpif-h/comm_test_inter_f.c b/ompi/mpi/fortran/mpif-h/comm_test_inter_f.c index cdf76df3994..fca226b6f80 100644 --- a/ompi/mpi/fortran/mpif-h/comm_test_inter_f.c +++ b/ompi/mpi/fortran/mpif-h/comm_test_inter_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/dims_create_f.c b/ompi/mpi/fortran/mpif-h/dims_create_f.c index 563cd07394e..b25d39c67e5 100644 --- a/ompi/mpi/fortran/mpif-h/dims_create_f.c +++ b/ompi/mpi/fortran/mpif-h/dims_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,7 +64,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_DIMS_CREATE, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_dims_create_f(MPI_Fint *nnodes, MPI_Fint *ndims, +void ompi_dims_create_f(MPI_Fint *nnodes, MPI_Fint *ndims, MPI_Fint *dims, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/dist_graph_create_adjacent_f.c b/ompi/mpi/fortran/mpif-h/dist_graph_create_adjacent_f.c index f0350320e8a..0fc1975bd70 100644 --- a/ompi/mpi/fortran/mpif-h/dist_graph_create_adjacent_f.c +++ b/ompi/mpi/fortran/mpif-h/dist_graph_create_adjacent_f.c @@ -9,9 +9,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -106,7 +106,7 @@ void ompi_dist_graph_create_adjacent_f(MPI_Fint *comm_old, MPI_Fint *indegree, OMPI_FINT_2_INT(*outdegree), OMPI_ARRAY_NAME_CONVERT(destinations), c_destweights, - c_info, + c_info, OMPI_LOGICAL_2_INT(*reorder), &c_comm_graph)); if (OMPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) { diff --git a/ompi/mpi/fortran/mpif-h/dist_graph_create_f.c b/ompi/mpi/fortran/mpif-h/dist_graph_create_f.c index aade58e7f41..2f9b1e282f2 100644 --- a/ompi/mpi/fortran/mpif-h/dist_graph_create_f.c +++ b/ompi/mpi/fortran/mpif-h/dist_graph_create_f.c @@ -8,9 +8,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -91,7 +91,7 @@ void ompi_dist_graph_create_f(MPI_Fint *comm_old, MPI_Fint *n, MPI_Fint *sources OMPI_ARRAY_FINT_2_INT(weights, count); c_weights = OMPI_ARRAY_NAME_CONVERT(weights); } - + *ierr = OMPI_INT_2_FINT(MPI_Dist_graph_create(c_comm_old, OMPI_FINT_2_INT(*n), OMPI_ARRAY_NAME_CONVERT(sources), OMPI_ARRAY_NAME_CONVERT(degrees), OMPI_ARRAY_NAME_CONVERT(destinations), diff --git a/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_count_f.c b/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_count_f.c index d4624f63c2b..a60f6681fa7 100644 --- a/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_count_f.c +++ b/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_count_f.c @@ -5,9 +5,9 @@ * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2013 Université Bordeaux 1 * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -70,7 +70,7 @@ void ompi_dist_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *inneighbors, c_comm = MPI_Comm_f2c(*comm); - *ierr = OMPI_INT_2_FINT(MPI_Dist_graph_neighbors_count(c_comm, + *ierr = OMPI_INT_2_FINT(MPI_Dist_graph_neighbors_count(c_comm, OMPI_SINGLE_NAME_CONVERT(inneighbors), OMPI_SINGLE_NAME_CONVERT(outneighbors), OMPI_LOGICAL_SINGLE_NAME_CONVERT(weighted))); diff --git a/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_f.c b/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_f.c index a54a641652e..95b0069b171 100644 --- a/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_f.c +++ b/ompi/mpi/fortran/mpif-h/dist_graph_neighbors_f.c @@ -5,9 +5,9 @@ * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2013 Université Bordeaux 1 * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/errhandler_create_f.c b/ompi/mpi/fortran/mpif-h/errhandler_create_f.c index 989b5621ce9..d6c68e8bec3 100644 --- a/ompi/mpi/fortran/mpif-h/errhandler_create_f.c +++ b/ompi/mpi/fortran/mpif-h/errhandler_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERRHANDLER_CREATE, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_errhandler_create_f(ompi_errhandler_fortran_handler_fn_t* function, +void ompi_errhandler_create_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr) { ompi_comm_create_errhandler_f(function, errhandler, ierr); diff --git a/ompi/mpi/fortran/mpif-h/errhandler_free_f.c b/ompi/mpi/fortran/mpif-h/errhandler_free_f.c index d0a2661b317..e8e84a1432b 100644 --- a/ompi/mpi/fortran/mpif-h/errhandler_free_f.c +++ b/ompi/mpi/fortran/mpif-h/errhandler_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/errhandler_get_f.c b/ompi/mpi/fortran/mpif-h/errhandler_get_f.c index 999026e7d56..cb6eb8ca8bc 100644 --- a/ompi/mpi/fortran/mpif-h/errhandler_get_f.c +++ b/ompi/mpi/fortran/mpif-h/errhandler_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/errhandler_set_f.c b/ompi/mpi/fortran/mpif-h/errhandler_set_f.c index 2bb529133de..1055a17c32b 100644 --- a/ompi/mpi/fortran/mpif-h/errhandler_set_f.c +++ b/ompi/mpi/fortran/mpif-h/errhandler_set_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/error_class_f.c b/ompi/mpi/fortran/mpif-h/error_class_f.c index f761a2d563d..d7353c3387a 100644 --- a/ompi/mpi/fortran/mpif-h/error_class_f.c +++ b/ompi/mpi/fortran/mpif-h/error_class_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,7 +64,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERROR_CLASS, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass, +void ompi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/error_string_f.c b/ompi/mpi/fortran/mpif-h/error_string_f.c index 5da692636e6..9bf6e76dc68 100644 --- a/ompi/mpi/fortran/mpif-h/error_string_f.c +++ b/ompi/mpi/fortran/mpif-h/error_string_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/exscan_f.c b/ompi/mpi/fortran/mpif-h/exscan_f.c index f9427ac481c..51a1bb593c0 100644 --- a/ompi/mpi/fortran/mpif-h/exscan_f.c +++ b/ompi/mpi/fortran/mpif-h/exscan_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_exscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Comm c_comm; MPI_Datatype c_type; MPI_Op c_op; - + c_comm = MPI_Comm_f2c(*comm); c_type = MPI_Type_f2c(*datatype); c_op = MPI_Op_f2c(*op); @@ -82,7 +82,7 @@ void ompi_exscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, sendbuf = (char *) OMPI_F2C_BOTTOM (sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM (recvbuf); - c_ierr = MPI_Exscan(sendbuf, recvbuf, + c_ierr = MPI_Exscan(sendbuf, recvbuf, OMPI_FINT_2_INT(*count), c_type, c_op, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/f_sync_reg_f.c b/ompi/mpi/fortran/mpif-h/f_sync_reg_f.c index 3954962ccb3..571100e1ed7 100644 --- a/ompi/mpi/fortran/mpif-h/f_sync_reg_f.c +++ b/ompi/mpi/fortran/mpif-h/f_sync_reg_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 University of Oregon. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_call_errhandler_f.c b/ompi/mpi/fortran/mpif-h/file_call_errhandler_f.c index dd22f004057..545c3fcc11e 100644 --- a/ompi/mpi/fortran/mpif-h/file_call_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/file_call_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_close_f.c b/ompi/mpi/fortran/mpif-h/file_close_f.c index b4ed37a892f..18a7f4bc644 100644 --- a/ompi/mpi/fortran/mpif-h/file_close_f.c +++ b/ompi/mpi/fortran/mpif-h/file_close_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_create_errhandler_f.c b/ompi/mpi/fortran/mpif-h/file_create_errhandler_f.c index 94342b5ce52..d2089559d95 100644 --- a/ompi/mpi/fortran/mpif-h/file_create_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/file_create_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,11 +69,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_CREATE_ERRHANDLER, static const char FUNC_NAME[] = "MPI_FILE_CREATE_ERRHANDLER"; -void ompi_file_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, +void ompi_file_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr) { int c_ierr; - MPI_Errhandler c_errhandler = + MPI_Errhandler c_errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_FILE, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_FORTRAN); diff --git a/ompi/mpi/fortran/mpif-h/file_delete_f.c b/ompi/mpi/fortran/mpif-h/file_delete_f.c index 6bd1827a51d..f978e5228c6 100644 --- a/ompi/mpi/fortran/mpif-h/file_delete_f.c +++ b/ompi/mpi/fortran/mpif-h/file_delete_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,7 +81,7 @@ void ompi_file_delete_f(char *filename, MPI_Fint *info, MPI_Fint *ierr, int file if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); return; } - + c_ierr = MPI_File_delete(c_filename, c_info); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_get_amode_f.c b/ompi/mpi/fortran/mpif-h/file_get_amode_f.c index af6fe147e1e..63f4fef0517 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_amode_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_amode_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ void ompi_file_get_amode_f(MPI_Fint *fh, MPI_Fint *amode, MPI_Fint *ierr) int c_ierr; MPI_File c_fh; OMPI_SINGLE_NAME_DECL(amode); - + c_fh = MPI_File_f2c(*fh); c_ierr = MPI_File_get_amode(c_fh, OMPI_SINGLE_NAME_CONVERT(amode)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_get_atomicity_f.c b/ompi/mpi/fortran/mpif-h/file_get_atomicity_f.c index 23410636159..378ab89fae0 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_atomicity_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_atomicity_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_byte_offset_f.c b/ompi/mpi/fortran/mpif-h/file_get_byte_offset_f.c index c42d676c8db..e5d31e89ef4 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_byte_offset_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_byte_offset_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -72,7 +72,7 @@ void ompi_file_get_byte_offset_f(MPI_Fint *fh, MPI_Offset *offset, c_fh = MPI_File_f2c(*fh); - c_ierr = MPI_File_get_byte_offset(c_fh, + c_ierr = MPI_File_get_byte_offset(c_fh, (MPI_Offset) *offset, disp); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_get_errhandler_f.c b/ompi/mpi/fortran/mpif-h/file_get_errhandler_f.c index 1966aa5b878..2b31d3308e0 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_file_get_errhandler_f(MPI_Fint *fh, MPI_Fint *errhandler, MPI_Fint *ie MPI_Errhandler c_errhandler; c_fh = MPI_File_f2c(*fh); - + c_ierr = MPI_File_get_errhandler(c_fh, &c_errhandler); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_get_group_f.c b/ompi/mpi/fortran/mpif-h/file_get_group_f.c index 3bde5c84a97..4dc630d14ef 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_group_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_group_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_info_f.c b/ompi/mpi/fortran/mpif-h/file_get_info_f.c index 82e5f834a8f..e5d07af4c44 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_info_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_info_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_position_f.c b/ompi/mpi/fortran/mpif-h/file_get_position_f.c index 26e2a755b8d..b4b41074b58 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_position_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_position_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_position_shared_f.c b/ompi/mpi/fortran/mpif-h/file_get_position_shared_f.c index 743fa3428b6..864446db62e 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_position_shared_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_position_shared_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_size_f.c b/ompi/mpi/fortran/mpif-h/file_get_size_f.c index 4d8f96ef079..1d1a974f307 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_size_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_type_extent_f.c b/ompi/mpi/fortran/mpif-h/file_get_type_extent_f.c index cde28424684..5b6c765cdd4 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_type_extent_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_type_extent_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_get_view_f.c b/ompi/mpi/fortran/mpif-h/file_get_view_f.c index 9396298d500..535d9e26197 100644 --- a/ompi/mpi/fortran/mpif-h/file_get_view_f.c +++ b/ompi/mpi/fortran/mpif-h/file_get_view_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,8 +66,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_GET_VIEW, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_get_view_f(MPI_Fint *fh, MPI_Offset *disp, - MPI_Fint *etype, MPI_Fint *filetype, +void ompi_file_get_view_f(MPI_Fint *fh, MPI_Offset *disp, + MPI_Fint *etype, MPI_Fint *filetype, char *datarep, MPI_Fint *ierr, int datarep_len) { int c_ierr; @@ -76,7 +76,7 @@ void ompi_file_get_view_f(MPI_Fint *fh, MPI_Offset *disp, MPI_Offset c_disp; char c_datarep[MPI_MAX_DATAREP_STRING]; - c_ierr = MPI_File_get_view(c_fh, &c_disp, &c_etype, + c_ierr = MPI_File_get_view(c_fh, &c_disp, &c_etype, &c_filetype, c_datarep); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_iread_at_f.c b/ompi/mpi/fortran/mpif-h/file_iread_at_f.c index ca18963ef33..b2c49608173 100644 --- a/ompi/mpi/fortran/mpif-h/file_iread_at_f.c +++ b/ompi/mpi/fortran/mpif-h/file_iread_at_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IREAD_AT, #endif void ompi_file_iread_at_f(MPI_Fint *fh, MPI_Offset *offset, - char *buf, MPI_Fint *count, + char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; @@ -77,7 +77,7 @@ void ompi_file_iread_at_f(MPI_Fint *fh, MPI_Offset *offset, c_ierr = MPI_File_iread_at(c_fh, (MPI_Offset) *offset, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), - c_type, + c_type, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_iread_f.c b/ompi/mpi/fortran/mpif-h/file_iread_f.c index ac632565116..6915deb65ee 100644 --- a/ompi/mpi/fortran/mpif-h/file_iread_f.c +++ b/ompi/mpi/fortran/mpif-h/file_iread_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -77,7 +77,7 @@ void ompi_file_iread_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FINT_2_INT(*count), c_type, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { *request = MPI_Request_c2f(c_request); } diff --git a/ompi/mpi/fortran/mpif-h/file_iread_shared_f.c b/ompi/mpi/fortran/mpif-h/file_iread_shared_f.c index 893b7c85c36..0d344b3f090 100644 --- a/ompi/mpi/fortran/mpif-h/file_iread_shared_f.c +++ b/ompi/mpi/fortran/mpif-h/file_iread_shared_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_file_iread_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_request; - + c_ierr = MPI_File_iread_shared(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_at_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_at_f.c index 8f879287b5f..41d676869cc 100644 --- a/ompi/mpi/fortran/mpif-h/file_iwrite_at_f.c +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_at_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_file_iwrite_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_request; - + c_ierr = MPI_File_iwrite_at(c_fh, (MPI_Offset) *offset, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_f.c index e8ff2adf6fe..51e0665757a 100644 --- a/ompi/mpi/fortran/mpif-h/file_iwrite_f.c +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,12 +71,12 @@ void ompi_file_iwrite_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *data MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_request; - + c_ierr = MPI_File_iwrite(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { *request = MPI_Request_c2f(c_request); } diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_shared_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_shared_f.c index 064c37900fb..b2649cc6fd2 100644 --- a/ompi/mpi/fortran/mpif-h/file_iwrite_shared_f.c +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_shared_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_file_iwrite_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Request c_request; - + c_ierr = MPI_File_iwrite_shared(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), diff --git a/ompi/mpi/fortran/mpif-h/file_open_f.c b/ompi/mpi/fortran/mpif-h/file_open_f.c index 1336014d5ae..9af9fdf5e65 100644 --- a/ompi/mpi/fortran/mpif-h/file_open_f.c +++ b/ompi/mpi/fortran/mpif-h/file_open_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -83,7 +83,7 @@ void ompi_file_open_f(MPI_Fint *comm, char *filename, MPI_Fint *amode, return; } - c_ierr = MPI_File_open(c_comm, c_filename, + c_ierr = MPI_File_open(c_comm, c_filename, OMPI_FINT_2_INT(*amode), c_info, &c_fh); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_preallocate_f.c b/ompi/mpi/fortran/mpif-h/file_preallocate_f.c index 736f55dd4d7..55928b999dc 100644 --- a/ompi/mpi/fortran/mpif-h/file_preallocate_f.c +++ b/ompi/mpi/fortran/mpif-h/file_preallocate_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ void ompi_file_preallocate_f(MPI_Fint *fh, MPI_Offset *size, MPI_Fint *ierr) { int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); - + c_ierr = MPI_File_preallocate(c_fh, (MPI_Offset) *size); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/file_read_all_begin_f.c b/ompi/mpi/fortran/mpif-h/file_read_all_begin_f.c index 762222f5cab..546807a8178 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_all_begin_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_all_begin_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_read_all_end_f.c b/ompi/mpi/fortran/mpif-h/file_read_all_end_f.c index 75b784d851b..2aa1a5afb38 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_all_end_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_all_end_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ void ompi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_File c_fh = MPI_File_f2c(*fh); OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - + c_ierr = MPI_File_read_all_end(c_fh, buf, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_read_all_f.c b/ompi/mpi/fortran/mpif-h/file_read_all_f.c index c919b001d2b..1137dc7f5d6 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_all_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_all_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,11 +76,11 @@ void ompi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - + c_ierr = MPI_File_read_all(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) } diff --git a/ompi/mpi/fortran/mpif-h/file_read_at_all_begin_f.c b/ompi/mpi/fortran/mpif-h/file_read_at_all_begin_f.c index 0e209f94040..ef702959af1 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_at_all_begin_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_at_all_begin_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_file_read_at_all_begin_f(MPI_Fint *fh, MPI_Offset *offset, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_File_read_at_all_begin(c_fh, + c_ierr = MPI_File_read_at_all_begin(c_fh, (MPI_Offset) *offset, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), diff --git a/ompi/mpi/fortran/mpif-h/file_read_at_all_end_f.c b/ompi/mpi/fortran/mpif-h/file_read_at_all_end_f.c index 862cc56c9fa..f021fc2555e 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_at_all_end_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_at_all_end_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_AT_ALL_END, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, +void ompi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/file_read_at_all_f.c b/ompi/mpi/fortran/mpif-h/file_read_at_all_f.c index cc062ee958a..8697f3a01c9 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_at_all_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_at_all_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,7 +68,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_AT_ALL, #endif void ompi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset, - char *buf, MPI_Fint *count, + char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr) { @@ -79,7 +79,7 @@ void ompi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_read_at_all(c_fh, + c_ierr = MPI_File_read_at_all(c_fh, (MPI_Offset) *offset, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), diff --git a/ompi/mpi/fortran/mpif-h/file_read_at_f.c b/ompi/mpi/fortran/mpif-h/file_read_at_f.c index c29251f83eb..8e136885966 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_at_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_at_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_AT, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, +void ompi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr) { @@ -78,9 +78,9 @@ void ompi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_read_at(c_fh, + c_ierr = MPI_File_read_at(c_fh, (MPI_Offset) *offset, - buf, + buf, OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_read_f.c b/ompi/mpi/fortran/mpif-h/file_read_f.c index ed518693d79..4307586f9eb 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,7 +76,7 @@ void ompi_file_read_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - + c_ierr = MPI_File_read(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); diff --git a/ompi/mpi/fortran/mpif-h/file_read_ordered_begin_f.c b/ompi/mpi/fortran/mpif-h/file_read_ordered_begin_f.c index 5b73e9cd339..a3877bb9713 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_ordered_begin_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_ordered_begin_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,14 +65,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_ORDERED_BEGIN, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_read_ordered_begin_f(MPI_Fint *fh, char *buf, MPI_Fint *count, +void ompi_file_read_ordered_begin_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr) { int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_File_read_ordered_begin(c_fh, OMPI_F2C_BOTTOM(buf), + c_ierr = MPI_File_read_ordered_begin(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_read_ordered_end_f.c b/ompi/mpi/fortran/mpif-h/file_read_ordered_end_f.c index 5f545afd46c..1946c43db83 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_ordered_end_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_ordered_end_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_read_ordered_f.c b/ompi/mpi/fortran/mpif-h/file_read_ordered_f.c index 24e5e151036..aca923fb9a1 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_ordered_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_ordered_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,7 +68,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_ORDERED, #endif void ompi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *status, + MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr) { int c_ierr; @@ -78,7 +78,7 @@ void ompi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_read_ordered(c_fh, + c_ierr = MPI_File_read_ordered(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, diff --git a/ompi/mpi/fortran/mpif-h/file_read_shared_f.c b/ompi/mpi/fortran/mpif-h/file_read_shared_f.c index cd4ce14752a..e9ed2f7595b 100644 --- a/ompi/mpi/fortran/mpif-h/file_read_shared_f.c +++ b/ompi/mpi/fortran/mpif-h/file_read_shared_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,7 +68,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_SHARED, #endif void ompi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *status, + MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr) { int c_ierr; @@ -78,8 +78,8 @@ void ompi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_read_shared(c_fh, - OMPI_F2C_BOTTOM(buf), + c_ierr = MPI_File_read_shared(c_fh, + OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); diff --git a/ompi/mpi/fortran/mpif-h/file_seek_f.c b/ompi/mpi/fortran/mpif-h/file_seek_f.c index 4948d83a721..19c67fc29c4 100644 --- a/ompi/mpi/fortran/mpif-h/file_seek_f.c +++ b/ompi/mpi/fortran/mpif-h/file_seek_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,12 +64,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_SEEK, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_seek_f(MPI_Fint *fh, MPI_Offset *offset, +void ompi_file_seek_f(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *whence, MPI_Fint *ierr) { int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); - + c_ierr = MPI_File_seek(c_fh, (MPI_Offset) *offset, OMPI_FINT_2_INT(*whence)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_seek_shared_f.c b/ompi/mpi/fortran/mpif-h/file_seek_shared_f.c index b0596429296..ddf18fc13a7 100644 --- a/ompi/mpi/fortran/mpif-h/file_seek_shared_f.c +++ b/ompi/mpi/fortran/mpif-h/file_seek_shared_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,9 +64,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_SEEK_SHARED, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_seek_shared_f(MPI_Fint *fh, MPI_Offset *offset, +void ompi_file_seek_shared_f(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *whence, MPI_Fint *ierr) -{ +{ int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); diff --git a/ompi/mpi/fortran/mpif-h/file_set_atomicity_f.c b/ompi/mpi/fortran/mpif-h/file_set_atomicity_f.c index a9da00a46fb..2c0ed7d217e 100644 --- a/ompi/mpi/fortran/mpif-h/file_set_atomicity_f.c +++ b/ompi/mpi/fortran/mpif-h/file_set_atomicity_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_set_errhandler_f.c b/ompi/mpi/fortran/mpif-h/file_set_errhandler_f.c index 0e730189887..e8967fb48a1 100644 --- a/ompi/mpi/fortran/mpif-h/file_set_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/file_set_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_set_info_f.c b/ompi/mpi/fortran/mpif-h/file_set_info_f.c index 611fa7ab92f..b91997f8ee1 100644 --- a/ompi/mpi/fortran/mpif-h/file_set_info_f.c +++ b/ompi/mpi/fortran/mpif-h/file_set_info_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_set_size_f.c b/ompi/mpi/fortran/mpif-h/file_set_size_f.c index a4e8b97881b..4a249e932e0 100644 --- a/ompi/mpi/fortran/mpif-h/file_set_size_f.c +++ b/ompi/mpi/fortran/mpif-h/file_set_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ void ompi_file_set_size_f(MPI_Fint *fh, MPI_Offset *size, MPI_Fint *ierr) { int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); - + c_ierr = MPI_File_set_size(c_fh, (MPI_Offset) *size); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/file_set_view_f.c b/ompi/mpi/fortran/mpif-h/file_set_view_f.c index 6f7e3a12ead..1e450a0c16a 100644 --- a/ompi/mpi/fortran/mpif-h/file_set_view_f.c +++ b/ompi/mpi/fortran/mpif-h/file_set_view_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_SET_VIEW, void ompi_file_set_view_f(MPI_Fint *fh, MPI_Offset *disp, MPI_Fint *etype, MPI_Fint *filetype, - char *datarep, MPI_Fint *info, MPI_Fint *ierr, + char *datarep, MPI_Fint *info, MPI_Fint *ierr, int datarep_len) { MPI_File c_fh = MPI_File_f2c(*fh); diff --git a/ompi/mpi/fortran/mpif-h/file_sync_f.c b/ompi/mpi/fortran/mpif-h/file_sync_f.c index efba22a80e2..b0801061d69 100644 --- a/ompi/mpi/fortran/mpif-h/file_sync_f.c +++ b/ompi/mpi/fortran/mpif-h/file_sync_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_write_all_begin_f.c b/ompi/mpi/fortran/mpif-h/file_write_all_begin_f.c index 4cc4d3bee97..3a2f422d70d 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_all_begin_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_all_begin_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_WRITE_ALL_BEGIN, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_write_all_begin_f(MPI_Fint *fh, char *buf, +void ompi_file_write_all_begin_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr) { @@ -73,7 +73,7 @@ void ompi_file_write_all_begin_f(MPI_Fint *fh, char *buf, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_File_write_all_begin(c_fh, OMPI_F2C_BOTTOM(buf), + c_ierr = MPI_File_write_all_begin(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_write_all_end_f.c b/ompi/mpi/fortran/mpif-h/file_write_all_end_f.c index ffa3975dcac..a0d5fe16b06 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_all_end_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_all_end_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ void ompi_file_write_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_File c_fh = MPI_File_f2c(*fh); OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - + c_ierr = MPI_File_write_all_end(c_fh, buf, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_write_all_f.c b/ompi/mpi/fortran/mpif-h/file_write_all_f.c index a0c97d63309..5ef5388bbe7 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_all_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_all_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,7 +76,7 @@ void ompi_file_write_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - + c_ierr = MPI_File_write_all(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); diff --git a/ompi/mpi/fortran/mpif-h/file_write_at_all_begin_f.c b/ompi/mpi/fortran/mpif-h/file_write_at_all_begin_f.c index fb54a58962e..50c1421e0a1 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_at_all_begin_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_at_all_begin_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_WRITE_AT_ALL_BEGIN, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_write_at_all_begin_f(MPI_Fint *fh, MPI_Offset *offset, +void ompi_file_write_at_all_begin_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr) { @@ -73,9 +73,9 @@ void ompi_file_write_at_all_begin_f(MPI_Fint *fh, MPI_Offset *offset, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_File_write_at_all_begin(c_fh, + c_ierr = MPI_File_write_at_all_begin(c_fh, (MPI_Offset) *offset, - OMPI_F2C_BOTTOM(buf), + OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_write_at_all_end_f.c b/ompi/mpi/fortran/mpif-h/file_write_at_all_end_f.c index dc8f9f0ea33..04fef54bc16 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_at_all_end_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_at_all_end_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_write_at_all_f.c b/ompi/mpi/fortran/mpif-h/file_write_at_all_f.c index 42903e38938..cf8fd8afd4c 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_at_all_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_at_all_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -79,13 +79,13 @@ void ompi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_write_at_all(c_fh, + c_ierr = MPI_File_write_at_all(c_fh, (MPI_Offset) *offset, - OMPI_F2C_BOTTOM(buf), + OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) } diff --git a/ompi/mpi/fortran/mpif-h/file_write_at_f.c b/ompi/mpi/fortran/mpif-h/file_write_at_f.c index 820b1fddb6b..314e1b5bb1b 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_at_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_at_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_WRITE_AT, #endif void ompi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset, - char *buf, MPI_Fint *count, + char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr) { int c_ierr; @@ -77,12 +77,12 @@ void ompi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_write_at(c_fh, + c_ierr = MPI_File_write_at(c_fh, (MPI_Offset) *offset, - OMPI_F2C_BOTTOM(buf), + OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) } diff --git a/ompi/mpi/fortran/mpif-h/file_write_f.c b/ompi/mpi/fortran/mpif-h/file_write_f.c index 5041e344d5c..31db55c69a2 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,11 +76,11 @@ void ompi_file_write_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - + c_ierr = MPI_File_write(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) } diff --git a/ompi/mpi/fortran/mpif-h/file_write_ordered_begin_f.c b/ompi/mpi/fortran/mpif-h/file_write_ordered_begin_f.c index f7fd293d2be..c0b11a9d25c 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_ordered_begin_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_ordered_begin_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,15 +65,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_WRITE_ORDERED_BEGIN, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_file_write_ordered_begin_f(MPI_Fint *fh, char *buf, - MPI_Fint *count, MPI_Fint *datatype, +void ompi_file_write_ordered_begin_f(MPI_Fint *fh, char *buf, + MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr) { int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_File_write_ordered_begin(c_fh, OMPI_F2C_BOTTOM(buf), + c_ierr = MPI_File_write_ordered_begin(c_fh, OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/file_write_ordered_end_f.c b/ompi/mpi/fortran/mpif-h/file_write_ordered_end_f.c index d70c272ae28..69ba92aee50 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_ordered_end_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_ordered_end_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/file_write_ordered_f.c b/ompi/mpi/fortran/mpif-h/file_write_ordered_f.c index 1c37dad3d39..17e8bd041d4 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_ordered_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_ordered_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -78,12 +78,12 @@ void ompi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_write_ordered(c_fh, - OMPI_F2C_BOTTOM(buf), + c_ierr = MPI_File_write_ordered(c_fh, + OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) } diff --git a/ompi/mpi/fortran/mpif-h/file_write_shared_f.c b/ompi/mpi/fortran/mpif-h/file_write_shared_f.c index 858f9a51d00..b73e54203ae 100644 --- a/ompi/mpi/fortran/mpif-h/file_write_shared_f.c +++ b/ompi/mpi/fortran/mpif-h/file_write_shared_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -78,12 +78,12 @@ void ompi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) - c_ierr = MPI_File_write_shared(c_fh, - OMPI_F2C_BOTTOM(buf), + c_ierr = MPI_File_write_shared(c_fh, + OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) } diff --git a/ompi/mpi/fortran/mpif-h/finalize_f.c b/ompi/mpi/fortran/mpif-h/finalize_f.c index d4002c15aa2..21d9042d598 100644 --- a/ompi/mpi/fortran/mpif-h/finalize_f.c +++ b/ompi/mpi/fortran/mpif-h/finalize_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/finalized_f.c b/ompi/mpi/fortran/mpif-h/finalized_f.c index 3c3cd9ea6a8..24e99590ae6 100644 --- a/ompi/mpi/fortran/mpif-h/finalized_f.c +++ b/ompi/mpi/fortran/mpif-h/finalized_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/free_mem_f.c b/ompi/mpi/fortran/mpif-h/free_mem_f.c index 56026516380..877c9932a93 100644 --- a/ompi/mpi/fortran/mpif-h/free_mem_f.c +++ b/ompi/mpi/fortran/mpif-h/free_mem_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/gather_f.c b/ompi/mpi/fortran/mpif-h/gather_f.c index ec3ddafe464..b15deab53c1 100644 --- a/ompi/mpi/fortran/mpif-h/gather_f.c +++ b/ompi/mpi/fortran/mpif-h/gather_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GATHER, #endif void ompi_gather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, - char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, + char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr) { int c_ierr; @@ -82,7 +82,7 @@ void ompi_gather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); c_ierr = MPI_Gather(sendbuf, OMPI_FINT_2_INT(*sendcount), - c_sendtype, recvbuf, + c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, OMPI_FINT_2_INT(*root), diff --git a/ompi/mpi/fortran/mpif-h/gatherv_f.c b/ompi/mpi/fortran/mpif-h/gatherv_f.c index b8fa43fef7d..9198b085627 100644 --- a/ompi/mpi/fortran/mpif-h/gatherv_f.c +++ b/ompi/mpi/fortran/mpif-h/gatherv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -79,7 +79,7 @@ void ompi_gatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, c_comm = MPI_Comm_f2c(*comm); c_sendtype = MPI_Type_f2c(*sendtype); c_recvtype = MPI_Type_f2c(*recvtype); - + MPI_Comm_size(c_comm, &size); OMPI_ARRAY_FINT_2_INT(recvcounts, size); OMPI_ARRAY_FINT_2_INT(displs, size); @@ -92,7 +92,7 @@ void ompi_gatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, c_sendtype, recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(displs), - c_recvtype, + c_recvtype, OMPI_FINT_2_INT(*root), c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/get_address_f.c b/ompi/mpi/fortran/mpif-h/get_address_f.c index 4b9fce768b5..e0dfef7e076 100644 --- a/ompi/mpi/fortran/mpif-h/get_address_f.c +++ b/ompi/mpi/fortran/mpif-h/get_address_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/get_count_f.c b/ompi/mpi/fortran/mpif-h/get_count_f.c index 07a38f942b5..907e49f33e6 100644 --- a/ompi/mpi/fortran/mpif-h/get_count_f.c +++ b/ompi/mpi/fortran/mpif-h/get_count_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -79,7 +79,7 @@ void ompi_get_count_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI c_ierr = MPI_Status_f2c(status, &c_status); if (MPI_SUCCESS == c_ierr) { - c_ierr = MPI_Get_count(&c_status, c_type, + c_ierr = MPI_Get_count(&c_status, c_type, OMPI_SINGLE_NAME_CONVERT(count)); OMPI_SINGLE_INT_2_FINT(count); } diff --git a/ompi/mpi/fortran/mpif-h/get_elements_f.c b/ompi/mpi/fortran/mpif-h/get_elements_f.c index de05ea81e61..e500ef51e81 100644 --- a/ompi/mpi/fortran/mpif-h/get_elements_f.c +++ b/ompi/mpi/fortran/mpif-h/get_elements_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -79,7 +79,7 @@ void ompi_get_elements_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, c_ierr = MPI_Status_f2c(status, &c_status); if (MPI_SUCCESS == c_ierr) { - c_ierr = MPI_Get_elements(&c_status, c_type, + c_ierr = MPI_Get_elements(&c_status, c_type, OMPI_SINGLE_NAME_CONVERT(count)); OMPI_SINGLE_INT_2_FINT(count); } diff --git a/ompi/mpi/fortran/mpif-h/get_elements_x_f.c b/ompi/mpi/fortran/mpif-h/get_elements_x_f.c index 9e25b4fb5d6..d90e3168386 100644 --- a/ompi/mpi/fortran/mpif-h/get_elements_x_f.c +++ b/ompi/mpi/fortran/mpif-h/get_elements_x_f.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/get_f.c b/ompi/mpi/fortran/mpif-h/get_f.c index afdf0e1bf35..e09c793360b 100644 --- a/ompi/mpi/fortran/mpif-h/get_f.c +++ b/ompi/mpi/fortran/mpif-h/get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -76,11 +76,11 @@ void ompi_get_f(char *origin_addr, MPI_Fint *origin_count, MPI_Datatype c_target_datatype = MPI_Type_f2c(*target_datatype); MPI_Win c_win = MPI_Win_f2c(*win); - c_ierr = MPI_Get(OMPI_F2C_BOTTOM(origin_addr), + c_ierr = MPI_Get(OMPI_F2C_BOTTOM(origin_addr), OMPI_FINT_2_INT(*origin_count), c_origin_datatype, OMPI_FINT_2_INT(*target_rank), - *target_disp, + *target_disp, OMPI_FINT_2_INT(*target_count), c_target_datatype, c_win); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/get_library_version_f.c b/ompi/mpi/fortran/mpif-h/get_library_version_f.c index dae22b97be2..3fa2910fcd9 100644 --- a/ompi/mpi/fortran/mpif-h/get_library_version_f.c +++ b/ompi/mpi/fortran/mpif-h/get_library_version_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ void ompi_get_library_version_f(char *version, MPI_Fint *resultlen, if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) { - ompi_fortran_string_c2f(c_version, version, + ompi_fortran_string_c2f(c_version, version, OMPI_FINT_2_INT(version_len)); *resultlen = OMPI_INT_2_FINT(c_resultlen); } diff --git a/ompi/mpi/fortran/mpif-h/get_processor_name_f.c b/ompi/mpi/fortran/mpif-h/get_processor_name_f.c index 2feb797c7c0..56cf1e69dd2 100644 --- a/ompi/mpi/fortran/mpif-h/get_processor_name_f.c +++ b/ompi/mpi/fortran/mpif-h/get_processor_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,7 +81,7 @@ void ompi_get_processor_name_f(char *name, MPI_Fint *resultlen, MPI_Fint *ierr, char c_name[MPI_MAX_PROCESSOR_NAME]; OMPI_SINGLE_NAME_DECL(resultlen); - ierr_c = MPI_Get_processor_name(c_name, + ierr_c = MPI_Get_processor_name(c_name, OMPI_SINGLE_NAME_CONVERT(resultlen)); if (MPI_SUCCESS == ierr_c) { diff --git a/ompi/mpi/fortran/mpif-h/get_version_f.c b/ompi/mpi/fortran/mpif-h/get_version_f.c index d15c29e46ac..bcc8faf8761 100644 --- a/ompi/mpi/fortran/mpif-h/get_version_f.c +++ b/ompi/mpi/fortran/mpif-h/get_version_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/graph_create_f.c b/ompi/mpi/fortran/mpif-h/graph_create_f.c index 35631475fc4..d386ce38933 100644 --- a/ompi/mpi/fortran/mpif-h/graph_create_f.c +++ b/ompi/mpi/fortran/mpif-h/graph_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -81,7 +81,7 @@ void ompi_graph_create_f(MPI_Fint *comm_old, MPI_Fint *nnodes, /* Number of edges is equal to the last entry in the index array */ OMPI_ARRAY_FINT_2_INT(edges, indx[*nnodes - 1]); - c_ierr = MPI_Graph_create(c_comm_old, + c_ierr = MPI_Graph_create(c_comm_old, OMPI_FINT_2_INT(*nnodes), OMPI_ARRAY_NAME_CONVERT(indx), OMPI_ARRAY_NAME_CONVERT(edges), diff --git a/ompi/mpi/fortran/mpif-h/graph_get_f.c b/ompi/mpi/fortran/mpif-h/graph_get_f.c index 247d82b3854..a7a195e11cf 100644 --- a/ompi/mpi/fortran/mpif-h/graph_get_f.c +++ b/ompi/mpi/fortran/mpif-h/graph_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,8 +64,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_GET, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_graph_get_f(MPI_Fint *comm, MPI_Fint *maxindex, - MPI_Fint *maxedges, MPI_Fint *indx, +void ompi_graph_get_f(MPI_Fint *comm, MPI_Fint *maxindex, + MPI_Fint *maxedges, MPI_Fint *indx, MPI_Fint *edges, MPI_Fint *ierr) { int c_ierr; @@ -77,7 +77,7 @@ void ompi_graph_get_f(MPI_Fint *comm, MPI_Fint *maxindex, OMPI_ARRAY_FINT_2_INT_ALLOC(indx, *maxindex); OMPI_ARRAY_FINT_2_INT_ALLOC(edges, *maxedges); - c_ierr = MPI_Graph_get(c_comm, + c_ierr = MPI_Graph_get(c_comm, OMPI_FINT_2_INT(*maxindex), OMPI_FINT_2_INT(*maxedges), OMPI_ARRAY_NAME_CONVERT(indx), diff --git a/ompi/mpi/fortran/mpif-h/graph_map_f.c b/ompi/mpi/fortran/mpif-h/graph_map_f.c index 4ab56eac402..10324cf41a3 100644 --- a/ompi/mpi/fortran/mpif-h/graph_map_f.c +++ b/ompi/mpi/fortran/mpif-h/graph_map_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/graph_neighbors_count_f.c b/ompi/mpi/fortran/mpif-h/graph_neighbors_count_f.c index 5bf7fa0c654..9e8b51824dc 100644 --- a/ompi/mpi/fortran/mpif-h/graph_neighbors_count_f.c +++ b/ompi/mpi/fortran/mpif-h/graph_neighbors_count_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -72,7 +72,7 @@ void ompi_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *rank, OMPI_SINGLE_NAME_DECL(nneighbors); c_comm = MPI_Comm_f2c(*comm); - + c_ierr = MPI_Graph_neighbors_count(c_comm, OMPI_FINT_2_INT(*rank), OMPI_SINGLE_NAME_CONVERT(nneighbors)); diff --git a/ompi/mpi/fortran/mpif-h/graph_neighbors_f.c b/ompi/mpi/fortran/mpif-h/graph_neighbors_f.c index be78a3b0bb6..6a03c640b5a 100644 --- a/ompi/mpi/fortran/mpif-h/graph_neighbors_f.c +++ b/ompi/mpi/fortran/mpif-h/graph_neighbors_f.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2013 Universite Bordeaux 1 * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_NEIGHBORS, #endif void ompi_graph_neighbors_f(MPI_Fint *comm, MPI_Fint *rank, - MPI_Fint *maxneighbors, MPI_Fint *neighbors, + MPI_Fint *maxneighbors, MPI_Fint *neighbors, MPI_Fint *ierr) { int c_ierr; @@ -75,10 +75,10 @@ void ompi_graph_neighbors_f(MPI_Fint *comm, MPI_Fint *rank, OMPI_ARRAY_NAME_DECL(neighbors); c_comm = MPI_Comm_f2c(*comm); - + OMPI_ARRAY_FINT_2_INT_ALLOC(neighbors, *maxneighbors); - - c_ierr = MPI_Graph_neighbors(c_comm, + + c_ierr = MPI_Graph_neighbors(c_comm, OMPI_FINT_2_INT(*rank), OMPI_FINT_2_INT(*maxneighbors), OMPI_ARRAY_NAME_CONVERT(neighbors) diff --git a/ompi/mpi/fortran/mpif-h/graphdims_get_f.c b/ompi/mpi/fortran/mpif-h/graphdims_get_f.c index 7517aa6752b..b9a3563b97a 100644 --- a/ompi/mpi/fortran/mpif-h/graphdims_get_f.c +++ b/ompi/mpi/fortran/mpif-h/graphdims_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -74,7 +74,7 @@ void ompi_graphdims_get_f(MPI_Fint *comm, MPI_Fint *nnodes, c_comm = MPI_Comm_f2c(*comm); - c_ierr = MPI_Graphdims_get(c_comm, + c_ierr = MPI_Graphdims_get(c_comm, OMPI_SINGLE_NAME_CONVERT(nnodes), OMPI_SINGLE_NAME_CONVERT(nedges) ); diff --git a/ompi/mpi/fortran/mpif-h/grequest_complete_f.c b/ompi/mpi/fortran/mpif-h/grequest_complete_f.c index acd6bf1b9ab..cbfa8e7e2b0 100644 --- a/ompi/mpi/fortran/mpif-h/grequest_complete_f.c +++ b/ompi/mpi/fortran/mpif-h/grequest_complete_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/grequest_start_f.c b/ompi/mpi/fortran/mpif-h/grequest_start_f.c index 051c6432c27..8b7ce8ffed4 100644 --- a/ompi/mpi/fortran/mpif-h/grequest_start_f.c +++ b/ompi/mpi/fortran/mpif-h/grequest_start_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ void ompi_grequest_start_f(MPI_F_Grequest_query_function* query_fn, c_ierr = MPI_Grequest_start( (MPI_Grequest_query_function *) query_fn, (MPI_Grequest_free_function *) free_fn, - (MPI_Grequest_cancel_function *) cancel_fn, + (MPI_Grequest_cancel_function *) cancel_fn, extra_state, &c_req); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_compare_f.c b/ompi/mpi/fortran/mpif-h/group_compare_f.c index d04abb3c59e..ee45a06e11b 100644 --- a/ompi/mpi/fortran/mpif-h/group_compare_f.c +++ b/ompi/mpi/fortran/mpif-h/group_compare_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -80,7 +80,7 @@ void ompi_group_compare_f(MPI_Fint *group1, MPI_Fint *group2, c_group1 = MPI_Group_f2c(*group1); c_group2 = MPI_Group_f2c(*group2); - c_ierr = MPI_Group_compare(c_group1, c_group2, + c_ierr = MPI_Group_compare(c_group1, c_group2, OMPI_SINGLE_NAME_CONVERT(result) ); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_difference_f.c b/ompi/mpi/fortran/mpif-h/group_difference_f.c index 293fe2f7cd1..eb1a255eaff 100644 --- a/ompi/mpi/fortran/mpif-h/group_difference_f.c +++ b/ompi/mpi/fortran/mpif-h/group_difference_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,12 +73,12 @@ void ompi_group_difference_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgr /* Make the fortran to c representation conversion */ c_group1 = MPI_Group_f2c(*group1); c_group2 = MPI_Group_f2c(*group2); - + c_ierr = MPI_Group_difference(c_group1, c_group2, &c_newgroup); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); /* translate the results from c to fortran */ if (MPI_SUCCESS == c_ierr) { - *newgroup = c_newgroup->grp_f_to_c_index; + *newgroup = c_newgroup->grp_f_to_c_index; } } diff --git a/ompi/mpi/fortran/mpif-h/group_excl_f.c b/ompi/mpi/fortran/mpif-h/group_excl_f.c index 05018b5ed46..2401f6ea7f0 100644 --- a/ompi/mpi/fortran/mpif-h/group_excl_f.c +++ b/ompi/mpi/fortran/mpif-h/group_excl_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GROUP_EXCL, #endif void ompi_group_excl_f(MPI_Fint *group, MPI_Fint *n, - MPI_Fint *ranks, MPI_Fint *newgroup, + MPI_Fint *ranks, MPI_Fint *newgroup, MPI_Fint *ierr) { int c_ierr; @@ -77,7 +77,7 @@ void ompi_group_excl_f(MPI_Fint *group, MPI_Fint *n, c_group = MPI_Group_f2c(*group); OMPI_ARRAY_FINT_2_INT(ranks, *n); - c_ierr = MPI_Group_excl(c_group, + c_ierr = MPI_Group_excl(c_group, OMPI_FINT_2_INT(*n), OMPI_ARRAY_NAME_CONVERT(ranks), &c_newgroup); diff --git a/ompi/mpi/fortran/mpif-h/group_free_f.c b/ompi/mpi/fortran/mpif-h/group_free_f.c index f7bd065dd64..56b03fc2091 100644 --- a/ompi/mpi/fortran/mpif-h/group_free_f.c +++ b/ompi/mpi/fortran/mpif-h/group_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/group_incl_f.c b/ompi/mpi/fortran/mpif-h/group_incl_f.c index 8da30db390b..f7ed8674dec 100644 --- a/ompi/mpi/fortran/mpif-h/group_incl_f.c +++ b/ompi/mpi/fortran/mpif-h/group_incl_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,12 +71,12 @@ void ompi_group_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranks, MPI_Fint * int c_ierr; ompi_group_t *c_group, *c_newgroup; OMPI_ARRAY_NAME_DECL(ranks); - + /* make the fortran to c representation conversion */ c_group = MPI_Group_f2c(*group); OMPI_ARRAY_FINT_2_INT(ranks, *n); - c_ierr = MPI_Group_incl(c_group, + c_ierr = MPI_Group_incl(c_group, OMPI_FINT_2_INT(*n), OMPI_ARRAY_NAME_CONVERT(ranks), &c_newgroup); diff --git a/ompi/mpi/fortran/mpif-h/group_intersection_f.c b/ompi/mpi/fortran/mpif-h/group_intersection_f.c index 42865325a6d..8676c15243a 100644 --- a/ompi/mpi/fortran/mpif-h/group_intersection_f.c +++ b/ompi/mpi/fortran/mpif-h/group_intersection_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_group_intersection_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *new /* Make the fortran to c representation conversion */ c_group1 = MPI_Group_f2c(*group1); c_group2 = MPI_Group_f2c(*group2); - + c_ierr = MPI_Group_intersection(c_group1, c_group2, &c_newgroup); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_range_excl_f.c b/ompi/mpi/fortran/mpif-h/group_range_excl_f.c index 2eebe63f905..c278db6cca1 100644 --- a/ompi/mpi/fortran/mpif-h/group_range_excl_f.c +++ b/ompi/mpi/fortran/mpif-h/group_range_excl_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -75,8 +75,8 @@ void ompi_group_range_excl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], c_group = MPI_Group_f2c(*group); OMPI_2_DIM_ARRAY_FINT_2_INT(ranges, *n, 3); - c_ierr = MPI_Group_range_excl(c_group, - OMPI_FINT_2_INT(*n), + c_ierr = MPI_Group_range_excl(c_group, + OMPI_FINT_2_INT(*n), OMPI_ARRAY_NAME_CONVERT(ranges), &c_newgroup); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_range_incl_f.c b/ompi/mpi/fortran/mpif-h/group_range_incl_f.c index 73aeac007da..c565751fa2b 100644 --- a/ompi/mpi/fortran/mpif-h/group_range_incl_f.c +++ b/ompi/mpi/fortran/mpif-h/group_range_incl_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -74,9 +74,9 @@ void ompi_group_range_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], /* Make the fortran to c representation conversion */ c_group = MPI_Group_f2c(*group); - OMPI_2_DIM_ARRAY_FINT_2_INT(ranges, *n, 3); - c_ierr = MPI_Group_range_incl(c_group, - OMPI_FINT_2_INT(*n), + OMPI_2_DIM_ARRAY_FINT_2_INT(ranges, *n, 3); + c_ierr = MPI_Group_range_incl(c_group, + OMPI_FINT_2_INT(*n), OMPI_ARRAY_NAME_CONVERT(ranges), &c_newgroup); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_rank_f.c b/ompi/mpi/fortran/mpif-h/group_rank_f.c index 674d4eadb84..077172f0de2 100644 --- a/ompi/mpi/fortran/mpif-h/group_rank_f.c +++ b/ompi/mpi/fortran/mpif-h/group_rank_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_group_rank_f(MPI_Fint *group, MPI_Fint *rank, MPI_Fint *ierr) /* Make the fortran to c representation conversion */ c_group = MPI_Group_f2c(*group); - + c_ierr = MPI_Group_rank(c_group, OMPI_SINGLE_NAME_CONVERT(rank)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_size_f.c b/ompi/mpi/fortran/mpif-h/group_size_f.c index 6286bf3be15..1d1e09a7879 100644 --- a/ompi/mpi/fortran/mpif-h/group_size_f.c +++ b/ompi/mpi/fortran/mpif-h/group_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_group_size_f(MPI_Fint *group, MPI_Fint *size, MPI_Fint *ierr) /* Make the fortran to c representation conversion */ c_group = MPI_Group_f2c(*group); - + c_ierr = MPI_Group_size(c_group, OMPI_SINGLE_NAME_CONVERT(size)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_translate_ranks_f.c b/ompi/mpi/fortran/mpif-h/group_translate_ranks_f.c index 0059997ca5e..a0fc998b651 100644 --- a/ompi/mpi/fortran/mpif-h/group_translate_ranks_f.c +++ b/ompi/mpi/fortran/mpif-h/group_translate_ranks_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GROUP_TRANSLATE_RANKS, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_group_translate_ranks_f(MPI_Fint *group1, MPI_Fint *n, +void ompi_group_translate_ranks_f(MPI_Fint *group1, MPI_Fint *n, MPI_Fint *ranks1, MPI_Fint *group2, MPI_Fint *ranks2, MPI_Fint *ierr) { @@ -81,10 +81,10 @@ void ompi_group_translate_ranks_f(MPI_Fint *group1, MPI_Fint *n, OMPI_ARRAY_FINT_2_INT(ranks1, *n); OMPI_ARRAY_FINT_2_INT_ALLOC(ranks2, *n); - c_ierr = MPI_Group_translate_ranks(c_group1, + c_ierr = MPI_Group_translate_ranks(c_group1, OMPI_FINT_2_INT(*n), - OMPI_ARRAY_NAME_CONVERT(ranks1), - c_group2, + OMPI_ARRAY_NAME_CONVERT(ranks1), + c_group2, OMPI_ARRAY_NAME_CONVERT(ranks2) ); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/group_union_f.c b/ompi/mpi/fortran/mpif-h/group_union_f.c index 4e993cb5fab..fb7975df2b7 100644 --- a/ompi/mpi/fortran/mpif-h/group_union_f.c +++ b/ompi/mpi/fortran/mpif-h/group_union_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_group_union_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, /* Make the fortran to c representation conversion */ c_group1 = MPI_Group_f2c(*group1); c_group2 = MPI_Group_f2c(*group2); - + c_ierr = MPI_Group_union(c_group1, c_group2, &c_newgroup); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/iallgather_f.c b/ompi/mpi/fortran/mpif-h/iallgather_f.c index 7be043cffe3..e3ba9dc9c1b 100644 --- a/ompi/mpi/fortran/mpif-h/iallgather_f.c +++ b/ompi/mpi/fortran/mpif-h/iallgather_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -84,7 +84,7 @@ void ompi_iallgather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, ierr_c = MPI_Iallgather(sendbuf, OMPI_FINT_2_INT(*sendcount), - c_sendtype, + c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, c_comm, &c_req); diff --git a/ompi/mpi/fortran/mpif-h/iallgatherv_f.c b/ompi/mpi/fortran/mpif-h/iallgatherv_f.c index 9f478441f17..7ae3a972ac1 100644 --- a/ompi/mpi/fortran/mpif-h/iallgatherv_f.c +++ b/ompi/mpi/fortran/mpif-h/iallgatherv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/iallreduce_f.c b/ompi/mpi/fortran/mpif-h/iallreduce_f.c index ea657ce8ace..1d6f1b62dba 100644 --- a/ompi/mpi/fortran/mpif-h/iallreduce_f.c +++ b/ompi/mpi/fortran/mpif-h/iallreduce_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/ialltoall_f.c b/ompi/mpi/fortran/mpif-h/ialltoall_f.c index 89c90782841..4e2f5380916 100644 --- a/ompi/mpi/fortran/mpif-h/ialltoall_f.c +++ b/ompi/mpi/fortran/mpif-h/ialltoall_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -84,8 +84,8 @@ void ompi_ialltoall_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, c_ierr = MPI_Ialltoall(sendbuf, OMPI_FINT_2_INT(*sendcount), - c_sendtype, - recvbuf, + c_sendtype, + recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, c_comm, &c_req); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/ialltoallv_f.c b/ompi/mpi/fortran/mpif-h/ialltoallv_f.c index e63d0fa255e..6622d2b8ded 100644 --- a/ompi/mpi/fortran/mpif-h/ialltoallv_f.c +++ b/ompi/mpi/fortran/mpif-h/ialltoallv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IALLTOALLV, void ompi_ialltoallv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, - MPI_Fint *rdispls, MPI_Fint *recvtype, + MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { MPI_Comm c_comm; @@ -93,11 +93,11 @@ void ompi_ialltoallv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = MPI_Ialltoallv(sendbuf, + c_ierr = MPI_Ialltoallv(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), - OMPI_ARRAY_NAME_CONVERT(sdispls), - c_sendtype, - recvbuf, + OMPI_ARRAY_NAME_CONVERT(sdispls), + c_sendtype, + recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(rdispls), c_recvtype, c_comm, &c_request); diff --git a/ompi/mpi/fortran/mpif-h/ialltoallw_f.c b/ompi/mpi/fortran/mpif-h/ialltoallw_f.c index 4995f8b198c..f695fd056e7 100644 --- a/ompi/mpi/fortran/mpif-h/ialltoallw_f.c +++ b/ompi/mpi/fortran/mpif-h/ialltoallw_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IALLTOALLW, #endif void ompi_ialltoallw_f(char *sendbuf, MPI_Fint *sendcounts, - MPI_Fint *sdispls, MPI_Fint *sendtypes, + MPI_Fint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) @@ -101,11 +101,11 @@ void ompi_ialltoallw_f(char *sendbuf, MPI_Fint *sendcounts, sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = MPI_Ialltoallw(sendbuf, + c_ierr = MPI_Ialltoallw(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), OMPI_ARRAY_NAME_CONVERT(sdispls), - c_sendtypes, - recvbuf, + c_sendtypes, + recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(rdispls), c_recvtypes, c_comm, &c_request); diff --git a/ompi/mpi/fortran/mpif-h/ibarrier_f.c b/ompi/mpi/fortran/mpif-h/ibarrier_f.c index f8d0e124db1..0d737356a4c 100644 --- a/ompi/mpi/fortran/mpif-h/ibarrier_f.c +++ b/ompi/mpi/fortran/mpif-h/ibarrier_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/ibcast_f.c b/ompi/mpi/fortran/mpif-h/ibcast_f.c index 44a48c16d40..513a2858667 100644 --- a/ompi/mpi/fortran/mpif-h/ibcast_f.c +++ b/ompi/mpi/fortran/mpif-h/ibcast_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IBCAST, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_ibcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, +void ompi_ibcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { @@ -77,8 +77,8 @@ void ompi_ibcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, c_comm = MPI_Comm_f2c(*comm); c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_Ibcast(OMPI_F2C_BOTTOM(buffer), - OMPI_FINT_2_INT(*count), + c_ierr = MPI_Ibcast(OMPI_F2C_BOTTOM(buffer), + OMPI_FINT_2_INT(*count), c_type, OMPI_FINT_2_INT(*root), c_comm, diff --git a/ompi/mpi/fortran/mpif-h/ibsend_f.c b/ompi/mpi/fortran/mpif-h/ibsend_f.c index dd3e4676c7c..e1183ff47fe 100644 --- a/ompi/mpi/fortran/mpif-h/ibsend_f.c +++ b/ompi/mpi/fortran/mpif-h/ibsend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IBSEND, #endif void ompi_ibsend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, - MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, + MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/iexscan_f.c b/ompi/mpi/fortran/mpif-h/iexscan_f.c index aab1dd3a92d..88ef73b7ef4 100644 --- a/ompi/mpi/fortran/mpif-h/iexscan_f.c +++ b/ompi/mpi/fortran/mpif-h/iexscan_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -74,7 +74,7 @@ void ompi_iexscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Datatype c_type; MPI_Request c_request; MPI_Op c_op; - + c_comm = MPI_Comm_f2c(*comm); c_type = MPI_Type_f2c(*datatype); c_op = MPI_Op_f2c(*op); @@ -83,7 +83,7 @@ void ompi_iexscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, sendbuf = (char *) OMPI_F2C_BOTTOM (sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM (recvbuf); - c_ierr = MPI_Iexscan(sendbuf, recvbuf, + c_ierr = MPI_Iexscan(sendbuf, recvbuf, OMPI_FINT_2_INT(*count), c_type, c_op, c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/igather_f.c b/ompi/mpi/fortran/mpif-h/igather_f.c index cf6fef99e25..a2c6b13a906 100644 --- a/ompi/mpi/fortran/mpif-h/igather_f.c +++ b/ompi/mpi/fortran/mpif-h/igather_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,8 +66,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IGATHER, #endif void ompi_igather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, - char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, - MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, + char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, + MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; @@ -84,7 +84,7 @@ void ompi_igather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); c_ierr = MPI_Igather(sendbuf, OMPI_FINT_2_INT(*sendcount), - c_sendtype, recvbuf, + c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), c_recvtype, OMPI_FINT_2_INT(*root), diff --git a/ompi/mpi/fortran/mpif-h/igatherv_f.c b/ompi/mpi/fortran/mpif-h/igatherv_f.c index 1c07ed5804b..fb38c80bbe7 100644 --- a/ompi/mpi/fortran/mpif-h/igatherv_f.c +++ b/ompi/mpi/fortran/mpif-h/igatherv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -80,7 +80,7 @@ void ompi_igatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, c_comm = MPI_Comm_f2c(*comm); c_sendtype = MPI_Type_f2c(*sendtype); c_recvtype = MPI_Type_f2c(*recvtype); - + MPI_Comm_size(c_comm, &size); OMPI_ARRAY_FINT_2_INT(recvcounts, size); OMPI_ARRAY_FINT_2_INT(displs, size); @@ -93,7 +93,7 @@ void ompi_igatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, c_sendtype, recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(displs), - c_recvtype, + c_recvtype, OMPI_FINT_2_INT(*root), c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/improbe_f.c b/ompi/mpi/fortran/mpif-h/improbe_f.c index 44901e34039..c3057c74f7b 100644 --- a/ompi/mpi/fortran/mpif-h/improbe_f.c +++ b/ompi/mpi/fortran/mpif-h/improbe_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_IMPROBE, pmpi_improbe_, pmpi_improbe__, pompi_improbe_f, - (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, + (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr), (source, tag, comm, flag, message, status, ierr) ) #endif @@ -54,7 +54,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IMPROBE, mpi_improbe_, mpi_improbe__, ompi_improbe_f, - (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, + (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr), (source, tag, comm, flag, message, status, ierr) ) #endif @@ -89,6 +89,6 @@ void ompi_improbe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, if (OMPI_FORTRAN_VALUE_TRUE == *flag) { OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) *message = MPI_Message_c2f(c_message); - } + } } } diff --git a/ompi/mpi/fortran/mpif-h/imrecv_f.c b/ompi/mpi/fortran/mpif-h/imrecv_f.c index 92f9657d395..dd6761039d2 100644 --- a/ompi/mpi/fortran/mpif-h/imrecv_f.c +++ b/ompi/mpi/fortran/mpif-h/imrecv_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/info_create_f.c b/ompi/mpi/fortran/mpif-h/info_create_f.c index 1ebeb795475..32a270e6aec 100644 --- a/ompi/mpi/fortran/mpif-h/info_create_f.c +++ b/ompi/mpi/fortran/mpif-h/info_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/info_delete_f.c b/ompi/mpi/fortran/mpif-h/info_delete_f.c index e4d3be849b6..65fbdc67c8c 100644 --- a/ompi/mpi/fortran/mpif-h/info_delete_f.c +++ b/ompi/mpi/fortran/mpif-h/info_delete_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -86,7 +86,7 @@ void ompi_info_delete_f(MPI_Fint *info, char *key, MPI_Fint *ierr, int key_len) return; } c_info = MPI_Info_f2c(*info); - + c_ierr = MPI_Info_delete(c_info, c_key); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/info_dup_f.c b/ompi/mpi/fortran/mpif-h/info_dup_f.c index de43fbc86b5..72f1a708263 100644 --- a/ompi/mpi/fortran/mpif-h/info_dup_f.c +++ b/ompi/mpi/fortran/mpif-h/info_dup_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/info_free_f.c b/ompi/mpi/fortran/mpif-h/info_free_f.c index 732cf97e9fa..81a83b7ee4c 100644 --- a/ompi/mpi/fortran/mpif-h/info_free_f.c +++ b/ompi/mpi/fortran/mpif-h/info_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/info_get_f.c b/ompi/mpi/fortran/mpif-h/info_get_f.c index bcfa9bbb50d..6cd014cb599 100644 --- a/ompi/mpi/fortran/mpif-h/info_get_f.c +++ b/ompi/mpi/fortran/mpif-h/info_get_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -105,7 +105,7 @@ void ompi_info_get_f(MPI_Fint *info, char *key, MPI_Fint *valuelen, Fortran compilers have TRUE == 1). Note: use the full length of the Fortran string, not *valuelen. See comment in ompi/mpi/fortran/base/strings.c. */ - if (*flag && OMPI_SUCCESS != + if (*flag && OMPI_SUCCESS != (ret = ompi_fortran_string_c2f(c_value, value, value_len))) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/info_get_nkeys_f.c b/ompi/mpi/fortran/mpif-h/info_get_nkeys_f.c index 1efc9882617..d761871797d 100644 --- a/ompi/mpi/fortran/mpif-h/info_get_nkeys_f.c +++ b/ompi/mpi/fortran/mpif-h/info_get_nkeys_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_info_get_nkeys_f(MPI_Fint *info, MPI_Fint *nkeys, MPI_Fint *ierr) OMPI_SINGLE_NAME_DECL(nkeys); c_info = MPI_Info_f2c(*info); - + c_ierr = MPI_Info_get_nkeys(c_info, OMPI_SINGLE_NAME_CONVERT(nkeys)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/info_get_nthkey_f.c b/ompi/mpi/fortran/mpif-h/info_get_nthkey_f.c index e764aa1d11f..15b4ae8e7f5 100644 --- a/ompi/mpi/fortran/mpif-h/info_get_nthkey_f.c +++ b/ompi/mpi/fortran/mpif-h/info_get_nthkey_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -82,12 +82,12 @@ void ompi_info_get_nthkey_f(MPI_Fint *info, MPI_Fint *n, char *key, char c_key[MPI_MAX_INFO_KEY + 1]; c_info = MPI_Info_f2c(*info); - - c_ierr = MPI_Info_get_nthkey(c_info, + + c_ierr = MPI_Info_get_nthkey(c_info, OMPI_FINT_2_INT(*n), c_key); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (OMPI_SUCCESS != (ret = ompi_fortran_string_c2f(c_key, key, key_len))) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/info_get_valuelen_f.c b/ompi/mpi/fortran/mpif-h/info_get_valuelen_f.c index 16db83e8724..2edf9b6fe7c 100644 --- a/ompi/mpi/fortran/mpif-h/info_get_valuelen_f.c +++ b/ompi/mpi/fortran/mpif-h/info_get_valuelen_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/info_set_f.c b/ompi/mpi/fortran/mpif-h/info_set_f.c index 54f822abfe2..6aff0ccb5a2 100644 --- a/ompi/mpi/fortran/mpif-h/info_set_f.c +++ b/ompi/mpi/fortran/mpif-h/info_set_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -82,7 +82,7 @@ void ompi_info_set_f(MPI_Fint *info, char *key, char *value, MPI_Fint *ierr, char *c_key = NULL, *c_value = NULL; if (OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(key, key_len, &c_key)) || - OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(value, value_len, + OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(value, value_len, &c_value))) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/init_f.c b/ompi/mpi/fortran/mpif-h/init_f.c index c5b10c69388..8ad33b80926 100644 --- a/ompi/mpi/fortran/mpif-h/init_f.c +++ b/ompi/mpi/fortran/mpif-h/init_f.c @@ -5,16 +5,16 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/init_thread_f.c b/ompi/mpi/fortran/mpif-h/init_thread_f.c index be6f625b90d..80ba58db412 100644 --- a/ompi/mpi/fortran/mpif-h/init_thread_f.c +++ b/ompi/mpi/fortran/mpif-h/init_thread_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_init_thread_f( MPI_Fint *required, MPI_Fint *provided, MPI_Fint *ierr char** argv = NULL; OMPI_SINGLE_NAME_DECL(provided); - c_ierr = MPI_Init_thread(&argc, &argv, + c_ierr = MPI_Init_thread(&argc, &argv, OMPI_FINT_2_INT(*required), OMPI_SINGLE_NAME_CONVERT(provided)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/initialized_f.c b/ompi/mpi/fortran/mpif-h/initialized_f.c index 212331fa6c7..4902abbe270 100644 --- a/ompi/mpi/fortran/mpif-h/initialized_f.c +++ b/ompi/mpi/fortran/mpif-h/initialized_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/intercomm_create_f.c b/ompi/mpi/fortran/mpif-h/intercomm_create_f.c index 63861e1386c..819696e87ef 100644 --- a/ompi/mpi/fortran/mpif-h/intercomm_create_f.c +++ b/ompi/mpi/fortran/mpif-h/intercomm_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,9 +65,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INTERCOMM_CREATE, #endif void ompi_intercomm_create_f(MPI_Fint *local_comm, MPI_Fint *local_leader, - MPI_Fint *bridge_comm, + MPI_Fint *bridge_comm, MPI_Fint *remote_leader, MPI_Fint *tag, - MPI_Fint *newintercomm, + MPI_Fint *newintercomm, MPI_Fint *ierr) { int c_ierr; @@ -76,7 +76,7 @@ void ompi_intercomm_create_f(MPI_Fint *local_comm, MPI_Fint *local_leader, MPI_Comm c_bridge_comm = MPI_Comm_f2c (*bridge_comm); c_ierr = MPI_Intercomm_create(c_local_comm, - OMPI_FINT_2_INT(*local_leader), + OMPI_FINT_2_INT(*local_leader), c_bridge_comm, OMPI_FINT_2_INT(*remote_leader), OMPI_FINT_2_INT(*tag), diff --git a/ompi/mpi/fortran/mpif-h/intercomm_merge_f.c b/ompi/mpi/fortran/mpif-h/intercomm_merge_f.c index 6800d40879d..6564d7d6e13 100644 --- a/ompi/mpi/fortran/mpif-h/intercomm_merge_f.c +++ b/ompi/mpi/fortran/mpif-h/intercomm_merge_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INTERCOMM_MERGE, #endif void ompi_intercomm_merge_f(MPI_Fint *intercomm, ompi_fortran_logical_t *high, - MPI_Fint *newintracomm, + MPI_Fint *newintracomm, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/iprobe_f.c b/ompi/mpi/fortran/mpif-h/iprobe_f.c index c5d03797e26..632d544c0f1 100644 --- a/ompi/mpi/fortran/mpif-h/iprobe_f.c +++ b/ompi/mpi/fortran/mpif-h/iprobe_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/irecv_f.c b/ompi/mpi/fortran/mpif-h/irecv_f.c index 4fde92a12d1..5e57d2ce0a7 100644 --- a/ompi/mpi/fortran/mpif-h/irecv_f.c +++ b/ompi/mpi/fortran/mpif-h/irecv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/ireduce_f.c b/ompi/mpi/fortran/mpif-h/ireduce_f.c index e5428ff3f62..5314b61231d 100644 --- a/ompi/mpi/fortran/mpif-h/ireduce_f.c +++ b/ompi/mpi/fortran/mpif-h/ireduce_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,8 +66,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IREDUCE, #endif void ompi_ireduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *op, - MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, + MPI_Fint *datatype, MPI_Fint *op, + MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; @@ -86,7 +86,7 @@ void ompi_ireduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count, c_ierr = MPI_Ireduce(sendbuf, recvbuf, OMPI_FINT_2_INT(*count), - c_type, c_op, + c_type, c_op, OMPI_FINT_2_INT(*root), c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/ireduce_scatter_block_f.c b/ompi/mpi/fortran/mpif-h/ireduce_scatter_block_f.c index ce6958faf91..33a56a5c9f8 100644 --- a/ompi/mpi/fortran/mpif-h/ireduce_scatter_block_f.c +++ b/ompi/mpi/fortran/mpif-h/ireduce_scatter_block_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,9 +65,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IREDUCE_SCATTER_BLOCK, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_ireduce_scatter_block_f(char *sendbuf, char *recvbuf, +void ompi_ireduce_scatter_block_f(char *sendbuf, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *datatype, - MPI_Fint *op, MPI_Fint *comm, + MPI_Fint *op, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; @@ -86,8 +86,8 @@ void ompi_ireduce_scatter_block_f(char *sendbuf, char *recvbuf, sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - - c_ierr = MPI_Ireduce_scatter_block(sendbuf, recvbuf, + + c_ierr = MPI_Ireduce_scatter_block(sendbuf, recvbuf, OMPI_FINT_2_INT(*recvcount), c_type, c_op, c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/ireduce_scatter_f.c b/ompi/mpi/fortran/mpif-h/ireduce_scatter_f.c index ab87b09f8e6..08d21aba0e7 100644 --- a/ompi/mpi/fortran/mpif-h/ireduce_scatter_f.c +++ b/ompi/mpi/fortran/mpif-h/ireduce_scatter_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,9 +65,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_IREDUCE_SCATTER, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_ireduce_scatter_f(char *sendbuf, char *recvbuf, +void ompi_ireduce_scatter_f(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, - MPI_Fint *op, MPI_Fint *comm, MPI_Fint *request, + MPI_Fint *op, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; @@ -88,7 +88,7 @@ void ompi_ireduce_scatter_f(char *sendbuf, char *recvbuf, sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - + c_ierr = MPI_Ireduce_scatter(sendbuf, recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), c_type, c_op, c_comm, &c_request); diff --git a/ompi/mpi/fortran/mpif-h/irsend_f.c b/ompi/mpi/fortran/mpif-h/irsend_f.c index e4316491a6b..00010eda0f4 100644 --- a/ompi/mpi/fortran/mpif-h/irsend_f.c +++ b/ompi/mpi/fortran/mpif-h/irsend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/is_thread_main_f.c b/ompi/mpi/fortran/mpif-h/is_thread_main_f.c index 39cf69e8f50..78a4031ef13 100644 --- a/ompi/mpi/fortran/mpif-h/is_thread_main_f.c +++ b/ompi/mpi/fortran/mpif-h/is_thread_main_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/iscan_f.c b/ompi/mpi/fortran/mpif-h/iscan_f.c index 442494764d0..306bfeffc9d 100644 --- a/ompi/mpi/fortran/mpif-h/iscan_f.c +++ b/ompi/mpi/fortran/mpif-h/iscan_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -82,10 +82,10 @@ void ompi_iscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - + c_ierr = MPI_Iscan(sendbuf, recvbuf, OMPI_FINT_2_INT(*count), - c_type, c_op, + c_type, c_op, c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) *request = MPI_Request_c2f(c_request); diff --git a/ompi/mpi/fortran/mpif-h/iscatter_f.c b/ompi/mpi/fortran/mpif-h/iscatter_f.c index 6cd7323b479..08ecec88271 100644 --- a/ompi/mpi/fortran/mpif-h/iscatter_f.c +++ b/ompi/mpi/fortran/mpif-h/iscatter_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,28 +65,28 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ISCATTER, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_iscatter_f(char *sendbuf, MPI_Fint *sendcount, +void ompi_iscatter_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, - MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, + MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; MPI_Datatype c_sendtype, c_recvtype; MPI_Request c_request; MPI_Comm c_comm = MPI_Comm_f2c(*comm); - + c_sendtype = MPI_Type_f2c(*sendtype); c_recvtype = MPI_Type_f2c(*recvtype); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - + c_ierr = MPI_Iscatter(sendbuf,OMPI_FINT_2_INT(*sendcount), - c_sendtype, recvbuf, + c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), - c_recvtype, + c_recvtype, OMPI_FINT_2_INT(*root), c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) *request = MPI_Request_c2f(c_request); diff --git a/ompi/mpi/fortran/mpif-h/iscatterv_f.c b/ompi/mpi/fortran/mpif-h/iscatterv_f.c index a4c84ca7df8..07412b59ab6 100644 --- a/ompi/mpi/fortran/mpif-h/iscatterv_f.c +++ b/ompi/mpi/fortran/mpif-h/iscatterv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ISCATTERV, void ompi_iscatterv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *displs, MPI_Fint *sendtype, - char *recvbuf, MPI_Fint *recvcount, + char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { @@ -89,13 +89,13 @@ void ompi_iscatterv_f(char *sendbuf, MPI_Fint *sendcounts, sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - - c_ierr = MPI_Iscatterv(sendbuf, + + c_ierr = MPI_Iscatterv(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), OMPI_ARRAY_NAME_CONVERT(displs), c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), - c_recvtype, + c_recvtype, OMPI_FINT_2_INT(*root), c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) *request = MPI_Request_c2f(c_request); diff --git a/ompi/mpi/fortran/mpif-h/isend_f.c b/ompi/mpi/fortran/mpif-h/isend_f.c index 30fe99e5c59..08ed1466560 100644 --- a/ompi/mpi/fortran/mpif-h/isend_f.c +++ b/ompi/mpi/fortran/mpif-h/isend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/issend_f.c b/ompi/mpi/fortran/mpif-h/issend_f.c index c2ca666128b..ae201621ce5 100644 --- a/ompi/mpi/fortran/mpif-h/issend_f.c +++ b/ompi/mpi/fortran/mpif-h/issend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/keyval_create_f.c b/ompi/mpi/fortran/mpif-h/keyval_create_f.c index 086537668af..3cb571c8012 100644 --- a/ompi/mpi/fortran/mpif-h/keyval_create_f.c +++ b/ompi/mpi/fortran/mpif-h/keyval_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,7 +69,7 @@ static const char FUNC_NAME[] = "MPI_keyval_create_f"; void ompi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn, ompi_mpi1_fortran_delete_attr_function* delete_attr_fn, - MPI_Fint *keyval, MPI_Fint *extra_state, + MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr) { int ret, c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/keyval_free_f.c b/ompi/mpi/fortran/mpif-h/keyval_free_f.c index cdfb3153e3d..aa3fde3e54a 100644 --- a/ompi/mpi/fortran/mpif-h/keyval_free_f.c +++ b/ompi/mpi/fortran/mpif-h/keyval_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/lookup_name_f.c b/ompi/mpi/fortran/mpif-h/lookup_name_f.c index 345d3eeb5fb..62fd02b6a64 100644 --- a/ompi/mpi/fortran/mpif-h/lookup_name_f.c +++ b/ompi/mpi/fortran/mpif-h/lookup_name_f.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -90,7 +90,7 @@ void ompi_lookup_name_f(char *service_name, MPI_Fint *info, if ( MPI_SUCCESS == c_ierr) { ompi_fortran_string_c2f(c_port_name, port_name, port_name_len); - } + } free (c_service_name); free (c_port_name); } diff --git a/ompi/mpi/fortran/mpif-h/mprobe_f.c b/ompi/mpi/fortran/mpif-h/mprobe_f.c index 660869453b6..a135d20d6a1 100644 --- a/ompi/mpi/fortran/mpif-h/mprobe_f.c +++ b/ompi/mpi/fortran/mpif-h/mprobe_f.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,7 +40,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_MPROBE, pmpi_mprobe_, pmpi_mprobe__, pompi_mprobe_f, - (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message, + (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr), (source, tag, comm, message, status, ierr) ) #endif @@ -58,7 +58,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_MPROBE, mpi_mprobe_, mpi_mprobe__, ompi_mprobe_f, - (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message, + (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr), (source, tag, comm, message, status, ierr) ) #endif @@ -68,9 +68,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_MPROBE, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_mprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, +void ompi_mprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr) -{ +{ MPI_Comm c_comm; MPI_Message c_message; OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) diff --git a/ompi/mpi/fortran/mpif-h/mrecv_f.c b/ompi/mpi/fortran/mpif-h/mrecv_f.c index aec45283f22..a5a1e4b8bb0 100644 --- a/ompi/mpi/fortran/mpif-h/mrecv_f.c +++ b/ompi/mpi/fortran/mpif-h/mrecv_f.c @@ -5,16 +5,16 @@ * 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, + * 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) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,7 +64,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_MRECV, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_mrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, +void ompi_mrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/op_commutative_f.c b/ompi/mpi/fortran/mpif-h/op_commutative_f.c index 63644c0237c..d93963ea7b9 100644 --- a/ompi/mpi/fortran/mpif-h/op_commutative_f.c +++ b/ompi/mpi/fortran/mpif-h/op_commutative_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/op_create_f.c b/ompi/mpi/fortran/mpif-h/op_create_f.c index b192426028f..639db401380 100644 --- a/ompi/mpi/fortran/mpif-h/op_create_f.c +++ b/ompi/mpi/fortran/mpif-h/op_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/op_free_f.c b/ompi/mpi/fortran/mpif-h/op_free_f.c index 27c86a4c2e6..7277f23cabf 100644 --- a/ompi/mpi/fortran/mpif-h/op_free_f.c +++ b/ompi/mpi/fortran/mpif-h/op_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/open_port_f.c b/ompi/mpi/fortran/mpif-h/open_port_f.c index bf04d7879c2..c38642b5727 100644 --- a/ompi/mpi/fortran/mpif-h/open_port_f.c +++ b/ompi/mpi/fortran/mpif-h/open_port_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/pack_external_f.c b/ompi/mpi/fortran/mpif-h/pack_external_f.c index c6ff45fd59c..5c9e71e3abb 100644 --- a/ompi/mpi/fortran/mpif-h/pack_external_f.c +++ b/ompi/mpi/fortran/mpif-h/pack_external_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -40,7 +40,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_PACK_EXTERNAL, pmpi_pack_external__, pompi_pack_external_f, (char *datarep, char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, char *outbuf, MPI_Aint *outsize, MPI_Aint *position, MPI_Fint *ierr, int datarep_len), - (datarep, inbuf, incount, datatype, outbuf, outsize, position, ierr, datarep_len) ) + (datarep, inbuf, incount, datatype, outbuf, outsize, position, ierr, datarep_len) ) #endif #if OPAL_HAVE_WEAK_SYMBOLS @@ -69,16 +69,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL, #endif void ompi_pack_external_f(char *datarep, char *inbuf, MPI_Fint *incount, - MPI_Fint *datatype, char *outbuf, + MPI_Fint *datatype, char *outbuf, MPI_Aint *outsize, MPI_Aint *position, MPI_Fint *ierr, int datarep_len) { int ret, c_ierr; char *c_datarep; MPI_Datatype type = MPI_Type_f2c(*datatype); - + /* Convert the fortran string */ - + if (OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(datarep, datarep_len, &c_datarep))) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, @@ -86,7 +86,7 @@ void ompi_pack_external_f(char *datarep, char *inbuf, MPI_Fint *incount, if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); return; } - + c_ierr = MPI_Pack_external(c_datarep, OMPI_F2C_BOTTOM(inbuf), OMPI_FINT_2_INT(*incount), type, outbuf, diff --git a/ompi/mpi/fortran/mpif-h/pack_external_size_f.c b/ompi/mpi/fortran/mpif-h/pack_external_size_f.c index f9428c73b27..b2a06187b2d 100644 --- a/ompi/mpi/fortran/mpif-h/pack_external_size_f.c +++ b/ompi/mpi/fortran/mpif-h/pack_external_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -77,7 +77,7 @@ void ompi_pack_external_size_f(char *datarep, MPI_Fint *incount, MPI_Datatype type = MPI_Type_f2c(*datatype); /* Convert the fortran string */ - + if (OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(datarep, datarep_len, &c_datarep))) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, @@ -86,7 +86,7 @@ void ompi_pack_external_size_f(char *datarep, MPI_Fint *incount, return; } - c_ierr = MPI_Pack_external_size(c_datarep, + c_ierr = MPI_Pack_external_size(c_datarep, OMPI_FINT_2_INT(*incount), type, size); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/pack_f.c b/ompi/mpi/fortran/mpif-h/pack_f.c index 1c1dbe76fa4..0aa61328d0d 100644 --- a/ompi/mpi/fortran/mpif-h/pack_f.c +++ b/ompi/mpi/fortran/mpif-h/pack_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK, #endif void ompi_pack_f(char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, - char *outbuf, MPI_Fint *outsize, MPI_Fint *position, + char *outbuf, MPI_Fint *outsize, MPI_Fint *position, MPI_Fint *comm, MPI_Fint *ierr) { int c_ierr; @@ -77,15 +77,15 @@ void ompi_pack_f(char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, c_comm = MPI_Comm_f2c(*comm); c_type = MPI_Type_f2c(*datatype); OMPI_SINGLE_FINT_2_INT(position); - + c_ierr = MPI_Pack(OMPI_F2C_BOTTOM(inbuf), OMPI_FINT_2_INT(*incount), c_type, outbuf, OMPI_FINT_2_INT(*outsize), OMPI_SINGLE_NAME_CONVERT(position), c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { - OMPI_SINGLE_INT_2_FINT(position); + OMPI_SINGLE_INT_2_FINT(position); } } diff --git a/ompi/mpi/fortran/mpif-h/pack_size_f.c b/ompi/mpi/fortran/mpif-h/pack_size_f.c index 578d40a3363..a489231f59b 100644 --- a/ompi/mpi/fortran/mpif-h/pack_size_f.c +++ b/ompi/mpi/fortran/mpif-h/pack_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,19 +64,19 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_SIZE, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_pack_size_f(MPI_Fint *incount, MPI_Fint *datatype, +void ompi_pack_size_f(MPI_Fint *incount, MPI_Fint *datatype, MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr) { int c_ierr; MPI_Comm c_comm; MPI_Datatype c_type; OMPI_SINGLE_NAME_DECL(size); - + c_comm = MPI_Comm_f2c(*comm); c_type = MPI_Type_f2c(*datatype); c_ierr = MPI_Pack_size(OMPI_FINT_2_INT(*incount), - c_type, c_comm, + c_type, c_comm, OMPI_SINGLE_NAME_CONVERT(size)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/pcontrol_f.c b/ompi/mpi/fortran/mpif-h/pcontrol_f.c index a0565ebfec3..1c59048bfd7 100644 --- a/ompi/mpi/fortran/mpif-h/pcontrol_f.c +++ b/ompi/mpi/fortran/mpif-h/pcontrol_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/probe_f.c b/ompi/mpi/fortran/mpif-h/probe_f.c index 783b397bf84..45cbd0ea3d1 100644 --- a/ompi/mpi/fortran/mpif-h/probe_f.c +++ b/ompi/mpi/fortran/mpif-h/probe_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,7 +69,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PROBE, #endif void ompi_probe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr) -{ +{ int c_ierr; MPI_Comm c_comm; OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 26ba8e6b436..81c542962ce 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -6,7 +6,7 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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. @@ -18,9 +18,9 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -31,7 +31,7 @@ libmpi_mpifh_pmpi_la_LIBADD = # # OMPI_PROFILING_DEFINES flag is enabled when we want our MPI_* symbols -# to be replaced by PMPI_*. In other words, this flag decides +# to be replaced by PMPI_*. In other words, this flag decides # whether "profile/defines.h" is included or not. "profile/defines.h" # replaces all MPI_* symbols with PMPI_* symbols. In this directory # we definately need it to be 1. diff --git a/ompi/mpi/fortran/mpif-h/profile/defines.h b/ompi/mpi/fortran/mpif-h/profile/defines.h index f169ea1fc29..a45b9c82aaf 100644 --- a/ompi/mpi/fortran/mpif-h/profile/defines.h +++ b/ompi/mpi/fortran/mpif-h/profile/defines.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPI_F77_PROFILE_DEFINES_H diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index 9299a4a1483..d02c2baaf60 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file prototypes all MPI fortran functions in all four fortran diff --git a/ompi/mpi/fortran/mpif-h/publish_name_f.c b/ompi/mpi/fortran/mpif-h/publish_name_f.c index 0dba2c12f70..195ab169e55 100644 --- a/ompi/mpi/fortran/mpif-h/publish_name_f.c +++ b/ompi/mpi/fortran/mpif-h/publish_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/put_f.c b/ompi/mpi/fortran/mpif-h/put_f.c index 7a18dfbb67c..54b947e0bb9 100644 --- a/ompi/mpi/fortran/mpif-h/put_f.c +++ b/ompi/mpi/fortran/mpif-h/put_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -80,7 +80,7 @@ void ompi_put_f(char *origin_addr, MPI_Fint *origin_count, OMPI_FINT_2_INT(*origin_count), c_origin_datatype, OMPI_FINT_2_INT(*target_rank), - *target_disp, + *target_disp, OMPI_FINT_2_INT(*target_count), c_target_datatype, c_win); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/query_thread_f.c b/ompi/mpi/fortran/mpif-h/query_thread_f.c index f0aa8b6a93a..118eca12b70 100644 --- a/ompi/mpi/fortran/mpif-h/query_thread_f.c +++ b/ompi/mpi/fortran/mpif-h/query_thread_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/recv_f.c b/ompi/mpi/fortran/mpif-h/recv_f.c index 16f1d8c7fe2..569ba0899f7 100644 --- a/ompi/mpi/fortran/mpif-h/recv_f.c +++ b/ompi/mpi/fortran/mpif-h/recv_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,8 +68,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RECV, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, - MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, +void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr) { OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) @@ -81,7 +81,7 @@ void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, /* Call the C function */ c_ierr = MPI_Recv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), - c_type, OMPI_FINT_2_INT(*source), + c_type, OMPI_FINT_2_INT(*source), OMPI_FINT_2_INT(*tag), c_comm, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/recv_init_f.c b/ompi/mpi/fortran/mpif-h/recv_init_f.c index 433c2bf1b71..ab68f59efb2 100644 --- a/ompi/mpi/fortran/mpif-h/recv_init_f.c +++ b/ompi/mpi/fortran/mpif-h/recv_init_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RECV_INIT, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, +void ompi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { diff --git a/ompi/mpi/fortran/mpif-h/reduce_f.c b/ompi/mpi/fortran/mpif-h/reduce_f.c index 7ffc07f26c5..be3c086da67 100644 --- a/ompi/mpi/fortran/mpif-h/reduce_f.c +++ b/ompi/mpi/fortran/mpif-h/reduce_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REDUCE, #endif void ompi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count, - MPI_Fint *datatype, MPI_Fint *op, + MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr) { int c_ierr; @@ -84,7 +84,7 @@ void ompi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count, c_ierr = MPI_Reduce(sendbuf, recvbuf, OMPI_FINT_2_INT(*count), - c_type, c_op, + c_type, c_op, OMPI_FINT_2_INT(*root), c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/reduce_local_f.c b/ompi/mpi/fortran/mpif-h/reduce_local_f.c index eded1349f4a..e74229c36d4 100644 --- a/ompi/mpi/fortran/mpif-h/reduce_local_f.c +++ b/ompi/mpi/fortran/mpif-h/reduce_local_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/reduce_scatter_block_f.c b/ompi/mpi/fortran/mpif-h/reduce_scatter_block_f.c index 5a426eae513..090cbb838e1 100644 --- a/ompi/mpi/fortran/mpif-h/reduce_scatter_block_f.c +++ b/ompi/mpi/fortran/mpif-h/reduce_scatter_block_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REDUCE_SCATTER_BLOCK, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_reduce_scatter_block_f(char *sendbuf, char *recvbuf, +void ompi_reduce_scatter_block_f(char *sendbuf, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr) { @@ -84,8 +84,8 @@ void ompi_reduce_scatter_block_f(char *sendbuf, char *recvbuf, sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - - c_ierr = MPI_Reduce_scatter_block(sendbuf, recvbuf, + + c_ierr = MPI_Reduce_scatter_block(sendbuf, recvbuf, OMPI_FINT_2_INT(*recvcount), c_type, c_op, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/reduce_scatter_f.c b/ompi/mpi/fortran/mpif-h/reduce_scatter_f.c index 0afb3aff56e..a730bac9a12 100644 --- a/ompi/mpi/fortran/mpif-h/reduce_scatter_f.c +++ b/ompi/mpi/fortran/mpif-h/reduce_scatter_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REDUCE_SCATTER, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_reduce_scatter_f(char *sendbuf, char *recvbuf, +void ompi_reduce_scatter_f(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr) { @@ -86,7 +86,7 @@ void ompi_reduce_scatter_f(char *sendbuf, char *recvbuf, sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - + c_ierr = MPI_Reduce_scatter(sendbuf, recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), c_type, c_op, c_comm); diff --git a/ompi/mpi/fortran/mpif-h/register_datarep_f.c b/ompi/mpi/fortran/mpif-h/register_datarep_f.c index 6ebd454641e..1a28da27a65 100644 --- a/ompi/mpi/fortran/mpif-h/register_datarep_f.c +++ b/ompi/mpi/fortran/mpif-h/register_datarep_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -77,12 +77,12 @@ static const char FUNC_NAME[] = "MPI_REGISTER_DATAREP"; /* Intercept functions used below (see below for explanations in comments) */ static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, - void *filebuf, MPI_Offset position, + void *filebuf, MPI_Offset position, void *extra_state); static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, - void *filebuf, MPI_Offset position, + void *filebuf, MPI_Offset position, void *extra_state); -static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent, +static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent, void *extra_state); /* Data structure passed to the intercepts (see below). It is an OPAL @@ -126,10 +126,10 @@ OBJ_CLASS_INSTANCE(intercept_extra_state_t, * arguments to Fortran and then invoke the registered callback * function. */ -void ompi_register_datarep_f(char *datarep, +void ompi_register_datarep_f(char *datarep, ompi_mpi2_fortran_datarep_conversion_fn_t *read_fn_f77, ompi_mpi2_fortran_datarep_conversion_fn_t *write_fn_f77, - ompi_mpi2_fortran_datarep_extent_fn_t *extent_fn_f77, + ompi_mpi2_fortran_datarep_extent_fn_t *extent_fn_f77, MPI_Aint *extra_state_f77, MPI_Fint *ierr, int datarep_len) { @@ -137,11 +137,11 @@ void ompi_register_datarep_f(char *datarep, int c_ierr, ret; MPI_Datarep_conversion_function *read_fn_c, *write_fn_c; intercept_extra_state_t *intercept; - + /* Malloc space for the intercept callback data */ intercept = OBJ_NEW(intercept_extra_state_t); if (NULL == intercept) { - c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, + c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, FUNC_NAME); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); return; @@ -161,7 +161,7 @@ void ompi_register_datarep_f(char *datarep, if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); return; } - + /* Convert the Fortran function callbacks to C equivalents. Use local intercepts if they're not MPI_CONVERSION_FN_NULL so that we can just call the C MPI API MPI_Register_datarep(). If they @@ -192,8 +192,8 @@ void ompi_register_datarep_f(char *datarep, /* Now that the intercept data has been setup, call the C function with the setup intercept routines and the intercept-specific data/extra state. */ - c_ierr = MPI_Register_datarep(c_datarep, - read_fn_c, write_fn_c, + c_ierr = MPI_Register_datarep(c_datarep, + read_fn_c, write_fn_c, extent_intercept_fn, intercept); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); @@ -204,16 +204,16 @@ void ompi_register_datarep_f(char *datarep, * C->Fortran intercept for the read conversion. */ static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, - void *filebuf, MPI_Offset position, + void *filebuf, MPI_Offset position, void *extra_state) { MPI_Fint ierr, count_f77 = OMPI_FINT_2_INT(count_c); MPI_Fint type_f77 = MPI_Type_c2f(type_c); - intercept_extra_state_t *intercept_data = + intercept_extra_state_t *intercept_data = (intercept_extra_state_t*) extra_state; - intercept_data->read_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf, - &position, intercept_data->extra_state_f77, + intercept_data->read_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf, + &position, intercept_data->extra_state_f77, &ierr); return OMPI_FINT_2_INT(ierr); } @@ -222,16 +222,16 @@ static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, * C->Fortran intercept for the write conversion. */ static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, - void *filebuf, MPI_Offset position, + void *filebuf, MPI_Offset position, void *extra_state) { MPI_Fint ierr, count_f77 = OMPI_FINT_2_INT(count_c); MPI_Fint type_f77 = MPI_Type_c2f(type_c); - intercept_extra_state_t *intercept_data = + intercept_extra_state_t *intercept_data = (intercept_extra_state_t*) extra_state; - intercept_data->write_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf, - &position, intercept_data->extra_state_f77, + intercept_data->write_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf, + &position, intercept_data->extra_state_f77, &ierr); return OMPI_FINT_2_INT(ierr); } @@ -239,14 +239,14 @@ static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, /* * C->Fortran intercept for the extent calculation. */ -static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent_f77, +static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent_f77, void *extra_state) { MPI_Fint ierr, type_f77 = MPI_Type_c2f(type_c); - intercept_extra_state_t *intercept_data = + intercept_extra_state_t *intercept_data = (intercept_extra_state_t*) extra_state; - intercept_data->extent_fn_f77(&type_f77, file_extent_f77, + intercept_data->extent_fn_f77(&type_f77, file_extent_f77, intercept_data->extra_state_f77, &ierr); return OMPI_FINT_2_INT(ierr); } diff --git a/ompi/mpi/fortran/mpif-h/request_free_f.c b/ompi/mpi/fortran/mpif-h/request_free_f.c index 696afefedd7..c0597d071b8 100644 --- a/ompi/mpi/fortran/mpif-h/request_free_f.c +++ b/ompi/mpi/fortran/mpif-h/request_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ void ompi_request_free_f(MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; - MPI_Request c_req = MPI_Request_f2c( *request ); + MPI_Request c_req = MPI_Request_f2c( *request ); c_ierr = MPI_Request_free(&c_req); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/request_get_status_f.c b/ompi/mpi/fortran/mpif-h/request_get_status_f.c index fb450495cea..a8d59d28d7f 100644 --- a/ompi/mpi/fortran/mpif-h/request_get_status_f.c +++ b/ompi/mpi/fortran/mpif-h/request_get_status_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -70,7 +70,7 @@ void ompi_request_get_status_f(MPI_Fint *request, ompi_fortran_logical_t *flag, { int c_ierr; MPI_Status c_status; - MPI_Request c_req = MPI_Request_f2c( *request ); + MPI_Request c_req = MPI_Request_f2c( *request ); OMPI_LOGICAL_NAME_DECL(flag); /* This seems silly, but someone will do it */ @@ -79,7 +79,7 @@ void ompi_request_get_status_f(MPI_Fint *request, ompi_fortran_logical_t *flag, *flag = OMPI_INT_2_LOGICAL(0); c_ierr = MPI_SUCCESS; } else { - c_ierr = MPI_Request_get_status(c_req, + c_ierr = MPI_Request_get_status(c_req, OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag), &c_status); OMPI_SINGLE_INT_2_LOGICAL(flag); diff --git a/ompi/mpi/fortran/mpif-h/rsend_f.c b/ompi/mpi/fortran/mpif-h/rsend_f.c index 18b8e4272a5..769d9a58f84 100644 --- a/ompi/mpi/fortran/mpif-h/rsend_f.c +++ b/ompi/mpi/fortran/mpif-h/rsend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/rsend_init_f.c b/ompi/mpi/fortran/mpif-h/rsend_init_f.c index 00a44d393c8..94922965e96 100644 --- a/ompi/mpi/fortran/mpif-h/rsend_init_f.c +++ b/ompi/mpi/fortran/mpif-h/rsend_init_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RSEND_INIT, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_rsend_init_f(char *buf, MPI_Fint *count, +void ompi_rsend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) diff --git a/ompi/mpi/fortran/mpif-h/scan_f.c b/ompi/mpi/fortran/mpif-h/scan_f.c index d87d6d74427..63327649f5f 100644 --- a/ompi/mpi/fortran/mpif-h/scan_f.c +++ b/ompi/mpi/fortran/mpif-h/scan_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -84,7 +84,7 @@ void ompi_scan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, c_ierr = MPI_Scan(sendbuf, recvbuf, OMPI_FINT_2_INT(*count), - c_type, c_op, + c_type, c_op, c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/scatter_f.c b/ompi/mpi/fortran/mpif-h/scatter_f.c index a256b754bf2..f8df4bf1010 100644 --- a/ompi/mpi/fortran/mpif-h/scatter_f.c +++ b/ompi/mpi/fortran/mpif-h/scatter_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SCATTER, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_scatter_f(char *sendbuf, MPI_Fint *sendcount, +void ompi_scatter_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr) @@ -73,7 +73,7 @@ void ompi_scatter_f(char *sendbuf, MPI_Fint *sendcount, int c_ierr; MPI_Datatype c_sendtype, c_recvtype; MPI_Comm c_comm = MPI_Comm_f2c(*comm); - + c_sendtype = MPI_Type_f2c(*sendtype); c_recvtype = MPI_Type_f2c(*recvtype); @@ -82,9 +82,9 @@ void ompi_scatter_f(char *sendbuf, MPI_Fint *sendcount, recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); c_ierr = MPI_Scatter(sendbuf,OMPI_FINT_2_INT(*sendcount), - c_sendtype, recvbuf, + c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), - c_recvtype, + c_recvtype, OMPI_FINT_2_INT(*root), c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/scatterv_f.c b/ompi/mpi/fortran/mpif-h/scatterv_f.c index 28b0532f3fc..95a0081a1d3 100644 --- a/ompi/mpi/fortran/mpif-h/scatterv_f.c +++ b/ompi/mpi/fortran/mpif-h/scatterv_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SCATTERV, void ompi_scatterv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *displs, MPI_Fint *sendtype, - char *recvbuf, MPI_Fint *recvcount, + char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr) { @@ -89,12 +89,12 @@ void ompi_scatterv_f(char *sendbuf, MPI_Fint *sendcounts, recvbuf = (char *) OMPI_F2C_IN_PLACE(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); - c_ierr = MPI_Scatterv(sendbuf, + c_ierr = MPI_Scatterv(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), OMPI_ARRAY_NAME_CONVERT(displs), c_sendtype, recvbuf, OMPI_FINT_2_INT(*recvcount), - c_recvtype, + c_recvtype, OMPI_FINT_2_INT(*root), c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/send_f.c b/ompi/mpi/fortran/mpif-h/send_f.c index 5a4b0ee63c2..7a80aaaacb3 100644 --- a/ompi/mpi/fortran/mpif-h/send_f.c +++ b/ompi/mpi/fortran/mpif-h/send_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SEND, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, +void ompi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) { int c_ierr; @@ -73,8 +73,8 @@ void ompi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Comm c_comm = MPI_Comm_f2c(*comm); MPI_Datatype c_type = MPI_Type_f2c(*datatype); - c_ierr = MPI_Send(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), - c_type, OMPI_FINT_2_INT(*dest), + c_ierr = MPI_Send(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), + c_type, OMPI_FINT_2_INT(*dest), OMPI_FINT_2_INT(*tag), c_comm); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/send_init_f.c b/ompi/mpi/fortran/mpif-h/send_init_f.c index 26a47bb72b8..b4358c28d0b 100644 --- a/ompi/mpi/fortran/mpif-h/send_init_f.c +++ b/ompi/mpi/fortran/mpif-h/send_init_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -78,10 +78,10 @@ void ompi_send_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, c_ierr = MPI_Send_init(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), c_type, OMPI_FINT_2_INT(*dest), - OMPI_FINT_2_INT(*tag), + OMPI_FINT_2_INT(*tag), c_comm, &c_req); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { *request = MPI_Request_c2f(c_req); } diff --git a/ompi/mpi/fortran/mpif-h/sendrecv_f.c b/ompi/mpi/fortran/mpif-h/sendrecv_f.c index c1031fae35b..5854dc32135 100644 --- a/ompi/mpi/fortran/mpif-h/sendrecv_f.c +++ b/ompi/mpi/fortran/mpif-h/sendrecv_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -76,9 +76,9 @@ void ompi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, MPI_Datatype c_sendtype = MPI_Type_f2c(*sendtype); MPI_Datatype c_recvtype = MPI_Type_f2c(*recvtype); MPI_Status c_status; - + c_comm = MPI_Comm_f2c (*comm); - + c_ierr = MPI_Sendrecv(OMPI_F2C_BOTTOM(sendbuf), OMPI_FINT_2_INT(*sendcount), c_sendtype, OMPI_FINT_2_INT(*dest), diff --git a/ompi/mpi/fortran/mpif-h/sendrecv_replace_f.c b/ompi/mpi/fortran/mpif-h/sendrecv_replace_f.c index 647c560b4e3..d718a0c1b52 100644 --- a/ompi/mpi/fortran/mpif-h/sendrecv_replace_f.c +++ b/ompi/mpi/fortran/mpif-h/sendrecv_replace_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -76,13 +76,13 @@ void ompi_sendrecv_replace_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Status c_status; c_comm = MPI_Comm_f2c (*comm); - + c_ierr = MPI_Sendrecv_replace(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count), - c_type, - OMPI_FINT_2_INT(*dest), - OMPI_FINT_2_INT(*sendtag), - OMPI_FINT_2_INT(*source), + c_type, + OMPI_FINT_2_INT(*dest), + OMPI_FINT_2_INT(*sendtag), + OMPI_FINT_2_INT(*source), OMPI_FINT_2_INT(*recvtag), c_comm, &c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/ssend_f.c b/ompi/mpi/fortran/mpif-h/ssend_f.c index e73fbc2f232..b8dbe637d5e 100644 --- a/ompi/mpi/fortran/mpif-h/ssend_f.c +++ b/ompi/mpi/fortran/mpif-h/ssend_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SSEND, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_ssend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, +void ompi_ssend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) { diff --git a/ompi/mpi/fortran/mpif-h/ssend_init_f.c b/ompi/mpi/fortran/mpif-h/ssend_init_f.c index d007a1039b0..f937571830f 100644 --- a/ompi/mpi/fortran/mpif-h/ssend_init_f.c +++ b/ompi/mpi/fortran/mpif-h/ssend_init_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SSEND_INIT, #endif void ompi_ssend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, - MPI_Fint *dest, MPI_Fint *tag, + MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/start_f.c b/ompi/mpi/fortran/mpif-h/start_f.c index a8d31564430..34b21eceb45 100644 --- a/ompi/mpi/fortran/mpif-h/start_f.c +++ b/ompi/mpi/fortran/mpif-h/start_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -75,7 +75,7 @@ void ompi_start_f(MPI_Fint *request, MPI_Fint *ierr) if (MPI_SUCCESS == c_ierr) { /* For a persistent request, the underlying request descriptor could - change (i.e. the old descriptor has not completed and cannot be + change (i.e. the old descriptor has not completed and cannot be reused). So commit new descriptor. */ diff --git a/ompi/mpi/fortran/mpif-h/startall_f.c b/ompi/mpi/fortran/mpif-h/startall_f.c index 363dbf4678e..b4814f0f2f3 100644 --- a/ompi/mpi/fortran/mpif-h/startall_f.c +++ b/ompi/mpi/fortran/mpif-h/startall_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STARTALL, static const char FUNC_NAME[] = "MPI_STARTALL"; -void ompi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, +void ompi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/status_set_cancelled_f.c b/ompi/mpi/fortran/mpif-h/status_set_cancelled_f.c index f7b0ff78c7b..ca35c9aa982 100644 --- a/ompi/mpi/fortran/mpif-h/status_set_cancelled_f.c +++ b/ompi/mpi/fortran/mpif-h/status_set_cancelled_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/status_set_elements_f.c b/ompi/mpi/fortran/mpif-h/status_set_elements_f.c index 3119c978bb9..780d83ed328 100644 --- a/ompi/mpi/fortran/mpif-h/status_set_elements_f.c +++ b/ompi/mpi/fortran/mpif-h/status_set_elements_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STATUS_SET_ELEMENTS, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype, +void ompi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr) { int c_ierr; @@ -79,7 +79,7 @@ void ompi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype, } else { MPI_Status_f2c( status, &c_status ); - c_ierr = MPI_Status_set_elements(&c_status, c_type, + c_ierr = MPI_Status_set_elements(&c_status, c_type, OMPI_FINT_2_INT(*count)); /* If datatype is really being set, then that needs to be diff --git a/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c b/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c index 54dafa9a1c6..80be451a19b 100644 --- a/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c +++ b/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STATUS_SET_ELEMENTS_X, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_status_set_elements_x_f(MPI_Fint *status, MPI_Fint *datatype, +void ompi_status_set_elements_x_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Count *count, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/test_cancelled_f.c b/ompi/mpi/fortran/mpif-h/test_cancelled_f.c index f266ceb79f8..8bda5515c73 100644 --- a/ompi/mpi/fortran/mpif-h/test_cancelled_f.c +++ b/ompi/mpi/fortran/mpif-h/test_cancelled_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/test_f.c b/ompi/mpi/fortran/mpif-h/test_f.c index a879d0de313..92f7f6a1b06 100644 --- a/ompi/mpi/fortran/mpif-h/test_f.c +++ b/ompi/mpi/fortran/mpif-h/test_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -73,7 +73,7 @@ void ompi_test_f(MPI_Fint *request, ompi_fortran_logical_t *flag, MPI_Status c_status; OMPI_LOGICAL_NAME_DECL(flag); - c_ierr = MPI_Test(&c_req, + c_ierr = MPI_Test(&c_req, OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag), &c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); @@ -86,7 +86,7 @@ void ompi_test_f(MPI_Fint *request, ompi_fortran_logical_t *flag, if (MPI_SUCCESS == c_ierr && *flag) { *request = OMPI_INT_2_FINT(c_req->req_f_to_c_index); if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { - MPI_Status_c2f(&c_status, status); + MPI_Status_c2f(&c_status, status); } } } diff --git a/ompi/mpi/fortran/mpif-h/testall_f.c b/ompi/mpi/fortran/mpif-h/testall_f.c index bfb698ec2a2..2fc285b5037 100644 --- a/ompi/mpi/fortran/mpif-h/testall_f.c +++ b/ompi/mpi/fortran/mpif-h/testall_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/testany_f.c b/ompi/mpi/fortran/mpif-h/testany_f.c index f61b33d0a88..95e73c1718a 100644 --- a/ompi/mpi/fortran/mpif-h/testany_f.c +++ b/ompi/mpi/fortran/mpif-h/testany_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -83,14 +83,14 @@ void ompi_testany_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *indx if (OPAL_UNLIKELY(0 == OMPI_FINT_2_INT(*count))) { *flag = OMPI_FORTRAN_VALUE_TRUE; *indx = OMPI_INT_2_FINT(MPI_UNDEFINED); - MPI_Status_c2f(&ompi_status_empty, status); + MPI_Status_c2f(&ompi_status_empty, status); *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); return; } c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*count) * sizeof(MPI_Request)); if (c_req == NULL) { - c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, + c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, FUNC_NAME); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); @@ -122,7 +122,7 @@ void ompi_testany_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *indx ++(*indx); } if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { - MPI_Status_c2f(&c_status, status); + MPI_Status_c2f(&c_status, status); } } free(c_req); diff --git a/ompi/mpi/fortran/mpif-h/testsome_f.c b/ompi/mpi/fortran/mpif-h/testsome_f.c index 6a05917efa6..05f66357013 100644 --- a/ompi/mpi/fortran/mpif-h/testsome_f.c +++ b/ompi/mpi/fortran/mpif-h/testsome_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -70,7 +70,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TESTSOME, static const char FUNC_NAME[] = "MPI_TESTSOME"; -void ompi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests, +void ompi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests, MPI_Fint *outcount, MPI_Fint *array_of_indices, MPI_Fint *array_of_statuses, MPI_Fint *ierr) { @@ -104,9 +104,9 @@ void ompi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests, } OMPI_ARRAY_FINT_2_INT_ALLOC(array_of_indices, OMPI_FINT_2_INT(*incount)); - c_ierr = MPI_Testsome(OMPI_FINT_2_INT(*incount), c_req, - OMPI_SINGLE_NAME_CONVERT(outcount), - OMPI_ARRAY_NAME_CONVERT(array_of_indices), + c_ierr = MPI_Testsome(OMPI_FINT_2_INT(*incount), c_req, + OMPI_SINGLE_NAME_CONVERT(outcount), + OMPI_ARRAY_NAME_CONVERT(array_of_indices), c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/topo_test_f.c b/ompi/mpi/fortran/mpif-h/topo_test_f.c index 7af8ffec92c..69f04f2c934 100644 --- a/ompi/mpi/fortran/mpif-h/topo_test_f.c +++ b/ompi/mpi/fortran/mpif-h/topo_test_f.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2012 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -72,7 +72,7 @@ void ompi_topo_test_f(MPI_Fint *comm, MPI_Fint *topo_type, MPI_Fint *ierr) OMPI_SINGLE_NAME_DECL(topo_type); c_comm = MPI_Comm_f2c(*comm); - + c_ierr = MPI_Topo_test(c_comm, OMPI_SINGLE_NAME_CONVERT(topo_type)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_commit_f.c b/ompi/mpi/fortran/mpif-h/type_commit_f.c index 41700f62346..cb32ebffb39 100644 --- a/ompi/mpi/fortran/mpif-h/type_commit_f.c +++ b/ompi/mpi/fortran/mpif-h/type_commit_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_contiguous_f.c b/ompi/mpi/fortran/mpif-h/type_contiguous_f.c index 19b006bf639..1dcff9beca7 100644 --- a/ompi/mpi/fortran/mpif-h/type_contiguous_f.c +++ b/ompi/mpi/fortran/mpif-h/type_contiguous_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_create_darray_f.c b/ompi/mpi/fortran/mpif-h/type_create_darray_f.c index e0448a15598..1986335b851 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_darray_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_darray_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,9 +65,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_DARRAY, #endif void ompi_type_create_darray_f(MPI_Fint *size, MPI_Fint *rank, - MPI_Fint *ndims, MPI_Fint *gsize_array, + MPI_Fint *ndims, MPI_Fint *gsize_array, MPI_Fint *distrib_array, MPI_Fint *darg_array, - MPI_Fint *psize_array, MPI_Fint *order, + MPI_Fint *psize_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { @@ -87,7 +87,7 @@ void ompi_type_create_darray_f(MPI_Fint *size, MPI_Fint *rank, c_ierr = MPI_Type_create_darray(OMPI_FINT_2_INT(*size), OMPI_FINT_2_INT(*rank), OMPI_FINT_2_INT(*ndims), - OMPI_ARRAY_NAME_CONVERT(gsize_array), + OMPI_ARRAY_NAME_CONVERT(gsize_array), OMPI_ARRAY_NAME_CONVERT(distrib_array), OMPI_ARRAY_NAME_CONVERT(darg_array), OMPI_ARRAY_NAME_CONVERT(psize_array), diff --git a/ompi/mpi/fortran/mpif-h/type_create_f90_complex_f.c b/ompi/mpi/fortran/mpif-h/type_create_f90_complex_f.c index 5b1f2b8b7b3..2f030f82f29 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_f90_complex_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_f90_complex_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -70,12 +70,12 @@ void ompi_type_create_f90_complex_f(MPI_Fint *p, MPI_Fint *r, int c_ierr; MPI_Datatype c_newtype = MPI_Type_f2c(*newtype); - c_ierr = MPI_Type_create_f90_complex(OMPI_FINT_2_INT(*p), + c_ierr = MPI_Type_create_f90_complex(OMPI_FINT_2_INT(*p), OMPI_FINT_2_INT(*r), &c_newtype); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) { - *newtype = MPI_Type_c2f (c_newtype); + *newtype = MPI_Type_c2f (c_newtype); } } diff --git a/ompi/mpi/fortran/mpif-h/type_create_f90_integer_f.c b/ompi/mpi/fortran/mpif-h/type_create_f90_integer_f.c index 79de1e1adfc..799b1778c48 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_f90_integer_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_f90_integer_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_create_f90_real_f.c b/ompi/mpi/fortran/mpif-h/type_create_f90_real_f.c index 37cc68d5136..24aa07a1088 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_f90_real_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_f90_real_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c b/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c index 8bacef24b3e..7d2d4642ba0 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c @@ -4,9 +4,9 @@ * reserved. * Copyright (c) 2012 Inria. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -58,7 +58,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_HINDEXED_BLOCK, #endif void ompi_type_create_hindexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, - MPI_Aint *array_of_displacements, + MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { @@ -71,7 +71,7 @@ void ompi_type_create_hindexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, array_of_displacements, c_old, &c_new); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { *newtype = MPI_Type_c2f(c_new); } diff --git a/ompi/mpi/fortran/mpif-h/type_create_hindexed_f.c b/ompi/mpi/fortran/mpif-h/type_create_hindexed_f.c index 4649ed674c7..90cf54eba8a 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_hindexed_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_hindexed_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_HINDEXED, void ompi_type_create_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, - MPI_Aint *array_of_displacements, + MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { @@ -76,17 +76,17 @@ void ompi_type_create_hindexed_f(MPI_Fint *count, MPI_Datatype c_new = MPI_Type_f2c(*newtype); OMPI_ARRAY_NAME_DECL(array_of_blocklengths); - OMPI_ARRAY_FINT_2_INT(array_of_blocklengths, *count); + OMPI_ARRAY_FINT_2_INT(array_of_blocklengths, *count); c_ierr = MPI_Type_create_hindexed(OMPI_FINT_2_INT(*count), - OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), + OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), array_of_displacements, c_old, &c_new); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { *newtype = MPI_Type_c2f(c_new); } - + OMPI_ARRAY_FINT_2_INT_CLEANUP(array_of_blocklengths); } diff --git a/ompi/mpi/fortran/mpif-h/type_create_hvector_f.c b/ompi/mpi/fortran/mpif-h/type_create_hvector_f.c index a829c9a4ff3..eeed7f373ac 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_hvector_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_hvector_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_create_indexed_block_f.c b/ompi/mpi/fortran/mpif-h/type_create_indexed_block_f.c index ebdb633c74b..117042ff148 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_indexed_block_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_indexed_block_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_INDEXED_BLOCK, #endif void ompi_type_create_indexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, - MPI_Fint *array_of_displacements, + MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { @@ -81,7 +81,7 @@ void ompi_type_create_indexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, OMPI_ARRAY_NAME_CONVERT(array_of_displacements), c_old, &c_new); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); - + if (MPI_SUCCESS == c_ierr) { *newtype = MPI_Type_c2f(c_new); } diff --git a/ompi/mpi/fortran/mpif-h/type_create_keyval_f.c b/ompi/mpi/fortran/mpif-h/type_create_keyval_f.c index f9dc90706b1..fbbc0cb15f3 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_keyval_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_keyval_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_create_resized_f.c b/ompi/mpi/fortran/mpif-h/type_create_resized_f.c index d9e0a28e968..d1e570b6085 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_resized_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_resized_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_RESIZED, #endif void ompi_type_create_resized_f(MPI_Fint *oldtype, MPI_Aint *lb, - MPI_Aint *extent, MPI_Fint *newtype, + MPI_Aint *extent, MPI_Fint *newtype, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/type_create_struct_f.c b/ompi/mpi/fortran/mpif-h/type_create_struct_f.c index 035276502eb..5bac9dec0e1 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_struct_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_struct_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,9 +69,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_STRUCT, static const char FUNC_NAME[] = "MPI_TYPE_CREATE_STRUCT"; -void ompi_type_create_struct_f(MPI_Fint *count, +void ompi_type_create_struct_f(MPI_Fint *count, MPI_Fint *array_of_block_lengths, - MPI_Aint *array_of_displacements, + MPI_Aint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr) { diff --git a/ompi/mpi/fortran/mpif-h/type_create_subarray_f.c b/ompi/mpi/fortran/mpif-h/type_create_subarray_f.c index 081ead7b52e..c984e0c1980 100644 --- a/ompi/mpi/fortran/mpif-h/type_create_subarray_f.c +++ b/ompi/mpi/fortran/mpif-h/type_create_subarray_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,9 +65,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_SUBARRAY, #endif void ompi_type_create_subarray_f(MPI_Fint *ndims, MPI_Fint *size_array, - MPI_Fint *subsize_array, + MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, - MPI_Fint *oldtype, MPI_Fint *newtype, + MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/type_delete_attr_f.c b/ompi/mpi/fortran/mpif-h/type_delete_attr_f.c index df57e6b3795..455fcf44690 100644 --- a/ompi/mpi/fortran/mpif-h/type_delete_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/type_delete_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -70,6 +70,6 @@ void ompi_type_delete_attr_f(MPI_Fint *type, MPI_Fint *type_keyval, int c_ierr; MPI_Datatype c_type = MPI_Type_f2c(*type); - c_ierr = MPI_Type_delete_attr(c_type, OMPI_FINT_2_INT(*type_keyval)); + c_ierr = MPI_Type_delete_attr(c_type, OMPI_FINT_2_INT(*type_keyval)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/type_dup_f.c b/ompi/mpi/fortran/mpif-h/type_dup_f.c index 8bd71702983..ba258cd9536 100644 --- a/ompi/mpi/fortran/mpif-h/type_dup_f.c +++ b/ompi/mpi/fortran/mpif-h/type_dup_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_extent_f.c b/ompi/mpi/fortran/mpif-h/type_extent_f.c index 85102b8601e..e973a3384ba 100644 --- a/ompi/mpi/fortran/mpif-h/type_extent_f.c +++ b/ompi/mpi/fortran/mpif-h/type_extent_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_free_f.c b/ompi/mpi/fortran/mpif-h/type_free_f.c index 314a28fe274..3c7c67792b2 100644 --- a/ompi/mpi/fortran/mpif-h/type_free_f.c +++ b/ompi/mpi/fortran/mpif-h/type_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,9 +68,9 @@ void ompi_type_free_f(MPI_Fint *type, MPI_Fint *ierr) { int c_ierr; MPI_Datatype c_type; - + c_type = MPI_Type_f2c(*type); - + c_ierr = MPI_Type_free(&c_type); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_free_keyval_f.c b/ompi/mpi/fortran/mpif-h/type_free_keyval_f.c index 903c22531a0..e2c3b63915a 100644 --- a/ompi/mpi/fortran/mpif-h/type_free_keyval_f.c +++ b/ompi/mpi/fortran/mpif-h/type_free_keyval_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_get_attr_f.c b/ompi/mpi/fortran/mpif-h/type_get_attr_f.c index 7f54a83488d..61013c754ee 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_get_contents_f.c b/ompi/mpi/fortran/mpif-h/type_get_contents_f.c index a109fe22068..0fbb9c7715d 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_contents_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_contents_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,8 +71,8 @@ static const char FUNC_NAME[] = "MPI_TYPE_GET_CONTENTS"; void ompi_type_get_contents_f(MPI_Fint *mtype, MPI_Fint *max_integers, MPI_Fint *max_addresses, MPI_Fint *max_datatypes, - MPI_Fint *array_of_integers, - MPI_Aint *array_of_addresses, + MPI_Fint *array_of_integers, + MPI_Aint *array_of_addresses, MPI_Fint *array_of_datatypes, MPI_Fint *ierr) { MPI_Aint *c_address_array = NULL; @@ -107,11 +107,11 @@ void ompi_type_get_contents_f(MPI_Fint *mtype, MPI_Fint *max_integers, OMPI_ARRAY_FINT_2_INT(array_of_integers, *max_integers); - c_ierr = MPI_Type_get_contents(c_mtype, - OMPI_FINT_2_INT(*max_integers), + c_ierr = MPI_Type_get_contents(c_mtype, + OMPI_FINT_2_INT(*max_integers), OMPI_FINT_2_INT(*max_addresses), OMPI_FINT_2_INT(*max_datatypes), - OMPI_ARRAY_NAME_CONVERT(array_of_integers), + OMPI_ARRAY_NAME_CONVERT(array_of_integers), c_address_array, c_datatype_array); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_get_envelope_f.c b/ompi/mpi/fortran/mpif-h/type_get_envelope_f.c index b9629f49b60..afa72bb5388 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_envelope_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_envelope_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -65,7 +65,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_GET_ENVELOPE, #endif void ompi_type_get_envelope_f(MPI_Fint *type, MPI_Fint *num_integers, - MPI_Fint *num_addresses, + MPI_Fint *num_addresses, MPI_Fint *num_datatypes, MPI_Fint *combiner, MPI_Fint *ierr) { @@ -77,9 +77,9 @@ void ompi_type_get_envelope_f(MPI_Fint *type, MPI_Fint *num_integers, OMPI_SINGLE_NAME_DECL(combiner); c_ierr = MPI_Type_get_envelope(c_type, - OMPI_SINGLE_NAME_CONVERT(num_integers), - OMPI_SINGLE_NAME_CONVERT(num_addresses), - OMPI_SINGLE_NAME_CONVERT(num_datatypes), + OMPI_SINGLE_NAME_CONVERT(num_integers), + OMPI_SINGLE_NAME_CONVERT(num_addresses), + OMPI_SINGLE_NAME_CONVERT(num_datatypes), OMPI_SINGLE_NAME_CONVERT(combiner)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_get_extent_f.c b/ompi/mpi/fortran/mpif-h/type_get_extent_f.c index 2a3ab6e4e1c..a58e791c37a 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_extent_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_extent_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c b/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c index 5634d2aa5dc..bb4830e02b3 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_get_name_f.c b/ompi/mpi/fortran/mpif-h/type_get_name_f.c index ac36354f6c2..d278981c7f2 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_name_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_get_true_extent_f.c b/ompi/mpi/fortran/mpif-h/type_get_true_extent_f.c index 2c640523071..950da693af6 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_true_extent_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_true_extent_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c b/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c index fa1dfc77641..6193d704b1b 100644 --- a/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c +++ b/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_hindexed_f.c b/ompi/mpi/fortran/mpif-h/type_hindexed_f.c index 1a6a31af165..3ae070fd560 100644 --- a/ompi/mpi/fortran/mpif-h/type_hindexed_f.c +++ b/ompi/mpi/fortran/mpif-h/type_hindexed_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,8 +69,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_HINDEXED, static const char FUNC_NAME[] = "MPI_TYPE_HINDEXED"; -void ompi_type_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, - MPI_Fint *array_of_displacements, +void ompi_type_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, + MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { MPI_Datatype c_old = MPI_Type_f2c(*oldtype); @@ -93,7 +93,7 @@ void ompi_type_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, OMPI_ARRAY_FINT_2_INT(array_of_blocklengths, *count); c_ierr = MPI_Type_hindexed(OMPI_FINT_2_INT(*count), - OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), + OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), c_disp_array, c_old, &c_new); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_hvector_f.c b/ompi/mpi/fortran/mpif-h/type_hvector_f.c index 2ae4a594236..a52490ea9cd 100644 --- a/ompi/mpi/fortran/mpif-h/type_hvector_f.c +++ b/ompi/mpi/fortran/mpif-h/type_hvector_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,8 +64,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_HVECTOR, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_type_hvector_f(MPI_Fint *count, MPI_Fint *blocklength, - MPI_Fint *stride, MPI_Fint *oldtype, +void ompi_type_hvector_f(MPI_Fint *count, MPI_Fint *blocklength, + MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/type_indexed_f.c b/ompi/mpi/fortran/mpif-h/type_indexed_f.c index 3887f76ba4f..983390a5141 100644 --- a/ompi/mpi/fortran/mpif-h/type_indexed_f.c +++ b/ompi/mpi/fortran/mpif-h/type_indexed_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -78,7 +78,7 @@ void ompi_type_indexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, OMPI_ARRAY_FINT_2_INT(array_of_displacements, *count); c_ierr = MPI_Type_indexed(OMPI_FINT_2_INT(*count), - OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), + OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), OMPI_ARRAY_NAME_CONVERT(array_of_displacements), c_old, &c_new); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_lb_f.c b/ompi/mpi/fortran/mpif-h/type_lb_f.c index 40d03260ec6..6b17e288c82 100644 --- a/ompi/mpi/fortran/mpif-h/type_lb_f.c +++ b/ompi/mpi/fortran/mpif-h/type_lb_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_match_size_f.c b/ompi/mpi/fortran/mpif-h/type_match_size_f.c index 46f29ae60ce..f391ef55f98 100644 --- a/ompi/mpi/fortran/mpif-h/type_match_size_f.c +++ b/ompi/mpi/fortran/mpif-h/type_match_size_f.c @@ -5,16 +5,16 @@ * 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, + * 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 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_set_attr_f.c b/ompi/mpi/fortran/mpif-h/type_set_attr_f.c index f49bc21ac8a..4bbfd6f4b36 100644 --- a/ompi/mpi/fortran/mpif-h/type_set_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/type_set_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -77,7 +77,7 @@ void ompi_type_set_attr_f(MPI_Fint *type, MPI_Fint *type_keyval, MPI_Aint *attri c_ierr = ompi_attr_set_fortran_mpi2(TYPE_ATTR, c_type, &c_type->d_keyhash, - OMPI_FINT_2_INT(*type_keyval), + OMPI_FINT_2_INT(*type_keyval), *attribute_val, false); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/type_set_name_f.c b/ompi/mpi/fortran/mpif-h/type_set_name_f.c index e06ded9339b..bae9a116377 100644 --- a/ompi/mpi/fortran/mpif-h/type_set_name_f.c +++ b/ompi/mpi/fortran/mpif-h/type_set_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_size_f.c b/ompi/mpi/fortran/mpif-h/type_size_f.c index 8603d29a747..c2b429b451b 100644 --- a/ompi/mpi/fortran/mpif-h/type_size_f.c +++ b/ompi/mpi/fortran/mpif-h/type_size_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_size_x_f.c b/ompi/mpi/fortran/mpif-h/type_size_x_f.c index 70cad8de467..b23867a0239 100644 --- a/ompi/mpi/fortran/mpif-h/type_size_x_f.c +++ b/ompi/mpi/fortran/mpif-h/type_size_x_f.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_struct_f.c b/ompi/mpi/fortran/mpif-h/type_struct_f.c index cd7d726af38..cff8a66904e 100644 --- a/ompi/mpi/fortran/mpif-h/type_struct_f.c +++ b/ompi/mpi/fortran/mpif-h/type_struct_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -70,7 +70,7 @@ static const char FUNC_NAME[] = "MPI_TYPE_STRUCT"; void ompi_type_struct_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, - MPI_Fint *array_of_displacements, + MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr) { @@ -80,7 +80,7 @@ void ompi_type_struct_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, int i, c_ierr; OMPI_ARRAY_NAME_DECL(array_of_blocklengths); - c_type_old_array = (MPI_Datatype *) malloc(*count * (sizeof(MPI_Datatype) + + c_type_old_array = (MPI_Datatype *) malloc(*count * (sizeof(MPI_Datatype) + sizeof(MPI_Aint))); if (NULL == c_type_old_array) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, diff --git a/ompi/mpi/fortran/mpif-h/type_ub_f.c b/ompi/mpi/fortran/mpif-h/type_ub_f.c index b31d348a3d1..061cc943340 100644 --- a/ompi/mpi/fortran/mpif-h/type_ub_f.c +++ b/ompi/mpi/fortran/mpif-h/type_ub_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/type_vector_f.c b/ompi/mpi/fortran/mpif-h/type_vector_f.c index 0e3a1f522f6..3fb6a7c8684 100644 --- a/ompi/mpi/fortran/mpif-h/type_vector_f.c +++ b/ompi/mpi/fortran/mpif-h/type_vector_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/unpack_external_f.c b/ompi/mpi/fortran/mpif-h/unpack_external_f.c index eeec08570e6..4c7edd552cd 100644 --- a/ompi/mpi/fortran/mpif-h/unpack_external_f.c +++ b/ompi/mpi/fortran/mpif-h/unpack_external_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -69,7 +69,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_UNPACK_EXTERNAL, #endif void ompi_unpack_external_f (char *datarep, char *inbuf, MPI_Aint *insize, - MPI_Aint *position, char *outbuf, + MPI_Aint *position, char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype, MPI_Fint *ierr, int datarep_len) { @@ -80,7 +80,7 @@ void ompi_unpack_external_f (char *datarep, char *inbuf, MPI_Aint *insize, c_type = MPI_Type_f2c(*datatype); /* Convert the fortran string */ - + if (OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(datarep, datarep_len, &c_datarep))) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, @@ -89,8 +89,8 @@ void ompi_unpack_external_f (char *datarep, char *inbuf, MPI_Aint *insize, return; } - c_ierr = MPI_Unpack_external(c_datarep, inbuf, - *insize, + c_ierr = MPI_Unpack_external(c_datarep, inbuf, + *insize, position, OMPI_F2C_BOTTOM(outbuf), OMPI_FINT_2_INT(*outcount), diff --git a/ompi/mpi/fortran/mpif-h/unpack_f.c b/ompi/mpi/fortran/mpif-h/unpack_f.c index 9c653072e73..40860c5889e 100644 --- a/ompi/mpi/fortran/mpif-h/unpack_f.c +++ b/ompi/mpi/fortran/mpif-h/unpack_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/unpublish_name_f.c b/ompi/mpi/fortran/mpif-h/unpublish_name_f.c index d27fd64d545..ffca01bc98e 100644 --- a/ompi/mpi/fortran/mpif-h/unpublish_name_f.c +++ b/ompi/mpi/fortran/mpif-h/unpublish_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -66,7 +66,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_UNPUBLISH_NAME, #endif void ompi_unpublish_name_f(char *service_name, MPI_Fint *info, - char *port_name, MPI_Fint *ierr, + char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/wait_f.c b/ompi/mpi/fortran/mpif-h/wait_f.c index 0e91ab6c499..4fb940e0b0d 100644 --- a/ompi/mpi/fortran/mpif-h/wait_f.c +++ b/ompi/mpi/fortran/mpif-h/wait_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/waitall_f.c b/ompi/mpi/fortran/mpif-h/waitall_f.c index 5cabd6274e4..ca72acc2552 100644 --- a/ompi/mpi/fortran/mpif-h/waitall_f.c +++ b/ompi/mpi/fortran/mpif-h/waitall_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -107,7 +107,7 @@ void ompi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests, array_of_requests[i] = c_req[i]->req_f_to_c_index; if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && !OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) { - MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); + MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]); } } } diff --git a/ompi/mpi/fortran/mpif-h/waitany_f.c b/ompi/mpi/fortran/mpif-h/waitany_f.c index 4bac9907c30..5e9ae7b95a8 100644 --- a/ompi/mpi/fortran/mpif-h/waitany_f.c +++ b/ompi/mpi/fortran/mpif-h/waitany_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -82,7 +82,7 @@ void ompi_waitany_f(MPI_Fint *count, MPI_Fint *array_of_requests, skipping other parameter error checks. */ if (OPAL_UNLIKELY(0 == OMPI_FINT_2_INT(*count))) { *indx = OMPI_INT_2_FINT(MPI_UNDEFINED); - MPI_Status_c2f(&ompi_status_empty, status); + MPI_Status_c2f(&ompi_status_empty, status); *ierr = OMPI_INT_2_FINT(MPI_SUCCESS); return; } @@ -99,7 +99,7 @@ void ompi_waitany_f(MPI_Fint *count, MPI_Fint *array_of_requests, c_req[i] = MPI_Request_f2c(array_of_requests[i]); } - c_ierr = MPI_Waitany(OMPI_FINT_2_INT(*count), c_req, + c_ierr = MPI_Waitany(OMPI_FINT_2_INT(*count), c_req, OMPI_SINGLE_NAME_CONVERT(indx), &c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); @@ -115,7 +115,7 @@ void ompi_waitany_f(MPI_Fint *count, MPI_Fint *array_of_requests, ++(*indx); } if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { - MPI_Status_c2f(&c_status, status); + MPI_Status_c2f(&c_status, status); } } free(c_req); diff --git a/ompi/mpi/fortran/mpif-h/waitsome_f.c b/ompi/mpi/fortran/mpif-h/waitsome_f.c index 1f8eb5dbee3..006c1b44c1c 100644 --- a/ompi/mpi/fortran/mpif-h/waitsome_f.c +++ b/ompi/mpi/fortran/mpif-h/waitsome_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -105,9 +105,9 @@ void ompi_waitsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests, } OMPI_ARRAY_FINT_2_INT_ALLOC(array_of_indices, *incount); - c_ierr = MPI_Waitsome(OMPI_FINT_2_INT(*incount), c_req, + c_ierr = MPI_Waitsome(OMPI_FINT_2_INT(*incount), c_req, OMPI_SINGLE_NAME_CONVERT(outcount), - OMPI_ARRAY_NAME_CONVERT(array_of_indices), + OMPI_ARRAY_NAME_CONVERT(array_of_indices), c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/win_attach_f.c b/ompi/mpi/fortran/mpif-h/win_attach_f.c index 2bd14f04520..8c9f1efe96f 100644 --- a/ompi/mpi/fortran/mpif-h/win_attach_f.c +++ b/ompi/mpi/fortran/mpif-h/win_attach_f.c @@ -2,9 +2,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_call_errhandler_f.c b/ompi/mpi/fortran/mpif-h/win_call_errhandler_f.c index 04de93d9c92..5f13d6c054e 100644 --- a/ompi/mpi/fortran/mpif-h/win_call_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/win_call_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_complete_f.c b/ompi/mpi/fortran/mpif-h/win_complete_f.c index 0ecb1ce2437..cd2f9227c03 100644 --- a/ompi/mpi/fortran/mpif-h/win_complete_f.c +++ b/ompi/mpi/fortran/mpif-h/win_complete_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_create_dynamic_f.c b/ompi/mpi/fortran/mpif-h/win_create_dynamic_f.c index 35ac451dc16..c5e3834886d 100644 --- a/ompi/mpi/fortran/mpif-h/win_create_dynamic_f.c +++ b/ompi/mpi/fortran/mpif-h/win_create_dynamic_f.c @@ -2,9 +2,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_create_errhandler_f.c b/ompi/mpi/fortran/mpif-h/win_create_errhandler_f.c index 6b46dc35585..2a41eaf14a4 100644 --- a/ompi/mpi/fortran/mpif-h/win_create_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/win_create_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,10 +69,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_CREATE_ERRHANDLER, static const char FUNC_NAME[] = "MPI_WIN_CREATE_ERRHANDLER"; -void ompi_win_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, +void ompi_win_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr) { - MPI_Errhandler c_errhandler = + MPI_Errhandler c_errhandler = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_WIN, (ompi_errhandler_generic_handler_fn_t*) function, OMPI_ERRHANDLER_LANG_FORTRAN); diff --git a/ompi/mpi/fortran/mpif-h/win_create_f.c b/ompi/mpi/fortran/mpif-h/win_create_f.c index 95ed62571b8..d6cdef2bb0c 100644 --- a/ompi/mpi/fortran/mpif-h/win_create_f.c +++ b/ompi/mpi/fortran/mpif-h/win_create_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_create_keyval_f.c b/ompi/mpi/fortran/mpif-h/win_create_keyval_f.c index 8d3e4eb2b0c..e0ac9fd3f8e 100644 --- a/ompi/mpi/fortran/mpif-h/win_create_keyval_f.c +++ b/ompi/mpi/fortran/mpif-h/win_create_keyval_f.c @@ -5,15 +5,15 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,7 +81,7 @@ void ompi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_att /* Note that we only set the "F77" bit and exclude the "F77_OLD" bit, indicating that the callbacks should use the new MPI-2 INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed - to the old MPI-1 INTEGER-parameter functions). */ + to the old MPI-1 INTEGER-parameter functions). */ ret = ompi_attr_create_keyval_aint(WIN_ATTR, copy_fn, del_fn, win_keyval, *extra_state, OMPI_KEYVAL_F77, diff --git a/ompi/mpi/fortran/mpif-h/win_delete_attr_f.c b/ompi/mpi/fortran/mpif-h/win_delete_attr_f.c index 6f6804d5626..9aca7145d5d 100644 --- a/ompi/mpi/fortran/mpif-h/win_delete_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/win_delete_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -70,6 +70,6 @@ void ompi_win_delete_attr_f(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr) int c_ierr; MPI_Win c_win = MPI_Win_f2c(*win); - c_ierr = MPI_Win_delete_attr(c_win, OMPI_FINT_2_INT(*win_keyval)); + c_ierr = MPI_Win_delete_attr(c_win, OMPI_FINT_2_INT(*win_keyval)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/win_detach_f.c b/ompi/mpi/fortran/mpif-h/win_detach_f.c index 9ada7b4dff8..76a4e3d66d2 100644 --- a/ompi/mpi/fortran/mpif-h/win_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/win_detach_f.c @@ -2,9 +2,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_fence_f.c b/ompi/mpi/fortran/mpif-h/win_fence_f.c index cdbbcf836c0..ab755da49f8 100644 --- a/ompi/mpi/fortran/mpif-h/win_fence_f.c +++ b/ompi/mpi/fortran/mpif-h/win_fence_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ void ompi_win_fence_f(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr) { int c_ierr; MPI_Win c_win = MPI_Win_f2c(*win); - + c_ierr = MPI_Win_fence(OMPI_FINT_2_INT(*assert), c_win); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); } diff --git a/ompi/mpi/fortran/mpif-h/win_free_f.c b/ompi/mpi/fortran/mpif-h/win_free_f.c index d05138d8873..1b511d8bd40 100644 --- a/ompi/mpi/fortran/mpif-h/win_free_f.c +++ b/ompi/mpi/fortran/mpif-h/win_free_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_free_keyval_f.c b/ompi/mpi/fortran/mpif-h/win_free_keyval_f.c index 5cd48c57ecc..fb91687bfea 100644 --- a/ompi/mpi/fortran/mpif-h/win_free_keyval_f.c +++ b/ompi/mpi/fortran/mpif-h/win_free_keyval_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ void ompi_win_free_keyval_f(MPI_Fint *win_keyval, MPI_Fint *ierr) { int c_ierr; OMPI_SINGLE_NAME_DECL(win_keyval); - + c_ierr = MPI_Win_free_keyval(OMPI_SINGLE_NAME_CONVERT(win_keyval)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/win_get_attr_f.c b/ompi/mpi/fortran/mpif-h/win_get_attr_f.c index 071a505f81a..821c8826c61 100644 --- a/ompi/mpi/fortran/mpif-h/win_get_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/win_get_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_get_errhandler_f.c b/ompi/mpi/fortran/mpif-h/win_get_errhandler_f.c index aa1a4ae2d72..620f8a1cf44 100644 --- a/ompi/mpi/fortran/mpif-h/win_get_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/win_get_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -64,7 +64,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_GET_ERRHANDLER, #include "ompi/mpi/fortran/mpif-h/profile/defines.h" #endif -void ompi_win_get_errhandler_f(MPI_Fint *win, MPI_Fint *errhandler, +void ompi_win_get_errhandler_f(MPI_Fint *win, MPI_Fint *errhandler, MPI_Fint *ierr) { int c_ierr; diff --git a/ompi/mpi/fortran/mpif-h/win_get_group_f.c b/ompi/mpi/fortran/mpif-h/win_get_group_f.c index d58281c5bfa..2f3c6a8cdad 100644 --- a/ompi/mpi/fortran/mpif-h/win_get_group_f.c +++ b/ompi/mpi/fortran/mpif-h/win_get_group_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_get_info_f.c b/ompi/mpi/fortran/mpif-h/win_get_info_f.c index 0f0ec514104..511660f80bd 100644 --- a/ompi/mpi/fortran/mpif-h/win_get_info_f.c +++ b/ompi/mpi/fortran/mpif-h/win_get_info_f.c @@ -2,9 +2,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_get_name_f.c b/ompi/mpi/fortran/mpif-h/win_get_name_f.c index df526439524..8413560aa2f 100644 --- a/ompi/mpi/fortran/mpif-h/win_get_name_f.c +++ b/ompi/mpi/fortran/mpif-h/win_get_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_lock_f.c b/ompi/mpi/fortran/mpif-h/win_lock_f.c index dc1059550ee..606794fb5c5 100644 --- a/ompi/mpi/fortran/mpif-h/win_lock_f.c +++ b/ompi/mpi/fortran/mpif-h/win_lock_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_post_f.c b/ompi/mpi/fortran/mpif-h/win_post_f.c index 1c825a24016..2273dca0afb 100644 --- a/ompi/mpi/fortran/mpif-h/win_post_f.c +++ b/ompi/mpi/fortran/mpif-h/win_post_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_win_post_f(MPI_Fint *group, MPI_Fint *assert, MPI_Win c_win = MPI_Win_f2c(*win); MPI_Group c_grp = MPI_Group_f2c(*group); - c_ierr = MPI_Win_post(c_grp, + c_ierr = MPI_Win_post(c_grp, OMPI_FINT_2_INT(*assert), c_win); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/win_set_attr_f.c b/ompi/mpi/fortran/mpif-h/win_set_attr_f.c index 968d0bc2020..4bddbf4afad 100644 --- a/ompi/mpi/fortran/mpif-h/win_set_attr_f.c +++ b/ompi/mpi/fortran/mpif-h/win_set_attr_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -79,7 +79,7 @@ void ompi_win_set_attr_f(MPI_Fint *win, MPI_Fint *win_keyval, c_ierr = ompi_attr_set_fortran_mpi2(WIN_ATTR, c_win, &c_win->w_keyhash, - OMPI_FINT_2_INT(*win_keyval), + OMPI_FINT_2_INT(*win_keyval), *attribute_val, false); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/win_set_errhandler_f.c b/ompi/mpi/fortran/mpif-h/win_set_errhandler_f.c index 180d46aa810..d56136e934f 100644 --- a/ompi/mpi/fortran/mpif-h/win_set_errhandler_f.c +++ b/ompi/mpi/fortran/mpif-h/win_set_errhandler_f.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_set_info_f.c b/ompi/mpi/fortran/mpif-h/win_set_info_f.c index 95755c3e155..5640c43af19 100644 --- a/ompi/mpi/fortran/mpif-h/win_set_info_f.c +++ b/ompi/mpi/fortran/mpif-h/win_set_info_f.c @@ -2,9 +2,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_set_name_f.c b/ompi/mpi/fortran/mpif-h/win_set_name_f.c index 4585f04e9c1..c5acd66620f 100644 --- a/ompi/mpi/fortran/mpif-h/win_set_name_f.c +++ b/ompi/mpi/fortran/mpif-h/win_set_name_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_start_f.c b/ompi/mpi/fortran/mpif-h/win_start_f.c index 920ec0e7fdd..13efb3e159f 100644 --- a/ompi/mpi/fortran/mpif-h/win_start_f.c +++ b/ompi/mpi/fortran/mpif-h/win_start_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -71,7 +71,7 @@ void ompi_win_start_f(MPI_Fint *group, MPI_Fint *assert, MPI_Group c_grp = MPI_Group_f2c(*group); MPI_Win c_win = MPI_Win_f2c(*win); - c_ierr = MPI_Win_start(c_grp, + c_ierr = MPI_Win_start(c_grp, OMPI_FINT_2_INT(*assert), c_win); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); diff --git a/ompi/mpi/fortran/mpif-h/win_test_f.c b/ompi/mpi/fortran/mpif-h/win_test_f.c index 19b0f5f85b5..01f112ad98f 100644 --- a/ompi/mpi/fortran/mpif-h/win_test_f.c +++ b/ompi/mpi/fortran/mpif-h/win_test_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_unlock_f.c b/ompi/mpi/fortran/mpif-h/win_unlock_f.c index 4c0c84a9509..c932a7eace4 100644 --- a/ompi/mpi/fortran/mpif-h/win_unlock_f.c +++ b/ompi/mpi/fortran/mpif-h/win_unlock_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/win_wait_f.c b/ompi/mpi/fortran/mpif-h/win_wait_f.c index c0c1b605441..a5f6c92675c 100644 --- a/ompi/mpi/fortran/mpif-h/win_wait_f.c +++ b/ompi/mpi/fortran/mpif-h/win_wait_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/wtick_f.c b/ompi/mpi/fortran/mpif-h/wtick_f.c index 77bf8efe001..df20467316f 100644 --- a/ompi/mpi/fortran/mpif-h/wtick_f.c +++ b/ompi/mpi/fortran/mpif-h/wtick_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/mpif-h/wtime_f.c b/ompi/mpi/fortran/mpif-h/wtime_f.c index e04f4aded94..3fb0df2f655 100644 --- a/ompi/mpi/fortran/mpif-h/wtime_f.c +++ b/ompi/mpi/fortran/mpif-h/wtime_f.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h b/ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h index e8b326ce062..d7879939cbe 100755 --- a/ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h +++ b/ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h @@ -5,8 +5,8 @@ /* Struct CFI_dim_t for triples of bound, extent and stride information */ typedef struct { - intptr_t lower_bound, - extent, + intptr_t lower_bound, + extent, sm; } CFI_dim_t; @@ -16,20 +16,20 @@ typedef struct { stride; } CFI_bounds_t; - + /* Maximum rank supported by the companion Fortran processor */ /* Changed from 15 to F2003 value of 7 (CER) */ #define CFI_MAX_RANK 7 -/* Struct CFI_cdesc_t for holding all the information about a +/* Struct CFI_cdesc_t for holding all the information about a descriptor-based Fortran object */ typedef struct { void * base_addr; /* base address of object */ size_t elem_len; /* length of one element, in bytes */ int rank; /* object rank, 0 .. CF_MAX_RANK */ - int type; /* identifier for type of object */ + int type; /* identifier for type of object */ int attribute; /* object attribute: 0..2, or -1 */ int state; /* allocation/association state: 0 or 1 */ //Removed (CER) diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am b/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am index 8a08bded7fd..c575eccbbe0 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am @@ -5,9 +5,9 @@ # and Technology (RIST). All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -69,14 +69,14 @@ OMPI_Fortran_binding.lo: OMPI_Fortran_binding.f90 mpi-f08-types.lo # mpi_api_lo_files = $(mpi_api_files:.f90=.lo) - + $(mpi_api_lo_files): mpi-f08.lo -mpi-f08.lo: mpi-f08-types.lo +mpi-f08.lo: mpi-f08-types.lo mpi-f08.lo: OMPI_Fortran_binding.lo mpi-f08.lo: mpi-f08-interfaces.lo mpi-f08.lo: mpi-f-interfaces-bind.h -mpi-f08.lo: mpi-f08.f90 +mpi-f08.lo: mpi-f08.f90 # Install the generated .mod files. Unfortunately, each F90 compiler # may generate different filenames, so we have to use a glob. :-( diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/OMPI_Fortran_binding_c.c b/ompi/mpi/fortran/use-mpi-f08-desc/OMPI_Fortran_binding_c.c index d7afd5e4789..fbd4e3531d6 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/OMPI_Fortran_binding_c.c +++ b/ompi/mpi/fortran/use-mpi-f08-desc/OMPI_Fortran_binding_c.c @@ -60,7 +60,7 @@ size_t numElements(CFI_cdesc_t * desc) { int r; size_t num = 1; - + /* TODO - can have 0 size arrays? */ for (r = 0; r < desc->rank; r++) { @@ -79,7 +79,7 @@ void * copyToContiguous(CFI_cdesc_t * desc, void * cont_buf, size_t offset, int { size_t b, e, num_copied; char * next_out; - + char * in = (char *) desc->base_addr + offset; char * out = (char *) cont_buf; @@ -112,7 +112,7 @@ void * copyFromContiguous(CFI_cdesc_t * desc, void * cont_buf, size_t offset, in { size_t b, e, num_copied; char * next_out; - + char * out = (char *) desc->base_addr + offset; char * in = (char *) cont_buf; @@ -137,12 +137,12 @@ void * copyFromContiguous(CFI_cdesc_t * desc, void * cont_buf, size_t offset, in /* From ../mpif-h/send_f.c */ -void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, - MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, +void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr); -void ompi_recv_f08_desc_f(CFI_cdesc_t *desc, MPI_Fint *count, MPI_Fint *datatype, - MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, +void ompi_recv_f08_desc_f(CFI_cdesc_t *desc, MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr) { size_t num_bytes = 0; @@ -167,10 +167,10 @@ void ompi_recv_f08_desc_f(CFI_cdesc_t *desc, MPI_Fint *count, MPI_Fint *datatype /* From ../mpif-h/send_f.c */ -void ompi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, +void ompi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr); -void ompi_send_f08_desc_f(CFI_cdesc_t *desc, MPI_Fint *count, MPI_Fint *datatype, +void ompi_send_f08_desc_f(CFI_cdesc_t *desc, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr) { size_t num_bytes = 0; diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/constants.h.fin b/ompi/mpi/fortran/use-mpi-f08-desc/constants.h.fin index 482ad70b523..f6f3a33ba23 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/constants.h.fin +++ b/ompi/mpi/fortran/use-mpi-f08-desc/constants.h.fin @@ -12,8 +12,8 @@ * Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. - * Copyright (c) 2009-2012 Los Alamos National Security, LLC. - * All rights reserved. + * Copyright (c) 2009-2012 Los Alamos National Security, LLC. + * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08.f90 b/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08.f90 index cd4360d7158..ce3b197ed94 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08.f90 +++ b/ompi/mpi/fortran/use-mpi-f08-desc/mpi-f08.f90 @@ -14,9 +14,9 @@ ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/recv_f08_desc.f90 b/ompi/mpi/fortran/use-mpi-f08-desc/recv_f08_desc.f90 index 042c725e06f..e7ac58d305a 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/recv_f08_desc.f90 +++ b/ompi/mpi/fortran/use-mpi-f08-desc/recv_f08_desc.f90 @@ -24,7 +24,7 @@ subroutine MPI_Recv_f08_desc_int_2d(buf,count,datatype,source,tag,comm,status,ie integer :: c_ierror type(CFI_cdesc_t) :: buf_desc - call make_desc_f(buf, buf_desc) + call make_desc_f(buf, buf_desc) !call print_desc(buf_desc) call ompi_recv_f08_desc_f(buf_desc, count, datatype%MPI_VAL, source, tag, comm%MPI_VAL, status, c_ierror) diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/send_f08_desc.f90 b/ompi/mpi/fortran/use-mpi-f08-desc/send_f08_desc.f90 index a9420fa6451..98f76e832cd 100644 --- a/ompi/mpi/fortran/use-mpi-f08-desc/send_f08_desc.f90 +++ b/ompi/mpi/fortran/use-mpi-f08-desc/send_f08_desc.f90 @@ -18,7 +18,7 @@ subroutine MPI_Send_f08_desc_int_2d(buf, count, datatype, dest, tag, comm, ierro type(MPI_Datatype), intent(in) :: datatype type(MPI_Comm), intent(in) :: comm integer, optional, intent(out) :: ierror - + integer :: err type(CFI_cdesc_t) :: buf_desc @@ -42,7 +42,7 @@ subroutine MPI_Send_f08_desc_dbl_1d(buf, count, datatype, dest, tag, comm, ierro type(MPI_Datatype), intent(in) :: datatype type(MPI_Comm), intent(in) :: comm integer, optional, intent(out) :: ierror - + integer :: err print *, "WARNING, testing of double precision arrays not yet supported with subarrays" @@ -62,7 +62,7 @@ subroutine MPI_Send_f08_desc_dbl_0d(buf, count, datatype, dest, tag, comm, ierro type(MPI_Datatype), intent(in) :: datatype type(MPI_Comm), intent(in) :: comm integer, optional, intent(out) :: ierror - + integer :: err print *, "WARNING, testing of double precision arrays not yet supported with subarrays" diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 42072dc9132..35d88cd380a 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -11,9 +11,9 @@ # and Technology (RIST). All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/fortran/use-mpi-f08/get_library_version_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/get_library_version_f08.F90 index 1f22f5d9f23..037c38dac2d 100644 --- a/ompi/mpi/fortran/use-mpi-f08/get_library_version_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/get_library_version_f08.F90 @@ -16,5 +16,5 @@ subroutine MPI_Get_library_version_f08(version,resultlen,ierror) call ompi_get_library_version_f(version,resultlen,c_ierror,len(version)) if (present(ierror)) ierror = c_ierror - + end subroutine MPI_Get_library_version_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/info_delete_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/info_delete_f08.F90 index 3135334c12d..1714443c76c 100644 --- a/ompi/mpi/fortran/use-mpi-f08/info_delete_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/info_delete_f08.F90 @@ -16,5 +16,5 @@ subroutine MPI_Info_delete_f08(info,key,ierror) call ompi_info_delete_f(info%MPI_VAL,key,c_ierror,len(key)) if (present(ierror)) ierror = c_ierror - + end subroutine MPI_Info_delete_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 index 180f4fc84ae..a7afe220167 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 @@ -14,9 +14,9 @@ ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pget_library_version_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pget_library_version_f08.F90 index 106eacbb3e1..9ed2b1650a1 100644 --- a/ompi/mpi/fortran/use-mpi-f08/profile/pget_library_version_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pget_library_version_f08.F90 @@ -16,5 +16,5 @@ subroutine PMPI_Get_library_version_f08(version,resultlen,ierror) call ompi_get_library_version_f(version,resultlen,c_ierror,len(version)) if (present(ierror)) ierror = c_ierror - + end subroutine PMPI_Get_library_version_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pget_processor_name_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pget_processor_name_f08.F90 index c6c6e4a9a9c..13c951fb3ab 100644 --- a/ompi/mpi/fortran/use-mpi-f08/profile/pget_processor_name_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pget_processor_name_f08.F90 @@ -15,6 +15,6 @@ subroutine PMPI_Get_processor_name_f08(name,resultlen,ierror) call ompi_get_processor_name_f(name,resultlen,c_ierror,len(name)) if (present(ierror)) ierror = c_ierror - + end subroutine PMPI_Get_processor_name_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pinfo_delete_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pinfo_delete_f08.F90 index a5c03083e79..e6d783498d8 100644 --- a/ompi/mpi/fortran/use-mpi-f08/profile/pinfo_delete_f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pinfo_delete_f08.F90 @@ -16,5 +16,5 @@ subroutine PMPI_Info_delete_f08(info,key,ierror) call ompi_info_delete_f(info%MPI_VAL,key,c_ierror,len(key)) if (present(ierror)) ierror = c_ierror - + end subroutine PMPI_Info_delete_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/tests/contig.f90 b/ompi/mpi/fortran/use-mpi-f08/tests/contig.f90 index 37ba13513ab..4bea9269935 100644 --- a/ompi/mpi/fortran/use-mpi-f08/tests/contig.f90 +++ b/ompi/mpi/fortran/use-mpi-f08/tests/contig.f90 @@ -17,6 +17,6 @@ subroutine print_array(A, count) BIND(C, name="print_array") print *, A(::2) call print_array(A, 10) - call print_array(A(::2), 5) + call print_array(A(::2), 5) end program diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am index 04e2fde9485..4543b922d90 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am @@ -5,9 +5,9 @@ # and Technology (RIST). All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 index 605eddbca32..4120d7d6b3b 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 @@ -6,15 +6,15 @@ ! 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, +! 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) 2006-2014 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am index a29ba41453d..74e9b070014 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am @@ -6,19 +6,19 @@ # 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, +# 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) 2006-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2007 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2014-2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/fortran/use-mpi-tkr/fortran_kinds.sh.in b/ompi/mpi/fortran/use-mpi-tkr/fortran_kinds.sh.in index fa4c9e4da19..bc81b890427 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/fortran_kinds.sh.in +++ b/ompi/mpi/fortran/use-mpi-tkr/fortran_kinds.sh.in @@ -6,15 +6,15 @@ # 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, +# 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) 2006-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,7 +26,7 @@ ckinds="@OMPI_FORTRAN_CKINDS@" # In prior versions of Open MPI, we used to allow the user to choose # which "size" of "use mpi" module to build: tiny, small, medium, and -# large. Large never really worked. +# large. Large never really worked. # # According to MPI-3 p610:34-41, if ignore TKR is not supported, we # should not provide interfaces for MPI subroutines with choice diff --git a/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in b/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in index b706996f190..fe6db1b536d 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in +++ b/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in @@ -5,15 +5,15 @@ ! Copyright (c) 2004-2005 The University of Tennessee and The University ! of Tennessee Research Foundation. All rights ! reserved. -! Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +! Copyright (c) 2004-2007 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) 2006-2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/use-mpi-tkr/mpi.F90 b/ompi/mpi/fortran/use-mpi-tkr/mpi.F90 index 4d1feea1545..89c515f7e3b 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/mpi.F90 +++ b/ompi/mpi/fortran/use-mpi-tkr/mpi.F90 @@ -6,15 +6,15 @@ ! 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, +! 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) 2006-2014 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpi/fortran/use-mpi-tkr/test/print_align.f90 b/ompi/mpi/fortran/use-mpi-tkr/test/print_align.f90 index dc61ca05050..126ca6f3b6a 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/test/print_align.f90 +++ b/ompi/mpi/fortran/use-mpi-tkr/test/print_align.f90 @@ -5,15 +5,15 @@ ! 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, +! 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) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! ! print_align.f90 diff --git a/ompi/mpi/fortran/use-mpi-tkr/test/print_ikinds.f90 b/ompi/mpi/fortran/use-mpi-tkr/test/print_ikinds.f90 index 98f6b6ab52d..d2b5e6aea9b 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/test/print_ikinds.f90 +++ b/ompi/mpi/fortran/use-mpi-tkr/test/print_ikinds.f90 @@ -5,15 +5,15 @@ ! 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, +! 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) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! ! print_ikinds.f90 diff --git a/ompi/mpi/fortran/use-mpi-tkr/test/print_prec_range.f90 b/ompi/mpi/fortran/use-mpi-tkr/test/print_prec_range.f90 index cff453d571b..1abc5526875 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/test/print_prec_range.f90 +++ b/ompi/mpi/fortran/use-mpi-tkr/test/print_prec_range.f90 @@ -5,15 +5,15 @@ ! 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, +! 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) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! ! print_prec_range.f90 diff --git a/ompi/mpi/fortran/use-mpi-tkr/test/print_rkinds.f90 b/ompi/mpi/fortran/use-mpi-tkr/test/print_rkinds.f90 index 6510cf00bca..3eaa5466910 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/test/print_rkinds.f90 +++ b/ompi/mpi/fortran/use-mpi-tkr/test/print_rkinds.f90 @@ -5,15 +5,15 @@ ! 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, +! 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) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! ! print_rkinds.f90 diff --git a/ompi/mpi/fortran/use-mpi-tkr/test/send_t.c b/ompi/mpi/fortran/use-mpi-tkr/test/send_t.c index 4a532296c60..e39a02f25eb 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/test/send_t.c +++ b/ompi/mpi/fortran/use-mpi-tkr/test/send_t.c @@ -5,15 +5,15 @@ * 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, + * 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) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * send_t.c - tests mpi_send variants diff --git a/ompi/mpi/fortran/use-mpi-tkr/test/test_send.f90 b/ompi/mpi/fortran/use-mpi-tkr/test/test_send.f90 index e25d2921417..33c24ec845a 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/test/test_send.f90 +++ b/ompi/mpi/fortran/use-mpi-tkr/test/test_send.f90 @@ -5,15 +5,15 @@ ! 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, +! 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) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! ! test_send.f90 - tests mpi_send variants (calls functions in send_t.c) diff --git a/ompi/mpi/help-mpi-api.txt b/ompi/mpi/help-mpi-api.txt index fc7dffd8bb9..6947369a4cc 100644 --- a/ompi/mpi/help-mpi-api.txt +++ b/ompi/mpi/help-mpi-api.txt @@ -1,12 +1,12 @@ # -*- text -*- # -# Copyright (c) 2006 High Performance Computing Center Stuttgart, +# Copyright (c) 2006 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI. @@ -19,7 +19,7 @@ The only exceptions are MPI_Initialized, MPI_Finalized and MPI_Get_version. Calling MPI_Init or MPI_Init_thread twice is erroneous. # [mpi-abort] -MPI_ABORT was invoked on rank %d in communicator %s +MPI_ABORT was invoked on rank %d in communicator %s with errorcode %d. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. diff --git a/ompi/mpi/java/Makefile.am b/ompi/mpi/java/Makefile.am index e0525cc5ba2..9e516a704a1 100644 --- a/ompi/mpi/java/Makefile.am +++ b/ompi/mpi/java/Makefile.am @@ -3,9 +3,9 @@ # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/java/README b/ompi/mpi/java/README index 2635166df65..75db2708418 100644 --- a/ompi/mpi/java/README +++ b/ompi/mpi/java/README @@ -39,7 +39,7 @@ original copyrights and license terms of mpiJava are listed below. (Bugfixes/Additions, CMake based configure/build) Blasius Czink HLRS, University of Stuttgart - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/ompi/mpi/java/c/Makefile.am b/ompi/mpi/java/c/Makefile.am index c54f1aff610..95615ea41f8 100644 --- a/ompi/mpi/java/c/Makefile.am +++ b/ompi/mpi/java/c/Makefile.am @@ -5,9 +5,9 @@ # Copyright (c) 2015 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/java/c/mpiJava.h b/ompi/mpi/java/c/mpiJava.h index da565075c30..6f20cf943b8 100644 --- a/ompi/mpi/java/c/mpiJava.h +++ b/ompi/mpi/java/c/mpiJava.h @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/c/mpi_CartComm.c b/ompi/mpi/java/c/mpi_CartComm.c index cd796578a98..9c6a8b3040f 100644 --- a/ompi/mpi/java/c/mpi_CartComm.c +++ b/ompi/mpi/java/c/mpi_CartComm.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* @@ -58,7 +58,7 @@ JNIEXPORT void JNICALL Java_mpi_CartComm_init(JNIEnv *env, jclass clazz) { ompi_java.CartParmsInit = (*env)->GetMethodID(env, ompi_java.CartParmsClass, "", "([I[Z[I)V"); - + ompi_java.ShiftParmsInit = (*env)->GetMethodID(env, ompi_java.ShiftParmsClass, "", "(II)V"); } diff --git a/ompi/mpi/java/c/mpi_Comm.c b/ompi/mpi/java/c/mpi_Comm.c index 40df88c3880..654c2ad475a 100644 --- a/ompi/mpi/java/c/mpi_Comm.c +++ b/ompi/mpi/java/c/mpi_Comm.c @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* diff --git a/ompi/mpi/java/c/mpi_Constant.c b/ompi/mpi/java/c/mpi_Constant.c index 7e80e542efe..20d180b8e62 100644 --- a/ompi/mpi/java/c/mpi_Constant.c +++ b/ompi/mpi/java/c/mpi_Constant.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/java/c/mpi_Datatype.c b/ompi/mpi/java/c/mpi_Datatype.c index 69344603be5..1979a21b65c 100644 --- a/ompi/mpi/java/c/mpi_Datatype.c +++ b/ompi/mpi/java/c/mpi_Datatype.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* diff --git a/ompi/mpi/java/c/mpi_Errhandler.c b/ompi/mpi/java/c/mpi_Errhandler.c index acfcf9d8fd0..793bcbbb516 100644 --- a/ompi/mpi/java/c/mpi_Errhandler.c +++ b/ompi/mpi/java/c/mpi_Errhandler.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* @@ -36,7 +36,7 @@ /* * File : mpi_Errhandler.c - * Headerfile : mpi_Errhandler.h + * Headerfile : mpi_Errhandler.h * Author : Bryan Carpenter * Created : 1999 * Revision : $Revision: 1.2 $ diff --git a/ompi/mpi/java/c/mpi_File.c b/ompi/mpi/java/c/mpi_File.c index e404bf0cbd7..c1c34d5acc3 100644 --- a/ompi/mpi/java/c/mpi_File.c +++ b/ompi/mpi/java/c/mpi_File.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/java/c/mpi_GraphComm.c b/ompi/mpi/java/c/mpi_GraphComm.c index b7de5e482b0..8a77eb816d4 100644 --- a/ompi/mpi/java/c/mpi_GraphComm.c +++ b/ompi/mpi/java/c/mpi_GraphComm.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* @@ -35,7 +35,7 @@ */ /* * File : mpi_GraphComm.c - * Headerfile : mpi_GraphComm.h + * Headerfile : mpi_GraphComm.h * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 * Revision : $Revision: 1.2 $ diff --git a/ompi/mpi/java/c/mpi_Group.c b/ompi/mpi/java/c/mpi_Group.c index ea25109a0a0..2ea29f4acdb 100644 --- a/ompi/mpi/java/c/mpi_Group.c +++ b/ompi/mpi/java/c/mpi_Group.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* @@ -35,7 +35,7 @@ */ /* * File : mpi_Group.c - * Headerfile : mpi_Group.h + * Headerfile : mpi_Group.h * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 * Revision : $Revision: 1.3 $ diff --git a/ompi/mpi/java/c/mpi_Info.c b/ompi/mpi/java/c/mpi_Info.c index ef8d2ee29ad..93545c757e8 100644 --- a/ompi/mpi/java/c/mpi_Info.c +++ b/ompi/mpi/java/c/mpi_Info.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/java/c/mpi_Intercomm.c b/ompi/mpi/java/c/mpi_Intercomm.c index 917d6f62831..8e8f1b68e98 100644 --- a/ompi/mpi/java/c/mpi_Intercomm.c +++ b/ompi/mpi/java/c/mpi_Intercomm.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* @@ -35,7 +35,7 @@ */ /* * File : mpi_Intercomm.c - * Headerfile : mpi_Intercomm.h + * Headerfile : mpi_Intercomm.h * Author : Xinying Li * Created : Thu Apr 9 12:22:15 1998 * Revision : $Revision: 1.3 $ diff --git a/ompi/mpi/java/c/mpi_Intracomm.c b/ompi/mpi/java/c/mpi_Intracomm.c index 00c8953495d..f73aa0089df 100644 --- a/ompi/mpi/java/c/mpi_Intracomm.c +++ b/ompi/mpi/java/c/mpi_Intracomm.c @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* @@ -147,7 +147,7 @@ JNIEXPORT jlong JNICALL Java_mpi_Intracomm_createDistGraph( { MPI_Comm graph; int nnodes = (*env)->GetArrayLength(env, sources); - + jint *jSources, *jDegrees, *jDestins, *jWeights = NULL; int *cSources, *cDegrees, *cDestins, *cWeights = MPI_UNWEIGHTED; ompi_java_getIntArray(env, sources, &jSources, &cSources); @@ -181,12 +181,12 @@ JNIEXPORT jlong JNICALL Java_mpi_Intracomm_createDistGraphAdjacent( int inDegree = (*env)->GetArrayLength(env, sources), outDegree = (*env)->GetArrayLength(env, destins); - + jint *jSources, *jDestins, *jSrcWeights, *jDesWeights; int *cSources, *cDestins, *cSrcWeights, *cDesWeights; ompi_java_getIntArray(env, sources, &jSources, &cSources); ompi_java_getIntArray(env, destins, &jDestins, &cDestins); - + if(weighted) { ompi_java_getIntArray(env, srcWeights, &jSrcWeights, &cSrcWeights); @@ -197,7 +197,7 @@ JNIEXPORT jlong JNICALL Java_mpi_Intracomm_createDistGraphAdjacent( jSrcWeights = jDesWeights = NULL; cSrcWeights = cDesWeights = MPI_UNWEIGHTED; } - + int rc = MPI_Dist_graph_create_adjacent((MPI_Comm)comm, inDegree, cSources, cSrcWeights, outDegree, cDestins, cDesWeights, (MPI_Info)info, reorder, &graph); @@ -237,14 +237,14 @@ JNIEXPORT void JNICALL Java_mpi_Intracomm_scan( ompi_java_getReadPtr(&sPtr,&sItem,env,sBuf,sdb,sOff,count,type,bType); ompi_java_getWritePtr(&rPtr, &rItem, env, rBuf, rdb, count, type); } - + MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, bType); int rc = MPI_Scan(sPtr, rPtr, count, type, op, comm); ompi_java_exceptionCheck(env, rc); if(sBuf != NULL) ompi_java_releaseReadPtr(sPtr, sItem, sBuf, sdb); - + ompi_java_releaseWritePtr(rPtr,rItem,env,rBuf,rdb,rOff,count,type,bType); } @@ -358,7 +358,7 @@ JNIEXPORT jlong JNICALL Java_mpi_Intracomm_accept( root, (MPI_Comm)comm, &newComm); ompi_java_exceptionCheck(env, rc); - + if(jport != NULL) (*env)->ReleaseStringUTFChars(env, jport, port); diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index 8d8d56289d0..477ea883ea9 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* @@ -1036,7 +1036,7 @@ void ompi_java_getBooleanArray(JNIEnv *env, jbooleanArray array, for(i = 0; i < length; i++) cb[i] = jb[i]; - + *jptr = jb; *cptr = cb; } @@ -1137,7 +1137,7 @@ void* ompi_java_attrSet(JNIEnv *env, jbyteArray jval) (*env)->GetByteArrayRegion(env, jval, 0, length, (jbyte*)cval + sizeof(int)); - + return cval; } diff --git a/ompi/mpi/java/c/mpi_Message.c b/ompi/mpi/java/c/mpi_Message.c index 634ae823292..a51e112ff49 100644 --- a/ompi/mpi/java/c/mpi_Message.c +++ b/ompi/mpi/java/c/mpi_Message.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/java/c/mpi_Op.c b/ompi/mpi/java/c/mpi_Op.c index 0aac510f76d..44508d1c9d0 100644 --- a/ompi/mpi/java/c/mpi_Op.c +++ b/ompi/mpi/java/c/mpi_Op.c @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* @@ -82,7 +82,7 @@ static jobject setBooleanArray(JNIEnv *env, void *vec, int len) if(obj != NULL) (*env)->SetBooleanArrayRegion(env, obj, 0, len, vec); - + return obj; } diff --git a/ompi/mpi/java/c/mpi_Prequest.c b/ompi/mpi/java/c/mpi_Prequest.c index f1f402c9471..a036d45906e 100644 --- a/ompi/mpi/java/c/mpi_Prequest.c +++ b/ompi/mpi/java/c/mpi_Prequest.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/ompi/mpi/java/c/mpi_Request.c b/ompi/mpi/java/c/mpi_Request.c index 58010869022..4ad9e2c307a 100644 --- a/ompi/mpi/java/c/mpi_Request.c +++ b/ompi/mpi/java/c/mpi_Request.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* @@ -78,7 +78,7 @@ static void setIndices(JNIEnv *env, jintArray indices, int *cIdx, int count) } (*env)->SetIntArrayRegion(env, indices, 0, count, jIdx); - + if(jIdx != cIdx) free(jIdx); } diff --git a/ompi/mpi/java/c/mpi_Status.c b/ompi/mpi/java/c/mpi_Status.c index b22acfc0752..0863a872b7f 100644 --- a/ompi/mpi/java/c/mpi_Status.c +++ b/ompi/mpi/java/c/mpi_Status.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /* diff --git a/ompi/mpi/java/c/mpi_Win.c b/ompi/mpi/java/c/mpi_Win.c index 66399433e21..a67d2eaf031 100644 --- a/ompi/mpi/java/c/mpi_Win.c +++ b/ompi/mpi/java/c/mpi_Win.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -46,10 +46,10 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_allocateWin(JNIEnv *env, jobject jthis, { void *basePtr = (*env)->GetDirectBufferAddress(env, jBase); MPI_Win win; - + int rc = MPI_Win_allocate((MPI_Aint)size, dispUnit, (MPI_Info)info, (MPI_Comm)comm, basePtr, &win); - + ompi_java_exceptionCheck(env, rc); return (jlong)win; } @@ -59,10 +59,10 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_allocateSharedWin(JNIEnv *env, jobject jthi { void *basePtr = (*env)->GetDirectBufferAddress(env, jBase); MPI_Win win; - + int rc = MPI_Win_allocate_shared((MPI_Aint)size, dispUnit, (MPI_Info)info, (MPI_Comm)comm, basePtr, &win); - + ompi_java_exceptionCheck(env, rc); return (jlong)win; } @@ -329,11 +329,11 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_rPut(JNIEnv *env, jobject jthis, { void *origPtr = ompi_java_getDirectBufferAddress(env, origin_addr); MPI_Request request; - + int rc = MPI_Rput(origPtr, origin_count, (MPI_Datatype)origin_type, target_rank, (MPI_Aint)target_disp, target_count, (MPI_Datatype)target_datatype, (MPI_Win)win, &request); - + ompi_java_exceptionCheck(env, rc); return (jlong)request; } @@ -344,11 +344,11 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_rGet(JNIEnv *env, jobject jthis, jlong win, { void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); MPI_Request request; - + int rc = MPI_Rget(orgPtr, orgCount, (MPI_Datatype)orgType, targetRank, (MPI_Aint)targetDisp, targetCount, (MPI_Datatype)targetType, (MPI_Win)win, &request); - + ompi_java_exceptionCheck(env, rc); return (jlong)request; } @@ -360,11 +360,11 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_rAccumulate(JNIEnv *env, jobject jthis, jlo void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); MPI_Request request; - + int rc = MPI_Raccumulate(orgPtr, orgCount, (MPI_Datatype)orgType, targetRank, (MPI_Aint)targetDisp, targetCount, (MPI_Datatype)targetType, op, (MPI_Win)win, &request); - + ompi_java_exceptionCheck(env, rc); return (jlong)request; } @@ -377,12 +377,12 @@ JNIEXPORT void JNICALL Java_mpi_Win_getAccumulate(JNIEnv *env, jobject jthis, jl void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); void *resultPtr = (*env)->GetDirectBufferAddress(env, resultBuff); MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); - + int rc = MPI_Get_accumulate(orgPtr, orgCount, (MPI_Datatype)orgType, resultPtr, resultCount, (MPI_Datatype)resultType, targetRank, (MPI_Aint)targetDisp, targetCount, (MPI_Datatype)targetType, op, (MPI_Win)win); - + ompi_java_exceptionCheck(env, rc); } @@ -395,12 +395,12 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_rGetAccumulate(JNIEnv *env, jobject jthis, void *resultPtr = (*env)->GetDirectBufferAddress(env, resultBuff); MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); MPI_Request request; - + int rc = MPI_Rget_accumulate(orgPtr, orgCount, (MPI_Datatype)orgType, resultPtr, resultCount, (MPI_Datatype)resultType, targetRank, (MPI_Aint)targetDisp, targetCount, (MPI_Datatype)targetType, op, (MPI_Win)win, &request); - + ompi_java_exceptionCheck(env, rc); return (jlong)request; } @@ -441,7 +441,7 @@ JNIEXPORT void JNICALL Java_mpi_Win_compareAndSwap (JNIEnv *env, jobject jthis, void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); void *compPtr = (*env)->GetDirectBufferAddress(env, compareAddr); void *resultPtr = (*env)->GetDirectBufferAddress(env, resultAddr); - + int rc = MPI_Compare_and_swap(orgPtr, compPtr, resultPtr, dataType, targetRank, targetDisp, (MPI_Win)win); ompi_java_exceptionCheck(env, rc); } @@ -452,7 +452,7 @@ JNIEXPORT void JNICALL Java_mpi_Win_fetchAndOp(JNIEnv *env, jobject jthis, jlong void *orgPtr = (*env)->GetDirectBufferAddress(env, origin); void *resultPtr = (*env)->GetDirectBufferAddress(env, resultAddr); MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType); - + int rc = MPI_Fetch_and_op(orgPtr, resultPtr, dataType, targetRank, targetDisp, op, (MPI_Win)win); ompi_java_exceptionCheck(env, rc); } diff --git a/ompi/mpi/java/java/CartComm.java b/ompi/mpi/java/java/CartComm.java index 9b6b71ecb3e..90bf1c7ec87 100644 --- a/ompi/mpi/java/java/CartComm.java +++ b/ompi/mpi/java/java/CartComm.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -126,7 +126,7 @@ protected CartComm(long[] commRequest) MPI.check(); return new CartComm(dupWithInfo(handle, info.handle)); } - + /** * Returns cartesian topology information. *

Java binding of the MPI operations {@code MPI_CARTDIM_GET} and diff --git a/ompi/mpi/java/java/CartParms.java b/ompi/mpi/java/java/CartParms.java index 7d1645369b9..2ea7eca7938 100644 --- a/ompi/mpi/java/java/CartParms.java +++ b/ompi/mpi/java/java/CartParms.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -26,7 +26,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/ompi/mpi/java/java/Comm.java b/ompi/mpi/java/java/Comm.java index b3b58876578..fe7e7b35a26 100644 --- a/ompi/mpi/java/java/Comm.java +++ b/ompi/mpi/java/java/Comm.java @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -49,12 +49,12 @@ * * * IMPLEMENTATION DETAILS - * + * * All methods with buffers that can be direct or non direct have * a companion argument 'db' which is true if the buffer is direct. * For example, if the buffer argument is recvBuf, the companion * argument will be 'rdb', meaning if the receive buffer is direct. - * + * * Checking if a buffer is direct is faster in Java than C. */ package mpi; @@ -668,7 +668,7 @@ public final Request ibSend(Buffer buf, int count, { MPI.check(); assertDirectBuffer(buf); - Request req = new Request(ibSend(handle, buf, count, type.handle, dest, tag)); + Request req = new Request(ibSend(handle, buf, count, type.handle, dest, tag)); req.addSendBufRef(buf); return req; } @@ -2401,8 +2401,8 @@ public final void allToAllw( recvHandles); } - private native void allToAllw(long comm, - Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, + private native void allToAllw(long comm, + Buffer sendBuf, int[] sendCount, int[] sDispls, long[] sendTypes, Buffer recvBuf, int[] recvCount, int[] rDispls, long[] recvTypes) throws MPIException; diff --git a/ompi/mpi/java/java/Constant.java b/ompi/mpi/java/java/Constant.java index 5512fe85d68..de1031c1d84 100644 --- a/ompi/mpi/java/java/Constant.java +++ b/ompi/mpi/java/java/Constant.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/Count.java b/ompi/mpi/java/java/Count.java index 56a890d3a92..f0ccc9b552b 100644 --- a/ompi/mpi/java/java/Count.java +++ b/ompi/mpi/java/java/Count.java @@ -82,7 +82,7 @@ public boolean equals(Object obj) return false; } - public int compareTo(Object obj) + public int compareTo(Object obj) { if(obj instanceof Count) { if(this.count - ((Count)obj).getCount() > 0) { diff --git a/ompi/mpi/java/java/Datatype.java b/ompi/mpi/java/java/Datatype.java index 50f63e7b0b9..a8e113d1cdb 100644 --- a/ompi/mpi/java/java/Datatype.java +++ b/ompi/mpi/java/java/Datatype.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -26,7 +26,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/ompi/mpi/java/java/DistGraphNeighbors.java b/ompi/mpi/java/java/DistGraphNeighbors.java index f10326a1aae..e545b6f3a1c 100644 --- a/ompi/mpi/java/java/DistGraphNeighbors.java +++ b/ompi/mpi/java/java/DistGraphNeighbors.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/DoubleComplex.java b/ompi/mpi/java/java/DoubleComplex.java index 45a90ae2682..3a75e3e6866 100644 --- a/ompi/mpi/java/java/DoubleComplex.java +++ b/ompi/mpi/java/java/DoubleComplex.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/DoubleInt.java b/ompi/mpi/java/java/DoubleInt.java index ace535d0bba..ac75ffb5e7a 100644 --- a/ompi/mpi/java/java/DoubleInt.java +++ b/ompi/mpi/java/java/DoubleInt.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/Errhandler.java b/ompi/mpi/java/java/Errhandler.java index 0df546ec7a3..75917b408e5 100644 --- a/ompi/mpi/java/java/Errhandler.java +++ b/ompi/mpi/java/java/Errhandler.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/File.java b/ompi/mpi/java/java/File.java index f2be9489c11..3309c623770 100644 --- a/ompi/mpi/java/java/File.java +++ b/ompi/mpi/java/java/File.java @@ -5,24 +5,24 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * * IMPLEMENTATION DETAILS - * + * * All methods with buffers that can be direct or non direct have * a companion argument 'db' which is true if the buffer is direct. - * + * * Checking if a buffer is direct is faster in Java than C. */ diff --git a/ompi/mpi/java/java/FileView.java b/ompi/mpi/java/java/FileView.java index 7fc96feb05b..cb791056c42 100644 --- a/ompi/mpi/java/java/FileView.java +++ b/ompi/mpi/java/java/FileView.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/FloatComplex.java b/ompi/mpi/java/java/FloatComplex.java index a347a76be43..572f1d6fb30 100644 --- a/ompi/mpi/java/java/FloatComplex.java +++ b/ompi/mpi/java/java/FloatComplex.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/FloatInt.java b/ompi/mpi/java/java/FloatInt.java index f01cb3d3169..1eb55bde76c 100644 --- a/ompi/mpi/java/java/FloatInt.java +++ b/ompi/mpi/java/java/FloatInt.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/Freeable.java b/ompi/mpi/java/java/Freeable.java index 3b03125a816..9ec8a4571d4 100644 --- a/ompi/mpi/java/java/Freeable.java +++ b/ompi/mpi/java/java/Freeable.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/GraphComm.java b/ompi/mpi/java/java/GraphComm.java index 8416ee836b4..384136a9537 100644 --- a/ompi/mpi/java/java/GraphComm.java +++ b/ompi/mpi/java/java/GraphComm.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -126,7 +126,7 @@ protected GraphComm(long[] commRequest) MPI.check(); return new GraphComm(dupWithInfo(handle, info.handle)); } - + /** * Returns graph topology information. *

Java binding of the MPI operations {@code MPI_GRAPHDIMS_GET} diff --git a/ompi/mpi/java/java/GraphParms.java b/ompi/mpi/java/java/GraphParms.java index 6c702c4c2db..357c94f2c0a 100644 --- a/ompi/mpi/java/java/GraphParms.java +++ b/ompi/mpi/java/java/GraphParms.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/Group.java b/ompi/mpi/java/java/Group.java index 2afa293d52d..7f5d505b5c3 100644 --- a/ompi/mpi/java/java/Group.java +++ b/ompi/mpi/java/java/Group.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -26,7 +26,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/ompi/mpi/java/java/Info.java b/ompi/mpi/java/java/Info.java index d648d909432..82c3f668a5c 100644 --- a/ompi/mpi/java/java/Info.java +++ b/ompi/mpi/java/java/Info.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/Int2.java b/ompi/mpi/java/java/Int2.java index 6c38274b154..0ba594d65cf 100644 --- a/ompi/mpi/java/java/Int2.java +++ b/ompi/mpi/java/java/Int2.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/Intercomm.java b/ompi/mpi/java/java/Intercomm.java index ab34fdfde17..e5a52f00023 100644 --- a/ompi/mpi/java/java/Intercomm.java +++ b/ompi/mpi/java/java/Intercomm.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -106,7 +106,7 @@ protected Intercomm(long[] commRequest) MPI.check(); return new Intercomm(iDup(handle)); } - + /** * Duplicates this communicator with the info object used in the call. *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. @@ -119,7 +119,7 @@ protected Intercomm(long[] commRequest) MPI.check(); return new Intercomm(dupWithInfo(handle, info.handle)); } - + // Inter-Communication /** diff --git a/ompi/mpi/java/java/Intracomm.java b/ompi/mpi/java/java/Intracomm.java index 05df66ee6e2..bd6c9542d08 100644 --- a/ompi/mpi/java/java/Intracomm.java +++ b/ompi/mpi/java/java/Intracomm.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -47,12 +47,12 @@ * * * IMPLEMENTATION DETAILS - * + * * All methods with buffers that can be direct or non direct have * a companion argument 'db' which is true if the buffer is direct. * For example, if the buffer argument is recvBuf, the companion * argument will be 'rdb', meaning if the receive buffer is direct. - * + * * Checking if a buffer is direct is faster in Java than C. */ package mpi; @@ -123,7 +123,7 @@ protected Intracomm(long[] commRequest) MPI.check(); return new Intracomm(iDup(handle)); } - + /** * Duplicates this communicator with the info object used in the call. *

Java binding of {@code MPI_COMM_DUP_WITH_INFO}. @@ -136,7 +136,7 @@ protected Intracomm(long[] commRequest) MPI.check(); return new Intracomm(dupWithInfo(handle, info.handle)); } - + /** * Partition the group associated with this communicator and create * a new communicator within each subgroup. @@ -186,7 +186,7 @@ public final Intracomm create(Group group) throws MPIException } private native long create(long comm, long group); - + /** * Create a new intracommunicator for the given group. *

Java binding of the MPI operation {@code MPI_COMM_CREATE_GROUP}. @@ -202,7 +202,7 @@ public final Intracomm createGroup(Group group, int tag) throws MPIException } private native long createGroup(long comm, long group, int tag); - + // Topology Constructors /** diff --git a/ompi/mpi/java/java/LongInt.java b/ompi/mpi/java/java/LongInt.java index 1ecdbc2e033..2d9a9143f31 100644 --- a/ompi/mpi/java/java/LongInt.java +++ b/ompi/mpi/java/java/LongInt.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/MPI.java b/ompi/mpi/java/java/MPI.java index ca8976d10cc..ea37e9f811c 100644 --- a/ompi/mpi/java/java/MPI.java +++ b/ompi/mpi/java/java/MPI.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/MPIException.java b/ompi/mpi/java/java/MPIException.java index 27fcb36187e..24ec52f9074 100644 --- a/ompi/mpi/java/java/MPIException.java +++ b/ompi/mpi/java/java/MPIException.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -26,7 +26,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/ompi/mpi/java/java/Makefile.am b/ompi/mpi/java/java/Makefile.am index 43eb560140e..bf7d2aaa3e5 100644 --- a/ompi/mpi/java/java/Makefile.am +++ b/ompi/mpi/java/java/Makefile.am @@ -4,9 +4,9 @@ # Copyright (c) 2015 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/java/java/Message.java b/ompi/mpi/java/java/Message.java index 54ffb8aa98e..9946a671294 100644 --- a/ompi/mpi/java/java/Message.java +++ b/ompi/mpi/java/java/Message.java @@ -5,24 +5,24 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * * IMPLEMENTATION DETAILS - * + * * All methods with buffers that can be direct or non direct have * a companion argument 'db' which is true if the buffer is direct. - * + * * Checking if a buffer is direct is faster in Java than C. */ diff --git a/ompi/mpi/java/java/Op.java b/ompi/mpi/java/java/Op.java index e65de6bea60..eb3ccd86638 100644 --- a/ompi/mpi/java/java/Op.java +++ b/ompi/mpi/java/java/Op.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/Prequest.java b/ompi/mpi/java/java/Prequest.java index b633330af35..94b36978392 100644 --- a/ompi/mpi/java/java/Prequest.java +++ b/ompi/mpi/java/java/Prequest.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/Request.java b/ompi/mpi/java/java/Request.java index a33b8365563..a1c59fa4a9e 100644 --- a/ompi/mpi/java/java/Request.java +++ b/ompi/mpi/java/java/Request.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -117,10 +117,10 @@ public final void cancel() throws MPIException private native void cancel(long request) throws MPIException; /** - * Adds a receive buffer to this Request object. This method - * should be called by the internal api whenever a persistent - * request is created and any time a request object, that has - * an associated buffer, is returned from an opperation to protect + * Adds a receive buffer to this Request object. This method + * should be called by the internal api whenever a persistent + * request is created and any time a request object, that has + * an associated buffer, is returned from an opperation to protect * the buffer from getting prematurely garbage collected. * @param buf buffer to add to the array list */ @@ -130,10 +130,10 @@ protected final void addRecvBufRef(Buffer buf) } /** - * Adds a send buffer to this Request object. This method - * should be called by the internal api whenever a persistent - * request is created and any time a request object, that has - * an associated buffer, is returned from an opperation to protect + * Adds a send buffer to this Request object. This method + * should be called by the internal api whenever a persistent + * request is created and any time a request object, that has + * an associated buffer, is returned from an opperation to protect * the buffer from getting prematurely garbage collected. * @param buf buffer to add to the array list */ diff --git a/ompi/mpi/java/java/ShiftParms.java b/ompi/mpi/java/java/ShiftParms.java index 4bc9cf52373..37f26572e9e 100644 --- a/ompi/mpi/java/java/ShiftParms.java +++ b/ompi/mpi/java/java/ShiftParms.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * diff --git a/ompi/mpi/java/java/ShortInt.java b/ompi/mpi/java/java/ShortInt.java index 3da028a9f4e..18c1a421f05 100644 --- a/ompi/mpi/java/java/ShortInt.java +++ b/ompi/mpi/java/java/ShortInt.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/Status.java b/ompi/mpi/java/java/Status.java index d71484b49b2..977542b69f9 100644 --- a/ompi/mpi/java/java/Status.java +++ b/ompi/mpi/java/java/Status.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @@ -159,7 +159,7 @@ public Count getElementsX(Datatype datatype) throws MPIException private native Count getElementsX( int source, int tag, int error, int cancelled, long ucount, long datatype) throws MPIException; - + /** * Sets the number of basic elements for this status object. *

Java binding of the MPI operation {@code MPI_STATUS_SET_ELEMENTS}. @@ -182,7 +182,7 @@ public void setElements(Datatype datatype, int count) throws MPIException private native int setElements( int source, int tag, int error, int cancelled, long ucount, long datatype, int count) throws MPIException; - + /** * Sets the number of basic elements for this status object. *

Java binding of the MPI operation {@code MPI_STATUS_SET_ELEMENTS_X}. @@ -205,7 +205,7 @@ public void setElementsX(Datatype datatype, Count count) throws MPIException private native long setElementsX( int source, int tag, int error, int cancelled, long ucount, long datatype, long count) throws MPIException; - + /** * Sets the cancelled flag. *

Java binding of the MPI operation {@code MPI_STATUS_SET_CANCELLED}. @@ -221,7 +221,7 @@ public void setCancelled(boolean flag) throws MPIException int error = (int)data[i++]; int cancelled = (int)data[i++]; long ucount = data[i++]; - + if(flag) { setCancelled(source, tag, error, cancelled, ucount, 1); data[3] = 1; @@ -229,13 +229,13 @@ public void setCancelled(boolean flag) throws MPIException setCancelled(source, tag, error, cancelled, ucount, 0); data[3] = 0; } - + } private native void setCancelled( int source, int tag, int error, int cancelled, long ucount, int flag) throws MPIException; - + /** * Returns the "source" of message. *

Java binding of the MPI value {@code MPI_SOURCE}. diff --git a/ompi/mpi/java/java/Struct.java b/ompi/mpi/java/java/Struct.java index 43edbe62db6..b7dfefe4d4b 100644 --- a/ompi/mpi/java/java/Struct.java +++ b/ompi/mpi/java/java/Struct.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpi/java/java/UserFunction.java b/ompi/mpi/java/java/UserFunction.java index 22a57bed4b5..13a98d67c17 100644 --- a/ompi/mpi/java/java/UserFunction.java +++ b/ompi/mpi/java/java/UserFunction.java @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* diff --git a/ompi/mpi/java/java/Win.java b/ompi/mpi/java/java/Win.java index 59f002d0fe6..6fa3b181d19 100644 --- a/ompi/mpi/java/java/Win.java +++ b/ompi/mpi/java/java/Win.java @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -119,7 +119,7 @@ private native long allocateSharedWin( * Java binding of {@code MPI_WIN_CREATE_DYNAMIC}. * @param info info object * @param comm communicator - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public Win(Info info, Comm comm) throws MPIException @@ -731,7 +731,7 @@ private native long rGetAccumulate( /** * Java binding of the MPI operation {@code MPI_WIN_LOCK_ALL}. * @param assertion program assertion - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void lockAll(int assertion) throws MPIException { @@ -744,7 +744,7 @@ private native void lockAll(long win, int assertion) /** * Java binding of the MPI operation {@code MPI_WIN_UNLOCK_ALL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void unlockAll() throws MPIException { @@ -756,7 +756,7 @@ public void unlockAll() throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_SYNC}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void sync() throws MPIException { @@ -769,7 +769,7 @@ public void sync() throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH}. * @param targetRank rank of target window - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flush(int targetRank) throws MPIException { @@ -781,7 +781,7 @@ public void flush(int targetRank) throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH_ALL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flushAll() throws MPIException { @@ -830,7 +830,7 @@ private native void compareAndSwap( * @throws MPIException Signals that an MPI exception of some sort has occurred. */ - public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, + public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, int targetRank, int targetDisp, Op op) throws MPIException { @@ -839,18 +839,18 @@ public void fetchAndOp(Buffer origin, Buffer resultAddr, Datatype dataType, if(!origin.isDirect()) throw new IllegalArgumentException("The origin must be direct buffer."); - fetchAndOp(handle, origin, resultAddr, dataType.handle, targetRank, + fetchAndOp(handle, origin, resultAddr, dataType.handle, targetRank, targetDisp, op, op.handle, getBaseType(dataType, dataType)); } private native void fetchAndOp( - long win, Buffer origin, Buffer resultAddr, long targetType, int targetRank, + long win, Buffer origin, Buffer resultAddr, long targetType, int targetRank, int targetDisp, Op jOp, long hOp, int baseType) throws MPIException; /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL}. * @param targetRank rank of target window - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flushLocal(int targetRank) throws MPIException @@ -863,7 +863,7 @@ public void flushLocal(int targetRank) throws MPIException /** * Java binding of the MPI operation {@code MPI_WIN_FLUSH_LOCAL_ALL}. - * @throws MPIException Signals that an MPI exception of some sort has occurred. + * @throws MPIException Signals that an MPI exception of some sort has occurred. */ public void flushLocalAll() throws MPIException diff --git a/ompi/mpi/man/man3/MPI.3in b/ompi/mpi/man/man3/MPI.3in index 09f1cac1ae2..1d15de7f85e 100644 --- a/ompi/mpi/man/man3/MPI.3in +++ b/ompi/mpi/man/man3/MPI.3in @@ -1,10 +1,10 @@ .\" -*- nroff -*- -.\" Copyright 2008 Sun Microsystems, Inc. +.\" Copyright 2008 Sun Microsystems, Inc. .\" Copyright (c) 1996 Thinking Machines Corporation .\" $COPYRIGHT$ .TH MPI 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -MPI \- General information #PACKAGE_NAME# #PACKAGE_VERSION#. +MPI \- General information #PACKAGE_NAME# #PACKAGE_VERSION#. .SH MPI .ft R @@ -37,11 +37,11 @@ The MPI standards are available at the following URL: .SH MAN PAGE SYNTAX .ft R -Man pages for Open MPI and Open MPI I/O routines are named according to C syntax, that is, they begin with the prefix "MPI_", all in uppercase, and the first letter following the "MPI_" prefix is also uppercase. The rest of the letters in the routine are all lowercase, for example, "MPI_Comm_get_attr". +Man pages for Open MPI and Open MPI I/O routines are named according to C syntax, that is, they begin with the prefix "MPI_", all in uppercase, and the first letter following the "MPI_" prefix is also uppercase. The rest of the letters in the routine are all lowercase, for example, "MPI_Comm_get_attr". .SH ENVIRONMENT .ft R -To fine-tune your Open MPI environment, you can either use arguments to the \fImpirun\fP, \fIorterun\fP, or \fImpiexec\fP commands, or you can use MCA parameters. +To fine-tune your Open MPI environment, you can either use arguments to the \fImpirun\fP, \fIorterun\fP, or \fImpiexec\fP commands, or you can use MCA parameters. .sp For more information on arguments, see the orterun.1 man page. .sp @@ -59,7 +59,7 @@ called. By default, this error handler aborts the MPI job. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past -an error. +an error. .sp For more information on Open MPI error codes, see \fImpi.h\fP in the \fIinclude\fP directory. .sp @@ -88,60 +88,60 @@ MPI_ERR_OTHER 15 Other error; use Error_string. MPI_ERR_INTERN 16 Internal error code. MPI_ERR_IN_STATUS 17 Look in status for error value. -MPI_ERR_PENDING 18 Pending request. +MPI_ERR_PENDING 18 Pending request. MPI_ERR_ACCESS 19 Permission denied. MPI_ERR_AMODE 20 Unsupported amode passed to open. - + MPI_ERR_ASSERT 21 Invalid assert. -MPI_ERR_BAD_FILE 22 Invalid file name (for example, - path name too long). +MPI_ERR_BAD_FILE 22 Invalid file name (for example, + path name too long). MPI_ERR_BASE 23 Invalid base. -MPI_ERR_CONVERSION 24 An error occurred in a user-supplied - data-conversion function. +MPI_ERR_CONVERSION 24 An error occurred in a user-supplied + data-conversion function. MPI_ERR_DISP 25 Invalid displacement. -MPI_ERR_DUP_DATAREP 26 Conversion functions could not - be registered because a data - representation identifier that was - already defined was passed to - MPI_REGISTER_DATAREP. -MPI_ERR_FILE_EXISTS 27 File exists. -MPI_ERR_FILE_IN_USE 28 File operation could not be - completed, as the file is currently - open by some process. +MPI_ERR_DUP_DATAREP 26 Conversion functions could not + be registered because a data + representation identifier that was + already defined was passed to + MPI_REGISTER_DATAREP. +MPI_ERR_FILE_EXISTS 27 File exists. +MPI_ERR_FILE_IN_USE 28 File operation could not be + completed, as the file is currently + open by some process. MPI_ERR_FILE 29 -MPI_ERR_INFO_KEY 30 Illegal info key. +MPI_ERR_INFO_KEY 30 Illegal info key. -MPI_ERR_INFO_NOKEY 31 No such key. -MPI_ERR_INFO_VALUE 32 Illegal info value. -MPI_ERR_INFO 33 Invalid info object. -MPI_ERR_IO 34 I/O error. -MPI_ERR_KEYVAL 35 Illegal key value. +MPI_ERR_INFO_NOKEY 31 No such key. +MPI_ERR_INFO_VALUE 32 Illegal info value. +MPI_ERR_INFO 33 Invalid info object. +MPI_ERR_IO 34 I/O error. +MPI_ERR_KEYVAL 35 Illegal key value. MPI_ERR_LOCKTYPE 36 Invalid locktype. MPI_ERR_NAME 37 Name not found. -MPI_ERR_NO_MEM 38 Memory exhausted. +MPI_ERR_NO_MEM 38 Memory exhausted. MPI_ERR_NOT_SAME 39 -MPI_ERR_NO_SPACE 40 Not enough space. +MPI_ERR_NO_SPACE 40 Not enough space. -MPI_ERR_NO_SUCH_FILE 41 File (or directory) does not exist. +MPI_ERR_NO_SUCH_FILE 41 File (or directory) does not exist. MPI_ERR_PORT 42 Invalid port. -MPI_ERR_QUOTA 43 Quota exceeded. -MPI_ERR_READ_ONLY 44 Read-only file system. +MPI_ERR_QUOTA 43 Quota exceeded. +MPI_ERR_READ_ONLY 44 Read-only file system. MPI_ERR_RMA_CONFLICT 45 Conflicting accesses to window. - -MPI_ERR_RMA_SYNC 46 Erroneous RMA synchronization. + +MPI_ERR_RMA_SYNC 46 Erroneous RMA synchronization. MPI_ERR_SERVICE 47 Invalid publish/unpublish. MPI_ERR_SIZE 48 Invalid size. -MPI_ERR_SPAWN 49 Error spawning. -MPI_ERR_UNSUPPORTED_DATAREP - 50 Unsupported datarep passed to +MPI_ERR_SPAWN 49 Error spawning. +MPI_ERR_UNSUPPORTED_DATAREP + 50 Unsupported datarep passed to MPI_File_set_view. MPI_ERR_UNSUPPORTED_OPERATION - 51 Unsupported operation, such as - seeking on a file that supports - only sequential access. + 51 Unsupported operation, such as + seeking on a file that supports + only sequential access. MPI_ERR_WIN 52 Invalid window. MPI_ERR_LASTCODE 53 Last error code. diff --git a/ompi/mpi/man/man3/MPI_Abort.3in b/ompi/mpi/man/man3/MPI_Abort.3in index b10af29d3c3..8b292f9f889 100644 --- a/ompi/mpi/man/man3/MPI_Abort.3in +++ b/ompi/mpi/man/man3/MPI_Abort.3in @@ -19,8 +19,8 @@ int MPI_Abort(MPI_Comm \fIcomm\fP, int\fI errorcode\fP) .ft R .nf INCLUDE 'mpif.h' -MPI_ABORT(\fICOMM\fP, \fIERRORCODE\fP, \fIIERROR\fP) - INTEGER \fICOMM\fP,\fI ERRORCODE\fP,\fI IERROR +MPI_ABORT(\fICOMM\fP, \fIERRORCODE\fP, \fIIERROR\fP) + INTEGER \fICOMM\fP,\fI ERRORCODE\fP,\fI IERROR .fi .SH C++ Syntax @@ -32,17 +32,17 @@ void Comm::Abort(int \fIerrorcode\fP) .SH INPUT PARAMETERS .ft R .TP 1i -comm +comm Communicator of tasks to abort. .TP 1i -errorcode +errorcode Error code to return to invoking environment. .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -61,5 +61,5 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Accumulate.3in b/ompi/mpi/man/man3/MPI_Accumulate.3in index ccb25e049fd..4d11966b963 100644 --- a/ompi/mpi/man/man3/MPI_Accumulate.3in +++ b/ompi/mpi/man/man3/MPI_Accumulate.3in @@ -14,8 +14,8 @@ .nf #include int MPI_Accumulate(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, - MPI_Datatype \fIorigin_datatype\fP, int \fItarget_rank\fP, - MPI_Aint \fItarget_disp\fP, int \fItarget_count\fP, + MPI_Datatype \fIorigin_datatype\fP, int \fItarget_rank\fP, + MPI_Aint \fItarget_disp\fP, int \fItarget_count\fP, MPI_Datatype \fItarget_datatype\fP, MPI_Op \fIop\fP, MPI_Win \fIwin\fP) int MPI_Raccumulate(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, @@ -28,11 +28,11 @@ int MPI_Raccumulate(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_ACCUMULATE(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, - TARGET_DISP, TARGET_COUNT, TARGET_DATATYPE, OP, WIN, IERROR\fP) - \fIORIGIN_ADDR\fP(*) - INTEGER(KIND=MPI_ADDRESS_KIND) \fITARGET_DISP\fP - INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_COUNT, +MPI_ACCUMULATE(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, + TARGET_DISP, TARGET_COUNT, TARGET_DATATYPE, OP, WIN, IERROR\fP) + \fIORIGIN_ADDR\fP(*) + INTEGER(KIND=MPI_ADDRESS_KIND) \fITARGET_DISP\fP + INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_COUNT, TARGET_DATATYPE, OP, WIN, IERROR \fP MPI_RACCUMULATE(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, @@ -46,10 +46,10 @@ MPI_RACCUMULATE(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, .SH C++ Syntax .nf #include -void MPI::Win::Accumulate(const void* \fIorigin_addr\fP, int \fIorigin_count\fP, - const MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, - MPI::Aint \fItarget_disp\fP, int \fItarget_count\fP, const MPI::Datatype& - \fItarget_datatype\fP, const MPI::Op& \fIop\fP) const +void MPI::Win::Accumulate(const void* \fIorigin_addr\fP, int \fIorigin_count\fP, + const MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, + MPI::Aint \fItarget_disp\fP, int \fItarget_count\fP, const MPI::Datatype& + \fItarget_datatype\fP, const MPI::Op& \fIop\fP) const .fi .SH INPUT PARAMETERS @@ -72,11 +72,11 @@ Rank of target (nonnegative integer). .ft R .TP 1i target_disp -Displacement from start of window to beginning of target buffer (nonnegative integer). +Displacement from start of window to beginning of target buffer (nonnegative integer). .ft R .TP 1i target_count -Number of entries in target buffer (nonnegative integer). +Number of entries in target buffer (nonnegative integer). .ft R .TP 1i target_datatype @@ -84,11 +84,11 @@ Data type of each entry in target buffer (handle). .ft R .TP 1i op -Reduce operation (handle). +Reduce operation (handle). .ft R .TP 1i win -Window object (handle). +Window object (handle). .SH OUTPUT PARAMETER .ft R @@ -96,17 +96,17 @@ Window object (handle). MPI_Raccumulate: RMA request .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R \fBMPI_Accumulate\fP is a function used for one-sided MPI communication that adds the contents of the origin buffer (as defined by \fIorigin_addr\fP, \fIorigin_count\fP, and \fIorigin_datatype\fP) to the buffer specified by the arguments \fItarget_count\fP and \fItarget_datatype\fP, at offset \fItarget_disp\fP, in the target window specified by \fItarget_rank\fP and \fIwin\fP, using the operation \fIop\fP. The target window can only be accessed by processes within the same node. This is similar to MPI_Put, except that data is combined into the target area instead of overwriting it. .sp -Any of the predefined operations for MPI_Reduce can be used. User-defined functions cannot be used. For example, if \fIop\fP is MPI_SUM, each element of the origin buffer is added to the corresponding element in the target, replacing the former value in the target. +Any of the predefined operations for MPI_Reduce can be used. User-defined functions cannot be used. For example, if \fIop\fP is MPI_SUM, each element of the origin buffer is added to the corresponding element in the target, replacing the former value in the target. .sp -Each datatype argument must be a predefined data type or a derived data type, where all basic components are of the same predefined data type. Both datatype arguments must be constructed from the same predefined data type. The operation \fIop\fP applies to elements of that predefined type. The \fItarget_datatype\fP argument must not specify overlapping entries, and the target buffer must fit in the target window. +Each datatype argument must be a predefined data type or a derived data type, where all basic components are of the same predefined data type. Both datatype arguments must be constructed from the same predefined data type. The operation \fIop\fP applies to elements of that predefined type. The \fItarget_datatype\fP argument must not specify overlapping entries, and the target buffer must fit in the target window. .sp -A new predefined operation, MPI_REPLACE, is defined. It corresponds to the associative function f(a, b) =b; that is, the current value in the target memory is replaced by the value supplied by the origin. +A new predefined operation, MPI_REPLACE, is defined. It corresponds to the associative function f(a, b) =b; that is, the current value in the target memory is replaced by the value supplied by the origin. .sp \fBMPI_Raccumulate\fP is similar to \fBMPI_Accumulate\fP, except that it allocates a communication request object and associates it with the request handle (the argument \fIrequest\fP) that can be used to wait or test for completion. The completion of an \fBMPI_Raccumulate\fP operation indicates that the \fIorigin_addr\fP buffer is free to be updated. It does not indicate that the operation has completed at the target window. @@ -136,11 +136,11 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R .sp -MPI_Put +MPI_Put MPI_Get_accumulate MPI_Reduce diff --git a/ompi/mpi/man/man3/MPI_Add_error_class.3in b/ompi/mpi/man/man3/MPI_Add_error_class.3in index dbb85df2f1a..e1a8ac872a4 100644 --- a/ompi/mpi/man/man3/MPI_Add_error_class.3in +++ b/ompi/mpi/man/man3/MPI_Add_error_class.3in @@ -23,7 +23,7 @@ int MPI_Add_error_class(int *\fIerrorclass\fP) .nf INCLUDE 'mpif.h' MPI_ADD_ERROR_CLASS(\fIERRORCLASS, IERROR\fP) - INTEGER \fIERRORCLASS, IERROR\fP + INTEGER \fIERRORCLASS, IERROR\fP .fi .SH C++ Syntax @@ -40,7 +40,7 @@ New error class (integer). .ft R .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -78,7 +78,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Add_error_code.3in b/ompi/mpi/man/man3/MPI_Add_error_code.3in index 9412f6c0f37..ab4fa8b2f75 100644 --- a/ompi/mpi/man/man3/MPI_Add_error_code.3in +++ b/ompi/mpi/man/man3/MPI_Add_error_code.3in @@ -45,7 +45,7 @@ Error code returned by an MPI routine or an MPI error class (integer). .ft R .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION Creates a new error code associated with \fIerrorclass\fP and returns @@ -71,7 +71,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Add_error_string.3in b/ompi/mpi/man/man3/MPI_Add_error_string.3in index baeab402afa..0956bccba63 100644 --- a/ompi/mpi/man/man3/MPI_Add_error_string.3in +++ b/ompi/mpi/man/man3/MPI_Add_error_string.3in @@ -25,7 +25,7 @@ int MPI_Add_error_string(int \fIerrorcode\fP, const char *\fIstring\fP) INCLUDE 'mpif.h' MPI_ADD_ERROR_STRING(\fIERRORCODE, STRING, IERROR\fP) INTEGER \fIERRORCODE, IERROR\fP - CHARACTER*(*) \fISTRING\fP + CHARACTER*(*) \fISTRING\fP .fi .SH C++ Syntax @@ -48,7 +48,7 @@ Text that corresponds to the error code or class (string). .ft R .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -73,7 +73,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Address.3in b/ompi/mpi/man/man3/MPI_Address.3in index f2a98164e4b..83fef395e36 100644 --- a/ompi/mpi/man/man3/MPI_Address.3in +++ b/ompi/mpi/man/man3/MPI_Address.3in @@ -11,15 +11,15 @@ .ft R .SH C Syntax .nf -#include +#include int MPI_Address(void *\fIlocation\fP, MPI_Aint\fP *address\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_ADDRESS(\fILOCATION\fP,\fI ADDRESS\fP,\fI IERROR\fP) - \fILOCATION\fP (*) +MPI_ADDRESS(\fILOCATION\fP,\fI ADDRESS\fP,\fI IERROR\fP) + \fILOCATION\fP (*) INTEGER \fIADDRESS\fP,\fI IERROR\fP @@ -38,33 +38,33 @@ Address of location (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Get_address instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Get_address instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp The address of a location in memory can be found by invoking this function. Returns the (byte) address of location. .sp -Example: Using MPI_Address for an array. +Example: Using MPI_Address for an array. .sp .nf -REAL A(100,100) +REAL A(100,100) .fi .br - INTEGER I1, I2, DIFF + INTEGER I1, I2, DIFF .br - CALL MPI_ADDRESS(A(1,1), I1, IERROR) + CALL MPI_ADDRESS(A(1,1), I1, IERROR) .br - CALL MPI_ADDRESS(A(10,10), I2, IERROR) + CALL MPI_ADDRESS(A(10,10), I2, IERROR) .br - DIFF = I2 - I1 + DIFF = I2 - I1 .br -! The value of DIFF is 909*sizeofreal; the values of I1 and I2 are +! The value of DIFF is 909*sizeofreal; the values of I1 and I2 are .br -! implementation dependent. +! implementation dependent. .fi .SH NOTES @@ -75,7 +75,7 @@ C users may be tempted to avoid using MPI_Address and rely on the availability of the address operator &. Note, however, that & cast-expression is a pointer, not an address. ANSI C does not require that the value of a pointer (or the pointer -cast to int) be the absolute address of the object pointed at although +cast to int) be the absolute address of the object pointed at although this is commonly the case. Furthermore, referencing may not have a unique definition on machines with a segmented address space. The use of MPI_Address to "reference" C variables guarantees portability to @@ -86,7 +86,7 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Get_address diff --git a/ompi/mpi/man/man3/MPI_Allgather.3in b/ompi/mpi/man/man3/MPI_Allgather.3in index df6a132820b..59d34c6e482 100644 --- a/ompi/mpi/man/man3/MPI_Allgather.3in +++ b/ompi/mpi/man/man3/MPI_Allgather.3in @@ -15,7 +15,7 @@ #include int MPI_Allgather(const void\fI *sendbuf\fP, int \fI sendcount\fP, MPI_Datatype\fI sendtype\fP, void\fI *recvbuf\fP, int\fI recvcount\fP, - MPI_Datatype\fI recvtype\fP, MPI_Comm\fI comm\fP) + MPI_Datatype\fI recvtype\fP, MPI_Comm\fI comm\fP) int MPI_Iallgather(const void\fI *sendbuf\fP, int \fI sendcount\fP, MPI_Datatype\fI sendtype\fP, void\fI *recvbuf\fP, int\fI recvcount\fP, @@ -25,11 +25,11 @@ int MPI_Iallgather(const void\fI *sendbuf\fP, int \fI sendcount\fP, .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_ALLGATHER(\fISENDBUF\fP,\fI SENDCOUNT\fP,\fI SENDTYPE\fP,\fI RECVBUF\fP,\fI RECVCOUNT\fP,\fI - RECVTYPE\fP,\fI COMM\fP,\fI IERROR\fP) +MPI_ALLGATHER(\fISENDBUF\fP,\fI SENDCOUNT\fP,\fI SENDTYPE\fP,\fI RECVBUF\fP,\fI RECVCOUNT\fP,\fI + RECVTYPE\fP,\fI COMM\fP,\fI IERROR\fP) \fISENDBUF\fP (*), \fIRECVBUF\fP (*) INTEGER \fISENDCOUNT\fP,\fI SENDTYPE\fP,\fI RECVCOUNT\fP,\fI RECVTYPE\fP,\fI COMM\fP, - INTEGER \fIIERROR\fP + INTEGER \fIIERROR\fP MPI_IALLGATHER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, REQUEST, IERROR\fP) @@ -49,25 +49,25 @@ void MPI::Comm::Allgather(const void* \fIsendbuf\fP, int \fIsendcount\fP, const .SH INPUT PARAMETERS .ft R .TP 1i -sendbuf +sendbuf Starting address of send buffer (choice). .TP 1i -sendcount +sendcount Number of elements in send buffer (integer). .TP 1i -sendtype +sendtype Datatype of send buffer elements (handle). .TP 1i -recvbuf +recvbuf Starting address of recv buffer (choice). .TP 1i -recvcount +recvcount Number of elements received from any process (integer). .TP 1i -recvtype +recvtype Datatype of receive buffer elements (handle). .TP 1i -comm +comm Communicator (handle). .SH OUTPUT PARAMETERS @@ -81,19 +81,19 @@ request Request (handle, non-blocking only). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Allgather is similar to MPI_Gather, except that all processes receive the result, instead of just the root. In other words, all processes contribute to the result, and all processes receive the result. +MPI_Allgather is similar to MPI_Gather, except that all processes receive the result, instead of just the root. In other words, all processes contribute to the result, and all processes receive the result. .sp The type signature associated with sendcount, sendtype at a process must be equal to the type signature associated with recvcount, recvtype at any other process. .sp -The outcome of a call to MPI_Allgather(\&...) is as if all processes executed n calls to +The outcome of a call to MPI_Allgather(\&...) is as if all processes executed n calls to .sp .nf MPI_Gather(sendbuf,sendcount,sendtype,recvbuf,recvcount, - recvtype,root,comm), + recvtype,root,comm), .fi .sp .fi @@ -102,39 +102,39 @@ for root = 0 , ..., n-1. The rules for correct usage of MPI_Allgather are easily \fBExample:\fR The all-gather version of Example 1 in MPI_Gather. Using MPI_Allgather, we will gather 100 ints from every process in the group to every process. .sp .nf -MPI_Comm comm; - int gsize,sendarray[100]; - int *rbuf; - \&... - MPI_Comm_size( comm, &gsize); - rbuf = (int *)malloc(gsize*100*sizeof(int)); - MPI_Allgather( sendarray, 100, MPI_INT, rbuf, 100, MPI_INT, comm); +MPI_Comm comm; + int gsize,sendarray[100]; + int *rbuf; + \&... + MPI_Comm_size( comm, &gsize); + rbuf = (int *)malloc(gsize*100*sizeof(int)); + MPI_Allgather( sendarray, 100, MPI_INT, rbuf, 100, MPI_INT, comm); .fi .sp -After the call, every process has the group-wide concatenation of the sets of data. +After the call, every process has the group-wide concatenation of the sets of data. .SH USE OF IN-PLACE OPTION When the communicator is an intracommunicator, you can perform an all-gather operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR. In this case, \fIsendcount\fR and \fIsendtype\fR are ignored. The input data of each process is assumed to be in the area where that process would receive its own contribution to the receive buffer. Specifically, the outcome of a call to MPI_Allgather that used the in-place option is identical to the case in which all processes executed \fIn\fR calls to .sp .nf - MPI_GATHER ( MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, recvbuf, + MPI_GATHER ( MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, recvbuf, recvcount, recvtype, root, comm ) for root =0, ... , n-1. -.fi +.fi .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp -Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. +Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation, however, need not be symmetric. The number of items sent by the processes in first group need not be equal to the number of items sent by the the processes in the second group. You can move data in only one direction by giving \fIsendcount\fR a value of 0 for communication in the reverse direction. +When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation, however, need not be symmetric. The number of items sent by the processes in first group need not be equal to the number of items sent by the the processes in the second group. You can move data in only one direction by giving \fIsendcount\fR a value of 0 for communication in the reverse direction. .sp The first group defines the root process. The root process uses MPI_ROOT as the value of \fIroot\fR. All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR. All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR. .sp When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase. -.sp +.sp .SH ERRORS @@ -142,7 +142,7 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Allgatherv.3in b/ompi/mpi/man/man3/MPI_Allgatherv.3in index a315966453a..b075f58cc3d 100644 --- a/ompi/mpi/man/man3/MPI_Allgatherv.3in +++ b/ompi/mpi/man/man3/MPI_Allgatherv.3in @@ -1,7 +1,7 @@ .\" -*- nroff -*- .\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. .\" Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. -.\" Copyright 2007-2008 Sun Microsystems, Inc. +.\" Copyright 2007-2008 Sun Microsystems, Inc. .\" Copyright (c) 1996 Thinking Machines Corporation .\" $COPYRIGHT$ .TH MPI_Allgatherv 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" @@ -42,7 +42,7 @@ MPI_IALLGATHERV(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, .SH C++ Syntax .nf #include -void MPI::Comm::Allgatherv(const void* \fIsendbuf\fP, int \fIsendcount\fP, +void MPI::Comm::Allgatherv(const void* \fIsendbuf\fP, int \fIsendcount\fP, const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, const int \fIrecvcounts\fP[], const int \fIdispls\fP[], const MPI::Datatype& \fIrecvtype\fP) const = 0 @@ -51,31 +51,31 @@ void MPI::Comm::Allgatherv(const void* \fIsendbuf\fP, int \fIsendcount\fP, .SH INPUT PARAMETERS .ft R .TP 1i -sendbuf +sendbuf Starting address of send buffer (choice). .TP 1i -sendcount +sendcount Number of elements in send buffer (integer). .TP 1i -sendtype +sendtype Datatype of send buffer elements (handle). .TP 1i -recvcount +recvcount Integer array (of length group size) containing the number of elements that are received from each process. .TP 1i -displs +displs Integer array (of length group size). Entry i specifies the displacement (relative to recvbuf) at which to place the incoming data from process i. .TP 1i -recvtype +recvtype Datatype of receive buffer elements (handle). .TP 1i -comm +comm Communicator (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -recvbuf +recvbuf Address of receive buffer (choice). .TP 1i request @@ -83,52 +83,52 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Allgatherv is similar to MPI_Allgather in that all processes gather data from all other processes, except that each process can send a different amount of data. The block of data sent from the jth process is received by every process and placed in the jth block of the buffer +MPI_Allgatherv is similar to MPI_Allgather in that all processes gather data from all other processes, except that each process can send a different amount of data. The block of data sent from the jth process is received by every process and placed in the jth block of the buffer .I recvbuf. .sp -The type signature associated with sendcount, sendtype, at process j must be equal to the type signature associated with recvcounts[j], recvtype at any other process. +The type signature associated with sendcount, sendtype, at process j must be equal to the type signature associated with recvcounts[j], recvtype at any other process. .sp -The outcome is as if all processes executed calls to +The outcome is as if all processes executed calls to .nf MPI_Gatherv(sendbuf,sendcount,sendtype,recvbuf,recvcount, displs,recvtype,root,comm) .fi .sp -for root = 0 , ..., n-1. The rules for correct usage of MPI_Allgatherv are easily found from the corresponding rules for MPI_Gatherv. +for root = 0 , ..., n-1. The rules for correct usage of MPI_Allgatherv are easily found from the corresponding rules for MPI_Gatherv. .SH USE OF IN-PLACE OPTION When the communicator is an intracommunicator, you can perform an all-gather operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR. In this case, \fIsendcount\fR and \fIsendtype\fR are ignored. The input data of each process is assumed to be in the area where that process would receive its own contribution to the receive buffer. Specifically, the outcome of a call to MPI_Allgather that used the in-place option is identical to the case in which all processes executed \fIn\fR calls to .sp .nf - MPI_GATHERV ( MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, recvbuf, + MPI_GATHERV ( MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, recvbuf, recvcounts, displs, recvtype, root, comm ) for root =0, ... , n-1. -.fi +.fi .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp -Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. +Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group, concatenated, and received by all the members of the second group. Then the data is gathered from all the members of the second group, concatenated, and received by all the members of the first. The send buffer arguments in the one group must be consistent with the receive buffer arguments in the other group, and vice versa. The operation must exhibit symmetric, full-duplex behavior. +When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group, concatenated, and received by all the members of the second group. Then the data is gathered from all the members of the second group, concatenated, and received by all the members of the first. The send buffer arguments in the one group must be consistent with the receive buffer arguments in the other group, and vice versa. The operation must exhibit symmetric, full-duplex behavior. .sp The first group defines the root process. The root process uses MPI_ROOT as the value of \fIroot\fR. All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR. All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR. .sp When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase. -.sp +.sp .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Alloc_mem.3in b/ompi/mpi/man/man3/MPI_Alloc_mem.3in index d7b6c7a4df9..a6a851ccf74 100644 --- a/ompi/mpi/man/man3/MPI_Alloc_mem.3in +++ b/ompi/mpi/man/man3/MPI_Alloc_mem.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Alloc_mem 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Alloc_mem \fP \- Allocates a specified memory segment. +\fBMPI_Alloc_mem \fP \- Allocates a specified memory segment. .SH SYNTAX .ft R @@ -18,9 +18,9 @@ int MPI_Alloc_mem(MPI_Aint \fIsize\fP, MPI_Info \fIinfo\fP, void *\fIbaseptr\fP) .SH Fortran Syntax (see FORTRAN NOTES) .nf INCLUDE 'mpif.h' -MPI_ALLOC_MEM(\fISIZE, INFO, BASEPTR, IERROR\fP) - INTEGER \fIINFO, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fISIZE, BASEPTR\fP +MPI_ALLOC_MEM(\fISIZE, INFO, BASEPTR, IERROR\fP) + INTEGER \fIINFO, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fISIZE, BASEPTR\fP .fi .SH C++ Syntax @@ -33,45 +33,45 @@ void* MPI::Alloc_mem(MPI::Aint \fIsize\fP, const MPI::Info& \fIinfo\fP) .ft R .TP 1i size -Size of memory segment in bytes (nonnegative integer). +Size of memory segment in bytes (nonnegative integer). .ft R .TP 1i info -Info argument (handle). +Info argument (handle). .SH OUTPUT PARAMETERS .ft R .TP 1i baseptr -Pointer to beginning of memory segment allocated. +Pointer to beginning of memory segment allocated. .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Alloc_mem allocates \fIsize\fP bytes of memory. The starting address -of this memory is returned in the variable \fIbase\fP. +of this memory is returned in the variable \fIbase\fP. .sp .SH FORTRAN NOTES .ft R There is no portable FORTRAN 77 syntax for using MPI_Alloc_mem. There is no portable Fortran syntax for using pointers returned -from MPI_Alloc_mem. However, MPI_Alloc_mem can be used with Sun +from MPI_Alloc_mem. However, MPI_Alloc_mem can be used with Sun Fortran compilers. .sp -From FORTRAN 77, you can use the following non-standard +From FORTRAN 77, you can use the following non-standard declarations for the SIZE and BASEPTR arguments: .nf INCLUDE "mpif.h" INTEGER*MPI_ADDRESS_KIND SIZE, BASEPTR .fi .sp -From either FORTRAN 77 or Fortran 90, you can use "Cray pointers" -for the BASEPTR argument. Cray pointers are described further in -the Fortran User's Guide and are supported by many Fortran compilers. -For example, +From either FORTRAN 77 or Fortran 90, you can use "Cray pointers" +for the BASEPTR argument. Cray pointers are described further in +the Fortran User's Guide and are supported by many Fortran compilers. +For example, .sp .nf INCLUDE "mpif.h" @@ -93,7 +93,7 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Allreduce.3in b/ompi/mpi/man/man3/MPI_Allreduce.3in index 4bb731d95d8..bad1c72be3d 100644 --- a/ompi/mpi/man/man3/MPI_Allreduce.3in +++ b/ompi/mpi/man/man3/MPI_Allreduce.3in @@ -36,8 +36,8 @@ MPI_IALLREDUCE(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, REQUEST, IERROR\f .SH C++ Syntax .nf #include -void MPI::Comm::Allreduce(const void* \fIsendbuf\fP, void* \fIrecvbuf\fP, - int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, const +void MPI::Comm::Allreduce(const void* \fIsendbuf\fP, void* \fIrecvbuf\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, const MPI::Op& \fIop\fP) const=0 .fi @@ -70,68 +70,68 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Same as MPI_Reduce except that the result appears in the receive buffer of all the group members. +Same as MPI_Reduce except that the result appears in the receive buffer of all the group members. .sp \fBExample 1:\fR A routine that computes the product of a vector and an array that are distributed across a group of processes and returns the answer at all nodes (compare with Example 2, with MPI_Reduce, below). .sp .nf -SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) -REAL a(m), b(m,n) ! local slice of array -REAL c(n) ! result -REAL sum(n) -INTEGER n, comm, i, j, ierr - -! local sum -DO j= 1, n - sum(j) = 0.0 - DO i = 1, m - sum(j) = sum(j) + a(i)*b(i,j) - END DO -END DO - -! global sum -CALL MPI_ALLREDUCE(sum, c, n, MPI_REAL, MPI_SUM, comm, ierr) - -! return result at all nodes +SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) +REAL a(m), b(m,n) ! local slice of array +REAL c(n) ! result +REAL sum(n) +INTEGER n, comm, i, j, ierr + +! local sum +DO j= 1, n + sum(j) = 0.0 + DO i = 1, m + sum(j) = sum(j) + a(i)*b(i,j) + END DO +END DO + +! global sum +CALL MPI_ALLREDUCE(sum, c, n, MPI_REAL, MPI_SUM, comm, ierr) + +! return result at all nodes RETURN .fi .sp \fBExample 2:\fR A routine that computes the product of a vector and an array that are distributed across a group of processes and returns the answer at node zero. .sp .nf -SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) -REAL a(m), b(m,n) ! local slice of array -REAL c(n) ! result -REAL sum(n) -INTEGER n, comm, i, j, ierr - -! local sum -DO j= 1, n - sum(j) = 0.0 - DO i = 1, m - sum(j) = sum(j) + a(i)*b(i,j) - END DO -END DO - -! global sum -CALL MPI_REDUCE(sum, c, n, MPI_REAL, MPI_SUM, 0, comm, ierr) - -! return result at node zero (and garbage at the other nodes) +SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) +REAL a(m), b(m,n) ! local slice of array +REAL c(n) ! result +REAL sum(n) +INTEGER n, comm, i, j, ierr + +! local sum +DO j= 1, n + sum(j) = 0.0 + DO i = 1, m + sum(j) = sum(j) + a(i)*b(i,j) + END DO +END DO + +! global sum +CALL MPI_REDUCE(sum, c, n, MPI_REAL, MPI_SUM, 0, comm, ierr) + +! return result at node zero (and garbage at the other nodes) RETURN .fi .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform an all-reduce operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR at all processes. +When the communicator is an intracommunicator, you can perform an all-reduce operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR at all processes. .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp -Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. +Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR -When the communicator is an inter-communicator, the reduce operation occurs in two phases. The data is reduced from all the members of the first group and received by all the members of the second group. Then the data is reduced from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. +When the communicator is an inter-communicator, the reduce operation occurs in two phases. The data is reduced from all the members of the first group and received by all the members of the second group. Then the data is reduced from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. .sp When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase. .SH NOTES ON COLLECTIVE OPERATIONS @@ -139,11 +139,11 @@ When the communicator is an intra-communicator, these groups are the same, and t The reduction functions ( .I MPI_Op ) do not return an error value. As a result, -if the functions detect an error, all they can do is either call +if the functions detect an error, all they can do is either call .I MPI_Abort or silently skip the problem. Thus, if you change the error handler from .I MPI_ERRORS_ARE_FATAL -to something else, for example, +to something else, for example, .I MPI_ERRORS_RETURN , then no error may be indicated. @@ -153,6 +153,6 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Alltoall.3in b/ompi/mpi/man/man3/MPI_Alltoall.3in index 8103b622561..f5be926a6d9 100644 --- a/ompi/mpi/man/man3/MPI_Alltoall.3in +++ b/ompi/mpi/man/man3/MPI_Alltoall.3in @@ -46,7 +46,7 @@ MPI_IALLTOALL(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, .nf #include void MPI::Comm::Alltoall(const void* \fIsendbuf\fP, int \fIsendcount\fP, - const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, + const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, int \fIrecvcount\fP, const MPI::Datatype& \fIrecvtype\fP) .fi @@ -82,7 +82,7 @@ Request (handle, non-blocking only). .ft R .TP 1.2i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -108,7 +108,7 @@ amount of data received, pairwise, between every pair of processes. WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. +When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. .sp The first group defines the root process. The root process uses MPI_ROOT as the value of \fIroot\fR. All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR. All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR. .sp @@ -117,7 +117,7 @@ When the communicator is an intra-communicator, these groups are the same, and t .SH USE OF IN-PLACE OPTION When the communicator is an intracommunicator, you can perform an all-to-all operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR. In this case, \fIsendcount\fR and \fIsendtype\fR are ignored. The input data of each process is assumed to be in the area where that process would receive its own contribution to the receive buffer. -.sp +.sp .SH NOTES .sp All arguments on all processes are significant. The \fIcomm\fP argument, @@ -143,7 +143,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Alltoallv.3in b/ompi/mpi/man/man3/MPI_Alltoallv.3in index 1d4822a9f60..bbc8b53ea2b 100644 --- a/ompi/mpi/man/man3/MPI_Alltoallv.3in +++ b/ompi/mpi/man/man3/MPI_Alltoallv.3in @@ -126,7 +126,7 @@ communicator \fIcomm\fP) independent point-to-point communications .sp Process j sends the k-th block of its local \fIsendbuf\fP to process k, which places the data in the j-th block of its local -\fIrecvbuf\fP. +\fIrecvbuf\fP. .sp When a pair of processes exchanges data, each may pass different element count and datatype arguments so long as the sender specifies @@ -140,12 +140,12 @@ different amounts of data to different processes in the communicator. .sp WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. +When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. .sp The first group defines the root process. The root process uses MPI_ROOT as the value of \fIroot\fR. All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR. All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR. .sp When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase. -.sp +.sp .SH USE OF IN-PLACE OPTION When the communicator is an intracommunicator, you can perform an all-to-all operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR. In this case, \fIsendcounts\fR, \fIsdispls\fP, and \fIsendtype\fR are ignored. The input data of each process is assumed to be in the area where that process would receive its own contribution to the receive buffer. @@ -175,7 +175,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Alltoallw.3in b/ompi/mpi/man/man3/MPI_Alltoallw.3in index cf95e513bc6..fbc0c384858 100644 --- a/ompi/mpi/man/man3/MPI_Alltoallw.3in +++ b/ompi/mpi/man/man3/MPI_Alltoallw.3in @@ -141,12 +141,12 @@ communicator. WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. +When the communicator is an inter-communicator, the gather operation occurs in two phases. The data is gathered from all the members of the first group and received by all the members of the second group. Then the data is gathered from all the members of the second group and received by all the members of the first. The operation exhibits a symmetric, full-duplex behavior. .sp The first group defines the root process. The root process uses MPI_ROOT as the value of \fIroot\fR. All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR. All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR. .sp When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase. -.sp +.sp .SH USE OF IN-PLACE OPTION When the communicator is an intracommunicator, you can perform an all-to-all operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of \fIsendbuf\fR. In this case, \fIsendcounts\fR, \fIsdispls\fP, and \fIsendtypes\fR are ignored. The input data of each process is assumed to be in the area where that process would receive its own contribution to the receive buffer. @@ -176,7 +176,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Attr_delete.3in b/ompi/mpi/man/man3/MPI_Attr_delete.3in index 058d3163985..30ee14ad7ac 100644 --- a/ompi/mpi/man/man3/MPI_Attr_delete.3in +++ b/ompi/mpi/man/man3/MPI_Attr_delete.3in @@ -18,7 +18,7 @@ int MPI_Attr_delete(MPI_Comm\fI comm\fP, int\fI keyval\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_ATTR_DELETE(\fICOMM\fP,\fI KEYVAL\fP, \fIIERROR\fP) +MPI_ATTR_DELETE(\fICOMM\fP,\fI KEYVAL\fP, \fIIERROR\fP) INTEGER \fICOMM\fP,\fI KEYVAL\fP,\fI IERROR\fP @@ -36,16 +36,16 @@ The key value of the deleted attribute (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION Note that use of this routine is \fIdeprecated\fP as of MPI-2, and was \fIdeleted\fP in MPI-3. Please use MPI_Comm_delete_attr. This function does not have a C++ or mpi_f08 binding. .sp -Delete attribute from cache by key. This function invokes the attribute delete function delete_fn specified when the keyval was created. The call will fail if the delete_fn function returns an error code other than MPI_SUCCESS. +Delete attribute from cache by key. This function invokes the attribute delete function delete_fn specified when the keyval was created. The call will fail if the delete_fn function returns an error code other than MPI_SUCCESS. -Whenever a communicator is replicated using the function MPI_Comm_dup, all callback copy functions for attributes that are currently set are invoked (in arbitrary order). Whenever a communicator is deleted using the function MPI_Comm_free, all callback delete functions for attributes that are currently set are invoked. +Whenever a communicator is replicated using the function MPI_Comm_dup, all callback copy functions for attributes that are currently set are invoked (in arbitrary order). Whenever a communicator is deleted using the function MPI_Comm_free, all callback delete functions for attributes that are currently set are invoked. .SH NOTES @@ -61,7 +61,7 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Comm_delete_attr diff --git a/ompi/mpi/man/man3/MPI_Attr_get.3in b/ompi/mpi/man/man3/MPI_Attr_get.3in index 3edb4148b92..f355acad902 100644 --- a/ompi/mpi/man/man3/MPI_Attr_get.3in +++ b/ompi/mpi/man/man3/MPI_Attr_get.3in @@ -45,7 +45,7 @@ True if an attribute value was extracted; false if no attribute is associated wi .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -54,14 +54,14 @@ was \fIdeleted\fP in MPI-3. Please use MPI_Comm_create_attr. This function does not have a C++ or mpi_f08 binding. .sp Retrieves attribute value by key. The call is erroneous if there is no key -with value keyval. On the other hand, the call is correct if the key value exists, but no attribute is attached on comm for that key; in such case, the call returns flag = false. In particular MPI_KEYVAL_INVALID is an erroneous key value. +with value keyval. On the other hand, the call is correct if the key value exists, but no attribute is attached on comm for that key; in such case, the call returns flag = false. In particular MPI_KEYVAL_INVALID is an erroneous key value. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO diff --git a/ompi/mpi/man/man3/MPI_Attr_put.3in b/ompi/mpi/man/man3/MPI_Attr_put.3in index e78ba8df947..32804686c1f 100644 --- a/ompi/mpi/man/man3/MPI_Attr_put.3in +++ b/ompi/mpi/man/man3/MPI_Attr_put.3in @@ -39,7 +39,7 @@ Attribute value. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -63,7 +63,7 @@ Almost all MPI routines return an error value; C routines as the value of the fu .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler -may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Barrier.3in b/ompi/mpi/man/man3/MPI_Barrier.3in index 3ec2452404a..07001fa8c55 100644 --- a/ompi/mpi/man/man3/MPI_Barrier.3in +++ b/ompi/mpi/man/man3/MPI_Barrier.3in @@ -46,7 +46,7 @@ request Request (handle, non-blocking only). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -55,13 +55,13 @@ barrier. .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the barrier operation is performed across all processes in both groups. All processes in the first group may exit the barrier when all processes in the second group have entered the barrier. +When the communicator is an inter-communicator, the barrier operation is performed across all processes in both groups. All processes in the first group may exit the barrier when all processes in the second group have entered the barrier. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Bcast.3in b/ompi/mpi/man/man3/MPI_Bcast.3in index 8c033f5c712..c3608a43db3 100644 --- a/ompi/mpi/man/man3/MPI_Bcast.3in +++ b/ompi/mpi/man/man3/MPI_Bcast.3in @@ -24,7 +24,7 @@ int MPI_Ibcast(void \fI*buffer\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP, INCLUDE 'mpif.h' MPI_BCAST(\fIBUFFER\fP,\fI COUNT\fP, \fIDATATYPE\fP,\fI ROOT\fP,\fI COMM\fP,\fI IERROR\fP) \fIBUFFER\fP(*) - INTEGER \fICOUNT\fP,\fI DATATYPE\fP,\fI ROOT\fP,\fI COMM\fP,\fI IERROR\fP + INTEGER \fICOUNT\fP,\fI DATATYPE\fP,\fI ROOT\fP,\fI COMM\fP,\fI IERROR\fP MPI_IBCAST(\fIBUFFER\fP,\fI COUNT\fP, \fIDATATYPE\fP,\fI ROOT\fP,\fI COMM\fP, \fIREQUEST\fP,\fI IERROR\fP) \fIBUFFER\fP(*) @@ -63,21 +63,21 @@ request Request (handle, non-blocking only). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Bcast broadcasts a message from the process with rank root to all processes of the group, itself included. It is called by all members of group using the same arguments for comm, root. On return, the contents of root's communication buffer has been copied to all processes. +MPI_Bcast broadcasts a message from the process with rank root to all processes of the group, itself included. It is called by all members of group using the same arguments for comm, root. On return, the contents of root's communication buffer has been copied to all processes. .sp -General, derived datatypes are allowed for datatype. The type signature of count, datatype on any process must be equal to the type signature of count, datatype at the root. This implies that the amount of data sent must be equal to the amount received, pairwise between each process and the root. MPI_Bcast and all other data-movement collective routines make this restriction. Distinct type maps between sender and receiver are still allowed. +General, derived datatypes are allowed for datatype. The type signature of count, datatype on any process must be equal to the type signature of count, datatype at the root. This implies that the amount of data sent must be equal to the amount received, pairwise between each process and the root. MPI_Bcast and all other data-movement collective routines make this restriction. Distinct type maps between sender and receiver are still allowed. .sp \fBExample:\fR Broadcast 100 ints from process 0 to every process in the group. .nf - MPI_Comm comm; - int array[100]; - int root=0; - \&... - MPI_Bcast( array, 100, MPI_INT, root, comm); + MPI_Comm comm; + int array[100]; + int root=0; + \&... + MPI_Bcast( array, 100, MPI_INT, root, comm); .fi .sp As in many of our sample code fragments, we assume that some of the variables (such as comm in the example above) have been assigned appropriate values. @@ -85,7 +85,7 @@ As in many of our sample code fragments, we assume that some of the variables (s .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp When the communicator is an inter-communicator, the root process in the first group broadcasts data to all the processes in the second group. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. The receive buffer arguments of the processes in the second group must be consistent with the send buffer argument of the root process in the first group. -.sp +.sp .SH NOTES This function does not support the in-place option. .sp @@ -96,5 +96,5 @@ This function does not support the in-place option. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Bsend.3in b/ompi/mpi/man/man3/MPI_Bsend.3in index 9e139f19f39..cd258181bb1 100644 --- a/ompi/mpi/man/man3/MPI_Bsend.3in +++ b/ompi/mpi/man/man3/MPI_Bsend.3in @@ -28,7 +28,7 @@ MPI_BSEND(\fIBUF\fP,\fI COUNT\fP,\fIDATATYPE\fP,\fI DEST\fP,\fI TAG\fP,\fI COMM\ .SH C++ Syntax .nf #include -void Comm::Bsend(const void* \fIbuf\fP, int \fIcount\fP, const +void Comm::Bsend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -57,7 +57,7 @@ Communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -81,7 +81,7 @@ this code does not allocate enough buffer space: .fi because only enough buffer space is provided for a single send, and the -loop may start a second +loop may start a second .I MPI_Bsend before the first is done making use of the buffer. @@ -90,7 +90,7 @@ In C, you can force the messages to be delivered by MPI_Buffer_detach( &b, &n ); MPI_Buffer_attach( b, n ); -(The +(The .I MPI_Buffer_detach will not complete until all buffered messages are delivered.) @@ -100,7 +100,7 @@ delivered.) Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Bsend_init.3in b/ompi/mpi/man/man3/MPI_Bsend_init.3in index c35e9ebd942..6836793f3c8 100644 --- a/ompi/mpi/man/man3/MPI_Bsend_init.3in +++ b/ompi/mpi/man/man3/MPI_Bsend_init.3in @@ -24,14 +24,14 @@ MPI_BSEND_INIT(\fIBUF\fP,\fI COUNT\fP, \fIDATATYPE\fP,\fI DEST\fP,\fI TAG\fP,\fI \fIIERROR\fP) \fIBUF\fP(\fI*\fP) INTEGER \fICOUNT\fP,\fI DATATYPE\fP, \fIDEST\fP,\fI TAG\fP, - INTEGER \fICOMM\fP,\fI REQUEST\fP,\fI IERROR + INTEGER \fICOMM\fP,\fI REQUEST\fP,\fI IERROR .fi .SH C++ Syntax .nf import mpi.*; -Prequest MPI.COMM_WORLD.Bsend_init(const void* \fIbuf\fP, int \fIcount\fP, const - Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const +Prequest MPI.COMM_WORLD.Bsend_init(const void* \fIbuf\fP, int \fIcount\fP, const + Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi .SH INPUT PARAMETERS @@ -63,19 +63,19 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Creates a persistent communication request for a buffered mode send, and binds to it all the arguments of a send operation. +Creates a persistent communication request for a buffered mode send, and binds to it all the arguments of a send operation. .sp -A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. +A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Buffer_attach.3in b/ompi/mpi/man/man3/MPI_Buffer_attach.3in index 6d662ba7547..5adfa02d262 100644 --- a/ompi/mpi/man/man3/MPI_Buffer_attach.3in +++ b/ompi/mpi/man/man3/MPI_Buffer_attach.3in @@ -42,11 +42,11 @@ Buffer size, in bytes (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Provides to MPI a buffer in the user's memory to be used for buffering outgoing messages. The buffer is used only by messages sent in buffered mode. Only one buffer can be attached to a process at a time. +Provides to MPI a buffer in the user's memory to be used for buffering outgoing messages. The buffer is used only by messages sent in buffered mode. Only one buffer can be attached to a process at a time. .SH NOTES .ft R @@ -73,7 +73,7 @@ MPI_BSEND_OVERHEAD gives the maximum amount of buffer space that may be used by Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Buffer_detach.3in b/ompi/mpi/man/man3/MPI_Buffer_detach.3in index 4b1073b46be..98e8acb142a 100644 --- a/ompi/mpi/man/man3/MPI_Buffer_detach.3in +++ b/ompi/mpi/man/man3/MPI_Buffer_detach.3in @@ -40,24 +40,24 @@ Buffer size, in bytes (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Detach the buffer currently associated with MPI. The call returns the address and the size of the detached buffer. This operation will block until all messages currently in the buffer have been transmitted. Upon return of this function, the user may reuse or deallocate the space taken by the buffer. +Detach the buffer currently associated with MPI. The call returns the address and the size of the detached buffer. This operation will block until all messages currently in the buffer have been transmitted. Upon return of this function, the user may reuse or deallocate the space taken by the buffer. .sp \fBExample:\fP Calls to attach and detach buffers. .sp .nf - #define BUFFSIZE 10000 - int size - char *buff; - MPI_Buffer_attach( malloc(BUFFSIZE), BUFFSIZE); - /* a buffer of 10000 bytes can now be used by MPI_Bsend */ - MPI_Buffer_detach( &buff, &size); - /* Buffer size reduced to zero */ - MPI_Buffer_attach( buff, size); - /* Buffer of 10000 bytes available again */ + #define BUFFSIZE 10000 + int size + char *buff; + MPI_Buffer_attach( malloc(BUFFSIZE), BUFFSIZE); + /* a buffer of 10000 bytes can now be used by MPI_Bsend */ + MPI_Buffer_detach( &buff, &size); + /* Buffer size reduced to zero */ + MPI_Buffer_attach( buff, size); + /* Buffer of 10000 bytes available again */ .fi .SH NOTES @@ -89,7 +89,7 @@ MPI_Buffer_detach both have a first argument of type void*, these arguments are Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Cancel.3in b/ompi/mpi/man/man3/MPI_Cancel.3in index cc1ac1065db..d7e2379cce0 100644 --- a/ompi/mpi/man/man3/MPI_Cancel.3in +++ b/ompi/mpi/man/man3/MPI_Cancel.3in @@ -19,7 +19,7 @@ int MPI_Cancel(MPI_Request\fI *request\fP) .nf INCLUDE 'mpif.h' MPI_CANCEL(\fIREQUEST\fP, \fIIERROR\fP) - INTEGER \fIREQUEST\fP, \fIIERROR\fP + INTEGER \fIREQUEST\fP, \fIIERROR\fP .fi .SH C++ Syntax @@ -38,21 +38,21 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The MPI_Cancel operation allows pending communications to be canceled. This is required for cleanup. Posting a send or a receive ties up user resources (send or receive buffers), and a cancel may be needed to free these resources gracefully. +The MPI_Cancel operation allows pending communications to be canceled. This is required for cleanup. Posting a send or a receive ties up user resources (send or receive buffers), and a cancel may be needed to free these resources gracefully. .sp -A call to MPI_Cancel marks for cancellation a pending, nonblocking communication operation (send or receive). The cancel call is local. It returns immediately, possibly before the communication is actually canceled. It is still necessary to complete a communication that has been marked for cancellation, using a call to MPI_Request_free, MPI_Wait, or MPI_Test (or any of the derived operations). +A call to MPI_Cancel marks for cancellation a pending, nonblocking communication operation (send or receive). The cancel call is local. It returns immediately, possibly before the communication is actually canceled. It is still necessary to complete a communication that has been marked for cancellation, using a call to MPI_Request_free, MPI_Wait, or MPI_Test (or any of the derived operations). .sp If a communication is marked for cancellation, then an MPI_Wait call for that communication is guaranteed to return, irrespective of the activities of other processes (i.e., MPI_Wait behaves as a local function); similarly if MPI_Test is repeatedly called in a busy wait loop for a canceled communication, then MPI_Test will eventually be successful. .sp -MPI_Cancel can be used to cancel a communication that uses a persistent request (see Section 3.9 in the MPI-1 Standard, "Persistent Communication Requests") in the same way it is used for nonpersistent requests. A successful cancellation cancels the active communication, but not the request itself. After the call to MPI_Cancel and the subsequent call to MPI_Wait or MPI_Test, the request becomes inactive and can be activated for a new communication. +MPI_Cancel can be used to cancel a communication that uses a persistent request (see Section 3.9 in the MPI-1 Standard, "Persistent Communication Requests") in the same way it is used for nonpersistent requests. A successful cancellation cancels the active communication, but not the request itself. After the call to MPI_Cancel and the subsequent call to MPI_Wait or MPI_Test, the request becomes inactive and can be activated for a new communication. .sp -The successful cancellation of a buffered send frees the buffer space occupied by the pending message. +The successful cancellation of a buffered send frees the buffer space occupied by the pending message. .sp -Either the cancellation succeeds or the communication succeeds, but not both. If a send is marked for cancellation, then it must be the case that either the send completes normally, in which case the message sent is received at the destination process, or that the send is successfully canceled, in which case no part of the message is received at the destination. Then, any matching receive has to be satisfied by another send. If a receive is marked for cancellation, then it must be the case that either the receive completes normally, or that the receive is successfully canceled, in which case no part of the receive buffer is altered. Then, any matching send has to be satisfied by another receive. +Either the cancellation succeeds or the communication succeeds, but not both. If a send is marked for cancellation, then it must be the case that either the send completes normally, in which case the message sent is received at the destination process, or that the send is successfully canceled, in which case no part of the message is received at the destination. Then, any matching receive has to be satisfied by another send. If a receive is marked for cancellation, then it must be the case that either the receive completes normally, or that the receive is successfully canceled, in which case no part of the receive buffer is altered. Then, any matching send has to be satisfied by another receive. .sp If the operation has been canceled, then information to that effect will be returned in the status argument of the operation that completes the communication. @@ -67,7 +67,7 @@ using MPI_Cancel allows the user to cancel these unsatisfied requests. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Cart_coords.3in b/ompi/mpi/man/man3/MPI_Cart_coords.3in index 2be7df13542..e18c5ce4818 100644 --- a/ompi/mpi/man/man3/MPI_Cart_coords.3in +++ b/ompi/mpi/man/man3/MPI_Cart_coords.3in @@ -26,7 +26,7 @@ MPI_CART_COORDS(\fICOMM\fP,\fI RANK\fP,\fI MAXDIMS\fP,\fI COORDS\fP, \fIIERROR\f .SH C++ Syntax .nf #include -void Cartcomm::Get_coords(int \fIrank\fP, int \fImaxdims\fP, +void Cartcomm::Get_coords(int \fIrank\fP, int \fImaxdims\fP, int \fIcoords\fP[]) const .fi @@ -50,7 +50,7 @@ Integer array (of size ndims,which was defined by MPI_Cart_create call) containi .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -60,5 +60,5 @@ MPI_Cart_coords provies a mapping of ranks to Cartesian coordinates. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Cart_create.3in b/ompi/mpi/man/man3/MPI_Cart_create.3in index 165e8058496..5a04beabf40 100644 --- a/ompi/mpi/man/man3/MPI_Cart_create.3in +++ b/ompi/mpi/man/man3/MPI_Cart_create.3in @@ -29,7 +29,7 @@ MPI_CART_CREATE(\fICOMM_OLD\fP,\fI NDIMS\fP,\fI DIMS\fP,\fI PERIODS\fP,\fI REORD .SH C++ Syntax .nf #include -Cartcomm Intracomm.Create_cart(int[] \fIndims\fP, int[] \fIdims\fP[], +Cartcomm Intracomm.Create_cart(int[] \fIndims\fP, int[] \fIdims\fP[], const bool \fIperiods\fP[], bool \fIreorder\fP) const .fi @@ -61,15 +61,15 @@ Communicator with new Cartesian topology (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Cart_create returns a handle to a new communicator to which the Cartesian topology information is attached. If reorder = false then the rank of each process in the new group is identical to its rank in the old group. Otherwise, the function may reorder the processes (possibly so as to choose a good embedding of the virtual topology onto the physical machine). If the total size of the Cartesian grid is smaller than the size of the group of comm, then some processes are returned MPI_COMM_NULL, in analogy to MPI_Comm_split. The call is erroneous if it specifies a grid that is larger than the group size. +MPI_Cart_create returns a handle to a new communicator to which the Cartesian topology information is attached. If reorder = false then the rank of each process in the new group is identical to its rank in the old group. Otherwise, the function may reorder the processes (possibly so as to choose a good embedding of the virtual topology onto the physical machine). If the total size of the Cartesian grid is smaller than the size of the group of comm, then some processes are returned MPI_COMM_NULL, in analogy to MPI_Comm_split. The call is erroneous if it specifies a grid that is larger than the group size. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Cart_get.3in b/ompi/mpi/man/man3/MPI_Cart_get.3in index 24b33cd2f94..af1b85730ba 100644 --- a/ompi/mpi/man/man3/MPI_Cart_get.3in +++ b/ompi/mpi/man/man3/MPI_Cart_get.3in @@ -27,8 +27,8 @@ MPI_CART_GET(\fICOMM\fP, \fIMAXDIMS\fP, \fIDIMS\fP, \fIPERIODS\fP, \fICOORDS\fP, .SH C++ Syntax .nf #include -void Cartcomm::Get_topo(int \fImaxdims\fP, int \fIdims\fP[], - bool \fIperiods\fP[], int \fIcoords\fP[]) const +void Cartcomm::Get_topo(int \fImaxdims\fP, int \fIdims\fP[], + bool \fIperiods\fP[], int \fIcoords\fP[]) const .fi .SH INPUT PARAMETERS @@ -50,11 +50,11 @@ periods Periodicity (true/false) for each Cartesian dimension (array of logicals). .TP 1i coords -Coordinates of calling process in Cartesian structure (array of integers). +Coordinates of calling process in Cartesian structure (array of integers). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -64,7 +64,7 @@ The functions MPI_Cartdim_get and MPI_Cart_get return the Cartesian topology inf Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Cart_map.3in b/ompi/mpi/man/man3/MPI_Cart_map.3in index b88698d04df..7f99d39a0cb 100644 --- a/ompi/mpi/man/man3/MPI_Cart_map.3in +++ b/ompi/mpi/man/man3/MPI_Cart_map.3in @@ -28,8 +28,8 @@ MPI_CART_MAP(\fICOMM, NDIMS, DIMS, PERIODS, NEWRANK, IERROR\fP) .SH C++ Syntax .nf #include -int Cartcomm::Map(int \fIndims\fP, const int \fIdims\fP[], - const bool \fIperiods\fP[]) const +int Cartcomm::Map(int \fIndims\fP, const int \fIdims\fP[], + const bool \fIperiods\fP[]) const .fi .SH INPUT PARAMETERS @@ -56,19 +56,19 @@ Reordered rank of the calling process; MPI_UNDEFINED if calling process does not .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Cart_map and MPI_Graph_map can be used to implement all other topology functions. In general they will not be called by the user directly, unless he or she is creating additional virtual topology capability other than that provided by MPI. +MPI_Cart_map and MPI_Graph_map can be used to implement all other topology functions. In general they will not be called by the user directly, unless he or she is creating additional virtual topology capability other than that provided by MPI. .sp -MPI_Cart_map computes an "optimal" placement for the calling process on the physical machine. A possible implementation of this function is to always return the rank of the calling process, that is, not to perform any reordering. +MPI_Cart_map computes an "optimal" placement for the calling process on the physical machine. A possible implementation of this function is to always return the rank of the calling process, that is, not to perform any reordering. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Cart_rank.3in b/ompi/mpi/man/man3/MPI_Cart_rank.3in index 53bd158f1ee..324b54c2e15 100644 --- a/ompi/mpi/man/man3/MPI_Cart_rank.3in +++ b/ompi/mpi/man/man3/MPI_Cart_rank.3in @@ -35,7 +35,7 @@ comm Communicator with Cartesian structure (handle). .TP 1i coords -Integer array (of size ndims, which was defined by MPI_Cart_create call) specifying the Cartesian coordinates of a process. +Integer array (of size ndims, which was defined by MPI_Cart_create call) specifying the Cartesian coordinates of a process. .SH OUTPUT PARAMETER .ft R @@ -45,7 +45,7 @@ Rank of specified process (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -56,7 +56,7 @@ translates the logical process coordinates to process ranks as they are used by Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .sp diff --git a/ompi/mpi/man/man3/MPI_Cart_shift.3in b/ompi/mpi/man/man3/MPI_Cart_shift.3in index adc9e23ede6..505417f510e 100644 --- a/ompi/mpi/man/man3/MPI_Cart_shift.3in +++ b/ompi/mpi/man/man3/MPI_Cart_shift.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Cart_shift(MPI_Comm \fIcomm\fP, int\fI direction\fP, int\fI disp\fP, +int MPI_Cart_shift(MPI_Comm \fIcomm\fP, int\fI direction\fP, int\fI disp\fP, int\fI *rank_source\fP, int\fI *rank_dest\fP) .fi @@ -28,8 +28,8 @@ MPI_CART_SHIFT(\fICOMM, DIRECTION, DISP, RANK_SOURCE, .SH C++ Syntax .nf #include -void Cartcomm::Shift(int \fIdirection\fP, int \fIdisp\fP, int& \fIrank_source\fP, - int& \fIrank_dest\fP) const +void Cartcomm::Shift(int \fIdirection\fP, int \fIdisp\fP, int& \fIrank_source\fP, + int& \fIrank_dest\fP) const .fi .SH INPUT PARAMETERS @@ -55,42 +55,42 @@ Rank of destination process (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -If the process topology is a Cartesian structure, an MPI_Sendrecv operation is likely to be used along a coordinate direction to perform a shift of data. As input, MPI_Sendrecv takes the rank of a source process for the receive, and the rank of a destination process for the send. If the function MPI_Cart_shift is called for a Cartesian process group, it provides the calling process with the above identifiers, which then can be passed to MPI_Sendrecv. The user specifies the coordinate direction and the size of the step (positive or negative). The function is local. +If the process topology is a Cartesian structure, an MPI_Sendrecv operation is likely to be used along a coordinate direction to perform a shift of data. As input, MPI_Sendrecv takes the rank of a source process for the receive, and the rank of a destination process for the send. If the function MPI_Cart_shift is called for a Cartesian process group, it provides the calling process with the above identifiers, which then can be passed to MPI_Sendrecv. The user specifies the coordinate direction and the size of the step (positive or negative). The function is local. .sp -The direction argument indicates the dimension of the shift, i.e., the coordinate whose value is modified by the shift. The coordinates are numbered from 0 to ndims-1, where ndims is the number of dimensions. +The direction argument indicates the dimension of the shift, i.e., the coordinate whose value is modified by the shift. The coordinates are numbered from 0 to ndims-1, where ndims is the number of dimensions. .sp -\fBNote:\fP The direction argument is in the range [0, n-1] for an n-dimensional Cartesian mesh. +\fBNote:\fP The direction argument is in the range [0, n-1] for an n-dimensional Cartesian mesh. .sp Depending on the periodicity of the Cartesian group in the specified coordinate direction, MPI_Cart_shift provides the identifiers for a circular or an end-off shift. In the case of an end-off shift, the value MPI_PROC_NULL may be returned in rank_source or rank_dest, indicating that the source or the destination for the shift is out of range. .sp -\fBExample:\fP The communicator, comm, has a two-dimensional, periodic, Cartesian topology associated with it. A two-dimensional array of REALs is stored one element per process, in variable A. One wishes to skew this array, by shifting column i (vertically, i.e., along the column) by i steps. +\fBExample:\fP The communicator, comm, has a two-dimensional, periodic, Cartesian topology associated with it. A two-dimensional array of REALs is stored one element per process, in variable A. One wishes to skew this array, by shifting column i (vertically, i.e., along the column) by i steps. .sp .nf - \&.... - C find process rank + \&.... + C find process rank CALL MPI_COMM_RANK(comm, rank, ierr)) - C find Cartesian coordinates - CALL MPI_CART_COORDS(comm, rank, maxdims, coords, - ierr) - C compute shift source and destination - CALL MPI_CART_SHIFT(comm, 0, coords(2), source, - dest, ierr) - C skew array - CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, dest, 0, - source, 0, comm, status, + C find Cartesian coordinates + CALL MPI_CART_COORDS(comm, rank, maxdims, coords, + ierr) + C compute shift source and destination + CALL MPI_CART_SHIFT(comm, 0, coords(2), source, + dest, ierr) + C skew array + CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, dest, 0, + source, 0, comm, status, ierr) .fi .SH NOTE -In Fortran, the dimension indicated by DIRECTION = i has DIMS(i+1) nodes, where DIMS is the array that was used to create the grid. In C, the dimension indicated by direction = i is the dimension specified by dims[i]. +In Fortran, the dimension indicated by DIRECTION = i has DIMS(i+1) nodes, where DIMS is the array that was used to create the grid. In C, the dimension indicated by direction = i is the dimension specified by dims[i]. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Cart_sub.3in b/ompi/mpi/man/man3/MPI_Cart_sub.3in index 3d175a7ef13..80f4c9b7b42 100644 --- a/ompi/mpi/man/man3/MPI_Cart_sub.3in +++ b/ompi/mpi/man/man3/MPI_Cart_sub.3in @@ -21,7 +21,7 @@ int MPI_Cart_sub(MPI_Comm \fIcomm\fP, const int\fI remain_dims\fP[], MPI_Comm\fI INCLUDE 'mpif.h' MPI_CART_SUB(\fICOMM, REMAIN_DIMS, COMM_NEW, IERROR\fP) INTEGER \fICOMM, COMM_NEW, IERROR\fP - LOGICAL \fIREMAIN_DIMS\fP(*) + LOGICAL \fIREMAIN_DIMS\fP(*) .fi .SH C++ Syntax @@ -47,16 +47,16 @@ Communicator containing the subgrid that includes the calling process (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -If a Cartesian topology has been created with MPI_Cart_create, the function MPI_Cart_sub can be used to partition the communicator group into subgroups that form lower-dimensional Cartesian subgrids, and to build for each subgroup a communicator with the associated subgrid Cartesian topology. (This function is closely related to MPI_Comm_split.) +If a Cartesian topology has been created with MPI_Cart_create, the function MPI_Cart_sub can be used to partition the communicator group into subgroups that form lower-dimensional Cartesian subgrids, and to build for each subgroup a communicator with the associated subgrid Cartesian topology. (This function is closely related to MPI_Comm_split.) .sp -\fBExample:\fP Assume that MPI_Cart_create( \&..., comm) has defined a (2 x 3 x 4) grid. Let remain_dims = (true, false, true). Then a call to +\fBExample:\fP Assume that MPI_Cart_create( \&..., comm) has defined a (2 x 3 x 4) grid. Let remain_dims = (true, false, true). Then a call to .sp .nf - MPI_Cart_sub(comm, remain_dims, comm_new) + MPI_Cart_sub(comm, remain_dims, comm_new) .fi .sp will create three communicators, each with eight processes in a 2 x 4 Cartesian topology. If remain_dims = (false, false, true) then the call to MPI_Cart_sub(comm, remain_dims, comm_new) will create six nonoverlapping communicators, each with four processes, in a one-dimensional Cartesian topology. @@ -65,7 +65,7 @@ will create three communicators, each with eight processes in a 2 x 4 Cartesian Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Cartdim_get.3in b/ompi/mpi/man/man3/MPI_Cartdim_get.3in index 60d2b27df5b..9159adfa425 100644 --- a/ompi/mpi/man/man3/MPI_Cartdim_get.3in +++ b/ompi/mpi/man/man3/MPI_Cartdim_get.3in @@ -42,17 +42,17 @@ Number of dimensions of the Cartesian structure (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Cartdim_get returns the number of dimensions of the Cartesian structure. +MPI_Cartdim_get returns the number of dimensions of the Cartesian structure. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Close_port.3in b/ompi/mpi/man/man3/MPI_Close_port.3in index d76a9f20350..9899fe3572b 100644 --- a/ompi/mpi/man/man3/MPI_Close_port.3in +++ b/ompi/mpi/man/man3/MPI_Close_port.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Close_port 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Close_port \fP \- Releases the specified network address. +\fBMPI_Close_port \fP \- Releases the specified network address. .SH SYNTAX .ft R @@ -21,7 +21,7 @@ int MPI_Close_port(const char *\fIport_name\fP) INCLUDE 'mpif.h' MPI_CLOSE_PORT(\fIPORT_NAME, IERROR\fP) CHARACTER*(*) \fIPORT_NAME\fP - INTEGER \fIIERROR\fP + INTEGER \fIIERROR\fP .fi .SH C++ Syntax @@ -40,7 +40,7 @@ A port (string). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -50,5 +50,5 @@ MPI_Close_port releases the network address represented by \fIport_name\fP. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_accept.3in b/ompi/mpi/man/man3/MPI_Comm_accept.3in index a487bf8c0c8..021bd0b7152 100644 --- a/ompi/mpi/man/man3/MPI_Comm_accept.3in +++ b/ompi/mpi/man/man3/MPI_Comm_accept.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_accept 3OpenMPI "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_accept \fP \- Establishes communication with a client. +\fBMPI_Comm_accept \fP \- Establishes communication with a client. .SH SYNTAX .ft R @@ -21,7 +21,7 @@ int MPI_Comm_accept(const char *\fIport_name\fP, MPI_Info \fIinfo\fP, int \fIroo INCLUDE 'mpif.h' MPI_COMM_ACCEPT(\fIPORT_NAME, INFO, ROOT, COMM, NEWCOMM, IERROR\fP) CHARACTER*(*) \fIPORT_NAME\fP - INTEGER \fIINFO, ROOT, COMM, NEWCOMM, IERROR\fP + INTEGER \fIINFO, ROOT, COMM, NEWCOMM, IERROR\fP .fi .SH C++ Syntax @@ -38,7 +38,7 @@ port_name Port name (string, used only on \fIroot\fP). .TP 1i info -Options given by root for the accept (handle, used only on root). No options currently supported. +Options given by root for the accept (handle, used only on root). No options currently supported. .TP 1i root Rank in \fIcomm\fP of root node (integer). @@ -53,7 +53,7 @@ newcomm Intercommunicator with client as remote group (handle) .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -66,9 +66,9 @@ The \fIport_name\fP must have been established through a call to MPI_Open_port o Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. .sp -See the MPI man page for a full list of MPI error codes. +See the MPI man page for a full list of MPI error codes. .SH SEE ALSO MPI_Comm_connect diff --git a/ompi/mpi/man/man3/MPI_Comm_call_errhandler.3in b/ompi/mpi/man/man3/MPI_Comm_call_errhandler.3in index a15121d2489..f5b82b0599d 100644 --- a/ompi/mpi/man/man3/MPI_Comm_call_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Comm_call_errhandler.3in @@ -15,37 +15,37 @@ error handler assigned to a communicator .SH C Syntax .nf #include -int MPI_Comm_call_errhandler(MPI_Comm \fIcomm\fP, int \fIerrorcode\fP) +int MPI_Comm_call_errhandler(MPI_Comm \fIcomm\fP, int \fIerrorcode\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' MPI_COMM_CALL_ERRHANDLER(\fICOMM, ERRORCODE, IERROR\fP) - INTEGER \fICOMM, ERRORCODE, IERROR\fP + INTEGER \fICOMM, ERRORCODE, IERROR\fP .fi .SH C++ Syntax .nf #include -void MPI::Comm::Call_errhandler(int \fIerrorcode\fP) const +void MPI::Comm::Call_errhandler(int \fIerrorcode\fP) const .fi .SH INPUT PARAMETER .ft R .TP 1.4i -comm +comm communicator with error handler (handle). .ft R .TP 1.4i -errorcode +errorcode error code (integer). .SH OUTPUT PARAMETERS .ft R .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_compare.3in b/ompi/mpi/man/man3/MPI_Comm_compare.3in index 0527da7a055..8ca324755b2 100644 --- a/ompi/mpi/man/man3/MPI_Comm_compare.3in +++ b/ompi/mpi/man/man3/MPI_Comm_compare.3in @@ -41,11 +41,11 @@ Comm2 (handle). .ft R .TP 1i result -Result of comparison (integer). +Result of comparison (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -55,6 +55,6 @@ MPI_IDENT results if and only if comm1 and comm2 are handles for the same object Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_connect.3in b/ompi/mpi/man/man3/MPI_Comm_connect.3in index eaf6537bb18..b3c8029960b 100644 --- a/ompi/mpi/man/man3/MPI_Comm_connect.3in +++ b/ompi/mpi/man/man3/MPI_Comm_connect.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_connect 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_connect \fP \- Establishes communication with a server. +\fBMPI_Comm_connect \fP \- Establishes communication with a server. .SH SYNTAX .ft R @@ -22,7 +22,7 @@ int MPI_Comm_connect(const gchar *\fIport_name\fP, MPI_Info \fIinfo\fP, int \fIr INCLUDE 'mpif.h' MPI_COMM_CONNECT(\fIPORT_NAME, INFO, ROOT, COMM, NEWCOMM, IERROR\fP) CHARACTER*(*) \fIPORT_NAME\fP - INTEGER \fIINFO, ROOT, COMM, NEWCOMM, IERROR\fP + INTEGER \fIINFO, ROOT, COMM, NEWCOMM, IERROR\fP .fi .SH C++ Syntax @@ -39,7 +39,7 @@ port_name Port name (string, used only on \fIroot\fP). .TP 1i info -Options given by root for the connect (handle, used only on root). No options currently supported. +Options given by root for the connect (handle, used only on root). No options currently supported. .TP 1i root Rank in \fIcomm\fP of root node (integer). @@ -54,26 +54,26 @@ newcomm Intercommunicator with client as remote group (handle) .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Comm_connect establishes communication with a server specified by \fIport_name\fP. It is collective over the calling communicator and returns an intercommunicator in which the remote group participated in an MPI_Comm_accept. The MPI_Comm_connect call must only be called after the MPI_Comm_accept call has been made by the MPI job acting as the server. .sp -If the named port does not exist (or has been closed), MPI_Comm_connect raises an error of class MPI_ERR_PORT. +If the named port does not exist (or has been closed), MPI_Comm_connect raises an error of class MPI_ERR_PORT. .sp -MPI provides no guarantee of fairness in servicing connection attempts. That is, connection attempts are not necessarily satisfied in the order in which they were initiated, and competition from other connection attempts may prevent a particular connection attempt from being satisfied. +MPI provides no guarantee of fairness in servicing connection attempts. That is, connection attempts are not necessarily satisfied in the order in which they were initiated, and competition from other connection attempts may prevent a particular connection attempt from being satisfied. + +The \fIport_name\fP parameter is the address of the server. It must be the same as the name returned by MPI_Open_port on the server. -The \fIport_name\fP parameter is the address of the server. It must be the same as the name returned by MPI_Open_port on the server. - .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .sp -See the MPI man page for a full list of MPI error codes. +See the MPI man page for a full list of MPI error codes. .SH SEE ALSO MPI_Comm_accept diff --git a/ompi/mpi/man/man3/MPI_Comm_create.3in b/ompi/mpi/man/man3/MPI_Comm_create.3in index 5f236bed889..1a32519c748 100644 --- a/ompi/mpi/man/man3/MPI_Comm_create.3in +++ b/ompi/mpi/man/man3/MPI_Comm_create.3in @@ -48,7 +48,7 @@ New communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -56,7 +56,7 @@ This function creates a new communicator newcomm with communication group defined by group and a new context. The function sets \fInewcomm\fR to a new communicator that spans all the processes that are in the group. It sets \fInewcomm\fR to MPI_COMM_NULL for -processes that are not in the group. +processes that are not in the group. Each process must call with a \fIgroup\fR argument that is a subgroup of the group associated with \fIcomm\fR; this could be @@ -69,13 +69,13 @@ order. Otherwise the call is erroneous. .LP .SH NOTES -MPI_Comm_create provides a means of making a subset of processes for the purpose of separate MIMD computation, with separate communication space. \fInewcomm\fR, which is created by MPI_Comm_create, can be used in subsequent calls to MPI_Comm_create (or other communicator constructors) to further subdivide a computation into parallel sub-computations. A more general service is provided by MPI_Comm_split. +MPI_Comm_create provides a means of making a subset of processes for the purpose of separate MIMD computation, with separate communication space. \fInewcomm\fR, which is created by MPI_Comm_create, can be used in subsequent calls to MPI_Comm_create (or other communicator constructors) to further subdivide a computation into parallel sub-computations. A more general service is provided by MPI_Comm_split. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_create_errhandler.3in b/ompi/mpi/man/man3/MPI_Comm_create_errhandler.3in index b94d5d9cc0e..ffae73f6659 100644 --- a/ompi/mpi/man/man3/MPI_Comm_create_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Comm_create_errhandler.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_create_errhandler 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_create_errhandler \fP \- Creates an error handler that can be attached to communicators. +\fBMPI_Comm_create_errhandler \fP \- Creates an error handler that can be attached to communicators. .SH SYNTAX .ft R @@ -54,20 +54,20 @@ MPI error handler (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_create_errhandler creates an error handler that can be attached to communicators. This function is identical to MPI_Errhandler_create, the use of which is deprecated. +MPI_Comm_create_errhandler creates an error handler that can be attached to communicators. This function is identical to MPI_Errhandler_create, the use of which is deprecated. .sp -In C, the user routine should be a function of type MPI_Comm_errhandler_function, which is defined as +In C, the user routine should be a function of type MPI_Comm_errhandler_function, which is defined as .sp .nf - typedef void MPI_Comm_errhandler_function(MPI_Comm *, int *, \&...); + typedef void MPI_Comm_errhandler_function(MPI_Comm *, int *, \&...); .fi .sp The first argument is the communicator in use. The second is the error code -to be returned by the MPI routine that raised the error. This typedef replaces MPI_Handler_function, the use of which is deprecated. +to be returned by the MPI routine that raised the error. This typedef replaces MPI_Handler_function, the use of which is deprecated. .sp In Fortran, the user routine should be of this form: .sp @@ -79,14 +79,14 @@ In Fortran, the user routine should be of this form: In C++, the user routine should be of this form: .sp .nf - typedef void MPI::Comm::Errhandler_function(MPI_Comm &, int *, \&...); + typedef void MPI::Comm::Errhandler_function(MPI_Comm &, int *, \&...); .fi .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_create_keyval.3in b/ompi/mpi/man/man3/MPI_Comm_create_keyval.3in index b4d6fcd6cba..ff6be052196 100644 --- a/ompi/mpi/man/man3/MPI_Comm_create_keyval.3in +++ b/ompi/mpi/man/man3/MPI_Comm_create_keyval.3in @@ -5,23 +5,23 @@ .\" $COPYRIGHT$ .TH MPI_Comm_create_keyval 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_create_keyval\fP \- Generates a new attribute key. +\fBMPI_Comm_create_keyval\fP \- Generates a new attribute key. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function - *\fIcomm_copy_attr_fn\fP, MPI_Comm_delete_attr_function - *\fIcomm_delete_attr_fn\fP, int *\fIcomm_keyval\fP, - void *\fIextra_state\fP) +int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function + *\fIcomm_copy_attr_fn\fP, MPI_Comm_delete_attr_function + *\fIcomm_delete_attr_fn\fP, int *\fIcomm_keyval\fP, + void *\fIextra_state\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_COMM_CREATE_KEYVAL(\fICOMM_COPY_ATTR_FN, COMM_DELETE_ATTR_FN, +MPI_COMM_CREATE_KEYVAL(\fICOMM_COPY_ATTR_FN, COMM_DELETE_ATTR_FN, COMM_KEYVAL, EXTRA_STATE, IERROR\fP) EXTERNAL \fICOMM_COPY_ATTR_FN, COMM_DELETE_ATTR_FN\fP @@ -57,24 +57,24 @@ comm_keyval Key value for future access (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This function replaces MPI_Keyval_create, the use of which is deprecated. The C binding is identical. The Fortran binding differs in that \fIextra_state\fP is an address-sized integer. Also, the copy and delete callback functions have Fortran bindings that are consistent with address-sized attributes. +This function replaces MPI_Keyval_create, the use of which is deprecated. The C binding is identical. The Fortran binding differs in that \fIextra_state\fP is an address-sized integer. Also, the copy and delete callback functions have Fortran bindings that are consistent with address-sized attributes. .sp -The argument \fIcomm_copy_attr_fn\fP may be specified as MPI_COMM_NULL_COPY_FN or MPI_COMM_DUP_FN from C, C++, or Fortran. MPI_COMM_NULL_COPY_FN is a function that does nothing more than returning \fIflag\fP = 0 and MPI_SUCCESS. MPI_COMM_DUP_FN is a simple-minded copy function that sets \fIflag\fP = 1, returns the value of \fIattribute_val_in\fP in \fIattribute_val_out\fP, and returns MPI_SUCCESS. These replace the MPI-1 predefined callbacks MPI_NULL_COPY_FN and MPI_DUP_FN, the use of which is deprecated. +The argument \fIcomm_copy_attr_fn\fP may be specified as MPI_COMM_NULL_COPY_FN or MPI_COMM_DUP_FN from C, C++, or Fortran. MPI_COMM_NULL_COPY_FN is a function that does nothing more than returning \fIflag\fP = 0 and MPI_SUCCESS. MPI_COMM_DUP_FN is a simple-minded copy function that sets \fIflag\fP = 1, returns the value of \fIattribute_val_in\fP in \fIattribute_val_out\fP, and returns MPI_SUCCESS. These replace the MPI-1 predefined callbacks MPI_NULL_COPY_FN and MPI_DUP_FN, the use of which is deprecated. .sp The C callback functions are: .sp .nf -typedef int MPI_Comm_copy_attr_function(MPI_Comm \fIoldcomm\fP, int \fIcomm_keyval\fP, - void *\fIextra_state\fP, void *\fIattribute_val_in\fP, +typedef int MPI_Comm_copy_attr_function(MPI_Comm \fIoldcomm\fP, int \fIcomm_keyval\fP, + void *\fIextra_state\fP, void *\fIattribute_val_in\fP, void *\fIattribute_val_out\fP, int *\fIflag\fP); .fi and .nf -typedef int MPI_Comm_delete_attr_function(MPI_Comm \fIcomm\fP, int \fIcomm_keyval\fP, +typedef int MPI_Comm_delete_attr_function(MPI_Comm \fIcomm\fP, int \fIcomm_keyval\fP, void *\fIattribute_val\fP, void *\fIextra_state\fP); .fi .sp @@ -83,32 +83,32 @@ which are the same as the MPI-1.1 calls but with a new name. The old names are d The Fortran callback functions are: .sp .nf -SUBROUTINE COMM_COPY_ATTR_FN(\fIOLDCOMM, COMM_KEYVAL, EXTRA_STATE, - ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP) - INTEGER \fIOLDCOMM, COMM_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, ATTRIBUTE_VAL_IN, - ATTRIBUTE_VAL_OUT\fP - LOGICAL \fIFLAG\fP +SUBROUTINE COMM_COPY_ATTR_FN(\fIOLDCOMM, COMM_KEYVAL, EXTRA_STATE, + ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP) + INTEGER \fIOLDCOMM, COMM_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, ATTRIBUTE_VAL_IN, + ATTRIBUTE_VAL_OUT\fP + LOGICAL \fIFLAG\fP .fi and .nf -SUBROUTINE COMM_DELETE_ATTR_FN(\fICOMM, COMM_KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, - IERROR\fP) - INTEGER \fICOMM, COMM_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL, EXTRA_STATE\fP +SUBROUTINE COMM_DELETE_ATTR_FN(\fICOMM, COMM_KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, + IERROR\fP) + INTEGER \fICOMM, COMM_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL, EXTRA_STATE\fP .fi .sp The C++ callbacks are: .sp .nf -typedef int MPI::Comm::Copy_attr_function(const MPI::Comm& \fIoldcomm\fP, - int \fIcomm_keyval\fP, void* \fIextra_state\fP, void* \fIattribute_val_in\fP, - void* \fIattribute_val_out\fP, bool& \fIflag\fP); +typedef int MPI::Comm::Copy_attr_function(const MPI::Comm& \fIoldcomm\fP, + int \fIcomm_keyval\fP, void* \fIextra_state\fP, void* \fIattribute_val_in\fP, + void* \fIattribute_val_out\fP, bool& \fIflag\fP); .fi and .nf -typedef int MPI::Comm::Delete_attr_function(MPI::Comm& \fIcomm\fP, - int \fIcomm_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP); +typedef int MPI::Comm::Delete_attr_function(MPI::Comm& \fIcomm\fP, + int \fIcomm_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP); .fi .SH FORTRAN 77 NOTES @@ -128,9 +128,9 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .sp -See the MPI man page for a full list of MPI error codes. +See the MPI man page for a full list of MPI error codes. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_delete_attr.3in b/ompi/mpi/man/man3/MPI_Comm_delete_attr.3in index bb51b04d771..24f26451e83 100644 --- a/ompi/mpi/man/man3/MPI_Comm_delete_attr.3in +++ b/ompi/mpi/man/man3/MPI_Comm_delete_attr.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_delete_attr 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_delete_attr\fP \- Deletes attribute value associated with a key. +\fBMPI_Comm_delete_attr\fP \- Deletes attribute value associated with a key. .SH SYNTAX .ft R @@ -32,7 +32,7 @@ void MPI::Comm::Delete_attr(int \fIcomm_keyval\fP) .ft R .TP 1i comm -Communicator from which the attribute is deleted (handle). +Communicator from which the attribute is deleted (handle). .SH INPUT PARAMETER .ft R @@ -44,15 +44,15 @@ Key value (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_delete_attr deletes an attribute from cache by key. This function invokes the attribute delete function delete_fn specified when the \fIcomm_keyval\fP was created. The call will fail if the delete_fn function returns an error code other than MPI_SUCCESS. +MPI_Comm_delete_attr deletes an attribute from cache by key. This function invokes the attribute delete function delete_fn specified when the \fIcomm_keyval\fP was created. The call will fail if the delete_fn function returns an error code other than MPI_SUCCESS. -Whenever a communicator is replicated using the function MPI_Comm_dup, all callback copy functions for attributes that are currently set are invoked (in arbitrary order). Whenever a communicator is deleted using the function MPI_Comm_free, all callback delete functions for attributes that are currently set are invoked. +Whenever a communicator is replicated using the function MPI_Comm_dup, all callback copy functions for attributes that are currently set are invoked (in arbitrary order). Whenever a communicator is deleted using the function MPI_Comm_free, all callback delete functions for attributes that are currently set are invoked. .sp -This function is the same as MPI_Attr_delete but is needed to match the communicator-specific functions introduced in the MPI-2 standard. The use of MPI_Attr_delete is deprecated. +This function is the same as MPI_Attr_delete but is needed to match the communicator-specific functions introduced in the MPI-2 standard. The use of MPI_Attr_delete is deprecated. .SH NOTES @@ -67,5 +67,5 @@ is being invoked. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_disconnect.3in b/ompi/mpi/man/man3/MPI_Comm_disconnect.3in index ba4b17c8793..d1da8f3a548 100644 --- a/ompi/mpi/man/man3/MPI_Comm_disconnect.3in +++ b/ompi/mpi/man/man3/MPI_Comm_disconnect.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_disconnect 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_disconnect\fP \- Deallocates communicator object and sets handle to MPI_COMM_NULL. +\fBMPI_Comm_disconnect\fP \- Deallocates communicator object and sets handle to MPI_COMM_NULL. .SH SYNTAX .ft R @@ -38,27 +38,27 @@ Communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_disconnect waits for all pending communication on \fIcomm\fP to complete internally, deallocates the communicator object, and sets the handle to MPI_COMM_NULL. It is a collective operation. +MPI_Comm_disconnect waits for all pending communication on \fIcomm\fP to complete internally, deallocates the communicator object, and sets the handle to MPI_COMM_NULL. It is a collective operation. .sp It may not be called with the communicator MPI_COMM_WORLD or MPI_COMM_SELF. .sp -MPI_Comm_disconnect may be called only if all communication is complete and matched, so that buffered data can be delivered to its destination. This requirement is the same as for MPI_Finalize. +MPI_Comm_disconnect may be called only if all communication is complete and matched, so that buffered data can be delivered to its destination. This requirement is the same as for MPI_Finalize. .sp -MPI_Comm_disconnect has the same action as MPI_Comm_free, except that it waits for pending communication to finish internally and enables the guarantee about the behavior of disconnected processes. +MPI_Comm_disconnect has the same action as MPI_Comm_free, except that it waits for pending communication to finish internally and enables the guarantee about the behavior of disconnected processes. .SH NOTES .ft R -To disconnect two processes you may need to call MPI_Comm_disconnect, MPI_Win_free, and MPI_File_close to remove all communication paths between the two processes. Note that it may be necessary to disconnect several communicators (or to free several windows or files) before two processes are completely independent. +To disconnect two processes you may need to call MPI_Comm_disconnect, MPI_Win_free, and MPI_File_close to remove all communication paths between the two processes. Note that it may be necessary to disconnect several communicators (or to free several windows or files) before two processes are completely independent. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_dup.3in b/ompi/mpi/man/man3/MPI_Comm_dup.3in index b410dc651db..c0ab489eb94 100644 --- a/ompi/mpi/man/man3/MPI_Comm_dup.3in +++ b/ompi/mpi/man/man3/MPI_Comm_dup.3in @@ -18,8 +18,8 @@ int MPI_Comm_dup(MPI_Comm \fIcomm\fP, MPI_Comm\fI *newcomm\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_COMM_DUP(\fICOMM, NEWCOMM, IERROR\fP) - INTEGER \fICOMM, NEWCOMM, IERROR\fP +MPI_COMM_DUP(\fICOMM, NEWCOMM, IERROR\fP) + INTEGER \fICOMM, NEWCOMM, IERROR\fP .fi .SH C++ Syntax @@ -34,7 +34,7 @@ Intercomm Intercomm::Dup() const .ft R .TP 1i comm -Communicator (handle). +Communicator (handle). .SH OUTPUT PARAMETERS .ft R @@ -44,7 +44,7 @@ Copy of comm (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -55,7 +55,7 @@ values. For each key value, the respective copy callback function determines the This operation is used to provide a parallel library call with a duplicate communication space that has the same properties as the original communicator. This includes any attributes (see below) and topologies (see Chapter 6, "Process Topologies," in the MPI-1 Standard). This call is valid even if there are pending point-to-point communications involving the communicator comm. A typical call might involve an MPI_Comm_dup at the beginning of the parallel call, and an MPI_Comm_free of that duplicated communicator at the end of the call. Other models of communicator management are also possible. .sp -This call applies to both intra- and intercommunicators. +This call applies to both intra- and intercommunicators. Note that it is not defined by the MPI standard what happens if the attribute copy callback invokes other MPI functions. In Open MPI, it @@ -67,7 +67,7 @@ copy callback is being invoked. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO diff --git a/ompi/mpi/man/man3/MPI_Comm_f2c.3in b/ompi/mpi/man/man3/MPI_Comm_f2c.3in index cf7726290d0..ffb2b177fc7 100644 --- a/ompi/mpi/man/man3/MPI_Comm_f2c.3in +++ b/ompi/mpi/man/man3/MPI_Comm_f2c.3in @@ -40,6 +40,6 @@ MPI_Fint MPI_Win_c2f(MPI_Win \fIwin\fP) .ft R Handles are passed between Fortran and C or C++ by using an explicit C wrapper to convert Fortran handles to C handles. There is no direct access to C or C++ handles in Fortran. Handles are passed between C and C++ using overloaded C++ operators called from C++ code. There is no direct access to C++ objects from C. The type definition \fIMPI_Fint\fP is provided in C/C++ for an integer of the size that matches a Fortran \fIINTEGER\fP; usually, \fIMPI_Fint\fP will be equivalent to \fIint\fP. The handle translation functions are provided in C to convert from a Fortran handle (which is an integer) to a C handle, and vice versa. .PP -For example, if \fIcomm\fP is a valid Fortran handle to a communicator, then MPI_Comm_f2c returns a valid C handle to that same communicator; if \fIcomm\fP = MPI_COMM_NULL (Fortran value), then MPI_Comm_f2c returns a null C handle; if \fIcomm\fP is an invalid Fortran handle, then MPI_Comm_f2c returns an invalid C handle. +For example, if \fIcomm\fP is a valid Fortran handle to a communicator, then MPI_Comm_f2c returns a valid C handle to that same communicator; if \fIcomm\fP = MPI_COMM_NULL (Fortran value), then MPI_Comm_f2c returns a null C handle; if \fIcomm\fP is an invalid Fortran handle, then MPI_Comm_f2c returns an invalid C handle. .SH NOTE This function does not return an error value. Consequently, the result of calling it before MPI_Init or after MPI_Finalize is undefined. diff --git a/ompi/mpi/man/man3/MPI_Comm_free.3in b/ompi/mpi/man/man3/MPI_Comm_free.3in index 472cacb9ad8..ec8acc8b050 100644 --- a/ompi/mpi/man/man3/MPI_Comm_free.3in +++ b/ompi/mpi/man/man3/MPI_Comm_free.3in @@ -19,7 +19,7 @@ int MPI_Comm_free(MPI_Comm *\fIcomm\fP) .nf INCLUDE 'mpif.h' MPI_COMM_FREE(\fICOMM, IERROR\fP) - INTEGER \fICOMM, IERROR\fP + INTEGER \fICOMM, IERROR\fP .fi .SH C++ Syntax @@ -38,11 +38,11 @@ Communicator to be destroyed (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This operation marks the communicator object for deallocation. The handle is set to MPI_COMM_NULL. Any pending operations that use this communicator will complete normally; the object is actually deallocated only if there are no other active references to it. This call applies to intracommunicators and intercommunicators. Upon actual deallocation, the delete callback functions for all cached attributes (see Section 5.7 in the MPI-1 Standard, "Caching") are called in arbitrary order. +This operation marks the communicator object for deallocation. The handle is set to MPI_COMM_NULL. Any pending operations that use this communicator will complete normally; the object is actually deallocated only if there are no other active references to it. This call applies to intracommunicators and intercommunicators. Upon actual deallocation, the delete callback functions for all cached attributes (see Section 5.7 in the MPI-1 Standard, "Caching") are called in arbitrary order. .SH NOTES @@ -57,7 +57,7 @@ is being invoked. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_free_keyval.3in b/ompi/mpi/man/man3/MPI_Comm_free_keyval.3in index b855c2324e6..e9ca795011f 100644 --- a/ompi/mpi/man/man3/MPI_Comm_free_keyval.3in +++ b/ompi/mpi/man/man3/MPI_Comm_free_keyval.3in @@ -37,14 +37,14 @@ comm_keyval .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_free_keyval frees an extant attribute key. This function sets the value of \fIkeyval\fP to MPI_KEYVAL_INVALID. Note that it is not erroneous to free an attribute key that is in use, because the actual free does not transpire until after all references (in other communicators on the process) to the key have been freed. These references need to be explicitly freed by the program, either via calls to MPI_Comm_delete_attr that free one attribute instance, or by calls to MPI_Comm_free that free all attribute instances associated with the freed communicator. +MPI_Comm_free_keyval frees an extant attribute key. This function sets the value of \fIkeyval\fP to MPI_KEYVAL_INVALID. Note that it is not erroneous to free an attribute key that is in use, because the actual free does not transpire until after all references (in other communicators on the process) to the key have been freed. These references need to be explicitly freed by the program, either via calls to MPI_Comm_delete_attr that free one attribute instance, or by calls to MPI_Comm_free that free all attribute instances associated with the freed communicator. .sp -This call is identical to the call MPI_Keyval_free but is needed to match the communicator-specific creation function introduced in the MPI-2 standard. The use of MPI_Keyval_free is deprecated. +This call is identical to the call MPI_Keyval_free but is needed to match the communicator-specific creation function introduced in the MPI-2 standard. The use of MPI_Keyval_free is deprecated. .SH NOTES @@ -55,5 +55,5 @@ Key values are global (they can be used with any and all communicators). Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_get_attr.3in b/ompi/mpi/man/man3/MPI_Comm_get_attr.3in index 6650208c088..c746386b030 100644 --- a/ompi/mpi/man/man3/MPI_Comm_get_attr.3in +++ b/ompi/mpi/man/man3/MPI_Comm_get_attr.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Comm_get_attr(MPI_Comm \fIcomm\fP, int \fIcomm_keyval\fP, +int MPI_Comm_get_attr(MPI_Comm \fIcomm\fP, int \fIcomm_keyval\fP, void *\fIattribute_val\fP, int *\fIflag\fP) .fi @@ -28,7 +28,7 @@ MPI_COMM_GET_ATTR(\fICOMM, COMM_KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR\fP) .SH C++ Syntax .nf #include -bool MPI::Comm::Get_attr(int \fIcomm_keyval\fP, void* \fIattribute_val\fP) +bool MPI::Comm::Get_attr(int \fIcomm_keyval\fP, void* \fIattribute_val\fP) const .fi @@ -48,14 +48,14 @@ attribute_val Attribute value, unless f\fIlag\fP = false. .TP 1i flag -False if no attribute is associated with the key (logical). +False if no attribute is associated with the key (logical). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_get_attr retrieves an attribute value by key. The call is erroneous if there is no key with value \fIkeyval\fP. On the other hand, the call is correct if the key value exists, but no attribute is attached on \fIcomm\fP for that key; in that case, the call returns \fIflag\fP = false. In particular, MPI_KEYVAL_INVALID is an erroneous key value. +MPI_Comm_get_attr retrieves an attribute value by key. The call is erroneous if there is no key with value \fIkeyval\fP. On the other hand, the call is correct if the key value exists, but no attribute is attached on \fIcomm\fP for that key; in that case, the call returns \fIflag\fP = false. In particular, MPI_KEYVAL_INVALID is an erroneous key value. .sp This function replaces MPI_Attr_get, the use of which is deprecated. The C binding is identical. The Fortran binding differs in that \fIattribute_val\fP is an address-sized integer. @@ -76,5 +76,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_get_errhandler.3in b/ompi/mpi/man/man3/MPI_Comm_get_errhandler.3in index c775c203abc..50cb3fcf49f 100644 --- a/ompi/mpi/man/man3/MPI_Comm_get_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Comm_get_errhandler.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_get_errhandler 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_get_errhandler \fP \- Retrieves error handler associated with a communicator. +\fBMPI_Comm_get_errhandler \fP \- Retrieves error handler associated with a communicator. .SH SYNTAX .ft R @@ -33,7 +33,7 @@ MPI::Errhandler MPI::Comm::Get_errhandler() const .ft R .TP 1i comm -Communicator (handle). +Communicator (handle). .SH OUTPUT PARAMETERS .ft R @@ -43,18 +43,18 @@ New error handler for communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_get_errhandler retrieves the error handler currently associated with a communicator. This call is identical to MPI_Errhandler_get, the use of which is deprecated. +MPI_Comm_get_errhandler retrieves the error handler currently associated with a communicator. This call is identical to MPI_Errhandler_get, the use of which is deprecated. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .sp -See the MPI man page for a full list of MPI error codes. +See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Comm_get_info.3in b/ompi/mpi/man/man3/MPI_Comm_get_info.3in index d380f91ba9f..636f5c8ddb6 100644 --- a/ompi/mpi/man/man3/MPI_Comm_get_info.3in +++ b/ompi/mpi/man/man3/MPI_Comm_get_info.3in @@ -35,16 +35,16 @@ info_used New info object returned with all active hints on this communicator. .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). . .SH DESCRIPTION .ft R MPI_Comm_get_info returns a new info object containing the hints of -the communicator associated with -.IR comm . +the communicator associated with +.IR comm . The current setting of all hints actually used by the system related -to this communicator is returned in -.IR info_used . +to this communicator is returned in +.IR info_used . If no such hints exist, a handle to a newly created info object is returned that contains no key/value pair. The user is responsible for freeing info_used via MPI_Info_free. diff --git a/ompi/mpi/man/man3/MPI_Comm_get_name.3in b/ompi/mpi/man/man3/MPI_Comm_get_name.3in index 17f951c680d..c0566643c0b 100644 --- a/ompi/mpi/man/man3/MPI_Comm_get_name.3in +++ b/ompi/mpi/man/man3/MPI_Comm_get_name.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_get_name 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_get_name\fP \- Returns the name that was most recently associated with a communicator. +\fBMPI_Comm_get_name\fP \- Returns the name that was most recently associated with a communicator. .SH SYNTAX .ft R @@ -43,26 +43,26 @@ comm_name Name previously stored on the communicator, or an empty string if no such name exists (string). .TP 1i resultlen -Length of returned name (integer). +Length of returned name (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Comm_get_name returns the last name that was previously associated with the given communicator. The name may be set and retrieved from any language. The same name will be returned independent of the language used. \fIcomm_name\fP should be allocated so that it can hold a resulting string of length MPI_MAX_OBJECT_NAME characters. MPI_Comm_get_name returns a copy of the set name in \fIcomm_name\fP. .sp -If the user has not associated a name with a communicator, or an error occurs, MPI_Comm_get_name will return an empty string (all spaces in Fortran, "" in C and C++). The three predefined communicators will have predefined names associated with them. Thus, the names of MPI_COMM_WORLD, MPI_COMM_SELF, and MPI_COMM_PARENT will have the default of MPI_COMM_WORLD, MPI_COMM_SELF, and MPI_COMM_PARENT. The fact that the system may have chosen to give a default name to a communicator does not prevent the user from setting a name on the same communicator; doing this removes the old name and assigns the new one. +If the user has not associated a name with a communicator, or an error occurs, MPI_Comm_get_name will return an empty string (all spaces in Fortran, "" in C and C++). The three predefined communicators will have predefined names associated with them. Thus, the names of MPI_COMM_WORLD, MPI_COMM_SELF, and MPI_COMM_PARENT will have the default of MPI_COMM_WORLD, MPI_COMM_SELF, and MPI_COMM_PARENT. The fact that the system may have chosen to give a default name to a communicator does not prevent the user from setting a name on the same communicator; doing this removes the old name and assigns the new one. .SH NOTES .ft R -It is safe simply to print the string returned by MPI_Comm_get_name, as it is always a valid string even if there was no name. +It is safe simply to print the string returned by MPI_Comm_get_name, as it is always a valid string even if there was no name. .sp -Note that associating a name with a communicator has no effect on the semantics of an MPI program, and will (necessarily) increase the store requirement of the program, since the names must be saved. Therefore, there is no requirement that users use these functions to associate names with communicators. However debugging and profiling MPI applications may be made easier if names are associated with communicators, since the debugger or profiler should then be able to present information in a less cryptic manner. +Note that associating a name with a communicator has no effect on the semantics of an MPI program, and will (necessarily) increase the store requirement of the program, since the names must be saved. Therefore, there is no requirement that users use these functions to associate names with communicators. However debugging and profiling MPI applications may be made easier if names are associated with communicators, since the debugger or profiler should then be able to present information in a less cryptic manner. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_get_parent.3in b/ompi/mpi/man/man3/MPI_Comm_get_parent.3in index 296e7dd32a1..7fd445232f7 100644 --- a/ompi/mpi/man/man3/MPI_Comm_get_parent.3in +++ b/ompi/mpi/man/man3/MPI_Comm_get_parent.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_get_parent 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_get_parent\fP \- Returns the parent intercommunicator of current spawned process. +\fBMPI_Comm_get_parent\fP \- Returns the parent intercommunicator of current spawned process. .SH SYNTAX .ft R @@ -36,25 +36,25 @@ parent The parent communicator (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -If a process was started with MPI_Comm_spawn or MPI_Comm_spawn_multiple, MPI_Comm_get_parent returns the "parent" intercommunicator of the current process. This parent intercommunicator is created implicitly inside of MPI_Init and is the same intercommunicator returned by the spawn call made in the parents. +If a process was started with MPI_Comm_spawn or MPI_Comm_spawn_multiple, MPI_Comm_get_parent returns the "parent" intercommunicator of the current process. This parent intercommunicator is created implicitly inside of MPI_Init and is the same intercommunicator returned by the spawn call made in the parents. .sp If the process was not spawned, MPI_Comm_get_parent returns MPI_COMM_NULL. .sp -After the parent communicator is freed or disconnected, MPI_Comm_get_parent returns MPI_COMM_NULL. +After the parent communicator is freed or disconnected, MPI_Comm_get_parent returns MPI_COMM_NULL. .SH NOTES .ft R -MPI_Comm_get_parent returns a handle to a single intercommunicator. Calling MPI_Comm_get_parent a second time returns a handle to the same intercommunicator. Freeing the handle with MPI_Comm_disconnect or MPI_Comm_free will cause other references to the intercommunicator to become invalid (dangling). Note that calling MPI_Comm_free on the parent communicator is not useful. +MPI_Comm_get_parent returns a handle to a single intercommunicator. Calling MPI_Comm_get_parent a second time returns a handle to the same intercommunicator. Freeing the handle with MPI_Comm_disconnect or MPI_Comm_free will cause other references to the intercommunicator to become invalid (dangling). Note that calling MPI_Comm_free on the parent communicator is not useful. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_group.3in b/ompi/mpi/man/man3/MPI_Comm_group.3in index 9ca2a9040c3..27342e08ff2 100644 --- a/ompi/mpi/man/man3/MPI_Comm_group.3in +++ b/ompi/mpi/man/man3/MPI_Comm_group.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_group 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_group \fP \- Returns the group associated with a communicator. +\fBMPI_Comm_group \fP \- Returns the group associated with a communicator. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Comm_group(MPI_Comm \fIcomm\fP, MPI_Group *\fIgroup\fP) .nf INCLUDE 'mpif.h' MPI_COMM_GROUP(\fICOMM, GROUP, IERROR\fP) - INTEGER \fICOMM, GROUP, IERROR\fP + INTEGER \fICOMM, GROUP, IERROR\fP .fi .SH C++ Syntax @@ -42,15 +42,15 @@ Group in communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -If the communicator is an intercommunicator (enables communication between two groups of processes), this function returns the local group. To return the remote group, use the MPI_Comm_remote_group function. +If the communicator is an intercommunicator (enables communication between two groups of processes), this function returns the local group. To return the remote group, use the MPI_Comm_remote_group function. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_join.3in b/ompi/mpi/man/man3/MPI_Comm_join.3in index 34d16e94510..7ab0e9e5ef7 100644 --- a/ompi/mpi/man/man3/MPI_Comm_join.3in +++ b/ompi/mpi/man/man3/MPI_Comm_join.3in @@ -43,7 +43,7 @@ intercomm Intercommunicator between processes (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -89,7 +89,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Comm_rank.3in b/ompi/mpi/man/man3/MPI_Comm_rank.3in index 6c163345d17..414ae19120a 100644 --- a/ompi/mpi/man/man3/MPI_Comm_rank.3in +++ b/ompi/mpi/man/man3/MPI_Comm_rank.3in @@ -19,7 +19,7 @@ int MPI_Comm_rank(MPI_Comm \fIcomm\fP, int\fI *rank\fP) .nf INCLUDE 'mpif.h' MPI_COMM_RANK(\fICOMM, RANK, IERROR\fP) - INTEGER \fICOMM, RANK, IERROR\fP + INTEGER \fICOMM, RANK, IERROR\fP .fi .SH C++ Syntax @@ -42,21 +42,21 @@ Rank of the calling process in group of comm (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R This function gives the rank of the process in the particular communicator's group. It is equivalent to accessing the -communicator's group with MPI_Comm_group, computing the rank using MPI_Group_rank, and then freeing the temporary group via MPI_Group_free. +communicator's group with MPI_Comm_group, computing the rank using MPI_Group_rank, and then freeing the temporary group via MPI_Group_free. .sp -Many programs will be written with the master-slave model, where one process (such as the rank-zero process) will play a supervisory role, and the other processes will serve as compute nodes. In this framework, MPI_Comm_size and MPI_Comm_rank are useful for determining the roles of the various processes of a communicator. +Many programs will be written with the master-slave model, where one process (such as the rank-zero process) will play a supervisory role, and the other processes will serve as compute nodes. In this framework, MPI_Comm_size and MPI_Comm_rank are useful for determining the roles of the various processes of a communicator. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_remote_group.3in b/ompi/mpi/man/man3/MPI_Comm_remote_group.3in index 080ec198373..b33608e7aaa 100644 --- a/ompi/mpi/man/man3/MPI_Comm_remote_group.3in +++ b/ompi/mpi/man/man3/MPI_Comm_remote_group.3in @@ -19,7 +19,7 @@ int MPI_Comm_remote_group(MPI_Comm \fIcomm\fP, MPI_Group\fI *group\fP) .nf INCLUDE 'mpif.h' MPI_COMM_REMOTE_GROUP(\fICOMM, GROUP, IERROR\fP) - INTEGER \fICOMM, GROUP, IERROR\fP + INTEGER \fICOMM, GROUP, IERROR\fP .fi .SH C++ Syntax @@ -42,7 +42,7 @@ Remote group of communicator. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -55,7 +55,7 @@ MPI_Comm_remote_group) are all local operations. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .sp diff --git a/ompi/mpi/man/man3/MPI_Comm_remote_size.3in b/ompi/mpi/man/man3/MPI_Comm_remote_size.3in index f13d4c337e3..f1f8009b909 100644 --- a/ompi/mpi/man/man3/MPI_Comm_remote_size.3in +++ b/ompi/mpi/man/man3/MPI_Comm_remote_size.3in @@ -19,7 +19,7 @@ int MPI_Comm_remote_size(MPI_Comm \fIcomm\fP, int\fI *size\fP) .nf INCLUDE 'mpif.h' MPI_COMM_REMOTE_SIZE(\fICOMM, SIZE, IERROR\fP) - INTEGER \fICOMM, SIZE, IERROR\fP + INTEGER \fICOMM, SIZE, IERROR\fP .fi .SH C++ Syntax @@ -42,7 +42,7 @@ Number of processes in the remote group of comm (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -54,7 +54,7 @@ The intercommunicator accessors (MPI_Comm_test_inter, MPI_Comm_remote_size, MPI Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_set_attr.3in b/ompi/mpi/man/man3/MPI_Comm_set_attr.3in index f496f5408b1..d5f5e7c9572 100644 --- a/ompi/mpi/man/man3/MPI_Comm_set_attr.3in +++ b/ompi/mpi/man/man3/MPI_Comm_set_attr.3in @@ -48,13 +48,13 @@ Attribute value. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Comm_set_attr stores the stipulated attribute value \fIattribute_val\fP for subsequent retrieval by MPI_Comm_get_attr. If the value is already present, then the outcome is as if MPI_Comm_delete_attr was first called to delete the previous value (and the callback function delete_fn was executed), and a new value was next stored. The call is erroneous if there is no key with value \fIcomm_keyval\fP; in particular MPI_KEYVAL_INVALID is an erroneous key value. The call will fail if the delete_fn function returned an error code other than MPI_SUCCESS. .sp -This function replaces MPI_Attr_put, the use of which is deprecated. The C binding is identical. The Fortran binding differs in that \fIattribute_val\fP is an address-sized integer. +This function replaces MPI_Attr_put, the use of which is deprecated. The C binding is identical. The Fortran binding differs in that \fIattribute_val\fP is an address-sized integer. .SH FORTRAN 77 NOTES .ft R @@ -74,7 +74,7 @@ and gives the length of the declared integer in bytes. Values of the permanent attributes MPI_TAG_UB, MPI_HOST, MPI_IO, and MPI_WTIME_IS_GLOBAL may not be changed. .sp -The type of the attribute value depends on whether C or Fortran is being used. In C, an attribute value is a pointer (void *); in Fortran, it is a single, address-size integer system for which a pointer does not fit in an integer. +The type of the attribute value depends on whether C or Fortran is being used. In C, an attribute value is a pointer (void *); in Fortran, it is a single, address-size integer system for which a pointer does not fit in an integer. .sp If an attribute is already present, the delete function (specified when the corresponding keyval was created) will be called. @@ -82,5 +82,5 @@ If an attribute is already present, the delete function (specified when the corr Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_set_errhandler.3in b/ompi/mpi/man/man3/MPI_Comm_set_errhandler.3in index 39db6f7c970..216f652a204 100644 --- a/ompi/mpi/man/man3/MPI_Comm_set_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Comm_set_errhandler.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_set_errhandler 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_set_errhandler \fP \- Attaches a new error handler to a communicator. +\fBMPI_Comm_set_errhandler \fP \- Attaches a new error handler to a communicator. .SH SYNTAX .ft R @@ -33,7 +33,7 @@ void MPI::Comm::Set_errhandler(const MPI::Errhandler& \fIerrhandler\fP) .ft R .TP 1i comm -Communicator (handle). +Communicator (handle). .SH OUTPUT PARAMETERS .ft R @@ -43,15 +43,15 @@ New error handler for communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_set_errhandler attaches a new error handler to a communicator. The error handler must be either a predefined error handler or an error handler created by a call to MPI_Comm_create_errhandler. This call is identical to MPI_Errhandler_set, the use of which is deprecated. +MPI_Comm_set_errhandler attaches a new error handler to a communicator. The error handler must be either a predefined error handler or an error handler created by a call to MPI_Comm_create_errhandler. This call is identical to MPI_Errhandler_set, the use of which is deprecated. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Comm_set_info.3in b/ompi/mpi/man/man3/MPI_Comm_set_info.3in index 99bdb747778..552bb0ce123 100644 --- a/ompi/mpi/man/man3/MPI_Comm_set_info.3in +++ b/ompi/mpi/man/man3/MPI_Comm_set_info.3in @@ -35,17 +35,17 @@ Info object containing hints to be set on .SH OUTPUT PARAMETERS .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). . .SH DESCRIPTION .ft R MPI_COMM_SET_INFO sets new values for the hints of the communicator -associated with +associated with .IR comm . MPI_COMM_SET_INFO is a collective routine. The info object may be different on each process, but any info entries that an implementation requires to be the same on all processes must appear with the same -value in each process's +value in each process's .I info object. . diff --git a/ompi/mpi/man/man3/MPI_Comm_set_name.3in b/ompi/mpi/man/man3/MPI_Comm_set_name.3in index b78c6191236..d40ee07e717 100644 --- a/ompi/mpi/man/man3/MPI_Comm_set_name.3in +++ b/ompi/mpi/man/man3/MPI_Comm_set_name.3in @@ -46,21 +46,21 @@ Character string to be used as the identifier for the communicator (string). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Comm_set_name allows a user to associate a name string with a communicator. The character string that is passed to MPI_Comm_set_name is saved inside the MPI library (so it can be freed by the caller immediately after the call, or allocated on the stack). Leading spaces in \fIname\fP are significant, but trailing ones are not. .sp -MPI_Comm_set_name is a local (noncollective) operation, which affects only the name of the communicator as seen in the process that made the MPI_Comm_set_name call. There is no requirement that the same (or any) name be assigned to a communicator in every process where it exists. +MPI_Comm_set_name is a local (noncollective) operation, which affects only the name of the communicator as seen in the process that made the MPI_Comm_set_name call. There is no requirement that the same (or any) name be assigned to a communicator in every process where it exists. .sp The length of the name that can be stored is limited to the value of MPI_MAX_OBJECT_NAME in Fortran and MPI_MAX_OBJECT_NAME-1 in C and C++ (to allow for the null terminator). Attempts to set names longer than this will result in truncation of the name. MPI_MAX_OBJECT_NAME must have a value of at least 64. .SH NOTES .ft R -Since MPI_Comm_set_name is provided to help debug code, it is sensible to give the same name to a communicator in all of the processes where it exists, to avoid confusion. +Since MPI_Comm_set_name is provided to help debug code, it is sensible to give the same name to a communicator in all of the processes where it exists, to avoid confusion. .sp Regarding name length, under circumstances of store exhaustion, an attempt to set a name of any length could fail; therefore, the value of MPI_MAX_OBJECT_NAME should be viewed only as a strict upper bound on the name length, not a guarantee that setting names of less than this length will always succeed. @@ -68,7 +68,7 @@ Regarding name length, under circumstances of store exhaustion, an attempt to se Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_size.3in b/ompi/mpi/man/man3/MPI_Comm_size.3in index fb0ddc14bbf..cd9bbae3fb7 100644 --- a/ompi/mpi/man/man3/MPI_Comm_size.3in +++ b/ompi/mpi/man/man3/MPI_Comm_size.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_size 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_size \fP \- Returns the size of the group associated with a communicator. +\fBMPI_Comm_size \fP \- Returns the size of the group associated with a communicator. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Comm_size(MPI_Comm \fIcomm\fP, int *\fIsize\fP) .nf INCLUDE 'mpif.h' MPI_COMM_SIZE(\fICOMM, SIZE, IERROR\fP) - INTEGER \fICOMM, SIZE, IERROR\fP + INTEGER \fICOMM, SIZE, IERROR\fP .fi .SH C++ Syntax @@ -42,7 +42,7 @@ Number of processes in the group of comm (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -56,17 +56,17 @@ communication between two groups), this function returns the size of the local group. To return the size of the remote group, use the MPI_Comm_remote_size function. .sp -This call is often used with MPI_Comm_rank to determine the amount of concurrency available for a specific library or program. MPI_Comm_rank indicates the rank of the process that calls it in the range from 0 . . . size-1, where size is the return value of MPI_Comm_size. +This call is often used with MPI_Comm_rank to determine the amount of concurrency available for a specific library or program. MPI_Comm_rank indicates the rank of the process that calls it in the range from 0 . . . size-1, where size is the return value of MPI_Comm_size. .SH NOTE .ft R -MPI_COMM_NULL is not considered a valid argument to this function. +MPI_COMM_NULL is not considered a valid argument to this function. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_spawn.3in b/ompi/mpi/man/man3/MPI_Comm_spawn.3in index fd1cc867c97..1a2d2531aca 100644 --- a/ompi/mpi/man/man3/MPI_Comm_spawn.3in +++ b/ompi/mpi/man/man3/MPI_Comm_spawn.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_spawn 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_spawn\fP \- Spawns a number of identical binaries. +\fBMPI_Comm_spawn\fP \- Spawns a number of identical binaries. .SH SYNTAX .ft R @@ -14,19 +14,19 @@ .nf #include int MPI_Comm_spawn(const char *\fIcommand\fP, char *\fIargv\fP[], int \fImaxprocs\fP, - MPI_Info \fIinfo\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP, + MPI_Info \fIinfo\fP, int \fIroot\fP, MPI_Comm \fIcomm\fP, MPI_Comm *\fIintercomm\fP, int \fIarray_of_errcodes\fP[]) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_COMM_SPAWN(\fICOMMAND, ARGV, MAXPROCS, INFO, ROOT, COMM, +MPI_COMM_SPAWN(\fICOMMAND, ARGV, MAXPROCS, INFO, ROOT, COMM, INTERCOMM, ARRAY_OF_ERRCODES, IERROR\fP) - CHARACTER*(*) \fICOMMAND, ARGV(*)\fP - INTEGER \fIINFO, MAXPROCS, ROOT, COMM, INTERCOMM, - ARRAY_OF_ERRCODES(*), IERROR\fP + CHARACTER*(*) \fICOMMAND, ARGV(*)\fP + INTEGER \fIINFO, MAXPROCS, ROOT, COMM, INTERCOMM, + ARRAY_OF_ERRCODES(*), IERROR\fP .fi .SH C++ Syntax @@ -54,7 +54,7 @@ maxprocs Maximum number of processes to start (integer, significant only at \fIroot\fP). .TP 1i info -A set of key-value pairs telling the runtime system where and how to start the processes (handle, significant only at \fIroot\fP). +A set of key-value pairs telling the runtime system where and how to start the processes (handle, significant only at \fIroot\fP). .TP 1i root Rank of process in which previous arguments are examined (integer). @@ -72,17 +72,17 @@ array_of_errcodes One code per process (array of integers). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Comm_spawn tries to start \fImaxprocs\fP identical copies of the MPI program specified by \fIcommand\fP, establishing communication with them and returning an intercommunicator. The spawned processes are referred to as children. The children have their own MPI_COMM_WORLD, which is separate from that of the parents. MPI_Comm_spawn is collective over \fIcomm\fP, and also may not return until MPI_Init has been called in the children. Similarly, MPI_Init in the children may not return until all parents have called MPI_Comm_spawn. In this sense, MPI_Comm_spawn in the parents and MPI_Init in the children form a collective operation over the union of parent and child processes. The intercommunicator returned by MPI_Comm_spawn contains the parent processes in the local group and the child processes in the remote group. The ordering of processes in the local and remote groups is the same as the as the ordering of the group of the \fIcomm\fP in the parents and of MPI_COMM_WORLD of the children, respectively. This intercommunicator can be obtained in the children through the function MPI_Comm_get_parent. +MPI_Comm_spawn tries to start \fImaxprocs\fP identical copies of the MPI program specified by \fIcommand\fP, establishing communication with them and returning an intercommunicator. The spawned processes are referred to as children. The children have their own MPI_COMM_WORLD, which is separate from that of the parents. MPI_Comm_spawn is collective over \fIcomm\fP, and also may not return until MPI_Init has been called in the children. Similarly, MPI_Init in the children may not return until all parents have called MPI_Comm_spawn. In this sense, MPI_Comm_spawn in the parents and MPI_Init in the children form a collective operation over the union of parent and child processes. The intercommunicator returned by MPI_Comm_spawn contains the parent processes in the local group and the child processes in the remote group. The ordering of processes in the local and remote groups is the same as the as the ordering of the group of the \fIcomm\fP in the parents and of MPI_COMM_WORLD of the children, respectively. This intercommunicator can be obtained in the children through the function MPI_Comm_get_parent. .sp The MPI standard allows an implementation to use the MPI_UNIVERSE_SIZE attribute of MPI_COMM_WORLD to specify the number of processes that will be active in a program. Although this implementation of the MPI standard defines MPI_UNIVERSE_SIZE, it does not allow the user to set its value. If you try to set the value of MPI_UNIVERSE_SIZE, you will get an error message. .sp -The \fIcommand\fP Argument +The \fIcommand\fP Argument .sp -The \fIcommand\fP argument is a string containing the name of a program to be spawned. The string is null-terminated in C. In Fortran, leading and trailing spaces are stripped. MPI looks for the file first in the working directory of the spawning process. +The \fIcommand\fP argument is a string containing the name of a program to be spawned. The string is null-terminated in C. In Fortran, leading and trailing spaces are stripped. MPI looks for the file first in the working directory of the spawning process. .sp The \fIargv\fP Argument .sp @@ -91,8 +91,8 @@ to the program. The first element of \fIargv\fP is the first argument passed to \fIcommand\fP, not, as is conventional in some contexts, the command itself. The argument list is terminated by NULL in C and C++ and an empty string in Fortran (note that it is the MPI application's -responsibility to ensure that the last entry of the -.I argv +responsibility to ensure that the last entry of the +.I argv array is an empty string; the compiler will not automatically insert it). In Fortran, leading and trailing spaces are always stripped, so that a string consisting of all spaces is considered an empty @@ -100,17 +100,17 @@ string. The constant MPI_ARGV_NULL may be used in C, C++ and Fortran to indicate an empty argument list. In C and C++, this constant is the same as NULL. .sp -In C, the MPI_Comm_spawn argument \fIargv\fP differs from the \fIargv\fP argument of \fImain\fP in two respects. First, it is shifted by one element. Specifically, \fIargv\fP[0] of \fImain\fP contains the name of the program (given by \fIcommand\fP). \fIargv\fP[1] of \fImain\fP corresponds to \fIargv\fP[0] in MPI_Comm_spawn, \fIargv\fP[2] of \fImain\fP to \fIargv\fP[1] of MPI_Comm_spawn, and so on. Second, \fIargv\fP of MPI_Comm_spawn must be null-terminated, so that its length can be determined. Passing an \fIargv\fP of MPI_ARGV_NULL to MPI_Comm_spawn results in \fImain\fP receiving \fIargc\fP of 1 and an \fIargv\fP whose element 0 is the name of the program. +In C, the MPI_Comm_spawn argument \fIargv\fP differs from the \fIargv\fP argument of \fImain\fP in two respects. First, it is shifted by one element. Specifically, \fIargv\fP[0] of \fImain\fP contains the name of the program (given by \fIcommand\fP). \fIargv\fP[1] of \fImain\fP corresponds to \fIargv\fP[0] in MPI_Comm_spawn, \fIargv\fP[2] of \fImain\fP to \fIargv\fP[1] of MPI_Comm_spawn, and so on. Second, \fIargv\fP of MPI_Comm_spawn must be null-terminated, so that its length can be determined. Passing an \fIargv\fP of MPI_ARGV_NULL to MPI_Comm_spawn results in \fImain\fP receiving \fIargc\fP of 1 and an \fIargv\fP whose element 0 is the name of the program. .sp The \fImaxprocs\fP Argument .sp Open MPI tries to spawn \fImaxprocs\fP processes. If it is unable to spawn \fImaxprocs\fP processes, it raises an error of class MPI_ERR_SPAWN. If MPI is able to spawn the specified number of processes, MPI_Comm_spawn returns successfully and the number of spawned processes, \fIm\fP, is given by the size of the remote group of \fIintercomm\fP. .sp -A spawn call with the default behavior is called hard. A spawn call for which fewer than \fImaxprocs\fP processes may be returned is called soft. +A spawn call with the default behavior is called hard. A spawn call for which fewer than \fImaxprocs\fP processes may be returned is called soft. .sp -The \fIinfo\fP Argument +The \fIinfo\fP Argument .sp -The \fIinfo\fP argument is an opaque handle of type MPI_Info in C, MPI::Info in C++ and INTEGER in Fortran. It is a container for a number of user-speci ed (\fIkey,value\fP) pairs. \fIkey\fP and \fIvalue\fP are strings (null-terminated char* in C, character*(*) in Fortran). Routines to create and manipulate the \fIinfo\fP argument are described in Section 4.10 of the MPI-2 standard. +The \fIinfo\fP argument is an opaque handle of type MPI_Info in C, MPI::Info in C++ and INTEGER in Fortran. It is a container for a number of user-speci ed (\fIkey,value\fP) pairs. \fIkey\fP and \fIvalue\fP are strings (null-terminated char* in C, character*(*) in Fortran). Routines to create and manipulate the \fIinfo\fP argument are described in Section 4.10 of the MPI-2 standard. .sp For the SPAWN calls, \fIinfo\fP provides additional, implementation-dependent instructions to MPI and the runtime system on how to start processes. An application may pass MPI_INFO_NULL in C or Fortran. Portable programs not requiring detailed control over process locations should use MPI_INFO_NULL. .sp @@ -199,26 +199,26 @@ and non-zero values are true). If the string value is (case-insensitive) "yes" or "true", the boolean is true. If the string value is (case-insensitive) "no" or "false", the boolean is false. All other string values are unrecognized, and therefore false. - + .sp The \fIroot\fP Argument .sp -All arguments before the \fIroot\fP argument are examined only on the process whose rank in \fIcomm\fP is equal to \fIroot\fP. The value of these arguments on other processes is ignored. +All arguments before the \fIroot\fP argument are examined only on the process whose rank in \fIcomm\fP is equal to \fIroot\fP. The value of these arguments on other processes is ignored. .sp The \fIarray_of_errcodes\fP Argument .sp -The \fIarray_of_errcodes\fP is an array of length \fImaxprocs\fP in which MPI reports the status of the processes that MPI was requested to start. If all \fImaxprocs\fP processes were spawned, \fIarray_of_errcodes\fP is filled in with the value MPI_SUCCESS. If anyof the processes are \fInot\fP spawned, \fIarray_of_errcodes\fP is filled in with the value MPI_ERR_SPAWN. In C or Fortran, an application may pass MPI_ERRCODES_IGNORE if it is not interested in the error codes. In C++ this constant does not exist, and the \fIarray_of_errcodes\fP argument may be omitted from the argument list. +The \fIarray_of_errcodes\fP is an array of length \fImaxprocs\fP in which MPI reports the status of the processes that MPI was requested to start. If all \fImaxprocs\fP processes were spawned, \fIarray_of_errcodes\fP is filled in with the value MPI_SUCCESS. If anyof the processes are \fInot\fP spawned, \fIarray_of_errcodes\fP is filled in with the value MPI_ERR_SPAWN. In C or Fortran, an application may pass MPI_ERRCODES_IGNORE if it is not interested in the error codes. In C++ this constant does not exist, and the \fIarray_of_errcodes\fP argument may be omitted from the argument list. .SH NOTES .ft R -Completion of MPI_Comm_spawn in the parent does not necessarily mean that MPI_Init has been called in the children (although the returned intercommunicator can be used immediately). +Completion of MPI_Comm_spawn in the parent does not necessarily mean that MPI_Init has been called in the children (although the returned intercommunicator can be used immediately). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_spawn_multiple.3in b/ompi/mpi/man/man3/MPI_Comm_spawn_multiple.3in index e7befe19434..f46ec5d19c7 100644 --- a/ompi/mpi/man/man3/MPI_Comm_spawn_multiple.3in +++ b/ompi/mpi/man/man3/MPI_Comm_spawn_multiple.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Comm_spawn_multiple 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Comm_spawn_multiple\fP \- Spawns multiple binaries, or the same binary with multiple sets of arguments. +\fBMPI_Comm_spawn_multiple\fP \- Spawns multiple binaries, or the same binary with multiple sets of arguments. .SH SYNTAX .ft R @@ -22,11 +22,11 @@ int MPI_Comm_spawn_multiple(int \fIcount\fP, char *\fIarray_of_commands\fP[], .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_COMM_SPAWN_MULTIPLE(\fICOUNT, ARRAY_OF_COMMANDS, ARRAY_OF_ARGV, - ARRAY_OF_MAXPROCS, ARRAY_OF_INFO, ROOT, COMM, INTERCOMM, +MPI_COMM_SPAWN_MULTIPLE(\fICOUNT, ARRAY_OF_COMMANDS, ARRAY_OF_ARGV, + ARRAY_OF_MAXPROCS, ARRAY_OF_INFO, ROOT, COMM, INTERCOMM, ARRAY_OF_ERRCODES, IERROR\fP) - INTEGER \fICOUNT, ARRAY_OF_INFO(*), ARRAY_OF_MAXPROCS(*), ROOT, - COMM, INTERCOMM, ARRAY_OF_ERRCODES(*), IERROR\fP + INTEGER \fICOUNT, ARRAY_OF_INFO(*), ARRAY_OF_MAXPROCS(*), ROOT, + COMM, INTERCOMM, ARRAY_OF_ERRCODES(*), IERROR\fP CHARACTER*(*) \fIARRAY_OF_COMMANDS\fP(*), \fIARRAY_OF_ARGV\fP(\fICOUNT\fP, *) .fi @@ -51,13 +51,13 @@ count Number of commands (positive integer, significant to MPI only at \fIroot\fP -- see NOTES). .TP 1i array_of_commands -Programs to be executed (array of strings, significant only at \fIroot\fP). +Programs to be executed (array of strings, significant only at \fIroot\fP). .TP 1i array_of_argv -Arguments for \fIcommands\fP (array of array of strings, significant only at \fIroot\fP). +Arguments for \fIcommands\fP (array of array of strings, significant only at \fIroot\fP). .TP 1i array_of_maxprocs -Maximum number of processes to start for each command (array of integers, significant only at \fIroot\fP). +Maximum number of processes to start for each command (array of integers, significant only at \fIroot\fP). .TP 1i array_of_info Info objects telling the runtime system where and how to start processes (array of handles, significant only at \fIroot\fP). @@ -78,7 +78,7 @@ array_of_errcodes One code per process (array of integers). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -89,33 +89,33 @@ arrays of the corresponding arguments in MPI_Comm_spawn(3). The next argument, \fIarray_of_info\fP, is an array of \fIinfo\fP arguments, one for each executable. See the INFO ARGUMENTS section for more information. .sp -For the Fortran version of \fIarray_of_argv\fP, the element \fIarray_of_argv\fP(i,j) is the jth argument to command number i. +For the Fortran version of \fIarray_of_argv\fP, the element \fIarray_of_argv\fP(i,j) is the jth argument to command number i. .sp -In any language, an application may use the constant MPI_ARGVS_NULL (which is likely to be (char ***)0 in C) to specify that no arguments should be passed to any commands. The effect of setting individual elements of \fIarray_of_argv\fP to MPI_ARGV_NULL is not defined. To specify arguments for some commands but not others, the commands without arguments should have a corresponding \fIargv\fP whose first element is null ((char *)0 in C and empty string in Fortran). +In any language, an application may use the constant MPI_ARGVS_NULL (which is likely to be (char ***)0 in C) to specify that no arguments should be passed to any commands. The effect of setting individual elements of \fIarray_of_argv\fP to MPI_ARGV_NULL is not defined. To specify arguments for some commands but not others, the commands without arguments should have a corresponding \fIargv\fP whose first element is null ((char *)0 in C and empty string in Fortran). .sp All of the spawned processes have the same MPI_COMM_WORLD. Their ranks in MPI_COMM_WORLD correspond directly to the order in which the commands are specified in MPI_Comm_spawn_multiple. Assume that m1 processes are generated by the first command, m2 by the second, etc. The processes corresponding to the first command have ranks 0, 1,..., m1-1. The processes in the second command have ranks m1, m1+1, ..., m1+m2-1. The processes in the third have ranks m1+m2, m1+m2+1, ..., m1+m2+m3-1, etc. .sp -The \fIarray_of_errcodes\fP argument is 1-dimensional array of size +The \fIarray_of_errcodes\fP argument is 1-dimensional array of size .sp .nf _ count \\ n , - /_ i=1 i + /_ i=1 i .fi .sp -where i is the ith element of \fIarray_of_maxprocs\fP. Command number \fIi\fP corresponds to the i contiguous slots in this array from element +where i is the ith element of \fIarray_of_maxprocs\fP. Command number \fIi\fP corresponds to the i contiguous slots in this array from element .sp .nf _ _ _ \fIi\fP-1 | _ \fIi\fP | \\ n , to | \\ n | -1 /_ \fIj\fP=1 i | /_ \fIj\fP=1 j | - |_ _| -.fi + |_ _| +.fi .sp -Error codes are treated as for MPI_Comm_spawn(3). +Error codes are treated as for MPI_Comm_spawn(3). + - .SH INFO ARGUMENTS The following keys for \fIinfo\fP are recognized in "#PACKAGE_NAME#". (The reserved values mentioned in Section 5.3.4 of the MPI-2 standard are not implemented.) .sp @@ -196,7 +196,7 @@ env char* Newline-delimited list of envars to be passed to the spawned procs .fi -.sp +.sp \fIbool\fP info keys are actually strings but are evaluated as follows: if the string value is a number, it is converted to an integer and cast to a boolean (meaning that zero integers are false @@ -210,12 +210,12 @@ Note that if any of the info handles have \fIompi_non_mpi\fP set to true, then all info handles must have it set to true. If some are set to true, but others are set to false (or are unset), MPI_ERR_INFO will be returned. - + .sp -Note that in "#PACKAGE_NAME#", the first array location in \fIarray_of_info\fP is applied to all the commands in \fIarray_of_commands\fP. +Note that in "#PACKAGE_NAME#", the first array location in \fIarray_of_info\fP is applied to all the commands in \fIarray_of_commands\fP. .SH NOTES -The argument \fIcount\fP is interpreted by MPI only at the root, as is \fIarray_of_argv\fP. Since the leading dimension of \fIarray_of_argv\fP is \fIcount\fP, a nonpositive value of \fIcount\fP at a nonroot node could theoretically cause a runtime bounds check error, even though \fIarray_of_argv\fP should be ignored by the subroutine. If this happens, you should explicitly supply a reasonable value of \fIcount\fP on the nonroot nodes. +The argument \fIcount\fP is interpreted by MPI only at the root, as is \fIarray_of_argv\fP. Since the leading dimension of \fIarray_of_argv\fP is \fIcount\fP, a nonpositive value of \fIcount\fP at a nonroot node could theoretically cause a runtime bounds check error, even though \fIarray_of_argv\fP should be ignored by the subroutine. If this happens, you should explicitly supply a reasonable value of \fIcount\fP on the nonroot nodes. .sp Similar to MPI_Comm_spawn(3), it is the application's responsibility to terminate each individual set of argv in the @@ -226,7 +226,7 @@ compilers will not automatically insert this blank string; the application must ensure to have enough space for an empty string entry as the last element of the array). .sp -Other restrictions apply to the +Other restrictions apply to the .I array_of_argv parameter; see MPI_Comm_spawn(3)'s description of the .I argv @@ -244,7 +244,7 @@ times. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_split.3in b/ompi/mpi/man/man3/MPI_Comm_split.3in index 87d707df15c..438b7b81136 100644 --- a/ompi/mpi/man/man3/MPI_Comm_split.3in +++ b/ompi/mpi/man/man3/MPI_Comm_split.3in @@ -51,26 +51,26 @@ New communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This function partitions the group associated with comm into disjoint subgroups, one for each value of color. Each subgroup contains all processes of the same color. Within each subgroup, the processes are ranked in the order defined by the value of the argument key, with ties broken according to their rank in the old group. A new communicator is created for each subgroup and returned in newcomm. A process may supply the color value MPI_UNDEFINED, in which case newcomm returns MPI_COMM_NULL. This is a collective call, but each process is permitted to provide different values for color and key. +This function partitions the group associated with comm into disjoint subgroups, one for each value of color. Each subgroup contains all processes of the same color. Within each subgroup, the processes are ranked in the order defined by the value of the argument key, with ties broken according to their rank in the old group. A new communicator is created for each subgroup and returned in newcomm. A process may supply the color value MPI_UNDEFINED, in which case newcomm returns MPI_COMM_NULL. This is a collective call, but each process is permitted to provide different values for color and key. .sp -When you call MPI_Comm_split on an inter-communicator, the processes on the left with the same color as those on the right combine to create a new inter-communicator. The key argument describes the relative rank of processes on each side of the inter-communicator. The function returns MPI_COMM_NULL for those colors that are specified on only one side of the inter-communicator, or for those that specify MPI_UNDEFINED as the color. +When you call MPI_Comm_split on an inter-communicator, the processes on the left with the same color as those on the right combine to create a new inter-communicator. The key argument describes the relative rank of processes on each side of the inter-communicator. The function returns MPI_COMM_NULL for those colors that are specified on only one side of the inter-communicator, or for those that specify MPI_UNDEFINED as the color. .sp -A call to MPI_Comm_create(\fIcomm\fP, \fIgroup\fP, \fInewcomm\fP) is equivalent to a call to MPI_Comm_split(\fIcomm\fP, \fIcolor\fP,\fI key\fP, \fInewcomm\fP), where all members of \fIgroup\fP provide \fIcolor\fP = 0 and \fIkey\fP = rank in group, and all processes that are not members of \fIgroup\fP provide \fIcolor\fP = MPI_UNDEFINED. The function MPI_Comm_split allows more general partitioning of a group into one or more subgroups with optional reordering. +A call to MPI_Comm_create(\fIcomm\fP, \fIgroup\fP, \fInewcomm\fP) is equivalent to a call to MPI_Comm_split(\fIcomm\fP, \fIcolor\fP,\fI key\fP, \fInewcomm\fP), where all members of \fIgroup\fP provide \fIcolor\fP = 0 and \fIkey\fP = rank in group, and all processes that are not members of \fIgroup\fP provide \fIcolor\fP = MPI_UNDEFINED. The function MPI_Comm_split allows more general partitioning of a group into one or more subgroups with optional reordering. .sp -The value of \fIcolor\fP must be nonnegative or MPI_UNDEFINED. +The value of \fIcolor\fP must be nonnegative or MPI_UNDEFINED. .SH NOTES .ft R This is an extremely powerful mechanism for dividing a single communicating group of processes into k subgroups, with k chosen implicitly by the user (by the number of colors asserted over all -the processes). Each resulting communicator will be nonoverlapping. Such a division could be useful for defining a hierarchy of computations, such as for multigrid or linear algebra. +the processes). Each resulting communicator will be nonoverlapping. Such a division could be useful for defining a hierarchy of computations, such as for multigrid or linear algebra. .sp -Multiple calls to MPI_Comm_split can be used to overcome the requirement that any call have no overlap of the resulting communicators (each process is of only one color per call). In this way, multiple overlapping communication structures can be created. Creative use of the color and key in such splitting operations is encouraged. +Multiple calls to MPI_Comm_split can be used to overcome the requirement that any call have no overlap of the resulting communicators (each process is of only one color per call). In this way, multiple overlapping communication structures can be created. Creative use of the color and key in such splitting operations is encouraged. .sp Note that, for a fixed color, the keys need not be unique. It is MPI_Comm_split's responsibility to sort processes in ascending order according to this key, and to break ties in a consistent way. If all the keys are specified in the same way, then all the processes in a given color will have the relative rank order as they did in their parent group. (In general, they will have different ranks.) .sp @@ -81,7 +81,7 @@ means that one needn't really pay attention to the rank-order of the processes i Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Comm_test_inter.3in b/ompi/mpi/man/man3/MPI_Comm_test_inter.3in index 302767b3c63..c128a1a2e27 100644 --- a/ompi/mpi/man/man3/MPI_Comm_test_inter.3in +++ b/ompi/mpi/man/man3/MPI_Comm_test_inter.3in @@ -42,11 +42,11 @@ flag (Logical.) .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This local routine allows the calling process to determine the type of a communicator. It returns true for an intercommunicator, false for an intracommunicator. +This local routine allows the calling process to determine the type of a communicator. It returns true for an intercommunicator, false for an intracommunicator. .sp The type of communicator also affects the value returned by three other functions. When dealing with an intracommunicator (enables communication within a single group), the functions listed below return the expected values, group size, group, and rank. When dealing with an inter-communicator, however, they return the following values: .sp @@ -58,10 +58,10 @@ MPI_Comm_rank Returns the rank in the local group. .sp To return the remote group and remote group size of an inter-communicator, use the MPI_Comm_remote_group and MPI_Comm_remote_size functions. .sp -The operation MPI_Comm_compare is valid for intercommunicators. Both communicators must be either intra- or intercommunicators, or else MPI_UNEQUAL results. Both corresponding local and remote groups must compare correctly to get the results MPI_CONGRUENT and MPI_SIMILAR. In particular, it is possible for MPI_SIMILAR to result because either the local or remote groups were similar but not identical. +The operation MPI_Comm_compare is valid for intercommunicators. Both communicators must be either intra- or intercommunicators, or else MPI_UNEQUAL results. Both corresponding local and remote groups must compare correctly to get the results MPI_CONGRUENT and MPI_SIMILAR. In particular, it is possible for MPI_SIMILAR to result because either the local or remote groups were similar but not identical. .sp The following accessors provide consistent access to the remote group of an -intercommunicator: MPI_Comm_remote_size, MPI_Comm_remote_group. +intercommunicator: MPI_Comm_remote_size, MPI_Comm_remote_group. .sp The intercommunicator accessors (MPI_Comm_test_inter, MPI_Comm_remote_size, MPI_Comm_remote_group) are all local operations. @@ -69,7 +69,7 @@ The intercommunicator accessors (MPI_Comm_test_inter, MPI_Comm_remote_size, MPI_ Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Dims_create.3in b/ompi/mpi/man/man3/MPI_Dims_create.3in index 632e98d6d99..37c1e691c96 100644 --- a/ompi/mpi/man/man3/MPI_Dims_create.3in +++ b/ompi/mpi/man/man3/MPI_Dims_create.3in @@ -46,18 +46,18 @@ Integer array of size ndims specifying the number of nodes in each dimension. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -For Cartesian topologies, the function MPI_Dims_create helps the user select a balanced distribution of processes per coordinate direction, depending on the number of processes in the group to be balanced and optional constraints that can be specified by the user. One use is to partition all the processes (the size of MPI_COMM_WORLD's group) into an n-dimensional topology. +For Cartesian topologies, the function MPI_Dims_create helps the user select a balanced distribution of processes per coordinate direction, depending on the number of processes in the group to be balanced and optional constraints that can be specified by the user. One use is to partition all the processes (the size of MPI_COMM_WORLD's group) into an n-dimensional topology. .sp -The entries in the array \fIdims\fP are set to describe a Cartesian grid with \fIndims\fP dimensions and a total of \fInnodes\fP nodes. The dimensions are set to be as close to each other as possible, using an appropriate divisibility algorithm. The caller may further constrain the operation of this routine by specifying elements of array dims. If dims[i] is set to a positive number, the routine will not modify the number of nodes in dimension i; only those entries where dims[i] = 0 are modified by the call. +The entries in the array \fIdims\fP are set to describe a Cartesian grid with \fIndims\fP dimensions and a total of \fInnodes\fP nodes. The dimensions are set to be as close to each other as possible, using an appropriate divisibility algorithm. The caller may further constrain the operation of this routine by specifying elements of array dims. If dims[i] is set to a positive number, the routine will not modify the number of nodes in dimension i; only those entries where dims[i] = 0 are modified by the call. .sp Negative input values of dims[i] are erroneous. An error will occur if -nnodes is not a multiple of ((pi) over (i, dims[i] != 0)) dims[i]. +nnodes is not a multiple of ((pi) over (i, dims[i] != 0)) dims[i]. .sp -For dims[i] set by the call, dims[i] will be ordered in nonincreasing order. Array dims is suitable for use as input to routine MPI_Cart_create. MPI_Dims_create is local. +For dims[i] set by the call, dims[i] will be ordered in nonincreasing order. Array dims is suitable for use as input to routine MPI_Cart_create. MPI_Dims_create is local. .sp \fBExample:\fP .nf @@ -77,5 +77,5 @@ call function call on return Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Errhandler_create.3in b/ompi/mpi/man/man3/MPI_Errhandler_create.3in index 29bbcb1de1c..5a7f1fd04cd 100644 --- a/ompi/mpi/man/man3/MPI_Errhandler_create.3in +++ b/ompi/mpi/man/man3/MPI_Errhandler_create.3in @@ -39,34 +39,34 @@ MPI error handler (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_create_errhandler instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_create_errhandler instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp -Registers the user routine function for use as an MPI exception handler. Returns in errhandler a handle to the registered exception handler. +Registers the user routine function for use as an MPI exception handler. Returns in errhandler a handle to the registered exception handler. .sp In the C language, the user routine should be a C function of type MPI_Handler_function, which is defined as .sp .nf - typedef void (MPI_Handler_function)(MPI_Comm *, int *, \&...); + typedef void (MPI_Handler_function)(MPI_Comm *, int *, \&...); .fi .sp The first argument is the communicator in use. The second is the error code -to be returned by the MPI routine that raised the error. If the routine would have returned MPI_ERR_IN_STATUS, it is the error code returned in the status for the request that caused the error handler to be invoked. The remaining arguments are stdargs arguments whose number and meaning is implementation-dependent. An implementation should clearly document these arguments. Addresses are used so that the handler may be written in Fortran. +to be returned by the MPI routine that raised the error. If the routine would have returned MPI_ERR_IN_STATUS, it is the error code returned in the status for the request that caused the error handler to be invoked. The remaining arguments are stdargs arguments whose number and meaning is implementation-dependent. An implementation should clearly document these arguments. Addresses are used so that the handler may be written in Fortran. .SH NOTE .ft R -The MPI-1 Standard states that an implementation may make the output value (errhandler) simply the address of the function. However, the action of MPI_Errhandler_ free makes this impossible, since it is required to set the value of the argument to MPI_ERRHANDLER_NULL. In addition, the actual error handler must remain until all communicators that use it are freed. +The MPI-1 Standard states that an implementation may make the output value (errhandler) simply the address of the function. However, the action of MPI_Errhandler_ free makes this impossible, since it is required to set the value of the argument to MPI_ERRHANDLER_NULL. In addition, the actual error handler must remain until all communicators that use it are freed. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .br diff --git a/ompi/mpi/man/man3/MPI_Errhandler_free.3in b/ompi/mpi/man/man3/MPI_Errhandler_free.3in index 4799c3b0a7b..96300c68730 100644 --- a/ompi/mpi/man/man3/MPI_Errhandler_free.3in +++ b/ompi/mpi/man/man3/MPI_Errhandler_free.3in @@ -19,13 +19,13 @@ int MPI_Errhandler_free(MPI_Errhandler *\fIerrhandler\fP) .nf INCLUDE 'mpif.h' MPI_ERRHANDLER_FREE(\fIERRHANDLER, IERROR\fP) - INTEGER \fIERRHANDLER, IERROR\fP + INTEGER \fIERRHANDLER, IERROR\fP .fi .SH C++ Syntax .nf #include -void Errhandler::Free() +void Errhandler::Free() .fi .SH INPUT PARAMETER @@ -38,17 +38,17 @@ MPI error handler (handle). Set to MPI_ERRHANDLER_NULL on exit. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Marks the error handler associated with errhandler for deallocation and sets errhandler to MPI_ERRHANDLER_NULL. The error handler will be deallocated after all communicators associated with it have been deallocated. +Marks the error handler associated with errhandler for deallocation and sets errhandler to MPI_ERRHANDLER_NULL. The error handler will be deallocated after all communicators associated with it have been deallocated. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Errhandler_get.3in b/ompi/mpi/man/man3/MPI_Errhandler_get.3in index 250c50cefcb..7448fdfc9cf 100644 --- a/ompi/mpi/man/man3/MPI_Errhandler_get.3in +++ b/ompi/mpi/man/man3/MPI_Errhandler_get.3in @@ -19,7 +19,7 @@ int MPI_Errhandler_get(MPI_Comm \fIcomm\fP, MPI_Errhandler\fI *errhandler\fP) .nf INCLUDE 'mpif.h' MPI_ERRHANDLER_GET(\fICOMM, ERRHANDLER, IERROR\fP) - INTEGER \fICOMM, ERRHANDLER, IERROR\fP + INTEGER \fICOMM, ERRHANDLER, IERROR\fP .fi @@ -37,24 +37,24 @@ MPI error handler currently associated with communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_get_errhandler instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_get_errhandler instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp Returns in errhandler (a handle to) the error handler that is currently associated with communicator comm. .sp -\fBExample:\fP A library function may register at its entry point the current error handler for a communicator, set its own private error handler for this communicator, and restore before exiting the previous error handler. +\fBExample:\fP A library function may register at its entry point the current error handler for a communicator, set its own private error handler for this communicator, and restore before exiting the previous error handler. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Errhandler_set.3in b/ompi/mpi/man/man3/MPI_Errhandler_set.3in index 6bab69e522c..e4c1d3d773a 100644 --- a/ompi/mpi/man/man3/MPI_Errhandler_set.3in +++ b/ompi/mpi/man/man3/MPI_Errhandler_set.3in @@ -35,21 +35,21 @@ New MPI error handler for communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_set_errhandler instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_set_errhandler instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp -Associates the new error handler errhandler with communicator comm at the calling process. Note that an error handler is always associated with the communicator. +Associates the new error handler errhandler with communicator comm at the calling process. Note that an error handler is always associated with the communicator. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Error_class.3in b/ompi/mpi/man/man3/MPI_Error_class.3in index a9e5d86ffa8..bd892fdea0e 100644 --- a/ompi/mpi/man/man3/MPI_Error_class.3in +++ b/ompi/mpi/man/man3/MPI_Error_class.3in @@ -19,7 +19,7 @@ int MPI_Error_class(int \fIerrorcode\fP, int\fI *errorclass\fP) .nf INCLUDE 'mpif.h' MPI_ERROR_CLASS(\fIERRORCODE, ERRORCLASS, IERROR\fP) - INTEGER \fIERRORCODE, ERRORCLASS, IERROR\fP + INTEGER \fIERRORCODE, ERRORCLASS, IERROR\fP .fi .SH C++ Syntax @@ -42,7 +42,7 @@ Error class associated with errorcode. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -52,7 +52,7 @@ The function MPI_Error_class maps each standard error code (error class) onto it Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Error_string.3in b/ompi/mpi/man/man3/MPI_Error_string.3in index 8b78e5a5225..db67d55b878 100644 --- a/ompi/mpi/man/man3/MPI_Error_string.3in +++ b/ompi/mpi/man/man3/MPI_Error_string.3in @@ -20,7 +20,7 @@ int MPI_Error_string(int \fIerrorcode\fP, char\fI *string\fP, int\fI *resultlen\ INCLUDE 'mpif.h' MPI_ERROR_STRING(\fIERRORCODE, STRING, RESULTLEN, IERROR\fP) INTEGER \fIERRORCODE, RESULTLEN, IERROR\fP - CHARACTER*(*) \fISTRING\fP + CHARACTER*(*) \fISTRING\fP .fi .SH C++ Syntax @@ -46,20 +46,20 @@ Length of string. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Returns the error string associated with an error code or class. The argument string must represent storage that is at least MPI_MAX_ERROR_STRING characters long. +Returns the error string associated with an error code or class. The argument string must represent storage that is at least MPI_MAX_ERROR_STRING characters long. .sp The number of characters actually written is returned in the output -argument, resultlen. +argument, resultlen. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Exscan.3in b/ompi/mpi/man/man3/MPI_Exscan.3in index 80816172582..c55e99ef71e 100644 --- a/ompi/mpi/man/man3/MPI_Exscan.3in +++ b/ompi/mpi/man/man3/MPI_Exscan.3in @@ -28,7 +28,7 @@ int MPI_Iexscan(const void *\fIsendbuf\fP, void *\fIrecvbuf\fP, int \fIcount\fP, INCLUDE 'mpif.h' MPI_EXSCAN(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP - INTEGER \fICOUNT, DATATYPE, OP, COMM, IERROR\fP + INTEGER \fICOUNT, DATATYPE, OP, COMM, IERROR\fP MPI_IEXSCAN(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, REQUEST, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP @@ -72,7 +72,7 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -132,7 +132,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_File_call_errhandler.3in b/ompi/mpi/man/man3/MPI_File_call_errhandler.3in index c3ddb674fe3..4b9e356a5c0 100644 --- a/ompi/mpi/man/man3/MPI_File_call_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_File_call_errhandler.3in @@ -45,7 +45,7 @@ MPI error code (integer). .ft R .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R diff --git a/ompi/mpi/man/man3/MPI_File_close.3in b/ompi/mpi/man/man3/MPI_File_close.3in index 37e70279e60..b4ca0411e2e 100644 --- a/ompi/mpi/man/man3/MPI_File_close.3in +++ b/ompi/mpi/man/man3/MPI_File_close.3in @@ -31,20 +31,20 @@ void MPI::File::Close() .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_close first synchronizes file state, then closes the file -associated with -.I fh. +associated with +.I fh. MPI_File_close is a collective routine. The user is responsible for ensuring that all outstanding requests associated with .I fh @@ -54,6 +54,6 @@ have completed before calling MPI_File_close. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_create_errhandler.3in b/ompi/mpi/man/man3/MPI_File_create_errhandler.3in index 46b81c3f3a2..f917634c6f4 100644 --- a/ompi/mpi/man/man3/MPI_File_create_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_File_create_errhandler.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_File_create_errhandler 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_create_errhandler \fP \- Creates an MPI-style error handler that can be attached to a file. +\fBMPI_File_create_errhandler \fP \- Creates an MPI-style error handler that can be attached to a file. .SH SYNTAX .ft R @@ -54,21 +54,21 @@ MPI error handler (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Registers the user routine \fIfunction\fP for use as an MPI exception handler. Returns in errhandler a handle to the registered exception handler. +Registers the user routine \fIfunction\fP for use as an MPI exception handler. Returns in errhandler a handle to the registered exception handler. .sp In the C language, the user routine \fIfunction\fP should be a C function of type MPI_File_errhandler_function, which is defined as .sp .nf - typedef void (MPI_File_errhandler_function)(MPI_File *, int *, - \&...); + typedef void (MPI_File_errhandler_function)(MPI_File *, int *, + \&...); .fi .sp The first argument to \fIfunction\fP is the file in use. The second is the error code -to be returned by the MPI routine that raised the error. +to be returned by the MPI routine that raised the error. .sp In the Fortran language, the user routine should be of the form: .sp @@ -80,7 +80,7 @@ In the Fortran language, the user routine should be of the form: In C++, the user routine \fIfunction\fP should be of the form: .sp .nf - typedef void MPI::File::Errhandler_function(MPI::File &, int *, + typedef void MPI::File::Errhandler_function(MPI::File &, int *, ...); .fi .sp @@ -89,6 +89,6 @@ In C++, the user routine \fIfunction\fP should be of the form: Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_delete.3in b/ompi/mpi/man/man3/MPI_File_delete.3in index 595d1d9794c..5169f7e66b6 100644 --- a/ompi/mpi/man/man3/MPI_File_delete.3in +++ b/ompi/mpi/man/man3/MPI_File_delete.3in @@ -27,7 +27,7 @@ C Syntax .SH C++ Syntax .nf #include -static void MPI::File::Delete(const char* \fIfilename\fP, const +static void MPI::File::Delete(const char* \fIfilename\fP, const MPI::Info& \fIinfo\fP) .fi @@ -38,17 +38,17 @@ filename Name of file to delete (string). .TP 1i info -Info object (handle). +Info object (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_delete deletes the file identified by the file name +MPI_File_delete deletes the file identified by the file name \fIfilename\fP, provided it is not currently open by any process. It is an error to delete the file with MPI_File_delete if some process has it open, but MPI_File_delete does not check this. If the file does not exist, MPI_File_delete returns an error in the class MPI_ERR_NO_SUCH_FILE. .sp @@ -56,6 +56,6 @@ MPI_File_delete deletes the file identified by the file name Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_amode.3in b/ompi/mpi/man/man3/MPI_File_get_amode.3in index a75bc401faa..dfa82d4a792 100644 --- a/ompi/mpi/man/man3/MPI_File_get_amode.3in +++ b/ompi/mpi/man/man3/MPI_File_get_amode.3in @@ -31,7 +31,7 @@ int MPI::File::Get_amode() const .SH INPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -41,19 +41,19 @@ amode File access mode used to open the file (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_amode returns, in +MPI_File_get_amode returns, in .I amode, -the access mode associated with the open file +the access mode associated with the open file .I fh. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_atomicity.3in b/ompi/mpi/man/man3/MPI_File_get_atomicity.3in index 605c70c4692..85afe966d74 100644 --- a/ompi/mpi/man/man3/MPI_File_get_atomicity.3in +++ b/ompi/mpi/man/man3/MPI_File_get_atomicity.3in @@ -19,7 +19,7 @@ C Syntax .nf INCLUDE 'mpif.h' MPI_FILE_GET_ATOMICITY(\fIFH\fP,\fI FLAG\fP,\fI IERROR\fP) - INTEGER \FIFH, IERROR\FP + INTEGER \FIFH, IERROR\FP LOGICAL \FIFLAG\FP .fi @@ -42,23 +42,23 @@ flag true if atomic mode is enabled, false if nonatomic mode is enabled (boolean). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_get_atomicity returns the current consistency semantics for data access operations on the set of file handles created by one -collective MPI_File_open. If \fIflag\fP is +collective MPI_File_open. If \fIflag\fP is .I true, -atomic mode is currently enabled; if -.I flag -is +atomic mode is currently enabled; if +.I flag +is .I false, -nonatomic mode is currently enabled. +nonatomic mode is currently enabled. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_byte_offset.3in b/ompi/mpi/man/man3/MPI_File_get_byte_offset.3in index 1e87940934c..ff92b4898f4 100644 --- a/ompi/mpi/man/man3/MPI_File_get_byte_offset.3in +++ b/ompi/mpi/man/man3/MPI_File_get_byte_offset.3in @@ -27,14 +27,14 @@ C Syntax .SH C++ Syntax .nf #include -MPI::Offset MPI::File::Get_byte_offset(const MPI::Offset \fIdisp\fP) +MPI::Offset MPI::File::Get_byte_offset(const MPI::Offset \fIdisp\fP) const .fi .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .ft R .TP 1i @@ -45,14 +45,14 @@ Offset (integer). .ft R .TP 1i disp -Absolute byte position of offset (integer). +Absolute byte position of offset (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_byte_offset converts an offset specified for the current view to its corresponding displacement value, or absolute byte position, from the beginning of the file. The absolute byte position of \fIoffset\fP relative to the current view of \fIfh\fP is returned in \fIdisp\fP. +MPI_File_get_byte_offset converts an offset specified for the current view to its corresponding displacement value, or absolute byte position, from the beginning of the file. The absolute byte position of \fIoffset\fP relative to the current view of \fIfh\fP is returned in \fIdisp\fP. .SH FORTRAN 77 NOTES .ft R @@ -73,6 +73,6 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_errhandler.3in b/ompi/mpi/man/man3/MPI_File_get_errhandler.3in index 61a592887db..482c0a617cd 100644 --- a/ompi/mpi/man/man3/MPI_File_get_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_File_get_errhandler.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_File_get_errhandler 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_get_errhandler \fP \- Gets the error handler for a file. +\fBMPI_File_get_errhandler \fP \- Gets the error handler for a file. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_File_get_errhandler(MPI_File \fIfile\fP, MPI_Errhandler\fI +int MPI_File_get_errhandler(MPI_File \fIfile\fP, MPI_Errhandler\fI *errhandler\fP) .fi @@ -20,7 +20,7 @@ int MPI_File_get_errhandler(MPI_File \fIfile\fP, MPI_Errhandler\fI .nf INCLUDE 'mpif.h' MPI_FILE_GET_ERRHANDLER(\fIFILE, ERRHANDLER, IERROR\fP) - INTEGER \fIFILE, ERRHANDLER, IERROR\fP + INTEGER \fIFILE, ERRHANDLER, IERROR\fP .fi .SH C++ Syntax @@ -33,7 +33,7 @@ MPI::Errhandler MPI::File::Get_errhandler() const .ft R .TP 1i file -File (handle). +File (handle). .SH OUTPUT PARAMETERS .ft R @@ -43,15 +43,15 @@ MPI error handler currently associated with file (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Returns in \fIerrhandler\fP (a handle to) the error handler that is currently associated with file \fIfile\fP. +Returns in \fIerrhandler\fP (a handle to) the error handler that is currently associated with file \fIfile\fP. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_group.3in b/ompi/mpi/man/man3/MPI_File_get_group.3in index 5335f3f1a6b..bdbd2349c30 100644 --- a/ompi/mpi/man/man3/MPI_File_get_group.3in +++ b/ompi/mpi/man/man3/MPI_File_get_group.3in @@ -31,7 +31,7 @@ MPI::Group MPI::File::Get_group() const .SH INPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -40,22 +40,22 @@ group Group that opened the file (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_get_group returns a duplicate of the group of the communicator -used to open the file associated with +used to open the file associated with .I fh. -The group is returned in +The group is returned in .I group. -The user is responsible for freeing -.I group, -using MPI_Group_free. +The user is responsible for freeing +.I group, +using MPI_Group_free. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_info.3in b/ompi/mpi/man/man3/MPI_File_get_info.3in index 8946709d4d3..5effc767968 100644 --- a/ompi/mpi/man/man3/MPI_File_get_info.3in +++ b/ompi/mpi/man/man3/MPI_File_get_info.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_File_get_info 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_get_info\fP \- Returns a new info object containing values for current hints associated with a file. +\fBMPI_File_get_info\fP \- Returns a new info object containing values for current hints associated with a file. .SH SYNTAX @@ -32,7 +32,7 @@ MPI::Info MPI::File::Get_info() const .SH INPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -42,26 +42,26 @@ info_used New info object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_info returns a new info object containing all the hints that the system currently associates with the file \fIfh\fP. The current setting of all hints actually used by the system related to this open file is returned in \fIinfo_used\fP. The user is responsible for freeing \fIinfo_used\fP via MPI_Info_free. +MPI_File_get_info returns a new info object containing all the hints that the system currently associates with the file \fIfh\fP. The current setting of all hints actually used by the system related to this open file is returned in \fIinfo_used\fP. The user is responsible for freeing \fIinfo_used\fP via MPI_Info_free. -Note that the set of hints returned in \fIinfo_used\fP may be greater or smaller than the set of hints passed in to MPI_File_open, MPI_File_set_view, and MPI_File_set_info, as the system may not recognize some hints set by the user, and may automatically set other hints that the user has not requested to be set. See the HINTS section for a list of hints that can be set. +Note that the set of hints returned in \fIinfo_used\fP may be greater or smaller than the set of hints passed in to MPI_File_open, MPI_File_set_view, and MPI_File_set_info, as the system may not recognize some hints set by the user, and may automatically set other hints that the user has not requested to be set. See the HINTS section for a list of hints that can be set. .SH HINTS .ft R -The following hints can be used as values for the \fIinfo_used\fP argument. +The following hints can be used as values for the \fIinfo_used\fP argument. .sp SETTABLE HINTS: .sp -- shared_file_timeout: Amount of time (in seconds) to wait for access to the +- shared_file_timeout: Amount of time (in seconds) to wait for access to the shared file pointer before exiting with MPI_ERR_TIMEDOUT. .sp -- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or +- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or write lock on a contiguous chunk of a UNIX file before exiting with MPI_ERR_TIMEDOUT. -.sp +.sp - noncoll_read_bufsize: Maximum size of the buffer used by MPI I/O to satisfy read requests in the noncollective data-access routines. (See NOTE, below.) @@ -85,13 +85,13 @@ I/O routines can bind an extra thread to an LWP. .sp - mpiio_coll_contiguous: (boolean) controls whether subsequent collective data accesses will request collectively contiguous regions of the file. .sp -NON-SETTABLE HINTS: +NON-SETTABLE HINTS: .sp -- filename: Access this hint to get the name of the file. +- filename: Access this hint to get the name of the file. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_position.3in b/ompi/mpi/man/man3/MPI_File_get_position.3in index c2148477fc4..897495c9cbe 100644 --- a/ompi/mpi/man/man3/MPI_File_get_position.3in +++ b/ompi/mpi/man/man3/MPI_File_get_position.3in @@ -32,7 +32,7 @@ MPI::Offset MPI::File::Get_position() const .SH INPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -42,15 +42,15 @@ offset Offset of the individual file pointer (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_position returns, in +MPI_File_get_position returns, in .I offset, -the current position of the individual file pointer in -.I etype -units relative to the current displacement and file type. +the current position of the individual file pointer in +.I etype +units relative to the current displacement and file type. .SH FORTRAN 77 NOTES .ft R @@ -69,5 +69,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_position_shared.3in b/ompi/mpi/man/man3/MPI_File_get_position_shared.3in index afc927e872a..400d42fbaf5 100644 --- a/ompi/mpi/man/man3/MPI_File_get_position_shared.3in +++ b/ompi/mpi/man/man3/MPI_File_get_position_shared.3in @@ -19,7 +19,7 @@ C Syntax .nf INCLUDE 'mpif.h' MPI_FILE_GET_POSITION_SHARED(\fIFH\fP,\fI OFFSET\fP,\fI IERROR\fP) - INTEGER \fIFH, IERROR\fP + INTEGER \fIFH, IERROR\fP INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP .fi @@ -32,7 +32,7 @@ MPI::Offset MPI::File::Get_position_shared() const .SH INPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -42,15 +42,15 @@ offset Offset of the shared file pointer (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_position_shared returns, in +MPI_File_get_position_shared returns, in .I offset, -the current position of the shared file pointer in -.I etype -units relative to the current displacement and file type. +the current position of the shared file pointer in +.I etype +units relative to the current displacement and file type. .SH FORTRAN 77 NOTES .ft R @@ -69,5 +69,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_size.3in b/ompi/mpi/man/man3/MPI_File_get_size.3in index 52c39b11cd9..363cc178e0d 100644 --- a/ompi/mpi/man/man3/MPI_File_get_size.3in +++ b/ompi/mpi/man/man3/MPI_File_get_size.3in @@ -32,7 +32,7 @@ MPI::Offset MPI::File::Get_size() const .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .TP 1i size @@ -42,14 +42,14 @@ Size of the file in bytes (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_size returns, in +MPI_File_get_size returns, in .I size -, the current size in bytes of the file associated with the file handle -\fIfh\fP. Note that the file size returned by Solaris may not represent the number of bytes physically allocated for the file in those cases where all bytes in this file have not been written at least once. +, the current size in bytes of the file associated with the file handle +\fIfh\fP. Note that the file size returned by Solaris may not represent the number of bytes physically allocated for the file in those cases where all bytes in this file have not been written at least once. .SH FORTRAN 77 NOTES .ft R @@ -68,7 +68,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .br diff --git a/ompi/mpi/man/man3/MPI_File_get_type_extent.3in b/ompi/mpi/man/man3/MPI_File_get_type_extent.3in index 5b2375b9513..6ef1c2ecd45 100644 --- a/ompi/mpi/man/man3/MPI_File_get_type_extent.3in +++ b/ompi/mpi/man/man3/MPI_File_get_type_extent.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_File_get_type_extent 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_get_type_extent\fP \- Returns the extent of the data type in a file. +\fBMPI_File_get_type_extent\fP \- Returns the extent of the data type in a file. .SH SYNTAX .ft R .nf C Syntax #include - int MPI_File_get_type_extent(MPI_File \fIfh\fP, MPI_Datatype + int MPI_File_get_type_extent(MPI_File \fIfh\fP, MPI_Datatype \fIdatatype\fP, MPI_Aint \fI*extent\fP) .fi @@ -21,13 +21,13 @@ C Syntax INCLUDE 'mpif.h' MPI_FILE_GET_TYPE_EXTENT(\fIFH\fP, \fIDATATYPE\fP, \fIEXTENT\fP, \fI IERROR\fP) INTEGER \fIFH, DATATYPE, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTENT\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTENT\fP .fi .SH C++ Syntax .nf #include -MPI::Aint MPI::File::Get_type_extent(const MPI::Datatype& +MPI::Aint MPI::File::Get_type_extent(const MPI::Datatype& \fIdatatype\fP) const .fi @@ -46,14 +46,14 @@ Data type (handle). .ft R .TP 1i extent -Data type extent (integer). +Data type extent (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_get_type_extent can be used to calculate \fIextent\fP for \fIdatatype\fP in the file. The extent is the same for all processes accessing the file associated with \fIfh\fP. If the current view uses a user-defined data representation, MPI_File_get_type_extent uses the \fIdtype_file_extent_fn\fP callback to calculate the extent. +MPI_File_get_type_extent can be used to calculate \fIextent\fP for \fIdatatype\fP in the file. The extent is the same for all processes accessing the file associated with \fIfh\fP. If the current view uses a user-defined data representation, MPI_File_get_type_extent uses the \fIdtype_file_extent_fn\fP callback to calculate the extent. .SH FORTRAN 77 NOTES .ft R @@ -70,11 +70,11 @@ and gives the length of the declared integer in bytes. .SH NOTES .ft R -If the file data representation is other than "native," care must be taken in constructing etypes and file types. Any of the data-type constructor functions may be used; however, for those functions that accept displacements in bytes, the displacements must be specified in terms of their values in the file for the file data representation being used. MPI will interpret these byte displacements as is; no scaling will be done. The function MPI_File_get_type_extent can be used to calculate the extents of data types in the file. For etypes and file types that are portable data types, MPI will scale any displacements in the data types to match the file data representation. Data types passed as arguments to read/write routines specify the data layout in memory; therefore, they must always be constructed using displacements corresponding to displacements in memory. +If the file data representation is other than "native," care must be taken in constructing etypes and file types. Any of the data-type constructor functions may be used; however, for those functions that accept displacements in bytes, the displacements must be specified in terms of their values in the file for the file data representation being used. MPI will interpret these byte displacements as is; no scaling will be done. The function MPI_File_get_type_extent can be used to calculate the extents of data types in the file. For etypes and file types that are portable data types, MPI will scale any displacements in the data types to match the file data representation. Data types passed as arguments to read/write routines specify the data layout in memory; therefore, they must always be constructed using displacements corresponding to displacements in memory. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_get_view.3in b/ompi/mpi/man/man3/MPI_File_get_view.3in index dccbd7a77c3..c5552116dda 100644 --- a/ompi/mpi/man/man3/MPI_File_get_view.3in +++ b/ompi/mpi/man/man3/MPI_File_get_view.3in @@ -44,29 +44,29 @@ File handle (handle). .SH OUTPUT PARAMETERS .ft R .TP 1i -disp +disp Displacement (integer). .TP 1i -etype -Elementary data type (handle). +etype +Elementary data type (handle). .TP 1i filetype File type (handle). See Restrictions, below. .TP 1i datarep -Data representation (string). +Data representation (string). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The MPI_File_get_view routine returns the process's view of the data in the file. The current values of the displacement, etype, and -filetype are returned in +filetype are returned in .I disp, .I etype, -and +and .I filetype, respectively. .sp @@ -89,5 +89,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_iread.3in b/ompi/mpi/man/man3/MPI_File_iread.3in index 504e746ee8c..c4f67064841 100644 --- a/ompi/mpi/man/man3/MPI_File_iread.3in +++ b/ompi/mpi/man/man3/MPI_File_iread.3in @@ -12,7 +12,7 @@ .nf C Syntax #include - int MPI_File_iread(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, + int MPI_File_iread(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) .fi @@ -34,7 +34,7 @@ MPI::Request MPI::File::Iread(void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -58,29 +58,29 @@ request Request object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_iread is a nonblocking version of MPI_File_read. It attempts to read from the file associated with +MPI_File_iread is a nonblocking version of MPI_File_read. It attempts to read from the file associated with .I fh -at the current individual file pointer position maintained by the system in which a total number of +at the current individual file pointer position maintained by the system in which a total number of .I count -data items having +data items having .I datatype -type are read into the user's buffer +type are read into the user's buffer .I buf. The data is taken out of those parts of the file specified by the current view. MPI_File_iread stores the -number of data-type elements actually read in +number of data-type elements actually read in .I status. -All other fields of +All other fields of .I status -are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_iread_at.3in b/ompi/mpi/man/man3/MPI_File_iread_at.3in index ab00512e49e..b39b4ef2367 100644 --- a/ompi/mpi/man/man3/MPI_File_iread_at.3in +++ b/ompi/mpi/man/man3/MPI_File_iread_at.3in @@ -5,15 +5,15 @@ .\" $COPYRIGHT$ .TH MPI_File_iread_at 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_iread_at\fP \- Reads a file at an explicitly specified offset (nonblocking, noncollective). +\fBMPI_File_iread_at\fP \- Reads a file at an explicitly specified offset (nonblocking, noncollective). .SH SYNTAX .ft R .nf C Syntax #include - int MPI_File_iread_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, - void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + int MPI_File_iread_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) .fi @@ -41,7 +41,7 @@ File handle (handle). .ft R .TP 1i offset -File offset (integer). +File offset (integer). .ft R .TP 1i count @@ -49,7 +49,7 @@ Number of elements in the buffer (integer). .ft R .TP 1i datatype -Data type of each buffer element (handle). +Data type of each buffer element (handle). .SH OUTPUT PARAMETERS .ft R @@ -62,32 +62,32 @@ request Request object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_iread_at is the nonblocking version of MPI_File_read_at. -MPI_File_iread_at is a nonblocking routine that attempts to read from the file associated with +MPI_File_iread_at is a nonblocking routine that attempts to read from the file associated with .I fh -at the +at the .I offset -position a total number of +position a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. -The +The .I offset is in etype units relative to the current view. That is, holes are not counted when locating an offset. The data is taken out of those parts of the file specified by the current view. MPI_File_iread_at stores the -number of +number of .I datatype -elements actually read in +elements actually read in .I status. -All other fields of +All other fields of .I status are undefined. @@ -108,5 +108,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_iread_shared.3in b/ompi/mpi/man/man3/MPI_File_iread_shared.3in index 37410e28fc0..01af358e3a1 100644 --- a/ompi/mpi/man/man3/MPI_File_iread_shared.3in +++ b/ompi/mpi/man/man3/MPI_File_iread_shared.3in @@ -12,7 +12,7 @@ .nf C Syntax #include - int MPI_File_iread_shared(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, + int MPI_File_iread_shared(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) .fi @@ -34,7 +34,7 @@ MPI::Request MPI::File::Iread_shared(void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -58,15 +58,15 @@ request Request object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_iread_shared is a nonblocking version of the MPI_File_read_shared interface. It uses the shared file pointer to read files. The order of serialization among the processors is not deterministic for this noncollective routine, so you need to use other methods of synchronization to impose a particular order among processors. +MPI_File_iread_shared is a nonblocking version of the MPI_File_read_shared interface. It uses the shared file pointer to read files. The order of serialization among the processors is not deterministic for this noncollective routine, so you need to use other methods of synchronization to impose a particular order among processors. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_iwrite.3in b/ompi/mpi/man/man3/MPI_File_iwrite.3in index d0df7ea019f..db2ff9507f0 100644 --- a/ompi/mpi/man/man3/MPI_File_iwrite.3in +++ b/ompi/mpi/man/man3/MPI_File_iwrite.3in @@ -35,7 +35,7 @@ MPI::Request MPI::File::Iwrite(const void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -56,36 +56,36 @@ Data type of each buffer element (handle). .ft R .TP 1i request -Request object (handle). +Request object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_iwrite is a nonblocking version of the MPI_File_write interface. It attempts to write into the file associated with +MPI_File_iwrite is a nonblocking version of the MPI_File_write interface. It attempts to write into the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of -.I count +(at the current individual file pointer position maintained by the system) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. The data is written into those parts of the file specified by the current view. MPI_File_iwrite stores the -number of -.I datatype -elements actually written in -.I status. -All other fields of -.I status +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_at.3in b/ompi/mpi/man/man3/MPI_File_iwrite_at.3in index d4fdac55474..48519b3ae90 100644 --- a/ompi/mpi/man/man3/MPI_File_iwrite_at.3in +++ b/ompi/mpi/man/man3/MPI_File_iwrite_at.3in @@ -13,7 +13,7 @@ .nf C Syntax #include - int MPI_File_iwrite_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + int MPI_File_iwrite_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, const void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) .fi @@ -36,7 +36,7 @@ MPI::Request MPI::File::Iwrite_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\f .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -64,34 +64,34 @@ request Request object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_iwrite_at is a nonblocking version of MPI_File_write_at. It attempts to write into the file associated with +MPI_File_iwrite_at is a nonblocking version of MPI_File_write_at. It attempts to write into the file associated with .I fh -(at the -.I offset -position) a total number of -.I count +(at the +.I offset +position) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. -The offset is in +The offset is in .I etype units relative to the current view. That is, holes are not counted when locating an offset. The data is written into those parts of the file specified by the current view. MPI_File_iwrite_at stores the -number of -.I datatype -elements actually written in -.I status. -All other fields of -.I status -are undefined. The request structure can be passed to MPI_Wait or MPI_Test, which will return a status with the number of bytes actually accessed. +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status +are undefined. The request structure can be passed to MPI_Wait or MPI_Test, which will return a status with the number of bytes actually accessed. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. .SH FORTRAN 77 NOTES .ft R @@ -110,5 +110,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_shared.3in b/ompi/mpi/man/man3/MPI_File_iwrite_shared.3in index 053fd5e8531..59a48d3acb6 100644 --- a/ompi/mpi/man/man3/MPI_File_iwrite_shared.3in +++ b/ompi/mpi/man/man3/MPI_File_iwrite_shared.3in @@ -37,7 +37,7 @@ MPI::Request MPI::File::Iwrite_shared(const void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -60,15 +60,15 @@ request Request object (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_iwrite_shared is a nonblocking routine that uses the shared file pointer to write files. The order of serialization is not deterministic for this noncollective routine, so you need to use other methods of synchronization to impose a particular order. +MPI_File_iwrite_shared is a nonblocking routine that uses the shared file pointer to write files. The order of serialization is not deterministic for this noncollective routine, so you need to use other methods of synchronization to impose a particular order. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_open.3in b/ompi/mpi/man/man3/MPI_File_open.3in index 682e8b37e02..de6189fbd8b 100644 --- a/ompi/mpi/man/man3/MPI_File_open.3in +++ b/ompi/mpi/man/man3/MPI_File_open.3in @@ -13,7 +13,7 @@ C Syntax #include int MPI_File_open(MPI_Comm \fIcomm\fP, const char \fI*filename\fP, - int \fIamode\fP, MPI_Info \fIinfo\fP, + int \fIamode\fP, MPI_Info \fIinfo\fP, MPI_File \fI*fh\fP) .fi @@ -35,33 +35,33 @@ static MPI::File MPI::File::Open(const MPI::Intracomm& \fIcomm\fP, .SH INPUT PARAMETERS .ft R .TP 1i -comm +comm Communicator (handle). .TP 1i filename -Name of file to open (string). +Name of file to open (string). .TP 1i -amode +amode File access mode (integer). .TP 1i info -Info object (handle). +Info object (handle). .SH OUTPUT PARAMETERS .ft R .TP 1i -fh +fh New file handle (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_open opens the file identified by the filename +MPI_File_open opens the file identified by the filename .I filename -on all processes in the +on all processes in the .I comm communicator group. MPI_File_open is a collective routine; all processes must provide the same value for @@ -69,51 +69,51 @@ must provide the same value for and all processes must provide filenames that reference the same file and which are textually identical. A process can open a file independently of other processes by using the MPI_COMM_SELF -communicator. The file handle returned, +communicator. The file handle returned, .I fh, can be subsequently used to access the file until the file is closed using MPI_File_close. Before calling MPI_Finalize, the user is required to close (via MPI_File_close) all files that were opened with MPI_File_open. Note -that the communicator -.I comm +that the communicator +.I comm is unaffected by MPI_File_open and continues to be usable in all MPI -routines. Furthermore, use of -.I comm +routines. Furthermore, use of +.I comm will not interfere with I/O behavior. .sp -Initially, all processes view the file as a linear byte stream; that is, the -.I etype -and +Initially, all processes view the file as a linear byte stream; that is, the +.I etype +and .I filetype are both MPI_BYTE. The file view can be changed via the MPI_File_set_view routine. .sp The following access modes are supported (specified in amode, in a bit-vector OR in one of the following integer constants): .TP .5i - o + o MPI_MODE_APPEND .TP .5i - o + o MPI_MODE_CREATE -- Create the file if it does not exist. .TP .5i - o + o MPI_MODE_DELETE_ON_CLOSE .TP .5i - o -MPI_MODE_EXCL -- Error creating a file that already exists. + o +MPI_MODE_EXCL -- Error creating a file that already exists. .TP .5i - o + o MPI_MODE_RDONLY -- Read only. .TP .5i - o + o MPI_MODE_RDWR -- Reading and writing. .TP .5i - o + o MPI_MODE_SEQUENTIAL .TP .5i - o + o MPI_MODE_WRONLY -- Write only. .TP .5i - o + o MPI_MODE_UNIQUE_OPEN .RE .sp @@ -123,26 +123,26 @@ specify MPI_MODE_CREATE in conjunction with MPI_MODE_RDONLY. Errors related to the access mode are raised in the class MPI_ERR_AMODE. .sp On single-node clusters, files are opened by default using nonatomic mode file consistency -semantics. The more stringent atomic-mode consistency semantics, required for atomicity of overlapping accesses, are the default when processors in a communicator group reside on more than one node. +semantics. The more stringent atomic-mode consistency semantics, required for atomicity of overlapping accesses, are the default when processors in a communicator group reside on more than one node. This setting can be changed using MPI_File_set_atomicity. .sp -The MPI_File_open interface allows the user to pass information via the \fIinfo\fP argument. It can be set to MPI_INFO_NULL. See the HINTS section for a list of hints that can be set. +The MPI_File_open interface allows the user to pass information via the \fIinfo\fP argument. It can be set to MPI_INFO_NULL. See the HINTS section for a list of hints that can be set. .SH HINTS .ft R -The following hints can be used as values for the \fIinfo\fP argument. +The following hints can be used as values for the \fIinfo\fP argument. .sp SETTABLE HINTS: .sp - MPI_INFO_NULL .sp -- shared_file_timeout: Amount of time (in seconds) to wait for access to the +- shared_file_timeout: Amount of time (in seconds) to wait for access to the shared file pointer before exiting with MPI_ERR_TIMEDOUT. .sp -- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or +- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or write lock on a contiguous chunk of a UNIX file before exiting with MPI_ERR_TIMEDOUT. -.sp +.sp - noncoll_read_bufsize: Maximum size of the buffer used by MPI I/O to satisfy multiple noncontiguous read requests in the noncollective data-access routines. (See NOTE, below.) @@ -166,13 +166,13 @@ I/O routines can bind an extra thread to an LWP. .sp - mpiio_coll_contiguous: (boolean) controls whether subsequent collective data accesses will request collectively contiguous regions of the file. .sp -NON-SETTABLE HINTS: +NON-SETTABLE HINTS: .sp -- filename: Access this hint to get the name of the file. +- filename: Access this hint to get the name of the file. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_preallocate.3in b/ompi/mpi/man/man3/MPI_File_preallocate.3in index 5ea0f7b475a..afa235d3d5b 100644 --- a/ompi/mpi/man/man3/MPI_File_preallocate.3in +++ b/ompi/mpi/man/man3/MPI_File_preallocate.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_File_preallocate 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_preallocate\fP \- Preallocates a specified amount of storage space at the beginning of a file (collective). +\fBMPI_File_preallocate\fP \- Preallocates a specified amount of storage space at the beginning of a file (collective). .SH SYNTAX .ft R @@ -32,26 +32,26 @@ void MPI::File::Preallocate(MPI::Offset \fIsize\fP) .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETER .ft R .TP 1i size -Size to preallocate file, in bytes (integer). +Size to preallocate file, in bytes (integer). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_preallocate ensures that storage space is allocated for the first \fIsize\fP bytes of the file associated with \fIfh\fP. MPI_File_preallocate can be a very time-consuming operation. +MPI_File_preallocate ensures that storage space is allocated for the first \fIsize\fP bytes of the file associated with \fIfh\fP. MPI_File_preallocate can be a very time-consuming operation. -MPI_File_preallocate is collective; all processes in the group must pass identical values for \fIsize\fP. Regions of the file that have previously been written are unaffected. For newly allocated regions of the file, MPI_File_preallocate has the same effect as writing undefined data. If size is larger than the current file size, the file size increases to \fIsize\fP. If \fIsize\fP is less than or equal to the current file size, the file size is unchanged. +MPI_File_preallocate is collective; all processes in the group must pass identical values for \fIsize\fP. Regions of the file that have previously been written are unaffected. For newly allocated regions of the file, MPI_File_preallocate has the same effect as writing undefined data. If size is larger than the current file size, the file size increases to \fIsize\fP. If \fIsize\fP is less than or equal to the current file size, the file size is unchanged. The treatment of file pointers, pending nonblocking accesses, and file consistency is the same as with MPI_File_set_size. If MPI_MODE_SEQUENTIAL mode was specified when the file was opened, it is erroneous to call this routine. @@ -70,13 +70,13 @@ and gives the length of the declared integer in bytes. .SH NOTES .ft R -When using the collective routine MPI_File_set_size on a UNIX file, if the size that is set is smaller than the current file size, the file is truncated at the position defined by size. If the size is set to be larger than the current file size, the file size becomes the set size. When the file size is increased this way with MPI_File_set_size, new regions are created in the file with displacements between the old file size and the larger, newly set file size. +When using the collective routine MPI_File_set_size on a UNIX file, if the size that is set is smaller than the current file size, the file is truncated at the position defined by size. If the size is set to be larger than the current file size, the file size becomes the set size. When the file size is increased this way with MPI_File_set_size, new regions are created in the file with displacements between the old file size and the larger, newly set file size. .sp -Sun MPI I/O does not necessarily allocate file space for such new regions. You may reserve file space either by using MPI_File_preallocate or by performing a read or write to certain bytes. +Sun MPI I/O does not necessarily allocate file space for such new regions. You may reserve file space either by using MPI_File_preallocate or by performing a read or write to certain bytes. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read.3in b/ompi/mpi/man/man3/MPI_File_read.3in index 72021ec42cf..b6e2aa2f061 100644 --- a/ompi/mpi/man/man3/MPI_File_read.3in +++ b/ompi/mpi/man/man3/MPI_File_read.3in @@ -12,27 +12,27 @@ .nf C Syntax #include - int MPI_File_read(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' - MPI_FILE_READ(\fI FH\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_READ(\fI FH\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fIIERROR\fP) BUF(*) - INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), + INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR .fi .SH C++ Syntax .nf #include -void MPI::File::Read(void* \fIbuf\fP, int \fIcount\fP, +void MPI::File::Read(void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) -void MPI::File::Read(void* \fIbuf\fP, int \fIcount\fP, +void MPI::File::Read(void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) .fi @@ -58,31 +58,31 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read attempts to read from the file associated with +MPI_File_read attempts to read from the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of +(at the current individual file pointer position maintained by the system) a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. The data is taken out of those parts of the file specified by the current view. MPI_File_read stores the -number of data-type elements actually read in +number of data-type elements actually read in .I status. -All other fields of +All other fields of .I status -are undefined. +are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_all.3in b/ompi/mpi/man/man3/MPI_File_read_all.3in index 12479e9ae9d..83ae7f80a7c 100644 --- a/ompi/mpi/man/man3/MPI_File_read_all.3in +++ b/ompi/mpi/man/man3/MPI_File_read_all.3in @@ -12,17 +12,17 @@ .nf C Syntax #include - int MPI_File_read_all(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read_all(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' - MPI_FILE_READ_ALL(\fI FH\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_READ_ALL(\fI FH\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) BUF(*) - INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), + INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR .fi @@ -58,32 +58,32 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_all is a collective routine that attempts to read from the file associated with +MPI_File_read_all is a collective routine that attempts to read from the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of +(at the current individual file pointer position maintained by the system) a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. The data is taken out of those parts of the file specified by the current view. MPI_File_read_all stores the -number of data-type elements actually read in +number of data-type elements actually read in .I status. -All other fields of +All other fields of .I status -are undefined. +are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_all_begin.3in b/ompi/mpi/man/man3/MPI_File_read_all_begin.3in index 184dec1bac6..33621499010 100644 --- a/ompi/mpi/man/man3/MPI_File_read_all_begin.3in +++ b/ompi/mpi/man/man3/MPI_File_read_all_begin.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_File_read_all_begin 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_read_all_begin\fP \- Reads a file starting at the locations specified by individual file pointers; beginning part of a split collective routine (nonblocking). +\fBMPI_File_read_all_begin\fP \- Reads a file starting at the locations specified by individual file pointers; beginning part of a split collective routine (nonblocking). .SH SYNTAX .ft R .nf C Syntax #include - int MPI_File_read_all_begin(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read_all_begin(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP) .fi @@ -34,7 +34,7 @@ void MPI::File::Read_all_begin(void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -54,28 +54,28 @@ buf Initial address of buffer (choice). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_all_begin is the beginning part of a split collective operation that attempts to read from the file associated with +MPI_File_read_all_begin is the beginning part of a split collective operation that attempts to read from the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of +(at the current individual file pointer position maintained by the system) a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. The data is taken out of those parts of the -file specified by the current view. +file specified by the current view. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_all_end.3in b/ompi/mpi/man/man3/MPI_File_read_all_end.3in index 21857c96e2f..3c27f1ffa99 100644 --- a/ompi/mpi/man/man3/MPI_File_read_all_end.3in +++ b/ompi/mpi/man/man3/MPI_File_read_all_end.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_File_read_all_end 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_read_all_end\fP \- Reads a file starting at the locations specified by individual file pointers; ending part of a split collective routine (blocking). +\fBMPI_File_read_all_end\fP \- Reads a file starting at the locations specified by individual file pointers; ending part of a split collective routine (blocking). .SH SYNTAX .ft R .nf C Syntax #include - int MPI_File_read_all_end(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read_all_end(MPI_File \fIfh\fP, void \fI*buf\fP, MPI_Status \fI*status\fP) .fi @@ -35,7 +35,7 @@ void MPI::File::Read_all_end(void* \fIbuf\fP) .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -46,32 +46,32 @@ Initial address of buffer (choice). .ft R .TP 1i status -Status object (status). +Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_all_end is the ending part of a split collective operation that stores the number of elements actually read from the file associated with +MPI_File_read_all_end is the ending part of a split collective operation that stores the number of elements actually read from the file associated with .I fh -(at the current individual file pointer position maintained by the system) -into the user's buffer +(at the current individual file pointer position maintained by the system) +into the user's buffer .I buf -in +in .I status. The data is taken out of those parts of the -file specified by the current view. All other fields of +file specified by the current view. All other fields of .I status are undefined. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_at.3in b/ompi/mpi/man/man3/MPI_File_read_at.3in index 7701de66c0e..feb07bef02a 100644 --- a/ompi/mpi/man/man3/MPI_File_read_at.3in +++ b/ompi/mpi/man/man3/MPI_File_read_at.3in @@ -12,15 +12,15 @@ .nf C Syntax #include - int MPI_File_read_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, - void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + int MPI_File_read_at(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' - MPI_FILE_READ_AT(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, + MPI_FILE_READ_AT(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fIIERROR\fP) \fIBUF\fP(*) INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP @@ -31,7 +31,7 @@ C Syntax .nf #include void MPI::File::Read_at(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, - int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) void MPI::File::Read_at(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, @@ -63,35 +63,35 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_at attempts to read from the file associated with +MPI_File_read_at attempts to read from the file associated with .I fh -(at the +(at the .I offset -position) a total number of +position) a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. -The +The .I offset -is in +is in .I etype units relative to the current view. That is, holes are not counted when locating an offset. The data is taken out of those parts of the file specified by the current view. MPI_File_read_at stores the -number of +number of .I datatype -elements actually read in +elements actually read in .I status. -All other fields of +All other fields of .I status -are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH FORTRAN 77 NOTES .ft R @@ -110,5 +110,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_at_all.3in b/ompi/mpi/man/man3/MPI_File_read_at_all.3in index d6d06532f5a..3c39b8ac800 100644 --- a/ompi/mpi/man/man3/MPI_File_read_at_all.3in +++ b/ompi/mpi/man/man3/MPI_File_read_at_all.3in @@ -12,15 +12,15 @@ .nf C Syntax #include - int MPI_File_read_at_all(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, - void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + int MPI_File_read_at_all(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' - MPI_FILE_READ_AT_ALL(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_READ_AT_ALL(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) \fIBUF\fP(*) INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP @@ -30,10 +30,10 @@ C Syntax .SH C++ Syntax .nf #include -void MPI::File::Read_at_all(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, +void MPI::File::Read_at_all(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) -void MPI::File::Read_at_all(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, +void MPI::File::Read_at_all(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) .fi @@ -62,32 +62,32 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_at_all is a collective routine that attempts to read from the file associated with +MPI_File_read_at_all is a collective routine that attempts to read from the file associated with .I fh -(at the +(at the .I offset -position) a total number of +position) a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. -The +The .I offset is in etype units relative to the current view. That is, holes are not counted when locating an offset. The data is taken out of those parts of the file specified by the current view. MPI_File_read_at_all stores the -number of +number of .I datatype -elements actually read in +elements actually read in .I status. -All other fields of +All other fields of .I status -are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH FORTRAN 77 NOTES .ft R @@ -106,5 +106,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_at_all_begin.3in b/ompi/mpi/man/man3/MPI_File_read_at_all_begin.3in index cc6255074d6..75d8708d474 100644 --- a/ompi/mpi/man/man3/MPI_File_read_at_all_begin.3in +++ b/ompi/mpi/man/man3/MPI_File_read_at_all_begin.3in @@ -12,15 +12,15 @@ .nf C Syntax #include - int MPI_File_read_at_all_begin(MPI_File \fIfh\fP, MPI_Offset - \fIoffset\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype + int MPI_File_read_at_all_begin(MPI_File \fIfh\fP, MPI_Offset + \fIoffset\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' - MPI_FILE_READ_AT_ALL_BEGIN(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, + MPI_FILE_READ_AT_ALL_BEGIN(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP,\fI IERROR\fP) \fIBUF\fP(*) INTEGER \fIFH, COUNT, DATATYPE, IERROR\fP @@ -37,7 +37,7 @@ void MPI::File::Read_at_all_begin(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .ft R .TP 1i @@ -59,25 +59,25 @@ buf Initial address of buffer (choice). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_at_all_begin is the beginning part of a split collective routine that attempts to read from the file associated with +MPI_File_read_at_all_begin is the beginning part of a split collective routine that attempts to read from the file associated with .I fh -(at the +(at the .I offset -position) a total number of +position) a total number of .I count -data items having +data items having .I datatype -type into the user's buffer +type into the user's buffer .I buf. -The +The .I offset is in etype units relative to the current view. That is, holes are not counted when locating an offset. The data is taken out of those parts of the -file specified by the current view. +file specified by the current view. .SH FORTRAN 77 NOTES .ft R @@ -94,11 +94,11 @@ and gives the length of the declared integer in bytes. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_at_all_end.3in b/ompi/mpi/man/man3/MPI_File_read_at_all_end.3in index 5137787c609..0a3bc21f9a7 100644 --- a/ompi/mpi/man/man3/MPI_File_read_at_all_end.3in +++ b/ompi/mpi/man/man3/MPI_File_read_at_all_end.3in @@ -12,7 +12,7 @@ .nf C Syntax #include - int MPI_File_read_at_all_end(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read_at_all_end(MPI_File \fIfh\fP, void \fI*buf\fP, MPI_Status \fI*status\fP) .fi @@ -35,7 +35,7 @@ void MPI::File::Read_at_all_end(void* \fIbuf\fP) .SH INPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -46,28 +46,28 @@ Initial address of buffer (choice). .ft R .TP 1i status -Status object (status). +Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_read_at_all_end is a split collective routine that stores the number of elements actually read from the file associated with +MPI_File_read_at_all_end is a split collective routine that stores the number of elements actually read from the file associated with .I fh -in +in .I status. -MPI_File_read_at_all_end blocks until the operation initiated by MPI_File_read_at_all_begin completes. The data is taken out of those parts of the file specified by the current view. All other fields of +MPI_File_read_at_all_end blocks until the operation initiated by MPI_File_read_at_all_begin completes. The data is taken out of those parts of the file specified by the current view. All other fields of .I status are undefined. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_ordered.3in b/ompi/mpi/man/man3/MPI_File_read_ordered.3in index 73544b70368..14d0d02ee7e 100644 --- a/ompi/mpi/man/man3/MPI_File_read_ordered.3in +++ b/ompi/mpi/man/man3/MPI_File_read_ordered.3in @@ -13,7 +13,7 @@ C Syntax .nf #include int MPI_File_read_ordered(MPI_File \fIfh\fP, void \fI*buf\fP, - int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi @@ -29,17 +29,17 @@ C Syntax .SH C++ Syntax .nf #include -void MPI::File::Read_ordered(void* \fIbuf\fP, int \fIcount\fP, +void MPI::File::Read_ordered(void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) -void MPI::File::Read_ordered(void* \fIbuf\fP, int \fIcount\fP, +void MPI::File::Read_ordered(void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) .fi .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .TP 1i count @@ -58,30 +58,30 @@ status Status object (Status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_read_ordered is a collective routine. This routine must be called by all processes in the communicator group associated with the -file handle +file handle .I fh. -Each process may pass different argument values for the -.I datatype -and -.I count -arguments. Each process attempts to read, from the file associated with +Each process may pass different argument values for the +.I datatype +and +.I count +arguments. Each process attempts to read, from the file associated with .I fh, -a total number of -.I count -data items having -.I datatype -type into the user's buffer +a total number of +.I count +data items having +.I datatype +type into the user's buffer .I buf. -For each process, the location in the file at which data is read is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had read their data. MPI_File_read_ordered returns the actual number of -.I datatype -elements read in +For each process, the location in the file at which data is read is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had read their data. MPI_File_read_ordered returns the actual number of +.I datatype +elements read in .I status. The shared file pointer is updated by the amounts of data requested by all processes of the group. @@ -89,5 +89,5 @@ The shared file pointer is updated by the amounts of data requested by all proce Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_ordered_begin.3in b/ompi/mpi/man/man3/MPI_File_read_ordered_begin.3in index 1dee629cf95..e5e6b877504 100644 --- a/ompi/mpi/man/man3/MPI_File_read_ordered_begin.3in +++ b/ompi/mpi/man/man3/MPI_File_read_ordered_begin.3in @@ -12,7 +12,7 @@ .nf C Syntax #include - int MPI_File_read_ordered_begin(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read_ordered_begin(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP) .fi @@ -34,7 +34,7 @@ void MPI::File::Read_ordered_begin(void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -54,35 +54,35 @@ buf Initial address of buffer (choice). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_read_ordered_begin is the beginning part of a split collective, nonblocking routine that must be called by all processes in the communicator group associated with the -file handle +file handle .I fh. -Each process may pass different argument values for the -.I datatype -and -.I count -arguments. Each process attempts to read, from the file associated with +Each process may pass different argument values for the +.I datatype +and +.I count +arguments. Each process attempts to read, from the file associated with .I fh, -a total number of -.I count -data items having -.I datatype -type into the user's buffer +a total number of +.I count +data items having +.I datatype +type into the user's buffer .I buf. -For each process, the location in the file at which data is read is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had read their data. +For each process, the location in the file at which data is read is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had read their data. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_ordered_end.3in b/ompi/mpi/man/man3/MPI_File_read_ordered_end.3in index 0d77dc602e1..0b4b2d8a7b8 100644 --- a/ompi/mpi/man/man3/MPI_File_read_ordered_end.3in +++ b/ompi/mpi/man/man3/MPI_File_read_ordered_end.3in @@ -12,7 +12,7 @@ .nf C Syntax #include - int MPI_File_read_ordered_end(MPI_File \fIfh\fP, void \fI*buf\fP, + int MPI_File_read_ordered_end(MPI_File \fIfh\fP, void \fI*buf\fP, MPI_Status \fI*status\fP) .fi @@ -29,13 +29,13 @@ C Syntax #include void MPI::File::Read_ordered_end(void* \fIbuf\fP, MPI::Status& \fIstatus\fP) -void MPI::File::Read_ordered_end(void* \fIbuf\fP) +void MPI::File::Read_ordered_end(void* \fIbuf\fP) .fi .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH OUTPUT PARAMETERS @@ -49,26 +49,26 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_read_ordered_end is the ending part of a split collective routine that must be called by all processes in the communicator group associated with the -file handle -.I fh. -MPI_File_rad_ordered_end blocks until the operation initiated by MPI_File_read_ordered_begin completes. It attempts to read the file associated with +file handle +.I fh. +MPI_File_rad_ordered_end blocks until the operation initiated by MPI_File_read_ordered_begin completes. It attempts to read the file associated with .I fh -into the user's buffer +into the user's buffer .I buf. -The shared file pointer is updated by the amounts of data requested by all processes of the group. For each process, the location in the file at which data is read is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had read their data. +The shared file pointer is updated by the amounts of data requested by all processes of the group. For each process, the location in the file at which data is read is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had read their data. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_read_shared.3in b/ompi/mpi/man/man3/MPI_File_read_shared.3in index 5a451b22c48..50da61878ba 100644 --- a/ompi/mpi/man/man3/MPI_File_read_shared.3in +++ b/ompi/mpi/man/man3/MPI_File_read_shared.3in @@ -12,17 +12,17 @@ .nf C Syntax #include - int MPI_File_read_shared(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, + int MPI_File_read_shared(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' - MPI_FILE_READ_SHARED(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fISTATUS\fP, + MPI_FILE_READ_SHARED(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fISTATUS\fP, \fIIERROR\fP) BUF(*) - INTEGER FH, COUNT, DATATYPE, + INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR .fi @@ -39,7 +39,7 @@ void MPI::File::Read_shared(void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -63,7 +63,7 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -73,5 +73,5 @@ MPI_File_read_shared is a blocking routine that uses the shared file pointer to Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_seek.3in b/ompi/mpi/man/man3/MPI_File_seek.3in index 5359954b648..0e62b379d73 100644 --- a/ompi/mpi/man/man3/MPI_File_seek.3in +++ b/ompi/mpi/man/man3/MPI_File_seek.3in @@ -33,10 +33,10 @@ void MPI::File::Seek(MPI::Offset \fIoffset\fP, int \fIwhence\fP) .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .TP 1i -offset +offset File offset (integer). .TP 1i whence @@ -46,29 +46,29 @@ Update mode (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_seek updates the individual file pointer according to +MPI_File_seek updates the individual file pointer according to .I whence, which could have the following possible values: .TP - o -MPI_SEEK_SET - The pointer is set to + o +MPI_SEEK_SET - The pointer is set to .I offset. .TP - o -MPI_SEEK_CUR - The pointer is set to the current pointer position plus + o +MPI_SEEK_CUR - The pointer is set to the current pointer position plus .I offset. .TP - o -MPI_SEEK_END - The pointer is set to the end of the file plus + o +MPI_SEEK_END - The pointer is set to the end of the file plus .I offset. .sp .RE -The -.I offset +The +.I offset can be negative, which allows seeking backwards. It is erroneous to seek to a negative position in the file. The end of the file is defined to be the location of the next elementary data item @@ -92,5 +92,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_seek_shared.3in b/ompi/mpi/man/man3/MPI_File_seek_shared.3in index d0862c867a5..55a3cfa30fb 100644 --- a/ompi/mpi/man/man3/MPI_File_seek_shared.3in +++ b/ompi/mpi/man/man3/MPI_File_seek_shared.3in @@ -20,7 +20,7 @@ C Syntax .nf INCLUDE 'mpif.h' MPI_FILE_SEEK_SHARED(\fIFH\fP,\fI OFFSET\fP,\fI WHENCE\fP,\fI IERROR\fP) - INTEGER \fIFH, WHENCE, IERROR\fP + INTEGER \fIFH, WHENCE, IERROR\fP INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP .fi @@ -33,10 +33,10 @@ void MPI::File::Seek_shared(MPI::Offset \fIoffset\fP, int \fIwhence\fP) .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .TP 1i -offset +offset File offset (integer). .TP 1i whence @@ -46,39 +46,39 @@ Update mode (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_seek_shared updates the shared file pointer according to +MPI_File_seek_shared updates the shared file pointer according to .I whence, which could have the following possible values: .TP - o -MPI_SEEK_SET - The pointer is set to + o +MPI_SEEK_SET - The pointer is set to .I offset. .TP - o -MPI_SEEK_CUR - The pointer is set to the current pointer position plus + o +MPI_SEEK_CUR - The pointer is set to the current pointer position plus .I offset. .TP - o -MPI_SEEK_END - The pointer is set to the end of the file plus + o +MPI_SEEK_END - The pointer is set to the end of the file plus .I offset. .sp .RE MPI_File_seek_shared is collective; all the processes in the communicator -group associated with the file handle -.I fh -must call MPI_File_seek_shared with the same -.I offset -and +group associated with the file handle +.I fh +must call MPI_File_seek_shared with the same +.I offset +and .I whence. All processes in the communicator group are synchronized before the shared file pointer is updated. .sp -The -.I offset +The +.I offset can be negative, which allows seeking backwards. It is erroneous to seek to a negative position in the view. The end of the view is defined to be the position of the next elementary data item, relative @@ -102,5 +102,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_set_atomicity.3in b/ompi/mpi/man/man3/MPI_File_set_atomicity.3in index 2235d6dc7d0..ce7f94f2912 100644 --- a/ompi/mpi/man/man3/MPI_File_set_atomicity.3in +++ b/ompi/mpi/man/man3/MPI_File_set_atomicity.3in @@ -41,31 +41,31 @@ flag .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The consistency semantics for data-access operations using the set of file handles created by one collective MPI_File_open is set by collectively -calling MPI_File_set_atomicity. All processes in the group must pass identical values for -.I fh +calling MPI_File_set_atomicity. All processes in the group must pass identical values for +.I fh and .I flag. -If -.I flag -is +If +.I flag +is .I true, -atomic mode is set; if -.I flag -is +atomic mode is set; if +.I flag +is .I false, nonatomic mode is set. .sp -The default value on a call to MPI_File_open in Open MPI is \fItrue\fP for jobs running on more than one node, \fIfalse\fP for jobs running on a single SMP. For more information, see the MPI-2 standard. +The default value on a call to MPI_File_open in Open MPI is \fItrue\fP for jobs running on more than one node, \fIfalse\fP for jobs running on a single SMP. For more information, see the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_set_errhandler.3in b/ompi/mpi/man/man3/MPI_File_set_errhandler.3in index a931c21339f..fd0a4a06891 100644 --- a/ompi/mpi/man/man3/MPI_File_set_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_File_set_errhandler.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_File_set_errhandler 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_set_errhandler \fP \- Sets the error handler for a file. +\fBMPI_File_set_errhandler \fP \- Sets the error handler for a file. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_File_set_errhandler(MPI_File \fIfile\fP, MPI_Errhandler +int MPI_File_set_errhandler(MPI_File \fIfile\fP, MPI_Errhandler \fIerrhandler\fP) .fi @@ -39,22 +39,22 @@ File (handle). .ft R .TP 1i errhandler -New error handler for file (handle). +New error handler for file (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Attaches a new error handler to a file. The error handler must be either a predefined error handler or an error handler created by a call to MPI_File_create_errhandler. +Attaches a new error handler to a file. The error handler must be either a predefined error handler or an error handler created by a call to MPI_File_create_errhandler. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_set_info.3in b/ompi/mpi/man/man3/MPI_File_set_info.3in index ed1bb2a7791..e59236b8f38 100644 --- a/ompi/mpi/man/man3/MPI_File_set_info.3in +++ b/ompi/mpi/man/man3/MPI_File_set_info.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_File_set_info 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_set_info\fP \- Sets new values for hints (collective). +\fBMPI_File_set_info\fP \- Sets new values for hints (collective). .SH SYNTAX .ft R @@ -31,7 +31,7 @@ void MPI::File::Set_info(const MPI::Info& \fIinfo\fP) .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETER @@ -44,24 +44,24 @@ Info object (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_set_info is a collective routine that sets new values for the hints of the file associated with \fIfh\fP. These hints are set for each file, using the MPI_File_open, MPI_File_delete, MPI_File_set_view, and MPI_File_set_info routines. The opaque \fIinfo\fP object, which allows you to provide hints for optimization of your code, may be different on each process, but some \fIinfo\fP entries are required to be the same on all processes: In these cases, they must appear with the same value in each process's info object. See the HINTS section for a list of hints that can be set. +MPI_File_set_info is a collective routine that sets new values for the hints of the file associated with \fIfh\fP. These hints are set for each file, using the MPI_File_open, MPI_File_delete, MPI_File_set_view, and MPI_File_set_info routines. The opaque \fIinfo\fP object, which allows you to provide hints for optimization of your code, may be different on each process, but some \fIinfo\fP entries are required to be the same on all processes: In these cases, they must appear with the same value in each process's info object. See the HINTS section for a list of hints that can be set. .SH HINTS .ft R -The following hints can be used as values for the \fIinfo\fP argument. +The following hints can be used as values for the \fIinfo\fP argument. .sp SETTABLE HINTS: .sp -- shared_file_timeout: Amount of time (in seconds) to wait for access to the +- shared_file_timeout: Amount of time (in seconds) to wait for access to the shared file pointer before exiting with MPI_ERR_TIMEDOUT. .sp -- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or +- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or write lock on a contiguous chunk of a UNIX file before exiting with MPI_ERR_TIMEDOUT. -.sp +.sp - noncoll_read_bufsize: Maximum size of the buffer used by MPI I/O to satisfy read requests in the noncollective data-access routines. (See NOTE, below.) @@ -85,13 +85,13 @@ I/O routines can bind an extra thread to an LWP. .sp - mpiio_coll_contiguous: (boolean) controls whether subsequent collective data accesses will request collectively contiguous regions of the file. .sp -NON-SETTABLE HINTS: +NON-SETTABLE HINTS: .sp -- filename: Access this hint to get the name of the file. +- filename: Access this hint to get the name of the file. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_set_size.3in b/ompi/mpi/man/man3/MPI_File_set_size.3in index fdd7ad94832..38602412c1d 100644 --- a/ompi/mpi/man/man3/MPI_File_set_size.3in +++ b/ompi/mpi/man/man3/MPI_File_set_size.3in @@ -19,8 +19,8 @@ C Syntax .nf INCLUDE 'mpif.h' MPI_FILE_SET_SIZE(\fIFH\fP,\fI SIZE\fP, \fI IERROR\fP) - INTEGER \fIFH, IERROR\fP - INTEGER(KIND=MPI_OFFSET_KIND) \fISIZE\fP + INTEGER \fIFH, IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fISIZE\fP .fi .SH C++ Syntax @@ -32,7 +32,7 @@ void MPI::File::Set_size(MPI::Offset \fIsize\fP) .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .TP 1i size @@ -42,7 +42,7 @@ Size to truncate or expand file (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -51,14 +51,14 @@ MPI_File_set_size resizes the file associated with the file handle truncating UNIX files as necessary. MPI_File_set_size is collective; all processes in the group must pass identical values for size. .sp -When using MPI_File_set_size on a UNIX file, if \fIsize\fP is larger than the current file size, the file size becomes \fIsize\fP. If \fIsize\fP is smaller than the current file size, the file is truncated at the position defined by \fIsize\fP (from the beginning of the file and measured in bytes). Regions of the file which have been previously written are unaffected. +When using MPI_File_set_size on a UNIX file, if \fIsize\fP is larger than the current file size, the file size becomes \fIsize\fP. If \fIsize\fP is smaller than the current file size, the file is truncated at the position defined by \fIsize\fP (from the beginning of the file and measured in bytes). Regions of the file which have been previously written are unaffected. .sp MPI_File_set_size does not affect the individual file pointers or the shared file pointer. .sp -Note that the actual amount of storage space cannot be allocated by MPI_File_set_size. Use MPI_File_preallocate to accomplish this. +Note that the actual amount of storage space cannot be allocated by MPI_File_set_size. Use MPI_File_preallocate to accomplish this. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH FORTRAN 77 NOTES .ft R @@ -77,6 +77,6 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_set_view.3in b/ompi/mpi/man/man3/MPI_File_set_view.3in index 1a2c36504b9..7da244988aa 100644 --- a/ompi/mpi/man/man3/MPI_File_set_view.3in +++ b/ompi/mpi/man/man3/MPI_File_set_view.3in @@ -22,15 +22,15 @@ C Syntax INCLUDE 'mpif.h' MPI_FILE_SET_VIEW(\fIFH\fP,\fI DISP\fP,\fI ETYPE\fP, \fI FILETYPE\fP, \fIDATAREP\fP, \fIINFO\fP,\fI IERROR\fP) - INTEGER \fIFH, ETYPE, FILETYPE, INFO, IERROR\fP + INTEGER \fIFH, ETYPE, FILETYPE, INFO, IERROR\fP CHARACTER*(*) \fIDATAREP\fP - INTEGER(KIND=MPI_OFFSET_KIND) \fIDISP\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIDISP\fP .fi .SH C++ Syntax .nf #include -void MPI::File::Set_view(MPI::Offset \fIdisp\fP, +void MPI::File::Set_view(MPI::Offset \fIdisp\fP, const MPI::Datatype& \fIetype\fP, const MPI::Datatype& \fIfiletype\fP, const char* \fIdatarep\fP, const MPI::Info& \fIinfo\fP) @@ -45,81 +45,81 @@ File handle (handle). .SH INPUT PARAMETERS .ft R .TP 1i -disp +disp Displacement (integer). .TP 1i -etype -Elementary data type (handle). +etype +Elementary data type (handle). .TP 1i filetype File type (handle). See Restrictions, below. .TP 1i datarep -Data representation (string). +Data representation (string). .TP 1i info -Info object (handle). +Info object (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The MPI_File_set_view routine changes the process's view of the data in the file -- the beginning of the data accessible in the file through -that view is set to +that view is set to .I disp; -the type of data is set to +the type of data is set to .I etype; -and the distribution of data to processes is set to +and the distribution of data to processes is set to .I filetype. In addition, MPI_File_set_view resets the independent file pointers and -the shared file pointer to zero. MPI_File_set_view is collective across the -.IR fh ; -all processes in the group must pass identical values for -.IR datarep +the shared file pointer to zero. MPI_File_set_view is collective across the +.IR fh ; +all processes in the group must pass identical values for +.IR datarep and provide an .I etype with an identical extent. The values for -.IR disp , +.IR disp , .IR filetype , -and +and .I info may vary. It is erroneous to use the shared file pointer data-access -routines unless identical values for +routines unless identical values for .I disp -and +and .I filetype -are also given. The data types passed in +are also given. The data types passed in .I etype -and +and .I filetype must be committed. .sp -The +The .I disp displacement argument specifies the position (absolute offset in bytes from the beginning of the file) where the view begins. .sp -The MPI_File_set_view interface allows the user to pass a data-representation string to MPI I/O via the \fIdatarep\fP argument. To obtain the default value (or "native"), pass NULL. The user can also pass information via the \fIinfo\fP argument. See the HINTS section for a list of hints that can be set. For more information, see the MPI-2 standard. +The MPI_File_set_view interface allows the user to pass a data-representation string to MPI I/O via the \fIdatarep\fP argument. To obtain the default value (or "native"), pass NULL. The user can also pass information via the \fIinfo\fP argument. See the HINTS section for a list of hints that can be set. For more information, see the MPI-2 standard. .SH HINTS .ft R -The following hints can be used as values for the \fIinfo\fP argument. +The following hints can be used as values for the \fIinfo\fP argument. .sp SETTABLE HINTS: -.sp +.sp - MPI_INFO_NULL .sp -- shared_file_timeout: Amount of time (in seconds) to wait for access to the +- shared_file_timeout: Amount of time (in seconds) to wait for access to the shared file pointer before exiting with MPI_ERR_TIMEDOUT. .sp -- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or +- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or write lock on a contiguous chunk of a UNIX file before exiting with MPI_ERR_TIMEDOUT. -.sp +.sp - noncoll_read_bufsize: Maximum size of the buffer used by MPI I/O to satisfy read requests in the noncollective data-access routines. (See NOTE, below.) @@ -143,9 +143,9 @@ I/O routines can bind an extra thread to an LWP. .sp - mpiio_coll_contiguous: (boolean) controls whether subsequent collective data accesses will request collectively contiguous regions of the file. .sp -NON-SETTABLE HINTS: +NON-SETTABLE HINTS: .sp -- filename: Access this hint to get the name of the file. +- filename: Access this hint to get the name of the file. .SH FORTRAN 77 NOTES .ft R @@ -164,6 +164,6 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_sync.3in b/ompi/mpi/man/man3/MPI_File_sync.3in index 35883fb2acb..5c72651fa2f 100644 --- a/ompi/mpi/man/man3/MPI_File_sync.3in +++ b/ompi/mpi/man/man3/MPI_File_sync.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_File_sync 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_sync\fP \- Makes semantics consistent for data-access operations (collective). +\fBMPI_File_sync\fP \- Makes semantics consistent for data-access operations (collective). .SH SYNTAX .ft R @@ -38,19 +38,19 @@ File handle (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R Calling MPI_File_sync with .I fh -causes all previous writes to +causes all previous writes to .I fh -by the calling process to be written to permanent storage. If other processes have made updates to permanent storage, then all such updates become visible to subsequent reads of +by the calling process to be written to permanent storage. If other processes have made updates to permanent storage, then all such updates become visible to subsequent reads of .I fh by the calling process. .sp -MPI_File_sync is a collective operation. The user is responsible for ensuring that all nonblocking requests on +MPI_File_sync is a collective operation. The user is responsible for ensuring that all nonblocking requests on .I fh have been completed before calling MPI_File_sync. Otherwise, the call to MPI_File_sync is erroneous. @@ -58,6 +58,6 @@ have been completed before calling MPI_File_sync. Otherwise, the call to MPI_Fil Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write.3in b/ompi/mpi/man/man3/MPI_File_write.3in index 89021362796..ca95b4b5196 100644 --- a/ompi/mpi/man/man3/MPI_File_write.3in +++ b/ompi/mpi/man/man3/MPI_File_write.3in @@ -14,17 +14,17 @@ C Syntax #include int MPI_File_write(MPI_File \fIfh\fP, const void \fI*buf\fP, - int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' - MPI_FILE_WRITE(\fIFH\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_WRITE(\fIFH\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) \fIBUF\fP(*) - INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), + INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP .fi @@ -63,33 +63,33 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_write attempts to write into the file associated with +MPI_File_write attempts to write into the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of -.I count +(at the current individual file pointer position maintained by the system) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. The data is written into those parts of the file specified by the current view. MPI_File_write stores the -number of -.I datatype -elements actually written in -.I status. -All other fields of -.I status +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_all.3in b/ompi/mpi/man/man3/MPI_File_write_all.3in index 9c85de90da0..e8f555d04e0 100644 --- a/ompi/mpi/man/man3/MPI_File_write_all.3in +++ b/ompi/mpi/man/man3/MPI_File_write_all.3in @@ -20,10 +20,10 @@ C Syntax .SH Fortran Syntax .nf INCLUDE 'mpif.h' - MPI_FILE_WRITE_ALL(\fIFH\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_WRITE_ALL(\fIFH\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) BUF(*) - INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), + INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR .fi @@ -59,33 +59,33 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_write_all is a collective routine that attempts to write into the file associated with +MPI_File_write_all is a collective routine that attempts to write into the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of -.I count +(at the current individual file pointer position maintained by the system) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. The data is written into those parts of the file specified by the current view. MPI_File_write_all stores the -number of -.I datatype -elements actually written in -.I status. -All other fields of -.I status +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_all_begin.3in b/ompi/mpi/man/man3/MPI_File_write_all_begin.3in index 017f0f09981..7178fcb0aa4 100644 --- a/ompi/mpi/man/man3/MPI_File_write_all_begin.3in +++ b/ompi/mpi/man/man3/MPI_File_write_all_begin.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_File_write_all_begin 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_write_all_begin\fP \- Writes a file starting at the locations specified by individual file pointers; beginning part of a split collective routine (nonblocking). +\fBMPI_File_write_all_begin\fP \- Writes a file starting at the locations specified by individual file pointers; beginning part of a split collective routine (nonblocking). .SH SYNTAX .ft R @@ -28,14 +28,14 @@ C Syntax .SH C++ Syntax .nf #include -void MPI::File::Write_all_begin(const void* \fIbuf\fP, int \fIcount\fP, +void MPI::File::Write_all_begin(const void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) .fi .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -56,30 +56,30 @@ Data type of each buffer element (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_write_all_begin is the beginning part of a split collective, nonblocking routine that attempts to write into the file associated with +MPI_File_write_all_begin is the beginning part of a split collective, nonblocking routine that attempts to write into the file associated with .I fh -(at the current individual file pointer position maintained by the system) a total number of -.I count +(at the current individual file pointer position maintained by the system) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. The data is written into those parts of the -file specified by the current view. +file specified by the current view. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_all_end.3in b/ompi/mpi/man/man3/MPI_File_write_all_end.3in index f7f9eda1753..685ce6fd8d8 100644 --- a/ompi/mpi/man/man3/MPI_File_write_all_end.3in +++ b/ompi/mpi/man/man3/MPI_File_write_all_end.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_File_write_all_end 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_File_write_all_end\fP \- Writes a file starting at the locations specified by individual file pointers; ending part of a split collective routine (blocking). +\fBMPI_File_write_all_end\fP \- Writes a file starting at the locations specified by individual file pointers; ending part of a split collective routine (blocking). .SH SYNTAX .ft R @@ -35,14 +35,14 @@ void MPI::File::Write_all_end(const void* \fIbuf\fP) .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETER .ft R .TP 1i buf -Initial address of buffer (choice). +Initial address of buffer (choice). .SH OUTPUT PARAMETERS .ft R @@ -51,28 +51,28 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_write_all_end is the ending part of a split collective routine that stores the -number of elements actually written into the file associated with +number of elements actually written into the file associated with .I fh -from the user's buffer +from the user's buffer .I buf in -.I status. +.I status. MPI_File_write_all_end blocks until the operation initiated by MPI_File_write_all_begin completes. The data is written into those parts of the -file specified by the current view. All other fields of -.I status +file specified by the current view. All other fields of +.I status are undefined. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_at.3in b/ompi/mpi/man/man3/MPI_File_write_at.3in index c986ee83b28..d48218cfe19 100644 --- a/ompi/mpi/man/man3/MPI_File_write_at.3in +++ b/ompi/mpi/man/man3/MPI_File_write_at.3in @@ -20,20 +20,20 @@ C Syntax .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' - MPI_FILE_WRITE_AT(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_WRITE_AT(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) \fIBUF\fP(*) INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP - INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP .fi .SH C++ Syntax .nf #include -void MPI::File::Write_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, +void MPI::File::Write_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) -void MPI::File::Write_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, +void MPI::File::Write_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) .fi @@ -62,34 +62,34 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_write_at attempts to write into the file associated with +MPI_File_write_at attempts to write into the file associated with .I fh -(at the -.I offset -position) a total number of -.I count +(at the +.I offset +position) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. -The offset is in +The offset is in .I etype units relative to the current view. That is, holes are not counted when locating an offset. The data is written into those parts of the file specified by the current view. MPI_File_write_at stores the -number of -.I datatype -elements actually written in -.I status. -All other fields of -.I status +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH FORTRAN 77 NOTES .ft R @@ -108,7 +108,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_File_write_at_all.3in b/ompi/mpi/man/man3/MPI_File_write_at_all.3in index 2fa85bcdb4e..9f38aea619f 100644 --- a/ompi/mpi/man/man3/MPI_File_write_at_all.3in +++ b/ompi/mpi/man/man3/MPI_File_write_at_all.3in @@ -20,18 +20,18 @@ C Syntax .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' - MPI_FILE_WRITE_AT_ALL(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, + MPI_FILE_WRITE_AT_ALL(\fIFH\fP, \fI OFFSET\fP, \fI BUF\fP, \fICOUNT\fP, \fI DATATYPE\fP, \fISTATUS\fP, \fI IERROR\fP) \fIBUF\fP(*) - INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP - INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP .fi .SH C++ Syntax .nf #include void MPI::File::Write_at_all(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, - int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, MPI::Status& \fIstatus\fP) void MPI::File::Write_at_all(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, @@ -63,32 +63,32 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_write_at_all is a collective routine that attempts to write into the file associated with +MPI_File_write_at_all is a collective routine that attempts to write into the file associated with .I fh -(at the -.I offset -position) a total number of -.I count +(at the +.I offset +position) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. The offset is in etype units relative to the current view. That is, holes are not counted when locating an offset. The data is written into those parts of the file specified by the current view. MPI_File_write_at_all stores the -number of -.I datatype -elements actually written in -.I status. -All other fields of -.I status +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status are undefined. .sp -It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. .SH FORTRAN 77 NOTES .ft R @@ -107,5 +107,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_at_all_begin.3in b/ompi/mpi/man/man3/MPI_File_write_at_all_begin.3in index 65e927b0e4a..1c071a1c137 100644 --- a/ompi/mpi/man/man3/MPI_File_write_at_all_begin.3in +++ b/ompi/mpi/man/man3/MPI_File_write_at_all_begin.3in @@ -13,7 +13,7 @@ .nf C Syntax #include - int MPI_File_write_at_all_begin(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + int MPI_File_write_at_all_begin(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, const void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP) .fi @@ -22,22 +22,22 @@ C Syntax INCLUDE 'mpif.h' MPI_FILE_WRITE_AT_ALL_BEGIN(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP,\fI IERROR\fP) \fIBUF\fP(*) - INTEGER \fIFH, COUNT, DATATYPE, IERROR\fP - INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + INTEGER \fIFH, COUNT, DATATYPE, IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP .fi .SH C++ Syntax .nf #include -void MPI::File::Write_at_all_begin(MPI::Offset \fIoffset\fP, - const void* \fIbuf\fP, int \fIcount\fP, +void MPI::File::Write_at_all_begin(MPI::Offset \fIoffset\fP, + const void* \fIbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) .fi .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -56,29 +56,29 @@ Number of elements in buffer (integer). .ft R .TP 1i datatype -Data type of each buffer element (handle). +Data type of each buffer element (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_File_write_at_all_begin is the beginning part of a split collective, that is, a nonblocking routine that attempts to write into the file associated with +MPI_File_write_at_all_begin is the beginning part of a split collective, that is, a nonblocking routine that attempts to write into the file associated with .I fh -(at the -.I offset -position) a total number of -.I count +(at the +.I offset +position) a total number of +.I count data items having -.I datatype -type from the user's buffer +.I datatype +type from the user's buffer .I buf. The offset is in etype units relative to the current view. That is, holes are not counted when locating an offset. The data is written into those parts of the -file specified by the current view. +file specified by the current view. .SH FORTRAN 77 NOTES .ft R @@ -95,11 +95,11 @@ and gives the length of the declared integer in bytes. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_at_all_end.3in b/ompi/mpi/man/man3/MPI_File_write_at_all_end.3in index cdfec299b67..14c597a33ac 100644 --- a/ompi/mpi/man/man3/MPI_File_write_at_all_end.3in +++ b/ompi/mpi/man/man3/MPI_File_write_at_all_end.3in @@ -49,30 +49,30 @@ Initial address of buffer (choice). .ft R .TP 1i status -Status object (status). +Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_write_at_all_end is the ending part of a split collective routine that stores the -number of elements actually written into the file associated with +number of elements actually written into the file associated with .I fh in -.I status. +.I status. The data is written into those parts of the -file specified by the current view. All other fields of -.I status +file specified by the current view. All other fields of +.I status are undefined. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_ordered.3in b/ompi/mpi/man/man3/MPI_File_write_ordered.3in index cb23716a037..efeff3b61f7 100644 --- a/ompi/mpi/man/man3/MPI_File_write_ordered.3in +++ b/ompi/mpi/man/man3/MPI_File_write_ordered.3in @@ -14,7 +14,7 @@ C Syntax .nf #include int MPI_File_write_ordered(MPI_File \fIfh\fP, const void \fI*buf\fP, - int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Status \fI*status\fP) .fi @@ -40,7 +40,7 @@ void MPI::File::Write_ordered(const void* \fIbuf\fP, int \fIcount\fP, .SH INPUT PARAMETERS .ft R .TP 1i -fh +fh File handle (handle). .TP 1i buf @@ -59,33 +59,33 @@ status Status object (Status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_write_ordered is a collective routine. This routine must be called by all processes in the communicator group associated with -the file handle +the file handle .I fh. Each process may pass different argument values -for the -.I datatype -and -.I count +for the +.I datatype +and +.I count arguments. Each process attempts to -write, into the file associated with +write, into the file associated with .I fh, -a total number of -.I count -data items having datatype type contained in the user's buffer +a total number of +.I count +data items having datatype type contained in the user's buffer .I buf. For each process, the location in the file at which data is written is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had written their data. MPI_File_write_ordered returns the number of -.I datatype -elements written in +.I datatype +elements written in .I status. The shared file pointer is updated by the amounts of data requested by all processes of the @@ -95,5 +95,5 @@ group. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_ordered_begin.3in b/ompi/mpi/man/man3/MPI_File_write_ordered_begin.3in index 05f9974ee11..80f6ebe58ee 100644 --- a/ompi/mpi/man/man3/MPI_File_write_ordered_begin.3in +++ b/ompi/mpi/man/man3/MPI_File_write_ordered_begin.3in @@ -35,7 +35,7 @@ void MPI::File::Write_ordered_begin(const void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -56,40 +56,40 @@ Data type of each buffer element (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_write_ordered_begin is the beginning part of a split collective, nonblocking routine that must be called by all processes in the communicator group associated with -the file handle +the file handle .I fh. Each process may pass different argument values -for the -.I datatype -and -.I count +for the +.I datatype +and +.I count arguments. After all processes of the group have issued their respective calls, each process attempts to -write, into the file associated with +write, into the file associated with .I fh, -a total number of -.I count -data items having datatype type contained in the user's buffer +a total number of +.I count +data items having datatype type contained in the user's buffer .I buf. For each process, the location in the file at which data is written is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had -written their data. +written their data. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_ordered_end.3in b/ompi/mpi/man/man3/MPI_File_write_ordered_end.3in index ed6440c21fd..41345611248 100644 --- a/ompi/mpi/man/man3/MPI_File_write_ordered_end.3in +++ b/ompi/mpi/man/man3/MPI_File_write_ordered_end.3in @@ -36,7 +36,7 @@ void MPI::File::Write_ordered_end(const void* \fIbuf\fP) .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETER @@ -49,29 +49,29 @@ Initial address of buffer (choice). .ft R .TP 1i status -Status object (status). +Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_File_write_ordered_end is the ending part of a split collective routine that must be called by all processes in the communicator group associated with -the file handle +the file handle .I fh. -MPI_File_write_ordered_end returns the number of elements written into the file associated with +MPI_File_write_ordered_end returns the number of elements written into the file associated with .I fh in .I status. .SH NOTES .ft R -All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. +All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. These split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_File_write_shared.3in b/ompi/mpi/man/man3/MPI_File_write_shared.3in index 7cb3f40cd92..a893ccd9212 100644 --- a/ompi/mpi/man/man3/MPI_File_write_shared.3in +++ b/ompi/mpi/man/man3/MPI_File_write_shared.3in @@ -22,7 +22,7 @@ C Syntax INCLUDE 'mpif.h' MPI_FILE_WRITE_SHARED(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fISTATUS\fP,\fI IERROR\fP) \fIBUF(*)\fP - INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), + INTEGER \fIFH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR\fP .fi @@ -39,7 +39,7 @@ void MPI::File::Write_shared(const void* \fIbuf\fP, int \fIcount\fP, .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -fh +fh File handle (handle). .SH INPUT PARAMETERS @@ -63,7 +63,7 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -73,5 +73,5 @@ MPI_File_write_shared is a blocking routine that uses the shared file pointer to Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Finalize.3in b/ompi/mpi/man/man3/MPI_Finalize.3in index 88f2d266f9b..a4ffcc689bc 100644 --- a/ompi/mpi/man/man3/MPI_Finalize.3in +++ b/ompi/mpi/man/man3/MPI_Finalize.3in @@ -19,7 +19,7 @@ int MPI_Finalize() .nf INCLUDE 'mpif.h' MPI_FINALIZE(\fIIERROR\fP) - INTEGER \fIIERROR\fP + INTEGER \fIIERROR\fP .fi .SH C++ Syntax @@ -32,26 +32,26 @@ void Finalize() .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This routine cleans up all MPI states. Once this routine is called, no MPI routine (not even MPI_Init) may be called, except for MPI_Get_version, MPI_Initialized, and MPI_Finalized. Unless there has been a call to MPI_Abort, you must ensure that all pending communications involving a process are complete before the process calls MPI_Finalize. If the call returns, each process may either continue local computations or exit without participating in further communication with other processes. At the moment when the last process calls MPI_Finalize, all pending sends must be matched by a receive, and all pending receives must be matched by a send. +This routine cleans up all MPI states. Once this routine is called, no MPI routine (not even MPI_Init) may be called, except for MPI_Get_version, MPI_Initialized, and MPI_Finalized. Unless there has been a call to MPI_Abort, you must ensure that all pending communications involving a process are complete before the process calls MPI_Finalize. If the call returns, each process may either continue local computations or exit without participating in further communication with other processes. At the moment when the last process calls MPI_Finalize, all pending sends must be matched by a receive, and all pending receives must be matched by a send. -MPI_Finalize is collective over all connected processes. If no processes were spawned, accepted, or connected, then this means it is collective over MPI_COMM_WORLD. Otherwise, it is collective over the union of all processes that have been and continue to be connected. +MPI_Finalize is collective over all connected processes. If no processes were spawned, accepted, or connected, then this means it is collective over MPI_COMM_WORLD. Otherwise, it is collective over the union of all processes that have been and continue to be connected. .SH NOTES .ft R All processes must call this routine before exiting. All processes will still exist but may not make any further MPI calls. MPI_Finalize guarantees that all local actions required by communications the user has completed will, in fact, occur before it returns. However, MPI_Finalize guarantees nothing about pending communications that have \fInot\fP been completed; completion is ensured only by MPI_Wait, MPI_Test, or MPI_Request_free combined with some other verification of completion. .sp -For example, a successful return from a blocking communication operation or from MPI_Wait or MPI_Test means that the communication is completed by the user and the buffer can be reused, but does not guarantee that the local process has no more work to do. Similarly, a successful return from MPI_Request_free with a request handle generated by an MPI_Isend nullifies the handle but does not guarantee that the operation has completed. The MPI_Isend is complete only when a matching receive has completed. +For example, a successful return from a blocking communication operation or from MPI_Wait or MPI_Test means that the communication is completed by the user and the buffer can be reused, but does not guarantee that the local process has no more work to do. Similarly, a successful return from MPI_Request_free with a request handle generated by an MPI_Isend nullifies the handle but does not guarantee that the operation has completed. The MPI_Isend is complete only when a matching receive has completed. .sp -If you would like to cause actions to happen when a process finishes, attach an attribute to MPI_COMM_SELF with a callback function. Then, when MPI_Finalize is called, it will first execute the equivalent of an MPI_Comm_free on MPI_COMM_SELF. This will cause the delete callback function to be executed on all keys associated with MPI_COMM_SELF in an arbitrary order. If no key has been attached to MPI_COMM_SELF, then no callback is invoked. This freeing of MPI_COMM_SELF happens before any other parts of MPI are affected. Calling MPI_Finalized will thus return "false" in any of these callback functions. Once you have done this with MPI_COMM_SELF, the results of MPI_Finalize are not specified. +If you would like to cause actions to happen when a process finishes, attach an attribute to MPI_COMM_SELF with a callback function. Then, when MPI_Finalize is called, it will first execute the equivalent of an MPI_Comm_free on MPI_COMM_SELF. This will cause the delete callback function to be executed on all keys associated with MPI_COMM_SELF in an arbitrary order. If no key has been attached to MPI_COMM_SELF, then no callback is invoked. This freeing of MPI_COMM_SELF happens before any other parts of MPI are affected. Calling MPI_Finalized will thus return "false" in any of these callback functions. Once you have done this with MPI_COMM_SELF, the results of MPI_Finalize are not specified. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Finalized.3in b/ompi/mpi/man/man3/MPI_Finalized.3in index 9fb4f04b5d2..dae99f003b9 100644 --- a/ompi/mpi/man/man3/MPI_Finalized.3in +++ b/ompi/mpi/man/man3/MPI_Finalized.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Finalized 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Finalized \fP \- Checks whether MPI_Finalize has completed. +\fBMPI_Finalized \fP \- Checks whether MPI_Finalize has completed. .SH SYNTAX .ft R @@ -20,7 +20,7 @@ int MPI_Finalized(int \fI*flag\fP) INCLUDE 'mpif.h' MPI_FINALIZED(\fIFLAG\fP, \fIIERROR\fP) LOGICAL \fIFLAG\fP - INTEGER \fIIERROR\fP + INTEGER \fIIERROR\fP .fi .SH C++ Syntax @@ -37,15 +37,15 @@ True if MPI was finalized (logical). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This routine returns "true" if MPI_Finalize has completed. You can call MPI_Finalized before MPI_Init and after MPI_Finalize. +This routine returns "true" if MPI_Finalize has completed. You can call MPI_Finalized before MPI_Init and after MPI_Finalize. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Free_mem.3in b/ompi/mpi/man/man3/MPI_Free_mem.3in index 52872142dc0..56cbdcf3482 100644 --- a/ompi/mpi/man/man3/MPI_Free_mem.3in +++ b/ompi/mpi/man/man3/MPI_Free_mem.3in @@ -18,9 +18,9 @@ int MPI_Free_mem(void *\fIbase\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_FREE_MEM(\fIBASE, IERROR\fP) - \fIBASE\fP(*) - INTEGER \fIIERROR\fP +MPI_FREE_MEM(\fIBASE, IERROR\fP) + \fIBASE\fP(*) + INTEGER \fIIERROR\fP .fi .SH C++ Syntax @@ -33,23 +33,23 @@ void MPI::Free_mem(void *\fIbase\fP) .ft R .TP 1i base -Initial address of memory segment allocated by MPI_Alloc_mem (choice). +Initial address of memory segment allocated by MPI_Alloc_mem (choice). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Free_mem frees memory that has been allocated by MPI_Alloc_mem. +MPI_Free_mem frees memory that has been allocated by MPI_Alloc_mem. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Gather.3in b/ompi/mpi/man/man3/MPI_Gather.3in index 85c56beb639..e8ae67bb7a9 100644 --- a/ompi/mpi/man/man3/MPI_Gather.3in +++ b/ompi/mpi/man/man3/MPI_Gather.3in @@ -29,7 +29,7 @@ MPI_GATHER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP INTEGER \fISENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT\fP - INTEGER \fICOMM, IERROR\fP + INTEGER \fICOMM, IERROR\fP MPI_IGATHER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, REQUEST, IERROR\fP) @@ -42,7 +42,7 @@ MPI_IGATHER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, .nf #include void MPI::Comm::Gather(const void* \fIsendbuf\fP, int \fIsendcount\fP, - const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, + const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, int \fIrecvcount\fP, const MPI::Datatype& \fIrecvtype\fP, int \fIroot\fP, const = 0 @@ -82,48 +82,48 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Each process (root process included) sends the contents of its send buffer to the root process. The root process receives the messages and stores them in rank order. The outcome is as if each of the n processes in the group (including the root process) had executed a call to +Each process (root process included) sends the contents of its send buffer to the root process. The root process receives the messages and stores them in rank order. The outcome is as if each of the n processes in the group (including the root process) had executed a call to .sp .nf MPI_Send(sendbuf, sendcount, sendtype, root, \&...) .fi .sp -and the root had executed n calls to +and the root had executed n calls to .sp .nf - MPI_Recv(recfbuf + i * recvcount * extent(recvtype), \ + MPI_Recv(recfbuf + i * recvcount * extent(recvtype), \ recvcount, recvtype, i, \&...) .fi .sp -where extent(recvtype) is the type extent obtained from a call to MPI_Type_extent(). +where extent(recvtype) is the type extent obtained from a call to MPI_Type_extent(). .sp -An alternative description is that the n messages sent by the processes in the group are concatenated in rank order, and the resulting message is received by the root as if by a call to MPI_RECV(recvbuf, recvcount * n, recvtype, . . . ). +An alternative description is that the n messages sent by the processes in the group are concatenated in rank order, and the resulting message is received by the root as if by a call to MPI_RECV(recvbuf, recvcount * n, recvtype, . . . ). .sp -The receive buffer is ignored for all nonroot processes. +The receive buffer is ignored for all nonroot processes. .sp General, derived datatypes are allowed for both sendtype and recvtype. The type signature of sendcount, sendtype on process i must be equal to the type signature of recvcount, recvtype at the root. This implies that the amount of data sent must be equal to the amount of data received, pairwise between each process and the root. Distinct type maps between sender and receiver are still allowed. .sp -All arguments to the function are significant on process root, while on other processes, only arguments sendbuf, sendcount, sendtype, root, comm are significant. The arguments root and comm must have identical values on all processes. +All arguments to the function are significant on process root, while on other processes, only arguments sendbuf, sendcount, sendtype, root, comm are significant. The arguments root and comm must have identical values on all processes. .sp -The specification of counts and types should not cause any location on the root to be written more than once. Such a call is erroneous. +The specification of counts and types should not cause any location on the root to be written more than once. Such a call is erroneous. .sp Note that the recvcount argument at the root indicates the number of items it receives from each process, not the total number of items it receives. .sp \fBExample 1:\fP Gather 100 ints from every process in group to root. .sp .nf - MPI_Comm comm; - int gsize,sendarray[100]; - int root, *rbuf; - \&... - MPI_Comm_size( comm, &gsize); - rbuf = (int *)malloc(gsize*100*sizeof(int)); - MPI_Gather( sendarray, 100, MPI_INT, rbuf, 100, MPI_INT, root, comm); + MPI_Comm comm; + int gsize,sendarray[100]; + int root, *rbuf; + \&... + MPI_Comm_size( comm, &gsize); + rbuf = (int *)malloc(gsize*100*sizeof(int)); + MPI_Gather( sendarray, 100, MPI_INT, rbuf, 100, MPI_INT, root, comm); .fi .sp @@ -131,53 +131,53 @@ Note that the recvcount argument at the root indicates the number of items it re \fBExample 2:\fP Previous example modified -- only the root allocates memory for the receive buffer. .sp .nf - MPI_Comm comm; - int gsize,sendarray[100]; - int root, myrank, *rbuf; - \&... - MPI_Comm_rank( comm, myrank); - if ( myrank == root) { - MPI_Comm_size( comm, &gsize); - rbuf = (int *)malloc(gsize*100*sizeof(int)); - } - MPI_Gather( sendarray, 100, MPI_INT, rbuf, 100, MPI_INT, root, comm); + MPI_Comm comm; + int gsize,sendarray[100]; + int root, myrank, *rbuf; + \&... + MPI_Comm_rank( comm, myrank); + if ( myrank == root) { + MPI_Comm_size( comm, &gsize); + rbuf = (int *)malloc(gsize*100*sizeof(int)); + } + MPI_Gather( sendarray, 100, MPI_INT, rbuf, 100, MPI_INT, root, comm); .fi .sp \fBExample 3:\fP Do the same as the previous example, but use a derived -datatype. Note that the type cannot be the entire set of gsize * 100 ints since type matching is defined pairwise between the root and each process in the gather. +datatype. Note that the type cannot be the entire set of gsize * 100 ints since type matching is defined pairwise between the root and each process in the gather. .nf - MPI_Comm comm; - int gsize,sendarray[100]; - int root, *rbuf; - MPI_Datatype rtype; - \&... - MPI_Comm_size( comm, &gsize); - MPI_Type_contiguous( 100, MPI_INT, &rtype ); - MPI_Type_commit( &rtype ); - rbuf = (int *)malloc(gsize*100*sizeof(int)); - MPI_Gather( sendarray, 100, MPI_INT, rbuf, 1, rtype, root, comm); + MPI_Comm comm; + int gsize,sendarray[100]; + int root, *rbuf; + MPI_Datatype rtype; + \&... + MPI_Comm_size( comm, &gsize); + MPI_Type_contiguous( 100, MPI_INT, &rtype ); + MPI_Type_commit( &rtype ); + rbuf = (int *)malloc(gsize*100*sizeof(int)); + MPI_Gather( sendarray, 100, MPI_INT, rbuf, 1, rtype, root, comm); .fi .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform a gather operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIsendbuf\fR. In this case, \fIsendcount\fR and \fIsendtype\fR are ignored, and the contribution of the root process to the gathered vector is assumed to already be in the correct place in the receive buffer. +When the communicator is an intracommunicator, you can perform a gather operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIsendbuf\fR. In this case, \fIsendcount\fR and \fIsendtype\fR are ignored, and the contribution of the root process to the gathered vector is assumed to already be in the correct place in the receive buffer. .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp -Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. +Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the root process in the first group gathers data from all the processes in the second group. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. The send buffer argument of the processes in the first group must be consistent with the receive buffer argument of the root process in the second group. -.sp +When the communicator is an inter-communicator, the root process in the first group gathers data from all the processes in the second group. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. The send buffer argument of the processes in the first group must be consistent with the receive buffer argument of the root process in the second group. +.sp .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .sp -See the MPI man page for a full list of MPI error codes. +See the MPI man page for a full list of MPI error codes. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Gatherv.3in b/ompi/mpi/man/man3/MPI_Gatherv.3in index 4045c21c0c7..c3c71ea2eca 100644 --- a/ompi/mpi/man/man3/MPI_Gatherv.3in +++ b/ompi/mpi/man/man3/MPI_Gatherv.3in @@ -29,7 +29,7 @@ MPI_GATHERV(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, ROOT, COMM, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP INTEGER \fISENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*)\fP - INTEGER \fIRECVTYPE, ROOT, COMM, IERROR\fP + INTEGER \fIRECVTYPE, ROOT, COMM, IERROR\fP MPI_IGATHERV(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, ROOT, COMM, REQUEST, IERROR\fP) @@ -41,7 +41,7 @@ MPI_IGATHERV(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, .SH C++ Syntax .nf #include -void MPI::Comm::Gatherv(const void* \fIsendbuf\fP, int \fIsendcount\fP, +void MPI::Comm::Gatherv(const void* \fIsendbuf\fP, int \fIsendcount\fP, const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, const int \fIrecvcounts\fP[], const int \fIdispls\fP[], const MPI::Datatype& \fIrecvtype\fP, int \fIroot\fP) const = 0 @@ -87,19 +87,19 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Gatherv extends the functionality of MPI_Gather by allowing a varying count of data from each process, since recvcounts is now an array. It also allows more flexibility as to where the data is placed on the root, by providing the new argument, displs. +MPI_Gatherv extends the functionality of MPI_Gather by allowing a varying count of data from each process, since recvcounts is now an array. It also allows more flexibility as to where the data is placed on the root, by providing the new argument, displs. .sp -The outcome is as if each process, including the root process, sends a message to the root, +The outcome is as if each process, including the root process, sends a message to the root, .sp .nf MPI_Send(sendbuf, sendcount, sendtype, root, \&...) .fi .sp -and the root executes n receives, +and the root executes n receives, .sp .nf MPI_Recv(recvbuf + disp[i] * extent(recvtype), \\ @@ -108,237 +108,237 @@ and the root executes n receives, .sp Messages are placed in the receive buffer of the root process in rank order, that is, the data sent from process j is placed in the jth portion of the receive buffer recvbuf on process root. The jth portion of recvbuf begins at offset displs[j] elements (in terms of recvtype) into recvbuf. .sp -The receive buffer is ignored for all nonroot processes. +The receive buffer is ignored for all nonroot processes. .sp The type signature implied by sendcount, sendtype on process i must be equal to the type signature implied by recvcounts[i], recvtype at the root. This implies that the amount of data sent must be equal to the amount of data received, pairwise between each process and the root. Distinct type maps between sender and receiver are still allowed, as illustrated in Example 2, below. .sp -All arguments to the function are significant on process root, while on other processes, only arguments sendbuf, sendcount, sendtype, root, comm are significant. The arguments root and comm must have identical values on all processes. +All arguments to the function are significant on process root, while on other processes, only arguments sendbuf, sendcount, sendtype, root, comm are significant. The arguments root and comm must have identical values on all processes. .sp -The specification of counts, types, and displacements should not cause any location on the root to be written more than once. Such a call is erroneous. +The specification of counts, types, and displacements should not cause any location on the root to be written more than once. Such a call is erroneous. .sp \fBExample 1:\fP Now have each process send 100 ints to root, but place each set (of 100) stride ints apart at receiving end. Use MPI_Gatherv and -the displs argument to achieve this effect. Assume stride >= 100. +the displs argument to achieve this effect. Assume stride >= 100. .sp .nf - MPI_Comm comm; - int gsize,sendarray[100]; - int root, *rbuf, stride; - int *displs,i,*rcounts; - - \&... + MPI_Comm comm; + int gsize,sendarray[100]; + int root, *rbuf, stride; + int *displs,i,*rcounts; - MPI_Comm_size(comm, &gsize); - rbuf = (int *)malloc(gsize*stride*sizeof(int)); - displs = (int *)malloc(gsize*sizeof(int)); - rcounts = (int *)malloc(gsize*sizeof(int)); - for (i=0; i -MPI_Get(void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype - \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI_Aint \fItarget_disp\fP, +MPI_Get(void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype + \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI_Aint \fItarget_disp\fP, int \fItarget_count\fP, MPI_Datatype \fItarget_datatype\fP, MPI_Win \fIwin\fP) MPI_Rget(void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype @@ -26,11 +26,11 @@ MPI_Rget(void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_GET(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, +MPI_GET(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_DISP, TARGET_COUNT, TARGET_DATATYPE, WIN, IERROR\fP) \fIORIGIN_ADDR\fP(*) INTEGER(KIND=MPI_ADDRESS_KIND) \fITARGET_DISP\fP - INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, + INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_COUNT, TARGET_DATATYPE, WIN, IERROR\fP MPI_RGET(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, @@ -44,9 +44,9 @@ MPI_RGET(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, .SH C++ Syntax .nf #include -void MPI::Win::Get(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, - const MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, - MPI::Aint \fItarget_disp\fP, int \fItarget_count\fP, +void MPI::Win::Get(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, + const MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, + MPI::Aint \fItarget_disp\fP, int \fItarget_count\fP, const MPI::Datatype& \fItarget_datatype\fP) const .fi @@ -57,7 +57,7 @@ origin_addr Initial address of origin buffer (choice). .TP 1i origin_count -Number of entries in origin buffer (nonnegative integer). +Number of entries in origin buffer (nonnegative integer). .TP 1i origin_datatype Data type of each entry in origin buffer (handle). @@ -66,13 +66,13 @@ target_rank Rank of target (nonnegative integer). .TP 1i target_disp -Displacement from window start to the beginning of the target buffer (nonnegative integer). +Displacement from window start to the beginning of the target buffer (nonnegative integer). .TP 1i target_count Number of entries in target buffer (nonnegative integer). .TP 1i target datatype -datatype of each entry in target buffer (handle) +datatype of each entry in target buffer (handle) .TP 1i win window object used for communication (handle) @@ -84,7 +84,7 @@ request MPI_Rget: RMA request .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -110,7 +110,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Get_address.3in b/ompi/mpi/man/man3/MPI_Get_address.3in index 9d3f155796d..45634f6557f 100644 --- a/ompi/mpi/man/man3/MPI_Get_address.3in +++ b/ompi/mpi/man/man3/MPI_Get_address.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Get_address 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Get_address\fP \- Gets the address of a location in memory. +\fBMPI_Get_address\fP \- Gets the address of a location in memory. .SH SYNTAX .ft R @@ -43,38 +43,38 @@ address Address of location (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Get_address returns the byte address of a location in memory. .sp -Example: Using MPI_Get_address for an array. +Example: Using MPI_Get_address for an array. .sp .nf -EAL A(100,100) +EAL A(100,100) .fi .br - INTEGER I1, I2, DIFF + INTEGER I1, I2, DIFF .br - CALL MPI_GET_ADDRESS(A(1,1), I1, IERROR) + CALL MPI_GET_ADDRESS(A(1,1), I1, IERROR) .br - CALL MPI_GET_ADDRESS(A(10,10), I2, IERROR) + CALL MPI_GET_ADDRESS(A(10,10), I2, IERROR) .br - DIFF = I2 - I1 + DIFF = I2 - I1 .br -! The value of DIFF is 909*sizeofreal; the values of I1 and I2 are +! The value of DIFF is 909*sizeofreal; the values of I1 and I2 are .br -! implementation dependent. +! implementation dependent. .fi .SH NOTES .ft R -Current Fortran MPI codes will run unmodified and will port to any system. However, they may fail if addresses larger than 2^32 - 1 are used in the program. New codes should be written so that they use the new functions. This provides compatibility with C/C++ and avoids errors on 64-bit architectures. However, such newly written codes may need to be (slightly) rewritten to port to old Fortran 77 environments that do not support KIND declarations. +Current Fortran MPI codes will run unmodified and will port to any system. However, they may fail if addresses larger than 2^32 - 1 are used in the program. New codes should be written so that they use the new functions. This provides compatibility with C/C++ and avoids errors on 64-bit architectures. However, such newly written codes may need to be (slightly) rewritten to port to old Fortran 77 environments that do not support KIND declarations. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Get_count.3in b/ompi/mpi/man/man3/MPI_Get_count.3in index 6a468602986..81eb522a305 100644 --- a/ompi/mpi/man/man3/MPI_Get_count.3in +++ b/ompi/mpi/man/man3/MPI_Get_count.3in @@ -20,7 +20,7 @@ int MPI_Get_count(const MPI_Status *\fIstatus\fP, MPI_Datatype\fI datatype\fP, .nf INCLUDE 'mpif.h' MPI_GET_COUNT(\fISTATUS, DATATYPE, COUNT, IERROR\fP) - INTEGER \fISTATUS(MPI_STATUS_SIZE), DATATYPE, COUNT, IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), DATATYPE, COUNT, IERROR\fP .fi .SH C++ Syntax @@ -46,40 +46,40 @@ Number of received elements (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R Returns the number of entries received. (We count entries, each of type datatype, not bytes.) The datatype argument should match the argument -provided by the receive call that set the status variable. (As explained in Section 3.12.5 in the MPI-1 Standard, "Use of General Datatypes in Communication," MPI_Get_count may, in certain situations, return the value MPI_UNDEFINED.) +provided by the receive call that set the status variable. (As explained in Section 3.12.5 in the MPI-1 Standard, "Use of General Datatypes in Communication," MPI_Get_count may, in certain situations, return the value MPI_UNDEFINED.) .sp The datatype argument is passed to MPI_Get_count to improve performance. A message might be received without counting the number of elements it contains, and the count value is often not needed. Also, this allows the same function to be used after a call to MPI_Probe. .SH NOTES If the size of the datatype is zero, this routine will return a count of -zero. If the amount of data in +zero. If the amount of data in .I status is not an exact multiple of the -size of +size of .I datatype -(so that +(so that .I count -would not be integral), a +would not be integral), a .I count of .I MPI_UNDEFINED is returned instead. .SH ERRORS -If the value to be returned is larger than can fit into the +If the value to be returned is larger than can fit into the .I count parameter, an MPI_ERR_TRUNCATE exception is invoked. .sp Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Get_elements.3in b/ompi/mpi/man/man3/MPI_Get_elements.3in index 68a54b6b0c1..1f1bd9fa073 100644 --- a/ompi/mpi/man/man3/MPI_Get_elements.3in +++ b/ompi/mpi/man/man3/MPI_Get_elements.3in @@ -51,40 +51,40 @@ count Number of received basic elements (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Get_elements and MPI_Get_elements_x behave different from MPI_Get_count, which returns the number of "top-level entries" received, i.e., the number of "copies" of type datatype. MPI_Get_count may return any integer value k, where 0 =< k =< count. If MPI_Get_count returns k, then the number of basic elements received (and the value returned by MPI_Get_elements and MPI_Get_elements_x) is n * k, where n is the number of basic elements in the type map of datatype. If the number of basic elements received is not a multiple of n, that is, if the receive operation has not received an integral number of datatype "copies," then MPI_Get_count returns the value MPI_UNDEFINED. For both functions, if the \fIcount\fP parameter cannot express the value to be returned (e.g., if the parameter is too small to hold the output value), it is set to MPI_UNDEFINED. .sp -\fBExample:\fP Usage of MPI_Get_count and MPI_Get_element: +\fBExample:\fP Usage of MPI_Get_count and MPI_Get_element: .sp .nf - \&... - CALL MPI_TYPE_CONTIGUOUS(2, MPI_REAL, Type2, ierr) - CALL MPI_TYPE_COMMIT(Type2, ierr) - \&... - CALL MPI_COMM_RANK(comm, rank, ierr) - IF(rank.EQ.0) THEN - CALL MPI_SEND(a, 2, MPI_REAL, 1, 0, comm, ierr) - CALL MPI_SEND(a, 3, MPI_REAL, 1, 0, comm, ierr) - ELSE - CALL MPI_RECV(a, 2, Type2, 0, 0, comm, stat, ierr) - CALL MPI_GET_COUNT(stat, Type2, i, ierr) ! returns i=1 - CALL MPI_GET_ELEMENTS(stat, Type2, i, ierr) ! returns i=2 - CALL MPI_RECV(a, 2, Type2, 0, 0, comm, stat, ierr) + \&... + CALL MPI_TYPE_CONTIGUOUS(2, MPI_REAL, Type2, ierr) + CALL MPI_TYPE_COMMIT(Type2, ierr) + \&... + CALL MPI_COMM_RANK(comm, rank, ierr) + IF(rank.EQ.0) THEN + CALL MPI_SEND(a, 2, MPI_REAL, 1, 0, comm, ierr) + CALL MPI_SEND(a, 3, MPI_REAL, 1, 0, comm, ierr) + ELSE + CALL MPI_RECV(a, 2, Type2, 0, 0, comm, stat, ierr) + CALL MPI_GET_COUNT(stat, Type2, i, ierr) ! returns i=1 + CALL MPI_GET_ELEMENTS(stat, Type2, i, ierr) ! returns i=2 + CALL MPI_RECV(a, 2, Type2, 0, 0, comm, stat, ierr) CALL MPI_GET_COUNT(stat, Type2, i, ierr) ! returns i=MPI_UNDEFINED - CALL MPI_GET_ELEMENTS(stat, Type2, i, ierr) ! returns i=3 - END IF + CALL MPI_GET_ELEMENTS(stat, Type2, i, ierr) ! returns i=3 + END IF .fi .sp -The function MPI_Get_elements can also be used after a probe to find the number of elements in the probed message. Note that the two functions MPI_Get_count and MPI_Get_elements return the same values when they are used with primitive data types. - +The function MPI_Get_elements can also be used after a probe to find the number of elements in the probed message. Note that the two functions MPI_Get_count and MPI_Get_elements return the same values when they are used with primitive data types. + .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH FORTRAN 77 NOTES .ft R diff --git a/ompi/mpi/man/man3/MPI_Get_library_version.3in b/ompi/mpi/man/man3/MPI_Get_library_version.3in index 048ed920385..ebe9346bda6 100644 --- a/ompi/mpi/man/man3/MPI_Get_library_version.3in +++ b/ompi/mpi/man/man3/MPI_Get_library_version.3in @@ -20,7 +20,7 @@ int MPI_Get_library_version(char \fI*version\fP, int \fI*resultlen\fP) INCLUDE 'mpif.h' MPI_GET_LIBRARY_VERSION(\fIVERSION\fP, \fIRESULTLEN\fP, \fIIERROR\fP) CHARACTER*(*) \fINAME\fP - INTEGER \fIRESULTLEN\fP, \fIIERROR\fP + INTEGER \fIRESULTLEN\fP, \fIIERROR\fP .fi .SH C++ Syntax @@ -42,7 +42,7 @@ Length (in characters) of result returned in \fIversion\fP (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R diff --git a/ompi/mpi/man/man3/MPI_Get_processor_name.3in b/ompi/mpi/man/man3/MPI_Get_processor_name.3in index 0ad2f3a7da2..a59997f7dad 100644 --- a/ompi/mpi/man/man3/MPI_Get_processor_name.3in +++ b/ompi/mpi/man/man3/MPI_Get_processor_name.3in @@ -40,14 +40,14 @@ Length (in characters) of result returned in name. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This routine returns the name of the processor on which it was called at the moment of the call. The name is a character string for maximum flexibility. From this value it must be possible to identify a specific piece of hardware. The argument name must represent storage that is at least MPI_MAX_PROCESSOR_NAME characters long. +This routine returns the name of the processor on which it was called at the moment of the call. The name is a character string for maximum flexibility. From this value it must be possible to identify a specific piece of hardware. The argument name must represent storage that is at least MPI_MAX_PROCESSOR_NAME characters long. .sp The number of characters actually written is returned in the output -argument, resultlen. +argument, resultlen. .sp .SH NOTES .ft R @@ -58,7 +58,7 @@ The user must provide at least MPI_MAX_PROCESSOR_NAME space to write the process Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Get_version.3in b/ompi/mpi/man/man3/MPI_Get_version.3in index 3095e232ec5..44448723428 100644 --- a/ompi/mpi/man/man3/MPI_Get_version.3in +++ b/ompi/mpi/man/man3/MPI_Get_version.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Get_version 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Get_version\fP \- Returns the version of the standard corresponding to the current implementation. +\fBMPI_Get_version\fP \- Returns the version of the standard corresponding to the current implementation. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Get_version(int \fI*version\fP, int \fI*subversion\fP) .nf INCLUDE 'mpif.h' MPI_GET_VERSION(\fIVERSION\fP, \fISUBVERSION\fP, \fIIERROR\fP) - INTEGER \fIVERSION\fP, \fISUBVERSION\fP, \fIIERROR\fP + INTEGER \fIVERSION\fP, \fISUBVERSION\fP, \fIIERROR\fP .fi .SH C++ Syntax @@ -42,20 +42,20 @@ The minor version number of the corresponding standard (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Since Open MPI is MPI 2.1 compliant, this function will return a version value of 2 and a subversion value of 1 for this release. +Since Open MPI is MPI 2.1 compliant, this function will return a version value of 2 and a subversion value of 1 for this release. .SH NOTE .ft R -MPI_Get_version is one of the few functions that can be called before MPI_Init and after MPI_Finalize. +MPI_Get_version is one of the few functions that can be called before MPI_Init and after MPI_Finalize. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Graph_create.3in b/ompi/mpi/man/man3/MPI_Graph_create.3in index b31c92e55e1..fe586375d6b 100644 --- a/ompi/mpi/man/man3/MPI_Graph_create.3in +++ b/ompi/mpi/man/man3/MPI_Graph_create.3in @@ -30,8 +30,8 @@ MPI_GRAPH_CREATE(\fICOMM_OLD, NNODES, INDEX, EDGES, REORDER, .SH C++ Syntax .nf #include -Graphcomm Intracomm::Create_graph(int \fInnodes\fP, const int \fIindex\fP[], - const int \fIedges\fP[], bool \fIreorder\fP) const +Graphcomm Intracomm::Create_graph(int \fInnodes\fP, const int \fIindex\fP[], + const int \fIedges\fP[], bool \fIreorder\fP) const .fi .SH INPUT PARAMETERS @@ -60,11 +60,11 @@ Communicator with graph topology added (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Graph_create returns a handle to a new communicator to which the graph topology information is attached. If reorder = false then the rank of each process in the new group is identical to its rank in the old group. Otherwise, the function may reorder the processes. If the size, nnodes, of the graph is smaller than the size of the group of comm_old, then some processes are returned MPI_COMM_NULL, in analogy to MPI_Cart_create and MPI_Comm_split. The call is erroneous if it specifies a graph that is larger than the group size of the input communicator. +MPI_Graph_create returns a handle to a new communicator to which the graph topology information is attached. If reorder = false then the rank of each process in the new group is identical to its rank in the old group. Otherwise, the function may reorder the processes. If the size, nnodes, of the graph is smaller than the size of the group of comm_old, then some processes are returned MPI_COMM_NULL, in analogy to MPI_Cart_create and MPI_Comm_split. The call is erroneous if it specifies a graph that is larger than the group size of the input communicator. .sp The three parameters nnodes, index, and edges define the graph structure. nnodes is the number of nodes of the graph. The nodes are numbered from 0 to nnodes-1. The ith entry of array index stores the total number of neighbors of the first i graph nodes. The lists of neighbors of nodes 0,\ 1,\ ..., nnodes-1 are stored in consecutive locations in array edges. The array edges is a flattened representation of the edge lists. The total number of entries in index is nnodes and the total number of entries in edges is equal to the number of graph edges. .sp @@ -91,18 +91,18 @@ Then, the input arguments are: Thus, in C, index[0] is the degree of node zero, and index[i] - index[i-1] is the degree of node i, i=1, . . . , nnodes-1; the list of neighbors of node zero is stored in edges[j], for 0 <= j <= index[0] - 1 and the list of -neighbors of node i, i > 0 , is stored in edges[j], index[i-1] <= j <= index[i] - 1. +neighbors of node i, i > 0 , is stored in edges[j], index[i-1] <= j <= index[i] - 1. .sp In Fortran, index(1) is the degree of node zero, and index(i+1) - index(i) is the degree of node i, i=1, . . . , nnodes-1; the list of neighbors of node zero is stored in edges(j), for 1 <= j <= index(1) and the list of -neighbors of node i, i > 0, is stored in edges(j), index(i) + 1 <= j <= index(i + 1). +neighbors of node i, i > 0, is stored in edges(j), index(i) + 1 <= j <= index(i + 1). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Graph_get.3in b/ompi/mpi/man/man3/MPI_Graph_get.3in index 7f3e747ff1b..4ae1dc2ba76 100644 --- a/ompi/mpi/man/man3/MPI_Graph_get.3in +++ b/ompi/mpi/man/man3/MPI_Graph_get.3in @@ -21,14 +21,14 @@ int MPI_Graph_get(MPI_Comm \fIcomm\fP, int\fI maxindex\fP, int\fI maxedges\fP, INCLUDE 'mpif.h' MPI_GRAPH_GET(\fICOMM, MAXINDEX, MAXEDGES, INDEX, EDGES, IERROR\fP) INTEGER \fICOMM, MAXINDEX, MAXEDGES, INDEX(*)\fP - INTEGER \fIEDGES(*), IERROR\fP + INTEGER \fIEDGES(*), IERROR\fP .fi .SH C++ Syntax .nf #include -void Graphcomm::Get_topo(int \fImaxindex\fP, int \fImaxedges\fP, - int \fIindex\fP[], int \fIedges\fP[]) const +void Graphcomm::Get_topo(int \fImaxindex\fP, int \fImaxedges\fP, + int \fIindex\fP[], int \fIedges\fP[]) const .fi .SH INPUT PARAMETERS @@ -55,7 +55,7 @@ Array of integers containing the graph structure. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -67,7 +67,7 @@ The information provided by MPI_Graphdims_get can be used to dimension the vecto Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Graph_map.3in b/ompi/mpi/man/man3/MPI_Graph_map.3in index 260bf6095ce..79f4b747bed 100644 --- a/ompi/mpi/man/man3/MPI_Graph_map.3in +++ b/ompi/mpi/man/man3/MPI_Graph_map.3in @@ -21,14 +21,14 @@ int MPI_Graph_map(MPI_Comm \fIcomm\fP, int\fI nnodes\fP, const int\fI index\fP[] .nf INCLUDE 'mpif.h' MPI_GRAPH_MAP(\fICOMM, NNODES, INDEX, EDGES, NEWRANK, IERROR\fP) - INTEGER \fICOMM, NNODES, INDEX(*), EDGES(*), NEWRANK, IERROR\fP + INTEGER \fICOMM, NNODES, INDEX(*), EDGES(*), NEWRANK, IERROR\fP .fi .SH C++ Syntax .nf #include -int Graphcomm::Map(int \fInnodes\fP, const int \fIindex\fP[], - const int \fIedges\fP[]) const +int Graphcomm::Map(int \fInnodes\fP, const int \fIindex\fP[], + const int \fIedges\fP[]) const .fi .SH INPUT PARAMETERS @@ -54,18 +54,18 @@ Reordered rank of the calling process; MPI_UNDEFINED if the calling process does .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Cart_map and MPI_Graph_map can be used to implement all other topology -functions. In general they will not be called by the user directly, unless he or she is creating additional virtual topology capability other than that provided by MPI. +functions. In general they will not be called by the user directly, unless he or she is creating additional virtual topology capability other than that provided by MPI. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .sp diff --git a/ompi/mpi/man/man3/MPI_Graph_neighbors.3in b/ompi/mpi/man/man3/MPI_Graph_neighbors.3in index a5fe5bfc92a..5b0e29195db 100644 --- a/ompi/mpi/man/man3/MPI_Graph_neighbors.3in +++ b/ompi/mpi/man/man3/MPI_Graph_neighbors.3in @@ -20,14 +20,14 @@ int MPI_Graph_neighbors(MPI_Comm \fIcomm\fP, int\fI rank\fP, int\fI maxneighbors .nf INCLUDE 'mpif.h' MPI_GRAPH_NEIGHBORS(\fICOMM, RANK, MAXNEIGHBORS, NEIGHBORS, IERROR\fP) - INTEGER \fICOMM, RANK, MAXNEIGHBORS, NEIGHBORS(*), IERROR\fP + INTEGER \fICOMM, RANK, MAXNEIGHBORS, NEIGHBORS(*), IERROR\fP .fi .SH C++ Syntax .nf #include -void Graphcomm::Get_neighbors(int \fIrank\fP, int \fImaxneighbors\fP, - int \fIneighbors\fP[]) const +void Graphcomm::Get_neighbors(int \fIrank\fP, int \fImaxneighbors\fP, + int \fIneighbors\fP[]) const .fi .SH INPUT PARAMETERS @@ -50,7 +50,7 @@ Ranks of processes that are neighbors to specified process (array of integers). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -73,18 +73,18 @@ topology. The group has 2n members. Each process is labeled by a(1),\ ..., a(n) Suppose that the communicator comm has this topology associated with it. The following code fragment cycles through the three types of neighbors and performs an appropriate permutation for each. .sp .nf -C assume: each process has stored a real number A. -C extract neighborhood information - CALL MPI_COMM_RANK(comm, myrank, ierr) - CALL MPI_GRAPH_NEIGHBORS(comm, myrank, 3, neighbors, ierr) -C perform exchange permutation - CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(1), 0, - + neighbors(1), 0, comm, status, ierr) -C perform shuffle permutation - CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(2), 0, - + neighbors(3), 0, comm, status, ierr) -C perform unshuffle permutation - CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(3), 0, +C assume: each process has stored a real number A. +C extract neighborhood information + CALL MPI_COMM_RANK(comm, myrank, ierr) + CALL MPI_GRAPH_NEIGHBORS(comm, myrank, 3, neighbors, ierr) +C perform exchange permutation + CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(1), 0, + + neighbors(1), 0, comm, status, ierr) +C perform shuffle permutation + CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(2), 0, + + neighbors(3), 0, comm, status, ierr) +C perform unshuffle permutation + CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(3), 0, + neighbors(2), 0, comm, status, ierr) .fi @@ -92,7 +92,7 @@ C perform unshuffle permutation Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Graph_neighbors_count.3in b/ompi/mpi/man/man3/MPI_Graph_neighbors_count.3in index ae7f9401d2a..14aca310a3a 100644 --- a/ompi/mpi/man/man3/MPI_Graph_neighbors_count.3in +++ b/ompi/mpi/man/man3/MPI_Graph_neighbors_count.3in @@ -20,7 +20,7 @@ int MPI_Graph_neighbors_count(MPI_Comm \fIcomm\fP, int\fI rank\fP, .nf INCLUDE 'mpif.h' MPI_GRAPH_NEIGHBORS_COUNT(\fICOMM, RANK, NNEIGHBORS, IERROR\fP) - INTEGER \fICOMM, RANK, NNEIGHBORS, IERROR\fP + INTEGER \fICOMM, RANK, NNEIGHBORS, IERROR\fP .fi .SH C++ Syntax @@ -46,17 +46,17 @@ Number of neighbors of specified process (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Graph_neighbors_count and MPI_Graph_neighbors provide adjacency information for a general, graph topology. MPI_Graph_neighbors_count returns the number of neighbors for the process signified by rank. +MPI_Graph_neighbors_count and MPI_Graph_neighbors provide adjacency information for a general, graph topology. MPI_Graph_neighbors_count returns the number of neighbors for the process signified by rank. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Graphdims_get.3in b/ompi/mpi/man/man3/MPI_Graphdims_get.3in index a0139e8bf5a..298c7a2245e 100644 --- a/ompi/mpi/man/man3/MPI_Graphdims_get.3in +++ b/ompi/mpi/man/man3/MPI_Graphdims_get.3in @@ -19,7 +19,7 @@ int MPI_Graphdims_get(MPI_Comm \fIcomm\fP, int\fI *nnodes\fP, int\fI *nedges\fP) .nf INCLUDE 'mpif.h' MPI_GRAPHDIMS_GET(\fICOMM, NNODES, NEDGES, IERROR\fP) - INTEGER \fICOMM, NNODES, NEDGES, IERROR\fP + INTEGER \fICOMM, NNODES, NEDGES, IERROR\fP .fi .SH C++ Syntax @@ -45,7 +45,7 @@ Number of edges in graph (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -57,7 +57,7 @@ The information provided by MPI_Graphdims_get can be used to dimension the vecto Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Grequest_complete.3in b/ompi/mpi/man/man3/MPI_Grequest_complete.3in index db6c8e9f689..9e9cd6cad1d 100644 --- a/ompi/mpi/man/man3/MPI_Grequest_complete.3in +++ b/ompi/mpi/man/man3/MPI_Grequest_complete.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Grequest_complete 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Grequest_complete \fP \- Reports that a generalized request is complete. +\fBMPI_Grequest_complete \fP \- Reports that a generalized request is complete. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Grequest_complete(MPI_Request \fIrequest\fP) .nf INCLUDE 'mpif.h' MPI_GREQUEST_COMPLETE(\fIREQUEST, IERROR\fP) - INTEGER \fIREQUEST, IERROR\fP + INTEGER \fIREQUEST, IERROR\fP .fi .SH C++ Syntax @@ -38,18 +38,18 @@ Generalized request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Grequest_complete informs MPI that the operations represented by the generalized request \fIrequest\fP are complete. A call to MPI_Wait(\fIrequest, status\fP) will return, and a call to MPI_Test(\fIrequest, flag, status\fP) will return flag=true only after a call to MPI_Grequest_complete has declared that these operations are complete. +MPI_Grequest_complete informs MPI that the operations represented by the generalized request \fIrequest\fP are complete. A call to MPI_Wait(\fIrequest, status\fP) will return, and a call to MPI_Test(\fIrequest, flag, status\fP) will return flag=true only after a call to MPI_Grequest_complete has declared that these operations are complete. .sp -MPI imposes no restrictions on the code executed by the callback functions. However, new nonblocking operations should be defined so that the general semantic rules about MPI calls such as MPI_Test, MPI_Request_free, or MPI_Cancel still hold. For example, all these calls are supposed to be local and nonblocking. Therefore, the callback functions \fIquery_fn\fP, \fIfree_fn\fP, or \fIcancel_fn\fP should invoke blocking MPI communication calls only if the context is such that these calls are guaranteed to return in finite time. Once MPI_Cancel has been invoked, the canceled operation should complete in finite time, regardless of the state of other processes (the operation has acquired "local" semantics). It should either succeed or fail without side-effects. The user should guarantee these same properties for newly defined operations. +MPI imposes no restrictions on the code executed by the callback functions. However, new nonblocking operations should be defined so that the general semantic rules about MPI calls such as MPI_Test, MPI_Request_free, or MPI_Cancel still hold. For example, all these calls are supposed to be local and nonblocking. Therefore, the callback functions \fIquery_fn\fP, \fIfree_fn\fP, or \fIcancel_fn\fP should invoke blocking MPI communication calls only if the context is such that these calls are guaranteed to return in finite time. Once MPI_Cancel has been invoked, the canceled operation should complete in finite time, regardless of the state of other processes (the operation has acquired "local" semantics). It should either succeed or fail without side-effects. The user should guarantee these same properties for newly defined operations. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Grequest_start.3in b/ompi/mpi/man/man3/MPI_Grequest_start.3in index 50f7d9c843f..35a158608b2 100644 --- a/ompi/mpi/man/man3/MPI_Grequest_start.3in +++ b/ompi/mpi/man/man3/MPI_Grequest_start.3in @@ -5,15 +5,15 @@ .\" $COPYRIGHT$ .TH MPI_Grequest_start 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Grequest_start \fP \- Starts a generalized request and returns a handle to it in \fIrequest\fP. +\fBMPI_Grequest_start \fP \- Starts a generalized request and returns a handle to it in \fIrequest\fP. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Grequest_start(MPI_Grequest_query_function \fI*query_fn\fP, - MPI_Grequest_free_function \fI*free_fn\fP, +int MPI_Grequest_start(MPI_Grequest_query_function \fI*query_fn\fP, + MPI_Grequest_free_function \fI*free_fn\fP, MPI_Grequest_cancel_function \fI*cancel_fn\fP, void \fI*extra_state\fP, MPI_Request \fI*request\fP) @@ -21,7 +21,7 @@ int MPI_Grequest_start(MPI_Grequest_query_function \fI*query_fn\fP, .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_GREQUEST_START(\fIQUERY_FN, FREE_FN, CANCEL_FN, EXTRA_STATE, +MPI_GREQUEST_START(\fIQUERY_FN, FREE_FN, CANCEL_FN, EXTRA_STATE, REQUEST, IERROR\fP) INTEGER \fIREQUEST, IERROR\fP EXTERNAL \fIQUERY_FN, FREE_FN, CANCEL_FN\fP @@ -61,7 +61,7 @@ Generalized request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -91,7 +91,7 @@ and in C++, it is .sp The \fIquery_fn\fP function computes the status that should be returned for the generalized request. The status also includes information about successful/unsuccessful cancellation of the request (result to be returned by MPI_Test_cancelled). .sp -The \fIquery_fn\fP function is invoked by the MPI_{Wait|Test}{any|some|all} call that completed the generalized request associated with this callback. The callback function is also invoked by calls to MPI_Request_get_status if the request is complete when the call occurs. In both cases, the callback is passed a reference to the corresponding status variable passed by the user to the MPI call. If the user provided MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE to the MPI function that causes \fIquery_fn\fP to be called, then MPI will pass a valid status object to \fIquery_fn\fP, and this status will be ignored upon return of the callback function. Note that \fIquery_fn\fP is invoked only after MPI_Grequest_complete is called on the request; it may be invoked several times for the same generalized request. Note also that a call to MPI_{Wait|Test}{some|all} may cause multiple invocations of \fIquery_fn\fP callback functions, one for each generalized request that is completed by the MPI call. The order of these invocations is not specified by MPI. +The \fIquery_fn\fP function is invoked by the MPI_{Wait|Test}{any|some|all} call that completed the generalized request associated with this callback. The callback function is also invoked by calls to MPI_Request_get_status if the request is complete when the call occurs. In both cases, the callback is passed a reference to the corresponding status variable passed by the user to the MPI call. If the user provided MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE to the MPI function that causes \fIquery_fn\fP to be called, then MPI will pass a valid status object to \fIquery_fn\fP, and this status will be ignored upon return of the callback function. Note that \fIquery_fn\fP is invoked only after MPI_Grequest_complete is called on the request; it may be invoked several times for the same generalized request. Note also that a call to MPI_{Wait|Test}{some|all} may cause multiple invocations of \fIquery_fn\fP callback functions, one for each generalized request that is completed by the MPI call. The order of these invocations is not specified by MPI. .sp In C, the free function is .sp @@ -115,9 +115,9 @@ And in C++, it is .sp The \fIfree_fn\fP callback function is invoked to clean up user-allocated resources when the generalized request is freed. .sp -The \fIfree_fn\fP function is invoked by the MPI_{Wait|Test}{any|some|all} call that completed the generalized request associated with this callback. \fIfree_fn\fP is invoked after the call to \fIquery_fn\fP for the same request. However, if the MPI call completed multiple generalized requests, the order in which \fIfree_fn\fP callback functions are invoked is not specified by MPI. +The \fIfree_fn\fP function is invoked by the MPI_{Wait|Test}{any|some|all} call that completed the generalized request associated with this callback. \fIfree_fn\fP is invoked after the call to \fIquery_fn\fP for the same request. However, if the MPI call completed multiple generalized requests, the order in which \fIfree_fn\fP callback functions are invoked is not specified by MPI. .sp -The \fIfree_fn\fP callback is also invoked for generalized requests that are freed by a call to MPI_Request_free (no call to MPI_{Wait|Test}{any|some|all} will occur for such a request). In this case, the callback function will be called either in the MPI call MPI_Request_free(request) or in the MPI call MPI_Grequest_complete(request), whichever happens last. In other words, in this case the actual freeing code is executed as soon as both calls (MPI_Request_free and MPI_Grequest_complete) have occurred. The \fIrequest\fP is not deallocated until after \fIfree_fn\fP completes. Note that \fIfree_fn\fP will be invoked only once per request by a correct program. +The \fIfree_fn\fP callback is also invoked for generalized requests that are freed by a call to MPI_Request_free (no call to MPI_{Wait|Test}{any|some|all} will occur for such a request). In this case, the callback function will be called either in the MPI call MPI_Request_free(request) or in the MPI call MPI_Grequest_complete(request), whichever happens last. In other words, in this case the actual freeing code is executed as soon as both calls (MPI_Request_free and MPI_Grequest_complete) have occurred. The \fIrequest\fP is not deallocated until after \fIfree_fn\fP completes. Note that \fIfree_fn\fP will be invoked only once per request by a correct program. .sp In C, the cancel function is .sp @@ -160,11 +160,11 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .sp -All callback functions return an error code. The code is passed back and dealt with as appropriate for the error code by the MPI function that invoked the callback function. For example, if error codes are returned, then the error code returned by the callback function will be returned by the MPI function that invoked the callback function. In the case of a MPI_{Wait|Test}any call that invokes both \fIquery_fn\fP and \fIfree_fn\fP, the MPI call will return the error code returned by the last callback, namely \fIfree_fn\fP. If one or more of the requests in a call to MPI_{Wait|Test}{some|all} has failed, then the MPI call will return MPI_ERR_IN_STATUS. In such a case, if the MPI call was passed an array of statuses, then MPI will return in each of the statuses that correspond to a completed generalized request the error code returned by the corresponding invocation of its \fIfree_fn\fP callback function. However, if the MPI function was passed MPI_STATUSES_IGNORE, then the individual error codes returned by each callback function will be lost. +All callback functions return an error code. The code is passed back and dealt with as appropriate for the error code by the MPI function that invoked the callback function. For example, if error codes are returned, then the error code returned by the callback function will be returned by the MPI function that invoked the callback function. In the case of a MPI_{Wait|Test}any call that invokes both \fIquery_fn\fP and \fIfree_fn\fP, the MPI call will return the error code returned by the last callback, namely \fIfree_fn\fP. If one or more of the requests in a call to MPI_{Wait|Test}{some|all} has failed, then the MPI call will return MPI_ERR_IN_STATUS. In such a case, if the MPI call was passed an array of statuses, then MPI will return in each of the statuses that correspond to a completed generalized request the error code returned by the corresponding invocation of its \fIfree_fn\fP callback function. However, if the MPI function was passed MPI_STATUSES_IGNORE, then the individual error codes returned by each callback function will be lost. .sp -See the MPI man page for a full list of MPI error codes. +See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Group_compare.3in b/ompi/mpi/man/man3/MPI_Group_compare.3in index 598e818e853..0dec5e9bc0a 100644 --- a/ompi/mpi/man/man3/MPI_Group_compare.3in +++ b/ompi/mpi/man/man3/MPI_Group_compare.3in @@ -19,7 +19,7 @@ int MPI_Group_compare(MPI_Group \fIgroup1\fP, MPI_Group\fI group2\fP, .nf INCLUDE 'mpif.h' MPI_GROUP_COMPARE(\fIGROUP1, GROUP2, RESULT, IERROR\fP) - INTEGER \fIGROUP1, GROUP2, RESULT, IERROR\fP + INTEGER \fIGROUP1, GROUP2, RESULT, IERROR\fP .fi .SH C++ Syntax @@ -45,15 +45,15 @@ Integer which is MPI_IDENT if the order and members of the two groups are the sa .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_IDENT results if the group members and group order is exactly the same in both groups. This happens for instance if group1 and group2 are the same handle. MPI_SIMILAR results if the group members are the same but the order is different. MPI_UNEQUAL results otherwise. +MPI_IDENT results if the group members and group order is exactly the same in both groups. This happens for instance if group1 and group2 are the same handle. MPI_SIMILAR results if the group members are the same but the order is different. MPI_UNEQUAL results otherwise. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Group_difference.3in b/ompi/mpi/man/man3/MPI_Group_difference.3in index 769699f0b99..4d7ee723514 100644 --- a/ompi/mpi/man/man3/MPI_Group_difference.3in +++ b/ompi/mpi/man/man3/MPI_Group_difference.3in @@ -20,7 +20,7 @@ int MPI_Group_difference(MPI_Group \fIgroup1\fP, MPI_Group\fI group2\fP, .nf INCLUDE 'mpif.h' MPI_GROUP_DIFFERENCE(\fIGROUP1, GROUP2, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP1, GROUP2, NEWGROUP, IERROR\fP + INTEGER \fIGROUP1, GROUP2, NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -46,7 +46,7 @@ Difference group (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -63,7 +63,7 @@ group, ordered as in first group o difference -- all elements of the first group that are not in the second group, ordered as in the first group .LP -Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible) and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative. +Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible) and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative. .sp The new group can be empty, that is, equal to MPI_GROUP_EMPTY. @@ -71,7 +71,7 @@ The new group can be empty, that is, equal to MPI_GROUP_EMPTY. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Group_free diff --git a/ompi/mpi/man/man3/MPI_Group_excl.3in b/ompi/mpi/man/man3/MPI_Group_excl.3in index 1b6cfd75f4c..eb5ec8c053f 100644 --- a/ompi/mpi/man/man3/MPI_Group_excl.3in +++ b/ompi/mpi/man/man3/MPI_Group_excl.3in @@ -21,7 +21,7 @@ int MPI_Group_excl(MPI_Group \fIgroup\fP, int\fI n\fP, const int\fI ranks\fP[], .nf INCLUDE 'mpif.h' MPI_GROUP_EXCL(\fIGROUP, N, RANKS, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP, N, RANKS(*), NEWGROUP, IERROR\fP + INTEGER \fIGROUP, N, RANKS(*), NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -50,21 +50,21 @@ New group derived from above, preserving the order defined by group (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The function MPI_Group_excl creates a group of processes newgroup that is obtained by deleting from group those processes with ranks ranks[0], \&... ranks[n-1]. The ordering of processes in newgroup is identical to the ordering in group. Each of the n elements of ranks must be a valid rank in group and all elements must be distinct; otherwise, the call is erroneous. If n = 0, then newgroup is identical to group. +The function MPI_Group_excl creates a group of processes newgroup that is obtained by deleting from group those processes with ranks ranks[0], \&... ranks[n-1]. The ordering of processes in newgroup is identical to the ordering in group. Each of the n elements of ranks must be a valid rank in group and all elements must be distinct; otherwise, the call is erroneous. If n = 0, then newgroup is identical to group. .SH NOTE .ft R -Currently, each of the ranks to exclude must be a valid rank in the group and all elements must be distinct or the function is erroneous. This restriction is per the draft. +Currently, each of the ranks to exclude must be a valid rank in the group and all elements must be distinct or the function is erroneous. This restriction is per the draft. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Group_free.3in b/ompi/mpi/man/man3/MPI_Group_free.3in index 74eed8709f2..c406a47f37f 100644 --- a/ompi/mpi/man/man3/MPI_Group_free.3in +++ b/ompi/mpi/man/man3/MPI_Group_free.3in @@ -19,7 +19,7 @@ int MPI_Group_free(MPI_Group *\fIgroup\fP) .nf INCLUDE 'mpif.h' MPI_GROUP_FREE(\fIGROUP, IERROR\fP) - INTEGER \fIGROUP, IERROR\fP + INTEGER \fIGROUP, IERROR\fP .fi .SH C++ Syntax @@ -37,11 +37,11 @@ Group (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This operation marks a group object for deallocation. The handle group is set to MPI_GROUP_NULL by the call. Any ongoing operation using this group will complete normally. +This operation marks a group object for deallocation. The handle group is set to MPI_GROUP_NULL by the call. Any ongoing operation using this group will complete normally. .SH NOTE .ft R @@ -51,5 +51,5 @@ On return, group is set to MPI_GROUP_NULL. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Group_incl.3in b/ompi/mpi/man/man3/MPI_Group_incl.3in index 16e5c148ef5..3326420cc32 100644 --- a/ompi/mpi/man/man3/MPI_Group_incl.3in +++ b/ompi/mpi/man/man3/MPI_Group_incl.3in @@ -21,7 +21,7 @@ int MPI_Group_incl(MPI_Group \fIgroup\fP, int\fI n\fP, const int\fI ranks\fP[], .nf INCLUDE 'mpif.h' MPI_GROUP_INCL(\fIGROUP, N, RANKS, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP, N, RANKS(*), NEWGROUP, IERROR\fP + INTEGER \fIGROUP, N, RANKS(*), NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -50,7 +50,7 @@ New group derived from above, in the order defined by ranks (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -65,7 +65,7 @@ duplicates in the list of ranks. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Group_intersection.3in b/ompi/mpi/man/man3/MPI_Group_intersection.3in index dfc394c6186..3bddcd7465a 100644 --- a/ompi/mpi/man/man3/MPI_Group_intersection.3in +++ b/ompi/mpi/man/man3/MPI_Group_intersection.3in @@ -20,7 +20,7 @@ int MPI_Group_intersection(MPI_Group \fIgroup1\fP, MPI_Group\fI group2\fP, .nf INCLUDE 'mpif.h' MPI_GROUP_INTERSECTION(\fIGROUP1, GROUP2, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP1, GROUP2, NEWGROUP, IERROR\fP + INTEGER \fIGROUP1, GROUP2, NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -46,7 +46,7 @@ Intersection group (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -61,9 +61,9 @@ intersect -- all elements of the first group that are also in the second group, ordered as in first group. .TP o -difference -- all elements of the first group that are not in the second group, ordered as in the first group. +difference -- all elements of the first group that are not in the second group, ordered as in the first group. .LP -Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible) and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative. +Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible) and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative. .sp The new group can be empty, that is, equal to MPI_GROUP_EMPTY. @@ -71,7 +71,7 @@ The new group can be empty, that is, equal to MPI_GROUP_EMPTY. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Group_free diff --git a/ompi/mpi/man/man3/MPI_Group_range_excl.3in b/ompi/mpi/man/man3/MPI_Group_range_excl.3in index 96c1824b777..7d4aa8c27ae 100644 --- a/ompi/mpi/man/man3/MPI_Group_range_excl.3in +++ b/ompi/mpi/man/man3/MPI_Group_range_excl.3in @@ -20,7 +20,7 @@ int MPI_Group_range_excl(MPI_Group \fIgroup\fP, int\fI n\fP, int\fI ranges\fP[][ .nf INCLUDE 'mpif.h' MPI_GROUP_RANGE_EXCL(\fIGROUP, N, RANGES, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP, N, RANGES(3,*), NEWGROUP, IERROR\fP + INTEGER \fIGROUP, N, RANGES(3,*), NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -49,11 +49,11 @@ New group derived from above, preserving the order in group (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Each computed rank must be a valid rank in group and all computed ranks must be distinct, or else the program is erroneous. +Each computed rank must be a valid rank in group and all computed ranks must be distinct, or else the program is erroneous. .sp The functionality of this routine is specified to be equivalent to expanding the array of ranges to an array of the excluded ranks and passing the resulting array of ranks and other arguments to MPI_Group_excl. A call to MPI_Group_excl is equivalent to a call to MPI_Group_range_excl with each rank i in ranks replaced by the triplet (i,i,1) in the argument ranges. @@ -62,12 +62,12 @@ expanding the array of ranges to an array of the excluded ranks and passing the Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R .sp -MPI_Group_excl +MPI_Group_excl .br MPI_Group_free .br diff --git a/ompi/mpi/man/man3/MPI_Group_range_incl.3in b/ompi/mpi/man/man3/MPI_Group_range_incl.3in index 9a2609046d4..1e8f4bd5c39 100644 --- a/ompi/mpi/man/man3/MPI_Group_range_incl.3in +++ b/ompi/mpi/man/man3/MPI_Group_range_incl.3in @@ -20,7 +20,7 @@ int MPI_Group_range_incl(MPI_Group \fIgroup\fP, int\fI n\fP, int\fI ranges\fP[][ .nf INCLUDE 'mpif.h' MPI_GROUP_RANGE_INCL(\fIGROUP, N, RANGES, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP, N, RANGES(3,*), NEWGROUP, IERROR\fP + INTEGER \fIGROUP, N, RANGES(3,*), NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -49,11 +49,11 @@ New group derived from above, in the order defined by ranges (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -If ranges consist of the triplets +If ranges consist of the triplets .sp .nf (first1, last1, stride1),\ ..., (firstn, lastn, striden) @@ -83,12 +83,12 @@ This implementation does not currently check to see that the list of ranges to i Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R .sp -MPI_Group_incl +MPI_Group_incl .br MPI_Group_free diff --git a/ompi/mpi/man/man3/MPI_Group_rank.3in b/ompi/mpi/man/man3/MPI_Group_rank.3in index b777420c0eb..35f94efc58a 100644 --- a/ompi/mpi/man/man3/MPI_Group_rank.3in +++ b/ompi/mpi/man/man3/MPI_Group_rank.3in @@ -18,8 +18,8 @@ int MPI_Group_rank(MPI_Group \fIgroup\fP, int *\fIrank\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_GROUP_RANK(\fIGROUP, RANK, IERROR\fP) - INTEGER \fIGROUP, RANK, IERROR\fP +MPI_GROUP_RANK(\fIGROUP, RANK, IERROR\fP) + INTEGER \fIGROUP, RANK, IERROR\fP .fi .SH C++ Syntax @@ -42,7 +42,7 @@ Rank of the calling process in group, or MPI_UNDEFINED if the process is not a m .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -52,5 +52,5 @@ MPI_Group_rank returns as the output parameter \fIrank\fP the rank of the callin Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Group_size.3in b/ompi/mpi/man/man3/MPI_Group_size.3in index cddca0b2c58..200312d4a60 100644 --- a/ompi/mpi/man/man3/MPI_Group_size.3in +++ b/ompi/mpi/man/man3/MPI_Group_size.3in @@ -42,7 +42,7 @@ Number of processes in the group (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -52,5 +52,5 @@ MPI_Group_size returns in \fIsize\fP the number of processes in the group. Thus, Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Group_translate_ranks.3in b/ompi/mpi/man/man3/MPI_Group_translate_ranks.3in index 7af79b194d3..c700f995d2b 100644 --- a/ompi/mpi/man/man3/MPI_Group_translate_ranks.3in +++ b/ompi/mpi/man/man3/MPI_Group_translate_ranks.3in @@ -22,14 +22,14 @@ int MPI_Group_translate_ranks(MPI_Group \fIgroup1\fP, int\fI n\fP, INCLUDE 'mpif.h' MPI_GROUP_TRANSLATE_RANKS(\fIGROUP1, N, RANKS1, GROUP2, RANKS2, IERROR\fP) - INTEGER \fIGROUP1, N, RANKS1(*), GROUP2, RANKS2(*), IERROR\fP + INTEGER \fIGROUP1, N, RANKS1(*), GROUP2, RANKS2(*), IERROR\fP .fi .SH C++ Syntax .nf #include -static void Group::Translate_ranks (const Group& \fIgroup1\fP, int \fIn\fP, - const int \fIranks1\fP[], const Group& \fIgroup2\fP, int \fIranks2\fP[]) +static void Group::Translate_ranks (const Group& \fIgroup1\fP, int \fIn\fP, + const int \fIranks1\fP[], const Group& \fIgroup2\fP, int \fIranks2\fP[]) .fi .SH INPUT PARAMETERS @@ -51,11 +51,11 @@ Second group (handle). .ft R .TP 1i ranks2 -Array of corresponding ranks in group2, MPI_UNDEFINED when no correspondence exists. +Array of corresponding ranks in group2, MPI_UNDEFINED when no correspondence exists. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -65,5 +65,5 @@ This function is important for determining the relative numbering of the same pr Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Group_union.3in b/ompi/mpi/man/man3/MPI_Group_union.3in index f176acb768a..028f9d35f19 100644 --- a/ompi/mpi/man/man3/MPI_Group_union.3in +++ b/ompi/mpi/man/man3/MPI_Group_union.3in @@ -20,7 +20,7 @@ int MPI_Group_union(MPI_Group \fIgroup1\fP, MPI_Group \fIgroup2\fP, .nf INCLUDE 'mpif.h' MPI_GROUP_UNION(\fIGROUP1, GROUP2, NEWGROUP, IERROR\fP) - INTEGER \fIGROUP1, GROUP2, NEWGROUP, IERROR\fP + INTEGER \fIGROUP1, GROUP2, NEWGROUP, IERROR\fP .fi .SH C++ Syntax @@ -46,7 +46,7 @@ Union group (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -61,10 +61,10 @@ intersect -- all elements of the first group that are also in the second group, ordered as in first group. .TP o -difference -- all elements of the first group that are not in the second group, ordered as in the first group. +difference -- all elements of the first group that are not in the second group, ordered as in the first group. .sp .LP -Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible) and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative. +Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible) and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative. .sp The new group can be empty, that is, equal to MPI_GROUP_EMPTY. @@ -72,7 +72,7 @@ The new group can be empty, that is, equal to MPI_GROUP_EMPTY. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Group_free diff --git a/ompi/mpi/man/man3/MPI_Ibsend.3in b/ompi/mpi/man/man3/MPI_Ibsend.3in index 12975d24fe7..e061c23ee42 100644 --- a/ompi/mpi/man/man3/MPI_Ibsend.3in +++ b/ompi/mpi/man/man3/MPI_Ibsend.3in @@ -22,13 +22,13 @@ int MPI_Ibsend(const void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\ INCLUDE 'mpif.h' MPI_IBSEND(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Request Comm::Ibsend(const void* \fIbuf\fP, int \fIcount\fP, const +Request Comm::Ibsend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -61,11 +61,11 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Ibsend posts a buffered-mode, nonblocking send. Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. +MPI_Ibsend posts a buffered-mode, nonblocking send. Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. .sp A nonblocking send call indicates that the system may start copying data out of the send buffer. The sender should not modify any part of the send buffer after a nonblocking send operation is called, until the send completes. @@ -73,7 +73,7 @@ A nonblocking send call indicates that the system may start copying data out of Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Test diff --git a/ompi/mpi/man/man3/MPI_Improbe.3in b/ompi/mpi/man/man3/MPI_Improbe.3in index 5d16fae4531..9abfcdf8c80 100644 --- a/ompi/mpi/man/man3/MPI_Improbe.3in +++ b/ompi/mpi/man/man3/MPI_Improbe.3in @@ -13,7 +13,7 @@ .SH C Syntax .nf #include -int MPI_Improbe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, +int MPI_Improbe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, int\fI *flag\fP, MPI_Message\fI *message\fP, MPI_Status\fI *status\fP) .fi @@ -23,7 +23,7 @@ INCLUDE 'mpif.h' MPI_IMPROBE(\fISOURCE, TAG, COMM, FLAG, MESSAGE, STATUS, IERROR\fP) LOGICAL \fIFLAG\fP INTEGER \fISOURCE, TAG, COMM, MESSAGE\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -59,7 +59,7 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -88,7 +88,7 @@ This is an MPI-3 function and has no C++ binding. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ -functions do not return errors. +functions do not return errors. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for diff --git a/ompi/mpi/man/man3/MPI_Imrecv.3in b/ompi/mpi/man/man3/MPI_Imrecv.3in index e1ea13b4c8c..8d0dc0aedf1 100644 --- a/ompi/mpi/man/man3/MPI_Imrecv.3in +++ b/ompi/mpi/man/man3/MPI_Imrecv.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Imrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP, +int MPI_Imrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP, MPI_Message\fI *message\fP, MPI_Request\fI *request\fP) .fi @@ -21,7 +21,7 @@ int MPI_Imrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP, INCLUDE 'mpif.h' MPI_IMRECV(\fIBUF, COUNT, DATATYPE, MESSAGE, REQUEST, IERROR\fP) \fIBUF(*)\fP - INTEGER \fCOUNT, DATATYPE, MESSAGE, REQUEST, IERROR\fP + INTEGER \fCOUNT, DATATYPE, MESSAGE, REQUEST, IERROR\fP .fi .SH C++ Syntax @@ -51,7 +51,7 @@ request Request (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -72,7 +72,7 @@ is possible to cancel the returned request with MPI_Cancel. If MPI_Cancel succeeds, the matched message must be found by a subsequent message probe (MPI_Probe, MPI_Iprobe, MPI_Mprobe, or MPI_Improbe), received by a subsequent receive operation or canceled by the -sender. +sender. .sp Note, however, that is it possible for the cancellation of operations initiated with MPI_Imrecv to fail. An example of a failing case is @@ -87,7 +87,7 @@ This is an MPI-3 function and has no C++ binding. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ -functions do not return errors. +functions do not return errors. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for diff --git a/ompi/mpi/man/man3/MPI_Info_create.3in b/ompi/mpi/man/man3/MPI_Info_create.3in index 28c1fa02d73..624c0cf6d3b 100644 --- a/ompi/mpi/man/man3/MPI_Info_create.3in +++ b/ompi/mpi/man/man3/MPI_Info_create.3in @@ -19,7 +19,7 @@ int MPI_Info_create(MPI_Info \fI*info\fP) .nf INCLUDE 'mpif.h' MPI_INFO_CREATE(\fIINFO, IERROR\fP) - INTEGER \fIINFO, IERROR\fP + INTEGER \fIINFO, IERROR\fP .fi .SH C++ Syntax @@ -36,17 +36,17 @@ Info object created (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_create creates a new info object. The newly created object contains no key/value pairs. +MPI_Info_create creates a new info object. The newly created object contains no key/value pairs. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_delete.3in b/ompi/mpi/man/man3/MPI_Info_delete.3in index 471e3b2eab8..fa2bdc389e4 100644 --- a/ompi/mpi/man/man3/MPI_Info_delete.3in +++ b/ompi/mpi/man/man3/MPI_Info_delete.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Info_delete 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Info_delete\fP \- Deletes a key/value pair from \fIinfo\fP. +\fBMPI_Info_delete\fP \- Deletes a key/value pair from \fIinfo\fP. .SH SYNTAX .ft R @@ -20,7 +20,7 @@ int MPI_Info_delete(MPI_Info \fIinfo\fP, const char \fI*key\fP) .nf INCLUDE 'mpif.h' MPI_INFO_DELETE(\fIINFO, KEY, IERROR\fP) - INTEGER \fIINFO, IERROR\fP + INTEGER \fIINFO, IERROR\fP CHARACTER*(*) \fIKEY\fP .fi @@ -46,7 +46,7 @@ Key (string). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -56,7 +56,7 @@ MPI_Info_delete deletes a (key,value) pair from \fIinfo\fP. If \fIkey\fP is not Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_dup.3in b/ompi/mpi/man/man3/MPI_Info_dup.3in index 722d8dc1558..7cd21f587b0 100644 --- a/ompi/mpi/man/man3/MPI_Info_dup.3in +++ b/ompi/mpi/man/man3/MPI_Info_dup.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Info_dup 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Info_dup\fP \- Duplicates an info object. +\fBMPI_Info_dup\fP \- Duplicates an info object. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Info_dup(MPI_Info \fIinfo\fP, MPI_Info \fI*newinfo\fP) .nf INCLUDE 'mpif.h' MPI_INFO_DUP(\fIINFO, NEWINFO, IERROR\fP) - INTEGER \fIINFO, NEWINFO, IERROR\fP + INTEGER \fIINFO, NEWINFO, IERROR\fP .fi .SH C++ Syntax @@ -42,17 +42,17 @@ Info object (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_dup duplicates an existing info object, creating a new object, with the same (key,value) pairs and the same ordering of keys. +MPI_Info_dup duplicates an existing info object, creating a new object, with the same (key,value) pairs and the same ordering of keys. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_env.3in b/ompi/mpi/man/man3/MPI_Info_env.3in index 67d68a47724..c7ef970fa7d 100644 --- a/ompi/mpi/man/man3/MPI_Info_env.3in +++ b/ompi/mpi/man/man3/MPI_Info_env.3in @@ -17,7 +17,7 @@ The MPI-3 standard established a static MPI_Info object named \fIMPI_INFO_ENV\fP command If available, the value will be set to argv[0]. Note that the value may not always be available - e.g., it is valid for a program to call MPI_Init with NULL parameters, in which case argv[0] will not be set if run as a singleton. This value will never be set in a Fortran program as the argv are not available. .TP 1i -argv +argv The argv given for the application. If no arguments are passed to the application, then this value will not be set. It will also not be set in the case of a singleton that calls MPI_Init with NULL parameters, or a Fortran program. .TP 1i maxprocs @@ -42,7 +42,7 @@ thread_level The requested MPI thread level - note that this may differ from the \fIactual\fP MPI thread level of the application. .TP 1i ompi_num_apps -The number of application contexts in an MPMD job. +The number of application contexts in an MPMD job. This is an Open MPI-specific field and value. .TP 1i ompi_np diff --git a/ompi/mpi/man/man3/MPI_Info_free.3in b/ompi/mpi/man/man3/MPI_Info_free.3in index 49b93635429..2b851402ea2 100644 --- a/ompi/mpi/man/man3/MPI_Info_free.3in +++ b/ompi/mpi/man/man3/MPI_Info_free.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Info_free 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Info_free\fP \- Frees an info object. +\fBMPI_Info_free\fP \- Frees an info object. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Info_free(MPI_Info \fI*info\fP) .nf INCLUDE 'mpif.h' MPI_INFO_FREE(\fIINFO, IERROR\fP) - INTEGER \fIINFO, IERROR\fP + INTEGER \fIINFO, IERROR\fP .fi .SH C++ Syntax @@ -38,17 +38,17 @@ Info object (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_free frees \fIinfo\fP and sets it to MPI_INFO_NULL. +MPI_Info_free frees \fIinfo\fP and sets it to MPI_INFO_NULL. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_get.3in b/ompi/mpi/man/man3/MPI_Info_get.3in index c6b7366b732..cdb9534d25e 100644 --- a/ompi/mpi/man/man3/MPI_Info_get.3in +++ b/ompi/mpi/man/man3/MPI_Info_get.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Info_get 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Info_get\fP \- Retrieves the value associated with a key in an info object. +\fBMPI_Info_get\fP \- Retrieves the value associated with a key in an info object. .SH SYNTAX .ft R @@ -20,7 +20,7 @@ int MPI_Info_get(MPI_Info \fIinfo\fP, const char \fI*key\fP, int \fIvaluelen\fP, .nf INCLUDE 'mpif.h' MPI_INFO_GET(\fIINFO, KEY, VALUELEN, VALUE, FLAG, IERROR\fP) - INTEGER \fIINFO, VALUELEN, IERROR\fP + INTEGER \fIINFO, VALUELEN, IERROR\fP CHARACTER*(*) \fIKEY, VALUE\fP LOGICAL \fIFLAG\fP @@ -28,7 +28,7 @@ MPI_INFO_GET(\fIINFO, KEY, VALUELEN, VALUE, FLAG, IERROR\fP) .SH C++ Syntax .nf #include -bool MPI::Info::Get(const char* \fIkey\fP, int \fIvaluelen\fP, +bool MPI::Info::Get(const char* \fIkey\fP, int \fIvaluelen\fP, char* \fIvalue\fP) const .fi @@ -54,23 +54,23 @@ Value (string). .ft R .TP 1i flag -Returns true if key defined, false if not (boolean). +Returns true if key defined, false if not (boolean). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_get retrieves the value associated with \fIkey\fP in a previous call to MPI_Info_set. If such a key exists, it sets \fIflag\fP to true and returns the value in \fIvalue\fP; otherwise it sets \fIflag\fP to false and leaves \fIvalue\fP unchanged. \fIvaluelen\fP is the number of characters available in value. If it is less than the actual size of the value, the returned value is truncated. In C, \fIvaluelen\fP should be one less than the amount of allocated space to allow for the null terminator. +MPI_Info_get retrieves the value associated with \fIkey\fP in a previous call to MPI_Info_set. If such a key exists, it sets \fIflag\fP to true and returns the value in \fIvalue\fP; otherwise it sets \fIflag\fP to false and leaves \fIvalue\fP unchanged. \fIvaluelen\fP is the number of characters available in value. If it is less than the actual size of the value, the returned value is truncated. In C, \fIvaluelen\fP should be one less than the amount of allocated space to allow for the null terminator. .sp -If \fIkey\fP is larger than MPI_MAX_INFO_KEY, the call is erroneous. +If \fIkey\fP is larger than MPI_MAX_INFO_KEY, the call is erroneous. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_get_nkeys.3in b/ompi/mpi/man/man3/MPI_Info_get_nkeys.3in index 50a58e432a0..735e5db2832 100644 --- a/ompi/mpi/man/man3/MPI_Info_get_nkeys.3in +++ b/ompi/mpi/man/man3/MPI_Info_get_nkeys.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Info_get_nkeys 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Info_get_nkeys\fP \- Gets the number of keys currently defined in an info object. +\fBMPI_Info_get_nkeys\fP \- Gets the number of keys currently defined in an info object. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Info_get_nkeys(MPI_Info \fIinfo\fP, int \fI*nkeys\fP) .nf INCLUDE 'mpif.h' MPI_INFO_GET_NKEYS(\fIINFO, NKEYS, IERROR\fP) - INTEGER \fIINFO, NKEYS, IERROR\fP + INTEGER \fIINFO, NKEYS, IERROR\fP .fi .SH C++ Syntax @@ -38,21 +38,21 @@ Info object (handle). .ft R .TP 1i nkeys -Number of defined keys (integer). +Number of defined keys (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_get_nkeys returns the number of currently defined keys in \fIinfo\fP. +MPI_Info_get_nkeys returns the number of currently defined keys in \fIinfo\fP. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_get_nthkey.3in b/ompi/mpi/man/man3/MPI_Info_get_nthkey.3in index 1388b6a85bf..1137337e52d 100644 --- a/ompi/mpi/man/man3/MPI_Info_get_nthkey.3in +++ b/ompi/mpi/man/man3/MPI_Info_get_nthkey.3in @@ -19,7 +19,7 @@ int MPI_Info_get_nthkey(MPI_Info \fIinfo\fP, int \fIn\fP, char \fI*key\fP) .nf INCLUDE 'mpif.h' MPI_INFO_GET_NTHKEY(\fIINFO, N, KEY, IERROR\fP) - INTEGER \fIINFO, N, IERROR\fP + INTEGER \fIINFO, N, IERROR\fP CHARACTER*(*) \fIKEY\fP .fi @@ -43,21 +43,21 @@ Key number (integer). .ft R .TP 1i key -Key (string). +Key (string). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_get_nthkey returns the \fIn\fPth defined key in \fIinfo\fP. Keys are numbered 0\...\fIN\fP - 1 where \fIN\fP is the value returned by MPI_Info_get_nkeys. All keys between 0 and \fIN\fP - 1 are guaranteed to be defined. The number of a given key does not change as long as \fIinfo\fP is not modified with MPI_Info_set or MPI_Info_delete. +MPI_Info_get_nthkey returns the \fIn\fPth defined key in \fIinfo\fP. Keys are numbered 0\...\fIN\fP - 1 where \fIN\fP is the value returned by MPI_Info_get_nkeys. All keys between 0 and \fIN\fP - 1 are guaranteed to be defined. The number of a given key does not change as long as \fIinfo\fP is not modified with MPI_Info_set or MPI_Info_delete. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_get_valuelen.3in b/ompi/mpi/man/man3/MPI_Info_get_valuelen.3in index d82d2e403cf..6ede6b37616 100644 --- a/ompi/mpi/man/man3/MPI_Info_get_valuelen.3in +++ b/ompi/mpi/man/man3/MPI_Info_get_valuelen.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Info_get_valuelen 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Info_get_valuelen\fP \- Retrieves the length of the key value associated with an info object. +\fBMPI_Info_get_valuelen\fP \- Retrieves the length of the key value associated with an info object. .SH SYNTAX .ft R @@ -21,7 +21,7 @@ int MPI_Info_get_valuelen(MPI_Info \fIinfo\fP, const char \fI*key\fP, .nf INCLUDE 'mpif.h' MPI_INFO_GET_VALUELEN(\fIINFO, KEY, VALUELEN, FLAG, IERROR\fP) - INTEGER \fIINFO, VALUELEN, IERROR\fP + INTEGER \fIINFO, VALUELEN, IERROR\fP LOGICAL \fIFLAG\fP CHARACTER*(*) \fIKEY\fP @@ -29,7 +29,7 @@ MPI_INFO_GET_VALUELEN(\fIINFO, KEY, VALUELEN, FLAG, IERROR\fP) .SH C++ Syntax .nf #include -bool MPI::Info::Get_valuelen(const char* \fIkey\fP, int& \fIvaluelen\fP) +bool MPI::Info::Get_valuelen(const char* \fIkey\fP, int& \fIvaluelen\fP) const .fi @@ -51,23 +51,23 @@ Length of value arg (integer). .ft R .TP 1i flag -Returns true if key defined, false if not (boolean). +Returns true if key defined, false if not (boolean). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_get_valuelen retrieves the length of the \fIvalue\fP associated with \fIkey\fP. If \fIkey\fP is defined, \fIvaluelen\fP is set to the length of its associated value and \fIflag\fP is set to true. If \fIkey\fP is not defined, \fIvaluelen\fP is not touched and \fIflag\fP is set to false. The length returned in C or C++ does not include the end-of-string character. +MPI_Info_get_valuelen retrieves the length of the \fIvalue\fP associated with \fIkey\fP. If \fIkey\fP is defined, \fIvaluelen\fP is set to the length of its associated value and \fIflag\fP is set to true. If \fIkey\fP is not defined, \fIvaluelen\fP is not touched and \fIflag\fP is set to false. The length returned in C or C++ does not include the end-of-string character. .sp -If \fIkey\fP is larger than MPI_MAX_INFO_KEY, the call is erroneous. +If \fIkey\fP is larger than MPI_MAX_INFO_KEY, the call is erroneous. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Info_set.3in b/ompi/mpi/man/man3/MPI_Info_set.3in index 7e47d54caf9..705aeb83f38 100644 --- a/ompi/mpi/man/man3/MPI_Info_set.3in +++ b/ompi/mpi/man/man3/MPI_Info_set.3in @@ -19,7 +19,7 @@ int MPI_Info_set(MPI_Info \fIinfo\fP, char \fI*key\fP, char \fI*value\fP) .nf INCLUDE 'mpif.h' MPI_INFO_SET(\fIINFO, KEY, VALUE, IERROR\fP) - INTEGER \fIINFO, IERROR\fP + INTEGER \fIINFO, IERROR\fP CHARACTER*(*) \fIKEY, VALUE\fP .fi @@ -49,17 +49,17 @@ Value (string). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Info_set adds the (key,value) pair to \fIinfo\fP and overrides the value if a value for the same key was previously set. The \fIkey\fP and \fIvalue\fP parameters are null-terminated strings in C. In Fortran, leading and trailing spaces in \fIkey\fP and \fIvalue\fP are stripped. If either \fIkey\fP or \fIvalue\fP is larger than the allowed maximums, the error MPI_ERR_INFO_KEY or MPI_ERR_INFO_VALUE is raised, respectively. +MPI_Info_set adds the (key,value) pair to \fIinfo\fP and overrides the value if a value for the same key was previously set. The \fIkey\fP and \fIvalue\fP parameters are null-terminated strings in C. In Fortran, leading and trailing spaces in \fIkey\fP and \fIvalue\fP are stripped. If either \fIkey\fP or \fIvalue\fP is larger than the allowed maximums, the error MPI_ERR_INFO_KEY or MPI_ERR_INFO_VALUE is raised, respectively. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Init.3in b/ompi/mpi/man/man3/MPI_Init.3in index f98b7257cdf..603170260e1 100644 --- a/ompi/mpi/man/man3/MPI_Init.3in +++ b/ompi/mpi/man/man3/MPI_Init.3in @@ -21,7 +21,7 @@ int MPI_Init(int *\fIargc\fP, char ***\fIargv\fP) .nf INCLUDE 'mpif.h' MPI_INIT(\fIIERROR\fP) - INTEGER \fIIERROR\fP + INTEGER \fIIERROR\fP .fi .SH C++ Syntax @@ -44,7 +44,7 @@ C/C++ only: Argument vector. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -63,7 +63,7 @@ them: /* declare variables */ MPI_Init(&argc, &argv); /* parse arguments */ - /* main program */ + /* main program */ MPI_Finalize(); } .fi @@ -92,7 +92,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Init_thread.3in b/ompi/mpi/man/man3/MPI_Init_thread.3in index bbba48bac4d..2362235804e 100644 --- a/ompi/mpi/man/man3/MPI_Init_thread.3in +++ b/ompi/mpi/man/man3/MPI_Init_thread.3in @@ -22,7 +22,7 @@ int MPI_Init_thread(int *\fIargc\fP, char ***\fIargv\fP, .nf INCLUDE 'mpif.h' MPI_INIT_THREAD(\fIREQUIRED, PROVIDED, IERROR\fP) - INTEGER \fIREQUIRED, PROVIDED, IERROR\fP + INTEGER \fIREQUIRED, PROVIDED, IERROR\fP .fi .SH C++ Syntax @@ -52,7 +52,7 @@ provided Available level of thread support (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). . . .SH DESCRIPTION @@ -86,10 +86,10 @@ function. In Open MPI, the value is dependent on how the library was configured and built. Note that there is no guarantee that \fIprovided\fP will be greater than or equal to \fIrequired\fP. .sp -Also note that calling MPI_Init_thread with a -.I required +Also note that calling MPI_Init_thread with a +.I required value of -.I MPI_THREAD_SINGLE +.I MPI_THREAD_SINGLE is equivalent to calling MPI_Init. .sp All MPI programs must contain a call to MPI_Init or @@ -102,7 +102,7 @@ them: /* declare variables */ MPI_Init_thread(&argc, &argv, req, &prov); /* parse arguments */ - /* main program */ + /* main program */ MPI_Finalize(); } .fi @@ -162,13 +162,13 @@ by multiple threads. . .PP Note that Open MPI's thread support is in a fairly early stage; the -above devices are likely to -.IR work , +above devices are likely to +.IR work , but the latency is likely to be fairly high. Specifically, efforts so -far have concentrated on -.IR correctness , -not -.I performance +far have concentrated on +.IR correctness , +not +.I performance (yet). . . @@ -185,7 +185,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. . .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Initialized.3in b/ompi/mpi/man/man3/MPI_Initialized.3in index 24ecae57164..215967912b1 100644 --- a/ompi/mpi/man/man3/MPI_Initialized.3in +++ b/ompi/mpi/man/man3/MPI_Initialized.3in @@ -19,8 +19,8 @@ int MPI_Initialized(int *\fIflag\fP) .nf INCLUDE 'mpif.h' MPI_INITIALIZED(\fIFLAG, IERROR\fP) - LOGICAL \fIFLAG\fP - INTEGER \fIIERROR\fP + LOGICAL \fIFLAG\fP + INTEGER \fIIERROR\fP .fi .SH C++ Syntax @@ -37,7 +37,7 @@ Flag is true if MPI_Init has been called and false otherwise. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -47,7 +47,7 @@ This routine may be used to determine whether MPI_Init has been called. It is th Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Intercomm_create.3in b/ompi/mpi/man/man3/MPI_Intercomm_create.3in index 88001457971..23c32baee87 100644 --- a/ompi/mpi/man/man3/MPI_Intercomm_create.3in +++ b/ompi/mpi/man/man3/MPI_Intercomm_create.3in @@ -22,13 +22,13 @@ INCLUDE 'mpif.h' MPI_INTERCOMM_CREATE(\fILOCAL_COMM, LOCAL_LEADER, PEER_COMM, REMOTE_LEADER, TAG, NEWINTERCOMM, IERROR\fP) INTEGER \fILOCAL_COMM, LOCAL_LEADER, PEER_COMM, REMOTE_LEADER\fP - INTEGER \fITAG, NEWINTERCOMM, IERROR\fP + INTEGER \fITAG, NEWINTERCOMM, IERROR\fP .fi .SH C++ Syntax .nf #include -Intercomm Intracomm::Create_intercomm(int \fIlocal_leader\fP, const +Intercomm Intracomm::Create_intercomm(int \fIlocal_leader\fP, const Comm& \fIpeer_comm\fP, int \fIremote_leader\fP, int \fItag\fP) const .fi @@ -48,7 +48,7 @@ remote_leader Rank of remote group leader in peer_comm; significant only at the local_leader (integer). .TP 1i tag -Message tag used to identify new intercommunicator (integer). +Message tag used to identify new intercommunicator (integer). .SH OUTPUT PARAMETERS .ft R @@ -58,7 +58,7 @@ Created intercommunicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -67,7 +67,7 @@ This call creates an intercommunicator. It is collective over the union of the l This call uses point-to-point communication with communicator peer_comm, and with tag tag between the leaders. Thus, care must be taken that there be no pending communication on peer_comm that could interfere with this communication. -If multiple MPI_Intercomm_creates are being made, they should use different tags (more precisely, they should ensure that the local and remote leaders are using different tags for each MPI_intercomm_create). +If multiple MPI_Intercomm_creates are being made, they should use different tags (more precisely, they should ensure that the local and remote leaders are using different tags for each MPI_intercomm_create). .SH NOTES We recommend using a dedicated peer communicator, such as a duplicate of MPI_COMM_WORLD, to avoid trouble with peer communicators. @@ -76,14 +76,14 @@ The MPI 1.1 Standard contains two mutually exclusive comments on the input intracommunicators. One says that their respective groups must be disjoint; the other that the leaders can be the same process. After some discussion by the MPI Forum, it has been decided that the groups must -be disjoint. Note that the +be disjoint. Note that the .B reason given for this in the standard is .B not -the reason for this choice; rather, the +the reason for this choice; rather, the .B other operations on -intercommunicators (like +intercommunicators (like .I MPI_Intercomm_merge ) do not make sense if the groups are not disjoint. @@ -92,7 +92,7 @@ groups are not disjoint. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Intercomm_merge diff --git a/ompi/mpi/man/man3/MPI_Intercomm_merge.3in b/ompi/mpi/man/man3/MPI_Intercomm_merge.3in index 6da078e777c..6d1e2b2a326 100644 --- a/ompi/mpi/man/man3/MPI_Intercomm_merge.3in +++ b/ompi/mpi/man/man3/MPI_Intercomm_merge.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Intercomm_merge(MPI_Comm \fIintercomm\fP, int\fI high\fP, +int MPI_Intercomm_merge(MPI_Comm \fIintercomm\fP, int\fI high\fP, MPI_Comm\fI *newintracomm\fP) .fi @@ -20,8 +20,8 @@ int MPI_Intercomm_merge(MPI_Comm \fIintercomm\fP, int\fI high\fP, .nf INCLUDE 'mpif.h' MPI_INTERCOMM_MERGE(\fIINTERCOMM, HIGH, NEWINTRACOMM, IERROR\fP) - INTEGER \fIINTERCOMM, NEWINTRACOMM, IERROR\fP - LOGICAL \fIHIGH\fP + INTEGER \fIINTERCOMM, NEWINTRACOMM, IERROR\fP + LOGICAL \fIHIGH\fP .fi .SH C++ Syntax @@ -47,17 +47,17 @@ Created intracommunicator (type indicator). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -This function creates an intracommunicator from the union of the two groups that are associated with intercomm. All processes should provide the same high value within each of the two groups. If processes in one group provide the value high = false and processes in the other group provide the value high = true, then the union orders the "low" group before the "high" group. If all processes provide the same high argument, then the order of the union is arbitrary. This call is blocking and collective within the union of the two groups. +This function creates an intracommunicator from the union of the two groups that are associated with intercomm. All processes should provide the same high value within each of the two groups. If processes in one group provide the value high = false and processes in the other group provide the value high = true, then the union orders the "low" group before the "high" group. If all processes provide the same high argument, then the order of the union is arbitrary. This call is blocking and collective within the union of the two groups. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Intercomm_create diff --git a/ompi/mpi/man/man3/MPI_Iprobe.3in b/ompi/mpi/man/man3/MPI_Iprobe.3in index b666543c158..3d09716a85f 100644 --- a/ompi/mpi/man/man3/MPI_Iprobe.3in +++ b/ompi/mpi/man/man3/MPI_Iprobe.3in @@ -21,7 +21,7 @@ int MPI_Iprobe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, int\fI *fla INCLUDE 'mpif.h' MPI_IPROBE(\fISOURCE, TAG, COMM, FLAG, STATUS, IERROR\fP) LOGICAL \fIFLAG\fP - INTEGER \fISOURCE, TAG, COMM, STATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISOURCE, TAG, COMM, STATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -55,13 +55,13 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The MPI_Probe and MPI_Iprobe operations allow checking of incoming messages without actual receipt of them. The user can then decide how to receive them, based on the information returned by the probe (basically, the information returned by status). In particular, the user may allocate memory for the receive buffer, according to the length of the probed message. +The MPI_Probe and MPI_Iprobe operations allow checking of incoming messages without actual receipt of them. The user can then decide how to receive them, based on the information returned by the probe (basically, the information returned by status). In particular, the user may allocate memory for the receive buffer, according to the length of the probed message. .sp -MPI_Iprobe(source, tag, comm, flag, status) returns flag = true if there is a message that can be received and that matches the pattern specified by the arguments source, tag, and comm. The call matches the same message that would have been received by a call to MPI_Recv(\&..., source, tag, comm, status) executed at the same point in the program, and returns in status the same value that would have been returned by MPI_Recv(). Otherwise, the call returns flag = false, and leaves status undefined. +MPI_Iprobe(source, tag, comm, flag, status) returns flag = true if there is a message that can be received and that matches the pattern specified by the arguments source, tag, and comm. The call matches the same message that would have been received by a call to MPI_Recv(\&..., source, tag, comm, status) executed at the same point in the program, and returns in status the same value that would have been returned by MPI_Recv(). Otherwise, the call returns flag = false, and leaves status undefined. .sp If MPI_Iprobe returns flag = true, then the content of the status object can be subsequently accessed as described in Section 3.2.5 of the MPI-1 Standard, "Return Status," to find the source, tag, and length of the probed message. .sp @@ -69,18 +69,18 @@ A subsequent receive executed with the same context, and the source and tag retu .sp The source argument of MPI_Probe can be MPI_ANY_SOURCE, and the tag argument can be MPI_ANY_TAG, so that one can probe for messages from an arbitrary source and/or with an arbitrary tag. However, a specific communication context must be provided with the comm argument. .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .sp -It is not necessary to receive a message immediately after it has been probed for, and the same message may be probed for several times before it is received. +It is not necessary to receive a message immediately after it has been probed for, and the same message may be probed for several times before it is received. .sp .SH NOTE -Users of libmpi-mt should remember that two threads may do an MPI_Iprobe that actually returns true for the same message for both threads. +Users of libmpi-mt should remember that two threads may do an MPI_Iprobe that actually returns true for the same message for both threads. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Irecv.3in b/ompi/mpi/man/man3/MPI_Irecv.3in index b8c26cb85d6..ccbad0d95f9 100644 --- a/ompi/mpi/man/man3/MPI_Irecv.3in +++ b/ompi/mpi/man/man3/MPI_Irecv.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Irecv(void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP, +int MPI_Irecv(void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP, int\fI source\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, MPI_Request\fI *request\fP) .fi @@ -22,13 +22,13 @@ INCLUDE 'mpif.h' MPI_IRECV(\fIBUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Request Comm::Irecv(void* \fIbuf\fP, int \fIcount\fP, const Datatype& +Request Comm::Irecv(void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIsource\fP, int \fItag\fP) const .fi @@ -61,11 +61,11 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. +Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. .sp A nonblocking receive call indicates that the system may start writing data into the receive buffer. The receiver should not access any part of the receive buffer after a nonblocking receive operation is called, until the receive completes. .sp @@ -75,7 +75,7 @@ A receive request can be determined being completed by calling the MPI_Wait, MPI Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Recv diff --git a/ompi/mpi/man/man3/MPI_Irsend.3in b/ompi/mpi/man/man3/MPI_Irsend.3in index ad03754f207..fbc144a2088 100644 --- a/ompi/mpi/man/man3/MPI_Irsend.3in +++ b/ompi/mpi/man/man3/MPI_Irsend.3in @@ -22,13 +22,13 @@ int MPI_Irsend(const void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\ INCLUDE 'mpif.h' MPI_IRSEND(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Request Comm::Irsend(const void* \fIbuf\fP, int \fIcount\fP, const +Request Comm::Irsend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -61,11 +61,11 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Irsend starts a ready-mode nonblocking send. Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or to wait for its completion. +MPI_Irsend starts a ready-mode nonblocking send. Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or to wait for its completion. .sp A nonblocking send call indicates that the system may start copying data out of the send buffer. The sender should not modify any part of the send buffer after a nonblocking send operation is called, until the send completes. @@ -73,7 +73,7 @@ A nonblocking send call indicates that the system may start copying data out of Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Rsend diff --git a/ompi/mpi/man/man3/MPI_Is_thread_main.3in b/ompi/mpi/man/man3/MPI_Is_thread_main.3in index 31fa2a43876..86ef8daa4a5 100644 --- a/ompi/mpi/man/man3/MPI_Is_thread_main.3in +++ b/ompi/mpi/man/man3/MPI_Is_thread_main.3in @@ -37,7 +37,7 @@ True if calling thread is main thread (boolean). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -58,7 +58,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Isend.3in b/ompi/mpi/man/man3/MPI_Isend.3in index ce79f9569fb..d5a40f2ea64 100644 --- a/ompi/mpi/man/man3/MPI_Isend.3in +++ b/ompi/mpi/man/man3/MPI_Isend.3in @@ -22,13 +22,13 @@ int MPI_Isend(const void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\f INCLUDE 'mpif.h' MPI_ISEND(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Request Comm::Isend(const void* \fIbuf\fP, int \fIcount\fP, const +Request Comm::Isend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -61,11 +61,11 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Isend starts a standard-mode, nonblocking send. Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. +MPI_Isend starts a standard-mode, nonblocking send. Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. .sp A nonblocking send call indicates that the system may start copying data out of the send buffer. The sender should not modify any part of the send buffer after a nonblocking send operation is called, until the send completes. .sp @@ -75,7 +75,7 @@ A send request can be determined being completed by calling the MPI_Wait, MPI_Wa Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Send diff --git a/ompi/mpi/man/man3/MPI_Issend.3in b/ompi/mpi/man/man3/MPI_Issend.3in index 28044169167..0e8e4be4879 100644 --- a/ompi/mpi/man/man3/MPI_Issend.3in +++ b/ompi/mpi/man/man3/MPI_Issend.3in @@ -22,13 +22,13 @@ int MPI_Issend(const void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\ INCLUDE 'mpif.h' MPI_ISSEND(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Request Comm::Issend(const void* \fIbuf\fP, int \fIcount\fP, const +Request Comm::Issend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -61,13 +61,13 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R Starts a synchronous mode, nonblocking send. .sp -Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. +Nonblocking calls allocate a communication request object and associate it with the request handle (the argument request). The request can be used later to query the status of the communication or wait for its completion. .sp A nonblocking send call indicates that the system may start copying data out of the send buffer. The sender should not modify any part of the send buffer after a nonblocking send operation is called, until the send completes. @@ -75,7 +75,7 @@ A nonblocking send call indicates that the system may start copying data out of Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Ssend diff --git a/ompi/mpi/man/man3/MPI_Keyval_create.3in b/ompi/mpi/man/man3/MPI_Keyval_create.3in index 7aa32c6290e..4679513eb52 100644 --- a/ompi/mpi/man/man3/MPI_Keyval_create.3in +++ b/ompi/mpi/man/man3/MPI_Keyval_create.3in @@ -45,38 +45,38 @@ Key value for future access (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_create_keyval instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_create_keyval instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp Generates a new attribute key. Keys are locally unique in a process and opaque to the user, though they are explicitly stored in integers. Once allocated, the key value can be used to associate attributes and access them on any locally defined communicator. .sp -The copy_fn function is invoked when a communicator is duplicated by MPI_COMM_DUP. copy_fn should be of type MPI_Copy_function, which is defined as follows: +The copy_fn function is invoked when a communicator is duplicated by MPI_COMM_DUP. copy_fn should be of type MPI_Copy_function, which is defined as follows: .sp .nf - typedef int MPI_Copy_function(MPI_Comm oldcomm, int keyval, - void *extra_state, void *attribute_val_in, + typedef int MPI_Copy_function(MPI_Comm oldcomm, int keyval, + void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag) .fi -A Fortran declaration for such a function is as follows: +A Fortran declaration for such a function is as follows: .sp .nf SUBROUTINE COPY_FUNCTION(OLDCOMM, KEYVAL, EXTRA_STATE, ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERR) INTEGER OLDCOMM, KEYVAL, EXTRA_STATE, - ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, IERR - LOGICAL FLAG + ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, IERR + LOGICAL FLAG .fi .sp -The copy callback function is invoked for each key value in oldcomm in arbitrary order. Each call to the copy callback is made with a key value and its corresponding attribute. If it returns flag = 0, then the attribute is deleted in the duplicated communicator. Otherwise ( flag = 1), the new attribute value is set to the value returned in attribute_val_out. The function returns MPI_SUCCESS on success and an error code on failure (in which case MPI_Comm_dup will fail). +The copy callback function is invoked for each key value in oldcomm in arbitrary order. Each call to the copy callback is made with a key value and its corresponding attribute. If it returns flag = 0, then the attribute is deleted in the duplicated communicator. Otherwise ( flag = 1), the new attribute value is set to the value returned in attribute_val_out. The function returns MPI_SUCCESS on success and an error code on failure (in which case MPI_Comm_dup will fail). .sp copy_fn may be specified as MPI_NULL_COPY_FN or MPI_DUP_FN from either C or -Fortran; MPI_NULL_COPY_FN is a function that does nothing other than return flag = 0, and MPI_SUCCESS. MPI_DUP_FN is a simple-minded copy function that sets flag = 1, returns the value of attribute_val_in in attribute_val_out, and returns MPI_SUCCESS. +Fortran; MPI_NULL_COPY_FN is a function that does nothing other than return flag = 0, and MPI_SUCCESS. MPI_DUP_FN is a simple-minded copy function that sets flag = 1, returns the value of attribute_val_in in attribute_val_out, and returns MPI_SUCCESS. .SH NOTES Key values are global (available for any and all communicators). @@ -84,35 +84,35 @@ Key values are global (available for any and all communicators). There are subtle differences between C and Fortran that require that the copy_fn be written in the same language that MPI_Keyval_create is called from. This should not be a problem for most users; only programmers using both Fortran and C in the same program need to be sure that they follow this rule. .sp Even though both formal arguments attribute_val_in -and attribute_val_out are of type void*, their usage differs. The C copy function is passed by MPI in attribute_val_in the value of the attribute, and in attribute_val_out the address of the attribute, so as to allow the function to return the (new) attribute value. The use of type void* for both is to avoid messy type casts. +and attribute_val_out are of type void*, their usage differs. The C copy function is passed by MPI in attribute_val_in the value of the attribute, and in attribute_val_out the address of the attribute, so as to allow the function to return the (new) attribute value. The use of type void* for both is to avoid messy type casts. .sp -A valid copy function is one that completely duplicates the information by making a full duplicate copy of the data structures implied by an attribute; another might just make another reference to that data structure, while using a reference-count mechanism. Other types of attributes might not copy at all (they might be specific to oldcomm only). +A valid copy function is one that completely duplicates the information by making a full duplicate copy of the data structures implied by an attribute; another might just make another reference to that data structure, while using a reference-count mechanism. Other types of attributes might not copy at all (they might be specific to oldcomm only). .sp -Analogous to copy_fn is a callback deletion function, defined as follows. The delete_fn function is invoked when a communicator is deleted by MPI_Comm_free or when a call is made explicitly to MPI_Attr_delete. delete_fn should be of type MPI_Delete_function, which is defined as follows: +Analogous to copy_fn is a callback deletion function, defined as follows. The delete_fn function is invoked when a communicator is deleted by MPI_Comm_free or when a call is made explicitly to MPI_Attr_delete. delete_fn should be of type MPI_Delete_function, which is defined as follows: .sp .nf - typedef int MPI_Delete_function(MPI_Comm comm, int keyval, - void *attribute_val, void *extra_state); + typedef int MPI_Delete_function(MPI_Comm comm, int keyval, + void *attribute_val, void *extra_state); .fi .sp -A Fortran declaration for such a function is as follows: +A Fortran declaration for such a function is as follows: .sp .nf SUBROUTINE DELETE_FUNCTION(COMM, KEYVAL,ATTRIBUTE_VAL, EXTRA_STATE, IERR) - INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR + INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR .fi .sp -This function is called by MPI_Comm_free, MPI_Attr_delete, and MPI_Attr_put to do whatever is needed to remove an attribute. The function returns MPI_SUCCESS on success and an error code on failure (in which case MPI_COMM_FREE will fail). +This function is called by MPI_Comm_free, MPI_Attr_delete, and MPI_Attr_put to do whatever is needed to remove an attribute. The function returns MPI_SUCCESS on success and an error code on failure (in which case MPI_COMM_FREE will fail). .sp -delete_fn may be specified as MPI_NULL_DELETE_FN from either C or FORTRAN; MPI_NULL_DELETE_FN is a function that does nothing, other than returning MPI_SUCCESS. +delete_fn may be specified as MPI_NULL_DELETE_FN from either C or FORTRAN; MPI_NULL_DELETE_FN is a function that does nothing, other than returning MPI_SUCCESS. .sp -The special key value MPI_KEYVAL_INVALID is never returned by MPI_Keyval_create. Therefore, it can be used for static initialization of key values. +The special key value MPI_KEYVAL_INVALID is never returned by MPI_Keyval_create. Therefore, it can be used for static initialization of key values. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Keyval_free diff --git a/ompi/mpi/man/man3/MPI_Keyval_free.3in b/ompi/mpi/man/man3/MPI_Keyval_free.3in index 9d9e877e6d3..7c2d152334a 100644 --- a/ompi/mpi/man/man3/MPI_Keyval_free.3in +++ b/ompi/mpi/man/man3/MPI_Keyval_free.3in @@ -19,7 +19,7 @@ int MPI_Keyval_free(int *\fIkeyval\fP) .nf INCLUDE 'mpif.h' MPI_KEYVAL_FREE(\fIKEYVAL, IERROR\fP) - INTEGER \fIKEYVAL, IERROR\fP + INTEGER \fIKEYVAL, IERROR\fP .fi @@ -33,25 +33,25 @@ Frees the integer key value (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_free_keyval instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_free_keyval instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp -Frees an extant attribute key. This function sets the value of keyval to MPI_KEYVAL_INVALID. Note that it is not erroneous to free an attribute key that is in use, because the actual free does not transpire until after all references (in other communicators on the process) to the key have been freed. These references need to be explicitly freed by the program, either via calls to MPI_Attr_delete that free one attribute instance, or by calls to MPI_Comm_free that free all attribute instances associated with the freed communicator. +Frees an extant attribute key. This function sets the value of keyval to MPI_KEYVAL_INVALID. Note that it is not erroneous to free an attribute key that is in use, because the actual free does not transpire until after all references (in other communicators on the process) to the key have been freed. These references need to be explicitly freed by the program, either via calls to MPI_Attr_delete that free one attribute instance, or by calls to MPI_Comm_free that free all attribute instances associated with the freed communicator. .SH NOTE .ft R -Key values are global (they can be used with any and all communicators). +Key values are global (they can be used with any and all communicators). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Keyval_create diff --git a/ompi/mpi/man/man3/MPI_Lookup_name.3in b/ompi/mpi/man/man3/MPI_Lookup_name.3in index 8dcc9f5b97f..ed944e49798 100644 --- a/ompi/mpi/man/man3/MPI_Lookup_name.3in +++ b/ompi/mpi/man/man3/MPI_Lookup_name.3in @@ -52,7 +52,7 @@ port_name a port name (string). .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -118,7 +118,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Mprobe.3in b/ompi/mpi/man/man3/MPI_Mprobe.3in index 109d9072793..7b8a8e87d64 100644 --- a/ompi/mpi/man/man3/MPI_Mprobe.3in +++ b/ompi/mpi/man/man3/MPI_Mprobe.3in @@ -13,7 +13,7 @@ .SH C Syntax .nf #include -int MPI_Mprobe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, +int MPI_Mprobe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, MPI_Message\fI *message\fP, MPI_Status\fI *status\fP) .fi @@ -22,7 +22,7 @@ int MPI_Mprobe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, INCLUDE 'mpif.h' MPI_MPROBE(\fISOURCE, TAG, COMM, MESSAGE, STATUS, IERROR\fP) INTEGER \fISOURCE, TAG, COMM, MESSAGE\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -54,7 +54,7 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -82,7 +82,7 @@ This is an MPI-3 function and has no C++ binding. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ -functions do not return errors. +functions do not return errors. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for diff --git a/ompi/mpi/man/man3/MPI_Mrecv.3in b/ompi/mpi/man/man3/MPI_Mrecv.3in index e9b5285d022..d8005e8b15e 100644 --- a/ompi/mpi/man/man3/MPI_Mrecv.3in +++ b/ompi/mpi/man/man3/MPI_Mrecv.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Mrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP, +int MPI_Mrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP, MPI_Message\fI *message\fP, MPI_Status\fI *status\fP) .fi @@ -22,7 +22,7 @@ INCLUDE 'mpif.h' MPI_MRECV(\fIBUF, COUNT, DATATYPE, MESSAGE, STATUS, IERROR\fP) \fIBUF(*)\fP INTEGER \fCOUNT, DATATYPE, MESSAGE\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -52,7 +52,7 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -70,7 +70,7 @@ This is an MPI-3 function and has no C++ binding. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ -functions do not return errors. +functions do not return errors. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for diff --git a/ompi/mpi/man/man3/MPI_Op_create.3in b/ompi/mpi/man/man3/MPI_Op_create.3in index 0bc85b22d68..9c6aa61bb54 100644 --- a/ompi/mpi/man/man3/MPI_Op_create.3in +++ b/ompi/mpi/man/man3/MPI_Op_create.3in @@ -48,29 +48,29 @@ Operation (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Op_create binds a user-defined global operation to an op handle that can subsequently be used in MPI_Reduce, MPI_Allreduce, MPI_Reduce_scatter, and MPI_Scan. The user-defined operation is assumed to be associative. If commute = true, then the operation should be both commutative and associative. If commute = false, then the order of operands is fixed and is defined to be in ascending, process rank order, beginning with process zero. The order of evaluation can be changed, taking advantage of the associativity of the operation. If commute = true then the order of evaluation can be changed, taking advantage of commutativity and associativity. .sp -\fIfunction\fP is the user-defined function, which must have the following four arguments: invec, inoutvec, len, and datatype. +\fIfunction\fP is the user-defined function, which must have the following four arguments: invec, inoutvec, len, and datatype. .sp The ANSI-C prototype for the function is the following: .sp .nf typedef void MPI_User_function(void *invec, void *inoutvec, - int *len, + int *len, MPI_Datatype *datatype); .fi .sp The Fortran declaration of the user-defined function appears below. .sp .nf - FUNCTION USER_FUNCTION( INVEC(*), INOUTVEC(*), LEN, TYPE) - INVEC(LEN), INOUTVEC(LEN) - INTEGER LEN, TYPE + FUNCTION USER_FUNCTION( INVEC(*), INOUTVEC(*), LEN, TYPE) + INVEC(LEN), INOUTVEC(LEN) + INTEGER LEN, TYPE .fi .sp The datatype argument is a handle to the data type that was passed into the @@ -84,67 +84,67 @@ pointwise evaluation of the reduce operator on len elements: i.e, the function returns in inoutvec[i] the value invec[i] o inoutvec[i], for i = 0\,...,\ count-1, where o is the combining operation computed by the function. .sp -By internally comparing the value of the datatype argument to known, global handles, it is possible to overload the use of a single user-defined function for several different data types. +By internally comparing the value of the datatype argument to known, global handles, it is possible to overload the use of a single user-defined function for several different data types. .sp -General datatypes may be passed to the user function. However, use of datatypes that are not contiguous is likely to lead to inefficiencies. +General datatypes may be passed to the user function. However, use of datatypes that are not contiguous is likely to lead to inefficiencies. .sp No MPI communication function may be called inside the user function. -MPI_Abort may be called inside the function in case of an error. +MPI_Abort may be called inside the function in case of an error. .SH NOTES Suppose one defines a library of user-defined reduce -functions that are overloaded: The datatype argument is used to select the right execution path at each invocation, according to the types of the operands. The user-defined reduce function cannot "decode" the datatype argument that it is passed, and cannot identify, by itself, the correspondence between the datatype handles and the datatype they represent. This correspondence was established when the datatypes were created. Before the library is used, a library initialization preamble must be executed. This preamble code will define the datatypes that are used by the library and store handles to these datatypes in global, static variables that are shared by the user code and the library code. +functions that are overloaded: The datatype argument is used to select the right execution path at each invocation, according to the types of the operands. The user-defined reduce function cannot "decode" the datatype argument that it is passed, and cannot identify, by itself, the correspondence between the datatype handles and the datatype they represent. This correspondence was established when the datatypes were created. Before the library is used, a library initialization preamble must be executed. This preamble code will define the datatypes that are used by the library and store handles to these datatypes in global, static variables that are shared by the user code and the library code. -\fBExample:\fP Example of user-defined reduce: +\fBExample:\fP Example of user-defined reduce: .sp Compute the product of an array of complex numbers, in C. .sp .nf - typedef struct { - double real,imag; - } Complex; - - /* the user-defined function - */ - void myProd( Complex *in, Complex *inout, int *len, - MPI_Datatype *dptr ) - { - int i; - Complex c; - - for (i=0; i< *len; ++i) { - c.real = inout->real*in->real - - inout->imag*in->imag; - c.imag = inout->real*in->imag + - inout->imag*in->real; - *inout = c; - in++; inout++; - } - } - - /* and, to call it\&... - */ + typedef struct { + double real,imag; + } Complex; + + /* the user-defined function + */ + void myProd( Complex *in, Complex *inout, int *len, + MPI_Datatype *dptr ) + { + int i; + Complex c; + + for (i=0; i< *len; ++i) { + c.real = inout->real*in->real - + inout->imag*in->imag; + c.imag = inout->real*in->imag + + inout->imag*in->real; + *inout = c; + in++; inout++; + } + } + + /* and, to call it\&... + */ \&... - /* each process has an array of 100 Complexes - */ - Complex a[100], answer[100]; - MPI_Op myOp; - MPI_Datatype ctype; - - /* explain to MPI how type Complex is defined - */ - MPI_Type_contiguous( 2, MPI_DOUBLE, &ctype ); - MPI_Type_commit( &ctype ); - /* create the complex-product user-op - */ - MPI_Op_create( myProd, True, &myOp ); - - MPI_Reduce( a, answer, 100, ctype, myOp, root, comm ); - - /* At this point, the answer, which consists of 100 Complexes, - * resides on process root - */ + /* each process has an array of 100 Complexes + */ + Complex a[100], answer[100]; + MPI_Op myOp; + MPI_Datatype ctype; + + /* explain to MPI how type Complex is defined + */ + MPI_Type_contiguous( 2, MPI_DOUBLE, &ctype ); + MPI_Type_commit( &ctype ); + /* create the complex-product user-op + */ + MPI_Op_create( myProd, True, &myOp ); + + MPI_Reduce( a, answer, 100, ctype, myOp, root, comm ); + + /* At this point, the answer, which consists of 100 Complexes, + * resides on process root + */ .fi .sp The Fortran version of MPI_Reduce will invoke a user-defined reduce function using the Fortran calling conventions and will pass a Fortran-type datatype argument; the C version will use C calling convention and the C representation of a datatype handle. Users who plan to mix languages should define their reduction functions accordingly. @@ -154,11 +154,11 @@ The Fortran version of MPI_Reduce will invoke a user-defined reduce function usi The reduction functions ( .I MPI_Op ) do not return an error value. As a result, -if the functions detect an error, all they can do is either call +if the functions detect an error, all they can do is either call .I MPI_Abort or silently skip the problem. Thus, if you change the error handler from .I MPI_ERRORS_ARE_FATAL -to something else, for example, +to something else, for example, .I MPI_ERRORS_RETURN , then no error may be indicated. @@ -170,7 +170,7 @@ all collective routines return the same error value. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Op_free.3in b/ompi/mpi/man/man3/MPI_Op_free.3in index 332a62fd70f..4573682d2f5 100644 --- a/ompi/mpi/man/man3/MPI_Op_free.3in +++ b/ompi/mpi/man/man3/MPI_Op_free.3in @@ -19,7 +19,7 @@ int MPI_Op_free(MPI_Op *\fIop\fP) .nf INCLUDE 'mpif.h' MPI_OP_FREE(\fIOP, IERROR\fP) - INTEGER \fIOP, IERROR\fP + INTEGER \fIOP, IERROR\fP .fi .SH C++ Syntax @@ -37,17 +37,17 @@ Operation (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Marks a user-defined reduction operation for deallocation and sets \fIop\fP to MPI_OP_NULL. +Marks a user-defined reduction operation for deallocation and sets \fIop\fP to MPI_OP_NULL. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .sp diff --git a/ompi/mpi/man/man3/MPI_Open_port.3in b/ompi/mpi/man/man3/MPI_Open_port.3in index 744bebc868e..be8040b17cc 100644 --- a/ompi/mpi/man/man3/MPI_Open_port.3in +++ b/ompi/mpi/man/man3/MPI_Open_port.3in @@ -20,7 +20,7 @@ int MPI_Open_port(MPI_Info \fIinfo\fP, char *\fIport_name\fP) INCLUDE 'mpif.h' MPI_OPEN_PORT(\fIINFO, PORT_NAME, IERROR\fP) CHARACTER*(*) \fIPORT_NAME\fP - INTEGER \fIINFO, IERROR\fP + INTEGER \fIINFO, IERROR\fP .fi .SH C++ Syntax @@ -42,22 +42,22 @@ port_name Newly established port (string). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Open_port establishes a network address, encoded in the \fIport_name\fP string, at which the server will be able to accept connections from clients. \fIport_name\fP is supplied by the system. +MPI_Open_port establishes a network address, encoded in the \fIport_name\fP string, at which the server will be able to accept connections from clients. \fIport_name\fP is supplied by the system. .sp MPI copies a system-supplied port name into \fIport_name\fP. \fIport_name\fP identifies the newly opened port and can be used by a client to contact the server. The maximum size string that may be supplied by the system is MPI_MAX_PORT_NAME. .SH SUPPORTED INFO KEYS -None. +None. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Comm_accept diff --git a/ompi/mpi/man/man3/MPI_Pack.3in b/ompi/mpi/man/man3/MPI_Pack.3in index 1ebb54d3a05..25eb7ab345e 100644 --- a/ompi/mpi/man/man3/MPI_Pack.3in +++ b/ompi/mpi/man/man3/MPI_Pack.3in @@ -23,14 +23,14 @@ INCLUDE 'mpif.h' MPI_PACK(\fIINBUF, INCOUNT, DATATYPE, OUTBUF,OUTSIZE, POSITION, COMM, IERROR\fP) \fIINBUF(*), OUTBUF(*)\fP - INTEGER \fIINCOUNT, DATATYPE, OUTSIZE, POSITION, COMM, IERROR\fP + INTEGER \fIINCOUNT, DATATYPE, OUTSIZE, POSITION, COMM, IERROR\fP .fi .SH C++ Syntax .nf #include -void Datatype::Pack(const void* \fIinbuf\fP, int \fIincount\fP, void *\fIoutbuf\fP, - int \fIoutsize\fP, int& \fIposition\fP, const Comm &\fIcomm\fP) const +void Datatype::Pack(const void* \fIinbuf\fP, int \fIincount\fP, void *\fIoutbuf\fP, + int \fIoutsize\fP, int& \fIposition\fP, const Comm &\fIcomm\fP) const .fi .SH INPUT PARAMETERS @@ -65,7 +65,7 @@ Output buffer start (choice). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -76,24 +76,24 @@ The input value of \fIposition\fP is the first location in the output buffer to \fBExample:\fP An example using MPI_Pack: .sp .nf - int position, i, j, a[2]; - char buff[1000]; - - \&.... - - MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - if (myrank == 0) - { - / * SENDER CODE */ - - position = 0; - MPI_Pack(&i, 1, MPI_INT, buff, 1000, &position, MPI_COMM_WORLD); - MPI_Pack(&j, 1, MPI_INT, buff, 1000, &position, MPI_COMM_WORLD); - MPI_Send( buff, position, MPI_PACKED, 1, 0, MPI_COMM_WORLD); - } - else /* RECEIVER CODE */ - MPI_Recv( a, 2, MPI_INT, 0, 0, MPI_COMM_WORLD) - + int position, i, j, a[2]; + char buff[1000]; + + \&.... + + MPI_Comm_rank(MPI_COMM_WORLD, &myrank); + if (myrank == 0) + { + / * SENDER CODE */ + + position = 0; + MPI_Pack(&i, 1, MPI_INT, buff, 1000, &position, MPI_COMM_WORLD); + MPI_Pack(&j, 1, MPI_INT, buff, 1000, &position, MPI_COMM_WORLD); + MPI_Send( buff, position, MPI_PACKED, 1, 0, MPI_COMM_WORLD); + } + else /* RECEIVER CODE */ + MPI_Recv( a, 2, MPI_INT, 0, 0, MPI_COMM_WORLD) + } .fi @@ -101,7 +101,7 @@ The input value of \fIposition\fP is the first location in the output buffer to Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Pack_external.3in b/ompi/mpi/man/man3/MPI_Pack_external.3in index b468811ab65..5393202f6b7 100644 --- a/ompi/mpi/man/man3/MPI_Pack_external.3in +++ b/ompi/mpi/man/man3/MPI_Pack_external.3in @@ -17,7 +17,7 @@ #include int MPI_Pack_external(const char *\fIdatarep\fP, const void *\fIinbuf\fP, int \fIincount\fP, MPI_Datatype\fI datatype\fP, - void *\fIoutbuf\fP, MPI_Aint \fIoutsize\fP, + void *\fIoutbuf\fP, MPI_Aint \fIoutsize\fP, MPI_Aint *\fIposition\fP) .fi @@ -38,7 +38,7 @@ MPI_PACK_EXTERNAL(\fIDATAREP, INBUF, INCOUNT, DATATYPE, #include void MPI::Datatype::Pack_external(const char* \fIdatarep\fP, const void* \fIinbuf\fP, int \fIincount\fP, - void* \fIoutbuf\fP, MPI::Aint \fIoutsize\fP, + void* \fIoutbuf\fP, MPI::Aint \fIoutsize\fP, MPI::Aint& \fIposition\fP) const .fi @@ -74,7 +74,7 @@ outbuf Output buffer start (choice). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -100,30 +100,30 @@ to MPI_Pack_external. \fBExample:\fP An example using MPI_Pack_external: .sp .nf - int position, i; - double msg[5]; + int position, i; + double msg[5]; char buf[1000]; \&... - MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - if (myrank == 0) { /* SENDER CODE */ + MPI_Comm_rank(MPI_COMM_WORLD, &myrank); + if (myrank == 0) { /* SENDER CODE */ position = 0; i = 5; /* number of doubles in msg[] */ MPI_Pack_external("external32", &i, 1, MPI_INT, - buf, 1000, &position); + buf, 1000, &position); MPI_Pack_external("external32", &msg, i, MPI_DOUBLE, - buf, 1000, &position); + buf, 1000, &position); MPI_Send(buf, position, MPI_BYTE, 1, 0, - MPI_COMM_WORLD); - } else { /* RECEIVER CODE */ + MPI_COMM_WORLD); + } else { /* RECEIVER CODE */ MPI_Recv(buf, 1, MPI_BYTE, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); - MPI_Unpack_external("external32", buf, 1000, + MPI_Unpack_external("external32", buf, 1000, MPI_INT, &i, 1, &position); - MPI_Unpack_external("external32", buf, 1000, + MPI_Unpack_external("external32", buf, 1000, MPI_DOUBLE, &msg, i, &position); - } + } .fi .SH NOTES @@ -186,7 +186,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Pack_external_size.3in b/ompi/mpi/man/man3/MPI_Pack_external_size.3in index 42cba5de194..ded2e8a78cc 100644 --- a/ompi/mpi/man/man3/MPI_Pack_external_size.3in +++ b/ompi/mpi/man/man3/MPI_Pack_external_size.3in @@ -15,7 +15,7 @@ to write to a portable format .SH C Syntax .nf #include -int MPI_Pack_external_size(char *\fIdatarep\fP, int \fIincount\fP, +int MPI_Pack_external_size(char *\fIdatarep\fP, int \fIincount\fP, MPI_Datatype \fIdatatype\fP, MPI_Aint *\fIsize\fP) .fi @@ -24,7 +24,7 @@ int MPI_Pack_external_size(char *\fIdatarep\fP, int \fIincount\fP, INCLUDE 'mpif.h' MPI_PACK_EXTERNAL_SIZE(\fIDATAREP, INCOUNT, DATATYPE, SIZE, IERROR\fP) - INTEGER \fIINCOUNT, DATATYPE, IERROR\fP + INTEGER \fIINCOUNT, DATATYPE, IERROR\fP INTEGER (KIND=MPI_ADDRESS_KIND) \fISIZE\fP CHARACTER*(*) \fIDATAREP\fP @@ -32,7 +32,7 @@ MPI_PACK_EXTERNAL_SIZE(\fIDATAREP, INCOUNT, DATATYPE, SIZE, IERROR\fP) .SH C++ Syntax .nf #include -MPI::Aint MPI::Datatype::Pack_external_size(const char* \fIdatarep\fP, +MPI::Aint MPI::Datatype::Pack_external_size(const char* \fIdatarep\fP, int \fIincount\fP) const .fi @@ -55,7 +55,7 @@ size Upper bound on size of packed message, in bytes (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -90,7 +90,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Pack_size.3in b/ompi/mpi/man/man3/MPI_Pack_size.3in index 8fa9233e396..8a38b4bccfb 100644 --- a/ompi/mpi/man/man3/MPI_Pack_size.3in +++ b/ompi/mpi/man/man3/MPI_Pack_size.3in @@ -20,7 +20,7 @@ int MPI_Pack_size(int \fIincount\fP, MPI_Datatype\fI datatype\fP, MPI_Comm\fI co .nf INCLUDE 'mpif.h' MPI_PACK_SIZE(\fIINCOUNT, DATATYPE, COMM, SIZE, IERROR\fP) - INTEGER \fIINCOUNT, DATATYPE, COMM, SIZE, IERROR\fP + INTEGER \fIINCOUNT, DATATYPE, COMM, SIZE, IERROR\fP .fi .SH C++ Syntax @@ -49,20 +49,20 @@ Upper bound on size of packed message, in bytes (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Pack_size allows the application to find out how much space is needed to pack a message. A call to MPI_Pack_size(incount, datatype, comm, size) returns in size an -upper bound on the increment in position that would occur in a call to MPI_Pack, with the same values for \fIincount\fP, \fIdatatype\fP, and \fIcomm\fP. +upper bound on the increment in position that would occur in a call to MPI_Pack, with the same values for \fIincount\fP, \fIdatatype\fP, and \fIcomm\fP. .sp -\fBRationale:\fP The call returns an upper bound, rather than an exact bound, since the exact amount of space needed to pack the message may depend on the context (e.g., first message packed in a packing unit may take more space). +\fBRationale:\fP The call returns an upper bound, rather than an exact bound, since the exact amount of space needed to pack the message may depend on the context (e.g., first message packed in a packing unit may take more space). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Pcontrol.3in b/ompi/mpi/man/man3/MPI_Pcontrol.3in index c748e7a2737..2f80b0fcad5 100644 --- a/ompi/mpi/man/man3/MPI_Pcontrol.3in +++ b/ompi/mpi/man/man3/MPI_Pcontrol.3in @@ -35,9 +35,9 @@ Profiling level. .SH DESCRIPTION .ft R -MPI libraries themselves make no use of this routine; they simply return immediately to the user code. However the presence of calls to this routine allows a profiling package to be explicitly called by the user. +MPI libraries themselves make no use of this routine; they simply return immediately to the user code. However the presence of calls to this routine allows a profiling package to be explicitly called by the user. .sp -Since MPI has no control of the implementation of the profiling code, we are unable to specify precisely the semantics that will be provided by calls to MPI_Pcontrol. This vagueness extends to the number of arguments to the function, and their datatypes. +Since MPI has no control of the implementation of the profiling code, we are unable to specify precisely the semantics that will be provided by calls to MPI_Pcontrol. This vagueness extends to the number of arguments to the function, and their datatypes. .sp However to provide some level of portability of user codes to different profiling libraries, we request the following meanings for certain values of level: @@ -53,16 +53,16 @@ level==2 Profile buffers are flushed. (This may be a no-op in some profilers). .TP o -All other values of level have profile library-defined effects and additional arguments. +All other values of level have profile library-defined effects and additional arguments. .LP .sp We also request that the default state after MPI_Init has been called is for profiling to be enabled at the normal default level (i.e., as if MPI_Pcontrol had just been called with the argument 1). This allows users to link with a profiling library and obtain profile output without having to modify their source code at all. .sp -The provision of MPI_Pcontrol as a no-op in the standard MPI library allows users to modify their source code to obtain more detailed profiling information, but still be able to link exactly the same code against the standard MPI library. +The provision of MPI_Pcontrol as a no-op in the standard MPI library allows users to modify their source code to obtain more detailed profiling information, but still be able to link exactly the same code against the standard MPI library. .SH NOTES .ft R -This routine provides a common interface for profiling control. The interpretation of level and any other arguments is left to the profiling library. +This routine provides a common interface for profiling control. The interpretation of level and any other arguments is left to the profiling library. .sp This function does not return an error value. Consequently, the result of calling it before MPI_Init or after MPI_Finalize is undefined. diff --git a/ompi/mpi/man/man3/MPI_Probe.3in b/ompi/mpi/man/man3/MPI_Probe.3in index 85e6f10579f..03a5811689d 100644 --- a/ompi/mpi/man/man3/MPI_Probe.3in +++ b/ompi/mpi/man/man3/MPI_Probe.3in @@ -19,7 +19,7 @@ int MPI_Probe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, MPI_Status\f .nf INCLUDE 'mpif.h' MPI_PROBE(\fISOURCE, TAG, COMM, STATUS, IERROR\fP) - INTEGER \fISOURCE, TAG, COMM, STATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISOURCE, TAG, COMM, STATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -50,71 +50,71 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The MPI_Probe and MPI_Iprobe operations allow checking of incoming messages, without actual receipt of them. The user can then decide how to receive them, based on the information returned by the probe in the status variable. For example, the user may allocate memory for the receive buffer, according to the length of the probed message. +The MPI_Probe and MPI_Iprobe operations allow checking of incoming messages, without actual receipt of them. The user can then decide how to receive them, based on the information returned by the probe in the status variable. For example, the user may allocate memory for the receive buffer, according to the length of the probed message. .sp MPI_Probe behaves like MPI_Iprobe except that it is a blocking call that returns only after a matching message has been found. .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .sp -The semantics of MPI_Probe and MPI_Iprobe guarantee progress: If a call to MPI_Probe has been issued by a process, and a send that matches the probe has been initiated by some process, then the call to MPI_Probe will return, unless the message is received by another concurrent receive operation (that is executed by another thread at the probing process). Similarly, if a process busy waits with MPI_Iprobe and a matching message has been issued, then the call to MPI_Iprobe will eventually return flag = true unless the message is received by another concurrent receive operation. +The semantics of MPI_Probe and MPI_Iprobe guarantee progress: If a call to MPI_Probe has been issued by a process, and a send that matches the probe has been initiated by some process, then the call to MPI_Probe will return, unless the message is received by another concurrent receive operation (that is executed by another thread at the probing process). Similarly, if a process busy waits with MPI_Iprobe and a matching message has been issued, then the call to MPI_Iprobe will eventually return flag = true unless the message is received by another concurrent receive operation. .sp -\fBExample 1:\fP Use blocking probe to wait for an incoming message. +\fBExample 1:\fP Use blocking probe to wait for an incoming message. .sp .nf -CALL MPI_COMM_RANK(comm, rank, ierr) - IF (rank.EQ.0) THEN - CALL MPI_SEND(i, 1, MPI_INTEGER, 2, 0, comm, ierr) - ELSE IF(rank.EQ.1) THEN - CALL MPI_SEND(x, 1, MPI_REAL, 2, 0, comm, ierr) - ELSE ! rank.EQ.2 - DO i=1, 2 - CALL MPI_PROBE(MPI_ANY_SOURCE, 0, - comm, status, ierr) - IF (status(MPI_SOURCE) = 0) THEN -100 CALL MPI_RECV(i, 1, MPI_INTEGER, 0, 0, status, ierr) - ELSE -200 CALL MPI_RECV(x, 1, MPI_REAL, 1, 0, status, ierr) - END IF - END DO - END IF +CALL MPI_COMM_RANK(comm, rank, ierr) + IF (rank.EQ.0) THEN + CALL MPI_SEND(i, 1, MPI_INTEGER, 2, 0, comm, ierr) + ELSE IF(rank.EQ.1) THEN + CALL MPI_SEND(x, 1, MPI_REAL, 2, 0, comm, ierr) + ELSE ! rank.EQ.2 + DO i=1, 2 + CALL MPI_PROBE(MPI_ANY_SOURCE, 0, + comm, status, ierr) + IF (status(MPI_SOURCE) = 0) THEN +100 CALL MPI_RECV(i, 1, MPI_INTEGER, 0, 0, status, ierr) + ELSE +200 CALL MPI_RECV(x, 1, MPI_REAL, 1, 0, status, ierr) + END IF + END DO + END IF .fi .sp Each message is received with the right type. .sp -\fBExample 2:\fP A program similar to the previous example, but with a problem. +\fBExample 2:\fP A program similar to the previous example, but with a problem. .sp .nf -CALL MPI_COMM_RANK(comm, rank, ierr) - IF (rank.EQ.0) THEN - CALL MPI_SEND(i, 1, MPI_INTEGER, 2, 0, comm, ierr) - ELSE IF(rank.EQ.1) THEN - CALL MPI_SEND(x, 1, MPI_REAL, 2, 0, comm, ierr) - ELSE - DO i=1, 2 - CALL MPI_PROBE(MPI_ANY_SOURCE, 0, - comm, status, ierr) - IF (status(MPI_SOURCE) = 0) THEN -100 CALL MPI_RECV(i, 1, MPI_INTEGER, MPI_ANY_SOURCE, - 0, status, ierr) - ELSE -200 CALL MPI_RECV(x, 1, MPI_REAL, MPI_ANY_SOURCE, - 0, status, ierr) - END IF - END DO +CALL MPI_COMM_RANK(comm, rank, ierr) + IF (rank.EQ.0) THEN + CALL MPI_SEND(i, 1, MPI_INTEGER, 2, 0, comm, ierr) + ELSE IF(rank.EQ.1) THEN + CALL MPI_SEND(x, 1, MPI_REAL, 2, 0, comm, ierr) + ELSE + DO i=1, 2 + CALL MPI_PROBE(MPI_ANY_SOURCE, 0, + comm, status, ierr) + IF (status(MPI_SOURCE) = 0) THEN +100 CALL MPI_RECV(i, 1, MPI_INTEGER, MPI_ANY_SOURCE, + 0, status, ierr) + ELSE +200 CALL MPI_RECV(x, 1, MPI_REAL, MPI_ANY_SOURCE, + 0, status, ierr) + END IF + END DO END IF .fi .sp -We slightly modified Example 2, using MPI_ANY_SOURCE as the source argument in the two receive calls in statements labeled 100 and 200. The program is now incorrect: The receive operation may receive a message that is distinct from the message probed by the preceding call to MPI_Probe. +We slightly modified Example 2, using MPI_ANY_SOURCE as the source argument in the two receive calls in statements labeled 100 and 200. The program is now incorrect: The receive operation may receive a message that is distinct from the message probed by the preceding call to MPI_Probe. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Publish_name.3in b/ompi/mpi/man/man3/MPI_Publish_name.3in index 53adc8d4d06..bdc2609453f 100644 --- a/ompi/mpi/man/man3/MPI_Publish_name.3in +++ b/ompi/mpi/man/man3/MPI_Publish_name.3in @@ -81,7 +81,7 @@ ompi_unique bool If set to true, return an error if the value. .fi -.sp +.sp \fIbool\fP info keys are actually strings but are evaluated as follows: if the string value is a number, it is converted to an integer and cast to a boolean (meaning that zero integers are false @@ -138,7 +138,7 @@ local scope, processes in job3 cannot access that data. In contrast, if the data had been published using global scope, then any process in job3 could access the data, provided that mpirun was given knowledge of how to contact the central server and the process could establish communication -with it. +with it. .SH ERRORS .ft R @@ -153,7 +153,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Put.3in b/ompi/mpi/man/man3/MPI_Put.3in index 2ca7b00dd9b..39fb9b10e97 100644 --- a/ompi/mpi/man/man3/MPI_Put.3in +++ b/ompi/mpi/man/man3/MPI_Put.3in @@ -14,7 +14,7 @@ .nf #include MPI_Put(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype - \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI_Aint \fItarget_disp\fP, + \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI_Aint \fItarget_disp\fP, int \fItarget_count\fP, MPI_Datatype \fItarget_datatype\fP, MPI_Win \fIwin\fP) MPI_Rput(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype @@ -26,11 +26,11 @@ MPI_Rput(const void *\fIorigin_addr\fP, int \fIorigin_count\fP, MPI_Datatype .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_PUT(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, +MPI_PUT(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_DISP, TARGET_COUNT, TARGET_DATATYPE, WIN, IERROR\fP) \fIORIGIN_ADDR\fP(*) INTEGER(KIND=MPI_ADDRESS_KIND) \fITARGET_DISP\fP - INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_COUNT, + INTEGER \fIORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, TARGET_COUNT, TARGET_DATATYPE, WIN, IERROR\fP MPI_RPUT(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, @@ -44,9 +44,9 @@ MPI_RPUT(\fIORIGIN_ADDR, ORIGIN_COUNT, ORIGIN_DATATYPE, TARGET_RANK, .SH C++ Syntax .nf #include -void MPI::Win::Put(const void* \fIorigin_addr\fP, int \fIorigin_count\fP, const - MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI::Aint - \fItarget_disp\fP, int \fItarget_count\fP, const MPI::Datatype& +void MPI::Win::Put(const void* \fIorigin_addr\fP, int \fIorigin_count\fP, const + MPI::Datatype& \fIorigin_datatype\fP, int \fItarget_rank\fP, MPI::Aint + \fItarget_disp\fP, int \fItarget_count\fP, const MPI::Datatype& \fItarget_datatype\fP) const .fi @@ -84,7 +84,7 @@ request MPI_Rput: RMA request .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -122,7 +122,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Query_thread.3in b/ompi/mpi/man/man3/MPI_Query_thread.3in index 3cbb8d7f05c..952194e208f 100644 --- a/ompi/mpi/man/man3/MPI_Query_thread.3in +++ b/ompi/mpi/man/man3/MPI_Query_thread.3in @@ -34,10 +34,10 @@ int MPI::Query_thread() .ft R .TP 1i provided -C/Fortran only: Level of thread support (integer). +C/Fortran only: Level of thread support (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -82,7 +82,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Recv.3in b/ompi/mpi/man/man3/MPI_Recv.3in index 7113ffa2ff4..e6bbfe4d473 100644 --- a/ompi/mpi/man/man3/MPI_Recv.3in +++ b/ompi/mpi/man/man3/MPI_Recv.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -int MPI_Recv(void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP, +int MPI_Recv(void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP, int\fI source\fP, int\fI tag\fP, MPI_Comm\fI comm\fP, MPI_Status\fI *status\fP) .fi @@ -20,19 +20,19 @@ int MPI_Recv(void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP, .nf INCLUDE 'mpif.h' MPI_RECV(\fIBUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, IERROR\fP) - \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, SOURCE, TAG, COMM\fP + \fIBUF\fP(*) + INTEGER \fICOUNT, DATATYPE, SOURCE, TAG, COMM\fP INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax .nf #include -void Comm::Recv(void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, +void Comm::Recv(void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIsource\fP, int \fItag\fP, Status& \fIstatus\fP) const -void Comm::Recv(void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, - int \fIsource\fP, int \fItag\fP) const +void Comm::Recv(void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, + int \fIsource\fP, int \fItag\fP) const .fi .SH INPUT PARAMETERS @@ -64,7 +64,7 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -72,7 +72,7 @@ This basic receive operation, MPI_Recv, is blocking: it returns only after the r .sp The blocking semantics of this call are described in Section 3.4 of the MPI-1 Standard, "Communication Modes." .sp -The receive buffer contains a number (defined by the value of \fIcount\fP) of consecutive elements. The first element in the set of elements is located at \fIaddress_buf\fP. The type of each of these elements is specified by \fIdatatype\fP. +The receive buffer contains a number (defined by the value of \fIcount\fP) of consecutive elements. The first element in the set of elements is located at \fIaddress_buf\fP. The type of each of these elements is specified by \fIdatatype\fP. .sp The length of the received message must be less than or equal to the length of the receive buffer. An MPI_ERR_TRUNCATE is returned upon the overflow condition. .sp @@ -82,31 +82,31 @@ those locations corresponding to the (shorter) received message are modified. .SH NOTES The \fIcount\fP argument indicates the maximum number of entries of type \fIdatatype\fP that can be received in a message. Once a message is received, use the MPI_Get_count function to determine the actual number of entries within that message. .sp -To receive messages of unknown length, use the MPI_Probe function. (For more information about MPI_Probe and MPI_Cancel, see their respective man pages; also, see Section 3.8 of the MPI-1 Standard, "Probe and Cancel.") +To receive messages of unknown length, use the MPI_Probe function. (For more information about MPI_Probe and MPI_Cancel, see their respective man pages; also, see Section 3.8 of the MPI-1 Standard, "Probe and Cancel.") .sp -A message can be received by a receive operation only if it is addressed to the receiving process, and if its source, tag, and communicator (comm) values match the source, tag, and comm values specified by the receive operation. The receive operation may specify a wildcard value for source and/or tag, indicating that any source and/or tag are acceptable. The wildcard value for source is source = MPI_ANY_SOURCE. The wildcard value for tag is tag = MPI_ANY_TAG. There is no wildcard value for comm. The scope of these wildcards is limited to the proceses in the group of the specified communicator. +A message can be received by a receive operation only if it is addressed to the receiving process, and if its source, tag, and communicator (comm) values match the source, tag, and comm values specified by the receive operation. The receive operation may specify a wildcard value for source and/or tag, indicating that any source and/or tag are acceptable. The wildcard value for source is source = MPI_ANY_SOURCE. The wildcard value for tag is tag = MPI_ANY_TAG. There is no wildcard value for comm. The scope of these wildcards is limited to the proceses in the group of the specified communicator. .sp -The message tag is specified by the tag argument of the receive operation. +The message tag is specified by the tag argument of the receive operation. .sp -The argument source, if different from MPI_ANY_SOURCE, is specified as a rank within the process group associated with that same communicator (remote process group, for intercommunicators). Thus, the range of valid values for the source argument is {0,...,n-1} {MPI_ANY_SOURCE}, where n is the number of processes in this group. +The argument source, if different from MPI_ANY_SOURCE, is specified as a rank within the process group associated with that same communicator (remote process group, for intercommunicators). Thus, the range of valid values for the source argument is {0,...,n-1} {MPI_ANY_SOURCE}, where n is the number of processes in this group. .sp -Note the asymmetry between send and receive operations: A receive operation may accept messages from an arbitrary sender; on the other hand, a send operation must specify a unique receiver. This matches a "push" communication mechanism, where data transfer is effected by the sender (rather than a "pull" mechanism, where data transfer is effected by the receiver). +Note the asymmetry between send and receive operations: A receive operation may accept messages from an arbitrary sender; on the other hand, a send operation must specify a unique receiver. This matches a "push" communication mechanism, where data transfer is effected by the sender (rather than a "pull" mechanism, where data transfer is effected by the receiver). .sp -Source = destination is allowed, that is, a process can send a message to itself. However, it is not recommended for a process to send messages to itself using the blocking send and receive operations described above, since this may lead to deadlock. See Section 3.5 of the MPI-1 Standard, "Semantics of Point-to-Point Communication." +Source = destination is allowed, that is, a process can send a message to itself. However, it is not recommended for a process to send messages to itself using the blocking send and receive operations described above, since this may lead to deadlock. See Section 3.5 of the MPI-1 Standard, "Semantics of Point-to-Point Communication." .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R .nf MPI_Irecv -MPI_Probe +MPI_Probe diff --git a/ompi/mpi/man/man3/MPI_Recv_init.3in b/ompi/mpi/man/man3/MPI_Recv_init.3in index 4f3e7ba6849..e98fdbffd84 100644 --- a/ompi/mpi/man/man3/MPI_Recv_init.3in +++ b/ompi/mpi/man/man3/MPI_Recv_init.3in @@ -22,13 +22,13 @@ INCLUDE 'mpif.h' MPI_RECV_INIT(\fIBUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Prequest Comm::Recv_init(void* \fIbuf\fP, int \fIcount\fP, const +Prequest Comm::Recv_init(void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIsource\fP, int \fItag\fP) const .fi @@ -63,21 +63,21 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Creates a persistent communication request for a receive operation. The argument \fIbuf\fP is marked as OUT because the user gives permission to write on the receive buffer by passing the argument to MPI_Recv_init. +Creates a persistent communication request for a receive operation. The argument \fIbuf\fP is marked as OUT because the user gives permission to write on the receive buffer by passing the argument to MPI_Recv_init. .sp -A persistent communication request is inactive after it is created -- no active communication is attached to the request. +A persistent communication request is inactive after it is created -- no active communication is attached to the request. .sp -A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start or MPI_Startall. +A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start or MPI_Startall. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Reduce.3in b/ompi/mpi/man/man3/MPI_Reduce.3in index e8d9796c6cd..5e0c12fbac8 100644 --- a/ompi/mpi/man/man3/MPI_Reduce.3in +++ b/ompi/mpi/man/man3/MPI_Reduce.3in @@ -28,7 +28,7 @@ INCLUDE 'mpif.h' MPI_REDUCE(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, ROOT, COMM, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP - INTEGER \fICOUNT, DATATYPE, OP, ROOT, COMM, IERROR\fP + INTEGER \fICOUNT, DATATYPE, OP, ROOT, COMM, IERROR\fP MPI_IREDUCE(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, ROOT, COMM, REQUEST, IERROR\fP) @@ -41,7 +41,7 @@ MPI_IREDUCE(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, ROOT, COMM, #include void MPI::Intracomm::Reduce(const void* \fIsendbuf\fP, void* \fIrecvbuf\fP, int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP, const MPI::Op& \fIop\fP, - int \fIroot\fP) const + int \fIroot\fP) const .fi .SH INPUT PARAMETERS @@ -76,134 +76,134 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The global reduce functions (MPI_Reduce, MPI_Op_create, MPI_Op_free, MPI_Allreduce, MPI_Reduce_scatter, MPI_Scan) perform a global reduce operation (such as sum, max, logical AND, etc.) across all the members of a group. The reduction operation can be either one of a predefined list of operations, or a user-defined operation. The global reduction functions come in several flavors: a reduce that returns the result of the reduction at one node, an all-reduce that returns this result at all nodes, and a scan (parallel prefix) operation. In addition, a reduce-scatter operation combines the functionality of a reduce and a scatter operation. .sp -MPI_Reduce combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of the process with rank root. The input buffer is defined by the arguments sendbuf, count, and datatype; the output buffer is defined by the arguments recvbuf, count, and datatype; both have the same number of elements, with the same type. The routine is called by all group members using the same arguments for count, datatype, op, root, and comm. Thus, all processes provide input buffers and output buffers of the same length, with elements of the same type. Each process can provide one element, or a sequence of elements, in which case the combine operation is executed element-wise on each entry of the sequence. For example, if the operation is MPI_MAX and the send buffer contains two elements that are floating-point numbers (count = 2 and datatype = MPI_FLOAT), then recvbuf(1) = global max (sendbuf(1)) and recvbuf(2) = global max(sendbuf(2)). +MPI_Reduce combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of the process with rank root. The input buffer is defined by the arguments sendbuf, count, and datatype; the output buffer is defined by the arguments recvbuf, count, and datatype; both have the same number of elements, with the same type. The routine is called by all group members using the same arguments for count, datatype, op, root, and comm. Thus, all processes provide input buffers and output buffers of the same length, with elements of the same type. Each process can provide one element, or a sequence of elements, in which case the combine operation is executed element-wise on each entry of the sequence. For example, if the operation is MPI_MAX and the send buffer contains two elements that are floating-point numbers (count = 2 and datatype = MPI_FLOAT), then recvbuf(1) = global max (sendbuf(1)) and recvbuf(2) = global max(sendbuf(2)). .sp .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform a reduce operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIsendbuf\fR. In this case, the input data is taken at the root from the receive buffer, where it will be replaced by the output data. +When the communicator is an intracommunicator, you can perform a reduce operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIsendbuf\fR. In this case, the input data is taken at the root from the receive buffer, where it will be replaced by the output data. .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp -Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. +Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the root process in the first group combines data from all the processes in the second group and then performs the \fIop\fR operation. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. Only the send buffer arguments are significant in the second group, and only the receive buffer arguments are significant in the root process of the first group. -.sp +When the communicator is an inter-communicator, the root process in the first group combines data from all the processes in the second group and then performs the \fIop\fR operation. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. Only the send buffer arguments are significant in the second group, and only the receive buffer arguments are significant in the root process of the first group. +.sp .SH PREDEFINED REDUCE OPERATIONS .sp The set of predefined operations provided by MPI is listed below (Predefined Reduce Operations). That section also enumerates the datatypes each operation can be applied to. In addition, users may define their own operations that can be overloaded to operate on several datatypes, either basic or derived. This is further explained in the description of the user-defined operations (see the man pages for MPI_Op_create and MPI_Op_free). .sp -The operation op is always assumed to be associative. All predefined operations are also assumed to be commutative. Users may define operations that are assumed to be associative, but not commutative. The ``canonical'' evaluation order of a reduction is determined by the ranks of the processes in the group. However, the implementation can take advantage of associativity, or associativity and commutativity, in order to change the order of evaluation. This may change the result of the reduction for operations that are not strictly associative and commutative, such as floating point addition. +The operation op is always assumed to be associative. All predefined operations are also assumed to be commutative. Users may define operations that are assumed to be associative, but not commutative. The ``canonical'' evaluation order of a reduction is determined by the ranks of the processes in the group. However, the implementation can take advantage of associativity, or associativity and commutativity, in order to change the order of evaluation. This may change the result of the reduction for operations that are not strictly associative and commutative, such as floating point addition. .sp Predefined operators work only with the MPI types listed below (Predefined Reduce Operations, and the section MINLOC and MAXLOC, below). User-defined operators may operate on general, derived datatypes. In this case, each argument that the reduce operation is applied to is one element described by such a datatype, which may contain several basic values. This is further explained in Section 4.9.4 of the MPI Standard, "User-Defined Operations." The following predefined operations are supplied for MPI_Reduce and related functions MPI_Allreduce, MPI_Reduce_scatter, and MPI_Scan. These operations are invoked by placing the following in op: .sp .nf - Name Meaning + Name Meaning --------- -------------------- - MPI_MAX maximum - MPI_MIN minimum - MPI_SUM sum - MPI_PROD product - MPI_LAND logical and - MPI_BAND bit-wise and - MPI_LOR logical or - MPI_BOR bit-wise or - MPI_LXOR logical xor - MPI_BXOR bit-wise xor - MPI_MAXLOC max value and location - MPI_MINLOC min value and location + MPI_MAX maximum + MPI_MIN minimum + MPI_SUM sum + MPI_PROD product + MPI_LAND logical and + MPI_BAND bit-wise and + MPI_LOR logical or + MPI_BOR bit-wise or + MPI_LXOR logical xor + MPI_BXOR bit-wise xor + MPI_MAXLOC max value and location + MPI_MINLOC min value and location .fi .sp The two operations MPI_MINLOC and MPI_MAXLOC are discussed separately below (MINLOC and MAXLOC). For the other predefined operations, we enumerate below the allowed combinations of op and datatype arguments. First, define groups of MPI basic datatypes in the following way: .sp .nf - C integer: MPI_INT, MPI_LONG, MPI_SHORT, - MPI_UNSIGNED_SHORT, MPI_UNSIGNED, - MPI_UNSIGNED_LONG - Fortran integer: MPI_INTEGER - Floating-point: MPI_FLOAT, MPI_DOUBLE, MPI_REAL, - MPI_DOUBLE_PRECISION, MPI_LONG_DOUBLE - Logical: MPI_LOGICAL - Complex: MPI_COMPLEX - Byte: MPI_BYTE + C integer: MPI_INT, MPI_LONG, MPI_SHORT, + MPI_UNSIGNED_SHORT, MPI_UNSIGNED, + MPI_UNSIGNED_LONG + Fortran integer: MPI_INTEGER + Floating-point: MPI_FLOAT, MPI_DOUBLE, MPI_REAL, + MPI_DOUBLE_PRECISION, MPI_LONG_DOUBLE + Logical: MPI_LOGICAL + Complex: MPI_COMPLEX + Byte: MPI_BYTE .fi .sp Now, the valid datatypes for each option is specified below. .sp .nf - Op Allowed Types + Op Allowed Types ---------------- --------------------------- - MPI_MAX, MPI_MIN C integer, Fortran integer, - floating-point + MPI_MAX, MPI_MIN C integer, Fortran integer, + floating-point - MPI_SUM, MPI_PROD C integer, Fortran integer, - floating-point, complex + MPI_SUM, MPI_PROD C integer, Fortran integer, + floating-point, complex - MPI_LAND, MPI_LOR, C integer, logical + MPI_LAND, MPI_LOR, C integer, logical MPI_LXOR - MPI_BAND, MPI_BOR, C integer, Fortran integer, byte + MPI_BAND, MPI_BOR, C integer, Fortran integer, byte MPI_BXOR .fi .sp -\fBExample 1:\fR A routine that computes the dot product of two vectors that are distributed across a group of processes and returns the answer at process zero. +\fBExample 1:\fR A routine that computes the dot product of two vectors that are distributed across a group of processes and returns the answer at process zero. .sp .nf - SUBROUTINE PAR_BLAS1(m, a, b, c, comm) - REAL a(m), b(m) ! local slice of array - REAL c ! result (at process zero) - REAL sum - INTEGER m, comm, i, ierr - - ! local sum - sum = 0.0 - DO i = 1, m - sum = sum + a(i)*b(i) - END DO - - ! global sum - CALL MPI_REDUCE(sum, c, 1, MPI_REAL, MPI_SUM, 0, comm, ierr) - RETURN + SUBROUTINE PAR_BLAS1(m, a, b, c, comm) + REAL a(m), b(m) ! local slice of array + REAL c ! result (at process zero) + REAL sum + INTEGER m, comm, i, ierr + + ! local sum + sum = 0.0 + DO i = 1, m + sum = sum + a(i)*b(i) + END DO + + ! global sum + CALL MPI_REDUCE(sum, c, 1, MPI_REAL, MPI_SUM, 0, comm, ierr) + RETURN .fi .sp \fBExample 2:\fR A routine that computes the product of a vector and an array that are distributed across a group of processes and returns the answer at process zero. .sp .nf - SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) - REAL a(m), b(m,n) ! local slice of array - REAL c(n) ! result - REAL sum(n) - INTEGER n, comm, i, j, ierr - - ! local sum - DO j= 1, n - sum(j) = 0.0 - DO i = 1, m - sum(j) = sum(j) + a(i)*b(i,j) - END DO - END DO - - ! global sum - CALL MPI_REDUCE(sum, c, n, MPI_REAL, MPI_SUM, 0, comm, ierr) - - ! return result at process zero (and garbage at the other nodes) + SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) + REAL a(m), b(m,n) ! local slice of array + REAL c(n) ! result + REAL sum(n) + INTEGER n, comm, i, j, ierr + + ! local sum + DO j= 1, n + sum(j) = 0.0 + DO i = 1, m + sum(j) = sum(j) + a(i)*b(i,j) + END DO + END DO + + ! global sum + CALL MPI_REDUCE(sum, c, n, MPI_REAL, MPI_SUM, 0, comm, ierr) + + ! return result at process zero (and garbage at the other nodes) RETURN .fi .SH MINLOC AND MAXLOC .ft R -The operator MPI_MINLOC is used to compute a global minimum and also an index attached to the minimum value. MPI_MAXLOC similarly computes a global maximum and index. One application of these is to compute a global minimum (maximum) and the rank of the process containing this value. +The operator MPI_MINLOC is used to compute a global minimum and also an index attached to the minimum value. MPI_MAXLOC similarly computes a global maximum and index. One application of these is to compute a global minimum (maximum) and the rank of the process containing this value. .sp -The operation that defines MPI_MAXLOC is +The operation that defines MPI_MAXLOC is .sp .nf ( u ) ( v ) ( w ) @@ -220,7 +220,7 @@ and ( k = ( min(i, j) if u = v ( - ( j if u < v) + ( j if u < v) MPI_MINLOC is defined similarly: @@ -239,7 +239,7 @@ and ( k = ( min(i, j) if u = v ( - ( j if u > v) + ( j if u > v) .fi @@ -271,145 +271,145 @@ provides nine such predefined datatypes. The operations MPI_MAXLOC and MPI_MINLOC can be used with each of the following datatypes: .sp .nf - Fortran: - Name Description - MPI_2REAL pair of REALs - MPI_2DOUBLE_PRECISION pair of DOUBLE-PRECISION variables - MPI_2INTEGER pair of INTEGERs - - C: - Name Description - MPI_FLOAT_INT float and int - MPI_DOUBLE_INT double and int - MPI_LONG_INT long and int - MPI_2INT pair of ints - MPI_SHORT_INT short and int + Fortran: + Name Description + MPI_2REAL pair of REALs + MPI_2DOUBLE_PRECISION pair of DOUBLE-PRECISION variables + MPI_2INTEGER pair of INTEGERs + + C: + Name Description + MPI_FLOAT_INT float and int + MPI_DOUBLE_INT double and int + MPI_LONG_INT long and int + MPI_2INT pair of ints + MPI_SHORT_INT short and int MPI_LONG_DOUBLE_INT long double and int .fi .sp The data type MPI_2REAL is equivalent to: .nf - MPI_TYPE_CONTIGUOUS(2, MPI_REAL, MPI_2REAL) + MPI_TYPE_CONTIGUOUS(2, MPI_REAL, MPI_2REAL) .fi .sp Similar statements apply for MPI_2INTEGER, MPI_2DOUBLE_PRECISION, and MPI_2INT. -.sp +.sp The datatype MPI_FLOAT_INT is as if defined by the following sequence of instructions. .sp .nf - type[0] = MPI_FLOAT - type[1] = MPI_INT - disp[0] = 0 - disp[1] = sizeof(float) - block[0] = 1 - block[1] = 1 + type[0] = MPI_FLOAT + type[1] = MPI_INT + disp[0] = 0 + disp[1] = sizeof(float) + block[0] = 1 + block[1] = 1 MPI_TYPE_STRUCT(2, block, disp, type, MPI_FLOAT_INT) .fi .sp -Similar statements apply for MPI_LONG_INT and MPI_DOUBLE_INT. +Similar statements apply for MPI_LONG_INT and MPI_DOUBLE_INT. .sp \fBExample 3:\fR Each process has an array of 30 doubles, in C. For each of the 30 locations, compute the value and rank of the process containing the largest value. .sp .nf - \&... - /* each process has an array of 30 double: ain[30] - */ - double ain[30], aout[30]; - int ind[30]; - struct { - double val; - int rank; - } in[30], out[30]; - int i, myrank, root; - - MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - for (i=0; i<30; ++i) { - in[i].val = ain[i]; - in[i].rank = myrank; - } - MPI_Reduce( in, out, 30, MPI_DOUBLE_INT, MPI_MAXLOC, root, comm ); - /* At this point, the answer resides on process root - */ - if (myrank == root) { - /* read ranks out - */ - for (i=0; i<30; ++i) { - aout[i] = out[i].val; - ind[i] = out[i].rank; - } - } + \&... + /* each process has an array of 30 double: ain[30] + */ + double ain[30], aout[30]; + int ind[30]; + struct { + double val; + int rank; + } in[30], out[30]; + int i, myrank, root; + + MPI_Comm_rank(MPI_COMM_WORLD, &myrank); + for (i=0; i<30; ++i) { + in[i].val = ain[i]; + in[i].rank = myrank; + } + MPI_Reduce( in, out, 30, MPI_DOUBLE_INT, MPI_MAXLOC, root, comm ); + /* At this point, the answer resides on process root + */ + if (myrank == root) { + /* read ranks out + */ + for (i=0; i<30; ++i) { + aout[i] = out[i].val; + ind[i] = out[i].rank; + } + } .fi .sp .fi -\fBExample 4:\fR Same example, in Fortran. +\fBExample 4:\fR Same example, in Fortran. .sp .nf - \&... - ! each process has an array of 30 double: ain(30) - - DOUBLE PRECISION ain(30), aout(30) - INTEGER ind(30); - DOUBLE PRECISION in(2,30), out(2,30) - INTEGER i, myrank, root, ierr; - - MPI_COMM_RANK(MPI_COMM_WORLD, myrank); - DO I=1, 30 - in(1,i) = ain(i) - in(2,i) = myrank ! myrank is coerced to a double - END DO - - MPI_REDUCE( in, out, 30, MPI_2DOUBLE_PRECISION, MPI_MAXLOC, root, - comm, ierr ); - ! At this point, the answer resides on process root - - IF (myrank .EQ. root) THEN - ! read ranks out - DO I= 1, 30 - aout(i) = out(1,i) - ind(i) = out(2,i) ! rank is coerced back to an integer - END DO - END IF + \&... + ! each process has an array of 30 double: ain(30) + + DOUBLE PRECISION ain(30), aout(30) + INTEGER ind(30); + DOUBLE PRECISION in(2,30), out(2,30) + INTEGER i, myrank, root, ierr; + + MPI_COMM_RANK(MPI_COMM_WORLD, myrank); + DO I=1, 30 + in(1,i) = ain(i) + in(2,i) = myrank ! myrank is coerced to a double + END DO + + MPI_REDUCE( in, out, 30, MPI_2DOUBLE_PRECISION, MPI_MAXLOC, root, + comm, ierr ); + ! At this point, the answer resides on process root + + IF (myrank .EQ. root) THEN + ! read ranks out + DO I= 1, 30 + aout(i) = out(1,i) + ind(i) = out(2,i) ! rank is coerced back to an integer + END DO + END IF .fi .sp \fBExample 5:\fR Each process has a nonempty array of values. Find the minimum global value, the rank of the process that holds it, and its index on this process. .sp .nf - #define LEN 1000 - - float val[LEN]; /* local array of values */ - int count; /* local number of values */ - int myrank, minrank, minindex; - float minval; - - struct { - float value; - int index; - } in, out; - - /* local minloc */ - in.value = val[0]; - in.index = 0; - for (i=1; i < count; i++) - if (in.value > val[i]) { - in.value = val[i]; - in.index = i; - } - - /* global minloc */ - MPI_Comm_rank(MPI_COMM_WORLD, &myrank); - in.index = myrank*LEN + in.index; - MPI_Reduce( in, out, 1, MPI_FLOAT_INT, MPI_MINLOC, root, comm ); - /* At this point, the answer resides on process root - */ - if (myrank == root) { - /* read answer out - */ - minval = out.value; - minrank = out.index / LEN; + #define LEN 1000 + + float val[LEN]; /* local array of values */ + int count; /* local number of values */ + int myrank, minrank, minindex; + float minval; + + struct { + float value; + int index; + } in, out; + + /* local minloc */ + in.value = val[0]; + in.index = 0; + for (i=1; i < count; i++) + if (in.value > val[i]) { + in.value = val[i]; + in.index = i; + } + + /* global minloc */ + MPI_Comm_rank(MPI_COMM_WORLD, &myrank); + in.index = myrank*LEN + in.index; + MPI_Reduce( in, out, 1, MPI_FLOAT_INT, MPI_MINLOC, root, comm ); + /* At this point, the answer resides on process root + */ + if (myrank == root) { + /* read answer out + */ + minval = out.value; + minrank = out.index / LEN; minindex = out.index % LEN; .fi .sp @@ -419,11 +419,11 @@ All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. The reduction functions ( .I MPI_Op ) do not return an error value. As a result, -if the functions detect an error, all they can do is either call +if the functions detect an error, all they can do is either call .I MPI_Abort or silently skip the problem. Thus, if you change the error handler from .I MPI_ERRORS_ARE_FATAL -to something else, for example, +to something else, for example, .I MPI_ERRORS_RETURN , then no error may be indicated. @@ -435,7 +435,7 @@ all collective routines return the same error value. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Reduce_local.3in b/ompi/mpi/man/man3/MPI_Reduce_local.3in index e3fbc6b13fb..0bd88f5cd8d 100644 --- a/ompi/mpi/man/man3/MPI_Reduce_local.3in +++ b/ompi/mpi/man/man3/MPI_Reduce_local.3in @@ -22,7 +22,7 @@ int MPI_Reduce_local(const void *\fIinbuf\fP, void *\fIinoutbuf\fP, int\fI count INCLUDE 'mpif.h' MPI_REDUCE_LOCAL(\fIINBUF, INOUTBUF, COUNT, DATATYPE, OP, IERROR\fP) \fIINBUF(*), INOUTBUF(*)\fP - INTEGER \fICOUNT, DATATYPE, OP, IERROR\fP + INTEGER \fICOUNT, DATATYPE, OP, IERROR\fP .fi .SH C++ Syntax @@ -55,7 +55,7 @@ Address of in/out buffer (choice). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -63,76 +63,76 @@ Fortran only: Error status (integer). .sp The global reduce functions (MPI_Reduce_local, MPI_Op_create, MPI_Op_free, MPI_Allreduce, MPI_Reduce_local_scatter, MPI_Scan) perform a global reduce operation (such as sum, max, logical AND, etc.) across all the members of a group. The reduction operation can be either one of a predefined list of operations, or a user-defined operation. The global reduction functions come in several flavors: a reduce that returns the result of the reduction at one node, an all-reduce that returns this result at all nodes, and a scan (parallel prefix) operation. In addition, a reduce-scatter operation combines the functionality of a reduce and a scatter operation. .sp -MPI_Reduce_local combines the elements provided in the input and input/output buffers of the local process, using the operation op, and returns the combined value in the inout/output buffer. The input buffer is defined by the arguments inbuf, count, and datatype; the output buffer is defined by the arguments inoutbuf, count, and datatype; both have the same number of elements, with the same type. The routine is a local call. The process can provide one element, or a sequence of elements, in which case the combine operation is executed element-wise on each entry of the sequence. For example, if the operation is MPI_MAX and the input buffer contains two elements that are floating-point numbers (count = 2 and datatype = MPI_FLOAT), then inoutbuf(1) = global max (inbuf(1)) and inoutbuf(2) = global max(inbuf(2)). +MPI_Reduce_local combines the elements provided in the input and input/output buffers of the local process, using the operation op, and returns the combined value in the inout/output buffer. The input buffer is defined by the arguments inbuf, count, and datatype; the output buffer is defined by the arguments inoutbuf, count, and datatype; both have the same number of elements, with the same type. The routine is a local call. The process can provide one element, or a sequence of elements, in which case the combine operation is executed element-wise on each entry of the sequence. For example, if the operation is MPI_MAX and the input buffer contains two elements that are floating-point numbers (count = 2 and datatype = MPI_FLOAT), then inoutbuf(1) = global max (inbuf(1)) and inoutbuf(2) = global max(inbuf(2)). .sp .SH USE OF IN-PLACE OPTION The use of MPI_IN_PLACE is disallowed with MPI_Reduce_local. -.sp +.sp .SH PREDEFINED REDUCE OPERATIONS .sp The set of predefined operations provided by MPI is listed below (Predefined Reduce Operations). That section also enumerates the datatypes each operation can be applied to. In addition, users may define their own operations that can be overloaded to operate on several datatypes, either basic or derived. This is further explained in the description of the user-defined operations (see the man pages for MPI_Op_create and MPI_Op_free). .sp -The operation op is always assumed to be associative. All predefined operations are also assumed to be commutative. Users may define operations that are assumed to be associative, but not commutative. The ``canonical'' evaluation order of a reduction is determined by the ranks of the processes in the group. However, the implementation can take advantage of associativity, or associativity and commutativity, in order to change the order of evaluation. This may change the result of the reduction for operations that are not strictly associative and commutative, such as floating point addition. +The operation op is always assumed to be associative. All predefined operations are also assumed to be commutative. Users may define operations that are assumed to be associative, but not commutative. The ``canonical'' evaluation order of a reduction is determined by the ranks of the processes in the group. However, the implementation can take advantage of associativity, or associativity and commutativity, in order to change the order of evaluation. This may change the result of the reduction for operations that are not strictly associative and commutative, such as floating point addition. .sp Predefined operators work only with the MPI types listed below (Predefined Reduce Operations, and the section MINLOC and MAXLOC, below). User-defined operators may operate on general, derived datatypes. In this case, each argument that the reduce operation is applied to is one element described by such a datatype, which may contain several basic values. This is further explained in Section 4.9.4 of the MPI Standard, "User-Defined Operations." The following predefined operations are supplied for MPI_Reduce_local and related functions MPI_Allreduce, MPI_Reduce_scatter, and MPI_Scan. These operations are invoked by placing the following in op: .sp .nf - Name Meaning + Name Meaning --------- -------------------- - MPI_MAX maximum - MPI_MIN minimum - MPI_SUM sum - MPI_PROD product - MPI_LAND logical and - MPI_BAND bit-wise and - MPI_LOR logical or - MPI_BOR bit-wise or - MPI_LXOR logical xor - MPI_BXOR bit-wise xor - MPI_MAXLOC max value and location - MPI_MINLOC min value and location + MPI_MAX maximum + MPI_MIN minimum + MPI_SUM sum + MPI_PROD product + MPI_LAND logical and + MPI_BAND bit-wise and + MPI_LOR logical or + MPI_BOR bit-wise or + MPI_LXOR logical xor + MPI_BXOR bit-wise xor + MPI_MAXLOC max value and location + MPI_MINLOC min value and location .fi .sp The two operations MPI_MINLOC and MPI_MAXLOC are discussed separately below (MINLOC and MAXLOC). For the other predefined operations, we enumerate below the allowed combinations of op and datatype arguments. First, define groups of MPI basic datatypes in the following way: .sp .nf - C integer: MPI_INT, MPI_LONG, MPI_SHORT, - MPI_UNSIGNED_SHORT, MPI_UNSIGNED, - MPI_UNSIGNED_LONG - Fortran integer: MPI_INTEGER - Floating-point: MPI_FLOAT, MPI_DOUBLE, MPI_REAL, - MPI_DOUBLE_PRECISION, MPI_LONG_DOUBLE - Logical: MPI_LOGICAL - Complex: MPI_COMPLEX - Byte: MPI_BYTE + C integer: MPI_INT, MPI_LONG, MPI_SHORT, + MPI_UNSIGNED_SHORT, MPI_UNSIGNED, + MPI_UNSIGNED_LONG + Fortran integer: MPI_INTEGER + Floating-point: MPI_FLOAT, MPI_DOUBLE, MPI_REAL, + MPI_DOUBLE_PRECISION, MPI_LONG_DOUBLE + Logical: MPI_LOGICAL + Complex: MPI_COMPLEX + Byte: MPI_BYTE .fi .sp Now, the valid datatypes for each option is specified below. .sp .nf - Op Allowed Types + Op Allowed Types ---------------- --------------------------- - MPI_MAX, MPI_MIN C integer, Fortran integer, - floating-point + MPI_MAX, MPI_MIN C integer, Fortran integer, + floating-point - MPI_SUM, MPI_PROD C integer, Fortran integer, - floating-point, complex + MPI_SUM, MPI_PROD C integer, Fortran integer, + floating-point, complex - MPI_LAND, MPI_LOR, C integer, logical + MPI_LAND, MPI_LOR, C integer, logical MPI_LXOR - MPI_BAND, MPI_BOR, C integer, Fortran integer, byte + MPI_BAND, MPI_BOR, C integer, Fortran integer, byte MPI_BXOR .fi .sp .SH MINLOC AND MAXLOC .ft R -The operator MPI_MINLOC is used to compute a global minimum and also an index attached to the minimum value. MPI_MAXLOC similarly computes a global maximum and index. One application of these is to compute a global minimum (maximum) and the rank of the process containing this value. +The operator MPI_MINLOC is used to compute a global minimum and also an index attached to the minimum value. MPI_MAXLOC similarly computes a global maximum and index. One application of these is to compute a global minimum (maximum) and the rank of the process containing this value. .sp -The operation that defines MPI_MAXLOC is +The operation that defines MPI_MAXLOC is .sp .nf ( u ) ( v ) ( w ) @@ -149,7 +149,7 @@ and ( k = ( min(i, j) if u = v ( - ( j if u < v) + ( j if u < v) MPI_MINLOC is defined similarly: @@ -168,7 +168,7 @@ and ( k = ( min(i, j) if u = v ( - ( j if u > v) + ( j if u > v) .fi @@ -200,44 +200,44 @@ provides nine such predefined datatypes. The operations MPI_MAXLOC and MPI_MINLOC can be used with each of the following datatypes: .sp .nf - Fortran: - Name Description - MPI_2REAL pair of REALs - MPI_2DOUBLE_PRECISION pair of DOUBLE-PRECISION variables - MPI_2INTEGER pair of INTEGERs - - C: - Name Description - MPI_FLOAT_INT float and int - MPI_DOUBLE_INT double and int - MPI_LONG_INT long and int - MPI_2INT pair of ints - MPI_SHORT_INT short and int + Fortran: + Name Description + MPI_2REAL pair of REALs + MPI_2DOUBLE_PRECISION pair of DOUBLE-PRECISION variables + MPI_2INTEGER pair of INTEGERs + + C: + Name Description + MPI_FLOAT_INT float and int + MPI_DOUBLE_INT double and int + MPI_LONG_INT long and int + MPI_2INT pair of ints + MPI_SHORT_INT short and int MPI_LONG_DOUBLE_INT long double and int .fi .sp The data type MPI_2REAL is equivalent to: .nf - MPI_TYPE_CONTIGUOUS(2, MPI_REAL, MPI_2REAL) + MPI_TYPE_CONTIGUOUS(2, MPI_REAL, MPI_2REAL) .fi .sp Similar statements apply for MPI_2INTEGER, MPI_2DOUBLE_PRECISION, and MPI_2INT. -.sp +.sp The datatype MPI_FLOAT_INT is as if defined by the following sequence of instructions. .sp .nf - type[0] = MPI_FLOAT - type[1] = MPI_INT - disp[0] = 0 - disp[1] = sizeof(float) - block[0] = 1 - block[1] = 1 + type[0] = MPI_FLOAT + type[1] = MPI_INT + disp[0] = 0 + disp[1] = sizeof(float) + block[0] = 1 + block[1] = 1 MPI_TYPE_STRUCT(2, block, disp, type, MPI_FLOAT_INT) .fi .sp -Similar statements apply for MPI_LONG_INT and MPI_DOUBLE_INT. +Similar statements apply for MPI_LONG_INT and MPI_DOUBLE_INT. .sp All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. .SH NOTES ON COLLECTIVE OPERATIONS @@ -245,11 +245,11 @@ All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. The reduction operators ( .I MPI_Op ) do not return an error value. As a result, -if the functions detect an error, all they can do is either call +if the functions detect an error, all they can do is either call .I MPI_Abort or silently skip the problem. Thus, if you change the error handler from .I MPI_ERRORS_ARE_FATAL -to something else, for example, +to something else, for example, .I MPI_ERRORS_RETURN , then no error may be indicated. @@ -261,7 +261,7 @@ all collective routines return the same error value. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Reduce_scatter.3in b/ompi/mpi/man/man3/MPI_Reduce_scatter.3in index 7fc18df555b..51bf5fd69f9 100644 --- a/ompi/mpi/man/man3/MPI_Reduce_scatter.3in +++ b/ompi/mpi/man/man3/MPI_Reduce_scatter.3in @@ -72,7 +72,7 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -86,22 +86,22 @@ the receive buffer defined by \fIrecvbuf\fP, \fIrecvcounts\fP[i], and \fIdatatyp .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform a reduce-scatter operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the \fIsendbuf\fR. In this case, the input data is taken from the top of the receive buffer. The area occupied by the input data may be either longer or shorter than the data filled by the output data. +When the communicator is an intracommunicator, you can perform a reduce-scatter operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the \fIsendbuf\fR. In this case, the input data is taken from the top of the receive buffer. The area occupied by the input data may be either longer or shorter than the data filled by the output data. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the reduce-scatter operation occurs in two phases. First, the result of the reduction performed on the data provided by the processes in the first group is scattered among the processes in the second group. Then the reverse occurs: the reduction performed on the data provided by the processes in the second group is scattered among the processes in the first group. For each group, all processes provide the same \fIrecvcounts\fR argument, and the sum of the \fIrecvcounts\fR values should be the same for both groups. -.sp +When the communicator is an inter-communicator, the reduce-scatter operation occurs in two phases. First, the result of the reduction performed on the data provided by the processes in the first group is scattered among the processes in the second group. Then the reverse occurs: the reduction performed on the data provided by the processes in the second group is scattered among the processes in the first group. For each group, all processes provide the same \fIrecvcounts\fR argument, and the sum of the \fIrecvcounts\fR values should be the same for both groups. +.sp .SH NOTES ON COLLECTIVE OPERATIONS The reduction functions ( .I MPI_Op ) do not return an error value. As a result, -if the functions detect an error, all they can do is either call +if the functions detect an error, all they can do is either call .I MPI_Abort or silently skip the problem. Thus, if you change the error handler from .I MPI_ERRORS_ARE_FATAL -to something else, for example, +to something else, for example, .I MPI_ERRORS_RETURN , then no error may be indicated. @@ -113,5 +113,5 @@ all collective routines return the same error value. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Register_datarep.3in b/ompi/mpi/man/man3/MPI_Register_datarep.3in index 8fb2b23074b..244efa07e19 100644 --- a/ompi/mpi/man/man3/MPI_Register_datarep.3in +++ b/ompi/mpi/man/man3/MPI_Register_datarep.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Register_datarep 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Register_datarep\fP \- Defines data representation. +\fBMPI_Register_datarep\fP \- Defines data representation. .SH SYNTAX .ft R @@ -14,19 +14,19 @@ C Syntax #include int MPI_Register_datarep(const char \fI*datarep\fP, - MPI_Datarep_conversion_function \fI*read_conversion_fn\fP, - MPI_Datarep_conversion_function \fI*write_conversion_fn\fP, - MPI_Datarep_extent_function \fI*dtype_file_extent_fn\fP, + MPI_Datarep_conversion_function \fI*read_conversion_fn\fP, + MPI_Datarep_conversion_function \fI*write_conversion_fn\fP, + MPI_Datarep_extent_function \fI*dtype_file_extent_fn\fP, void \fI*extra_state\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' - MPI_REGISTER_DATAREP(\fIDATAREP\fP, \fIREAD_CONVERSION_FN\fP, - \fIWRITE_CONVERSION_FN\fP, \fIDTYPE_FILE_EXTENT_FN\fP, + MPI_REGISTER_DATAREP(\fIDATAREP\fP, \fIREAD_CONVERSION_FN\fP, + \fIWRITE_CONVERSION_FN\fP, \fIDTYPE_FILE_EXTENT_FN\fP, \fIEXTRA_STATE\fP,\fI IERROR\fP) - CHARACTER*(*) \fIDATAREP\fP - EXTERNAL \fIREAD_CONVERSION_FN, WRITE_CONVERSION_FN, + CHARACTER*(*) \fIDATAREP\fP + EXTERNAL \fIREAD_CONVERSION_FN, WRITE_CONVERSION_FN, DTYPE_FILE_EXTENT_FN\fP INTEGER \fIIERROR\fP INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE\fP @@ -61,33 +61,33 @@ Function invoked to get the extent of a data type as represented in the file (fu .ft R .TP 1i extra_state -Extra state. +Extra state. .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Register_datarep defines a data representation. It associates the data representation's identifier (a string) with the functions that convert from file representation to the native representation and vice versa, with the function that gets the extent of a data type as represented in the file, as well as with "extra state," which is used for passing arguments. Once a data representation has been registered using this routine, you may specify its identifier as an argument to MPI_File_set_view, causing subsequent data-access operations to call the specified conversion functions. +MPI_Register_datarep defines a data representation. It associates the data representation's identifier (a string) with the functions that convert from file representation to the native representation and vice versa, with the function that gets the extent of a data type as represented in the file, as well as with "extra state," which is used for passing arguments. Once a data representation has been registered using this routine, you may specify its identifier as an argument to MPI_File_set_view, causing subsequent data-access operations to call the specified conversion functions. -The call associates \fIread_conversion_fn\fP, \fIwrite_conversion_fn\fP, and \fIdtype_file_extent_fn\fP with the data representation identifier \fIdatarep\fP. \fIdatarep\fP can then be used as an argument to MPI_File_set_view, causing subsequent data access operations to call the conversion functions to convert all data items accessed between file data representation and native representation. MPI_Register_datarep is a local operation and only registers the data representation for the calling MPI process. If \fIdatarep\fP is already defined, an error in the error class MPI_ERR_DUP_DATAREP is raised using the default file error handler. The length of a data representation string is limited to the value of MPI_MAX_DATAREP_STRING. MPI_MAX_DATAREP_STRING must have a value of at least 64. No routines are provided to delete data representations and free the associated resources; it is not expected that an application will generate them in significant numbers. +The call associates \fIread_conversion_fn\fP, \fIwrite_conversion_fn\fP, and \fIdtype_file_extent_fn\fP with the data representation identifier \fIdatarep\fP. \fIdatarep\fP can then be used as an argument to MPI_File_set_view, causing subsequent data access operations to call the conversion functions to convert all data items accessed between file data representation and native representation. MPI_Register_datarep is a local operation and only registers the data representation for the calling MPI process. If \fIdatarep\fP is already defined, an error in the error class MPI_ERR_DUP_DATAREP is raised using the default file error handler. The length of a data representation string is limited to the value of MPI_MAX_DATAREP_STRING. MPI_MAX_DATAREP_STRING must have a value of at least 64. No routines are provided to delete data representations and free the associated resources; it is not expected that an application will generate them in significant numbers. .SH NOTES .ft R -The Fortran version of each MPI I/O routine includes a final argument, -IERROR, which is not defined in the PARAMETERS sections. This argument is used to return the error status of the routine in the manner typical for Fortran library routines. +The Fortran version of each MPI I/O routine includes a final argument, +IERROR, which is not defined in the PARAMETERS sections. This argument is used to return the error status of the routine in the manner typical for Fortran library routines. .sp The C version of each routine returns an error status as an integer return value. .sp -Error classes are found in mpi.h (for C), mpif.h (for Fortran), and mpi++.h (for C++). +Error classes are found in mpi.h (for C), mpif.h (for Fortran), and mpi++.h (for C++). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Request_free.3in b/ompi/mpi/man/man3/MPI_Request_free.3in index 93d3d494f1a..e64f2b22a92 100644 --- a/ompi/mpi/man/man3/MPI_Request_free.3in +++ b/ompi/mpi/man/man3/MPI_Request_free.3in @@ -19,7 +19,7 @@ int MPI_Request_free(MPI_Request *request) .nf \s-1INCLUDE\s0 'mpif.h' MPI_REQUEST_FREE(REQUEST, IERROR) - INTEGER REQUEST, IERROR + INTEGER REQUEST, IERROR .fi .SH C++ Syntax @@ -39,54 +39,54 @@ request This operation allows a request object to be deallocated without waiting for the associated communication to complete. .sp MPI_Request_free marks the request object for deallocation and sets request -to MPI_REQUEST_NULL. Any ongoing communication that is associated with the request will be allowed to complete. The request will be deallocated only after its completion. +to MPI_REQUEST_NULL. Any ongoing communication that is associated with the request will be allowed to complete. The request will be deallocated only after its completion. .SH NOTES -Once a request is freed by a call to MPI_Request_free, it is not possible to check for the successful completion of the associated communication with calls to MPI_Wait or MPI_Test. Also, if an error occurs subsequently during the communication, an error code cannot be returned to the user -- such an error must be treated as fatal. Questions arise as to how one knows when the operations have completed when using MPI_Request_free. Depending on the program logic, there may be other ways in which the program knows that certain operations have completed and this makes usage of MPI_Request_free practical. For example, an active send request could be freed when the logic of the program is such that the receiver sends a reply to the message sent -- the arrival of the reply informs the sender that the send has completed and the send buffer can be reused. An active receive request should never be freed, as the receiver will have no way to verify that the receive has completed and the receive buffer can be reused. +Once a request is freed by a call to MPI_Request_free, it is not possible to check for the successful completion of the associated communication with calls to MPI_Wait or MPI_Test. Also, if an error occurs subsequently during the communication, an error code cannot be returned to the user -- such an error must be treated as fatal. Questions arise as to how one knows when the operations have completed when using MPI_Request_free. Depending on the program logic, there may be other ways in which the program knows that certain operations have completed and this makes usage of MPI_Request_free practical. For example, an active send request could be freed when the logic of the program is such that the receiver sends a reply to the message sent -- the arrival of the reply informs the sender that the send has completed and the send buffer can be reused. An active receive request should never be freed, as the receiver will have no way to verify that the receive has completed and the receive buffer can be reused. .sp -\fBExample:\fR +\fBExample:\fR .sp .nf - CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank) - IF(rank.EQ.0) THEN - DO i=1, n - CALL MPI_ISEND(outval, 1, MPI_REAL, 1, 0, req, ierr) - CALL MPI_REQUEST_FREE(req, ierr) - CALL MPI_IRECV(inval, 1, MPI_REAL, 1, 0, req, ierr) - CALL MPI_WAIT(req, status, ierr) - END DO - ELSE ! rank.EQ.1 - CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr) - CALL MPI_WAIT(req, status) - DO I=1, n-1 - CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr) - CALL MPI_REQUEST_FREE(req, ierr) - CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr) - CALL MPI_WAIT(req, status, ierr) - END DO - CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr) - CALL MPI_WAIT(req, status) - END IF + CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank) + IF(rank.EQ.0) THEN + DO i=1, n + CALL MPI_ISEND(outval, 1, MPI_REAL, 1, 0, req, ierr) + CALL MPI_REQUEST_FREE(req, ierr) + CALL MPI_IRECV(inval, 1, MPI_REAL, 1, 0, req, ierr) + CALL MPI_WAIT(req, status, ierr) + END DO + ELSE ! rank.EQ.1 + CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr) + CALL MPI_WAIT(req, status) + DO I=1, n-1 + CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr) + CALL MPI_REQUEST_FREE(req, ierr) + CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr) + CALL MPI_WAIT(req, status, ierr) + END DO + CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr) + CALL MPI_WAIT(req, status) + END IF .fi .sp This routine is normally used to free persistent requests created with -either +either .I MPI_Recv_init -or +or .I MPI_Send_init and friends. However, it can be -used to free a request created with +used to free a request created with .I MPI_Irecv -or +or .I MPI_Isend and friends; in that case the use can not use the test/wait routines on the request. -It +It .B is permitted to free an active request. However, once freed, you can not -use the request in a wait or test routine (e.g., +use the request in a wait or test routine (e.g., .I MPI_Wait ). @@ -94,7 +94,7 @@ use the request in a wait or test routine (e.g., Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Isend @@ -132,4 +132,4 @@ MPI_Testany MPI_Testsome - + diff --git a/ompi/mpi/man/man3/MPI_Request_get_status.3in b/ompi/mpi/man/man3/MPI_Request_get_status.3in index 01bb9ae08ed..62809ca6ad6 100644 --- a/ompi/mpi/man/man3/MPI_Request_get_status.3in +++ b/ompi/mpi/man/man3/MPI_Request_get_status.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Request_get_status 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Request_get_status\fP \- Access information associated with a request without freeing the request. +\fBMPI_Request_get_status\fP \- Access information associated with a request without freeing the request. .SH SYNTAX .ft R @@ -19,7 +19,7 @@ int MPI_Request_get_status(MPI_Request \fIrequest\fP, int \fI*flag\fP, MPI_Statu .nf INCLUDE 'mpif.h' MPI_REQUEST_GET_STATUS(\fIREQUEST\fP, \fIFLAG\fP, \fISTATUS\fP, \fIIERROR\fP) - INTEGER REQUEST, STATUS(MPI_STATUS_SIZE), IERROR + INTEGER REQUEST, STATUS(MPI_STATUS_SIZE), IERROR LOGICAL FLAG .fi @@ -49,13 +49,13 @@ MPI_Status object if flag is true (status). .SH DESCRIPTION .ft R -MPI_Request_get_status sets \fIflag\fP=\fItrue\fP if the operation is complete or sets \fIflag\fP=\fIfalse\fP if it is not complete. If the operation is complete, it returns in \fIstatus\fP the request status. It does not deallocate or inactivate the request; a subsequent call to test, wait, or free should be executed with that request. +MPI_Request_get_status sets \fIflag\fP=\fItrue\fP if the operation is complete or sets \fIflag\fP=\fIfalse\fP if it is not complete. If the operation is complete, it returns in \fIstatus\fP the request status. It does not deallocate or inactivate the request; a subsequent call to test, wait, or free should be executed with that request. .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Rsend.3in b/ompi/mpi/man/man3/MPI_Rsend.3in index 58255c85d57..814321e0986 100644 --- a/ompi/mpi/man/man3/MPI_Rsend.3in +++ b/ompi/mpi/man/man3/MPI_Rsend.3in @@ -22,13 +22,13 @@ int MPI_Rsend(const void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\f INCLUDE 'mpif.h' MPI_RSEND(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, IERROR\fP .fi .SH C++ Syntax .nf #include -void Comm::Rsend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& +void Comm::Rsend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -57,7 +57,7 @@ Communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -69,5 +69,5 @@ ready send is called. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Rsend_init.3in b/ompi/mpi/man/man3/MPI_Rsend_init.3in index a64fffdcfc8..9a0d1e8ee42 100644 --- a/ompi/mpi/man/man3/MPI_Rsend_init.3in +++ b/ompi/mpi/man/man3/MPI_Rsend_init.3in @@ -23,13 +23,13 @@ INCLUDE 'mpif.h' MPI_RSEND_INIT(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Prequest Comm::Rsend_init(const void* \fIbuf\fP, int \fIcount\fP, const +Prequest Comm::Rsend_init(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -62,19 +62,19 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Creates a persistent communication object for a ready mode send operation, and binds to it all the arguments of a send operation. +Creates a persistent communication object for a ready mode send operation, and binds to it all the arguments of a send operation. .sp -A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. +A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Scan.3in b/ompi/mpi/man/man3/MPI_Scan.3in index b8b73813834..87b90dd3993 100644 --- a/ompi/mpi/man/man3/MPI_Scan.3in +++ b/ompi/mpi/man/man3/MPI_Scan.3in @@ -72,7 +72,7 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -110,7 +110,7 @@ logical(j). The operator that produces this effect is where .sp ( u + v if i = j - w = ( + w = ( ( v if i != j .fi .sp @@ -122,7 +122,7 @@ given below. double val; int log; } SegScanPair; - + /* * the user-defined function */ @@ -131,7 +131,7 @@ given below. { int i; SegScanPair c; - + for (i = 0; i < *len; ++i) { if (in->log == inout->log) c.val = in->val + inout->val; @@ -152,36 +152,36 @@ we must be careful to specify that it is noncommutative, as in the following: .sp .nf - int i, base; - SeqScanPair a, answer; - MPI_Op myOp; - MPI_Datatype type[2] = {MPI_DOUBLE, MPI_INT}; - MPI_Aint disp[2]; - int blocklen[2] = {1, 1}; - MPI_Datatype sspair; + int i, base; + SeqScanPair a, answer; + MPI_Op myOp; + MPI_Datatype type[2] = {MPI_DOUBLE, MPI_INT}; + MPI_Aint disp[2]; + int blocklen[2] = {1, 1}; + MPI_Datatype sspair; /* - * explain to MPI how type SegScanPair is defined - */ - MPI_Get_address(a, disp); - MPI_Get_address(a.log, disp + 1); - base = disp[0]; + * explain to MPI how type SegScanPair is defined + */ + MPI_Get_address(a, disp); + MPI_Get_address(a.log, disp + 1); + base = disp[0]; for (i = 0; i < 2; ++i) - disp[i] -= base; - MPI_Type_struct(2, blocklen, disp, type, &sspair); + disp[i] -= base; + MPI_Type_struct(2, blocklen, disp, type, &sspair); MPI_Type_commit(&sspair); /* * create the segmented-scan user-op * noncommutative - set commute (arg 2) to 0 - */ + */ MPI_Op_create((MPI_User_function *)segScan, 0, &myOp); - \&... + \&... MPI_Scan(a, answer, 1, sspair, myOp, comm); .fi .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform a scanning operation in place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the \fIsendbuf\fR argument. The input data is taken from the receive buffer and replaced by the output data. +When the communicator is an intracommunicator, you can perform a scanning operation in place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the \fIsendbuf\fR argument. The input data is taken from the receive buffer and replaced by the output data. .SH NOTES ON COLLECTIVE OPERATIONS .ft R @@ -207,7 +207,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Scatter.3in b/ompi/mpi/man/man3/MPI_Scatter.3in index ef59d4ebfef..5fca42bdb7f 100644 --- a/ompi/mpi/man/man3/MPI_Scatter.3in +++ b/ompi/mpi/man/man3/MPI_Scatter.3in @@ -28,8 +28,8 @@ INCLUDE 'mpif.h' MPI_SCATTER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP - INTEGER \fISENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT\fP - INTEGER \fICOMM, IERROR\fP + INTEGER \fISENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT\fP + INTEGER \fICOMM, IERROR\fP MPI_ISCATTER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, REQUEST, IERROR\fP) @@ -43,8 +43,8 @@ MPI_ISCATTER(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, #include void MPI::Comm::Scatter(const void* \fIsendbuf\fP, int \fIsendcount\fP, const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, - int \fIrecvcount\fP, const MPI::Datatype& \fIrecvtype\fP, - int \fIroot\fP) const + int \fIrecvcount\fP, const MPI::Datatype& \fIrecvtype\fP, + int \fIroot\fP) const .fi .SH INPUT PARAMETERS @@ -58,7 +58,7 @@ Number of elements sent to each process (integer, significant only at root). .TP 1i sendtype -Datatype of send buffer elements (handle, significant only at root). +Datatype of send buffer elements (handle, significant only at root). .TP 1i recvcount Number of elements in receive buffer (integer). @@ -83,20 +83,20 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Scatter is the inverse operation to MPI_Gather. +MPI_Scatter is the inverse operation to MPI_Gather. .sp -The outcome is as if the root executed n send operations, +The outcome is as if the root executed n send operations, .sp .nf MPI_Send(sendbuf + i * sendcount * extent(sendtype), sendcount, sendtype, i, \&...) .fi .sp -and each process executed a receive, +and each process executed a receive, .sp .nf MPI_Recv(recvbuf, recvcount, recvtype, i, \&...). @@ -107,7 +107,7 @@ MPI_Send(\fIsendbuf\fP, \fIsendcount\fP * \fIn\fP,\ \fIsendtype\fP, \&...). This into \fIn\fP equal segments, the ith segment is sent to the ith process in the group, and each process receives this message as above. .sp -The send buffer is ignored for all nonroot processes. +The send buffer is ignored for all nonroot processes. .sp The type signature associated with \fIsendcount\fP, \fIsendtype\fP at the root must be equal to the type signature associated with \fIrecvcount\fP, \fIrecvtype\fP at all @@ -129,36 +129,36 @@ to achieve symmetry with MPI_Gather, where the corresponding restriction (a multiple-write restriction) is necessary. .sp \fBExample:\fR The reverse of Example 1 in the MPI_Gather manpage. Scatter -sets of 100 ints from the root to each process in the group. +sets of 100 ints from the root to each process in the group. .sp .nf MPI_Comm comm; - int gsize,*sendbuf; - int root, rbuf[100]; - \&... - MPI_Comm_size(comm, &gsize); - sendbuf = (int *)malloc(gsize*100*sizeof(int)); - \&... - MPI_Scatter(sendbuf, 100, MPI_INT, rbuf, 100, + int gsize,*sendbuf; + int root, rbuf[100]; + \&... + MPI_Comm_size(comm, &gsize); + sendbuf = (int *)malloc(gsize*100*sizeof(int)); + \&... + MPI_Scatter(sendbuf, 100, MPI_INT, rbuf, 100, MPI_INT, root, comm); .fi .SH USE OF IN-PLACE OPTION -When the communicator is an intracommunicator, you can perform a scatter operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIrecvbuf\fR. In this case, \fIrecvcount\fR and \fIrecvtype\fR are ignored, and the root process sends no data to itself. +When the communicator is an intracommunicator, you can perform a scatter operation in-place (the output buffer is used as the input buffer). Use the variable MPI_IN_PLACE as the value of the root process \fIrecvbuf\fR. In this case, \fIrecvcount\fR and \fIrecvtype\fR are ignored, and the root process sends no data to itself. .sp Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use as MPI_BOTTOM. .sp -Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. +Because the in-place option converts the receive buffer into a send-and-receive buffer, a Fortran binding that includes INTENT must mark these as INOUT, not OUT. .sp .SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR .sp -When the communicator is an inter-communicator, the root process in the first group sends data to all processes in the second group. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. The receive buffer argument of the root process in the first group must be consistent with the receive buffer argument of the processes in the second group. -.sp +When the communicator is an inter-communicator, the root process in the first group sends data to all processes in the second group. The first group defines the root process. That process uses MPI_ROOT as the value of its \fIroot\fR argument. The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument. All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument. The receive buffer argument of the root process in the first group must be consistent with the receive buffer argument of the processes in the second group. +.sp .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Scatterv.3in b/ompi/mpi/man/man3/MPI_Scatterv.3in index 6eca5e9e574..3f6ab07cc42 100644 --- a/ompi/mpi/man/man3/MPI_Scatterv.3in +++ b/ompi/mpi/man/man3/MPI_Scatterv.3in @@ -29,7 +29,7 @@ MPI_SCATTERV(\fISENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR\fP) \fISENDBUF(*), RECVBUF(*)\fP INTEGER \fISENDCOUNTS(*), DISPLS(*), SENDTYPE\fP - INTEGER \fIRECVCOUNT, RECVTYPE, ROOT, COMM, IERROR\fP + INTEGER \fIRECVCOUNT, RECVTYPE, ROOT, COMM, IERROR\fP MPI_ISCATTERV(\fISENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, REQUEST, IERROR\fP) @@ -44,7 +44,7 @@ MPI_ISCATTERV(\fISENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF, void MPI::Comm::Scatterv(const void* \fIsendbuf\fP, const int \fIsendcounts\fP[], const int \fIdispls\fP[], const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP, int \fIrecvcount\fP, const MPI::Datatype& - \fIrecvtype\fP, int \fIroot\fP) const + \fIrecvtype\fP, int \fIroot\fP) const .fi .SH INPUT PARAMETERS @@ -87,11 +87,11 @@ Request (handle, non-blocking only). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Scatterv is the inverse operation to MPI_Gatherv. +MPI_Scatterv is the inverse operation to MPI_Gatherv. .sp MPI_Scatterv extends the functionality of MPI_Scatter by allowing a varying count of data to be sent to each process, since \fIsendcounts\fP is now an array. @@ -128,81 +128,81 @@ location on the root to be read more than once. .sp \fBExample 1:\fR The reverse of Example 5 in the MPI_Gatherv manpage. We have a varying stride between blocks at sending (root) side, at the -receiving side we receive 100 - \fIi\fP elements into the \fIi\fPth column of a 100 x 150 C array at process \fIi\fP. +receiving side we receive 100 - \fIi\fP elements into the \fIi\fPth column of a 100 x 150 C array at process \fIi\fP. .sp .nf - MPI_Comm comm; - int gsize,recvarray[100][150],*rptr; - int root, *sendbuf, myrank, bufsize, *stride; - MPI_Datatype rtype; - int i, *displs, *scounts, offset; - \&... - MPI_Comm_size( comm, &gsize); - MPI_Comm_rank( comm, &myrank ); - - stride = (int *)malloc(gsize*sizeof(int)); - \&... - /* stride[i] for i = 0 to gsize-1 is set somehow - * sendbuf comes from elsewhere - */ - \&... - displs = (int *)malloc(gsize*sizeof(int)); - scounts = (int *)malloc(gsize*sizeof(int)); - offset = 0; - for (i=0; i= 100. +MPI_Scatterv, where \fIstride\fP >= 100. .sp .nf - MPI_Comm comm; - int gsize,*sendbuf; - int root, rbuf[100], i, *displs, *scounts; - - \&... - - MPI_Comm_size(comm, &gsize); - sendbuf = (int *)malloc(gsize*stride*sizeof(int)); - \&... - displs = (int *)malloc(gsize*sizeof(int)); - scounts = (int *)malloc(gsize*sizeof(int)); - for (i=0; i \fIBUF(*)\fP - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, IERROR\fP .fi .SH C++ Syntax .nf #include -void Comm::Send(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& +void Comm::Send(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -57,21 +57,21 @@ Communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Send performs a standard-mode, blocking send. +MPI_Send performs a standard-mode, blocking send. .SH NOTE .ft R -This routine will block until the message is sent to the destination. For an in-depth explanation of the semantics of the standard-mode send, refer to the MPI-1 Standard. +This routine will block until the message is sent to the destination. For an in-depth explanation of the semantics of the standard-mode send, refer to the MPI-1 Standard. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Send_init.3in b/ompi/mpi/man/man3/MPI_Send_init.3in index 7b64db5815d..529e7e56813 100644 --- a/ompi/mpi/man/man3/MPI_Send_init.3in +++ b/ompi/mpi/man/man3/MPI_Send_init.3in @@ -24,14 +24,14 @@ MPI_SEND_INIT(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) INTEGER \fIREQUEST, COUNT, DATATYPE, DEST, TAG\fP - INTEGER \fICOMM, REQUEST, IERROR\fP + INTEGER \fICOMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Prequest Comm::Send_init(const void* \fIbuf\fP, int \fIcount\fP, const - Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const +Prequest Comm::Send_init(const void* \fIbuf\fP, int \fIcount\fP, const + Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi .SH INPUT PARAMETERS @@ -63,19 +63,19 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Creates a persistent communication request for a standard mode send operation, and binds to it all the arguments of a send operation. +Creates a persistent communication request for a standard mode send operation, and binds to it all the arguments of a send operation. .sp -A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start or MPI_Startall. +A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start or MPI_Startall. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Sendrecv.3in b/ompi/mpi/man/man3/MPI_Sendrecv.3in index 2e3fe8814bd..6097ba5fdc6 100644 --- a/ompi/mpi/man/man3/MPI_Sendrecv.3in +++ b/ompi/mpi/man/man3/MPI_Sendrecv.3in @@ -15,7 +15,7 @@ #include int MPI_Sendrecv(const void *\fIsendbuf\fP, int\fI sendcount\fP, MPI_Datatype\fI sendtype\fP, int\fI dest\fP, int\fI sendtag\fP, void\fI *recvbuf\fP, int\fI recvcount\fP, - MPI_Datatype\fI recvtype\fP, int\fI source\fP, int\fI recvtag\fP, + MPI_Datatype\fI recvtype\fP, int\fI source\fP, int\fI recvtag\fP, MPI_Comm\fI comm\fP, MPI_Status\fI *status\fP) .fi @@ -28,21 +28,21 @@ MPI_SENDRECV(\fISENDBUF, SENDCOUNT, SENDTYPE, DEST, SENDTAG, \fISENDBUF(*), RECVBUF(*)\fP INTEGER \fISENDCOUNT, SENDTYPE, DEST, SENDTAG\fP INTEGER \fIRECVCOUNT, RECVTYPE, SOURCE, RECVTAG, COMM\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax .nf #include -void Comm::Sendrecv(const void *\fIsendbuf\fP, int \fIsendcount\fP, const - Datatype& \fIsendtype\fP, int \fIdest\fP, int \fIsendtag\fP, void *\fIrecvbuf\fP, - int \fIrecvcount\fP, const Datatype& \fIrecvtype\fP, int \fIsource\fP, - int \fIrecvtag\fP, Status& \fIstatus\fP) const +void Comm::Sendrecv(const void *\fIsendbuf\fP, int \fIsendcount\fP, const + Datatype& \fIsendtype\fP, int \fIdest\fP, int \fIsendtag\fP, void *\fIrecvbuf\fP, + int \fIrecvcount\fP, const Datatype& \fIrecvtype\fP, int \fIsource\fP, + int \fIrecvtag\fP, Status& \fIstatus\fP) const -void Comm::Sendrecv(const void *\fIsendbuf\fP, int \fIsendcount\fP, const - Datatype& \fIsendtype\fP, int \fIdest\fP, int \fIsendtag\fP, void *\fIrecvbuf\fP, - int \fIrecvcount\fP, const Datatype& \fIrecvtype\fP, int \fIsource\fP, - int \fIrecvtag\fP) const +void Comm::Sendrecv(const void *\fIsendbuf\fP, int \fIsendcount\fP, const + Datatype& \fIsendtype\fP, int \fIdest\fP, int \fIsendtag\fP, void *\fIrecvbuf\fP, + int \fIrecvcount\fP, const Datatype& \fIrecvtype\fP, int \fIsource\fP, + int \fIrecvtag\fP) const .fi .SH INPUT PARAMETERS @@ -89,23 +89,23 @@ Status object (status). This refers to the receive operation. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The send-receive operations combine in one call the sending of a message to one destination and the receiving of another message, from another process. The two (source and destination) are possibly the same. A send-receive operation is useful for executing a shift operation across a chain of processes. If blocking sends and receives are used for such a shift, then one needs to order the sends and receives correctly (for example, even processes send, then receive; odd processes receive first, then send) in order to prevent cyclic dependencies that may lead to deadlock. When a send-receive operation is used, the communication subsystem takes care of these issues. The send-receive operation can be used in conjunction with the functions described in Chapter 6 of the MPI-1 Standard, "Process Topologies," in order to perform shifts on various logical topologies. Also, a send-receive operation is useful for implementing remote procedure calls. .sp -A message sent by a send-receive operation can be received by a regular receive operation or probed by a probe operation; a send-receive operation can receive a message sent by a regular send operation. +A message sent by a send-receive operation can be received by a regular receive operation or probed by a probe operation; a send-receive operation can receive a message sent by a regular send operation. .sp -MPI_Sendrecv executes a blocking send and receive operation. Both send and receive use the same communicator, but possibly different tags. The send buffer and receive buffers must be disjoint, and may have different lengths and datatypes. +MPI_Sendrecv executes a blocking send and receive operation. Both send and receive use the same communicator, but possibly different tags. The send buffer and receive buffers must be disjoint, and may have different lengths and datatypes. .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Sendrecv_replace.3in b/ompi/mpi/man/man3/MPI_Sendrecv_replace.3in index 73a35ec16b1..7d332fd1ecf 100644 --- a/ompi/mpi/man/man3/MPI_Sendrecv_replace.3in +++ b/ompi/mpi/man/man3/MPI_Sendrecv_replace.3in @@ -31,13 +31,13 @@ MPI_SENDRECV_REPLACE(\fIBUF, COUNT, DATATYPE, DEST, SENDTAG, SOURCE, .SH C++ Syntax .nf #include -void Comm::Sendrecv_replace(void* \fIbuf\fP, int \fIcount\fP, const - Datatype& \fIdatatype\fP, int \fIdest\fP, int \fIsendtag\fP, int \fIsource\fP, - int \fIrecvtag\fP, Status& \fIstatus\fP) const +void Comm::Sendrecv_replace(void* \fIbuf\fP, int \fIcount\fP, const + Datatype& \fIdatatype\fP, int \fIdest\fP, int \fIsendtag\fP, int \fIsource\fP, + int \fIrecvtag\fP, Status& \fIstatus\fP) const -void Comm::Sendrecv_replace(void* \fIbuf\fP, int \fIcount\fP, const - Datatype& \fIdatatype\fP, int \fIdest\fP, int \fIsendtag\fP, int \fIsource\fP, - int \fIrecvtag\fP) const +void Comm::Sendrecv_replace(void* \fIbuf\fP, int \fIcount\fP, const + Datatype& \fIdatatype\fP, int \fIdest\fP, int \fIsendtag\fP, int \fIsource\fP, + int \fIrecvtag\fP) const .fi .SH INPUT/OUTPUT PARAMETER @@ -77,23 +77,23 @@ status Status object (status). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The send-receive operations combine in one call the sending of a message to one destination and the receiving of another message, from another process. The two (source and destination) are possibly the same. A send-receive operation is useful for executing a shift operation across a chain of processes. If blocking sends and receives are used for such a shift, then one needs to order the sends and receives correctly (for example, even processes send, then receive; odd processes receive first, then send) in order to prevent cyclic dependencies that may lead to deadlock. When a send-receive operation is used, the communication subsystem takes care of these issues. The send-receive operation can be used in conjunction with the functions described in Chapter 6 of the MPI Standard, "Process Topologies," in order to perform shifts on various logical topologies. Also, a send-receive operation is useful for implementing remote procedure calls. .sp -A message sent by a send-receive operation can be received by a regular receive operation or probed by a probe operation; a send-receive operation can receive a message sent by a regular send operation. +A message sent by a send-receive operation can be received by a regular receive operation or probed by a probe operation; a send-receive operation can receive a message sent by a regular send operation. .sp MPI_Sendrecv_replace executes a blocking send and receive. The same buffer is used both for the send and for the receive, so that the message sent is replaced by the message received. .sp -The semantics of a send-receive operation is what would be obtained if the caller forked two concurrent threads, one to execute the send, and one to execute the receive, followed by a join of these two threads. +The semantics of a send-receive operation is what would be obtained if the caller forked two concurrent threads, one to execute the send, and one to execute the receive, followed by a join of these two threads. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Sizeof.3in b/ompi/mpi/man/man3/MPI_Sizeof.3in index 3dc19907f94..211eea85cc9 100644 --- a/ompi/mpi/man/man3/MPI_Sizeof.3in +++ b/ompi/mpi/man/man3/MPI_Sizeof.3in @@ -16,7 +16,7 @@ INCLUDE 'mpif.h' MPI_SIZEOF(\fIX, SIZE, IERROR\fP) \fIX\fP -INTEGER \fISIZE, IERROR\fP +INTEGER \fISIZE, IERROR\fP .fi .SH INPUT PARAMETER @@ -33,7 +33,7 @@ Size of machine representation of that type (integer). .ft R .TP 1i IERROR -Error status (integer). +Error status (integer). .SH DESCRIPTION .ft R @@ -59,7 +59,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Ssend.3in b/ompi/mpi/man/man3/MPI_Ssend.3in index 5bcd8c02950..6b29c5cfff2 100644 --- a/ompi/mpi/man/man3/MPI_Ssend.3in +++ b/ompi/mpi/man/man3/MPI_Ssend.3in @@ -28,7 +28,7 @@ MPI_SSEND(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR\fP) .SH C++ Syntax .nf #include -void Comm::Ssend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& +void Comm::Ssend(const void* \fIbuf\fP, int \fIcount\fP, const Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi @@ -57,15 +57,15 @@ Communicator (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Ssend performs a synchronous-mode, blocking send. See the MPI-1 Standard for more detailed information about such sends. +MPI_Ssend performs a synchronous-mode, blocking send. See the MPI-1 Standard for more detailed information about such sends. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Ssend_init.3in b/ompi/mpi/man/man3/MPI_Ssend_init.3in index 743e0ffe1a8..f31ec9ba802 100644 --- a/ompi/mpi/man/man3/MPI_Ssend_init.3in +++ b/ompi/mpi/man/man3/MPI_Ssend_init.3in @@ -23,14 +23,14 @@ INCLUDE 'mpif.h' MPI_SSEND_INIT(\fIBUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP) \fIBUF\fP(*) - INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP + INTEGER \fICOUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR\fP .fi .SH C++ Syntax .nf #include -Prequest Comm::Ssend_init(const void* \fIbuf\fP, int \fIcount\fP, const - Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const +Prequest Comm::Ssend_init(const void* \fIbuf\fP, int \fIcount\fP, const + Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const .fi .SH INPUT PARAMETERS @@ -62,19 +62,19 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Creates a persistent communication object for a synchronous mode send operation, and binds to it all the arguments of a send operation. +Creates a persistent communication object for a synchronous mode send operation, and binds to it all the arguments of a send operation. .sp -A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. +A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Start.3in b/ompi/mpi/man/man3/MPI_Start.3in index 22ad9ad28b4..09add808bb7 100644 --- a/ompi/mpi/man/man3/MPI_Start.3in +++ b/ompi/mpi/man/man3/MPI_Start.3in @@ -38,11 +38,11 @@ Communication request (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. +A communication (send or receive) that uses a persistent request is initiated by the function MPI_Start. .sp The argument, request, is a handle returned by one of the persistent communication-request initialization functions (MPI_Send_init, MPI_Bsend_init, MPI_Ssend_init, MPI_Rsend_init, MPI_Recv_init). The associated request should be inactive and becomes active once the call is made. .sp @@ -54,7 +54,7 @@ The call is local, with semantics similar to the nonblocking communication opera Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Startall.3in b/ompi/mpi/man/man3/MPI_Startall.3in index 66e59cc4e37..94ba56f445e 100644 --- a/ompi/mpi/man/man3/MPI_Startall.3in +++ b/ompi/mpi/man/man3/MPI_Startall.3in @@ -19,13 +19,13 @@ int MPI_Startall(int \fIcount\fP, MPI_Request\fI array_of_requests[]\fP) .nf INCLUDE 'mpif.h' MPI_STARTALL(\fICOUNT, ARRAY_OF_REQUESTS, IERROR\fP) - INTEGER \fICOUNT, ARRAY_OF_REQUESTS(*), IERROR\fP + INTEGER \fICOUNT, ARRAY_OF_REQUESTS(*), IERROR\fP .fi .SH C++ Syntax .nf #include -static void Prequest::Startall(int \fIcount\fP, Prequest \fIarray_of_requests\fP[]) +static void Prequest::Startall(int \fIcount\fP, Prequest \fIarray_of_requests\fP[]) .fi .SH INPUT PARAMETER @@ -44,31 +44,31 @@ Array of requests (array of handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Starts all communications associated with requests in array_of_requests. A call to MPI_Startall(count, array_of_requests) has the same effect as calls to MPI_Start (&array_of_requests[i]), executed for i=0 ,..., count-1, in some arbitrary order. +Starts all communications associated with requests in array_of_requests. A call to MPI_Startall(count, array_of_requests) has the same effect as calls to MPI_Start (&array_of_requests[i]), executed for i=0 ,..., count-1, in some arbitrary order. .sp A communication started with a call to MPI_Start or MPI_Startall is completed by a call to MPI_Wait, MPI_Test, or one of the derived functions MPI_Waitany, MPI_Testany, MPI_Waitall, MPI_Testall, MPI_Waitsome, MPI_Testsome (these are described in Section 3.7.5 of the MPI-1 Standard, "Multiple Completions"). The request becomes inactive after successful completion by such a call. The request is not deallocated, and it can be activated anew by another MPI_Start or MPI_Startall call. .sp -A persistent request is deallocated by a call to MPI_Request_free (see Section 3.7.3 of the MPI-1 Standard, "Communication Completion"). +A persistent request is deallocated by a call to MPI_Request_free (see Section 3.7.3 of the MPI-1 Standard, "Communication Completion"). .sp The call to MPI_Request_free can occur at any point in the program after the persistent request was created. However, the request will be deallocated only after it becomes inactive. Active receive requests should not be freed. Otherwise, it will not be possible to check that the receive has completed. It is preferable, in general, to free requests when they are inactive. If this rule is followed, then the persistent communication request functions will be invoked in a sequence of the form, .br .sp - Create (Start Complete)* Free + Create (Start Complete)* Free .br .sp where * indicates zero or more repetitions. If the same communication object is used in several concurrent threads, it is the user's responsibility to coordinate calls so that the correct sequence is obeyed. .sp -A send operation initiated with MPI_Start can be matched with any receive operation and, likewise, a receive operation initiated with MPI_Start can receive messages generated by any send operation. +A send operation initiated with MPI_Start can be matched with any receive operation and, likewise, a receive operation initiated with MPI_Start can receive messages generated by any send operation. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Status_f2c.3in b/ompi/mpi/man/man3/MPI_Status_f2c.3in index c2fa300d268..c28748be543 100644 --- a/ompi/mpi/man/man3/MPI_Status_f2c.3in +++ b/ompi/mpi/man/man3/MPI_Status_f2c.3in @@ -18,13 +18,13 @@ int MPI_Status_c2f(const MPI_Status \fI*c_status\fP, MPI_Fint \fI*f_status\fP) .fi .SH DESCRIPTION .ft R -These two procedures are provided in C to convert from a Fortran status (which is an array of integers) to a C status (which is a structure), and vice versa. The conversion occurs on all the information in \fIstatus\fP, including that which is hidden. That is, no status information is lost in the conversion. +These two procedures are provided in C to convert from a Fortran status (which is an array of integers) to a C status (which is a structure), and vice versa. The conversion occurs on all the information in \fIstatus\fP, including that which is hidden. That is, no status information is lost in the conversion. .sp -When using MPI_Status_f2c, if \fIf_status\fP is a valid Fortran status, but not the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, then MPI_Status_f2c returns in \fIc_status\fP a valid C status with the same content. If \fIf_status\fP is the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if \fIf_status\fP is not a valid Fortran status, then the call is erroneous. +When using MPI_Status_f2c, if \fIf_status\fP is a valid Fortran status, but not the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, then MPI_Status_f2c returns in \fIc_status\fP a valid C status with the same content. If \fIf_status\fP is the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if \fIf_status\fP is not a valid Fortran status, then the call is erroneous. .sp When using MPI_Status_c2f, the opposite conversion is applied. If \fIc_status\fP is MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if \fIc_status\fP is not a valid C status, then the call is erroneous. .sp -The C status has the same source, tag and error code values as the Fortran status, and returns the same answers when queried for count, elements, and cancellation. The conversion function may be called with a Fortran status argument that has an undefined error field, in which case the value of the error field in the C status argument is undefined. +The C status has the same source, tag and error code values as the Fortran status, and returns the same answers when queried for count, elements, and cancellation. The conversion function may be called with a Fortran status argument that has an undefined error field, in which case the value of the error field in the C status argument is undefined. .sp diff --git a/ompi/mpi/man/man3/MPI_Status_set_cancelled.3in b/ompi/mpi/man/man3/MPI_Status_set_cancelled.3in index 689168bd604..b27b183b51d 100644 --- a/ompi/mpi/man/man3/MPI_Status_set_cancelled.3in +++ b/ompi/mpi/man/man3/MPI_Status_set_cancelled.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Status_set_cancelled 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Status_set_cancelled\fP \- Sets \fIstatus\fP to indicate a request has been canceled. +\fBMPI_Status_set_cancelled\fP \- Sets \fIstatus\fP to indicate a request has been canceled. .SH SYNTAX .ft R @@ -45,19 +45,19 @@ If true, indicates request was canceled (logical). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -If \fIflag\fP is set to true, then a subsequent call to MPI_Test_cancelled(\fIstatus, flag\fP) will also return \fIflag\fP = true; otherwise it will return false. +If \fIflag\fP is set to true, then a subsequent call to MPI_Test_cancelled(\fIstatus, flag\fP) will also return \fIflag\fP = true; otherwise it will return false. .SH NOTES .ft R -Users are advised not to reuse the status fields for values other than those for which they were intended. Doing so may lead to unexpected results when using the status object. For example, calling MPI_Get_elements may cause an error if the value is out of range, or it may be impossible to detect such an error. The \fIextra_state\fP argument provided with a generalized request can be used to return information that does not logically belong in \fIstatus\fP. Furthermore, modifying the values in a status set internally by MPI, such as MPI_Recv, may lead to unpredictable results and is strongly discouraged. +Users are advised not to reuse the status fields for values other than those for which they were intended. Doing so may lead to unexpected results when using the status object. For example, calling MPI_Get_elements may cause an error if the value is out of range, or it may be impossible to detect such an error. The \fIextra_state\fP argument provided with a generalized request can be used to return information that does not logically belong in \fIstatus\fP. Furthermore, modifying the values in a status set internally by MPI, such as MPI_Recv, may lead to unpredictable results and is strongly discouraged. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Status_set_elements.3in b/ompi/mpi/man/man3/MPI_Status_set_elements.3in index b550aeec5b1..47a12c7bfcd 100644 --- a/ompi/mpi/man/man3/MPI_Status_set_elements.3in +++ b/ompi/mpi/man/man3/MPI_Status_set_elements.3in @@ -13,8 +13,8 @@ .SH C Syntax .nf #include -int MPI_Status_set_elements(MPI_Status *\fIstatus\fP, MPI_Datatype \fIdatatype\fP, int \fIcount\fP) -int MPI_Status_set_elements_x(MPI_Status *\fIstatus\fP, MPI_Datatype \fIdatatype\fP, MPI_Count \fIcount\fP) +int MPI_Status_set_elements(MPI_Status *\fIstatus\fP, MPI_Datatype \fIdatatype\fP, int \fIcount\fP) +int MPI_Status_set_elements_x(MPI_Status *\fIstatus\fP, MPI_Datatype \fIdatatype\fP, MPI_Count \fIcount\fP) .fi .SH Fortran Syntax @@ -53,23 +53,23 @@ Number of elements to associate with \fIstatus\fP (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Status_set_elements modifies the opaque part of \fIstatus\fP so that a call to MPI_Get_elements or MPI_Get_elements_x will return \fIcount\fP. MPI_Get_count will return a compatible value. .sp -A subsequent call to MPI_Get_count(\fIstatus, datatype, count\fP), to MPI_Get_elements(\fIstatus, datatype, count\fP), or to MPI_Get_elements_x(\fIstatus, datatype, count\fP) must use a data-type argument that has the same type signature as the data-type argument that was used in the call to MPI_Status_set_elements. +A subsequent call to MPI_Get_count(\fIstatus, datatype, count\fP), to MPI_Get_elements(\fIstatus, datatype, count\fP), or to MPI_Get_elements_x(\fIstatus, datatype, count\fP) must use a data-type argument that has the same type signature as the data-type argument that was used in the call to MPI_Status_set_elements. .SH NOTES .ft R -Users are advised not to reuse the status fields for values other than those for which they were intended. Doing so may lead to unexpected results when using the status object. For example, calling MPI_Get_elements may cause an error if the value is out of range, or it may be impossible to detect such an error. The \fIextra_state\fP argument provided with a generalized request can be used to return information that does not logically belong in \fIstatus\fP. Furthermore, modifying the values in a status set internally by MPI, such as MPI_Recv, may lead to unpredictable results and is strongly discouraged. +Users are advised not to reuse the status fields for values other than those for which they were intended. Doing so may lead to unexpected results when using the status object. For example, calling MPI_Get_elements may cause an error if the value is out of range, or it may be impossible to detect such an error. The \fIextra_state\fP argument provided with a generalized request can be used to return information that does not logically belong in \fIstatus\fP. Furthermore, modifying the values in a status set internally by MPI, such as MPI_Recv, may lead to unpredictable results and is strongly discouraged. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH FORTRAN 77 NOTES .ft R diff --git a/ompi/mpi/man/man3/MPI_T_pvar_get_info.3in b/ompi/mpi/man/man3/MPI_T_pvar_get_info.3in index abe6133cbbd..86e7dbaa7a1 100644 --- a/ompi/mpi/man/man3/MPI_T_pvar_get_info.3in +++ b/ompi/mpi/man/man3/MPI_T_pvar_get_info.3in @@ -87,7 +87,7 @@ behavior. The class returned in the \fIvar_class\fP parameter may be one of the .TP 2 MPI_T_PVAR_CLASS_STATE Variable represents a set of discrete states that may be described by an enumerator. Variables of this class -must be represented by an MPI_INT. The starting value is the current state of the variable. +must be represented by an MPI_INT. The starting value is the current state of the variable. .TP 2 MPI_T_PVAR_CLASS_LEVEL Variable represents the current utilization level of a resource. Variables of this class must be represented diff --git a/ompi/mpi/man/man3/MPI_T_pvar_start.3in b/ompi/mpi/man/man3/MPI_T_pvar_start.3in index d3a11c6f1eb..450638149aa 100644 --- a/ompi/mpi/man/man3/MPI_T_pvar_start.3in +++ b/ompi/mpi/man/man3/MPI_T_pvar_start.3in @@ -38,7 +38,7 @@ MPI_T_pvar_stop stops the performance variable with the handle specified in \fIh The special value MPI_T_PVAR_ALL_HANDLES can be passed in \fIhandle\fP to stop all non-continuous handles in the session specified in \fIsession\fP. -Continuous performance variables can neither be started nor stopped. +Continuous performance variables can neither be started nor stopped. .SH ERRORS .ft R diff --git a/ompi/mpi/man/man3/MPI_Test.3in b/ompi/mpi/man/man3/MPI_Test.3in index 7c4ec14572c..08adf28a86e 100644 --- a/ompi/mpi/man/man3/MPI_Test.3in +++ b/ompi/mpi/man/man3/MPI_Test.3in @@ -20,7 +20,7 @@ int MPI_Test(MPI_Request *\fIrequest\fP, int\fI *flag\fP, MPI_Status\fI *status\ INCLUDE 'mpif.h' MPI_TEST(\fIREQUEST, FLAG, STATUS, IERROR\fP) LOGICAL \fIFLAG\fP - INTEGER \fIREQUEST, STATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fIREQUEST, STATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -48,15 +48,15 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -A call to MPI_Test returns flag = true if the operation identified by request is complete. In such a case, the status object is set to contain information on the completed operation; if the communication object was created by a nonblocking send or receive, then it is deallocated and the request handle is set to MPI_REQUEST_NULL. The call returns flag = false, otherwise. In this case, the value of the status object is undefined. MPI_Test is a local operation. +A call to MPI_Test returns flag = true if the operation identified by request is complete. In such a case, the status object is set to contain information on the completed operation; if the communication object was created by a nonblocking send or receive, then it is deallocated and the request handle is set to MPI_REQUEST_NULL. The call returns flag = false, otherwise. In this case, the value of the status object is undefined. MPI_Test is a local operation. .sp The return status object for a receive operation carries information that can be accessed as described in Section 3.2.5 of the MPI-1 Standard, "Return Status." The status object for a send operation carries information that can be accessed by a call to MPI_Test_cancelled (see Section 3.8 of the MPI-1 Standard, "Probe and Cancel"). .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .sp One is allowed to call MPI_Test with a null or inactive \fIrequest\fP argument. In such a case the operation returns with \fIflag\fP = true and empty \fIstatus\fP. .sp @@ -64,7 +64,7 @@ The functions MPI_Wait and MPI_Test can be used to complete both sends and receives. .SH NOTES -The use of the nonblocking MPI_Test call allows the user to schedule alternative activities within a single thread of execution. An event-driven thread scheduler can be emulated with periodic calls to MPI_Test. +The use of the nonblocking MPI_Test call allows the user to schedule alternative activities within a single thread of execution. An event-driven thread scheduler can be emulated with periodic calls to MPI_Test. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. diff --git a/ompi/mpi/man/man3/MPI_Test_cancelled.3in b/ompi/mpi/man/man3/MPI_Test_cancelled.3in index c8d979de0e0..e227f937c0b 100644 --- a/ompi/mpi/man/man3/MPI_Test_cancelled.3in +++ b/ompi/mpi/man/man3/MPI_Test_cancelled.3in @@ -21,7 +21,7 @@ int MPI_Test_cancelled(const MPI_Status *\fIstatus\fP, int \fI*flag\fP) INCLUDE 'mpif.h' MPI_TEST_CANCELLED(\fISTATUS, FLAG, IERROR\fP) LOGICAL \fIFLAG\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -40,11 +40,11 @@ Status object (status). .ft R .TP 1i flag -True if operation was cancelled (logical). +True if operation was cancelled (logical). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -52,13 +52,13 @@ Returns \fIflag\fP = true if the communication associated with the status object was canceled successfully. In such a case, all other fields of status (such as \fIcount\fP or \fItag\fP) are undefined. Otherwise, returns \fIflag\fP = false. If a receive operation might be canceled, one should call MPI_Test_cancelled first, to check whether the operation was canceled, before checking on the other fields of the return status. .SH NOTES -Cancel can be an expensive operation that should be used only exceptionally. +Cancel can be an expensive operation that should be used only exceptionally. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Testall.3in b/ompi/mpi/man/man3/MPI_Testall.3in index 0462e09e5bc..87ba0a08546 100644 --- a/ompi/mpi/man/man3/MPI_Testall.3in +++ b/ompi/mpi/man/man3/MPI_Testall.3in @@ -29,8 +29,8 @@ MPI_TESTALL(\fICOUNT, ARRAY_OF_REQUESTS, FLAG, ARRAY_OF_STATUSES, .SH C++ Syntax .nf #include -static bool Request::Testall(int \fIcount\fP, Request - \fIarray_of_requests\fP[], Status \fIarray_of_statuses\fP[]) +static bool Request::Testall(int \fIcount\fP, Request + \fIarray_of_requests\fP[], Status \fIarray_of_statuses\fP[]) static bool Request::Testall(int \fIcount\fP, Request \fIarray_of_requests\fP[]) @@ -55,7 +55,7 @@ Array of status objects (array of status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -63,7 +63,7 @@ Returns \fIflag\fP = true if all communications associated with active handles i .sp Otherwise, \fIflag\fP = false is returned, no request is modified and the values of the status entries are undefined. This is a local operation. .sp -If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. +If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. .sp Errors that occurred during the execution of MPI_Testall are handled in the same manner as errors in MPI_Waitall. diff --git a/ompi/mpi/man/man3/MPI_Testany.3in b/ompi/mpi/man/man3/MPI_Testany.3in index e307f24c403..31465e6afd3 100644 --- a/ompi/mpi/man/man3/MPI_Testany.3in +++ b/ompi/mpi/man/man3/MPI_Testany.3in @@ -4,14 +4,14 @@ .\" $COPYRIGHT$ .TH MPI_Testany 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Testany\fP \- Tests for completion of any one previously initiated communication in a list. +\fBMPI_Testany\fP \- Tests for completion of any one previously initiated communication in a list. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Testany(int \fIcount\fP, MPI_Request\fI array_of_requests[]\fP, +int MPI_Testany(int \fIcount\fP, MPI_Request\fI array_of_requests[]\fP, int\fI *index\fP, int\fI *flag\fP, MPI_Status\fI *status\fP) .fi @@ -19,19 +19,19 @@ int MPI_Testany(int \fIcount\fP, MPI_Request\fI array_of_requests[]\fP, .nf INCLUDE 'mpif.h' MPI_TESTANY(\fICOUNT, ARRAY_OF_REQUESTS, INDEX, FLAG, STATUS, IERROR\fP) - LOGICAL \fIFLAG\fP - INTEGER \fICOUNT, ARRAY_OF_REQUESTS(*), INDEX\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + LOGICAL \fIFLAG\fP + INTEGER \fICOUNT, ARRAY_OF_REQUESTS(*), INDEX\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax .nf #include -static bool Request::Testany(int \fIcount\fP, Request \fIarray_of_requests\fP[], - int& \fIindex\fP, Status& \fIstatus\fP) +static bool Request::Testany(int \fIcount\fP, Request \fIarray_of_requests\fP[], + int& \fIindex\fP, Status& \fIstatus\fP) -static bool Request::Testany(int \fIcount\fP, Request \fIarray_of_requests\fP[], - int& \fIindex\fP) +static bool Request::Testany(int \fIcount\fP, Request \fIarray_of_requests\fP[], + int& \fIindex\fP) .fi .SH INPUT PARAMETERS @@ -58,7 +58,7 @@ Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -69,7 +69,7 @@ The array may contain null or inactive handles. If the array contains no active If the array of requests contains active handles then the execution of MPI_Testany(count, array_of_requests, index, status) has the same effect as the execution of MPI_Test(&\fIarray_of_requests[i\fP], \fIflag\fP, \fIstatus\fP), for \fIi\fP=0,1,...,count-1, in some arbitrary order, until one call returns \fIflag\fP = true, or all fail. In the former case, \fIindex\fP is set to the last value of \fIi\fP, and in the latter case, it is set to MPI_UNDEFINED. MPI_Testany with an array containing one active entry is equivalent to MPI_Test. .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. diff --git a/ompi/mpi/man/man3/MPI_Testsome.3in b/ompi/mpi/man/man3/MPI_Testsome.3in index 767ff8f31ef..9f8ac629548 100644 --- a/ompi/mpi/man/man3/MPI_Testsome.3in +++ b/ompi/mpi/man/man3/MPI_Testsome.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Testsome 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Testsome\fP \- Tests for completion of one or more previously initiated communications in a list. +\fBMPI_Testsome\fP \- Tests for completion of one or more previously initiated communications in a list. .SH SYNTAX .ft R @@ -23,17 +23,17 @@ MPI_TESTSOME(\fIINCOUNT, ARRAY_OF_REQUESTS, OUTCOUNT, ARRAY_OF_INDICES, ARRAY_OF_STATUSES, IERROR\fP) INTEGER \fIINCOUNT, ARRAY_OF_REQUESTS(*)\fP INTEGER \fIOUTCOUNT, ARRAY_OF_INDICES(*)\fP - INTEGER \fIARRAY_OF_STATUSES(MPI_STATUS_SIZE,*), IERROR\fP + INTEGER \fIARRAY_OF_STATUSES(MPI_STATUS_SIZE,*), IERROR\fP .fi .SH C++ Syntax .nf #include -static int Request::Testsome(int \fIincount\fP, Request - \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[], Status \fIarray_of_statuses\fP[]) +static int Request::Testsome(int \fIincount\fP, Request + \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[], Status \fIarray_of_statuses\fP[]) -static int Request::Testsome(int \fIincount\fP, Request - \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[]) +static int Request::Testsome(int \fIincount\fP, Request + \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[]) .fi .SH INPUT PARAMETERS @@ -59,24 +59,24 @@ Array of status objects for operations that completed (array of status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Behaves like MPI_Waitsome, except that it returns immediately. If no operation has completed it returns outcount = 0. If there is no active handle in the list, it returns outcount = MPI_UNDEFINED. +Behaves like MPI_Waitsome, except that it returns immediately. If no operation has completed it returns outcount = 0. If there is no active handle in the list, it returns outcount = MPI_UNDEFINED. .sp MPI_Testsome is a local operation, which returns immediately, whereas MPI_Waitsome blocks until a communication completes, if it was passed a list that contains at least one active handle. Both calls fulfill a fairness requirement: If a request for a receive repeatedly appears in a list of requests passed to MPI_Waitsome or MPI_Testsome, and a matching send has been posted, then the receive will eventually succeed unless the send is satisfied by another receive; send requests also fulfill this fairness requirement. .sp Errors that occur during the execution of MPI_Testsome are handled as for -MPI_Waitsome. +MPI_Waitsome. .sp -If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. +If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. .SH NOTES The use of MPI_Testsome is likely to be more -efficient than the use of MPI_Testany. The former returns information on all completed communications; with the latter, a new call is required for each communication that completes. +efficient than the use of MPI_Testany. The former returns information on all completed communications; with the latter, a new call is required for each communication that completes. .sp -A server with multiple clients can use MPI_Waitsome so as not to starve any client. Clients send messages to the server with service requests. The server calls MPI_Waitsome with one receive request for each client, then handles all receives that have completed. If a call to MPI_Waitany is used instead, then one client could starve while requests from another client always sneak in first. +A server with multiple clients can use MPI_Waitsome so as not to starve any client. Clients send messages to the server with service requests. The server calls MPI_Waitsome with one receive request for each client, then handles all receives that have completed. If a call to MPI_Waitany is used instead, then one client could starve while requests from another client always sneak in first. .SH ERRORS For each invocation of MPI_Testsome, if one or more requests generate diff --git a/ompi/mpi/man/man3/MPI_Topo_test.3in b/ompi/mpi/man/man3/MPI_Topo_test.3in index 438e7f7e0ef..6c9c2467e74 100644 --- a/ompi/mpi/man/man3/MPI_Topo_test.3in +++ b/ompi/mpi/man/man3/MPI_Topo_test.3in @@ -42,7 +42,7 @@ Topology type of communicator comm (choice). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -60,7 +60,7 @@ The output value \fItop_type\fP is one of the following: Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Graph_create diff --git a/ompi/mpi/man/man3/MPI_Type_commit.3in b/ompi/mpi/man/man3/MPI_Type_commit.3in index 362cc4a133c..b556e4f266a 100644 --- a/ompi/mpi/man/man3/MPI_Type_commit.3in +++ b/ompi/mpi/man/man3/MPI_Type_commit.3in @@ -19,7 +19,7 @@ int MPI_Type_commit(MPI_Datatype *\fIdatatype\fP) .nf INCLUDE 'mpif.h' MPI_TYPE_COMMIT(\fIDATATYPE, IERROR\fP) - INTEGER \fIDATATYPE, IERROR\fP + INTEGER \fIDATATYPE, IERROR\fP .fi .SH C++ Syntax @@ -38,20 +38,20 @@ Data type (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The commit operation commits the data type. A data type is the formal description of a communication buffer, not the content of that buffer. After a data type has been committed, it can be repeatedly reused to communicate the changing content of a buffer or, indeed, the content of different buffers, with different starting addresses. +The commit operation commits the data type. A data type is the formal description of a communication buffer, not the content of that buffer. After a data type has been committed, it can be repeatedly reused to communicate the changing content of a buffer or, indeed, the content of different buffers, with different starting addresses. .sp -\fBExample:\fP The following Fortran code fragment gives examples of using MPI_Type_commit. +\fBExample:\fP The following Fortran code fragment gives examples of using MPI_Type_commit. .sp .nf - INTEGER type1, type2 - CALL MPI_TYPE_CONTIGUOUS(5, MPI_REAL, type1, ierr) - ! new type object created - CALL MPI_TYPE_COMMIT(type1, ierr) - ! now type1 can be used for communication + INTEGER type1, type2 + CALL MPI_TYPE_CONTIGUOUS(5, MPI_REAL, type1, ierr) + ! new type object created + CALL MPI_TYPE_COMMIT(type1, ierr) + ! now type1 can be used for communication .fi .sp If the data type specified in \fIdatatype\fP is already committed, it is equivalent to a no-op. @@ -60,5 +60,5 @@ If the data type specified in \fIdatatype\fP is already committed, it is equival Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_contiguous.3in b/ompi/mpi/man/man3/MPI_Type_contiguous.3in index 64b0d4f4bcf..cbe055ed855 100644 --- a/ompi/mpi/man/man3/MPI_Type_contiguous.3in +++ b/ompi/mpi/man/man3/MPI_Type_contiguous.3in @@ -20,7 +20,7 @@ int MPI_Type_contiguous(int \fIcount\fP, MPI_Datatype\fI oldtype\fP, .nf INCLUDE 'mpif.h' MPI_TYPE_CONTIGUOUS(\fICOUNT, OLDTYPE, NEWTYPE, IERROR\fP) - INTEGER \fICOUNT, OLDTYPE, NEWTYPE, IERROR\fP + INTEGER \fICOUNT, OLDTYPE, NEWTYPE, IERROR\fP .fi .SH C++ Syntax @@ -32,49 +32,49 @@ Datatype Datatype::Create_contiguous(int \fIcount\fP) const .SH INPUT PARAMETERS .ft R .TP 1i -count +count Replication count (nonnegative integer). .TP 1i -oldtype +oldtype Old datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -newtype +newtype New datatype (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The simplest datatype constructor is MPI_Type_contiguous, which allows replication of a datatype into contiguous locations. +The simplest datatype constructor is MPI_Type_contiguous, which allows replication of a datatype into contiguous locations. .sp -\fInewtype\fP is the datatype obtained by concatenating \fIcount\fP copies of \fIoldtype\fP. Concatenation is defined using the extent of \fIoldtype\fP as the size of the concatenated copies. +\fInewtype\fP is the datatype obtained by concatenating \fIcount\fP copies of \fIoldtype\fP. Concatenation is defined using the extent of \fIoldtype\fP as the size of the concatenated copies. .sp -\fBExample:\fR Let oldtype have type map {(double, 0), (char, 8)}, with extent 16, and let count = 3. The type map of the datatype returned by newtype is +\fBExample:\fR Let oldtype have type map {(double, 0), (char, 8)}, with extent 16, and let count = 3. The type map of the datatype returned by newtype is .sp .nf - {(double, 0), (char, 8), (double, 16), (char, 24), + {(double, 0), (char, 8), (double, 16), (char, 24), (double, 32), (char, 40)]; .fi .sp i.e., alternating double and char elements, with displacements 0, 8, 16, 24, 32, 40. .sp -In general, assume that the type map of oldtype is +In general, assume that the type map of oldtype is .sp .nf {(type(0), disp(0)),...,(type(n-1), disp(n-1))}, .fi .sp -with extent ex. Then newtype has a type map with count times n entries defined by: +with extent ex. Then newtype has a type map with count times n entries defined by: .sp .nf {(type(0), disp(0)), ...,(type(n-1), disp(n-1)), - (type(0), disp(0) + ex), ...,(type(n-1), - disp(n-1) + ex), ...,(type(0), disp(0) + ex * (count - 1)), + (type(0), disp(0) + ex), ...,(type(n-1), + disp(n-1) + ex), ...,(type(0), disp(0) + ex * (count - 1)), ...,(type(n-1), disp(n-1) + ex * (count - 1))}. .fi .sp @@ -84,5 +84,5 @@ For more information about derived datatypes, see Section 3.12 of the MPI-1 Stan Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_create_darray.3in b/ompi/mpi/man/man3/MPI_Type_create_darray.3in index abc08f47db0..4efdd79aa51 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_darray.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_darray.3in @@ -13,7 +13,7 @@ .SH C Syntax .nf #include -int MPI_Type_create_darray(int \fIsize\fP, int \fIrank\fP, int \fIndims\fP, +int MPI_Type_create_darray(int \fIsize\fP, int \fIrank\fP, int \fIndims\fP, const int \fIarray_of_gsizes\fP[], const int \fIarray_of_distribs\fP[], const int \fIarray_of_dargs\fP[], const int \fIarray_of_psizes\fP[], int \fIorder\fP, MPI_Datatype \fIoldtype\fP, MPI_Datatype \fI*newtype\fP) @@ -22,21 +22,21 @@ int MPI_Type_create_darray(int \fIsize\fP, int \fIrank\fP, int \fIndims\fP, .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_TYPE_CREATE_DARRAY(\fISIZE, RANK, NDIMS, ARRAY_OF_GSIZES, - ARRAY_OF_DISTRIBS, ARRAY_OF_DARGS, ARRAY_OF_PSIZES, ORDER, +MPI_TYPE_CREATE_DARRAY(\fISIZE, RANK, NDIMS, ARRAY_OF_GSIZES, + ARRAY_OF_DISTRIBS, ARRAY_OF_DARGS, ARRAY_OF_PSIZES, ORDER, OLDTYPE, NEWTYPE, IERROR\fP) INTEGER \fISIZE, RANK, NDIMS, ARRAY_OF_GSIZES(*), ARRAY_OF_DISTRIBS(*), - ARRAY_OF_DARGS(*), ARRAY_OF_PSIZES(*), ORDER, OLDTYPE, + ARRAY_OF_DARGS(*), ARRAY_OF_PSIZES(*), ORDER, OLDTYPE, NEWTYPE, IERROR\fP .fi .SH C++ Syntax .nf #include -MPI::Datatype MPI::Datatype::Create_darray(int \fIsize\fP, int \fIrank\fP, - int \fIndims\fP, const int \fIarray_of_gsizes\fP[], - const int \fIarray_of_distribs\fP[], const int \fIarray_of_dargs\fP[], +MPI::Datatype MPI::Datatype::Create_darray(int \fIsize\fP, int \fIrank\fP, + int \fIndims\fP, const int \fIarray_of_gsizes\fP[], + const int \fIarray_of_distribs\fP[], const int \fIarray_of_dargs\fP[], const int \fIarray_of_psizes\fP[], int \fIorder\fP) const .fi @@ -54,7 +54,7 @@ Number of array dimensions as well as process grid dimensions (positive integer) .sp .TP 1i array_of_gsizes -Number of elements of type \fIoldtype\fP in each dimension of global array (array of positive integers). +Number of elements of type \fIoldtype\fP in each dimension of global array (array of positive integers). .sp .TP 1i array_of_distribs @@ -81,12 +81,12 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Type_create_darray can be used to generate the data types corresponding to the distribution of an ndims-dimensional array of \fIoldtype\fP elements onto an \fIndims\fP-dimensional grid of logical processes. Unused dimensions of \fIarray_of_psizes\fP should be set to 1. For a call to MPI_Type_create_darray to be correct, the equation +MPI_Type_create_darray can be used to generate the data types corresponding to the distribution of an ndims-dimensional array of \fIoldtype\fP elements onto an \fIndims\fP-dimensional grid of logical processes. Unused dimensions of \fIarray_of_psizes\fP should be set to 1. For a call to MPI_Type_create_darray to be correct, the equation .sp .nf \fIndims\fP-1 @@ -95,25 +95,25 @@ MPI_Type_create_darray can be used to generate the data types corresponding to t .fi .sp -must be satisfied. The ordering of processes in the process grid is assumed to be row-major, as in the case of virtual Cartesian process topologies in MPI-1. +must be satisfied. The ordering of processes in the process grid is assumed to be row-major, as in the case of virtual Cartesian process topologies in MPI-1. .sp -Each dimension of the array can be distributed in one of three ways: +Each dimension of the array can be distributed in one of three ways: .sp .nf -- MPI_DISTRIBUTE_BLOCK - Block distribution -- MPI_DISTRIBUTE_CYCLIC - Cyclic distribution -- MPI_DISTRIBUTE_NONE - Dimension not distributed. +- MPI_DISTRIBUTE_BLOCK - Block distribution +- MPI_DISTRIBUTE_CYCLIC - Cyclic distribution +- MPI_DISTRIBUTE_NONE - Dimension not distributed. .fi .sp The constant MPI_DISTRIBUTE_DFLT_DARG specifies a default distribution argument. The distribution argument for a dimension that is not distributed is ignored. For any dimension \fIi\fP in which the distribution is MPI_DISTRIBUTE_BLOCK, it erroneous to specify \fIarray_of_dargs[i]\fP \fI*\fP \fIarray_of_psizes[i]\fP < \fIarray_of_gsizes[i]\fP. .sp -For example, the HPF layout ARRAY(CYCLIC(15)) corresponds to MPI_DISTRIBUTE_CYCLIC with a distribution argument of 15, and the HPF layout ARRAY(BLOCK) corresponds to MPI_DISTRIBUTE_BLOCK with a distribution argument of MPI_DISTRIBUTE_DFLT_DARG. +For example, the HPF layout ARRAY(CYCLIC(15)) corresponds to MPI_DISTRIBUTE_CYCLIC with a distribution argument of 15, and the HPF layout ARRAY(BLOCK) corresponds to MPI_DISTRIBUTE_BLOCK with a distribution argument of MPI_DISTRIBUTE_DFLT_DARG. .sp -The \fIorder\fP argument is used as in MPI_TYPE_CREATE_SUBARRAY to specify the storage order. Therefore, arrays described by this type constructor may be stored in Fortran (column-major) or C (row-major) order. Valid values for order are MPI_ORDER_FORTRAN and MPI_ORDER_C. +The \fIorder\fP argument is used as in MPI_TYPE_CREATE_SUBARRAY to specify the storage order. Therefore, arrays described by this type constructor may be stored in Fortran (column-major) or C (row-major) order. Valid values for order are MPI_ORDER_FORTRAN and MPI_ORDER_C. .sp -This routine creates a new MPI data type with a typemap defined in terms of a function called "cyclic()" (see below). +This routine creates a new MPI data type with a typemap defined in terms of a function called "cyclic()" (see below). .sp -Without loss of generality, it suffices to define the typemap for the MPI_DISTRIBUTE_CYCLIC case where MPI_DISTRIBUTE_DFLT_DARG is not used. +Without loss of generality, it suffices to define the typemap for the MPI_DISTRIBUTE_CYCLIC case where MPI_DISTRIBUTE_DFLT_DARG is not used. .sp MPI_DISTRIBUTE_BLOCK and MPI_DISTRIBUTE_NONE can be reduced to the MPI_DISTRIBUTE_CYCLIC case for dimension \fIi\fP as follows. .sp @@ -132,12 +132,12 @@ Finally, MPI_DISTRIBUTE_CYCLIC with \fIarray_of_dargs[i]\fP equal to MPI_DISTRIB .SH NOTES .ft R -For both Fortran and C arrays, the ordering of processes in the process grid is assumed to be row-major. This is consistent with the ordering used in virtual Cartesian process topologies in MPI-1. To create such virtual process topologies, or to find the coordinates of a process in the process grid, etc., users may use the corresponding functions provided in MPI-1. +For both Fortran and C arrays, the ordering of processes in the process grid is assumed to be row-major. This is consistent with the ordering used in virtual Cartesian process topologies in MPI-1. To create such virtual process topologies, or to find the coordinates of a process in the process grid, etc., users may use the corresponding functions provided in MPI-1. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_create_f90_complex.3in b/ompi/mpi/man/man3/MPI_Type_create_f90_complex.3in index dccc72d1b6f..b99d34069f2 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_f90_complex.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_f90_complex.3in @@ -49,7 +49,7 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -123,7 +123,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Type_create_f90_integer.3in b/ompi/mpi/man/man3/MPI_Type_create_f90_integer.3in index 3ecb3edab17..e989ebbb2db 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_f90_integer.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_f90_integer.3in @@ -45,7 +45,7 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -116,7 +116,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Type_create_f90_real.3in b/ompi/mpi/man/man3/MPI_Type_create_f90_real.3in index 99d2e254138..784027af2d7 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_f90_real.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_f90_real.3in @@ -48,7 +48,7 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -122,7 +122,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Type_create_hvector.3in b/ompi/mpi/man/man3/MPI_Type_create_hvector.3in index e83db8a4cb3..5738354ee3e 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_hvector.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_hvector.3in @@ -5,21 +5,21 @@ .\" $COPYRIGHT$ .TH MPI_Type_create_hvector 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_create_hvector\fP \- Creates a vector (strided) data type with offset in bytes. +\fBMPI_Type_create_hvector\fP \- Creates a vector (strided) data type with offset in bytes. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_create_hvector(int \fIcount\fP, int \fIblocklength\fP, - MPI_Aint \fIstride\fP, MPI_Datatype \fIoldtype\fP, MPI_Datatype *\fInewtype\fP) +int MPI_Type_create_hvector(int \fIcount\fP, int \fIblocklength\fP, + MPI_Aint \fIstride\fP, MPI_Datatype \fIoldtype\fP, MPI_Datatype *\fInewtype\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_TYPE_CREATE_HVECTOR(\fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE, +MPI_TYPE_CREATE_HVECTOR(\fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR\fP) INTEGER \fICOUNT, BLOCKLENGTH, OLDTYPE, NEWTYPE, IERROR\fP @@ -29,8 +29,8 @@ MPI_TYPE_CREATE_HVECTOR(\fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE, .SH C++ Syntax .nf #include -MPI::Datatype MPI::Datatype::Create_hvector(int \fIcount\fP, - int \fIblocklength\fP, MPI::Aint \fIstride\fP) const +MPI::Datatype MPI::Datatype::Create_hvector(int \fIcount\fP, + int \fIblocklength\fP, MPI::Aint \fIstride\fP) const .fi .SH INPUT PARAMETERS @@ -55,10 +55,10 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION -MPI_Type_create_hvector creates a vector (strided) data type with offset in bytes. +MPI_Type_create_hvector creates a vector (strided) data type with offset in bytes. .PP NOTE \- This routine replaces MPI_Type_hvector, which is deprecated. See the man page MPI_Type_hvector(3) for information about that routine. @@ -79,7 +79,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_create_indexed_block.3in b/ompi/mpi/man/man3/MPI_Type_create_indexed_block.3in index 0da8c481813..71cac9a4b9f 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_indexed_block.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_indexed_block.3in @@ -21,7 +21,7 @@ int MPI_Type_create_hindexed_block(int \fIcount\fP, int \fIblocklength\fP, const .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_TYPE_CREATE_INDEXED_BLOCK(\fICOUNT, BLOCKLENGTH, +MPI_TYPE_CREATE_INDEXED_BLOCK(\fICOUNT, BLOCKLENGTH, ARRAY_OF_DISPLACEMENTS, OLDTYPE, NEWTYPE, IERROR\fP) INTEGER \fICOUNT, BLOCKLENGTH, ARRAY_OF_DISPLACEMENTS(*), OLDTYPE, NEWTYPE, IERROR \fP @@ -64,7 +64,7 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -74,7 +74,7 @@ MPI_Type_create_indexed_block and MPI_Type_create_hindexed_block create an index Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_create_keyval.3in b/ompi/mpi/man/man3/MPI_Type_create_keyval.3in index 758267df326..14e664ff606 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_keyval.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_keyval.3in @@ -5,22 +5,22 @@ .\" $COPYRIGHT$ .TH MPI_Type_create_keyval 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_create_keyval\fP \- Generates a new attribute key for caching on data types. +\fBMPI_Type_create_keyval\fP \- Generates a new attribute key for caching on data types. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_create_keyval(MPI_Type_copy_attr_function *\fItype_copy_attr_fn\fP, - MPI_Type_delete_attr_function *\fItype_delete_attr_fn\fP, +int MPI_Type_create_keyval(MPI_Type_copy_attr_function *\fItype_copy_attr_fn\fP, + MPI_Type_delete_attr_function *\fItype_delete_attr_fn\fP, int *\fItype_keyval\fP, void *\fIextra_state\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_TYPE_CREATE_KEYVAL(\fITYPE_COPY_ATTR_FN, TYPE_DELETE_ATTR_FN, +MPI_TYPE_CREATE_KEYVAL(\fITYPE_COPY_ATTR_FN, TYPE_DELETE_ATTR_FN, TYPE_KEYVAL, EXTRA_STATE, IERROR\fP) EXTERNAL \fITYPE_COPY_ATTR_FN, TYPE_DELETE_ATTR_FN\fP INTEGER \fITYPE_KEYVAL, IERROR \fP @@ -54,58 +54,58 @@ type_keyval Key value for future access (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Type_create_keyval generates a new attribute key for caching on data types. This routine partially replaces MPI_Keyval_create. +MPI_Type_create_keyval generates a new attribute key for caching on data types. This routine partially replaces MPI_Keyval_create. .sp The argument \fItype_copy_attr_fn\fP may be specified as MPI_TYPE_NULL_COPY_FN or MPI_TYPE_DUP_FN from C, C++, or Fortran. MPI_TYPE_NULL_COPY_FN is a function that does nothing other than returning \fIflag\fP = 0 and MPI_SUCCESS. MPI_TYPE_DUP_FN is a simple-minded copy function that sets \fIflag\fP = 1, returns the value of \fIattribute_val_in\fP in \fIattribute_val_out\fP, and returns MPI_SUCCESS. .sp The argument \fItype_delete_attr_fn\fP may be specified as MPI_TYPE_NULL_DELETE_FN from C, C++, or Fortran. MPI_TYPE_NULL_DELETE_FN is a function that does nothing beyond returning MPI_SUCCESS. -The C callback functions are: +The C callback functions are: .sp .nf -typedef int MPI_Type_copy_attr_function(MPI_Datatype \fIoldtype\fP, - int \fItype_keyval\fP, void *\fIextra_state\fP, void *\fIattribute_val_in\fP, - void *\fIattribute_val_out\fP, int *\fIflag\fP); +typedef int MPI_Type_copy_attr_function(MPI_Datatype \fIoldtype\fP, + int \fItype_keyval\fP, void *\fIextra_state\fP, void *\fIattribute_val_in\fP, + void *\fIattribute_val_out\fP, int *\fIflag\fP); .fi and .nf -typedef int MPI_Type_delete_attr_function(MPI_Datatype \fItype\fP, int \fItype_keyval\fP, - void *\fIattribute_val\fP, void *\fIextra_state\fP); +typedef int MPI_Type_delete_attr_function(MPI_Datatype \fItype\fP, int \fItype_keyval\fP, + void *\fIattribute_val\fP, void *\fIextra_state\fP); .fi .sp The Fortran callback functions are: .sp .nf -SUBROUTINE TYPE_COPY_ATTR_FN(\fIOLDTYPE, TYPE_KEYVAL, EXTRA_STATE, - ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP) +SUBROUTINE TYPE_COPY_ATTR_FN(\fIOLDTYPE, TYPE_KEYVAL, EXTRA_STATE, + ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP) INTEGER \fIOLDTYPE, TYPE KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, - ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT\fP - LOGICAL \fIFLAG\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, + ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT\fP + LOGICAL \fIFLAG\fP .fi and .nf -SUBROUTINE TYPE_DELETE_ATTR_FN(\fITYPE, TYPE_KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, - IERROR\fP) - INTEGER \fITYPE, TYPE_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE VAL, EXTRA_STATE\fP +SUBROUTINE TYPE_DELETE_ATTR_FN(\fITYPE, TYPE_KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, + IERROR\fP) + INTEGER \fITYPE, TYPE_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE VAL, EXTRA_STATE\fP .fi -.sp +.sp The C++ callbacks are: .sp .nf -typedef int MPI::Datatype::Copy_attr_function(const MPI::Datatype& \fIoldtype\fP, - int \fItype_keyval\fP, void* \fIextra_state\fP, - const void* \fIattribute_val_in\fP, void* \fIattribute_val_out\fP, - bool& \fIflag\fP); +typedef int MPI::Datatype::Copy_attr_function(const MPI::Datatype& \fIoldtype\fP, + int \fItype_keyval\fP, void* \fIextra_state\fP, + const void* \fIattribute_val_in\fP, void* \fIattribute_val_out\fP, + bool& \fIflag\fP); .fi and .nf -typedef int MPI::Datatype::Delete_attr_function(MPI::Datatype& \fItype\fP, - int \fItype_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP); +typedef int MPI::Datatype::Delete_attr_function(MPI::Datatype& \fItype\fP, + int \fItype_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP); .fi .sp @@ -126,7 +126,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_create_resized.3in b/ompi/mpi/man/man3/MPI_Type_create_resized.3in index 79486e30b88..567b49c7611 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_resized.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_resized.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_Type_create_resized 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_create_resized\fP \- Returns a new data type with new extent and upper and lower bounds. +\fBMPI_Type_create_resized\fP \- Returns a new data type with new extent and upper and lower bounds. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_create_resized(MPI_Datatype \fIoldtype\fP, MPI_Aint\fI lb\fP, +int MPI_Type_create_resized(MPI_Datatype \fIoldtype\fP, MPI_Aint\fI lb\fP, MPI_Aint \fIextent\fP, MPI_Datatype *\fInewtype\fP) .fi @@ -27,21 +27,21 @@ MPI_TYPE_CREATE_RESIZED(\fIOLDTYPE, LB, EXTENT, NEWTYPE, IERROR\fP) .SH C++ Syntax .nf #include -MPI::Datatype MPI::Datatype::Create_resized(const MPI::Aint \fIlb\fP, +MPI::Datatype MPI::Datatype::Create_resized(const MPI::Aint \fIlb\fP, const MPI::Aint \fIextent\fP) const .fi .SH INPUT PARAMETERS .ft R .TP 1i -oldtype +oldtype Input data type (handle). .TP 1i lb New lower bound of data type (integer). .TP 1i extent -New extent of data type (integer). +New extent of data type (integer). .SH OUTPUT PARAMETERS .ft R @@ -50,11 +50,11 @@ newtype Output data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Type_create_resized returns in \fInewtype\fP a handle to a new data type that is identical to \fIoldtype\fP, except that the lower bound of this new data type is set to be \fIlb\fP, and its upper bound is set to be \fIlb\fP + \fIextent\fP. Any previous \fIlb\fP and \fIub\fP markers are erased, and a new pair of lower bound and upper bound markers are put in the positions indicated by the \fIlb\fP and \fIextent\fP arguments. This affects the behavior of the data type when used in communication operations, with \fIcount\fP > 1, and when used in the construction of new derived data types. +MPI_Type_create_resized returns in \fInewtype\fP a handle to a new data type that is identical to \fIoldtype\fP, except that the lower bound of this new data type is set to be \fIlb\fP, and its upper bound is set to be \fIlb\fP + \fIextent\fP. Any previous \fIlb\fP and \fIub\fP markers are erased, and a new pair of lower bound and upper bound markers are put in the positions indicated by the \fIlb\fP and \fIextent\fP arguments. This affects the behavior of the data type when used in communication operations, with \fIcount\fP > 1, and when used in the construction of new derived data types. .SH FORTRAN 77 NOTES .ft R @@ -73,13 +73,13 @@ and gives the length of the declared integer in bytes. .SH NOTE .ft R -Use of MPI_Type_create_resized is strongly recommended over the old MPI-1 functions MPI_Type_extent and MPI_Type_lb. +Use of MPI_Type_create_resized is strongly recommended over the old MPI-1 functions MPI_Type_extent and MPI_Type_lb. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO diff --git a/ompi/mpi/man/man3/MPI_Type_create_struct.3in b/ompi/mpi/man/man3/MPI_Type_create_struct.3in index 993e3c381c0..accaee061af 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_struct.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_struct.3in @@ -6,14 +6,14 @@ .\" $COPYRIGHT$ .TH MPI_Type_create_struct 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_create_struct\fP \- Creates a structured data type. +\fBMPI_Type_create_struct\fP \- Creates a structured data type. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_create_struct(int \fIcount\fP, int \fIarray_of_blocklengths\fP[], +int MPI_Type_create_struct(int \fIcount\fP, int \fIarray_of_blocklengths\fP[], const MPI_Aint \fIarray_of_displacements\fP[], const MPI_Datatype \fIarray_of_types\fP[], MPI_Datatype *\fInewtype\fP) @@ -21,7 +21,7 @@ int MPI_Type_create_struct(int \fIcount\fP, int \fIarray_of_blocklengths\fP[], .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_TYPE_CREATE_STRUCT(\fICOUNT, ARRAY_OF_BLOCKLENGTHS, +MPI_TYPE_CREATE_STRUCT(\fICOUNT, ARRAY_OF_BLOCKLENGTHS, ARRAY_OF_DISPLACEMENTS, ARRAY_OF_TYPES, NEWTYPE, IERROR\fP) INTEGER \fICOUNT, ARRAY_OF_BLOCKLENGTHS(*), ARRAY_OF_TYPES(*),\fP INTEGER \fINEWTYPE, IERROR \fP @@ -33,7 +33,7 @@ MPI_TYPE_CREATE_STRUCT(\fICOUNT, ARRAY_OF_BLOCKLENGTHS, #include static MPI::Datatype MPI::Datatype::Create_struct(int \fIcount\fP, const int \fIarray_of_blocklengths\fP[], const MPI::Aint - \fIarray_of_displacements\fP[], const MPI::Datatype + \fIarray_of_displacements\fP[], const MPI::Datatype \fIarray_of_types\fP[]) .fi @@ -41,7 +41,7 @@ static MPI::Datatype MPI::Datatype::Create_struct(int \fIcount\fP, .ft R .TP 1i count -Number of blocks (integer) -- also number of entries in arrays \fIarray_of_types\fP, \fIarray_of_displacements\fP, and \fIarray_of_blocklengths\fP. +Number of blocks (integer) -- also number of entries in arrays \fIarray_of_types\fP, \fIarray_of_displacements\fP, and \fIarray_of_blocklengths\fP. .TP 1i array_of_blocklengths Number of elements in each block (array of integers). @@ -59,10 +59,10 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION -MPI_Type_create_struct creates a structured data type. This routine replaces MPI_Type_struct, which is now deprecated. +MPI_Type_create_struct creates a structured data type. This routine replaces MPI_Type_struct, which is now deprecated. .PP NOTE \- This routine replaces MPI_Type_struct, which is deprecated. See the man page MPI_Type_struct(3) for information about that routine. @@ -83,7 +83,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_create_subarray.3in b/ompi/mpi/man/man3/MPI_Type_create_subarray.3in index c1e62af2a00..665f3c3f859 100644 --- a/ompi/mpi/man/man3/MPI_Type_create_subarray.3in +++ b/ompi/mpi/man/man3/MPI_Type_create_subarray.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_create_subarray 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_create_subarray\fP \- Creates a data type describing an \fIn\fP-dimensional subarray of an \fIn\fP-dimensional array. +\fBMPI_Type_create_subarray\fP \- Creates a data type describing an \fIn\fP-dimensional subarray of an \fIn\fP-dimensional array. .SH SYNTAX .ft R @@ -19,8 +19,8 @@ int MPI_Type_create_subarray(int \fIndims\fP, const int \fIarray_of_sizes[]\fP, .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_TYPE_CREATE_SUBARRAY(\fINDIMS, ARRAY_OF_SIZES, ARRAY_OF_SUBSIZES, - ARRAY_OF_STARTS, ORDER, OLDTYPE, NEWTYPE, IERROR\fP) +MPI_TYPE_CREATE_SUBARRAY(\fINDIMS, ARRAY_OF_SIZES, ARRAY_OF_SUBSIZES, + ARRAY_OF_STARTS, ORDER, OLDTYPE, NEWTYPE, IERROR\fP) INTEGER \fINDIMS, ARRAY_OF_SIZES(*), ARRAY_OF_SUBSIZES(*), ARRAY_OF_STARTS(*), ORDER, OLDTYPE, NEWTYPE, IERROR\fP @@ -29,8 +29,8 @@ MPI_TYPE_CREATE_SUBARRAY(\fINDIMS, ARRAY_OF_SIZES, ARRAY_OF_SUBSIZES, .SH C++ Syntax .nf #include -MPI::Datatype MPI::Datatype::Create_subarray(int \fIndims\fP, - const int \fIarray_of_sizes\fP[], const int \fIarray_of_subsizes[]\fP, +MPI::Datatype MPI::Datatype::Create_subarray(int \fIndims\fP, + const int \fIarray_of_sizes\fP[], const int \fIarray_of_subsizes[]\fP, const int \fIarray_of_starts[]\fP, int \fIorder\fP) const .fi @@ -63,37 +63,37 @@ newtype New data type (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The subarray type constructor creates an MPI data type describing an \fIn\fP-dimensional subarray of an \fIn\fP-dimensional array. The subarray may be situated anywhere within the full array, and may be of any nonzero size up to the size of the larger array as long as it is confined within this array. This type constructor facilitates creating file types to access arrays distributed in blocks among processes to a single file that contains the global array. +The subarray type constructor creates an MPI data type describing an \fIn\fP-dimensional subarray of an \fIn\fP-dimensional array. The subarray may be situated anywhere within the full array, and may be of any nonzero size up to the size of the larger array as long as it is confined within this array. This type constructor facilitates creating file types to access arrays distributed in blocks among processes to a single file that contains the global array. .sp -This type constructor can handle arrays with an arbitrary number of dimensions and works for both C- and Fortran-ordered matrices (that is, row-major or column-major). Note that a C program may use Fortran order and a Fortran program may use C order. +This type constructor can handle arrays with an arbitrary number of dimensions and works for both C- and Fortran-ordered matrices (that is, row-major or column-major). Note that a C program may use Fortran order and a Fortran program may use C order. .sp -The \fIndims\fP parameter specifies the number of dimensions in the full data array and gives the number of elements in \fIarray_of_sizes\fP, \fIarray_of_subsizes\fP, and \fIarray_of_starts\fP. +The \fIndims\fP parameter specifies the number of dimensions in the full data array and gives the number of elements in \fIarray_of_sizes\fP, \fIarray_of_subsizes\fP, and \fIarray_of_starts\fP. .sp -The number of elements of type \fIoldtype\fP in each dimension of the \fIn\fP-dimensional array and the requested subarray are specified by \fIarray_of_sizes\fP and \fIarray_of_subsizes\fP, respectively. For any dimension \fIi\fP, it is erroneous to specify \fIarray_of_subsizes[i]\fP < 1 or \fIarray_of_subsizes[i]\fP > \fIarray of sizes[i]\fP. +The number of elements of type \fIoldtype\fP in each dimension of the \fIn\fP-dimensional array and the requested subarray are specified by \fIarray_of_sizes\fP and \fIarray_of_subsizes\fP, respectively. For any dimension \fIi\fP, it is erroneous to specify \fIarray_of_subsizes[i]\fP < 1 or \fIarray_of_subsizes[i]\fP > \fIarray of sizes[i]\fP. .sp -The \fIarray_of_starts\fP contains the starting coordinates of each dimension of the subarray. Arrays are assumed to be indexed starting from zero. For any dimension \fIi\fP, it is erroneous to specify +The \fIarray_of_starts\fP contains the starting coordinates of each dimension of the subarray. Arrays are assumed to be indexed starting from zero. For any dimension \fIi\fP, it is erroneous to specify .sp .nf -\fIarray_of_starts[i]\fP < 0 +\fIarray_of_starts[i]\fP < 0 .fi .sp -or +or .sp .nf -\fIarray_of_starts[i]\fP > (\fIarray_of_sizes[i]\fP - \fIarray_of_subsizes[i]\fP). +\fIarray_of_starts[i]\fP > (\fIarray_of_sizes[i]\fP - \fIarray_of_subsizes[i]\fP). .fi .sp -The \fIorder\fP argument specifies the storage order for the subarray as well as the full array. It must be set to one of the following: +The \fIorder\fP argument specifies the storage order for the subarray as well as the full array. It must be set to one of the following: .sp - MPI_ORDER_C: The ordering used by C arrays, (that is, row-major order) .sp - MPI_ORDER_FORTRAN: The ordering used by Fortran arrays, (that is, column-major order) .sp -A \fIndims\fP-dimensional subarray (\fInewtype\fP) with no extra padding can be defined by the function Subarray() as follows: +A \fIndims\fP-dimensional subarray (\fInewtype\fP) with no extra padding can be defined by the function Subarray() as follows: .sp .nf newtype = Subarray(ndims, {size , size ,\..., size }, @@ -111,21 +111,21 @@ Let the typemap of \fIoldtype\fP have the form: 0 0 1 1 n-1 n-1 .fi .sp -where type\fIi\fP is a predefined MPI data type, and let \fIex\fP be the extent of \fIoldtype\fP. +where type\fIi\fP is a predefined MPI data type, and let \fIex\fP be the extent of \fIoldtype\fP. .sp -The Subarray() function is defined recursively in three equations on page 72 of the MPI-2 standard. +The Subarray() function is defined recursively in three equations on page 72 of the MPI-2 standard. .sp For an example use of MPI_Type_create_subarray in the context of I/O, see Section 9.9.2 of the MPI-2 standard. .SH NOTES .ft R -In a Fortran program with arrays indexed starting from 1, if the starting coordinate of a particular dimension of the subarray is \fIn\fP, then the entry in array of starts for that dimension is \fIn\fP-1. +In a Fortran program with arrays indexed starting from 1, if the starting coordinate of a particular dimension of the subarray is \fIn\fP, then the entry in array of starts for that dimension is \fIn\fP-1. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_delete_attr.3in b/ompi/mpi/man/man3/MPI_Type_delete_attr.3in index fef9d77ccd8..fccc7b352e5 100644 --- a/ompi/mpi/man/man3/MPI_Type_delete_attr.3in +++ b/ompi/mpi/man/man3/MPI_Type_delete_attr.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_delete_attr 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_delete_attr\fP \- Deletes a datatype-caching attribute value associated with a key. +\fBMPI_Type_delete_attr\fP \- Deletes a datatype-caching attribute value associated with a key. .SH SYNTAX .ft R @@ -38,17 +38,17 @@ Data type from which the attribute is deleted (handle).n .ft R .TP 1i type_keyval -Key value (integer). +Key value (integer). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Type_delete_attr deletes a datatype-caching attribute value associated with a key. This routines partially replaces MPI_Attr_delete, which is now deprecated. +MPI_Type_delete_attr deletes a datatype-caching attribute value associated with a key. This routines partially replaces MPI_Attr_delete, which is now deprecated. .SH NOTES @@ -63,5 +63,5 @@ is being invoked. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_dup.3in b/ompi/mpi/man/man3/MPI_Type_dup.3in index 25290deeca1..21dcdb486aa 100644 --- a/ompi/mpi/man/man3/MPI_Type_dup.3in +++ b/ompi/mpi/man/man3/MPI_Type_dup.3in @@ -41,7 +41,7 @@ newtype Copy of \fItype\fP (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -60,7 +60,7 @@ copy callback is being invoked. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_extent.3in b/ompi/mpi/man/man3/MPI_Type_extent.3in index 6cca4cbb9d8..09e787526b4 100644 --- a/ompi/mpi/man/man3/MPI_Type_extent.3in +++ b/ompi/mpi/man/man3/MPI_Type_extent.3in @@ -19,34 +19,34 @@ int MPI_Type_extent(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *extent\fP) .nf INCLUDE 'mpif.h' MPI_TYPE_EXTENT(\fIDATATYPE, EXTENT, IERROR\fP) - INTEGER \fIDATATYPE, EXTENT, IERROR\fP + INTEGER \fIDATATYPE, EXTENT, IERROR\fP .fi .SH INPUT PARAMETER .ft R .TP 1i -datatype +datatype Datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -extent +extent Datatype extent (integer). .sp .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp -MPI_Type_extent returns the extent of a data type, the difference between the upper and lower bounds of the data type. +MPI_Type_extent returns the extent of a data type, the difference between the upper and lower bounds of the data type. .sp In general, if .sp @@ -54,7 +54,7 @@ In general, if Typemap = {(type(0), disp(0)), ..., (type(n-1), disp(n-1))} .fi .sp -then the lower bound of Typemap is defined to be +then the lower bound of Typemap is defined to be .sp .nf ( min(j) disp(j) if no entry has @@ -71,19 +71,19 @@ Similarly, the upper bound of Typemap is defined to be (max(j) {disp(j) such that type(j) = ub} otherwise .fi .sp -Then +Then .sp .nf extent(Typemap) = ub(Typemap) - lb(Typemap) .fi .sp -If type(i) requires alignment to a byte address that is a multiple of k(i), then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). +If type(i) requires alignment to a byte address that is a multiple of k(i), then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_free.3in b/ompi/mpi/man/man3/MPI_Type_free.3in index d2d044a5bdc..7cf0b0a2277 100644 --- a/ompi/mpi/man/man3/MPI_Type_free.3in +++ b/ompi/mpi/man/man3/MPI_Type_free.3in @@ -19,7 +19,7 @@ int MPI_Type_free(MPI_Datatype *\fIdatatype\fP) .nf INCLUDE 'mpif.h' MPI_TYPE_FREE(\fIDATATYPE, IERROR\fP) - INTEGER \fIDATATYPE, IERROR\fP + INTEGER \fIDATATYPE, IERROR\fP .fi .SH C++ Syntax @@ -31,18 +31,18 @@ void Datatype::Free() .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -datatype +datatype Datatype that is freed (handle). .sp .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Marks the datatype object associated with datatype for de-allocation and sets datatype to MPI_DATATYPE_NULL. Any communication that is currently using this datatype will complete normally. Derived datatypes that were defined from the freed datatype are not affected. +Marks the datatype object associated with datatype for de-allocation and sets datatype to MPI_DATATYPE_NULL. Any communication that is currently using this datatype will complete normally. Derived datatypes that were defined from the freed datatype are not affected. .sp Freeing a datatype does not affect any other datatype that was built from the freed datatype. The system behaves as if input datatype arguments to derived datatype constructors are passed by value. @@ -50,7 +50,7 @@ Freeing a datatype does not affect any other datatype that was built from the fr Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_free_keyval.3in b/ompi/mpi/man/man3/MPI_Type_free_keyval.3in index 9f6510b0680..8ee94a56457 100644 --- a/ompi/mpi/man/man3/MPI_Type_free_keyval.3in +++ b/ompi/mpi/man/man3/MPI_Type_free_keyval.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_free_keyval 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_free_keyval\fP \- Frees a previously created type key value. +\fBMPI_Type_free_keyval\fP \- Frees a previously created type key value. .SH SYNTAX .ft R @@ -38,7 +38,7 @@ Key value to free (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -47,7 +47,7 @@ Fortran only: Error status (integer). Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_get_attr.3in b/ompi/mpi/man/man3/MPI_Type_get_attr.3in index 386adc2747c..d00d826dff0 100644 --- a/ompi/mpi/man/man3/MPI_Type_get_attr.3in +++ b/ompi/mpi/man/man3/MPI_Type_get_attr.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_get_attr 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_get_attr\fP \- Returns the attribute associated with a data type. +\fBMPI_Type_get_attr\fP \- Returns the attribute associated with a data type. .SH SYNTAX .ft R @@ -20,8 +20,8 @@ int MPI_Type_get_attr(MPI_Datatype \fItype\fP, int \fItype_keyval\fP, void *\fIa INCLUDE 'mpif.h' MPI_TYPE_GET_ATTR(\fITYPE, TYPE_KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR\fP) INTEGER \fITYPE, TYPE_KEYVAL, IERROR \fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP - LOGICAL \fIFLAG\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP + LOGICAL \fIFLAG\fP .fi .SH C++ Syntax @@ -34,7 +34,7 @@ bool MPI::Datatype::Get_attr(int \fItype_keyval\fP, void* \fIattribute_val\fP) c .ft R .TP 1i type -Data type to which the attribute is attached (handle). +Data type to which the attribute is attached (handle). .TP 1i type_keyval Key value (integer). @@ -49,10 +49,10 @@ flag "false" if no attribute is associated with the key (logical). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION -For the given data type, MPI_Type_get_attr returns an attribute value that corresponds to the specified key value. +For the given data type, MPI_Type_get_attr returns an attribute value that corresponds to the specified key value. .SH FORTRAN 77 NOTES .ft R @@ -71,7 +71,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_get_contents.3in b/ompi/mpi/man/man3/MPI_Type_get_contents.3in index fd94f651427..a605e05b5c4 100644 --- a/ompi/mpi/man/man3/MPI_Type_get_contents.3in +++ b/ompi/mpi/man/man3/MPI_Type_get_contents.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_get_contents 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_get_contents\fP \- Returns information about arguments used in creation of a data type. +\fBMPI_Type_get_contents\fP \- Returns information about arguments used in creation of a data type. .SH SYNTAX .ft R @@ -24,7 +24,7 @@ MPI_TYPE_GET_CONTENTS(\fIDATATYPE, MAX_INTEGERS, MAX_ADDRESSES, ARRAY_OF_DATATYPES, IERROR\fP) INTEGER \fIDATATYPE, MAX_INTEGERS, MAX_ADDRESSES, MAX_DATATYPES\fP INTEGER \fIARRAY_OF_INTEGERS(*), ARRAY_OF_DATATYPES(*), IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIARRAY_OF_ADDRESSES\fP(*) + INTEGER(KIND=MPI_ADDRESS_KIND) \fIARRAY_OF_ADDRESSES\fP(*) .fi .SH C++ Syntax @@ -64,23 +64,23 @@ array_of_datatypes Contains data-type arguments used in constructing \fIdatatype\fP (array of integers). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -For the given data type, MPI_Type_get_envelope returns information on the number and type of input arguments used in the call that created the data type. The number-of-arguments values returned can be used to provide sufficiently large arrays in the decoding routine MPI_Type_get_contents. This call and the meaning of the returned values is described below. The combiner reflects the MPI data type constructor call that was used in creating \fIdatatype\fP. +For the given data type, MPI_Type_get_envelope returns information on the number and type of input arguments used in the call that created the data type. The number-of-arguments values returned can be used to provide sufficiently large arrays in the decoding routine MPI_Type_get_contents. This call and the meaning of the returned values is described below. The combiner reflects the MPI data type constructor call that was used in creating \fIdatatype\fP. The parameter \fIdatatype\fP must be a predefined unnamed or a derived data type. The call is erroneous if \fIdatatype\fP is a predefined named data type. .sp The values given for \fImax_integers\fP, \fImax_addresses\fP, and \fImax_datatypes\fP must be at least as large as the value returned in \fInum_integers\fP, \fInum_addresses\fP, and \fInum_datatypes\fP, respectively, in the call MPI_Type_get_envelope for the same \fIdatatype\fP argument. .sp -The data types returned in \fIarray_of_datatypes\fP are handles to data-type objects that are equivalent to the data types used in the original construction call. If these were derived data types, then the returned data types are new data-type objects, and the user is responsible for freeing these datatypes with MPI_Type_free. If these were predefined data types, then the returned data type is equal to that (constant) predefined data type and cannot be freed. +The data types returned in \fIarray_of_datatypes\fP are handles to data-type objects that are equivalent to the data types used in the original construction call. If these were derived data types, then the returned data types are new data-type objects, and the user is responsible for freeing these datatypes with MPI_Type_free. If these were predefined data types, then the returned data type is equal to that (constant) predefined data type and cannot be freed. .sp -The committed state of returned derived data types is undefined, that is, the data types may or may not be committed. Furthermore, the content of attributes of returned data types is undefined. +The committed state of returned derived data types is undefined, that is, the data types may or may not be committed. Furthermore, the content of attributes of returned data types is undefined. .sp -Note that MPI_Type_get_contents can be invoked with a data-type argument that was constructed using MPI_Type_create_f90_real, MPI_Type_create_f90_integer, or MPI_Type_create_f90_complex (an unnamed predefined data type). In such a case, an empty \fIarray_of_datatypes\fP is returned. +Note that MPI_Type_get_contents can be invoked with a data-type argument that was constructed using MPI_Type_create_f90_real, MPI_Type_create_f90_integer, or MPI_Type_create_f90_complex (an unnamed predefined data type). In such a case, an empty \fIarray_of_datatypes\fP is returned. .sp -In the MPI-1 data-type constructor calls, the address arguments in Fortran are of type INTEGER. In the new MPI-2 calls, the address arguments are of type INTEGER(KIND=MPI ADDRESS KIND). The call MPI_Type_get_contents returns all addresses in an argument of type INTEGER(KIND=MPI ADDRESS KIND). This is true even if the old MPI-1 calls were used. Thus, the location of values returned can be thought of as being returned by the C bindings. It can also be determined by examining the new MPI-2 calls for data-type constructors for the deprecated MPI-1 calls that involve addresses. +In the MPI-1 data-type constructor calls, the address arguments in Fortran are of type INTEGER. In the new MPI-2 calls, the address arguments are of type INTEGER(KIND=MPI ADDRESS KIND). The call MPI_Type_get_contents returns all addresses in an argument of type INTEGER(KIND=MPI ADDRESS KIND). This is true even if the old MPI-1 calls were used. Thus, the location of values returned can be thought of as being returned by the C bindings. It can also be determined by examining the new MPI-2 calls for data-type constructors for the deprecated MPI-1 calls that involve addresses. .SH FORTRAN 77 NOTES .ft R @@ -99,7 +99,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Type_get_envelope.3in b/ompi/mpi/man/man3/MPI_Type_get_envelope.3in index 87e082200bc..3c7e5df195e 100644 --- a/ompi/mpi/man/man3/MPI_Type_get_envelope.3in +++ b/ompi/mpi/man/man3/MPI_Type_get_envelope.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_get_envelope 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_get_envelope\fP \- Returns information about input arguments associated with a data type. +\fBMPI_Type_get_envelope\fP \- Returns information about input arguments associated with a data type. .SH SYNTAX .ft R @@ -16,7 +16,7 @@ int MPI_Type_get_envelope(MPI_Datatype \fIdatatype\fP, int *\fInum_integers\fP, int *\fInum_addresses\fP, int *\fInum_datatypes\fP, int *\fIcombiner\fP) .fi -.SH Fortran Syntax +.SH Fortran Syntax .nf INCLUDE 'mpif.h' MPI_TYPE_GET_ENVELOPE(\fIDATATYPE, NUM_INTEGERS, NUM_ADDRESSES, @@ -28,8 +28,8 @@ MPI_TYPE_GET_ENVELOPE(\fIDATATYPE, NUM_INTEGERS, NUM_ADDRESSES, .SH C++ Syntax .nf #include -void MPI::Datatype::Get_envelope(int& \fInum_integers\fP, - int& \fInum_addresses\fP, int& \fInum_datatypes\fP, +void MPI::Datatype::Get_envelope(int& \fInum_integers\fP, + int& \fInum_addresses\fP, int& \fInum_datatypes\fP, int& \fIcombiner\fP) const .fi @@ -52,14 +52,14 @@ num_datatypes Number of input data types used in the call constructing \fIcombiner\fP (nonnegative integer). .TP 1i combiner -Combiner (state). +Combiner (state). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -For the given data type, MPI_Type_get_envelope returns information on the number and type of input arguments used in the call that created the data type. The number-of-arguments values returned can be used to provide sufficiently large arrays in the decoding routine MPI_Type_get_contents. This call and the meaning of the returned values is described below. The combiner reflects the MPI data type constructor call that was used in creating \fIdatatype\fP. +For the given data type, MPI_Type_get_envelope returns information on the number and type of input arguments used in the call that created the data type. The number-of-arguments values returned can be used to provide sufficiently large arrays in the decoding routine MPI_Type_get_contents. This call and the meaning of the returned values is described below. The combiner reflects the MPI data type constructor call that was used in creating \fIdatatype\fP. .SH NOTES .ft R @@ -96,13 +96,13 @@ MPI_COMBINER_RESIZED MPI_Type_create_resized .sp If \fIcombiner\fP is MPI_COMBINER_NAMED, then \fIdatatype\fP is a named predefined data type. .sp -The actual arguments used in the creation call for a data type can be obtained from the call MPI_Type_get_contents. +The actual arguments used in the creation call for a data type can be obtained from the call MPI_Type_get_contents. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft r diff --git a/ompi/mpi/man/man3/MPI_Type_get_extent.3in b/ompi/mpi/man/man3/MPI_Type_get_extent.3in index 88bf87cf6d6..f3283e83f89 100644 --- a/ompi/mpi/man/man3/MPI_Type_get_extent.3in +++ b/ompi/mpi/man/man3/MPI_Type_get_extent.3in @@ -6,16 +6,16 @@ .\" $COPYRIGHT$ .TH MPI_Type_get_extent 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_get_extent\fP, \fBMPI_Type_get_extent_x\fP \- Returns the lower bound and extent of a data type. +\fBMPI_Type_get_extent\fP, \fBMPI_Type_get_extent_x\fP \- Returns the lower bound and extent of a data type. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_get_extent(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *lb\fP, +int MPI_Type_get_extent(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *lb\fP, MPI_Aint *\fIextent\fP) -int MPI_Type_get_extent_x(MPI_Datatype \fIdatatype\fP, MPI_Count\fI *lb\fP, +int MPI_Type_get_extent_x(MPI_Datatype \fIdatatype\fP, MPI_Count\fI *lb\fP, MPI_Count *\fIextent\fP) .fi @@ -23,24 +23,24 @@ int MPI_Type_get_extent_x(MPI_Datatype \fIdatatype\fP, MPI_Count\fI *lb\fP, .nf INCLUDE 'mpif.h' MPI_TYPE_GET_EXTENT(\fIDATATYPE, LB, EXTENT, IERROR\fP) - INTEGER \fIDATATYPE, IERROR\fP + INTEGER \fIDATATYPE, IERROR\fP INTEGER(KIND=MPI_ADDRESS_KIND) \fILB, EXTENT\fP MPI_TYPE_GET_EXTENT_X(\fIDATATYPE, LB, EXTENT, IERROR\fP) - INTEGER \fIDATATYPE, IERROR\fP + INTEGER \fIDATATYPE, IERROR\fP INTEGER(KIND=MPI_COUNT_KIND) \fILB, EXTENT\fP .fi .SH C++ Syntax .nf #include -void MPI::Datatype::Get_extent(MPI::Aint& \fIlb\fP, MPI::Aint& \fIextent\fP) +void MPI::Datatype::Get_extent(MPI::Aint& \fIlb\fP, MPI::Aint& \fIextent\fP) const .fi .SH INPUT PARAMETER .ft R .TP 1i -datatype +datatype Data type (handle). .sp .SH OUTPUT PARAMETERS @@ -49,12 +49,12 @@ Data type (handle). lb Lower bound of data type (integer). .TP 1i -extent +extent Data type extent (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -62,7 +62,7 @@ MPI_Type_get_extent returns the lower bound and the extent of \fIdatatype\fP. Fo .SH NOTE .ft R -Use of MPI_Type_get_extent is strongly recommended over the old MPI-1 functions MPI_Type_extent and MPI_Type_lb. +Use of MPI_Type_get_extent is strongly recommended over the old MPI-1 functions MPI_Type_extent and MPI_Type_lb. .SH FORTRAN 77 NOTES .ft R @@ -93,4 +93,4 @@ and give the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_get_name.3in b/ompi/mpi/man/man3/MPI_Type_get_name.3in index 12ed816c8df..28edd2d7761 100644 --- a/ompi/mpi/man/man3/MPI_Type_get_name.3in +++ b/ompi/mpi/man/man3/MPI_Type_get_name.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_Type_get_name 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_get_name\fP \- Gets the name of a data type. +\fBMPI_Type_get_name\fP \- Gets the name of a data type. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_get_name(MPI_Datatype \fItype\fP, char *\fItype_name\fP, +int MPI_Type_get_name(MPI_Datatype \fItype\fP, char *\fItype_name\fP, int *\fIresultlen\fP) .fi @@ -27,7 +27,7 @@ TYPE_GET_NAME(\fITYPE, TYPE_NAME, RESULTLEN, IERROR\fP) .SH C++ Syntax .nf #include -void MPI::Datatype::Get_name(char* \fItype_name\fP, int& \fIresultlen\fP) +void MPI::Datatype::Get_name(char* \fItype_name\fP, int& \fIresultlen\fP) const .fi @@ -35,7 +35,7 @@ void MPI::Datatype::Get_name(char* \fItype_name\fP, int& \fIresultlen\fP) .ft R .TP 1i type -Data type whose name is to be returned (handle). +Data type whose name is to be returned (handle). .SH OUTPUT PARAMETERS .ft R @@ -47,17 +47,17 @@ resultlen Length of returned name (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Type_get_name returns the printable identifier associated with an MPI data type. +MPI_Type_get_name returns the printable identifier associated with an MPI data type. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_get_true_extent.3in b/ompi/mpi/man/man3/MPI_Type_get_true_extent.3in index 70819543410..8b1587f9fe6 100644 --- a/ompi/mpi/man/man3/MPI_Type_get_true_extent.3in +++ b/ompi/mpi/man/man3/MPI_Type_get_true_extent.3in @@ -6,16 +6,16 @@ .\" $COPYRIGHT$ .TH MPI_Type_get_true_extent 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_get_true_extent\fP, \fBMPI_Type_get_true_extent_x\fP \- Returns the true lower bound and extent of a data type's corresponding typemap, ignoring MPI_UB and MPI_LB markers. +\fBMPI_Type_get_true_extent\fP, \fBMPI_Type_get_true_extent_x\fP \- Returns the true lower bound and extent of a data type's corresponding typemap, ignoring MPI_UB and MPI_LB markers. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_get_true_extent(MPI_Datatype \fIdatatype\fP, +int MPI_Type_get_true_extent(MPI_Datatype \fIdatatype\fP, MPI_Aint *\fItrue_lb\fP, MPI_Aint *\fItrue_extent\fP) -int MPI_Type_get_true_extent_x(MPI_Datatype \fIdatatype\fP, +int MPI_Type_get_true_extent_x(MPI_Datatype \fIdatatype\fP, MPI_Count *\fItrue_lb\fP, MPI_Count *\fItrue_extent\fP) .fi @@ -23,24 +23,24 @@ int MPI_Type_get_true_extent_x(MPI_Datatype \fIdatatype\fP, .nf INCLUDE 'mpif.h' MPI_TYPE_GET_TRUE_EXTENT(\fIDATATYPE, TRUE_LB, TRUE_EXTENT, IERROR\fP) - INTEGER \fIDATATYPE, IERROR\fP + INTEGER \fIDATATYPE, IERROR\fP INTEGER(KIND=MPI_ADDRESS_KIND) \fITRUE_LB, TRUE_EXTENT\fP MPI_TYPE_GET_TRUE_EXTENT_X(\fIDATATYPE, TRUE_LB, TRUE_EXTENT, IERROR\fP) - INTEGER \fIDATATYPE, IERROR\fP + INTEGER \fIDATATYPE, IERROR\fP INTEGER(KIND=MPI_COUNT_KIND) \fITRUE_LB, TRUE_EXTENT\fP .fi .SH C++ Syntax .nf #include -void MPI::Datatype::Get_true_extent(MPI::Aint& \fItrue_lb\fP, +void MPI::Datatype::Get_true_extent(MPI::Aint& \fItrue_lb\fP, MPI::Aint& \fItrue_extent\fP) const .fi .SH INPUT PARAMETER .ft R .TP 1i -datatype +datatype Data type for which information is wanted (handle). .sp .SH OUTPUT PARAMETERS @@ -54,7 +54,7 @@ True size of data type (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -62,7 +62,7 @@ The \fItrue_lb\fP parameter returns the offset of the lowest unit of store that .sp The \fItrue_extent\fP is the minimum number of bytes of memory necessary to hold a data type, uncompressed. .sp -See § 4.1.8 of the MPI-3 standard for more detailed definitions of these parameters in relation to the typemap. +See § 4.1.8 of the MPI-3 standard for more detailed definitions of these parameters in relation to the typemap. .SH FORTRAN 77 NOTES .ft R @@ -91,5 +91,5 @@ where MPI_ADDRESS_KIND and MPI_COUNT_KIND are constants defined in mpif.h and gi Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Type_hindexed.3in b/ompi/mpi/man/man3/MPI_Type_hindexed.3in index 4280cc504a5..6eb3fd2ca7c 100644 --- a/ompi/mpi/man/man3/MPI_Type_hindexed.3in +++ b/ompi/mpi/man/man3/MPI_Type_hindexed.3in @@ -31,39 +31,39 @@ MPI_TYPE_HINDEXED(\fICOUNT, ARRAY_OF_BLOCKLENGTHS, .SH INPUT PARAMETERS .ft R .TP 1i -count +count Number of blocks -- also number of entries in array_of_displacements and array_of_blocklengths (integer). .TP 1i array_of_blocklengths Number of elements in each block (array of nonnegative integers). .TP 1i -array_of_displacements -Byte displacement of each block (C: array of +array_of_displacements +Byte displacement of each block (C: array of .IR MPI_Aint , Fortran: array of integer). .TP 1i -oldtype +oldtype Old datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -newtype +newtype New datatype (handle). .sp .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Use MPI_Type_create_hindexed instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Use MPI_Type_create_hindexed instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp -The function is identical to MPI_Type_indexed, except that block displacements in array_of_displacements are specified in bytes, rather than in multiples of the oldtype extent. +The function is identical to MPI_Type_indexed, except that block displacements in array_of_displacements are specified in bytes, rather than in multiples of the oldtype extent. .sp Assume that oldtype has type map .sp @@ -72,13 +72,13 @@ Assume that oldtype has type map .fi .sp with extent ex. Let B be the array_of_blocklength argument and D be the -array_of_displacements argument. The newly created datatype has +array_of_displacements argument. The newly created datatype has .nf n x S^count-1 (i=0) B[i] entries: {(type(0), disp(0) + D[0]),...,(type(n-1), disp(n-1) + D[0]),..., - (type(0), disp(0) + (D[0] + B[0]-1)* ex),..., + (type(0), disp(0) + (D[0] + B[0]-1)* ex),..., type(n-1), disp(n-1) + (D[0]+ B[0]-1)* ex),..., (type(0), disp(0) + D[count-1]),...,(type(n-1), disp(n-1) + D[count-1]),..., (type(0), disp(0) + D[count-1] + (B[count-1] -1)* ex),..., @@ -89,7 +89,7 @@ n x S^count-1 Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_hvector.3in b/ompi/mpi/man/man3/MPI_Type_hvector.3in index 0e323b0cd58..6f4aa826510 100644 --- a/ompi/mpi/man/man3/MPI_Type_hvector.3in +++ b/ompi/mpi/man/man3/MPI_Type_hvector.3in @@ -21,44 +21,44 @@ int MPI_Type_hvector(int \fIcount\fP, int\fI blocklength\fP, MPI_Aint\fI stride\ INCLUDE 'mpif.h' MPI_TYPE_HVECTOR(\fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR\fP) - INTEGER \fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE\fP - INTEGER \fINEWTYPE, IERROR\fP + INTEGER \fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE\fP + INTEGER \fINEWTYPE, IERROR\fP .fi .SH INPUT PARAMETERS .ft R .TP 1i -count +count Number of blocks (nonnegative integer). .TP 1i -blocklength +blocklength Number of elements in each block (nonnegative integer). .TP 1i -stride +stride Number of bytes between start of each block (integer). .TP 1i -oldtype +oldtype Old datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -newtype +newtype New datatype (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Use MPI_Type_create_hvector instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Use MPI_Type_create_hvector instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp The function MPI_Type_hvector is identical to MPI_Type_vector, except that stride is given in bytes, rather than in elements. The use for both types -of vector constructors is illustrated in the examples in Section 3.12.7 of the MPI-1 Standard. +of vector constructors is illustrated in the examples in Section 3.12.7 of the MPI-1 Standard. .sp Assume that oldtype has type map .sp @@ -70,15 +70,15 @@ with extent ex. Let bl be the blocklength. The newly created datatype has a type .sp .nf {(type(0), disp(0)), ..., (type(n-1), disp(n-1)), - (type(0), disp(0) + ex), ..., (type(n-1), disp(n-1) + ex), - ..., (type(0), disp(0) + (bl -1) * ex),...,(type(n-1), - disp(n-1) + (bl -1) * ex), (type(0), disp(0) + stride), - ...,(type(n-1), disp(n-1) + stride), ..., (type(0), - disp(0) + stride + (bl - 1) * ex), ..., (type(n-1), - disp(n-1) + stride + (bl -1) * ex), ..., (type(0), - disp(0) + stride * (count -1)), ...,(type(n-1), - disp(n-1) + stride * (count -1)), ..., (type(0), - disp(0) + stride * (count -1) + (bl -1) * ex), ..., + (type(0), disp(0) + ex), ..., (type(n-1), disp(n-1) + ex), + ..., (type(0), disp(0) + (bl -1) * ex),...,(type(n-1), + disp(n-1) + (bl -1) * ex), (type(0), disp(0) + stride), + ...,(type(n-1), disp(n-1) + stride), ..., (type(0), + disp(0) + stride + (bl - 1) * ex), ..., (type(n-1), + disp(n-1) + stride + (bl -1) * ex), ..., (type(0), + disp(0) + stride * (count -1)), ...,(type(n-1), + disp(n-1) + stride * (count -1)), ..., (type(0), + disp(0) + stride * (count -1) + (bl -1) * ex), ..., (type(n-1), disp(n-1) + stride * (count -1) + (bl -1) * ex)} .fi @@ -86,7 +86,7 @@ with extent ex. Let bl be the blocklength. The newly created datatype has a type Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_indexed.3in b/ompi/mpi/man/man3/MPI_Type_indexed.3in index 4c231268d74..4e840d40471 100644 --- a/ompi/mpi/man/man3/MPI_Type_indexed.3in +++ b/ompi/mpi/man/man3/MPI_Type_indexed.3in @@ -17,7 +17,7 @@ int MPI_Type_indexed(int \fIcount\fP, const int\fI array_of_blocklengths[]\fP, const int\fI array_of_displacements[]\fP, MPI_Datatype\fI oldtype\fP, MPI_Datatype\fI *newtype\fP) -int MPI_Type_create_hindexed(int \fIcount\fP, +int MPI_Type_create_hindexed(int \fIcount\fP, const int\fI array_of_blocklengths[]\fP, const MPI_Aint\fI array_of_displacements[]\fP, MPI_Datatype\fI oldtype\fP, MPI_Datatype\fI *newtype\fP) @@ -43,9 +43,9 @@ MPI_TYPE_CREATE_HINDEXED(\fICOUNT, ARRAY_OF_BLOCKLENGTHS, .SH C++ Syntax .nf #include -Datatype Datatype::Create_indexed(int \fIcount\fP, - const int \fIarray_of_blocklengths\fP[], - const int \fIarray_of_displacements\fP[]) const +Datatype Datatype::Create_indexed(int \fIcount\fP, + const int \fIarray_of_blocklengths\fP[], + const int \fIarray_of_displacements\fP[]) const Datatype Datatype::Create_hindexed(int \fIcount\fP, const int \fIarray_of_blocklengths\fP[], @@ -55,77 +55,77 @@ Datatype Datatype::Create_hindexed(int \fIcount\fP, .SH INPUT PARAMETERS .ft R .TP 1i -count +count Number of blocks -- also number of entries in array_of_displacements and array_of_blocklengths (nonnegative integer). .TP 1i -array_of_blocklengths +array_of_blocklengths Number of elements per block (array of nonnegative integers). .TP 1i -array_of_displacements +array_of_displacements Displacement for each block, in multiples of oldtype extent for MPI_Type_indexed and bytes for MPI_Type_create_hindexed (array of integer for .BR MPI_TYPE_INDEXED , -array of +array of .I MPI_Aint -for +for .BR MPI_TYPE_CREATE_HINDEXED ). .TP 1i -oldtype +oldtype Old datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -newtype +newtype New datatype (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The function MPI_Type_indexed allows replication of an old datatype into a sequence of blocks (each block is a concatenation of the old datatype), where each block can contain a different number of copies and have a different displacement. All block displacements are multiples of the old data type's extent. +The function MPI_Type_indexed allows replication of an old datatype into a sequence of blocks (each block is a concatenation of the old datatype), where each block can contain a different number of copies and have a different displacement. All block displacements are multiples of the old data type's extent. .sp -\fBExample:\fP Let oldtype have type map {(double, 0), (char, 8)}, with extent 16. Let B = (3, 1) and let D = (4, 0). A call to MPI_Type_indexed(2, B, D, oldtype, newtype) returns a datatype with type map +\fBExample:\fP Let oldtype have type map {(double, 0), (char, 8)}, with extent 16. Let B = (3, 1) and let D = (4, 0). A call to MPI_Type_indexed(2, B, D, oldtype, newtype) returns a datatype with type map .sp .nf - {(double, 64), (char, 72), (double, 80), (char, 88), - (double, 96), (char, 104), + {(double, 64), (char, 72), (double, 80), (char, 88), + (double, 96), (char, 104), (double, 0), (char, 8)} .fi .sp That is, three copies of the old type starting at displacement 4 x 16 = 64, and one copy starting at displacement 0. .sp -In general, assume that oldtype has type map +In general, assume that oldtype has type map .sp .nf {(type(0), disp(0)), ..., (type(n-1), disp(n-1))}, .fi .sp with extent ex. Let B be the array_of_blocklength argument and D be the -array_of_displacements argument. The newly created datatype has +array_of_displacements argument. The newly created datatype has .br .nf n x S ^count-1 i = 0 B[i] entries: - {(type(0), disp(0) + D[0]* ex), ..., + {(type(0), disp(0) + D[0]* ex), ..., (type(n-1), disp(n-1) + D[0]* ex), ..., - (type(0), disp(0) + (D[0] + B[0]-1)* ex), ..., + (type(0), disp(0) + (D[0] + B[0]-1)* ex), ..., (type(n-1), disp(n-1) + (D[0]+ B[0]-1)* ex), ..., - (type(0), disp(0) + D[count-1]* ex), ..., + (type(0), disp(0) + D[count-1]* ex), ..., (type(n-1), disp(n-1) + D[count-1]* ex), ..., (type(0), disp(0) + (D[count-1] + B[count-1] -1)* ex), ..., (type(n-1), disp(n-1) + (D[count-1] + B[count-1] -1)* ex)} .fi .sp -A call to MPI_Type_vector(count, blocklength, stride, oldtype, newtype) is equivalent to a call to MPI_Type_indexed(count, B, D, oldtype, newtype) where +A call to MPI_Type_vector(count, blocklength, stride, oldtype, newtype) is equivalent to a call to MPI_Type_indexed(count, B, D, oldtype, newtype) where .sp .nf - D[j] = j * stride, j = 0,..., count-1 + D[j] = j * stride, j = 0,..., count-1 and @@ -138,7 +138,7 @@ The function MPI_Type_create_hindexed is identical to MPI_Type_indexed, except t Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_lb.3in b/ompi/mpi/man/man3/MPI_Type_lb.3in index 81f08b161d7..a2e7118aea5 100644 --- a/ompi/mpi/man/man3/MPI_Type_lb.3in +++ b/ompi/mpi/man/man3/MPI_Type_lb.3in @@ -19,31 +19,31 @@ int MPI_Type_lb(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *displacement\fP) .nf INCLUDE 'mpif.h' MPI_TYPE_LB(\fIDATATYPE, DISPLACEMENT, IERROR\fP) - INTEGER \fIDATATYPE, DISPLACEMENT, IERROR\fP + INTEGER \fIDATATYPE, DISPLACEMENT, IERROR\fP .fi .SH INPUT PARAMETER .ft R .TP 1i -datatype +datatype Datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -displacement +displacement Displacement of lower bound from origin, in bytes (integer). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp MPI_Type_lb returns the lower bound of a data type. This may differ from zero if the type was constructed using MPI_LB. .sp @@ -55,7 +55,7 @@ In general, if Typemap = {(type0, disp0), ..., (type(n-1), disp(n-1)} .fi .sp -then the lower bound of Typemap is defined to be +then the lower bound of Typemap is defined to be .nf (min(j) disp(j) if no entry has @@ -70,19 +70,19 @@ Similarly, the upper bound of Typemap is defined to be ub(Typemap) = ( basic type ub (max(j) {disp(j) such that type(j) = ub} otherwise -Then +Then extent(Typemap) = ub(Typemap) - lb(Typemap) .fi .sp If type(i) requires alignment to a byte address that is a multiple of k(i), -then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). +then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_match_size.3in b/ompi/mpi/man/man3/MPI_Type_match_size.3in index b9b5083ef10..5cb4de8e7f0 100644 --- a/ompi/mpi/man/man3/MPI_Type_match_size.3in +++ b/ompi/mpi/man/man3/MPI_Type_match_size.3in @@ -22,7 +22,7 @@ int MPI_Type_match_size(int \fItypeclass\fP, int \fIsize\fP, .nf INCLUDE 'mpif.h' MPI_TYPE_MATCH_SIZE(\fITYPECLASS, SIZE, TYPE, IERROR\fP) - INTEGER \fITYPECLASS, SIZE, TYPE, IERROR\fP + INTEGER \fITYPECLASS, SIZE, TYPE, IERROR\fP .fi .SH C++ Syntax @@ -49,7 +49,7 @@ Datatype with correct type and size (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -83,7 +83,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Type_set_attr.3in b/ompi/mpi/man/man3/MPI_Type_set_attr.3in index 2d9ca5cf2ed..705f290f081 100644 --- a/ompi/mpi/man/man3/MPI_Type_set_attr.3in +++ b/ompi/mpi/man/man3/MPI_Type_set_attr.3in @@ -5,14 +5,14 @@ .\" $COPYRIGHT$ .TH MPI_Type_set_attr 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_set_attr\fP \- Sets a key value/attribute pair to a data type. +\fBMPI_Type_set_attr\fP \- Sets a key value/attribute pair to a data type. .SH SYNTAX .ft R .SH C Syntax .nf #include -int MPI_Type_set_attr(MPI_Datatype \fItype\fP, int \fItype_keyval\fP, +int MPI_Type_set_attr(MPI_Datatype \fItype\fP, int \fItype_keyval\fP, void *\fIattribute_val\fP) .fi @@ -34,7 +34,7 @@ void MPI::Datatype::Set_attr(int \fItype_keyval\fP, const void* \fIattribute_val .ft R .TP 1i type -Data type to which attribute will be attached (handle). +Data type to which attribute will be attached (handle). .SH INPUT PARAMETERS .ft R @@ -49,10 +49,10 @@ Attribute value. .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION -For the given data type, MPI_Type_set_attr sets the key value to the value of the specified attribute. +For the given data type, MPI_Type_set_attr sets the key value to the value of the specified attribute. .SH FORTRAN 77 NOTES .ft R @@ -71,7 +71,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_set_name.3in b/ompi/mpi/man/man3/MPI_Type_set_name.3in index 83aaf14d961..8c47be73589 100644 --- a/ompi/mpi/man/man3/MPI_Type_set_name.3in +++ b/ompi/mpi/man/man3/MPI_Type_set_name.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Type_set_name 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Type_set_name\fP \- Sets the name of a data type. +\fBMPI_Type_set_name\fP \- Sets the name of a data type. .SH SYNTAX .ft R @@ -40,24 +40,24 @@ Data type for which the identifier is to be set (handle). .ft R .TP 1i type_name -The character string remembered as the name (string). +The character string remembered as the name (string). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Type_set_name associates a printable identifier with an MPI data type. +MPI_Type_set_name associates a printable identifier with an MPI data type. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_size.3in b/ompi/mpi/man/man3/MPI_Type_size.3in index db1c5d95e6a..87883a7c9fb 100644 --- a/ompi/mpi/man/man3/MPI_Type_size.3in +++ b/ompi/mpi/man/man3/MPI_Type_size.3in @@ -37,20 +37,20 @@ int Datatype::Get_size() const .SH INPUT PARAMETER .ft R .TP 1i -datatype +datatype Datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -size +size Datatype size (integer). .sp .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -60,7 +60,7 @@ MPI_Type_size returns the total size, in bytes, of the entries in the type signa Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH FORTRAN 77 NOTES .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_struct.3in b/ompi/mpi/man/man3/MPI_Type_struct.3in index 21fe9b2efe7..7bc9a0cbe88 100644 --- a/ompi/mpi/man/man3/MPI_Type_struct.3in +++ b/ompi/mpi/man/man3/MPI_Type_struct.3in @@ -25,14 +25,14 @@ MPI_TYPE_STRUCT(\fICOUNT, ARRAY_OF_BLOCKLENGTHS, NEWTYPE, IERROR\fP) INTEGER \fICOUNT, ARRAY_OF_BLOCKLENGTHS(*)\fP INTEGER \fIARRAY_OF_DISPLACEMENTS(*)\fP - INTEGER \fIARRAY_OF_TYPES(*), NEWTYPE, IERROR\fP + INTEGER \fIARRAY_OF_TYPES(*), NEWTYPE, IERROR\fP .fi .SH INPUT PARAMETERS .ft R .TP 1i -count +count Number of blocks (integer) also number of entries in arrays array_of_types, array_of_displacements, and array_of_blocklengths. .TP 1i @@ -42,29 +42,29 @@ Number of elements in each block (array). array_of_displacements Byte displacement of each block (array). .TP 1i -array_of_types +array_of_types Type of elements in each block (array of handles to datatype objects). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -newtype +newtype New datatype (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Use MPI_Type_create_struct instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Use MPI_Type_create_struct instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp -MPI_Type_struct is the most general type constructor. It further generalizes MPI_Type_hindexed in that it allows each block to consist of replications of different datatypes. +MPI_Type_struct is the most general type constructor. It further generalizes MPI_Type_hindexed in that it allows each block to consist of replications of different datatypes. .sp -\fBExample:\fP Let type1 have type map +\fBExample:\fP Let type1 have type map .nf {(double, 0), (char, 8)} @@ -73,24 +73,24 @@ MPI_Type_struct is the most general type constructor. It further generalizes MPI with extent 16. Let B = (2, 1, 3), D = (0, 16, 26), and T = (MPI_FLOAT, type1, MPI_CHAR). Then a call to MPI_Type_struct(3, B, D, T, newtype) returns a datatype with type map .nf - {(float, 0), (float,4), (double, 16), (char, 24), + {(float, 0), (float,4), (double, 16), (char, 24), (char, 26), (char, 27), (char, 28)} .fi -That is, two copies of MPI_FLOAT starting at 0, followed by one copy of type1 starting at 16, followed by three copies of MPI_CHAR, starting at 26. (We assume that a float occupies 4 bytes.) +That is, two copies of MPI_FLOAT starting at 0, followed by one copy of type1 starting at 16, followed by three copies of MPI_CHAR, starting at 26. (We assume that a float occupies 4 bytes.) .sp For more information, see section 3.12.1 of the MPI-1.1 Standard. .SH NOTES If an upperbound is set explicitly by using the MPI datatype MPI_UB, the corresponding index must be positive. .sp -The MPI-1 Standard originally made vague statements about padding and alignment; this was intended to allow the simple definition of structures that could be sent with a count greater than one. For example, +The MPI-1 Standard originally made vague statements about padding and alignment; this was intended to allow the simple definition of structures that could be sent with a count greater than one. For example, .nf struct {int a; char b;} foo; .fi -may have +may have .nf - sizeof(foo) = sizeof(int) + sizeof(char); + sizeof(foo) = sizeof(int) + sizeof(char); .fi defining the extent of a datatype as including an epsilon, which would have allowed an implementation to make the extent an MPI datatype for this structure equal to 2*sizeof(int). However, since different systems might define different paddings, a clarification to the standard made epsilon zero. Thus, if you define a structure datatype and wish to send or receive multiple items, you should explicitly include an MPI_UB entry as the last member of the structure. For example, the following code can be used for the structure foo: .nf @@ -106,7 +106,7 @@ defining the extent of a datatype as including an epsilon, which would have allo Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_ub.3in b/ompi/mpi/man/man3/MPI_Type_ub.3in index 7bb13524877..6f2808ff411 100644 --- a/ompi/mpi/man/man3/MPI_Type_ub.3in +++ b/ompi/mpi/man/man3/MPI_Type_ub.3in @@ -19,33 +19,33 @@ int MPI_Type_ub(MPI_Datatype \fIdatatype\fP, MPI_Aint\fI *displacement\fP) .nf INCLUDE 'mpif.h' MPI_TYPE_UB(\fIDATATYPE, DISPLACEMENT, IERROR\fP) - INTEGER \fIDATATYPE, DISPLACEMENT, IERROR\fP + INTEGER \fIDATATYPE, DISPLACEMENT, IERROR\fP .fi .SH INPUT PARAMETER .ft R .TP 1i -datatype +datatype Datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -displacement +displacement Displacement of upper bound from origin, in bytes (integer). .sp .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. +Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Type_get_extent instead. .sp -This deprecated routine is not available in C++. +This deprecated routine is not available in C++. .sp MPI_Type_ub returns the upper bound of a data type. This will differ from zero if the type was constructed using MPI_UB. The upper bound will take into account any alignment considerations. .sp @@ -57,7 +57,7 @@ In general, if Typemap = {(type(0), disp(0)), ..., (type(n-1), disp(n-1))} .fi -then the lower bound of Typemap is defined to be +then the lower bound of Typemap is defined to be .nf (min(j) disp(j) if no entry has @@ -73,19 +73,19 @@ Similarly, the upper bound of Typemap is defined to be (max(j) {disp(j) such that type(j) = ub} otherwise .fi -Then +Then .nf extent(Typemap) = ub(Typemap) - lb(Typemap) .fi -If type(i) requires alignment to a byte address that is a multiple of k(i), then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). +If type(i) requires alignment to a byte address that is a multiple of k(i), then e is the least nonnegative increment needed to round extent(Typemap) to the next multiple of max(i) k(i). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Type_vector.3in b/ompi/mpi/man/man3/MPI_Type_vector.3in index 3951709c75e..fed088578da 100644 --- a/ompi/mpi/man/man3/MPI_Type_vector.3in +++ b/ompi/mpi/man/man3/MPI_Type_vector.3in @@ -21,62 +21,62 @@ int MPI_Type_vector(int \fIcount\fP, int\fI blocklength\fP, int\fI stride\fP, INCLUDE 'mpif.h' MPI_TYPE_VECTOR(\fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR\fP) - INTEGER \fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE\fP - INTEGER \fINEWTYPE, IERROR\fP + INTEGER \fICOUNT, BLOCKLENGTH, STRIDE, OLDTYPE\fP + INTEGER \fINEWTYPE, IERROR\fP .fi .SH C++ Syntax .nf #include -Datatype Datatype::Create_vector(int \fIcount\fP, int \fIblocklength\fP, +Datatype Datatype::Create_vector(int \fIcount\fP, int \fIblocklength\fP, int \fIstride\fP) const .fi .SH INPUT PARAMETERS .ft R .TP 1i -count +count Number of blocks (nonnegative integer). .TP 1i -blocklength +blocklength Number of elements in each block (nonnegative integer). .TP 1i -stride +stride Number of elements between start of each block (integer). .TP 1i -oldtype +oldtype Old datatype (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -newtype +newtype New datatype (handle). .sp .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R The function MPI_Type_vector is a general constructor that allows replication of a datatype into locations that consist of equally spaced blocks. Each block is obtained by concatenating the same number of copies of the old datatype. The spacing between blocks is a multiple of the extent of the old datatype. .sp -\fBExample 1:\fP Assume, again, that oldtype has type map {(double, 0), (char, 8)}, with extent 16. A call to MPI_Type_vector(2, 3, 4, oldtype, newtype) will create the datatype with type map +\fBExample 1:\fP Assume, again, that oldtype has type map {(double, 0), (char, 8)}, with extent 16. A call to MPI_Type_vector(2, 3, 4, oldtype, newtype) will create the datatype with type map .nf - {(double, 0), (char, 8), (double, 16), (char, 24), - (double, 32), (char, 40), - (double, 64), (char, 72), + {(double, 0), (char, 8), (double, 16), (char, 24), + (double, 32), (char, 40), + (double, 64), (char, 72), (double, 80), (char, 88), (double, 96), (char, 104)} .fi .sp -That is, two blocks with three copies each of the old type, with a stride of 4 elements (4 x 6 bytes) between the blocks. +That is, two blocks with three copies each of the old type, with a stride of 4 elements (4 x 6 bytes) between the blocks. .sp \fBExample 2:\fP A call to MPI_Type_vector(3, 1, -2, oldtype, newtype) will create the datatype .nf - {(double, 0), (char, 8), (double, -32), (char, -24), + {(double, 0), (char, 8), (double, -32), (char, -24), (double, -64), (char, -56)} .fi @@ -91,11 +91,11 @@ with extent ex. Let bl be the blocklength. The newly created datatype has a type {(type(0), disp(0)), ..., (type(n-1), disp(n-1)), (type(0), disp(0) + ex), ..., (type(n-1), disp(n-1) + ex), ..., - (type(0), disp(0) + (bl -1) * ex),..., + (type(0), disp(0) + (bl -1) * ex),..., (type(n-1), disp(n-1) + (bl -1)* ex), - (type(0), disp(0) + stride * ex),..., (type(n-1), + (type(0), disp(0) + stride * ex),..., (type(n-1), disp(n-1) + stride * ex), ..., - (type(0), disp(0) + (stride + bl - 1) * ex), ..., + (type(0), disp(0) + (stride + bl - 1) * ex), ..., (type(n-1), disp(n-1) + (stride + bl -1) * ex), ..., (type(0), disp(0) + stride * (count -1) * ex), ..., (type(n-1), disp(n-1) + stride * (count -1) * ex), ..., @@ -109,7 +109,7 @@ A call to MPI_Type_contiguous(count, oldtype, newtype) is equivalent to a call t Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Unpack.3in b/ompi/mpi/man/man3/MPI_Unpack.3in index 00ecf22f095..9e8d558b719 100644 --- a/ompi/mpi/man/man3/MPI_Unpack.3in +++ b/ompi/mpi/man/man3/MPI_Unpack.3in @@ -14,86 +14,86 @@ .nf #include int MPI_Unpack(const void *\fIinbuf\fP, int\fI insize\fP, int\fI *position\fP, - void\fI *outbuf\fP, int\fI outcount\fP, MPI_Datatype\fI datatype\fP, + void\fI *outbuf\fP, int\fI outcount\fP, MPI_Datatype\fI datatype\fP, MPI_Comm\fI comm\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_UNPACK(\fIINBUF, INSIZE, POSITION, OUTBUF, OUTCOUNT, +MPI_UNPACK(\fIINBUF, INSIZE, POSITION, OUTBUF, OUTCOUNT, DATATYPE, COMM, IERROR\fP) \fIINBUF(*), OUTBUF(*)\fP - INTEGER \fIINSIZE, POSITION, OUTCOUNT, DATATYPE, - COMM, IERROR\fP + INTEGER \fIINSIZE, POSITION, OUTCOUNT, DATATYPE, + COMM, IERROR\fP .fi .SH C++ Syntax .nf #include -void Datatype::Unpack(const void* \fIinbuf\fP, int \fIinsize\fP, - void *\fIoutbuf\fP, int \fIoutcount\fP, int& \fIposition\fP, +void Datatype::Unpack(const void* \fIinbuf\fP, int \fIinsize\fP, + void *\fIoutbuf\fP, int \fIoutcount\fP, int& \fIposition\fP, const Comm& \fIcomm\fP) const .fi .SH INPUT PARAMETERS .ft R .TP 1i -inbuf +inbuf Input buffer start (choice). .TP 1i -insize +insize Size of input buffer, in bytes (integer). .TP 1i -outcount +outcount Number of items to be unpacked (integer). .TP 1i -datatype +datatype Datatype of each output data item (handle). .TP 1i -comm +comm Communicator for packed message (handle). .sp .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -position +position Current position in bytes (integer). .SH OUTPUT PARAMETERS .ft R .TP 1i -outbuf +outbuf Output buffer start (choice). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Unpacks a message into the receive buffer specified by outbuf, outcount, datatype from the buffer space specified by inbuf and insize. The output buffer can be any communication buffer allowed in MPI_Recv. The input buffer is a contiguous storage area containing insize bytes, starting at address inbuf. The input value of position is the first location in the input buffer occupied by the packed message. \fIposition\fP is incremented by the size of the packed message, so that the output value of position is the first location in the input buffer after the locations occupied by the message that was unpacked. \fIcomm\fP is the communicator used to receive the packed message. +Unpacks a message into the receive buffer specified by outbuf, outcount, datatype from the buffer space specified by inbuf and insize. The output buffer can be any communication buffer allowed in MPI_Recv. The input buffer is a contiguous storage area containing insize bytes, starting at address inbuf. The input value of position is the first location in the input buffer occupied by the packed message. \fIposition\fP is incremented by the size of the packed message, so that the output value of position is the first location in the input buffer after the locations occupied by the message that was unpacked. \fIcomm\fP is the communicator used to receive the packed message. .SH NOTES Note the difference between MPI_Recv and MPI_Unpack: In MPI_Recv, the \fIcount\fP argument specifies the maximum number of items that can be received. The actual number of items received is determined by the length of the incoming message. In MPI_Unpack, the count argument specifies the actual number of items that are to be unpacked; the "size" of the corresponding message is the increment in position. The reason for this change is that the "incoming message size" is not predetermined since the user decides how much to unpack; nor is it easy to determine the "message size" from the number of items to be unpacked. .sp -To understand the behavior of pack and unpack, it is convenient to think of the data part of a message as being the sequence obtained by concatenating the successive values sent in that message. The pack operation stores this sequence in the buffer space, as if sending the message to that buffer. The unpack operation retrieves this sequence from buffer space, as if receiving a message from that buffer. (It is helpful to think of internal Fortran files or sscanf in C for a similar function.) +To understand the behavior of pack and unpack, it is convenient to think of the data part of a message as being the sequence obtained by concatenating the successive values sent in that message. The pack operation stores this sequence in the buffer space, as if sending the message to that buffer. The unpack operation retrieves this sequence from buffer space, as if receiving a message from that buffer. (It is helpful to think of internal Fortran files or sscanf in C for a similar function.) .sp Several messages can be successively packed into one packing unit. This is effected by several successive related calls to MPI_Pack, where the first call provides position = 0, and each successive call inputs the value of position that was output by the previous call, and the same values for outbuf, outcount, and comm. This packing unit now contains the equivalent information that would have been stored in a message by one send call with a send buffer that is the "concatenation" of the individual send buffers. .sp -A packing unit can be sent using type MPI_Packed. Any point-to-point or collective communication function can be used to move the sequence of bytes that forms the packing unit from one process to another. This packing unit can now be received using any receive operation, with any datatype: The type-matching rules are relaxed for messages sent with type MPI_Packed. +A packing unit can be sent using type MPI_Packed. Any point-to-point or collective communication function can be used to move the sequence of bytes that forms the packing unit from one process to another. This packing unit can now be received using any receive operation, with any datatype: The type-matching rules are relaxed for messages sent with type MPI_Packed. .sp A message sent with any type (including MPI_Packed) can be received using the type MPI_Packed. Such a message can then be unpacked by calls to MPI_Unpack. .sp A packing unit (or a message created by a regular, "typed" send) can be unpacked into several successive messages. This is effected by several successive related calls to MPI_Unpack, where the first call provides position = 0, and each successive call inputs the value of position that was output by the previous call, and the same values for inbuf, insize, and comm. .sp -The concatenation of two packing units is not necessarily a packing unit; nor is a substring of a packing unit necessarily a packing unit. Thus, one cannot concatenate two packing units and then unpack the result as one packing unit; nor can one unpack a substring of a packing unit as a separate packing unit. Each packing unit that was created by a related sequence of pack calls or by a regular send must be unpacked as a unit, by a sequence of related unpack calls. +The concatenation of two packing units is not necessarily a packing unit; nor is a substring of a packing unit necessarily a packing unit. Thus, one cannot concatenate two packing units and then unpack the result as one packing unit; nor can one unpack a substring of a packing unit as a separate packing unit. Each packing unit that was created by a related sequence of pack calls or by a regular send must be unpacked as a unit, by a sequence of related unpack calls. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R diff --git a/ompi/mpi/man/man3/MPI_Unpack_external.3in b/ompi/mpi/man/man3/MPI_Unpack_external.3in index 8cd584fc15c..76c038e1ed0 100644 --- a/ompi/mpi/man/man3/MPI_Unpack_external.3in +++ b/ompi/mpi/man/man3/MPI_Unpack_external.3in @@ -49,33 +49,33 @@ datarep Data Representation (string). .ft R .TP 1i -inbuf +inbuf Input buffer start (choice). .TP 1i -insize +insize Size of input buffer, in bytes (integer). .TP 1i -outcount +outcount Number of items to be unpacked (integer). .TP 1i -datatype +datatype Datatype of each output data item (handle). .SH INPUT/OUTPUT PARAMETER .ft R .TP 1i -position +position Current position in buffer, in bytes (integer). .SH OUTPUT PARAMETERS .ft R .TP 1i -outbuf +outbuf Output buffer start (choice). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R diff --git a/ompi/mpi/man/man3/MPI_Unpublish_name.3in b/ompi/mpi/man/man3/MPI_Unpublish_name.3in index edd5f5b16cb..dc8a92704d8 100644 --- a/ompi/mpi/man/man3/MPI_Unpublish_name.3in +++ b/ompi/mpi/man/man3/MPI_Unpublish_name.3in @@ -78,7 +78,7 @@ ompi_global_scope bool If set to true, unpublish the name from .fi -.sp +.sp \fIbool\fP info keys are actually strings but are evaluated as follows: if the string value is a number, it is converted to an integer and cast to a boolean (meaning that zero integers are false @@ -116,7 +116,7 @@ called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not -guarantee that an MPI program can continue past an error. +guarantee that an MPI program can continue past an error. .sp See the MPI man page for a full list of MPI error codes. diff --git a/ompi/mpi/man/man3/MPI_Wait.3in b/ompi/mpi/man/man3/MPI_Wait.3in index 8d68464fdb8..658a699e113 100644 --- a/ompi/mpi/man/man3/MPI_Wait.3in +++ b/ompi/mpi/man/man3/MPI_Wait.3in @@ -18,7 +18,7 @@ int MPI_Wait(MPI_Request *\fIrequest\fP, MPI_Status\fI *status\fP) .nf INCLUDE 'mpif.h' MPI_WAIT(\fIREQUEST, STATUS, IERROR\fP) - INTEGER \fIREQUEST, STATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fIREQUEST, STATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax @@ -26,51 +26,51 @@ MPI_WAIT(\fIREQUEST, STATUS, IERROR\fP) #include void Request::Wait(Status& \fIstatus\fP) -void Request::Wait() +void Request::Wait() .fi .SH INPUT PARAMETER .ft R .TP 1i -request +request Request (handle). .sp .SH OUTPUT PARAMETERS .ft R .TP 1i -status +status Status object (status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -A call to MPI_Wait returns when the operation identified by request is complete. If the communication object associated with this request was created by a nonblocking send or receive call, then the object is deallocated by the call to MPI_Wait and the request handle is set to MPI_REQUEST_NULL. +A call to MPI_Wait returns when the operation identified by request is complete. If the communication object associated with this request was created by a nonblocking send or receive call, then the object is deallocated by the call to MPI_Wait and the request handle is set to MPI_REQUEST_NULL. .sp The call returns, in status, information on the completed operation. The content of the status object for a receive operation can be accessed as described in Section 3.2.5 of the MPI-1 Standard, "Return Status." The status object for a send operation may be queried by a call to MPI_Test_cancelled (see Section 3.8 of the MPI-1 Standard, "Probe and Cancel"). .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .sp -One is allowed to call MPI_Wait with a null or inactive request argument. In this case the operation returns immediately with empty status. +One is allowed to call MPI_Wait with a null or inactive request argument. In this case the operation returns immediately with empty status. .SH NOTES -Successful return of MPI_Wait after an MPI_Ibsend implies that the user send buffer can be reused i.e., data has been sent out or copied into a buffer attached with MPI_Buffer_attach. Note that, at this point, we can no longer cancel the send (for more information, see Section 3.8 of the MPI-1 Standard, "Probe and Cancel"). If a matching receive is never posted, then the buffer cannot be freed. This runs somewhat counter to the stated goal of MPI_Cancel (always being able to free program space that was committed to the communication subsystem). +Successful return of MPI_Wait after an MPI_Ibsend implies that the user send buffer can be reused i.e., data has been sent out or copied into a buffer attached with MPI_Buffer_attach. Note that, at this point, we can no longer cancel the send (for more information, see Section 3.8 of the MPI-1 Standard, "Probe and Cancel"). If a matching receive is never posted, then the buffer cannot be freed. This runs somewhat counter to the stated goal of MPI_Cancel (always being able to free program space that was committed to the communication subsystem). .sp -Example: Simple usage of nonblocking operations and MPI_Wait. +Example: Simple usage of nonblocking operations and MPI_Wait. .sp .nf - CALL MPI_COMM_RANK(comm, rank, ierr) - IF(rank.EQ.0) THEN - CALL MPI_ISEND(a(1), 10, MPI_REAL, 1, tag, comm, request, ierr) - **** do some computation **** - CALL MPI_WAIT(request, status, ierr) - ELSE - CALL MPI_IRECV(a(1), 15, MPI_REAL, 0, tag, comm, request, ierr) - **** do some computation **** - CALL MPI_WAIT(request, status, ierr) - END IF + CALL MPI_COMM_RANK(comm, rank, ierr) + IF(rank.EQ.0) THEN + CALL MPI_ISEND(a(1), 10, MPI_REAL, 1, tag, comm, request, ierr) + **** do some computation **** + CALL MPI_WAIT(request, status, ierr) + ELSE + CALL MPI_IRECV(a(1), 15, MPI_REAL, 0, tag, comm, request, ierr) + **** do some computation **** + CALL MPI_WAIT(request, status, ierr) + END IF .fi .SH ERRORS diff --git a/ompi/mpi/man/man3/MPI_Waitall.3in b/ompi/mpi/man/man3/MPI_Waitall.3in index d86f69f2182..e3834036299 100644 --- a/ompi/mpi/man/man3/MPI_Waitall.3in +++ b/ompi/mpi/man/man3/MPI_Waitall.3in @@ -21,14 +21,14 @@ int MPI_Waitall(int \fIcount\fP, MPI_Request\fI array_of_requests[]\fP, INCLUDE 'mpif.h' MPI_WAITALL(\fICOUNT, ARRAY_OF_REQUESTS, ARRAY_OF_STATUSES, IERROR\fP) INTEGER \fICOUNT, ARRAY_OF_REQUESTS(*)\fP - INTEGER \fIARRAY_OF_STATUSES(MPI_STATUS_SIZE,*), IERROR\fP + INTEGER \fIARRAY_OF_STATUSES(MPI_STATUS_SIZE,*), IERROR\fP .fi .SH C++ Syntax .nf #include -static void Request::Waitall(int \fIcount\fP, Request \fIarray_of_requests\fP[], - Status \fIarray_of_statuses\fP[]) +static void Request::Waitall(int \fIcount\fP, Request \fIarray_of_requests\fP[], + Status \fIarray_of_statuses\fP[]) static void Request::Waitall(int \fIcount\fP, Request \fIarray_of_requests\fP[]) @@ -36,7 +36,7 @@ static void Request::Waitall(int \fIcount\fP, Request \fIarray_of_requests\fP[]) .SH INPUT PARAMETERS .ft R .TP 1i -count +count Lists length (integer). .TP 1i array_of_requests @@ -45,22 +45,22 @@ Array of requests (array of handles). .SH OUTPUT PARAMETERS .ft R .TP 1i -array_of_statuses +array_of_statuses Array of status objects (array of status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Blocks until all communication operations associated with active handles in the list complete, and returns the status of all these operations (this includes the case where no handle in the list is active). Both arrays have the same number of valid entries. The ith entry in array_of_statuses is set to the return status of the ith operation. Requests that were created by nonblocking communication operations are deallocated, and the corresponding handles in the array are set to MPI_REQUEST_NULL. The list may contain null or inactive handles. The call sets to empty the status of each such entry. +Blocks until all communication operations associated with active handles in the list complete, and returns the status of all these operations (this includes the case where no handle in the list is active). Both arrays have the same number of valid entries. The ith entry in array_of_statuses is set to the return status of the ith operation. Requests that were created by nonblocking communication operations are deallocated, and the corresponding handles in the array are set to MPI_REQUEST_NULL. The list may contain null or inactive handles. The call sets to empty the status of each such entry. .sp The error-free execution of MPI_Waitall(count, array_of_requests, array_of_statuses) has the same effect as the execution of MPI_Wait(&array_of_request[i], &array_of_statuses[i]), for i=0,...,count-1, in some arbitrary order. MPI_Waitall with an array of length 1 is equivalent to MPI_Wait. .sp -When one or more of the communications completed by a call to MPI_Waitall fail, it is desirable to return specific information on each communication. The function MPI_Waitall will return in such case the error code MPI_ERR_IN_STATUS and will set the error field of each status to a specific error code. This code will be MPI_SUCCESS if the specific communication completed; it will be another specific error code if it failed; or it can be MPI_ERR_PENDING if it has neither failed nor completed. The function MPI_Waitall will return MPI_SUCCESS if no request had an error, or will return another error code if it failed for other reasons (such as invalid arguments). In such cases, it will not update the error fields of the statuses. +When one or more of the communications completed by a call to MPI_Waitall fail, it is desirable to return specific information on each communication. The function MPI_Waitall will return in such case the error code MPI_ERR_IN_STATUS and will set the error field of each status to a specific error code. This code will be MPI_SUCCESS if the specific communication completed; it will be another specific error code if it failed; or it can be MPI_ERR_PENDING if it has neither failed nor completed. The function MPI_Waitall will return MPI_SUCCESS if no request had an error, or will return another error code if it failed for other reasons (such as invalid arguments). In such cases, it will not update the error fields of the statuses. .sp -If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. +If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. .SH ERRORS For each invocation of MPI_Waitall, if one or more requests generate diff --git a/ompi/mpi/man/man3/MPI_Waitany.3in b/ompi/mpi/man/man3/MPI_Waitany.3in index d43c0bea7f3..08cca9d0fdd 100644 --- a/ompi/mpi/man/man3/MPI_Waitany.3in +++ b/ompi/mpi/man/man3/MPI_Waitany.3in @@ -20,13 +20,13 @@ int MPI_Waitany(int \fIcount\fP, MPI_Request\fI array_of_requests[]\fP, INCLUDE 'mpif.h' MPI_WAITANY(\fICOUNT, ARRAY_OF_REQUESTS, INDEX, STATUS, IERROR\fP) INTEGER \fICOUNT, ARRAY_OF_REQUESTS(*), INDEX\fP - INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP + INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP .fi .SH C++ Syntax .nf #include -static int Request::Waitany(int \fIcount\fP, Request +static int Request::Waitany(int \fIcount\fP, Request \fIarray_of_requests\fP[], Status& \fIstatus\fP) static int Request::Waitany(int \fIcount\fP, Request \fIarray_of_requests\fP[]) @@ -35,7 +35,7 @@ static int Request::Waitany(int \fIcount\fP, Request \fIarray_of_requests\fP[]) .SH INPUT PARAMETERS .ft R .TP 1i -count +count List length (integer). .TP 1i array_of_requests @@ -45,50 +45,50 @@ Array of requests (array of handles). .SH OUTPUT PARAMETERS .ft R .TP 1i -index +index Index of handle for operation that completed (integer). In the range 0 to count-1. In Fortran, the range is 1 to count. .TP 1i -status +status Status object (status). .sp .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -A call to MPI_Waitany can be used to wait for the completion of one out of several requests. +A call to MPI_Waitany can be used to wait for the completion of one out of several requests. .sp -The array_of_requests list may contain null or inactive handles. If the list contains no active handles (list has length zero or all entries are null or inactive), then the call returns immediately with index = MPI_UNDEFINED, and an empty status. +The array_of_requests list may contain null or inactive handles. If the list contains no active handles (list has length zero or all entries are null or inactive), then the call returns immediately with index = MPI_UNDEFINED, and an empty status. .sp The execution of MPI_Waitany(count, array_of_requests, index, status) has the same effect as the execution of MPI_Wait(&array_of_requests[i], status), where i is the value returned by index (unless the value of index is MPI_UNDEFINED). MPI_Waitany with an array containing one active entry is equivalent to MPI_Wait. .sp -If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. +If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument. .sp -\fBExample:\fR Client-server code (starvation can occur). +\fBExample:\fR Client-server code (starvation can occur). .sp .nf - CALL MPI_COMM_SIZE(comm, size, ierr) - CALL MPI_COMM_RANK(comm, rank, ierr) - IF(rank .GT 0) THEN ! client code - DO WHILE(.TRUE.) - CALL MPI_ISEND(a, n, MPI_REAL, 0, tag, comm, request, ierr) - CALL MPI_WAIT(request, status, ierr) - END DO - ELSE ! rank=0 -- server code - DO i=1, size-1 - CALL MPI_IRECV(a(1,i), n, MPI_REAL, i tag, - comm, request_list(i), ierr) - END DO - DO WHILE(.TRUE.) - CALL MPI_WAITANY(size-1, request_list, index, status, ierr) - CALL DO_SERVICE(a(1,index)) ! handle one message - CALL MPI_IRECV(a(1, index), n, MPI_REAL, index, tag, - comm, request_list(index), ierr) - END DO - END IF + CALL MPI_COMM_SIZE(comm, size, ierr) + CALL MPI_COMM_RANK(comm, rank, ierr) + IF(rank .GT 0) THEN ! client code + DO WHILE(.TRUE.) + CALL MPI_ISEND(a, n, MPI_REAL, 0, tag, comm, request, ierr) + CALL MPI_WAIT(request, status, ierr) + END DO + ELSE ! rank=0 -- server code + DO i=1, size-1 + CALL MPI_IRECV(a(1,i), n, MPI_REAL, i tag, + comm, request_list(i), ierr) + END DO + DO WHILE(.TRUE.) + CALL MPI_WAITANY(size-1, request_list, index, status, ierr) + CALL DO_SERVICE(a(1,index)) ! handle one message + CALL MPI_IRECV(a(1, index), n, MPI_REAL, index, tag, + comm, request_list(index), ierr) + END DO + END IF .fi .sp diff --git a/ompi/mpi/man/man3/MPI_Waitsome.3in b/ompi/mpi/man/man3/MPI_Waitsome.3in index ba09f37e1ce..273ab0f1b5e 100644 --- a/ompi/mpi/man/man3/MPI_Waitsome.3in +++ b/ompi/mpi/man/man3/MPI_Waitsome.3in @@ -31,78 +31,78 @@ MPI_WAITSOME(\fIINCOUNT, ARRAY_OF_REQUESTS, OUTCOUNT, .SH C++ Syntax .nf #include -static int Request::Waitsome(int \fIincount\fP, Request - \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[], Status \fIarray_of_statuses\fP[]) +static int Request::Waitsome(int \fIincount\fP, Request + \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[], Status \fIarray_of_statuses\fP[]) -static int Request::Waitsome(int \fIincount\fP, Request - \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[]) +static int Request::Waitsome(int \fIincount\fP, Request + \fIarray_of_requests\fP[], int \fIarray_of_indices\fP[]) .fi .SH INPUT PARAMETERS .ft R .TP 1i -incount +incount Length of array_of_requests (integer). .TP 1i -array_of_requests +array_of_requests Array of requests (array of handles). .SH OUTPUT PARAMETERS .ft R .TP 1i -outcount +outcount Number of completed requests (integer). .TP 1i -array_of_indices +array_of_indices Array of indices of operations that completed (array of integers). .TP 1i -array_of_statuses +array_of_statuses Array of status objects for operations that completed (array of status). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -Waits until at least one of the operations associated with active handles in the list have completed. Returns in outcount the number of requests from the list array_of_requests that have completed. Returns in the first outcount locations of the array array_of_indices the indices of these operations (index within the array array_of_requests; the array is indexed from 0 in C and from 1 in Fortran). Returns in the first outcount locations of the array array_of_status the status for these completed operations. If a request that completed was allocated by a nonblocking communication call, then it is deallocated, and the associated handle is set to MPI_REQUEST_NULL. +Waits until at least one of the operations associated with active handles in the list have completed. Returns in outcount the number of requests from the list array_of_requests that have completed. Returns in the first outcount locations of the array array_of_indices the indices of these operations (index within the array array_of_requests; the array is indexed from 0 in C and from 1 in Fortran). Returns in the first outcount locations of the array array_of_status the status for these completed operations. If a request that completed was allocated by a nonblocking communication call, then it is deallocated, and the associated handle is set to MPI_REQUEST_NULL. .sp -If the list contains no active handles, then the call returns immediately with outcount = MPI_UNDEFINED. +If the list contains no active handles, then the call returns immediately with outcount = MPI_UNDEFINED. .sp -When one or more of the communications completed by MPI_Waitsome fails, then it is desirable to return specific information on each communication. The arguments outcount, array_of_indices, and array_of_statuses will be adjusted to indicate completion of all communications that have succeeded or failed. The call will return the error code MPI_ERR_IN_STATUS and the error field of each status returned will be set to indicate success or to indicate the specific error that occurred. The call will return MPI_SUCCESS if no request resulted in an error, and will return another error code if it failed for other reasons (such as invalid arguments). In such cases, it will not update the error fields of the statuses. +When one or more of the communications completed by MPI_Waitsome fails, then it is desirable to return specific information on each communication. The arguments outcount, array_of_indices, and array_of_statuses will be adjusted to indicate completion of all communications that have succeeded or failed. The call will return the error code MPI_ERR_IN_STATUS and the error field of each status returned will be set to indicate success or to indicate the specific error that occurred. The call will return MPI_SUCCESS if no request resulted in an error, and will return another error code if it failed for other reasons (such as invalid arguments). In such cases, it will not update the error fields of the statuses. .sp -If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. -.sp -\fBExample:\fR Same code as the example in the MPI_Waitany man page, but using MPI_Waitsome. +If your application does not need to examine the \fIarray_of_statuses\fP field, you can save resources by using the predefined constant MPI_STATUSES_IGNORE can be used as a special value for the \fIarray_of_statuses\fP argument. +.sp +\fBExample:\fR Same code as the example in the MPI_Waitany man page, but using MPI_Waitsome. .sp .nf - CALL MPI_COMM_SIZE(comm, size, ierr) - CALL MPI_COMM_RANK(comm, rank, ierr) - IF(rank .GT. 0) THEN ! client code - DO WHILE(.TRUE.) - CALL MPI_ISEND(a, n, MPI_REAL, 0, tag, comm, request, ierr) - CALL MPI_WAIT(request, status, ierr) - END DO - ELSE ! rank=0 -- server code - DO i=1, size-1 - CALL MPI_IRECV(a(1,i), n, MPI_REAL, i, tag, - comm, requests(i), ierr) - END DO - DO WHILE(.TRUE.) - CALL MPI_WAITSOME(size, request_list, numdone, - indices, statuses, ierr) - DO i=1, numdone - CALL DO_SERVICE(a(1, indices(i))) - CALL MPI_IRECV(a(1, indices(i)), n, MPI_REAL, 0, tag, - comm, requests(indices(i)), ierr) - END DO - END DO + CALL MPI_COMM_SIZE(comm, size, ierr) + CALL MPI_COMM_RANK(comm, rank, ierr) + IF(rank .GT. 0) THEN ! client code + DO WHILE(.TRUE.) + CALL MPI_ISEND(a, n, MPI_REAL, 0, tag, comm, request, ierr) + CALL MPI_WAIT(request, status, ierr) + END DO + ELSE ! rank=0 -- server code + DO i=1, size-1 + CALL MPI_IRECV(a(1,i), n, MPI_REAL, i, tag, + comm, requests(i), ierr) + END DO + DO WHILE(.TRUE.) + CALL MPI_WAITSOME(size, request_list, numdone, + indices, statuses, ierr) + DO i=1, numdone + CALL DO_SERVICE(a(1, indices(i))) + CALL MPI_IRECV(a(1, indices(i)), n, MPI_REAL, 0, tag, + comm, requests(indices(i)), ierr) + END DO + END DO END IF .fi .sp .SH NOTES .ft R -The array of indices are in the range 0 to incount-1 for C and in the range 1 to incount for Fortran. +The array of indices are in the range 0 to incount-1 for C and in the range 1 to incount for Fortran. .SH ERRORS For each invocation of MPI_Waitsome, if one or more requests generate diff --git a/ompi/mpi/man/man3/MPI_Win_call_errhandler.3in b/ompi/mpi/man/man3/MPI_Win_call_errhandler.3in index 2c109e13afa..38a5eed882b 100644 --- a/ompi/mpi/man/man3/MPI_Win_call_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Win_call_errhandler.3in @@ -15,14 +15,14 @@ error handler assigned to a window .SH C Syntax .nf #include -int MPI_Win_call_errhandler(MPI_Win \fIwin\fP, int \fIerrorcode\fP) +int MPI_Win_call_errhandler(MPI_Win \fIwin\fP, int \fIerrorcode\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_CALL_ERRHANDLER(\fIWIN, ERRORCODE, IERROR\fP) - INTEGER \fIWIN, ERRORCODE, IERROR\fP +MPI_WIN_CALL_ERRHANDLER(\fIWIN, ERRORCODE, IERROR\fP) + INTEGER \fIWIN, ERRORCODE, IERROR\fP .fi .SH C++ Syntax @@ -45,7 +45,7 @@ MPI error code (integer). .ft R .TP 1.4i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R diff --git a/ompi/mpi/man/man3/MPI_Win_complete.3in b/ompi/mpi/man/man3/MPI_Win_complete.3in index fd5639d2428..9863b7e4d58 100644 --- a/ompi/mpi/man/man3/MPI_Win_complete.3in +++ b/ompi/mpi/man/man3/MPI_Win_complete.3in @@ -24,7 +24,7 @@ MPI_WIN_COMPLETE(WIN, IERROR) .SH C++ Syntax .nf #include -void MPI::Win::Complete() const +void MPI::Win::Complete() const .fi .SH INPUT PARAMETERS @@ -37,7 +37,7 @@ Window object (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -48,7 +48,7 @@ MPI_Win_complete is a one-sided MPI communication synchronization call, completi Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_start diff --git a/ompi/mpi/man/man3/MPI_Win_create.3in b/ompi/mpi/man/man3/MPI_Win_create.3in index fe48bcf98ca..e3b5763d1c8 100644 --- a/ompi/mpi/man/man3/MPI_Win_create.3in +++ b/ompi/mpi/man/man3/MPI_Win_create.3in @@ -12,7 +12,7 @@ .SH C Syntax .nf #include -MPI_Win_create(void *\fIbase\fP, MPI_Aint \fIsize\fP, int \fIdisp_unit\fP, +MPI_Win_create(void *\fIbase\fP, MPI_Aint \fIsize\fP, int \fIdisp_unit\fP, MPI_Info \fIinfo\fP, MPI_Comm \fIcomm\fP, MPI_Win *\fIwin\fP) .fi @@ -28,8 +28,8 @@ MPI_WIN_CREATE(\fIBASE, SIZE, DISP_UNIT, INFO, COMM, WIN, IERROR\fP) .SH C++ Syntax .nf #include -static MPI::Win MPI::Win::Create(const void* \fIbase\fP, - MPI::Aint \fIsize\fP, int \fIdisp_unit\fP, const +static MPI::Win MPI::Win::Create(const void* \fIbase\fP, + MPI::Aint \fIsize\fP, int \fIdisp_unit\fP, const MPI::Info& \fIinfo\fP, const MPI::Intracomm& \fIcomm\fP) .fi @@ -55,10 +55,10 @@ Communicator (handle). .ft R .TP 1i win -Window object returned by the call (handle). +Window object returned by the call (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -71,12 +71,12 @@ The displacement unit argument is provided to facilitate address arithmetic in R The following info keys are supported: .ft R .TP 1i -no_locks +no_locks If set to \fItrue\fP, then the implementation may assume that the local window is never locked (by a call to MPI_Win_lock or MPI_Win_lock_all). Setting this value if only active synchronization may allow the implementation to enable certain optimizations. -.sp +.sp .TP 1i accumulate_ordering By default, accumulate operations from one initiator to one target on @@ -87,7 +87,7 @@ required orderings consisting of \fIrar\fP, \fIwar\fP, \fIraw\fP, and \fIwaw\fP read-after-read, write-after-read, read-after-write, and write-after-write, respectively. Looser ordering constraints are likely to result in improved performance. -.sp +.sp .TP 1i accumulate_ops If set to \fIsame_op\fP, the implementation will assume that all concurrent @@ -95,14 +95,14 @@ accumulate calls to the same target address will use the same operation. If set to \fIsame_op_no_op\fP, then the implementation will assume that all concurrent accumulate calls to the same target address will use the same operation or MPI_NO_OP. The default is \fIsame_op_no_op\fP. -.sp +.sp .SH NOTES -Common choices for \fIdisp_unit\fP are 1 (no scaling), and (in C syntax) \fIsizeof(type)\fP, for a window that consists of an array of elements of type \fItype\fP. The later choice will allow one to use array indices in RMA calls, and have those scaled correctly to byte displacements, even in a heterogeneous environment. +Common choices for \fIdisp_unit\fP are 1 (no scaling), and (in C syntax) \fIsizeof(type)\fP, for a window that consists of an array of elements of type \fItype\fP. The later choice will allow one to use array indices in RMA calls, and have those scaled correctly to byte displacements, even in a heterogeneous environment. .sp Use memory allocated by MPI_Alloc_mem to guarantee properly aligned window boundaries (such as word, double-word, cache line, page frame, and so on). .sp - + .SH FORTRAN 77 NOTES @@ -122,7 +122,7 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. + - diff --git a/ompi/mpi/man/man3/MPI_Win_create_errhandler.3in b/ompi/mpi/man/man3/MPI_Win_create_errhandler.3in index d917e1f30af..da7588b5b7f 100644 --- a/ompi/mpi/man/man3/MPI_Win_create_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Win_create_errhandler.3in @@ -12,23 +12,23 @@ .SH C Syntax .nf #include -int MPI_Win_create_errhandler(MPI_Win_errhandler_function *\fIfunction\fP, - MPI_Errhandler *\fIerrhandler\fP) +int MPI_Win_create_errhandler(MPI_Win_errhandler_function *\fIfunction\fP, + MPI_Errhandler *\fIerrhandler\fP) .fi .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_CREATE_ERRHANDLER(\fIFUNCTION, ERRHANDLER, IERROR\fP) - EXTERNAL \fIFUNCTION\fP - INTEGER \fIERRHANDLER, IERROR\fP +MPI_WIN_CREATE_ERRHANDLER(\fIFUNCTION, ERRHANDLER, IERROR\fP) + EXTERNAL \fIFUNCTION\fP + INTEGER \fIERRHANDLER, IERROR\fP .fi .SH C++ Syntax .nf #include static MPI::Errhandler MPI::Win::Create_errhandler(MPI::Win:: - errhandler_function* \fIfunction\fP) + errhandler_function* \fIfunction\fP) .fi .SH DEPRECATED TYPE NAME NOTE @@ -43,7 +43,7 @@ typedefs to the _function names). .ft R .TP 1i function -User-defined error-handling procedure (function). +User-defined error-handling procedure (function). .SH OUTPUT PARAMETERS .ft R @@ -52,17 +52,17 @@ errhandler MPI error handler (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Win_create_errhandler should be, in C, a function of type MPI_Win_errhandler_function, which is defined as +MPI_Win_create_errhandler should be, in C, a function of type MPI_Win_errhandler_function, which is defined as .sp .nf typedef void MPI_Win_errhandler_function(MPI Win *, int *, ...); .fi .sp -The first argument is the window in use, the second is the error code to be returned. +The first argument is the window in use, the second is the error code to be returned. .sp In Fortran, the user routine should be of the form: .sp @@ -81,5 +81,5 @@ typedef void MPI::Win::errhandler_function(MPI::Win &, int *, ...); Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_create_keyval.3in b/ompi/mpi/man/man3/MPI_Win_create_keyval.3in index 8ad742e32a0..1b26bf818d9 100644 --- a/ompi/mpi/man/man3/MPI_Win_create_keyval.3in +++ b/ompi/mpi/man/man3/MPI_Win_create_keyval.3in @@ -12,28 +12,28 @@ .SH C Syntax .nf #include -int MPI_Win_create_keyval(MPI_Win_copy_attr_function *\fIwin_copy_attr_fn\fP, - MPI_Win_delete_attr_function *\fIwin_delete_attr_fn\fP, - int *\fIwin_keyval\fP, void *\fIextra_state\fP) +int MPI_Win_create_keyval(MPI_Win_copy_attr_function *\fIwin_copy_attr_fn\fP, + MPI_Win_delete_attr_function *\fIwin_delete_attr_fn\fP, + int *\fIwin_keyval\fP, void *\fIextra_state\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_WIN_CREATE_KEYVAL(\fIWIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN, - WIN_KEYVAL, EXTRA_STATE, IERROR\fP) - EXTERNAL \fIWIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN\fP - INTEGER \fIWIN_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE\fP +MPI_WIN_CREATE_KEYVAL(\fIWIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN, + WIN_KEYVAL, EXTRA_STATE, IERROR\fP) + EXTERNAL \fIWIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN\fP + INTEGER \fIWIN_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE\fP .fi .SH C++ Syntax .nf #include -static int MPI::Win::Create_keyval(MPI::Win::Copy_attr_function* - \fIwin_copy_attr_fn\fP, - MPI::Win::Delete_attr_function* \fIwin_delete_attr_fn\fP, - void* \fIextra_state\fP) +static int MPI::Win::Create_keyval(MPI::Win::Copy_attr_function* + \fIwin_copy_attr_fn\fP, + MPI::Win::Delete_attr_function* \fIwin_delete_attr_fn\fP, + void* \fIextra_state\fP) .fi .SH INPUT PARAMETERS @@ -43,73 +43,73 @@ win_copy_attr_fn Copy callback function for \fIwin_keyval\fP (function). .TP 1i win_delete_attr_fn -Delete callback function for \fIwin_keyval\fP (function). +Delete callback function for \fIwin_keyval\fP (function). .TP 1i extra_state -Extra state for callback functions. +Extra state for callback functions. .SH OUTPUT PARAMETERS .ft R .TP 1i win_keyval -Key value for future access (integer). +Key value for future access (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -The argument \fIwin_copy_attr_fn\fP may be specified as MPI_WIN_NULL_COPY_FN or MPI_WIN_DUP_FN from either C, C++, or Fortran. MPI_WIN_NULL_COPY_FN is a function that serves only to return \fIflag\fP = 0 and MPI_SUCCESS. MPI_WIN_DUP_FN is a simple-minded copy function that sets \fIflag\fP = 1, returns the value of \fIattribute_val_in\fP in \fIattribute_val_out\fP, and returns MPI_SUCCESS. +The argument \fIwin_copy_attr_fn\fP may be specified as MPI_WIN_NULL_COPY_FN or MPI_WIN_DUP_FN from either C, C++, or Fortran. MPI_WIN_NULL_COPY_FN is a function that serves only to return \fIflag\fP = 0 and MPI_SUCCESS. MPI_WIN_DUP_FN is a simple-minded copy function that sets \fIflag\fP = 1, returns the value of \fIattribute_val_in\fP in \fIattribute_val_out\fP, and returns MPI_SUCCESS. .sp -The argument \fIwin_delete_attr_fn\fP may be specified as MPI_WIN_NULL_DELETE_FN from either C, C++, or Fortran. MPI_WIN_NULL_DELETE_FN is a function that serves only to return MPI_SUCCESS. +The argument \fIwin_delete_attr_fn\fP may be specified as MPI_WIN_NULL_DELETE_FN from either C, C++, or Fortran. MPI_WIN_NULL_DELETE_FN is a function that serves only to return MPI_SUCCESS. .sp The C callback functions are: .sp .nf -typedef int MPI_Win_copy_attr_function(MPI_Win \fIoldwin\fP, int \fIwin_keyval\fP, - void *\fIextra_state\fP, void *\fIattribute_val_in\fP, - void *\fIattribute_val_out\fP, int *\fIflag\fP); +typedef int MPI_Win_copy_attr_function(MPI_Win \fIoldwin\fP, int \fIwin_keyval\fP, + void *\fIextra_state\fP, void *\fIattribute_val_in\fP, + void *\fIattribute_val_out\fP, int *\fIflag\fP); .fi .sp and .sp .nf -typedef int MPI_Win_delete_attr_function(MPI_Win \fIwin\fP, int \fIwin_keyval\fP, - void *\fIattribute_val\fP, void *\fIextra_state\fP); +typedef int MPI_Win_delete_attr_function(MPI_Win \fIwin\fP, int \fIwin_keyval\fP, + void *\fIattribute_val\fP, void *\fIextra_state\fP); .fi .sp The Fortran callback functions are: .sp .nf -SUBROUTINE WIN_COPY_ATTR_FN(\fIOLDWIN, WIN_KEYVAL, EXTRA_STATE, - ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP) - INTEGER \fIOLDWIN, WIN_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, ATTRIBUTE_VAL_IN, - ATTRIBUTE_VAL_OUT\fP - LOGICAL \fIFLAG\fP +SUBROUTINE WIN_COPY_ATTR_FN(\fIOLDWIN, WIN_KEYVAL, EXTRA_STATE, + ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP) + INTEGER \fIOLDWIN, WIN_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, ATTRIBUTE_VAL_IN, + ATTRIBUTE_VAL_OUT\fP + LOGICAL \fIFLAG\fP .fi .sp and .sp .nf -SUBROUTINE WIN_DELETE_ATTR_FN(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL, - EXTRA_STATE, IERROR\fP) - INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL, EXTRA_STATE\fP +SUBROUTINE WIN_DELETE_ATTR_FN(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL, + EXTRA_STATE, IERROR\fP) + INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL, EXTRA_STATE\fP .fi .sp The C++ callbacks are: .sp .nf -typedef int MPI::Win::Copy_attr_function(const MPI::Win& \fIoldwin\fP, - int \fIwin_keyval\fP, void* \fIextra_state\fP, void* \fIattribute_val_in\fP, - void* \fIattribute_val_out\fP, bool& \fIflag\fP); +typedef int MPI::Win::Copy_attr_function(const MPI::Win& \fIoldwin\fP, + int \fIwin_keyval\fP, void* \fIextra_state\fP, void* \fIattribute_val_in\fP, + void* \fIattribute_val_out\fP, bool& \fIflag\fP); .fi .sp and .sp .nf -typedef int MPI::Win::Delete_attr_function(MPI::Win& \fIwin\fP, int \fIwin_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP); +typedef int MPI::Win::Delete_attr_function(MPI::Win& \fIwin\fP, int \fIwin_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP); .fi .SH FORTRAN 77 NOTES @@ -129,5 +129,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_delete_attr.3in b/ompi/mpi/man/man3/MPI_Win_delete_attr.3in index 8777c1549bf..14b591e9127 100644 --- a/ompi/mpi/man/man3/MPI_Win_delete_attr.3in +++ b/ompi/mpi/man/man3/MPI_Win_delete_attr.3in @@ -18,8 +18,8 @@ int MPI_Win_delete_attr(MPI_Win \fIwin\fP, int \fIwin_keyval\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_DELETE_ATTR(\fIWIN, WIN_KEYVAL, IERROR\fP) - INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP +MPI_WIN_DELETE_ATTR(\fIWIN, WIN_KEYVAL, IERROR\fP) + INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP .fi .SH C++ Syntax @@ -32,19 +32,19 @@ void MPI::Win::Delete_attr(int \fIwin_keyval\fP) .ft R .TP 1i win -Window from which the attribute is deleted (handle). +Window from which the attribute is deleted (handle). .SH INPUT PARAMETER .ft R .TP 1i win_keyval -Key value (integer). +Key value (integer). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH NOTES Note that it is not defined by the MPI standard what happens if the @@ -57,5 +57,5 @@ is being invoked. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_fence.3in b/ompi/mpi/man/man3/MPI_Win_fence.3in index 07914931db5..23472a886ee 100644 --- a/ompi/mpi/man/man3/MPI_Win_fence.3in +++ b/ompi/mpi/man/man3/MPI_Win_fence.3in @@ -18,8 +18,8 @@ int MPI_Win_fence(int \fIassert\fP, MPI_Win \fIwin\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_FENCE(\fIASSERT, WIN, IERROR\fP) - INTEGER \fIASSERT, WIN, IERROR\fP +MPI_WIN_FENCE(\fIASSERT, WIN, IERROR\fP) + INTEGER \fIASSERT, WIN, IERROR\fP .fi .SH C++ Syntax @@ -35,24 +35,24 @@ assert Program assertion (integer). .TP 1i win -Window object (handle). +Window object (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Win_fence synchronizes RMA calls on \fIwin\fP. The call is collective on the group of \fIwin\fP. All RMA operations on \fIwin\fP originating at a given process and started before the fence call will complete at that process before the fence call returns. They will be completed at their target before the fence call returns at the target. RMA operations on \fIwin\fP started by a process after the fence call returns will access their target window only after MPI_Win_fence has been called by the target process. +MPI_Win_fence synchronizes RMA calls on \fIwin\fP. The call is collective on the group of \fIwin\fP. All RMA operations on \fIwin\fP originating at a given process and started before the fence call will complete at that process before the fence call returns. They will be completed at their target before the fence call returns at the target. RMA operations on \fIwin\fP started by a process after the fence call returns will access their target window only after MPI_Win_fence has been called by the target process. .sp -The call completes an RMA access epoch if it was preceded by another fence call and the local process issued RMA communication calls on \fIwin\fP between these two calls. The call completes an RMA exposure epoch if it was preceded by another fence call and the local window was the target of RMA accesses between these two calls. The call starts an RMA access epoch if it is followed by another fence call and by RMA communication calls issued between these two fence calls. The call starts an exposure epoch if it is followed by another fence call and the local window is the target of RMA accesses between these two fence calls. Thus, the fence call is equivalent to calls to a subset of \fIpost, start, complete, wait\fP. +The call completes an RMA access epoch if it was preceded by another fence call and the local process issued RMA communication calls on \fIwin\fP between these two calls. The call completes an RMA exposure epoch if it was preceded by another fence call and the local window was the target of RMA accesses between these two calls. The call starts an RMA access epoch if it is followed by another fence call and by RMA communication calls issued between these two fence calls. The call starts an exposure epoch if it is followed by another fence call and the local window is the target of RMA accesses between these two fence calls. Thus, the fence call is equivalent to calls to a subset of \fIpost, start, complete, wait\fP. .sp -A fence call usually entails a barrier synchronization: a process completes a call to MPI_Win_fence only after all other processes in the group have entered their matching call. However, a call to MPI_Win_fence that is known not to end any epoch (in particular, a call with \fIassert\fP = MPI_MODE_NOPRECEDE) does not necessarily act as a barrier. +A fence call usually entails a barrier synchronization: a process completes a call to MPI_Win_fence only after all other processes in the group have entered their matching call. However, a call to MPI_Win_fence that is known not to end any epoch (in particular, a call with \fIassert\fP = MPI_MODE_NOPRECEDE) does not necessarily act as a barrier. .SH NOTE -Calls to MPI_Win_fence should both precede and follow calls to put, get or accumulate that are synchronized with fence calls. +Calls to MPI_Win_fence should both precede and follow calls to put, get or accumulate that are synchronized with fence calls. .sp @@ -60,7 +60,7 @@ Calls to MPI_Win_fence should both precede and follow calls to put, get or accum Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_create diff --git a/ompi/mpi/man/man3/MPI_Win_free.3in b/ompi/mpi/man/man3/MPI_Win_free.3in index 54521d61e0d..a52822fde9e 100644 --- a/ompi/mpi/man/man3/MPI_Win_free.3in +++ b/ompi/mpi/man/man3/MPI_Win_free.3in @@ -32,13 +32,13 @@ void MPI::Win::Free() .ft R .TP 1i win -Window object (handle). +Window object (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -48,7 +48,7 @@ MPI_Win_free frees the window object \fIwin\fP and returns a null handle (equal Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_create diff --git a/ompi/mpi/man/man3/MPI_Win_free_keyval.3in b/ompi/mpi/man/man3/MPI_Win_free_keyval.3in index 71aaf7223bd..1b881c179ca 100644 --- a/ompi/mpi/man/man3/MPI_Win_free_keyval.3in +++ b/ompi/mpi/man/man3/MPI_Win_free_keyval.3in @@ -18,8 +18,8 @@ int MPI_Win_free_keyval(int *\fIwin_keyval\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_FREE_KEYVAL(\fIWIN_KEYVAL, IERROR\fP) - INTEGER \fIWIN_KEYVAL, IERROR\fP +MPI_WIN_FREE_KEYVAL(\fIWIN_KEYVAL, IERROR\fP) + INTEGER \fIWIN_KEYVAL, IERROR\fP .fi .SH C++ Syntax @@ -32,17 +32,17 @@ static void MPI::Win::Free_keyval(int& \fIwin_keyval\fP) .ft R .TP 1i win_keyval -Key value (integer). +Key value (integer). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_get_attr.3in b/ompi/mpi/man/man3/MPI_Win_get_attr.3in index 7a544fb0359..d0d110c746c 100644 --- a/ompi/mpi/man/man3/MPI_Win_get_attr.3in +++ b/ompi/mpi/man/man3/MPI_Win_get_attr.3in @@ -12,30 +12,30 @@ .SH C Syntax .nf #include -int MPI_Win_get_attr(MPI_Win \fIwin\fP, int \fIwin_keyval\fP, - void *\fIattribute_val\fP, int *\fIflag\fP) +int MPI_Win_get_attr(MPI_Win \fIwin\fP, int \fIwin_keyval\fP, + void *\fIattribute_val\fP, int *\fIflag\fP) .fi .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_WIN_GET_ATTR(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR\fP) - INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP - LOGICAL \fIFLAG\fP +MPI_WIN_GET_ATTR(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR\fP) + INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP + LOGICAL \fIFLAG\fP .fi .SH C++ Syntax .nf #include -bool MPI::Win::Get_attr(int win_keyval, void* attribute_val) const +bool MPI::Win::Get_attr(int win_keyval, void* attribute_val) const .fi .SH INPUT PARAMETERS .ft R .TP 1i win -Window to which the attribute is attached (handle). +Window to which the attribute is attached (handle). .TP 1i win_keyval Key value (integer). @@ -47,10 +47,10 @@ attribute_val Attribute value, unless \fIag\fP = false .TP 1i flag -False if no attribute is associated with the key (logical). +False if no attribute is associated with the key (logical). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -62,7 +62,7 @@ the \fIATTRIBUTE_VAL\fP argument only for Fortran 90. FORTRAN 77 users may use the non-portable syntax .sp .nf - INTEGER*MPI_ADDRESS_KIND \fIATTRIBUTE_VAL\fP + INTEGER*MPI_ADDRESS_KIND \fIATTRIBUTE_VAL\fP .fi .sp where MPI_ADDRESS_KIND is a constant defined in mpif.h @@ -72,5 +72,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_get_errhandler.3in b/ompi/mpi/man/man3/MPI_Win_get_errhandler.3in index d75ccd7728e..725bc07b9d9 100644 --- a/ompi/mpi/man/man3/MPI_Win_get_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Win_get_errhandler.3in @@ -18,7 +18,7 @@ int MPI_Win_get_errhandler(MPI_Win \fIwin\fP, MPI_Errhandler *\fIerrhandler\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_GET_ERRHANDLER(\fIWIN, ERRHANDLER, IERROR\fP) +MPI_WIN_GET_ERRHANDLER(\fIWIN, ERRHANDLER, IERROR\fP) INTEGER \fIWIN, ERRHANDLER, IERROR\fP .fi @@ -38,10 +38,10 @@ Window (handle). .ft R .TP 1i errhandler -Error handler currently associated with window (handle). +Error handler currently associated with window (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -51,6 +51,6 @@ MPI_Win_get_errhandler retrieves the error handler currently associated with a w Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_get_group.3in b/ompi/mpi/man/man3/MPI_Win_get_group.3in index 9b8f7bec6ec..7754e761ddc 100644 --- a/ompi/mpi/man/man3/MPI_Win_get_group.3in +++ b/ompi/mpi/man/man3/MPI_Win_get_group.3in @@ -5,7 +5,7 @@ .\" $COPYRIGHT$ .TH MPI_Win_get_group 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Win_get_group\fP \- Returns a duplicate of the group of the communicator used to create the window. +\fBMPI_Win_get_group\fP \- Returns a duplicate of the group of the communicator used to create the window. .SH SYNTAX .ft R @@ -32,24 +32,24 @@ MPI::Group MPI::Win::Get_group() const .ft R .TP 1i win -Window object (handle). +Window object (handle). .SH OUTPUT PARAMETERS .ft R .TP 1i group -Group of processes that share access to the window (handle). +Group of processes that share access to the window (handle). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Win_get_group returns a duplicate of the group of the communicator used to create the window associated with \fIwin\fP. The group is returned in \fIgroup\fP. +MPI_Win_get_group returns a duplicate of the group of the communicator used to create the window associated with \fIwin\fP. The group is returned in \fIgroup\fP. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_get_info.3in b/ompi/mpi/man/man3/MPI_Win_get_info.3in index dd3f0c17cc7..a7e16776a02 100644 --- a/ompi/mpi/man/man3/MPI_Win_get_info.3in +++ b/ompi/mpi/man/man3/MPI_Win_get_info.3in @@ -34,16 +34,16 @@ info_used New info object returned with all active hints on this window. .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). . .SH DESCRIPTION .ft R MPI_Win_get_info returns a new info object containing the hints of -the window associated with -.IR win . +the window associated with +.IR win . The current setting of all hints actually used by the system related -to this window is returned in -.IR info_used . +to this window is returned in +.IR info_used . If no such hints exist, a handle to a newly created info object is returned that contains no key/value pair. The user is responsible for freeing info_used via MPI_Info_free. diff --git a/ompi/mpi/man/man3/MPI_Win_get_name.3in b/ompi/mpi/man/man3/MPI_Win_get_name.3in index 05351662192..10c60f9cfdc 100644 --- a/ompi/mpi/man/man3/MPI_Win_get_name.3in +++ b/ompi/mpi/man/man3/MPI_Win_get_name.3in @@ -18,8 +18,8 @@ int MPI_Win_get_name(MPI_Win \fIwin\fP, char *\fIwin_name\fP, int *\fIresultlen\ .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_GET_NAME(\fIWIN, WIN_NAME, RESULTLEN, IERROR\fP) - INTEGER \fIWIN, RESULTLEN, IERROR\fP +MPI_WIN_GET_NAME(\fIWIN, WIN_NAME, RESULTLEN, IERROR\fP) + INTEGER \fIWIN, RESULTLEN, IERROR\fP CHARACTER*(*) \fIWIN_NAME\fP .fi @@ -33,19 +33,19 @@ void MPI::Win::Get_name(char* \fIwin_name\fP, int& \fIresultlen\fP) const .ft R .TP 1i win -Window whose name is to be returned (handle). +Window whose name is to be returned (handle). .SH OUTPUT PARAMETERS .ft R .TP 1i win_name -the Tame previously stored on the window, or an empty string if no such name exists (string). +the Tame previously stored on the window, or an empty string if no such name exists (string). .TP 1i resultlen -Length of returned name (integer). +Length of returned name (integer). .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -54,6 +54,6 @@ Fortran only: Error status (integer). Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_lock.3in b/ompi/mpi/man/man3/MPI_Win_lock.3in index 5c42fce8012..401dce58cea 100644 --- a/ompi/mpi/man/man3/MPI_Win_lock.3in +++ b/ompi/mpi/man/man3/MPI_Win_lock.3in @@ -19,8 +19,8 @@ int MPI_Win_lock(int \fIlock_type\fP, int \fIrank\fP, int \fIassert\fP, MPI_Win .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_LOCK(\fILOCK_TYPE, RANK, ASSERT, WIN, IERROR\fP) - INTEGER \fILOCK_TYPE, RANK, ASSERT, WIN, IERROR\fP +MPI_WIN_LOCK(\fILOCK_TYPE, RANK, ASSERT, WIN, IERROR\fP) + INTEGER \fILOCK_TYPE, RANK, ASSERT, WIN, IERROR\fP .fi .SH C++ Syntax @@ -33,47 +33,47 @@ void MPI::Win::Lock(int \fIlock_type\fP, int \fIrank\fP, int \fIassert\fP) const .ft R .TP 1i lock_type -Either MPI_LOCK_EXCLUSIVE or MPI_LOCK_SHARED (state). +Either MPI_LOCK_EXCLUSIVE or MPI_LOCK_SHARED (state). .TP 1i rank -Rank of locked window (nonnegative integer). +Rank of locked window (nonnegative integer). .TP 1i assert -Program assertion (integer). +Program assertion (integer). .TP 1i win -Window object (handle). +Window object (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R Starts an RMA access epoch. Locks ensure that only the windows created by specific processes can be accessed by those processes (and by no other processes) during that epoch. .sp -Locks are used to protect accesses to the locked target window effected by RMA calls issued between the lock and unlock call, and to protect local load/store accesses to a locked local window executed between the lock and unlock call. -Accesses that are protected by an exclusive lock will not be concurrent at the window site with other accesses to the same window that are lock protected. Accesses that are protected by a shared lock will not be concurrent at the window site with accesses protected by an exclusive lock to the same window. +Locks are used to protect accesses to the locked target window effected by RMA calls issued between the lock and unlock call, and to protect local load/store accesses to a locked local window executed between the lock and unlock call. +Accesses that are protected by an exclusive lock will not be concurrent at the window site with other accesses to the same window that are lock protected. Accesses that are protected by a shared lock will not be concurrent at the window site with accesses protected by an exclusive lock to the same window. .sp The \fIassert\fP argument is used to provide assertions on the context of the call that may be used for various optimizations. (See Section 6.4.4 of the MPI-2 Standard.) A value of \fIassert\fP = 0 is always valid. .sp -.ft -.SH NOTES +.ft +.SH NOTES .ft R In a client/server environment in which clients connect to a server and create windows that span both the client and the server, if a client or server that has obtained a lock on such a window and then terminates abnormally, the server or other clients -may hang in a MPI_Win_lock call, failing to notice that the peer MPI job +may hang in a MPI_Win_lock call, failing to notice that the peer MPI job has terminated. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_unlock diff --git a/ompi/mpi/man/man3/MPI_Win_post.3in b/ompi/mpi/man/man3/MPI_Win_post.3in index 14bd9e3def6..191acacc252 100644 --- a/ompi/mpi/man/man3/MPI_Win_post.3in +++ b/ompi/mpi/man/man3/MPI_Win_post.3in @@ -45,7 +45,7 @@ Window object (handle) .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION @@ -55,7 +55,7 @@ Starts an RMA exposure epoch for the local window associated with \fIwin\fP. Onl Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_start diff --git a/ompi/mpi/man/man3/MPI_Win_set_attr.3in b/ompi/mpi/man/man3/MPI_Win_set_attr.3in index 0ea79b6ca7e..be68982c6f2 100644 --- a/ompi/mpi/man/man3/MPI_Win_set_attr.3in +++ b/ompi/mpi/man/man3/MPI_Win_set_attr.3in @@ -18,9 +18,9 @@ int MPI_Win_set_attr(MPI_Win \fIwin\fP, int \fIwin_keyval\fP, void *\fIattribute .SH Fortran Syntax (see FORTRAN 77 NOTES) .nf INCLUDE 'mpif.h' -MPI_WIN_SET_ATTR(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL, IERROR\fP) - INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP - INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP +MPI_WIN_SET_ATTR(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL, IERROR\fP) + INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP + INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP .fi .SH C++ Syntax @@ -33,22 +33,22 @@ void MPI::Win::Set_attr(int \fIwin_keyval\fP, const void* \fIattribute_val\fP) .ft R .TP 1i win -Window to which attribute will be attached (handle). +Window to which attribute will be attached (handle). .SH INPUT PARAMETERS .ft R .TP 1i win_keyval -Key value (integer). +Key value (integer). .TP 1i attribute_val -Attribute value. +Attribute value. .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -60,7 +60,7 @@ the \fIATTRIBUTE_VAL\fP argument only for Fortran 90. FORTRAN 77 users may use the non-portable syntax .sp .nf - INTEGER*MPI_ADDRESS_KIND \fIATTRIBUTE_VAL\fP + INTEGER*MPI_ADDRESS_KIND \fIATTRIBUTE_VAL\fP .fi .sp where MPI_ADDRESS_KIND is a constant defined in mpif.h @@ -70,5 +70,5 @@ and gives the length of the declared integer in bytes. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_set_errhandler.3in b/ompi/mpi/man/man3/MPI_Win_set_errhandler.3in index f626e7ffa56..d23e705b2cb 100644 --- a/ompi/mpi/man/man3/MPI_Win_set_errhandler.3in +++ b/ompi/mpi/man/man3/MPI_Win_set_errhandler.3in @@ -18,8 +18,8 @@ int MPI_Win_set_errhandler(MPI_Win \fIwin\fP, MPI_Errhandler \fIerrhandler\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_SET_ERRHANDLER(\fIWIN, ERRHANDLER, IERROR\fP) - INTEGER \fIWIN, ERRHANDLER, IERROR\fP +MPI_WIN_SET_ERRHANDLER(\fIWIN, ERRHANDLER, IERROR\fP) + INTEGER \fIWIN, ERRHANDLER, IERROR\fP .fi .SH C++ Syntax @@ -32,28 +32,28 @@ void MPI::Win::Set_errhandler(const MPI::Errhandler& \fIerrhandler\fP) .ft R .TP 1i win -Window (handle). +Window (handle). .SH INPUT PARAMETER .ft R .TP 1i errhandler -New error handler for window (handle). +New error handler for window (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Win_set_errhandler attaches a new error handler to a window. The error handler must be either a predefined error handler or an error handler created by a call to MPI_Win_create_errhandler. +MPI_Win_set_errhandler attaches a new error handler to a window. The error handler must be either a predefined error handler or an error handler created by a call to MPI_Win_create_errhandler. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_set_info.3in b/ompi/mpi/man/man3/MPI_Win_set_info.3in index 67b0e1d16ee..8a6111b7f8e 100644 --- a/ompi/mpi/man/man3/MPI_Win_set_info.3in +++ b/ompi/mpi/man/man3/MPI_Win_set_info.3in @@ -34,17 +34,17 @@ Info object containing hints to be set on .SH OUTPUT PARAMETERS .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). . .SH DESCRIPTION .ft R MPI_WIN_SET_INFO sets new values for the hints of the window -associated with +associated with .IR win. MPI_WIN_SET_INFO is a collective routine. The info object may be different on each process, but any info entries that an implementation requires to be the same on all processes must appear with the same -value in each process's +value in each process's .I info object. . diff --git a/ompi/mpi/man/man3/MPI_Win_set_name.3in b/ompi/mpi/man/man3/MPI_Win_set_name.3in index 8a5119eed39..05ea4c234ff 100644 --- a/ompi/mpi/man/man3/MPI_Win_set_name.3in +++ b/ompi/mpi/man/man3/MPI_Win_set_name.3in @@ -19,9 +19,9 @@ int MPI_Win_set_name(MPI_Win \fIwin\fP, const char *\fIwin_name\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_SET_NAME(\fIWIN, WIN_NAME, IERROR\fP) - INTEGER \fIWIN, IERROR\fP - CHARACTER*(*) \fIWIN_NAME\fP +MPI_WIN_SET_NAME(\fIWIN, WIN_NAME, IERROR\fP) + INTEGER \fIWIN, IERROR\fP + CHARACTER*(*) \fIWIN_NAME\fP .fi .SH C++ Syntax @@ -34,19 +34,19 @@ void MPI::Win::Set_name(const char* \fIwin_name\fP) .ft R .TP 1i win -Window whose identifier is to be set (handle). +Window whose identifier is to be set (handle). .SH INPUT PARAMETER .ft R .TP 1i win_name -The character string used as the name (string). +The character string used as the name (string). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -55,6 +55,6 @@ Fortran only: Error status (integer). Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. diff --git a/ompi/mpi/man/man3/MPI_Win_start.3in b/ompi/mpi/man/man3/MPI_Win_start.3in index c4f4b3d2a64..fb2f4086255 100644 --- a/ompi/mpi/man/man3/MPI_Win_start.3in +++ b/ompi/mpi/man/man3/MPI_Win_start.3in @@ -44,19 +44,19 @@ Window object (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R MPI_Win_start is a one-sided MPI communication synchronization call that starts an RMA access epoch for \fIwin\fP. RMA calls issued on \fIwin\fP during this epoch must access only windows at processes in \fIgroup\fP. Each process in \fIgroup\fP must issue a matching call to MPI_Win_post. MPI_Win_start -is allowed to block until the corresponding MPI_Win_post calls have been executed, but is not required to. +is allowed to block until the corresponding MPI_Win_post calls have been executed, but is not required to. .sp The \fIassert\fP argument is used to provide assertions on the context of the call that may be used for various optimizations. (See Section 6.4.4 of the MPI-2 Standard.) A value of \fIassert\fP = 0 is always valid. The following assertion value is supported: .sp .TP 1i -MPI_MODE_NOCHECK +MPI_MODE_NOCHECK When this value is passed in to this call, the library assumes that the post call on the target has been called and it is not necessary for the library to check to see if such a call has been made. @@ -65,7 +65,7 @@ for the library to check to see if such a call has been made. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_post diff --git a/ompi/mpi/man/man3/MPI_Win_test.3in b/ompi/mpi/man/man3/MPI_Win_test.3in index cf316106fc8..78dbaa09c8d 100644 --- a/ompi/mpi/man/man3/MPI_Win_test.3in +++ b/ompi/mpi/man/man3/MPI_Win_test.3in @@ -25,7 +25,7 @@ MPI_WIN_TEST(\fI WIN, FLAG, IERROR\fP) .SH C++ Syntax .nf #include -bool MPI::Win::Test() const +bool MPI::Win::Test() const .fi .SH INPUT PARAMETERS @@ -39,7 +39,7 @@ Window object (handle) .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .TP 1i flag The returning state of the test for epoch closure. @@ -47,7 +47,7 @@ The returning state of the test for epoch closure. .SH DESCRIPTION .ft R -MPI_Win_test is a one-sided MPI communication synchronization call, a +MPI_Win_test is a one-sided MPI communication synchronization call, a nonblocking version of MPI_Win_wait. It returns \fIflag = true\fP if MPI_Win_wait would return, \fIflag = false\fP otherwise. The effect of return of MPI_Win_test with \fIflag = true\fP is the same as the effect of a return of MPI_Win_wait. If \fIflag = false\fP is returned, then the call has no visible effect. .sp @@ -59,7 +59,7 @@ the call has returned \fIflag = true\fP, it must not be invoked anew, until the Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_post diff --git a/ompi/mpi/man/man3/MPI_Win_unlock.3in b/ompi/mpi/man/man3/MPI_Win_unlock.3in index 099ad7732f8..5778ab2a737 100644 --- a/ompi/mpi/man/man3/MPI_Win_unlock.3in +++ b/ompi/mpi/man/man3/MPI_Win_unlock.3in @@ -6,7 +6,7 @@ .\" $COPYRIGHT$ .TH MPI_Win_unlock 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME -\fBMPI_Win_unlock\fP \- Completes an RMA access epoch started by a call to MPI_Win_lock. +\fBMPI_Win_unlock\fP \- Completes an RMA access epoch started by a call to MPI_Win_lock. .SH SYNTAX .ft R @@ -19,8 +19,8 @@ int MPI_Win_unlock(int \fIrank\fP, MPI_Win \fIwin\fP) .SH Fortran Syntax .nf INCLUDE 'mpif.h' -MPI_WIN_UNLOCK(\fIRANK, WIN, IERROR\fP) - INTEGER \fIRANK, WIN, IERROR\fP +MPI_WIN_UNLOCK(\fIRANK, WIN, IERROR\fP) + INTEGER \fIRANK, WIN, IERROR\fP .fi .SH C++ Syntax @@ -33,28 +33,28 @@ void MPI::Win::Unlock(int \fIrank\fP) const .ft R .TP 1i rank -Rank of window (nonnegative integer). +Rank of window (nonnegative integer). .TP 1i win -Window object (handle). +Window object (handle). .SH OUTPUT PARAMETER .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R -MPI_Win_unlock completes an RMA access epoch started by a call to MPI_Win_lock. RMA operations issued during this period will have completed both at the origin and at the target when the call returns. +MPI_Win_unlock completes an RMA access epoch started by a call to MPI_Win_lock. RMA operations issued during this period will have completed both at the origin and at the target when the call returns. .sp -Locks are used to protect accesses to the locked target window effected by RMA calls issued between the lock and unlock call, and to protect local load/store accesses to a locked local window executed between the lock and unlock call. Accesses that are protected by an exclusive lock will not be concurrent at the window site with other accesses to the same window that are lock protected. Accesses that are protected by a shared lock will not be concurrent at the window site with accesses protected by an exclusive lock to the same window. +Locks are used to protect accesses to the locked target window effected by RMA calls issued between the lock and unlock call, and to protect local load/store accesses to a locked local window executed between the lock and unlock call. Accesses that are protected by an exclusive lock will not be concurrent at the window site with other accesses to the same window that are lock protected. Accesses that are protected by a shared lock will not be concurrent at the window site with accesses protected by an exclusive lock to the same window. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO MPI_Win_lock diff --git a/ompi/mpi/man/man3/MPI_Win_wait.3in b/ompi/mpi/man/man3/MPI_Win_wait.3in index bd55677b5ba..bb6e8c6fcb4 100644 --- a/ompi/mpi/man/man3/MPI_Win_wait.3in +++ b/ompi/mpi/man/man3/MPI_Win_wait.3in @@ -25,7 +25,7 @@ MPI_WIN_WAIT(\fI WIN, IERROR\fP) .SH C++ Syntax .nf #include -void MPI::Win::Wait() const +void MPI::Win::Wait() const .fi .SH INPUT PARAMETERS @@ -38,7 +38,7 @@ Window object (handle). .ft R .TP 1i IERROR -Fortran only: Error status (integer). +Fortran only: Error status (integer). .SH DESCRIPTION .ft R @@ -54,8 +54,8 @@ call returns, all these RMA accesses will have completed at the target window. Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. .sp Before the error value is returned, the current MPI error handler is -called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. - +called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Win_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. + .SH SEE ALSO MPI_Win_post .br diff --git a/ompi/mpi/man/man3/MPI_Wtick.3in b/ompi/mpi/man/man3/MPI_Wtick.3in index 78c5fe3e7c9..0f4a628859b 100644 --- a/ompi/mpi/man/man3/MPI_Wtick.3in +++ b/ompi/mpi/man/man3/MPI_Wtick.3in @@ -46,7 +46,7 @@ MPI_Wtick. The returned value may be different on Windows platforms. This function does not return an error value. Consequently, the result of calling it before MPI_Init or after MPI_Finalize is undefined. -.SH SEE ALSO +.SH SEE ALSO .ft R .sp MPI_Wtime diff --git a/ompi/mpi/man/man3/MPI_Wtime.3in b/ompi/mpi/man/man3/MPI_Wtime.3in index b41a6bad044..c9c51a5b0f2 100644 --- a/ompi/mpi/man/man3/MPI_Wtime.3in +++ b/ompi/mpi/man/man3/MPI_Wtime.3in @@ -33,34 +33,34 @@ Time in seconds since an arbitrary time in the past. .SH DESCRIPTION .ft R -MPI_Wtime returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past. +MPI_Wtime returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past. .PP -The "time in the past" is guaranteed not to change during the life of the process. The user is responsible for converting large numbers of seconds to other units if they are preferred. +The "time in the past" is guaranteed not to change during the life of the process. The user is responsible for converting large numbers of seconds to other units if they are preferred. .PP -This function is portable (it returns seconds, not "ticks"), it allows high resolution, and carries no unnecessary baggage. One would use it like this: +This function is portable (it returns seconds, not "ticks"), it allows high resolution, and carries no unnecessary baggage. One would use it like this: .sp .nf - { - double starttime, endtime; - starttime = MPI_Wtime(); - \&.... stuff to be timed \&... - endtime = MPI_Wtime(); - printf("That took %f seconds\\n",endtime-starttime); - } + { + double starttime, endtime; + starttime = MPI_Wtime(); + \&.... stuff to be timed \&... + endtime = MPI_Wtime(); + printf("That took %f seconds\\n",endtime-starttime); + } .fi .PP -The times returned are local to the node that called them. There is no requirement that different nodes return the "same" time. -.SH NOTES +The times returned are local to the node that called them. There is no requirement that different nodes return the "same" time. +.SH NOTES The boolean variable MPI_WTIME_IS_GLOBAL, a predefined attribute key that indicates whether clocks are synchronized, does not have a valid value in Open MPI, as the clocks are not guaranteed to be synchronized. .PP -This function is intended to be a high-resolution, elapsed (or wall) clock. See MPI_Wtick to determine the resolution of MPI_Wtime. +This function is intended to be a high-resolution, elapsed (or wall) clock. See MPI_Wtick to determine the resolution of MPI_Wtime. .PP On POSIX platforms, this function may utilize a timer that is cheaper to invoke than the gettimeofday() system call, but will fall back to gettimeofday() if a cheap high-resolution timer is not available. The ompi_info command can be consulted to see if Open MPI supports a -native high-resolution timer on your platform; see the value for "MPI_WTIME +native high-resolution timer on your platform; see the value for "MPI_WTIME support" (or "options:mpi-wtime" when viewing the parsable output). If this value is "native", a method that is likely to be cheaper than gettimeofday() will be used to obtain the time when diff --git a/ompi/mpi/man/man3/Makefile.extra b/ompi/mpi/man/man3/Makefile.extra index aeec287f18b..1643992f480 100644 --- a/ompi/mpi/man/man3/Makefile.extra +++ b/ompi/mpi/man/man3/Makefile.extra @@ -3,9 +3,9 @@ # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/tool/Makefile.am b/ompi/mpi/tool/Makefile.am index 4f6741d7115..c749cb3eb5a 100644 --- a/ompi/mpi/tool/Makefile.am +++ b/ompi/mpi/tool/Makefile.am @@ -2,14 +2,14 @@ # Copyright (c) 2004-2006 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpi/tool/cvar_get_num.c b/ompi/mpi/tool/cvar_get_num.c index 2e3f0bace03..7ece8df6d84 100644 --- a/ompi/mpi/tool/cvar_get_num.c +++ b/ompi/mpi/tool/cvar_get_num.c @@ -33,6 +33,6 @@ int MPI_T_cvar_get_num (int *num_cvar) { mpit_lock (); *num_cvar = mca_base_var_get_count(); mpit_unlock (); - + return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/enum_get_item.c b/ompi/mpi/tool/enum_get_item.c index 40c52aaefec..f86f3abecd4 100644 --- a/ompi/mpi/tool/enum_get_item.c +++ b/ompi/mpi/tool/enum_get_item.c @@ -46,7 +46,7 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, } rc = enumtype->get_value(enumtype, index, value, &tmp); - if (OPAL_SUCCESS != rc) { + if (OPAL_SUCCESS != rc) { rc = MPI_ERR_OTHER; break; } diff --git a/ompi/mpi/tool/profile/Makefile.am b/ompi/mpi/tool/profile/Makefile.am index ef8eea80faf..2ef266edf57 100644 --- a/ompi/mpi/tool/profile/Makefile.am +++ b/ompi/mpi/tool/profile/Makefile.am @@ -6,7 +6,7 @@ # 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, +# 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. @@ -16,9 +16,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,7 +26,7 @@ include $(top_srcdir)/Makefile.ompi-rules # # OMPI_PROFILING_DEFINES flag s enabled when we want our MPI_* symbols -# to be replaced by PMPI_*. In other words, this flag decides +# to be replaced by PMPI_*. In other words, this flag decides # whether "profile/defines.h" is included or not. "profile/defines.h" # replaces all MPI_* symbols with PMPI_* symbols. In this directory # we definately need it to be 1. diff --git a/ompi/mpi/tool/profile/defines.h b/ompi/mpi/tool/profile/defines.h index ae6dd4d7f4a..44ef3a56eca 100644 --- a/ompi/mpi/tool/profile/defines.h +++ b/ompi/mpi/tool/profile/defines.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -15,18 +15,18 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPIT_PROFILE_DEFINES_H #define OMPIT_PROFILE_DEFINES_H /* - * This file is included in the top directory only if + * This file is included in the top directory only if * profiling is required. Once profiling is required, - * this file will replace all MPI_* symbols with + * this file will replace all MPI_* symbols with * PMPI_* symbols */ #define MPI_T_category_changed PMPI_T_category_changed diff --git a/ompi/mpiext/Makefile.am b/ompi/mpiext/Makefile.am index b19c2917bca..c561886e878 100644 --- a/ompi/mpiext/Makefile.am +++ b/ompi/mpiext/Makefile.am @@ -3,9 +3,9 @@ # University Research and Technology # Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/affinity/Makefile.am b/ompi/mpiext/affinity/Makefile.am index 8fa81d74862..de819bd32cf 100644 --- a/ompi/mpiext/affinity/Makefile.am +++ b/ompi/mpiext/affinity/Makefile.am @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/affinity/c/Makefile.am b/ompi/mpiext/affinity/c/Makefile.am index 8d8275d9256..46573f7a461 100644 --- a/ompi/mpiext/affinity/c/Makefile.am +++ b/ompi/mpiext/affinity/c/Makefile.am @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in b/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in index a5cbc748dd0..1c4431729b6 100644 --- a/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in +++ b/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in @@ -33,7 +33,7 @@ string as human-readable resource names, such as "socket 0, core 0". OMPI_AFFINITY_LAYOUT_FMT returns ASCII art representing where this MPI process is bound relative to the machine resource layout. For example -"[. B][. .]" shows the process that called the routine is bound to +"[. B][. .]" shows the process that called the routine is bound to socket 0, core 1 in a system with 2 sockets, each containing 2 cores. See below for more output examples. @@ -66,7 +66,7 @@ prettyprint information about three things: . .TP Where Open MPI bound this process. -The string returned in +The string returned in .B ompi_bound will either indicate that Open MPI did not bind this process to @@ -110,7 +110,7 @@ all processors in the system). MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); - OMPI_Affinity_str(OMPI_AFFINITY_RSRC_STRING_FMT, + OMPI_Affinity_str(OMPI_AFFINITY_RSRC_STRING_FMT, ompi_bound, current_binding, exists); printf("rank %d: \\n" " ompi_bound: %s\\n" @@ -122,24 +122,24 @@ all processors in the system). .PP Output of mpirun -np 2 -bind-to-core a.out: .nf -rank 0: - ompi_bound: socket 0[core 0] - current_binding: socket 0[core 0] +rank 0: + ompi_bound: socket 0[core 0] + current_binding: socket 0[core 0] exists: socket 0 has 4 cores -rank 1: - ompi_bound: socket 0[core 1] - current_binding: socket 0[core 1] +rank 1: + ompi_bound: socket 0[core 1] + current_binding: socket 0[core 1] exists: socket 0 has 4 cores .fi .PP Output of mpirun -np 2 -bind-to-socket a.out: .nf -rank 0: - ompi_bound: socket 0[core 0-3] +rank 0: + ompi_bound: socket 0[core 0-3] current_binding: Not bound (or bound to all available processors) exists: socket 0 has 4 cores -rank 1: - ompi_bound: socket 0[core 0-3] +rank 1: + ompi_bound: socket 0[core 0-3] current_binding: Not bound (or bound to all available processors) exists: socket 0 has 4 cores .fi @@ -156,7 +156,7 @@ rank 1: MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); - OMPI_Affinity_str(OMPI_AFFINITY_LAYOUT_FMT, + OMPI_Affinity_str(OMPI_AFFINITY_LAYOUT_FMT, ompi_bound, current_binding, exists); printf("rank %d: \\n" " ompi_bound: %s\\n" @@ -168,11 +168,11 @@ rank 1: .PP Output of mpirun -np 2 -bind-to-core a.out: .nf -rank 0: +rank 0: ompi_bound: [B . . .] current_binding: [B . . .] exists: [. . . .] -rank 1: +rank 1: ompi_bound: [. B . .] current_binding: [. B . .] exists: [. . . .] @@ -180,11 +180,11 @@ rank 1: .PP Output of mpirun -np 2 -bind-to-socket a.out: .nf -rank 0: +rank 0: ompi_bound: [B B B B] current_binding: [B B B B] exists: [. . . .] -rank 1: +rank 1: ompi_bound: [B B B B] current_binding: [B B B B] exists: [. . . .] diff --git a/ompi/mpiext/affinity/c/example.c b/ompi/mpiext/affinity/c/example.c index ace36443ea2..b72590034f4 100644 --- a/ompi/mpiext/affinity/c/example.c +++ b/ompi/mpiext/affinity/c/example.c @@ -8,10 +8,10 @@ int main(int argc, char* argv[]) char ompi_bound[OMPI_AFFINITY_STRING_MAX]; char current_binding[OMPI_AFFINITY_STRING_MAX]; char exists[OMPI_AFFINITY_STRING_MAX]; - + MPI_Init(NULL, NULL); MPI_Comm_rank(MPI_COMM_WORLD, &rank); - + OMPI_Affinity_str(OMPI_AFFINITY_RSRC_STRING_FMT, ompi_bound, current_binding, exists); printf("rank %d (resource string): \n" diff --git a/ompi/mpiext/affinity/c/mpiext_affinity_c.h b/ompi/mpiext/affinity/c/mpiext_affinity_c.h index 7b2a0167978..bf94f283c43 100644 --- a/ompi/mpiext/affinity/c/mpiext_affinity_c.h +++ b/ompi/mpiext/affinity/c/mpiext_affinity_c.h @@ -4,9 +4,9 @@ * Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/ompi/mpiext/affinity/c/mpiext_affinity_str.c b/ompi/mpiext/affinity/c/mpiext_affinity_str.c index 653c91ebb6d..0b4fccceeb0 100644 --- a/ompi/mpiext/affinity/c/mpiext_affinity_str.c +++ b/ompi/mpiext/affinity/c/mpiext_affinity_str.c @@ -20,7 +20,7 @@ * 1. What processor(s) Open MPI bound this process to * 2. What processor(s) this process is bound to * 3. What processor(s) exist on this host - * + * * Note that 1 and 2 may be different! */ @@ -145,7 +145,7 @@ static int get_rsrc_ompi_bound(char str[OMPI_AFFINITY_STRING_MAX]) if (NULL == orte_proc_applied_binding) { ret = OPAL_ERR_NOT_BOUND; } else { - ret = opal_hwloc_base_cset2str(str, OMPI_AFFINITY_STRING_MAX, + ret = opal_hwloc_base_cset2str(str, OMPI_AFFINITY_STRING_MAX, opal_hwloc_topology, orte_proc_applied_binding); } @@ -173,7 +173,7 @@ static int get_rsrc_current_binding(char str[OMPI_AFFINITY_STRING_MAX]) /* get our bindings */ boundset = hwloc_bitmap_alloc(); - if (hwloc_get_cpubind(opal_hwloc_topology, boundset, + if (hwloc_get_cpubind(opal_hwloc_topology, boundset, HWLOC_CPUBIND_PROCESS) < 0) { /* we are NOT bound if get_cpubind fails, nor can we be bound - the environment does not support it */ @@ -210,7 +210,7 @@ static int get_rsrc_current_binding(char str[OMPI_AFFINITY_STRING_MAX]) } -/* +/* * Prettyprint a list of all available sockets and cores. Note that * this is *everything* -- not just the ones that are available to * this process. @@ -224,7 +224,7 @@ static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]) hwloc_obj_t socket, core, c2; str[0] = '\0'; - for (socket = hwloc_get_obj_by_type(opal_hwloc_topology, + for (socket = hwloc_get_obj_by_type(opal_hwloc_topology, HWLOC_OBJ_SOCKET, 0); NULL != socket; socket = socket->next_cousin) { /* If this isn't the first socket, add a delimiter */ @@ -243,17 +243,17 @@ static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]) socket->cpuset, HWLOC_OBJ_CORE); core = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - socket->cpuset, + socket->cpuset, HWLOC_OBJ_CORE, 0); if (NULL != core) { - num_pus = + num_pus = hwloc_get_nbobjs_inside_cpuset_by_type(opal_hwloc_topology, core->cpuset, HWLOC_OBJ_PU); - + /* Only 1 core */ if (1 == num_cores) { - strncat(str, "1 core with ", + strncat(str, "1 core with ", OMPI_AFFINITY_STRING_MAX - strlen(str)); if (1 == num_pus) { strncat(str, "1 hwt", @@ -262,26 +262,26 @@ static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]) snprintf(tmp, stmp, "%d hwts", num_pus); strncat(str, tmp, OMPI_AFFINITY_STRING_MAX - strlen(str)); } - } - + } + /* Multiple cores */ else { bool same = true; - + snprintf(tmp, stmp, "%d cores", num_cores); strncat(str, tmp, OMPI_AFFINITY_STRING_MAX - strlen(str)); - + /* Do all the cores have the same number of PUs? */ for (c2 = core; NULL != c2; c2 = c2->next_cousin) { if (hwloc_get_nbobjs_inside_cpuset_by_type(opal_hwloc_topology, core->cpuset, - HWLOC_OBJ_PU) != + HWLOC_OBJ_PU) != num_pus) { same = false; break; } } - + /* Yes, they all have the same number of PUs */ if (same) { snprintf(tmp, stmp, ", each with %d hwt", num_pus); @@ -290,31 +290,31 @@ static int get_rsrc_exists(char str[OMPI_AFFINITY_STRING_MAX]) strncat(str, "s", OMPI_AFFINITY_STRING_MAX - strlen(str)); } } - + /* No, they have differing numbers of PUs */ else { bool first = true; - + strncat(str, "with (", OMPI_AFFINITY_STRING_MAX - strlen(str)); for (c2 = core; NULL != c2; c2 = c2->next_cousin) { if (!first) { - strncat(str, ", ", + strncat(str, ", ", OMPI_AFFINITY_STRING_MAX - strlen(str)); } first = false; - + i = hwloc_get_nbobjs_inside_cpuset_by_type(opal_hwloc_topology, core->cpuset, HWLOC_OBJ_PU); snprintf(tmp, stmp, "%d", i); strncat(str, tmp, OMPI_AFFINITY_STRING_MAX - strlen(str)); } - strncat(str, ") hwts", + strncat(str, ") hwts", OMPI_AFFINITY_STRING_MAX - strlen(str)); } } } - } + } return OMPI_SUCCESS; } @@ -338,7 +338,7 @@ static int get_layout_ompi_bound(char str[OMPI_AFFINITY_STRING_MAX]) if (NULL == orte_proc_applied_binding) { ret = OPAL_ERR_NOT_BOUND; } else { - ret = opal_hwloc_base_cset2mapstr(str, OMPI_AFFINITY_STRING_MAX, + ret = opal_hwloc_base_cset2mapstr(str, OMPI_AFFINITY_STRING_MAX, opal_hwloc_topology, orte_proc_applied_binding); } @@ -366,7 +366,7 @@ static int get_layout_current_binding(char str[OMPI_AFFINITY_STRING_MAX]) /* get our bindings */ boundset = hwloc_bitmap_alloc(); - if (hwloc_get_cpubind(opal_hwloc_topology, boundset, + if (hwloc_get_cpubind(opal_hwloc_topology, boundset, HWLOC_CPUBIND_PROCESS) < 0) { /* we are NOT bound if get_cpubind fails, nor can we be bound - the environment does not support it */ @@ -409,7 +409,7 @@ static int get_layout_current_binding(char str[OMPI_AFFINITY_STRING_MAX]) * * Example: [../..] * Key: [] - signifies socket - * / - signifies core + * / - signifies core * . - signifies PU */ static int get_layout_exists(char str[OMPI_AFFINITY_STRING_MAX]) @@ -421,20 +421,20 @@ static int get_layout_exists(char str[OMPI_AFFINITY_STRING_MAX]) str[0] = '\0'; /* Iterate over all existing sockets */ - for (socket = hwloc_get_obj_by_type(opal_hwloc_topology, + for (socket = hwloc_get_obj_by_type(opal_hwloc_topology, HWLOC_OBJ_SOCKET, 0); - NULL != socket; + NULL != socket; socket = socket->next_cousin) { strncat(str, "[", len - strlen(str)); /* Iterate over all existing cores in this socket */ core_index = 0; for (core = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - socket->cpuset, + socket->cpuset, HWLOC_OBJ_CORE, core_index); - NULL != core; + NULL != core; core = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - socket->cpuset, + socket->cpuset, HWLOC_OBJ_CORE, ++core_index)) { if (core_index > 0) { strncat(str, "/", len - strlen(str)); @@ -443,11 +443,11 @@ static int get_layout_exists(char str[OMPI_AFFINITY_STRING_MAX]) /* Iterate over all existing PUs in this core */ pu_index = 0; for (pu = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - core->cpuset, + core->cpuset, HWLOC_OBJ_PU, pu_index); - NULL != pu; + NULL != pu; pu = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - core->cpuset, + core->cpuset, HWLOC_OBJ_PU, ++pu_index)) { strncat(str, ".", len - strlen(str)); } diff --git a/ompi/mpiext/affinity/configure.m4 b/ompi/mpiext/affinity/configure.m4 index 95a4ca7fe96..55ca956e414 100644 --- a/ompi/mpiext/affinity/configure.m4 +++ b/ompi/mpiext/affinity/configure.m4 @@ -4,9 +4,9 @@ # All rights reserved. # Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/cr/Makefile.am b/ompi/mpiext/cr/Makefile.am index 97a15dc4ffc..1ab8b748181 100644 --- a/ompi/mpiext/cr/Makefile.am +++ b/ompi/mpiext/cr/Makefile.am @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/cr/c/Makefile.am b/ompi/mpiext/cr/c/Makefile.am index f2667667f8b..fe54fe557b1 100644 --- a/ompi/mpiext/cr/c/Makefile.am +++ b/ompi/mpiext/cr/c/Makefile.am @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/cr/c/checkpoint.c b/ompi/mpiext/cr/c/checkpoint.c index a3221b5f9e3..fbd956eb35b 100644 --- a/ompi/mpiext/cr/c/checkpoint.c +++ b/ompi/mpiext/cr/c/checkpoint.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -62,7 +62,7 @@ int OMPI_CR_Checkpoint(char **handle, int *seq, MPI_Info *info) ret = orte_snapc.request_op(datum); if( OMPI_SUCCESS != ret ) { OBJ_RELEASE(datum); - OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, + OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, FUNC_NAME); } OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpiext/cr/c/inc_register_callback.c b/ompi/mpiext/cr/c/inc_register_callback.c index 9572c8b6f79..37ee7605533 100644 --- a/ompi/mpiext/cr/c/inc_register_callback.c +++ b/ompi/mpiext/cr/c/inc_register_callback.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -29,7 +29,7 @@ int OMPI_CR_INC_register_callback(OMPI_CR_INC_callback_event_t event, int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); } OPAL_CR_ENTER_LIBRARY(); diff --git a/ompi/mpiext/cr/c/migrate.c b/ompi/mpiext/cr/c/migrate.c index b6d7aeb81d5..00c014e1422 100644 --- a/ompi/mpiext/cr/c/migrate.c +++ b/ompi/mpiext/cr/c/migrate.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -104,7 +104,7 @@ int OMPI_CR_Migrate(MPI_Comm comm, char *hostname, int rank, MPI_Info *info) OPAL_CR_ENTER_LIBRARY(); ret = orte_snapc.request_op(datum); if( OMPI_SUCCESS != ret ) { - OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, + OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, FUNC_NAME); } OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpiext/cr/c/mpiext_cr_c.h b/ompi/mpiext/cr/c/mpiext_cr_c.h index cf1801b6898..d54d6794a61 100644 --- a/ompi/mpiext/cr/c/mpiext_cr_c.h +++ b/ompi/mpiext/cr/c/mpiext_cr_c.h @@ -3,9 +3,9 @@ * All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/ompi/mpiext/cr/c/quiesce_checkpoint.c b/ompi/mpiext/cr/c/quiesce_checkpoint.c index 5f782d82b43..85ff1f48e89 100644 --- a/ompi/mpiext/cr/c/quiesce_checkpoint.c +++ b/ompi/mpiext/cr/c/quiesce_checkpoint.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -55,7 +55,7 @@ int OMPI_CR_Quiesce_checkpoint(MPI_Comm commP, char **handle, int *seq, MPI_Info ret = orte_snapc.request_op(datum); /*ret = ompi_crcp_base_quiesce_start(info);*/ if( OMPI_SUCCESS != ret ) { - OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, + OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpiext/cr/c/quiesce_end.c b/ompi/mpiext/cr/c/quiesce_end.c index 32189238eb0..7d716f2f7ab 100644 --- a/ompi/mpiext/cr/c/quiesce_end.c +++ b/ompi/mpiext/cr/c/quiesce_end.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -55,7 +55,7 @@ int OMPI_CR_Quiesce_end(MPI_Comm commP, MPI_Info *info) ret = orte_snapc.request_op(datum); /*ret = ompi_crcp_base_quiesce_end(info);*/ if( OMPI_SUCCESS != ret ) { - OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, + OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, FUNC_NAME); } OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpiext/cr/c/quiesce_start.c b/ompi/mpiext/cr/c/quiesce_start.c index b81e12a72b9..9b61ebe6d0a 100644 --- a/ompi/mpiext/cr/c/quiesce_start.c +++ b/ompi/mpiext/cr/c/quiesce_start.c @@ -7,9 +7,9 @@ * reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -64,7 +64,7 @@ int OMPI_CR_Quiesce_start(MPI_Comm commP, MPI_Info *info) /*ret = ompi_crcp_base_quiesce_start(info);*/ if( OMPI_SUCCESS != ret ) { OBJ_RELEASE(datum); - OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, + OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/ompi/mpiext/cr/c/restart.c b/ompi/mpiext/cr/c/restart.c index a16ebed8b03..38814b08de4 100644 --- a/ompi/mpiext/cr/c/restart.c +++ b/ompi/mpiext/cr/c/restart.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -53,7 +53,7 @@ int OMPI_CR_Restart(char *handle, int seq, MPI_Info *info) OPAL_CR_ENTER_LIBRARY(); ret = orte_snapc.request_op(datum); if( OMPI_SUCCESS != ret ) { - OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, + OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER, FUNC_NAME); } OPAL_CR_EXIT_LIBRARY(); diff --git a/ompi/mpiext/cr/c/self_register_checkpoint.c b/ompi/mpiext/cr/c/self_register_checkpoint.c index 97ab37523b8..a7bdc6330e8 100644 --- a/ompi/mpiext/cr/c/self_register_checkpoint.c +++ b/ompi/mpiext/cr/c/self_register_checkpoint.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -29,7 +29,7 @@ int OMPI_CR_self_register_checkpoint_callback(OMPI_CR_self_checkpoint_fn functio int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); } OPAL_CR_ENTER_LIBRARY(); diff --git a/ompi/mpiext/cr/c/self_register_continue.c b/ompi/mpiext/cr/c/self_register_continue.c index 062a2b3f0a2..166063699df 100644 --- a/ompi/mpiext/cr/c/self_register_continue.c +++ b/ompi/mpiext/cr/c/self_register_continue.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -29,7 +29,7 @@ int OMPI_CR_self_register_continue_callback(OMPI_CR_self_continue_fn function) int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); } OPAL_CR_ENTER_LIBRARY(); diff --git a/ompi/mpiext/cr/c/self_register_restart.c b/ompi/mpiext/cr/c/self_register_restart.c index c197d276f58..6e7675c3f65 100644 --- a/ompi/mpiext/cr/c/self_register_restart.c +++ b/ompi/mpiext/cr/c/self_register_restart.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -29,7 +29,7 @@ int OMPI_CR_self_register_restart_callback(OMPI_CR_self_restart_fn function) int rc; if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); } OPAL_CR_ENTER_LIBRARY(); diff --git a/ompi/mpiext/cr/configure.m4 b/ompi/mpiext/cr/configure.m4 index 757118442f6..ca07c5cb944 100644 --- a/ompi/mpiext/cr/configure.m4 +++ b/ompi/mpiext/cr/configure.m4 @@ -4,9 +4,9 @@ # All rights reserved. # Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/cuda/README.txt b/ompi/mpiext/cuda/README.txt index 9042305369c..cc46fc3ef95 100644 --- a/ompi/mpiext/cuda/README.txt +++ b/ompi/mpiext/cuda/README.txt @@ -5,7 +5,7 @@ $COPYRIGHT$ Rolf vandeVaart -This extension provides a macro for compile time check of CUDA aware support. +This extension provides a macro for compile time check of CUDA aware support. It also provides a function for runtime check of CUDA aware support. See MPIX_Query_cuda_support(3) for more details. diff --git a/ompi/mpiext/example/Makefile.am b/ompi/mpiext/example/Makefile.am index c5e7ca73a63..8b2b03942db 100644 --- a/ompi/mpiext/example/Makefile.am +++ b/ompi/mpiext/example/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/README.txt b/ompi/mpiext/example/README.txt index bb93902b0ee..13e237df3cc 100644 --- a/ompi/mpiext/example/README.txt +++ b/ompi/mpiext/example/README.txt @@ -3,7 +3,7 @@ Copyright (C) 2012 Cisco Systems, Inc. All rights reserved. $COPYRIGHT$ This example MPI extension shows how to make an MPI extension for Open -MPI. +MPI. An MPI extension provides new top-level APIs in Open MPI that are available to user-level applications (vs. adding new code/APIs that is @@ -74,7 +74,7 @@ Under this top-level directory, the extension *must* have a directory named "c" (for the C bindings) that: - contains a file named mpiext__c.h -- installs mpiext__c.h to +- installs mpiext__c.h to $includedir/openmpi/mpiext//c - builds a Libtool convenience library named libmpiext__c.la @@ -82,7 +82,7 @@ Optionally, the extension may have a director named "mpif-h" (for the Fortran mpif.h bindings) that: - contains a file named mpiext__mpifh.h -- installs mpiext__mpih.h to +- installs mpiext__mpih.h to $includedir/openmpi/mpiext//mpif-h - builds a Libtool convenience library named libmpiext__mpifh.la @@ -133,6 +133,6 @@ file. This are reasons for this strange ordering, but suffice it to say that "make dist" doesn't have the same ordering requiements as "make all", and is therefore easier to have a "normal" Automake-usual top-down -sequential directory traversal. +sequential directory traversal. Enjoy! diff --git a/ompi/mpiext/example/c/Makefile.am b/ompi/mpiext/example/c/Makefile.am index 088ab79877c..7f9e74df6c8 100644 --- a/ompi/mpiext/example/c/Makefile.am +++ b/ompi/mpiext/example/c/Makefile.am @@ -5,9 +5,9 @@ # Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/c/mpiext_example_c.h b/ompi/mpiext/example/c/mpiext_example_c.h index 8a69fa7341c..abaf87845d1 100644 --- a/ompi/mpiext/example/c/mpiext_example_c.h +++ b/ompi/mpiext/example/c/mpiext_example_c.h @@ -4,9 +4,9 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/ompi/mpiext/example/c/mpiext_example_module.c b/ompi/mpiext/example/c/mpiext_example_module.c index a0006b6234d..4ef52a36d7d 100644 --- a/ompi/mpiext/example/c/mpiext_example_module.c +++ b/ompi/mpiext/example/c/mpiext_example_module.c @@ -5,9 +5,9 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -25,7 +25,7 @@ #include "ompi/mpiext/mpiext.h" #include "ompi/mpiext/example/c/mpiext_example_c.h" -/* +/* * The init/fini functions and the component struct are not required, * but optional. If an extension would like to have init/fini, in * addition to providing the hooks below, adding the line in diff --git a/ompi/mpiext/example/c/mpiext_example_progress.c b/ompi/mpiext/example/c/mpiext_example_progress.c index 00cbaca7ffe..28ba227daa9 100644 --- a/ompi/mpiext/example/c/mpiext_example_progress.c +++ b/ompi/mpiext/example/c/mpiext_example_progress.c @@ -5,9 +5,9 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ int OMPI_Example_global = 42; * Just to make the extension "interesting", we pass in an integer and * an MPI handle. */ -int OMPI_Progress(int count, MPI_Comm comm) +int OMPI_Progress(int count, MPI_Comm comm) { char name[MPI_MAX_OBJECT_NAME]; int len; diff --git a/ompi/mpiext/example/c/progress.c b/ompi/mpiext/example/c/progress.c index 5d38c672941..60c47028cbf 100644 --- a/ompi/mpiext/example/c/progress.c +++ b/ompi/mpiext/example/c/progress.c @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -18,7 +18,7 @@ static const char FUNC_NAME[] = "OMPI_Progress"; -/* +/* * The init/fini functions and the component struct are not required, * but optional. If an extension would like to have init/fini, in * addition to providing the hooks below, adding the line in @@ -45,7 +45,7 @@ ompi_mpiext_component_t ompi_mpiext_example = { }; -int OMPI_Progress(int count) +int OMPI_Progress(int count) { printf("Count = %d!\n", count); diff --git a/ompi/mpiext/example/configure.m4 b/ompi/mpiext/example/configure.m4 index 29c1b428853..096a01a849f 100644 --- a/ompi/mpiext/example/configure.m4 +++ b/ompi/mpiext/example/configure.m4 @@ -4,9 +4,9 @@ # All rights reserved. # Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/mpif-h/Makefile.am b/ompi/mpiext/example/mpif-h/Makefile.am index 004bae04071..fdd1c2a257a 100644 --- a/ompi/mpiext/example/mpif-h/Makefile.am +++ b/ompi/mpiext/example/mpif-h/Makefile.am @@ -5,9 +5,9 @@ # Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/mpif-h/mpiext_example_mpifh.h b/ompi/mpiext/example/mpif-h/mpiext_example_mpifh.h index fb8898d9bf1..7785d351728 100644 --- a/ompi/mpiext/example/mpif-h/mpiext_example_mpifh.h +++ b/ompi/mpiext/example/mpif-h/mpiext_example_mpifh.h @@ -3,9 +3,9 @@ ! Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. ! Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpiext/example/mpif-h/mpiext_example_progress_f.c b/ompi/mpiext/example/mpif-h/mpiext_example_progress_f.c index f102db653ca..395e9932b97 100644 --- a/ompi/mpiext/example/mpif-h/mpiext_example_progress_f.c +++ b/ompi/mpiext/example/mpif-h/mpiext_example_progress_f.c @@ -2,9 +2,9 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/mpiext/example/tests/Makefile b/ompi/mpiext/example/tests/Makefile index 9b1cfcb8351..ec66818e21e 100644 --- a/ompi/mpiext/example/tests/Makefile +++ b/ompi/mpiext/example/tests/Makefile @@ -1,9 +1,9 @@ # # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/tests/Makefile.include b/ompi/mpiext/example/tests/Makefile.include index 06bb7769763..62d5ec4be5e 100644 --- a/ompi/mpiext/example/tests/Makefile.include +++ b/ompi/mpiext/example/tests/Makefile.include @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/tests/progress_mpifh.F90 b/ompi/mpiext/example/tests/progress_mpifh.F90 index 54f436d6464..5da795f8a0f 100644 --- a/ompi/mpiext/example/tests/progress_mpifh.F90 +++ b/ompi/mpiext/example/tests/progress_mpifh.F90 @@ -9,16 +9,16 @@ program main implicit none include 'mpif.h' include 'mpif-ext.h' - + integer ierr, rank, size - + call MPI_INIT(ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr) - + write(*, '("Hello, world, I am ", i2, " of ", i2)') rank, size call OMPI_PROGRESS(3, MPI_COMM_WORLD, ierr) - + call MPI_FINALIZE(ierr) end program - + diff --git a/ompi/mpiext/example/tests/progress_usempi.F90 b/ompi/mpiext/example/tests/progress_usempi.F90 index d39a2767503..64da098fcf0 100644 --- a/ompi/mpiext/example/tests/progress_usempi.F90 +++ b/ompi/mpiext/example/tests/progress_usempi.F90 @@ -9,16 +9,16 @@ program main use mpi use mpi_ext implicit none - + integer ierr, rank, size - + call MPI_INIT(ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr) - + write(*, '("Hello, world, I am ", i2, " of ", i2)') rank, size call OMPI_PROGRESS(3, MPI_COMM_WORLD, ierr) - + call MPI_FINALIZE(ierr) end program - + diff --git a/ompi/mpiext/example/tests/progress_usempif08.F90 b/ompi/mpiext/example/tests/progress_usempif08.F90 index 8e3d866654f..badc16733f4 100644 --- a/ompi/mpiext/example/tests/progress_usempif08.F90 +++ b/ompi/mpiext/example/tests/progress_usempif08.F90 @@ -9,16 +9,16 @@ program main use mpi_f08 use mpi_f08_ext implicit none - + integer ierr, rank, size - + call MPI_INIT(ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr) - + write(*, '("Hello, world, I am ", i2, " of ", i2)') rank, size call OMPI_PROGRESS(3, MPI_COMM_WORLD, ierr) - + call MPI_FINALIZE(ierr) end program - + diff --git a/ompi/mpiext/example/use-mpi-f08/Makefile.am b/ompi/mpiext/example/use-mpi-f08/Makefile.am index 9eb064a9bb3..656a036f098 100644 --- a/ompi/mpiext/example/use-mpi-f08/Makefile.am +++ b/ompi/mpiext/example/use-mpi-f08/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/use-mpi-f08/mpiext_example_progress_f08.F90 b/ompi/mpiext/example/use-mpi-f08/mpiext_example_progress_f08.F90 index 310de796576..550a27c50a4 100644 --- a/ompi/mpiext/example/use-mpi-f08/mpiext_example_progress_f08.F90 +++ b/ompi/mpiext/example/use-mpi-f08/mpiext_example_progress_f08.F90 @@ -16,9 +16,9 @@ subroutine OMPI_Progress_f08(count, comm, ierror) ! We use the "only" clause just to be a little nice in the scope of ! things that we grab from that file. use :: mpi_f08_types, only : MPI_Comm - + implicit none - + ! Prototype the back-end function in mpif-h that we'll be invoking ! at the bottom of this subroutine. This is a little klunky and ! for demonstration purposes only; real extensions might want to @@ -34,17 +34,17 @@ subroutine OMPI_Progress_f(count, comm, ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine OMPI_Progress_f end interface - + ! Types for this subroutine's parameters and local variables. TYPE(MPI_Comm), INTENT(IN) :: comm INTEGER, OPTIONAL, INTENT(OUT) :: ierror integer :: count, c_ierror - + ! Here we call the the back-end C function in the mpif.h bindings, ! but convert the mpi_f08-style MPI handles to mpif.h-style handles ! (by taking the MPI_VAL member out of its "struct"). call OMPI_Progress_f(count, comm%MPI_VAL, c_ierror) - + ! ierror is optional in the mpi_f08 bindings, so keep that ! convention here, too -- assign to ierror *if it was provided*. if (present(ierror)) ierror = c_ierror diff --git a/ompi/mpiext/example/use-mpi-f08/mpiext_example_usempif08.h b/ompi/mpiext/example/use-mpi-f08/mpiext_example_usempif08.h index 8c054ac6f25..f696605affc 100644 --- a/ompi/mpiext/example/use-mpi-f08/mpiext_example_usempif08.h +++ b/ompi/mpiext/example/use-mpi-f08/mpiext_example_usempif08.h @@ -2,9 +2,9 @@ ! ! Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/mpiext/example/use-mpi/Makefile.am b/ompi/mpiext/example/use-mpi/Makefile.am index f4593fb8ee8..00a6d8c7522 100644 --- a/ompi/mpiext/example/use-mpi/Makefile.am +++ b/ompi/mpiext/example/use-mpi/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mpiext/example/use-mpi/mpiext_example_usempi.h b/ompi/mpiext/example/use-mpi/mpiext_example_usempi.h index 7f7aff289cf..a0d9bd787e6 100644 --- a/ompi/mpiext/example/use-mpi/mpiext_example_usempi.h +++ b/ompi/mpiext/example/use-mpi/mpiext_example_usempi.h @@ -2,9 +2,9 @@ ! ! Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ -! +! ! Additional copyrights may follow -! +! ! $HEADER$ ! diff --git a/ompi/op/Makefile.am b/ompi/op/Makefile.am index 657929cf350..b16c9d85c8d 100644 --- a/ompi/op/Makefile.am +++ b/ompi/op/Makefile.am @@ -6,15 +6,15 @@ # 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, +# 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) 2008-2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/op/op.c b/ompi/op/op.c index d7a0427d25d..31cd01f9edd 100644 --- a/ompi/op/op.c +++ b/ompi/op/op.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,7 +56,7 @@ static void ompi_op_destruct(ompi_op_t *eh); /* * Class instance */ -OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t, +OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t, ompi_op_construct, ompi_op_destruct); @@ -218,49 +218,49 @@ int ompi_op_init(void) /* Create the intrinsic ops */ - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_null.op, OMPI_OP_BASE_FORTRAN_NULL, FLAGS, "MPI_NULL") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_max.op, OMPI_OP_BASE_FORTRAN_MAX, FLAGS, "MPI_MAX") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_min.op, OMPI_OP_BASE_FORTRAN_MIN, FLAGS, "MPI_MIN") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_sum.op, OMPI_OP_BASE_FORTRAN_SUM, FLAGS_NO_FLOAT, "MPI_SUM") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_prod.op, OMPI_OP_BASE_FORTRAN_PROD, FLAGS_NO_FLOAT, "MPI_PROD") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_land.op, OMPI_OP_BASE_FORTRAN_LAND, FLAGS, "MPI_LAND") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_band.op, OMPI_OP_BASE_FORTRAN_BAND, FLAGS, "MPI_BAND") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_lor.op, OMPI_OP_BASE_FORTRAN_LOR, FLAGS, "MPI_LOR") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_bor.op, OMPI_OP_BASE_FORTRAN_BOR, FLAGS, "MPI_BOR") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_lxor.op, OMPI_OP_BASE_FORTRAN_LXOR, FLAGS, "MPI_LXOR") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_bxor.op, OMPI_OP_BASE_FORTRAN_BXOR, FLAGS, "MPI_BXOR") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_maxloc.op, OMPI_OP_BASE_FORTRAN_MAXLOC, FLAGS, "MPI_MAXLOC") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_minloc.op, OMPI_OP_BASE_FORTRAN_MINLOC, FLAGS, "MPI_MINLOC") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_replace.op, OMPI_OP_BASE_FORTRAN_REPLACE, FLAGS, "MPI_REPLACE") || - OMPI_SUCCESS != + OMPI_SUCCESS != add_intrinsic(&ompi_mpi_op_no_op.op, OMPI_OP_BASE_FORTRAN_NO_OP, FLAGS, "MPI_NO_OP")) { return OMPI_ERROR; @@ -378,7 +378,7 @@ void ompi_op_set_cxx_callback(ompi_op_t *op, MPI_User_function *fn) /* The OMPI C++ intercept was previously stored in op->o_func.fort_fn by ompi_op_create_user(). So save that in cxx.intercept_fn and put the user's fn in cxx.user_fn. */ - op->o_func.cxx_data.intercept_fn = + op->o_func.cxx_data.intercept_fn = (ompi_op_cxx_handler_fn_t *) op->o_func.fort_fn; op->o_func.cxx_data.user_fn = fn; } @@ -395,7 +395,7 @@ void ompi_op_set_java_callback(ompi_op_t *op, void *jnienv, /* The OMPI Java intercept was previously stored in op->o_func.fort_fn by ompi_op_create_user(). So save that in cxx.intercept_fn and put the user's fn in cxx.user_fn. */ - op->o_func.java_data.intercept_fn = + op->o_func.java_data.intercept_fn = (ompi_op_java_handler_fn_t *) op->o_func.fort_fn; op->o_func.java_data.jnienv = jnienv; op->o_func.java_data.object = object; @@ -433,7 +433,7 @@ static int add_intrinsic(ompi_op_t *op, int fort_handle, int flags, } else { return OMPI_SUCCESS; } -} +} /* @@ -445,7 +445,7 @@ static void ompi_op_construct(ompi_op_t *new_op) /* assign entry in fortran <-> c translation array */ - new_op->o_f_to_c_index = + new_op->o_f_to_c_index = opal_pointer_array_add(ompi_op_f_to_c_table, new_op); /* Set everything to NULL so that we can intelligently free diff --git a/ompi/op/op.h b/ompi/op/op.h index 8f5ff16e506..d7661cc3608 100644 --- a/ompi/op/op.h +++ b/ompi/op/op.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -14,9 +14,9 @@ * Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -180,14 +180,14 @@ struct ompi_op_t { int baseType; } java_data; } o_func; - + /** 3-buffer functions, which is only for intrinsic ops. No need for the C/C++/Fortran user-defined functions. */ ompi_op_base_op_3buff_fns_t o_3buff_intrinsic; }; /** - * Convenience typedef + * Convenience typedef */ typedef struct ompi_op_t ompi_op_t; OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_op_t); diff --git a/ompi/patterns/comm/Makefile.am b/ompi/patterns/comm/Makefile.am index ae4ae27c31d..102ef512a84 100644 --- a/ompi/patterns/comm/Makefile.am +++ b/ompi/patterns/comm/Makefile.am @@ -1,8 +1,8 @@ # Copyright (c) 2013 Oak Ridge National Laboratory. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/patterns/comm/allgather.c b/ompi/patterns/comm/allgather.c index a12a198c836..48321bf3cf4 100644 --- a/ompi/patterns/comm/allgather.c +++ b/ompi/patterns/comm/allgather.c @@ -6,9 +6,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ @@ -43,7 +43,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, OPAL_PTRDIFF_TYPE dt_extent; char *src_buf_current; char *dest_buf_current; - struct iovec send_iov[2] = {{0,0},{0,0}}, + struct iovec send_iov[2] = {{0,0},{0,0}}, recv_iov[2] = {{0,0},{0,0}}; ompi_request_t *requests[4]; @@ -76,7 +76,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, /* get my reduction communication pattern */ memset(&my_exchange_node, 0, sizeof(netpatterns_pair_exchange_node_t)); - rc = netpatterns_setup_recursive_doubling_tree_node(n_peers, + rc = netpatterns_setup_recursive_doubling_tree_node(n_peers, my_rank_in_group, &my_exchange_node); if(OMPI_SUCCESS != rc){ return rc; @@ -136,7 +136,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, msg_cnt=0; /* - * Power of 2 data segment + * Power of 2 data segment */ /* post non-blocking receive */ if(pair_rank > my_rank_in_group ){ @@ -226,7 +226,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, goto Error; } msg_cnt++; - if( iovec_len > 1 ) { + if( iovec_len > 1 ) { rc=MCA_PML_CALL(isend(send_iov[1].iov_base, send_iov[1].iov_len,dtype,ranks_in_comm[pair_rank], -OMPI_COMMON_TAG_ALLREDUCE,MCA_PML_BASE_SEND_STANDARD, @@ -241,7 +241,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, if(pair_rank < my_rank_in_group ){ src_buf_current-=current_data_extent; local_data_start_rank-=proc_block; - } + } proc_block*=2; current_data_extent*=2; current_data_count*=2; @@ -254,8 +254,8 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, if(0 < my_exchange_node.n_extra_sources) { if ( EXTRA_NODE == my_exchange_node.node_type ) { - /* - ** receive the data + /* + ** receive the data ** */ extra_rank=my_exchange_node.rank_extra_source; diff --git a/ompi/patterns/comm/allreduce.c b/ompi/patterns/comm/allreduce.c index 92b06472182..2fbf9e21773 100644 --- a/ompi/patterns/comm/allreduce.c +++ b/ompi/patterns/comm/allreduce.c @@ -6,9 +6,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ @@ -28,9 +28,9 @@ /** * All-reduce for contigous primitive types */ -OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, +OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, ompi_datatype_t *dtype, int my_rank_in_group, - struct ompi_op_t *op, int n_peers,int *ranks_in_comm, + struct ompi_op_t *op, int n_peers,int *ranks_in_comm, ompi_communicator_t *comm) { /* local variables */ @@ -55,7 +55,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, if( OMPI_SUCCESS != rc ) { goto Error; } - + /* 1 process special case */ if(1 == n_peers) { /* place my data in the correct destination buffer */ @@ -108,7 +108,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, if(0 < my_exchange_node.n_extra_sources) { if ( EXCHANGE_NODE == my_exchange_node.node_type ) { - + /* ** Receive data from extra node */ @@ -134,7 +134,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, } else { - + /* ** Send data to "partner" node */ @@ -208,8 +208,8 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, if(0 < my_exchange_node.n_extra_sources) { if ( EXTRA_NODE == my_exchange_node.node_type ) { - /* - ** receive the data + /* + ** receive the data ** */ extra_rank=my_exchange_node.rank_extra_source; rc=MCA_PML_CALL(recv(scratch_bufers[recv_buffer], @@ -245,7 +245,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, /* copy data from the temp buffer into the output buffer */ rbuf_current = (char *) rbuf + count_processed * dt_size; memcpy(rbuf_current,scratch_bufers[send_buffer], count_this_stripe*dt_size); - + /* update the count of elements processed */ count_processed += count_this_stripe; } diff --git a/ompi/patterns/comm/bcast.c b/ompi/patterns/comm/bcast.c index 01110a63311..2a25d495db6 100644 --- a/ompi/patterns/comm/bcast.c +++ b/ompi/patterns/comm/bcast.c @@ -6,9 +6,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ diff --git a/ompi/patterns/comm/coll_ops.h b/ompi/patterns/comm/coll_ops.h index 5682fbc2e1e..846e5660cc4 100644 --- a/ompi/patterns/comm/coll_ops.h +++ b/ompi/patterns/comm/coll_ops.h @@ -27,7 +27,7 @@ BEGIN_C_DECLS OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, - ompi_datatype_t *dtype, int my_rank_in_group, int n_peers, + ompi_datatype_t *dtype, int my_rank_in_group, int n_peers, int *ranks_in_comm,ompi_communicator_t *comm); OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, ompi_datatype_t *dtype, int my_rank_in_group, diff --git a/ompi/patterns/net/Makefile.am b/ompi/patterns/net/Makefile.am index a31fe2b8d42..51794668190 100644 --- a/ompi/patterns/net/Makefile.am +++ b/ompi/patterns/net/Makefile.am @@ -1,8 +1,8 @@ # Copyright (c) 2013 Oak Ridge National Laboratory. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/patterns/net/allreduce.c b/ompi/patterns/net/allreduce.c index b0b97605a24..1f0cc0b4a89 100644 --- a/ompi/patterns/net/allreduce.c +++ b/ompi/patterns/net/allreduce.c @@ -4,9 +4,9 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file */ @@ -20,7 +20,7 @@ #include "ompi/communicator/communicator.h" #include "ompi/mca/rte/rte.h" -void send_completion(nt status, struct ompi_process_name_t* peer, struct iovec* msg, +void send_completion(nt status, struct ompi_process_name_t* peer, struct iovec* msg, int count, ompi_rml_tag_t tag, void* cbdata) { /* set send completion flag */ @@ -28,7 +28,7 @@ void send_completion(nt status, struct ompi_process_name_t* peer, struct iovec* } -void recv_completion(nt status, struct ompi_process_name_t* peer, struct iovec* msg, +void recv_completion(nt status, struct ompi_process_name_t* peer, struct iovec* msg, int count, ompi_rml_tag_t tag, void* cbdata) { /* set receive completion flag */ @@ -48,7 +48,7 @@ static void op_reduce(int op_type,(void *)src_dest_buf,(void *) src_buf, int cou case OP_SUM: - + switch (data_type) { case TYPE_INT4: int *int_src_ptr=(int *)src_ptr; @@ -76,7 +76,7 @@ static void op_reduce(int op_type,(void *)src_dest_buf,(void *) src_buf, int cou * All-reduce for contigous primitive types */ static -comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, +comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, int op_type, opal_list_t *peers) { /* local variables */ @@ -157,7 +157,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, return ret; } - /* setup flags for non-blocking communications */ + /* setup flags for non-blocking communications */ recv_done=&recv_completion_flag; send_done=&send_completion_flag; @@ -185,11 +185,11 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, if(0 < my_exchange_node->n_extra_sources) { if ( EXCHANGE_NODE == my_exchange_node->node_type ) { - + /* ** Receive data from extra node */ - + extra_rank=my_exchange_node.rank_extra_source; recv_iov.iov_base=scratch_bufers[recv_buffer]; recv_iov.iov_len=count_this_stripe*dt_size; @@ -207,7 +207,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, } else { - + /* ** Send data to "partner" node */ @@ -240,7 +240,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, /* loop over data exchanges */ for(exchange=0 ; exchange < my_exchange_node->n_exchanges ; exchange++) { - /* debug + /* debug t4=opal_sys_timer_get_cycles(); end debug */ @@ -251,7 +251,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, /* is the remote data read */ pair_rank=my_exchange_node->rank_exchanges[exchange]; - *recv_done=0; + *recv_done=0; *send_done=0; MB(); @@ -271,14 +271,14 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, while(!(*recv_done) ) { opal_progress(); } - + /* reduce the data */ if( 0 < count_this_stripe ) { op_reduce(op_type,(void *)scratch_bufers[recv_buffer], (void *)scratch_bufers[send_buffer], n_my_count,TYPE_INT4); } - + /* get ready for next step */ index_read=(exchange&1); index_write=((exchange+1)&1); @@ -287,15 +287,15 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, while(!(*send_done) ) { opal_progress(); } - + } /* copy data in from the "extra" source, if need be */ if(0 < my_exchange_node->n_extra_sources) { if ( EXTRA_NODE == my_exchange_node->node_type ) { - /* - ** receive the data + /* + ** receive the data ** */ extra_rank=my_exchange_node->rank_extra_source; @@ -334,7 +334,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, /* copy data from the temp buffer into the output buffer */ rbuf_current=(char *)rbuf+count_processed*dt_size; memcopy(scratch_bufers[recv_buffer],rbuf_current,count_this_stripe*dt_size); - + /* update the count of elements processed */ count_processed+=count_this_stripe; } diff --git a/ompi/patterns/net/netpatterns.h b/ompi/patterns/net/netpatterns.h index 330d090eda4..e2ebb6ad627 100644 --- a/ompi/patterns/net/netpatterns.h +++ b/ompi/patterns/net/netpatterns.h @@ -36,7 +36,7 @@ OMPI_DECLSPEC extern int netpatterns_base_err(const char*, ...) __opal_attribute netpatterns_base_err args; \ netpatterns_base_err("\n"); \ } \ - } while(0); + } while(0); #else #define NETPATTERNS_VERBOSE(args) #endif @@ -116,7 +116,7 @@ struct netpatterns_narray_knomial_tree_node_t { /* Knomial recursive gather information */ struct netpatterns_k_exchange_node_t k_node; }; -typedef struct netpatterns_narray_knomial_tree_node_t +typedef struct netpatterns_narray_knomial_tree_node_t netpatterns_narray_knomial_tree_node_t; @@ -133,7 +133,7 @@ OMPI_DECLSPEC int netpatterns_setup_narray_knomial_tree( int tree_order, int my_ OMPI_DECLSPEC void netpatterns_cleanup_narray_knomial_tree (netpatterns_narray_knomial_tree_node_t *my_node); /* setup an multi-nomial tree - for each node in the tree - * this returns it's parent, and it's children + * this returns it's parent, and it's children */ OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nodes, netpatterns_tree_node_t *tree_nodes); diff --git a/ompi/patterns/net/netpatterns_base.c b/ompi/patterns/net/netpatterns_base.c index 078bb1a4fc2..bc51490def5 100644 --- a/ompi/patterns/net/netpatterns_base.c +++ b/ompi/patterns/net/netpatterns_base.c @@ -3,9 +3,9 @@ * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include @@ -47,7 +47,7 @@ static int was_called = 0; if (0 == was_called) { was_called = 1; - + return netpatterns_register_mca_params(); } diff --git a/ompi/patterns/net/netpatterns_knomial_tree.c b/ompi/patterns/net/netpatterns_knomial_tree.c index 491b5fda0c4..f09ef968fb7 100644 --- a/ompi/patterns/net/netpatterns_knomial_tree.c +++ b/ompi/patterns/net/netpatterns_knomial_tree.c @@ -45,7 +45,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( int k_temp2; int myid, reindex_myid = 0; int base, peer_base,base_temp; - int peer; + int peer; int *prev_data = NULL; int *current_data = NULL; int *group_info = NULL; @@ -64,8 +64,8 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( /* k-nomial radix */ exchange_node->tree_order = tree_order; - /* Calculate the number of levels in the tree for - * the largest power of tree_order less than or + /* Calculate the number of levels in the tree for + * the largest power of tree_order less than or * equal to the group size */ n_levels = 0; @@ -74,8 +74,8 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( cnt *= tree_order; n_levels++; } - /* this is the actual number of recusive k-ing steps - * we will perform, the last step may not be a full + /* this is the actual number of recusive k-ing steps + * we will perform, the last step may not be a full * step depending on the outcome of the next conditional */ pow_k = n_levels; @@ -91,7 +91,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( exchange_node->log_tree_order = pow_k; exchange_node->n_largest_pow_tree_order = cnt; - + /* find the number of complete groups of size tree_order, tree_order^2, tree_order^3,...,tree_order^pow_k */ /* I don't think we need to cache this info this group_info array */ group_info = (int *) calloc(pow_k , sizeof(int)); @@ -110,11 +110,11 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( } knt--; /*fprintf(stderr,"Maximal power of k is %d and the number of incomplete groups is %d \n", knt+1 ,tree_order - group_info[knt] );*/ - + /* k_temp is a synonym for cnt which is the largest full power of k group */ - /* now, start the calculation to find the first stray rank aka "extra" rank */ + /* now, start the calculation to find the first stray rank aka "extra" rank */ stray = 0; - /*fprintf(stderr,"Maximal power of k %d, first stragler rank is %d and the number of straglers is %d\n",cnt, + /*fprintf(stderr,"Maximal power of k %d, first stragler rank is %d and the number of straglers is %d\n",cnt, cnt*group_info[knt], num_nodes - cnt*group_info[knt]);*/ @@ -212,9 +212,9 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( } } - /* intialize the payload array - This is the money struct, just need to initialize this with - the subgroup information */ + /* intialize the payload array + This is the money struct, just need to initialize this with + the subgroup information */ /* for(i = 0; i < num_nodes; i++){ prev_data[i] = 1; @@ -227,8 +227,8 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( current_data[i] = hier_ranks[i]; } - /* everyone will need to do this loop over all ranks - * Phase I calculate the contribution from the extra ranks + /* everyone will need to do this loop over all ranks + * Phase I calculate the contribution from the extra ranks */ for( myid = 0; myid < num_nodes; myid++) { /* get my new rank */ @@ -268,7 +268,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( break; } } - if( reindex_myid < stray ) { + if( reindex_myid < stray ) { /* now start the actual algorithm */ FIND_BASE(base,reindex_myid,i+1,tree_order); for( j = 0; j < ( tree_order - 1 ); j ++ ) { @@ -280,19 +280,19 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( exchange_node->payload_info[i][j].r_len = prev_data[exchange_node->reindex_map[peer]]; /*fprintf(stderr,"exchange_node->payload_info[%d][%d].r_len %d\n",i,j,prev_data[exchange_node->reindex_map[peer]]);*/ if( i > 0 ) { - + /* find my len and offset */ FIND_BASE(peer_base,peer,i,tree_order); /* I do not want to mess with this, but it seems that I have no choice */ ex_node = exchange_node->reindex_map[peer_base]; /* now, find out how far down the line this guy really is */ knt2 =0; - for(kk = 0; kk < ex_node; kk++){ + for(kk = 0; kk < ex_node; kk++){ knt2 += hier_ranks[kk]; } - exchange_node->payload_info[i][j].r_offset = knt2; + exchange_node->payload_info[i][j].r_offset = knt2; /*fprintf(stderr,"exchange_node->payload_info[%d][%d].r_offset %d\n",i,j,exchange_node->payload_info[i][j].r_offset);*/ - + FIND_BASE(base_temp,reindex_myid,i,tree_order); ex_node = exchange_node->reindex_map[base_temp]; knt2 = 0; @@ -315,7 +315,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( for(kk = 0; kk < myid; kk++){ knt2 += hier_ranks[kk]; } - exchange_node->payload_info[i][j].s_offset = knt2; + exchange_node->payload_info[i][j].s_offset = knt2; /*fprintf(stderr,"exchange_node->payload_info[%d][%d].s_offset %d\n",i,j, exchange_node->payload_info[i][j].s_offset);*/ } /* how much I am to receive from this peer on this level */ @@ -345,7 +345,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( prev_data[j] = current_data[j]; } /* fprintf(stderr,"\n");*/ - + } @@ -368,7 +368,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( exchange_node->n_extra_sources = 0; for( i = stray; i < num_nodes; i++) { if(exchange_node->reindex_myid == ( i - cnt )) { - /* then I am a proxy rank and there is only a + /* then I am a proxy rank and there is only a * single extra source */ exchange_node->n_extra_sources = 1; @@ -407,7 +407,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( /* initialize this */ exchange_node->n_actual_exchanges = 0; /* Allocate 2 dimension array thak keeps - rank exchange information for each step*/ + rank exchange information for each step*/ exchange_node->rank_exchanges = (int **) malloc (exchange_node->n_exchanges * sizeof(int *)); if(NULL == exchange_node->rank_exchanges) { @@ -434,12 +434,12 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( if ( peer < stray ) { exchange_node->rank_exchanges[i][j] = exchange_node->reindex_map[peer]; /* an actual exchange occurs, bump the counter */ - + } else { /* out of range, skip it - do not bump the n_actual_exchanges counter */ exchange_node->rank_exchanges[i][j] = -1; } - + } k_temp1 *= tree_order; k_temp2 *= tree_order; @@ -465,7 +465,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( */ /* do we need this one */ exchange_node->n_tags = tree_order * n_levels + 1; - + free(prev_data); free(current_data); free(group_info); @@ -538,7 +538,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( /* local variables */ int i, j, tmp, cnt; int n_levels; - int k_base, kpow_num, peer; + int k_base, kpow_num, peer; NETPATTERNS_VERBOSE( ("Enter netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", @@ -624,7 +624,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( if (EXCHANGE_NODE == exchange_node->node_type) { exchange_node->n_exchanges = n_levels; /* Allocate 2 dimension array thak keeps - rank exchange information for each step*/ + rank exchange information for each step*/ exchange_node->rank_exchanges = (int **) malloc (exchange_node->n_exchanges * sizeof(int *)); if(NULL == exchange_node->rank_exchanges) { @@ -638,18 +638,18 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( } } /* fill in exchange partners */ - for(i = 0, kpow_num = 1; i < exchange_node->n_exchanges; + for(i = 0, kpow_num = 1; i < exchange_node->n_exchanges; i++, kpow_num *= tree_order) { k_base = node_rank / (kpow_num * tree_order); for(j = 1; j < tree_order; j++) { peer = node_rank + kpow_num * j; if (k_base != peer/(kpow_num * tree_order)) { /* Wraparound the number */ - peer = k_base * (kpow_num * tree_order) + + peer = k_base * (kpow_num * tree_order) + peer % (kpow_num * tree_order); } exchange_node->rank_exchanges[i][j - 1] = peer; - NETPATTERNS_VERBOSE(("rank_exchanges#(%d,%d)/%d = %d", + NETPATTERNS_VERBOSE(("rank_exchanges#(%d,%d)/%d = %d", i, j, tree_order, peer)); } } @@ -696,7 +696,7 @@ OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_tree_node( } } -#if 1 +#if 1 OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order, netpatterns_pair_exchange_node_t *exchange_node) { @@ -858,7 +858,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_tree_node(int num_nodes, return netpatterns_setup_recursive_doubling_n_tree_node(num_nodes, node_rank, 2, exchange_node); } -#if 0 +#if 0 /*OMPI_DECLSPEC int old_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,*/ OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank,int tree_order, netpatterns_pair_exchange_node_t *exchange_node) diff --git a/ompi/patterns/net/netpatterns_knomial_tree.h b/ompi/patterns/net/netpatterns_knomial_tree.h index 6ff89cd692e..a5736a1d877 100644 --- a/ompi/patterns/net/netpatterns_knomial_tree.h +++ b/ompi/patterns/net/netpatterns_knomial_tree.h @@ -44,7 +44,7 @@ struct netpatterns_pair_exchange_node_t { /* number of extra sources of data - outside largest power of 2 in * this group */ int n_extra_sources; - + /* rank of the extra source */ /* deprecated */ int rank_extra_source; int *rank_extra_sources_array; @@ -133,28 +133,28 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_allgather_tree_node( netpatterns_k_exchange_node_t *exchange_node); -/* Input: k_exchange_node structure - Output: index in rank_exchanges array that points - to the "start_point" for outgoing send. +/* Input: k_exchange_node structure + Output: index in rank_exchanges array that points + to the "start_point" for outgoing send. Please see below example of usage: - for (i = start_point ; i > 0; i--) - for (k = 0; k < tree_radix; k++) + for (i = start_point ; i > 0; i--) + for (k = 0; k < tree_radix; k++) send messages to exchange_node->rank_exchanges[i][k]; */ -static inline __opal_attribute_always_inline__ +static inline __opal_attribute_always_inline__ int netpatterns_get_knomial_level( - int my_rank, int src_rank, + int my_rank, int src_rank, int radix, int size, int *k_level) { - int distance, + int distance, pow_k; int logk_level = 0; /* Calculate disctance from source of data */ - distance = src_rank - my_rank; + distance = src_rank - my_rank; /* Wrap around */ if (0 > distance) { @@ -175,7 +175,7 @@ int netpatterns_get_knomial_level( /* Input: my_rank, root, radix, size * Output: source of the data, offset in power of K */ -static inline __opal_attribute_always_inline__ +static inline __opal_attribute_always_inline__ int netpatterns_get_knomial_data_source( int my_rank, int root, int radix, int size, int *k_level, int *logk_level) @@ -184,12 +184,12 @@ int netpatterns_get_knomial_data_source( int step = 0; /* Calculate source of the data */ - while((0 == (root - my_rank) % level) + while((0 == (root - my_rank) % level) && (level <= size)) { level *= radix; ++step; - } - + } + *k_level = level/radix; *logk_level = step; return my_rank - (my_rank % level - root % level); @@ -199,7 +199,7 @@ int netpatterns_get_knomial_data_source( * k_level - that you get from netpatterns_get_knomial_data_source * k_step - some integer * Output: peer - next children in the tree - * Usage: + * Usage: * src = netpatterns_get_knomial_data_source( * my_rank, root, radix, size, * &k_level, &logk_level) diff --git a/ompi/patterns/net/netpatterns_multinomial_tree.c b/ompi/patterns/net/netpatterns_multinomial_tree.c index 14f5c42296e..54fc41f4c98 100644 --- a/ompi/patterns/net/netpatterns_multinomial_tree.c +++ b/ompi/patterns/net/netpatterns_multinomial_tree.c @@ -51,9 +51,9 @@ OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nod /* cummulative count of ranks */ while( 0 < result ) { result-=cnt; - cnt*=tree_order; + cnt*=tree_order; n_lvls_in_tree++; - }; + }; /* loop over tree levels */ n_nodes_in_this_level=1; @@ -65,7 +65,7 @@ OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nod for ( node=0 ; node < n_nodes_in_this_level ; node++ ) { /* get node index */ node_index++; - + /* break if reach group size */ if( node_index == num_nodes) { break; diff --git a/ompi/patterns/net/netpatterns_nary_tree.c b/ompi/patterns/net/netpatterns_nary_tree.c index d0e0b1a37e1..8635bb13a53 100644 --- a/ompi/patterns/net/netpatterns_nary_tree.c +++ b/ompi/patterns/net/netpatterns_nary_tree.c @@ -88,7 +88,7 @@ int netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes, /* tree_order consecutive ranks have the same parent */ my_node->parent_rank=cum_cnt-cnt/tree_order+my_rank_in_my_level/tree_order; } - + /* figure out number of levels in the tree */ n_lvls_in_tree=0; result=num_nodes; @@ -138,7 +138,7 @@ int netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes, for (lvl= start_index ; lvl <= end_index ; lvl++ ) { my_node->children_ranks[lvl-start_index]=lvl; } - } + } } /* set node type */ if( 0 == my_node->n_parents ) { @@ -226,13 +226,13 @@ int netpatterns_setup_narray_knomial_tree( cnt*=tree_order; } - my_node->rank_on_level = - my_rank_in_my_level = + my_node->rank_on_level = + my_rank_in_my_level = my_rank-cum_cnt; my_node->level_size = cnt; rc = netpatterns_setup_recursive_knomial_tree_node( - my_node->level_size, my_node->rank_on_level, + my_node->level_size, my_node->rank_on_level, tree_order, &my_node->k_node); if (OMPI_SUCCESS != rc) { goto Error; @@ -241,7 +241,7 @@ int netpatterns_setup_narray_knomial_tree( /* tree_order consecutive ranks have the same parent */ my_node->parent_rank=cum_cnt-cnt/tree_order+my_rank_in_my_level/tree_order; } - + /* figure out number of levels in the tree */ n_lvls_in_tree=0; result=num_nodes; @@ -296,7 +296,7 @@ int netpatterns_setup_narray_knomial_tree( for (lvl= start_index ; lvl <= end_index ; lvl++ ) { my_node->children_ranks[lvl-start_index]=lvl; } - } + } } /* set node type */ if( 0 == my_node->n_parents ) { @@ -345,7 +345,7 @@ static int fill_in_node_data(int tree_order, int num_nodes, int my_node, /* local variables */ int rc, num_ranks_per_child, num_children, n_extra; int child, rank, n_to_offset, n_ranks_to_child; - + /* figure out who are my children */ num_ranks_per_child=num_nodes/tree_order; if( num_ranks_per_child ) { @@ -393,7 +393,7 @@ static int fill_in_node_data(int tree_order, int num_nodes, int my_node, rank=my_node+1+child*num_ranks_per_child; rank+=n_to_offset; - /* set parent information */ + /* set parent information */ nodes_data[rank].n_parents=1; nodes_data[rank].parent_rank=my_node; @@ -401,7 +401,7 @@ static int fill_in_node_data(int tree_order, int num_nodes, int my_node, if(n_extra && (child < n_extra) ) { n_ranks_to_child++; } - + /* set child information */ nodes_data[my_node].children_ranks[child]=rank; @@ -431,7 +431,7 @@ static int fill_in_node_data(int tree_order, int num_nodes, int my_node, * appropriate communication pattern for such roots. */ OMPI_DECLSPEC int netpatterns_setup_narray_tree_contigous_ranks( - int tree_order, int num_nodes, + int tree_order, int num_nodes, netpatterns_tree_node_t **tree_nodes) { /* local variables */ @@ -448,7 +448,7 @@ OMPI_DECLSPEC int netpatterns_setup_narray_tree_contigous_ranks( } (*tree_nodes)[0].n_parents=0; - rc=fill_in_node_data(tree_order, + rc=fill_in_node_data(tree_order, num_descendent_ranks, 0, *tree_nodes); /* successful return */ diff --git a/ompi/peruse/Makefile.am b/ompi/peruse/Makefile.am index 8cc29d03b48..1e650b1eee4 100644 --- a/ompi/peruse/Makefile.am +++ b/ompi/peruse/Makefile.am @@ -3,12 +3,12 @@ # Copyright (c) 2004-2006 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/peruse/peruse-internal.h b/ompi/peruse/peruse-internal.h index 005ab1e6c57..ce5008d0217 100644 --- a/ompi/peruse/peruse-internal.h +++ b/ompi/peruse/peruse-internal.h @@ -2,12 +2,12 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef _PERUSE_INTERNAL_H_ diff --git a/ompi/peruse/peruse.c b/ompi/peruse/peruse.c index 743aca74ad9..ef9680b79a6 100644 --- a/ompi/peruse/peruse.c +++ b/ompi/peruse/peruse.c @@ -2,12 +2,12 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/peruse/peruse.h b/ompi/peruse/peruse.h index 924a7e5868b..f1f0d817219 100644 --- a/ompi/peruse/peruse.h +++ b/ompi/peruse/peruse.h @@ -2,14 +2,14 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/peruse/peruse_module.c b/ompi/peruse/peruse_module.c index 0d3873cf7b2..5f19168700f 100644 --- a/ompi/peruse/peruse_module.c +++ b/ompi/peruse/peruse_module.c @@ -3,12 +3,12 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/proc/Makefile.am b/ompi/proc/Makefile.am index 9b245d43e9c..efeff61bc53 100644 --- a/ompi/proc/Makefile.am +++ b/ompi/proc/Makefile.am @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/ompi/proc/proc.c b/ompi/proc/proc.c index 701fb4f7d14..99f3d03bd99 100644 --- a/ompi/proc/proc.c +++ b/ompi/proc/proc.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -479,7 +479,7 @@ int ompi_proc_refresh(void) OPAL_THREAD_UNLOCK(&ompi_proc_lock); - return ret; + return ret; } int @@ -488,9 +488,9 @@ ompi_proc_pack(ompi_proc_t **proclist, int proclistsize, opal_buffer_t* buf) { int i, rc; - + OPAL_THREAD_LOCK(&ompi_proc_lock); - + /* cycle through the provided array, packing the OMPI level * data for each proc. This data may or may not be included * in any subsequent modex operation, so we include it here @@ -538,7 +538,7 @@ ompi_proc_pack(ompi_proc_t **proclist, int proclistsize, OMPI_ERROR_LOG(rc); break; } - + /* if there are entries, store them */ while (NULL != (kv = (opal_value_t*)opal_list_remove_first(&data))) { if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &kv, 1, OPAL_VALUE))) { @@ -573,7 +573,7 @@ ompi_proc_find_and_add(const ompi_process_name_t * name, bool* isnew) { ompi_proc_t *proc, *rproc = NULL; ompi_rte_cmp_bitmask_t mask; - + /* return the proc-struct which matches this jobid+process id */ mask = OMPI_RTE_CMP_JOBID | OMPI_RTE_CMP_VPID; OPAL_THREAD_LOCK(&ompi_proc_lock); @@ -586,7 +586,7 @@ ompi_proc_find_and_add(const ompi_process_name_t * name, bool* isnew) break; } } - + /* if we didn't find this proc in the list, create a new * proc_t and append it to the list */ @@ -600,15 +600,15 @@ ompi_proc_find_and_add(const ompi_process_name_t * name, bool* isnew) /* caller had better fill in the rest of the proc, or there's going to be pain later... */ } - + OPAL_THREAD_UNLOCK(&ompi_proc_lock); - + return rproc; } int -ompi_proc_unpack(opal_buffer_t* buf, +ompi_proc_unpack(opal_buffer_t* buf, int proclistsize, ompi_proc_t ***proclist, bool full_info, int *newproclistsize, ompi_proc_t ***newproclist) @@ -753,7 +753,7 @@ ompi_proc_unpack(opal_buffer_t* buf, #else opal_show_help("help-mpi-runtime.txt", "heterogeneous-support-unavailable", - true, ompi_process_info.nodename, + true, ompi_process_info.nodename, new_hostname == NULL ? "" : new_hostname); free(plist); diff --git a/ompi/proc/proc.h b/ompi/proc/proc.h index 6fa7c14b141..649a222bd71 100644 --- a/ompi/proc/proc.h +++ b/ompi/proc/proc.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ BEGIN_C_DECLS /** * Remote Open MPI process structure - * + * * Remote Open MPI process structure. Each process contains exactly * one ompi_proc_t structure for each remote process it knows about. * @@ -59,7 +59,7 @@ BEGIN_C_DECLS * should call OMPI_REQUIRE_ENDPOINT_TAG(). Requests which * share the same name will have the same value, allowing * cross-component sharing of endpoint data. The tag may be referenced - * by the pre-processor define OMPI_PROC_ENDPOINT_TAG_. Adding + * by the pre-processor define OMPI_PROC_ENDPOINT_TAG_. Adding * a tag increases the memory consumed by Open MPI, so should only be done * if unavoidable. */ @@ -200,14 +200,14 @@ OMPI_DECLSPEC ompi_proc_t** ompi_proc_self(size_t* size); * * @return Pointer to the local process structure */ -static inline ompi_proc_t* ompi_proc_local(void) -{ +static inline ompi_proc_t* ompi_proc_local(void) +{ return ompi_proc_local_proc; } /** - * Returns the proc instance for a given name + * Returns the proc instance for a given name * * Returns the proc instance for the specified process name. The * reference count for the proc instance is not incremented by this @@ -228,10 +228,10 @@ OMPI_DECLSPEC ompi_proc_t * ompi_proc_find ( const ompi_process_name_t* name ); * process name, the architecture, and the hostname. Ordering is * maintained. The buffer is packed to be sent to a remote node with * different architecture (endian or word size). - * + * * @param[in] proclist List of process pointers * @param[in] proclistsize Length of the proclist array - * @param[in,out] buf An opal_buffer containing the packed names. + * @param[in,out] buf An opal_buffer containing the packed names. * The buffer must be constructed but empty when * passed to this function * @retval OMPI_SUCCESS Success @@ -281,7 +281,7 @@ OMPI_DECLSPEC int ompi_proc_pack(ompi_proc_t **proclist, int proclistsize, * OMPI_SUCCESS on success * OMPI_ERROR else */ -OMPI_DECLSPEC int ompi_proc_unpack(opal_buffer_t *buf, +OMPI_DECLSPEC int ompi_proc_unpack(opal_buffer_t *buf, int proclistsize, ompi_proc_t ***proclist, bool full_info, int *newproclistsize, ompi_proc_t ***newproclist); diff --git a/ompi/request/Makefile.am b/ompi/request/Makefile.am index 14732387213..7516ee1b2e5 100644 --- a/ompi/request/Makefile.am +++ b/ompi/request/Makefile.am @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/ompi/request/grequest.c b/ompi/request/grequest.c index 6ac5e9a9517..1721679e5fc 100644 --- a/ompi/request/grequest.c +++ b/ompi/request/grequest.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -50,7 +50,7 @@ static int ompi_grequest_cancel(ompi_request_t* req, int flag) if (greq->greq_cancel.c_cancel != NULL) { if (greq->greq_funcs_are_c) { - rc = greq->greq_cancel.c_cancel(greq->greq_state, + rc = greq->greq_cancel.c_cancel(greq->greq_state, greq->greq_base.req_complete); } else { fflag = (ompi_fortran_logical_t) greq->greq_base.req_complete; @@ -89,7 +89,7 @@ static void ompi_grequest_construct(ompi_grequest_t* greq) * object. * * 2. Call MPI_REQUEST_FREE and then (!) -- with some other - * still-valid copy of the handler -- call MPI_GREQUEST_COMPLETE. + * still-valid copy of the handler -- call MPI_GREQUEST_COMPLETE. * * 3. Reverse the order of #2 -- call MPI_GREQUEST_COMPLETE and then * MPI_REQUEST_FREE. @@ -161,7 +161,7 @@ int ompi_grequest_start( greq->greq_state = gstate; greq->greq_query.c_query = gquery_fn; greq->greq_free.c_free = gfree_fn; - greq->greq_cancel.c_cancel = gcancel_fn; + greq->greq_cancel.c_cancel = gcancel_fn; greq->greq_base.req_status = ompi_status_empty; *request = &greq->greq_base; @@ -192,7 +192,7 @@ int ompi_grequest_complete(ompi_request_t *req) /* * Grequest queries are invoked in two places: * - * 1. MPI_TEST* / MPI_WAIT*, when requests have completed. + * 1. MPI_TEST* / MPI_WAIT*, when requests have completed. * * 2. MPI_REQUEST_GET_STATUS, when requests may or may not have * completed. diff --git a/ompi/request/grequest.h b/ompi/request/grequest.h index 9ef38639cd6..c1b7fb71c4e 100644 --- a/ompi/request/grequest.h +++ b/ompi/request/grequest.h @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,19 +29,19 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_grequest_t); /** * Fortran type for generalized request query function */ -typedef void (MPI_F_Grequest_query_function)(MPI_Aint *extra_state, - MPI_Fint *status, +typedef void (MPI_F_Grequest_query_function)(MPI_Aint *extra_state, + MPI_Fint *status, MPI_Fint *ierr); /** * Fortran type for generalized request free function */ -typedef void (MPI_F_Grequest_free_function)(MPI_Aint *extra_state, +typedef void (MPI_F_Grequest_free_function)(MPI_Aint *extra_state, MPI_Fint *ierr); /** * Fortran type for generalized request cancel function */ -typedef void (MPI_F_Grequest_cancel_function)(MPI_Aint *extra_state, - ompi_fortran_logical_t *complete, +typedef void (MPI_F_Grequest_cancel_function)(MPI_Aint *extra_state, + ompi_fortran_logical_t *complete, MPI_Fint *ierr); /** diff --git a/ompi/request/req_wait.c b/ompi/request/req_wait.c index 8c4e2ce9331..1ff4d858f3b 100644 --- a/ompi/request/req_wait.c +++ b/ompi/request/req_wait.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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. @@ -13,9 +13,9 @@ * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ int ompi_request_default_wait( #if OPAL_ENABLE_FT_CR == 1 OMPI_CRCP_REQUEST_COMPLETE(req); #endif - + /* return status. If it's a generalized request, we *have* to invoke the query_fn, even if the user procided STATUS_IGNORE. MPI-2:8.2. */ diff --git a/ompi/request/request.c b/ompi/request/request.c index 86155d7290b..af420bc7abc 100644 --- a/ompi/request/request.c +++ b/ompi/request/request.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -18,9 +18,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/request/request.h b/ompi/request/request.h index df58a7e1b94..f26ceed8f85 100644 --- a/ompi/request/request.h +++ b/ompi/request/request.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -46,7 +46,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_request_t); /* * The following include pulls in shared typedefs with debugger plugins. - * For more information on why we do this see the Notice to developers + * For more information on why we do this see the Notice to developers * comment at the top of the ompi_msgq_dll.c file. */ @@ -62,7 +62,7 @@ typedef int (*ompi_request_free_fn_t)(struct ompi_request_t** rptr); /* * Optional function to cancel a pending request. */ -typedef int (*ompi_request_cancel_fn_t)(struct ompi_request_t* request, int flag); +typedef int (*ompi_request_cancel_fn_t)(struct ompi_request_t* request, int flag); /* * Optional function called when the request is completed from the MPI @@ -96,7 +96,7 @@ typedef union ompi_mpi_object_t { } ompi_mpi_object_t; /** - * Main top-level request struct definition + * Main top-level request struct definition */ struct ompi_request_t { opal_free_list_item_t super; /**< Base type */ @@ -143,7 +143,7 @@ typedef struct ompi_predefined_request_t ompi_predefined_request_t; (request)->req_complete = false; \ (request)->req_state = OMPI_REQUEST_INACTIVE; \ (request)->req_persistent = (persistent); \ - } while (0); + } while (0); /** * Finalize a request. This is a macro to avoid function call @@ -153,7 +153,7 @@ typedef struct ompi_predefined_request_t ompi_predefined_request_t; * * When finalizing a request, if MPI_Request_f2c() was previously * invoked on that request, then this request was added to the f2c - * table, and we need to remove it + * table, and we need to remove it * * This function should be called only from the MPI layer. It should * never be called from the PML. It take care of the upper level clean-up. @@ -168,7 +168,7 @@ do { \ (request)->req_f_to_c_index, NULL); \ (request)->req_f_to_c_index = MPI_UNDEFINED; \ } \ -} while (0); +} while (0); /** * Non-blocking test for request completion. diff --git a/ompi/request/request_dbg.h b/ompi/request/request_dbg.h index c25ae29f835..7251b96dc5b 100644 --- a/ompi/request/request_dbg.h +++ b/ompi/request/request_dbg.h @@ -2,9 +2,9 @@ /* * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OMPI_REQUEST_DBG_H @@ -12,7 +12,7 @@ /* * This file contains definitions used by both OMPI and debugger plugins. - * For more information on why we do this see the Notice to developers + * For more information on why we do this see the Notice to developers * comment at the top of the ompi_msgq_dll.c file. */ diff --git a/ompi/request/request_default.h b/ompi/request/request_default.h index e7f82a4b6c8..01319098705 100644 --- a/ompi/request/request_default.h +++ b/ompi/request/request_default.h @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/runtime/Makefile.am b/ompi/runtime/Makefile.am index 128601e1ed8..95e2d7dbd2f 100644 --- a/ompi/runtime/Makefile.am +++ b/ompi/runtime/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2006-2009 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/runtime/help-mpi-runtime.txt b/ompi/runtime/help-mpi-runtime.txt index 927087f5c3d..0db4654d976 100644 --- a/ompi/runtime/help-mpi-runtime.txt +++ b/ompi/runtime/help-mpi-runtime.txt @@ -6,16 +6,16 @@ # 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, +# 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-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI. @@ -52,14 +52,14 @@ parameter checking has been compiled out of Open MPI. The mpi_param_check value has therefore been ignored. [mpi_finalize:invoked_multiple_times] The function MPI_FINALIZE was invoked multiple times in a single -process on host %s, PID %d. +process on host %s, PID %d. This indicates an erroneous MPI program; MPI_FINALIZE is only allowed to be invoked exactly once in a process. # [proc:heterogeneous-support-unavailable] -The build of Open MPI running on host %s was not -compiled with heterogeneous support. A process running on host +The build of Open MPI running on host %s was not +compiled with heterogeneous support. A process running on host %s appears to have a different architecture, which will not work. Please recompile Open MPI with the configure option --enable-heterogeneous or use a homogeneous diff --git a/ompi/runtime/mpiruntime.h b/ompi/runtime/mpiruntime.h index 9dd87420f2a..ec02a362543 100644 --- a/ompi/runtime/mpiruntime.h +++ b/ompi/runtime/mpiruntime.h @@ -5,20 +5,20 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2009 University of Houston. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -128,7 +128,7 @@ OMPI_DECLSPEC extern opal_list_t ompi_registered_datareps; /** In ompi_mpi_init: the lists of Fortran 90 mathing datatypes. * We need these lists and hashtables in order to satisfy the new - * requirements introduced in MPI 2-1 Sect. 10.2.5, + * requirements introduced in MPI 2-1 Sect. 10.2.5, * MPI_TYPE_CREATE_F90_xxxx, page 295, line 47. */ extern opal_hash_table_t ompi_mpi_f90_integer_hashtable; diff --git a/ompi/runtime/ompi_cr.c b/ompi/runtime/ompi_cr.c index 8278a01b760..804734c05ef 100644 --- a/ompi/runtime/ompi_cr.c +++ b/ompi/runtime/ompi_cr.c @@ -6,21 +6,21 @@ * 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, + * 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) 2012 The University of Wisconsin-La Crosse. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** @file - * +/** @file + * * OMPI Layer Checkpoint/Restart Runtime functions * */ @@ -131,22 +131,22 @@ notify_collectives(int msg) (ompi_communicator_t *)opal_pointer_array_get_item(&ompi_mpi_communicators, i); if (NULL == comm) continue; - SIGNAL(comm, modules, highest_module, msg, ret, allgather); - SIGNAL(comm, modules, highest_module, msg, ret, allgatherv); - SIGNAL(comm, modules, highest_module, msg, ret, allreduce); - SIGNAL(comm, modules, highest_module, msg, ret, alltoall); - SIGNAL(comm, modules, highest_module, msg, ret, alltoallv); - SIGNAL(comm, modules, highest_module, msg, ret, alltoallw); - SIGNAL(comm, modules, highest_module, msg, ret, barrier); - SIGNAL(comm, modules, highest_module, msg, ret, bcast); - SIGNAL(comm, modules, highest_module, msg, ret, exscan); - SIGNAL(comm, modules, highest_module, msg, ret, gather); - SIGNAL(comm, modules, highest_module, msg, ret, gatherv); - SIGNAL(comm, modules, highest_module, msg, ret, reduce); - SIGNAL(comm, modules, highest_module, msg, ret, reduce_scatter); - SIGNAL(comm, modules, highest_module, msg, ret, scan); - SIGNAL(comm, modules, highest_module, msg, ret, scatter); - SIGNAL(comm, modules, highest_module, msg, ret, scatterv); + SIGNAL(comm, modules, highest_module, msg, ret, allgather); + SIGNAL(comm, modules, highest_module, msg, ret, allgatherv); + SIGNAL(comm, modules, highest_module, msg, ret, allreduce); + SIGNAL(comm, modules, highest_module, msg, ret, alltoall); + SIGNAL(comm, modules, highest_module, msg, ret, alltoallv); + SIGNAL(comm, modules, highest_module, msg, ret, alltoallw); + SIGNAL(comm, modules, highest_module, msg, ret, barrier); + SIGNAL(comm, modules, highest_module, msg, ret, bcast); + SIGNAL(comm, modules, highest_module, msg, ret, exscan); + SIGNAL(comm, modules, highest_module, msg, ret, gather); + SIGNAL(comm, modules, highest_module, msg, ret, gatherv); + SIGNAL(comm, modules, highest_module, msg, ret, reduce); + SIGNAL(comm, modules, highest_module, msg, ret, reduce_scatter); + SIGNAL(comm, modules, highest_module, msg, ret, scan); + SIGNAL(comm, modules, highest_module, msg, ret, scatter); + SIGNAL(comm, modules, highest_module, msg, ret, scatterv); } return OMPI_SUCCESS; @@ -156,7 +156,7 @@ notify_collectives(int msg) /* * CR Init */ -int ompi_cr_init(void) +int ompi_cr_init(void) { /* * Register some MCA variables @@ -177,7 +177,7 @@ int ompi_cr_init(void) opal_output_verbose(10, ompi_cr_output, "ompi_cr: init: ompi_cr_init()"); - + /* Register the OMPI interlevel coordination callback */ opal_cr_reg_coord_callback(ompi_cr_coord, &prev_coord_callback); @@ -238,14 +238,14 @@ int ompi_cr_finalize(void) { opal_output_verbose(10, ompi_cr_output, "ompi_cr: finalize: ompi_cr_finalize()"); - + return OMPI_SUCCESS; } /* * Interlayer coordination callback */ -int ompi_cr_coord(int state) +int ompi_cr_coord(int state) { int ret, exit_status = OMPI_SUCCESS; @@ -254,7 +254,7 @@ int ompi_cr_coord(int state) opal_crs_base_state_str((opal_crs_state_type_t)state)); /* - * Before calling the previous callback, we have the opportunity to + * Before calling the previous callback, we have the opportunity to * take action given the state. */ if(OPAL_CRS_CHECKPOINT == state) { @@ -291,10 +291,10 @@ int ompi_cr_coord(int state) exit_status = ret; goto cleanup; } - - + + /* - * After calling the previous callback, we have the opportunity to + * After calling the previous callback, we have the opportunity to * take action given the state to tidy up. */ if(OPAL_CRS_CHECKPOINT == state) { @@ -362,7 +362,7 @@ static int ompi_cr_coord_pre_ckpt(void) { if (OMPI_SUCCESS != (ret = notify_collectives(OPAL_CR_CHECKPOINT))) { goto cleanup; } - + /* * Notify PML * - Will notify BML and BTL's @@ -371,7 +371,7 @@ static int ompi_cr_coord_pre_ckpt(void) { exit_status = ret; goto cleanup; } - + cleanup: return exit_status; @@ -395,10 +395,10 @@ static int ompi_cr_coord_pre_restart(void) { goto cleanup; } - cleanup: + cleanup: return exit_status; } - + static int ompi_cr_coord_pre_continue(void) { #if OPAL_ENABLE_FT_CR == 1 int ret, exit_status = OMPI_SUCCESS; @@ -428,7 +428,7 @@ static int ompi_cr_coord_pre_continue(void) { OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCP1); } - cleanup: + cleanup: return exit_status; #else return OMPI_SUCCESS; @@ -472,7 +472,7 @@ static int ompi_cr_coord_post_restart(void) { if (OMPI_SUCCESS != (ret = notify_collectives(OPAL_CRS_RESTART))) { goto cleanup; } - + cleanup: return exit_status; diff --git a/ompi/runtime/ompi_cr.h b/ompi/runtime/ompi_cr.h index e23e56edc16..aa07eec338c 100644 --- a/ompi/runtime/ompi_cr.h +++ b/ompi/runtime/ompi_cr.h @@ -5,19 +5,19 @@ * 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, + * 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 +/** + * @file * * Checkpoint/Restart Functionality for the OMPI layer */ diff --git a/ompi/runtime/ompi_mpi_abort.c b/ompi/runtime/ompi_mpi_abort.c index 8f9e89a5da9..278711b0564 100644 --- a/ompi/runtime/ompi_mpi_abort.c +++ b/ompi/runtime/ompi_mpi_abort.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -140,7 +140,7 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, if (OMPI_SUCCESS == opal_backtrace_buffer(&messages, &len)) { for (i = 0; i < len; ++i) { - fprintf(stderr, "[%s:%d] [%d] func:%s\n", host, (int) pid, + fprintf(stderr, "[%s:%d] [%d] func:%s\n", host, (int) pid, i, messages[i]); fflush(stderr); } @@ -156,9 +156,9 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, /* Notify the debugger that we're about to abort */ if (errcode < 0 || - asprintf(&msg, "[%s:%d] aborting with MPI error %s%s", - host, (int) pid, ompi_mpi_errnum_get_string(errcode), - ompi_mpi_abort_print_stack ? + asprintf(&msg, "[%s:%d] aborting with MPI error %s%s", + host, (int) pid, ompi_mpi_errnum_get_string(errcode), + ompi_mpi_abort_print_stack ? " (stack trace available on stderr)" : "") < 0) { msg = NULL; } @@ -174,8 +174,8 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, fprintf(stderr ,"[%s:%d] Looping forever (MCA parameter mpi_abort_delay is < 0)\n", host, (int) pid); fflush(stderr); - while (1) { - sleep(5); + while (1) { + sleep(5); } } else { fprintf(stderr, "[%s:%d] Delaying for %d seconds before aborting\n", @@ -190,7 +190,7 @@ ompi_mpi_abort(struct ompi_communicator_t* comm, killing everyone. Sorry, Charlie... */ if (!ompi_rte_initialized) { fprintf(stderr, "[%s:%d] Local abort %s completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!\n", - host, (int) pid, ompi_mpi_finalized ? + host, (int) pid, ompi_mpi_finalized ? "after MPI_FINALIZE started" : "before MPI_INIT completed"); _exit(errcode == 0 ? 1 : errcode); } diff --git a/ompi/runtime/ompi_mpi_finalize.c b/ompi/runtime/ompi_mpi_finalize.c index c2473b65350..a522121c447 100644 --- a/ompi/runtime/ompi_mpi_finalize.c +++ b/ompi/runtime/ompi_mpi_finalize.c @@ -6,22 +6,22 @@ * 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, + * 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) 2006-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2006 University of Houston. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -157,7 +157,7 @@ int ompi_mpi_finalize(void) /* NOTE: MPI-2.1 requires that MPI_FINALIZE is "collective" across *all* connected processes. This only means that all processes have to call it. It does *not* mean that all connected - processes need to synchronize (either directly or indirectly). + processes need to synchronize (either directly or indirectly). For example, it is quite easy to construct complicated scenarios where one job is "connected" to another job via @@ -291,8 +291,8 @@ int ompi_mpi_finalize(void) MCA_PML_CALL(del_procs(procs, nprocs)); free(procs); - /* free pml resource */ - if(OMPI_SUCCESS != (ret = mca_pml_base_finalize())) { + /* free pml resource */ + if(OMPI_SUCCESS != (ret = mca_pml_base_finalize())) { return ret; } @@ -347,17 +347,17 @@ int ompi_mpi_finalize(void) if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_pubsub_base_framework) ) ) { return ret; } - + /* finalize the DPM framework */ if ( OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_dpm_base_framework))) { return ret; } - + /* free internal error resources */ if (OMPI_SUCCESS != (ret = ompi_errcode_intern_finalize())) { return ret; } - + /* free error code resources */ if (OMPI_SUCCESS != (ret = ompi_mpi_errcode_finalize())) { return ret; diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 7edd98dc5ff..18cb4122d84 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -6,13 +6,13 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2006-2009 University of Houston. All rights reserved. * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. @@ -22,9 +22,9 @@ * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -105,7 +105,7 @@ implicity from libmpi, there are times when the malloc initialize hook in the memory component doesn't work. So we have to do it from here, since any MPI code is going to call MPI_Init... */ -OPAL_DECLSPEC void (*__malloc_initialize_hook) (void) = +OPAL_DECLSPEC void (*__malloc_initialize_hook) (void) = opal_memory_linux_malloc_init_hook; #endif @@ -238,7 +238,7 @@ MPI_Fint *MPI_F_STATUSES_IGNORE = NULL; The values are *NOT* initialized. We do not use the values of these constants; only their addresses (because they're always - passed by reference by Fortran). + passed by reference by Fortran). Initializing upon instantiation these can reveal size and/or alignment differences between Fortran and C (!) which can cause @@ -325,7 +325,7 @@ void ompi_mpi_thread_level(int requested, int *provided) ompi_mpi_main_thread = opal_thread_get_self(); } - ompi_mpi_thread_multiple = (ompi_mpi_thread_provided == + ompi_mpi_thread_multiple = (ompi_mpi_thread_provided == MPI_THREAD_MULTIPLE); } @@ -369,7 +369,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) /* bitflag of the thread level support provided. To be used * for the modex in order to work in heterogeneous environments. */ - uint8_t threadlevel_bf; + uint8_t threadlevel_bf; /* Indicate that we have *started* MPI_INIT*. MPI_FINALIZE has something sorta similar in a static local variable in @@ -456,7 +456,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } ompi_rte_initialized = true; - + /* check for timing request - get stop time and report elapsed time if so */ OPAL_TIMING_MNEXT((&tm,"time from completion of rte_init to modex")); @@ -530,7 +530,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) error = "ompi_op_base_open() failed"; goto error; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = ompi_op_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, ompi_mpi_thread_multiple))) { error = "ompi_op_base_find_available() failed"; @@ -588,14 +588,14 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) /* Select which MPI components to use */ - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_mpool_base_init(OPAL_ENABLE_PROGRESS_THREADS, ompi_mpi_thread_multiple))) { error = "mca_mpool_base_init() failed"; goto error; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_pml_base_select(OPAL_ENABLE_PROGRESS_THREADS, ompi_mpi_thread_multiple))) { error = "mca_pml_base_select() failed"; @@ -621,14 +621,14 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_coll_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, ompi_mpi_thread_multiple))) { error = "mca_coll_base_find_available() failed"; goto error; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = ompi_osc_base_find_available(OPAL_ENABLE_PROGRESS_THREADS, ompi_mpi_thread_multiple))) { error = "ompi_osc_base_find_available() failed"; @@ -674,13 +674,13 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) error = "ompi_mpi_errcode_init() failed"; goto error; } - + /* initialize internal error codes */ if (OMPI_SUCCESS != (ret = ompi_errcode_intern_init())) { error = "ompi_errcode_intern_init() failed"; goto error; } - + /* initialize groups */ if (OMPI_SUCCESS != (ret = ompi_group_init())) { error = "ompi_group_init() failed"; @@ -753,8 +753,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) * Dump all MCA parameters if requested */ if (ompi_mpi_show_mca_params) { - ompi_show_all_mca_params(ompi_mpi_comm_world.comm.c_my_rank, - nprocs, + ompi_show_all_mca_params(ompi_mpi_comm_world.comm.c_my_rank, + nprocs, ompi_process_info.nodename); } @@ -782,7 +782,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) latency. */ opal_progress_set_event_flag(OPAL_EVLOOP_NONBLOCK); #endif - + /* wire up the mpi interface, if requested. Do this after the non-block switch for non-TCP performance. Do before the polling change as anyone with a complex wire-up is going to be @@ -801,7 +801,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) error = "ompi_pubsub_base_select() failed"; goto error; } - + /* Setup the dynamic process management (DPM) framework */ if (OMPI_SUCCESS != (ret = mca_base_framework_open(&ompi_dpm_base_framework, 0))) { error = "ompi_dpm_base_open() failed"; @@ -812,19 +812,19 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } - /* Determine the overall threadlevel support of all processes - in MPI_COMM_WORLD. This has to be done before calling + /* Determine the overall threadlevel support of all processes + in MPI_COMM_WORLD. This has to be done before calling coll_base_comm_select, since some of the collective components e.g. hierarch, might create subcommunicators. The threadlevel requested by all processes is required in order to know which cid allocation algorithm can be used. */ - if ( OMPI_SUCCESS != + if ( OMPI_SUCCESS != ( ret = ompi_comm_cid_init ())) { error = "ompi_mpi_init: ompi_comm_cid_init failed"; goto error; } - /* Init coll for the comms. This has to be after dpm_base_select, + /* Init coll for the comms. This has to be after dpm_base_select, (since dpm.mark_dyncomm is not set in the communicator creation function else), but before dpm.dyncom_init, since this function might require collective for the CID allocation. */ @@ -834,7 +834,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } - if (OMPI_SUCCESS != + if (OMPI_SUCCESS != (ret = mca_coll_base_comm_select(MPI_COMM_SELF))) { error = "mca_coll_base_comm_select(MPI_COMM_SELF) failed"; goto error; @@ -858,16 +858,16 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } - /* Undo OPAL calling opal_progress_event_users_increment() during - opal_init, to get better latency when not using TCP. Do - this *after* dyn_init, as dyn init uses lots of RTE - communication and we don't want to hinder the performance of - that code. */ - opal_progress_event_users_decrement(); + /* Undo OPAL calling opal_progress_event_users_increment() during + opal_init, to get better latency when not using TCP. Do + this *after* dyn_init, as dyn init uses lots of RTE + communication and we don't want to hinder the performance of + that code. */ + opal_progress_event_users_decrement(); /* see if yield_when_idle was specified - if so, use it */ opal_progress_set_yield_when_idle(ompi_mpi_yield_when_idle); - + /* negative value means use default - just don't do anything */ if (ompi_mpi_event_tick_rate >= 0) { opal_progress_set_event_poll_rate(ompi_mpi_event_tick_rate); diff --git a/ompi/runtime/ompi_mpi_params.c b/ompi/runtime/ompi_mpi_params.c index 7a607c792b4..021bf9b617f 100644 --- a/ompi/runtime/ompi_mpi_params.c +++ b/ompi/runtime/ompi_mpi_params.c @@ -6,19 +6,19 @@ * 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, + * 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) 2006-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -85,12 +85,12 @@ int ompi_mpi_register_params(void) MCA_BASE_VAR_SCOPE_READONLY, &ompi_mpi_param_check); if (ompi_mpi_param_check && !MPI_PARAM_CHECK) { - opal_show_help("help-mpi-runtime.txt", + opal_show_help("help-mpi-runtime.txt", "mpi-param-check-enabled-but-compiled-out", true); ompi_mpi_param_check = false; } - + /* * opal_progress: decide whether to yield and the event library * tick rate @@ -121,7 +121,7 @@ int ompi_mpi_register_params(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_debug_show_handle_leaks); - + /* Whether or not to free MPI handles. Useless without run-time param checking, so implicitly set that to true if we don't want to free the handles. */ @@ -163,7 +163,7 @@ int ompi_mpi_register_params(void) if (NULL != ompi_mpi_show_mca_params_string) { char **args; int i; - + ompi_mpi_show_mca_params = true; args = opal_argv_split(ompi_mpi_show_mca_params_string, ','); if (NULL == args) { @@ -201,7 +201,7 @@ int ompi_mpi_register_params(void) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mpi_show_mca_params_file); - + /* User-level process pinning controls */ /* MPI_ABORT controls */ @@ -265,7 +265,7 @@ int ompi_mpi_register_params(void) ompi_mpi_have_sparse_group_storage ? MCA_BASE_VAR_SCOPE_READONLY : MCA_BASE_VAR_SCOPE_CONSTANT, &ompi_use_sparse_group_storage); if (ompi_use_sparse_group_storage && !ompi_mpi_have_sparse_group_storage) { - opal_show_help("help-mpi-runtime.txt", + opal_show_help("help-mpi-runtime.txt", "sparse groups enabled but compiled out", true); ompi_use_sparse_group_storage = false; @@ -301,9 +301,9 @@ int ompi_show_all_mca_params(int32_t rank, int requested, char *nodename) { if (rank != 0) { return OMPI_SUCCESS; } - + timestamp = time(NULL); - + /* Open the file if one is specified */ if (0 != strlen(ompi_mpi_show_mca_params_file)) { if ( NULL == (fp = fopen(ompi_mpi_show_mca_params_file, "w")) ) { @@ -327,37 +327,37 @@ int ompi_show_all_mca_params(int32_t rank, int requested, char *nodename) { if (MCA_BASE_VAR_FLAG_INTERNAL & var->mbv_flags) { continue; } - + /* is this a default value and we are not displaying * defaults, ignore this one */ if (MCA_BASE_VAR_SOURCE_DEFAULT == var->mbv_source && !show_default_mca_params) { continue; } - + /* is this a file value and we are not displaying files, * ignore it */ if ((MCA_BASE_VAR_SOURCE_FILE == var->mbv_source || - MCA_BASE_VAR_SOURCE_OVERRIDE == var->mbv_source) && + MCA_BASE_VAR_SOURCE_OVERRIDE == var->mbv_source) && !show_file_mca_params) { continue; } - + /* is this an enviro value and we are not displaying enviros, * ignore it */ if (MCA_BASE_VAR_SOURCE_ENV == var->mbv_source && !show_enviro_mca_params) { continue; } - + /* is this an API value and we are not displaying APIs, * ignore it */ if (MCA_BASE_VAR_SOURCE_OVERRIDE == var->mbv_source && !show_override_mca_params) { continue; } - + ret = mca_base_var_dump (i, &var_dump, MCA_BASE_VAR_DUMP_SIMPLE); if (OPAL_SUCCESS != ret) { continue; @@ -372,11 +372,11 @@ int ompi_show_all_mca_params(int32_t rank, int requested, char *nodename) { free (var_dump[0]); free (var_dump); } - + /* Close file, cleanup allocated memory*/ if (0 != strlen(ompi_mpi_show_mca_params_file)) { fclose(fp); } - + return OMPI_SUCCESS; } diff --git a/ompi/runtime/ompi_mpi_preconnect.c b/ompi/runtime/ompi_mpi_preconnect.c index 12960b1b52e..79008c26439 100644 --- a/ompi/runtime/ompi_mpi_preconnect.c +++ b/ompi/runtime/ompi_mpi_preconnect.c @@ -6,11 +6,11 @@ * reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -60,13 +60,13 @@ ompi_init_preconnect_mpi(void) ret = MCA_PML_CALL(isend(outbuf, 1, MPI_CHAR, next, 1, MCA_PML_BASE_SEND_COMPLETE, - MPI_COMM_WORLD, + MPI_COMM_WORLD, &requests[1])); if (OMPI_SUCCESS != ret) return ret; ret = MCA_PML_CALL(irecv(inbuf, 1, MPI_CHAR, prev, 1, - MPI_COMM_WORLD, + MPI_COMM_WORLD, &requests[0])); if(OMPI_SUCCESS != ret) return ret; diff --git a/ompi/runtime/params.h b/ompi/runtime/params.h index ff46f2a4a70..e5edda3825a 100644 --- a/ompi/runtime/params.h +++ b/ompi/runtime/params.h @@ -5,19 +5,19 @@ * 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, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -84,7 +84,7 @@ OMPI_DECLSPEC extern bool ompi_debug_no_free_handles; /** * Whether or not to print MCA parameters on MPI_INIT * - * This is good debugging for user applications to see exactly which + * This is good debugging for user applications to see exactly which * MCA parameters are being used in the current program execution. */ OMPI_DECLSPEC extern bool ompi_mpi_show_mca_params; @@ -139,8 +139,8 @@ OMPI_DECLSPEC extern uint32_t ompi_direct_modex_cutoff; OMPI_DECLSPEC int ompi_mpi_register_params(void); /** - * Display all MCA parameters used - * + * Display all MCA parameters used + * * @returns OMPI_SUCCESS * * Displays in key = value format diff --git a/ompi/tools/Makefile.am b/ompi/tools/Makefile.am index 9728a09e8b6..634a5f4fa94 100644 --- a/ompi/tools/Makefile.am +++ b/ompi/tools/Makefile.am @@ -6,15 +6,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/tools/mpisync/Makefile.am b/ompi/tools/mpisync/Makefile.am index e7ced3c7b21..e93ac56ce29 100644 --- a/ompi/tools/mpisync/Makefile.am +++ b/ompi/tools/mpisync/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -16,9 +16,9 @@ # Copyright (c) 2014 Artem Polyakov # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -51,7 +51,7 @@ EXTRA_DIST = $(man_pages:.1=.1in)\ if OPAL_INSTALL_TIMING_BINARIES -bin_PROGRAMS = mpisync +bin_PROGRAMS = mpisync bin_SCRIPTS = mpirun_prof ompi_timing_post nodist_man_MANS = $(man_pages) diff --git a/ompi/tools/mpisync/hpctimer.c b/ompi/tools/mpisync/hpctimer.c index 97a3ff3f430..7d6a85b60a6 100644 --- a/ompi/tools/mpisync/hpctimer.c +++ b/ompi/tools/mpisync/hpctimer.c @@ -34,9 +34,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -209,8 +209,8 @@ static double hpctimer_wtime_gettimeofday(void) return (double)tv.tv_sec + 1E-6 * tv.tv_usec; } -/* - * hpctimer_wtime_tsc: Returns TSC-based walltime in seconds. +/* + * hpctimer_wtime_tsc: Returns TSC-based walltime in seconds. */ static double hpctimer_wtime_tsc(void) { @@ -227,38 +227,38 @@ static int hpctimer_tsc_initialize(void) { hpctimer_overhead = hpctimer_measure_overhead(); hpctimer_freq = hpctimer_calibrate_sleep(hpctimer_overhead); - return HPCTIMER_SUCCESS; + return HPCTIMER_SUCCESS; } -/* - * hpctimer_gettsc: Returns TSC value. +/* + * hpctimer_gettsc: Returns TSC value. */ static __inline__ uint64_t hpctimer_gettsc(void) { #if defined(__x86_64__) - uint32_t low, high; - __asm__ __volatile__( - "xorl %%eax, %%eax\n" - "cpuid\n" - ::: "%rax", "%rbx", "%rcx", "%rdx" - ); - __asm__ __volatile__( - "rdtsc\n" - : "=a" (low), "=d" (high) - ); - return ((uint64_t)high << 32) | low; + uint32_t low, high; + __asm__ __volatile__( + "xorl %%eax, %%eax\n" + "cpuid\n" + ::: "%rax", "%rbx", "%rcx", "%rdx" + ); + __asm__ __volatile__( + "rdtsc\n" + : "=a" (low), "=d" (high) + ); + return ((uint64_t)high << 32) | low; #elif defined(__i386__) uint64_t tsc; - __asm__ __volatile__( - "xorl %%eax, %%eax\n" - "cpuid\n" - ::: "%eax", "%ebx", "%ecx", "%edx" - ); - __asm__ __volatile__( - "rdtsc\n" - : "=A" (tsc) - ); + __asm__ __volatile__( + "xorl %%eax, %%eax\n" + "cpuid\n" + ::: "%eax", "%ebx", "%ecx", "%edx" + ); + __asm__ __volatile__( + "rdtsc\n" + : "=A" (tsc) + ); return tsc; #else # error "Unsupported platform" @@ -285,7 +285,7 @@ static uint64_t hpctimer_measure_overhead(void) return overhead; } -/* +/* * hpctimer_calibrate_adaptive: Returns number of TSC tics per second. * Adaptive algorithm based on sleep. */ @@ -297,7 +297,7 @@ static uint64_t hpctimer_calibrate_adaptive(uint64_t overhead) }; int i; uint64_t count, freq; - + freq = (uint64_t)(~0x01); for (i = 0; i < TSC_CALIBRATE_NTESTS; i++) { count = hpctimer_gettsc(); @@ -314,7 +314,7 @@ static uint64_t hpctimer_calibrate_adaptive(uint64_t overhead) } */ -/* +/* * hpctimer_calibrate_sleep: Returns number of TSC tics per second. */ static uint64_t hpctimer_calibrate_sleep(uint64_t overhead) @@ -328,7 +328,7 @@ static uint64_t hpctimer_calibrate_sleep(uint64_t overhead) return count / delay; } -/* +/* * hpctimer_calibrate_loop: Returns number of TSC tics per second. */ /* @@ -341,9 +341,9 @@ static uint64_t hpctimer_calibrate_loop(uint64_t overhead) struct timeval tv1, tv2; int i, j; __volatile__ int dummy = 0; - + for (i = 0; i < TSC_CALIBRATE_NTESTS; i++) { - gettimeofday(&tv1, NULL); + gettimeofday(&tv1, NULL); count = hpctimer_gettsc(); for (j = 0; j < 10000000; j++) { dummy++; @@ -355,7 +355,7 @@ static uint64_t hpctimer_calibrate_loop(uint64_t overhead) if (count < countmin) countmin = count; } - return countmin * 1000000 / (tv2.tv_sec * 1000000 + tv2.tv_usec - + return countmin * 1000000 / (tv2.tv_sec * 1000000 + tv2.tv_usec - tv1.tv_sec * 1000000 - tv1.tv_usec); } */ diff --git a/ompi/tools/mpisync/hpctimer.h b/ompi/tools/mpisync/hpctimer.h index 2cc2d56b49a..4763424c07b 100644 --- a/ompi/tools/mpisync/hpctimer.h +++ b/ompi/tools/mpisync/hpctimer.h @@ -34,9 +34,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/tools/mpisync/mpigclock.c b/ompi/tools/mpisync/mpigclock.c index 5af0861347b..4d78bbfc77f 100644 --- a/ompi/tools/mpisync/mpigclock.c +++ b/ompi/tools/mpisync/mpigclock.c @@ -34,9 +34,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/tools/mpisync/mpigclock.h b/ompi/tools/mpisync/mpigclock.h index 51d106507b4..41b90112bc6 100644 --- a/ompi/tools/mpisync/mpigclock.h +++ b/ompi/tools/mpisync/mpigclock.h @@ -34,9 +34,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/tools/mpisync/mpisync.1in b/ompi/tools/mpisync/mpisync.1in index 3585bb5701f..219d89f034f 100644 --- a/ompi/tools/mpisync/mpisync.1in +++ b/ompi/tools/mpisync/mpisync.1in @@ -25,14 +25,14 @@ The name of output file where offsets related to HNP will be written Print help information .PP .BR ompi_timing_post -takes the timing output file as input parameter. The events are sorted by the timestamps. Next, the timestamps are replaced with time offsets relative to the +takes the timing output file as input parameter. The events are sorted by the timestamps. Next, the timestamps are replaced with time offsets relative to the .BR first : .BR previous event. .PP -.BR mpirun_prof -is a wrapper around +.BR mpirun_prof +is a wrapper around .BR mpirun that performs clock synchronisation and post-processing of the timing output file. diff --git a/ompi/tools/mpisync/ompi_timing_post b/ompi/tools/mpisync/ompi_timing_post index 0df0b9109c2..e5b9f56957a 100755 --- a/ompi/tools/mpisync/ompi_timing_post +++ b/ompi/tools/mpisync/ompi_timing_post @@ -18,9 +18,9 @@ fi initfile=$1 postfile=$2 -# 1. Filter OPAL_TRACE entrieas only +# 1. Filter OPAL_TRACE entrieas only # and put the timestamp to the first place -#.2. Sort considering that we dealing with +#.2. Sort considering that we dealing with # floating point numbers # 3. Return to initial field order and count relative fields cat $initfile | \ @@ -33,8 +33,8 @@ awk 'BEGIN { FPAT = "([^ ]+)|(\"[^\"]+\")" } print $0 } }' | sort --general-numeric-sort | \ -awk 'BEGIN { - FPAT = "([^ ]+)|(\"[^\"]+\")" +awk 'BEGIN { + FPAT = "([^ ]+)|(\"[^\"]+\")" first = 0 prev = 0 } diff --git a/ompi/tools/mpisync/sync.c b/ompi/tools/mpisync/sync.c index 8896973a916..c689df8cf59 100644 --- a/ompi/tools/mpisync/sync.c +++ b/ompi/tools/mpisync/sync.c @@ -2,9 +2,9 @@ * Copyright (C) 2014 Artem Polyakov * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -35,7 +35,7 @@ int parse_opts(int rank, int argc, char **argv) { while (1) { int option_index = 0; - static struct option long_options[] = { + static struct option long_options[] = { {"output", required_argument, 0, 'o' }, {"help", required_argument, 0, 'h' }, { 0, 0, 0, 0 } }; diff --git a/ompi/tools/ompi_info/Makefile.am b/ompi/tools/ompi_info/Makefile.am index 01ae1c991a9..5623ee6a3b3 100644 --- a/ompi/tools/ompi_info/Makefile.am +++ b/ompi/tools/ompi_info/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -14,9 +14,9 @@ # Copyright (c) 2012 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/tools/ompi_info/ompi_info.1in b/ompi/tools/ompi_info/ompi_info.1in index 3c4b92d66d0..fb7276ebab0 100644 --- a/ompi/tools/ompi_info/ompi_info.1in +++ b/ompi/tools/ompi_info/ompi_info.1in @@ -24,10 +24,10 @@ be useful for at least three common scenarios: 1. Checking local configuration and seeing how Open MPI was installed. .PP 2. Submitting bug reports / help requests to the Open MPI community -(see +(see .IR http://www.open-mpi.org/community/help/ ) .PP -3. Seeing a list of installed Open MPI plugins and querying what +3. Seeing a list of installed Open MPI plugins and querying what MCA parameters they support. .PP .B NOTE: @@ -45,13 +45,13 @@ information). .B ompi_info accepts the following options: .TP 8 -.I \-a|\-\-all +.I \-a|\-\-all Show all configuration options and MCA parameters. Also changes the default MCA parameter level to 9, unless .I --level is also specified. .TP 8 -.I \-\-arch +.I \-\-arch Show architecture on which Open MPI was compiled. .TP 8 .I \-c|\-\-config @@ -121,7 +121,7 @@ given user. .PP As such, Open MPI has divided these parameters up into nine distinct levels, broken down into three categories, each with three -sub-categories. +sub-categories. . . .PP @@ -266,8 +266,8 @@ Show the version of Open MPI version numbers in a prettyprint format. . .TP ompi_info --all -Show -.I all +Show +.I all information about the Open MPI installation, including all components that can be found, all the MCA parameters that they support (i.e., levels 1 through 9), versions of Open MPI and the components, etc. @@ -277,7 +277,7 @@ levels 1 through 9), versions of Open MPI and the components, etc. .\" Authors Section .\" ************************** .SH AUTHORS -The Open MPI maintainers -- see +The Open MPI maintainers -- see .I http://www.openmpi.org/ or the file .IR AUTHORS . diff --git a/ompi/tools/ompi_info/ompi_info.c b/ompi/tools/ompi_info/ompi_info.c index 05be454cb05..4cd449d6c32 100644 --- a/ompi/tools/ompi_info/ompi_info.c +++ b/ompi/tools/ompi_info/ompi_info.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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. @@ -15,9 +15,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) /* Initialize the argv parsing handle */ if (OPAL_SUCCESS != opal_init_util(&argc, &argv)) { - opal_show_help("help-opal_info.txt", "lib-call-fail", true, + opal_show_help("help-opal_info.txt", "lib-call-fail", true, "opal_init_util", __FILE__, __LINE__, NULL); exit(ret); } @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) ompi_info_cmd_line = OBJ_NEW(opal_cmd_line_t); if (NULL == ompi_info_cmd_line) { ret = errno; - opal_show_help("help-opal_info.txt", "lib-call-fail", true, + opal_show_help("help-opal_info.txt", "lib-call-fail", true, "opal_cmd_line_create", __FILE__, __LINE__, NULL); exit(ret); } @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) /* setup the mca_types array */ OBJ_CONSTRUCT(&mca_types, opal_pointer_array_t); opal_pointer_array_init(&mca_types, 256, INT_MAX, 128); - + /* add in the opal frameworks */ opal_info_register_types(&mca_types); @@ -119,7 +119,7 @@ int main(int argc, char *argv[]) /* add in the orte frameworks */ orte_info_register_types(&mca_types); #endif - + ompi_info_register_types(&mca_types); /* init the component map */ @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) exit(1); } - /* Execute the desired action(s) */ + /* Execute the desired action(s) */ want_all = opal_cmd_line_is_taken(ompi_info_cmd_line, "all"); if (want_all) { opal_info_out("Package", "package", OPAL_PACKAGE_STRING); @@ -168,9 +168,9 @@ int main(int argc, char *argv[]) opal_info_do_type(ompi_info_cmd_line); acted = true; } - + /* If no command line args are specified, show default set */ - + if (!acted) { opal_info_out("Package", "package", OPAL_PACKAGE_STRING); ompi_info_show_ompi_version(opal_info_ver_full); @@ -182,9 +182,9 @@ int main(int argc, char *argv[]) opal_info_component_all, opal_info_ver_full, opal_info_ver_all); } - + /* All done */ - + if (NULL != app_env) { opal_argv_free(app_env); } @@ -206,6 +206,6 @@ int main(int argc, char *argv[]) /* Put our own call to opal_finalize_util() here because we called it up above (and it refcounts) */ opal_finalize_util(); - + return 0; } diff --git a/ompi/tools/ompi_info/ompi_info.h b/ompi/tools/ompi_info/ompi_info.h index c420bb844c9..5da105c76b6 100644 --- a/ompi/tools/ompi_info/ompi_info.h +++ b/ompi/tools/ompi_info/ompi_info.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/ompi/tools/ompi_info/param.c b/ompi/tools/ompi_info/param.c index 12f40c2027d..b5a32d79606 100644 --- a/ompi/tools/ompi_info/param.c +++ b/ompi/tools/ompi_info/param.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -73,8 +73,8 @@ static void append(char *dest, size_t max, int *first, char *src) * FALSE -> display selected options * * This function displays all the options with which the current - * installation of ompi was configured. There are many options here - * that are carried forward from OMPI-7 and are not mca parameters + * installation of ompi was configured. There are many options here + * that are carried forward from OMPI-7 and are not mca parameters * in OMPI-10. I have to dig through the invalid options and replace * them with OMPI-10 options. */ @@ -153,14 +153,14 @@ void ompi_info_do_config(bool want_all) #else paramcheck = "runtime"; #endif - + /* setup the strings that don't require allocations*/ cxx = OMPI_BUILD_CXX_BINDINGS ? "yes" : "no"; if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPI_BINDINGS) { if (OMPI_FORTRAN_HAVE_IGNORE_TKR) { fortran_usempi = "yes (full: ignore TKR)"; } else { - fortran_usempi = "yes (limited: overloading)"; + fortran_usempi = "yes (limited: overloading)"; } } else { fortran_usempi = "no"; @@ -168,7 +168,7 @@ void ompi_info_do_config(bool want_all) fortran_usempif08 = OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_USEMPIF08_BINDINGS ? "yes" : "no"; fortran_have_f08_assumed_rank = OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK ? "yes" : "no"; - fortran_build_f08_subarrays = OMPI_BUILD_FORTRAN_F08_SUBARRAYS ? + fortran_build_f08_subarrays = OMPI_BUILD_FORTRAN_F08_SUBARRAYS ? "yes" : "no"; fortran_have_optional_args = OMPI_FORTRAN_HAVE_OPTIONAL_ARGS ? "yes" : "no"; @@ -181,7 +181,7 @@ void ompi_info_do_config(bool want_all) "yes" : "no"; fortran_have_bind_c_sub = OMPI_FORTRAN_HAVE_BIND_C_SUB ? "yes" : "no"; fortran_have_bind_c_type = OMPI_FORTRAN_HAVE_BIND_C_TYPE ? "yes" : "no"; - fortran_have_bind_c_type_name = OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME ? + fortran_have_bind_c_type_name = OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME ? "yes" : "no"; fortran_have_private = OMPI_FORTRAN_HAVE_PRIVATE ? "yes" : "no"; fortran_have_protected = OMPI_FORTRAN_HAVE_PROTECTED ? "yes" : "no"; @@ -189,7 +189,7 @@ void ompi_info_do_config(bool want_all) fortran_have_asynchronous = OMPI_FORTRAN_HAVE_ASYNCHRONOUS ? "yes" : "no"; fortran_have_procedure = OMPI_FORTRAN_HAVE_PROCEDURE ? "yes" : "no"; fortran_have_c_funloc = OMPI_FORTRAN_HAVE_C_FUNLOC ? "yes" : "no"; - fortran_08_using_wrappers_for_choice_buffer_functions = + fortran_08_using_wrappers_for_choice_buffer_functions = OMPI_FORTRAN_NEED_WRAPPER_ROUTINES ? "yes" : "no"; fortran_build_sizeof = OMPI_FORTRAN_BUILD_SIZEOF ? "yes" : "no"; @@ -213,7 +213,7 @@ void ompi_info_do_config(bool want_all) } else { int first = 1; snprintf(f08_msg, sizeof(f08_msg), - "The mpi_f08 module is available, but due to limitations in the %s compiler, does not support the following: ", + "The mpi_f08 module is available, but due to limitations in the %s compiler, does not support the following: ", OMPI_FC); if (!OMPI_BUILD_FORTRAN_F08_SUBARRAYS) { append(f08_msg, sizeof(f08_msg), &first, "array subsections"); @@ -267,7 +267,7 @@ void ompi_info_do_config(bool want_all) wtime_support = OPAL_TIMER_USEC_NATIVE ? "native" : "gettimeofday"; symbol_visibility = OPAL_C_HAVE_VISIBILITY ? "yes" : "no"; topology_support = OPAL_HAVE_HWLOC ? "yes" : "no"; - + /* setup strings that require allocation */ if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) { (void)asprintf(&fortran_mpifh, "yes (%s)", @@ -303,8 +303,8 @@ void ompi_info_do_config(bool want_all) OPAL_ENABLE_MULTI_THREADS ? "yes" : "no", OPAL_ENABLE_PROGRESS_THREADS ? "yes" : "no"); #endif - - (void)asprintf(&ft_support, "%s (checkpoint thread: %s)", + + (void)asprintf(&ft_support, "%s (checkpoint thread: %s)", OPAL_ENABLE_FT ? "yes" : "no", OPAL_ENABLE_FT_THREAD ? "yes" : "no"); (void)asprintf(&crdebug_support, "%s", @@ -314,37 +314,37 @@ void ompi_info_do_config(bool want_all) opal_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER); opal_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE); opal_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST); - + opal_info_out("Built by", "build:user", OMPI_BUILD_USER); opal_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE); opal_info_out("Built host", "build:host", OMPI_BUILD_HOST); - + opal_info_out("C bindings", "bindings:c", "yes"); opal_info_out("C++ bindings", "bindings:cxx", cxx); opal_info_out("Fort mpif.h", "bindings:mpif.h", fortran_mpifh); free(fortran_mpifh); - opal_info_out("Fort use mpi", "bindings:use_mpi", + opal_info_out("Fort use mpi", "bindings:use_mpi", fortran_usempi); - opal_info_out("Fort use mpi size", "bindings:use_mpi:size", + opal_info_out("Fort use mpi size", "bindings:use_mpi:size", ompi_info_deprecated_value); - opal_info_out("Fort use mpi_f08", "bindings:use_mpi_f08", + opal_info_out("Fort use mpi_f08", "bindings:use_mpi_f08", fortran_usempif08); - opal_info_out("Fort mpi_f08 compliance", "bindings:use_mpi_f08:compliance", + opal_info_out("Fort mpi_f08 compliance", "bindings:use_mpi_f08:compliance", fortran_usempif08_compliance); - opal_info_out("Fort mpi_f08 subarrays", "bindings:use_mpi_f08:subarrays-supported", + opal_info_out("Fort mpi_f08 subarrays", "bindings:use_mpi_f08:subarrays-supported", fortran_build_f08_subarrays); opal_info_out("Java bindings", "bindings:java", java); - opal_info_out("Wrapper compiler rpath", "compiler:all:rpath", + opal_info_out("Wrapper compiler rpath", "compiler:all:rpath", WRAPPER_RPATH_SUPPORT); opal_info_out("C compiler", "compiler:c:command", OPAL_CC); - opal_info_out("C compiler absolute", "compiler:c:absolute", + opal_info_out("C compiler absolute", "compiler:c:absolute", OPAL_CC_ABSOLUTE); - opal_info_out("C compiler family name", "compiler:c:familyname", + opal_info_out("C compiler family name", "compiler:c:familyname", _STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_FAMILYNAME)); - opal_info_out("C compiler version", "compiler:c:version", + opal_info_out("C compiler version", "compiler:c:version", _STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_VERSION_STR)); - + if (want_all) { opal_info_out_int("C char size", "compiler:c:sizeof:char", sizeof(char)); /* JMS: should be fixed in MPI-2.2 to differentiate between C @@ -378,15 +378,15 @@ void ompi_info_do_config(bool want_all) opal_info_out("C++ compiler", "compiler:cxx:command", OMPI_CXX); opal_info_out("C++ compiler absolute", "compiler:cxx:absolute", OMPI_CXX_ABSOLUTE); opal_info_out("Fort compiler", "compiler:fortran:command", OMPI_FC); - opal_info_out("Fort compiler abs", "compiler:fortran:absolute", + opal_info_out("Fort compiler abs", "compiler:fortran:absolute", OMPI_FC_ABSOLUTE); opal_info_out("Fort ignore TKR", "compiler:fortran:ignore_tkr", fortran_have_ignore_tkr); free(fortran_have_ignore_tkr); - opal_info_out("Fort 08 assumed shape", + opal_info_out("Fort 08 assumed shape", "compiler:fortran:f08_assumed_rank", fortran_have_f08_assumed_rank); - opal_info_out("Fort optional args", + opal_info_out("Fort optional args", "compiler:fortran:optional_arguments", fortran_have_optional_args); opal_info_out("Fort INTERFACE", @@ -398,161 +398,161 @@ void ompi_info_do_config(bool want_all) opal_info_out("Fort STORAGE_SIZE", "compiler:fortran:storage_size", fortran_have_storage_size); - opal_info_out("Fort BIND(C) (all)", + opal_info_out("Fort BIND(C) (all)", "compiler:fortran:bind_c", fortran_have_bind_c); opal_info_out("Fort ISO_C_BINDING", "compiler:fortran:iso_c_binding", fortran_have_iso_c_binding); - opal_info_out("Fort SUBROUTINE BIND(C)", + opal_info_out("Fort SUBROUTINE BIND(C)", "compiler:fortran:subroutine_bind_c", fortran_have_bind_c_sub); - opal_info_out("Fort TYPE,BIND(C)", + opal_info_out("Fort TYPE,BIND(C)", "compiler:fortran:type_bind_c", fortran_have_bind_c_type); - opal_info_out("Fort T,BIND(C,name=\"a\")", + opal_info_out("Fort T,BIND(C,name=\"a\")", "compiler:fortran:type_name_bind_c", fortran_have_bind_c_type_name); - opal_info_out("Fort PRIVATE", + opal_info_out("Fort PRIVATE", "compiler:fortran:private", fortran_have_private); - opal_info_out("Fort PROTECTED", + opal_info_out("Fort PROTECTED", "compiler:fortran:protected", fortran_have_protected); - opal_info_out("Fort ABSTRACT", + opal_info_out("Fort ABSTRACT", "compiler:fortran:abstract", fortran_have_abstract); - opal_info_out("Fort ASYNCHRONOUS", + opal_info_out("Fort ASYNCHRONOUS", "compiler:fortran:asynchronous", fortran_have_asynchronous); - opal_info_out("Fort PROCEDURE", + opal_info_out("Fort PROCEDURE", "compiler:fortran:procedure", fortran_have_procedure); opal_info_out("Fort C_FUNLOC", "compiler:fortran:c_funloc", fortran_have_c_funloc); - opal_info_out("Fort f08 using wrappers", + opal_info_out("Fort f08 using wrappers", "compiler:fortran:08_wrappers", fortran_08_using_wrappers_for_choice_buffer_functions); opal_info_out("Fort MPI_SIZEOF", "compiler:fortran:mpi_sizeof", fortran_build_sizeof); - + if (want_all) { - + /* Will always have the size of Fortran integer */ - - opal_info_out_int("Fort integer size", "compiler:fortran:sizeof:integer", + + opal_info_out_int("Fort integer size", "compiler:fortran:sizeof:integer", OMPI_SIZEOF_FORTRAN_INTEGER); - - opal_info_out_int("Fort logical size", "compiler:fortran:sizeof:logical", + + opal_info_out_int("Fort logical size", "compiler:fortran:sizeof:logical", OMPI_SIZEOF_FORTRAN_LOGICAL); opal_info_out_int("Fort logical value true", "compiler:fortran:value:true", OMPI_FORTRAN_VALUE_TRUE); - - + + /* May or may not have the other Fortran sizes */ - + if (OMPI_BUILD_FORTRAN_BINDINGS >= OMPI_FORTRAN_MPIFH_BINDINGS) { - opal_info_out("Fort have integer1", "compiler:fortran:have:integer1", + opal_info_out("Fort have integer1", "compiler:fortran:have:integer1", OMPI_HAVE_FORTRAN_INTEGER1 ? "yes" : "no"); - opal_info_out("Fort have integer2", "compiler:fortran:have:integer2", + opal_info_out("Fort have integer2", "compiler:fortran:have:integer2", OMPI_HAVE_FORTRAN_INTEGER2 ? "yes" : "no"); - opal_info_out("Fort have integer4", "compiler:fortran:have:integer4", + opal_info_out("Fort have integer4", "compiler:fortran:have:integer4", OMPI_HAVE_FORTRAN_INTEGER4 ? "yes" : "no"); - opal_info_out("Fort have integer8", "compiler:fortran:have:integer8", + opal_info_out("Fort have integer8", "compiler:fortran:have:integer8", OMPI_HAVE_FORTRAN_INTEGER8 ? "yes" : "no"); - opal_info_out("Fort have integer16", "compiler:fortran:have:integer16", + opal_info_out("Fort have integer16", "compiler:fortran:have:integer16", OMPI_HAVE_FORTRAN_INTEGER16 ? "yes" : "no"); - - opal_info_out("Fort have real4", "compiler:fortran:have:real4", + + opal_info_out("Fort have real4", "compiler:fortran:have:real4", OMPI_HAVE_FORTRAN_REAL4 ? "yes" : "no"); - opal_info_out("Fort have real8", "compiler:fortran:have:real8", + opal_info_out("Fort have real8", "compiler:fortran:have:real8", OMPI_HAVE_FORTRAN_REAL8 ? "yes" : "no"); - opal_info_out("Fort have real16", "compiler:fortran:have:real16", + opal_info_out("Fort have real16", "compiler:fortran:have:real16", OMPI_HAVE_FORTRAN_REAL16 && OMPI_REAL16_MATCHES_C ? "yes" : "no"); - - opal_info_out("Fort have complex8", "compiler:fortran:have:complex8", + + opal_info_out("Fort have complex8", "compiler:fortran:have:complex8", OMPI_HAVE_FORTRAN_COMPLEX8 ? "yes" : "no"); - opal_info_out("Fort have complex16", "compiler:fortran:have:complex16", + opal_info_out("Fort have complex16", "compiler:fortran:have:complex16", OMPI_HAVE_FORTRAN_COMPLEX16 ? "yes" : "no"); - opal_info_out("Fort have complex32", "compiler:fortran:have:complex32", + opal_info_out("Fort have complex32", "compiler:fortran:have:complex32", OMPI_HAVE_FORTRAN_COMPLEX32 && OMPI_REAL16_MATCHES_C ? "yes" : "no"); - - opal_info_out_int("Fort integer1 size", "compiler:fortran:sizeof:integer1", + + opal_info_out_int("Fort integer1 size", "compiler:fortran:sizeof:integer1", OMPI_HAVE_FORTRAN_INTEGER1 ? OMPI_SIZEOF_FORTRAN_INTEGER1 : -1); - opal_info_out_int("Fort integer2 size", "compiler:fortran:sizeof:integer2", + opal_info_out_int("Fort integer2 size", "compiler:fortran:sizeof:integer2", OMPI_HAVE_FORTRAN_INTEGER2 ? OMPI_SIZEOF_FORTRAN_INTEGER2 : -1); - opal_info_out_int("Fort integer4 size", "compiler:fortran:sizeof:integer4", + opal_info_out_int("Fort integer4 size", "compiler:fortran:sizeof:integer4", OMPI_HAVE_FORTRAN_INTEGER4 ? OMPI_SIZEOF_FORTRAN_INTEGER4 : -1); - opal_info_out_int("Fort integer8 size", "compiler:fortran:sizeof:integer8", + opal_info_out_int("Fort integer8 size", "compiler:fortran:sizeof:integer8", OMPI_HAVE_FORTRAN_INTEGER8 ? OMPI_SIZEOF_FORTRAN_INTEGER8 : -1); - opal_info_out_int("Fort integer16 size", "compiler:fortran:sizeof:integer16", + opal_info_out_int("Fort integer16 size", "compiler:fortran:sizeof:integer16", OMPI_HAVE_FORTRAN_INTEGER16 ? OMPI_SIZEOF_FORTRAN_INTEGER16 : -1); - - opal_info_out_int("Fort real size", "compiler:fortran:sizeof:real", + + opal_info_out_int("Fort real size", "compiler:fortran:sizeof:real", OMPI_SIZEOF_FORTRAN_REAL); - opal_info_out_int("Fort real4 size", "compiler:fortran:sizeof:real4", + opal_info_out_int("Fort real4 size", "compiler:fortran:sizeof:real4", OMPI_HAVE_FORTRAN_REAL4 ? OMPI_SIZEOF_FORTRAN_REAL4 : -1); - opal_info_out_int("Fort real8 size", "compiler:fortran:sizeof:real8", + opal_info_out_int("Fort real8 size", "compiler:fortran:sizeof:real8", OMPI_HAVE_FORTRAN_REAL8 ? OMPI_SIZEOF_FORTRAN_REAL8 : -1); - opal_info_out_int("Fort real16 size", "compiler:fortran:sizeof:real17", + opal_info_out_int("Fort real16 size", "compiler:fortran:sizeof:real17", OMPI_HAVE_FORTRAN_REAL16 ? OMPI_SIZEOF_FORTRAN_REAL16 : -1); - - opal_info_out_int("Fort dbl prec size", + + opal_info_out_int("Fort dbl prec size", "compiler:fortran:sizeof:double_precision", OMPI_SIZEOF_FORTRAN_DOUBLE_PRECISION); - - opal_info_out_int("Fort cplx size", "compiler:fortran:sizeof:complex", + + opal_info_out_int("Fort cplx size", "compiler:fortran:sizeof:complex", OMPI_SIZEOF_FORTRAN_COMPLEX); opal_info_out_int("Fort dbl cplx size", - "compiler:fortran:sizeof:double_complex", + "compiler:fortran:sizeof:double_complex", OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_SIZEOF_FORTRAN_DOUBLE_COMPLEX : -1); - opal_info_out_int("Fort cplx8 size", "compiler:fortran:sizeof:complex8", + opal_info_out_int("Fort cplx8 size", "compiler:fortran:sizeof:complex8", OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_SIZEOF_FORTRAN_COMPLEX8 : -1); - opal_info_out_int("Fort cplx16 size", "compiler:fortran:sizeof:complex16", + opal_info_out_int("Fort cplx16 size", "compiler:fortran:sizeof:complex16", OMPI_HAVE_FORTRAN_COMPLEX16 ? OMPI_SIZEOF_FORTRAN_COMPLEX16 : -1); - opal_info_out_int("Fort cplx32 size", "compiler:fortran:sizeof:complex32", + opal_info_out_int("Fort cplx32 size", "compiler:fortran:sizeof:complex32", OMPI_HAVE_FORTRAN_COMPLEX32 ? OMPI_SIZEOF_FORTRAN_COMPLEX32 : -1); - - opal_info_out_int("Fort integer align", "compiler:fortran:align:integer", + + opal_info_out_int("Fort integer align", "compiler:fortran:align:integer", OMPI_ALIGNMENT_FORTRAN_INTEGER); - opal_info_out_int("Fort integer1 align", "compiler:fortran:align:integer1", + opal_info_out_int("Fort integer1 align", "compiler:fortran:align:integer1", OMPI_HAVE_FORTRAN_INTEGER1 ? OMPI_ALIGNMENT_FORTRAN_INTEGER1 : -1); - opal_info_out_int("Fort integer2 align", "compiler:fortran:align:integer2", + opal_info_out_int("Fort integer2 align", "compiler:fortran:align:integer2", OMPI_HAVE_FORTRAN_INTEGER2 ? OMPI_ALIGNMENT_FORTRAN_INTEGER2 : -1); - opal_info_out_int("Fort integer4 align", "compiler:fortran:align:integer4", + opal_info_out_int("Fort integer4 align", "compiler:fortran:align:integer4", OMPI_HAVE_FORTRAN_INTEGER4 ? OMPI_ALIGNMENT_FORTRAN_INTEGER4 : -1); - opal_info_out_int("Fort integer8 align", "compiler:fortran:align:integer8", + opal_info_out_int("Fort integer8 align", "compiler:fortran:align:integer8", OMPI_HAVE_FORTRAN_INTEGER8 ? OMPI_ALIGNMENT_FORTRAN_INTEGER8 : -1); - opal_info_out_int("Fort integer16 align", "compiler:fortran:align:integer16", + opal_info_out_int("Fort integer16 align", "compiler:fortran:align:integer16", OMPI_HAVE_FORTRAN_INTEGER16 ? OMPI_ALIGNMENT_FORTRAN_INTEGER16 : -1); - - opal_info_out_int("Fort real align", "compiler:fortran:align:real", + + opal_info_out_int("Fort real align", "compiler:fortran:align:real", OMPI_ALIGNMENT_FORTRAN_REAL); - opal_info_out_int("Fort real4 align", "compiler:fortran:align:real4", + opal_info_out_int("Fort real4 align", "compiler:fortran:align:real4", OMPI_HAVE_FORTRAN_REAL4 ? OMPI_ALIGNMENT_FORTRAN_REAL4 : -1); - opal_info_out_int("Fort real8 align", "compiler:fortran:align:real8", + opal_info_out_int("Fort real8 align", "compiler:fortran:align:real8", OMPI_HAVE_FORTRAN_REAL8 ? OMPI_ALIGNMENT_FORTRAN_REAL8 : -1); - opal_info_out_int("Fort real16 align", "compiler:fortran:align:real16", + opal_info_out_int("Fort real16 align", "compiler:fortran:align:real16", OMPI_HAVE_FORTRAN_REAL16 ? OMPI_ALIGNMENT_FORTRAN_REAL16 : -1); - - opal_info_out_int("Fort dbl prec align", + + opal_info_out_int("Fort dbl prec align", "compiler:fortran:align:double_precision", OMPI_ALIGNMENT_FORTRAN_DOUBLE_PRECISION); - - opal_info_out_int("Fort cplx align", "compiler:fortran:align:complex", + + opal_info_out_int("Fort cplx align", "compiler:fortran:align:complex", OMPI_ALIGNMENT_FORTRAN_COMPLEX); opal_info_out_int("Fort dbl cplx align", - "compiler:fortran:align:double_complex", + "compiler:fortran:align:double_complex", OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_ALIGNMENT_FORTRAN_DOUBLE_COMPLEX : -1); - opal_info_out_int("Fort cplx8 align", "compiler:fortran:align:complex8", + opal_info_out_int("Fort cplx8 align", "compiler:fortran:align:complex8", OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX8 : -1); - opal_info_out_int("Fort cplx16 align", "compiler:fortran:align:complex16", + opal_info_out_int("Fort cplx16 align", "compiler:fortran:align:complex16", OMPI_HAVE_FORTRAN_COMPLEX16 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX16 : -1); - opal_info_out_int("Fort cplx32 align", "compiler:fortran:align:complex32", + opal_info_out_int("Fort cplx32 align", "compiler:fortran:align:complex32", OMPI_HAVE_FORTRAN_COMPLEX32 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX32 : -1); - + } else { opal_info_out("Fort real size", "compiler:fortran:sizeof:real", "skipped"); opal_info_out("Fort dbl prec size", @@ -560,57 +560,57 @@ void ompi_info_do_config(bool want_all) opal_info_out("Fort cplx size", "compiler:fortran:sizeof:complex", "skipped"); opal_info_out("Fort dbl cplx size", "compiler:fortran:sizeof:double_complex", "skipped"); - + opal_info_out("Fort integer align", "compiler:fortran:align:integer", "skipped"); opal_info_out("Fort real align", "compiler:fortran:align:real", "skipped"); - opal_info_out("Fort dbl prec align", + opal_info_out("Fort dbl prec align", "compiler:fortran:align:double_precision","skipped"); opal_info_out("Fort cplx align", "compiler:fortran:align:complex", "skipped"); opal_info_out("Fort dbl cplx align", "compiler:fortran:align:double_complex", "skipped"); } } - + opal_info_out("C profiling", "option:profiling:c", cprofiling); opal_info_out("C++ profiling", "option:profiling:cxx", cxxprofiling); opal_info_out("Fort mpif.h profiling", "option:profiling:mpif.h", fortran_mpifh_profiling); opal_info_out("Fort use mpi profiling", "option:profiling:use_mpi", fortran_usempi_profiling); - opal_info_out("Fort use mpi_f08 prof", + opal_info_out("Fort use mpi_f08 prof", "option:profiling:use_mpi_f08", fortran_usempif08_profiling); - + opal_info_out("C++ exceptions", "option:cxx_exceptions", cxxexceptions); opal_info_out("Thread support", "option:threads", threads); free(threads); opal_info_out("Sparse Groups", "option:sparse:groups", sparse_groups); - + if (want_all) { - + /* Don't display the build CPPFLAGS or CXXCPPFLAGS because they're * just -I$(top_srcdir)/include, etc. Hence, they're a) boring, * and c) specific for ompi_info. */ - + opal_info_out("Build CFLAGS", "option:build:cflags", OMPI_BUILD_CFLAGS); opal_info_out("Build CXXFLAGS", "option:build:cxxflags", OMPI_BUILD_CXXFLAGS); opal_info_out("Build FCFLAGS", "option:build:fcflags", OMPI_BUILD_FCFLAGS); opal_info_out("Build LDFLAGS", "option:build:ldflags", OMPI_BUILD_LDFLAGS); opal_info_out("Build LIBS", "option:build:libs", OMPI_BUILD_LIBS); - - opal_info_out("Wrapper extra CFLAGS", "option:wrapper:extra_cflags", + + opal_info_out("Wrapper extra CFLAGS", "option:wrapper:extra_cflags", WRAPPER_EXTRA_CFLAGS); - opal_info_out("Wrapper extra CXXFLAGS", "option:wrapper:extra_cxxflags", + opal_info_out("Wrapper extra CXXFLAGS", "option:wrapper:extra_cxxflags", WRAPPER_EXTRA_CXXFLAGS); - opal_info_out("Wrapper extra FCFLAGS", "option:wrapper:extra_fcflags", + opal_info_out("Wrapper extra FCFLAGS", "option:wrapper:extra_fcflags", WRAPPER_EXTRA_FCFLAGS); - opal_info_out("Wrapper extra LDFLAGS", "option:wrapper:extra_ldflags", + opal_info_out("Wrapper extra LDFLAGS", "option:wrapper:extra_ldflags", WRAPPER_EXTRA_LDFLAGS); opal_info_out("Wrapper extra LIBS", "option:wrapper:extra_libs", WRAPPER_EXTRA_LIBS); } - + opal_info_out("Internal debug support", "option:debug", debug); opal_info_out("MPI interface warnings", "option:mpi-interface-warning", mpi_interface_warning); opal_info_out("MPI parameter check", "option:mpi-param-check", paramcheck); @@ -619,41 +619,41 @@ void ompi_info_do_config(bool want_all) opal_info_out("dl support", "option:dlopen", have_dl); opal_info_out("Heterogeneous support", "options:heterogeneous", heterogeneous); #if OMPI_RTE_ORTE - opal_info_out("mpirun default --prefix", "mpirun:prefix_by_default", + opal_info_out("mpirun default --prefix", "mpirun:prefix_by_default", mpirun_prefix_by_default); #endif opal_info_out("MPI I/O support", "options:mpi-io", have_mpi_io); opal_info_out("MPI_WTIME support", "options:mpi-wtime", wtime_support); opal_info_out("Symbol vis. support", "options:visibility", symbol_visibility); - opal_info_out("Host topology support", "options:host-topology", + opal_info_out("Host topology support", "options:host-topology", topology_support); - + opal_info_out("MPI extensions", "options:mpi_ext", OMPI_MPIEXT_COMPONENTS); - + opal_info_out("FT Checkpoint support", "options:ft_support", ft_support); free(ft_support); opal_info_out("C/R Enabled Debugging", "options:crdebug_support", crdebug_support); free(crdebug_support); - opal_info_out_int("MPI_MAX_PROCESSOR_NAME", "options:mpi-max-processor-name", + opal_info_out_int("MPI_MAX_PROCESSOR_NAME", "options:mpi-max-processor-name", MPI_MAX_PROCESSOR_NAME); - opal_info_out_int("MPI_MAX_ERROR_STRING", "options:mpi-max-error-string", + opal_info_out_int("MPI_MAX_ERROR_STRING", "options:mpi-max-error-string", MPI_MAX_ERROR_STRING); - opal_info_out_int("MPI_MAX_OBJECT_NAME", "options:mpi-max-object-name", + opal_info_out_int("MPI_MAX_OBJECT_NAME", "options:mpi-max-object-name", MPI_MAX_OBJECT_NAME); - opal_info_out_int("MPI_MAX_INFO_KEY", "options:mpi-max-info-key", + opal_info_out_int("MPI_MAX_INFO_KEY", "options:mpi-max-info-key", MPI_MAX_INFO_KEY); - opal_info_out_int("MPI_MAX_INFO_VAL", "options:mpi-max-info-val", + opal_info_out_int("MPI_MAX_INFO_VAL", "options:mpi-max-info-val", MPI_MAX_INFO_VAL); - opal_info_out_int("MPI_MAX_PORT_NAME", "options:mpi-max-port-name", + opal_info_out_int("MPI_MAX_PORT_NAME", "options:mpi-max-port-name", MPI_MAX_PORT_NAME); #if OMPI_PROVIDE_MPI_FILE_INTERFACE - opal_info_out_int("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string", + opal_info_out_int("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string", MPI_MAX_DATAREP_STRING); #else - opal_info_out("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string", + opal_info_out("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string", "IO interface not provided"); #endif - + } diff --git a/ompi/tools/wrappers/Makefile.am b/ompi/tools/wrappers/Makefile.am index b1b2ee99aec..9f973785048 100644 --- a/ompi/tools/wrappers/Makefile.am +++ b/ompi/tools/wrappers/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/tools/wrappers/mpifort-wrapper-data.txt.in b/ompi/tools/wrappers/mpifort-wrapper-data.txt.in index f9c79151b21..e3559cd0230 100644 --- a/ompi/tools/wrappers/mpifort-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpifort-wrapper-data.txt.in @@ -13,7 +13,7 @@ compiler_env=FC compiler_flags_env=FCFLAGS compiler=@FC@ preprocessor_flags= -compiler_flags=@OMPI_WRAPPER_EXTRA_FCFLAGS@ +compiler_flags=@OMPI_WRAPPER_EXTRA_FCFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ # Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we # intentionally only link in the MPI libraries (ORTE, OPAL, etc. are diff --git a/ompi/tools/wrappers/mpijavac.1 b/ompi/tools/wrappers/mpijavac.1 index 39c35c405f1..15ffe26ef16 100644 --- a/ompi/tools/wrappers/mpijavac.1 +++ b/ompi/tools/wrappers/mpijavac.1 @@ -9,11 +9,11 @@ mpijava [-showme|-showme:compile|-showme:link] ... . .SH OPTIONS .TP ---showme +--showme This option comes in several different variants (see below). None of the variants invokes the underlying compiler; they all provide information on how the underlying compiler would have been invoked had -.I --showme +.I --showme not been used. The basic .I --showme @@ -137,10 +137,10 @@ line. . . .SH ENVIRONMENT VARIABLES -.PP +.PP By default, the wrappers use the compilers that were selected when Open MPI was configured. These compilers were either found automatically by Open MPI's "configure" script, or were selected by -the user in the CC, CXX, F77, JAVAC, and/or FC environment variables +the user in the CC, CXX, F77, JAVAC, and/or FC environment variables before "configure" was invoked. Additionally, other arguments specific to the compiler may have been selected by configure. diff --git a/ompi/tools/wrappers/ompi_wrapper_script.in b/ompi/tools/wrappers/ompi_wrapper_script.in index 47f59027fa5..903590fe9c2 100644 --- a/ompi/tools/wrappers/ompi_wrapper_script.in +++ b/ompi/tools/wrappers/ompi_wrapper_script.in @@ -114,7 +114,7 @@ if (basename($0) eq "mpicc") { $comp_flags = $extra_cxxflags; $comp_flags_prefix = $extra_cxxflags_prefix; $libs = $cxx_lib . " " . $libs; -} +} # mpifort is now preferred; mpif77/mpif90 are legacy names elsif (basename($0) eq "mpifort" || basename($0) eq "mpif77" || basename($0) eq "mpif90") { diff --git a/ompi/win/Makefile.am b/ompi/win/Makefile.am index f0eaf6e7848..28c96187b47 100644 --- a/ompi/win/Makefile.am +++ b/ompi/win/Makefile.am @@ -6,21 +6,21 @@ # 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, +# 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$ # # This makefile.am does not stand on its own - it is included from ompi/Makefile.am headers += \ - win/win.h + win/win.h libmpi_la_SOURCES += \ win/win.c diff --git a/ompi/win/win.c b/ompi/win/win.c index 066175afe21..ce54b0b9e75 100644 --- a/ompi/win/win.c +++ b/ompi/win/win.c @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -40,7 +40,7 @@ * Table for Fortran <-> C communicator handle conversion. Note that * these are not necessarily global. */ -opal_pointer_array_t ompi_mpi_windows = {{0}}; +opal_pointer_array_t ompi_mpi_windows = {{0}}; ompi_predefined_win_t ompi_mpi_win_null = {{{0}}}; ompi_predefined_win_t *ompi_mpi_win_null_addr = &ompi_mpi_win_null; @@ -107,17 +107,17 @@ config_window(void *base, size_t size, int disp_unit, { int ret; - ret = ompi_attr_set_c(WIN_ATTR, win, &win->w_keyhash, + ret = ompi_attr_set_c(WIN_ATTR, win, &win->w_keyhash, MPI_WIN_BASE, base, true); if (OMPI_SUCCESS != ret) return ret; - ret = ompi_attr_set_fortran_mpi2(WIN_ATTR, win, - &win->w_keyhash, + ret = ompi_attr_set_fortran_mpi2(WIN_ATTR, win, + &win->w_keyhash, MPI_WIN_SIZE, size, true); if (OMPI_SUCCESS != ret) return ret; - ret = ompi_attr_set_fortran_mpi2(WIN_ATTR, win, - &win->w_keyhash, + ret = ompi_attr_set_fortran_mpi2(WIN_ATTR, win, + &win->w_keyhash, MPI_WIN_DISP_UNIT, disp_unit, true); if (OMPI_SUCCESS != ret) return ret; @@ -139,7 +139,7 @@ config_window(void *base, size_t size, int disp_unit, } int -ompi_win_create(void *base, size_t size, +ompi_win_create(void *base, size_t size, int disp_unit, ompi_communicator_t *comm, ompi_info_t *info, ompi_win_t** newwin) diff --git a/ompi/win/win.h b/ompi/win/win.h index cf40c767ebf..21334edb501 100644 --- a/ompi/win/win.h +++ b/ompi/win/win.h @@ -1,12 +1,12 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* +/* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -96,7 +96,7 @@ OMPI_DECLSPEC extern ompi_predefined_win_t *ompi_mpi_win_null_addr; int ompi_win_init(void); int ompi_win_finalize(void); -int ompi_win_create(void *base, size_t size, int disp_unit, +int ompi_win_create(void *base, size_t size, int disp_unit, ompi_communicator_t *comm, ompi_info_t *info, ompi_win_t **newwin); int ompi_win_allocate(size_t size, int disp_unit, ompi_info_t *info, @@ -116,7 +116,7 @@ OMPI_DECLSPEC int ompi_win_group(ompi_win_t *win, ompi_group_t **group); to the defintion of an "invalid" communicator. See a big comment in ompi/communicator/communicator.h about this. */ static inline int ompi_win_invalid(ompi_win_t *win) { - if (NULL == win || + if (NULL == win || MPI_WIN_NULL == win || (OMPI_WIN_INVALID & win->w_flags) || (OMPI_WIN_FREED & win->w_flags)) { diff --git a/opal/Makefile.am b/opal/Makefile.am index dddfe4b6cb4..a7c9d0bc5d8 100644 --- a/opal/Makefile.am +++ b/opal/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2009 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/asm/Makefile.am b/opal/asm/Makefile.am index 159d0d3b09f..829fc98950d 100644 --- a/opal/asm/Makefile.am +++ b/opal/asm/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/asm/asm-data.txt b/opal/asm/asm-data.txt index 88b9b1e40f6..70d6689e72e 100644 --- a/opal/asm/asm-data.txt +++ b/opal/asm/asm-data.txt @@ -5,15 +5,15 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -72,7 +72,7 @@ IA64 default-.text-.globl-:--.L-@-1-0-1-1-0 ia64-linux-nongas ###################################################################### # -# PowerPC / POWER +# PowerPC / POWER # ###################################################################### diff --git a/opal/asm/asm.c b/opal/asm/asm.c index ded09c26d23..766f50f394c 100644 --- a/opal/asm/asm.c +++ b/opal/asm/asm.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -30,7 +30,7 @@ /* have to fix if you change LOCKS_TABLE_SIZE */ static opal_atomic_lock_t locks_table[LOCKS_TABLE_SIZE] = { - { { OPAL_ATOMIC_UNLOCKED } }, + { { OPAL_ATOMIC_UNLOCKED } }, { { OPAL_ATOMIC_UNLOCKED } }, { { OPAL_ATOMIC_UNLOCKED } }, { { OPAL_ATOMIC_UNLOCKED } }, diff --git a/opal/asm/base/AMD64.asm b/opal/asm/base/AMD64.asm index 827998b79b3..2468b638f64 100644 --- a/opal/asm/base/AMD64.asm +++ b/opal/asm/base/AMD64.asm @@ -27,7 +27,7 @@ END_FUNC(opal_atomic_wmb) START_FUNC(opal_atomic_cmpset_32) movl %esi, %eax - lock; cmpxchgl %edx,(%rdi) + lock; cmpxchgl %edx,(%rdi) sete %dl movzbl %dl, %eax ret @@ -36,7 +36,7 @@ END_FUNC(opal_atomic_cmpset_32) START_FUNC(opal_atomic_cmpset_64) movq %rsi, %rax - lock; cmpxchgq %rdx,(%rdi) + lock; cmpxchgq %rdx,(%rdi) sete %dl movzbl %dl, %eax ret diff --git a/opal/asm/base/IA32.asm b/opal/asm/base/IA32.asm index b487ca4b07c..f82b9ce2d15 100644 --- a/opal/asm/base/IA32.asm +++ b/opal/asm/base/IA32.asm @@ -61,12 +61,12 @@ START_FUNC(opal_atomic_cmpset_64) movl -32(%ebp), %esi movl -28(%ebp), %ecx movl %ebx, %eax - push %ebx - movl %esi, %ebx + push %ebx + movl %esi, %ebx lock; cmpxchg8b (%edi) - sete %dl - pop %ebx - + sete %dl + pop %ebx + movzbl %dl, %eax movl -12(%ebp), %ebx movl -8(%ebp), %esi diff --git a/opal/asm/base/MIPS.asm b/opal/asm/base/MIPS.asm index 3dd758c0b48..0a82a173dbc 100644 --- a/opal/asm/base/MIPS.asm +++ b/opal/asm/base/MIPS.asm @@ -6,7 +6,7 @@ START_FILE #include #endif #include - + TEXT ALIGN(8) @@ -17,11 +17,11 @@ LEAF(opal_atomic_mb) sync #ifdef __linux__ .set mips0 -#endif +#endif j ra END(opal_atomic_mb) - + ALIGN(8) LEAF(opal_atomic_rmb) #ifdef __linux__ @@ -33,8 +33,8 @@ LEAF(opal_atomic_rmb) #endif j ra END(opal_atomic_rmb) - - + + LEAF(opal_atomic_wmb) #ifdef __linux__ .set mips2 @@ -48,54 +48,54 @@ END(opal_atomic_wmb) LEAF(opal_atomic_cmpset_32) - .set noreorder -retry1: + .set noreorder +retry1: #ifdef __linux__ .set mips2 #endif - ll $3, 0($4) + ll $3, 0($4) #ifdef __linux__ .set mips0 #endif - bne $3, $5, done1 - or $2, $6, 0 + bne $3, $5, done1 + or $2, $6, 0 #ifdef __linux__ .set mips2 #endif - sc $2, 0($4) + sc $2, 0($4) #ifdef __linux__ .set mips0 #endif beqz $2, retry1 -done1: +done1: xor $3,$3,$5 j ra sltu $2,$3,1 - .set reorder + .set reorder END(opal_atomic_cmpset_32) LEAF(opal_atomic_cmpset_acq_32) - .set noreorder -retry2: + .set noreorder +retry2: #ifdef __linux__ .set mips2 #endif - ll $3, 0($4) + ll $3, 0($4) #ifdef __linux__ .set mips0 #endif - bne $3, $5, done2 - or $2, $6, 0 + bne $3, $5, done2 + or $2, $6, 0 #ifdef __linux__ .set mips2 #endif - sc $2, 0($4) + sc $2, 0($4) #ifdef __linux__ .set mips0 #endif - beqz $2, retry2 -done2: + beqz $2, retry2 +done2: #ifdef __linux__ .set mips2 #endif @@ -106,12 +106,12 @@ done2: xor $3,$3,$5 j ra sltu $2,$3,1 - .set reorder + .set reorder END(opal_atomic_cmpset_acq_32) - + LEAF(opal_atomic_cmpset_rel_32) - .set noreorder + .set noreorder #ifdef __linux__ .set mips2 #endif @@ -119,78 +119,78 @@ LEAF(opal_atomic_cmpset_rel_32) #ifdef __linux__ .set mips0 #endif -retry3: +retry3: #ifdef __linux__ .set mips2 #endif - ll $3, 0($4) + ll $3, 0($4) #ifdef __linux__ .set mips0 #endif - bne $3, $5, done3 - or $2, $6, 0 + bne $3, $5, done3 + or $2, $6, 0 #ifdef __linux__ .set mips2 #endif - sc $2, 0($4) + sc $2, 0($4) #ifdef __linux__ .set mips0 #endif - beqz $2, retry3 -done3: + beqz $2, retry3 +done3: xor $3,$3,$5 j ra sltu $2,$3,1 - .set reorder + .set reorder END(opal_atomic_cmpset_rel_32) - -#ifdef __mips64 + +#ifdef __mips64 LEAF(opal_atomic_cmpset_64) - .set noreorder -retry4: - lld $3, 0($4) - bne $3, $5, done4 - or $2, $6, 0 - scd $2, 0($4) - beqz $2, retry4 -done4: + .set noreorder +retry4: + lld $3, 0($4) + bne $3, $5, done4 + or $2, $6, 0 + scd $2, 0($4) + beqz $2, retry4 +done4: xor $3,$3,$5 j ra sltu $2,$3,1 - .set reorder + .set reorder END(opal_atomic_cmpset_64) LEAF(opal_atomic_cmpset_acq_64) - .set noreorder -retry5: - lld $3, 0($4) - bne $3, $5, done5 - or $2, $6, 0 - scd $2, 0($4) - beqz $2, retry5 -done5: + .set noreorder +retry5: + lld $3, 0($4) + bne $3, $5, done5 + or $2, $6, 0 + scd $2, 0($4) + beqz $2, retry5 +done5: sync xor $3,$3,$5 j ra sltu $2,$3,1 - .set reorder + .set reorder END(opal_atomic_cmpset_acq_64) LEAF(opal_atomic_cmpset_rel_64) - .set noreorder + .set noreorder sync -retry6: - lld $3, 0($4) - bne $3, $5, done6 - or $2, $6, 0 - scd $2, 0($4) - beqz $2, retry6 -done6: +retry6: + lld $3, 0($4) + bne $3, $5, done6 + or $2, $6, 0 + scd $2, 0($4) + beqz $2, retry6 +done6: xor $3,$3,$5 j ra sltu $2,$3,1 - .set reorder + .set reorder END(opal_atomic_cmpset_rel_64) #endif /* __mips64 */ diff --git a/opal/asm/base/POWERPC32.asm b/opal/asm/base/POWERPC32.asm index 66b7315299d..6939fef8f86 100644 --- a/opal/asm/base/POWERPC32.asm +++ b/opal/asm/base/POWERPC32.asm @@ -21,10 +21,10 @@ END_FUNC(opal_atomic_wmb) START_FUNC(opal_atomic_cmpset_32) - LSYM(1) lwarx r0, 0, r3 - cmpw 0, r0, r4 + LSYM(1) lwarx r0, 0, r3 + cmpw 0, r0, r4 bne- REFLSYM(2) - stwcx. r5, 0, r3 + stwcx. r5, 0, r3 bne- REFLSYM(1) LSYM(2) xor r3,r0,r4 @@ -35,12 +35,12 @@ END_FUNC(opal_atomic_cmpset_32) START_FUNC(opal_atomic_cmpset_acq_32) - LSYM(3) lwarx r0, 0, r3 - cmpw 0, r0, r4 - bne- REFLSYM(4) - stwcx. r5, 0, r3 + LSYM(3) lwarx r0, 0, r3 + cmpw 0, r0, r4 + bne- REFLSYM(4) + stwcx. r5, 0, r3 bne- REFLSYM(3) - sync + sync LSYM(4) xor r3,r0,r4 subfic r5,r3,0 @@ -52,12 +52,12 @@ END_FUNC(opal_atomic_cmpset_acq_32) START_FUNC(opal_atomic_cmpset_rel_32) eieio - LSYM(5) lwarx r0, 0, r3 - cmpw 0, r0, r4 + LSYM(5) lwarx r0, 0, r3 + cmpw 0, r0, r4 bne- REFLSYM(6) - stwcx. r5, 0, r3 + stwcx. r5, 0, r3 bne- REFLSYM(5) - sync + sync LSYM(6) xor r3,r0,r4 subfic r5,r3,0 @@ -73,9 +73,9 @@ START_FUNC(opal_atomic_cmpset_64) stw r7,-20(r1) ld r5,-32(r1) ld r7,-24(r1) - LSYM(7) ldarx r9, 0, r3 - cmpd 0, r9, r5 - bne- REFLSYM(8) + LSYM(7) ldarx r9, 0, r3 + cmpd 0, r9, r5 + bne- REFLSYM(8) stdcx. r7, 0, r3 bne- REFLSYM(7) LSYM(8) @@ -94,10 +94,10 @@ START_FUNC(opal_atomic_cmpset_acq_64) ld r5,-32(r1) ld r7,-24(r1) - LSYM(9) ldarx r9, 0, r3 + LSYM(9) ldarx r9, 0, r3 cmpd 0, r9, r5 - bne- REFLSYM(10) - stdcx. r7, 0, r3 + bne- REFLSYM(10) + stdcx. r7, 0, r3 bne- REFLSYM(9) LSYM(10) xor r3,r5,r9 @@ -118,10 +118,10 @@ START_FUNC(opal_atomic_cmpset_rel_64) ld r7,-24(r1) eieio - LSYM(11) ldarx r9, 0, r3 - cmpd 0, r9, r5 - bne- REFLSYM(12) - stdcx. r7, 0, r3 + LSYM(11) ldarx r9, 0, r3 + cmpd 0, r9, r5 + bne- REFLSYM(12) + stdcx. r7, 0, r3 bne- REFLSYM(11) LSYM(12) xor r3,r5,r9 @@ -135,9 +135,9 @@ END_FUNC(opal_atomic_cmpset_rel_64) START_FUNC(opal_atomic_add_32) - LSYM(13) lwarx r0, 0, r3 - add r0, r4, r0 - stwcx. r0, 0, r3 + LSYM(13) lwarx r0, 0, r3 + add r0, r4, r0 + stwcx. r0, 0, r3 bne- REFLSYM(13) mr r3,r0 blr @@ -146,9 +146,9 @@ END_FUNC(opal_atomic_add_32) START_FUNC(opal_atomic_sub_32) LSYM(14) lwarx r0,0,r3 - subf r0,r4,r0 - stwcx. r0,0,r3 - bne- REFLSYM(14) + subf r0,r4,r0 + stwcx. r0,0,r3 + bne- REFLSYM(14) mr r3,r0 blr END_FUNC(opal_atomic_sub_32) diff --git a/opal/asm/base/POWERPC64.asm b/opal/asm/base/POWERPC64.asm index 5e86e2d4abc..28da3f4d8e0 100644 --- a/opal/asm/base/POWERPC64.asm +++ b/opal/asm/base/POWERPC64.asm @@ -21,10 +21,10 @@ END_FUNC(opal_atomic_wmb) START_FUNC(opal_atomic_cmpset_32) - LSYM(1) lwarx r0, 0, r3 - cmpw 0, r0, r4 - bne- REFLSYM(2) - stwcx. r5, 0, r3 + LSYM(1) lwarx r0, 0, r3 + cmpw 0, r0, r4 + bne- REFLSYM(2) + stwcx. r5, 0, r3 bne- REFLSYM(1) LSYM(2) cmpw cr7,r0,r4 @@ -32,7 +32,7 @@ START_FUNC(opal_atomic_cmpset_32) rlwinm r3,r3,31,1 blr END_FUNC(opal_atomic_cmpset_32) - + START_FUNC(opal_atomic_cmpset_acq_32) mflr r0 @@ -77,10 +77,10 @@ END_FUNC(opal_atomic_cmpset_rel_32) START_FUNC(opal_atomic_cmpset_64) - LSYM(3) ldarx r0, 0, r3 - cmpd 0, r0, r4 + LSYM(3) ldarx r0, 0, r3 + cmpd 0, r0, r4 bne- REFLSYM(4) - stdcx. r5, 0, r3 + stdcx. r5, 0, r3 bne- REFLSYM(3) LSYM(4) xor r3,r4,r0 @@ -121,11 +121,11 @@ END_FUNC(opal_atomic_cmpset_rel_64) START_FUNC(opal_atomic_add_32) - LSYM(5) lwarx r0, 0, r3 - add r0, r4, r0 - stwcx. r0, 0, r3 + LSYM(5) lwarx r0, 0, r3 + add r0, r4, r0 + stwcx. r0, 0, r3 bne- REFLSYM(5) - + mr r3,r0 blr END_FUNC(opal_atomic_add_32) @@ -133,10 +133,10 @@ END_FUNC(opal_atomic_add_32) START_FUNC(opal_atomic_sub_32) LSYM(6) lwarx r0,0,r3 - subf r0,r4,r0 - stwcx. r0,0,r3 + subf r0,r4,r0 + stwcx. r0,0,r3 bne- REFLSYM(6) - + mr r3,r0 blr END_FUNC(opal_atomic_sub_32) diff --git a/opal/asm/base/SPARCV9_32.asm b/opal/asm/base/SPARCV9_32.asm index b39f9ed98ad..eb004a80653 100644 --- a/opal/asm/base/SPARCV9_32.asm +++ b/opal/asm/base/SPARCV9_32.asm @@ -3,7 +3,7 @@ START_FILE ALIGN(4) - + START_FUNC(opal_atomic_mb) !#PROLOGUE# 0 !#PROLOGUE# 1 @@ -76,10 +76,10 @@ START_FUNC(opal_atomic_cmpset_64) st %i1, [%fp-32] st %i2, [%fp-28] std %o4, [%fp-24] - ldx [%fp-24], %g1 - ldx [%fp-32], %g2 - casxa [%i0] 0x80, %g2, %g1 - stx %g1, [%fp-24] + ldx [%fp-24], %g1 + ldx [%fp-32], %g2 + casxa [%i0] 0x80, %g2, %g1 + stx %g1, [%fp-24] ld [%fp-24], %i5 ld [%fp-32], %g1 @@ -107,10 +107,10 @@ START_FUNC(opal_atomic_cmpset_acq_64) mov %i4, %o3 std %o4, [%fp-32] std %o2, [%fp-24] - ldx [%fp-24], %g1 - ldx [%fp-32], %g2 - casxa [%i0] 0x80, %g2, %g1 - stx %g1, [%fp-24] + ldx [%fp-24], %g1 + ldx [%fp-32], %g2 + casxa [%i0] 0x80, %g2, %g1 + stx %g1, [%fp-24] ld [%fp-24], %i5 ld [%fp-32], %g1 @@ -140,10 +140,10 @@ START_FUNC(opal_atomic_cmpset_rel_64) membar #StoreStore std %o4, [%fp-32] std %o2, [%fp-24] - ldx [%fp-24], %g1 - ldx [%fp-32], %g2 - casxa [%i0] 0x80, %g2, %g1 - stx %g1, [%fp-24] + ldx [%fp-24], %g1 + ldx [%fp-32], %g2 + casxa [%i0] 0x80, %g2, %g1 + stx %g1, [%fp-24] ld [%fp-24], %i5 ld [%fp-32], %g1 diff --git a/opal/asm/base/SPARCV9_64.asm b/opal/asm/base/SPARCV9_64.asm index 72b4557b0cc..9820ab34ce1 100644 --- a/opal/asm/base/SPARCV9_64.asm +++ b/opal/asm/base/SPARCV9_64.asm @@ -3,7 +3,7 @@ START_FILE ALIGN(4) - + START_FUNC(opal_atomic_mb) !#PROLOGUE# 0 !#PROLOGUE# 1 diff --git a/opal/asm/base/default.conf b/opal/asm/base/default.conf index 8f764a311ee..c54f085cf99 100644 --- a/opal/asm/base/default.conf +++ b/opal/asm/base/default.conf @@ -10,7 +10,7 @@ sub start_func($) my $ret = ""; $ret = "\t$GLOBAL $GSYM$func_name\n"; - if (! $TYPE eq "") { + if (! $TYPE eq "") { $ret .= "\t.type $GSYM$func_name, $TYPE" . "function\n"; } $ret .= "$GSYM$func_name$SUFFIX\n"; diff --git a/opal/asm/generate-asm.pl b/opal/asm/generate-asm.pl index c2f9a55f0e2..6c904a77f36 100644 --- a/opal/asm/generate-asm.pl +++ b/opal/asm/generate-asm.pl @@ -2,9 +2,9 @@ # # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -14,12 +14,12 @@ my $basedir = shift; my $output = shift; -if ( ! $asmarch) { +if ( ! $asmarch) { print "usage: generate-asm.pl [ASMARCH] [ASMFORMAT] [BASEDIR] [OUTPUT NAME]\n"; exit(1); } -open(INPUT, "$basedir/$asmarch.asm") || +open(INPUT, "$basedir/$asmarch.asm") || die "Could not open $basedir/$asmarch.asm: $!\n"; open(OUTPUT, ">$output") || die "Could not open $output: $!\n"; @@ -100,9 +100,9 @@ $delete = 1; } } - if (/^\#END_64BIT/) { + if (/^\#END_64BIT/) { $_ = ""; - $delete = 0; + $delete = 0; } if ($delete == 0) { diff --git a/opal/class/Makefile.am b/opal/class/Makefile.am index 5b9776f0043..e98f955de8d 100644 --- a/opal/class/Makefile.am +++ b/opal/class/Makefile.am @@ -6,7 +6,7 @@ # Copyright (c) 2004-2007 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/class/opal_bitmap.c b/opal/class/opal_bitmap.c index 530dc51f4d9..11d2a21bb38 100644 --- a/opal/class/opal_bitmap.c +++ b/opal/class/opal_bitmap.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,12 +37,12 @@ static void opal_bitmap_construct(opal_bitmap_t *bm); static void opal_bitmap_destruct(opal_bitmap_t *bm); -OBJ_CLASS_INSTANCE(opal_bitmap_t, opal_object_t, +OBJ_CLASS_INSTANCE(opal_bitmap_t, opal_object_t, opal_bitmap_construct, opal_bitmap_destruct); -static void -opal_bitmap_construct(opal_bitmap_t *bm) +static void +opal_bitmap_construct(opal_bitmap_t *bm) { bm->bitmap = NULL; bm->array_size = 0; @@ -109,41 +109,41 @@ int opal_bitmap_set_bit(opal_bitmap_t *bm, int bit) { int index, offset, new_size; - + if ((bit < 0) || (NULL == bm) || (bit > bm->max_size)) { return OPAL_ERR_BAD_PARAM; } - + index = bit / SIZE_OF_BASE_TYPE; offset = bit % SIZE_OF_BASE_TYPE; - + if (index >= bm->array_size) { - + /* We need to allocate more space for the bitmap, since we are out of range. We don't throw any error here, because this is valid and we simply expand the bitmap */ - + new_size = (int)(((size_t)index / bm->array_size + 1 ) * bm->array_size); if( new_size > bm->max_size ) new_size = bm->max_size; - + /* New size is just a multiple of the original size to fit in the index. */ bm->bitmap = (uint64_t*)realloc(bm->bitmap, new_size*sizeof(uint64_t)); if (NULL == bm->bitmap) { return OPAL_ERR_OUT_OF_RESOURCE; } - + /* zero out the new elements */ memset(&bm->bitmap[bm->array_size], 0, (new_size - bm->array_size) * sizeof(uint64_t)); - + /* Update the array_size */ bm->array_size = new_size; } - + /* Now set the bit */ bm->bitmap[index] |= (1UL << offset); - + return OPAL_SUCCESS; } @@ -152,14 +152,14 @@ int opal_bitmap_clear_bit(opal_bitmap_t *bm, int bit) { int index, offset; - + if ((bit < 0) || NULL == bm || (bit >= (bm->array_size * SIZE_OF_BASE_TYPE))) { return OPAL_ERR_BAD_PARAM; } - - index = bit / SIZE_OF_BASE_TYPE; + + index = bit / SIZE_OF_BASE_TYPE; offset = bit % SIZE_OF_BASE_TYPE; - + bm->bitmap[index] &= ~(1UL << offset); return OPAL_SUCCESS; } @@ -169,18 +169,18 @@ bool opal_bitmap_is_set_bit(opal_bitmap_t *bm, int bit) { int index, offset; - + if ((bit < 0) || NULL == bm || (bit >= (bm->array_size * SIZE_OF_BASE_TYPE))) { return false; } - - index = bit / SIZE_OF_BASE_TYPE; + + index = bit / SIZE_OF_BASE_TYPE; offset = bit % SIZE_OF_BASE_TYPE; - + if (0 != (bm->bitmap[index] & (1UL << offset))) { return true; } - + return false; } @@ -191,7 +191,7 @@ opal_bitmap_clear_all_bits(opal_bitmap_t *bm) if (NULL == bm) { return OPAL_ERR_BAD_PARAM; } - + memset(bm->bitmap, 0, bm->array_size * sizeof(uint64_t)); return OPAL_SUCCESS; } @@ -203,9 +203,9 @@ opal_bitmap_set_all_bits(opal_bitmap_t *bm) if (NULL == bm) { return OPAL_ERR_BAD_PARAM; } - + memset(bm->bitmap, 0xff, bm->array_size * sizeof(uint64_t)); - + return OPAL_SUCCESS; } @@ -215,25 +215,25 @@ opal_bitmap_find_and_set_first_unset_bit(opal_bitmap_t *bm, int *position) { int i = 0; uint64_t temp, all_ones = 0xffffffffffffffffUL; - + if (NULL == bm) { return OPAL_ERR_BAD_PARAM; } - + /* Neglect all which don't have an unset bit */ *position = 0; while((i < bm->array_size) && (bm->bitmap[i] == all_ones)) { ++i; } - + if (i == bm->array_size) { /* increase the bitmap size then */ *position = bm->array_size * SIZE_OF_BASE_TYPE; return opal_bitmap_set_bit(bm, *position); } - + /* This one has an unset bit, find its bit number */ - + temp = bm->bitmap[i]; bm->bitmap[i] |= (bm->bitmap[i] + 1); /* Set the first zero bit */ temp ^= bm->bitmap[i]; /* Compute the change: the first unset bit in the original number */ diff --git a/opal/class/opal_bitmap.h b/opal/class/opal_bitmap.h index 5f2515997d0..cda93888451 100644 --- a/opal/class/opal_bitmap.h +++ b/opal/class/opal_bitmap.h @@ -6,16 +6,16 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -93,7 +93,7 @@ OPAL_DECLSPEC int opal_bitmap_init (opal_bitmap_t *bm, int size); * @return OPAL error code or success * */ -OPAL_DECLSPEC int opal_bitmap_set_bit(opal_bitmap_t *bm, int bit); +OPAL_DECLSPEC int opal_bitmap_set_bit(opal_bitmap_t *bm, int bit); /** @@ -130,8 +130,8 @@ OPAL_DECLSPEC bool opal_bitmap_is_set_bit(opal_bitmap_t *bm, int bit); * @return err OPAL_SUCCESS on success */ -OPAL_DECLSPEC int opal_bitmap_find_and_set_first_unset_bit(opal_bitmap_t *bm, - int *position); +OPAL_DECLSPEC int opal_bitmap_find_and_set_first_unset_bit(opal_bitmap_t *bm, + int *position); /** @@ -139,7 +139,7 @@ OPAL_DECLSPEC int opal_bitmap_find_and_set_first_unset_bit(opal_bitmap_t *bm, * * @param bitmap The input bitmap (IN) * @return OPAL error code if bm is NULL - * + * */ OPAL_DECLSPEC int opal_bitmap_clear_all_bits(opal_bitmap_t *bm); @@ -214,7 +214,7 @@ OPAL_DECLSPEC int opal_bitmap_bitwise_xor_inplace(opal_bitmap_t *dest, opal_bitm /** * If the bitmaps are different - * + * * @param left Pointer to a bitmap * @param right Pointer to another bitmap * @return true if different, false if the same diff --git a/opal/class/opal_free_list.c b/opal/class/opal_free_list.c index b1caf188f3a..ff6a0c3f516 100644 --- a/opal/class/opal_free_list.c +++ b/opal/class/opal_free_list.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/class/opal_free_list.h b/opal/class/opal_free_list.h index 496c3ed8625..4834f09c499 100644 --- a/opal/class/opal_free_list.h +++ b/opal/class/opal_free_list.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -96,12 +96,12 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_free_list_t); struct mca_mpool_base_registration_t; struct opal_free_list_item_t -{ - opal_list_item_t super; +{ + opal_list_item_t super; struct mca_mpool_base_registration_t *registration; void *ptr; -}; -typedef struct opal_free_list_item_t opal_free_list_item_t; +}; +typedef struct opal_free_list_item_t opal_free_list_item_t; OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_free_list_item_t); @@ -123,7 +123,7 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_free_list_item_t); * @param item_init (IN) Optional item initialization function * @param ctx (IN) Initialization function context. */ - + OPAL_DECLSPEC int opal_free_list_init (opal_free_list_t *free_list, size_t frag_size, size_t frag_alignment, @@ -174,13 +174,13 @@ OPAL_DECLSPEC int opal_free_list_resize_mt (opal_free_list_t *flist, size_t size /** - * Attemp to obtain an item from a free list. + * Attemp to obtain an item from a free list. * * @param fl (IN) Free list. * @param item (OUT) Allocated item. * - * If the requested item is not available the free list is grown to - * accomodate the request - unless the max number of allocations has + * If the requested item is not available the free list is grown to + * accomodate the request - unless the max number of allocations has * been reached. If this is the case - a NULL pointer is returned * to the caller. This function comes in three flavor: thread safe * (opal_free_list_get_mt), single threaded (opal_free_list_get_st), @@ -233,8 +233,8 @@ static inline opal_free_list_item_t *opal_free_list_get (opal_free_list_t *flist * @param fl (IN) Free list. * @param item (OUT) Allocated item. * - * If the requested item is not available the free list is grown to - * accomodate the request - unless the max number of allocations has + * If the requested item is not available the free list is grown to + * accomodate the request - unless the max number of allocations has * been reached. In this case the caller is blocked until an item * is returned to the list. */ @@ -306,7 +306,7 @@ static inline opal_free_list_item_t *opal_free_list_wait (opal_free_list_t *fl) } /** - * Return an item to a free list. + * Return an item to a free list. * * @param fl (IN) Free list. * @param item (OUT) Allocated item. @@ -361,5 +361,5 @@ static inline void opal_free_list_return (opal_free_list_t *flist, opal_free_list_return (fl, item) END_C_DECLS -#endif +#endif diff --git a/opal/class/opal_graph.c b/opal/class/opal_graph.c index e27af310a28..73edaff27f8 100644 --- a/opal/class/opal_graph.c +++ b/opal/class/opal_graph.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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 Voltaire All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -188,7 +188,7 @@ static void opal_adjacency_list_destruct(opal_adjacency_list_t *aj_list) /** * This function deletes all the edges that are connected *to* a * vertex. - * + * * @param graph * @param vertex */ @@ -230,7 +230,7 @@ static void delete_all_edges_conceded_to_vertex(opal_graph_t *graph, opal_graph_ /** * This graph API adds a vertex to graph. The most common use * for this API is while building a graph. - * + * * @param graph The graph that the vertex will be added to. * @param vertex The vertex we want to add. */ @@ -256,7 +256,7 @@ void opal_graph_add_vertex(opal_graph_t *graph, opal_graph_vertex_t *vertex) aj_list->vertex = vertex; /* point the vertex to the adjacency list of the vertex (for easy searching) */ vertex->in_adj_list = aj_list; - /* Append the new creates adjacency list to the graph */ + /* Append the new creates adjacency list to the graph */ opal_list_append(graph->adjacency_list, (opal_list_item_t*)aj_list); /* point the vertex to the graph it belongs to (mostly for debug uses)*/ vertex->in_graph = graph; @@ -269,14 +269,14 @@ void opal_graph_add_vertex(opal_graph_t *graph, opal_graph_vertex_t *vertex) * This graph API adds an edge (connection between two * vertices) to a graph. The most common use * for this API is while building a graph. - * + * * @param graph The graph that this edge will be added to. * @param edge The edge that we want to add. - * + * * @return int Success or error. this API can return an error if * one of the vertices is not in the graph. */ -int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge) +int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge) { opal_adjacency_list_t *aj_list, *start_aj_list= NULL; opal_list_item_t *item; @@ -322,7 +322,7 @@ int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge) * graph. while removing vertices from a graph, we should also * remove the connections from and to the vertices that we are * removing. - * + * * @param graph The graph that this edge will be remove from. * @param edge the edge that we want to remove. */ @@ -339,7 +339,7 @@ void opal_graph_remove_edge (opal_graph_t *graph, opal_graph_edge_t *edge) * This graph API remove a vertex from graph. The most common * use for this API is while distracting a graph or while * removing relevant vertices from a graph. - * + * * @param graph The graph that the vertex will be remove from. * @param vertex The vertex we want to remove. */ @@ -375,11 +375,11 @@ void opal_graph_remove_vertex(opal_graph_t *graph, opal_graph_vertex_t *vertex) /** * This graph API tell us if two vertices are adjacent - * + * * @param graph The graph that the vertices belongs to. * @param vertex1 first vertex. * @param vertex2 second vertex. - * + * * @return uint32_t the weight of the connection between the two * vertices or infinity if the vertices are not * connected. @@ -432,9 +432,9 @@ uint32_t opal_graph_adjacent(opal_graph_t *graph, opal_graph_vertex_t *vertex1, /** * This Graph API returns the order of the graph (number of * vertices) - * + * * @param graph - * + * * @return int */ int opal_graph_get_order(opal_graph_t *graph) @@ -447,7 +447,7 @@ int opal_graph_get_order(opal_graph_t *graph) * edges) * * @param graph - * + * * @return int */ int opal_graph_get_size(opal_graph_t *graph) @@ -461,7 +461,7 @@ int opal_graph_get_size(opal_graph_t *graph) * @param graph the graph we searching in. * @param vertex_data the vertex data we are searching according * to. - * + * * @return opal_graph_vertex_t* The vertex founded or NULL. */ opal_graph_vertex_t *opal_graph_find_vertex(opal_graph_t *graph, void *vertex_data) @@ -492,12 +492,12 @@ opal_graph_vertex_t *opal_graph_find_vertex(opal_graph_t *graph, void *vertex_da /** * This graph API returns an array of pointers of all the * vertices in the graph. - * - * + * + * * @param graph * @param vertices_list an array of pointers of all the * vertices in the graph vertices. - * + * * @return int returning the graph order (the * number of vertices in the returned array) */ @@ -528,20 +528,20 @@ int opal_graph_get_graph_vertices(opal_graph_t *graph, opal_pointer_array_t *ver /** * This graph API returns all the adjacents of a vertex and the * distance (weight) of those adjacents and the vertex. - * + * * @param graph * @param vertex The reference vertex * @param adjacents An allocated pointer array of vertices and * their distance from the reference vertex. * Note that this pointer should be free after * usage by the user - * + * * @return int the number of adjacents in the list. */ int opal_graph_get_adjacent_vertices(opal_graph_t *graph, opal_graph_vertex_t *vertex, opal_value_array_t *adjacents) { opal_adjacency_list_t *adj_list; - opal_graph_edge_t *edge; + opal_graph_edge_t *edge; int adjacents_number; opal_list_item_t *item; vertex_distance_from_t distance_from; @@ -576,11 +576,11 @@ int opal_graph_get_adjacent_vertices(opal_graph_t *graph, opal_graph_vertex_t *v /** * This graph API finds the shortest path between two vertices. - * + * * @param graph * @param vertex1 The start vertex. * @param vertex2 The end vertex. - * + * * @return uint32_t the distance between the two vertices. */ @@ -632,10 +632,10 @@ uint32_t opal_graph_spf(opal_graph_t *graph, opal_graph_vertex_t *vertex1, opal_ * Compare the distance between two vertex distance items. this * function is used for sorting an array of vertices distance by * qsort function. - * + * * @param item1 a void pointer to vertex distance structure * @param item2 a void pointer to vertex distance structure - * + * * @return int 1 - the first item weight is higher then the * second item weight. 0 - the weights are equal. -1 - * the second item weight is higher the the first item @@ -666,12 +666,12 @@ static int compare_vertex_distance(const void *item1, const void *item2) * This graph API returns the distance (weight) from a reference * vertex to all other vertices in the graph using the Dijkstra * algorithm - * + * * @param graph * @param vertex The reference vertex. * @param distance_array An array of vertices and * their distance from the reference vertex. - * + * * @return uint32_t the size of the distance array */ uint32_t opal_graph_dijkstra(opal_graph_t *graph, opal_graph_vertex_t *vertex, opal_value_array_t *distance_array) @@ -758,7 +758,7 @@ uint32_t opal_graph_dijkstra(opal_graph_t *graph, opal_graph_vertex_t *vertex, o * This graph API duplicates a graph. Note that this API does * not copy the graph but builds a new graph while coping just * the vertex data. - * + * * @param dest The new created graph. * @param src The graph we want to duplicate. */ diff --git a/opal/class/opal_graph.h b/opal/class/opal_graph.h index 68743728f3b..47b5f54bdb9 100644 --- a/opal/class/opal_graph.h +++ b/opal/class/opal_graph.h @@ -5,24 +5,24 @@ * 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, + * 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 Voltaire All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** - * @file + * @file * The opal_graph interface is used to provide a generic graph infrastructure * to Open-MPI. The graph is represented as an adjacentcy list. * The graph is a list of vertices. The graph is a weighted directional graph. - * Each vertex contains a pointer to a vertex data. - * This pointer can point to the structure that this vertex belongs to. + * Each vertex contains a pointer to a vertex data. + * This pointer can point to the structure that this vertex belongs to. */ #ifndef OPAL_GRAPH_H #define OPAL_GRAPH_H @@ -58,7 +58,7 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_graph_t); * * @param dst The destination pointer of vertex_data * @param src The source pointer of the vertex_data - * + * * */ typedef void (*opal_graph_copy_vertex_data)(void **dst, void *src); @@ -66,7 +66,7 @@ typedef void (*opal_graph_copy_vertex_data)(void **dst, void *src); /** * free vertex data. * @param vertex_data - * + * * The vertex data can point to the structure that this vertex * belongs to. */ @@ -79,8 +79,8 @@ typedef void *(*opal_graph_alloc_vertex_data)(void); /** * Compare two vertices data. - * - *@param vertex_data1 + * + *@param vertex_data1 *@param vertex_data2 * *@return int The comparition results. 1- vertex_data1 is bigger @@ -92,7 +92,7 @@ typedef int (*opal_graph_compare_vertex_data)(void *vertex_data1, void *vertex_ /** * print a vertex data. - * + * * @param vertex_data */ typedef char *(*opal_graph_print_vertex)(void *vertex_data); @@ -127,7 +127,7 @@ typedef struct opal_graph_vertex_t opal_graph_vertex_t; */ struct opal_adjacency_list_t { opal_list_item_t super; /* A pointer to vertex parent */ - opal_graph_vertex_t *vertex; /* The adjacency_list is for adjacent of this vertex */ + opal_graph_vertex_t *vertex; /* The adjacency_list is for adjacent of this vertex */ opal_list_t *edges; /* An edge list for all the adjacent and their weights */ }; @@ -172,7 +172,7 @@ struct opal_graph_t { /** * A type for graph class */ -typedef struct opal_graph_t opal_graph_t; +typedef struct opal_graph_t opal_graph_t; /** * This structure represent the distance (weight) of a vertex @@ -191,7 +191,7 @@ typedef struct vertex_distance_from_t vertex_distance_from_t; /** * This graph API adds a vertex to graph. The most common use * for this API is while building a graph. - * + * * @param graph The graph that the vertex will be added to. * @param vertex The vertex we want to add. */ @@ -201,7 +201,7 @@ OPAL_DECLSPEC void opal_graph_add_vertex(opal_graph_t *graph, opal_graph_vertex_ * This graph API remove a vertex from graph. The most common * use for this API is while distracting a graph or while * removing relevant vertices from a graph. - * + * * @param graph The graph that the vertex will be remove from. * @param vertex The vertex we want to remove. */ @@ -211,14 +211,14 @@ OPAL_DECLSPEC void opal_graph_remove_vertex(opal_graph_t *graph, opal_graph_vert * This graph API adds an edge (connection between two * vertices) to a graph. The most common use * for this API is while building a graph. - * + * * @param graph The graph that this edge will be added to. * @param edge The edge that we want to add. - * + * * @return int Success or error. this API can return an error if * one of the vertices is not in the graph. */ -OPAL_DECLSPEC int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge); +OPAL_DECLSPEC int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge); /** * This graph API removes an edge (a connection between two @@ -227,7 +227,7 @@ OPAL_DECLSPEC int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *ed * graph. while removing vertices from a graph, we should also * remove the connections from and to the vertices that we are * removing. - * + * * @param graph The graph that this edge will be remove from. * @param edge the edge that we want to remove. */ @@ -235,11 +235,11 @@ OPAL_DECLSPEC void opal_graph_remove_edge (opal_graph_t *graph, opal_graph_edge_ /** * This graph API tell us if two vertices are adjacent - * + * * @param graph The graph that the vertices belongs to. * @param vertex1 first vertex. * @param vertex2 second vertex. - * + * * @return uint32_t the weight of the connection between the two * vertices or infinity if the vertices are not * connected. @@ -249,9 +249,9 @@ OPAL_DECLSPEC uint32_t opal_graph_adjacent(opal_graph_t *graph, opal_graph_verte /** * This Graph API returns the order of the graph (number of * vertices) - * + * * @param graph - * + * * @return int */ OPAL_DECLSPEC int opal_graph_get_order(opal_graph_t *graph); @@ -261,7 +261,7 @@ OPAL_DECLSPEC int opal_graph_get_order(opal_graph_t *graph); * edges) * * @param graph - * + * * @return int */ OPAL_DECLSPEC int opal_graph_get_size(opal_graph_t *graph); @@ -272,7 +272,7 @@ OPAL_DECLSPEC int opal_graph_get_size(opal_graph_t *graph); * @param graph the graph we searching in. * @param vertex_data the vertex data we are searching according * to. - * + * * @return opal_graph_vertex_t* The vertex founded or NULL. */ OPAL_DECLSPEC opal_graph_vertex_t *opal_graph_find_vertex(opal_graph_t *graph, void *vertex_data); @@ -281,12 +281,12 @@ OPAL_DECLSPEC opal_graph_vertex_t *opal_graph_find_vertex(opal_graph_t *graph, v /** * This graph API returns an array of pointers of all the * vertices in the graph. - * - * + * + * * @param graph * @param vertices_list an array of pointers of all the * vertices in the graph vertices. - * + * * @return int returning the graph order (the * number of vertices in the returned array) */ @@ -295,14 +295,14 @@ OPAL_DECLSPEC int opal_graph_get_graph_vertices(opal_graph_t *graph, opal_pointe /** * This graph API returns all the adjacent of a vertex and the * distance (weight) of those adjacent and the vertex. - * + * * @param graph * @param vertex The reference vertex * @param adjacent An allocated pointer array of vertices and * their distance from the reference vertex. * Note that this pointer should be free after * usage by the user - * + * * @return int the number of adjacent in the list. */ OPAL_DECLSPEC int opal_graph_get_adjacent_vertices(opal_graph_t *graph, opal_graph_vertex_t *vertex, opal_value_array_t *adjacent); @@ -311,7 +311,7 @@ OPAL_DECLSPEC int opal_graph_get_adjacent_vertices(opal_graph_t *graph, opal_gra * This graph API duplicates a graph. Note that this API does * not copy the graph but builds a new graph while coping just * the vertices data. - * + * * @param dest The new created graph. * @param src The graph we want to duplicate. */ @@ -319,11 +319,11 @@ OPAL_DECLSPEC void opal_graph_duplicate(opal_graph_t **dest, opal_graph_t *src); /** * This graph API finds the shortest path between two vertices. - * + * * @param graph * @param vertex1 The start vertex. * @param vertex2 The end vertex. - * + * * @return uint32_t the distance between the two vertices. */ OPAL_DECLSPEC uint32_t opal_graph_spf(opal_graph_t *graph, opal_graph_vertex_t *vertex1, opal_graph_vertex_t *vertex2); @@ -332,12 +332,12 @@ OPAL_DECLSPEC uint32_t opal_graph_spf(opal_graph_t *graph, opal_graph_vertex_t * * This graph API returns the distance (weight) from a reference * vertex to all other vertices in the graph using the Dijkstra * algorithm - * + * * @param graph * @param vertex The reference vertex. * @param distance_array An array of vertices and * their distance from the reference vertex. - * + * * @return uint32_t the size of the distance array */ OPAL_DECLSPEC uint32_t opal_graph_dijkstra(opal_graph_t *graph, opal_graph_vertex_t *vertex, opal_value_array_t *distance_array); diff --git a/opal/class/opal_hash_table.c b/opal/class/opal_hash_table.c index dcc246efa5e..628440dc1fa 100644 --- a/opal/class/opal_hash_table.c +++ b/opal/class/opal_hash_table.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,9 +33,9 @@ /* * opal_hash_table_t - * + * * Sketch: [Contributed by David Linden of Hewlett-Packard] - * + * * This has been found to be good for search and insert and * (seldom-)remove, all with probablistic O(1) time. Having a good * distribution of the hash indices is important, so even if you know @@ -55,7 +55,7 @@ * because searching will eventually find an invalid element. At * maximum density, assuming random usage of the elements, the * expected search length is 1/(1-density); for a density of 1/2, this - * is 2. + * is 2. * * I believe this blinded bucket/element scheme is actually more * storage-efficient than a bucket having a linear list of elements. @@ -87,7 +87,7 @@ #define HASH_MULTIPLIER 31 -/* +/* * Define the structs that are opaque in the .h */ @@ -108,7 +108,7 @@ typedef struct opal_hash_element_t opal_hash_element_t; struct opal_hash_type_methods_t { /* Frees any storage associated with the element * The value is not owned by the hash table - * The key,key_size of pointer keys is + * The key,key_size of pointer keys is */ void (*elt_destructor)(opal_hash_element_t * elt); /* Hash the key of the element -- for growing and adjusting-after-removal */ @@ -121,7 +121,7 @@ static void opal_hash_table_construct(opal_hash_table_t* ht); static void opal_hash_table_destruct(opal_hash_table_t* ht); OBJ_CLASS_INSTANCE( - opal_hash_table_t, + opal_hash_table_t, opal_object_t, opal_hash_table_construct, opal_hash_table_destruct @@ -144,11 +144,11 @@ opal_hash_table_destruct(opal_hash_table_t* ht) free(ht->ht_table); } -/* +/* * Init, etc */ -static size_t +static size_t opal_hash_round_capacity_up(size_t capacity) { /* round up to (1 mod 30) */ @@ -200,7 +200,7 @@ opal_hash_table_remove_all(opal_hash_table_t* ht) ht->ht_size = 0; /* the tests reuse the hash table for different types after removing all */ /* so we should allow that by forgetting what type it used to be */ - ht->ht_type_methods = NULL; + ht->ht_type_methods = NULL; return OPAL_SUCCESS; } @@ -212,10 +212,10 @@ opal_hash_grow(opal_hash_table_t * ht) opal_hash_element_t* new_table; size_t old_capacity; size_t new_capacity; - + old_table = ht->ht_table; old_capacity = ht->ht_capacity; - + new_capacity = old_capacity * ht->ht_growth_numer / ht->ht_growth_denom; new_capacity = opal_hash_round_capacity_up(new_capacity); @@ -317,13 +317,13 @@ opal_hash_table_remove_elt_at(opal_hash_table_t * ht, size_t ii) /***************************************************************************/ -static uint64_t +static uint64_t opal_hash_hash_elt_uint32(opal_hash_element_t * elt) { return elt->key.u32; } -static const struct opal_hash_type_methods_t +static const struct opal_hash_type_methods_t opal_hash_type_methods_uint32 = { NULL, opal_hash_hash_elt_uint32 @@ -450,13 +450,13 @@ opal_hash_table_remove_value_uint32(opal_hash_table_t * ht, uint32_t key) /***************************************************************************/ -static uint64_t +static uint64_t opal_hash_hash_elt_uint64(opal_hash_element_t * elt) { return elt->key.u64; } -static const struct opal_hash_type_methods_t +static const struct opal_hash_type_methods_t opal_hash_type_methods_uint64 = { NULL, opal_hash_hash_elt_uint64 @@ -584,13 +584,13 @@ opal_hash_table_remove_value_uint64(opal_hash_table_t * ht, uint64_t key) /***************************************************************************/ /* helper function used in several places */ -static uint64_t +static uint64_t opal_hash_hash_key_ptr(const void * key, size_t key_size) { uint64_t hash; const unsigned char *scanner; size_t ii; - + hash = 0; scanner = (const unsigned char *)key; for (ii = 0; ii < key_size; ii += 1) { @@ -601,7 +601,7 @@ opal_hash_hash_key_ptr(const void * key, size_t key_size) /* ptr methods */ -static void +static void opal_hash_destruct_elt_ptr(opal_hash_element_t * elt) { elt->key.ptr.key_size = 0; @@ -612,20 +612,20 @@ opal_hash_destruct_elt_ptr(opal_hash_element_t * elt) } } -static uint64_t +static uint64_t opal_hash_hash_elt_ptr(opal_hash_element_t * elt) { return opal_hash_hash_key_ptr(elt->key.ptr.key, elt->key.ptr.key_size); } -static const struct opal_hash_type_methods_t +static const struct opal_hash_type_methods_t opal_hash_type_methods_ptr = { opal_hash_destruct_elt_ptr, opal_hash_hash_elt_ptr }; int /* OPAL_ return code */ -opal_hash_table_get_value_ptr(opal_hash_table_t * ht, +opal_hash_table_get_value_ptr(opal_hash_table_t * ht, const void * key, size_t key_size, void * *value) { @@ -663,8 +663,8 @@ opal_hash_table_get_value_ptr(opal_hash_table_t * ht, } int /* OPAL_ return code */ -opal_hash_table_set_value_ptr(opal_hash_table_t * ht, - const void * key, size_t key_size, +opal_hash_table_set_value_ptr(opal_hash_table_t * ht, + const void * key, size_t key_size, void * value) { int rc; @@ -707,7 +707,7 @@ opal_hash_table_set_value_ptr(opal_hash_table_t * ht, } else if (elt->key.ptr.key_size == key_size && 0 == memcmp(elt->key.ptr.key, key, key_size)) { /* replace existing value */ - elt->value = value; + elt->value = value; return OPAL_SUCCESS; } else { /* keep looking */ @@ -716,7 +716,7 @@ opal_hash_table_set_value_ptr(opal_hash_table_t * ht, } int /* OPAL_ return code */ -opal_hash_table_remove_value_ptr(opal_hash_table_t * ht, +opal_hash_table_remove_value_ptr(opal_hash_table_t * ht, const void * key, size_t key_size) { size_t ii, capacity = ht->ht_capacity; @@ -755,7 +755,7 @@ opal_hash_table_remove_value_ptr(opal_hash_table_t * ht, /* Traversals */ static int /* OPAL_ return code */ -opal_hash_table_get_next_elt(opal_hash_table_t *ht, +opal_hash_table_get_next_elt(opal_hash_table_t *ht, opal_hash_element_t * prev_elt, /* NULL means find first */ opal_hash_element_t * *next_elt) { @@ -773,16 +773,16 @@ opal_hash_table_get_next_elt(opal_hash_table_t *ht, } int /* OPAL_ return code */ -opal_hash_table_get_first_key_uint32(opal_hash_table_t * ht, - uint32_t *key, void * *value, +opal_hash_table_get_first_key_uint32(opal_hash_table_t * ht, + uint32_t *key, void * *value, void * *node) { return opal_hash_table_get_next_key_uint32(ht, key, value, NULL, node); } int /* OPAL_ return code */ -opal_hash_table_get_next_key_uint32(opal_hash_table_t * ht, - uint32_t *key, void * *value, +opal_hash_table_get_next_key_uint32(opal_hash_table_t * ht, + uint32_t *key, void * *value, void * in_node, void * *out_node) { opal_hash_element_t * elt; @@ -796,16 +796,16 @@ opal_hash_table_get_next_key_uint32(opal_hash_table_t * ht, } int /* OPAL_ return code */ -opal_hash_table_get_first_key_ptr(opal_hash_table_t * ht, - void * *key, size_t *key_size, void * *value, +opal_hash_table_get_first_key_ptr(opal_hash_table_t * ht, + void * *key, size_t *key_size, void * *value, void * *node) { return opal_hash_table_get_next_key_ptr(ht, key, key_size, value, NULL, node); } int /* OPAL_ return code */ -opal_hash_table_get_next_key_ptr(opal_hash_table_t * ht, - void * *key, size_t *key_size, void * *value, +opal_hash_table_get_next_key_ptr(opal_hash_table_t * ht, + void * *key, size_t *key_size, void * *value, void * in_node, void * *out_node) { opal_hash_element_t * elt; @@ -820,16 +820,16 @@ opal_hash_table_get_next_key_ptr(opal_hash_table_t * ht, } int /* OPAL_ return code */ -opal_hash_table_get_first_key_uint64(opal_hash_table_t * ht, - uint64_t *key, void * *value, +opal_hash_table_get_first_key_uint64(opal_hash_table_t * ht, + uint64_t *key, void * *value, void * *node) { return opal_hash_table_get_next_key_uint64(ht, key, value, NULL, node); } int /* OPAL_ return code */ -opal_hash_table_get_next_key_uint64(opal_hash_table_t * ht, - uint64_t *key, void * *value, +opal_hash_table_get_next_key_uint64(opal_hash_table_t * ht, + uint64_t *key, void * *value, void * in_node, void * *out_node) { opal_hash_element_t * elt; @@ -849,7 +849,7 @@ static void opal_proc_table_construct(opal_proc_table_t* pt); static void opal_proc_table_destruct(opal_proc_table_t* pt); OBJ_CLASS_INSTANCE( - opal_proc_table_t, + opal_proc_table_t, opal_hash_table_t, opal_proc_table_construct, opal_proc_table_destruct @@ -866,7 +866,7 @@ opal_proc_table_destruct(opal_proc_table_t* pt) { } -/* +/* * Init, etc */ @@ -886,7 +886,7 @@ int opal_proc_table_remove_all(opal_proc_table_t *pt) { void * node; rc = opal_hash_table_get_first_key_uint32(&pt->super, &jobid, (void **)&vpids, &node); - + if (OPAL_SUCCESS == rc) { do { if (NULL != vpids) { @@ -901,7 +901,7 @@ int opal_proc_table_remove_all(opal_proc_table_t *pt) { return rc; } -int opal_proc_table_get_value(opal_proc_table_t* pt, opal_process_name_t key, +int opal_proc_table_get_value(opal_proc_table_t* pt, opal_process_name_t key, void** ptr) { int rc; opal_hash_table_t * vpids; diff --git a/opal/class/opal_hash_table.h b/opal/class/opal_hash_table.h index ad591e001e5..c621883f238 100644 --- a/opal/class/opal_hash_table.h +++ b/opal/class/opal_hash_table.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -17,14 +17,14 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ -/** @file +/** @file * * A hash table that may be indexed with either fixed length * (e.g. uint32_t/uint64_t) or arbitrary size binary key @@ -44,7 +44,7 @@ BEGIN_C_DECLS OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_hash_table_t); - + struct opal_hash_table_t { opal_object_t super; /**< subclass of opal_object_t */ @@ -58,14 +58,14 @@ struct opal_hash_table_t }; typedef struct opal_hash_table_t opal_hash_table_t; - - + + /** * Initializes the table size, must be called before using * the table. * * @param table The input hash table (IN). - * @param size The size of the table, which will be rounded up + * @param size The size of the table, which will be rounded up * (if required) to the next highest power of two (IN). * @return OPAL error code. * @@ -114,7 +114,7 @@ OPAL_DECLSPEC int opal_hash_table_remove_all(opal_hash_table_t *ht); * */ -OPAL_DECLSPEC int opal_hash_table_get_value_uint32(opal_hash_table_t* table, uint32_t key, +OPAL_DECLSPEC int opal_hash_table_get_value_uint32(opal_hash_table_t* table, uint32_t key, void** ptr); /** @@ -192,7 +192,7 @@ OPAL_DECLSPEC int opal_hash_table_remove_value_uint64(opal_hash_table_t *table, * */ -OPAL_DECLSPEC int opal_hash_table_get_value_ptr(opal_hash_table_t *table, const void* key, +OPAL_DECLSPEC int opal_hash_table_get_value_ptr(opal_hash_table_t *table, const void* key, size_t keylen, void **ptr); /** @@ -246,11 +246,11 @@ OPAL_DECLSPEC int opal_hash_table_get_first_key_uint32(opal_hash_table_t *table, /** - * Get the next 32 bit key from the hash table, knowing the current key + * Get the next 32 bit key from the hash table, knowing the current key * @param table The hash table pointer (IN) * @param key The key (OUT) * @param value The value corresponding to this key (OUT) - * @param in_node The node pointer from previous call to either get_first + * @param in_node The node pointer from previous call to either get_first or get_next (IN) * @param out_node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls @@ -282,11 +282,11 @@ OPAL_DECLSPEC int opal_hash_table_get_first_key_uint64(opal_hash_table_t *table, /** - * Get the next 64 bit key from the hash table, knowing the current key + * Get the next 64 bit key from the hash table, knowing the current key * @param table The hash table pointer (IN) * @param key The key (OUT) * @param value The value corresponding to this key (OUT) - * @param in_node The node pointer from previous call to either get_first + * @param in_node The node pointer from previous call to either get_first or get_next (IN) * @param out_node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls @@ -294,7 +294,7 @@ OPAL_DECLSPEC int opal_hash_table_get_first_key_uint64(opal_hash_table_t *table, * @return OPAL error code * */ - + OPAL_DECLSPEC int opal_hash_table_get_next_key_uint64(opal_hash_table_t *table, uint64_t *key, void **value, void *in_node, void **out_node); @@ -319,12 +319,12 @@ OPAL_DECLSPEC int opal_hash_table_get_first_key_ptr(opal_hash_table_t *table, vo /** - * Get the next ptr bit key from the hash table, knowing the current key + * Get the next ptr bit key from the hash table, knowing the current key * @param table The hash table pointer (IN) * @param key The key (OUT) * @param key_size The key size (OUT) * @param value The value corresponding to this key (OUT) - * @param in_node The node pointer from previous call to either get_first + * @param in_node The node pointer from previous call to either get_first or get_next (IN) * @param out_node The pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls @@ -340,7 +340,7 @@ OPAL_DECLSPEC int opal_hash_table_get_next_key_ptr(opal_hash_table_t *table, voi OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_proc_table_t); - + struct opal_proc_table_t { opal_hash_table_t super; /**< subclass of opal_object_t */ @@ -353,16 +353,16 @@ struct opal_proc_table_t }; typedef struct opal_proc_table_t opal_proc_table_t; - - + + /** * Initializes the table size, must be called before using * the table. * * @param pt The input hash table (IN). - * @param jobids The size of the jobids table, which will be rounded up + * @param jobids The size of the jobids table, which will be rounded up * (if required) to the next highest power of two (IN). - * @param vpids The size of the vpids table, which will be rounded up + * @param vpids The size of the vpids table, which will be rounded up * (if required) to the next highest power of two (IN). * @return OPAL error code. * @@ -393,7 +393,7 @@ OPAL_DECLSPEC int opal_proc_table_remove_all(opal_proc_table_t *pt); * */ -OPAL_DECLSPEC int opal_proc_table_get_value(opal_proc_table_t* pt, opal_process_name_t key, +OPAL_DECLSPEC int opal_proc_table_get_value(opal_proc_table_t* pt, opal_process_name_t key, void** ptr); /** @@ -441,16 +441,16 @@ OPAL_DECLSPEC int opal_proc_table_get_first_key(opal_proc_table_t *pt, opal_proc /** - * Get the next opal_process_name_t key from the hash table, knowing the current key + * Get the next opal_process_name_t key from the hash table, knowing the current key * @param pt The hash table pointer (IN) * @param key The key (OUT) * @param value The value corresponding to this key (OUT) - * @param in_node1 The first node pointer from previous call to either get_first + * @param in_node1 The first node pointer from previous call to either get_first or get_next (IN) * @param out_node1 The first pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls * to get_next_key) (OUT) - * @param in_node2 The second node pointer from previous call to either get_first + * @param in_node2 The second node pointer from previous call to either get_first or get_next (IN) * @param out_node2 The second pointer to the hash table internal node which stores * the key-value pair (this is required for subsequent calls diff --git a/opal/class/opal_hotel.c b/opal/class/opal_hotel.c index 5c0fae78f09..209e66eb9e2 100644 --- a/opal/class/opal_hotel.c +++ b/opal/class/opal_hotel.c @@ -2,9 +2,9 @@ * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -19,7 +19,7 @@ static void local_eviction_callback(int fd, short flags, void *arg) { - opal_hotel_room_eviction_callback_arg_t *eargs = + opal_hotel_room_eviction_callback_arg_t *eargs = (opal_hotel_room_eviction_callback_arg_t*) arg; void *occupant = eargs->hotel->rooms[eargs->room_num].occupant; @@ -51,7 +51,7 @@ int opal_hotel_init(opal_hotel_t *h, int num_rooms, h->evict_callback_fn = evict_callback_fn; h->rooms = (opal_hotel_room_t*)malloc(num_rooms * sizeof(opal_hotel_room_t)); if (NULL != evict_callback_fn) { - h->eviction_args = + h->eviction_args = (opal_hotel_room_eviction_callback_arg_t*)malloc(num_rooms * sizeof(opal_hotel_room_eviction_callback_arg_t)); } h->unoccupied_rooms = (int*) malloc(num_rooms * sizeof(int)); diff --git a/opal/class/opal_list.c b/opal/class/opal_list.c index e40aa5abe25..e0a5112c38a 100644 --- a/opal/class/opal_list.c +++ b/opal/class/opal_list.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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 Voltaire All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -114,11 +114,11 @@ bool opal_list_insert(opal_list_t *list, opal_list_item_t *item, long long idx) /* Adds item to list at index and retains item. */ int i; volatile opal_list_item_t *ptr, *next; - + if ( idx >= (long long)list->opal_list_length ) { return false; } - + if ( 0 == idx ) { opal_list_prepend(list, item); @@ -188,7 +188,7 @@ opal_list_transfer(opal_list_item_t *pos, opal_list_item_t *begin, void -opal_list_join(opal_list_t *thislist, opal_list_item_t *pos, +opal_list_join(opal_list_t *thislist, opal_list_item_t *pos, opal_list_t *xlist) { if (0 != opal_list_get_size(xlist)) { @@ -206,14 +206,14 @@ void opal_list_splice(opal_list_t *thislist, opal_list_item_t *pos, opal_list_t *xlist, opal_list_item_t *first, opal_list_item_t *last) -{ +{ size_t change = 0; opal_list_item_t *tmp; if (first != last) { /* figure out how many things we are going to move (have to do * first, since last might be end and then we wouldn't be able - * to run the loop) + * to run the loop) */ for (tmp = first ; tmp != last ; tmp = opal_list_get_next(tmp)) { change++; @@ -237,7 +237,7 @@ int opal_list_sort(opal_list_t* list, opal_list_item_compare_fn_t compare) if (0 == list->opal_list_length) { return OPAL_SUCCESS; } - items = (opal_list_item_t**)malloc(sizeof(opal_list_item_t*) * + items = (opal_list_item_t**)malloc(sizeof(opal_list_item_t*) * list->opal_list_length); if (NULL == items) { @@ -247,8 +247,8 @@ int opal_list_sort(opal_list_t* list, opal_list_item_compare_fn_t compare) while(NULL != (item = opal_list_remove_first(list))) { items[index++] = item; } - - qsort(items, index, sizeof(opal_list_item_t*), + + qsort(items, index, sizeof(opal_list_item_t*), (int(*)(const void*,const void*))compare); for (i=0; iopal_list_sentinel.opal_list_next == + return (list->opal_list_sentinel.opal_list_next == &(list->opal_list_sentinel) ? true : false); } @@ -407,7 +407,7 @@ static inline opal_list_item_t* opal_list_get_end(opal_list_t* list) * * @returns The size of the list (size_t) * - * This is an O(1) lookup to return the size of the list. + * This is an O(1) lookup to return the size of the list. * * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. @@ -424,7 +424,7 @@ static inline size_t opal_list_get_size(opal_list_t* list) #if OPAL_ENABLE_DEBUG && 0 /* not sure if we really want this running in devel, as it does * slow things down. Wanted for development of splice / join to - * make sure length was reset properly + * make sure length was reset properly */ size_t check_len = 0; opal_list_item_t *item; @@ -589,8 +589,8 @@ static inline void _opal_list_append(opal_list_t *list, opal_list_item_t *item * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline void opal_list_prepend(opal_list_t *list, - opal_list_item_t *item) +static inline void opal_list_prepend(opal_list_t *list, + opal_list_item_t *item) { opal_list_item_t* sentinel = &(list->opal_list_sentinel); #if OPAL_ENABLE_DEBUG @@ -602,16 +602,16 @@ static inline void opal_list_prepend(opal_list_t *list, /* reset item's next pointer */ item->opal_list_next = sentinel->opal_list_next; - + /* reset item's previous pointer */ item->opal_list_prev = sentinel; - + /* reset previous first element's previous poiner */ sentinel->opal_list_next->opal_list_prev = item; - + /* reset head's next pointer */ sentinel->opal_list_next = item; - + /* increment list element counter */ list->opal_list_length++; @@ -652,7 +652,7 @@ static inline opal_list_item_t *opal_list_remove_first(opal_list_t *list) if ( 0 == list->opal_list_length ) { return (opal_list_item_t *)NULL; } - + #if OPAL_ENABLE_DEBUG /* Spot check: ensure that the first item is only on this list */ @@ -661,16 +661,16 @@ static inline opal_list_item_t *opal_list_remove_first(opal_list_t *list) /* reset list length counter */ list->opal_list_length--; - + /* get pointer to first element on the list */ item = list->opal_list_sentinel.opal_list_next; - + /* reset previous pointer of next item on the list */ item->opal_list_next->opal_list_prev = item->opal_list_prev; - + /* reset the head next pointer */ list->opal_list_sentinel.opal_list_next = item->opal_list_next; - + #if OPAL_ENABLE_DEBUG assert( list == item->opal_list_item_belong_to ); item->opal_list_item_belong_to = NULL; @@ -714,7 +714,7 @@ static inline opal_list_item_t *opal_list_remove_last(opal_list_t *list) if ( 0 == list->opal_list_length ) { return (opal_list_item_t *)NULL; } - + #if OPAL_ENABLE_DEBUG /* Spot check: ensure that the first item is only on this list */ @@ -723,16 +723,16 @@ static inline opal_list_item_t *opal_list_remove_last(opal_list_t *list) /* reset list length counter */ list->opal_list_length--; - + /* get item */ item = list->opal_list_sentinel.opal_list_prev; - + /* reset previous pointer on next to last pointer */ item->opal_list_prev->opal_list_next = item->opal_list_next; - + /* reset tail's previous pointer */ list->opal_list_sentinel.opal_list_prev = item->opal_list_prev; - + #if OPAL_ENABLE_DEBUG assert( list == item->opal_list_item_belong_to ); item->opal_list_next = item->opal_list_prev = (opal_list_item_t *)NULL; @@ -807,7 +807,7 @@ static inline void opal_list_insert_pos(opal_list_t *list, opal_list_item_t *pos * If index is greater than the length of the list, no action is * performed and false is returned. */ - OPAL_DECLSPEC bool opal_list_insert(opal_list_t *list, opal_list_item_t *item, + OPAL_DECLSPEC bool opal_list_insert(opal_list_t *list, opal_list_item_t *item, long long idx); @@ -820,7 +820,7 @@ static inline void opal_list_insert_pos(opal_list_t *list, opal_list_item_t *pos * @param xlist List container for list being spliced from * * Join a list into another list. All of the elements of \c xlist - * are inserted before \c pos and removed from \c xlist. + * are inserted before \c pos and removed from \c xlist. * * This operation is an O(1) operation. Both \c thislist and \c * xlist must be valid list containsers. \c xlist will be empty @@ -828,7 +828,7 @@ static inline void opal_list_insert_pos(opal_list_t *list, opal_list_item_t *pos * containers remain valid, including those that point to elements * in \c xlist. */ - OPAL_DECLSPEC void opal_list_join(opal_list_t *thislist, opal_list_item_t *pos, + OPAL_DECLSPEC void opal_list_join(opal_list_t *thislist, opal_list_item_t *pos, opal_list_t *xlist); @@ -839,7 +839,7 @@ static inline void opal_list_insert_pos(opal_list_t *list, opal_list_item_t *pos * @param pos List item in \c thislist marking the position before * which items are inserted * @param xlist List container for list being spliced from - * @param first List item in \c xlist marking the start of elements + * @param first List item in \c xlist marking the start of elements * to be copied into \c thislist * @param last List item in \c xlist marking the end of elements * to be copied into \c thislist diff --git a/opal/class/opal_object.c b/opal/class/opal_object.c index 24a07131906..e3121850ada 100644 --- a/opal/class/opal_object.c +++ b/opal/class/opal_object.c @@ -5,20 +5,20 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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 - * + * * Implementation of opal_object_t, the base opal foundation class */ @@ -118,7 +118,7 @@ void opal_class_initialize(opal_class_t *cls) * plus for each a NULL-sentinel */ - cls->cls_construct_array = + cls->cls_construct_array = (void (**)(opal_object_t*))malloc((cls_construct_array_count + cls_destruct_array_count + 2) * sizeof(opal_construct_t) ); @@ -169,8 +169,8 @@ int opal_class_finalize(void) if (NULL != classes) { for (i = 0; i < num_classes; ++i) { - if (NULL != classes[i]) { - free(classes[i]); + if (NULL != classes[i]) { + free(classes[i]); } } free(classes); diff --git a/opal/class/opal_pointer_array.c b/opal/class/opal_pointer_array.c index f18b41c077c..3c948d30032 100644 --- a/opal/class/opal_pointer_array.c +++ b/opal/class/opal_pointer_array.c @@ -6,14 +6,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -75,21 +75,21 @@ int opal_pointer_array_init(opal_pointer_array_t* array, int max_size, int block_size) { size_t num_bytes; - + /* check for errors */ if (NULL == array || max_size < block_size) { return OPAL_ERR_BAD_PARAM; } - + array->max_size = max_size; array->block_size = block_size; - + num_bytes = (0 < initial_allocation ? initial_allocation : block_size); array->number_free = num_bytes; array->size = num_bytes; num_bytes *= sizeof(void*); - /* Allocate and set the array to NULL */ + /* Allocate and set the array to NULL */ array->addr = (void **)calloc(num_bytes, 1); if (NULL == array->addr) { /* out of memory */ return OPAL_ERR_OUT_OF_RESOURCE; @@ -114,8 +114,8 @@ int opal_pointer_array_add(opal_pointer_array_t *table, void *ptr) if (table->number_free == 0) { /* need to grow table */ - if (!grow_table(table, - (NULL == table->addr ? TABLE_INIT : table->size * TABLE_GROW), + if (!grow_table(table, + (NULL == table->addr ? TABLE_INIT : table->size * TABLE_GROW), INT_MAX)) { OPAL_THREAD_UNLOCK(&(table->lock)); return OPAL_ERR_OUT_OF_RESOURCE; @@ -192,17 +192,17 @@ int opal_pointer_array_set_item(opal_pointer_array_t *table, int index, /* Reset lowest_free if required */ if ( index == table->lowest_free ) { int i; - + table->lowest_free = table->size; for ( i=index + 1; isize; i++) { if ( NULL == table->addr[i] ){ table->lowest_free = i; break; - } + } } } } - table->addr[index] = value; + table->addr[index] = value; #if 0 opal_output(0,"opal_pointer_array_set_item: OUT: " @@ -227,10 +227,10 @@ int opal_pointer_array_set_item(opal_pointer_array_t *table, int index, * @return true/false True if element could be reserved * False if element could not be reserved (e.g.in use). * - * In contrary to array_set, this function does not allow to overwrite + * In contrary to array_set, this function does not allow to overwrite * a value, unless the previous value is NULL ( equiv. to free ). */ -bool opal_pointer_array_test_and_set_item (opal_pointer_array_t *table, +bool opal_pointer_array_test_and_set_item (opal_pointer_array_t *table, int index, void *value) { assert(table != NULL); @@ -262,7 +262,7 @@ bool opal_pointer_array_test_and_set_item (opal_pointer_array_t *table, } } - /* + /* * allow a specific index to be changed. */ table->addr[index] = value; @@ -276,7 +276,7 @@ bool opal_pointer_array_test_and_set_item (opal_pointer_array_t *table, if ( NULL == table->addr[i] ){ table->lowest_free = i; break; - } + } } } @@ -328,7 +328,7 @@ static bool grow_table(opal_pointer_array_t *table, int soft, int hard) if (p == NULL) { return false; } - + new_size_int = (int) new_size; table->number_free += new_size_int - table->size; table->addr = (void**)p; diff --git a/opal/class/opal_pointer_array.h b/opal/class/opal_pointer_array.h index 03e7bd7af7b..8271fe50ba1 100644 --- a/opal/class/opal_pointer_array.h +++ b/opal/class/opal_pointer_array.h @@ -6,14 +6,14 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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 @@ -107,7 +107,7 @@ OPAL_DECLSPEC int opal_pointer_array_add(opal_pointer_array_t *array, void *ptr) * * @return Error code. (-1) indicates an error. */ -OPAL_DECLSPEC int opal_pointer_array_set_item(opal_pointer_array_t *array, +OPAL_DECLSPEC int opal_pointer_array_set_item(opal_pointer_array_t *array, int index, void *value); /** @@ -119,7 +119,7 @@ OPAL_DECLSPEC int opal_pointer_array_set_item(opal_pointer_array_t *array, * @return Error code. NULL indicates an error. */ -static inline void *opal_pointer_array_get_item(opal_pointer_array_t *table, +static inline void *opal_pointer_array_get_item(opal_pointer_array_t *table, int element_index) { void *p; @@ -172,10 +172,10 @@ OPAL_DECLSPEC int opal_pointer_array_set_size(opal_pointer_array_t *array, int s * @return true/false True if element could be reserved * False if element could not be reserved (e.g., in use). * - * In contrary to array_set, this function does not allow to overwrite + * In contrary to array_set, this function does not allow to overwrite * a value, unless the previous value is NULL ( equiv. to free ). */ -OPAL_DECLSPEC bool opal_pointer_array_test_and_set_item (opal_pointer_array_t *table, +OPAL_DECLSPEC bool opal_pointer_array_test_and_set_item (opal_pointer_array_t *table, int index, void *value); @@ -190,7 +190,7 @@ static inline void opal_pointer_array_remove_all(opal_pointer_array_t *array) int i; if( array->number_free == array->size ) return; /* nothing to do here this time (the array is already empty) */ - + OPAL_THREAD_LOCK(&array->lock); array->lowest_free = 0; array->number_free = array->size; diff --git a/opal/class/opal_rb_tree.c b/opal/class/opal_rb_tree.c index eef78e03d4f..cdbaa187642 100644 --- a/opal/class/opal_rb_tree.c +++ b/opal/class/opal_rb_tree.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /* @@ -459,7 +459,7 @@ int opal_rb_tree_traverse(opal_rb_tree_t *tree, } -static void inorder_traversal(opal_rb_tree_t *tree, +static void inorder_traversal(opal_rb_tree_t *tree, opal_rb_tree_condition_fn_t cond, opal_rb_tree_action_fn_t action, opal_rb_tree_node_t * node) diff --git a/opal/class/opal_rb_tree.h b/opal/class/opal_rb_tree.h index 1c7cf9e8492..c405904b699 100644 --- a/opal/class/opal_rb_tree.h +++ b/opal/class/opal_rb_tree.h @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/class/opal_ring_buffer.c b/opal/class/opal_ring_buffer.c index 77767726bef..e06b00eb889 100644 --- a/opal/class/opal_ring_buffer.c +++ b/opal/class/opal_ring_buffer.c @@ -6,15 +6,15 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -74,8 +74,8 @@ int opal_ring_buffer_init(opal_ring_buffer_t* ring, int size) if (NULL == ring) { return OPAL_ERR_BAD_PARAM; } - - /* Allocate and set the ring to NULL */ + + /* Allocate and set the ring to NULL */ ring->addr = (char **)calloc(size * sizeof(char*), 1); if (NULL == ring->addr) { /* out of memory */ return OPAL_ERR_OUT_OF_RESOURCE; @@ -88,7 +88,7 @@ int opal_ring_buffer_init(opal_ring_buffer_t* ring, int size) void* opal_ring_buffer_push(opal_ring_buffer_t *ring, void *ptr) { char *p=NULL; - + OPAL_ACQUIRE_THREAD(&(ring->lock), &(ring->cond), &(ring->in_use)); if (NULL != ring->addr[ring->head]) { p = (char*)ring->addr[ring->head]; diff --git a/opal/class/opal_ring_buffer.h b/opal/class/opal_ring_buffer.h index a0e23865af5..7a841b3bbcb 100644 --- a/opal/class/opal_ring_buffer.h +++ b/opal/class/opal_ring_buffer.h @@ -6,15 +6,15 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ /** @file diff --git a/opal/class/opal_tree.c b/opal/class/opal_tree.c index 516b23db603..fdd41ea20a1 100644 --- a/opal/class/opal_tree.c +++ b/opal/class/opal_tree.c @@ -8,9 +8,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -95,9 +95,9 @@ static void opal_tree_construct(opal_tree_t *tree) tree->opal_tree_sentinel.opal_tree_parent = &tree->opal_tree_sentinel; tree->opal_tree_sentinel.opal_tree_num_ancestors = -1; - tree->opal_tree_sentinel.opal_tree_next_sibling = + tree->opal_tree_sentinel.opal_tree_next_sibling = &tree->opal_tree_sentinel; - tree->opal_tree_sentinel.opal_tree_prev_sibling = + tree->opal_tree_sentinel.opal_tree_prev_sibling = &tree->opal_tree_sentinel; tree->opal_tree_sentinel.opal_tree_first_child = &tree->opal_tree_sentinel; @@ -122,7 +122,7 @@ static void opal_tree_destruct(opal_tree_t *tree) /* * initialize tree container */ -void opal_tree_init(opal_tree_t *tree, opal_tree_comp_fn_t comp, +void opal_tree_init(opal_tree_t *tree, opal_tree_comp_fn_t comp, opal_tree_item_serialize_fn_t serialize, opal_tree_item_deserialize_fn_t deserialize, opal_tree_get_key_fn_t get_key) @@ -139,7 +139,7 @@ void opal_tree_init(opal_tree_t *tree, opal_tree_comp_fn_t comp, static int count_descendants(opal_tree_item_t* item) { int current_count = 0; - + /* loop over all siblings for descendants to count */ while (item) { current_count += count_descendants(opal_tree_get_first_child(item)); @@ -157,7 +157,7 @@ size_t opal_tree_get_size(opal_tree_t* tree) #if OPAL_ENABLE_DEBUG /* not sure if we really want this running in devel, as it does * slow things down. Wanted for development of splice / join to - * make sure length was reset properly + * make sure length was reset properly */ size_t check_len = 0; opal_tree_item_t *root; @@ -167,7 +167,7 @@ size_t opal_tree_get_size(opal_tree_t* tree) root = opal_tree_get_root(tree); check_len = count_descendants(root); } - + if (check_len != tree->opal_tree_num_items) { fprintf(stderr," Error :: opal_tree_get_size - opal_tree_num_items does not match actual tree length\n"); fflush(stderr); @@ -175,13 +175,13 @@ size_t opal_tree_get_size(opal_tree_t* tree) } #endif - return tree->opal_tree_num_items; + return tree->opal_tree_num_items; } /* * add item to parent's child list */ -void opal_tree_add_child(opal_tree_item_t *parent_item, +void opal_tree_add_child(opal_tree_item_t *parent_item, opal_tree_item_t *new_item) { #if OPAL_ENABLE_DEBUG @@ -200,7 +200,7 @@ void opal_tree_add_child(opal_tree_item_t *parent_item, } else { /* no children existing on parent */ parent_item->opal_tree_first_child = new_item; - } + } parent_item->opal_tree_last_child = new_item; parent_item->opal_tree_num_children++; new_item->opal_tree_container = parent_item->opal_tree_container; @@ -216,7 +216,7 @@ void opal_tree_add_child(opal_tree_item_t *parent_item, #endif } -/* +/* * check to see if item is in tree */ #if OPAL_ENABLE_DEBUG @@ -277,7 +277,7 @@ opal_tree_item_t *opal_tree_remove_subtree(opal_tree_item_t *item) - If I have no children, then my immediate sibling */ if (item->opal_tree_parent->opal_tree_first_child == item) { if (item->opal_tree_num_children > 0) { - parent_item->opal_tree_first_child = + parent_item->opal_tree_first_child = item->opal_tree_next_sibling; } else { parent_item->opal_tree_first_child = @@ -285,7 +285,7 @@ opal_tree_item_t *opal_tree_remove_subtree(opal_tree_item_t *item) } } else if (parent_item->opal_tree_last_child == item) { if (item->opal_tree_num_children > 0) { - parent_item->opal_tree_last_child = + parent_item->opal_tree_last_child = item->opal_tree_last_child; } else { parent_item->opal_tree_last_child = @@ -364,11 +364,11 @@ int opal_tree_remove_item(opal_tree_t *tree, } else { /* There were multiple children. If I was the first or last, then ensure the parent gets a valid first or last child: - - If I have children, then my first/last + - If I have children, then my first/last - If I have no childen, then my immediate sibling */ if (parent_item->opal_tree_first_child == item) { if (item->opal_tree_num_children > 0) { - parent_item->opal_tree_first_child = + parent_item->opal_tree_first_child = item->opal_tree_first_child; } else { parent_item->opal_tree_first_child = @@ -376,7 +376,7 @@ int opal_tree_remove_item(opal_tree_t *tree, } } else if (parent_item->opal_tree_last_child == item) { if (item->opal_tree_num_children > 0) { - parent_item->opal_tree_last_child = + parent_item->opal_tree_last_child = item->opal_tree_last_child; } else { parent_item->opal_tree_last_child = @@ -395,12 +395,12 @@ static char *end_lvl = "]"; static char *end_stream = "E"; /* - * add item to opal buffer that represents all items of a sub-tree from the + * add item to opal buffer that represents all items of a sub-tree from the * item passed in on down. We exit out of converting tree items once we've * done the last child of the tree_item and we are at depth 1. */ -static int add_tree_item2buf(opal_tree_item_t *tree_item, - opal_buffer_t *buf, +static int add_tree_item2buf(opal_tree_item_t *tree_item, + opal_buffer_t *buf, opal_tree_item_serialize_fn_t fn, int depth ) @@ -410,7 +410,7 @@ static int add_tree_item2buf(opal_tree_item_t *tree_item, do { /* add start delim to buffer */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &start_lvl, 1, OPAL_STRING))){ return(rc); } @@ -419,30 +419,30 @@ static int add_tree_item2buf(opal_tree_item_t *tree_item, if ((first_child = opal_tree_get_first_child(tree_item))) { /* add items for our children */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (rc = add_tree_item2buf(first_child, buf, fn, depth+1))){ return(rc); } - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &end_lvl, 1, OPAL_STRING))){ return(rc); } } else { /* end item entry */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (rc = opal_dss.pack(buf, &end_lvl, 1, OPAL_STRING))){ return(rc); } } - /* advance to next sibling, if none we'll drop out of + /* advance to next sibling, if none we'll drop out of * loop and return to our parent */ tree_item = opal_tree_get_next_sibling(tree_item); } while (tree_item && 1 < depth); - + return(OPAL_SUCCESS); -} +} /* * serialize tree data @@ -452,19 +452,19 @@ int opal_tree_serialize(opal_tree_item_t *start_item, opal_buffer_t *buffer) int rc; if (OPAL_SUCCESS != - (rc = add_tree_item2buf(start_item, buffer, + (rc = add_tree_item2buf(start_item, buffer, start_item->opal_tree_container->serialize, 1))){ return(rc); } - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (rc = opal_dss.pack(buffer, &end_stream, 1, OPAL_STRING))){ return(rc); - } + } return(OPAL_SUCCESS); } -static int deserialize_add_tree_item(opal_buffer_t *data, +static int deserialize_add_tree_item(opal_buffer_t *data, opal_tree_item_t *parent_item, opal_tree_item_deserialize_fn_t deserialize, char **curr_delim, @@ -513,15 +513,15 @@ static int deserialize_add_tree_item(opal_buffer_t *data, } return(OPAL_SUCCESS); } - + /* * deserialize tree data */ -int opal_tree_deserialize(opal_buffer_t *serialized_data, +int opal_tree_deserialize(opal_buffer_t *serialized_data, opal_tree_item_t *start_item) { char * null = NULL; - deserialize_add_tree_item(serialized_data, + deserialize_add_tree_item(serialized_data, start_item, start_item->opal_tree_container->deserialize, &null, @@ -655,7 +655,7 @@ static opal_tree_item_t *find_in_descendants(opal_tree_item_t* item, void *key) while (!result && item) { /* check for item match */ - result = (item->opal_tree_container->comp(item, key) == 0) ? + result = (item->opal_tree_container->comp(item, key) == 0) ? item : NULL; if (!result && (first_child = opal_tree_get_first_child(item))) { /* search descendants for match */ @@ -675,7 +675,7 @@ static opal_tree_item_t *find_in_descendants(opal_tree_item_t* item, void *key) opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, void *key) { opal_tree_item_t *curr_item = item, *result = NULL; - + if (!opal_tree_is_empty(item->opal_tree_container)) { /* check my descendant for a match */ result = find_in_descendants(opal_tree_get_first_child(item), key); @@ -686,12 +686,12 @@ opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, void *key) result = find_in_descendants(curr_item, key); } } - + /* check my ancestors (uncles) for match */ curr_item = item; while (!result && curr_item && curr_item->opal_tree_num_ancestors > 0){ curr_item = opal_tree_get_next_sibling(item->opal_tree_parent); - while (NULL == curr_item && + while (NULL == curr_item && item->opal_tree_parent->opal_tree_num_ancestors > 0) { item = item->opal_tree_parent; curr_item = opal_tree_get_next_sibling(item->opal_tree_parent); @@ -701,7 +701,7 @@ opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, void *key) result = find_in_descendants(curr_item, key); } } - } + } return(result); } diff --git a/opal/class/opal_tree.h b/opal/class/opal_tree.h index 870b729609c..e1a42a33559 100644 --- a/opal/class/opal_tree.h +++ b/opal/class/opal_tree.h @@ -3,13 +3,13 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** - * @file + * @file * * The opal_tree_t interface is used to provide a generic * tree list container for Open MPI. It was inspired by the opal_list_t @@ -19,14 +19,14 @@ * The general idea is a user creates an class instance that has two * components. A tree structure component as defined by opal_tree_item_t * that links all the items together to form the tree. Then there is - * a user specific data component which the user defines what is stored at + * a user specific data component which the user defines what is stored at * each item. When a user create a type to be used for a OBJ_CLASS_INSTANCE * it will contain the opal_tree_item_t followed by any user specific * data. Then the opal_tree_item_t objects can be put in an * opal_tree_t. Hence, you create a new type that derives from * opal_tree_item_t; this new type can then be used with opal_tree_t * containers. - * + * * NOTE: opal_tree_item_t instances can only be on \em one tree at a * time. Specifically, if you add an opal_tree_item_t to one tree, * and then add it to another tree (without first removing it from the @@ -87,7 +87,7 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_tree_item_t); /** * \internal - * + * * Struct of an opal_tree_item_t */ typedef struct opal_tree_item_t @@ -143,8 +143,8 @@ typedef struct opal_tree_item_t typedef int (*opal_tree_comp_fn_t)(opal_tree_item_t *item, void *key); /** - * The serialize function typedef. This function is called by the - * opal tree serialize code to serialize a tree item's user specific + * The serialize function typedef. This function is called by the + * opal tree serialize code to serialize a tree item's user specific * data of a class type. * * @params item - item to serialize the user specific data from @@ -152,12 +152,12 @@ typedef int (*opal_tree_comp_fn_t)(opal_tree_item_t *item, void *key); * * @returns OPAL_SUCCESS - when successfully serialized item */ -typedef int (*opal_tree_item_serialize_fn_t)(opal_tree_item_t *item, +typedef int (*opal_tree_item_serialize_fn_t)(opal_tree_item_t *item, opal_buffer_t *buffer); /** * The deserialize function typedef. This function is called by the - * opal tree deserialize code to deserialize a tree item's user + * opal tree deserialize code to deserialize a tree item's user * specific data. * * @params buffer - the opal_buffer_t to deserialized data. @@ -223,7 +223,7 @@ static inline opal_tree_item_t *opal_tree_get_parent(opal_tree_item_t *item) * * This function is safe to be called with a null item pointer. */ -static inline opal_tree_item_t *opal_tree_get_next_sibling(opal_tree_item_t +static inline opal_tree_item_t *opal_tree_get_next_sibling(opal_tree_item_t *item) { return ((item) ? item->opal_tree_next_sibling : NULL); @@ -255,7 +255,7 @@ static inline opal_tree_item_t *opal_tree_get_prev_sibling(opal_tree_item_t * This function is safe to be called with a null item pointer. * */ -static inline opal_tree_item_t *opal_tree_get_first_child(opal_tree_item_t +static inline opal_tree_item_t *opal_tree_get_first_child(opal_tree_item_t *item) { return ((item) ? item->opal_tree_first_child : NULL); @@ -271,7 +271,7 @@ static inline opal_tree_item_t *opal_tree_get_first_child(opal_tree_item_t * This function is safe to be called with a null item pointer. * */ -static inline opal_tree_item_t *opal_tree_get_last_child(opal_tree_item_t +static inline opal_tree_item_t *opal_tree_get_last_child(opal_tree_item_t *item) { return ((item) ? item->opal_tree_last_child : NULL); @@ -308,7 +308,7 @@ static inline bool opal_tree_is_empty(opal_tree_t* tree) * * @returns A pointer to the first item in the tree * - * This is an O(1) operation to return the first item in the tree. + * This is an O(1) operation to return the first item in the tree. * * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. @@ -336,15 +336,15 @@ static inline opal_tree_item_t* opal_tree_get_root(opal_tree_t* tree) * * @returns The size of the tree (size_t) * - * This is an O(1) (in non-debug mode) lookup to return the - * size of the list. + * This is an O(1) (in non-debug mode) lookup to return the + * size of the list. */ OPAL_DECLSPEC size_t opal_tree_get_size(opal_tree_t* tree); /* Functions to manage the tree */ /** - * Initialize tree container; must be called before using + * Initialize tree container; must be called before using * the tree. * * @param tree The tree to initialize @@ -353,12 +353,12 @@ OPAL_DECLSPEC size_t opal_tree_get_size(opal_tree_t* tree); * @param deserialize De-serialization function to attach to tree. * */ -OPAL_DECLSPEC void opal_tree_init(opal_tree_t *tree, - opal_tree_comp_fn_t comp, +OPAL_DECLSPEC void opal_tree_init(opal_tree_t *tree, + opal_tree_comp_fn_t comp, opal_tree_item_serialize_fn_t serialize, opal_tree_item_deserialize_fn_t deserialize, opal_tree_get_key_fn_t get_key); - + /** * Add new item as child to its parent item * @@ -367,7 +367,7 @@ OPAL_DECLSPEC void opal_tree_init(opal_tree_t *tree, * * The new_item is added at the end of the child list of the parent_item. */ -OPAL_DECLSPEC void opal_tree_add_child(opal_tree_item_t *parent_item, +OPAL_DECLSPEC void opal_tree_add_child(opal_tree_item_t *parent_item, opal_tree_item_t *new_item); /** @@ -382,9 +382,9 @@ OPAL_DECLSPEC void opal_tree_add_child(opal_tree_item_t *parent_item, * item and all children below it will be removed from the tree. This * means the item's siblings pointers and potentially the parents first * and last pointers will be updated to skip over the item. The tree container - * will also have its num_items adjusted to reflect the number of items - * that were removed. The tree item (and all children below it) that is - * returned is now "owned" by the caller -- they are responsible for + * will also have its num_items adjusted to reflect the number of items + * that were removed. The tree item (and all children below it) that is + * returned is now "owned" by the caller -- they are responsible for * OBJ_RELEASE()'ing it. * * With ENABLE_DEBUG on this routine will validate whether the item is actually @@ -407,28 +407,28 @@ OPAL_DECLSPEC int opal_tree_remove_item(opal_tree_t *tree, * Serialize tree data * * @param start_item The item of a tree to start serializing data - * @param buffer The opal buffer that contains the serialized + * @param buffer The opal buffer that contains the serialized * data stream of the tree * * @returns OPAL_SUCCESS if data has been successfully converted. * * This routine walks the tree starting at start_item until it has serialized * all children items of start_item and creates a bytestream of data, - * using the opal_dss.pack routine, that can be sent over a network. - * The format of the bytestream represents the tree parent/child relationship + * using the opal_dss.pack routine, that can be sent over a network. + * The format of the bytestream represents the tree parent/child relationship * of each item in the tree plus the data inside the tree. This routine calls - * the tree's serialization method to serialize the user specific data for + * the tree's serialization method to serialize the user specific data for * each item. * */ -OPAL_DECLSPEC int opal_tree_serialize(opal_tree_item_t *start_item, +OPAL_DECLSPEC int opal_tree_serialize(opal_tree_item_t *start_item, opal_buffer_t *buffer); /** * De-serialize tree data * * @param buffer The opal buffer that is to be deserialized - * @param start_item The item in the tree the data should be + * @param start_item The item in the tree the data should be * deserialized into * * @returns Status of call OPAL_SUCCESS if everything worked @@ -437,7 +437,7 @@ OPAL_DECLSPEC int opal_tree_serialize(opal_tree_item_t *start_item, * opal_tree_serialize() function and deserializes it into the * tree given. If the tree already has data in it, this routine * will start adding the new data as a new child of the root - * item. This routine calls the tree's de-serialization + * item. This routine calls the tree's de-serialization * method to deserialize the user specific data for each item. * */ @@ -512,8 +512,8 @@ OPAL_DECLSPEC int opal_tree_compare(opal_tree_t *left, opal_tree_t *right); * @param key the key we are wanting to match with * * @returns A pointer to the next item that in the tree (starting from item) - * that matches the key based on a depth first search of the tree. A null - * pointer is returned if we've reached the end of the tree and have not + * that matches the key based on a depth first search of the tree. A null + * pointer is returned if we've reached the end of the tree and have not * matched the key. * * This routine uses the tree container's comp function to determine the @@ -523,7 +523,7 @@ OPAL_DECLSPEC int opal_tree_compare(opal_tree_t *left, opal_tree_t *right); * and NULL pointer is always returned for this function. * */ -OPAL_DECLSPEC opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, +OPAL_DECLSPEC opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, void *key); END_C_DECLS diff --git a/opal/class/opal_value_array.c b/opal/class/opal_value_array.c index 7e95b96964a..a9615dc1cba 100644 --- a/opal/class/opal_value_array.c +++ b/opal/class/opal_value_array.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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$ */ diff --git a/opal/class/opal_value_array.h b/opal/class/opal_value_array.h index 2059cd44617..de59eb358af 100644 --- a/opal/class/opal_value_array.h +++ b/opal/class/opal_value_array.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -51,7 +51,7 @@ typedef struct opal_value_array_t opal_value_array_t; OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_value_array_t); /** - * Initialize the array to hold items by value. This routine must + * Initialize the array to hold items by value. This routine must * be called prior to using the array. * * @param array The array to initialize (IN). @@ -66,7 +66,7 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_value_array_t); static inline int opal_value_array_init(opal_value_array_t *array, size_t item_sizeof) { array->array_item_sizeof = item_sizeof; - array->array_alloc_size = 1; + array->array_alloc_size = 1; array->array_size = 0; array->array_items = (unsigned char*)realloc(array->array_items, item_sizeof * array->array_alloc_size); return (NULL != array->array_items) ? OPAL_SUCCESS : OPAL_ERR_OUT_OF_RESOURCE; @@ -121,15 +121,15 @@ static inline size_t opal_value_array_get_size(opal_value_array_t* array) * Note that resizing the array to a smaller size may not change * the underlying memory allocated by the array. However, setting * the size larger than the current allocation will grow it. In either - * case, if the routine is successful, opal_value_array_get_size() will + * case, if the routine is successful, opal_value_array_get_size() will * return the new size. */ OPAL_DECLSPEC int opal_value_array_set_size(opal_value_array_t* array, size_t size); -/** - * Macro to retrieve an item from the array by value. +/** + * Macro to retrieve an item from the array by value. * * @param array The input array (IN). * @param item_type The C datatype of the array item (IN). @@ -137,8 +137,8 @@ OPAL_DECLSPEC int opal_value_array_set_size(opal_value_array_t* array, size_t si * * @returns item The requested item. * - * Note that this does not change the size of the array - this macro is - * strictly for performance - the user assumes the responsibility of + * Note that this does not change the size of the array - this macro is + * strictly for performance - the user assumes the responsibility of * ensuring the array index is valid (0 <= item index < array size). */ @@ -164,7 +164,7 @@ static inline void* opal_value_array_get_item(opal_value_array_t *array, size_t return array->array_items + (item_index * array->array_item_sizeof); } -/** +/** * Macro to set an array element by value. * * @param array The input array (IN). @@ -172,8 +172,8 @@ static inline void* opal_value_array_get_item(opal_value_array_t *array, size_t * @param item_index The array index (IN). * @param item_value The new value for the specified index (IN). * - * Note that this does not change the size of the array - this macro is - * strictly for performance - the user assumes the responsibility of + * Note that this does not change the size of the array - this macro is + * strictly for performance - the user assumes the responsibility of * ensuring the array index is valid (0 <= item index < array size). * * It is safe to free the item after returning from this call; it is @@ -183,12 +183,12 @@ static inline void* opal_value_array_get_item(opal_value_array_t *array, size_t #define OPAL_VALUE_ARRAY_SET_ITEM(array, item_type, item_index, item_value) \ (((item_type*)((array)->array_items))[item_index] = item_value) -/** +/** * Set an array element by value. * * @param array The input array (IN). * @param item_index The array index (IN). - * @param item_value A pointer to the item, which is copied into + * @param item_value A pointer to the item, which is copied into * the array. * * @return OPAL error code. @@ -200,7 +200,7 @@ static inline void* opal_value_array_get_item(opal_value_array_t *array, size_t static inline int opal_value_array_set_item(opal_value_array_t *array, size_t item_index, const void* item) { int rc; - if(item_index >= array->array_size && + if(item_index >= array->array_size && (rc = opal_value_array_set_size(array, item_index+1)) != OPAL_SUCCESS) return rc; memcpy(array->array_items + (item_index * array->array_item_sizeof), item, array->array_item_sizeof); @@ -209,13 +209,13 @@ static inline int opal_value_array_set_item(opal_value_array_t *array, size_t it /** - * Appends an item to the end of the array. + * Appends an item to the end of the array. * * @param array The input array (IN). - * @param item A pointer to the item to append, which is copied + * @param item A pointer to the item to append, which is copied * into the array. * - * @return OPAL error code + * @return OPAL error code * * This will grow the array if it is not large enough to contain the * item. It is safe to free the item after returning from this call; @@ -229,7 +229,7 @@ static inline int opal_value_array_append_item(opal_value_array_t *array, const /** - * Remove a specific item from the array. + * Remove a specific item from the array. * * @param array The input array (IN). * @param item_index The index to remove, which must be less than @@ -247,8 +247,8 @@ static inline int opal_value_array_remove_item(opal_value_array_t *array, size_t opal_output(0, "opal_value_array_remove_item: invalid index %lu\n", (unsigned long)item_index); return OPAL_ERR_BAD_PARAM; } -#endif - memmove(array->array_items+(array->array_item_sizeof * item_index), +#endif + memmove(array->array_items+(array->array_item_sizeof * item_index), array->array_items+(array->array_item_sizeof * (item_index+1)), array->array_item_sizeof * (array->array_size - item_index - 1)); array->array_size--; @@ -257,7 +257,7 @@ static inline int opal_value_array_remove_item(opal_value_array_t *array, size_t /** * Get the base pointer of the underlying array. - * + * * @param array The input array (IN). * @param array_type The C datatype of the array (IN). * diff --git a/opal/datatype/Makefile.am b/opal/datatype/Makefile.am index 55b2d3c025d..6002a739f20 100644 --- a/opal/datatype/Makefile.am +++ b/opal/datatype/Makefile.am @@ -6,7 +6,7 @@ # Copyright (c) 2004-2010 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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. @@ -16,9 +16,9 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/datatype/opal_convertor.c b/opal/datatype/opal_convertor.c index 29d8f955db3..1c10efd1aa8 100644 --- a/opal/datatype/opal_convertor.c +++ b/opal/datatype/opal_convertor.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. - * Copyright (c) 2013 Research Organization for Information Science + * Copyright (c) 2013 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -211,7 +211,7 @@ opal_convertor_t* opal_convertor_create( int32_t remote_arch, int32_t mode ) assert( (CONVERTOR)->bConverted < (CONVERTOR)->local_size ); \ } while(0) -/** +/** * Return 0 if everything went OK and if there is still room before the complete * conversion of the data (need additional call with others input buffers ) * 1 if everything went fine and the data was completly converted diff --git a/opal/datatype/opal_convertor.h b/opal/datatype/opal_convertor.h index 0629b69aa2f..5b26b7e7d63 100644 --- a/opal/datatype/opal_convertor.h +++ b/opal/datatype/opal_convertor.h @@ -235,7 +235,7 @@ OPAL_DECLSPEC int32_t opal_convertor_prepare_for_send( opal_convertor_t* convert int32_t count, const void* pUserBuf); -static inline int32_t opal_convertor_copy_and_prepare_for_send( const opal_convertor_t* pSrcConv, +static inline int32_t opal_convertor_copy_and_prepare_for_send( const opal_convertor_t* pSrcConv, const struct opal_datatype_t* datatype, int32_t count, const void* pUserBuf, @@ -256,7 +256,7 @@ OPAL_DECLSPEC int32_t opal_convertor_prepare_for_recv( opal_convertor_t* convert const struct opal_datatype_t* datatype, int32_t count, const void* pUserBuf ); -static inline int32_t opal_convertor_copy_and_prepare_for_recv( const opal_convertor_t* pSrcConv, +static inline int32_t opal_convertor_copy_and_prepare_for_recv( const opal_convertor_t* pSrcConv, const struct opal_datatype_t* datatype, int32_t count, const void* pUserBuf, diff --git a/opal/datatype/opal_convertor_raw.c b/opal/datatype/opal_convertor_raw.c index 9b75fc81492..b57d5aa1ded 100644 --- a/opal/datatype/opal_convertor_raw.c +++ b/opal/datatype/opal_convertor_raw.c @@ -34,7 +34,7 @@ * length we're working on are local. */ int32_t -opal_convertor_raw( opal_convertor_t* pConvertor, +opal_convertor_raw( opal_convertor_t* pConvertor, struct iovec* iov, uint32_t* iov_count, size_t* length ) { diff --git a/opal/datatype/opal_datatype_copy.c b/opal/datatype/opal_datatype_copy.c index f41233a794e..700bad3ac20 100644 --- a/opal/datatype/opal_datatype_copy.c +++ b/opal/datatype/opal_datatype_copy.c @@ -94,7 +94,7 @@ static size_t opal_datatype_memop_block_size = 128 * 1024; } \ } while(0) #else -#define SET_CUDA_COPY_FCT(cuda_device_bufs, fct, copy_function) +#define SET_CUDA_COPY_FCT(cuda_device_bufs, fct, copy_function) #endif int32_t opal_datatype_copy_content_same_ddt( const opal_datatype_t* datatype, int32_t count, diff --git a/opal/datatype/opal_datatype_cuda.c b/opal/datatype/opal_datatype_cuda.c index d62af3fa8b9..71b60e60801 100644 --- a/opal/datatype/opal_datatype_cuda.c +++ b/opal/datatype/opal_datatype_cuda.c @@ -42,7 +42,7 @@ void opal_cuda_add_initialization_function(int (*fptr)(opal_common_cuda_function * for all future calls. */ void mca_cuda_convertor_init(opal_convertor_t* convertor, const void *pUserBuf) -{ +{ /* Only do the initialization on the first GPU access */ if (!initialized) { opal_cuda_support_init(); @@ -98,7 +98,7 @@ void *opal_cuda_memcpy(void *dest, const void *src, size_t size, opal_convertor_ if (!(convertor->flags & CONVERTOR_CUDA)) { return memcpy(dest, src, size); } - + if (convertor->flags & CONVERTOR_CUDA_ASYNC) { res = ftable.gpu_cu_memcpy_async(dest, (void *)src, size, convertor); } else { @@ -151,7 +151,7 @@ void *opal_cuda_memmove(void *dest, void *src, size_t size) /** * This function gets called once to check if the program is running in a cuda - * environment. + * environment. */ static void opal_cuda_support_init(void) { diff --git a/opal/datatype/opal_datatype_fake_stack.c b/opal/datatype/opal_datatype_fake_stack.c index 1cb436381bb..4f72b343672 100644 --- a/opal/datatype/opal_datatype_fake_stack.c +++ b/opal/datatype/opal_datatype_fake_stack.c @@ -176,7 +176,7 @@ int opal_convertor_create_stack_with_pos_general( opal_convertor_t* pConvertor, int32_t cnt = (int32_t)(resting_place / basic_type->size); loop_length += (cnt * basic_type->size); resting_place -= (cnt * basic_type->size); - PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, pElems->elem.common.type, + PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, pElems->elem.common.type, pElems->elem.count - cnt, pElems->elem.disp + cnt * pElems->elem.extent ); pConvertor->bConverted = starting_point - resting_place; diff --git a/opal/datatype/opal_datatype_internal.h b/opal/datatype/opal_datatype_internal.h index 761d06c119c..cc1352776ac 100644 --- a/opal/datatype/opal_datatype_internal.h +++ b/opal/datatype/opal_datatype_internal.h @@ -66,7 +66,7 @@ static inline void DUMP( char* fmt, ... ) # define __opal_attribute_unused_tmp__ __opal_attribute_unused__ # else # define __opal_attribute_unused_tmp__ -# endif +# endif static inline void DUMP( char* fmt __opal_attribute_unused_tmp__, ... ) { #if defined(__PGI) diff --git a/opal/datatype/opal_datatype_position.c b/opal/datatype/opal_datatype_position.c index f187c6749df..0e1907c32b3 100644 --- a/opal/datatype/opal_datatype_position.c +++ b/opal/datatype/opal_datatype_position.c @@ -12,8 +12,8 @@ * All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/datatype/opal_datatype_unpack.c b/opal/datatype/opal_datatype_unpack.c index d43805ef215..e5c05e14e2d 100644 --- a/opal/datatype/opal_datatype_unpack.c +++ b/opal/datatype/opal_datatype_unpack.c @@ -379,7 +379,7 @@ opal_generic_simple_unpack_function( opal_convertor_t* pConvertor, if( OPAL_DATATYPE_LOOP == pElem->elem.common.type ) { OPAL_PTRDIFF_TYPE local_disp = (OPAL_PTRDIFF_TYPE)conv_ptr; if( pElem->loop.common.flags & OPAL_DATATYPE_FLAG_CONTIGUOUS ) { - UNPACK_CONTIGUOUS_LOOP( pConvertor, pElem, count_desc, + UNPACK_CONTIGUOUS_LOOP( pConvertor, pElem, count_desc, iov_ptr, conv_ptr, iov_len_local ); if( 0 == count_desc ) { /* completed */ pos_desc += pElem->loop.items + 1; diff --git a/opal/dss/Makefile.am b/opal/dss/Makefile.am index 0f34606d9c0..329e14ff706 100644 --- a/opal/dss/Makefile.am +++ b/opal/dss/Makefile.am @@ -10,7 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. +# Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # diff --git a/opal/dss/dss_compare.c b/opal/dss/dss_compare.c index 15d858d3988..0329d2b03ba 100644 --- a/opal/dss/dss_compare.c +++ b/opal/dss/dss_compare.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. diff --git a/opal/dss/dss_copy.c b/opal/dss/dss_copy.c index bb0d3b9efe3..f0d1544ba59 100644 --- a/opal/dss/dss_copy.c +++ b/opal/dss/dss_copy.c @@ -201,14 +201,14 @@ int opal_dss_copy_pstat(opal_pstats_t **dest, opal_pstats_t *src, opal_data_type_t type) { opal_pstats_t *p; - + /* create the new object */ *dest = OBJ_NEW(opal_pstats_t); if (NULL == *dest) { return OPAL_ERR_OUT_OF_RESOURCE; } p = *dest; - + /* copy the individual fields */ memcpy(p->node, src->node, sizeof(src->node)); p->rank = src->rank; @@ -223,7 +223,7 @@ int opal_dss_copy_pstat(opal_pstats_t **dest, opal_pstats_t *src, p->peak_vsize = src->peak_vsize; p->processor = src->processor; p->sample_time.tv_sec = src->sample_time.tv_sec; - p->sample_time.tv_usec = src->sample_time.tv_usec; + p->sample_time.tv_usec = src->sample_time.tv_usec; return OPAL_SUCCESS; } @@ -232,14 +232,14 @@ int opal_dss_copy_node_stat(opal_node_stats_t **dest, opal_node_stats_t *src, opal_data_type_t type) { opal_node_stats_t *p; - + /* create the new object */ *dest = OBJ_NEW(opal_node_stats_t); if (NULL == *dest) { return OPAL_ERR_OUT_OF_RESOURCE; } p = *dest; - + /* copy the individual fields */ p->la = src->la; p->la5 = src->la5; @@ -247,7 +247,7 @@ int opal_dss_copy_node_stat(opal_node_stats_t **dest, opal_node_stats_t *src, p->total_mem = src->total_mem; p->free_mem = src->free_mem; p->sample_time.tv_sec = src->sample_time.tv_sec; - p->sample_time.tv_usec = src->sample_time.tv_usec; + p->sample_time.tv_usec = src->sample_time.tv_usec; return OPAL_SUCCESS; } @@ -256,14 +256,14 @@ int opal_dss_copy_value(opal_value_t **dest, opal_value_t *src, opal_data_type_t type) { opal_value_t *p; - + /* create the new object */ *dest = OBJ_NEW(opal_value_t); if (NULL == *dest) { return OPAL_ERR_OUT_OF_RESOURCE; } p = *dest; - + /* copy the type and key */ if (NULL != src->key) { p->key = strdup(src->key); diff --git a/opal/dss/dss_internal.h b/opal/dss/dss_internal.h index fd80947885a..e9152f7199b 100644 --- a/opal/dss/dss_internal.h +++ b/opal/dss/dss_internal.h @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -48,7 +48,7 @@ BEGIN_C_DECLS */ #define OPAL_DSS_DEFAULT_INITIAL_SIZE 128 /* - * The default threshold size when we switch from doubling the + * The default threshold size when we switch from doubling the * buffer size to addatively increasing it */ #define OPAL_DSS_DEFAULT_THRESHOLD_SIZE 1024 @@ -153,7 +153,7 @@ BEGIN_C_DECLS ret = OPAL_ERR_NOT_FOUND; \ } \ } while (0) - + /* NOTE: do not need to deal with endianness here, as the unpacking of the underling sender-side type will do that for us. Repeat: the data in tmpbuf[] is already in host byte order. */ @@ -167,8 +167,8 @@ BEGIN_C_DECLS } \ free(tmpbuf); \ } while (0) - - + + /** * Internal struct used for holding registered dss functions */ @@ -256,10 +256,10 @@ void opal_dss_dump_data_types(int output); /* * Specialized functions */ -OPAL_DECLSPEC int opal_dss_pack_buffer(opal_buffer_t *buffer, const void *src, +OPAL_DECLSPEC int opal_dss_pack_buffer(opal_buffer_t *buffer, const void *src, int32_t num_vals, opal_data_type_t type); -OPAL_DECLSPEC int opal_dss_unpack_buffer(opal_buffer_t *buffer, void *dst, +OPAL_DECLSPEC int opal_dss_unpack_buffer(opal_buffer_t *buffer, void *dst, int32_t *num_vals, opal_data_type_t type); /* diff --git a/opal/dss/dss_internal_functions.c b/opal/dss/dss_internal_functions.c index d8e31a28505..09fef892597 100644 --- a/opal/dss/dss_internal_functions.c +++ b/opal/dss/dss_internal_functions.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -44,7 +44,7 @@ char* opal_dss_buffer_extend(opal_buffer_t *buffer, size_t bytes_to_add) required = buffer->bytes_used + bytes_to_add; if(required >= (size_t)opal_dss_threshold_size) { - to_alloc = ((required + opal_dss_threshold_size - 1) + to_alloc = ((required + opal_dss_threshold_size - 1) / opal_dss_threshold_size) * opal_dss_threshold_size; } else { to_alloc = buffer->bytes_allocated; @@ -53,7 +53,7 @@ char* opal_dss_buffer_extend(opal_buffer_t *buffer, size_t bytes_to_add) } while(to_alloc < required) { to_alloc <<= 1; - } + } } if (NULL != buffer->base_ptr) { @@ -67,14 +67,14 @@ char* opal_dss_buffer_extend(opal_buffer_t *buffer, size_t bytes_to_add) buffer->bytes_used = 0; buffer->base_ptr = (char*)malloc(to_alloc); } - - if (NULL == buffer->base_ptr) { - return NULL; + + if (NULL == buffer->base_ptr) { + return NULL; } buffer->pack_ptr = ((char*) buffer->base_ptr) + pack_offset; buffer->unpack_ptr = ((char*) buffer->base_ptr) + unpack_offset; buffer->bytes_allocated = to_alloc; - + /* All done */ return buffer->pack_ptr; @@ -87,13 +87,13 @@ char* opal_dss_buffer_extend(opal_buffer_t *buffer, size_t bytes_to_add) bool opal_dss_too_small(opal_buffer_t *buffer, size_t bytes_reqd) { size_t bytes_remaining_packed; - + if (buffer->pack_ptr < buffer->unpack_ptr) { return true; } bytes_remaining_packed = buffer->pack_ptr - buffer->unpack_ptr; - + if (bytes_remaining_packed < bytes_reqd) { /* don't error log this - it could be that someone is trying to * simply read until the buffer is empty @@ -109,11 +109,11 @@ int opal_dss_store_data_type(opal_buffer_t *buffer, opal_data_type_t type) opal_dss_type_info_t *info; /* Lookup the pack function for the actual opal_data_type type and call it */ - + if (NULL == (info = (opal_dss_type_info_t*)opal_pointer_array_get_item(&opal_dss_types, OPAL_DATA_TYPE_T))) { return OPAL_ERR_PACK_FAILURE; } - + return info->odti_pack_fn(buffer, &type, 1, OPAL_DATA_TYPE_T); } @@ -121,12 +121,12 @@ int opal_dss_get_data_type(opal_buffer_t *buffer, opal_data_type_t *type) { opal_dss_type_info_t *info; int32_t n=1; - + /* Lookup the unpack function for the actual opal_data_type type and call it */ - + if (NULL == (info = (opal_dss_type_info_t*)opal_pointer_array_get_item(&opal_dss_types, OPAL_DATA_TYPE_T))) { return OPAL_ERR_PACK_FAILURE; } - + return info->odti_unpack_fn(buffer, type, &n, OPAL_DATA_TYPE_T); } diff --git a/opal/dss/dss_load_unload.c b/opal/dss/dss_load_unload.c index 038aaae84d9..bc761816d66 100644 --- a/opal/dss/dss_load_unload.c +++ b/opal/dss/dss_load_unload.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,12 +13,12 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ - + /* * DSS Buffer Operations */ @@ -41,7 +41,7 @@ int opal_dss_unload(opal_buffer_t *buffer, void **payload, if (NULL == payload) { return OPAL_ERR_BAD_PARAM; } - + /* anything in the buffer - if not, nothing to do */ if (NULL == buffer->base_ptr || 0 == buffer->bytes_used) { *payload = NULL; @@ -52,7 +52,7 @@ int opal_dss_unload(opal_buffer_t *buffer, void **payload, /* okay, we have something to provide - pass it back */ *payload = buffer->base_ptr; *bytes_used = buffer->bytes_used; - + /* dereference everything in buffer */ buffer->base_ptr = NULL; buffer->pack_ptr = buffer->unpack_ptr = NULL; @@ -71,7 +71,7 @@ int opal_dss_load(opal_buffer_t *buffer, void *payload, if (NULL == buffer) { return OPAL_ERR_BAD_PARAM; } - + /* check if buffer already has payload - free it if so */ if (NULL != buffer->base_ptr) { free(buffer->base_ptr); @@ -88,10 +88,10 @@ int opal_dss_load(opal_buffer_t *buffer, void *payload, } /* populate the buffer */ - buffer->base_ptr = (char*)payload; + buffer->base_ptr = (char*)payload; /* set pack/unpack pointers */ - buffer->pack_ptr = ((char*)buffer->base_ptr) + bytes_used; + buffer->pack_ptr = ((char*)buffer->base_ptr) + bytes_used; buffer->unpack_ptr = buffer->base_ptr; /* set counts for size and space */ @@ -99,7 +99,7 @@ int opal_dss_load(opal_buffer_t *buffer, void *payload, /* All done */ - return OPAL_SUCCESS; + return OPAL_SUCCESS; } @@ -116,7 +116,7 @@ int opal_dss_copy_payload(opal_buffer_t *dest, opal_buffer_t *src) if (NULL == dest || NULL == src) { return OPAL_ERR_BAD_PARAM; } - + /* if the dest is already populated, check to ensure that both * source and dest are of the same buffer type */ @@ -125,12 +125,12 @@ int opal_dss_copy_payload(opal_buffer_t *dest, opal_buffer_t *src) return OPAL_ERR_BUFFER; } } - + /* either the dest was empty or the two types already match - * either way, just ensure the two types DO match */ dest->type = src->type; - + /* compute how much of the src buffer remains unpacked * buffer->bytes_used is the total number of bytes in the buffer that * have been packed. However, we may have already unpacked some of @@ -139,24 +139,24 @@ int opal_dss_copy_payload(opal_buffer_t *dest, opal_buffer_t *src) * beyond the unpack_ptr */ bytes_left = src->bytes_used - (src->unpack_ptr - src->base_ptr); - + /* if nothing is left, then nothing to do */ if (0 == bytes_left) { return OPAL_SUCCESS; } - + /* add room to the dest for the src buffer's payload */ if (NULL == (dst_ptr = opal_dss_buffer_extend(dest, bytes_left))) { return OPAL_ERR_OUT_OF_RESOURCE; } - + /* copy the src payload to the specified location in dest */ memcpy(dst_ptr, src->unpack_ptr, bytes_left); - + /* adjust the dest buffer's bookkeeping */ dest->bytes_used += bytes_left; dest->pack_ptr = ((char*)dest->pack_ptr) + bytes_left; - + return OPAL_SUCCESS; } diff --git a/opal/dss/dss_open_close.c b/opal/dss/dss_open_close.c index ebec81a7199..329402adb0c 100644 --- a/opal/dss/dss_open_close.c +++ b/opal/dss/dss_open_close.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -279,7 +279,7 @@ int opal_dss_register_vars (void) return ret; } - /* the threshold as to where to stop doubling the size of the buffer + /* the threshold as to where to stop doubling the size of the buffer * allocated memory and start doing additive increases */ opal_dss_threshold_size = OPAL_DSS_DEFAULT_THRESHOLD_SIZE; ret = mca_base_var_register ("opal", "dss", NULL, "buffer_threshold_size", NULL, @@ -577,7 +577,7 @@ int opal_dss_open(void) "OPAL_TIME", &tmp))) { return rc; } - + tmp = OPAL_NAME; if (OPAL_SUCCESS != (rc = opal_dss.register_type(opal_dss_pack_name, opal_dss_unpack_name, diff --git a/opal/dss/dss_pack.c b/opal/dss/dss_pack.c index 0d54a12d3e6..a68ad12930c 100644 --- a/opal/dss/dss_pack.c +++ b/opal/dss/dss_pack.c @@ -423,11 +423,11 @@ int opal_dss_pack_data_type(opal_buffer_t *buffer, const void *src, int32_t num_ opal_data_type_t type) { int ret; - + /* Turn around and pack the real type */ if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, src, num_vals, OPAL_DATA_TYPE_T))) { } - + return ret; } @@ -469,9 +469,9 @@ int opal_dss_pack_pstat(opal_buffer_t *buffer, const void *src, int32_t i; int ret; char *cptr; - + ptr = (opal_pstats_t **) src; - + for (i = 0; i < num_vals; ++i) { cptr = ptr[i]->node; if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, &cptr, 1, OPAL_STRING))) { @@ -622,7 +622,7 @@ int opal_dss_pack_node_stat(opal_buffer_t *buffer, const void *src, opal_netstats_t *ns; ptr = (opal_node_stats_t **) src; - + for (i = 0; i < num_vals; ++i) { if (OPAL_SUCCESS != (ret = opal_dss_pack_float(buffer, &ptr[i]->la, 1, OPAL_FLOAT))) { return ret; @@ -702,7 +702,7 @@ int opal_dss_pack_value(opal_buffer_t *buffer, const void *src, int ret; ptr = (opal_value_t **) src; - + for (i = 0; i < num_vals; ++i) { /* pack the key and type */ if (OPAL_SUCCESS != (ret = opal_dss_pack_string(buffer, &ptr[i]->key, 1, OPAL_STRING))) { @@ -1132,7 +1132,7 @@ int opal_dss_pack_buffer_contents(opal_buffer_t *buffer, const void *src, int ret; ptr = (opal_buffer_t **) src; - + for (i = 0; i < num_vals; ++i) { /* pack the number of bytes */ OPAL_OUTPUT((opal_dss_verbose, "opal_dss_pack_buffer_contents: bytes_used %u\n", (unsigned)ptr[i]->bytes_used)); diff --git a/opal/dss/dss_peek.c b/opal/dss/dss_peek.c index 78ec5f38cba..84561df397e 100644 --- a/opal/dss/dss_peek.c +++ b/opal/dss/dss_peek.c @@ -40,7 +40,7 @@ int opal_dss_peek(opal_buffer_t *buffer, opal_data_type_t *type, *num_vals = 0; return OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER; } - + /* if this is NOT a fully described buffer, then that is as much as * we can do - there is no way we can tell the caller what type is * in the buffer since that info wasn't stored. diff --git a/opal/dss/dss_print.c b/opal/dss/dss_print.c index 432cc5dfb37..ece4572eec4 100644 --- a/opal/dss/dss_print.c +++ b/opal/dss/dss_print.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -643,7 +643,7 @@ int opal_dss_print_pstat(char **output, char *prefix, opal_pstats_t *src, opal_d /* deal with NULL prefix */ if (NULL == prefix) asprintf(&prefx, " "); else prefx = prefix; - + /* if src is NULL, just print data type and return */ if (NULL == src) { asprintf(output, "%sData type: OPAL_PSTATS\tValue: NULL pointer", prefx); @@ -674,7 +674,7 @@ int opal_dss_print_node_stat(char **output, char *prefix, opal_node_stats_t *src /* deal with NULL prefix */ if (NULL == prefix) asprintf(&prefx, " "); else prefx = prefix; - + /* if src is NULL, just print data type and return */ if (NULL == src) { asprintf(output, "%sData type: OPAL_NODE_STATS\tValue: NULL pointer", prefx); @@ -693,7 +693,7 @@ int opal_dss_print_node_stat(char **output, char *prefix, opal_node_stats_t *src if (prefx != prefix) { free(prefx); } - + return OPAL_SUCCESS; } @@ -708,7 +708,7 @@ int opal_dss_print_value(char **output, char *prefix, opal_value_t *src, opal_da /* deal with NULL prefix */ if (NULL == prefix) asprintf(&prefx, " "); else prefx = prefix; - + /* if src is NULL, just print data type and return */ if (NULL == src) { asprintf(output, "%sData type: OPAL_VALUE\tValue: NULL pointer", prefx); @@ -717,7 +717,7 @@ int opal_dss_print_value(char **output, char *prefix, opal_value_t *src, opal_da } return OPAL_SUCCESS; } - + switch (src->type) { case OPAL_BOOL: asprintf(output, "%sOPAL_VALUE: Data type: OPAL_BOOL\tKey: %s\tValue: %s", diff --git a/opal/dss/dss_register.c b/opal/dss/dss_register.c index d41ef168178..8e89bc573e7 100644 --- a/opal/dss/dss_register.c +++ b/opal/dss/dss_register.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -74,6 +74,6 @@ int opal_dss_register(opal_dss_pack_fn_t pack_fn, info->odti_compare_fn = compare_fn; info->odti_print_fn = print_fn; info->odti_structured = structured; - + return opal_pointer_array_set_item(&opal_dss_types, *type, info); } diff --git a/opal/dss/dss_types.h b/opal/dss/dss_types.h index 4bf25bff970..8c1bad91efd 100644 --- a/opal/dss/dss_types.h +++ b/opal/dss/dss_types.h @@ -378,7 +378,7 @@ struct opal_buffer_t { /** Where the next data will be unpacked from (within the allocated memory starting as base_ptr) */ char *unpack_ptr; - + /** Number of bytes allocated (starting at base_ptr) */ size_t bytes_allocated; /** Number of bytes used by the buffer (i.e., amount of data -- diff --git a/opal/dss/dss_unpack.c b/opal/dss/dss_unpack.c index 7bd0a0bae4d..eb1a8f9869a 100644 --- a/opal/dss/dss_unpack.c +++ b/opal/dss/dss_unpack.c @@ -194,7 +194,7 @@ int opal_dss_unpack_int(opal_buffer_t *buffer, void *dest, /* slow path - types are different sizes */ UNPACK_SIZE_MISMATCH(int, remote_type, ret); } - + return ret; } @@ -227,7 +227,7 @@ int opal_dss_unpack_sizet(opal_buffer_t *buffer, void *dest, /* slow path - types are different sizes */ UNPACK_SIZE_MISMATCH(size_t, remote_type, ret); } - + return ret; } @@ -260,7 +260,7 @@ int opal_dss_unpack_pid(opal_buffer_t *buffer, void *dest, /* slow path - types are different sizes */ UNPACK_SIZE_MISMATCH(pid_t, remote_type, ret); } - + return ret; } @@ -588,10 +588,10 @@ int opal_dss_unpack_pstat(opal_buffer_t *buffer, void *dest, int32_t i, n, m; int ret; char *cptr; - + ptr = (opal_pstats_t **) dest; n = *num_vals; - + for (i = 0; i < n; ++i) { /* allocate the new object */ ptr[i] = OBJ_NEW(opal_pstats_t); @@ -668,7 +668,7 @@ int opal_dss_unpack_pstat(opal_buffer_t *buffer, void *dest, return ret; } } - + return OPAL_SUCCESS; } @@ -856,10 +856,10 @@ int opal_dss_unpack_node_stat(opal_buffer_t *buffer, void *dest, opal_node_stats_t **ptr; int32_t i, n, m; int ret; - + ptr = (opal_node_stats_t **) dest; n = *num_vals; - + for (i = 0; i < n; ++i) { /* allocate the new object */ ptr[i] = OBJ_NEW(opal_node_stats_t); @@ -937,7 +937,7 @@ int opal_dss_unpack_node_stat(opal_buffer_t *buffer, void *dest, return ret; } } - + return OPAL_SUCCESS; } @@ -953,7 +953,7 @@ int opal_dss_unpack_value(opal_buffer_t *buffer, void *dest, ptr = (opal_value_t **) dest; n = *num_vals; - + for (i = 0; i < n; ++i) { /* allocate the new object */ ptr[i] = OBJ_NEW(opal_value_t); @@ -1395,7 +1395,7 @@ int opal_dss_unpack_buffer_contents(opal_buffer_t *buffer, void *dest, ptr = (opal_buffer_t **) dest; n = *num_vals; - + for (i = 0; i < n; ++i) { /* allocate the new object */ ptr[i] = OBJ_NEW(opal_buffer_t); diff --git a/opal/etc/Makefile.am b/opal/etc/Makefile.am index af4ce30a427..22c35bc73bd 100644 --- a/opal/etc/Makefile.am +++ b/opal/etc/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -53,7 +53,7 @@ install-data-local: # Only remove if exactly the same as what in our tree -# NOTE TO READER: Bourne shell if ... fi evaluates the body if +# NOTE TO READER: Bourne shell if ... fi evaluates the body if # the return of the evaluted command is 0 (as opposed to non-zero # as used by everyone else) uninstall-local: diff --git a/opal/etc/openmpi-mca-params.conf b/opal/etc/openmpi-mca-params.conf index 7a1f92367aa..4b54da63b0f 100644 --- a/opal/etc/openmpi-mca-params.conf +++ b/opal/etc/openmpi-mca-params.conf @@ -5,15 +5,15 @@ # 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, +# 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) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/include/Makefile.am b/opal/include/Makefile.am index 5d18694ba72..464faafd0ae 100644 --- a/opal/include/Makefile.am +++ b/opal/include/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -28,7 +28,7 @@ include opal/Makefile.am EXTRA_DIST = $(headers) -if WANT_INSTALL_HEADERS +if WANT_INSTALL_HEADERS opaldir = $(opalincludedir) nobase_dist_opal_HEADERS = $(headers) nobase_nodist_opal_HEADERS = $(nodist_headers) diff --git a/opal/include/opal/Makefile.am b/opal/include/opal/Makefile.am index 140c5ab7055..f0389a25815 100644 --- a/opal/include/opal/Makefile.am +++ b/opal/include/opal/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/include/opal/align.h b/opal/include/opal/align.h index c445b062176..09d351985bd 100644 --- a/opal/include/opal/align.h +++ b/opal/include/opal/align.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/constants.h b/opal/include/opal/constants.h index a5cf60331b2..75a5418e771 100644 --- a/opal/include/opal/constants.h +++ b/opal/include/opal/constants.h @@ -5,26 +5,26 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OPAL_CONSTANTS_H #define OPAL_CONSTANTS_H - -/* error codes - don't forget to update opal/rutime/opal_init.c when + +/* error codes - don't forget to update opal/rutime/opal_init.c when adding to this list */ #define OPAL_ERR_BASE 0 /* internal use only */ - + enum { OPAL_SUCCESS = (OPAL_ERR_BASE), diff --git a/opal/include/opal/hash_string.h b/opal/include/opal/hash_string.h index b6b835ced52..c4af2153806 100644 --- a/opal/include/opal/hash_string.h +++ b/opal/include/opal/hash_string.h @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/opal_socket_errno.h b/opal/include/opal/opal_socket_errno.h index 54fb822a1ec..1e3f346a0cb 100644 --- a/opal/include/opal/opal_socket_errno.h +++ b/opal/include/opal/opal_socket_errno.h @@ -5,14 +5,14 @@ * 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, + * 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 OPAL_GET_SOCKET_ERROR_H diff --git a/opal/include/opal/prefetch.h b/opal/include/opal/prefetch.h index 95ea8211a11..059b3a023f4 100644 --- a/opal/include/opal/prefetch.h +++ b/opal/include/opal/prefetch.h @@ -2,9 +2,9 @@ * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/sys/Makefile.am b/opal/include/opal/sys/Makefile.am index 190c496525f..01985a9badc 100644 --- a/opal/include/opal/sys/Makefile.am +++ b/opal/include/opal/sys/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2011 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/include/opal/sys/amd64/Makefile.am b/opal/include/opal/sys/amd64/Makefile.am index 08a222adab7..70003691b81 100644 --- a/opal/include/opal/sys/amd64/Makefile.am +++ b/opal/include/opal/sys/amd64/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/amd64/atomic.h b/opal/include/opal/sys/amd64/atomic.h index 6b5dc1b205d..d48944a5803 100644 --- a/opal/include/opal/sys/amd64/atomic.h +++ b/opal/include/opal/sys/amd64/atomic.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OPAL_SYS_ARCH_ATOMIC_H diff --git a/opal/include/opal/sys/amd64/timer.h b/opal/include/opal/sys/amd64/timer.h index 2014217f04e..33d64b70202 100644 --- a/opal/include/opal/sys/amd64/timer.h +++ b/opal/include/opal/sys/amd64/timer.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/include/opal/sys/amd64/update.sh b/opal/include/opal/sys/amd64/update.sh index 9784b86f45d..dbef4d61cd0 100644 --- a/opal/include/opal/sys/amd64/update.sh +++ b/opal/include/opal/sys/amd64/update.sh @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/architecture.h b/opal/include/opal/sys/architecture.h index cc5d9a464c7..ead36e64f9b 100644 --- a/opal/include/opal/sys/architecture.h +++ b/opal/include/opal/sys/architecture.h @@ -5,16 +5,16 @@ * 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, + * 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 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/sys/arm/Makefile.am b/opal/include/opal/sys/arm/Makefile.am index 68da5aca528..602cce94bed 100644 --- a/opal/include/opal/sys/arm/Makefile.am +++ b/opal/include/opal/sys/arm/Makefile.am @@ -5,14 +5,14 @@ # Copyright (c) 2004-2008 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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$ # diff --git a/opal/include/opal/sys/arm/atomic.h b/opal/include/opal/sys/arm/atomic.h index 210ef9dbea3..81f81ddd536 100644 --- a/opal/include/opal/sys/arm/atomic.h +++ b/opal/include/opal/sys/arm/atomic.h @@ -5,16 +5,16 @@ * 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, + * 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 IBM Corporation. All rights reserved. * Copyright (c) 2010 ARM ltd. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/sys/arm/timer.h b/opal/include/opal/sys/arm/timer.h index 646f974a045..b93689c908d 100644 --- a/opal/include/opal/sys/arm/timer.h +++ b/opal/include/opal/sys/arm/timer.h @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/sys/arm/update.sh b/opal/include/opal/sys/arm/update.sh index cf42acc814d..94d8ed2714b 100644 --- a/opal/include/opal/sys/arm/update.sh +++ b/opal/include/opal/sys/arm/update.sh @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/atomic.h b/opal/include/opal/sys/atomic.h index 2971908e261..d32688155ef 100644 --- a/opal/include/opal/sys/atomic.h +++ b/opal/include/opal/sys/atomic.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -105,8 +105,8 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t; /********************************************************************** * * Set or unset these macros in the architecture-specific atomic.h - * files if we need to specify them as inline or non-inline - * + * files if we need to specify them as inline or non-inline + * *********************************************************************/ #if !OPAL_GCC_INLINE_ASSEMBLY #define OPAL_HAVE_INLINE_ATOMIC_MEM_BARRIER 0 @@ -135,9 +135,9 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t; * Load the appropriate architecture files and set some reasonable * default values for our support * - *********************************************************************/ + *********************************************************************/ #if defined(DOXYGEN) -/* don't include system-level gorp when generating doxygen files */ +/* don't include system-level gorp when generating doxygen files */ #elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_SYNC #include "opal/sys/sync_builtin/atomic.h" #elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_OSX @@ -206,7 +206,7 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t; */ #if OPAL_HAVE_INLINE_ATOMIC_MEM_BARRIER -static inline +static inline #endif void opal_atomic_mb(void); @@ -221,7 +221,7 @@ void opal_atomic_mb(void); */ #if OPAL_HAVE_INLINE_ATOMIC_MEM_BARRIER -static inline +static inline #endif void opal_atomic_rmb(void); @@ -236,7 +236,7 @@ void opal_atomic_rmb(void); */ #if OPAL_HAVE_INLINE_ATOMIC_MEM_BARRIER -static inline +static inline #endif void opal_atomic_wmb(void); @@ -273,7 +273,7 @@ enum { * @param value Initial value to set lock to */ #if OPAL_HAVE_ATOMIC_SPINLOCKS == 0 -static inline +static inline #endif void opal_atomic_init(opal_atomic_lock_t* lock, int32_t value); @@ -332,19 +332,19 @@ void opal_atomic_unlock(opal_atomic_lock_t *lock); #if defined(DOXYGEN) || OPAL_HAVE_ATOMIC_CMPSET_32 #if OPAL_HAVE_INLINE_ATOMIC_CMPSET_32 -static inline +static inline #endif int opal_atomic_cmpset_32(volatile int32_t *addr, int32_t oldval, int32_t newval); #if OPAL_HAVE_INLINE_ATOMIC_CMPSET_32 -static inline +static inline #endif int opal_atomic_cmpset_acq_32(volatile int32_t *addr, int32_t oldval, int32_t newval); #if OPAL_HAVE_INLINE_ATOMIC_CMPSET_32 -static inline +static inline #endif int opal_atomic_cmpset_rel_32(volatile int32_t *addr, int32_t oldval, int32_t newval); @@ -357,19 +357,19 @@ int opal_atomic_cmpset_rel_32(volatile int32_t *addr, int32_t oldval, #if defined(DOXYGEN) || OPAL_HAVE_ATOMIC_CMPSET_64 #if OPAL_HAVE_INLINE_ATOMIC_CMPSET_64 -static inline +static inline #endif int opal_atomic_cmpset_64(volatile int64_t *addr, int64_t oldval, int64_t newval); #if OPAL_HAVE_INLINE_ATOMIC_CMPSET_64 -static inline +static inline #endif int opal_atomic_cmpset_acq_64(volatile int64_t *addr, int64_t oldval, int64_t newval); #if OPAL_HAVE_INLINE_ATOMIC_CMPSET_64 -static inline +static inline #endif int opal_atomic_cmpset_rel_64(volatile int64_t *addr, int64_t oldval, int64_t newval); @@ -483,27 +483,27 @@ opal_atomic_sub_size_t(volatile size_t *addr, int delta) static inline */ static inline int opal_atomic_cmpset_xx(volatile void* addr, int64_t oldval, int64_t newval, size_t length); -static inline int opal_atomic_cmpset_acq_xx(volatile void* addr, - int64_t oldval, int64_t newval, +static inline int opal_atomic_cmpset_acq_xx(volatile void* addr, + int64_t oldval, int64_t newval, size_t length); -static inline int opal_atomic_cmpset_rel_xx(volatile void* addr, - int64_t oldval, int64_t newval, +static inline int opal_atomic_cmpset_rel_xx(volatile void* addr, + int64_t oldval, int64_t newval, size_t length); -static inline int opal_atomic_cmpset_ptr(volatile void* addr, - void* oldval, +static inline int opal_atomic_cmpset_ptr(volatile void* addr, + void* oldval, void* newval); -static inline int opal_atomic_cmpset_acq_ptr(volatile void* addr, - void* oldval, +static inline int opal_atomic_cmpset_acq_ptr(volatile void* addr, + void* oldval, void* newval); -static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, - void* oldval, +static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, + void* oldval, void* newval); /** * Atomic compare and set of pointer with relaxed semantics. This * macro detect at compile time the type of the first argument and - * choose the correct function to be called. + * choose the correct function to be called. * * \note This macro should only be used for integer types. * @@ -519,7 +519,7 @@ static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, /** * Atomic compare and set of pointer with acquire semantics. This - * macro detect at compile time the type of the first argument + * macro detect at compile time the type of the first argument * and choose the correct function to be called. * * \note This macro should only be used for integer types. @@ -537,7 +537,7 @@ static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, /** * Atomic compare and set of pointer with release semantics. This - * macro detect at compile time the type of the first argument + * macro detect at compile time the type of the first argument * and choose the correct function to b * * \note This macro should only be used for integer types. @@ -556,9 +556,9 @@ static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, #if defined(DOXYGEN) || (OPAL_HAVE_ATOMIC_MATH_32 || OPAL_HAVE_ATOMIC_MATH_64) -static inline void opal_atomic_add_xx(volatile void* addr, +static inline void opal_atomic_add_xx(volatile void* addr, int32_t value, size_t length); -static inline void opal_atomic_sub_xx(volatile void* addr, +static inline void opal_atomic_sub_xx(volatile void* addr, int32_t value, size_t length); #if SIZEOF_VOID_P == 4 && OPAL_HAVE_ATOMIC_CMPSET_32 static inline int32_t opal_atomic_add_ptr( volatile void* addr, void* delta ); @@ -572,7 +572,7 @@ static inline int64_t opal_atomic_sub_ptr( volatile void* addr, void* delta ); /** * Atomically increment the content depending on the type. This - * macro detect at compile time the type of the first argument + * macro detect at compile time the type of the first argument * and choose the correct function to be called. * * \note This macro should only be used for integer types. @@ -586,7 +586,7 @@ static inline int64_t opal_atomic_sub_ptr( volatile void* addr, void* delta ); /** * Atomically decrement the content depending on the type. This - * macro detect at compile time the type of the first argument + * macro detect at compile time the type of the first argument * and choose the correct function to be called. * * \note This macro should only be used for integer types. diff --git a/opal/include/opal/sys/atomic_impl.h b/opal/include/opal/sys/atomic_impl.h index eab4c02a463..e2da78e9604 100644 --- a/opal/include/opal/sys/atomic_impl.h +++ b/opal/include/opal/sys/atomic_impl.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -59,7 +59,7 @@ static inline int32_t opal_atomic_add_32(volatile int32_t *addr, int delta) { int32_t oldval; - + do { oldval = *addr; } while (0 == opal_atomic_cmpset_32(addr, oldval, oldval + delta)); @@ -74,7 +74,7 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t *addr, int delta) { int32_t oldval; - + do { oldval = *addr; } while (0 == opal_atomic_cmpset_32(addr, oldval, oldval - delta)); @@ -106,7 +106,7 @@ static inline int64_t opal_atomic_add_64(volatile int64_t *addr, int64_t delta) { int64_t oldval; - + do { oldval = *addr; } while (0 == opal_atomic_cmpset_64(addr, oldval, oldval + delta)); @@ -214,15 +214,15 @@ opal_atomic_cmpset_rel_xx(volatile void* addr, int64_t oldval, static inline int -opal_atomic_cmpset_ptr(volatile void* addr, - void* oldval, +opal_atomic_cmpset_ptr(volatile void* addr, + void* oldval, void* newval) { #if SIZEOF_VOID_P == 4 && OPAL_HAVE_ATOMIC_CMPSET_32 - return opal_atomic_cmpset_32((int32_t*) addr, (unsigned long) oldval, + return opal_atomic_cmpset_32((int32_t*) addr, (unsigned long) oldval, (unsigned long) newval); #elif SIZEOF_VOID_P == 8 && OPAL_HAVE_ATOMIC_CMPSET_64 - return opal_atomic_cmpset_64((int64_t*) addr, (unsigned long) oldval, + return opal_atomic_cmpset_64((int64_t*) addr, (unsigned long) oldval, (unsigned long) newval); #else abort(); @@ -231,15 +231,15 @@ opal_atomic_cmpset_ptr(volatile void* addr, static inline int -opal_atomic_cmpset_acq_ptr(volatile void* addr, - void* oldval, +opal_atomic_cmpset_acq_ptr(volatile void* addr, + void* oldval, void* newval) { #if SIZEOF_VOID_P == 4 && OPAL_HAVE_ATOMIC_CMPSET_32 - return opal_atomic_cmpset_acq_32((int32_t*) addr, (unsigned long) oldval, + return opal_atomic_cmpset_acq_32((int32_t*) addr, (unsigned long) oldval, (unsigned long) newval); #elif SIZEOF_VOID_P == 8 && OPAL_HAVE_ATOMIC_CMPSET_64 - return opal_atomic_cmpset_acq_64((int64_t*) addr, (unsigned long) oldval, + return opal_atomic_cmpset_acq_64((int64_t*) addr, (unsigned long) oldval, (unsigned long) newval); #else abort(); @@ -247,15 +247,15 @@ opal_atomic_cmpset_acq_ptr(volatile void* addr, } -static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, - void* oldval, +static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, + void* oldval, void* newval) { #if SIZEOF_VOID_P == 4 && OPAL_HAVE_ATOMIC_CMPSET_32 - return opal_atomic_cmpset_rel_32((int32_t*) addr, (unsigned long) oldval, + return opal_atomic_cmpset_rel_32((int32_t*) addr, (unsigned long) oldval, (unsigned long) newval); #elif SIZEOF_VOID_P == 8 && OPAL_HAVE_ATOMIC_CMPSET_64 - return opal_atomic_cmpset_rel_64((int64_t*) addr, (unsigned long) oldval, + return opal_atomic_cmpset_rel_64((int64_t*) addr, (unsigned long) oldval, (unsigned long) newval); #else abort(); @@ -323,19 +323,19 @@ opal_atomic_sub_xx(volatile void* addr, int32_t value, size_t length) } #if SIZEOF_VOID_P == 4 && OPAL_HAVE_ATOMIC_ADD_32 -static inline int32_t opal_atomic_add_ptr( volatile void* addr, +static inline int32_t opal_atomic_add_ptr( volatile void* addr, void* delta ) { return opal_atomic_add_32((int32_t*) addr, (unsigned long) delta); } #elif SIZEOF_VOID_P == 8 && OPAL_HAVE_ATOMIC_ADD_64 -static inline int64_t opal_atomic_add_ptr( volatile void* addr, +static inline int64_t opal_atomic_add_ptr( volatile void* addr, void* delta ) { return opal_atomic_add_64((int64_t*) addr, (unsigned long) delta); } #else -static inline int32_t opal_atomic_add_ptr( volatile void* addr, +static inline int32_t opal_atomic_add_ptr( volatile void* addr, void* delta ) { abort(); @@ -344,19 +344,19 @@ static inline int32_t opal_atomic_add_ptr( volatile void* addr, #endif #if SIZEOF_VOID_P == 4 && OPAL_HAVE_ATOMIC_SUB_32 -static inline int32_t opal_atomic_sub_ptr( volatile void* addr, +static inline int32_t opal_atomic_sub_ptr( volatile void* addr, void* delta ) { return opal_atomic_sub_32((int32_t*) addr, (unsigned long) delta); } #elif SIZEOF_VOID_P == 8 && OPAL_HAVE_ATOMIC_SUB_32 -static inline int64_t opal_atomic_sub_ptr( volatile void* addr, +static inline int64_t opal_atomic_sub_ptr( volatile void* addr, void* delta ) { return opal_atomic_sub_64((int64_t*) addr, (unsigned long) delta); } #else -static inline int32_t opal_atomic_sub_ptr( volatile void* addr, +static inline int32_t opal_atomic_sub_ptr( volatile void* addr, void* delta ) { abort(); @@ -373,7 +373,7 @@ static inline int32_t opal_atomic_sub_ptr( volatile void* addr, *********************************************************************/ #ifdef OPAL_NEED_INLINE_ATOMIC_SPINLOCKS -/* +/* * Lock initialization function. It set the lock to UNLOCKED. */ static inline void diff --git a/opal/include/opal/sys/cma.h b/opal/include/opal/sys/cma.h index 6592bd95feb..cbbcbe01479 100644 --- a/opal/include/opal/sys/cma.h +++ b/opal/include/opal/sys/cma.h @@ -5,9 +5,9 @@ /** @file * - * Cross Memory Attach syscall definitions. + * Cross Memory Attach syscall definitions. * - * These are only needed temporarily until these new syscalls + * These are only needed temporarily until these new syscalls * are incorporated into glibc */ @@ -51,8 +51,8 @@ static inline ssize_t -process_vm_readv(pid_t pid, - const struct iovec *lvec, +process_vm_readv(pid_t pid, + const struct iovec *lvec, unsigned long liovcnt, const struct iovec *rvec, unsigned long riovcnt, @@ -62,8 +62,8 @@ process_vm_readv(pid_t pid, } static inline ssize_t -process_vm_writev(pid_t pid, - const struct iovec *lvec, +process_vm_writev(pid_t pid, + const struct iovec *lvec, unsigned long liovcnt, const struct iovec *rvec, unsigned long riovcnt, diff --git a/opal/include/opal/sys/ia32/Makefile.am b/opal/include/opal/sys/ia32/Makefile.am index 92820a6d47f..b3a0efcd554 100644 --- a/opal/include/opal/sys/ia32/Makefile.am +++ b/opal/include/opal/sys/ia32/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/ia32/atomic.h b/opal/include/opal/sys/ia32/atomic.h index d5528a5baf2..a923e67d122 100644 --- a/opal/include/opal/sys/ia32/atomic.h +++ b/opal/include/opal/sys/ia32/atomic.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -96,7 +96,7 @@ static inline int opal_atomic_cmpset_32(volatile int32_t *addr, : "=qm" (ret), "+a" (oldval), "+m" (*addr) : "q"(newval) : "memory", "cc"); - + return (int)ret; } @@ -119,16 +119,16 @@ static inline int opal_atomic_cmpset_32(volatile int32_t *addr, #endif /* On Linux the EBX register is used by the shared libraries - * to keep the global offset. In same time this register is + * to keep the global offset. In same time this register is * required by the cmpxchg8b instruction (as an input parameter). - * This conflict force us to save the EBX before the cmpxchg8b + * This conflict force us to save the EBX before the cmpxchg8b * and to restore it afterward. */ static inline int opal_atomic_cmpset_64(volatile int64_t *addr, int64_t oldval, int64_t newval) { - /* + /* * Compare EDX:EAX with m64. If equal, set ZF and load ECX:EBX into * m64. Else, clear ZF and load m64 into EDX:EAX. */ diff --git a/opal/include/opal/sys/ia32/timer.h b/opal/include/opal/sys/ia32/timer.h index 2a74dbba190..1ea26125d5a 100644 --- a/opal/include/opal/sys/ia32/timer.h +++ b/opal/include/opal/sys/ia32/timer.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/include/opal/sys/ia32/update.sh b/opal/include/opal/sys/ia32/update.sh index ee9754f61e7..8d7107f362b 100644 --- a/opal/include/opal/sys/ia32/update.sh +++ b/opal/include/opal/sys/ia32/update.sh @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/ia64/Makefile.am b/opal/include/opal/sys/ia64/Makefile.am index eb23679428b..b189dc22d44 100644 --- a/opal/include/opal/sys/ia64/Makefile.am +++ b/opal/include/opal/sys/ia64/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/ia64/atomic.h b/opal/include/opal/sys/ia64/atomic.h index e0068f66d52..eee362543b0 100644 --- a/opal/include/opal/sys/ia64/atomic.h +++ b/opal/include/opal/sys/ia64/atomic.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/include/opal/sys/ia64/timer.h b/opal/include/opal/sys/ia64/timer.h index ec37131e8a2..36356730aec 100644 --- a/opal/include/opal/sys/ia64/timer.h +++ b/opal/include/opal/sys/ia64/timer.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/include/opal/sys/ia64/update.sh b/opal/include/opal/sys/ia64/update.sh index 793b2f669e0..0f2f4af1eea 100644 --- a/opal/include/opal/sys/ia64/update.sh +++ b/opal/include/opal/sys/ia64/update.sh @@ -6,15 +6,15 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/mips/Makefile.am b/opal/include/opal/sys/mips/Makefile.am index 0ec5c443d34..cf7f925b209 100644 --- a/opal/include/opal/sys/mips/Makefile.am +++ b/opal/include/opal/sys/mips/Makefile.am @@ -5,14 +5,14 @@ # Copyright (c) 2004-2008 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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$ # diff --git a/opal/include/opal/sys/mips/atomic.h b/opal/include/opal/sys/mips/atomic.h index c31ce153aff..a4714f413a7 100644 --- a/opal/include/opal/sys/mips/atomic.h +++ b/opal/include/opal/sys/mips/atomic.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/include/opal/sys/mips/timer.h b/opal/include/opal/sys/mips/timer.h index 646f974a045..b93689c908d 100644 --- a/opal/include/opal/sys/mips/timer.h +++ b/opal/include/opal/sys/mips/timer.h @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/sys/mips/update.sh b/opal/include/opal/sys/mips/update.sh index cf42acc814d..94d8ed2714b 100644 --- a/opal/include/opal/sys/mips/update.sh +++ b/opal/include/opal/sys/mips/update.sh @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/osx/Makefile.am b/opal/include/opal/sys/osx/Makefile.am index 2427b77d5f4..012ada40296 100644 --- a/opal/include/opal/sys/osx/Makefile.am +++ b/opal/include/opal/sys/osx/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/include/opal/sys/osx/atomic.h b/opal/include/opal/sys/osx/atomic.h index 029d98ca007..748fffdcef3 100644 --- a/opal/include/opal/sys/osx/atomic.h +++ b/opal/include/opal/sys/osx/atomic.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/include/opal/sys/powerpc/Makefile.am b/opal/include/opal/sys/powerpc/Makefile.am index 210028f737d..612dd2e4d7f 100644 --- a/opal/include/opal/sys/powerpc/Makefile.am +++ b/opal/include/opal/sys/powerpc/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/powerpc/atomic.h b/opal/include/opal/sys/powerpc/atomic.h index 80b8b07626c..e5572107c33 100644 --- a/opal/include/opal/sys/powerpc/atomic.h +++ b/opal/include/opal/sys/powerpc/atomic.h @@ -5,15 +5,15 @@ * 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, + * 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 IBM Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -178,7 +178,7 @@ static inline int opal_atomic_cmpset_64(volatile int64_t *addr, : "=&r" (ret), "=m" (*addr) : "r" (addr), "r" (oldval), "r" (newval), "m" (*addr) : "cc", "memory"); - + return (ret == oldval); } @@ -246,10 +246,10 @@ static inline int opal_atomic_cmpset_64(volatile int64_t *addr, "subfic r9,r5,0 \n\t" "adde %0,r9,r5 \n\t" : "=&r" (ret) - : "r"OPAL_ASM_ADDR(addr), + : "r"OPAL_ASM_ADDR(addr), "m"(oldval), "m"(newval) : "r4", "r5", "r9", "cc", "memory"); - + return ret; } diff --git a/opal/include/opal/sys/powerpc/timer.h b/opal/include/opal/sys/powerpc/timer.h index 7155edbcf4e..543352d7af0 100644 --- a/opal/include/opal/sys/powerpc/timer.h +++ b/opal/include/opal/sys/powerpc/timer.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/include/opal/sys/powerpc/update.sh b/opal/include/opal/sys/powerpc/update.sh index 8c2ae0c8698..095868d4fb5 100644 --- a/opal/include/opal/sys/powerpc/update.sh +++ b/opal/include/opal/sys/powerpc/update.sh @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/sparcv9/Makefile.am b/opal/include/opal/sys/sparcv9/Makefile.am index 6703f1d7490..a16ecf17ea9 100644 --- a/opal/include/opal/sys/sparcv9/Makefile.am +++ b/opal/include/opal/sys/sparcv9/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/sparcv9/atomic.h b/opal/include/opal/sys/sparcv9/atomic.h index 4ee217b5909..57fb722b1d9 100644 --- a/opal/include/opal/sys/sparcv9/atomic.h +++ b/opal/include/opal/sys/sparcv9/atomic.h @@ -5,15 +5,15 @@ * 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, + * 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 reserverd. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -169,10 +169,10 @@ static inline int opal_atomic_cmpset_acq_64( volatile int64_t *addr, int64_t oldval, int64_t newval) { int rc; - + rc = opal_atomic_cmpset_64(addr, oldval, newval); opal_atomic_rmb(); - + return rc; } diff --git a/opal/include/opal/sys/sparcv9/timer.h b/opal/include/opal/sys/sparcv9/timer.h index e9ce7faea8b..5e79c6d1c9a 100644 --- a/opal/include/opal/sys/sparcv9/timer.h +++ b/opal/include/opal/sys/sparcv9/timer.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -46,7 +46,7 @@ opal_sys_timer_get_cycles(void) __asm__ __volatile__("rd %%tick, %0 \n" "srlx %0, 32, %1 " : - "=r"(a), "=r"(b) + "=r"(a), "=r"(b) ); ret = (0x00000000FFFFFFFF & a) | (((opal_timer_t) b) << 32); diff --git a/opal/include/opal/sys/sparcv9/update.sh b/opal/include/opal/sys/sparcv9/update.sh index 2f3da1f3303..69c7931863d 100644 --- a/opal/include/opal/sys/sparcv9/update.sh +++ b/opal/include/opal/sys/sparcv9/update.sh @@ -6,14 +6,14 @@ # 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, +# 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$ # diff --git a/opal/include/opal/sys/sync_builtin/Makefile.am b/opal/include/opal/sys/sync_builtin/Makefile.am index fbb8a608f54..1c2686811dd 100644 --- a/opal/include/opal/sys/sync_builtin/Makefile.am +++ b/opal/include/opal/sys/sync_builtin/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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 Sandia National Laboratories. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/include/opal/sys/sync_builtin/atomic.h b/opal/include/opal/sys/sync_builtin/atomic.h index 43bccef637d..264d8fa53a9 100644 --- a/opal/include/opal/sys/sync_builtin/atomic.h +++ b/opal/include/opal/sys/sync_builtin/atomic.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ #define OPAL_HAVE_ATOMIC_MEM_BARRIER 1 static inline void opal_atomic_mb(void) -{ +{ __sync_synchronize(); } @@ -41,7 +41,7 @@ static inline void opal_atomic_rmb(void) } static inline void opal_atomic_wmb(void) -{ +{ __sync_synchronize(); } diff --git a/opal/include/opal/sys/timer.h b/opal/include/opal/sys/timer.h index 4e4fdbb6bbd..fe97aef3ef9 100644 --- a/opal/include/opal/sys/timer.h +++ b/opal/include/opal/sys/timer.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -79,7 +79,7 @@ BEGIN_C_DECLS opal/mca/timer/linux/configure.m4. Or not. */ #if defined(DOXYGEN) -/* don't include system-level gorp when generating doxygen files */ +/* don't include system-level gorp when generating doxygen files */ #elif OPAL_ASSEMBLY_ARCH == OPAL_AMD64 #include "opal/sys/amd64/timer.h" #elif OPAL_ASSEMBLY_ARCH == OPAL_ARM diff --git a/opal/include/opal/types.h b/opal/include/opal/types.h index c82a6f9005c..2089057365a 100644 --- a/opal/include/opal/types.h +++ b/opal/include/opal/types.h @@ -5,15 +5,15 @@ * 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, + * 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) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -150,7 +150,7 @@ static inline void* opal_ptr_ltop( uint64_t value ) #if defined(WORDS_BIGENDIAN) || !defined(HAVE_UNIX_BYTESWAP) static inline uint16_t opal_swap_bytes2(uint16_t val) __opal_attribute_const__; -static inline uint16_t opal_swap_bytes2(uint16_t val) +static inline uint16_t opal_swap_bytes2(uint16_t val) { union { uint16_t bigval; uint8_t arrayval[2]; @@ -195,7 +195,7 @@ static inline uint64_t opal_swap_bytes8(uint64_t val) r.arrayval[5] = w.arrayval[2]; r.arrayval[6] = w.arrayval[1]; r.arrayval[7] = w.arrayval[0]; - + return r.bigval; } diff --git a/opal/include/opal/version.h.in b/opal/include/opal/version.h.in index 9b4e3ea2155..ac9c429e52d 100644 --- a/opal/include/opal/version.h.in +++ b/opal/include/opal/version.h.in @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file should be included by any file that needs full diff --git a/opal/include/opal_config_bottom.h b/opal/include/opal_config_bottom.h index c7b05fa6c49..dcc941a1b42 100644 --- a/opal/include/opal_config_bottom.h +++ b/opal/include/opal_config_bottom.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2010 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file is included at the bottom of opal_config.h, and is @@ -30,7 +30,7 @@ * need to #ifndef/#endif protection here. */ -#ifndef OPAL_CONFIG_H +#ifndef OPAL_CONFIG_H #error "opal_config_bottom.h should only be included from opal_config.h" #endif @@ -563,7 +563,7 @@ static inline uint16_t ntohs(uint16_t netvar) { return netvar; } want to protect others from the autoconf/automake-generated PACKAGE_ macros in opal_config.h. We can't put these undef's directly in opal_config.h because they'll be turned into #defines' - via autoconf. + via autoconf. So put them here in case any only else includes OMPI/ORTE/OPAL's config.h files. */ diff --git a/opal/include/opal_config_top.h b/opal/include/opal_config_top.h index 9b1837dbc04..1ce5267c389 100644 --- a/opal/include/opal_config_top.h +++ b/opal/include/opal_config_top.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file is included at the top of opal_config.h, and is @@ -15,7 +15,7 @@ * need to #ifndef/#endif protection here. */ -#ifndef OPAL_CONFIG_H +#ifndef OPAL_CONFIG_H #error "opal_config_top.h should only be included from opal_config.h" #endif @@ -24,7 +24,7 @@ you include a .h file from another project that defines these macros (e.g., gmp.h) and then include OMPI/ORTE/OPAL's config.h, you'll get a preprocessor conflict. So put these undef's here to - protect us from other package's PACKAGE_ macros. + protect us from other package's PACKAGE_ macros. Note that we can't put them directly in opal_config.h (e.g., via AH_TOP) because they will be turned into #define's by autoconf. */ diff --git a/opal/include/opal_stdint.h b/opal/include/opal_stdint.h index 001bbe4a757..cd189627705 100644 --- a/opal/include/opal_stdint.h +++ b/opal/include/opal_stdint.h @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file includes the C99 stdint.h file if available, and otherwise diff --git a/opal/mca/Makefile.am b/opal/mca/Makefile.am index 8d3fca3fb4f..89dcb0f652b 100644 --- a/opal/mca/Makefile.am +++ b/opal/mca/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/allocator/Makefile.am b/opal/mca/allocator/Makefile.am index e8c1be97c51..2e9ddc087a9 100644 --- a/opal/mca/allocator/Makefile.am +++ b/opal/mca/allocator/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/allocator/allocator.h b/opal/mca/allocator/allocator.h index a4c11749eb5..7447edc206f 100644 --- a/opal/mca/allocator/allocator.h +++ b/opal/mca/allocator/allocator.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -19,7 +19,7 @@ * $HEADER$ */ /** - * @file + * @file * The public definition of the MCA Allocator framework. */ #ifndef MCA_ALLOCATOR_H @@ -27,7 +27,7 @@ #include "opal_config.h" #include "opal/mca/mca.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" BEGIN_C_DECLS @@ -38,17 +38,17 @@ struct mca_allocator_base_module_t; * The allocate function typedef for the function to be provided by the component. */ typedef void* (*mca_allocator_base_module_alloc_fn_t)( - struct mca_allocator_base_module_t*, - size_t size, - size_t align, + struct mca_allocator_base_module_t*, + size_t size, + size_t align, mca_mpool_base_registration_t** registration); - + /** * The realloc function typedef */ typedef void* (*mca_allocator_base_module_realloc_fn_t)( - struct mca_allocator_base_module_t*, - void*, size_t, + struct mca_allocator_base_module_t*, + void*, size_t, mca_mpool_base_registration_t** registration); /** @@ -63,16 +63,16 @@ typedef void(*mca_allocator_base_module_free_fn_t)( */ typedef int (*mca_allocator_base_module_compact_fn_t)( - struct mca_allocator_base_module_t* allocator + struct mca_allocator_base_module_t* allocator ); - + /** * cleanup (free) any resources held by allocator */ typedef int (*mca_allocator_base_module_finalize_fn_t)( - struct mca_allocator_base_module_t* allocator + struct mca_allocator_base_module_t* allocator ); /** @@ -81,13 +81,13 @@ typedef int (*mca_allocator_base_module_finalize_fn_t)( struct mca_allocator_base_module_t { mca_allocator_base_module_alloc_fn_t alc_alloc; /**< Allocate memory */ - mca_allocator_base_module_realloc_fn_t alc_realloc; + mca_allocator_base_module_realloc_fn_t alc_realloc; /**< Reallocate memory */ - mca_allocator_base_module_free_fn_t alc_free; + mca_allocator_base_module_free_fn_t alc_free; /**< Free memory */ - mca_allocator_base_module_compact_fn_t alc_compact; + mca_allocator_base_module_compact_fn_t alc_compact; /**< Return memory */ - mca_allocator_base_module_finalize_fn_t alc_finalize; + mca_allocator_base_module_finalize_fn_t alc_finalize; /**< Finalize and free everything */ /* memory pool and resources */ struct mca_mpool_base_module_t* alc_mpool; @@ -105,11 +105,11 @@ typedef struct mca_allocator_base_module_t mca_allocator_base_module_t; typedef void* (*mca_allocator_base_component_segment_alloc_fn_t)( struct mca_mpool_base_module_t* module, - size_t* size, + size_t* size, mca_mpool_base_registration_t** registration); /** - * A function to free memory from the control of the allocator framework + * A function to free memory from the control of the allocator framework * back to the system. This function is to be provided by the module to the * allocator framework. */ @@ -119,13 +119,13 @@ typedef void (*mca_allocator_base_component_segment_free_fn_t)( /** - * The function used to initialize the component. + * The function used to initialize the component. */ -typedef struct mca_allocator_base_module_t* +typedef struct mca_allocator_base_module_t* (*mca_allocator_base_component_init_fn_t)( bool enable_mpi_threads, mca_allocator_base_component_segment_alloc_fn_t segment_alloc, - mca_allocator_base_component_segment_free_fn_t segment_free, + mca_allocator_base_component_segment_free_fn_t segment_free, struct mca_mpool_base_module_t* mpool ); @@ -134,11 +134,11 @@ typedef struct mca_allocator_base_module_t* * describes the component. */ struct mca_allocator_base_component_2_0_0_t { - mca_base_component_t allocator_version; + mca_base_component_t allocator_version; /**< The version of the component */ - mca_base_component_data_t allocator_data; + mca_base_component_data_t allocator_data; /**< The component metadata */ - mca_allocator_base_component_init_fn_t allocator_init; + mca_allocator_base_component_init_fn_t allocator_init; /**< The component initialization function. */ }; diff --git a/opal/mca/allocator/base/Makefile.am b/opal/mca/allocator/base/Makefile.am index bda5d3cedbf..55ad8cfc293 100644 --- a/opal/mca/allocator/base/Makefile.am +++ b/opal/mca/allocator/base/Makefile.am @@ -5,19 +5,19 @@ # 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, +# 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$ # headers += \ - base/base.h + base/base.h libmca_allocator_la_SOURCES += \ - base/allocator_base_frame.c + base/allocator_base_frame.c diff --git a/opal/mca/allocator/base/allocator_base_frame.c b/opal/mca/allocator/base/allocator_base_frame.c index d687cba58d3..cf8559af2af 100644 --- a/opal/mca/allocator/base/allocator_base_frame.c +++ b/opal/mca/allocator/base/allocator_base_frame.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/mca/allocator/base/base.h b/opal/mca/allocator/base/base.h index 1d52a941b8b..13251759f89 100644 --- a/opal/mca/allocator/base/base.h +++ b/opal/mca/allocator/base/base.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** @@ -32,11 +32,11 @@ BEGIN_C_DECLS * Structure which describes a selected module. */ struct mca_allocator_base_selected_module_t { - opal_list_item_t super; + opal_list_item_t super; /**< Makes this an object of type opal_list_item */ - mca_allocator_base_component_t *allocator_component; + mca_allocator_base_component_t *allocator_component; /**< Info about the module */ - mca_allocator_base_module_t *allocator_module; + mca_allocator_base_module_t *allocator_module; /**< The function pointers for all the module's functions. */ }; /** @@ -48,7 +48,7 @@ typedef struct mca_allocator_base_selected_module_t mca_allocator_base_selected_ * Declaces mca_mpool_base_selected_module_t as a class. */ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_allocator_base_selected_module_t); - + OPAL_DECLSPEC mca_allocator_base_component_t* mca_allocator_component_lookup(const char* name); diff --git a/opal/mca/allocator/basic/Makefile.am b/opal/mca/allocator/basic/Makefile.am index 2ff200ad1ca..48d497723bc 100644 --- a/opal/mca/allocator/basic/Makefile.am +++ b/opal/mca/allocator/basic/Makefile.am @@ -5,21 +5,21 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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 = \ allocator_basic.c \ - allocator_basic.h + allocator_basic.h # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/opal/mca/allocator/basic/allocator_basic.c b/opal/mca/allocator/basic/allocator_basic.c index c212ac7483a..b988db1ddcc 100644 --- a/opal/mca/allocator/basic/allocator_basic.c +++ b/opal/mca/allocator/basic/allocator_basic.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,13 +29,13 @@ mca_allocator_base_component_t mca_allocator_basic_component = { - + /* First, the mca_base_module_t struct containing meta information about the module itself */ - + { MCA_ALLOCATOR_BASE_VERSION_2_0_0, - + "basic", /* MCA module name */ OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, @@ -77,7 +77,7 @@ int mca_allocator_basic_component_close(void) mca_allocator_base_module_t* mca_allocator_basic_component_init( bool enable_mpi_threads, mca_allocator_base_component_segment_alloc_fn_t segment_alloc, - mca_allocator_base_component_segment_free_fn_t segment_free, + mca_allocator_base_component_segment_free_fn_t segment_free, struct mca_mpool_base_module_t* mpool) { mca_allocator_basic_module_t *module = (mca_allocator_basic_module_t *) @@ -97,7 +97,7 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init( OBJ_CONSTRUCT(&module->seg_list, opal_list_t); OBJ_CONSTRUCT(&module->seg_lock, opal_mutex_t); OBJ_CONSTRUCT(&module->seg_descriptors, opal_free_list_t); - + opal_free_list_init (&module->seg_descriptors, sizeof(mca_allocator_basic_segment_t), opal_cache_line_size, @@ -110,13 +110,13 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init( return &module->super; } - + /** * Combine adjacent segments together. */ static void mca_allocator_basic_combine_prev( - mca_allocator_basic_module_t* module, + mca_allocator_basic_module_t* module, mca_allocator_basic_segment_t* seg) { opal_list_item_t* item = opal_list_get_prev(seg); @@ -132,7 +132,7 @@ static void mca_allocator_basic_combine_prev( } static void mca_allocator_basic_combine_next( - mca_allocator_basic_module_t* module, + mca_allocator_basic_module_t* module, mca_allocator_basic_segment_t* seg) { opal_list_item_t *item = opal_list_get_next(seg); @@ -161,9 +161,9 @@ static void mca_allocator_basic_combine_next( */ void *mca_allocator_basic_alloc( - mca_allocator_base_module_t * base, + mca_allocator_base_module_t * base, size_t size, - size_t align, + size_t align, mca_mpool_base_registration_t** registration) { mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base; @@ -237,9 +237,9 @@ void *mca_allocator_basic_alloc( */ void * mca_allocator_basic_realloc( - mca_allocator_base_module_t * base, - void * ptr, - size_t size, + mca_allocator_base_module_t * base, + void * ptr, + size_t size, mca_mpool_base_registration_t** registration) { unsigned char* addr = ((unsigned char*)ptr) - sizeof(size_t); @@ -285,7 +285,7 @@ void mca_allocator_basic_free( mca_allocator_basic_combine_next(module, seg); OPAL_THREAD_UNLOCK(&module->seg_lock); return; - } + } /* otherwise continue to check next larger entry */ } else { diff --git a/opal/mca/allocator/basic/allocator_basic.h b/opal/mca/allocator/basic/allocator_basic.h index 9b4fa93c1c3..0ae23a0c264 100644 --- a/opal/mca/allocator/basic/allocator_basic.h +++ b/opal/mca/allocator/basic/allocator_basic.h @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,8 +23,8 @@ * A generic memory basic allocator. **/ -#ifndef ALLOCATOR_BASIC_H -#define ALLOCATOR_BASIC_H +#ifndef ALLOCATOR_BASIC_H +#define ALLOCATOR_BASIC_H #include "opal_config.h" #include @@ -76,10 +76,10 @@ int mca_allocator_basic_component_close(void); mca_allocator_base_module_t* mca_allocator_basic_component_init( bool enable_mpi_threads, mca_allocator_base_component_segment_alloc_fn_t segment_alloc, - mca_allocator_base_component_segment_free_fn_t segment_free, + mca_allocator_base_component_segment_free_fn_t segment_free, struct mca_mpool_base_module_t* module ); - + /** * Accepts a request for memory in a specific region defined by the * mca_allocator_basic_options_t struct and returns a pointer to memory in that @@ -92,9 +92,9 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init( * @retval NULL if the allocation was unsuccessful */ void * mca_allocator_basic_alloc( - mca_allocator_base_module_t * mem, - size_t size, - size_t align, + mca_allocator_base_module_t * mem, + size_t size, + size_t align, mca_mpool_base_registration_t** registration); /** @@ -112,9 +112,9 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init( * */ void * mca_allocator_basic_realloc( - mca_allocator_base_module_t * mem, - void * ptr, - size_t size, + mca_allocator_base_module_t * mem, + void * ptr, + size_t size, mca_mpool_base_registration_t** registration); /** diff --git a/opal/mca/allocator/bucket/Makefile.am b/opal/mca/allocator/bucket/Makefile.am index dac7e6d0aa7..2726a044c1c 100644 --- a/opal/mca/allocator/bucket/Makefile.am +++ b/opal/mca/allocator/bucket/Makefile.am @@ -5,22 +5,22 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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 = \ allocator_bucket.c \ allocator_bucket_alloc.c \ - allocator_bucket_alloc.h + allocator_bucket_alloc.h # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/opal/mca/allocator/bucket/allocator_bucket.c b/opal/mca/allocator/bucket/allocator_bucket.c index 19ef519eb2e..148245356f4 100644 --- a/opal/mca/allocator/bucket/allocator_bucket.c +++ b/opal/mca/allocator/bucket/allocator_bucket.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reseved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -24,12 +24,12 @@ #include "opal/mca/allocator/allocator.h" #include "opal/constants.h" #include "opal/mca/allocator/bucket/allocator_bucket_alloc.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" struct mca_allocator_base_module_t* mca_allocator_bucket_module_init( bool enable_mpi_threads, mca_allocator_base_component_segment_alloc_fn_t segment_alloc, - mca_allocator_base_component_segment_free_fn_t segment_free, + mca_allocator_base_component_segment_free_fn_t segment_free, struct mca_mpool_base_module_t* mpool ); @@ -39,7 +39,7 @@ int mca_allocator_bucket_module_close(void); void * mca_allocator_bucket_alloc_wrapper( struct mca_allocator_base_module_t* allocator, - size_t size, size_t align, + size_t size, size_t align, mca_mpool_base_registration_t** registration); static int mca_allocator_num_buckets; @@ -65,7 +65,7 @@ int mca_allocator_bucket_finalize(struct mca_allocator_base_module_t* allocator) struct mca_allocator_base_module_t* mca_allocator_bucket_module_init( bool enable_mpi_threads, mca_allocator_base_component_segment_alloc_fn_t segment_alloc, - mca_allocator_base_component_segment_free_fn_t segment_free, + mca_allocator_base_component_segment_free_fn_t segment_free, struct mca_mpool_base_module_t* mpool) { size_t alloc_size = sizeof(mca_allocator_bucket_t); @@ -74,9 +74,9 @@ struct mca_allocator_base_module_t* mca_allocator_bucket_module_init( if(NULL == allocator) { return NULL; } - retval = mca_allocator_bucket_init((mca_allocator_base_module_t *) allocator, - mca_allocator_num_buckets, - segment_alloc, + retval = mca_allocator_bucket_init((mca_allocator_base_module_t *) allocator, + mca_allocator_num_buckets, + segment_alloc, segment_free); if(NULL == retval) { free(allocator); @@ -110,18 +110,18 @@ int mca_allocator_bucket_module_close(void) { void * mca_allocator_bucket_alloc_wrapper( struct mca_allocator_base_module_t* allocator, - size_t size, - size_t align, + size_t size, + size_t align, mca_mpool_base_registration_t** registration) { if(0 == align){ return mca_allocator_bucket_alloc(allocator, size, registration); } return mca_allocator_bucket_alloc_align(allocator, size, align, registration); -} +} -mca_allocator_base_component_t mca_allocator_bucket_component = { +mca_allocator_base_component_t mca_allocator_bucket_component = { /* First, the mca_base_module_t struct containing meta information about the module itself */ diff --git a/opal/mca/allocator/bucket/allocator_bucket_alloc.c b/opal/mca/allocator/bucket/allocator_bucket_alloc.c index bd2634d9e42..e5dc81eeb4e 100644 --- a/opal/mca/allocator/bucket/allocator_bucket_alloc.c +++ b/opal/mca/allocator/bucket/allocator_bucket_alloc.c @@ -5,15 +5,15 @@ * 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, + * 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 IBM Corp., All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -73,7 +73,7 @@ mca_allocator_bucket_t * mca_allocator_bucket_init( */ void * mca_allocator_bucket_alloc( mca_allocator_base_module_t * mem, - size_t size, + size_t size, mca_mpool_base_registration_t** registration) { mca_allocator_bucket_t * mem_options = (mca_allocator_bucket_t *) mem; @@ -101,14 +101,14 @@ void * mca_allocator_bucket_alloc( mem_options->buckets[bucket_num].free_chunk = chunk->u.next_free; chunk->u.bucket = bucket_num; /* go past the header */ - chunk += 1; + chunk += 1; /*release the lock */ OPAL_THREAD_UNLOCK(&(mem_options->buckets[bucket_num].lock)); return((void *) chunk); } /* figure out the size of bucket we need */ allocated_size = bucket_size; - /* we have to add in the size of the segment header into the + /* we have to add in the size of the segment header into the * amount we need to request */ allocated_size += sizeof(mca_allocator_bucket_segment_head_t); /* attempt to get the memory */ @@ -116,21 +116,21 @@ void * mca_allocator_bucket_alloc( mem_options->get_mem_fn(mem_options->super.alc_mpool, &allocated_size, registration); if(NULL == segment_header) { /* release the lock */ - OPAL_THREAD_UNLOCK(&(mem_options->buckets[bucket_num].lock)); + OPAL_THREAD_UNLOCK(&(mem_options->buckets[bucket_num].lock)); return(NULL); } /* if were allocated more memory then we actually need, then we will try to * break it up into multiple chunks in the current bucket */ allocated_size -= (sizeof(mca_allocator_bucket_segment_head_t) + bucket_size); - chunk = first_chunk = segment_header->first_chunk = - (mca_allocator_bucket_chunk_header_t *) (segment_header + 1); + chunk = first_chunk = segment_header->first_chunk = + (mca_allocator_bucket_chunk_header_t *) (segment_header + 1); /* add the segment into the segment list */ segment_header->next_segment = mem_options->buckets[bucket_num].segment_head; mem_options->buckets[bucket_num].segment_head = segment_header; if(allocated_size >= bucket_size) { - mem_options->buckets[bucket_num].free_chunk = + mem_options->buckets[bucket_num].free_chunk = (mca_allocator_bucket_chunk_header_t *) ((char *) chunk + bucket_size); - chunk->next_in_segment = (mca_allocator_bucket_chunk_header_t *) + chunk->next_in_segment = (mca_allocator_bucket_chunk_header_t *) ((char *)chunk + bucket_size); while(allocated_size >= bucket_size) { chunk = (mca_allocator_bucket_chunk_header_t *) ((char *) chunk + bucket_size); @@ -154,12 +154,12 @@ void * mca_allocator_bucket_alloc( * allocates an aligned region of memory */ void * mca_allocator_bucket_alloc_align( - mca_allocator_base_module_t * mem, - size_t size, - size_t alignment, + mca_allocator_base_module_t * mem, + size_t size, + size_t alignment, mca_mpool_base_registration_t** registration) { - mca_allocator_bucket_t * mem_options = (mca_allocator_bucket_t *) mem; + mca_allocator_bucket_t * mem_options = (mca_allocator_bucket_t *) mem; int bucket_num = 1; void * ptr; size_t aligned_max_size, bucket_size; @@ -168,15 +168,15 @@ void * mca_allocator_bucket_alloc_align( mca_allocator_bucket_chunk_header_t * first_chunk; mca_allocator_bucket_segment_head_t * segment_header; char * aligned_memory; - + /* since we do not have a way to get pre aligned memory, we need to request * a chunk then return an aligned spot in it. In the worst case we need * the requested size plus the alignment and the header size */ aligned_max_size = size + alignment + sizeof(mca_allocator_bucket_chunk_header_t) - + sizeof(mca_allocator_bucket_segment_head_t); + + sizeof(mca_allocator_bucket_segment_head_t); bucket_size = size + sizeof(mca_allocator_bucket_chunk_header_t); - allocated_size = aligned_max_size; - /* get some memory */ + allocated_size = aligned_max_size; + /* get some memory */ ptr = mem_options->get_mem_fn(mem_options->super.alc_mpool, &allocated_size, registration); if(NULL == ptr) { return(NULL); @@ -188,7 +188,7 @@ void * mca_allocator_bucket_alloc_align( /* we want to align the memory right after the header, so we go past the header */ aligned_memory = (char *) (first_chunk + 1); - /* figure out how much the alignment is off by */ + /* figure out how much the alignment is off by */ alignment_off = ((size_t) aligned_memory) % alignment; aligned_memory += (alignment - alignment_off); /* we now have an aligned piece of memory. Now we have to put the chunk @@ -199,7 +199,7 @@ void * mca_allocator_bucket_alloc_align( bucket_num++; } bucket_size = 1; - bucket_size <<= MCA_ALLOCATOR_BUCKET_1_BITSHIFTS + bucket_num; + bucket_size <<= MCA_ALLOCATOR_BUCKET_1_BITSHIFTS + bucket_num; /* if were allocated more memory then we actually need, then we will try to * break it up into multiple chunks in the current bucket */ @@ -238,8 +238,8 @@ void * mca_allocator_bucket_alloc_align( */ void * mca_allocator_bucket_realloc( mca_allocator_base_module_t * mem, - void * ptr, - size_t size, + void * ptr, + size_t size, mca_mpool_base_registration_t** registration) { mca_allocator_bucket_t * mem_options = (mca_allocator_bucket_t *) mem; @@ -270,7 +270,7 @@ void * mca_allocator_bucket_realloc( memcpy(ret_ptr, ptr, bucket_size); /* free the old area in memory */ mca_allocator_bucket_free((mca_allocator_base_module_t *) mem_options, ptr); - return(ret_ptr); + return(ret_ptr); } @@ -281,10 +281,10 @@ void * mca_allocator_bucket_realloc( void mca_allocator_bucket_free(mca_allocator_base_module_t * mem, void * ptr) { mca_allocator_bucket_t * mem_options = (mca_allocator_bucket_t *) mem; - mca_allocator_bucket_chunk_header_t * chunk = (mca_allocator_bucket_chunk_header_t *) ptr - 1; + mca_allocator_bucket_chunk_header_t * chunk = (mca_allocator_bucket_chunk_header_t *) ptr - 1; int bucket_num = chunk->u.bucket; OPAL_THREAD_LOCK(&(mem_options->buckets[bucket_num].lock)); - chunk->u.next_free = mem_options->buckets[bucket_num].free_chunk; + chunk->u.next_free = mem_options->buckets[bucket_num].free_chunk; mem_options->buckets[bucket_num].free_chunk = chunk; OPAL_THREAD_UNLOCK(&(mem_options->buckets[bucket_num].lock)); } @@ -321,7 +321,7 @@ int mca_allocator_bucket_cleanup(mca_allocator_base_module_t * mem) empty = true; segment = mem_options->buckets[i].segment_head; while( (true == empty) && (NULL != segment) ) { - first_chunk = segment->first_chunk; + first_chunk = segment->first_chunk; chunk = first_chunk; /* determine if the segment is free */ do { @@ -349,7 +349,7 @@ int mca_allocator_bucket_cleanup(mca_allocator_base_module_t * mem) } else { /* traverse the list of segment headers until we hit NULL */ while(NULL != *segment_header) { - first_chunk = (*segment_header)->first_chunk; + first_chunk = (*segment_header)->first_chunk; chunk = first_chunk; empty = true; /* determine if the segment is free */ @@ -370,7 +370,7 @@ int mca_allocator_bucket_cleanup(mca_allocator_base_module_t * mem) while(next_chunk->u.next_free != chunk) { next_chunk = next_chunk->u.next_free; } - next_chunk->u.next_free = chunk->u.next_free; + next_chunk->u.next_free = chunk->u.next_free; } } while((chunk = chunk->next_in_segment) != first_chunk); /* set the segment list to point to the next segment */ diff --git a/opal/mca/allocator/bucket/allocator_bucket_alloc.h b/opal/mca/allocator/bucket/allocator_bucket_alloc.h index 0d07e846596..f2af13a1224 100644 --- a/opal/mca/allocator/bucket/allocator_bucket_alloc.h +++ b/opal/mca/allocator/bucket/allocator_bucket_alloc.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -20,8 +20,8 @@ * A generic memory bucket allocator. **/ -#ifndef ALLOCATOR_BUCKET_ALLOC_H -#define ALLOCATOR_BUCKET_ALLOC_H +#ifndef ALLOCATOR_BUCKET_ALLOC_H +#define ALLOCATOR_BUCKET_ALLOC_H #include "opal_config.h" #include @@ -35,7 +35,7 @@ BEGIN_C_DECLS * Structure for the header of each memory chunk */ struct mca_allocator_bucket_chunk_header_t { - struct mca_allocator_bucket_chunk_header_t * next_in_segment; + struct mca_allocator_bucket_chunk_header_t * next_in_segment; /**< The next chunk in the memory segment */ /** * Union which holds either a pointer to the next free chunk @@ -48,42 +48,42 @@ struct mca_allocator_bucket_chunk_header_t { * chunks a list of free elements. */ union u { - struct mca_allocator_bucket_chunk_header_t * next_free; + struct mca_allocator_bucket_chunk_header_t * next_free; /**< if the chunk is free this will point to the next free chunk in the bucket */ int bucket; /**< the bucket number it belongs to */ } u; /**< the union */ }; /** * Typedef so we don't have to use struct - */ + */ typedef struct mca_allocator_bucket_chunk_header_t mca_allocator_bucket_chunk_header_t; /** - * Structure that heads each segment + * Structure that heads each segment */ struct mca_allocator_bucket_segment_head_t { struct mca_allocator_bucket_chunk_header_t * first_chunk; /**< the first chunk of the header */ - struct mca_allocator_bucket_segment_head_t * next_segment; /**< the next segment in the + struct mca_allocator_bucket_segment_head_t * next_segment; /**< the next segment in the bucket */ }; /** * Typedef so we don't have to use struct */ typedef struct mca_allocator_bucket_segment_head_t mca_allocator_bucket_segment_head_t; - + /** * Structure for each bucket */ struct mca_allocator_bucket_bucket_t { mca_allocator_bucket_chunk_header_t * free_chunk; /**< the first free chunk of memory */ - opal_mutex_t lock; /**< the lock on the bucket */ + opal_mutex_t lock; /**< the lock on the bucket */ mca_allocator_bucket_segment_head_t * segment_head; /**< the list of segment headers */ }; /** * Typedef so we don't have to use struct */ typedef struct mca_allocator_bucket_bucket_t mca_allocator_bucket_bucket_t; - + /** * Structure that holds the necessary information for each area of memory */ @@ -91,7 +91,7 @@ struct mca_allocator_bucket_t { mca_allocator_base_module_t super; /**< makes this a child of class mca_allocator_t */ mca_allocator_bucket_bucket_t * buckets; /**< the array of buckets */ int num_buckets; /**< the number of buckets */ - mca_allocator_base_component_segment_alloc_fn_t get_mem_fn; + mca_allocator_base_component_segment_alloc_fn_t get_mem_fn; /**< pointer to the function to get more memory */ mca_allocator_base_component_segment_free_fn_t free_mem_fn; /**< pointer to the function to free memory */ @@ -130,8 +130,8 @@ typedef struct mca_allocator_bucket_t mca_allocator_bucket_t; * @retval NULL if the allocation was unsuccessful */ void * mca_allocator_bucket_alloc( - mca_allocator_base_module_t * mem, - size_t size, + mca_allocator_base_module_t * mem, + size_t size, mca_mpool_base_registration_t** registration); /** @@ -143,7 +143,7 @@ typedef struct mca_allocator_bucket_t mca_allocator_bucket_t; * memory. * @param size The size of the requested area of memory * @param alignment The requested alignment of the new area of memory. This - * MUST be a power of 2. + * MUST be a power of 2. * * @retval Pointer to the area of memory if the allocation was successful * @retval NULL if the allocation was unsuccessful @@ -151,8 +151,8 @@ typedef struct mca_allocator_bucket_t mca_allocator_bucket_t; */ void * mca_allocator_bucket_alloc_align( mca_allocator_base_module_t * mem, - size_t size, - size_t alignment, + size_t size, + size_t alignment, mca_mpool_base_registration_t** registration); /** @@ -170,9 +170,9 @@ typedef struct mca_allocator_bucket_t mca_allocator_bucket_t; * */ void * mca_allocator_bucket_realloc( - mca_allocator_base_module_t * mem, - void * ptr, - size_t size, + mca_allocator_base_module_t * mem, + void * ptr, + size_t size, mca_mpool_base_registration_t** registration); /** diff --git a/opal/mca/backtrace/Makefile.am b/opal/mca/backtrace/Makefile.am index 93f6f6fb968..110acdb7de7 100644 --- a/opal/mca/backtrace/Makefile.am +++ b/opal/mca/backtrace/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/backtrace/backtrace.h b/opal/mca/backtrace/backtrace.h index 6b223b28bde..7f18fd84931 100644 --- a/opal/mca/backtrace/backtrace.h +++ b/opal/mca/backtrace/backtrace.h @@ -6,16 +6,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/backtrace/base/Makefile.am b/opal/mca/backtrace/base/Makefile.am index ed88ad439ea..a4acf9a658a 100644 --- a/opal/mca/backtrace/base/Makefile.am +++ b/opal/mca/backtrace/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/backtrace/base/backtrace_component.c b/opal/mca/backtrace/base/backtrace_component.c index 8fb321cfe17..995fa2328c6 100644 --- a/opal/mca/backtrace/base/backtrace_component.c +++ b/opal/mca/backtrace/base/backtrace_component.c @@ -5,16 +5,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/backtrace/base/base.h b/opal/mca/backtrace/base/base.h index a1e7fbaa72d..0015b781079 100644 --- a/opal/mca/backtrace/base/base.h +++ b/opal/mca/backtrace/base/base.h @@ -5,14 +5,14 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/backtrace/configure.m4 b/opal/mca/backtrace/configure.m4 index 6d94b88403f..0ee4261f3e8 100644 --- a/opal/mca/backtrace/configure.m4 +++ b/opal/mca/backtrace/configure.m4 @@ -6,14 +6,14 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/backtrace/execinfo/Makefile.am b/opal/mca/backtrace/execinfo/Makefile.am index 0fae37c363f..91338fdbe08 100644 --- a/opal/mca/backtrace/execinfo/Makefile.am +++ b/opal/mca/backtrace/execinfo/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/backtrace/execinfo/backtrace_execinfo.c b/opal/mca/backtrace/execinfo/backtrace_execinfo.c index 7666406cb50..faa30be9830 100644 --- a/opal/mca/backtrace/execinfo/backtrace_execinfo.c +++ b/opal/mca/backtrace/execinfo/backtrace_execinfo.c @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -60,7 +60,7 @@ opal_backtrace_print(FILE *file, char *prefix, int strip) int -opal_backtrace_buffer(char ***message_out, int *len_out) +opal_backtrace_buffer(char ***message_out, int *len_out) { int trace_size; void * trace[32]; diff --git a/opal/mca/backtrace/execinfo/backtrace_execinfo_component.c b/opal/mca/backtrace/execinfo/backtrace_execinfo_component.c index 1bda3dd60b8..cb44d2ce692 100644 --- a/opal/mca/backtrace/execinfo/backtrace_execinfo_component.c +++ b/opal/mca/backtrace/execinfo/backtrace_execinfo_component.c @@ -6,16 +6,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/backtrace/execinfo/configure.m4 b/opal/mca/backtrace/execinfo/configure.m4 index 4d173931fd0..5ad80d2e43f 100644 --- a/opal/mca/backtrace/execinfo/configure.m4 +++ b/opal/mca/backtrace/execinfo/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # AC_DEFUN([MCA_opal_backtrace_execinfo_PRIORITY], [30]) @@ -25,7 +25,7 @@ AC_DEFUN([MCA_opal_backtrace_execinfo_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_backtrace_execinfo_CONFIG(action-if-can-compile, +# MCA_backtrace_execinfo_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_backtrace_execinfo_CONFIG],[ @@ -37,6 +37,6 @@ AC_DEFUN([MCA_opal_backtrace_execinfo_CONFIG],[ [backtrace_execinfo_happy="yes"], [backtrace_execinfo_happy="no"]) - AS_IF([test "$backtrace_execinfo_happy" = "yes"], + AS_IF([test "$backtrace_execinfo_happy" = "yes"], [$1], [$2]) ]) diff --git a/opal/mca/backtrace/none/Makefile.am b/opal/mca/backtrace/none/Makefile.am index a8ca9f4a9a1..e6748bbe92d 100644 --- a/opal/mca/backtrace/none/Makefile.am +++ b/opal/mca/backtrace/none/Makefile.am @@ -5,14 +5,14 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/opal/mca/backtrace/none/backtrace_none.c b/opal/mca/backtrace/none/backtrace_none.c index abfa740fea4..ba343f22dbf 100644 --- a/opal/mca/backtrace/none/backtrace_none.c +++ b/opal/mca/backtrace/none/backtrace_none.c @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "opal_config.h" diff --git a/opal/mca/backtrace/none/backtrace_none_component.c b/opal/mca/backtrace/none/backtrace_none_component.c index 735d7b37d2c..9f820ea695a 100644 --- a/opal/mca/backtrace/none/backtrace_none_component.c +++ b/opal/mca/backtrace/none/backtrace_none_component.c @@ -6,16 +6,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/backtrace/none/configure.m4 b/opal/mca/backtrace/none/configure.m4 index 5191f257753..6882fd0c015 100644 --- a/opal/mca/backtrace/none/configure.m4 +++ b/opal/mca/backtrace/none/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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_opal_backtrace_none_PRIORITY], [0]) @@ -26,7 +26,7 @@ AC_DEFUN([MCA_opal_backtrace_none_COMPILE_MODE], [ ]) -# MCA_backtrace_none_CONFIG(action-if-can-compile, +# MCA_backtrace_none_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_backtrace_none_CONFIG],[ diff --git a/opal/mca/backtrace/printstack/Makefile.am b/opal/mca/backtrace/printstack/Makefile.am index 0db500da440..a32e038e427 100644 --- a/opal/mca/backtrace/printstack/Makefile.am +++ b/opal/mca/backtrace/printstack/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/backtrace/printstack/backtrace_printstack.c b/opal/mca/backtrace/printstack/backtrace_printstack.c index 1c73b4d6765..699c839efeb 100644 --- a/opal/mca/backtrace/printstack/backtrace_printstack.c +++ b/opal/mca/backtrace/printstack/backtrace_printstack.c @@ -5,15 +5,15 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "opal_config.h" diff --git a/opal/mca/backtrace/printstack/backtrace_printstack_component.c b/opal/mca/backtrace/printstack/backtrace_printstack_component.c index 77f179accb2..3a37269969d 100644 --- a/opal/mca/backtrace/printstack/backtrace_printstack_component.c +++ b/opal/mca/backtrace/printstack/backtrace_printstack_component.c @@ -6,16 +6,16 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/backtrace/printstack/configure.m4 b/opal/mca/backtrace/printstack/configure.m4 index f44ccf65612..4a158e156b7 100644 --- a/opal/mca/backtrace/printstack/configure.m4 +++ b/opal/mca/backtrace/printstack/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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_opal_backtrace_printstack_PRIORITY], [30]) @@ -26,7 +26,7 @@ AC_DEFUN([MCA_opal_backtrace_printstack_COMPILE_MODE], [ ]) -# MCA_backtrace_printstack_CONFIG(action-if-can-compile, +# MCA_backtrace_printstack_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_backtrace_printstack_CONFIG],[ @@ -38,6 +38,6 @@ AC_DEFUN([MCA_opal_backtrace_printstack_CONFIG],[ [backtrace_printstack_happy="yes"], [backtrace_printstack_happy="no"]) - AS_IF([test "$backtrace_printstack_happy" = "yes"], + AS_IF([test "$backtrace_printstack_happy" = "yes"], [$1], [$2]) ]) diff --git a/opal/mca/base/Makefile.am b/opal/mca/base/Makefile.am index 08bbcaca60b..bd6145d354a 100644 --- a/opal/mca/base/Makefile.am +++ b/opal/mca/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/base/base.h b/opal/mca/base/base.h index 5c501910f67..65c0b67514b 100644 --- a/opal/mca/base/base.h +++ b/opal/mca/base/base.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ struct mca_base_component_priority_list_item_t { mca_base_component_list_item_t super; int cpli_priority; }; -typedef struct mca_base_component_priority_list_item_t +typedef struct mca_base_component_priority_list_item_t mca_base_component_priority_list_item_t; OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_component_priority_list_item_t); @@ -102,7 +102,7 @@ enum { * * @return OPAL_SUCCESS Upon success * @return OPAL_ERROR Upon failure - * + * * This function starts up the entire MCA. It initializes a bunch * of built-in MCA parameters, and initialized the MCA component * repository. @@ -120,7 +120,7 @@ OPAL_DECLSPEC int mca_base_open(void); * @return OPAL_ERROR Upon failure * * This function closes down the entire MCA. It clears all MCA - * parameters and closes down the MCA component respository. + * parameters and closes down the MCA component respository. * * It must be the last MCA function invoked. It is normally invoked * during the finalize stage. @@ -239,7 +239,7 @@ OPAL_DECLSPEC void mca_base_component_close (const mca_base_component_t *compone */ void mca_base_component_unload (const mca_base_component_t *component, int output_id); -OPAL_DECLSPEC int mca_base_components_close(int output_id, opal_list_t *components_available, +OPAL_DECLSPEC int mca_base_components_close(int output_id, opal_list_t *components_available, const mca_base_component_t *skip); OPAL_DECLSPEC int mca_base_framework_components_close (struct mca_base_framework_t *framework, diff --git a/opal/mca/base/help-mca-base.txt b/opal/mca/base/help-mca-base.txt index 746904486fb..63bc471c1bd 100644 --- a/opal/mca/base/help-mca-base.txt +++ b/opal/mca/base/help-mca-base.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI MCA error messages. diff --git a/opal/mca/base/help-mca-var.txt b/opal/mca/base/help-mca-var.txt index 8ebacee954f..316342bb005 100644 --- a/opal/mca/base/help-mca-var.txt +++ b/opal/mca/base/help-mca-var.txt @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI MCA error messages. diff --git a/opal/mca/base/mca_base_close.c b/opal/mca/base/mca_base_close.c index 11486e722ee..352ed01bec1 100644 --- a/opal/mca/base/mca_base_close.c +++ b/opal/mca/base/mca_base_close.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_cmd_line.c b/opal/mca/base/mca_base_cmd_line.c index 1b272fc7270..d8319167011 100644 --- a/opal/mca/base/mca_base_cmd_line.c +++ b/opal/mca/base/mca_base_cmd_line.c @@ -5,16 +5,16 @@ * 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, + * 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) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ #include "opal/constants.h" -/* +/* * Private variables */ @@ -64,7 +64,7 @@ int mca_base_cmd_line_setup(opal_cmd_line_t *cmd) } { - opal_cmd_line_init_t entry = + opal_cmd_line_init_t entry = {"mca_base_param_file_prefix", '\0', "am", NULL, 1, NULL, OPAL_CMD_LINE_TYPE_STRING, "Aggregate MCA parameter set file list" @@ -113,7 +113,7 @@ int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd, num_insts = opal_cmd_line_get_ninsts(cmd, OPAL_MCA_CMD_LINE_ID); params = values = NULL; for (i = 0; i < num_insts; ++i) { - if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 0), + if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 0), opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 1), ¶ms, &values))) { return rc; @@ -130,7 +130,7 @@ int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd, num_insts = opal_cmd_line_get_ninsts(cmd, "g"OPAL_MCA_CMD_LINE_ID); params = values = NULL; for (i = 0; i < num_insts; ++i) { - if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 0), + if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 0), opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 1), ¶ms, &values))) { return rc; @@ -190,7 +190,7 @@ static int process_arg(const char *param, const char *value, /* If we didn't already have an value for the same param, save this one away */ - + opal_argv_append_nosize(params, param); opal_argv_append_nosize(values, p1); free(p1); diff --git a/opal/mca/base/mca_base_component_compare.c b/opal/mca/base/mca_base_component_compare.c index 5e89028fdc5..aeec7bc7158 100644 --- a/opal/mca/base/mca_base_component_compare.c +++ b/opal/mca/base/mca_base_component_compare.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -36,7 +36,7 @@ * may help the gentle reader to consider this an inverse comparison. * :-) */ -int +int mca_base_component_compare_priority(mca_base_component_priority_list_item_t *a, mca_base_component_priority_list_item_t *b) { @@ -53,7 +53,7 @@ mca_base_component_compare_priority(mca_base_component_priority_list_item_t *a, } -int mca_base_component_compare(const mca_base_component_t* aa, +int mca_base_component_compare(const mca_base_component_t* aa, const mca_base_component_t* bb) { int val; @@ -72,22 +72,22 @@ int mca_base_component_compare(const mca_base_component_t* aa, /* The names were equal, so compare the versions */ - if (aa->mca_component_major_version > + if (aa->mca_component_major_version > bb->mca_component_major_version) { return -1; - } else if (aa->mca_component_major_version < + } else if (aa->mca_component_major_version < bb->mca_component_major_version) { return 1; - } else if (aa->mca_component_minor_version > + } else if (aa->mca_component_minor_version > bb->mca_component_minor_version) { return -1; - } else if (aa->mca_component_minor_version < + } else if (aa->mca_component_minor_version < bb->mca_component_minor_version) { return 1; - } else if (aa->mca_component_release_version > + } else if (aa->mca_component_release_version > bb->mca_component_release_version) { return -1; - } else if (aa->mca_component_release_version < + } else if (aa->mca_component_release_version < bb->mca_component_release_version) { return 1; } @@ -97,11 +97,11 @@ int mca_base_component_compare(const mca_base_component_t* aa, /** - * compare but exclude the release version - declare compatible + * compare but exclude the release version - declare compatible * if the major/minor version are the same. */ int mca_base_component_compatible( - const mca_base_component_t* aa, + const mca_base_component_t* aa, const mca_base_component_t* bb) { int val; @@ -120,16 +120,16 @@ int mca_base_component_compatible( /* The names were equal, so compare the versions */ - if (aa->mca_component_major_version > + if (aa->mca_component_major_version > bb->mca_component_major_version) { return -1; - } else if (aa->mca_component_major_version < + } else if (aa->mca_component_major_version < bb->mca_component_major_version) { return 1; - } else if (aa->mca_component_minor_version > + } else if (aa->mca_component_minor_version > bb->mca_component_minor_version) { return -1; - } else if (aa->mca_component_minor_version < + } else if (aa->mca_component_minor_version < bb->mca_component_minor_version) { return 1; } @@ -142,7 +142,7 @@ int mca_base_component_compatible( */ char * mca_base_component_to_string(const mca_base_component_t *a) { char * str = NULL; - if(0 > asprintf(&str, "%s.%s.%d.%d", a->mca_type_name, + if(0 > asprintf(&str, "%s.%s.%d.%d", a->mca_type_name, a->mca_component_name, a->mca_component_major_version, a->mca_component_minor_version)) { return NULL; diff --git a/opal/mca/base/mca_base_component_find.c b/opal/mca/base/mca_base_component_find.c index 32cdbb9b27b..7739399c5bb 100644 --- a/opal/mca/base/mca_base_component_find.c +++ b/opal/mca/base/mca_base_component_find.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -274,7 +274,7 @@ static bool use_component(const bool include_mode, { bool found = false; const char **req_comp_name = requested_component_names; - + /* * If no selection is specified then we use all components * we can find. @@ -322,7 +322,7 @@ static int component_find_check (mca_base_framework_t *framework, char **request bool found = false; OPAL_LIST_FOREACH(cli, components, mca_base_component_list_item_t) { - if (0 == strcmp(requested_component_names[i], + if (0 == strcmp(requested_component_names[i], cli->cli_component->mca_component_name)) { found = true; break; @@ -332,7 +332,7 @@ static int component_find_check (mca_base_framework_t *framework, char **request if (!found) { char h[MAXHOSTNAMELEN]; gethostname(h, sizeof(h)); - opal_show_help("help-mca-base.txt", + opal_show_help("help-mca-base.txt", "find-available:not-valid", true, h, framework->framework_name, requested_component_names[i]); return OPAL_ERR_NOT_FOUND; @@ -366,7 +366,7 @@ int mca_base_component_parse_requested (const char *requested, bool *include_mod /* Double check to ensure that the user did not specify the negate character anywhere else in the value. */ if (NULL != strstr (requested, negate)) { - opal_show_help("help-mca-base.txt", + opal_show_help("help-mca-base.txt", "framework-param:too-many-negates", true, requested_orig); return OPAL_ERROR; diff --git a/opal/mca/base/mca_base_component_repository.c b/opal/mca/base/mca_base_component_repository.c index e4eda78bdb6..f98e484fa9b 100644 --- a/opal/mca/base/mca_base_component_repository.c +++ b/opal/mca/base/mca_base_component_repository.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_component_repository.h b/opal/mca/base/mca_base_component_repository.h index 8ba27f1da93..d480bb8cf4b 100644 --- a/opal/mca/base/mca_base_component_repository.h +++ b/opal/mca/base/mca_base_component_repository.h @@ -5,15 +5,15 @@ * 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, + * 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) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_components_close.c b/opal/mca/base/mca_base_components_close.c index 7cc0a42a191..b79522fd034 100644 --- a/opal/mca/base/mca_base_components_close.c +++ b/opal/mca/base/mca_base_components_close.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,7 +67,7 @@ int mca_base_framework_components_close (mca_base_framework_t *framework, skip); } -int mca_base_components_close(int output_id, opal_list_t *components, +int mca_base_components_close(int output_id, opal_list_t *components, const mca_base_component_t *skip) { mca_base_component_list_item_t *cli, *next; diff --git a/opal/mca/base/mca_base_components_open.c b/opal/mca/base/mca_base_components_open.c index 89303440df2..182a0fb5991 100644 --- a/opal/mca/base/mca_base_components_open.c +++ b/opal/mca/base/mca_base_components_open.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * All rights reserved. * Copyright (c) 2014 Hochschule Esslingen. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -101,7 +101,7 @@ static int open_components(mca_base_framework_t *framework) } #endif /* (OPAL_ENABLE_FT == 1) && (OPAL_ENABLE_FT_CR == 1) */ - /* If mca_base_framework_register_components was called with the MCA_BASE_COMPONENTS_ALL flag + /* If mca_base_framework_register_components was called with the MCA_BASE_COMPONENTS_ALL flag we need to trim down and close any extra components we do not want open */ ret = mca_base_components_filter (framework, open_only_flags); if (OPAL_SUCCESS != ret) { @@ -134,14 +134,14 @@ static int open_components(mca_base_framework_t *framework) /* If the component returns OPAL_ERR_NOT_AVAILABLE, it's a cue to "silently ignore me" -- it's not a failure, it's just a way for the component to say - "nope!". + "nope!". Otherwise, however, display an error. We may end up displaying this twice, but it may go to separate streams. So better to be redundant than to not display the error in the stream where it was expected. */ - + if (mca_base_component_show_load_errors) { opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id, "mca: base: components_open: component %s " @@ -162,8 +162,8 @@ static int open_components(mca_base_framework_t *framework) } } } - + /* All done */ - + return OPAL_SUCCESS; } diff --git a/opal/mca/base/mca_base_components_register.c b/opal/mca/base/mca_base_components_register.c index 48369c2a5cf..1598a533030 100644 --- a/opal/mca/base/mca_base_components_register.c +++ b/opal/mca/base/mca_base_components_register.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2011-2015 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -74,14 +74,14 @@ static int register_components(mca_base_framework_t *framework) mca_base_component_t *component; mca_base_component_list_item_t *cli, *next; int output_id = framework->framework_output; - + /* Announce */ opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_register: registering framework %s components", framework->framework_name); /* Traverse the list of found components */ - + OPAL_LIST_FOREACH_SAFE(cli, next, &framework->framework_components, mca_base_component_list_item_t) { component = (mca_base_component_t *)cli->cli_component; @@ -105,14 +105,14 @@ static int register_components(mca_base_framework_t *framework) /* If the component returns OPAL_ERR_NOT_AVAILABLE, it's a cue to "silently ignore me" -- it's not a failure, it's just a way for the component to say - "nope!". - + "nope!". + Otherwise, however, display an error. We may end up displaying this twice, but it may go to separate streams. So better to be redundant than to not display the error in the stream where it was expected. */ - + if (mca_base_component_show_load_errors) { opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id, "mca: base: components_register: component %s " @@ -154,8 +154,8 @@ static int register_components(mca_base_framework_t *framework) OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_CONSTANT, &component->mca_component_release_version); } - + /* All done */ - + return OPAL_SUCCESS; } diff --git a/opal/mca/base/mca_base_components_select.c b/opal/mca/base/mca_base_components_select.c index fa21c00729b..41a90b0af66 100644 --- a/opal/mca/base/mca_base_components_select.c +++ b/opal/mca/base/mca_base_components_select.c @@ -5,9 +5,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_framework.c b/opal/mca/base/mca_base_framework.c index 40953dcbfc2..a1e49e4d5b0 100644 --- a/opal/mca/base/mca_base_framework.c +++ b/opal/mca/base/mca_base_framework.c @@ -105,7 +105,7 @@ int mca_base_framework_register (struct mca_base_framework_t *framework, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_LOCAL, - &framework->framework_verbose); + &framework->framework_verbose); free(desc); if (0 > ret) { return ret; diff --git a/opal/mca/base/mca_base_framework.h b/opal/mca/base/mca_base_framework.h index 6c7036ac80b..c5009ac3823 100644 --- a/opal/mca/base/mca_base_framework.h +++ b/opal/mca/base/mca_base_framework.h @@ -69,7 +69,7 @@ typedef int (*mca_base_framework_register_params_fn_t) (mca_base_register_flag_t * * This function is invoked during opal_init() and during the * initialization of the special case of the ompi_info command. - * + * * This function fills in the components framework value, which * is a list of all components that were successfully opened. * This variable should \em only be used by other framework base @@ -130,7 +130,7 @@ typedef struct mca_base_framework_t { char *framework_name; /** Description of this framework or NULL */ const char *framework_description; - /** Framework register function or NULL if the framework + /** Framework register function or NULL if the framework and all its components have nothing to register */ mca_base_framework_register_params_fn_t framework_register; /** Framework open function or NULL */ @@ -143,7 +143,7 @@ typedef struct mca_base_framework_t { int framework_refcnt; /** List of static components */ const mca_base_component_t **framework_static_components; - /** Component selection. This will be registered with the MCA + /** Component selection. This will be registered with the MCA variable system and should be either NULL (all components) or a heap allocated, comma-delimited list of components. */ char *framework_selection; diff --git a/opal/mca/base/mca_base_list.c b/opal/mca/base/mca_base_list.c index 3a015581be3..0c97e69a0ce 100644 --- a/opal/mca/base/mca_base_list.c +++ b/opal/mca/base/mca_base_list.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -22,7 +22,7 @@ #include "opal/mca/base/base.h" -/* +/* * Local functions */ static void cl_constructor(opal_object_t *obj); @@ -32,14 +32,14 @@ static void cpl_constructor(opal_object_t *obj); /* * Class instance of the mca_base_component_list_item_t class */ -OBJ_CLASS_INSTANCE(mca_base_component_list_item_t, +OBJ_CLASS_INSTANCE(mca_base_component_list_item_t, opal_list_item_t, cl_constructor, NULL); /* * Class instance of the mca_base_component_priority_list_item_t class */ -OBJ_CLASS_INSTANCE(mca_base_component_priority_list_item_t, +OBJ_CLASS_INSTANCE(mca_base_component_priority_list_item_t, mca_base_component_list_item_t, cpl_constructor, NULL); @@ -58,7 +58,7 @@ static void cl_constructor(opal_object_t *obj) */ static void cpl_constructor(opal_object_t *obj) { - mca_base_component_priority_list_item_t *cpli = + mca_base_component_priority_list_item_t *cpli = (mca_base_component_priority_list_item_t *) obj; cpli->cpli_priority = -1; } diff --git a/opal/mca/base/mca_base_open.c b/opal/mca/base/mca_base_open.c index c386f63b4c4..aeb01e4afee 100644 --- a/opal/mca/base/mca_base_open.c +++ b/opal/mca/base/mca_base_open.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -60,7 +60,7 @@ static void parse_verbose(char *e, opal_output_stream_t *lds); /* - * Main MCA initialization. + * Main MCA initialization. */ int mca_base_open(void) { @@ -78,7 +78,7 @@ int mca_base_open(void) mca_base_system_default_path = strdup(opal_install_dirs.opallibdir); asprintf(&mca_base_user_default_path, "%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_home_directory()); #else - asprintf(&mca_base_system_default_path, "%s", opal_install_dirs.opallibdir); + asprintf(&mca_base_system_default_path, "%s", opal_install_dirs.opallibdir); #endif /* see if the user wants to override the defaults */ @@ -225,7 +225,7 @@ static void parse_verbose(char *e, opal_output_stream_t *lds) lds->lds_want_file = true; lds->lds_want_file_append = 1; have_output = true; - } + } else if (strncasecmp(ptr, "level", 5) == 0) { lds->lds_verbose_level = 0; diff --git a/opal/mca/base/mca_base_parse_paramfile.c b/opal/mca/base/mca_base_parse_paramfile.c index d8271522c77..80ea86e1d5c 100644 --- a/opal/mca/base/mca_base_parse_paramfile.c +++ b/opal/mca/base/mca_base_parse_paramfile.c @@ -6,16 +6,16 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_pvar.c b/opal/mca/base/mca_base_pvar.c index 1507aa15948..c7627ab4531 100644 --- a/opal/mca/base/mca_base_pvar.c +++ b/opal/mca/base/mca_base_pvar.c @@ -327,7 +327,7 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch if (!(flags & MCA_BASE_PVAR_FLAG_READONLY)) { pvar->set_value = set_value ? set_value : mca_base_pvar_default_set_value; } - + pvar->ctx = ctx; pvar->pvar_index = pvar_count; @@ -457,7 +457,7 @@ int mca_base_pvar_handle_alloc (mca_base_pvar_session_t *session, int index, voi } pvar_handle->obj_handle = obj_handle; - pvar_handle->pvar = pvar; + pvar_handle->pvar = pvar; *handle = pvar_handle; @@ -502,7 +502,7 @@ int mca_base_pvar_handle_alloc (mca_base_pvar_session_t *session, int index, voi ret = OPAL_ERR_OUT_OF_RESOURCE; break; } - + pvar_handle->last_value = calloc (*count, datatype_size); if (NULL == pvar_handle->last_value) { ret = OPAL_ERR_OUT_OF_RESOURCE; @@ -709,7 +709,7 @@ int mca_base_pvar_handle_write_value (mca_base_pvar_handle_t *handle, const void if (OPAL_SUCCESS != ret) { return ret; } - + memmove (handle->current_value, value, handle->count * var_type_sizes[handle->pvar->type]); return OPAL_SUCCESS; diff --git a/opal/mca/base/mca_base_pvar.h b/opal/mca/base/mca_base_pvar.h index 703c1a8b02d..44f23b3dfc1 100644 --- a/opal/mca/base/mca_base_pvar.h +++ b/opal/mca/base/mca_base_pvar.h @@ -371,7 +371,7 @@ OPAL_DECLSPEC int mca_base_pvar_find_by_name (const char *full_name, int var_cla * @param[out] count Number of registered performance variables. * * This function can be called before mca_base_pvar_init() and after - * mca_base_pvar_finalize(). + * mca_base_pvar_finalize(). */ OPAL_DECLSPEC int mca_base_pvar_get_count (int *count); diff --git a/opal/mca/base/mca_base_var.h b/opal/mca/base/mca_base_var.h index f815f6563ce..46b8a2ce760 100644 --- a/opal/mca/base/mca_base_var.h +++ b/opal/mca/base/mca_base_var.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,13 +14,13 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** @file +/** @file * This file presents the MCA variable interface. * * Note that there are two scopes for MCA variables: "normal" and @@ -135,16 +135,16 @@ typedef enum { MCA_BASE_VAR_SCOPE_READONLY, /** The value of this variable may be changed locally. */ MCA_BASE_VAR_SCOPE_LOCAL, - /** The value of this variable must be set to a consistent value + /** The value of this variable must be set to a consistent value within a group */ MCA_BASE_VAR_SCOPE_GROUP, - /** The value of this variable must be set to the same value + /** The value of this variable must be set to the same value within a group */ MCA_BASE_VAR_SCOPE_GROUP_EQ, - /** The value of this variable must be set to a consistent value + /** The value of this variable must be set to a consistent value for all processes */ MCA_BASE_VAR_SCOPE_ALL, - /** The value of this variable must be set to the same value + /** The value of this variable must be set to the same value for all processes */ MCA_BASE_VAR_SCOPE_ALL_EQ, MCA_BASE_VAR_SCOPE_MAX @@ -397,7 +397,7 @@ OPAL_DECLSPEC int mca_base_var_init(void); * {storage} points to a (char *), the pointed-to string will be * duplicated and maintained internally by the MCA variable system; * the caller may free the original string after this function returns - * successfully. + * successfully. */ OPAL_DECLSPEC int mca_base_var_register (const char *project_name, const char *framework_name, const char *component_name, const char *variable_name, @@ -452,12 +452,12 @@ OPAL_DECLSPEC int mca_base_framework_var_register (const mca_base_framework_t *f * variable. * @returns OPAL_ERR_OUT_OF_RESOURCE If memory could not be allocated. * @returns OPAL_ERROR For all other errors. - * + * * Upon success, this function creates a synonym MCA variable * that will be treated almost exactly like the original. The * type (int or string) is irrelevant; this function simply * creates a new name that by which the same variable value is - * accessible. + * accessible. * * Note that the original variable name has precendence over all * synonyms. For example, consider the case if variable is diff --git a/opal/mca/base/mca_base_var_enum.c b/opal/mca/base/mca_base_var_enum.c index 23741e76d9e..2e74cc6fca2 100644 --- a/opal/mca/base/mca_base_var_enum.c +++ b/opal/mca/base/mca_base_var_enum.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_var_enum.h b/opal/mca/base/mca_base_var_enum.h index 66a4a5e6c35..67286424e64 100644 --- a/opal/mca/base/mca_base_var_enum.h +++ b/opal/mca/base/mca_base_var_enum.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_var_group.c b/opal/mca/base/mca_base_var_group.c index 64f9defd6fd..6d4ea00637a 100644 --- a/opal/mca/base/mca_base_var_group.c +++ b/opal/mca/base/mca_base_var_group.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/base/mca_base_var_group.h b/opal/mca/base/mca_base_var_group.h index b33bc25be62..8217b476d88 100644 --- a/opal/mca/base/mca_base_var_group.h +++ b/opal/mca/base/mca_base_var_group.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -165,7 +165,7 @@ OPAL_DECLSPEC int mca_base_var_group_get_count (void); /** * Get a relative timestamp for the MCA group system * - * @retval stamp + * @retval stamp * * This value will change if groups or variables are either added or removed. */ diff --git a/opal/mca/base/mca_base_vari.h b/opal/mca/base/mca_base_vari.h index 0cb9fcd8e90..25dc108ab95 100644 --- a/opal/mca/base/mca_base_vari.h +++ b/opal/mca/base/mca_base_vari.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,14 +14,14 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** - * @file +/** + * @file * * This is the private declarations for the MCA variable system. * This file is internal to the MCA variable system and should not @@ -81,7 +81,7 @@ extern bool mca_base_var_initialized; struct mca_base_var_file_value_t { /** Allow this to be an OPAL OBJ */ opal_list_item_t super; - + /** Parameter name */ char *mbvfv_var; /** Parameter value */ @@ -169,5 +169,5 @@ OPAL_DECLSPEC int mca_base_pvar_init (void); OPAL_DECLSPEC int mca_base_pvar_finalize (void); END_C_DECLS - + #endif /* OPAL_MCA_BASE_VAR_INTERNAL_H */ diff --git a/opal/mca/btl/Makefile.am b/opal/mca/btl/Makefile.am index 976dab28d09..a235089a8f5 100644 --- a/opal/mca/btl/Makefile.am +++ b/opal/mca/btl/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/btl/base/Makefile.am b/opal/mca/btl/base/Makefile.am index 26de26c1ae2..9284793c0ba 100644 --- a/opal/mca/btl/base/Makefile.am +++ b/opal/mca/btl/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/btl/base/base.h b/opal/mca/btl/base/base.h index f2d3db463e6..f101d8b4357 100644 --- a/opal/mca/btl/base/base.h +++ b/opal/mca/btl/base/base.h @@ -5,16 +5,16 @@ * 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, + * 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) 2006 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -38,17 +38,17 @@ struct mca_btl_base_selected_module_t { typedef struct mca_btl_base_selected_module_t mca_btl_base_selected_module_t; -/* holds the recv call back function to be called by the btl on - * a receive. - */ -struct mca_btl_base_recv_reg_t { - mca_btl_base_module_recv_cb_fn_t cbfunc; - void* cbdata; -}; -typedef struct mca_btl_base_recv_reg_t mca_btl_base_recv_reg_t; +/* holds the recv call back function to be called by the btl on + * a receive. + */ +struct mca_btl_base_recv_reg_t { + mca_btl_base_module_recv_cb_fn_t cbfunc; + void* cbdata; +}; +typedef struct mca_btl_base_recv_reg_t mca_btl_base_recv_reg_t; -OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_btl_base_selected_module_t); +OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_btl_base_selected_module_t); /* * Global functions for MCA: overall BTL open and close @@ -76,5 +76,5 @@ OPAL_DECLSPEC extern bool mca_btl_base_thread_multiple_override; OPAL_DECLSPEC extern mca_base_framework_t opal_btl_base_framework; END_C_DECLS - + #endif /* MCA_BTL_BASE_H */ diff --git a/opal/mca/btl/base/btl_base_error.c b/opal/mca/btl/base/btl_base_error.c index ec437b1afa5..9b525c32390 100644 --- a/opal/mca/btl/base/btl_base_error.c +++ b/opal/mca/btl/base/btl_base_error.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -57,7 +57,7 @@ int mca_btl_base_out(const char* fmt, ...) } -void mca_btl_base_error_no_nics(const char* transport, +void mca_btl_base_error_no_nics(const char* transport, const char* nic_name) { char *procid; diff --git a/opal/mca/btl/base/btl_base_error.h b/opal/mca/btl/base/btl_base_error.h index 58ac9378cf7..fb18eb8a055 100644 --- a/opal/mca/btl/base/btl_base_error.h +++ b/opal/mca/btl/base/btl_base_error.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -83,9 +83,9 @@ OPAL_DECLSPEC extern int mca_btl_base_out(const char*, ...) __opal_attribute_for mca_btl_base_err args; \ mca_btl_base_err("\n"); \ } \ - } while(0); + } while(0); #else -#define BTL_VERBOSE(args) +#define BTL_VERBOSE(args) #endif #endif @@ -93,7 +93,7 @@ OPAL_DECLSPEC extern int mca_btl_base_out(const char*, ...) __opal_attribute_for BEGIN_C_DECLS -OPAL_DECLSPEC extern void mca_btl_base_error_no_nics(const char* transport, +OPAL_DECLSPEC extern void mca_btl_base_error_no_nics(const char* transport, const char* nic_name); END_C_DECLS diff --git a/opal/mca/btl/base/btl_base_frame.c b/opal/mca/btl/base/btl_base_frame.c index 4e7d6a334c7..038f8f93b85 100644 --- a/opal/mca/btl/base/btl_base_frame.c +++ b/opal/mca/btl/base/btl_base_frame.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -116,8 +116,8 @@ static int mca_btl_base_open(mca_base_open_flag_t flags) int ret; /* Open up all available components */ - - if (OPAL_SUCCESS != + + if (OPAL_SUCCESS != (ret = mca_base_framework_components_open(&opal_btl_base_framework, flags))) { return ret; } diff --git a/opal/mca/btl/base/btl_base_mca.c b/opal/mca/btl/base/btl_base_mca.c index df5baacb8a2..3d8a2e54c66 100644 --- a/opal/mca/btl/base/btl_base_mca.c +++ b/opal/mca/btl/base/btl_base_mca.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -187,9 +187,9 @@ int mca_btl_base_param_register(mca_base_component_t *version, /* Verify btl parameters make sense */ int mca_btl_base_param_verify(mca_btl_base_module_t *module) { - if (module->btl_min_rdma_pipeline_size < + if (module->btl_min_rdma_pipeline_size < (module->btl_eager_limit + module->btl_rdma_pipeline_send_length)) { - module->btl_min_rdma_pipeline_size = + module->btl_min_rdma_pipeline_size = module->btl_eager_limit + module->btl_rdma_pipeline_send_length; } diff --git a/opal/mca/btl/base/btl_base_select.c b/opal/mca/btl/base/btl_base_select.c index 6783a5cda8d..642901fecdb 100644 --- a/opal/mca/btl/base/btl_base_select.c +++ b/opal/mca/btl/base/btl_base_select.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -17,9 +17,9 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,7 +69,7 @@ int mca_btl_base_select(bool enable_progress_threads, /* if there is an include list - item must be in the list to be included */ if ( NULL != include ) { - char** argv = include; + char** argv = include; bool found = false; while(argv && *argv) { if(strcmp(component->btl_version.mca_component_name,*argv) == 0) { @@ -84,7 +84,7 @@ int mca_btl_base_select(bool enable_progress_threads, /* otherwise - check the exclude list to see if this item has been specifically excluded */ } else if ( NULL != exclude ) { - char** argv = exclude; + char** argv = exclude; bool found = false; while(argv && *argv) { if(strcmp(component->btl_version.mca_component_name,*argv) == 0) { @@ -98,7 +98,7 @@ int mca_btl_base_select(bool enable_progress_threads, } } - opal_output_verbose(10, opal_btl_base_framework.framework_output, + opal_output_verbose(10, opal_btl_base_framework.framework_output, "select: initializing %s component %s", component->btl_version.mca_type_name, component->btl_version.mca_component_name); @@ -122,7 +122,7 @@ int mca_btl_base_select(bool enable_progress_threads, OBJ_RELEASE(cli); mca_base_component_close((mca_base_component_t *) component, opal_btl_base_framework.framework_output); - } + } /* Otherwise, if it initialized properly, save it. */ diff --git a/opal/mca/btl/base/help-mpi-btl-base.txt b/opal/mca/btl/base/help-mpi-btl-base.txt index 91a3e4146e5..794caeb3c33 100644 --- a/opal/mca/btl/base/help-mpi-btl-base.txt +++ b/opal/mca/btl/base/help-mpi-btl-base.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # [btl:no-nics] diff --git a/opal/mca/btl/base/owner.txt b/opal/mca/btl/base/owner.txt index 5994893ef5a..bf08d5fcc99 100644 --- a/opal/mca/btl/base/owner.txt +++ b/opal/mca/btl/base/owner.txt @@ -1,5 +1,5 @@ # -# owner/status file +# owner/status file # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # diff --git a/opal/mca/btl/openib/btl_openib.c b/opal/mca/btl/openib/btl_openib.c index 53e22100aad..d094f72d16a 100644 --- a/opal/mca/btl/openib/btl_openib.c +++ b/opal/mca/btl/openib/btl_openib.c @@ -1257,7 +1257,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_alloc( to_com_frag(sfrag)->sg_entry.addr = (uint64_t)(uintptr_t)sfrag->hdr; } - cfrag->hdr = (mca_btl_openib_header_coalesced_t*)((unsigned char*)(sfrag->hdr + 1) + + cfrag->hdr = (mca_btl_openib_header_coalesced_t*)((unsigned char*)(sfrag->hdr + 1) + sfrag->coalesced_length + to_base_frag(sfrag)->segment.seg_len); cfrag->hdr = (mca_btl_openib_header_coalesced_t*)BTL_OPENIB_ALIGN_COALESCE_HDR(cfrag->hdr); diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 97f8b2a95f1..0f4df1f29b6 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -47,7 +47,7 @@ * The include of malloc.h below breaks abstractions in OMPI (by * directly including a header file from another component), but has * been ruled "ok" because the openib component is only supported on - * Linux. + * Linux. * * The malloc hooks in newer glibc were deprecated, including stock * malloc.h causes compilation warnings. Instead, we use the internal @@ -187,7 +187,7 @@ static int btl_openib_component_register(void) mca_btl_openib_module.super.btl_eager_limit; /* if_include and if_exclude need to be mutually exclusive */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != mca_base_var_check_exclusive("ompi", mca_btl_openib_component.super.btl_version.mca_type_name, mca_btl_openib_component.super.btl_version.mca_component_name, @@ -276,7 +276,7 @@ static int btl_openib_component_close(void) if (NULL != mca_btl_openib_component.default_recv_qps) { free(mca_btl_openib_component.default_recv_qps); } - + #if BTL_OPENIB_MALLOC_HOOKS_ENABLED /* Must check to see whether the malloc hook was set before assigning it back because ompi_info will call _register() and @@ -1617,7 +1617,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev) } /* Find out if this device supports RC QPs */ - if (OPAL_SUCCESS != opal_common_verbs_qp_test(dev_context, + if (OPAL_SUCCESS != opal_common_verbs_qp_test(dev_context, OPAL_COMMON_VERBS_FLAGS_RC)) { ibv_close_device(dev_context); BTL_VERBOSE(("openib: RC QPs not supported -- skipping %s", @@ -2128,7 +2128,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev) index = mca_base_var_find("opal","btl","openib","receive_queues"); if (index >= 0) { if (OPAL_SUCCESS != (ret = mca_base_var_get_value(index, NULL, &source, NULL))) { - BTL_ERROR(("mca_base_var_get_value failed to get value for receive_queues: %s:%d", + BTL_ERROR(("mca_base_var_get_value failed to get value for receive_queues: %s:%d", __FILE__, __LINE__)); goto error; } else { @@ -2291,8 +2291,8 @@ static int finish_btl_init(mca_btl_openib_module_t *openib_btl) openib_btl->super.btl_eager_limit, mca_btl_openib_component.buffer_alignment, size_t); - opal_output_verbose(1, opal_btl_base_framework.framework_output, - "[rank=%d] openib: using port %s:%d", + opal_output_verbose(1, opal_btl_base_framework.framework_output, + "[rank=%d] openib: using port %s:%d", OPAL_PROC_MY_NAME.vpid, ibv_get_device_name(openib_btl->device->ib_dev), openib_btl->port_num); @@ -2340,8 +2340,8 @@ static float get_ib_dev_distance(struct ibv_device *dev) static const struct hwloc_distances_s *hwloc_distances = NULL; if (NULL == hwloc_distances) { - hwloc_distances = - hwloc_get_whole_distance_matrix_by_type(opal_hwloc_topology, + hwloc_distances = + hwloc_get_whole_distance_matrix_by_type(opal_hwloc_topology, HWLOC_OBJ_NODE); } @@ -2375,7 +2375,7 @@ static float get_ib_dev_distance(struct ibv_device *dev) } break; - default: + default: /* If it's above a NUMA node, then I don't know how to compute the distance... */ ibv_obj = NULL; @@ -2416,32 +2416,32 @@ static float get_ib_dev_distance(struct ibv_device *dev) /* Distance may be asymetrical, so calculate both of them and take the max */ a = hwloc_distances->latency[my_obj->logical_index + - (ibv_obj->logical_index * + (ibv_obj->logical_index * hwloc_distances->nbobjs)]; b = hwloc_distances->latency[ibv_obj->logical_index + - (my_obj->logical_index * + (my_obj->logical_index * hwloc_distances->nbobjs)]; distance = (a > b) ? a : b; } break; - default: + default: /* If the obj is above a NUMA node, then we're bound to more than one NUMA node. Find the max distance. */ i = 0; for (node_obj = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - ibv_obj->cpuset, + ibv_obj->cpuset, HWLOC_OBJ_NODE, i); - NULL != node_obj; + NULL != node_obj; node_obj = hwloc_get_obj_inside_cpuset_by_type(opal_hwloc_topology, - ibv_obj->cpuset, + ibv_obj->cpuset, HWLOC_OBJ_NODE, ++i)) { a = hwloc_distances->latency[node_obj->logical_index + - (ibv_obj->logical_index * + (ibv_obj->logical_index * hwloc_distances->nbobjs)]; b = hwloc_distances->latency[ibv_obj->logical_index + - (node_obj->logical_index * + (node_obj->logical_index * hwloc_distances->nbobjs)]; a = (a > b) ? a : b; distance = (a > distance) ? a : distance; @@ -2742,8 +2742,8 @@ btl_openib_component_init(int *num_btl_modules, mca_btl_openib_component.ib_max_btls); i++) { if (0 != mca_btl_openib_component.ib_num_btls && (dev_sorted[i].distance - distance) > EPS) { - opal_output_verbose(1, opal_btl_base_framework.framework_output, - "[rank=%d] openib: skipping device %s; it is too far away", + opal_output_verbose(1, opal_btl_base_framework.framework_output, + "[rank=%d] openib: skipping device %s; it is too far away", OPAL_PROC_MY_NAME.vpid, ibv_get_device_name(dev_sorted[i].ib_dev)); break; @@ -2820,7 +2820,7 @@ btl_openib_component_init(int *num_btl_modules, ignored, warn about it */ if (num_devices_intentionally_ignored < num_devs) { opal_show_help("help-mpi-btl-openib.txt", - "no active ports found", true, + "no active ports found", true, opal_process_info.nodename); } goto no_btls; @@ -3110,8 +3110,8 @@ static int btl_openib_handle_incoming(mca_btl_openib_module_t *openib_btl, reg = mca_btl_base_active_message_trigger + hdr->tag; reg->cbfunc( &openib_btl->super, hdr->tag, des, reg->cbdata ); #if OPAL_CUDA_SUPPORT /* CUDA_ASYNC_RECV */ - if (des->des_flags & MCA_BTL_DES_FLAGS_CUDA_COPY_ASYNC) { - /* Since ASYNC flag is set, we know this descriptor is being used + if (des->des_flags & MCA_BTL_DES_FLAGS_CUDA_COPY_ASYNC) { + /* Since ASYNC flag is set, we know this descriptor is being used * for asynchronous copy and cannot be freed yet. Therefore, set * up callback for PML to call when complete, add argument into * descriptor and return. */ @@ -3810,7 +3810,7 @@ static int btl_openib_component_progress(void) * The only thing that gets completed here are asynchronous copies * so there is no need to free anything. */ - { + { int local_count = 0; mca_btl_base_descriptor_t *frag; while (local_count < 10 && (1 == progress_one_cuda_dtoh_event(&frag))) { diff --git a/opal/mca/btl/openib/btl_openib_endpoint.h b/opal/mca/btl/openib/btl_openib_endpoint.h index 3b55c570199..60f527a21a4 100644 --- a/opal/mca/btl/openib/btl_openib_endpoint.h +++ b/opal/mca/btl/openib/btl_openib_endpoint.h @@ -313,7 +313,7 @@ static inline int qp_need_signal(mca_btl_openib_endpoint_t *ep, const int qp, si { /* note that size here is payload only */ - if (ep->qps[qp].qp->sd_wqe <= 0 || + if (ep->qps[qp].qp->sd_wqe <= 0 || size + sizeof(mca_btl_openib_header_t) + (rdma ? sizeof(mca_btl_openib_footer_t) : 0) > ep->qps[qp].ib_inline_max || (!BTL_OPENIB_QP_TYPE_PP(qp) && ep->endpoint_btl->qps[qp].u.srq_qp.sd_credits <= 0)) { ep->qps[qp].qp->wqe_count = QP_TX_BATCH_COUNT; @@ -561,7 +561,7 @@ static inline int post_send(mca_btl_openib_endpoint_t *ep, BTL_OPENIB_HEADER_HTON(*frag->hdr); if(rdma) { - int32_t head; + int32_t head; mca_btl_openib_footer_t* ftr = (mca_btl_openib_footer_t*)(((char*)frag->hdr) + sg->length + BTL_OPENIB_FTR_PADDING(sg->length) - sizeof(mca_btl_openib_footer_t)); diff --git a/opal/mca/btl/openib/btl_openib_failover.c b/opal/mca/btl/openib/btl_openib_failover.c index 7e38953a253..eba83a0f3a4 100644 --- a/opal/mca/btl/openib/btl_openib_failover.c +++ b/opal/mca/btl/openib/btl_openib_failover.c @@ -3,7 +3,7 @@ * Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. diff --git a/opal/mca/btl/openib/btl_openib_fd.c b/opal/mca/btl/openib/btl_openib_fd.c index 76f87b09f00..c2a82d9e367 100644 --- a/opal/mca/btl/openib/btl_openib_fd.c +++ b/opal/mca/btl/openib/btl_openib_fd.c @@ -382,14 +382,14 @@ static void *service_thread_start(void *context) if (0 != rc && EAGAIN == errno) { continue; } - + OPAL_OUTPUT((-1, "fd service thread woke up!")); if (0 > rc) { if (EBADF == errno) { - /* We are assuming we lost a socket so set rc to 1 so we'll - * try to read a command off the service pipe to receive a - * rm command (corresponding to the socket that went away). + /* We are assuming we lost a socket so set rc to 1 so we'll + * try to read a command off the service pipe to receive a + * rm command (corresponding to the socket that went away). * If the EBADF is from the service pipe then the error * condition will be handled by the service_pipe_cmd(). */ @@ -659,7 +659,7 @@ int opal_btl_openib_fd_finalize(void) /* For the threaded version, send a command down the pipe */ cmd_t cmd; OPAL_OUTPUT((-1, "shutting down openib fd")); - /* Check if the thread exists before asking it to quit */ + /* Check if the thread exists before asking it to quit */ if (ESRCH != pthread_kill(thread, 0)) { memset(&cmd, 0, cmd_size); cmd.pc_cmd = CMD_TIME_TO_QUIT; diff --git a/opal/mca/btl/openib/btl_openib_frag.h b/opal/mca/btl/openib/btl_openib_frag.h index 82d727ee442..7ca37142429 100644 --- a/opal/mca/btl/openib/btl_openib_frag.h +++ b/opal/mca/btl/openib/btl_openib_frag.h @@ -39,7 +39,7 @@ struct mca_btl_openib_header_t { mca_btl_base_tag_t tag; uint8_t cm_seen; uint16_t credits; -#if OPAL_OPENIB_PAD_HDR +#if OPAL_OPENIB_PAD_HDR uint8_t padding[4]; #endif }; @@ -81,19 +81,19 @@ typedef struct mca_btl_openib_header_coalesced_t { #if OPAL_OPENIB_PAD_HDR /* BTL_OPENIB_FTR_PADDING - * This macro is used to keep the pointer to openib footers aligned for - * systems like SPARC64 that take a big performance hit when addresses - * are not aligned (and by default sigbus instead of coercing the type on + * This macro is used to keep the pointer to openib footers aligned for + * systems like SPARC64 that take a big performance hit when addresses + * are not aligned (and by default sigbus instead of coercing the type on * an unaligned address). * - * We assure alignment of a packet's structures when OPAL_OPENIB_PAD_HDR + * We assure alignment of a packet's structures when OPAL_OPENIB_PAD_HDR * is set to 1. When this is the case then several structures are padded * to assure alignment and the mca_btl_openib_footer_t structure itself - * will uses the BTL_OPENIB_FTR_PADDING macro to shift the location of the + * will uses the BTL_OPENIB_FTR_PADDING macro to shift the location of the * pointer to assure proper alignment after the PML Header and data. - * For example sending a 1 byte data packet the memory layout without + * For example sending a 1 byte data packet the memory layout without * footer alignment would look something like the following: - * + * * 0x00 : mca_btl_openib_coalesced_header_t (12 bytes + 4 byte pad) * 0x10 : mca_btl_openib_control_header_t (1 byte + 7 byte pad) * 0x18 : mca_btl_openib_header_t (4 bytes + 4 byte pad) @@ -102,9 +102,9 @@ typedef struct mca_btl_openib_header_coalesced_t { * 0x31 : end of packet * * By applying the BTL_OPENIB_FTR_PADDING() in the progress_one_device - * and post_send routines we adjust the pointer to mca_btl_openib_footer_t - * from 0x29 to 0x2C thus correctly aligning the start of the - * footer pointer. This adjustment will cause the padding field of + * and post_send routines we adjust the pointer to mca_btl_openib_footer_t + * from 0x29 to 0x2C thus correctly aligning the start of the + * footer pointer. This adjustment will cause the padding field of * mca_btl_openib_footer_t to overlap with the neighboring memory but since * we never use the padding we do not end up inadvertently overwriting * memory that does not belong to the fragment. @@ -113,15 +113,15 @@ typedef struct mca_btl_openib_header_coalesced_t { OPAL_ALIGN_PAD_AMOUNT(size, sizeof(uint64_t)) /* BTL_OPENIB_ALIGN_COALESCE_HDR - * This macro is used in btl_openib.c, while creating a coalesce fragment, + * This macro is used in btl_openib.c, while creating a coalesce fragment, * to align the coalesce headers. */ #define BTL_OPENIB_ALIGN_COALESCE_HDR(ptr) \ OPAL_ALIGN_PTR(ptr, sizeof(uint32_t), unsigned char*) /* BTL_OPENIB_COALESCE_HDR_PADDING - * This macro is used in btl_openib_component.c, while parsing an incoming - * coalesce fragment, to determine the padding amount used to align the + * This macro is used in btl_openib_component.c, while parsing an incoming + * coalesce fragment, to determine the padding amount used to align the * mca_btl_openib_coalesce_hdr_t. */ #define BTL_OPENIB_COALESCE_HDR_PADDING(ptr) \ @@ -143,12 +143,12 @@ struct mca_btl_openib_footer_t { #if OPAL_OPENIB_PAD_HDR #if OPAL_ENABLE_DEBUG /* this footer needs to be of a 8-byte multiple so by adding the - * seq field you throw this off and you cannot just remove the + * seq field you throw this off and you cannot just remove the * padding because the padding is needed in order to adjust the alignment * and not overwrite other packets. */ uint8_t padding[12]; -#else +#else uint8_t padding[8]; #endif #endif diff --git a/opal/mca/btl/openib/btl_openib_ini.c b/opal/mca/btl/openib/btl_openib_ini.c index a61cf28e270..e6bc6e89c66 100644 --- a/opal/mca/btl/openib/btl_openib_ini.c +++ b/opal/mca/btl/openib/btl_openib_ini.c @@ -13,7 +13,7 @@ * Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008 Mellanox Technologies. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -421,7 +421,7 @@ static int parse_line(parsed_section_values_t *sv) /* Have no idea what this parameter is. Not an error -- just ignore it */ if (!showed_unknown_field_warning) { - opal_show_help("help-mpi-btl-openib.txt", + opal_show_help("help-mpi-btl-openib.txt", "ini file:unknown field", true, ini_filename, btl_openib_ini_yynewlines, key_buffer); @@ -510,7 +510,7 @@ static void reset_values(opal_btl_openib_ini_values_t *v) v->rdmacm_reject_causes_connect_error = false; v->rdmacm_reject_causes_connect_error_set = false; - v->ignore_device = false; + v->ignore_device = false; v->ignore_device_set = false; } diff --git a/opal/mca/btl/openib/btl_openib_mca.c b/opal/mca/btl/openib/btl_openib_mca.c index dea9cbde82c..1c3edc5a7e9 100644 --- a/opal/mca/btl/openib/btl_openib_mca.c +++ b/opal/mca/btl/openib/btl_openib_mca.c @@ -357,7 +357,7 @@ int btl_openib_register_mca_params(void) "InfiniBand outstanding atomic reads " "(must be >= 0)", 4, &mca_btl_openib_component.ib_qp_ous_rd_atom, 0)); - + asprintf(&msg, "OpenFabrics MTU, in bytes (if not specified in INI files). Valid values are: %d=256 bytes, %d=512 bytes, %d=1024 bytes, %d=2048 bytes, %d=4096 bytes", IBV_MTU_256, IBV_MTU_512, @@ -394,7 +394,7 @@ int btl_openib_register_mca_params(void) "InfiniBand transmit timeout, plugged into formula: 4.096 microseconds * (2^btl_openib_ib_timeout) " "(must be >= 0 and <= 31)", 20, &mca_btl_openib_component.ib_timeout, 0)); - + CHECK(reg_uint("ib_retry_count", NULL, "InfiniBand transmit retry count " "(must be >= 0 and <= 7)", @@ -493,7 +493,7 @@ int btl_openib_register_mca_params(void) &btl_openib_failover_enabled); if (0 > tmp) ret = tmp; #endif - + CHECK(reg_bool("enable_srq_resize", NULL, "Enable/Disable on demand SRQ resize. " "(0 = without resizing, nonzero = with resizing)", 1, @@ -823,13 +823,13 @@ int btl_openib_verify_mca_params (void) #endif #if BTL_OPENIB_MALLOC_HOOKS_ENABLED - if (mca_btl_openib_component.use_memalign != 32 + if (mca_btl_openib_component.use_memalign != 32 && mca_btl_openib_component.use_memalign != 64 - && mca_btl_openib_component.use_memalign != 0){ + && mca_btl_openib_component.use_memalign != 0){ opal_show_help("help-mpi-btl-openib.txt", "invalid mca param value", true, "Wrong btl_openib_memalign parameter value. Allowed values: 64, 32, 0.", "btl_openib_memalign is reset to 32"); - mca_btl_openib_component.use_memalign = 32; + mca_btl_openib_component.use_memalign = 32; } #endif diff --git a/opal/mca/btl/openib/configure.m4 b/opal/mca/btl/openib/configure.m4 index bbcca40757a..3ac6a85445b 100644 --- a/opal/mca/btl/openib/configure.m4 +++ b/opal/mca/btl/openib/configure.m4 @@ -139,11 +139,11 @@ AC_DEFUN([MCA_opal_btl_openib_CONFIG],[ [AC_MSG_RESULT([yes])]) AC_DEFINE_UNQUOTED(BTL_OPENIB_MALLOC_HOOKS_ENABLED, [$btl_openib_malloc_hooks_enabled], - [Whether the openib BTL malloc hooks are enabled]) + [Whether the openib BTL malloc hooks are enabled]) # make sure that CUDA-aware checks have been done AC_REQUIRE([OPAL_CHECK_CUDA]) - + # substitute in the things needed to build openib AC_SUBST([btl_openib_CFLAGS]) AC_SUBST([btl_openib_CPPFLAGS]) diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_base.c b/opal/mca/btl/openib/connect/btl_openib_connect_base.c index eadde149838..ca67d0f3635 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_base.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_base.c @@ -3,7 +3,7 @@ * Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Mellanox Technologies, Inc. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c b/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c index 3d47502b764..c1df5159ee4 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c @@ -5,7 +5,7 @@ * Copyright (c) 2009 Sandia National Laboratories. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * Copyright (c) 2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c index f34bf084d9b..3e8dcb70fa1 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c @@ -11,9 +11,9 @@ * Copyright (c) 2014 Bull SAS. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -287,7 +287,7 @@ static OBJ_CLASS_INSTANCE(udcm_message_sent_t, opal_list_item_t, /*--------------------------------------------------------------------*/ static void udcm_component_register(void); -static int udcm_component_query(mca_btl_openib_module_t *btl, +static int udcm_component_query(mca_btl_openib_module_t *btl, opal_btl_openib_connect_base_module_t **cpc); static int udcm_component_finalize(void); @@ -426,7 +426,7 @@ static void udcm_component_register(void) &udcm_max_retry); } -static int udcm_component_query(mca_btl_openib_module_t *btl, +static int udcm_component_query(mca_btl_openib_module_t *btl, opal_btl_openib_connect_base_module_t **cpc) { udcm_module_t *m = NULL; @@ -492,8 +492,8 @@ static int udcm_component_query(mca_btl_openib_module_t *btl, btl->port_num)); } else { BTL_VERBOSE(("unavailable for use on %s:%d; fatal error %d (%s)", - ibv_get_device_name(btl->device->ib_dev), - btl->port_num, rc, + ibv_get_device_name(btl->device->ib_dev), + btl->port_num, rc, opal_strerror(rc))); } @@ -609,7 +609,7 @@ static int udcm_endpoint_init_self (struct mca_btl_base_endpoint_t *lcl_ep) static int udcm_endpoint_init (struct mca_btl_base_endpoint_t *lcl_ep) { - udcm_endpoint_t *udep = lcl_ep->endpoint_local_cpc_data = + udcm_endpoint_t *udep = lcl_ep->endpoint_local_cpc_data = calloc(1, sizeof(udcm_endpoint_t)); if (NULL == udep) { BTL_ERROR(("malloc failed!")); @@ -634,7 +634,7 @@ static int udcm_endpoint_init (struct mca_btl_base_endpoint_t *lcl_ep) static int udcm_endpoint_finalize(struct mca_btl_base_endpoint_t *lcl_ep) { udcm_endpoint_t *udep = UDCM_ENDPOINT_DATA(lcl_ep); - + /* Free the stuff we allocated in udcm_endpoint_init */ if (NULL != udep) { if (udep->ah) { @@ -760,7 +760,7 @@ udcm_module_start_connect(opal_btl_openib_connect_base_module_t *cpc, udcm_endpoint_t *udep = UDCM_ENDPOINT_DATA(lcl_ep); int rc = OPAL_SUCCESS; - BTL_VERBOSE(("endpoint %p (lid %d, ep index %d)", + BTL_VERBOSE(("endpoint %p (lid %d, ep index %d)", (void*)lcl_ep, lcl_ep->endpoint_btl->port_info.lid, lcl_ep->index)); @@ -919,7 +919,7 @@ static int udcm_module_create_listen_qp (udcm_module_t *m) init_attr.cap.max_recv_wr = udcm_recv_count; init_attr.cap.max_send_wr = 1; - qp = ibv_create_qp(m->btl->device->ib_pd, &init_attr); + qp = ibv_create_qp(m->btl->device->ib_pd, &init_attr); if (NULL == qp) { BTL_VERBOSE(("could not create UD listen queue pair")); return OPAL_ERROR; @@ -938,7 +938,7 @@ static int udcm_module_create_listen_qp (udcm_module_t *m) BTL_ERROR(("error modifying qp to INIT errno says %s", strerror(errno))); return OPAL_ERROR; - } + } /* Move listen QP to RTR */ attr.qp_state = IBV_QPS_RTR; @@ -1335,7 +1335,7 @@ static int udcm_rc_qp_create_one(udcm_module_t *m, mca_btl_base_endpoint_t* lcl_ init_attr.send_cq = m->btl->device->ib_cq[BTL_OPENIB_LP_CQ]; init_attr.recv_cq = m->btl->device->ib_cq[qp_cq_prio(qp)]; init_attr.srq = srq; - init_attr.cap.max_inline_data = req_inline = + init_attr.cap.max_inline_data = req_inline = max_inline_size(qp, m->btl->device); init_attr.cap.max_send_sge = 1; init_attr.cap.max_recv_sge = 1; /* we do not use SG list */ @@ -1427,7 +1427,7 @@ static int udcm_rc_qp_create_all (mca_btl_base_endpoint_t *lcl_ep) pp_qp_num = 1; } - for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp) { + for (qp = 0; qp < mca_btl_openib_component.num_qps; ++qp) { struct ibv_srq *srq = NULL; uint32_t max_recv_wr, max_send_wr; int32_t rd_rsv, rd_num_credits; @@ -1441,7 +1441,7 @@ static int udcm_rc_qp_create_all (mca_btl_base_endpoint_t *lcl_ep) } if (BTL_OPENIB_QP_TYPE_PP(qp)) { - max_recv_wr = mca_btl_openib_component.qp_infos[qp].rd_num + + max_recv_wr = mca_btl_openib_component.qp_infos[qp].rd_num + rd_rsv; max_send_wr = mca_btl_openib_component.qp_infos[qp].rd_num + rd_num_credits; diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.h b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.h index db6a0762fe2..a0fc2b062bd 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.h +++ b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.h @@ -4,9 +4,9 @@ * right reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-base.txt b/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-base.txt index b0abf2193e8..18dc23cb6e4 100644 --- a/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-base.txt +++ b/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-base.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's OpenFabrics IB CPC @@ -21,7 +21,7 @@ support) will be disabled for this port. CPCs attempted: %s # [cpc name not found] -An invalid CPC name was specified via the btl_openib_cpc_%s MCA +An invalid CPC name was specified via the btl_openib_cpc_%s MCA parameter. Local host: %s diff --git a/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-rdmacm.txt b/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-rdmacm.txt index 65c35ed91a1..3c292643626 100644 --- a/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-rdmacm.txt +++ b/opal/mca/btl/openib/connect/help-mpi-btl-openib-cpc-rdmacm.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's OpenFabrics RDMA CM diff --git a/opal/mca/btl/portals4/Makefile.am b/opal/mca/btl/portals4/Makefile.am index 50fee3795a9..d7cc49eca3a 100644 --- a/opal/mca/btl/portals4/Makefile.am +++ b/opal/mca/btl/portals4/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2010-2012 Sandia National Laboratories. All rights reserved. # Copyright (c) 2014 Bull SAS. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/btl/portals4/btl_portals4.c b/opal/mca/btl/portals4/btl_portals4.c index 5b7b70eb5fd..a8826af861a 100644 --- a/opal/mca/btl/portals4/btl_portals4.c +++ b/opal/mca/btl/portals4/btl_portals4.c @@ -91,7 +91,7 @@ btl_portals4_init_interface(void) opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: PtlEQAlloc failed for NI %d: %d", __FILE__, __LINE__, interface, ret); - goto error; + goto error; } mca_btl_portals4_component.eqs_h[interface] = portals4_btl->recv_eq_h; OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, @@ -99,7 +99,7 @@ btl_portals4_init_interface(void) /* Create recv_idx portal table entry */ ret = PtlPTAlloc(portals4_btl->portals_ni_h, - PTL_PT_ONLY_USE_ONCE | + PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE, portals4_btl->recv_eq_h, REQ_BTL_TABLE_ID, @@ -108,7 +108,7 @@ btl_portals4_init_interface(void) opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: PtlPTAlloc failed for NI %d: %d", __FILE__, __LINE__, interface, ret); - goto error; + goto error; } OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, "PtlPTAlloc (recv_idx) OK for NI %d recv_idx=%d", interface, portals4_btl->recv_idx)); @@ -148,7 +148,7 @@ btl_portals4_init_interface(void) ret = PtlMDBind(portals4_btl->portals_ni_h, &md, - &portals4_btl->send_md_h); + &portals4_btl->send_md_h); if (PTL_OK != ret) { opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: PtlMDBind failed for NI %d: %d\n", @@ -541,7 +541,7 @@ mca_btl_portals4_register_mem(mca_btl_base_module_t *btl_base, opal_output_verbose(1, opal_btl_base_framework.framework_output, "%s:%d: PtlMEAppend failed: %d\n", __FILE__, __LINE__, ret); - OPAL_THREAD_ADD32(&portals4_btl->portals_outstanding_ops, -1); + OPAL_THREAD_ADD32(&portals4_btl->portals_outstanding_ops, -1); return NULL; } OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, diff --git a/opal/mca/btl/portals4/btl_portals4.h b/opal/mca/btl/portals4/btl_portals4.h index 9af415b5802..42f39d081d5 100644 --- a/opal/mca/btl/portals4/btl_portals4.h +++ b/opal/mca/btl/portals4/btl_portals4.h @@ -42,7 +42,7 @@ BEGIN_C_DECLS struct mca_btl_portals4_component_t { /* base BTL component */ mca_btl_base_component_2_0_0_t super; - + unsigned int num_btls; unsigned int max_btls; /* Maximum number of accepted Portals4 cards */ @@ -191,17 +191,17 @@ int mca_btl_portals4_del_procs(struct mca_btl_base_module_t* btl_base, struct opal_proc_t **procs, struct mca_btl_base_endpoint_t** peers); -mca_btl_base_descriptor_t* -mca_btl_portals4_alloc(struct mca_btl_base_module_t* btl_base, +mca_btl_base_descriptor_t* +mca_btl_portals4_alloc(struct mca_btl_base_module_t* btl_base, struct mca_btl_base_endpoint_t* endpoint, uint8_t order, size_t size, - uint32_t flags); + uint32_t flags); -int mca_btl_portals4_free(struct mca_btl_base_module_t* btl_base, - mca_btl_base_descriptor_t* des); +int mca_btl_portals4_free(struct mca_btl_base_module_t* btl_base, + mca_btl_base_descriptor_t* des); -mca_btl_base_descriptor_t* +mca_btl_base_descriptor_t* mca_btl_portals4_prepare_src(struct mca_btl_base_module_t* btl_base, struct mca_btl_base_endpoint_t* peer, struct opal_convertor_t* convertor, @@ -212,7 +212,7 @@ mca_btl_portals4_prepare_src(struct mca_btl_base_module_t* btl_base, int mca_btl_portals4_send(struct mca_btl_base_module_t* btl_base, struct mca_btl_base_endpoint_t* btl_peer, - struct mca_btl_base_descriptor_t* descriptor, + struct mca_btl_base_descriptor_t* descriptor, mca_btl_base_tag_t tag); @@ -224,7 +224,7 @@ int mca_btl_portals4_sendi(struct mca_btl_base_module_t* btl_base, size_t payload_size, uint8_t order, uint32_t flags, - mca_btl_base_tag_t tag, + mca_btl_base_tag_t tag, mca_btl_base_descriptor_t** des); int mca_btl_portals4_put(struct mca_btl_base_module_t* btl_base, diff --git a/opal/mca/btl/portals4/btl_portals4_component.c b/opal/mca/btl/portals4/btl_portals4_component.c index 33086c24e2e..9c1cffa38de 100644 --- a/opal/mca/btl/portals4/btl_portals4_component.c +++ b/opal/mca/btl/portals4/btl_portals4_component.c @@ -61,7 +61,7 @@ mca_btl_portals4_component_t mca_btl_portals4_component = { /* The component is not checkpoint ready */ .param_field = MCA_BASE_METADATA_PARAM_NONE }, - + .btl_init = mca_btl_portals4_component_init, .btl_progress = mca_btl_portals4_component_progress, } @@ -435,7 +435,7 @@ static mca_btl_base_module_t** mca_btl_portals4_component_init(int *num_btls, ptl_process_ids = NULL; btls = malloc(mca_btl_portals4_component.num_btls * sizeof(mca_btl_portals4_module_t*) ); - memcpy(btls , mca_btl_portals4_component.btls, + memcpy(btls , mca_btl_portals4_component.btls, mca_btl_portals4_component.num_btls*sizeof(mca_btl_portals4_module_t*) ); opal_output_verbose(1, opal_btl_base_framework.framework_output, "The btl portals4 component has been initialized and uses %d NI(s)", @@ -716,7 +716,7 @@ mca_btl_portals4_component_progress(void) frag->md_h = PTL_INVALID_HANDLE; OPAL_BTL_PORTALS4_FRAG_RETURN_USER(&portals4_btl->super, frag); - OPAL_THREAD_ADD32(&portals4_btl->portals_outstanding_ops, -1); + OPAL_THREAD_ADD32(&portals4_btl->portals_outstanding_ops, -1); OPAL_OUTPUT_VERBOSE((90, opal_btl_base_framework.framework_output, "PTL_EVENT_REPLY: Decrementing portals_outstanding_ops=%d\n", portals4_btl->portals_outstanding_ops)); goto done; diff --git a/opal/mca/btl/portals4/btl_portals4_frag.c b/opal/mca/btl/portals4/btl_portals4_frag.c index 5358553c4a1..6aa20a14af4 100644 --- a/opal/mca/btl/portals4/btl_portals4_frag.c +++ b/opal/mca/btl/portals4/btl_portals4_frag.c @@ -5,27 +5,27 @@ * 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, + * 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) 2008 UT-Battelle, LLC. All rights reserved. * Copyright (c) 2014 Bull SAS. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "opal_config.h" -#include "btl_portals4.h" -#include "btl_portals4_frag.h" +#include "btl_portals4.h" +#include "btl_portals4_frag.h" static void -mca_btl_portals4_frag_common_send_constructor(mca_btl_portals4_frag_t* frag) -{ +mca_btl_portals4_frag_common_send_constructor(mca_btl_portals4_frag_t* frag) +{ frag->base.des_flags = 0; frag->base.des_segments = &frag->segments[0].base; frag->base.des_segment_count = 2; @@ -38,10 +38,10 @@ mca_btl_portals4_frag_common_send_constructor(mca_btl_portals4_frag_t* frag) } static void -mca_btl_portals4_frag_eager_constructor(mca_btl_portals4_frag_t* frag) -{ - frag->size = mca_btl_portals4_module.super.btl_eager_limit; - mca_btl_portals4_frag_common_send_constructor(frag); +mca_btl_portals4_frag_eager_constructor(mca_btl_portals4_frag_t* frag) +{ + frag->size = mca_btl_portals4_module.super.btl_eager_limit; + mca_btl_portals4_frag_common_send_constructor(frag); frag->type = BTL_PORTALS4_FRAG_TYPE_EAGER; } @@ -55,41 +55,41 @@ mca_btl_portals4_frag_eager_destructor(mca_btl_portals4_frag_t* frag) } static void -mca_btl_portals4_frag_max_constructor(mca_btl_portals4_frag_t* frag) -{ - frag->size = mca_btl_portals4_module.super.btl_max_send_size; - mca_btl_portals4_frag_common_send_constructor(frag); +mca_btl_portals4_frag_max_constructor(mca_btl_portals4_frag_t* frag) +{ + frag->size = mca_btl_portals4_module.super.btl_max_send_size; + mca_btl_portals4_frag_common_send_constructor(frag); frag->type = BTL_PORTALS4_FRAG_TYPE_MAX; } static void -mca_btl_portals4_frag_user_constructor(mca_btl_portals4_frag_t* frag) -{ +mca_btl_portals4_frag_user_constructor(mca_btl_portals4_frag_t* frag) +{ frag->base.des_flags = 0; - frag->size = 0; + frag->size = 0; frag->type = BTL_PORTALS4_FRAG_TYPE_USER; } OBJ_CLASS_INSTANCE( - mca_btl_portals4_frag_t, - mca_btl_base_descriptor_t, - NULL, - NULL); + mca_btl_portals4_frag_t, + mca_btl_base_descriptor_t, + NULL, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_portals4_frag_eager_t, - mca_btl_base_descriptor_t, - mca_btl_portals4_frag_eager_constructor, + mca_btl_portals4_frag_eager_t, + mca_btl_base_descriptor_t, + mca_btl_portals4_frag_eager_constructor, mca_btl_portals4_frag_eager_destructor); OBJ_CLASS_INSTANCE( - mca_btl_portals4_frag_max_t, - mca_btl_base_descriptor_t, - mca_btl_portals4_frag_max_constructor, - NULL); + mca_btl_portals4_frag_max_t, + mca_btl_base_descriptor_t, + mca_btl_portals4_frag_max_constructor, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_portals4_frag_user_t, - mca_btl_base_descriptor_t, - mca_btl_portals4_frag_user_constructor, - NULL); + mca_btl_portals4_frag_user_t, + mca_btl_base_descriptor_t, + mca_btl_portals4_frag_user_constructor, + NULL); diff --git a/opal/mca/btl/portals4/btl_portals4_frag.h b/opal/mca/btl/portals4/btl_portals4_frag.h index 814a80a82ee..76c610c8de1 100644 --- a/opal/mca/btl/portals4/btl_portals4_frag.h +++ b/opal/mca/btl/portals4/btl_portals4_frag.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * All rights reserved. * Copyright (c) 2014 Bull SAS. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ BEGIN_C_DECLS struct mca_btl_portals4_segment_t { - mca_btl_base_segment_t base; + mca_btl_base_segment_t base; ptl_match_bits_t key; }; typedef struct mca_btl_portals4_segment_t mca_btl_portals4_segment_t; @@ -37,10 +37,10 @@ typedef struct mca_btl_portals4_segment_t mca_btl_portals4_segment_t; * Portals send fragment derived type */ struct mca_btl_portals4_frag_t { - mca_btl_base_descriptor_t base; - mca_btl_portals4_segment_t segments[1]; + mca_btl_base_descriptor_t base; + mca_btl_portals4_segment_t segments[1]; /* needed for retransmit case */ - struct mca_btl_base_endpoint_t *endpoint; + struct mca_btl_base_endpoint_t *endpoint; /* needed for retransmit case */ mca_btl_base_header_t hdr; /* handle to use for communication */ @@ -49,7 +49,7 @@ struct mca_btl_portals4_frag_t { ptl_handle_md_t md_h; /* size of the allocated memory region -- not the amount of data we need to send */ - size_t size; + size_t size; /* match bits for retransmit case */ ptl_match_bits_t match_bits; /* length for retransmit case */ @@ -65,22 +65,22 @@ struct mca_btl_portals4_frag_t { mca_btl_base_registration_handle_t *local_handle; } rdma_cb; - enum { BTL_PORTALS4_FRAG_TYPE_EAGER, + enum { BTL_PORTALS4_FRAG_TYPE_EAGER, BTL_PORTALS4_FRAG_TYPE_MAX, BTL_PORTALS4_FRAG_TYPE_USER } type; unsigned char data[16]; }; -typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_t; +typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_t; OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_t); -typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_eager_t; -OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_eager_t); +typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_eager_t; +OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_eager_t); -typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_max_t; -OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_max_t); +typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_max_t; +OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_max_t); -typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_user_t; -OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_user_t); +typedef struct mca_btl_portals4_frag_t mca_btl_portals4_frag_user_t; +OBJ_CLASS_DECLARATION(mca_btl_portals4_frag_user_t); /* * Macros to allocate/return descriptors from module specific diff --git a/opal/mca/btl/portals4/btl_portals4_rdma.c b/opal/mca/btl/portals4/btl_portals4_rdma.c index 76898a41e11..1ff765b98aa 100644 --- a/opal/mca/btl/portals4/btl_portals4_rdma.c +++ b/opal/mca/btl/portals4/btl_portals4_rdma.c @@ -5,16 +5,16 @@ * 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, + * 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) 2008 UT-Battelle, LLC. All rights reserved. * Copyright (c) 2014 Bull SAS. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/btl/portals4/btl_portals4_recv.c b/opal/mca/btl/portals4/btl_portals4_recv.c index f557975e3cc..c8dbfa3cc26 100644 --- a/opal/mca/btl/portals4/btl_portals4_recv.c +++ b/opal/mca/btl/portals4/btl_portals4_recv.c @@ -5,15 +5,15 @@ * 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, + * 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) 2014 Bull SAS. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/btl/portals4/btl_portals4_recv.h b/opal/mca/btl/portals4/btl_portals4_recv.h index 5375fb75ff4..be7e98ca7cf 100644 --- a/opal/mca/btl/portals4/btl_portals4_recv.h +++ b/opal/mca/btl/portals4/btl_portals4_recv.h @@ -5,15 +5,15 @@ * 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, + * 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) 2014 Bull SAS. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -21,19 +21,19 @@ #define OPAL_BTL_PORTALS4_RECV_H #include "btl_portals4_frag.h" - + struct mca_btl_portals4_recv_block_t { opal_list_item_t base; - + mca_btl_portals4_module_t *btl; - - void *start; + + void *start; size_t length; ptl_handle_me_t me_h; volatile bool full; volatile int32_t pending; -}; +}; typedef struct mca_btl_portals4_recv_block_t mca_btl_portals4_recv_block_t; OBJ_CLASS_DECLARATION(mca_btl_portals4_recv_block_t); @@ -85,7 +85,7 @@ mca_btl_portals4_activate_block(mca_btl_portals4_recv_block_t *block) me.options = PTL_ME_OP_PUT | PTL_ME_MANAGE_LOCAL | - PTL_ME_EVENT_LINK_DISABLE | + PTL_ME_EVENT_LINK_DISABLE | PTL_ME_MAY_ALIGN; if (mca_btl_portals4_component.use_logical) { diff --git a/opal/mca/btl/portals4/btl_portals4_send.c b/opal/mca/btl/portals4/btl_portals4_send.c index 0b50a20337e..1f50fb2ef58 100644 --- a/opal/mca/btl/portals4/btl_portals4_send.c +++ b/opal/mca/btl/portals4/btl_portals4_send.c @@ -5,19 +5,19 @@ * 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, + * 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) 2008 UT-Battelle, LLC. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Bull SAS. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -29,7 +29,7 @@ int mca_btl_portals4_send(struct mca_btl_base_module_t* btl_base, struct mca_btl_base_endpoint_t* endpoint, - struct mca_btl_base_descriptor_t* descriptor, + struct mca_btl_base_descriptor_t* descriptor, mca_btl_base_tag_t tag) { struct mca_btl_portals4_module_t* portals4_btl = (struct mca_btl_portals4_module_t*) btl_base; @@ -62,7 +62,7 @@ int mca_btl_portals4_send(struct mca_btl_base_module_t* btl_base, OPAL_OUTPUT_VERBOSE((50, opal_btl_base_framework.framework_output, "PtlPut frag=%p rank=%x pid=%x tag=%x len=%ld match_bits=%lx\n", - (void*)frag, endpoint->ptl_proc.rank, endpoint->ptl_proc.phys.pid, tag, + (void*)frag, endpoint->ptl_proc.rank, endpoint->ptl_proc.phys.pid, tag, put_length, (uint64_t)match_bits)); ret = PtlPut(portals4_btl->send_md_h, @@ -96,7 +96,7 @@ int mca_btl_portals4_sendi(struct mca_btl_base_module_t* btl_base, size_t payload_size, uint8_t order, uint32_t flags, - mca_btl_base_tag_t tag, + mca_btl_base_tag_t tag, mca_btl_base_descriptor_t** des) { opal_output(opal_btl_base_framework.framework_output, "mca_btl_portals_sendi is not implemented"); diff --git a/opal/mca/btl/portals4/configure.m4 b/opal/mca/btl/portals4/configure.m4 index 7ad3a3a0655..cc7c0dbda2c 100644 --- a/opal/mca/btl/portals4/configure.m4 +++ b/opal/mca/btl/portals4/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,13 +14,13 @@ # Copyright (c) 2010 Sandia National Laboratories. All rights reserved. # Copyright (c) 2014 Bull SAS. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # -# MCA_btl_portals4_CONFIG(action-if-can-compile, +# MCA_btl_portals4_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_btl_portals4_CONFIG],[ diff --git a/opal/mca/btl/scif/Makefile.am b/opal/mca/btl/scif/Makefile.am index 4a0ea7da322..da1c9f7f5a7 100644 --- a/opal/mca/btl/scif/Makefile.am +++ b/opal/mca/btl/scif/Makefile.am @@ -2,9 +2,9 @@ # # Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights # reserved. -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -39,7 +39,7 @@ mcacomponentdir = $(opallibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_btl_scif_la_SOURCES = $(scif_SOURCES) nodist_mca_btl_scif_la_SOURCES = $(scif_nodist_SOURCES) -mca_btl_scif_la_LIBADD = $(btl_scif_LIBS) +mca_btl_scif_la_LIBADD = $(btl_scif_LIBS) mca_btl_scif_la_LDFLAGS = -module -avoid-version $(btl_scif_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) diff --git a/opal/mca/btl/scif/btl_scif.h b/opal/mca/btl/scif/btl_scif.h index 496f508e31b..a9ed8aeea8d 100644 --- a/opal/mca/btl/scif/btl_scif.h +++ b/opal/mca/btl/scif/btl_scif.h @@ -133,7 +133,7 @@ typedef struct mca_btl_scif_component_t { int mca_btl_scif_module_init (void); /** - * BML->BTL notification of change in the process list. + * BML->BTL notification of change in the process list. * * location: btl_scif_add_procs.c * @@ -240,7 +240,7 @@ typedef struct mca_btl_scif_reg_t { mca_btl_scif_registration_handle_t *handles; } mca_btl_scif_reg_t; -/* Global structures */ +/* Global structures */ OPAL_MODULE_DECLSPEC extern mca_btl_scif_component_t mca_btl_scif_component; OPAL_MODULE_DECLSPEC extern mca_btl_scif_module_t mca_btl_scif_module; diff --git a/opal/mca/btl/scif/btl_scif_endpoint.h b/opal/mca/btl/scif/btl_scif_endpoint.h index 39b6782a478..9e060e9a2fb 100644 --- a/opal/mca/btl/scif/btl_scif_endpoint.h +++ b/opal/mca/btl/scif/btl_scif_endpoint.h @@ -10,7 +10,7 @@ * $HEADER$ */ -#ifndef MCA_BTL_SCIF_ENDPOINT_H +#ifndef MCA_BTL_SCIF_ENDPOINT_H #define MCA_BTL_SCIF_ENDPOINT_H #include "btl_scif.h" diff --git a/opal/mca/btl/scif/btl_scif_get.c b/opal/mca/btl/scif/btl_scif_get.c index 131352b3276..3b68dfe8c95 100644 --- a/opal/mca/btl/scif/btl_scif_get.c +++ b/opal/mca/btl/scif/btl_scif_get.c @@ -41,7 +41,7 @@ int mca_btl_scif_get (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t roffset = remote_handle->scif_offset + (off_t)(remote_address - remote_handle->scif_base); loffset = local_handle->scif_offset + (off_t)((intptr_t)local_address - local_handle->scif_base); - + if (mca_btl_scif_component.rma_use_cpu) { scif_flags = SCIF_RMA_USECPU; } diff --git a/opal/mca/btl/scif/btl_scif_send.c b/opal/mca/btl/scif/btl_scif_send.c index e7109b59ed3..008e23b439c 100644 --- a/opal/mca/btl/scif/btl_scif_send.c +++ b/opal/mca/btl/scif/btl_scif_send.c @@ -107,7 +107,7 @@ static void mark_buffer (struct mca_btl_base_endpoint_t *endpoint) endpoint->send_buffer.start = endpoint->send_buffer.startp[0]; } else { MB(); - endpoint->send_buffer.endp[0] = endpoint->send_buffer.end; + endpoint->send_buffer.endp[0] = endpoint->send_buffer.end; } } diff --git a/opal/mca/btl/scif/owner.txt b/opal/mca/btl/scif/owner.txt index 98709a8170b..30615e90eb7 100644 --- a/opal/mca/btl/scif/owner.txt +++ b/opal/mca/btl/scif/owner.txt @@ -1,5 +1,5 @@ # -# owner/status file +# owner/status file # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # diff --git a/opal/mca/btl/self/Makefile.am b/opal/mca/btl/self/Makefile.am index 4cecee7c6cf..e35fb91d803 100644 --- a/opal/mca/btl/self/Makefile.am +++ b/opal/mca/btl/self/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # @@ -22,7 +22,7 @@ libmca_btl_self_la_sources = \ btl_self.h \ btl_self_component.c \ btl_self_frag.c \ - btl_self_frag.h + btl_self_frag.h # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/opal/mca/btl/self/btl_self.c b/opal/mca/btl/self/btl_self.c index 26f2a88f8ed..5ed684e15eb 100644 --- a/opal/mca/btl/self/btl_self.c +++ b/opal/mca/btl/self/btl_self.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,9 +64,9 @@ mca_btl_base_module_t mca_btl_self = { }; -int mca_btl_self_add_procs( struct mca_btl_base_module_t* btl, - size_t nprocs, - struct opal_proc_t **procs, +int mca_btl_self_add_procs( struct mca_btl_base_module_t* btl, + size_t nprocs, + struct opal_proc_t **procs, struct mca_btl_base_endpoint_t **peers, opal_bitmap_t* reachability ) { @@ -82,9 +82,9 @@ int mca_btl_self_add_procs( struct mca_btl_base_module_t* btl, } -int mca_btl_self_del_procs( struct mca_btl_base_module_t* btl, +int mca_btl_self_del_procs( struct mca_btl_base_module_t* btl, size_t nprocs, - struct opal_proc_t **procs, + struct opal_proc_t **procs, struct mca_btl_base_endpoint_t **peers ) { return OPAL_SUCCESS; @@ -131,16 +131,16 @@ mca_btl_base_descriptor_t* mca_btl_self_alloc( MCA_BTL_SELF_FRAG_ALLOC_SEND(frag); } if( OPAL_UNLIKELY(NULL == frag) ) { - return NULL; + return NULL; } - + frag->segment.seg_len = size; frag->base.des_flags = flags; frag->base.des_segments = &(frag->segment); frag->base.des_segment_count = 1; return (mca_btl_base_descriptor_t*)frag; } - + /** * Return a segment allocated by this BTL. * @@ -198,7 +198,7 @@ mca_btl_self_prepare_src( struct mca_btl_base_module_t* btl, if(reserve + max_data > frag->size) { max_data = frag->size - reserve; - } + } iov.iov_len = max_data; iov.iov_base = (IOVBASE_TYPE*)((unsigned char*)(frag+1) + reserve); @@ -234,7 +234,7 @@ mca_btl_self_prepare_src( struct mca_btl_base_module_t* btl, return &frag->base; } - + /** * Initiate a send to the peer. * diff --git a/opal/mca/btl/self/btl_self.h b/opal/mca/btl/self/btl_self.h index b61a167f5da..7b4d9a956de 100644 --- a/opal/mca/btl/self/btl_self.h +++ b/opal/mca/btl/self/btl_self.h @@ -6,16 +6,16 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -32,7 +32,7 @@ #endif /* HAVE_SYS_TYPES_H */ #include "opal/mca/event/event.h" #include "opal/mca/btl/btl.h" -#include "opal/mca/btl/base/base.h" +#include "opal/mca/btl/base/base.h" BEGIN_C_DECLS @@ -64,14 +64,14 @@ int mca_btl_self_component_close(void); /** * SELF module initialization. - * + * * @param num_btls (OUT) Number of BTLs returned in BTL array. * @param enable_progress_threads (IN) Flag indicating whether BTL is allowed to have progress threads * @param enable_mpi_threads (IN) Flag indicating whether BTL must support multilple simultaneous invocations from different threads * */ mca_btl_base_module_t** mca_btl_self_component_init( - int *num_btls, + int *num_btls, bool enable_progress_threads, bool enable_mpi_threads ); @@ -81,7 +81,7 @@ extern mca_btl_base_module_t mca_btl_self; /** * Cleanup any resources held by the BTL. - * + * * @param btl BTL instance. * @return OPAL_SUCCESS or error status on failure. */ @@ -97,12 +97,12 @@ int mca_btl_self_finalize( * Called for message that is send from process with the virtual * address of the shared memory segment being different than that of * the receiver. - * + * * @param btl (IN) - * @param proc (IN) + * @param proc (IN) * @param peer (OUT) * @return OPAL_SUCCESS or error status on failure. - * + * */ int mca_btl_self_add_procs( @@ -155,7 +155,7 @@ int mca_btl_self_free( struct mca_btl_base_module_t* btl, mca_btl_base_descriptor_t* segment ); - + /** * Pack data * @@ -171,7 +171,7 @@ struct mca_btl_base_descriptor_t* mca_btl_self_prepare_src( size_t* size, uint32_t flags ); - + /** * Initiate a send to the peer. * diff --git a/opal/mca/btl/self/btl_self_component.c b/opal/mca/btl/self/btl_self_component.c index f04f41fff0b..78e400ea6ef 100644 --- a/opal/mca/btl/self/btl_self_component.c +++ b/opal/mca/btl/self/btl_self_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "opal_config.h" @@ -36,7 +36,7 @@ static int mca_btl_self_component_register(void); /* - * Shared Memory (SELF) component instance. + * Shared Memory (SELF) component instance. */ mca_btl_self_component_t mca_btl_self_component = { @@ -136,7 +136,7 @@ int mca_btl_self_component_close(void) /* * SELF component initialization */ -mca_btl_base_module_t** mca_btl_self_component_init( int *num_btls, +mca_btl_base_module_t** mca_btl_self_component_init( int *num_btls, bool enable_progress_threads, bool enable_mpi_threads ) { diff --git a/opal/mca/btl/self/btl_self_endpoint.h b/opal/mca/btl/self/btl_self_endpoint.h index 6ef32fa79bf..a85eeb3988e 100644 --- a/opal/mca/btl/self/btl_self_endpoint.h +++ b/opal/mca/btl/self/btl_self_endpoint.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** @@ -27,7 +27,7 @@ /** * An abstraction that represents a connection to a endpoint process. - * An instance of mca_ptl_base_endpoint_t is associated w/ each process + * An instance of mca_ptl_base_endpoint_t is associated w/ each process * and BTL pair at startup. */ diff --git a/opal/mca/btl/self/btl_self_frag.h b/opal/mca/btl/self/btl_self_frag.h index 6116322ec51..920a3818720 100644 --- a/opal/mca/btl/self/btl_self_frag.h +++ b/opal/mca/btl/self/btl_self_frag.h @@ -6,16 +6,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** diff --git a/opal/mca/btl/sm/Makefile.am b/opal/mca/btl/sm/Makefile.am index 5e33da0f868..06a064751b9 100644 --- a/opal/mca/btl/sm/Makefile.am +++ b/opal/mca/btl/sm/Makefile.am @@ -5,16 +5,16 @@ # Copyright (c) 2004-2009 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,7 +27,7 @@ libmca_btl_sm_la_sources = \ btl_sm_endpoint.h \ btl_sm_fifo.h \ btl_sm_frag.c \ - btl_sm_frag.h + btl_sm_frag.h # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/opal/mca/btl/sm/btl_sm.c b/opal/mca/btl/sm/btl_sm.c index 1179c3ddb21..687dbfb2dde 100644 --- a/opal/mca/btl/sm/btl_sm.c +++ b/opal/mca/btl/sm/btl_sm.c @@ -13,7 +13,7 @@ * Copyright (c) 2006-2007 Voltaire. All rights reserved. * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2015 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2010-2012 IBM Corporation. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. @@ -404,7 +404,7 @@ sm_btl_first_time_init(mca_btl_sm_t *sm_btl, mca_btl_sm_component.sm_free_list_inc, mca_btl_sm_component.sm_mpool, 0, NULL, NULL, NULL); if ( OPAL_SUCCESS != i ) - return i; + return i; mca_btl_sm_component.num_outstanding_frags = 0; @@ -1085,7 +1085,7 @@ int mca_btl_sm_get_sync (mca_btl_base_module_t *btl, struct mca_btl_base_endpoin if (OPAL_LIKELY(mca_btl_sm_component.use_knem)) { struct knem_cmd_inline_copy icopy; struct knem_cmd_param_iovec recv_iovec; - + /* Fill in the ioctl data fields. There's no async completion, so we don't need to worry about getting a slot, etc. */ recv_iovec.base = (uintptr_t) local_address; @@ -1167,7 +1167,7 @@ int mca_btl_sm_get_async (mca_btl_base_module_t *btl, struct mca_btl_base_endpoi mca_btl_sm_frag_t* frag; struct knem_cmd_inline_copy icopy; struct knem_cmd_param_iovec recv_iovec; - + /* If we have no knem slots available, fall back to synchronous */ if (sm_btl->knem_status_num_used >= mca_btl_sm_component.knem_max_simultaneous) { @@ -1197,7 +1197,7 @@ int mca_btl_sm_get_async (mca_btl_base_module_t *btl, struct mca_btl_base_endpoi icopy.local_iovec_nr = 1; icopy.write = 0; icopy.async_status_index = sm_btl->knem_status_first_avail++; - if (sm_btl->knem_status_first_avail >= + if (sm_btl->knem_status_first_avail >= mca_btl_sm_component.knem_max_simultaneous) { sm_btl->knem_status_first_avail = 0; } @@ -1213,7 +1213,7 @@ int mca_btl_sm_get_async (mca_btl_base_module_t *btl, struct mca_btl_base_endpoi } sm_btl->knem_frag_array[icopy.async_status_index] = frag; - if (OPAL_LIKELY(0 == ioctl(sm_btl->knem_fd, + if (OPAL_LIKELY(0 == ioctl(sm_btl->knem_fd, KNEM_CMD_INLINE_COPY, &icopy))) { if (icopy.current_status != KNEM_STATUS_PENDING) { MCA_BTL_SM_FRAG_RETURN(frag); @@ -1248,15 +1248,15 @@ void mca_btl_sm_dump(struct mca_btl_base_module_t* btl, if( NULL != endpoint ) { mca_btl_base_err("BTL SM %p endpoint %p [smp_rank %d] [peer_rank %d]\n", - (void*) btl, (void*) endpoint, + (void*) btl, (void*) endpoint, endpoint->my_smp_rank, endpoint->peer_smp_rank); for(item = opal_list_get_first(&endpoint->pending_sends); - item != opal_list_get_end(&endpoint->pending_sends); + item != opal_list_get_end(&endpoint->pending_sends); item = opal_list_get_next(item)) { frag = (mca_btl_sm_frag_t*)item; mca_btl_base_err(" | frag %p size %lu (hdr frag %p len %lu rank %d tag %d)\n", (void*) frag, frag->size, (void*) frag->hdr->frag, - frag->hdr->len, frag->hdr->my_smp_rank, + frag->hdr->len, frag->hdr->my_smp_rank, frag->hdr->tag); } } diff --git a/opal/mca/btl/sm/btl_sm.h b/opal/mca/btl/sm/btl_sm.h index 77a8df7a3fc..d3d2606b9a9 100644 --- a/opal/mca/btl/sm/btl_sm.h +++ b/opal/mca/btl/sm/btl_sm.h @@ -13,7 +13,7 @@ * Copyright (c) 2006-2007 Voltaire. All rights reserved. * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2015 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2010-2012 IBM Corporation. All rights reserved. * $COPYRIGHT$ * @@ -85,23 +85,23 @@ BEGIN_C_DECLS struct sm_fifo_t { /* This queue pointer is used only by the heads. */ - volatile void **queue; + volatile void **queue; char pad0[SM_CACHE_LINE_PAD - sizeof(void **)]; /* This lock is used by the heads. */ - opal_atomic_lock_t head_lock; + opal_atomic_lock_t head_lock; char pad1[SM_CACHE_LINE_PAD - sizeof(opal_atomic_lock_t)]; /* This index is used by the head holding the head lock. */ - volatile int head; + volatile int head; char pad2[SM_CACHE_LINE_PAD - sizeof(int)]; /* This mask is used "read only" by all processes. */ - unsigned int mask; + unsigned int mask; char pad3[SM_CACHE_LINE_PAD - sizeof(int)]; /* The following are used only by the tail. */ volatile void **queue_recv; opal_atomic_lock_t tail_lock; volatile int tail; int num_to_clear; - int lazy_free; + int lazy_free; char pad4[SM_CACHE_LINE_PAD - sizeof(void **) - sizeof(opal_atomic_lock_t) - sizeof(int) * 3]; @@ -167,7 +167,7 @@ struct mca_btl_sm_component_t { int num_pending_sends; /**< total number on all of my pending-send queues */ int mem_node; int num_mem_nodes; - + #if OPAL_ENABLE_PROGRESS_THREADS == 1 char sm_fifo_path[PATH_MAX]; /**< path to fifo used to signal this process */ int sm_fifo_fd; /**< file descriptor corresponding to opened fifo */ diff --git a/opal/mca/btl/sm/btl_sm_component.c b/opal/mca/btl/sm/btl_sm_component.c index 791d6080855..5dee6205848 100644 --- a/opal/mca/btl/sm/btl_sm_component.c +++ b/opal/mca/btl/sm/btl_sm_component.c @@ -332,7 +332,7 @@ static int mca_btl_sm_component_close(void) mca_btl_sm.knem_frag_array = NULL; } if (NULL != mca_btl_sm.knem_status_array) { - munmap(mca_btl_sm.knem_status_array, + munmap(mca_btl_sm.knem_status_array, mca_btl_sm_component.knem_max_simultaneous); mca_btl_sm.knem_status_array = NULL; } @@ -398,7 +398,7 @@ static int mca_btl_sm_component_close(void) #endif CLEANUP: - + #if OPAL_CUDA_SUPPORT mca_common_cuda_fini(); #endif /* OPAL_CUDA_SUPPORT */ @@ -407,7 +407,7 @@ static int mca_btl_sm_component_close(void) return return_value; } -/* +/* * Returns the number of processes on the node. */ static inline int @@ -978,7 +978,7 @@ mca_btl_sm_component_init(int *num_btls, mca_btl_sm.knem_frag_array = NULL; } if (NULL != mca_btl_sm.knem_status_array) { - munmap(mca_btl_sm.knem_status_array, + munmap(mca_btl_sm.knem_status_array, mca_btl_sm_component.knem_max_simultaneous); mca_btl_sm.knem_status_array = NULL; } @@ -1032,22 +1032,22 @@ void mca_btl_sm_component_event_thread(opal_object_t* thread) } #endif -void btl_sm_process_pending_sends(struct mca_btl_base_endpoint_t *ep) -{ - btl_sm_pending_send_item_t *si; - int rc; +void btl_sm_process_pending_sends(struct mca_btl_base_endpoint_t *ep) +{ + btl_sm_pending_send_item_t *si; + int rc; while ( 0 < opal_list_get_size(&ep->pending_sends) ) { /* Note that we access the size of ep->pending_sends unlocked - as it doesn't really matter if the result is wrong as + as it doesn't really matter if the result is wrong as opal_list_remove_first is called with a lock and we handle it not finding an item to process */ OPAL_THREAD_LOCK(&ep->endpoint_lock); - si = (btl_sm_pending_send_item_t*)opal_list_remove_first(&ep->pending_sends); + si = (btl_sm_pending_send_item_t*)opal_list_remove_first(&ep->pending_sends); OPAL_THREAD_UNLOCK(&ep->endpoint_lock); if(NULL == si) return; /* Another thread got in before us. Thats ok. */ - + OPAL_THREAD_ADD32(&mca_btl_sm_component.num_pending_sends, -1); MCA_BTL_SM_FIFO_WRITE(ep, ep->my_smp_rank, ep->peer_smp_rank, si->data, @@ -1058,7 +1058,7 @@ void btl_sm_process_pending_sends(struct mca_btl_base_endpoint_t *ep) if ( OPAL_SUCCESS != rc ) return; } -} +} int mca_btl_sm_component_progress(void) { @@ -1210,13 +1210,13 @@ int mca_btl_sm_component_progress(void) return nevents; } while (mca_btl_sm.knem_status_num_used > 0 && - KNEM_STATUS_PENDING != + KNEM_STATUS_PENDING != mca_btl_sm.knem_status_array[mca_btl_sm.knem_status_first_used]) { - if (KNEM_STATUS_SUCCESS == + if (KNEM_STATUS_SUCCESS == mca_btl_sm.knem_status_array[mca_btl_sm.knem_status_first_used]) { /* Handle the completed fragment */ - frag = + frag = mca_btl_sm.knem_frag_array[mca_btl_sm.knem_status_first_used]; frag->cb.func (&mca_btl_sm.super, frag->endpoint, frag->cb.local_address, frag->cb.local_handle, @@ -1228,7 +1228,7 @@ int mca_btl_sm_component_progress(void) ++nevents; --mca_btl_sm.knem_status_num_used; ++mca_btl_sm.knem_status_first_used; - if (mca_btl_sm.knem_status_first_used >= + if (mca_btl_sm.knem_status_first_used >= mca_btl_sm_component.knem_max_simultaneous) { mca_btl_sm.knem_status_first_used = 0; } diff --git a/opal/mca/btl/sm/help-mpi-btl-sm.txt b/opal/mca/btl/sm/help-mpi-btl-sm.txt index 601d3e46315..3cb288cd0da 100644 --- a/opal/mca/btl/sm/help-mpi-btl-sm.txt +++ b/opal/mca/btl/sm/help-mpi-btl-sm.txt @@ -7,9 +7,9 @@ # Copyright (c) 2012-2013 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's shared memory support. diff --git a/opal/mca/btl/smcuda/Makefile.am b/opal/mca/btl/smcuda/Makefile.am index 271c07c2f84..077ddc792f4 100644 --- a/opal/mca/btl/smcuda/Makefile.am +++ b/opal/mca/btl/smcuda/Makefile.am @@ -5,16 +5,16 @@ # Copyright (c) 2004-2009 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,7 +27,7 @@ libmca_btl_smcuda_la_sources = \ btl_smcuda_endpoint.h \ btl_smcuda_fifo.h \ btl_smcuda_frag.c \ - btl_smcuda_frag.h + btl_smcuda_frag.h # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/opal/mca/btl/smcuda/README b/opal/mca/btl/smcuda/README index b978f762107..8b9bcf91296 100644 --- a/opal/mca/btl/smcuda/README +++ b/opal/mca/btl/smcuda/README @@ -34,7 +34,7 @@ with the OB1 PML and uses flags that it sends in the BML layer. OTHER CONSIDERATIONS CUDA IPC is not necessarily supported by all GPUs on a node. In NUMA -nodes, CUDA IPC may only work between GPUs that are not connected +nodes, CUDA IPC may only work between GPUs that are not connected over the IOH. In addition, we want to check for CUDA IPC support lazily, when the first GPU access occurs, rather than during MPI_Init() time. This complicates the design. diff --git a/opal/mca/btl/smcuda/btl_smcuda.c b/opal/mca/btl/smcuda/btl_smcuda.c index 1952ffd5572..29bac3b3b31 100644 --- a/opal/mca/btl/smcuda/btl_smcuda.c +++ b/opal/mca/btl/smcuda/btl_smcuda.c @@ -13,7 +13,7 @@ * Copyright (c) 2006-2007 Voltaire. All rights reserved. * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2015 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2012-2015 NVIDIA Corporation. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science @@ -336,7 +336,7 @@ smcuda_btl_first_time_init(mca_btl_smcuda_t *smcuda_btl, #if OPAL_CUDA_SUPPORT /* Register the entire shared memory region with the CUDA library which will * force it to be pinned. This aproach was chosen as there is no way for this - * local process to know which parts of the memory are being utilized by a + * local process to know which parts of the memory are being utilized by a * remote process. */ opal_output_verbose(10, opal_btl_base_framework.framework_output, "btl:smcuda: CUDA cuMemHostRegister address=%p, size=%d", @@ -432,7 +432,7 @@ smcuda_btl_first_time_init(mca_btl_smcuda_t *smcuda_btl, mca_btl_smcuda_component.sm_free_list_inc, mca_btl_smcuda_component.sm_mpool, 0, NULL, NULL, NULL); if ( OPAL_SUCCESS != i ) - return i; + return i; mca_btl_smcuda_component.num_outstanding_frags = 0; @@ -1066,11 +1066,11 @@ int mca_btl_smcuda_get_cuda (struct mca_btl_base_module_t *btl, frag->base.des_cbdata = cbdata; frag->base.des_context = cbcontext; frag->local_handle = local_handle; - + /* Set to 0 for debugging since it is a list item but I am not * intializing it properly and it is annoying to see all the * garbage in the debugger. */ - + memset(&rget_reg, 0, sizeof(rget_reg)); memcpy(&rget_reg.data.memHandle, remote_handle->reg_data.memHandle, sizeof(remote_handle->reg_data.memHandle)); @@ -1112,7 +1112,7 @@ int mca_btl_smcuda_get_cuda (struct mca_btl_base_module_t *btl, /* The remote side posted an IPC event to make sure we do not start our * copy until IPC event completes. This is to ensure that the data being sent * is available in the sender's GPU buffer. Therefore, do a stream synchronize - * on the IPC event that we received. Note that we pull it from + * on the IPC event that we received. Note that we pull it from * rget_reg, not reg_ptr, as we do not cache the event. */ mca_common_wait_stream_synchronize(&rget_reg); @@ -1174,7 +1174,7 @@ static void mca_btl_smcuda_send_cuda_ipc_request(struct mca_btl_base_module_t* b if ( mca_btl_smcuda_component.num_outstanding_frags * 2 > (int) mca_btl_smcuda_component.fifo_size ) { mca_btl_smcuda_component_progress(); } - + if (0 != (res = mca_common_cuda_get_device(&mydevnum))) { opal_output(0, "Cannot determine device. IPC cannot be set."); endpoint->ipcstate = IPC_BAD; @@ -1229,16 +1229,16 @@ void mca_btl_smcuda_dump(struct mca_btl_base_module_t* btl, mca_btl_smcuda_frag_t* frag; mca_btl_base_err("BTL SM %p endpoint %p [smp_rank %d] [peer_rank %d]\n", - (void*) btl, (void*) endpoint, + (void*) btl, (void*) endpoint, endpoint->my_smp_rank, endpoint->peer_smp_rank); if( NULL != endpoint ) { for(item = opal_list_get_first(&endpoint->pending_sends); - item != opal_list_get_end(&endpoint->pending_sends); + item != opal_list_get_end(&endpoint->pending_sends); item = opal_list_get_next(item)) { frag = (mca_btl_smcuda_frag_t*)item; mca_btl_base_err(" | frag %p size %lu (hdr frag %p len %lu rank %d tag %d)\n", (void*) frag, frag->size, (void*) frag->hdr->frag, - frag->hdr->len, frag->hdr->my_smp_rank, + frag->hdr->len, frag->hdr->my_smp_rank, frag->hdr->tag); } } diff --git a/opal/mca/btl/smcuda/btl_smcuda.h b/opal/mca/btl/smcuda/btl_smcuda.h index 4c9953932f1..7c9d30faded 100644 --- a/opal/mca/btl/smcuda/btl_smcuda.h +++ b/opal/mca/btl/smcuda/btl_smcuda.h @@ -13,7 +13,7 @@ * Copyright (c) 2006-2007 Voltaire. All rights reserved. * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2015 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2012-2013 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ * @@ -81,23 +81,23 @@ BEGIN_C_DECLS struct sm_fifo_t { /* This queue pointer is used only by the heads. */ - volatile void **queue; + volatile void **queue; char pad0[SM_CACHE_LINE_PAD - sizeof(void **)]; /* This lock is used by the heads. */ - opal_atomic_lock_t head_lock; + opal_atomic_lock_t head_lock; char pad1[SM_CACHE_LINE_PAD - sizeof(opal_atomic_lock_t)]; /* This index is used by the head holding the head lock. */ - volatile int head; + volatile int head; char pad2[SM_CACHE_LINE_PAD - sizeof(int)]; /* This mask is used "read only" by all processes. */ - unsigned int mask; + unsigned int mask; char pad3[SM_CACHE_LINE_PAD - sizeof(int)]; /* The following are used only by the tail. */ volatile void **queue_recv; opal_atomic_lock_t tail_lock; volatile int tail; int num_to_clear; - int lazy_free; + int lazy_free; char pad4[SM_CACHE_LINE_PAD - sizeof(void **) - sizeof(opal_atomic_lock_t) - sizeof(int) * 3]; @@ -163,7 +163,7 @@ struct mca_btl_smcuda_component_t { int num_pending_sends; /**< total number on all of my pending-send queues */ int mem_node; int num_mem_nodes; - + #if OPAL_ENABLE_PROGRESS_THREADS == 1 char sm_fifo_path[PATH_MAX]; /**< path to fifo used to signal this process */ int sm_fifo_fd; /**< file descriptor corresponding to opened fifo */ diff --git a/opal/mca/btl/smcuda/btl_smcuda_component.c b/opal/mca/btl/smcuda/btl_smcuda_component.c index 98f8ead8b4b..dcbf0ec5180 100644 --- a/opal/mca/btl/smcuda/btl_smcuda_component.c +++ b/opal/mca/btl/smcuda/btl_smcuda_component.c @@ -317,7 +317,7 @@ static int mca_btl_smcuda_component_close(void) return return_value; } -/* +/* * Returns the number of processes on the node. */ static inline int @@ -804,8 +804,8 @@ static void btl_smcuda_control(mca_btl_base_module_t* btl, smcuda_btl->error_cb(&smcuda_btl->super, MCA_BTL_ERROR_FLAGS_ADD_CUDA_IPC, ep_proc, (char *)&mca_btl_smcuda_component.cuda_ipc_output); opal_output_verbose(10, mca_btl_smcuda_component.cuda_ipc_output, - "Sending CUDA IPC ACK: myrank=%d, mydev=%d, peerrank=%d, peerdev=%d", - endpoint->my_smp_rank, mydevnum, endpoint->peer_smp_rank, + "Sending CUDA IPC ACK: myrank=%d, mydev=%d, peerrank=%d, peerdev=%d", + endpoint->my_smp_rank, mydevnum, endpoint->peer_smp_rank, ctrlhdr.cudev); mca_btl_smcuda_send_cuda_ipc_ack(btl, endpoint, 1); } @@ -989,22 +989,22 @@ void mca_btl_smcuda_component_event_thread(opal_object_t* thread) } #endif -void btl_smcuda_process_pending_sends(struct mca_btl_base_endpoint_t *ep) -{ - btl_smcuda_pending_send_item_t *si; - int rc; +void btl_smcuda_process_pending_sends(struct mca_btl_base_endpoint_t *ep) +{ + btl_smcuda_pending_send_item_t *si; + int rc; while ( 0 < opal_list_get_size(&ep->pending_sends) ) { /* Note that we access the size of ep->pending_sends unlocked - as it doesn't really matter if the result is wrong as + as it doesn't really matter if the result is wrong as opal_list_remove_first is called with a lock and we handle it not finding an item to process */ OPAL_THREAD_LOCK(&ep->endpoint_lock); - si = (btl_smcuda_pending_send_item_t*)opal_list_remove_first(&ep->pending_sends); + si = (btl_smcuda_pending_send_item_t*)opal_list_remove_first(&ep->pending_sends); OPAL_THREAD_UNLOCK(&ep->endpoint_lock); if(NULL == si) return; /* Another thread got in before us. Thats ok. */ - + OPAL_THREAD_ADD32(&mca_btl_smcuda_component.num_pending_sends, -1); MCA_BTL_SMCUDA_FIFO_WRITE(ep, ep->my_smp_rank, ep->peer_smp_rank, si->data, @@ -1015,7 +1015,7 @@ void btl_smcuda_process_pending_sends(struct mca_btl_base_endpoint_t *ep) if ( OPAL_SUCCESS != rc ) return; } -} +} int mca_btl_smcuda_component_progress(void) { diff --git a/opal/mca/btl/smcuda/btl_smcuda_frag.h b/opal/mca/btl/smcuda/btl_smcuda_frag.h index c570d65bdcd..55996d6eef1 100644 --- a/opal/mca/btl/smcuda/btl_smcuda_frag.h +++ b/opal/mca/btl/smcuda/btl_smcuda_frag.h @@ -63,9 +63,9 @@ struct mca_btl_smcuda_segment_t { #if OPAL_CUDA_SUPPORT uint8_t key[128]; /* 64 bytes for CUDA mem handle, 64 bytes for CUDA event handle */ /** Address of the entire memory handle */ - opal_ptr_t memh_seg_addr; + opal_ptr_t memh_seg_addr; /** Length in bytes of entire memory handle */ - uint32_t memh_seg_len; + uint32_t memh_seg_len; #endif /* OPAL_CUDA_SUPPORT */ }; typedef struct mca_btl_smcuda_segment_t mca_btl_smcuda_segment_t; diff --git a/opal/mca/btl/smcuda/help-mpi-btl-smcuda.txt b/opal/mca/btl/smcuda/help-mpi-btl-smcuda.txt index 99fdfb40b27..dcba31b824f 100644 --- a/opal/mca/btl/smcuda/help-mpi-btl-smcuda.txt +++ b/opal/mca/btl/smcuda/help-mpi-btl-smcuda.txt @@ -6,9 +6,9 @@ # Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012-2014 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's smcuda BTL. diff --git a/opal/mca/btl/tcp/Makefile.am b/opal/mca/btl/tcp/Makefile.am index cc61d81fea3..76f11849674 100644 --- a/opal/mca/btl/tcp/Makefile.am +++ b/opal/mca/btl/tcp/Makefile.am @@ -5,16 +5,16 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/btl/tcp/btl_tcp.c b/opal/mca/btl/tcp/btl_tcp.c index 979c65d1a8b..c14d655f9b7 100644 --- a/opal/mca/btl/tcp/btl_tcp.c +++ b/opal/mca/btl/tcp/btl_tcp.c @@ -6,17 +6,17 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -24,12 +24,12 @@ #include #include "opal/class/opal_bitmap.h" #include "opal/mca/btl/btl.h" -#include "opal/datatype/opal_convertor.h" -#include "opal/mca/mpool/base/base.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/datatype/opal_convertor.h" +#include "opal/mca/mpool/base/base.h" +#include "opal/mca/mpool/mpool.h" #include "btl_tcp.h" -#include "btl_tcp_frag.h" +#include "btl_tcp_frag.h" #include "btl_tcp_proc.h" #include "btl_tcp_endpoint.h" @@ -53,10 +53,10 @@ mca_btl_tcp_module_t mca_btl_tcp_module = { * */ -int mca_btl_tcp_add_procs( struct mca_btl_base_module_t* btl, - size_t nprocs, - struct opal_proc_t **procs, - struct mca_btl_base_endpoint_t** peers, +int mca_btl_tcp_add_procs( struct mca_btl_base_module_t* btl, + size_t nprocs, + struct opal_proc_t **procs, + struct mca_btl_base_endpoint_t** peers, opal_bitmap_t* reachable ) { mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*)btl; @@ -83,15 +83,15 @@ int mca_btl_tcp_add_procs( struct mca_btl_base_module_t* btl, } /* - * Check to make sure that the peer has at least as many interface - * addresses exported as we are trying to use. If not, then + * Check to make sure that the peer has at least as many interface + * addresses exported as we are trying to use. If not, then * don't bind this BTL instance to the proc. */ OPAL_THREAD_LOCK(&tcp_proc->proc_lock); /* The btl_proc datastructure is shared by all TCP BTL - * instances that are trying to reach this destination. + * instances that are trying to reach this destination. * Cache the peer instance on the btl_proc. */ tcp_endpoint = OBJ_NEW(mca_btl_tcp_endpoint_t); @@ -122,9 +122,9 @@ int mca_btl_tcp_add_procs( struct mca_btl_base_module_t* btl, return OPAL_SUCCESS; } -int mca_btl_tcp_del_procs(struct mca_btl_base_module_t* btl, - size_t nprocs, - struct opal_proc_t **procs, +int mca_btl_tcp_del_procs(struct mca_btl_base_module_t* btl, + size_t nprocs, + struct opal_proc_t **procs, struct mca_btl_base_endpoint_t ** endpoints) { mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*)btl; @@ -156,22 +156,22 @@ mca_btl_base_descriptor_t* mca_btl_tcp_alloc( uint32_t flags) { mca_btl_tcp_frag_t* frag = NULL; - - if(size <= btl->btl_eager_limit) { - MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); - } else if (size <= btl->btl_max_send_size) { - MCA_BTL_TCP_FRAG_ALLOC_MAX(frag); + + if(size <= btl->btl_eager_limit) { + MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); + } else if (size <= btl->btl_max_send_size) { + MCA_BTL_TCP_FRAG_ALLOC_MAX(frag); } if( OPAL_UNLIKELY(NULL == frag) ) { return NULL; } - + frag->segments[0].seg_len = size; frag->segments[0].seg_addr.pval = frag+1; frag->base.des_segments = frag->segments; frag->base.des_segment_count = 1; - frag->base.des_flags = flags; + frag->base.des_flags = flags; frag->base.order = MCA_BTL_NO_ORDER; frag->btl = (mca_btl_tcp_module_t*)btl; return (mca_btl_base_descriptor_t*)frag; @@ -183,12 +183,12 @@ mca_btl_base_descriptor_t* mca_btl_tcp_alloc( */ int mca_btl_tcp_free( - struct mca_btl_base_module_t* btl, - mca_btl_base_descriptor_t* des) + struct mca_btl_base_module_t* btl, + mca_btl_base_descriptor_t* des) { - mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)des; - MCA_BTL_TCP_FRAG_RETURN(frag); - return OPAL_SUCCESS; + mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)des; + MCA_BTL_TCP_FRAG_RETURN(frag); + return OPAL_SUCCESS; } /** @@ -223,7 +223,7 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src( if (max_data+reserve <= btl->btl_eager_limit) { MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag); } else { - /* + /* * otherwise pack as much data as we can into a fragment * that is the max send size. */ @@ -244,13 +244,13 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src( } iov.iov_len = max_data; iov.iov_base = (IOVBASE_TYPE*)(((unsigned char*)(frag->segments[0].seg_addr.pval)) + reserve); - + rc = opal_convertor_pack(convertor, &iov, &iov_count, &max_data ); if( OPAL_UNLIKELY(rc < 0) ) { mca_btl_tcp_free(btl, &frag->base); return NULL; } - + frag->segments[0].seg_len += max_data; } else { @@ -287,11 +287,11 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src( int mca_btl_tcp_send( struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* endpoint, - struct mca_btl_base_descriptor_t* descriptor, + struct mca_btl_base_descriptor_t* descriptor, mca_btl_base_tag_t tag ) { - mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; - mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)descriptor; + mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; + mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)descriptor; int i; frag->btl = tcp_btl; @@ -334,7 +334,7 @@ int mca_btl_tcp_put (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t mca_btl_base_registration_handle_t *remote_handle, size_t size, int flags, int order, mca_btl_base_rdma_completion_fn_t cbfunc, void *cbcontext, void *cbdata) { - mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; + mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; mca_btl_tcp_frag_t *frag = NULL; int i; @@ -399,7 +399,7 @@ int mca_btl_tcp_get (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t mca_btl_base_registration_handle_t *remote_handle, size_t size, int flags, int order, mca_btl_base_rdma_completion_fn_t cbfunc, void *cbcontext, void *cbdata) { - mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; + mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; mca_btl_tcp_frag_t* frag = NULL; int rc; @@ -457,7 +457,7 @@ int mca_btl_tcp_get (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t int mca_btl_tcp_finalize(struct mca_btl_base_module_t* btl) { - mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; + mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl; opal_list_item_t* item; for( item = opal_list_remove_first(&tcp_btl->tcp_endpoints); item != NULL; diff --git a/opal/mca/btl/tcp/btl_tcp.h b/opal/mca/btl/tcp/btl_tcp.h index 178f4b56271..a9b5ad9d4dd 100644 --- a/opal/mca/btl/tcp/btl_tcp.h +++ b/opal/mca/btl/tcp/btl_tcp.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -99,7 +99,7 @@ struct mca_btl_tcp_component_t { * that are not found? */ bool report_all_unfound_interfaces; -}; +}; typedef struct mca_btl_tcp_component_t mca_btl_tcp_component_t; OPAL_MODULE_DECLSPEC extern mca_btl_tcp_component_t mca_btl_tcp_component; @@ -122,7 +122,7 @@ struct mca_btl_tcp_module_t { size_t tcp_bytes_recv; size_t tcp_send_handler; #endif -}; +}; typedef struct mca_btl_tcp_module_t mca_btl_tcp_module_t; extern mca_btl_tcp_module_t mca_btl_tcp_module; @@ -130,13 +130,13 @@ extern mca_btl_tcp_module_t mca_btl_tcp_module; /** * TCP component initialization. - * + * * @param num_btl_modules (OUT) Number of BTLs returned in BTL array. * @param allow_multi_user_threads (OUT) Flag indicating wether BTL supports user threads (TRUE) * @param have_hidden_threads (OUT) Flag indicating wether BTL uses threads (TRUE) */ extern mca_btl_base_module_t** mca_btl_tcp_component_init( - int *num_btl_modules, + int *num_btl_modules, bool allow_multi_user_threads, bool have_hidden_threads ); @@ -151,7 +151,7 @@ extern int mca_btl_tcp_component_progress(void); /** * Cleanup any resources held by the BTL. - * + * * @param btl BTL instance. * @return OPAL_SUCCESS or error status on failure. */ @@ -163,14 +163,14 @@ extern int mca_btl_tcp_finalize( /** * PML->BTL notification of change in the process list. - * + * * @param btl (IN) * @param nprocs (IN) Number of processes * @param procs (IN) Set of processes * @param peers (OUT) Set of (optional) peer addressing info. * @param peers (IN/OUT) Set of processes that are reachable via this BTL. * @return OPAL_SUCCESS or error status on failure. - * + * */ extern int mca_btl_tcp_add_procs( @@ -250,7 +250,7 @@ extern mca_btl_base_descriptor_t* mca_btl_tcp_alloc( struct mca_btl_base_endpoint_t* endpoint, uint8_t order, size_t size, - uint32_t flags); + uint32_t flags); /** @@ -261,9 +261,9 @@ extern mca_btl_base_descriptor_t* mca_btl_tcp_alloc( */ extern int mca_btl_tcp_free( - struct mca_btl_base_module_t* btl, - mca_btl_base_descriptor_t* des); - + struct mca_btl_base_module_t* btl, + mca_btl_base_descriptor_t* des); + /** * Prepare a descriptor for send/rdma using the supplied @@ -276,7 +276,7 @@ extern int mca_btl_tcp_free( * @param endpoint (IN) BTL peer addressing * @param convertor (IN) Data type convertor * @param reserve (IN) Additional bytes requested by upper layer to precede user data - * @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT) + * @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT) */ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src( diff --git a/opal/mca/btl/tcp/btl_tcp_addr.h b/opal/mca/btl/tcp/btl_tcp_addr.h index d9de87eec0c..aa53535cce0 100644 --- a/opal/mca/btl/tcp/btl_tcp_addr.h +++ b/opal/mca/btl/tcp/btl_tcp_addr.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ /** @@ -53,13 +53,13 @@ struct mca_btl_tcp_addr_t { uint32_t _pad[3]; } _addr__inet; } _union_inet; - } addr_inet; + } addr_inet; #endif in_port_t addr_port; /**< listen port */ uint16_t addr_ifkindex; /**< remote interface index assigned with this address */ unsigned short addr_inuse; /**< local meaning only */ - uint8_t addr_family; /**< AF_INET or AF_INET6 */ + uint8_t addr_family; /**< AF_INET or AF_INET6 */ }; typedef struct mca_btl_tcp_addr_t mca_btl_tcp_addr_t; diff --git a/opal/mca/btl/tcp/btl_tcp_component.c b/opal/mca/btl/tcp/btl_tcp_component.c index 8f5fed354bd..beb2f95a2f5 100644 --- a/opal/mca/btl/tcp/btl_tcp_component.c +++ b/opal/mca/btl/tcp/btl_tcp_component.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,15 +14,15 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Laboratory * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2015 NVIDIA Corporation. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -64,8 +64,8 @@ #include "opal/util/show_help.h" #include "opal/constants.h" #include "opal/mca/btl/btl.h" -#include "opal/mca/btl/base/base.h" -#include "opal/mca/mpool/base/base.h" +#include "opal/mca/btl/base/base.h" +#include "opal/mca/mpool/base/base.h" #include "opal/mca/btl/base/btl_base_error.h" #include "opal/mca/pmix/pmix.h" @@ -73,12 +73,12 @@ #include "btl_tcp_addr.h" #include "btl_tcp_proc.h" #include "btl_tcp_frag.h" -#include "btl_tcp_endpoint.h" +#include "btl_tcp_endpoint.h" #if OPAL_CUDA_SUPPORT #include "opal/mca/common/cuda/common_cuda.h" #endif /* OPAL_CUDA_SUPPORT */ -/* +/* * Local functions */ static int mca_btl_tcp_component_register(void); @@ -110,7 +110,7 @@ mca_btl_tcp_component_t mca_btl_tcp_component = { */ static inline char* mca_btl_tcp_param_register_string( - const char* param_name, + const char* param_name, const char* help_string, const char* default_value, int level, @@ -125,7 +125,7 @@ static inline char* mca_btl_tcp_param_register_string( } static inline int mca_btl_tcp_param_register_int( - const char* param_name, + const char* param_name, const char* help_string, int default_value, int level, @@ -140,7 +140,7 @@ static inline int mca_btl_tcp_param_register_int( } static inline unsigned int mca_btl_tcp_param_register_uint( - const char* param_name, + const char* param_name, const char* help_string, unsigned int default_value, int level, @@ -207,7 +207,7 @@ static int mca_btl_tcp_component_register(void) /* register TCP component parameters */ mca_btl_tcp_param_register_uint("links", NULL, 1, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_num_links); mca_btl_tcp_param_register_string("if_include", "Comma-delimited list of devices and/or CIDR notation of networks to use for MPI communication (e.g., \"eth0,192.168.0.0/16\"). Mutually exclusive with btl_tcp_if_exclude.", "", OPAL_INFO_LVL_1, &mca_btl_tcp_component.tcp_if_include); - mca_btl_tcp_param_register_string("if_exclude", "Comma-delimited list of devices and/or CIDR notation of networks to NOT use for MPI communication -- all devices not matching these specifications will be used (e.g., \"eth0,192.168.0.0/16\"). If set to a non-default value, it is mutually exclusive with btl_tcp_if_include.", + mca_btl_tcp_param_register_string("if_exclude", "Comma-delimited list of devices and/or CIDR notation of networks to NOT use for MPI communication -- all devices not matching these specifications will be used (e.g., \"eth0,192.168.0.0/16\"). If set to a non-default value, it is mutually exclusive with btl_tcp_if_include.", "127.0.0.1/8,sppp", OPAL_INFO_LVL_1, &mca_btl_tcp_component.tcp_if_exclude); @@ -222,11 +222,11 @@ static int mca_btl_tcp_component_register(void) " Every read will read the expected data plus the amount of the" " endpoint_cache", 30*1024, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_endpoint_cache); mca_btl_tcp_param_register_int ("use_nagle", "Whether to use Nagle's algorithm or not (using Nagle's algorithm may increase short message latency)", 0, OPAL_INFO_LVL_4, &mca_btl_tcp_component.tcp_not_use_nodelay); - mca_btl_tcp_param_register_int( "port_min_v4", + mca_btl_tcp_param_register_int( "port_min_v4", "The minimum port where the TCP BTL will try to bind (default 1024)", 1024, OPAL_INFO_LVL_2, &mca_btl_tcp_component.tcp_port_min); - asprintf( &message, + asprintf( &message, "The number of ports where the TCP BTL will try to bind (default %d)." " This parameter together with the port min, define a range of ports" " where Open MPI will open sockets.", @@ -239,7 +239,7 @@ static int mca_btl_tcp_component_register(void) mca_btl_tcp_param_register_int( "port_min_v6", "The minimum port where the TCP BTL will try to bind (default 1024)", 1024, OPAL_INFO_LVL_2, & mca_btl_tcp_component.tcp6_port_min ); - asprintf( &message, + asprintf( &message, "The number of ports where the TCP BTL will try to bind (default %d)." " This parameter together with the port min, define a range of ports" " where Open MPI will open sockets.", @@ -296,8 +296,8 @@ static int mca_btl_tcp_component_open(void) mca_btl_tcp_component.tcp_num_btls=0; mca_btl_tcp_component.tcp_addr_count = 0; mca_btl_tcp_component.tcp_btls=NULL; - - /* initialize objects */ + + /* initialize objects */ OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_lock, opal_mutex_t); OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_procs, opal_proc_table_t); OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_eager, opal_free_list_t); @@ -306,7 +306,7 @@ static int mca_btl_tcp_component_open(void) opal_proc_table_init(&mca_btl_tcp_component.tcp_procs, 16, 256); /* if_include and if_exclude need to be mutually exclusive */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != mca_base_var_check_exclusive("ompi", mca_btl_tcp_component.super.btl_version.mca_type_name, mca_btl_tcp_component.super.btl_version.mca_component_name, @@ -318,7 +318,7 @@ static int mca_btl_tcp_component_open(void) "open" failing is not printed */ return OPAL_ERR_NOT_AVAILABLE; } - + return OPAL_SUCCESS; } @@ -331,7 +331,7 @@ static int mca_btl_tcp_component_close(void) { if (NULL != mca_btl_tcp_component.tcp_btls) free(mca_btl_tcp_component.tcp_btls); - + if (mca_btl_tcp_component.tcp_listen_sd >= 0) { opal_event_del(&mca_btl_tcp_component.tcp_recv_event); CLOSE_THE_SOCKET(mca_btl_tcp_component.tcp_listen_sd); @@ -448,7 +448,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd) str = strchr(argv[i], '/'); if (NULL == str) { opal_show_help("help-mpi-btl-tcp.txt", "invalid if_inexclude", - true, name, opal_process_info.nodename, + true, name, opal_process_info.nodename, tmp, "Invalid specification (missing \"/\")"); free(argv[i]); free(tmp); @@ -459,7 +459,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd) /* Now convert the IPv4 address */ ((struct sockaddr*) &argv_inaddr)->sa_family = AF_INET; - ret = inet_pton(AF_INET, argv[i], + ret = inet_pton(AF_INET, argv[i], &((struct sockaddr_in*) &argv_inaddr)->sin_addr); free(argv[i]); @@ -470,16 +470,16 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd) free(tmp); continue; } - opal_output_verbose(20, opal_btl_base_framework.framework_output, + opal_output_verbose(20, opal_btl_base_framework.framework_output, "btl: tcp: Searching for %s address+prefix: %s / %u", name, opal_net_get_hostname((struct sockaddr*) &argv_inaddr), argv_prefix); - + /* Go through all interfaces and see if we can find a match */ - for (if_index = opal_ifbegin(); if_index >= 0; + for (if_index = opal_ifbegin(); if_index >= 0; if_index = opal_ifnext(if_index)) { - opal_ifindextoaddr(if_index, + opal_ifindextoaddr(if_index, (struct sockaddr*) &if_inaddr, sizeof(if_inaddr)); if (opal_net_samenetwork((struct sockaddr*) &argv_inaddr, @@ -488,7 +488,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd) break; } } - + /* If we didn't find a match, keep trying */ if (if_index < 0) { if (reqd || mca_btl_tcp_component.report_all_unfound_interfaces) { @@ -503,7 +503,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd) /* We found a match; get the name and replace it in the argv */ opal_ifindextoname(if_index, if_name, sizeof(if_name)); - opal_output_verbose(20, opal_btl_base_framework.framework_output, + opal_output_verbose(20, opal_btl_base_framework.framework_output, "btl: tcp: Found match: %s (%s)", opal_net_get_hostname((struct sockaddr*) &if_inaddr), if_name); @@ -523,7 +523,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd) /* * Create a TCP BTL instance for either: * (1) all interfaces specified by the user - * (2) all available interfaces + * (2) all available interfaces * (3) all available interfaces except for those excluded by the user */ @@ -610,7 +610,7 @@ static int mca_btl_tcp_component_create_instances(void) goto cleanup; } - /* if the interface list was not specified by the user, create + /* if the interface list was not specified by the user, create * a BTL for each interface that was not excluded. */ exclude = split_and_resolve(&mca_btl_tcp_component.tcp_if_exclude, @@ -727,7 +727,7 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family) { int index, range, port; - + #if OPAL_ENABLE_IPV6 if (AF_INET6 == af_family) { range = mca_btl_tcp_component.tcp6_port_range; @@ -793,7 +793,7 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family) /* setup listen backlog to maximum allowed by kernel */ if(listen(sd, SOMAXCONN) < 0) { - BTL_ERROR(("listen() failed: %s (%d)", + BTL_ERROR(("listen() failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); CLOSE_THE_SOCKET(sd); return OPAL_ERROR; @@ -839,14 +839,14 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family) /* * Register TCP module addressing information. The MCA framework - * will make this available to all peers. + * will make this available to all peers. */ static int mca_btl_tcp_component_exchange(void) { int rc = 0, index; size_t i = 0; - size_t size = mca_btl_tcp_component.tcp_addr_count * + size_t size = mca_btl_tcp_component.tcp_addr_count * mca_btl_tcp_component.tcp_num_links * sizeof(mca_btl_tcp_addr_t); /* adi@2007-04-12: * @@ -876,10 +876,10 @@ static int mca_btl_tcp_component_exchange(void) continue; } - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != opal_ifindextoaddr(index, (struct sockaddr*) &my_ss, sizeof (my_ss))) { - opal_output (0, + opal_output (0, "btl_tcp_component: problems getting address for index %i (kernel index %i)\n", index, opal_ifindextokindex (index)); continue; @@ -891,7 +891,7 @@ static int mca_btl_tcp_component_exchange(void) memcpy(&addrs[current_addr].addr_inet, &((struct sockaddr_in6*)&my_ss)->sin6_addr, sizeof(addrs[0].addr_inet)); - addrs[current_addr].addr_port = + addrs[current_addr].addr_port = mca_btl_tcp_component.tcp6_listen_port; addrs[current_addr].addr_family = MCA_BTL_TCP_AF_INET6; xfer_size += sizeof (mca_btl_tcp_addr_t); @@ -903,10 +903,10 @@ static int mca_btl_tcp_component_exchange(void) #endif if ((AF_INET == my_ss.ss_family) && (4 != mca_btl_tcp_component.tcp_disable_family)) { - memcpy(&addrs[current_addr].addr_inet, + memcpy(&addrs[current_addr].addr_inet, &((struct sockaddr_in*)&my_ss)->sin_addr, sizeof(addrs[0].addr_inet)); - addrs[current_addr].addr_port = + addrs[current_addr].addr_port = mca_btl_tcp_component.tcp_listen_port; addrs[current_addr].addr_family = MCA_BTL_TCP_AF_INET; xfer_size += sizeof (mca_btl_tcp_addr_t); @@ -918,7 +918,7 @@ static int mca_btl_tcp_component_exchange(void) } /* end of for opal_ifbegin() */ } /* end of for tcp_num_btls */ OPAL_MODEX_SEND(rc, PMIX_SYNC_REQD, PMIX_GLOBAL, - &mca_btl_tcp_component.super.btl_version, + &mca_btl_tcp_component.super.btl_version, addrs, xfer_size); free(addrs); } /* end if */ @@ -932,7 +932,7 @@ static int mca_btl_tcp_component_exchange(void) * (2) setup TCP listen socket for incoming connection attempts * (3) register BTL parameters with the MCA */ -mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules, +mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules, bool enable_progress_threads, bool enable_mpi_threads) { @@ -942,7 +942,7 @@ mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules, /* initialize free lists */ opal_free_list_init( &mca_btl_tcp_component.tcp_frag_eager, - sizeof (mca_btl_tcp_frag_eager_t) + + sizeof (mca_btl_tcp_frag_eager_t) + mca_btl_tcp_module.super.btl_eager_limit, opal_cache_line_size, OBJ_CLASS (mca_btl_tcp_frag_eager_t), @@ -953,7 +953,7 @@ mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules, NULL, 0, NULL, NULL, NULL ); opal_free_list_init( &mca_btl_tcp_component.tcp_frag_max, - sizeof (mca_btl_tcp_frag_max_t) + + sizeof (mca_btl_tcp_frag_max_t) + mca_btl_tcp_module.super.btl_max_send_size, opal_cache_line_size, OBJ_CLASS (mca_btl_tcp_frag_max_t), @@ -997,7 +997,7 @@ mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules, return 0; } - btls = (mca_btl_base_module_t **)malloc(mca_btl_tcp_component.tcp_num_btls * + btls = (mca_btl_base_module_t **)malloc(mca_btl_tcp_component.tcp_num_btls * sizeof(mca_btl_base_module_t*)); if(NULL == btls) { return NULL; @@ -1035,11 +1035,11 @@ static void mca_btl_tcp_component_accept_handler( int incoming_sd, if(sd < 0) { if(opal_socket_errno == EINTR) continue; - if (opal_socket_errno != EAGAIN && + if (opal_socket_errno != EAGAIN && opal_socket_errno != EWOULDBLOCK) { opal_show_help("help-mpi-btl-tcp.txt", "accept failed", true, opal_process_info.nodename, - getpid(), + getpid(), opal_socket_errno, strerror(opal_socket_errno)); } @@ -1056,7 +1056,7 @@ static void mca_btl_tcp_component_accept_handler( int incoming_sd, /** - * Event callback when there is data available on the registered + * Event callback when there is data available on the registered * socket to recv. This callback is triggered only once per lifetime * for any socket, in the beginning when we setup the handshake * protocol. @@ -1091,7 +1091,7 @@ static void mca_btl_tcp_component_recv_handler(int sd, short flags, void* user) strerror(opal_socket_errno), opal_socket_errno)); } } - + /* lookup the corresponding process */ btl_proc = mca_btl_tcp_proc_lookup(&guid); if(NULL == btl_proc) { @@ -1101,7 +1101,7 @@ static void mca_btl_tcp_component_recv_handler(int sd, short flags, void* user) /* lookup peer address */ if(getpeername(sd, (struct sockaddr*)&addr, &addr_len) != 0) { - BTL_ERROR(("getpeername() failed: %s (%d)", + BTL_ERROR(("getpeername() failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno)); CLOSE_THE_SOCKET(sd); return; diff --git a/opal/mca/btl/tcp/btl_tcp_endpoint.h b/opal/mca/btl/tcp/btl_tcp_endpoint.h index 65337967508..f50c6a43af9 100644 --- a/opal/mca/btl/tcp/btl_tcp_endpoint.h +++ b/opal/mca/btl/tcp/btl_tcp_endpoint.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/mca/btl/tcp/btl_tcp_ft.c b/opal/mca/btl/tcp/btl_tcp_ft.c index 8f61a83d9fa..1b33d6c112e 100644 --- a/opal/mca/btl/tcp/btl_tcp_ft.c +++ b/opal/mca/btl/tcp/btl_tcp_ft.c @@ -5,17 +5,17 @@ * 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, + * 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) 2006 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "opal_config.h" @@ -24,7 +24,7 @@ #include "btl_tcp.h" -#include "btl_tcp_frag.h" +#include "btl_tcp_frag.h" #include "btl_tcp_proc.h" #include "btl_tcp_endpoint.h" diff --git a/opal/mca/btl/tcp/btl_tcp_ft.h b/opal/mca/btl/tcp/btl_tcp_ft.h index bbca866e73c..304f076db9a 100644 --- a/opal/mca/btl/tcp/btl_tcp_ft.h +++ b/opal/mca/btl/tcp/btl_tcp_ft.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** diff --git a/opal/mca/btl/tcp/btl_tcp_hdr.h b/opal/mca/btl/tcp/btl_tcp_hdr.h index 0f08c873780..b7977762012 100644 --- a/opal/mca/btl/tcp/btl_tcp_hdr.h +++ b/opal/mca/btl/tcp/btl_tcp_hdr.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -22,7 +22,7 @@ #include "opal_config.h" #include "opal/mca/btl/base/base.h" -#include "btl_tcp.h" +#include "btl_tcp.h" BEGIN_C_DECLS @@ -38,9 +38,9 @@ struct mca_btl_tcp_hdr_t { mca_btl_base_header_t base; uint8_t type; uint16_t count; - uint32_t size; -}; -typedef struct mca_btl_tcp_hdr_t mca_btl_tcp_hdr_t; + uint32_t size; +}; +typedef struct mca_btl_tcp_hdr_t mca_btl_tcp_hdr_t; #define MCA_BTL_TCP_HDR_HTON(hdr) \ do { \ diff --git a/opal/mca/btl/tcp/btl_tcp_proc.c b/opal/mca/btl/tcp/btl_tcp_proc.c index b6094345779..5812d1f3122 100644 --- a/opal/mca/btl/tcp/btl_tcp_proc.c +++ b/opal/mca/btl/tcp/btl_tcp_proc.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -58,9 +58,9 @@ static int max_assignment_cardinality; static enum mca_btl_tcp_connection_quality **weights; static struct mca_btl_tcp_addr_t ***best_addr; -OBJ_CLASS_INSTANCE( mca_btl_tcp_proc_t, - opal_list_item_t, - mca_btl_tcp_proc_construct, +OBJ_CLASS_INSTANCE( mca_btl_tcp_proc_t, + opal_list_item_t, + mca_btl_tcp_proc_construct, mca_btl_tcp_proc_destruct ); void mca_btl_tcp_proc_construct(mca_btl_tcp_proc_t* tcp_proc) @@ -82,7 +82,7 @@ void mca_btl_tcp_proc_destruct(mca_btl_tcp_proc_t* tcp_proc) if( NULL != tcp_proc->proc_opal ) { /* remove from list of all proc instances */ OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock); - opal_proc_table_remove_value(&mca_btl_tcp_component.tcp_procs, + opal_proc_table_remove_value(&mca_btl_tcp_component.tcp_procs, tcp_proc->proc_opal->proc_name); OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock); OBJ_RELEASE(tcp_proc->proc_opal); @@ -101,7 +101,7 @@ void mca_btl_tcp_proc_destruct(mca_btl_tcp_proc_t* tcp_proc) /* * Create a TCP process structure. There is a one-to-one correspondence * between a opal_proc_t and a mca_btl_tcp_proc_t instance. We cache - * additional data (specifically the list of mca_btl_tcp_endpoint_t instances, + * additional data (specifically the list of mca_btl_tcp_endpoint_t instances, * and published addresses) associated w/ a given destination on this * datastructure. */ @@ -113,7 +113,7 @@ mca_btl_tcp_proc_t* mca_btl_tcp_proc_create(opal_proc_t* proc) int rc; OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock); - rc = opal_proc_table_get_value(&mca_btl_tcp_component.tcp_procs, + rc = opal_proc_table_get_value(&mca_btl_tcp_component.tcp_procs, proc->proc_name, (void**)&btl_proc); if(OPAL_SUCCESS == rc) { OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock); @@ -343,12 +343,12 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(void) continue; } - local_interfaces[local_kindex_to_index[kindex]]->ipv4_address = + local_interfaces[local_kindex_to_index[kindex]]->ipv4_address = (struct sockaddr_storage*) malloc(sizeof(local_addr)); - memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv4_address, + memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv4_address, &local_addr, sizeof(local_addr)); - opal_ifindextomask(idx, - &local_interfaces[local_kindex_to_index[kindex]]->ipv4_netmask, + opal_ifindextomask(idx, + &local_interfaces[local_kindex_to_index[kindex]]->ipv4_netmask, sizeof(int)); break; case AF_INET6: @@ -357,12 +357,12 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(void) continue; } - local_interfaces[local_kindex_to_index[kindex]]->ipv6_address + local_interfaces[local_kindex_to_index[kindex]]->ipv6_address = (struct sockaddr_storage*) malloc(sizeof(local_addr)); - memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv6_address, + memcpy(local_interfaces[local_kindex_to_index[kindex]]->ipv6_address, &local_addr, sizeof(local_addr)); - opal_ifindextomask(idx, - &local_interfaces[local_kindex_to_index[kindex]]->ipv6_netmask, + opal_ifindextomask(idx, + &local_interfaces[local_kindex_to_index[kindex]]->ipv6_netmask, sizeof(int)); break; default: @@ -382,10 +382,10 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(void) } /* * Note that this routine must be called with the lock on the process - * already held. Insert a btl instance into the proc array and assign + * already held. Insert a btl instance into the proc array and assign * it an address. */ -int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, +int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, mca_btl_base_endpoint_t* btl_endpoint ) { struct sockaddr_storage endpoint_addr_ss; @@ -456,10 +456,10 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, return OPAL_ERR_OUT_OF_RESOURCE; } peer_interfaces[index] = (mca_btl_tcp_interface_t *) malloc(sizeof(mca_btl_tcp_interface_t)); - mca_btl_tcp_initialise_interface(peer_interfaces[index], + mca_btl_tcp_initialise_interface(peer_interfaces[index], endpoint_addr->addr_ifkindex, index); - } - + } + /* * in case one of the peer addresses is already in use, * mark the complete peer interface as 'not available' @@ -472,13 +472,13 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, case AF_INET: peer_interfaces[index]->ipv4_address = (struct sockaddr_storage*) malloc(sizeof(endpoint_addr_ss)); peer_interfaces[index]->ipv4_endpoint_addr = endpoint_addr; - memcpy(peer_interfaces[index]->ipv4_address, + memcpy(peer_interfaces[index]->ipv4_address, &endpoint_addr_ss, sizeof(endpoint_addr_ss)); break; case AF_INET6: peer_interfaces[index]->ipv6_address = (struct sockaddr_storage*) malloc(sizeof(endpoint_addr_ss)); peer_interfaces[index]->ipv6_endpoint_addr = endpoint_addr; - memcpy(peer_interfaces[index]->ipv6_address, + memcpy(peer_interfaces[index]->ipv6_address, &endpoint_addr_ss, sizeof(endpoint_addr_ss)); break; default: @@ -492,7 +492,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, } /* - * assign weights to each possible pair of interfaces + * assign weights to each possible pair of interfaces */ perm_size = num_local_interfaces; @@ -502,7 +502,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, weights = (enum mca_btl_tcp_connection_quality**) malloc(perm_size * sizeof(enum mca_btl_tcp_connection_quality*)); - + best_addr = (mca_btl_tcp_addr_t ***) malloc(perm_size * sizeof(mca_btl_tcp_addr_t **)); for(i = 0; i < perm_size; ++i) { @@ -514,7 +514,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, sizeof(mca_btl_tcp_addr_t *)); memset(best_addr[i], 0, perm_size * sizeof(mca_btl_tcp_addr_t *)); } - + for(i=0; iipv6_endpoint_addr; continue; - } + } } /* for each peer interface */ } /* for each local interface */ @@ -605,8 +605,8 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, /* Can only find the best set of connections when the number of * interfaces is not too big. When it gets larger, we fall back - * to a simpler and faster (and not as optimal) algorithm. - * See ticket https://svn.open-mpi.org/trac/ompi/ticket/2031 + * to a simpler and faster (and not as optimal) algorithm. + * See ticket https://svn.open-mpi.org/trac/ompi/ticket/2031 * for more details about this issue. */ if (perm_size <= MAX_PERMUTATION_INTERFACES) { memset(a, 0, perm_size * sizeof(int)); @@ -618,10 +618,10 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, for(i = 0; i < perm_size; ++i) { if(best_assignment[i] > num_peer_interfaces || weights[i][best_assignment[i]] == CQ_NO_CONNECTION - || peer_interfaces[best_assignment[i]]->inuse + || peer_interfaces[best_assignment[i]]->inuse || NULL == peer_interfaces[best_assignment[i]]) { continue; - } + } peer_interfaces[best_assignment[i]]->inuse++; btl_endpoint->endpoint_addr = best_addr[i][best_assignment[i]]; btl_endpoint->endpoint_addr->addr_inuse++; @@ -735,7 +735,7 @@ mca_btl_tcp_proc_t* mca_btl_tcp_proc_lookup(const opal_process_name_t *name) { mca_btl_tcp_proc_t* proc = NULL; OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock); - opal_proc_table_get_value(&mca_btl_tcp_component.tcp_procs, + opal_proc_table_get_value(&mca_btl_tcp_component.tcp_procs, *name, (void**)&proc); OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock); return proc; @@ -818,7 +818,7 @@ bool mca_btl_tcp_proc_tosocks(mca_btl_tcp_addr_t* proc_addr, opal_output( 0, "mca_btl_tcp_proc: unknown af_family received: %d\n", proc_addr->addr_family ); return false; - } + } return true; } diff --git a/opal/mca/btl/tcp/btl_tcp_proc.h b/opal/mca/btl/tcp/btl_tcp_proc.h index 2f7312f7be9..5e56cd7deab 100644 --- a/opal/mca/btl/tcp/btl_tcp_proc.h +++ b/opal/mca/btl/tcp/btl_tcp_proc.h @@ -5,15 +5,15 @@ * 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, + * 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 Oracle and/or its affiliates. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,16 +44,16 @@ struct mca_btl_tcp_proc_t { struct mca_btl_tcp_addr_t* proc_addrs; /**< array of addresses exported by peer */ - size_t proc_addr_count; + size_t proc_addr_count; /**< number of addresses published by endpoint */ - struct mca_btl_base_endpoint_t **proc_endpoints; - /**< array of endpoints that have been created to access this proc */ + struct mca_btl_base_endpoint_t **proc_endpoints; + /**< array of endpoints that have been created to access this proc */ - size_t proc_endpoint_count; + size_t proc_endpoint_count; /**< number of endpoints */ - opal_mutex_t proc_lock; + opal_mutex_t proc_lock; /**< lock to protect against concurrent access to proc state */ }; typedef struct mca_btl_tcp_proc_t mca_btl_tcp_proc_t; @@ -95,7 +95,7 @@ typedef struct mca_btl_tcp_interface_t mca_btl_tcp_interface_t; * describes the quality of a possible connection between a local and * a remote network interface */ -enum mca_btl_tcp_connection_quality { +enum mca_btl_tcp_connection_quality { CQ_NO_CONNECTION, CQ_PRIVATE_DIFFERENT_NETWORK, CQ_PRIVATE_SAME_NETWORK, diff --git a/opal/mca/btl/tcp/configure.m4 b/opal/mca/btl/tcp/configure.m4 index e333cc8b450..cb68705be8c 100644 --- a/opal/mca/btl/tcp/configure.m4 +++ b/opal/mca/btl/tcp/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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$ # @@ -24,9 +24,9 @@ AC_DEFUN([MCA_opal_btl_tcp_CONFIG],[ AC_CONFIG_FILES([opal/mca/btl/tcp/Makefile]) # check for sockaddr_in (a good sign we have TCP) - AC_CHECK_TYPES([struct sockaddr_in], + AC_CHECK_TYPES([struct sockaddr_in], [$1], - [$2], + [$2], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include diff --git a/opal/mca/btl/tcp/help-mpi-btl-tcp.txt b/opal/mca/btl/tcp/help-mpi-btl-tcp.txt index b53e6cc511d..6f7c0e867e1 100644 --- a/opal/mca/btl/tcp/help-mpi-btl-tcp.txt +++ b/opal/mca/btl/tcp/help-mpi-btl-tcp.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's TCP support diff --git a/opal/mca/btl/template/Makefile.am b/opal/mca/btl/template/Makefile.am index 2a7a074a9a8..4257b99fb98 100644 --- a/opal/mca/btl/template/Makefile.am +++ b/opal/mca/btl/template/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/btl/template/btl_template.c b/opal/mca/btl/template/btl_template.c index 8387c6e239c..7c89a93b843 100644 --- a/opal/mca/btl/template/btl_template.c +++ b/opal/mca/btl/template/btl_template.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,12 +23,12 @@ #include #include "opal/class/opal_bitmap.h" #include "opal/mca/btl/btl.h" -#include "opal/datatype/opal_convertor.h" -#include "opal/mca/mpool/base/base.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/datatype/opal_convertor.h" +#include "opal/mca/mpool/base/base.h" +#include "opal/mca/mpool/mpool.h" #include "btl_template.h" -#include "btl_template_frag.h" +#include "btl_template_frag.h" #include "btl_template_proc.h" #include "btl_template_endpoint.h" @@ -57,10 +57,10 @@ mca_btl_template_module_t mca_btl_template_module = { */ int mca_btl_template_add_procs( - struct mca_btl_base_module_t* btl, - size_t nprocs, - struct opal_proc_t **opal_procs, - struct mca_btl_base_endpoint_t** peers, + struct mca_btl_base_module_t* btl, + size_t nprocs, + struct opal_proc_t **opal_procs, + struct mca_btl_base_endpoint_t** peers, opal_bitmap_t* reachable) { mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*)btl; @@ -85,15 +85,15 @@ int mca_btl_template_add_procs( } /* - * Check to make sure that the peer has at least as many interface - * addresses exported as we are trying to use. If not, then + * Check to make sure that the peer has at least as many interface + * addresses exported as we are trying to use. If not, then * don't bind this BTL instance to the proc. */ OPAL_THREAD_LOCK(&template_proc->proc_lock); /* The btl_proc datastructure is shared by all TEMPLATE BTL - * instances that are trying to reach this destination. + * instances that are trying to reach this destination. * Cache the peer instance on the btl_proc. */ template_endpoint = OBJ_NEW(mca_btl_template_endpoint_t); @@ -118,9 +118,9 @@ int mca_btl_template_add_procs( return OPAL_SUCCESS; } -int mca_btl_template_del_procs(struct mca_btl_base_module_t* btl, - size_t nprocs, - struct opal_proc_t **procs, +int mca_btl_template_del_procs(struct mca_btl_base_module_t* btl, + size_t nprocs, + struct opal_proc_t **procs, struct mca_btl_base_endpoint_t ** peers) { /* TODO */ @@ -133,9 +133,9 @@ int mca_btl_template_del_procs(struct mca_btl_base_module_t* btl, */ int mca_btl_template_register( - struct mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_module_recv_cb_fn_t cbfunc, + struct mca_btl_base_module_t* btl, + mca_btl_base_tag_t tag, + mca_btl_base_module_recv_cb_fn_t cbfunc, void* cbdata) { return OPAL_SUCCESS; @@ -156,20 +156,20 @@ mca_btl_base_descriptor_t* mca_btl_template_alloc( size_t size, uint32_t flags) { - mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; + mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; mca_btl_template_frag_t* frag = NULL; - - if(size <= btl->btl_eager_limit){ - MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(template_btl, frag); - } else { - MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(template_btl, frag); + + if(size <= btl->btl_eager_limit){ + MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(template_btl, frag); + } else { + MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(template_btl, frag); } if( OPAL_UNLIKELY(NULL != frag) ) { return NULL; } - + frag->segment.seg_len = size; - frag->base.des_flags = 0; + frag->base.des_flags = 0; return (mca_btl_base_descriptor_t*)frag; } @@ -179,23 +179,23 @@ mca_btl_base_descriptor_t* mca_btl_template_alloc( */ int mca_btl_template_free( - struct mca_btl_base_module_t* btl, - mca_btl_base_descriptor_t* des) + struct mca_btl_base_module_t* btl, + mca_btl_base_descriptor_t* des) { - mca_btl_template_frag_t* frag = (mca_btl_template_frag_t*)des; + mca_btl_template_frag_t* frag = (mca_btl_template_frag_t*)des; if(frag->size == 0) { #if MCA_BTL_HAS_MPOOL OBJ_RELEASE(frag->registration); #endif - MCA_BTL_TEMPLATE_FRAG_RETURN_USER(btl, frag); - } else if(frag->size == btl->btl_eager_limit){ - MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag); + MCA_BTL_TEMPLATE_FRAG_RETURN_USER(btl, frag); + } else if(frag->size == btl->btl_eager_limit){ + MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag); } else if(frag->size == btl->btl_max_send_size) { - MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag); + MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag); } else { return OPAL_ERR_BAD_PARAM; } - return OPAL_SUCCESS; + return OPAL_SUCCESS; } /** @@ -220,7 +220,7 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src( uint32_t iov_count = 1; size_t max_data = *size; int rc; - + /* * if we aren't pinning the data and the requested size is less @@ -245,12 +245,12 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src( frag->segment.seg_len = max_data + reserve; } - /* + /* * otherwise pack as much data as we can into a fragment * that is the max send size. */ else { - + MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(btl, frag); if(OPAL_UNLIKELY(NULL == frag)) { return NULL; @@ -260,10 +260,10 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src( } iov.iov_len = max_data; iov.iov_base = (unsigned char*) frag->segment.seg_addr.pval + reserve; - + rc = opal_convertor_pack(convertor, &iov, &iov_count, &max_data ); *size = max_data; - + if( rc < 0 ) { MCA_BTL_TEMPLATE_FRAG_RETURN_MAX(btl, frag); return NULL; @@ -287,16 +287,16 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src( * @param tag (IN) The tag value used to notify the peer. */ -int mca_btl_template_send( +int mca_btl_template_send( struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* endpoint, - struct mca_btl_base_descriptor_t* descriptor, + struct mca_btl_base_descriptor_t* descriptor, mca_btl_base_tag_t tag) - + { /* mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; */ - mca_btl_template_frag_t* frag = (mca_btl_template_frag_t*)descriptor; - frag->endpoint = endpoint; + mca_btl_template_frag_t* frag = (mca_btl_template_frag_t*)descriptor; + frag->endpoint = endpoint; /* TODO */ return OPAL_ERR_NOT_IMPLEMENTED; } @@ -318,7 +318,7 @@ int mca_btl_template_put (struct mca_btl_base_module_t *btl, { /* mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; */ /* TODO */ - return OPAL_ERR_NOT_IMPLEMENTED; + return OPAL_ERR_NOT_IMPLEMENTED; } @@ -339,7 +339,7 @@ int mca_btl_template_get (struct mca_btl_base_module_t *btl, { /* mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; */ /* TODO */ - return OPAL_ERR_NOT_IMPLEMENTED; + return OPAL_ERR_NOT_IMPLEMENTED; } /** @@ -396,7 +396,7 @@ int mca_btl_template_deregister_mem (struct mca_btl_base_module_t* btl, int mca_btl_template_finalize(struct mca_btl_base_module_t* btl) { - mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; + mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; OBJ_DESTRUCT(&template_btl->template_lock); OBJ_DESTRUCT(&template_btl->template_frag_eager); OBJ_DESTRUCT(&template_btl->template_frag_max); diff --git a/opal/mca/btl/template/btl_template.h b/opal/mca/btl/template/btl_template.h index efd7b889d3d..06268e0e033 100644 --- a/opal/mca/btl/template/btl_template.h +++ b/opal/mca/btl/template/btl_template.h @@ -6,16 +6,16 @@ * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -32,7 +32,7 @@ #include "opal/mca/event/event.h" #include "opal/mca/btl/btl.h" #include "opal/mca/btl/base/base.h" -#include "opal/mca/mpool/mpool.h" +#include "opal/mca/mpool/mpool.h" BEGIN_C_DECLS @@ -44,7 +44,7 @@ BEGIN_C_DECLS struct mca_btl_template_component_t { mca_btl_base_component_3_0_0_t super; /**< base BTL component */ - + uint32_t template_num_btls; /**< number of hcas available to the TEMPLATE component */ @@ -66,12 +66,12 @@ struct mca_btl_template_component_t { opal_mutex_t template_lock; /**< lock for accessing module state */ - char* template_mpool_name; - /**< name of memory pool */ + char* template_mpool_name; + /**< name of memory pool */ bool leave_pinned; /**< pin memory on first use and leave pinned */ -}; +}; typedef struct mca_btl_template_component_t mca_btl_template_component_t; OPAL_MODULE_DECLSPEC extern mca_btl_template_component_t mca_btl_template_component; @@ -93,20 +93,20 @@ struct mca_btl_template_module_t { #if MCA_BTL_HAS_MPOOL struct mca_mpool_base_module_t* template_mpool; #endif -}; +}; typedef struct mca_btl_template_module_t mca_btl_template_module_t; extern mca_btl_template_module_t mca_btl_template_module; /** * TEMPLATE component initialization. - * + * * @param num_btl_modules (OUT) Number of BTLs returned in BTL array. * @param allow_multi_user_threads (OUT) Flag indicating wether BTL supports user threads (TRUE) * @param have_hidden_threads (OUT) Flag indicating wether BTL uses threads (TRUE) */ extern mca_btl_base_module_t** mca_btl_template_component_init( - int *num_btl_modules, + int *num_btl_modules, bool allow_multi_user_threads, bool have_hidden_threads ); @@ -121,7 +121,7 @@ extern int mca_btl_template_component_progress(void); /** * Cleanup any resources held by the BTL. - * + * * @param btl BTL instance. * @return OPAL_SUCCESS or error status on failure. */ @@ -133,14 +133,14 @@ extern int mca_btl_template_finalize( /** * PML->BTL notification of change in the process list. - * + * * @param btl (IN) * @param nprocs (IN) Number of processes * @param procs (IN) Set of processes * @param peers (OUT) Set of (optional) peer addressing info. * @param peers (IN/OUT) Set of processes that are reachable via this BTL. * @return OPAL_SUCCESS or error status on failure. - * + * */ extern int mca_btl_template_add_procs( @@ -182,7 +182,7 @@ extern int mca_btl_template_del_procs( extern int mca_btl_template_send( struct mca_btl_base_module_t* btl, struct mca_btl_base_endpoint_t* btl_peer, - struct mca_btl_base_descriptor_t* descriptor, + struct mca_btl_base_descriptor_t* descriptor, mca_btl_base_tag_t tag ); @@ -308,11 +308,11 @@ int mca_btl_template_deregister_mem (struct mca_btl_base_module_t* btl, */ extern int mca_btl_template_register( - struct mca_btl_base_module_t* btl, - mca_btl_base_tag_t tag, - mca_btl_base_module_recv_cb_fn_t cbfunc, - void* cbdata); - + struct mca_btl_base_module_t* btl, + mca_btl_base_tag_t tag, + mca_btl_base_module_recv_cb_fn_t cbfunc, + void* cbdata); + /** * Allocate a descriptor with a segment of the requested size. * Note that the BTL layer may choose to return a smaller size @@ -327,7 +327,7 @@ extern mca_btl_base_descriptor_t* mca_btl_template_alloc( struct mca_btl_base_endpoint_t* endpoint, uint8_t order, size_t size, - uint32_t flags); + uint32_t flags); /** @@ -338,9 +338,9 @@ extern mca_btl_base_descriptor_t* mca_btl_template_alloc( */ extern int mca_btl_template_free( - struct mca_btl_base_module_t* btl, - mca_btl_base_descriptor_t* des); - + struct mca_btl_base_module_t* btl, + mca_btl_base_descriptor_t* des); + /** * Prepare a descriptor for send/rdma using the supplied @@ -353,7 +353,7 @@ extern int mca_btl_template_free( * @param endpoint (IN) BTL peer addressing * @param convertor (IN) Data type convertor * @param reserve (IN) Additional bytes requested by upper layer to precede user data - * @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT) + * @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT) */ mca_btl_base_descriptor_t* mca_btl_template_prepare_src( diff --git a/opal/mca/btl/template/btl_template_component.c b/opal/mca/btl/template/btl_template_component.c index 53f39383a3f..9bb2bad342a 100644 --- a/opal/mca/btl/template/btl_template_component.c +++ b/opal/mca/btl/template/btl_template_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -24,12 +24,12 @@ #include "opal/constants.h" #include "opal/mca/event/event.h" #include "opal/mca/btl/btl.h" -#include "opal/mca/mpool/base/base.h" -#include "opal/mca/btl/base/base.h" +#include "opal/mca/mpool/base/base.h" +#include "opal/mca/btl/base/base.h" #include "btl_template.h" #include "btl_template_frag.h" -#include "btl_template_endpoint.h" +#include "btl_template_endpoint.h" /** * Register any MCA parameters associated with this component @@ -74,12 +74,12 @@ static int mca_btl_template_component_open(void) } static int mca_btl_template_component_register(void) -{ +{ /* initialize state */ mca_btl_template_component.template_num_btls=0; mca_btl_template_component.template_btls=NULL; - - /* initialize objects */ + + /* initialize objects */ OBJ_CONSTRUCT(&mca_btl_template_component.template_procs, opal_list_t); /* register TEMPLATE component parameters */ @@ -137,7 +137,7 @@ static int mca_btl_template_component_close(void) * (3) register BTL parameters with the MCA */ -mca_btl_base_module_t** mca_btl_template_component_init(int *num_btl_modules, +mca_btl_base_module_t** mca_btl_template_component_init(int *num_btl_modules, bool enable_progress_threads, bool enable_mpi_threads) { diff --git a/opal/mca/btl/template/btl_template_endpoint.c b/opal/mca/btl/template/btl_template_endpoint.c index b9795b9dbff..71d205de07e 100644 --- a/opal/mca/btl/template/btl_template_endpoint.c +++ b/opal/mca/btl/template/btl_template_endpoint.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -21,7 +21,7 @@ #include #include #include "btl_template.h" -#include "btl_template_endpoint.h" +#include "btl_template_endpoint.h" #include "btl_template_proc.h" #include "btl_template_frag.h" @@ -48,8 +48,8 @@ static void mca_btl_template_endpoint_destruct(mca_btl_base_endpoint_t* endpoint OBJ_CLASS_INSTANCE( - mca_btl_template_endpoint_t, - opal_list_item_t, - mca_btl_template_endpoint_construct, + mca_btl_template_endpoint_t, + opal_list_item_t, + mca_btl_template_endpoint_construct, mca_btl_template_endpoint_destruct); diff --git a/opal/mca/btl/template/btl_template_endpoint.h b/opal/mca/btl/template/btl_template_endpoint.h index 54fa21ac0d8..9e497a46cef 100644 --- a/opal/mca/btl/template/btl_template_endpoint.h +++ b/opal/mca/btl/template/btl_template_endpoint.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/mca/btl/template/btl_template_frag.c b/opal/mca/btl/template/btl_template_frag.c index eef57b93c63..b22d38138ce 100644 --- a/opal/mca/btl/template/btl_template_frag.c +++ b/opal/mca/btl/template/btl_template_frag.c @@ -1,47 +1,47 @@ -#include "btl_template_frag.h" +#include "btl_template_frag.h" -static void mca_btl_template_frag_eager_constructor(mca_btl_template_frag_t* frag) -{ +static void mca_btl_template_frag_eager_constructor(mca_btl_template_frag_t* frag) +{ frag->registration = NULL; - frag->size = mca_btl_template_module.super.btl_eager_limit; + frag->size = mca_btl_template_module.super.btl_eager_limit; } -static void mca_btl_template_frag_max_constructor(mca_btl_template_frag_t* frag) -{ +static void mca_btl_template_frag_max_constructor(mca_btl_template_frag_t* frag) +{ frag->registration = NULL; - frag->size = mca_btl_template_module.super.btl_max_send_size; + frag->size = mca_btl_template_module.super.btl_max_send_size; } -static void mca_btl_template_frag_user_constructor(mca_btl_template_frag_t* frag) -{ - frag->size = 0; +static void mca_btl_template_frag_user_constructor(mca_btl_template_frag_t* frag) +{ + frag->size = 0; frag->registration = NULL; } OBJ_CLASS_INSTANCE( - mca_btl_template_frag_t, - mca_btl_base_descriptor_t, - NULL, - NULL); + mca_btl_template_frag_t, + mca_btl_base_descriptor_t, + NULL, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_template_frag_eager_t, - mca_btl_base_descriptor_t, - mca_btl_template_frag_eager_constructor, - NULL); + mca_btl_template_frag_eager_t, + mca_btl_base_descriptor_t, + mca_btl_template_frag_eager_constructor, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_template_frag_max_t, - mca_btl_base_descriptor_t, - mca_btl_template_frag_max_constructor, - NULL); + mca_btl_template_frag_max_t, + mca_btl_base_descriptor_t, + mca_btl_template_frag_max_constructor, + NULL); OBJ_CLASS_INSTANCE( - mca_btl_template_frag_user_t, - mca_btl_base_descriptor_t, - mca_btl_template_frag_user_constructor, - NULL); + mca_btl_template_frag_user_t, + mca_btl_base_descriptor_t, + mca_btl_template_frag_user_constructor, + NULL); diff --git a/opal/mca/btl/template/btl_template_frag.h b/opal/mca/btl/template/btl_template_frag.h index d09e23b5335..aab1f1502ca 100644 --- a/opal/mca/btl/template/btl_template_frag.h +++ b/opal/mca/btl/template/btl_template_frag.h @@ -6,16 +6,16 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -25,7 +25,7 @@ #define MCA_BTL_TEMPLATE_FRAG_ALIGN (8) #include "opal_config.h" -#include "btl_template.h" +#include "btl_template.h" BEGIN_C_DECLS @@ -33,29 +33,29 @@ BEGIN_C_DECLS * TEMPLATE send fratemplateent derived type. */ struct mca_btl_template_frag_t { - mca_btl_base_descriptor_t base; - mca_btl_base_segment_t segment; - struct mca_btl_base_endpoint_t *endpoint; + mca_btl_base_descriptor_t base; + mca_btl_base_segment_t segment; + struct mca_btl_base_endpoint_t *endpoint; mca_btl_base_header_t *hdr; - size_t size; + size_t size; #if MCA_BTL_HAS_MPOOL struct mca_mpool_base_registration_t* registration; #endif -}; -typedef struct mca_btl_template_frag_t mca_btl_template_frag_t; -OBJ_CLASS_DECLARATION(mca_btl_template_frag_t); +}; +typedef struct mca_btl_template_frag_t mca_btl_template_frag_t; +OBJ_CLASS_DECLARATION(mca_btl_template_frag_t); -typedef struct mca_btl_template_frag_t mca_btl_template_frag_eager_t; - -OBJ_CLASS_DECLARATION(mca_btl_template_frag_eager_t); +typedef struct mca_btl_template_frag_t mca_btl_template_frag_eager_t; -typedef struct mca_btl_template_frag_t mca_btl_template_frag_max_t; - -OBJ_CLASS_DECLARATION(mca_btl_template_frag_max_t); +OBJ_CLASS_DECLARATION(mca_btl_template_frag_eager_t); -typedef struct mca_btl_template_frag_t mca_btl_template_frag_user_t; - -OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t); +typedef struct mca_btl_template_frag_t mca_btl_template_frag_max_t; + +OBJ_CLASS_DECLARATION(mca_btl_template_frag_max_t); + +typedef struct mca_btl_template_frag_t mca_btl_template_frag_user_t; + +OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t); /* diff --git a/opal/mca/btl/template/btl_template_proc.c b/opal/mca/btl/template/btl_template_proc.c index a08c7036d2f..76f6f52f677 100644 --- a/opal/mca/btl/template/btl_template_proc.c +++ b/opal/mca/btl/template/btl_template_proc.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -25,8 +25,8 @@ static void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc); static void mca_btl_template_proc_destruct(mca_btl_template_proc_t* proc); -OBJ_CLASS_INSTANCE(mca_btl_template_proc_t, - opal_list_item_t, mca_btl_template_proc_construct, +OBJ_CLASS_INSTANCE(mca_btl_template_proc_t, + opal_list_item_t, mca_btl_template_proc_construct, mca_btl_template_proc_destruct); void mca_btl_template_proc_construct(mca_btl_template_proc_t* template_proc) @@ -93,7 +93,7 @@ static mca_btl_template_proc_t* mca_btl_template_proc_lookup_opal(opal_proc_t* o /* * Create a TEMPLATE process structure. There is a one-to-one correspondence * between a opal_proc_t and a mca_btl_template_proc_t instance. We cache - * additional data (specifically the list of mca_btl_template_endpoint_t instances, + * additional data (specifically the list of mca_btl_template_endpoint_t instances, * and published addresses) associated w/ a given destination on this * datastructure. */ @@ -127,7 +127,7 @@ mca_btl_template_proc_t* mca_btl_template_proc_create(opal_proc_t* opal_proc) module_proc->proc_addr_count = 1; /* XXX: Right now, there can be only 1 peer associated - * with a proc. Needs a little bit change in + * with a proc. Needs a little bit change in * mca_btl_template_proc_t to allow on demand increasing of * number of endpoints for this proc */ @@ -144,10 +144,10 @@ mca_btl_template_proc_t* mca_btl_template_proc_create(opal_proc_t* opal_proc) /* * Note that this routine must be called with the lock on the process - * already held. Insert a btl instance into the proc array and assign + * already held. Insert a btl instance into the proc array and assign * it an address. */ -int mca_btl_template_proc_insert(mca_btl_template_proc_t* module_proc, +int mca_btl_template_proc_insert(mca_btl_template_proc_t* module_proc, mca_btl_base_endpoint_t* module_endpoint) { /* insert into endpoint array */ diff --git a/opal/mca/btl/template/btl_template_proc.h b/opal/mca/btl/template/btl_template_proc.h index 09e9afded8b..5e19d8400c8 100644 --- a/opal/mca/btl/template/btl_template_proc.h +++ b/opal/mca/btl/template/btl_template_proc.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -33,22 +33,22 @@ BEGIN_C_DECLS * BTL instance that attempts to open a connection to the process. */ struct mca_btl_template_proc_t { - opal_list_item_t super; + opal_list_item_t super; /**< allow proc to be placed on a list */ - opal_proc_t *proc_opal; + opal_proc_t *proc_opal; /**< pointer to corresponding opal_proc_t */ - size_t proc_addr_count; + size_t proc_addr_count; /**< number of addresses published by endpoint */ - struct mca_btl_base_endpoint_t **proc_endpoints; - /**< array of endpoints that have been created to access this proc */ + struct mca_btl_base_endpoint_t **proc_endpoints; + /**< array of endpoints that have been created to access this proc */ - size_t proc_endpoint_count; + size_t proc_endpoint_count; /**< number of endpoints */ - opal_mutex_t proc_lock; + opal_mutex_t proc_lock; /**< lock to protect against concurrent access to proc state */ }; typedef struct mca_btl_template_proc_t mca_btl_template_proc_t; diff --git a/opal/mca/btl/template/netpipe-btl-template.txt b/opal/mca/btl/template/netpipe-btl-template.txt index 8550098d914..2581918fdc2 100644 --- a/opal/mca/btl/template/netpipe-btl-template.txt +++ b/opal/mca/btl/template/netpipe-btl-template.txt @@ -1,12 +1,12 @@ # -# For your btl you may want special mca parameters for a benchmark -# such as netpipe, or better yet, your application, one can always +# For your btl you may want special mca parameters for a benchmark +# such as netpipe, or better yet, your application, one can always # dream. # # Example: -# btl_template_flags=1 -# btl_template_eager_limit=4096 +# btl_template_flags=1 +# btl_template_eager_limit=4096 diff --git a/opal/mca/btl/ugni/Makefile.am b/opal/mca/btl/ugni/Makefile.am index cff4f734a47..371b83e2cf0 100644 --- a/opal/mca/btl/ugni/Makefile.am +++ b/opal/mca/btl/ugni/Makefile.am @@ -3,9 +3,9 @@ # Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2011 UT-Battelle, LLC. All rights reserved. -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/btl/ugni/btl_ugni.h b/opal/mca/btl/ugni/btl_ugni.h index d6ea8a68114..0fad0465bb7 100644 --- a/opal/mca/btl/ugni/btl_ugni.h +++ b/opal/mca/btl/ugni/btl_ugni.h @@ -194,7 +194,7 @@ int mca_btl_ugni_module_init (mca_btl_ugni_module_t *ugni_module, opal_common_ugni_device_t *device); /** - * BML->BTL notification of change in the process list. + * BML->BTL notification of change in the process list. * * location: btl_ugni_add_procs.c * @@ -246,7 +246,7 @@ mca_btl_ugni_send (struct mca_btl_base_module_t *btl, mca_btl_base_tag_t tag); /** - * Initiate an immediate blocking send. + * Initiate an immediate blocking send. * * location: btl_ugni_sendi.c * @@ -313,7 +313,7 @@ typedef struct mca_btl_ugni_reg_t { mca_btl_base_registration_handle_t handle; } mca_btl_ugni_reg_t; -/* Global structures */ +/* Global structures */ OPAL_MODULE_DECLSPEC extern mca_btl_ugni_component_t mca_btl_ugni_component; OPAL_MODULE_DECLSPEC extern mca_btl_ugni_module_t mca_btl_ugni_module; diff --git a/opal/mca/btl/ugni/btl_ugni_add_procs.c b/opal/mca/btl/ugni/btl_ugni_add_procs.c index b7e5d1f8280..37d6d9dcd3a 100644 --- a/opal/mca/btl/ugni/btl_ugni_add_procs.c +++ b/opal/mca/btl/ugni/btl_ugni_add_procs.c @@ -234,7 +234,7 @@ static int ugni_reg_rdma_mem (void *reg_data, void *base, size_t size, if (ugni_module->reg_count >= ugni_module->reg_max) { return OPAL_ERR_OUT_OF_RESOURCE; } - + OPAL_THREAD_LOCK(&ugni_module->device->dev_lock); rc = GNI_MemRegister (ugni_module->device->dev_handle, (uint64_t) base, size, NULL, GNI_MEM_READWRITE | GNI_MEM_RELAXED_PI_ORDERING, diff --git a/opal/mca/btl/ugni/btl_ugni_component.c b/opal/mca/btl/ugni/btl_ugni_component.c index 1e0fc91555d..5941e18417d 100644 --- a/opal/mca/btl/ugni/btl_ugni_component.c +++ b/opal/mca/btl/ugni/btl_ugni_component.c @@ -397,7 +397,7 @@ mca_btl_ugni_progress_datagram (mca_btl_ugni_module_t *ugni_module) /* check for datagram completion */ OPAL_THREAD_LOCK(&ugni_module->device->dev_lock); /* TODO: may not need lock for this function */ grc = GNI_PostDataProbeById (ugni_module->device->dev_handle, &datagram_id); - OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); + OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); if (OPAL_LIKELY(GNI_RC_SUCCESS != grc)) { return 0; } @@ -417,7 +417,7 @@ mca_btl_ugni_progress_datagram (mca_btl_ugni_module_t *ugni_module) OPAL_THREAD_LOCK(&ugni_module->device->dev_lock); /* TODO: may not need lock for this function */ grc = GNI_EpPostDataWaitById (handle, datagram_id, -1, &post_state, &remote_addr, &remote_id); - OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); + OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); if (GNI_RC_SUCCESS != grc) { BTL_ERROR(("GNI_EpPostDataWaitById failed with rc = %d", grc)); return opal_common_rc_ugni_to_opal (grc); diff --git a/opal/mca/btl/ugni/btl_ugni_endpoint.h b/opal/mca/btl/ugni/btl_ugni_endpoint.h index 79908471f90..6e6856ba9a8 100644 --- a/opal/mca/btl/ugni/btl_ugni_endpoint.h +++ b/opal/mca/btl/ugni/btl_ugni_endpoint.h @@ -10,7 +10,7 @@ * $HEADER$ */ -#ifndef MCA_BTL_UGNI_ENDPOINT_H +#ifndef MCA_BTL_UGNI_ENDPOINT_H #define MCA_BTL_UGNI_ENDPOINT_H #include "btl_ugni.h" diff --git a/opal/mca/btl/ugni/btl_ugni_progress_thread.c b/opal/mca/btl/ugni/btl_ugni_progress_thread.c index 559f522468f..2af2a4ad754 100644 --- a/opal/mca/btl/ugni/btl_ugni_progress_thread.c +++ b/opal/mca/btl/ugni/btl_ugni_progress_thread.c @@ -76,7 +76,7 @@ int mca_btl_ugni_spawn_progress_thread(struct mca_btl_base_module_t *btl) goto fn_exit; } - rc = pthread_create(&mca_btl_ugni_progress_thread_id, + rc = pthread_create(&mca_btl_ugni_progress_thread_id, &attr, mca_btl_ugni_prog_thread_fn, (void *)btl); if (0 != rc) { BTL_ERROR(("btl/ugni pthread_create returned %s ",strerror(rc))); diff --git a/opal/mca/btl/vader/Makefile.am b/opal/mca/btl/vader/Makefile.am index a8ce0dfb111..deaf5e06cb2 100644 --- a/opal/mca/btl/vader/Makefile.am +++ b/opal/mca/btl/vader/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2009 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/btl/vader/btl_vader_fifo.h b/opal/mca/btl/vader/btl_vader_fifo.h index d63ffb49ad2..5f6488b44bf 100644 --- a/opal/mca/btl/vader/btl_vader_fifo.h +++ b/opal/mca/btl/vader/btl_vader_fifo.h @@ -13,7 +13,7 @@ * Copyright (c) 2006-2007 Voltaire. All rights reserved. * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2014 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -150,7 +150,7 @@ static inline mca_btl_vader_hdr_t *vader_fifo_read (vader_fifo_t *fifo, struct m } opal_atomic_wmb (); - return hdr; + return hdr; } static inline void vader_fifo_init (vader_fifo_t *fifo) diff --git a/opal/mca/btl/vader/btl_vader_xpmem.c b/opal/mca/btl/vader/btl_vader_xpmem.c index 8ad57bb44a6..0836b6a195d 100644 --- a/opal/mca/btl/vader/btl_vader_xpmem.c +++ b/opal/mca/btl/vader/btl_vader_xpmem.c @@ -78,7 +78,7 @@ mca_mpool_base_registration_t *vader_get_registation (struct mca_btl_base_endpoi } /* start the new segment from the lower of the two bases */ - base = (uintptr_t) regs[i]->base < base ? (uintptr_t) regs[i]->base : base; + base = (uintptr_t) regs[i]->base < base ? (uintptr_t) regs[i]->base : base; (void)opal_atomic_add (®s[i]->ref_count, -1); diff --git a/opal/mca/btl/vader/btl_vader_xpmem.h b/opal/mca/btl/vader/btl_vader_xpmem.h index e040e26f309..4a4f3371e69 100644 --- a/opal/mca/btl/vader/btl_vader_xpmem.h +++ b/opal/mca/btl/vader/btl_vader_xpmem.h @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/common/Makefile.am b/opal/mca/common/Makefile.am index 33bbb5f2a33..4567c654307 100644 --- a/opal/mca/common/Makefile.am +++ b/opal/mca/common/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/common/cuda/Makefile.am b/opal/mca/common/cuda/Makefile.am index 77ed48d1da1..76b830ac6a7 100644 --- a/opal/mca/common/cuda/Makefile.am +++ b/opal/mca/common/cuda/Makefile.am @@ -5,16 +5,16 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2013 NVIDIA Corporation. All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/common/cuda/common_cuda.c b/opal/mca/common/cuda/common_cuda.c index 8568cc22b19..79104e4cea2 100644 --- a/opal/mca/common/cuda/common_cuda.c +++ b/opal/mca/common/cuda/common_cuda.c @@ -241,7 +241,7 @@ void mca_common_cuda_register_mca_variables(void) MCA_BASE_VAR_SCOPE_READONLY, &mca_common_cuda_verbose); - /* Control whether system buffers get CUDA pinned or not. Allows for + /* Control whether system buffers get CUDA pinned or not. Allows for * performance analysis. */ mca_common_cuda_register_memory = true; (void) mca_base_var_register("ompi", "mpi", "common_cuda", "register_memory", @@ -433,7 +433,7 @@ int mca_common_cuda_stage_one_init(void) } opal_argv_free(errmsgs); free(errmsg); - + if (true != stage_one_init_passed) { return 1; } @@ -506,7 +506,7 @@ static int mca_common_cuda_stage_two_init(opal_common_cuda_function_table_t *fta /** * This is the last phase of initialization. This is triggered when we examine * a buffer pointer and determine it is a GPU buffer. We then assume the user - * has selected their GPU and we can go ahead with all the CUDA related + * has selected their GPU and we can go ahead with all the CUDA related * initializations. If we get an error, just return. Cleanup of resources * will happen when fini is called. */ @@ -794,7 +794,7 @@ static int mca_common_cuda_stage_three_init(void) * Cleanup all CUDA resources. * * Note: Still figuring out how to get cuMemHostUnregister called from the smcuda sm - * mpool. Looks like with the memory pool from openib (grdma), the unregistering is + * mpool. Looks like with the memory pool from openib (grdma), the unregistering is * called as the free list is destructed. Not true for the sm mpool. This means we * are currently still leaking some host memory we registered with CUDA. */ @@ -842,7 +842,7 @@ void mca_common_cuda_fini(void) if (NULL != cuda_event_ipc_array[i]) { cuFunc.cuEventDestroy(cuda_event_ipc_array[i]); } - } + } } free(cuda_event_ipc_array); } @@ -909,7 +909,7 @@ void mca_common_cuda_fini(void) stage_one_init_ref_count); } stage_one_init_ref_count--; -} +} /** * Call the CUDA register function so we pin the memory in the CUDA @@ -944,7 +944,7 @@ void mca_common_cuda_register(void *ptr, size_t amount, char *msg) { /* If registering the memory fails, print a message and continue. * This is not a fatal error. */ opal_show_help("help-mpi-common-cuda.txt", "cuMemHostRegister failed", - true, ptr, amount, + true, ptr, amount, OPAL_PROC_MY_HOSTNAME, res, msg); } else { opal_output_verbose(20, mca_common_cuda_output, @@ -1090,7 +1090,7 @@ int cuda_getmemhandle(void *base, size_t size, mca_mpool_base_registration_t *ne * This function is called by the local side that called the cuda_getmemhandle. * There is nothing to be done so just return. */ -int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg) +int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg) { CUDA_DUMP_EVTHANDLE((100, ((mca_mpool_common_cuda_reg_t *)reg)->data.evtHandle, "cuda_ungetmemhandle")); opal_output_verbose(10, mca_common_cuda_output, @@ -1099,7 +1099,7 @@ int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg) return OPAL_SUCCESS; } -/* +/* * Open a memory handle that refers to remote memory so we can get an address * that works on the local side. This is the registration function for the * remote side of a transfer. newreg contains the new handle. hddrreg contains @@ -1144,8 +1144,8 @@ int cuda_openmemhandle(void *base, size_t size, mca_mpool_base_registration_t *n return OPAL_SUCCESS; } -/* - * Close a memory handle that refers to remote memory. +/* + * Close a memory handle that refers to remote memory. */ int cuda_closememhandle(void *reg_data, mca_mpool_base_registration_t *reg) { @@ -1263,7 +1263,7 @@ void mca_common_wait_stream_synchronize(mca_mpool_common_cuda_reg_t *rget_reg) * Start the asynchronous copy. Then record and save away an event that will * be queried to indicate the copy has completed. */ -int mca_common_cuda_memcpy(void *dst, void *src, size_t amount, char *msg, +int mca_common_cuda_memcpy(void *dst, void *src, size_t amount, char *msg, struct mca_btl_base_descriptor_t *frag, int *done) { CUresult result; @@ -1381,7 +1381,7 @@ int mca_common_cuda_memcpy(void *dst, void *src, size_t amount, char *msg, cuda_event_ipc_first_used = 0; } *done = 1; - } + } OPAL_THREAD_UNLOCK(&common_cuda_ipc_lock); return OPAL_SUCCESS; } @@ -1469,7 +1469,7 @@ int mca_common_cuda_record_htod_event(char *msg, struct mca_btl_base_descriptor_ return OPAL_ERROR; } cuda_event_htod_frag_array[cuda_event_htod_first_avail] = frag; - + /* Bump up the first available slot and number used by 1 */ cuda_event_htod_first_avail++; if (cuda_event_htod_first_avail >= cuda_event_max) { @@ -1641,9 +1641,9 @@ int progress_one_cuda_htod_event(struct mca_btl_base_descriptor_t **frag) { /** * Need to make sure the handle we are retrieving from the cache is still - * valid. Compare the cached handle to the one received. + * valid. Compare the cached handle to the one received. */ -int mca_common_cuda_memhandle_matches(mca_mpool_common_cuda_reg_t *new_reg, +int mca_common_cuda_memhandle_matches(mca_mpool_common_cuda_reg_t *new_reg, mca_mpool_common_cuda_reg_t *old_reg) { @@ -1652,16 +1652,16 @@ int mca_common_cuda_memhandle_matches(mca_mpool_common_cuda_reg_t *new_reg, } else { return 0; } - + } /* - * Function to dump memory handle information. This is based on + * Function to dump memory handle information. This is based on * definitions from cuiinterprocess_private.h. */ static void cuda_dump_memhandle(int verbose, void *memHandle, char *str) { - struct InterprocessMemHandleInternal + struct InterprocessMemHandleInternal { /* The first two entries are the CUinterprocessCtxHandle */ int64_t ctxId; /* unique (within a process) id of the sharing context */ @@ -1687,12 +1687,12 @@ static void cuda_dump_memhandle(int verbose, void *memHandle, char *str) { } /* - * Function to dump memory handle information. This is based on + * Function to dump memory handle information. This is based on * definitions from cuiinterprocess_private.h. */ static void cuda_dump_evthandle(int verbose, void *evtHandle, char *str) { - struct InterprocessEventHandleInternal + struct InterprocessEventHandleInternal { /* The first two entries are the CUinterprocessCtxHandle */ int64_t ctxId; /* unique (within a process) id of the sharing context */ @@ -1713,11 +1713,11 @@ static void cuda_dump_evthandle(int verbose, void *evtHandle, char *str) { /* Return microseconds of elapsed time. Microseconds are relevant when - * trying to understand the fixed overhead of the communication. Used + * trying to understand the fixed overhead of the communication. Used * when trying to time various functions. * * Cut and past the following to get timings where wanted. - * + * * clock_gettime(CLOCK_MONOTONIC, &ts_start); * FUNCTION OF INTEREST * clock_gettime(CLOCK_MONOTONIC, &ts_end); @@ -1837,7 +1837,7 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t size_t psize; res = cuFunc.cuMemGetAddressRange(&pbase, &psize, dbuf); if (CUDA_SUCCESS != res) { - opal_output_verbose(5, mca_common_cuda_output, + opal_output_verbose(5, mca_common_cuda_output, "CUDA: cuMemGetAddressRange failed on this pointer: res=%d, buf=%p " "Overriding check and setting to host pointer. ", res, (void *)dbuf); @@ -1860,7 +1860,7 @@ static int mca_common_cuda_is_gpu_buffer(const void *pUserBuf, opal_convertor_t static int mca_common_cuda_cu_memcpy_async(void *dest, const void *src, size_t size, opal_convertor_t* convertor) { - return cuFunc.cuMemcpyAsync((CUdeviceptr)dest, (CUdeviceptr)src, size, + return cuFunc.cuMemcpyAsync((CUdeviceptr)dest, (CUdeviceptr)src, size, (CUstream)convertor->stream); } @@ -1916,7 +1916,7 @@ static int mca_common_cuda_cu_memcpy(void *dest, const void *src, size_t size) accum, (int)size, src, memTypeSrc, dest, memTypeDst); } } -#endif +#endif return OPAL_SUCCESS; } @@ -2066,4 +2066,4 @@ void mca_common_cuda_get_buffer_id(mca_mpool_base_registration_t *reg) true, OPAL_PROC_MY_HOSTNAME, res, dbuf); } } -#endif /* OPAL_CUDA_GDR_SUPPORT */ +#endif /* OPAL_CUDA_GDR_SUPPORT */ diff --git a/opal/mca/common/cuda/help-mpi-common-cuda.txt b/opal/mca/common/cuda/help-mpi-common-cuda.txt index f4e0f23b471..7de573a9572 100644 --- a/opal/mca/common/cuda/help-mpi-common-cuda.txt +++ b/opal/mca/common/cuda/help-mpi-common-cuda.txt @@ -83,7 +83,7 @@ for this is not enough free device memory. Try to reduce the device memory footprint of your application. # [cuIpcCloseMemHandle failed] -The call to cuIpcCloseMemHandle failed. This is a warning and the program +The call to cuIpcCloseMemHandle failed. This is a warning and the program will continue to run. cuIpcCloseMemHandle return value: %d address: %p @@ -147,17 +147,17 @@ cause the program to abort. cuStreamCreate return value: %d Check the cuda.h file for what the return vale means. # -[dlopen disabled] +[dlopen disabled] Open MPI was compiled without dynamic library support (e.g., with the - --disable-dlopen flag), and therefore cannot utilize CUDA support. + --disable-dlopen flag), and therefore cannot utilize CUDA support. If you need CUDA support, reconfigure Open MPI with dynamic library support enabled. # [dlopen failed] -The library attempted to open the following supporting CUDA libraries, +The library attempted to open the following supporting CUDA libraries, but each of them failed. CUDA-aware support is disabled. %s -If you are not interested in CUDA-aware support, then run with +If you are not interested in CUDA-aware support, then run with --mca mpi_cuda_support 0 to suppress this message. If you are interested in CUDA-aware support, then try setting LD_LIBRARY_PATH to the location of libcuda.so.1 to get passed this issue. diff --git a/opal/mca/common/sm/Makefile.am b/opal/mca/common/sm/Makefile.am index e2b116c0f8b..bb270f5a788 100644 --- a/opal/mca/common/sm/Makefile.am +++ b/opal/mca/common/sm/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2010-2013 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/common/ugni/Makefile.am b/opal/mca/common/ugni/Makefile.am index 42ba0f864a5..0053474b8bb 100644 --- a/opal/mca/common/ugni/Makefile.am +++ b/opal/mca/common/ugni/Makefile.am @@ -3,9 +3,9 @@ # Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2011 UT-Battelle, LLC. All rights reserved. -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/common/ugni/common_ugni.h b/opal/mca/common/ugni/common_ugni.h index 50a2dbdd2bd..5f39fd18513 100644 --- a/opal/mca/common/ugni/common_ugni.h +++ b/opal/mca/common/ugni/common_ugni.h @@ -39,7 +39,7 @@ typedef struct opal_common_ugni_modex_t opal_common_ugni_modex_t; struct opal_common_ugni_device_t { opal_object_t super; - + gni_nic_handle_t dev_handle; /* Minor number of the Gemini NIC */ diff --git a/opal/mca/common/ugni/common_ugni_ep.h b/opal/mca/common/ugni/common_ugni_ep.h index e6de548fcf2..99f8d07ced9 100644 --- a/opal/mca/common/ugni/common_ugni_ep.h +++ b/opal/mca/common/ugni/common_ugni_ep.h @@ -25,7 +25,7 @@ typedef struct opal_common_ugni_endpoint_t opal_common_ugni_endpoint_t; OBJ_CLASS_DECLARATION(opal_common_ugni_endpoint_t); -/* +/* * Get (and retain) a reference to an endpoint to peer_proc. This endpoint * needs to be returned with opal_common_ugni_endpoint_return. * diff --git a/opal/mca/common/verbs/Makefile.am b/opal/mca/common/verbs/Makefile.am index b03abce0160..68c7302795d 100644 --- a/opal/mca/common/verbs/Makefile.am +++ b/opal/mca/common/verbs/Makefile.am @@ -3,9 +3,9 @@ # Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. # Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/common/verbs/common_verbs.h b/opal/mca/common/verbs/common_verbs.h index 795f89a6637..ce063290077 100644 --- a/opal/mca/common/verbs/common_verbs.h +++ b/opal/mca/common/verbs/common_verbs.h @@ -7,9 +7,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -92,7 +92,7 @@ enum { }; /** - * Find a list of ibv_device ports that match a specific criteria. + * Find a list of ibv_device ports that match a specific criteria. * * @param if_include (IN): comma-delimited list of interfaces to use * @param if_exclude (IN): comma-delimited list of interfaces to NOT use @@ -122,8 +122,8 @@ enum { * port_items referring to it have been freed). */ OPAL_DECLSPEC opal_list_t * -opal_common_verbs_find_ports(const char *if_include, - const char *if_exclude, +opal_common_verbs_find_ports(const char *if_include, + const char *if_exclude, int flags, int verbose_stream); @@ -163,7 +163,7 @@ opal_common_verbs_find_max_inline(struct ibv_device *device, * Flags can be the logical OR of OPAL_COMMON_VERBS_FLAGS_RC and/or * OPAL_COMMON_VERBS_FLAGS_UD. All other values are ignored. */ -OPAL_DECLSPEC int opal_common_verbs_qp_test(struct ibv_context *device_context, +OPAL_DECLSPEC int opal_common_verbs_qp_test(struct ibv_context *device_context, int flags); /* * ibv_fork_init testing - if fork support is requested then ibv_fork_init diff --git a/opal/mca/common/verbs/common_verbs_basics.c b/opal/mca/common/verbs/common_verbs_basics.c index e79a16d6a8c..f19039edd83 100644 --- a/opal/mca/common/verbs/common_verbs_basics.c +++ b/opal/mca/common/verbs/common_verbs_basics.c @@ -2,9 +2,9 @@ * Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/common/verbs/common_verbs_find_max_inline.c b/opal/mca/common/verbs/common_verbs_find_max_inline.c index 576dd453d1d..4ea1c7a66bf 100644 --- a/opal/mca/common/verbs/common_verbs_find_max_inline.c +++ b/opal/mca/common/verbs/common_verbs_find_max_inline.c @@ -57,7 +57,7 @@ int opal_common_verbs_find_max_inline(struct ibv_device *device, struct ibv_cq *cq; struct ibv_qp_init_attr init_attr; uint32_t max_inline_data; - + *max_inline_arg = 0; /* Make a dummy CQ */ @@ -74,7 +74,7 @@ int opal_common_verbs_find_max_inline(struct ibv_device *device, ibv_get_device_name(device)); return OPAL_ERR_NOT_AVAILABLE; } - + /* Setup the QP attributes */ memset(&init_attr, 0, sizeof(init_attr)); init_attr.qp_type = IBV_QPT_RC; @@ -84,7 +84,7 @@ int opal_common_verbs_find_max_inline(struct ibv_device *device, init_attr.cap.max_send_sge = 1; init_attr.cap.max_recv_sge = 1; init_attr.cap.max_recv_wr = 1; - + /* Loop over max_inline_data values; just check powers of 2 -- that's good enough */ init_attr.cap.max_inline_data = max_inline_data = 1 << 20; @@ -100,7 +100,7 @@ int opal_common_verbs_find_max_inline(struct ibv_device *device, max_inline_data >>= 1; init_attr.cap.max_inline_data = max_inline_data; } - + /* Destroy the temp CQ */ ibv_destroy_cq(cq); diff --git a/opal/mca/common/verbs/common_verbs_find_ports.c b/opal/mca/common/verbs/common_verbs_find_ports.c index fc2575c54f7..baf6698fc8e 100644 --- a/opal/mca/common/verbs/common_verbs_find_ports.c +++ b/opal/mca/common/verbs/common_verbs_find_ports.c @@ -105,7 +105,7 @@ OBJ_CLASS_INSTANCE(opal_common_verbs_port_item_t, * Given a list of include or exclude items (never both), determine * whether we want the current port or not. */ -static bool want_this_port(char **include_list, char **exclude_list, +static bool want_this_port(char **include_list, char **exclude_list, opal_common_verbs_device_item_t *di, int port) { int i; @@ -134,7 +134,7 @@ static bool want_this_port(char **include_list, char **exclude_list, /* Didn't find it. So we don't want it. */ return false; - } + } /* Search the exclude list */ else { @@ -166,7 +166,7 @@ static const char *link_layer_to_str(int link_type) switch(link_type) { case IBV_LINK_LAYER_INFINIBAND: return "IB"; case IBV_LINK_LAYER_ETHERNET: return "IWARP"; - case IBV_LINK_LAYER_UNSPECIFIED: + case IBV_LINK_LAYER_UNSPECIFIED: default: return "unspecified"; } } @@ -212,8 +212,8 @@ static void check_sanity(char ***if_sanity_list, const char *dev_name, int port) /* * Find a list of ibv_ports matching a set of criteria. */ -opal_list_t *opal_common_verbs_find_ports(const char *if_include, - const char *if_exclude, +opal_list_t *opal_common_verbs_find_ports(const char *if_include, + const char *if_exclude, int flags, int stream) { @@ -255,12 +255,12 @@ opal_list_t *opal_common_verbs_find_ports(const char *if_include, } if (NULL != if_include) { - opal_output_verbose(5, stream, "finding verbs interfaces, including %s", + opal_output_verbose(5, stream, "finding verbs interfaces, including %s", if_include); if_include_list = opal_argv_split(if_include, ','); if_sanity_list = opal_argv_copy(if_include_list); } else if (NULL != if_exclude) { - opal_output_verbose(5, stream, "finding verbs interfaces, excluding %s", + opal_output_verbose(5, stream, "finding verbs interfaces, excluding %s", if_exclude); if_exclude_list = opal_argv_split(if_exclude, ','); if_sanity_list = opal_argv_copy(if_exclude_list); @@ -415,7 +415,7 @@ opal_list_t *opal_common_verbs_find_ports(const char *if_include, OPAL_COMMON_VERBS_FLAGS_LINK_LAYER_ETHERNET)) == 0) { /* If they specified neither link layer, then we want this port */ want = true; - } + } #if HAVE_DECL_IBV_LINK_LAYER_ETHERNET else if (flags & OPAL_COMMON_VERBS_FLAGS_LINK_LAYER_IB) { if (IBV_LINK_LAYER_INFINIBAND == port_attr.link_layer) { @@ -445,7 +445,7 @@ opal_list_t *opal_common_verbs_find_ports(const char *if_include, if (NULL == pi) { goto err_free_port_list; } - pi->device = di; + pi->device = di; pi->port_num = j; pi->port_attr = port_attr; OBJ_RETAIN(di); diff --git a/opal/mca/common/verbs/common_verbs_qp_type.c b/opal/mca/common/verbs/common_verbs_qp_type.c index 5507defff86..9f5b6a70871 100644 --- a/opal/mca/common/verbs/common_verbs_qp_type.c +++ b/opal/mca/common/verbs/common_verbs_qp_type.c @@ -40,7 +40,7 @@ static bool make_qp(struct ibv_pd *pd, struct ibv_cq *cq, enum ibv_qp_type type) qpia.cap.max_inline_data = 0; qpia.qp_type = type; qpia.sq_sig_all = 0; - + qp = ibv_create_qp(pd, &qpia); if (NULL != qp) { ibv_destroy_qp(qp); @@ -57,9 +57,9 @@ int opal_common_verbs_qp_test(struct ibv_context *device_context, int flags) struct ibv_cq *cq = NULL; /* Bozo check */ - if (NULL == device_context || + if (NULL == device_context || (0 == (flags & (OPAL_COMMON_VERBS_FLAGS_RC | OPAL_COMMON_VERBS_FLAGS_UD)))) { - return OPAL_ERR_BAD_PARAM; + return OPAL_ERR_BAD_PARAM; } /* Try to make both the PD and CQ */ diff --git a/opal/mca/common/verbs/configure.m4 b/opal/mca/common/verbs/configure.m4 index b70332a81fc..1b70b0d4ca9 100644 --- a/opal/mca/common/verbs/configure.m4 +++ b/opal/mca/common/verbs/configure.m4 @@ -20,7 +20,7 @@ # $HEADER$ # -# MCA_opal_common_verbs_CONFIG([action-if-can-compile], +# MCA_opal_common_verbs_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_common_verbs_CONFIG],[ diff --git a/opal/mca/common/verbs/help-opal-common-verbs.txt b/opal/mca/common/verbs/help-opal-common-verbs.txt index e8c3ec257f6..854b182e2fe 100644 --- a/opal/mca/common/verbs/help-opal-common-verbs.txt +++ b/opal/mca/common/verbs/help-opal-common-verbs.txt @@ -2,9 +2,9 @@ # Copyright (c) 2012-2014 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # [ibv_open_device fail] diff --git a/opal/mca/compress/Makefile.am b/opal/mca/compress/Makefile.am index f276264fa61..544ef5dc272 100644 --- a/opal/mca/compress/Makefile.am +++ b/opal/mca/compress/Makefile.am @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -32,5 +32,5 @@ endif include base/Makefile.am distclean-local: - rm -f base/static-components.h + rm -f base/static-components.h rm -f $(nodist_man_MANS) diff --git a/opal/mca/compress/base/Makefile.am b/opal/mca/compress/base/Makefile.am index 2bdf725a8bc..385d0b3fed0 100644 --- a/opal/mca/compress/base/Makefile.am +++ b/opal/mca/compress/base/Makefile.am @@ -4,9 +4,9 @@ # Corporation. All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/compress/base/base.h b/opal/mca/compress/base/base.h index 238532f1eda..df84fe083af 100644 --- a/opal/mca/compress/base/base.h +++ b/opal/mca/compress/base/base.h @@ -4,9 +4,9 @@ * Corporation. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OPAL_COMPRESS_BASE_H @@ -32,11 +32,11 @@ extern "C" { * * @retval OPAL_SUCCESS Upon success * @retval OPAL_ERROR Upon failures - * + * * This function is invoked during opal_init(); */ OPAL_DECLSPEC int opal_compress_base_open(mca_base_open_flag_t flags); - + /** * Select an available component. * @@ -46,13 +46,13 @@ extern "C" { * */ OPAL_DECLSPEC int opal_compress_base_select(void); - + /** * Finalize the COMPRESS MCA framework * * @retval OPAL_SUCCESS Upon success * @retval OPAL_ERROR Upon failures - * + * * This function is invoked during opal_finalize(); */ OPAL_DECLSPEC int opal_compress_base_close(void); diff --git a/opal/mca/compress/base/compress_base_close.c b/opal/mca/compress/base/compress_base_close.c index b8ad5dfc75c..e88c80c397b 100644 --- a/opal/mca/compress/base/compress_base_close.c +++ b/opal/mca/compress/base/compress_base_close.c @@ -2,9 +2,9 @@ * Copyright (c) 2004-2010 The Trustees of Indiana University. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/compress/base/compress_base_fns.c b/opal/mca/compress/base/compress_base_fns.c index f06b32fa0d7..1187d8ee391 100644 --- a/opal/mca/compress/base/compress_base_fns.c +++ b/opal/mca/compress/base/compress_base_fns.c @@ -5,9 +5,9 @@ * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/compress/base/compress_base_select.c b/opal/mca/compress/base/compress_base_select.c index 6dc43825bb5..1311f7a118f 100644 --- a/opal/mca/compress/base/compress_base_select.c +++ b/opal/mca/compress/base/compress_base_select.c @@ -5,9 +5,9 @@ * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/compress/bzip/Makefile.am b/opal/mca/compress/bzip/Makefile.am index ae36f5efcaa..41ed41f1c7d 100644 --- a/opal/mca/compress/bzip/Makefile.am +++ b/opal/mca/compress/bzip/Makefile.am @@ -3,9 +3,9 @@ # All rights reserved. # Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/compress/bzip/compress_bzip.h b/opal/mca/compress/bzip/compress_bzip.h index 448430c263d..e329037fe70 100644 --- a/opal/mca/compress/bzip/compress_bzip.h +++ b/opal/mca/compress/bzip/compress_bzip.h @@ -2,15 +2,15 @@ * Copyright (c) 2004-2010 The Trustees of Indiana University. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * BZIP COMPRESS component * * Uses the bzip library diff --git a/opal/mca/compress/bzip/compress_bzip_component.c b/opal/mca/compress/bzip/compress_bzip_component.c index c43242813af..2d0d1493c24 100644 --- a/opal/mca/compress/bzip/compress_bzip_component.c +++ b/opal/mca/compress/bzip/compress_bzip_component.c @@ -5,9 +5,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -21,7 +21,7 @@ /* * Public string for version number */ -const char *opal_compress_bzip_component_version_string = +const char *opal_compress_bzip_component_version_string = "OPAL COMPRESS bzip MCA component version " OPAL_VERSION; /* @@ -38,7 +38,7 @@ static int compress_bzip_close(void); opal_compress_bzip_component_t mca_compress_bzip_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itbzip */ .base_version = { @@ -48,7 +48,7 @@ opal_compress_bzip_component_t mca_compress_bzip_component = { .mca_component_name = "bzip", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = compress_bzip_open, .mca_close_component = compress_bzip_close, @@ -107,14 +107,14 @@ static int compress_bzip_register (void) return (0 > ret) ? ret : OPAL_SUCCESS; } -static int compress_bzip_open(void) +static int compress_bzip_open(void) { /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_compress_bzip_component.super.verbose) { mca_compress_bzip_component.super.output_handle = opal_output_open(NULL); - opal_output_set_verbosity(mca_compress_bzip_component.super.output_handle, + opal_output_set_verbosity(mca_compress_bzip_component.super.output_handle, mca_compress_bzip_component.super.verbose); } else { mca_compress_bzip_component.super.output_handle = opal_compress_base_framework.framework_output; @@ -126,10 +126,10 @@ static int compress_bzip_open(void) opal_output_verbose(10, mca_compress_bzip_component.super.output_handle, "compress:bzip: open()"); opal_output_verbose(20, mca_compress_bzip_component.super.output_handle, - "compress:bzip: open: priority = %d", + "compress:bzip: open: priority = %d", mca_compress_bzip_component.super.priority); opal_output_verbose(20, mca_compress_bzip_component.super.output_handle, - "compress:bzip: open: verbosity = %d", + "compress:bzip: open: verbosity = %d", mca_compress_bzip_component.super.verbose); return OPAL_SUCCESS; } diff --git a/opal/mca/compress/bzip/compress_bzip_module.c b/opal/mca/compress/bzip/compress_bzip_module.c index f2b2b529349..96a2fb39ef6 100644 --- a/opal/mca/compress/bzip/compress_bzip_module.c +++ b/opal/mca/compress/bzip/compress_bzip_module.c @@ -7,9 +7,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/compress/compress.h b/opal/mca/compress/compress.h index e3688e980ae..8b5ba6a7d4a 100644 --- a/opal/mca/compress/compress.h +++ b/opal/mca/compress/compress.h @@ -7,21 +7,21 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file * * Compression Framework - * + * * General Description: * * The OPAL Compress framework has been created to provide an abstract interface * to the compression agent library on the host machine. This fromework is useful - * when distributing files that can be compressed before sending to dimish the + * when distributing files that can be compressed before sending to dimish the * load on the network. * */ diff --git a/opal/mca/compress/gzip/Makefile.am b/opal/mca/compress/gzip/Makefile.am index 24f0d056cb1..e2107b4ca19 100644 --- a/opal/mca/compress/gzip/Makefile.am +++ b/opal/mca/compress/gzip/Makefile.am @@ -3,9 +3,9 @@ # All rights reserved. # Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/compress/gzip/compress_gzip.h b/opal/mca/compress/gzip/compress_gzip.h index d470cbae2f0..29102476bcf 100644 --- a/opal/mca/compress/gzip/compress_gzip.h +++ b/opal/mca/compress/gzip/compress_gzip.h @@ -2,15 +2,15 @@ * Copyright (c) 2004-2010 The Trustees of Indiana University. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * GZIP COMPRESS component * * Uses the gzip library diff --git a/opal/mca/compress/gzip/compress_gzip_component.c b/opal/mca/compress/gzip/compress_gzip_component.c index 368ba687a2f..62be24d71b9 100644 --- a/opal/mca/compress/gzip/compress_gzip_component.c +++ b/opal/mca/compress/gzip/compress_gzip_component.c @@ -5,9 +5,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -21,7 +21,7 @@ /* * Public string for version number */ -const char *opal_compress_gzip_component_version_string = +const char *opal_compress_gzip_component_version_string = "OPAL COMPRESS gzip MCA component version " OPAL_VERSION; /* @@ -38,7 +38,7 @@ static int compress_gzip_close(void); opal_compress_gzip_component_t mca_compress_gzip_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itgzip */ .base_version = { @@ -48,7 +48,7 @@ opal_compress_gzip_component_t mca_compress_gzip_component = { .mca_component_name = "gzip", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = compress_gzip_open, .mca_close_component = compress_gzip_close, @@ -108,14 +108,14 @@ static int compress_gzip_register (void) return (0 > ret) ? ret : OPAL_SUCCESS; } -static int compress_gzip_open(void) +static int compress_gzip_open(void) { /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_compress_gzip_component.super.verbose) { mca_compress_gzip_component.super.output_handle = opal_output_open(NULL); - opal_output_set_verbosity(mca_compress_gzip_component.super.output_handle, + opal_output_set_verbosity(mca_compress_gzip_component.super.output_handle, mca_compress_gzip_component.super.verbose); } else { mca_compress_gzip_component.super.output_handle = opal_compress_base_framework.framework_output; @@ -127,10 +127,10 @@ static int compress_gzip_open(void) opal_output_verbose(10, mca_compress_gzip_component.super.output_handle, "compress:gzip: open()"); opal_output_verbose(20, mca_compress_gzip_component.super.output_handle, - "compress:gzip: open: priority = %d", + "compress:gzip: open: priority = %d", mca_compress_gzip_component.super.priority); opal_output_verbose(20, mca_compress_gzip_component.super.output_handle, - "compress:gzip: open: verbosity = %d", + "compress:gzip: open: verbosity = %d", mca_compress_gzip_component.super.verbose); return OPAL_SUCCESS; } diff --git a/opal/mca/compress/gzip/compress_gzip_module.c b/opal/mca/compress/gzip/compress_gzip_module.c index 2093ddd79b3..a9003f80c95 100644 --- a/opal/mca/compress/gzip/compress_gzip_module.c +++ b/opal/mca/compress/gzip/compress_gzip_module.c @@ -7,9 +7,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/crs/Makefile.am b/opal/mca/crs/Makefile.am index 830f3160dd9..4064260cf84 100644 --- a/opal/mca/crs/Makefile.am +++ b/opal/mca/crs/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -46,5 +46,5 @@ endif include base/Makefile.am distclean-local: - rm -f base/static-components.h + rm -f base/static-components.h rm -f $(nodist_man_MANS) diff --git a/opal/mca/crs/base/Makefile.am b/opal/mca/crs/base/Makefile.am index 00847b4cc52..876efcb1667 100644 --- a/opal/mca/crs/base/Makefile.am +++ b/opal/mca/crs/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/crs/base/base.h b/opal/mca/crs/base/base.h index 244f12b5d39..a7c30a12f78 100644 --- a/opal/mca/crs/base/base.h +++ b/opal/mca/crs/base/base.h @@ -5,16 +5,16 @@ * 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, + * 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 Evergrid, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OPAL_CRS_BASE_H @@ -45,11 +45,11 @@ BEGIN_C_DECLS * * @retval OPAL_SUCCESS Upon success * @retval OPAL_ERROR Upon failures - * + * * This function is invoked during opal_init(); */ OPAL_DECLSPEC int opal_crs_base_open(mca_base_open_flag_t flags); - + /** * Select an available component. * @@ -59,13 +59,13 @@ BEGIN_C_DECLS * */ OPAL_DECLSPEC int opal_crs_base_select(void); - + /** * Finalize the CRS MCA framework * * @retval OPAL_SUCCESS Upon success * @retval OPAL_ERROR Upon failures - * + * * This function is invoked during opal_finalize(); */ OPAL_DECLSPEC int opal_crs_base_close(void); diff --git a/opal/mca/crs/base/crs_base_close.c b/opal/mca/crs/base/crs_base_close.c index c978b882054..1a0150dedd5 100644 --- a/opal/mca/crs/base/crs_base_close.c +++ b/opal/mca/crs/base/crs_base_close.c @@ -3,14 +3,14 @@ * 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, + * 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$ */ diff --git a/opal/mca/crs/base/crs_base_fns.c b/opal/mca/crs/base/crs_base_fns.c index 54dc5eec7dc..923184e017d 100644 --- a/opal/mca/crs/base/crs_base_fns.c +++ b/opal/mca/crs/base/crs_base_fns.c @@ -4,7 +4,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -273,7 +273,7 @@ char * opal_crs_base_state_str(opal_crs_state_type_t state) str = strdup("Unknown"); break; } - + return str; } @@ -387,7 +387,7 @@ static int metadata_extract_next_token(FILE *file, char **token, char **value) /* Ignore lines with just '#' too */ } while (line_len <= 2); - + /* * Extract the token from the set */ @@ -431,7 +431,7 @@ static int metadata_extract_next_token(FILE *file, char **token, char **value) } value_len += line_len; - + tmp = (char *) realloc(local_value, value_len); if (NULL == tmp) { exit_status = OPAL_ERR_OUT_OF_RESOURCE; diff --git a/opal/mca/crs/base/crs_base_select.c b/opal/mca/crs/base/crs_base_select.c index 09d0e09b54f..e444925f964 100644 --- a/opal/mca/crs/base/crs_base_select.c +++ b/opal/mca/crs/base/crs_base_select.c @@ -4,7 +4,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/crs/blcr/Makefile.am b/opal/mca/crs/blcr/Makefile.am index 78fa768c015..6743c1879c9 100644 --- a/opal/mca/crs/blcr/Makefile.am +++ b/opal/mca/crs/blcr/Makefile.am @@ -3,15 +3,15 @@ # 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, +# 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$ # diff --git a/opal/mca/crs/blcr/configure.m4 b/opal/mca/crs/blcr/configure.m4 index 6948639207e..f252d33e434 100644 --- a/opal/mca/crs/blcr/configure.m4 +++ b/opal/mca/crs/blcr/configure.m4 @@ -4,16 +4,16 @@ # 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, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/crs/blcr/crs_blcr.h b/opal/mca/crs/blcr/crs_blcr.h index c1c6e5d0b40..f4678d76217 100644 --- a/opal/mca/crs/blcr/crs_blcr.h +++ b/opal/mca/crs/blcr/crs_blcr.h @@ -3,20 +3,20 @@ * 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, + * 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 - * + * * BLCR CRS component * */ @@ -58,13 +58,13 @@ BEGIN_C_DECLS /* * Actual funcationality */ - int opal_crs_blcr_checkpoint( pid_t pid, + int opal_crs_blcr_checkpoint( pid_t pid, opal_crs_base_snapshot_t *snapshot, opal_crs_base_ckpt_options_t *options, opal_crs_state_type_t *state); - int opal_crs_blcr_restart( opal_crs_base_snapshot_t *snapshot, - bool spawn_child, + int opal_crs_blcr_restart( opal_crs_base_snapshot_t *snapshot, + bool spawn_child, pid_t *child_pid); int opal_crs_blcr_disable_checkpoint(void); diff --git a/opal/mca/crs/blcr/crs_blcr_component.c b/opal/mca/crs/blcr/crs_blcr_component.c index 65b71c64cd0..57cb8e43abd 100644 --- a/opal/mca/crs/blcr/crs_blcr_component.c +++ b/opal/mca/crs/blcr/crs_blcr_component.c @@ -4,16 +4,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,7 +42,7 @@ bool opal_crs_blcr_dev_null = false; opal_crs_blcr_component_t mca_crs_blcr_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itself */ .base_version = { @@ -52,7 +52,7 @@ opal_crs_blcr_component_t mca_crs_blcr_component = { .mca_component_name = "blcr", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = crs_blcr_open, .mca_close_component = crs_blcr_close, @@ -63,13 +63,13 @@ opal_crs_blcr_component_t mca_crs_blcr_component = { /* The component is checkpoint ready */ MCA_BASE_METADATA_PARAM_CHECKPOINT }, - + .verbose = 0, .output_handle = -1, } }; -static int crs_blcr_register (void) +static int crs_blcr_register (void) { int ret; @@ -105,14 +105,14 @@ static int crs_blcr_register (void) return (0 > ret) ? ret : OPAL_SUCCESS } -static int crs_blcr_open(void) +static int crs_blcr_open(void) { /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_crs_blcr_component.super.verbose) { mca_crs_blcr_component.super.output_handle = opal_output_open(NULL); - opal_output_set_verbosity(mca_crs_blcr_component.super.output_handle, + opal_output_set_verbosity(mca_crs_blcr_component.super.output_handle, mca_crs_blcr_component.super.verbose); } else { mca_crs_blcr_component.super.output_handle = opal_crs_base_framework.framework_output; @@ -124,10 +124,10 @@ static int crs_blcr_open(void) opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: open()"); opal_output_verbose(20, mca_crs_blcr_component.super.output_handle, - "crs:blcr: open: priority = %d", + "crs:blcr: open: priority = %d", mca_crs_blcr_component.super.priority); opal_output_verbose(20, mca_crs_blcr_component.super.output_handle, - "crs:blcr: open: verbosity = %d", + "crs:blcr: open: verbosity = %d", mca_crs_blcr_component.super.verbose); opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: dev_null = %s", diff --git a/opal/mca/crs/blcr/crs_blcr_module.c b/opal/mca/crs/blcr/crs_blcr_module.c index c73bad1ce48..eb9d6274421 100644 --- a/opal/mca/crs/blcr/crs_blcr_module.c +++ b/opal/mca/crs/blcr/crs_blcr_module.c @@ -3,7 +3,7 @@ * 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, + * 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. @@ -11,9 +11,9 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -144,7 +144,7 @@ void opal_crs_blcr_destruct( opal_crs_blcr_snapshot_t *snapshot) { /***************** * MCA Functions - *****************/ + *****************/ int opal_crs_blcr_component_query(mca_base_module_t **module, int *priority) { opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, @@ -193,7 +193,7 @@ int opal_crs_blcr_module_init(void) blcr_restart_cmd = strdup("cr_restart"); blcr_checkpoint_cmd = strdup("cr_checkpoint"); - + if( !opal_cr_is_tool ) { /* * Register the thread handler @@ -232,7 +232,7 @@ int opal_crs_blcr_module_init(void) opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: module_init() --> Finished [%d]", opal_cr_is_tool); - + return OPAL_SUCCESS; } @@ -456,7 +456,7 @@ int opal_crs_blcr_checkpoint(pid_t pid, * returns, we also need to wait for it. */ cr_request_file(loc_fname); - + /* Wait for checkpoint to finish */ do { usleep(1000); /* JJH Do we really want to sleep? */ @@ -466,7 +466,7 @@ int opal_crs_blcr_checkpoint(pid_t pid, *state = blcr_current_state; free(loc_fname); - + cleanup: if( NULL != snapshot->super.metadata ) { fclose(snapshot->super.metadata ); @@ -502,7 +502,7 @@ int opal_crs_blcr_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch goto cleanup; } } - + /* * Get the restart command @@ -526,7 +526,7 @@ int opal_crs_blcr_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch if (!spawn_child) { cr_full_cmd = opal_argv_join(cr_argv, ' '); opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, - "crs:blcr: blcr_restart: SELF: exec :(%s, %s):", + "crs:blcr: blcr_restart: SELF: exec :(%s, %s):", blcr_restart_cmd, cr_full_cmd); status = execvp(blcr_restart_cmd, cr_argv); @@ -552,10 +552,10 @@ int opal_crs_blcr_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch if( 0 == *child_pid) { /* Child Process */ opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, - "crs:blcr: blcr_restart: CHILD: exec :(%s, %s):", + "crs:blcr: blcr_restart: CHILD: exec :(%s, %s):", blcr_restart_cmd, opal_argv_join(cr_argv, ' ')); - + status = execvp(blcr_restart_cmd, cr_argv); if(status < 0) { @@ -583,10 +583,10 @@ int opal_crs_blcr_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch free(cr_cmd); if(NULL != cr_argv) opal_argv_free(cr_argv); - + return exit_status; } - + int opal_crs_blcr_disable_checkpoint(void) { opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, @@ -617,7 +617,7 @@ int opal_crs_blcr_enable_checkpoint(void) static int opal_crs_blcr_thread_callback(void *arg) { const struct cr_checkpoint_info *ckpt_info = cr_get_checkpoint_info(); int ret; - + opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: thread_callback()"); @@ -647,7 +647,7 @@ static int opal_crs_blcr_thread_callback(void *arg) { ret = cr_checkpoint(0); } - + /* * Restarting */ @@ -705,7 +705,7 @@ static int opal_crs_blcr_restart_cmd(char *fname, char **cmd) "crs:blcr: restart_cmd(%s, ---)", fname); if (NULL == fname) { - opal_output_verbose(10, opal_crs_base_framework.framework_output, + opal_output_verbose(10, opal_crs_base_framework.framework_output, "crs:blcr: restart_cmd: Error: filename is NULL!"); return OPAL_CRS_ERROR; } @@ -721,7 +721,7 @@ static int blcr_get_checkpoint_filename(char **fname, pid_t pid) "crs:blcr: get_checkpoint_filename(--, %d)", pid); asprintf(fname, "ompi_blcr_context.%d", pid); - + return OPAL_SUCCESS; } @@ -762,7 +762,7 @@ static int blcr_cold_start(opal_crs_blcr_snapshot_t *snapshot) { component_name, strlen(component_name)) ) { exit_status = OPAL_ERROR; opal_output(mca_crs_blcr_component.super.output_handle, - "crs:blcr: blcr_cold_start: Error: This snapshot (%s) is not intended for us (%s)\n", + "crs:blcr: blcr_cold_start: Error: This snapshot (%s) is not intended for us (%s)\n", component_name, mca_crs_blcr_component.super.base_version.mca_component_name); goto cleanup; } diff --git a/opal/mca/crs/crs.h b/opal/mca/crs/crs.h index 08c239e480c..d87b51a8cf9 100644 --- a/opal/mca/crs/crs.h +++ b/opal/mca/crs/crs.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -16,25 +16,25 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file * * Checkpoint and Restart Service (CRS) Interface - * + * * General Description: * * The OPAL Checkpoint and Restart Service (CRS) has been created to create an - * abstract notion of a single process checkpointer for upper levels to + * abstract notion of a single process checkpointer for upper levels to * incorporate checkpoint/restart calls genericly into their code. This keeps - * the upper levels from becoming too tied to a specfic checkpoint and restart + * the upper levels from becoming too tied to a specfic checkpoint and restart * implementation. * - * This interface will change in the future to allow for some additional + * This interface will change in the future to allow for some additional * specialized functionality such as memory inclusion/exclusion, explicit * restarting while running, and others. * @@ -123,8 +123,8 @@ struct opal_crs_base_snapshot_1_0_0_t { /** Absolute path the the snapshot directory */ char * snapshot_directory; - /** Cold Start: - * If we are restarting cold, then we need to recreate this structure + /** Cold Start: + * If we are restarting cold, then we need to recreate this structure * opal_restart would set this, and let the component do the heavy lifting * of recreating the structure, sicne it doesn't know exactly how to. */ @@ -157,14 +157,14 @@ typedef int (*opal_crs_base_module_finalize_fn_t) * pid = PID of the process to checkpoint, or 0 if checkpointing self. * fname = the filename where the checkpoint has been written. * state = The state at which the checkpoint is exiting - * - OPAL_CRS_CONTINUE + * - OPAL_CRS_CONTINUE * Continuing after a checkpoint has been taken * - OPAL_CRS_RESTART * Restarting from a checkpoint * - OPAL_CRS_ERROR * Checkpoint was not successful. * - * The 'fname' string is owned by the caller: if appropriate, it must be eventually + * The 'fname' string is owned by the caller: if appropriate, it must be eventually * freed by the caller. */ typedef int (*opal_crs_base_module_checkpoint_fn_t) @@ -181,10 +181,10 @@ typedef int (*opal_crs_base_module_checkpoint_fn_t) * fname = Checkpoint filename * spawn_child = true if the restarted process should be forked as a new process, * in which case 'child_pid' will be returned. - * false if the restarted process should overwrite the current + * false if the restarted process should overwrite the current * process space. * child_pid = PID of the child that was started, if applicable - * + * */ typedef int (*opal_crs_base_module_restart_fn_t) (opal_crs_base_snapshot_t *snapshot, @@ -230,8 +230,8 @@ typedef int (*opal_crs_base_module_enable_checkpoint_fn_t) typedef int (*opal_crs_base_module_prelaunch_fn_t) (int32_t rank, char *base_snapshot_dir, - char **app, - char **cwd, + char **app, + char **cwd, char ***argv, char ***env); diff --git a/opal/mca/crs/dmtcp/Makefile.am b/opal/mca/crs/dmtcp/Makefile.am index 166c047a761..34dd01be912 100644 --- a/opal/mca/crs/dmtcp/Makefile.am +++ b/opal/mca/crs/dmtcp/Makefile.am @@ -3,9 +3,9 @@ # All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/crs/dmtcp/configure.m4 b/opal/mca/crs/dmtcp/configure.m4 index 420fb554c93..07f5c54da3a 100644 --- a/opal/mca/crs/dmtcp/configure.m4 +++ b/opal/mca/crs/dmtcp/configure.m4 @@ -4,9 +4,9 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/crs/dmtcp/crs_dmtcp.h b/opal/mca/crs/dmtcp/crs_dmtcp.h index a3b2837a75f..6e5b4db9562 100644 --- a/opal/mca/crs/dmtcp/crs_dmtcp.h +++ b/opal/mca/crs/dmtcp/crs_dmtcp.h @@ -5,15 +5,15 @@ * All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * DMTCP CRS component * */ @@ -61,13 +61,13 @@ BEGIN_C_DECLS /* * Actual CRS funcationality */ - int opal_crs_dmtcp_checkpoint( pid_t pid, + int opal_crs_dmtcp_checkpoint( pid_t pid, opal_crs_base_snapshot_t *snapshot, opal_crs_base_ckpt_options_t *options, opal_crs_state_type_t *state); - int opal_crs_dmtcp_restart( opal_crs_base_snapshot_t *snapshot, - bool spawn_child, + int opal_crs_dmtcp_restart( opal_crs_base_snapshot_t *snapshot, + bool spawn_child, pid_t *child_pid); int opal_crs_dmtcp_disable_checkpoint(void); diff --git a/opal/mca/crs/dmtcp/crs_dmtcp_component.c b/opal/mca/crs/dmtcp/crs_dmtcp_component.c index 76f25020278..20e85fa406c 100644 --- a/opal/mca/crs/dmtcp/crs_dmtcp_component.c +++ b/opal/mca/crs/dmtcp/crs_dmtcp_component.c @@ -8,9 +8,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ static int crs_dmtcp_close(void); opal_crs_dmtcp_component_t mca_crs_dmtcp_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itself */ .base_version = { @@ -47,7 +47,7 @@ opal_crs_dmtcp_component_t mca_crs_dmtcp_component = { .mca_component_name = "dmtcp", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = crs_dmtcp_open, .mca_close_component = crs_dmtcp_close, @@ -95,15 +95,15 @@ static int crs_dmtcp_register (void) &mca_crs_dmtcp_component.super.verbose); return (0 > ret) ? ret : OPAL_SUCCESS; } - -static int crs_dmtcp_open(void) + +static int crs_dmtcp_open(void) { /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_crs_dmtcp_component.super.verbose) { mca_crs_dmtcp_component.super.output_handle = opal_output_open(NULL); - opal_output_set_verbosity(mca_crs_dmtcp_component.super.output_handle, + opal_output_set_verbosity(mca_crs_dmtcp_component.super.output_handle, mca_crs_dmtcp_component.super.verbose); } else { mca_crs_dmtcp_component.super.output_handle = opal_crs_base_framework.framework_output; @@ -115,10 +115,10 @@ static int crs_dmtcp_open(void) opal_output_verbose(10, mca_crs_dmtcp_component.super.output_handle, "crs:dmtcp: open()"); opal_output_verbose(20, mca_crs_dmtcp_component.super.output_handle, - "crs:dmtcp: open: priority = %d", + "crs:dmtcp: open: priority = %d", mca_crs_dmtcp_component.super.priority); opal_output_verbose(20, mca_crs_dmtcp_component.super.output_handle, - "crs:dmtcp: open: verbosity = %d", + "crs:dmtcp: open: verbosity = %d", mca_crs_dmtcp_component.super.verbose); return OPAL_SUCCESS; diff --git a/opal/mca/crs/none/Makefile.am b/opal/mca/crs/none/Makefile.am index 123735766b4..2f8237db674 100644 --- a/opal/mca/crs/none/Makefile.am +++ b/opal/mca/crs/none/Makefile.am @@ -1,13 +1,13 @@ # # Copyright (c) 2004-2008 The Trustees of Indiana University. # All rights reserved. -# Copyright (c) 2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/crs/none/crs_none.h b/opal/mca/crs/none/crs_none.h index 922b92f6fd3..8edcc2cf2da 100644 --- a/opal/mca/crs/none/crs_none.h +++ b/opal/mca/crs/none/crs_none.h @@ -2,15 +2,15 @@ * Copyright (c) 2004-2009 The Trustees of Indiana University. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * * NONE CRS component * * Simple, braindead implementation. diff --git a/opal/mca/crs/none/crs_none_component.c b/opal/mca/crs/none/crs_none_component.c index e7ce2ee9079..b813e8f6e77 100644 --- a/opal/mca/crs/none/crs_none_component.c +++ b/opal/mca/crs/none/crs_none_component.c @@ -5,9 +5,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -21,7 +21,7 @@ /* * Public string for version number */ -const char *opal_crs_none_component_version_string = +const char *opal_crs_none_component_version_string = "OPAL CRS none MCA component version " OPAL_VERSION; /* @@ -38,7 +38,7 @@ static int crs_none_close(void); opal_crs_none_component_t mca_crs_none_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itnone */ .base_version = { @@ -48,7 +48,7 @@ opal_crs_none_component_t mca_crs_none_component = { .mca_component_name = "none", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = crs_none_open, .mca_close_component = crs_none_close, @@ -95,7 +95,7 @@ static opal_crs_base_module_t loc_module = { bool opal_crs_none_select_warning = false; -static int crs_none_register (void) +static int crs_none_register (void) { int ret; @@ -118,7 +118,7 @@ static int crs_none_register (void) return (0 > ret) ? ret : OPAL_SUCCESS; } -static int crs_none_open(void) +static int crs_none_open(void) { return OPAL_SUCCESS; } diff --git a/opal/mca/crs/none/crs_none_module.c b/opal/mca/crs/none/crs_none_module.c index 6302977eed9..fba3f1d332a 100644 --- a/opal/mca/crs/none/crs_none_module.c +++ b/opal/mca/crs/none/crs_none_module.c @@ -7,9 +7,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -61,7 +61,7 @@ int opal_crs_none_checkpoint(pid_t pid, opal_crs_state_type_t *state) { *state = OPAL_CRS_CONTINUE; - + snapshot->component_name = strdup("none"); snapshot->cold_start = false; @@ -156,7 +156,7 @@ int opal_crs_none_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch } fclose(base_snapshot->metadata); - + return exit_status; } diff --git a/opal/mca/crs/none/help-opal-crs-none.txt b/opal/mca/crs/none/help-opal-crs-none.txt index 097de36c743..8407c7f9502 100644 --- a/opal/mca/crs/none/help-opal-crs-none.txt +++ b/opal/mca/crs/none/help-opal-crs-none.txt @@ -13,7 +13,7 @@ # [none:select-warning] Error: 'none' component selected. - Checkpoint/Restart functionality may not work properly. + Checkpoint/Restart functionality may not work properly. Make sure that you have configured with and are using a fully functional CRS component. To disable this warning set the following MCA parmeter: diff --git a/opal/mca/crs/opal_crs.7in b/opal/mca/crs/opal_crs.7in index e94453db3fe..f923021ce49 100644 --- a/opal/mca/crs/opal_crs.7in +++ b/opal/mca/crs/opal_crs.7in @@ -5,7 +5,7 @@ .\" Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. .\" .\" Man page for OPAL's CRS Functionality -.\" +.\" .\" .TH name section center-footer left-footer center-header .TH OPAL_CRS 7 "#OPAL_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" @@ -34,7 +34,7 @@ procress: . .TP 4 Checkpoint -When the checkpoint request arrives, the procress is notified of the +When the checkpoint request arrives, the procress is notified of the request before the checkpoint is taken. . .TP 4 @@ -65,7 +65,7 @@ First, the program must call \fIOPAL_INIT\fR early in its execution. This should only be called once, and it is not possible to checkpoint the process without it first having called this function. .PP -The program must call \fIOPAL_FINALIZE\fR before termination. This does a +The program must call \fIOPAL_FINALIZE\fR before termination. This does a significant amount of cleanup. If it is not called, then it is very likely that remnants are left in the filesystem. .PP @@ -162,7 +162,7 @@ Set the verbosity level. Default is 0, or silent except on error. .SS none CRS Component .PP The \fInone\fP component simply selects no CRS component. All of the CRS -function calls return immediately with OPAL_SUCCESS. +function calls return immediately with OPAL_SUCCESS. . .PP This component is the last component to be selected by default. This means that if diff --git a/opal/mca/crs/self/Makefile.am b/opal/mca/crs/self/Makefile.am index a8bb36b8172..3e61079e619 100644 --- a/opal/mca/crs/self/Makefile.am +++ b/opal/mca/crs/self/Makefile.am @@ -3,15 +3,15 @@ # 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, +# 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-2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/crs/self/configure.m4 b/opal/mca/crs/self/configure.m4 index 03b6d36307d..a648ca45f5a 100644 --- a/opal/mca/crs/self/configure.m4 +++ b/opal/mca/crs/self/configure.m4 @@ -4,15 +4,15 @@ # 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, +# 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$ # diff --git a/opal/mca/crs/self/crs_self.h b/opal/mca/crs/self/crs_self.h index 3abe40f664a..541ae2249f4 100644 --- a/opal/mca/crs/self/crs_self.h +++ b/opal/mca/crs/self/crs_self.h @@ -3,20 +3,20 @@ * 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, + * 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 - * + * * SELF CRS component * * Simple, braindead implementation. diff --git a/opal/mca/crs/self/crs_self_component.c b/opal/mca/crs/self/crs_self_component.c index 7a684fbc986..68792c6fd6b 100644 --- a/opal/mca/crs/self/crs_self_component.c +++ b/opal/mca/crs/self/crs_self_component.c @@ -4,16 +4,16 @@ * 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, + * 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) 2015 Los Alamos National Security, Inc. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -28,7 +28,7 @@ /* * Public string for version number */ -const char *opal_crs_self_component_version_string = +const char *opal_crs_self_component_version_string = "OPAL CRS self MCA component version " OPAL_VERSION; /* @@ -45,7 +45,7 @@ static int crs_self_close(void); opal_crs_self_component_t mca_crs_self_component = { /* First do the base component stuff */ { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itself */ .base_version = { @@ -55,7 +55,7 @@ opal_crs_self_component_t mca_crs_self_component = { .mca_component_name = "self", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = crs_self_open, .mca_close_component = crs_self_close, @@ -66,7 +66,7 @@ opal_crs_self_component_t mca_crs_self_component = { /* The component is checkpoint ready */ MCA_BASE_METADATA_PARAM_CHECKPOINT }, - + /* Verbosity level */ 0, /* opal_output handler */ @@ -133,8 +133,8 @@ static int crs_self_register (void) &mca_crs_self_component.do_restart); return (0 > ret) ? ret : OPAL_SUCCESS; } - -static int crs_self_open(void) + +static int crs_self_open(void) { /* * This should be the last componet to ever get used since @@ -151,23 +151,23 @@ static int crs_self_open(void) } else { mca_crs_self_component.super.output_handle = opal_crs_base_framework.framework_output; } - + /* * Debug Output */ opal_output_verbose(10, mca_crs_self_component.super.output_handle, "crs:self: open()"); opal_output_verbose(20, mca_crs_self_component.super.output_handle, - "crs:self: open: priority = %d", + "crs:self: open: priority = %d", mca_crs_self_component.super.priority); opal_output_verbose(20, mca_crs_self_component.super.output_handle, - "crs:self: open: verbosity = %d", + "crs:self: open: verbosity = %d", mca_crs_self_component.super.verbose); opal_output_verbose(20, mca_crs_self_component.super.output_handle, - "crs:self: open: prefix = %s", + "crs:self: open: prefix = %s", mca_crs_self_component.prefix); opal_output_verbose(20, mca_crs_self_component.super.output_handle, - "crs:self: open: do_restart = %d", + "crs:self: open: do_restart = %d", mca_crs_self_component.do_restart); return OPAL_SUCCESS; diff --git a/opal/mca/crs/self/crs_self_module.c b/opal/mca/crs/self/crs_self_module.c index 49c8dfcc9c9..7c6d66f49fb 100644 --- a/opal/mca/crs/self/crs_self_module.c +++ b/opal/mca/crs/self/crs_self_module.c @@ -3,7 +3,7 @@ * 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, + * 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. @@ -12,9 +12,9 @@ * Copyright (c) 2007 Evergrid, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -148,7 +148,7 @@ int opal_crs_self_component_query(mca_base_module_t **module, int *priority) */ ret = opal_crs_self_extract_callbacks(); - if( OPAL_SUCCESS != ret || + if( OPAL_SUCCESS != ret || !mca_crs_self_component.can_checkpoint ) { *priority = -1; *module = NULL; @@ -209,7 +209,7 @@ int opal_crs_self_module_init(void) if( opal_cr_is_tool ) { return OPAL_SUCCESS; } - + /* * Sanity check */ @@ -239,7 +239,7 @@ int opal_crs_self_module_init(void) if(mca_crs_self_component.do_restart) { opal_output_verbose(10, mca_crs_self_component.super.output_handle, "crs:self: module_init: Call their restart function"); - if( NULL != mca_crs_self_component.ucb_restart_fn) + if( NULL != mca_crs_self_component.ucb_restart_fn) mca_crs_self_component.ucb_restart_fn(); } @@ -348,7 +348,7 @@ int opal_crs_self_checkpoint(pid_t pid, *state = OPAL_CRS_CONTINUE; - + /* * Call their continue routine for completeness */ @@ -368,7 +368,7 @@ int opal_crs_self_checkpoint(pid_t pid, } /* - * Notice that the user restart callback is not called here, but always from + * Notice that the user restart callback is not called here, but always from * opal_init for the self module. */ int opal_crs_self_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_child, pid_t *child_pid) @@ -464,7 +464,7 @@ int opal_crs_self_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch cleanup: if( NULL != cr_cmd) free(cr_cmd); - if( NULL != cr_argv) + if( NULL != cr_argv) opal_argv_free(cr_argv); return exit_status; @@ -562,7 +562,7 @@ static int crs_self_find_function(char *prefix, char *suffix, } opal_output_verbose(10, mca_crs_self_component.super.output_handle, - "crs:self: crs_self_find_function(--, %s, %s)", + "crs:self: crs_self_find_function(--, %s, %s)", prefix, suffix); asprintf(&func_to_find, "%s_%s", prefix, suffix); @@ -612,12 +612,12 @@ static int crs_self_find_function(char *prefix, char *suffix, * This funciton translates that to the command: * cmd = "my_prog arg1 arg2 -mca crs self -mca crs_self_do_restart 1" * - * Which will cause the program "my_prog" to call their restart function + * Which will cause the program "my_prog" to call their restart function * upon opal_init time. * * Note: The user could bypass the opal_restart routine safely by simply calling * $ my_prog arg1 arg2 -mca crs self -mca crs_self_do_restart 1 - * However, for consistency sake, we should not encourage this as it won't work for + * However, for consistency sake, we should not encourage this as it won't work for * all of the other checkpointers. */ static int opal_crs_self_restart_cmd(opal_crs_self_snapshot_t *snapshot, char **cmd) @@ -629,27 +629,27 @@ static int opal_crs_self_restart_cmd(opal_crs_self_snapshot_t *snapshot, char ** (void) mca_base_var_env_name("crs", &tmp_env_var); opal_setenv(tmp_env_var, - "self", + "self", true, &environ); free(tmp_env_var); tmp_env_var = NULL; (void) mca_base_var_env_name("crs_self_do_restart", &tmp_env_var); opal_setenv(tmp_env_var, - "1", + "1", true, &environ); free(tmp_env_var); tmp_env_var = NULL; (void) mca_base_var_env_name("crs_self_prefix", &tmp_env_var); opal_setenv(tmp_env_var, - mca_crs_self_component.prefix, + mca_crs_self_component.prefix, true, &environ); free(tmp_env_var); tmp_env_var = NULL; /* Instead of adding it to the command line, we should use the environment - * to pass the values. This allow sthe OPAL application to be braindead + * to pass the values. This allow sthe OPAL application to be braindead * WRT MCA parameters * add_args = strdup("-mca crs self -mca crs_self_do_restart 1"); */ @@ -692,11 +692,11 @@ static int self_cold_start(opal_crs_self_snapshot_t *snapshot) { snapshot->super.component_name = strdup(component_name); /* Compare the strings to make sure this is our snapshot before going further */ - if ( 0 != strncmp(mca_crs_self_component.super.base_version.mca_component_name, + if ( 0 != strncmp(mca_crs_self_component.super.base_version.mca_component_name, component_name, strlen(component_name)) ) { exit_status = OPAL_ERROR; opal_output(mca_crs_self_component.super.output_handle, - "crs:self: self_cold_start: Error: This snapshot (%s) is not intended for us (%s)\n", + "crs:self: self_cold_start: Error: This snapshot (%s) is not intended for us (%s)\n", component_name, mca_crs_self_component.super.base_version.mca_component_name); goto cleanup; } @@ -732,7 +732,7 @@ static int self_cold_start(opal_crs_self_snapshot_t *snapshot) { static int self_update_snapshot_metadata(opal_crs_self_snapshot_t *snapshot) { int exit_status = OPAL_SUCCESS; - + if(NULL == snapshot->cmd_line) { opal_show_help("help-opal-crs-self.txt", "self:no-restart-cmd", true); @@ -743,7 +743,7 @@ static int self_update_snapshot_metadata(opal_crs_self_snapshot_t *snapshot) { opal_output_verbose(10, mca_crs_self_component.super.output_handle, "crs:self: update_snapshot_metadata(%s)", snapshot->super.metadata_filename); - + /* * Append to the metadata file the command line to restart with * - How user wants us to restart diff --git a/opal/mca/crs/self/help-opal-crs-self.txt b/opal/mca/crs/self/help-opal-crs-self.txt index b6eacb6f1e2..4b090f52f26 100644 --- a/opal/mca/crs/self/help-opal-crs-self.txt +++ b/opal/mca/crs/self/help-opal-crs-self.txt @@ -31,7 +31,7 @@ Error: We were unable to find one of the following callbacks: If you have a custom prefix for your functions you may specify them with the 'crs_self_prefix' mca parameter. For example, - $ prog -mca crs_self_prefix my_prefix + $ prog -mca crs_self_prefix my_prefix This will then look for the following functions: int my_prefix_checkpoint(void) int my_prefix_continue(void) diff --git a/opal/mca/dstore/Makefile.am b/opal/mca/dstore/Makefile.am index c9a80176153..93eb59d5f45 100644 --- a/opal/mca/dstore/Makefile.am +++ b/opal/mca/dstore/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/dstore/base/Makefile.am b/opal/mca/dstore/base/Makefile.am index 0eba3ce4a72..9ed5ae65acb 100644 --- a/opal/mca/dstore/base/Makefile.am +++ b/opal/mca/dstore/base/Makefile.am @@ -1,11 +1,11 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/dstore/base/base.h b/opal/mca/dstore/base/base.h index b05f2043778..dd8df381ec1 100644 --- a/opal/mca/dstore/base/base.h +++ b/opal/mca/dstore/base/base.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/opal/mca/dstore/base/dstore_base_frame.c b/opal/mca/dstore/base/dstore_base_frame.c index 47d2db5313e..8c75303ebd7 100644 --- a/opal/mca/dstore/base/dstore_base_frame.c +++ b/opal/mca/dstore/base/dstore_base_frame.c @@ -1,13 +1,13 @@ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/dstore/base/dstore_base_select.c b/opal/mca/dstore/base/dstore_base_select.c index 8864c51aff6..babcd4ce06b 100644 --- a/opal/mca/dstore/base/dstore_base_select.c +++ b/opal/mca/dstore/base/dstore_base_select.c @@ -1,11 +1,11 @@ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ static bool selected = false; -int +int opal_dstore_base_select(void) { mca_base_component_list_item_t *cli, *copy_cli; @@ -37,7 +37,7 @@ opal_dstore_base_select(void) return OPAL_SUCCESS; } selected = true; - + /* Query all available components and ask if they have a module */ cmp_pri = -100000; mod_pri = -100000; diff --git a/opal/mca/dstore/base/dstore_base_stubs.c b/opal/mca/dstore/base/dstore_base_stubs.c index ef92897f731..8c6d26528d4 100644 --- a/opal/mca/dstore/base/dstore_base_stubs.c +++ b/opal/mca/dstore/base/dstore_base_stubs.c @@ -1,14 +1,14 @@ /* - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2013-2015 Intel Inc. All rights reserved * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -270,7 +270,7 @@ opal_dstore_proc_data_t* opal_dstore_base_lookup_proc(opal_proc_table_t *ptable, } opal_proc_table_set_value(ptable, id, proc_data); } - + return proc_data; } diff --git a/opal/mca/dstore/base/help-dstore-base.txt b/opal/mca/dstore/base/help-dstore-base.txt index f603f2eaf31..5d7f3d87691 100644 --- a/opal/mca/dstore/base/help-dstore-base.txt +++ b/opal/mca/dstore/base/help-dstore-base.txt @@ -1,6 +1,6 @@ -*- text -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ # diff --git a/opal/mca/dstore/dstore.h b/opal/mca/dstore/dstore.h index 198a56b4ed3..45629faa103 100644 --- a/opal/mca/dstore/dstore.h +++ b/opal/mca/dstore/dstore.h @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2014 Los Alamos National Security, Inc. All rights * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: @@ -34,7 +34,7 @@ * DATABASE DESIGN * * Each API function is treated as blocking. - * + * */ BEGIN_C_DECLS @@ -50,7 +50,7 @@ OPAL_DECLSPEC extern int opal_dstore_nonpeer; /**** DEFINE THE PUBLIC API'S ****/ /* * Open a database - * + * * Open a database for access. The name field is purely for * debug purposes and has no implementation relevance. * Just like the standard POSIX file open, the call will return diff --git a/opal/mca/dstore/dstore_types.h b/opal/mca/dstore/dstore_types.h index 3a957c394a4..e8e660f7251 100644 --- a/opal/mca/dstore/dstore_types.h +++ b/opal/mca/dstore/dstore_types.h @@ -1,10 +1,10 @@ /* - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/opal/mca/dstore/hash/Makefile.am b/opal/mca/dstore/hash/Makefile.am index eb935eb0cc2..670de4a3e33 100644 --- a/opal/mca/dstore/hash/Makefile.am +++ b/opal/mca/dstore/hash/Makefile.am @@ -1,10 +1,10 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/dstore/hash/dstore_hash.c b/opal/mca/dstore/hash/dstore_hash.c index 6a749038354..ba623fbd6a9 100644 --- a/opal/mca/dstore/hash/dstore_hash.c +++ b/opal/mca/dstore/hash/dstore_hash.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2004-2011 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. @@ -10,9 +10,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -217,7 +217,7 @@ static int fetch(struct opal_dstore_base_module_t *imod, if (NULL == kvs) { return OPAL_SUCCESS; } - + /* create the copy */ if (OPAL_SUCCESS != (rc = opal_dss.copy((void**)&knew, kv, OPAL_VALUE))) { OPAL_ERROR_LOG(rc); diff --git a/opal/mca/dstore/hash/dstore_hash.h b/opal/mca/dstore/hash/dstore_hash.h index 688eeddf3f6..78b65a05bbd 100644 --- a/opal/mca/dstore/hash/dstore_hash.h +++ b/opal/mca/dstore/hash/dstore_hash.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/dstore/hash/dstore_hash_component.c b/opal/mca/dstore/hash/dstore_hash_component.c index bbed898a678..7e697555221 100644 --- a/opal/mca/dstore/hash/dstore_hash_component.c +++ b/opal/mca/dstore/hash/dstore_hash_component.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/opal/mca/event/Makefile.am b/opal/mca/event/Makefile.am index 64b79705a10..3c2a1ec2334 100644 --- a/opal/mca/event/Makefile.am +++ b/opal/mca/event/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/event/base/Makefile.am b/opal/mca/event/base/Makefile.am index 2705498e01e..afe829d5482 100644 --- a/opal/mca/event/base/Makefile.am +++ b/opal/mca/event/base/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/event/base/README.openmpi b/opal/mca/event/base/README.openmpi index 1aa893afc1e..d566e5705a6 100644 --- a/opal/mca/event/base/README.openmpi +++ b/opal/mca/event/base/README.openmpi @@ -27,7 +27,7 @@ through a set of wrappers - this is done for three reasons: support provide erroneous results on some platforms (as determined by our empirical testing). OPAL therefore provides enhanced tests to correctly assess those environments. - + 3. Enable greater flexibility in configuring Libevent for the specific environment. In particular, OPAL has no need of Libevent's dns, http, and rpc events, so configuration options to remove that code diff --git a/opal/mca/event/base/base.h b/opal/mca/event/base/base.h index f0c4a1d8b7d..fd06d0fe1af 100644 --- a/opal/mca/event/base/base.h +++ b/opal/mca/event/base/base.h @@ -3,9 +3,9 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/event/base/event_base_frame.c b/opal/mca/event/base/event_base_frame.c index 96e0c1af44d..c1713b1d095 100644 --- a/opal/mca/event/base/event_base_frame.c +++ b/opal/mca/event/base/event_base_frame.c @@ -2,9 +2,9 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ * and opens event components, etc. * * This function is invoked during opal_init(). - * + * * This function fills in the internal global variable * opal_event_base_components_opened, which is a list of all * event components that were successfully opened. This @@ -60,7 +60,7 @@ static int opal_event_base_close(void) return mca_base_framework_components_close (&opal_event_base_framework, NULL); } - + /* * Globals */ diff --git a/opal/mca/event/base/owner.txt b/opal/mca/event/base/owner.txt index 36389e7f941..dcc598ef943 100644 --- a/opal/mca/event/base/owner.txt +++ b/opal/mca/event/base/owner.txt @@ -1,5 +1,5 @@ # -# owner/status file +# owner/status file # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained # diff --git a/opal/mca/event/configure.m4 b/opal/mca/event/configure.m4 index 81c912f0a01..f8040446009 100644 --- a/opal/mca/event/configure.m4 +++ b/opal/mca/event/configure.m4 @@ -2,9 +2,9 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl @@ -22,7 +22,7 @@ m4_define(MCA_opal_event_CONFIGURE_MODE, STOP_AT_FIRST) AC_DEFUN([MCA_opal_event_CONFIG],[ opal_event_base_include= - + # configure all the components MCA_CONFIGURE_FRAMEWORK($1, $2, 1) @@ -47,8 +47,8 @@ AC_DEFUN([MCA_opal_event_CONFIG],[ [AS_IF([test "$OPAL_HAVE_WORKING_EVENTOPS" = "1"], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])]) - AC_DEFINE_UNQUOTED(OPAL_HAVE_WORKING_EVENTOPS, - [$OPAL_HAVE_WORKING_EVENTOPS], + AC_DEFINE_UNQUOTED(OPAL_HAVE_WORKING_EVENTOPS, + [$OPAL_HAVE_WORKING_EVENTOPS], [Whether our event component has working event operations or not (if not, then assumedly it only has working timers and signals)]) # The winning component will have told us where their header file diff --git a/opal/mca/event/event.h b/opal/mca/event/event.h index 0bc435f146d..cc81bb95068 100644 --- a/opal/mca/event/event.h +++ b/opal/mca/event/event.h @@ -7,7 +7,7 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow */ diff --git a/opal/mca/event/external/Makefile.am b/opal/mca/event/external/Makefile.am index debbb53f1b6..3c9ade76513 100644 --- a/opal/mca/event/external/Makefile.am +++ b/opal/mca/event/external/Makefile.am @@ -1,10 +1,10 @@ # # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. +# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/event/external/configure.m4 b/opal/mca/event/external/configure.m4 index 110fe554cab..543ded8f0c3 100644 --- a/opal/mca/event/external/configure.m4 +++ b/opal/mca/event/external/configure.m4 @@ -1,12 +1,12 @@ # -*- shell-script -*- # -# Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. +# Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -29,9 +29,9 @@ AC_DEFUN([MCA_opal_event_external_COMPILE_MODE], [ # --------------------------------- AC_DEFUN([MCA_opal_event_external_POST_CONFIG],[ # If we won, then do all the rest of the setup - AS_IF([test "$1" = "1"], - [AC_DEFINE_UNQUOTED([EVENT_EXTERNAL_EVENT_VERSION], - [external], + AS_IF([test "$1" = "1"], + [AC_DEFINE_UNQUOTED([EVENT_EXTERNAL_EVENT_VERSION], + [external], [Version of event]) # Set this variable so that the framework m4 knows what @@ -86,14 +86,14 @@ AC_DEFUN([MCA_opal_event_external_CONFIG],[ # If we want external support, try it AS_IF([test "$opal_event_external_want" = "yes"], [ # Error out if the specified dir does not exist - OPAL_CHECK_WITHDIR([libevent-libdir], [$with_libevent_libdir], + OPAL_CHECK_WITHDIR([libevent-libdir], [$with_libevent_libdir], [libevent.*]) AC_MSG_CHECKING([for external libevent in]) AS_IF([test "$with_libevent" != "external" -a "$with_libevent" != "yes"], [opal_event_dir=$with_libevent AC_MSG_RESULT([$opal_event_dir]) - OPAL_CHECK_WITHDIR([libevent], [$with_libdir], + OPAL_CHECK_WITHDIR([libevent], [$with_libdir], [include/event.h]) ], [AC_MSG_RESULT([(default search paths)])]) diff --git a/opal/mca/event/external/event_external_component.c b/opal/mca/event/external/event_external_component.c index acf2120c40d..8f518702a99 100644 --- a/opal/mca/event/external/event_external_component.c +++ b/opal/mca/event/external/event_external_component.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/event/external/external.h b/opal/mca/event/external/external.h index 183ded78dfa..7ddb54645b1 100644 --- a/opal/mca/event/external/external.h +++ b/opal/mca/event/external/external.h @@ -1,11 +1,11 @@ /* * Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * When this component is used, this file is included in the rest of @@ -80,7 +80,7 @@ OPAL_DECLSPEC opal_event_t* opal_event_alloc(void); #define opal_event_free(x) event_free((x)) /* Timer APIs */ -#define opal_event_evtimer_new(b, cb, arg) opal_event_new((b), -1, 0, (cb), (arg)) +#define opal_event_evtimer_new(b, cb, arg) opal_event_new((b), -1, 0, (cb), (arg)) #define opal_event_evtimer_add(x, tv) opal_event_add((x), (tv)) diff --git a/opal/mca/event/libevent2022/Makefile.am b/opal/mca/event/libevent2022/Makefile.am index 143f5f951e3..becfb78d9fe 100644 --- a/opal/mca/event/libevent2022/Makefile.am +++ b/opal/mca/event/libevent2022/Makefile.am @@ -5,9 +5,9 @@ # All rights reserved. # Copyright (c) 2015 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/event/libevent2022/configure.m4 b/opal/mca/event/libevent2022/configure.m4 index 995070a61f0..a1426a83a8f 100644 --- a/opal/mca/event/libevent2022/configure.m4 +++ b/opal/mca/event/libevent2022/configure.m4 @@ -5,9 +5,9 @@ # Copyright (c) 2015 Intel, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # AC_DEFUN([MCA_opal_event_libevent2022_PRIORITY], [80]) @@ -23,7 +23,7 @@ AC_DEFUN([MCA_opal_event_libevent2022_COMPILE_MODE], [ AC_DEFUN([MCA_opal_event_libevent2022_POST_CONFIG], [ AM_CONDITIONAL(OPAL_EVENT_HAVE_THREAD_SUPPORT, test "$enable_event_thread_support" = "yes") - AS_IF([test "$1" = "1"], + AS_IF([test "$1" = "1"], [ # Build libevent/include/event2/event-config.h. If we # don't do it here, then libevent's Makefile.am will build # it during "make all", which is too late for us (because @@ -80,7 +80,7 @@ EOF ]) ]) -# MCA_event_libevent2022_CONFIG([action-if-can-compile], +# MCA_event_libevent2022_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_event_libevent2022_CONFIG],[ @@ -95,7 +95,7 @@ AC_DEFUN([MCA_opal_event_libevent2022_CONFIG],[ [AC_MSG_WARN([using an external libevent; disqualifiying this component]) $2]) OPAL_VAR_SCOPE_POP -]) +]) AC_DEFUN([MCA_opal_event_libevent2022_DO_THE_CONFIG], [ CFLAGS_save="$CFLAGS" @@ -165,7 +165,7 @@ AC_DEFUN([MCA_opal_event_libevent2022_DO_THE_CONFIG], [ AC_MSG_RESULT([$event_args]) - OPAL_CONFIG_SUBDIR([$libevent_basedir/libevent], + OPAL_CONFIG_SUBDIR([$libevent_basedir/libevent], [$event_args $opal_subdir_args], [libevent_happy="yes"], [libevent_happy="no"]) if test "$libevent_happy" = "no"; then @@ -186,7 +186,7 @@ AC_DEFUN([MCA_opal_event_libevent2022_DO_THE_CONFIG], [ # libevent/include/event2/event-config.h!). Otherwise, set it to # 0. libevent_file=$libevent_basedir/libevent/config.h - AS_IF([test "$libevent_happy" = "yes" -a -r $libevent_file], + AS_IF([test "$libevent_happy" = "yes" -a -r $libevent_file], [OPAL_HAVE_WORKING_EVENTOPS=`grep HAVE_WORKING_EVENTOPS $libevent_file | awk '{print [$]3 }'` $1], [$2 diff --git a/opal/mca/event/libevent2022/libevent/ChangeLog b/opal/mca/event/libevent2022/libevent/ChangeLog index 8c0a9f8c4a7..5e60a730bfa 100644 --- a/opal/mca/event/libevent2022/libevent/ChangeLog +++ b/opal/mca/event/libevent2022/libevent/ChangeLog @@ -1308,11 +1308,11 @@ Changes in 2.0.1-alpha (17 Apr 2009): o Correct handling of trailing headers in chunked replies; from Scott Lamb. o Support multi-line HTTP headers; based on a patch from Moshe Litvin o Reject negative Content-Length headers; anonymous bug report - o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report + o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report o Various HTTP correctness fixes from Scott Lamb o Fix a bug where deleting signals with the kqueue backend would cause subsequent adds to fail o Support multiple events listening on the same signal; make signals regular events that go on the same event queue; problem report by Alexander Drozdov. - o Fix a problem with epoll() and reinit; problem report by Alexander Drozdov. + o Fix a problem with epoll() and reinit; problem report by Alexander Drozdov. o Fix off-by-one errors in devpoll; from Ian Bell o Make event_add not change any state if it fails; reported by Ian Bell. o Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me. diff --git a/opal/mca/event/libevent2022/libevent/Doxyfile b/opal/mca/event/libevent2022/libevent/Doxyfile index 5d3865e7e79..64aa8122708 100644 --- a/opal/mca/event/libevent2022/libevent/Doxyfile +++ b/opal/mca/event/libevent2022/libevent/Doxyfile @@ -14,7 +14,7 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libevent @@ -23,33 +23,33 @@ PROJECT_NAME = libevent OUTPUT_DIRECTORY = doxygen/ -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = YES -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = include/ @@ -58,9 +58,9 @@ STRIP_FROM_PATH = include/ # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = \ @@ -87,7 +87,7 @@ INPUT = \ # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES @@ -96,74 +96,74 @@ GENERATE_HTML = YES # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -172,86 +172,86 @@ LATEX_HIDE_INDICES = NO # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = YES #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = TAILQ_ENTRY RB_ENTRY _EVENT_DEFINED_TQENTRY _EVENT_IN_DOXYGEN -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES diff --git a/opal/mca/event/libevent2022/libevent/Makefile.nmake b/opal/mca/event/libevent2022/libevent/Makefile.nmake index 4cd04c13c9c..009d977880e 100644 --- a/opal/mca/event/libevent2022/libevent/Makefile.nmake +++ b/opal/mca/event/libevent2022/libevent/Makefile.nmake @@ -28,7 +28,7 @@ all: static_libs tests static_libs: $(STATIC_LIBS) libevent_core.lib: $(CORE_OBJS) $(WIN_OBJS) - lib $(LIBFLAGS) $(CORE_OBJS) $(WIN_OBJS) /out:libevent_core.lib + lib $(LIBFLAGS) $(CORE_OBJS) $(WIN_OBJS) /out:libevent_core.lib libevent_extras.lib: $(EXTRA_OBJS) lib $(LIBFLAGS) $(EXTRA_OBJS) /out:libevent_extras.lib diff --git a/opal/mca/event/libevent2022/libevent/bufferevent_openssl.c b/opal/mca/event/libevent2022/libevent/bufferevent_openssl.c index 7582d9b4be0..fad31c35125 100644 --- a/opal/mca/event/libevent2022/libevent/bufferevent_openssl.c +++ b/opal/mca/event/libevent2022/libevent/bufferevent_openssl.c @@ -788,7 +788,7 @@ consider_reading(struct bufferevent_openssl *bev_ssl) if (bev_ssl->bev.read_suspended) break; - + /* Read all pending data. This won't hit the network * again, and will (most importantly) put us in a state * where we don't need to read anything else until the diff --git a/opal/mca/event/libevent2022/libevent/configure.ac b/opal/mca/event/libevent2022/libevent/configure.ac index f04e6989d77..a13fee5895d 100644 --- a/opal/mca/event/libevent2022/libevent/configure.ac +++ b/opal/mca/event/libevent2022/libevent/configure.ac @@ -597,7 +597,7 @@ if test "$enable_epoll" != "no" ; then # the libevent library. Badness ensues. Therefore, check to # see that this struct gets correctly passed between userspace # and the kernel. - + # In this test, we use epoll in Level Triggered mode. We create # a pipe and the write only file descriptor of the pipe is # added to the epoll set. The test is successful if @@ -689,7 +689,7 @@ main(int argc, char **argv) memset(&epevin.data.ptr, 5, sizeof(epevin.data.ptr)); epevin.events = EPOLLIN | EPOLLOUT; - if (syscall(__NR_epoll_ctl, epfd, + if (syscall(__NR_epoll_ctl, epfd, EPOLL_CTL_ADD, fildes[[1]], &epevin) == -1) exit(1); diff --git a/opal/mca/event/libevent2022/libevent/http.c b/opal/mca/event/libevent2022/libevent/http.c index 377597eabe8..8340583c5a6 100644 --- a/opal/mca/event/libevent2022/libevent/http.c +++ b/opal/mca/event/libevent2022/libevent/http.c @@ -1950,7 +1950,7 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req) now, just optimistically tell the client to send their message body. */ if (req->ntoread > 0) { - /* ntoread is ev_int64_t, max_body_size is ev_uint64_t */ + /* ntoread is ev_int64_t, max_body_size is ev_uint64_t */ if ((req->evcon->max_body_size <= EV_INT64_MAX) && (ev_uint64_t)req->ntoread > req->evcon->max_body_size) { evhttp_send_error(req, HTTP_ENTITYTOOLARGE, NULL); return; diff --git a/opal/mca/event/libevent2022/libevent/opal_rename.h b/opal/mca/event/libevent2022/libevent/opal_rename.h index 78480ee0d25..be9b64ba248 100644 --- a/opal/mca/event/libevent2022/libevent/opal_rename.h +++ b/opal/mca/event/libevent2022/libevent/opal_rename.h @@ -7,9 +7,9 @@ * Copyright (c) 2015 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/event/libevent2022/libevent/test/regress.gen.c b/opal/mca/event/libevent2022/libevent/test/regress.gen.c index 141f4f42529..0c4097114cc 100644 --- a/opal/mca/event/libevent2022/libevent/test/regress.gen.c +++ b/opal/mca/event/libevent2022/libevent/test/regress.gen.c @@ -88,7 +88,7 @@ msg_run_expand_to_hold_more(struct msg *msg) msg->run_num_allocated = tobe_allocated; return 0;} -struct run* +struct run* msg_run_add(struct msg *msg) { if (++msg->run_length >= msg->run_num_allocated) { diff --git a/opal/mca/event/libevent2022/libevent2022.h b/opal/mca/event/libevent2022/libevent2022.h index 8ee0079b3e1..7c6706323e3 100644 --- a/opal/mca/event/libevent2022/libevent2022.h +++ b/opal/mca/event/libevent2022/libevent2022.h @@ -6,9 +6,9 @@ * Copyright (c) 2015 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * When this component is used, this file is included in the rest of @@ -120,7 +120,7 @@ OPAL_DECLSPEC opal_event_t* opal_event_alloc(void); #define opal_event_free(x) event_free((x)) /* Timer APIs */ -#define opal_event_evtimer_new(b, cb, arg) opal_event_new((b), -1, 0, (cb), (arg)) +#define opal_event_evtimer_new(b, cb, arg) opal_event_new((b), -1, 0, (cb), (arg)) #define opal_event_evtimer_add(x, tv) opal_event_add((x), (tv)) diff --git a/opal/mca/event/libevent2022/libevent2022_component.c b/opal/mca/event/libevent2022/libevent2022_component.c index c87e51772cc..caf5b82fc40 100644 --- a/opal/mca/event/libevent2022/libevent2022_component.c +++ b/opal/mca/event/libevent2022/libevent2022_component.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -121,7 +121,7 @@ const opal_event_component_t mca_event_libevent2022_component = { }; static int libevent2022_register (void) -{ +{ const struct eventop** _eventop = eventops; char available_eventops[1024] = "none"; char *help_msg = NULL; @@ -144,7 +144,7 @@ static int libevent2022_register (void) * won't be used with libevent. For example, we currently have * ompi_mpi_init() set to use "all" (to include epoll and friends) * so that the TCP BTL can be a bit more scalable -- because we - * *know* that MPI apps don't use pty's with libevent. + * *know* that MPI apps don't use pty's with libevent. * Note that other tools explicitly *do* use pty's with libevent: * * - orted @@ -170,7 +170,7 @@ static int libevent2022_register (void) event_module_include = "poll"; #endif - asprintf( &help_msg, + asprintf( &help_msg, "Comma-delimited list of libevent subsystems " "to use (%s -- available on your platform)", available_eventops ); @@ -197,6 +197,6 @@ static int libevent2022_register (void) } static int libevent2022_open(void) -{ +{ return OPAL_SUCCESS; } diff --git a/opal/mca/hwloc/Makefile.am b/opal/mca/hwloc/Makefile.am index 14b13c796d7..9a12052746c 100644 --- a/opal/mca/hwloc/Makefile.am +++ b/opal/mca/hwloc/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/hwloc/README.txt b/opal/mca/hwloc/README.txt index 480b6e930b2..f2554c185da 100644 --- a/opal/mca/hwloc/README.txt +++ b/opal/mca/hwloc/README.txt @@ -13,7 +13,7 @@ Notes for hwloc component maintainers: 1a. As a consequence, if you're adding a new hwloc version component, you'll need to .ompi_ignore all others while you're testing the new - one. + one. 2. If someone wants to fix #1 someday, we might be able to do what we do for libevent: OPAL_CONFIG_SUBDIR (instead of slurping in hwloc's diff --git a/opal/mca/hwloc/base/Makefile.am b/opal/mca/hwloc/base/Makefile.am index 877bfe8c894..ec22838bcae 100644 --- a/opal/mca/hwloc/base/Makefile.am +++ b/opal/mca/hwloc/base/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/hwloc/base/base.h b/opal/mca/hwloc/base/base.h index 3552c069ba8..601c03f46b1 100644 --- a/opal/mca/hwloc/base/base.h +++ b/opal/mca/hwloc/base/base.h @@ -2,9 +2,9 @@ * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -173,8 +173,8 @@ OPAL_DECLSPEC unsigned int opal_hwloc_base_get_obj_idx(hwloc_topology_t topo, hwloc_obj_t obj, opal_hwloc_resource_type_t rtype); -OPAL_DECLSPEC int opal_hwloc_get_sorted_numa_list(hwloc_topology_t topo, - char* device_name, +OPAL_DECLSPEC int opal_hwloc_get_sorted_numa_list(hwloc_topology_t topo, + char* device_name, opal_list_t *sorted_list); /** @@ -209,7 +209,7 @@ OPAL_DECLSPEC char* opal_hwloc_base_check_on_coprocessor(void); */ OPAL_DECLSPEC int opal_hwloc_base_report_bind_failure(const char *file, int line, - const char *msg, + const char *msg, int rc); /** @@ -256,7 +256,7 @@ OPAL_DECLSPEC int opal_hwloc_base_cset2str(char *str, int len, hwloc_cpuset_t cpuset); /** - * Make a prettyprint string for a cset in a map format. + * Make a prettyprint string for a cset in a map format. * Example: [B./..] * Key: [] - signifies socket * / - divider between cores diff --git a/opal/mca/hwloc/base/help-opal-hwloc-base.txt b/opal/mca/hwloc/base/help-opal-hwloc-base.txt index 7e9274f1637..a2c6af0c444 100644 --- a/opal/mca/hwloc/base/help-opal-hwloc-base.txt +++ b/opal/mca/hwloc/base/help-opal-hwloc-base.txt @@ -3,9 +3,9 @@ # Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's hwloc base support diff --git a/opal/mca/hwloc/base/hwloc_base_dt.c b/opal/mca/hwloc/base/hwloc_base_dt.c index 10e3af81233..13763ea895f 100644 --- a/opal/mca/hwloc/base/hwloc_base_dt.c +++ b/opal/mca/hwloc/base/hwloc_base_dt.c @@ -2,7 +2,7 @@ * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow */ @@ -168,7 +168,7 @@ int opal_hwloc_compare(const hwloc_topology_t topo1, char *x1=NULL, *x2=NULL; int l1, l2; int s; - + /* stop stupid compiler warnings */ t1 = (hwloc_topology_t)topo1; t2 = (hwloc_topology_t)topo2; @@ -181,7 +181,7 @@ int opal_hwloc_compare(const hwloc_topology_t topo1, } else if (d2 > d1) { return OPAL_VALUE2_GREATER; } - + /* do the comparison the "cheat" way - get an xml representation * of each tree, and strcmp! This will work fine for inventory @@ -205,7 +205,7 @@ int opal_hwloc_compare(const hwloc_topology_t topo1, } else if (s < 0) { return OPAL_VALUE2_GREATER; } - + /* compare the available support - hwloc unfortunately does * not include this info in its xml support! */ diff --git a/opal/mca/hwloc/base/hwloc_base_frame.c b/opal/mca/hwloc/base/hwloc_base_frame.c index 5164329b9af..9ccd78c57ab 100644 --- a/opal/mca/hwloc/base/hwloc_base_frame.c +++ b/opal/mca/hwloc/base/hwloc_base_frame.c @@ -2,9 +2,9 @@ * Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -322,7 +322,7 @@ static void buffer_cleanup(void *value) { int i; opal_hwloc_print_buffers_t *ptr; - + if (NULL != value) { ptr = (opal_hwloc_print_buffers_t*)value; for (i=0; i < OPAL_HWLOC_PRINT_NUM_BUFS; i++) { @@ -335,7 +335,7 @@ opal_hwloc_print_buffers_t *opal_hwloc_get_print_buffer(void) { opal_hwloc_print_buffers_t *ptr; int ret, i; - + if (!fns_init) { /* setup the print_args function */ if (OPAL_SUCCESS != (ret = opal_tsd_key_create(&print_tsd_key, buffer_cleanup))) { @@ -343,10 +343,10 @@ opal_hwloc_print_buffers_t *opal_hwloc_get_print_buffer(void) } fns_init = true; } - + ret = opal_tsd_getspecific(print_tsd_key, (void**)&ptr); if (OPAL_SUCCESS != ret) return NULL; - + if (NULL == ptr) { ptr = (opal_hwloc_print_buffers_t*)malloc(sizeof(opal_hwloc_print_buffers_t)); for (i=0; i < OPAL_HWLOC_PRINT_NUM_BUFS; i++) { @@ -355,7 +355,7 @@ opal_hwloc_print_buffers_t *opal_hwloc_get_print_buffer(void) ptr->cntr = 0; ret = opal_tsd_setspecific(print_tsd_key, (void*)ptr); } - + return (opal_hwloc_print_buffers_t*) ptr; } @@ -441,7 +441,7 @@ char* opal_hwloc_base_print_locality(opal_hwloc_locality_t locality) ptr->buffers[ptr->cntr][idx++] = 'K'; ptr->buffers[ptr->cntr][idx++] = '\0'; } - + return ptr->buffers[ptr->cntr]; } @@ -515,7 +515,7 @@ int opal_hwloc_base_set_binding_policy(opal_binding_policy_t *policy, char *spec int i; opal_binding_policy_t tmp; char **tmpvals, **quals; - + /* set default */ tmp = 0; diff --git a/opal/mca/hwloc/base/hwloc_base_maffinity.c b/opal/mca/hwloc/base/hwloc_base_maffinity.c index 98ed295597e..6a9c5939ddf 100644 --- a/opal/mca/hwloc/base/hwloc_base_maffinity.c +++ b/opal/mca/hwloc/base/hwloc_base_maffinity.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,21 +42,21 @@ int opal_hwloc_base_set_process_membind_policy(void) policy = HWLOC_MEMBIND_BIND; flags = HWLOC_MEMBIND_STRICT; break; - + case OPAL_HWLOC_BASE_MAP_NONE: default: policy = HWLOC_MEMBIND_DEFAULT; flags = 0; break; } - + cpuset = hwloc_bitmap_alloc(); if (NULL == cpuset) { rc = OPAL_ERR_OUT_OF_RESOURCE; } else { int e; hwloc_get_cpubind(opal_hwloc_topology, cpuset, 0); - rc = hwloc_set_membind(opal_hwloc_topology, + rc = hwloc_set_membind(opal_hwloc_topology, cpuset, policy, flags); e = errno; hwloc_bitmap_free(cpuset); @@ -69,7 +69,7 @@ int opal_hwloc_base_set_process_membind_policy(void) rc = 0; } } - + return (0 == rc) ? OPAL_SUCCESS : OPAL_ERROR; } @@ -99,10 +99,10 @@ int opal_hwloc_base_memory_set(opal_hwloc_base_memory_segment_t *segments, } hwloc_get_cpubind(opal_hwloc_topology, cpuset, 0); for (i = 0; i < num_segments; ++i) { - if (0 != hwloc_set_area_membind(opal_hwloc_topology, + if (0 != hwloc_set_area_membind(opal_hwloc_topology, segments[i].mbs_start_addr, segments[i].mbs_len, cpuset, - HWLOC_MEMBIND_BIND, + HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_STRICT)) { rc = OPAL_ERROR; msg = "hwloc_set_area_membind() failure"; @@ -151,10 +151,10 @@ int opal_hwloc_base_membind(opal_hwloc_base_memory_segment_t *segs, } hwloc_bitmap_set(cpuset, node_id); for(i = 0; i < count; i++) { - if (0 != hwloc_set_area_membind(opal_hwloc_topology, + if (0 != hwloc_set_area_membind(opal_hwloc_topology, segs[i].mbs_start_addr, segs[i].mbs_len, cpuset, - HWLOC_MEMBIND_BIND, + HWLOC_MEMBIND_BIND, HWLOC_MEMBIND_STRICT)) { rc = OPAL_ERROR; msg = "hwloc_set_area_membind() failure"; diff --git a/opal/mca/hwloc/base/hwloc_base_proc_mempolicy.c b/opal/mca/hwloc/base/hwloc_base_proc_mempolicy.c index d6d2d46d1a1..b3715f60928 100644 --- a/opal/mca/hwloc/base/hwloc_base_proc_mempolicy.c +++ b/opal/mca/hwloc/base/hwloc_base_proc_mempolicy.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,21 +42,21 @@ int opal_hwloc_base_set_process_membind_policy(void) policy = HWLOC_MEMBIND_BIND; flags = HWLOC_MEMBIND_STRICT; break; - + case OPAL_HWLOC_BASE_MAP_NONE: default: policy = HWLOC_MEMBIND_DEFAULT; flags = 0; break; } - + cpuset = hwloc_bitmap_alloc(); if (NULL == cpuset) { rc = OPAL_ERR_OUT_OF_RESOURCE; } else { int e; hwloc_get_cpubind(opal_hwloc_topology, cpuset, 0); - rc = hwloc_set_membind(opal_hwloc_topology, + rc = hwloc_set_membind(opal_hwloc_topology, cpuset, policy, flags); e = errno; hwloc_bitmap_free(cpuset); @@ -69,6 +69,6 @@ int opal_hwloc_base_set_process_membind_policy(void) rc = 0; } } - + return (0 == rc) ? OPAL_SUCCESS : OPAL_ERROR; } diff --git a/opal/mca/hwloc/base/hwloc_base_util.c b/opal/mca/hwloc/base/hwloc_base_util.c index 8dfd3044303..68f66fb394b 100644 --- a/opal/mca/hwloc/base/hwloc_base_util.c +++ b/opal/mca/hwloc/base/hwloc_base_util.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -56,10 +56,10 @@ hwloc_obj_t opal_hwloc_base_get_pu(hwloc_topology_t topo, { hwloc_obj_type_t obj_type = HWLOC_OBJ_CORE; hwloc_obj_t obj; - + /* hwloc isn't able to find cores on all platforms. Example: PPC64 running RHEL 5.4 (linux kernel 2.6.18) only reports NUMA - nodes and PU's. Fine. + nodes and PU's. Fine. However, note that hwloc_get_obj_by_type() will return NULL in 2 (effectively) different cases: @@ -90,10 +90,10 @@ hwloc_obj_t opal_hwloc_base_get_pu(hwloc_topology_t topo, } return obj; } - + opal_output_verbose(5, opal_hwloc_base_framework.framework_output, "Searching for %d LOGICAL PU", lid); - + /* Now do the actual lookup. */ obj = hwloc_get_obj_by_type(topo, obj_type, lid); OPAL_OUTPUT_VERBOSE((5, opal_hwloc_base_framework.framework_output, @@ -246,7 +246,7 @@ int opal_hwloc_base_get_topology(void) if (NULL == opal_hwloc_base_topo_file) { if (0 != hwloc_topology_init(&opal_hwloc_topology) || - 0 != hwloc_topology_set_flags(opal_hwloc_topology, + 0 != hwloc_topology_set_flags(opal_hwloc_topology, (HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_IO_DEVICES)) || 0 != hwloc_topology_load(opal_hwloc_topology)) { @@ -379,8 +379,8 @@ void opal_hwloc_base_get_local_cpuset(void) } /* get the cpus we are bound to */ - if (hwloc_get_cpubind(opal_hwloc_topology, - opal_hwloc_my_cpuset, + if (hwloc_get_cpubind(opal_hwloc_topology, + opal_hwloc_my_cpuset, HWLOC_CPUBIND_PROCESS) < 0) { /* we are not bound - use the root's available cpuset */ root = hwloc_get_root_obj(opal_hwloc_topology); @@ -759,7 +759,7 @@ static hwloc_obj_t df_search(hwloc_topology_t topo, return obj; } } - + return NULL; } @@ -864,7 +864,7 @@ static hwloc_obj_t df_search_min_bound(hwloc_topology_t topo, data = OBJ_NEW(opal_hwloc_obj_data_t); start->userdata = data; } - + OPAL_OUTPUT_VERBOSE((5, opal_hwloc_base_framework.framework_output, "hwloc:base:min_bound_under_obj object %s:%u nbound %u min %u", hwloc_obj_type_string(target), start->logical_index, @@ -892,7 +892,7 @@ static hwloc_obj_t df_search_min_bound(hwloc_topology_t topo, break; } } - + return save; } @@ -1058,7 +1058,7 @@ static int socket_to_cpu_set(char *cpus, res = opal_hwloc_base_get_available_cpus(topo, obj); hwloc_bitmap_or(cpumask, cpumask, res); break; - + case 2: /* range of sockets was given */ lower_range = atoi(range[0]); upper_range = atoi(range[1]); @@ -1098,7 +1098,7 @@ static int socket_core_to_cpu_set(char *socket_core_list, socket_core = opal_argv_split(socket_core_list, ':'); socket_id = atoi(socket_core[0]); - + /* get the object for this socket id */ if (NULL == (socket = opal_hwloc_base_get_obj_by_type(topo, HWLOC_OBJ_SOCKET, 0, socket_id, rtype))) { @@ -1153,7 +1153,7 @@ static int socket_core_to_cpu_set(char *socket_core_list, } opal_argv_free(list); break; - + case 2: /* range of core id's was given */ opal_output_verbose(5, opal_hwloc_base_framework.framework_output, "range of cores given: start %s stop %s", @@ -1176,7 +1176,7 @@ static int socket_core_to_cpu_set(char *socket_core_list, hwloc_bitmap_or(cpumask, cpumask, res); } break; - + default: opal_argv_free(range); opal_argv_free(socket_core); @@ -1210,14 +1210,14 @@ int opal_hwloc_base_slot_list_parse(const char *slot_str, if (NULL == slot_str || 0 == strlen(slot_str)) { return OPAL_ERR_BAD_PARAM; } - + opal_output_verbose(5, opal_hwloc_base_framework.framework_output, "slot assignment: slot_list == %s", slot_str); /* split at ';' */ item = opal_argv_split(slot_str, ';'); - + /* start with a clean mask */ hwloc_bitmap_zero(cpumask); /* loop across the items and accumulate the mask */ @@ -1299,7 +1299,7 @@ int opal_hwloc_base_slot_list_parse(const char *slot_str, } opal_argv_free(list); break; - + case 2: /* range of core id's was given */ lower_range = atoi(range[0]); upper_range = atoi(range[1]); @@ -1317,7 +1317,7 @@ int opal_hwloc_base_slot_list_parse(const char *slot_str, hwloc_bitmap_or(cpumask, cpumask, pucpus); } break; - + default: opal_argv_free(range); opal_argv_free(item); @@ -1505,7 +1505,7 @@ static char *hwloc_getline(FILE *fp) buff = strdup(input); return buff; } - + return NULL; } @@ -1700,7 +1700,7 @@ static char *bitmap2rangestr(int bitmap) /* * Make a map of socket/core/hwthread tuples */ -static int build_map(int *num_sockets_arg, int *num_cores_arg, +static int build_map(int *num_sockets_arg, int *num_cores_arg, hwloc_cpuset_t cpuset, int ***map, hwloc_topology_t topo) { static int num_sockets = -1, num_cores = -1; @@ -1744,11 +1744,11 @@ static int build_map(int *num_sockets_arg, int *num_cores_arg, the socket/core/pu triples */ for (pu_index = 0, pu = hwloc_get_obj_inside_cpuset_by_type(topo, - cpuset, HWLOC_OBJ_PU, + cpuset, HWLOC_OBJ_PU, pu_index); NULL != pu; pu = hwloc_get_obj_inside_cpuset_by_type(topo, - cpuset, HWLOC_OBJ_PU, + cpuset, HWLOC_OBJ_PU, ++pu_index)) { /* Go upward and find the core this PU belongs to */ core = pu; @@ -1830,7 +1830,7 @@ int opal_hwloc_base_cset2str(char *str, int len, } first = false; - snprintf(tmp, stmp, "socket %d[core %d[hwt %s]]", + snprintf(tmp, stmp, "socket %d[core %d[hwt %s]]", socket_index, core_index, bitmap2rangestr(map[socket_index][core_index])); strncat(str, tmp, len - strlen(str)); @@ -1844,7 +1844,7 @@ int opal_hwloc_base_cset2str(char *str, int len, } /* - * Make a prettyprint string for a cset in a map format. + * Make a prettyprint string for a cset in a map format. * Example: [B./..] * Key: [] - signifies socket * / - divider between cores @@ -1885,18 +1885,18 @@ int opal_hwloc_base_cset2mapstr(char *str, int len, /* Iterate over all existing sockets */ for (socket = hwloc_get_obj_by_type(topo, HWLOC_OBJ_SOCKET, 0); - NULL != socket; + NULL != socket; socket = socket->next_cousin) { strncat(str, "[", len - strlen(str)); /* Iterate over all existing cores in this socket */ core_index = 0; for (core = hwloc_get_obj_inside_cpuset_by_type(topo, - socket->cpuset, + socket->cpuset, HWLOC_OBJ_CORE, core_index); - NULL != core; + NULL != core; core = hwloc_get_obj_inside_cpuset_by_type(topo, - socket->cpuset, + socket->cpuset, HWLOC_OBJ_CORE, ++core_index)) { if (core_index > 0) { strncat(str, "/", len - strlen(str)); @@ -1905,11 +1905,11 @@ int opal_hwloc_base_cset2mapstr(char *str, int len, /* Iterate over all existing PUs in this core */ pu_index = 0; for (pu = hwloc_get_obj_inside_cpuset_by_type(topo, - core->cpuset, + core->cpuset, HWLOC_OBJ_PU, pu_index); - NULL != pu; + NULL != pu; pu = hwloc_get_obj_inside_cpuset_by_type(topo, - core->cpuset, + core->cpuset, HWLOC_OBJ_PU, ++pu_index)) { /* Is this PU in the cpuset? */ @@ -2015,7 +2015,7 @@ static void sort_by_dist(hwloc_topology_t topo, char* device_name, opal_list_t * } } -static int find_devices(hwloc_topology_t topo, char** device_name) +static int find_devices(hwloc_topology_t topo, char** device_name) { hwloc_obj_t device_obj = NULL; int count = 0; @@ -2049,7 +2049,7 @@ int opal_hwloc_get_sorted_numa_list(hwloc_topology_t topo, char* device_name, op item = opal_list_get_next(item)) { sum = (opal_hwloc_summary_t*)item; if (HWLOC_OBJ_NODE == sum->type) { - if (opal_list_get_size(&sum->sorted_by_dist_list) > 0) { + if (opal_list_get_size(&sum->sorted_by_dist_list) > 0) { OPAL_LIST_FOREACH(numa, &(sum->sorted_by_dist_list), opal_rmaps_numa_node_t) { copy_numa = OBJ_NEW(opal_rmaps_numa_node_t); copy_numa->index = numa->index; @@ -2095,7 +2095,7 @@ char* opal_hwloc_base_get_topo_signature(hwloc_topology_t topo) char *sig=NULL, *arch=NULL; hwloc_obj_t obj; unsigned i; - + nnuma = opal_hwloc_base_get_nbobjs_by_type(topo, HWLOC_OBJ_NODE, 0, OPAL_HWLOC_AVAILABLE); nsocket = opal_hwloc_base_get_nbobjs_by_type(topo, HWLOC_OBJ_SOCKET, 0, OPAL_HWLOC_AVAILABLE); nl3 = opal_hwloc_base_get_nbobjs_by_type(topo, HWLOC_OBJ_CACHE, 3, OPAL_HWLOC_AVAILABLE); diff --git a/opal/mca/hwloc/configure.m4 b/opal/mca/hwloc/configure.m4 index b5d19e92a41..e1b33565872 100644 --- a/opal/mca/hwloc/configure.m4 +++ b/opal/mca/hwloc/configure.m4 @@ -2,9 +2,9 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/hwloc/external/Makefile.am b/opal/mca/hwloc/external/Makefile.am index 3dc62c8c2d6..81f551b3883 100644 --- a/opal/mca/hwloc/external/Makefile.am +++ b/opal/mca/hwloc/external/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/hwloc/external/external.h b/opal/mca/hwloc/external/external.h index 25071e5cb3e..7cc89d74441 100644 --- a/opal/mca/hwloc/external/external.h +++ b/opal/mca/hwloc/external/external.h @@ -2,9 +2,9 @@ * Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * When this component is used, this file is included in the rest of @@ -25,7 +25,7 @@ BEGIN_C_DECLS functions in that file that invoke ibv_* functions. Some linkers (e.g., Solaris Studio Compilers) will instantiate those static inline functions even if we don't use them, and therefore we need - to be able to resolve the ibv_* symbols at link time. + to be able to resolve the ibv_* symbols at link time. Since -libverbs is only specified in places where we use other ibv_* functions (e.g., the OpenFabrics-based BTLs), that means that diff --git a/opal/mca/hwloc/external/hwloc_external_component.c b/opal/mca/hwloc/external/hwloc_external_component.c index 690beab2bf8..3c3df188d97 100644 --- a/opal/mca/hwloc/external/hwloc_external_component.c +++ b/opal/mca/hwloc/external/hwloc_external_component.c @@ -1,13 +1,13 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/hwloc/hwloc.h b/opal/mca/hwloc/hwloc.h index 7e3cd483111..e18b33a6584 100644 --- a/opal/mca/hwloc/hwloc.h +++ b/opal/mca/hwloc/hwloc.h @@ -6,7 +6,7 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow */ diff --git a/opal/mca/hwloc/hwloc1110/Makefile.am b/opal/mca/hwloc/hwloc1110/Makefile.am index 4fb47162acd..9329bb88273 100644 --- a/opal/mca/hwloc/hwloc1110/Makefile.am +++ b/opal/mca/hwloc/hwloc1110/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014-2015 Intel, Inc. All right reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/hwloc/hwloc1110/configure.m4 b/opal/mca/hwloc/hwloc1110/configure.m4 index 72a249f8f9e..e1ae3c1813d 100644 --- a/opal/mca/hwloc/hwloc1110/configure.m4 +++ b/opal/mca/hwloc/hwloc1110/configure.m4 @@ -4,9 +4,9 @@ # Copyright (c) 2014-2015 Intel, Inc. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -107,7 +107,7 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1110_CONFIG],[ # this without "picky" flags. opal_hwloc_hwloc1110_save_cflags=$CFLAGS CFLAGS=$OPAL_CFLAGS_BEFORE_PICKY - HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1110/hwloc], + HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1110/hwloc], [AC_MSG_CHECKING([whether hwloc configure succeeded]) AC_MSG_RESULT([yes]) HWLOC_VERSION="internal v`$srcdir/$opal_hwloc_hwloc1110_basedir/hwloc/config/hwloc_get_version.sh $srcdir/$opal_hwloc_hwloc1110_basedir/hwloc/VERSION`" @@ -117,8 +117,8 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1110_CONFIG],[ opal_hwloc_hwloc1110_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_hwloc_hwloc1110_basedir"'/hwloc/src/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)' opal_hwloc_hwloc1110_support=yes - AC_DEFINE_UNQUOTED([HWLOC_HWLOC1110_HWLOC_VERSION], - ["$HWLOC_VERSION"], + AC_DEFINE_UNQUOTED([HWLOC_HWLOC1110_HWLOC_VERSION], + ["$HWLOC_VERSION"], [Version of hwloc]) # Do we have verbs support? @@ -144,7 +144,7 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1110_CONFIG],[ [enable_shared=$opal_hwloc_hwloc1110_save_shared]) AS_IF([test -n "$opal_hwloc_hwloc1110_save_plugins"], [enable_plugins=$opal_hwloc_hwloc1110_save_shared]) - + CPPFLAGS=$opal_hwloc_hwloc1110_save_CPPFLAGS LDFLAGS=$opal_hwloc_hwloc1110_save_LDFLAGS LIBS=$opal_hwloc_hwloc1110_save_LIBS diff --git a/opal/mca/hwloc/hwloc1110/hwloc/README b/opal/mca/hwloc/hwloc1110/hwloc/README index fed93191f99..f9b2e6c1615 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/README +++ b/opal/mca/hwloc/hwloc1110/hwloc/README @@ -349,7 +349,7 @@ of the source tree. #include #include -static void print_children(hwloc_topology_t topology, hwloc_obj_t obj, +static void print_children(hwloc_topology_t topology, hwloc_obj_t obj, int depth) { char type[32], attr[1024]; @@ -384,7 +384,7 @@ int main(void) hwloc_topology_init(&topology); /* ... Optionally, put detection configuration here to ignore - some objects types, define a synthetic topology, etc.... + some objects types, define a synthetic topology, etc.... The default is to detect all the objects of the machine that the caller is allowed to access. See Configure Topology @@ -404,7 +404,7 @@ int main(void) *****************************************************************/ for (depth = 0; depth < topodepth; depth++) { printf("*** Objects at level %d\n", depth); - for (i = 0; i < hwloc_get_nbobjs_by_depth(topology, depth); + for (i = 0; i < hwloc_get_nbobjs_by_depth(topology, depth); i++) { hwloc_obj_type_snprintf(string, sizeof(string), hwloc_get_obj_by_depth @@ -446,7 +446,7 @@ int main(void) levels++; size += obj->attr->cache.size; } - printf("*** Logical processor 0 has %d caches totaling %luKB\n", + printf("*** Logical processor 0 has %d caches totaling %luKB\n", levels, size / 1024); /***************************************************************** diff --git a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 b/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 index 2f44504fd10..8c1a766538c 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 +++ b/opal/mca/hwloc/hwloc1110/hwloc/config/hwloc.m4 @@ -367,7 +367,7 @@ EOF]) AC_CHECK_HEADERS([dirent.h]) AC_CHECK_HEADERS([strings.h]) AC_CHECK_HEADERS([ctype.h]) - + AC_CHECK_FUNCS([strncasecmp], [ _HWLOC_CHECK_DECL([strncasecmp], [ AC_DEFINE([HWLOC_HAVE_DECL_STRNCASECMP], [1], [Define to 1 if function `strncasecmp' is declared by system headers]) diff --git a/opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp b/opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp index e5c3bf3ce47..18fc8bd2c17 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp +++ b/opal/mca/hwloc/hwloc1110/hwloc/contrib/hwloc-valgrind.supp @@ -126,7 +126,7 @@ obj:*libatiadl* } -# +# { libpciaccess_device_name_leak Memcheck:Leak diff --git a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in b/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in index e101b0a479b..557d0cd885b 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in +++ b/opal/mca/hwloc/hwloc1110/hwloc/include/hwloc/autogen/config.h.in @@ -69,7 +69,7 @@ /* Maybe before gcc 2.95 too */ #ifdef HWLOC_HAVE_ATTRIBUTE_UNUSED -#define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED +#define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_UNUSED (GXX_ABOVE_3_4 || GCC_ABOVE_2_95) #else @@ -82,7 +82,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_MALLOC -#define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC +#define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_MALLOC (GXX_ABOVE_3_4 || GCC_ABOVE_2_96) #else @@ -95,7 +95,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_CONST -#define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST +#define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_CONST (GXX_ABOVE_3_4 || GCC_ABOVE_2_95) #else @@ -108,7 +108,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_PURE -#define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE +#define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_PURE (GXX_ABOVE_3_4 || GCC_ABOVE_2_96) #else @@ -121,7 +121,7 @@ #endif #ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED -#define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED +#define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED #elif defined(__GNUC__) # define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED (GXX_ABOVE_3_4 || GCC_ABOVE_3_3) #else diff --git a/opal/mca/hwloc/hwloc1110/hwloc1110.h b/opal/mca/hwloc/hwloc1110/hwloc1110.h index 35215b45576..e439ad4b10c 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc1110.h +++ b/opal/mca/hwloc/hwloc1110/hwloc1110.h @@ -3,9 +3,9 @@ * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * When this component is used, this file is included in the rest of @@ -26,7 +26,7 @@ BEGIN_C_DECLS functions in that file that invoke ibv_* functions. Some linkers (e.g., Solaris Studio Compilers) will instantiate those static inline functions even if we don't use them, and therefore we need - to be able to resolve the ibv_* symbols at link time. + to be able to resolve the ibv_* symbols at link time. Since -libverbs is only specified in places where we use other ibv_* functions (e.g., the OpenFabrics-based BTLs), that means that diff --git a/opal/mca/hwloc/hwloc1110/hwloc1110_component.c b/opal/mca/hwloc/hwloc1110/hwloc1110_component.c index 02322fca4b4..a7234fcf5e0 100644 --- a/opal/mca/hwloc/hwloc1110/hwloc1110_component.c +++ b/opal/mca/hwloc/hwloc1110/hwloc1110_component.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/opal/mca/if/Makefile.am b/opal/mca/if/Makefile.am index 739a11e8464..fc9aad5c47d 100644 --- a/opal/mca/if/Makefile.am +++ b/opal/mca/if/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/base/Makefile.am b/opal/mca/if/base/Makefile.am index f8451f65904..65ebd44cb14 100644 --- a/opal/mca/if/base/Makefile.am +++ b/opal/mca/if/base/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/base/base.h b/opal/mca/if/base/base.h index 25c004e4837..24ae771c303 100644 --- a/opal/mca/if/base/base.h +++ b/opal/mca/if/base/base.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/if/base/if_base_components.c b/opal/mca/if/base/if_base_components.c index 6dde724ef9a..02da51a6c9e 100644 --- a/opal/mca/if/base/if_base_components.c +++ b/opal/mca/if/base/if_base_components.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -64,7 +64,7 @@ static int opal_if_base_open (mca_base_open_flag_t flags) return OPAL_SUCCESS; } frameopen = true; - + /* setup the global list */ OBJ_CONSTRUCT(&opal_if_list, opal_list_t); @@ -79,7 +79,7 @@ static int opal_if_base_close(void) if (!frameopen) { return OPAL_SUCCESS; } - + while (NULL != (item = opal_list_remove_first(&opal_if_list))) { OBJ_RELEASE(item); } diff --git a/opal/mca/if/bsdx_ipv4/Makefile.am b/opal/mca/if/bsdx_ipv4/Makefile.am index 349d61b75d9..ab259799665 100644 --- a/opal/mca/if/bsdx_ipv4/Makefile.am +++ b/opal/mca/if/bsdx_ipv4/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/bsdx_ipv4/configure.m4 b/opal/mca/if/bsdx_ipv4/configure.m4 index 5e90b475139..8a1c97b91f6 100644 --- a/opal/mca/if/bsdx_ipv4/configure.m4 +++ b/opal/mca/if/bsdx_ipv4/configure.m4 @@ -1,10 +1,10 @@ # -*- shell-script -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -14,7 +14,7 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_if_config_CONFIG(action-if-can-compile, +# MCA_if_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [ diff --git a/opal/mca/if/bsdx_ipv4/if_bsdx.c b/opal/mca/if/bsdx_ipv4/if_bsdx.c index 0e2024909d1..e67f9b7f6bd 100644 --- a/opal/mca/if/bsdx_ipv4/if_bsdx.c +++ b/opal/mca/if/bsdx_ipv4/if_bsdx.c @@ -2,9 +2,9 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -72,7 +72,7 @@ static int if_bsdx_open(void) struct ifaddrs *cur_ifaddrs; struct sockaddr_in* sin_addr; - /* + /* * the manpage claims that getifaddrs() allocates the memory, * and freeifaddrs() is later used to release the allocated memory. * however, without this malloc the call to getifaddrs() segfaults @@ -86,7 +86,7 @@ static int if_bsdx_open(void) return OPAL_ERROR; } - for (cur_ifaddrs = *ifadd_list; NULL != cur_ifaddrs; + for (cur_ifaddrs = *ifadd_list; NULL != cur_ifaddrs; cur_ifaddrs = cur_ifaddrs->ifa_next) { opal_if_t *intf; struct in_addr a4; @@ -124,7 +124,7 @@ static int if_bsdx_open(void) /* fill values into the opal_if_t */ memcpy(&a4, &(sin_addr->sin_addr), sizeof(struct in_addr)); - + strncpy(intf->if_name, cur_ifaddrs->ifa_name, IF_NAMESIZE); intf->if_index = opal_list_get_size(&opal_if_list) + 1; ((struct sockaddr_in*) &intf->if_addr)->sin_addr = a4; @@ -134,7 +134,7 @@ static int if_bsdx_open(void) intf->if_mask = prefix( sin_addr->sin_addr.s_addr); intf->if_flags = cur_ifaddrs->ifa_flags; - intf->if_kernel_index = + intf->if_kernel_index = (uint16_t) if_nametoindex(cur_ifaddrs->ifa_name); opal_list_append(&opal_if_list, &(intf->super)); diff --git a/opal/mca/if/bsdx_ipv6/Makefile.am b/opal/mca/if/bsdx_ipv6/Makefile.am index b0ffd520679..1bcd974f668 100644 --- a/opal/mca/if/bsdx_ipv6/Makefile.am +++ b/opal/mca/if/bsdx_ipv6/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/bsdx_ipv6/configure.m4 b/opal/mca/if/bsdx_ipv6/configure.m4 index ffdbceb08ee..361e9a32ae4 100644 --- a/opal/mca/if/bsdx_ipv6/configure.m4 +++ b/opal/mca/if/bsdx_ipv6/configure.m4 @@ -1,10 +1,10 @@ # -*- shell-script -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -14,7 +14,7 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_if_config_CONFIG(action-if-can-compile, +# MCA_if_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [ @@ -25,7 +25,7 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [ # If we found struct sockaddr and we're on any of the BSDs, we're # happy. I.e., this: #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \ - # defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__) + # defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__) AC_MSG_CHECKING([struct sockaddr]) AS_IF([test "$opal_found_sockaddr" = "yes"], [AC_MSG_RESULT([yes (cached)]) diff --git a/opal/mca/if/bsdx_ipv6/if_bsdx_ipv6.c b/opal/mca/if/bsdx_ipv6/if_bsdx_ipv6.c index 2273da192e9..d6cf3d6861f 100644 --- a/opal/mca/if/bsdx_ipv6/if_bsdx_ipv6.c +++ b/opal/mca/if/bsdx_ipv6/if_bsdx_ipv6.c @@ -2,9 +2,9 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -108,7 +108,7 @@ static int if_bsdx_ipv6_open(void) opal_output_verbose(1, opal_if_base_framework.framework_output, "searching for IPv6 interfaces"); - /* + /* * the manpage claims that getifaddrs() allocates the memory, * and freeifaddrs() is later used to release the allocated memory. * however, without this malloc the call to getifaddrs() segfaults @@ -123,7 +123,7 @@ static int if_bsdx_ipv6_open(void) return OPAL_ERROR; } - for (cur_ifaddrs = *ifadd_list; NULL != cur_ifaddrs; + for (cur_ifaddrs = *ifadd_list; NULL != cur_ifaddrs; cur_ifaddrs = cur_ifaddrs->ifa_next) { opal_if_t *intf; struct in6_addr a6; @@ -160,21 +160,21 @@ static int if_bsdx_ipv6_open(void) sin_addr = (struct sockaddr_in6 *) cur_ifaddrs->ifa_addr; - /* + /* * skip IPv6 address starting with fe80:, as this is supposed to be * link-local scope. sockaddr_in6->sin6_scope_id doesn't always work - * TODO: test whether scope id is set to a sensible value on + * TODO: test whether scope id is set to a sensible value on * linux and/or bsd (including osx) * * MacOSX: fe80::... has a scope of 0, but ifconfig -a shows - * a scope of 4 on that particular machine, + * a scope of 4 on that particular machine, * so the scope returned by getifaddrs() isn't working properly */ if ((IN6_IS_ADDR_LINKLOCAL (&sin_addr->sin6_addr))) { opal_output_verbose(1, opal_if_base_framework.framework_output, "skipping link-local ipv6 address on interface " - "%s with scope %d.\n", + "%s with scope %d.\n", cur_ifaddrs->ifa_name, sin_addr->sin6_scope_id); continue; } @@ -182,14 +182,14 @@ static int if_bsdx_ipv6_open(void) if (0 < opal_output_get_verbosity(opal_if_base_framework.framework_output)) { char *addr_name = (char *) malloc(48*sizeof(char)); inet_ntop(AF_INET6, &sin_addr->sin6_addr, addr_name, 48*sizeof(char)); - opal_output(0, "ipv6 capable interface %s discovered, address %s.\n", + opal_output(0, "ipv6 capable interface %s discovered, address %s.\n", cur_ifaddrs->ifa_name, addr_name); free(addr_name); } /* fill values into the opal_if_t */ memcpy(&a6, &(sin_addr->sin6_addr), sizeof(struct in6_addr)); - + intf = OBJ_NEW(opal_if_t); if (NULL == intf) { opal_output(0, "opal_ifinit: unable to allocate %lu bytes\n", @@ -217,7 +217,7 @@ static int if_bsdx_ipv6_open(void) * (or create our own), getifaddrs() does not contain such * data */ - intf->if_kernel_index = + intf->if_kernel_index = (uint16_t) if_nametoindex(cur_ifaddrs->ifa_name); opal_list_append(&opal_if_list, &(intf->super)); } /* of for loop over ifaddrs list */ diff --git a/opal/mca/if/if.h b/opal/mca/if/if.h index c9da6a8e12a..5b3ae793c1b 100644 --- a/opal/mca/if/if.h +++ b/opal/mca/if/if.h @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/if/linux_ipv6/Makefile.am b/opal/mca/if/linux_ipv6/Makefile.am index 8c7505ced7b..7449b04b1d4 100644 --- a/opal/mca/if/linux_ipv6/Makefile.am +++ b/opal/mca/if/linux_ipv6/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/linux_ipv6/configure.m4 b/opal/mca/if/linux_ipv6/configure.m4 index 4d53edb51a6..fc9dc8b27d4 100644 --- a/opal/mca/if/linux_ipv6/configure.m4 +++ b/opal/mca/if/linux_ipv6/configure.m4 @@ -1,10 +1,10 @@ # -*- shell-script -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -14,7 +14,7 @@ AC_DEFUN([MCA_opal_if_linux_ipv6_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_if_config_CONFIG(action-if-can-compile, +# MCA_if_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_if_linux_ipv6_CONFIG], [ diff --git a/opal/mca/if/linux_ipv6/if_linux_ipv6.c b/opal/mca/if/linux_ipv6/if_linux_ipv6.c index 5e25a960c92..eb2a8fc0920 100644 --- a/opal/mca/if/linux_ipv6/if_linux_ipv6.c +++ b/opal/mca/if/linux_ipv6/if_linux_ipv6.c @@ -2,9 +2,9 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -155,7 +155,7 @@ static int if_linux_ipv6_open(void) } else { intf->if_flags = IFF_UP; } - + /* copy new interface information to heap and append to list */ opal_list_append(&opal_if_list, &(intf->super)); diff --git a/opal/mca/if/posix_ipv4/Makefile.am b/opal/mca/if/posix_ipv4/Makefile.am index 6e8a0842edd..0c77b658ef0 100644 --- a/opal/mca/if/posix_ipv4/Makefile.am +++ b/opal/mca/if/posix_ipv4/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/posix_ipv4/configure.m4 b/opal/mca/if/posix_ipv4/configure.m4 index 8ff48b5c889..33faf57fc40 100644 --- a/opal/mca/if/posix_ipv4/configure.m4 +++ b/opal/mca/if/posix_ipv4/configure.m4 @@ -1,10 +1,10 @@ # -*- shell-script -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -14,7 +14,7 @@ AC_DEFUN([MCA_opal_if_posix_ipv4_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_if_config_CONFIG(action-if-can-compile, +# MCA_if_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_if_posix_ipv4_CONFIG], [ diff --git a/opal/mca/if/posix_ipv4/if_posix.c b/opal/mca/if/posix_ipv4/if_posix.c index 6f755334366..c50ae35c2d2 100644 --- a/opal/mca/if/posix_ipv4/if_posix.c +++ b/opal/mca/if/posix_ipv4/if_posix.c @@ -6,9 +6,9 @@ * reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,19 +81,19 @@ static int if_posix_open(void) using AF_UNSPEC or AF_INET6 will cause everything to fail. */ if ((sd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - opal_output(0, "opal_ifinit: socket() failed with errno=%d\n", + opal_output(0, "opal_ifinit: socket() failed with errno=%d\n", errno); return OPAL_ERROR; } /* - * Get Network Interface configuration + * Get Network Interface configuration * * Some notes on the behavior of ioctl(..., SIOCGIFCONF,...) * when not enough space is allocated for all the entries. * * - Solaris returns -1, errno EINVAL if there is not enough - * space + * space * - OS X returns 0, sets .ifc_len to the space used by the * by the entries that did fit. * - Linux returns 0, sets .ifc_len to the space required to @@ -112,20 +112,20 @@ static int if_posix_open(void) close(sd); return OPAL_ERROR; } - + /* initialize the memory so valgrind and purify won't * complain. Since this isn't performance critical, just * always memset. */ memset(ifconf.ifc_req, 0, ifconf.ifc_len); - + if (ioctl(sd, SIOCGIFCONF, &ifconf) < 0) { /* if we got an einval, we probably don't have enough space. so we'll fall down and try to expand our space */ if (errno != EINVAL && lastlen != 0) { opal_output(0, "opal_ifinit: ioctl(SIOCGIFCONF) \ - failed with errno=%d", + failed with errno=%d", errno); free(ifconf.ifc_req); close(sd); @@ -142,7 +142,7 @@ static int if_posix_open(void) } lastlen = ifconf.ifc_len; } - + /* Yes, we overflowed (or had an EINVAL on the ioctl). Loop back around and try again with a bigger buffer */ free(ifconf.ifc_req); @@ -153,9 +153,9 @@ static int if_posix_open(void) close(sd); return OPAL_ERR_FATAL; } - - /* - * Setup indexes + + /* + * Setup indexes */ ptr = (char*) ifconf.ifc_req; rem = ifconf.ifc_len; @@ -169,24 +169,24 @@ static int if_posix_open(void) /* compute offset for entries */ #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN length = sizeof(struct sockaddr); - + if (ifr->ifr_addr.sa_len > length) { length = ifr->ifr_addr.sa_len; } - + length += sizeof(ifr->ifr_name); #else length = sizeof(struct ifreq); #endif - + rem -= length; ptr += length; - + /* see if we like this entry */ if (AF_INET != ifr->ifr_addr.sa_family) { continue; } - + if (ioctl(sd, SIOCGIFFLAGS, ifr) < 0) { opal_output(0, "opal_ifinit: ioctl(SIOCGIFFLAGS) failed with errno=%d", errno); continue; @@ -206,7 +206,7 @@ static int if_posix_open(void) continue; } #endif - + intf = OBJ_NEW(opal_if_t); if (NULL == intf) { opal_output(0, "opal_ifinit: unable to allocated %lu bytes\n", (unsigned long)sizeof(opal_if_t)); @@ -220,13 +220,13 @@ static int if_posix_open(void) memset(intf->if_name, 0, sizeof(intf->if_name)); strncpy(intf->if_name, ifr->ifr_name, sizeof(intf->if_name) - 1); intf->if_flags = ifr->ifr_flags; - + /* every new address gets its own internal if_index */ intf->if_index = opal_list_get_size(&opal_if_list)+1; opal_output_verbose(1, opal_if_base_framework.framework_output, "found interface %s", intf->if_name); - + /* assign the kernel index to distinguish different NICs */ #ifndef SIOCGIFINDEX intf->if_kernel_index = intf->if_index; @@ -244,7 +244,7 @@ static int if_posix_open(void) intf->if_kernel_index = -1; #endif #endif /* SIOCGIFINDEX */ - + /* This call returns IPv4 addresses only. Use SIOCGLIFADDR instead */ if (ioctl(sd, SIOCGIFADDR, ifr) < 0) { @@ -256,19 +256,19 @@ static int if_posix_open(void) OBJ_RELEASE(intf); continue; } - + /* based on above, we know this is an IPv4 address... */ memcpy(&intf->if_addr, &ifr->ifr_addr, sizeof(struct sockaddr_in)); - + if (ioctl(sd, SIOCGIFNETMASK, ifr) < 0) { opal_output(0, "opal_ifinit: ioctl(SIOCGIFNETMASK) failed with errno=%d", errno); OBJ_RELEASE(intf); continue; } - + /* generate CIDR and assign to netmask */ intf->if_mask = prefix(((struct sockaddr_in*) &ifr->ifr_addr)->sin_addr.s_addr); - + #if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ_IFR_HWADDR) /* get the MAC address */ if (ioctl(sd, SIOCGIFHWADDR, ifr) < 0) { diff --git a/opal/mca/if/solaris_ipv6/Makefile.am b/opal/mca/if/solaris_ipv6/Makefile.am index 04e6c0a336f..b8e9606c327 100644 --- a/opal/mca/if/solaris_ipv6/Makefile.am +++ b/opal/mca/if/solaris_ipv6/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/if/solaris_ipv6/configure.m4 b/opal/mca/if/solaris_ipv6/configure.m4 index 92567455bd0..eecf6f435dd 100644 --- a/opal/mca/if/solaris_ipv6/configure.m4 +++ b/opal/mca/if/solaris_ipv6/configure.m4 @@ -1,10 +1,10 @@ # -*- shell-script -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -14,7 +14,7 @@ AC_DEFUN([MCA_opal_if_solaris_ipv6_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_if_config_CONFIG(action-if-can-compile, +# MCA_if_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_if_solaris_ipv6_CONFIG], [ diff --git a/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c b/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c index 9bae55ad632..6f718065539 100644 --- a/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c +++ b/opal/mca/if/solaris_ipv6/if_solaris_ipv6.c @@ -2,9 +2,9 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/installdirs/Makefile.am b/opal/mca/installdirs/Makefile.am index b73f484030f..3f9fa35860e 100644 --- a/opal/mca/installdirs/Makefile.am +++ b/opal/mca/installdirs/Makefile.am @@ -1,11 +1,11 @@ # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/installdirs/base/Makefile.am b/opal/mca/installdirs/base/Makefile.am index 9923b7d325e..73cd71c9534 100644 --- a/opal/mca/installdirs/base/Makefile.am +++ b/opal/mca/installdirs/base/Makefile.am @@ -1,10 +1,10 @@ # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/installdirs/base/base.h b/opal/mca/installdirs/base/base.h index d6e0216a0e4..94ad6fbfed9 100644 --- a/opal/mca/installdirs/base/base.h +++ b/opal/mca/installdirs/base/base.h @@ -1,12 +1,12 @@ /* * Copyright (c) 2006-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/installdirs/base/installdirs_base_components.c b/opal/mca/installdirs/base/installdirs_base_components.c index 4bf9f83ef24..0c10e12fb6f 100644 --- a/opal/mca/installdirs/base/installdirs_base_components.c +++ b/opal/mca/installdirs/base/installdirs_base_components.c @@ -1,14 +1,14 @@ /* * Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Sandia National Laboratories. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -47,7 +47,7 @@ opal_installdirs_base_open(mca_base_open_flag_t flags) (const opal_installdirs_base_component_t *) component_item->cli_component; /* copy over the data, if something isn't already there */ - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, prefix); CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, exec_prefix); @@ -61,62 +61,62 @@ opal_installdirs_base_open(mca_base_open_flag_t flags) datarootdir); CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, datadir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, sysconfdir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, sharedstatedir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, localstatedir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, libdir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, includedir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, infodir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, mandir); CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, opaldatadir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, opallibdir); - CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, + CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data, opalincludedir); } /* expand out all the fields */ - opal_install_dirs.prefix = + opal_install_dirs.prefix = opal_install_dirs_expand_setup(opal_install_dirs.prefix); - opal_install_dirs.exec_prefix = + opal_install_dirs.exec_prefix = opal_install_dirs_expand_setup(opal_install_dirs.exec_prefix); - opal_install_dirs.bindir = + opal_install_dirs.bindir = opal_install_dirs_expand_setup(opal_install_dirs.bindir); - opal_install_dirs.sbindir = + opal_install_dirs.sbindir = opal_install_dirs_expand_setup(opal_install_dirs.sbindir); - opal_install_dirs.libexecdir = + opal_install_dirs.libexecdir = opal_install_dirs_expand_setup(opal_install_dirs.libexecdir); - opal_install_dirs.datarootdir = + opal_install_dirs.datarootdir = opal_install_dirs_expand_setup(opal_install_dirs.datarootdir); - opal_install_dirs.datadir = + opal_install_dirs.datadir = opal_install_dirs_expand_setup(opal_install_dirs.datadir); - opal_install_dirs.sysconfdir = + opal_install_dirs.sysconfdir = opal_install_dirs_expand_setup(opal_install_dirs.sysconfdir); - opal_install_dirs.sharedstatedir = + opal_install_dirs.sharedstatedir = opal_install_dirs_expand_setup(opal_install_dirs.sharedstatedir); - opal_install_dirs.localstatedir = + opal_install_dirs.localstatedir = opal_install_dirs_expand_setup(opal_install_dirs.localstatedir); - opal_install_dirs.libdir = + opal_install_dirs.libdir = opal_install_dirs_expand_setup(opal_install_dirs.libdir); - opal_install_dirs.includedir = + opal_install_dirs.includedir = opal_install_dirs_expand_setup(opal_install_dirs.includedir); - opal_install_dirs.infodir = + opal_install_dirs.infodir = opal_install_dirs_expand_setup(opal_install_dirs.infodir); - opal_install_dirs.mandir = + opal_install_dirs.mandir = opal_install_dirs_expand_setup(opal_install_dirs.mandir); - opal_install_dirs.opaldatadir = + opal_install_dirs.opaldatadir = opal_install_dirs_expand_setup(opal_install_dirs.opaldatadir); - opal_install_dirs.opallibdir = + opal_install_dirs.opallibdir = opal_install_dirs_expand_setup(opal_install_dirs.opallibdir); - opal_install_dirs.opalincludedir = + opal_install_dirs.opalincludedir = opal_install_dirs_expand_setup(opal_install_dirs.opalincludedir); #if 0 diff --git a/opal/mca/installdirs/base/installdirs_base_expand.c b/opal/mca/installdirs/base/installdirs_base_expand.c index e609b2f578d..139ec229a02 100644 --- a/opal/mca/installdirs/base/installdirs_base_expand.c +++ b/opal/mca/installdirs/base/installdirs_base_expand.c @@ -1,13 +1,13 @@ /* * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Sun Microsystem, Inc. All rights reserved. * Copyright (c) 2010 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -63,11 +63,11 @@ opal_install_dirs_expand_internal(const char* input, bool is_setup) char *destdir = NULL; size_t destdir_offset = 0; - /* This is subtle, and worth explaining. + /* This is subtle, and worth explaining. If we substitute in any ${FIELD} values, we need to prepend it with the value of the $OPAL_DESTDIR environment variable -- if - it is set. + it is set. We need to handle at least three cases properly (assume that configure was invoked with --prefix=/opt/openmpi and no other diff --git a/opal/mca/installdirs/config/Makefile.am b/opal/mca/installdirs/config/Makefile.am index e020e7230b2..2ec99d31234 100644 --- a/opal/mca/installdirs/config/Makefile.am +++ b/opal/mca/installdirs/config/Makefile.am @@ -1,13 +1,13 @@ # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/installdirs/config/configure.m4 b/opal/mca/installdirs/config/configure.m4 index 771d993c268..bc910fdcc5d 100644 --- a/opal/mca/installdirs/config/configure.m4 +++ b/opal/mca/installdirs/config/configure.m4 @@ -1,12 +1,12 @@ # -*- shell-script -*- # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -19,7 +19,7 @@ AC_DEFUN([MCA_opal_installdirs_config_COMPILE_MODE], [ ]) -# MCA_installdirs_config_CONFIG(action-if-can-compile, +# MCA_installdirs_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_installdirs_config_CONFIG],[ diff --git a/opal/mca/installdirs/config/install_dirs.h.in b/opal/mca/installdirs/config/install_dirs.h.in index e81785b73be..0cde2478fb4 100644 --- a/opal/mca/installdirs/config/install_dirs.h.in +++ b/opal/mca/installdirs/config/install_dirs.h.in @@ -5,16 +5,16 @@ * 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, + * 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 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file should be included by any file that needs the @@ -67,7 +67,7 @@ #define OPAL_DATAROOTDIR "@datarootdir@" /* The directory for installing idiosyncratic read-only - architecture-independent data files for this program. + architecture-independent data files for this program. The definition of ‘datadir’ is the same for all packages, so you should install your data in a subdirectory thereof. Most packages diff --git a/opal/mca/installdirs/config/opal_installdirs_config.c b/opal/mca/installdirs/config/opal_installdirs_config.c index 9fcdf45baaa..d2f8fa8d1de 100644 --- a/opal/mca/installdirs/config/opal_installdirs_config.c +++ b/opal/mca/installdirs/config/opal_installdirs_config.c @@ -1,10 +1,10 @@ /* * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/installdirs/configure.m4 b/opal/mca/installdirs/configure.m4 index db0e907718c..081a3dcfc67 100644 --- a/opal/mca/installdirs/configure.m4 +++ b/opal/mca/installdirs/configure.m4 @@ -2,9 +2,9 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2006-2010 Sandia National Laboratories. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/installdirs/env/Makefile.am b/opal/mca/installdirs/env/Makefile.am index 2cb6f739275..82f4603764e 100644 --- a/opal/mca/installdirs/env/Makefile.am +++ b/opal/mca/installdirs/env/Makefile.am @@ -1,12 +1,12 @@ # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights -# reserved. -# Copyright (c) 2009 High Performance Computing Center Stuttgart, +# reserved. +# Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/installdirs/env/configure.m4 b/opal/mca/installdirs/env/configure.m4 index 74b98205338..201b3673368 100644 --- a/opal/mca/installdirs/env/configure.m4 +++ b/opal/mca/installdirs/env/configure.m4 @@ -1,12 +1,12 @@ # -*- shell-script -*- # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -18,7 +18,7 @@ AC_DEFUN([MCA_opal_installdirs_env_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_installdirs_config_CONFIG(action-if-can-compile, +# MCA_installdirs_config_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_installdirs_env_CONFIG], [ diff --git a/opal/mca/installdirs/env/opal_installdirs_env.c b/opal/mca/installdirs/env/opal_installdirs_env.c index 48978da12cc..340008e91d4 100644 --- a/opal/mca/installdirs/env/opal_installdirs_env.c +++ b/opal/mca/installdirs/env/opal_installdirs_env.c @@ -1,11 +1,11 @@ /* * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/installdirs/installdirs.h b/opal/mca/installdirs/installdirs.h index e3833d52491..7015adf31ea 100644 --- a/opal/mca/installdirs/installdirs.h +++ b/opal/mca/installdirs/installdirs.h @@ -1,11 +1,11 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/mca.h b/opal/mca/mca.h index 0bd945c1602..7a545743653 100644 --- a/opal/mca/mca.h +++ b/opal/mca/mca.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,13 +14,13 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** - * @file +/** + * @file * * Top-level interface for \em all MCA components. * @@ -43,7 +43,7 @@ * the change). If we need to add more space to the struct, we'll * increment the major version number. * - The MCA base component struct now has a version number in it - * (starting with Open MPI v1.3, it is 2.0.0). + * (starting with Open MPI v1.3, it is 2.0.0). * - As was an unstated assumption in prior versions of Open MPI, the * unversioned versions of struct names (both in the MCA base and in * individual framework bases) are intended for components who want @@ -53,7 +53,7 @@ * struct version name. Please note, however, the Open MPI * developers may not generally provide older versions of framework * interface structs unless they know if someone outside of the Open - * MPI community needs it. + * MPI community needs it. * * ***IF YOU NEED BACKWARDS SOURCE OR BINARY COMPATIBILITY, you must * let us know!*** @@ -124,7 +124,7 @@ typedef struct mca_base_module_2_0_0_t mca_base_module_2_0_0_t; * be unloaded from the process). * * All MCA components can have an "open" function that is invoked once - * per process, when the component is located and loaded. + * per process, when the component is located and loaded. * * This function should avoid registering MCA parameters (use the * component "register" function for that; i.e., @@ -151,7 +151,7 @@ typedef struct mca_base_module_2_0_0_t mca_base_module_2_0_0_t; */ typedef int (*mca_base_open_component_1_0_0_fn_t)(void); -/** +/** * MCA component close function. * * @retval OPAL_SUCCESS The component successfully shut down. @@ -174,7 +174,7 @@ typedef int (*mca_base_open_component_1_0_0_fn_t)(void); */ typedef int (*mca_base_close_component_1_0_0_fn_t)(void); -/** +/** * MCA component query function. * * @retval OPAL_SUCCESS The component successfully queried. @@ -199,7 +199,7 @@ typedef int (*mca_base_query_component_2_0_0_fn_t)(mca_base_module_2_0_0_t **mod * @retval OPAL_SUCCESS This component successfully registered its * parameters and can be used in this process. * @retval OPAL_ERR_BAD_PARAM Indicates that the register function - * failed because an MCA parameter got an invalid/incorrect value. + * failed because an MCA parameter got an invalid/incorrect value. * * @retval anything_else The MCA will ignore this component for the * duration of the process. @@ -266,7 +266,7 @@ typedef int (*mca_base_register_component_params_2_0_0_fn_t)(void); */ struct mca_base_component_2_1_0_t { - int mca_major_version; + int mca_major_version; /**< Major number of the MCA. */ int mca_minor_version; /**< Minor number of the MCA. */ @@ -305,7 +305,7 @@ struct mca_base_component_2_1_0_t { /**< This component's minor version number. */ int mca_component_release_version; /**< This component's release version number. */ - + mca_base_open_component_1_0_0_fn_t mca_open_component; /**< Method for opening this component. */ mca_base_close_component_1_0_0_fn_t mca_close_component; @@ -351,7 +351,7 @@ typedef struct mca_base_component_data_2_0_0_t mca_base_component_data_t; typedef struct mca_base_component_data_2_0_0_t mca_base_component_data_2_0_0_t; /** - * Macro for framework author convenience. + * Macro for framework author convenience. * * This macro is used by frameworks defining their component types, * indicating that they subscribe to the MCA version 2.0.0. See diff --git a/opal/mca/memchecker/Makefile.am b/opal/mca/memchecker/Makefile.am index 1fa8328b244..f8955b567e0 100644 --- a/opal/mca/memchecker/Makefile.am +++ b/opal/mca/memchecker/Makefile.am @@ -1,11 +1,11 @@ # -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memchecker/base/Makefile.am b/opal/mca/memchecker/base/Makefile.am index a5f930bfc5f..ff23d6f256a 100644 --- a/opal/mca/memchecker/base/Makefile.am +++ b/opal/mca/memchecker/base/Makefile.am @@ -1,11 +1,11 @@ # -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memchecker/base/base.h b/opal/mca/memchecker/base/base.h index fa488cb8446..a9796193413 100644 --- a/opal/mca/memchecker/base/base.h +++ b/opal/mca/memchecker/base/base.h @@ -1,10 +1,10 @@ /* - * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -245,7 +245,7 @@ OPAL_DECLSPEC int opal_memchecker_base_set_vbits(void * p, char * vbits, size_t #if OPAL_WANT_MEMCHECKER == 0 #define opal_memchecker_base_set_vbits(p, vbits, len) #endif - + END_C_DECLS #endif /* OPAL_MEMCHECKER_BASE_H */ diff --git a/opal/mca/memchecker/base/memchecker_base_open.c b/opal/mca/memchecker/base/memchecker_base_open.c index 40eccb51408..69eabb3370b 100644 --- a/opal/mca/memchecker/base/memchecker_base_open.c +++ b/opal/mca/memchecker/base/memchecker_base_open.c @@ -1,10 +1,10 @@ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memchecker/base/memchecker_base_select.c b/opal/mca/memchecker/base/memchecker_base_select.c index 37e0377ca96..77d2aa8508a 100644 --- a/opal/mca/memchecker/base/memchecker_base_select.c +++ b/opal/mca/memchecker/base/memchecker_base_select.c @@ -1,12 +1,12 @@ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2008 The Trustees of Indiana University. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memchecker/base/memchecker_base_wrappers.c b/opal/mca/memchecker/base/memchecker_base_wrappers.c index 4d6d23b60a0..babadb918fb 100644 --- a/opal/mca/memchecker/base/memchecker_base_wrappers.c +++ b/opal/mca/memchecker/base/memchecker_base_wrappers.c @@ -1,10 +1,10 @@ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memchecker/configure.m4 b/opal/mca/memchecker/configure.m4 index 20335a94fc1..3462e1a5088 100644 --- a/opal/mca/memchecker/configure.m4 +++ b/opal/mca/memchecker/configure.m4 @@ -1,12 +1,12 @@ dnl -*- shell-script -*- dnl -dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/memchecker/memchecker.h b/opal/mca/memchecker/memchecker.h index 11b0d10d7a9..120b0a417c7 100644 --- a/opal/mca/memchecker/memchecker.h +++ b/opal/mca/memchecker/memchecker.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2008 The Trustees of Indiana University. * All rights reserved. @@ -8,9 +8,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -162,10 +162,10 @@ struct opal_memchecker_base_module_1_0_0_t { /** Module function to check for any leaks */ opal_memchecker_base_module_leakcheck_fn_t leakcheck; - + /** Module function to get vbits */ opal_memchecker_base_module_get_vbits_fn_t get_vbits; - + /** Module function to set vbits */ opal_memchecker_base_module_set_vbits_fn_t set_vbits; }; diff --git a/opal/mca/memchecker/valgrind/Makefile.am b/opal/mca/memchecker/valgrind/Makefile.am index 6bcaa05a0ec..3fa127aff09 100644 --- a/opal/mca/memchecker/valgrind/Makefile.am +++ b/opal/mca/memchecker/valgrind/Makefile.am @@ -1,11 +1,11 @@ # -# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memchecker/valgrind/configure.m4 b/opal/mca/memchecker/valgrind/configure.m4 index 6ea77fc3f08..874ac7250a0 100644 --- a/opal/mca/memchecker/valgrind/configure.m4 +++ b/opal/mca/memchecker/valgrind/configure.m4 @@ -1,12 +1,12 @@ # -*- shell-script -*- # -# Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -40,7 +40,7 @@ AC_DEFUN([MCA_opal_memchecker_valgrind_CONFIG],[ # We need this -I to stay in CPPFLAGS when we're done CPPFLAGS="$CPPFLAGS -I$with_valgrind/include" opal_memchecker_valgrind_save_CPPFLAGS=$CPPFLAGS]) - AC_CHECK_HEADERS([valgrind/valgrind.h], + AC_CHECK_HEADERS([valgrind/valgrind.h], [AC_MSG_CHECKING([for VALGRIND_CHECK_MEM_IS_ADDRESSABLE]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "valgrind/memcheck.h" diff --git a/opal/mca/memchecker/valgrind/memchecker_valgrind.h b/opal/mca/memchecker/valgrind/memchecker_valgrind.h index 3957c13da06..ed504f05d39 100644 --- a/opal/mca/memchecker/valgrind/memchecker_valgrind.h +++ b/opal/mca/memchecker/valgrind/memchecker_valgrind.h @@ -1,12 +1,12 @@ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2008 The Trustees of Indiana University. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memchecker/valgrind/memchecker_valgrind_component.c b/opal/mca/memchecker/valgrind/memchecker_valgrind_component.c index b8a1eb25451..b06d882ec4a 100644 --- a/opal/mca/memchecker/valgrind/memchecker_valgrind_component.c +++ b/opal/mca/memchecker/valgrind/memchecker_valgrind_component.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2008 The Trustees of Indiana University. * All rights reserved. @@ -8,9 +8,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memcpy/Makefile.am b/opal/mca/memcpy/Makefile.am index b74bac9878b..51eac0bfdb7 100644 --- a/opal/mca/memcpy/Makefile.am +++ b/opal/mca/memcpy/Makefile.am @@ -4,9 +4,9 @@ # reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -16,7 +16,7 @@ libmca_memcpy_la_SOURCES = # local files headers = memcpy.h -nodist_headers = +nodist_headers = libmca_memcpy_la_SOURCES += $(headers) # Conditionally install the header files diff --git a/opal/mca/memcpy/base/Makefile.am b/opal/mca/memcpy/base/Makefile.am index 1dec1dd2fa2..19186536fac 100644 --- a/opal/mca/memcpy/base/Makefile.am +++ b/opal/mca/memcpy/base/Makefile.am @@ -3,9 +3,9 @@ # of Tennessee Research Foundation. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memcpy/base/base.h b/opal/mca/memcpy/base/base.h index 157ec59c33a..7bd44254d14 100644 --- a/opal/mca/memcpy/base/base.h +++ b/opal/mca/memcpy/base/base.h @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/memcpy/base/memcpy_base_default.h b/opal/mca/memcpy/base/memcpy_base_default.h index 07464466fb8..c567602ca43 100644 --- a/opal/mca/memcpy/base/memcpy_base_default.h +++ b/opal/mca/memcpy/base/memcpy_base_default.h @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memcpy/base/memcpy_base_open.c b/opal/mca/memcpy/base/memcpy_base_open.c index 19f9f77d87d..9b737f71984 100644 --- a/opal/mca/memcpy/base/memcpy_base_open.c +++ b/opal/mca/memcpy/base/memcpy_base_open.c @@ -3,9 +3,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memcpy/configure.m4 b/opal/mca/memcpy/configure.m4 index 1fc3814f32e..cc340de0982 100644 --- a/opal/mca/memcpy/configure.m4 +++ b/opal/mca/memcpy/configure.m4 @@ -6,9 +6,9 @@ dnl reserved. dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/memcpy/memcpy.h b/opal/mca/memcpy/memcpy.h index 9f7ea62910a..d8744844c4d 100644 --- a/opal/mca/memcpy/memcpy.h +++ b/opal/mca/memcpy/memcpy.h @@ -6,9 +6,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memory/Makefile.am b/opal/mca/memory/Makefile.am index 016f224ab1b..bf6ed605612 100644 --- a/opal/mca/memory/Makefile.am +++ b/opal/mca/memory/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/memory/base/Makefile.am b/opal/mca/memory/base/Makefile.am index e3d73d0ee4d..d3239de4cd8 100644 --- a/opal/mca/memory/base/Makefile.am +++ b/opal/mca/memory/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memory/base/base.h b/opal/mca/memory/base/base.h index 72070604d5b..2316b6c4f13 100644 --- a/opal/mca/memory/base/base.h +++ b/opal/mca/memory/base/base.h @@ -5,14 +5,14 @@ * 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, + * 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$ * */ diff --git a/opal/mca/memory/base/empty.h b/opal/mca/memory/base/empty.h index 5067bf2f074..564f29648fa 100644 --- a/opal/mca/memory/base/empty.h +++ b/opal/mca/memory/base/empty.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ BEGIN_C_DECLS * * See opal/mca/memory/memory.h for a description of the parameters. */ -OPAL_DECLSPEC int opal_memory_base_component_register_empty(void *start, +OPAL_DECLSPEC int opal_memory_base_component_register_empty(void *start, size_t len, uint64_t cookie); @@ -47,7 +47,7 @@ OPAL_DECLSPEC int opal_memory_base_component_register_empty(void *start, * * See opal/mca/memory/memory.h for a description of the parameters. */ -OPAL_DECLSPEC int opal_memory_base_component_deregister_empty(void *start, +OPAL_DECLSPEC int opal_memory_base_component_deregister_empty(void *start, size_t len, uint64_t cookie); diff --git a/opal/mca/memory/base/memory_base_empty.c b/opal/mca/memory/base/memory_base_empty.c index 804116a47b0..d9833374a9e 100644 --- a/opal/mca/memory/base/memory_base_empty.c +++ b/opal/mca/memory/base/memory_base_empty.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -22,14 +22,14 @@ #include "opal/mca/memory/base/empty.h" -int opal_memory_base_component_register_empty(void *base, size_t len, +int opal_memory_base_component_register_empty(void *base, size_t len, uint64_t cookie) { return OPAL_SUCCESS; } -int opal_memory_base_component_deregister_empty(void *base, size_t len, +int opal_memory_base_component_deregister_empty(void *base, size_t len, uint64_t cookie) { return OPAL_SUCCESS; diff --git a/opal/mca/memory/base/memory_base_open.c b/opal/mca/memory/base/memory_base_open.c index 75d3b8379f3..1cf1400ec34 100644 --- a/opal/mca/memory/base/memory_base_open.c +++ b/opal/mca/memory/base/memory_base_open.c @@ -6,15 +6,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -81,7 +81,7 @@ static int opal_memory_base_open(mca_base_open_flag_t flags) /* can only be zero or one */ if (opal_list_get_size(&opal_memory_base_framework.framework_components) == 1) { mca_base_component_list_item_t *item; - item = (mca_base_component_list_item_t*) + item = (mca_base_component_list_item_t*) opal_list_get_first(&opal_memory_base_framework.framework_components); opal_memory = (opal_memory_base_component_2_0_0_t*) item->cli_component; diff --git a/opal/mca/memory/configure.m4 b/opal/mca/memory/configure.m4 index 7962c3c2253..828a072d6e0 100644 --- a/opal/mca/memory/configure.m4 +++ b/opal/mca/memory/configure.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/memory/linux/ChangeLog-ptmalloc2.txt b/opal/mca/memory/linux/ChangeLog-ptmalloc2.txt index b4db8b65a64..e985550c9f5 100644 --- a/opal/mca/memory/linux/ChangeLog-ptmalloc2.txt +++ b/opal/mca/memory/linux/ChangeLog-ptmalloc2.txt @@ -50,7 +50,7 @@ (dist-routines): Add malloc-stats. * malloc/Versions: Add _int_get_arena, _int_get_arena_info, _int_get_global_info. - + 2004-07-25 Wolfram Gloger * sysdeps/generic/thread-st.h: New file. diff --git a/opal/mca/memory/linux/Makefile.am b/opal/mca/memory/linux/Makefile.am index 2d81d81d431..c29fc5d87ff 100644 --- a/opal/mca/memory/linux/Makefile.am +++ b/opal/mca/memory/linux/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memory/linux/README-open-mpi.txt b/opal/mca/memory/linux/README-open-mpi.txt index 5f83d373914..43e88eba8a0 100644 --- a/opal/mca/memory/linux/README-open-mpi.txt +++ b/opal/mca/memory/linux/README-open-mpi.txt @@ -74,7 +74,7 @@ variables are set, we don't enable the memory hooks. We then use the following matrix to determine whether to enable the memory hooks or not (explanation of the matrix is below): - lp / lpp yes no runtime not found + lp / lpp yes no runtime not found yes yes yes yes yes no yes no no no runtime yes no runtime runtime diff --git a/opal/mca/memory/linux/arena.c b/opal/mca/memory/linux/arena.c index ee8d652dd94..3f75a1c3af5 100644 --- a/opal/mca/memory/linux/arena.c +++ b/opal/mca/memory/linux/arena.c @@ -477,7 +477,7 @@ thread_atfork_static(ptmalloc_lock_all, ptmalloc_unlock_all, \ ptmalloc_unlock_all2) #endif - + /* Managing heaps and arenas (for concurrent threads) */ @@ -725,7 +725,7 @@ arena_get2(a_tsd, size) mstate a_tsd; size_t size; /* Add the new arena to the global list. */ (void)mutex_lock(&list_lock); a->next = main_arena.next; -/* OMPI: use our barriers +/* OMPI: use our barriers atomic_write_barrier (); */ opal_atomic_wmb(); diff --git a/opal/mca/memory/linux/configure.m4 b/opal/mca/memory/linux/configure.m4 index ae6c5257e0b..1ecfbc9fb3a 100644 --- a/opal/mca/memory/linux/configure.m4 +++ b/opal/mca/memory/linux/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # AC_DEFUN([MCA_opal_memory_linux_PRIORITY], [40]) @@ -26,7 +26,7 @@ AC_DEFUN([MCA_opal_memory_linux_COMPILE_MODE], [ ]) -# MCA_memory_linux_CONFIG(action-if-can-compile, +# MCA_memory_linux_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_memory_linux_CONFIG],[ @@ -107,7 +107,7 @@ AC_DEFUN([MCA_opal_memory_linux_CONFIG],[ # # See if we have sbrk prototyped # - AS_IF([test "$memory_linux_ptmalloc2_happy" = yes], + AS_IF([test "$memory_linux_ptmalloc2_happy" = yes], [AC_CHECK_DECLS([sbrk])]) # @@ -118,9 +118,9 @@ AC_DEFUN([MCA_opal_memory_linux_CONFIG],[ memory_linux_munmap=1 # it's nearly impossible to call mmap from syscall(), so - # only go this route if we can't get at munmap any other + # only go this route if we can't get at munmap any other # way. - AC_CHECK_HEADER([syscall.h], + AC_CHECK_HEADER([syscall.h], [AC_CHECK_FUNCS([syscall], [], [memory_linux_munmap=0])]) # Always look for __munmap and __mmap @@ -148,7 +148,7 @@ AC_DEFUN([MCA_opal_memory_linux_CONFIG],[ [value=0]) AC_DEFINE_UNQUOTED([MEMORY_LINUX_PTMALLOC2], [$value], [Whether ptmalloc2 is supported on this system or not]) - AM_CONDITIONAL([MEMORY_LINUX_PTMALLOC2], + AM_CONDITIONAL([MEMORY_LINUX_PTMALLOC2], [test "$memory_linux_ptmalloc2_happy" = yes]) ###################################################################### @@ -169,11 +169,11 @@ AC_DEFUN([MCA_opal_memory_linux_CONFIG],[ # code base to use AS_IF([test "$memory_linux_ummu_happy" = yes], [memory_base_include="linux/public.h" - value=1], + value=1], [value=0]) AC_DEFINE_UNQUOTED([MEMORY_LINUX_UMMUNOTIFY], [$value], [Whether ummunotify is supported on this system or not]) - AM_CONDITIONAL([MEMORY_LINUX_UMMUNOTIFY], + AM_CONDITIONAL([MEMORY_LINUX_UMMUNOTIFY], [test "$memory_linux_ummu_happy" = yes]) ###################################################################### @@ -189,7 +189,7 @@ AC_DEFUN([MCA_opal_memory_linux_CONFIG],[ AS_IF([test "$memory_linux_ptmalloc2_happy" = yes -o \ "$memory_linux_ummu_happy" = yes], [memory_base_found=1 - $1], + $1], [memory_base_found=0 memory_base_include= $2]) diff --git a/opal/mca/memory/linux/help-opal-memory-linux.txt b/opal/mca/memory/linux/help-opal-memory-linux.txt index 1625b070ad6..b3327c7356a 100644 --- a/opal/mca/memory/linux/help-opal-memory-linux.txt +++ b/opal/mca/memory/linux/help-opal-memory-linux.txt @@ -3,9 +3,9 @@ # Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's memory/linux component. diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c index 03d9a095b15..02fffb6b4ca 100644 --- a/opal/mca/memory/linux/hooks.c +++ b/opal/mca/memory/linux/hooks.c @@ -684,19 +684,19 @@ public_sET_STATe(Void_t* msptr) So we can basically have some hard-coded tests for things to see if we want to setup to use our internal ptmalloc2 or not. */ -static void *opal_memory_linux_malloc_hook(size_t sz, +static void *opal_memory_linux_malloc_hook(size_t sz, const __malloc_ptr_t caller) { return public_mALLOc(sz); } -static void *opal_memory_linux_realloc_hook(Void_t* ptr, size_t sz, +static void *opal_memory_linux_realloc_hook(Void_t* ptr, size_t sz, const __malloc_ptr_t caller) { return public_rEALLOc(ptr, sz); } -static void *opal_memory_linux_memalign_hook(size_t alignment, size_t sz, +static void *opal_memory_linux_memalign_hook(size_t alignment, size_t sz, const __malloc_ptr_t caller) { return public_mEMALIGn(alignment, sz); @@ -818,12 +818,12 @@ void opal_memory_linux_malloc_init_hook(void) 0 == access("/dev/scif", F_OK)) { found_driver = true; } - + /* Simple combination of the results of these two environment variables (if both "yes" and "no" are specified, then be conservative and assume "yes"): - lp / lpp yes no runtime not found + lp / lpp yes no runtime not found yes yes yes yes yes no yes no no no runtime yes no runtime runtime @@ -879,7 +879,7 @@ void opal_memory_linux_hook_pull(bool *want_hooks) whatever value was set via normal MCA mechanisms likely won't be see if it wasn't already see by the getenv() in the _malloc_init_hook(). */ - *want_hooks = !opal_memory_linux_disable; + *want_hooks = !opal_memory_linux_disable; } diff --git a/opal/mca/memory/linux/malloc.c b/opal/mca/memory/linux/malloc.c index d02180956a6..55ee1f09960 100644 --- a/opal/mca/memory/linux/malloc.c +++ b/opal/mca/memory/linux/malloc.c @@ -2088,19 +2088,19 @@ typedef struct malloc_chunk* mbinptr; Normally, this should be MIN_LARGE_SIZE. But you can weaken best fit guarantees to sometimes speed up malloc by increasing value. - Doing this means that malloc may choose a chunk that is + Doing this means that malloc may choose a chunk that is non-best-fitting by up to the width of the bin. Some useful cutoff values: 512 - all bins sorted - 2560 - leaves bins <= 64 bytes wide unsorted + 2560 - leaves bins <= 64 bytes wide unsorted 12288 - leaves bins <= 512 bytes wide unsorted 65536 - leaves bins <= 4096 bytes wide unsorted 262144 - leaves bins <= 32768 bytes wide unsorted -1 - no bins sorted (not recommended!) */ -#define FIRST_SORTED_BIN_SIZE MIN_LARGE_SIZE +#define FIRST_SORTED_BIN_SIZE MIN_LARGE_SIZE /* #define FIRST_SORTED_BIN_SIZE 65536 */ /* @@ -3946,7 +3946,7 @@ public_mALLOPt(int p, int v) /* Mac OS X). (The predefined __INTEL_COMPILER macro is nonsense, */ /* 9999, and both the 2011.6.233 and 2011.7.256 releases identify */ /* themselves as V12.1.0 from the -v command line option.) */ - + #ifdef __INTEL_COMPILER_BUILD_DATE # if __INTEL_COMPILER_BUILD_DATE == 20110811 # pragma GCC optimization_level 1 @@ -4128,7 +4128,7 @@ _int_malloc(mstate av, size_t bytes) fwd = bck; bck = bck->bk; } - else if ((unsigned long)(size) >= + else if ((unsigned long)(size) >= (unsigned long)(FIRST_SORTED_BIN_SIZE)) { /* maintain large bins in sorted order */ diff --git a/opal/mca/memory/linux/memory_linux.h b/opal/mca/memory/linux/memory_linux.h index fdf5312398e..bfc00bf6dbb 100644 --- a/opal/mca/memory/linux/memory_linux.h +++ b/opal/mca/memory/linux/memory_linux.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memory/linux/memory_linux_component.c b/opal/mca/memory/linux/memory_linux_component.c index 03de3335442..ad14eb98511 100644 --- a/opal/mca/memory/linux/memory_linux_component.c +++ b/opal/mca/memory/linux/memory_linux_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -32,7 +32,7 @@ When using ptmalloc2, the goal of this component is to wholly replace the underlying allocator with our internal ptmalloc2 allocator. See the file README-open-mpi.txt for details of how it - works. + works. When using ummunotify, we can probe to find out when the MMU map has been changed (i.e., memory has been released back to the OS). */ @@ -70,12 +70,12 @@ opal_memory_linux_component_t mca_memory_linux_component = { information about the component itself */ .memoryc_version = { OPAL_MEMORY_BASE_VERSION_2_0_0, - + /* Component name and version */ .mca_component_name = "linux", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = linux_open, .mca_close_component = linux_close, diff --git a/opal/mca/memory/linux/memory_linux_munmap.c b/opal/mca/memory/linux/memory_linux_munmap.c index 118cce60102..bb1783973a6 100644 --- a/opal/mca/memory/linux/memory_linux_munmap.c +++ b/opal/mca/memory/linux/memory_linux_munmap.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -58,7 +58,7 @@ OPAL_DECLSPEC int munmap(void* addr, size_t len) that we can intercept both munmap and __munmap. If that isn't possible, try calling __munmap from munmap and let __munmap go. If that doesn't work, try dlsym */ -int opal_memory_linux_free_ptmalloc2_munmap(void *start, size_t length, +int opal_memory_linux_free_ptmalloc2_munmap(void *start, size_t length, int from_alloc) { #if !defined(HAVE___MUNMAP) && \ @@ -76,7 +76,7 @@ int opal_memory_linux_free_ptmalloc2_munmap(void *start, size_t length, return syscall(__NR_munmap, start, length); #elif defined(HAVE_DLSYM) if (NULL == realmunmap) { - union { + union { int (*munmap_fp)(void*, size_t); void *munmap_p; } tmp; diff --git a/opal/mca/memory/linux/memory_linux_ptmalloc2.c b/opal/mca/memory/linux/memory_linux_ptmalloc2.c index 3350e056f62..00a50dc77c7 100644 --- a/opal/mca/memory/linux/memory_linux_ptmalloc2.c +++ b/opal/mca/memory/linux/memory_linux_ptmalloc2.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -39,8 +39,8 @@ extern void opal_memory_linux_hook_pull(bool *want_hooks); -/* - * Try to initialize ptmalloc2 +/* + * Try to initialize ptmalloc2 */ int opal_memory_linux_ptmalloc2_open(void) { diff --git a/opal/mca/memory/linux/memory_linux_ummunotify.c b/opal/mca/memory/linux/memory_linux_ummunotify.c index 2ffdb4ca911..4f85416d0c8 100644 --- a/opal/mca/memory/linux/memory_linux_ummunotify.c +++ b/opal/mca/memory/linux/memory_linux_ummunotify.c @@ -5,15 +5,15 @@ * 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, + * 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$ */ @@ -68,7 +68,7 @@ static bool initialized = false; * to have to include the component structure definition in public.h). */ uint64_t opal_memory_linux_ummunotify_counter_last_value = 0; -volatile uint64_t *opal_memory_linux_ummunotify_counter = +volatile uint64_t *opal_memory_linux_ummunotify_counter = &opal_memory_linux_ummunotify_counter_last_value; @@ -83,7 +83,7 @@ int opal_memory_linux_ummunotify_open(void) /* Open the device. Try to give a meaningful error message if we're unable to open it. */ - mca_memory_linux_component.ummunotify_fd = + mca_memory_linux_component.ummunotify_fd = open(DEV_UMMUNOTIFY, O_RDONLY | O_NONBLOCK); if (mca_memory_linux_component.ummunotify_fd < 0) { char hostname[HOST_NAME_MAX]; @@ -99,14 +99,14 @@ int opal_memory_linux_ummunotify_open(void) /* Don't print an error if DEV_UMMUNOTIFY simply doesn't exist */ opal_show_help("help-opal-memory-linux.txt", "ummunotify open error", true, - hostname, DEV_UMMUNOTIFY, + hostname, DEV_UMMUNOTIFY, strerror(errno), errno); } return OPAL_ERR_NOT_SUPPORTED; } - p = mmap(NULL, sizeof(*opal_memory_linux_ummunotify_counter), - PROT_READ, MAP_SHARED, + p = mmap(NULL, sizeof(*opal_memory_linux_ummunotify_counter), + PROT_READ, MAP_SHARED, mca_memory_linux_component.ummunotify_fd, 0); if (MAP_FAILED == opal_memory_linux_ummunotify_counter) { close(mca_memory_linux_component.ummunotify_fd); @@ -118,7 +118,7 @@ int opal_memory_linux_ummunotify_open(void) /* If everything went well, tell OMPI that we have full support for the memory hooks and fill in the component function pointers */ - opal_mem_hooks_set_support(OPAL_MEMORY_FREE_SUPPORT | + opal_mem_hooks_set_support(OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_CHUNK_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT); mca_memory_linux_component.super.memoryc_process = ummunotify_process; @@ -140,7 +140,7 @@ int opal_memory_linux_ummunotify_open(void) int opal_memory_linux_ummunotify_close(void) { if (initialized && mca_memory_linux_component.ummunotify_fd >= 0) { - munmap((void*) opal_memory_linux_ummunotify_counter, + munmap((void*) opal_memory_linux_ummunotify_counter, sizeof(*opal_memory_linux_ummunotify_counter)); close(mca_memory_linux_component.ummunotify_fd); mca_memory_linux_component.ummunotify_fd = -1; @@ -164,7 +164,7 @@ static int ummunotify_process(void) /* Loop reading from the ummunot fd until there's nothing left to read. If we get a LAST event, re-record the counter. */ while (initialized) { - n = read(mca_memory_linux_component.ummunotify_fd, + n = read(mca_memory_linux_component.ummunotify_fd, &events, sizeof(events)); if (n <= 0) { return (EAGAIN == errno) ? OPAL_SUCCESS : OPAL_ERR_IN_ERRNO; @@ -174,7 +174,7 @@ static int ummunotify_process(void) switch (events[i].type) { case UMMUNOTIFY_EVENT_TYPE_INVAL: /* 0 => this callback did not come from malloc */ - OPAL_OUTPUT((-1, "ummunot: invalidate start %p, end %p", + OPAL_OUTPUT((-1, "ummunot: invalidate start %p, end %p", (void*) events[i].hint_start, (void*) events[i].hint_end)); opal_mem_hooks_release_hook((void *) (uintptr_t) events[i].hint_start, @@ -183,7 +183,7 @@ static int ummunotify_process(void) break; case UMMUNOTIFY_EVENT_TYPE_LAST: - opal_memory_linux_ummunotify_counter_last_value = + opal_memory_linux_ummunotify_counter_last_value = events[i].user_cookie_counter; /* Are there more events to read? */ if (opal_memory_linux_ummunotify_counter_last_value == @@ -210,22 +210,22 @@ static int ummunotify_register(void *start, size_t len, uint64_t cookie) r.end = (unsigned long) start + len; r.user_cookie = cookie; - OPAL_OUTPUT((-1, "ummunot: register %p - %p", + OPAL_OUTPUT((-1, "ummunot: register %p - %p", start, ((char*) start) + len)); if (initialized && ioctl(mca_memory_linux_component.ummunotify_fd, UMMUNOTIFY_REGISTER_REGION, &r)) { OPAL_OUTPUT((-1, "Error in ioctl register!")); return OPAL_ERR_IN_ERRNO; } - + return OPAL_SUCCESS; } static int ummunotify_deregister(void *start, size_t len, uint64_t cookie) { - OPAL_OUTPUT((-1, "ummunot: deregister %p - %p", + OPAL_OUTPUT((-1, "ummunot: deregister %p - %p", start, ((char*) start) + len)); - if (initialized && ioctl(mca_memory_linux_component.ummunotify_fd, + if (initialized && ioctl(mca_memory_linux_component.ummunotify_fd, UMMUNOTIFY_UNREGISTER_REGION, &cookie)) { OPAL_OUTPUT((-1, "Error in ioctl unregister!")); return OPAL_ERR_IN_ERRNO; diff --git a/opal/mca/memory/linux/public.h b/opal/mca/memory/linux/public.h index 4248a853b68..cc30e8c42a3 100644 --- a/opal/mca/memory/linux/public.h +++ b/opal/mca/memory/linux/public.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memory/linux/rename.h b/opal/mca/memory/linux/rename.h index 4acada394f1..03bd5ce3224 100644 --- a/opal/mca/memory/linux/rename.h +++ b/opal/mca/memory/linux/rename.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/memory/malloc_solaris/Makefile.am b/opal/mca/memory/malloc_solaris/Makefile.am index 87040b5089e..e2d270efd36 100644 --- a/opal/mca/memory/malloc_solaris/Makefile.am +++ b/opal/mca/memory/malloc_solaris/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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-2008 Sun Microsystems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/memory/malloc_solaris/configure.m4 b/opal/mca/memory/malloc_solaris/configure.m4 index 158b6be180c..03f970b485e 100644 --- a/opal/mca/memory/malloc_solaris/configure.m4 +++ b/opal/mca/memory/malloc_solaris/configure.m4 @@ -6,16 +6,16 @@ # 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, +# 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-2011 Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # AC_DEFUN([MCA_opal_memory_malloc_solaris_PRIORITY], [0]) @@ -26,7 +26,7 @@ AC_DEFUN([MCA_opal_memory_malloc_solaris_COMPILE_MODE], [ AC_MSG_RESULT([$$4]) ]) -# MCA_memory_malloc_solaris_CONFIG(action-if-can-compile, +# MCA_memory_malloc_solaris_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_memory_malloc_solaris_CONFIG],[ @@ -50,14 +50,14 @@ AC_DEFUN([MCA_opal_memory_malloc_solaris_CONFIG],[ [memory_malloc_solaris_happy="no"])]) AS_IF([test "$memory_malloc_solaris_happy" = "yes"], - [AC_CHECK_HEADER([malloc.h], [], + [AC_CHECK_HEADER([malloc.h], [], [memory_malloc_solaris_happy="no"])]) AS_IF([test "$memory_malloc_solaris_happy" = "yes"], [memory_malloc_solaris_munmap=0 - AC_CHECK_HEADER([sys/syscall.h], - [AC_CHECK_FUNCS([syscall], + AC_CHECK_HEADER([sys/syscall.h], + [AC_CHECK_FUNCS([syscall], [memory_malloc_solaris_munmap=1])]) AC_CHECK_FUNCS([__munmap], [memory_malloc_solaris_munmap=1]) @@ -76,7 +76,7 @@ AC_DEFUN([MCA_opal_memory_malloc_solaris_CONFIG],[ AS_IF([test "$memory_malloc_solaris_munmap" = "0"], [memory_malloc_solaris_happy="no"])]) - # There is a difference in the munmap prototypes for different + # There is a difference in the munmap prototypes for different # Solaris versions. So determine whether we are to use Legacy # S10 or later prototypes. memory_alloc_solaris_legacy=0 @@ -106,7 +106,7 @@ AC_DEFUN([MCA_opal_memory_malloc_solaris_CONFIG],[ [memory_malloc_solaris_happy="no" memory_malloc_solaris_should_use=0]) ;; - esac + esac AS_IF([test "$memory_malloc_solaris_happy" = "yes"], [memory_base_found=1 diff --git a/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c b/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c index d5629492941..dd35feb0819 100644 --- a/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c +++ b/opal/mca/memory/malloc_solaris/memory_malloc_solaris_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -120,7 +120,7 @@ munmap(void *addr, size_t len) return syscall(SYS_munmap, addr, len); #elif defined(HAVE_DLSYM) if (NULL == realmunmap) { - union { + union { int (*munmap_fp)(void*, size_t); void *munmap_p; } tmp; diff --git a/opal/mca/memory/memory.h b/opal/mca/memory/memory.h index 6ca9d4b3aa3..2b5c62f1f3b 100644 --- a/opal/mca/memory/memory.h +++ b/opal/mca/memory/memory.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -86,7 +86,7 @@ typedef int (*opal_memory_base_component_process_fn_t)(void); * can use the value opal_memory_base_register_empty (an empty * implementation of this function). */ -typedef int (*opal_memory_base_component_register_fn_t)(void *base, +typedef int (*opal_memory_base_component_register_fn_t)(void *base, size_t len, uint64_t cookie); @@ -106,7 +106,7 @@ typedef int (*opal_memory_base_component_register_fn_t)(void *base, * can use the value opal_memory_base_deregister_empty (an empty * implementation of this function). */ -typedef int (*opal_memory_base_component_deregister_fn_t)(void *base, +typedef int (*opal_memory_base_component_deregister_fn_t)(void *base, size_t len, uint64_t cookie); diff --git a/opal/mca/mpool/Makefile.am b/opal/mca/mpool/Makefile.am index 773d96e1a92..27501f794fc 100644 --- a/opal/mca/mpool/Makefile.am +++ b/opal/mca/mpool/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/mpool/base/Makefile.am b/opal/mca/mpool/base/Makefile.am index 64c3e025584..4ab8570d94a 100644 --- a/opal/mca/mpool/base/Makefile.am +++ b/opal/mca/mpool/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/mpool/base/base.h b/opal/mca/mpool/base/base.h index a699e84981b..355a64dfd15 100644 --- a/opal/mca/mpool/base/base.h +++ b/opal/mca/mpool/base/base.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -30,27 +30,27 @@ BEGIN_C_DECLS -static inline unsigned int my_log2(unsigned long val) { +static inline unsigned int my_log2(unsigned long val) { unsigned int count = 0; - while(val > 0) { - val = val >> 1; + while(val > 0) { + val = val >> 1; count++; } return count > 0 ? count-1: 0; } static inline void *down_align_addr(void* addr, unsigned int shift) { - return (void*) (((intptr_t) addr) & (~(intptr_t) 0) << shift); + return (void*) (((intptr_t) addr) & (~(intptr_t) 0) << shift); } -static inline void *up_align_addr(void*addr, unsigned int shift) { - return (void*) ((((intptr_t) addr) | ~((~(intptr_t) 0) << shift))); +static inline void *up_align_addr(void*addr, unsigned int shift) { + return (void*) ((((intptr_t) addr) | ~((~(intptr_t) 0) << shift))); } struct mca_mpool_base_selected_module_t { opal_list_item_t super; mca_mpool_base_component_t *mpool_component; mca_mpool_base_module_t *mpool_module; - void* user_data; + void* user_data; struct mca_mpool_base_resources_t *mpool_resources; }; typedef struct mca_mpool_base_selected_module_t mca_mpool_base_selected_module_t; @@ -68,12 +68,12 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_base_selected_module_t); OPAL_DECLSPEC int mca_mpool_base_init(bool enable_progress_threads, bool enable_mpi_threads); OPAL_DECLSPEC mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char* name); OPAL_DECLSPEC mca_mpool_base_module_t* mca_mpool_base_module_create( - const char* name, + const char* name, void* user_data, struct mca_mpool_base_resources_t* mpool_resources); OPAL_DECLSPEC mca_mpool_base_module_t* mca_mpool_base_module_lookup(const char* name); OPAL_DECLSPEC int mca_mpool_base_module_destroy(mca_mpool_base_module_t *module); - + /* * Globals */ @@ -85,7 +85,7 @@ OPAL_DECLSPEC extern uint32_t mca_mpool_base_page_size_log; extern int mca_mpool_base_used_mem_hooks; OPAL_DECLSPEC extern mca_base_framework_t opal_mpool_base_framework; - + END_C_DECLS #endif /* MCA_MEM_BASE_H */ diff --git a/opal/mca/mpool/base/help-mpool-base.txt b/opal/mca/mpool/base/help-mpool-base.txt index 42a48c5e7b0..a1851708f4f 100644 --- a/opal/mca/mpool/base/help-mpool-base.txt +++ b/opal/mca/mpool/base/help-mpool-base.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # [all mem leaks] diff --git a/opal/mca/mpool/base/mpool_base_alloc.c b/opal/mca/mpool/base/mpool_base_alloc.c index 18286576939..d72b0b8d98d 100644 --- a/opal/mca/mpool/base/mpool_base_alloc.c +++ b/opal/mca/mpool/base/mpool_base_alloc.c @@ -60,7 +60,7 @@ static void mca_mpool_base_registration_constructor( mca_mpool_base_registration static void mca_mpool_base_registration_destructor( mca_mpool_base_registration_t * reg ) { - + } OBJ_CLASS_INSTANCE( @@ -79,10 +79,10 @@ static void unregister_tree_item(mca_mpool_base_tree_item_t *mpool_tree_item) mpool = mpool_tree_item->mpools[i]; reg = mpool_tree_item->regs[i]; if(mpool && mpool->mpool_deregister) { - mpool->mpool_deregister(mpool, reg); + mpool->mpool_deregister(mpool, reg); } } - + mpool = mpool_tree_item->mpools[0]; reg = mpool_tree_item->regs[0]; mpool->mpool_free(mpool, mpool_tree_item->key, reg); @@ -94,12 +94,12 @@ static void unregister_tree_item(mca_mpool_base_tree_item_t *mpool_tree_item) * * If the user passes in a valid info structure then the function will * try to allocate the memory and register it with every mpool that there is a - * key for it in the info struct. If it fails at registering the memory with - * one of the requested mpools, an error will be returned. Also, if there is a + * key for it in the info struct. If it fails at registering the memory with + * one of the requested mpools, an error will be returned. Also, if there is a * key in info that does not match any mpool, an error will be returned. * * If the info parameter is MPI_INFO_NULL, then this function will try to allocate - * the memory and register it with as many mpools as possible. However, + * the memory and register it with as many mpools as possible. However, * if any of the registratons fail the mpool will simply be ignored. * * @param size the size of the memory area to allocate @@ -134,7 +134,7 @@ void *mca_mpool_base_alloc(size_t size, opal_info_t *info) } mpool_tree_item = mca_mpool_base_tree_item_get(); - + if(!mpool_tree_item) goto out; @@ -181,10 +181,10 @@ void *mca_mpool_base_alloc(size_t size, opal_info_t *info) match_found = false; for(item = opal_list_get_first(&mca_mpool_base_modules); item != opal_list_get_end(&mca_mpool_base_modules); - item = opal_list_get_next(item)) + item = opal_list_get_next(item)) { current = ((mca_mpool_base_selected_module_t *)item); - if(0 == strcmp(value, + if(0 == strcmp(value, current->mpool_module->mpool_component->mpool_version.mca_component_name)) { match_found = true; @@ -192,7 +192,7 @@ void *mca_mpool_base_alloc(size_t size, opal_info_t *info) { if(NULL != no_reg_function) { - /* there was more than one requested mpool that lacks + /* there was more than one requested mpool that lacks * a registration function, so return failure */ goto out; } @@ -213,7 +213,7 @@ void *mca_mpool_base_alloc(size_t size, opal_info_t *info) } } #endif /* defined(TODO_BTL_GB) */ - + if(NULL == no_reg_function && 0 == reg_module_num) { if(!mpool_requested) @@ -224,12 +224,12 @@ void *mca_mpool_base_alloc(size_t size, opal_info_t *info) mem = malloc(size); goto out; } - - /* the user passed info but we were not able to use any of the mpools + + /* the user passed info but we were not able to use any of the mpools * specified */ goto out; } - + for(i = -1; i < reg_module_num; i++) { if(-1 == i) { if(NULL != no_reg_function) @@ -301,7 +301,7 @@ int mca_mpool_base_free(void *base) mpool_tree_item = mca_mpool_base_tree_find(base); - if(!mpool_tree_item) { + if(!mpool_tree_item) { /* nothing in the tree this was just plain old malloc'd memory */ free(base); return OPAL_SUCCESS; @@ -312,6 +312,6 @@ int mca_mpool_base_free(void *base) unregister_tree_item(mpool_tree_item); mca_mpool_base_tree_item_put(mpool_tree_item); } - + return rc; } diff --git a/opal/mca/mpool/base/mpool_base_frame.c b/opal/mca/mpool/base/mpool_base_frame.c index ea9cd6ca805..9545543ce8e 100644 --- a/opal/mca/mpool/base/mpool_base_frame.c +++ b/opal/mca/mpool/base/mpool_base_frame.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -25,7 +25,7 @@ #include #include #ifdef HAVE_UNISTD_H -#include +#include #endif /* HAVE_UNISTD_H */ #include "opal/mca/mca.h" @@ -51,7 +51,7 @@ /* whether we actually used the mem hooks or not */ int mca_mpool_base_used_mem_hooks = 0; -uint32_t mca_mpool_base_page_size = 0; +uint32_t mca_mpool_base_page_size = 0; uint32_t mca_mpool_base_page_size_log = 0; opal_list_t mca_mpool_base_modules = {{0}}; @@ -64,23 +64,23 @@ static int mca_mpool_base_open(mca_base_open_flag_t flags) { /* Open up all available components - and populate the opal_mpool_base_framework.framework_components list */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != mca_base_framework_components_open(&opal_mpool_base_framework, flags)) { return OPAL_ERROR; } - + /* Initialize the list so that in mca_mpool_base_close(), we can iterate over it (even if it's empty, as in the case of opal_info) */ OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t); - - /* get the page size for this architecture*/ + + /* get the page size for this architecture*/ mca_mpool_base_page_size = opal_getpagesize(); - mca_mpool_base_page_size_log = my_log2(mca_mpool_base_page_size); + mca_mpool_base_page_size_log = my_log2(mca_mpool_base_page_size); - /* setup tree for tracking MPI_Alloc_mem */ + /* setup tree for tracking MPI_Alloc_mem */ mca_mpool_base_tree_init(); - + return OPAL_SUCCESS; } @@ -116,7 +116,7 @@ static int mca_mpool_base_close(void) (void) mca_base_framework_components_close(&opal_mpool_base_framework, NULL); /* deregister memory free callback */ - if( (modules_length > 0) && mca_mpool_base_used_mem_hooks && + if( (modules_length > 0) && mca_mpool_base_used_mem_hooks && 0 != (OPAL_MEMORY_FREE_SUPPORT & opal_mem_hooks_support_level())) { opal_mem_hooks_unregister_release(mca_mpool_base_mem_cb); } diff --git a/opal/mca/mpool/base/mpool_base_init.c b/opal/mca/mpool/base/mpool_base_init.c index c462d85714e..85c01f301a4 100644 --- a/opal/mca/mpool/base/mpool_base_init.c +++ b/opal/mca/mpool/base/mpool_base_init.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -25,7 +25,7 @@ OBJ_CLASS_INSTANCE(mca_mpool_base_selected_module_t, opal_list_item_t, NULL, NULL); static bool mca_mpool_enable_progress_threads = true; static bool mca_mpool_enable_mpi_thread_multiple = true; - + /** * Function for weeding out mpool modules that don't want to run. * diff --git a/opal/mca/mpool/base/mpool_base_lookup.c b/opal/mca/mpool/base/mpool_base_lookup.c index 88f91ef3656..c36ff2b3bb6 100644 --- a/opal/mca/mpool/base/mpool_base_lookup.c +++ b/opal/mca/mpool/base/mpool_base_lookup.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,9 +44,9 @@ mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char* name) for (item = opal_list_get_first(&opal_mpool_base_framework.framework_components); item != opal_list_get_end(&opal_mpool_base_framework.framework_components); item = opal_list_get_next(item)) { - mca_base_component_list_item_t *cli = + mca_base_component_list_item_t *cli = (mca_base_component_list_item_t *) item; - mca_mpool_base_component_t* component = + mca_mpool_base_component_t* component = (mca_mpool_base_component_t *) cli->cli_component; if(strcmp(component->mpool_version.mca_component_name, name) == 0) { return component; @@ -54,15 +54,15 @@ mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char* name) } return NULL; } - + mca_mpool_base_module_t* mca_mpool_base_module_create( - const char* name, + const char* name, void* user_data, - struct mca_mpool_base_resources_t* resources) + struct mca_mpool_base_resources_t* resources) { - mca_mpool_base_component_t* component = NULL; - mca_mpool_base_module_t* module = NULL; + mca_mpool_base_component_t* component = NULL; + mca_mpool_base_module_t* module = NULL; mca_base_component_list_item_t *cli; mca_mpool_base_selected_module_t *sm; @@ -77,15 +77,15 @@ mca_mpool_base_module_t* mca_mpool_base_module_create( if ( NULL == module ) { return NULL; } - sm = OBJ_NEW(mca_mpool_base_selected_module_t); - sm->mpool_component = component; - sm->mpool_module = module; + sm = OBJ_NEW(mca_mpool_base_selected_module_t); + sm->mpool_component = component; + sm->mpool_module = module; sm->user_data = user_data; sm->mpool_resources = resources; - opal_list_append(&mca_mpool_base_modules, (opal_list_item_t*) sm); + opal_list_append(&mca_mpool_base_modules, (opal_list_item_t*) sm); /* on the very first creation of a module we init the memory callback */ - if (opal_list_get_size(&mca_mpool_base_modules) == 1) { + if (opal_list_get_size(&mca_mpool_base_modules) == 1) { /* Default to not using memory hooks */ int use_mem_hooks = 0; @@ -102,7 +102,7 @@ mca_mpool_base_module_t* mca_mpool_base_module_create( if (use_mem_hooks) { if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) == - ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) & + ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) & opal_mem_hooks_support_level())) { opal_mem_hooks_register_release(mca_mpool_base_mem_cb, NULL); } else { @@ -117,7 +117,7 @@ mca_mpool_base_module_t* mca_mpool_base_module_create( mca_mpool_base_used_mem_hooks = 1; } } - return module; + return module; } diff --git a/opal/mca/mpool/base/mpool_base_mem_cb.c b/opal/mca/mpool/base/mpool_base_mem_cb.c index 4292bbf3991..354e376ad8c 100644 --- a/opal/mca/mpool/base/mpool_base_mem_cb.c +++ b/opal/mca/mpool/base/mpool_base_mem_cb.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -47,7 +47,7 @@ static char msg[512]; * from_alloc==true, then you cannot call malloc (or any of its * friends)! */ -void mca_mpool_base_mem_cb(void* base, size_t size, void* cbdata, +void mca_mpool_base_mem_cb(void* base, size_t size, void* cbdata, bool from_alloc) { mca_mpool_base_selected_module_t* current; @@ -57,15 +57,15 @@ void mca_mpool_base_mem_cb(void* base, size_t size, void* cbdata, /* Only do anything meaningful if the OPAL layer is up and running and size != 0 */ if ((from_alloc && (!opal_initialized)) || - size == 0) { + size == 0) { return; } - + for(item = opal_list_get_first(&mca_mpool_base_modules); item != opal_list_get_end(&mca_mpool_base_modules); item = opal_list_get_next(item)) { - - current = (mca_mpool_base_selected_module_t*) item; + + current = (mca_mpool_base_selected_module_t*) item; if(current->mpool_module->mpool_release_memory != NULL) { rc = current->mpool_module->mpool_release_memory(current->mpool_module, @@ -81,7 +81,7 @@ void mca_mpool_base_mem_cb(void* base, size_t size, void* cbdata, msg[sizeof(msg) - 1] = '\0'; write(2, msg, len); } else { - opal_show_help("help-mpool-base.txt", + opal_show_help("help-mpool-base.txt", "cannot deregister in-use memory", true, current->mpool_component->mpool_version.mca_component_name, opal_proc_local_get()->proc_hostname, diff --git a/opal/mca/mpool/base/mpool_base_mem_cb.h b/opal/mca/mpool/base/mpool_base_mem_cb.h index 5abf51935a7..74847310149 100644 --- a/opal/mca/mpool/base/mpool_base_mem_cb.h +++ b/opal/mca/mpool/base/mpool_base_mem_cb.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** diff --git a/opal/mca/mpool/base/mpool_base_tree.c b/opal/mca/mpool/base/mpool_base_tree.c index 8fc3a47c9ea..bcdbbf1e64b 100644 --- a/opal/mca/mpool/base/mpool_base_tree.c +++ b/opal/mca/mpool/base/mpool_base_tree.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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.5A @@ -18,9 +18,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -47,15 +47,15 @@ static void action(void *key, void *value); OBJ_CLASS_INSTANCE(mca_mpool_base_tree_item_t, opal_free_list_item_t, NULL, NULL); -/* - * use globals for the tree and the tree_item free list.. +/* + * use globals for the tree and the tree_item free list.. */ -opal_rb_tree_t mca_mpool_base_tree = {{0}}; +opal_rb_tree_t mca_mpool_base_tree = {{0}}; opal_free_list_t mca_mpool_base_tree_item_free_list = {{{0}}}; static opal_mutex_t tree_lock; /* - * simple minded compare function... + * simple minded compare function... */ int mca_mpool_base_tree_node_compare(void * key1, void * key2) { @@ -76,18 +76,18 @@ int mca_mpool_base_tree_node_compare(void * key1, void * key2) /* * initialize the rb tree */ -int mca_mpool_base_tree_init(void) { +int mca_mpool_base_tree_init(void) { int rc; - OBJ_CONSTRUCT(&mca_mpool_base_tree, opal_rb_tree_t); + OBJ_CONSTRUCT(&mca_mpool_base_tree, opal_rb_tree_t); OBJ_CONSTRUCT(&mca_mpool_base_tree_item_free_list, opal_free_list_t); OBJ_CONSTRUCT(&tree_lock, opal_mutex_t); rc = opal_free_list_init (&mca_mpool_base_tree_item_free_list, - sizeof(mca_mpool_base_tree_item_t), + sizeof(mca_mpool_base_tree_item_t), opal_cache_line_size, - OBJ_CLASS(mca_mpool_base_tree_item_t), + OBJ_CLASS(mca_mpool_base_tree_item_t), 0,opal_cache_line_size, 0, -1 , 4, NULL, 0, NULL, NULL, NULL); - if(OPAL_SUCCESS == rc) { + if(OPAL_SUCCESS == rc) { rc = opal_rb_tree_init(&mca_mpool_base_tree, mca_mpool_base_tree_node_compare); } return rc; @@ -104,10 +104,10 @@ int mca_mpool_base_tree_fini(void) return OPAL_SUCCESS; } -/* - * insert an item in the rb tree - */ -int mca_mpool_base_tree_insert(mca_mpool_base_tree_item_t* item) { +/* + * insert an item in the rb tree + */ +int mca_mpool_base_tree_insert(mca_mpool_base_tree_item_t* item) { int rc; OPAL_THREAD_LOCK(&tree_lock); @@ -117,17 +117,17 @@ int mca_mpool_base_tree_insert(mca_mpool_base_tree_item_t* item) { return rc; } -/* - * remove an item from the rb tree +/* + * remove an item from the rb tree * Does not put the item back onto the free list. That * must be done separately by calling mca_mpool_base_tree_item_put. - * This allows a caller to remove an item from the tree + * This allows a caller to remove an item from the tree * before safely cleaning up the item and only then returning it * to the free list. If the item is returned to the free list too soon * race conditions can occur * */ -int mca_mpool_base_tree_delete(mca_mpool_base_tree_item_t* item) { +int mca_mpool_base_tree_delete(mca_mpool_base_tree_item_t* item) { int rc; OPAL_THREAD_LOCK(&tree_lock); @@ -138,7 +138,7 @@ int mca_mpool_base_tree_delete(mca_mpool_base_tree_item_t* item) { } /** - * find the item in the rb tree + * find the item in the rb tree */ mca_mpool_base_tree_item_t* mca_mpool_base_tree_find(void* base) { mca_mpool_base_tree_item_t* item; @@ -150,11 +150,11 @@ mca_mpool_base_tree_item_t* mca_mpool_base_tree_find(void* base) { return item; } - -/* - * get a tree item from the free list + +/* + * get a tree item from the free list */ -mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void) { +mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void) { return (mca_mpool_base_tree_item_t *) opal_free_list_get (&mca_mpool_base_tree_item_free_list); } @@ -162,7 +162,7 @@ mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void) { /* * put an item back into the free list */ -void mca_mpool_base_tree_item_put(mca_mpool_base_tree_item_t* item) { +void mca_mpool_base_tree_item_put(mca_mpool_base_tree_item_t* item) { opal_free_list_return (&mca_mpool_base_tree_item_free_list, &item->super); } diff --git a/opal/mca/mpool/base/mpool_base_tree.h b/opal/mca/mpool/base/mpool_base_tree.h index 0742f448679..8cdf071f85c 100644 --- a/opal/mca/mpool/base/mpool_base_tree.h +++ b/opal/mca/mpool/base/mpool_base_tree.h @@ -6,7 +6,7 @@ * 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, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,7 +33,7 @@ BEGIN_C_DECLS /* * Data structures for the tree of allocated memory - * used for MPI_Alloc_mem and MPI_Free_mem + * used for MPI_Alloc_mem and MPI_Free_mem */ /** @@ -57,34 +57,34 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_base_tree_item_t); /* * initialize/finalize the rb tree */ -int mca_mpool_base_tree_init(void); +int mca_mpool_base_tree_init(void); int mca_mpool_base_tree_fini(void); -/* - * insert an item in the rb tree - */ -int mca_mpool_base_tree_insert(mca_mpool_base_tree_item_t* item); +/* + * insert an item in the rb tree + */ +int mca_mpool_base_tree_insert(mca_mpool_base_tree_item_t* item); -/* - * remove an item from the rb tree +/* + * remove an item from the rb tree */ -int mca_mpool_base_tree_delete(mca_mpool_base_tree_item_t* item); +int mca_mpool_base_tree_delete(mca_mpool_base_tree_item_t* item); /** - * find the item in the rb tree + * find the item in the rb tree */ mca_mpool_base_tree_item_t* mca_mpool_base_tree_find(void* base); -/* - * get a tree item from the free list +/* + * get a tree item from the free list */ -mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void); +mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void); -/* - * put tree item back into the free list +/* + * put tree item back into the free list */ -void mca_mpool_base_tree_item_put(mca_mpool_base_tree_item_t* item); +void mca_mpool_base_tree_item_put(mca_mpool_base_tree_item_t* item); /* * For debugging, print a show_help kind of message if there are items diff --git a/opal/mca/mpool/gpusm/mpool_gpusm.h b/opal/mca/mpool/gpusm/mpool_gpusm.h index e22441212a9..9e6c993d517 100644 --- a/opal/mca/mpool/gpusm/mpool_gpusm.h +++ b/opal/mca/mpool/gpusm/mpool_gpusm.h @@ -35,14 +35,14 @@ BEGIN_C_DECLS #define MEMHANDLE_SIZE 8 #define EVTHANDLE_SIZE 8 -struct mca_mpool_gpusm_registration_t { +struct mca_mpool_gpusm_registration_t { mca_mpool_base_registration_t base; uint64_t memHandle[MEMHANDLE_SIZE]; /* CUipcMemHandle */ uint64_t evtHandle[EVTHANDLE_SIZE]; /* CUipcEventHandle */ uintptr_t event; /* CUevent */ -}; -typedef struct mca_mpool_gpusm_registration_t mca_mpool_gpusm_registration_t; -OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_gpusm_registration_t); +}; +typedef struct mca_mpool_gpusm_registration_t mca_mpool_gpusm_registration_t; +OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_gpusm_registration_t); struct mca_mpool_gpusm_component_t { mca_mpool_base_component_t super; diff --git a/opal/mca/mpool/gpusm/mpool_gpusm_module.c b/opal/mca/mpool/gpusm/mpool_gpusm_module.c index e3a47aa4f80..fa8a915970f 100644 --- a/opal/mca/mpool/gpusm/mpool_gpusm_module.c +++ b/opal/mca/mpool/gpusm/mpool_gpusm_module.c @@ -44,7 +44,7 @@ /** * Called when the registration free list is created. An event is created - * for each entry. + * for each entry. */ static void mca_mpool_gpusm_registration_constructor( mca_mpool_gpusm_registration_t *item ) { @@ -60,7 +60,7 @@ static void mca_mpool_gpusm_registration_destructor( mca_mpool_gpusm_registratio mca_common_cuda_destruct_event(item->event); } -OBJ_CLASS_INSTANCE(mca_mpool_gpusm_registration_t, mca_mpool_base_registration_t, +OBJ_CLASS_INSTANCE(mca_mpool_gpusm_registration_t, mca_mpool_base_registration_t, mca_mpool_gpusm_registration_constructor, mca_mpool_gpusm_registration_destructor); @@ -95,7 +95,7 @@ void mca_mpool_gpusm_module_init(mca_mpool_gpusm_module_t* mpool) * some CUDA specific activities that need to be done. */ opal_free_list_init (&mpool->reg_list, mpool->resources.sizeof_reg, opal_cache_line_size, - OBJ_CLASS(mca_mpool_gpusm_registration_t), + OBJ_CLASS(mca_mpool_gpusm_registration_t), 0,opal_cache_line_size, 0, -1, 64, NULL, 0, NULL, NULL, NULL); @@ -176,7 +176,7 @@ int mca_mpool_gpusm_deregister(struct mca_mpool_base_module_t *mpool, } /** - * Free up the resources. + * Free up the resources. */ void mca_mpool_gpusm_finalize(struct mca_mpool_base_module_t *mpool) { diff --git a/opal/mca/mpool/grdma/mpool_grdma_component.c b/opal/mca/mpool/grdma/mpool_grdma_component.c index 2247768bf13..2782faa422b 100644 --- a/opal/mca/mpool/grdma/mpool_grdma_component.c +++ b/opal/mca/mpool/grdma/mpool_grdma_component.c @@ -118,7 +118,7 @@ grdma_init(struct mca_mpool_base_resources_t *resources) /* Set this here (vs in component.c) because opal_leave_pinned* may have been set after MCA params were read (e.g., by the openib btl) */ - mca_mpool_grdma_component.leave_pinned = (int) + mca_mpool_grdma_component.leave_pinned = (int) (1 == opal_leave_pinned || opal_leave_pinned_pipeline); /* find the specified pool */ diff --git a/opal/mca/mpool/grdma/mpool_grdma_module.c b/opal/mca/mpool/grdma/mpool_grdma_module.c index d474dc1c377..0f96067763a 100644 --- a/opal/mca/mpool/grdma/mpool_grdma_module.c +++ b/opal/mca/mpool/grdma/mpool_grdma_module.c @@ -172,7 +172,7 @@ static inline void do_unregistration_gc(struct mca_mpool_base_module_t *mpool) /* Remove registration from garbage collection list before deregistering it */ - while (NULL != + while (NULL != (item = opal_list_remove_first(&mpool_grdma->pool->gc_list))) { dereg_mem((mca_mpool_base_registration_t *) item); } diff --git a/opal/mca/mpool/mpool.h b/opal/mca/mpool/mpool.h index fbfb5ba7846..08d5dd03f87 100644 --- a/opal/mca/mpool/mpool.h +++ b/opal/mca/mpool/mpool.h @@ -51,23 +51,23 @@ struct opal_info_t; struct mca_mpool_base_resources_t; -struct mca_mpool_base_registration_t { +struct mca_mpool_base_registration_t { opal_free_list_item_t super; - struct mca_mpool_base_module_t *mpool; + struct mca_mpool_base_module_t *mpool; unsigned char* base; - unsigned char* bound; + unsigned char* bound; unsigned char* alloc_base; - int32_t ref_count; + int32_t ref_count; uint32_t flags; void *mpool_context; #if OPAL_CUDA_GDR_SUPPORT unsigned long long gpu_bufID; #endif /* OPAL_CUDA_GDR_SUPPORT */ -}; +}; -typedef struct mca_mpool_base_registration_t mca_mpool_base_registration_t; +typedef struct mca_mpool_base_registration_t mca_mpool_base_registration_t; -OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_base_registration_t); +OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_mpool_base_registration_t); /** * component initialize @@ -82,9 +82,9 @@ typedef void* (*mca_mpool_base_module_alloc_fn_t)( struct mca_mpool_base_module_t* mpool, size_t size, size_t align, - uint32_t flags, + uint32_t flags, mca_mpool_base_registration_t** registration); - + /** * realloc function typedef */ @@ -93,15 +93,15 @@ typedef void* (*mca_mpool_base_module_realloc_fn_t)( void* addr, size_t size, mca_mpool_base_registration_t** registration); - + /** * free function typedef */ typedef void (*mca_mpool_base_module_free_fn_t)( struct mca_mpool_base_module_t* mpool, - void *addr, + void *addr, mca_mpool_base_registration_t* registration); - + /** * register memory */ @@ -109,9 +109,9 @@ typedef int (*mca_mpool_base_module_register_fn_t)( struct mca_mpool_base_module_t* mpool, void * addr, size_t size, - uint32_t flags, + uint32_t flags, mca_mpool_base_registration_t** registration); - + /** * deregister memory */ @@ -121,21 +121,21 @@ typedef int (*mca_mpool_base_module_deregister_fn_t)( /** * find registration in this memory pool - */ + */ typedef int (*mca_mpool_base_module_find_fn_t) ( struct mca_mpool_base_module_t* mpool, void* addr, size_t size, mca_mpool_base_registration_t **reg); -/** +/** * release registration - */ + */ + +typedef int (*mca_mpool_base_module_release_fn_t) ( + struct mca_mpool_base_module_t* mpool, + mca_mpool_base_registration_t* registration); -typedef int (*mca_mpool_base_module_release_fn_t) ( - struct mca_mpool_base_module_t* mpool, - mca_mpool_base_registration_t* registration); - /** * release memory region */ @@ -194,11 +194,11 @@ struct mca_mpool_base_module_t { mca_mpool_base_module_register_fn_t mpool_register; /**< register memory */ mca_mpool_base_module_deregister_fn_t mpool_deregister; /**< deregister memory */ mca_mpool_base_module_find_fn_t mpool_find; /**< find regisrations in the cache */ - mca_mpool_base_module_release_fn_t mpool_release; /**< release a registration from the cache */ + mca_mpool_base_module_release_fn_t mpool_release; /**< release a registration from the cache */ mca_mpool_base_module_release_memory_fn_t mpool_release_memory; /**< release memor region from the cache */ mca_mpool_base_module_finalize_fn_t mpool_finalize; /**< finalize */ mca_mpool_base_module_ft_event_fn_t mpool_ft_event; /**< ft_event */ - struct mca_rcache_base_module_t *rcache; /* the rcache associated with this mpool */ + struct mca_rcache_base_module_t *rcache; /* the rcache associated with this mpool */ uint32_t flags; /**< mpool flags */ }; /** @@ -237,7 +237,7 @@ OPAL_DECLSPEC void * mca_mpool_base_alloc(size_t size, struct opal_info_t * info * @retval OPAL_SUCCESS * @retval OPAL_ERR_BAD_PARAM if the passed base pointer was invalid */ -OPAL_DECLSPEC int mca_mpool_base_free(void * base); +OPAL_DECLSPEC int mca_mpool_base_free(void * base); /** * Function for the red black tree to compare 2 keys @@ -253,13 +253,13 @@ OPAL_DECLSPEC int mca_mpool_base_tree_node_compare(void * key1, void * key2); OPAL_DECLSPEC int mca_mpool_base_insert( - void * addr, - size_t size, - mca_mpool_base_module_t* mpool, - void* user_in, - mca_mpool_base_registration_t* registration); + void * addr, + size_t size, + mca_mpool_base_module_t* mpool, + void* user_in, + mca_mpool_base_registration_t* registration); -OPAL_DECLSPEC int mca_mpool_base_remove(void * base); +OPAL_DECLSPEC int mca_mpool_base_remove(void * base); /** * Macro for use in components that are of type mpool diff --git a/opal/mca/mpool/rgpusm/mpool_rgpusm_module.c b/opal/mca/mpool/rgpusm/mpool_rgpusm_module.c index 59c7296b42a..c9b074a0db9 100644 --- a/opal/mca/mpool/rgpusm/mpool_rgpusm_module.c +++ b/opal/mca/mpool/rgpusm/mpool_rgpusm_module.c @@ -40,7 +40,7 @@ * 2. mpool_rgpusm_leave_pinned=0, cache_size=limited * 3. mpool_rgpusm_leave_pinned=1, cache_size=unlimited (default) * 4. mpool_rgpusm_leave_pinned=1, cache_size=limited. - * + * * Case 1: The cache is unused and remote memory is registered and * unregistered for each transaction. The amount of outstanding * registered memory is unlimited. @@ -58,7 +58,7 @@ * registrations is stored so that it can be used to evict * registrations from the cache. In addition, these registrations are * deregistered. - * + * * I also want to capture how we can run into the case where we do not * find something in the cache, but when we try to register it, we get * an error back from the CUDA library saying the memory is in use. @@ -160,7 +160,7 @@ void mca_mpool_rgpusm_module_init(mca_mpool_rgpusm_module_t* mpool) OBJ_CONSTRUCT(&mpool->reg_list, opal_free_list_t); opal_free_list_init (&mpool->reg_list, mpool->resources.sizeof_reg, opal_cache_line_size, - OBJ_CLASS(mca_mpool_base_registration_t), + OBJ_CLASS(mca_mpool_base_registration_t), 0,opal_cache_line_size, 0, -1, 32, NULL, 0, NULL, NULL, NULL); OBJ_CONSTRUCT(&mpool->lru_list, opal_list_t); @@ -581,7 +581,7 @@ void mca_mpool_rgpusm_finalize(struct mca_mpool_base_module_t *mpool) opal_output(0, "%s rgpusm: stats " "(hit/valid/invalid/miss/evicted): %d/%d/%d/%d/%d\n", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), - mpool_rgpusm->stat_cache_hit, mpool_rgpusm->stat_cache_valid, + mpool_rgpusm->stat_cache_hit, mpool_rgpusm->stat_cache_valid, mpool_rgpusm->stat_cache_invalid, mpool_rgpusm->stat_cache_miss, mpool_rgpusm->stat_evicted); } diff --git a/opal/mca/mpool/sm/Makefile.am b/opal/mca/mpool/sm/Makefile.am index 528242e46ef..1d196ed7234 100644 --- a/opal/mca/mpool/sm/Makefile.am +++ b/opal/mca/mpool/sm/Makefile.am @@ -5,16 +5,16 @@ # Copyright (c) 2004-2013 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011 NVIDIA Corporation. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/mpool/sm/mpool_sm.h b/opal/mca/mpool/sm/mpool_sm.h index d48415c56da..23044cef366 100644 --- a/opal/mca/mpool/sm/mpool_sm.h +++ b/opal/mca/mpool/sm/mpool_sm.h @@ -11,8 +11,8 @@ * All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010-2012 Los Alamos National Security, LLC. - * All rights reserved. + * Copyright (c) 2010-2012 Los Alamos National Security, LLC. + * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/mpool/sm/mpool_sm_component.c b/opal/mca/mpool/sm/mpool_sm_component.c index cd9f6c9214b..bee668b4008 100644 --- a/opal/mca/mpool/sm/mpool_sm_component.c +++ b/opal/mca/mpool/sm/mpool_sm_component.c @@ -141,7 +141,7 @@ mca_mpool_sm_init(struct mca_mpool_base_resources_t *resources) mca_allocator_base_component_t* allocator_component; /* Make a new mpool module */ - mpool_module = + mpool_module = (mca_mpool_sm_module_t *)malloc(sizeof(mca_mpool_sm_module_t)); mca_mpool_sm_module_init(mpool_module); @@ -195,16 +195,16 @@ mca_mpool_sm_init(struct mca_mpool_base_resources_t *resources) } /* setup allocator */ - mpool_module->sm_allocator = + mpool_module->sm_allocator = allocator_component->allocator_init(true, - mca_common_sm_seg_alloc, + mca_common_sm_seg_alloc, NULL, &(mpool_module->super)); if (NULL == mpool_module->sm_allocator) { opal_output(0, "mca_mpool_sm_init: unable to initialize allocator"); free(mpool_module); return NULL; } - + return &mpool_module->super; } diff --git a/opal/mca/mpool/sm/mpool_sm_module.c b/opal/mca/mpool/sm/mpool_sm_module.c index b725270b7e8..66580a53ee3 100644 --- a/opal/mca/mpool/sm/mpool_sm_module.c +++ b/opal/mca/mpool/sm/mpool_sm_module.c @@ -5,18 +5,18 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2011-2012 Los Alamos National Security, LLC. - * All rights reserved. + * Copyright (c) 2011-2012 Los Alamos National Security, LLC. + * All rights reserved. * Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,21 +38,21 @@ static void sm_module_finalize(mca_mpool_base_module_t* module); -/* +/* * Initializes the mpool module. - */ + */ void mca_mpool_sm_module_init(mca_mpool_sm_module_t* mpool) { - mpool->super.mpool_component = &mca_mpool_sm_component.super; - mpool->super.mpool_base = mca_mpool_sm_base; - mpool->super.mpool_alloc = mca_mpool_sm_alloc; - mpool->super.mpool_realloc = mca_mpool_sm_realloc; - mpool->super.mpool_free = mca_mpool_sm_free; - mpool->super.mpool_find = NULL; - mpool->super.mpool_register = NULL; - mpool->super.mpool_deregister = NULL; + mpool->super.mpool_component = &mca_mpool_sm_component.super; + mpool->super.mpool_base = mca_mpool_sm_base; + mpool->super.mpool_alloc = mca_mpool_sm_alloc; + mpool->super.mpool_realloc = mca_mpool_sm_realloc; + mpool->super.mpool_free = mca_mpool_sm_free; + mpool->super.mpool_find = NULL; + mpool->super.mpool_register = NULL; + mpool->super.mpool_deregister = NULL; mpool->super.mpool_release_memory = NULL; - mpool->super.mpool_finalize = sm_module_finalize; + mpool->super.mpool_finalize = sm_module_finalize; mpool->super.mpool_ft_event = mca_mpool_sm_ft_event; mpool->super.flags = 0; @@ -139,7 +139,7 @@ static void sm_module_finalize(mca_mpool_base_module_t* module) mca_mpool_sm_module_t *sm_module = (mca_mpool_sm_module_t*) module; if (NULL != sm_module->sm_common_module) { - if (OPAL_SUCCESS == + if (OPAL_SUCCESS == mca_common_sm_fini(sm_module->sm_common_module)) { #if OPAL_ENABLE_FT_CR == 1 /* Only unlink the file if we are *not* restarting. If we diff --git a/opal/mca/pmix/Makefile.am b/opal/mca/pmix/Makefile.am index 9726f810a88..78299654146 100644 --- a/opal/mca/pmix/Makefile.am +++ b/opal/mca/pmix/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2014 Intel, Inc. All rights reserved. +# Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pmix/base/Makefile.am b/opal/mca/pmix/base/Makefile.am index 51aeb5e83f8..c419c72e4a4 100644 --- a/opal/mca/pmix/base/Makefile.am +++ b/opal/mca/pmix/base/Makefile.am @@ -1,11 +1,11 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pmix/base/base.h b/opal/mca/pmix/base/base.h index 65fa670e6dc..3df545abd0b 100644 --- a/opal/mca/pmix/base/base.h +++ b/opal/mca/pmix/base/base.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/opal/mca/pmix/base/help-pmix-base.txt b/opal/mca/pmix/base/help-pmix-base.txt index f603f2eaf31..5d7f3d87691 100644 --- a/opal/mca/pmix/base/help-pmix-base.txt +++ b/opal/mca/pmix/base/help-pmix-base.txt @@ -1,6 +1,6 @@ -*- text -*- # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # # $COPYRIGHT$ # diff --git a/opal/mca/pmix/base/pmix_base_fns.c b/opal/mca/pmix/base/pmix_base_fns.c index 30d091d181a..c5859652929 100644 --- a/opal/mca/pmix/base/pmix_base_fns.c +++ b/opal/mca/pmix/base/pmix_base_fns.c @@ -1,14 +1,14 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -578,7 +578,7 @@ static inline int pmi_base64_decode_block (const char in[4], unsigned char out[3 /* PMI only supports strings. For now, do a simple base64. */ -static char *pmi_encode(const void *val, size_t vallen) +static char *pmi_encode(const void *val, size_t vallen) { char *outdata, *tmp; size_t i; @@ -597,7 +597,7 @@ static char *pmi_encode(const void *val, size_t vallen) return outdata; } -static uint8_t *pmi_decode (const char *data, size_t *retlen) +static uint8_t *pmi_decode (const char *data, size_t *retlen) { size_t input_len = (strlen (data) - 1) / 4; unsigned char *ret; diff --git a/opal/mca/pmix/base/pmix_base_fns.h b/opal/mca/pmix/base/pmix_base_fns.h index a00bc65d068..e46bee0e3df 100644 --- a/opal/mca/pmix/base/pmix_base_fns.h +++ b/opal/mca/pmix/base/pmix_base_fns.h @@ -3,9 +3,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pmix/base/pmix_base_frame.c b/opal/mca/pmix/base/pmix_base_frame.c index bd97c870ccf..234909a22ef 100644 --- a/opal/mca/pmix/base/pmix_base_frame.c +++ b/opal/mca/pmix/base/pmix_base_frame.c @@ -42,7 +42,7 @@ static int opal_pmix_base_frame_register(mca_base_register_flag_t flags) static int opal_pmix_base_frame_close(void) { int rc; - + rc = mca_base_framework_components_close(&opal_pmix_base_framework, NULL); /* reset the opal_pmix function pointers to NULL */ memset(&opal_pmix, 0, sizeof(opal_pmix)); @@ -52,7 +52,7 @@ static int opal_pmix_base_frame_close(void) static int opal_pmix_base_frame_open(mca_base_open_flag_t flags) { int rc; - + /* Open up all available components */ rc = mca_base_framework_components_open(&opal_pmix_base_framework, flags); /* ensure the function pointers are NULL */ diff --git a/opal/mca/pmix/base/pmix_base_select.c b/opal/mca/pmix/base/pmix_base_select.c index 3ad484323f7..feed10a28ee 100644 --- a/opal/mca/pmix/base/pmix_base_select.c +++ b/opal/mca/pmix/base/pmix_base_select.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -50,6 +50,6 @@ int opal_pmix_base_select(void) exit_status = ret; } } - + return exit_status; } diff --git a/opal/mca/pmix/cray/Makefile.am b/opal/mca/pmix/cray/Makefile.am index bc86578028e..c1324d1a302 100644 --- a/opal/mca/pmix/cray/Makefile.am +++ b/opal/mca/pmix/cray/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pmix/cray/configure.m4 b/opal/mca/pmix/cray/configure.m4 index 9b41c15ff9d..bfadbb47720 100644 --- a/opal/mca/pmix/cray/configure.m4 +++ b/opal/mca/pmix/cray/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -17,7 +17,7 @@ AC_DEFUN([MCA_opal_pmix_cray_CONFIG], [ # check specifically for Cray PMI here # OPAL_CHECK_CRAY_PMI([pmix_cray], [pmix_cray_good=1], [pmix_cray_good=0]) - + # Evaluate succeed / fail AS_IF([test "$pmix_cray_good" = 1], [$1 diff --git a/opal/mca/pmix/cray/pmix_cray.c b/opal/mca/pmix/cray/pmix_cray.c index 30b4f1dfcba..26277c50791 100644 --- a/opal/mca/pmix/cray/pmix_cray.c +++ b/opal/mca/pmix/cray/pmix_cray.c @@ -429,9 +429,9 @@ static int cray_fence(opal_process_name_t *procs, size_t nprocs) cnt = 1; while (OPAL_SUCCESS == (rc = opal_dss.unpack(buf, &kp, &cnt, OPAL_VALUE))) { opal_output_verbose(20, opal_pmix_base_framework.framework_output, - "%s pmix:cray unpacked kp with key %s type(%d) for id %s", + "%s pmix:cray unpacked kp with key %s type(%d) for id %s", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), kp->key, kp->type, OPAL_NAME_PRINT(id)); - if (OPAL_SUCCESS != (rc = opal_dstore.store(opal_dstore_internal, + if (OPAL_SUCCESS != (rc = opal_dstore.store(opal_dstore_internal, &id, kp))) { OPAL_ERROR_LOG(rc); goto fn_exit; diff --git a/opal/mca/pmix/cray/pmix_cray.h b/opal/mca/pmix/cray/pmix_cray.h index 5a14c645740..58af6a23b8f 100644 --- a/opal/mca/pmix/cray/pmix_cray.h +++ b/opal/mca/pmix/cray/pmix_cray.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pmix/cray/pmix_cray_component.c b/opal/mca/pmix/cray/pmix_cray_component.c index 75e6dc67e6e..9749e95a4fe 100644 --- a/opal/mca/pmix/cray/pmix_cray_component.c +++ b/opal/mca/pmix/cray/pmix_cray_component.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -21,7 +21,7 @@ #include "opal/constants.h" #include "opal/mca/pmix/pmix.h" #include "pmix_cray.h" -#include +#include #include /* @@ -51,7 +51,7 @@ opal_pmix_cray_component_t mca_pmix_cray_component = { .base_version = { /* Indicate that we are a pmix v1.1.0 component (which also implies a specific MCA version) */ - + OPAL_PMIX_BASE_VERSION_2_0_0, /* Component name and version */ @@ -98,7 +98,7 @@ static int pmix_cray_component_query(mca_base_module_t **module, int *priority) snprintf(task_is_app_fname,sizeof(task_is_app_fname), "/proc/self/task/%ld/task_is_app",syscall(SYS_gettid)); fd_task_is_app = fopen(task_is_app_fname, "r"); - if (fd_task_is_app != NULL) { /* okay we're in a PAGG container, + if (fd_task_is_app != NULL) { /* okay we're in a PAGG container, and we are an app task (not just a process running on a mom node, for example), so we should give cray pmi a shot. */ diff --git a/opal/mca/pmix/cray/pmix_cray_pmap_parser.c b/opal/mca/pmix/cray/pmix_cray_pmap_parser.c index e4a5d2c0177..e09c2c07422 100644 --- a/opal/mca/pmix/cray/pmix_cray_pmap_parser.c +++ b/opal/mca/pmix/cray/pmix_cray_pmap_parser.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. @@ -14,7 +14,7 @@ #include "pmix_cray_pmap_parser.h" /** - pmi2 process mapping is returned as a + pmi2 process mapping is returned as a comma separated list of tuples: ex: (vector,(0,4,4),(0,4,1)) slurm cyclic distro of 4 ranks over 2 nodes: @@ -26,7 +26,7 @@ slurm block distro of 4 ranks over 2 nodes: Format of each tuple is (base, H, L), where H is number of nodes spawned by tuple, L is number of ranks per node, - base is offset from node 0. + base is offset from node 0. Tuple can be visualized as a rectangle on two dimensional (Hosts, Local Ranks) plane: @@ -38,7 +38,7 @@ slurm block distro of 4 ranks over 2 nodes: | | | L | +--------+ Local Ranks - V + V Note that ranks increase by column. Tuple (0,2,3) looks like: 0 3 @@ -120,13 +120,13 @@ static int *find_lrs(char *map, int my_node, int *nlrs) /** * @param pmap process map as returned by PMI_process_mapping * attribute - * @param my_rank + * @param my_rank * @param node set to my node id * @param nlrs set to the number of local ranks returned * * @return array that contains ranks local to my_rank or NULL - * on failure. Array must be freed by the caller. - */ + * on failure. Array must be freed by the caller. + */ int *pmix_cray_parse_pmap(char *pmap, int my_rank, int *node, int *nlrs) { @@ -202,7 +202,7 @@ int main(int argc, char **argv) assert(memcmp(lrs, a2, 2) == 0); free(lrs); - + /* cyclic distro which skips node 0 */ pmap = "(vector,(1,2,1),(1,2,1))"; me = 0; diff --git a/opal/mca/pmix/cray/pmix_cray_pmap_parser.h b/opal/mca/pmix/cray/pmix_cray_pmap_parser.h index 335231d7953..433bf5adac8 100644 --- a/opal/mca/pmix/cray/pmix_cray_pmap_parser.h +++ b/opal/mca/pmix/cray/pmix_cray_pmap_parser.h @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. diff --git a/opal/mca/pmix/native/Makefile.am b/opal/mca/pmix/native/Makefile.am index d491b538daa..ff14157b7c7 100644 --- a/opal/mca/pmix/native/Makefile.am +++ b/opal/mca/pmix/native/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pmix/native/configure.m4 b/opal/mca/pmix/native/configure.m4 index 1bedaa61dc6..cde17cdb841 100644 --- a/opal/mca/pmix/native/configure.m4 +++ b/opal/mca/pmix/native/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,9 +27,9 @@ AC_DEFUN([MCA_opal_pmix_native_CONFIG],[ AC_CONFIG_FILES([opal/mca/pmix/native/Makefile]) # check for sockaddr_un (a good sign we have Unix domain sockets) - AC_CHECK_TYPES([struct sockaddr_un], + AC_CHECK_TYPES([struct sockaddr_un], [pmix_native_happy="yes"], - [pmix_native_happy="no"], + [pmix_native_happy="no"], [AC_INCLUDES_DEFAULT #ifdef HAVE_SYS_SOCKET_H #include diff --git a/opal/mca/pmix/native/pmix_native.c b/opal/mca/pmix/native/pmix_native.c index 451b3206ba1..cd5e704918c 100644 --- a/opal/mca/pmix/native/pmix_native.c +++ b/opal/mca/pmix/native/pmix_native.c @@ -743,7 +743,7 @@ static int native_get(const opal_process_name_t *id, opal_list_t vals; opal_value_t *kp; bool found; - + opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s pmix:native getting value for proc %s key %s", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), diff --git a/opal/mca/pmix/native/pmix_native.h b/opal/mca/pmix/native/pmix_native.h index 1e0127303bd..082e046e3e6 100644 --- a/opal/mca/pmix/native/pmix_native.h +++ b/opal/mca/pmix/native/pmix_native.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pmix/native/pmix_native_component.c b/opal/mca/pmix/native/pmix_native_component.c index b048be8871d..8b10adf897a 100644 --- a/opal/mca/pmix/native/pmix_native_component.c +++ b/opal/mca/pmix/native/pmix_native_component.c @@ -6,9 +6,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -53,7 +53,7 @@ opal_pmix_native_component_t mca_pmix_native_component = { .base_version = { /* Indicate that we are a pmix v1.1.0 component (which also implies a specific MCA version) */ - + OPAL_PMIX_BASE_VERSION_2_0_0, /* Component name and version */ diff --git a/opal/mca/pmix/native/usock.c b/opal/mca/pmix/native/usock.c index 6e2273cc468..6de7eacf357 100644 --- a/opal/mca/pmix/native/usock.c +++ b/opal/mca/pmix/native/usock.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. @@ -273,7 +273,7 @@ static void pmix_usock_try_connect(int fd, short args, void *cbdata) opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s sock_peer_try_connect: Connection across to server succeeded", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - + /* setup event callbacks */ opal_event_set(mca_pmix_native_component.evbase, &mca_pmix_native_component.recv_event, @@ -314,7 +314,7 @@ static void pmix_usock_try_connect(int fd, short args, void *cbdata) if (OPAL_SUCCESS == (rc = usock_send_connect_ack())) { mca_pmix_native_component.state = PMIX_USOCK_CONNECT_ACK; } else { - opal_output(0, + opal_output(0, "%s usock_peer_try_connect: " "usock_send_connect_ack to server failed: %s (%d)", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), @@ -333,7 +333,7 @@ int usock_send_connect_ack(void) size_t sdsize; char *cred; size_t credsize; - + opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s SEND CONNECT ACK", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); @@ -428,12 +428,12 @@ void pmix_usock_dump(const char* msg) strerror(opal_socket_errno), opal_socket_errno); } - + #if defined(USOCK_NODELAY) optlen = sizeof(nodelay); if (getsockopt(mca_pmix_native_component.sd, IPPROTO_USOCK, USOCK_NODELAY, (char *)&nodelay, &optlen) < 0) { opal_output(0, "%s usock_peer_dump: USOCK_NODELAY option: %s (%d)\n", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), + OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), strerror(opal_socket_errno), opal_socket_errno); } diff --git a/opal/mca/pmix/native/usock_sendrecv.c b/opal/mca/pmix/native/usock_sendrecv.c index 8b2d21776bd..fa63f7844cb 100644 --- a/opal/mca/pmix/native/usock_sendrecv.c +++ b/opal/mca/pmix/native/usock_sendrecv.c @@ -5,11 +5,11 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. @@ -17,9 +17,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -90,7 +90,7 @@ static int send_bytes(pmix_usock_send_t *msg) } /* we hit an error and cannot progress this message */ opal_output(0, "%s pmix_usock_msg_send_bytes: write failed: %s (%d) [sd = %d]", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), + OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), strerror(opal_socket_errno), opal_socket_errno, mca_pmix_native_component.sd); @@ -278,7 +278,7 @@ static int read_bytes(pmix_usock_recv_t* recv) */ opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s pmix_usock_msg_recv: readv failed: %s (%d)", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), + OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), strerror(opal_socket_errno), opal_socket_errno); return OPAL_ERR_COMM_FAILURE; @@ -463,9 +463,9 @@ void pmix_usock_recv_handler(int sd, short flags, void *cbdata) } } break; - default: + default: opal_output(0, "%s usock_peer_recv_handler: invalid socket state(%d)", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), + OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), mca_pmix_native_component.state); CLOSE_THE_SOCKET(mca_pmix_native_component.sd); PMIX_NATIVE_ABNORMAL_TERM; // report the error upstream @@ -501,8 +501,8 @@ static bool usock_recv_blocking(char *data, size_t size) /* socket is non-blocking so handle errors */ if (retval < 0) { - if (opal_socket_errno != EINTR && - opal_socket_errno != EAGAIN && + if (opal_socket_errno != EINTR && + opal_socket_errno != EAGAIN && opal_socket_errno != EWOULDBLOCK) { if (mca_pmix_native_component.state == PMIX_USOCK_CONNECT_ACK) { /* If we overflow the listen backlog, it's @@ -525,7 +525,7 @@ static bool usock_recv_blocking(char *data, size_t size) strerror(opal_socket_errno)); return false; } else { - opal_output(0, + opal_output(0, "%s usock_recv_blocking: " "recv() failed for server: %s (%d)\n", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), @@ -697,7 +697,7 @@ static void usock_complete_connect(void) /* check connect completion status */ if (getsockopt(mca_pmix_native_component.sd, SOL_SOCKET, SO_ERROR, (char *)&so_error, &so_length) < 0) { opal_output(0, "%s usock_peer_complete_connect: getsockopt() to server failed: %s (%d)\n", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), + OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), strerror(opal_socket_errno), opal_socket_errno); mca_pmix_native_component.state = PMIX_USOCK_FAILED; @@ -743,7 +743,7 @@ static void usock_complete_connect(void) opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s usock_peer_complete_connect: setting read event on connection to server", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - + if (!mca_pmix_native_component.recv_ev_active) { opal_event_add(&mca_pmix_native_component.recv_event, 0); mca_pmix_native_component.recv_ev_active = true; diff --git a/opal/mca/pmix/pmix.h b/opal/mca/pmix/pmix.h index 873870af741..aaa228442a0 100644 --- a/opal/mca/pmix/pmix.h +++ b/opal/mca/pmix/pmix.h @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -364,7 +364,7 @@ typedef int (*opal_pmix_base_module_lookup_fn_t)(const char service_name[], /* Unpublish - the "info" parameter * consists of a list of pmix_info_t objects */ -typedef int (*opal_pmix_base_module_unpublish_fn_t)(const char service_name[], +typedef int (*opal_pmix_base_module_unpublish_fn_t)(const char service_name[], opal_list_t *info); /* Get attribute diff --git a/opal/mca/pmix/s1/Makefile.am b/opal/mca/pmix/s1/Makefile.am index 227f5d8e900..846fa24eca3 100644 --- a/opal/mca/pmix/s1/Makefile.am +++ b/opal/mca/pmix/s1/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pmix/s1/configure.m4 b/opal/mca/pmix/s1/configure.m4 index 0f0e8652d05..974107be5e5 100644 --- a/opal/mca/pmix/s1/configure.m4 +++ b/opal/mca/pmix/s1/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -12,10 +12,10 @@ # ----------------------------------------------------------- AC_DEFUN([MCA_opal_pmix_s1_CONFIG], [ AC_CONFIG_FILES([opal/mca/pmix/s1/Makefile]) - + AC_REQUIRE([OPAL_CHECK_UGNI]) AC_REQUIRE([OPAL_CHECK_PMI]) - + # Evaluate succeed / fail AS_IF([test "$opal_enable_pmi1" = "yes" && test "$opal_check_ugni_happy" = "no"], [$1 diff --git a/opal/mca/pmix/s1/pmix_s1.c b/opal/mca/pmix/s1/pmix_s1.c index 896185a4709..d2c237f53dc 100644 --- a/opal/mca/pmix/s1/pmix_s1.c +++ b/opal/mca/pmix/s1/pmix_s1.c @@ -297,7 +297,7 @@ static int s1_init(void) /* increment the init count */ ++pmix_init_count; - + return OPAL_SUCCESS; err_exit: @@ -471,7 +471,7 @@ static int s1_fence(opal_process_name_t *procs, size_t nprocs) OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(s1_pname), opal_hwloc_base_print_locality(locality))); - + OBJ_CONSTRUCT(&kvn, opal_value_t); kvn.key = strdup(OPAL_DSTORE_LOCALITY); kvn.type = OPAL_UINT16; diff --git a/opal/mca/pmix/s1/pmix_s1.h b/opal/mca/pmix/s1/pmix_s1.h index 488747e900f..523121ff0ee 100644 --- a/opal/mca/pmix/s1/pmix_s1.h +++ b/opal/mca/pmix/s1/pmix_s1.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pmix/s1/pmix_s1_component.c b/opal/mca/pmix/s1/pmix_s1_component.c index 8b127a2e071..4f897cd9d80 100644 --- a/opal/mca/pmix/s1/pmix_s1_component.c +++ b/opal/mca/pmix/s1/pmix_s1_component.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -48,7 +48,7 @@ opal_pmix_base_component_t mca_pmix_s1_component = { .base_version = { /* Indicate that we are a pmix v1.1.0 component (which also implies a specific MCA version) */ - + OPAL_PMIX_BASE_VERSION_2_0_0, /* Component name and version */ @@ -95,7 +95,7 @@ static int pmix_s1_component_query(mca_base_module_t **module, int *priority) *module = NULL; return OPAL_ERROR; } - + /* we can be considered, but set our priority by default * to be less than s2 */ *priority = mca_pmix_s1_component.priority; diff --git a/opal/mca/pmix/s2/Makefile.am b/opal/mca/pmix/s2/Makefile.am index efd22f16b2b..c16a1b3a026 100644 --- a/opal/mca/pmix/s2/Makefile.am +++ b/opal/mca/pmix/s2/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pmix/s2/configure.m4 b/opal/mca/pmix/s2/configure.m4 index cfc5bdc5764..5e3a7c4a31c 100644 --- a/opal/mca/pmix/s2/configure.m4 +++ b/opal/mca/pmix/s2/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -12,10 +12,10 @@ # ----------------------------------------------------------- AC_DEFUN([MCA_opal_pmix_s2_CONFIG], [ AC_CONFIG_FILES([opal/mca/pmix/s2/Makefile]) - + AC_REQUIRE([OPAL_CHECK_UGNI]) AC_REQUIRE([OPAL_CHECK_PMI]) - + # Evaluate succeed / fail AS_IF([test "$opal_enable_pmi2" = "yes" && test "$opal_check_ugni_happy" = "no"], [$1 diff --git a/opal/mca/pmix/s2/pmi2_pmap_parser.c b/opal/mca/pmix/s2/pmi2_pmap_parser.c index 7d2725475af..fcc2801dabf 100644 --- a/opal/mca/pmix/s2/pmi2_pmap_parser.c +++ b/opal/mca/pmix/s2/pmi2_pmap_parser.c @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. @@ -14,7 +14,7 @@ #include "pmi2_pmap_parser.h" /** - pmi2 process mapping is returned as a + pmi2 process mapping is returned as a comma separated list of tuples: ex: (vector,(0,4,4),(0,4,1)) slurm cyclic distro of 4 ranks over 2 nodes: @@ -26,7 +26,7 @@ slurm block distro of 4 ranks over 2 nodes: Format of each tuple is (base, H, L), where H is number of nodes spawned by tuple, L is number of ranks per node, - base is offset from node 0. + base is offset from node 0. Tuple can be visualized as a rectangle on two dimensional (Hosts, Local Ranks) plane: @@ -38,7 +38,7 @@ slurm block distro of 4 ranks over 2 nodes: | | | L | +--------+ Local Ranks - V + V Note that ranks increase by column. Tuple (0,2,3) looks like: 0 3 @@ -120,13 +120,13 @@ static int *find_lrs(char *map, int my_node, int *nlrs) /** * @param pmap process map as returned by PMI_process_mapping * attribute - * @param my_rank + * @param my_rank * @param node set to my node id * @param nlrs set to the number of local ranks returned * * @return array that contains ranks local to my_rank or NULL - * on failure. Array must be freed by the caller. - */ + * on failure. Array must be freed by the caller. + */ int *mca_common_pmi2_parse_pmap(char *pmap, int my_rank, int *node, int *nlrs) { @@ -202,7 +202,7 @@ int main(int argc, char **argv) assert(memcmp(lrs, a2, 2) == 0); free(lrs); - + /* cyclic distro which skips node 0 */ pmap = "(vector,(1,2,1),(1,2,1))"; me = 0; diff --git a/opal/mca/pmix/s2/pmi2_pmap_parser.h b/opal/mca/pmix/s2/pmi2_pmap_parser.h index ad8f012213c..07eba0bf75c 100644 --- a/opal/mca/pmix/s2/pmi2_pmap_parser.h +++ b/opal/mca/pmix/s2/pmi2_pmap_parser.h @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* * * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. diff --git a/opal/mca/pmix/s2/pmix_s2.c b/opal/mca/pmix/s2/pmix_s2.c index 4b4d1cb3d25..03dc7b215b4 100644 --- a/opal/mca/pmix/s2/pmix_s2.c +++ b/opal/mca/pmix/s2/pmix_s2.c @@ -266,7 +266,7 @@ static int s2_init(void) /* increment the init count */ ++pmix_init_count; - + return OPAL_SUCCESS; err_exit: PMI2_Finalize(); diff --git a/opal/mca/pmix/s2/pmix_s2.h b/opal/mca/pmix/s2/pmix_s2.h index b2a53d5fdc0..c436274e65e 100644 --- a/opal/mca/pmix/s2/pmix_s2.h +++ b/opal/mca/pmix/s2/pmix_s2.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pmix/s2/pmix_s2_component.c b/opal/mca/pmix/s2/pmix_s2_component.c index 52497c133ea..42c983226cc 100644 --- a/opal/mca/pmix/s2/pmix_s2_component.c +++ b/opal/mca/pmix/s2/pmix_s2_component.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -48,7 +48,7 @@ opal_pmix_base_component_t mca_pmix_s2_component = { .base_version = { /* Indicate that we are a pmix v1.1.0 component (which also implies a specific MCA version) */ - + OPAL_PMIX_BASE_VERSION_2_0_0, /* Component name and version */ @@ -96,7 +96,7 @@ static int pmix_s2_component_query(mca_base_module_t **module, int *priority) *module = NULL; return OPAL_ERROR; } - + /* we can be considered */ *priority = mca_pmix_s2_component.priority; *module = (mca_base_module_t *)&opal_pmix_s2_module; diff --git a/opal/mca/pstat/Makefile.am b/opal/mca/pstat/Makefile.am index 06a9bb53f65..a7d37cde4df 100644 --- a/opal/mca/pstat/Makefile.am +++ b/opal/mca/pstat/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/pstat/base/Makefile.am b/opal/mca/pstat/base/Makefile.am index fd02c336a60..b46d85b0c66 100644 --- a/opal/mca/pstat/base/Makefile.am +++ b/opal/mca/pstat/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/pstat/base/base.h b/opal/mca/pstat/base/base.h index e48b1d68ec9..92e31133095 100644 --- a/opal/mca/pstat/base/base.h +++ b/opal/mca/pstat/base/base.h @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/pstat/base/pstat_base_open.c b/opal/mca/pstat/base/pstat_base_open.c index fd718b6a17f..5cd3189a1cb 100644 --- a/opal/mca/pstat/base/pstat_base_open.c +++ b/opal/mca/pstat/base/pstat_base_open.c @@ -5,16 +5,16 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pstat/base/pstat_base_select.c b/opal/mca/pstat/base/pstat_base_select.c index 5f8e548ed14..5b87c7fe4ef 100644 --- a/opal/mca/pstat/base/pstat_base_select.c +++ b/opal/mca/pstat/base/pstat_base_select.c @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ int opal_pstat_base_select(void) (mca_base_module_t **) &best_module, (mca_base_component_t **) &best_component) ) { /* It is okay if we don't find a runnable component - default - * to the unsupported default. + * to the unsupported default. */ goto cleanup; } @@ -58,7 +58,7 @@ int opal_pstat_base_select(void) exit_status = ret; goto cleanup; } - + cleanup: return exit_status; } diff --git a/opal/mca/pstat/configure.m4 b/opal/mca/pstat/configure.m4 index 4b14104acee..0d03ed42262 100644 --- a/opal/mca/pstat/configure.m4 +++ b/opal/mca/pstat/configure.m4 @@ -1,11 +1,11 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2007 Los Alamos National Security, LLC. -dnl All rights reserved. +dnl All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/pstat/linux/Makefile.am b/opal/mca/pstat/linux/Makefile.am index 0b52ffa3bf3..0ec17bc52b9 100644 --- a/opal/mca/pstat/linux/Makefile.am +++ b/opal/mca/pstat/linux/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/pstat/linux/configure.m4 b/opal/mca/pstat/linux/configure.m4 index 6b5d4f6a4cf..bf6f1a92bf1 100644 --- a/opal/mca/pstat/linux/configure.m4 +++ b/opal/mca/pstat/linux/configure.m4 @@ -6,20 +6,20 @@ # 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, +# 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_opal_pstat_linux_PRIORITY], [60]) -# MCA_pstat_linux_CONFIG(action-if-can-compile, +# MCA_pstat_linux_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_pstat_linux_CONFIG],[ @@ -36,13 +36,13 @@ AC_DEFUN([MCA_opal_pstat_linux_CONFIG],[ ;; esac - AS_IF([test "$pstat_linux_happy" = "yes"], + AS_IF([test "$pstat_linux_happy" = "yes"], [AC_CHECK_DECLS([HZ], [], [pstat_linux_happy="no"], [AC_INCLUDES_DEFAULT #include ])]) - AS_IF([test "$pstat_linux_happy" = "yes"], - [$1], + AS_IF([test "$pstat_linux_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/pstat/linux/pstat_linux.h b/opal/mca/pstat/linux/pstat_linux.h index 1b94452ab76..08faaa97bbe 100644 --- a/opal/mca/pstat/linux/pstat_linux.h +++ b/opal/mca/pstat/linux/pstat_linux.h @@ -5,16 +5,16 @@ * 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, + * 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) 2006-2007 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pstat/linux/pstat_linux_component.c b/opal/mca/pstat/linux/pstat_linux_component.c index 91d8bd28e82..3eb7cc30e8a 100644 --- a/opal/mca/pstat/linux/pstat_linux_component.c +++ b/opal/mca/pstat/linux/pstat_linux_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -74,7 +74,7 @@ static int pstat_linux_component_query(mca_base_module_t **module, int *priority { *priority = 20; *module = (mca_base_module_t *)&opal_pstat_linux_module; - + return OPAL_SUCCESS; } diff --git a/opal/mca/pstat/linux/pstat_linux_module.c b/opal/mca/pstat/linux/pstat_linux_module.c index 3dc492d008d..0ae3da6a33e 100644 --- a/opal/mca/pstat/linux/pstat_linux_module.c +++ b/opal/mca/pstat/linux/pstat_linux_module.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -89,7 +89,7 @@ static int linux_module_fini(void) static char *next_field(char *ptr, int barrier) { int i=0; - + /* we are probably pointing to the last char * of the current field, so look for whitespace */ @@ -97,13 +97,13 @@ static char *next_field(char *ptr, int barrier) ptr++; /* step over the current char */ i++; } - + /* now look for the next field */ while (isspace(*ptr) && i < barrier) { ptr++; i++; } - + return ptr; } @@ -159,7 +159,7 @@ static int query(pid_t pid, if (numchars >= sizeof(data)) { return OPAL_ERR_VALUE_OUT_OF_BOUNDS; } - + if (0 > (fd = open(data, O_RDONLY))) { /* can't access this file - most likely, this means we * aren't really on a supported system, or the proc no @@ -167,7 +167,7 @@ static int query(pid_t pid, */ return OPAL_ERR_FILE_OPEN_FAILURE; } - + /* absorb all of the file's contents in one gulp - we'll process * it once it is in memory for speed */ @@ -179,17 +179,17 @@ static int query(pid_t pid, return OPAL_ERR_FILE_OPEN_FAILURE; } close(fd); - + /* remove newline at end */ data[len] = '\0'; - + /* the stat file consists of a single line in a carefully formatted * form. Parse it field by field as per proc(3) to get the ones we want */ - + /* we don't need to read the pid from the file - we already know it! */ stats->pid = pid; - + /* the cmd is surrounded by parentheses - find the start */ if (NULL == (ptr = strchr(data, '('))) { /* no cmd => something wrong with data, return error */ @@ -197,27 +197,27 @@ static int query(pid_t pid, } /* step over the paren */ ptr++; - + /* find the ending paren */ if (NULL == (eptr = strchr(ptr, ')'))) { /* no end to cmd => something wrong with data, return error */ return OPAL_ERR_BAD_PARAM; } - + /* save the cmd name, up to the limit of the array */ i = 0; while (ptr < eptr && i < OPAL_PSTAT_MAX_STRING_LEN) { stats->cmd[i++] = *ptr++; } - + /* move to the next field in the data */ ptr = next_field(eptr, len); - + /* next is the process state - a single character */ stats->state[0] = *ptr; /* move to next field */ ptr = next_field(ptr, len); - + /* skip fields until we get to the times */ ptr = next_field(ptr, len); /* ppid */ ptr = next_field(ptr, len); /* pgrp */ @@ -229,7 +229,7 @@ static int query(pid_t pid, ptr = next_field(ptr, len); /* cminflt */ ptr = next_field(ptr, len); /* majflt */ ptr = next_field(ptr, len); /* cmajflt */ - + /* grab the process time usage fields */ itime = strtoul(ptr, &ptr, 10); /* utime */ itime += strtoul(ptr, &ptr, 10); /* add the stime */ @@ -239,16 +239,16 @@ static int query(pid_t pid, stats->time.tv_usec = (int)(1000000.0 * (dtime - stats->time.tv_sec)); /* move to next field */ ptr = next_field(ptr, len); - + /* skip fields until we get to priority */ ptr = next_field(ptr, len); /* cutime */ ptr = next_field(ptr, len); /* cstime */ - + /* save the priority */ stats->priority = strtol(ptr, &ptr, 10); /* move to next field */ ptr = next_field(ptr, len); - + /* skip nice */ ptr = next_field(ptr, len); @@ -281,19 +281,19 @@ static int query(pid_t pid, stats->processor = strtol(ptr, NULL, 10); /* that's all we care about from this data - ignore the rest */ - + /* now create the status filename for this proc */ memset(data, 0, sizeof(data)); numchars = snprintf(data, sizeof(data), "/proc/%d/status", pid); if (numchars >= sizeof(data)) { return OPAL_ERR_VALUE_OUT_OF_BOUNDS; } - + if (NULL == (fp = fopen(data, "r"))) { /* ignore this */ return OPAL_SUCCESS; } - + /* parse it according to proc(3) */ while (NULL != (dptr = local_getline(fp))) { if (NULL == (value = local_stripper(dptr))) { @@ -320,7 +320,7 @@ static int query(pid_t pid, */ goto diskstats; } - + /* absorb all of the file's contents in one gulp - we'll process * it once it is in memory for speed */ @@ -330,7 +330,7 @@ static int query(pid_t pid, if (len < 0) { goto diskstats; } - + /* remove newline at end */ data[len] = '\0'; @@ -344,7 +344,7 @@ static int query(pid_t pid, /* ignore this */ goto diskstats; } - + /* read the file one line at a time */ while (NULL != (dptr = local_getline(fp))) { if (NULL == (value = local_stripper(dptr))) { @@ -461,7 +461,7 @@ static int query(pid_t pid, static char *local_getline(FILE *fp) { char *ret, *ptr; - + ret = fgets(input, OPAL_STAT_MAX_LENGTH, fp); if (NULL != ret) { input[strlen(input)-1] = '\0'; /* remove newline */ @@ -472,7 +472,7 @@ static char *local_getline(FILE *fp) } return ptr; } - + return NULL; } @@ -480,7 +480,7 @@ static char *local_stripper(char *data) { char *ptr, *end, *enddata; int len = strlen(data); - + /* find the colon */ if (NULL == (end = strchr(data, ':'))) { return NULL; diff --git a/opal/mca/pstat/pstat.h b/opal/mca/pstat/pstat.h index 2ad8ce2d793..920a4adecc7 100644 --- a/opal/mca/pstat/pstat.h +++ b/opal/mca/pstat/pstat.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2008 The Trustees of Indiana University. * All rights reserved. @@ -8,9 +8,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pstat/test/Makefile.am b/opal/mca/pstat/test/Makefile.am index b5e829b8e02..098f84c815f 100644 --- a/opal/mca/pstat/test/Makefile.am +++ b/opal/mca/pstat/test/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/pstat/test/configure.m4 b/opal/mca/pstat/test/configure.m4 index abfbfc68b58..c037d4ea8ab 100644 --- a/opal/mca/pstat/test/configure.m4 +++ b/opal/mca/pstat/test/configure.m4 @@ -6,27 +6,27 @@ # 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, +# 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-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # AC_DEFUN([MCA_opal_pstat_test_PRIORITY], [10]) -# MCA_pstat_test_CONFIG(action-if-can-compile, +# MCA_pstat_test_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_pstat_test_CONFIG],[ AC_CONFIG_FILES([opal/mca/pstat/test/Makefile]) pstat_test_happy="yes" - AS_IF([test "$pstat_test_happy" = "yes"], - [$1], + AS_IF([test "$pstat_test_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/pstat/test/pstat_test.c b/opal/mca/pstat/test/pstat_test.c index fc3128689e2..22da5f058cf 100644 --- a/opal/mca/pstat/test/pstat_test.c +++ b/opal/mca/pstat/test/pstat_test.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -85,7 +85,7 @@ static int query(pid_t pid, if (NULL != stats) { gethostname(hostname, 128); strncpy(stats->node, hostname, OPAL_PSTAT_MAX_STRING_LEN); - + stats->pid = pid; strncpy(stats->cmd, "UNKNOWN", OPAL_PSTAT_MAX_STRING_LEN); stats->state[0] = 'R'; diff --git a/opal/mca/pstat/test/pstat_test.h b/opal/mca/pstat/test/pstat_test.h index b43e6d9284a..3c3a14acfc6 100644 --- a/opal/mca/pstat/test/pstat_test.h +++ b/opal/mca/pstat/test/pstat_test.h @@ -5,15 +5,15 @@ * 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, + * 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-2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/pstat/test/pstat_test_component.c b/opal/mca/pstat/test/pstat_test_component.c index 0e7fce03701..42975aeb57f 100644 --- a/opal/mca/pstat/test/pstat_test_component.c +++ b/opal/mca/pstat/test/pstat_test_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -57,7 +57,7 @@ const opal_pstat_base_component_t mca_pstat_test_component = { .base_version = { /* Indicate that we are a pstat v1.1.0 component (which also implies a specific MCA version) */ - + OPAL_PSTAT_BASE_VERSION_2_0_0, /* Component name and version */ @@ -80,6 +80,6 @@ static int pstat_test_component_query(mca_base_module_t **module, int *priority) { *priority = 20; *module = (mca_base_module_t *)&opal_pstat_test_module; - + return OPAL_SUCCESS; } diff --git a/opal/mca/rcache/Makefile.am b/opal/mca/rcache/Makefile.am index a6a025b672e..ab7e2293a05 100644 --- a/opal/mca/rcache/Makefile.am +++ b/opal/mca/rcache/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/opal/mca/rcache/base/Makefile.am b/opal/mca/rcache/base/Makefile.am index 2117dd58f4f..f000f5cc2a3 100644 --- a/opal/mca/rcache/base/Makefile.am +++ b/opal/mca/rcache/base/Makefile.am @@ -5,21 +5,21 @@ # 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, +# 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) 2013 Los Alamos National Security, LLC. # All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # headers += \ - base/base.h + base/base.h libmca_rcache_la_SOURCES += \ base/rcache_base_frame.c \ diff --git a/opal/mca/rcache/base/base.h b/opal/mca/rcache/base/base.h index ed395170fa9..439f78535b7 100644 --- a/opal/mca/rcache/base/base.h +++ b/opal/mca/rcache/base/base.h @@ -5,16 +5,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -31,10 +31,10 @@ BEGIN_C_DECLS -/* +/* * create a module by name */ -OPAL_DECLSPEC mca_rcache_base_module_t* mca_rcache_base_module_create(const char* name); +OPAL_DECLSPEC mca_rcache_base_module_t* mca_rcache_base_module_create(const char* name); /* * MCA framework @@ -52,7 +52,7 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_rcache_base_selected_module_t); OPAL_DECLSPEC mca_rcache_base_component_t* mca_rcache_base_component_lookup(const char* name); OPAL_DECLSPEC mca_rcache_base_module_t* mca_rcache_base_module_lookup(const char* name); - + /* * Globals */ diff --git a/opal/mca/rcache/base/rcache_base_create.c b/opal/mca/rcache/base/rcache_base_create.c index fb6aa30fc47..b2ae62b25f6 100644 --- a/opal/mca/rcache/base/rcache_base_create.c +++ b/opal/mca/rcache/base/rcache_base_create.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -28,7 +28,7 @@ -mca_rcache_base_module_t* mca_rcache_base_module_create(const char* name) +mca_rcache_base_module_t* mca_rcache_base_module_create(const char* name) { mca_base_component_list_item_t* cli; mca_rcache_base_component_t* component = NULL; diff --git a/opal/mca/rcache/base/rcache_base_frame.c b/opal/mca/rcache/base/rcache_base_frame.c index c963d550a15..72334c2ded0 100644 --- a/opal/mca/rcache/base/rcache_base_frame.c +++ b/opal/mca/rcache/base/rcache_base_frame.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ static int mca_rcache_base_close(void) /* Finalize all the rcache components and free their list items */ for (item = opal_list_remove_first(&mca_rcache_base_modules); - NULL != item; + NULL != item; item = opal_list_remove_first(&mca_rcache_base_modules)) { sm = (mca_rcache_base_selected_module_t *) item; diff --git a/opal/mca/rcache/rcache.h b/opal/mca/rcache/rcache.h index 78c8b2141c3..729b9005362 100644 --- a/opal/mca/rcache/rcache.h +++ b/opal/mca/rcache/rcache.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -34,7 +34,7 @@ * component initialize */ typedef struct mca_rcache_base_module_t* (*mca_rcache_base_component_init_fn_t)(void); - + typedef int (*mca_rcache_base_module_find_fn_t) ( struct mca_rcache_base_module_t* rcache, void* addr, size_t size, @@ -65,25 +65,25 @@ typedef void (*mca_rcache_base_module_dump_range_fn_t)( typedef void (*mca_rcache_base_module_finalize_fn_t)( struct mca_rcache_base_module_t*); -/** - * rcache component descriptor. Contains component version information and - * open/close/init functions - */ +/** + * rcache component descriptor. Contains component version information and + * open/close/init functions + */ -struct mca_rcache_base_component_2_0_0_t{ - mca_base_component_t rcache_version; /**< version */ - mca_base_component_data_t rcache_data; /**base.rcache_find = mca_rcache_vma_find; +void mca_rcache_vma_module_init( mca_rcache_vma_module_t* rcache ) { + rcache->base.rcache_find = mca_rcache_vma_find; rcache->base.rcache_find_all = mca_rcache_vma_find_all; - rcache->base.rcache_insert = mca_rcache_vma_insert; - rcache->base.rcache_delete = mca_rcache_vma_delete; - rcache->base.rcache_clean = mca_rcache_vma_clean; - rcache->base.rcache_finalize = mca_rcache_vma_finalize; + rcache->base.rcache_insert = mca_rcache_vma_insert; + rcache->base.rcache_delete = mca_rcache_vma_delete; + rcache->base.rcache_clean = mca_rcache_vma_clean; + rcache->base.rcache_finalize = mca_rcache_vma_finalize; rcache->base.rcache_dump_range = mca_rcache_vma_dump_range; OBJ_CONSTRUCT(&rcache->base.lock, opal_mutex_t); mca_rcache_vma_tree_init(rcache); @@ -50,23 +50,23 @@ int mca_rcache_vma_find(struct mca_rcache_base_module_t* rcache, void* addr, size_t size, mca_mpool_base_registration_t **reg) { int rc; - unsigned char* bound_addr; + unsigned char* bound_addr; - if(size == 0) { - return OPAL_ERROR; + if(size == 0) { + return OPAL_ERROR; } bound_addr = ((unsigned char *)addr) + size - 1; - + /* Check to ensure that the cache is valid */ - if (OPAL_UNLIKELY(opal_memory_changed() && + if (OPAL_UNLIKELY(opal_memory_changed() && NULL != opal_memory->memoryc_process && OPAL_SUCCESS != (rc = opal_memory->memoryc_process()))) { return rc; } *reg = mca_rcache_vma_tree_find((mca_rcache_vma_module_t*)rcache, (unsigned char*)addr, - bound_addr); + bound_addr); return OPAL_SUCCESS; } @@ -85,7 +85,7 @@ int mca_rcache_vma_find_all(struct mca_rcache_base_module_t* rcache, bound_addr = ((unsigned char *)addr) + size - 1; /* Check to ensure that the cache is valid */ - if (OPAL_UNLIKELY(opal_memory_changed() && + if (OPAL_UNLIKELY(opal_memory_changed() && NULL != opal_memory->memoryc_process && OPAL_SUCCESS != (rc = opal_memory->memoryc_process()))) { return rc; @@ -120,7 +120,7 @@ int mca_rcache_vma_insert(struct mca_rcache_base_module_t* rcache, if (OPAL_LIKELY(OPAL_SUCCESS == rc)) { /* If we successfully registered, then tell the memory manager to start monitoring this region */ - opal_memory->memoryc_register(reg->base, + opal_memory->memoryc_register(reg->base, (uint64_t) reg_size, (uint64_t) (uintptr_t) reg); } @@ -154,10 +154,10 @@ int mca_rcache_vma_clean(struct mca_rcache_base_module_t* rcache) } else { vma = (mca_rcache_vma_t *)i; opal_list_remove_item(&vma_rcache->vma_delete_list, &vma->super); - + /* Need to drop the rcache lock before destroying the vma */ OPAL_THREAD_UNLOCK(&rcache->lock); - + mca_rcache_vma_destroy(vma); } } while (NULL != vma); diff --git a/opal/mca/rcache/vma/rcache_vma.h b/opal/mca/rcache/vma/rcache_vma.h index 12b390adde3..0306fc0bba8 100644 --- a/opal/mca/rcache/vma/rcache_vma.h +++ b/opal/mca/rcache/vma/rcache_vma.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2009 IBM Corporation. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -28,26 +28,26 @@ #define MCA_RCACHE_VMA_H #include "opal_config.h" #include "opal/mca/mca.h" -#include "opal/class/opal_list.h" +#include "opal/class/opal_list.h" #include "opal/class/opal_rb_tree.h" #include "opal/mca/rcache/rcache.h" BEGIN_C_DECLS -struct mca_rcache_vma_module_t { +struct mca_rcache_vma_module_t { mca_rcache_base_module_t base; opal_rb_tree_t rb_tree; opal_list_t vma_list; opal_list_t vma_delete_list; size_t reg_cur_cache_size; }; -typedef struct mca_rcache_vma_module_t mca_rcache_vma_module_t; +typedef struct mca_rcache_vma_module_t mca_rcache_vma_module_t; -struct mca_rcache_vma_component_t { - mca_rcache_base_component_t super; +struct mca_rcache_vma_component_t { + mca_rcache_base_component_t super; }; -typedef struct mca_rcache_vma_component_t mca_rcache_vma_component_t; +typedef struct mca_rcache_vma_component_t mca_rcache_vma_component_t; OPAL_DECLSPEC extern mca_rcache_vma_component_t mca_rcache_vma_component; diff --git a/opal/mca/rcache/vma/rcache_vma_component.c b/opal/mca/rcache/vma/rcache_vma_component.c index 7119e07bed7..c1dcd65ed1c 100644 --- a/opal/mca/rcache/vma/rcache_vma_component.c +++ b/opal/mca/rcache/vma/rcache_vma_component.c @@ -8,9 +8,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -19,9 +19,9 @@ #include "opal/mca/rcache/rcache.h" #include "rcache_vma.h" -static int mca_rcache_vma_component_open(void); +static int mca_rcache_vma_component_open(void); -static mca_rcache_base_module_t* mca_rcache_vma_component_init( void ); +static mca_rcache_base_module_t* mca_rcache_vma_component_init( void ); mca_rcache_vma_component_t mca_rcache_vma_component = { { @@ -44,14 +44,14 @@ mca_rcache_vma_component_t mca_rcache_vma_component = { static int mca_rcache_vma_component_open(void) { - return OPAL_SUCCESS; + return OPAL_SUCCESS; } static mca_rcache_base_module_t* mca_rcache_vma_component_init(void) { - mca_rcache_vma_module_t* rcache; - + mca_rcache_vma_module_t* rcache; + rcache = (mca_rcache_vma_module_t*) malloc(sizeof(mca_rcache_vma_module_t)); mca_rcache_vma_module_init(rcache); - return &rcache->base; + return &rcache->base; } diff --git a/opal/mca/rcache/vma/rcache_vma_tree.c b/opal/mca/rcache/vma/rcache_vma_tree.c index 2aeaf5e0300..e24cf6632c1 100644 --- a/opal/mca/rcache/vma/rcache_vma_tree.c +++ b/opal/mca/rcache/vma/rcache_vma_tree.c @@ -51,7 +51,7 @@ static void mca_rcache_vma_destruct(opal_object_t *object) } OBJ_CLASS_INSTANCE(mca_rcache_vma_t, opal_list_item_t, - mca_rcache_vma_construct, mca_rcache_vma_destruct); + mca_rcache_vma_construct, mca_rcache_vma_destruct); /** @@ -67,7 +67,7 @@ OBJ_CLASS_INSTANCE(mca_rcache_vma_t, opal_list_item_t, static int mca_rcache_vma_tree_node_compare(void *key1, void *key2) { - mca_rcache_vma_t *vma1 = (mca_rcache_vma_t*)key1, + mca_rcache_vma_t *vma1 = (mca_rcache_vma_t*)key1, *vma2 = (mca_rcache_vma_t*)key2; if(vma1->start < vma2->start) @@ -134,7 +134,7 @@ void mca_rcache_vma_destroy(mca_rcache_vma_t *vma) while ((item = opal_list_remove_first(&vma->reg_delete_list))) OBJ_RELEASE(item); - + OBJ_RELEASE(vma); } @@ -170,7 +170,7 @@ static inline int mca_rcache_vma_add_reg(mca_rcache_vma_t *vma, return -1; entry->reg = reg; - + for(i = opal_list_get_first(&vma->reg_list); i != opal_list_get_end(&vma->reg_list); i = opal_list_get_next(i)) { @@ -244,7 +244,7 @@ static inline int mca_rcache_vma_compare_reg_lists(mca_rcache_vma_t *vma1, i2 = (mca_rcache_vma_reg_list_item_t*)opal_list_get_first(&vma2->reg_list); do { - if(i1 == (mca_rcache_vma_reg_list_item_t*)opal_list_get_end(&vma1->reg_list) || + if(i1 == (mca_rcache_vma_reg_list_item_t*)opal_list_get_end(&vma1->reg_list) || i2 == (mca_rcache_vma_reg_list_item_t*)opal_list_get_end(&vma2->reg_list)) return 1; @@ -259,12 +259,12 @@ static inline int mca_rcache_vma_compare_reg_lists(mca_rcache_vma_t *vma1, } int mca_rcache_vma_tree_init(mca_rcache_vma_module_t* rcache) -{ +{ OBJ_CONSTRUCT(&rcache->rb_tree, opal_rb_tree_t); - OBJ_CONSTRUCT(&rcache->vma_list, opal_list_t); - OBJ_CONSTRUCT(&rcache->vma_delete_list, opal_list_t); + OBJ_CONSTRUCT(&rcache->vma_list, opal_list_t); + OBJ_CONSTRUCT(&rcache->vma_delete_list, opal_list_t); rcache->reg_cur_cache_size = 0; - return opal_rb_tree_init(&rcache->rb_tree, + return opal_rb_tree_init(&rcache->rb_tree, mca_rcache_vma_tree_node_compare); } @@ -284,12 +284,12 @@ mca_mpool_base_registration_t *mca_rcache_vma_tree_find( mca_rcache_vma_t *vma; mca_rcache_vma_reg_list_item_t *item; - vma = (mca_rcache_vma_t*)opal_rb_tree_find_with(&vma_rcache->rb_tree, base, + vma = (mca_rcache_vma_t*)opal_rb_tree_find_with(&vma_rcache->rb_tree, base, mca_rcache_vma_tree_node_compare_search); if(!vma) return NULL; - + for(item = (mca_rcache_vma_reg_list_item_t*) opal_list_get_first(&vma->reg_list); item != (mca_rcache_vma_reg_list_item_t*) @@ -385,7 +385,7 @@ static inline void mca_rcache_vma_update_byte_count( { vma_rcache->reg_cur_cache_size += nbytes; } - + int mca_rcache_vma_tree_insert(mca_rcache_vma_module_t* vma_rcache, mca_mpool_base_registration_t* reg, size_t limit) { @@ -410,7 +410,7 @@ int mca_rcache_vma_tree_insert(mca_rcache_vma_module_t* vma_rcache, goto remove; mca_rcache_vma_update_byte_count(vma_rcache, end - begin + 1); - + opal_list_append(&vma_rcache->vma_list, &vma->super); begin = vma->end + 1; mca_rcache_vma_add_reg(vma, reg); @@ -484,12 +484,12 @@ int mca_rcache_vma_tree_insert(mca_rcache_vma_module_t* vma_rcache, * @retval OPAL_SUCCESS * @retval OPAL_ERR_BAD_PARAM if the passed base pointer was invalid */ -int mca_rcache_vma_tree_delete(mca_rcache_vma_module_t* vma_rcache, +int mca_rcache_vma_tree_delete(mca_rcache_vma_module_t* vma_rcache, mca_mpool_base_registration_t* reg) { mca_rcache_vma_t *vma; - vma = (mca_rcache_vma_t*)opal_rb_tree_find_with(&vma_rcache->rb_tree, reg->base, + vma = (mca_rcache_vma_t*)opal_rb_tree_find_with(&vma_rcache->rb_tree, reg->base, mca_rcache_vma_tree_node_compare_search); if(!vma) @@ -498,7 +498,7 @@ int mca_rcache_vma_tree_delete(mca_rcache_vma_module_t* vma_rcache, while(vma != (mca_rcache_vma_t*)opal_list_get_end(&vma_rcache->vma_list) && vma->start <= (uintptr_t)reg->bound) { mca_rcache_vma_remove_reg(vma, reg); - + if(opal_list_is_empty(&vma->reg_list)) { mca_rcache_vma_t *next = (mca_rcache_vma_t*)opal_list_get_next(&vma->super); opal_rb_tree_delete(&vma_rcache->rb_tree, vma); @@ -512,7 +512,7 @@ int mca_rcache_vma_tree_delete(mca_rcache_vma_module_t* vma_rcache, do { mca_rcache_vma_t *prev = NULL, *next = NULL; - if(opal_list_get_begin(&vma_rcache->vma_list) != + if(opal_list_get_begin(&vma_rcache->vma_list) != opal_list_get_prev(vma)) prev = (mca_rcache_vma_t*)opal_list_get_prev(vma); merged = 0; @@ -526,7 +526,7 @@ int mca_rcache_vma_tree_delete(mca_rcache_vma_module_t* vma_rcache, vma = prev; merged = 1; } - if(opal_list_get_end(&vma_rcache->vma_list) != + if(opal_list_get_end(&vma_rcache->vma_list) != opal_list_get_next(vma)) next = (mca_rcache_vma_t*)opal_list_get_next(vma); diff --git a/opal/mca/rcache/vma/rcache_vma_tree.h b/opal/mca/rcache/vma/rcache_vma_tree.h index a0d16b8b554..77884eba2fa 100644 --- a/opal/mca/rcache/vma/rcache_vma_tree.h +++ b/opal/mca/rcache/vma/rcache_vma_tree.h @@ -6,7 +6,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -62,7 +62,7 @@ OBJ_CLASS_DECLARATION(mca_rcache_vma_t); /* * initialize the vma tree */ -int mca_rcache_vma_tree_init(mca_rcache_vma_module_t* rcache); +int mca_rcache_vma_tree_init(mca_rcache_vma_module_t* rcache); /* * clean up the vma tree @@ -70,10 +70,10 @@ int mca_rcache_vma_tree_init(mca_rcache_vma_module_t* rcache); void mca_rcache_vma_tree_finalize(mca_rcache_vma_module_t* rcache); /** - * Returns the item in the vma tree + * Returns the item in the vma tree */ mca_mpool_base_registration_t* mca_rcache_vma_tree_find( - mca_rcache_vma_module_t* rcache, + mca_rcache_vma_module_t* rcache, unsigned char* base, unsigned char *bound ); @@ -85,23 +85,23 @@ int mca_rcache_vma_tree_find_all( unsigned char *bound, mca_mpool_base_registration_t **regs, int reg_cnt); -/* - * insert an item in the vma tree - */ +/* + * insert an item in the vma tree + */ int mca_rcache_vma_tree_insert(mca_rcache_vma_module_t* rcache, mca_mpool_base_registration_t* reg, size_t limit); -/* - * remove an item from the vma tree +/* + * remove an item from the vma tree */ -int mca_rcache_vma_tree_delete( - mca_rcache_vma_module_t* rcache, +int mca_rcache_vma_tree_delete( + mca_rcache_vma_module_t* rcache, mca_mpool_base_registration_t* reg - ); + ); -/* +/* * Destroy a vma - * Do not call this function with rcache lock as it can deadlock + * Do not call this function with rcache lock as it can deadlock */ void mca_rcache_vma_destroy(mca_rcache_vma_t *vma); diff --git a/opal/mca/sec/Makefile.am b/opal/mca/sec/Makefile.am index 8edc9527e7a..18e53a55e18 100644 --- a/opal/mca/sec/Makefile.am +++ b/opal/mca/sec/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/sec/base/Makefile.am b/opal/mca/sec/base/Makefile.am index 0aa25d1d3c3..48e6319d1e9 100644 --- a/opal/mca/sec/base/Makefile.am +++ b/opal/mca/sec/base/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2014-2015 Intel, Inc. All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/sec/base/base.h b/opal/mca/sec/base/base.h index 09437cb6fef..34491fa3327 100644 --- a/opal/mca/sec/base/base.h +++ b/opal/mca/sec/base/base.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/opal/mca/sec/base/sec_base_frame.c b/opal/mca/sec/base/sec_base_frame.c index b187964b1c9..b26b55d6c2f 100644 --- a/opal/mca/sec/base/sec_base_frame.c +++ b/opal/mca/sec/base/sec_base_frame.c @@ -3,9 +3,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,7 +38,7 @@ opal_list_t opal_sec_base_actives = {{0}}; static int opal_sec_base_close(void) { opal_sec_handle_t *hdl; - + /* let the selected modules finalize */ OPAL_LIST_FOREACH(hdl, &opal_sec_base_actives, opal_sec_handle_t) { if (NULL != hdl->module->finalize) { @@ -47,14 +47,14 @@ static int opal_sec_base_close(void) } OPAL_LIST_DESTRUCT(&opal_sec_base_actives); - + return mca_base_framework_components_close(&opal_sec_base_framework, NULL); } static int opal_sec_base_open(mca_base_open_flag_t flags) { OBJ_CONSTRUCT(&opal_sec_base_actives, opal_list_t); - + /* Open up all available components */ return mca_base_framework_components_open(&opal_sec_base_framework, flags); } diff --git a/opal/mca/sec/base/sec_base_select.c b/opal/mca/sec/base/sec_base_select.c index 7cf06c36d85..7fe3fd1de52 100644 --- a/opal/mca/sec/base/sec_base_select.c +++ b/opal/mca/sec/base/sec_base_select.c @@ -2,9 +2,9 @@ * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -33,7 +33,7 @@ int opal_sec_base_select(void) opal_sec_base_module_t *smodule; int rc, priority; opal_sec_handle_t *hdl, *hptr, *hmark; - + if (selected) { /* ensure we don't do this twice */ return OPAL_SUCCESS; @@ -93,7 +93,7 @@ int opal_sec_base_select(void) hdl->pri = priority; hdl->module = smodule; hdl->component = component; - + /* add to the list of actives in priority order */ hmark = NULL; OPAL_LIST_FOREACH(hptr, &opal_sec_base_actives, opal_sec_handle_t) { diff --git a/opal/mca/sec/base/sec_base_stubs.c b/opal/mca/sec/base/sec_base_stubs.c index acf127ef615..ba0fa8aa826 100644 --- a/opal/mca/sec/base/sec_base_stubs.c +++ b/opal/mca/sec/base/sec_base_stubs.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -46,7 +46,7 @@ int opal_sec_base_get_cred(char *method, opal_sec_cred_t cred; opal_buffer_t buf; int rc; - + opal_output_verbose(5, opal_sec_base_framework.framework_output, "Requesting credential from source %s", (NULL == method) ? "ANY" : method); @@ -105,14 +105,14 @@ int opal_sec_base_validate(char *payload, size_t size, char **method) opal_buffer_t buf; int cnt, rc; opal_sec_cred_t cred = {.method = NULL, .credential = NULL}; - + opal_output_verbose(5, opal_sec_base_framework.framework_output, "opal_sec: Received credential of size %lu", (unsigned long)size); - + OBJ_CONSTRUCT(&buf, opal_buffer_t); opal_dss.load(&buf, payload, size); - + cnt = 1; while (OPAL_SUCCESS == (rc = opal_dss.unpack(&buf, &cred.method, &cnt, OPAL_STRING))) { opal_output_verbose(5, opal_sec_base_framework.framework_output, @@ -159,7 +159,7 @@ int opal_sec_base_validate(char *payload, size_t size, char **method) } /* if we get here, then nothing authenticated */ rc = OPAL_ERR_AUTHENTICATION_FAILED; - + done: buf.base_ptr = NULL; OBJ_DESTRUCT(&buf); diff --git a/opal/mca/sec/basic/Makefile.am b/opal/mca/sec/basic/Makefile.am index 1cecbb09bee..66a0a2e2d5e 100644 --- a/opal/mca/sec/basic/Makefile.am +++ b/opal/mca/sec/basic/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/sec/basic/sec_basic.c b/opal/mca/sec/basic/sec_basic.c index 9ec475323ef..a896ad2653b 100644 --- a/opal/mca/sec/basic/sec_basic.c +++ b/opal/mca/sec/basic/sec_basic.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/sec/basic/sec_basic.h b/opal/mca/sec/basic/sec_basic.h index 1257452cd41..f3f4e124cb9 100644 --- a/opal/mca/sec/basic/sec_basic.h +++ b/opal/mca/sec/basic/sec_basic.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/sec/basic/sec_basic_component.c b/opal/mca/sec/basic/sec_basic_component.c index 2b66685b29d..29af8654615 100644 --- a/opal/mca/sec/basic/sec_basic_component.c +++ b/opal/mca/sec/basic/sec_basic_component.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/sec/keystone/Makefile.am b/opal/mca/sec/keystone/Makefile.am index 17625460280..4a7b934978f 100644 --- a/opal/mca/sec/keystone/Makefile.am +++ b/opal/mca/sec/keystone/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/sec/keystone/configure.m4 b/opal/mca/sec/keystone/configure.m4 index 2ea2986cb1c..cdc45eb2ad4 100644 --- a/opal/mca/sec/keystone/configure.m4 +++ b/opal/mca/sec/keystone/configure.m4 @@ -2,9 +2,9 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/sec/keystone/sec_keystone.c b/opal/mca/sec/keystone/sec_keystone.c index 50ce6f9d5ae..3642f85cd59 100644 --- a/opal/mca/sec/keystone/sec_keystone.c +++ b/opal/mca/sec/keystone/sec_keystone.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/sec/keystone/sec_keystone.h b/opal/mca/sec/keystone/sec_keystone.h index 2319dd32b40..fd18e0b8da1 100644 --- a/opal/mca/sec/keystone/sec_keystone.h +++ b/opal/mca/sec/keystone/sec_keystone.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/sec/keystone/sec_keystone_component.c b/opal/mca/sec/keystone/sec_keystone_component.c index 3445f08df27..a3466bf023e 100644 --- a/opal/mca/sec/keystone/sec_keystone_component.c +++ b/opal/mca/sec/keystone/sec_keystone_component.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/sec/munge/Makefile.am b/opal/mca/sec/munge/Makefile.am index 77ee8983955..3cba3ffcb69 100644 --- a/opal/mca/sec/munge/Makefile.am +++ b/opal/mca/sec/munge/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2015 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/sec/munge/configure.m4 b/opal/mca/sec/munge/configure.m4 index ce7057aa543..bdf6f4c9387 100644 --- a/opal/mca/sec/munge/configure.m4 +++ b/opal/mca/sec/munge/configure.m4 @@ -2,9 +2,9 @@ # # Copyright (c) 2015 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -76,7 +76,7 @@ AC_DEFUN([MCA_opal_sec_munge_CONFIG],[ $2], [AC_MSG_RESULT([yes]) $1]) - + # set build flags to use in makefile AC_SUBST([sec_munge_CPPFLAGS]) AC_SUBST([sec_munge_LDFLAGS]) diff --git a/opal/mca/sec/munge/sec_munge.c b/opal/mca/sec/munge/sec_munge.c index 6129edd6327..7ebfa0bc1e5 100644 --- a/opal/mca/sec/munge/sec_munge.c +++ b/opal/mca/sec/munge/sec_munge.c @@ -3,9 +3,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -47,14 +47,14 @@ static bool refresh = false; static int init(void) { int rc; - + opal_output_verbose(2, opal_sec_base_framework.framework_output, "sec: munge init"); - + /* attempt to get a credential as a way of checking that * the munge server is available - cache the credential * for later use */ - + if (EMUNGE_SUCCESS != (rc = munge_encode(&my_cred.credential, NULL, NULL, 0))) { opal_output_verbose(2, opal_sec_base_framework.framework_output, "sec: munge failed to create credential: %s", @@ -64,7 +64,7 @@ static int init(void) /* include the '\0' termination string character */ my_cred.size = strlen(my_cred.credential)+1; initialized = true; - + return OPAL_SUCCESS; } @@ -80,7 +80,7 @@ static int get_my_cred(int dstorehandle, opal_sec_cred_t *cred) { int rc; - + if (initialized) { if (!refresh) { refresh = true; @@ -102,14 +102,14 @@ static int get_my_cred(int dstorehandle, } else { rc = OPAL_ERROR; } - + return OPAL_SUCCESS; } static int authenticate(opal_sec_cred_t *cred) { munge_err_t rc; - + opal_output_verbose(2, opal_sec_base_framework.framework_output, "sec: munge validate_cred %s", cred->credential); diff --git a/opal/mca/sec/munge/sec_munge.h b/opal/mca/sec/munge/sec_munge.h index 6d3e103b9cf..eef8b396c2b 100644 --- a/opal/mca/sec/munge/sec_munge.h +++ b/opal/mca/sec/munge/sec_munge.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/sec/munge/sec_munge_component.c b/opal/mca/sec/munge/sec_munge_component.c index cf024b56b99..bbe8a7f7ba1 100644 --- a/opal/mca/sec/munge/sec_munge_component.c +++ b/opal/mca/sec/munge/sec_munge_component.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/sec/sec.h b/opal/mca/sec/sec.h index b60673c9093..33683a5e13b 100644 --- a/opal/mca/sec/sec.h +++ b/opal/mca/sec/sec.h @@ -6,9 +6,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/opal/mca/shmem/base/shmem_base_open.c b/opal/mca/shmem/base/shmem_base_open.c index cb021abd5db..0332a5aac58 100644 --- a/opal/mca/shmem/base/shmem_base_open.c +++ b/opal/mca/shmem/base/shmem_base_open.c @@ -43,7 +43,7 @@ char *opal_shmem_base_RUNTIME_QUERY_hint = NULL; /* ////////////////////////////////////////////////////////////////////////// */ /** - * Register some shmem-wide MCA params + * Register some shmem-wide MCA params */ static int opal_shmem_base_register (mca_base_register_flag_t flags) diff --git a/opal/mca/timer/Makefile.am b/opal/mca/timer/Makefile.am index 5d436228cb2..2f6e7083f82 100644 --- a/opal/mca/timer/Makefile.am +++ b/opal/mca/timer/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # @@ -23,7 +23,7 @@ libmca_timer_la_SOURCES = # local files headers = timer.h -nodist_headers = +nodist_headers = libmca_timer_la_SOURCES += $(headers) # Conditionally install the header files diff --git a/opal/mca/timer/aix/Makefile.am b/opal/mca/timer/aix/Makefile.am index c708487f769..3b83f72a4e9 100644 --- a/opal/mca/timer/aix/Makefile.am +++ b/opal/mca/timer/aix/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/timer/aix/configure.m4 b/opal/mca/timer/aix/configure.m4 index 61efcc37b75..0500fee6cb7 100644 --- a/opal/mca/timer/aix/configure.m4 +++ b/opal/mca/timer/aix/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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$ # @@ -31,7 +31,7 @@ AC_DEFUN([MCA_opal_timer_aix_POST_CONFIG],[ ])dnl -# MCA_timer_aix_CONFIG(action-if-can-compile, +# MCA_timer_aix_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_timer_aix_CONFIG],[ @@ -46,7 +46,7 @@ AC_DEFUN([MCA_opal_timer_aix_CONFIG],[ [timer_aix_happy="no"])]) AS_IF([test "$timer_aix_happy" = "yes"], - [AC_CHECK_FUNC([time_base_to_time], + [AC_CHECK_FUNC([time_base_to_time], [timer_aix_happy="yes"], [timer_aix_happy="no"])]) @@ -72,7 +72,7 @@ AC_DEFUN([MCA_opal_timer_aix_CONFIG],[ AC_SUBST(timer_aix_LIBS) - AS_IF([test "$timer_aix_happy" = "yes"], - [$1], + AS_IF([test "$timer_aix_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/timer/aix/timer_aix.h b/opal/mca/timer/aix/timer_aix.h index 2e99ffb60de..4b149bb63c4 100644 --- a/opal/mca/timer/aix/timer_aix.h +++ b/opal/mca/timer/aix/timer_aix.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/mca/timer/aix/timer_aix_component.c b/opal/mca/timer/aix/timer_aix_component.c index f8fd8be6c2d..6b3eb960527 100644 --- a/opal/mca/timer/aix/timer_aix_component.c +++ b/opal/mca/timer/aix/timer_aix_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/timer/altix/Makefile.am b/opal/mca/timer/altix/Makefile.am index 9007f11fe2c..8e75c15a339 100644 --- a/opal/mca/timer/altix/Makefile.am +++ b/opal/mca/timer/altix/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/timer/altix/configure.m4 b/opal/mca/timer/altix/configure.m4 index e8208b070f4..2ae839c1be4 100644 --- a/opal/mca/timer/altix/configure.m4 +++ b/opal/mca/timer/altix/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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_opal_timer_altix_PRIORITY], [100]) @@ -29,7 +29,7 @@ AC_DEFUN([MCA_opal_timer_altix_POST_CONFIG],[ AS_IF([test "$1" = "1"], [timer_base_include="altix/timer_altix.h"]) ])dnl -# MCA_timer_altix_CONFIG(action-if-can-compile, +# MCA_timer_altix_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_timer_altix_CONFIG],[ @@ -75,7 +75,7 @@ AC_DEFUN([MCA_opal_timer_altix_CONFIG],[ "$timer_altix_should_use" = "1"], [AC_MSG_ERROR([Altix timer requested but not available. Aborting.])]) - AS_IF([test "$timer_altix_happy" = "yes"], - [$1], + AS_IF([test "$timer_altix_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/timer/altix/timer_altix.h b/opal/mca/timer/altix/timer_altix.h index e588d74bb8e..2541369cb40 100644 --- a/opal/mca/timer/altix/timer_altix.h +++ b/opal/mca/timer/altix/timer_altix.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/mca/timer/altix/timer_altix_component.c b/opal/mca/timer/altix/timer_altix_component.c index f995300cc32..3f9c66a38ff 100644 --- a/opal/mca/timer/altix/timer_altix_component.c +++ b/opal/mca/timer/altix/timer_altix_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/timer/base/Makefile.am b/opal/mca/timer/base/Makefile.am index d92258b4763..d2b1ae3d0ab 100644 --- a/opal/mca/timer/base/Makefile.am +++ b/opal/mca/timer/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/opal/mca/timer/base/base.h b/opal/mca/timer/base/base.h index be32fac70b6..df1a0c3a131 100644 --- a/opal/mca/timer/base/base.h +++ b/opal/mca/timer/base/base.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/opal/mca/timer/base/timer_base_null.h b/opal/mca/timer/base/timer_base_null.h index e91c56f93a1..89be9ad0134 100644 --- a/opal/mca/timer/base/timer_base_null.h +++ b/opal/mca/timer/base/timer_base_null.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -32,7 +32,7 @@ static inline opal_timer_t opal_timer_base_get_usec(void) { return 0; -} +} static inline opal_timer_t diff --git a/opal/mca/timer/base/timer_base_open.c b/opal/mca/timer/base/timer_base_open.c index 0102f41262d..1777ff9d356 100644 --- a/opal/mca/timer/base/timer_base_open.c +++ b/opal/mca/timer/base/timer_base_open.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/timer/configure.m4 b/opal/mca/timer/configure.m4 index 6813c75bced..4a3667eae2b 100644 --- a/opal/mca/timer/configure.m4 +++ b/opal/mca/timer/configure.m4 @@ -6,15 +6,15 @@ dnl Corporation. All rights reserved. dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ -dnl +dnl dnl Additional copyrights may follow -dnl +dnl dnl $HEADER$ dnl diff --git a/opal/mca/timer/darwin/Makefile.am b/opal/mca/timer/darwin/Makefile.am index 72774526185..44f54e7c103 100644 --- a/opal/mca/timer/darwin/Makefile.am +++ b/opal/mca/timer/darwin/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/timer/darwin/configure.m4 b/opal/mca/timer/darwin/configure.m4 index b466ff51a17..2cd46a33c3d 100644 --- a/opal/mca/timer/darwin/configure.m4 +++ b/opal/mca/timer/darwin/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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_opal_timer_darwin_PRIORITY], [30]) @@ -29,7 +29,7 @@ AC_DEFUN([MCA_opal_timer_darwin_POST_CONFIG],[ AS_IF([test "$1" = "1"], [timer_base_include="darwin/timer_darwin.h"]) ])dnl -# MCA_timer_darwin_CONFIG(action-if-can-compile, +# MCA_timer_darwin_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_timer_darwin_CONFIG],[ @@ -45,7 +45,7 @@ AC_DEFUN([MCA_opal_timer_darwin_CONFIG],[ AS_IF([test "$timer_darwin_happy" = "yes"], [AC_CHECK_HEADERS([mach/mach_time.h]) - AC_CHECK_FUNC([mach_absolute_time], + AC_CHECK_FUNC([mach_absolute_time], [timer_darwin_happy="yes"], [timer_darwin_happy="no"])]) @@ -53,7 +53,7 @@ AC_DEFUN([MCA_opal_timer_darwin_CONFIG],[ "$timer_darwin_should_use" = "1"], [AC_MSG_ERROR([Darwin timer requested but not available. Aborting.])]) - AS_IF([test "$timer_darwin_happy" = "yes"], - [$1], + AS_IF([test "$timer_darwin_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/timer/darwin/timer_darwin.h b/opal/mca/timer/darwin/timer_darwin.h index 4aa6dbb7546..fe35f99d5e4 100644 --- a/opal/mca/timer/darwin/timer_darwin.h +++ b/opal/mca/timer/darwin/timer_darwin.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/mca/timer/darwin/timer_darwin_component.c b/opal/mca/timer/darwin/timer_darwin_component.c index f8058b9479a..444e6459086 100644 --- a/opal/mca/timer/darwin/timer_darwin_component.c +++ b/opal/mca/timer/darwin/timer_darwin_component.c @@ -6,16 +6,16 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -53,7 +53,7 @@ const opal_timer_base_component_2_0_0_t mca_timer_darwin_component = { /* mach_timebase_info() returns a fraction that can be multiplied by the difference between two calls to mach_absolute_time() to get the number of nanoseconds that passed between the two - calls. + calls. On PPC, mach_timebase_info returns numer = 1000000000 and denom = 33333335 (or possibly 25000000, depending on the machine). diff --git a/opal/mca/timer/linux/Makefile.am b/opal/mca/timer/linux/Makefile.am index 8d48ee2ba20..98e4e6358e2 100644 --- a/opal/mca/timer/linux/Makefile.am +++ b/opal/mca/timer/linux/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2014 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/timer/linux/configure.m4 b/opal/mca/timer/linux/configure.m4 index 269426c6828..575b36761b4 100644 --- a/opal/mca/timer/linux/configure.m4 +++ b/opal/mca/timer/linux/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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_opal_timer_linux_PRIORITY], [30]) @@ -29,7 +29,7 @@ AC_DEFUN([MCA_opal_timer_linux_POST_CONFIG],[ AS_IF([test "$1" = "1"], [timer_base_include="linux/timer_linux.h"]) ])dnl -# MCA_timer_linux_CONFIG(action-if-can-compile, +# MCA_timer_linux_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_timer_linux_CONFIG],[ @@ -59,7 +59,7 @@ AC_DEFUN([MCA_opal_timer_linux_CONFIG],[ "$timer_linux_should_use" = "1"], [AC_MSG_ERROR([Linux timer requested but not available. Aborting.])]) - AS_IF([test "$timer_linux_happy" = "yes"], - [$1], + AS_IF([test "$timer_linux_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/timer/linux/help-opal-timer-linux.txt b/opal/mca/timer/linux/help-opal-timer-linux.txt index c4cb122a939..a8d5f6d7625 100644 --- a/opal/mca/timer/linux/help-opal-timer-linux.txt +++ b/opal/mca/timer/linux/help-opal-timer-linux.txt @@ -4,9 +4,9 @@ # of Tennessee Research Foundation. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's Linux timer support. diff --git a/opal/mca/timer/linux/timer_linux.h b/opal/mca/timer/linux/timer_linux.h index fa07d7fabe5..6bf05c9f5df 100644 --- a/opal/mca/timer/linux/timer_linux.h +++ b/opal/mca/timer/linux/timer_linux.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/mca/timer/linux/timer_linux_component.c b/opal/mca/timer/linux/timer_linux_component.c index 509d605fee0..9ebc479bca0 100644 --- a/opal/mca/timer/linux/timer_linux_component.c +++ b/opal/mca/timer/linux/timer_linux_component.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -16,9 +16,9 @@ * reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/timer/solaris/Makefile.am b/opal/mca/timer/solaris/Makefile.am index 74aaae4fce5..dbe7e29396f 100644 --- a/opal/mca/timer/solaris/Makefile.am +++ b/opal/mca/timer/solaris/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/mca/timer/solaris/configure.m4 b/opal/mca/timer/solaris/configure.m4 index 2a3e5fdaf9f..1b186b74469 100644 --- a/opal/mca/timer/solaris/configure.m4 +++ b/opal/mca/timer/solaris/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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_opal_timer_solaris_PRIORITY], [30]) @@ -29,7 +29,7 @@ AC_DEFUN([MCA_opal_timer_solaris_POST_CONFIG],[ AS_IF([test "$1" = "1"], [timer_base_include="solaris/timer_solaris.h"]) ])dnl -# MCA_timer_solaris_CONFIG(action-if-can-compile, +# MCA_timer_solaris_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_timer_solaris_CONFIG],[ @@ -44,7 +44,7 @@ AC_DEFUN([MCA_opal_timer_solaris_CONFIG],[ [timer_solaris_happy="no"])]) AS_IF([test "$timer_solaris_happy" = "yes"], - [AC_CHECK_FUNC([gethrtime], + [AC_CHECK_FUNC([gethrtime], [timer_solaris_happy="yes"], [timer_solaris_happy="no"])]) @@ -52,7 +52,7 @@ AC_DEFUN([MCA_opal_timer_solaris_CONFIG],[ "$timer_solaris_should_use" = "1"], [AC_MSG_ERROR([Solaris timer requested but not available. Aborting.])]) - AS_IF([test "$timer_solaris_happy" = "yes"], - [$1], + AS_IF([test "$timer_solaris_happy" = "yes"], + [$1], [$2]) ]) diff --git a/opal/mca/timer/solaris/timer_solaris.h b/opal/mca/timer/solaris/timer_solaris.h index 40973c432b8..e71cba92f73 100644 --- a/opal/mca/timer/solaris/timer_solaris.h +++ b/opal/mca/timer/solaris/timer_solaris.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/mca/timer/solaris/timer_solaris_component.c b/opal/mca/timer/solaris/timer_solaris_component.c index d56dc89ce36..b29eec29f90 100644 --- a/opal/mca/timer/solaris/timer_solaris_component.c +++ b/opal/mca/timer/solaris/timer_solaris_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/mca/timer/timer.h b/opal/mca/timer/timer.h index caf946e1b60..cb645f61d8a 100644 --- a/opal/mca/timer/timer.h +++ b/opal/mca/timer/timer.h @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ *

  • OPAL_TIMER_CYCLE_NATIVE
    Whether * opal_timer_base_get_cycle() is implemented directly or computed * from some other data (such as a high res timer)
  • - *
  • OPAL_TIMER_CYCLE_SUPPORTED
    Whether + *
  • OPAL_TIMER_CYCLE_SUPPORTED
    Whether * opal_timer_base_get_cycle() is supported on the current * platform.
  • *
  • OPAL_TIMER_USEC_SUPPORTED
    Whether diff --git a/opal/memoryhooks/Makefile.am b/opal/memoryhooks/Makefile.am index ee523eedaf5..8b11687375e 100644 --- a/opal/memoryhooks/Makefile.am +++ b/opal/memoryhooks/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/memoryhooks/memory.c b/opal/memoryhooks/memory.c index 81ac6d5a735..e72ca291570 100644 --- a/opal/memoryhooks/memory.c +++ b/opal/memoryhooks/memory.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -32,7 +32,7 @@ #include "opal/class/opal_object.h" #include "opal/sys/atomic.h" -/* +/* * local types */ struct callback_list_item_t { diff --git a/opal/memoryhooks/memory.h b/opal/memoryhooks/memory.h index c3120791ead..a62ed58bea5 100644 --- a/opal/memoryhooks/memory.h +++ b/opal/memoryhooks/memory.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -49,7 +49,7 @@ BEGIN_C_DECLS * * Initialize the memory hooks subsystem. This is generally called * during opal_init() and should be called before any other function - * in the interface is called. + * in the interface is called. * * \note Note that some back-end functionality is activated pre-main, * so not calling this function does not prevent the memory hooks from @@ -87,14 +87,14 @@ OPAL_DECLSPEC int opal_mem_hooks_finalize(void); * if support is provided. * * @retval OPAL_MEMORY_FREE_SUPPORT Memory hooks subsytem can trigger - * callback events when memory is going + * callback events when memory is going * to be released by the process, either * by the user calling an allocator * function or munmap. Implies * OPAL_MEMORY_MUNMAP_SUPPORT. * @retval OPAL_MEMORY_MUNMAP_SUPPORT Subsystem can trigger callback events * by the user calling munmap directly. - * @retval OPAL_MEMORY_CHUNK_SUPPORT Memory hooks subsystem will only + * @retval OPAL_MEMORY_CHUNK_SUPPORT Memory hooks subsystem will only * trigger callback events when the * process is giving memory back to the * operating system, not at ever call @@ -113,7 +113,7 @@ OPAL_DECLSPEC int opal_mem_hooks_support_level(void); * the note in opal_mem_hooks_register_alloc() or * opal_mem_hooks_register_release(). * - * @param buf Pointer to the start of the allocation + * @param buf Pointer to the start of the allocation * @param lentgh Length of the allocation * @param cbdata Data passed to memory hooks when callback * was registered @@ -121,7 +121,7 @@ OPAL_DECLSPEC int opal_mem_hooks_support_level(void); * general allocation routines (malloc, calloc, free, * etc.) or directly from the user (mmap, munmap, etc.) */ -typedef void (opal_mem_hooks_callback_fn_t)(void *buf, size_t length, +typedef void (opal_mem_hooks_callback_fn_t)(void *buf, size_t length, void *cbdata, bool from_alloc); @@ -138,10 +138,10 @@ typedef void (opal_mem_hooks_callback_fn_t)(void *buf, size_t length, * @retval OPAL_SUCCESS The registration completed successfully. * @retval OPAL_EXISTS The function is already registered and will not * be registered again. - * @retval OPAL_ERR_NOT_SUPPORTED There are no hooks available for + * @retval OPAL_ERR_NOT_SUPPORTED There are no hooks available for * receiving callbacks when memory is to be released */ -OPAL_DECLSPEC int opal_mem_hooks_register_release(opal_mem_hooks_callback_fn_t *func, +OPAL_DECLSPEC int opal_mem_hooks_register_release(opal_mem_hooks_callback_fn_t *func, void *cbdata); /** diff --git a/opal/memoryhooks/memory_internal.h b/opal/memoryhooks/memory_internal.h index bd0d6c7895b..b812275cea7 100644 --- a/opal/memoryhooks/memory_internal.h +++ b/opal/memoryhooks/memory_internal.h @@ -5,15 +5,15 @@ * 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, + * 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$ */ diff --git a/opal/runtime/Makefile.am b/opal/runtime/Makefile.am index 06ea5a577bc..fab8ead6104 100644 --- a/opal/runtime/Makefile.am +++ b/opal/runtime/Makefile.am @@ -6,7 +6,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # Copyright (c) 2014 Intel, Inc. All rights reserved # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/runtime/help-opal-runtime.txt b/opal/runtime/help-opal-runtime.txt index 481f9597a0a..95fd280c169 100644 --- a/opal/runtime/help-opal-runtime.txt +++ b/opal/runtime/help-opal-runtime.txt @@ -6,16 +6,16 @@ # 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, +# 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 Oak Ridge National Labs. All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open MPI. @@ -51,7 +51,7 @@ A process has executed an operation involving a call to the operating in a condition that could result in memory corruption or other system errors; your job may hang, crash, or produce silent data corruption. The use of fork() (or system() or other calls that -create child processes) is strongly discouraged. +create child processes) is strongly discouraged. The process that invoked fork was: diff --git a/opal/runtime/help-opal_info.txt b/opal/runtime/help-opal_info.txt index ec69b7884c3..5bbf85c2501 100644 --- a/opal/runtime/help-opal_info.txt +++ b/opal/runtime/help-opal_info.txt @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI ompi_info error diff --git a/opal/runtime/opal.h b/opal/runtime/opal.h index 4309333b8a7..d92f3962499 100644 --- a/opal/runtime/opal.h +++ b/opal/runtime/opal.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -55,7 +55,7 @@ OPAL_DECLSPEC extern bool opal_warn_on_fork; OPAL_DECLSPEC int opal_init(int* pargc, char*** pargv); /** - * Finalize the OPAL layer, including the MCA system. + * Finalize the OPAL layer, including the MCA system. * * @retval OPAL_SUCCESS Upon success. * @retval OPAL_ERROR Upon failure. @@ -77,7 +77,7 @@ OPAL_DECLSPEC int opal_finalize(void); OPAL_DECLSPEC int opal_init_util(int* pargc, char*** pargv); /** - * Finalize the OPAL layer, excluding the MCA system. + * Finalize the OPAL layer, excluding the MCA system. * * @retval OPAL_SUCCESS Upon success. * @retval OPAL_ERROR Upon failure. diff --git a/opal/runtime/opal_cr.c b/opal/runtime/opal_cr.c index 0684bf1cf62..5fc619d6074 100644 --- a/opal/runtime/opal_cr.c +++ b/opal/runtime/opal_cr.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science @@ -22,8 +22,8 @@ * $HEADER$ */ -/** @file - * +/** @file + * * OPAL Layer Checkpoint/Restart Runtime functions * */ @@ -286,7 +286,7 @@ static int opal_cr_register (void) OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_ALL_EQ, &opal_cr_debug_sigpipe); #else - opal_cr_is_tool = true; /* no support for CR on Windows yet */ + opal_cr_is_tool = true; /* no support for CR on Windows yet */ #endif /* __WINDOWS__ */ #if OPAL_ENABLE_CRDEBUG == 1 @@ -422,7 +422,7 @@ int opal_cr_init(void ) } /* End opal_cr_is_tool = true */ - /* + /* * If fault tolerance was not compiled in then * we need to make sure that the listener thread is active to tell * the tools that this is not a checkpointable job. @@ -439,7 +439,7 @@ int opal_cr_init(void ) exit_status = ret; goto cleanup; } - + if (OPAL_SUCCESS != (ret = opal_crs_base_select())) { opal_show_help( "help-opal-runtime.txt", "opal_cr_init:no-crs", true, @@ -559,7 +559,7 @@ void opal_cr_test_if_checkpoint_ready(void) } /* - * If there is no checkpoint request to act on + * If there is no checkpoint request to act on * then just return */ if(OPAL_CR_STATUS_REQUESTED != opal_cr_checkpoint_request ) { @@ -593,8 +593,8 @@ void opal_cr_test_if_checkpoint_ready(void) opal_cr_checkpoint_request = OPAL_CR_STATUS_NONE; return; } - - /* + + /* * Start the checkpoint */ opal_cr_checkpointing_state = OPAL_CR_STATUS_RUNNING; @@ -630,7 +630,7 @@ int opal_cr_inc_core_prep(void) */ if(OPAL_SUCCESS != (ret = cur_coord_callback(OPAL_CRS_CHECKPOINT)) ) { if ( OPAL_EXISTS != ret ) { - opal_output(opal_cr_output, + opal_output(opal_cr_output, "opal_cr: inc_core: Error: cur_coord_callback(%d) failed! %d\n", OPAL_CRS_CHECKPOINT, ret); } @@ -697,9 +697,9 @@ int opal_cr_inc_core_recover(int state) int ret; opal_cr_user_inc_callback_state_t cb_state; - if( opal_cr_checkpointing_state != OPAL_CR_STATUS_TERM && - opal_cr_checkpointing_state != OPAL_CR_STATUS_CONTINUE && - opal_cr_checkpointing_state != OPAL_CR_STATUS_RESTART_PRE && + if( opal_cr_checkpointing_state != OPAL_CR_STATUS_TERM && + opal_cr_checkpointing_state != OPAL_CR_STATUS_CONTINUE && + opal_cr_checkpointing_state != OPAL_CR_STATUS_RESTART_PRE && opal_cr_checkpointing_state != OPAL_CR_STATUS_RESTART_POST ) { if(state == OPAL_CRS_CONTINUE) { @@ -770,7 +770,7 @@ int opal_cr_inc_core(pid_t pid, if(OPAL_SUCCESS != (ret = opal_cr_inc_core_prep() ) ) { return ret; } - + /* * INC: Take the checkpoint */ @@ -795,7 +795,7 @@ int opal_cr_inc_core(pid_t pid, /** * Current Coordination callback routines */ -int opal_cr_coord(int state) +int opal_cr_coord(int state) { if(OPAL_CRS_CHECKPOINT == state) { /* Do Checkpoint Phase work */ @@ -1017,7 +1017,7 @@ static int extract_env_vars(int prev_pid, char * file_name) if( NULL == (t_set = opal_argv_split(tmp_str, '=')) ) { break; } - + opal_setenv(t_set[0], t_set[1], true, &environ); opal_argv_free(t_set); @@ -1032,7 +1032,7 @@ static int extract_env_vars(int prev_pid, char * file_name) if( NULL != tmp_str ){ free(tmp_str); } - + return exit_status; } @@ -1354,7 +1354,7 @@ int MPIR_checkpoint_debugger_detach(void) { * enabled debugging functionality */ #if 0 /* Once the debugger can successfully force threads into the function below, - * then we can uncomment this line */ + * then we can uncomment this line */ if( MPIR_debug_with_checkpoint ) { opal_cr_debug_threads_already_waiting = true; } diff --git a/opal/runtime/opal_cr.h b/opal/runtime/opal_cr.h index 20f16378e71..64c1ff4d3b2 100644 --- a/opal/runtime/opal_cr.h +++ b/opal/runtime/opal_cr.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -66,7 +66,7 @@ enum opal_cr_ckpt_cmd_state_t { }; typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; - /* An output handle to be used by the cr runtime + /* An output handle to be used by the cr runtime * functionality as an argument to opal_output() */ OPAL_DECLSPEC extern int opal_cr_output; @@ -74,7 +74,7 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; * with the opal-checkpoint tool */ OPAL_DECLSPEC extern char * opal_cr_pipe_dir; - /* Signal that opal-checkpoint uses to contact the + /* Signal that opal-checkpoint uses to contact the * application process */ OPAL_DECLSPEC extern int opal_cr_entry_point_signal; @@ -154,7 +154,7 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; * elements. */ OPAL_DECLSPEC int opal_cr_finalize(void); - + /************************************************* * Check to see if a checkpoint has been requested * @@ -175,7 +175,7 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; OPAL_DECLSPEC void opal_cr_test_if_checkpoint_ready(void); /* If the checkpoint operation should be stalled to - * wait for another sevice to complete before + * wait for another sevice to complete before * continuing with the checkpoint */ OPAL_DECLSPEC extern bool opal_cr_stall_check; OPAL_DECLSPEC extern bool opal_cr_currently_stalled; @@ -190,7 +190,7 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; OPAL_DECLSPEC void opal_cr_thread_noop_progress(void); #endif /* OPAL_ENABLE_FT_THREAD == 1 */ - /* + /* * If not using FT then make the #defines noops */ #if OPAL_ENABLE_FT == 0 || OPAL_ENABLE_FT_CR == 0 @@ -285,11 +285,11 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; * - Call the CRS.checkpoint() * - Call Registered INC_Coord(state) */ - OPAL_DECLSPEC int opal_cr_inc_core(pid_t pid, + OPAL_DECLSPEC int opal_cr_inc_core(pid_t pid, opal_crs_base_snapshot_t *snapshot, opal_crs_base_ckpt_options_t *options, int *state); - + OPAL_DECLSPEC int opal_cr_inc_core_prep(void); OPAL_DECLSPEC int opal_cr_inc_core_ckpt(pid_t pid, opal_crs_base_snapshot_t *snapshot, @@ -336,7 +336,7 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; /******************************* * Coordination Routines *******************************/ - /** + /** * Coordination callback routine signature */ typedef int (*opal_cr_coord_callback_fn_t) (int); diff --git a/opal/runtime/opal_finalize.c b/opal/runtime/opal_finalize.c index 0105d660697..382deb3c324 100644 --- a/opal/runtime/opal_finalize.c +++ b/opal/runtime/opal_finalize.c @@ -107,7 +107,7 @@ opal_finalize_util(void) the malloc code turning off doesn't affect opal_output that much */ opal_output_finalize(); - + /* close the dss */ opal_dss_close(); @@ -201,7 +201,7 @@ void opal_finalize_test(void) the malloc code turning off doesn't affect opal_output that much */ opal_output_finalize(); - + /* close the dss */ opal_dss_close(); diff --git a/opal/runtime/opal_info_support.h b/opal/runtime/opal_info_support.h index 243c8d908eb..686c4463300 100644 --- a/opal/runtime/opal_info_support.h +++ b/opal/runtime/opal_info_support.h @@ -3,9 +3,9 @@ * All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ OPAL_DECLSPEC void opal_info_show_path(const char *type, const char *value); OPAL_DECLSPEC void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line); OPAL_DECLSPEC void opal_info_show_mca_params(const char *type, - const char *component, + const char *component, mca_base_var_info_lvl_t max_level, bool want_internal); @@ -84,7 +84,7 @@ OPAL_DECLSPEC void opal_info_show_mca_version(const mca_base_component_t *compon OPAL_DECLSPEC void opal_info_show_component_version(opal_pointer_array_t *mca_types, opal_pointer_array_t *component_map, - const char *type_name, + const char *type_name, const char *component_name, const char *scope, const char *ver_type); @@ -103,8 +103,8 @@ OPAL_DECLSPEC void opal_info_do_type(opal_cmd_line_t *opal_info_cmd_line); OPAL_DECLSPEC void opal_info_out(const char *pretty_message, const char *plain_message, const char *value); -OPAL_DECLSPEC void opal_info_out_int(const char *pretty_message, - const char *plain_message, +OPAL_DECLSPEC void opal_info_out_int(const char *pretty_message, + const char *plain_message, int value); OPAL_DECLSPEC int opal_info_register_project_frameworks (const char *project_name, diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index a2b927e711b..cea62629119 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -298,12 +298,12 @@ opal_init_util(int* pargc, char*** pargv) __FILE__, __LINE__, ret); return ret; } - + /* initialize the help system */ opal_show_help_init(); /* register handler for errnum -> string converstion */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (ret = opal_error_register("OPAL", OPAL_ERR_BASE, OPAL_ERR_MAX, opal_err2str))) { error = "opal_error_register"; @@ -469,7 +469,7 @@ opal_init(int* pargc, char*** pargv) error = "opal_event_base_open"; goto return_error; } - + /* * Initialize the general progress engine */ @@ -518,7 +518,7 @@ opal_init(int* pargc, char*** pargv) error = "opal_cr_init"; goto return_error; } - + /* initialize the security framework */ if( OPAL_SUCCESS != (ret = mca_base_framework_open(&opal_sec_base_framework, 0)) ) { error = "opal_sec_base_open"; @@ -555,12 +555,12 @@ int opal_init_test(void) __FILE__, __LINE__, ret); return ret; } - + /* initialize the help system */ opal_show_help_init(); /* register handler for errnum -> string converstion */ - if (OPAL_SUCCESS != + if (OPAL_SUCCESS != (ret = opal_error_register("OPAL", OPAL_ERR_BASE, OPAL_ERR_MAX, opal_err2str))) { error = "opal_error_register"; diff --git a/opal/runtime/opal_params.c b/opal/runtime/opal_params.c index d161ae06800..39d5a535c6f 100644 --- a/opal/runtime/opal_params.c +++ b/opal/runtime/opal_params.c @@ -6,12 +6,12 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2006 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2010-2014 Los Alamos National Security, LLC. @@ -20,9 +20,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -171,7 +171,7 @@ int opal_register_params(void) - 10.0.0./8 - 172.16.0.0/12 - 192.168.0.0/16 - + RFC3330 also mentions - 169.254.0.0/16 for DHCP onlink iff there's no DHCP server */ @@ -288,8 +288,8 @@ int opal_register_params(void) /* dss has parameters */ ret = opal_dss_register_vars (); - if (OPAL_SUCCESS != ret) { - return ret; + if (OPAL_SUCCESS != ret) { + return ret; } return OPAL_SUCCESS; diff --git a/opal/runtime/opal_params.h b/opal/runtime/opal_params.h index a8ee60cd0e3..79b0fa4f91e 100644 --- a/opal/runtime/opal_params.h +++ b/opal/runtime/opal_params.h @@ -5,21 +5,21 @@ * 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, + * 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) 2006 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2010-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2014 Hochschule Esslingen. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/runtime/opal_progress.c b/opal/runtime/opal_progress.c index b4713906682..d7ecf086d73 100644 --- a/opal/runtime/opal_progress.c +++ b/opal/runtime/opal_progress.c @@ -6,19 +6,19 @@ * 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, + * 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) 2006-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,8 +42,8 @@ bool opal_progress_debug = false; #endif -/* - * default parameters +/* + * default parameters */ static int opal_progress_event_flag = OPAL_EVLOOP_ONCE | OPAL_EVLOOP_NONBLOCK; int opal_progress_spin_count = 10000; @@ -71,7 +71,7 @@ static int32_t event_progress_counter = 0; /* reset value for counter when it hits 0 */ static int32_t event_progress_delta = 0; #endif -/* users of the event library from MPI cause the tick rate to +/* users of the event library from MPI cause the tick rate to be every time */ static int32_t num_event_users = 0; @@ -106,7 +106,7 @@ opal_progress_init(void) #endif OPAL_OUTPUT((debug_output, "progress: initialized event flag to: %x", - opal_progress_event_flag)); + opal_progress_event_flag)); OPAL_OUTPUT((debug_output, "progress: initialized yield_when_idle to: %s", opal_progress_yield_when_idle ? "true" : "false")); OPAL_OUTPUT((debug_output, "progress: initialized num users to: %d", @@ -138,7 +138,7 @@ opal_progress_finalize(void) /* - * Progress the event library and any functions that have registered to + * Progress the event library and any functions that have registered to * be called. We don't propogate errors from the progress functions, * so no action is taken if they return failures. The functions are * expected to return the number of events progressed, to determine @@ -165,7 +165,7 @@ opal_progress(void) /* trip the event library if we've reached our tick rate and we are enabled */ if (now - event_progress_last_time > event_progress_delta ) { - event_progress_last_time = (num_event_users > 0) ? + event_progress_last_time = (num_event_users > 0) ? now - event_progress_delta : now; events += opal_event_loop(opal_event_base, opal_progress_event_flag); @@ -175,7 +175,7 @@ opal_progress(void) /* trip the event library if we've reached our tick rate and we are enabled */ if (OPAL_THREAD_ADD32(&event_progress_counter, -1) <= 0 ) { - event_progress_counter = + event_progress_counter = (num_event_users > 0) ? 0 : event_progress_delta; events += opal_event_loop(opal_event_base, opal_progress_event_flag); } @@ -352,7 +352,7 @@ opal_progress_unregister(opal_progress_callback_t cb) break; } } - + /* If we found the function we're unregistering: If callbacks_len is 0, we're not goig to do anything interesting anyway, so skip. If callbacks_len is 1, it will soon be 0, so no need to diff --git a/opal/runtime/opal_progress.h b/opal/runtime/opal_progress.h index a3b30bfcca0..0a27365d9e6 100644 --- a/opal/runtime/opal_progress.h +++ b/opal/runtime/opal_progress.h @@ -5,17 +5,17 @@ * 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, + * 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) 2006-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -36,7 +36,7 @@ BEGIN_C_DECLS /** * Initialize the progress engine * - * Initialize the progress engine, including constructing the + * Initialize the progress engine, including constructing the * proper locks and allocating space for the progress registration * functions. At this point, any function in the progress engine * interface may be called. @@ -44,7 +44,7 @@ BEGIN_C_DECLS OPAL_DECLSPEC int opal_progress_init(void); -/** +/** * Shut down the progress engine * * Shut down the progress engine. This includes deregistering all @@ -76,7 +76,7 @@ OPAL_DECLSPEC void opal_progress(void); * meaning that the call to opal_event_loop() will block pending * events, but may block for a period of time. * - * @param flags One of the valid vlags argument to + * @param flags One of the valid vlags argument to * opal_event_loop(). * @return Previous value of flags used to call * opal_event_loop(). @@ -142,7 +142,7 @@ OPAL_DECLSPEC void opal_progress_set_event_poll_rate(int microseconds); /** * Progress callback function typedef - * + * * Prototype for the a progress function callback. Progress function * callbacks can be registered with opal_progress_register() and * deregistered with opal_progress_deregister(). It should be noted diff --git a/opal/runtime/opal_progress_threads.c b/opal/runtime/opal_progress_threads.c index 5524d60f3b9..2c24326045b 100644 --- a/opal/runtime/opal_progress_threads.c +++ b/opal/runtime/opal_progress_threads.c @@ -1,9 +1,9 @@ /* - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/runtime/opal_progress_threads.h b/opal/runtime/opal_progress_threads.h index b66097b3769..ec1f8e2adf4 100644 --- a/opal/runtime/opal_progress_threads.h +++ b/opal/runtime/opal_progress_threads.h @@ -1,9 +1,9 @@ /* - * Copyright (c) 2014 Intel, Inc. All rights reserved. + * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/threads/Makefile.am b/opal/threads/Makefile.am index 661f22fc474..9f77ca0b548 100644 --- a/opal/threads/Makefile.am +++ b/opal/threads/Makefile.am @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/threads/condition.c b/opal/threads/condition.c index 36941908992..7745d316544 100644 --- a/opal/threads/condition.c +++ b/opal/threads/condition.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/threads/condition.h b/opal/threads/condition.h index 56181ce9199..cb510cf85ac 100644 --- a/opal/threads/condition.h +++ b/opal/threads/condition.h @@ -1,22 +1,22 @@ -/* +/* * Copyright (c) 2004-2007 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, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef OPAL_CONDITION_SPINLOCK_H @@ -102,7 +102,7 @@ static inline int opal_condition_timedwait(opal_condition_t *c, opal_progress(); gettimeofday(&tv,NULL); opal_mutex_lock(m); - } while (c->c_signaled == 0 && + } while (c->c_signaled == 0 && (tv.tv_sec <= absolute.tv_sec || (tv.tv_sec == absolute.tv_sec && tv.tv_usec < absolute.tv_usec))); } @@ -114,7 +114,7 @@ static inline int opal_condition_timedwait(opal_condition_t *c, do { opal_progress(); gettimeofday(&tv,NULL); - } while (c->c_signaled == 0 && + } while (c->c_signaled == 0 && (tv.tv_sec <= absolute.tv_sec || (tv.tv_sec == absolute.tv_sec && tv.tv_usec < absolute.tv_usec))); } diff --git a/opal/threads/mutex.c b/opal/threads/mutex.c index 70b384ffcd6..d7b78053080 100644 --- a/opal/threads/mutex.c +++ b/opal/threads/mutex.c @@ -5,18 +5,18 @@ * 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, + * 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-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/threads/mutex.h b/opal/threads/mutex.h index 231b74236b0..542cd2a9521 100644 --- a/opal/threads/mutex.h +++ b/opal/threads/mutex.h @@ -5,20 +5,20 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007 Voltaire. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -42,7 +42,7 @@ BEGIN_C_DECLS #if OMPI_ENABLE_THREAD_MULTIPLE /* * declaring this here so that CL does not complain - */ + */ OPAL_DECLSPEC extern bool opal_uses_threads; #endif diff --git a/opal/threads/mutex_unix.h b/opal/threads/mutex_unix.h index 80f6793dc24..c8cad4975f6 100644 --- a/opal/threads/mutex_unix.h +++ b/opal/threads/mutex_unix.h @@ -5,18 +5,18 @@ * 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, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/threads/thread.c b/opal/threads/thread.c index 4488c55b0ff..f74efaa9757 100644 --- a/opal/threads/thread.c +++ b/opal/threads/thread.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/threads/threads.h b/opal/threads/threads.h index dbef5489774..367315cb50f 100644 --- a/opal/threads/threads.h +++ b/opal/threads/threads.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/threads/tsd.h b/opal/threads/tsd.h index 97b026017db..e2e8eb1bcc4 100644 --- a/opal/threads/tsd.h +++ b/opal/threads/tsd.h @@ -1,13 +1,13 @@ -/* +/* * Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -67,11 +67,11 @@ typedef void* opal_tsd_key_t; * @param destructor[in] Cleanup function to call when a thread exits * * @retval OPAL_SUCCESS Success - * @retval EAGAIN The system lacked the necessary resource to + * @retval EAGAIN The system lacked the necessary resource to * create another thread specific data key * @retval ENOMEM Insufficient memory exists to create the key */ -OPAL_DECLSPEC int opal_tsd_key_create(opal_tsd_key_t *key, +OPAL_DECLSPEC int opal_tsd_key_create(opal_tsd_key_t *key, opal_tsd_destructor_t destructor); diff --git a/opal/tools/Makefile.am b/opal/tools/Makefile.am index d965b4244f9..7429d7bd71f 100644 --- a/opal/tools/Makefile.am +++ b/opal/tools/Makefile.am @@ -6,14 +6,14 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/opal/tools/opal-checkpoint/Makefile.am b/opal/tools/opal-checkpoint/Makefile.am index 38c8522d67f..7b1c884a8d9 100644 --- a/opal/tools/opal-checkpoint/Makefile.am +++ b/opal/tools/opal-checkpoint/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/tools/opal-checkpoint/help-opal-checkpoint.txt b/opal/tools/opal-checkpoint/help-opal-checkpoint.txt index e8b54779011..7f5507c743f 100644 --- a/opal/tools/opal-checkpoint/help-opal-checkpoint.txt +++ b/opal/tools/opal-checkpoint/help-opal-checkpoint.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI checkpoint tool @@ -26,7 +26,7 @@ opal-checkpoint PID %s # [invalid_pid] -Error: The PID (%d) is invalid because either you have not provided a PID +Error: The PID (%d) is invalid because either you have not provided a PID or provided an invalid PID. Please see --help for usage. # diff --git a/opal/tools/opal-checkpoint/opal-checkpoint.1in b/opal/tools/opal-checkpoint/opal-checkpoint.1in index fb4c84f78d2..d25c227ebf8 100644 --- a/opal/tools/opal-checkpoint/opal-checkpoint.1in +++ b/opal/tools/opal-checkpoint/opal-checkpoint.1in @@ -5,7 +5,7 @@ .\" Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. .\" .\" Man page for OPAL's opal-checkpoint command -.\" +.\" .\" .TH name section center-footer left-footer center-header .TH OPAL-CHECKPOINT 1 "#OPAL_DATE#" "#PACKAGE_NAME#" "#PACKAGE_VERSION#" .\" ************************** @@ -17,7 +17,7 @@ opal-checkpoint \- Checkpoint a running sequential process using the Open PAL Checkpoint/Restart Service (CRS). . .P -\fBNote\fR: This should only be used by the user if the application being +\fBNote\fR: This should only be used by the user if the application being checkpointed is an OPAL-only application. If it is an Open RTE or Open MPI program their respective tools should be used. . diff --git a/opal/tools/opal-checkpoint/opal-checkpoint.c b/opal/tools/opal-checkpoint/opal-checkpoint.c index 5376334006a..4cef950d9ce 100644 --- a/opal/tools/opal-checkpoint/opal-checkpoint.c +++ b/opal/tools/opal-checkpoint/opal-checkpoint.c @@ -6,17 +6,17 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -24,7 +24,7 @@ * @file * OPAL Checkpoint command * - * This command will initiate the checkpoint of a single + * This command will initiate the checkpoint of a single * process that has been compiled with OPAL support. */ #include "opal_config.h" @@ -76,7 +76,7 @@ static int initialize(int argc, char *argv[]); static int finalize(void); static int parse_args(int argc, char *argv[]); -static int notify_process_for_checkpoint(pid_t pid, char **fname, int term, +static int notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_type_t *state); /***************************************** @@ -96,26 +96,26 @@ typedef struct { opal_checkpoint_globals_t opal_checkpoint_globals; opal_cmd_line_init_t cmd_line_opts[] = { - { NULL, - 'h', NULL, "help", + { NULL, + 'h', NULL, "help", 0, &opal_checkpoint_globals.help, OPAL_CMD_LINE_TYPE_BOOL, "This help message" }, { NULL, - 'v', NULL, "verbose", + 'v', NULL, "verbose", 0, &opal_checkpoint_globals.verbose, OPAL_CMD_LINE_TYPE_BOOL, "Be Verbose" }, { NULL, - 'q', NULL, "quiet", + 'q', NULL, "quiet", 0, &opal_checkpoint_globals.quiet, OPAL_CMD_LINE_TYPE_BOOL, "Be Super Quiet" }, { NULL, - '\0', NULL, "term", + '\0', NULL, "term", 0, &opal_checkpoint_globals.term, OPAL_CMD_LINE_TYPE_BOOL, "Terminate the application after checkpoint" }, @@ -126,8 +126,8 @@ opal_cmd_line_init_t cmd_line_opts[] = { &opal_checkpoint_globals.snapshot_name, OPAL_CMD_LINE_TYPE_STRING, "Request a specific snapshot reference." }, - { "crs_base_snapshot_dir", - 'w', NULL, "where", + { "crs_base_snapshot_dir", + 'w', NULL, "where", 1, &opal_checkpoint_globals.snapshot_loc, OPAL_CMD_LINE_TYPE_STRING, "Where to place the checkpoint files. Note: You must remember this " @@ -227,15 +227,15 @@ static int initialize(int argc, char *argv[]) { opal_checkpoint_globals.output = 0; /* Default=STDOUT */ } - /* + /* * Disable the checkpoint notification routine for this * tool. As we will never need to checkpoint this tool. * Note: This must happen before opal_init(). */ opal_cr_set_enabled(false); - /* - * Select the 'none' CRS component, + /* + * Select the 'none' CRS component, * since we don't actually use a checkpointer */ (void) mca_base_var_env_name("crs", &tmp_env_var); @@ -278,7 +278,7 @@ static int parse_args(int argc, char *argv[]) { opal_checkpoint_globals.snapshot_name = NULL; opal_checkpoint_globals.snapshot_loc = NULL; - + /* Parse the command line options */ opal_cmd_line_create(&cmd_line, cmd_line_opts); mca_base_open(); @@ -305,9 +305,9 @@ static int parse_args(int argc, char *argv[]) { /* If we show the help message, that should be all we do */ exit(0); } - - /** - * Put all of the MCA arguments in the environment + + /** + * Put all of the MCA arguments in the environment */ mca_base_cmd_line_process_args(&cmd_line, &app_env, &global_env); @@ -360,7 +360,7 @@ static int parse_args(int argc, char *argv[]) { return OPAL_SUCCESS; } -static int +static int notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_type_t *cr_state) { char *prog_named_pipe_r = NULL, *prog_named_pipe_w = NULL; @@ -420,8 +420,8 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ break; } } - if( s == max_wait_time ) { - /* The file doesn't exist, + if( s == max_wait_time ) { + /* The file doesn't exist, * This means that the process didn't open up a named pipe for us * to access their checkpoint notification routine. Therefore, * the application either: @@ -431,9 +431,9 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ */ opal_show_help("help-opal-checkpoint.txt", "pid_does_not_exist", true, opal_checkpoint_globals.pid, prog_named_pipe_r, prog_named_pipe_w); - + *cr_state = OPAL_CRS_ERROR; - + exit_status = OPAL_ERROR; goto cleanup; } @@ -441,7 +441,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ /* The file does exist, so let's use it */ /* - * Open + * Open * - prog_named_write_pipe: * prog makes this file and opens Read Only * this app. opens it Write Only @@ -452,7 +452,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ prog_named_write_pipe_fd = open(prog_named_pipe_w, O_WRONLY); if(prog_named_write_pipe_fd < 0) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to open name pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to open name pipe (%s). %d\n", prog_named_pipe_w, prog_named_write_pipe_fd); exit_status = OPAL_ERROR; goto cleanup; @@ -473,7 +473,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ len = 0; if( sizeof(int) != (ret = write(prog_named_write_pipe_fd, &len, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write handshake to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write handshake to named pipe (%s). %d\n", prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -481,7 +481,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ if( sizeof(int) != (ret = read(prog_named_read_pipe_fd, &value, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to read length from named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to read length from named pipe (%s). %d\n", prog_named_pipe_r, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -490,7 +490,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ /* Check the response to make sure we can checkpoint this process */ if( OPAL_CHECKPOINT_CMD_IN_PROGRESS == value ) { opal_show_help("help-opal-checkpoint.txt", - "ckpt:in_progress", + "ckpt:in_progress", true, opal_checkpoint_globals.pid); exit_status = OPAL_ERROR; @@ -498,7 +498,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ } else if( OPAL_CHECKPOINT_CMD_NULL == value ) { opal_show_help("help-opal-checkpoint.txt", - "ckpt:req_null", + "ckpt:req_null", true, opal_checkpoint_globals.pid); exit_status = OPAL_ERROR; @@ -506,7 +506,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ } else if ( OPAL_CHECKPOINT_CMD_ERROR == value ) { opal_show_help("help-opal-checkpoint.txt", - "ckpt:req_error", + "ckpt:req_error", true, opal_checkpoint_globals.pid); exit_status = OPAL_ERROR; @@ -514,14 +514,14 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ } /* - * Write the checkpoint request and information to the + * Write the checkpoint request and information to the * pipe */ cmd = OPAL_CR_CHECKPOINT; /* Send the command */ if( sizeof(cmd) != (ret = write(prog_named_write_pipe_fd, &cmd, sizeof(cmd))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write CHECKPOINT Command to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write CHECKPOINT Command to named pipe (%s). %d\n", prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -530,7 +530,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ /* Send the arguments: {pid, term} */ if( sizeof(int) != (ret = write(prog_named_write_pipe_fd, &pid, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write pid (%d) to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write pid (%d) to named pipe (%s). %d\n", pid, prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -538,7 +538,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ if( sizeof(int) != (ret = write(prog_named_write_pipe_fd, &term, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write term (%d) to named pipe (%s), %d\n", + "opal_checkpoint: Error: Unable to write term (%d) to named pipe (%s), %d\n", term, prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -548,7 +548,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ len = strlen(opal_checkpoint_globals.snapshot_name) + 1; if( sizeof(int) != (ret = write(prog_named_write_pipe_fd, &len, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write snapshot name len (%d) to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write snapshot name len (%d) to named pipe (%s). %d\n", len, prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -557,7 +557,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ tmp_size = sizeof(char) * len; if( tmp_size != (ret = write(prog_named_write_pipe_fd, (opal_checkpoint_globals.snapshot_name), (sizeof(char) * len))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write snapshot name (%s) to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write snapshot name (%s) to named pipe (%s). %d\n", opal_checkpoint_globals.snapshot_name, prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -567,7 +567,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ len = strlen(opal_checkpoint_globals.snapshot_loc) + 1; if( sizeof(int) != (ret = write(prog_named_write_pipe_fd, &len, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write snapshot location len (%d) to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write snapshot location len (%d) to named pipe (%s). %d\n", len, prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -576,7 +576,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ tmp_size = sizeof(char) * len; if( tmp_size != (ret = write(prog_named_write_pipe_fd, (opal_checkpoint_globals.snapshot_loc), (sizeof(char) * len))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to write snapshot location (%s) to named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to write snapshot location (%s) to named pipe (%s). %d\n", opal_checkpoint_globals.snapshot_loc, prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -588,7 +588,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ */ if( sizeof(int) != (ret = read(prog_named_read_pipe_fd, &len, sizeof(int))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to read length from named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to read length from named pipe (%s). %d\n", prog_named_pipe_r, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -598,7 +598,7 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ loc_fname = (char *) malloc(sizeof(char) * len); if( (ssize_t)(sizeof(char) * len) != (ret = read(prog_named_read_pipe_fd, loc_fname, (sizeof(char) * len))) ) { opal_output(opal_checkpoint_globals.output, - "opal_checkpoint: Error: Unable to read filename from named pipe (%s). %d\n", + "opal_checkpoint: Error: Unable to read filename from named pipe (%s). %d\n", prog_named_pipe_w, ret); exit_status = OPAL_ERROR; goto cleanup; @@ -614,18 +614,18 @@ notify_process_for_checkpoint(pid_t pid, char **fname, int term, opal_crs_state_ goto cleanup; } - cleanup: + cleanup: /* * Close the pipes now that we are done with it */ close(prog_named_write_pipe_fd); close(prog_named_read_pipe_fd); - if( NULL != tmp_pid) + if( NULL != tmp_pid) free(tmp_pid); - if( NULL != prog_named_pipe_r) + if( NULL != prog_named_pipe_r) free(prog_named_pipe_r); - if( NULL != prog_named_pipe_w) + if( NULL != prog_named_pipe_w) free(prog_named_pipe_w); return exit_status; diff --git a/opal/tools/opal-restart/Makefile.am b/opal/tools/opal-restart/Makefile.am index 38083b01adc..9dfbb6c28c6 100644 --- a/opal/tools/opal-restart/Makefile.am +++ b/opal/tools/opal-restart/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/tools/opal-restart/help-opal-restart.txt b/opal/tools/opal-restart/help-opal-restart.txt index f9717b594bf..1f9016f4685 100644 --- a/opal/tools/opal-restart/help-opal-restart.txt +++ b/opal/tools/opal-restart/help-opal-restart.txt @@ -6,7 +6,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI checkpoint tool @@ -43,7 +43,7 @@ Error: The local checkpoint contains invalid or incomplete metadata. %s # [restart_cmd_failure] -Error: Unable to obtain the proper restart command to restart from the +Error: Unable to obtain the proper restart command to restart from the checkpoint file (%s). Returned %d. Check the installation of the %s checkpoint/restart service on all of the machines in your system. @@ -51,7 +51,7 @@ Error: Unable to obtain the proper restart command to restart from the [comp_select_failure] Error: Unable to select the %s component needed to restart this application. (Returned %d) - This likely indicates that the checkpointer needed is not + This likely indicates that the checkpointer needed is not available on this machine. You should move to a machine that has this checkpointer enabled. # diff --git a/opal/tools/opal-restart/opal-restart.1in b/opal/tools/opal-restart/opal-restart.1in index 764614f63e7..5e153638d60 100644 --- a/opal/tools/opal-restart/opal-restart.1in +++ b/opal/tools/opal-restart/opal-restart.1in @@ -5,7 +5,7 @@ .\" Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. .\" .\" Man page for OPAL's opal-restart command -.\" +.\" .\" .TH name section center-footer left-footer center-header .TH OPAL-RESTART 1 "#OPAL_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .\" ************************** @@ -17,7 +17,7 @@ opal-restart \- Restart a previously checkpointed sequential process using the Open PAL Checkpoint/Restart Service (CRS) . .P -\fBNote\fR: This should only be used by the user if the application being +\fBNote\fR: This should only be used by the user if the application being restarted is an OPAL-only application. If it is an Open RTE or Open MPI program their respective tools should be used. . diff --git a/opal/tools/opal-restart/opal-restart.c b/opal/tools/opal-restart/opal-restart.c index 5998935118e..cb8374b01ca 100644 --- a/opal/tools/opal-restart/opal-restart.c +++ b/opal/tools/opal-restart/opal-restart.c @@ -6,20 +6,20 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2007 Evergrid, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Hochschule Esslingen. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,8 +27,8 @@ * @file * OPAL Restart command * - * This command will restart a single process from - * the checkpoint generated by the opal-checkpoint + * This command will restart a single process from + * the checkpoint generated by the opal-checkpoint * command. */ #include "opal_config.h" @@ -103,13 +103,13 @@ opal_restart_globals_t opal_restart_globals; opal_cmd_line_init_t cmd_line_opts[] = { { NULL, - 'h', NULL, "help", + 'h', NULL, "help", 0, &opal_restart_globals.help, OPAL_CMD_LINE_TYPE_BOOL, "This help message" }, { NULL, - 'v', NULL, "verbose", + 'v', NULL, "verbose", 0, &opal_restart_globals.verbose, OPAL_CMD_LINE_TYPE_BOOL, "Be Verbose" }, @@ -152,7 +152,7 @@ opal_cmd_line_init_t cmd_line_opts[] = { /* End of list */ { NULL, - '\0', NULL, NULL, + '\0', NULL, NULL, 0, NULL, OPAL_CMD_LINE_TYPE_NULL, NULL } @@ -176,8 +176,8 @@ main(int argc, char *argv[]) exit_status = ret; goto cleanup; } - - /* + + /* * Check for existence of the file, or program in the case of self */ if( OPAL_SUCCESS != (ret = check_file() )) { @@ -237,7 +237,7 @@ main(int argc, char *argv[]) fclose(metadata); metadata = NULL; } - + opal_output_verbose(10, opal_restart_globals.output, "Restart Expects checkpointer: (%s)", expected_crs_comp); @@ -248,11 +248,11 @@ main(int argc, char *argv[]) true, &environ); free(tmp_env_var); tmp_env_var = NULL; - + /* Select this component or don't continue. - * If the selection of this component fails, then we can't + * If the selection of this component fails, then we can't * restart on this node because it doesn't have the proper checkpointer - * available. + * available. */ if( OPAL_SUCCESS != (ret = opal_crs_base_open(MCA_BASE_OPEN_DEFAULT)) ) { opal_show_help("help-opal-restart.txt", "comp_select_failure", true, @@ -267,17 +267,17 @@ main(int argc, char *argv[]) exit_status = ret; goto cleanup; } - + /* * Make sure we have selected the proper component */ if(NULL == expected_crs_comp || - 0 != strncmp(expected_crs_comp, - opal_crs_base_selected_component.base_version.mca_component_name, + 0 != strncmp(expected_crs_comp, + opal_crs_base_selected_component.base_version.mca_component_name, strlen(expected_crs_comp)) ) { - opal_show_help("help-opal-restart.txt", "comp_select_mismatch", + opal_show_help("help-opal-restart.txt", "comp_select_mismatch", true, - expected_crs_comp, + expected_crs_comp, opal_crs_base_selected_component.base_version.mca_component_name, ret); exit_status = ret; @@ -314,7 +314,7 @@ main(int argc, char *argv[]) /* * Do the actual restart */ - ret = opal_crs.crs_restart(snapshot, + ret = opal_crs.crs_restart(snapshot, false, &child_pid); @@ -374,7 +374,7 @@ static int initialize(int argc, char *argv[]) opal_restart_globals.output = 0; /* Default=STDOUT */ } - /* + /* * Turn off the selection of the CRS component, * we need to do that later */ @@ -519,7 +519,7 @@ static int parse_args(int argc, char *argv[]) /* Parse the command line options */ opal_cmd_line_create(&cmd_line, cmd_line_opts); - + mca_base_open(); mca_base_cmd_line_setup(&cmd_line); ret = opal_cmd_line_parse(&cmd_line, false, argc, argv); @@ -543,12 +543,12 @@ static int parse_args(int argc, char *argv[]) /* If we show the help message, that should be all we do */ exit(0); } - - /** - * Put all of the MCA arguments in the environment + + /** + * Put all of the MCA arguments in the environment */ mca_base_cmd_line_process_args(&cmd_line, &app_env, &global_env); - + len = opal_argv_count(app_env); for(i = 0; i < len; ++i) { putenv(app_env[i]); @@ -565,7 +565,7 @@ static int parse_args(int argc, char *argv[]) /* get the remaining bits */ opal_cmd_line_get_tail(&cmd_line, &argc, &argv); - if ( NULL == opal_restart_globals.snapshot_ref || + if ( NULL == opal_restart_globals.snapshot_ref || 0 >= strlen(opal_restart_globals.snapshot_ref) ) { opal_show_help("help-opal-restart.txt", "invalid_filename", true, ""); @@ -595,7 +595,7 @@ static int check_file(void) exit_status = OPAL_ERROR; goto cleanup; } - + /* * Check for the existance of the snapshot handle in the snapshot directory */ @@ -639,7 +639,7 @@ static int post_env_vars(int prev_pid, opal_crs_base_snapshot_t *snapshot) } /* - * This is needed so we can pass the previous environment to the restarted + * This is needed so we can pass the previous environment to the restarted * application process. */ asprintf(&proc_file, "%s/%s-%d", opal_tmp_directory(), OPAL_CR_BASE_ENV_NAME, prev_pid); diff --git a/opal/tools/wrappers/Makefile.am b/opal/tools/wrappers/Makefile.am index 60d1feb24aa..53850b28bb7 100644 --- a/opal/tools/wrappers/Makefile.am +++ b/opal/tools/wrappers/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2006 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -14,9 +14,9 @@ # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/opal/tools/wrappers/generic_wrapper.1in b/opal/tools/wrappers/generic_wrapper.1in index 4815d9b4ceb..27adaa4a10f 100644 --- a/opal/tools/wrappers/generic_wrapper.1in +++ b/opal/tools/wrappers/generic_wrapper.1in @@ -10,11 +10,11 @@ . .SH OPTIONS .TP ---showme +--showme This option comes in several different variants (see below). None of the variants invokes the underlying compiler; they all provide information on how the underlying compiler would have been invoked had -.I --showme +.I --showme not been used. The basic .I --showme @@ -132,7 +132,7 @@ underlying Fortran compiler, .IR -qfixed may be necessary to compile fixed-format Fortran source files. . -.PP +.PP Finally, note that .I mpifort will be inoperative and will return an error on use if Fortran support @@ -210,11 +210,11 @@ line. . . .SH ENVIRONMENT VARIABLES -.PP +.PP By default, the wrappers use the compilers that were selected when #PROJECT# was configured. These compilers were either found automatically by Open MPI's "configure" script, or were selected by -the user in the CC, CXX, F77, and/or FC environment variables +the user in the CC, CXX, F77, and/or FC environment variables before "configure" was invoked. Additionally, other arguments specific to the compiler may have been selected by configure. . diff --git a/opal/tools/wrappers/help-opal-wrapper.txt b/opal/tools/wrappers/help-opal-wrapper.txt index ab2302f8287..3302f14c099 100644 --- a/opal/tools/wrappers/help-opal-wrapper.txt +++ b/opal/tools/wrappers/help-opal-wrapper.txt @@ -6,16 +6,16 @@ # 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, +# 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) 2006-2010 Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI wrapper compiler error diff --git a/opal/tools/wrappers/opal.pc.in b/opal/tools/wrappers/opal.pc.in index 878fdc1e474..71ef80da03a 100644 --- a/opal/tools/wrappers/opal.pc.in +++ b/opal/tools/wrappers/opal.pc.in @@ -14,7 +14,7 @@ libdir=@libdir@ # (they're pulled in via libopen-pal.so's implicit dependencies), so # list them in Libs.private. # -Libs: -L${libdir} @OPAL_WRAPPER_EXTRA_LDFLAGS@ -lopen-pal +Libs: -L${libdir} @OPAL_WRAPPER_EXTRA_LDFLAGS@ -lopen-pal Libs.private: @OPAL_WRAPPER_EXTRA_LIBS@ # # It is safe to hard-wire the -I before the EXTRA_INCLUDES because we diff --git a/opal/tools/wrappers/opal_wrapper.1in b/opal/tools/wrappers/opal_wrapper.1in index fcfdd929919..2ae351a0ec9 100644 --- a/opal/tools/wrappers/opal_wrapper.1in +++ b/opal/tools/wrappers/opal_wrapper.1in @@ -15,7 +15,7 @@ invoked as the back-end by the Open MPI wrapper commands such as: .BR mpiCC , .BR mpic++ , and -.BR mpifort +.BR mpifort (and its legacy/deprecated names .BR mpif77 and @@ -26,9 +26,9 @@ and/or have renamed the wrapper compilers listed above to avoid executable name conflicts with other MPI implementations. Hence, you may also have wrapper compilers installed including the following names: -.BR mpifort.openmpi +.BR mpifort.openmpi (and the legacy/deprecated names -.BR mpif90.openmpi +.BR mpif90.openmpi and .BR mpif77.openmpi ), .BR mpicxx.openmpi , @@ -68,7 +68,7 @@ and the website at .\" Authors Section .\" ************************** .SH AUTHORS -The Open MPI maintainers -- see +The Open MPI maintainers -- see .I http://www.openmpi.org/ or the file .IR AUTHORS . diff --git a/opal/tools/wrappers/opal_wrapper.c b/opal/tools/wrappers/opal_wrapper.c index 9a4de55fc57..075e4d367ca 100644 --- a/opal/tools/wrappers/opal_wrapper.c +++ b/opal/tools/wrappers/opal_wrapper.c @@ -5,18 +5,18 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -255,7 +255,7 @@ data_callback(const char *key, const char *value) if (NULL != value) options_data[parse_options_idx].version = strdup(value); } else if (0 == strcmp(key, "preprocessor_flags")) { char **values = opal_argv_split(value, ' '); - opal_argv_insert(&options_data[parse_options_idx].preproc_flags, + opal_argv_insert(&options_data[parse_options_idx].preproc_flags, opal_argv_count(options_data[parse_options_idx].preproc_flags), values); expand_flags(options_data[parse_options_idx].preproc_flags); @@ -312,18 +312,18 @@ data_callback(const char *key, const char *value) if (0 != strcmp(options_data[parse_options_idx].path_includedir, "/usr/include") || 0 == strncmp(options_data[parse_options_idx].language, "Fortran", strlen("Fortran"))) { char *line; - asprintf(&line, OPAL_INCLUDE_FLAG"%s", + asprintf(&line, OPAL_INCLUDE_FLAG"%s", options_data[parse_options_idx].path_includedir); opal_argv_append_nosize(&options_data[parse_options_idx].preproc_flags, line); free(line); } } } else if (0 == strcmp(key, "libdir")) { - if (NULL != value) options_data[parse_options_idx].path_libdir = + if (NULL != value) options_data[parse_options_idx].path_libdir = opal_install_dirs_expand(value); if (0 != strcmp(options_data[parse_options_idx].path_libdir, "/usr/lib")) { char *line; - asprintf(&line, OPAL_LIBDIR_FLAG"%s", + asprintf(&line, OPAL_LIBDIR_FLAG"%s", options_data[parse_options_idx].path_libdir); opal_argv_append_nosize(&options_data[parse_options_idx].link_flags, line); free(line); @@ -333,13 +333,13 @@ data_callback(const char *key, const char *value) static int -data_init(const char *appname) +data_init(const char *appname) { int ret; char *datafile; /* now load the data */ - asprintf(&datafile, "%s%s%s-wrapper-data.txt", + asprintf(&datafile, "%s%s%s-wrapper-data.txt", opal_install_dirs.opaldatadir, OPAL_PATH_SEP, appname); if (NULL == datafile) return OPAL_ERR_TEMP_OUT_OF_RESOURCE; @@ -401,7 +401,7 @@ load_env_data(const char *project, const char *flag, char **data) free(envname); return; } - } + } free(envname); if (NULL != *data) free(*data); @@ -425,7 +425,7 @@ load_env_data_argv(const char *project, const char *flag, char ***data) free(envname); return; } - } + } free(envname); if (NULL != *data) opal_argv_free(*data); @@ -514,7 +514,7 @@ main(int argc, char *argv[]) * Sanity Checks * ****************************************************/ - + if (NULL != options_data[user_data_idx].req_file) { /* make sure the language is supported */ if (0 == strcmp(options_data[user_data_idx].req_file, "not supported")) { @@ -598,9 +598,9 @@ main(int argc, char *argv[]) } else if (0 == strncmp(user_argv[i], "-showme:help", strlen("-showme:help")) || 0 == strncmp(user_argv[i], "--showme:help", strlen("--showme:help"))) { char *str; - str = opal_show_help_string("help-opal-wrapper.txt", "usage", + str = opal_show_help_string("help-opal-wrapper.txt", "usage", false, argv[0], - options_data[user_data_idx].project, + options_data[user_data_idx].project, NULL); if (NULL != str) { printf("%s", str); @@ -632,7 +632,7 @@ main(int argc, char *argv[]) } else if (0 == strcmp(user_argv[i], "-c")) { flags &= ~COMP_WANT_LINK; real_flag = true; - } else if (0 == strcmp(user_argv[i], "-E") || + } else if (0 == strcmp(user_argv[i], "-E") || 0 == strcmp(user_argv[i], "-M")) { flags &= ~(COMP_WANT_COMPILE | COMP_WANT_LINK); real_flag = true; @@ -686,7 +686,7 @@ main(int argc, char *argv[]) disable_flags = false; flags |= COMP_SHOW_ERROR; real_flag = true; - } else { + } else { /* if the option flag is one that we use to determine which set of compiler data to use, don't count it as a real option */ @@ -739,7 +739,7 @@ main(int argc, char *argv[]) exec_argc = 0; } - /* This error would normally not happen unless the user edits the + /* This error would normally not happen unless the user edits the wrapper data files manually */ if (NULL == exec_argv) { opal_show_help("help-opal-wrapper.txt", "no-compiler-specified", true); diff --git a/opal/util/alfg.c b/opal/util/alfg.c index 75dc489c4f9..fc13f901f9a 100644 --- a/opal/util/alfg.c +++ b/opal/util/alfg.c @@ -2,9 +2,9 @@ * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -12,35 +12,35 @@ #include "alfg.h" -/* Mask corresponding to the primitive polynomial - *--------------------------------------------------- - * +/* Mask corresponding to the primitive polynomial + *--------------------------------------------------- + * * p(x) = 1 + x^25 + x^27 + x^29 + x^30 + x^31 + x^32 * - *--------------------------------------------------- - */ + *--------------------------------------------------- + */ #define MASK 0x80000057U /* Additive lagged Fibonacci parameters: - *--------------------------------------------------- + *--------------------------------------------------- * * x_n = (x_(n - TAP1) + x_(n - TAP2) ) mod M * - *--------------------------------------------------- - */ + *--------------------------------------------------- + */ #define TAP1 127 #define TAP2 97 #define CBIT 21 /* Canonical bit */ -/** +/** * @brief Galois shift register: Used to seed the ALFG's * canonical rectangle - * - * @param[in] unsigned int *seed: used to seed the Galois register - * @param[out] uint32_t lsb: least significant bit of the Galois - * register after shift - */ + * + * @param[in] unsigned int *seed: used to seed the Galois register + * @param[out] uint32_t lsb: least significant bit of the Galois + * register after shift + */ static uint32_t galois(unsigned int *seed){ uint32_t lsb; @@ -52,9 +52,9 @@ static uint32_t galois(unsigned int *seed){ return lsb; } -/** +/** * @brief Routine to seed the ALFG register - * + * * @param[in] uint32_t seed * @param[out] opal_rng_buff_t *buff: handle to ALFG buffer state */ @@ -80,17 +80,17 @@ int opal_srand(opal_rng_buff_t *buff, uint32_t seed) { buff->alfg[j] = buff->alfg[j] ^ ((galois(&seed_cpy))< opal_argv_count(argv)) { return strdup(""); } - + /* Find the total string length in argv including delimiters. The last delimiter is replaced by the NULL character. */ - + for (p = &argv[start], i=start; *p && i < end; ++p, ++i) { str_len += strlen(*p) + 1; } - + /* Allocate the string. */ - + if (NULL == (str = (char*) malloc(str_len))) return NULL; - + /* Loop filling in the string. */ - + str[--str_len] = '\0'; p = &argv[start]; pp = *p; - + for (i = 0; i < str_len; ++i) { if ('\0' == *pp) { - + /* End of a string, fill in a delimiter and go to the next string. */ - + str[i] = (char) delimiter; ++p; pp = *p; @@ -377,9 +377,9 @@ char *opal_argv_join_range(char **argv, size_t start, size_t end, int delimiter) str[i] = *pp++; } } - + /* All done */ - + return str; } @@ -495,7 +495,7 @@ int opal_argv_insert(char ***target, int start, char **source) int suffix_count; /* Check for the bozo cases */ - + if (NULL == target || NULL == *target || start < 0) { return OPAL_ERR_BAD_PARAM; } else if (NULL == source) { @@ -518,7 +518,7 @@ int opal_argv_insert(char ***target, int start, char **source) /* Alloc out new space */ - *target = (char**) realloc(*target, + *target = (char**) realloc(*target, sizeof(char *) * (target_count + source_count + 1)); /* Move suffix items down to the end */ @@ -546,26 +546,26 @@ int opal_argv_insert_element(char ***target, int location, char *source) { int i, target_count; int suffix_count; - + /* Check for the bozo cases */ - + if (NULL == target || NULL == *target || location < 0) { return OPAL_ERR_BAD_PARAM; } else if (NULL == source) { return OPAL_SUCCESS; } - + /* Easy case: appending to the end */ target_count = opal_argv_count(*target); if (location > target_count) { opal_argv_append(&target_count, target, source); return OPAL_SUCCESS; } - + /* Alloc out new space */ - *target = (char**) realloc(*target, + *target = (char**) realloc(*target, sizeof(char*) * (target_count + 2)); - + /* Move suffix items down to the end */ suffix_count = target_count - location; for (i = suffix_count - 1; i >= 0; --i) { @@ -573,10 +573,10 @@ int opal_argv_insert_element(char ***target, int location, char *source) (*target)[location + i]; } (*target)[location + suffix_count + 1] = NULL; - + /* Strdup in the source */ (*target)[location] = strdup(source); - + /* All done */ return OPAL_SUCCESS; } diff --git a/opal/util/argv.h b/opal/util/argv.h index 8c6973447a1..3dd9b4e202b 100644 --- a/opal/util/argv.h +++ b/opal/util/argv.h @@ -5,19 +5,19 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 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 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2007 Voltaire. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -128,9 +128,9 @@ OPAL_DECLSPEC int opal_argv_append_unique_nosize(char ***argv, const char *arg, * array. */ OPAL_DECLSPEC void opal_argv_free(char **argv); - + /** - * Split a string into a NULL-terminated argv array. Do not include empty + * Split a string into a NULL-terminated argv array. Do not include empty * strings in result array. * * @param src_string Input string. @@ -147,7 +147,7 @@ OPAL_DECLSPEC void opal_argv_free(char **argv); OPAL_DECLSPEC char **opal_argv_split(const char *src_string, int delimiter) __opal_attribute_malloc__ __opal_attribute_warn_unused_result__; /** - * Split a string into a NULL-terminated argv array. Include empty + * Split a string into a NULL-terminated argv array. Include empty * strings in result array. * * @param src_string Input string. @@ -245,7 +245,7 @@ OPAL_DECLSPEC char **opal_argv_copy(char **argv) __opal_attribute_malloc__ __op * free()ed (it is assumed that the argv "owns" the memory that * the pointer points to). */ -OPAL_DECLSPEC int opal_argv_delete(int *argc, char ***argv, +OPAL_DECLSPEC int opal_argv_delete(int *argc, char ***argv, int start, int num_to_delete); /** diff --git a/opal/util/basename.c b/opal/util/basename.c index cd43cbb2529..1558f4554f4 100644 --- a/opal/util/basename.c +++ b/opal/util/basename.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/basename.h b/opal/util/basename.h index 23476fe97fa..5d0cf04b6e5 100644 --- a/opal/util/basename.h +++ b/opal/util/basename.h @@ -5,18 +5,18 @@ * 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, + * 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 * * Returns an OS-independant basename() of a given filename. @@ -47,7 +47,7 @@ BEGIN_C_DECLS * Windows-based operating systems. For example: * * foo.txt returns "foo.txt" - * + * * /foo/bar/baz returns "baz" * * /yow.c returns "yow.c" @@ -86,7 +86,7 @@ OPAL_DECLSPEC char *opal_basename(const char* filename) __opal_attribute_malloc_ * Windows-based operating systems. For example: * * foo.txt returns "foo.txt" - * + * * /foo/bar/baz returns "/foo/bar" * * /yow.c returns "/" diff --git a/opal/util/bit_ops.h b/opal/util/bit_ops.h index e08a91fe0d1..34ea4418abf 100644 --- a/opal/util/bit_ops.h +++ b/opal/util/bit_ops.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2011 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2011 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$ */ @@ -62,7 +62,7 @@ static inline int opal_hibit(int value, int start) } } #endif - + return start; } @@ -82,7 +82,7 @@ static inline int opal_hibit(int value, int start) * Using __builtin_clz (count-leading-zeros) uses 3 cycles instead of 50 cycles * compared to the loop-version (on Intel Nehalem -- with icc-12.1.0 -O2). */ -static inline int opal_cube_dim(int value) +static inline int opal_cube_dim(int value) { int dim, size; @@ -91,7 +91,7 @@ static inline int opal_cube_dim(int value) return 0; } size = 8 * sizeof(int); - dim = size - __builtin_clz(value-1); + dim = size - __builtin_clz(value-1); #else for (dim = 0, size = 1; size < value; ++dim, size <<= 1) /* empty */; #endif diff --git a/opal/util/cmd_line.c b/opal/util/cmd_line.c index 3cb205953b9..cc1e99e0f88 100644 --- a/opal/util/cmd_line.c +++ b/opal/util/cmd_line.c @@ -5,19 +5,19 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012 Los Alamos National Security, LLC. + * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -130,10 +130,10 @@ static char special_empty_token[] = { static int make_opt(opal_cmd_line_t *cmd, opal_cmd_line_init_t *e); static void free_parse_results(opal_cmd_line_t *cmd); static int split_shorts(opal_cmd_line_t *cmd, - char *token, char **args, - int *output_argc, char ***output_argv, + char *token, char **args, + int *output_argc, char ***output_argv, int *num_args_used, bool ignore_unknown); -static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, +static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, const char *option_name) __opal_attribute_nonnull__(1) __opal_attribute_nonnull__(2); static int set_dest(cmd_line_option_t *option, char *sval); static void fill(const cmd_line_option_t *a, char result[3][BUFSIZ]); @@ -204,8 +204,8 @@ int opal_cmd_line_make_opt_mca(opal_cmd_line_t *cmd, /* * Create a command line option, --long-name and/or -s (short name). */ -int opal_cmd_line_make_opt3(opal_cmd_line_t *cmd, char short_name, - const char *sd_name, const char *long_name, +int opal_cmd_line_make_opt3(opal_cmd_line_t *cmd, char short_name, + const char *sd_name, const char *long_name, int num_params, const char *desc) { opal_cmd_line_init_t e; @@ -290,7 +290,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, if (0 == strcmp(cmd->lcl_argv[i], "--")) { ++i; while (i < cmd->lcl_argc) { - opal_argv_append(&cmd->lcl_tail_argc, &cmd->lcl_tail_argv, + opal_argv_append(&cmd->lcl_tail_argc, &cmd->lcl_tail_argv, cmd->lcl_argv[i]); ++i; } @@ -328,9 +328,9 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, if (NULL == option) { shortsv = NULL; shortsc = 0; - ret = split_shorts(cmd, cmd->lcl_argv[i] + 1, + ret = split_shorts(cmd, cmd->lcl_argv[i] + 1, &(cmd->lcl_argv[i + 1]), - &shortsc, &shortsv, + &shortsc, &shortsv, &num_args_used, ignore_unknown); if (OPAL_SUCCESS == ret) { option = find_option(cmd, shortsv[0] + 1); @@ -401,7 +401,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, printed_error = true; goto error; } else { - if (0 == strcmp(cmd->lcl_argv[i], + if (0 == strcmp(cmd->lcl_argv[i], special_empty_token)) { fprintf(stderr, "%s: Error: option \"%s\" did not " "have enough parameters (%d)\n", @@ -418,7 +418,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, OBJ_RELEASE(param); printed_error = true; goto error; - } + } /* Otherwise, save this parameter */ @@ -426,7 +426,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, /* Save in the argv on the param entry */ opal_argv_append(¶m->clp_argc, - ¶m->clp_argv, + ¶m->clp_argv, cmd->lcl_argv[i]); /* If it's the first, save it in the @@ -469,7 +469,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, an error and return. */ if (is_unknown_option || is_unknown_token) { if (!ignore_unknown || is_unknown_option) { - fprintf(stderr, "%s: Error: unknown option \"%s\"\n", + fprintf(stderr, "%s: Error: unknown option \"%s\"\n", cmd->lcl_argv[0], cmd->lcl_argv[i]); printed_error = true; if (have_help_option) { @@ -479,7 +479,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, } error: while (i < cmd->lcl_argc) { - opal_argv_append(&cmd->lcl_tail_argc, &cmd->lcl_tail_argv, + opal_argv_append(&cmd->lcl_tail_argc, &cmd->lcl_tail_argv, cmd->lcl_argv[i]); ++i; } @@ -527,13 +527,13 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) /* First, take the original list and sort it */ - sorted = (cmd_line_option_t**)malloc(sizeof(cmd_line_option_t *) * + sorted = (cmd_line_option_t**)malloc(sizeof(cmd_line_option_t *) * opal_list_get_size(&cmd->lcl_options)); if (NULL == sorted) { opal_mutex_unlock(&cmd->lcl_mutex); return NULL; } - for (i = 0, item = opal_list_get_first(&cmd->lcl_options); + for (i = 0, item = opal_list_get_first(&cmd->lcl_options); opal_list_get_end(&cmd->lcl_options) != item; ++i, item = opal_list_get_next(item)) { sorted[i] = (cmd_line_option_t *) item; @@ -546,7 +546,7 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) option = sorted[j]; if (NULL != option->clo_description) { bool filled = false; - + /* Build up the output line */ memset(line, 0, sizeof(line)); @@ -645,7 +645,7 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) line's worth and add it to the array. Then reset and loop around to get the next line's worth. */ - for (ptr = start + (MAX_WIDTH - PARAM_WIDTH); + for (ptr = start + (MAX_WIDTH - PARAM_WIDTH); ptr > start; --ptr) { if (isspace(*ptr)) { *ptr = '\0'; @@ -664,14 +664,14 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) and break there. */ if (ptr == start) { - for (ptr = start + (MAX_WIDTH - PARAM_WIDTH); + for (ptr = start + (MAX_WIDTH - PARAM_WIDTH); ptr < start + len; ++ptr) { if (isspace(*ptr)) { *ptr = '\0'; strncat(line, start, sizeof(line) - 1); opal_argv_append(&argc, &argv, line); - + start = ptr + 1; memset(line, ' ', PARAM_WIDTH); line[PARAM_WIDTH] = '\0'; @@ -737,7 +737,7 @@ int opal_cmd_line_get_ninsts(opal_cmd_line_t *cmd, const char *opt) ret = 0; option = find_option(cmd, opt); if (NULL != option) { - for (item = opal_list_get_first(&cmd->lcl_params); + for (item = opal_list_get_first(&cmd->lcl_params); opal_list_get_end(&cmd->lcl_params) != item; item = opal_list_get_next(item)) { param = (cmd_line_param_t *) item; @@ -761,7 +761,7 @@ int opal_cmd_line_get_ninsts(opal_cmd_line_t *cmd, const char *opt) * Return a specific parameter for a specific instance of a option * from the parsed command line. */ -char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, const char *opt, int inst, +char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, const char *opt, int inst, int idx) { int num_found; @@ -784,7 +784,7 @@ char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, const char *opt, int inst, parameter index greater than we will have */ if (idx < option->clo_num_params) { - for (item = opal_list_get_first(&cmd->lcl_params); + for (item = opal_list_get_first(&cmd->lcl_params); opal_list_get_end(&cmd->lcl_params) != item; item = opal_list_get_next(item)) { param = (cmd_line_param_t *) item; @@ -798,11 +798,11 @@ char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, const char *opt, int inst, } } } - + /* Thread serialization */ - + opal_mutex_unlock(&cmd->lcl_mutex); - + /* All done */ return NULL; @@ -957,8 +957,8 @@ static int make_opt(opal_cmd_line_t *cmd, opal_cmd_line_init_t *e) if (NULL == cmd) { return OPAL_ERR_BAD_PARAM; - } else if ('\0' == e->ocl_cmd_short_name && - NULL == e->ocl_cmd_single_dash_name && + } else if ('\0' == e->ocl_cmd_short_name && + NULL == e->ocl_cmd_single_dash_name && NULL == e->ocl_cmd_long_name) { return OPAL_ERR_BAD_PARAM; } else if (e->ocl_num_params < 0) { @@ -1011,7 +1011,7 @@ static void free_parse_results(opal_cmd_line_t *cmd) itself; it was not allocated from the heap) */ for (item = opal_list_remove_first(&cmd->lcl_params); - NULL != item; + NULL != item; item = opal_list_remove_first(&cmd->lcl_params)) { OBJ_RELEASE(item); } @@ -1038,8 +1038,8 @@ static void free_parse_results(opal_cmd_line_t *cmd) * short name). Ensure to differentiate the resulting options from * "single dash" names. */ -static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, - int *output_argc, char ***output_argv, +static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, + int *output_argc, char ***output_argv, int *num_args_used, bool ignore_unknown) { int i, j, len; @@ -1076,7 +1076,7 @@ static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, } else { opal_argv_append(output_argc, output_argv, fake_token); } - } + } /* If we do find the option, copy it and all of its parameters to the output args. If we run out of paramters (i.e., no @@ -1091,7 +1091,7 @@ static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, args[*num_args_used]); ++(*num_args_used); } else { - opal_argv_append(output_argc, output_argv, + opal_argv_append(output_argc, output_argv, special_empty_token); } } @@ -1104,7 +1104,7 @@ static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, } -static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, +static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, const char *option_name) { opal_list_item_t *item; @@ -1129,7 +1129,7 @@ static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, } /* Not found */ - + return NULL; } @@ -1150,7 +1150,7 @@ static int set_dest(cmd_line_option_t *option, char *sval) registered table alone and set an environment variable with the desired value. The environment variable will get picked up during a nromal parameter lookup, and all will be well. */ - + if (NULL != option->clo_mca_param_env_var) { switch(option->clo_type) { case OPAL_CMD_LINE_TYPE_STRING: diff --git a/opal/util/cmd_line.h b/opal/util/cmd_line.h index 0a47c88e0cf..24827dff010 100644 --- a/opal/util/cmd_line.h +++ b/opal/util/cmd_line.h @@ -5,20 +5,20 @@ * 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, + * 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) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** - * @file + * @file * * General command line parsing facility for use throughout Open MPI. * @@ -41,7 +41,7 @@ * sparingly. * * The "long" name is a multi-character name that is found after a - * pair of dashes. For example, "--some-option-name". + * pair of dashes. For example, "--some-option-name". * * A command line option is a combination of 1 or more of a short * name, single dash name, and a long name. Any of the names may be @@ -126,21 +126,21 @@ BEGIN_C_DECLS struct opal_cmd_line_t { /** Make this an OBJ handle */ opal_object_t super; - + /** Thread safety */ opal_mutex_t lcl_mutex; - + /** List of cmd_line_option_t's (defined internally) */ opal_list_t lcl_options; - + /** Duplicate of argc from opal_cmd_line_parse() */ int lcl_argc; /** Duplicate of argv from opal_cmd_line_parse() */ char **lcl_argv; - + /** Parsed output; list of cmd_line_param_t's (defined internally) */ opal_list_t lcl_params; - + /** List of tail (unprocessed) arguments */ int lcl_tail_argc; /** List of tail (unprocessed) arguments */ @@ -210,7 +210,7 @@ BEGIN_C_DECLS * Convenience typedef */ typedef struct opal_cmd_line_init_t opal_cmd_line_init_t; - + /** * Top-level command line handle. * @@ -251,7 +251,7 @@ BEGIN_C_DECLS * * \code * opal_cmd_line_init_t cmd_line_init[] = { - * { NULL, NULL, NULL, 'h', NULL, "help", 0, + * { NULL, NULL, NULL, 'h', NULL, "help", 0, * &orterun_globals.help, OPAL_CMD_LINE_TYPE_BOOL, * "This help message" }, * @@ -307,11 +307,11 @@ BEGIN_C_DECLS * used to generate the output from opal_cmd_line_get_usage_msg(). * */ - OPAL_DECLSPEC int opal_cmd_line_make_opt3(opal_cmd_line_t *cmd, - char short_name, + OPAL_DECLSPEC int opal_cmd_line_make_opt3(opal_cmd_line_t *cmd, + char short_name, const char *sd_name, - const char *long_name, - int num_params, + const char *long_name, + int num_params, const char *desc); /** @@ -352,7 +352,7 @@ BEGIN_C_DECLS * example, if "--fo" is specified, and no "fo" option is * registered (e.g., perhaps the user meant to type "--foo"), an * error message is always printed, UNLESS this unknown token - * happens after a "--" token (see below). + * happens after a "--" token (see below). * * The contents of argc and argv are not changed during parsing. * argv[0] is assumed to be the executable name, and is ignored during @@ -401,7 +401,7 @@ BEGIN_C_DECLS * different sets of argv tokens is safe, but will erase any * previous parsing results. */ - OPAL_DECLSPEC int opal_cmd_line_parse(opal_cmd_line_t *cmd, + OPAL_DECLSPEC int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, int argc, char **argv); @@ -441,13 +441,13 @@ BEGIN_C_DECLS * opal_cmd_line_parse(), or opal_cmd_line_parse() was not invoked on * this handle. * - * This function should only be called after opal_cmd_line_parse(). + * This function should only be called after opal_cmd_line_parse(). * * The function will return true if the option matching opt was found * (either by its short or long name) during token parsing. * Otherwise, it will return false. */ - OPAL_DECLSPEC bool opal_cmd_line_is_taken(opal_cmd_line_t *cmd, + OPAL_DECLSPEC bool opal_cmd_line_is_taken(opal_cmd_line_t *cmd, const char *opt) __opal_attribute_nonnull__(1) __opal_attribute_nonnull__(2); /** @@ -480,7 +480,7 @@ BEGIN_C_DECLS * What is returned is a pointer to the actual string that is on * the handle; it should not be modified or freed. */ - OPAL_DECLSPEC char *opal_cmd_line_get_argv(opal_cmd_line_t *cmd, + OPAL_DECLSPEC char *opal_cmd_line_get_argv(opal_cmd_line_t *cmd, int index); /** @@ -503,7 +503,7 @@ BEGIN_C_DECLS * either the option was not specified as part of the OPAL command line * handle, or opal_cmd_line_parse() was not invoked on this handle. */ - OPAL_DECLSPEC int opal_cmd_line_get_ninsts(opal_cmd_line_t *cmd, + OPAL_DECLSPEC int opal_cmd_line_get_ninsts(opal_cmd_line_t *cmd, const char *opt) __opal_attribute_nonnull__(1) __opal_attribute_nonnull__(2); /** @@ -518,7 +518,7 @@ BEGIN_C_DECLS * @retval param String of the parameter. * @retval NULL If any of the input values are invalid. * - * This function should only be called after opal_cmd_line_parse(). + * This function should only be called after opal_cmd_line_parse(). * * This function returns the Nth parameter for the Ith instance of a * given option on the parsed command line (both N and I are @@ -533,8 +533,8 @@ BEGIN_C_DECLS * The returned string should \em not be modified or freed by the * caller. */ - OPAL_DECLSPEC char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, - const char *opt, + OPAL_DECLSPEC char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, + const char *opt, int instance_num, int param_num); @@ -565,7 +565,7 @@ BEGIN_C_DECLS * of the tail parameters, and must be freed (likely with a call * to opal_argv_free()) by the caller. */ - OPAL_DECLSPEC int opal_cmd_line_get_tail(opal_cmd_line_t *cmd, int *tailc, + OPAL_DECLSPEC int opal_cmd_line_get_tail(opal_cmd_line_t *cmd, int *tailc, char ***tailv) __opal_attribute_nonnull__(1) __opal_attribute_nonnull__(2); END_C_DECLS diff --git a/opal/util/crc.c b/opal/util/crc.c index 30cf285cc29..d74d434fe89 100644 --- a/opal/util/crc.c +++ b/opal/util/crc.c @@ -309,7 +309,7 @@ opal_bcopy_csum_partial ( memcpy(((char *)&temp + *lastPartialLength), src, (sizeof(unsigned long) - *lastPartialLength)); /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... + * word from the new one before adding to the checksum... */ csum += (temp - *lastPartialLong); copylen -= sizeof(unsigned long) - *lastPartialLength; @@ -1094,10 +1094,10 @@ void opal_initialize_crc_table(void) } unsigned int opal_bcopy_uicrc_partial( - const void * source, + const void * source, void * destination, - size_t copylen, - size_t crclen, + size_t copylen, + size_t crclen, unsigned int partial_crc) { size_t crclenresidue = (crclen > copylen) ? (crclen - copylen) : 0; @@ -1159,7 +1159,7 @@ unsigned int opal_bcopy_uicrc_partial( unsigned int opal_uicrc_partial( - const void * source, size_t crclen, unsigned int partial_crc) + const void * source, size_t crclen, unsigned int partial_crc) { register int i, j; register unsigned char * t; @@ -1168,7 +1168,7 @@ unsigned int opal_uicrc_partial( if (!_opal_crc_table_initialized) { opal_initialize_crc_table(); } - + if (INTALIGNED(source)) { register unsigned int * src = (unsigned int *)source; while (crclen >= sizeof(unsigned int)) { @@ -1193,7 +1193,7 @@ unsigned int opal_uicrc_partial( partial_crc = (partial_crc << 8) ^ _opal_crc_table[i]; } } - + return partial_crc; } diff --git a/opal/util/crc.h b/opal/util/crc.h index 55cdd2c08c7..22228d1a789 100644 --- a/opal/util/crc.h +++ b/opal/util/crc.h @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2009 IBM Corporation. All rights reserved. * Copyright (c) 2009 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -62,8 +62,8 @@ opal_bcopy_csum ( size_t plength = 0; return opal_bcopy_csum_partial(source, destination, copylen, csumlen, &plong, &plength); } - -OPAL_DECLSPEC unsigned int + +OPAL_DECLSPEC unsigned int opal_bcopy_uicsum_partial ( const void * source, void * destination, @@ -85,8 +85,8 @@ opal_bcopy_uicsum ( size_t plength = 0; return opal_bcopy_uicsum_partial(source, destination, copylen, csumlen, &pint, &plength); } - -OPAL_DECLSPEC unsigned long + +OPAL_DECLSPEC unsigned long opal_csum_partial ( const void * source, size_t csumlen, @@ -95,7 +95,7 @@ opal_csum_partial ( ); -static inline unsigned long +static inline unsigned long opal_csum(const void * source, size_t csumlen) { unsigned long lastPartialLong = 0; @@ -115,13 +115,13 @@ opal_csum16 (const void * source, size_t csumlen) csum += *src++; csumlen -= 2; } - /* Add leftover byte, if any */ + /* Add leftover byte, if any */ if(csumlen > 0) csum += *((unsigned char*)src); /* Fold 32-bit checksum to 16 bits */ while(csum >> 16) { - csum = (csum & 0xFFFF) + (csum >> 16); - } + csum = (csum & 0xFFFF) + (csum >> 16); + } return csum; } @@ -133,21 +133,21 @@ opal_uicsum_partial ( size_t* lastPartialLength ); -static inline unsigned int +static inline unsigned int opal_uicsum(const void * source, size_t csumlen) { unsigned int lastPartialInt = 0; size_t lastPartialLength = 0; return opal_uicsum_partial(source, csumlen, &lastPartialInt, &lastPartialLength); } - + /* * CRC Support */ void opal_initialize_crc_table(void); -OPAL_DECLSPEC unsigned int +OPAL_DECLSPEC unsigned int opal_bcopy_uicrc_partial( const void * source, void * destination, @@ -155,29 +155,29 @@ opal_bcopy_uicrc_partial( size_t crclen, unsigned int partial_crc); -static inline unsigned int +static inline unsigned int opal_bcopy_uicrc( - const void * source, + const void * source, void * destination, - size_t copylen, + size_t copylen, size_t crclen) { return opal_bcopy_uicrc_partial(source, destination, copylen, crclen, CRC_INITIAL_REGISTER); } -OPAL_DECLSPEC unsigned int +OPAL_DECLSPEC unsigned int opal_uicrc_partial( - const void * source, - size_t crclen, + const void * source, + size_t crclen, unsigned int partial_crc); -static inline unsigned int +static inline unsigned int opal_uicrc(const void * source, size_t crclen) { return opal_uicrc_partial(source, crclen, CRC_INITIAL_REGISTER); } - + END_C_DECLS #endif diff --git a/opal/util/daemon_init.c b/opal/util/daemon_init.c index a36d26e790e..6caae124224 100644 --- a/opal/util/daemon_init.c +++ b/opal/util/daemon_init.c @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -45,7 +45,7 @@ int opal_daemon_init(char *working_dir) } else if (pid != 0) { exit(0); /* parent goes bye-bye */ } - + /* child continues */ #if defined(HAVE_SETSID) setsid(); /* become session leader */ diff --git a/opal/util/daemon_init.h b/opal/util/daemon_init.h index 4055999de44..ebcf46074d8 100644 --- a/opal/util/daemon_init.h +++ b/opal/util/daemon_init.h @@ -5,14 +5,14 @@ * 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, + * 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 **/ diff --git a/opal/util/error.c b/opal/util/error.c index 6189e50b1f6..677423ee3de 100644 --- a/opal/util/error.c +++ b/opal/util/error.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -74,10 +74,10 @@ opal_strerror_unknown(int errnum, char **str) for (i = 0 ; i < MAX_CONVERTERS ; ++i) { if (0 != converters[i].init) { - if (errnum < converters[i].err_base && + if (errnum < converters[i].err_base && errnum > converters[i].err_max) { asprintf(str, "Unknown error: %d (%s error %d)", - errnum, converters[i].project, + errnum, converters[i].project, errnum - converters[i].err_base); return OPAL_SUCCESS; } diff --git a/opal/util/error.h b/opal/util/error.h index 88e1093e747..19268190e3f 100644 --- a/opal/util/error.h +++ b/opal/util/error.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -62,7 +62,7 @@ OPAL_DECLSPEC const char *opal_strerror(int errnum); /** * Return string for given error message - * + * * Similar to opal_strerror, but a buffer is passed in which is filled * with a string (up to buflen - 1 characters long) containing the * error message corresponding to \c errnum. Unlike opal_strerror(), diff --git a/opal/util/fd.c b/opal/util/fd.c index 7c9a7d408e3..63558107a2a 100644 --- a/opal/util/fd.c +++ b/opal/util/fd.c @@ -3,9 +3,9 @@ * Copyright (c) 2009 Sandia National Laboratories. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/fd.h b/opal/util/fd.h index a5db9223504..d32c3a98107 100644 --- a/opal/util/fd.h +++ b/opal/util/fd.h @@ -3,9 +3,9 @@ * Copyright (c) 2009 Sandia National Laboratories. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/few.c b/opal/util/few.c index c239d4ef1d4..45e827e8f50 100644 --- a/opal/util/few.c +++ b/opal/util/few.c @@ -1,18 +1,18 @@ -/* +/* * 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, + * 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$ */ @@ -45,20 +45,20 @@ int opal_few(char *argv[], int *status) /* Child execs. If it fails to exec, exit. */ - else if (0 == pid) { + else if (0 == pid) { execvp(argv[0], argv); exit(errno); } /* Parent loops waiting for the child to die. */ - else { + else { do { /* If the child exited, return */ if (pid == (ret = waitpid(pid, status, 0))) { break; - } + } /* If waitpid was interrupted, loop around again */ diff --git a/opal/util/few.h b/opal/util/few.h index 2d282a8c6ac..a680ae90572 100644 --- a/opal/util/few.h +++ b/opal/util/few.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -22,7 +22,7 @@ #include "opal_config.h" BEGIN_C_DECLS - + /** * Forks, execs, and waits for a subordinate program * diff --git a/opal/util/if.c b/opal/util/if.c index 1986b2381e1..472dfe9aeb8 100644 --- a/opal/util/if.c +++ b/opal/util/if.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2009 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. @@ -15,9 +15,9 @@ * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -88,9 +88,9 @@ #ifndef MIN # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif - + /* - * Look for interface by name and returns its address + * Look for interface by name and returns its address * as a dotted decimal formatted string. */ @@ -115,7 +115,7 @@ int opal_ifnametoaddr(const char* if_name, struct sockaddr* addr, int length) /* - * Look for interface by name and returns its + * Look for interface by name and returns its * corresponding opal_list index. */ @@ -139,7 +139,7 @@ int opal_ifnametoindex(const char* if_name) /* - * Look for interface by name and returns its + * Look for interface by name and returns its * corresponding kernel index. */ @@ -163,7 +163,7 @@ int16_t opal_ifnametokindex(const char* if_name) /* - * Look for interface by opal_list index and returns its + * Look for interface by opal_list index and returns its * corresponding kernel index. */ @@ -204,7 +204,7 @@ int opal_ifaddrtoname(const char* if_addr, char* if_name, int length) */ return OPAL_ERR_NOT_FOUND; } - + if (OPAL_SUCCESS != mca_base_framework_open(&opal_if_base_framework, 0)) { return OPAL_ERROR; } @@ -225,14 +225,14 @@ int opal_ifaddrtoname(const char* if_addr, char* if_name, int length) for (intf = (opal_if_t*)opal_list_get_first(&opal_if_list); intf != (opal_if_t*)opal_list_get_end(&opal_if_list); intf = (opal_if_t*)opal_list_get_next(intf)) { - + if (AF_INET == r->ai_family) { struct sockaddr_in ipv4; struct sockaddr_in *inaddr; inaddr = (struct sockaddr_in*) &intf->if_addr; memcpy (&ipv4, r->ai_addr, r->ai_addrlen); - + if (inaddr->sin_addr.s_addr == ipv4.sin_addr.s_addr) { strncpy(if_name, intf->if_name, length); freeaddrinfo (res); @@ -388,8 +388,8 @@ int opal_ifnext(int if_index) } -/* - * Lookup the interface by opal_list index and return the +/* + * Lookup the interface by opal_list index and return the * primary address assigned to the interface. */ @@ -413,8 +413,8 @@ int opal_ifindextoaddr(int if_index, struct sockaddr* if_addr, unsigned int leng } -/* - * Lookup the interface by opal_list kindex and return the +/* + * Lookup the interface by opal_list kindex and return the * primary address assigned to the interface. */ int opal_ifkindextoaddr(int if_kindex, struct sockaddr* if_addr, unsigned int length) @@ -437,8 +437,8 @@ int opal_ifkindextoaddr(int if_kindex, struct sockaddr* if_addr, unsigned int le } -/* - * Lookup the interface by opal_list index and return the +/* + * Lookup the interface by opal_list index and return the * network mask assigned to the interface. */ @@ -461,8 +461,8 @@ int opal_ifindextomask(int if_index, uint32_t* if_mask, int length) return OPAL_ERROR; } -/* - * Lookup the interface by opal_list index and return the +/* + * Lookup the interface by opal_list index and return the * MAC assigned to the interface. */ @@ -481,8 +481,8 @@ int opal_ifindextomac(int if_index, uint8_t mac[6]) return OPAL_ERROR; } -/* - * Lookup the interface by opal_list index and return the +/* + * Lookup the interface by opal_list index and return the * MTU assigned to the interface. */ @@ -501,8 +501,8 @@ int opal_ifindextomtu(int if_index, int *mtu) return OPAL_ERROR; } -/* - * Lookup the interface by opal_list index and return the +/* + * Lookup the interface by opal_list index and return the * flags assigned to the interface. */ @@ -527,7 +527,7 @@ int opal_ifindextoflags(int if_index, uint32_t* if_flags) -/* +/* * Lookup the interface by opal_list index and return * the associated name. */ @@ -552,7 +552,7 @@ int opal_ifindextoname(int if_index, char* if_name, int length) } -/* +/* * Lookup the interface by kernel index and return * the associated name. */ @@ -630,12 +630,12 @@ opal_iftupletoaddr(const char *inaddr, uint32_t *net, uint32_t *mask) { int pval, dots, rc = OPAL_SUCCESS; const char *ptr; - + /* if a mask was desired... */ if (NULL != mask) { /* set default */ *mask = 0xFFFFFFFF; - + /* if entry includes mask, split that off */ if (NULL != (ptr = strchr(inaddr, '/'))) { ptr = ptr + 1; /* skip the / */ @@ -679,24 +679,24 @@ opal_iftupletoaddr(const char *inaddr, uint32_t *net, uint32_t *mask) } } } - + /* if network addr is desired... */ if (NULL != net) { /* now assemble the address */ rc = parse_ipv4_dots(inaddr, net, &dots); } - + return rc; } -/* +/* * Determine if the specified interface is loopback */ bool opal_ifisloopback(int if_index) { opal_if_t* intf; - + if (OPAL_SUCCESS != mca_base_framework_open(&opal_if_base_framework, 0)) { return OPAL_ERROR; } @@ -800,7 +800,7 @@ void opal_ifgetaliases(char ***aliases) opal_argv_append_nosize(aliases, ipv6); } #endif - } + } } #else /* HAVE_STRUCT_SOCKADDR_IN */ @@ -809,14 +809,14 @@ void opal_ifgetaliases(char ***aliases) ethernet devices. Just make everything a no-op error call */ int -opal_ifnametoaddr(const char* if_name, +opal_ifnametoaddr(const char* if_name, struct sockaddr* if_addr, int size) { return OPAL_ERR_NOT_SUPPORTED; } int -opal_ifaddrtoname(const char* if_addr, +opal_ifaddrtoname(const char* if_addr, char* if_name, int size) { return OPAL_ERR_NOT_SUPPORTED; diff --git a/opal/util/if.h b/opal/util/if.h index 3c5156338cb..c84e9f65fbd 100644 --- a/opal/util/if.h +++ b/opal/util/if.h @@ -5,18 +5,18 @@ * 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, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,32 +51,32 @@ BEGIN_C_DECLS (((n1) << 24) & 0xFF000000) | \ (((n2) << 16) & 0x00FF0000) | \ (((n3) << 8) & 0x0000FF00) | \ - ( (n4) & 0x000000FF) - + ( (n4) & 0x000000FF) + /** * Lookup an interface by name and return its primary address. - * + * * @param if_name (IN) Interface name * @param if_addr (OUT) Interface address buffer * @param size (IN) Interface address buffer size */ -OPAL_DECLSPEC int opal_ifnametoaddr(const char* if_name, +OPAL_DECLSPEC int opal_ifnametoaddr(const char* if_name, struct sockaddr* if_addr, int size); /** * Lookup an interface by address and return its name. - * + * * @param if_addr (IN) Interface address (hostname or dotted-quad) * @param if_name (OUT) Interface name buffer * @param size (IN) Interface name buffer size */ -OPAL_DECLSPEC int opal_ifaddrtoname(const char* if_addr, +OPAL_DECLSPEC int opal_ifaddrtoname(const char* if_addr, char* if_name, int size); /** * Lookup an interface by name and return its opal_list index. - * + * * @param if_name (IN) Interface name * @return Interface opal_list index */ @@ -84,7 +84,7 @@ OPAL_DECLSPEC int opal_ifnametoindex(const char* if_name); /** * Lookup an interface by name and return its kernel index. - * + * * @param if_name (IN) Interface name * @return Interface kernel index */ @@ -99,7 +99,7 @@ OPAL_DECLSPEC int16_t opal_ifaddrtokindex(const char* if_addr); /** * Lookup an interface by opal_list index and return its kernel index. - * + * * @param if_name (IN) Interface opal_list index * @return Interface kernel index */ @@ -113,13 +113,13 @@ OPAL_DECLSPEC int opal_ifcount(void); /** * Returns the index of the first available interface. */ -OPAL_DECLSPEC int opal_ifbegin(void); +OPAL_DECLSPEC int opal_ifbegin(void); /** * Lookup the current position in the interface list by * index and return the next available index (if it exists). * - * @param if_index Returns the next available index from the + * @param if_index Returns the next available index from the * current position. */ OPAL_DECLSPEC int opal_ifnext(int if_index); diff --git a/opal/util/keyval/keyval_lex.h b/opal/util/keyval/keyval_lex.h index a4b6fb9e149..95174ad9b39 100644 --- a/opal/util/keyval/keyval_lex.h +++ b/opal/util/keyval/keyval_lex.h @@ -6,14 +6,14 @@ * 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, + * 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$ */ diff --git a/opal/util/keyval/keyval_lex.l b/opal/util/keyval/keyval_lex.l index b1ce818e1c5..e0cb6ec120d 100644 --- a/opal/util/keyval/keyval_lex.l +++ b/opal/util/keyval/keyval_lex.l @@ -10,16 +10,16 @@ * 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, + * 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) 2012 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,7 +69,7 @@ CHAR [A-Za-z0-9_\-\.] [^*\n]* ; /* Eat up non '*'s */ "*"+[^*/\n]* ; /* Eat '*'s not followed by a '/' */ \n { opal_util_keyval_yynewlines++; - return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; } + return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; } "*"+"/" { BEGIN(INITIAL); /* Done with Block Comment */ return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; } @@ -102,7 +102,7 @@ CHAR [A-Za-z0-9_\-\.] int opal_util_keyval_yylex_destroy(void) { if (NULL != YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); #if defined(YY_CURRENT_BUFFER_LVALUE) YY_CURRENT_BUFFER_LVALUE = NULL; #else diff --git a/opal/util/keyval_parse.h b/opal/util/keyval_parse.h index 10219e229df..f0abe56db7e 100644 --- a/opal/util/keyval_parse.h +++ b/opal/util/keyval_parse.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -45,7 +45,7 @@ typedef void (*opal_keyval_parse_fn_t)(const char *key, const char *value); * called exactly once. In a multithreaded context, calls to * opal_util_keyval_parse() will serialize multiple calls. */ -OPAL_DECLSPEC int opal_util_keyval_parse(const char *filename, +OPAL_DECLSPEC int opal_util_keyval_parse(const char *filename, opal_keyval_parse_fn_t callback); OPAL_DECLSPEC int opal_util_keyval_parse_init(void); diff --git a/opal/util/malloc.c b/opal/util/malloc.c index fd05ec45dba..11d612e7391 100644 --- a/opal/util/malloc.c +++ b/opal/util/malloc.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -92,7 +92,7 @@ void *opal_malloc(size_t size, const char *file, int line) #if OPAL_ENABLE_DEBUG if (opal_malloc_debug_level > 1) { if (size <= 0) { - opal_output(opal_malloc_output, "Request for %ld bytes (%s, %d)", + opal_output(opal_malloc_output, "Request for %ld bytes (%s, %d)", (long) size, file, line); } } @@ -103,7 +103,7 @@ void *opal_malloc(size_t size, const char *file, int line) #if OPAL_ENABLE_DEBUG if (opal_malloc_debug_level > 0) { if (NULL == addr) { - opal_output(opal_malloc_output, + opal_output(opal_malloc_output, "Request for %ld bytes failed (%s, %d)", (long) size, file, line); } @@ -123,7 +123,7 @@ void *opal_calloc(size_t nmembers, size_t size, const char *file, int line) if (opal_malloc_debug_level > 1) { if (size <= 0) { opal_output(opal_malloc_output, - "Request for %ld zeroed elements of size %ld (%s, %d)", + "Request for %ld zeroed elements of size %ld (%s, %d)", (long) nmembers, (long) size, file, line); } } @@ -132,7 +132,7 @@ void *opal_calloc(size_t nmembers, size_t size, const char *file, int line) #if OPAL_ENABLE_DEBUG if (opal_malloc_debug_level > 0) { if (NULL == addr) { - opal_output(opal_malloc_output, + opal_output(opal_malloc_output, "Request for %ld zeroed elements of size %ld failed (%s, %d)", (long) nmembers, (long) size, file, line); } @@ -152,11 +152,11 @@ void *opal_realloc(void *ptr, size_t size, const char *file, int line) if (opal_malloc_debug_level > 1) { if (size <= 0) { if (NULL == ptr) { - opal_output(opal_malloc_output, - "Realloc NULL for %ld bytes (%s, %d)", + opal_output(opal_malloc_output, + "Realloc NULL for %ld bytes (%s, %d)", (long) size, file, line); } else { - opal_output(opal_malloc_output, "Realloc %p for %ld bytes (%s, %d)", + opal_output(opal_malloc_output, "Realloc %p for %ld bytes (%s, %d)", ptr, (long) size, file, line); } } @@ -166,7 +166,7 @@ void *opal_realloc(void *ptr, size_t size, const char *file, int line) #if OPAL_ENABLE_DEBUG if (opal_malloc_debug_level > 0) { if (NULL == addr) { - opal_output(opal_malloc_output, + opal_output(opal_malloc_output, "Realloc %p for %ld bytes failed (%s, %d)", ptr, (long) size, file, line); } diff --git a/opal/util/malloc.h b/opal/util/malloc.h index efeaf981b24..1ea177f6286 100644 --- a/opal/util/malloc.h +++ b/opal/util/malloc.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/util/net.c b/opal/util/net.c index c519fb99fa7..ecbb0db835f 100644 --- a/opal/util/net.c +++ b/opal/util/net.c @@ -5,20 +5,20 @@ * 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, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -167,7 +167,7 @@ opal_net_init(void) if( (a > 255) || (b > 255) || (c > 255) || (d > 255) || (bits > 32) ) { if (0 == found_bad) { - opal_show_help("help-opal-util.txt", + opal_show_help("help-opal-util.txt", "malformed net_private_ipv4", true, args[i]); found_bad = 1; @@ -247,7 +247,7 @@ opal_net_islocalhost(const struct sockaddr *addr) bool -opal_net_samenetwork(const struct sockaddr *addr1, +opal_net_samenetwork(const struct sockaddr *addr1, const struct sockaddr *addr2, uint32_t plen) { @@ -256,7 +256,7 @@ opal_net_samenetwork(const struct sockaddr *addr1, if(addr1->sa_family != addr2->sa_family) { return false; /* address families must be equal */ } - + switch (addr1->sa_family) { case AF_INET: { @@ -336,17 +336,17 @@ opal_net_addr_isipv4public(const struct sockaddr *addr) { const struct sockaddr_in *inaddr = (struct sockaddr_in*) addr; int i; - + if( NULL == private_ipv4 ) { return true; } - + for( i = 0; private_ipv4[i].addr != 0; i++ ) { if( private_ipv4[i].addr == (inaddr->sin_addr.s_addr & opal_net_prefix2netmask(private_ipv4[i].netmask_bits)) ) return false; } - + } return true; default: @@ -354,7 +354,7 @@ opal_net_addr_isipv4public(const struct sockaddr *addr) "unhandled sa_family %d passed to opal_net_addr_isipv4public\n", addr->sa_family); } - + return false; } @@ -379,7 +379,7 @@ opal_net_get_hostname(const struct sockaddr *addr) addrlen = sizeof (struct sockaddr_in); break; case AF_INET6: -#if defined( __NetBSD__) +#if defined( __NetBSD__) /* hotfix for netbsd: on my netbsd machine, getnameinfo returns an unkown error code. */ if(NULL == inet_ntop(AF_INET6, &((struct sockaddr_in6*) addr)->sin6_addr, @@ -468,7 +468,7 @@ opal_net_islocalhost(const struct sockaddr *addr) bool -opal_net_samenetwork(const struct sockaddr *addr1, +opal_net_samenetwork(const struct sockaddr *addr1, const struct sockaddr *addr2, uint32_t prefixlen) { diff --git a/opal/util/net.h b/opal/util/net.h index a1680003c19..27dad966625 100644 --- a/opal/util/net.h +++ b/opal/util/net.h @@ -5,16 +5,16 @@ * 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, + * 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 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/numtostr.c b/opal/util/numtostr.c index 8dc37e95b1c..349378b286a 100644 --- a/opal/util/numtostr.c +++ b/opal/util/numtostr.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -33,13 +33,13 @@ opal_ltostr(long num) buf = (char*) malloc(sizeof(char) * buflen); if (NULL == buf) return NULL; - + ret = snprintf(buf, buflen, "%ld", num); if (ret < 0) { free(buf); return NULL; } - + return buf; } @@ -51,15 +51,15 @@ opal_dtostr(double num) int buflen = sizeof(long) * 8; char *buf = NULL; int ret = 0; - + buf = (char*) malloc(sizeof(char) * buflen); if (NULL == buf) return NULL; - + ret = snprintf(buf, buflen, "%f", num); if (ret < 0) { free(buf); return NULL; } - + return buf; } diff --git a/opal/util/numtostr.h b/opal/util/numtostr.h index c3ce12c45f2..c2e517f9fd0 100644 --- a/opal/util/numtostr.h +++ b/opal/util/numtostr.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ /** @@ -26,7 +26,7 @@ /** * Convert a long integer to a char* string. The returned buffer is * allocated by calling malloc() and must be freed by the caller. - * + * * @param num (IN) Input number * @return String containing number (NULL on failure) */ diff --git a/opal/util/opal_environ.c b/opal/util/opal_environ.c index 98f3f833bc4..f1df671b53d 100644 --- a/opal/util/opal_environ.c +++ b/opal/util/opal_environ.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ #include "opal/util/opal_environ.h" #include "opal/constants.h" -#define OPAL_DEFAULT_TMPDIR "/tmp" +#define OPAL_DEFAULT_TMPDIR "/tmp" /* * Merge two environ-like char arrays, ensuring that there are no diff --git a/opal/util/opal_environ.h b/opal/util/opal_environ.h index c35dc1bae5c..094266c40d8 100644 --- a/opal/util/opal_environ.h +++ b/opal/util/opal_environ.h @@ -5,16 +5,16 @@ * 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, + * 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-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/opal_getcwd.c b/opal/util/opal_getcwd.c index a768f4efc93..e529c008e76 100644 --- a/opal/util/opal_getcwd.c +++ b/opal/util/opal_getcwd.c @@ -1,9 +1,9 @@ /* * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,7 +64,7 @@ int opal_getcwd(char *buf, size_t size) /* If we can't stat() what getcwd() gave us, give up */ if (0 != stat(cwd, &a)) { return OPAL_ERR_IN_ERRNO; - } + } /* If we can't stat() $PWD, then $PWD could just be stale -- so ignore it. */ else if (0 != stat(pwd, &b)) { diff --git a/opal/util/opal_getcwd.h b/opal/util/opal_getcwd.h index 12d2cbe9dbd..1d5533190a5 100644 --- a/opal/util/opal_getcwd.h +++ b/opal/util/opal_getcwd.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/opal_pty.c b/opal/util/opal_pty.c index c5170022436..014eacb8c72 100644 --- a/opal/util/opal_pty.c +++ b/opal/util/opal_pty.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ /*- @@ -108,7 +108,7 @@ int opal_openpty(int *amaster, int *aslave, char *name, #elif defined(HAVE_OPENPTY) -int opal_openpty(int *amaster, int *aslave, char *name, +int opal_openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp) { return openpty(amaster, aslave, name, termp, winp); diff --git a/opal/util/opal_pty.h b/opal/util/opal_pty.h index a06ca137b81..4bcb7a97f9d 100644 --- a/opal/util/opal_pty.h +++ b/opal/util/opal_pty.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -37,9 +37,9 @@ BEGIN_C_DECLS -#if OPAL_ENABLE_PTY_SUPPORT +#if OPAL_ENABLE_PTY_SUPPORT -OPAL_DECLSPEC int opal_openpty(int *amaster, int *aslave, char *name, +OPAL_DECLSPEC int opal_openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp); #else diff --git a/opal/util/os_dirpath.c b/opal/util/os_dirpath.c index 768c79a7e44..881eb424c8b 100644 --- a/opal/util/os_dirpath.c +++ b/opal/util/os_dirpath.c @@ -5,16 +5,16 @@ * 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, + * 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) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -115,7 +115,7 @@ int opal_os_dirpath_create(const char *path, const mode_t mode) /* Now that we finally have the name to check, check it. Create it if it doesn't exist. */ ret = mkdir(tmp, mode); - if ((0 > ret && EEXIST != errno) || 0 != stat(tmp, &buf)) { + if ((0 > ret && EEXIST != errno) || 0 != stat(tmp, &buf)) { opal_output(0, "opal_os_dirpath_create: " "Error: Unable to create the sub-directory (%s) of (%s), mkdir failed [%d]\n", @@ -133,7 +133,7 @@ int opal_os_dirpath_create(const char *path, const mode_t mode) return OPAL_SUCCESS; } -/** +/** * This function attempts to remove a directory along with all the * files in it. If the recursive variable is non-zero, then it will * try to recursively remove all directories. If provided, the @@ -150,7 +150,7 @@ int opal_os_dirpath_destroy(const char *path, DIR *dp; struct dirent *ep; char *filenm; -#ifndef HAVE_STRUCT_DIRENT_D_TYPE +#ifndef HAVE_STRUCT_DIRENT_D_TYPE struct stat buf; #endif @@ -180,13 +180,13 @@ int opal_os_dirpath_destroy(const char *path, (0 == strcmp(ep->d_name, "..")) ) { continue; } - + /* Check to see if it is a directory */ is_dir = false; /* Create a pathname. This is not always needed, but it makes * for cleaner code just to create it here. Note that we are - * allocating memory here, so we need to free it later on. + * allocating memory here, so we need to free it later on. */ filenm = opal_os_path(false, path, ep->d_name, NULL); #ifdef HAVE_STRUCT_DIRENT_D_TYPE @@ -198,7 +198,7 @@ int opal_os_dirpath_destroy(const char *path, if (rc < 0 || S_ISDIR(buf.st_mode)) { is_dir = true; } -#endif /* have dirent.d_type */ +#endif /* have dirent.d_type */ /* * If not recursively decending, then if we find a directory then fail @@ -242,12 +242,12 @@ int opal_os_dirpath_destroy(const char *path, free(filenm); } } - + /* Done with this directory */ closedir(dp); - + cleanup: - + /* * If the directory is empty, them remove it */ @@ -261,7 +261,7 @@ int opal_os_dirpath_destroy(const char *path, bool opal_os_dirpath_is_empty(const char *path ) { DIR *dp; struct dirent *ep; - + if (NULL != path) { /* protect against error */ dp = opendir(path); if (NULL != dp) { diff --git a/opal/util/os_dirpath.h b/opal/util/os_dirpath.h index 64fc8f02d4a..5564a77370a 100644 --- a/opal/util/os_dirpath.h +++ b/opal/util/os_dirpath.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -24,7 +24,7 @@ * access permissions. Existing directories within the tree are left * untouched - however, if they do not permit the user to create a directory * within them, the function will return an error condition. - * + * * If the specified full path name already exists, the * opal_os_dirpath_create() function will check to ensure that * the final directory in the tree has at least the specified access permission. In other @@ -50,7 +50,7 @@ BEGIN_C_DECLS /** * @param path A pointer to a string that contains the path name to be built. * @param mode A mode_t bit mask that specifies the access permissions for the - * directories being constructed. + * directories being constructed. * @retval OPAL_SUCCESS If the directory tree has been successfully created with * the specified access permissions. * @retval OPAL_ERROR If the directory tree could not be created with the @@ -75,7 +75,7 @@ OPAL_DECLSPEC bool opal_os_dirpath_is_empty(const char *path); * @param path A pointer to a string that contains the path name to be checked. * @param mode A mode_t bit mask that specifies the access permissions for the * directory to be accessed. - * + * * @retval OPAL_SUCCESS If directory exists, and permissions match * @retval OPAL_ERR_NOT_FOUND If directory does not exist * @retval OPAL_ERROR If directory exists, and permissions do not match @@ -88,7 +88,7 @@ OPAL_DECLSPEC int opal_os_dirpath_access(const char *path, const mode_t mode ); * * @param root A pointer to a string that contains the base path name (e.g., /tmp/foo from /tmp/foo/bar) * @param path A pointer to a string that contains the file or directory (e.g., bar from /tmp/foo/bar) - * + * * @retval true Allow the program to remove the file/directory * @retval false Do not allow the program to remove the file/directory */ @@ -100,7 +100,7 @@ typedef bool (*opal_os_dirpath_destroy_callback_fn_t)(const char *root, const ch * @param path A pointer to a string that contains the path name to be destroyed * @param recursive Recursively desend the directory removing all files and directories. * if set to 'false' then the directory must be empty to succeed. - * @param cbfunc A function that will be called before removing a file or directory. + * @param cbfunc A function that will be called before removing a file or directory. * If NULL, then assume all remove. * * @retval OPAL_SUCCESS If the directory was successfully removed or removed to the @@ -109,8 +109,8 @@ typedef bool (*opal_os_dirpath_destroy_callback_fn_t)(const char *root, const ch * @retval OPAL_ERROR If the directory cannnot be removed, accessed properly, or contains * directories that could not be removed.. */ -OPAL_DECLSPEC int opal_os_dirpath_destroy(const char *path, - bool recursive, +OPAL_DECLSPEC int opal_os_dirpath_destroy(const char *path, + bool recursive, opal_os_dirpath_destroy_callback_fn_t cbfunc); END_C_DECLS diff --git a/opal/util/os_path.c b/opal/util/os_path.c index deee807d021..251a6107fcf 100644 --- a/opal/util/os_path.c +++ b/opal/util/os_path.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -70,7 +70,7 @@ char *opal_os_path(bool relative, ...) if(relative) { total_length++; } - + if (total_length > OPAL_PATH_MAX) { /* path length is too long - reject it */ return(NULL); } diff --git a/opal/util/os_path.h b/opal/util/os_path.h index 89be7a450e3..4c2db908f4a 100644 --- a/opal/util/os_path.h +++ b/opal/util/os_path.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -48,11 +48,11 @@ BEGIN_C_DECLS -/** +/** * @param relative A boolean that specifies if the path name is to be constructed * relative to the current directory or as an absolute path. If no path * elements are included in the function call, then the function returns - * "." for a relative path name and "" - + * "." for a relative path name and "" - * the top of the directory tree - for an absolute path name. * @param elem1,elem2,... A variable number of (char *)path_elements * can be provided to the function, terminated by a NULL value. These diff --git a/opal/util/output.c b/opal/util/output.c index e964d9d039a..dd950a8c845 100644 --- a/opal/util/output.c +++ b/opal/util/output.c @@ -6,7 +6,7 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -71,7 +71,7 @@ typedef struct { char *ldi_suffix; int ldi_suffix_len; - + bool ldi_stdout; bool ldi_stderr; @@ -89,7 +89,7 @@ static void construct(opal_object_t *stream); static int do_open(int output_id, opal_output_stream_t * lds); static int open_file(int i); static void free_descriptor(int output_id); -static int make_string(char **no_newline_string, output_desc_t *ldi, +static int make_string(char **no_newline_string, output_desc_t *ldi, const char *format, va_list arglist); static int output(int output_id, const char *format, va_list arglist); @@ -281,7 +281,7 @@ void opal_output_reopen_all(void) break; } - /* + /* * set this to zero to ensure that opal_output_open will * return this same index as the output stream id */ @@ -303,7 +303,7 @@ void opal_output_reopen_all(void) lds.lds_want_file_append = true; lds.lds_file_suffix = info[i].ldi_file_suffix; - /* + /* * call opal_output_open to open the stream. The return value * is guaranteed to be i. So we can ignore it. */ @@ -335,7 +335,7 @@ void opal_output_close(int output_id) free_descriptor(output_id); /* If no one has the syslog open, we should close it */ - + for (i = 0; i < OPAL_OUTPUT_MAX_STREAMS; ++i) { if (info[i].ldi_used && info[i].ldi_syslog) { break; @@ -385,7 +385,7 @@ void opal_output_verbose(int level, int output_id, const char *format, ...) /* * Send a message to a stream if the verbose level is high enough */ -void opal_output_vverbose(int level, int output_id, const char *format, +void opal_output_vverbose(int level, int output_id, const char *format, va_list arglist) { if (output_id >= 0 && output_id < OPAL_OUTPUT_MAX_STREAMS && @@ -421,7 +421,7 @@ char *opal_output_string(int level, int output_id, const char *format, ...) /* * Send a message to a string if the verbose level is high enough */ -char *opal_output_vstring(int level, int output_id, const char *format, +char *opal_output_vstring(int level, int output_id, const char *format, va_list arglist) { int rc; @@ -649,7 +649,7 @@ static int do_open(int output_id, opal_output_stream_t * lds) info[i].ldi_suffix = NULL; info[i].ldi_suffix_len = 0; } - + if (opal_output_redirected_to_syslog) { /* since all is redirected to syslog, ensure * we don't duplicate the output to the std places @@ -804,7 +804,7 @@ static void free_descriptor(int output_id) free(ldi->ldi_suffix); } ldi->ldi_suffix = NULL; - + if (NULL != ldi->ldi_file_suffix) { free(ldi->ldi_file_suffix); } @@ -818,7 +818,7 @@ static void free_descriptor(int output_id) } -static int make_string(char **no_newline_string, output_desc_t *ldi, +static int make_string(char **no_newline_string, output_desc_t *ldi, const char *format, va_list arglist) { size_t len, total_len; @@ -862,7 +862,7 @@ static int make_string(char **no_newline_string, output_desc_t *ldi, snprintf(temp_str, temp_str_len, "%s%s%s\n", ldi->ldi_prefix, *no_newline_string, ldi->ldi_suffix); } else { - snprintf(temp_str, temp_str_len, "%s%s%s", ldi->ldi_prefix, + snprintf(temp_str, temp_str_len, "%s%s%s", ldi->ldi_prefix, *no_newline_string, ldi->ldi_suffix); } } else if (NULL != ldi->ldi_prefix) { @@ -870,7 +870,7 @@ static int make_string(char **no_newline_string, output_desc_t *ldi, snprintf(temp_str, temp_str_len, "%s%s\n", ldi->ldi_prefix, *no_newline_string); } else { - snprintf(temp_str, temp_str_len, "%s%s", ldi->ldi_prefix, + snprintf(temp_str, temp_str_len, "%s%s", ldi->ldi_prefix, *no_newline_string); } } else if (NULL != ldi->ldi_suffix) { @@ -878,7 +878,7 @@ static int make_string(char **no_newline_string, output_desc_t *ldi, snprintf(temp_str, temp_str_len, "%s%s\n", *no_newline_string, ldi->ldi_suffix); } else { - snprintf(temp_str, temp_str_len, "%s%s", + snprintf(temp_str, temp_str_len, "%s%s", *no_newline_string, ldi->ldi_suffix); } } else { @@ -888,10 +888,10 @@ static int make_string(char **no_newline_string, output_desc_t *ldi, snprintf(temp_str, temp_str_len, "%s", *no_newline_string); } } - + return OPAL_SUCCESS; } - + /* * Do the actual output. Take a va_list so that we can be called from * multiple different places, even functions that took "..." as input @@ -936,15 +936,15 @@ static int output(int output_id, const char *format, va_list arglist) /* stdout output */ if (ldi->ldi_stdout) { - write(fileno(stdout), out, (int)strlen(out)); + write(fileno(stdout), out, (int)strlen(out)); fflush(stdout); } /* stderr output */ if (ldi->ldi_stderr) { - write((-1 == default_stderr_fd) ? + write((-1 == default_stderr_fd) ? fileno(stderr) : default_stderr_fd, - out, (int)strlen(out)); + out, (int)strlen(out)); fflush(stderr); } diff --git a/opal/util/output.h b/opal/util/output.h index cbac413f825..b8f7cd372fe 100644 --- a/opal/util/output.h +++ b/opal/util/output.h @@ -5,16 +5,16 @@ * 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, + * 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-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -94,7 +94,7 @@ OPAL_DECLSPEC extern bool opal_output_redirected_to_syslog; OPAL_DECLSPEC extern int opal_output_redirected_syslog_pri; /** - * \class opal_output_stream_t + * \class opal_output_stream_t * * Structure used to request the opening of a OPAL output stream. A * pointer to this structure is passed to opal_output_open() to tell @@ -124,7 +124,7 @@ struct opal_output_stream_t { * more output and diagnostics should be displayed. */ int lds_verbose_level; - + /** * When opal_output_stream_t::lds_want_syslog is true, this field is * examined to see what priority output from the stream should be @@ -138,7 +138,7 @@ struct opal_output_stream_t { /** * When opal_output_stream_t::lds_want_syslog is true, this field is * examined to see what ident value should be passed to openlog(3). - * + * * If a NULL value is given, the string "opal" is used. */ #if !defined(__WINDOWS__) @@ -148,7 +148,7 @@ struct opal_output_stream_t { #else HANDLE lds_syslog_ident; #endif /* !defined(__WINDOWS__) */ - + /** * String prefix added to all output on the stream. * @@ -158,7 +158,7 @@ struct opal_output_stream_t { * to an internal structure in the call to opal_output_open()! */ char *lds_prefix; - + /** * String suffix added to all output on the stream. * @@ -206,7 +206,7 @@ struct opal_output_stream_t { * If this field is true, stream output is sent to stderr. */ bool lds_want_stderr; - + /** * Whether to send stream output to a file or not. * @@ -244,7 +244,7 @@ struct opal_output_stream_t { /** * Convenience typedef - */ + */ typedef struct opal_output_stream_t opal_output_stream_t; /** @@ -263,7 +263,7 @@ struct opal_output_stream_t { * and has a verbose level of 0. */ OPAL_DECLSPEC bool opal_output_init(void); - + /** * Shut down the output stream system. * @@ -309,7 +309,7 @@ struct opal_output_stream_t { * new stream with a specific stream handle. */ OPAL_DECLSPEC int opal_output_reopen(int output_id, opal_output_stream_t *lds); - + /** * Enables and disables output streams. * @@ -378,7 +378,7 @@ struct opal_output_stream_t { * writing to it. */ OPAL_DECLSPEC void opal_output(int output_id, const char *format, ...) __opal_attribute_format__(__printf__, 2, 3); - + /** * Send output to a stream only if the passed verbosity level is * high enough. @@ -407,16 +407,16 @@ struct opal_output_stream_t { * * @see opal_output_set_verbosity() */ - OPAL_DECLSPEC void opal_output_verbose(int verbose_level, int output_id, + OPAL_DECLSPEC void opal_output_verbose(int verbose_level, int output_id, const char *format, ...) __opal_attribute_format__(__printf__, 3, 4); /** * Same as opal_output_verbose(), but takes a va_list form of varargs. */ - OPAL_DECLSPEC void opal_output_vverbose(int verbose_level, int output_id, + OPAL_DECLSPEC void opal_output_vverbose(int verbose_level, int output_id, const char *format, va_list ap) __opal_attribute_format__(__printf__, 3, 0); - /** + /** * Send output to a string if the verbosity level is high enough. * * @param output_id Stream id returned from opal_output_open(). @@ -430,13 +430,13 @@ struct opal_output_stream_t { * level is not high enough, NULL is returned. The caller is * responsible for free()'ing the returned string. */ - OPAL_DECLSPEC char *opal_output_string(int verbose_level, int output_id, + OPAL_DECLSPEC char *opal_output_string(int verbose_level, int output_id, const char *format, ...) __opal_attribute_format__(__printf__, 3, 4); /** * Same as opal_output_string, but accepts a va_list form of varargs. */ - OPAL_DECLSPEC char *opal_output_vstring(int verbose_level, int output_id, + OPAL_DECLSPEC char *opal_output_vstring(int verbose_level, int output_id, const char *format, va_list ap) __opal_attribute_format__(__printf__, 3, 0); /** @@ -502,7 +502,7 @@ struct opal_output_stream_t { const char *prefix, char **olddir, char **oldprefix); - + #if OPAL_ENABLE_DEBUG /** * Main macro for use in sending debugging output to output streams; @@ -512,8 +512,8 @@ struct opal_output_stream_t { * @see opal_output() */ #define OPAL_OUTPUT(a) opal_output a - - /** + + /** * Macro for use in sending debugging output to the output * streams. Will be "compiled out" when OPAL is configured * without --enable-debug. @@ -530,8 +530,8 @@ struct opal_output_stream_t { * @see opal_output() */ #define OPAL_OUTPUT(a) - - /** + + /** * Macro for use in sending debugging output to the output * streams. Will be "compiled out" when OPAL is configured * without --enable-debug. diff --git a/opal/util/path.c b/opal/util/path.c index 0bbe3eaa482..76ed1d3f0cc 100644 --- a/opal/util/path.c +++ b/opal/util/path.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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. @@ -15,9 +15,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -108,10 +108,10 @@ bool opal_path_is_absolute( const char *path ) */ char *opal_path_find(char *fname, char **pathv, int mode, char **envv) { - char *fullpath; - char *delimit; - char *env; - char *pfix; + char *fullpath; + char *delimit; + char *env; + char *pfix; int i; /* If absolute path is given, return it without searching. */ @@ -167,10 +167,10 @@ char *opal_path_find(char *fname, char **pathv, int mode, char **envv) */ char *opal_path_findv(char *fname, int mode, char **envv, char *wrkdir) { - char **dirv; - char *fullpath; - char *path; - int dirc; + char **dirv; + char *fullpath; + char *path; + int dirc; int i; bool found_dot = false; @@ -185,7 +185,7 @@ char *opal_path_findv(char *fname, int mode, char **envv, char *wrkdir) /* Replace the "." path by the working directory. */ - if (NULL != wrkdir) { + if (NULL != wrkdir) { for (i = 0; i < dirc; ++i) { if (0 == strcmp(dirv[i], ".")) { found_dot = true; @@ -216,10 +216,10 @@ char *opal_path_findv(char *fname, int mode, char **envv, char *wrkdir) /** * Forms a complete pathname and checks it for existance and * permissions - * + * * Accepts: * -fname File name - * -path Path prefix + * -path Path prefix * -mode Target permissions which must be satisfied * * Returns: @@ -230,7 +230,7 @@ char *opal_path_access(char *fname, char *path, int mode) { char *fullpath = NULL; struct stat buf; - + /* Allocate space for the full pathname. */ if (NULL == path) { fullpath = opal_os_path(false, fname, NULL); @@ -239,7 +239,7 @@ char *opal_path_access(char *fname, char *path, int mode) } if (NULL == fullpath) return NULL; - + /* first check to see - is this a file or a directory? We * only want files */ @@ -250,16 +250,16 @@ char *opal_path_access(char *fname, char *path, int mode) free(fullpath); return NULL; } - + if (!(S_IFREG & buf.st_mode) && !(S_IFLNK & buf.st_mode)) { /* this isn't a regular file or a symbolic link, so - * ignore it + * ignore it */ free(fullpath); return NULL; } - + /* check the permissions */ if ((X_OK & mode) && !(S_IXUSR & buf.st_mode)) { /* if they asked us to check executable permission, @@ -282,7 +282,7 @@ char *opal_path_access(char *fname, char *path, int mode) free(fullpath); return NULL; } - + /* must have met all criteria! */ return fullpath; } @@ -395,7 +395,7 @@ char* opal_find_absolute_path( char* app_name ) /* Otherwise try to search for the application in the PATH ... */ abs_app_name = opal_path_findv( app_name, X_OK, NULL, NULL ); } - + if( NULL != abs_app_name ) { char* resolved_path = (char*)malloc(OPAL_PATH_MAX); realpath( abs_app_name, resolved_path ); @@ -511,7 +511,7 @@ bool opal_path_nfs(char *fname) struct statvfs vfsbuf; #endif /* - * Be sure to update the test (test/util/opal_path_nfs.c) + * Be sure to update the test (test/util/opal_path_nfs.c) * while adding a new Network/Cluster Filesystem here */ static struct fs_types_t { @@ -560,9 +560,9 @@ bool opal_path_nfs(char *fname) last_sep = strrchr(file, OPAL_PATH_SEP[0]); /* Stop the search, when we have searched past root '/' */ - if (NULL == last_sep || (1 == strlen(last_sep) && + if (NULL == last_sep || (1 == strlen(last_sep) && OPAL_PATH_SEP[0] == *last_sep)) { - free (file); + free (file); return false; } *last_sep = '\0'; @@ -576,7 +576,7 @@ bool opal_path_nfs(char *fname) /* These are uses of struct statfs */ # if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) if (0 == fsrc && - 0 == strncasecmp(fs_types[i].f_fsname, fsbuf.f_fstypename, + 0 == strncasecmp(fs_types[i].f_fsname, fsbuf.f_fstypename, sizeof(fsbuf.f_fstypename))) { goto found; } diff --git a/opal/util/path.h b/opal/util/path.h index e026f4dbd0c..6b8250f8d92 100644 --- a/opal/util/path.h +++ b/opal/util/path.h @@ -5,16 +5,16 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @file @@ -35,7 +35,7 @@ BEGIN_C_DECLS /** * Locates a file with certain permissions - * + * * @param fname File name * @param pathv Array of search directories * @param mode Permissions which must be satisfied (see access(2)) @@ -73,7 +73,7 @@ OPAL_DECLSPEC char *opal_path_find(char *fname, char **pathv, int mode, * * The caller is responsible for freeing the returned string. */ -OPAL_DECLSPEC char *opal_path_findv(char *fname, int mode, +OPAL_DECLSPEC char *opal_path_findv(char *fname, int mode, char **envv, char *wrkdir) __opal_attribute_malloc__ __opal_attribute_warn_unused_result__; /** * Detect if the requested path is absolute or relative. diff --git a/opal/util/printf.c b/opal/util/printf.c index 0c5e1ebfdd1..794ad566f9f 100644 --- a/opal/util/printf.c +++ b/opal/util/printf.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2013 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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-2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/printf.h b/opal/util/printf.h index 739ae3034ac..4f69aada65f 100644 --- a/opal/util/printf.h +++ b/opal/util/printf.h @@ -5,19 +5,19 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 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 - * + * * Buffer safe printf functions for portability to archaic platforms. */ diff --git a/opal/util/proc.c b/opal/util/proc.c index f1c7e2aa597..f6686af5454 100644 --- a/opal/util/proc.c +++ b/opal/util/proc.c @@ -7,9 +7,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -20,7 +20,7 @@ #include "opal/mca/pmix/pmix.h" opal_process_name_t opal_name_wildcard = {OPAL_JOBID_WILDCARD, OPAL_VPID_WILDCARD}; -opal_process_name_t opal_name_invalid = {OPAL_JOBID_INVALID, OPAL_VPID_INVALID}; +opal_process_name_t opal_name_invalid = {OPAL_JOBID_INVALID, OPAL_VPID_INVALID}; opal_process_info_t opal_process_info = { .nodename = NULL, diff --git a/opal/util/proc.h b/opal/util/proc.h index a0cf0d6d886..631ce84188a 100644 --- a/opal/util/proc.h +++ b/opal/util/proc.h @@ -7,9 +7,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/qsort.c b/opal/util/qsort.c index d79656927f4..ce58ff49cce 100644 --- a/opal/util/qsort.c +++ b/opal/util/qsort.c @@ -104,7 +104,7 @@ loop: SWAPINIT(a, es); swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; + for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); @@ -152,7 +152,7 @@ loop: SWAPINIT(a, es); } if (swap_cnt == 0) { /* Switch to insertion sort */ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; + for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); diff --git a/opal/util/qsort.h b/opal/util/qsort.h index 5e52cf7ae95..cd6b77c0813 100644 --- a/opal/util/qsort.h +++ b/opal/util/qsort.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/util/show_help.c b/opal/util/show_help.c index b37ac7bbd44..18c82ccbffe 100644 --- a/opal/util/show_help.c +++ b/opal/util/show_help.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,9 +47,9 @@ static char **search_dirs = NULL; /* * Local functions */ -static int opal_show_vhelp_internal(const char *filename, const char *topic, +static int opal_show_vhelp_internal(const char *filename, const char *topic, bool want_error_header, va_list arglist); -static int opal_show_help_internal(const char *filename, const char *topic, +static int opal_show_help_internal(const char *filename, const char *topic, bool want_error_header, ...); opal_show_help_fn_t opal_show_help = opal_show_help_internal; @@ -59,13 +59,13 @@ opal_show_vhelp_fn_t opal_show_vhelp = opal_show_vhelp_internal; int opal_show_help_init(void) { opal_output_stream_t lds; - + OBJ_CONSTRUCT(&lds, opal_output_stream_t); lds.lds_want_stderr = true; output_stream = opal_output_open(&lds); - + opal_argv_append_nosize(&search_dirs, opal_install_dirs.opaldatadir); - + return OPAL_SUCCESS; } @@ -73,13 +73,13 @@ int opal_show_help_finalize(void) { opal_output_close(output_stream); output_stream = -1; - + /* destruct the search list */ if (NULL != search_dirs) { opal_argv_free(search_dirs); search_dirs = NULL; }; - + return OPAL_SUCCESS; } @@ -142,13 +142,13 @@ static int open_file(const char *base, const char *topic) char *err_msg = NULL; size_t base_len; int i; - + /* If no filename was supplied, use the default */ if (NULL == base) { base = default_filename; } - + /* if this is called prior to someone initializing the system, * then don't try to look */ @@ -276,7 +276,7 @@ static int load_array(char ***array, const char *filename, const char *topic) if (OPAL_SUCCESS != (ret = open_file(filename, topic))) { return ret; } - + ret = find_topic(filename, topic); if (OPAL_SUCCESS == ret) { ret = read_topic(array); @@ -292,7 +292,7 @@ static int load_array(char ***array, const char *filename, const char *topic) return ret; } -char *opal_show_help_vstring(const char *filename, const char *topic, +char *opal_show_help_vstring(const char *filename, const char *topic, bool want_error_header, va_list arglist) { int rc; @@ -316,21 +316,21 @@ char *opal_show_help_vstring(const char *filename, const char *topic, return (OPAL_SUCCESS == rc) ? output : NULL; } -char *opal_show_help_string(const char *filename, const char *topic, +char *opal_show_help_string(const char *filename, const char *topic, bool want_error_handler, ...) { char *output; va_list arglist; va_start(arglist, want_error_handler); - output = opal_show_help_vstring(filename, topic, want_error_handler, + output = opal_show_help_vstring(filename, topic, want_error_handler, arglist); va_end(arglist); return output; } -static int opal_show_vhelp_internal(const char *filename, const char *topic, +static int opal_show_vhelp_internal(const char *filename, const char *topic, bool want_error_header, va_list arglist) { char *output; @@ -348,7 +348,7 @@ static int opal_show_vhelp_internal(const char *filename, const char *topic, return (NULL == output) ? OPAL_ERROR : OPAL_SUCCESS; } -static int opal_show_help_internal(const char *filename, const char *topic, +static int opal_show_help_internal(const char *filename, const char *topic, bool want_error_header, ...) { va_list arglist; diff --git a/opal/util/show_help.h b/opal/util/show_help.h index 7d96d4305f1..8806f059060 100644 --- a/opal/util/show_help.h +++ b/opal/util/show_help.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -33,7 +33,7 @@ * display it. Its important parameters are a filename, message name, * and printf()-style varargs parameters used to substitute into the * message. - * + * * It was originally intended that this system would support a very * simple version of i18n-like support, but we got (strong) feedback * that i18n support was not desired. So it never happened. @@ -55,7 +55,7 @@ * ignored. It is not possible to escape a #. * - Message names are on a line by themselves and marked with []. * Names can be any ASCII string within the [] (excluding the - * characters newline, linefeed, [, ], and #). + * characters newline, linefeed, [, ], and #). * - Messages are any characters between message names and/or the end * of the file. * @@ -128,7 +128,7 @@ OPAL_DECLSPEC int opal_show_help_finalize(void); * based on the topic, and displays it. If want_error_header is * true, a header and footer of asterisks are also displayed. */ -typedef int (*opal_show_help_fn_t)(const char *filename, const char *topic, +typedef int (*opal_show_help_fn_t)(const char *filename, const char *topic, bool want_error_header, ...); OPAL_DECLSPEC extern opal_show_help_fn_t opal_show_help; @@ -136,7 +136,7 @@ OPAL_DECLSPEC extern opal_show_help_fn_t opal_show_help; * This function does the same thing as opal_show_help(), but accepts * a va_list form of varargs. */ -typedef int (*opal_show_vhelp_fn_t)(const char *filename, const char *topic, +typedef int (*opal_show_vhelp_fn_t)(const char *filename, const char *topic, bool want_error_header, va_list ap); OPAL_DECLSPEC extern opal_show_vhelp_fn_t opal_show_vhelp; @@ -144,16 +144,16 @@ OPAL_DECLSPEC extern opal_show_vhelp_fn_t opal_show_vhelp; * This function does the same thing as opal_show_help(), but returns * its output in a string (that must be freed by the caller). */ -OPAL_DECLSPEC char* opal_show_help_string(const char *filename, - const char *topic, +OPAL_DECLSPEC char* opal_show_help_string(const char *filename, + const char *topic, bool want_error_header, ...); /** * This function does the same thing as opal_show_help_string(), but * accepts a va_list form of varargs. */ -OPAL_DECLSPEC char* opal_show_help_vstring(const char *filename, - const char *topic, +OPAL_DECLSPEC char* opal_show_help_vstring(const char *filename, + const char *topic, bool want_error_header, va_list ap); /** diff --git a/opal/util/show_help_lex.h b/opal/util/show_help_lex.h index 0be537de9fc..864888039b9 100644 --- a/opal/util/show_help_lex.h +++ b/opal/util/show_help_lex.h @@ -5,15 +5,15 @@ * 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, + * 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) 2006 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/show_help_lex.l b/opal/util/show_help_lex.l index 7f1aa1f8421..2de61e830ec 100644 --- a/opal/util/show_help_lex.l +++ b/opal/util/show_help_lex.l @@ -9,14 +9,14 @@ * 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, + * 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$ */ @@ -77,7 +77,7 @@ CHAR [A-Za-z0-9_\-\.] int opal_show_help_yylex_destroy(void) { if (NULL != YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); #if defined(YY_CURRENT_BUFFER_LVALUE) YY_CURRENT_BUFFER_LVALUE = NULL; #else diff --git a/opal/util/stacktrace.c b/opal/util/stacktrace.c index 6df6dfd2e09..9c631ea275d 100644 --- a/opal/util/stacktrace.c +++ b/opal/util/stacktrace.c @@ -5,16 +5,16 @@ * 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, + * 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) 2006 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -53,15 +53,15 @@ static char *unable_to_print_msg = "Unable to print stack trace!\n"; * Where available, the BSD libexecinfo is used to provide Linux/Glibc * compatible backtrace and backtrace_symbols_fd functions. * - * @param signo with the signal number raised + * @param signo with the signal number raised * @param info with information regarding the reason/send of the signal - * @param p + * @param p * * FIXME: Should distinguish for systems, which don't have siginfo... */ #if OPAL_WANT_PRETTY_PRINT_STACKTRACE static void show_stackframe (int signo, siginfo_t * info, void * p) -{ +{ char print_buffer[1024]; char * tmp = print_buffer; int size = sizeof (print_buffer); @@ -79,10 +79,10 @@ static void show_stackframe (int signo, siginfo_t * info, void * p) memset (print_buffer, 0, sizeof (print_buffer)); #ifdef HAVE_STRSIGNAL - ret = snprintf (tmp, size, HOSTFORMAT "Signal: %s (%d)\n", + ret = snprintf (tmp, size, HOSTFORMAT "Signal: %s (%d)\n", stacktrace_hostname, getpid(), strsignal(signo), signo); #else - ret = snprintf (tmp, size, HOSTFORMAT "Signal: %d\n", + ret = snprintf (tmp, size, HOSTFORMAT "Signal: %d\n", stacktrace_hostname, getpid(), signo); #endif size -= ret; @@ -262,14 +262,14 @@ static void show_stackframe (int signo, siginfo_t * info, void * p) /* print signal errno information */ if (0 != info->si_errno) { ret = snprintf(tmp, size, HOSTFORMAT "Associated errno: %s (%d)\n", - stacktrace_hostname, getpid(), + stacktrace_hostname, getpid(), strerror (info->si_errno), info->si_errno); size -= ret; tmp += ret; } ret = snprintf(tmp, size, HOSTFORMAT "Signal code: %s (%d)\n", - stacktrace_hostname, getpid(), + stacktrace_hostname, getpid(), si_code_str, info->si_code); size -= ret; tmp += ret; @@ -277,8 +277,8 @@ static void show_stackframe (int signo, siginfo_t * info, void * p) switch (signo) { case SIGILL: - case SIGFPE: - case SIGSEGV: + case SIGFPE: + case SIGSEGV: case SIGBUS: { ret = snprintf(tmp, size, HOSTFORMAT "Failing at address: %p\n", @@ -287,10 +287,10 @@ static void show_stackframe (int signo, siginfo_t * info, void * p) tmp += ret; break; } - case SIGCHLD: + case SIGCHLD: { ret = snprintf(tmp, size, HOSTFORMAT "Sending PID: %d, Sending UID: %d, Status: %d\n", - stacktrace_hostname, getpid(), + stacktrace_hostname, getpid(), info->si_pid, info->si_uid, info->si_status); size -= ret; tmp += ret; @@ -335,8 +335,8 @@ static void show_stackframe (int signo, siginfo_t * info, void * p) /* write out the footer information */ memset (print_buffer, 0, sizeof (print_buffer)); - ret = snprintf(print_buffer, sizeof(print_buffer), - HOSTFORMAT "*** End of error message ***\n", + ret = snprintf(print_buffer, sizeof(print_buffer), + HOSTFORMAT "*** End of error message ***\n", stacktrace_hostname, getpid()); if (ret > 0) { write(fileno(stderr), print_buffer, ret); @@ -350,7 +350,7 @@ static void show_stackframe (int signo, siginfo_t * info, void * p) #if OPAL_WANT_PRETTY_PRINT_STACKTRACE void opal_stackframe_output(int stream) -{ +{ int traces_size; char **traces; @@ -373,12 +373,12 @@ char *opal_stackframe_output_string(void) int traces_size, i; size_t len; char *output, **traces; - + len = 0; if (OPAL_SUCCESS != opal_backtrace_buffer(&traces, &traces_size)) { return NULL; } - + /* Calculate the space needed for the string */ for (i = 3; i < traces_size; i++) { if (NULL == traces[i]) { @@ -386,12 +386,12 @@ char *opal_stackframe_output_string(void) } len += strlen(traces[i]) + 1; } - + output = (char *) malloc(len + 1); if (NULL == output) { return NULL; } - + *output = '\0'; for (i = 3; i < traces_size; i++) { if (NULL == traces[i]) { @@ -415,7 +415,7 @@ char *opal_stackframe_output_string(void) * @returnvalue OPAL_SUCCESS * @returnvalue OPAL_ERR_BAD_PARAM if the value in the signal-list * is not a valid signal-number - * + * */ int opal_util_register_stackhandlers (void) { @@ -445,8 +445,8 @@ int opal_util_register_stackhandlers (void) act.sa_flags |= SA_RESETHAND; #endif - for (tmp = next = opal_signal_string ; - next != NULL && *next != '\0'; + for (tmp = next = opal_signal_string ; + next != NULL && *next != '\0'; tmp = next + 1) { int sig; diff --git a/opal/util/stacktrace.h b/opal/util/stacktrace.h index 7c230010a00..3703564d365 100644 --- a/opal/util/stacktrace.h +++ b/opal/util/stacktrace.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @file @@ -44,7 +44,7 @@ OPAL_DECLSPEC char *opal_stackframe_output_string(void); * @returnvalue OPAL_SUCCESS * @returnvalue OPAL_ERR_BAD_PARAM if the value in the signal-list * is not a valid signal-number - * + * */ OPAL_DECLSPEC int opal_util_register_stackhandlers (void); diff --git a/opal/util/strncpy.c b/opal/util/strncpy.c index 9cfcfead3e0..4781536200b 100644 --- a/opal/util/strncpy.c +++ b/opal/util/strncpy.c @@ -5,14 +5,14 @@ * 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, + * 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$ * * This file is only here because some platforms have a broken strncpy diff --git a/opal/util/strncpy.h b/opal/util/strncpy.h index c389c4cdc08..8a217560ba1 100644 --- a/opal/util/strncpy.h +++ b/opal/util/strncpy.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/opal/util/sys_limits.c b/opal/util/sys_limits.c index 9336a391ac8..9be0a6120fb 100644 --- a/opal/util/sys_limits.c +++ b/opal/util/sys_limits.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -17,9 +17,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/sys_limits.h b/opal/util/sys_limits.h index 28217521fca..728f2d4b72d 100644 --- a/opal/util/sys_limits.h +++ b/opal/util/sys_limits.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,7 +44,7 @@ typedef struct opal_sys_limits_t { * values in the following locations - provide access here */ OPAL_DECLSPEC extern opal_sys_limits_t opal_sys_limits; - + /* Get the system resource limits and, if requested, set * them to the specified limit */ diff --git a/opal/util/timings.c b/opal/util/timings.c index a54feb7b270..9459ab52050 100644 --- a/opal/util/timings.c +++ b/opal/util/timings.c @@ -2,9 +2,9 @@ * Copyright (C) 2014 Artem Polyakov * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -202,7 +202,7 @@ static get_ts_t _init_timestamping(opal_timer_type_t type) static opal_timing_event_t *opal_timing_event_alloc(opal_timing_t *t) { if( t->buffer_offset >= t->buffer_size ){ - // notch timings overhead + // notch timings overhead double alloc_begin = t->get_ts(); t->buffer = malloc(sizeof(opal_timing_event_t)*t->buffer_size); @@ -216,7 +216,7 @@ static opal_timing_event_t *opal_timing_event_alloc(opal_timing_t *t) t->buffer_offset = 0; t->buffer[0].fib = 1; t->buffer[0].ts_ovh = alloc_end - alloc_begin; - } + } int tmp = t->buffer_offset; (t->buffer_offset)++; return t->buffer + tmp; @@ -460,7 +460,7 @@ int opal_timing_report(opal_timing_t *t, char *fname) } _prepare_descriptions(t, &descr); - + buf = malloc(OPAL_TIMING_OUTBUF_SIZE+1); if( buf == NULL ){ rc = OPAL_ERR_OUT_OF_RESOURCE; diff --git a/opal/util/timings.h b/opal/util/timings.h index 9ca762d5d56..7e6a803cade 100644 --- a/opal/util/timings.h +++ b/opal/util/timings.h @@ -2,9 +2,9 @@ * Copyright (C) 2014 Artem Polyakov * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/uri.c b/opal/util/uri.c index b01f30fa70c..f679b9a3c96 100644 --- a/opal/util/uri.c +++ b/opal/util/uri.c @@ -4,9 +4,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/util/uri.h b/opal/util/uri.h index 7f578f13c94..87cdec8849c 100644 --- a/opal/util/uri.h +++ b/opal/util/uri.h @@ -2,9 +2,9 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * @file diff --git a/opal/win32/opal_inet.h b/opal/win32/opal_inet.h index 8b8e6e6f893..a3e6a71e88d 100644 --- a/opal/win32/opal_inet.h +++ b/opal/win32/opal_inet.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2009 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$ */ diff --git a/opal/win32/opal_misc.h b/opal/win32/opal_misc.h index d5e843c2eff..545f20ed523 100644 --- a/opal/win32/opal_misc.h +++ b/opal/win32/opal_misc.h @@ -64,10 +64,10 @@ static __inline unsigned int sleep(unsigned int seconds) { return 0; } -/* this function can currently ONLY return the page size. for it to +/* this function can currently ONLY return the page size. for it to do the entire sysconf range it needs to be extended */ static __inline size_t sysconf(int option) { - + SYSTEM_INFO sys_info; if( _SC_OPEN_MAX == option ) { @@ -88,7 +88,7 @@ static __inline size_t sysconf(int option) { #define F_SETFL 1 #define O_NONBLOCK 0 /* - * this function is currently defined only for setting the socket to be + * this function is currently defined only for setting the socket to be * in the non-blocking mode. Else this function returns error not implemented. * This calls ioctlsocket in the winsock library */ diff --git a/opal/win32/opal_process.c b/opal/win32/opal_process.c index 1bc21197754..92d0b32a4a2 100644 --- a/opal/win32/opal_process.c +++ b/opal/win32/opal_process.c @@ -27,14 +27,14 @@ int kill(pid_t pid, int sig) { /* XXX fill this in */ /* Need to connect to the child process Then raise the signal since Windows doesn;t - have the ability to 'send a signal' to a + have the ability to 'send a signal' to a process, a la the kill command in UNIX - + MSVC functions to look at: - OpenProcess - TerminateProcess - raise */ - + return 0; } diff --git a/opal/win32/opal_socket.h b/opal/win32/opal_socket.h index f05855139d6..dfd0f28e997 100644 --- a/opal/win32/opal_socket.h +++ b/opal/win32/opal_socket.h @@ -1,10 +1,10 @@ /* - * Copyright (c) 2010 High Performance Computing Center Stuttgart, + * Copyright (c) 2010 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/opal/win32/opal_time.c b/opal/win32/opal_time.c index 0d2213faa49..6eb4f8b943d 100644 --- a/opal/win32/opal_time.c +++ b/opal/win32/opal_time.c @@ -28,13 +28,13 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) FILETIME file_time; LARGE_INTEGER place_holder; __int64 time; - + /* returns 64 bit value which is the number of 100 nanosecond intervals since 1601(UTC) */ GetSystemTimeAsFileTime (&file_time); - /* Windows recommends that we should copy the FILETIME returned + /* Windows recommends that we should copy the FILETIME returned into a ULARGE_INTEGER and then perform the arithmetic on that */ place_holder.LowPart = file_time.dwLowDateTime; place_holder.HighPart = file_time.dwHighDateTime; @@ -46,7 +46,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) /* convert 100 nanoseconds intervals into microseconds .. divide by 10 */ time /= 10; - + tv->tv_sec = (long)(time / 1000000); tv->tv_usec = (long)(time % 1000000); diff --git a/opal/win32/opal_time.h b/opal/win32/opal_time.h index a81cbc2e22f..daa2aff5806 100644 --- a/opal/win32/opal_time.h +++ b/opal/win32/opal_time.h @@ -70,7 +70,7 @@ } \ } while (0) #endif - + #ifndef timersub #define timersub(tvp, uvp, vvp) \ do { \ @@ -167,7 +167,7 @@ struct timespec /* NOTE: The use of timezone is obsolete even in linux and my gettimeofday -function is not going to support it either. So, please be aware of the +function is not going to support it either. So, please be aware of the fact that if you expect to pass anything here, then you are DEAD :-D */ struct timezone { diff --git a/opal/win32/opal_uio.c b/opal/win32/opal_uio.c index fd7ac9f3530..221a2297417 100644 --- a/opal/win32/opal_uio.c +++ b/opal/win32/opal_uio.c @@ -37,7 +37,7 @@ int writev( int fd, struct iovec * iov, int cnt ) return err; } return (int) sendlen; -} +} int readv( int fd, struct iovec * iov, int cnt ) @@ -52,5 +52,5 @@ int readv( int fd, struct iovec * iov, int cnt ) return err; } return (int) recvlen; -} +} diff --git a/opal/win32/opal_uio.h b/opal/win32/opal_uio.h index 6f07d221d04..b97be357a7d 100644 --- a/opal/win32/opal_uio.h +++ b/opal/win32/opal_uio.h @@ -42,7 +42,7 @@ BEGIN_C_DECLS */ OPAL_DECLSPEC int writev (int fd, struct iovec *iov, int cnt); -/* +/* readv reads data from file descriptor fd, and puts the result in the buffers described by iov. The number of buffers is specified by cnt. The buffers are filled in the order specified. Operates just diff --git a/opal/win32/opal_utsname.c b/opal/win32/opal_utsname.c index 68ff943c078..693e0ad5e67 100644 --- a/opal/win32/opal_utsname.c +++ b/opal/win32/opal_utsname.c @@ -5,14 +5,14 @@ Copyright (c) 2004-2014 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. - Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + 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$ */ @@ -22,13 +22,13 @@ /* This has to fill in the following information - 1. sysname: name of the operating system -- + 1. sysname: name of the operating system -- 2. nodename: GetComputerName 3. release: GetVersionEx 4. version: GetVersionEx 5. machine: GetSystemInfo */ - + int uname( struct utsname *un ) { TCHAR env_variable[] = "OS=%OS%"; @@ -37,7 +37,7 @@ int uname( struct utsname *un ) SYSTEM_INFO sys_info; TCHAR info_buf[OPAL_UTSNAME_LEN]; - info_buf_count = ExpandEnvironmentStrings( env_variable, info_buf, OPAL_UTSNAME_LEN); + info_buf_count = ExpandEnvironmentStrings( env_variable, info_buf, OPAL_UTSNAME_LEN); if (0 == info_buf_count) { snprintf( un->sysname, OPAL_UTSNAME_LEN, "Unknown" ); } else { @@ -46,13 +46,13 @@ int uname( struct utsname *un ) } info_buf_count = OPAL_UTSNAME_LEN; if (!GetComputerName( un->nodename, &info_buf_count)) { - snprintf(un->nodename, OPAL_UTSNAME_LEN, "undefined"); + snprintf(un->nodename, OPAL_UTSNAME_LEN, "undefined"); } - + version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (!GetVersionEx(&version_info)) { - snprintf(un->release, OPAL_UTSNAME_LEN, "undefined"); - snprintf(un->version, OPAL_UTSNAME_LEN, "undefined"); + snprintf(un->release, OPAL_UTSNAME_LEN, "undefined"); + snprintf(un->version, OPAL_UTSNAME_LEN, "undefined"); } else { /* fill in both release and version information */ snprintf( un->release, OPAL_UTSNAME_LEN, "%d.%d.%d", diff --git a/opal/win32/opal_utsname.h b/opal/win32/opal_utsname.h index 18b611ef1a5..11bd45c52fd 100644 --- a/opal/win32/opal_utsname.h +++ b/opal/win32/opal_utsname.h @@ -5,14 +5,14 @@ * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ diff --git a/opal/win32/win_compat.h b/opal/win32/win_compat.h index 06de1dee593..dc7aeb45f61 100644 --- a/opal/win32/win_compat.h +++ b/opal/win32/win_compat.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2009 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) 2014 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -47,7 +47,7 @@ */ #define _CRT_RAND_S -/* It is always better to include windows.h with the lean and mean option. +/* It is always better to include windows.h with the lean and mean option. So, include it with that option and then include some which are required. Note: this file is included only on windows */ @@ -59,7 +59,7 @@ #endif /* VC_EXTRALEAN */ #include -/* FD_SETSIZE determines how many sockets windows can select() on. If not defined +/* FD_SETSIZE determines how many sockets windows can select() on. If not defined before including winsock2.h, it is defined to be 64. We are going to go ahead and make it 1024 for now. PLEASE CHECK IF THIS IS RIGHT */ #define FD_SETSIZE 1024 @@ -136,10 +136,10 @@ typedef unsigned int uint; #define unlink _unlink #define dup2 _dup2 #define dup _dup -#define write _write -#define read _read -#define fileno _fileno -#define isatty _isatty +#define write _write +#define read _read +#define fileno _fileno +#define isatty _isatty #define execvp _execvp #define S_ISDIR(STAT_MODE) ((STAT_MODE) & _S_IFDIR) #define S_ISREG(STAT_MODE) ((STAT_MODE) & _S_IFREG) @@ -264,7 +264,7 @@ typedef unsigned int uint; #define SIGKILL 9 #define SIGUSR1 10 /* 11 is used for SIGSEGV on windows */ -#define SIGUSR2 12 +#define SIGUSR2 12 #define SIGPIPE 13 #define SIGALRM 14 /* 15 is used for SIGTERM on windows */ @@ -285,7 +285,7 @@ typedef unsigned int uint; #define SIGWINCH 30 #define SIGIO 31 -/* Note: +/* Note: * The two defines below are likely to break the orte_wait * functionality. The proper method of replacing these bits * of functionality is left for further investigated. @@ -296,8 +296,8 @@ typedef unsigned int uint; #define sigset_t int #define in_addr_t uint32_t -/* Need to define _Bool here for different version of VS. - The definition in opal_config_bottom.h won't help, +/* Need to define _Bool here for different version of VS. + The definition in opal_config_bottom.h won't help, as long as we have a mixed C and C++ projects in one solution. */ #if defined(_MSC_VER) && _MSC_VER < 1600 #define _Bool BOOL diff --git a/opal/win_makefile b/opal/win_makefile index c1f2fe6c840..c86ff8e7555 100644 --- a/opal/win_makefile +++ b/opal/win_makefile @@ -6,14 +6,14 @@ # 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, +# 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$ # # This is a simple makefile for windows which makes all the components @@ -85,13 +85,13 @@ C_SUBDIRS = \ mca/schema/base \ win32/generated_source \ win \ - win32 + win32 -EXTRA_DIRS = +EXTRA_DIRS = # # Files included by the dist that we don't want to compile -# +# EXCLUDE_FILES = dt_arch.c \ epoll.c \ epoll_sub.c \ @@ -187,7 +187,7 @@ ADDLIBS = \ oleaut32.lib \ uuid.lib \ odbc32.lib \ - odbccp32.lib + odbccp32.lib .c.obj: $(CXX) $(CXXFLAGS) $*.c @@ -231,9 +231,9 @@ install: @install -p ${topdir}/src/libmpi.dll ${installdir}/lib/libmpi.dll @install -d ${topdir}/include ${installdir}/include/ @install -p ${topdir}/include/ompi_config_bottom.h \ - ${installdir}/include/ompi_config_bottom.h + ${installdir}/include/ompi_config_bottom.h @install -p ${topdir}/src/win32/generated_include/opal_config.h \ - ${installdir}/include/opal_config.h + ${installdir}/include/opal_config.h @install -p ${topdir}/include/mpi.h ${installdir}/include/mpi.h @install -p ${topdir}/include/ompi_stdint.h ${installdir}/include/ompi_stdint.h @install -d ${topdir}/src/win32 ${installdir}/include/win32 diff --git a/orte/Doxyfile b/orte/Doxyfile index 6ac44c8263e..f992c6096cf 100644 --- a/orte/Doxyfile +++ b/orte/Doxyfile @@ -401,7 +401,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are diff --git a/orte/Makefile.am b/orte/Makefile.am index 2bcde23d682..6af81a22e39 100644 --- a/orte/Makefile.am +++ b/orte/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -13,9 +13,9 @@ # Copyright (c) 2015 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/etc/Makefile.am b/orte/etc/Makefile.am index e657449169e..7bfaa3d648e 100644 --- a/orte/etc/Makefile.am +++ b/orte/etc/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -46,7 +46,7 @@ install-data-local: done # Only remove if exactly the same as what in our tree -# NOTE TO READER: Bourne shell if ... fi evaluates the body if +# NOTE TO READER: Bourne shell if ... fi evaluates the body if # the return of the evaluted command is 0 (as opposed to non-zero # as used by everyone else) uninstall-local: diff --git a/orte/etc/openmpi-default-hostfile b/orte/etc/openmpi-default-hostfile index 0051d155e40..ad5a0f79392 100644 --- a/orte/etc/openmpi-default-hostfile +++ b/orte/etc/openmpi-default-hostfile @@ -5,21 +5,21 @@ # 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, +# 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$ # # This is the default hostfile for Open MPI. Notice that it does not # contain any hosts (not even localhost). This file should only # contain hosts if a system administrator wants users to always have # the same set of default hosts, and is not using a batch scheduler -# (such as SLURM, PBS, etc.). +# (such as SLURM, PBS, etc.). # # Note that this file is *not* used when running in "managed" # environments (e.g., running in a job under a job scheduler, such as @@ -32,5 +32,5 @@ # components were able to find any hosts to run on (this behavior can # be disabled by excluding the localhost RAS component by specifying # the value "^localhost" [without the quotes] to the "ras" MCA -# parameter). +# parameter). diff --git a/orte/include/Makefile.am b/orte/include/Makefile.am index 1ce844d8628..1145edd6383 100644 --- a/orte/include/Makefile.am +++ b/orte/include/Makefile.am @@ -6,27 +6,27 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # headers = orte_config.h -nodist_headers = +nodist_headers = include orte/Makefile.am EXTRA_DIST = $(headers) -if WANT_INSTALL_HEADERS +if WANT_INSTALL_HEADERS ortedir = $(orteincludedir) nobase_dist_orte_HEADERS = $(headers) nobase_nodist_orte_HEADERS = $(nodist_headers) diff --git a/orte/include/orte/Makefile.am b/orte/include/orte/Makefile.am index 021c02f419d..26d995f64d4 100644 --- a/orte/include/orte/Makefile.am +++ b/orte/include/orte/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/orte/include/orte/version.h.in b/orte/include/orte/version.h.in index b9b373e7371..09e489121cd 100644 --- a/orte/include/orte/version.h.in +++ b/orte/include/orte/version.h.in @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * This file should be included by any file that needs full diff --git a/orte/mca/Makefile.am b/orte/mca/Makefile.am index 8d3fca3fb4f..89dcb0f652b 100644 --- a/orte/mca/Makefile.am +++ b/orte/mca/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/orte/mca/common/Makefile.am b/orte/mca/common/Makefile.am index 33bbb5f2a33..4567c654307 100644 --- a/orte/mca/common/Makefile.am +++ b/orte/mca/common/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/common/alps/Makefile.am b/orte/mca/common/alps/Makefile.am index f7e8be173d6..248c1e8277a 100644 --- a/orte/mca/common/alps/Makefile.am +++ b/orte/mca/common/alps/Makefile.am @@ -3,9 +3,9 @@ # Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. # Copyright (c) 2012-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -15,7 +15,7 @@ headers = \ common_alps.h sources = \ - common_alps.c + common_alps.c lib_LTLIBRARIES = diff --git a/orte/mca/common/alps/common_alps.c b/orte/mca/common/alps/common_alps.c index 6fd77ad0545..9c34da803a4 100644 --- a/orte/mca/common/alps/common_alps.c +++ b/orte/mca/common/alps/common_alps.c @@ -5,16 +5,16 @@ * 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, + * 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) 2014 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -57,7 +57,7 @@ int orte_common_alps_proc_in_pagg(bool *flag) snprintf(task_is_app_fname,sizeof(task_is_app_fname), "/proc/self/task/%ld/task_is_app",syscall(SYS_gettid)); fd_task_is_app = fopen(task_is_app_fname, "r"); - if (fd_task_is_app != NULL) { /* okay we're in a PAGG container, + if (fd_task_is_app != NULL) { /* okay we're in a PAGG container, and we are an app task (not just a process running on a mom node, for example), */ *flag = 1; diff --git a/orte/mca/common/alps/common_alps.h b/orte/mca/common/alps/common_alps.h index 21333f733d7..701dc165b11 100644 --- a/orte/mca/common/alps/common_alps.h +++ b/orte/mca/common/alps/common_alps.h @@ -7,9 +7,9 @@ * of Tennessee Research Foundation. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/common/alps/configure.m4 b/orte/mca/common/alps/configure.m4 index 519dd23b0dd..64f83199426 100644 --- a/orte/mca/common/alps/configure.m4 +++ b/orte/mca/common/alps/configure.m4 @@ -22,7 +22,7 @@ # $HEADER$ # -# MCA_orte_common_alps_CONFIG([action-if-can-compile], +# MCA_orte_common_alps_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_orte_common_alps_CONFIG],[ diff --git a/orte/mca/dfs/Makefile.am b/orte/mca/dfs/Makefile.am index 754c339692a..c374dfcff8a 100644 --- a/orte/mca/dfs/Makefile.am +++ b/orte/mca/dfs/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/dfs/app/Makefile.am b/orte/mca/dfs/app/Makefile.am index 9e35fa68091..c146d483fe9 100644 --- a/orte/mca/dfs/app/Makefile.am +++ b/orte/mca/dfs/app/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/dfs/app/dfs_app.c b/orte/mca/dfs/app/dfs_app.c index 398029b5566..7110ff4fcdc 100644 --- a/orte/mca/dfs/app/dfs_app.c +++ b/orte/mca/dfs/app/dfs_app.c @@ -5,9 +5,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -610,7 +610,7 @@ static void process_opens(int fd, short args, void *cbdata) opal_list_remove_item(&requests, &dfs->super); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending open file request to %s file %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -716,7 +716,7 @@ static void process_close(int fd, short args, void *cbdata) ORTE_ERROR_LOG(rc); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending close file request to %s for fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -1104,7 +1104,7 @@ static void process_reads(int fd, short args, void *cbdata) ORTE_ERROR_LOG(rc); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending read file request to %s for fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), diff --git a/orte/mca/dfs/app/dfs_app.h b/orte/mca/dfs/app/dfs_app.h index 027ddb9c268..fef69fdf582 100644 --- a/orte/mca/dfs/app/dfs_app.h +++ b/orte/mca/dfs/app/dfs_app.h @@ -2,15 +2,15 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_dfs_app_EXPORT_H diff --git a/orte/mca/dfs/app/dfs_app_component.c b/orte/mca/dfs/app/dfs_app_component.c index 405288954e4..395c98da022 100644 --- a/orte/mca/dfs/app/dfs_app_component.c +++ b/orte/mca/dfs/app/dfs_app_component.c @@ -4,9 +4,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ /* * Public string for version number */ -const char *orte_dfs_app_component_version_string = +const char *orte_dfs_app_component_version_string = "ORTE DFS app MCA component version " ORTE_VERSION; /* @@ -38,7 +38,7 @@ static int dfs_app_component_query(mca_base_module_t **module, int *priority); */ orte_dfs_base_component_t mca_dfs_app_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component */ .base_version = { @@ -59,7 +59,7 @@ orte_dfs_base_component_t mca_dfs_app_component = }, }; -static int dfs_app_open(void) +static int dfs_app_open(void) { return ORTE_SUCCESS; } @@ -75,9 +75,9 @@ static int dfs_app_component_query(mca_base_module_t **module, int *priority) /* set our priority high as we are the default for apps */ *priority = 1000; *module = (mca_base_module_t *)&orte_dfs_app_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/dfs/base/Makefile.am b/orte/mca/dfs/base/Makefile.am index 6d44178d3cf..eb036387189 100644 --- a/orte/mca/dfs/base/Makefile.am +++ b/orte/mca/dfs/base/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/dfs/base/base.h b/orte/mca/dfs/base/base.h index 991f3e3cd06..cca2e8909d3 100644 --- a/orte/mca/dfs/base/base.h +++ b/orte/mca/dfs/base/base.h @@ -1,9 +1,9 @@ /* - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/dfs/base/dfs_base_frame.c b/orte/mca/dfs/base/dfs_base_frame.c index b82b6021194..77ce6171423 100644 --- a/orte/mca/dfs/base/dfs_base_frame.c +++ b/orte/mca/dfs/base/dfs_base_frame.c @@ -1,12 +1,12 @@ /* - * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/dfs/base/dfs_base_select.c b/orte/mca/dfs/base/dfs_base_select.c index 1a44b721b65..51826442107 100644 --- a/orte/mca/dfs/base/dfs_base_select.c +++ b/orte/mca/dfs/base/dfs_base_select.c @@ -1,9 +1,9 @@ /* - * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/dfs/dfs.h b/orte/mca/dfs/dfs.h index 7f2b6320a23..136c0d76b67 100644 --- a/orte/mca/dfs/dfs.h +++ b/orte/mca/dfs/dfs.h @@ -114,7 +114,7 @@ typedef void (*orte_dfs_base_module_post_file_map_fn_t)(opal_buffer_t *buf, void *cbdata); /* Get the file map for a process - * + * * Returns the file map associated with the specified process name. If * NULL is provided, then all known process maps will be returned in the * byte object. It is the responsibility of the caller to unpack it, so diff --git a/orte/mca/dfs/orted/Makefile.am b/orte/mca/dfs/orted/Makefile.am index 8f539db62b2..e33445e9f4b 100644 --- a/orte/mca/dfs/orted/Makefile.am +++ b/orte/mca/dfs/orted/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/dfs/orted/dfs_orted.c b/orte/mca/dfs/orted/dfs_orted.c index d72b5303ecd..574db2fa005 100644 --- a/orte/mca/dfs/orted/dfs_orted.c +++ b/orte/mca/dfs/orted/dfs_orted.c @@ -6,9 +6,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -404,7 +404,7 @@ static void process_opens(int fd, short args, void *cbdata) opal_list_remove_item(&requests, &dfs->super); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending open file request to %s file %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -518,7 +518,7 @@ static void process_close(int fd, short args, void *cbdata) ORTE_ERROR_LOG(rc); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending close file request to %s for fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -881,7 +881,7 @@ static void process_reads(int fd, short args, void *cbdata) ORTE_ERROR_LOG(rc); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending read file request to %s for fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), diff --git a/orte/mca/dfs/orted/dfs_orted.h b/orte/mca/dfs/orted/dfs_orted.h index f90e87b14ee..b2b2f440964 100644 --- a/orte/mca/dfs/orted/dfs_orted.h +++ b/orte/mca/dfs/orted/dfs_orted.h @@ -3,15 +3,15 @@ * All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_dfs_orted_EXPORT_H diff --git a/orte/mca/dfs/orted/dfs_orted_component.c b/orte/mca/dfs/orted/dfs_orted_component.c index f9ac8b178c3..f102b898b15 100644 --- a/orte/mca/dfs/orted/dfs_orted_component.c +++ b/orte/mca/dfs/orted/dfs_orted_component.c @@ -4,9 +4,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ /* * Public string for version number */ -const char *orte_dfs_orted_component_version_string = +const char *orte_dfs_orted_component_version_string = "ORTE DFS orted MCA component version " ORTE_VERSION; int orte_dfs_orted_num_worker_threads = 0; @@ -41,7 +41,7 @@ static int dfs_orted_component_query(mca_base_module_t **module, int *priority); */ orte_dfs_base_component_t mca_dfs_orted_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itdefault_orted */ .base_version = { @@ -75,7 +75,7 @@ static int dfs_orted_register(void) return ORTE_SUCCESS; } -static int dfs_orted_open(void) +static int dfs_orted_open(void) { return ORTE_SUCCESS; } @@ -91,9 +91,9 @@ static int dfs_orted_component_query(mca_base_module_t **module, int *priority) /* we are the default component for daemons and HNP */ *priority = 1000; *module = (mca_base_module_t *)&orte_dfs_orted_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/dfs/test/Makefile.am b/orte/mca/dfs/test/Makefile.am index b73680ec297..965483fa862 100644 --- a/orte/mca/dfs/test/Makefile.am +++ b/orte/mca/dfs/test/Makefile.am @@ -1,9 +1,9 @@ # # Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/dfs/test/dfs_test.c b/orte/mca/dfs/test/dfs_test.c index 13012bc9e8a..6d493d3ad27 100644 --- a/orte/mca/dfs/test/dfs_test.c +++ b/orte/mca/dfs/test/dfs_test.c @@ -5,9 +5,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -453,7 +453,7 @@ static void process_opens(int fd, short args, void *cbdata) opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s PROCESSING OPEN", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); - + /* get the scheme to determine if we can process locally or not */ if (NULL == (scheme = opal_uri_get_scheme(dfs->uri))) { ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM); @@ -541,7 +541,7 @@ static void process_opens(int fd, short args, void *cbdata) opal_list_remove_item(&requests, &dfs->super); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending open file request to %s file %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -649,7 +649,7 @@ static void process_close(int fd, short args, void *cbdata) ORTE_ERROR_LOG(rc); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending close file request to %s for fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -955,7 +955,7 @@ static void process_reads(int fd, short args, void *cbdata) ORTE_ERROR_LOG(rc); goto complete; } - + opal_output_verbose(1, orte_dfs_base_framework.framework_output, "%s sending read file request to %s for fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), diff --git a/orte/mca/dfs/test/dfs_test.h b/orte/mca/dfs/test/dfs_test.h index 5b6d4235303..d9ef7b301bb 100644 --- a/orte/mca/dfs/test/dfs_test.h +++ b/orte/mca/dfs/test/dfs_test.h @@ -2,15 +2,15 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_dfs_test_EXPORT_H diff --git a/orte/mca/dfs/test/dfs_test_component.c b/orte/mca/dfs/test/dfs_test_component.c index fda025e504e..11ec09ced4e 100644 --- a/orte/mca/dfs/test/dfs_test_component.c +++ b/orte/mca/dfs/test/dfs_test_component.c @@ -4,9 +4,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ /* * Public string for version number */ -const char *orte_dfs_test_component_version_string = +const char *orte_dfs_test_component_version_string = "ORTE DFS test MCA component version " ORTE_VERSION; /* @@ -39,7 +39,7 @@ static int dfs_test_component_query(mca_base_module_t **module, int *priority); */ orte_dfs_base_component_t mca_dfs_test_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component */ .base_version = { @@ -74,8 +74,8 @@ static int dfs_test_register(void) return ORTE_SUCCESS; } - -static int dfs_test_open(void) + +static int dfs_test_open(void) { return ORTE_SUCCESS; } @@ -91,9 +91,9 @@ static int dfs_test_component_query(mca_base_module_t **module, int *priority) /* set our priority high so apps use us */ *priority = 10000; *module = (mca_base_module_t *)&orte_dfs_test_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/errmgr/Makefile.am b/orte/mca/errmgr/Makefile.am index c13982069e0..499b67d20a2 100644 --- a/orte/mca/errmgr/Makefile.am +++ b/orte/mca/errmgr/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/errmgr/base/Makefile.am b/orte/mca/errmgr/base/Makefile.am index 0ace6905bda..b901a8b4656 100644 --- a/orte/mca/errmgr/base/Makefile.am +++ b/orte/mca/errmgr/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2012-2013 Los Alamos National Security, Inc. All rights reserved. +# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/errmgr/base/base.h b/orte/mca/errmgr/base/base.h index 1b36e03d257..8cbce632162 100644 --- a/orte/mca/errmgr/base/base.h +++ b/orte/mca/errmgr/base/base.h @@ -5,15 +5,15 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/errmgr/base/errmgr_base_fns.c b/orte/mca/errmgr/base/errmgr_base_fns.c index 1c0dc61103a..87da0a8b5d5 100644 --- a/orte/mca/errmgr/base/errmgr_base_fns.c +++ b/orte/mca/errmgr/base/errmgr_base_fns.c @@ -5,11 +5,11 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. @@ -17,9 +17,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -188,7 +188,7 @@ void orte_errmgr_base_log(int error_code, char *filename, int line) /* if the error is silent, say nothing */ return; } - + opal_output(0, "%s ORTE_ERROR_LOG: %s in file %s at line %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), errstring, filename, line); @@ -197,7 +197,7 @@ void orte_errmgr_base_log(int error_code, char *filename, int line) void orte_errmgr_base_abort(int error_code, char *fmt, ...) { va_list arglist; - + /* If there was a message, output it */ va_start(arglist, fmt); if( NULL != fmt ) { @@ -207,7 +207,7 @@ void orte_errmgr_base_abort(int error_code, char *fmt, ...) free( buffer ); } va_end(arglist); - + /* if I am a daemon or the HNP... */ if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) { /* whack my local procs */ @@ -551,7 +551,7 @@ int orte_errmgr_base_update_app_context_for_cr_recovery(orte_job_t *jobdata, global_snapshot_seq); orte_set_attribute(&new_app_context->attributes, ORTE_APP_SSTORE_LOAD, ORTE_ATTR_LOCAL, sload, OPAL_STRING); free(sload); - + /* Add it to the job_t data structure */ /*current_global_jobdata->num_apps++; */ new_app_context->idx = (jobdata->num_apps); diff --git a/orte/mca/errmgr/base/errmgr_base_frame.c b/orte/mca/errmgr/base/errmgr_base_frame.c index 1f771142d63..455779cdc13 100644 --- a/orte/mca/errmgr/base/errmgr_base_frame.c +++ b/orte/mca/errmgr/base/errmgr_base_frame.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/errmgr/base/errmgr_base_select.c b/orte/mca/errmgr/base/errmgr_base_select.c index 1615633eadc..761019c9ceb 100644 --- a/orte/mca/errmgr/base/errmgr_base_select.c +++ b/orte/mca/errmgr/base/errmgr_base_select.c @@ -5,16 +5,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/errmgr/base/errmgr_base_tool.c b/orte/mca/errmgr/base/errmgr_base_tool.c index 2c4bd462a7f..6fe45e0d913 100644 --- a/orte/mca/errmgr/base/errmgr_base_tool.c +++ b/orte/mca/errmgr/base/errmgr_base_tool.c @@ -6,9 +6,9 @@ * All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -274,18 +274,18 @@ static int errmgr_base_tool_start_cmdline_listener(void) static int errmgr_base_tool_stop_cmdline_listener(void) { int exit_status = ORTE_SUCCESS; - + if (!errmgr_cmdline_recv_issued && ORTE_PROC_IS_HNP) { return ORTE_SUCCESS; } - + OPAL_OUTPUT_VERBOSE((5, orte_errmgr_base_framework.framework_output, "errmgr:base:tool: Shutdown Command Line Channel")); - + orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_MIGRATE); errmgr_cmdline_recv_issued = false; - + return exit_status; } diff --git a/orte/mca/errmgr/base/errmgr_private.h b/orte/mca/errmgr/base/errmgr_private.h index 033b91b3078..b49bb57478a 100644 --- a/orte/mca/errmgr/base/errmgr_private.h +++ b/orte/mca/errmgr/base/errmgr_private.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2010 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. @@ -13,9 +13,9 @@ * Copyright (c) 2011 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/errmgr/base/help-errmgr-base.txt b/orte/mca/errmgr/base/help-errmgr-base.txt index ca6211fbd66..c7e3051bb95 100644 --- a/orte/mca/errmgr/base/help-errmgr-base.txt +++ b/orte/mca/errmgr/base/help-errmgr-base.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # diff --git a/orte/mca/errmgr/default_app/Makefile.am b/orte/mca/errmgr/default_app/Makefile.am index e12806170ea..587d65b780f 100644 --- a/orte/mca/errmgr/default_app/Makefile.am +++ b/orte/mca/errmgr/default_app/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/errmgr/default_app/errmgr_default_app.c b/orte/mca/errmgr/default_app/errmgr_default_app.c index d2a400bc993..8ee289e040d 100644 --- a/orte/mca/errmgr/default_app/errmgr_default_app.c +++ b/orte/mca/errmgr/default_app/errmgr_default_app.c @@ -2,7 +2,7 @@ * Copyright (c) 2009-2011 The Trustees of Indiana University. * All rights reserved. * - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights @@ -10,9 +10,9 @@ * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -112,7 +112,7 @@ static void proc_errors(int fd, short args, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&caddy->name), orte_proc_state_to_str(caddy->proc_state))); - + /* * if orte is trying to shutdown, just let it */ diff --git a/orte/mca/errmgr/default_app/errmgr_default_app.h b/orte/mca/errmgr/default_app/errmgr_default_app.h index 8c93ea4e7d1..19c4d5ada83 100644 --- a/orte/mca/errmgr/default_app/errmgr_default_app.h +++ b/orte/mca/errmgr/default_app/errmgr_default_app.h @@ -2,15 +2,15 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_ERRMGR_default_app_EXPORT_H diff --git a/orte/mca/errmgr/default_app/errmgr_default_app_component.c b/orte/mca/errmgr/default_app/errmgr_default_app_component.c index c56fbbf2931..2a81af6a413 100644 --- a/orte/mca/errmgr/default_app/errmgr_default_app_component.c +++ b/orte/mca/errmgr/default_app/errmgr_default_app_component.c @@ -5,9 +5,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -21,7 +21,7 @@ /* * Public string for version number */ -const char *orte_errmgr_default_app_component_version_string = +const char *orte_errmgr_default_app_component_version_string = "ORTE ERRMGR default_app MCA component version " ORTE_VERSION; /* @@ -38,7 +38,7 @@ static int errmgr_default_app_component_query(mca_base_module_t **module, int *p */ orte_errmgr_base_component_t mca_errmgr_default_app_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component */ .base_version = { @@ -75,7 +75,7 @@ static int errmgr_default_app_register(void) return ORTE_SUCCESS; } -static int errmgr_default_app_open(void) +static int errmgr_default_app_open(void) { return ORTE_SUCCESS; } @@ -91,9 +91,9 @@ static int errmgr_default_app_component_query(mca_base_module_t **module, int *p /* set our priority high as we are the default for apps */ *priority = my_priority; *module = (mca_base_module_t *)&orte_errmgr_default_app_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/errmgr/default_hnp/Makefile.am b/orte/mca/errmgr/default_hnp/Makefile.am index b6b12cf9677..65d2dd3d18f 100644 --- a/orte/mca/errmgr/default_hnp/Makefile.am +++ b/orte/mca/errmgr/default_hnp/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c index e01138c54e3..1fd1d24403c 100644 --- a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c +++ b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c @@ -1,19 +1,19 @@ /* * Copyright (c) 2009-2011 The Trustees of Indiana University. * All rights reserved. - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2004-2011 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2011 Oracle and/or all its affiliates. All rights reserved. + * Copyright (c) 2011 Oracle and/or all its affiliates. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -260,7 +260,7 @@ static void job_errors(int fd, short args, void *cbdata) jdata->num_procs != jdata->num_reported) { orte_show_help("help-errmgr-base.txt", "failed-daemon", true); } - + /* abort the job */ ORTE_ACTIVATE_JOB_STATE(caddy->jdata, ORTE_JOB_STATE_FORCED_EXIT); /* set the global abnormal exit flag */ @@ -283,7 +283,7 @@ static void proc_errors(int fd, short args, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(proc), orte_proc_state_to_str(state))); - + /* * if orte is trying to shutdown, just let it */ @@ -674,7 +674,7 @@ static void default_hnp_abort(orte_job_t *jdata) "%s errmgr:default_hnp: abort called on job %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_JOBID_PRINT(jdata->jobid))); - + /* set control params to indicate we are terminating */ orte_job_term_ordered = true; orte_enable_recovery = false; @@ -704,7 +704,7 @@ static void default_hnp_abort(orte_job_t *jdata) OPAL_OUTPUT_VERBOSE((1, orte_errmgr_base_framework.framework_output, "%s errmgr:default_hnp: ordering orted termination", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - + /* tell the plm to terminate the orteds - they will automatically * kill their local procs */ diff --git a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.h b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.h index 226e424a84b..c8bad995abe 100644 --- a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.h +++ b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.h @@ -5,15 +5,15 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_ERRMGR_default_hnp_EXPORT_H diff --git a/orte/mca/errmgr/default_hnp/errmgr_default_hnp_component.c b/orte/mca/errmgr/default_hnp/errmgr_default_hnp_component.c index b2a725e384f..640baa3b33a 100644 --- a/orte/mca/errmgr/default_hnp/errmgr_default_hnp_component.c +++ b/orte/mca/errmgr/default_hnp/errmgr_default_hnp_component.c @@ -5,9 +5,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ /* * Public string for version number */ -const char *orte_errmgr_default_hnp_component_version_string = +const char *orte_errmgr_default_hnp_component_version_string = "ORTE ERRMGR default_hnp MCA component version " ORTE_VERSION; /* @@ -38,7 +38,7 @@ static int default_hnp_component_query(mca_base_module_t **module, int *priority * and pointer to our public functions in it */ orte_errmgr_base_component_t mca_errmgr_default_hnp_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component default_hnp */ .base_version = { @@ -76,7 +76,7 @@ static int default_hnp_register(void) return ORTE_SUCCESS; } -static int default_hnp_open(void) +static int default_hnp_open(void) { return ORTE_SUCCESS; } diff --git a/orte/mca/errmgr/default_orted/Makefile.am b/orte/mca/errmgr/default_orted/Makefile.am index d8c03e751c8..dd1ee34d359 100644 --- a/orte/mca/errmgr/default_orted/Makefile.am +++ b/orte/mca/errmgr/default_orted/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/errmgr/default_orted/errmgr_default_orted.c b/orte/mca/errmgr/default_orted/errmgr_default_orted.c index 42ebe55fd3e..a686484a022 100644 --- a/orte/mca/errmgr/default_orted/errmgr_default_orted.c +++ b/orte/mca/errmgr/default_orted/errmgr_default_orted.c @@ -10,9 +10,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -400,7 +400,7 @@ static void proc_errors(int fd, short args, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), orte_proc_state_to_str(state), ORTE_NAME_PRINT(proc))); - + if (ORTE_PROC_STATE_TERM_NON_ZERO == state) { /* update the state */ child->state = state; @@ -568,7 +568,7 @@ static void proc_errors(int fd, short args, void *cbdata) "%s errmgr:default_orted reporting all procs in %s terminated", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_JOBID_PRINT(jdata->jobid))); - + /* remove all of this job's children from the global list */ for (i=0; i < orte_local_children->size; i++) { if (NULL == (ptr = (orte_proc_t*)opal_pointer_array_get_item(orte_local_children, i))) { @@ -742,7 +742,7 @@ static void killprocs(orte_jobid_t job, orte_vpid_t vpid) orte_proc_t proc; int rc; - if (ORTE_JOBID_WILDCARD == job + if (ORTE_JOBID_WILDCARD == job && ORTE_VPID_WILDCARD == vpid) { if (ORTE_SUCCESS != (rc = orte_odls.kill_local_procs(NULL))) { ORTE_ERROR_LOG(rc); diff --git a/orte/mca/errmgr/default_orted/errmgr_default_orted.h b/orte/mca/errmgr/default_orted/errmgr_default_orted.h index 9f4d4da7258..13f6968065a 100644 --- a/orte/mca/errmgr/default_orted/errmgr_default_orted.h +++ b/orte/mca/errmgr/default_orted/errmgr_default_orted.h @@ -2,15 +2,15 @@ * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_ERRMGR_default_orted_EXPORT_H diff --git a/orte/mca/errmgr/default_orted/errmgr_default_orted_component.c b/orte/mca/errmgr/default_orted/errmgr_default_orted_component.c index 3ed11d8c464..1f519fb9d16 100644 --- a/orte/mca/errmgr/default_orted/errmgr_default_orted_component.c +++ b/orte/mca/errmgr/default_orted/errmgr_default_orted_component.c @@ -5,9 +5,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -21,7 +21,7 @@ /* * Public string for version number */ -const char *orte_errmgr_default_orted_component_version_string = +const char *orte_errmgr_default_orted_component_version_string = "ORTE ERRMGR default_orted MCA component version " ORTE_VERSION; /* @@ -38,7 +38,7 @@ static int errmgr_default_orted_component_query(mca_base_module_t **module, int */ orte_errmgr_base_component_t mca_errmgr_default_orted_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component itdefault_orted */ .base_version = { @@ -76,7 +76,7 @@ static int errmgr_default_orted_register(void) return ORTE_SUCCESS; } -static int errmgr_default_orted_open(void) +static int errmgr_default_orted_open(void) { return ORTE_SUCCESS; } @@ -92,9 +92,9 @@ static int errmgr_default_orted_component_query(mca_base_module_t **module, int /* we are the default component for daemons */ *priority = my_priority; *module = (mca_base_module_t *)&orte_errmgr_default_orted_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/errmgr/default_tool/Makefile.am b/orte/mca/errmgr/default_tool/Makefile.am index 99afded9ec9..e67912bfae5 100644 --- a/orte/mca/errmgr/default_tool/Makefile.am +++ b/orte/mca/errmgr/default_tool/Makefile.am @@ -1,9 +1,9 @@ # -# Copyright (c) 2013 Intel, Inc. All rights reserved. +# Copyright (c) 2013 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/errmgr/default_tool/errmgr_default_tool.c b/orte/mca/errmgr/default_tool/errmgr_default_tool.c index 94d08dc2b79..98f039c0f3c 100644 --- a/orte/mca/errmgr/default_tool/errmgr_default_tool.c +++ b/orte/mca/errmgr/default_tool/errmgr_default_tool.c @@ -2,7 +2,7 @@ * Copyright (c) 2009-2011 The Trustees of Indiana University. * All rights reserved. * - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights @@ -11,9 +11,9 @@ * All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -94,7 +94,7 @@ static void proc_errors(int fd, short args, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&caddy->name), orte_proc_state_to_str(caddy->proc_state))); - + /* * if orte is trying to shutdown, just let it */ diff --git a/orte/mca/errmgr/default_tool/errmgr_default_tool.h b/orte/mca/errmgr/default_tool/errmgr_default_tool.h index 9a68403daf6..53db4f45aac 100644 --- a/orte/mca/errmgr/default_tool/errmgr_default_tool.h +++ b/orte/mca/errmgr/default_tool/errmgr_default_tool.h @@ -2,15 +2,15 @@ * Copyright (c) 2013 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** * @file - * + * */ #ifndef MCA_ERRMGR_default_tool_EXPORT_H diff --git a/orte/mca/errmgr/default_tool/errmgr_default_tool_component.c b/orte/mca/errmgr/default_tool/errmgr_default_tool_component.c index 58ca229e08f..15164921c40 100644 --- a/orte/mca/errmgr/default_tool/errmgr_default_tool_component.c +++ b/orte/mca/errmgr/default_tool/errmgr_default_tool_component.c @@ -2,9 +2,9 @@ * Copyright (c) 2013 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -18,7 +18,7 @@ /* * Public string for version number */ -const char *orte_errmgr_default_tool_component_version_string = +const char *orte_errmgr_default_tool_component_version_string = "ORTE ERRMGR default_tool MCA component version " ORTE_VERSION; /* @@ -35,7 +35,7 @@ static int errmgr_default_tool_component_query(mca_base_module_t **module, int * */ orte_errmgr_base_component_t mca_errmgr_default_tool_component = { - /* Handle the general mca_component_t struct containing + /* Handle the general mca_component_t struct containing * meta information about the component */ .base_version = { @@ -72,7 +72,7 @@ static int errmgr_default_tool_register(void) return ORTE_SUCCESS; } -static int errmgr_default_tool_open(void) +static int errmgr_default_tool_open(void) { return ORTE_SUCCESS; } @@ -88,9 +88,9 @@ static int errmgr_default_tool_component_query(mca_base_module_t **module, int * /* set our priority high as we are the default for tools */ *priority = my_priority; *module = (mca_base_module_t *)&orte_errmgr_default_tool_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/errmgr/errmgr.h b/orte/mca/errmgr/errmgr.h index df8226a2cc1..de27a379195 100644 --- a/orte/mca/errmgr/errmgr.h +++ b/orte/mca/errmgr/errmgr.h @@ -237,7 +237,7 @@ typedef enum { ORTE_ERRMGR_CALLBACK_APPEND } orte_errmgr_error_order_t; -/** +/** * Register a callback function for faults. * * This callback function will be used anytime (other than during finalize) the diff --git a/orte/mca/ess/Makefile.am b/orte/mca/ess/Makefile.am index 11d64051270..21354432311 100644 --- a/orte/mca/ess/Makefile.am +++ b/orte/mca/ess/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/ess/alps/Makefile.am b/orte/mca/ess/alps/Makefile.am index 9a7720500e4..c9b02d29feb 100644 --- a/orte/mca/ess/alps/Makefile.am +++ b/orte/mca/ess/alps/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/ess/alps/configure.m4 b/orte/mca/ess/alps/configure.m4 index 6ad187ae3bf..23ec4fdcc1b 100644 --- a/orte/mca/ess/alps/configure.m4 +++ b/orte/mca/ess/alps/configure.m4 @@ -31,7 +31,7 @@ AC_DEFUN([MCA_orte_ess_alps_CONFIG],[ [$1 AC_SUBST([ess_alps_CPPFLAGS]) AC_SUBST([ess_alps_LDFLAGS]) - AC_SUBST([ess_alps_LIBS])], + AC_SUBST([ess_alps_LIBS])], [$2]) ])dnl diff --git a/orte/mca/ess/alps/ess_alps.h b/orte/mca/ess/alps/ess_alps.h index 92f74d5a8e6..30f58b755a5 100644 --- a/orte/mca/ess/alps/ess_alps.h +++ b/orte/mca/ess/alps/ess_alps.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/alps/ess_alps_utils.c b/orte/mca/ess/alps/ess_alps_utils.c index cc7054638b4..3e59e9fdc26 100644 --- a/orte/mca/ess/alps/ess_alps_utils.c +++ b/orte/mca/ess/alps/ess_alps_utils.c @@ -40,10 +40,10 @@ /* * use the Alps placement file to obtain * the global rank of the "first" local rank - * on the node. + * on the node. */ -int +int orte_ess_alps_get_first_rank_on_node(int *first_rank) { int alps_status = 0; diff --git a/orte/mca/ess/base/Makefile.am b/orte/mca/ess/base/Makefile.am index 5a2f8684c42..9e2d31367a5 100644 --- a/orte/mca/ess/base/Makefile.am +++ b/orte/mca/ess/base/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2013 Los Alamos National Security, LLC. All rights reserved. # Copyright (c) 2015 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/ess/base/base.h b/orte/mca/ess/base/base.h index 0b7382a3ee7..4387a5e98d8 100644 --- a/orte/mca/ess/base/base.h +++ b/orte/mca/ess/base/base.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: @@ -70,7 +70,7 @@ ORTE_DECLSPEC int orte_ess_base_tool_finalize(void); ORTE_DECLSPEC int orte_ess_base_orted_setup(char **hosts); ORTE_DECLSPEC int orte_ess_base_orted_finalize(void); -/* Detect whether or not this proc is bound - if not, +/* Detect whether or not this proc is bound - if not, * see if it should bind itself */ ORTE_DECLSPEC int orte_ess_base_proc_binding(void); diff --git a/orte/mca/ess/base/ess_base_fns.c b/orte/mca/ess/base/ess_base_fns.c index 4bf2cd9026f..1aa283fc0a7 100644 --- a/orte/mca/ess/base/ess_base_fns.c +++ b/orte/mca/ess/base/ess_base_fns.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -263,8 +263,8 @@ int orte_ess_base_proc_binding(void) /* get the cpus we are bound to */ mycpus = hwloc_bitmap_alloc(); - if (hwloc_get_cpubind(opal_hwloc_topology, - mycpus, + if (hwloc_get_cpubind(opal_hwloc_topology, + mycpus, HWLOC_CPUBIND_PROCESS) < 0) { if (NULL != orte_process_info.cpuset) { free(orte_process_info.cpuset); diff --git a/orte/mca/ess/base/ess_base_frame.c b/orte/mca/ess/base/ess_base_frame.c index 40dfc1c3da1..c05f6b7d6ff 100644 --- a/orte/mca/ess/base/ess_base_frame.c +++ b/orte/mca/ess/base/ess_base_frame.c @@ -5,16 +5,16 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/ess/base/ess_base_get.c b/orte/mca/ess/base/ess_base_get.c index 3a045ddd399..4e1b1ae09f6 100644 --- a/orte/mca/ess/base/ess_base_get.c +++ b/orte/mca/ess/base/ess_base_get.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/base/ess_base_select.c b/orte/mca/ess/base/ess_base_select.c index 352911ee2c2..72a2ef860dc 100644 --- a/orte/mca/ess/base/ess_base_select.c +++ b/orte/mca/ess/base/ess_base_select.c @@ -5,16 +5,16 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -27,7 +27,7 @@ #include "orte/mca/ess/base/base.h" -int +int orte_ess_base_select(void) { orte_ess_base_component_t *best_component = NULL; diff --git a/orte/mca/ess/base/ess_base_std_prolog.c b/orte/mca/ess/base/ess_base_std_prolog.c index 77a85ad0169..42e76a6267d 100644 --- a/orte/mca/ess/base/ess_base_std_prolog.c +++ b/orte/mca/ess/base/ess_base_std_prolog.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -39,13 +39,13 @@ int orte_ess_base_std_prolog(void) { int ret; char *error = NULL; - + /* Initialize the ORTE data type support */ if (ORTE_SUCCESS != (ret = orte_dt_init())) { error = "orte_dt_init"; goto error; } - + if (!ORTE_PROC_IS_APP) { /* * Setup the waitpid/sigchld system @@ -56,9 +56,9 @@ int orte_ess_base_std_prolog(void) goto error; } } - + return ORTE_SUCCESS; - + error: orte_show_help("help-orte-runtime", "orte_init:startup:internal-failure", diff --git a/orte/mca/ess/base/help-ess-base.txt b/orte/mca/ess/base/help-ess-base.txt index 5e315c74ecb..257a64a7279 100644 --- a/orte/mca/ess/base/help-ess-base.txt +++ b/orte/mca/ess/base/help-ess-base.txt @@ -6,14 +6,14 @@ # 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, +# 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$ # # This is the US/English general help file for the SDS base. diff --git a/orte/mca/ess/env/Makefile.am b/orte/mca/ess/env/Makefile.am index 8f9276413f2..eda412e700c 100644 --- a/orte/mca/ess/env/Makefile.am +++ b/orte/mca/ess/env/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/ess/env/ess_env.h b/orte/mca/ess/env/ess_env.h index 56285f8abda..6ed32b79fb3 100644 --- a/orte/mca/ess/env/ess_env.h +++ b/orte/mca/ess/env/ess_env.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/env/ess_env_component.c b/orte/mca/ess/env/ess_env_component.c index 3b6f8ddd7aa..e9a4a154385 100644 --- a/orte/mca/ess/env/ess_env_component.c +++ b/orte/mca/ess/env/ess_env_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -76,7 +76,7 @@ int orte_ess_env_component_query(mca_base_module_t **module, int *priority) *module = (mca_base_module_t *)&orte_ess_env_module; return ORTE_SUCCESS; } - + /* if not, then return NULL - we cannot be selected */ *priority = -1; *module = NULL; diff --git a/orte/mca/ess/env/ess_env_module.c b/orte/mca/ess/env/ess_env_module.c index dc548c38d10..792db17a518 100644 --- a/orte/mca/ess/env/ess_env_module.c +++ b/orte/mca/ess/env/ess_env_module.c @@ -5,16 +5,16 @@ * 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, + * 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 (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -105,7 +105,7 @@ static int rte_init(void) error = "orte_ess_base_std_prolog"; goto error; } - + /* Start by getting a unique name from the enviro */ env_set_name(); @@ -152,7 +152,7 @@ static int env_set_name(void) int rc; orte_jobid_t jobid; orte_vpid_t vpid; - + if (NULL == orte_ess_base_jobid) { ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); return ORTE_ERR_NOT_FOUND; @@ -173,10 +173,10 @@ static int env_set_name(void) ORTE_PROC_MY_NAME->jobid = jobid; ORTE_PROC_MY_NAME->vpid = vpid; - + OPAL_OUTPUT_VERBOSE((1, orte_ess_base_framework.framework_output, "ess:env set name to %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - + /* get the non-name common environmental variables */ if (ORTE_SUCCESS != (rc = orte_ess_env_get())) { ORTE_ERROR_LOG(rc); @@ -371,7 +371,7 @@ static int rte_ft_event(int state) ORTE_PROC_MY_NAME))) { exit_status = ret; } - + opal_output_set_output_file_info(orte_process_info.proc_session_dir, "output-", NULL, NULL); } diff --git a/orte/mca/ess/ess.h b/orte/mca/ess/ess.h index 458e66e28ec..34c2dd6324c 100644 --- a/orte/mca/ess/ess.h +++ b/orte/mca/ess/ess.h @@ -6,17 +6,17 @@ * Copyright (c) 2004-2011 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2010 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-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/ess/hnp/Makefile.am b/orte/mca/ess/hnp/Makefile.am index 7bdfba406c2..9c4a9979bfc 100644 --- a/orte/mca/ess/hnp/Makefile.am +++ b/orte/mca/ess/hnp/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/ess/hnp/ess_hnp.h b/orte/mca/ess/hnp/ess_hnp.h index 5f9400d7c1b..a4b627be532 100644 --- a/orte/mca/ess/hnp/ess_hnp.h +++ b/orte/mca/ess/hnp/ess_hnp.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/hnp/ess_hnp_component.c b/orte/mca/ess/hnp/ess_hnp_component.c index be5d1922892..84d95f64637 100644 --- a/orte/mca/ess/hnp/ess_hnp_component.c +++ b/orte/mca/ess/hnp/ess_hnp_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -78,7 +78,7 @@ int orte_ess_hnp_component_query(mca_base_module_t **module, int *priority) *module = (mca_base_module_t *)&orte_ess_hnp_module; return ORTE_SUCCESS; } - + /* else, we are not */ *priority = -1; *module = NULL; diff --git a/orte/mca/ess/lsf/Makefile.am b/orte/mca/ess/lsf/Makefile.am index 2d8c9f36341..0d4971843dc 100644 --- a/orte/mca/ess/lsf/Makefile.am +++ b/orte/mca/ess/lsf/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/ess/lsf/configure.m4 b/orte/mca/ess/lsf/configure.m4 index b37c775e5a9..b29cad6e661 100644 --- a/orte/mca/ess/lsf/configure.m4 +++ b/orte/mca/ess/lsf/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2011 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,8 +26,8 @@ AC_DEFUN([MCA_orte_ess_lsf_CONFIG],[ AC_CONFIG_FILES([orte/mca/ess/lsf/Makefile]) ORTE_CHECK_LSF([ess_lsf], [ess_lsf_good=1], [ess_lsf_good=0]) - - # if check worked, set wrapper flags if so. + + # if check worked, set wrapper flags if so. # Evaluate succeed / fail AS_IF([test "$ess_lsf_good" = "1"], [$1], diff --git a/orte/mca/ess/lsf/ess_lsf.h b/orte/mca/ess/lsf/ess_lsf.h index cd05c691d55..1d317b006c0 100644 --- a/orte/mca/ess/lsf/ess_lsf.h +++ b/orte/mca/ess/lsf/ess_lsf.h @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -23,7 +23,7 @@ BEGIN_C_DECLS ORTE_MODULE_DECLSPEC extern orte_ess_base_component_t mca_ess_lsf_component; - + /* * Module open / close */ diff --git a/orte/mca/ess/lsf/ess_lsf_component.c b/orte/mca/ess/lsf/ess_lsf_component.c index e8dbe517db8..4db3d7df0fb 100644 --- a/orte/mca/ess/lsf/ess_lsf_component.c +++ b/orte/mca/ess/lsf/ess_lsf_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -70,14 +70,14 @@ int orte_ess_lsf_component_query(mca_base_module_t **module, int *priority) * answer to both is "yes", then we were launched * by mpirun in an LSF world */ - + if (NULL != getenv("LSB_JOBID") && NULL != orte_process_info.my_hnp_uri) { *priority = 40; *module = (mca_base_module_t *)&orte_ess_lsf_module; return ORTE_SUCCESS; } - + /* nope, not here */ *priority = -1; *module = NULL; diff --git a/orte/mca/ess/lsf/ess_lsf_module.c b/orte/mca/ess/lsf/ess_lsf_module.c index 52b3b29f31c..55f1720c21d 100644 --- a/orte/mca/ess/lsf/ess_lsf_module.c +++ b/orte/mca/ess/lsf/ess_lsf_module.c @@ -5,16 +5,16 @@ * 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, + * 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-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -72,10 +72,10 @@ static int rte_init(void) error = "orte_ess_base_std_prolog"; goto error; } - + /* Start by getting a unique name */ lsf_set_name(); - + /* if I am a daemon, complete my setup using the * default procedure */ @@ -95,7 +95,7 @@ static int rte_init(void) opal_argv_free(hosts); return ORTE_SUCCESS; } - + if (ORTE_PROC_IS_TOOL) { /* otherwise, if I am a tool proc, use that procedure */ if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) { @@ -104,9 +104,9 @@ static int rte_init(void) goto error; } return ORTE_SUCCESS; - + } - + /* otherwise, I must be an application process - use * the default procedure to finish my setup */ @@ -115,9 +115,9 @@ static int rte_init(void) error = "orte_ess_base_app_setup"; goto error; } - + return ORTE_SUCCESS; - + error: if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { orte_show_help("help-orte-runtime.txt", @@ -163,7 +163,7 @@ static int lsf_set_name(void) int lsf_nodeid; orte_jobid_t jobid; orte_vpid_t vpid; - + if (NULL ==orte_ess_base_jobid) { ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); return ORTE_ERR_NOT_FOUND; @@ -194,6 +194,6 @@ static int lsf_set_name(void) ORTE_ERROR_LOG(rc); return rc; } - + return ORTE_SUCCESS; } diff --git a/orte/mca/ess/pmi/Makefile.am b/orte/mca/ess/pmi/Makefile.am index 928b60b1aed..4ded8b8d62b 100644 --- a/orte/mca/ess/pmi/Makefile.am +++ b/orte/mca/ess/pmi/Makefile.am @@ -4,9 +4,9 @@ # All rights reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/ess/pmi/ess_pmi.h b/orte/mca/ess/pmi/ess_pmi.h index 1141d604238..c6738aa9392 100644 --- a/orte/mca/ess/pmi/ess_pmi.h +++ b/orte/mca/ess/pmi/ess_pmi.h @@ -1,9 +1,9 @@ /* * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/ess/pmi/ess_pmi_component.c b/orte/mca/ess/pmi/ess_pmi_component.c index 2864c9de2b0..78044ce617a 100644 --- a/orte/mca/ess/pmi/ess_pmi_component.c +++ b/orte/mca/ess/pmi/ess_pmi_component.c @@ -5,9 +5,9 @@ * rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -68,7 +68,7 @@ static int pmi_component_open(void) static int pmi_component_query(mca_base_module_t **module, int *priority) { int ret; - + /* all APPS must use pmix */ if (ORTE_PROC_IS_APP) { /* open and setup pmix */ diff --git a/orte/mca/ess/pmi/ess_pmi_module.c b/orte/mca/ess/pmi/ess_pmi_module.c index 45543f4a69b..5ca7dcc6450 100644 --- a/orte/mca/ess/pmi/ess_pmi_module.c +++ b/orte/mca/ess/pmi/ess_pmi_module.c @@ -5,18 +5,18 @@ * 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, + * 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) 2008-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -93,7 +93,7 @@ static int rte_init(void) error = "orte_ess_base_std_prolog"; goto error; } - + /* we don't have to call pmix.init because the pmix select did it */ /**** THE FOLLOWING ARE REQUIRED VALUES ***/ @@ -250,7 +250,7 @@ static int rte_init(void) free(rmluri); } OPAL_LIST_DESTRUCT(&vals); - + /* push our hostname so others can find us, if they need to */ OBJ_CONSTRUCT(&kvn, opal_value_t); kvn.key = strdup(OPAL_DSTORE_HOSTNAME); @@ -345,13 +345,13 @@ static int rte_finalize(void) ORTE_ERROR_LOG(ret); return ret; } - + /* mark us as finalized */ if (NULL != opal_pmix.finalize) { opal_pmix.finalize(); (void) mca_base_framework_close(&opal_pmix_base_framework); } - + return ORTE_SUCCESS; } diff --git a/orte/mca/ess/singleton/Makefile.am b/orte/mca/ess/singleton/Makefile.am index ef313f219ee..e9ec2b39081 100644 --- a/orte/mca/ess/singleton/Makefile.am +++ b/orte/mca/ess/singleton/Makefile.am @@ -5,14 +5,14 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/ess/singleton/ess_singleton.h b/orte/mca/ess/singleton/ess_singleton.h index 90871a95383..916c36f5602 100644 --- a/orte/mca/ess/singleton/ess_singleton.h +++ b/orte/mca/ess/singleton/ess_singleton.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/singleton/ess_singleton_component.c b/orte/mca/ess/singleton/ess_singleton_component.c index a2c02d4205c..05322bbd3a1 100644 --- a/orte/mca/ess/singleton/ess_singleton_component.c +++ b/orte/mca/ess/singleton/ess_singleton_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -98,7 +98,7 @@ orte_ess_singleton_component_open(void) int orte_ess_singleton_component_query(mca_base_module_t **module, int *priority) { int ret; - + /* if we are an HNP, daemon, or tool, then we * are definitely not a singleton! */ @@ -108,7 +108,7 @@ int orte_ess_singleton_component_query(mca_base_module_t **module, int *priority *module = NULL; return ORTE_ERROR; } - + /* okay, we still could be a singleton or * an application process. If we have been * given an HNP URI, then we are definitely @@ -118,7 +118,7 @@ int orte_ess_singleton_component_query(mca_base_module_t **module, int *priority *module = NULL; return ORTE_ERROR; } - + /* open and setup pmix */ if (NULL == opal_pmix.initialized) { if (OPAL_SUCCESS != (ret = mca_base_framework_open(&opal_pmix_base_framework, 0))) { diff --git a/orte/mca/ess/singleton/ess_singleton_module.c b/orte/mca/ess/singleton/ess_singleton_module.c index 582b04a8b09..b335148977d 100644 --- a/orte/mca/ess/singleton/ess_singleton_module.c +++ b/orte/mca/ess/singleton/ess_singleton_module.c @@ -6,19 +6,19 @@ * 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, + * 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 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -89,7 +89,7 @@ static int rte_init(void) 0 == strncmp(orte_ess_singleton_server_uri, "FILE", strlen("FILE"))) { char input[1024], *filename; FILE *fp; - + /* it is a file - get the filename */ filename = strchr(orte_ess_singleton_server_uri, ':'); if (NULL == filename) { @@ -99,14 +99,14 @@ static int rte_init(void) return ORTE_ERROR; } ++filename; /* space past the : */ - + if (0 >= strlen(filename)) { /* they forgot to give us the name! */ orte_show_help("help-orterun.txt", "orterun:ompi-server-filename-missing", true, "singleton", orte_ess_singleton_server_uri); return ORTE_ERROR; } - + /* open the file and extract the uri */ fp = fopen(filename, "r"); if (NULL == fp) { /* can't find or read file! */ @@ -138,27 +138,27 @@ static int rte_init(void) orte_process_info.proc_type |= ORTE_PROC_SINGLETON; /* we were not started by a daemon */ orte_standalone_operation = true; - + /* now define my own name */ /* hash the nodename */ OPAL_HASH_STR(orte_process_info.nodename, hash32); - + bias = (uint32_t)orte_process_info.pid; - + OPAL_OUTPUT_VERBOSE((5, orte_ess_base_framework.framework_output, "ess:singleton: initial bias %ld nodename hash %lu", (long)bias, (unsigned long)hash32)); - + /* fold in the bias */ hash32 = hash32 ^ bias; - + /* now compress to 16-bits */ jobfam = (uint16_t)(((0x0000ffff & (0xffff0000 & hash32) >> 16)) ^ (0x0000ffff & hash32)); - + OPAL_OUTPUT_VERBOSE((5, orte_ess_base_framework.framework_output, "ess:singleton:: final jobfam %lu", (unsigned long)jobfam)); - + /* set the name - if we eventually spawn an HNP, it will use * local jobid 0, so offset us by 1 */ @@ -169,7 +169,7 @@ static int rte_init(void) if (orte_process_info.max_procs < orte_process_info.num_procs) { orte_process_info.max_procs = orte_process_info.num_procs; } - + /* flag that we are not routing since we have no HNP */ orte_routing_is_enabled = false; @@ -253,7 +253,7 @@ static int rte_init(void) } OBJ_DESTRUCT(&kvn); } - + /* push our local rank */ OBJ_CONSTRUCT(&kvn, opal_value_t); kvn.key = strdup(OPAL_DSTORE_LOCALRANK); @@ -284,13 +284,13 @@ static int rte_init(void) static int rte_finalize(void) { int ret; - + /* mark us as finalized */ if (NULL != opal_pmix.finalize) { opal_pmix.finalize(); (void) mca_base_framework_close(&opal_pmix_base_framework); } - + /* use the default procedure to finish */ if (ORTE_SUCCESS != (ret = orte_ess_base_app_finalize())) { ORTE_ERROR_LOG(ret); diff --git a/orte/mca/ess/slurm/Makefile.am b/orte/mca/ess/slurm/Makefile.am index 7783e8a147e..43d3d6537da 100644 --- a/orte/mca/ess/slurm/Makefile.am +++ b/orte/mca/ess/slurm/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/orte/mca/ess/slurm/configure.m4 b/orte/mca/ess/slurm/configure.m4 index 487f870d197..861cc0e7641 100644 --- a/orte/mca/ess/slurm/configure.m4 +++ b/orte/mca/ess/slurm/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2011 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,8 +26,8 @@ AC_DEFUN([MCA_orte_ess_slurm_CONFIG],[ AC_CONFIG_FILES([orte/mca/ess/slurm/Makefile]) ORTE_CHECK_SLURM([ess_slurm], [ess_slurm_good=1], [ess_slurm_good=0]) - - # if check worked, set wrapper flags if so. + + # if check worked, set wrapper flags if so. # Evaluate succeed / fail AS_IF([test "$ess_slurm_good" = "1"], [$1], diff --git a/orte/mca/ess/slurm/ess_slurm.h b/orte/mca/ess/slurm/ess_slurm.h index 87c85d4d710..c82ae4ff464 100644 --- a/orte/mca/ess/slurm/ess_slurm.h +++ b/orte/mca/ess/slurm/ess_slurm.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/slurm/ess_slurm_component.c b/orte/mca/ess/slurm/ess_slurm_component.c index 9790daa3f0a..ded948c922c 100644 --- a/orte/mca/ess/slurm/ess_slurm_component.c +++ b/orte/mca/ess/slurm/ess_slurm_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -74,7 +74,7 @@ int orte_ess_slurm_component_query(mca_base_module_t **module, int *priority) * answer to both is "yes", then we were launched * by mpirun in a slurm world, so make ourselves available */ - + if (ORTE_PROC_IS_DAEMON && NULL != getenv("SLURM_JOBID") && NULL != orte_process_info.my_hnp_uri) { @@ -82,7 +82,7 @@ int orte_ess_slurm_component_query(mca_base_module_t **module, int *priority) *module = (mca_base_module_t *)&orte_ess_slurm_module; return ORTE_SUCCESS; } - + /* Sadly, no */ *priority = -1; *module = NULL; diff --git a/orte/mca/ess/slurm/ess_slurm_module.c b/orte/mca/ess/slurm/ess_slurm_module.c index dde8e03a2c9..472b6aa9ee1 100644 --- a/orte/mca/ess/slurm/ess_slurm_module.c +++ b/orte/mca/ess/slurm/ess_slurm_module.c @@ -5,16 +5,16 @@ * 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, + * 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) 2008-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -69,10 +69,10 @@ static int rte_init(void) error = "orte_ess_base_std_prolog"; goto error; } - + /* Start by getting a unique name */ slurm_set_name(); - + /* if I am a daemon, complete my setup using the * default procedure */ @@ -96,7 +96,7 @@ static int rte_init(void) } return ORTE_SUCCESS; } - + if (ORTE_PROC_IS_TOOL) { /* otherwise, if I am a tool proc, use that procedure */ if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) { @@ -105,9 +105,9 @@ static int rte_init(void) goto error; } return ORTE_SUCCESS; - + } - + /* no other options are supported! */ error = "ess_error"; ret = ORTE_ERROR; @@ -125,7 +125,7 @@ static int rte_init(void) static int rte_finalize(void) { int ret; - + /* if I am a daemon, finalize using the default procedure */ if (ORTE_PROC_IS_DAEMON) { if (ORTE_SUCCESS != (ret = orte_ess_base_orted_finalize())) { @@ -147,7 +147,7 @@ static int rte_finalize(void) return ret; } } - + return ORTE_SUCCESS; } @@ -158,10 +158,10 @@ static int slurm_set_name(void) orte_jobid_t jobid; orte_vpid_t vpid; char *tmp; - + OPAL_OUTPUT_VERBOSE((1, orte_ess_base_framework.framework_output, "ess:slurm setting name")); - + if (NULL == orte_ess_base_jobid) { ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); return ORTE_ERR_NOT_FOUND; @@ -179,16 +179,16 @@ static int slurm_set_name(void) ORTE_ERROR_LOG(rc); return(rc); } - + ORTE_PROC_MY_NAME->jobid = jobid; - + /* fix up the vpid and make it the "real" vpid */ slurm_nodeid = atoi(getenv("SLURM_NODEID")); ORTE_PROC_MY_NAME->vpid = vpid + slurm_nodeid; OPAL_OUTPUT_VERBOSE((1, orte_ess_base_framework.framework_output, "ess:slurm set name to %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - + /* fix up the system info nodename to match exactly what slurm returned */ if (NULL != orte_process_info.nodename) { free(orte_process_info.nodename); @@ -199,16 +199,16 @@ static int slurm_set_name(void) } orte_process_info.nodename = strdup(tmp); - + OPAL_OUTPUT_VERBOSE((1, orte_ess_base_framework.framework_output, "ess:slurm set nodename to %s", (NULL == orte_process_info.nodename) ? "NULL" : orte_process_info.nodename)); - + /* get the non-name common environmental variables */ if (ORTE_SUCCESS != (rc = orte_ess_env_get())) { ORTE_ERROR_LOG(rc); return rc; } - + return ORTE_SUCCESS; } diff --git a/orte/mca/ess/tm/Makefile.am b/orte/mca/ess/tm/Makefile.am index ef61c23e273..3e087c88d5f 100644 --- a/orte/mca/ess/tm/Makefile.am +++ b/orte/mca/ess/tm/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/orte/mca/ess/tm/configure.m4 b/orte/mca/ess/tm/configure.m4 index d0987cd3566..0e7935d0c0a 100644 --- a/orte/mca/ess/tm/configure.m4 +++ b/orte/mca/ess/tm/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2011 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,8 +26,8 @@ AC_DEFUN([MCA_orte_ess_tm_CONFIG],[ AC_CONFIG_FILES([orte/mca/ess/tm/Makefile]) ORTE_CHECK_TM([ess_tm], [ess_tm_good=1], [ess_tm_good=0]) - - # if check worked, set wrapper flags if so. + + # if check worked, set wrapper flags if so. # Evaluate succeed / fail AS_IF([test "$ess_tm_good" = "1"], [$1], diff --git a/orte/mca/ess/tm/ess_tm.h b/orte/mca/ess/tm/ess_tm.h index 4047e3bea37..ed3ccde007b 100644 --- a/orte/mca/ess/tm/ess_tm.h +++ b/orte/mca/ess/tm/ess_tm.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/tm/ess_tm_component.c b/orte/mca/ess/tm/ess_tm_component.c index fd2fa5eaedb..8656cccf02e 100644 --- a/orte/mca/ess/tm/ess_tm_component.c +++ b/orte/mca/ess/tm/ess_tm_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -74,14 +74,14 @@ int orte_ess_tm_component_query(mca_base_module_t **module, int *priority) * answer to both is "yes", then we were launched * by mpirun in a tm world */ - + if (NULL != getenv("PBS_JOBID") && NULL != orte_process_info.my_hnp_uri) { *priority = 30; *module = (mca_base_module_t *)&orte_ess_tm_module; return ORTE_SUCCESS; } - + /* Sadly, no */ *priority = -1; *module = NULL; diff --git a/orte/mca/ess/tm/ess_tm_module.c b/orte/mca/ess/tm/ess_tm_module.c index 6eda221f8df..38e86416272 100644 --- a/orte/mca/ess/tm/ess_tm_module.c +++ b/orte/mca/ess/tm/ess_tm_module.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008-2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -73,17 +73,17 @@ static int rte_init(void) error = "orte_ess_base_std_prolog"; goto error; } - + /* Start by getting a unique name */ tm_set_name(); - + /* if I am a daemon, complete my setup using the * default procedure */ if (ORTE_PROC_IS_DAEMON) { /* get the list of nodes used for this job */ nodelist = getenv(OPAL_MCA_PREFIX"orte_nodelist"); - + if (NULL != nodelist) { /* split the node list into an argv array */ hosts = opal_argv_split(nodelist, ','); @@ -96,7 +96,7 @@ static int rte_init(void) opal_argv_free(hosts); return ORTE_SUCCESS; } - + if (ORTE_PROC_IS_TOOL) { /* otherwise, if I am a tool proc, use that procedure */ if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) { @@ -105,13 +105,13 @@ static int rte_init(void) goto error; } return ORTE_SUCCESS; - + } - + /* no other options are supported! */ error = "ess_error"; ret = ORTE_ERROR; - + error: if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { orte_show_help("help-orte-runtime.txt", @@ -125,7 +125,7 @@ static int rte_init(void) static int rte_finalize(void) { int ret; - + /* if I am a daemon, finalize using the default procedure */ if (ORTE_PROC_IS_DAEMON) { if (ORTE_SUCCESS != (ret = orte_ess_base_orted_finalize())) { @@ -147,7 +147,7 @@ static int rte_finalize(void) return ret; } } - + return ORTE_SUCCESS; } @@ -156,7 +156,7 @@ static int tm_set_name(void) int rc; orte_jobid_t jobid; orte_vpid_t vpid; - + OPAL_OUTPUT_VERBOSE((1, orte_ess_base_framework.framework_output, "ess:tm setting name")); if (NULL == orte_ess_base_jobid) { @@ -167,7 +167,7 @@ static int tm_set_name(void) ORTE_ERROR_LOG(rc); return(rc); } - + if (NULL == orte_ess_base_vpid) { ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); return ORTE_ERR_NOT_FOUND; diff --git a/orte/mca/ess/tool/Makefile.am b/orte/mca/ess/tool/Makefile.am index c5074ed194c..30e4a01cfdf 100644 --- a/orte/mca/ess/tool/Makefile.am +++ b/orte/mca/ess/tool/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/ess/tool/ess_tool.h b/orte/mca/ess/tool/ess_tool.h index 21e2ad03217..62c2655cce4 100644 --- a/orte/mca/ess/tool/ess_tool.h +++ b/orte/mca/ess/tool/ess_tool.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/ess/tool/ess_tool_component.c b/orte/mca/ess/tool/ess_tool_component.c index 19ae6c6dfb2..ad81fbe72a8 100644 --- a/orte/mca/ess/tool/ess_tool_component.c +++ b/orte/mca/ess/tool/ess_tool_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -79,7 +79,7 @@ int orte_ess_tool_component_query(mca_base_module_t **module, int *priority) *module = (mca_base_module_t *)&orte_ess_tool_module; return ORTE_SUCCESS; } - + /* else, don't */ *priority = -1; *module = NULL; diff --git a/orte/mca/ess/tool/ess_tool_module.c b/orte/mca/ess/tool/ess_tool_module.c index 5d28e3d6f38..d18ccc23ab1 100644 --- a/orte/mca/ess/tool/ess_tool_module.c +++ b/orte/mca/ess/tool/ess_tool_module.c @@ -5,15 +5,15 @@ * 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, + * 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) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -68,7 +68,7 @@ static int rte_init(void) goto error; } - + if (NULL != orte_ess_base_jobid && NULL != orte_ess_base_vpid) { opal_output_verbose(2, orte_ess_base_framework.framework_output, @@ -86,7 +86,7 @@ static int rte_init(void) uint16_t jobfam; uint32_t hash32; uint32_t bias; - + opal_output_verbose(2, orte_ess_base_framework.framework_output, "ess:tool:computing name"); /* hash the nodename */ @@ -94,15 +94,15 @@ static int rte_init(void) bias = (uint32_t)orte_process_info.pid; /* fold in the bias */ hash32 = hash32 ^ bias; - + /* now compress to 16-bits */ jobfam = (uint16_t)(((0x0000ffff & (0xffff0000 & hash32) >> 16)) ^ (0x0000ffff & hash32)); - + /* set the name */ ORTE_PROC_MY_NAME->jobid = 0xffff0000 & ((uint32_t)jobfam << 16); ORTE_PROC_MY_NAME->vpid = 0; } - + /* do the rest of the standard tool init */ if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) { ORTE_ERROR_LOG(ret); @@ -110,7 +110,7 @@ static int rte_init(void) goto error; } - return ORTE_SUCCESS; + return ORTE_SUCCESS; error: if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { @@ -131,21 +131,21 @@ static void rte_abort(int status, bool report) { /* do NOT do a normal finalize as this will very likely * hang the process. We are aborting due to an abnormal condition - * that precludes normal cleanup + * that precludes normal cleanup * - * We do need to do the following bits to make sure we leave a + * We do need to do the following bits to make sure we leave a * clean environment. Taken from orte_finalize(): * - Assume errmgr cleans up child processes before we exit. */ - + /* CRS cleanup since it may have a named pipe and thread active */ orte_cr_finalize(); - - /* - Clean out the global structures + + /* - Clean out the global structures * (not really necessary, but good practice) */ orte_proc_info_finalize(); - + /* Now just exit */ exit(status); } diff --git a/orte/mca/filem/Makefile.am b/orte/mca/filem/Makefile.am index 8cf50c99d17..cbce1d48bfa 100644 --- a/orte/mca/filem/Makefile.am +++ b/orte/mca/filem/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/filem/base/Makefile.am b/orte/mca/filem/base/Makefile.am index 091adbc5b05..f2fa8e32d4e 100644 --- a/orte/mca/filem/base/Makefile.am +++ b/orte/mca/filem/base/Makefile.am @@ -5,14 +5,14 @@ # 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, +# 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$ # diff --git a/orte/mca/filem/base/base.h b/orte/mca/filem/base/base.h index a7369fc1666..c990abec30e 100644 --- a/orte/mca/filem/base/base.h +++ b/orte/mca/filem/base/base.h @@ -5,16 +5,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef ORTE_FILEM_BASE_H diff --git a/orte/mca/filem/base/filem_base_fns.c b/orte/mca/filem/base/filem_base_fns.c index 49608d96a5e..61a52d94536 100644 --- a/orte/mca/filem/base/filem_base_fns.c +++ b/orte/mca/filem/base/filem_base_fns.c @@ -3,16 +3,16 @@ * 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, + * 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) 2012 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/filem/base/filem_base_frame.c b/orte/mca/filem/base/filem_base_frame.c index 1fa2d4ea212..b4a8479ee8a 100644 --- a/orte/mca/filem/base/filem_base_frame.c +++ b/orte/mca/filem/base/filem_base_frame.c @@ -3,16 +3,16 @@ * 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, + * 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) 2012-2013 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/filem/base/filem_base_receive.c b/orte/mca/filem/base/filem_base_receive.c index 33e22f077f5..581fe096138 100644 --- a/orte/mca/filem/base/filem_base_receive.c +++ b/orte/mca/filem/base/filem_base_receive.c @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -75,7 +75,7 @@ int orte_filem_base_comm_start(void) if ( recv_issued ) { return ORTE_SUCCESS; } - + OPAL_OUTPUT_VERBOSE((5, orte_filem_base_framework.framework_output, "%s filem:base: Receive: Start command recv", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); @@ -87,7 +87,7 @@ int orte_filem_base_comm_start(void) NULL); recv_issued = true; - + return ORTE_SUCCESS; } @@ -101,14 +101,14 @@ int orte_filem_base_comm_stop(void) if ( recv_issued ) { return ORTE_SUCCESS; } - + OPAL_OUTPUT_VERBOSE((5, orte_filem_base_framework.framework_output, "%s filem:base:receive stop comm", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - + orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_FILEM_BASE); recv_issued = false; - + return ORTE_SUCCESS; } @@ -135,7 +135,7 @@ void orte_filem_base_recv(int status, orte_process_name_t* sender, ORTE_ERROR_LOG(rc); return; } - + switch (command) { case ORTE_FILEM_GET_PROC_NODE_NAME_CMD: OPAL_OUTPUT_VERBOSE((10, orte_filem_base_framework.framework_output, @@ -152,7 +152,7 @@ void orte_filem_base_recv(int status, orte_process_name_t* sender, filem_base_process_get_remote_path_cmd(sender, buffer); break; - + default: ORTE_ERROR_LOG(ORTE_ERR_VALUE_OUT_OF_BOUNDS); } diff --git a/orte/mca/filem/base/filem_base_select.c b/orte/mca/filem/base/filem_base_select.c index 9f1e8ae4536..0bcee7df966 100644 --- a/orte/mca/filem/base/filem_base_select.c +++ b/orte/mca/filem/base/filem_base_select.c @@ -3,16 +3,16 @@ * 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, + * 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) 2012 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/filem/filem.h b/orte/mca/filem/filem.h index ff5996df65b..ad6f172d7aa 100644 --- a/orte/mca/filem/filem.h +++ b/orte/mca/filem/filem.h @@ -6,16 +6,16 @@ * 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, + * 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) 2012-2015 Los Alamos National Security, LLC. All rights * reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -94,7 +94,7 @@ ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_filem_base_process_set_t); * Local: Local file reference * Remove: Remote file reference * - * Note: If multiple process sinks are used it is assumed that the + * Note: If multiple process sinks are used it is assumed that the * file reference is the same for each of the sinks. If this is not * true then more than one filem request needs to be created. */ @@ -133,7 +133,7 @@ ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_filem_base_file_set_t); * in a single call of the API function. Allowing the implementation * to optimize the sending/receiving of data. * Used for the following: - * + * */ struct orte_filem_base_request_1_0_0_t { /** This is an object, so must have a super */ @@ -214,9 +214,9 @@ typedef int (*orte_filem_base_module_finalize_fn_t) * component will negotiate the correct absolute path for that file/directory * for the remote machine. * - * @param request FileM request describing the files/directories to send, + * @param request FileM request describing the files/directories to send, * the remote files/directories to use, and the processes to see the change. - * + * * @return ORTE_SUCCESS on successful file transer * @return ORTE_ERROR on failed file transfer */ @@ -230,9 +230,9 @@ typedef int (*orte_filem_base_put_fn_t) * component will negotiate the correct absolute path for that file/directory * for the remote machine. * - * @param request FileM request describing the files/directories to send, + * @param request FileM request describing the files/directories to send, * the remote files/directories to use, and the processes to see the change. - * + * * @return ORTE_SUCCESS on successful file transer * @return ORTE_ERROR on failed file transfer */ @@ -246,9 +246,9 @@ typedef int (*orte_filem_base_put_nb_fn_t) * component will negotiate the correct absolute path for that file/directory * for the remote machine. * - * @param request FileM request describing the files/directories to receive, + * @param request FileM request describing the files/directories to receive, * the remote files/directories to use, and the processes to see the change. - * + * * @return ORTE_SUCCESS on successful file transer * @return ORTE_ERROR on failed file transfer */ @@ -262,9 +262,9 @@ typedef int (*orte_filem_base_get_fn_t) * component will negotiate the correct absolute path for that file/directory * for the remote machine. * - * @param request FileM request describing the files/directories to receive, + * @param request FileM request describing the files/directories to receive, * the remote files/directories to use, and the processes to see the change. - * + * * @return ORTE_SUCCESS on successful file transer * @return ORTE_ERROR on failed file transfer */ @@ -273,12 +273,12 @@ typedef int (*orte_filem_base_get_nb_fn_t) /** * Remove a file from the remote machine - * + * * Note: By using a relative path for the remote file/directory, the filem * component will negotiate the correct absolute path for that file/directory * for the remote machine. * - * @param request FileM request describing the remote files/directories to remove, + * @param request FileM request describing the remote files/directories to remove, * the processes to see the change. * * @return ORTE_SUCCESS on success @@ -289,12 +289,12 @@ typedef int (*orte_filem_base_rm_fn_t) /** * Remove a file from the remote machine (Async) - * + * * Note: By using a relative path for the remote file/directory, the filem * component will negotiate the correct absolute path for that file/directory * for the remote machine. * - * @param request FileM request describing the remote files/directories to remove, + * @param request FileM request describing the remote files/directories to remove, * the processes to see the change. * * @return ORTE_SUCCESS on success diff --git a/orte/mca/filem/orte_filem.7in b/orte/mca/filem/orte_filem.7in index 81e808df24d..a87b46b21d4 100644 --- a/orte/mca/filem/orte_filem.7in +++ b/orte/mca/filem/orte_filem.7in @@ -5,7 +5,7 @@ .\" Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. .\" .\" Man page for ORTE's FileM Functionality -.\" +.\" .\" .TH name section center-footer left-footer center-header .TH ORTE_FILEM 7 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .\" ************************** @@ -75,7 +75,7 @@ Generally will be rsh or ssh. .SS none FileM Component .PP The \fInone\fP component simply selects no FileM component. All of the FileM -function calls return immediately with ORTE_SUCCESS. +function calls return immediately with ORTE_SUCCESS. . .PP This component is the last component to be selected by default. This means that if diff --git a/orte/mca/filem/raw/Makefile.am b/orte/mca/filem/raw/Makefile.am index 2e154c5908c..c0c9f89cb30 100644 --- a/orte/mca/filem/raw/Makefile.am +++ b/orte/mca/filem/raw/Makefile.am @@ -3,7 +3,7 @@ # 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, +# 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. @@ -11,9 +11,9 @@ # Copyright (c) 2012 Los Alamos National Security, LLC. # All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/filem/raw/filem_raw.h b/orte/mca/filem/raw/filem_raw.h index 4a989c1b1ab..295ab8e9370 100644 --- a/orte/mca/filem/raw/filem_raw.h +++ b/orte/mca/filem/raw/filem_raw.h @@ -2,9 +2,9 @@ * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/filem/raw/filem_raw_component.c b/orte/mca/filem/raw/filem_raw_component.c index 17fdf72774e..0631989cd89 100644 --- a/orte/mca/filem/raw/filem_raw_component.c +++ b/orte/mca/filem/raw/filem_raw_component.c @@ -3,9 +3,9 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -22,7 +22,7 @@ /* * Public string for version number */ -const char *orte_filem_raw_component_version_string = +const char *orte_filem_raw_component_version_string = "ORTE FILEM raw MCA component version " ORTE_VERSION; /* @@ -70,7 +70,7 @@ static int filem_raw_register(void) return ORTE_SUCCESS; } -static int filem_raw_open(void) +static int filem_raw_open(void) { return ORTE_SUCCESS; } diff --git a/orte/mca/filem/raw/filem_raw_module.c b/orte/mca/filem/raw/filem_raw_module.c index de70fe2b7a8..aeedef2eaed 100644 --- a/orte/mca/filem/raw/filem_raw_module.c +++ b/orte/mca/filem/raw/filem_raw_module.c @@ -6,9 +6,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -520,15 +520,15 @@ static int raw_preposition_files(orte_job_t *jdata, } /* set the flags to non-blocking */ if ((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_filem_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_filem_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; if (fcntl(fd, F_SETFL, flags) < 0) { - opal_output(orte_filem_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_filem_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } - } + } OPAL_OUTPUT_VERBOSE((1, orte_filem_base_framework.framework_output, "%s filem:raw: setting up to position file %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fs->local_target)); @@ -670,7 +670,7 @@ static int raw_link_local_files(orte_job_t *jdata, * local process in the job */ my_dir = opal_dirname(orte_process_info.job_session_dir); - + /* setup */ if (NULL != orte_process_info.tmpdir_base) { prefix = strdup(orte_process_info.tmpdir_base); @@ -823,12 +823,12 @@ static void send_chunk(int fd, short argc, void *cbdata) if (numbytes < 0) { /* either we have a connection error or it was a non-blocking read */ - + /* non-blocking, retry */ if (EAGAIN == errno || EINTR == errno) { opal_event_add(&rev->ev, 0); return; - } + } OPAL_OUTPUT_VERBOSE((1, orte_filem_base_framework.framework_output, "%s filem:raw:read error on file %s", @@ -840,7 +840,7 @@ static void send_chunk(int fd, short argc, void *cbdata) */ numbytes = 0; } - + /* if job termination has been ordered, just ignore the * data and delete the read event */ diff --git a/orte/mca/grpcomm/Makefile.am b/orte/mca/grpcomm/Makefile.am index dbcf2b71f02..09147163b74 100644 --- a/orte/mca/grpcomm/Makefile.am +++ b/orte/mca/grpcomm/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/grpcomm/base/grpcomm_base_select.c b/orte/mca/grpcomm/base/grpcomm_base_select.c index 66d1cf223c7..95e87f650a7 100644 --- a/orte/mca/grpcomm/base/grpcomm_base_select.c +++ b/orte/mca/grpcomm/base/grpcomm_base_select.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -13,9 +13,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/grpcomm/brks/Makefile.am b/orte/mca/grpcomm/brks/Makefile.am index 321e39ddeea..b6bf0955a80 100644 --- a/orte/mca/grpcomm/brks/Makefile.am +++ b/orte/mca/grpcomm/brks/Makefile.am @@ -1,12 +1,12 @@ # # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/grpcomm/brks/grpcomm_brks.h b/orte/mca/grpcomm/brks/grpcomm_brks.h index de2582fa255..fb7881861a1 100644 --- a/orte/mca/grpcomm/brks/grpcomm_brks.h +++ b/orte/mca/grpcomm/brks/grpcomm_brks.h @@ -1,11 +1,11 @@ /* -*- C -*- - * + * * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/orte/mca/grpcomm/direct/Makefile.am b/orte/mca/grpcomm/direct/Makefile.am index e9e89f8f9bf..6e1733ef768 100644 --- a/orte/mca/grpcomm/direct/Makefile.am +++ b/orte/mca/grpcomm/direct/Makefile.am @@ -1,12 +1,12 @@ # # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/grpcomm/direct/grpcomm_direct.c b/orte/mca/grpcomm/direct/grpcomm_direct.c index da30940ee5b..953f9cbfaa4 100644 --- a/orte/mca/grpcomm/direct/grpcomm_direct.c +++ b/orte/mca/grpcomm/direct/grpcomm_direct.c @@ -358,7 +358,7 @@ static void xcast_recv(int status, orte_process_name_t* sender, ORTE_ERROR_LOG(ret); goto relay; } - + /* update our local nidmap, if required - the decode function * knows what to do - it will also free the bytes in the byte object */ @@ -374,7 +374,7 @@ static void xcast_recv(int status, orte_process_name_t* sender, OPAL_OUTPUT_VERBOSE((5, orte_grpcomm_base_framework.framework_output, "%s grpcomm:direct:xcast updating daemon nidmap", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - + if (ORTE_SUCCESS != (ret = orte_util_decode_daemon_nodemap(bo))) { ORTE_ERROR_LOG(ret); goto relay; @@ -383,7 +383,7 @@ static void xcast_recv(int status, orte_process_name_t* sender, /* update the routing plan */ orte_routed.update_routing_plan(); - + /* see if we have wiring info as well */ cnt=1; if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &flag, &cnt, OPAL_INT8))) { @@ -441,7 +441,7 @@ static void xcast_recv(int status, orte_process_name_t* sender, OBJ_RELEASE(rly); goto CLEANUP; } - + /* send the message to each recipient on list, deconstructing it as we go */ while (NULL != (item = opal_list_remove_first(&coll))) { nm = (orte_namelist_t*)item; diff --git a/orte/mca/grpcomm/direct/grpcomm_direct.h b/orte/mca/grpcomm/direct/grpcomm_direct.h index b9b385976cd..d04224b5574 100644 --- a/orte/mca/grpcomm/direct/grpcomm_direct.h +++ b/orte/mca/grpcomm/direct/grpcomm_direct.h @@ -1,11 +1,11 @@ /* -*- C -*- - * + * * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/orte/mca/grpcomm/rcd/Makefile.am b/orte/mca/grpcomm/rcd/Makefile.am index abd5661a998..250700cf568 100644 --- a/orte/mca/grpcomm/rcd/Makefile.am +++ b/orte/mca/grpcomm/rcd/Makefile.am @@ -1,12 +1,12 @@ # # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Los Alamos National Security, LLC. All rights -# reserved. +# reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/grpcomm/rcd/grpcomm_rcd.h b/orte/mca/grpcomm/rcd/grpcomm_rcd.h index 0d11cb22c37..98da4d99a0b 100644 --- a/orte/mca/grpcomm/rcd/grpcomm_rcd.h +++ b/orte/mca/grpcomm/rcd/grpcomm_rcd.h @@ -1,11 +1,11 @@ /* -*- C -*- - * + * * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/orte/mca/iof/Makefile.am b/orte/mca/iof/Makefile.am index e1025433dce..2c31d1a7d10 100644 --- a/orte/mca/iof/Makefile.am +++ b/orte/mca/iof/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/iof/README.txt b/orte/mca/iof/README.txt index 1fcd8292b76..85ae4d1cfe6 100644 --- a/orte/mca/iof/README.txt +++ b/orte/mca/iof/README.txt @@ -26,7 +26,7 @@ After the job starts up, this is how things look on the HNP side of things. ENDPOINTS (orte_iof_base_endpoint_t) mode origin tag fd seq ack src_frags sink_frags notes -============================================================================================= +============================================================================================= 1 0,0,0 1 1 0 0 0 0 pull() call from rmgr<- ============================================================================================= | 1 0,0,0 2 2 0 0 0 0 pull() call from rmgr<-|--- @@ -69,9 +69,9 @@ struct orte_iof_svc_fwd_t { }; -Note: This first subscriber says that it will receive from any process +Note: This first subscriber says that it will receive from any process in the job. Note that the jobid=1 and the mask=2. So, we expect this -to collect the stdout from any of the ranks. Obviously the second +to collect the stdout from any of the ranks. Obviously the second subscriber says the same thing but for stderr. The third subscriber is for receving data from stdin and sending it out to rank 0 of the job. Notice the mask=ff which means compare jobid,vpid @@ -88,18 +88,18 @@ tied to the subscription. Hmmm, this I do not really understand. APPENDIX A -These are the defines that go with the mask. +These are the defines that go with the mask. #define ORTE_NS_CMP_NONE 0x00 #define ORTE_NS_CMP_JOBID 0x02 #define ORTE_NS_CMP_VPID 0x04 #define ORTE_NS_CMP_ALL 0Xff -When we get a HDR_MSG, we call orte_iof_svc_proxy_msg() +When we get a HDR_MSG, we call orte_iof_svc_proxy_msg() APPENDIX B -There are two dbx files that help get to where we want to get -for seeing how things work. +There are two dbx files that help get to where we want to get +for seeing how things work. start.x : Run this first to get initial breakpoint. Needs this so we can set additional breakpoints. This also has some very helpful aliases for looking at the structures shown above. diff --git a/orte/mca/iof/base/Makefile.am b/orte/mca/iof/base/Makefile.am index e06d883babc..0d08004c774 100644 --- a/orte/mca/iof/base/Makefile.am +++ b/orte/mca/iof/base/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2013 Los Alamos National Security, LLC. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/iof/base/base.h b/orte/mca/iof/base/base.h index 058e92120af..4dd72e6c623 100644 --- a/orte/mca/iof/base/base.h +++ b/orte/mca/iof/base/base.h @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -24,7 +24,7 @@ * * I/O Forwarding Service */ - + #ifndef MCA_IOF_BASE_H #define MCA_IOF_BASE_H @@ -71,7 +71,7 @@ typedef struct { ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_iof_job_t); /* - * Maximum size of single msg + * Maximum size of single msg */ #define ORTE_IOF_BASE_MSG_MAX 4096 #define ORTE_IOF_BASE_TAG_MAX 50 diff --git a/orte/mca/iof/base/iof_base_frame.c b/orte/mca/iof/base/iof_base_frame.c index 2abacf4fd65..f0018b5cf4c 100644 --- a/orte/mca/iof/base/iof_base_frame.c +++ b/orte/mca/iof/base/iof_base_frame.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -160,7 +160,7 @@ static void orte_iof_base_write_event_destruct(orte_iof_write_event_t* wev) return; } } - + if (2 < wev->fd) { OPAL_OUTPUT_VERBOSE((20, orte_iof_base_framework.framework_output, "%s iof: closing fd %d for write event", @@ -273,7 +273,7 @@ static int orte_iof_base_open(mca_base_open_flag_t flags) ORTE_IOF_SINK_DEFINE(&orte_iof_base.iof_write_stderr, ORTE_PROC_MY_NAME, 2, ORTE_IOF_STDERR, orte_iof_base_write_handler, NULL); } - + /* do NOT set these file descriptors to non-blocking. If we do so, * we set the file descriptor to non-blocking for everyone that has * that file descriptor, which includes everyone else in our shell @@ -282,8 +282,8 @@ static int orte_iof_base_open(mca_base_open_flag_t flags) * This causes things like "mpirun -np 1 big_app | cat" to lose * output, because cat's stdout is then ALSO non-blocking and cat * isn't built to deal with that case (same with almost all other - * unix text utils). - */ + * unix text utils). + */ } /* Open up all available components */ diff --git a/orte/mca/iof/base/iof_base_output.c b/orte/mca/iof/base/iof_base_output.c index 965bdf777cb..26ed8450201 100644 --- a/orte/mca/iof/base/iof_base_output.c +++ b/orte/mca/iof/base/iof_base_output.c @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -57,12 +57,12 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, "%s write:output setting up to write %d bytes to %s for %s on fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, (ORTE_IOF_STDIN & stream) ? "stdin" : ((ORTE_IOF_STDOUT & stream) ? "stdout" : ((ORTE_IOF_STDERR & stream) ? "stderr" : "stddiag")), - ORTE_NAME_PRINT(name), + ORTE_NAME_PRINT(name), (NULL == channel) ? -1 : channel->fd)); /* setup output object */ output = OBJ_NEW(orte_iof_write_output_t); - + /* write output data to the corresponding tag */ if (ORTE_IOF_STDIN & stream) { /* copy over the data to be written */ @@ -100,7 +100,7 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, snprintf(endtag, ORTE_IOF_BASE_TAG_MAX, "", suffix); goto construct; } - + /* if we are to timestamp output, start the tag with that */ if (orte_timestamp_output) { time_t mytime; @@ -109,7 +109,7 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, time(&mytime); cptr = ctime(&mytime); cptr[strlen(cptr)-1] = '\0'; /* remove trailing newline */ - + if (orte_tag_output) { /* if we want it tagged as well, use both */ snprintf(starttag, ORTE_IOF_BASE_TAG_MAX, "%s[%s,%s]<%s>:", @@ -123,7 +123,7 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, memset(endtag, '\0', ORTE_IOF_BASE_TAG_MAX); goto construct; } - + if (orte_tag_output) { snprintf(starttag, ORTE_IOF_BASE_TAG_MAX, "[%s,%s]<%s>:", ORTE_LOCAL_JOBID_PRINT(name->jobid), @@ -132,7 +132,7 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, memset(endtag, '\0', ORTE_IOF_BASE_TAG_MAX); goto construct; } - + /* if we get here, then the data is not to be tagged - just copy it * and move on to processing */ @@ -153,7 +153,7 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, /* start with the tag */ for (j=0, k=0; j < starttaglen && k < ORTE_IOF_BASE_TAGGED_OUT_MAX; j++) { output->data[k++] = starttag[j]; - } + } /* cycle through the data looking for * and replace those with the tag */ @@ -247,14 +247,14 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, output->data[k] = '\n'; } output->numbytes = k; - + process: /* add this data to the write list for this fd */ opal_list_append(&channel->outputs, &output->super); /* record how big the buffer is */ num_buffered = opal_list_get_size(&channel->outputs); - + /* is the write event issued? */ if (!channel->pending) { /* issue it */ @@ -264,7 +264,7 @@ int orte_iof_base_write_output(orte_process_name_t *name, orte_iof_tag_t stream, opal_event_add(channel->ev, 0); channel->pending = true; } - + return num_buffered; } @@ -275,7 +275,7 @@ void orte_iof_base_write_handler(int fd, short event, void *cbdata) opal_list_item_t *item; orte_iof_write_output_t *output; int num_written; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s write:handler writing data to %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), diff --git a/orte/mca/iof/base/iof_base_select.c b/orte/mca/iof/base/iof_base_select.c index f33e423da99..e1644bb3c9e 100644 --- a/orte/mca/iof/base/iof_base_select.c +++ b/orte/mca/iof/base/iof_base_select.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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$ */ @@ -30,7 +30,7 @@ /** * Call the query function on all available components to find out if - * they want to run. Select the single component with the highest + * they want to run. Select the single component with the highest * priority. */ int orte_iof_base_select(void) @@ -38,7 +38,7 @@ int orte_iof_base_select(void) orte_iof_base_component_t *best_component = NULL; orte_iof_base_module_t *best_module = NULL; int rc; - + /* * Select the best component */ @@ -53,7 +53,7 @@ int orte_iof_base_select(void) /* otherwise, this is a problem */ return ORTE_ERR_NOT_FOUND; } - + /* Save the winner */ orte_iof = *best_module; /* init it */ diff --git a/orte/mca/iof/base/iof_base_setup.c b/orte/mca/iof/base/iof_base_setup.c index d12410dceb6..76c75e77b7f 100644 --- a/orte/mca/iof/base/iof_base_setup.c +++ b/orte/mca/iof/base/iof_base_setup.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -141,7 +141,7 @@ orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts, char ***env) #ifdef OCRNL /* OS X 10.3 does not have this value defined */ - OCRNL | + OCRNL | #endif ONLCR); if (tcsetattr(opts->p_stdout[1], TCSANOW, &term_attrs) == -1) { @@ -154,14 +154,14 @@ orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts, char ***env) if(opts->p_stdout[1] != fileno(stdout)) { ret = dup2(opts->p_stdout[1], fileno(stdout)); if (ret < 0) return ORTE_ERR_PIPE_SETUP_FAILURE; - close(opts->p_stdout[1]); + close(opts->p_stdout[1]); } } if (opts->connect_stdin) { if(opts->p_stdin[0] != fileno(stdin)) { ret = dup2(opts->p_stdin[0], fileno(stdin)); if (ret < 0) return ORTE_ERR_PIPE_SETUP_FAILURE; - close(opts->p_stdin[0]); + close(opts->p_stdin[0]); } } else { int fd; diff --git a/orte/mca/iof/base/iof_base_setup.h b/orte/mca/iof/base/iof_base_setup.h index 44982a4a10b..bb74bf1e802 100644 --- a/orte/mca/iof/base/iof_base_setup.h +++ b/orte/mca/iof/base/iof_base_setup.h @@ -5,15 +5,15 @@ * 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, + * 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) 2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/orte/mca/iof/hnp/Makefile.am b/orte/mca/iof/hnp/Makefile.am index 0b50b751c70..219ecb7a1f0 100644 --- a/orte/mca/iof/hnp/Makefile.am +++ b/orte/mca/iof/hnp/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/iof/hnp/iof_hnp.c b/orte/mca/iof/hnp/iof_hnp.c index 350cee45c62..bd47bb9f51e 100644 --- a/orte/mca/iof/hnp/iof_hnp.c +++ b/orte/mca/iof/hnp/iof_hnp.c @@ -5,20 +5,20 @@ * 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, + * 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) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "orte_config.h" @@ -93,26 +93,26 @@ orte_iof_base_module_t orte_iof_hnp_module = { static int init(void) { int rc; - + /* post non-blocking recv to catch forwarded IO from * the orteds - */ + */ orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_HNP, ORTE_RML_PERSISTENT, orte_iof_hnp_recv, NULL); - + if (ORTE_SUCCESS != (rc = orte_rml.add_exception_handler(orte_iof_hnp_exception_handler))) { ORTE_ERROR_LOG(rc); orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_HNP); return rc; } - + OBJ_CONSTRUCT(&mca_iof_hnp_component.sinks, opal_list_t); OBJ_CONSTRUCT(&mca_iof_hnp_component.procs, opal_list_t); mca_iof_hnp_component.stdinev = NULL; - + return ORTE_SUCCESS; } @@ -149,18 +149,18 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, if (ORTE_VPID_INVALID == dst_name->vpid || fd < 0) { return ORTE_SUCCESS; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:hnp pushing fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + if (!(src_tag & ORTE_IOF_STDIN)) { /* set the file descriptor to non-blocking - do this before we setup * and activate the read event in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; @@ -213,7 +213,7 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, orte_iof_base_write_handler, &mca_iof_hnp_component.sinks); } - + SETUP: /* define a read event and activate it */ if (src_tag & ORTE_IOF_STDOUT) { @@ -271,7 +271,7 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, sink->daemon.vpid = proc->node->daemon->name.vpid; } } - + /* now setup the read - but check to only do this once */ if (NULL == mca_iof_hnp_component.stdinev) { /* Since we are the HNP, we don't want to set nonblocking on our @@ -282,16 +282,16 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, * This causes things like "mpirun -np 1 big_app | cat" to lose * output, because cat's stdout is then ALSO non-blocking and cat * isn't built to deal with that case (same with almost all other - * unix text utils). + * unix text utils). */ if (0 != fd) { if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; fcntl(fd, F_SETFL, flags); - } + } } if (isatty(fd)) { /* We should avoid trying to read from stdin if we @@ -304,7 +304,7 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, opal_event_signal_set(orte_event_base, &mca_iof_hnp_component.stdinsig, SIGCONT, orte_iof_hnp_stdin_cb, NULL); - + /* setup a read event to read stdin, but don't activate it yet. The * dst_name indicates who should receive the stdin. If that recipient * doesn't do a corresponding pull, however, then the stdin will @@ -313,7 +313,7 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, ORTE_IOF_READ_EVENT(&mca_iof_hnp_component.stdinev, dst_name, fd, ORTE_IOF_STDIN, orte_iof_hnp_read_local_handler, false); - + /* check to see if we want the stdin read event to be * active - we will always at least define the event, * but may delay its activation @@ -346,28 +346,28 @@ static int hnp_pull(const orte_process_name_t* dst_name, { orte_iof_sink_t *sink; int flags; - + /* this is a local call - only stdin is supported */ if (ORTE_IOF_STDIN != src_tag) { return ORTE_ERR_NOT_SUPPORTED; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:hnp pulling fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* set the file descriptor to non-blocking - do this before we setup * the sink in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; fcntl(fd, F_SETFL, flags); } - + ORTE_IOF_SINK_DEFINE(&sink, dst_name, fd, ORTE_IOF_STDIN, stdin_write_handler, &mca_iof_hnp_component.sinks); @@ -387,7 +387,7 @@ static int hnp_close(const orte_process_name_t* peer, opal_list_item_t *item, *next_item; orte_iof_sink_t* sink; orte_ns_cmp_bitmask_t mask; - + for(item = opal_list_get_first(&mca_iof_hnp_component.sinks); item != opal_list_get_end(&mca_iof_hnp_component.sinks); item = next_item ) { @@ -395,10 +395,10 @@ static int hnp_close(const orte_process_name_t* peer, next_item = opal_list_get_next(item); mask = ORTE_NS_CMP_ALL; - + if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &sink->name, peer) && (source_tag & sink->tag)) { - + /* No need to delete the event or close the file * descriptor - the destructor will automatically * do it for us. @@ -418,7 +418,7 @@ static int finalize(void) orte_iof_write_event_t *wev; int num_written; bool dump; - + /* check if anything is still trying to be written out */ wev = orte_iof_base.iof_write_stdout->wev; if (!opal_list_is_empty(&wev->outputs)) { @@ -455,7 +455,7 @@ static int finalize(void) } } } - + orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_HNP); return ORTE_SUCCESS; @@ -479,14 +479,14 @@ static void stdin_write_handler(int fd, short event, void *cbdata) opal_list_item_t *item; orte_iof_write_output_t *output; int num_written; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s hnp:stdin:write:handler writing data to %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), wev->fd)); - + wev->pending = false; - + while (NULL != (item = opal_list_remove_first(&wev->outputs))) { output = (orte_iof_write_output_t*)item; /* if an abnormal termination has occurred, just dump @@ -525,7 +525,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) wev->pending = true; opal_event_add(wev->ev, 0); goto CHECK; - } + } /* otherwise, something bad happened so all we can do is declare an * error and abort */ @@ -545,7 +545,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) /* push this item back on the front of the list */ opal_list_prepend(&wev->outputs, item); /* leave the write event running so it will call us again - * when the fd is ready. + * when the fd is ready. */ wev->pending = true; opal_event_add(wev->ev, 0); @@ -589,10 +589,10 @@ orte_iof_hnp_exception_handler(orte_process_name_t* peer, orte_rml_exception_t r { #if 0 orte_iof_base_endpoint_t *endpoint; - opal_output_verbose(1, orte_iof_base_framework.framework_output, + opal_output_verbose(1, orte_iof_base_framework.framework_output, "iof svc exception handler! %s\n", ORTE_NAME_PRINT((orte_process_name_t*)peer)); - + /* If we detect an exception on the RML connection to a peer, delete all of its subscriptions and publications. Note that exceptions can be detected during a normal RML shutdown; they @@ -600,13 +600,13 @@ orte_iof_hnp_exception_handler(orte_process_name_t* peer, orte_rml_exception_t r orte_iof_hnp_sub_delete_all(peer); orte_iof_hnp_pub_delete_all(peer); opal_output_verbose(1, orte_iof_base_framework.framework_output, "deleted all pubs and subs\n"); - + /* Find any streams on any endpoints for this peer and close them */ - while (NULL != + while (NULL != (endpoint = orte_iof_base_endpoint_match(peer, ORTE_NS_CMP_ALL, ORTE_IOF_ANY))) { orte_iof_base_endpoint_closed(endpoint); - + /* Delete the endpoint that we just matched */ orte_iof_base_endpoint_delete(peer, ORTE_NS_CMP_ALL, ORTE_IOF_ANY); } diff --git a/orte/mca/iof/hnp/iof_hnp.h b/orte/mca/iof/hnp/iof_hnp.h index a35f32d9d65..86ed651808c 100644 --- a/orte/mca/iof/hnp/iof_hnp.h +++ b/orte/mca/iof/hnp/iof_hnp.h @@ -5,15 +5,15 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -56,9 +56,9 @@ BEGIN_C_DECLS /** - * IOF HNP Component + * IOF HNP Component */ -struct orte_iof_hnp_component_t { +struct orte_iof_hnp_component_t { orte_iof_base_component_t super; opal_list_t sinks; opal_list_t procs; @@ -84,5 +84,5 @@ int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host, unsigned char *data, int numbytes); END_C_DECLS - + #endif diff --git a/orte/mca/iof/hnp/iof_hnp_component.c b/orte/mca/iof/hnp/iof_hnp_component.c index 71f4592200c..84787f7d3e3 100644 --- a/orte/mca/iof/hnp/iof_hnp_component.c +++ b/orte/mca/iof/hnp/iof_hnp_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,7 +48,7 @@ orte_iof_hnp_component_t mca_iof_hnp_component = { { /* First, the mca_base_component_t struct containing meta information about the component itself */ - + .iof_version = { ORTE_IOF_BASE_VERSION_2_0_0, @@ -95,9 +95,9 @@ static int orte_iof_hnp_query(mca_base_module_t **module, int *priority) *module = NULL; return ORTE_ERROR; } - + *priority = 100; *module = (mca_base_module_t *) &orte_iof_hnp_module; - + return ORTE_SUCCESS; } diff --git a/orte/mca/iof/hnp/iof_hnp_read.c b/orte/mca/iof/hnp/iof_hnp_read.c index e14d7454ea3..9027d72ab60 100644 --- a/orte/mca/iof/hnp/iof_hnp_read.c +++ b/orte/mca/iof/hnp/iof_hnp_read.c @@ -5,18 +5,18 @@ * 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, + * 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-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014-2015 Intel Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -75,7 +75,7 @@ bool orte_iof_hnp_stdin_check(int fd) void orte_iof_hnp_stdin_cb(int fd, short event, void *cbdata) { bool should_process = orte_iof_hnp_stdin_check(0); - + if (should_process) { mca_iof_hnp_component.stdinev->active = true; opal_event_add(mca_iof_hnp_component.stdinev->ev, 0); @@ -98,18 +98,18 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) int rc; orte_ns_cmp_bitmask_t mask; bool exclusive; - + /* read up to the fragment size */ numbytes = read(fd, data, sizeof(data)); - + if (numbytes < 0) { /* either we have a connection error or it was a non-blocking read */ - + /* non-blocking, retry */ if (EAGAIN == errno || EINTR == errno) { opal_event_add(rev->ev, 0); return; - } + } OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:hnp:read handler %s Error on connection:%d", @@ -121,13 +121,13 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) */ numbytes = 0; } - + /* is this read from our stdin? */ if (ORTE_IOF_STDIN & rev->tag) { /* The event has fired, so it's no longer active until we re-add it */ mca_iof_hnp_component.stdinev->active = false; - + /* if job termination has been ordered, just ignore the * data and delete the read event */ @@ -140,12 +140,12 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) item != opal_list_get_end(&mca_iof_hnp_component.sinks); item = opal_list_get_next(item)) { orte_iof_sink_t* sink = (orte_iof_sink_t*)item; - + /* only look at stdin sinks */ if (!(ORTE_IOF_STDIN & sink->tag)) { continue; } - + mask = ORTE_NS_CMP_ALL; /* if the daemon is me, then this is a local sink */ @@ -172,7 +172,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) "%s sending %d bytes from stdin to daemon %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&sink->daemon))); - + /* send the data to the daemon so it can * write it to the proc's fd - in this case, * we pass sink->name to indicate who is to @@ -210,7 +210,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) /* nothing more to do */ return; } - + /* this must be output from one of my local procs - see * if anyone else has requested a copy of this info */ @@ -248,7 +248,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, (ORTE_IOF_STDOUT & rev->tag) ? "stdout" : ((ORTE_IOF_STDERR & rev->tag) ? "stderr" : "stddiag"), ORTE_NAME_PRINT(&rev->name))); - + if (0 == numbytes) { /* if we read 0 bytes from the stdout/err/diag, there is * nothing to output - find this proc on our list and @@ -321,7 +321,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) } } } - + /* re-add the event */ opal_event_add(rev->ev, 0); diff --git a/orte/mca/iof/hnp/iof_hnp_receive.c b/orte/mca/iof/hnp/iof_hnp_receive.c index e64a517a72b..a250cb994cf 100644 --- a/orte/mca/iof/hnp/iof_hnp_receive.c +++ b/orte/mca/iof/hnp/iof_hnp_receive.c @@ -5,18 +5,18 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014-2015 Intel Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -61,7 +61,7 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, opal_list_item_t *item, *next; int rc; bool exclusive; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s received IOF from proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -92,14 +92,14 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, } goto CLEAN_RETURN; } - + /* get name of the process whose io we are discussing */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &origin, &count, ORTE_NAME))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s received IOF cmd from sender %s for source %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -114,7 +114,7 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s received pull cmd from remote tool %s for proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -152,7 +152,7 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, } goto CLEAN_RETURN; } - + if (ORTE_IOF_CLOSE & stream) { OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s received close cmd from remote tool %s for proc %s", @@ -187,7 +187,7 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, } goto CLEAN_RETURN; } - + /* this must have come from a daemon forwarding output - unpack the data */ numbytes=ORTE_IOF_BASE_MSG_MAX; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, data, &numbytes, OPAL_BYTE))) { @@ -195,12 +195,12 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, goto CLEAN_RETURN; } /* numbytes will contain the actual #bytes that were sent */ - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s unpacked %d bytes from remote proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&origin))); - + /* cycle through the endpoints to see if someone else wants a copy */ exclusive = false; for (item = opal_list_get_first(&mca_iof_hnp_component.sinks); @@ -223,7 +223,7 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, } } } - + /* output this to our local output unless one of the sinks was exclusive */ if (!exclusive) { if (ORTE_IOF_STDOUT & stream || orte_xml_output) { @@ -232,7 +232,7 @@ void orte_iof_hnp_recv(int status, orte_process_name_t* sender, orte_iof_base_write_output(&origin, stream, data, numbytes, orte_iof_base.iof_write_stderr->wev); } } - + CLEAN_RETURN: return; } diff --git a/orte/mca/iof/hnp/iof_hnp_send.c b/orte/mca/iof/hnp/iof_hnp_send.c index 401ee204056..eafaefce6de 100644 --- a/orte/mca/iof/hnp/iof_hnp_send.c +++ b/orte/mca/iof/hnp/iof_hnp_send.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * All rights reserved * Copyright (c) 2014 Intel Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -63,7 +63,7 @@ int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host, } buf = OBJ_NEW(opal_buffer_t); - + /* pack the tag - we do this first so that flow control messages can * consist solely of the tag */ @@ -81,7 +81,7 @@ int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host, OBJ_RELEASE(buf); return rc; } - + /* if data is NULL, then we are done */ if (NULL != data) { /* pack the data - if numbytes is zero, we will pack zero bytes */ @@ -91,7 +91,7 @@ int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host, return rc; } } - + /* if the target is wildcard, then this needs to go to everyone - xcast it */ if (ORTE_PROC_MY_NAME->jobid == host->jobid && ORTE_VPID_WILDCARD == host->vpid) { @@ -105,7 +105,7 @@ int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host, OBJ_RELEASE(sig); return ORTE_SUCCESS; } - + /* send the buffer to the host - this is either a daemon or * a tool that requested IOF */ diff --git a/orte/mca/iof/iof.h b/orte/mca/iof/iof.h index a9e86b96799..279992d5136 100644 --- a/orte/mca/iof/iof.h +++ b/orte/mca/iof/iof.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -15,9 +15,9 @@ * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** diff --git a/orte/mca/iof/iof_types.h b/orte/mca/iof/iof_types.h index 86eb524ecb3..db74fd8c3d5 100644 --- a/orte/mca/iof/iof_types.h +++ b/orte/mca/iof/iof_types.h @@ -5,15 +5,15 @@ * 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, + * 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-2008 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** diff --git a/orte/mca/iof/mr_hnp/Makefile.am b/orte/mca/iof/mr_hnp/Makefile.am index a26b6e1443a..35e39c117b1 100644 --- a/orte/mca/iof/mr_hnp/Makefile.am +++ b/orte/mca/iof/mr_hnp/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2012 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp.c b/orte/mca/iof/mr_hnp/iof_mrhnp.c index 2c8775548d4..c912f6df9fa 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp.c @@ -3,9 +3,9 @@ * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "orte_config.h" @@ -82,7 +82,7 @@ static int init(void) { /* post non-blocking recv to catch forwarded IO from * the orteds - */ + */ orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_HNP, ORTE_RML_PERSISTENT, @@ -97,7 +97,7 @@ static int init(void) return ORTE_SUCCESS; } -/* Setup to read from stdin. +/* Setup to read from stdin. */ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag, int fd) { @@ -118,12 +118,12 @@ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta if (ORTE_VPID_INVALID == dst_name->vpid || fd < 0) { return ORTE_SUCCESS; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrhnp pushing fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* we get a push for stdout, stderr, and stddiag on every LOCAL process, so * setup to read those streams and forward them to the next app_context */ @@ -132,7 +132,7 @@ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta * and activate the read event in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; @@ -185,7 +185,7 @@ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta orte_iof_base_write_handler, &mca_iof_mr_hnp_component.sinks); } - + SETUP: /* define a read event but don't activate it */ if (src_tag & ORTE_IOF_STDOUT) { @@ -252,16 +252,16 @@ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta * This causes things like "mpirun -np 1 big_app | cat" to lose * output, because cat's stdout is then ALSO non-blocking and cat * isn't built to deal with that case (same with almost all other - * unix text utils). + * unix text utils). */ if (0 != fd) { if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; fcntl(fd, F_SETFL, flags); - } + } } if (isatty(fd)) { /* We should avoid trying to read from stdin if we @@ -274,7 +274,7 @@ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta opal_event_signal_set(orte_event_base, &mca_iof_mr_hnp_component.stdinsig, SIGCONT, orte_iof_mrhnp_stdin_cb, NULL); - + /* setup a read event to read stdin, but don't activate it yet. The * dst_name indicates who should receive the stdin. If that recipient * doesn't do a corresponding pull, however, then the stdin will @@ -283,7 +283,7 @@ static int mrhnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta ORTE_IOF_READ_EVENT(&mca_iof_mr_hnp_component.stdinev, dst_name, fd, ORTE_IOF_STDIN, orte_iof_mrhnp_read_local_handler, false); - + /* check to see if we want the stdin read event to be * active - we will always at least define the event, * but may delay its activation @@ -326,12 +326,12 @@ static int mrhnp_pull(const orte_process_name_t* dst_name, if (ORTE_IOF_STDIN != src_tag) { return ORTE_ERR_NOT_SUPPORTED; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrhnp pulling fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* get the job object for this proc and check to see if it * is a mapper - if so, add it to the jobs that receive * our stdin @@ -362,13 +362,13 @@ static int mrhnp_pull(const orte_process_name_t* dst_name, * the sink in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; fcntl(fd, F_SETFL, flags); } - + ORTE_IOF_SINK_DEFINE(&sink, dst_name, fd, ORTE_IOF_STDIN, stdin_write_handler, NULL); sink->daemon.jobid = ORTE_PROC_MY_NAME->jobid; @@ -416,10 +416,10 @@ static int mrhnp_close(const orte_process_name_t* peer, next_item = opal_list_get_next(item); mask = ORTE_NS_CMP_ALL; - + if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &sink->name, peer) && (source_tag & sink->tag)) { - + /* No need to delete the event or close the file * descriptor - the destructor will automatically * do it for us. @@ -513,7 +513,7 @@ static void mrhnp_complete(const orte_job_t *jdata) "%s sending close stdin to daemon %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&daemon->name))); - + /* need to send a 0-byte message to clear the stream and close it */ send_data(&daemon->name, ORTE_IOF_STDIN, jptr->jobid, data, 0); } @@ -566,7 +566,7 @@ static int finalize(void) } } } - + orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_HNP); /* clear our stdin job array */ @@ -596,14 +596,14 @@ static void stdin_write_handler(int fd, short event, void *cbdata) opal_list_item_t *item; orte_iof_write_output_t *output; int num_written; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s mrhnp:stdin:write:handler writing data to %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), wev->fd)); - + wev->pending = false; - + while (NULL != (item = opal_list_remove_first(&wev->outputs))) { output = (orte_iof_write_output_t*)item; /* if an abnormal termination has occurred, just dump @@ -642,7 +642,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) wev->pending = true; opal_event_add(wev->ev, 0); goto CHECK; - } + } /* otherwise, something bad happened so all we can do is declare an * error and abort */ @@ -662,7 +662,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) /* push this item back on the front of the list */ opal_list_prepend(&wev->outputs, item); /* leave the write event running so it will call us again - * when the fd is ready. + * when the fd is ready. */ wev->pending = true; opal_event_add(wev->ev, 0); diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp.h b/orte/mca/iof/mr_hnp/iof_mrhnp.h index eb65edf0884..2611ae7b0ae 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp.h +++ b/orte/mca/iof/mr_hnp/iof_mrhnp.h @@ -3,9 +3,9 @@ * All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,9 +31,9 @@ BEGIN_C_DECLS /** - * IOF HNP Component + * IOF HNP Component */ -typedef struct { +typedef struct { orte_iof_base_component_t super; opal_list_t sinks; opal_list_t procs; @@ -60,5 +60,5 @@ int orte_iof_hnp_send_data_to_endpoint(orte_process_name_t *host, unsigned char *data, int numbytes); END_C_DECLS - + #endif diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp_component.c b/orte/mca/iof/mr_hnp/iof_mrhnp_component.c index e0d2335e447..87dfced7a37 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp_component.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp_component.c @@ -4,9 +4,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -37,7 +37,7 @@ orte_iof_mrhnp_component_t mca_iof_mr_hnp_component = { { /* First, the mca_base_component_t struct containing meta information about the component itself */ - + .iof_version = { ORTE_IOF_BASE_VERSION_2_0_0, @@ -88,7 +88,7 @@ static int mrhnp_query(mca_base_module_t **module, int *priority) } return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp_read.c b/orte/mca/iof/mr_hnp/iof_mrhnp_read.c index cf8f8af7c0a..e5cbb6d8abd 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp_read.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp_read.c @@ -3,9 +3,9 @@ * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -70,7 +70,7 @@ bool orte_iof_mrhnp_stdin_check(int fd) void orte_iof_mrhnp_stdin_cb(int fd, short event, void *cbdata) { bool should_process = orte_iof_mrhnp_stdin_check(0); - + if (should_process) { mca_iof_mr_hnp_component.stdinev->active = true; opal_event_add(mca_iof_mr_hnp_component.stdinev->ev, 0); @@ -109,12 +109,12 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) if (numbytes < 0) { /* either we have a connection error or it was a non-blocking read */ - + /* non-blocking, retry */ if (EAGAIN == errno || EINTR == errno) { opal_event_add(rev->ev, 0); return; - } + } OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrhnp:read handler %s Error on connection:%d", @@ -126,7 +126,7 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) */ numbytes = 0; } - + /* if job termination has been ordered, just ignore the * data and delete the stdin read event, if that is what fired */ @@ -141,7 +141,7 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) /* The event has fired, so it's no longer active until we * re-add it */ - mca_iof_mr_hnp_component.stdinev->active = false; + mca_iof_mr_hnp_component.stdinev->active = false; /* if this was read from my stdin, I need to send this input to all * daemons who host mapper procs */ @@ -199,7 +199,7 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) "%s sending %d bytes from stdin to daemon %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&daemon->name))); - + /* send the data to the daemon so it can * write it to all local procs from this job. * If the connection closed, @@ -276,7 +276,7 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&rev->name), ORTE_NAME_PRINT(&daemon->name))); - + /* send the data to the daemon so it can * write it to all local procs from this job */ @@ -284,14 +284,14 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) } } } - + PROCESS: OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s read %d bytes from %s of %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, (ORTE_IOF_STDOUT & rev->tag) ? "stdout" : ((ORTE_IOF_STDERR & rev->tag) ? "stderr" : "stddiag"), ORTE_NAME_PRINT(&rev->name))); - + if (0 == numbytes) { /* if we read 0 bytes from the stdout/err/diag, find this proc * on our list and @@ -337,7 +337,7 @@ void orte_iof_mrhnp_read_local_handler(int fd, short event, void *cbdata) orte_iof_base_write_output(&rev->name, rev->tag, data, numbytes, orte_iof_base.iof_write_stderr->wev); } } - + /* re-add the event */ opal_event_add(rev->ev, 0); diff --git a/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c b/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c index 32aec972b92..93750d2480c 100644 --- a/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c +++ b/orte/mca/iof/mr_hnp/iof_mrhnp_receive.c @@ -1,11 +1,11 @@ /* * Copyright (c) 2012 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -48,7 +48,7 @@ void orte_iof_mrhnp_recv(int status, orte_process_name_t* sender, int32_t count, numbytes; int rc; - + /* unpack the stream first as this may be flow control info */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &stream, &count, ORTE_IOF_TAG))) { @@ -74,14 +74,14 @@ void orte_iof_mrhnp_recv(int status, orte_process_name_t* sender, } goto CLEAN_RETURN; } - + /* get name of the process whose io we are discussing */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &origin, &count, ORTE_NAME))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* this must have come from a daemon forwarding output - unpack the data */ numbytes=ORTE_IOF_BASE_MSG_MAX; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, data, &numbytes, OPAL_BYTE))) { @@ -89,19 +89,19 @@ void orte_iof_mrhnp_recv(int status, orte_process_name_t* sender, goto CLEAN_RETURN; } /* numbytes will contain the actual #bytes that were sent */ - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s unpacked %d bytes from remote proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&origin))); - + /* output this to our local output */ if (ORTE_IOF_STDOUT & stream || orte_xml_output) { orte_iof_base_write_output(&origin, stream, data, numbytes, orte_iof_base.iof_write_stdout->wev); } else { orte_iof_base_write_output(&origin, stream, data, numbytes, orte_iof_base.iof_write_stderr->wev); } - + CLEAN_RETURN: return; } diff --git a/orte/mca/iof/mr_orted/Makefile.am b/orte/mca/iof/mr_orted/Makefile.am index 06f5cefd9b8..bc2c46e8c68 100644 --- a/orte/mca/iof/mr_orted/Makefile.am +++ b/orte/mca/iof/mr_orted/Makefile.am @@ -2,9 +2,9 @@ # Copyright (c) 2012 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/iof/mr_orted/iof_mrorted.c b/orte/mca/iof/mr_orted/iof_mrorted.c index d6aa59708f6..7eed7cf86d4 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted.c +++ b/orte/mca/iof/mr_orted/iof_mrorted.c @@ -4,9 +4,9 @@ * Copyright (c) 2014 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -89,11 +89,11 @@ static int init(void) ORTE_RML_PERSISTENT, orte_iof_mrorted_recv, NULL); - + /* setup the local global variables */ OBJ_CONSTRUCT(&mca_iof_mr_orted_component.sinks, opal_list_t); OBJ_CONSTRUCT(&mca_iof_mr_orted_component.procs, opal_list_t); - + return ORTE_SUCCESS; } @@ -118,12 +118,12 @@ static int mrorted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ "%s iof:mrorted pushing fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* set the file descriptor to non-blocking - do this before we setup * and activate the read event in case it fires right away */ if ((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; @@ -177,7 +177,7 @@ static int mrorted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ orte_iof_base_write_handler, &mca_iof_mr_orted_component.sinks); } - + SETUP: /* define a read event but don't activate it */ if (src_tag & ORTE_IOF_STDOUT) { @@ -229,17 +229,17 @@ static int mrorted_pull(const orte_process_name_t* dst_name, if (ORTE_IOF_STDIN != src_tag) { return ORTE_ERR_NOT_SUPPORTED; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrorted pulling fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* set the file descriptor to non-blocking - do this before we setup * the sink in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; @@ -248,7 +248,7 @@ static int mrorted_pull(const orte_process_name_t* dst_name, ORTE_IOF_SINK_DEFINE(&sink, dst_name, fd, ORTE_IOF_STDIN, stdin_write_handler, NULL); - + sink->daemon.jobid = ORTE_PROC_MY_NAME->jobid; sink->daemon.vpid = ORTE_PROC_MY_NAME->vpid; @@ -294,7 +294,7 @@ static int mrorted_close(const orte_process_name_t* peer, item = next_item ) { sink = (orte_iof_sink_t*)item; next_item = opal_list_get_next(item); - + mask = ORTE_NS_CMP_ALL; if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &sink->name, peer) && @@ -349,7 +349,7 @@ static void mrorted_complete(const orte_job_t *jdata) static int finalize(void) { opal_list_item_t *item; - + while ((item = opal_list_remove_first(&mca_iof_mr_orted_component.sinks)) != NULL) { OBJ_RELEASE(item); } @@ -379,14 +379,14 @@ static void stdin_write_handler(int fd, short event, void *cbdata) opal_list_item_t *item; orte_iof_write_output_t *output; int num_written; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s mrorted:stdin:write:handler writing data to %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), wev->fd)); - + wev->pending = false; - + while (NULL != (item = opal_list_remove_first(&wev->outputs))) { output = (orte_iof_write_output_t*)item; if (0 == output->numbytes) { @@ -415,7 +415,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) wev->pending = true; opal_event_add(wev->ev, 0); goto CHECK; - } + } /* otherwise, something bad happened so all we can do is declare an error */ OBJ_RELEASE(output); OPAL_OUTPUT_VERBOSE((20, orte_iof_base_framework.framework_output, @@ -433,7 +433,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) /* push this item back on the front of the list */ opal_list_prepend(&wev->outputs, item); /* leave the write event running so it will call us again - * when the fd is ready. + * when the fd is ready. */ wev->pending = true; opal_event_add(wev->ev, 0); @@ -441,7 +441,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) } OBJ_RELEASE(output); } - + CHECK: if (sink->xoff) { /* if we have told the HNP to stop reading stdin, see if diff --git a/orte/mca/iof/mr_orted/iof_mrorted.h b/orte/mca/iof/mr_orted/iof_mrorted.h index f0532a1e4e4..26ee9422d52 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted.h +++ b/orte/mca/iof/mr_orted/iof_mrorted.h @@ -3,9 +3,9 @@ * All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #ifndef ORTE_IOF_MR_ORTED_H @@ -22,9 +22,9 @@ BEGIN_C_DECLS /** - * IOF MR_ORTED Component + * IOF MR_ORTED Component */ -typedef struct { +typedef struct { orte_iof_base_component_t super; opal_list_t sinks; opal_list_t procs; diff --git a/orte/mca/iof/mr_orted/iof_mrorted_component.c b/orte/mca/iof/mr_orted/iof_mrorted_component.c index 41ce83d9f6e..5ee4844ba36 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted_component.c +++ b/orte/mca/iof/mr_orted/iof_mrorted_component.c @@ -4,9 +4,9 @@ * reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -76,7 +76,7 @@ static int mr_orted_query(mca_base_module_t **module, int *priority) *module = (mca_base_module_t *) &orte_iof_mrorted_module; return ORTE_SUCCESS; } - + *priority = -1; *module = NULL; return ORTE_ERROR; diff --git a/orte/mca/iof/mr_orted/iof_mrorted_read.c b/orte/mca/iof/mr_orted/iof_mrorted_read.c index ef43ef87399..b39a1aae65a 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted_read.c +++ b/orte/mca/iof/mr_orted/iof_mrorted_read.c @@ -4,9 +4,9 @@ * Copyright (c) 2014 Intel, Inc. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -58,12 +58,12 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) /* read up to the fragment size */ numbytes = read(fd, data, sizeof(data)); - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrorted:read handler read %d bytes from %s, fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&rev->name), fd)); - + if (numbytes <= 0) { if (0 > numbytes) { /* either we have a connection error or it was a non-blocking read */ @@ -71,7 +71,7 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) /* non-blocking, retry */ opal_event_add(rev->ev, 0); return; - } + } OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrorted:read handler %s Error on connection:%d", @@ -81,7 +81,7 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) /* numbytes must have been zero, so go down and close the fd etc */ goto CLEAN_RETURN; } - + /* see if the user wanted the output directed to files */ if (NULL != orte_output_filename) { /* find the sink for this rank */ @@ -109,7 +109,7 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) } } } - + if (ORTE_IOF_STDOUT & rev->tag) { /* see if we need to forward this output */ stdout_target = ORTE_JOBID_INVALID; @@ -150,7 +150,7 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&rev->name), ORTE_NAME_PRINT(&daemon->name))); - + /* send the data to the daemon so it can * write it to all local procs from this job */ @@ -158,12 +158,12 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) } } } - + PROCESS: if (write_out) { /* prep the buffer */ buf = OBJ_NEW(opal_buffer_t); - + /* pack the stream first - we do this so that flow control messages can * consist solely of the tag */ @@ -171,13 +171,13 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* pack name of process that gave us this data */ if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &rev->name, 1, ORTE_NAME))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* pack the data - only pack the #bytes we read! */ if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &data, numbytes, OPAL_BYTE))) { ORTE_ERROR_LOG(rc); @@ -188,16 +188,16 @@ void orte_iof_mrorted_read_handler(int fd, short event, void *cbdata) OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:mrorted:read handler sending %d bytes to HNP", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes)); - + orte_rml.send_buffer_nb(ORTE_PROC_MY_HNP, buf, ORTE_RML_TAG_IOF_HNP, orte_rml_send_callback, NULL); } - + /* re-add the event */ opal_event_add(rev->ev, 0); return; - + CLEAN_RETURN: /* must be an error, or zero bytes were read indicating that the * proc terminated this IOF channel - either way, find this proc diff --git a/orte/mca/iof/mr_orted/iof_mrorted_receive.c b/orte/mca/iof/mr_orted/iof_mrorted_receive.c index e894576f67c..32d3c6a0d90 100644 --- a/orte/mca/iof/mr_orted/iof_mrorted_receive.c +++ b/orte/mca/iof/mr_orted/iof_mrorted_receive.c @@ -4,9 +4,9 @@ * Copyright (c) 2014 Intel Corporation. All rights reserved. * * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -44,9 +44,9 @@ void orte_iof_mrorted_send_xonxoff(orte_process_name_t *name, orte_iof_tag_t tag { opal_buffer_t *buf; int rc; - + buf = OBJ_NEW(opal_buffer_t); - + /* pack the tag - we do this first so that flow control messages can * consist solely of the tag */ @@ -92,20 +92,20 @@ void orte_iof_mrorted_recv(int status, orte_process_name_t* sender, orte_jobid_t jobid; opal_list_item_t *item; int rc; - + /* see what stream generated this data */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &stream, &count, ORTE_IOF_TAG))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* if this isn't stdin, then we have an error */ if (ORTE_IOF_STDIN != stream) { ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE); goto CLEAN_RETURN; } - + /* unpack the intended target */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &jobid, &count, ORTE_JOBID))) { @@ -120,18 +120,18 @@ void orte_iof_mrorted_recv(int status, orte_process_name_t* sender, goto CLEAN_RETURN; } /* numbytes will contain the actual #bytes that were sent */ - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s unpacked %d bytes for local job %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_JOBID_PRINT(jobid))); - + /* cycle through our list of procs */ for (item = opal_list_get_first(&mca_iof_mr_orted_component.procs); item != opal_list_get_end(&mca_iof_mr_orted_component.procs); item = opal_list_get_next(item)) { orte_iof_proc_t* sink = (orte_iof_proc_t*)item; - + /* is this intended for this jobid? */ if (jobid == sink->name.jobid) { OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, diff --git a/orte/mca/iof/orted/Makefile.am b/orte/mca/iof/orted/Makefile.am index cca493d7e5c..81ba139a4d9 100644 --- a/orte/mca/iof/orted/Makefile.am +++ b/orte/mca/iof/orted/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/iof/orted/iof_orted.c b/orte/mca/iof/orted/iof_orted.c index 549e5d0053d..d87de1f207b 100644 --- a/orte/mca/iof/orted/iof_orted.c +++ b/orte/mca/iof/orted/iof_orted.c @@ -5,17 +5,17 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -96,12 +96,12 @@ static int init(void) ORTE_RML_PERSISTENT, orte_iof_orted_recv, NULL); - + /* setup the local global variables */ OBJ_CONSTRUCT(&mca_iof_orted_component.sinks, opal_list_t); OBJ_CONSTRUCT(&mca_iof_orted_component.procs, opal_list_t); mca_iof_orted_component.xoff = false; - + return ORTE_SUCCESS; } @@ -126,12 +126,12 @@ static int orted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta "%s iof:orted pushing fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* set the file descriptor to non-blocking - do this before we setup * and activate the read event in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; @@ -143,7 +143,7 @@ static int orted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta item != opal_list_get_end(&mca_iof_orted_component.procs); item = opal_list_get_next(item)) { proct = (orte_iof_proc_t*)item; - + mask = ORTE_NS_CMP_ALL; if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &proct->name, dst_name)) { @@ -187,7 +187,7 @@ static int orted_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_ta orte_iof_base_write_handler, &mca_iof_orted_component.sinks); } - + SETUP: /* define a read event and activate it */ if (src_tag & ORTE_IOF_STDOUT) { @@ -232,22 +232,22 @@ static int orted_pull(const orte_process_name_t* dst_name, { orte_iof_sink_t *sink; int flags; - + /* this is a local call - only stdin is supported */ if (ORTE_IOF_STDIN != src_tag) { return ORTE_ERR_NOT_SUPPORTED; } - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:orted pulling fd %d for process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), fd, ORTE_NAME_PRINT(dst_name))); - + /* set the file descriptor to non-blocking - do this before we setup * the sink in case it fires right away */ if((flags = fcntl(fd, F_GETFL, 0)) < 0) { - opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", + opal_output(orte_iof_base_framework.framework_output, "[%s:%d]: fcntl(F_GETFL) failed with errno=%d\n", __FILE__, __LINE__, errno); } else { flags |= O_NONBLOCK; @@ -257,7 +257,7 @@ static int orted_pull(const orte_process_name_t* dst_name, ORTE_IOF_SINK_DEFINE(&sink, dst_name, fd, ORTE_IOF_STDIN, stdin_write_handler, &mca_iof_orted_component.sinks); - + return ORTE_SUCCESS; } @@ -273,13 +273,13 @@ static int orted_close(const orte_process_name_t* peer, opal_list_item_t *item, *next_item; orte_iof_sink_t* sink; orte_ns_cmp_bitmask_t mask; - + for (item = opal_list_get_first(&mca_iof_orted_component.sinks); item != opal_list_get_end(&mca_iof_orted_component.sinks); item = next_item ) { sink = (orte_iof_sink_t*)item; next_item = opal_list_get_next(item); - + mask = ORTE_NS_CMP_ALL; if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &sink->name, peer) && @@ -301,7 +301,7 @@ static int orted_close(const orte_process_name_t* peer, static int finalize(void) { opal_list_item_t *item; - + while ((item = opal_list_remove_first(&mca_iof_orted_component.sinks)) != NULL) { OBJ_RELEASE(item); } @@ -331,14 +331,14 @@ static void stdin_write_handler(int fd, short event, void *cbdata) opal_list_item_t *item; orte_iof_write_output_t *output; int num_written; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s orted:stdin:write:handler writing data to %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), wev->fd)); - + wev->pending = false; - + while (NULL != (item = opal_list_remove_first(&wev->outputs))) { output = (orte_iof_write_output_t*)item; if (0 == output->numbytes) { @@ -367,7 +367,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) wev->pending = true; opal_event_add(wev->ev, 0); goto CHECK; - } + } /* otherwise, something bad happened so all we can do is declare an * error and abort */ @@ -392,7 +392,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) /* push this item back on the front of the list */ opal_list_prepend(&wev->outputs, item); /* leave the write event running so it will call us again - * when the fd is ready. + * when the fd is ready. */ wev->pending = true; opal_event_add(wev->ev, 0); @@ -400,7 +400,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata) } OBJ_RELEASE(output); } - + CHECK: if (mca_iof_orted_component.xoff) { /* if we have told the HNP to stop reading stdin, see if diff --git a/orte/mca/iof/orted/iof_orted.h b/orte/mca/iof/orted/iof_orted.h index 62261c392df..d534c755ea6 100644 --- a/orte/mca/iof/orted/iof_orted.h +++ b/orte/mca/iof/orted/iof_orted.h @@ -5,16 +5,16 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -32,7 +32,7 @@ * * Much of the intelligence of this component is actually contained in * iof_base_endpoint.c (reading and writing to local file descriptors, - * setting up events based on file descriptors, etc.). + * setting up events based on file descriptors, etc.). * * A non-blocking OOB receive is posted at the initialization of this * component to receive all messages from the HNP (e.g., data @@ -57,9 +57,9 @@ BEGIN_C_DECLS /** - * IOF ORTED Component + * IOF ORTED Component */ -struct orte_iof_orted_component_t { +struct orte_iof_orted_component_t { orte_iof_base_component_t super; opal_list_t sinks; opal_list_t procs; diff --git a/orte/mca/iof/orted/iof_orted_component.c b/orte/mca/iof/orted/iof_orted_component.c index 9cf9bde989d..f9b040a3c7b 100644 --- a/orte/mca/iof/orted/iof_orted_component.c +++ b/orte/mca/iof/orted/iof_orted_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -90,7 +90,7 @@ static int orte_iof_orted_query(mca_base_module_t **module, int *priority) *priority = 100; *module = (mca_base_module_t *) &orte_iof_orted_module; - + return ORTE_SUCCESS; } diff --git a/orte/mca/iof/orted/iof_orted_read.c b/orte/mca/iof/orted/iof_orted_read.c index 554216f4de2..2f64b8e6bad 100644 --- a/orte/mca/iof/orted/iof_orted_read.c +++ b/orte/mca/iof/orted/iof_orted_read.c @@ -5,17 +5,17 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -64,7 +64,7 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) opal_list_item_t *item; orte_iof_proc_t *proct; orte_ns_cmp_bitmask_t mask; - + /* read up to the fragment size */ #if !defined(__WINDOWS__) numbytes = read(fd, data, sizeof(data)); @@ -76,12 +76,12 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) numbytes = (int)readed; } #endif /* !defined(__WINDOWS__) */ - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:orted:read handler read %d bytes from %s, fd %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&rev->name), fd)); - + if (numbytes <= 0) { if (0 > numbytes) { /* either we have a connection error or it was a non-blocking read */ @@ -89,7 +89,7 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) /* non-blocking, retry */ opal_event_add(rev->ev, 0); return; - } + } OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:orted:read handler %s Error on connection:%d", @@ -99,7 +99,7 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) /* numbytes must have been zero, so go down and close the fd etc */ goto CLEAN_RETURN; } - + /* see if the user wanted the output directed to files */ if (NULL != orte_output_filename) { /* find the sink for this rank */ @@ -128,10 +128,10 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) } goto RESTART; } - + /* prep the buffer */ buf = OBJ_NEW(opal_buffer_t); - + /* pack the stream first - we do this so that flow control messages can * consist solely of the tag */ @@ -139,13 +139,13 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* pack name of process that gave us this data */ if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &rev->name, 1, ORTE_NAME))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* pack the data - only pack the #bytes we read! */ if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &data, numbytes, OPAL_BYTE))) { ORTE_ERROR_LOG(rc); @@ -156,16 +156,16 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata) OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s iof:orted:read handler sending %d bytes to HNP", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes)); - + orte_rml.send_buffer_nb(ORTE_PROC_MY_HNP, buf, ORTE_RML_TAG_IOF_HNP, send_cb, NULL); - + RESTART: /* re-add the event */ opal_event_add(rev->ev, 0); return; - + CLEAN_RETURN: /* must be an error, or zero bytes were read indicating that the * proc terminated this IOF channel - either way, find this proc diff --git a/orte/mca/iof/orted/iof_orted_receive.c b/orte/mca/iof/orted/iof_orted_receive.c index 6eca4191113..efb3b6a67ee 100644 --- a/orte/mca/iof/orted/iof_orted_receive.c +++ b/orte/mca/iof/orted/iof_orted_receive.c @@ -5,18 +5,18 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -54,9 +54,9 @@ void orte_iof_orted_send_xonxoff(orte_iof_tag_t tag) { opal_buffer_t *buf; int rc; - + buf = OBJ_NEW(opal_buffer_t); - + /* pack the tag - we do this first so that flow control messages can * consist solely of the tag */ @@ -96,20 +96,20 @@ void orte_iof_orted_recv(int status, orte_process_name_t* sender, orte_process_name_t target; opal_list_item_t *item; int rc; - + /* see what stream generated this data */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &stream, &count, ORTE_IOF_TAG))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* if this isn't stdin, then we have an error */ if (ORTE_IOF_STDIN != stream) { ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE); goto CLEAN_RETURN; } - + /* unpack the intended target */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &target, &count, ORTE_NAME))) { @@ -124,18 +124,18 @@ void orte_iof_orted_recv(int status, orte_process_name_t* sender, goto CLEAN_RETURN; } /* numbytes will contain the actual #bytes that were sent */ - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s unpacked %d bytes for local proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&target))); - + /* cycle through our list of sinks */ for (item = opal_list_get_first(&mca_iof_orted_component.sinks); item != opal_list_get_end(&mca_iof_orted_component.sinks); item = opal_list_get_next(item)) { orte_iof_sink_t* sink = (orte_iof_sink_t*)item; - + /* is this intended for this jobid? */ if (target.jobid == sink->name.jobid) { /* yes - is this intended for all vpids or this vpid? */ diff --git a/orte/mca/iof/tool/Makefile.am b/orte/mca/iof/tool/Makefile.am index 7f0d5dfa163..4dceacc0636 100644 --- a/orte/mca/iof/tool/Makefile.am +++ b/orte/mca/iof/tool/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/iof/tool/iof_tool.c b/orte/mca/iof/tool/iof_tool.c index ffdb0fb7a4a..7abe3970ba9 100644 --- a/orte/mca/iof/tool/iof_tool.c +++ b/orte/mca/iof/tool/iof_tool.c @@ -5,18 +5,18 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -68,7 +68,7 @@ orte_iof_base_module_t orte_iof_tool_module = { static int init(void) -{ +{ /* post a non-blocking RML receive to get messages from the HNP IOF component */ orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, @@ -76,9 +76,9 @@ static int init(void) ORTE_RML_PERSISTENT, orte_iof_tool_recv, NULL); - + mca_iof_tool_component.closed = false; - + return ORTE_SUCCESS; } @@ -94,7 +94,7 @@ static int tool_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag * stdin is being read/used, and the impossibility of resolving * potential interleaving of the data */ - + return ORTE_ERR_NOT_SUPPORTED; } @@ -127,22 +127,22 @@ static int tool_pull(const orte_process_name_t* src_name, * close any or all of those streams, so the success of this call * will depend upon how the user executed the application */ - + opal_buffer_t *buf; orte_iof_tag_t tag; orte_process_name_t hnp; int rc; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s pulling output for proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(src_name))); buf = OBJ_NEW(opal_buffer_t); - + /* setup the tag to pull from HNP */ tag = src_tag | ORTE_IOF_PULL; - + /* pack the tag - we do this first so that flow control messages can * consist solely of the tag */ @@ -168,7 +168,7 @@ static int tool_pull(const orte_process_name_t* src_name, ORTE_HNP_NAME_FROM_JOB(&hnp, src_name->jobid); orte_rml.send_buffer_nb(&hnp, buf, ORTE_RML_TAG_IOF_HNP, send_cb, NULL); - + return ORTE_SUCCESS; } @@ -179,22 +179,22 @@ static int tool_close(const orte_process_name_t* src_name, /* if we are a tool, then we need to request the HNP to stop * forwarding data from this process/stream */ - + opal_buffer_t *buf; orte_iof_tag_t tag; orte_process_name_t hnp; int rc; - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s closing output for proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(src_name))); - + buf = OBJ_NEW(opal_buffer_t); - + /* setup the tag to stop the copy */ tag = src_tag | ORTE_IOF_CLOSE; - + /* pack the tag - we do this first so that flow control messages can * consist solely of the tag */ @@ -209,7 +209,7 @@ static int tool_close(const orte_process_name_t* src_name, OBJ_RELEASE(buf); return rc; } - + /* flag that the close is incomplete */ mca_iof_tool_component.closed = false; @@ -217,7 +217,7 @@ static int tool_close(const orte_process_name_t* src_name, ORTE_HNP_NAME_FROM_JOB(&hnp, src_name->jobid); orte_rml.send_buffer_nb(&hnp, buf, ORTE_RML_TAG_IOF_HNP, send_cb, NULL); - + return ORTE_SUCCESS; } @@ -228,7 +228,7 @@ static int finalize(void) orte_iof_write_event_t *wev; int num_written; bool dump; - + /* check if anything is still trying to be written out */ wev = orte_iof_base.iof_write_stdout->wev; if (!opal_list_is_empty(&wev->outputs)) { @@ -267,10 +267,10 @@ static int finalize(void) } OBJ_RELEASE(orte_iof_base.iof_write_stderr); } - + /* Cancel the RML receive */ orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_PROXY); - + return ORTE_SUCCESS; } diff --git a/orte/mca/iof/tool/iof_tool.h b/orte/mca/iof/tool/iof_tool.h index 6805c2a1529..fef45d8dbcf 100644 --- a/orte/mca/iof/tool/iof_tool.h +++ b/orte/mca/iof/tool/iof_tool.h @@ -5,16 +5,16 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -39,7 +39,7 @@ BEGIN_C_DECLS -struct orte_iof_tool_component_t { +struct orte_iof_tool_component_t { orte_iof_base_component_t super; bool closed; }; diff --git a/orte/mca/iof/tool/iof_tool_component.c b/orte/mca/iof/tool/iof_tool_component.c index 73a26376e05..bead06b8c5d 100644 --- a/orte/mca/iof/tool/iof_tool_component.c +++ b/orte/mca/iof/tool/iof_tool_component.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -51,7 +51,7 @@ orte_iof_tool_component_t mca_iof_tool_component = { { .iof_version = { ORTE_IOF_BASE_VERSION_2_0_0, - + .mca_component_name = "tool", MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION, ORTE_RELEASE_VERSION), @@ -94,7 +94,7 @@ static int orte_iof_tool_query(mca_base_module_t **module, int *priority) *priority = 100; *module = (mca_base_module_t *) &orte_iof_tool_module; - + return ORTE_SUCCESS; } diff --git a/orte/mca/iof/tool/iof_tool_receive.c b/orte/mca/iof/tool/iof_tool_receive.c index 75b0ea8e272..5aa99d569ba 100644 --- a/orte/mca/iof/tool/iof_tool_receive.c +++ b/orte/mca/iof/tool/iof_tool_receive.c @@ -5,18 +5,18 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel Corporation. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -52,15 +52,15 @@ void orte_iof_tool_recv(int status, orte_process_name_t* sender, orte_iof_tag_t stream; int32_t count, numbytes; int rc; - - + + /* unpack the stream first as this may be flow control info */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &stream, &count, ORTE_IOF_TAG))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* if this is a CLOSE tag, then ignore the rest - this is just the * tail end of a handshake to indicate we have closed a stream */ @@ -72,14 +72,14 @@ void orte_iof_tool_recv(int status, orte_process_name_t* sender, mca_iof_tool_component.closed = true; goto CLEAN_RETURN; } - + /* get name of the process whose io we are receiving */ count = 1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &origin, &count, ORTE_NAME))) { ORTE_ERROR_LOG(rc); goto CLEAN_RETURN; } - + /* unpack the data */ numbytes=ORTE_IOF_BASE_MSG_MAX; if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, data, &numbytes, OPAL_BYTE))) { @@ -87,12 +87,12 @@ void orte_iof_tool_recv(int status, orte_process_name_t* sender, goto CLEAN_RETURN; } /* numbytes will contain the actual #bytes that were sent */ - + OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output, "%s unpacked %d bytes from remote proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes, ORTE_NAME_PRINT(&origin))); - + /* if numbytes is zero, it means that the channel was closed on the far end - for * now, we just ignore this condition */ @@ -104,7 +104,7 @@ void orte_iof_tool_recv(int status, orte_process_name_t* sender, orte_iof_base_write_output(&origin, stream, data, numbytes, orte_iof_base.iof_write_stderr->wev); } } - + CLEAN_RETURN: return; } diff --git a/orte/mca/mca.h b/orte/mca/mca.h index dddc9f90e8c..a6615491a5d 100644 --- a/orte/mca/mca.h +++ b/orte/mca/mca.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,13 +14,13 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ -/** - * @file +/** + * @file * * Top-level interface for \em all orte MCA components. */ diff --git a/orte/mca/notifier/Makefile.am b/orte/mca/notifier/Makefile.am index 303a6bfd91f..52444ea1251 100644 --- a/orte/mca/notifier/Makefile.am +++ b/orte/mca/notifier/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -23,7 +23,7 @@ noinst_LTLIBRARIES = libmca_notifier.la libmca_notifier_la_SOURCES = # local files -headers = notifier.h +headers = notifier.h libmca_notifier_la_SOURCES += $(headers) diff --git a/orte/mca/notifier/base/Makefile.am b/orte/mca/notifier/base/Makefile.am index 877953d0829..89171605f59 100644 --- a/orte/mca/notifier/base/Makefile.am +++ b/orte/mca/notifier/base/Makefile.am @@ -19,7 +19,7 @@ # headers += \ - base/base.h + base/base.h libmca_notifier_la_SOURCES += \ base/notifier_base_frame.c \ diff --git a/orte/mca/notifier/base/notifier_base_fns.c b/orte/mca/notifier/base/notifier_base_fns.c index 58bb087ec06..61e139807ff 100644 --- a/orte/mca/notifier/base/notifier_base_fns.c +++ b/orte/mca/notifier/base/notifier_base_fns.c @@ -28,7 +28,7 @@ #include "orte/mca/notifier/base/base.h" -static void orte_notifier_base_identify_modules(char ***modules, +static void orte_notifier_base_identify_modules(char ***modules, orte_notifier_request_t *req); void orte_notifier_base_log(int sd, short args, void *cbdata) @@ -37,7 +37,7 @@ void orte_notifier_base_log(int sd, short args, void *cbdata) char **modules = NULL; orte_notifier_active_module_t *imod; int i; - + /* if no modules are active, then there is nothing to do */ if (0 == opal_list_get_size(&orte_notifier_base.modules)) { return; @@ -73,7 +73,7 @@ void orte_notifier_base_event(int sd, short args, void *cbdata) char **modules = NULL; orte_notifier_active_module_t *imod; int i; - + /* if no modules are active, then there is nothing to do */ if (0 == opal_list_get_size(&orte_notifier_base.modules)) { return; @@ -109,7 +109,7 @@ void orte_notifier_base_report(int sd, short args, void *cbdata) char **modules = NULL; orte_notifier_active_module_t *imod; int i; - + /* if no modules are active, then there is nothing to do */ if (0 == opal_list_get_size(&orte_notifier_base.modules)) { return; @@ -155,34 +155,34 @@ const char* orte_notifier_base_sev2str(orte_notifier_severity_t severity) } } -static void orte_notifier_base_identify_modules(char ***modules, +static void orte_notifier_base_identify_modules(char ***modules, orte_notifier_request_t *req) { if (NULL != req->action) { *modules = opal_argv_split(req->action, ','); } else { - if (ORTE_NOTIFIER_EMERG == req->severity && + if (ORTE_NOTIFIER_EMERG == req->severity && (NULL != orte_notifier_base.emerg_actions)) { *modules = opal_argv_split(orte_notifier_base.emerg_actions, ','); - } else if (ORTE_NOTIFIER_ALERT == req->severity && + } else if (ORTE_NOTIFIER_ALERT == req->severity && (NULL != orte_notifier_base.alert_actions)) { *modules = opal_argv_split(orte_notifier_base.alert_actions, ','); - } else if (ORTE_NOTIFIER_CRIT == req->severity && + } else if (ORTE_NOTIFIER_CRIT == req->severity && (NULL != orte_notifier_base.crit_actions)) { *modules = opal_argv_split(orte_notifier_base.crit_actions, ','); - } else if (ORTE_NOTIFIER_WARN == req->severity && + } else if (ORTE_NOTIFIER_WARN == req->severity && (NULL != orte_notifier_base.warn_actions)) { *modules = opal_argv_split(orte_notifier_base.warn_actions, ','); - } else if (ORTE_NOTIFIER_NOTICE == req->severity && + } else if (ORTE_NOTIFIER_NOTICE == req->severity && (NULL != orte_notifier_base.notice_actions)) { *modules = opal_argv_split(orte_notifier_base.notice_actions, ','); - } else if (ORTE_NOTIFIER_INFO == req->severity && + } else if (ORTE_NOTIFIER_INFO == req->severity && (NULL != orte_notifier_base.info_actions)) { *modules = opal_argv_split(orte_notifier_base.info_actions, ','); - } else if (ORTE_NOTIFIER_DEBUG == req->severity && + } else if (ORTE_NOTIFIER_DEBUG == req->severity && (NULL != orte_notifier_base.debug_actions)) { - *modules = opal_argv_split(orte_notifier_base.debug_actions, ','); - } else if (ORTE_NOTIFIER_ERROR == req->severity && + *modules = opal_argv_split(orte_notifier_base.debug_actions, ','); + } else if (ORTE_NOTIFIER_ERROR == req->severity && (NULL != orte_notifier_base.error_actions)) { *modules = opal_argv_split(orte_notifier_base.error_actions, ','); } else if (NULL != orte_notifier_base.default_actions) { diff --git a/orte/mca/notifier/base/notifier_base_frame.c b/orte/mca/notifier/base/notifier_base_frame.c index ff666978025..43393fee13c 100644 --- a/orte/mca/notifier/base/notifier_base_frame.c +++ b/orte/mca/notifier/base/notifier_base_frame.c @@ -112,7 +112,7 @@ static int orte_notifier_base_register(mca_base_register_flag_t flags) &orte_notifier_base.default_actions); if (NULL == orte_notifier_base.default_actions) { - orte_notifier_base.default_actions = strdup(ORTE_NOTIFIER_DEFAULT_MODULE); + orte_notifier_base.default_actions = strdup(ORTE_NOTIFIER_DEFAULT_MODULE); } /* let the user define a action for emergency events */ orte_notifier_base.emerg_actions = NULL; @@ -187,7 +187,7 @@ static int orte_notifier_base_register(mca_base_register_flag_t flags) &orte_notifier_base.error_actions); return ORTE_SUCCESS; -} +} static int orte_notifier_base_close(void) { @@ -204,7 +204,7 @@ static int orte_notifier_base_close(void) } } OPAL_LIST_DESTRUCT(&orte_notifier_base.modules); - + /* close all remaining available components */ return mca_base_framework_components_close(&orte_notifier_base_framework, NULL); } @@ -216,14 +216,14 @@ static int orte_notifier_base_close(void) static int orte_notifier_base_open(mca_base_open_flag_t flags) { int rc; - + /* construct the array of modules */ OBJ_CONSTRUCT(&orte_notifier_base.modules, opal_list_t); /* if requested, create our own event base */ if (use_progress_thread) { orte_notifier_base.ev_base_active = true; - if (NULL == (orte_notifier_base.ev_base = + if (NULL == (orte_notifier_base.ev_base = opal_start_progress_thread("notifier", true))) { orte_notifier_base.ev_base_active = false; return ORTE_ERROR; diff --git a/orte/mca/notifier/base/notifier_base_select.c b/orte/mca/notifier/base/notifier_base_select.c index 021b41da692..cdd9142ff2e 100644 --- a/orte/mca/notifier/base/notifier_base_select.c +++ b/orte/mca/notifier/base/notifier_base_select.c @@ -5,16 +5,16 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -38,12 +38,12 @@ */ static bool orte_notifier_base_selected = false; -/** +/** * Function for weeding out notifier components that don't want to run. * - * Call the init function on all available compoenent to find out if - * they want to run. Select all components that don't fail. Failing - * Components will be closed and unloaded. The selected modules will + * Call the init function on all available compoenent to find out if + * they want to run. Select all components that don't fail. Failing + * Components will be closed and unloaded. The selected modules will * be returned to the called in a opal_list_t. */ @@ -100,7 +100,7 @@ int orte_notifier_base_select(void) continue; } bmod = (orte_notifier_base_module_t*)module; - + /* see if it can be init'd */ if (NULL != bmod->init) { opal_output_verbose(5, orte_notifier_base_framework.framework_output, @@ -114,7 +114,7 @@ int orte_notifier_base_select(void) * Append them to the list */ opal_output_verbose(5, orte_notifier_base_framework.framework_output, - "notifier:base:select adding component [%s]", + "notifier:base:select adding component [%s]", component->base_version.mca_component_name); tmp_module = OBJ_NEW(orte_notifier_active_module_t); tmp_module->component = component; diff --git a/orte/mca/notifier/notifier.h b/orte/mca/notifier/notifier.h index 7ca5b51d129..cc40297c574 100644 --- a/orte/mca/notifier/notifier.h +++ b/orte/mca/notifier/notifier.h @@ -96,7 +96,7 @@ OBJ_CLASS_DECLARATION(orte_notifier_request_t); /* initialize the selected module */ typedef int (*orte_notifier_base_module_init_fn_t)(void); - + /* finalize the selected module */ typedef void (*orte_notifier_base_module_finalize_fn_t)(void); diff --git a/orte/mca/notifier/smtp/Makefile.am b/orte/mca/notifier/smtp/Makefile.am index 336fd4603cc..a25ff64b55e 100644 --- a/orte/mca/notifier/smtp/Makefile.am +++ b/orte/mca/notifier/smtp/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/notifier/smtp/configure.m4 b/orte/mca/notifier/smtp/configure.m4 index 0ee0f956fb3..a4a4771050a 100644 --- a/orte/mca/notifier/smtp/configure.m4 +++ b/orte/mca/notifier/smtp/configure.m4 @@ -6,16 +6,16 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/notifier/smtp/help-orte-notifier-smtp.txt b/orte/mca/notifier/smtp/help-orte-notifier-smtp.txt index b03438387cc..58b06bc81bb 100644 --- a/orte/mca/notifier/smtp/help-orte-notifier-smtp.txt +++ b/orte/mca/notifier/smtp/help-orte-notifier-smtp.txt @@ -2,9 +2,9 @@ # # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English help file for Open MPI's SMTP notifier support diff --git a/orte/mca/notifier/smtp/notifier_smtp.h b/orte/mca/notifier/smtp/notifier_smtp.h index 0d381450dc8..56732541864 100644 --- a/orte/mca/notifier/smtp/notifier_smtp.h +++ b/orte/mca/notifier/smtp/notifier_smtp.h @@ -1,21 +1,21 @@ /* -*- 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ @@ -59,7 +59,7 @@ typedef struct { /* * Notifier interfaces */ -ORTE_MODULE_DECLSPEC extern orte_notifier_smtp_component_t +ORTE_MODULE_DECLSPEC extern orte_notifier_smtp_component_t mca_notifier_smtp_component; extern orte_notifier_base_module_t orte_notifier_smtp_module; diff --git a/orte/mca/notifier/smtp/notifier_smtp_component.c b/orte/mca/notifier/smtp/notifier_smtp_component.c index 6a021847d1c..ee37eda593a 100644 --- a/orte/mca/notifier/smtp/notifier_smtp_component.c +++ b/orte/mca/notifier/smtp/notifier_smtp_component.c @@ -155,7 +155,7 @@ static int smtp_close(void) return ORTE_SUCCESS; } -static int smtp_component_query(mca_base_module_t **module, +static int smtp_component_query(mca_base_module_t **module, int *priority) { *priority = 0; @@ -166,7 +166,7 @@ static int smtp_component_query(mca_base_module_t **module, '\0' == mca_notifier_smtp_component.to[0] || NULL == mca_notifier_smtp_component.from_addr || '\0' == mca_notifier_smtp_component.from_addr[0]) { - orte_show_help("help-orte-notifier-smtp.txt", + orte_show_help("help-orte-notifier-smtp.txt", "to/from not specified", true); return ORTE_ERR_NOT_FOUND; } @@ -174,7 +174,7 @@ static int smtp_component_query(mca_base_module_t **module, /* Sanity checks */ if (NULL == mca_notifier_smtp_component.server || '\0' == mca_notifier_smtp_component.server[0]) { - orte_show_help("help-orte-notifier-smtp.txt", + orte_show_help("help-orte-notifier-smtp.txt", "server not specified", true); return ORTE_ERR_NOT_FOUND; } @@ -185,7 +185,7 @@ static int smtp_component_query(mca_base_module_t **module, mca_notifier_smtp_component.server_hostent = gethostbyname(mca_notifier_smtp_component.server); if (NULL == mca_notifier_smtp_component.server_hostent) { - orte_show_help("help-orte-notifier-smtp.txt", + orte_show_help("help-orte-notifier-smtp.txt", "unable to resolve server", true, mca_notifier_smtp_component.server); return ORTE_ERR_NOT_FOUND; @@ -193,5 +193,5 @@ static int smtp_component_query(mca_base_module_t **module, *priority = 10; *module = (mca_base_module_t *)&orte_notifier_smtp_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } diff --git a/orte/mca/notifier/smtp/notifier_smtp_module.c b/orte/mca/notifier/smtp/notifier_smtp_module.c index 51035c4a747..53a035fe881 100644 --- a/orte/mca/notifier/smtp/notifier_smtp_module.c +++ b/orte/mca/notifier/smtp/notifier_smtp_module.c @@ -48,12 +48,12 @@ /* Static API's */ -static void mylog(orte_notifier_base_severity_t severity, int errcode, +static void mylog(orte_notifier_base_severity_t severity, int errcode, const char *msg, va_list ap); -static void myhelplog(orte_notifier_base_severity_t severity, int errcode, - const char *filename, +static void myhelplog(orte_notifier_base_severity_t severity, int errcode, + const char *filename, const char *topic, va_list ap); -static void mypeerlog(orte_notifier_base_severity_t severity, int errcode, +static void mypeerlog(orte_notifier_base_severity_t severity, int errcode, orte_process_name_t *peer_proc, const char *msg, va_list ap); @@ -201,7 +201,7 @@ static int send_email(char *msg) sig.sa_handler = SIG_IGN; sigemptyset(&sig.sa_mask); sig.sa_flags = 0; - sigaction(SIGPIPE, &sig, &oldsig); + sigaction(SIGPIPE, &sig, &oldsig); set_oldsig = true; /* Try to get a libesmtp session. If so, assume that libesmtp is @@ -246,8 +246,8 @@ static int send_email(char *msg) if (0 == smtp_set_header(message, "Subject", c->subject) || 0 == smtp_set_header_option(message, "Subject", Hdr_OVERRIDE, 1) || 0 == smtp_set_header(message, "To", NULL, NULL) || - 0 == smtp_set_header(message, "From", - (NULL != c->from_name ? + 0 == smtp_set_header(message, "From", + (NULL != c->from_name ? c->from_name : c->from_addr), c->from_addr) || 0 == smtp_set_header(message, "X-Mailer", str) || @@ -301,15 +301,15 @@ static int send_email(char *msg) e = smtp_errno(); smtp_strerror(e, em, sizeof(em)); - orte_show_help("help-orte-notifier-smtp.txt", + orte_show_help("help-orte-notifier-smtp.txt", "send_email failed", - true, "libesmtp library call failed", + true, "libesmtp library call failed", errmsg, em, e, msg); } return err; } -static void mylog(orte_notifier_base_severity_t severity, int errcode, +static void mylog(orte_notifier_base_severity_t severity, int errcode, const char *msg, va_list ap) { char *output; diff --git a/orte/mca/notifier/syslog/Makefile.am b/orte/mca/notifier/syslog/Makefile.am index f495ed5fc92..da3d62be059 100644 --- a/orte/mca/notifier/syslog/Makefile.am +++ b/orte/mca/notifier/syslog/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/notifier/syslog/notifier_syslog.h b/orte/mca/notifier/syslog/notifier_syslog.h index a83da1d0354..a78bb915b78 100644 --- a/orte/mca/notifier/syslog/notifier_syslog.h +++ b/orte/mca/notifier/syslog/notifier_syslog.h @@ -1,21 +1,21 @@ /* -*- 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * */ diff --git a/orte/mca/notifier/syslog/notifier_syslog_component.c b/orte/mca/notifier/syslog/notifier_syslog_component.c index 5b52c3493ca..99085338166 100644 --- a/orte/mca/notifier/syslog/notifier_syslog_component.c +++ b/orte/mca/notifier/syslog/notifier_syslog_component.c @@ -30,7 +30,7 @@ #include "notifier_syslog.h" -static int orte_notifier_syslog_component_query(mca_base_module_t **module, +static int orte_notifier_syslog_component_query(mca_base_module_t **module, int *priority); /* @@ -51,10 +51,10 @@ orte_notifier_base_component_t mca_notifier_syslog_component = { }, }; -static int orte_notifier_syslog_component_query(mca_base_module_t **module, +static int orte_notifier_syslog_component_query(mca_base_module_t **module, int *priority) { *priority = 1; *module = (mca_base_module_t *)&orte_notifier_syslog_module; - return ORTE_SUCCESS; + return ORTE_SUCCESS; } diff --git a/orte/mca/notifier/syslog/notifier_syslog_module.c b/orte/mca/notifier/syslog/notifier_syslog_module.c index 7a0bbad682e..a8121685a33 100644 --- a/orte/mca/notifier/syslog/notifier_syslog_module.c +++ b/orte/mca/notifier/syslog/notifier_syslog_module.c @@ -56,17 +56,17 @@ orte_notifier_base_module_t orte_notifier_syslog_module = { }; -static int init(void) +static int init(void) { int opts; - + opts = LOG_CONS | LOG_PID; openlog("OpenRTE Error Report:", opts, LOG_USER); - + return ORTE_SUCCESS; } -static void finalize(void) +static void finalize(void) { closelog(); } diff --git a/orte/mca/odls/Makefile.am b/orte/mca/odls/Makefile.am index 2a6376b44a6..df37a515ba4 100644 --- a/orte/mca/odls/Makefile.am +++ b/orte/mca/odls/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/odls/alps/Makefile.am b/orte/mca/odls/alps/Makefile.am index 145f5a384ea..6087e915168 100644 --- a/orte/mca/odls/alps/Makefile.am +++ b/orte/mca/odls/alps/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # Copyright (c) 2014 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -25,7 +25,7 @@ sources = \ odls_alps.h \ odls_alps_component.c \ odls_alps_module.c \ - odls_alps_utils.c + odls_alps_utils.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la @@ -42,7 +42,7 @@ endif mcacomponentdir = $(ortelibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_odls_alps_la_SOURCES = $(sources) -mca_odls_alps_la_CPPFLAGS = $(odls_alps_CPPFLAGS) +mca_odls_alps_la_CPPFLAGS = $(odls_alps_CPPFLAGS) mca_odls_alps_la_LDFLAGS = -module -avoid-version $(odls_alps_LDFLAGS) mca_odls_alps_la_LIBADD = $(odls_alps_LIBS) \ $(ORTE_TOP_BUILDDIR)/orte/mca/common/alps/lib@ORTE_LIB_PREFIX@mca_common_alps.la diff --git a/orte/mca/odls/alps/configure.m4 b/orte/mca/odls/alps/configure.m4 index b8b7bad20f0..7febd842e3b 100644 --- a/orte/mca/odls/alps/configure.m4 +++ b/orte/mca/odls/alps/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,11 +27,11 @@ AC_DEFUN([MCA_orte_odls_alps_CONFIG],[ ORTE_CHECK_ALPS([odls_alps], [odls_alps_happy="yes"], [odls_alps_happy="no"]) - AS_IF([test "$odls_alps_happy" = "yes"], + AS_IF([test "$odls_alps_happy" = "yes"], [$1 AC_SUBST([odls_alps_CPPFLAGS]) AC_SUBST([odls_alps_LDFLAGS]) - AC_SUBST([odls_alps_LIBS])], + AC_SUBST([odls_alps_LIBS])], [$2]) ])dnl diff --git a/orte/mca/odls/alps/help-orte-odls-alps.txt b/orte/mca/odls/alps/help-orte-odls-alps.txt index ae82e0f4464..038b15d6dac 100644 --- a/orte/mca/odls/alps/help-orte-odls-alps.txt +++ b/orte/mca/odls/alps/help-orte-odls-alps.txt @@ -6,16 +6,16 @@ # 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, +# 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 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is a US/English help file. diff --git a/orte/mca/odls/alps/odls_alps_component.c b/orte/mca/odls/alps/odls_alps_component.c index ee187c9704a..d9988e05d0b 100644 --- a/orte/mca/odls/alps/odls_alps_component.c +++ b/orte/mca/odls/alps/odls_alps_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2014-2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker diff --git a/orte/mca/odls/alps/odls_alps_module.c b/orte/mca/odls/alps/odls_alps_module.c index e3f12f2669b..a5f3ce11610 100644 --- a/orte/mca/odls/alps/odls_alps_module.c +++ b/orte/mca/odls/alps/odls_alps_module.c @@ -14,7 +14,7 @@ * Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 IBM Corporation. All rights reserved. * Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * * $COPYRIGHT$ @@ -49,7 +49,7 @@ * - the child tries to set affinity and do other housekeeping in * preparation of exec'ing the target executable * - if the child fails anywhere along the way, it sends a message up - * the pipe to the parent indicating what happened -- including a + * the pipe to the parent indicating what happened -- including a * rendered error message detailing the problem (i.e., human-readable). * - it is important that the child renders the error message: there * are so many errors that are possible that the child is really the @@ -137,7 +137,7 @@ static int orte_odls_alps_restart_proc(orte_proc_t *child); * Explicitly declared functions so that we can get the noreturn * attribute registered with the compiler. */ -static void send_error_show_help(int fd, int exit_status, +static void send_error_show_help(int fd, int exit_status, const char *file, const char *topic, ...) __opal_attribute_noreturn__; static int do_child(orte_app_context_t* context, @@ -165,7 +165,7 @@ static bool odls_alps_child_died(orte_proc_t *child) { time_t end; pid_t ret; - + /* Because of rounding in time (which returns whole seconds) we * have to add 1 to our wait number: this means that we wait * somewhere between (target) and (target)+1 seconds. Otherwise, @@ -210,7 +210,7 @@ static bool odls_alps_child_died(orte_proc_t *child) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (int)(child->pid))); return true; } - + /* Bogus delay for 1 msec - let's actually give the CPU some time * to quit the other process (sched_yield() -- even if we have it * -- changed behavior in 2.6.3x Linux flavors to be undesirable) @@ -259,7 +259,7 @@ static int odls_alps_kill_local(pid_t pid, int signum) int orte_odls_alps_kill_local_procs(opal_pointer_array_t *procs) { int rc; - + if (ORTE_SUCCESS != (rc = orte_odls_base_default_kill_local_procs(procs, odls_alps_kill_local, odls_alps_child_died))) { ORTE_ERROR_LOG(rc); @@ -368,14 +368,14 @@ static int do_child(orte_app_context_t* context, orted. */ setpgid(0, 0); } - + /* Setup the pipe to be close-on-exec */ opal_fd_set_cloexec(write_fd); if (NULL != child) { /* setup stdout/stderr so that any error messages that we may print out will get displayed back at orterun. - + NOTE: Definitely do this AFTER we check contexts so that any error message from those two functions doesn't come out to the user. IF we didn't do it in this order, @@ -386,11 +386,11 @@ static int do_child(orte_app_context_t* context, always outputs a nice, single message indicating what happened */ - if (ORTE_SUCCESS != (i = orte_iof_base_setup_child(&opts, + if (ORTE_SUCCESS != (i = orte_iof_base_setup_child(&opts, &environ_copy))) { ORTE_ERROR_LOG(i); - send_error_show_help(write_fd, 1, - "help-orte-odls-alps.txt", + send_error_show_help(write_fd, 1, + "help-orte-odls-alps.txt", "iof setup failed", orte_process_info.nodename, context->app); /* Does not return */ @@ -420,7 +420,7 @@ static int do_child(orte_app_context_t* context, if (OPAL_SUCCESS != (rc = opal_util_init_sys_limits(&msg))) { send_error_show_help(write_fd, 1, "help-orte-odls-alps.txt", "set limit", - orte_process_info.nodename, context->app, + orte_process_info.nodename, context->app, __FILE__, __LINE__, msg); } /* ensure we only do this once */ @@ -454,35 +454,35 @@ static int do_child(orte_app_context_t* context, } } - + if (context->argv == NULL) { context->argv = malloc(sizeof(char*)*2); context->argv[0] = strdup(context->app); context->argv[1] = NULL; } - + /* Set signal handlers back to the default. Do this close to the exev() because the event library may (and likely will) reset them. If we don't do this, the event library may have left some set that, at least on some OS's, don't get reset via fork() or exec(). Hence, the launched process could be unkillable (for example). */ - + set_handler_alps(SIGTERM); set_handler_alps(SIGINT); set_handler_alps(SIGHUP); set_handler_alps(SIGPIPE); set_handler_alps(SIGCHLD); - + /* Unblock all signals, for many of the same reasons that we set the default handlers, above. This is noticable on Linux where the event library blocks SIGTERM, but we don't want that blocked by the launched process. */ sigprocmask(0, 0, &sigs); sigprocmask(SIG_UNBLOCK, &sigs, 0); - + /* Exec the new executable */ - + if (10 < opal_output_get_verbosity(orte_odls_base_framework.framework_output)) { int jout; opal_output(0, "%s STARTING %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), context->app); @@ -493,9 +493,9 @@ static int do_child(orte_app_context_t* context, opal_output(0, "%s\tENVIRON[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, environ_copy[jout]); } } - + execve(context->app, context->argv, environ_copy); - send_error_show_help(write_fd, 1, + send_error_show_help(write_fd, 1, "help-orte-odls-alps.txt", "execve error", orte_process_info.nodename, context->app, strerror(errno)); /* Does not return */ @@ -534,12 +534,12 @@ static int do_parent(orte_app_context_t* context, if (OPAL_ERR_TIMEOUT == rc) { break; } - + /* If Something Bad happened in the read, error out */ if (OPAL_SUCCESS != rc) { ORTE_ERROR_LOG(rc); close(read_fd); - + if (NULL != child) { child->state = ORTE_PROC_STATE_UNDEF; } @@ -559,7 +559,7 @@ static int do_parent(orte_app_context_t* context, if (msg.file_str_len > 0) { rc = opal_fd_read(read_fd, msg.file_str_len, file); if (OPAL_SUCCESS != rc) { - orte_show_help("help-orte-odls-alps.txt", "syscall fail", + orte_show_help("help-orte-odls-alps.txt", "syscall fail", true, orte_process_info.nodename, context->app, "opal_fd_read", __FILE__, __LINE__); @@ -573,7 +573,7 @@ static int do_parent(orte_app_context_t* context, if (msg.topic_str_len > 0) { rc = opal_fd_read(read_fd, msg.topic_str_len, topic); if (OPAL_SUCCESS != rc) { - orte_show_help("help-orte-odls-alps.txt", "syscall fail", + orte_show_help("help-orte-odls-alps.txt", "syscall fail", true, orte_process_info.nodename, context->app, "opal_fd_read", __FILE__, __LINE__); @@ -587,7 +587,7 @@ static int do_parent(orte_app_context_t* context, if (msg.msg_str_len > 0) { str = calloc(1, msg.msg_str_len + 1); if (NULL == str) { - orte_show_help("help-orte-odls-alps.txt", "syscall fail", + orte_show_help("help-orte-odls-alps.txt", "syscall fail", true, orte_process_info.nodename, context->app, "opal_fd_read", __FILE__, __LINE__); @@ -630,7 +630,7 @@ static int do_parent(orte_app_context_t* context, ORTE_FLAG_SET(child, ORTE_PROC_FLAG_ALIVE); } close(read_fd); - + return ORTE_SUCCESS; } @@ -646,12 +646,12 @@ static int odls_alps_fork_local_proc(orte_app_context_t* context, orte_iof_base_io_conf_t opts; int rc, p[2]; pid_t pid; - + if (NULL != child) { /* should pull this information from MPIRUN instead of going with default */ opts.usepty = OPAL_ENABLE_PTY_SUPPORT; - + /* do we want to setup stdin? */ if (NULL != child && (jobdat->stdin_target == ORTE_VPID_WILDCARD || @@ -660,7 +660,7 @@ static int odls_alps_fork_local_proc(orte_app_context_t* context, } else { opts.connect_stdin = false; } - + if (ORTE_SUCCESS != (rc = orte_iof_base_setup_prefork(&opts))) { ORTE_ERROR_LOG(rc); if (NULL != child) { @@ -687,13 +687,13 @@ static int odls_alps_fork_local_proc(orte_app_context_t* context, } return ORTE_ERR_SYS_LIMITS_PIPES; } - + /* Fork off the child */ pid = fork(); if (NULL != child) { child->pid = pid; } - + if (pid < 0) { ORTE_ERROR_LOG(ORTE_ERR_SYS_LIMITS_CHILDREN); if (NULL != child) { @@ -702,7 +702,7 @@ static int odls_alps_fork_local_proc(orte_app_context_t* context, } return ORTE_ERR_SYS_LIMITS_CHILDREN; } - + if (pid == 0) { close(p[0]); #if HAVE_SETPGID @@ -710,7 +710,7 @@ static int odls_alps_fork_local_proc(orte_app_context_t* context, #endif do_child(context, child, environ_copy, jobdat, p[1], opts); /* Does not return */ - } + } close(p[1]); return do_parent(context, child, environ_copy, jobdat, p[0], opts); @@ -733,7 +733,7 @@ int orte_odls_alps_launch_local_procs(opal_buffer_t *data) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_ERROR_NAME(rc))); return rc; } - + /* get the RDMA credentials and push them into the launch environment */ if (ORTE_SUCCESS != (rc = orte_odls_alps_get_rdma_creds())) {; @@ -745,19 +745,19 @@ int orte_odls_alps_launch_local_procs(opal_buffer_t *data) /* launch the local procs */ ORTE_ACTIVATE_LOCAL_LAUNCH(job, odls_alps_fork_local_proc); - + return ORTE_SUCCESS; } /** * Send a signal to a pid. Note that if we get an error, we set the - * return value and let the upper layer print out the message. + * return value and let the upper layer print out the message. */ static int send_signal(pid_t pid, int signal) { int rc = ORTE_SUCCESS; - + OPAL_OUTPUT_VERBOSE((1, orte_odls_base_framework.framework_output, "%s sending signal %d to pid %ld", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -776,8 +776,8 @@ static int send_signal(pid_t pid, int signal) case ESRCH: /* This case can occur when we deliver a signal to a process that is no longer there. This can happen if - we deliver a signal while the job is shutting down. - This does not indicate a real problem, so just + we deliver a signal while the job is shutting down. + This does not indicate a real problem, so just ignore the error. */ break; case EPERM: @@ -787,14 +787,14 @@ static int send_signal(pid_t pid, int signal) rc = ORTE_ERROR; } } - + return rc; } static int orte_odls_alps_signal_local_procs(const orte_process_name_t *proc, int32_t signal) { int rc; - + if (ORTE_SUCCESS != (rc = orte_odls_base_default_signal_local_procs(proc, signal, send_signal))) { ORTE_ERROR_LOG(rc); return rc; @@ -805,7 +805,7 @@ static int orte_odls_alps_signal_local_procs(const orte_process_name_t *proc, in static int orte_odls_alps_restart_proc(orte_proc_t *child) { int rc; - + /* restart the local proc */ if (ORTE_SUCCESS != (rc = orte_odls_base_default_restart_proc(child, odls_alps_fork_local_proc))) { OPAL_OUTPUT_VERBOSE((2, orte_odls_base_framework.framework_output, diff --git a/orte/mca/odls/alps/odls_alps_utils.c b/orte/mca/odls/alps/odls_alps_utils.c index 3571399d03a..2cdb2373ae6 100644 --- a/orte/mca/odls/alps/odls_alps_utils.c +++ b/orte/mca/odls/alps/odls_alps_utils.c @@ -5,16 +5,16 @@ * 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, + * 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) 2014 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -109,7 +109,7 @@ int orte_odls_alps_get_rdma_creds(void) /* * now get the GNI rdma credentials info - */ + */ ret = alps_app_lli_put_request(ALPS_APP_LLI_ALPS_REQ_GNI, NULL, 0); if (ALPS_APP_LLI_ALPS_STAT_OK != ret) { @@ -152,7 +152,7 @@ int orte_odls_alps_get_rdma_creds(void) rdmacred_buf = (alpsAppGni_t *)(rdmacred_rsp->u.buf); /* - * now set up the env. variables - + * now set up the env. variables - * The cray pmi sets up 4 environment variables: * PMI_GNI_DEV_ID - format (id0:id1....idX) * PMI_GNI_LOC_ADDR - format (locaddr0:locaddr1:....locaddrX) @@ -242,7 +242,7 @@ int orte_odls_alps_get_rdma_creds(void) goto fn_exit; } - } + } fn_exit: if (ORTE_SUCCESS == ret) already_got_creds = 1; diff --git a/orte/mca/odls/base/Makefile.am b/orte/mca/odls/base/Makefile.am index 726b417e65d..8a692fb93bc 100644 --- a/orte/mca/odls/base/Makefile.am +++ b/orte/mca/odls/base/Makefile.am @@ -5,16 +5,16 @@ # 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, +# 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) 2012-2013 Los Alamos National Security, LLC. # All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/odls/base/base.h b/orte/mca/odls/base/base.h index 6e83bf7e9c9..83e382b2c55 100644 --- a/orte/mca/odls/base/base.h +++ b/orte/mca/odls/base/base.h @@ -5,16 +5,16 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/odls/base/help-orte-odls-base.txt b/orte/mca/odls/base/help-orte-odls-base.txt index e0b55157251..cde63e5cfd6 100644 --- a/orte/mca/odls/base/help-orte-odls-base.txt +++ b/orte/mca/odls/base/help-orte-odls-base.txt @@ -7,9 +7,9 @@ # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is the US/English general help file for Open RTE's ODLS Framework diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 4472912ad3b..b2b89b797e1 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -5,11 +5,11 @@ * 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, + * 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-2011 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007-2011 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. @@ -18,9 +18,9 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -112,20 +112,20 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *data, ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM); return ORTE_ERR_BAD_PARAM; } - + /* get a pointer to the job map */ map = jdata->map; /* if there is no map, just return */ if (NULL == map) { return ORTE_SUCCESS; } - + /* construct a nodemap - only want updated items */ if (ORTE_SUCCESS != (rc = orte_util_encode_nodemap(&bo, true))) { ORTE_ERROR_LOG(rc); return rc; } - + /* store it */ boptr = &bo; if (ORTE_SUCCESS != (rc = opal_dss.pack(data, &boptr, 1, OPAL_BYTE_OBJECT))) { @@ -134,7 +134,7 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *data, } /* release the data since it has now been copied into our buffer */ free(bo.bytes); - + /* if we are not using static ports, we need to send the wireup info */ if (!orte_static_ports) { /* pack a flag indicating wiring info is provided */ @@ -224,7 +224,7 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *data, ORTE_ERROR_LOG(rc); return rc; } - + return ORTE_SUCCESS; } @@ -311,7 +311,7 @@ int orte_odls_base_default_construct_child_list(opal_buffer_t *data, /* release the buffer */ OBJ_RELEASE(bptr); } - + /* unpack the job we are to launch */ cnt=1; if (ORTE_SUCCESS != (rc = opal_dss.unpack(data, &jdata, &cnt, ORTE_JOB))) { @@ -329,7 +329,7 @@ int orte_odls_base_default_construct_child_list(opal_buffer_t *data, OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:construct_child_list unpacking data to launch job %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_JOBID_PRINT(*job))); - + /* if we are the HNP, we don't need to unpack this buffer - we already * have all the required info in our local job array. So just build the * array of local children @@ -392,7 +392,7 @@ int orte_odls_base_default_construct_child_list(opal_buffer_t *data, goto REPORT_ERROR; } opal_pointer_array_set_item(orte_job_data, ORTE_LOCAL_JOBID(jdata->jobid), jdata); - + /* ensure the map object is present */ if (NULL == jdata->map) { jdata->map = OBJ_NEW(orte_job_map_t); @@ -494,7 +494,7 @@ int orte_odls_base_default_construct_child_list(opal_buffer_t *data, * deal with the hang! */ ORTE_ACTIVATE_JOB_STATE(NULL, ORTE_JOB_STATE_NEVER_LAUNCHED); - + return rc; } @@ -515,7 +515,7 @@ static int setup_path(orte_app_context_t *app) /* do not ERROR_LOG - it will be reported elsewhere */ goto CLEANUP; } - + /* The prior function will have done a chdir() to jump us to * wherever the app is to be executed. This could be either where * the user specified (via -wdir), or to the user's home directory @@ -536,7 +536,7 @@ static int setup_path(orte_app_context_t *app) } /* Search for the OMPI_exec_path and PATH settings in the environment. */ - for (argvptr = app->env; *argvptr != NULL; argvptr++) { + for (argvptr = app->env; *argvptr != NULL; argvptr++) { if (0 == strncmp("OMPI_exec_path=", *argvptr, 15)) { mpiexec_pathenv = *argvptr + 15; } @@ -544,7 +544,7 @@ static int setup_path(orte_app_context_t *app) pathenv = *argvptr + 5; } } - + /* If OMPI_exec_path is set (meaning --path was used), then create a temporary environment to be used in the search for the executable. The PATH setting in this temporary environment is a combination of @@ -562,7 +562,7 @@ static int setup_path(orte_app_context_t *app) } else { argvptr = app->env; } - + rc = orte_util_check_context_app(app, argvptr); /* do not ERROR_LOG - it will be reported elsewhere */ if (NULL != mpiexec_pathenv) { @@ -648,7 +648,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) ORTE_ACTIVATE_JOB_STATE(NULL, ORTE_JOB_STATE_FAILED_TO_LAUNCH); goto ERROR_OUT; } - + /* do we have any local procs to launch? */ if (0 == jobdat->num_local_procs) { /* indicate that we are done trying to launch them */ @@ -657,7 +657,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); goto GETOUT; } - + #if OPAL_ENABLE_FT_CR == 1 /* * Notify the local SnapC component regarding new job @@ -667,7 +667,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) ORTE_ERROR_LOG(rc); } #endif - + #if OPAL_ENABLE_FT_CR == 1 for (j=0; j < jobdat->apps->size; j++) { if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jobdat->apps, j))) { @@ -688,7 +688,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jobdat->apps, j))) { continue; } - + /* if this app isn't being used on our node, skip it */ if (!ORTE_FLAG_TEST(app, ORTE_APP_FLAG_USED_ON_NODE)) { opal_output_verbose(5, orte_odls_base_framework.framework_output, @@ -696,7 +696,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), j); continue; } - + /* check the system limits - if we are at our max allowed children, then * we won't be allowed to do this anyway, so we may as well abort now. * According to the documentation, num_procs = 0 is equivalent to @@ -721,15 +721,15 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) return; } } - + /* setup the environment for this app */ if (ORTE_SUCCESS != (rc = orte_schizo.setup_fork(jobdat, app))) { - + OPAL_OUTPUT_VERBOSE((10, orte_odls_base_framework.framework_output, "%s odls:launch:setup_fork failed with error %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_ERROR_NAME(rc))); - + /* do not ERROR_LOG this failure - it will be reported * elsewhere. The launch is going to fail. Since we could have * multiple app_contexts, we need to ensure that we flag only @@ -750,7 +750,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) } goto GETOUT; } - + /* setup the working directory for this app - will jump us * to that directory */ @@ -801,23 +801,23 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) if (NULL == (child = (orte_proc_t*)opal_pointer_array_get_item(orte_local_children, idx))) { continue; } - + /* does this child belong to this app? */ if (j != (int)child->app_idx) { continue; } - + /* is this child already alive? This can happen if * we are asked to launch additional processes. * If it has been launched, then do nothing */ if (ORTE_FLAG_TEST(child, ORTE_PROC_FLAG_ALIVE)) { - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:launch child %s has already been launched", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name))); - + continue; } /* is this child a candidate to start? it may not be alive @@ -832,16 +832,16 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) * the dss.compare function to check for equality. */ if (OPAL_EQUAL != opal_dss.compare(&job, &(child->name.jobid), ORTE_JOBID)) { - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:launch child %s is not in job %s being launched", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name), ORTE_JOBID_PRINT(job))); - + continue; } - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:launch working child %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -865,7 +865,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) free(child->rml_uri); child->rml_uri = NULL; } - + /* check to see if we have enough available file descriptors * to launch another child - if not, then let's wait a little * while to see if some come free. This can happen if we are @@ -890,7 +890,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) return; } } - + /* did the user request we display output in xterms? */ if (NULL != orte_xterm) { opal_list_item_t *nmitem; @@ -937,7 +937,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) ORTE_ACTIVATE_PROC_STATE(&child->name, ORTE_PROC_STATE_FAILED_TO_LAUNCH); continue; } - + } } else if (NULL != orte_fork_agent) { /* we were given a fork agent - use it */ @@ -1011,13 +1011,13 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) opal_output(orte_odls_base_framework.framework_output, "%s odls:launch: spawning child %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name)); - + /* dump what is going to be exec'd */ if (7 < opal_output_get_verbosity(orte_odls_base_framework.framework_output)) { opal_dss.dump(orte_odls_base_framework.framework_output, app, ORTE_APP_CONTEXT); } } - + orte_wait_cb(child, odls_base_default_wait_local_proc, NULL); if (ORTE_SUCCESS != (rc = fork_local(app, child, app->env, jobdat))) { orte_wait_cb_cancel(child); @@ -1095,7 +1095,7 @@ int orte_odls_base_default_deliver_message(orte_jobid_t job, opal_buffer_t *buff if (NULL == (child = (orte_proc_t*)opal_pointer_array_get_item(orte_local_children, i))) { continue; } - + /* do we have a child from the specified job. Because the * job could be given as a WILDCARD value, we must use * the dss.compare function to check for equality. @@ -1104,12 +1104,12 @@ int orte_odls_base_default_deliver_message(orte_jobid_t job, opal_buffer_t *buff OPAL_EQUAL != opal_dss.compare(&job, &(child->name.jobid), ORTE_JOBID)) { continue; } - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls: sending message to tag %lu on child %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (unsigned long)tag, ORTE_NAME_PRINT(&child->name))); - + /* if so, send the message */ relay = OBJ_NEW(opal_buffer_t); opal_dss.copy_payload(relay, buffer); @@ -1144,12 +1144,12 @@ int orte_odls_base_default_signal_local_procs(const orte_process_name_t *proc, i { int rc, i; orte_proc_t *child; - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls: signaling proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (NULL == proc) ? "NULL" : ORTE_NAME_PRINT(proc))); - + /* if procs is NULL, then we want to signal all * of the local procs, so just do that case */ @@ -1165,7 +1165,7 @@ int orte_odls_base_default_signal_local_procs(const orte_process_name_t *proc, i } return rc; } - + /* we want it sent to some specified process, so find it */ for (i=0; i < orte_local_children->size; i++) { if (NULL == (child = (orte_proc_t*)opal_pointer_array_get_item(orte_local_children, i))) { @@ -1178,7 +1178,7 @@ int orte_odls_base_default_signal_local_procs(const orte_process_name_t *proc, i return rc; } } - + /* only way to get here is if we couldn't find the specified proc. * report that as an error and return it */ @@ -1201,7 +1201,7 @@ void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) "%s odls:wait_local_proc child process %s pid %ld terminated", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&proc->name), (long)proc->pid); - + /* if the child was previously flagged as dead, then just * update its exit status and * ensure that its exit state gets reported to avoid hanging @@ -1266,7 +1266,7 @@ void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) ORTE_FLAG_SET(proc, ORTE_PROC_FLAG_WAITPID); goto MOVEON; } - + /* determine the state of this process */ if (WIFEXITED(proc->exit_code)) { @@ -1387,7 +1387,7 @@ void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) ORTE_NAME_PRINT(&proc->name) )); /* Do not decrement the number of local procs here. That is handled in the errmgr */ } - + MOVEON: ORTE_ACTIVATE_PROC_STATE(&proc->name, state); } @@ -1408,7 +1408,7 @@ static void kill_cbfunc(int fd, short args, void *cbdata) cd->kill_local(cd->child->pid, SIGKILL); free(cd); } - + int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, orte_odls_base_kill_local_fn_t kill_local, orte_odls_base_child_died_fn_t child_died) @@ -1419,7 +1419,7 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, int i, j; opal_pointer_array_t procarray, *procptr; bool do_cleanup; - + OBJ_CONSTRUCT(&procs_killed, opal_list_t); /* if the pointer array is NULL, then just kill everything */ @@ -1442,7 +1442,7 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, procptr = procs; do_cleanup = false; } - + /* cycle through the provided array of processes to kill */ for (i=0; i < procptr->size; i++) { if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(procptr, i))) { @@ -1457,14 +1457,14 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, "%s odls:kill_local_proc checking child process %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name))); - + /* do we have a child from the specified job? Because the * job could be given as a WILDCARD value, we must * check for that as well as for equality. */ if (ORTE_JOBID_WILDCARD != proc->name.jobid && proc->name.jobid != child->name.jobid) { - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:kill_local_proc child %s is not part of job %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -1472,13 +1472,13 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, ORTE_JOBID_PRINT(proc->name.jobid))); continue; } - + /* see if this is the specified proc - could be a WILDCARD again, so check * appropriately */ if (ORTE_VPID_WILDCARD != proc->name.vpid && proc->name.vpid != child->name.vpid) { - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:kill_local_proc child %s is not covered by rank %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -1486,17 +1486,17 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, ORTE_VPID_PRINT(proc->name.vpid))); continue; } - + /* is this process alive? if not, then nothing for us * to do to it */ if (!ORTE_FLAG_TEST(child, ORTE_PROC_FLAG_ALIVE) || 0 == child->pid) { - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:kill_local_proc child %s is not alive", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name))); - + /* ensure, though, that the state is terminated so we don't lockup if * the proc never started */ @@ -1529,12 +1529,12 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, if (NULL != orte_iof.close) { orte_iof.close(&child->name, ORTE_IOF_STDIN); } - + /* cancel the waitpid callback as this induces unmanageable race * conditions when we are deliberately killing the process */ orte_wait_cb_cancel(child); - + if (!do_cleanup) { odls_kill_caddy_t *cd; @@ -1576,13 +1576,13 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name), (unsigned long)child->pid)); kill_local(child->pid, SIGKILL); - + /* indicate the waitpid fired as this is effectively what * has happened */ ORTE_FLAG_SET(child, ORTE_PROC_FLAG_WAITPID); child->pid = 0; - + CLEANUP: /* ensure the child's session directory is cleaned up */ orte_session_dir_finalize(&child->name); @@ -1595,13 +1595,13 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, } } } - + /* cleanup, if required */ if (do_cleanup) { OBJ_DESTRUCT(&procarray); OBJ_DESTRUCT(&proctmp); } - + return ORTE_SUCCESS; } @@ -1612,18 +1612,18 @@ int orte_odls_base_get_proc_stats(opal_buffer_t *answer, orte_proc_t *child; opal_pstats_t stats, *statsptr; int i, j; - + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:get_proc_stats for proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(proc))); - + /* find this child */ for (i=0; i < orte_local_children->size; i++) { if (NULL == (child = (orte_proc_t*)opal_pointer_array_get_item(orte_local_children, i))) { continue; } - + if (proc->jobid == child->name.jobid && (proc->vpid == child->name.vpid || ORTE_VPID_WILDCARD == proc->vpid)) { /* found it */ @@ -1673,7 +1673,7 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child, "%s odls:restart_proc for proc %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&child->name))); - + /* establish our baseline working directory - we will be potentially * bouncing around as we execute this app, but we will always return * to this place as our default directory @@ -1686,7 +1686,7 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child, ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); return ORTE_ERR_NOT_FOUND; } - + child->state = ORTE_PROC_STATE_FAILED_TO_START; child->exit_code = 0; ORTE_FLAG_UNSET(child, ORTE_PROC_FLAG_WAITPID); @@ -1698,7 +1698,7 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child, } app = (orte_app_context_t*)opal_pointer_array_get_item(jobdat->apps, child->app_idx); - /* reset envars to match this child */ + /* reset envars to match this child */ if (ORTE_SUCCESS != (rc = orte_schizo.setup_child(jobdat, child, app))) { ORTE_ERROR_LOG(rc); goto CLEANUP; @@ -1720,7 +1720,7 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child, child->exit_code = ORTE_ERR_SILENT; /* error message already output */ ORTE_ACTIVATE_PROC_STATE(&child->name, ORTE_PROC_STATE_FAILED_TO_START); } - + CLEANUP: OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, "%s odls:restart of proc %s %s", diff --git a/orte/mca/odls/base/odls_base_frame.c b/orte/mca/odls/base/odls_base_frame.c index 018c5378a75..e615433957b 100644 --- a/orte/mca/odls/base/odls_base_frame.c +++ b/orte/mca/odls/base/odls_base_frame.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -90,7 +90,7 @@ static int orte_odls_base_close(void) OBJ_RELEASE(item); } OBJ_DESTRUCT(&orte_odls_globals.xterm_ranks); - + /* cleanup the global list of local children and job data */ for (i=0; i < orte_local_children->size; i++) { if (NULL != (proc = (orte_proc_t*)opal_pointer_array_get_item(orte_local_children, i))) { @@ -126,7 +126,7 @@ static int orte_odls_base_open(mca_base_open_flag_t flags) /* initialize ODLS globals */ OBJ_CONSTRUCT(&orte_odls_globals.xterm_ranks, opal_list_t); orte_odls_globals.xtermcmd = NULL; - + /* check if the user requested that we display output in xterms */ if (NULL != orte_xterm) { /* construct a list of ranks to be displayed */ @@ -173,7 +173,7 @@ static int orte_odls_base_open(mca_base_open_flag_t flags) } opal_argv_append_nosize(&orte_odls_globals.xtermcmd, "-e"); } - + /* Open up all available components */ return mca_base_framework_components_open(&orte_odls_base_framework, flags); } diff --git a/orte/mca/odls/base/odls_base_select.c b/orte/mca/odls/base/odls_base_select.c index ef88ed254a6..1eca075a0df 100644 --- a/orte/mca/odls/base/odls_base_select.c +++ b/orte/mca/odls/base/odls_base_select.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ diff --git a/orte/mca/odls/base/odls_private.h b/orte/mca/odls/base/odls_private.h index e2782f83776..2556b9dfc17 100644 --- a/orte/mca/odls/base/odls_private.h +++ b/orte/mca/odls/base/odls_private.h @@ -5,17 +5,17 @@ * 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, + * 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 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/odls/default/Makefile.am b/orte/mca/odls/default/Makefile.am index b2248eb1026..c69fac6b768 100644 --- a/orte/mca/odls/default/Makefile.am +++ b/orte/mca/odls/default/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/odls/default/configure.m4 b/orte/mca/odls/default/configure.m4 index 5f35f6cd2f0..2bc2cbb7976 100644 --- a/orte/mca/odls/default/configure.m4 +++ b/orte/mca/odls/default/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/odls/default/help-orte-odls-default.txt b/orte/mca/odls/default/help-orte-odls-default.txt index ae65215d9fd..0e5d526e13f 100644 --- a/orte/mca/odls/default/help-orte-odls-default.txt +++ b/orte/mca/odls/default/help-orte-odls-default.txt @@ -6,16 +6,16 @@ # 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, +# 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 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # This is a US/English help file. diff --git a/orte/mca/odls/default/odls_default_component.c b/orte/mca/odls/default/odls_default_component.c index e695101e38f..663e674acd8 100644 --- a/orte/mca/odls/default/odls_default_component.c +++ b/orte/mca/odls/default/odls_default_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -79,7 +79,7 @@ int orte_odls_default_component_query(mca_base_module_t **module, int *priority) /* the base open/select logic protects us against operation when * we are NOT in a daemon, so we don't have to check that here */ - + /* we have built some logic into the configure.m4 file that checks * to see if we have "fork" support and only builds this component * if we do. Hence, we only get here if we CAN build - in which diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index 9a90f391780..2f000de4d65 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -14,7 +14,7 @@ * Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 IBM Corporation. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * * $COPYRIGHT$ @@ -49,7 +49,7 @@ * - the child tries to set affinity and do other housekeeping in * preparation of exec'ing the target executable * - if the child fails anywhere along the way, it sends a message up - * the pipe to the parent indicating what happened -- including a + * the pipe to the parent indicating what happened -- including a * rendered error message detailing the problem (i.e., human-readable). * - it is important that the child renders the error message: there * are so many errors that are possible that the child is really the @@ -137,7 +137,7 @@ static int orte_odls_default_restart_proc(orte_proc_t *child); * Explicitly declared functions so that we can get the noreturn * attribute registered with the compiler. */ -static void send_error_show_help(int fd, int exit_status, +static void send_error_show_help(int fd, int exit_status, const char *file, const char *topic, ...) __opal_attribute_noreturn__; static int do_child(orte_app_context_t* context, @@ -165,7 +165,7 @@ static bool odls_default_child_died(orte_proc_t *child) { time_t end; pid_t ret; - + /* Because of rounding in time (which returns whole seconds) we * have to add 1 to our wait number: this means that we wait * somewhere between (target) and (target)+1 seconds. Otherwise, @@ -210,7 +210,7 @@ static bool odls_default_child_died(orte_proc_t *child) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (int)(child->pid))); return true; } - + /* Bogus delay for 1 msec - let's actually give the CPU some time * to quit the other process (sched_yield() -- even if we have it * -- changed behavior in 2.6.3x Linux flavors to be undesirable) @@ -259,7 +259,7 @@ static int odls_default_kill_local(pid_t pid, int signum) int orte_odls_default_kill_local_procs(opal_pointer_array_t *procs) { int rc; - + if (ORTE_SUCCESS != (rc = orte_odls_base_default_kill_local_procs(procs, odls_default_kill_local, odls_default_child_died))) { ORTE_ERROR_LOG(rc); @@ -367,14 +367,14 @@ static int do_child(orte_app_context_t* context, orted. */ setpgid(0, 0); } - + /* Setup the pipe to be close-on-exec */ opal_fd_set_cloexec(write_fd); if (NULL != child) { /* setup stdout/stderr so that any error messages that we may print out will get displayed back at orterun. - + NOTE: Definitely do this AFTER we check contexts so that any error message from those two functions doesn't come out to the user. IF we didn't do it in this order, @@ -385,11 +385,11 @@ static int do_child(orte_app_context_t* context, always outputs a nice, single message indicating what happened */ - if (ORTE_SUCCESS != (i = orte_iof_base_setup_child(&opts, + if (ORTE_SUCCESS != (i = orte_iof_base_setup_child(&opts, &environ_copy))) { ORTE_ERROR_LOG(i); - send_error_show_help(write_fd, 1, - "help-orte-odls-default.txt", + send_error_show_help(write_fd, 1, + "help-orte-odls-default.txt", "iof setup failed", orte_process_info.nodename, context->app); /* Does not return */ @@ -419,7 +419,7 @@ static int do_child(orte_app_context_t* context, if (OPAL_SUCCESS != (rc = opal_util_init_sys_limits(&msg))) { send_error_show_help(write_fd, 1, "help-orte-odls-default.txt", "set limit", - orte_process_info.nodename, context->app, + orte_process_info.nodename, context->app, __FILE__, __LINE__, msg); } /* ensure we only do this once */ @@ -435,35 +435,35 @@ static int do_child(orte_app_context_t* context, close(fd); } } - + if (context->argv == NULL) { context->argv = malloc(sizeof(char*)*2); context->argv[0] = strdup(context->app); context->argv[1] = NULL; } - + /* Set signal handlers back to the default. Do this close to the exev() because the event library may (and likely will) reset them. If we don't do this, the event library may have left some set that, at least on some OS's, don't get reset via fork() or exec(). Hence, the launched process could be unkillable (for example). */ - + set_handler_default(SIGTERM); set_handler_default(SIGINT); set_handler_default(SIGHUP); set_handler_default(SIGPIPE); set_handler_default(SIGCHLD); - + /* Unblock all signals, for many of the same reasons that we set the default handlers, above. This is noticable on Linux where the event library blocks SIGTERM, but we don't want that blocked by the launched process. */ sigprocmask(0, 0, &sigs); sigprocmask(SIG_UNBLOCK, &sigs, 0); - + /* Exec the new executable */ - + if (10 < opal_output_get_verbosity(orte_odls_base_framework.framework_output)) { int jout; opal_output(0, "%s STARTING %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), context->app); @@ -474,9 +474,9 @@ static int do_child(orte_app_context_t* context, opal_output(0, "%s\tENVIRON[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, environ_copy[jout]); } } - + execve(context->app, context->argv, environ_copy); - send_error_show_help(write_fd, 1, + send_error_show_help(write_fd, 1, "help-orte-odls-default.txt", "execve error", orte_process_info.nodename, context->app, strerror(errno)); /* Does not return */ @@ -515,12 +515,12 @@ static int do_parent(orte_app_context_t* context, if (OPAL_ERR_TIMEOUT == rc) { break; } - + /* If Something Bad happened in the read, error out */ if (OPAL_SUCCESS != rc) { ORTE_ERROR_LOG(rc); close(read_fd); - + if (NULL != child) { child->state = ORTE_PROC_STATE_UNDEF; } @@ -540,7 +540,7 @@ static int do_parent(orte_app_context_t* context, if (msg.file_str_len > 0) { rc = opal_fd_read(read_fd, msg.file_str_len, file); if (OPAL_SUCCESS != rc) { - orte_show_help("help-orte-odls-default.txt", "syscall fail", + orte_show_help("help-orte-odls-default.txt", "syscall fail", true, orte_process_info.nodename, context->app, "opal_fd_read", __FILE__, __LINE__); @@ -554,7 +554,7 @@ static int do_parent(orte_app_context_t* context, if (msg.topic_str_len > 0) { rc = opal_fd_read(read_fd, msg.topic_str_len, topic); if (OPAL_SUCCESS != rc) { - orte_show_help("help-orte-odls-default.txt", "syscall fail", + orte_show_help("help-orte-odls-default.txt", "syscall fail", true, orte_process_info.nodename, context->app, "opal_fd_read", __FILE__, __LINE__); @@ -568,7 +568,7 @@ static int do_parent(orte_app_context_t* context, if (msg.msg_str_len > 0) { str = calloc(1, msg.msg_str_len + 1); if (NULL == str) { - orte_show_help("help-orte-odls-default.txt", "syscall fail", + orte_show_help("help-orte-odls-default.txt", "syscall fail", true, orte_process_info.nodename, context->app, "opal_fd_read", __FILE__, __LINE__); @@ -611,7 +611,7 @@ static int do_parent(orte_app_context_t* context, ORTE_FLAG_SET(child, ORTE_PROC_FLAG_ALIVE); } close(read_fd); - + return ORTE_SUCCESS; } @@ -627,12 +627,12 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, orte_iof_base_io_conf_t opts; int rc, p[2]; pid_t pid; - + if (NULL != child) { /* should pull this information from MPIRUN instead of going with default */ opts.usepty = OPAL_ENABLE_PTY_SUPPORT; - + /* do we want to setup stdin? */ if (NULL != child && (jobdat->stdin_target == ORTE_VPID_WILDCARD || @@ -641,7 +641,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, } else { opts.connect_stdin = false; } - + if (ORTE_SUCCESS != (rc = orte_iof_base_setup_prefork(&opts))) { ORTE_ERROR_LOG(rc); if (NULL != child) { @@ -668,13 +668,13 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, } return ORTE_ERR_SYS_LIMITS_PIPES; } - + /* Fork off the child */ pid = fork(); if (NULL != child) { child->pid = pid; } - + if (pid < 0) { ORTE_ERROR_LOG(ORTE_ERR_SYS_LIMITS_CHILDREN); if (NULL != child) { @@ -683,7 +683,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, } return ORTE_ERR_SYS_LIMITS_CHILDREN; } - + if (pid == 0) { close(p[0]); #if HAVE_SETPGID @@ -691,7 +691,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, #endif do_child(context, child, environ_copy, jobdat, p[1], opts); /* Does not return */ - } + } close(p[1]); return do_parent(context, child, environ_copy, jobdat, p[0], opts); @@ -714,22 +714,22 @@ int orte_odls_default_launch_local_procs(opal_buffer_t *data) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_ERROR_NAME(rc))); return rc; } - + /* launch the local procs */ ORTE_ACTIVATE_LOCAL_LAUNCH(job, odls_default_fork_local_proc); - + return ORTE_SUCCESS; } /** * Send a signal to a pid. Note that if we get an error, we set the - * return value and let the upper layer print out the message. + * return value and let the upper layer print out the message. */ static int send_signal(pid_t pid, int signal) { int rc = ORTE_SUCCESS; - + OPAL_OUTPUT_VERBOSE((1, orte_odls_base_framework.framework_output, "%s sending signal %d to pid %ld", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -748,8 +748,8 @@ static int send_signal(pid_t pid, int signal) case ESRCH: /* This case can occur when we deliver a signal to a process that is no longer there. This can happen if - we deliver a signal while the job is shutting down. - This does not indicate a real problem, so just + we deliver a signal while the job is shutting down. + This does not indicate a real problem, so just ignore the error. */ break; case EPERM: @@ -759,14 +759,14 @@ static int send_signal(pid_t pid, int signal) rc = ORTE_ERROR; } } - + return rc; } static int orte_odls_default_signal_local_procs(const orte_process_name_t *proc, int32_t signal) { int rc; - + if (ORTE_SUCCESS != (rc = orte_odls_base_default_signal_local_procs(proc, signal, send_signal))) { ORTE_ERROR_LOG(rc); return rc; @@ -777,7 +777,7 @@ static int orte_odls_default_signal_local_procs(const orte_process_name_t *proc, static int orte_odls_default_restart_proc(orte_proc_t *child) { int rc; - + /* restart the local proc */ if (ORTE_SUCCESS != (rc = orte_odls_base_default_restart_proc(child, odls_default_fork_local_proc))) { OPAL_OUTPUT_VERBOSE((2, orte_odls_base_framework.framework_output, diff --git a/orte/mca/odls/odls.h b/orte/mca/odls/odls.h index 88b69c71bf7..d28a964f770 100644 --- a/orte/mca/odls/odls.h +++ b/orte/mca/odls/odls.h @@ -45,7 +45,7 @@ BEGIN_C_DECLS /* * odls module functions */ - + /* * Construct a buffer for use in adding local processes * In order to reuse daemons, we need a way for the HNP to construct a buffer that diff --git a/orte/mca/odls/odls_types.h b/orte/mca/odls/odls_types.h index b20a4d686e5..1164e5931f0 100644 --- a/orte/mca/odls/odls_types.h +++ b/orte/mca/odls/odls_types.h @@ -4,7 +4,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: @@ -36,7 +36,7 @@ BEGIN_C_DECLS typedef uint8_t orte_daemon_cmd_flag_t; #define ORTE_DAEMON_CMD_T OPAL_UINT8 - + /* * Definitions needed for communication */ @@ -59,7 +59,7 @@ typedef uint8_t orte_daemon_cmd_flag_t; #define ORTE_DAEMON_TERMINATE_JOB_CMD (orte_daemon_cmd_flag_t) 18 #define ORTE_DAEMON_HALT_VM_CMD (orte_daemon_cmd_flag_t) 19 #define ORTE_DAEMON_HALT_DVM_CMD (orte_daemon_cmd_flag_t) 20 - + /* request proc resource usage */ #define ORTE_DAEMON_TOP_CMD (orte_daemon_cmd_flag_t) 22 @@ -95,7 +95,7 @@ typedef struct { int msg_str_len; } orte_odls_pipe_err_msg_t; -/* +/* * Max length of strings from the orte_odls_pipe_err_msg_t */ #define ORTE_ODLS_MAX_FILE_LEN 511 diff --git a/orte/mca/oob/Makefile.am b/orte/mca/oob/Makefile.am index d1a4fc3f921..a88e3877e28 100644 --- a/orte/mca/oob/Makefile.am +++ b/orte/mca/oob/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/oob/alps/Makefile.am b/orte/mca/oob/alps/Makefile.am index da6e649210e..380677e1325 100644 --- a/orte/mca/oob/alps/Makefile.am +++ b/orte/mca/oob/alps/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -14,9 +14,9 @@ # All rights reserved # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/oob/alps/configure.m4 b/orte/mca/oob/alps/configure.m4 index d8ec90bf7ff..428a71f1fb9 100644 --- a/orte/mca/oob/alps/configure.m4 +++ b/orte/mca/oob/alps/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,11 +27,11 @@ AC_DEFUN([MCA_orte_oob_alps_CONFIG],[ ORTE_CHECK_ALPS([oob_alps], [oob_alps_happy="yes"], [oob_alps_happy="no"]) - AS_IF([test "$oob_alps_happy" = "yes"], + AS_IF([test "$oob_alps_happy" = "yes"], [$1 AC_SUBST([oob_alps_CPPFLAGS]) AC_SUBST([oob_alps_LDFLAGS]) - AC_SUBST([oob_alps_LIBS])], + AC_SUBST([oob_alps_LIBS])], [$2]) ])dnl diff --git a/orte/mca/oob/alps/oob_alps_component.c b/orte/mca/oob/alps/oob_alps_component.c index 05ddd071eb1..3a114903bc2 100644 --- a/orte/mca/oob/alps/oob_alps_component.c +++ b/orte/mca/oob/alps/oob_alps_component.c @@ -25,7 +25,7 @@ * In windows, many of the socket functions return an EWOULDBLOCK * instead of things like EAGAIN, EINPROGRESS, etc. It has been * verified that this will not conflict with other error codes that - * are returned by these functions under UNIX/Linux environments + * are returned by these functions under UNIX/Linux environments */ #include "orte_config.h" diff --git a/orte/mca/oob/base/Makefile.am b/orte/mca/oob/base/Makefile.am index 5b34cfb9ad9..ae7f927814f 100644 --- a/orte/mca/oob/base/Makefile.am +++ b/orte/mca/oob/base/Makefile.am @@ -5,7 +5,7 @@ # 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, +# 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. @@ -13,9 +13,9 @@ # reserved. # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/oob/base/base.h b/orte/mca/oob/base/base.h index 2c6bde8fb27..2fe75f3542f 100644 --- a/orte/mca/oob/base/base.h +++ b/orte/mca/oob/base/base.h @@ -78,21 +78,21 @@ OBJ_CLASS_DECLARATION(orte_oob_base_peer_t); ORTE_DECLSPEC extern mca_base_framework_t orte_oob_base_framework; ORTE_DECLSPEC int orte_oob_base_select(void); -/* Access the OOB internal functions via set of event-based macros - * for inserting messages and other commands into the - * OOB event base. This ensures that all OOB operations occur - * asynchronously in a thread-safe environment. - * Note that this doesn't mean that messages will be *sent* - * in order as that depends on the specific transport being - * used, when that module's event base indicates the transport - * is available, etc. - */ -typedef struct { - opal_object_t super; - opal_event_t ev; - orte_rml_send_t *msg; -} orte_oob_send_t; -OBJ_CLASS_DECLARATION(orte_oob_send_t); +/* Access the OOB internal functions via set of event-based macros + * for inserting messages and other commands into the + * OOB event base. This ensures that all OOB operations occur + * asynchronously in a thread-safe environment. + * Note that this doesn't mean that messages will be *sent* + * in order as that depends on the specific transport being + * used, when that module's event base indicates the transport + * is available, etc. + */ +typedef struct { + opal_object_t super; + opal_event_t ev; + orte_rml_send_t *msg; +} orte_oob_send_t; +OBJ_CLASS_DECLARATION(orte_oob_send_t); /* All OOB sends are based on iovec's and are async as the RML * acts as the initial interface to prepare all communications. @@ -108,7 +108,7 @@ typedef void (*mca_oob_send_callback_fn_t)(int status, struct iovec *iov, int count, void *cbdata); -ORTE_DECLSPEC void orte_oob_base_send_nb(int fd, short args, void *cbdata); +ORTE_DECLSPEC void orte_oob_base_send_nb(int fd, short args, void *cbdata); #define ORTE_OOB_SEND(m) \ do { \ orte_oob_send_t *cd; \ @@ -161,7 +161,7 @@ ORTE_DECLSPEC void orte_oob_base_get_addr(char **uri); * across all oob components/modules, letting each look at the uri and extract * info from it if it can. */ -typedef struct { +typedef struct { opal_object_t super; opal_event_t ev; char *uri; diff --git a/orte/mca/oob/base/help-oob-base.txt b/orte/mca/oob/base/help-oob-base.txt index f6ed2154e9a..5e233475028 100644 --- a/orte/mca/oob/base/help-oob-base.txt +++ b/orte/mca/oob/base/help-oob-base.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2014 Intel, Inc. All rights reserved # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # # diff --git a/orte/mca/oob/base/oob_base_frame.c b/orte/mca/oob/base/oob_base_frame.c index 19111f89915..5f314cc1f06 100644 --- a/orte/mca/oob/base/oob_base_frame.c +++ b/orte/mca/oob/base/oob_base_frame.c @@ -6,7 +6,7 @@ * 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, + * 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. @@ -16,9 +16,9 @@ * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/base/oob_base_select.c b/orte/mca/oob/base/oob_base_select.c index 6aedb7c431a..d2c8bc8804e 100644 --- a/orte/mca/oob/base/oob_base_select.c +++ b/orte/mca/oob/base/oob_base_select.c @@ -5,7 +5,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -72,7 +72,7 @@ int orte_oob_base_select(void) component->oob_base.mca_component_name); rc = component->available(); - + /* If the component is not available, then skip it as * it has no available interfaces */ @@ -106,7 +106,7 @@ int orte_oob_base_select(void) opal_list_append(&orte_oob_base.actives, &c2->super); break; } - + /* record it, but maintain priority order */ added = false; OPAL_LIST_FOREACH(cmp, &orte_oob_base.actives, mca_base_component_list_item_t) { diff --git a/orte/mca/oob/base/oob_base_stubs.c b/orte/mca/oob/base/oob_base_stubs.c index df4a69ba0df..59624e88013 100644 --- a/orte/mca/oob/base/oob_base_stubs.c +++ b/orte/mca/oob/base/oob_base_stubs.c @@ -2,11 +2,11 @@ /* * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -31,7 +31,7 @@ static void process_uri(char *uri); void orte_oob_base_send_nb(int fd, short args, void *cbdata) { - orte_oob_send_t *cd = (orte_oob_send_t*)cbdata; + orte_oob_send_t *cd = (orte_oob_send_t*)cbdata; orte_rml_send_t *msg = cd->msg; mca_base_component_list_item_t *cli; orte_oob_base_peer_t *pr; @@ -278,19 +278,19 @@ void orte_oob_base_get_addr(char **uri) * info from it if it can. An error is to be returned if NO component * can successfully extract a contact. */ -static void req_cons(mca_oob_uri_req_t *ptr) -{ - ptr->uri = NULL; -} -static void req_des(mca_oob_uri_req_t *ptr) -{ - if (NULL != ptr->uri) { - free(ptr->uri); - } -} -OBJ_CLASS_INSTANCE(mca_oob_uri_req_t, - opal_object_t, - req_cons, req_des); +static void req_cons(mca_oob_uri_req_t *ptr) +{ + ptr->uri = NULL; +} +static void req_des(mca_oob_uri_req_t *ptr) +{ + if (NULL != ptr->uri) { + free(ptr->uri); + } +} +OBJ_CLASS_INSTANCE(mca_oob_uri_req_t, + opal_object_t, + req_cons, req_des); void orte_oob_base_set_addr(int fd, short args, void *cbdata) { diff --git a/orte/mca/oob/oob.h b/orte/mca/oob/oob.h index e0c386600ff..584e58268b7 100644 --- a/orte/mca/oob/oob.h +++ b/orte/mca/oob/oob.h @@ -6,7 +6,7 @@ * 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, + * 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. @@ -14,9 +14,9 @@ * reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/oob/tcp/Makefile.am b/orte/mca/oob/tcp/Makefile.am index 73d983b2bee..383af7e719b 100644 --- a/orte/mca/oob/tcp/Makefile.am +++ b/orte/mca/oob/tcp/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -14,9 +14,9 @@ # All rights reserved # Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/oob/tcp/configure.m4 b/orte/mca/oob/tcp/configure.m4 index 56b9ca8e68a..1a65263cc41 100644 --- a/orte/mca/oob/tcp/configure.m4 +++ b/orte/mca/oob/tcp/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -26,9 +26,9 @@ AC_DEFUN([MCA_orte_oob_tcp_CONFIG],[ AC_CONFIG_FILES([orte/mca/oob/tcp/Makefile]) # check for sockaddr_in (a good sign we have TCP) - AC_CHECK_TYPES([struct sockaddr_in], + AC_CHECK_TYPES([struct sockaddr_in], [oob_tcp_happy="yes"], - [oob_tcp_happy="no"], + [oob_tcp_happy="no"], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include diff --git a/orte/mca/oob/tcp/help-oob-tcp.txt b/orte/mca/oob/tcp/help-oob-tcp.txt index f577247bc13..d20ea17e1b1 100644 --- a/orte/mca/oob/tcp/help-oob-tcp.txt +++ b/orte/mca/oob/tcp/help-oob-tcp.txt @@ -6,16 +6,16 @@ # 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, +# 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) 2014-2015 Intel, Inc. All rights reserved. # Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # [static-and-dynamic] diff --git a/orte/mca/oob/tcp/oob_tcp.h b/orte/mca/oob/tcp/oob_tcp.h index 135ffb2ee3a..98c89494dd6 100644 --- a/orte/mca/oob/tcp/oob_tcp.h +++ b/orte/mca/oob/tcp/oob_tcp.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/tcp/oob_tcp_common.c b/orte/mca/oob/tcp/oob_tcp_common.c index fffca84be59..a4ee262cecf 100644 --- a/orte/mca/oob/tcp/oob_tcp_common.c +++ b/orte/mca/oob/tcp/oob_tcp_common.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. @@ -25,7 +25,7 @@ * In windows, many of the socket functions return an EWOULDBLOCK * instead of things like EAGAIN, EINPROGRESS, etc. It has been * verified that this will not conflict with other error codes that - * are returned by these functions under UNIX/Linux environments + * are returned by these functions under UNIX/Linux environments */ #include "orte_config.h" @@ -77,7 +77,7 @@ static void set_keepalive(int sd) #if defined(SO_KEEPALIVE) int option; socklen_t optlen; - + /* see if the keepalive option is available */ optlen = sizeof(option); if (getsockopt(sd, SOL_SOCKET, SO_KEEPALIVE, &option, &optlen) < 0) { @@ -89,8 +89,8 @@ static void set_keepalive(int sd) option = 1; if (setsockopt(sd, SOL_SOCKET, SO_KEEPALIVE, &option, optlen) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(SO_KEEPALIVE) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(SO_KEEPALIVE) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); return; @@ -101,8 +101,8 @@ static void set_keepalive(int sd) &mca_oob_tcp_component.keepalive_time, sizeof(mca_oob_tcp_component.keepalive_time)) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(TCP_KEEPALIVE) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(TCP_KEEPALIVE) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); return; @@ -113,8 +113,8 @@ static void set_keepalive(int sd) &mca_oob_tcp_component.keepalive_time, sizeof(mca_oob_tcp_component.keepalive_time)) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(TCP_KEEPIDLE) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(TCP_KEEPIDLE) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); return; @@ -126,8 +126,8 @@ static void set_keepalive(int sd) &mca_oob_tcp_component.keepalive_intvl, sizeof(mca_oob_tcp_component.keepalive_intvl)) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(TCP_KEEPINTVL) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(TCP_KEEPINTVL) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); return; @@ -139,8 +139,8 @@ static void set_keepalive(int sd) &mca_oob_tcp_component.keepalive_probes, sizeof(mca_oob_tcp_component.keepalive_probes)) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(TCP_KEEPCNT) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(TCP_KEEPCNT) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); } @@ -156,8 +156,8 @@ void orte_oob_tcp_set_socket_options(int sd) if (setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char *)&optval, sizeof(optval)) < 0) { opal_backtrace_print(stderr, NULL, 1); opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(TCP_NODELAY) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(TCP_NODELAY) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); } @@ -166,8 +166,8 @@ void orte_oob_tcp_set_socket_options(int sd) if (mca_oob_tcp_component.tcp_sndbuf > 0 && setsockopt(sd, SOL_SOCKET, SO_SNDBUF, (char *)&mca_oob_tcp_component.tcp_sndbuf, sizeof(int)) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(SO_SNDBUF) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(SO_SNDBUF) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); } @@ -176,8 +176,8 @@ void orte_oob_tcp_set_socket_options(int sd) if (mca_oob_tcp_component.tcp_rcvbuf > 0 && setsockopt(sd, SOL_SOCKET, SO_RCVBUF, (char *)&mca_oob_tcp_component.tcp_rcvbuf, sizeof(int)) < 0) { opal_output_verbose(5, orte_oob_base_framework.framework_output, - "[%s:%d] setsockopt(SO_RCVBUF) failed: %s (%d)", - __FILE__, __LINE__, + "[%s:%d] setsockopt(SO_RCVBUF) failed: %s (%d)", + __FILE__, __LINE__, strerror(opal_socket_errno), opal_socket_errno); } diff --git a/orte/mca/oob/tcp/oob_tcp_common.h b/orte/mca/oob/tcp/oob_tcp_common.h index f23ee29c2a5..f999c1bd32a 100644 --- a/orte/mca/oob/tcp/oob_tcp_common.h +++ b/orte/mca/oob/tcp/oob_tcp_common.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/tcp/oob_tcp_component.c b/orte/mca/oob/tcp/oob_tcp_component.c index a6a8bc1ac6a..5b8ed7c4938 100644 --- a/orte/mca/oob/tcp/oob_tcp_component.c +++ b/orte/mca/oob/tcp/oob_tcp_component.c @@ -431,7 +431,7 @@ static int tcp_component_register(void) OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &mca_oob_tcp_component.keepalive_probes); - + mca_oob_tcp_component.retry_delay = 0; (void)mca_base_component_var_register(component, "retry_delay", "Time (in sec) to wait before trying to connect to peer again", diff --git a/orte/mca/oob/tcp/oob_tcp_component.h b/orte/mca/oob/tcp/oob_tcp_component.h index 120dac3d617..fb35b86478f 100644 --- a/orte/mca/oob/tcp/oob_tcp_component.h +++ b/orte/mca/oob/tcp/oob_tcp_component.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/tcp/oob_tcp_connection.c b/orte/mca/oob/tcp/oob_tcp_connection.c index 4e785e4d0c6..9bd5ae80df6 100644 --- a/orte/mca/oob/tcp/oob_tcp_connection.c +++ b/orte/mca/oob/tcp/oob_tcp_connection.c @@ -5,11 +5,11 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. @@ -17,9 +17,9 @@ * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -96,7 +96,7 @@ static int tcp_peer_create_socket(mca_oob_tcp_peer_t* peer) "%s oob:tcp:peer creating socket to %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&(peer->name)))); - + peer->sd = socket(AF_INET, SOCK_STREAM, 0); if (peer->sd < 0) { opal_output(0, "%s-%s tcp_peer_create_socket: socket() failed: %s (%d)\n", @@ -125,7 +125,7 @@ static int tcp_peer_create_socket(mca_oob_tcp_peer_t* peer) /* setup the socket as non-blocking */ if (peer->sd >= 0) { if((flags = fcntl(peer->sd, F_GETFL, 0)) < 0) { - opal_output(0, "%s-%s tcp_peer_connect: fcntl(F_GETFL) failed: %s (%d)\n", + opal_output(0, "%s-%s tcp_peer_connect: fcntl(F_GETFL) failed: %s (%d)\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&(peer->name)), strerror(opal_socket_errno), @@ -133,7 +133,7 @@ static int tcp_peer_create_socket(mca_oob_tcp_peer_t* peer) } else { flags |= O_NONBLOCK; if(fcntl(peer->sd, F_SETFL, flags) < 0) - opal_output(0, "%s-%s tcp_peer_connect: fcntl(F_SETFL) failed: %s (%d)\n", + opal_output(0, "%s-%s tcp_peer_connect: fcntl(F_SETFL) failed: %s (%d)\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&(peer->name)), strerror(opal_socket_errno), @@ -147,7 +147,7 @@ static int tcp_peer_create_socket(mca_oob_tcp_peer_t* peer) /* * Try connecting to a peer - cycle across all known addresses - * until one succeeds. + * until one succeeds. */ void mca_oob_tcp_peer_try_connect(int fd, short args, void *cbdata) { @@ -326,7 +326,7 @@ void mca_oob_tcp_peer_try_connect(int fd, short args, void *cbdata) "Connection to proc %s succeeded", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&peer->name)); - + /* setup our recv to catch the return ack call */ if (!peer->recv_ev_active) { opal_event_add(&peer->recv_event, 0); @@ -347,10 +347,10 @@ void mca_oob_tcp_peer_try_connect(int fd, short args, void *cbdata) ORTE_ACTIVATE_TCP_CONN_STATE(peer, mca_oob_tcp_peer_try_connect); } else { peer->state = MCA_OOB_TCP_UNCONNECTED; - } + } return; } else { - opal_output(0, + opal_output(0, "%s orte_tcp_peer_try_connect: " "tcp_peer_send_connect_ack to proc %s on %s:%d failed: %s (%d)", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -378,7 +378,7 @@ static int tcp_peer_send_connect_ack(mca_oob_tcp_peer_t* peer) size_t sdsize; char *cred; size_t credsize; - + opal_output_verbose(OOB_TCP_DEBUG_CONNECT, orte_oob_base_framework.framework_output, "%s SEND CONNECT ACK", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); @@ -400,7 +400,7 @@ static int tcp_peer_send_connect_ack(mca_oob_tcp_peer_t* peer) "%s SENDING CREDENTIAL OF SIZE %lu", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (unsigned long)credsize); - + /* set the number of bytes to be read beyond the header */ hdr.nbytes = strlen(orte_version_string) + 1 + credsize; MCA_OOB_TCP_HDR_HTON(&hdr); @@ -420,7 +420,7 @@ static int tcp_peer_send_connect_ack(mca_oob_tcp_peer_t* peer) if (NULL != cred) { free(cred); } - + /* send it */ if (ORTE_SUCCESS != tcp_peer_send_blocking(peer->sd, msg, sdsize)) { free(msg); @@ -451,7 +451,7 @@ static void tcp_peer_event_init(mca_oob_tcp_peer_t* peer) opal_event_del(&peer->recv_event); peer->recv_ev_active = false; } - + opal_event_set(mca_oob_tcp_module.ev_base, &peer->send_event, peer->sd, @@ -483,7 +483,7 @@ void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t *peer) /* check connect completion status */ if (getsockopt(peer->sd, SOL_SOCKET, SO_ERROR, (char *)&so_error, &so_length) < 0) { - opal_output(0, "%s tcp_peer_complete_connect: getsockopt() to %s failed: %s (%d)\n", + opal_output(0, "%s tcp_peer_complete_connect: getsockopt() to %s failed: %s (%d)\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&(peer->name)), strerror(opal_socket_errno), @@ -533,7 +533,7 @@ void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t *peer) "setting read event on connection to %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&(peer->name))); - + if (!peer->recv_ev_active) { opal_event_add(&peer->recv_event, 0); peer->recv_ev_active = true; @@ -721,7 +721,7 @@ int mca_oob_tcp_peer_recv_connect_ack(mca_oob_tcp_peer_t* pr, } if (hdr.type != MCA_OOB_TCP_IDENT) { - opal_output(0, "tcp_peer_recv_connect_ack: invalid header type: %d\n", + opal_output(0, "tcp_peer_recv_connect_ack: invalid header type: %d\n", hdr.type); if (NULL != peer) { peer->state = MCA_OOB_TCP_FAILED; @@ -1006,8 +1006,8 @@ static bool tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, int sd, /* socket is non-blocking so handle errors */ if (retval < 0) { - if (opal_socket_errno != EINTR && - opal_socket_errno != EAGAIN && + if (opal_socket_errno != EINTR && + opal_socket_errno != EAGAIN && opal_socket_errno != EWOULDBLOCK) { if (NULL == peer) { /* protect against things like port scanners */ @@ -1035,7 +1035,7 @@ static bool tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, int sd, (NULL == peer) ? "UNKNOWN" : ORTE_NAME_PRINT(&(peer->name))); return false; } else { - opal_output(0, + opal_output(0, "%s tcp_peer_recv_blocking: " "recv() failed for %s: %s (%d)\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -1071,16 +1071,16 @@ void mca_oob_tcp_peer_dump(mca_oob_tcp_peer_t* peer, const char* msg) struct sockaddr_storage inaddr; opal_socklen_t addrlen = sizeof(struct sockaddr_storage); opal_socklen_t optlen; - + if (getsockname(peer->sd, (struct sockaddr*)&inaddr, &addrlen) < 0) { - opal_output(0, "tcp_peer_dump: getsockname: %s (%d)\n", + opal_output(0, "tcp_peer_dump: getsockname: %s (%d)\n", strerror(opal_socket_errno), opal_socket_errno); } else { snprintf(src, sizeof(src), "%s", opal_net_get_hostname((struct sockaddr*) &inaddr)); } if (getpeername(peer->sd, (struct sockaddr*)&inaddr, &addrlen) < 0) { - opal_output(0, "tcp_peer_dump: getpeername: %s (%d)\n", + opal_output(0, "tcp_peer_dump: getpeername: %s (%d)\n", strerror(opal_socket_errno), opal_socket_errno); } else { @@ -1092,11 +1092,11 @@ void mca_oob_tcp_peer_dump(mca_oob_tcp_peer_t* peer, const char* msg) strerror(opal_socket_errno), opal_socket_errno); } - + #if defined(SO_SNDBUF) optlen = sizeof(sndbuf); if(getsockopt(peer->sd, SOL_SOCKET, SO_SNDBUF, (char *)&sndbuf, &optlen) < 0) { - opal_output(0, "tcp_peer_dump: SO_SNDBUF option: %s (%d)\n", + opal_output(0, "tcp_peer_dump: SO_SNDBUF option: %s (%d)\n", strerror(opal_socket_errno), opal_socket_errno); } @@ -1106,7 +1106,7 @@ void mca_oob_tcp_peer_dump(mca_oob_tcp_peer_t* peer, const char* msg) #if defined(SO_RCVBUF) optlen = sizeof(rcvbuf); if (getsockopt(peer->sd, SOL_SOCKET, SO_RCVBUF, (char *)&rcvbuf, &optlen) < 0) { - opal_output(0, "tcp_peer_dump: SO_RCVBUF option: %s (%d)\n", + opal_output(0, "tcp_peer_dump: SO_RCVBUF option: %s (%d)\n", strerror(opal_socket_errno), opal_socket_errno); } @@ -1116,7 +1116,7 @@ void mca_oob_tcp_peer_dump(mca_oob_tcp_peer_t* peer, const char* msg) #if defined(TCP_NODELAY) optlen = sizeof(nodelay); if (getsockopt(peer->sd, IPPROTO_TCP, TCP_NODELAY, (char *)&nodelay, &optlen) < 0) { - opal_output(0, "tcp_peer_dump: TCP_NODELAY option: %s (%d)\n", + opal_output(0, "tcp_peer_dump: TCP_NODELAY option: %s (%d)\n", strerror(opal_socket_errno), opal_socket_errno); } diff --git a/orte/mca/oob/tcp/oob_tcp_connection.h b/orte/mca/oob/tcp/oob_tcp_connection.h index a7a097d3e20..4aaa4470abf 100644 --- a/orte/mca/oob/tcp/oob_tcp_connection.h +++ b/orte/mca/oob/tcp/oob_tcp_connection.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/tcp/oob_tcp_listener.c b/orte/mca/oob/tcp/oob_tcp_listener.c index 79760618528..a926dd3cdd2 100644 --- a/orte/mca/oob/tcp/oob_tcp_listener.c +++ b/orte/mca/oob/tcp/oob_tcp_listener.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. @@ -25,7 +25,7 @@ * In windows, many of the socket functions return an EWOULDBLOCK * instead of things like EAGAIN, EINPROGRESS, etc. It has been * verified that this will not conflict with other error codes that - * are returned by these functions under UNIX/Linux environments + * are returned by these functions under UNIX/Linux environments */ #include "orte_config.h" @@ -169,8 +169,8 @@ int orte_oob_tcp_start_listening(void) } /* - * Create an IPv4 listen socket and bind to all interfaces. - * + * Create an IPv4 listen socket and bind to all interfaces. + * * At one time, this also registered a callback with the event library * for when connections were received on the listen socket. This is * no longer the case -- the caller must register any events required. @@ -273,7 +273,7 @@ static int create_listen(void) if (NULL == ports) { return ORTE_ERROR; } - + /* get the address info for this interface */ ((struct sockaddr_in*) &inaddr)->sin_family = AF_INET; ((struct sockaddr_in*) &inaddr)->sin_addr.s_addr = INADDR_ANY; @@ -295,12 +295,12 @@ static int create_listen(void) port = htons(port); ((struct sockaddr_in*) &inaddr)->sin_port = port; - + /* create a listen socket for incoming connections on this port */ sd = socket(AF_INET, SOCK_STREAM, 0); if (sd < 0) { if (EAFNOSUPPORT != opal_socket_errno) { - opal_output(0,"mca_oob_tcp_component_init: socket() failed: %s (%d)", + opal_output(0,"mca_oob_tcp_component_init: socket() failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno); } opal_argv_free(ports); @@ -321,7 +321,7 @@ static int create_listen(void) opal_argv_free(ports); return ORTE_ERROR; } - + /* Set the socket to close-on-exec so that no children inherit this FD */ if (opal_fd_set_cloexec(sd) != OPAL_SUCCESS) { @@ -348,25 +348,25 @@ static int create_listen(void) } /* resolve assigned port */ if (getsockname(sd, (struct sockaddr*)&inaddr, &addrlen) < 0) { - opal_output(0, "mca_oob_tcp_create_listen: getsockname(): %s (%d)", + opal_output(0, "mca_oob_tcp_create_listen: getsockname(): %s (%d)", strerror(opal_socket_errno), opal_socket_errno); CLOSE_THE_SOCKET(sd); opal_argv_free(ports); return ORTE_ERROR; } - + /* setup listen backlog to maximum allowed by kernel */ if (listen(sd, SOMAXCONN) < 0) { - opal_output(0, "mca_oob_tcp_component_init: listen(): %s (%d)", + opal_output(0, "mca_oob_tcp_component_init: listen(): %s (%d)", strerror(opal_socket_errno), opal_socket_errno); CLOSE_THE_SOCKET(sd); opal_argv_free(ports); return ORTE_ERROR; } - + /* set socket up to be non-blocking, otherwise accept could block */ if ((flags = fcntl(sd, F_GETFL, 0)) < 0) { - opal_output(0, "mca_oob_tcp_component_init: fcntl(F_GETFL) failed: %s (%d)", + opal_output(0, "mca_oob_tcp_component_init: fcntl(F_GETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno); CLOSE_THE_SOCKET(sd); opal_argv_free(ports); @@ -374,7 +374,7 @@ static int create_listen(void) } flags |= O_NONBLOCK; if (fcntl(sd, F_SETFL, flags) < 0) { - opal_output(0, "mca_oob_tcp_component_init: fcntl(F_SETFL) failed: %s (%d)", + opal_output(0, "mca_oob_tcp_component_init: fcntl(F_SETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno); CLOSE_THE_SOCKET(sd); opal_argv_free(ports); @@ -402,7 +402,7 @@ static int create_listen(void) } /* done with this, so release it */ opal_argv_free(ports); - + if (0 == opal_list_get_size(&mca_oob_tcp_component.listeners)) { /* cleanup */ if (0 <= sd) { @@ -416,8 +416,8 @@ static int create_listen(void) #if OPAL_ENABLE_IPV6 /* - * Create an IPv6 listen socket and bind to all interfaces. - * + * Create an IPv6 listen socket and bind to all interfaces. + * * At one time, this also registered a callback with the event library * for when connections were received on the listen socket. This is * no longer the case -- the caller must register any events required. @@ -520,7 +520,7 @@ static int create_listen6(void) if (NULL == ports) { return ORTE_ERROR; } - + /* get the address info for this interface */ ((struct sockaddr_in6*) &inaddr)->sin6_family = AF_INET6; ((struct sockaddr_in6*) &inaddr)->sin6_addr = in6addr_any; @@ -542,12 +542,12 @@ static int create_listen6(void) port = htons(port); ((struct sockaddr_in6*) &inaddr)->sin6_port = port; - + /* create a listen socket for incoming connections on this port */ sd = socket(AF_INET6, SOCK_STREAM, 0); if (sd < 0) { if (EAFNOSUPPORT != opal_socket_errno) { - opal_output(0,"mca_oob_tcp_component_init: socket() failed: %s (%d)", + opal_output(0,"mca_oob_tcp_component_init: socket() failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno); } return ORTE_ERR_IN_ERRNO; @@ -577,7 +577,7 @@ static int create_listen6(void) opal_argv_free(ports); return ORTE_ERROR; } - + if (bind(sd, (struct sockaddr*)&inaddr, addrlen) < 0) { if( (EADDRINUSE == opal_socket_errno) || (EADDRNOTAVAIL == opal_socket_errno) ) { continue; @@ -593,28 +593,28 @@ static int create_listen6(void) } /* resolve assigned port */ if (getsockname(sd, (struct sockaddr*)&inaddr, &addrlen) < 0) { - opal_output(0, "mca_oob_tcp_create_listen: getsockname(): %s (%d)", + opal_output(0, "mca_oob_tcp_create_listen: getsockname(): %s (%d)", strerror(opal_socket_errno), opal_socket_errno); CLOSE_THE_SOCKET(sd); return ORTE_ERROR; } - + /* setup listen backlog to maximum allowed by kernel */ if (listen(sd, SOMAXCONN) < 0) { - opal_output(0, "mca_oob_tcp_component_init: listen(): %s (%d)", + opal_output(0, "mca_oob_tcp_component_init: listen(): %s (%d)", strerror(opal_socket_errno), opal_socket_errno); return ORTE_ERROR; } - + /* set socket up to be non-blocking, otherwise accept could block */ if ((flags = fcntl(sd, F_GETFL, 0)) < 0) { - opal_output(0, "mca_oob_tcp_component_init: fcntl(F_GETFL) failed: %s (%d)", + opal_output(0, "mca_oob_tcp_component_init: fcntl(F_GETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno); return ORTE_ERROR; } flags |= O_NONBLOCK; if (fcntl(sd, F_SETFL, flags) < 0) { - opal_output(0, "mca_oob_tcp_component_init: fcntl(F_SETFL) failed: %s (%d)", + opal_output(0, "mca_oob_tcp_component_init: fcntl(F_SETFL) failed: %s (%d)", strerror(opal_socket_errno), opal_socket_errno); return ORTE_ERROR; } @@ -647,7 +647,7 @@ static int create_listen6(void) /* done with this, so release it */ opal_argv_free(ports); - + return ORTE_SUCCESS; } #endif diff --git a/orte/mca/oob/tcp/oob_tcp_listener.h b/orte/mca/oob/tcp/oob_tcp_listener.h index 182e083d591..fe039e57214 100644 --- a/orte/mca/oob/tcp/oob_tcp_listener.h +++ b/orte/mca/oob/tcp/oob_tcp_listener.h @@ -5,17 +5,17 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/tcp/oob_tcp_peer.h b/orte/mca/oob/tcp/oob_tcp_peer.h index c4c13977550..6201903c937 100644 --- a/orte/mca/oob/tcp/oob_tcp_peer.h +++ b/orte/mca/oob/tcp/oob_tcp_peer.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -90,7 +90,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_op_t); opal_event_set_priority(&pop->ev, ORTE_MSG_PRI); \ opal_event_active(&pop->ev, OPAL_EV_WRITE, 1); \ } while(0); - + #define ORTE_ACTIVATE_TCP_CMP_OP(p, cbfunc) \ do { \ mca_oob_tcp_peer_op_t *pop; \ diff --git a/orte/mca/oob/tcp/oob_tcp_ping.h b/orte/mca/oob/tcp/oob_tcp_ping.h index 9ea7433c59b..350f8ac022e 100644 --- a/orte/mca/oob/tcp/oob_tcp_ping.h +++ b/orte/mca/oob/tcp/oob_tcp_ping.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/ud/Makefile.am b/orte/mca/oob/ud/Makefile.am index 0924501c020..e3004aec8e2 100644 --- a/orte/mca/oob/ud/Makefile.am +++ b/orte/mca/oob/ud/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/oob/ud/configure.m4 b/orte/mca/oob/ud/configure.m4 index 246592eb7e6..70b4edbc24a 100644 --- a/orte/mca/oob/ud/configure.m4 +++ b/orte/mca/oob/ud/configure.m4 @@ -6,15 +6,15 @@ # 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, +# 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) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/oob/usock/Makefile.am b/orte/mca/oob/usock/Makefile.am index 307a61693ec..b44934e8b6a 100644 --- a/orte/mca/oob/usock/Makefile.am +++ b/orte/mca/oob/usock/Makefile.am @@ -5,7 +5,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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. @@ -14,9 +14,9 @@ # All rights reserved # Copyright (c) 2013-2015 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/oob/usock/configure.m4 b/orte/mca/oob/usock/configure.m4 index 645333022f8..c9a1b59f50a 100644 --- a/orte/mca/oob/usock/configure.m4 +++ b/orte/mca/oob/usock/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -15,9 +15,9 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -27,9 +27,9 @@ AC_DEFUN([MCA_orte_oob_usock_CONFIG],[ AC_CONFIG_FILES([orte/mca/oob/usock/Makefile]) # check for sockaddr_un (a good sign we have Unix domain sockets) - AC_CHECK_TYPES([struct sockaddr_un], + AC_CHECK_TYPES([struct sockaddr_un], [oob_usock_happy="yes"], - [oob_usock_happy="no"], + [oob_usock_happy="no"], [AC_INCLUDES_DEFAULT #ifdef HAVE_SYS_SOCKET_H #include diff --git a/orte/mca/oob/usock/help-oob-usock.txt b/orte/mca/oob/usock/help-oob-usock.txt index 452fef60803..6eb8ac0542a 100644 --- a/orte/mca/oob/usock/help-oob-usock.txt +++ b/orte/mca/oob/usock/help-oob-usock.txt @@ -6,14 +6,14 @@ # 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, +# 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$ # [static-and-dynamic] diff --git a/orte/mca/oob/usock/oob_usock.c b/orte/mca/oob/usock/oob_usock.c index 7814ae0d7cf..3993bc42e9c 100644 --- a/orte/mca/oob/usock/oob_usock.c +++ b/orte/mca/oob/usock/oob_usock.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. @@ -266,7 +266,7 @@ static void process_send(int fd, short args, void *cbdata) /* we don't know how to talk to our daemon, * which is strange since we already got here. * likely means we lost a race condition, so - * + * */ ORTE_ACTIVATE_USOCK_MSG_ERROR(NULL, op->msg, ORTE_PROC_MY_DAEMON, @@ -345,7 +345,7 @@ static void send_nb(orte_rml_send_t *msg) * socket to recv. This is called for the listen sockets to accept an * incoming connection, on new sockets trying to complete the software * connection process, and for probes. Data on an established - * connection is handled elsewhere. + * connection is handled elsewhere. */ static void recv_handler(int sd, short flags, void *cbdata) { diff --git a/orte/mca/oob/usock/oob_usock.h b/orte/mca/oob/usock/oob_usock.h index 0c692428d7c..f6fcbc56808 100644 --- a/orte/mca/oob/usock/oob_usock.h +++ b/orte/mca/oob/usock/oob_usock.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/usock/oob_usock_component.h b/orte/mca/oob/usock/oob_usock_component.h index f193bb159c6..a0bc004e793 100644 --- a/orte/mca/oob/usock/oob_usock_component.h +++ b/orte/mca/oob/usock/oob_usock_component.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/usock/oob_usock_connection.h b/orte/mca/oob/usock/oob_usock_connection.h index 2a009d61834..fe98f6e09c9 100644 --- a/orte/mca/oob/usock/oob_usock_connection.h +++ b/orte/mca/oob/usock/oob_usock_connection.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/oob/usock/oob_usock_peer.h b/orte/mca/oob/usock/oob_usock_peer.h index bd7c768f94e..cc715d4fdc8 100644 --- a/orte/mca/oob/usock/oob_usock_peer.h +++ b/orte/mca/oob/usock/oob_usock_peer.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -69,7 +69,7 @@ OBJ_CLASS_DECLARATION(mca_oob_usock_peer_op_t); opal_event_set_priority(&op->ev, ORTE_MSG_PRI); \ opal_event_active(&op->ev, OPAL_EV_WRITE, 1); \ } while(0); - + #define ORTE_ACTIVATE_USOCK_CMP_OP(p, cbfunc) \ do { \ mca_oob_usock_peer_op_t *pop; \ diff --git a/orte/mca/oob/usock/oob_usock_ping.h b/orte/mca/oob/usock/oob_usock_ping.h index ecf920f8f90..67badb8f05e 100644 --- a/orte/mca/oob/usock/oob_usock_ping.h +++ b/orte/mca/oob/usock/oob_usock_ping.h @@ -5,18 +5,18 @@ * 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, + * 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) 2006-2013 Los Alamos National Security, LLC. + * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ diff --git a/orte/mca/plm/Makefile.am b/orte/mca/plm/Makefile.am index da9498c799a..eaad41787ed 100644 --- a/orte/mca/plm/Makefile.am +++ b/orte/mca/plm/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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$ # diff --git a/orte/mca/plm/alps/Makefile.am b/orte/mca/plm/alps/Makefile.am index 9c400373ae4..c259b6af01a 100644 --- a/orte/mca/plm/alps/Makefile.am +++ b/orte/mca/plm/alps/Makefile.am @@ -5,15 +5,15 @@ # 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, +# 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) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/plm/alps/configure.m4 b/orte/mca/plm/alps/configure.m4 index 5afa755998e..8c62c230e08 100644 --- a/orte/mca/plm/alps/configure.m4 +++ b/orte/mca/plm/alps/configure.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2011-2013 Los Alamos National Security, LLC. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/orte/mca/plm/alps/help-plm-alps.txt b/orte/mca/plm/alps/help-plm-alps.txt index bb170841e18..78a49f79c5b 100644 --- a/orte/mca/plm/alps/help-plm-alps.txt +++ b/orte/mca/plm/alps/help-plm-alps.txt @@ -6,14 +6,14 @@ # 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, +# 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$ # [multiple-prefixes] diff --git a/orte/mca/plm/alps/plm_alps.h b/orte/mca/plm/alps/plm_alps.h index d837045aa98..b8fa0d50f2c 100644 --- a/orte/mca/plm/alps/plm_alps.h +++ b/orte/mca/plm/alps/plm_alps.h @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -39,7 +39,7 @@ typedef struct orte_plm_alps_component_t orte_plm_alps_component_t; * Globally exported variable */ -ORTE_MODULE_DECLSPEC extern orte_plm_alps_component_t +ORTE_MODULE_DECLSPEC extern orte_plm_alps_component_t mca_plm_alps_component; ORTE_DECLSPEC extern orte_plm_base_module_t orte_plm_alps_module; diff --git a/orte/mca/plm/alps/plm_alps_component.c b/orte/mca/plm/alps/plm_alps_component.c index 23c0e6ca410..ee6c9b64d88 100644 --- a/orte/mca/plm/alps/plm_alps_component.c +++ b/orte/mca/plm/alps/plm_alps_component.c @@ -6,16 +6,16 @@ * 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, + * 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) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ * * These symbols are in a file by themselves to provide nice linker @@ -67,12 +67,12 @@ orte_plm_alps_component_t mca_plm_alps_component = { .base_version = { ORTE_PLM_BASE_VERSION_2_0_0, - + /* Component name and version */ .mca_component_name = "alps", MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION, ORTE_RELEASE_VERSION), - + /* Component open and close functions */ .mca_open_component = plm_alps_open, .mca_close_component = plm_alps_close, diff --git a/orte/mca/plm/alps/plm_alps_module.c b/orte/mca/plm/alps/plm_alps_module.c index 6eb13c7dbd2..fff6ad93dbd 100644 --- a/orte/mca/plm/alps/plm_alps_module.c +++ b/orte/mca/plm/alps/plm_alps_module.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights - * reserved. + * reserved. * Copyright (c) 2014 Intel Corporation. All rights reserved. * $COPYRIGHT$ * @@ -115,7 +115,7 @@ static void launch_daemons(int fd, short args, void *cbdata); static int plm_alps_init(void) { int rc; - + if (ORTE_SUCCESS != (rc = orte_plm_base_comm_start())) { ORTE_ERROR_LOG(rc); return rc; @@ -238,7 +238,7 @@ static void launch_daemons(int fd, short args, void *cbdata) OBJ_RELEASE(state); return; } - + /* need integer value for command line parameter */ orte_util_convert_jobid_to_string(&jobid_string, daemons->jobid); @@ -301,7 +301,7 @@ static void launch_daemons(int fd, short args, void *cbdata) if (ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_DAEMON_LAUNCHED)) { continue; } - + /* otherwise, add it to the list of nodes upon which * we need to launch a daemon */ @@ -330,7 +330,7 @@ static void launch_daemons(int fd, short args, void *cbdata) /* add the daemon command (as specified by user) */ orte_plm_base_setup_orted_cmd(&argc, &argv); - + /* Add basic orted command line options, including debug flags */ orte_plm_base_orted_append_basic_args(&argc, &argv, NULL, @@ -401,7 +401,7 @@ static void launch_daemons(int fd, short args, void *cbdata) /* setup environment */ env = opal_argv_copy(orte_launch_environ); - + if (0 < opal_output_get_verbosity(orte_plm_base_framework.framework_output)) { param = opal_argv_join(argv, ' '); OPAL_OUTPUT_VERBOSE((1, orte_plm_base_framework.framework_output, @@ -410,13 +410,13 @@ static void launch_daemons(int fd, short args, void *cbdata) (NULL == param) ? "NULL" : param)); if (NULL != param) free(param); } - + /* exec the daemon(s) */ if (ORTE_SUCCESS != (rc = plm_alps_start_proc(argc, argv, env, cur_prefix))) { ORTE_ERROR_LOG(rc); goto cleanup; } - + /* indicate that the daemons for this job were launched */ state->jdata->state = ORTE_JOB_STATE_DAEMONS_LAUNCHED; daemons->state = ORTE_JOB_STATE_DAEMONS_LAUNCHED; @@ -431,11 +431,11 @@ static void launch_daemons(int fd, short args, void *cbdata) if (NULL != env) { opal_argv_free(env); } - + if(NULL != jobid_string) { free(jobid_string); } - + /* cleanup the caddy */ OBJ_RELEASE(state); @@ -454,7 +454,7 @@ static int plm_alps_terminate_orteds(void) { int rc; orte_job_t *jdata; - + OPAL_OUTPUT_VERBOSE((10, orte_plm_base_framework.framework_output, "%s plm:alps: terminating orteds", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); @@ -472,7 +472,7 @@ static int plm_alps_terminate_orteds(void) if (ORTE_SUCCESS != (rc = orte_plm_base_orted_exit(ORTE_DAEMON_EXIT_CMD))) { ORTE_ERROR_LOG(rc); } - + jdata = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid); ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_DAEMONS_TERMINATED); @@ -498,7 +498,7 @@ static int plm_alps_signal_job(orte_jobid_t jobid, int32_t signal) static int plm_alps_finalize(void) { int rc; - + if (NULL != alpsrun) { OBJ_RELEASE(alpsrun); } @@ -507,7 +507,7 @@ static int plm_alps_finalize(void) if (ORTE_SUCCESS != (rc = orte_plm_base_comm_stop())) { ORTE_ERROR_LOG(rc); } - + return ORTE_SUCCESS; } @@ -520,7 +520,7 @@ static void alps_wait_cb(orte_proc_t *proc, void* cbdata){ necessarily mean that alps failed - it could be that an orted returned a non-zero exit status. Of course, that means the orted failed(!), so the end result is the same - the job didn't start. - + As a result, we really can't do much with the exit status itself - it could be something in errno (if alps itself failed), or it could be something returned by an orted, or it could be something returned by @@ -531,13 +531,13 @@ static void alps_wait_cb(orte_proc_t *proc, void* cbdata){ wakes up - otherwise, do nothing! */ jdata = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid); - + if (0 != proc->exit_code) { if (failed_launch) { /* report that the daemon has failed so we break out of the daemon * callback receive and exit */ - ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_FAILED_TO_START); + ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_FAILED_TO_START); } else { /* an orted must have died unexpectedly after launch - report * that the daemon has failed so we exit @@ -564,7 +564,7 @@ static int plm_alps_start_proc(int argc, char **argv, char **env, ORTE_ERROR_LOG(ORTE_ERR_SYS_LIMITS_CHILDREN); return ORTE_ERR_SYS_LIMITS_CHILDREN; } - + alpsrun = OBJ_NEW(orte_proc_t); alpsrun->pid = alps_pid; /* be sure to mark it as alive so we don't instantly fire */ @@ -642,8 +642,8 @@ static int plm_alps_start_proc(int argc, char **argv, char **env, signals sent from the shell (like those resulting from cntl-c) don't get sent to alps */ setpgid(0, 0); - - + + execve(exec_argv, argv, env); opal_output(0, "plm:alps:start_proc: exec failed"); @@ -655,7 +655,7 @@ static int plm_alps_start_proc(int argc, char **argv, char **env, process group any more. Stevens says always do this on both sides of the fork... */ setpgid(alps_pid, alps_pid); - + free(exec_argv); } diff --git a/orte/mca/plm/base/Makefile.am b/orte/mca/plm/base/Makefile.am index 5077f1e87bd..82ffc693d6b 100644 --- a/orte/mca/plm/base/Makefile.am +++ b/orte/mca/plm/base/Makefile.am @@ -5,15 +5,15 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2009 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$ # diff --git a/orte/mca/plm/base/base.h b/orte/mca/plm/base/base.h index de7f81e9af0..7957eae1124 100644 --- a/orte/mca/plm/base/base.h +++ b/orte/mca/plm/base/base.h @@ -5,15 +5,15 @@ * 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, + * 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) 2013 Los Alamos National Security, LLC. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @file: diff --git a/orte/mca/plm/base/help-plm-base.txt b/orte/mca/plm/base/help-plm-base.txt index 1e44d27564f..8e13f92b364 100644 --- a/orte/mca/plm/base/help-plm-base.txt +++ b/orte/mca/plm/base/help-plm-base.txt @@ -6,15 +6,15 @@ # 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, +# 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) 2015 Intel, Inc. All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # [no-available-pls] diff --git a/orte/mca/plm/base/plm_base_frame.c b/orte/mca/plm/base/plm_base_frame.c index 8d2aebd0f04..2cea3fb26fc 100644 --- a/orte/mca/plm/base/plm_base_frame.c +++ b/orte/mca/plm/base/plm_base_frame.c @@ -5,18 +5,18 @@ * 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, + * 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-2013 Los Alamos National Security, LLC. - * All rights reserved. + * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -90,7 +90,7 @@ static int orte_plm_base_open(mca_base_open_flag_t flags) { /* init the next jobid */ orte_plm_globals.next_jobid = 1; - + /* default to assigning daemons to nodes at launch */ orte_plm_globals.daemon_nodes_assigned_at_launch = true; diff --git a/orte/mca/plm/base/plm_base_jobid.c b/orte/mca/plm/base/plm_base_jobid.c index bfcd5a64c89..6964b6a6889 100644 --- a/orte/mca/plm/base/plm_base_jobid.c +++ b/orte/mca/plm/base/plm_base_jobid.c @@ -5,14 +5,14 @@ * 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, + * 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$ */ @@ -39,34 +39,34 @@ int orte_plm_base_set_hnp_name(void) uint16_t jobfam; uint32_t hash32; uint32_t bias; - + /* hash the nodename */ OPAL_HASH_STR(orte_process_info.nodename, hash32); - + bias = (uint32_t)orte_process_info.pid; - + OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output, "plm:base:set_hnp_name: initial bias %ld nodename hash %lu", (long)bias, (unsigned long)hash32)); /* fold in the bias */ hash32 = hash32 ^ bias; - + /* now compress to 16-bits */ jobfam = (uint16_t)(((0x0000ffff & (0xffff0000 & hash32) >> 16)) ^ (0x0000ffff & hash32)); - + OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output, "plm:base:set_hnp_name: final jobfam %lu", (unsigned long)jobfam)); - + /* set the name */ ORTE_PROC_MY_NAME->jobid = 0xffff0000 & ((uint32_t)jobfam << 16); ORTE_PROC_MY_NAME->vpid = 0; - + /* copy it to the HNP field */ ORTE_PROC_MY_HNP->jobid = ORTE_PROC_MY_NAME->jobid; ORTE_PROC_MY_HNP->vpid = ORTE_PROC_MY_NAME->vpid; - + /* done */ return ORTE_SUCCESS; } @@ -78,12 +78,12 @@ int orte_plm_base_create_jobid(orte_job_t *jdata) { #if 0 int32_t j; - + /* RHC: WHILE ORTE CAN NOW HANDLE RECYCLING OF JOBID'S, * THE MPI LAYER CANNOT SINCE THERE IS NO WAY TO * UPDATE THE OMPI_PROC_T LIST AND/OR THE BTL'S */ - + /* see if there is a prior * jobid that has completed and can be re-used. It can * never be 0 as that belongs to the HNP and its daemons @@ -103,14 +103,14 @@ int orte_plm_base_create_jobid(orte_job_t *jdata) */ return ORTE_SUCCESS; } - + if (UINT16_MAX == orte_plm_globals.next_jobid) { /* if we get here, then no local jobids are available */ ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); jdata->jobid = ORTE_JOBID_INVALID; return ORTE_ERR_OUT_OF_RESOURCE; } - + /* take the next jobid */ jdata->jobid = ORTE_CONSTRUCT_LOCAL_JOBID(ORTE_PROC_MY_NAME->jobid, orte_plm_globals.next_jobid); orte_plm_globals.next_jobid++; diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index 176c9388df1..dbce8984cad 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -82,7 +82,7 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata) { orte_state_caddy_t *caddy = (orte_state_caddy_t*)cbdata; - + #if OPAL_HAVE_HWLOC { hwloc_topology_t t; @@ -295,7 +295,7 @@ void orte_plm_base_setup_job(int fd, short args, void *cbdata) */ opal_pointer_array_set_item(orte_job_data, ORTE_LOCAL_JOBID(caddy->jdata->jobid), caddy->jdata); } - + /* if job recovery is not enabled, set it to default */ if (!ORTE_FLAG_TEST(caddy->jdata, ORTE_JOB_FLAG_RECOVERABLE) && orte_enable_recovery) { @@ -390,7 +390,7 @@ void orte_plm_base_complete_setup(int fd, short args, void *cbdata) /* ensure our routing plan is up-to-date */ orte_routed.update_routing_plan(); - + /* If this job is being started by me, then there is nothing * further we need to do as any user directives (e.g., to tie * off IO to /dev/null) will have been included in the launch @@ -405,7 +405,7 @@ void orte_plm_base_complete_setup(int fd, short args, void *cbdata) /* the tool will PUSH its stdin, so nothing we need to do here * about stdin */ } - + #if OPAL_ENABLE_FT_CR == 1 /* * Notify the Global SnapC component regarding new job (even if it was restarted) @@ -539,7 +539,7 @@ void orte_plm_base_launch_apps(int fd, short args, void *cbdata) OBJ_RELEASE(caddy); return; } - + /* goes to all daemons */ sig = OBJ_NEW(orte_grpcomm_signature_t); sig->signature = (orte_process_name_t*)malloc(sizeof(orte_process_name_t)); @@ -620,11 +620,11 @@ void orte_plm_base_post_launch(int fd, short args, void *cbdata) "%s plm:base:launch wiring up iof for job %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_JOBID_PRINT(jdata->jobid))); - + /* push stdin - the IOF will know what to do with the specified target */ name.jobid = jdata->jobid; name.vpid = jdata->stdin_target; - + if (ORTE_SUCCESS != (rc = orte_iof.push(&name, ORTE_IOF_STDIN, 0))) { ORTE_ERROR_LOG(rc); ORTE_FORCED_TERMINATE(ORTE_ERROR_DEFAULT_EXIT_CODE); @@ -726,7 +726,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, orte_job_t *jdata; orte_process_name_t dname; opal_buffer_t *relay; - + /* get the daemon job, if necessary */ if (NULL == jdatorted) { jdatorted = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid); @@ -742,7 +742,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, orted_failed_launch = true; goto CLEANUP; } - + /* set the contact info into the hash table */ orte_rml.set_contact_info(rml_uri); @@ -750,7 +750,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, "%s plm:base:orted_report_launch from daemon %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&dname))); - + /* update state and record for this daemon contact info */ if (NULL == (daemon = (orte_proc_t*)opal_pointer_array_get_item(jdatorted->procs, dname.vpid))) { ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); @@ -778,12 +778,12 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, nodename = ptr; } } - + OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output, "%s plm:base:orted_report_launch from daemon %s on node %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&daemon->name), nodename)); - + /* look this node up, if necessary */ if (!orte_plm_globals.daemon_nodes_assigned_at_launch) { OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output, @@ -837,7 +837,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, orted_failed_launch = true; goto CLEANUP; } - + /* mark the daemon as launched */ ORTE_FLAG_SET(node, ORTE_NODE_FLAG_DAEMON_LAUNCHED); @@ -957,7 +957,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, } } } - + /* unpack any coprocessors */ idx=1; if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &coprocessors, &idx, OPAL_STRING))) { @@ -1016,7 +1016,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender, orted_failed_launch ? "failed" : "completed", ORTE_NAME_PRINT(&dname), (NULL == daemon) ? "UNKNOWN" : daemon->rml_uri)); - + if (orted_failed_launch) { ORTE_ACTIVATE_JOB_STATE(jdatorted, ORTE_JOB_STATE_FAILED_TO_START); return; @@ -1119,7 +1119,7 @@ int orte_plm_base_setup_orted_cmd(int *argc, char ***argv) { int i, loc; char **tmpv; - + /* set default location to be 0, indicating that * only a single word is in the cmd */ @@ -1133,7 +1133,7 @@ int orte_plm_base_setup_orted_cmd(int *argc, char ***argv) opal_argv_append(argc, argv, tmpv[i]); } opal_argv_free(tmpv); - + return loc; } @@ -1196,7 +1196,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, opal_argv_append(argc, argv, "1"); } #endif - + if (orte_map_reduce) { opal_argv_append(argc, argv, "--mapreduce"); } @@ -1219,14 +1219,14 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, opal_argv_append(argc, argv, param); free(param); } - + /* tell the orted what ESS component to use */ if (NULL != ess) { opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID); opal_argv_append(argc, argv, "ess"); opal_argv_append(argc, argv, ess); } - + /* pass the daemon jobid */ opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID); opal_argv_append(argc, argv, "orte_ess_jobid"); @@ -1236,7 +1236,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, } opal_argv_append(argc, argv, param); free(param); - + /* setup to pass the vpid */ if (NULL != proc_vpid_index) { opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID); @@ -1244,7 +1244,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, *proc_vpid_index = *argc; opal_argv_append(argc, argv, "